diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..113eead --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# This allows generated code to be indexed correctly +*.ts linguist-generated=false \ No newline at end of file diff --git a/.gitignore b/.gitignore index 79fe835..e6a53f2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,9 @@ -.env -node_modules -.DS_Store \ No newline at end of file +**/.speakeasy/logs/ +**/.speakeasy/reports/ +**/.speakeasy/temp/ +/.eslintcache +/.tsbuildinfo +/bin +/esm +/node_modules +.DS_Store diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..146d4cc --- /dev/null +++ b/.npmignore @@ -0,0 +1,10 @@ +**/* +!/RUNTIMES.md +!/**/*.ts +!/**/*.js +!/**/*.mjs +!/**/*.json +!/**/*.map + +/eslint.config.mjs +/__tests__ diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock new file mode 100644 index 0000000..6668339 --- /dev/null +++ b/.speakeasy/gen.lock @@ -0,0 +1,136 @@ +lockVersion: 2.0.0 +id: 0dd544ca-3933-4c41-a5b5-b9a57ec94099 +management: + docChecksum: 0705bb8d3c7be892a2ae0c172da62bcd + docVersion: 0.0.1 + speakeasyVersion: 1.568.2 + generationVersion: 2.634.2 + releaseVersion: 0.0.1-beta.1 + configChecksum: 0e337d77c5f457285ed20387ef84dd0b +features: + mcp-typescript: + additionalDependencies: 0.1.0 + constsAndDefaults: 0.1.0 + core: 0.1.2 + defaultEnabledRetries: 0.1.0 + enumUnions: 0.1.0 + globalSecurity: 0.1.0 + globalSecurityCallbacks: 0.0.0 + globalServerURLs: 0.1.0 + nullables: 0.1.0 + responseFormat: 0.1.0 + retries: 0.1.0 + sdkHooks: 0.1.0 + unions: 0.1.0 +generatedFiles: + - .gitattributes + - .npmignore + - eslint.config.mjs + - package.json + - src/core.ts + - src/funcs/Alerts_list_alerts.ts + - src/funcs/Incidents_create_incident.ts + - src/funcs/Incidents_list_incidents.ts + - src/funcs/Retrospectives_list_incident_retrospectives.ts + - src/funcs/Retrospectives_update_incident_retrospective_field.ts + - src/hooks/hooks.ts + - src/hooks/types.ts + - src/lib/base64.ts + - src/lib/config.ts + - src/lib/dlv.ts + - src/lib/encodings.ts + - src/lib/files.ts + - src/lib/http.ts + - src/lib/is-plain-object.ts + - src/lib/logger.ts + - src/lib/matchers.ts + - src/lib/primitives.ts + - src/lib/result.ts + - src/lib/retries.ts + - src/lib/schemas.ts + - src/lib/sdks.ts + - src/lib/security.ts + - src/lib/url.ts + - src/mcp-server/build.mts + - src/mcp-server/cli.ts + - src/mcp-server/cli/start/command.ts + - src/mcp-server/cli/start/impl.ts + - src/mcp-server/console-logger.ts + - src/mcp-server/extensions.ts + - src/mcp-server/mcp-server.ts + - src/mcp-server/prompts.ts + - src/mcp-server/resources.ts + - src/mcp-server/scopes.ts + - src/mcp-server/server.ts + - src/mcp-server/shared.ts + - src/mcp-server/tools.ts + - src/mcp-server/tools/Alerts_list_alerts.ts + - src/mcp-server/tools/Incidents_create_incident.ts + - src/mcp-server/tools/Incidents_list_incidents.ts + - src/mcp-server/tools/Retrospectives_list_incident_retrospectives.ts + - src/mcp-server/tools/Retrospectives_update_incident_retrospective_field.ts + - src/models/alertsalertentity.ts + - src/models/alertsalertentitypaginated.ts + - src/models/alertssirenalertentity.ts + - src/models/alertssirenevententity.ts + - src/models/authorentity.ts + - src/models/conversationsapientitiesreference.ts + - src/models/createincident.ts + - src/models/createincidentop.ts + - src/models/customfieldsfieldvalue.ts + - src/models/errors/apierror.ts + - src/models/errors/httpclienterrors.ts + - src/models/errors/sdkvalidationerror.ts + - src/models/incidententity.ts + - src/models/incidententityfieldrequiremententity.ts + - src/models/incidententitypaginated.ts + - src/models/incidentschannelentity.ts + - src/models/incidentsconferencebridgeentity.ts + - src/models/incidentsimpactentity.ts + - src/models/incidentslifecyclemeasuremententity.ts + - src/models/incidentslifecyclemilestoneentity.ts + - src/models/incidentslifecyclephaseentity.ts + - src/models/incidentsmilestoneentity.ts + - src/models/incidentsretrospectiveentity.ts + - src/models/incidentsretrospectiveentitypaginated.ts + - src/models/incidentsretrospectiveentitysectionentity.ts + - src/models/incidentsretrospectivefieldentity.ts + - src/models/incidentsroleassignmententity.ts + - src/models/incidentsstatuspageentity.ts + - src/models/incidentsteamassignmententitylite.ts + - src/models/listalertsop.ts + - src/models/listincidentretrospectivesop.ts + - src/models/listincidentsop.ts + - src/models/nullableattachmentslinkentity.ts + - src/models/nullableauthorentity.ts + - src/models/nullableconversationsapientitieschannel.ts + - src/models/nullableeventnoteentity.ts + - src/models/nullableincidentroleentity.ts + - src/models/nullableincidentscontextobjectentity.ts + - src/models/nullableintegrationentity.ts + - src/models/nullableorganizationentity.ts + - src/models/nullablepaginationentity.ts + - src/models/nullableseveritymatrixconditionentity.ts + - src/models/nullableseveritymatriximpactentity.ts + - src/models/nullablesignalsapiruleentity.ts + - src/models/nullablesignalsapitargetentity.ts + - src/models/nullablesuccinctentity.ts + - src/models/nullableteamentitylite.ts + - src/models/nullableticketingpriorityentity.ts + - src/models/nullableticketingticketentity.ts + - src/models/nullableuserentity.ts + - src/models/publicapiv1incidentssuccinctentity.ts + - src/models/security.ts + - src/models/succinctentity.ts + - src/models/ticketingticketentity.ts + - src/models/updateincidentretrospectivefield.ts + - src/models/updateincidentretrospectivefieldop.ts + - src/types/async.ts + - src/types/blobs.ts + - src/types/enums.ts + - src/types/fp.ts + - src/types/rfcdate.ts + - src/types/streams.ts + - tsconfig.json +examplesVersion: 1.0.2 +generatedTests: {} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml new file mode 100644 index 0000000..f6a4986 --- /dev/null +++ b/.speakeasy/gen.yaml @@ -0,0 +1,35 @@ +configVersion: 2.0.0 +generation: + sdkClassName: FireHydrant + maintainOpenAPIOrder: true + usageSnippets: + optionalPropertyRendering: withExample + sdkInitStyle: constructor + useClassNamesForArrayFields: true + fixes: + nameResolutionDec2023: true + nameResolutionFeb2025: true + parameterOrderingFeb2024: true + requestResponseComponentNamesFeb2024: true + securityFeb2025: true + sharedErrorComponentsApr2025: true + auth: + oAuth2ClientCredentialsEnabled: true + oAuth2PasswordEnabled: true + sdkHooksConfigAccess: true + tests: + generateTests: true + generateNewTests: false + skipResponseBodyAssertions: false +mcp-typescript: + version: 0.0.1-beta.1 + additionalDependencies: + dependencies: {} + devDependencies: {} + peerDependencies: {} + author: Speakeasy + baseErrorName: FireHydrantError + defaultErrorName: FireHydrantDefaultError + inputModelSuffix: input + outputModelSuffix: output + packageName: firehydrant-mcp diff --git a/.speakeasy/openapi.output.yaml b/.speakeasy/openapi.output.yaml new file mode 100644 index 0000000..ce33917 --- /dev/null +++ b/.speakeasy/openapi.output.yaml @@ -0,0 +1,12743 @@ +openapi: "3.0.1" +info: + title: "FireHydrant API" + description: "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.\n\n* [Dig into our API endpoints](https://developers.firehydrant.io/docs/api)\n* [View your bot users](https://app.firehydrant.io/organizations/bots)\n\n## Base API endpoint\n\n[https://api.firehydrant.io/v1](https://api.firehydrant.io/v1)\n\n## Current version\n\nv1\n\n## Authentication\n\nAll 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.\n\nAn example of a header to authenticate against FireHydrant would look like:\n\n```\nAuthorization: Bearer fhb-thisismytoken\n```\n\n## Bot tokens\n\nTo 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).\n\nBot 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.\n\nEvery request to the API is authenticated unless specified otherwise.\n\n### Rate Limiting\n\nCurrently, 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.\n\nRate limited responses will be served with a `429` status code and a JSON body of:\n\n```json\n{\"error\": \"rate limit exceeded\"}\n```\nand headers of:\n```\n\"RateLimit-Limit\" -> the maximum number of requests in the rate limit pool\n\"Retry-After\" -> the number of seconds to wait before trying again\n```\n\n## How lists are returned\n\nAPI 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.\n\n### Paginated requests\n\nThe `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.)\n\nPagination 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**.\n\nFor 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.\n\n```\n{\n \"data\": [\n {\n \"id\": \"f8125cf4-b3a7-4f88-b5ab-57a60b9ed89b\",\n \"name\": \"Production - GCP\",\n \"description\": \"\",\n \"created_at\": \"2021-02-17T20:02:10.679Z\"\n },\n {\n \"id\": \"a69f1f58-af77-4708-802d-7e73c0bf261c\",\n \"name\": \"Staging\",\n \"description\": \"\",\n \"created_at\": \"2021-04-16T13:41:59.418Z\"\n }\n ],\n \"pagination\": {\n \"count\": 2,\n \"page\": 1,\n \"items\": 2,\n \"pages\": 1,\n \"last\": 1,\n \"prev\": null,\n \"next\": null\n }\n}\n```\n\nTo request the second page, you'd request the same endpoint with the additional query parameter of `page` in the URL:\n\n```\nGET https://api.firehydrant.io/v1/environments?page=2\n```\n\nIf you need to modify the number of records coming back from FireHydrant, you can use the `per_page` parameter (max is 200):\n\n```\nGET https://api.firehydrant.io/v1/environments?per_page=50\n```" + version: "0.0.1" +servers: + - url: "https://api.firehydrant.io/" +security: + - api_key: [] +tags: + - name: "Call Routes" + description: "Operations about Call Routes" + - name: "Audit Events" + description: "Operations about Audit Events" + - name: "Account Settings" + description: "Operations related to Account Settings" + - name: "Alerts" + description: "Operations related to Alerts" + - name: "Audiences" + description: "Operations related to Audiences" + - name: "Changes" + description: "Operations related to Changes" + - name: "Communication" + description: "Operations related to Communication" + - name: "Conversations" + description: "Operations related to Conversations" + - name: "Incidents" + description: "Operations related to Incidents" + - name: "Incident Settings" + description: "Operations related to Incident Settings" + - name: "Integrations" + description: "Operations related to Integrations" + - name: "Metrics/Reporting" + description: "Operations related to Metrics & Reporting" + - name: "Retrospectives" + description: "Operations related to Retrospectives" + - name: "Runbooks" + description: "Operations related to Runbooks" + - name: "SCIM" + description: "Operations related to SCIM" + - name: "Catalog Entries" + description: "Operations related to Catalog Entries" + - name: "Signals" + description: "Operations related to Signals" + - name: "Status Pages" + description: "Operations related to Status Pages" + - name: "Tasks" + description: "Operations related to Tasks" + - name: "Teams" + description: "Operations related to Teams" + - name: "Ticketing" + description: "Operations related to Ticketing" + - name: "Users" + description: "Operations related to Users" + - name: "Webhooks" + description: "Operations related to Webhooks" +paths: + "/v1/ping": {} + "/v1/environments": {} + "/v1/environments/{environment_id}": {} + "/v1/services": {} + "/v1/services/service_links": {} + "/v1/services/{service_id}": {} + "/v1/services/{service_id}/dependencies": {} + "/v1/services/{service_id}/available_upstream_dependencies": {} + "/v1/services/{service_id}/available_downstream_dependencies": {} + "/v1/services/{service_id}/service_links/{remote_id}": {} + "/v1/services/{service_id}/checklist_response/{checklist_id}": {} + "/v1/service_dependencies": {} + "/v1/service_dependencies/{service_dependency_id}": {} + "/v1/functionalities": {} + "/v1/functionalities/{functionality_id}": {} + "/v1/functionalities/{functionality_id}/services": {} + "/v1/teams": {} + "/v1/teams/{team_id}": {} + "/v1/teams/{team_id}/call_routes": {} + "/v1/teams/{team_id}/escalation_policies": {} + "/v1/teams/{team_id}/escalation_policies/{id}": {} + "/v1/teams/{team_id}/on_call_schedules": {} + "/v1/teams/{team_id}/on_call_schedules/{schedule_id}": {} + "/v1/teams/{team_id}/on_call_schedules/{schedule_id}/shifts": {} + "/v1/teams/{team_id}/on_call_schedules/{schedule_id}/shifts/{id}": {} + "/v1/teams/{team_id}/signal_rules": {} + "/v1/teams/{team_id}/signal_rules/{id}": {} + "/v1/changes": {} + "/v1/changes/{change_id}": {} + "/v1/changes/{change_id}/identities": {} + "/v1/changes/{change_id}/identities/{identity_id}": {} + "/v1/changes/events": {} + "/v1/changes/events/{change_event_id}": {} + "/v1/change_types": {} + "/v1/entitlements": {} + "/v1/incidents": + get: + tags: + - "Incidents" + summary: "List incidents" + description: "List all of the incidents in the organization" + operationId: "list_incidents" + parameters: + - name: "page" + in: "query" + schema: + type: "integer" + format: "int32" + nullable: true + - name: "per_page" + in: "query" + schema: + type: "integer" + format: "int32" + nullable: true + - name: "conditions" + in: "query" + description: "A JSON string that defines 'logic' and 'user_data'" + schema: + type: "string" + nullable: true + - name: "environments" + in: "query" + description: "A comma separated list of environment IDs or 'is_empty' to filter for incidents with no impacted environments" + schema: + type: "string" + nullable: true + - name: "services" + in: "query" + description: "A comma separated list of service IDs or 'is_empty' to filter for incidents with no impacted services" + schema: + type: "string" + nullable: true + - name: "functionalities" + in: "query" + description: "A comma separated list of functionality IDs or 'is_empty' to filter for incidents with no impacted functionalities" + schema: + type: "string" + nullable: true + - name: "excluded_infrastructure_ids" + in: "query" + description: "A comma separated list of infrastructure IDs. Returns incidents that do not have the following infrastructure ids associated with them." + schema: + type: "string" + nullable: true + - name: "teams" + in: "query" + description: "A comma separated list of team IDs" + schema: + type: "string" + nullable: true + - name: "assigned_teams" + in: "query" + description: "A comma separated list of IDs for assigned teams or 'is_empty' to filter for incidents with no active team assignments" + schema: + type: "string" + nullable: true + - name: "status" + in: "query" + description: "Incident status" + schema: + type: "string" + nullable: true + - name: "start_date" + in: "query" + description: "Filters for incidents that started on or after this date" + schema: + type: "string" + format: "date-time" + nullable: true + - name: "end_date" + in: "query" + description: "Filters for incidents that started on or before this date" + schema: + type: "string" + format: "date-time" + nullable: true + - name: "resolved_at_or_after" + in: "query" + description: "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." + schema: + type: "string" + format: "date-time" + nullable: true + - name: "resolved_at_or_before" + in: "query" + description: "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." + schema: + type: "string" + format: "date-time" + nullable: true + - name: "closed_at_or_after" + in: "query" + description: "Filters for incidents that were closed at or after this time" + schema: + type: "string" + format: "date-time" + nullable: true + - name: "closed_at_or_before" + in: "query" + description: "Filters for incidents that were closed at or before this time" + schema: + type: "string" + format: "date-time" + nullable: true + - name: "created_at_or_after" + in: "query" + description: "Filters for incidents that were created at or after this time" + schema: + type: "string" + format: "date-time" + nullable: true + - name: "created_at_or_before" + in: "query" + description: "Filters for incidents that were created at or before this time" + schema: + type: "string" + format: "date-time" + nullable: true + - name: "query" + in: "query" + description: "A text query for an incident that searches on name, summary, and desciption" + schema: + type: "string" + nullable: true + - name: "name" + in: "query" + description: "A query to search incidents by their name" + schema: + type: "string" + nullable: true + - name: "saved_search_id" + in: "query" + description: "The id of a previously saved search." + schema: + type: "string" + nullable: true + - name: "priorities" + in: "query" + description: "A text value of priority" + schema: + type: "string" + nullable: true + - name: "priority_not_set" + in: "query" + description: "Flag for including incidents where priority has not been set" + schema: + type: "boolean" + nullable: true + - name: "severities" + in: "query" + description: "A text value of severity" + schema: + type: "string" + nullable: true + - name: "severity_not_set" + in: "query" + description: "Flag for including incidents where severity has not been set" + schema: + type: "boolean" + nullable: true + - name: "current_milestones" + in: "query" + description: "A comma separated list of current milestones" + schema: + type: "string" + nullable: true + - name: "tags" + in: "query" + description: "A comma separated list of tags" + schema: + type: "string" + nullable: true + - name: "tag_match_strategy" + in: "query" + description: "A matching strategy for the tags provided" + schema: + type: "string" + nullable: true + enum: + - "any" + - "match_all" + - "exclude" + - name: "archived" + in: "query" + description: "Return archived incidents" + schema: + type: "boolean" + nullable: true + - name: "updated_after" + in: "query" + description: "Filters for incidents that were updated after this date" + schema: + type: "string" + format: "date-time" + nullable: true + - name: "updated_before" + in: "query" + description: "Filters for incidents that were updated before this date" + schema: + type: "string" + format: "date-time" + nullable: true + - name: "incident_type_id" + in: "query" + description: "A comma separated list of incident type IDs" + schema: + type: "string" + nullable: true + - name: "retrospective_templates" + in: "query" + description: "A comma separated list of retrospective template IDs" + schema: + type: "string" + nullable: true + responses: + "200": + description: "List all of the incidents in the organization" + content: + "application/json": + schema: {"$ref": "#/components/schemas/IncidentEntityPaginated"} + x-speakeasy-mcp: {"disabled": false} + post: + tags: + - "Incidents" + summary: "Create an incident" + description: "Create a new incident" + operationId: "create_incident" + requestBody: + content: + "application/json": + schema: {"$ref": "#/components/schemas/create_incident"} + required: true + responses: + "201": + description: "Create a new incident" + content: + "application/json": + schema: {"$ref": "#/components/schemas/IncidentEntity"} + x-codegen-request-body-name: "create_incident" + x-speakeasy-mcp: {"disabled": false} + "/v1/incidents/{incident_id}/channel": {} + "/v1/incidents/{incident_id}/close": {} + "/v1/incidents/{incident_id}/resolve": {} + "/v1/incidents/{incident_id}": {} + "/v1/incidents/{incident_id}/unarchive": {} + "/v1/incidents/{incident_id}/alerts": {} + "/v1/incidents/{incident_id}/alerts/{incident_alert_id}/primary": {} + "/v1/incidents/{incident_id}/alerts/{incident_alert_id}": {} + "/v1/incidents/{incident_id}/milestones/bulk_update": {} + "/v1/incidents/{incident_id}/milestones": {} + "/v1/incidents/{incident_id}/related_change_events": {} + "/v1/incidents/{incident_id}/related_change_events/{related_change_event_id}": {} + "/v1/incidents/{incident_id}/status_pages": {} + "/v1/incidents/{incident_id}/status_pages/{status_page_id}": {} + "/v1/incidents/{incident_id}/task_lists": {} + "/v1/incidents/{incident_id}/tasks": {} + "/v1/incidents/{incident_id}/tasks/{task_id}": {} + "/v1/incidents/{incident_id}/tasks/{task_id}/convert": {} + "/v1/incidents/{incident_id}/links": {} + "/v1/incidents/{incident_id}/links/{link_id}": {} + "/v1/incidents/{incident_id}/transcript/attribution": {} + "/v1/incidents/{incident_id}/transcript": {} + "/v1/incidents/{incident_id}/transcript/{transcript_id}": {} + "/v1/incidents/{incident_id}/conference_bridges": {} + "/v1/incidents/{incident_id}/conference_bridges/{id}/translations/{language_code}": {} + "/v1/incidents/{incident_id}/similar": {} + "/v1/incidents/{incident_id}/attachments": {} + "/v1/incidents/{incident_id}/events": {} + "/v1/incidents/{incident_id}/events/{event_id}": {} + "/v1/incidents/{incident_id}/events/{event_id}/votes/status": {} + "/v1/incidents/{incident_id}/events/{event_id}/votes": {} + "/v1/incidents/{incident_id}/impact": {} + "/v1/incidents/{incident_id}/impact/{type}": {} + "/v1/incidents/{incident_id}/impact/{type}/{id}": {} + "/v1/incidents/{incident_id}/notes": {} + "/v1/incidents/{incident_id}/notes/{note_id}": {} + "/v1/incidents/{incident_id}/generic_chat_messages": {} + "/v1/incidents/{incident_id}/generic_chat_messages/{message_id}": {} + "/v1/incidents/{incident_id}/role_assignments": {} + "/v1/incidents/{incident_id}/role_assignments/{role_assignment_id}": {} + "/v1/incidents/{incident_id}/team_assignments": {} + "/v1/incidents/{incident_id}/team_assignments/{team_assignment_id}": {} + "/v1/incidents/{incident_id}/users/{user_id}": {} + "/v1/incidents/{incident_id}/relationships": {} + "/v1/incidents/{incident_id}/retrospectives/share": {} + "/v1/incidents/{incident_id}/retrospectives/export": {} + "/v1/incidents/{incident_id}/retrospectives": + get: + tags: + - "Retrospectives" + summary: "All attached retrospectives for an incident" + description: "Retrieve retrospectives attached to an incident" + operationId: "list_incident_retrospectives" + parameters: + - name: "page" + in: "query" + schema: + type: "integer" + format: "int32" + nullable: true + - name: "per_page" + in: "query" + schema: + type: "integer" + format: "int32" + nullable: true + - name: "is_hidden" + in: "query" + description: "Filter by hidden status." + schema: + type: "boolean" + nullable: true + - name: "incident_id" + in: "path" + required: true + schema: + type: "string" + responses: + "200": + description: "Retrieve retrospectives attached to an incident" + content: + "application/json": + schema: {"$ref": "#/components/schemas/Incidents_RetrospectiveEntityPaginated"} + x-speakeasy-mcp: {"disabled": false, "description": "Lists all retrospectives (RCAs) for an incident. Among other things, this is useful for:\n\n - Getting a list of retrospectives for an incident,\n - Getting basic data about a retrospective.\n - Getting the fields of a retrospective.\n"} + "/v1/incidents/{incident_id}/retrospectives/{retrospective_id}": {} + "/v1/incidents/{incident_id}/retrospectives/{retrospective_id}/fields": {} + "/v1/incidents/{incident_id}/retrospectives/{retrospective_id}/fields/{field_id}": + patch: + tags: + - "Retrospectives" + summary: "Update the value on a retrospective field" + description: "Update retrospective field value" + operationId: "update_incident_retrospective_field" + parameters: + - name: "retrospective_id" + in: "path" + required: true + schema: + type: "string" + - name: "field_id" + in: "path" + required: true + schema: + type: "string" + - name: "incident_id" + in: "path" + required: true + schema: + type: "string" + requestBody: + content: + "application/json": + schema: {"$ref": "#/components/schemas/update_incident_retrospective_field"} + required: true + responses: + "200": + description: "Update retrospective field value" + content: + "application/json": + schema: {"$ref": "#/components/schemas/Incidents_RetrospectiveFieldEntity"} + x-codegen-request-body-name: "update_incident_retrospective_field" + x-speakeasy-mcp: {"disabled": false, "description": "Updates a field in a retrospective (RCA) for an incident. Among other things, this is useful for:\n\n - Updating a field in a retrospective,\n - Updating the value of a field in a retrospective.\n\nValues should be compatible with the tiptap editor (array structure).\n"} + "/v1/incidents/{incident_id}/retrospectives/{retrospective_id}/fields/{field_id}/inputs": {} + "/v1/incident_roles": {} + "/v1/incident_roles/{incident_role_id}": {} + "/v1/incident_tags/validate": {} + "/v1/incident_tags": {} + "/v1/incident_types": {} + "/v1/incident_types/{id}": {} + "/v1/integrations": {} + "/v1/integrations/{integration_id}": {} + "/v1/integrations/field_maps/{field_map_id}": {} + "/v1/integrations/field_maps/{field_map_id}/available_fields": {} + "/v1/integrations/authed_providers/{integration_slug}/{connection_id}": {} + "/v1/integrations/authed_providers/{integration_slug}/{connection_id}/{authed_provider_id}": {} + "/v1/integrations/connections": {} + "/v1/integrations/connections/{slug}": {} + "/v1/integrations/connections/{slug}/{connection_id}/refresh": {} + "/v1/integrations/connections/{slug}/{connection_id}": {} + "/v1/integrations/statuses": {} + "/v1/integrations/statuses/{slug}": {} + "/v1/integrations/statuses/{slug}/{by_connection_id}": {} + "/v1/integrations/aws/connections": {} + "/v1/integrations/aws/connections/{id}": {} + "/v1/integrations/aws/cloudtrail_batches": {} + "/v1/integrations/aws/cloudtrail_batches/{id}": {} + "/v1/integrations/aws/cloudtrail_batches/{id}/events": {} + "/v1/integrations/confluence_cloud/connections/{id}/space/search": {} + "/v1/integrations/slack/connections/{connection_id}/workspaces": {} + "/v1/integrations/slack/usergroups": {} + "/v1/integrations/slack/connections/{connection_id}/emoji_actions": {} + "/v1/integrations/slack/connections/{connection_id}/emoji_actions/{emoji_action_id}": {} + "/v1/integrations/statuspage/connections": {} + "/v1/integrations/statuspage/connections/{connection_id}": {} + "/v1/integrations/statuspage/connections/{connection_id}/pages": {} + "/v1/integrations/zendesk/{connection_id}/tickets/search": {} + "/v1/integrations/zendesk/search": {} + "/v1/users": {} + "/v1/users/{id}": {} + "/v1/users/{id}/services": {} + "/v1/current_user": {} + "/v1/reports/mean_time": {} + "/v1/retrospectives": {} + "/v1/metrics/ticket_funnel": {} + "/v1/metrics/retrospectives": {} + "/v1/metrics/milestone_funnel": {} + "/v1/metrics/user_involvements": {} + "/v1/metrics/incidents": {} + "/v1/metrics/mttx": {} + "/v1/metrics/{infra_type}": {} + "/v1/metrics/{infra_type}/{infra_id}": {} + "/v1/runbooks/actions": {} + "/v1/runbooks/executions": {} + "/v1/runbooks/executions/{execution_id}": {} + "/v1/runbooks/executions/{execution_id}/steps/{step_id}": {} + "/v1/runbooks/executions/{execution_id}/steps/{step_id}/script": {} + "/v1/runbooks/executions/{execution_id}/steps/{step_id}/script/{state}": {} + "/v1/runbooks/select_options/{integration_slug}/{action_slug}/{field}": {} + "/v1/runbooks": {} + "/v1/runbooks/{runbook_id}": {} + "/v1/runbook_audits": {} + "/v1/audit_events": {} + "/v1/audit_events/{id}": {} + "/v1/nunc_connections": {} + "/v1/nunc_connections/{nunc_connection_id}/subscribers": {} + "/v1/nunc_connections/{nunc_connection_id}": {} + "/v1/nunc_connections/{nunc_connection_id}/component_groups/{group_id}": {} + "/v1/nunc_connections/{nunc_connection_id}/component_groups": {} + "/v1/nunc_connections/{nunc_connection_id}/links/{link_id}": {} + "/v1/nunc_connections/{nunc_connection_id}/links": {} + "/v1/nunc_connections/{nunc_connection_id}/images/{type}": {} + "/v1/saved_searches/{resource_type}/{saved_search_id}": {} + "/v1/saved_searches/{resource_type}": {} + "/v1/lifecycles/measurement_definitions": {} + "/v1/lifecycles/measurement_definitions/{measurement_definition_id}": {} + "/v1/lifecycles/phases": {} + "/v1/lifecycles/milestones": {} + "/v1/lifecycles/milestones/{milestone_id}": {} + "/v1/priorities": {} + "/v1/priorities/{priority_slug}": {} + "/v1/severities": {} + "/v1/severities/{severity_slug}": {} + "/v1/severity_matrix": {} + "/v1/severity_matrix/conditions": {} + "/v1/severity_matrix/conditions/{condition_id}": {} + "/v1/severity_matrix/impacts": {} + "/v1/severity_matrix/impacts/{impact_id}": {} + "/v1/scheduled_maintenances": {} + "/v1/scheduled_maintenances/{scheduled_maintenance_id}": {} + "/v1/schedules": {} + "/v1/infrastructures": {} + "/v1/nunc/subscriptions/{unsubscribe_token}": {} + "/v1/nunc/subscriptions": {} + "/v1/status_update_templates": {} + "/v1/status_update_templates/{status_update_template_id}": {} + "/v1/custom_fields/definitions/{field_id}": {} + "/v1/custom_fields/definitions": {} + "/v1/custom_fields/definitions/{field_id}/select_options": {} + "/v1/post_mortems/reports": {} + "/v1/post_mortems/reports/{report_id}": {} + "/v1/post_mortems/reports/{report_id}/reasons": {} + "/v1/post_mortems/reports/{report_id}/reasons/{reason_id}": {} + "/v1/post_mortems/reports/{report_id}/reasons/order": {} + "/v1/post_mortems/reports/{report_id}/publish": {} + "/v1/post_mortems/reports/{report_id}/fields/{field_id}": {} + "/v1/post_mortems/questions": {} + "/v1/post_mortems/questions/{question_id}": {} + "/v1/retrospective_templates": {} + "/v1/retrospective_templates/{retrospective_template_id}": {} + "/v1/alerts": + get: + tags: + - "Alerts" + summary: "List alerts" + description: "Retrieve all alerts from third parties" + operationId: "list_alerts" + parameters: + - name: "page" + in: "query" + schema: + type: "integer" + format: "int32" + nullable: true + - name: "per_page" + in: "query" + schema: + type: "integer" + format: "int32" + nullable: true + - name: "query" + in: "query" + description: "A text query for alerts" + schema: + type: "string" + nullable: true + - name: "users" + in: "query" + description: "A comma separated list of user IDs. This currently only works for Signals alerts." + schema: + type: "string" + nullable: true + - name: "teams" + in: "query" + description: "A comma separated list of team IDs. This currently only works for Signals alerts." + schema: + type: "string" + nullable: true + - name: "signal_rules" + in: "query" + description: "A comma separated list of signals rule IDs. This currently only works for Signals alerts." + schema: + type: "string" + nullable: true + - name: "environments" + in: "query" + description: "A comma separated list of environment IDs. This currently only works for Signals alerts." + schema: + type: "string" + nullable: true + - name: "functionalities" + in: "query" + description: "A comma separated list of functionality IDs. This currently only works for Signals alerts." + schema: + type: "string" + nullable: true + - name: "services" + in: "query" + description: "A comma separated list of service IDs. This currently only works for Signals alerts." + schema: + type: "string" + nullable: true + - name: "tags" + in: "query" + description: "A comma separated list of tags. This currently only works for Signals alerts." + schema: + type: "string" + nullable: true + - name: "tag_match_strategy" + in: "query" + description: "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." + schema: + type: "string" + nullable: true + enum: + - "any" + - "match_all" + - "exclude" + - name: "statuses" + in: "query" + description: "A comma separated list of statuses to filter by. Valid statuses are: opened, acknowledged, resolved, ignored, expired, or linked" + schema: + type: "string" + nullable: true + responses: + "200": + description: "Retrieve all alerts from third parties" + content: + "application/json": + schema: {"$ref": "#/components/schemas/Alerts_AlertEntityPaginated"} + x-speakeasy-mcp: {"disabled": false} + "/v1/alerts/{alert_id}": {} + "/v1/processing_log_entries": {} + "/v1/ticketing/tickets": {} + "/v1/ticketing/tickets/{ticket_id}": {} + "/v1/ticketing/projects": {} + "/v1/ticketing/projects/{ticketing_project_id}": {} + "/v1/ticketing/projects/{ticketing_project_id}/configuration_options": {} + "/v1/ticketing/projects/{ticketing_project_id}/configuration_options/options_for/{field_id}": {} + "/v1/ticketing/projects/{ticketing_project_id}/field_maps/available_fields": {} + "/v1/ticketing/projects/{ticketing_project_id}/field_maps": {} + "/v1/ticketing/projects/{ticketing_project_id}/field_maps/{map_id}": {} + "/v1/ticketing/projects/{ticketing_project_id}/inbound_field_maps/available_fields": {} + "/v1/ticketing/projects/{ticketing_project_id}/inbound_field_maps": {} + "/v1/ticketing/projects/{ticketing_project_id}/inbound_field_maps/{map_id}": {} + "/v1/ticketing/projects/{ticketing_project_id}/provider_project_configurations": {} + "/v1/ticketing/projects/{ticketing_project_id}/provider_project_configurations/{config_id}": {} + "/v1/ticketing/priorities": {} + "/v1/ticketing/priorities/{id}": {} + "/v1/ticketing/ticket_tags": {} + "/v1/task_lists": {} + "/v1/task_lists/{task_list_id}": {} + "/v1/noauth/ping": {} + "/v1/scim/v2/Groups/{id}": {} + "/v1/scim/v2/Groups": {} + "/v1/scim/v2/Users/{id}": {} + "/v1/scim/v2/Users": {} + "/v1/catalogs/{catalog_id}/refresh": {} + "/v1/catalogs/{catalog_id}/ingest": {} + "/v1/checklist_templates": {} + "/v1/checklist_templates/{id}": {} + "/v1/bootstrap": {} + "/v1/form_configurations/{slug}/append_data_on_select/{field_id}/{selected_value}": {} + "/v1/form_configurations/{slug}": {} + "/v1/conversations/{conversation_id}/comments/{comment_id}/reactions/{reaction_id}": {} + "/v1/conversations/{conversation_id}/comments/{comment_id}/reactions": {} + "/v1/conversations/{conversation_id}/comments/{comment_id}": {} + "/v1/conversations/{conversation_id}/comments": {} + "/v1/signals/analytics/timeseries": {} + "/v1/signals/analytics/grouped_metrics": {} + "/v1/signals/analytics/mttx": {} + "/v1/signals/analytics/shifts/export": {} + "/v1/signals/call_routes": {} + "/v1/signals/call_routes/{id}": {} + "/v1/signals/event_sources": {} + "/v1/signals/event_sources/{transposer_slug}": {} + "/v1/signals/grouping": {} + "/v1/signals/grouping/{id}": {} + "/v1/signals/email_targets": {} + "/v1/signals/email_targets/{id}": {} + "/v1/signals/webhook_targets": {} + "/v1/signals/webhook_targets/{id}": {} + "/v1/signals/transposers": {} + "/v1/signals/ingest_url": {} + "/v1/signals/debugger": {} + "/v1/signals_on_call": {} + "/v1/webhooks": {} + "/v1/webhooks/{webhook_id}/deliveries": {} + "/v1/webhooks/{webhook_id}": {} + "/v1/ai/summarize_incident/{incident_id}/{generated_summary_id}/voted": {} + "/v1/ai/summarize_incident/{incident_id}/{generated_summary_id}/vote": {} + "/v1/ai/preferences": {} + "/v1/audiences": {} + "/v1/audiences/{audience_id}": {} + "/v1/audiences/{audience_id}/restore": {} + "/v1/audiences/member/{member_id}/default": {} + "/v1/audiences/{audience_id}/summaries/{incident_id}": {} + "/v1/audiences/summaries/{incident_id}": {} +components: + schemas: + "ErrorEntity": + type: "object" + properties: + "detail": + type: "string" + nullable: true + "messages": + type: "array" + nullable: true + items: + type: "string" + "meta": + type: "object" + description: "An object with additional error metadata" + nullable: true + "code": + type: "string" + description: "A stable code on which to match errors" + nullable: true + description: "ErrorEntity model" + "PongEntity": + type: "object" + properties: + "response": + type: "string" + nullable: true + "actor": {"$ref": "#/components/schemas/NullableActorEntity"} + "organization": {"$ref": "#/components/schemas/NullableOrganizationEntity"} + description: "PongEntity model" + "ActorEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "email": + type: "string" + nullable: true + "type": + type: "string" + nullable: true + enum: + - "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" + "OrganizationEntity": + type: "object" + properties: + "name": + type: "string" + nullable: true + "id": + type: "string" + nullable: true + "create_environment": + required: + - "name" + type: "object" + properties: + "name": + type: "string" + "description": + type: "string" + nullable: true + description: "Creates an environment for the organization" + "EnvironmentEntryEntity": + type: "object" + properties: + "id": + type: "string" + description: "UUID of the Environment" + nullable: true + "name": + type: "string" + description: "Name of the Environment" + nullable: true + "slug": + type: "string" + description: "Slug of the Environment" + nullable: true + "description": + type: "string" + description: "Description of the Environment" + nullable: true + "updated_at": + type: "string" + description: "The time the environment was updated" + format: "date-time" + nullable: true + "created_at": + type: "string" + description: "The time the environment was created" + format: "date-time" + nullable: true + "active_incidents": + type: "array" + description: "List of active incident guids" + nullable: true + items: + type: "string" + "external_resources": + type: "array" + description: "Information about known linkages to representations of services outside of FireHydrant." + nullable: true + items: {"$ref": "#/components/schemas/ExternalResourceEntity"} + description: "EnvironmentEntryEntity model" + "ExternalResourceEntity": + type: "object" + properties: + "connection_type": + type: "string" + nullable: true + "connection_name": + type: "string" + nullable: true + "connection_full_favicon_url": + type: "string" + nullable: true + "connection_id": + type: "string" + nullable: true + "remote_id": + type: "string" + nullable: true + "remote_url": + type: "string" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "name": + type: "string" + nullable: true + "EnvironmentEntryEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/EnvironmentEntryEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "EnvironmentEntryEntityPaginated model" + "PaginationEntity": + type: "object" + properties: + "count": + type: "integer" + format: "int32" + nullable: true + "page": + type: "integer" + format: "int32" + nullable: true + "items": + type: "integer" + format: "int32" + nullable: true + "pages": + type: "integer" + format: "int32" + nullable: true + "last": + type: "integer" + format: "int32" + nullable: true + "prev": + type: "integer" + format: "int32" + nullable: true + "next": + type: "integer" + format: "int32" + nullable: true + "update_environment": + required: + - "name" + type: "object" + properties: + "name": + type: "string" + "description": + type: "string" + nullable: true + description: "Update a environments attributes" + "create_service": + required: + - "name" + type: "object" + properties: + "name": + type: "string" + "description": + type: "string" + nullable: true + "labels": + type: "object" + additionalProperties: + type: "string" + description: "A hash of label keys and values" + nullable: true + "service_tier": + type: "integer" + description: "Integer representing service tier. Lower values represent higher criticality. If not specified the default value will be 5." + format: "int32" + nullable: true + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + "functionalities": + type: "array" + description: "An array of functionalities" + nullable: true + items: + type: "object" + properties: + "summary": + type: "string" + description: "If you are trying to create a new functionality and attach it to this service, set the summary key" + nullable: true + "id": + type: "string" + description: "If you are trying to reuse a functionality, you may set the ID to attach it to the service" + nullable: true + "links": + type: "array" + description: "An array of links to associate with this service" + nullable: true + items: + required: + - "href_url" + - "name" + type: "object" + properties: + "name": + type: "string" + description: "Short name used to display and identify this link" + "href_url": + type: "string" + description: "URL" + "icon_url": + type: "string" + description: "An optional URL to an icon representing this link" + nullable: true + "owner": + required: + - "id" + type: "object" + properties: + "id": + type: "string" + description: "An object representing a Team that owns the service" + nullable: true + "teams": + type: "array" + description: "An array of teams to attach to this service." + nullable: true + items: + required: + - "id" + type: "object" + properties: + "id": + type: "string" + "alert_on_add": + type: "boolean" + nullable: true + "auto_add_responding_team": + type: "boolean" + nullable: true + "external_resources": + type: "array" + description: "An array of external resources to attach to this service." + nullable: true + items: + required: + - "remote_id" + type: "object" + properties: + "remote_id": + type: "string" + "connection_type": + type: "string" + description: "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." + nullable: true + description: "Creates a service for the organization, you may also create or attach functionalities to the service on create." + "ServiceEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "slug": + type: "string" + nullable: true + "service_tier": + type: "integer" + format: "int32" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "allowed_params": + type: "array" + nullable: true + items: + type: "string" + "labels": + type: "object" + description: "An object of label key and values" + nullable: true + "alert_on_add": + type: "boolean" + nullable: true + "auto_add_responding_team": + type: "boolean" + nullable: true + "active_incidents": + type: "array" + description: "List of active incident guids" + nullable: true + items: + type: "string" + "checklists": + type: "array" + description: "List of checklists associated with a service" + nullable: true + items: {"$ref": "#/components/schemas/ChecklistTemplateEntity"} + "completed_checks": + type: "integer" + format: "int32" + nullable: true + "external_resources": + type: "array" + description: "Information about known linkages to representations of services outside of FireHydrant." + nullable: true + items: {"$ref": "#/components/schemas/ExternalResourceEntity"} + "functionalities": + type: "array" + description: "List of functionalities attached to the service" + nullable: true + items: {"$ref": "#/components/schemas/FunctionalityEntity"} + "last_import": {"$ref": "#/components/schemas/NullableImports_ImportableResourceEntity"} + "links": + type: "array" + description: "List of links attached to this service." + nullable: true + items: {"$ref": "#/components/schemas/LinksEntity"} + "managed_by": + type: "string" + description: "If set, this field indicates that the service is managed by an integration and thus cannot be set manually" + nullable: true + "managed_by_settings": + type: "object" + description: "Indicates the settings of the catalog that manages this service" + nullable: true + "owner": {"$ref": "#/components/schemas/NullableTeamEntityLite"} + "service_checklist_updated_at": + type: "string" + format: "date-time" + nullable: true + "teams": + type: "array" + description: "List of teams attached to the service" + nullable: true + items: {"$ref": "#/components/schemas/TeamEntityLite"} + "updated_by": {"$ref": "#/components/schemas/NullableAuthorEntity"} + description: "ServiceEntity model" + "ChecklistTemplateEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "created_at": + type: "string" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "checks": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/ChecklistCheckEntity"} + "owner": {"$ref": "#/components/schemas/NullableTeamEntityLite"} + "connected_services": + type: "array" + description: "List of services that use this checklist" + nullable: true + items: {"$ref": "#/components/schemas/ServiceEntityChecklist"} + description: "ChecklistTemplateEntity model" + "ChecklistCheckEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "status": + type: "boolean" + nullable: true + "TeamEntityLite": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "slug": + type: "string" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "signals_ical_url": + type: "string" + nullable: true + "created_by": {"$ref": "#/components/schemas/NullableAuthorEntity"} + "in_support_hours": + type: "boolean" + nullable: true + "AuthorEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "source": + type: "string" + nullable: true + "email": + type: "string" + nullable: true + "ServiceEntityChecklist": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "slug": + type: "string" + nullable: true + "service_tier": + type: "integer" + format: "int32" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "allowed_params": + type: "array" + nullable: true + items: + type: "string" + "labels": + type: "object" + description: "An object of label key and values" + nullable: true + "alert_on_add": + type: "boolean" + nullable: true + "auto_add_responding_team": + type: "boolean" + nullable: true + "completed_checks": + type: "integer" + format: "int32" + nullable: true + "owner": {"$ref": "#/components/schemas/NullableTeamEntityLite"} + "service_checklist_updated_at": + type: "string" + format: "date-time" + nullable: true + "FunctionalityEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "slug": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "labels": + type: "object" + description: "An object of label key and values" + nullable: true + "active_incidents": + type: "array" + description: "List of active incident guids" + nullable: true + items: + type: "string" + "links": + type: "array" + description: "List of links attached to this functionality." + nullable: true + items: {"$ref": "#/components/schemas/LinksEntity"} + "owner": {"$ref": "#/components/schemas/NullableTeamEntityLite"} + "alert_on_add": + type: "boolean" + nullable: true + "auto_add_responding_team": + type: "boolean" + nullable: true + "updated_by": {"$ref": "#/components/schemas/NullableAuthorEntity"} + "services": + type: "array" + description: "Services this functionality provides" + nullable: true + items: {"$ref": "#/components/schemas/ServiceEntityLite"} + "external_resources": + type: "array" + description: "Information about known linkages to representations of services outside of FireHydrant." + nullable: true + items: {"$ref": "#/components/schemas/ExternalResourceEntity"} + "teams": + type: "array" + description: "List of teams attached to the functionality" + nullable: true + items: {"$ref": "#/components/schemas/TeamEntityLite"} + description: "FunctionalityEntity model" + "LinksEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "href_url": + type: "string" + nullable: true + "icon_url": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "ServiceEntityLite": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "slug": + type: "string" + nullable: true + "service_tier": + type: "integer" + format: "int32" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "allowed_params": + type: "array" + nullable: true + items: + type: "string" + "labels": + type: "object" + description: "An object of label key and values" + nullable: true + "alert_on_add": + type: "boolean" + nullable: true + "auto_add_responding_team": + type: "boolean" + nullable: true + description: "ServiceEntityLite model" + "Imports_ImportableResourceEntity": + type: "object" + properties: + "import_errors": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Imports_ImportErrorEntity"} + "imported_at": + type: "string" + format: "date-time" + nullable: true + "remote_id": + type: "string" + nullable: true + "state": + type: "string" + nullable: true + enum: + - "selected" + - "skipped" + - "imported" + - "errored" + "Imports_ImportErrorEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "message": + type: "string" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "data": + type: "object" + description: "Additional error data" + nullable: true + "resource": {"$ref": "#/components/schemas/NullableImports_ImportErrorEntity_ResourceEntity"} + "Imports_ImportErrorEntity_ResourceEntity": + type: "object" + properties: + "resource_id": + type: "string" + nullable: true + "resource_type": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "ServiceEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/ServiceEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "ServiceEntityPaginated model" + "create_service_links": + required: + - "connection_id" + - "external_service_ids" + - "integration" + type: "object" + properties: + "external_service_ids": + type: "string" + description: "ID of the service" + "connection_id": + type: "string" + description: "ID for the integration. This can be found by going to the edit page for the integration" + "integration": + type: "string" + description: "The name of the service" + enum: + - "pager_duty" + - "opsgenie" + - "victorops" + description: "Creates a service with the appropriate integration for each external service ID passed" + "ServiceLinkEntity": + type: "object" + properties: + "status_code": + type: "integer" + format: "int32" + nullable: true + "service": {"$ref": "#/components/schemas/NullableServiceEntity"} + description: "ServiceLinkEntity model" + "update_service": + type: "object" + properties: + "alert_on_add": + type: "boolean" + nullable: true + "auto_add_responding_team": + type: "boolean" + nullable: true + "checklists": + type: "array" + description: "Array of checklist IDs to attach to the service" + nullable: true + items: + required: + - "id" + type: "object" + properties: + "id": + type: "string" + "remove": + type: "boolean" + description: "Set to `true` to remove checklist from service" + nullable: true + "description": + type: "string" + nullable: true + "external_resources": + type: "array" + description: "An array of external resources to attach to this service." + nullable: true + items: + required: + - "remote_id" + type: "object" + properties: + "remote_id": + type: "string" + "connection_type": + type: "string" + description: "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." + nullable: true + "remove": + type: "boolean" + description: "If you are trying to remove an external resource from a service, set this to 'true'." + nullable: true + "functionalities": + type: "array" + description: "An array of functionalities" + nullable: true + items: + type: "object" + properties: + "id": + type: "string" + description: "If you are trying to reuse a functionality, you may set the ID to attach it to the service" + nullable: true + "remove": + type: "boolean" + description: "If you are trying to remove a functionality from a service, set this to 'true'" + nullable: true + "summary": + type: "string" + description: "If you are trying to create a new functionality and attach it to this service, set the summary key" + nullable: true + "labels": + type: "object" + additionalProperties: + type: "string" + description: "A hash of label keys and values" + nullable: true + "links": + type: "array" + description: "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." + nullable: true + items: + required: + - "href_url" + - "name" + type: "object" + properties: + "href_url": + type: "string" + description: "URL" + "name": + type: "string" + description: "Short name used to display and identify this link" + "icon_url": + type: "string" + description: "An optional URL to an icon representing this link" + nullable: true + "remove": + type: "boolean" + description: "If you are trying to remove a link, set this to 'true'" + nullable: true + "id": + type: "string" + description: "If updating an existing link, specify it's id." + nullable: true + "name": + type: "string" + nullable: true + "owner": + required: + - "id" + type: "object" + properties: + "id": + type: "string" + description: "An object representing a Team that owns the service" + nullable: true + "remove_owner": + type: "boolean" + description: "If you are trying to remove a team as an owner from a service, set this to 'true'" + nullable: true + "remove_remaining_checklists": + type: "boolean" + description: "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" + nullable: true + "remove_remaining_external_resources": + type: "boolean" + description: "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" + nullable: true + "remove_remaining_functionalities": + type: "boolean" + description: "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" + nullable: true + "remove_remaining_teams": + type: "boolean" + description: "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" + nullable: true + "service_tier": + type: "integer" + description: "Integer representing service tier" + format: "int32" + nullable: true + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + "teams": + type: "array" + description: "An array of teams to attach to this service." + nullable: true + items: + required: + - "id" + type: "object" + properties: + "id": + type: "string" + "remove": + type: "boolean" + description: "If you are trying to remove a team from a service, set this to 'true'" + nullable: true + description: "Update a services attributes, you may also add or remove functionalities from the service as well.\nNote: You may not remove or add individual label key/value pairs. You must include the entire object to override label values.\n" + "ServiceWithAllDependenciesEntity": + type: "object" + properties: + "child_service_dependencies": + type: "array" + description: "Services that depend on this service" + nullable: true + items: {"$ref": "#/components/schemas/ServiceChildDependencyEntity"} + "parent_service_dependencies": + type: "array" + description: "Services that this service is dependent on" + nullable: true + items: {"$ref": "#/components/schemas/ServiceParentDependencyEntity"} + "service_dependencies": + type: "array" + description: "All dependencies. Can be one of: ServiceChildDependencyEntity, ServiceParentDependencyEntity" + nullable: true + items: + type: "object" + description: "ServiceWithAllDependenciesEntity model" + "ServiceChildDependencyEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "notes": + type: "string" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "service": {"$ref": "#/components/schemas/NullableServiceEntity"} + "type": + type: "string" + nullable: true + "ServiceParentDependencyEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "notes": + type: "string" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "service": {"$ref": "#/components/schemas/NullableServiceEntity"} + "type": + type: "string" + nullable: true + "create_service_checklist_response": + required: + - "check_id" + - "status" + type: "object" + properties: + "check_id": + type: "string" + "status": + type: "boolean" + description: "Status of the check. 'true' if it's complete, 'false' if incomplete, or blank if not yet interacted with" + description: "Creates a response for a checklist item" + "create_service_dependency": + required: + - "connected_service_id" + - "service_id" + type: "object" + properties: + "service_id": + type: "string" + "connected_service_id": + type: "string" + "notes": + type: "string" + description: "A note to describe the service dependency relationship" + nullable: true + description: "Creates a service dependency relationship between two services" + "ServiceDependencyEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "notes": + type: "string" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "service": {"$ref": "#/components/schemas/NullableServiceEntity"} + "connected_service": {"$ref": "#/components/schemas/NullableServiceEntity"} + description: "ServiceDependencyEntity model" + "update_service_dependency": + type: "object" + properties: + "notes": + type: "string" + description: "A note to describe the service dependency relationship" + nullable: true + description: "Update the notes of the service dependency" + "create_functionality": + required: + - "name" + type: "object" + properties: + "name": + type: "string" + "description": + type: "string" + nullable: true + "services": + type: "array" + nullable: true + items: + required: + - "id" + type: "object" + properties: + "id": + type: "string" + description: "ID of a service" + "labels": + type: "object" + additionalProperties: + type: "string" + description: "A hash of label keys and values" + nullable: true + "alert_on_add": + type: "boolean" + nullable: true + "auto_add_responding_team": + type: "boolean" + nullable: true + "external_resources": + type: "array" + description: "An array of external resources to attach to this service." + nullable: true + items: + required: + - "remote_id" + type: "object" + properties: + "remote_id": + type: "string" + "connection_type": + type: "string" + description: "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." + nullable: true + "links": + type: "array" + description: "An array of links to associate with this service" + nullable: true + items: + required: + - "href_url" + - "name" + type: "object" + properties: + "name": + type: "string" + description: "Short name used to display and identify this link" + "href_url": + type: "string" + description: "URL" + "icon_url": + type: "string" + description: "An optional URL to an icon representing this link" + nullable: true + "owner": + required: + - "id" + type: "object" + properties: + "id": + type: "string" + description: "An object representing a Team that owns the service" + nullable: true + "teams": + type: "array" + description: "An array of teams to attach to this service." + nullable: true + items: + required: + - "id" + type: "object" + properties: + "id": + type: "string" + description: "Creates a functionality for the organization" + "FunctionalityEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/FunctionalityEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "FunctionalityEntityPaginated model" + "update_functionality": + type: "object" + properties: + "name": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "services": + type: "array" + nullable: true + items: + required: + - "id" + type: "object" + properties: + "id": + type: "string" + description: "ID of a service" + "remove": + type: "boolean" + description: "Set to true if you want to remove the given service from the functionality" + nullable: true + "links": + type: "array" + description: "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." + nullable: true + items: + required: + - "href_url" + - "name" + type: "object" + properties: + "href_url": + type: "string" + description: "URL" + "name": + type: "string" + description: "Short name used to display and identify this link" + "icon_url": + type: "string" + description: "An optional URL to an icon representing this link" + nullable: true + "remove": + type: "boolean" + description: "If you are trying to remove a link, set this to 'true'" + nullable: true + "id": + type: "string" + description: "If updating an existing link, specify it's id." + nullable: true + "owner": + required: + - "id" + type: "object" + properties: + "id": + type: "string" + description: "An object representing a Team that owns the functionality" + nullable: true + "remove_owner": + type: "boolean" + description: "If you are trying to remove a team as an owner from a functionality, set this to 'true'" + nullable: true + "teams": + type: "array" + description: "An array of teams to attach to this functionality." + nullable: true + items: + required: + - "id" + type: "object" + properties: + "id": + type: "string" + "remove": + type: "boolean" + description: "If you are trying to remove a team from a functionality, set this to 'true'" + nullable: true + "remove_remaining_teams": + type: "boolean" + description: "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" + nullable: true + "external_resources": + type: "array" + description: "An array of external resources to attach to this service." + nullable: true + items: + required: + - "remote_id" + type: "object" + properties: + "remote_id": + type: "string" + "connection_type": + type: "string" + description: "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." + nullable: true + "remove": + type: "boolean" + description: "If you are trying to remove an external resource from a service, set this to 'true'." + nullable: true + "remove_remaining_external_resources": + type: "boolean" + description: "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" + nullable: true + "labels": + type: "object" + additionalProperties: + type: "string" + description: "A hash of label keys and values" + nullable: true + "alert_on_add": + type: "boolean" + nullable: true + "auto_add_responding_team": + type: "boolean" + nullable: true + "remove_remaining_services": + type: "boolean" + description: "Set this to true if you want to remove all of the services that are not included in the services array from the functionality" + nullable: true + default: false + description: "Update a functionalities attributes" + "FunctionalityWithAllServicesEntity": + type: "object" + properties: + "services": + type: "array" + description: "Services this functionality provides" + nullable: true + items: {"$ref": "#/components/schemas/ServiceEntity"} + description: "FunctionalityWithAllServicesEntity model" + "create_team": + required: + - "name" + type: "object" + properties: + "name": + type: "string" + "description": + type: "string" + nullable: true + "slug": + type: "string" + nullable: true + "slack_channel_id": + type: "string" + description: "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).\n" + nullable: true + "ms_teams_channel": + required: + - "channel_id" + - "ms_team_id" + type: "object" + properties: + "channel_id": + type: "string" + "ms_team_id": + type: "string" + description: "MS Teams channel identity for channel associated with this team" + nullable: true + "memberships": + type: "array" + nullable: true + items: + type: "object" + properties: + "user_id": + type: "string" + nullable: true + "schedule_id": + type: "string" + nullable: true + "incident_role_id": + type: "string" + description: "An incident role ID that this user will automatically assigned if this team is assigned to an incident" + nullable: true + "invite_emails": + type: "array" + description: "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." + nullable: true + items: + type: "string" + description: "Create a new team" + "TeamEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "slug": + type: "string" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "signals_ical_url": + type: "string" + nullable: true + "created_by": {"$ref": "#/components/schemas/NullableAuthorEntity"} + "in_support_hours": + type: "boolean" + nullable: true + "slack_channel": {"$ref": "#/components/schemas/NullableIntegrations_Slack_SlackChannelEntity"} + "ms_teams_channel": {"$ref": "#/components/schemas/NullableIntegrations_MicrosoftTeamsV2_ChannelEntity"} + "memberships": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/MembershipEntity"} + "owned_checklist_templates": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/ChecklistTemplateEntity"} + "owned_functionalities": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/FunctionalityEntityLite"} + "owned_services": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/ServiceEntityLite"} + "owned_runbooks": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/SlimRunbookEntity"} + "responding_services": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/ServiceEntityLite"} + "services": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/ServiceEntityLite"} + "functionalities": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/FunctionalityEntityLite"} + "default_signals_escalation_policy": {"$ref": "#/components/schemas/NullableSuccinctEntity"} + description: "TeamEntity model" + "Integrations_Slack_SlackChannelEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "slack_channel_id": + type: "string" + nullable: true + "Integrations_MicrosoftTeamsV2_ChannelEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "channel_id": + type: "string" + nullable: true + "channel_name": + type: "string" + nullable: true + "ms_team_id": + type: "string" + nullable: true + "team_name": + type: "string" + nullable: true + "channel_url": + type: "string" + nullable: true + "status": + type: "string" + nullable: true + "incident": {"$ref": "#/components/schemas/NullableIncidentEntity"} + "IncidentEntity": + type: "object" + properties: + "id": + type: "string" + description: "UUID of the Incident" + nullable: true + "name": + type: "string" + description: "Name of the incident" + nullable: true + "created_at": + type: "string" + description: "The time the incident was opened" + format: "date-time" + nullable: true + "started_at": + type: "string" + description: "The time the incident started" + format: "date-time" + nullable: true + "discarded_at": + type: "string" + description: "The time the incident was archived" + format: "date-time" + nullable: true + "summary": + type: "string" + nullable: true + "customer_impact_summary": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "current_milestone": + type: "string" + description: "The type/slug of the current milestone. Will be one of the currently configured milestones for the given incident." + nullable: true + "number": + type: "integer" + description: "Incident number" + format: "int32" + nullable: true + "priority": + type: "string" + nullable: true + "severity": + type: "string" + nullable: true + "severity_color": + type: "string" + nullable: true + "severity_impact": + type: "string" + nullable: true + "severity_condition": + type: "string" + nullable: true + "tag_list": + type: "array" + nullable: true + items: + type: "string" + "incident_type": {"$ref": "#/components/schemas/NullableSuccinctEntity"} + "severity_impact_object": {"$ref": "#/components/schemas/NullableSeverityMatrix_ImpactEntity"} + "severity_condition_object": {"$ref": "#/components/schemas/NullableSeverityMatrix_ConditionEntity"} + "private_id": + type: "string" + nullable: true + "organization_id": + type: "string" + nullable: true + "milestones": + type: "array" + description: "DEPRECATED: Please use lifecycle phases instead" + nullable: true + items: {"$ref": "#/components/schemas/Incidents_MilestoneEntity"} + "lifecycle_phases": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Incidents_LifecyclePhaseEntity"} + "lifecycle_measurements": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Incidents_LifecycleMeasurementEntity"} + "active": + type: "boolean" + nullable: true + "labels": + type: "object" + description: "A key/value of labels" + nullable: true + "role_assignments": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Incidents_RoleAssignmentEntity"} + "status_pages": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Incidents_StatusPageEntity"} + "incident_url": + type: "string" + nullable: true + "private_status_page_url": + type: "string" + nullable: true + "organization": {"$ref": "#/components/schemas/NullableOrganizationEntity"} + "customers_impacted": + type: "integer" + format: "int32" + nullable: true + "monetary_impact": + type: "integer" + format: "int32" + nullable: true + "monetary_impact_cents": + type: "integer" + format: "int32" + nullable: true + "last_update": + type: "string" + nullable: true + "last_note": {"$ref": "#/components/schemas/NullableEvent_NoteEntity"} + "report_id": + type: "string" + nullable: true + "ai_incident_summary": + type: "string" + nullable: true + "services": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/SuccinctEntity"} + "environments": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/SuccinctEntity"} + "functionalities": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/SuccinctEntity"} + "channel_name": + type: "string" + nullable: true + "channel_reference": + type: "string" + nullable: true + "channel_id": + type: "string" + nullable: true + "channel_status": + type: "string" + description: "inoperative: 0, operational: 1, archived: 2" + nullable: true + "incident_tickets": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Ticketing_TicketEntity"} + "ticket": {"$ref": "#/components/schemas/NullableTicketing_TicketEntity"} + "impacts": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Incidents_ImpactEntity"} + "conference_bridges": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Incidents_ConferenceBridgeEntity"} + "incident_channels": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Incidents_ChannelEntity"} + "retro_exports": + type: "array" + description: "A list of objects attached to this item. Can be one of: LinkEntity, CustomerSupportIssueEntity, or GenericAttachmentEntity" + nullable: true + items: + type: "object" + "created_by": {"$ref": "#/components/schemas/NullableAuthorEntity"} + "context_object": {"$ref": "#/components/schemas/NullableIncidents_ContextObjectEntity"} + "team_assignments": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Incidents_TeamAssignmentEntityLite"} + "conversations": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Conversations_API_Entities_Reference"} + "custom_fields": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/CustomFields_FieldValue"} + "field_requirements": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/IncidentEntity_FieldRequirementEntity"} + description: "IncidentEntity model" + "SuccinctEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "SeverityMatrix_ImpactEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "type": + type: "string" + nullable: true + "affects_id": + type: "string" + nullable: true + "position": + type: "integer" + format: "int32" + nullable: true + description: "SeverityMatrix_ImpactEntity model" + "SeverityMatrix_ConditionEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "position": + type: "integer" + description: "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" + format: "int32" + nullable: true + description: "SeverityMatrix_ConditionEntity model" + "Incidents_MilestoneEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "type": + type: "string" + description: "The milestone's type. This will be one of the currently configured milestones for the given incident." + nullable: true + "duration": + type: "string" + description: "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." + nullable: true + "occurred_at": + type: "string" + format: "date-time" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "Incidents_LifecyclePhaseEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "type": + type: "string" + nullable: true + "position": + type: "integer" + format: "int32" + nullable: true + "milestones": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Incidents_LifecycleMilestoneEntity"} + "Incidents_LifecycleMilestoneEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "slug": + type: "string" + nullable: true + "position": + type: "integer" + format: "int32" + nullable: true + "occurred_at": + type: "string" + format: "date-time" + nullable: true + "duration": + type: "string" + nullable: true + "updated_by": {"$ref": "#/components/schemas/NullableAuthorEntity"} + "updated_at": + type: "string" + format: "date-time" + nullable: true + "Incidents_LifecycleMeasurementEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "slug": + type: "string" + nullable: true + "starts_at_milestone": + type: "string" + nullable: true + "ends_at_milestone": + type: "string" + nullable: true + "value": + type: "string" + nullable: true + "calculated_at": + type: "string" + format: "date-time" + nullable: true + "Incidents_RoleAssignmentEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "status": + type: "string" + nullable: true + enum: + - "active" + - "inactive" + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "incident_role": {"$ref": "#/components/schemas/NullableIncidentRoleEntity"} + "user": {"$ref": "#/components/schemas/NullableUserEntity"} + description: "Incidents_RoleAssignmentEntity model" + "IncidentRoleEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "summary": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "discarded_at": + type: "string" + format: "date-time" + nullable: true + description: "IncidentRoleEntity model" + "UserEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "email": + type: "string" + nullable: true + "slack_user_id": + type: "string" + nullable: true + "slack_linked?": + type: "boolean" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "signals_enabled_notification_types": + type: "array" + nullable: true + items: + type: "string" + description: "UserEntity model" + "Incidents_StatusPageEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "url": + type: "string" + nullable: true + "external_id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "display_name": + type: "string" + nullable: true + "integration": {"$ref": "#/components/schemas/NullableIntegrationEntity"} + description: "Incidents_StatusPageEntity model" + "IntegrationEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "integration_name": + type: "string" + nullable: true + "integration_slug": + type: "string" + nullable: true + "display_name": + type: "string" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "Event_NoteEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "body": + type: "string" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "status_pages": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Incidents_StatusPageEntity"} + "conversations": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Conversations_API_Entities_Reference"} + description: "Event_NoteEntity model" + "Conversations_API_Entities_Reference": + type: "object" + properties: + "id": + type: "string" + nullable: true + "resource_class": + type: "string" + nullable: true + "resource_id": + type: "string" + nullable: true + "field": + type: "string" + nullable: true + "comments_url": + type: "string" + nullable: true + "channel": {"$ref": "#/components/schemas/NullableConversations_API_Entities_Channel"} + "Conversations_API_Entities_Channel": + type: "object" + properties: + "name": + type: "string" + nullable: true + "Ticketing_TicketEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "summary": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "state": + type: "string" + nullable: true + enum: + - "open" + - "in_progress" + - "cancelled" + - "done" + "type": + type: "string" + nullable: true + enum: + - "incident" + - "task" + - "follow_up" + "assignees": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/AuthorEntity"} + "priority": {"$ref": "#/components/schemas/NullableTicketing_PriorityEntity"} + "created_by": {"$ref": "#/components/schemas/NullableAuthorEntity"} + "attachments": + type: "array" + description: "A list of objects attached to this item. Can be one of: LinkEntity, CustomerSupportIssueEntity, or GenericAttachmentEntity" + nullable: true + items: + type: "object" + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "tag_list": + type: "array" + nullable: true + items: + type: "string" + "incident_id": + type: "string" + description: "ID of incident that this ticket is related to" + nullable: true + "incident_name": + type: "string" + description: "Name of incident that this ticket is related to" + nullable: true + "incident_current_milestone": + type: "string" + description: "Milestone of incident that this ticket is related to" + nullable: true + "task_id": + type: "string" + description: "ID of task that this ticket is related to" + nullable: true + "due_at": + type: "string" + format: "date-time" + nullable: true + "sync_error_message": + type: "string" + description: "Error message from syncing this ticket to integrations" + nullable: true + "link": {"$ref": "#/components/schemas/NullableAttachments_LinkEntity"} + description: "Ticketing_TicketEntity model" + "Ticketing_PriorityEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "position": + type: "integer" + format: "int32" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + description: "Ticketing_PriorityEntity model" + "Attachments_LinkEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "type": + type: "string" + nullable: true + "display_text": + type: "string" + nullable: true + "href_url": + type: "string" + nullable: true + "icon_url": + type: "string" + nullable: true + "editable": + type: "boolean" + description: "Link can be edited" + nullable: true + "deletable": + type: "boolean" + description: "Link can be deleted" + nullable: true + description: "Attachments_LinkEntity model" + "Incidents_ImpactEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "type": + type: "string" + nullable: true + enum: + - "customer" + - "environment" + - "functionality" + - "service" + "impact": {"$ref": "#/components/schemas/NullableSuccinctEntity"} + "condition": {"$ref": "#/components/schemas/NullableSeverityMatrix_ConditionEntity"} + "conversations": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Conversations_API_Entities_Reference"} + "Incidents_ConferenceBridgeEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "attachments": + type: "array" + description: "A list of objects attached to this item. Can be one of: LinkEntity, CustomerSupportIssueEntity, or GenericAttachmentEntity" + nullable: true + items: + type: "object" + "has_translated_transcripts": + type: "boolean" + nullable: true + "language_codes": + type: "array" + description: "A list of language codes that have translated transcripts for this conference bridge" + nullable: true + items: + type: "string" + "transcription_status": + type: "string" + nullable: true + "transcription_sub_code": + type: "string" + nullable: true + description: "Incidents_ConferenceBridgeEntity model" + "Incidents_ChannelEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "source": + type: "string" + nullable: true + "source_name": + type: "string" + nullable: true + "source_id": + type: "string" + nullable: true + "url": + type: "string" + nullable: true + "icon_url": + type: "string" + nullable: true + "status": + type: "string" + nullable: true + description: "Incidents_ChannelEntity model" + "Incidents_ContextObjectEntity": + type: "object" + properties: + "object_type": + type: "string" + nullable: true + "object_id": + type: "string" + nullable: true + "context_tag": + type: "string" + nullable: true + "context_description": + type: "string" + nullable: true + "Incidents_TeamAssignmentEntityLite": + type: "object" + properties: + "id": + type: "string" + nullable: true + "status": + type: "string" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "team": {"$ref": "#/components/schemas/NullableTeamEntityLite"} + "CustomFields_FieldValue": + type: "object" + properties: + "name": + type: "string" + nullable: true + "value_type": + type: "string" + nullable: true + "display_name": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "slug": + type: "string" + nullable: true + "field_id": + type: "string" + nullable: true + "value_array": + type: "array" + nullable: true + items: + type: "string" + "value_string": + type: "string" + nullable: true + "value": + type: "string" + nullable: true + "IncidentEntity_FieldRequirementEntity": + type: "object" + properties: + "field_id": + type: "string" + description: "A unique identifier for the field." + nullable: true + "required_at_milestone_id": + type: "string" + description: "The milestone at which this field is required. If null, this field is always required." + nullable: true + "MembershipEntity": + type: "object" + properties: + "user": {"$ref": "#/components/schemas/NullableUserEntity"} + "schedule": {"$ref": "#/components/schemas/NullableScheduleEntity"} + "signals_on_call_schedule": {"$ref": "#/components/schemas/NullableSuccinctEntity"} + "default_incident_role": {"$ref": "#/components/schemas/NullableIncidentRoleEntity"} + "ScheduleEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "integration": + type: "string" + nullable: true + "discarded": + type: "boolean" + nullable: true + "FunctionalityEntityLite": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "slug": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "labels": + type: "object" + description: "An object of label key and values" + nullable: true + "active_incidents": + type: "array" + description: "List of active incident guids" + nullable: true + items: + type: "string" + "links": + type: "array" + description: "List of links attached to this functionality." + nullable: true + items: {"$ref": "#/components/schemas/LinksEntity"} + "owner": {"$ref": "#/components/schemas/NullableTeamEntityLite"} + "alert_on_add": + type: "boolean" + nullable: true + "auto_add_responding_team": + type: "boolean" + nullable: true + "updated_by": {"$ref": "#/components/schemas/NullableAuthorEntity"} + "SlimRunbookEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "summary": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "type": + type: "string" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "attachment_rule": {"$ref": "#/components/schemas/NullableRules_RuleEntity"} + "owner": {"$ref": "#/components/schemas/NullableTeamEntityLite"} + "categories": + type: "array" + description: "categories the runbook applies to" + nullable: true + items: + type: "string" + "Rules_RuleEntity": + type: "object" + properties: + "logic": + type: "object" + description: "An unstructured object of key/value pairs describing the logic for applying the rule." + nullable: true + "user_data": {"$ref": "#/components/schemas/NullableFHTypes_GenericEntity"} + "FHTypes_GenericEntity": + type: "object" + properties: + "type": + type: "string" + nullable: true + "value": + type: "string" + nullable: true + "label": + type: "string" + nullable: true + "TeamEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/TeamEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "TeamEntityPaginated model" + "update_team": + type: "object" + properties: + "name": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "slug": + type: "string" + nullable: true + "slack_channel_id": + type: "string" + description: "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).\n" + nullable: true + "ms_teams_channel": + required: + - "channel_id" + - "ms_team_id" + type: "object" + properties: + "channel_id": + type: "string" + "ms_team_id": + type: "string" + description: "MS Teams channel identity for channel associated with this team" + nullable: true + "memberships": + type: "array" + nullable: true + items: + type: "object" + properties: + "user_id": + type: "string" + nullable: true + "schedule_id": + type: "string" + nullable: true + "incident_role_id": + type: "string" + description: "An incident role ID that this user will automatically assigned if this team is assigned to an incident" + nullable: true + "invite_emails": + type: "array" + description: "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." + nullable: true + items: + type: "string" + description: "Update a single team from its ID" + "create_team_call_route": + required: + - "name" + - "phone_number" + - "routing_mode" + type: "object" + properties: + "name": + type: "string" + description: "Name of the call route" + "phone_number": + type: "string" + description: "Phone number to route calls to" + "routing_mode": + type: "string" + description: "Routing mode for the call route" + enum: + - "ROUTING_MODE_TAKE_MESSAGE" + - "ROUTING_MODE_DIRECT_CONNECT" + "connect_mode": + type: "string" + description: "Connect mode for the call route" + nullable: true + enum: + - "CONNECT_MODE_CONFERENCE" + - "CONNECT_MODE_DIRECT_DIAL" + "description": + type: "string" + description: "Description of the call route" + nullable: true + "greeting_message": + type: "string" + description: "Greeting message for the call route" + nullable: true + "steps": + type: "array" + description: "Steps for the call route" + nullable: true + items: + required: + - "target_id" + - "target_type" + - "timeout" + type: "object" + properties: + "target_type": + type: "string" + description: "Type of target" + enum: + - "User" + - "OnCallSchedule" + "target_id": + type: "string" + description: "ID of the target" + "timeout": + type: "string" + description: "Timeout in seconds for the step" + "target": + required: + - "id" + - "type" + type: "object" + properties: + "type": + type: "string" + description: "Type of target" + "id": + type: "string" + description: "ID of the target" + description: "Target for the call route (required unless connect_mode is direct_dial)" + nullable: true + description: "Create a call route for a team" + "Signals_API_CallRouteEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "phone_number": + type: "string" + nullable: true + "greeting_message": + type: "string" + nullable: true + "routing_mode": + type: "string" + nullable: true + enum: + - "ROUTING_MODE_TAKE_MESSAGE" + - "ROUTING_MODE_DIRECT_CONNECT" + "connect_mode": + type: "string" + nullable: true + enum: + - "CONNECT_MODE_CONFERENCE" + - "CONNECT_MODE_DIRECT_DIAL" + "steps": {"$ref": "#/components/schemas/NullableSignals_API_CallRouteStepEntity"} + "target": {"$ref": "#/components/schemas/NullableSignals_API_TargetEntity"} + description: "Signals_API_CallRouteEntity model" + "Signals_API_CallRouteStepEntity": + type: "object" + properties: + "target": {"$ref": "#/components/schemas/NullableSignals_API_TargetEntity"} + "position": + type: "integer" + format: "int32" + nullable: true + "timeout": + type: "string" + nullable: true + "Signals_API_TargetEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "type": + type: "string" + nullable: true + "is_pageable": + type: "boolean" + nullable: true + "Signals_API_CallRouteEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Signals_API_CallRouteEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "Signals_API_CallRouteEntityPaginated model" + "create_team_escalation_policy": + required: + - "name" + - "steps" + type: "object" + properties: + "name": + type: "string" + description: "The escalation policy's name." + "description": + type: "string" + description: "A detailed description of the escalation policy." + nullable: true + "repetitions": + type: "integer" + description: "The number of times that the escalation policy should repeat before an alert is dropped." + format: "int32" + nullable: true + default: 0 + "default": + type: "boolean" + description: "Whether this escalation policy should be the default for the team." + nullable: true + default: false + "step_strategy": + type: "string" + description: "The strategy for handling steps in the escalation policy. Can be \"static\" or \"dynamic_by_priority\"." + nullable: true + "steps": + type: "array" + description: "A list of steps that define how an alert should escalate through the policy." + items: + required: + - "targets" + - "timeout" + type: "object" + properties: + "targets": + type: "array" + description: "A list of targets that the step will notify. You can specify up to 15 targets per step." + items: + required: + - "id" + - "type" + type: "object" + properties: + "type": + type: "string" + description: "The type of target that the step will notify." + enum: + - "OnCallSchedule" + - "User" + - "SlackChannel" + - "MicrosoftTeamsChannel" + - "EntireTeam" + - "Webhook" + "id": + type: "string" + description: "The ID of the target that the step will notify." + "timeout": + type: "string" + description: "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." + "distribution_type": + type: "string" + description: "The round robin configuration for the step. One of 'unspecified', 'round_robin_by_alert', or 'round_robin_by_escalation_policy'." + nullable: true + enum: + - "unspecified" + - "round_robin_by_alert" + - "round_robin_by_escalation_policy" + "priorities": + type: "array" + description: "A list of priorities (HIGH, MEDIUM, LOW) to which the step applies when using a dynamic escalation policy." + nullable: true + items: + type: "string" + "handoff_step": + required: + - "target_id" + - "target_type" + type: "object" + properties: + "target_type": + type: "string" + description: "The type of target to which the policy will hand off." + enum: + - "EscalationPolicy" + - "Team" + "target_id": + type: "string" + description: "The ID of the target to which the policy will hand off." + description: "A step that defines where an alert should be sent when the policy is exhausted and the alert is still unacknowledged." + nullable: true + "prioritized_settings": + type: "object" + properties: + "high": + type: "object" + properties: + "repetitions": + type: "integer" + description: "Number of repetitions for HIGH priority alerts" + format: "int32" + nullable: true + "handoff_step": + required: + - "target_id" + - "target_type" + type: "object" + properties: + "target_type": + type: "string" + enum: + - "EscalationPolicy" + - "Team" + "target_id": + type: "string" + description: "Handoff step for HIGH priority alerts" + nullable: true + description: "Settings for HIGH priority alerts" + nullable: true + "medium": + type: "object" + properties: + "repetitions": + type: "integer" + description: "Number of repetitions for MEDIUM priority alerts" + format: "int32" + nullable: true + "handoff_step": + required: + - "target_id" + - "target_type" + type: "object" + properties: + "target_type": + type: "string" + enum: + - "EscalationPolicy" + - "Team" + "target_id": + type: "string" + description: "Handoff step for MEDIUM priority alerts" + nullable: true + description: "Settings for MEDIUM priority alerts" + nullable: true + "low": + type: "object" + properties: + "repetitions": + type: "integer" + description: "Number of repetitions for LOW priority alerts" + format: "int32" + nullable: true + "handoff_step": + required: + - "target_id" + - "target_type" + type: "object" + properties: + "target_type": + type: "string" + enum: + - "EscalationPolicy" + - "Team" + "target_id": + type: "string" + description: "Handoff step for LOW priority alerts" + nullable: true + description: "Settings for LOW priority alerts" + nullable: true + description: "Priority-specific settings for dynamic escalation policies" + nullable: true + description: "Create a Signals escalation policy for a team." + "Signals_API_EscalationPolicyEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "default": + type: "boolean" + nullable: true + "repetitions": + type: "integer" + format: "int32" + nullable: true + "steps": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Signals_API_EscalationPolicyStepEntity"} + "handoff_step": {"$ref": "#/components/schemas/NullableSignals_API_EscalationPolicyHandoffStepEntity"} + "created_by": {"$ref": "#/components/schemas/NullableAuthorEntity"} + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "step_strategy": + type: "string" + nullable: true + "notification_priority_policies": + type: "array" + description: "Priority-specific policies for dynamic escalation policies" + nullable: true + items: {"$ref": "#/components/schemas/Signals_API_NotificationPriorityPolicyEntity"} + description: "Signals_API_EscalationPolicyEntity model" + "Signals_API_EscalationPolicyStepEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "position": + type: "integer" + format: "int32" + nullable: true + "parent_position": + type: "integer" + format: "int32" + nullable: true + "targets": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Signals_API_TargetEntity"} + "timeout": + type: "string" + nullable: true + "distribution_type": + type: "string" + description: "The distribution type for the step" + nullable: true + enum: + - "unspecified" + - "round_robin_by_alert" + - "round_robin_by_escalation_policy" + "next_target_for_round_robin": {"$ref": "#/components/schemas/NullableSignals_API_TargetEntity"} + "priorities": + type: "array" + description: "The notification priorities that this step is assigned to. Valid values are HIGH, MEDIUM, and LOW." + nullable: true + items: + type: "string" + "Signals_API_EscalationPolicyHandoffStepEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "target": {"$ref": "#/components/schemas/NullableSignals_API_TargetEntity"} + "Signals_API_NotificationPriorityPolicyEntity": + type: "object" + properties: + "notification_priority": + type: "string" + description: "The notification priority this policy handles (HIGH, MEDIUM, or LOW)" + nullable: true + "repetitions": + type: "integer" + description: "Number of repetitions for this priority" + format: "int32" + nullable: true + "handoff_step": {"$ref": "#/components/schemas/NullableSignals_API_EscalationPolicyHandoffStepEntity"} + "steps": + type: "array" + description: "Steps for this priority" + nullable: true + items: {"$ref": "#/components/schemas/Signals_API_EscalationPolicyStepEntity"} + "Signals_API_EscalationPolicyEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Signals_API_EscalationPolicyEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "Signals_API_EscalationPolicyEntityPaginated model" + "update_team_escalation_policy": + type: "object" + properties: + "name": + type: "string" + description: "The escalation policy's name." + nullable: true + "description": + type: "string" + description: "A detailed description of the escalation policy." + nullable: true + "repetitions": + type: "integer" + description: "The number of times that the escalation policy should repeat before an alert is dropped." + format: "int32" + nullable: true + default: 0 + "default": + type: "boolean" + description: "Whether this escalation policy should be the default for the team." + nullable: true + default: false + "step_strategy": + type: "string" + description: "The strategy for handling steps in the escalation policy. Can be \"static\" or \"dynamic_by_priority\"." + nullable: true + "steps": + type: "array" + description: "A list of steps that define how an alert should escalate through the policy." + nullable: true + items: + required: + - "timeout" + type: "object" + properties: + "targets": + type: "array" + description: "A list of targets that the step will notify. You can specify up to 15 targets per step." + nullable: true + items: + required: + - "id" + - "type" + type: "object" + properties: + "type": + type: "string" + description: "The type of target that the step will notify." + enum: + - "OnCallSchedule" + - "User" + - "SlackChannel" + - "MicrosoftTeamsChannel" + - "EntireTeam" + - "Webhook" + "id": + type: "string" + description: "The ID of the target that the step will notify." + "timeout": + type: "string" + description: "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." + "distribution_type": + type: "string" + description: "The round robin configuration for the step. One of 'unspecified', 'round_robin_by_alert', or 'round_robin_by_escalation_policy'." + nullable: true + enum: + - "unspecified" + - "round_robin_by_alert" + - "round_robin_by_escalation_policy" + "priorities": + type: "array" + description: "A list of priorities (HIGH, MEDIUM, LOW) to which the step applies when using a dynamic escalation policy." + nullable: true + items: + type: "string" + "handoff_step": + required: + - "target_id" + - "target_type" + type: "object" + properties: + "target_type": + type: "string" + description: "The type of target to which the policy will hand off." + enum: + - "EscalationPolicy" + - "Team" + "target_id": + type: "string" + description: "The ID of the target to which the policy will hand off." + description: "A step that defines where an alert should be sent when the policy is exhausted and the alert is still unacknowledged." + nullable: true + "prioritized_settings": + type: "object" + properties: + "high": + type: "object" + properties: + "repetitions": + type: "integer" + description: "Number of repetitions for HIGH priority alerts" + format: "int32" + nullable: true + "handoff_step": + required: + - "target_id" + - "target_type" + type: "object" + properties: + "target_type": + type: "string" + enum: + - "EscalationPolicy" + - "Team" + "target_id": + type: "string" + description: "Handoff step for HIGH priority alerts" + nullable: true + description: "Settings for HIGH priority alerts" + nullable: true + "medium": + type: "object" + properties: + "repetitions": + type: "integer" + description: "Number of repetitions for MEDIUM priority alerts" + format: "int32" + nullable: true + "handoff_step": + required: + - "target_id" + - "target_type" + type: "object" + properties: + "target_type": + type: "string" + enum: + - "EscalationPolicy" + - "Team" + "target_id": + type: "string" + description: "Handoff step for MEDIUM priority alerts" + nullable: true + description: "Settings for MEDIUM priority alerts" + nullable: true + "low": + type: "object" + properties: + "repetitions": + type: "integer" + description: "Number of repetitions for LOW priority alerts" + format: "int32" + nullable: true + "handoff_step": + required: + - "target_id" + - "target_type" + type: "object" + properties: + "target_type": + type: "string" + enum: + - "EscalationPolicy" + - "Team" + "target_id": + type: "string" + description: "Handoff step for LOW priority alerts" + nullable: true + description: "Settings for LOW priority alerts" + nullable: true + description: "Priority-specific settings for dynamic escalation policies" + nullable: true + description: "Update a Signals escalation policy by ID" + "create_team_on_call_schedule": + required: + - "name" + type: "object" + properties: + "name": + type: "string" + description: "The on-call schedule's name." + "description": + type: "string" + description: "A detailed description of the on-call schedule." + nullable: true + "rotation_name": + type: "string" + description: "An optional name for the initial rotation. If not provided, the schedule's name will be used." + nullable: true + "rotation_description": + type: "string" + description: "An optional description for the initial rotation. If not provided, the schedule's description will be used." + nullable: true + "color": + type: "string" + description: "A hex color code that will be used to represent the initial rotation in FireHydrant's UI." + nullable: true + "time_zone": + type: "string" + description: "The time zone in which the on-call schedule's rotation will operate. This value must be a valid IANA time zone name and must be provided if `rotations` is not." + nullable: true + "slack_user_group_id": + type: "string" + description: "The ID of a Slack user group to sync the initial rotation's on-call members to." + nullable: true + "members": + type: "array" + description: "An ordered list of objects that specify members of the initial rotation." + nullable: true + items: + type: "object" + properties: + "user_id": + type: "string" + description: "The ID of a user who should be added to the schedule's initial rotation. You can add a user to the\nschedule multiple times to construct more complex rotations, and you can specify a `null` user ID\nto create unassigned slots in the rotation.\n" + nullable: true + "strategy": + required: + - "type" + type: "object" + properties: + "type": + type: "string" + description: "The type of strategy. Must be one of \"daily\", \"weekly\", or \"custom\"." + enum: + - "daily" + - "weekly" + - "custom" + "handoff_time": + type: "string" + description: "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\"." + nullable: true + "handoff_day": + type: "string" + description: "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\"." + nullable: true + enum: + - "monday" + - "tuesday" + - "wednesday" + - "thursday" + - "friday" + - "saturday" + - "sunday" + "shift_duration": + type: "string" + description: "An ISO8601 duration string specifying how long each shift should last. This value is only used if the strategy type is \"custom\"." + nullable: true + description: "An object that specifies how the initial rotation's on-call shifts should be generated. This value must be provided if `rotations` is not." + nullable: true + "restrictions": + type: "array" + description: "A list of objects that restrict the initial rotation to specific on-call periods." + nullable: true + items: + required: + - "end_day" + - "end_time" + - "start_day" + - "start_time" + type: "object" + properties: + "start_day": + type: "string" + description: "The day of the week on which the restriction should start, as its long-form name (e.g. \"monday\", \"tuesday\", etc)." + enum: + - "monday" + - "tuesday" + - "wednesday" + - "thursday" + - "friday" + - "saturday" + - "sunday" + "start_time": + type: "string" + description: "An ISO8601 time string specifying when the restriction should start." + "end_day": + type: "string" + description: "The day of the week on which the restriction should end, as its long-form name (e.g. \"monday\", \"tuesday\", etc)." + enum: + - "monday" + - "tuesday" + - "wednesday" + - "thursday" + - "friday" + - "saturday" + - "sunday" + "end_time": + type: "string" + description: "An ISO8601 time string specifying when the restriction should end." + "start_time": + type: "string" + description: "An ISO8601 time string specifying when the initial rotation should start. This value is only used if the rotation's strategy type is \"custom\"." + nullable: true + "member_ids": + type: "array" + description: "This parameter is deprecated; use `members` instead." + nullable: true + items: + type: "string" + description: "Create a Signals on-call schedule for a team with a single rotation. More rotations can be created later." + "Signals_API_OnCallScheduleEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "rotations": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Signals_API_OnCallRotationEntity"} + "team": {"$ref": "#/components/schemas/NullableSuccinctEntity"} + "created_by": {"$ref": "#/components/schemas/NullableAuthorEntity"} + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "signals_ical_url": + type: "string" + nullable: true + "time_zone": + type: "string" + nullable: true + "color": + type: "string" + nullable: true + "slack_user_group_id": + type: "string" + nullable: true + "members": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/SuccinctEntity"} + "shifts": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Signals_API_OnCallShiftEntity"} + "strategy": {"$ref": "#/components/schemas/NullableSignals_API_OnCallStrategyEntity"} + "restrictions": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Signals_API_OnCallRestrictionEntity"} + description: "Signals_API_OnCallScheduleEntity model" + "Signals_API_OnCallRotationEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "time_zone": + type: "string" + nullable: true + "color": + type: "string" + nullable: true + "slack_user_group_id": + type: "string" + nullable: true + "members": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/SuccinctEntity"} + "shifts": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Signals_API_OnCallShiftEntity"} + "team": {"$ref": "#/components/schemas/NullableSuccinctEntity"} + "strategy": {"$ref": "#/components/schemas/NullableSignals_API_OnCallStrategyEntity"} + "restrictions": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Signals_API_OnCallRestrictionEntity"} + "created_by": {"$ref": "#/components/schemas/NullableAuthorEntity"} + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "Signals_API_OnCallShiftEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "user": {"$ref": "#/components/schemas/NullableSuccinctEntity"} + "coverage_request": + type: "string" + nullable: true + "color": + type: "string" + nullable: true + "time_zone": + type: "string" + nullable: true + "on_call_schedule": {"$ref": "#/components/schemas/NullableSuccinctEntity"} + "on_call_rotation": {"$ref": "#/components/schemas/NullableSuccinctEntity"} + "team": {"$ref": "#/components/schemas/NullableSuccinctEntity"} + "start_time": + type: "string" + format: "date-time" + nullable: true + "end_time": + type: "string" + format: "date-time" + nullable: true + description: "Signals_API_OnCallShiftEntity model" + "Signals_API_OnCallStrategyEntity": + type: "object" + properties: + "type": + type: "string" + nullable: true + "handoff_time": + type: "string" + nullable: true + "handoff_day": + type: "string" + nullable: true + "shift_duration": + type: "string" + nullable: true + "Signals_API_OnCallRestrictionEntity": + type: "object" + properties: + "start_day": + type: "string" + nullable: true + "start_time": + type: "string" + nullable: true + "end_day": + type: "string" + nullable: true + "end_time": + type: "string" + nullable: true + "Signals_API_OnCallScheduleEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Signals_API_OnCallScheduleEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "Signals_API_OnCallScheduleEntityPaginated model" + "update_team_on_call_schedule": + type: "object" + properties: + "name": + type: "string" + description: "A new name for the on-call schedule." + nullable: true + "description": + type: "string" + description: "A new, detailed description for the on-call schedule." + nullable: true + "rotation_name": + type: "string" + description: "A new name for the schedule's rotation." + nullable: true + "rotation_description": + type: "string" + description: "A new, detailed description for the schedule's rotation." + nullable: true + "color": + type: "string" + description: "A hex color code that will be used to represent the schedule's rotation in FireHydrant's UI." + nullable: true + "time_zone": + type: "string" + description: "The time zone in which the on-call schedule's rotation will operate. This value must be a valid IANA time zone name." + nullable: true + "slack_user_group_id": + type: "string" + description: "The ID of a Slack user group to sync the rotation's on-call members to." + nullable: true + "members": + type: "array" + description: "An ordered list of objects that specify members of the schedule's rotation." + nullable: true + items: + type: "object" + properties: + "user_id": + type: "string" + description: "The ID of a user who should be added to the schedule's rotation. You can add a user to the rotation\nmultiple times to construct more complex rotations, and you can specify a `null` user ID to create\nunassigned slots in the rotation.\n" + nullable: true + "strategy": + required: + - "type" + type: "object" + properties: + "type": + type: "string" + description: "The type of strategy. Must be one of \"daily\", \"weekly\", or \"custom\"." + enum: + - "daily" + - "weekly" + - "custom" + "handoff_time": + type: "string" + description: "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\"." + nullable: true + "handoff_day": + type: "string" + description: "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\"." + nullable: true + enum: + - "monday" + - "tuesday" + - "wednesday" + - "thursday" + - "friday" + - "saturday" + - "sunday" + "shift_duration": + type: "string" + description: "An ISO8601 duration string specifying how long each shift should last. This value is only used if the strategy type is \"custom\"." + nullable: true + description: "An object that specifies how the rotation's on-call shifts should be generated." + nullable: true + "restrictions": + type: "array" + description: "A list of objects that restrict the schedule's rotation to specific on-call periods." + nullable: true + items: + required: + - "end_day" + - "end_time" + - "start_day" + - "start_time" + type: "object" + properties: + "start_day": + type: "string" + description: "The day of the week on which the restriction should start, as its long-form name (e.g. \"monday\", \"tuesday\", etc)." + enum: + - "monday" + - "tuesday" + - "wednesday" + - "thursday" + - "friday" + - "saturday" + - "sunday" + "start_time": + type: "string" + description: "An ISO8601 time string specifying when the restriction should start." + "end_day": + type: "string" + description: "The day of the week on which the restriction should end, as its long-form name (e.g. \"monday\", \"tuesday\", etc)." + enum: + - "monday" + - "tuesday" + - "wednesday" + - "thursday" + - "friday" + - "saturday" + - "sunday" + "end_time": + type: "string" + description: "An ISO8601 time string specifying when the restriction should end." + "effective_at": + type: "string" + description: "An ISO8601 time string specifying when the updated schedule should take effect. This\nvalue must be provided if editing an attribute that would affect how the schedule's\nshifts are generated, such as the time zone, members, strategy, or restrictions.\n" + nullable: true + "member_ids": + type: "array" + description: "This parameter is deprecated; use `members` instead." + nullable: true + items: + type: "string" + description: "Update a Signals on-call schedule by ID. For backwards compatibility, all parameters except for\n`name` and `description` will be ignored if the schedule has more than one rotation. If the schedule\nhas only one rotation, you can continue to update that rotation using the rotation-specific parameters.\n" + "create_on_call_shift": + required: + - "end_time" + - "start_time" + type: "object" + properties: + "start_time": + type: "string" + description: "The start time of the shift in ISO8601 format." + "end_time": + type: "string" + description: "The end time of the shift in ISO8601 format." + "user_id": + type: "string" + description: "The ID of the user who is on-call for the shift. If not provided, the shift will be unassigned." + nullable: true + "rotation_id": + type: "string" + description: "The ID of the on-call rotation you want to create the shift in. This parameter is optional for backwards compatibility but must be provided if the schedule has multiple rotations." + nullable: true + description: "Create a Signals on-call shift in a schedule." + "update_on_call_shift": + type: "object" + properties: + "start_time": + type: "string" + description: "The start time of the shift in ISO8601 format." + nullable: true + "end_time": + type: "string" + description: "The end time of the shift in ISO8601 format." + nullable: true + "user_id": + type: "string" + description: "The ID of the user who is on-call for the shift. If not provided, the shift will be unassigned." + nullable: true + "coverage_request": + type: "string" + description: "A description of why coverage is needed for this shift. If the shift is re-assigned, this will automatically be cleared unless provided again." + nullable: true + description: "Update a Signals on-call shift by ID" + "create_team_signal_rule": + required: + - "expression" + - "name" + - "target_id" + - "target_type" + type: "object" + properties: + "name": + type: "string" + description: "The rule's name." + "expression": + type: "string" + description: "The CEL expression that defines the rule." + "target_type": + type: "string" + description: "The type of target that the rule will notify when matched." + enum: + - "EscalationPolicy" + - "OnCallSchedule" + - "User" + - "Webhook" + - "SlackChannel" + - "MicrosoftTeamsChannel" + "target_id": + type: "string" + description: "The ID of the target that the rule will notify when matched." + "incident_type_id": + type: "string" + description: "The ID of an incident type that should be used when an alert is promoted to an incident" + nullable: true + "notification_priority_override": + type: "string" + description: "A notification priority that will be set on the resulting alert (default: HIGH)" + nullable: true + enum: + - "HIGH" + - "MEDIUM" + - "LOW" + - "" + "create_incident_condition_when": + type: "string" + description: "Determines when an incident should be created when this rule is matched" + nullable: true + enum: + - "WHEN_UNSPECIFIED" + - "WHEN_ALWAYS" + "deduplication_expiry": + type: "string" + description: "The amount of time alerts created from this rule will be deduplicated" + nullable: true + description: "Create a Signals rule for a team." + "Signals_API_RuleEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "expression": + type: "string" + nullable: true + "team_id": + type: "string" + nullable: true + "target": {"$ref": "#/components/schemas/NullableSignals_API_TargetEntity"} + "created_by": {"$ref": "#/components/schemas/NullableAuthorEntity"} + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "incident_type": {"$ref": "#/components/schemas/NullableSuccinctEntity"} + "notification_priority_override": + type: "string" + nullable: true + enum: + - "HIGH" + - "MEDIUM" + - "LOW" + "create_incident_condition_when": + type: "string" + nullable: true + enum: + - "WHEN_UNSPECIFIED" + - "WHEN_ALWAYS" + "deduplication_expiry": + type: "string" + description: "Duration for deduplicating similar alerts (ISO8601 duration format e.g., 'PT30M', 'PT2H', 'P1D')" + nullable: true + example: "PT1H" + description: "Signals_API_RuleEntity model" + "Signals_API_RuleEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Signals_API_RuleEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "Signals_API_RuleEntityPaginated model" + "update_team_signal_rule": + type: "object" + properties: + "name": + type: "string" + description: "The rule's name." + nullable: true + "expression": + type: "string" + description: "The CEL expression that defines the rule." + nullable: true + "target_type": + type: "string" + description: "The type of target that the rule will notify when matched." + nullable: true + enum: + - "EscalationPolicy" + - "OnCallSchedule" + - "User" + - "Webhook" + - "SlackChannel" + - "MicrosoftTeamsChannel" + "target_id": + type: "string" + description: "The ID of the target that the rule will notify when matched." + nullable: true + "incident_type_id": + type: "string" + description: "The ID of an incident type that should be used when an alert is promoted to an incident" + nullable: true + "notification_priority_override": + type: "string" + description: "A notification priority that will be set on the resulting alert (default: HIGH)" + nullable: true + enum: + - "HIGH" + - "MEDIUM" + - "LOW" + - "" + "create_incident_condition_when": + type: "string" + description: "Determines when an incident should be created when this rule is matched" + nullable: true + enum: + - "WHEN_UNSPECIFIED" + - "WHEN_ALWAYS" + "deduplication_expiry": + type: "string" + description: "The amount of time alerts created from this rule will be deduplicated" + nullable: true + description: "Update a Signals rule by ID" + "create_change": + type: "object" + properties: + "summary": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "labels": + type: "object" + additionalProperties: + type: "string" + description: "A labels hash of keys and values" + nullable: true + description: "Create a new change entry" + "ChangeEntity": + type: "object" + properties: + "id": + type: "string" + description: "UUID of the Change" + nullable: true + "summary": + type: "string" + description: "Description of the Change" + nullable: true + "created_at": + type: "string" + description: "The time the change entry was created" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "labels": + type: "object" + description: "Arbitrary key/value pairs of labels." + nullable: true + "description": + type: "string" + description: "Description of the Change" + nullable: true + description: "ChangeEntity model" + "update_change": + type: "object" + properties: + "summary": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "labels": + type: "object" + additionalProperties: + type: "string" + nullable: true + description: "Update a change entry" + "create_change_identity": + required: + - "type" + - "value" + type: "object" + properties: + "type": + type: "string" + "value": + type: "string" + description: "Create an identity for the change entry" + "ChangeIdentityEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "type": + type: "string" + nullable: true + "value": + type: "string" + nullable: true + "change_id": + type: "string" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + description: "ChangeIdentityEntity model" + "ChangeIdentityEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/ChangeIdentityEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "ChangeIdentityEntityPaginated model" + "update_change_identity": + required: + - "type" + - "value" + type: "object" + properties: + "type": + type: "string" + "value": + type: "string" + description: "Update an identity for the change entry" + "create_change_event": + required: + - "summary" + type: "object" + properties: + "summary": + type: "string" + "description": + type: "string" + nullable: true + "labels": + type: "object" + additionalProperties: + type: "string" + nullable: true + "starts_at": + type: "string" + format: "date-time" + nullable: true + "ends_at": + type: "string" + format: "date-time" + nullable: true + "environments": + type: "array" + description: "An array of environment IDs" + nullable: true + items: + type: "string" + "services": + type: "array" + description: "An array of service IDs" + nullable: true + items: + type: "string" + "changes": + type: "array" + description: "An array of change IDs" + nullable: true + items: + type: "string" + "external_id": + type: "string" + description: "The ID of a change event as assigned by an external provider" + nullable: true + "change_identities": + type: "array" + description: "If provided and valid, the event will be linked to all changes that have the same identities. Identity *values* must be unique." + nullable: true + items: + required: + - "type" + - "value" + type: "object" + properties: + "type": + type: "string" + "value": + type: "string" + "attachments": + type: "array" + description: "JSON objects representing attachments, see attachments documentation for the schema" + nullable: true + items: + required: + - "type" + type: "object" + properties: + "type": + type: "string" + enum: + - "link" + "authors": + type: "array" + description: "Array of additional authors to add to the change event, the creating actor will automatically be added as an author" + nullable: true + items: + required: + - "name" + - "source" + - "source_id" + type: "object" + properties: + "source": + type: "string" + "source_id": + type: "string" + "name": + type: "string" + description: "Create a change event" + "ChangeEventEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "summary": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "external_id": + type: "string" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "starts_at": + type: "string" + format: "date-time" + nullable: true + "ends_at": + type: "string" + format: "date-time" + nullable: true + "duration_ms": + type: "integer" + format: "int32" + nullable: true + "duration_iso8601": + type: "string" + nullable: true + "environments": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/EnvironmentEntryEntity"} + "related_changes": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/ChangeEntity"} + "identities": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/ChangeIdentityEntity"} + "authors": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/AuthorEntity"} + "attachments": + type: "array" + description: "A list of objects attached to this item. Can be one of: LinkEntity, CustomerSupportIssueEntity, or GenericAttachmentEntity" + nullable: true + items: + type: "object" + "labels": + type: "object" + description: "An object of label key and values" + nullable: true + "services": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/ServiceEntityLite"} + description: "ChangeEventEntity model" + "ChangeEventSlimEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/ChangeEventSlimEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "ChangeEventSlimEntityPaginated model" + "ChangeEventSlimEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "summary": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "external_id": + type: "string" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "starts_at": + type: "string" + format: "date-time" + nullable: true + "ends_at": + type: "string" + format: "date-time" + nullable: true + "duration_ms": + type: "integer" + format: "int32" + nullable: true + "duration_iso8601": + type: "string" + nullable: true + "environments": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/EnvironmentEntryEntity"} + "authors": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/AuthorEntity"} + "labels": + type: "object" + description: "An object of label key and values" + nullable: true + "services": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/ServiceEntityLite"} + "update_change_event": + type: "object" + properties: + "summary": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "labels": + type: "object" + additionalProperties: + type: "string" + nullable: true + "starts_at": + type: "string" + format: "date-time" + nullable: true + "ends_at": + type: "string" + format: "date-time" + nullable: true + "environments": + type: "array" + description: "An array of environment IDs (setting this will overwrite the current environments)" + nullable: true + items: + type: "string" + "services": + type: "array" + description: "An array of service IDs (setting this will overwrite the current services)" + nullable: true + items: + type: "string" + "attachments": + type: "array" + description: "JSON objects representing attachments, see attachments documentation for the schema" + nullable: true + items: + required: + - "type" + type: "object" + properties: + "type": + type: "string" + enum: + - "link" + description: "Update a change event" + "ChangeTypeEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/ChangeTypeEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "ChangeTypeEntityPaginated model" + "ChangeTypeEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "EntitlementEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/EntitlementEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "EntitlementEntityPaginated model" + "EntitlementEntity": + type: "object" + properties: + "current_count": + type: "integer" + format: "int32" + nullable: true + "errors": + type: "array" + nullable: true + items: + type: "string" + "exists": + type: "boolean" + nullable: true + "available": + type: "boolean" + nullable: true + "maximum": + type: "integer" + format: "int32" + nullable: true + "name": + type: "string" + nullable: true + "slug": + type: "string" + nullable: true + "tier": + type: "string" + nullable: true + enum: + - "free" + - "essentials" + - "enterprise" + - "signals_only" + "create_incident": + required: + - "name" + type: "object" + properties: + "name": + type: "string" + "summary": + type: "string" + nullable: true + "customer_impact_summary": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "priority": + type: "string" + nullable: true + "severity": + type: "string" + nullable: true + "severity_condition_id": + type: "string" + nullable: true + "severity_impact_id": + type: "string" + nullable: true + "alert_ids": + type: "array" + description: "List of alert IDs that this incident should be associated to" + nullable: true + items: + type: "string" + "labels": + type: "object" + description: "Key:value pairs to track custom data for the incident" + nullable: true + "runbook_ids": + type: "array" + description: "List of ids of Runbooks to attach to this incident. Foregoes any conditions these Runbooks may have guarding automatic attachment." + nullable: true + items: + type: "string" + "tag_list": + type: "array" + description: "List of tags for the incident" + nullable: true + items: + type: "string" + "impacts": + type: "array" + description: "An array of impacted infrastructure" + nullable: true + items: + required: + - "condition_id" + - "id" + - "type" + type: "object" + properties: + "type": + type: "string" + description: "The type of impacted infrastructure. One of: environment, functionality, or service" + "id": + type: "string" + description: "The ID of the impacted infrastructure" + "condition_id": + type: "string" + description: "The ID of the impact condition. Find these at /v1/severity_matrix/conditions" + "milestones": + type: "array" + description: "An array of milestones to set on an incident. This can be used to create an already-resolved incident." + nullable: true + items: + required: + - "occurred_at" + - "type" + type: "object" + properties: + "type": + type: "string" + description: "The type/slug of the milestone. Must be one of the currently configured milestones." + "occurred_at": + type: "string" + description: "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" + format: "date-time" + "restricted": + type: "boolean" + nullable: true + "team_ids": + type: "array" + description: "IDs of teams you wish to assign to this incident." + nullable: true + items: + type: "string" + "custom_fields": + type: "array" + description: "An array of custom fields to set on the incident." + nullable: true + items: + required: + - "field_id" + type: "object" + properties: + "field_id": + type: "string" + description: "The ID of the custom field you wish to set." + "value_string": + type: "string" + description: "The value you wish to set on the custom field if the type of the field accepts string values" + nullable: true + "value_array": + type: "array" + description: "The value you wish to set on the custom field if the type of the field accepts array values" + nullable: true + items: + type: "string" + "external_links": + type: "string" + nullable: true + "incident_type_id": + type: "string" + description: "The ID of the incident type. This will copy values from the incident type (if any) unless they are being overridden via parameters in this request." + nullable: true + "skip_incident_type_values": + type: "boolean" + description: "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." + nullable: true + default: false + description: "Create a new incident" + "IncidentEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/IncidentEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "IncidentEntityPaginated model" + "update_incident": + type: "object" + properties: + "name": + type: "string" + nullable: true + "summary": + type: "string" + nullable: true + "customer_impact_summary": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "labels": + type: "object" + description: "Key:value pairs to track custom data for the incident" + nullable: true + "priority": + type: "string" + nullable: true + "severity": + type: "string" + nullable: true + "severity_condition_id": + type: "string" + nullable: true + "severity_impact_id": + type: "string" + nullable: true + "tag_list": + type: "array" + description: "List of tags for the incident" + nullable: true + items: + type: "string" + "incident_type_id": + type: "string" + description: "The ID of the incident type. This will copy values from the incident type (if any) unless they are being overridden via parameters in this request." + nullable: true + description: "Updates an incident with provided parameters" + "Incidents_AlertEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Incidents_AlertEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "Incidents_AlertEntityPaginated model" + "Incidents_AlertEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "alert": {"$ref": "#/components/schemas/NullableAlerts_AlertEntity"} + "primary": + type: "boolean" + description: "whether or not this is the primary alert for this incident" + nullable: true + description: "Incidents_AlertEntity model" + "Alerts_AlertEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "summary": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "priority": + type: "string" + nullable: true + "integration_name": + type: "string" + nullable: true + "starts_at": + type: "string" + format: "date-time" + nullable: true + "ends_at": + type: "string" + format: "date-time" + nullable: true + "duration_ms": + type: "integer" + format: "int32" + nullable: true + "duration_iso8601": + type: "string" + nullable: true + "status": + type: "string" + nullable: true + "remote_id": + type: "string" + nullable: true + "remote_url": + type: "string" + nullable: true + "labels": + type: "object" + description: "Arbitrary key:value pairs of labels." + nullable: true + "environments": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/SuccinctEntity"} + "services": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/SuccinctEntity"} + "tags": + type: "array" + nullable: true + items: + type: "string" + "source_icon": + type: "string" + nullable: true + "signal_id": + type: "string" + nullable: true + "signal_rule": {"$ref": "#/components/schemas/NullableSignals_API_RuleEntity"} + "signal_target": {"$ref": "#/components/schemas/NullableSignals_API_TargetEntity"} + "team_name": + type: "string" + nullable: true + "team_id": + type: "string" + nullable: true + "position": + type: "integer" + format: "int32" + nullable: true + "incidents": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/PublicAPI_V1_Incidents_SuccinctEntity"} + "events": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Alerts_SirenEventEntity"} + "is_expired": + type: "boolean" + nullable: true + "parent_alerts": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Alerts_SirenAlertEntity"} + "child_alerts": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Alerts_SirenAlertEntity"} + "conversations": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Conversations_API_Entities_Reference"} + description: "Alerts_AlertEntity model" + "PublicAPI_V1_Incidents_SuccinctEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "number": + type: "integer" + format: "int32" + nullable: true + "Alerts_SirenEventEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "type": + type: "string" + nullable: true + "data": + type: "object" + description: "The event's payload" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "Alerts_SirenAlertEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "summary": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "starts_at": + type: "string" + format: "date-time" + nullable: true + "ends_at": + type: "string" + format: "date-time" + nullable: true + "status": + type: "string" + nullable: true + "remote_id": + type: "string" + nullable: true + "remote_url": + type: "string" + nullable: true + "labels": + type: "object" + description: "Arbitrary key:value pairs of labels." + nullable: true + "tags": + type: "array" + nullable: true + items: + type: "string" + "signal_id": + type: "string" + nullable: true + "signal_rule": {"$ref": "#/components/schemas/NullableSignals_API_RuleEntity"} + "update_incident_alert_primary": + required: + - "primary" + type: "object" + properties: + "primary": + type: "boolean" + description: "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." + "bulk_update_incident_milestones": + required: + - "milestones" + type: "object" + properties: + "bulk": + type: "string" + nullable: true + enum: + - "true" + "milestones": + type: "array" + items: + required: + - "occurred_at" + - "type" + type: "object" + properties: + "type": + type: "string" + description: "The type/slug of the milestone. Must be one of the currently configured milestones for the given incident." + "occurred_at": + type: "string" + description: "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" + format: "date-time" + "remove": + type: "boolean" + description: "If set to true, the milestone will be removed from the incident" + nullable: true + description: "Update milestone times in bulk for a given incident. All milestone\ntimes for an incident must occur in chronological order\ncorresponding to the configured order of milestones. If the result\nof this request would cause any milestone(s) to appear out of place,\na 422 response will instead be returned. This includes milestones\nnot explicitly submitted or updated in this request.\n" + "Incidents_MilestoneEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Incidents_MilestoneEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "Incidents_MilestoneEntityPaginated model" + "create_incident_change_event": + required: + - "change_event_id" + - "type" + type: "object" + properties: + "change_event_id": + type: "string" + description: "The ID of the change event to associate" + "type": + type: "string" + enum: + - "caused" + - "fixed" + - "suspect" + - "dismissed" + "why": + type: "string" + description: "A short description about why this change event is related" + nullable: true + description: "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." + "Incidents_RelatedChangeEventEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "why": + type: "string" + description: "The reason why this change event is related to this incident" + nullable: true + "type": + type: "string" + nullable: true + enum: + - "caused" + - "fixed" + - "suspect" + - "dismissed" + "change_event": {"$ref": "#/components/schemas/NullableChangeEventEntity"} + "incident_id": + type: "string" + nullable: true + "created_by": {"$ref": "#/components/schemas/NullableAuthorEntity"} + description: "Incidents_RelatedChangeEventEntity model" + "Incidents_RelatedChangeEventEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Incidents_RelatedChangeEventEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "Incidents_RelatedChangeEventEntityPaginated model" + "update_incident_change_event": + type: "object" + properties: + "type": + type: "string" + nullable: true + enum: + - "caused" + - "fixed" + - "suspect" + - "dismissed" + "why": + type: "string" + description: "A short description about why this change event is related" + nullable: true + description: "Update a change attached to an incident" + "create_incident_status_page": + required: + - "integration_id" + - "integration_slug" + type: "object" + properties: + "integration_slug": + type: "string" + "integration_id": + type: "string" + "title": + type: "string" + nullable: true + description: "Add a status page to an incident." + "Incidents_StatusPageEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Incidents_StatusPageEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "Incidents_StatusPageEntityPaginated model" + "create_incident_task_list": + required: + - "task_list_id" + type: "object" + properties: + "task_list_id": + type: "string" + description: "The id of the task list." + "assignee_id": + type: "string" + description: "The ID of the user assigned to the tasks in this list." + nullable: true + description: "Add all tasks from list to incident" + "TaskEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "title": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "state": + type: "string" + nullable: true + "assignee": {"$ref": "#/components/schemas/NullableAuthorEntity"} + "created_by": {"$ref": "#/components/schemas/NullableAuthorEntity"} + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "due_at": + type: "string" + format: "date-time" + nullable: true + description: "TaskEntity model" + "create_incident_task": + required: + - "title" + type: "object" + properties: + "title": + type: "string" + description: "The title of the task." + "state": + type: "string" + description: "The state of the task. One of: open, in_progress, cancelled, done" + nullable: true + "description": + type: "string" + description: "A description of what the task is for." + nullable: true + "assignee_id": + type: "string" + description: "The ID of the user assigned to the task." + nullable: true + "due_at": + type: "string" + description: "The due date of the task. Relative values are supported such as '5m'" + nullable: true + description: "Create a task" + "TaskEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/TaskEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "TaskEntityPaginated model" + "update_incident_task": + type: "object" + properties: + "title": + type: "string" + description: "The title of the task." + nullable: true + "description": + type: "string" + description: "A description of what the task is for." + nullable: true + "state": + type: "string" + description: "The state of the task. One of: open, in_progress, cancelled, done" + nullable: true + "assignee_id": + type: "string" + description: "The ID of the user assigned to the task." + nullable: true + "due_at": + type: "string" + description: "The due date of the task. Relative values are supported such as '5m'" + nullable: true + description: "Update a task's attributes" + "convert_incident_task": + type: "object" + properties: + "summary": + type: "string" + nullable: true + "project_id": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "state": + type: "string" + nullable: true + "tag_list": + type: "array" + description: "List of tags for the ticket" + nullable: true + items: + type: "string" + description: "Convert a task to a follow-up" + "Attachments_LinkEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Attachments_LinkEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "Attachments_LinkEntityPaginated model" + "create_incident_link": + required: + - "href" + type: "object" + properties: + "display_text": + type: "string" + nullable: true + "icon_url": + type: "string" + nullable: true + "href": + type: "string" + description: "Allows adding adhoc links to an incident as an attachment" + "update_incident_link": + type: "object" + properties: + "display_text": + type: "string" + nullable: true + "icon_url": + type: "string" + nullable: true + "href_url": + type: "string" + nullable: true + description: "Update the external incident link attributes" + "PublicAPI_V1_Incidents_TranscriptEntity": + type: "object" + properties: + "id": + type: "string" + description: "The unique identifier for the transcript entry" + nullable: true + "speaker": + type: "string" + description: "The speaker for the transcript entry" + nullable: true + "start": + type: "integer" + description: "The start time for the transcript entry" + format: "int32" + nullable: true + "until": + type: "integer" + description: "The end time for the transcript entry" + format: "int32" + nullable: true + "words": + type: "string" + description: "The words spoken for the transcript entry" + nullable: true + "created_at": + type: "string" + description: "The time the transcript entry was created" + format: "date-time" + nullable: true + "updated_at": + type: "string" + description: "The time the transcript entry was last updated" + format: "date-time" + nullable: true + "author": {"$ref": "#/components/schemas/NullableAuthorEntity"} + description: "PublicAPI_V1_Incidents_TranscriptEntity model" + "SimilarIncidentEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/PublicAPI_V1_SimilarIncidentEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "SimilarIncidentEntityPaginated model" + "PublicAPI_V1_SimilarIncidentEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "distance": + type: "number" + format: "float" + nullable: true + "Attachments_TypedAttachmentEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Attachments_TypedAttachmentEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "Attachments_TypedAttachmentEntityPaginated model" + "Attachments_TypedAttachmentEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "type": + type: "string" + nullable: true + "attached_to_id": + type: "string" + nullable: true + "attached_to_type": + type: "string" + nullable: true + "secondary_attached_to_id": + type: "string" + nullable: true + "secondary_attached_to_type": + type: "string" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "attributes": + type: "object" + description: "Can be one of: Attachments::LinkEntity, Integrations::CustomerSupportIssueEntity, Attachments::GenericAttachmentEntity" + nullable: true + "IncidentAttachmentEntity": + type: "object" + properties: + "file_name": + type: "string" + nullable: true + "file_content_type": + type: "string" + nullable: true + "signed_url": + type: "string" + nullable: true + "media_type": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "external_id": + type: "string" + nullable: true + "file_size": + type: "integer" + format: "int32" + nullable: true + "status": + type: "string" + nullable: true + enum: + - "pending_upload" + - "uploaded" + "versions": + type: "object" + description: "An object with keys that designate a specific version or size of the attachment" + nullable: true + description: "IncidentAttachmentEntity model" + "IncidentEventEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/IncidentEventEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "IncidentEventEntityPaginated model" + "IncidentEventEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "incident_id": + type: "string" + nullable: true + "type": + type: "string" + nullable: true + "context": + type: "string" + nullable: true + "data": + type: "object" + description: "Can be one of: NoteEntity, TourStepEntity, RootCauseEntity, ChangeTypeEntity, RoleUpdateEntity, TaskUpdateEntity, AlertLinkedEntity, ChatMessageEntity, AddTaskListEntity, ImpactUpdateEntity, TicketUpdateEntity, GeneralUpdateEntity, ChangelogEntryEntity, IncidentStatusEntity, TeamAssignmentEntity, BulkUpdateEntity" + nullable: true + "occurred_at": + type: "string" + format: "date-time" + nullable: true + "visibility": + type: "string" + nullable: true + enum: + - "private_to_org" + - "open_to_public" + - "internal_status_page" + "author": {"$ref": "#/components/schemas/NullableAuthorEntity"} + "votes": {"$ref": "#/components/schemas/NullableVotesEntity"} + "conversations": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Conversations_API_Entities_Reference"} + description: "IncidentEventEntity model" + "VotesEntity": + type: "object" + properties: + "voted": + type: "boolean" + description: "Whether or not the current actor has voted" + nullable: true + "liked": + type: "boolean" + description: "Whether or not the current actor has voted positively" + nullable: true + "disliked": + type: "boolean" + description: "Whether or not the current actor has voted negatively" + nullable: true + "likes": + type: "integer" + format: "int32" + nullable: true + "dislikes": + type: "integer" + format: "int32" + nullable: true + description: "VotesEntity model" + "update_vote": + required: + - "direction" + type: "object" + properties: + "direction": + type: "string" + description: "The direction you would like to vote, or if you dig it" + enum: + - "up" + - "down" + - "dig" + description: "Upvote or downvote an object" + "update_incident_impact_patch": + type: "object" + properties: + "note": + type: "string" + nullable: true + "milestone": + type: "string" + nullable: true + "impact": + type: "array" + nullable: true + items: + required: + - "condition_id" + - "id" + type: "object" + properties: + "id": + type: "string" + "condition_id": + type: "string" + "status_pages": + type: "array" + nullable: true + items: + required: + - "id" + - "integration_slug" + type: "object" + properties: + "id": + type: "string" + "integration_slug": + type: "string" + description: "Allows updating an incident's impacted infrastructure, with the option to\nmove the incident into a different milestone and provide a note to update\nthe incident timeline and any attached status pages. If this method is\nrequested with the PUT verb, impacts will be completely replaced with the\ninformation in the request body, even if not provided (effectively clearing\nall impacts). If this method is requested with the PATCH verb, the provided\nimpacts will be added or updated, but no impacts will be removed.\n" + "update_incident_impact_put": + type: "object" + properties: + "note": + type: "string" + nullable: true + "milestone": + type: "string" + nullable: true + "impact": + type: "array" + nullable: true + items: + required: + - "condition_id" + - "id" + type: "object" + properties: + "id": + type: "string" + "condition_id": + type: "string" + "status_pages": + type: "array" + nullable: true + items: + required: + - "id" + - "integration_slug" + type: "object" + properties: + "id": + type: "string" + "integration_slug": + type: "string" + description: "Allows updating an incident's impacted infrastructure, with the option to\nmove the incident into a different milestone and provide a note to update\nthe incident timeline and any attached status pages. If this method is\nrequested with the PUT verb, impacts will be completely replaced with the\ninformation in the request body, even if not provided (effectively clearing\nall impacts). If this method is requested with the PATCH verb, the provided\nimpacts will be added or updated, but no impacts will be removed.\n" + "create_incident_impact": + required: + - "id" + type: "object" + properties: + "id": + type: "string" + "condition_id": + type: "string" + nullable: true + description: "Add impacted infrastructure to an incident" + "IncidentImpactEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "type": + type: "string" + nullable: true + "infrastructure": {"$ref": "#/components/schemas/NullableSuccinctEntity"} + description: "IncidentImpactEntity model" + "IncidentImpactEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/IncidentImpactEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "IncidentImpactEntityPaginated model" + "create_incident_note": + required: + - "body" + type: "object" + properties: + "body": + type: "string" + "occurred_at": + type: "string" + description: "ISO8601 timestamp for when the note occurred" + format: "date-time" + nullable: true + "visibility": + type: "string" + nullable: true + default: "private_to_org" + enum: + - "private_to_org" + - "open_to_public" + - "internal_status_page" + "status_pages": + type: "array" + nullable: true + items: + required: + - "id" + - "integration_slug" + type: "object" + properties: + "id": + type: "string" + "integration_slug": + type: "string" + description: "Create a new note on for an incident. The visibility field on a note determines where it gets posted." + "update_incident_note": + required: + - "body" + type: "object" + properties: + "body": + type: "string" + description: "Updates the body of a note" + "create_incident_chat_message": + required: + - "body" + type: "object" + properties: + "body": + type: "string" + "occurred_at": + type: "string" + description: "ISO8601 timestamp for when the chat message occurred" + format: "date-time" + nullable: true + "vote_direction": + type: "string" + nullable: true + enum: + - "up" + - "down" + description: "Create a new generic chat message on an incident timeline. These are independent of any specific chat provider." + "Event_GenericChatMessageEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "body": + type: "string" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + description: "Event_GenericChatMessageEntity model" + "update_incident_chat_message": + required: + - "body" + type: "object" + properties: + "body": + type: "string" + description: "Update an existing generic chat message on an incident." + "Incidents_RoleAssignmentEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Incidents_RoleAssignmentEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "Incidents_RoleAssignmentEntityPaginated model" + "create_incident_role_assignment": + required: + - "incident_role_id" + - "user_id" + type: "object" + properties: + "user_id": + type: "string" + description: "The user ID to assign the role to" + "incident_role_id": + type: "string" + description: "The Incident Role ID to assign the role to" + description: "Assign a role to a user for this incident" + "create_incident_team_assignment": + required: + - "team_id" + type: "object" + properties: + "team_id": + type: "string" + description: "The team ID to associate to the incident" + description: "Assign a team for this incident" + "Incidents_RelationshipsEntity": + type: "object" + properties: + "parent": {"$ref": "#/components/schemas/NullablePublicAPI_V1_Incidents_SuccinctEntity"} + "children": + type: "array" + description: "The root incident's child incidents." + nullable: true + items: {"$ref": "#/components/schemas/PublicAPI_V1_Incidents_SuccinctEntity"} + "siblings": + type: "array" + description: "A list of incidents that share the root incident's parent." + nullable: true + items: {"$ref": "#/components/schemas/PublicAPI_V1_Incidents_SuccinctEntity"} + description: "Incidents_RelationshipsEntity model" + "Incidents_ShareRetrospectivesResultEntity": + type: "object" + properties: + "retrospective_ids": + type: "array" + description: "The IDs of the retrospectives that were shared." + nullable: true + items: + type: "string" + "user_ids": + type: "array" + description: "The IDs of the users with whom the retrospectives were shared." + nullable: true + items: + type: "string" + description: "Incidents_ShareRetrospectivesResultEntity model" + "Incidents_ExportRetrospectivesResultEntity": + type: "object" + properties: + "external_resource": {"$ref": "#/components/schemas/NullableExternalResourceEntity"} + description: "Incidents_ExportRetrospectivesResultEntity model" + "Incidents_RetrospectiveEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "sections": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Incidents_RetrospectiveEntity_SectionEntity"} + "is_hidden": + type: "boolean" + nullable: true + "fields": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Incidents_RetrospectiveFieldEntity"} + "exports": + type: "array" + nullable: true + items: + type: "string" + description: "Incidents_RetrospectiveEntity model" + "Incidents_RetrospectiveEntity_SectionEntity": + type: "object" + properties: + "slug": + type: "string" + nullable: true + "elements": + type: "array" + nullable: true + items: + type: "string" + "Incidents_RetrospectiveFieldEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "label": + type: "string" + nullable: true + "type": + type: "string" + nullable: true + enum: + - "text" + - "single_select" + - "multi_select" + - "numeric" + - "datetime" + - "dynamic_input_group" + - "markdown" + - "markdown_text" + "help_text": + type: "string" + nullable: true + "permissible_values": + type: "array" + nullable: true + items: + type: "string" + "is_required": + type: "boolean" + nullable: true + "value": + nullable: true + oneOf: + - type: "integer" + - type: "string" + - type: "array" + items: + type: "object" + additionalProperties: true + "schema": + type: "array" + nullable: true + items: + type: "string" + description: "Incidents_RetrospectiveFieldEntity model" + "Incidents_RetrospectiveEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Incidents_RetrospectiveEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "Incidents_RetrospectiveEntityPaginated model" + "update_incident_retrospective": + type: "object" + properties: + "is_hidden": + type: "boolean" + description: "To hide or unhide the retrospective." + nullable: true + description: "Update a retrospective attached to an incident" + "update_incident_retrospective_field": + required: + - "value" + type: "object" + properties: + "dynamic_input_field_id": + type: "string" + description: "The ID of the dynamic input field to update." + nullable: true + "value": + type: "integer" + description: "The value to set for the field." + format: "~" + oneOf: + - type: "integer" + - type: "string" + - type: "array" + items: + type: "object" + additionalProperties: true + description: "Update retrospective field value" + "IncidentRoleEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/IncidentRoleEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "IncidentRoleEntityPaginated model" + "create_incident_role": + required: + - "name" + - "summary" + type: "object" + properties: + "name": + type: "string" + "summary": + type: "string" + "description": + type: "string" + nullable: true + description: "Create a new incident role" + "update_incident_role": + type: "object" + properties: + "name": + type: "string" + nullable: true + "summary": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + description: "Update a single incident role from its ID" + "TagEntity": + type: "object" + properties: + "name": + type: "string" + nullable: true + description: "TagEntity model" + "TagEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/TagEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "TagEntityPaginated model" + "create_incident_type": + required: + - "name" + - "template" + type: "object" + properties: + "name": + type: "string" + "template": + type: "object" + properties: + "description": + type: "string" + nullable: true + "customer_impact_summary": + type: "string" + nullable: true + "labels": + type: "object" + additionalProperties: + type: "string" + description: "A labels hash of keys and values" + nullable: true + "severity": + type: "string" + nullable: true + "priority": + type: "string" + nullable: true + "tag_list": + type: "array" + description: "List of tags for the incident" + nullable: true + items: + type: "string" + "runbook_ids": + type: "array" + description: "List of ids of Runbooks to attach to incidents created from this type" + nullable: true + items: + type: "string" + "private_incident": + type: "boolean" + nullable: true + "team_ids": + type: "array" + description: "List of ids of teams to be assigned to incidents" + nullable: true + items: + type: "string" + "impacts": + type: "array" + description: "An array of impact/condition combinations" + nullable: true + items: + required: + - "condition_id" + - "id" + type: "object" + properties: + "id": + type: "string" + description: "The id of impact" + "condition_id": + type: "string" + description: "The id of the condition" + description: "Create a new incident type" + "IncidentTypeEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "template": {"$ref": "#/components/schemas/NullableIncidentTypeEntity_TemplateEntity"} + "template_values": {"$ref": "#/components/schemas/NullableIncidentTypeEntity_TemplateValuesEntity"} + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + description: "IncidentTypeEntity model" + "IncidentTypeEntity_TemplateEntity": + type: "object" + properties: + "incident_name": + type: "string" + nullable: true + "summary": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "customer_impact_summary": + type: "string" + nullable: true + "labels": + type: "object" + description: "Arbitrary key:value pairs of labels for your incidents." + nullable: true + "severity": + type: "string" + nullable: true + "priority": + type: "string" + nullable: true + "tag_list": + type: "array" + nullable: true + items: + type: "string" + "runbook_ids": + type: "array" + nullable: true + items: + type: "string" + "team_ids": + type: "array" + nullable: true + items: + type: "string" + "private_incident": + type: "boolean" + nullable: true + "custom_fields": + type: "string" + nullable: true + "impacts": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/IncidentTypeEntity_TemplateImpactEntity"} + "IncidentTypeEntity_TemplateImpactEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "condition_id": + type: "string" + nullable: true + "condition_name": + type: "string" + nullable: true + "type": + type: "string" + nullable: true + enum: + - "customer" + - "environment" + - "functionality" + - "service" + "IncidentTypeEntity_TemplateValuesEntity": + type: "object" + properties: + "services": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/IncidentTypeEntity_TemplateImpactEntity"} + "functionalities": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/IncidentTypeEntity_TemplateImpactEntity"} + "environments": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/IncidentTypeEntity_TemplateImpactEntity"} + "runbooks": + type: "object" + description: "A hash mapping runbook IDs to runbook names." + nullable: true + "teams": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/TeamEntity"} + "IncidentTypeEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/IncidentTypeEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "IncidentTypeEntityPaginated model" + "update_incident_type": + required: + - "name" + - "template" + type: "object" + properties: + "name": + type: "string" + "template": + type: "object" + properties: + "description": + type: "string" + nullable: true + "customer_impact_summary": + type: "string" + nullable: true + "labels": + type: "object" + additionalProperties: + type: "string" + description: "A labels hash of keys and values" + nullable: true + "severity": + type: "string" + nullable: true + "priority": + type: "string" + nullable: true + "tag_list": + type: "array" + description: "List of tags for the incident" + nullable: true + items: + type: "string" + "runbook_ids": + type: "array" + description: "List of ids of Runbooks to attach to incidents created from this type" + nullable: true + items: + type: "string" + "private_incident": + type: "boolean" + nullable: true + "team_ids": + type: "array" + description: "List of ids of teams to be assigned to incidents" + nullable: true + items: + type: "string" + "impacts": + type: "array" + description: "An array of impact/condition combinations" + nullable: true + items: + required: + - "condition_id" + - "id" + type: "object" + properties: + "id": + type: "string" + description: "The id of impact" + "condition_id": + type: "string" + description: "The id of the condition" + description: "Update a single incident type from its ID" + "Integrations_IntegrationEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Integrations_IntegrationEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "Integrations_IntegrationEntityPaginated model" + "Integrations_IntegrationEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "slug": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "setup_url": + type: "string" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "connections": {"$ref": "#/components/schemas/NullableIntegrations_ConnectionEntity"} + "enabled": + type: "boolean" + nullable: true + "installed": + type: "boolean" + nullable: true + "deprecated": + type: "boolean" + nullable: true + "logo": {"$ref": "#/components/schemas/NullableIntegrations_IntegrationEntity_LogoEntity"} + "nat_ip": + type: "string" + nullable: true + description: "Integrations_IntegrationEntity model" + "Integrations_ConnectionEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "integration_slug": + type: "string" + nullable: true + "integration_id": + type: "string" + nullable: true + "display_name": + type: "string" + nullable: true + "configuration_url": + type: "string" + nullable: true + "authorized_by": + type: "string" + nullable: true + "authorized_by_id": + type: "string" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "details": + type: "object" + description: "Integration-specific details of this connection. As identified by the integration_slug, this object will be represented by that integration's ConnectionEntity." + nullable: true + "default_authorized_actor": {"$ref": "#/components/schemas/NullableAuthorEntity"} + description: "Integrations_ConnectionEntity model" + "Integrations_IntegrationEntity_LogoEntity": + type: "object" + properties: + "logo_url": + type: "string" + nullable: true + "FieldMapping_FieldMapEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "connection_id": + type: "string" + nullable: true + "connection_type": + type: "string" + nullable: true + "entity_id": + type: "string" + nullable: true + "entity_type": + type: "string" + nullable: true + "body": + type: "object" + nullable: true + "available_fields_url": + type: "string" + nullable: true + "data_bag_url": + type: "string" + nullable: true + description: "FieldMapping_FieldMapEntity model" + "FieldMapping_MappableFieldEntity": + type: "object" + properties: + "value": + type: "string" + description: "The ID of the field" + nullable: true + "label": + type: "string" + description: "The human-readable name of the field" + nullable: true + "type": + type: "string" + description: "The allowed type of the field" + nullable: true + "allowed_values": + type: "array" + description: "The allowed values of the field" + nullable: true + items: + type: "string" + "required": + type: "string" + description: "If the field is required to be mapped" + nullable: true + "help_text": + type: "string" + description: "Short, inline documentation for the present field" + nullable: true + description: "FieldMapping_MappableFieldEntity model" + "Integrations_AuthedProviderEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/PublicAPI_V1_Integrations_AuthedProviderEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "Integrations_AuthedProviderEntityPaginated model" + "PublicAPI_V1_Integrations_AuthedProviderEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "user": {"$ref": "#/components/schemas/NullableSuccinctEntity"} + "integration_default": + type: "boolean" + nullable: true + "authorized_email": + type: "string" + description: "The email of the user who authorized the integration" + nullable: true + "is_expired": + type: "boolean" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + description: "PublicAPI_V1_Integrations_AuthedProviderEntity model" + "Integrations_ConnectionEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Integrations_ConnectionEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "Integrations_ConnectionEntityPaginated model" + "Integrations_ConnectionStatusEntity": + type: "object" + properties: + "checked_at": + type: "string" + format: "date-time" + nullable: true + "status": + type: "string" + nullable: true + enum: + - "ok" + - "info" + - "warning" + - "error" + "message": + type: "string" + nullable: true + "check_type": + type: "string" + nullable: true + "error_type": + type: "string" + nullable: true + "integration_slug": + type: "string" + nullable: true + "connection_id": + type: "string" + nullable: true + "data": + type: "object" + description: "Additional unstructured data about the status check." + nullable: true + "performed_by": {"$ref": "#/components/schemas/NullableAuthorEntity"} + description: "Integrations_ConnectionStatusEntity model" + "Integrations_Aws_ConnectionEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Integrations_Aws_ConnectionEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "Integrations_Aws_ConnectionEntityPaginated model" + "Integrations_Aws_ConnectionEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "aws_account_id": + type: "string" + nullable: true + "target_arn": + type: "string" + nullable: true + "external_id": + type: "string" + nullable: true + "connection_status": + type: "string" + nullable: true + enum: + - "pending_setup" + - "role_assumed" + - "cant_assume_role" + - "invalid_permissions" + - "validated" + "status_text": + type: "string" + nullable: true + "status_description": + type: "string" + nullable: true + "environment_id": + type: "string" + nullable: true + "environment_name": + type: "string" + nullable: true + "regions": + type: "array" + nullable: true + items: + type: "string" + description: "Integrations_Aws_ConnectionEntity model" + "update_aws_connection": + type: "object" + properties: + "aws_account_id": + type: "string" + nullable: true + "target_arn": + type: "string" + nullable: true + "connection_status": + type: "string" + nullable: true + description: "Update the AWS connection with the provided data." + "Integrations_Aws_CloudtrailBatchEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Integrations_Aws_CloudtrailBatchEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "Integrations_Aws_CloudtrailBatchEntityPaginated model" + "Integrations_Aws_CloudtrailBatchEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "events_created": + type: "integer" + format: "int32" + nullable: true + "status": + type: "string" + nullable: true + enum: + - "in_progress" + - "failed" + - "successful" + - "pending" + - "retried" + "starts_at": + type: "string" + format: "date-time" + nullable: true + "ends_at": + type: "string" + format: "date-time" + nullable: true + "connection": {"$ref": "#/components/schemas/NullableIntegrations_Aws_ConnectionEntity"} + "created_at": + type: "string" + format: "date-time" + nullable: true + description: "Integrations_Aws_CloudtrailBatchEntity model" + "update_aws_cloudtrail_batch": + type: "object" + properties: + "events_created": + type: "integer" + format: "int32" + nullable: true + "status": + type: "string" + nullable: true + "error": + type: "string" + nullable: true + "ends_at": + type: "string" + format: "date-time" + nullable: true + description: "Update a CloudTrail batch with new information." + "Integrations_ConfluenceCloud_SpaceKeyEntity": + type: "object" + properties: + "key": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + description: "Integrations_ConfluenceCloud_SpaceKeyEntity model" + "Integrations_Slack_WorkspaceEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "team_id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + description: "Integrations_Slack_WorkspaceEntity model" + "Integrations_Slack_UsergroupEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "handle": + type: "string" + nullable: true + "is_disabled": + type: "boolean" + nullable: true + description: "Integrations_Slack_UsergroupEntity model" + "Integrations_Statuspage_ConnectionEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Integrations_Statuspage_ConnectionEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "Integrations_Statuspage_ConnectionEntityPaginated model" + "Integrations_Statuspage_ConnectionEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "page_name": + type: "string" + nullable: true + "page_id": + type: "string" + nullable: true + "conditions": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Integrations_Statuspage_ConditionEntity"} + "severities": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Integrations_Statuspage_SeverityEntity"} + "milestone_mappings": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Integrations_Statuspage_MilestoneMappingEntity"} + description: "Integrations_Statuspage_ConnectionEntity model" + "Integrations_Statuspage_ConditionEntity": + type: "object" + properties: + "condition_id": + type: "string" + nullable: true + "condition_name": + type: "string" + nullable: true + "statuspageio_condition": + type: "string" + nullable: true + enum: + - "operational" + - "major_outage" + - "minor_outage" + - "degraded_performance" + "Integrations_Statuspage_SeverityEntity": + type: "object" + properties: + "severity_slug": + type: "string" + nullable: true + "remote_status": + type: "string" + nullable: true + "Integrations_Statuspage_MilestoneMappingEntity": + type: "object" + properties: + "milestone_id": + type: "string" + nullable: true + "status": + type: "string" + nullable: true + "update_statuspage_connection": + type: "object" + properties: + "page_id": + type: "string" + nullable: true + "severities": + type: "array" + nullable: true + items: + required: + - "remote_status" + - "severity_slug" + type: "object" + properties: + "severity_slug": + type: "string" + description: "FireHydrant severity slug" + "remote_status": + type: "string" + description: "Statuspage.io severity name" + "conditions": + type: "array" + nullable: true + items: + required: + - "condition_id" + - "statuspageio_condition" + type: "object" + properties: + "condition_id": + type: "string" + description: "FireHydrant condition id" + "statuspageio_condition": + type: "string" + description: "Statuspage.io condition name" + "milestone_mappings": + type: "array" + nullable: true + items: + required: + - "milestone_id" + - "status" + type: "object" + properties: + "milestone_id": + type: "string" + description: "FireHydrant milestone id" + "status": + type: "string" + description: "Statuspage.io status" + enum: + - "investigating" + - "identified" + - "monitoring" + - "resolved" + description: "Update the given Statuspage integration connection." + "Integrations_Statuspage_PageEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + description: "Integrations_Statuspage_PageEntity model" + "Integrations_Zendesk_SearchTickets_PaginatedEntity": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Integrations_Zendesk_SupportIssueEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "Integrations_Zendesk_SearchTickets_PaginatedEntity model" + "Integrations_Zendesk_SupportIssueEntity": + type: "object" + properties: + "remote_id": + type: "string" + description: "The ID of this support issue in the system that originated this issue, eg Zendesk." + nullable: true + "title": + type: "string" + description: "Title or name of this issue." + nullable: true + "description": + type: "string" + description: "Longer description of the issue." + nullable: true + "remote_url": + type: "string" + description: "Browser-accessible url for this issue in the originating system, eg Zendesk." + nullable: true + "data": + type: "object" + description: "Raw data associated with this issue from originating system." + nullable: true + "attachments": + type: "string" + description: "Attachment information for this issue." + nullable: true + "customers": {"$ref": "#/components/schemas/NullableIntegrations_Zendesk_SupportIssueEntity_CustomerEntity"} + "priority": + type: "string" + nullable: true + "attached_incidents": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/IncidentEntity"} + "type": + type: "string" + description: "Type designator for this entity" + nullable: true + "Integrations_Zendesk_SupportIssueEntity_CustomerEntity": + type: "object" + properties: + "id": + type: "string" + description: "UUID of the Customer" + nullable: true + "name": + type: "string" + description: "Name of the Customer" + nullable: true + "UserEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/UserEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "UserEntityPaginated model" + "CurrentUserEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "source": + type: "string" + nullable: true + "email": + type: "string" + nullable: true + "role": + type: "string" + nullable: true + "teams": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/SuccinctEntity"} + "organization_id": + type: "string" + nullable: true + "organization_name": + type: "string" + nullable: true + "account_id": + type: "integer" + format: "int32" + nullable: true + description: "CurrentUserEntity model" + "ReportEntity": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Reports_BucketEntity"} + "start_date": + type: "string" + format: "date" + nullable: true + "end_date": + type: "string" + format: "date" + nullable: true + "bucket_period": + type: "string" + nullable: true + description: "ReportEntity model" + "Reports_BucketEntity": + type: "object" + properties: + "bucket": + type: "string" + nullable: true + "points": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Reports_DataPointEntity"} + "Reports_DataPointEntity": + type: "object" + properties: + "key": + type: "string" + nullable: true + "value": + type: "integer" + format: "int32" + nullable: true + "Metrics_TicketFunnelMetricsEntity": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Metrics_TicketFunnelMetricsEntity_DataBucketEntity"} + "groupings": {"$ref": "#/components/schemas/NullableMetrics_TicketFunnelMetricsEntity_GroupingsEntity"} + description: "Metrics_TicketFunnelMetricsEntity model" + "Metrics_TicketFunnelMetricsEntity_DataBucketEntity": + type: "object" + properties: + "time_bucket": + type: "string" + description: "The start datetime for the period" + format: "date-time" + nullable: true + "filter_params": {"$ref": "#/components/schemas/NullableMetrics_TicketFunnelMetricsEntity_DataBucketFilterParamsEntity"} + "tasks_created": + type: "integer" + description: "The number of tasks created" + format: "int32" + nullable: true + "tasks_done": + type: "integer" + description: "The number of tasks completed" + format: "int32" + nullable: true + "follow_ups_created": + type: "integer" + description: "The number of follow ups created" + format: "int32" + nullable: true + "follow_ups_done": + type: "integer" + description: "The number of follow ups completed" + format: "int32" + nullable: true + "Metrics_TicketFunnelMetricsEntity_DataBucketFilterParamsEntity": + type: "object" + properties: + "start_date": + type: "string" + description: "The start datetime for the period" + format: "date-time" + nullable: true + "end_date": + type: "string" + description: "The end datetime for the period not inclusive" + format: "date" + nullable: true + "Metrics_TicketFunnelMetricsEntity_GroupingsEntity": + type: "object" + properties: + "bucket_size": + type: "string" + description: "The bucket size for the data" + nullable: true + "Metrics_RetrospectiveEntity": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Metrics_RetrospectiveEntity_DataEntity"} + "summary": {"$ref": "#/components/schemas/NullableMetrics_RetrospectiveEntity_SummaryEntity"} + description: "Metrics_RetrospectiveEntity model" + "Metrics_RetrospectiveEntity_DataEntity": + type: "object" + properties: + "x": + type: "string" + nullable: true + "y": + type: "number" + format: "float" + nullable: true + "Metrics_RetrospectiveEntity_SummaryEntity": + type: "object" + properties: + "completed": + type: "integer" + format: "int32" + nullable: true + "total": + type: "integer" + format: "int32" + nullable: true + "incomplete": + type: "integer" + format: "int32" + nullable: true + "mean": + type: "number" + format: "float" + nullable: true + "shortest": + type: "number" + format: "float" + nullable: true + "longest": + type: "number" + format: "float" + nullable: true + "completion_percentage": + type: "number" + format: "float" + nullable: true + "Metrics_MilestonesFunnelEntity": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Metrics_MilestonesFunnelEntity_DataBucketEntity"} + "columns": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Metrics_MilestonesFunnelEntity_ColumnEntity"} + "groupings": {"$ref": "#/components/schemas/NullableMetrics_MilestonesFunnelEntity_GroupingsEntity"} + "meta": {"$ref": "#/components/schemas/NullableMetrics_MilestonesFunnelEntity_MetaEntity"} + description: "Metrics_MilestonesFunnelEntity model" + "Metrics_MilestonesFunnelEntity_DataBucketEntity": + type: "object" + properties: + "time_bucket": + type: "string" + description: "The start datetime for the period" + format: "date-time" + nullable: true + "filter_params": {"$ref": "#/components/schemas/NullableMetrics_MilestonesFunnelEntity_DataBucketFilterParamsEntity"} + "milestone_counts": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Metrics_MilestonesFunnelEntity_DataBucketMilestoneCountEntity"} + "Metrics_MilestonesFunnelEntity_DataBucketFilterParamsEntity": + type: "object" + properties: + "start_date": + type: "string" + description: "The start datetime for the period" + format: "date-time" + nullable: true + "end_date": + type: "string" + description: "The end datetime for the period not inclusive" + format: "date" + nullable: true + "Metrics_MilestonesFunnelEntity_DataBucketMilestoneCountEntity": + type: "object" + properties: + "milestone_id": + type: "string" + description: "The UUID of the milestone" + nullable: true + "count": + type: "integer" + description: "The frequency count of that milestone for the period" + format: "int32" + nullable: true + "Metrics_MilestonesFunnelEntity_ColumnEntity": + type: "object" + properties: + "name": + type: "string" + description: "The slug of the milestone" + nullable: true + "label": + type: "string" + description: "The name of the milestone" + nullable: true + "tooltip": + type: "string" + description: "The description of the milestone" + nullable: true + "id": + type: "string" + description: "The UUID of the milestone" + nullable: true + "Metrics_MilestonesFunnelEntity_GroupingsEntity": + type: "object" + properties: + "bucket_size": + type: "string" + description: "The bucket size for the data" + nullable: true + "Metrics_MilestonesFunnelEntity_MetaEntity": + type: "object" + properties: + "deleted_milestones": + type: "array" + nullable: true + items: + type: "string" + "added_milestones": + type: "array" + nullable: true + items: + type: "string" + "Metrics_MetricsEntity": + type: "object" + properties: + "type": + type: "string" + nullable: true + "by": + type: "string" + description: "The field by which the metrics are grouped. Can be one of: total, severity, priority, functionality, service, environment, or user." + nullable: true + "bucket_size": + type: "integer" + description: "The size of returned buckets. Can be one of: day, week, month, or all_time." + format: "int32" + nullable: true + "display_information": + type: "object" + nullable: true + "keys": + type: "array" + nullable: true + items: + type: "string" + "buckets": + type: "array" + nullable: true + items: + type: "object" + "sort": {"$ref": "#/components/schemas/NullableMetrics_MetricsEntity_SortEntity"} + description: "Metrics_MetricsEntity model" + "Metrics_MetricsEntity_SortEntity": + type: "object" + properties: + "field": + type: "string" + nullable: true + "direction": + type: "string" + nullable: true + "limit": + type: "integer" + format: "int32" + nullable: true + "Metrics_MttxDataEntity": + type: "object" + properties: + "groupings": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Metrics_MttxDataEntity_GroupingEntity"} + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Metrics_MttxGroupEntity"} + description: "Metrics_MttxDataEntity model" + "Metrics_MttxDataEntity_GroupingEntity": + type: "object" + properties: + "type": + type: "string" + nullable: true + "id_attribute": + type: "string" + nullable: true + "name_attribute": + type: "string" + nullable: true + "Metrics_MttxGroupEntity": + type: "object" + properties: + "group_attributes": + type: "string" + nullable: true + "filter_params": + type: "object" + nullable: true + "count": + type: "integer" + format: "int32" + nullable: true + "mttd": + type: "number" + format: "float" + nullable: true + "mtta": + type: "number" + format: "float" + nullable: true + "mttm": + type: "number" + format: "float" + nullable: true + "mttr": + type: "number" + format: "float" + nullable: true + "count_diff": + type: "integer" + format: "int32" + nullable: true + "count_percent_diff": + type: "number" + format: "float" + nullable: true + "mttd_diff": + type: "number" + format: "float" + nullable: true + "mtta_diff": + type: "number" + format: "float" + nullable: true + "mttm_diff": + type: "number" + format: "float" + nullable: true + "mttr_diff": + type: "number" + format: "float" + nullable: true + "mttd_percent_diff": + type: "number" + format: "float" + nullable: true + "mtta_percent_diff": + type: "number" + format: "float" + nullable: true + "mttm_percent_diff": + type: "number" + format: "float" + nullable: true + "mttr_percent_diff": + type: "number" + format: "float" + nullable: true + "healthiness": + type: "number" + format: "float" + nullable: true + "Metrics_InfrastructureListEntity": + type: "object" + properties: + "data": + type: "array" + description: "List of infrastructure metrics" + nullable: true + items: {"$ref": "#/components/schemas/Metrics_InfrastructureMetricsEntity"} + description: "Metrics_InfrastructureListEntity model" + "Metrics_InfrastructureMetricsEntity": + type: "object" + properties: + "id": + type: "string" + description: "The UUID of the component" + nullable: true + "name": + type: "string" + description: "The name of the component" + nullable: true + "mttd": + type: "integer" + description: "Mean Time To Detection (seconds) for all incidents for this component in this time period" + format: "int32" + nullable: true + "mtta": + type: "integer" + description: "Mean Time To Acknowledgement (seconds) for all incidents for this component in this time period" + format: "int32" + nullable: true + "mttm": + type: "integer" + description: "Mean Time To Mitigation (seconds) for all incidents for this component in this time period" + format: "int32" + nullable: true + "mttr": + type: "integer" + description: "Mean Time To Resolution (seconds) for all incidents for this component in this time period" + format: "int32" + nullable: true + "count": + type: "integer" + description: "Number of incidents in this time period for this component" + format: "int32" + nullable: true + "total_time": + type: "integer" + description: "Total time (seconds) the component was impacted (MTTR x Incident Count)" + format: "int32" + nullable: true + description: "Metrics_InfrastructureMetricsEntity model" + "Runbooks_ActionsEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Runbooks_ActionsEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "Runbooks_ActionsEntityPaginated model" + "Runbooks_ActionsEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "slug": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "config": {"$ref": "#/components/schemas/NullableRunbooks_ActionConfigEntity"} + "category": + type: "string" + nullable: true + "prerequisites": + type: "object" + nullable: true + "integration": {"$ref": "#/components/schemas/NullableIntegrations_IntegrationEntity"} + "supported_runbook_types": + type: "array" + nullable: true + items: + type: "string" + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "automatable": + type: "boolean" + nullable: true + "rerunnable": + type: "boolean" + nullable: true + "repeatable": + type: "boolean" + nullable: true + "default_logic": + type: "object" + nullable: true + "default_rule_data": + type: "object" + nullable: true + "Runbooks_ActionConfigEntity": + type: "object" + properties: + "elements": {"$ref": "#/components/schemas/NullableRunbooks_ElementEntity"} + "documentation_url": + type: "string" + description: "Location of documentation for this action" + nullable: true + "Runbooks_ElementEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "type": + type: "string" + nullable: true + "markdown": {"$ref": "#/components/schemas/NullableRunbooks_ElementMarkdownEntity"} + "textarea": {"$ref": "#/components/schemas/NullableRunbooks_ElementTextareaEntity"} + "input": {"$ref": "#/components/schemas/NullableRunbooks_ElementInputEntity"} + "plain_text": {"$ref": "#/components/schemas/NullableRunbooks_ElementMarkdownEntity"} + "dynamic_select": {"$ref": "#/components/schemas/NullableRunbooks_ElementDynamicSelectEntity"} + "Runbooks_ElementMarkdownEntity": + type: "object" + properties: + "text": + type: "string" + nullable: true + "Runbooks_ElementTextareaEntity": + type: "object" + properties: + "label": + type: "string" + nullable: true + "placeholder": + type: "string" + nullable: true + "default_value": + type: "string" + nullable: true + "Runbooks_ElementInputEntity": + type: "object" + properties: + "label": + type: "string" + nullable: true + "placeholder": + type: "string" + nullable: true + "default_value": + type: "string" + nullable: true + "required": + type: "boolean" + nullable: true + "Runbooks_ElementDynamicSelectEntity": + type: "object" + properties: + "label": + type: "string" + nullable: true + "placeholder": + type: "string" + nullable: true + "async_url": + type: "string" + nullable: true + "required": + type: "boolean" + nullable: true + "clearable": + type: "boolean" + nullable: true + "is_multi": + type: "boolean" + nullable: true + "default_value": {"$ref": "#/components/schemas/NullableRunbooks_ElementDynamicSelectEntity_SelectOptionEntity"} + "options": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Runbooks_ElementDynamicSelectEntity_SelectOptionEntity"} + "Runbooks_ElementDynamicSelectEntity_SelectOptionEntity": + type: "object" + properties: + "label": + type: "string" + nullable: true + "value": + type: "string" + nullable: true + "create_runbook_execution": + required: + - "execute_for" + - "runbook_id" + type: "object" + properties: + "execute_for": + type: "string" + description: "The incident to attach the runbook to. Format must be: `incident/${incidentId}`" + "runbook_id": + type: "string" + description: "ID of runbook to attach" + description: "Attaches a runbook to an incident and executes it" + "Runbooks_ExecutionEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "status": + type: "string" + nullable: true + "status_reason": + type: "string" + nullable: true + "status_reason_message": + type: "string" + nullable: true + "has_been_rerun": + type: "boolean" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "created_by": + type: "string" + nullable: true + "runbook": {"$ref": "#/components/schemas/NullableSlimRunbookEntity"} + "steps": {"$ref": "#/components/schemas/NullableRunbooks_ExecutionStepEntity"} + "executed_for": {"$ref": "#/components/schemas/NullableRunbooks_ExecutionEntity_ExecutedForEntity"} + description: "Runbooks_ExecutionEntity model" + "Runbooks_ExecutionStepEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "action_slug": + type: "string" + nullable: true + "action_type": + type: "string" + nullable: true + "integration_name": + type: "string" + nullable: true + "integration_slug": + type: "string" + nullable: true + "automatic": + type: "boolean" + nullable: true + "config": + type: "object" + nullable: true + "step_elements": + type: "array" + nullable: true + items: + type: "object" + "executable": + type: "boolean" + nullable: true + "repeats": + type: "boolean" + nullable: true + "repeats_duration": + type: "string" + description: "ISO8601 formatted duration string" + nullable: true + "repeats_at": + type: "string" + format: "date-time" + nullable: true + "has_been_rerun": + type: "boolean" + nullable: true + "has_been_retried": + type: "boolean" + nullable: true + "execution": {"$ref": "#/components/schemas/NullableRunbooks_ExecutionStepExecutionEntity"} + "repeatable": + type: "boolean" + nullable: true + "conference_bridge": {"$ref": "#/components/schemas/NullableIncidents_ConferenceBridgeEntity"} + "rule": {"$ref": "#/components/schemas/NullableRules_RuleEntity"} + "Runbooks_ExecutionStepExecutionEntity": + type: "object" + properties: + "state": + type: "string" + nullable: true + enum: + - "initial" + - "pending" + - "scheduled" + - "started" + - "dismissed" + - "completed" + - "errored" + "data": + type: "object" + nullable: true + "performed_by": {"$ref": "#/components/schemas/NullableActorEntity"} + "performed_at": + type: "string" + format: "date-time" + nullable: true + "scheduled_for": + type: "string" + format: "date-time" + nullable: true + "error": + type: "string" + nullable: true + "webhook_delivery": {"$ref": "#/components/schemas/NullableRunbooks_WebhookDeliveryEntity"} + "Runbooks_WebhookDeliveryEntity": + type: "object" + properties: + "headers": + type: "string" + nullable: true + "status_code": + type: "string" + nullable: true + "Runbooks_ExecutionEntity_ExecutedForEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "type": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "Runbooks_ExecutionEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Runbooks_ExecutionEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "Runbooks_ExecutionEntityPaginated model" + "update_runbook_execution_step": + required: + - "state" + type: "object" + properties: + "state": + type: "string" + "schedule_for": + type: "string" + format: "date-time" + nullable: true + "data": + type: "object" + additionalProperties: true + description: "Data for execution of this step" + nullable: true + "repeats_at": + type: "string" + format: "date-time" + nullable: true + description: "Updates a runbook step execution, especially for changing the state of a step execution." + "create_runbook": + required: + - "name" + - "type" + type: "object" + properties: + "name": + type: "string" + "type": + type: "string" + description: "Deprecated, but still required. Please just use 'incident'" + enum: + - "incident" + - "general" + - "infrastructure" + - "incident_role" + "summary": + type: "string" + description: "Deprecated. Use description" + nullable: true + "description": + type: "string" + description: "A longer description about the Runbook. Supports markdown format" + nullable: true + "auto_attach_to_restricted_incidents": + type: "boolean" + description: "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`." + nullable: true + "tutorial": + type: "boolean" + description: "Whether or not this runbook is a tutorial runbook" + nullable: true + "owner": + required: + - "id" + type: "object" + properties: + "id": + type: "string" + description: "An object representing a Team that owns the runbook" + nullable: true + "attachment_rule": + required: + - "logic" + type: "object" + properties: + "logic": + type: "string" + description: "The JSON logic for the attaching the runbook" + "user_data": + type: "string" + description: "The user data for the rule" + nullable: true + nullable: true + "steps": + type: "array" + nullable: true + items: + required: + - "action_id" + - "name" + type: "object" + properties: + "name": + type: "string" + description: "Name for step" + "action_id": + type: "string" + description: "ID of action to use for this step." + "rule": + required: + - "logic" + type: "object" + properties: + "logic": + type: "string" + description: "The JSON logic for the rule" + "user_data": + type: "string" + description: "The user data for the rule" + nullable: true + nullable: true + description: "Create a new runbook for use with incidents." + "RunbookEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "summary": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "type": + type: "string" + nullable: true + "runbook_template_id": + type: "string" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "created_by": {"$ref": "#/components/schemas/NullableAuthorEntity"} + "updated_by": {"$ref": "#/components/schemas/NullableAuthorEntity"} + "steps": {"$ref": "#/components/schemas/NullableRunbookStepEntity"} + "attachment_rule": {"$ref": "#/components/schemas/NullableRules_RuleEntity"} + "votes": {"$ref": "#/components/schemas/NullableVotesEntity"} + "is_editable": + type: "boolean" + nullable: true + "owner": {"$ref": "#/components/schemas/NullableTeamEntityLite"} + "categories": + type: "array" + description: "categories the runbook applies to" + nullable: true + items: + type: "string" + "auto_attach_to_restricted_incidents": + type: "boolean" + nullable: true + "tutorial": + type: "boolean" + nullable: true + description: "RunbookEntity model" + "RunbookStepEntity": + type: "object" + properties: + "name": + type: "string" + nullable: true + "action_id": + type: "string" + nullable: true + "step_id": + type: "string" + nullable: true + "config": + type: "object" + description: "An unstructured object of key/value pairs describing the config settings for the step." + nullable: true + "action_elements": + type: "array" + description: "A list of action elements" + nullable: true + items: + type: "object" + "step_elements": + type: "array" + description: "A list of step elements" + nullable: true + items: + type: "object" + "automatic": + type: "boolean" + nullable: true + "delay_duration": + type: "string" + format: "date-time" + nullable: true + "action": {"$ref": "#/components/schemas/NullableRunbooks_ActionsEntity"} + "reruns": + type: "boolean" + nullable: true + "repeats": + type: "boolean" + nullable: true + "repeats_duration": + type: "string" + format: "date-time" + nullable: true + "votes": {"$ref": "#/components/schemas/NullableVotesEntity"} + "rule": {"$ref": "#/components/schemas/NullableRules_RuleEntity"} + "update_runbook": + type: "object" + properties: + "name": + type: "string" + nullable: true + "summary": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "tutorial": + type: "boolean" + description: "Whether or not this runbook is a tutorial runbook" + nullable: true + "owner": + type: "object" + properties: + "id": + type: "string" + nullable: true + description: "An object representing a Team that owns the runbook" + nullable: true + "severities": + type: "array" + nullable: true + items: + type: "object" + properties: + "id": + type: "string" + nullable: true + "services": + type: "array" + nullable: true + items: + type: "object" + properties: + "id": + type: "string" + nullable: true + "environments": + type: "array" + nullable: true + items: + type: "object" + properties: + "id": + type: "string" + nullable: true + "attachment_rule": + required: + - "logic" + type: "object" + properties: + "logic": + type: "string" + description: "The JSON logic for the attaching the runbook" + "user_data": + type: "string" + description: "The user data for the rule" + nullable: true + nullable: true + "steps": + type: "array" + nullable: true + items: + required: + - "action_id" + - "name" + type: "object" + properties: + "step_id": + type: "string" + description: "ID of step to be updated" + nullable: true + "name": + type: "string" + description: "Name for step" + "action_id": + type: "string" + description: "ID of action to use for this step." + "rule": + required: + - "logic" + type: "object" + properties: + "logic": + type: "string" + description: "The JSON logic for the rule" + "user_data": + type: "string" + description: "The user data for the rule" + nullable: true + nullable: true + "auto_attach_to_restricted_incidents": + type: "boolean" + description: "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`." + nullable: true + description: "Update a runbook and any attachment rules associated with it. This endpoint is used to configure nearly everything\nabout a runbook, including but not limited to the steps, environments, attachment rules, and severities.\n" + "NuncConnectionEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/NuncConnectionEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "NuncConnectionEntityPaginated model" + "NuncConnectionEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "domain": + type: "string" + nullable: true + "company_name": + type: "string" + nullable: true + "company_website": + type: "string" + nullable: true + "cname": + type: "string" + nullable: true + "greeting_title": + type: "string" + nullable: true + "greeting_body": + type: "string" + nullable: true + "operational_message": + type: "string" + nullable: true + "company_tos_url": + type: "string" + nullable: true + "primary_color": + type: "string" + nullable: true + "secondary_color": + type: "string" + nullable: true + "button_background_color": + type: "string" + nullable: true + "button_text_color": + type: "string" + nullable: true + "link_color": + type: "string" + nullable: true + "title": + type: "string" + nullable: true + "exposed_fields": + type: "array" + nullable: true + items: + type: "string" + "conditions": {"$ref": "#/components/schemas/NullableNuncConditionEntity"} + "components": {"$ref": "#/components/schemas/NullableNuncComponentEntity"} + "component_groups": {"$ref": "#/components/schemas/NullableNuncComponentGroupEntity"} + "logo": {"$ref": "#/components/schemas/NullableMediaImageEntity"} + "cover_image": {"$ref": "#/components/schemas/NullableMediaImageEntity"} + "favicon": {"$ref": "#/components/schemas/NullableMediaImageEntity"} + "open_graph_image": {"$ref": "#/components/schemas/NullableMediaImageEntity"} + "dark_logo": {"$ref": "#/components/schemas/NullableMediaImageEntity"} + "enable_histogram": + type: "boolean" + nullable: true + "ui_version": + type: "integer" + format: "int32" + nullable: true + "links": + type: "array" + description: "List of links attached to this status page." + nullable: true + items: {"$ref": "#/components/schemas/LinksEntity"} + description: "NuncConnectionEntity model" + "NuncConditionEntity": + type: "object" + properties: + "nunc_condition": + type: "string" + nullable: true + "condition_name": + type: "string" + nullable: true + "condition_id": + type: "string" + nullable: true + "NuncComponentEntity": + type: "object" + properties: + "infrastructure_type": + type: "string" + nullable: true + "infrastructure_id": + type: "string" + nullable: true + "label": + type: "string" + nullable: true + "position": + type: "integer" + format: "int32" + nullable: true + "component_group_id": + type: "string" + nullable: true + "NuncComponentGroupEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "component_group_id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "position": + type: "integer" + format: "int32" + nullable: true + "MediaImageEntity": + type: "object" + properties: + "original_url": + type: "string" + nullable: true + "versions_urls": + type: "object" + description: "An object with keys that can have different versions of an image" + nullable: true + "NuncEmailSubscribersEntity": + type: "object" + properties: + "id": + type: "string" + description: "UUID of the subscriber" + nullable: true + "email": + type: "string" + description: "Email of the subscriber" + nullable: true + "created_at": + type: "string" + description: "The time the subscriber was created" + format: "date-time" + nullable: true + description: "NuncEmailSubscribersEntity model" + "update_nunc_link": + type: "object" + properties: + "display_text": + type: "string" + nullable: true + "icon_url": + type: "string" + nullable: true + "href_url": + type: "string" + nullable: true + description: "Update a link to be displayed on a FireHydrant status page" + "SavedSearchEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "resource_type": + type: "string" + nullable: true + "user_id": + type: "string" + nullable: true + "is_private": + type: "boolean" + description: "Whether or not this saved search is private" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "filter_values": + type: "object" + description: "An unstructured key/value pair of saved values for searching" + nullable: true + description: "SavedSearchEntity model" + "update_saved_search": + type: "object" + properties: + "is_private": + type: "boolean" + nullable: true + "name": + type: "string" + nullable: true + "filter_values": + type: "object" + additionalProperties: true + nullable: true + description: "Update a specific saved search" + "create_saved_search": + required: + - "filter_values" + - "name" + type: "object" + properties: + "name": + type: "string" + "is_private": + type: "boolean" + nullable: true + "filter_values": + type: "object" + additionalProperties: true + description: "Create a new saved search for a particular resource type" + "Lifecycles_PhaseEntityList": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Lifecycles_PhaseEntity"} + description: "Lifecycles_PhaseEntityList model" + "Lifecycles_PhaseEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "type": + type: "string" + nullable: true + "position": + type: "integer" + format: "int32" + nullable: true + "milestones": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Lifecycles_MilestoneEntity"} + description: "Lifecycles_PhaseEntity model" + "Lifecycles_MilestoneEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "slug": + type: "string" + nullable: true + "auto_assign_timestamp_on_create": + type: "string" + nullable: true + "position": + type: "integer" + format: "int32" + nullable: true + "created_by": {"$ref": "#/components/schemas/NullableAuthorEntity"} + "updated_by": {"$ref": "#/components/schemas/NullableAuthorEntity"} + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "create_priority": + required: + - "slug" + type: "object" + properties: + "slug": + type: "string" + "description": + type: "string" + nullable: true + "default": + type: "boolean" + nullable: true + description: "Create a new priority" + "PriorityEntity": + type: "object" + properties: + "slug": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "position": + type: "integer" + format: "int32" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "default": + type: "boolean" + nullable: true + description: "PriorityEntity model" + "update_priority": + type: "object" + properties: + "slug": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "default": + type: "boolean" + nullable: true + description: "Update a specific priority" + "create_severity": + required: + - "slug" + type: "object" + properties: + "slug": + type: "string" + "description": + type: "string" + nullable: true + "position": + type: "integer" + format: "int32" + nullable: true + "color": + type: "string" + nullable: true + enum: + - "red" + - "orange" + - "yellow" + - "blue" + - "teal" + - "grey" + - "green" + description: "Create a new severity" + "SeverityEntity": + type: "object" + properties: + "slug": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "type": + type: "string" + nullable: true + "position": + type: "integer" + format: "int32" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "system_record": + type: "boolean" + nullable: true + "color": + type: "string" + nullable: true + description: "SeverityEntity model" + "SeverityEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/SeverityEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "SeverityEntityPaginated model" + "update_severity": + type: "object" + properties: + "slug": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "position": + type: "integer" + format: "int32" + nullable: true + "color": + type: "string" + nullable: true + enum: + - "red" + - "orange" + - "yellow" + - "blue" + - "teal" + - "grey" + - "green" + description: "Update a specific severity" + "update_severity_matrix": + required: + - "data" + type: "object" + properties: + "summary": + type: "string" + nullable: true + "data": + type: "array" + items: + required: + - "condition_id" + - "impact_id" + - "severity" + type: "object" + properties: + "severity": + type: "string" + description: "Slug of a severity" + "impact_id": + type: "string" + description: "Impact id" + "condition_id": + type: "string" + description: "Condition id" + description: "Update available severities and impacts in your organization's severity matrix." + "SeverityMatrix_SeverityMatrixEntity": + type: "object" + properties: + "matrix": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/SeverityMatrix_ItemEntity"} + "impacts": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/SeverityMatrix_ImpactEntity"} + "conditions": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/SeverityMatrix_ConditionEntity"} + description: "SeverityMatrix_SeverityMatrixEntity model" + "SeverityMatrix_ItemEntity": + type: "object" + properties: + "severity": + type: "string" + nullable: true + "condition_id": + type: "string" + nullable: true + "impact_id": + type: "string" + nullable: true + "impact_type": + type: "string" + nullable: true + "create_severity_matrix_condition": + required: + - "name" + type: "object" + properties: + "name": + type: "string" + "position": + type: "integer" + description: "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" + format: "int32" + nullable: true + description: "Create a new condition" + "update_severity_matrix_condition": + type: "object" + properties: + "name": + type: "string" + nullable: true + "position": + type: "integer" + description: "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" + format: "int32" + nullable: true + description: "Update a severity matrix condition" + "create_severity_matrix_impact": + required: + - "affects_id" + - "affects_type" + type: "object" + properties: + "affects_type": + type: "string" + "affects_id": + type: "string" + "position": + type: "integer" + format: "int32" + nullable: true + description: "Create a new impact" + "update_severity_matrix_impact": + type: "object" + properties: + "name": + type: "string" + nullable: true + "position": + type: "integer" + format: "int32" + nullable: true + description: "Update a severity matrix impact" + "create_scheduled_maintenance": + required: + - "ends_at" + - "name" + - "starts_at" + type: "object" + properties: + "name": + type: "string" + "starts_at": + type: "string" + description: "ISO8601 timestamp for the start time of the scheduled maintenance" + format: "date-time" + "ends_at": + type: "string" + description: "ISO8601 timestamp for the end time of the scheduled maintenance" + format: "date-time" + "summary": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "labels": + type: "object" + additionalProperties: + type: "string" + description: "A json object of label keys and values" + nullable: true + "status_pages": + type: "array" + description: "An array of status pages to display this maintenance on" + nullable: true + items: + required: + - "connection_id" + type: "object" + properties: + "integration_slug": + type: "string" + description: "The slug identifying the type of status page" + nullable: true + "connection_id": + type: "string" + description: "The UUID of the status page to display this maintenance on" + "impacts": + type: "array" + description: "An array of impact/condition combinations" + nullable: true + items: + required: + - "condition_id" + - "id" + - "type" + type: "object" + properties: + "type": + type: "string" + description: "The type of impact" + "id": + type: "string" + description: "The id of impact" + "condition_id": + type: "string" + description: "The id of the condition" + description: "Create a new scheduled maintenance event" + "ScheduledMaintenanceEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "summary": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "starts_at": + type: "string" + format: "date-time" + nullable: true + "ends_at": + type: "string" + format: "date-time" + nullable: true + "incident": {"$ref": "#/components/schemas/NullableIncidentEntity"} + "status_pages": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/ScheduledMaintenancesStatusPageEntity"} + "impacts": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/ScheduledMaintenancesImpactEntity"} + "labels": + type: "object" + description: "An object of label key and values" + nullable: true + description: "ScheduledMaintenanceEntity model" + "ScheduledMaintenancesStatusPageEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "integration_id": + type: "string" + nullable: true + "integration_slug": + type: "string" + nullable: true + "integration_name": + type: "string" + nullable: true + "ScheduledMaintenancesImpactEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "type": + type: "string" + nullable: true + "impact": {"$ref": "#/components/schemas/NullableSuccinctEntity"} + "condition": {"$ref": "#/components/schemas/NullableSeverityMatrix_ConditionEntity"} + "update_scheduled_maintenance": + type: "object" + properties: + "name": + type: "string" + nullable: true + "summary": + type: "string" + nullable: true + "starts_at": + type: "string" + description: "ISO8601 timestamp for the start time of the scheduled maintenance" + format: "date-time" + nullable: true + "ends_at": + type: "string" + description: "ISO8601 timestamp for the end time of the scheduled maintenance" + format: "date-time" + nullable: true + "description": + type: "string" + nullable: true + "labels": + type: "object" + additionalProperties: + type: "string" + description: "A json object of label keys and values" + nullable: true + "status_pages": + type: "array" + description: "An array of status pages to display this maintenance on" + nullable: true + items: + required: + - "connection_id" + type: "object" + properties: + "integration_slug": + type: "string" + description: "The slug identifying the type of status page" + nullable: true + "connection_id": + type: "string" + description: "The UUID of the status page to display this maintenance on" + "impacts": + type: "array" + description: "An array of impact/condition combinations" + nullable: true + items: + required: + - "condition_id" + - "id" + - "type" + type: "object" + properties: + "type": + type: "string" + description: "The type of impact" + "id": + type: "string" + description: "The id of impact" + "condition_id": + type: "string" + description: "The id of the condition" + description: "Change the conditions of a scheduled maintenance event, including updating any status page announcements of changes." + "ScheduleEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/ScheduleEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "ScheduleEntityPaginated model" + "InfrastructureSearchEntity": + type: "object" + properties: + "type": + type: "string" + nullable: true + "infrastructure": + type: "string" + nullable: true + description: "InfrastructureSearchEntity model" + "Nunc_NuncSubscription": + type: "object" + properties: + "response": + type: "string" + nullable: true + description: "Nunc_NuncSubscription model" + "create_nunc_subscription": + required: + - "email" + type: "object" + properties: + "email": + type: "string" + description: "Subscribe to status page updates" + "create_status_update_template": + required: + - "body" + - "name" + type: "object" + properties: + "name": + type: "string" + "body": + type: "string" + description: "Create a status update template for your organization" + "StatusUpdateTemplateEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "body": + type: "string" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "discarded_at": + type: "string" + format: "date-time" + nullable: true + description: "StatusUpdateTemplateEntity model" + "update_status_update_template": + type: "object" + properties: + "name": + type: "string" + nullable: true + "body": + type: "string" + nullable: true + description: "Update a single status update template" + "Organizations_CustomFieldDefinitionEntity": + type: "object" + properties: + "display_name": + type: "string" + nullable: true + "field_id": + type: "string" + nullable: true + "field_type": + type: "string" + nullable: true + "slug": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "required": + type: "boolean" + nullable: true + "required_at_milestone_id": + type: "string" + description: "The milestone at which this field is required, if `required` is set to `true`. When null, a required field is always required." + nullable: true + "permissible_values": + type: "array" + nullable: true + items: + type: "string" + description: "Organizations_CustomFieldDefinitionEntity model" + "update_custom_field_definition": + type: "object" + properties: + "description": + type: "string" + nullable: true + "display_name": + type: "string" + nullable: true + "permissible_values": + type: "array" + nullable: true + items: + type: "string" + "required": + type: "boolean" + nullable: true + "required_at_milestone_id": + type: "string" + description: "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." + nullable: true + description: "Update a single custom field definition" + "create_custom_field_definition": + required: + - "display_name" + - "field_type" + - "required" + type: "object" + properties: + "display_name": + type: "string" + "description": + type: "string" + nullable: true + "field_type": + type: "string" + "permissible_values": + type: "array" + nullable: true + items: + type: "string" + "required": + type: "boolean" + "required_at_milestone_id": + type: "string" + description: "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." + nullable: true + description: "Create a new custom field definition" + "create_post_mortem_report": + required: + - "incident_id" + type: "object" + properties: + "incident_id": + type: "string" + description: "Create a report" + "PostMortems_PostMortemReportEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "summary": + type: "string" + nullable: true + "incident_id": + type: "string" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "tag_list": + type: "array" + nullable: true + items: + type: "string" + "additional_details": + type: "array" + nullable: true + items: + type: "string" + "incident": {"$ref": "#/components/schemas/NullableIncidentEntity"} + "questions": {"$ref": "#/components/schemas/NullablePostMortems_QuestionEntity"} + "calendar_events": {"$ref": "#/components/schemas/NullableCalendars_EventEntity"} + "retrospective_shim": + type: "boolean" + nullable: true + "retrospective_id": + type: "string" + nullable: true + "retrospective_note": + type: "string" + nullable: true + description: "PostMortems_PostMortemReportEntity model" + "PostMortems_QuestionEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "title": + type: "string" + nullable: true + "body": + type: "string" + nullable: true + "tooltip": + type: "string" + nullable: true + "kind": + type: "string" + nullable: true + "question_type_id": + type: "string" + nullable: true + "is_required": + type: "boolean" + nullable: true + "available_options": + type: "array" + nullable: true + items: + type: "string" + "conversations": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Conversations_API_Entities_Reference"} + "Calendars_EventEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "summary": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "starts_at": + type: "string" + nullable: true + "ends_at": + type: "string" + nullable: true + "created_at": + type: "string" + nullable: true + "updated_at": + type: "string" + nullable: true + "provider_url": + type: "string" + nullable: true + "provider_icon_url": + type: "string" + nullable: true + "PostMortems_PostMortemReportEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/PostMortems_PostMortemReportEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "PostMortems_PostMortemReportEntityPaginated model" + "update_post_mortem_report": + type: "object" + properties: + "name": + type: "string" + nullable: true + "summary": + type: "string" + nullable: true + "additional_details": + type: "string" + nullable: true + "questions": + type: "array" + nullable: true + items: + type: "object" + properties: + "id": + type: "string" + description: "ID of a question" + nullable: true + "body": + type: "string" + description: "Answer to question" + nullable: true + description: "Update a report" + "create_post_mortem_reason": + required: + - "summary" + type: "object" + properties: + "summary": + type: "string" + description: "Add a new contributing factor to an incident" + "PostMortems_ReasonEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "summary": + type: "string" + nullable: true + "position": + type: "integer" + format: "int32" + nullable: true + "created_by": {"$ref": "#/components/schemas/NullableAuthorEntity"} + "conversations": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Conversations_API_Entities_Reference"} + description: "PostMortems_ReasonEntity model" + "PostMortems_ReasonEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/PostMortems_ReasonEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "PostMortems_ReasonEntityPaginated model" + "update_post_mortem_reason": + type: "object" + properties: + "summary": + type: "string" + nullable: true + description: "Update a contributing factor" + "reorder_post_mortem_reasons": + required: + - "new_position" + - "old_position" + type: "object" + properties: + "old_position": + type: "integer" + format: "int32" + "new_position": + type: "integer" + format: "int32" + description: "Update the order of contributing factors in a retrospective report" + "publish_post_mortem_report": + type: "object" + properties: + "publish": + type: "string" + nullable: true + enum: + - "true" + "user_ids": + type: "array" + description: "An array of user IDs with whom to share the report" + nullable: true + items: + type: "string" + "team_ids": + type: "array" + description: "An array of team IDs with whom to share the report" + nullable: true + items: + type: "string" + description: "Marks an incident retrospective as published and emails all of the participants in the report the summary" + "update_post_mortem_field": + required: + - "value" + type: "object" + properties: + "value": + type: "string" + description: "Update a field value on a post mortem report" + "PostMortems_SectionFieldEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "value": + type: "string" + nullable: true + description: "PostMortems_SectionFieldEntity model" + "update_post_mortem_questions": + type: "object" + properties: + "_make_swagger_work_": + type: "string" + nullable: true + "questions": + type: "array" + nullable: true + items: + type: "object" + properties: + "id": + type: "string" + description: "ID of a question" + nullable: true + "title": + type: "string" + description: "title of a question" + nullable: true + "tooltip": + type: "string" + description: "tooltip of a question" + nullable: true + description: "Update the questions configured to be provided and filled out on future retrospective reports." + "PostMortems_QuestionTypeEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "title": + type: "string" + nullable: true + "tooltip": + type: "string" + nullable: true + "kind": + type: "string" + nullable: true + "is_required": + type: "boolean" + nullable: true + "available_options": + type: "array" + nullable: true + items: + type: "string" + description: "PostMortems_QuestionTypeEntity model" + "PostMortems_QuestionTypeEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/PostMortems_QuestionTypeEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "PostMortems_QuestionTypeEntityPaginated model" + "Retrospectives_TemplateEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "is_default": + type: "boolean" + nullable: true + "sections": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Retrospectives_TemplateEntity_IncidentSectionEntity"} + "fields": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Retrospectives_FieldEntity"} + description: "Retrospectives_TemplateEntity model" + "Retrospectives_TemplateEntity_IncidentSectionEntity": + type: "object" + properties: + "slug": + type: "string" + nullable: true + "elements": + type: "array" + nullable: true + items: + type: "string" + "Retrospectives_FieldEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "label": + type: "string" + nullable: true + "type": + type: "string" + nullable: true + enum: + - "text" + - "single_select" + - "multi_select" + - "numeric" + - "datetime" + - "dynamic_input_group" + - "markdown" + - "markdown_text" + "help_text": + type: "string" + nullable: true + "permissible_values": + type: "array" + nullable: true + items: + type: "string" + "is_required": + type: "boolean" + nullable: true + "schema": + type: "array" + nullable: true + items: + type: "string" + "Retrospectives_IndexTemplateEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Retrospectives_IndexTemplateEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "Retrospectives_IndexTemplateEntityPaginated model" + "Retrospectives_IndexTemplateEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "is_default": + type: "boolean" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "Alerts_AlertEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Alerts_AlertEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "Alerts_AlertEntityPaginated model" + "Alerts_ProcessingLogEntryEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Alerts_ProcessingLogEntryEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "Alerts_ProcessingLogEntryEntityPaginated model" + "Alerts_ProcessingLogEntryEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "context": + type: "object" + description: "An unstructured representation of this log entry's context." + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "level": + type: "string" + nullable: true + enum: + - "unknown" + - "debug" + - "info" + - "warn" + - "error" + - "fatal" + "message": + type: "string" + nullable: true + "message_type": + type: "string" + nullable: true + enum: + - "i18n_key" + - "custom" + "create_ticket": + required: + - "summary" + type: "object" + properties: + "summary": + type: "string" + "related_to": + type: "string" + description: "Which incident this ticket is related to, in the format of 'incident/UUID'" + nullable: true + "project_id": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "state": + type: "string" + nullable: true + "type": + type: "string" + nullable: true + "priority_id": + type: "string" + nullable: true + "tag_list": + type: "array" + description: "List of tags for the ticket" + nullable: true + items: + type: "string" + "remote_url": + type: "string" + description: "The remote URL for an existing ticket in a supported and configured ticketing integration" + nullable: true + description: "Creates a ticket for a project" + "update_ticket": + type: "object" + properties: + "summary": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "state": + type: "string" + nullable: true + "type": + type: "string" + nullable: true + "priority_id": + type: "string" + nullable: true + "tag_list": + type: "array" + description: "List of tags for the ticket" + nullable: true + items: + type: "string" + description: "Update a ticket's attributes" + "Ticketing_Projects_ProjectListItemEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "config": {"$ref": "#/components/schemas/NullableTicketing_ProjectConfigEntity"} + "field_map": {"$ref": "#/components/schemas/NullableTicketing_ProjectFieldMapEntity"} + "updated_at": + type: "string" + format: "date-time" + nullable: true + "connection_slug": + type: "string" + nullable: true + description: "Ticketing_Projects_ProjectListItemEntity model" + "Ticketing_ProjectConfigEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "connection_id": + type: "string" + nullable: true + "connection_type": + type: "string" + nullable: true + "ticketing_project_id": + type: "string" + nullable: true + "ticketing_project_name": + type: "string" + nullable: true + "details": + type: "object" + description: "A config object containing details about the project config. Can be one of: Ticketing::JiraCloud::ProjectConfigEntity, Ticketing::JiraOnprem::ProjectConfigEntity, or Ticketing::Shortcut::ProjectConfigEntity" + nullable: true + description: "Ticketing_ProjectConfigEntity model" + "Ticketing_ProjectFieldMapEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "connection_id": + type: "string" + nullable: true + "connection_type": + type: "string" + nullable: true + "ticketing_project_id": + type: "string" + nullable: true + "body": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Ticketing_ProjectFieldMapBodyEntity"} + description: "Ticketing_ProjectFieldMapEntity model" + "Ticketing_ProjectFieldMapBodyEntity": + type: "object" + properties: + "strategy": + type: "string" + nullable: true + enum: + - "basic" + - "logic" + "external_field": + type: "string" + nullable: true + "external_value": {"$ref": "#/components/schemas/NullableTicketing_ProjectFieldMapExternalValueEntity"} + "user_data": + type: "object" + nullable: true + "cases": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Ticketing_ProjectFieldMapCasesEntity"} + "else": {"$ref": "#/components/schemas/NullableTicketing_ProjectFieldMapCasesElseEntity"} + "Ticketing_ProjectFieldMapExternalValueEntity": + type: "object" + properties: + "type": + type: "string" + nullable: true + enum: + - "literal" + - "fh-attribute" + - "fh-type" + "value": + type: "string" + nullable: true + "attribute": + type: "string" + nullable: true + "presentation": + type: "string" + nullable: true + "Ticketing_ProjectFieldMapCasesEntity": + type: "object" + properties: + "logic": + type: "object" + description: "An unstructured object of key/value pairs describing the logic for applying the rule." + nullable: true + "external_value": {"$ref": "#/components/schemas/NullableTicketing_ProjectFieldMapExternalValueEntity"} + "Ticketing_ProjectFieldMapCasesElseEntity": + type: "object" + properties: + "external_value": {"$ref": "#/components/schemas/NullableTicketing_ProjectFieldMapExternalValueEntity"} + "Ticketing_FieldMaps_MappableFieldEntity": + type: "object" + properties: + "value": + type: "string" + description: "The ID of the field" + nullable: true + "label": + type: "string" + description: "The human-readable name of the field" + nullable: true + "type": + type: "string" + description: "The allowed type of the field" + nullable: true + "allowed_values": + type: "array" + description: "The allowed values of the field" + nullable: true + items: + type: "string" + "required": + type: "string" + description: "If the field is required to be mapped" + nullable: true + description: "Ticketing_FieldMaps_MappableFieldEntity model" + "Ticketing_ProjectInboundMappableFieldEntity": + type: "object" + properties: + "value": + type: "string" + description: "The ID of the field" + nullable: true + "label": + type: "string" + description: "The human-readable name of the field" + nullable: true + description: "Ticketing_ProjectInboundMappableFieldEntity model" + "Ticketing_ProjectInboundFieldMapEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "connection_id": + type: "string" + nullable: true + "connection_type": + type: "string" + nullable: true + "ticketing_project_id": + type: "string" + nullable: true + "external_field_name": + type: "string" + nullable: true + "internal_field_name": + type: "string" + nullable: true + "ticket_type": + type: "string" + nullable: true + enum: + - "incident" + - "task" + - "follow_up" + description: "Ticketing_ProjectInboundFieldMapEntity model" + "create_ticketing_priority": + required: + - "name" + type: "object" + properties: + "name": + type: "string" + "position": + type: "integer" + description: "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." + format: "int32" + nullable: true + description: "Create a single ticketing priority" + "update_ticketing_priority": + type: "object" + properties: + "name": + type: "string" + nullable: true + "position": + type: "integer" + description: "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." + format: "int32" + nullable: true + description: "Update a single ticketing priority's attributes" + "create_task_list": + required: + - "name" + - "task_list_items" + type: "object" + properties: + "name": + type: "string" + "description": + type: "string" + nullable: true + "task_list_items": + type: "array" + items: + required: + - "summary" + type: "object" + properties: + "summary": + type: "string" + description: "A summary of the task" + "description": + type: "string" + description: "A long-form description for the task if additional context is helpful" + nullable: true + description: "Creates a new task list" + "TaskListEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "created_by": {"$ref": "#/components/schemas/NullableAuthorEntity"} + "task_list_items": {"$ref": "#/components/schemas/NullableTaskListItemEntity"} + description: "TaskListEntity model" + "TaskListItemEntity": + type: "object" + properties: + "summary": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "update_task_list": + type: "object" + properties: + "name": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "task_list_items": + type: "array" + nullable: true + items: + required: + - "summary" + type: "object" + properties: + "summary": + type: "string" + description: "A summary of the task" + "description": + type: "string" + description: "A long-form description for the task if additional context is helpful" + nullable: true + description: "Updates a task list's attributes and task list items" + "update_scim_group": + required: + - "displayName" + - "members" + type: "object" + properties: + "displayName": + type: "string" + description: "The name of the team being updated" + "members": + type: "array" + items: + required: + - "value" + type: "object" + properties: + "value": + type: "string" + description: "String that represents the user's UUID to assign to the team" + description: "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." + "create_scim_group": + required: + - "displayName" + - "members" + type: "object" + properties: + "displayName": + type: "string" + description: "The name of the team being created" + "members": + type: "array" + items: + required: + - "value" + type: "object" + properties: + "value": + type: "string" + description: "String that represents the user's UUID to assign to the team" + description: "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." + "patch_scim_user": + required: + - "Operations" + type: "object" + properties: + "trail": + type: "string" + description: "An optional trail to log the request" + nullable: true + "Operations": + type: "array" + description: "An array of operations to perform on the user" + items: + required: + - "op" + - "path" + type: "object" + properties: + "op": + type: "string" + description: "The operation to perform on the user. Options are add, remove, replace" + "path": + type: "string" + description: "The path to the attribute to be modified" + description: "PATCH SCIM endpoint to update a User. This endpoint is used to update a resource's attributes." + "update_scim_user": + type: "object" + properties: + "userName": + type: "string" + description: "A service provider's unique identifier for the user" + nullable: true + "name": + required: + - "familyName" + - "givenName" + type: "object" + properties: + "givenName": + type: "string" + description: "The family name of the User, or last name in most Western languages" + "familyName": + type: "string" + description: "The given name of the User, or first name in most Western languages" + description: "The components of the user's name" + nullable: true + "emails": + type: "array" + description: "Email addresses for the User" + nullable: true + items: + required: + - "value" + type: "object" + properties: + "value": + type: "string" + description: "String that represents an email address for the User" + "primary": + type: "boolean" + description: "Boolean which signifies if an email is intended as the primary email for the User" + nullable: true + "roles": + type: "object" + description: "Roles for the User. Options are owner, member, collaborator, or viewer. Roles may be specified as strings or SCIM role objects." + nullable: true + "active": + type: "boolean" + description: "Boolean that represents whether user is active" + nullable: true + description: "PUT SCIM endpoint to update a User. This endpoint is used to replace a resource's attributes." + "create_scim_user": + required: + - "emails" + - "name" + - "userName" + type: "object" + properties: + "userName": + type: "string" + description: "A service provider's unique identifier for the user" + "name": + required: + - "familyName" + - "givenName" + type: "object" + properties: + "familyName": + type: "string" + description: "The family name of the User, or last name in most Western languages" + "givenName": + type: "string" + description: "The given name of the User, or first name in most Western languages" + description: "The components of the user's name" + "emails": + type: "array" + description: "Email addresses for the User" + items: + required: + - "primary" + - "value" + type: "object" + properties: + "value": + type: "string" + description: "String that represents an email address for the User" + "primary": + type: "boolean" + description: "Boolean which signifies if an email is intended as the primary email for the User" + "roles": + type: "object" + description: "Roles for the User. Options are owner, member, collaborator, or viewer. Roles may be specified as strings or SCIM role objects." + nullable: true + "password": + type: "string" + description: "This attribute is intended to be used as a means to set, replace, or compare (i.e., filter for equality) a password" + nullable: true + description: "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." + "ingest_catalog_data": + required: + - "data" + - "encoding" + type: "object" + properties: + "encoding": + type: "string" + description: "Encoding for submitted data" + enum: + - "text/yaml" + - "application/x-yaml" + - "application/json" + "data": + type: "string" + description: "Service data" + description: "Accepts catalog data in the configured format and asyncronously processes the data to incorporate changes into service catalog." + "Imports_ImportEntity": + type: "object" + properties: + "state": + type: "string" + nullable: true + enum: + - "preprocessing" + - "ready_for_import" + - "importing" + - "completed" + - "failed" + "updated_at": + type: "string" + format: "date-time" + nullable: true + description: "Imports_ImportEntity model" + "create_checklist_template": + required: + - "checks" + - "name" + type: "object" + properties: + "name": + type: "string" + "checks": + type: "array" + description: "An array of checks for the checklist template" + items: + required: + - "name" + type: "object" + properties: + "name": + type: "string" + description: "The name of the check" + "description": + type: "string" + description: "The description of the check" + nullable: true + "description": + type: "string" + nullable: true + "team_id": + type: "string" + description: "The ID of the Team that owns the checklist template" + nullable: true + "connected_services": + type: "array" + description: "Array of service IDs to attach checklist template to" + nullable: true + items: + required: + - "id" + type: "object" + properties: + "id": + type: "string" + description: "Creates a checklist template for the organization" + "ChecklistTemplateEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/ChecklistTemplateEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "ChecklistTemplateEntityPaginated model" + "update_checklist_template": + type: "object" + properties: + "name": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "checks": + type: "array" + description: "An array of checks for the checklist template" + nullable: true + items: + required: + - "name" + type: "object" + properties: + "id": + type: "string" + description: "Specify the check ID when updating an already existing check" + nullable: true + "description": + type: "string" + description: "The description of the check" + nullable: true + "name": + type: "string" + description: "The name of the check" + "team_id": + type: "string" + description: "The ID of the Team that owns the checklist template" + nullable: true + "connected_services": + type: "array" + description: "Array of service IDs to attach checklist template to" + nullable: true + items: + required: + - "id" + type: "object" + properties: + "id": + type: "string" + "remove": + type: "boolean" + description: "Set to `true` to remove checklist from service" + nullable: true + "remove_remaining_connected_services": + type: "boolean" + description: "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" + nullable: true + description: "Update a checklist templates attributes" + "PublicAPI_V1_BootstrapEntity": + type: "object" + properties: + "posthog_write_key": + type: "string" + nullable: true + description: "PublicAPI_V1_BootstrapEntity model" + "PublicAPI_V1_FormConfigurations_SelectedValueEntity": + type: "object" + properties: + "template": + type: "object" + description: "The template for the selected value" + nullable: true + description: "PublicAPI_V1_FormConfigurations_SelectedValueEntity model" + "FormConfigurationEntity": + type: "object" + properties: + "fields": + type: "string" + nullable: true + "show_incident_types": + type: "string" + nullable: true + description: "FormConfigurationEntity model" + "create_comment_reaction": + required: + - "reaction" + type: "object" + properties: + "reaction": + type: "string" + description: "CLDR short name of Unicode emojis" + description: "Create a reaction on a comment" + "update_comment": + type: "object" + properties: + "body": + type: "string" + description: "Text body of comment" + nullable: true + description: "Update a comment's attributes" + "create_comment": + required: + - "body" + type: "object" + properties: + "body": + type: "string" + description: "Text body of comment" + description: "Creates a comment for a project" + "Signals_API_Analytics_TimeseriesPointEntity": + type: "object" + properties: + "data": {"$ref": "#/components/schemas/NullableSignals_API_Analytics_TimeseriesPointEntity_MetricEntity"} + description: "Signals_API_Analytics_TimeseriesPointEntity model" + "Signals_API_Analytics_TimeseriesPointEntity_MetricEntity": + type: "object" + properties: + "bucket": + type: "string" + description: "The time bucket" + nullable: true + "total_opened_alerts": + type: "integer" + description: "The total number of opened alerts" + format: "int32" + nullable: true + "total_acked_alerts": + type: "integer" + description: "The total number of acknowledged alerts" + format: "int32" + nullable: true + "total_incidents": + type: "integer" + description: "The total number of incidents" + format: "int32" + nullable: true + "Signals_API_Analytics_GroupedMetricsEntity": + type: "object" + properties: + "data": {"$ref": "#/components/schemas/NullableSignals_API_Analytics_GroupedMetricsEntity_MetricEntity"} + description: "Signals_API_Analytics_GroupedMetricsEntity model" + "Signals_API_Analytics_GroupedMetricsEntity_MetricEntity": + type: "object" + properties: + "grouped_id": + type: "integer" + description: "The ID of the group" + format: "int32" + nullable: true + "grouped_name": + type: "string" + description: "The name of the group" + nullable: true + "total_opened_alerts": + type: "integer" + description: "The total number of opened alerts" + format: "int32" + nullable: true + "total_acked_alerts": + type: "integer" + description: "The total number of acknowledged alerts" + format: "int32" + nullable: true + "total_incidents": + type: "integer" + description: "The total number of incidents" + format: "int32" + nullable: true + "acked_percentage": + type: "number" + description: "The percentage of acknowledged alerts" + format: "float" + nullable: true + "incidents_percentage": + type: "number" + description: "The percentage of alerts that have incidents" + format: "float" + nullable: true + "Signals_API_Analytics_MttxMetricsEntity": + type: "object" + properties: + "data": {"$ref": "#/components/schemas/NullableSignals_API_Analytics_MttxMetricsEntity_MetricEntity"} + description: "Signals_API_Analytics_MttxMetricsEntity model" + "Signals_API_Analytics_MttxMetricsEntity_MetricEntity": + type: "object" + properties: + "mtta": + type: "number" + description: "The mean time to acknowledge (MTTA) alerts in seconds" + format: "float" + nullable: true + "mttr": + type: "number" + description: "The mean time to resolve (MTTR) alerts in seconds" + format: "float" + nullable: true + "update_call_route": + type: "object" + properties: + "name": + type: "string" + description: "Name of the call route" + nullable: true + "routing_mode": + type: "string" + description: "Routing mode for the call route" + nullable: true + enum: + - "ROUTING_MODE_TAKE_MESSAGE" + - "ROUTING_MODE_DIRECT_CONNECT" + "connect_mode": + type: "string" + description: "Connect mode for the call route" + nullable: true + enum: + - "CONNECT_MODE_CONFERENCE" + - "CONNECT_MODE_DIRECT_DIAL" + "description": + type: "string" + description: "Description of the call route" + nullable: true + "greeting_message": + type: "string" + description: "Greeting message for the call route" + nullable: true + "steps": + type: "array" + description: "Steps for the call route" + nullable: true + items: + required: + - "target_id" + - "target_type" + - "timeout" + type: "object" + properties: + "target_type": + type: "string" + description: "Type of target" + enum: + - "User" + - "OnCallSchedule" + "target_id": + type: "string" + description: "ID of the target" + "timeout": + type: "string" + description: "Timeout in seconds for the step" + "target": + required: + - "id" + - "type" + type: "object" + properties: + "type": + type: "string" + description: "Type of target" + enum: + - "EscalationPolicy" + - "OnCallSchedule" + - "User" + - "Webhook" + - "SlackChannel" + - "MicrosoftTeamsChannel" + "id": + type: "string" + description: "ID of the target" + description: "Target for the call route (required unless connect_mode is direct_dial)" + nullable: true + description: "Update a call route by ID" + "create_signals_event_source": + required: + - "example_payload" + - "javascript" + - "name" + - "slug" + type: "object" + properties: + "name": + type: "string" + description: "Name of the transposer" + "description": + type: "string" + description: "Description of the transposer" + nullable: true + "slug": + type: "string" + description: "Slug of the transposer" + "example_payload": + type: "object" + properties: + "headers": + type: "object" + description: "Hash of HTTP headers with values as Array, e.g. { 'Content-Type' => ['application/json'] }" + nullable: true + "data": + type: "object" + description: "JSON body of request." + nullable: true + description: "Example payload as input to transpose function" + "javascript": + type: "string" + description: "Javascript code to convert payload into Signal object" + description: "Create a Signals event source for the authenticated user." + "Signals_API_TransposerEntity": + type: "object" + properties: + "name": + type: "string" + nullable: true + "slug": + type: "string" + nullable: true + "example_payload": + type: "object" + nullable: true + "expression": + type: "string" + nullable: true + "expected": + type: "string" + nullable: true + "website": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "tags": + type: "array" + nullable: true + items: + type: "string" + "ingest_url": + type: "string" + nullable: true + "editable": + type: "boolean" + nullable: true + "created_by": {"$ref": "#/components/schemas/NullableAuthorEntity"} + "updated_by": {"$ref": "#/components/schemas/NullableAuthorEntity"} + description: "Signals_API_TransposerEntity model" + "Signals_API_TransposerListEntity": + type: "object" + properties: + "data": {"$ref": "#/components/schemas/NullableSignals_API_TransposerEntity"} + description: "Signals_API_TransposerListEntity model" + "create_signals_alert_grouping_configuration": + required: + - "reference_alert_time_period" + - "strategy" + type: "object" + properties: + "strategy": + type: "object" + properties: + "substring": + required: + - "field_name" + - "value" + type: "object" + properties: + "field_name": + type: "string" + description: "The field to use for grouping alerts" + enum: + - "summary" + - "body" + - "tags" + "value": + type: "string" + description: "The value to use for grouping alerts" + description: "The type of strategy to use for grouping alerts" + nullable: true + description: "The strategy to use for grouping alerts" + "action": + type: "object" + properties: + "link": + type: "boolean" + description: "Link the alerts and do not notify anyone" + nullable: true + "fyi": + required: + - "slack_channel_ids" + type: "object" + properties: + "slack_channel_ids": + type: "array" + description: "The slack channel ids to send the notification to" + items: + type: "string" + description: "Send FYI notification" + nullable: true + description: "The action to take when grouping alerts" + nullable: true + "reference_alert_time_period": + type: "string" + description: "How long to group alerts for" + description: "Create a Signals alert grouping rule for the organization." + "Signals_API_GroupingEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "strategy": {"$ref": "#/components/schemas/NullableSignals_API_GroupingEntity_StrategyEntity"} + "action": {"$ref": "#/components/schemas/NullableSignals_API_GroupingEntity_ActionEntity"} + "reference_alert_time_period": + type: "string" + nullable: true + description: "Signals_API_GroupingEntity model" + "Signals_API_GroupingEntity_StrategyEntity": + type: "object" + properties: + "substring": {"$ref": "#/components/schemas/NullableSignals_API_GroupingEntity_StrategyEntity_SubstringEntity"} + "Signals_API_GroupingEntity_StrategyEntity_SubstringEntity": + type: "object" + properties: + "field_name": + type: "string" + nullable: true + "value": + type: "string" + nullable: true + "Signals_API_GroupingEntity_ActionEntity": + type: "object" + properties: + "link": + type: "boolean" + nullable: true + "fyi": {"$ref": "#/components/schemas/NullableSignals_API_GroupingEntity_ActionEntity_FyiEntity"} + "Signals_API_GroupingEntity_ActionEntity_FyiEntity": + type: "object" + properties: + "slack_channels": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Integrations_Slack_SlackChannelEntity"} + "Signals_API_GroupingEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Signals_API_GroupingEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "Signals_API_GroupingEntityPaginated model" + "update_signals_alert_grouping_configuration": + type: "object" + properties: + "strategy": + type: "object" + properties: + "substring": + required: + - "field_name" + - "value" + type: "object" + properties: + "field_name": + type: "string" + description: "The field to use for grouping alerts" + enum: + - "summary" + - "body" + - "tags" + "value": + type: "string" + description: "The value to use for grouping alerts" + description: "The type of strategy to use for grouping alerts" + nullable: true + description: "The strategy to use for grouping alerts" + nullable: true + "action": + type: "object" + properties: + "link": + type: "boolean" + description: "Link the alerts and do not notify anyone" + nullable: true + "fyi": + required: + - "slack_channel_ids" + type: "object" + properties: + "slack_channel_ids": + type: "array" + description: "The slack channel ids to send the notification to" + items: + type: "string" + description: "Send FYI notification" + nullable: true + description: "The action to take when grouping alerts" + nullable: true + "reference_alert_time_period": + type: "string" + description: "How long to group alerts for" + nullable: true + description: "Update a Signals alert grouping rule for the organization." + "create_signals_email_target": + required: + - "name" + type: "object" + properties: + "name": + type: "string" + description: "The email target's name." + "slug": + type: "string" + description: "The email address that will be listening to events." + nullable: true + "description": + type: "string" + description: "A detailed description of the email target." + nullable: true + "target": + required: + - "id" + - "type" + type: "object" + properties: + "type": + type: "string" + description: "The type of target that the inbound email will notify when matched." + enum: + - "Team" + - "EntireTeam" + - "EscalationPolicy" + - "OnCallSchedule" + - "User" + - "SlackChannel" + - "MicrosoftTeamsChannel" + - "Webhook" + "id": + type: "string" + description: "The ID of the target that the inbound email will notify when matched." + description: "The target that the email target will notify. This object must contain a `type`\nfield that specifies the type of target and an `id` field that specifies the ID of\nthe target. The `type` field must be one of \"escalation_policy\", \"on_call_schedule\",\n\"team\", \"user\", or \"slack_channel\".\n" + nullable: true + "allowed_senders": + type: "array" + description: "A list of email addresses that are allowed to send events to the target. Must be exact match." + nullable: true + items: + type: "string" + "rules": + type: "array" + description: "A list of CEL expressions that should be evaluated and matched to determine if the target should be notified." + nullable: true + items: + type: "string" + "rule_matching_strategy": + type: "string" + description: "Whether or not all rules must match, or if only one rule must match." + nullable: true + enum: + - "all" + - "any" + "status_cel": + type: "string" + description: "The CEL expression that defines the status of an incoming email that is sent to the target." + nullable: true + "level_cel": + type: "string" + description: "The CEL expression that defines the level of an incoming email that is sent to the target." + nullable: true + description: "Create a Signals email target for a team." + "Signals_API_EmailTargetEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "slug": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "email": + type: "string" + nullable: true + "status_cel": + type: "string" + nullable: true + "level_cel": + type: "string" + nullable: true + "target": {"$ref": "#/components/schemas/NullableSignals_API_TargetEntity"} + "allowed_senders": + type: "array" + nullable: true + items: + type: "string" + "rules": + type: "array" + nullable: true + items: + type: "string" + "rule_matching_strategy": + type: "string" + nullable: true + "created_by": {"$ref": "#/components/schemas/NullableAuthorEntity"} + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "team_id": + type: "string" + description: "The team ID that the email target belongs to, if applicable" + nullable: true + description: "Signals_API_EmailTargetEntity model" + "Signals_API_EmailTargetEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Signals_API_EmailTargetEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "Signals_API_EmailTargetEntityPaginated model" + "update_signals_email_target": + type: "object" + properties: + "name": + type: "string" + description: "The email target's name." + nullable: true + "slug": + type: "string" + description: "The email address that will be listening to events." + nullable: true + "description": + type: "string" + description: "A detailed description of the email target." + nullable: true + "target": + required: + - "id" + - "type" + type: "object" + properties: + "type": + type: "string" + description: "The type of target that the inbound email will notify when matched." + enum: + - "Team" + - "EntireTeam" + - "EscalationPolicy" + - "OnCallSchedule" + - "User" + - "SlackChannel" + - "MicrosoftTeamsChannel" + - "Webhook" + "id": + type: "string" + description: "The ID of the target that the inbound email will notify when matched." + description: "The target that the email target will notify. This object must contain a `type`\nfield that specifies the type of target and an `id` field that specifies the ID of\nthe target. The `type` field must be one of \"escalation_policy\", \"on_call_schedule\",\n\"team\", \"user\", or \"slack_channel\".\n" + nullable: true + "allowed_senders": + type: "array" + description: "A list of email addresses that are allowed to send events to the target. Must be exact match." + nullable: true + items: + type: "string" + "status_cel": + type: "string" + description: "The CEL expression that defines the status of an incoming email that is sent to the target." + nullable: true + "level_cel": + type: "string" + description: "The CEL expression that defines the level of an incoming email that is sent to the target." + nullable: true + "rules": + type: "array" + description: "A list of CEL expressions that should be evaluated and matched to determine if the target should be notified." + nullable: true + items: + type: "string" + "rule_matching_strategy": + type: "string" + description: "Whether or not all rules must match, or if only one rule must match." + nullable: true + enum: + - "all" + - "any" + description: "Update a Signals email target by ID" + "create_signals_webhook_target": + required: + - "name" + - "url" + type: "object" + properties: + "name": + type: "string" + description: "The webhook target's name." + "description": + type: "string" + description: "An optional detailed description of the webhook target." + nullable: true + "url": + type: "string" + description: "The URL that the webhook target will notify." + "signing_key": + type: "string" + description: "An optional secret we will provide in the `FH-Signature` header\nwhen sending a payload to the webhook target. This key will not be\nshown in any response once configured.\n" + nullable: true + description: "Create a Signals webhook target." + "Signals_API_WebhookTargetEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "url": + type: "string" + nullable: true + "created_by": {"$ref": "#/components/schemas/NullableAuthorEntity"} + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + description: "Signals_API_WebhookTargetEntity model" + "Signals_API_WebhookTargetEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Signals_API_WebhookTargetEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "Signals_API_WebhookTargetEntityPaginated model" + "update_signals_webhook_target": + type: "object" + properties: + "name": + type: "string" + description: "The webhook target's name." + nullable: true + "description": + type: "string" + description: "An optional detailed description of the webhook target." + nullable: true + "url": + type: "string" + description: "The URL that the webhook target will notify." + nullable: true + "signing_key": + type: "string" + description: "An optional secret we will provide in the `FH-Signature` header\nwhen sending a payload to the webhook target. This key will not be\nshown in any response once configured.\n" + nullable: true + description: "Update a Signals webhook target by ID" + "Signals_API_IngestKeyEntity": + type: "object" + properties: + "url": + type: "string" + nullable: true + description: "Signals_API_IngestKeyEntity model" + "debug_signals_expression": + required: + - "expression" + - "signals" + type: "object" + properties: + "expression": + type: "string" + description: "CEL expression" + "signals": + type: "array" + description: "List of signals to evaluate rule expression against" + items: + type: "object" + properties: + "id": + type: "string" + nullable: true + "organization_id": + type: "string" + nullable: true + "summary": + type: "string" + nullable: true + "body": + type: "string" + nullable: true + "level": + type: "string" + nullable: true + "annotations": + type: "object" + nullable: true + "tags": + type: "array" + nullable: true + items: + type: "string" + "images": + type: "array" + nullable: true + items: + type: "object" + properties: + "src": + type: "string" + nullable: true + "alt": + type: "string" + nullable: true + "links": + type: "array" + nullable: true + items: + type: "object" + properties: + "href": + type: "string" + nullable: true + "text": + type: "string" + nullable: true + description: "Debug Signals expressions" + "Signals_API_OrganizationOnCallScheduleEntityPaginated": + type: "object" + properties: + "data": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Signals_API_OrganizationOnCallScheduleEntity"} + "pagination": {"$ref": "#/components/schemas/NullablePaginationEntity"} + description: "Signals_API_OrganizationOnCallScheduleEntityPaginated model" + "Signals_API_OrganizationOnCallScheduleEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "rotations": + type: "array" + nullable: true + items: {"$ref": "#/components/schemas/Signals_API_OrganizationOnCallRotationEntity"} + "team": {"$ref": "#/components/schemas/NullableSuccinctEntity"} + "created_by": {"$ref": "#/components/schemas/NullableAuthorEntity"} + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "time_zone": + type: "string" + nullable: true + "current_shift": {"$ref": "#/components/schemas/NullableSignals_API_OnCallShiftEntity"} + "next_shift": {"$ref": "#/components/schemas/NullableSignals_API_OnCallShiftEntity"} + "Signals_API_OrganizationOnCallRotationEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "name": + type: "string" + nullable: true + "description": + type: "string" + nullable: true + "time_zone": + type: "string" + nullable: true + "current_shift": {"$ref": "#/components/schemas/NullableSignals_API_OnCallShiftEntity"} + "next_shift": {"$ref": "#/components/schemas/NullableSignals_API_OnCallShiftEntity"} + "created_by": {"$ref": "#/components/schemas/NullableAuthorEntity"} + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "create_webhook": + required: + - "url" + type: "object" + properties: + "url": + type: "string" + description: "Create a new webhook" + "Webhooks_Entities_WebhookEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "url": + type: "string" + nullable: true + "state": + type: "string" + nullable: true + "created_by": {"$ref": "#/components/schemas/NullableAuthorEntity"} + "created_at": + type: "string" + format: "date-time" + nullable: true + "updated_at": + type: "string" + format: "date-time" + nullable: true + "subscriptions": + type: "string" + nullable: true + description: "Webhooks_Entities_WebhookEntity model" + "update_webhook": + type: "object" + properties: + "url": + type: "string" + nullable: true + "state": + type: "string" + nullable: true + enum: + - "active" + - "inactive" + description: "Update a specific webhook" + "AI_Entities_IncidentSummaryEntity": + type: "object" + properties: + "id": + type: "string" + nullable: true + "content": + type: "string" + nullable: true + "source_hash": + type: "string" + nullable: true + "type": + type: "string" + nullable: true + "created_at": + type: "string" + nullable: true + "incident_updated_at": + type: "string" + format: "date-time" + nullable: true + description: "AI_Entities_IncidentSummaryEntity model" + "AI_Entities_PreferencesEntity": + type: "object" + properties: + "ai": + type: "boolean" + nullable: true + "description": + type: "boolean" + nullable: true + "followups": + type: "boolean" + nullable: true + "impact": + type: "boolean" + nullable: true + "retros": + type: "boolean" + nullable: true + "similar_incidents": + type: "boolean" + nullable: true + "summaries": + type: "boolean" + nullable: true + "updates": + type: "boolean" + nullable: true + description: "AI_Entities_PreferencesEntity model" + "Audiences_Entities_AudienceEntity": + type: "object" + properties: + "id": + type: "string" + description: "Unique identifier for the audience" + nullable: true + "name": + type: "string" + description: "Name of the audience (maximum 255 characters)" + nullable: true + "slug": + type: "string" + description: "Slug of the audience, unique and autogenerated" + nullable: true + "description": + type: "string" + description: "Description of the audience and its purpose (maximum 4000 characters)" + nullable: true + "default": + type: "boolean" + description: "Whether this is the organization's default audience" + nullable: true + "created_at": + type: "string" + description: "When the audience was created" + format: "date-time" + nullable: true + "updated_at": + type: "string" + description: "When the audience was last updated" + format: "date-time" + nullable: true + "discarded_at": + type: "string" + description: "When the audience was discarded (soft deleted)" + format: "date-time" + nullable: true + "details": + type: "array" + description: "List of incident details for this audience" + nullable: true + items: {"$ref": "#/components/schemas/Audiences_Entities_DetailEntity"} + description: "Audiences_Entities_AudienceEntity model" + "Audiences_Entities_DetailEntity": + type: "object" + properties: + "id": + type: "string" + description: "Unique identifier for the detail item" + nullable: true + "question": + type: "string" + description: "The need-to-know question (maximum 255 characters)" + nullable: true + "prompt": + type: "string" + description: "AI prompt used to gather this information" + nullable: true + "position": + type: "integer" + description: "Order position of this item in the list" + format: "int32" + nullable: true + "slug": + type: "string" + description: "Slug of the detail, unique and autogenerated" + nullable: true + "Audiences_Entities_AudienceSummariesEntity": + type: "object" + properties: + "incident_id": + type: "string" + nullable: true + "audiences": + type: "string" + description: "JSON-encoded map of audience summaries" + nullable: true + description: "Audiences_Entities_AudienceSummariesEntity model" + "NullableErrorEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/ErrorEntity"} + "NullablePongEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/PongEntity"} + "NullableActorEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/ActorEntity"} + "NullableOrganizationEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/OrganizationEntity"} + "Nullablecreate_environment": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_environment"} + "NullableEnvironmentEntryEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/EnvironmentEntryEntity"} + "NullableExternalResourceEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/ExternalResourceEntity"} + "NullableEnvironmentEntryEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/EnvironmentEntryEntityPaginated"} + "NullablePaginationEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/PaginationEntity"} + "Nullableupdate_environment": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_environment"} + "Nullablecreate_service": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_service"} + "NullableServiceEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/ServiceEntity"} + "NullableChecklistTemplateEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/ChecklistTemplateEntity"} + "NullableChecklistCheckEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/ChecklistCheckEntity"} + "NullableTeamEntityLite": + nullable: true + allOf: + - {"$ref": "#/components/schemas/TeamEntityLite"} + "NullableAuthorEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/AuthorEntity"} + "NullableServiceEntityChecklist": + nullable: true + allOf: + - {"$ref": "#/components/schemas/ServiceEntityChecklist"} + "NullableFunctionalityEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/FunctionalityEntity"} + "NullableLinksEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/LinksEntity"} + "NullableServiceEntityLite": + nullable: true + allOf: + - {"$ref": "#/components/schemas/ServiceEntityLite"} + "NullableImports_ImportableResourceEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Imports_ImportableResourceEntity"} + "NullableImports_ImportErrorEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Imports_ImportErrorEntity"} + "NullableImports_ImportErrorEntity_ResourceEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Imports_ImportErrorEntity_ResourceEntity"} + "NullableServiceEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/ServiceEntityPaginated"} + "Nullablecreate_service_links": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_service_links"} + "NullableServiceLinkEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/ServiceLinkEntity"} + "Nullableupdate_service": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_service"} + "NullableServiceWithAllDependenciesEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/ServiceWithAllDependenciesEntity"} + "NullableServiceChildDependencyEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/ServiceChildDependencyEntity"} + "NullableServiceParentDependencyEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/ServiceParentDependencyEntity"} + "Nullablecreate_service_checklist_response": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_service_checklist_response"} + "Nullablecreate_service_dependency": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_service_dependency"} + "NullableServiceDependencyEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/ServiceDependencyEntity"} + "Nullableupdate_service_dependency": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_service_dependency"} + "Nullablecreate_functionality": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_functionality"} + "NullableFunctionalityEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/FunctionalityEntityPaginated"} + "Nullableupdate_functionality": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_functionality"} + "NullableFunctionalityWithAllServicesEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/FunctionalityWithAllServicesEntity"} + "Nullablecreate_team": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_team"} + "NullableTeamEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/TeamEntity"} + "NullableIntegrations_Slack_SlackChannelEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Integrations_Slack_SlackChannelEntity"} + "NullableIntegrations_MicrosoftTeamsV2_ChannelEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Integrations_MicrosoftTeamsV2_ChannelEntity"} + "NullableIncidentEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/IncidentEntity"} + "NullableSuccinctEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/SuccinctEntity"} + "NullableSeverityMatrix_ImpactEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/SeverityMatrix_ImpactEntity"} + "NullableSeverityMatrix_ConditionEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/SeverityMatrix_ConditionEntity"} + "NullableIncidents_MilestoneEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Incidents_MilestoneEntity"} + "NullableIncidents_LifecyclePhaseEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Incidents_LifecyclePhaseEntity"} + "NullableIncidents_LifecycleMilestoneEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Incidents_LifecycleMilestoneEntity"} + "NullableIncidents_LifecycleMeasurementEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Incidents_LifecycleMeasurementEntity"} + "NullableIncidents_RoleAssignmentEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Incidents_RoleAssignmentEntity"} + "NullableIncidentRoleEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/IncidentRoleEntity"} + "NullableUserEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/UserEntity"} + "NullableIncidents_StatusPageEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Incidents_StatusPageEntity"} + "NullableIntegrationEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/IntegrationEntity"} + "NullableEvent_NoteEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Event_NoteEntity"} + "NullableConversations_API_Entities_Reference": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Conversations_API_Entities_Reference"} + "NullableConversations_API_Entities_Channel": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Conversations_API_Entities_Channel"} + "NullableTicketing_TicketEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Ticketing_TicketEntity"} + "NullableTicketing_PriorityEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Ticketing_PriorityEntity"} + "NullableAttachments_LinkEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Attachments_LinkEntity"} + "NullableIncidents_ImpactEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Incidents_ImpactEntity"} + "NullableIncidents_ConferenceBridgeEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Incidents_ConferenceBridgeEntity"} + "NullableIncidents_ChannelEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Incidents_ChannelEntity"} + "NullableIncidents_ContextObjectEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Incidents_ContextObjectEntity"} + "NullableIncidents_TeamAssignmentEntityLite": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Incidents_TeamAssignmentEntityLite"} + "NullableCustomFields_FieldValue": + nullable: true + allOf: + - {"$ref": "#/components/schemas/CustomFields_FieldValue"} + "NullableIncidentEntity_FieldRequirementEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/IncidentEntity_FieldRequirementEntity"} + "NullableMembershipEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/MembershipEntity"} + "NullableScheduleEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/ScheduleEntity"} + "NullableFunctionalityEntityLite": + nullable: true + allOf: + - {"$ref": "#/components/schemas/FunctionalityEntityLite"} + "NullableSlimRunbookEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/SlimRunbookEntity"} + "NullableRules_RuleEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Rules_RuleEntity"} + "NullableFHTypes_GenericEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/FHTypes_GenericEntity"} + "NullableTeamEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/TeamEntityPaginated"} + "Nullableupdate_team": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_team"} + "Nullablecreate_team_call_route": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_team_call_route"} + "NullableSignals_API_CallRouteEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_CallRouteEntity"} + "NullableSignals_API_CallRouteStepEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_CallRouteStepEntity"} + "NullableSignals_API_TargetEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_TargetEntity"} + "NullableSignals_API_CallRouteEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_CallRouteEntityPaginated"} + "Nullablecreate_team_escalation_policy": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_team_escalation_policy"} + "NullableSignals_API_EscalationPolicyEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_EscalationPolicyEntity"} + "NullableSignals_API_EscalationPolicyStepEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_EscalationPolicyStepEntity"} + "NullableSignals_API_EscalationPolicyHandoffStepEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_EscalationPolicyHandoffStepEntity"} + "NullableSignals_API_NotificationPriorityPolicyEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_NotificationPriorityPolicyEntity"} + "NullableSignals_API_EscalationPolicyEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_EscalationPolicyEntityPaginated"} + "Nullableupdate_team_escalation_policy": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_team_escalation_policy"} + "Nullablecreate_team_on_call_schedule": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_team_on_call_schedule"} + "NullableSignals_API_OnCallScheduleEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_OnCallScheduleEntity"} + "NullableSignals_API_OnCallRotationEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_OnCallRotationEntity"} + "NullableSignals_API_OnCallShiftEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_OnCallShiftEntity"} + "NullableSignals_API_OnCallStrategyEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_OnCallStrategyEntity"} + "NullableSignals_API_OnCallRestrictionEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_OnCallRestrictionEntity"} + "NullableSignals_API_OnCallScheduleEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_OnCallScheduleEntityPaginated"} + "Nullableupdate_team_on_call_schedule": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_team_on_call_schedule"} + "Nullablecreate_on_call_shift": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_on_call_shift"} + "Nullableupdate_on_call_shift": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_on_call_shift"} + "Nullablecreate_team_signal_rule": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_team_signal_rule"} + "NullableSignals_API_RuleEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_RuleEntity"} + "NullableSignals_API_RuleEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_RuleEntityPaginated"} + "Nullableupdate_team_signal_rule": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_team_signal_rule"} + "Nullablecreate_change": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_change"} + "NullableChangeEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/ChangeEntity"} + "Nullableupdate_change": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_change"} + "Nullablecreate_change_identity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_change_identity"} + "NullableChangeIdentityEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/ChangeIdentityEntity"} + "NullableChangeIdentityEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/ChangeIdentityEntityPaginated"} + "Nullableupdate_change_identity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_change_identity"} + "Nullablecreate_change_event": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_change_event"} + "NullableChangeEventEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/ChangeEventEntity"} + "NullableChangeEventSlimEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/ChangeEventSlimEntityPaginated"} + "NullableChangeEventSlimEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/ChangeEventSlimEntity"} + "Nullableupdate_change_event": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_change_event"} + "NullableChangeTypeEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/ChangeTypeEntityPaginated"} + "NullableChangeTypeEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/ChangeTypeEntity"} + "NullableEntitlementEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/EntitlementEntityPaginated"} + "NullableEntitlementEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/EntitlementEntity"} + "Nullablecreate_incident": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_incident"} + "NullableIncidentEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/IncidentEntityPaginated"} + "Nullableupdate_incident": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_incident"} + "NullableIncidents_AlertEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Incidents_AlertEntityPaginated"} + "NullableIncidents_AlertEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Incidents_AlertEntity"} + "NullableAlerts_AlertEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Alerts_AlertEntity"} + "NullablePublicAPI_V1_Incidents_SuccinctEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/PublicAPI_V1_Incidents_SuccinctEntity"} + "NullableAlerts_SirenEventEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Alerts_SirenEventEntity"} + "NullableAlerts_SirenAlertEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Alerts_SirenAlertEntity"} + "Nullableupdate_incident_alert_primary": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_incident_alert_primary"} + "Nullablebulk_update_incident_milestones": + nullable: true + allOf: + - {"$ref": "#/components/schemas/bulk_update_incident_milestones"} + "NullableIncidents_MilestoneEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Incidents_MilestoneEntityPaginated"} + "Nullablecreate_incident_change_event": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_incident_change_event"} + "NullableIncidents_RelatedChangeEventEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Incidents_RelatedChangeEventEntity"} + "NullableIncidents_RelatedChangeEventEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Incidents_RelatedChangeEventEntityPaginated"} + "Nullableupdate_incident_change_event": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_incident_change_event"} + "Nullablecreate_incident_status_page": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_incident_status_page"} + "NullableIncidents_StatusPageEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Incidents_StatusPageEntityPaginated"} + "Nullablecreate_incident_task_list": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_incident_task_list"} + "NullableTaskEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/TaskEntity"} + "Nullablecreate_incident_task": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_incident_task"} + "NullableTaskEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/TaskEntityPaginated"} + "Nullableupdate_incident_task": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_incident_task"} + "Nullableconvert_incident_task": + nullable: true + allOf: + - {"$ref": "#/components/schemas/convert_incident_task"} + "NullableAttachments_LinkEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Attachments_LinkEntityPaginated"} + "Nullablecreate_incident_link": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_incident_link"} + "Nullableupdate_incident_link": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_incident_link"} + "NullablePublicAPI_V1_Incidents_TranscriptEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/PublicAPI_V1_Incidents_TranscriptEntity"} + "NullableSimilarIncidentEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/SimilarIncidentEntityPaginated"} + "NullablePublicAPI_V1_SimilarIncidentEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/PublicAPI_V1_SimilarIncidentEntity"} + "NullableAttachments_TypedAttachmentEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Attachments_TypedAttachmentEntityPaginated"} + "NullableAttachments_TypedAttachmentEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Attachments_TypedAttachmentEntity"} + "NullableIncidentAttachmentEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/IncidentAttachmentEntity"} + "NullableIncidentEventEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/IncidentEventEntityPaginated"} + "NullableIncidentEventEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/IncidentEventEntity"} + "NullableVotesEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/VotesEntity"} + "Nullableupdate_vote": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_vote"} + "Nullableupdate_incident_impact_patch": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_incident_impact_patch"} + "Nullableupdate_incident_impact_put": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_incident_impact_put"} + "Nullablecreate_incident_impact": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_incident_impact"} + "NullableIncidentImpactEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/IncidentImpactEntity"} + "NullableIncidentImpactEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/IncidentImpactEntityPaginated"} + "Nullablecreate_incident_note": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_incident_note"} + "Nullableupdate_incident_note": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_incident_note"} + "Nullablecreate_incident_chat_message": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_incident_chat_message"} + "NullableEvent_GenericChatMessageEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Event_GenericChatMessageEntity"} + "Nullableupdate_incident_chat_message": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_incident_chat_message"} + "NullableIncidents_RoleAssignmentEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Incidents_RoleAssignmentEntityPaginated"} + "Nullablecreate_incident_role_assignment": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_incident_role_assignment"} + "Nullablecreate_incident_team_assignment": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_incident_team_assignment"} + "NullableIncidents_RelationshipsEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Incidents_RelationshipsEntity"} + "NullableIncidents_ShareRetrospectivesResultEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Incidents_ShareRetrospectivesResultEntity"} + "NullableIncidents_ExportRetrospectivesResultEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Incidents_ExportRetrospectivesResultEntity"} + "NullableIncidents_RetrospectiveEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Incidents_RetrospectiveEntity"} + "NullableIncidents_RetrospectiveEntity_SectionEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Incidents_RetrospectiveEntity_SectionEntity"} + "NullableIncidents_RetrospectiveFieldEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Incidents_RetrospectiveFieldEntity"} + "NullableIncidents_RetrospectiveEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Incidents_RetrospectiveEntityPaginated"} + "Nullableupdate_incident_retrospective": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_incident_retrospective"} + "Nullableupdate_incident_retrospective_field": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_incident_retrospective_field"} + "NullableIncidentRoleEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/IncidentRoleEntityPaginated"} + "Nullablecreate_incident_role": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_incident_role"} + "Nullableupdate_incident_role": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_incident_role"} + "NullableTagEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/TagEntity"} + "NullableTagEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/TagEntityPaginated"} + "Nullablecreate_incident_type": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_incident_type"} + "NullableIncidentTypeEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/IncidentTypeEntity"} + "NullableIncidentTypeEntity_TemplateEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/IncidentTypeEntity_TemplateEntity"} + "NullableIncidentTypeEntity_TemplateImpactEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/IncidentTypeEntity_TemplateImpactEntity"} + "NullableIncidentTypeEntity_TemplateValuesEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/IncidentTypeEntity_TemplateValuesEntity"} + "NullableIncidentTypeEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/IncidentTypeEntityPaginated"} + "Nullableupdate_incident_type": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_incident_type"} + "NullableIntegrations_IntegrationEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Integrations_IntegrationEntityPaginated"} + "NullableIntegrations_IntegrationEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Integrations_IntegrationEntity"} + "NullableIntegrations_ConnectionEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Integrations_ConnectionEntity"} + "NullableIntegrations_IntegrationEntity_LogoEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Integrations_IntegrationEntity_LogoEntity"} + "NullableFieldMapping_FieldMapEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/FieldMapping_FieldMapEntity"} + "NullableFieldMapping_MappableFieldEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/FieldMapping_MappableFieldEntity"} + "NullableIntegrations_AuthedProviderEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Integrations_AuthedProviderEntityPaginated"} + "NullablePublicAPI_V1_Integrations_AuthedProviderEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/PublicAPI_V1_Integrations_AuthedProviderEntity"} + "NullableIntegrations_ConnectionEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Integrations_ConnectionEntityPaginated"} + "NullableIntegrations_ConnectionStatusEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Integrations_ConnectionStatusEntity"} + "NullableIntegrations_Aws_ConnectionEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Integrations_Aws_ConnectionEntityPaginated"} + "NullableIntegrations_Aws_ConnectionEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Integrations_Aws_ConnectionEntity"} + "Nullableupdate_aws_connection": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_aws_connection"} + "NullableIntegrations_Aws_CloudtrailBatchEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Integrations_Aws_CloudtrailBatchEntityPaginated"} + "NullableIntegrations_Aws_CloudtrailBatchEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Integrations_Aws_CloudtrailBatchEntity"} + "Nullableupdate_aws_cloudtrail_batch": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_aws_cloudtrail_batch"} + "NullableIntegrations_ConfluenceCloud_SpaceKeyEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Integrations_ConfluenceCloud_SpaceKeyEntity"} + "NullableIntegrations_Slack_WorkspaceEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Integrations_Slack_WorkspaceEntity"} + "NullableIntegrations_Slack_UsergroupEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Integrations_Slack_UsergroupEntity"} + "NullableIntegrations_Statuspage_ConnectionEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Integrations_Statuspage_ConnectionEntityPaginated"} + "NullableIntegrations_Statuspage_ConnectionEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Integrations_Statuspage_ConnectionEntity"} + "NullableIntegrations_Statuspage_ConditionEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Integrations_Statuspage_ConditionEntity"} + "NullableIntegrations_Statuspage_SeverityEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Integrations_Statuspage_SeverityEntity"} + "NullableIntegrations_Statuspage_MilestoneMappingEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Integrations_Statuspage_MilestoneMappingEntity"} + "Nullableupdate_statuspage_connection": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_statuspage_connection"} + "NullableIntegrations_Statuspage_PageEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Integrations_Statuspage_PageEntity"} + "NullableIntegrations_Zendesk_SearchTickets_PaginatedEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Integrations_Zendesk_SearchTickets_PaginatedEntity"} + "NullableIntegrations_Zendesk_SupportIssueEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Integrations_Zendesk_SupportIssueEntity"} + "NullableIntegrations_Zendesk_SupportIssueEntity_CustomerEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Integrations_Zendesk_SupportIssueEntity_CustomerEntity"} + "NullableUserEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/UserEntityPaginated"} + "NullableCurrentUserEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/CurrentUserEntity"} + "NullableReportEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/ReportEntity"} + "NullableReports_BucketEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Reports_BucketEntity"} + "NullableReports_DataPointEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Reports_DataPointEntity"} + "NullableMetrics_TicketFunnelMetricsEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Metrics_TicketFunnelMetricsEntity"} + "NullableMetrics_TicketFunnelMetricsEntity_DataBucketEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Metrics_TicketFunnelMetricsEntity_DataBucketEntity"} + "NullableMetrics_TicketFunnelMetricsEntity_DataBucketFilterParamsEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Metrics_TicketFunnelMetricsEntity_DataBucketFilterParamsEntity"} + "NullableMetrics_TicketFunnelMetricsEntity_GroupingsEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Metrics_TicketFunnelMetricsEntity_GroupingsEntity"} + "NullableMetrics_RetrospectiveEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Metrics_RetrospectiveEntity"} + "NullableMetrics_RetrospectiveEntity_DataEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Metrics_RetrospectiveEntity_DataEntity"} + "NullableMetrics_RetrospectiveEntity_SummaryEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Metrics_RetrospectiveEntity_SummaryEntity"} + "NullableMetrics_MilestonesFunnelEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Metrics_MilestonesFunnelEntity"} + "NullableMetrics_MilestonesFunnelEntity_DataBucketEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Metrics_MilestonesFunnelEntity_DataBucketEntity"} + "NullableMetrics_MilestonesFunnelEntity_DataBucketFilterParamsEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Metrics_MilestonesFunnelEntity_DataBucketFilterParamsEntity"} + "NullableMetrics_MilestonesFunnelEntity_DataBucketMilestoneCountEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Metrics_MilestonesFunnelEntity_DataBucketMilestoneCountEntity"} + "NullableMetrics_MilestonesFunnelEntity_ColumnEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Metrics_MilestonesFunnelEntity_ColumnEntity"} + "NullableMetrics_MilestonesFunnelEntity_GroupingsEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Metrics_MilestonesFunnelEntity_GroupingsEntity"} + "NullableMetrics_MilestonesFunnelEntity_MetaEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Metrics_MilestonesFunnelEntity_MetaEntity"} + "NullableMetrics_MetricsEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Metrics_MetricsEntity"} + "NullableMetrics_MetricsEntity_SortEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Metrics_MetricsEntity_SortEntity"} + "NullableMetrics_MttxDataEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Metrics_MttxDataEntity"} + "NullableMetrics_MttxDataEntity_GroupingEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Metrics_MttxDataEntity_GroupingEntity"} + "NullableMetrics_MttxGroupEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Metrics_MttxGroupEntity"} + "NullableMetrics_InfrastructureListEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Metrics_InfrastructureListEntity"} + "NullableMetrics_InfrastructureMetricsEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Metrics_InfrastructureMetricsEntity"} + "NullableRunbooks_ActionsEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Runbooks_ActionsEntityPaginated"} + "NullableRunbooks_ActionsEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Runbooks_ActionsEntity"} + "NullableRunbooks_ActionConfigEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Runbooks_ActionConfigEntity"} + "NullableRunbooks_ElementEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Runbooks_ElementEntity"} + "NullableRunbooks_ElementMarkdownEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Runbooks_ElementMarkdownEntity"} + "NullableRunbooks_ElementTextareaEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Runbooks_ElementTextareaEntity"} + "NullableRunbooks_ElementInputEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Runbooks_ElementInputEntity"} + "NullableRunbooks_ElementDynamicSelectEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Runbooks_ElementDynamicSelectEntity"} + "NullableRunbooks_ElementDynamicSelectEntity_SelectOptionEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Runbooks_ElementDynamicSelectEntity_SelectOptionEntity"} + "Nullablecreate_runbook_execution": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_runbook_execution"} + "NullableRunbooks_ExecutionEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Runbooks_ExecutionEntity"} + "NullableRunbooks_ExecutionStepEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Runbooks_ExecutionStepEntity"} + "NullableRunbooks_ExecutionStepExecutionEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Runbooks_ExecutionStepExecutionEntity"} + "NullableRunbooks_WebhookDeliveryEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Runbooks_WebhookDeliveryEntity"} + "NullableRunbooks_ExecutionEntity_ExecutedForEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Runbooks_ExecutionEntity_ExecutedForEntity"} + "NullableRunbooks_ExecutionEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Runbooks_ExecutionEntityPaginated"} + "Nullableupdate_runbook_execution_step": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_runbook_execution_step"} + "Nullablecreate_runbook": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_runbook"} + "NullableRunbookEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/RunbookEntity"} + "NullableRunbookStepEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/RunbookStepEntity"} + "Nullableupdate_runbook": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_runbook"} + "NullableNuncConnectionEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/NuncConnectionEntityPaginated"} + "NullableNuncConnectionEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/NuncConnectionEntity"} + "NullableNuncConditionEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/NuncConditionEntity"} + "NullableNuncComponentEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/NuncComponentEntity"} + "NullableNuncComponentGroupEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/NuncComponentGroupEntity"} + "NullableMediaImageEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/MediaImageEntity"} + "NullableNuncEmailSubscribersEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/NuncEmailSubscribersEntity"} + "Nullableupdate_nunc_link": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_nunc_link"} + "NullableSavedSearchEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/SavedSearchEntity"} + "Nullableupdate_saved_search": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_saved_search"} + "Nullablecreate_saved_search": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_saved_search"} + "NullableLifecycles_PhaseEntityList": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Lifecycles_PhaseEntityList"} + "NullableLifecycles_PhaseEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Lifecycles_PhaseEntity"} + "NullableLifecycles_MilestoneEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Lifecycles_MilestoneEntity"} + "Nullablecreate_priority": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_priority"} + "NullablePriorityEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/PriorityEntity"} + "Nullableupdate_priority": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_priority"} + "Nullablecreate_severity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_severity"} + "NullableSeverityEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/SeverityEntity"} + "NullableSeverityEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/SeverityEntityPaginated"} + "Nullableupdate_severity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_severity"} + "Nullableupdate_severity_matrix": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_severity_matrix"} + "NullableSeverityMatrix_SeverityMatrixEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/SeverityMatrix_SeverityMatrixEntity"} + "NullableSeverityMatrix_ItemEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/SeverityMatrix_ItemEntity"} + "Nullablecreate_severity_matrix_condition": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_severity_matrix_condition"} + "Nullableupdate_severity_matrix_condition": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_severity_matrix_condition"} + "Nullablecreate_severity_matrix_impact": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_severity_matrix_impact"} + "Nullableupdate_severity_matrix_impact": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_severity_matrix_impact"} + "Nullablecreate_scheduled_maintenance": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_scheduled_maintenance"} + "NullableScheduledMaintenanceEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/ScheduledMaintenanceEntity"} + "NullableScheduledMaintenancesStatusPageEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/ScheduledMaintenancesStatusPageEntity"} + "NullableScheduledMaintenancesImpactEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/ScheduledMaintenancesImpactEntity"} + "Nullableupdate_scheduled_maintenance": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_scheduled_maintenance"} + "NullableScheduleEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/ScheduleEntityPaginated"} + "NullableInfrastructureSearchEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/InfrastructureSearchEntity"} + "NullableNunc_NuncSubscription": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Nunc_NuncSubscription"} + "Nullablecreate_nunc_subscription": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_nunc_subscription"} + "Nullablecreate_status_update_template": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_status_update_template"} + "NullableStatusUpdateTemplateEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/StatusUpdateTemplateEntity"} + "Nullableupdate_status_update_template": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_status_update_template"} + "NullableOrganizations_CustomFieldDefinitionEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Organizations_CustomFieldDefinitionEntity"} + "Nullableupdate_custom_field_definition": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_custom_field_definition"} + "Nullablecreate_custom_field_definition": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_custom_field_definition"} + "Nullablecreate_post_mortem_report": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_post_mortem_report"} + "NullablePostMortems_PostMortemReportEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/PostMortems_PostMortemReportEntity"} + "NullablePostMortems_QuestionEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/PostMortems_QuestionEntity"} + "NullableCalendars_EventEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Calendars_EventEntity"} + "NullablePostMortems_PostMortemReportEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/PostMortems_PostMortemReportEntityPaginated"} + "Nullableupdate_post_mortem_report": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_post_mortem_report"} + "Nullablecreate_post_mortem_reason": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_post_mortem_reason"} + "NullablePostMortems_ReasonEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/PostMortems_ReasonEntity"} + "NullablePostMortems_ReasonEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/PostMortems_ReasonEntityPaginated"} + "Nullableupdate_post_mortem_reason": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_post_mortem_reason"} + "Nullablereorder_post_mortem_reasons": + nullable: true + allOf: + - {"$ref": "#/components/schemas/reorder_post_mortem_reasons"} + "Nullablepublish_post_mortem_report": + nullable: true + allOf: + - {"$ref": "#/components/schemas/publish_post_mortem_report"} + "Nullableupdate_post_mortem_field": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_post_mortem_field"} + "NullablePostMortems_SectionFieldEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/PostMortems_SectionFieldEntity"} + "Nullableupdate_post_mortem_questions": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_post_mortem_questions"} + "NullablePostMortems_QuestionTypeEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/PostMortems_QuestionTypeEntity"} + "NullablePostMortems_QuestionTypeEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/PostMortems_QuestionTypeEntityPaginated"} + "NullableRetrospectives_TemplateEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Retrospectives_TemplateEntity"} + "NullableRetrospectives_TemplateEntity_IncidentSectionEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Retrospectives_TemplateEntity_IncidentSectionEntity"} + "NullableRetrospectives_FieldEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Retrospectives_FieldEntity"} + "NullableRetrospectives_IndexTemplateEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Retrospectives_IndexTemplateEntityPaginated"} + "NullableRetrospectives_IndexTemplateEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Retrospectives_IndexTemplateEntity"} + "NullableAlerts_AlertEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Alerts_AlertEntityPaginated"} + "NullableAlerts_ProcessingLogEntryEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Alerts_ProcessingLogEntryEntityPaginated"} + "NullableAlerts_ProcessingLogEntryEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Alerts_ProcessingLogEntryEntity"} + "Nullablecreate_ticket": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_ticket"} + "Nullableupdate_ticket": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_ticket"} + "NullableTicketing_Projects_ProjectListItemEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Ticketing_Projects_ProjectListItemEntity"} + "NullableTicketing_ProjectConfigEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Ticketing_ProjectConfigEntity"} + "NullableTicketing_ProjectFieldMapEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Ticketing_ProjectFieldMapEntity"} + "NullableTicketing_ProjectFieldMapBodyEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Ticketing_ProjectFieldMapBodyEntity"} + "NullableTicketing_ProjectFieldMapExternalValueEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Ticketing_ProjectFieldMapExternalValueEntity"} + "NullableTicketing_ProjectFieldMapCasesEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Ticketing_ProjectFieldMapCasesEntity"} + "NullableTicketing_ProjectFieldMapCasesElseEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Ticketing_ProjectFieldMapCasesElseEntity"} + "NullableTicketing_FieldMaps_MappableFieldEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Ticketing_FieldMaps_MappableFieldEntity"} + "NullableTicketing_ProjectInboundMappableFieldEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Ticketing_ProjectInboundMappableFieldEntity"} + "NullableTicketing_ProjectInboundFieldMapEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Ticketing_ProjectInboundFieldMapEntity"} + "Nullablecreate_ticketing_priority": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_ticketing_priority"} + "Nullableupdate_ticketing_priority": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_ticketing_priority"} + "Nullablecreate_task_list": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_task_list"} + "NullableTaskListEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/TaskListEntity"} + "NullableTaskListItemEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/TaskListItemEntity"} + "Nullableupdate_task_list": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_task_list"} + "Nullableupdate_scim_group": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_scim_group"} + "Nullablecreate_scim_group": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_scim_group"} + "Nullablepatch_scim_user": + nullable: true + allOf: + - {"$ref": "#/components/schemas/patch_scim_user"} + "Nullableupdate_scim_user": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_scim_user"} + "Nullablecreate_scim_user": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_scim_user"} + "Nullableingest_catalog_data": + nullable: true + allOf: + - {"$ref": "#/components/schemas/ingest_catalog_data"} + "NullableImports_ImportEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Imports_ImportEntity"} + "Nullablecreate_checklist_template": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_checklist_template"} + "NullableChecklistTemplateEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/ChecklistTemplateEntityPaginated"} + "Nullableupdate_checklist_template": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_checklist_template"} + "NullablePublicAPI_V1_BootstrapEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/PublicAPI_V1_BootstrapEntity"} + "NullablePublicAPI_V1_FormConfigurations_SelectedValueEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/PublicAPI_V1_FormConfigurations_SelectedValueEntity"} + "NullableFormConfigurationEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/FormConfigurationEntity"} + "Nullablecreate_comment_reaction": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_comment_reaction"} + "Nullableupdate_comment": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_comment"} + "Nullablecreate_comment": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_comment"} + "NullableSignals_API_Analytics_TimeseriesPointEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_Analytics_TimeseriesPointEntity"} + "NullableSignals_API_Analytics_TimeseriesPointEntity_MetricEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_Analytics_TimeseriesPointEntity_MetricEntity"} + "NullableSignals_API_Analytics_GroupedMetricsEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_Analytics_GroupedMetricsEntity"} + "NullableSignals_API_Analytics_GroupedMetricsEntity_MetricEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_Analytics_GroupedMetricsEntity_MetricEntity"} + "NullableSignals_API_Analytics_MttxMetricsEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_Analytics_MttxMetricsEntity"} + "NullableSignals_API_Analytics_MttxMetricsEntity_MetricEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_Analytics_MttxMetricsEntity_MetricEntity"} + "Nullableupdate_call_route": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_call_route"} + "Nullablecreate_signals_event_source": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_signals_event_source"} + "NullableSignals_API_TransposerEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_TransposerEntity"} + "NullableSignals_API_TransposerListEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_TransposerListEntity"} + "Nullablecreate_signals_alert_grouping_configuration": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_signals_alert_grouping_configuration"} + "NullableSignals_API_GroupingEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_GroupingEntity"} + "NullableSignals_API_GroupingEntity_StrategyEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_GroupingEntity_StrategyEntity"} + "NullableSignals_API_GroupingEntity_StrategyEntity_SubstringEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_GroupingEntity_StrategyEntity_SubstringEntity"} + "NullableSignals_API_GroupingEntity_ActionEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_GroupingEntity_ActionEntity"} + "NullableSignals_API_GroupingEntity_ActionEntity_FyiEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_GroupingEntity_ActionEntity_FyiEntity"} + "NullableSignals_API_GroupingEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_GroupingEntityPaginated"} + "Nullableupdate_signals_alert_grouping_configuration": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_signals_alert_grouping_configuration"} + "Nullablecreate_signals_email_target": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_signals_email_target"} + "NullableSignals_API_EmailTargetEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_EmailTargetEntity"} + "NullableSignals_API_EmailTargetEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_EmailTargetEntityPaginated"} + "Nullableupdate_signals_email_target": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_signals_email_target"} + "Nullablecreate_signals_webhook_target": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_signals_webhook_target"} + "NullableSignals_API_WebhookTargetEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_WebhookTargetEntity"} + "NullableSignals_API_WebhookTargetEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_WebhookTargetEntityPaginated"} + "Nullableupdate_signals_webhook_target": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_signals_webhook_target"} + "NullableSignals_API_IngestKeyEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_IngestKeyEntity"} + "Nullabledebug_signals_expression": + nullable: true + allOf: + - {"$ref": "#/components/schemas/debug_signals_expression"} + "NullableSignals_API_OrganizationOnCallScheduleEntityPaginated": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_OrganizationOnCallScheduleEntityPaginated"} + "NullableSignals_API_OrganizationOnCallScheduleEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_OrganizationOnCallScheduleEntity"} + "NullableSignals_API_OrganizationOnCallRotationEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Signals_API_OrganizationOnCallRotationEntity"} + "Nullablecreate_webhook": + nullable: true + allOf: + - {"$ref": "#/components/schemas/create_webhook"} + "NullableWebhooks_Entities_WebhookEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Webhooks_Entities_WebhookEntity"} + "Nullableupdate_webhook": + nullable: true + allOf: + - {"$ref": "#/components/schemas/update_webhook"} + "NullableAI_Entities_IncidentSummaryEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/AI_Entities_IncidentSummaryEntity"} + "NullableAI_Entities_PreferencesEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/AI_Entities_PreferencesEntity"} + "NullableAudiences_Entities_AudienceEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Audiences_Entities_AudienceEntity"} + "NullableAudiences_Entities_DetailEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Audiences_Entities_DetailEntity"} + "NullableAudiences_Entities_AudienceSummariesEntity": + nullable: true + allOf: + - {"$ref": "#/components/schemas/Audiences_Entities_AudienceSummariesEntity"} + securitySchemes: + "api_key": + type: "apiKey" + name: "Authorization" + in: "header" +x-original-swagger-version: "2.0" diff --git a/.speakeasy/overlay.mcp.yaml b/.speakeasy/overlay.mcp.yaml new file mode 100644 index 0000000..f945230 --- /dev/null +++ b/.speakeasy/overlay.mcp.yaml @@ -0,0 +1,77 @@ +overlay: 1.0.0 +x-speakeasy-jsonpath: rfc9535 +info: + title: example overlay + version: 0.0.0 +actions: + - target: $.paths..[?@.operationId == "list_incident_retrospectives"] + update: + x-speakeasy-mcp: + disabled: false + description: > + Lists all retrospectives (RCAs) for an incident. Among other things, this is + useful for: + + - Getting a list of retrospectives for an incident, + - Getting basic data about a retrospective. + - Getting the fields of a retrospective. + + - target: $.paths..[?@.operationId == "list_incidents"] + update: + x-speakeasy-mcp: + disabled: false + + - target: $.paths..[?@.operationId == "create_incident"] + update: + x-speakeasy-mcp: + disabled: false + + - target: $.paths..[?@.operationId == "update_incident_retrospective_field"] + update: + x-speakeasy-mcp: + disabled: false + description: > + Updates a field in a retrospective (RCA) for an incident. Among other things, + this is useful for: + + - Updating a field in a retrospective, + - Updating the value of a field in a retrospective. + + Values should be compatible with the tiptap editor (array structure). + - target: $["components"]["schemas"]["Incidents_RetrospectiveFieldEntity"]["properties"]["value"]["type"] + remove: true + - target: $.components.schemas + update: + update_incident_retrospective_field: + properties: + value: + oneOf: + - type: integer + - type: string + - type: array + items: string + - type: array + items: + type: object + additionalProperties: true + format: ~ + Incidents_RetrospectiveFieldEntity: + properties: + value: + oneOf: + - type: integer + - type: string + - type: array + items: string + - type: array + items: + type: object + additionalProperties: true + + - target: $.paths..[?@.operationId == "list_alerts"] + update: + x-speakeasy-mcp: + disabled: false + + - target: $.paths.*[?@["x-speakeasy-mcp"].disabled != false] + remove: true diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock new file mode 100644 index 0000000..4e3dbb3 --- /dev/null +++ b/.speakeasy/workflow.lock @@ -0,0 +1,31 @@ +speakeasyVersion: 1.568.2 +sources: + FireHydrant-OAS: + sourceNamespace: fire-hydrant-mcp-oas + sourceRevisionDigest: sha256:526c307421b9d50ac587aa4359b072cd4040c3e403f2d20925a110ddbce1857c + sourceBlobDigest: sha256:9f00b4f476b300749f5ff53a0ed931764b8924ca3c71e3e00095fa3b133f4d8a + tags: + - latest + - 0.0.1 +targets: + fire-hydrant: + source: FireHydrant-OAS + sourceNamespace: fire-hydrant-mcp-oas + sourceRevisionDigest: sha256:526c307421b9d50ac587aa4359b072cd4040c3e403f2d20925a110ddbce1857c + sourceBlobDigest: sha256:9f00b4f476b300749f5ff53a0ed931764b8924ca3c71e3e00095fa3b133f4d8a +workflow: + workflowVersion: 1.0.0 + speakeasyVersion: latest + sources: + FireHydrant-OAS: + inputs: + - location: registry.speakeasyapi.dev/firehydrant/firehydrant/firehydrant-oas:main + overlays: + - location: .speakeasy/overlay.mcp.yaml + output: .speakeasy/openapi.output.yaml + registry: + location: registry.speakeasyapi.dev/firehydrant/firehydrant/fire-hydrant-mcp-oas + targets: + fire-hydrant: + target: mcp-typescript + source: FireHydrant-OAS diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml new file mode 100644 index 0000000..417481f --- /dev/null +++ b/.speakeasy/workflow.yaml @@ -0,0 +1,15 @@ +workflowVersion: 1.0.0 +speakeasyVersion: latest +sources: + FireHydrant-OAS: + inputs: + - location: registry.speakeasyapi.dev/firehydrant/firehydrant/firehydrant-oas:main + overlays: + - location: .speakeasy/overlay.mcp.yaml + output: .speakeasy/openapi.output.yaml + registry: + location: registry.speakeasyapi.dev/firehydrant/firehydrant/fire-hydrant-mcp-oas +targets: + fire-hydrant: + target: mcp-typescript + source: FireHydrant-OAS diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index ef476da..0000000 --- a/Dockerfile +++ /dev/null @@ -1,9 +0,0 @@ -FROM node:22.12-alpine AS builder - -WORKDIR /app -COPY package.json package-lock.json ./ -RUN npm install - -COPY . . - -ENTRYPOINT ["node", "mcpServer.js"] \ No newline at end of file diff --git a/README.md b/README.md index f215e08..9fb6308 100644 --- a/README.md +++ b/README.md @@ -1,181 +1,249 @@ -# Postman Agent Generator +# FireHydrant MCP Server -Welcome to your generated agent! 🚀 +Model Context Protocol (MCP) Server for the *FireHydrant* API. -This project was created with the [Postman Agent Generator](https://postman.com/explore/agent-generator), configured to [Model Context Provider (MCP)](https://modelcontextprotocol.io/introduction) Server output mode. It provides you with: +
+ + + + +
-- ✅ An MCP-compatible server (`mcpServer.js`) -- ✅ Automatically generated JavaScript tools for each selected Postman API request -Let's set things up! +

+> [!IMPORTANT] +> This MCP Server is not yet ready for production use. To complete setup please follow the steps outlined in your [workspace](https://app.speakeasy.com/org/firehydrant/firehydrant). Delete this notice before publishing to a package manager. -## 🚦 Getting Started + +## Summary -### ⚙️ Prerequisites +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. -Before starting, please ensure you have: +* [Dig into our API endpoints](https://developers.firehydrant.io/docs/api) +* [View your bot users](https://app.firehydrant.io/organizations/bots) -- [Node.js (v16+ required, v20+ recommended)](https://nodejs.org/) -- [npm](https://www.npmjs.com/) (included with Node) +## Base API endpoint -### 📥 Installation & Setup +[https://api.firehydrant.io/v1](https://api.firehydrant.io/v1) -**1. Install dependencies** +## Current version -Run from your project's root directory: +v1 -```sh -npm install -``` +## Authentication -### 🔐 Set tool environment variables +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. -In the `.env` file, you'll see environment variable placeholders, one for each workspace that the selected tools are from. For example, if you selected requests from 2 workspaces, e.g. Acme and Widgets, you'll see two placeholders: +An example of a header to authenticate against FireHydrant would look like: ``` -ACME_API_KEY= -WIDGETS_API_KEY= +Authorization: Bearer fhb-thisismytoken ``` -Update the values with actual API keys for each API. These environment variables are used inside of the generated tools to set the API key for each request. You can inspect a file in the `tools` directory to see how it works. +## Bot tokens -```javascript -// environment variables are used inside of each tool file -const apiKey = process.env.ACME_API_KEY; -``` +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). -**Caveat:** This may not be correct for every API. The generation logic is relatively simple - for each workspace, we create an environment variable with the same name as the workspace slug, and then use that environment variable in each tool file that belongs to that workspace. If this isn't the right behavior for your chosen API, no problem! You can manually update anything in the `.env` file or tool files to accurately reflect the API's method of authentication. +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. -### 🛠️ List Available Tools +Every request to the API is authenticated unless specified otherwise. -List descriptions and parameters from all generated tools with: +### Rate Limiting -```sh -node index.js tools -``` +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. -Example: +Rate limited responses will be served with a `429` status code and a JSON body of: +```json +{"error": "rate limit exceeded"} ``` -Available Tools: - -Workspace: acme-workspace - Collection: useful-api - list_all_customers - Description: Retrieve a list of useful things. - Parameters: - - magic: The required magic power - - limit: Number of results returned - [...additional parameters...] +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 ``` -## 🌐 Running the MCP Server - -The MCP Server (`mcpServer.js`) exposes your automated API tools to MCP-compatible clients, such as Claude Desktop or the Postman Desktop Application. +## How lists are returned -### A) 🖥️ Run with Postman +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. -The Postman Desktop Application is the easiest way to run and test MCP servers. +### Paginated requests -Step 1: Download the latest Postman Desktop Application from [https://www.postman.com/downloads/](https://www.postman.com/downloads/). +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.) -Step 2: Read out the documentation article [here](https://learning.postman.com/docs/postman-ai-agent-builder/mcp-requests/overview/) for the next steps. +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**. -### B) 👩‍💻 Run with Claude Desktop +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. -To integrate with Claude Desktop: +``` +{ + "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 + } +} +``` -1. Find node path: +To request the second page, you'd request the same endpoint with the additional query parameter of `page` in the URL: -```sh -which node +``` +GET https://api.firehydrant.io/v1/environments?page=2 ``` -2. Find `mcpServer.js` path: +If you need to modify the number of records coming back from FireHydrant, you can use the `per_page` parameter (max is 200): -```sh -realpath mcpServer.js ``` +GET https://api.firehydrant.io/v1/environments?per_page=50 +``` + + + +## Table of Contents + +* [FireHydrant MCP Server](#firehydrant-mcp-server) + * [Base API endpoint](#base-api-endpoint) + * [Current version](#current-version) + * [Authentication](#authentication) + * [Bot tokens](#bot-tokens) + * [How lists are returned](#how-lists-are-returned) + * [Installation](#installation) +* [Development](#development) + * [Contributions](#contributions) + + -3. Open Claude Desktop → **Settings** → **Developers** → **Edit Config** and add your server: + +## Installation + +> [!TIP] +> To finish publishing your MCP Server to npm and others you must [run your first generation action](https://www.speakeasy.com/docs/github-setup#step-by-step-guide). + +### Claude + +Add the following server definition to your `claude_desktop_config.json` file: ```json { "mcpServers": { - "": { - "command": "", - "args": [""] + "FireHydrant": { + "command": "npx", + "args": [ + "-y", "--package", "firehydrant-mcp", + "--", + "mcp", "start", + "--api-key", "..." + ] } } } ``` -Restart Claude Desktop to activate this change. +### Cursor -### Additional Options +Create a `.cursor/mcp.json` file in your project root with the following content: -#### 🐳 Docker Deployment (Production) +```json +{ + "mcpServers": { + "FireHydrant": { + "command": "npx", + "args": [ + "-y", "--package", "firehydrant-mcp", + "--", + "mcp", "start", + "--api-key", "..." + ] + } + } +} +``` -For production deployments, you can use Docker: +### Standalone Binary -**1. Build Docker image** +Run the MCP server as a standalone binary with no additional dependencies. Pull these binaries from available Github releases: -```sh -docker build -t . +```bash +curl -L -o mcp-server \ + https://github.com/{org}/{repo}/releases/download/{tag}/mcp-server-bun-darwin-arm64 && \ +chmod +x mcp-server ``` -**2. Claude Desktop Integration** - -Add Docker server configuration to Claude Desktop (Settings → Developers → Edit Config): +If the repo is a private repo you must add your Github PAT to download a release `-H "Authorization: Bearer {GITHUB_PAT}"`. ```json { "mcpServers": { - "": { - "command": "docker", - "args": ["run", "-i", "--rm", "--env-file=.env", ""] + "Todos": { + "command": "./DOWNLOAD/PATH/mcp-server", + "args": [ + "start" + ] } } } ``` -> Add your environment variables (API keys, etc.) inside the `.env` file. +For a full list of server arguments, run: -#### 🌐 Server-Sent Events (SSE) +```bash +npx -y --package firehydrant-mcp -- mcp start --help +``` -To run the server with Server-Sent Events (SSE) support, use the `--sse` flag: +### Package Managers -```sh -node mcpServer.js --sse -``` +The MCP Server can be installed with either [npm](https://www.npmjs.com/), [pnpm](https://pnpm.io/), [bun](https://bun.sh/) or [yarn](https://classic.yarnpkg.com/en/) package managers. -## 🐳 Dockerfile (Included) +#### NPM -The project comes bundled with the following minimal Docker setup: +```bash +npm add +``` -```dockerfile -FROM node:22.12-alpine AS builder +#### PNPM -WORKDIR /app -COPY package.json package-lock.json ./ -RUN npm install +```bash +pnpm add +``` -COPY . . +#### Bun -ENTRYPOINT ["node", "mcpServer.js"] +```bash +bun add ``` -## ➕ Adding New Tools +#### Yarn + +```bash +yarn add +``` + -Extend your agent with more tools easily: + -1. Visit [Postman Agent Generator](https://postman.com/explore/agent-generator). -2. Pick new API request(s), generate a new agent, and download it. -3. Copy new generated tool(s) into your existing project's `tools/` folder. -4. Update your `tools/paths.js` file to include new tool references. +# Development -## 💬 Questions & Support +## Contributions -Visit the [Postman Agent Generator](https://postman.com/explore/agent-generator) page for updates and new capabilities. +While we value contributions to this MCP Server, the code is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation. +We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release. -Visit the [Postman Community](https://community.postman.com/) to share what you've built, ask questions and get help. +### MCP Server Created by [Speakeasy](https://www.speakeasy.com/?utm_source=mcp-server&utm_campaign=mcp-typescript) diff --git a/commands/tools.js b/commands/tools.js deleted file mode 100644 index 3c2a391..0000000 --- a/commands/tools.js +++ /dev/null @@ -1,65 +0,0 @@ -import { discoverTools } from "../lib/tools.js"; - -export function registerToolsCommand(program) { - program - .command("tools") - .description("List all available API tools") - .action(async () => { - const tools = await discoverTools(); - if (tools.length === 0) { - console.log("No tools found. Tools should be organized as:"); - console.log("tools/workspace/collection/request.js\n"); - return; - } - - console.log("\nAvailable Tools:\n"); - - // Group tools by workspace/collection - const groupedTools = tools.reduce((acc, tool) => { - // Extract workspace and collection from path - const parts = tool.path.split("/"); - const workspace = parts[1] || "Unknown Workspace"; - const collection = parts[2] || "Unknown Collection"; - - if (!acc[workspace]) acc[workspace] = {}; - if (!acc[workspace][collection]) acc[workspace][collection] = []; - - acc[workspace][collection].push(tool); - return acc; - }, {}); - - // Print tools in a hierarchical structure - for (const [workspace, collections] of Object.entries(groupedTools)) { - console.log(`Workspace: ${workspace}`); - for (const [collection, tools] of Object.entries(collections)) { - console.log(` Collection: ${collection}`); - tools.forEach( - ({ - definition: { - function: { name, description, parameters }, - }, - }) => { - console.log(` ${name}`); - console.log( - ` Description: ${description || "No description provided"}` - ); - if (parameters?.properties) { - console.log(" Parameters:"); - Object.entries(parameters.properties).forEach( - ([name, details]) => { - console.log( - ` - ${name}: ${ - details.description || "No description" - }` - ); - } - ); - } - console.log(""); - } - ); - } - console.log(""); - } - }); -} \ No newline at end of file diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..4f9e60a --- /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,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/index.js b/index.js deleted file mode 100644 index 7efdef0..0000000 --- a/index.js +++ /dev/null @@ -1,9 +0,0 @@ -import { Command } from "commander"; -import { registerToolsCommand } from "./commands/tools.js"; - -const program = new Command(); - -// Register commands -registerToolsCommand(program); - -program.parse(process.argv); diff --git a/lib/tools.js b/lib/tools.js deleted file mode 100644 index 0c889af..0000000 --- a/lib/tools.js +++ /dev/null @@ -1,16 +0,0 @@ -import { toolPaths } from "../tools/paths.js"; - -/** - * Discovers and loads available tools from the tools directory - * @returns {Promise} Array of tool objects - */ -export async function discoverTools() { - const toolPromises = toolPaths.map(async (file) => { - const module = await import(`../tools/${file}`); - return { - ...module.apiTool, - path: file, - }; - }); - return Promise.all(toolPromises); -} diff --git a/mcpServer.js b/mcpServer.js deleted file mode 100644 index 56395e0..0000000 --- a/mcpServer.js +++ /dev/null @@ -1,145 +0,0 @@ -#!/usr/bin/env node -import dotenv from "dotenv"; -import express from "express"; -import { Server } from "@modelcontextprotocol/sdk/server/index.js"; -import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; -import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js"; -import { - CallToolRequestSchema, - ErrorCode, - ListToolsRequestSchema, - McpError, -} from "@modelcontextprotocol/sdk/types.js"; -import { discoverTools } from "./lib/tools.js"; - -import path from "path"; -import { fileURLToPath } from "url"; - -const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); - -dotenv.config({ path: path.resolve(__dirname, ".env") }); - -const SERVER_NAME = "generated-mcp-server"; - -async function transformTools(tools) { - return tools - .map((tool) => { - const definitionFunction = tool.definition?.function; - if (!definitionFunction) return; - return { - name: definitionFunction.name, - description: definitionFunction.description, - inputSchema: definitionFunction.parameters, - }; - }) - .filter(Boolean); -} - -async function run() { - const args = process.argv.slice(2); - const isSSE = args.includes("--sse"); - - const server = new Server( - { - name: SERVER_NAME, - version: "0.1.0", - }, - { - capabilities: { - tools: {}, - }, - } - ); - - server.onerror = (error) => console.error("[Error]", error); - - // Gracefully shutdown on SIGINT - process.on("SIGINT", async () => { - await server.close(); - process.exit(0); - }); - - const tools = await discoverTools(); - - server.setRequestHandler(ListToolsRequestSchema, async () => ({ - tools: await transformTools(tools), - })); - - server.setRequestHandler(CallToolRequestSchema, async (request) => { - const toolName = request.params.name; - const tool = tools.find((t) => t.definition.function.name === toolName); - - if (!tool) { - throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${toolName}`); - } - - const args = request.params.arguments; - const requiredParameters = - tool.definition?.function?.parameters?.required || []; - - for (const requiredParameter of requiredParameters) { - if (!(requiredParameter in args)) { - throw new McpError( - ErrorCode.InvalidParams, - `Missing required parameter: ${requiredParameter}` - ); - } - } - - try { - const result = await tool.function(args); - return { - content: [ - { - type: "text", - text: JSON.stringify(result, null, 2), - }, - ], - }; - } catch (error) { - console.error("[Error] Failed to fetch data:", error); - throw new McpError( - ErrorCode.InternalError, - `API error: ${error.message}` - ); - } - }); - - if (isSSE) { - const app = express(); - const transports = {}; - - app.get("/sse", async (_req, res) => { - const transport = new SSEServerTransport("/messages", res); - transports[transport.sessionId] = transport; - - res.on("close", () => { - delete transports[transport.sessionId]; - }); - - await server.connect(transport); - }); - - app.post("/messages", async (req, res) => { - const sessionId = req.query.sessionId; - const transport = transports[sessionId]; - - if (transport) { - await transport.handlePostMessage(req, res); - } else { - res.status(400).send("No transport found for sessionId"); - } - }); - - const port = process.env.PORT || 3001; - app.listen(port, () => { - console.log(`[SSE Server] running on port ${port}`); - }); - } else { - const transport = new StdioServerTransport(); - await server.connect(transport); - } -} - -run().catch(console.error); diff --git a/package-lock.json b/package-lock.json index 0bc4662..2fc5b93 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,29 +1,273 @@ { - "name": "postman-agent-generator-mcp", - "version": "1.0.0", + "name": "firehydrant-mcp", + "version": "0.0.1-beta.1", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "postman-agent-generator-mcp", - "version": "1.0.0", + "name": "firehydrant-mcp", + "version": "0.0.1-beta.1", + "dependencies": { + "@modelcontextprotocol/sdk": "^1.11.5", + "@stricli/core": "^1.1.2", + "bun": "^1.2.12", + "express": "^5.1.0", + "zod": "^3.25.7" + }, + "bin": { + "mcp": "bin/mcp-server.js" + }, + "devDependencies": { + "@eslint/js": "^9.26.0", + "@types/bun": "^1.2.13", + "@types/express": "^5.0.1", + "@types/node": "^22.15.20", + "eslint": "^9.26.0", + "globals": "^16.0.0", + "typescript": "^5.8.3", + "typescript-eslint": "^8.31.1" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "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": { - "@modelcontextprotocol/sdk": "^1.9.0", - "commander": "^13.1.0", - "dotenv": "^16.5.0", - "express": "^5.1.0" + "eslint-visitor-keys": "^3.4.3" }, "engines": { - "node": ">=16.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/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_modules/@eslint-community/regexpp": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.20.1.tgz", + "integrity": "sha512-OL0RJzC/CBzli0DrrR31qzj6d6i6Mm3HByuhflhl4LOBiWxN+3i6/t/ZQQNii4tjksXi8r2CRW1wMpWA2ULUEw==", + "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-helpers": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.2.3.tgz", + "integrity": "sha512-u180qk2Um1le4yf0ruXH3PYFeEZeYC3p/4wCTKrr2U1CmGdzGi3KtY0nuPDH48UJxlKCC5RDzbcbh4X0XlqgHg==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.14.0.tgz", + "integrity": "sha512-qIbV0/JZr7iSDjqAc60IqbLdsj9GDt16xQtWD+B78d/HAlvysGdZZ6rpJHGAc2T0FQx1X6thsSPdnoiGKdNtdg==", + "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": "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": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "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/js": { + "version": "9.28.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.28.0.tgz", + "integrity": "sha512-fnqSjGWd/CoIp4EXIxWVK/sHA6DOHN4+8Ix2cX5ycOY7LG0UY8nHCU5pIp2eaE1Mc7Qd8kHspYNzYXT2ojPLzg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + } + }, + "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.3.2", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.2.tgz", + "integrity": "sha512-4SaFZCNfJqvk/kenHpI8xvN42DMaoycy4PzKc5otHxRswww1kAt82OlBuwRVLofCACCTZEcla2Ydxv8scMXaTg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.15.0", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit/node_modules/@eslint/core": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.0.tgz", + "integrity": "sha512-b7ePw78tEWWkpgZCDYkbqDOP8dmM6qe+AOC6iuJqlq1R/0ahMAeH3qynpnqKFGkMltrp44ohV4ubGyvLX28tzw==", + "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/@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": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "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": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" + }, + "engines": { + "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": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "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": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, "node_modules/@modelcontextprotocol/sdk": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.11.3.tgz", - "integrity": "sha512-rmOWVRUbUJD7iSvJugjUbFZshTAuJ48MXoZ80Osx1GM0K/H1w7rSEvmw8m6vdWxNASgtaHIhAgre4H/E9GJiYQ==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.12.1.tgz", + "integrity": "sha512-KG1CZhZfWg+u8pxeM/mByJDScJSrjjxLc8fwQqbsS8xCjBmQfMNEBTotYdNanKekepnfRI85GtgQlctLFpcYPw==", "license": "MIT", "dependencies": { + "ajv": "^6.12.6", "content-type": "^1.0.5", "cors": "^2.8.5", "cross-spawn": "^7.0.5", @@ -36,7 +280,582 @@ "zod-to-json-schema": "^3.24.1" }, "engines": { - "node": ">=18" + "node": ">=18" + } + }, + "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": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "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", + "engines": { + "node": ">= 8" + } + }, + "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": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@oven/bun-darwin-aarch64": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@oven/bun-darwin-aarch64/-/bun-darwin-aarch64-1.2.16.tgz", + "integrity": "sha512-NLVU9YDORq/3WuJOE5TQv5of3R99n56gYZPfdqP4U0/5nllbC8yzRxA2BWwAS2RxxD0Y3bxqEVUsIGiTNN2jxg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@oven/bun-darwin-x64": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@oven/bun-darwin-x64/-/bun-darwin-x64-1.2.16.tgz", + "integrity": "sha512-HpcSVCTH9n+9bG2zu3OUJ9h22m6HzNgZpqib9r4NEVZg7Z2U86bOUMKlTCA0ZANaWsK9czl2VIhMWbLF4fgvLA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@oven/bun-darwin-x64-baseline": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@oven/bun-darwin-x64-baseline/-/bun-darwin-x64-baseline-1.2.16.tgz", + "integrity": "sha512-FtKr6FwLN+QfrF0/vJtOwBMU72krmrHlxhRSElbKEOWox2n2vWSZ/sNNkHePEsrxGfqaHC5GhEZk2lnaZTavBQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@oven/bun-linux-aarch64": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-aarch64/-/bun-linux-aarch64-1.2.16.tgz", + "integrity": "sha512-nd0eZhihfgrDtfI/NdEqOAQ8KY87SWNQLZKjRB8WoYkqcY1BGwtZqvJOc2bEn2oERJ8K2etJRynXz+MKngiYxw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oven/bun-linux-aarch64-musl": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-aarch64-musl/-/bun-linux-aarch64-musl-1.2.16.tgz", + "integrity": "sha512-MhvQ0hecunZnbac9cEOqA1CGk/ISDhhnF35i9l90Jgc/osfgGndViLkMp3wk1EO5UG4/Kbil1OlfLmyOHKq0SQ==", + "cpu": [ + "aarch64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oven/bun-linux-x64": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-x64/-/bun-linux-x64-1.2.16.tgz", + "integrity": "sha512-qYUXPXbT4S+MImv51+dLBHKFYy40QIowwCRtzUFGf3TG+9MQQUXHNXryMNSdHveHqecd9rO1EIQ8hroAPBl+Sg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oven/bun-linux-x64-baseline": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-x64-baseline/-/bun-linux-x64-baseline-1.2.16.tgz", + "integrity": "sha512-ZysDeqDfUAqKrQu2R+ddRgSCY30qSnn0LQLr6fAm7Pw9lU2yhWVNa8R3DavddmZQc1vUw6j3ITIAE+DDT9OBCg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oven/bun-linux-x64-musl": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-x64-musl/-/bun-linux-x64-musl-1.2.16.tgz", + "integrity": "sha512-6o5Oi5ARKYErF6nIBrewxtl20PGhM97faPemJ+v26D47dRNAlUWN5lMVuOqZOhYjqzOe4V+NpxIFBHtXWEmoNQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oven/bun-linux-x64-musl-baseline": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-x64-musl-baseline/-/bun-linux-x64-musl-baseline-1.2.16.tgz", + "integrity": "sha512-cWwny3cxYkvV9fYnSDb2brXodWV7IcG+Bwd3q3b8OUYbeC3ekHN3zm+TYdSxIVhMm7z46CkiDz5QnnQWVVfZ5A==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oven/bun-windows-x64": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@oven/bun-windows-x64/-/bun-windows-x64-1.2.16.tgz", + "integrity": "sha512-1xUlHHbMZ3DMZlEcppBAQ5vQDgNHDMIGB/AXO+dxQJl/3GiO/Ek4pMDzcqMnlbGDaDcTmTXyZ6cEXEF4C2qygQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@oven/bun-windows-x64-baseline": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@oven/bun-windows-x64-baseline/-/bun-windows-x64-baseline-1.2.16.tgz", + "integrity": "sha512-tHdtHqH6c5ScNusLWOzZCTeuV2rSc3mvlLQQ+DYefTy+XwtjXmY47MbBSgNuBWVYePIob9BqDFOtTHYIWRZTww==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "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==", + "license": "Apache-2.0" + }, + "node_modules/@types/body-parser": { + "version": "1.19.6", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.6.tgz", + "integrity": "sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/bun": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/@types/bun/-/bun-1.2.16.tgz", + "integrity": "sha512-1aCZJ/6nSiViw339RsaNhkNoEloLaPzZhxMOYEa7OzRzO41IGg5n/7I43/ZIAW/c+Q6cT12Vf7fOZOoVIzb5BQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bun-types": "1.2.16" + } + }, + "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": { + "@types/node": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/express": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@types/express/-/express-5.0.3.tgz", + "integrity": "sha512-wGA0NX93b19/dZC1J18tKWVIYWyyF2ZjT9vin/NRu0qzzvfVzWjs04iq2rQ3H65vCTQYlRqs3YHfY7zjdV+9Kw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^5.0.0", + "@types/serve-static": "*" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-5.0.6.tgz", + "integrity": "sha512-3xhRnjJPkULekpSzgtoNYYcTWgEZkp4myc+Saevii5JPnHNvHMRlBSHDbs7Bh1iPPoVTERHEZXyhyLbMEsExsA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, + "node_modules/@types/http-errors": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.5.tgz", + "integrity": "sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg==", + "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.31", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.31.tgz", + "integrity": "sha512-jnVe5ULKl6tijxUhvQeNbQG/84fHfg+yMak02cT8QVhBx/F05rAVxCGBYYTh2EKz22D6JF5ktXuNwdx7b9iEGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/@types/qs": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.14.0.tgz", + "integrity": "sha512-eOunJqu0K1923aExK6y8p6fsihYEn/BYuQ4g0CxAAgFc4b/ZLN4CrsRZ55srTdqoiLzU2B2evC+apEIxprEzkQ==", + "dev": true, + "license": "MIT" + }, + "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.5", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.5.tgz", + "integrity": "sha512-z6F2D3cOStZvuk2SaP6YrwkNO65iTZcwA2ZkSABegdkAh/lf+Aa/YQndZVfmEXT5vgAp6zv06VQ3ejSVjAny4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "1.15.8", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.8.tgz", + "integrity": "sha512-roei0UY3LhpOJvjbIP6ZZFngyLKl5dskOtDhxY5THRSpO+ZI+nzJ+m5yUMzGrp89YRa7lvknKkMYjqQFGwA7Sg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/http-errors": "*", + "@types/node": "*", + "@types/send": "*" + } + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.34.0.tgz", + "integrity": "sha512-QXwAlHlbcAwNlEEMKQS2RCgJsgXrTJdjXT08xEgbPFa2yYQgVjBymxP5DrfrE7X7iodSzd9qBUHUycdyVJTW1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.34.0", + "@typescript-eslint/type-utils": "8.34.0", + "@typescript-eslint/utils": "8.34.0", + "@typescript-eslint/visitor-keys": "8.34.0", + "graphemer": "^1.4.0", + "ignore": "^7.0.0", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.34.0", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.34.0.tgz", + "integrity": "sha512-vxXJV1hVFx3IXz/oy2sICsJukaBrtDEQSBiV48/YIV5KWjX1dO+bcIr/kCPrW6weKXvsaGKFNlwH0v2eYdRRbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.34.0", + "@typescript-eslint/types": "8.34.0", + "@typescript-eslint/typescript-estree": "8.34.0", + "@typescript-eslint/visitor-keys": "8.34.0", + "debug": "^4.3.4" + }, + "engines": { + "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/@typescript-eslint/project-service": { + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.34.0.tgz", + "integrity": "sha512-iEgDALRf970/B2YExmtPMPF54NenZUf4xpL3wsCRx/lgjz6ul/l13R81ozP/ZNuXfnLCS+oPmG7JIxfdNYKELw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.34.0", + "@typescript-eslint/types": "^8.34.0", + "debug": "^4.3.4" + }, + "engines": { + "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/@typescript-eslint/scope-manager": { + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.34.0.tgz", + "integrity": "sha512-9Ac0X8WiLykl0aj1oYQNcLZjHgBojT6cW68yAgZ19letYu+Hxd0rE0veI1XznSSst1X5lwnxhPbVdwjDRIomRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.34.0", + "@typescript-eslint/visitor-keys": "8.34.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.34.0.tgz", + "integrity": "sha512-+W9VYHKFIzA5cBeooqQxqNriAP0QeQ7xTiDuIOr71hzgffm3EL2hxwWBIIj4GuofIbKxGNarpKqIq6Q6YrShOA==", + "dev": true, + "license": "MIT", + "engines": { + "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/@typescript-eslint/type-utils": { + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.34.0.tgz", + "integrity": "sha512-n7zSmOcUVhcRYC75W2pnPpbO1iwhJY3NLoHEtbJwJSNlVAZuwqu05zY3f3s2SDWWDSo9FdN5szqc73DCtDObAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/typescript-estree": "8.34.0", + "@typescript-eslint/utils": "8.34.0", + "debug": "^4.3.4", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "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/@typescript-eslint/types": { + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.34.0.tgz", + "integrity": "sha512-9V24k/paICYPniajHfJ4cuAWETnt7Ssy+R0Rbcqo5sSFr3QEZ/8TSoUi9XeXVBGXCaLtwTOKSLGcInCAvyZeMA==", + "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/typescript-estree": { + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.34.0.tgz", + "integrity": "sha512-rOi4KZxI7E0+BMqG7emPSK1bB4RICCpF7QD3KCLXn9ZvWoESsOMlHyZPAHyG04ujVplPaHbmEvs34m+wjgtVtg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.34.0", + "@typescript-eslint/tsconfig-utils": "8.34.0", + "@typescript-eslint/types": "8.34.0", + "@typescript-eslint/visitor-keys": "8.34.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": "^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/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.34.0.tgz", + "integrity": "sha512-8L4tWatGchV9A1cKbjaavS6mwYwp39jql8xUmIIKJdm+qiaeHy5KMKlBrf30akXAWBzn2SqKsNOtSENWUwg7XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/scope-manager": "8.34.0", + "@typescript-eslint/types": "8.34.0", + "@typescript-eslint/typescript-estree": "8.34.0" + }, + "engines": { + "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/@typescript-eslint/visitor-keys": { + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.34.0.tgz", + "integrity": "sha512-qHV7pW7E85A0x6qyrFn+O+q1k1p3tQCsqIZ1KZ5ESLXY57aTvUd3/a4rdPTeXisvhXn2VQG0VSKUqs8KHF2zcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.34.0", + "eslint-visitor-keys": "^4.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, "node_modules/accepts": { @@ -52,6 +871,75 @@ "node": ">= 0.6" } }, + "node_modules/acorn": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "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": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "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" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "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": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "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/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/body-parser": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.0.tgz", @@ -72,6 +960,74 @@ "node": ">=18" } }, + "node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "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": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/bun": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/bun/-/bun-1.2.16.tgz", + "integrity": "sha512-sjZH6rr1P6yu44+XPA8r+ZojwmK9Kbz9lO6KAA/4HRIupdpC31k7b93crLBm19wEYmd6f2+3+57/7tbOcmHbGg==", + "cpu": [ + "arm64", + "x64", + "aarch64" + ], + "hasInstallScript": true, + "license": "MIT", + "os": [ + "darwin", + "linux", + "win32" + ], + "bin": { + "bun": "bin/bun.exe", + "bunx": "bin/bun.exe" + }, + "optionalDependencies": { + "@oven/bun-darwin-aarch64": "1.2.16", + "@oven/bun-darwin-x64": "1.2.16", + "@oven/bun-darwin-x64-baseline": "1.2.16", + "@oven/bun-linux-aarch64": "1.2.16", + "@oven/bun-linux-aarch64-musl": "1.2.16", + "@oven/bun-linux-x64": "1.2.16", + "@oven/bun-linux-x64-baseline": "1.2.16", + "@oven/bun-linux-x64-musl": "1.2.16", + "@oven/bun-linux-x64-musl-baseline": "1.2.16", + "@oven/bun-windows-x64": "1.2.16", + "@oven/bun-windows-x64-baseline": "1.2.16" + } + }, + "node_modules/bun-types": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/bun-types/-/bun-types-1.2.16.tgz", + "integrity": "sha512-ciXLrHV4PXax9vHvUrkvun9VPVGOVwbbbBF/Ev1cXz12lyEZMoJpIJABOfPcN9gDJRaiKF9MVbSygLg4NXu3/A==", + "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", @@ -110,15 +1066,60 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/commander": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-13.1.0.tgz", - "integrity": "sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==", + "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", "engines": { - "node": ">=18" + "node": ">=6" + } + }, + "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": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "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": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.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/content-disposition": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.0.tgz", @@ -202,6 +1203,13 @@ } } }, + "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", @@ -211,18 +1219,6 @@ "node": ">= 0.8" } }, - "node_modules/dotenv": { - "version": "16.5.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.5.0.tgz", - "integrity": "sha512-m/C+AwOAr9/W1UOIZUo232ejMNnJAJtYQjUbHoNTBNTJSvqzzDh7vnrei3o3r3m9blf6ZoDkvcw0VmozNRFJxg==", - "license": "BSD-2-Clause", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://dotenvx.com" - } - }, "node_modules/dunder-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", @@ -288,6 +1284,174 @@ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", "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", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "9.28.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.28.0.tgz", + "integrity": "sha512-ocgh41VhRlf9+fVpe7QKzwLj9c92fDiqOj8Y3Sd4/ZmVA4Btx4PlUYPq4pp9JDyupkf1upbEXecxL2mwNV7jPQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@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.14.0", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.28.0", + "@eslint/plugin-kit": "^0.3.1", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@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" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "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/espree": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.15.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "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": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "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": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "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": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "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": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", @@ -375,6 +1539,91 @@ "express": "^4.11 || 5 || ^5.0.0-beta.1" } }, + "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==", + "license": "MIT" + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "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.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "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": "ISC", + "dependencies": { + "is-glob": "^4.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==", + "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.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "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": ">=16.0.0" + } + }, + "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": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/finalhandler": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.0.tgz", @@ -392,6 +1641,44 @@ "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==", + "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_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": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "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": "ISC" + }, "node_modules/forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -456,6 +1743,32 @@ "node": ">= 0.4" } }, + "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": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-16.2.0.tgz", + "integrity": "sha512-O+7l9tPdHCU320IigZZPj5zmRCFG9xHmx9cU8FqU2Rp+JN714seHV+2S9+JslCpY4gJwU2vOGox0wzgae/MCEg==", + "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", @@ -468,6 +1781,23 @@ "url": "https://github.com/sponsors/ljharb" } }, + "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": ">=8" + } + }, "node_modules/has-symbols": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", @@ -508,16 +1838,62 @@ "node": ">= 0.8" } }, + "node_modules/http-errors/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "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==", "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "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": ">= 4" + } + }, + "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": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "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.10.0" + "node": ">=0.8.19" } }, "node_modules/inherits": { @@ -535,6 +1911,39 @@ "node": ">= 0.10" } }, + "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", + "engines": { + "node": ">=0.10.0" + } + }, + "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": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "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_modules/is-promise": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", @@ -547,6 +1956,86 @@ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "license": "ISC" }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT" + }, "node_modules/math-intrinsics": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", @@ -577,6 +2066,30 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, "node_modules/mime-db": { "version": "1.54.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", @@ -598,12 +2111,32 @@ "node": ">= 0.6" } }, + "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/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "license": "MIT" }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, "node_modules/negotiator": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", @@ -655,6 +2188,69 @@ "wrappy": "1" } }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -664,6 +2260,16 @@ "node": ">= 0.8" } }, + "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": ">=8" + } + }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -682,6 +2288,19 @@ "node": ">=16" } }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/pkce-challenge": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-5.0.0.tgz", @@ -691,6 +2310,16 @@ "node": ">=16.20.0" } }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "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", @@ -704,6 +2333,15 @@ "node": ">= 0.10" } }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/qs": { "version": "6.14.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", @@ -719,6 +2357,27 @@ "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", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "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/range-parser": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", @@ -743,6 +2402,27 @@ "node": ">= 0.8" } }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, "node_modules/router": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz", @@ -759,6 +2439,30 @@ "node": ">= 18" } }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "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", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -785,6 +2489,19 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "license": "MIT" }, + "node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/send": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/send/-/send-1.2.0.tgz", @@ -922,14 +2639,53 @@ } }, "node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", "license": "MIT", "engines": { "node": ">= 0.8" } }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, "node_modules/toidentifier": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", @@ -939,6 +2695,32 @@ "node": ">=0.6" } }, + "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/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/type-is": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz", @@ -953,6 +2735,50 @@ "node": ">= 0.6" } }, + "node_modules/typescript": { + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.34.0.tgz", + "integrity": "sha512-MRpfN7uYjTrTGigFCt8sRyNqJFhjN0WwZecldaqhWm+wy0gaRt8Edb/3cuUy0zdq2opJWT6iXINKAtewnDOltQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.34.0", + "@typescript-eslint/parser": "8.34.0", + "@typescript-eslint/utils": "8.34.0" + }, + "engines": { + "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/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", @@ -962,6 +2788,15 @@ "node": ">= 0.8" } }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -986,16 +2821,39 @@ "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "license": "ISC" }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/zod": { - "version": "3.24.4", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.4.tgz", - "integrity": "sha512-OdqJE9UDRPwWsrHjLN2F8bPxvwJBK22EHLWtanu0LSYr5YqzsaaW3RMgmjwr8Rypg5k+meEJdSPXJZXE/yqOMg==", + "version": "3.25.63", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.63.tgz", + "integrity": "sha512-3ttCkqhtpncYXfP0f6dsyabbYV/nEUW+Xlu89jiXbTBifUfjaSqXOG6JnQPLtqt87n7KAmnMqcjay6c0Wq0Vbw==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" diff --git a/package.json b/package.json index bec2780..c65d505 100644 --- a/package.json +++ b/package.json @@ -1,21 +1,33 @@ { - "name": "postman-agent-generator-mcp", - "version": "1.0.0", - "description": "A simple MCP server with packaged tools", - "main": "index.js", + "name": "firehydrant-mcp", + "version": "0.0.1-beta.1", + "author": "Speakeasy", "type": "module", + "sideEffects": false, + "bin": { + "mcp": "bin/mcp-server.js" + }, "scripts": { - "list-tools": "node index.js tools" + "build": "bun src/mcp-server/build.mts && tsc", + "check": "npm run lint", + "lint": "eslint --cache --max-warnings=0 src", + "prepublishOnly": "npm run build" }, "dependencies": { - "@modelcontextprotocol/sdk": "^1.9.0", - "commander": "^13.1.0", - "dotenv": "^16.5.0", - "express": "^5.1.0" - }, - "engines": { - "node": ">=16.0.0" + "@modelcontextprotocol/sdk": "^1.11.5", + "@stricli/core": "^1.1.2", + "bun": "^1.2.12", + "express": "^5.1.0", + "zod": "^3.25.7" }, - "author": "Postman, Inc.", - "license": "MIT" + "devDependencies": { + "@eslint/js": "^9.26.0", + "@types/bun": "^1.2.13", + "@types/express": "^5.0.1", + "@types/node": "^22.15.20", + "eslint": "^9.26.0", + "globals": "^16.0.0", + "typescript": "^5.8.3", + "typescript-eslint": "^8.31.1" + } } diff --git a/src/core.ts b/src/core.ts new file mode 100644 index 0000000..7b0c1dd --- /dev/null +++ b/src/core.ts @@ -0,0 +1,13 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ClientSDK } from "./lib/sdks.js"; + +/** + * A minimal client to use when calling standalone SDK functions. Typically, an + * instance of this class would be instantiated once at the start of an + * application and passed around through some dependency injection mechanism to + * parts of an application that need to make SDK calls. + */ +export class FireHydrantCore extends ClientSDK {} diff --git a/src/custom/prompts/generate-retrospective.ts b/src/custom/prompts/generate-retrospective.ts new file mode 100644 index 0000000..477deb3 --- /dev/null +++ b/src/custom/prompts/generate-retrospective.ts @@ -0,0 +1,43 @@ +import { PromptDefinition } from "../../mcp-server/prompts.js"; + +const promptText = ` +Generate a retrospective for the most recent incident in FireHydrant. + +Follow these steps to perform the task: + +- Get the most recent incident by listing the incidents for the account. +- Get the attached retrospectives for the incident. +- If there is just one retrospective attached to the incident, use that. + Otherwise, ask the user to select one of the retrospectives attached to the + incident. +- Write a retrospective using the template fields and the incident details. + Follow the structure of the template. + +After generating the retrospetive, offer to: +- Make changes or corrections based on my feedback. +- Update the fiels of the retrosepctive for the incident using the content + generated for each template field. + +When update the retrospective fields, keep the following in mind: + - When updating FireHydrant retrospective fields, the value field must be an + array containing tiptap editor objects. + - For bold text, be sure to use \`strong\` as the mark type. +`; + +export const prompt$GenerateRetrospective: PromptDefinition = { + name: "firehydrant-generate-retrospective-for-last-incident", + description: "Generate a retrospective for the last incident", + prompt: async () => { + return { + messages: [ + { + role: "user", + content: { + type: "text", + text: promptText, + }, + }, + ], + }; + }, +}; diff --git a/src/funcs/Alerts_list_alerts.ts b/src/funcs/Alerts_list_alerts.ts new file mode 100644 index 0000000..9bc2d29 --- /dev/null +++ b/src/funcs/Alerts_list_alerts.ts @@ -0,0 +1,175 @@ +/* + * 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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { + ListAlertsRequest, + ListAlertsRequest$zodSchema, + ListAlertsResponse, + ListAlertsResponse$zodSchema, +} from "../models/listalertsop.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 Alerts_list_alerts( + client$: FireHydrantCore, + request?: ListAlertsRequest | undefined, + options?: RequestOptions, +): APIPromise< + Result< + ListAlertsResponse, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client$, + request, + options, + )); +} + +async function $do( + client$: FireHydrantCore, + request?: ListAlertsRequest | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + ListAlertsResponse, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed$ = safeParse( + request, + (value$) => ListAlertsRequest$zodSchema.optional().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 securityInput = await extractSecurity(client$._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client$._baseURL ?? "", + operationID: "list_alerts", + oAuth2Scopes: [], + resolvedSecurity: requestSecurity, + securitySource: client$._options.security, + retryConfig: options?.retries + || client$._options.retryConfig + || { strategy: "none" }, + 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: [], + 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< + ListAlertsResponse, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, ListAlertsResponse$zodSchema, { + key: "Alerts_AlertEntityPaginated", + }), + )(response, req$, { extraFields: responseFields$ }); + + return [result$, { status: "complete", request: req$, response }]; +} diff --git a/src/funcs/Incidents_create_incident.ts b/src/funcs/Incidents_create_incident.ts new file mode 100644 index 0000000..6c63e99 --- /dev/null +++ b/src/funcs/Incidents_create_incident.ts @@ -0,0 +1,161 @@ +/* + * 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 { + CreateIncident, + CreateIncident$zodSchema, +} from "../models/createincident.js"; +import { + CreateIncidentResponse, + CreateIncidentResponse$zodSchema, +} from "../models/createincidentop.js"; +import { APIError } 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 Incidents_create_incident( + client$: FireHydrantCore, + request: CreateIncident, + options?: RequestOptions, +): APIPromise< + Result< + CreateIncidentResponse, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client$, + request, + options, + )); +} + +async function $do( + client$: FireHydrantCore, + request: CreateIncident, + options?: RequestOptions, +): Promise< + [ + Result< + CreateIncidentResponse, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed$ = safeParse( + request, + (value$) => CreateIncident$zodSchema.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 securityInput = await extractSecurity(client$._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client$._baseURL ?? "", + operationID: "create_incident", + oAuth2Scopes: [], + resolvedSecurity: requestSecurity, + securitySource: client$._options.security, + 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: [], + 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< + CreateIncidentResponse, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(201, CreateIncidentResponse$zodSchema, { key: "IncidentEntity" }), + )(response, req$, { extraFields: responseFields$ }); + + return [result$, { status: "complete", request: req$, response }]; +} diff --git a/src/funcs/Incidents_list_incidents.ts b/src/funcs/Incidents_list_incidents.ts new file mode 100644 index 0000000..496c5a8 --- /dev/null +++ b/src/funcs/Incidents_list_incidents.ts @@ -0,0 +1,196 @@ +/* + * 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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { + ListIncidentsRequest, + ListIncidentsRequest$zodSchema, + ListIncidentsResponse, + ListIncidentsResponse$zodSchema, +} from "../models/listincidentsop.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 Incidents_list_incidents( + client$: FireHydrantCore, + request?: ListIncidentsRequest | undefined, + options?: RequestOptions, +): APIPromise< + Result< + ListIncidentsResponse, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client$, + request, + options, + )); +} + +async function $do( + client$: FireHydrantCore, + request?: ListIncidentsRequest | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + ListIncidentsResponse, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed$ = safeParse( + request, + (value$) => ListIncidentsRequest$zodSchema.optional().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_templates": payload$?.retrospective_templates, + "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 securityInput = await extractSecurity(client$._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client$._baseURL ?? "", + operationID: "list_incidents", + oAuth2Scopes: [], + resolvedSecurity: requestSecurity, + securitySource: client$._options.security, + retryConfig: options?.retries + || client$._options.retryConfig + || { strategy: "none" }, + 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: [], + 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< + ListIncidentsResponse, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, ListIncidentsResponse$zodSchema, { + key: "IncidentEntityPaginated", + }), + )(response, req$, { extraFields: responseFields$ }); + + return [result$, { status: "complete", request: req$, response }]; +} diff --git a/src/funcs/Retrospectives_list_incident_retrospectives.ts b/src/funcs/Retrospectives_list_incident_retrospectives.ts new file mode 100644 index 0000000..3f1676c --- /dev/null +++ b/src/funcs/Retrospectives_list_incident_retrospectives.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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { + ListIncidentRetrospectivesRequest, + ListIncidentRetrospectivesRequest$zodSchema, + ListIncidentRetrospectivesResponse, + ListIncidentRetrospectivesResponse$zodSchema, +} from "../models/listincidentretrospectivesop.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 Retrospectives_list_incident_retrospectives( + client$: FireHydrantCore, + request: ListIncidentRetrospectivesRequest, + options?: RequestOptions, +): APIPromise< + Result< + ListIncidentRetrospectivesResponse, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client$, + request, + options, + )); +} + +async function $do( + client$: FireHydrantCore, + request: ListIncidentRetrospectivesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + ListIncidentRetrospectivesResponse, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed$ = safeParse( + request, + (value$) => ListIncidentRetrospectivesRequest$zodSchema.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 securityInput = await extractSecurity(client$._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client$._baseURL ?? "", + operationID: "list_incident_retrospectives", + oAuth2Scopes: [], + resolvedSecurity: requestSecurity, + securitySource: client$._options.security, + retryConfig: options?.retries + || client$._options.retryConfig + || { strategy: "none" }, + 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: [], + 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< + ListIncidentRetrospectivesResponse, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, ListIncidentRetrospectivesResponse$zodSchema, { + key: "Incidents_RetrospectiveEntityPaginated", + }), + )(response, req$, { extraFields: responseFields$ }); + + return [result$, { status: "complete", request: req$, response }]; +} diff --git a/src/funcs/Retrospectives_update_incident_retrospective_field.ts b/src/funcs/Retrospectives_update_incident_retrospective_field.ts new file mode 100644 index 0000000..f887ca9 --- /dev/null +++ b/src/funcs/Retrospectives_update_incident_retrospective_field.ts @@ -0,0 +1,185 @@ +/* + * 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 { APIError } from "../models/errors/apierror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { + UpdateIncidentRetrospectiveFieldRequest, + UpdateIncidentRetrospectiveFieldRequest$zodSchema, + UpdateIncidentRetrospectiveFieldResponse, + UpdateIncidentRetrospectiveFieldResponse$zodSchema, +} from "../models/updateincidentretrospectivefieldop.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 Retrospectives_update_incident_retrospective_field( + client$: FireHydrantCore, + request: UpdateIncidentRetrospectiveFieldRequest, + options?: RequestOptions, +): APIPromise< + Result< + UpdateIncidentRetrospectiveFieldResponse, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + return new APIPromise($do( + client$, + request, + options, + )); +} + +async function $do( + client$: FireHydrantCore, + request: UpdateIncidentRetrospectiveFieldRequest, + options?: RequestOptions, +): Promise< + [ + Result< + UpdateIncidentRetrospectiveFieldResponse, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >, + APICall, + ] +> { + const parsed$ = safeParse( + request, + (value$) => UpdateIncidentRetrospectiveFieldRequest$zodSchema.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 securityInput = await extractSecurity(client$._options.security); + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + baseURL: options?.serverURL ?? client$._baseURL ?? "", + operationID: "update_incident_retrospective_field", + oAuth2Scopes: [], + resolvedSecurity: requestSecurity, + securitySource: client$._options.security, + 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: [], + 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< + UpdateIncidentRetrospectiveFieldResponse, + | APIError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json(200, UpdateIncidentRetrospectiveFieldResponse$zodSchema, { + key: "Incidents_RetrospectiveFieldEntity", + }), + )(response, req$, { extraFields: responseFields$ }); + + return [result$, { status: "complete", request: req$, response }]; +} diff --git a/src/hooks/hooks.ts b/src/hooks/hooks.ts new file mode 100644 index 0000000..65a8f0f --- /dev/null +++ b/src/hooks/hooks.ts @@ -0,0 +1,132 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { initHooks } from "./registration.js"; +import { + AfterErrorContext, + AfterErrorHook, + AfterSuccessContext, + AfterSuccessHook, + BeforeCreateRequestContext, + BeforeCreateRequestHook, + BeforeRequestContext, + BeforeRequestHook, + Hook, + Hooks, + SDKInitHook, + SDKInitOptions, +} from "./types.js"; + +import { RequestInput } from "../lib/http.js"; + +export class SDKHooks implements Hooks { + sdkInitHooks: SDKInitHook[] = []; + beforeCreateRequestHooks: BeforeCreateRequestHook[] = []; + beforeRequestHooks: BeforeRequestHook[] = []; + afterSuccessHooks: AfterSuccessHook[] = []; + afterErrorHooks: AfterErrorHook[] = []; + + constructor() { + const presetHooks: Array = []; + + for (const hook of presetHooks) { + if ("sdkInit" in hook) { + this.registerSDKInitHook(hook); + } + if ("beforeCreateRequest" in hook) { + this.registerBeforeCreateRequestHook(hook); + } + if ("beforeRequest" in hook) { + this.registerBeforeRequestHook(hook); + } + if ("afterSuccess" in hook) { + this.registerAfterSuccessHook(hook); + } + if ("afterError" in hook) { + this.registerAfterErrorHook(hook); + } + } + initHooks(this); + } + + registerSDKInitHook(hook: SDKInitHook) { + this.sdkInitHooks.push(hook); + } + + registerBeforeCreateRequestHook(hook: BeforeCreateRequestHook) { + this.beforeCreateRequestHooks.push(hook); + } + + registerBeforeRequestHook(hook: BeforeRequestHook) { + this.beforeRequestHooks.push(hook); + } + + registerAfterSuccessHook(hook: AfterSuccessHook) { + this.afterSuccessHooks.push(hook); + } + + registerAfterErrorHook(hook: AfterErrorHook) { + this.afterErrorHooks.push(hook); + } + + sdkInit(opts: SDKInitOptions): SDKInitOptions { + return this.sdkInitHooks.reduce((opts, hook) => hook.sdkInit(opts), opts); + } + + beforeCreateRequest( + hookCtx: BeforeCreateRequestContext, + input: RequestInput, + ): RequestInput { + let inp = input; + + for (const hook of this.beforeCreateRequestHooks) { + inp = hook.beforeCreateRequest(hookCtx, inp); + } + + return inp; + } + + async beforeRequest( + hookCtx: BeforeRequestContext, + request: Request, + ): Promise { + let req = request; + + for (const hook of this.beforeRequestHooks) { + req = await hook.beforeRequest(hookCtx, req); + } + + return req; + } + + async afterSuccess( + hookCtx: AfterSuccessContext, + response: Response, + ): Promise { + let res = response; + + for (const hook of this.afterSuccessHooks) { + res = await hook.afterSuccess(hookCtx, res); + } + + return res; + } + + async afterError( + hookCtx: AfterErrorContext, + response: Response | null, + error: unknown, + ): Promise<{ response: Response | null; error: unknown }> { + let res = response; + let err = error; + + for (const hook of this.afterErrorHooks) { + const result = await hook.afterError(hookCtx, res, err); + res = result.response; + err = result.error; + } + + return { response: res, error: err }; + } +} diff --git a/src/hooks/registration.ts b/src/hooks/registration.ts new file mode 100644 index 0000000..7064973 --- /dev/null +++ b/src/hooks/registration.ts @@ -0,0 +1,14 @@ +import { Hooks } from "./types.js"; + +/* + * This file is only ever generated once on the first generation and then is free to be modified. + * Any hooks you wish to add should be registered in the initHooks function. Feel free to define them + * in this file or in separate files in the hooks folder. + */ + +// @ts-expect-error remove this line when you add your first hook and hooks is used +export function initHooks(hooks: Hooks) { + // Add hooks by calling hooks.register{ClientInit/BeforeCreateRequest/BeforeRequest/AfterSuccess/AfterError}Hook + // with an instance of a hook that implements that specific Hook interface + // Hooks are registered per SDK instance, and are valid for the lifetime of the SDK instance +} diff --git a/src/hooks/types.ts b/src/hooks/types.ts new file mode 100644 index 0000000..1d56c6f --- /dev/null +++ b/src/hooks/types.ts @@ -0,0 +1,110 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { HTTPClient, RequestInput } from "../lib/http.js"; +import { RetryConfig } from "../lib/retries.js"; +import { SecurityState } from "../lib/security.js"; + +export type HookContext = { + baseURL: string | URL; + operationID: string; + oAuth2Scopes: string[] | null; + securitySource?: any | (() => Promise); + retryConfig: RetryConfig; + resolvedSecurity: SecurityState | null; +}; + +export type Awaitable = T | Promise; + +export type SDKInitOptions = { + baseURL: URL | null; + client: HTTPClient; +}; + +export type BeforeCreateRequestContext = HookContext & {}; +export type BeforeRequestContext = HookContext & {}; +export type AfterSuccessContext = HookContext & {}; +export type AfterErrorContext = HookContext & {}; + +/** + * SDKInitHook is called when the SDK is initializing. The + * hook can return a new baseURL and HTTP client to be used by the SDK. + */ +export interface SDKInitHook { + sdkInit: (opts: SDKInitOptions) => SDKInitOptions; +} + +export interface BeforeCreateRequestHook { + /** + * A hook that is called before the SDK creates a `Request` object. The hook + * can modify how a request is constructed since certain modifications, like + * changing the request URL, cannot be done on a request object directly. + */ + beforeCreateRequest: ( + hookCtx: BeforeCreateRequestContext, + input: RequestInput, + ) => RequestInput; +} + +export interface BeforeRequestHook { + /** + * A hook that is called before the SDK sends a request. The hook can + * introduce instrumentation code such as logging, tracing and metrics or + * replace the request before it is sent or throw an error to stop the + * request from being sent. + */ + beforeRequest: ( + hookCtx: BeforeRequestContext, + request: Request, + ) => Awaitable; +} + +export interface AfterSuccessHook { + /** + * A hook that is called after the SDK receives a response. The hook can + * introduce instrumentation code such as logging, tracing and metrics or + * modify the response before it is handled or throw an error to stop the + * response from being handled. + */ + afterSuccess: ( + hookCtx: AfterSuccessContext, + response: Response, + ) => Awaitable; +} + +export interface AfterErrorHook { + /** + * A hook that is called after the SDK encounters an error, or a + * non-successful response. The hook can introduce instrumentation code such + * as logging, tracing and metrics or modify the response or error values. + */ + afterError: ( + hookCtx: AfterErrorContext, + response: Response | null, + error: unknown, + ) => Awaitable<{ + response: Response | null; + error: unknown; + }>; +} + +export interface Hooks { + /** Registers a hook to be used by the SDK for initialization event. */ + registerSDKInitHook(hook: SDKInitHook): void; + /** Registers a hook to be used by the SDK for to modify `Request` construction. */ + registerBeforeCreateRequestHook(hook: BeforeCreateRequestHook): void; + /** Registers a hook to be used by the SDK for the before request event. */ + registerBeforeRequestHook(hook: BeforeRequestHook): void; + /** Registers a hook to be used by the SDK for the after success event. */ + registerAfterSuccessHook(hook: AfterSuccessHook): void; + /** Registers a hook to be used by the SDK for the after error event. */ + registerAfterErrorHook(hook: AfterErrorHook): void; +} + +export type Hook = + | SDKInitHook + | BeforeCreateRequestHook + | BeforeRequestHook + | AfterSuccessHook + | AfterErrorHook; diff --git a/src/lib/base64.ts b/src/lib/base64.ts new file mode 100644 index 0000000..c2d5b38 --- /dev/null +++ b/src/lib/base64.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export function bytesToBase64(u8arr: Uint8Array): string { + return btoa(String.fromCodePoint(...u8arr)); +} + +export function bytesFromBase64(encoded: string): Uint8Array { + return Uint8Array.from(atob(encoded), (c) => c.charCodeAt(0)); +} + +export function stringToBytes(str: string): Uint8Array { + return new TextEncoder().encode(str); +} + +export function stringFromBytes(u8arr: Uint8Array): string { + return new TextDecoder().decode(u8arr); +} + +export function stringToBase64(str: string): string { + return bytesToBase64(stringToBytes(str)); +} + +export function stringFromBase64(b64str: string): string { + return stringFromBytes(bytesFromBase64(b64str)); +} + +export const zodOutbound = z + .instanceof(Uint8Array) + .or(z.string().transform(stringToBytes)); + +export const zodInbound = z + .instanceof(Uint8Array) + .or(z.string().transform(bytesFromBase64)); diff --git a/src/lib/config.ts b/src/lib/config.ts new file mode 100644 index 0000000..ad0f115 --- /dev/null +++ b/src/lib/config.ts @@ -0,0 +1,65 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { Security } from "../models/security.js"; +import { HTTPClient } from "./http.js"; +import { Logger } from "./logger.js"; +import { RetryConfig } from "./retries.js"; +import { Params, pathToFunc } from "./url.js"; + +/** + * Contains the list of servers available to the SDK + */ +export const ServerList = [ + "https://api.firehydrant.io/", +] as const; + +export type SDKOptions = { + /** + * The security details required to authenticate the SDK + */ + security?: Security | (() => Promise) | undefined; + + httpClient?: HTTPClient; + /** + * Allows overriding the default server used by the SDK + */ + serverIdx?: number | undefined; + /** + * Allows overriding the default server URL used by the SDK + */ + serverURL?: string | undefined; + /** + * Allows overriding the default retry config used by the SDK + */ + retryConfig?: RetryConfig; + timeoutMs?: number; + debugLogger?: Logger; +}; + +export function serverURLFromOptions(options: SDKOptions): URL | null { + let serverURL = options.serverURL; + + const params: Params = {}; + + if (!serverURL) { + const serverIdx = options.serverIdx ?? 0; + if (serverIdx < 0 || serverIdx >= ServerList.length) { + throw new Error(`Invalid server index ${serverIdx}`); + } + serverURL = ServerList[serverIdx] || ""; + } + + const u = pathToFunc(serverURL)(params); + return new URL(u); +} + +export const SDK_METADATA = { + language: "typescript", + openapiDocVersion: "0.0.1", + sdkVersion: "0.0.1-beta.1", + genVersion: "2.634.2", + userAgent: + "speakeasy-sdk/mcp-typescript 0.0.1-beta.1 2.634.2 0.0.1 firehydrant-mcp", +} as const; diff --git a/src/lib/dlv.ts b/src/lib/dlv.ts new file mode 100644 index 0000000..e81091f --- /dev/null +++ b/src/lib/dlv.ts @@ -0,0 +1,53 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +/* +MIT License + +Copyright (c) 2024 Jason Miller (http://jasonformat.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +/** + * @param obj The object to walk + * @param key The key path to walk the object with + * @param def A default value to return if the result is undefined + * + * @example + * dlv(obj, "a.b.c.d") + * @example + * dlv(object, ["a", "b", "c", "d"]) + * @example + * dlv(object, "foo.bar.baz", "Hello, default value!") + */ +export function dlv( + obj: any, + key: string | string[], + def?: T, + p?: number, + undef?: never, +): T | undefined { + key = Array.isArray(key) ? key : key.split("."); + for (p = 0; p < key.length; p++) { + const k = key[p]; + obj = k != null && obj ? obj[k] : undef; + } + return obj === undef ? def : obj; +} diff --git a/src/lib/encodings.ts b/src/lib/encodings.ts new file mode 100644 index 0000000..25c9dcb --- /dev/null +++ b/src/lib/encodings.ts @@ -0,0 +1,483 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { bytesToBase64 } from "./base64.js"; +import { isPlainObject } from "./is-plain-object.js"; + +export class EncodingError extends Error { + constructor(message: string) { + super(message); + this.name = "EncodingError"; + } +} + +export function encodeMatrix( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +): 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 encValue: string | null | undefined = null; + + if (pv == null) { + return; + } else if (Array.isArray(pv)) { + encValue = mapDefined(pv, (v) => `${encodeValue(v)}`)?.join(","); + } else if (isPlainObject(pv)) { + const mapped = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + return `,${encodeString(k)},${encodeValue(v)}`; + }); + 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 + if (tmp === `${keyPrefix}=`) { + tmp = tmp.slice(0, -1); + } + + // If we end up with the nothing then skip forward + if (!tmp) { + return; + } + + out += `;${tmp}`; + }); + + return out; +} + +export function encodeLabel( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +): 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: string | null | undefined = ""; + + if (pv == null) { + return; + } else if (Array.isArray(pv)) { + encValue = mapDefined(pv, (v) => `${encodeValue(v)}`)?.join("."); + } else if (isPlainObject(pv)) { + const mapped = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + return `.${encodeString(k)}.${encodeValue(v)}`; + }); + encValue = mapped?.join("").slice(1); + } else { + const k = + options?.explode && isPlainObject(value) ? `${encodeString(pk)}=` : ""; + encValue = `${k}${encodeValue(pv)}`; + } + + out += encValue == null ? "" : `.${encValue}`; + }); + + return out; +} + +type FormEncoder = ( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +) => string | undefined; + +function formEncoder(sep: string): FormEncoder { + return ( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, + ) => { + 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)); + + const encodedSep = encodeString(sep); + + pairs.forEach(([pk, pv]) => { + let tmp = ""; + let encValue: string | null | undefined = null; + + if (pv == null) { + return; + } else if (Array.isArray(pv)) { + 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); + } else { + encValue = `${encodeValue(pv)}`; + } + + if (encValue == null) { + return; + } + + tmp = `${encodeString(pk)}=${encValue}`; + + // If we end up with the nothing then skip forward + if (!tmp || tmp === "=") { + return; + } + + out += `&${tmp}`; + }); + + return out.slice(1); + }; +} + +export const encodeForm = formEncoder(","); +export const encodeSpaceDelimited = formEncoder(" "); +export const encodePipeDelimited = formEncoder("|"); + +export function encodeBodyForm( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +): string { + let out = ""; + const pairs: [string, unknown][] = options?.explode + ? explode(key, value) + : [[key, value]]; + + 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 encValue = ""; + + if (pv == null) { + return; + } else if (Array.isArray(pv)) { + encValue = JSON.stringify(pv, jsonReplacer); + } else if (isPlainObject(pv)) { + encValue = JSON.stringify(pv, jsonReplacer); + } else { + encValue = `${encodeValue(pv)}`; + } + + tmp = `${encodeString(pk)}=${encValue}`; + + // If we end up with the nothing then skip forward + if (!tmp || tmp === "=") { + return; + } + + out += `&${tmp}`; + }); + + return out.slice(1); +} + +export function encodeDeepObject( + key: string, + value: unknown, + options?: { charEncoding?: "percent" | "none" }, +): string | undefined { + if (value == null) { + return; + } + + if (!isPlainObject(value)) { + throw new EncodingError( + `Value of parameter '${key}' which uses deepObject encoding must be an object or null`, + ); + } + + return encodeDeepObjectObject(key, value, options); +} + +export function encodeDeepObjectObject( + key: string, + value: unknown, + options?: { charEncoding?: "percent" | "none" }, +): string | undefined { + if (value == null) { + return; + } + + let out = ""; + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + + if (!isPlainObject(value)) { + throw new EncodingError(`Expected parameter '${key}' to be an object.`); + } + + Object.entries(value).forEach(([ck, cv]) => { + if (cv == null) { + return; + } + + const pk = `${key}[${ck}]`; + + if (isPlainObject(cv)) { + const objOut = encodeDeepObjectObject(pk, cv, options); + + out += objOut == null ? "" : `&${objOut}`; + + return; + } + + const pairs: unknown[] = Array.isArray(cv) ? cv : [cv]; + const encoded = mapDefined(pairs, (v) => { + return `${encodeString(pk)}=${encodeString(serializeValue(v))}`; + })?.join("&"); + + out += encoded == null ? "" : `&${encoded}`; + }); + + return out.slice(1); +} + +export function encodeJSON( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +): string | undefined { + if (typeof value === "undefined") { + return; + } + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + + const encVal = encodeString(JSON.stringify(value, jsonReplacer)); + + return options?.explode ? encVal : `${encodeString(key)}=${encVal}`; +} + +export const encodeSimple = ( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +): 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: string | null | undefined = ""; + + if (pv == null) { + return; + } else if (Array.isArray(pv)) { + tmp = mapDefined(pv, (v) => `${encodeValue(v)}`)?.join(","); + } else if (isPlainObject(pv)) { + const mapped = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + return `,${encodeString(k)},${encodeValue(v)}`; + }); + tmp = mapped?.join("").slice(1); + } else { + const k = options?.explode && isPlainObject(value) ? `${pk}=` : ""; + tmp = `${k}${encodeValue(pv)}`; + } + + out += tmp ? `,${tmp}` : ""; + }); + + return out.slice(1); +}; + +function explode(key: string, value: unknown): [string, unknown][] { + if (Array.isArray(value)) { + return value.map((v) => [key, v]); + } else if (isPlainObject(value)) { + const o = value ?? {}; + return Object.entries(o).map(([k, v]) => [k, v]); + } else { + return [[key, value]]; + } +} + +function serializeValue(value: unknown): string { + if (value == null) { + return ""; + } else if (value instanceof Date) { + return value.toISOString(); + } else if (value instanceof Uint8Array) { + return bytesToBase64(value); + } else if (typeof value === "object") { + return JSON.stringify(value, jsonReplacer); + } + + return `${value}`; +} + +function jsonReplacer(_: string, value: unknown): unknown { + if (value instanceof Uint8Array) { + return bytesToBase64(value); + } else { + return value; + } +} + +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 == null) { + return acc; + } + + acc.push(m); + + return acc; + }, []); + + return res.length ? res : null; +} + +function mapDefinedEntries( + inp: Iterable<[K, V]>, + mapper: (v: [K, V]) => R, +): R[] | null { + const acc: R[] = []; + for (const [k, v] of inp) { + if (v == null) { + continue; + } + + const m = mapper([k, v]); + if (m == null) { + continue; + } + + acc.push(m); + } + + return acc.length ? acc : null; +} + +export function queryJoin(...args: (string | undefined)[]): string { + return args.filter(Boolean).join("&"); +} + +type QueryEncoderOptions = { + explode?: boolean; + charEncoding?: "percent" | "none"; +}; + +type QueryEncoder = ( + key: string, + value: unknown, + options?: QueryEncoderOptions, +) => string | undefined; + +type BulkQueryEncoder = ( + values: Record, + options?: QueryEncoderOptions, +) => string; + +export function queryEncoder(f: QueryEncoder): BulkQueryEncoder { + const bulkEncode = function ( + values: Record, + options?: QueryEncoderOptions, + ): string { + const opts: QueryEncoderOptions = { + ...options, + explode: options?.explode ?? true, + charEncoding: options?.charEncoding ?? "percent", + }; + + const encoded = Object.entries(values).map(([key, value]) => { + return f(key, value, opts); + }); + return queryJoin(...encoded); + }; + + return bulkEncode; +} + +export const encodeJSONQuery = queryEncoder(encodeJSON); +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/files.ts b/src/lib/files.ts new file mode 100644 index 0000000..0344cd0 --- /dev/null +++ b/src/lib/files.ts @@ -0,0 +1,82 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +/** + * Consumes a stream and returns a concatenated array buffer. Useful in + * situations where we need to read the whole file because it forms part of a + * larger payload containing other fields, and we can't modify the underlying + * request structure. + */ +export async function readableStreamToArrayBuffer( + readable: ReadableStream, +): Promise { + const reader = readable.getReader(); + const chunks: Uint8Array[] = []; + + let totalLength = 0; + let done = false; + + while (!done) { + const { value, done: doneReading } = await reader.read(); + + if (doneReading) { + done = true; + } else { + chunks.push(value); + totalLength += value.length; + } + } + + const concatenatedChunks = new Uint8Array(totalLength); + let offset = 0; + + for (const chunk of chunks) { + concatenatedChunks.set(chunk, offset); + offset += chunk.length; + } + + return concatenatedChunks.buffer as ArrayBuffer; +} + +/** + * Determines the MIME content type based on a file's extension. + * Returns null if the extension is not recognized. + */ +export function getContentTypeFromFileName(fileName: string): string | null { + if (!fileName) return null; + + const ext = fileName.toLowerCase().split(".").pop(); + if (!ext) return null; + + const mimeTypes: Record = { + json: "application/json", + xml: "application/xml", + html: "text/html", + htm: "text/html", + txt: "text/plain", + csv: "text/csv", + pdf: "application/pdf", + png: "image/png", + jpg: "image/jpeg", + jpeg: "image/jpeg", + gif: "image/gif", + svg: "image/svg+xml", + js: "application/javascript", + css: "text/css", + zip: "application/zip", + tar: "application/x-tar", + gz: "application/gzip", + mp4: "video/mp4", + mp3: "audio/mpeg", + wav: "audio/wav", + webp: "image/webp", + ico: "image/x-icon", + woff: "font/woff", + woff2: "font/woff2", + ttf: "font/ttf", + otf: "font/otf", + }; + + return mimeTypes[ext] || null; +} diff --git a/src/lib/http.ts b/src/lib/http.ts new file mode 100644 index 0000000..13cf1fd --- /dev/null +++ b/src/lib/http.ts @@ -0,0 +1,323 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export type Fetcher = ( + input: RequestInfo | URL, + init?: RequestInit, +) => Promise; + +export type Awaitable = T | Promise; + +const DEFAULT_FETCHER: Fetcher = (input, init) => { + // If input is a Request and init is undefined, Bun will discard the method, + // headers, body and other options that were set on the request object. + // Node.js and browers would ignore an undefined init value. This check is + // therefore needed for interop with Bun. + if (init == null) { + return fetch(input); + } else { + return fetch(input, init); + } +}; + +export type RequestInput = { + /** + * The URL the request will use. + */ + url: URL; + /** + * Options used to create a [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request). + */ + options?: RequestInit | undefined; +}; + +export interface HTTPClientOptions { + fetcher?: Fetcher; +} + +export type BeforeRequestHook = (req: Request) => Awaitable; +export type RequestErrorHook = (err: unknown, req: Request) => Awaitable; +export type ResponseHook = (res: Response, req: Request) => Awaitable; + +export class HTTPClient { + private fetcher: Fetcher; + private requestHooks: BeforeRequestHook[] = []; + private requestErrorHooks: RequestErrorHook[] = []; + private responseHooks: ResponseHook[] = []; + + constructor(private options: HTTPClientOptions = {}) { + this.fetcher = options.fetcher || DEFAULT_FETCHER; + } + + async request(request: Request): Promise { + let req = request; + for (const hook of this.requestHooks) { + const nextRequest = await hook(req); + if (nextRequest) { + req = nextRequest; + } + } + + try { + const res = await this.fetcher(req); + + for (const hook of this.responseHooks) { + await hook(res, req); + } + + return res; + } catch (err) { + for (const hook of this.requestErrorHooks) { + await hook(err, req); + } + + throw err; + } + } + + /** + * Registers a hook that is called before a request is made. The hook function + * can mutate the request or return a new request. This may be useful to add + * additional information to request such as request IDs and tracing headers. + */ + addHook(hook: "beforeRequest", fn: BeforeRequestHook): this; + /** + * Registers a hook that is called when a request cannot be made due to a + * network error. + */ + addHook(hook: "requestError", fn: RequestErrorHook): this; + /** + * Registers a hook that is called when a response has been received from the + * server. + */ + addHook(hook: "response", fn: ResponseHook): this; + addHook( + ...args: + | [hook: "beforeRequest", fn: BeforeRequestHook] + | [hook: "requestError", fn: RequestErrorHook] + | [hook: "response", fn: ResponseHook] + ) { + if (args[0] === "beforeRequest") { + this.requestHooks.push(args[1]); + } else if (args[0] === "requestError") { + this.requestErrorHooks.push(args[1]); + } else if (args[0] === "response") { + this.responseHooks.push(args[1]); + } else { + throw new Error(`Invalid hook type: ${args[0]}`); + } + return this; + } + + /** Removes a hook that was previously registered with `addHook`. */ + removeHook(hook: "beforeRequest", fn: BeforeRequestHook): this; + /** Removes a hook that was previously registered with `addHook`. */ + removeHook(hook: "requestError", fn: RequestErrorHook): this; + /** Removes a hook that was previously registered with `addHook`. */ + removeHook(hook: "response", fn: ResponseHook): this; + removeHook( + ...args: + | [hook: "beforeRequest", fn: BeforeRequestHook] + | [hook: "requestError", fn: RequestErrorHook] + | [hook: "response", fn: ResponseHook] + ): this { + let target: unknown[]; + if (args[0] === "beforeRequest") { + target = this.requestHooks; + } else if (args[0] === "requestError") { + target = this.requestErrorHooks; + } else if (args[0] === "response") { + target = this.responseHooks; + } else { + throw new Error(`Invalid hook type: ${args[0]}`); + } + + const index = target.findIndex((v) => v === args[1]); + if (index >= 0) { + target.splice(index, 1); + } + + return this; + } + + clone(): HTTPClient { + const child = new HTTPClient(this.options); + child.requestHooks = this.requestHooks.slice(); + child.requestErrorHooks = this.requestErrorHooks.slice(); + child.responseHooks = this.responseHooks.slice(); + + return child; + } +} + +export type StatusCodePredicate = number | string | (number | string)[]; + +// A semicolon surrounded by optional whitespace characters is used to separate +// segments in a media type string. +const mediaParamSeparator = /\s*;\s*/g; + +export function matchContentType(response: Response, pattern: string): boolean { + // `*` is a special case which means anything is acceptable. + if (pattern === "*") { + return true; + } + + let contentType = + response.headers.get("content-type")?.trim() || "application/octet-stream"; + contentType = contentType.toLowerCase(); + + const wantParts = pattern.toLowerCase().trim().split(mediaParamSeparator); + const [wantType = "", ...wantParams] = wantParts; + + if (wantType.split("/").length !== 2) { + return false; + } + + const gotParts = contentType.split(mediaParamSeparator); + const [gotType = "", ...gotParams] = gotParts; + + const [type = "", subtype = ""] = gotType.split("/"); + if (!type || !subtype) { + return false; + } + + if ( + wantType !== "*/*" && + gotType !== wantType && + `${type}/*` !== wantType && + `*/${subtype}` !== wantType + ) { + return false; + } + + if (gotParams.length < wantParams.length) { + return false; + } + + const params = new Set(gotParams); + for (const wantParam of wantParams) { + if (!params.has(wantParam)) { + return false; + } + } + + return true; +} + +const codeRangeRE = new RegExp("^[0-9]xx$", "i"); + +export function matchStatusCode( + response: Response, + codes: StatusCodePredicate, +): boolean { + const actual = `${response.status}`; + const expectedCodes = Array.isArray(codes) ? codes : [codes]; + if (!expectedCodes.length) { + return false; + } + + return expectedCodes.some((ec) => { + const code = `${ec}`; + + if (code === "default") { + return true; + } + + if (!codeRangeRE.test(`${code}`)) { + return code === actual; + } + + const expectFamily = code.charAt(0); + if (!expectFamily) { + throw new Error("Invalid status code range"); + } + + const actualFamily = actual.charAt(0); + if (!actualFamily) { + throw new Error(`Invalid response status code: ${actual}`); + } + + return actualFamily === expectFamily; + }); +} + +export function matchResponse( + response: Response, + code: StatusCodePredicate, + contentTypePattern: string, +): boolean { + return ( + matchStatusCode(response, code) && + matchContentType(response, contentTypePattern) + ); +} + +/** + * Uses various heurisitics to determine if an error is a connection error. + */ +export function isConnectionError(err: unknown): boolean { + if (typeof err !== "object" || err == null) { + return false; + } + + // Covers fetch in Deno as well + const isBrowserErr = + err instanceof TypeError && + err.message.toLowerCase().startsWith("failed to fetch"); + + const isNodeErr = + err instanceof TypeError && + err.message.toLowerCase().startsWith("fetch failed"); + + const isBunErr = "name" in err && err.name === "ConnectionError"; + + const isGenericErr = + "code" in err && + typeof err.code === "string" && + err.code.toLowerCase() === "econnreset"; + + return isBrowserErr || isNodeErr || isGenericErr || isBunErr; +} + +/** + * Uses various heurisitics to determine if an error is a timeout error. + */ +export function isTimeoutError(err: unknown): boolean { + if (typeof err !== "object" || err == null) { + return false; + } + + // Fetch in browser, Node.js, Bun, Deno + const isNative = "name" in err && err.name === "TimeoutError"; + const isLegacyNative = "code" in err && err.code === 23; + + // Node.js HTTP client and Axios + const isGenericErr = + "code" in err && + typeof err.code === "string" && + err.code.toLowerCase() === "econnaborted"; + + return isNative || isLegacyNative || isGenericErr; +} + +/** + * Uses various heurisitics to determine if an error is a abort error. + */ +export function isAbortError(err: unknown): boolean { + if (typeof err !== "object" || err == null) { + return false; + } + + // Fetch in browser, Node.js, Bun, Deno + const isNative = "name" in err && err.name === "AbortError"; + const isLegacyNative = "code" in err && err.code === 20; + + // Node.js HTTP client and Axios + const isGenericErr = + "code" in err && + typeof err.code === "string" && + err.code.toLowerCase() === "econnaborted"; + + return isNative || isLegacyNative || isGenericErr; +} diff --git a/src/lib/is-plain-object.ts b/src/lib/is-plain-object.ts new file mode 100644 index 0000000..61070d3 --- /dev/null +++ b/src/lib/is-plain-object.ts @@ -0,0 +1,43 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +/* +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +// Taken from https://github.com/sindresorhus/is-plain-obj/blob/97f38e8836f86a642cce98fc6ab3058bc36df181/index.js + +export function isPlainObject(value: unknown): value is object { + if (typeof value !== "object" || value === null) { + return false; + } + + const prototype = Object.getPrototypeOf(value); + return ( + (prototype === null || + prototype === Object.prototype || + Object.getPrototypeOf(prototype) === null) && + !(Symbol.toStringTag in value) && + !(Symbol.iterator in value) + ); +} diff --git a/src/lib/logger.ts b/src/lib/logger.ts new file mode 100644 index 0000000..d181f29 --- /dev/null +++ b/src/lib/logger.ts @@ -0,0 +1,9 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export interface Logger { + group(label?: string): void; + groupEnd(): void; + log(message: any, ...args: any[]): void; +} diff --git a/src/lib/matchers.ts b/src/lib/matchers.ts new file mode 100644 index 0000000..9445d64 --- /dev/null +++ b/src/lib/matchers.ts @@ -0,0 +1,345 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { APIError } from "../models/errors/apierror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { Result } from "../types/fp.js"; +import { matchResponse, matchStatusCode, StatusCodePredicate } from "./http.js"; +import { isPlainObject } from "./is-plain-object.js"; +import { safeParse } from "./schemas.js"; + +export type Encoding = + | "jsonl" + | "json" + | "text" + | "bytes" + | "stream" + | "sse" + | "nil" + | "fail"; + +const DEFAULT_CONTENT_TYPES: Record = { + jsonl: "application/jsonl", + json: "application/json", + text: "text/plain", + bytes: "application/octet-stream", + stream: "application/octet-stream", + sse: "text/event-stream", + nil: "*", + fail: "*", +}; + +type Schema = { parse(raw: unknown): T }; + +type MatchOptions = { + ctype?: string; + hdrs?: boolean; + key?: string; + sseSentinel?: string; +}; + +export type ValueMatcher = MatchOptions & { + enc: Encoding; + codes: StatusCodePredicate; + schema: Schema; +}; + +export type ErrorMatcher = MatchOptions & { + enc: Encoding; + codes: StatusCodePredicate; + schema: Schema; + err: true; +}; + +export type FailMatcher = { + enc: "fail"; + codes: StatusCodePredicate; +}; + +export type Matcher = ValueMatcher | ErrorMatcher | FailMatcher; + +export function jsonErr( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ErrorMatcher { + return { ...options, err: true, enc: "json", codes, schema }; +} +export function json( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ValueMatcher { + 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, + options?: MatchOptions, +): ErrorMatcher { + return { ...options, err: true, enc: "text", codes, schema }; +} +export function text( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ValueMatcher { + return { ...options, enc: "text", codes, schema }; +} + +export function bytesErr( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ErrorMatcher { + return { ...options, err: true, enc: "bytes", codes, schema }; +} +export function bytes( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ValueMatcher { + return { ...options, enc: "bytes", codes, schema }; +} + +export function streamErr( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ErrorMatcher { + return { ...options, err: true, enc: "stream", codes, schema }; +} +export function stream( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ValueMatcher { + return { ...options, enc: "stream", codes, schema }; +} + +export function sseErr( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ErrorMatcher { + return { ...options, err: true, enc: "sse", codes, schema }; +} +export function sse( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ValueMatcher { + return { ...options, enc: "sse", codes, schema }; +} + +export function nilErr( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ErrorMatcher { + return { ...options, err: true, enc: "nil", codes, schema }; +} +export function nil( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ValueMatcher { + return { ...options, enc: "nil", codes, schema }; +} + +export function fail(codes: StatusCodePredicate): FailMatcher { + return { enc: "fail", codes }; +} + +export type MatchedValue = Matchers extends Matcher[] + ? T + : never; +export type MatchedError = Matchers extends Matcher[] + ? E + : never; +export type MatchFunc = ( + response: Response, + request: Request, + options?: { resultKey?: string; extraFields?: Record }, +) => Promise<[result: Result, raw: unknown]>; + +export function match( + ...matchers: Array> +): MatchFunc { + return async function matchFunc( + response: Response, + request: Request, + options?: { resultKey?: string; extraFields?: Record }, + ): Promise< + [result: Result, raw: unknown] + > { + let raw: unknown; + let matcher: Matcher | undefined; + for (const match of matchers) { + const { codes } = match; + const ctpattern = "ctype" in match + ? match.ctype + : DEFAULT_CONTENT_TYPES[match.enc]; + if (ctpattern && matchResponse(response, codes, ctpattern)) { + matcher = match; + break; + } else if (!ctpattern && matchStatusCode(response, codes)) { + matcher = match; + break; + } + } + + if (!matcher) { + await discardResponseBody(response); + return [{ + ok: false, + error: new APIError("Unexpected API response status or content-type", { + response, + request, + }), + }, raw]; + } + + const encoding = matcher.enc; + switch (encoding) { + case "json": + raw = await response.json(); + break; + case "jsonl": + raw = response.body; + break; + case "bytes": + raw = new Uint8Array(await response.arrayBuffer()); + break; + case "stream": + raw = response.body; + break; + case "text": + raw = await response.text(); + break; + case "sse": + raw = response.body; + break; + case "nil": + raw = await discardResponseBody(response); + break; + case "fail": + raw = await discardResponseBody(response); + break; + default: + encoding satisfies never; + throw new Error(`Unsupported response type: ${encoding}`); + } + + if (matcher.enc === "fail") { + return [{ + ok: false, + error: new APIError("API error occurred", { response, request }), + }, raw]; + } + + const resultKey = matcher.key || options?.resultKey; + let data: unknown; + + if ("err" in matcher) { + data = { + ...options?.extraFields, + ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), + ...(isPlainObject(raw) ? raw : null), + ContentType: response.headers.get("content-type") || "", + StatusCode: response.status, + RawResponse: response, + }; + } else if (resultKey) { + data = { + ...options?.extraFields, + ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), + [resultKey]: raw, + ContentType: response.headers.get("content-type") || "", + StatusCode: response.status, + RawResponse: response, + }; + } else { + data = { + ...options?.extraFields, + ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), + ContentType: response.headers.get("content-type") || "", + StatusCode: response.status, + RawResponse: response, + }; + } + + if ("err" in matcher) { + const result = safeParse( + data, + (v: unknown) => matcher.schema.parse(v), + "Response validation failed", + ); + return [result.ok ? { ok: false, error: result.value } : result, raw]; + } else { + return [ + safeParse( + data, + (v: unknown) => matcher.schema.parse(v), + "Response validation failed", + ), + raw, + ]; + } + }; +} + +const headerValRE = /, */; +/** + * Iterates over a Headers object and returns an object with all the header + * entries. Values are represented as an array to account for repeated headers. + */ +export function unpackHeaders(headers: Headers): Record { + const out: Record = {}; + + for (const [k, v] of headers.entries()) { + out[k] = v.split(headerValRE); + } + + return out; +} + +/** + * Discards the response body to free up resources. + * + * To learn why this is need, see the undici docs: + * https://undici.nodejs.org/#/?id=garbage-collection + */ +export async function discardResponseBody(res: Response) { + const reader = res.body?.getReader(); + if (reader == null) { + return; + } + + try { + let done = false; + while (!done) { + const res = await reader.read(); + done = res.done; + } + } finally { + reader.releaseLock(); + } +} diff --git a/src/lib/primitives.ts b/src/lib/primitives.ts new file mode 100644 index 0000000..668ab9d --- /dev/null +++ b/src/lib/primitives.ts @@ -0,0 +1,113 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +class InvariantError extends Error { + constructor(message: string) { + super(message); + this.name = "InvariantError"; + } +} + +export type ExactPartial = { + [P in keyof T]?: T[P] | undefined; +}; + +export function abortSignalAny(signals: AbortSignal[]): AbortSignal { + const controller = new AbortController(); + const result = controller.signal; + if (!signals.length) { + return controller.signal; + } + + if (signals.length === 1) { + return signals[0] || controller.signal; + } + + for (const signal of signals) { + if (signal.aborted) { + return signal; + } + } + + function abort(this: AbortSignal) { + controller.abort(this.reason); + clean(); + } + + const signalRefs: WeakRef[] = []; + function clean() { + for (const signalRef of signalRefs) { + const signal = signalRef.deref(); + if (signal) { + signal.removeEventListener("abort", abort); + } + } + } + + for (const signal of signals) { + signalRefs.push(new WeakRef(signal)); + signal.addEventListener("abort", abort); + } + + return result; +} + +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>; +} + +export function combineSignals( + ...signals: Array +): AbortSignal | null { + const filtered: AbortSignal[] = []; + for (const signal of signals) { + if (signal) { + filtered.push(signal); + } + } + + switch (filtered.length) { + case 0: + case 1: + return filtered[0] || null; + default: + if ("any" in AbortSignal && typeof AbortSignal.any === "function") { + return AbortSignal.any(filtered); + } + return abortSignalAny(filtered); + } +} + +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 invariant( + condition: unknown, + message: string, +): asserts condition { + if (!condition) { + throw new InvariantError(message); + } +} diff --git a/src/lib/result.ts b/src/lib/result.ts new file mode 100644 index 0000000..ccbe51e --- /dev/null +++ b/src/lib/result.ts @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +/** + * A monad that captures the result of a function call or an error if it was not + * successful. Railway programming, enabled by this type, can be a nicer + * alternative to traditional exception throwing because it allows functions to + * declare all _known_ errors with static types and then check for them + * exhaustively in application code. Thrown exception have a type of `unknown` + * and break out of regular control flow of programs making them harder to + * inspect and more verbose work with due to try-catch blocks. + */ +export type Result = + | { ok: true; value: T; error?: never } + | { ok: false; value?: never; error: E }; + +export function OK(value: V): Result { + return { ok: true, value }; +} + +export function ERR(error: E): Result { + return { ok: false, error }; +} + +/** + * unwrap is a convenience function for extracting a value from a result or + * throwing if there was an error. + */ +export function unwrap(r: Result): T { + if (!r.ok) { + throw r.error; + } + return r.value; +} + +/** + * unwrapAsync is a convenience function for resolving a value from a Promise + * of a result or rejecting if an error occurred. + */ +export async function unwrapAsync( + pr: Promise>, +): Promise { + const r = await pr; + if (!r.ok) { + throw r.error; + } + + return r.value; +} diff --git a/src/lib/retries.ts b/src/lib/retries.ts new file mode 100644 index 0000000..e3ce9ab --- /dev/null +++ b/src/lib/retries.ts @@ -0,0 +1,218 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { isConnectionError, isTimeoutError } from "./http.js"; + +export type BackoffStrategy = { + initialInterval: number; + maxInterval: number; + exponent: number; + maxElapsedTime: number; +}; + +const defaultBackoff: BackoffStrategy = { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, +}; + +export type RetryConfig = + | { strategy: "none" } + | { + strategy: "backoff"; + backoff?: BackoffStrategy; + retryConnectionErrors?: boolean; + }; + +/** + * PermanentError is an error that is not recoverable. Throwing this error will + * cause a retry loop to terminate. + */ +export class PermanentError extends Error { + /** The underlying cause of the error. */ + override readonly cause: unknown; + + constructor(message: string, options?: { cause?: unknown }) { + let msg = message; + if (options?.cause) { + msg += `: ${options.cause}`; + } + + super(msg, options); + this.name = "PermanentError"; + // In older runtimes, the cause field would not have been assigned through + // the super() call. + if (typeof this.cause === "undefined") { + this.cause = options?.cause; + } + + Object.setPrototypeOf(this, PermanentError.prototype); + } +} + +/** + * TemporaryError is an error is used to signal that an HTTP request can be + * retried as part of a retry loop. If retry attempts are exhausted and this + * error is thrown, the response will be returned to the caller. + */ +export class TemporaryError extends Error { + response: Response; + + constructor(message: string, response: Response) { + super(message); + this.response = response; + this.name = "TemporaryError"; + + Object.setPrototypeOf(this, TemporaryError.prototype); + } +} + +export async function retry( + fetchFn: () => Promise, + options: { + config: RetryConfig; + statusCodes: string[]; + }, +): Promise { + switch (options.config.strategy) { + case "backoff": + return retryBackoff( + wrapFetcher(fetchFn, { + statusCodes: options.statusCodes, + retryConnectionErrors: !!options.config.retryConnectionErrors, + }), + options.config.backoff ?? defaultBackoff, + ); + default: + return await fetchFn(); + } +} + +function wrapFetcher( + fn: () => Promise, + options: { + statusCodes: string[]; + retryConnectionErrors: boolean; + }, +): () => Promise { + return async () => { + try { + const res = await fn(); + if (isRetryableResponse(res, options.statusCodes)) { + throw new TemporaryError( + "Response failed with retryable status code", + res, + ); + } + + return res; + } catch (err: unknown) { + if (err instanceof TemporaryError) { + throw err; + } + + if ( + options.retryConnectionErrors && + (isTimeoutError(err) || isConnectionError(err)) + ) { + throw err; + } + + throw new PermanentError("Permanent error", { cause: err }); + } + }; +} + +const codeRangeRE = new RegExp("^[0-9]xx$", "i"); + +function isRetryableResponse(res: Response, statusCodes: string[]): boolean { + const actual = `${res.status}`; + + return statusCodes.some((code) => { + if (!codeRangeRE.test(code)) { + return code === actual; + } + + const expectFamily = code.charAt(0); + if (!expectFamily) { + throw new Error("Invalid status code range"); + } + + const actualFamily = actual.charAt(0); + if (!actualFamily) { + throw new Error(`Invalid response status code: ${actual}`); + } + + return actualFamily === expectFamily; + }); +} + +async function retryBackoff( + fn: () => Promise, + strategy: BackoffStrategy, +): Promise { + const { maxElapsedTime, initialInterval, exponent, maxInterval } = strategy; + + const start = Date.now(); + let x = 0; + + while (true) { + try { + const res = await fn(); + return res; + } catch (err: unknown) { + if (err instanceof PermanentError) { + throw err.cause; + } + const elapsed = Date.now() - start; + if (elapsed > maxElapsedTime) { + if (err instanceof TemporaryError) { + return err.response; + } + + throw err; + } + + let retryInterval = 0; + if (err instanceof TemporaryError) { + retryInterval = retryIntervalFromResponse(err.response); + } + + if (retryInterval <= 0) { + retryInterval = + initialInterval * Math.pow(x, exponent) + Math.random() * 1000; + } + + const d = Math.min(retryInterval, maxInterval); + + await delay(d); + x++; + } + } +} + +function retryIntervalFromResponse(res: Response): number { + const retryVal = res.headers.get("retry-after") || ""; + if (!retryVal) { + return 0; + } + + const parsedNumber = Number(retryVal); + if (Number.isInteger(parsedNumber)) { + return parsedNumber * 1000; + } + + const parsedDate = Date.parse(retryVal); + if (Number.isInteger(parsedDate)) { + const deltaMS = parsedDate - Date.now(); + return deltaMS > 0 ? Math.ceil(deltaMS) : 0; + } + + return 0; +} + +async function delay(delay: number): Promise { + return new Promise((resolve) => setTimeout(resolve, delay)); +} diff --git a/src/lib/schemas.ts b/src/lib/schemas.ts new file mode 100644 index 0000000..4a12c5f --- /dev/null +++ b/src/lib/schemas.ts @@ -0,0 +1,91 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { + output, + ZodEffects, + ZodError, + ZodObject, + ZodRawShape, + ZodTypeAny, +} from "zod"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import { ERR, OK, Result } from "../types/fp.js"; + +export function collectExtraKeys< + Shape extends ZodRawShape, + Catchall extends ZodTypeAny, + K extends string, +>( + obj: ZodObject, + extrasKey: K, + optional: boolean, +): ZodEffects< + typeof obj, + & output> + & { + [k in K]: Record>; + } +> { + return obj.transform((val) => { + const extras: Record> = {}; + const { shape } = obj; + for (const [key] of Object.entries(val)) { + if (key in shape) { + continue; + } + + const v = val[key]; + if (typeof v === "undefined") { + continue; + } + + extras[key] = v; + delete val[key]; + } + + if (optional && Object.keys(extras).length === 0) { + return val; + } + + return { ...val, [extrasKey]: extras }; + }); +} + +/** + * Utility function that executes some code which may throw a ZodError. It + * intercepts this error and converts it to an SDKValidationError so as to not + * leak Zod implementation details to user code. + */ +export function parse( + rawValue: Inp, + fn: (value: Inp) => Out, + errorMessage: string, +): Out { + try { + return fn(rawValue); + } catch (err) { + if (err instanceof ZodError) { + throw new SDKValidationError(errorMessage, err, rawValue); + } + throw err; + } +} + +/** + * Utility function that executes some code which may result in a ZodError. It + * intercepts this error and converts it to an SDKValidationError so as to not + * leak Zod implementation details to user code. + */ +export function safeParse( + rawValue: Inp, + fn: (value: Inp) => Out, + errorMessage: string, +): Result { + try { + return OK(fn(rawValue)); + } catch (err) { + return ERR(new SDKValidationError(errorMessage, err, rawValue)); + } +} diff --git a/src/lib/sdks.ts b/src/lib/sdks.ts new file mode 100644 index 0000000..bc4d1ce --- /dev/null +++ b/src/lib/sdks.ts @@ -0,0 +1,397 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { SDKHooks } from "../hooks/hooks.js"; +import { HookContext } from "../hooks/types.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { stringToBase64 } from "./base64.js"; +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "./config.js"; +import { encodeForm } from "./encodings.js"; +import { + HTTPClient, + isAbortError, + isConnectionError, + isTimeoutError, + matchContentType, + matchStatusCode, +} from "./http.js"; +import { Logger } from "./logger.js"; +import { ERR, OK, Result } from "./result.js"; +import { retry, RetryConfig } from "./retries.js"; +import { SecurityState } from "./security.js"; + +export type RequestOptions = { + /** + * Sets a timeout, in milliseconds, on HTTP requests made by an SDK method. If + * `fetchOptions.signal` is set then it will take precedence over this option. + */ + timeoutMs?: number; + /** + * Set or override a retry policy on HTTP calls. + */ + retries?: RetryConfig; + /** + * Specifies the status codes which should be retried using the given retry policy. + */ + retryCodes?: string[]; + /** + * Overrides the base server URL that will be used by an operation. + */ + 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; + path: string; + baseURL?: string | URL | undefined; + query?: string; + body?: RequestInit["body"]; + headers?: HeadersInit; + security?: SecurityState | null; + uaHeader?: string; + timeoutMs?: number; +}; + +const gt: unknown = typeof globalThis === "undefined" ? null : globalThis; +const webWorkerLike = typeof gt === "object" + && gt != null + && "importScripts" in gt + && typeof gt["importScripts"] === "function"; +const isBrowserLike = webWorkerLike + || (typeof navigator !== "undefined" && "serviceWorker" in navigator) + || (typeof window === "object" && typeof window.document !== "undefined"); + +export class ClientSDK { + readonly #httpClient: HTTPClient; + readonly #hooks: SDKHooks; + readonly #logger?: Logger | undefined; + public readonly _baseURL: URL | null; + public readonly _options: SDKOptions & { hooks?: SDKHooks }; + + constructor(options: SDKOptions = {}) { + const opt = options as unknown; + if ( + typeof opt === "object" + && opt != null + && "hooks" in opt + && opt.hooks instanceof SDKHooks + ) { + this.#hooks = opt.hooks; + } else { + this.#hooks = new SDKHooks(); + } + this._options = { ...options, hooks: this.#hooks }; + + const url = serverURLFromOptions(options); + if (url) { + url.pathname = url.pathname.replace(/\/+$/, "") + "/"; + } + const { baseURL, client } = this.#hooks.sdkInit({ + baseURL: url, + client: options.httpClient || new HTTPClient(), + }); + this._baseURL = baseURL; + this.#httpClient = client; + this.#logger = options.debugLogger; + } + + public _createRequest( + context: HookContext, + conf: RequestConfig, + options?: RequestOptions, + ): Result { + const { method, path, query, headers: opHeaders, security } = conf; + + const base = conf.baseURL ?? this._baseURL; + if (!base) { + return ERR(new InvalidRequestError("No base URL provided for operation")); + } + const reqURL = new URL(base); + const inputURL = new URL(path, reqURL); + + if (path) { + reqURL.pathname += reqURL.pathname.endsWith("/") ? "" : "/"; + reqURL.pathname += inputURL.pathname.replace(/^\/+/, ""); + } + + let finalQuery = query || ""; + + const secQuery: string[] = []; + for (const [k, v] of Object.entries(security?.queryParams || {})) { + const q = encodeForm(k, v, { charEncoding: "percent" }); + if (typeof q !== "undefined") { + secQuery.push(q); + } + } + if (secQuery.length) { + finalQuery += `&${secQuery.join("&")}`; + } + + if (finalQuery) { + const q = finalQuery.startsWith("&") ? finalQuery.slice(1) : finalQuery; + reqURL.search = `?${q}`; + } + + const headers = new Headers(opHeaders); + + const username = security?.basic.username; + const password = security?.basic.password; + if (username != null || password != null) { + const encoded = stringToBase64( + [username || "", password || ""].join(":"), + ); + headers.set("Authorization", `Basic ${encoded}`); + } + + const securityHeaders = new Headers(security?.headers || {}); + for (const [k, v] of securityHeaders) { + headers.set(k, v); + } + + let cookie = headers.get("cookie") || ""; + for (const [k, v] of Object.entries(security?.cookies || {})) { + cookie += `; ${k}=${v}`; + } + cookie = cookie.startsWith("; ") ? cookie.slice(2) : cookie; + headers.set("cookie", cookie); + + const userHeaders = new Headers( + options?.headers ?? options?.fetchOptions?.headers, + ); + for (const [k, v] of userHeaders) { + headers.set(k, v); + } + + // Only set user agent header in non-browser-like environments since CORS + // policy disallows setting it in browsers e.g. Chrome throws an error. + if (!isBrowserLike) { + headers.set(conf.uaHeader ?? "user-agent", SDK_METADATA.userAgent); + } + + const fetchOptions: Omit = { + ...options?.fetchOptions, + ...options, + }; + if (!fetchOptions?.signal && conf.timeoutMs && conf.timeoutMs > 0) { + const timeoutSignal = AbortSignal.timeout(conf.timeoutMs); + fetchOptions.signal = timeoutSignal; + } + + if (conf.body instanceof ReadableStream) { + Object.assign(fetchOptions, { duplex: "half" }); + } + + let input; + try { + input = this.#hooks.beforeCreateRequest(context, { + url: reqURL, + options: { + ...fetchOptions, + body: conf.body ?? null, + headers, + method, + }, + }); + } catch (err: unknown) { + return ERR( + new UnexpectedClientError("Create request hook failed to execute", { + cause: err, + }), + ); + } + + return OK(new Request(input.url, input.options)); + } + + public async _do( + request: Request, + options: { + context: HookContext; + errorCodes: number | string | (number | string)[]; + retryConfig: RetryConfig; + retryCodes: string[]; + }, + ): Promise< + Result< + Response, + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + | UnexpectedClientError + > + > { + const { context, errorCodes } = options; + + return retry( + async () => { + const req = await this.#hooks.beforeRequest(context, request.clone()); + await logRequest(this.#logger, req).catch((e) => + this.#logger?.log("Failed to log request:", e) + ); + + let response = await this.#httpClient.request(req); + + try { + if (matchStatusCode(response, errorCodes)) { + const result = await this.#hooks.afterError( + context, + response, + null, + ); + if (result.error) { + throw result.error; + } + response = result.response || response; + } else { + response = await this.#hooks.afterSuccess(context, response); + } + } finally { + await logResponse(this.#logger, response, req) + .catch(e => this.#logger?.log("Failed to log response:", e)); + } + + return response; + }, + { config: options.retryConfig, statusCodes: options.retryCodes }, + ).then( + (r) => OK(r), + (err) => { + switch (true) { + case isAbortError(err): + return ERR( + new RequestAbortedError("Request aborted by client", { + cause: err, + }), + ); + case isTimeoutError(err): + return ERR( + new RequestTimeoutError("Request timed out", { cause: err }), + ); + case isConnectionError(err): + return ERR( + new ConnectionError("Unable to make request", { cause: err }), + ); + default: + return ERR( + new UnexpectedClientError("Unexpected HTTP client error", { + cause: err, + }), + ); + } + }, + ); + } +} + +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; + } + + const contentType = req.headers.get("content-type"); + const ct = contentType?.split(";")[0] || ""; + + logger.group(`> Request: ${req.method} ${req.url}`); + + logger.group("Headers:"); + for (const [k, v] of req.headers.entries()) { + logger.log(`${k}: ${v}`); + } + logger.groupEnd(); + + logger.group("Body:"); + switch (true) { + case jsonLikeContentTypeRE.test(ct): + logger.log(await req.clone().json()); + break; + case ct.startsWith("text/"): + logger.log(await req.clone().text()); + break; + case ct === "multipart/form-data": { + const body = await req.clone().formData(); + for (const [k, v] of body) { + const vlabel = v instanceof Blob ? "" : v; + logger.log(`${k}: ${vlabel}`); + } + break; + } + default: + logger.log(`<${contentType}>`); + break; + } + logger.groupEnd(); + + logger.groupEnd(); +} + +async function logResponse( + logger: Logger | undefined, + res: Response, + req: Request, +) { + if (!logger) { + return; + } + + const contentType = res.headers.get("content-type"); + const ct = contentType?.split(";")[0] || ""; + + logger.group(`< Response: ${req.method} ${req.url}`); + logger.log("Status Code:", res.status, res.statusText); + + logger.group("Headers:"); + for (const [k, v] of res.headers.entries()) { + logger.log(`${k}: ${v}`); + } + logger.groupEnd(); + + logger.group("Body:"); + switch (true) { + case matchContentType(res, "application/json") + || 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; + case matchContentType(res, "text/*"): + logger.log(await res.clone().text()); + break; + case matchContentType(res, "multipart/form-data"): { + const body = await res.clone().formData(); + for (const [k, v] of body) { + const vlabel = v instanceof Blob ? "" : v; + logger.log(`${k}: ${vlabel}`); + } + break; + } + default: + logger.log(`<${contentType}>`); + break; + } + logger.groupEnd(); + + logger.groupEnd(); +} diff --git a/src/lib/security.ts b/src/lib/security.ts new file mode 100644 index 0000000..30ed295 --- /dev/null +++ b/src/lib/security.ts @@ -0,0 +1,259 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { Security } from "../models/security.js"; + +type OAuth2PasswordFlow = { + username: string; + password: string; + clientID?: string | undefined; + clientSecret?: string | undefined; + tokenURL: string; +}; + +export enum SecurityErrorCode { + Incomplete = "incomplete", + UnrecognisedSecurityType = "unrecognized_security_type", +} + +export class SecurityError extends Error { + constructor( + public code: SecurityErrorCode, + message: string, + ) { + super(message); + this.name = "SecurityError"; + } + + static incomplete(): SecurityError { + return new SecurityError( + SecurityErrorCode.Incomplete, + "Security requirements not met in order to perform the operation", + ); + } + static unrecognizedType(type: string): SecurityError { + return new SecurityError( + SecurityErrorCode.UnrecognisedSecurityType, + `Unrecognised security type: ${type}`, + ); + } +} + +export type SecurityState = { + basic: { username?: string | undefined; password?: string | undefined }; + headers: Record; + queryParams: Record; + cookies: Record; + oauth2: ({ type: "password" } & OAuth2PasswordFlow) | { type: "none" }; +}; + +type SecurityInputBasic = { + type: "http:basic"; + value: + | { username?: string | undefined; password?: string | undefined } + | null + | undefined; +}; + +type SecurityInputBearer = { + type: "http:bearer"; + value: string | null | undefined; + fieldName: string; +}; + +type SecurityInputAPIKey = { + type: "apiKey:header" | "apiKey:query" | "apiKey:cookie"; + value: string | null | undefined; + fieldName: string; +}; + +type SecurityInputOIDC = { + type: "openIdConnect"; + value: string | null | undefined; + fieldName: string; +}; + +type SecurityInputOAuth2 = { + type: "oauth2"; + value: string | null | undefined; + fieldName: string; +}; + +type SecurityInputOAuth2ClientCredentials = { + type: "oauth2:client_credentials"; + value: + | { clientID?: string | undefined; clientSecret?: string | undefined } + | null + | string + | undefined; + fieldName?: string; +}; + +type SecurityInputOAuth2PasswordCredentials = { + type: "oauth2:password"; + value: + | string + | null + | undefined; + fieldName?: string; +}; + +type SecurityInputCustom = { + type: "http:custom"; + value: any | null | undefined; + fieldName?: string; +}; + +export type SecurityInput = + | SecurityInputBasic + | SecurityInputBearer + | SecurityInputAPIKey + | SecurityInputOAuth2 + | SecurityInputOAuth2ClientCredentials + | SecurityInputOAuth2PasswordCredentials + | SecurityInputOIDC + | SecurityInputCustom; + +export function resolveSecurity( + ...options: SecurityInput[][] +): SecurityState | null { + const state: SecurityState = { + basic: {}, + headers: {}, + queryParams: {}, + cookies: {}, + oauth2: { type: "none" }, + }; + + const option = options.find((opts) => { + return opts.every((o) => { + if (o.value == null) { + return false; + } else if (o.type === "http:basic") { + return o.value.username != null || o.value.password != null; + } else if (o.type === "http:custom") { + return null; + } else if (o.type === "oauth2:password") { + return ( + 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; + } else { + throw new Error( + `Unrecognized security type: ${o.type} (value type: ${typeof o + .value})`, + ); + } + }); + }); + if (option == null) { + return null; + } + + option.forEach((spec) => { + if (spec.value == null) { + return; + } + + const { type } = spec; + + switch (type) { + case "apiKey:header": + state.headers[spec.fieldName] = spec.value; + break; + case "apiKey:query": + state.queryParams[spec.fieldName] = spec.value; + break; + case "apiKey:cookie": + state.cookies[spec.fieldName] = spec.value; + break; + case "http:basic": + applyBasic(state, spec); + break; + case "http:custom": + break; + case "http:bearer": + applyBearer(state, spec); + break; + case "oauth2": + applyBearer(state, spec); + break; + case "oauth2:password": + applyBearer(state, spec); + break; + case "oauth2:client_credentials": + break; + case "openIdConnect": + applyBearer(state, spec); + break; + default: + spec satisfies never; + throw SecurityError.unrecognizedType(type); + } + }); + + return state; +} + +function applyBasic( + state: SecurityState, + spec: SecurityInputBasic, +) { + if (spec.value == null) { + return; + } + + state.basic = spec.value; +} + +function applyBearer( + state: SecurityState, + spec: + | SecurityInputBearer + | SecurityInputOAuth2 + | SecurityInputOIDC + | SecurityInputOAuth2PasswordCredentials, +) { + if (typeof spec.value !== "string" || !spec.value) { + return; + } + + let value = spec.value; + if (value.slice(0, 7).toLowerCase() !== "bearer ") { + value = `Bearer ${value}`; + } + + if (spec.fieldName !== undefined) { + state.headers[spec.fieldName] = value; + } +} +export function resolveGlobalSecurity( + security: Partial | null | undefined, +): SecurityState | null { + return resolveSecurity( + [ + { + fieldName: "Authorization", + type: "apiKey:header", + value: security?.api_key, + }, + ], + ); +} + +export async function extractSecurity< + T extends string | Record, +>(sec: T | (() => Promise) | undefined): Promise { + if (sec == null) { + return; + } + + return typeof sec === "function" ? sec() : sec; +} diff --git a/src/lib/url.ts b/src/lib/url.ts new file mode 100644 index 0000000..6bc6356 --- /dev/null +++ b/src/lib/url.ts @@ -0,0 +1,33 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +const hasOwn = Object.prototype.hasOwnProperty; + +export type Params = Partial>; + +export function pathToFunc( + pathPattern: string, + options?: { charEncoding?: "percent" | "none" }, +): (params?: Params) => string { + const paramRE = /\{([a-zA-Z0-9_]+?)\}/g; + + return function buildURLPath(params: Record = {}): string { + return pathPattern.replace(paramRE, function (_, placeholder) { + if (!hasOwn.call(params, placeholder)) { + throw new Error(`Parameter '${placeholder}' is required`); + } + + const value = params[placeholder]; + if (typeof value !== "string" && typeof value !== "number") { + throw new Error( + `Parameter '${placeholder}' must be a string or number`, + ); + } + + return options?.charEncoding === "percent" + ? encodeURIComponent(`${value}`) + : `${value}`; + }); + }; +} diff --git a/src/mcp-server/build.mts b/src/mcp-server/build.mts new file mode 100644 index 0000000..a04739f --- /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 0000000..b878d8d --- /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 0000000..2dff6de --- /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 api_key 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 0000000..f73e472 --- /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; + 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, + security: { api_key: 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, + security: { api_key: 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 0000000..d65a295 --- /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 0000000..7aab280 --- /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 0000000..207ac6a --- /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.0.1-beta.1", + }, +}); + +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 0000000..5dbb3dd --- /dev/null +++ b/src/mcp-server/prompts.ts @@ -0,0 +1,121 @@ +/* + * 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, + ServerNotification, + ServerRequest, +} 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 0000000..a813861 --- /dev/null +++ b/src/mcp-server/resources.ts @@ -0,0 +1,176 @@ +/* + * 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, + ServerNotification, + ServerRequest, +} 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 0000000..c25696d --- /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.extensions.ts b/src/mcp-server/server.extensions.ts new file mode 100644 index 0000000..73b76ae --- /dev/null +++ b/src/mcp-server/server.extensions.ts @@ -0,0 +1,7 @@ +import { Register } from "./extensions.js"; +import { prompt$GenerateRetrospective } from "../custom/prompts/generate-retrospective.js"; + +// https://www.speakeasy.com/docs/model-context-protocol/custom-mcp-tools-resources#building-and-registering-custom-prompts +export function registerMCPExtensions(register: Register): void { + register.prompt(prompt$GenerateRetrospective); +} diff --git a/src/mcp-server/server.ts b/src/mcp-server/server.ts new file mode 100644 index 0000000..9b8688e --- /dev/null +++ b/src/mcp-server/server.ts @@ -0,0 +1,73 @@ +/* + * 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 { Register } from "./extensions.js"; +import { createRegisterPrompt } from "./prompts.js"; +import { + createRegisterResource, + createRegisterResourceTemplate, +} from "./resources.js"; +import { MCPScope } from "./scopes.js"; +import { registerMCPExtensions } from "./server.extensions.js"; +import { createRegisterTool } from "./tools.js"; +import { tool$Alerts_list_alerts } from "./tools/Alerts_list_alerts.js"; +import { tool$Incidents_create_incident } from "./tools/Incidents_create_incident.js"; +import { tool$Incidents_list_incidents } from "./tools/Incidents_list_incidents.js"; +import { tool$Retrospectives_list_incident_retrospectives } from "./tools/Retrospectives_list_incident_retrospectives.js"; +import { tool$Retrospectives_update_incident_retrospective_field } from "./tools/Retrospectives_update_incident_retrospective_field.js"; + +export function createMCPServer(deps: { + logger: ConsoleLogger; + allowedTools?: string[] | undefined; + scopes?: MCPScope[] | undefined; + serverURL?: string | undefined; + security?: SDKOptions["security"] | undefined; + serverIdx?: SDKOptions["serverIdx"] | undefined; +}) { + const server = new McpServer({ + name: "FireHydrant", + version: "0.0.1-beta.1", + }); + + const client = new FireHydrantCore({ + security: deps.security, + 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$Incidents_list_incidents); + tool(tool$Incidents_create_incident); + tool(tool$Retrospectives_list_incident_retrospectives); + tool(tool$Retrospectives_update_incident_retrospective_field); + tool(tool$Alerts_list_alerts); + + registerMCPExtensions(register satisfies Register); + + return server; +} diff --git a/src/mcp-server/shared.ts b/src/mcp-server/shared.ts new file mode 100644 index 0000000..bb74a74 --- /dev/null +++ b/src/mcp-server/shared.ts @@ -0,0 +1,78 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +type BinaryData = + | Uint8Array + | ArrayBuffer + | Blob + | ReadableStream + | Response + | string; + +const base64Schema = z.string().base64(); + +export function bytesToBase64(u8arr: Uint8Array): string { + return btoa(String.fromCodePoint(...u8arr)); +} + +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" + ); +} + +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 0000000..f4d9d3b --- /dev/null +++ b/src/mcp-server/tools.ts @@ -0,0 +1,133 @@ +/* + * 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, + ServerNotification, + ServerRequest, +} 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/Alerts_list_alerts.ts b/src/mcp-server/tools/Alerts_list_alerts.ts new file mode 100644 index 0000000..8137a0d --- /dev/null +++ b/src/mcp-server/tools/Alerts_list_alerts.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { Alerts_list_alerts } from "../../funcs/Alerts_list_alerts.js"; +import { ListAlertsRequest$zodSchema } from "../../models/listalertsop.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: ListAlertsRequest$zodSchema.optional(), +}; + +export const tool$Alerts_list_alerts: ToolDefinition = { + name: "alerts-list-alerts", + description: `List alerts + +Retrieve all alerts from third parties`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await Alerts_list_alerts( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/Incidents_create_incident.ts b/src/mcp-server/tools/Incidents_create_incident.ts new file mode 100644 index 0000000..0539e6d --- /dev/null +++ b/src/mcp-server/tools/Incidents_create_incident.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { Incidents_create_incident } from "../../funcs/Incidents_create_incident.js"; +import { CreateIncident$zodSchema } from "../../models/createincident.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: CreateIncident$zodSchema, +}; + +export const tool$Incidents_create_incident: ToolDefinition = { + name: "incidents-create-incident", + description: `Create an incident + +Create a new incident`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await Incidents_create_incident( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/Incidents_list_incidents.ts b/src/mcp-server/tools/Incidents_list_incidents.ts new file mode 100644 index 0000000..1bbe978 --- /dev/null +++ b/src/mcp-server/tools/Incidents_list_incidents.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { Incidents_list_incidents } from "../../funcs/Incidents_list_incidents.js"; +import { ListIncidentsRequest$zodSchema } from "../../models/listincidentsop.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: ListIncidentsRequest$zodSchema.optional(), +}; + +export const tool$Incidents_list_incidents: 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 Incidents_list_incidents( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/Retrospectives_list_incident_retrospectives.ts b/src/mcp-server/tools/Retrospectives_list_incident_retrospectives.ts new file mode 100644 index 0000000..c9f235d --- /dev/null +++ b/src/mcp-server/tools/Retrospectives_list_incident_retrospectives.ts @@ -0,0 +1,43 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { Retrospectives_list_incident_retrospectives } from "../../funcs/Retrospectives_list_incident_retrospectives.js"; +import { ListIncidentRetrospectivesRequest$zodSchema } from "../../models/listincidentretrospectivesop.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: ListIncidentRetrospectivesRequest$zodSchema, +}; + +export const tool$Retrospectives_list_incident_retrospectives: ToolDefinition< + typeof args +> = { + name: "retrospectives-list-incident-retrospectives", + description: + `Lists all retrospectives (RCAs) for an incident. Among other things, this is useful for: + + - Getting a list of retrospectives for an incident, + - Getting basic data about a retrospective. + - Getting the fields of a retrospective. +`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await Retrospectives_list_incident_retrospectives( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/src/mcp-server/tools/Retrospectives_update_incident_retrospective_field.ts b/src/mcp-server/tools/Retrospectives_update_incident_retrospective_field.ts new file mode 100644 index 0000000..7c74d59 --- /dev/null +++ b/src/mcp-server/tools/Retrospectives_update_incident_retrospective_field.ts @@ -0,0 +1,44 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { Retrospectives_update_incident_retrospective_field } from "../../funcs/Retrospectives_update_incident_retrospective_field.js"; +import { UpdateIncidentRetrospectiveFieldRequest$zodSchema } from "../../models/updateincidentretrospectivefieldop.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: UpdateIncidentRetrospectiveFieldRequest$zodSchema, +}; + +export const tool$Retrospectives_update_incident_retrospective_field: + ToolDefinition = { + name: "retrospectives-update-incident-retrospective-field", + description: + `Updates a field in a retrospective (RCA) for an incident. Among other things, this is useful for: + + - Updating a field in a retrospective, + - Updating the value of a field in a retrospective. + +Values should be compatible with the tiptap editor (array structure). +`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = + await Retrospectives_update_incident_retrospective_field( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!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/alertsalertentity.ts b/src/models/alertsalertentity.ts new file mode 100644 index 0000000..cb9452e --- /dev/null +++ b/src/models/alertsalertentity.ts @@ -0,0 +1,115 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + AlertsSirenAlertEntity, + AlertsSirenAlertEntity$zodSchema, +} from "./alertssirenalertentity.js"; +import { + AlertsSirenEventEntity, + AlertsSirenEventEntity$zodSchema, +} from "./alertssirenevententity.js"; +import { + ConversationsAPIEntitiesReference, + ConversationsAPIEntitiesReference$zodSchema, +} from "./conversationsapientitiesreference.js"; +import { + NullableSignalsAPIRuleEntity, + NullableSignalsAPIRuleEntity$zodSchema, +} from "./nullablesignalsapiruleentity.js"; +import { + NullableSignalsAPITargetEntity, + NullableSignalsAPITargetEntity$zodSchema, +} from "./nullablesignalsapitargetentity.js"; +import { + PublicApiv1IncidentsSuccinctEntity, + PublicApiv1IncidentsSuccinctEntity$zodSchema, +} from "./publicapiv1incidentssuccinctentity.js"; +import { SuccinctEntity, SuccinctEntity$zodSchema } from "./succinctentity.js"; + +/** + * Arbitrary key:value pairs of labels. + */ +export type AlertsAlertEntityLabels = {}; + +export const AlertsAlertEntityLabels$zodSchema: z.ZodType< + AlertsAlertEntityLabels, + z.ZodTypeDef, + unknown +> = z.object({}).describe("Arbitrary key:value pairs of labels."); + +/** + * Alerts_AlertEntity model + */ +export type AlertsAlertEntity = { + 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?: AlertsAlertEntityLabels | 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 | null | undefined; + signal_target?: NullableSignalsAPITargetEntity | 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; +}; + +export const AlertsAlertEntity$zodSchema: z.ZodType< + AlertsAlertEntity, + z.ZodTypeDef, + unknown +> = z.object({ + child_alerts: z.array(AlertsSirenAlertEntity$zodSchema).nullable().optional(), + conversations: z.array(ConversationsAPIEntitiesReference$zodSchema).nullable() + .optional(), + description: z.string().nullable().optional(), + duration_iso8601: z.string().nullable().optional(), + duration_ms: z.number().int().nullable().optional(), + ends_at: z.string().datetime({ offset: true }).nullable().optional(), + environments: z.array(SuccinctEntity$zodSchema).nullable().optional(), + events: z.array(AlertsSirenEventEntity$zodSchema).nullable().optional(), + id: z.string().nullable().optional(), + incidents: z.array(PublicApiv1IncidentsSuccinctEntity$zodSchema).nullable() + .optional(), + integration_name: z.string().nullable().optional(), + is_expired: z.boolean().nullable().optional(), + labels: z.lazy(() => AlertsAlertEntityLabels$zodSchema).nullable().optional(), + parent_alerts: z.array(AlertsSirenAlertEntity$zodSchema).nullable() + .optional(), + position: z.number().int().nullable().optional(), + priority: z.string().nullable().optional(), + remote_id: z.string().nullable().optional(), + remote_url: z.string().nullable().optional(), + services: z.array(SuccinctEntity$zodSchema).nullable().optional(), + signal_id: z.string().nullable().optional(), + signal_rule: NullableSignalsAPIRuleEntity$zodSchema.nullable().optional(), + signal_target: NullableSignalsAPITargetEntity$zodSchema.nullable().optional(), + source_icon: z.string().nullable().optional(), + starts_at: z.string().datetime({ offset: true }).nullable().optional(), + status: z.string().nullable().optional(), + summary: z.string().nullable().optional(), + tags: z.array(z.string()).nullable().optional(), + team_id: z.string().nullable().optional(), + team_name: z.string().nullable().optional(), +}).describe("Alerts_AlertEntity model"); diff --git a/src/models/alertsalertentitypaginated.ts b/src/models/alertsalertentitypaginated.ts new file mode 100644 index 0000000..34a9b0f --- /dev/null +++ b/src/models/alertsalertentitypaginated.ts @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + AlertsAlertEntity, + AlertsAlertEntity$zodSchema, +} from "./alertsalertentity.js"; +import { + NullablePaginationEntity, + NullablePaginationEntity$zodSchema, +} from "./nullablepaginationentity.js"; + +/** + * Alerts_AlertEntityPaginated model + */ +export type AlertsAlertEntityPaginated = { + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; +}; + +export const AlertsAlertEntityPaginated$zodSchema: z.ZodType< + AlertsAlertEntityPaginated, + z.ZodTypeDef, + unknown +> = z.object({ + data: z.array(AlertsAlertEntity$zodSchema).nullable().optional(), + pagination: NullablePaginationEntity$zodSchema.nullable().optional(), +}).describe("Alerts_AlertEntityPaginated model"); diff --git a/src/models/alertssirenalertentity.ts b/src/models/alertssirenalertentity.ts new file mode 100644 index 0000000..63704f6 --- /dev/null +++ b/src/models/alertssirenalertentity.ts @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + NullableSignalsAPIRuleEntity, + NullableSignalsAPIRuleEntity$zodSchema, +} from "./nullablesignalsapiruleentity.js"; + +/** + * Arbitrary key:value pairs of labels. + */ +export type AlertsSirenAlertEntityLabels = {}; + +export const AlertsSirenAlertEntityLabels$zodSchema: z.ZodType< + AlertsSirenAlertEntityLabels, + z.ZodTypeDef, + unknown +> = z.object({}).describe("Arbitrary key:value pairs of labels."); + +export type AlertsSirenAlertEntity = { + 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 | null | undefined; + tags?: Array | null | undefined; + signal_id?: string | null | undefined; + signal_rule?: NullableSignalsAPIRuleEntity | null | undefined; +}; + +export const AlertsSirenAlertEntity$zodSchema: z.ZodType< + AlertsSirenAlertEntity, + z.ZodTypeDef, + unknown +> = z.object({ + description: z.string().nullable().optional(), + ends_at: z.string().datetime({ offset: true }).nullable().optional(), + id: z.string().nullable().optional(), + labels: z.lazy(() => AlertsSirenAlertEntityLabels$zodSchema).nullable() + .optional(), + remote_id: z.string().nullable().optional(), + remote_url: z.string().nullable().optional(), + signal_id: z.string().nullable().optional(), + signal_rule: NullableSignalsAPIRuleEntity$zodSchema.nullable().optional(), + starts_at: z.string().datetime({ offset: true }).nullable().optional(), + status: z.string().nullable().optional(), + summary: z.string().nullable().optional(), + tags: z.array(z.string()).nullable().optional(), +}); diff --git a/src/models/alertssirenevententity.ts b/src/models/alertssirenevententity.ts new file mode 100644 index 0000000..a19ef79 --- /dev/null +++ b/src/models/alertssirenevententity.ts @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * The event's payload + */ +export type Data = {}; + +export const Data$zodSchema: z.ZodType = z.object( + {}, +).describe("The event's payload"); + +export type AlertsSirenEventEntity = { + id?: string | null | undefined; + type?: string | null | undefined; + data?: Data | null | undefined; + created_at?: string | null | undefined; +}; + +export const AlertsSirenEventEntity$zodSchema: z.ZodType< + AlertsSirenEventEntity, + z.ZodTypeDef, + unknown +> = z.object({ + created_at: z.string().datetime({ offset: true }).nullable().optional(), + data: z.lazy(() => Data$zodSchema).nullable().optional(), + id: z.string().nullable().optional(), + type: z.string().nullable().optional(), +}); diff --git a/src/models/authorentity.ts b/src/models/authorentity.ts new file mode 100644 index 0000000..7802c54 --- /dev/null +++ b/src/models/authorentity.ts @@ -0,0 +1,23 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type AuthorEntity = { + id?: string | null | undefined; + name?: string | null | undefined; + source?: string | null | undefined; + email?: string | null | undefined; +}; + +export const AuthorEntity$zodSchema: z.ZodType< + AuthorEntity, + z.ZodTypeDef, + unknown +> = z.object({ + email: z.string().nullable().optional(), + id: z.string().nullable().optional(), + name: z.string().nullable().optional(), + source: z.string().nullable().optional(), +}); diff --git a/src/models/conversationsapientitiesreference.ts b/src/models/conversationsapientitiesreference.ts new file mode 100644 index 0000000..fdbd37f --- /dev/null +++ b/src/models/conversationsapientitiesreference.ts @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + NullableConversationsAPIEntitiesChannel, + NullableConversationsAPIEntitiesChannel$zodSchema, +} from "./nullableconversationsapientitieschannel.js"; + +export type ConversationsAPIEntitiesReference = { + 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 | null | undefined; +}; + +export const ConversationsAPIEntitiesReference$zodSchema: z.ZodType< + ConversationsAPIEntitiesReference, + z.ZodTypeDef, + unknown +> = z.object({ + channel: NullableConversationsAPIEntitiesChannel$zodSchema.nullable() + .optional(), + comments_url: z.string().nullable().optional(), + field: z.string().nullable().optional(), + id: z.string().nullable().optional(), + resource_class: z.string().nullable().optional(), + resource_id: z.string().nullable().optional(), +}); diff --git a/src/models/createincident.ts b/src/models/createincident.ts new file mode 100644 index 0000000..ed3ca6f --- /dev/null +++ b/src/models/createincident.ts @@ -0,0 +1,105 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * Key:value pairs to track custom data for the incident + */ +export type CreateIncidentLabels = {}; + +export const CreateIncidentLabels$zodSchema: z.ZodType< + CreateIncidentLabels, + z.ZodTypeDef, + unknown +> = z.object({}).describe( + "Key:value pairs to track custom data for the incident", +); + +export type Impact = { type: string; id: string; condition_id: string }; + +export const Impact$zodSchema: z.ZodType = z + .object({ + condition_id: z.string(), + id: z.string(), + type: z.string(), + }); + +export type Milestone = { type: string; occurred_at: string }; + +export const Milestone$zodSchema: z.ZodType = + z.object({ + occurred_at: z.string().datetime({ offset: true }), + type: z.string(), + }); + +export type CustomField = { + field_id: string; + value_string?: string | null | undefined; + value_array?: Array | null | undefined; +}; + +export const CustomField$zodSchema: z.ZodType< + CustomField, + z.ZodTypeDef, + unknown +> = z.object({ + field_id: z.string(), + value_array: z.array(z.string()).nullable().optional(), + value_string: z.string().nullable().optional(), +}); + +/** + * Create a new incident + */ +export type CreateIncident = { + 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 | 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; + skip_incident_type_values?: boolean | null | undefined; +}; + +export const CreateIncident$zodSchema: z.ZodType< + CreateIncident, + z.ZodTypeDef, + unknown +> = z.object({ + alert_ids: z.array(z.string()).nullable().optional(), + custom_fields: z.array(z.lazy(() => CustomField$zodSchema)).nullable() + .optional(), + customer_impact_summary: z.string().nullable().optional(), + description: z.string().nullable().optional(), + external_links: z.string().nullable().optional(), + impacts: z.array(z.lazy(() => Impact$zodSchema)).nullable().optional(), + incident_type_id: z.string().nullable().optional(), + labels: z.lazy(() => CreateIncidentLabels$zodSchema).nullable().optional(), + milestones: z.array(z.lazy(() => Milestone$zodSchema)).nullable().optional(), + name: z.string(), + priority: z.string().nullable().optional(), + restricted: z.boolean().nullable().optional(), + runbook_ids: z.array(z.string()).nullable().optional(), + severity: z.string().nullable().optional(), + severity_condition_id: z.string().nullable().optional(), + severity_impact_id: z.string().nullable().optional(), + skip_incident_type_values: z.boolean().default(false).nullable(), + summary: z.string().nullable().optional(), + tag_list: z.array(z.string()).nullable().optional(), + team_ids: z.array(z.string()).nullable().optional(), +}).describe("Create a new incident"); diff --git a/src/models/createincidentop.ts b/src/models/createincidentop.ts new file mode 100644 index 0000000..8066153 --- /dev/null +++ b/src/models/createincidentop.ts @@ -0,0 +1,24 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { IncidentEntity, IncidentEntity$zodSchema } from "./incidententity.js"; + +export type CreateIncidentResponse = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + IncidentEntity?: IncidentEntity | undefined; +}; + +export const CreateIncidentResponse$zodSchema: z.ZodType< + CreateIncidentResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + IncidentEntity: IncidentEntity$zodSchema.optional(), + RawResponse: z.instanceof(Response), + StatusCode: z.number().int(), +}); diff --git a/src/models/customfieldsfieldvalue.ts b/src/models/customfieldsfieldvalue.ts new file mode 100644 index 0000000..3529412 --- /dev/null +++ b/src/models/customfieldsfieldvalue.ts @@ -0,0 +1,33 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type CustomFieldsFieldValue = { + 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; +}; + +export const CustomFieldsFieldValue$zodSchema: z.ZodType< + CustomFieldsFieldValue, + z.ZodTypeDef, + unknown +> = z.object({ + description: z.string().nullable().optional(), + display_name: z.string().nullable().optional(), + field_id: z.string().nullable().optional(), + name: z.string().nullable().optional(), + slug: z.string().nullable().optional(), + value: z.string().nullable().optional(), + value_array: z.array(z.string()).nullable().optional(), + value_string: z.string().nullable().optional(), + value_type: z.string().nullable().optional(), +}); diff --git a/src/models/errors/apierror.ts b/src/models/errors/apierror.ts new file mode 100644 index 0000000..fd10b58 --- /dev/null +++ b/src/models/errors/apierror.ts @@ -0,0 +1,20 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export class APIError extends Error { + constructor( + message: string, + public readonly httpMeta: { + response: Response; + request: Request; + }, + ) { + super( + `${message}: Status ${httpMeta.response.status} Content-Type ${ + httpMeta.response.headers.get("content-type") || "" + }`, + ); + this.name = "APIError"; + } +} diff --git a/src/models/errors/httpclienterrors.ts b/src/models/errors/httpclienterrors.ts new file mode 100644 index 0000000..b34f612 --- /dev/null +++ b/src/models/errors/httpclienterrors.ts @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +/** + * Base class for all HTTP errors. + */ +export class HTTPClientError extends Error { + /** The underlying cause of the error. */ + override readonly cause: unknown; + override name = "HTTPClientError"; + constructor(message: string, opts?: { cause?: unknown }) { + let msg = message; + if (opts?.cause) { + msg += `: ${opts.cause}`; + } + + super(msg, opts); + // In older runtimes, the cause field would not have been assigned through + // the super() call. + if (typeof this.cause === "undefined") { + this.cause = opts?.cause; + } + } +} + +/** + * An error to capture unrecognised or unexpected errors when making HTTP calls. + */ +export class UnexpectedClientError extends HTTPClientError { + override name = "UnexpectedClientError"; +} + +/** + * An error that is raised when any inputs used to create a request are invalid. + */ +export class InvalidRequestError extends HTTPClientError { + override name = "InvalidRequestError"; +} + +/** + * An error that is raised when a HTTP request was aborted by the client error. + */ +export class RequestAbortedError extends HTTPClientError { + override readonly name = "RequestAbortedError"; +} + +/** + * An error that is raised when a HTTP request timed out due to an AbortSignal + * signal timeout. + */ +export class RequestTimeoutError extends HTTPClientError { + override readonly name = "RequestTimeoutError"; +} + +/** + * An error that is raised when a HTTP client is unable to make a request to + * a server. + */ +export class ConnectionError extends HTTPClientError { + override readonly name = "ConnectionError"; +} diff --git a/src/models/errors/sdkvalidationerror.ts b/src/models/errors/sdkvalidationerror.ts new file mode 100644 index 0000000..16929b9 --- /dev/null +++ b/src/models/errors/sdkvalidationerror.ts @@ -0,0 +1,97 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export class SDKValidationError extends Error { + /** + * The raw value that failed validation. + */ + public readonly rawValue: unknown; + + /** + * The raw message that failed validation. + */ + public readonly rawMessage: unknown; + + constructor(message: string, cause: unknown, rawValue: unknown) { + super(`${message}: ${cause}`); + this.name = "SDKValidationError"; + this.cause = cause; + this.rawValue = rawValue; + this.rawMessage = message; + } + + /** + * Return a pretty-formatted error message if the underlying validation error + * is a ZodError or some other recognized error type, otherwise return the + * default error message. + */ + public pretty(): string { + if (this.cause instanceof z.ZodError) { + return `${this.rawMessage}\n${formatZodError(this.cause)}`; + } else { + return this.toString(); + } + } +} + +export function formatZodError(err: z.ZodError, level = 0): string { + let pre = " ".repeat(level); + pre = level > 0 ? `│${pre}` : pre; + pre += " ".repeat(level); + + let message = ""; + const append = (str: string) => (message += `\n${pre}${str}`); + + const len = err.issues.length; + const headline = len === 1 ? `${len} issue found` : `${len} issues found`; + + if (len) { + append(`┌ ${headline}:`); + } + + for (const issue of err.issues) { + let path = issue.path.join("."); + path = path ? `.${path}` : ""; + append(`│ • [${path}]: ${issue.message} (${issue.code})`); + switch (issue.code) { + case "invalid_literal": + case "invalid_type": { + append(`│ Want: ${issue.expected}`); + append(`│ Got: ${issue.received}`); + break; + } + case "unrecognized_keys": { + append(`│ Keys: ${issue.keys.join(", ")}`); + break; + } + case "invalid_enum_value": { + append(`│ Allowed: ${issue.options.join(", ")}`); + append(`│ Got: ${issue.received}`); + break; + } + case "invalid_union_discriminator": { + append(`│ Allowed: ${issue.options.join(", ")}`); + break; + } + case "invalid_union": { + const len = issue.unionErrors.length; + append( + `│ ✖︎ Attemped to deserialize into one of ${len} union members:`, + ); + issue.unionErrors.forEach((err, i) => { + append(`│ ✖︎ Member ${i + 1} of ${len}`); + append(`${formatZodError(err, level + 1)}`); + }); + } + } + } + + if (err.issues.length) { + append(`└─*`); + } + + return message.slice(1); +} diff --git a/src/models/incidententity.ts b/src/models/incidententity.ts new file mode 100644 index 0000000..2ce254c --- /dev/null +++ b/src/models/incidententity.ts @@ -0,0 +1,269 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + ConversationsAPIEntitiesReference, + ConversationsAPIEntitiesReference$zodSchema, +} from "./conversationsapientitiesreference.js"; +import { + CustomFieldsFieldValue, + CustomFieldsFieldValue$zodSchema, +} from "./customfieldsfieldvalue.js"; +import { + IncidentEntityFieldRequirementEntity, + IncidentEntityFieldRequirementEntity$zodSchema, +} from "./incidententityfieldrequiremententity.js"; +import { + IncidentsChannelEntity, + IncidentsChannelEntity$zodSchema, +} from "./incidentschannelentity.js"; +import { + IncidentsConferenceBridgeEntity, + IncidentsConferenceBridgeEntity$zodSchema, +} from "./incidentsconferencebridgeentity.js"; +import { + IncidentsImpactEntity, + IncidentsImpactEntity$zodSchema, +} from "./incidentsimpactentity.js"; +import { + IncidentsLifecycleMeasurementEntity, + IncidentsLifecycleMeasurementEntity$zodSchema, +} from "./incidentslifecyclemeasuremententity.js"; +import { + IncidentsLifecyclePhaseEntity, + IncidentsLifecyclePhaseEntity$zodSchema, +} from "./incidentslifecyclephaseentity.js"; +import { + IncidentsMilestoneEntity, + IncidentsMilestoneEntity$zodSchema, +} from "./incidentsmilestoneentity.js"; +import { + IncidentsRoleAssignmentEntity, + IncidentsRoleAssignmentEntity$zodSchema, +} from "./incidentsroleassignmententity.js"; +import { + IncidentsStatusPageEntity, + IncidentsStatusPageEntity$zodSchema, +} from "./incidentsstatuspageentity.js"; +import { + IncidentsTeamAssignmentEntityLite, + IncidentsTeamAssignmentEntityLite$zodSchema, +} from "./incidentsteamassignmententitylite.js"; +import { + NullableAuthorEntity, + NullableAuthorEntity$zodSchema, +} from "./nullableauthorentity.js"; +import { + NullableEventNoteEntity, + NullableEventNoteEntity$zodSchema, +} from "./nullableeventnoteentity.js"; +import { + NullableIncidentsContextObjectEntity, + NullableIncidentsContextObjectEntity$zodSchema, +} from "./nullableincidentscontextobjectentity.js"; +import { + NullableOrganizationEntity, + NullableOrganizationEntity$zodSchema, +} from "./nullableorganizationentity.js"; +import { + NullableSeverityMatrixConditionEntity, + NullableSeverityMatrixConditionEntity$zodSchema, +} from "./nullableseveritymatrixconditionentity.js"; +import { + NullableSeverityMatrixImpactEntity, + NullableSeverityMatrixImpactEntity$zodSchema, +} from "./nullableseveritymatriximpactentity.js"; +import { + NullableSuccinctEntity, + NullableSuccinctEntity$zodSchema, +} from "./nullablesuccinctentity.js"; +import { + NullableTicketingTicketEntity, + NullableTicketingTicketEntity$zodSchema, +} from "./nullableticketingticketentity.js"; +import { SuccinctEntity, SuccinctEntity$zodSchema } from "./succinctentity.js"; +import { + TicketingTicketEntity, + TicketingTicketEntity$zodSchema, +} from "./ticketingticketentity.js"; + +/** + * A key/value of labels + */ +export type IncidentEntityLabels = {}; + +export const IncidentEntityLabels$zodSchema: z.ZodType< + IncidentEntityLabels, + z.ZodTypeDef, + unknown +> = z.object({}).describe("A key/value of labels"); + +export type RetroExport = {}; + +export const RetroExport$zodSchema: z.ZodType< + RetroExport, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** + * IncidentEntity model + */ +export type IncidentEntity = { + 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; + incident_type?: NullableSuccinctEntity | null | undefined; + severity_impact_object?: + | NullableSeverityMatrixImpactEntity + | null + | undefined; + severity_condition_object?: + | NullableSeverityMatrixConditionEntity + | 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?: IncidentEntityLabels | 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 | 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 | 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 | null | undefined; + impacts?: Array | null | undefined; + conference_bridges?: + | Array + | null + | undefined; + incident_channels?: Array | null | undefined; + retro_exports?: Array | null | undefined; + created_by?: NullableAuthorEntity | null | undefined; + context_object?: NullableIncidentsContextObjectEntity | null | undefined; + team_assignments?: + | Array + | null + | undefined; + conversations?: Array | null | undefined; + custom_fields?: Array | null | undefined; + field_requirements?: + | Array + | null + | undefined; +}; + +export const IncidentEntity$zodSchema: z.ZodType< + IncidentEntity, + z.ZodTypeDef, + unknown +> = z.object({ + active: z.boolean().nullable().optional(), + ai_incident_summary: z.string().nullable().optional(), + channel_id: z.string().nullable().optional(), + channel_name: z.string().nullable().optional(), + channel_reference: z.string().nullable().optional(), + channel_status: z.string().nullable().optional(), + conference_bridges: z.array(IncidentsConferenceBridgeEntity$zodSchema) + .nullable().optional(), + context_object: NullableIncidentsContextObjectEntity$zodSchema.nullable() + .optional(), + conversations: z.array(ConversationsAPIEntitiesReference$zodSchema).nullable() + .optional(), + created_at: z.string().datetime({ offset: true }).nullable().optional(), + created_by: NullableAuthorEntity$zodSchema.nullable().optional(), + current_milestone: z.string().nullable().optional(), + custom_fields: z.array(CustomFieldsFieldValue$zodSchema).nullable() + .optional(), + customer_impact_summary: z.string().nullable().optional(), + customers_impacted: z.number().int().nullable().optional(), + description: z.string().nullable().optional(), + discarded_at: z.string().datetime({ offset: true }).nullable().optional(), + environments: z.array(SuccinctEntity$zodSchema).nullable().optional(), + field_requirements: z.array(IncidentEntityFieldRequirementEntity$zodSchema) + .nullable().optional(), + functionalities: z.array(SuccinctEntity$zodSchema).nullable().optional(), + id: z.string().nullable().optional(), + impacts: z.array(IncidentsImpactEntity$zodSchema).nullable().optional(), + incident_channels: z.array(IncidentsChannelEntity$zodSchema).nullable() + .optional(), + incident_tickets: z.array(TicketingTicketEntity$zodSchema).nullable() + .optional(), + incident_type: NullableSuccinctEntity$zodSchema.nullable().optional(), + incident_url: z.string().nullable().optional(), + labels: z.lazy(() => IncidentEntityLabels$zodSchema).nullable().optional(), + last_note: NullableEventNoteEntity$zodSchema.nullable().optional(), + last_update: z.string().nullable().optional(), + lifecycle_measurements: z.array(IncidentsLifecycleMeasurementEntity$zodSchema) + .nullable().optional(), + lifecycle_phases: z.array(IncidentsLifecyclePhaseEntity$zodSchema).nullable() + .optional(), + milestones: z.array(IncidentsMilestoneEntity$zodSchema).nullable().optional(), + monetary_impact: z.number().int().nullable().optional(), + monetary_impact_cents: z.number().int().nullable().optional(), + name: z.string().nullable().optional(), + number: z.number().int().nullable().optional(), + organization: NullableOrganizationEntity$zodSchema.nullable().optional(), + organization_id: z.string().nullable().optional(), + priority: z.string().nullable().optional(), + private_id: z.string().nullable().optional(), + private_status_page_url: z.string().nullable().optional(), + report_id: z.string().nullable().optional(), + retro_exports: z.array(z.lazy(() => RetroExport$zodSchema)).nullable() + .optional(), + role_assignments: z.array(IncidentsRoleAssignmentEntity$zodSchema).nullable() + .optional(), + services: z.array(SuccinctEntity$zodSchema).nullable().optional(), + severity: z.string().nullable().optional(), + severity_color: z.string().nullable().optional(), + severity_condition: z.string().nullable().optional(), + severity_condition_object: NullableSeverityMatrixConditionEntity$zodSchema + .nullable().optional(), + severity_impact: z.string().nullable().optional(), + severity_impact_object: NullableSeverityMatrixImpactEntity$zodSchema + .nullable().optional(), + started_at: z.string().datetime({ offset: true }).nullable().optional(), + status_pages: z.array(IncidentsStatusPageEntity$zodSchema).nullable() + .optional(), + summary: z.string().nullable().optional(), + tag_list: z.array(z.string()).nullable().optional(), + team_assignments: z.array(IncidentsTeamAssignmentEntityLite$zodSchema) + .nullable().optional(), + ticket: NullableTicketingTicketEntity$zodSchema.nullable().optional(), +}).describe("IncidentEntity model"); diff --git a/src/models/incidententityfieldrequiremententity.ts b/src/models/incidententityfieldrequiremententity.ts new file mode 100644 index 0000000..243962e --- /dev/null +++ b/src/models/incidententityfieldrequiremententity.ts @@ -0,0 +1,19 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type IncidentEntityFieldRequirementEntity = { + field_id?: string | null | undefined; + required_at_milestone_id?: string | null | undefined; +}; + +export const IncidentEntityFieldRequirementEntity$zodSchema: z.ZodType< + IncidentEntityFieldRequirementEntity, + z.ZodTypeDef, + unknown +> = z.object({ + field_id: z.string().nullable().optional(), + required_at_milestone_id: z.string().nullable().optional(), +}); diff --git a/src/models/incidententitypaginated.ts b/src/models/incidententitypaginated.ts new file mode 100644 index 0000000..367d4d3 --- /dev/null +++ b/src/models/incidententitypaginated.ts @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { IncidentEntity, IncidentEntity$zodSchema } from "./incidententity.js"; +import { + NullablePaginationEntity, + NullablePaginationEntity$zodSchema, +} from "./nullablepaginationentity.js"; + +/** + * IncidentEntityPaginated model + */ +export type IncidentEntityPaginated = { + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; +}; + +export const IncidentEntityPaginated$zodSchema: z.ZodType< + IncidentEntityPaginated, + z.ZodTypeDef, + unknown +> = z.object({ + data: z.array(IncidentEntity$zodSchema).nullable().optional(), + pagination: NullablePaginationEntity$zodSchema.nullable().optional(), +}).describe("IncidentEntityPaginated model"); diff --git a/src/models/incidentschannelentity.ts b/src/models/incidentschannelentity.ts new file mode 100644 index 0000000..7434604 --- /dev/null +++ b/src/models/incidentschannelentity.ts @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * Incidents_ChannelEntity model + */ +export type IncidentsChannelEntity = { + 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; +}; + +export const IncidentsChannelEntity$zodSchema: z.ZodType< + IncidentsChannelEntity, + z.ZodTypeDef, + unknown +> = z.object({ + icon_url: z.string().nullable().optional(), + id: z.string().nullable().optional(), + name: z.string().nullable().optional(), + source: z.string().nullable().optional(), + source_id: z.string().nullable().optional(), + source_name: z.string().nullable().optional(), + status: z.string().nullable().optional(), + url: z.string().nullable().optional(), +}).describe("Incidents_ChannelEntity model"); diff --git a/src/models/incidentsconferencebridgeentity.ts b/src/models/incidentsconferencebridgeentity.ts new file mode 100644 index 0000000..c2366b8 --- /dev/null +++ b/src/models/incidentsconferencebridgeentity.ts @@ -0,0 +1,43 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type IncidentsConferenceBridgeEntityAttachment = {}; + +export const IncidentsConferenceBridgeEntityAttachment$zodSchema: z.ZodType< + IncidentsConferenceBridgeEntityAttachment, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** + * Incidents_ConferenceBridgeEntity model + */ +export type IncidentsConferenceBridgeEntity = { + 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; +}; + +export const IncidentsConferenceBridgeEntity$zodSchema: z.ZodType< + IncidentsConferenceBridgeEntity, + z.ZodTypeDef, + unknown +> = z.object({ + attachments: z.array( + z.lazy(() => IncidentsConferenceBridgeEntityAttachment$zodSchema), + ).nullable().optional(), + has_translated_transcripts: z.boolean().nullable().optional(), + id: z.string().nullable().optional(), + language_codes: z.array(z.string()).nullable().optional(), + transcription_status: z.string().nullable().optional(), + transcription_sub_code: z.string().nullable().optional(), +}).describe("Incidents_ConferenceBridgeEntity model"); diff --git a/src/models/incidentsimpactentity.ts b/src/models/incidentsimpactentity.ts new file mode 100644 index 0000000..c63fac1 --- /dev/null +++ b/src/models/incidentsimpactentity.ts @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + ConversationsAPIEntitiesReference, + ConversationsAPIEntitiesReference$zodSchema, +} from "./conversationsapientitiesreference.js"; +import { + NullableSeverityMatrixConditionEntity, + NullableSeverityMatrixConditionEntity$zodSchema, +} from "./nullableseveritymatrixconditionentity.js"; +import { + NullableSuccinctEntity, + NullableSuccinctEntity$zodSchema, +} from "./nullablesuccinctentity.js"; + +export const IncidentsImpactEntityType$zodSchema = z.enum([ + "customer", + "environment", + "functionality", + "service", +]); + +export type IncidentsImpactEntityType = z.infer< + typeof IncidentsImpactEntityType$zodSchema +>; + +export type IncidentsImpactEntity = { + id?: string | null | undefined; + type?: IncidentsImpactEntityType | null | undefined; + impact?: NullableSuccinctEntity | null | undefined; + condition?: NullableSeverityMatrixConditionEntity | null | undefined; + conversations?: Array | null | undefined; +}; + +export const IncidentsImpactEntity$zodSchema: z.ZodType< + IncidentsImpactEntity, + z.ZodTypeDef, + unknown +> = z.object({ + condition: NullableSeverityMatrixConditionEntity$zodSchema.nullable() + .optional(), + conversations: z.array(ConversationsAPIEntitiesReference$zodSchema).nullable() + .optional(), + id: z.string().nullable().optional(), + impact: NullableSuccinctEntity$zodSchema.nullable().optional(), + type: IncidentsImpactEntityType$zodSchema.nullable().optional(), +}); diff --git a/src/models/incidentslifecyclemeasuremententity.ts b/src/models/incidentslifecyclemeasuremententity.ts new file mode 100644 index 0000000..df8d58c --- /dev/null +++ b/src/models/incidentslifecyclemeasuremententity.ts @@ -0,0 +1,31 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type IncidentsLifecycleMeasurementEntity = { + 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; +}; + +export const IncidentsLifecycleMeasurementEntity$zodSchema: z.ZodType< + IncidentsLifecycleMeasurementEntity, + z.ZodTypeDef, + unknown +> = z.object({ + calculated_at: z.string().datetime({ offset: true }).nullable().optional(), + description: z.string().nullable().optional(), + ends_at_milestone: z.string().nullable().optional(), + id: z.string().nullable().optional(), + name: z.string().nullable().optional(), + slug: z.string().nullable().optional(), + starts_at_milestone: z.string().nullable().optional(), + value: z.string().nullable().optional(), +}); diff --git a/src/models/incidentslifecyclemilestoneentity.ts b/src/models/incidentslifecyclemilestoneentity.ts new file mode 100644 index 0000000..f4b126d --- /dev/null +++ b/src/models/incidentslifecyclemilestoneentity.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + NullableAuthorEntity, + NullableAuthorEntity$zodSchema, +} from "./nullableauthorentity.js"; + +export type IncidentsLifecycleMilestoneEntity = { + 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 | null | undefined; + updated_at?: string | null | undefined; +}; + +export const IncidentsLifecycleMilestoneEntity$zodSchema: z.ZodType< + IncidentsLifecycleMilestoneEntity, + z.ZodTypeDef, + unknown +> = z.object({ + description: z.string().nullable().optional(), + duration: z.string().nullable().optional(), + id: z.string().nullable().optional(), + name: z.string().nullable().optional(), + occurred_at: z.string().datetime({ offset: true }).nullable().optional(), + position: z.number().int().nullable().optional(), + slug: z.string().nullable().optional(), + updated_at: z.string().datetime({ offset: true }).nullable().optional(), + updated_by: NullableAuthorEntity$zodSchema.nullable().optional(), +}); diff --git a/src/models/incidentslifecyclephaseentity.ts b/src/models/incidentslifecyclephaseentity.ts new file mode 100644 index 0000000..c98b34e --- /dev/null +++ b/src/models/incidentslifecyclephaseentity.ts @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + IncidentsLifecycleMilestoneEntity, + IncidentsLifecycleMilestoneEntity$zodSchema, +} from "./incidentslifecyclemilestoneentity.js"; + +export type IncidentsLifecyclePhaseEntity = { + id?: string | null | undefined; + name?: string | null | undefined; + description?: string | null | undefined; + type?: string | null | undefined; + position?: number | null | undefined; + milestones?: Array | null | undefined; +}; + +export const IncidentsLifecyclePhaseEntity$zodSchema: z.ZodType< + IncidentsLifecyclePhaseEntity, + z.ZodTypeDef, + unknown +> = z.object({ + description: z.string().nullable().optional(), + id: z.string().nullable().optional(), + milestones: z.array(IncidentsLifecycleMilestoneEntity$zodSchema).nullable() + .optional(), + name: z.string().nullable().optional(), + position: z.number().int().nullable().optional(), + type: z.string().nullable().optional(), +}); diff --git a/src/models/incidentsmilestoneentity.ts b/src/models/incidentsmilestoneentity.ts new file mode 100644 index 0000000..5ddf522 --- /dev/null +++ b/src/models/incidentsmilestoneentity.ts @@ -0,0 +1,27 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type IncidentsMilestoneEntity = { + 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; +}; + +export const IncidentsMilestoneEntity$zodSchema: z.ZodType< + IncidentsMilestoneEntity, + z.ZodTypeDef, + unknown +> = z.object({ + created_at: z.string().datetime({ offset: true }).nullable().optional(), + duration: z.string().nullable().optional(), + id: z.string().nullable().optional(), + occurred_at: z.string().datetime({ offset: true }).nullable().optional(), + type: z.string().nullable().optional(), + updated_at: z.string().datetime({ offset: true }).nullable().optional(), +}); diff --git a/src/models/incidentsretrospectiveentity.ts b/src/models/incidentsretrospectiveentity.ts new file mode 100644 index 0000000..5472b99 --- /dev/null +++ b/src/models/incidentsretrospectiveentity.ts @@ -0,0 +1,45 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + IncidentsRetrospectiveEntitySectionEntity, + IncidentsRetrospectiveEntitySectionEntity$zodSchema, +} from "./incidentsretrospectiveentitysectionentity.js"; +import { + IncidentsRetrospectiveFieldEntity, + IncidentsRetrospectiveFieldEntity$zodSchema, +} 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; + is_hidden?: boolean | null | undefined; + fields?: Array | null | undefined; + exports?: Array | null | undefined; +}; + +export const IncidentsRetrospectiveEntity$zodSchema: z.ZodType< + IncidentsRetrospectiveEntity, + z.ZodTypeDef, + unknown +> = z.object({ + description: z.string().nullable().optional(), + exports: z.array(z.string()).nullable().optional(), + fields: z.array(IncidentsRetrospectiveFieldEntity$zodSchema).nullable() + .optional(), + id: z.string().nullable().optional(), + is_hidden: z.boolean().nullable().optional(), + name: z.string().nullable().optional(), + sections: z.array(IncidentsRetrospectiveEntitySectionEntity$zodSchema) + .nullable().optional(), +}).describe("Incidents_RetrospectiveEntity model"); diff --git a/src/models/incidentsretrospectiveentitypaginated.ts b/src/models/incidentsretrospectiveentitypaginated.ts new file mode 100644 index 0000000..bb32c93 --- /dev/null +++ b/src/models/incidentsretrospectiveentitypaginated.ts @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + IncidentsRetrospectiveEntity, + IncidentsRetrospectiveEntity$zodSchema, +} from "./incidentsretrospectiveentity.js"; +import { + NullablePaginationEntity, + NullablePaginationEntity$zodSchema, +} from "./nullablepaginationentity.js"; + +/** + * Incidents_RetrospectiveEntityPaginated model + */ +export type IncidentsRetrospectiveEntityPaginated = { + data?: Array | null | undefined; + pagination?: NullablePaginationEntity | null | undefined; +}; + +export const IncidentsRetrospectiveEntityPaginated$zodSchema: z.ZodType< + IncidentsRetrospectiveEntityPaginated, + z.ZodTypeDef, + unknown +> = z.object({ + data: z.array(IncidentsRetrospectiveEntity$zodSchema).nullable().optional(), + pagination: NullablePaginationEntity$zodSchema.nullable().optional(), +}).describe("Incidents_RetrospectiveEntityPaginated model"); diff --git a/src/models/incidentsretrospectiveentitysectionentity.ts b/src/models/incidentsretrospectiveentitysectionentity.ts new file mode 100644 index 0000000..06b57d0 --- /dev/null +++ b/src/models/incidentsretrospectiveentitysectionentity.ts @@ -0,0 +1,19 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type IncidentsRetrospectiveEntitySectionEntity = { + slug?: string | null | undefined; + elements?: Array | null | undefined; +}; + +export const IncidentsRetrospectiveEntitySectionEntity$zodSchema: z.ZodType< + IncidentsRetrospectiveEntitySectionEntity, + z.ZodTypeDef, + unknown +> = z.object({ + elements: z.array(z.string()).nullable().optional(), + slug: z.string().nullable().optional(), +}); diff --git a/src/models/incidentsretrospectivefieldentity.ts b/src/models/incidentsretrospectivefieldentity.ts new file mode 100644 index 0000000..a5d82ca --- /dev/null +++ b/src/models/incidentsretrospectivefieldentity.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export const IncidentsRetrospectiveFieldEntityType$zodSchema = z.enum([ + "text", + "single_select", + "multi_select", + "numeric", + "datetime", + "dynamic_input_group", + "markdown", + "markdown_text", +]); + +export type IncidentsRetrospectiveFieldEntityType = z.infer< + typeof IncidentsRetrospectiveFieldEntityType$zodSchema +>; + +export type IncidentsRetrospectiveFieldEntityValue = + | number + | string + | Array<{ [k: string]: any }>; + +export const IncidentsRetrospectiveFieldEntityValue$zodSchema: z.ZodType< + IncidentsRetrospectiveFieldEntityValue, + z.ZodTypeDef, + unknown +> = z.union([ + z.number().int(), + z.string(), + z.array(z.record(z.any())), +]); + +/** + * Incidents_RetrospectiveFieldEntity model + */ +export type IncidentsRetrospectiveFieldEntity = { + id?: string | null | undefined; + label?: string | null | undefined; + type?: IncidentsRetrospectiveFieldEntityType | null | undefined; + help_text?: string | null | undefined; + permissible_values?: Array | null | undefined; + is_required?: boolean | null | undefined; + value?: number | string | Array<{ [k: string]: any }> | null | undefined; + schema?: Array | null | undefined; +}; + +export const IncidentsRetrospectiveFieldEntity$zodSchema: z.ZodType< + IncidentsRetrospectiveFieldEntity, + z.ZodTypeDef, + unknown +> = z.object({ + help_text: z.string().nullable().optional(), + id: z.string().nullable().optional(), + is_required: z.boolean().nullable().optional(), + label: z.string().nullable().optional(), + permissible_values: z.array(z.string()).nullable().optional(), + schema: z.array(z.string()).nullable().optional(), + type: IncidentsRetrospectiveFieldEntityType$zodSchema.nullable().optional(), + value: z.union([ + z.number().int(), + z.string(), + z.array(z.record(z.any())), + ]).nullable().optional(), +}).describe("Incidents_RetrospectiveFieldEntity model"); diff --git a/src/models/incidentsroleassignmententity.ts b/src/models/incidentsroleassignmententity.ts new file mode 100644 index 0000000..af21fc4 --- /dev/null +++ b/src/models/incidentsroleassignmententity.ts @@ -0,0 +1,45 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + NullableIncidentRoleEntity, + NullableIncidentRoleEntity$zodSchema, +} from "./nullableincidentroleentity.js"; +import { + NullableUserEntity, + NullableUserEntity$zodSchema, +} from "./nullableuserentity.js"; + +export const Status$zodSchema = z.enum([ + "active", + "inactive", +]); + +export type Status = z.infer; + +/** + * Incidents_RoleAssignmentEntity model + */ +export type IncidentsRoleAssignmentEntity = { + id?: string | null | undefined; + status?: Status | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + incident_role?: NullableIncidentRoleEntity | null | undefined; + user?: NullableUserEntity | null | undefined; +}; + +export const IncidentsRoleAssignmentEntity$zodSchema: z.ZodType< + IncidentsRoleAssignmentEntity, + z.ZodTypeDef, + unknown +> = z.object({ + created_at: z.string().datetime({ offset: true }).nullable().optional(), + id: z.string().nullable().optional(), + incident_role: NullableIncidentRoleEntity$zodSchema.nullable().optional(), + status: Status$zodSchema.nullable().optional(), + updated_at: z.string().datetime({ offset: true }).nullable().optional(), + user: NullableUserEntity$zodSchema.nullable().optional(), +}).describe("Incidents_RoleAssignmentEntity model"); diff --git a/src/models/incidentsstatuspageentity.ts b/src/models/incidentsstatuspageentity.ts new file mode 100644 index 0000000..cd74f12 --- /dev/null +++ b/src/models/incidentsstatuspageentity.ts @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + NullableIntegrationEntity, + NullableIntegrationEntity$zodSchema, +} from "./nullableintegrationentity.js"; + +/** + * Incidents_StatusPageEntity model + */ +export type IncidentsStatusPageEntity = { + id?: string | null | undefined; + url?: string | null | undefined; + external_id?: string | null | undefined; + name?: string | null | undefined; + display_name?: string | null | undefined; + integration?: NullableIntegrationEntity | null | undefined; +}; + +export const IncidentsStatusPageEntity$zodSchema: z.ZodType< + IncidentsStatusPageEntity, + z.ZodTypeDef, + unknown +> = z.object({ + display_name: z.string().nullable().optional(), + external_id: z.string().nullable().optional(), + id: z.string().nullable().optional(), + integration: NullableIntegrationEntity$zodSchema.nullable().optional(), + name: z.string().nullable().optional(), + url: z.string().nullable().optional(), +}).describe("Incidents_StatusPageEntity model"); diff --git a/src/models/incidentsteamassignmententitylite.ts b/src/models/incidentsteamassignmententitylite.ts new file mode 100644 index 0000000..3a36b63 --- /dev/null +++ b/src/models/incidentsteamassignmententitylite.ts @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + NullableTeamEntityLite, + NullableTeamEntityLite$zodSchema, +} from "./nullableteamentitylite.js"; + +export type IncidentsTeamAssignmentEntityLite = { + id?: string | null | undefined; + status?: string | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + team?: NullableTeamEntityLite | null | undefined; +}; + +export const IncidentsTeamAssignmentEntityLite$zodSchema: z.ZodType< + IncidentsTeamAssignmentEntityLite, + z.ZodTypeDef, + unknown +> = z.object({ + created_at: z.string().datetime({ offset: true }).nullable().optional(), + id: z.string().nullable().optional(), + status: z.string().nullable().optional(), + team: NullableTeamEntityLite$zodSchema.nullable().optional(), + updated_at: z.string().datetime({ offset: true }).nullable().optional(), +}); diff --git a/src/models/listalertsop.ts b/src/models/listalertsop.ts new file mode 100644 index 0000000..b16abdb --- /dev/null +++ b/src/models/listalertsop.ts @@ -0,0 +1,93 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + AlertsAlertEntityPaginated, + AlertsAlertEntityPaginated$zodSchema, +} from "./alertsalertentitypaginated.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 ListAlertsTagMatchStrategy$zodSchema = z.enum([ + "any", + "match_all", + "exclude", +]).describe( + "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 ListAlertsTagMatchStrategy = z.infer< + typeof ListAlertsTagMatchStrategy$zodSchema +>; + +export type ListAlertsRequest = { + 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?: ListAlertsTagMatchStrategy | null | undefined; + statuses?: string | null | undefined; +}; + +export const ListAlertsRequest$zodSchema: z.ZodType< + ListAlertsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + environments: z.string().describe( + "A comma separated list of environment IDs. This currently only works for Signals alerts.", + ).nullable().optional(), + functionalities: z.string().describe( + "A comma separated list of functionality IDs. This currently only works for Signals alerts.", + ).nullable().optional(), + page: z.number().int().nullable().optional(), + per_page: z.number().int().nullable().optional(), + query: z.string().describe("A text query for alerts").nullable().optional(), + services: z.string().describe( + "A comma separated list of service IDs. This currently only works for Signals alerts.", + ).nullable().optional(), + signal_rules: z.string().describe( + "A comma separated list of signals rule IDs. This currently only works for Signals alerts.", + ).nullable().optional(), + statuses: z.string().describe( + "A comma separated list of statuses to filter by. Valid statuses are: opened, acknowledged, resolved, ignored, expired, or linked", + ).nullable().optional(), + tag_match_strategy: ListAlertsTagMatchStrategy$zodSchema.nullable() + .optional(), + tags: z.string().describe( + "A comma separated list of tags. This currently only works for Signals alerts.", + ).nullable().optional(), + teams: z.string().describe( + "A comma separated list of team IDs. This currently only works for Signals alerts.", + ).nullable().optional(), + users: z.string().describe( + "A comma separated list of user IDs. This currently only works for Signals alerts.", + ).nullable().optional(), +}); + +export type ListAlertsResponse = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + Alerts_AlertEntityPaginated?: AlertsAlertEntityPaginated | undefined; +}; + +export const ListAlertsResponse$zodSchema: z.ZodType< + ListAlertsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + Alerts_AlertEntityPaginated: AlertsAlertEntityPaginated$zodSchema.optional(), + ContentType: z.string(), + RawResponse: z.instanceof(Response), + StatusCode: z.number().int(), +}); diff --git a/src/models/listincidentretrospectivesop.ts b/src/models/listincidentretrospectivesop.ts new file mode 100644 index 0000000..8e5123b --- /dev/null +++ b/src/models/listincidentretrospectivesop.ts @@ -0,0 +1,49 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + IncidentsRetrospectiveEntityPaginated, + IncidentsRetrospectiveEntityPaginated$zodSchema, +} from "./incidentsretrospectiveentitypaginated.js"; + +export type ListIncidentRetrospectivesRequest = { + page?: number | null | undefined; + per_page?: number | null | undefined; + is_hidden?: boolean | null | undefined; + incident_id: string; +}; + +export const ListIncidentRetrospectivesRequest$zodSchema: z.ZodType< + ListIncidentRetrospectivesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + incident_id: z.string(), + is_hidden: z.boolean().describe("Filter by hidden status.").nullable() + .optional(), + page: z.number().int().nullable().optional(), + per_page: z.number().int().nullable().optional(), +}); + +export type ListIncidentRetrospectivesResponse = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + Incidents_RetrospectiveEntityPaginated?: + | IncidentsRetrospectiveEntityPaginated + | undefined; +}; + +export const ListIncidentRetrospectivesResponse$zodSchema: z.ZodType< + ListIncidentRetrospectivesResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + Incidents_RetrospectiveEntityPaginated: + IncidentsRetrospectiveEntityPaginated$zodSchema.optional(), + RawResponse: z.instanceof(Response), + StatusCode: z.number().int(), +}); diff --git a/src/models/listincidentsop.ts b/src/models/listincidentsop.ts new file mode 100644 index 0000000..c9cae9e --- /dev/null +++ b/src/models/listincidentsop.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + IncidentEntityPaginated, + IncidentEntityPaginated$zodSchema, +} from "./incidententitypaginated.js"; + +/** + * A matching strategy for the tags provided + */ +export const ListIncidentsTagMatchStrategy$zodSchema = z.enum([ + "any", + "match_all", + "exclude", +]).describe("A matching strategy for the tags provided"); + +export type ListIncidentsTagMatchStrategy = z.infer< + typeof ListIncidentsTagMatchStrategy$zodSchema +>; + +export type ListIncidentsRequest = { + 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?: ListIncidentsTagMatchStrategy | null | undefined; + archived?: boolean | null | undefined; + updated_after?: string | null | undefined; + updated_before?: string | null | undefined; + incident_type_id?: string | null | undefined; + retrospective_templates?: string | null | undefined; +}; + +export const ListIncidentsRequest$zodSchema: z.ZodType< + ListIncidentsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + archived: z.boolean().describe("Return archived incidents").nullable() + .optional(), + assigned_teams: z.string().describe( + "A comma separated list of IDs for assigned teams or 'is_empty' to filter for incidents with no active team assignments", + ).nullable().optional(), + closed_at_or_after: z.string().datetime({ offset: true }).describe( + "Filters for incidents that were closed at or after this time", + ).nullable().optional(), + closed_at_or_before: z.string().datetime({ offset: true }).describe( + "Filters for incidents that were closed at or before this time", + ).nullable().optional(), + conditions: z.string().describe( + "A JSON string that defines 'logic' and 'user_data'", + ).nullable().optional(), + created_at_or_after: z.string().datetime({ offset: true }).describe( + "Filters for incidents that were created at or after this time", + ).nullable().optional(), + created_at_or_before: z.string().datetime({ offset: true }).describe( + "Filters for incidents that were created at or before this time", + ).nullable().optional(), + current_milestones: z.string().describe( + "A comma separated list of current milestones", + ).nullable().optional(), + end_date: z.string().datetime({ offset: true }).describe( + "Filters for incidents that started on or before this date", + ).nullable().optional(), + environments: z.string().describe( + "A comma separated list of environment IDs or 'is_empty' to filter for incidents with no impacted environments", + ).nullable().optional(), + excluded_infrastructure_ids: z.string().describe( + "A comma separated list of infrastructure IDs. Returns incidents that do not have the following infrastructure ids associated with them.", + ).nullable().optional(), + functionalities: z.string().describe( + "A comma separated list of functionality IDs or 'is_empty' to filter for incidents with no impacted functionalities", + ).nullable().optional(), + incident_type_id: z.string().describe( + "A comma separated list of incident type IDs", + ).nullable().optional(), + name: z.string().describe("A query to search incidents by their name") + .nullable().optional(), + page: z.number().int().nullable().optional(), + per_page: z.number().int().nullable().optional(), + priorities: z.string().describe("A text value of priority").nullable() + .optional(), + priority_not_set: z.boolean().describe( + "Flag for including incidents where priority has not been set", + ).nullable().optional(), + query: z.string().describe( + "A text query for an incident that searches on name, summary, and desciption", + ).nullable().optional(), + resolved_at_or_after: z.string().datetime({ offset: true }).describe( + "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.", + ).nullable().optional(), + resolved_at_or_before: z.string().datetime({ offset: true }).describe( + "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.", + ).nullable().optional(), + retrospective_templates: z.string().describe( + "A comma separated list of retrospective template IDs", + ).nullable().optional(), + saved_search_id: z.string().describe("The id of a previously saved search.") + .nullable().optional(), + services: z.string().describe( + "A comma separated list of service IDs or 'is_empty' to filter for incidents with no impacted services", + ).nullable().optional(), + severities: z.string().describe("A text value of severity").nullable() + .optional(), + severity_not_set: z.boolean().describe( + "Flag for including incidents where severity has not been set", + ).nullable().optional(), + start_date: z.string().datetime({ offset: true }).describe( + "Filters for incidents that started on or after this date", + ).nullable().optional(), + status: z.string().describe("Incident status").nullable().optional(), + tag_match_strategy: ListIncidentsTagMatchStrategy$zodSchema.nullable() + .optional(), + tags: z.string().describe("A comma separated list of tags").nullable() + .optional(), + teams: z.string().describe("A comma separated list of team IDs").nullable() + .optional(), + updated_after: z.string().datetime({ offset: true }).describe( + "Filters for incidents that were updated after this date", + ).nullable().optional(), + updated_before: z.string().datetime({ offset: true }).describe( + "Filters for incidents that were updated before this date", + ).nullable().optional(), +}); + +export type ListIncidentsResponse = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + IncidentEntityPaginated?: IncidentEntityPaginated | undefined; +}; + +export const ListIncidentsResponse$zodSchema: z.ZodType< + ListIncidentsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + IncidentEntityPaginated: IncidentEntityPaginated$zodSchema.optional(), + RawResponse: z.instanceof(Response), + StatusCode: z.number().int(), +}); diff --git a/src/models/nullableattachmentslinkentity.ts b/src/models/nullableattachmentslinkentity.ts new file mode 100644 index 0000000..268be56 --- /dev/null +++ b/src/models/nullableattachmentslinkentity.ts @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * Attachments_LinkEntity model + */ +export type NullableAttachmentsLinkEntity = { + 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; +}; + +export const NullableAttachmentsLinkEntity$zodSchema: z.ZodType< + NullableAttachmentsLinkEntity, + z.ZodTypeDef, + unknown +> = z.object({ + deletable: z.boolean().nullable().optional(), + display_text: z.string().nullable().optional(), + editable: z.boolean().nullable().optional(), + href_url: z.string().nullable().optional(), + icon_url: z.string().nullable().optional(), + id: z.string().nullable().optional(), + type: z.string().nullable().optional(), +}).describe("Attachments_LinkEntity model"); diff --git a/src/models/nullableauthorentity.ts b/src/models/nullableauthorentity.ts new file mode 100644 index 0000000..49db5b5 --- /dev/null +++ b/src/models/nullableauthorentity.ts @@ -0,0 +1,23 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type NullableAuthorEntity = { + id?: string | null | undefined; + name?: string | null | undefined; + source?: string | null | undefined; + email?: string | null | undefined; +}; + +export const NullableAuthorEntity$zodSchema: z.ZodType< + NullableAuthorEntity, + z.ZodTypeDef, + unknown +> = z.object({ + email: z.string().nullable().optional(), + id: z.string().nullable().optional(), + name: z.string().nullable().optional(), + source: z.string().nullable().optional(), +}); diff --git a/src/models/nullableconversationsapientitieschannel.ts b/src/models/nullableconversationsapientitieschannel.ts new file mode 100644 index 0000000..8a56a62 --- /dev/null +++ b/src/models/nullableconversationsapientitieschannel.ts @@ -0,0 +1,17 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type NullableConversationsAPIEntitiesChannel = { + name?: string | null | undefined; +}; + +export const NullableConversationsAPIEntitiesChannel$zodSchema: z.ZodType< + NullableConversationsAPIEntitiesChannel, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string().nullable().optional(), +}); diff --git a/src/models/nullableeventnoteentity.ts b/src/models/nullableeventnoteentity.ts new file mode 100644 index 0000000..9eb5b2d --- /dev/null +++ b/src/models/nullableeventnoteentity.ts @@ -0,0 +1,38 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + ConversationsAPIEntitiesReference, + ConversationsAPIEntitiesReference$zodSchema, +} from "./conversationsapientitiesreference.js"; +import { + IncidentsStatusPageEntity, + IncidentsStatusPageEntity$zodSchema, +} from "./incidentsstatuspageentity.js"; + +/** + * Event_NoteEntity model + */ +export type NullableEventNoteEntity = { + id?: string | null | undefined; + body?: string | null | undefined; + created_at?: string | null | undefined; + status_pages?: Array | null | undefined; + conversations?: Array | null | undefined; +}; + +export const NullableEventNoteEntity$zodSchema: z.ZodType< + NullableEventNoteEntity, + z.ZodTypeDef, + unknown +> = z.object({ + body: z.string().nullable().optional(), + conversations: z.array(ConversationsAPIEntitiesReference$zodSchema).nullable() + .optional(), + created_at: z.string().datetime({ offset: true }).nullable().optional(), + id: z.string().nullable().optional(), + status_pages: z.array(IncidentsStatusPageEntity$zodSchema).nullable() + .optional(), +}).describe("Event_NoteEntity model"); diff --git a/src/models/nullableincidentroleentity.ts b/src/models/nullableincidentroleentity.ts new file mode 100644 index 0000000..697a2a0 --- /dev/null +++ b/src/models/nullableincidentroleentity.ts @@ -0,0 +1,32 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * IncidentRoleEntity model + */ +export type NullableIncidentRoleEntity = { + 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; +}; + +export const NullableIncidentRoleEntity$zodSchema: z.ZodType< + NullableIncidentRoleEntity, + z.ZodTypeDef, + unknown +> = z.object({ + created_at: z.string().datetime({ offset: true }).nullable().optional(), + description: z.string().nullable().optional(), + discarded_at: z.string().datetime({ offset: true }).nullable().optional(), + id: z.string().nullable().optional(), + name: z.string().nullable().optional(), + summary: z.string().nullable().optional(), + updated_at: z.string().datetime({ offset: true }).nullable().optional(), +}).describe("IncidentRoleEntity model"); diff --git a/src/models/nullableincidentscontextobjectentity.ts b/src/models/nullableincidentscontextobjectentity.ts new file mode 100644 index 0000000..8525cca --- /dev/null +++ b/src/models/nullableincidentscontextobjectentity.ts @@ -0,0 +1,23 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type NullableIncidentsContextObjectEntity = { + object_type?: string | null | undefined; + object_id?: string | null | undefined; + context_tag?: string | null | undefined; + context_description?: string | null | undefined; +}; + +export const NullableIncidentsContextObjectEntity$zodSchema: z.ZodType< + NullableIncidentsContextObjectEntity, + z.ZodTypeDef, + unknown +> = z.object({ + context_description: z.string().nullable().optional(), + context_tag: z.string().nullable().optional(), + object_id: z.string().nullable().optional(), + object_type: z.string().nullable().optional(), +}); diff --git a/src/models/nullableintegrationentity.ts b/src/models/nullableintegrationentity.ts new file mode 100644 index 0000000..26c1f12 --- /dev/null +++ b/src/models/nullableintegrationentity.ts @@ -0,0 +1,25 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type NullableIntegrationEntity = { + id?: string | null | undefined; + integration_name?: string | null | undefined; + integration_slug?: string | null | undefined; + display_name?: string | null | undefined; + created_at?: string | null | undefined; +}; + +export const NullableIntegrationEntity$zodSchema: z.ZodType< + NullableIntegrationEntity, + z.ZodTypeDef, + unknown +> = z.object({ + created_at: z.string().datetime({ offset: true }).nullable().optional(), + display_name: z.string().nullable().optional(), + id: z.string().nullable().optional(), + integration_name: z.string().nullable().optional(), + integration_slug: z.string().nullable().optional(), +}); diff --git a/src/models/nullableorganizationentity.ts b/src/models/nullableorganizationentity.ts new file mode 100644 index 0000000..33586d2 --- /dev/null +++ b/src/models/nullableorganizationentity.ts @@ -0,0 +1,19 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type NullableOrganizationEntity = { + name?: string | null | undefined; + id?: string | null | undefined; +}; + +export const NullableOrganizationEntity$zodSchema: z.ZodType< + NullableOrganizationEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string().nullable().optional(), + name: z.string().nullable().optional(), +}); diff --git a/src/models/nullablepaginationentity.ts b/src/models/nullablepaginationentity.ts new file mode 100644 index 0000000..2d35780 --- /dev/null +++ b/src/models/nullablepaginationentity.ts @@ -0,0 +1,29 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +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; +}; + +export const NullablePaginationEntity$zodSchema: z.ZodType< + NullablePaginationEntity, + z.ZodTypeDef, + unknown +> = z.object({ + count: z.number().int().nullable().optional(), + items: z.number().int().nullable().optional(), + last: z.number().int().nullable().optional(), + next: z.number().int().nullable().optional(), + page: z.number().int().nullable().optional(), + pages: z.number().int().nullable().optional(), + prev: z.number().int().nullable().optional(), +}); diff --git a/src/models/nullableseveritymatrixconditionentity.ts b/src/models/nullableseveritymatrixconditionentity.ts new file mode 100644 index 0000000..b388c13 --- /dev/null +++ b/src/models/nullableseveritymatrixconditionentity.ts @@ -0,0 +1,24 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * SeverityMatrix_ConditionEntity model + */ +export type NullableSeverityMatrixConditionEntity = { + id?: string | null | undefined; + name?: string | null | undefined; + position?: number | null | undefined; +}; + +export const NullableSeverityMatrixConditionEntity$zodSchema: z.ZodType< + NullableSeverityMatrixConditionEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string().nullable().optional(), + name: z.string().nullable().optional(), + position: z.number().int().nullable().optional(), +}).describe("SeverityMatrix_ConditionEntity model"); diff --git a/src/models/nullableseveritymatriximpactentity.ts b/src/models/nullableseveritymatriximpactentity.ts new file mode 100644 index 0000000..c612a92 --- /dev/null +++ b/src/models/nullableseveritymatriximpactentity.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * SeverityMatrix_ImpactEntity model + */ +export type NullableSeverityMatrixImpactEntity = { + id?: string | null | undefined; + name?: string | null | undefined; + type?: string | null | undefined; + affects_id?: string | null | undefined; + position?: number | null | undefined; +}; + +export const NullableSeverityMatrixImpactEntity$zodSchema: z.ZodType< + NullableSeverityMatrixImpactEntity, + z.ZodTypeDef, + unknown +> = z.object({ + affects_id: z.string().nullable().optional(), + id: z.string().nullable().optional(), + name: z.string().nullable().optional(), + position: z.number().int().nullable().optional(), + type: z.string().nullable().optional(), +}).describe("SeverityMatrix_ImpactEntity model"); diff --git a/src/models/nullablesignalsapiruleentity.ts b/src/models/nullablesignalsapiruleentity.ts new file mode 100644 index 0000000..eccb62a --- /dev/null +++ b/src/models/nullablesignalsapiruleentity.ts @@ -0,0 +1,81 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + NullableAuthorEntity, + NullableAuthorEntity$zodSchema, +} from "./nullableauthorentity.js"; +import { + NullableSignalsAPITargetEntity, + NullableSignalsAPITargetEntity$zodSchema, +} from "./nullablesignalsapitargetentity.js"; +import { + NullableSuccinctEntity, + NullableSuccinctEntity$zodSchema, +} from "./nullablesuccinctentity.js"; + +export const NotificationPriorityOverride$zodSchema = z.enum([ + "HIGH", + "MEDIUM", + "LOW", +]); + +export type NotificationPriorityOverride = z.infer< + typeof NotificationPriorityOverride$zodSchema +>; + +export const CreateIncidentConditionWhen$zodSchema = z.enum([ + "WHEN_UNSPECIFIED", + "WHEN_ALWAYS", +]); + +export type CreateIncidentConditionWhen = z.infer< + typeof CreateIncidentConditionWhen$zodSchema +>; + +/** + * Signals_API_RuleEntity model + */ +export type NullableSignalsAPIRuleEntity = { + id?: string | null | undefined; + name?: string | null | undefined; + expression?: string | null | undefined; + team_id?: string | null | undefined; + target?: NullableSignalsAPITargetEntity | null | undefined; + created_by?: NullableAuthorEntity | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + incident_type?: NullableSuccinctEntity | null | undefined; + notification_priority_override?: + | NotificationPriorityOverride + | null + | undefined; + create_incident_condition_when?: + | CreateIncidentConditionWhen + | null + | undefined; + deduplication_expiry?: string | null | undefined; +}; + +export const NullableSignalsAPIRuleEntity$zodSchema: z.ZodType< + NullableSignalsAPIRuleEntity, + z.ZodTypeDef, + unknown +> = z.object({ + create_incident_condition_when: CreateIncidentConditionWhen$zodSchema + .nullable().optional(), + created_at: z.string().datetime({ offset: true }).nullable().optional(), + created_by: NullableAuthorEntity$zodSchema.nullable().optional(), + deduplication_expiry: z.string().nullable().optional(), + expression: z.string().nullable().optional(), + id: z.string().nullable().optional(), + incident_type: NullableSuccinctEntity$zodSchema.nullable().optional(), + name: z.string().nullable().optional(), + notification_priority_override: NotificationPriorityOverride$zodSchema + .nullable().optional(), + target: NullableSignalsAPITargetEntity$zodSchema.nullable().optional(), + team_id: z.string().nullable().optional(), + updated_at: z.string().datetime({ offset: true }).nullable().optional(), +}).describe("Signals_API_RuleEntity model"); diff --git a/src/models/nullablesignalsapitargetentity.ts b/src/models/nullablesignalsapitargetentity.ts new file mode 100644 index 0000000..37df3cb --- /dev/null +++ b/src/models/nullablesignalsapitargetentity.ts @@ -0,0 +1,23 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type NullableSignalsAPITargetEntity = { + id?: string | null | undefined; + name?: string | null | undefined; + type?: string | null | undefined; + is_pageable?: boolean | null | undefined; +}; + +export const NullableSignalsAPITargetEntity$zodSchema: z.ZodType< + NullableSignalsAPITargetEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string().nullable().optional(), + is_pageable: z.boolean().nullable().optional(), + name: z.string().nullable().optional(), + type: z.string().nullable().optional(), +}); diff --git a/src/models/nullablesuccinctentity.ts b/src/models/nullablesuccinctentity.ts new file mode 100644 index 0000000..8981219 --- /dev/null +++ b/src/models/nullablesuccinctentity.ts @@ -0,0 +1,19 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type NullableSuccinctEntity = { + id?: string | null | undefined; + name?: string | null | undefined; +}; + +export const NullableSuccinctEntity$zodSchema: z.ZodType< + NullableSuccinctEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string().nullable().optional(), + name: z.string().nullable().optional(), +}); diff --git a/src/models/nullableteamentitylite.ts b/src/models/nullableteamentitylite.ts new file mode 100644 index 0000000..22114ad --- /dev/null +++ b/src/models/nullableteamentitylite.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + NullableAuthorEntity, + NullableAuthorEntity$zodSchema, +} from "./nullableauthorentity.js"; + +export type NullableTeamEntityLite = { + 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 | null | undefined; + in_support_hours?: boolean | null | undefined; +}; + +export const NullableTeamEntityLite$zodSchema: z.ZodType< + NullableTeamEntityLite, + z.ZodTypeDef, + unknown +> = z.object({ + created_at: z.string().datetime({ offset: true }).nullable().optional(), + created_by: NullableAuthorEntity$zodSchema.nullable().optional(), + description: z.string().nullable().optional(), + id: z.string().nullable().optional(), + in_support_hours: z.boolean().nullable().optional(), + name: z.string().nullable().optional(), + signals_ical_url: z.string().nullable().optional(), + slug: z.string().nullable().optional(), + updated_at: z.string().datetime({ offset: true }).nullable().optional(), +}); diff --git a/src/models/nullableticketingpriorityentity.ts b/src/models/nullableticketingpriorityentity.ts new file mode 100644 index 0000000..436bcb9 --- /dev/null +++ b/src/models/nullableticketingpriorityentity.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * Ticketing_PriorityEntity model + */ +export type NullableTicketingPriorityEntity = { + id?: string | null | undefined; + name?: string | null | undefined; + position?: number | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; +}; + +export const NullableTicketingPriorityEntity$zodSchema: z.ZodType< + NullableTicketingPriorityEntity, + z.ZodTypeDef, + unknown +> = z.object({ + created_at: z.string().datetime({ offset: true }).nullable().optional(), + id: z.string().nullable().optional(), + name: z.string().nullable().optional(), + position: z.number().int().nullable().optional(), + updated_at: z.string().datetime({ offset: true }).nullable().optional(), +}).describe("Ticketing_PriorityEntity model"); diff --git a/src/models/nullableticketingticketentity.ts b/src/models/nullableticketingticketentity.ts new file mode 100644 index 0000000..a65923e --- /dev/null +++ b/src/models/nullableticketingticketentity.ts @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { AuthorEntity, AuthorEntity$zodSchema } from "./authorentity.js"; +import { + NullableAttachmentsLinkEntity, + NullableAttachmentsLinkEntity$zodSchema, +} from "./nullableattachmentslinkentity.js"; +import { + NullableAuthorEntity, + NullableAuthorEntity$zodSchema, +} from "./nullableauthorentity.js"; +import { + NullableTicketingPriorityEntity, + NullableTicketingPriorityEntity$zodSchema, +} from "./nullableticketingpriorityentity.js"; + +export const NullableTicketingTicketEntityState$zodSchema = z.enum([ + "open", + "in_progress", + "cancelled", + "done", +]); + +export type NullableTicketingTicketEntityState = z.infer< + typeof NullableTicketingTicketEntityState$zodSchema +>; + +export const NullableTicketingTicketEntityType$zodSchema = z.enum([ + "incident", + "task", + "follow_up", +]); + +export type NullableTicketingTicketEntityType = z.infer< + typeof NullableTicketingTicketEntityType$zodSchema +>; + +export type NullableTicketingTicketEntityAttachment = {}; + +export const NullableTicketingTicketEntityAttachment$zodSchema: z.ZodType< + NullableTicketingTicketEntityAttachment, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** + * 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; + created_by?: NullableAuthorEntity | 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; + sync_error_message?: string | null | undefined; + link?: NullableAttachmentsLinkEntity | null | undefined; +}; + +export const NullableTicketingTicketEntity$zodSchema: z.ZodType< + NullableTicketingTicketEntity, + z.ZodTypeDef, + unknown +> = z.object({ + assignees: z.array(AuthorEntity$zodSchema).nullable().optional(), + attachments: z.array( + z.lazy(() => NullableTicketingTicketEntityAttachment$zodSchema), + ).nullable().optional(), + created_at: z.string().datetime({ offset: true }).nullable().optional(), + created_by: NullableAuthorEntity$zodSchema.nullable().optional(), + description: z.string().nullable().optional(), + due_at: z.string().datetime({ offset: true }).nullable().optional(), + id: z.string().nullable().optional(), + incident_current_milestone: z.string().nullable().optional(), + incident_id: z.string().nullable().optional(), + incident_name: z.string().nullable().optional(), + link: NullableAttachmentsLinkEntity$zodSchema.nullable().optional(), + priority: NullableTicketingPriorityEntity$zodSchema.nullable().optional(), + state: NullableTicketingTicketEntityState$zodSchema.nullable().optional(), + summary: z.string().nullable().optional(), + sync_error_message: z.string().nullable().optional(), + tag_list: z.array(z.string()).nullable().optional(), + task_id: z.string().nullable().optional(), + type: NullableTicketingTicketEntityType$zodSchema.nullable().optional(), + updated_at: z.string().datetime({ offset: true }).nullable().optional(), +}).describe("Ticketing_TicketEntity model"); diff --git a/src/models/nullableuserentity.ts b/src/models/nullableuserentity.ts new file mode 100644 index 0000000..0cd58ec --- /dev/null +++ b/src/models/nullableuserentity.ts @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * UserEntity model + */ +export type NullableUserEntity = { + id?: string | null | undefined; + name?: string | null | undefined; + email?: string | null | undefined; + slack_user_id?: string | null | undefined; + slackLinked?: boolean | null | undefined; + created_at?: string | null | undefined; + updated_at?: string | null | undefined; + signals_enabled_notification_types?: Array | null | undefined; +}; + +export const NullableUserEntity$zodSchema: z.ZodType< + NullableUserEntity, + z.ZodTypeDef, + unknown +> = z.object({ + created_at: z.string().datetime({ offset: true }).nullable().optional(), + email: z.string().nullable().optional(), + id: z.string().nullable().optional(), + name: z.string().nullable().optional(), + signals_enabled_notification_types: z.array(z.string()).nullable().optional(), + slackLinked: z.boolean().nullable().optional(), + slack_user_id: z.string().nullable().optional(), + updated_at: z.string().datetime({ offset: true }).nullable().optional(), +}).describe("UserEntity model"); diff --git a/src/models/publicapiv1incidentssuccinctentity.ts b/src/models/publicapiv1incidentssuccinctentity.ts new file mode 100644 index 0000000..8266687 --- /dev/null +++ b/src/models/publicapiv1incidentssuccinctentity.ts @@ -0,0 +1,21 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type PublicApiv1IncidentsSuccinctEntity = { + id?: string | null | undefined; + name?: string | null | undefined; + number?: number | null | undefined; +}; + +export const PublicApiv1IncidentsSuccinctEntity$zodSchema: z.ZodType< + PublicApiv1IncidentsSuccinctEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string().nullable().optional(), + name: z.string().nullable().optional(), + number: z.number().int().nullable().optional(), +}); diff --git a/src/models/security.ts b/src/models/security.ts new file mode 100644 index 0000000..be4cc5d --- /dev/null +++ b/src/models/security.ts @@ -0,0 +1,12 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type Security = { api_key: string }; + +export const Security$zodSchema: z.ZodType = z + .object({ + api_key: z.string(), + }); diff --git a/src/models/succinctentity.ts b/src/models/succinctentity.ts new file mode 100644 index 0000000..097d0e4 --- /dev/null +++ b/src/models/succinctentity.ts @@ -0,0 +1,19 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type SuccinctEntity = { + id?: string | null | undefined; + name?: string | null | undefined; +}; + +export const SuccinctEntity$zodSchema: z.ZodType< + SuccinctEntity, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string().nullable().optional(), + name: z.string().nullable().optional(), +}); diff --git a/src/models/ticketingticketentity.ts b/src/models/ticketingticketentity.ts new file mode 100644 index 0000000..b1077c1 --- /dev/null +++ b/src/models/ticketingticketentity.ts @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { AuthorEntity, AuthorEntity$zodSchema } from "./authorentity.js"; +import { + NullableAttachmentsLinkEntity, + NullableAttachmentsLinkEntity$zodSchema, +} from "./nullableattachmentslinkentity.js"; +import { + NullableAuthorEntity, + NullableAuthorEntity$zodSchema, +} from "./nullableauthorentity.js"; +import { + NullableTicketingPriorityEntity, + NullableTicketingPriorityEntity$zodSchema, +} from "./nullableticketingpriorityentity.js"; + +export const TicketingTicketEntityState$zodSchema = z.enum([ + "open", + "in_progress", + "cancelled", + "done", +]); + +export type TicketingTicketEntityState = z.infer< + typeof TicketingTicketEntityState$zodSchema +>; + +export const TicketingTicketEntityType$zodSchema = z.enum([ + "incident", + "task", + "follow_up", +]); + +export type TicketingTicketEntityType = z.infer< + typeof TicketingTicketEntityType$zodSchema +>; + +export type TicketingTicketEntityAttachment = {}; + +export const TicketingTicketEntityAttachment$zodSchema: z.ZodType< + TicketingTicketEntityAttachment, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** + * Ticketing_TicketEntity model + */ +export type TicketingTicketEntity = { + 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; + created_by?: NullableAuthorEntity | 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; + sync_error_message?: string | null | undefined; + link?: NullableAttachmentsLinkEntity | null | undefined; +}; + +export const TicketingTicketEntity$zodSchema: z.ZodType< + TicketingTicketEntity, + z.ZodTypeDef, + unknown +> = z.object({ + assignees: z.array(AuthorEntity$zodSchema).nullable().optional(), + attachments: z.array(z.lazy(() => TicketingTicketEntityAttachment$zodSchema)) + .nullable().optional(), + created_at: z.string().datetime({ offset: true }).nullable().optional(), + created_by: NullableAuthorEntity$zodSchema.nullable().optional(), + description: z.string().nullable().optional(), + due_at: z.string().datetime({ offset: true }).nullable().optional(), + id: z.string().nullable().optional(), + incident_current_milestone: z.string().nullable().optional(), + incident_id: z.string().nullable().optional(), + incident_name: z.string().nullable().optional(), + link: NullableAttachmentsLinkEntity$zodSchema.nullable().optional(), + priority: NullableTicketingPriorityEntity$zodSchema.nullable().optional(), + state: TicketingTicketEntityState$zodSchema.nullable().optional(), + summary: z.string().nullable().optional(), + sync_error_message: z.string().nullable().optional(), + tag_list: z.array(z.string()).nullable().optional(), + task_id: z.string().nullable().optional(), + type: TicketingTicketEntityType$zodSchema.nullable().optional(), + updated_at: z.string().datetime({ offset: true }).nullable().optional(), +}).describe("Ticketing_TicketEntity model"); diff --git a/src/models/updateincidentretrospectivefield.ts b/src/models/updateincidentretrospectivefield.ts new file mode 100644 index 0000000..33802cf --- /dev/null +++ b/src/models/updateincidentretrospectivefield.ts @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type UpdateIncidentRetrospectiveFieldValue2 = Array | number; + +export const UpdateIncidentRetrospectiveFieldValue2$zodSchema: z.ZodType< + UpdateIncidentRetrospectiveFieldValue2, + z.ZodTypeDef, + unknown +> = z.union([ + z.array(z.any()), + z.number().int(), +]); + +export type UpdateIncidentRetrospectiveFieldValue1 = string | number; + +export const UpdateIncidentRetrospectiveFieldValue1$zodSchema: z.ZodType< + UpdateIncidentRetrospectiveFieldValue1, + z.ZodTypeDef, + unknown +> = z.union([ + z.string(), + z.number().int(), +]); + +/** + * The value to set for the field. + */ +export type UpdateIncidentRetrospectiveFieldValue3 = + | number + | string + | number + | Array + | number; + +export const UpdateIncidentRetrospectiveFieldValue3$zodSchema: z.ZodType< + UpdateIncidentRetrospectiveFieldValue3, + z.ZodTypeDef, + unknown +> = z.union([ + z.number().int(), + z.union([ + z.string(), + z.number().int(), + ]), + z.union([ + z.array(z.any()), + z.number().int(), + ]), +]).describe("The value to set for the field."); + +/** + * Update retrospective field value + */ +export type UpdateIncidentRetrospectiveField = { + dynamic_input_field_id?: string | null | undefined; + value: number | string | number | Array | number; +}; + +export const UpdateIncidentRetrospectiveField$zodSchema: z.ZodType< + UpdateIncidentRetrospectiveField, + z.ZodTypeDef, + unknown +> = z.object({ + dynamic_input_field_id: z.string().nullable().optional(), + value: z.union([ + z.number().int(), + z.union([ + z.string(), + z.number().int(), + ]), + z.union([ + z.array(z.any()), + z.number().int(), + ]), + ]), +}).describe("Update retrospective field value"); diff --git a/src/models/updateincidentretrospectivefieldop.ts b/src/models/updateincidentretrospectivefieldop.ts new file mode 100644 index 0000000..5371b79 --- /dev/null +++ b/src/models/updateincidentretrospectivefieldop.ts @@ -0,0 +1,53 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + IncidentsRetrospectiveFieldEntity, + IncidentsRetrospectiveFieldEntity$zodSchema, +} from "./incidentsretrospectivefieldentity.js"; +import { + UpdateIncidentRetrospectiveField, + UpdateIncidentRetrospectiveField$zodSchema, +} from "./updateincidentretrospectivefield.js"; + +export type UpdateIncidentRetrospectiveFieldRequest = { + retrospective_id: string; + field_id: string; + incident_id: string; + update_incident_retrospective_field: UpdateIncidentRetrospectiveField; +}; + +export const UpdateIncidentRetrospectiveFieldRequest$zodSchema: z.ZodType< + UpdateIncidentRetrospectiveFieldRequest, + z.ZodTypeDef, + unknown +> = z.object({ + field_id: z.string(), + incident_id: z.string(), + retrospective_id: z.string(), + update_incident_retrospective_field: + UpdateIncidentRetrospectiveField$zodSchema, +}); + +export type UpdateIncidentRetrospectiveFieldResponse = { + ContentType: string; + StatusCode: number; + RawResponse: Response; + Incidents_RetrospectiveFieldEntity?: + | IncidentsRetrospectiveFieldEntity + | undefined; +}; + +export const UpdateIncidentRetrospectiveFieldResponse$zodSchema: z.ZodType< + UpdateIncidentRetrospectiveFieldResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + Incidents_RetrospectiveFieldEntity: + IncidentsRetrospectiveFieldEntity$zodSchema.optional(), + RawResponse: z.instanceof(Response), + StatusCode: z.number().int(), +}); diff --git a/src/types/async.ts b/src/types/async.ts new file mode 100644 index 0000000..689dba5 --- /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; + } +} diff --git a/src/types/blobs.ts b/src/types/blobs.ts new file mode 100644 index 0000000..c1cc513 --- /dev/null +++ b/src/types/blobs.ts @@ -0,0 +1,23 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export function isBlobLike(val: unknown): val is Blob { + if (val instanceof Blob) { + return true; + } + + if (typeof val !== "object" || val == null || !(Symbol.toStringTag in val)) { + return false; + } + + const name = val[Symbol.toStringTag]; + if (typeof name !== "string") { + return false; + } + if (name !== "Blob" && name !== "File") { + return false; + } + + return "stream" in val && typeof val.stream === "function"; +} diff --git a/src/types/enums.ts b/src/types/enums.ts new file mode 100644 index 0000000..6fb6d91 --- /dev/null +++ b/src/types/enums.ts @@ -0,0 +1,16 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +declare const __brand: unique symbol; +export type Unrecognized = T & { [__brand]: "unrecognized" }; + +export function catchUnrecognizedEnum(value: T): Unrecognized { + return value as Unrecognized; +} + +type Prettify = { [K in keyof T]: T[K] } & {}; +export type ClosedEnum = T[keyof T]; +export type OpenEnum = + | Prettify + | Unrecognized; diff --git a/src/types/fp.ts b/src/types/fp.ts new file mode 100644 index 0000000..ccbe51e --- /dev/null +++ b/src/types/fp.ts @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +/** + * A monad that captures the result of a function call or an error if it was not + * successful. Railway programming, enabled by this type, can be a nicer + * alternative to traditional exception throwing because it allows functions to + * declare all _known_ errors with static types and then check for them + * exhaustively in application code. Thrown exception have a type of `unknown` + * and break out of regular control flow of programs making them harder to + * inspect and more verbose work with due to try-catch blocks. + */ +export type Result = + | { ok: true; value: T; error?: never } + | { ok: false; value?: never; error: E }; + +export function OK(value: V): Result { + return { ok: true, value }; +} + +export function ERR(error: E): Result { + return { ok: false, error }; +} + +/** + * unwrap is a convenience function for extracting a value from a result or + * throwing if there was an error. + */ +export function unwrap(r: Result): T { + if (!r.ok) { + throw r.error; + } + return r.value; +} + +/** + * unwrapAsync is a convenience function for resolving a value from a Promise + * of a result or rejecting if an error occurred. + */ +export async function unwrapAsync( + pr: Promise>, +): Promise { + const r = await pr; + if (!r.ok) { + throw r.error; + } + + return r.value; +} diff --git a/src/types/rfcdate.ts b/src/types/rfcdate.ts new file mode 100644 index 0000000..c79b3f5 --- /dev/null +++ b/src/types/rfcdate.ts @@ -0,0 +1,54 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +const dateRE = /^\d{4}-\d{2}-\d{2}$/; + +export class RFCDate { + private serialized: string; + + /** + * Creates a new RFCDate instance using today's date. + */ + static today(): RFCDate { + return new RFCDate(new Date()); + } + + /** + * Creates a new RFCDate instance using the provided input. + * If a string is used then in must be in the format YYYY-MM-DD. + * + * @param date A Date object or a date string in YYYY-MM-DD format + * @example + * new RFCDate("2022-01-01") + * @example + * new RFCDate(new Date()) + */ + constructor(date: Date | string) { + if (typeof date === "string" && !dateRE.test(date)) { + throw new RangeError( + "RFCDate: date strings must be in the format YYYY-MM-DD: " + date, + ); + } + + const value = new Date(date); + if (isNaN(+value)) { + throw new RangeError("RFCDate: invalid date provided: " + date); + } + + this.serialized = value.toISOString().slice(0, "YYYY-MM-DD".length); + if (!dateRE.test(this.serialized)) { + throw new TypeError( + `RFCDate: failed to build valid date with given value: ${date} serialized to ${this.serialized}`, + ); + } + } + + toJSON(): string { + return this.toString(); + } + + toString(): string { + return this.serialized; + } +} diff --git a/src/types/streams.ts b/src/types/streams.ts new file mode 100644 index 0000000..a0163e7 --- /dev/null +++ b/src/types/streams.ts @@ -0,0 +1,21 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export function isReadableStream( + val: unknown, +): val is ReadableStream { + if (typeof val !== "object" || val === null) { + return false; + } + + // Check for the presence of methods specific to ReadableStream + const stream = val as ReadableStream; + + // ReadableStream has methods like getReader, cancel, and tee + return ( + typeof stream.getReader === "function" && + typeof stream.cancel === "function" && + typeof stream.tee === "function" + ); +} diff --git a/tools/firehydrant-api/firehydrant-api/add-impacted-infrastructure-to-an-incident.js b/tools/firehydrant-api/firehydrant-api/add-impacted-infrastructure-to-an-incident.js deleted file mode 100644 index 1aa878c..0000000 --- a/tools/firehydrant-api/firehydrant-api/add-impacted-infrastructure-to-an-incident.js +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Function to add impacted infrastructure to an incident in FireHydrant. - * - * @param {Object} args - Arguments for adding impacted infrastructure. - * @param {string} args.incidentId - The ID of the incident to which the infrastructure will be added. - * @param {Object} args.environmentData - The data for the environment to be added. - * @returns {Promise} - The result of the API request to add impacted infrastructure. - */ -const executeFunction = async ({ incidentId, environmentData }) => { - const baseUrl = 'https://api.firehydrant.io/v1'; - const token = process.env.FIREHYDRANT_API_API_KEY; - try { - // Construct the URL for the API request - const url = `${baseUrl}/incidents/${incidentId}/impact/environments`; - - // Set up headers for the request - const headers = { - 'Authorization': `Bearer ${token}`, - 'Accept': 'application/json', - 'Content-Type': 'application/json' - }; - - // Perform the fetch request - const response = await fetch(url, { - method: 'POST', - headers, - body: JSON.stringify(environmentData) - }); - - // Check if the response was successful - if (!response.ok) { - const errorData = await response.json(); - throw new Error(errorData); - } - - // Parse and return the response data - const data = await response.json(); - return data; - } catch (error) { - console.error('Error adding impacted infrastructure:', error); - return { error: 'An error occurred while adding impacted infrastructure.' }; - } -}; - -/** - * Tool configuration for adding impacted infrastructure to an incident in FireHydrant. - * @type {Object} - */ -const apiTool = { - function: executeFunction, - definition: { - type: 'function', - function: { - name: 'add_impacted_infrastructure', - description: 'Add impacted infrastructure to an incident in FireHydrant.', - parameters: { - type: 'object', - properties: { - incidentId: { - type: 'string', - description: 'The ID of the incident to which the infrastructure will be added.' - }, - environmentData: { - type: 'object', - description: 'The data for the environment to be added.' - } - }, - required: ['incidentId', 'environmentData'] - } - } - } -}; - -export { apiTool }; \ No newline at end of file diff --git a/tools/firehydrant-api/firehydrant-api/archive-an-incident.js b/tools/firehydrant-api/firehydrant-api/archive-an-incident.js deleted file mode 100644 index 44c68ed..0000000 --- a/tools/firehydrant-api/firehydrant-api/archive-an-incident.js +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Function to archive an incident in FireHydrant. - * - * @param {Object} args - Arguments for the incident archiving. - * @param {string} args.incident_id - The ID of the incident to be archived. - * @returns {Promise} - The result of the incident archiving operation. - */ -const executeFunction = async ({ incident_id }) => { - const baseUrl = 'https://api.firehydrant.io/v1'; - const token = process.env.FIREHYDRANT_API_API_KEY; - try { - // Construct the URL for the incident archiving - const url = `${baseUrl}/incidents/${incident_id}`; - - // Set up headers for the request - const headers = { - 'Authorization': `Bearer ${token}`, - 'Accept': 'application/json' - }; - - // Perform the fetch request - const response = await fetch(url, { - method: 'DELETE', - headers - }); - - // Check if the response was successful - if (!response.ok) { - const errorData = await response.json(); - throw new Error(errorData); - } - - // Return an empty response on successful deletion - return {}; - } catch (error) { - console.error('Error archiving the incident:', error); - return { error: 'An error occurred while archiving the incident.' }; - } -}; - -/** - * Tool configuration for archiving an incident in FireHydrant. - * @type {Object} - */ -const apiTool = { - function: executeFunction, - definition: { - type: 'function', - function: { - name: 'archive_incident', - description: 'Archive an incident in FireHydrant.', - parameters: { - type: 'object', - properties: { - incident_id: { - type: 'string', - description: 'The ID of the incident to be archived.' - } - }, - required: ['incident_id'] - } - } - } -}; - -export { apiTool }; \ No newline at end of file diff --git a/tools/firehydrant-api/firehydrant-api/close-an-incident.js b/tools/firehydrant-api/firehydrant-api/close-an-incident.js deleted file mode 100644 index 7b0591d..0000000 --- a/tools/firehydrant-api/firehydrant-api/close-an-incident.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Function to close an incident in FireHydrant. - * - * @param {Object} args - Arguments for closing the incident. - * @param {string} args.incident_id - The ID of the incident to close. - * @returns {Promise} - The result of the incident closure. - */ -const executeFunction = async ({ incident_id }) => { - const baseUrl = 'https://api.firehydrant.io/v1'; - const token = process.env.FIREHYDRANT_API_API_KEY; - try { - // Construct the URL for closing the incident - const url = `${baseUrl}/incidents/${incident_id}/close`; - - // Set up headers for the request - const headers = { - 'Authorization': `Bearer ${token}`, - 'Accept': 'application/json' - }; - - // Perform the fetch request - const response = await fetch(url, { - method: 'PUT', - headers - }); - - // Check if the response was successful - if (!response.ok) { - const errorData = await response.json(); - throw new Error(errorData); - } - - // Parse and return the response data - const data = await response.json(); - return data; - } catch (error) { - console.error('Error closing the incident:', error); - return { error: 'An error occurred while closing the incident.' }; - } -}; - -/** - * Tool configuration for closing an incident in FireHydrant. - * @type {Object} - */ -const apiTool = { - function: executeFunction, - definition: { - type: 'function', - function: { - name: 'close_incident', - description: 'Close an incident in FireHydrant.', - parameters: { - type: 'object', - properties: { - incident_id: { - type: 'string', - description: 'The ID of the incident to close.' - } - }, - required: ['incident_id'] - } - } - } -}; - -export { apiTool }; \ No newline at end of file diff --git a/tools/firehydrant-api/firehydrant-api/create-a-chat-message-for-an-incident.js b/tools/firehydrant-api/firehydrant-api/create-a-chat-message-for-an-incident.js deleted file mode 100644 index e9d7111..0000000 --- a/tools/firehydrant-api/firehydrant-api/create-a-chat-message-for-an-incident.js +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Function to create a chat message for an incident in FireHydrant. - * - * @param {Object} args - Arguments for creating a chat message. - * @param {string} args.incident_id - The ID of the incident to which the chat message belongs. - * @param {Object} args.message - The message object containing the chat message details. - * @param {string} args.message.text - The text of the chat message. - * @returns {Promise} - The result of the chat message creation. - */ -const executeFunction = async ({ incident_id, message }) => { - const baseUrl = 'https://api.firehydrant.io/v1'; - const token = process.env.FIREHYDRANT_API_API_KEY; - - try { - // Construct the URL for creating a chat message - const url = `${baseUrl}/incidents/${incident_id}/generic_chat_messages`; - - // Set up headers for the request - const headers = { - 'Authorization': `Bearer ${token}`, - 'Accept': 'application/json', - 'Content-Type': 'application/json' - }; - - // Perform the fetch request - const response = await fetch(url, { - method: 'POST', - headers, - body: JSON.stringify(message) - }); - - // Check if the response was successful - if (!response.ok) { - const errorData = await response.json(); - throw new Error(errorData); - } - - // Parse and return the response data - const data = await response.json(); - return data; - } catch (error) { - console.error('Error creating chat message:', error); - return { error: 'An error occurred while creating the chat message.' }; - } -}; - -/** - * Tool configuration for creating a chat message for an incident in FireHydrant. - * @type {Object} - */ -const apiTool = { - function: executeFunction, - definition: { - type: 'function', - function: { - name: 'create_chat_message', - description: 'Create a chat message for an incident in FireHydrant.', - parameters: { - type: 'object', - properties: { - incident_id: { - type: 'string', - description: 'The ID of the incident to which the chat message belongs.' - }, - message: { - type: 'object', - properties: { - text: { - type: 'string', - description: 'The text of the chat message.' - } - }, - required: ['text'] - } - }, - required: ['incident_id', 'message'] - } - } - } -}; - -export { apiTool }; \ No newline at end of file diff --git a/tools/firehydrant-api/firehydrant-api/create-an-attachment-for-an-incident.js b/tools/firehydrant-api/firehydrant-api/create-an-attachment-for-an-incident.js deleted file mode 100644 index 3acdcae..0000000 --- a/tools/firehydrant-api/firehydrant-api/create-an-attachment-for-an-incident.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Function to create an attachment for an incident in FireHydrant. - * - * @param {Object} args - Arguments for creating the attachment. - * @param {string} args.incidentId - The ID of the incident to which the attachment will be added. - * @param {File} args.file - The file to be attached to the incident. - * @returns {Promise} - The result of the attachment creation. - */ -const executeFunction = async ({ incidentId, file }) => { - const baseUrl = 'https://api.firehydrant.io/v1'; - const token = process.env.FIREHYDRANT_API_API_KEY; - - try { - const url = `${baseUrl}/incidents/${incidentId}/attachments`; - - // Create a FormData object to hold the file - const formData = new FormData(); - formData.append('file', file); - - // Set up headers for the request - const headers = { - 'Authorization': `Bearer ${token}`, - 'Accept': 'application/json', - 'Content-Type': 'multipart/form-data' - }; - - // Perform the fetch request - const response = await fetch(url, { - method: 'POST', - headers, - body: formData - }); - - // Check if the response was successful - if (!response.ok) { - const errorData = await response.json(); - throw new Error(errorData); - } - - // Parse and return the response data - const data = await response.json(); - return data; - } catch (error) { - console.error('Error creating attachment for incident:', error); - return { error: 'An error occurred while creating the attachment.' }; - } -}; - -/** - * Tool configuration for creating an attachment for an incident in FireHydrant. - * @type {Object} - */ -const apiTool = { - function: executeFunction, - definition: { - type: 'function', - function: { - name: 'create_attachment', - description: 'Create an attachment for an incident in FireHydrant.', - parameters: { - type: 'object', - properties: { - incidentId: { - type: 'string', - description: 'The ID of the incident to which the attachment will be added.' - }, - file: { - type: 'object', - description: 'The file to be attached to the incident.' - } - }, - required: ['incidentId', 'file'] - } - } - } -}; - -export { apiTool }; \ No newline at end of file diff --git a/tools/firehydrant-api/firehydrant-api/create-an-incident.js b/tools/firehydrant-api/firehydrant-api/create-an-incident.js deleted file mode 100644 index 2b4f757..0000000 --- a/tools/firehydrant-api/firehydrant-api/create-an-incident.js +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Function to create an incident in FireHydrant. - * - * @param {Object} args - Arguments for the incident creation. - * @param {string} args.name - The name of the incident. - * @param {string} args.description - A description of the incident. - * @param {string} args.environment_id - The ID of the environment where the incident occurred. - * @returns {Promise} - The result of the incident creation. - */ -const executeFunction = async ({ name, description, environment_id }) => { - const baseUrl = 'https://api.firehydrant.io/v1/incidents'; - const token = process.env.FIREHYDRANT_API_API_KEY; - - try { - // Construct the request body - const body = JSON.stringify({ - name, - description, - environment_id - }); - - // Set up headers for the request - const headers = { - 'Authorization': `Bearer ${token}`, - 'Accept': 'application/json', - 'Content-Type': 'application/json' - }; - - // Perform the fetch request - const response = await fetch(baseUrl, { - method: 'POST', - headers, - body - }); - - // Check if the response was successful - if (!response.ok) { - const errorData = await response.json(); - throw new Error(errorData); - } - - // Parse and return the response data - const data = await response.json(); - return data; - } catch (error) { - console.error('Error creating incident:', error); - return { error: 'An error occurred while creating the incident.' }; - } -}; - -/** - * Tool configuration for creating an incident in FireHydrant. - * @type {Object} - */ -const apiTool = { - function: executeFunction, - definition: { - type: 'function', - function: { - name: 'create_incident', - description: 'Create an incident in FireHydrant.', - parameters: { - type: 'object', - properties: { - name: { - type: 'string', - description: 'The name of the incident.' - }, - description: { - type: 'string', - description: 'A description of the incident.' - }, - environment_id: { - type: 'string', - description: 'The ID of the environment where the incident occurred.' - } - }, - required: ['name', 'environment_id'] - } - } - } -}; - -export { apiTool }; \ No newline at end of file diff --git a/tools/firehydrant-api/firehydrant-api/delete-a-chat-message-from-an-incident.js b/tools/firehydrant-api/firehydrant-api/delete-a-chat-message-from-an-incident.js deleted file mode 100644 index a90011f..0000000 --- a/tools/firehydrant-api/firehydrant-api/delete-a-chat-message-from-an-incident.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Function to delete a chat message from an incident in FireHydrant. - * - * @param {Object} args - Arguments for the deletion. - * @param {string} args.incident_id - The ID of the incident from which to delete the chat message. - * @param {string} args.message_id - The ID of the chat message to delete. - * @returns {Promise} - The result of the deletion operation. - */ -const executeFunction = async ({ incident_id, message_id }) => { - const baseUrl = 'https://api.firehydrant.io/v1'; - const token = process.env.FIREHYDRANT_API_API_KEY; - try { - // Construct the URL for the deletion request - const url = `${baseUrl}/incidents/${incident_id}/generic_chat_messages/${message_id}`; - - // Set up headers for the request - const headers = { - 'Authorization': `Bearer ${token}`, - 'Accept': 'application/json' - }; - - // Perform the fetch request - const response = await fetch(url, { - method: 'DELETE', - headers - }); - - // Check if the response was successful - if (!response.ok) { - const errorData = await response.json(); - throw new Error(errorData); - } - - // Return a success message or the response data - return { message: 'Chat message deleted successfully.' }; - } catch (error) { - console.error('Error deleting chat message:', error); - return { error: 'An error occurred while deleting the chat message.' }; - } -}; - -/** - * Tool configuration for deleting a chat message from an incident in FireHydrant. - * @type {Object} - */ -const apiTool = { - function: executeFunction, - definition: { - type: 'function', - function: { - name: 'delete_chat_message', - description: 'Delete a chat message from an incident in FireHydrant.', - parameters: { - type: 'object', - properties: { - incident_id: { - type: 'string', - description: 'The ID of the incident from which to delete the chat message.' - }, - message_id: { - type: 'string', - description: 'The ID of the chat message to delete.' - } - }, - required: ['incident_id', 'message_id'] - } - } - } -}; - -export { apiTool }; \ No newline at end of file diff --git a/tools/firehydrant-api/firehydrant-api/delete-an-alert-from-an-incident.js b/tools/firehydrant-api/firehydrant-api/delete-an-alert-from-an-incident.js deleted file mode 100644 index 7a41b99..0000000 --- a/tools/firehydrant-api/firehydrant-api/delete-an-alert-from-an-incident.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Function to delete an alert from an incident in FireHydrant. - * - * @param {Object} args - Arguments for the deletion. - * @param {string} args.incident_id - The ID of the incident from which to delete the alert. - * @param {string} args.incident_alert_id - The ID of the alert to delete. - * @returns {Promise} - The result of the deletion operation. - */ -const executeFunction = async ({ incident_id, incident_alert_id }) => { - const baseUrl = 'https://api.firehydrant.io/v1'; - const token = process.env.FIREHYDRANT_API_API_KEY; - try { - // Construct the URL for the deletion request - const url = `${baseUrl}/incidents/${incident_id}/alerts/${incident_alert_id}`; - - // Set up headers for the request - const headers = { - 'Authorization': `Bearer ${token}`, - 'Accept': 'application/json' - }; - - // Perform the fetch request - const response = await fetch(url, { - method: 'DELETE', - headers - }); - - // Check if the response was successful - if (!response.ok) { - const errorData = await response.json(); - throw new Error(errorData); - } - - // Return a success message or response - return { message: 'Alert deleted successfully.' }; - } catch (error) { - console.error('Error deleting alert from incident:', error); - return { error: 'An error occurred while deleting the alert.' }; - } -}; - -/** - * Tool configuration for deleting an alert from an incident in FireHydrant. - * @type {Object} - */ -const apiTool = { - function: executeFunction, - definition: { - type: 'function', - function: { - name: 'delete_alert_from_incident', - description: 'Delete an alert from an incident in FireHydrant.', - parameters: { - type: 'object', - properties: { - incident_id: { - type: 'string', - description: 'The ID of the incident from which to delete the alert.' - }, - incident_alert_id: { - type: 'string', - description: 'The ID of the alert to delete.' - } - }, - required: ['incident_id', 'incident_alert_id'] - } - } - } -}; - -export { apiTool }; \ No newline at end of file diff --git a/tools/firehydrant-api/firehydrant-api/get-an-incident-event.js b/tools/firehydrant-api/firehydrant-api/get-an-incident-event.js deleted file mode 100644 index 8d79c80..0000000 --- a/tools/firehydrant-api/firehydrant-api/get-an-incident-event.js +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Function to get an incident event from the Firehydrant API. - * - * @param {Object} args - Arguments for the request. - * @param {string} args.incident_id - The ID of the incident. - * @param {string} args.event_id - The ID of the event. - * @returns {Promise} - The result of the incident event retrieval. - */ -const executeFunction = async ({ incident_id, event_id }) => { - const baseUrl = 'https://api.firehydrant.io/v1'; - const token = process.env.FIREHYDRANT_API_API_KEY; - - try { - // Construct the URL for the incident event - const url = `${baseUrl}/incidents/${incident_id}/events/${event_id}`; - - // Set up headers for the request - const headers = { - 'Accept': 'application/json', - 'Authorization': `Bearer ${token}` - }; - - // Perform the fetch request - const response = await fetch(url, { - method: 'GET', - headers - }); - - // Check if the response was successful - if (!response.ok) { - const errorData = await response.json(); - throw new Error(errorData); - } - - // Parse and return the response data - const data = await response.json(); - return data; - } catch (error) { - console.error('Error retrieving incident event:', error); - return { error: 'An error occurred while retrieving the incident event.' }; - } -}; - -/** - * Tool configuration for getting an incident event from the Firehydrant API. - * @type {Object} - */ -const apiTool = { - function: executeFunction, - definition: { - type: 'function', - function: { - name: 'get_incident_event', - description: 'Get an incident event from the Firehydrant API.', - parameters: { - type: 'object', - properties: { - incident_id: { - type: 'string', - description: 'The ID of the incident.' - }, - event_id: { - type: 'string', - description: 'The ID of the event.' - } - }, - required: ['incident_id', 'event_id'] - } - } - } -}; - -export { apiTool }; \ No newline at end of file diff --git a/tools/firehydrant-api/firehydrant-api/get-an-incident.js b/tools/firehydrant-api/firehydrant-api/get-an-incident.js deleted file mode 100644 index c9013e0..0000000 --- a/tools/firehydrant-api/firehydrant-api/get-an-incident.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Function to get an incident from the Firehydrant API. - * - * @param {Object} args - Arguments for the incident retrieval. - * @param {string} args.incident_id - The ID of the incident to retrieve. - * @returns {Promise} - The result of the incident retrieval. - */ -const executeFunction = async ({ incident_id }) => { - const baseUrl = 'https://api.firehydrant.io/v1'; - const token = process.env.FIREHYDRANT_API_API_KEY; - try { - // Construct the URL for the incident - const url = `${baseUrl}/incidents/${incident_id}`; - - // Set up headers for the request - const headers = { - 'Accept': 'application/json', - 'Authorization': `Bearer ${token}` - }; - - // Perform the fetch request - const response = await fetch(url, { - method: 'GET', - headers - }); - - // Check if the response was successful - if (!response.ok) { - const errorData = await response.json(); - throw new Error(errorData); - } - - // Parse and return the response data - const data = await response.json(); - return data; - } catch (error) { - console.error('Error retrieving incident:', error); - return { error: 'An error occurred while retrieving the incident.' }; - } -}; - -/** - * Tool configuration for retrieving an incident from the Firehydrant API. - * @type {Object} - */ -const apiTool = { - function: executeFunction, - definition: { - type: 'function', - function: { - name: 'get_incident', - description: 'Retrieve an incident from the Firehydrant API.', - parameters: { - type: 'object', - properties: { - incident_id: { - type: 'string', - description: 'The ID of the incident to retrieve.' - } - }, - required: ['incident_id'] - } - } - } -}; - -export { apiTool }; \ No newline at end of file diff --git a/tools/firehydrant-api/firehydrant-api/get-chat-channel-information-for-an-incident.js b/tools/firehydrant-api/firehydrant-api/get-chat-channel-information-for-an-incident.js deleted file mode 100644 index 1cf8506..0000000 --- a/tools/firehydrant-api/firehydrant-api/get-chat-channel-information-for-an-incident.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Function to get chat channel information for a specific incident from the Firehydrant API. - * - * @param {Object} args - Arguments for the request. - * @param {string} args.incident_id - The ID of the incident for which to retrieve chat channel information. - * @returns {Promise} - The chat channel information for the specified incident. - */ -const executeFunction = async ({ incident_id }) => { - const baseUrl = 'https://api.firehydrant.io/v1'; - const token = process.env.FIREHYDRANT_API_API_KEY; - try { - // Construct the URL for the request - const url = `${baseUrl}/incidents/${incident_id}/channel`; - - // Set up headers for the request - const headers = { - 'Accept': 'application/json', - 'Authorization': `Bearer ${token}` - }; - - // Perform the fetch request - const response = await fetch(url, { - method: 'GET', - headers - }); - - // Check if the response was successful - if (!response.ok) { - const errorData = await response.json(); - throw new Error(errorData); - } - - // Parse and return the response data - const data = await response.json(); - return data; - } catch (error) { - console.error('Error getting chat channel information:', error); - return { error: 'An error occurred while retrieving chat channel information.' }; - } -}; - -/** - * Tool configuration for getting chat channel information for an incident from the Firehydrant API. - * @type {Object} - */ -const apiTool = { - function: executeFunction, - definition: { - type: 'function', - function: { - name: 'get_chat_channel_info', - description: 'Get chat channel information for a specific incident.', - parameters: { - type: 'object', - properties: { - incident_id: { - type: 'string', - description: 'The ID of the incident for which to retrieve chat channel information.' - } - }, - required: ['incident_id'] - } - } - } -}; - -export { apiTool }; \ No newline at end of file diff --git a/tools/firehydrant-api/firehydrant-api/get-vote-counts-for-an-incident-event.js b/tools/firehydrant-api/firehydrant-api/get-vote-counts-for-an-incident-event.js deleted file mode 100644 index 0b4c7c1..0000000 --- a/tools/firehydrant-api/firehydrant-api/get-vote-counts-for-an-incident-event.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Function to get vote counts for an incident event from the Firehydrant API. - * - * @param {Object} args - Arguments for the request. - * @param {string} args.incident_id - The ID of the incident. - * @param {string} args.event_id - The ID of the event. - * @returns {Promise} - The response from the Firehydrant API containing vote counts. - */ -const executeFunction = async ({ incident_id, event_id }) => { - const baseUrl = 'https://api.firehydrant.io/v1'; - const token = process.env.FIREHYDRANT_API_API_KEY; - try { - // Construct the URL for the request - const url = `${baseUrl}/incidents/${incident_id}/events/${event_id}/votes/status`; - - // Set up headers for the request - const headers = { - 'Authorization': `Bearer ${token}`, - 'Accept': 'application/json' - }; - - // Perform the fetch request - const response = await fetch(url, { - method: 'GET', - headers - }); - - // Check if the response was successful - if (!response.ok) { - const errorData = await response.json(); - throw new Error(errorData); - } - - // Parse and return the response data - const data = await response.json(); - return data; - } catch (error) { - console.error('Error getting vote counts for incident event:', error); - return { error: 'An error occurred while getting vote counts for the incident event.' }; - } -}; - -/** - * Tool configuration for getting vote counts for an incident event from the Firehydrant API. - * @type {Object} - */ -const apiTool = { - function: executeFunction, - definition: { - type: 'function', - function: { - name: 'get_vote_counts', - description: 'Get vote counts for an incident event from the Firehydrant API.', - parameters: { - type: 'object', - properties: { - incident_id: { - type: 'string', - description: 'The ID of the incident.' - }, - event_id: { - type: 'string', - description: 'The ID of the event.' - } - }, - required: ['incident_id', 'event_id'] - } - } - } -}; - -export { apiTool }; \ No newline at end of file diff --git a/tools/firehydrant-api/firehydrant-api/get-vote-status-for-an-ai-generated-incident-summary.js b/tools/firehydrant-api/firehydrant-api/get-vote-status-for-an-ai-generated-incident-summary.js deleted file mode 100644 index e7d5f4e..0000000 --- a/tools/firehydrant-api/firehydrant-api/get-vote-status-for-an-ai-generated-incident-summary.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Function to get the vote status for an AI-generated incident summary. - * - * @param {Object} args - Arguments for the request. - * @param {string} args.incident_id - The ID of the incident. - * @param {string} args.generated_summary_id - The ID of the generated summary. - * @returns {Promise} - The vote status response. - */ -const executeFunction = async ({ incident_id, generated_summary_id }) => { - const baseUrl = 'https://api.firehydrant.io/v1'; - const token = process.env.FIREHYDRANT_API_API_KEY; - try { - // Construct the URL for the request - const url = `${baseUrl}/ai/summarize_incident/${incident_id}/${generated_summary_id}/voted`; - - // Set up headers for the request - const headers = { - 'Accept': 'application/json', - 'Authorization': `Bearer ${token}` - }; - - // Perform the fetch request - const response = await fetch(url, { - method: 'GET', - headers - }); - - // Check if the response was successful - if (!response.ok) { - const errorData = await response.json(); - throw new Error(errorData); - } - - // Parse and return the response data - const data = await response.json(); - return data; - } catch (error) { - console.error('Error getting vote status:', error); - return { error: 'An error occurred while getting the vote status.' }; - } -}; - -/** - * Tool configuration for getting the vote status of an AI-generated incident summary. - * @type {Object} - */ -const apiTool = { - function: executeFunction, - definition: { - type: 'function', - function: { - name: 'get_vote_status', - description: 'Get the vote status for an AI-generated incident summary.', - parameters: { - type: 'object', - properties: { - incident_id: { - type: 'string', - description: 'The ID of the incident.' - }, - generated_summary_id: { - type: 'string', - description: 'The ID of the generated summary.' - } - }, - required: ['incident_id', 'generated_summary_id'] - } - } - } -}; - -export { apiTool }; \ No newline at end of file diff --git a/tools/firehydrant-api/firehydrant-api/list-attachments-for-an-incident.js b/tools/firehydrant-api/firehydrant-api/list-attachments-for-an-incident.js deleted file mode 100644 index efd35de..0000000 --- a/tools/firehydrant-api/firehydrant-api/list-attachments-for-an-incident.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Function to list attachments for a specific incident in Firehydrant. - * - * @param {Object} args - Arguments for the request. - * @param {string} args.incident_id - The ID of the incident for which to list attachments. - * @returns {Promise} - The list of attachments for the specified incident. - */ -const executeFunction = async ({ incident_id }) => { - const baseUrl = 'https://api.firehydrant.io/v1'; - const token = process.env.FIREHYDRANT_API_API_KEY; - try { - // Construct the URL for the request - const url = `${baseUrl}/incidents/${incident_id}/attachments`; - - // Set up headers for the request - const headers = { - 'Accept': 'application/json', - 'Authorization': `Bearer ${token}` - }; - - // Perform the fetch request - const response = await fetch(url, { - method: 'GET', - headers - }); - - // Check if the response was successful - if (!response.ok) { - const errorData = await response.json(); - throw new Error(errorData); - } - - // Parse and return the response data - const data = await response.json(); - return data; - } catch (error) { - console.error('Error listing attachments for incident:', error); - return { error: 'An error occurred while listing attachments for the incident.' }; - } -}; - -/** - * Tool configuration for listing attachments for an incident in Firehydrant. - * @type {Object} - */ -const apiTool = { - function: executeFunction, - definition: { - type: 'function', - function: { - name: 'list_attachments_for_incident', - description: 'List attachments for a specific incident in Firehydrant.', - parameters: { - type: 'object', - properties: { - incident_id: { - type: 'string', - description: 'The ID of the incident for which to list attachments.' - } - }, - required: ['incident_id'] - } - } - } -}; - -export { apiTool }; \ No newline at end of file diff --git a/tools/firehydrant-api/firehydrant-api/list-events-for-an-incident.js b/tools/firehydrant-api/firehydrant-api/list-events-for-an-incident.js deleted file mode 100644 index ec2e720..0000000 --- a/tools/firehydrant-api/firehydrant-api/list-events-for-an-incident.js +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Function to list events for a specific incident in FireHydrant. - * - * @param {Object} args - Arguments for the request. - * @param {string} args.incident_id - The ID of the incident for which to list events. - * @returns {Promise} - The list of events for the specified incident. - */ -const executeFunction = async ({ incident_id }) => { - const baseUrl = 'https://api.firehydrant.io/v1'; - const token = process.env.FIREHYDRANT_API_API_KEY; - - try { - // Construct the URL for the request - const url = `${baseUrl}/incidents/${incident_id}/events`; - - // Set up headers for the request - const headers = { - 'Authorization': `Bearer ${token}`, - 'Accept': 'application/json' - }; - - // Perform the fetch request - const response = await fetch(url, { - method: 'GET', - headers - }); - - // Check if the response was successful - if (!response.ok) { - const errorData = await response.json(); - throw new Error(errorData); - } - - // Parse and return the response data - const data = await response.json(); - return data; - } catch (error) { - console.error('Error listing events for incident:', error); - return { error: 'An error occurred while listing events for the incident.' }; - } -}; - -/** - * Tool configuration for listing events for an incident in FireHydrant. - * @type {Object} - */ -const apiTool = { - function: executeFunction, - definition: { - type: 'function', - function: { - name: 'list_incident_events', - description: 'List events for a specific incident in FireHydrant.', - parameters: { - type: 'object', - properties: { - incident_id: { - type: 'string', - description: 'The ID of the incident for which to list events.' - } - }, - required: ['incident_id'] - } - } - } -}; - -export { apiTool }; \ No newline at end of file diff --git a/tools/firehydrant-api/firehydrant-api/list-impacted-infrastructure-for-an-incident.js b/tools/firehydrant-api/firehydrant-api/list-impacted-infrastructure-for-an-incident.js deleted file mode 100644 index ad02544..0000000 --- a/tools/firehydrant-api/firehydrant-api/list-impacted-infrastructure-for-an-incident.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Function to list impacted infrastructure for a specific incident in Firehydrant. - * - * @param {Object} args - Arguments for the request. - * @param {string} args.incident_id - The ID of the incident for which to list impacted infrastructure. - * @returns {Promise} - The result of the impacted infrastructure request. - */ -const executeFunction = async ({ incident_id }) => { - const baseUrl = 'https://api.firehydrant.io/v1'; - const token = process.env.FIREHYDRANT_API_API_KEY; - try { - // Construct the URL for the request - const url = `${baseUrl}/incidents/${incident_id}/impact/environments`; - - // Set up headers for the request - const headers = { - 'Authorization': `Bearer ${token}`, - 'Accept': 'application/json' - }; - - // Perform the fetch request - const response = await fetch(url, { - method: 'GET', - headers - }); - - // Check if the response was successful - if (!response.ok) { - const errorData = await response.json(); - throw new Error(errorData); - } - - // Parse and return the response data - const data = await response.json(); - return data; - } catch (error) { - console.error('Error listing impacted infrastructure:', error); - return { error: 'An error occurred while listing impacted infrastructure.' }; - } -}; - -/** - * Tool configuration for listing impacted infrastructure for an incident in Firehydrant. - * @type {Object} - */ -const apiTool = { - function: executeFunction, - definition: { - type: 'function', - function: { - name: 'list_impacted_infrastructure', - description: 'List impacted infrastructure for a specific incident in Firehydrant.', - parameters: { - type: 'object', - properties: { - incident_id: { - type: 'string', - description: 'The ID of the incident for which to list impacted infrastructure.' - } - }, - required: ['incident_id'] - } - } - } -}; - -export { apiTool }; \ No newline at end of file diff --git a/tools/firehydrant-api/firehydrant-api/list-incidents.js b/tools/firehydrant-api/firehydrant-api/list-incidents.js deleted file mode 100644 index 93bdada..0000000 --- a/tools/firehydrant-api/firehydrant-api/list-incidents.js +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Function to list incidents from the Firehydrant API. - * - * @returns {Promise} - The list of incidents. - */ -const executeFunction = async () => { - const baseUrl = 'https://api.firehydrant.io/v1'; - const token = process.env.FIREHYDRANT_API_API_KEY; - try { - // Set up the URL for the request - const url = `${baseUrl}/incidents`; - - // Set up headers for the request - const headers = { - 'Accept': 'application/json' - }; - - // If a token is provided, add it to the Authorization header - if (token) { - headers['Authorization'] = `Bearer ${token}`; - } - - // Perform the fetch request - const response = await fetch(url, { - method: 'GET', - headers - }); - - // Check if the response was successful - if (!response.ok) { - const errorData = await response.json(); - throw new Error(errorData); - } - - // Parse and return the response data - const data = await response.json(); - return data; - } catch (error) { - console.error('Error listing incidents:', error); - return { error: 'An error occurred while listing incidents.' }; - } -}; - -/** - * Tool configuration for listing incidents from the Firehydrant API. - * @type {Object} - */ -const apiTool = { - function: executeFunction, - definition: { - type: 'function', - function: { - name: 'list_incidents', - description: 'List incidents from the Firehydrant API.', - parameters: { - type: 'object', - properties: {}, - required: [] - } - } - } -}; - -export { apiTool }; \ No newline at end of file diff --git a/tools/firehydrant-api/firehydrant-api/list-links-for-an-incident.js b/tools/firehydrant-api/firehydrant-api/list-links-for-an-incident.js deleted file mode 100644 index 868cc46..0000000 --- a/tools/firehydrant-api/firehydrant-api/list-links-for-an-incident.js +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Function to list links for a specific incident in FireHydrant. - * - * @param {Object} args - Arguments for the request. - * @param {string} args.incident_id - The ID of the incident for which to list links. - * @returns {Promise} - The result of the links retrieval for the incident. - */ -const executeFunction = async ({ incident_id }) => { - const baseUrl = 'https://api.firehydrant.io/v1'; - const token = process.env.FIREHYDRANT_API_API_KEY; - - try { - // Construct the URL for the incident links - const url = `${baseUrl}/incidents/${incident_id}/links`; - - // Set up headers for the request - const headers = { - 'Accept': 'application/json', - 'Authorization': `Bearer ${token}` - }; - - // Perform the fetch request - const response = await fetch(url, { - method: 'GET', - headers - }); - - // Check if the response was successful - if (!response.ok) { - const errorData = await response.json(); - throw new Error(errorData); - } - - // Parse and return the response data - const data = await response.json(); - return data; - } catch (error) { - console.error('Error listing links for incident:', error); - return { error: 'An error occurred while listing links for the incident.' }; - } -}; - -/** - * Tool configuration for listing links for an incident in FireHydrant. - * @type {Object} - */ -const apiTool = { - function: executeFunction, - definition: { - type: 'function', - function: { - name: 'list_incident_links', - description: 'List links for a specific incident in FireHydrant.', - parameters: { - type: 'object', - properties: { - incident_id: { - type: 'string', - description: 'The ID of the incident for which to list links.' - } - }, - required: ['incident_id'] - } - } - } -}; - -export { apiTool }; \ No newline at end of file diff --git a/tools/firehydrant-api/firehydrant-api/remove-impacted-infrastructure-from-an-incident.js b/tools/firehydrant-api/firehydrant-api/remove-impacted-infrastructure-from-an-incident.js deleted file mode 100644 index 5d01de3..0000000 --- a/tools/firehydrant-api/firehydrant-api/remove-impacted-infrastructure-from-an-incident.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Function to remove impacted infrastructure from an incident in FireHydrant. - * - * @param {Object} args - Arguments for the removal. - * @param {string} args.incidentId - The ID of the incident from which to remove the impacted infrastructure. - * @param {string} args.environmentId - The ID of the impacted environment to be removed. - * @returns {Promise} - The result of the removal operation. - */ -const executeFunction = async ({ incidentId, environmentId }) => { - const baseUrl = 'https://api.firehydrant.io/v1'; - const token = process.env.FIREHYDRANT_API_API_KEY; - try { - // Construct the URL for the DELETE request - const url = `${baseUrl}/incidents/${incidentId}/impact/environments/${environmentId}`; - - // Set up headers for the request - const headers = { - 'Authorization': `Bearer ${token}`, - 'Accept': 'application/json' - }; - - // Perform the fetch request - const response = await fetch(url, { - method: 'DELETE', - headers - }); - - // Check if the response was successful - if (!response.ok) { - const errorData = await response.json(); - throw new Error(errorData); - } - - // Parse and return the response data - return await response.json(); - } catch (error) { - console.error('Error removing impacted infrastructure:', error); - return { error: 'An error occurred while removing impacted infrastructure.' }; - } -}; - -/** - * Tool configuration for removing impacted infrastructure from an incident in FireHydrant. - * @type {Object} - */ -const apiTool = { - function: executeFunction, - definition: { - type: 'function', - function: { - name: 'remove_impacted_infrastructure', - description: 'Remove impacted infrastructure from an incident in FireHydrant.', - parameters: { - type: 'object', - properties: { - incidentId: { - type: 'string', - description: 'The ID of the incident from which to remove the impacted infrastructure.' - }, - environmentId: { - type: 'string', - description: 'The ID of the impacted environment to be removed.' - } - }, - required: ['incidentId', 'environmentId'] - } - } - } -}; - -export { apiTool }; \ No newline at end of file diff --git a/tools/firehydrant-api/firehydrant-api/replace-all-impacts-for-an-incident.js b/tools/firehydrant-api/firehydrant-api/replace-all-impacts-for-an-incident.js deleted file mode 100644 index 3af56e9..0000000 --- a/tools/firehydrant-api/firehydrant-api/replace-all-impacts-for-an-incident.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Function to replace all impacts for an incident in FireHydrant. - * - * @param {Object} args - Arguments for the request. - * @param {string} args.incident_id - The ID of the incident for which to replace impacts. - * @param {Array} args.impacts - An array of impacts to set for the incident. - * @returns {Promise} - The result of the API request. - */ -const executeFunction = async ({ incident_id, impacts }) => { - const baseUrl = 'https://api.firehydrant.io/v1'; - const token = process.env.FIREHYDRANT_API_API_KEY; - - try { - // Construct the URL for the request - const url = `${baseUrl}/incidents/${incident_id}/impact`; - - // Set up headers for the request - const headers = { - 'Accept': 'application/json', - 'Content-Type': 'application/json', - }; - - // If a token is provided, add it to the Authorization header - if (token) { - headers['Authorization'] = `Bearer ${token}`; - } - - // Perform the fetch request - const response = await fetch(url, { - method: 'PUT', - headers, - body: JSON.stringify({ impacts }), - }); - - // Check if the response was successful - if (!response.ok) { - const errorData = await response.json(); - throw new Error(errorData); - } - - // Parse and return the response data - const data = await response.json(); - return data; - } catch (error) { - console.error('Error replacing impacts for incident:', error); - return { error: 'An error occurred while replacing impacts for the incident.' }; - } -}; - -/** - * Tool configuration for replacing impacts for an incident in FireHydrant. - * @type {Object} - */ -const apiTool = { - function: executeFunction, - definition: { - type: 'function', - function: { - name: 'replace_incident_impacts', - description: 'Replace all impacts for an incident in FireHydrant.', - parameters: { - type: 'object', - properties: { - incident_id: { - type: 'string', - description: 'The ID of the incident for which to replace impacts.' - }, - impacts: { - type: 'array', - description: 'An array of impacts to set for the incident.' - } - }, - required: ['incident_id', 'impacts'] - } - } - } -}; - -export { apiTool }; \ No newline at end of file diff --git a/tools/firehydrant-api/firehydrant-api/set-an-alert-as-primary-for-an-incident.js b/tools/firehydrant-api/firehydrant-api/set-an-alert-as-primary-for-an-incident.js deleted file mode 100644 index 0594dc4..0000000 --- a/tools/firehydrant-api/firehydrant-api/set-an-alert-as-primary-for-an-incident.js +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Function to set an alert as primary for an incident in FireHydrant. - * - * @param {Object} args - Arguments for setting the alert as primary. - * @param {string} args.incidentId - The ID of the incident. - * @param {string} args.alertId - The ID of the alert to set as primary. - * @param {boolean} [args.primary=true] - Whether to set the alert as primary. - * @returns {Promise} - The result of the operation. - */ -const executeFunction = async ({ incidentId, alertId, primary = true }) => { - const baseUrl = 'https://api.firehydrant.io/v1'; - const token = process.env.FIREHYDRANT_API_API_KEY; - try { - // Construct the URL for the PATCH request - const url = `${baseUrl}/incidents/${incidentId}/alerts/${alertId}/primary`; - - // Set up headers for the request - const headers = { - 'Accept': 'application/json', - 'Content-Type': 'application/json', - 'Authorization': `Bearer ${token}` - }; - - // Prepare the body of the request - const body = JSON.stringify({ primary }); - - // Perform the fetch request - const response = await fetch(url, { - method: 'PATCH', - headers, - body - }); - - // Check if the response was successful - if (!response.ok) { - const errorData = await response.json(); - throw new Error(errorData); - } - - // Parse and return the response data - const data = await response.json(); - return data; - } catch (error) { - console.error('Error setting alert as primary:', error); - return { error: 'An error occurred while setting the alert as primary.' }; - } -}; - -/** - * Tool configuration for setting an alert as primary for an incident in FireHydrant. - * @type {Object} - */ -const apiTool = { - function: executeFunction, - definition: { - type: 'function', - function: { - name: 'set_alert_as_primary', - description: 'Set an alert as primary for an incident in FireHydrant.', - parameters: { - type: 'object', - properties: { - incidentId: { - type: 'string', - description: 'The ID of the incident.' - }, - alertId: { - type: 'string', - description: 'The ID of the alert to set as primary.' - }, - primary: { - type: 'boolean', - description: 'Whether to set the alert as primary.' - } - }, - required: ['incidentId', 'alertId'] - } - } - } -}; - -export { apiTool }; \ No newline at end of file diff --git a/tools/firehydrant-api/firehydrant-api/update-a-chat-message-in-an-incident.js b/tools/firehydrant-api/firehydrant-api/update-a-chat-message-in-an-incident.js deleted file mode 100644 index 26f78de..0000000 --- a/tools/firehydrant-api/firehydrant-api/update-a-chat-message-in-an-incident.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Function to update a chat message in an incident on Firehydrant. - * - * @param {Object} args - Arguments for the update. - * @param {string} args.incident_id - The ID of the incident. - * @param {string} args.message_id - The ID of the chat message to update. - * @param {Object} args.body - The body of the request containing the updated message data. - * @returns {Promise} - The result of the update operation. - */ -const executeFunction = async ({ incident_id, message_id, body }) => { - const baseUrl = 'https://api.firehydrant.io/v1'; - const token = process.env.FIREHYDRANT_API_API_KEY; - try { - // Construct the URL for the PATCH request - const url = `${baseUrl}/incidents/${incident_id}/generic_chat_messages/${message_id}`; - - // Set up headers for the request - const headers = { - 'Authorization': `Bearer ${token}`, - 'Accept': 'application/json', - 'Content-Type': 'application/json' - }; - - // Perform the fetch request - const response = await fetch(url, { - method: 'PATCH', - headers, - body: JSON.stringify(body) - }); - - // Check if the response was successful - if (!response.ok) { - const errorData = await response.json(); - throw new Error(errorData); - } - - // Parse and return the response data - const data = await response.json(); - return data; - } catch (error) { - console.error('Error updating chat message:', error); - return { error: 'An error occurred while updating the chat message.' }; - } -}; - -/** - * Tool configuration for updating a chat message in an incident on Firehydrant. - * @type {Object} - */ -const apiTool = { - function: executeFunction, - definition: { - type: 'function', - function: { - name: 'update_chat_message', - description: 'Update a chat message in an incident on Firehydrant.', - parameters: { - type: 'object', - properties: { - incident_id: { - type: 'string', - description: 'The ID of the incident.' - }, - message_id: { - type: 'string', - description: 'The ID of the chat message to update.' - }, - body: { - type: 'object', - description: 'The body of the request containing the updated message data.' - } - }, - required: ['incident_id', 'message_id', 'body'] - } - } - } -}; - -export { apiTool }; \ No newline at end of file diff --git a/tools/firehydrant-api/firehydrant-api/update-an-incident-event.js b/tools/firehydrant-api/firehydrant-api/update-an-incident-event.js deleted file mode 100644 index cbdd53e..0000000 --- a/tools/firehydrant-api/firehydrant-api/update-an-incident-event.js +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Function to update an incident event in FireHydrant. - * - * @param {Object} args - Arguments for the update. - * @param {string} args.incident_id - The ID of the incident to update. - * @param {string} args.event_id - The ID of the event to update. - * @param {Object} [args.data] - The data to update the event with. - * @returns {Promise} - The result of the update operation. - */ -const executeFunction = async ({ incident_id, event_id, data }) => { - const baseUrl = 'https://api.firehydrant.io/v1'; - const token = process.env.FIREHYDRANT_API_API_KEY; - try { - // Construct the URL for the PATCH request - const url = `${baseUrl}/incidents/${incident_id}/events/${event_id}`; - - // Set up headers for the request - const headers = { - 'Authorization': `Bearer ${token}`, - 'Accept': 'application/json', - 'Content-Type': 'application/json' - }; - - // Perform the fetch request - const response = await fetch(url, { - method: 'PATCH', - headers, - body: JSON.stringify(data) - }); - - // Check if the response was successful - if (!response.ok) { - const errorData = await response.json(); - throw new Error(errorData); - } - - // Parse and return the response data - const responseData = await response.json(); - return responseData; - } catch (error) { - console.error('Error updating incident event:', error); - return { error: 'An error occurred while updating the incident event.' }; - } -}; - -/** - * Tool configuration for updating an incident event in FireHydrant. - * @type {Object} - */ -const apiTool = { - function: executeFunction, - definition: { - type: 'function', - function: { - name: 'update_incident_event', - description: 'Update an incident event in FireHydrant.', - parameters: { - type: 'object', - properties: { - incident_id: { - type: 'string', - description: 'The ID of the incident to update.' - }, - event_id: { - type: 'string', - description: 'The ID of the event to update.' - }, - data: { - type: 'object', - description: 'The data to update the event with.' - } - }, - required: ['incident_id', 'event_id'] - } - } - } -}; - -export { apiTool }; \ No newline at end of file diff --git a/tools/firehydrant-api/firehydrant-api/update-an-incident.js b/tools/firehydrant-api/firehydrant-api/update-an-incident.js deleted file mode 100644 index a7c9dab..0000000 --- a/tools/firehydrant-api/firehydrant-api/update-an-incident.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Function to update an incident in FireHydrant. - * - * @param {Object} args - Arguments for the incident update. - * @param {string} args.incident_id - The ID of the incident to update. - * @param {Object} args.body - The data to update the incident with. - * @returns {Promise} - The result of the incident update. - */ -const executeFunction = async ({ incident_id, body }) => { - const baseUrl = 'https://api.firehydrant.io/v1'; - const token = process.env.FIREHYDRANT_API_API_KEY; - try { - // Construct the URL for the incident update - const url = `${baseUrl}/incidents/${incident_id}`; - - // Set up headers for the request - const headers = { - 'Accept': 'application/json', - 'Content-Type': 'application/json', - }; - - // If a token is provided, add it to the Authorization header - if (token) { - headers['Authorization'] = `Bearer ${token}`; - } - - // Perform the fetch request - const response = await fetch(url, { - method: 'PATCH', - headers, - body: JSON.stringify(body), - }); - - // Check if the response was successful - if (!response.ok) { - const errorData = await response.json(); - throw new Error(errorData); - } - - // Parse and return the response data - const data = await response.json(); - return data; - } catch (error) { - console.error('Error updating the incident:', error); - return { error: 'An error occurred while updating the incident.' }; - } -}; - -/** - * Tool configuration for updating an incident in FireHydrant. - * @type {Object} - */ -const apiTool = { - function: executeFunction, - definition: { - type: 'function', - function: { - name: 'update_incident', - description: 'Update an incident in FireHydrant.', - parameters: { - type: 'object', - properties: { - incident_id: { - type: 'string', - description: 'The ID of the incident to update.' - }, - body: { - type: 'object', - description: 'The data to update the incident with.' - } - }, - required: ['incident_id', 'body'] - } - } - } -}; - -export { apiTool }; \ No newline at end of file diff --git a/tools/firehydrant-api/firehydrant-api/update-impacts-for-an-incident.js b/tools/firehydrant-api/firehydrant-api/update-impacts-for-an-incident.js deleted file mode 100644 index 2009fb8..0000000 --- a/tools/firehydrant-api/firehydrant-api/update-impacts-for-an-incident.js +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Function to update impacts for an incident in FireHydrant. - * - * @param {Object} args - Arguments for the update. - * @param {string} args.incident_id - The ID of the incident to update. - * @param {Object} args.impactData - The impact data to update for the incident. - * @returns {Promise} - The result of the update operation. - */ -const executeFunction = async ({ incident_id, impactData }) => { - const baseUrl = 'https://api.firehydrant.io/v1'; - const token = process.env.FIREHYDRANT_API_API_KEY; - - try { - // Construct the URL for the incident impact update - const url = `${baseUrl}/incidents/${incident_id}/impact`; - - // Set up headers for the request - const headers = { - 'Authorization': `Bearer ${token}`, - 'Accept': 'application/json', - 'Content-Type': 'application/json' - }; - - // Perform the fetch request - const response = await fetch(url, { - method: 'PATCH', - headers, - body: JSON.stringify(impactData) - }); - - // Check if the response was successful - if (!response.ok) { - const errorData = await response.json(); - throw new Error(errorData); - } - - // Parse and return the response data - const data = await response.json(); - return data; - } catch (error) { - console.error('Error updating incident impacts:', error); - return { error: 'An error occurred while updating incident impacts.' }; - } -}; - -/** - * Tool configuration for updating impacts for an incident in FireHydrant. - * @type {Object} - */ -const apiTool = { - function: executeFunction, - definition: { - type: 'function', - function: { - name: 'update_incident_impacts', - description: 'Update impacts for an incident in FireHydrant.', - parameters: { - type: 'object', - properties: { - incident_id: { - type: 'string', - description: 'The ID of the incident to update.' - }, - impactData: { - type: 'object', - description: 'The impact data to update for the incident.' - } - }, - required: ['incident_id', 'impactData'] - } - } - } -}; - -export { apiTool }; \ No newline at end of file diff --git a/tools/firehydrant-api/firehydrant-api/update-votes-for-an-incident-event.js b/tools/firehydrant-api/firehydrant-api/update-votes-for-an-incident-event.js deleted file mode 100644 index 56da8e6..0000000 --- a/tools/firehydrant-api/firehydrant-api/update-votes-for-an-incident-event.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Function to update votes for an incident event in FireHydrant. - * - * @param {Object} args - Arguments for updating votes. - * @param {string} args.incidentId - The ID of the incident. - * @param {string} args.eventId - The ID of the event. - * @param {string} args.direction - The direction of the vote (e.g., "up" or "down"). - * @returns {Promise} - The result of the vote update. - */ -const executeFunction = async ({ incidentId, eventId, direction }) => { - const baseUrl = 'https://api.firehydrant.io/v1'; - const token = process.env.FIREHYDRANT_API_API_KEY; - try { - // Construct the URL for the PATCH request - const url = `${baseUrl}/incidents/${incidentId}/events/${eventId}/votes`; - - // Set up headers for the request - const headers = { - 'Authorization': `Bearer ${token}`, - 'Accept': 'application/json', - 'Content-Type': 'application/json' - }; - - // Prepare the body of the request - const body = JSON.stringify({ direction }); - - // Perform the fetch request - const response = await fetch(url, { - method: 'PATCH', - headers, - body - }); - - // Check if the response was successful - if (!response.ok) { - const errorData = await response.json(); - throw new Error(errorData); - } - - // Parse and return the response data - const data = await response.json(); - return data; - } catch (error) { - console.error('Error updating votes for incident event:', error); - return { error: 'An error occurred while updating votes for the incident event.' }; - } -}; - -/** - * Tool configuration for updating votes for an incident event in FireHydrant. - * @type {Object} - */ -const apiTool = { - function: executeFunction, - definition: { - type: 'function', - function: { - name: 'update_incident_event_votes', - description: 'Update votes for an incident event in FireHydrant.', - parameters: { - type: 'object', - properties: { - incidentId: { - type: 'string', - description: 'The ID of the incident.' - }, - eventId: { - type: 'string', - description: 'The ID of the event.' - }, - direction: { - type: 'string', - enum: ['up', 'down'], - description: 'The direction of the vote.' - } - }, - required: ['incidentId', 'eventId', 'direction'] - } - } - } -}; - -export { apiTool }; \ No newline at end of file diff --git a/tools/paths.js b/tools/paths.js deleted file mode 100644 index ea61a35..0000000 --- a/tools/paths.js +++ /dev/null @@ -1,28 +0,0 @@ -export const toolPaths = [ - 'firehydrant-api/firehydrant-api/list-incidents.js', - 'firehydrant-api/firehydrant-api/archive-an-incident.js', - 'firehydrant-api/firehydrant-api/get-an-incident.js', - 'firehydrant-api/firehydrant-api/list-events-for-an-incident.js', - 'firehydrant-api/firehydrant-api/get-chat-channel-information-for-an-incident.js', - 'firehydrant-api/firehydrant-api/list-attachments-for-an-incident.js', - 'firehydrant-api/firehydrant-api/list-links-for-an-incident.js', - 'firehydrant-api/firehydrant-api/list-impacted-infrastructure-for-an-incident.js', - 'firehydrant-api/firehydrant-api/update-an-incident.js', - 'firehydrant-api/firehydrant-api/add-impacted-infrastructure-to-an-incident.js', - 'firehydrant-api/firehydrant-api/create-an-incident.js', - 'firehydrant-api/firehydrant-api/create-an-attachment-for-an-incident.js', - 'firehydrant-api/firehydrant-api/get-vote-status-for-an-ai-generated-incident-summary.js', - 'firehydrant-api/firehydrant-api/delete-a-chat-message-from-an-incident.js', - 'firehydrant-api/firehydrant-api/update-impacts-for-an-incident.js', - 'firehydrant-api/firehydrant-api/update-an-incident-event.js', - 'firehydrant-api/firehydrant-api/remove-impacted-infrastructure-from-an-incident.js', - 'firehydrant-api/firehydrant-api/get-vote-counts-for-an-incident-event.js', - 'firehydrant-api/firehydrant-api/create-a-chat-message-for-an-incident.js', - 'firehydrant-api/firehydrant-api/delete-an-alert-from-an-incident.js', - 'firehydrant-api/firehydrant-api/set-an-alert-as-primary-for-an-incident.js', - 'firehydrant-api/firehydrant-api/get-an-incident-event.js', - 'firehydrant-api/firehydrant-api/close-an-incident.js', - 'firehydrant-api/firehydrant-api/update-a-chat-message-in-an-incident.js', - 'firehydrant-api/firehydrant-api/update-votes-for-an-incident-event.js', - 'firehydrant-api/firehydrant-api/replace-all-impacts-for-an-incident.js' -]; \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..e9328bc --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,36 @@ + + +{ + "compilerOptions": { + "allowJs": true, + "allowUnreachableCode": false, + "allowUnusedLabels": false, + "checkJs": true, + "declaration": true, + "declarationMap": true, + "esModuleInterop": true, + "exactOptionalPropertyTypes": true, + "forceConsistentCasingInFileNames": true, + "incremental": true, + "isolatedModules": true, + "lib": ["dom", "dom.iterable", "es2024"], + "module": "nodenext", + "moduleResolution": "node16", + "noFallthroughCasesInSwitch": true, + "noImplicitOverride": true, + "noImplicitReturns": true, + "noPropertyAccessFromIndexSignature": true, + "noUncheckedIndexedAccess": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "outDir": "esm", + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "target": "es2022", + "tsBuildInfoFile": ".tsbuildinfo", + "useUnknownInCatchVariables": true, + }, + "exclude": ["node_modules"], + "include": ["src"] +}