From 4fa04f2a45f83fe8f11ffc327d9d1ed86fc5f111 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Mon, 9 Dec 2024 00:33:08 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.453.4 --- .speakeasy/gen.lock | 1590 +++++++++++++++------ .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 19 +- .speakeasy/workflow.yaml | 2 +- README.md | 23 +- RELEASES.md | 11 + accountsettings.go | 56 +- alerts.go | 32 +- aws.go | 14 +- awscloudtrailbatchevents.go | 8 +- awsconnections.go | 14 +- catalogs.go | 14 +- changes.go | 98 +- checklisttemplates.go | 8 +- communication.go | 26 +- confluence.go | 8 +- conversations.go | 50 +- docs/sdks/accountsettings/README.md | 8 +- docs/sdks/alerts/README.md | 4 +- docs/sdks/aws/README.md | 2 +- docs/sdks/awsconnections/README.md | 2 +- docs/sdks/catalogs/README.md | 2 +- docs/sdks/changes/README.md | 16 +- docs/sdks/communication/README.md | 2 +- docs/sdks/conversations/README.md | 6 +- docs/sdks/environments/README.md | 4 +- docs/sdks/firehydrant/README.md | 4 +- docs/sdks/functionalities/README.md | 6 +- docs/sdks/incidents/README.md | 46 +- docs/sdks/incidentsettings/README.md | 34 +- docs/sdks/infrastructures/README.md | 2 +- docs/sdks/integrations/README.md | 6 +- docs/sdks/maintenances/README.md | 2 +- docs/sdks/metrics/README.md | 4 +- docs/sdks/metricsreporting/README.md | 18 +- docs/sdks/retrospectives/README.md | 16 +- docs/sdks/runbooks/README.md | 16 +- docs/sdks/scim/README.md | 10 +- docs/sdks/services/README.md | 14 +- docs/sdks/signals/README.md | 22 +- docs/sdks/slack/README.md | 2 +- docs/sdks/statuspage/README.md | 2 +- docs/sdks/statuspages/README.md | 12 +- docs/sdks/statusupdatetemplates/README.md | 2 +- docs/sdks/tasks/README.md | 14 +- docs/sdks/teams/README.md | 16 +- docs/sdks/tickets/README.md | 6 +- docs/sdks/webhooks/README.md | 4 +- environments.go | 32 +- executions.go | 8 +- firehydrant.go | 6 +- firehydrantsignalsteams.go | 8 +- firehydrantslack.go | 20 +- firehydrantstatuspage.go | 14 +- firehydrantticketing.go | 14 +- functionalities.go | 38 +- go.mod | 12 +- go.sum | 12 - incidents.go | 314 +++- incidentsettings.go | 272 +++- infrastructures.go | 8 +- integrations.go | 152 +- internal/utils/env.go | 16 + internal/utils/retries.go | 152 +- list.go | 8 +- maintenances.go | 20 +- metrics.go | 14 +- metricsreporting.go | 86 +- oncallschedules.go | 8 +- projectconfigurations.go | 14 +- retrospectives.go | 86 +- retry/config.go | 129 ++ runbooks.go | 110 +- scim.go | 68 +- services.go | 98 +- signals.go | 164 ++- slack.go | 20 +- statuspage.go | 8 +- statuspages.go | 116 +- statusupdatetemplates.go | 8 +- system.go | 8 +- tasks.go | 86 +- teams.go | 86 +- tests/accountsettings_test.go | 106 -- tests/alerts_test.go | 69 - tests/aws_test.go | 26 - tests/awscloudtrailbatchevents_test.go | 22 - tests/awsconnections_test.go | 34 - tests/catalogs_test.go | 37 - tests/changes_test.go | 169 --- tests/checklisttemplates_test.go | 22 - tests/communication_test.go | 44 - tests/confluence_test.go | 22 - tests/conversations_test.go | 97 -- tests/environments_test.go | 71 - tests/executions_test.go | 22 - tests/files.go | 40 - tests/firehydrantsignalsteams_test.go | 22 - tests/firehydrantslack_test.go | 44 - tests/firehydrantstatuspage_test.go | 33 - tests/firehydrantticketing_test.go | 33 - tests/functionalities_test.go | 74 - tests/incidents_test.go | 598 -------- tests/incidentsettings_test.go | 506 ------- tests/infrastructures_test.go | 23 - tests/integrations_test.go | 273 ---- tests/list_test.go | 22 - tests/maintenances_test.go | 50 - tests/metrics_test.go | 38 - tests/metricsreporting_test.go | 176 --- tests/oncallschedules_test.go | 22 - tests/projectconfigurations_test.go | 33 - tests/retrospectives_test.go | 147 -- tests/runbooks_test.go | 220 --- tests/scim_test.go | 176 --- tests/services_test.go | 187 --- tests/signals_test.go | 297 ---- tests/slack_test.go | 47 - tests/statusupdatetemplates_test.go | 26 - tests/system_test.go | 22 - tests/tasks_test.go | 157 -- tests/teams_test.go | 178 --- tests/ticketing_test.go | 33 - tests/ticketingpriorities_test.go | 22 - tests/tickets_test.go | 52 - tests/users_test.go | 44 - tests/webhooks_test.go | 73 - tests/zendesk_test.go | 22 - ticketing.go | 14 +- ticketingpriorities.go | 8 +- tickets.go | 26 +- users.go | 20 +- webhooks.go | 38 +- zendesk.go | 8 +- 134 files changed, 3536 insertions(+), 5503 deletions(-) create mode 100644 RELEASES.md create mode 100644 internal/utils/env.go delete mode 100644 tests/accountsettings_test.go delete mode 100644 tests/alerts_test.go delete mode 100644 tests/aws_test.go delete mode 100644 tests/awscloudtrailbatchevents_test.go delete mode 100644 tests/awsconnections_test.go delete mode 100644 tests/catalogs_test.go delete mode 100644 tests/changes_test.go delete mode 100644 tests/checklisttemplates_test.go delete mode 100644 tests/communication_test.go delete mode 100644 tests/confluence_test.go delete mode 100644 tests/conversations_test.go delete mode 100644 tests/environments_test.go delete mode 100644 tests/executions_test.go delete mode 100644 tests/files.go delete mode 100644 tests/firehydrantsignalsteams_test.go delete mode 100644 tests/firehydrantslack_test.go delete mode 100644 tests/firehydrantstatuspage_test.go delete mode 100644 tests/firehydrantticketing_test.go delete mode 100644 tests/functionalities_test.go delete mode 100644 tests/incidents_test.go delete mode 100644 tests/incidentsettings_test.go delete mode 100644 tests/infrastructures_test.go delete mode 100644 tests/integrations_test.go delete mode 100644 tests/list_test.go delete mode 100644 tests/maintenances_test.go delete mode 100644 tests/metrics_test.go delete mode 100644 tests/metricsreporting_test.go delete mode 100644 tests/oncallschedules_test.go delete mode 100644 tests/projectconfigurations_test.go delete mode 100644 tests/retrospectives_test.go delete mode 100644 tests/runbooks_test.go delete mode 100644 tests/scim_test.go delete mode 100644 tests/services_test.go delete mode 100644 tests/signals_test.go delete mode 100644 tests/slack_test.go delete mode 100644 tests/statusupdatetemplates_test.go delete mode 100644 tests/system_test.go delete mode 100644 tests/tasks_test.go delete mode 100644 tests/teams_test.go delete mode 100644 tests/ticketing_test.go delete mode 100644 tests/ticketingpriorities_test.go delete mode 100644 tests/tickets_test.go delete mode 100644 tests/users_test.go delete mode 100644 tests/webhooks_test.go delete mode 100644 tests/zendesk_test.go diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index c9f30c7..c4a510f 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -3,16 +3,18 @@ id: 39357612-0c85-4a96-a549-e2d920c4a065 management: docChecksum: 2fb06b765049a3c17f320d8d880e596a docVersion: 0.0.1 - speakeasyVersion: 1.435.1 - generationVersion: 2.455.2 - releaseVersion: 0.5.0 - configChecksum: 089ce76064b366a11939b99d598a6999 + speakeasyVersion: 1.453.4 + generationVersion: 2.474.6 + releaseVersion: 0.6.0 + configChecksum: 85ce98fe4bdb93f6fbc05a4f6e67ad37 + repoURL: https://github.com/speakeasy-sdks/firehydrant-go-sdk.git + installationURL: https://github.com/speakeasy-sdks/firehydrant-go-sdk features: go: additionalDependencies: 0.1.0 additionalProperties: 0.1.2 constsAndDefaults: 0.1.6 - core: 3.5.15 + core: 3.5.17 defaultEnabledRetries: 0.2.0 envVarSecurityUsage: 0.3.2 flattening: 2.81.1 @@ -26,9 +28,8 @@ features: nameOverrides: 2.81.2 nullables: 0.1.0 responseFormat: 0.1.2 - retries: 2.83.0 + retries: 2.83.1 sdkHooks: 0.1.0 - tests: 0.6.0 uploadStreams: 0.1.0 generatedFiles: - .gitattributes @@ -2118,6 +2119,7 @@ generatedFiles: - integrations.go - internal/hooks/hooks.go - internal/utils/contenttype.go + - internal/utils/env.go - internal/utils/form.go - internal/utils/headers.go - internal/utils/json.go @@ -2148,52 +2150,6 @@ generatedFiles: - system.go - tasks.go - teams.go - - tests/accountsettings_test.go - - tests/alerts_test.go - - tests/aws_test.go - - tests/awscloudtrailbatchevents_test.go - - tests/awsconnections_test.go - - tests/catalogs_test.go - - tests/changes_test.go - - tests/checklisttemplates_test.go - - tests/communication_test.go - - tests/confluence_test.go - - tests/conversations_test.go - - tests/environments_test.go - - tests/executions_test.go - - tests/files.go - - tests/firehydrantsignalsteams_test.go - - tests/firehydrantslack_test.go - - tests/firehydrantstatuspage_test.go - - tests/firehydrantticketing_test.go - - tests/functionalities_test.go - - tests/incidents_test.go - - tests/incidentsettings_test.go - - tests/infrastructures_test.go - - tests/integrations_test.go - - tests/list_test.go - - tests/maintenances_test.go - - tests/metrics_test.go - - tests/metricsreporting_test.go - - tests/oncallschedules_test.go - - tests/projectconfigurations_test.go - - tests/retrospectives_test.go - - tests/runbooks_test.go - - tests/scim_test.go - - tests/services_test.go - - tests/signals_test.go - - tests/slack_test.go - - tests/statuspages_test.go - - tests/statusupdatetemplates_test.go - - tests/system_test.go - - tests/tasks_test.go - - tests/teams_test.go - - tests/ticketing_test.go - - tests/ticketingpriorities_test.go - - tests/tickets_test.go - - tests/users_test.go - - tests/webhooks_test.go - - tests/zendesk_test.go - ticketing.go - ticketingpriorities.go - tickets.go @@ -3112,6 +3068,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} getV1MetricsInfraType: speakeasy-default-get-v1-metrics-infra-type: parameters: @@ -3957,7 +3914,8 @@ examples: responses: "400": application/json: {"key": "", "key1": "", "key2": ""} - "401": {} + "401": + application/json: {"key": "", "key1": "", "key2": ""} "404": {} "408": application/json: {"key": ""} @@ -3965,6 +3923,7 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} updateAiPreferences: speakeasy-default-update-ai-preferences: responses: @@ -3978,6 +3937,8 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} + "400": {} voteOnIncidentSummary: speakeasy-default-vote-on-incident-summary: parameters: @@ -3991,7 +3952,8 @@ examples: application/json: {"key": "", "key1": ""} "401": application/json: {"key": "", "key1": ""} - "404": {} + "404": + application/json: {"key": "", "key1": ""} "408": application/json: {"key": "", "key1": ""} "429": @@ -4003,7 +3965,8 @@ examples: responses: "400": application/json: {"key": "", "key1": "", "key2": ""} - "401": {} + "401": + application/json: {"key": "", "key1": "", "key2": ""} "404": application/json: {"key": "", "key1": "", "key2": ""} "408": @@ -4022,9 +3985,11 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "408": application/json: {"key": "", "key1": "", "key2": ""} - "429": {} + "429": + application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} apiPingNoAuth: speakeasy-default-api-ping-no-auth: responses: @@ -4036,8 +4001,11 @@ examples: application/json: {"key": ""} "408": application/json: {"key": "", "key1": "", "key2": ""} - "429": {} - "500": {} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": ""} + "200": {} apiPing: speakeasy-default-api-ping: responses: @@ -4049,8 +4017,11 @@ examples: application/json: {"key": ""} "408": application/json: {"key": "", "key1": "", "key2": ""} - "429": {} - "500": {} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": ""} + "200": {} getSavedSearch: speakeasy-default-get-saved-search: parameters: @@ -4070,6 +4041,7 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} deleteSavedSearch: speakeasy-default-delete-saved-search: parameters: @@ -4098,7 +4070,8 @@ examples: responses: "400": application/json: {"key": ""} - "401": {} + "401": + application/json: {"key": ""} "404": application/json: {"key": "", "key1": "", "key2": ""} "408": @@ -4106,6 +4079,7 @@ examples: "429": application/json: {"key": ""} "500": {} + "200": {} getIncidentAiSummaryVoteStatus: speakeasy-default-get-incident-ai-summary-vote-status: parameters: @@ -4119,9 +4093,11 @@ examples: application/json: {"key": ""} "408": application/json: {"key": "", "key1": ""} - "429": {} + "429": + application/json: {"key": ""} "500": application/json: {"key": "", "key1": ""} + "400": {} listIncidents: speakeasy-default-list-incidents: responses: @@ -4131,9 +4107,13 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} - "429": {} - "500": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} + "200": {} createIncident: speakeasy-default-create-incident: requestBody: @@ -4145,10 +4125,13 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": ""} - "408": {} - "429": {} + "408": + application/json: {"key": ""} + "429": + application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "201": {} getIncident: speakeasy-default-get-incident: parameters: @@ -4167,6 +4150,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} archiveIncident: speakeasy-default-archive-incident: parameters: @@ -4181,9 +4165,11 @@ examples: application/json: {"key": ""} "408": application/json: {"key": "", "key1": "", "key2": ""} - "429": {} + "429": + application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} updateIncident: speakeasy-default-update-incident: parameters: @@ -4202,6 +4188,7 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "200": {} deleteIncidentAlert: speakeasy-default-delete-incident-alert: parameters: @@ -4213,7 +4200,8 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "401": application/json: {"key": ""} - "404": {} + "404": + application/json: {"key": "", "key1": "", "key2": ""} "408": application/json: {"key": "", "key1": "", "key2": ""} "429": @@ -4235,9 +4223,12 @@ examples: application/json: {"key": ""} "408": application/json: {"key": ""} - "429": {} + "429": + application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} + "400": {} listIncidentAttachments: speakeasy-default-list-incident-attachments: parameters: @@ -4247,13 +4238,15 @@ examples: responses: "400": application/json: {"key": "", "key1": "", "key2": ""} - "401": {} + "401": + application/json: {"key": "", "key1": "", "key2": ""} "404": application/json: {"key": "", "key1": ""} "408": {} "429": application/json: {"key": "", "key1": "", "key2": ""} - "500": {} + "500": + application/json: {"key": "", "key1": ""} createIncidentAttachment: speakeasy-default-create-incident-attachment: parameters: @@ -4274,6 +4267,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "201": {} getIncidentChannel: speakeasy-default-get-incident-channel: parameters: @@ -4288,9 +4282,11 @@ examples: application/json: {"key": "", "key1": ""} "408": application/json: {"key": ""} - "429": {} + "429": + application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} closeIncident: speakeasy-default-close-incident: parameters: @@ -4309,6 +4305,7 @@ examples: application/json: {"key": ""} "500": application/json: {"key": ""} + "200": {} listIncidentEvents: speakeasy-default-list-incident-events: parameters: @@ -4328,6 +4325,7 @@ examples: application/json: {"key": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} getIncidentEvent: speakeasy-default-get-incident-event: parameters: @@ -4343,8 +4341,11 @@ examples: application/json: {"key": "", "key1": ""} "408": application/json: {"key": "", "key1": ""} - "429": {} - "500": {} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": ""} + "200": {} deleteIncidentEvent: speakeasy-default-delete-incident-event: parameters: @@ -4362,6 +4363,8 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "200": {} + "400": {} updateIncidentEvent: speakeasy-default-update-incident-event: parameters: @@ -4373,9 +4376,13 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "404": application/json: {"key": "", "key1": "", "key2": ""} - "408": {} - "429": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": "", "key2": ""} "500": {} + "200": {} + "400": {} updateIncidentEventVotes: speakeasy-default-update-incident-event-votes: parameters: @@ -4389,12 +4396,15 @@ examples: application/json: {"key": ""} "401": application/json: {"key": "", "key1": ""} - "404": {} - "408": {} + "404": + application/json: {"key": ""} + "408": + application/json: {"key": "", "key1": ""} "429": application/json: {"key": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "200": {} getIncidentEventVoteStatus: speakeasy-default-get-incident-event-vote-status: parameters: @@ -4406,11 +4416,14 @@ examples: application/json: {"key": ""} "401": application/json: {"key": "", "key1": "", "key2": ""} - "404": {} - "408": {} + "404": + application/json: {"key": ""} + "408": + application/json: {"key": "", "key1": "", "key2": ""} "429": {} "500": application/json: {"key": "", "key1": ""} + "200": {} createIncidentGenericChatMessage: speakeasy-default-create-incident-generic-chat-message: parameters: @@ -4423,13 +4436,15 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "401": application/json: {"key": "", "key1": ""} - "404": {} + "404": + application/json: {"key": "", "key1": "", "key2": ""} "408": application/json: {"key": "", "key1": ""} "429": application/json: {"key": ""} "500": application/json: {"key": ""} + "201": {} deleteIncidentChatMessage: speakeasy-default-delete-incident-chat-message: parameters: @@ -4439,7 +4454,8 @@ examples: responses: "400": application/json: {"key": "", "key1": ""} - "401": {} + "401": + application/json: {"key": "", "key1": ""} "404": application/json: {"key": ""} "408": @@ -4447,6 +4463,7 @@ examples: "429": application/json: {"key": "", "key1": "", "key2": ""} "500": {} + "200": {} updateIncidentChatMessage: speakeasy-default-update-incident-chat-message: parameters: @@ -4458,11 +4475,15 @@ examples: responses: "404": application/json: {"key": "", "key1": ""} - "408": {} + "408": + application/json: {"key": "", "key1": ""} "429": application/json: {"key": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} + "400": {} + "401": {} updateIncidentImpacts: speakeasy-default-update-incident-impacts: parameters: @@ -4473,10 +4494,13 @@ examples: application/json: {"key": "", "key1": ""} "401": application/json: {"key": ""} - "404": {} - "408": {} + "404": + application/json: {"key": "", "key1": ""} + "408": + application/json: {"key": ""} "429": {} "500": {} + "200": {} partialUpdateIncidentImpacts: speakeasy-default-partial-update-incident-impacts: parameters: @@ -4493,6 +4517,8 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "200": {} + "400": {} listIncidentImpact: speakeasy-default-list-incident-impact: parameters: @@ -4510,6 +4536,8 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "200": {} + "400": {} createIncidentImpact: speakeasy-default-create-incident-impact: parameters: @@ -4523,12 +4551,16 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "404": application/json: {"key": ""} - "408": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} "413": application/json: {"key": "", "key1": ""} "429": application/json: {"key": "", "key1": ""} - "500": {} + "500": + application/json: {"key": ""} + "201": {} + "400": {} deleteIncidentImpact: speakeasy-default-delete-incident-impact: parameters: @@ -4541,9 +4573,13 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "413": application/json: {"key": ""} - "429": {} + "429": + application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "400": {} + "401": {} + "404": {} listIncidentLinks: speakeasy-default-list-incident-links: parameters: @@ -4555,12 +4591,15 @@ examples: application/json: {"key": "", "key1": ""} "401": application/json: {"key": "", "key1": "", "key2": ""} - "404": {} + "404": + application/json: {"key": "", "key1": ""} "408": application/json: {"key": ""} "429": application/json: {"key": ""} - "500": {} + "500": + application/json: {"key": "", "key1": "", "key2": ""} + "200": {} createIncidentLink: speakeasy-default-create-incident-link: parameters: @@ -4573,13 +4612,15 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "401": application/json: {"key": "", "key1": ""} - "404": {} + "404": + application/json: {"key": "", "key1": "", "key2": ""} "408": application/json: {"key": "", "key1": ""} "429": application/json: {"key": ""} "500": application/json: {"key": "", "key1": ""} + "201": {} updateIncidentLink: speakeasy-default-update-incident-link: parameters: @@ -4591,8 +4632,10 @@ examples: application/json: {"key": ""} "401": application/json: {"key": "", "key1": "", "key2": ""} - "404": {} - "408": {} + "404": + application/json: {"key": ""} + "408": + application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": ""} "500": @@ -4608,7 +4651,8 @@ examples: application/json: {"key": "", "key1": ""} "401": application/json: {"key": "", "key1": "", "key2": ""} - "404": {} + "404": + application/json: {"key": "", "key1": ""} "408": application/json: {"key": ""} "429": @@ -4627,11 +4671,13 @@ examples: application/json: {"key": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} + "408": + application/json: {"key": "", "key1": ""} "429": application/json: {"key": ""} "500": application/json: {"key": ""} + "200": {} updateIncidentMilestonesBulk: speakeasy-default-update-incident-milestones-bulk: parameters: @@ -4642,7 +4688,8 @@ examples: responses: "400": application/json: {"key": ""} - "401": {} + "401": + application/json: {"key": ""} "404": application/json: {"key": "", "key1": "", "key2": ""} "408": @@ -4651,6 +4698,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} createIncidentNote: speakeasy-default-create-incident-note: parameters: @@ -4671,6 +4719,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "201": {} updateIncidentNote: speakeasy-default-update-incident-note: parameters: @@ -4682,7 +4731,8 @@ examples: responses: "400": application/json: {"key": ""} - "401": {} + "401": + application/json: {"key": ""} "404": application/json: {"key": "", "key1": "", "key2": ""} "408": @@ -4691,6 +4741,7 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "200": {} listIncidentRelatedChanges: speakeasy-default-list-incident-related-changes: parameters: @@ -4700,13 +4751,16 @@ examples: responses: "400": application/json: {"key": ""} - "401": {} + "401": + application/json: {"key": ""} "404": application/json: {"key": "", "key1": "", "key2": ""} "408": application/json: {"key": "", "key1": ""} "429": {} - "500": {} + "500": + application/json: {"key": "", "key1": "", "key2": ""} + "200": {} createIncidentRelatedChange: speakeasy-default-create-incident-related-change: parameters: @@ -4717,7 +4771,8 @@ examples: responses: "401": application/json: {"key": "", "key1": "", "key2": ""} - "404": {} + "404": + application/json: {"key": "", "key1": "", "key2": ""} "408": application/json: {"key": "", "key1": ""} "413": @@ -4726,6 +4781,8 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "201": {} + "400": {} updateIncidentRelatedChangeEvent: speakeasy-default-update-incident-related-change-event: parameters: @@ -4745,6 +4802,8 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} + "400": {} getIncidentRelationships: speakeasy-default-get-incident-relationships: parameters: @@ -4761,7 +4820,9 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": "", "key1": ""} - "500": {} + "500": + application/json: {"key": "", "key1": ""} + "200": {} resolveIncident: speakeasy-default-resolve-incident: parameters: @@ -4774,11 +4835,13 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "404": application/json: {"key": ""} - "408": {} + "408": + application/json: {"key": "", "key1": ""} "429": application/json: {"key": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "200": {} listIncidentRoleAssignments: speakeasy-default-list-incident-role-assignments: parameters: @@ -4788,7 +4851,8 @@ examples: responses: "400": application/json: {"key": "", "key1": "", "key2": ""} - "401": {} + "401": + application/json: {"key": "", "key1": "", "key2": ""} "404": application/json: {"key": "", "key1": "", "key2": ""} "408": {} @@ -4796,6 +4860,7 @@ examples: application/json: {"key": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "200": {} createIncidentRoleAssignment: speakeasy-default-create-incident-role-assignment: parameters: @@ -4808,10 +4873,14 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} - "429": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "201": {} + "400": {} deleteIncidentRoleAssignment: speakeasy-default-delete-incident-role-assignment: parameters: @@ -4829,7 +4898,9 @@ examples: application/json: {"key": "", "key1": ""} "429": application/json: {"key": "", "key1": ""} - "500": {} + "500": + application/json: {"key": ""} + "200": {} getSimilarIncidents: speakeasy-default-get-similar-incidents: parameters: @@ -4857,13 +4928,16 @@ examples: responses: "401": application/json: {"key": ""} - "404": {} + "404": + application/json: {"key": ""} "408": application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} + "400": {} createIncidentStatusPage: speakeasy-default-create-incident-status-page: parameters: @@ -4876,11 +4950,14 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "401": application/json: {"key": ""} - "404": {} - "408": {} + "404": + application/json: {"key": "", "key1": "", "key2": ""} + "408": + application/json: {"key": ""} "429": application/json: {"key": ""} "500": {} + "201": {} createIncidentTaskList: speakeasy-default-create-incident-task-list: parameters: @@ -4901,6 +4978,7 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "201": {} createIncidentTeamAssignment: speakeasy-default-create-incident-team-assignment: parameters: @@ -4915,10 +4993,12 @@ examples: application/json: {"key": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} + "408": + application/json: {"key": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} - "500": {} + "500": + application/json: {"key": ""} deleteIncidentTeamAssignment: speakeasy-default-delete-incident-team-assignment: parameters: @@ -4953,9 +5033,11 @@ examples: application/json: {"key": "", "key1": ""} "408": application/json: {"key": "", "key1": ""} - "429": {} + "429": + application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "200": {} deleteIncidentTranscript: speakeasy-default-delete-incident-transcript: parameters: @@ -4967,10 +5049,13 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} + "408": + application/json: {"key": "", "key1": ""} "429": application/json: {"key": ""} - "500": {} + "500": + application/json: {"key": "", "key1": ""} + "400": {} unarchiveIncident: speakeasy-default-unarchive-incident: parameters: @@ -4981,10 +5066,14 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": ""} - "408": {} + "408": + application/json: {"key": "", "key1": ""} "429": application/json: {"key": ""} - "500": {} + "500": + application/json: {"key": ""} + "201": {} + "400": {} getIncidentUserRole: speakeasy-default-get-incident-user-role: parameters: @@ -4994,13 +5083,15 @@ examples: responses: "400": application/json: {"key": "", "key1": "", "key2": ""} - "401": {} + "401": + application/json: {"key": "", "key1": "", "key2": ""} "404": {} "408": {} "429": application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "200": {} listScheduledMaintenances: speakeasy-default-list-scheduled-maintenances: responses: @@ -5010,9 +5101,13 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} - "429": {} - "500": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} + "200": {} createScheduledMaintenance: speakeasy-default-create-scheduled-maintenance: requestBody: @@ -5024,10 +5119,14 @@ examples: application/json: {"key": "", "key1": ""} "408": application/json: {"key": ""} - "413": {} - "429": {} + "413": + application/json: {"key": ""} + "429": + application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "201": {} + "400": {} listAlerts: speakeasy-default-list-alerts: responses: @@ -5037,9 +5136,13 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} - "429": {} - "500": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} + "200": {} getAlert: speakeasy-default-get-alert: parameters: @@ -5058,6 +5161,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} listIncidentAlerts: speakeasy-default-list-incident-alerts: parameters: @@ -5066,11 +5170,15 @@ examples: responses: "404": application/json: {"key": "", "key1": ""} - "408": {} + "408": + application/json: {"key": "", "key1": ""} "429": application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "200": {} + "400": {} + "401": {} createIncidentAlerts: speakeasy-default-create-incident-alerts: parameters: @@ -5085,8 +5193,10 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": ""} - "408": {} - "429": {} + "408": + application/json: {"key": ""} + "429": + application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} listAlertProcessingLogs: @@ -5094,7 +5204,8 @@ examples: responses: "400": application/json: {"key": ""} - "401": {} + "401": + application/json: {"key": ""} "404": application/json: {"key": ""} "408": @@ -5103,6 +5214,7 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} ingestCatalogData: speakeasy-default-ingest-catalog-data: parameters: @@ -5117,9 +5229,13 @@ examples: application/json: {"key": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} - "429": {} - "500": {} + "408": + application/json: {"key": "", "key1": ""} + "429": + application/json: {"key": ""} + "500": + application/json: {"key": "", "key1": ""} + "201": {} refreshCatalog: speakeasy-default-refresh-catalog: parameters: @@ -5136,7 +5252,8 @@ examples: application/json: {"key": "", "key1": ""} "429": application/json: {"key": ""} - "500": {} + "500": + application/json: {"key": "", "key1": "", "key2": ""} listInfrastructures: speakeasy-default-list-infrastructures: responses: @@ -5146,9 +5263,13 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} - "429": {} - "500": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} + "200": {} createServiceDependency: speakeasy-default-create-service-dependency: requestBody: @@ -5166,6 +5287,7 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": ""} + "201": {} getServiceDependency: speakeasy-default-get-service-dependency: parameters: @@ -5176,13 +5298,15 @@ examples: application/json: {"key": ""} "401": application/json: {"key": "", "key1": ""} - "404": {} + "404": + application/json: {"key": ""} "408": application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} deleteServiceDependency: speakeasy-default-delete-service-dependency: parameters: @@ -5199,7 +5323,9 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": "", "key1": ""} - "500": {} + "500": + application/json: {"key": ""} + "200": {} updateServiceDependency: speakeasy-default-update-service-dependency: parameters: @@ -5218,6 +5344,7 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "200": {} listServices: speakeasy-default-list-services: responses: @@ -5227,9 +5354,13 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} - "429": {} - "500": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} + "200": {} createService: speakeasy-default-create-service: requestBody: @@ -5241,10 +5372,14 @@ examples: application/json: {"key": "", "key1": ""} "408": application/json: {"key": ""} - "413": {} - "429": {} + "413": + application/json: {"key": ""} + "429": + application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "201": {} + "400": {} createServiceLinks: speakeasy-default-create-service-links: requestBody: @@ -5256,11 +5391,13 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": ""} - "408": {} + "408": + application/json: {"key": ""} "429": application/json: {"key": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "201": {} getService: speakeasy-default-get-service: parameters: @@ -5279,6 +5416,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} deleteService: speakeasy-default-delete-service: parameters: @@ -5297,6 +5435,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} updateService: speakeasy-default-update-service: parameters: @@ -5315,6 +5454,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} listServiceAvailableDownstreamDependencies: speakeasy-default-list-service-available-downstream-dependencies: parameters: @@ -5323,7 +5463,8 @@ examples: responses: "400": application/json: {"key": "", "key1": ""} - "401": {} + "401": + application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": ""} "408": @@ -5332,6 +5473,7 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "200": {} listServiceAvailableUpstreamDependencies: speakeasy-default-list-service-available-upstream-dependencies: parameters: @@ -5344,10 +5486,13 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": "", "key2": ""} - "408": {} + "408": + application/json: {"key": ""} "429": application/json: {"key": ""} - "500": {} + "500": + application/json: {"key": "", "key1": ""} + "200": {} createServiceChecklistResponse: speakeasy-default-create-service-checklist-response: parameters: @@ -5388,6 +5533,7 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "200": {} deleteServiceLink: speakeasy-default-delete-service-link: parameters: @@ -5399,7 +5545,8 @@ examples: application/json: {"key": "", "key1": ""} "401": application/json: {"key": "", "key1": "", "key2": ""} - "404": {} + "404": + application/json: {"key": "", "key1": ""} "408": application/json: {"key": ""} "429": @@ -5415,19 +5562,23 @@ examples: responses: "401": application/json: {"key": ""} - "404": {} + "404": + application/json: {"key": ""} "408": application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "200": {} + "400": {} listChangeTypes: speakeasy-default-list-change-types: responses: "400": application/json: {"key": ""} - "401": {} + "401": + application/json: {"key": ""} "404": application/json: {"key": "", "key1": ""} "408": @@ -5435,6 +5586,7 @@ examples: "429": application/json: {"key": ""} "500": {} + "200": {} listChanges: speakeasy-default-list-changes: responses: @@ -5444,9 +5596,12 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} - "429": {} - "500": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} createChange: speakeasy-default-create-change: responses: @@ -5456,10 +5611,14 @@ examples: application/json: {"key": "", "key1": ""} "408": application/json: {"key": ""} - "413": {} - "429": {} + "413": + application/json: {"key": ""} + "429": + application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "201": {} + "400": {} listChangeEvents: speakeasy-default-list-change-events: responses: @@ -5475,6 +5634,7 @@ examples: application/json: {"key": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} createChangeEvent: speakeasy-default-create-change-event: requestBody: @@ -5486,10 +5646,13 @@ examples: application/json: {"key": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} - "429": {} + "408": + application/json: {"key": ""} + "429": + application/json: {"key": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "201": {} getChangeEvent: speakeasy-default-get-change-event: parameters: @@ -5504,8 +5667,11 @@ examples: application/json: {"key": "", "key1": ""} "408": application/json: {"key": "", "key1": ""} - "429": {} - "500": {} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": ""} + "200": {} deleteChangeEvent: speakeasy-default-delete-change-event: parameters: @@ -5522,6 +5688,7 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "400": {} updateChangeEvent: speakeasy-default-update-change-event: parameters: @@ -5532,9 +5699,13 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "404": application/json: {"key": "", "key1": "", "key2": ""} - "408": {} - "429": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": "", "key2": ""} "500": {} + "200": {} + "400": {} deleteChange: speakeasy-default-delete-change: parameters: @@ -5571,6 +5742,7 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "200": {} listChangeIdentities: speakeasy-default-list-change-identities: parameters: @@ -5588,7 +5760,9 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": ""} - "500": {} + "500": + application/json: {"key": ""} + "200": {} createChangeIdentity: speakeasy-default-create-change-identity: parameters: @@ -5603,11 +5777,14 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "408": application/json: {"key": "", "key1": ""} - "413": {} + "413": + application/json: {"key": "", "key1": ""} "429": application/json: {"key": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "201": {} + "400": {} deleteChangeIdentity: speakeasy-default-delete-change-identity: parameters: @@ -5619,12 +5796,15 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "404": application/json: {"key": "", "key1": "", "key2": ""} - "408": {} - "413": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "413": + application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": ""} + "400": {} updateChangeIdentity: speakeasy-default-update-change-identity: parameters: @@ -5638,13 +5818,16 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "404": application/json: {"key": "", "key1": "", "key2": ""} - "408": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} "413": application/json: {"key": "", "key1": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} + "400": {} getScheduledMaintenance: speakeasy-default-get-scheduled-maintenance: parameters: @@ -5663,6 +5846,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} deleteScheduledMaintenance: speakeasy-default-delete-scheduled-maintenance: parameters: @@ -5689,7 +5873,8 @@ examples: responses: "400": application/json: {"key": ""} - "401": {} + "401": + application/json: {"key": ""} "404": application/json: {"key": ""} "408": {} @@ -5697,6 +5882,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} listChecklistTemplates: speakeasy-default-list-checklist-templates: responses: @@ -5710,7 +5896,9 @@ examples: application/json: {"key": "", "key1": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} - "500": {} + "500": + application/json: {"key": "", "key1": "", "key2": ""} + "200": {} createChecklistTemplate: speakeasy-default-create-checklist-template: requestBody: @@ -5720,7 +5908,13 @@ examples: application/json: {"key": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} - "500": {} + "500": + application/json: {"key": ""} + "201": {} + "400": {} + "401": {} + "404": {} + "408": {} getChecklistTemplate: speakeasy-default-get-checklist-template: parameters: @@ -5739,6 +5933,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} deleteChecklistTemplate: speakeasy-default-delete-checklist-template: parameters: @@ -5753,6 +5948,9 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "200": {} + "400": {} + "401": {} updateChecklistTemplate: speakeasy-default-update-checklist-template: parameters: @@ -5765,11 +5963,13 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "404": application/json: {"key": ""} - "408": {} + "408": + application/json: {"key": "", "key1": ""} "429": application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} listIncidentTasks: speakeasy-default-list-incident-tasks: parameters: @@ -5779,11 +5979,15 @@ examples: responses: "404": application/json: {"key": "", "key1": ""} - "408": {} + "408": + application/json: {"key": "", "key1": ""} "429": application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "200": {} + "400": {} + "401": {} createIncidentTask: speakeasy-default-create-incident-task: parameters: @@ -5798,10 +6002,13 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": ""} - "408": {} - "429": {} + "408": + application/json: {"key": ""} + "429": + application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "201": {} getIncidentTask: speakeasy-default-get-incident-task: parameters: @@ -5813,10 +6020,12 @@ examples: application/json: {"key": "", "key1": ""} "401": application/json: {"key": "", "key1": "", "key2": ""} - "404": {} + "404": + application/json: {"key": "", "key1": ""} "408": application/json: {"key": "", "key1": "", "key2": ""} - "429": {} + "429": + application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} deleteIncidentTask: @@ -5851,11 +6060,13 @@ examples: application/json: {"key": ""} "404": application/json: {"key": "", "key1": "", "key2": ""} - "408": {} + "408": + application/json: {"key": "", "key1": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "200": {} convertIncidentTaskToFollowup: speakeasy-default-convert-incident-task-to-followup: parameters: @@ -5875,18 +6086,22 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "201": {} listTaskLists: speakeasy-default-list-task-lists: responses: "400": application/json: {"key": "", "key1": ""} - "401": {} + "401": + application/json: {"key": "", "key1": ""} "404": application/json: {"key": ""} "408": {} - "429": {} + "429": + application/json: {"key": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "200": {} createTaskList: speakeasy-default-create-task-list: requestBody: @@ -5902,7 +6117,9 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": "", "key1": ""} - "500": {} + "500": + application/json: {"key": "", "key1": ""} + "201": {} getTaskList: speakeasy-default-get-task-list: parameters: @@ -5921,6 +6138,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} deleteTaskList: speakeasy-default-delete-task-list: parameters: @@ -5939,6 +6157,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} updateTaskList: speakeasy-default-update-task-list: parameters: @@ -5957,6 +6176,7 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "200": {} listTickets: speakeasy-default-list-tickets: responses: @@ -5966,9 +6186,13 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} - "429": {} - "500": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} + "200": {} createTicket: speakeasy-default-create-ticket: requestBody: @@ -5980,10 +6204,13 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": ""} - "408": {} - "429": {} + "408": + application/json: {"key": ""} + "429": + application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "201": {} listConversationComments: speakeasy-default-list-conversation-comments: parameters: @@ -5993,13 +6220,15 @@ examples: responses: "401": application/json: {"key": "", "key1": ""} - "404": {} + "404": + application/json: {"key": "", "key1": ""} "408": application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": ""} "500": application/json: {"key": "", "key1": ""} + "400": {} createConversationComment: speakeasy-default-create-conversation-comment: parameters: @@ -6012,8 +6241,10 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "401": application/json: {"key": "", "key1": ""} - "404": {} - "408": {} + "404": + application/json: {"key": "", "key1": "", "key2": ""} + "408": + application/json: {"key": "", "key1": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} "500": {} @@ -6026,7 +6257,8 @@ examples: responses: "400": application/json: {"key": ""} - "401": {} + "401": + application/json: {"key": ""} "404": application/json: {"key": "", "key1": ""} "408": @@ -6048,7 +6280,8 @@ examples: application/json: {"key": ""} "404": application/json: {"key": ""} - "408": {} + "408": + application/json: {"key": "", "key1": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} "500": @@ -6064,11 +6297,13 @@ examples: application/json: {"key": ""} "404": application/json: {"key": ""} - "408": {} + "408": + application/json: {"key": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "400": {} listConversationCommentReactions: speakeasy-default-list-conversation-comment-reactions: parameters: @@ -6080,11 +6315,13 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": ""} "500": application/json: {"key": ""} + "400": {} createConversationCommentReaction: speakeasy-default-create-conversation-comment-reaction: parameters: @@ -6096,7 +6333,8 @@ examples: responses: "400": application/json: {"key": ""} - "401": {} + "401": + application/json: {"key": ""} "404": application/json: {"key": ""} "408": @@ -6137,6 +6375,8 @@ examples: application/json: {"key": ""} "500": application/json: {"key": ""} + "200": {} + "400": {} listUsers: speakeasy-default-list-users: responses: @@ -6146,9 +6386,13 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} - "429": {} - "500": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} + "200": {} getUser: speakeasy-default-get-user: parameters: @@ -6167,17 +6411,21 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} listCustomFieldDefinitions: speakeasy-default-list-custom-field-definitions: responses: "401": application/json: {"key": "", "key1": "", "key2": ""} - "404": {} + "404": + application/json: {"key": "", "key1": "", "key2": ""} "408": {} "429": application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} + "400": {} createCustomFieldDefinition: speakeasy-default-create-custom-field-definition: requestBody: @@ -6193,7 +6441,9 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": "", "key1": ""} - "500": {} + "500": + application/json: {"key": "", "key1": ""} + "201": {} deleteCustomFieldDefinition: speakeasy-default-delete-custom-field-definition: parameters: @@ -6202,12 +6452,15 @@ examples: responses: "401": application/json: {"key": "", "key1": ""} - "404": {} + "404": + application/json: {"key": "", "key1": ""} "408": application/json: {"key": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} "500": {} + "200": {} + "400": {} updateCustomFieldDefinition: speakeasy-default-update-custom-field-definition: parameters: @@ -6220,11 +6473,13 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} + "408": + application/json: {"key": ""} "429": application/json: {"key": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} getCustomFieldSelectOptions: speakeasy-default-get-custom-field-select-options: parameters: @@ -6236,12 +6491,15 @@ examples: application/json: {"key": ""} "401": application/json: {"key": "", "key1": "", "key2": ""} - "404": {} + "404": + application/json: {"key": ""} "408": application/json: {"key": ""} - "429": {} + "429": + application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} getFormConfiguration: speakeasy-default-get-form-configuration: parameters: @@ -6252,11 +6510,13 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} + "408": + application/json: {"key": "", "key1": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": ""} + "400": {} listIncidentRoles: speakeasy-default-list-incident-roles: responses: @@ -6264,13 +6524,15 @@ examples: application/json: {"key": "", "key1": ""} "401": application/json: {"key": "", "key1": "", "key2": ""} - "404": {} + "404": + application/json: {"key": "", "key1": ""} "408": application/json: {"key": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} createIncidentRole: speakeasy-default-create-incident-role: requestBody: @@ -6282,11 +6544,13 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": "", "key2": ""} - "408": {} + "408": + application/json: {"key": ""} "429": application/json: {"key": ""} "500": application/json: {"key": "", "key1": ""} + "201": {} getIncidentRole: speakeasy-default-get-incident-role: parameters: @@ -6295,7 +6559,8 @@ examples: responses: "400": application/json: {"key": "", "key1": ""} - "401": {} + "401": + application/json: {"key": "", "key1": ""} "404": {} "408": application/json: {"key": ""} @@ -6303,6 +6568,7 @@ examples: application/json: {"key": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "200": {} deleteIncidentRole: speakeasy-default-delete-incident-role: parameters: @@ -6317,6 +6583,9 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} + "400": {} + "401": {} updateIncidentRole: speakeasy-default-update-incident-role: parameters: @@ -6333,13 +6602,16 @@ examples: application/json: {"key": "", "key1": ""} "429": application/json: {"key": ""} - "500": {} + "500": + application/json: {"key": "", "key1": "", "key2": ""} + "200": {} listIncidentTags: speakeasy-default-list-incident-tags: responses: "400": application/json: {"key": "", "key1": "", "key2": ""} - "401": {} + "401": + application/json: {"key": "", "key1": "", "key2": ""} "404": application/json: {"key": "", "key1": "", "key2": ""} "408": @@ -6347,6 +6619,7 @@ examples: "429": application/json: {"key": "", "key1": "", "key2": ""} "500": {} + "200": {} validateIncidentTags: speakeasy-default-validate-incident-tags: requestBody: @@ -6354,7 +6627,8 @@ examples: responses: "400": application/json: {"key": "", "key1": "", "key2": ""} - "401": {} + "401": + application/json: {"key": "", "key1": "", "key2": ""} "404": {} "408": application/json: {"key": "", "key1": "", "key2": ""} @@ -6362,12 +6636,14 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "201": {} listIncidentTypes: speakeasy-default-list-incident-types: responses: "400": application/json: {"key": "", "key1": "", "key2": ""} - "401": {} + "401": + application/json: {"key": "", "key1": "", "key2": ""} "404": application/json: {"key": "", "key1": "", "key2": ""} "408": @@ -6375,6 +6651,7 @@ examples: "429": {} "500": application/json: {"key": "", "key1": "", "key2": ""} + "200": {} createIncidentType: speakeasy-default-create-incident-type: requestBody: @@ -6392,6 +6669,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "201": {} getIncidentType: speakeasy-default-get-incident-type: parameters: @@ -6406,9 +6684,11 @@ examples: application/json: {"key": ""} "408": application/json: {"key": ""} - "429": {} + "429": + application/json: {"key": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} archiveIncidentType: speakeasy-default-archive-incident-type: parameters: @@ -6425,7 +6705,9 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": "", "key1": ""} - "500": {} + "500": + application/json: {"key": "", "key1": "", "key2": ""} + "200": {} updateIncidentType: speakeasy-default-update-incident-type: parameters: @@ -6436,13 +6718,16 @@ examples: responses: "401": application/json: {"key": "", "key1": "", "key2": ""} - "404": {} + "404": + application/json: {"key": "", "key1": "", "key2": ""} "408": application/json: {"key": ""} "429": application/json: {"key": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "200": {} + "400": {} createLifecycleMilestone: speakeasy-default-create-lifecycle-milestone: requestBody: @@ -6456,8 +6741,11 @@ examples: application/json: {"key": ""} "408": application/json: {"key": "", "key1": ""} - "429": {} - "500": {} + "429": + application/json: {"key": ""} + "500": + application/json: {"key": "", "key1": "", "key2": ""} + "201": {} deleteLifecycleMilestone: speakeasy-default-delete-lifecycle-milestone: parameters: @@ -6466,7 +6754,8 @@ examples: responses: "400": application/json: {"key": "", "key1": "", "key2": ""} - "401": {} + "401": + application/json: {"key": "", "key1": "", "key2": ""} "404": {} "408": application/json: {"key": "", "key1": ""} @@ -6474,6 +6763,7 @@ examples: application/json: {"key": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "200": {} updateLifecycleMilestone: speakeasy-default-update-lifecycle-milestone: parameters: @@ -6486,30 +6776,41 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": "", "key2": ""} - "408": {} - "429": {} + "408": + application/json: {"key": "", "key1": ""} + "429": + application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} listLifecyclePhases: speakeasy-default-list-lifecycle-phases: responses: "404": application/json: {"key": ""} - "408": {} + "408": + application/json: {"key": ""} "429": application/json: {"key": ""} "500": application/json: {"key": ""} + "200": {} + "400": {} + "401": {} listPriorities: speakeasy-default-list-priorities: responses: "404": application/json: {"key": "", "key1": ""} - "408": {} + "408": + application/json: {"key": "", "key1": ""} "429": application/json: {"key": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} + "400": {} + "401": {} createPriority: speakeasy-default-create-priority: requestBody: @@ -6521,6 +6822,10 @@ examples: application/json: {"key": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "201": {} + "400": {} + "401": {} + "404": {} getPriority: speakeasy-default-get-priority: parameters: @@ -6533,9 +6838,13 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} - "429": {} - "500": {} + "408": + application/json: {"key": ""} + "429": + application/json: {"key": "", "key1": "", "key2": ""} + "500": + application/json: {"key": "", "key1": ""} + "200": {} deletePriority: speakeasy-default-delete-priority: parameters: @@ -6544,7 +6853,8 @@ examples: responses: "400": application/json: {"key": "", "key1": ""} - "401": {} + "401": + application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": ""} "408": @@ -6553,6 +6863,7 @@ examples: application/json: {"key": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} updatePriority: speakeasy-default-update-priority: parameters: @@ -6561,12 +6872,15 @@ examples: responses: "401": application/json: {"key": "", "key1": "", "key2": ""} - "404": {} + "404": + application/json: {"key": "", "key1": "", "key2": ""} "408": {} "429": application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} + "400": {} listSeverities: speakeasy-default-list-severities: responses: @@ -6576,11 +6890,13 @@ examples: application/json: {"key": ""} "404": application/json: {"key": ""} - "408": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} createSeverity: speakeasy-default-create-severity: requestBody: @@ -6588,12 +6904,15 @@ examples: responses: "400": application/json: {"key": "", "key1": ""} - "401": {} + "401": + application/json: {"key": "", "key1": ""} "404": {} "408": application/json: {"key": ""} "429": {} - "500": {} + "500": + application/json: {"key": ""} + "201": {} getSeverity: speakeasy-default-get-severity: parameters: @@ -6610,7 +6929,9 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": "", "key1": ""} - "500": {} + "500": + application/json: {"key": "", "key1": "", "key2": ""} + "200": {} deleteSeverity: speakeasy-default-delete-severity: parameters: @@ -6627,7 +6948,9 @@ examples: application/json: {"key": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} - "500": {} + "500": + application/json: {"key": ""} + "200": {} updateSeverity: speakeasy-default-update-severity: parameters: @@ -6646,6 +6969,7 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "200": {} getSeverityMatrix: speakeasy-default-get-severity-matrix: responses: @@ -6655,10 +6979,13 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "404": application/json: {"key": "", "key1": "", "key2": ""} - "408": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} - "500": {} + "500": + application/json: {"key": "", "key1": "", "key2": ""} + "200": {} updateSeverityMatrix: speakeasy-default-update-severity-matrix: requestBody: @@ -6674,6 +7001,8 @@ examples: application/json: {"key": ""} "500": application/json: {"key": ""} + "200": {} + "400": {} listSeverityMatrixConditions: speakeasy-default-list-severity-matrix-conditions: responses: @@ -6685,7 +7014,10 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} - "500": {} + "500": + application/json: {"key": "", "key1": ""} + "200": {} + "400": {} createSeverityMatrixCondition: speakeasy-default-create-severity-matrix-condition: requestBody: @@ -6695,11 +7027,14 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} + "408": + application/json: {"key": "", "key1": ""} "429": application/json: {"key": ""} "500": application/json: {"key": "", "key1": ""} + "201": {} + "400": {} getSeverityMatrixCondition: speakeasy-default-get-severity-matrix-condition: parameters: @@ -6730,9 +7065,12 @@ examples: application/json: {"key": "", "key1": ""} "408": application/json: {"key": ""} - "429": {} + "429": + application/json: {"key": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "200": {} + "400": {} updateSeverityMatrixCondition: speakeasy-default-update-severity-matrix-condition: parameters: @@ -6751,6 +7089,7 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} listSeverityMatrixImpacts: speakeasy-default-list-severity-matrix-impacts: responses: @@ -6758,12 +7097,15 @@ examples: application/json: {"key": "", "key1": ""} "401": application/json: {"key": "", "key1": ""} - "404": {} + "404": + application/json: {"key": "", "key1": ""} "408": application/json: {"key": ""} - "429": {} + "429": + application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} createSeverityMatrixImpact: speakeasy-default-create-severity-matrix-impact: requestBody: @@ -6773,12 +7115,15 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "401": application/json: {"key": ""} - "404": {} + "404": + application/json: {"key": "", "key1": "", "key2": ""} "408": application/json: {"key": "", "key1": ""} "429": application/json: {"key": "", "key1": ""} - "500": {} + "500": + application/json: {"key": ""} + "201": {} deleteSeverityMatrixImpact: speakeasy-default-delete-severity-matrix-impact: parameters: @@ -6791,9 +7136,12 @@ examples: application/json: {"key": "", "key1": ""} "408": application/json: {"key": ""} - "429": {} + "429": + application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} + "400": {} updateSeverityMatrixImpact: speakeasy-default-update-severity-matrix-impact: parameters: @@ -6812,18 +7160,21 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} listTicketingPriorities: speakeasy-default-list-ticketing-priorities: responses: "400": application/json: {"key": "", "key1": ""} - "401": {} + "401": + application/json: {"key": "", "key1": ""} "404": {} "408": application/json: {"key": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} "500": {} + "200": {} createTicketingPriority: speakeasy-default-create-ticketing-priority: requestBody: @@ -6841,6 +7192,7 @@ examples: application/json: {"key": ""} "500": application/json: {"key": ""} + "201": {} listEnvironments: speakeasy-default-list-environments: responses: @@ -6850,9 +7202,13 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} - "429": {} - "500": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} + "200": {} createEnvironment: speakeasy-default-create-environment: requestBody: @@ -6864,10 +7220,13 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": ""} - "408": {} - "429": {} + "408": + application/json: {"key": ""} + "429": + application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "201": {} getEnvironment: speakeasy-default-get-environment: parameters: @@ -6886,6 +7245,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} deleteEnvironment: speakeasy-default-delete-environment: parameters: @@ -6904,6 +7264,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} updateEnvironment: speakeasy-default-update-environment: parameters: @@ -6924,6 +7285,7 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "200": {} listFunctionalities: speakeasy-default-list-functionalities: responses: @@ -6933,9 +7295,13 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} - "429": {} - "500": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} + "200": {} createFunctionality: speakeasy-default-create-functionality: requestBody: @@ -6947,10 +7313,13 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": ""} - "408": {} - "429": {} + "408": + application/json: {"key": ""} + "429": + application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "201": {} getFunctionality: speakeasy-default-get-functionality: parameters: @@ -6969,6 +7338,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} deleteFunctionality: speakeasy-default-delete-functionality: parameters: @@ -6987,6 +7357,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} updateFunctionality: speakeasy-default-update-functionality: parameters: @@ -7005,6 +7376,7 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "200": {} getFunctionalityServices: speakeasy-default-get-functionality-services: parameters: @@ -7036,7 +7408,8 @@ examples: application/json: {"key": ""} "404": application/json: {"key": "", "key1": "", "key2": ""} - "408": {} + "408": + application/json: {"key": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} "500": @@ -7052,6 +7425,10 @@ examples: application/json: {"key": ""} "500": application/json: {"key": "", "key1": ""} + "201": {} + "400": {} + "401": {} + "404": {} deleteNuncSubscription: speakeasy-default-delete-nunc-subscription: parameters: @@ -7064,9 +7441,12 @@ examples: application/json: {"key": ""} "408": application/json: {"key": ""} - "429": {} + "429": + application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "200": {} + "400": {} listStatusPages: speakeasy-default-list-status-pages: responses: @@ -7076,9 +7456,13 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} - "429": {} - "500": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} + "200": {} createStatusPage: speakeasy-default-create-status-page: requestBody: @@ -7090,10 +7474,13 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": ""} - "408": {} - "429": {} + "408": + application/json: {"key": ""} + "429": + application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "201": {} getStatusPage: speakeasy-default-get-status-page: parameters: @@ -7112,6 +7499,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} updateStatusPage: speakeasy-default-update-status-page: parameters: @@ -7132,6 +7520,7 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "200": {} deleteStatusPage: speakeasy-default-delete-status-page: parameters: @@ -7150,6 +7539,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} createStatusPageComponentGroup: speakeasy-default-create-status-page-component-group: parameters: @@ -7164,9 +7554,12 @@ examples: application/json: {"key": "", "key1": ""} "408": application/json: {"key": "", "key1": ""} - "429": {} + "429": + application/json: {"key": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "201": {} + "400": {} deleteStatusPageComponentGroup: speakeasy-default-delete-status-page-component-group: parameters: @@ -7180,9 +7573,11 @@ examples: application/json: {"key": ""} "408": application/json: {"key": "", "key1": "", "key2": ""} - "429": {} + "429": + application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "400": {} updateStatusPageComponentGroup: speakeasy-default-update-status-page-component-group: parameters: @@ -7198,7 +7593,9 @@ examples: application/json: {"key": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} - "500": {} + "500": + application/json: {"key": "", "key1": "", "key2": ""} + "400": {} updateStatusPageImage: speakeasy-default-update-status-page-image: parameters: @@ -7212,11 +7609,13 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "404": application/json: {"key": "", "key1": "", "key2": ""} - "408": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} deleteStatusPageImage: speakeasy-default-delete-status-page-image: parameters: @@ -7236,6 +7635,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "200": {} createStatusPageLink: speakeasy-default-create-status-page-link: parameters: @@ -7246,13 +7646,15 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "401": application/json: {"key": "", "key1": ""} - "404": {} + "404": + application/json: {"key": "", "key1": "", "key2": ""} "408": application/json: {"key": "", "key1": ""} "429": application/json: {"key": ""} "500": application/json: {"key": "", "key1": ""} + "201": {} deleteStatusPageLink: speakeasy-default-delete-status-page-link: parameters: @@ -7264,7 +7666,8 @@ examples: application/json: {"key": "", "key1": ""} "401": application/json: {"key": "", "key1": "", "key2": ""} - "404": {} + "404": + application/json: {"key": "", "key1": ""} "408": application/json: {"key": ""} "429": @@ -7282,8 +7685,10 @@ examples: application/json: {"key": ""} "401": application/json: {"key": "", "key1": "", "key2": ""} - "404": {} - "408": {} + "404": + application/json: {"key": ""} + "408": + application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": ""} "500": @@ -7296,7 +7701,8 @@ examples: responses: "400": application/json: {"key": "", "key1": ""} - "401": {} + "401": + application/json: {"key": "", "key1": ""} "404": application/json: {"key": ""} "408": {} @@ -7304,6 +7710,7 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "200": {} createStatusPageSubscribers: speakeasy-default-create-status-page-subscribers: parameters: @@ -7318,11 +7725,13 @@ examples: application/json: {"key": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "201": {} deleteStatusPageSubscribers: speakeasy-default-delete-status-page-subscribers: parameters: @@ -7337,11 +7746,13 @@ examples: application/json: {"key": ""} "404": application/json: {"key": ""} - "408": {} + "408": + application/json: {"key": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "200": {} listIntegrations: speakeasy-default-list-integrations: responses: @@ -7351,9 +7762,12 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} - "429": {} - "500": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} listAwsCloudtrailBatches: speakeasy-default-list-aws-cloudtrail-batches: responses: @@ -7367,6 +7781,8 @@ examples: application/json: {"key": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} + "400": {} getAwsCloudTrailBatch: speakeasy-default-get-aws-cloud-trail-batch: parameters: @@ -7377,11 +7793,14 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "404": application/json: {"key": "", "key1": "", "key2": ""} - "408": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "200": {} + "400": {} updateAwsCloudTrailBatch: speakeasy-default-update-aws-cloud-trail-batch: parameters: @@ -7390,7 +7809,8 @@ examples: responses: "400": application/json: {"key": "", "key1": "", "key2": ""} - "401": {} + "401": + application/json: {"key": "", "key1": "", "key2": ""} "404": application/json: {"key": "", "key1": ""} "408": {} @@ -7398,6 +7818,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "200": {} getAwsCloudtrailBatchEvents: speakeasy-default-get-aws-cloudtrail-batch-events: parameters: @@ -7410,9 +7831,12 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} - "429": {} - "500": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} listAwsConnections: speakeasy-default-list-aws-connections: responses: @@ -7422,9 +7846,13 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} - "429": {} - "500": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} + "200": {} getAwsConnection: speakeasy-default-get-aws-connection: parameters: @@ -7443,6 +7871,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} updateAwsConnection: speakeasy-default-update-aws-connection: parameters: @@ -7451,9 +7880,14 @@ examples: responses: "408": application/json: {"key": "", "key1": "", "key2": ""} - "429": {} + "429": + application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} + "400": {} + "401": {} + "404": {} listConfluenceSpaces: speakeasy-default-list-confluence-spaces: parameters: @@ -7463,7 +7897,8 @@ examples: responses: "400": application/json: {"key": "", "key1": ""} - "401": {} + "401": + application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": "", "key2": ""} "408": @@ -7471,6 +7906,7 @@ examples: "429": {} "500": application/json: {"key": ""} + "200": {} listIntegrationConnections: speakeasy-default-list-integration-connections: responses: @@ -7482,7 +7918,8 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "408": application/json: {"key": "", "key1": "", "key2": ""} - "429": {} + "429": + application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": ""} createIntegrationConnection: @@ -7497,9 +7934,12 @@ examples: application/json: {"key": ""} "404": application/json: {"key": "", "key1": "", "key2": ""} - "408": {} - "429": {} - "500": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": ""} + "500": + application/json: {"key": "", "key1": "", "key2": ""} updateIntegrationConnection: speakeasy-default-update-integration-connection: parameters: @@ -7509,9 +7949,13 @@ examples: responses: "408": application/json: {"key": "", "key1": "", "key2": ""} - "429": {} + "429": + application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "400": {} + "401": {} + "404": {} refreshIntegrationConnection: speakeasy-default-refresh-integration-connection: parameters: @@ -7521,7 +7965,8 @@ examples: responses: "400": application/json: {"key": ""} - "401": {} + "401": + application/json: {"key": ""} "404": application/json: {"key": ""} "408": @@ -7542,11 +7987,13 @@ examples: application/json: {"key": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} + "408": + application/json: {"key": "", "key1": ""} "429": application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "200": {} getIntegrationFieldMapAvailableFields: speakeasy-default-get-integration-field-map-available-fields: parameters: @@ -7563,7 +8010,9 @@ examples: application/json: {"key": "", "key1": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} - "500": {} + "500": + application/json: {"key": "", "key1": ""} + "200": {} listSlackEmojiActions: speakeasy-default-list-slack-emoji-actions: parameters: @@ -7581,6 +8030,7 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": ""} + "400": {} createSlackEmojiAction: speakeasy-default-create-slack-emoji-action: parameters: @@ -7618,6 +8068,7 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "400": {} deleteSlackEmojiAction: speakeasy-default-delete-slack-emoji-action: parameters: @@ -7635,7 +8086,8 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} - "500": {} + "500": + application/json: {"key": "", "key1": "", "key2": ""} updateSlackEmojiAction: speakeasy-default-update-slack-emoji-action: parameters: @@ -7651,7 +8103,8 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "408": application/json: {"key": "", "key1": "", "key2": ""} - "429": {} + "429": + application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} getSlackWorkspaces: @@ -7668,8 +8121,10 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "408": application/json: {"key": "", "key1": ""} - "429": {} - "500": {} + "429": + application/json: {"key": ""} + "500": + application/json: {"key": ""} listSlackUsergroups: speakeasy-default-list-slack-usergroups: responses: @@ -7683,7 +8138,8 @@ examples: application/json: {"key": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} - "500": {} + "500": + application/json: {"key": "", "key1": "", "key2": ""} getIntegrationStatus: speakeasy-default-get-integration-status: parameters: @@ -7694,7 +8150,8 @@ examples: application/json: {"key": ""} "401": application/json: {"key": "", "key1": "", "key2": ""} - "404": {} + "404": + application/json: {"key": ""} "408": application/json: {"key": "", "key1": "", "key2": ""} "429": @@ -7712,9 +8169,11 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "408": application/json: {"key": "", "key1": "", "key2": ""} - "429": {} + "429": + application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} getStatuspageConnection: speakeasy-default-get-statuspage-connection: parameters: @@ -7723,13 +8182,15 @@ examples: responses: "400": application/json: {"key": "", "key1": ""} - "401": {} + "401": + application/json: {"key": "", "key1": ""} "404": {} "408": {} "429": application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "200": {} deleteStatuspageConnection: speakeasy-default-delete-statuspage-connection: parameters: @@ -7738,13 +8199,16 @@ examples: responses: "401": application/json: {"key": "", "key1": ""} - "404": {} + "404": + application/json: {"key": "", "key1": ""} "408": application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "200": {} + "400": {} updateStatuspageConnection: speakeasy-default-update-statuspage-connection: parameters: @@ -7753,9 +8217,14 @@ examples: responses: "408": application/json: {"key": "", "key1": "", "key2": ""} - "429": {} + "429": + application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} + "400": {} + "401": {} + "404": {} listStatuspagePages: speakeasy-default-list-statuspage-pages: parameters: @@ -7790,6 +8259,7 @@ examples: application/json: {"key": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "400": {} getIntegration: speakeasy-default-get-integration: parameters: @@ -7808,6 +8278,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} getTicketingPriority: speakeasy-default-get-ticketing-priority: parameters: @@ -7826,6 +8297,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} deleteTicketingPriority: speakeasy-default-delete-ticketing-priority: parameters: @@ -7834,7 +8306,8 @@ examples: responses: "400": application/json: {"key": "", "key1": ""} - "401": {} + "401": + application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": ""} "408": @@ -7843,6 +8316,7 @@ examples: application/json: {"key": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} updateTicketingPriority: speakeasy-default-update-ticketing-priority: parameters: @@ -7851,24 +8325,29 @@ examples: responses: "401": application/json: {"key": "", "key1": "", "key2": ""} - "404": {} + "404": + application/json: {"key": "", "key1": "", "key2": ""} "408": {} "429": application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} + "400": {} listTicketingProjects: speakeasy-default-list-ticketing-projects: responses: "400": application/json: {"key": "", "key1": "", "key2": ""} - "401": {} + "401": + application/json: {"key": "", "key1": "", "key2": ""} "404": {} "408": application/json: {"key": "", "key1": ""} "429": application/json: {"key": ""} "500": {} + "200": {} getTicketingProject: speakeasy-default-get-ticketing-project: parameters: @@ -7887,6 +8366,7 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "200": {} getTicketingProjectConfigurationOptions: speakeasy-default-get-ticketing-project-configuration-options: parameters: @@ -7899,9 +8379,11 @@ examples: application/json: {"key": "", "key1": ""} "408": application/json: {"key": ""} - "429": {} + "429": + application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "400": {} getTicketingProjectFieldOptions: speakeasy-default-get-ticketing-project-field-options: parameters: @@ -7929,11 +8411,15 @@ examples: responses: "404": application/json: {"key": "", "key1": "", "key2": ""} - "408": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "201": {} + "400": {} + "401": {} getTicketingProjectAvailableFields: speakeasy-default-get-ticketing-project-available-fields: parameters: @@ -7952,6 +8438,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} getTicketingProjectFieldMap: speakeasy-default-get-ticketing-project-field-map: parameters: @@ -7967,9 +8454,11 @@ examples: application/json: {"key": ""} "408": application/json: {"key": ""} - "429": {} + "429": + application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "200": {} deleteTicketingProjectFieldMap: speakeasy-default-delete-ticketing-project-field-map: parameters: @@ -7983,7 +8472,8 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": "", "key2": ""} - "408": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": ""} "500": @@ -7997,7 +8487,8 @@ examples: responses: "400": application/json: {"key": ""} - "401": {} + "401": + application/json: {"key": ""} "404": application/json: {"key": "", "key1": ""} "408": @@ -8006,6 +8497,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "200": {} createTicketingProjectConfiguration: speakeasy-default-create-ticketing-project-configuration: parameters: @@ -8018,10 +8510,13 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": ""} - "408": {} - "429": {} + "408": + application/json: {"key": ""} + "429": + application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "201": {} getTicketingProjectConfig: speakeasy-default-get-ticketing-project-config: parameters: @@ -8041,6 +8536,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} deleteTicketingProjectConfig: speakeasy-default-delete-ticketing-project-config: parameters: @@ -8052,13 +8548,15 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "401": application/json: {"key": "", "key1": "", "key2": ""} - "404": {} + "404": + application/json: {"key": "", "key1": "", "key2": ""} "408": application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "200": {} updateTicketingProjectConfig: speakeasy-default-update-ticketing-project-config: parameters: @@ -8072,11 +8570,13 @@ examples: application/json: {"key": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} listTicketTags: speakeasy-default-list-ticket-tags: responses: @@ -8088,9 +8588,11 @@ examples: application/json: {"key": "", "key1": ""} "408": application/json: {"key": "", "key1": "", "key2": ""} - "429": {} + "429": + application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} getTicket: speakeasy-default-get-ticket: parameters: @@ -8103,11 +8605,13 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "404": application/json: {"key": ""} - "408": {} + "408": + application/json: {"key": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "200": {} deleteTicket: speakeasy-default-delete-ticket: parameters: @@ -8144,6 +8648,7 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "200": {} listMeasurementDefinitions: speakeasy-default-list-measurement-definitions: responses: @@ -8151,10 +8656,13 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": "", "key2": ""} - "408": {} + "408": + application/json: {"key": "", "key1": ""} "429": application/json: {"key": ""} - "500": {} + "500": + application/json: {"key": "", "key1": "", "key2": ""} + "400": {} createMeasurementDefinition: speakeasy-default-create-measurement-definition: requestBody: @@ -8184,8 +8692,11 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "408": application/json: {"key": ""} - "429": {} - "500": {} + "429": + application/json: {"key": "", "key1": "", "key2": ""} + "500": + application/json: {"key": "", "key1": "", "key2": ""} + "400": {} deleteMeasurementDefinition: speakeasy-default-delete-measurement-definition: parameters: @@ -8198,10 +8709,12 @@ examples: application/json: {"key": ""} "404": application/json: {"key": ""} - "408": {} + "408": + application/json: {"key": "", "key1": ""} "429": application/json: {"key": ""} - "500": {} + "500": + application/json: {"key": ""} updateMeasurementDefinition: speakeasy-default-update-measurement-definition: parameters: @@ -8210,7 +8723,8 @@ examples: responses: "400": application/json: {"key": "", "key1": ""} - "401": {} + "401": + application/json: {"key": "", "key1": ""} "404": {} "408": {} "429": @@ -8224,13 +8738,15 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "401": application/json: {"key": ""} - "404": {} + "404": + application/json: {"key": "", "key1": "", "key2": ""} "408": application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": ""} "500": application/json: {"key": ""} + "200": {} getMilestoneFunnelMetrics: speakeasy-default-get-milestone-funnel-metrics: responses: @@ -8240,16 +8756,20 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} - "429": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "200": {} listRetrospectiveMetrics: speakeasy-default-list-retrospective-metrics: responses: "400": application/json: {"key": "", "key1": "", "key2": ""} - "401": {} + "401": + application/json: {"key": "", "key1": "", "key2": ""} "404": application/json: {"key": "", "key1": ""} "408": @@ -8258,6 +8778,7 @@ examples: application/json: {"key": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} getTicketFunnelMetrics: speakeasy-default-get-ticket-funnel-metrics: responses: @@ -8267,11 +8788,13 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": ""} - "408": {} + "408": + application/json: {"key": "", "key1": ""} "429": application/json: {"key": ""} "500": application/json: {"key": ""} + "200": {} listUserInvolvementMetrics: speakeasy-default-list-user-involvement-metrics: responses: @@ -8281,8 +8804,12 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "408": application/json: {"key": ""} - "429": {} - "500": {} + "429": + application/json: {"key": "", "key1": "", "key2": ""} + "500": + application/json: {"key": "", "key1": "", "key2": ""} + "200": {} + "400": {} listInfrastructureMetrics: speakeasy-default-list-infrastructure-metrics: parameters: @@ -8292,7 +8819,8 @@ examples: responses: "400": application/json: {"key": "", "key1": ""} - "401": {} + "401": + application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": "", "key2": ""} "408": @@ -8301,6 +8829,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} getInfrastructureMetrics: speakeasy-default-get-infrastructure-metrics: parameters: @@ -8313,18 +8842,26 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "200": {} + "400": {} getMeanTimeReport: speakeasy-default-get-mean-time-report: responses: "408": application/json: {"key": "", "key1": "", "key2": ""} - "429": {} + "429": + application/json: {"key": "", "key1": "", "key2": ""} "500": {} + "200": {} + "400": {} + "401": {} + "404": {} listSavedSearches: speakeasy-default-list-saved-searches: parameters: @@ -8336,13 +8873,15 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "401": application/json: {"key": "", "key1": "", "key2": ""} - "404": {} + "404": + application/json: {"key": "", "key1": "", "key2": ""} "408": application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} createSavedSearch: speakeasy-default-create-saved-search: parameters: @@ -8359,18 +8898,24 @@ examples: application/json: {"key": "", "key1": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} - "500": {} + "500": + application/json: {"key": "", "key1": ""} + "201": {} + "400": {} listRetrospectiveQuestions: speakeasy-default-list-retrospective-questions: responses: "401": application/json: {"key": "", "key1": ""} - "404": {} + "404": + application/json: {"key": "", "key1": ""} "408": {} "429": application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} + "400": {} updateRetrospectiveQuestions: speakeasy-default-update-retrospective-questions: responses: @@ -8386,6 +8931,7 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "200": {} getRetrospectiveQuestion: speakeasy-default-get-retrospective-question: parameters: @@ -8394,19 +8940,22 @@ examples: responses: "400": application/json: {"key": "", "key1": ""} - "401": {} + "401": + application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": ""} "408": application/json: {"key": "", "key1": "", "key2": ""} "429": {} - "500": {} + "500": + application/json: {"key": "", "key1": ""} listRetrospectiveReports: speakeasy-default-list-retrospective-reports: responses: "400": application/json: {"key": ""} - "401": {} + "401": + application/json: {"key": ""} "404": application/json: {"key": "", "key1": ""} "408": @@ -8414,6 +8963,7 @@ examples: "429": {} "500": application/json: {"key": ""} + "200": {} createRetrospectiveReport: speakeasy-default-create-retrospective-report: requestBody: @@ -8423,12 +8973,15 @@ examples: application/json: {"key": ""} "401": application/json: {"key": "", "key1": "", "key2": ""} - "404": {} - "408": {} + "404": + application/json: {"key": ""} + "408": + application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "201": {} getPostMortemReport: speakeasy-default-get-post-mortem-report: parameters: @@ -8441,9 +8994,12 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "408": application/json: {"key": "", "key1": ""} - "429": {} + "429": + application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} + "400": {} updatePostMortemReport: speakeasy-default-update-post-mortem-report: parameters: @@ -8452,7 +9008,8 @@ examples: responses: "400": application/json: {"key": "", "key1": ""} - "401": {} + "401": + application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": "", "key2": ""} "408": @@ -8461,6 +9018,7 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "200": {} updateRetrospectiveField: speakeasy-default-update-retrospective-field: parameters: @@ -8480,7 +9038,9 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": "", "key1": ""} - "500": {} + "500": + application/json: {"key": "", "key1": "", "key2": ""} + "200": {} publishRetrospectiveReport: speakeasy-default-publish-retrospective-report: parameters: @@ -8499,6 +9059,8 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "201": {} + "400": {} listRetrospectiveReportReasons: speakeasy-default-list-retrospective-report-reasons: parameters: @@ -8512,10 +9074,13 @@ examples: application/json: {"key": ""} "404": application/json: {"key": "", "key1": "", "key2": ""} - "408": {} + "408": + application/json: {"key": "", "key1": ""} "429": application/json: {"key": "", "key1": ""} - "500": {} + "500": + application/json: {"key": ""} + "200": {} createRetrospectiveReportReason: speakeasy-default-create-retrospective-report-reason: parameters: @@ -8536,6 +9101,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "201": {} updateRetrospectiveReportReasonOrder: speakeasy-default-update-retrospective-report-reason-order: parameters: @@ -8548,13 +9114,15 @@ examples: application/json: {"key": "", "key1": ""} "401": application/json: {"key": "", "key1": ""} - "404": {} + "404": + application/json: {"key": "", "key1": ""} "408": application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} deleteRetrospectiveReason: speakeasy-default-delete-retrospective-reason: parameters: @@ -8566,9 +9134,13 @@ examples: application/json: {"key": ""} "408": application/json: {"key": ""} - "429": {} + "429": + application/json: {"key": ""} "500": application/json: {"key": ""} + "200": {} + "400": {} + "401": {} updateRetrospectiveReason: speakeasy-default-update-retrospective-reason: parameters: @@ -8582,21 +9154,26 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "404": application/json: {"key": ""} - "408": {} - "429": {} + "408": + application/json: {"key": "", "key1": ""} + "429": + application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} listRunbookAudits: speakeasy-default-list-runbook-audits: responses: "401": application/json: {"key": "", "key1": "", "key2": ""} - "404": {} + "404": + application/json: {"key": "", "key1": "", "key2": ""} "408": application/json: {"key": "", "key1": ""} "429": application/json: {"key": "", "key1": ""} "500": {} + "400": {} listRunbooks: speakeasy-default-list-runbooks: responses: @@ -8604,11 +9181,15 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "401": application/json: {"key": "", "key1": ""} - "404": + "404": + application/json: {"key": "", "key1": ""} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": application/json: {"key": "", "key1": ""} - "408": {} - "429": {} - "500": {} + "200": {} createRunbook: speakeasy-default-create-runbook: requestBody: @@ -8620,10 +9201,13 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": ""} - "408": {} - "429": {} + "408": + application/json: {"key": ""} + "429": + application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "201": {} listRunbookActions: speakeasy-default-list-runbook-actions: responses: @@ -8631,9 +9215,13 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "408": application/json: {"key": "", "key1": ""} - "429": {} + "429": + application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} + "400": {} + "401": {} listRunbookExecutions: speakeasy-default-list-runbook-executions: responses: @@ -8645,7 +9233,10 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} - "500": {} + "500": + application/json: {"key": "", "key1": "", "key2": ""} + "200": {} + "400": {} createRunbookExecution: speakeasy-default-create-runbook-execution: requestBody: @@ -8653,13 +9244,16 @@ examples: responses: "400": application/json: {"key": "", "key1": "", "key2": ""} - "401": {} + "401": + application/json: {"key": "", "key1": "", "key2": ""} "404": application/json: {"key": ""} "408": {} "429": application/json: {"key": ""} - "500": {} + "500": + application/json: {"key": ""} + "201": {} getRunbookExecution: speakeasy-default-get-runbook-execution: parameters: @@ -8668,13 +9262,16 @@ examples: responses: "400": application/json: {"key": "", "key1": ""} - "401": {} + "401": + application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": ""} "408": application/json: {"key": ""} "429": {} - "500": {} + "500": + application/json: {"key": "", "key1": ""} + "200": {} deleteRunbookExecution: speakeasy-default-delete-runbook-execution: parameters: @@ -8708,10 +9305,14 @@ examples: application/json: {"key": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} + "408": + application/json: {"key": ""} "429": application/json: {"key": ""} - "500": {} + "500": + application/json: {"key": "", "key1": ""} + "200": {} + "400": {} getRunbookExecutionStepScript: speakeasy-default-get-runbook-execution-step-script: parameters: @@ -8723,13 +9324,15 @@ examples: application/json: {"key": "", "key1": ""} "401": application/json: {"key": "", "key1": "", "key2": ""} - "404": {} + "404": + application/json: {"key": "", "key1": ""} "408": application/json: {"key": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} updateRunbookExecutionStepScriptState: speakeasy-default-update-runbook-execution-step-script-state: parameters: @@ -8740,7 +9343,8 @@ examples: responses: "400": application/json: {"key": "", "key1": "", "key2": ""} - "401": {} + "401": + application/json: {"key": "", "key1": "", "key2": ""} "404": application/json: {"key": "", "key1": "", "key2": ""} "408": @@ -8749,6 +9353,7 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} updateRunbookExecutionStepVotes: speakeasy-default-update-runbook-execution-step-votes: parameters: @@ -8764,6 +9369,10 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "200": {} + "400": {} + "401": {} + "404": {} getRunbookStepVoteStatus: speakeasy-default-get-runbook-step-vote-status: parameters: @@ -8773,7 +9382,8 @@ examples: responses: "400": application/json: {"key": "", "key1": ""} - "401": {} + "401": + application/json: {"key": "", "key1": ""} "404": application/json: {"key": ""} "408": @@ -8782,6 +9392,7 @@ examples: application/json: {"key": ""} "500": application/json: {"key": ""} + "200": {} updateRunbookExecutionVotes: speakeasy-default-update-runbook-execution-votes: parameters: @@ -8802,6 +9413,7 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "200": {} getRunbookExecutionVoteStatus: speakeasy-default-get-runbook-execution-vote-status: parameters: @@ -8816,9 +9428,11 @@ examples: application/json: {"key": ""} "408": application/json: {"key": "", "key1": "", "key2": ""} - "429": {} + "429": + application/json: {"key": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} getRunbookSelectOptions: speakeasy-default-get-runbook-select-options: parameters: @@ -8832,10 +9446,12 @@ examples: application/json: {"key": ""} "401": application/json: {"key": "", "key1": "", "key2": ""} - "404": {} + "404": + application/json: {"key": ""} "408": application/json: {"key": ""} - "429": {} + "429": + application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": ""} getRunbook: @@ -8856,6 +9472,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} updateRunbook: speakeasy-default-update-runbook: parameters: @@ -8874,6 +9491,7 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "200": {} deleteRunbook: speakeasy-default-delete-runbook: parameters: @@ -8892,6 +9510,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} listSchedules: speakeasy-default-list-schedules: responses: @@ -8901,11 +9520,13 @@ examples: application/json: {"key": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "200": {} listTeams: speakeasy-default-list-teams: responses: @@ -8915,9 +9536,13 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} - "429": {} - "500": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} + "200": {} createTeam: speakeasy-default-create-team: requestBody: @@ -8929,10 +9554,13 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": ""} - "408": {} - "429": {} + "408": + application/json: {"key": ""} + "429": + application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "201": {} getTeam: speakeasy-default-get-team: parameters: @@ -8952,6 +9580,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} archiveTeam: speakeasy-default-archive-team: parameters: @@ -8966,9 +9595,11 @@ examples: application/json: {"key": ""} "408": application/json: {"key": "", "key1": "", "key2": ""} - "429": {} + "429": + application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} updateTeam: speakeasy-default-update-team: parameters: @@ -8987,6 +9618,7 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "200": {} listTeamOnCallSchedules: speakeasy-default-list-team-on-call-schedules: parameters: @@ -8998,7 +9630,8 @@ examples: application/json: {"key": "", "key1": ""} "401": application/json: {"key": "", "key1": "", "key2": ""} - "404": {} + "404": + application/json: {"key": "", "key1": ""} "408": application/json: {"key": "", "key1": "", "key2": ""} "429": @@ -9015,7 +9648,8 @@ examples: responses: "400": application/json: {"key": ""} - "401": {} + "401": + application/json: {"key": ""} "404": {} "408": application/json: {"key": "", "key1": "", "key2": ""} @@ -9060,7 +9694,8 @@ examples: application/json: {"key": ""} "429": application/json: {"key": ""} - "500": {} + "500": + application/json: {"key": "", "key1": "", "key2": ""} updateTeamScheduleShift: speakeasy-default-update-team-schedule-shift: parameters: @@ -9071,24 +9706,28 @@ examples: responses: "401": application/json: {"key": "", "key1": "", "key2": ""} - "404": {} + "404": + application/json: {"key": "", "key1": "", "key2": ""} "408": application/json: {"key": ""} "429": {} "500": application/json: {"key": ""} + "400": {} getScimGroups: speakeasy-default-get-scim-groups: responses: "400": application/json: {"key": ""} - "401": {} + "401": + application/json: {"key": ""} "404": application/json: {"key": ""} "408": application/json: {"key": ""} "429": {} - "500": {} + "500": + application/json: {"key": ""} createScimGroup: speakeasy-default-create-scim-group: requestBody: @@ -9100,8 +9739,10 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": ""} - "408": {} - "429": {} + "408": + application/json: {"key": ""} + "429": + application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} getScimGroup: @@ -9116,7 +9757,8 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} "500": @@ -9135,10 +9777,12 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "404": application/json: {"key": ""} - "408": {} + "408": + application/json: {"key": ""} "429": application/json: {"key": ""} - "500": {} + "500": + application/json: {"key": "", "key1": "", "key2": ""} deleteScimGroup: speakeasy-default-delete-scim-group: parameters: @@ -9147,16 +9791,20 @@ examples: responses: "404": application/json: {"key": "", "key1": ""} - "408": {} + "408": + application/json: {"key": "", "key1": ""} "429": application/json: {"key": "", "key1": ""} "500": {} + "400": {} + "401": {} getScimUsers: speakeasy-default-get-scim-users: responses: "400": application/json: {"key": "", "key1": ""} - "401": {} + "401": + application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": "", "key2": ""} "408": @@ -9172,7 +9820,8 @@ examples: responses: "400": application/json: {"key": "", "key1": ""} - "401": {} + "401": + application/json: {"key": "", "key1": ""} "404": {} "408": application/json: {"key": ""} @@ -9187,7 +9836,8 @@ examples: responses: "400": application/json: {"key": "", "key1": ""} - "401": {} + "401": + application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": "", "key2": ""} "408": @@ -9206,7 +9856,8 @@ examples: application/json: {"key": ""} "401": application/json: {"key": "", "key1": ""} - "404": {} + "404": + application/json: {"key": ""} "408": application/json: {"key": ""} "429": @@ -9227,7 +9878,8 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "408": application/json: {"key": "", "key1": ""} - "429": {} + "429": + application/json: {"key": ""} "500": application/json: {"key": "", "key1": ""} updateScimUser: @@ -9248,6 +9900,7 @@ examples: application/json: {"key": ""} "500": application/json: {"key": ""} + "400": {} getSignalGroupedMetrics: speakeasy-default-get-signal-grouped-metrics: responses: @@ -9255,7 +9908,8 @@ examples: application/json: {"key": ""} "401": application/json: {"key": "", "key1": ""} - "404": {} + "404": + application/json: {"key": ""} "408": application/json: {"key": ""} "429": @@ -9269,11 +9923,13 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": "", "key2": ""} - "408": {} + "408": + application/json: {"key": "", "key1": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "400": {} getSignalsAnalyticsTimeseries: speakeasy-default-get-signals-analytics-timeseries: responses: @@ -9285,7 +9941,8 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "408": application/json: {"key": "", "key1": "", "key2": ""} - "429": {} + "429": + application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} debugSignal: @@ -9295,13 +9952,15 @@ examples: responses: "401": application/json: {"key": "", "key1": "", "key2": ""} - "404": {} + "404": + application/json: {"key": "", "key1": "", "key2": ""} "408": application/json: {"key": "", "key1": ""} "429": application/json: {"key": ""} "500": application/json: {"key": "", "key1": ""} + "400": {} listSignalEmailTargets: speakeasy-default-list-signal-email-targets: responses: @@ -9311,7 +9970,8 @@ examples: application/json: {"key": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} + "408": + application/json: {"key": ""} "429": application/json: {"key": ""} "500": @@ -9323,7 +9983,8 @@ examples: responses: "400": application/json: {"key": "", "key1": "", "key2": ""} - "401": {} + "401": + application/json: {"key": "", "key1": "", "key2": ""} "404": application/json: {"key": ""} "408": @@ -9345,7 +10006,8 @@ examples: application/json: {"key": "", "key1": ""} "408": application/json: {"key": "", "key1": ""} - "429": {} + "429": + application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} deleteSignalEmailTarget: @@ -9358,7 +10020,8 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "401": application/json: {"key": "", "key1": "", "key2": ""} - "404": {} + "404": + application/json: {"key": "", "key1": "", "key2": ""} "408": application/json: {"key": "", "key1": "", "key2": ""} "429": @@ -9375,11 +10038,13 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "404": application/json: {"key": "", "key1": "", "key2": ""} - "408": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} "429": application/json: {"key": ""} "500": application/json: {"key": "", "key1": ""} + "400": {} listSignalEventSources: speakeasy-default-list-signal-event-sources: responses: @@ -9389,9 +10054,11 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "408": application/json: {"key": "", "key1": "", "key2": ""} - "429": {} + "429": + application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "400": {} getSignalIngestUrl: speakeasy-default-get-signal-ingest-url: responses: @@ -9403,9 +10070,11 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "408": application/json: {"key": ""} - "429": {} + "429": + application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "200": {} listSignalTransposers: speakeasy-default-list-signal-transposers: responses: @@ -9417,12 +10086,15 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "400": {} + "401": {} listSignalWebhookTargets: speakeasy-default-list-signal-webhook-targets: responses: "400": application/json: {"key": ""} - "401": {} + "401": + application/json: {"key": ""} "404": {} "408": application/json: {"key": ""} @@ -9436,7 +10108,8 @@ examples: responses: "400": application/json: {"key": "", "key1": "", "key2": ""} - "401": {} + "401": + application/json: {"key": "", "key1": "", "key2": ""} "404": application/json: {"key": "", "key1": ""} "408": {} @@ -9452,7 +10125,8 @@ examples: responses: "400": application/json: {"key": ""} - "401": {} + "401": + application/json: {"key": ""} "404": application/json: {"key": ""} "408": @@ -9468,11 +10142,14 @@ examples: responses: "404": application/json: {"key": "", "key1": ""} - "408": {} + "408": + application/json: {"key": "", "key1": ""} "429": application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "400": {} + "401": {} updateSignalsWebhookTarget: speakeasy-default-update-signals-webhook-target: parameters: @@ -9500,8 +10177,11 @@ examples: application/json: {"key": "", "key1": ""} "408": application/json: {"key": ""} - "429": {} - "500": {} + "429": + application/json: {"key": ""} + "500": + application/json: {"key": "", "key1": ""} + "400": {} listTeamEscalationPolicies: speakeasy-default-list-team-escalation-policies: parameters: @@ -9550,7 +10230,8 @@ examples: responses: "400": application/json: {"key": ""} - "401": {} + "401": + application/json: {"key": ""} "404": {} "408": application/json: {"key": "", "key1": ""} @@ -9566,13 +10247,15 @@ examples: responses: "400": application/json: {"key": ""} - "401": {} + "401": + application/json: {"key": ""} "404": application/json: {"key": ""} "408": {} "429": application/json: {"key": ""} - "500": {} + "500": + application/json: {"key": ""} updateTeamEscalationPolicy: speakeasy-default-update-team-escalation-policy: parameters: @@ -9586,8 +10269,10 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "404": application/json: {"key": ""} - "408": {} - "429": {} + "408": + application/json: {"key": "", "key1": ""} + "429": + application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} getTeamOnCallSchedule: @@ -9599,7 +10284,8 @@ examples: responses: "400": application/json: {"key": "", "key1": ""} - "401": {} + "401": + application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": ""} "408": @@ -9638,11 +10324,13 @@ examples: application/json: {"key": ""} "404": application/json: {"key": ""} - "408": {} + "408": + application/json: {"key": ""} "429": application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "400": {} createTeamOnCallScheduleShift: speakeasy-default-create-team-on-call-schedule-shift: parameters: @@ -9673,13 +10361,15 @@ examples: responses: "401": application/json: {"key": ""} - "404": {} + "404": + application/json: {"key": ""} "408": application/json: {"key": ""} "429": application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "400": {} createTeamSignalRule: speakeasy-default-create-team-signal-rule: parameters: @@ -9692,8 +10382,10 @@ examples: application/json: {"key": "", "key1": ""} "401": application/json: {"key": "", "key1": "", "key2": ""} - "404": {} - "408": {} + "404": + application/json: {"key": "", "key1": ""} + "408": + application/json: {"key": "", "key1": "", "key2": ""} "429": {} "500": application/json: {"key": "", "key1": "", "key2": ""} @@ -9729,7 +10421,8 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} + "408": + application/json: {"key": "", "key1": ""} "429": application/json: {"key": "", "key1": "", "key2": ""} "500": @@ -9749,14 +10442,17 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "408": application/json: {"key": "", "key1": "", "key2": ""} - "429": {} - "500": {} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": "", "key2": ""} listStatusUpdateTemplates: speakeasy-default-list-status-update-templates: responses: "400": application/json: {"key": ""} - "401": {} + "401": + application/json: {"key": ""} "404": application/json: {"key": "", "key1": ""} "408": @@ -9765,6 +10461,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "200": {} createStatusUpdateTemplate: speakeasy-default-create-status-update-template: requestBody: @@ -9776,10 +10473,13 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": ""} - "408": {} - "429": {} + "408": + application/json: {"key": ""} + "429": + application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "201": {} getStatusUpdateTemplate: speakeasy-default-get-status-update-template: parameters: @@ -9794,6 +10494,9 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "200": {} + "400": {} + "401": {} deleteStatusUpdateTemplate: speakeasy-default-delete-status-update-template: parameters: @@ -9802,11 +10505,15 @@ examples: responses: "401": application/json: {"key": "", "key1": ""} - "404": {} + "404": + application/json: {"key": "", "key1": ""} "408": application/json: {"key": ""} "429": {} - "500": {} + "500": + application/json: {"key": ""} + "200": {} + "400": {} updateStatusUpdateTemplate: speakeasy-default-update-status-update-template: parameters: @@ -9823,6 +10530,8 @@ examples: application/json: {"key": ""} "500": application/json: {"key": "", "key1": ""} + "200": {} + "400": {} listWebhooks: speakeasy-default-list-webhooks: responses: @@ -9832,9 +10541,13 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": "", "key1": ""} - "408": {} - "429": {} - "500": {} + "408": + application/json: {"key": "", "key1": "", "key2": ""} + "429": + application/json: {"key": "", "key1": ""} + "500": + application/json: {"key": "", "key1": ""} + "200": {} createWebhook: speakeasy-default-create-webhook: requestBody: @@ -9846,10 +10559,13 @@ examples: application/json: {"key": "", "key1": ""} "404": application/json: {"key": ""} - "408": {} - "429": {} + "408": + application/json: {"key": ""} + "429": + application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": "", "key2": ""} + "201": {} getWebhook: speakeasy-default-get-webhook: parameters: @@ -9868,6 +10584,7 @@ examples: application/json: {"key": "", "key1": "", "key2": ""} "500": application/json: {"key": ""} + "200": {} deleteWebhook: speakeasy-default-delete-webhook: parameters: @@ -9904,6 +10621,7 @@ examples: application/json: {"key": "", "key1": ""} "500": application/json: {"key": ""} + "200": {} listWebhookDeliveries: speakeasy-default-list-webhook-deliveries: parameters: @@ -9914,10 +10632,12 @@ examples: application/json: {"key": ""} "401": application/json: {"key": "", "key1": ""} - "404": {} + "404": + application/json: {"key": ""} "408": application/json: {"key": "", "key1": ""} "429": application/json: {"key": "", "key1": ""} "500": application/json: {"key": "", "key1": ""} +generatedTests: {} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index c864948..faedc46 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -13,7 +13,7 @@ generation: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: false go: - version: 0.5.0 + version: 0.6.0 additionalDependencies: {} allowUnknownFieldsInWeakUnions: false clientServerStatusCodesAsErrors: true diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 1594f48..ab31d39 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.435.1 +speakeasyVersion: 1.453.4 sources: FireHydrant-OAS: sourceNamespace: fire-hydrant-oas @@ -8,18 +8,20 @@ sources: - latest firehydrant-oas: sourceNamespace: firehydrant-oas - sourceRevisionDigest: sha256:f987be326ac23417400c5e13a4c9b4e41973f12c33bf73c36941527f9b4d75f7 - sourceBlobDigest: sha256:e5611e93d696db2ca4d040d096bf1a801fae0048aecdde53f29830f79fb44c8b + sourceRevisionDigest: sha256:47078a69e750e378ee886087d9a2c69015229ab9f8444ec6e11922c251dbd203 + sourceBlobDigest: sha256:f6ffe4d71cbc8f195cf28218fe7c5a6212053a7fa58a4e0aa275374cfcf3c675 tags: - latest + - speakeasy-sdk-regen-1732580847 + - 0.0.1 targets: fire-hydrant: source: firehydrant-oas sourceNamespace: firehydrant-oas - sourceRevisionDigest: sha256:f987be326ac23417400c5e13a4c9b4e41973f12c33bf73c36941527f9b4d75f7 - sourceBlobDigest: sha256:e5611e93d696db2ca4d040d096bf1a801fae0048aecdde53f29830f79fb44c8b - codeSamplesNamespace: firehydrant-oas-code-samples - codeSamplesRevisionDigest: sha256:3673246d776dd3638fa000159a2e235af8c4eb72b02634bcb853dfd6e91d5338 + sourceRevisionDigest: sha256:47078a69e750e378ee886087d9a2c69015229ab9f8444ec6e11922c251dbd203 + sourceBlobDigest: sha256:f6ffe4d71cbc8f195cf28218fe7c5a6212053a7fa58a4e0aa275374cfcf3c675 + codeSamplesNamespace: firehydrant-oas-go-code-samples + codeSamplesRevisionDigest: sha256:6ffb449404f9c1bd064a3311d7a9d8023326ebc98398b6bca551dfbadf0a1ca8 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest @@ -29,6 +31,7 @@ workflow: - location: ./openapi.yaml overlays: - location: .speakeasy/speakeasy-modifications-overlay.yaml + - location: errors-overlay.yaml registry: location: registry.speakeasyapi.dev/firehydrant/firehydrant/firehydrant-oas targets: @@ -37,5 +40,5 @@ workflow: source: firehydrant-oas codeSamples: registry: - location: registry.speakeasyapi.dev/firehydrant/firehydrant/firehydrant-oas-code-samples + location: registry.speakeasyapi.dev/firehydrant/firehydrant/firehydrant-oas-go-code-samples blocking: false diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml index 24b6838..14e2ca7 100644 --- a/.speakeasy/workflow.yaml +++ b/.speakeasy/workflow.yaml @@ -15,5 +15,5 @@ targets: source: firehydrant-oas codeSamples: registry: - location: registry.speakeasyapi.dev/firehydrant/firehydrant/firehydrant-oas-code-samples + location: registry.speakeasyapi.dev/firehydrant/firehydrant/firehydrant-oas-go-code-samples blocking: false diff --git a/README.md b/README.md index 0e66f60..a08ef13 100644 --- a/README.md +++ b/README.md @@ -16,23 +16,26 @@ ## Table of Contents + + * [SDK Installation](#sdk-installation) + * [Authentication](#authentication) + * [SDK Example Usage](#sdk-example-usage) + * [Available Resources and Operations](#available-resources-and-operations) + * [Retries](#retries) + * [Error Handling](#error-handling) + * [Server Selection](#server-selection) + * [Custom HTTP Client](#custom-http-client) + * [Special Types](#special-types) +* [Development](#development) + * [Maturity](#maturity) + * [Contributions](#contributions) -* [SDK Installation](#sdk-installation) -* [SDK Example Usage](#sdk-example-usage) -* [Available Resources and Operations](#available-resources-and-operations) -* [Retries](#retries) -* [Error Handling](#error-handling) -* [Server Selection](#server-selection) -* [Custom HTTP Client](#custom-http-client) -* [Authentication](#authentication) -* [Special Types](#special-types) ## SDK Installation To add the SDK as a dependency to your project: - ```bash go get github.com/speakeasy-sdks/firehydrant-go-sdk ``` diff --git a/RELEASES.md b/RELEASES.md new file mode 100644 index 0000000..3cf4ca6 --- /dev/null +++ b/RELEASES.md @@ -0,0 +1,11 @@ + + +## 2024-12-09 00:29:35 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.453.4 (2.474.6) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.6.0] . +### Releases +- [Go v0.6.0] https://github.com/speakeasy-sdks/firehydrant-go-sdk/releases/tag/v0.6.0 - . \ No newline at end of file diff --git a/accountsettings.go b/accountsettings.go index eaf588a..d8ce184 100644 --- a/accountsettings.go +++ b/accountsettings.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" "net/url" ) @@ -106,7 +106,11 @@ func (s *AccountSettings) GetAiPreferences(ctx context.Context, opts ...operatio req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -456,7 +460,11 @@ func (s *AccountSettings) UpdateAiPreferences(ctx context.Context, request *oper req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -811,7 +819,11 @@ func (s *AccountSettings) VoteOnIncidentSummary(ctx context.Context, incidentID req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1134,7 +1146,11 @@ func (s *AccountSettings) GetBootstrap(ctx context.Context, opts ...operations.O req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1467,7 +1483,11 @@ func (s *AccountSettings) ListEntitlements(ctx context.Context, name *string, ty req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1811,7 +1831,11 @@ func (s *AccountSettings) Ping(ctx context.Context, opts ...operations.Option) ( req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2160,7 +2184,11 @@ func (s *AccountSettings) GetSavedSearch(ctx context.Context, resourceType opera req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2509,7 +2537,11 @@ func (s *AccountSettings) DeleteSavedSearch(ctx context.Context, resourceType op req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2845,7 +2877,11 @@ func (s *AccountSettings) UpdateSavedSearch(ctx context.Context, resourceType op req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/alerts.go b/alerts.go index 9c4b2fe..66e63f6 100644 --- a/alerts.go +++ b/alerts.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" "net/url" ) @@ -111,7 +111,11 @@ func (s *Alerts) List(ctx context.Context, request operations.ListAlertsRequest, req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -459,7 +463,11 @@ func (s *Alerts) Get(ctx context.Context, alertID string, opts ...operations.Opt req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -807,7 +815,11 @@ func (s *Alerts) ListForIncident(ctx context.Context, incidentID string, opts .. req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1162,7 +1174,11 @@ func (s *Alerts) Create(ctx context.Context, incidentID string, requestBody []st req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1490,7 +1506,11 @@ func (s *Alerts) ListProcessingLogs(ctx context.Context, request operations.List req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/aws.go b/aws.go index 874c0fd..7afb095 100644 --- a/aws.go +++ b/aws.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" ) @@ -109,7 +109,11 @@ func (s *Aws) GetCloudTrailBatch(ctx context.Context, id string, opts ...operati req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -464,7 +468,11 @@ func (s *Aws) UpdateConnection(ctx context.Context, id string, patchV1Integratio req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/awscloudtrailbatchevents.go b/awscloudtrailbatchevents.go index e70830b..d24fed0 100644 --- a/awscloudtrailbatchevents.go +++ b/awscloudtrailbatchevents.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" ) @@ -108,7 +108,11 @@ func (s *AwsCloudtrailBatchEvents) List(ctx context.Context, id string, opts ... req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/awsconnections.go b/awsconnections.go index cbd7030..a0b4c0e 100644 --- a/awsconnections.go +++ b/awsconnections.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" "net/url" ) @@ -110,7 +110,11 @@ func (s *AwsConnections) List(ctx context.Context, request operations.ListAwsCon req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -458,7 +462,11 @@ func (s *AwsConnections) Get(ctx context.Context, id string, opts ...operations. req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/catalogs.go b/catalogs.go index dbf2411..df581a4 100644 --- a/catalogs.go +++ b/catalogs.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" ) @@ -116,7 +116,11 @@ func (s *Catalogs) Ingest(ctx context.Context, catalogID string, postV1CatalogsC req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -464,7 +468,11 @@ func (s *Catalogs) Refresh(ctx context.Context, catalogID string, opts ...operat req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/changes.go b/changes.go index 3091c81..dd52ccf 100644 --- a/changes.go +++ b/changes.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" "net/url" ) @@ -116,7 +116,11 @@ func (s *Changes) ListTypes(ctx context.Context, page *int, perPage *int, opts . req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -470,7 +474,11 @@ func (s *Changes) List(ctx context.Context, page *int, perPage *int, query *stri req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -800,7 +808,11 @@ func (s *Changes) Create(ctx context.Context, request components.PostV1Changes, req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1167,7 +1179,11 @@ func (s *Changes) ListEvents(ctx context.Context, request operations.ListChangeE req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1517,7 +1533,11 @@ func (s *Changes) CreateEvent(ctx context.Context, request components.ChangesEve req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1865,7 +1885,11 @@ func (s *Changes) GetEvent(ctx context.Context, changeEventID string, opts ...op req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2213,7 +2237,11 @@ func (s *Changes) DeleteEvent(ctx context.Context, changeEventID string, opts .. req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2548,7 +2576,11 @@ func (s *Changes) UpdateEvent(ctx context.Context, changeEventID string, patchV1 req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2896,7 +2928,11 @@ func (s *Changes) Delete(ctx context.Context, changeID string, opts ...operation req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3231,7 +3267,11 @@ func (s *Changes) Update(ctx context.Context, changeID string, patchV1ChangesCha req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3585,7 +3625,11 @@ func (s *Changes) ListIdentities(ctx context.Context, changeID string, page *int req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3940,7 +3984,11 @@ func (s *Changes) CreateIdentity(ctx context.Context, changeID string, postV1Cha req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -4308,7 +4356,11 @@ func (s *Changes) DeleteIdentity(ctx context.Context, identityID string, changeI req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -4663,7 +4715,11 @@ func (s *Changes) UpdateIdentity(ctx context.Context, identityID string, changeI req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -5030,7 +5086,11 @@ func (s *Changes) Get(ctx context.Context, scheduledMaintenanceID string, opts . req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -5385,7 +5445,11 @@ func (s *Changes) UpdateScheduledMaintenance(ctx context.Context, scheduledMaint req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/checklisttemplates.go b/checklisttemplates.go index b3ce335..79e5a68 100644 --- a/checklisttemplates.go +++ b/checklisttemplates.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" ) @@ -109,7 +109,11 @@ func (s *ChecklistTemplates) Get(ctx context.Context, id string, opts ...operati req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/communication.go b/communication.go index b72d068..cfadc4e 100644 --- a/communication.go +++ b/communication.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" "net/url" ) @@ -116,7 +116,11 @@ func (s *Communication) ListTemplates(ctx context.Context, page *int, perPage *i req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -464,7 +468,11 @@ func (s *Communication) GetTemplate(ctx context.Context, statusUpdateTemplateID req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -812,7 +820,11 @@ func (s *Communication) DeleteStatusUpdateTemplate(ctx context.Context, statusUp req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1167,7 +1179,11 @@ func (s *Communication) UpdateTemplate(ctx context.Context, statusUpdateTemplate req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/confluence.go b/confluence.go index 3f64a73..f82b5bb 100644 --- a/confluence.go +++ b/confluence.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" ) @@ -114,7 +114,11 @@ func (s *Confluence) ListSpaces(ctx context.Context, id string, keyword *string, req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/conversations.go b/conversations.go index a4b794b..19eb8bb 100644 --- a/conversations.go +++ b/conversations.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" "time" ) @@ -118,7 +118,11 @@ func (s *Conversations) ListComments(ctx context.Context, conversationID string, req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -453,7 +457,11 @@ func (s *Conversations) CreateComment(ctx context.Context, conversationID string req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -782,7 +790,11 @@ func (s *Conversations) GetComment(ctx context.Context, commentID string, conver req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1111,7 +1123,11 @@ func (s *Conversations) DeleteComment(ctx context.Context, commentID string, con req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1447,7 +1463,11 @@ func (s *Conversations) UpdateComment(ctx context.Context, commentID string, con req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1776,7 +1796,11 @@ func (s *Conversations) ListCommentReactions(ctx context.Context, conversationID req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2112,7 +2136,11 @@ func (s *Conversations) CreateCommentReaction(ctx context.Context, conversationI req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2442,7 +2470,11 @@ func (s *Conversations) DeleteCommentReaction(ctx context.Context, reactionID st req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/docs/sdks/accountsettings/README.md b/docs/sdks/accountsettings/README.md index f1243d6..a6ba516 100644 --- a/docs/sdks/accountsettings/README.md +++ b/docs/sdks/accountsettings/README.md @@ -135,8 +135,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) @@ -359,8 +359,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) @@ -416,8 +416,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) @@ -473,9 +473,9 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" "firehydrant/models/components" + "context" "log" ) diff --git a/docs/sdks/alerts/README.md b/docs/sdks/alerts/README.md index 23ab10c..478c943 100644 --- a/docs/sdks/alerts/README.md +++ b/docs/sdks/alerts/README.md @@ -24,8 +24,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) @@ -248,8 +248,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) diff --git a/docs/sdks/aws/README.md b/docs/sdks/aws/README.md index ef00e2d..94c587d 100644 --- a/docs/sdks/aws/README.md +++ b/docs/sdks/aws/README.md @@ -74,8 +74,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) diff --git a/docs/sdks/awsconnections/README.md b/docs/sdks/awsconnections/README.md index 0debcb5..a17e09b 100644 --- a/docs/sdks/awsconnections/README.md +++ b/docs/sdks/awsconnections/README.md @@ -19,8 +19,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) diff --git a/docs/sdks/catalogs/README.md b/docs/sdks/catalogs/README.md index c96a987..1cec3f2 100644 --- a/docs/sdks/catalogs/README.md +++ b/docs/sdks/catalogs/README.md @@ -19,8 +19,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) diff --git a/docs/sdks/changes/README.md b/docs/sdks/changes/README.md index d0c4cdb..c76cfc5 100644 --- a/docs/sdks/changes/README.md +++ b/docs/sdks/changes/README.md @@ -148,8 +148,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -205,8 +205,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) @@ -261,8 +261,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -429,8 +429,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -541,8 +541,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -655,8 +655,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -773,8 +773,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -890,8 +890,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) diff --git a/docs/sdks/communication/README.md b/docs/sdks/communication/README.md index 410a628..ab0bfe7 100644 --- a/docs/sdks/communication/README.md +++ b/docs/sdks/communication/README.md @@ -189,8 +189,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) diff --git a/docs/sdks/conversations/README.md b/docs/sdks/conversations/README.md index 2642630..b911d8b 100644 --- a/docs/sdks/conversations/README.md +++ b/docs/sdks/conversations/README.md @@ -85,8 +85,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -256,8 +256,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -370,8 +370,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) diff --git a/docs/sdks/environments/README.md b/docs/sdks/environments/README.md index b507627..8f802bc 100644 --- a/docs/sdks/environments/README.md +++ b/docs/sdks/environments/README.md @@ -82,8 +82,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -250,8 +250,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) diff --git a/docs/sdks/firehydrant/README.md b/docs/sdks/firehydrant/README.md index 5ed5266..bd014d9 100644 --- a/docs/sdks/firehydrant/README.md +++ b/docs/sdks/firehydrant/README.md @@ -1,3 +1,5 @@ # FireHydrant SDK -## Overview \ No newline at end of file +## Overview + +### Available Operations diff --git a/docs/sdks/functionalities/README.md b/docs/sdks/functionalities/README.md index 5cf87b7..aa70815 100644 --- a/docs/sdks/functionalities/README.md +++ b/docs/sdks/functionalities/README.md @@ -25,8 +25,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) @@ -81,8 +81,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -249,8 +249,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) diff --git a/docs/sdks/incidents/README.md b/docs/sdks/incidents/README.md index 8e1f89f..ed67540 100644 --- a/docs/sdks/incidents/README.md +++ b/docs/sdks/incidents/README.md @@ -127,8 +127,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) @@ -183,8 +183,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -351,8 +351,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -464,8 +464,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -986,8 +986,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -1102,8 +1102,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -1217,8 +1217,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -1284,8 +1284,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -1348,8 +1348,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -1405,8 +1405,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) @@ -1462,9 +1462,9 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" "firehydrant/models/components" + "context" "log" ) @@ -1524,8 +1524,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) @@ -1640,8 +1640,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -1699,8 +1699,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -1874,9 +1874,9 @@ package main import( "firehydrant" - "context" "firehydrant/types" "firehydrant/models/components" + "context" "log" ) @@ -1939,8 +1939,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -1998,8 +1998,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -2116,8 +2116,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -2177,8 +2177,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -2403,8 +2403,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -2631,8 +2631,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -2691,8 +2691,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -2750,8 +2750,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) diff --git a/docs/sdks/incidentsettings/README.md b/docs/sdks/incidentsettings/README.md index 71d7d90..12a692f 100644 --- a/docs/sdks/incidentsettings/README.md +++ b/docs/sdks/incidentsettings/README.md @@ -116,8 +116,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -231,8 +231,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -456,8 +456,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -625,8 +625,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -853,8 +853,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -1022,8 +1022,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -1082,8 +1082,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) @@ -1363,8 +1363,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -1531,8 +1531,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -1644,8 +1644,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -1812,8 +1812,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -1923,8 +1923,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -2043,8 +2043,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -2211,8 +2211,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -2324,8 +2324,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -2438,8 +2438,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -2549,8 +2549,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) diff --git a/docs/sdks/infrastructures/README.md b/docs/sdks/infrastructures/README.md index f98f2ee..804c6fd 100644 --- a/docs/sdks/infrastructures/README.md +++ b/docs/sdks/infrastructures/README.md @@ -18,8 +18,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) diff --git a/docs/sdks/integrations/README.md b/docs/sdks/integrations/README.md index b1c22ce..9070a9c 100644 --- a/docs/sdks/integrations/README.md +++ b/docs/sdks/integrations/README.md @@ -155,8 +155,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -876,8 +876,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -933,8 +933,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) diff --git a/docs/sdks/maintenances/README.md b/docs/sdks/maintenances/README.md index 42b7073..66bdd41 100644 --- a/docs/sdks/maintenances/README.md +++ b/docs/sdks/maintenances/README.md @@ -77,9 +77,9 @@ package main import( "firehydrant" - "context" "firehydrant/types" "firehydrant/models/components" + "context" "log" ) diff --git a/docs/sdks/metrics/README.md b/docs/sdks/metrics/README.md index a4e2a51..fc5a73b 100644 --- a/docs/sdks/metrics/README.md +++ b/docs/sdks/metrics/README.md @@ -19,9 +19,9 @@ package main import( "firehydrant" - "context" "firehydrant/types" "firehydrant/models/operations" + "context" "log" ) @@ -79,8 +79,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) diff --git a/docs/sdks/metricsreporting/README.md b/docs/sdks/metricsreporting/README.md index 0035880..cee5cc3 100644 --- a/docs/sdks/metricsreporting/README.md +++ b/docs/sdks/metricsreporting/README.md @@ -87,8 +87,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) @@ -313,8 +313,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) @@ -369,8 +369,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) @@ -481,8 +481,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) @@ -537,8 +537,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) @@ -593,8 +593,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) @@ -651,8 +651,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) @@ -707,8 +707,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) @@ -765,9 +765,9 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" "firehydrant/models/components" + "context" "log" ) diff --git a/docs/sdks/retrospectives/README.md b/docs/sdks/retrospectives/README.md index a516101..97e02f8 100644 --- a/docs/sdks/retrospectives/README.md +++ b/docs/sdks/retrospectives/README.md @@ -89,8 +89,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -258,8 +258,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -371,8 +371,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -428,8 +428,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -488,8 +488,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -603,8 +603,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -662,8 +662,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -778,8 +778,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) diff --git a/docs/sdks/runbooks/README.md b/docs/sdks/runbooks/README.md index ea55e60..29adbc5 100644 --- a/docs/sdks/runbooks/README.md +++ b/docs/sdks/runbooks/README.md @@ -95,8 +95,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) @@ -151,8 +151,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -324,8 +324,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -438,8 +438,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -611,8 +611,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -727,8 +727,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -841,8 +841,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) @@ -958,8 +958,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) diff --git a/docs/sdks/scim/README.md b/docs/sdks/scim/README.md index 3f26240..3258b95 100644 --- a/docs/sdks/scim/README.md +++ b/docs/sdks/scim/README.md @@ -85,8 +85,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -206,8 +206,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -388,8 +388,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -515,8 +515,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -627,8 +627,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) diff --git a/docs/sdks/services/README.md b/docs/sdks/services/README.md index 919dc1b..539e4a2 100644 --- a/docs/sdks/services/README.md +++ b/docs/sdks/services/README.md @@ -35,8 +35,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -204,8 +204,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -261,8 +261,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) @@ -317,8 +317,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -376,8 +376,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -548,8 +548,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -715,8 +715,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) diff --git a/docs/sdks/signals/README.md b/docs/sdks/signals/README.md index fbba9e3..87dbf55 100644 --- a/docs/sdks/signals/README.md +++ b/docs/sdks/signals/README.md @@ -46,8 +46,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) @@ -102,8 +102,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) @@ -158,8 +158,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) @@ -214,8 +214,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -330,8 +330,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -498,8 +498,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -782,8 +782,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -951,8 +951,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -1233,8 +1233,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -1349,8 +1349,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -1523,8 +1523,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) diff --git a/docs/sdks/slack/README.md b/docs/sdks/slack/README.md index fd41334..fb9e775 100644 --- a/docs/sdks/slack/README.md +++ b/docs/sdks/slack/README.md @@ -20,8 +20,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) diff --git a/docs/sdks/statuspage/README.md b/docs/sdks/statuspage/README.md index c0f1cf5..c91475c 100644 --- a/docs/sdks/statuspage/README.md +++ b/docs/sdks/statuspage/README.md @@ -18,8 +18,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) diff --git a/docs/sdks/statuspages/README.md b/docs/sdks/statuspages/README.md index f5c5cd3..db2dd95 100644 --- a/docs/sdks/statuspages/README.md +++ b/docs/sdks/statuspages/README.md @@ -92,8 +92,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -259,8 +259,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) @@ -388,8 +388,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) @@ -515,8 +515,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) @@ -917,8 +917,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -1030,8 +1030,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) diff --git a/docs/sdks/statusupdatetemplates/README.md b/docs/sdks/statusupdatetemplates/README.md index 1639e51..594e4fa 100644 --- a/docs/sdks/statusupdatetemplates/README.md +++ b/docs/sdks/statusupdatetemplates/README.md @@ -18,8 +18,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) diff --git a/docs/sdks/tasks/README.md b/docs/sdks/tasks/README.md index 1e90d81..04bcd97 100644 --- a/docs/sdks/tasks/README.md +++ b/docs/sdks/tasks/README.md @@ -90,8 +90,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -209,8 +209,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -323,8 +323,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -494,8 +494,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -552,8 +552,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -666,8 +666,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -787,8 +787,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) diff --git a/docs/sdks/teams/README.md b/docs/sdks/teams/README.md index 29c0a36..bcd2a39 100644 --- a/docs/sdks/teams/README.md +++ b/docs/sdks/teams/README.md @@ -88,8 +88,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) @@ -144,8 +144,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -313,8 +313,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -428,8 +428,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -605,8 +605,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -664,8 +664,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -742,8 +742,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -800,8 +800,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) diff --git a/docs/sdks/tickets/README.md b/docs/sdks/tickets/README.md index 17c08ef..b4c0d89 100644 --- a/docs/sdks/tickets/README.md +++ b/docs/sdks/tickets/README.md @@ -21,8 +21,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/operations" + "context" "log" ) @@ -77,8 +77,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -190,8 +190,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) diff --git a/docs/sdks/webhooks/README.md b/docs/sdks/webhooks/README.md index ea4a649..9e23d56 100644 --- a/docs/sdks/webhooks/README.md +++ b/docs/sdks/webhooks/README.md @@ -81,8 +81,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) @@ -249,8 +249,8 @@ package main import( "firehydrant" - "context" "firehydrant/models/components" + "context" "log" ) diff --git a/environments.go b/environments.go index 6ef20ce..fd83cc4 100644 --- a/environments.go +++ b/environments.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" "net/url" ) @@ -118,7 +118,11 @@ func (s *Environments) List(ctx context.Context, page *int, perPage *int, query req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -468,7 +472,11 @@ func (s *Environments) Create(ctx context.Context, request components.PostV1Envi req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -816,7 +824,11 @@ func (s *Environments) Get(ctx context.Context, environmentID string, opts ...op req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1164,7 +1176,11 @@ func (s *Environments) Delete(ctx context.Context, environmentID string, opts .. req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1519,7 +1535,11 @@ func (s *Environments) Update(ctx context.Context, environmentID string, patchV1 req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/executions.go b/executions.go index 1074931..b03601b 100644 --- a/executions.go +++ b/executions.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" ) @@ -114,7 +114,11 @@ func (s *Executions) Delete(ctx context.Context, executionID string, reason stri req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/firehydrant.go b/firehydrant.go index a98f626..319919d 100644 --- a/firehydrant.go +++ b/firehydrant.go @@ -199,9 +199,9 @@ func New(opts ...SDKOption) *FireHydrant { sdkConfiguration: sdkConfiguration{ Language: "go", OpenAPIDocVersion: "0.0.1", - SDKVersion: "0.5.0", - GenVersion: "2.455.2", - UserAgent: "speakeasy-sdk/go 0.5.0 2.455.2 0.0.1 firehydrant", + SDKVersion: "0.6.0", + GenVersion: "2.474.6", + UserAgent: "speakeasy-sdk/go 0.6.0 2.474.6 0.0.1 firehydrant", Hooks: hooks.New(), }, } diff --git a/firehydrantsignalsteams.go b/firehydrantsignalsteams.go index 8ab7b29..8cfac4f 100644 --- a/firehydrantsignalsteams.go +++ b/firehydrantsignalsteams.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" ) @@ -110,7 +110,11 @@ func (s *FireHydrantSignalsTeams) GetEscalationPolicy(ctx context.Context, teamI req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/firehydrantslack.go b/firehydrantslack.go index b09efa5..9033d11 100644 --- a/firehydrantslack.go +++ b/firehydrantslack.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" ) @@ -110,7 +110,11 @@ func (s *FireHydrantSlack) GetEmojiAction(ctx context.Context, connectionID stri req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -439,7 +443,11 @@ func (s *FireHydrantSlack) DeleteEmojiAction(ctx context.Context, connectionID s req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -766,7 +774,11 @@ func (s *FireHydrantSlack) ListWorkspaces(ctx context.Context, connectionID stri req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/firehydrantstatuspage.go b/firehydrantstatuspage.go index fc3ecd6..eced6ca 100644 --- a/firehydrantstatuspage.go +++ b/firehydrantstatuspage.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" "net/url" ) @@ -115,7 +115,11 @@ func (s *FireHydrantStatuspage) ListConnections(ctx context.Context, page *int, req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -462,7 +466,11 @@ func (s *FireHydrantStatuspage) ListPages(ctx context.Context, connectionID stri req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/firehydrantticketing.go b/firehydrantticketing.go index 50c96ea..0288919 100644 --- a/firehydrantticketing.go +++ b/firehydrantticketing.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" "net/url" ) @@ -110,7 +110,11 @@ func (s *FireHydrantTicketing) GetProject(ctx context.Context, ticketingProjectI req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -462,7 +466,11 @@ func (s *FireHydrantTicketing) ListTags(ctx context.Context, prefix *string, opt req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/functionalities.go b/functionalities.go index 360ea8f..3c3911c 100644 --- a/functionalities.go +++ b/functionalities.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" "net/url" ) @@ -111,7 +111,11 @@ func (s *Functionalities) List(ctx context.Context, request operations.ListFunct req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -461,7 +465,11 @@ func (s *Functionalities) Create(ctx context.Context, request components.PostV1F req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -809,7 +817,11 @@ func (s *Functionalities) Get(ctx context.Context, functionalityID string, opts req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1157,7 +1169,11 @@ func (s *Functionalities) Delete(ctx context.Context, functionalityID string, op req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1512,7 +1528,11 @@ func (s *Functionalities) Update(ctx context.Context, functionalityID string, pa req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1859,7 +1879,11 @@ func (s *Functionalities) ListServices(ctx context.Context, functionalityID stri req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/go.mod b/go.mod index e2fb9e9..5a5b247 100644 --- a/go.mod +++ b/go.mod @@ -2,14 +2,4 @@ module firehydrant go 1.20 -require ( - github.com/cenkalti/backoff/v4 v4.2.0 - github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 - github.com/stretchr/testify v1.8.4 -) - -require ( - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) +require github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 diff --git a/go.sum b/go.sum index 0063873..c5a75f1 100644 --- a/go.sum +++ b/go.sum @@ -1,14 +1,2 @@ -github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4= -github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05 h1:S92OBrGuLLZsyM5ybUzgc/mPjIYk2AZqufieooe98uw= github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05/go.mod h1:M9R1FoZ3y//hwwnJtO51ypFGwm8ZfpxPT/ZLtO1mcgQ= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/incidents.go b/incidents.go index 23950ea..5c0a901 100644 --- a/incidents.go +++ b/incidents.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" "net/url" ) @@ -111,7 +111,11 @@ func (s *Incidents) GetAiSummaryVoteStatus(ctx context.Context, incidentID strin req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -439,7 +443,11 @@ func (s *Incidents) List(ctx context.Context, request operations.ListIncidentsRe req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -789,7 +797,11 @@ func (s *Incidents) Create(ctx context.Context, request components.PostV1Inciden req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1137,7 +1149,11 @@ func (s *Incidents) Get(ctx context.Context, incidentID string, opts ...operatio req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1485,7 +1501,11 @@ func (s *Incidents) Archive(ctx context.Context, incidentID string, opts ...oper req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1840,7 +1860,11 @@ func (s *Incidents) Update(ctx context.Context, incidentID string, patchV1Incide req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2189,7 +2213,11 @@ func (s *Incidents) DeleteAlert(ctx context.Context, incidentAlertID string, inc req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2525,7 +2553,11 @@ func (s *Incidents) SetAlertAsPrimary(ctx context.Context, incidentAlertID strin req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2879,7 +2911,11 @@ func (s *Incidents) ListAttachments(ctx context.Context, incidentID string, atta req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3214,7 +3250,11 @@ func (s *Incidents) CreateAttachment(ctx context.Context, incidentID string, req req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3562,7 +3602,11 @@ func (s *Incidents) GetChannel(ctx context.Context, incidentID string, opts ...o req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3910,7 +3954,11 @@ func (s *Incidents) Close(ctx context.Context, incidentID string, opts ...operat req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -4265,7 +4313,11 @@ func (s *Incidents) ListEvents(ctx context.Context, incidentID string, types *st req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -4614,7 +4666,11 @@ func (s *Incidents) GetEvent(ctx context.Context, incidentID string, eventID str req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -4963,7 +5019,11 @@ func (s *Incidents) DeleteEvent(ctx context.Context, incidentID string, eventID req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -5312,7 +5372,11 @@ func (s *Incidents) UpdateEvent(ctx context.Context, incidentID string, eventID req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -5668,7 +5732,11 @@ func (s *Incidents) UpdateEventVotes(ctx context.Context, incidentID string, eve req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -6017,7 +6085,11 @@ func (s *Incidents) GetEventVoteStatus(ctx context.Context, incidentID string, e req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -6372,7 +6444,11 @@ func (s *Incidents) CreateGenericChatMessage(ctx context.Context, incidentID str req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -6721,7 +6797,11 @@ func (s *Incidents) DeleteChatMessage(ctx context.Context, messageID string, inc req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -7077,7 +7157,11 @@ func (s *Incidents) UpdateChatMessage(ctx context.Context, messageID string, inc req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -7438,7 +7522,11 @@ func (s *Incidents) UpdateImpacts(ctx context.Context, incidentID string, putV1I req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -7799,7 +7887,11 @@ func (s *Incidents) PartialUpdateImpacts(ctx context.Context, incidentID string, req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -8148,7 +8240,11 @@ func (s *Incidents) ListImpact(ctx context.Context, incidentID string, type_ ope req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -8504,7 +8600,11 @@ func (s *Incidents) CreateImpact(ctx context.Context, incidentID string, type_ o req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -8873,7 +8973,11 @@ func (s *Incidents) DeleteImpact(ctx context.Context, incidentID string, type_ o req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -9226,7 +9330,11 @@ func (s *Incidents) ListLinks(ctx context.Context, incidentID string, page *int, req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -9581,7 +9689,11 @@ func (s *Incidents) CreateLink(ctx context.Context, incidentID string, postV1Inc req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -9937,7 +10049,11 @@ func (s *Incidents) UpdateLink(ctx context.Context, linkID string, incidentID st req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -10266,7 +10382,11 @@ func (s *Incidents) DeleteLink(ctx context.Context, linkID string, incidentID st req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -10594,7 +10714,11 @@ func (s *Incidents) ListMilestones(ctx context.Context, incidentID string, opts req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -10954,7 +11078,11 @@ func (s *Incidents) UpdateMilestonesBulk(ctx context.Context, incidentID string, req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -11309,7 +11437,11 @@ func (s *Incidents) CreateNote(ctx context.Context, incidentID string, postV1Inc req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -11665,7 +11797,11 @@ func (s *Incidents) UpdateNote(ctx context.Context, noteID string, incidentID st req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -12020,7 +12156,11 @@ func (s *Incidents) ListRelatedChangeEvents(ctx context.Context, incidentID stri req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -12375,7 +12515,11 @@ func (s *Incidents) CreateRelatedChange(ctx context.Context, incidentID string, req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -12752,7 +12896,11 @@ func (s *Incidents) UpdateRelatedChangeEvent(ctx context.Context, relatedChangeE req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -13121,7 +13269,11 @@ func (s *Incidents) GetRelationships(ctx context.Context, incidentID string, opt req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -13476,7 +13628,11 @@ func (s *Incidents) Resolve(ctx context.Context, incidentID string, requestBody req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -13829,7 +13985,11 @@ func (s *Incidents) ListRoleAssignments(ctx context.Context, incidentID string, req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -14184,7 +14344,11 @@ func (s *Incidents) CreateRoleAssignment(ctx context.Context, incidentID string, req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -14533,7 +14697,11 @@ func (s *Incidents) DeleteRoleAssignment(ctx context.Context, incidentID string, req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -14886,7 +15054,11 @@ func (s *Incidents) ListSimilar(ctx context.Context, incidentID string, threshol req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -15214,7 +15386,11 @@ func (s *Incidents) ListStatusPages(ctx context.Context, incidentID string, opts req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -15569,7 +15745,11 @@ func (s *Incidents) AddStatusPage(ctx context.Context, incidentID string, postV1 req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -15924,7 +16104,11 @@ func (s *Incidents) CreateTaskList(ctx context.Context, incidentID string, postV req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -16279,7 +16463,11 @@ func (s *Incidents) CreateTeamAssignment(ctx context.Context, incidentID string, req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -16615,7 +16803,11 @@ func (s *Incidents) DeleteTeamAssignment(ctx context.Context, incidentID string, req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -16950,7 +17142,11 @@ func (s *Incidents) GetTranscript(ctx context.Context, incidentID string, after req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -17298,7 +17494,11 @@ func (s *Incidents) DeleteTranscript(ctx context.Context, transcriptID string, i req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -17626,7 +17826,11 @@ func (s *Incidents) Unarchive(ctx context.Context, incidentID string, opts ...op req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -17975,7 +18179,11 @@ func (s *Incidents) GetUserRole(ctx context.Context, incidentID string, userID s req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/incidentsettings.go b/incidentsettings.go index ce5584f..a34e640 100644 --- a/incidentsettings.go +++ b/incidentsettings.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" "net/url" ) @@ -106,7 +106,11 @@ func (s *IncidentSettings) ListCustomFieldDefinitions(ctx context.Context, opts req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -456,7 +460,11 @@ func (s *IncidentSettings) CreateCustomFieldDefinition(ctx context.Context, requ req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -804,7 +812,11 @@ func (s *IncidentSettings) DeleteCustomFieldDefinition(ctx context.Context, fiel req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1159,7 +1171,11 @@ func (s *IncidentSettings) UpdateCustomFieldDefinition(ctx context.Context, fiel req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1513,7 +1529,11 @@ func (s *IncidentSettings) ListSelectOptions(ctx context.Context, fieldID string req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1860,7 +1880,11 @@ func (s *IncidentSettings) GetFormConfiguration(ctx context.Context, slug string req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2193,7 +2217,11 @@ func (s *IncidentSettings) ListRoles(ctx context.Context, page *int, perPage *in req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2543,7 +2571,11 @@ func (s *IncidentSettings) CreateIncidentRole(ctx context.Context, request compo req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2891,7 +2923,11 @@ func (s *IncidentSettings) GetIncidentRole(ctx context.Context, incidentRoleID s req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3239,7 +3275,11 @@ func (s *IncidentSettings) DeleteRole(ctx context.Context, incidentRoleID string req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3594,7 +3634,11 @@ func (s *IncidentSettings) UpdateIncidentRole(ctx context.Context, incidentRoleI req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3946,7 +3990,11 @@ func (s *IncidentSettings) ListIncidentTags(ctx context.Context, prefix *string, req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -4296,7 +4344,11 @@ func (s *IncidentSettings) ValidateIncidentTags(ctx context.Context, request []s req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -4650,7 +4702,11 @@ func (s *IncidentSettings) ListIncidentTypes(ctx context.Context, query *string, req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -5000,7 +5056,11 @@ func (s *IncidentSettings) CreateIncidentType(ctx context.Context, request compo req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -5348,7 +5408,11 @@ func (s *IncidentSettings) GetIncidentType(ctx context.Context, id string, opts req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -5696,7 +5760,11 @@ func (s *IncidentSettings) ArchiveIncidentType(ctx context.Context, id string, o req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -6051,7 +6119,11 @@ func (s *IncidentSettings) UpdateType(ctx context.Context, id string, patchV1Inc req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -6401,7 +6473,11 @@ func (s *IncidentSettings) CreateMilestone(ctx context.Context, request operatio req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -6749,7 +6825,11 @@ func (s *IncidentSettings) DeleteLifecycleMilestone(ctx context.Context, milesto req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -7104,7 +7184,11 @@ func (s *IncidentSettings) UpdateLifecycleMilestone(ctx context.Context, milesto req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -7448,7 +7532,11 @@ func (s *IncidentSettings) ListLifecyclePhases(ctx context.Context, opts ...oper req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -7801,7 +7889,11 @@ func (s *IncidentSettings) ListPriorities(ctx context.Context, page *int, perPag req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -8151,7 +8243,11 @@ func (s *IncidentSettings) CreatePriority(ctx context.Context, request component req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -8499,7 +8595,11 @@ func (s *IncidentSettings) GetPriority(ctx context.Context, prioritySlug string, req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -8847,7 +8947,11 @@ func (s *IncidentSettings) DeletePriority(ctx context.Context, prioritySlug stri req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -9202,7 +9306,11 @@ func (s *IncidentSettings) UpdatePriority(ctx context.Context, prioritySlug stri req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -9555,7 +9663,11 @@ func (s *IncidentSettings) ListSeverities(ctx context.Context, page *int, perPag req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -9905,7 +10017,11 @@ func (s *IncidentSettings) CreateSeverity(ctx context.Context, request component req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -10253,7 +10369,11 @@ func (s *IncidentSettings) GetSeverity(ctx context.Context, severitySlug string, req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -10601,7 +10721,11 @@ func (s *IncidentSettings) DeleteSeverity(ctx context.Context, severitySlug stri req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -10956,7 +11080,11 @@ func (s *IncidentSettings) UpdateSeverity(ctx context.Context, severitySlug stri req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -11300,7 +11428,11 @@ func (s *IncidentSettings) GetSeverityMatrix(ctx context.Context, opts ...operat req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -11650,7 +11782,11 @@ func (s *IncidentSettings) UpdateSeverityMatrix(ctx context.Context, request com req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -12003,7 +12139,11 @@ func (s *IncidentSettings) ListSeverityMatrixConditions(ctx context.Context, pag req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -12353,7 +12493,11 @@ func (s *IncidentSettings) CreateSeverityMatrixCondition(ctx context.Context, re req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -12700,7 +12844,11 @@ func (s *IncidentSettings) GetSeverityMatrixCondition(ctx context.Context, condi req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -13028,7 +13176,11 @@ func (s *IncidentSettings) DeleteSeverityMatrixCondition(ctx context.Context, co req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -13383,7 +13535,11 @@ func (s *IncidentSettings) UpdateCondition(ctx context.Context, conditionID stri req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -13736,7 +13892,11 @@ func (s *IncidentSettings) ListSeverityMatrixImpacts(ctx context.Context, page * req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -14086,7 +14246,11 @@ func (s *IncidentSettings) CreateImpact(ctx context.Context, request components. req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -14434,7 +14598,11 @@ func (s *IncidentSettings) DeleteSeverityMatrixImpact(ctx context.Context, impac req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -14789,7 +14957,11 @@ func (s *IncidentSettings) UpdateImpact(ctx context.Context, impactID string, pa req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -15133,7 +15305,11 @@ func (s *IncidentSettings) ListTicketingPriorities(ctx context.Context, opts ... req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -15483,7 +15659,11 @@ func (s *IncidentSettings) CreateTicketingPriority(ctx context.Context, request req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/infrastructures.go b/infrastructures.go index a0f8c85..63884ac 100644 --- a/infrastructures.go +++ b/infrastructures.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" "net/url" ) @@ -110,7 +110,11 @@ func (s *Infrastructures) List(ctx context.Context, request operations.ListInfra req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/integrations.go b/integrations.go index 3b8bddd..f11b11a 100644 --- a/integrations.go +++ b/integrations.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" "net/url" ) @@ -115,7 +115,11 @@ func (s *Integrations) List(ctx context.Context, opts ...operations.Option) (*op req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -449,7 +453,11 @@ func (s *Integrations) ListCloudtrailBatches(ctx context.Context, page *int, per req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -804,7 +812,11 @@ func (s *Integrations) UpdateCloudTrailBatch(ctx context.Context, id string, pat req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1155,7 +1167,11 @@ func (s *Integrations) ListConnections(ctx context.Context, integrationSlug *str req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1482,7 +1498,11 @@ func (s *Integrations) CreateConnection(ctx context.Context, slug string, opts . req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1810,7 +1830,11 @@ func (s *Integrations) UpdateConnection(ctx context.Context, slug string, connec req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2138,7 +2162,11 @@ func (s *Integrations) RefreshConnection(ctx context.Context, slug string, conne req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2466,7 +2494,11 @@ func (s *Integrations) UpdateFieldMap(ctx context.Context, fieldMapID string, op req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2814,7 +2846,11 @@ func (s *Integrations) GetFieldMapAvailableFields(ctx context.Context, fieldMapI req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3168,7 +3204,11 @@ func (s *Integrations) ListEmojiActions(ctx context.Context, connectionID string req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3495,7 +3535,11 @@ func (s *Integrations) GetStatus(ctx context.Context, slug string, opts ...opera req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3823,7 +3867,11 @@ func (s *Integrations) GetStatuspageConnection(ctx context.Context, connectionID req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -4171,7 +4219,11 @@ func (s *Integrations) DeleteStatuspageConnection(ctx context.Context, connectio req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -4519,7 +4571,11 @@ func (s *Integrations) Get(ctx context.Context, integrationID string, opts ...op req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -4867,7 +4923,11 @@ func (s *Integrations) DeletePriority(ctx context.Context, id string, opts ...op req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -5222,7 +5282,11 @@ func (s *Integrations) UpdatePriority(ctx context.Context, id string, patchV1Tic req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -5570,7 +5634,11 @@ func (s *Integrations) ListProjects(ctx context.Context, request operations.List req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -5917,7 +5985,11 @@ func (s *Integrations) GetProjectConfigurationOptions(ctx context.Context, ticke req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -6245,7 +6317,11 @@ func (s *Integrations) GetProjectFieldOptions(ctx context.Context, fieldID strin req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -6573,7 +6649,11 @@ func (s *Integrations) CreateFieldMap(ctx context.Context, ticketingProjectID st req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -6921,7 +7001,11 @@ func (s *Integrations) GetAvailableFields(ctx context.Context, ticketingProjectI req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -7270,7 +7354,11 @@ func (s *Integrations) DeleteFieldMap(ctx context.Context, mapID string, ticketi req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -7599,7 +7687,11 @@ func (s *Integrations) UpdateTicketingFieldMap(ctx context.Context, mapID string req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -7948,7 +8040,11 @@ func (s *Integrations) DeleteProjectConfig(ctx context.Context, ticketingProject req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -8296,7 +8392,11 @@ func (s *Integrations) GetTicket(ctx context.Context, ticketID string, opts ...o req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/internal/utils/env.go b/internal/utils/env.go new file mode 100644 index 0000000..110d464 --- /dev/null +++ b/internal/utils/env.go @@ -0,0 +1,16 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package utils + +import ( + "os" +) + +// GetEnv returns the value of the environment variable named by the key or the defaultValue if the environment variable is not set. +func GetEnv(name, defaultValue string) string { + value := os.Getenv(name) + if value == "" { + return defaultValue + } + return value +} diff --git a/internal/utils/retries.go b/internal/utils/retries.go index 8c1f9d4..7f7ad03 100644 --- a/internal/utils/retries.go +++ b/internal/utils/retries.go @@ -7,7 +7,8 @@ import ( "errors" "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" + "math" + "math/rand" "net/http" "net/url" "strconv" @@ -15,8 +16,6 @@ import ( "time" ) -var errRequestFailed = errors.New("request failed") - // Deprecated: Use retry.BackoffStrategy instead. type BackoffStrategy = retry.BackoffStrategy @@ -28,34 +27,27 @@ type Retries struct { StatusCodes []string } -func Retry(ctx context.Context, r Retries, action func() (*http.Response, error)) (*http.Response, error) { +func Retry(ctx context.Context, r Retries, operation func() (*http.Response, error)) (*http.Response, error) { switch r.Config.Strategy { case "backoff": if r.Config.Backoff == nil { - return action() + return operation() } - config := backoff.NewExponentialBackOff() - config.InitialInterval = time.Duration(r.Config.Backoff.InitialInterval) * time.Millisecond - config.MaxInterval = time.Duration(r.Config.Backoff.MaxInterval) * time.Millisecond - config.Multiplier = r.Config.Backoff.Exponent - config.MaxElapsedTime = time.Duration(r.Config.Backoff.MaxElapsedTime) * time.Millisecond - config.Reset() - var resp *http.Response - err := backoff.Retry(func() error { + err := retryWithBackoff(ctx, r.Config.Backoff, func() error { if resp != nil { resp.Body.Close() } select { case <-ctx.Done(): - return backoff.Permanent(ctx.Err()) + return retry.Permanent(ctx.Err()) default: } - res, err := action() + res, err := operation() if err != nil { urlError := new(url.Error) if errors.As(err, &urlError) { @@ -64,7 +56,7 @@ func Retry(ctx context.Context, r Retries, action func() (*http.Response, error) } } - return backoff.Permanent(err) + return retry.Permanent(err) } resp = res if res == nil { @@ -81,7 +73,7 @@ func Retry(ctx context.Context, r Retries, action func() (*http.Response, error) s := res.StatusCode / 100 if s >= codeRange && s < codeRange+1 { - return errRequestFailed + return retry.TemporaryFromResponse("request failed", res) } } else { parsedCode, err := strconv.Atoi(code) @@ -90,7 +82,7 @@ func Retry(ctx context.Context, r Retries, action func() (*http.Response, error) } if res.StatusCode == parsedCode { - return errRequestFailed + return retry.TemporaryFromResponse("request failed", res) } } } @@ -98,13 +90,131 @@ func Retry(ctx context.Context, r Retries, action func() (*http.Response, error) resp = res return nil - }, config) - if err != nil && !errors.Is(err, errRequestFailed) { + }) + + var tempErr *retry.TemporaryError + if err != nil && !errors.As(err, &tempErr) { return nil, err } return resp, nil default: - return action() + return operation() + } +} + +func retryWithBackoff(ctx context.Context, s *retry.BackoffStrategy, operation func() error) error { + var ( + err error + next time.Duration + attempt int + start = time.Now() + maxElapsedTime = time.Duration(s.MaxElapsedTime) * time.Millisecond + ) + + timer := &defaultTimer{} + defer func() { + timer.Stop() + }() + + for { + err = operation() + if err == nil { + return nil + } + + var permanent *retry.PermanentError + if errors.As(err, &permanent) { + return permanent.Unwrap() + } + + if time.Since(start) >= maxElapsedTime { + return err + } + + var temporary *retry.TemporaryError + if errors.As(err, &temporary) { + next = temporary.RetryAfter() + } + + if next <= 0 { + next = nextInterval(s, attempt) + } + + timer.Start(next) + + select { + case <-ctx.Done(): + return ctx.Err() + case <-timer.C(): + } + + attempt += 1 } } + +type Timer interface { + Start(duration time.Duration) + Stop() + C() <-chan time.Time +} + +// defaultTimer implements Timer interface using time.Timer +type defaultTimer struct { + timer *time.Timer +} + +// C returns the timers channel which receives the current time when the timer fires. +func (t *defaultTimer) C() <-chan time.Time { + return t.timer.C +} + +// Start starts the timer to fire after the given duration +func (t *defaultTimer) Start(duration time.Duration) { + if t.timer == nil { + t.timer = time.NewTimer(duration) + return + } + + if !t.timer.Stop() { + select { + case <-t.timer.C: + default: + } + } + + t.timer.Reset(duration) +} + +// Stop is called when the timer is not used anymore and resources may be freed. +func (t *defaultTimer) Stop() { + if t.timer != nil { + t.timer.Stop() + } +} + +func nextInterval(s *retry.BackoffStrategy, attempt int) time.Duration { + initialInterval := float64(time.Duration(s.InitialInterval) * time.Millisecond) + maxInterval := float64(time.Duration(s.MaxInterval) * time.Millisecond) + exponent := s.Exponent + jitterFactor := float64(0.25) + + interval := initialInterval * math.Pow(float64(attempt+1), exponent) + + jitter := rand.Float64() * jitterFactor * interval + if rand.Float64() < 0.5 { + jitter = -1 * jitter + } + + interval = interval + jitter + + if interval <= 0 { + interval = initialInterval + } + + if interval > maxInterval { + interval = maxInterval + } + + return time.Duration(interval) +} diff --git a/list.go b/list.go index 71b4ecd..6738907 100644 --- a/list.go +++ b/list.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" ) @@ -111,7 +111,11 @@ func (s *List) Delete(ctx context.Context, taskListID string, opts ...operations req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/maintenances.go b/maintenances.go index 04eed1e..4caa515 100644 --- a/maintenances.go +++ b/maintenances.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" "net/url" ) @@ -116,7 +116,11 @@ func (s *Maintenances) List(ctx context.Context, query *string, page *int, perPa req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -466,7 +470,11 @@ func (s *Maintenances) Create(ctx context.Context, request components.PostV1Sche req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -833,7 +841,11 @@ func (s *Maintenances) Delete(ctx context.Context, scheduledMaintenanceID string req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/metrics.go b/metrics.go index cc68523..5631be0 100644 --- a/metrics.go +++ b/metrics.go @@ -10,9 +10,9 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "firehydrant/types" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" "net/url" ) @@ -116,7 +116,11 @@ func (s *Metrics) GetMttx(ctx context.Context, request operations.GetV1MetricsMt req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -471,7 +475,11 @@ func (s *Metrics) GetInfrastructure(ctx context.Context, infraType operations.Pa req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/metricsreporting.go b/metricsreporting.go index b41240c..8cdf564 100644 --- a/metricsreporting.go +++ b/metricsreporting.go @@ -10,9 +10,9 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "firehydrant/types" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" "net/url" ) @@ -116,7 +116,11 @@ func (s *MetricsReporting) ListMeasurementDefinitions(ctx context.Context, page req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -446,7 +450,11 @@ func (s *MetricsReporting) CreateMeasurementDefinition(ctx context.Context, requ req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -774,7 +782,11 @@ func (s *MetricsReporting) GetMeasurementDefinition(ctx context.Context, measure req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1102,7 +1114,11 @@ func (s *MetricsReporting) DeleteMeasurementDefinition(ctx context.Context, meas req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1437,7 +1453,11 @@ func (s *MetricsReporting) UpdateMeasurementDefinition(ctx context.Context, meas req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1765,7 +1785,11 @@ func (s *MetricsReporting) ListIncidentMetrics(ctx context.Context, request oper req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2119,7 +2143,11 @@ func (s *MetricsReporting) GetMilestoneFunnelMetrics(ctx context.Context, reques req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2472,7 +2500,11 @@ func (s *MetricsReporting) ListRetrospectives(ctx context.Context, startDate *ty req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2826,7 +2858,11 @@ func (s *MetricsReporting) GetTicketFunnel(ctx context.Context, request operatio req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3174,7 +3210,11 @@ func (s *MetricsReporting) ListUserInvolvementMetrics(ctx context.Context, reque req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3528,7 +3568,11 @@ func (s *MetricsReporting) ListInfrastructureMetrics(ctx context.Context, infraT req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3876,7 +3920,11 @@ func (s *MetricsReporting) GetMeanTime(ctx context.Context, request operations.G req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -4224,7 +4272,11 @@ func (s *MetricsReporting) ListSavedSearches(ctx context.Context, request operat req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -4579,7 +4631,11 @@ func (s *MetricsReporting) CreateSavedSearch(ctx context.Context, resourceType o req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/oncallschedules.go b/oncallschedules.go index bade87d..2ac9a12 100644 --- a/oncallschedules.go +++ b/oncallschedules.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" ) @@ -110,7 +110,11 @@ func (s *OnCallSchedules) Delete(ctx context.Context, teamID string, scheduleID req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/projectconfigurations.go b/projectconfigurations.go index 643b144..6e27746 100644 --- a/projectconfigurations.go +++ b/projectconfigurations.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" ) @@ -109,7 +109,11 @@ func (s *ProjectConfigurations) Create(ctx context.Context, ticketingProjectID s req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -458,7 +462,11 @@ func (s *ProjectConfigurations) Get(ctx context.Context, ticketingProjectID stri req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/retrospectives.go b/retrospectives.go index 90af00f..aaab1ab 100644 --- a/retrospectives.go +++ b/retrospectives.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" "net/url" "time" @@ -117,7 +117,11 @@ func (s *Retrospectives) ListQuestions(ctx context.Context, page *int, perPage * req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -467,7 +471,11 @@ func (s *Retrospectives) UpdateQuestions(ctx context.Context, request components req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -815,7 +823,11 @@ func (s *Retrospectives) GetQuestion(ctx context.Context, questionID string, opt req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1150,7 +1162,11 @@ func (s *Retrospectives) ListReports(ctx context.Context, page *int, perPage *in req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1500,7 +1516,11 @@ func (s *Retrospectives) CreateReport(ctx context.Context, request components.Po req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1848,7 +1868,11 @@ func (s *Retrospectives) GetReport(ctx context.Context, reportID string, opts .. req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2203,7 +2227,11 @@ func (s *Retrospectives) UpdateReport(ctx context.Context, reportID string, patc req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2559,7 +2587,11 @@ func (s *Retrospectives) UpdateField(ctx context.Context, fieldID string, report req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2914,7 +2946,11 @@ func (s *Retrospectives) PublishReport(ctx context.Context, reportID string, pos req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3287,7 +3323,11 @@ func (s *Retrospectives) ListReportReasons(ctx context.Context, reportID string, req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3642,7 +3682,11 @@ func (s *Retrospectives) CreateReason(ctx context.Context, reportID string, post req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3997,7 +4041,11 @@ func (s *Retrospectives) UpdateReportReasonOrder(ctx context.Context, reportID s req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -4346,7 +4394,11 @@ func (s *Retrospectives) DeleteReason(ctx context.Context, reportID string, reas req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -4702,7 +4754,11 @@ func (s *Retrospectives) UpdateReason(ctx context.Context, reportID string, reas req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/retry/config.go b/retry/config.go index c051b0a..aa4b334 100644 --- a/retry/config.go +++ b/retry/config.go @@ -2,6 +2,15 @@ package retry +import ( + "errors" + "net/http" + "strconv" + "time" +) + +// BackoffStrategy defines the parameters for exponential backoff. This can be +// used to drive a retry loop for example. type BackoffStrategy struct { InitialInterval int MaxInterval int @@ -9,8 +18,128 @@ type BackoffStrategy struct { MaxElapsedTime int } +// Config configures a retry policy. type Config struct { Strategy string Backoff *BackoffStrategy RetryConnectionErrors bool } + +// PermanentError is an error that signals that some operation has terminally +// failed and should not be retried. +type PermanentError struct { + cause error +} + +// Permanent creates a PermanentError that signals to a retry loop that it +// should stop retrying an operation and return the underlying error. +func Permanent(cause error) error { + if IsPermanentError(cause) { + return cause + } + + return &PermanentError{ + cause: cause, + } +} + +func (e *PermanentError) Error() string { + return e.cause.Error() +} + +func (e *PermanentError) Unwrap() error { + return e.cause +} + +// TemporaryError represents a retryable error and signals to a retry loop that +// an operation may be retried with an optional wait interval. +type TemporaryError struct { + wait time.Duration + message string +} + +// Temporary creates a TemporaryError that signals to a retry loop that an +// operation can be retried. The error may also carry details about how long to +// wait before retrying. This wait interval may be used to override the retry +// policy in use. +func Temporary(message string) error { + return &TemporaryError{ + message: message, + } +} + +// TemporaryFromResponse creates a TemporaryError similar to Temporary but +// additionally parses the Retry-After header from a response to determine the +// wait interval before the next retry attempt. +func TemporaryFromResponse(message string, res *http.Response) error { + return &TemporaryError{ + wait: retryIntervalFromResponse(res), + message: message, + } +} + +func (e *TemporaryError) Error() string { + return e.message +} + +// RetryAfter returns the time to wait before retrying the request. The zero +// value should be interpreted by retry loops to mean they should fallback on +// their default policy whether expenonential, constant backoff or something +// else. It does not mean that an operation should be retried immediately. +func (e *TemporaryError) RetryAfter() time.Duration { + return e.wait +} + +func retryIntervalFromResponse(res *http.Response) time.Duration { + if res == nil { + return 0 + } + + retryVal := res.Header.Get("retry-after") + if retryVal == "" { + return 0 + } + + parsedNumber, err := strconv.ParseInt(retryVal, 10, 64) + if err == nil { + if parsedNumber < 0 { + return 0 + } else { + return time.Duration(parsedNumber) * time.Second + } + } + + parsedDate, err := time.Parse(time.RFC1123, retryVal) + if err == nil { + delta := parsedDate.Sub(time.Now()) + if delta < 0 { + return 0 + } else { + return delta + } + } + + return 0 +} + +// IsPermanentError returns true if an error value is or contains a +// PermanentError in its chain of errors. +func IsPermanentError(err error) bool { + if err == nil { + return false + } + + var pe *PermanentError + return errors.As(err, &pe) +} + +// IsTemporaryError returns true if an error value is or contains a +// TemporaryError in its chain of errors. +func IsTemporaryError(err error) bool { + if err == nil { + return false + } + + var pe *TemporaryError + return errors.As(err, &pe) +} diff --git a/runbooks.go b/runbooks.go index d5c8393..594476f 100644 --- a/runbooks.go +++ b/runbooks.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" "net/url" ) @@ -121,7 +121,11 @@ func (s *Runbooks) ListAudits(ctx context.Context, page *int, perPage *int, audi req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -449,7 +453,11 @@ func (s *Runbooks) List(ctx context.Context, request operations.ListRunbooksRequ req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -799,7 +807,11 @@ func (s *Runbooks) Create(ctx context.Context, request components.PostV1Runbooks req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1154,7 +1166,11 @@ func (s *Runbooks) ListActions(ctx context.Context, page *int, perPage *int, typ req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1507,7 +1523,11 @@ func (s *Runbooks) ListExecutions(ctx context.Context, page *int, perPage *int, req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1857,7 +1877,11 @@ func (s *Runbooks) CreateExecution(ctx context.Context, request components.PostV req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2205,7 +2229,11 @@ func (s *Runbooks) GetExecution(ctx context.Context, executionID string, opts .. req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2561,7 +2589,11 @@ func (s *Runbooks) UpdateExecutionStep(ctx context.Context, executionID string, req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2910,7 +2942,11 @@ func (s *Runbooks) GetExecutionStepScript(ctx context.Context, executionID strin req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3260,7 +3296,11 @@ func (s *Runbooks) UpdateExecutionStepScriptState(ctx context.Context, execution req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3616,7 +3656,11 @@ func (s *Runbooks) UpdateExecutionStepVotes(ctx context.Context, executionID str req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3965,7 +4009,11 @@ func (s *Runbooks) GetStepVoteStatus(ctx context.Context, executionID string, st req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -4320,7 +4368,11 @@ func (s *Runbooks) UpdateExecutionVotes(ctx context.Context, executionID string, req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -4668,7 +4720,11 @@ func (s *Runbooks) GetExecutionVoteStatus(ctx context.Context, executionID strin req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -5015,7 +5071,11 @@ func (s *Runbooks) ListSelectOptions(ctx context.Context, request operations.Get req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -5343,7 +5403,11 @@ func (s *Runbooks) Get(ctx context.Context, runbookID string, opts ...operations req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -5699,7 +5763,11 @@ func (s *Runbooks) Update(ctx context.Context, runbookID string, putV1RunbooksRu req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -6047,7 +6115,11 @@ func (s *Runbooks) Delete(ctx context.Context, runbookID string, opts ...operati req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/scim.go b/scim.go index 4da9c75..395778e 100644 --- a/scim.go +++ b/scim.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" "net/url" ) @@ -116,7 +116,11 @@ func (s *Scim) ListGroups(ctx context.Context, startIndex *int, count *int, filt req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -446,7 +450,11 @@ func (s *Scim) Create(ctx context.Context, request components.PostV1ScimV2Groups req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -774,7 +782,11 @@ func (s *Scim) GetGroup(ctx context.Context, id string, opts ...operations.Optio req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1109,7 +1121,11 @@ func (s *Scim) UpdateGroup(ctx context.Context, id string, putV1ScimV2GroupsID c req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1437,7 +1453,11 @@ func (s *Scim) DeleteGroup(ctx context.Context, id string, opts ...operations.Op req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1771,7 +1791,11 @@ func (s *Scim) ListUsers(ctx context.Context, filter *string, startIndex *int, c req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2101,7 +2125,11 @@ func (s *Scim) CreateUser(ctx context.Context, request components.PostV1ScimV2Us req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2429,7 +2457,11 @@ func (s *Scim) GetUser(ctx context.Context, id string, opts ...operations.Option req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2764,7 +2796,11 @@ func (s *Scim) ReplaceUser(ctx context.Context, id string, putV1ScimV2UsersID co req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3092,7 +3128,11 @@ func (s *Scim) DeleteUser(ctx context.Context, id string, opts ...operations.Opt req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3427,7 +3467,11 @@ func (s *Scim) UpdateUser(ctx context.Context, id string, patchV1ScimV2UsersID c req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/services.go b/services.go index 359fc45..24ff0d7 100644 --- a/services.go +++ b/services.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" "net/url" ) @@ -116,7 +116,11 @@ func (s *Services) CreateDependency(ctx context.Context, request components.Post req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -464,7 +468,11 @@ func (s *Services) GetDependency(ctx context.Context, serviceDependencyID string req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -812,7 +820,11 @@ func (s *Services) DeleteDependency(ctx context.Context, serviceDependencyID str req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1167,7 +1179,11 @@ func (s *Services) Update(ctx context.Context, serviceDependencyID string, patch req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1515,7 +1531,11 @@ func (s *Services) List(ctx context.Context, request operations.ListServicesRequ req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1865,7 +1885,11 @@ func (s *Services) Create(ctx context.Context, request components.PostV1Services req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2234,7 +2258,11 @@ func (s *Services) CreateLinks(ctx context.Context, request components.PostV1Ser req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2582,7 +2610,11 @@ func (s *Services) Get(ctx context.Context, serviceID string, opts ...operations req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2930,7 +2962,11 @@ func (s *Services) Delete(ctx context.Context, serviceID string, opts ...operati req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3286,7 +3322,11 @@ func (s *Services) Patch(ctx context.Context, serviceID string, patchV1ServicesS req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3634,7 +3674,11 @@ func (s *Services) GetAvailableDownstreamDependencies(ctx context.Context, servi req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3982,7 +4026,11 @@ func (s *Services) ListAvailableUpstreamDependencies(ctx context.Context, servic req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -4338,7 +4386,11 @@ func (s *Services) CreateChecklistResponse(ctx context.Context, serviceID string req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -4671,7 +4723,11 @@ func (s *Services) ListDependencies(ctx context.Context, serviceID string, flatt req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -5020,7 +5076,11 @@ func (s *Services) DeleteLink(ctx context.Context, serviceID string, remoteID st req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -5354,7 +5414,11 @@ func (s *Services) ListForUser(ctx context.Context, id string, page *int, perPag req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/signals.go b/signals.go index b4a4793..e92b54c 100644 --- a/signals.go +++ b/signals.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" "net/url" ) @@ -114,7 +114,11 @@ func (s *Signals) ListGroupedMetrics(ctx context.Context, request operations.Get req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -442,7 +446,11 @@ func (s *Signals) GetMttxAnalytics(ctx context.Context, request operations.GetSi req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -770,7 +778,11 @@ func (s *Signals) GetAnalyticsTimeseries(ctx context.Context, request operations req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1099,7 +1111,11 @@ func (s *Signals) Debug(ctx context.Context, request components.PostV1SignalsDeb req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1431,7 +1447,11 @@ func (s *Signals) ListEmailTargets(ctx context.Context, query *string, opts ...o req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1761,7 +1781,11 @@ func (s *Signals) CreateEmailTarget(ctx context.Context, request components.Post req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2089,7 +2113,11 @@ func (s *Signals) GetEmailTarget(ctx context.Context, id string, opts ...operati req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2417,7 +2445,11 @@ func (s *Signals) DeleteEmailTarget(ctx context.Context, id string, opts ...oper req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2752,7 +2784,11 @@ func (s *Signals) UpdateEmailTarget(ctx context.Context, id string, patchV1Signa req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3086,7 +3122,11 @@ func (s *Signals) ListEventSources(ctx context.Context, teamID *string, escalati req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3421,7 +3461,11 @@ func (s *Signals) GetIngestURL(ctx context.Context, teamID *string, escalationPo req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3764,7 +3808,11 @@ func (s *Signals) ListTransposers(ctx context.Context, opts ...operations.Option req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -4098,7 +4146,11 @@ func (s *Signals) ListWebhookTargets(ctx context.Context, query *string, page *i req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -4428,7 +4480,11 @@ func (s *Signals) CreateWebhookTarget(ctx context.Context, request components.Po req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -4756,7 +4812,11 @@ func (s *Signals) GetWebhookTarget(ctx context.Context, id string, opts ...opera req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -5084,7 +5144,11 @@ func (s *Signals) DeleteWebhookTarget(ctx context.Context, id string, opts ...op req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -5419,7 +5483,11 @@ func (s *Signals) UpdateWebhookTarget(ctx context.Context, id string, patchV1Sig req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -5751,7 +5819,11 @@ func (s *Signals) ListOnCall(ctx context.Context, teamID *string, opts ...operat req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -6086,7 +6158,11 @@ func (s *Signals) ListEscalationPolicies(ctx context.Context, teamID string, que req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -6415,7 +6491,11 @@ func (s *Signals) DeleteEscalationPolicy(ctx context.Context, teamID string, id req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -6744,7 +6824,11 @@ func (s *Signals) GetOnCallSchedule(ctx context.Context, teamID string, schedule req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -7080,7 +7164,11 @@ func (s *Signals) UpdateOnCallSchedule(ctx context.Context, teamID string, sched req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -7415,7 +7503,11 @@ func (s *Signals) ListRules(ctx context.Context, teamID string, query *string, p req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -7750,7 +7842,11 @@ func (s *Signals) CreateRule(ctx context.Context, teamID string, postV1TeamsTeam req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -8079,7 +8175,11 @@ func (s *Signals) GetRule(ctx context.Context, teamID string, id string, opts .. req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -8408,7 +8508,11 @@ func (s *Signals) DeleteRule(ctx context.Context, teamID string, id string, opts req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -8744,7 +8848,11 @@ func (s *Signals) UpdateRule(ctx context.Context, teamID string, id string, patc req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/slack.go b/slack.go index 6a3e5bc..1a52ab6 100644 --- a/slack.go +++ b/slack.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" "net/url" ) @@ -117,7 +117,11 @@ func (s *Slack) CreateEmojiAction(ctx context.Context, connectionID string, requ req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -453,7 +457,11 @@ func (s *Slack) UpdateEmojiAction(ctx context.Context, connectionID string, emoj req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -776,7 +784,11 @@ func (s *Slack) ListUsergroups(ctx context.Context, opts ...operations.Option) ( req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/statuspage.go b/statuspage.go index b7d7151..a54925d 100644 --- a/statuspage.go +++ b/statuspage.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" ) @@ -116,7 +116,11 @@ func (s *Statuspage) UpdateConnection(ctx context.Context, connectionID string, req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/statuspages.go b/statuspages.go index 50058cc..4717327 100644 --- a/statuspages.go +++ b/statuspages.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" "net/url" ) @@ -111,7 +111,11 @@ func (s *StatusPages) DeleteIncident(ctx context.Context, statusPageID string, i req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -441,7 +445,11 @@ func (s *StatusPages) CreateSubscription(ctx context.Context, request components req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -789,7 +797,11 @@ func (s *StatusPages) DeleteSubscription(ctx context.Context, unsubscribeToken s req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1133,7 +1145,11 @@ func (s *StatusPages) List(ctx context.Context, opts ...operations.Option) (*ope req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1483,7 +1499,11 @@ func (s *StatusPages) Create(ctx context.Context, request operations.CreateStatu req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1831,7 +1851,11 @@ func (s *StatusPages) Get(ctx context.Context, nuncConnectionID string, opts ... req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2186,7 +2210,11 @@ func (s *StatusPages) Update(ctx context.Context, nuncConnectionID string, reque req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2534,7 +2562,11 @@ func (s *StatusPages) Delete(ctx context.Context, nuncConnectionID string, opts req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2889,7 +2921,11 @@ func (s *StatusPages) CreateComponentGroup(ctx context.Context, nuncConnectionID req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3238,7 +3274,11 @@ func (s *StatusPages) DeleteComponentGroup(ctx context.Context, nuncConnectionID req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3574,7 +3614,11 @@ func (s *StatusPages) UpdateComponentGroup(ctx context.Context, nuncConnectionID req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3910,7 +3954,11 @@ func (s *StatusPages) UpdateImage(ctx context.Context, nuncConnectionID string, req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -4259,7 +4307,11 @@ func (s *StatusPages) DeleteImage(ctx context.Context, nuncConnectionID string, req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -4607,7 +4659,11 @@ func (s *StatusPages) CreateLink(ctx context.Context, nuncConnectionID string, o req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -4956,7 +5012,11 @@ func (s *StatusPages) DeleteLink(ctx context.Context, nuncConnectionID string, l req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -5292,7 +5352,11 @@ func (s *StatusPages) UpdateLink(ctx context.Context, nuncConnectionID string, l req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -5620,7 +5684,11 @@ func (s *StatusPages) ListSubscribers(ctx context.Context, nuncConnectionID stri req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -5975,7 +6043,11 @@ func (s *StatusPages) CreateSubscribers(ctx context.Context, nuncConnectionID st req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -6328,7 +6400,11 @@ func (s *StatusPages) DeleteSubscribers(ctx context.Context, nuncConnectionID st req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/statusupdatetemplates.go b/statusupdatetemplates.go index b462747..29f1da9 100644 --- a/statusupdatetemplates.go +++ b/statusupdatetemplates.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" "net/url" ) @@ -112,7 +112,11 @@ func (s *StatusUpdateTemplates) Create(ctx context.Context, request components.P req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/system.go b/system.go index 2c0187c..eeed9db 100644 --- a/system.go +++ b/system.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" "net/url" ) @@ -106,7 +106,11 @@ func (s *System) Ping(ctx context.Context, opts ...operations.Option) (*operatio req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/tasks.go b/tasks.go index 1cedfba..b0449cd 100644 --- a/tasks.go +++ b/tasks.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" "net/url" ) @@ -120,7 +120,11 @@ func (s *Tasks) ListChecklistTemplates(ctx context.Context, page *int, perPage * req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -470,7 +474,11 @@ func (s *Tasks) CreateChecklistTemplate(ctx context.Context, request components. req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -837,7 +845,11 @@ func (s *Tasks) DeleteChecklistTemplate(ctx context.Context, id string, opts ... req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1192,7 +1204,11 @@ func (s *Tasks) UpdateChecklistTemplate(ctx context.Context, id string, patchV1C req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1546,7 +1562,11 @@ func (s *Tasks) ListForIncident(ctx context.Context, incidentID string, page *in req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1901,7 +1921,11 @@ func (s *Tasks) Create(ctx context.Context, incidentID string, postV1IncidentsIn req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2250,7 +2274,11 @@ func (s *Tasks) GetForIncident(ctx context.Context, taskID string, incidentID st req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2579,7 +2607,11 @@ func (s *Tasks) Delete(ctx context.Context, taskID string, incidentID string, op req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2915,7 +2947,11 @@ func (s *Tasks) UpdateTask(ctx context.Context, taskID string, incidentID string req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3271,7 +3307,11 @@ func (s *Tasks) ConvertToFollowup(ctx context.Context, taskID string, incidentID req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3624,7 +3664,11 @@ func (s *Tasks) ListTasks(ctx context.Context, page *int, perPage *int, opts ... req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3974,7 +4018,11 @@ func (s *Tasks) CreateList(ctx context.Context, request components.PostV1TaskLis req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -4322,7 +4370,11 @@ func (s *Tasks) Get(ctx context.Context, taskListID string, opts ...operations.O req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -4677,7 +4729,11 @@ func (s *Tasks) Update(ctx context.Context, taskListID string, patchV1TaskListsT req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/teams.go b/teams.go index 570f530..fc32b08 100644 --- a/teams.go +++ b/teams.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" "net/url" ) @@ -116,7 +116,11 @@ func (s *Teams) ListSchedules(ctx context.Context, query *string, page *int, per req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -464,7 +468,11 @@ func (s *Teams) List(ctx context.Context, request operations.ListTeamsRequest, o req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -814,7 +822,11 @@ func (s *Teams) Create(ctx context.Context, request components.PostV1Teams, opts req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1167,7 +1179,11 @@ func (s *Teams) Get(ctx context.Context, teamID string, lite *bool, opts ...oper req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1515,7 +1531,11 @@ func (s *Teams) Archive(ctx context.Context, teamID string, opts ...operations.O req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1870,7 +1890,11 @@ func (s *Teams) Update(ctx context.Context, teamID string, patchV1TeamsTeamID co req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2225,7 +2249,11 @@ func (s *Teams) ListOnCallSchedules(ctx context.Context, teamID string, query *s req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2560,7 +2588,11 @@ func (s *Teams) CreateOnCallSchedule(ctx context.Context, teamID string, postV1T req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -2890,7 +2922,11 @@ func (s *Teams) GetScheduleShift(ctx context.Context, id string, teamID string, req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3220,7 +3256,11 @@ func (s *Teams) DeleteScheduleShift(ctx context.Context, id string, teamID strin req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3557,7 +3597,11 @@ func (s *Teams) UpdateScheduleShift(ctx context.Context, id string, teamID strin req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -3892,7 +3936,11 @@ func (s *Teams) CreateEscalationPolicy(ctx context.Context, teamID string, postV req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -4228,7 +4276,11 @@ func (s *Teams) UpdateEscalationPolicy(ctx context.Context, teamID string, id st req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -4564,7 +4616,11 @@ func (s *Teams) CreateShift(ctx context.Context, teamID string, scheduleID strin req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/tests/accountsettings_test.go b/tests/accountsettings_test.go deleted file mode 100644 index f0c2ee3..0000000 --- a/tests/accountsettings_test.go +++ /dev/null @@ -1,106 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "firehydrant/models/operations" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestAccountSettings_GetAiPreferences(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.AccountSettings.GetAiPreferences(ctx) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestAccountSettings_UpdateAiPreferences(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.AccountSettings.UpdateAiPreferences(ctx, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestAccountSettings_VoteOnIncidentSummary(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.AccountSettings.VoteOnIncidentSummary(ctx, "", "", operations.VoteOnIncidentSummaryRequestBody{ - Direction: operations.DirectionDown, - }) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestAccountSettings_GetBootstrap(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.AccountSettings.GetBootstrap(ctx) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestAccountSettings_ListEntitlements(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.AccountSettings.ListEntitlements(ctx, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestAccountSettings_APIPingNoAuth(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.AccountSettings.Ping(ctx) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestAccountSettings_GetSavedSearch(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.AccountSettings.GetSavedSearch(ctx, operations.GetSavedSearchPathParamResourceTypeImpactAnalytics, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestAccountSettings_DeleteSavedSearch(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.AccountSettings.DeleteSavedSearch(ctx, operations.DeleteSavedSearchPathParamResourceTypeScheduledMaintenances, "") - require.NoError(t, err) - assert.Equal(t, 204, res.HTTPMeta.Response.StatusCode) -} - -func TestAccountSettings_UpdateSavedSearch(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} diff --git a/tests/alerts_test.go b/tests/alerts_test.go deleted file mode 100644 index fc80fce..0000000 --- a/tests/alerts_test.go +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "firehydrant/models/operations" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestAlerts_ListAlerts(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Alerts.List(ctx, operations.ListAlertsRequest{}) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestAlerts_GetAlert(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Alerts.Get(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestAlerts_ListIncidentAlerts(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Alerts.ListForIncident(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestAlerts_CreateIncidentAlerts(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Alerts.Create(ctx, "", []string{ - "", - }) - require.NoError(t, err) - assert.Equal(t, 204, res.HTTPMeta.Response.StatusCode) -} - -func TestAlerts_ListAlertProcessingLogs(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Alerts.ListProcessingLogs(ctx, operations.ListAlertProcessingLogsRequest{}) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/aws_test.go b/tests/aws_test.go deleted file mode 100644 index 53f88ba..0000000 --- a/tests/aws_test.go +++ /dev/null @@ -1,26 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestAws_GetAwsCloudTrailBatch(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Integrations.Aws.GetCloudTrailBatch(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestAws_UpdateAwsConnection(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} diff --git a/tests/awscloudtrailbatchevents_test.go b/tests/awscloudtrailbatchevents_test.go deleted file mode 100644 index 4b94c00..0000000 --- a/tests/awscloudtrailbatchevents_test.go +++ /dev/null @@ -1,22 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestAwsCloudtrailBatchEvents_GetAwsCloudtrailBatchEvents(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.AwsCloudtrailBatchEvents.List(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/awsconnections_test.go b/tests/awsconnections_test.go deleted file mode 100644 index 1bcc012..0000000 --- a/tests/awsconnections_test.go +++ /dev/null @@ -1,34 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "firehydrant/models/operations" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestAwsConnections_ListAwsConnections(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.AwsConnections.List(ctx, operations.ListAwsConnectionsRequest{}) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestAwsConnections_GetAwsConnection(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.AwsConnections.Get(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/catalogs_test.go b/tests/catalogs_test.go deleted file mode 100644 index cc860a4..0000000 --- a/tests/catalogs_test.go +++ /dev/null @@ -1,37 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "firehydrant/models/components" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestCatalogs_IngestCatalogData(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Services.Catalogs.Ingest(ctx, "", components.PostV1CatalogsCatalogIDIngest{ - Encoding: components.EncodingApplicationJSON, - Data: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestCatalogs_RefreshCatalog(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Services.Catalogs.Refresh(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/changes_test.go b/tests/changes_test.go deleted file mode 100644 index ae78c00..0000000 --- a/tests/changes_test.go +++ /dev/null @@ -1,169 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "firehydrant/models/components" - "firehydrant/models/operations" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestChanges_ListChangeTypes(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Changes.ListTypes(ctx, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestChanges_ListChanges(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Changes.List(ctx, nil, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestChanges_CreateChange(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestChanges_ListChangeEvents(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Changes.ListEvents(ctx, operations.ListChangeEventsRequest{}) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestChanges_CreateChangeEvent(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Changes.CreateEvent(ctx, components.ChangesEvents{ - Summary: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestChanges_GetChangeEvent(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Changes.GetEvent(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestChanges_DeleteChangeEvent(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Changes.DeleteEvent(ctx, "") - require.NoError(t, err) - assert.Equal(t, 204, res.HTTPMeta.Response.StatusCode) -} - -func TestChanges_UpdateChangeEvent(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestChanges_DeleteChange(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Changes.Delete(ctx, "") - require.NoError(t, err) - assert.Equal(t, 204, res.HTTPMeta.Response.StatusCode) -} - -func TestChanges_UpdateChange(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestChanges_ListChangeIdentities(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Changes.ListIdentities(ctx, "", nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestChanges_CreateChangeIdentity(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Changes.CreateIdentity(ctx, "", components.PostV1ChangesChangeIDIdentities{ - Type: "", - Value: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestChanges_DeleteChangeIdentity(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Changes.DeleteIdentity(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 204, res.HTTPMeta.Response.StatusCode) -} - -func TestChanges_UpdateChangeIdentity(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Changes.UpdateIdentity(ctx, "", "", components.PatchV1ChangesChangeIDIdentitiesIdentityID{ - Type: "", - Value: "", - }) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestChanges_GetScheduledMaintenance(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Changes.Get(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestChanges_UpdateScheduledMaintenance(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} diff --git a/tests/checklisttemplates_test.go b/tests/checklisttemplates_test.go deleted file mode 100644 index 313bf35..0000000 --- a/tests/checklisttemplates_test.go +++ /dev/null @@ -1,22 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestChecklistTemplates_GetChecklistTemplate(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.ChecklistTemplates.Get(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/communication_test.go b/tests/communication_test.go deleted file mode 100644 index a32d62a..0000000 --- a/tests/communication_test.go +++ /dev/null @@ -1,44 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestCommunication_ListStatusUpdateTemplates(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Communication.ListTemplates(ctx, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestCommunication_GetStatusUpdateTemplate(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Communication.GetTemplate(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestCommunication_DeleteStatusUpdateTemplate(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Communication.DeleteStatusUpdateTemplate(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/confluence_test.go b/tests/confluence_test.go deleted file mode 100644 index 3d80d80..0000000 --- a/tests/confluence_test.go +++ /dev/null @@ -1,22 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestConfluence_ListConfluenceSpaces(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Confluence.ListSpaces(ctx, "", nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/conversations_test.go b/tests/conversations_test.go deleted file mode 100644 index fc934e7..0000000 --- a/tests/conversations_test.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "firehydrant/models/components" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestConversations_ListConversationComments(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Conversations.ListComments(ctx, "", nil, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestConversations_CreateConversationComment(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Conversations.CreateComment(ctx, "", components.PostV1ConversationsConversationIDComments{ - Body: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestConversations_GetConversationComment(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Conversations.GetComment(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestConversations_DeleteConversationComment(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Conversations.DeleteComment(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 204, res.HTTPMeta.Response.StatusCode) -} - -func TestConversations_UpdateConversationComment(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestConversations_ListConversationCommentReactions(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Conversations.ListCommentReactions(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestConversations_CreateConversationCommentReaction(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Conversations.CreateCommentReaction(ctx, "", "", components.PostV1ConversationsConversationIDCommentsCommentIDReactions{ - Reaction: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestConversations_DeleteConversationCommentReaction(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Conversations.DeleteCommentReaction(ctx, "", "", "") - require.NoError(t, err) - assert.Equal(t, 204, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/environments_test.go b/tests/environments_test.go deleted file mode 100644 index a97fa14..0000000 --- a/tests/environments_test.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "firehydrant/models/components" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestEnvironments_ListEnvironments(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Environments.List(ctx, nil, nil, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestEnvironments_CreateEnvironment(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Environments.Create(ctx, components.PostV1Environments{ - Name: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestEnvironments_GetEnvironment(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Environments.Get(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestEnvironments_DeleteEnvironment(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Environments.Delete(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestEnvironments_UpdateEnvironment(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Environments.Update(ctx, "", components.PatchV1EnvironmentsEnvironmentID{ - Name: "", - }) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/executions_test.go b/tests/executions_test.go deleted file mode 100644 index 86c3772..0000000 --- a/tests/executions_test.go +++ /dev/null @@ -1,22 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestExecutions_DeleteRunbookExecution(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Runbooks.Executions.Delete(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 204, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/files.go b/tests/files.go deleted file mode 100644 index 5dfa6c9..0000000 --- a/tests/files.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "io" - "os" -) - -func readFileToStream(fileName string) io.Reader { - s, err := os.Open(fileName) - if err != nil { - panic(err) - } - return s -} - -func readFileToBytes(fileName string) []byte { - data, err := os.ReadFile(fileName) - if err != nil { - panic(err) - } - return data -} - -func readFileToString(fileName string) string { - data, err := os.ReadFile(fileName) - if err != nil { - panic(err) - } - return string(data) -} - -func readBytes(r io.Reader) []byte { - data, err := io.ReadAll(r) - if err != nil { - panic(err) - } - return data -} diff --git a/tests/firehydrantsignalsteams_test.go b/tests/firehydrantsignalsteams_test.go deleted file mode 100644 index 40844fc..0000000 --- a/tests/firehydrantsignalsteams_test.go +++ /dev/null @@ -1,22 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestFireHydrantSignalsTeams_GetTeamEscalationPolicy(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Signals.Teams.GetEscalationPolicy(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/firehydrantslack_test.go b/tests/firehydrantslack_test.go deleted file mode 100644 index fe35e1a..0000000 --- a/tests/firehydrantslack_test.go +++ /dev/null @@ -1,44 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestFireHydrantSlack_GetSlackEmojiAction(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Integrations.Slack.GetEmojiAction(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestFireHydrantSlack_DeleteSlackEmojiAction(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Integrations.Slack.DeleteEmojiAction(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 204, res.HTTPMeta.Response.StatusCode) -} - -func TestFireHydrantSlack_GetSlackWorkspaces(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Integrations.Slack.ListWorkspaces(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/firehydrantstatuspage_test.go b/tests/firehydrantstatuspage_test.go deleted file mode 100644 index 9f6aba6..0000000 --- a/tests/firehydrantstatuspage_test.go +++ /dev/null @@ -1,33 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestFireHydrantStatuspage_ListStatuspageConnections(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Integrations.Statuspage.ListConnections(ctx, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestFireHydrantStatuspage_ListStatuspagePages(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Integrations.Statuspage.ListPages(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/firehydrantticketing_test.go b/tests/firehydrantticketing_test.go deleted file mode 100644 index 747862e..0000000 --- a/tests/firehydrantticketing_test.go +++ /dev/null @@ -1,33 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestFireHydrantTicketing_GetTicketingProject(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Integrations.Ticketing.GetProject(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestFireHydrantTicketing_ListTicketTags(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Integrations.Ticketing.ListTags(ctx, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/functionalities_test.go b/tests/functionalities_test.go deleted file mode 100644 index 6673670..0000000 --- a/tests/functionalities_test.go +++ /dev/null @@ -1,74 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "firehydrant/models/components" - "firehydrant/models/operations" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestFunctionalities_ListFunctionalities(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Functionalities.List(ctx, operations.ListFunctionalitiesRequest{}) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestFunctionalities_CreateFunctionality(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Functionalities.Create(ctx, components.PostV1Functionalities{ - Name: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestFunctionalities_GetFunctionality(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Functionalities.Get(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestFunctionalities_DeleteFunctionality(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Functionalities.Delete(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestFunctionalities_UpdateFunctionality(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestFunctionalities_GetFunctionalityServices(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Functionalities.ListServices(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/incidents_test.go b/tests/incidents_test.go deleted file mode 100644 index 1721255..0000000 --- a/tests/incidents_test.go +++ /dev/null @@ -1,598 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "firehydrant/models/components" - "firehydrant/models/operations" - "firehydrant/types" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "os" - "testing" -) - -func TestIncidents_GetIncidentAiSummaryVoteStatus(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.GetAiSummaryVoteStatus(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_ListIncidents(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.List(ctx, operations.ListIncidentsRequest{}) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_CreateIncident(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.Create(ctx, components.PostV1Incidents{ - Name: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_GetIncident(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.Get(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_ArchiveIncident(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.Archive(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_UpdateIncident(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestIncidents_DeleteIncidentAlert(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.DeleteAlert(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 204, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_SetIncidentAlertAsPrimary(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.SetAlertAsPrimary(ctx, "", "", components.PatchV1IncidentsIncidentIDAlertsIncidentAlertIDPrimary{ - Primary: false, - }) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_ListIncidentAttachments(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.ListAttachments(ctx, "", nil, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_CreateIncidentAttachment(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - content, fileErr := os.Open("../.speakeasy/testfiles/example.file") - require.NoError(t, fileErr) - - ctx := context.Background() - res, err := s.Incidents.CreateAttachment(ctx, "", operations.CreateIncidentAttachmentRequestBody{ - File: operations.File{ - FileName: "example.file", - Content: content, - }, - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_GetIncidentChannel(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.GetChannel(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_CloseIncident(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.Close(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_ListIncidentEvents(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.ListEvents(ctx, "", nil, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_GetIncidentEvent(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.GetEvent(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_DeleteIncidentEvent(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.DeleteEvent(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_UpdateIncidentEvent(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.UpdateEvent(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_UpdateIncidentEventVotes(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.UpdateEventVotes(ctx, "", "", components.PatchV1IncidentsIncidentIDEventsEventIDVotes{ - Direction: components.DirectionDig, - }) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_GetIncidentEventVoteStatus(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.GetEventVoteStatus(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_CreateIncidentGenericChatMessage(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.CreateGenericChatMessage(ctx, "", components.PostV1IncidentsIncidentIDGenericChatMessages{ - Body: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_DeleteIncidentChatMessage(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.DeleteChatMessage(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_UpdateIncidentChatMessage(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.UpdateChatMessage(ctx, "", "", components.PatchV1IncidentsIncidentIDGenericChatMessagesMessageID{ - Body: "", - }) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_UpdateIncidentImpacts(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestIncidents_PartialUpdateIncidentImpacts(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestIncidents_ListIncidentImpact(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.ListImpact(ctx, "", operations.PathParamTypeEnvironments) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_CreateIncidentImpact(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.CreateImpact(ctx, "", operations.CreateIncidentImpactPathParamTypeServices, components.PostV1IncidentsIncidentIDImpactType{ - ID: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_DeleteIncidentImpact(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.DeleteImpact(ctx, "", operations.DeleteIncidentImpactPathParamTypeServices, "") - require.NoError(t, err) - assert.Equal(t, 204, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_ListIncidentLinks(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.ListLinks(ctx, "", nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_CreateIncidentLink(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.CreateLink(ctx, "", components.PostV1IncidentsIncidentIDLinks{ - Href: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_UpdateIncidentLink(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestIncidents_DeleteIncidentLink(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.DeleteLink(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 204, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_ListIncidentMilestones(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.ListMilestones(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_UpdateIncidentMilestonesBulk(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.UpdateMilestonesBulk(ctx, "", components.PutV1IncidentsIncidentIDMilestonesBulkUpdate{ - Milestones: []components.PutV1IncidentsIncidentIDMilestonesBulkUpdateMilestones{ - components.PutV1IncidentsIncidentIDMilestonesBulkUpdateMilestones{ - Type: "", - OccurredAt: types.MustTimeFromString("2023-05-22T05:39:43.411Z"), - }, - }, - }) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_CreateIncidentNote(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.CreateNote(ctx, "", components.PostV1IncidentsIncidentIDNotes{ - Body: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_UpdateIncidentNote(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.UpdateNote(ctx, "", "", components.PatchV1IncidentsIncidentIDNotesNoteID{ - Body: "", - }) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_ListIncidentRelatedChanges(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.ListRelatedChangeEvents(ctx, "", nil, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_CreateIncidentRelatedChange(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.CreateRelatedChange(ctx, "", components.PostV1IncidentsIncidentIDRelatedChangeEvents{ - ChangeEventID: "", - Type: components.PostV1IncidentsIncidentIDRelatedChangeEventsTypeFixed, - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_UpdateIncidentRelatedChangeEvent(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestIncidents_GetIncidentRelationships(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.GetRelationships(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_ResolveIncident(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.Resolve(ctx, "", nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_ListIncidentRoleAssignments(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.ListRoleAssignments(ctx, "", nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_CreateIncidentRoleAssignment(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.CreateRoleAssignment(ctx, "", components.PostV1IncidentsIncidentIDRoleAssignments{ - UserID: "", - IncidentRoleID: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_DeleteIncidentRoleAssignment(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.DeleteRoleAssignment(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_GetSimilarIncidents(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.ListSimilar(ctx, "", nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_ListIncidentStatusPages(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.ListStatusPages(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_CreateIncidentStatusPage(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.AddStatusPage(ctx, "", components.PostV1IncidentsIncidentIDStatusPages{ - IntegrationSlug: "", - IntegrationID: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_CreateIncidentTaskList(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.CreateTaskList(ctx, "", components.PostV1IncidentsIncidentIDTaskLists{ - TaskListID: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_CreateIncidentTeamAssignment(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.CreateTeamAssignment(ctx, "", components.PostV1IncidentsIncidentIDTeamAssignments{ - TeamID: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_DeleteIncidentTeamAssignment(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.DeleteTeamAssignment(ctx, "", "", nil) - require.NoError(t, err) - assert.Equal(t, 204, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_GetIncidentTranscript(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.GetTranscript(ctx, "", nil, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_DeleteIncidentTranscript(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.DeleteTranscript(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 204, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_UnarchiveIncident(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.Unarchive(ctx, "") - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidents_GetIncidentUserRole(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Incidents.GetUserRole(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/incidentsettings_test.go b/tests/incidentsettings_test.go deleted file mode 100644 index ace4d27..0000000 --- a/tests/incidentsettings_test.go +++ /dev/null @@ -1,506 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "firehydrant/models/components" - "firehydrant/models/operations" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestIncidentSettings_ListCustomFieldDefinitions(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.ListCustomFieldDefinitions(ctx) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_CreateCustomFieldDefinition(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.CreateCustomFieldDefinition(ctx, components.PostV1CustomFieldsDefinitions{ - DisplayName: "Juvenal_Herman70", - FieldType: "", - Required: true, - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_DeleteCustomFieldDefinition(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.DeleteCustomFieldDefinition(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_UpdateCustomFieldDefinition(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestIncidentSettings_GetCustomFieldSelectOptions(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.ListSelectOptions(ctx, "", nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_GetFormConfiguration(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.GetFormConfiguration(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_ListIncidentRoles(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.ListRoles(ctx, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_CreateIncidentRole(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.CreateIncidentRole(ctx, components.PostV1IncidentRoles{ - Name: "", - Summary: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_GetIncidentRole(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.GetIncidentRole(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_DeleteIncidentRole(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.DeleteRole(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_UpdateIncidentRole(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestIncidentSettings_ListIncidentTags(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.ListIncidentTags(ctx, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_ValidateIncidentTags(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.ValidateIncidentTags(ctx, []string{ - "", - "", - "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_ListIncidentTypes(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.ListIncidentTypes(ctx, nil, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_CreateIncidentType(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.CreateIncidentType(ctx, components.PostV1IncidentTypes{ - Name: "", - Template: components.Template{}, - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_GetIncidentType(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.GetIncidentType(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_ArchiveIncidentType(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.ArchiveIncidentType(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_UpdateIncidentType(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.UpdateType(ctx, "", components.PatchV1IncidentTypesID{ - Name: "", - Template: components.PatchV1IncidentTypesIDTemplate{}, - }) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_CreateLifecycleMilestone(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.CreateMilestone(ctx, operations.CreateLifecycleMilestoneRequestBody{ - Name: "", - Description: "how in redraw dependable cash apropos", - PhaseID: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_DeleteLifecycleMilestone(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.DeleteLifecycleMilestone(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_UpdateLifecycleMilestone(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.UpdateLifecycleMilestone(ctx, "", nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_ListLifecyclePhases(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.ListLifecyclePhases(ctx) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_ListPriorities(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.ListPriorities(ctx, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_CreatePriority(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.CreatePriority(ctx, components.PostV1Priorities{ - Slug: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_GetPriority(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.GetPriority(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_DeletePriority(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.DeletePriority(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_UpdatePriority(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestIncidentSettings_ListSeverities(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.ListSeverities(ctx, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_CreateSeverity(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.CreateSeverity(ctx, components.PostV1Severities{ - Slug: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_GetSeverity(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.GetSeverity(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_DeleteSeverity(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.DeleteSeverity(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_UpdateSeverity(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestIncidentSettings_GetSeverityMatrix(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.GetSeverityMatrix(ctx) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_UpdateSeverityMatrix(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.UpdateSeverityMatrix(ctx, components.PatchV1SeverityMatrix{ - Data: []components.PatchV1SeverityMatrixData{ - components.PatchV1SeverityMatrixData{ - Severity: "", - ImpactID: "", - ConditionID: "", - }, - }, - }) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_ListSeverityMatrixConditions(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.ListSeverityMatrixConditions(ctx, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_CreateSeverityMatrixCondition(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.CreateSeverityMatrixCondition(ctx, components.PostV1SeverityMatrixConditions{ - Name: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_GetSeverityMatrixCondition(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.GetSeverityMatrixCondition(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_DeleteSeverityMatrixCondition(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.DeleteSeverityMatrixCondition(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_UpdateSeverityMatrixCondition(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestIncidentSettings_ListSeverityMatrixImpacts(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.ListSeverityMatrixImpacts(ctx, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_CreateSeverityMatrixImpact(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.CreateImpact(ctx, components.PostV1SeverityMatrixImpacts{ - AffectsType: "", - AffectsID: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_DeleteSeverityMatrixImpact(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.DeleteSeverityMatrixImpact(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_UpdateSeverityMatrixImpact(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestIncidentSettings_ListTicketingPriorities(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.ListTicketingPriorities(ctx) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIncidentSettings_CreateTicketingPriority(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.IncidentSettings.CreateTicketingPriority(ctx, components.PostV1TicketingPriorities{ - Name: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/infrastructures_test.go b/tests/infrastructures_test.go deleted file mode 100644 index 9d9134b..0000000 --- a/tests/infrastructures_test.go +++ /dev/null @@ -1,23 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "firehydrant/models/operations" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestInfrastructures_ListInfrastructures(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Infrastructures.List(ctx, operations.ListInfrastructuresRequest{}) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/integrations_test.go b/tests/integrations_test.go deleted file mode 100644 index 3797d55..0000000 --- a/tests/integrations_test.go +++ /dev/null @@ -1,273 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "firehydrant/models/operations" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestIntegrations_ListIntegrations(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Integrations.List(ctx) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIntegrations_ListAwsCloudtrailBatches(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Integrations.ListCloudtrailBatches(ctx, nil, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIntegrations_UpdateAwsCloudTrailBatch(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestIntegrations_ListIntegrationConnections(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Integrations.ListConnections(ctx, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIntegrations_CreateIntegrationConnection(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Integrations.CreateConnection(ctx, "") - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestIntegrations_UpdateIntegrationConnection(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Integrations.UpdateConnection(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIntegrations_RefreshIntegrationConnection(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Integrations.RefreshConnection(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIntegrations_UpdateIntegrationFieldMap(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Integrations.UpdateFieldMap(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIntegrations_GetIntegrationFieldMapAvailableFields(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Integrations.GetFieldMapAvailableFields(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIntegrations_ListSlackEmojiActions(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Integrations.ListEmojiActions(ctx, "", nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIntegrations_GetIntegrationStatus(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Integrations.GetStatus(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIntegrations_GetStatuspageConnection(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Integrations.GetStatuspageConnection(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIntegrations_DeleteStatuspageConnection(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Integrations.DeleteStatuspageConnection(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIntegrations_GetIntegration(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Integrations.Get(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIntegrations_DeleteTicketingPriority(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Integrations.DeletePriority(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIntegrations_UpdateTicketingPriority(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestIntegrations_ListTicketingProjects(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Integrations.ListProjects(ctx, operations.ListTicketingProjectsRequest{}) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIntegrations_GetTicketingProjectConfigurationOptions(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Integrations.GetProjectConfigurationOptions(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIntegrations_GetTicketingProjectFieldOptions(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Integrations.GetProjectFieldOptions(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIntegrations_CreateTicketingProjectFieldMap(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Integrations.CreateFieldMap(ctx, "") - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestIntegrations_GetTicketingProjectAvailableFields(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Integrations.GetAvailableFields(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIntegrations_DeleteTicketingProjectFieldMap(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Integrations.DeleteFieldMap(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 204, res.HTTPMeta.Response.StatusCode) -} - -func TestIntegrations_UpdateTicketingProjectFieldMap(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Integrations.UpdateTicketingFieldMap(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIntegrations_DeleteTicketingProjectConfig(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Integrations.DeleteProjectConfig(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestIntegrations_GetTicket(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Integrations.GetTicket(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/list_test.go b/tests/list_test.go deleted file mode 100644 index ca4ca44..0000000 --- a/tests/list_test.go +++ /dev/null @@ -1,22 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestList_DeleteTaskList(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Tasks.List.Delete(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/maintenances_test.go b/tests/maintenances_test.go deleted file mode 100644 index 9b01824..0000000 --- a/tests/maintenances_test.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "firehydrant/models/components" - "firehydrant/types" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestMaintenances_ListScheduledMaintenances(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Maintenances.List(ctx, nil, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestMaintenances_CreateScheduledMaintenance(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Maintenances.Create(ctx, components.PostV1ScheduledMaintenances{ - Name: "", - StartsAt: types.MustTimeFromString("2023-04-18T00:41:46.120Z"), - EndsAt: types.MustTimeFromString("2024-01-18T06:46:27.056Z"), - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestMaintenances_DeleteScheduledMaintenance(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Maintenances.Delete(ctx, "") - require.NoError(t, err) - assert.Equal(t, 204, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/metrics_test.go b/tests/metrics_test.go deleted file mode 100644 index 60a2d77..0000000 --- a/tests/metrics_test.go +++ /dev/null @@ -1,38 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "firehydrant/models/operations" - "firehydrant/types" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestMetrics_GetV1MetricsMttx(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Metrics.GetMttx(ctx, operations.GetV1MetricsMttxRequest{ - StartDate: types.MustDateFromString("2024-12-27"), - EndDate: types.MustDateFromString("2024-02-03"), - }) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestMetrics_GetInfrastructureMetrics(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Metrics.GetInfrastructure(ctx, operations.PathParamInfraTypeFunctionalities, "", nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/metricsreporting_test.go b/tests/metricsreporting_test.go deleted file mode 100644 index 25332a1..0000000 --- a/tests/metricsreporting_test.go +++ /dev/null @@ -1,176 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "firehydrant/models/components" - "firehydrant/models/operations" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestMetricsReporting_ListMeasurementDefinitions(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.MetricsReporting.ListMeasurementDefinitions(ctx, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestMetricsReporting_CreateMeasurementDefinition(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.MetricsReporting.CreateMeasurementDefinition(ctx, operations.CreateMeasurementDefinitionRequestBody{ - Name: "", - StartsAtMilestoneID: "", - EndsAtMilestoneID: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestMetricsReporting_GetMeasurementDefinition(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.MetricsReporting.GetMeasurementDefinition(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestMetricsReporting_DeleteMeasurementDefinition(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.MetricsReporting.DeleteMeasurementDefinition(ctx, "") - require.NoError(t, err) - assert.Equal(t, 204, res.HTTPMeta.Response.StatusCode) -} - -func TestMetricsReporting_UpdateMeasurementDefinition(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.MetricsReporting.UpdateMeasurementDefinition(ctx, "", nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestMetricsReporting_ListIncidentMetrics(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.MetricsReporting.ListIncidentMetrics(ctx, operations.ListIncidentMetricsRequest{}) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestMetricsReporting_GetMilestoneFunnelMetrics(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.MetricsReporting.GetMilestoneFunnelMetrics(ctx, operations.GetMilestoneFunnelMetricsRequest{}) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestMetricsReporting_ListRetrospectiveMetrics(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.MetricsReporting.ListRetrospectives(ctx, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestMetricsReporting_GetTicketFunnelMetrics(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.MetricsReporting.GetTicketFunnel(ctx, operations.GetTicketFunnelMetricsRequest{}) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestMetricsReporting_ListUserInvolvementMetrics(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.MetricsReporting.ListUserInvolvementMetrics(ctx, operations.ListUserInvolvementMetricsRequest{}) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestMetricsReporting_ListInfrastructureMetrics(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.MetricsReporting.ListInfrastructureMetrics(ctx, operations.InfraTypeServices, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestMetricsReporting_GetMeanTimeReport(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.MetricsReporting.GetMeanTime(ctx, operations.GetMeanTimeReportRequest{}) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestMetricsReporting_ListSavedSearches(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.MetricsReporting.ListSavedSearches(ctx, operations.ListSavedSearchesRequest{ - ResourceType: operations.ResourceTypeIncidentEvents, - }) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestMetricsReporting_CreateSavedSearch(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.MetricsReporting.CreateSavedSearch(ctx, operations.PathParamResourceTypeTicketFollowUps, components.PostV1SavedSearchesResourceType{ - Name: "", - FilterValues: map[string]any{}, - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/oncallschedules_test.go b/tests/oncallschedules_test.go deleted file mode 100644 index ce98a03..0000000 --- a/tests/oncallschedules_test.go +++ /dev/null @@ -1,22 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestOnCallSchedules_DeleteTeamOnCallSchedule(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.OnCallSchedules.Delete(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 204, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/projectconfigurations_test.go b/tests/projectconfigurations_test.go deleted file mode 100644 index e2f8513..0000000 --- a/tests/projectconfigurations_test.go +++ /dev/null @@ -1,33 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestProjectConfigurations_CreateTicketingProjectConfiguration(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.ProjectConfigurations.Create(ctx, "") - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestProjectConfigurations_GetTicketingProjectConfig(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.ProjectConfigurations.Get(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/retrospectives_test.go b/tests/retrospectives_test.go deleted file mode 100644 index b8b000a..0000000 --- a/tests/retrospectives_test.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "firehydrant/models/components" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestRetrospectives_ListRetrospectiveQuestions(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Retrospectives.ListQuestions(ctx, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestRetrospectives_UpdateRetrospectiveQuestions(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestRetrospectives_GetRetrospectiveQuestion(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Retrospectives.GetQuestion(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestRetrospectives_ListRetrospectiveReports(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Retrospectives.ListReports(ctx, nil, nil, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestRetrospectives_CreateRetrospectiveReport(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Retrospectives.CreateReport(ctx, components.PostV1PostMortemsReports{ - IncidentID: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestRetrospectives_GetPostMortemReport(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Retrospectives.GetReport(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestRetrospectives_UpdatePostMortemReport(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestRetrospectives_UpdateRetrospectiveField(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Retrospectives.UpdateField(ctx, "", "", components.PatchV1PostMortemsReportsReportIDFieldsFieldID{ - Value: "", - }) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestRetrospectives_PublishRetrospectiveReport(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestRetrospectives_ListRetrospectiveReportReasons(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Retrospectives.ListReportReasons(ctx, "", nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestRetrospectives_CreateRetrospectiveReportReason(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Retrospectives.CreateReason(ctx, "", components.PostV1PostMortemsReportsReportIDReasons{ - Summary: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestRetrospectives_UpdateRetrospectiveReportReasonOrder(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Retrospectives.UpdateReportReasonOrder(ctx, "", components.PutV1PostMortemsReportsReportIDReasonsOrder{ - OldPosition: 868580, - NewPosition: 521651, - }) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestRetrospectives_DeleteRetrospectiveReason(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Retrospectives.DeleteReason(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestRetrospectives_UpdateRetrospectiveReason(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} diff --git a/tests/runbooks_test.go b/tests/runbooks_test.go deleted file mode 100644 index 8619afc..0000000 --- a/tests/runbooks_test.go +++ /dev/null @@ -1,220 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "firehydrant/models/components" - "firehydrant/models/operations" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestRunbooks_ListRunbookAudits(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Runbooks.ListAudits(ctx, nil, nil, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestRunbooks_ListRunbooks(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Runbooks.List(ctx, operations.ListRunbooksRequest{}) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestRunbooks_CreateRunbook(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Runbooks.Create(ctx, components.PostV1Runbooks{ - Name: "", - Type: components.PostV1RunbooksTypeIncident, - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestRunbooks_ListRunbookActions(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Runbooks.ListActions(ctx, nil, nil, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestRunbooks_ListRunbookExecutions(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Runbooks.ListExecutions(ctx, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestRunbooks_CreateRunbookExecution(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Runbooks.CreateExecution(ctx, components.PostV1RunbooksExecutions{ - ExecuteFor: "", - RunbookID: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestRunbooks_GetRunbookExecution(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Runbooks.GetExecution(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestRunbooks_UpdateRunbookExecutionStep(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Runbooks.UpdateExecutionStep(ctx, "", "", components.PutV1RunbooksExecutionsExecutionIDStepsStepID{ - State: "South Carolina", - }) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestRunbooks_GetRunbookExecutionStepScript(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Runbooks.GetExecutionStepScript(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestRunbooks_UpdateRunbookExecutionStepScriptState(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Runbooks.UpdateExecutionStepScriptState(ctx, "", "", "Mississippi") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestRunbooks_UpdateRunbookExecutionStepVotes(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Runbooks.UpdateExecutionStepVotes(ctx, "", "", components.PatchV1RunbooksExecutionsExecutionIDStepsStepIDVotes{ - Direction: components.PatchV1RunbooksExecutionsExecutionIDStepsStepIDVotesDirectionUp, - }) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestRunbooks_GetRunbookStepVoteStatus(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Runbooks.GetStepVoteStatus(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestRunbooks_UpdateRunbookExecutionVotes(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Runbooks.UpdateExecutionVotes(ctx, "", components.PatchV1RunbooksExecutionsExecutionIDVotes{ - Direction: components.PatchV1RunbooksExecutionsExecutionIDVotesDirectionDig, - }) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestRunbooks_GetRunbookExecutionVoteStatus(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Runbooks.GetExecutionVoteStatus(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestRunbooks_GetRunbookSelectOptions(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Runbooks.ListSelectOptions(ctx, operations.GetRunbookSelectOptionsRequest{ - IntegrationSlug: "", - ActionSlug: "", - Field: "", - }) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestRunbooks_GetRunbook(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Runbooks.Get(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestRunbooks_UpdateRunbook(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestRunbooks_DeleteRunbook(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Runbooks.Delete(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/scim_test.go b/tests/scim_test.go deleted file mode 100644 index d114199..0000000 --- a/tests/scim_test.go +++ /dev/null @@ -1,176 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "firehydrant/models/components" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestScim_GetScimGroups(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Scim.ListGroups(ctx, nil, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestScim_CreateScimGroup(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Scim.Create(ctx, components.PostV1ScimV2Groups{ - DisplayName: "Maida.Schinner", - Members: []components.Members{ - components.Members{ - Value: "", - }, - components.Members{ - Value: "", - }, - }, - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestScim_GetScimGroup(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Scim.GetGroup(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestScim_UpdateScimGroup(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Scim.UpdateGroup(ctx, "", components.PutV1ScimV2GroupsID{ - DisplayName: "Alejandrin.Spinka", - Members: []components.PutV1ScimV2GroupsIDMembers{ - components.PutV1ScimV2GroupsIDMembers{ - Value: "", - }, - components.PutV1ScimV2GroupsIDMembers{ - Value: "", - }, - components.PutV1ScimV2GroupsIDMembers{ - Value: "", - }, - }, - }) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestScim_DeleteScimGroup(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Scim.DeleteGroup(ctx, "") - require.NoError(t, err) - assert.Equal(t, 204, res.HTTPMeta.Response.StatusCode) -} - -func TestScim_GetScimUsers(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Scim.ListUsers(ctx, nil, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestScim_CreateScimUser(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Scim.CreateUser(ctx, components.PostV1ScimV2Users{ - UserName: "Eleazar91", - Name: components.Name{ - FamilyName: "", - GivenName: "", - }, - Emails: []components.Emails{ - components.Emails{ - Value: "", - Primary: true, - }, - components.Emails{ - Value: "", - Primary: true, - }, - }, - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestScim_GetScimUser(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Scim.GetUser(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestScim_ReplaceScimUser(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestScim_DeleteScimUser(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Scim.DeleteUser(ctx, "") - require.NoError(t, err) - assert.Equal(t, 204, res.HTTPMeta.Response.StatusCode) -} - -func TestScim_UpdateScimUser(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Scim.UpdateUser(ctx, "", components.PatchV1ScimV2UsersID{ - Operations: []components.Operations{ - components.Operations{ - Op: "", - Path: "/etc", - }, - components.Operations{ - Op: "", - Path: "/var/mail", - }, - }, - }) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/services_test.go b/tests/services_test.go deleted file mode 100644 index fd66843..0000000 --- a/tests/services_test.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "firehydrant/models/components" - "firehydrant/models/operations" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestServices_CreateServiceDependency(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Services.CreateDependency(ctx, components.PostV1ServiceDependencies{ - ServiceID: "", - ConnectedServiceID: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestServices_GetServiceDependency(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Services.GetDependency(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestServices_DeleteServiceDependency(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Services.DeleteDependency(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestServices_UpdateServiceDependency(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestServices_ListServices(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Services.List(ctx, operations.ListServicesRequest{}) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestServices_CreateService(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Services.Create(ctx, components.PostV1Services{ - Name: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestServices_CreateServiceLinks(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Services.CreateLinks(ctx, components.PostV1ServicesServiceLinks{ - ExternalServiceIds: "", - ConnectionID: "", - Integration: components.IntegrationVictorops, - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestServices_GetService(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Services.Get(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestServices_DeleteService(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Services.Delete(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestServices_UpdateService(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestServices_ListServiceAvailableDownstreamDependencies(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Services.GetAvailableDownstreamDependencies(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestServices_ListServiceAvailableUpstreamDependencies(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Services.ListAvailableUpstreamDependencies(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestServices_CreateServiceChecklistResponse(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Services.CreateChecklistResponse(ctx, "", "", components.PostV1ServicesServiceIDChecklistResponseChecklistID{ - CheckID: "", - Status: true, - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestServices_GetServiceDependencies(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Services.ListDependencies(ctx, "", nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestServices_DeleteServiceLink(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Services.DeleteLink(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 204, res.HTTPMeta.Response.StatusCode) -} - -func TestServices_ListUserServices(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Services.ListForUser(ctx, "", nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/signals_test.go b/tests/signals_test.go deleted file mode 100644 index 106f797..0000000 --- a/tests/signals_test.go +++ /dev/null @@ -1,297 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "firehydrant/models/components" - "firehydrant/models/operations" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestSignals_GetSignalGroupedMetrics(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Signals.ListGroupedMetrics(ctx, operations.GetSignalGroupedMetricsRequest{}) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestSignals_GetSignalsMttxAnalytics(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Signals.GetMttxAnalytics(ctx, operations.GetSignalsMttxAnalyticsRequest{}) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestSignals_GetSignalsAnalyticsTimeseries(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Signals.GetAnalyticsTimeseries(ctx, operations.GetSignalsAnalyticsTimeseriesRequest{}) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestSignals_DebugSignal(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Signals.Debug(ctx, components.PostV1SignalsDebugger{ - Expression: "", - Signals: []components.Signals{ - components.Signals{}, - }, - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestSignals_ListSignalEmailTargets(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Signals.ListEmailTargets(ctx, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestSignals_CreateSignalEmailTarget(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Signals.CreateEmailTarget(ctx, components.PostV1SignalsEmailTargets{ - Name: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestSignals_GetSignalEmailTarget(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Signals.GetEmailTarget(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestSignals_DeleteSignalEmailTarget(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Signals.DeleteEmailTarget(ctx, "") - require.NoError(t, err) - assert.Equal(t, 204, res.HTTPMeta.Response.StatusCode) -} - -func TestSignals_UpdateSignalEmailTarget(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestSignals_ListSignalEventSources(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Signals.ListEventSources(ctx, nil, nil, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestSignals_GetSignalIngestURL(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Signals.GetIngestURL(ctx, nil, nil, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestSignals_ListSignalTransposers(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Signals.ListTransposers(ctx) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestSignals_ListSignalWebhookTargets(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Signals.ListWebhookTargets(ctx, nil, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestSignals_CreateSignalWebhookTarget(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Signals.CreateWebhookTarget(ctx, components.PostV1SignalsWebhookTargets{ - Name: "", - URL: "https://tasty-silk.info", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestSignals_GetSignalsWebhookTarget(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Signals.GetWebhookTarget(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestSignals_DeleteSignalsWebhookTarget(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Signals.DeleteWebhookTarget(ctx, "") - require.NoError(t, err) - assert.Equal(t, 204, res.HTTPMeta.Response.StatusCode) -} - -func TestSignals_UpdateSignalsWebhookTarget(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestSignals_ListSignalsOnCall(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Signals.ListOnCall(ctx, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestSignals_ListTeamEscalationPolicies(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Signals.ListEscalationPolicies(ctx, "", nil, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestSignals_DeleteTeamEscalationPolicy(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Signals.DeleteEscalationPolicy(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 204, res.HTTPMeta.Response.StatusCode) -} - -func TestSignals_GetTeamOnCallSchedule(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Signals.GetOnCallSchedule(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestSignals_UpdateTeamOnCallSchedule(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestSignals_ListTeamSignalRules(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Signals.ListRules(ctx, "", nil, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestSignals_CreateTeamSignalRule(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Signals.CreateRule(ctx, "", components.PostV1TeamsTeamIDSignalRules{ - Name: "", - Expression: "", - TargetType: components.TargetTypeWebhook, - TargetID: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestSignals_GetTeamSignalRule(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Signals.GetRule(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestSignals_DeleteTeamSignalRule(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Signals.DeleteRule(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 204, res.HTTPMeta.Response.StatusCode) -} - -func TestSignals_UpdateTeamSignalRule(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} diff --git a/tests/slack_test.go b/tests/slack_test.go deleted file mode 100644 index eb63956..0000000 --- a/tests/slack_test.go +++ /dev/null @@ -1,47 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "firehydrant/models/operations" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestSlack_CreateSlackEmojiAction(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Slack.CreateEmojiAction(ctx, "", operations.CreateSlackEmojiActionRequestBody{ - EmojiName: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestSlack_UpdateSlackEmojiAction(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Slack.UpdateEmojiAction(ctx, "", "", nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestSlack_ListSlackUsergroups(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Slack.ListUsergroups(ctx) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/statusupdatetemplates_test.go b/tests/statusupdatetemplates_test.go deleted file mode 100644 index c10f78d..0000000 --- a/tests/statusupdatetemplates_test.go +++ /dev/null @@ -1,26 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "firehydrant/models/components" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestStatusUpdateTemplates_CreateStatusUpdateTemplate(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.StatusUpdateTemplates.Create(ctx, components.PostV1StatusUpdateTemplates{ - Name: "", - Body: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/system_test.go b/tests/system_test.go deleted file mode 100644 index 813c946..0000000 --- a/tests/system_test.go +++ /dev/null @@ -1,22 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestSystem_APIPing(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.System.Ping(ctx) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/tasks_test.go b/tests/tasks_test.go deleted file mode 100644 index d91c98b..0000000 --- a/tests/tasks_test.go +++ /dev/null @@ -1,157 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "firehydrant/models/components" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestTasks_ListChecklistTemplates(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Tasks.ListChecklistTemplates(ctx, nil, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestTasks_CreateChecklistTemplate(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Tasks.CreateChecklistTemplate(ctx, components.PostV1ChecklistTemplates{ - Name: "", - Checks: []components.Checks{ - components.Checks{ - Name: "", - }, - }, - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestTasks_DeleteChecklistTemplate(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Tasks.DeleteChecklistTemplate(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestTasks_UpdateChecklistTemplate(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestTasks_ListIncidentTasks(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Tasks.ListForIncident(ctx, "", nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestTasks_CreateIncidentTask(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Tasks.Create(ctx, "", components.PostV1IncidentsIncidentIDTasks{ - Title: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestTasks_GetIncidentTask(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Tasks.GetForIncident(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestTasks_DeleteIncidentTask(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Tasks.Delete(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 204, res.HTTPMeta.Response.StatusCode) -} - -func TestTasks_UpdateIncidentTask(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestTasks_ConvertIncidentTaskToFollowup(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestTasks_ListTaskLists(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Tasks.ListTasks(ctx, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestTasks_CreateTaskList(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Tasks.CreateList(ctx, components.PostV1TaskLists{ - Name: "", - TaskListItems: []components.TaskListItems{ - components.TaskListItems{ - Summary: "", - }, - components.TaskListItems{ - Summary: "", - }, - }, - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestTasks_GetTaskList(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Tasks.Get(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestTasks_UpdateTaskList(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} diff --git a/tests/teams_test.go b/tests/teams_test.go deleted file mode 100644 index 4a76295..0000000 --- a/tests/teams_test.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "firehydrant/models/components" - "firehydrant/models/operations" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestTeams_ListSchedules(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Teams.ListSchedules(ctx, nil, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestTeams_ListTeams(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Teams.List(ctx, operations.ListTeamsRequest{}) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestTeams_CreateTeam(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Teams.Create(ctx, components.PostV1Teams{ - Name: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestTeams_GetTeam(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Teams.Get(ctx, "", nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestTeams_ArchiveTeam(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Teams.Archive(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestTeams_UpdateTeam(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestTeams_ListTeamOnCallSchedules(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Teams.ListOnCallSchedules(ctx, "", nil, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestTeams_CreateTeamOnCallSchedule(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Teams.CreateOnCallSchedule(ctx, "", components.PostV1TeamsTeamIDOnCallSchedules{ - Name: "", - TimeZone: "America/Porto_Velho", - Strategy: components.Strategy{ - Type: components.PostV1TeamsTeamIDOnCallSchedulesTypeCustom, - }, - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestTeams_GetTeamScheduleShift(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Teams.GetScheduleShift(ctx, "", "", "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestTeams_DeleteTeamScheduleShift(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Teams.DeleteScheduleShift(ctx, "", "", "") - require.NoError(t, err) - assert.Equal(t, 204, res.HTTPMeta.Response.StatusCode) -} - -func TestTeams_UpdateTeamScheduleShift(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestTeams_CreateTeamEscalationPolicy(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Teams.CreateEscalationPolicy(ctx, "", components.PostV1TeamsTeamIDEscalationPolicies{ - Name: "", - Steps: []components.PostV1TeamsTeamIDEscalationPoliciesSteps{ - components.PostV1TeamsTeamIDEscalationPoliciesSteps{ - Targets: []components.Targets{ - components.Targets{ - Type: components.PostV1TeamsTeamIDEscalationPoliciesTypeWebhook, - ID: "", - }, - components.Targets{ - Type: components.PostV1TeamsTeamIDEscalationPoliciesTypeEntireTeam, - ID: "", - }, - components.Targets{ - Type: components.PostV1TeamsTeamIDEscalationPoliciesTypeEntireTeam, - ID: "", - }, - }, - Timeout: "", - }, - }, - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestTeams_UpdateTeamEscalationPolicy(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestTeams_CreateTeamOnCallScheduleShift(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Teams.CreateShift(ctx, "", "", components.PostV1TeamsTeamIDOnCallSchedulesScheduleIDShifts{ - StartTime: "", - EndTime: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/ticketing_test.go b/tests/ticketing_test.go deleted file mode 100644 index 9676545..0000000 --- a/tests/ticketing_test.go +++ /dev/null @@ -1,33 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestTicketing_GetTicketingProjectFieldMap(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Ticketing.GetFieldMap(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestTicketing_UpdateTicketingProjectConfig(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Ticketing.UpdateProjectConfig(ctx, "", "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/ticketingpriorities_test.go b/tests/ticketingpriorities_test.go deleted file mode 100644 index 5406377..0000000 --- a/tests/ticketingpriorities_test.go +++ /dev/null @@ -1,22 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestTicketingPriorities_GetTicketingPriority(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.TicketingPriorities.Get(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/tickets_test.go b/tests/tickets_test.go deleted file mode 100644 index f1a5b12..0000000 --- a/tests/tickets_test.go +++ /dev/null @@ -1,52 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "firehydrant/models/components" - "firehydrant/models/operations" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestTickets_ListTickets(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Tickets.List(ctx, operations.ListTicketsRequest{}) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestTickets_CreateTicket(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Tickets.Create(ctx, components.PostV1TicketingTickets{ - Summary: "", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestTickets_DeleteTicket(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Tickets.Delete(ctx, "") - require.NoError(t, err) - assert.Equal(t, 204, res.HTTPMeta.Response.StatusCode) -} - -func TestTickets_UpdateTicket(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} diff --git a/tests/users_test.go b/tests/users_test.go deleted file mode 100644 index f425cc4..0000000 --- a/tests/users_test.go +++ /dev/null @@ -1,44 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestUsers_GetCurrentUser(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Users.GetCurrent(ctx) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestUsers_ListUsers(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Users.List(ctx, nil, nil, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestUsers_GetUser(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Users.Get(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/webhooks_test.go b/tests/webhooks_test.go deleted file mode 100644 index 8478227..0000000 --- a/tests/webhooks_test.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "firehydrant/models/components" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestWebhooks_ListWebhooks(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Webhooks.List(ctx, nil, nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestWebhooks_CreateWebhook(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Webhooks.Create(ctx, components.PostV1Webhooks{ - URL: "https://woeful-yin.biz", - }) - require.NoError(t, err) - assert.Equal(t, 201, res.HTTPMeta.Response.StatusCode) -} - -func TestWebhooks_GetWebhook(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Webhooks.Get(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} - -func TestWebhooks_DeleteWebhook(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Webhooks.Delete(ctx, "") - require.NoError(t, err) - assert.Equal(t, 204, res.HTTPMeta.Response.StatusCode) -} - -func TestWebhooks_UpdateWebhook(t *testing.T) { - assert.Fail(t, "incomplete test found please make sure to address the following errors: [`missing request body values for required request body`]") -} - -func TestWebhooks_ListWebhookDeliveries(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Webhooks.ListDeliveries(ctx, "") - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} diff --git a/tests/zendesk_test.go b/tests/zendesk_test.go deleted file mode 100644 index a912493..0000000 --- a/tests/zendesk_test.go +++ /dev/null @@ -1,22 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package tests - -import ( - "context" - "firehydrant" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" -) - -func TestZendesk_SearchZendeskTickets(t *testing.T) { - s := firehydrant.New( - firehydrant.WithSecurity(""), - ) - - ctx := context.Background() - res, err := s.Zendesk.SearchTickets(ctx, "", nil) - require.NoError(t, err) - assert.Equal(t, 200, res.HTTPMeta.Response.StatusCode) -} diff --git a/ticketing.go b/ticketing.go index f6c4bf7..3ada5a8 100644 --- a/ticketing.go +++ b/ticketing.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" ) @@ -110,7 +110,11 @@ func (s *Ticketing) GetFieldMap(ctx context.Context, mapID string, ticketingProj req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -459,7 +463,11 @@ func (s *Ticketing) UpdateProjectConfig(ctx context.Context, ticketingProjectID req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/ticketingpriorities.go b/ticketingpriorities.go index 941204e..7b02707 100644 --- a/ticketingpriorities.go +++ b/ticketingpriorities.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" ) @@ -109,7 +109,11 @@ func (s *TicketingPriorities) Get(ctx context.Context, id string, opts ...operat req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/tickets.go b/tickets.go index 8ce65f9..a07f130 100644 --- a/tickets.go +++ b/tickets.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" "net/url" ) @@ -110,7 +110,11 @@ func (s *Tickets) List(ctx context.Context, request operations.ListTicketsReques req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -460,7 +464,11 @@ func (s *Tickets) Create(ctx context.Context, request components.PostV1Ticketing req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -807,7 +815,11 @@ func (s *Tickets) Delete(ctx context.Context, ticketID string, opts ...operation req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1142,7 +1154,11 @@ func (s *Tickets) Update(ctx context.Context, ticketID string, patchV1TicketingT req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/users.go b/users.go index 7f6ae99..8db525b 100644 --- a/users.go +++ b/users.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" "net/url" ) @@ -107,7 +107,11 @@ func (s *Users) GetCurrent(ctx context.Context, opts ...operations.Option) (*ope req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -462,7 +466,11 @@ func (s *Users) List(ctx context.Context, page *int, perPage *int, query *string req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -810,7 +818,11 @@ func (s *Users) Get(ctx context.Context, id string, opts ...operations.Option) ( req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/webhooks.go b/webhooks.go index d656a03..7965c52 100644 --- a/webhooks.go +++ b/webhooks.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" "net/url" ) @@ -116,7 +116,11 @@ func (s *Webhooks) List(ctx context.Context, page *int, perPage *int, opts ...op req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -466,7 +470,11 @@ func (s *Webhooks) Create(ctx context.Context, request components.PostV1Webhooks req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -814,7 +822,11 @@ func (s *Webhooks) Get(ctx context.Context, webhookID string, opts ...operations req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1162,7 +1174,11 @@ func (s *Webhooks) Delete(ctx context.Context, webhookID string, opts ...operati req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1497,7 +1513,11 @@ func (s *Webhooks) Update(ctx context.Context, webhookID string, patchV1Webhooks req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) @@ -1844,7 +1864,11 @@ func (s *Webhooks) ListDeliveries(ctx context.Context, webhookID string, opts .. req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req) diff --git a/zendesk.go b/zendesk.go index e949424..1297954 100644 --- a/zendesk.go +++ b/zendesk.go @@ -10,8 +10,8 @@ import ( "firehydrant/models/components" "firehydrant/models/operations" "firehydrant/models/sdkerrors" + "firehydrant/retry" "fmt" - "github.com/cenkalti/backoff/v4" "net/http" "net/url" ) @@ -114,7 +114,11 @@ func (s *Zendesk) SearchTickets(ctx context.Context, ticketID string, include *s req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) if err != nil { - return nil, backoff.Permanent(err) + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) } httpRes, err := s.sdkConfiguration.Client.Do(req)