From f27e45762085750bedab1c3b56487d922582c153 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 1 Oct 2024 16:19:05 +0000 Subject: [PATCH] Regenerate client from commit 65dbf403 of spec repo --- .apigentools-info | 8 +- .generator/schemas/v2/openapi.yaml | 521 +++++++++ .../frozen.json | 1 + .../recording.har | 104 ++ .../frozen.json | 1 + .../recording.har | 141 +++ .../frozen.json | 1 + .../recording.har | 147 +++ .../frozen.json | 1 + .../recording.har | 147 +++ .../frozen.json | 1 + .../recording.har | 147 +++ .../frozen.json | 1 + .../recording.har | 157 +++ .../CreateApiHandle.ts | 31 + .../CreateApiHandle_1540689753.ts | 32 + .../DeleteApiHandle.ts | 21 + .../DeleteApiHandle_377884154.ts | 24 + .../GetApiHandle.ts | 21 + .../GetApiHandleByName.ts | 21 + .../GetApiHandleByName_1103107145.ts | 25 + .../GetApiHandle_2883785101.ts | 24 + .../GetChannelByName.ts | 23 + .../ListApiHandles.ts | 17 + .../ListApiHandles_769592979.ts | 17 + .../UpdateApiHandle.ts | 32 + .../UpdateApiHandle_419892746.ts | 32 + features/support/scenarios_model_mapping.ts | 61 + features/v2/given.json | 12 + .../v2/microsoft_teams_integration.feature | 271 +++++ features/v2/undo.json | 49 + .../apis/MicrosoftTeamsIntegrationApi.ts | 1006 +++++++++++++++++ packages/datadog-api-client-v2/index.ts | 29 + .../MicrosoftTeamsApiHandleAttributes.ts | 76 ++ .../MicrosoftTeamsApiHandleInfoResponse.ts | 53 + ...oftTeamsApiHandleInfoResponseAttributes.ts | 100 ++ ...MicrosoftTeamsApiHandleInfoResponseData.ts | 70 ++ .../models/MicrosoftTeamsApiHandleInfoType.ts | 16 + ...icrosoftTeamsApiHandleRequestAttributes.ts | 80 ++ .../MicrosoftTeamsApiHandleRequestData.ts | 64 ++ .../MicrosoftTeamsApiHandleResponseData.ts | 70 ++ .../models/MicrosoftTeamsApiHandleType.ts | 14 + .../MicrosoftTeamsApiHandlesResponse.ts | 54 + ...osoftTeamsChannelInfoResponseAttributes.ts | 68 ++ .../MicrosoftTeamsChannelInfoResponseData.ts | 70 ++ .../models/MicrosoftTeamsChannelInfoType.ts | 16 + .../MicrosoftTeamsCreateApiHandleRequest.ts | 54 + .../MicrosoftTeamsCreateApiHandleResponse.ts | 54 + .../MicrosoftTeamsGetChannelByNameResponse.ts | 53 + .../MicrosoftTeamsUpdateApiHandleRequest.ts | 54 + ...icrosoftTeamsUpdateApiHandleRequestData.ts | 64 ++ .../models/ObjectSerializer.ts | 39 + 52 files changed, 4191 insertions(+), 4 deletions(-) create mode 100644 cassettes/v2/Microsoft-Teams-Integration_1838995911/Create-api-handle-returns-CREATED-response_2340097277/frozen.json create mode 100644 cassettes/v2/Microsoft-Teams-Integration_1838995911/Create-api-handle-returns-CREATED-response_2340097277/recording.har create mode 100644 cassettes/v2/Microsoft-Teams-Integration_1838995911/Delete-api-handle-returns-OK-response_230030030/frozen.json create mode 100644 cassettes/v2/Microsoft-Teams-Integration_1838995911/Delete-api-handle-returns-OK-response_230030030/recording.har create mode 100644 cassettes/v2/Microsoft-Teams-Integration_1838995911/Get-all-api-handles-returns-OK-response_1459650885/frozen.json create mode 100644 cassettes/v2/Microsoft-Teams-Integration_1838995911/Get-all-api-handles-returns-OK-response_1459650885/recording.har create mode 100644 cassettes/v2/Microsoft-Teams-Integration_1838995911/Get-api-handle-information-by-name-returns-OK-response_3931126647/frozen.json create mode 100644 cassettes/v2/Microsoft-Teams-Integration_1838995911/Get-api-handle-information-by-name-returns-OK-response_3931126647/recording.har create mode 100644 cassettes/v2/Microsoft-Teams-Integration_1838995911/Get-api-handle-information-returns-OK-response_2501134391/frozen.json create mode 100644 cassettes/v2/Microsoft-Teams-Integration_1838995911/Get-api-handle-information-returns-OK-response_2501134391/recording.har create mode 100644 cassettes/v2/Microsoft-Teams-Integration_1838995911/Update-api-handle-returns-OK-response_1797440044/frozen.json create mode 100644 cassettes/v2/Microsoft-Teams-Integration_1838995911/Update-api-handle-returns-OK-response_1797440044/recording.har create mode 100644 examples/v2/microsoft-teams-integration/CreateApiHandle.ts create mode 100644 examples/v2/microsoft-teams-integration/CreateApiHandle_1540689753.ts create mode 100644 examples/v2/microsoft-teams-integration/DeleteApiHandle.ts create mode 100644 examples/v2/microsoft-teams-integration/DeleteApiHandle_377884154.ts create mode 100644 examples/v2/microsoft-teams-integration/GetApiHandle.ts create mode 100644 examples/v2/microsoft-teams-integration/GetApiHandleByName.ts create mode 100644 examples/v2/microsoft-teams-integration/GetApiHandleByName_1103107145.ts create mode 100644 examples/v2/microsoft-teams-integration/GetApiHandle_2883785101.ts create mode 100644 examples/v2/microsoft-teams-integration/GetChannelByName.ts create mode 100644 examples/v2/microsoft-teams-integration/ListApiHandles.ts create mode 100644 examples/v2/microsoft-teams-integration/ListApiHandles_769592979.ts create mode 100644 examples/v2/microsoft-teams-integration/UpdateApiHandle.ts create mode 100644 examples/v2/microsoft-teams-integration/UpdateApiHandle_419892746.ts create mode 100644 features/v2/microsoft_teams_integration.feature create mode 100644 packages/datadog-api-client-v2/apis/MicrosoftTeamsIntegrationApi.ts create mode 100644 packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleInfoResponse.ts create mode 100644 packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleInfoResponseAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleInfoResponseData.ts create mode 100644 packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleInfoType.ts create mode 100644 packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleRequestAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleRequestData.ts create mode 100644 packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleResponseData.ts create mode 100644 packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleType.ts create mode 100644 packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandlesResponse.ts create mode 100644 packages/datadog-api-client-v2/models/MicrosoftTeamsChannelInfoResponseAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/MicrosoftTeamsChannelInfoResponseData.ts create mode 100644 packages/datadog-api-client-v2/models/MicrosoftTeamsChannelInfoType.ts create mode 100644 packages/datadog-api-client-v2/models/MicrosoftTeamsCreateApiHandleRequest.ts create mode 100644 packages/datadog-api-client-v2/models/MicrosoftTeamsCreateApiHandleResponse.ts create mode 100644 packages/datadog-api-client-v2/models/MicrosoftTeamsGetChannelByNameResponse.ts create mode 100644 packages/datadog-api-client-v2/models/MicrosoftTeamsUpdateApiHandleRequest.ts create mode 100644 packages/datadog-api-client-v2/models/MicrosoftTeamsUpdateApiHandleRequestData.ts diff --git a/.apigentools-info b/.apigentools-info index fb95a929548..39d5ee79fbf 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-10-01 14:24:21.173399", - "spec_repo_commit": "d90ee2ef" + "regenerated": "2024-10-01 16:17:38.278609", + "spec_repo_commit": "65dbf403" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-10-01 14:24:21.190923", - "spec_repo_commit": "d90ee2ef" + "regenerated": "2024-10-01 16:17:38.293130", + "spec_repo_commit": "65dbf403" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index ce325fb6281..63eb2ce8443 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -451,6 +451,48 @@ components: required: true schema: type: string + MicrosoftTeamsChannelNamePathParameter: + description: Your channel name. + in: path + name: channel_name + required: true + schema: + type: string + MicrosoftTeamsHandleIDPathParameter: + description: Your handle id. + in: path + name: handle_id + required: true + schema: + type: string + MicrosoftTeamsHandleNamePathParameter: + description: Your handle name. + in: path + name: handle_name + required: true + schema: + type: string + MicrosoftTeamsTeamNamePathParameter: + description: Your team name. + in: path + name: team_name + required: true + schema: + type: string + MicrosoftTeamsTenantIDQueryParameter: + description: Your tenant id. + in: query + name: tenant_id + required: false + schema: + type: string + MicrosoftTeamsTenantNamePathParameter: + description: Your tenant name. + in: path + name: tenant_name + required: true + schema: + type: string OpsgenieServiceIDPathParameter: description: The UUID of the service. in: path @@ -691,6 +733,12 @@ components: schema: $ref: '#/components/schemas/APIErrorResponse' description: Not Found + PreconditionFailedResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Failed Precondition SpansBadRequestResponse: content: application/json: @@ -14761,6 +14809,276 @@ components: - data_source - query type: object + MicrosoftTeamsApiHandleAttributes: + description: Handle attributes. + properties: + channel_id: + description: Channel id. + example: fake-channel-id + maxLength: 255 + type: string + name: + description: Handle name. + example: fake-handle-name + maxLength: 255 + type: string + team_id: + description: Team id. + example: 00000000-0000-0000-0000-000000000000 + maxLength: 255 + type: string + tenant_id: + description: Tenant id. + example: 00000000-0000-0000-0000-000000000001 + maxLength: 255 + type: string + type: object + MicrosoftTeamsApiHandleInfoResponse: + description: Response of a handle. + properties: + data: + $ref: '#/components/schemas/MicrosoftTeamsApiHandleInfoResponseData' + type: object + MicrosoftTeamsApiHandleInfoResponseAttributes: + description: Handle attributes. + properties: + channel_id: + description: Channel id. + example: fake-channel-id + maxLength: 255 + type: string + channel_name: + description: Channel name. + example: fake-channel-name + maxLength: 255 + type: string + name: + description: Handle name. + example: fake-handle-name + maxLength: 255 + type: string + team_id: + description: Team id. + example: 00000000-0000-0000-0000-000000000000 + maxLength: 255 + type: string + team_name: + description: Team name. + example: fake-team-name + maxLength: 255 + type: string + tenant_id: + description: Tenant id. + example: 00000000-0000-0000-0000-000000000001 + maxLength: 255 + type: string + tenant_name: + description: Tenant name. + example: fake-tenant-name + maxLength: 255 + type: string + type: object + MicrosoftTeamsApiHandleInfoResponseData: + description: Handle data from a response. + properties: + attributes: + $ref: '#/components/schemas/MicrosoftTeamsApiHandleInfoResponseAttributes' + id: + description: The ID of the handle. + example: 596da4af-0563-4097-90ff-07230c3f9db3 + maxLength: 100 + minLength: 1 + type: string + type: + $ref: '#/components/schemas/MicrosoftTeamsApiHandleInfoType' + type: object + MicrosoftTeamsApiHandleInfoType: + default: ms-teams-handle-info + description: Handle resource type. + enum: + - ms-teams-handle-info + example: ms-teams-handle-info + type: string + x-enum-varnames: + - MS_TEAMS_HANDLE_INFO + MicrosoftTeamsApiHandleRequestAttributes: + description: Handle attributes. + properties: + channel_id: + description: Channel id. + example: fake-channel-id + maxLength: 255 + type: string + name: + description: Handle name. + example: fake-handle-name + maxLength: 255 + type: string + team_id: + description: Team id. + example: 00000000-0000-0000-0000-000000000000 + maxLength: 255 + type: string + tenant_id: + description: Tenant id. + example: 00000000-0000-0000-0000-000000000001 + maxLength: 255 + type: string + required: + - name + - channel_id + - team_id + - tenant_id + type: object + MicrosoftTeamsApiHandleRequestData: + description: Handle data from a response. + properties: + attributes: + $ref: '#/components/schemas/MicrosoftTeamsApiHandleRequestAttributes' + type: + $ref: '#/components/schemas/MicrosoftTeamsApiHandleType' + required: + - type + - attributes + type: object + MicrosoftTeamsApiHandleResponseData: + description: Handle data from a response. + properties: + attributes: + $ref: '#/components/schemas/MicrosoftTeamsApiHandleAttributes' + id: + description: The ID of the handle. + example: 596da4af-0563-4097-90ff-07230c3f9db3 + maxLength: 100 + minLength: 1 + type: string + type: + $ref: '#/components/schemas/MicrosoftTeamsApiHandleType' + type: object + MicrosoftTeamsApiHandleType: + default: handle + description: Specifies the handle resource type. + enum: + - handle + example: handle + type: string + x-enum-varnames: + - HANDLE + MicrosoftTeamsApiHandlesResponse: + description: Response with a list of handles. + properties: + data: + description: An array of handles. + example: + - attributes: + channelId: 19:b41k24b14bn1nwffkernfkwrnfneubgkr@thread.tacv2 + channelName: General + name: general-handle + teamId: 00000000-0000-0000-0000-000000000000 + teamName: Example Team + tenantId: 00000000-0000-0000-0000-000000000001 + tenantName: Company, Inc. + id: 596da4af-0563-4097-90ff-07230c3f9db3 + type: ms-teams-handle-info + - attributes: + channelId: 19:b41k24b14bn1nwffkernfkwrnfneubgk1@thread.tacv2 + channelName: General2 + name: general-handle-2 + teamId: 00000000-0000-0000-0000-000000000002 + teamName: Example Team 2 + tenantId: 00000000-0000-0000-0000-000000000003 + tenantName: Company, Inc. + id: 596da4af-0563-4097-90ff-07230c3f9db4 + type: ms-teams-handle-info + items: + $ref: '#/components/schemas/MicrosoftTeamsApiHandleInfoResponseData' + type: array + required: + - data + type: object + MicrosoftTeamsChannelInfoResponseAttributes: + description: Channel attributes. + properties: + is_primary: + description: Indicates if this is the primary channel. + example: true + maxLength: 255 + type: boolean + team_id: + description: Team id. + example: 00000000-0000-0000-0000-000000000000 + maxLength: 255 + type: string + tenant_id: + description: Tenant id. + example: 00000000-0000-0000-0000-000000000001 + maxLength: 255 + type: string + type: object + MicrosoftTeamsChannelInfoResponseData: + description: Channel data from a response. + properties: + attributes: + $ref: '#/components/schemas/MicrosoftTeamsChannelInfoResponseAttributes' + id: + description: The ID of the channel. + example: 19:b41k24b14bn1nwffkernfkwrnfneubgkr@thread.tacv2 + maxLength: 255 + minLength: 1 + type: string + type: + $ref: '#/components/schemas/MicrosoftTeamsChannelInfoType' + type: object + MicrosoftTeamsChannelInfoType: + default: ms-teams-channel-info + description: Channel info resource type. + enum: + - ms-teams-channel-info + example: ms-teams-channel-info + type: string + x-enum-varnames: + - MS_TEAMS_CHANNEL_INFO + MicrosoftTeamsCreateApiHandleRequest: + description: Create handle request. + properties: + data: + $ref: '#/components/schemas/MicrosoftTeamsApiHandleRequestData' + required: + - data + type: object + MicrosoftTeamsCreateApiHandleResponse: + description: Response of a handle. + properties: + data: + $ref: '#/components/schemas/MicrosoftTeamsApiHandleResponseData' + required: + - data + type: object + MicrosoftTeamsGetChannelByNameResponse: + description: Response with channel, team, and tenant ID information. + properties: + data: + $ref: '#/components/schemas/MicrosoftTeamsChannelInfoResponseData' + type: object + MicrosoftTeamsUpdateApiHandleRequest: + description: Update handle request. + properties: + data: + $ref: '#/components/schemas/MicrosoftTeamsUpdateApiHandleRequestData' + required: + - data + type: object + MicrosoftTeamsUpdateApiHandleRequestData: + description: Handle data from a response. + properties: + attributes: + $ref: '#/components/schemas/MicrosoftTeamsApiHandleAttributes' + type: + $ref: '#/components/schemas/MicrosoftTeamsApiHandleType' + required: + - type + - attributes + type: object MonitorConfigPolicyAttributeCreateRequest: description: Policy and policy type for a monitor configuration policy. properties: @@ -30196,6 +30514,200 @@ paths: operator: OR permissions: - gcp_configuration_edit + /api/v2/integration/ms-teams/configuration/channel/{tenant_name}/{team_name}/{channel_name}: + get: + description: Get the tenant, team, and channel ID of a channel in the Datadog + Microsoft Teams integration. + operationId: GetChannelByName + parameters: + - $ref: '#/components/parameters/MicrosoftTeamsTenantNamePathParameter' + - $ref: '#/components/parameters/MicrosoftTeamsTeamNamePathParameter' + - $ref: '#/components/parameters/MicrosoftTeamsChannelNamePathParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MicrosoftTeamsGetChannelByNameResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get channel information by name + tags: + - Microsoft Teams Integration + /api/v2/integration/ms-teams/configuration/tenant-based-handles: + get: + description: Get a list of all handles from the Datadog Microsoft Teams integration. + operationId: ListApiHandles + parameters: + - $ref: '#/components/parameters/MicrosoftTeamsTenantIDQueryParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MicrosoftTeamsApiHandlesResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '412': + $ref: '#/components/responses/PreconditionFailedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get all handles + tags: + - Microsoft Teams Integration + post: + description: Create a handle in the Datadog Microsoft Teams integration. + operationId: CreateApiHandle + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MicrosoftTeamsCreateApiHandleRequest' + description: Handle payload. + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/MicrosoftTeamsCreateApiHandleResponse' + description: CREATED + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '409': + $ref: '#/components/responses/ConflictResponse' + '412': + $ref: '#/components/responses/PreconditionFailedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Create handle + tags: + - Microsoft Teams Integration + x-codegen-request-body-name: body + /api/v2/integration/ms-teams/configuration/tenant-based-handles/name/{handle_name}: + get: + description: Get the tenant, team, and channel information of a handle by name + from the Datadog Microsoft Teams integration. + operationId: GetApiHandleByName + parameters: + - $ref: '#/components/parameters/MicrosoftTeamsHandleNamePathParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MicrosoftTeamsApiHandleInfoResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '412': + $ref: '#/components/responses/PreconditionFailedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get handle information by name + tags: + - Microsoft Teams Integration + /api/v2/integration/ms-teams/configuration/tenant-based-handles/{handle_id}: + delete: + description: Delete a handle from the Datadog Microsoft Teams integration. + operationId: DeleteApiHandle + parameters: + - $ref: '#/components/parameters/MicrosoftTeamsHandleIDPathParameter' + responses: + '204': + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '412': + $ref: '#/components/responses/PreconditionFailedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Delete handle + tags: + - Microsoft Teams Integration + get: + description: Get the tenant, team, and channel information of a handle from + the Datadog Microsoft Teams integration. + operationId: GetApiHandle + parameters: + - $ref: '#/components/parameters/MicrosoftTeamsHandleIDPathParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MicrosoftTeamsApiHandleInfoResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '412': + $ref: '#/components/responses/PreconditionFailedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get handle information + tags: + - Microsoft Teams Integration + patch: + description: Update a handle from the Datadog Microsoft Teams integration. + operationId: UpdateApiHandle + parameters: + - $ref: '#/components/parameters/MicrosoftTeamsHandleIDPathParameter' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MicrosoftTeamsUpdateApiHandleRequest' + description: Opsgenie service payload. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/MicrosoftTeamsApiHandleInfoResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '409': + $ref: '#/components/responses/ConflictResponse' + '412': + $ref: '#/components/responses/PreconditionFailedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Update handle + tags: + - Microsoft Teams Integration + x-codegen-request-body-name: body /api/v2/integration/opsgenie/services: get: description: Get a list of all services from the Datadog Opsgenie integration. @@ -40890,6 +41402,15 @@ tags: Tags for Metrics` permission.\n\nSee the [Metrics page](https://docs.datadoghq.com/metrics/) for more information." name: Metrics +- description: 'Configure your [Datadog Microsoft Teams integration](https://docs.datadoghq.com/integrations/microsoft_teams/) + + directly through the Datadog API. Note: These endpoints do not support legacy + connector handles.' + externalDocs: + description: For more information about the Datadog Microsoft Teams integration, + see the integration page. + url: https://docs.datadoghq.com/integrations/microsoft_teams/ + name: Microsoft Teams Integration - description: '[Monitors](https://docs.datadoghq.com/monitors) allow you to watch a metric or check that you care about and diff --git a/cassettes/v2/Microsoft-Teams-Integration_1838995911/Create-api-handle-returns-CREATED-response_2340097277/frozen.json b/cassettes/v2/Microsoft-Teams-Integration_1838995911/Create-api-handle-returns-CREATED-response_2340097277/frozen.json new file mode 100644 index 00000000000..691b307d878 --- /dev/null +++ b/cassettes/v2/Microsoft-Teams-Integration_1838995911/Create-api-handle-returns-CREATED-response_2340097277/frozen.json @@ -0,0 +1 @@ +"2024-10-01T14:49:03.835Z" diff --git a/cassettes/v2/Microsoft-Teams-Integration_1838995911/Create-api-handle-returns-CREATED-response_2340097277/recording.har b/cassettes/v2/Microsoft-Teams-Integration_1838995911/Create-api-handle-returns-CREATED-response_2340097277/recording.har new file mode 100644 index 00000000000..8a7d1b68520 --- /dev/null +++ b/cassettes/v2/Microsoft-Teams-Integration_1838995911/Create-api-handle-returns-CREATED-response_2340097277/recording.har @@ -0,0 +1,104 @@ +{ + "log": { + "_recordingName": "Microsoft Teams Integration/Create api handle returns \"CREATED\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "acd2e5a5dbe35fbc8bb6de6534157bb1", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 285, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 605, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"channel_id\":\"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2\",\"name\":\"Test-Create_api_handle_returns_CREATED_response-1727794143\",\"team_id\":\"e5f50a58-c929-4fb3-8866-e2cd836de3c2\",\"tenant_id\":\"4d3bac44-0230-4732-9e70-cc00736f0a97\"},\"type\":\"handle\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles" + }, + "response": { + "bodySize": 329, + "content": { + "mimeType": "application/vnd.api+json", + "size": 329, + "text": "{\"data\":{\"id\":\"4d853924-8004-11ef-a396-da7ad0900002\",\"type\":\"handle\",\"attributes\":{\"channel_id\":\"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2\",\"name\":\"Test-Create_api_handle_returns_CREATED_response-1727794143\",\"team_id\":\"e5f50a58-c929-4fb3-8866-e2cd836de3c2\",\"tenant_id\":\"4d3bac44-0230-4732-9e70-cc00736f0a97\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2024-10-01T14:49:03.843Z", + "time": 191 + }, + { + "_id": "778bbd38901a963f30909da138dd0127", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 578, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/4d853924-8004-11ef-a396-da7ad0900002" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 464, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2024-10-01T14:49:04.042Z", + "time": 72 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Microsoft-Teams-Integration_1838995911/Delete-api-handle-returns-OK-response_230030030/frozen.json b/cassettes/v2/Microsoft-Teams-Integration_1838995911/Delete-api-handle-returns-OK-response_230030030/frozen.json new file mode 100644 index 00000000000..3af4c4112de --- /dev/null +++ b/cassettes/v2/Microsoft-Teams-Integration_1838995911/Delete-api-handle-returns-OK-response_230030030/frozen.json @@ -0,0 +1 @@ +"2024-10-01T14:49:04.126Z" diff --git a/cassettes/v2/Microsoft-Teams-Integration_1838995911/Delete-api-handle-returns-OK-response_230030030/recording.har b/cassettes/v2/Microsoft-Teams-Integration_1838995911/Delete-api-handle-returns-OK-response_230030030/recording.har new file mode 100644 index 00000000000..188d244ff2c --- /dev/null +++ b/cassettes/v2/Microsoft-Teams-Integration_1838995911/Delete-api-handle-returns-OK-response_230030030/recording.har @@ -0,0 +1,141 @@ +{ + "log": { + "_recordingName": "Microsoft Teams Integration/Delete api handle returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "b4e11de50defc5bf5b7c736f95d38639", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 280, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 605, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"channel_id\":\"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2\",\"name\":\"Test-Delete_api_handle_returns_OK_response-1727794144\",\"team_id\":\"e5f50a58-c929-4fb3-8866-e2cd836de3c2\",\"tenant_id\":\"4d3bac44-0230-4732-9e70-cc00736f0a97\"},\"type\":\"handle\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles" + }, + "response": { + "bodySize": 324, + "content": { + "mimeType": "application/vnd.api+json", + "size": 324, + "text": "{\"data\":{\"id\":\"4da666b2-8004-11ef-a397-da7ad0900002\",\"type\":\"handle\",\"attributes\":{\"channel_id\":\"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2\",\"name\":\"Test-Delete_api_handle_returns_OK_response-1727794144\",\"team_id\":\"e5f50a58-c929-4fb3-8866-e2cd836de3c2\",\"tenant_id\":\"4d3bac44-0230-4732-9e70-cc00736f0a97\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2024-10-01T14:49:04.128Z", + "time": 121 + }, + { + "_id": "72a34476737dbd18e6e76a6a13d150e1", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 578, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/4da666b2-8004-11ef-a397-da7ad0900002" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 464, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2024-10-01T14:49:04.257Z", + "time": 77 + }, + { + "_id": "72a34476737dbd18e6e76a6a13d150e1", + "_order": 1, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 578, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/4da666b2-8004-11ef-a397-da7ad0900002" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 464, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2024-10-01T14:49:04.342Z", + "time": 63 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Microsoft-Teams-Integration_1838995911/Get-all-api-handles-returns-OK-response_1459650885/frozen.json b/cassettes/v2/Microsoft-Teams-Integration_1838995911/Get-all-api-handles-returns-OK-response_1459650885/frozen.json new file mode 100644 index 00000000000..336d1f01d68 --- /dev/null +++ b/cassettes/v2/Microsoft-Teams-Integration_1838995911/Get-all-api-handles-returns-OK-response_1459650885/frozen.json @@ -0,0 +1 @@ +"2024-10-01T14:49:04.412Z" diff --git a/cassettes/v2/Microsoft-Teams-Integration_1838995911/Get-all-api-handles-returns-OK-response_1459650885/recording.har b/cassettes/v2/Microsoft-Teams-Integration_1838995911/Get-all-api-handles-returns-OK-response_1459650885/recording.har new file mode 100644 index 00000000000..c204a2576a6 --- /dev/null +++ b/cassettes/v2/Microsoft-Teams-Integration_1838995911/Get-all-api-handles-returns-OK-response_1459650885/recording.har @@ -0,0 +1,147 @@ +{ + "log": { + "_recordingName": "Microsoft Teams Integration/Get all api handles returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "2aa5457d962850b9ec09548a871cfa4f", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 282, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 605, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"channel_id\":\"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2\",\"name\":\"Test-Get_all_api_handles_returns_OK_response-1727794144\",\"team_id\":\"e5f50a58-c929-4fb3-8866-e2cd836de3c2\",\"tenant_id\":\"4d3bac44-0230-4732-9e70-cc00736f0a97\"},\"type\":\"handle\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles" + }, + "response": { + "bodySize": 326, + "content": { + "mimeType": "application/vnd.api+json", + "size": 326, + "text": "{\"data\":{\"id\":\"4dd2b640-8004-11ef-a398-da7ad0900002\",\"type\":\"handle\",\"attributes\":{\"channel_id\":\"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2\",\"name\":\"Test-Get_all_api_handles_returns_OK_response-1727794144\",\"team_id\":\"e5f50a58-c929-4fb3-8866-e2cd836de3c2\",\"tenant_id\":\"4d3bac44-0230-4732-9e70-cc00736f0a97\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2024-10-01T14:49:04.415Z", + "time": 125 + }, + { + "_id": "99104a608eb0f16ed0e7e0a664770147", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 550, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles" + }, + "response": { + "bodySize": 2054, + "content": { + "mimeType": "application/vnd.api+json", + "size": 2054, + "text": "{\"data\":[{\"id\":\"5f002dba-7cd2-11ef-8717-da7ad0900002\",\"type\":\"ms-teams-handle-info\",\"attributes\":{\"channel_id\":\"19:m2LnqTUOkhuzGCyeG_0xql4rbKc2ZSJ25JS6UZINc-01@thread.tacv2\",\"channel_name\":\"General\",\"name\":\"test\",\"team_id\":\"008b01f1-4b68-4e81-b8a9-cfa27ba6c112\",\"team_name\":\"incident-6252-is_this_a_new_title\",\"tenant_id\":\"4d3bac44-0230-4732-9e70-cc00736f0a97\",\"tenant_name\":\"Datadog, Inc.\"}},{\"id\":\"9fc79cf6-7ffd-11ef-b391-da7ad0900002\",\"type\":\"ms-teams-handle-info\",\"attributes\":{\"channel_id\":\"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2\",\"channel_name\":\"General-1\",\"name\":\"TwA43H2NIrilngRZ6dOvNBVNFx4fZvPgdYaroSwcvoObDbJ8RRJtSyKCjkiV2AaVziZSfxNKrL7oV4XHAC0gDv4cuZwGzkv3hJyPGqCuUEHP89CyJMOrtkCRgCM5XeNqoK28J2todRY8ibd3S3xwIwmCK83F2bnBjVB6WEDbmO92F7B9XcIglNwPpy7KMeNRjzxy8Y3c0Ji6jYQIIMRDnawdBGWqCQmGtJ7mFPCHpYlZHKBT7uyV1gIAuGtwIr\",\"team_id\":\"e5f50a58-c929-4fb3-8866-e2cd836de3c2\",\"team_name\":\"Chat Integrations\",\"tenant_id\":\"4d3bac44-0230-4732-9e70-cc00736f0a97\",\"tenant_name\":\"Datadog, Inc.\"}},{\"id\":\"73ffbd06-8002-11ef-af80-da7ad0900002\",\"type\":\"ms-teams-handle-info\",\"attributes\":{\"channel_id\":\"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2\",\"channel_name\":\"General-1\",\"name\":\"TwA43H2NIrilngRZ6dOvNBVNFx4fZvPgdYaroSwcvoObDbJ8RRJtSyKCjkiV2AaVziZSfxNKrL7oV4XHAC0gDv4cuZwGzkv3hJyPGqCuUEHP89CyJMOrtkCRgCM5XeNqoK28J2todRY8ibd3S3xwIwmCK83F2bnBjVB6WEDbmO92F7B9XcIglNwPpy7KMeNRjzxy8Y3c0Ji6jYQIIMRDnawdBGWqCQmGtJ7mFPCHpYlZHKBT7uyV1gIAuGtwI\",\"team_id\":\"e5f50a58-c929-4fb3-8866-e2cd836de3c2\",\"team_name\":\"Chat Integrations\",\"tenant_id\":\"4d3bac44-0230-4732-9e70-cc00736f0a97\",\"tenant_name\":\"Datadog, Inc.\"}},{\"id\":\"4dd2b640-8004-11ef-a398-da7ad0900002\",\"type\":\"ms-teams-handle-info\",\"attributes\":{\"channel_id\":\"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2\",\"channel_name\":\"General-1\",\"name\":\"Test-Get_all_api_handles_returns_OK_response-1727794144\",\"team_id\":\"e5f50a58-c929-4fb3-8866-e2cd836de3c2\",\"team_name\":\"Chat Integrations\",\"tenant_id\":\"4d3bac44-0230-4732-9e70-cc00736f0a97\",\"tenant_name\":\"Datadog, Inc.\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 526, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-10-01T14:49:04.547Z", + "time": 134 + }, + { + "_id": "c95531c0c83d381e104b84cdcf0c1715", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 578, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/4dd2b640-8004-11ef-a398-da7ad0900002" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 464, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2024-10-01T14:49:04.688Z", + "time": 77 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Microsoft-Teams-Integration_1838995911/Get-api-handle-information-by-name-returns-OK-response_3931126647/frozen.json b/cassettes/v2/Microsoft-Teams-Integration_1838995911/Get-api-handle-information-by-name-returns-OK-response_3931126647/frozen.json new file mode 100644 index 00000000000..642f5d5ce7b --- /dev/null +++ b/cassettes/v2/Microsoft-Teams-Integration_1838995911/Get-api-handle-information-by-name-returns-OK-response_3931126647/frozen.json @@ -0,0 +1 @@ +"2024-10-01T14:49:04.773Z" diff --git a/cassettes/v2/Microsoft-Teams-Integration_1838995911/Get-api-handle-information-by-name-returns-OK-response_3931126647/recording.har b/cassettes/v2/Microsoft-Teams-Integration_1838995911/Get-api-handle-information-by-name-returns-OK-response_3931126647/recording.har new file mode 100644 index 00000000000..646e7f5b783 --- /dev/null +++ b/cassettes/v2/Microsoft-Teams-Integration_1838995911/Get-api-handle-information-by-name-returns-OK-response_3931126647/recording.har @@ -0,0 +1,147 @@ +{ + "log": { + "_recordingName": "Microsoft Teams Integration/Get api handle information by name returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "534dcf1f475f3deb95149dea909b3026", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 297, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 605, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"channel_id\":\"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2\",\"name\":\"Test-Get_api_handle_information_by_name_returns_OK_response-1727794144\",\"team_id\":\"e5f50a58-c929-4fb3-8866-e2cd836de3c2\",\"tenant_id\":\"4d3bac44-0230-4732-9e70-cc00736f0a97\"},\"type\":\"handle\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles" + }, + "response": { + "bodySize": 341, + "content": { + "mimeType": "application/vnd.api+json", + "size": 341, + "text": "{\"data\":{\"id\":\"4e084346-8004-11ef-b4b6-da7ad0900002\",\"type\":\"handle\",\"attributes\":{\"channel_id\":\"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2\",\"name\":\"Test-Get_api_handle_information_by_name_returns_OK_response-1727794144\",\"team_id\":\"e5f50a58-c929-4fb3-8866-e2cd836de3c2\",\"tenant_id\":\"4d3bac44-0230-4732-9e70-cc00736f0a97\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2024-10-01T14:49:04.777Z", + "time": 114 + }, + { + "_id": "63bf2ad5d53a2301bca84f040ee74242", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 630, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/name/Test-Get_api_handle_information_by_name_returns_OK_response-1727794144" + }, + "response": { + "bodySize": 444, + "content": { + "mimeType": "application/vnd.api+json", + "size": 444, + "text": "{\"data\":{\"id\":\"4e084346-8004-11ef-b4b6-da7ad0900002\",\"type\":\"ms-teams-handle-info\",\"attributes\":{\"channel_id\":\"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2\",\"channel_name\":\"General-1\",\"name\":\"Test-Get_api_handle_information_by_name_returns_OK_response-1727794144\",\"team_id\":\"e5f50a58-c929-4fb3-8866-e2cd836de3c2\",\"team_name\":\"Chat Integrations\",\"tenant_id\":\"4d3bac44-0230-4732-9e70-cc00736f0a97\",\"tenant_name\":\"Datadog, Inc.\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-10-01T14:49:04.899Z", + "time": 129 + }, + { + "_id": "735490074e88410fea337b40b2f270cc", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 578, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/4e084346-8004-11ef-b4b6-da7ad0900002" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 464, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2024-10-01T14:49:05.034Z", + "time": 76 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Microsoft-Teams-Integration_1838995911/Get-api-handle-information-returns-OK-response_2501134391/frozen.json b/cassettes/v2/Microsoft-Teams-Integration_1838995911/Get-api-handle-information-returns-OK-response_2501134391/frozen.json new file mode 100644 index 00000000000..610a2a8089d --- /dev/null +++ b/cassettes/v2/Microsoft-Teams-Integration_1838995911/Get-api-handle-information-returns-OK-response_2501134391/frozen.json @@ -0,0 +1 @@ +"2024-10-01T14:49:05.113Z" diff --git a/cassettes/v2/Microsoft-Teams-Integration_1838995911/Get-api-handle-information-returns-OK-response_2501134391/recording.har b/cassettes/v2/Microsoft-Teams-Integration_1838995911/Get-api-handle-information-returns-OK-response_2501134391/recording.har new file mode 100644 index 00000000000..babf510c67c --- /dev/null +++ b/cassettes/v2/Microsoft-Teams-Integration_1838995911/Get-api-handle-information-returns-OK-response_2501134391/recording.har @@ -0,0 +1,147 @@ +{ + "log": { + "_recordingName": "Microsoft Teams Integration/Get api handle information returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "8cfc2dca9672e4cf4531ce003979d0e7", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 289, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 605, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"channel_id\":\"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2\",\"name\":\"Test-Get_api_handle_information_returns_OK_response-1727794145\",\"team_id\":\"e5f50a58-c929-4fb3-8866-e2cd836de3c2\",\"tenant_id\":\"4d3bac44-0230-4732-9e70-cc00736f0a97\"},\"type\":\"handle\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles" + }, + "response": { + "bodySize": 333, + "content": { + "mimeType": "application/vnd.api+json", + "size": 333, + "text": "{\"data\":{\"id\":\"4e3c0816-8004-11ef-b813-da7ad0900002\",\"type\":\"handle\",\"attributes\":{\"channel_id\":\"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2\",\"name\":\"Test-Get_api_handle_information_returns_OK_response-1727794145\",\"team_id\":\"e5f50a58-c929-4fb3-8866-e2cd836de3c2\",\"tenant_id\":\"4d3bac44-0230-4732-9e70-cc00736f0a97\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2024-10-01T14:49:05.115Z", + "time": 116 + }, + { + "_id": "86c27b05aef4d546c2a0828cd5936072", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 585, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/4e3c0816-8004-11ef-b813-da7ad0900002" + }, + "response": { + "bodySize": 436, + "content": { + "mimeType": "application/vnd.api+json", + "size": 436, + "text": "{\"data\":{\"id\":\"4e3c0816-8004-11ef-b813-da7ad0900002\",\"type\":\"ms-teams-handle-info\",\"attributes\":{\"channel_id\":\"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2\",\"channel_name\":\"General-1\",\"name\":\"Test-Get_api_handle_information_returns_OK_response-1727794145\",\"team_id\":\"e5f50a58-c929-4fb3-8866-e2cd836de3c2\",\"team_name\":\"Chat Integrations\",\"tenant_id\":\"4d3bac44-0230-4732-9e70-cc00736f0a97\",\"tenant_name\":\"Datadog, Inc.\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-10-01T14:49:05.235Z", + "time": 139 + }, + { + "_id": "67d24ca0a1c6d50c88554f2e986117e4", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 578, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/4e3c0816-8004-11ef-b813-da7ad0900002" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 464, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2024-10-01T14:49:05.380Z", + "time": 85 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Microsoft-Teams-Integration_1838995911/Update-api-handle-returns-OK-response_1797440044/frozen.json b/cassettes/v2/Microsoft-Teams-Integration_1838995911/Update-api-handle-returns-OK-response_1797440044/frozen.json new file mode 100644 index 00000000000..952e5b010f4 --- /dev/null +++ b/cassettes/v2/Microsoft-Teams-Integration_1838995911/Update-api-handle-returns-OK-response_1797440044/frozen.json @@ -0,0 +1 @@ +"2024-10-01T14:49:05.470Z" diff --git a/cassettes/v2/Microsoft-Teams-Integration_1838995911/Update-api-handle-returns-OK-response_1797440044/recording.har b/cassettes/v2/Microsoft-Teams-Integration_1838995911/Update-api-handle-returns-OK-response_1797440044/recording.har new file mode 100644 index 00000000000..dc404df01e8 --- /dev/null +++ b/cassettes/v2/Microsoft-Teams-Integration_1838995911/Update-api-handle-returns-OK-response_1797440044/recording.har @@ -0,0 +1,157 @@ +{ + "log": { + "_recordingName": "Microsoft Teams Integration/Update api handle returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "e3e99a456502fc2336d0d9c4ff0c2932", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 280, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 605, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"channel_id\":\"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2\",\"name\":\"Test-Update_api_handle_returns_OK_response-1727794145\",\"team_id\":\"e5f50a58-c929-4fb3-8866-e2cd836de3c2\",\"tenant_id\":\"4d3bac44-0230-4732-9e70-cc00736f0a97\"},\"type\":\"handle\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles" + }, + "response": { + "bodySize": 324, + "content": { + "mimeType": "application/vnd.api+json", + "size": 324, + "text": "{\"data\":{\"id\":\"4e741fa8-8004-11ef-8fa4-da7ad0900002\",\"type\":\"handle\",\"attributes\":{\"channel_id\":\"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2\",\"name\":\"Test-Update_api_handle_returns_OK_response-1727794145\",\"team_id\":\"e5f50a58-c929-4fb3-8866-e2cd836de3c2\",\"tenant_id\":\"4d3bac44-0230-4732-9e70-cc00736f0a97\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2024-10-01T14:49:05.471Z", + "time": 132 + }, + { + "_id": "52e576846b4efab83bdfebc20bec925d", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 113, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 643, + "httpVersion": "HTTP/1.1", + "method": "PATCH", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"name\":\"Test-Update_api_handle_returns_OK_response-1727794145--updated\"},\"type\":\"handle\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/4e741fa8-8004-11ef-8fa4-da7ad0900002" + }, + "response": { + "bodySize": 436, + "content": { + "mimeType": "application/vnd.api+json", + "size": 436, + "text": "{\"data\":{\"id\":\"4e741fa8-8004-11ef-8fa4-da7ad0900002\",\"type\":\"ms-teams-handle-info\",\"attributes\":{\"channel_id\":\"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2\",\"channel_name\":\"General-1\",\"name\":\"Test-Update_api_handle_returns_OK_response-1727794145--updated\",\"team_id\":\"e5f50a58-c929-4fb3-8866-e2cd836de3c2\",\"team_name\":\"Chat Integrations\",\"tenant_id\":\"4d3bac44-0230-4732-9e70-cc00736f0a97\",\"tenant_name\":\"Datadog, Inc.\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-10-01T14:49:05.610Z", + "time": 121 + }, + { + "_id": "fa9b198e46beec63451c7920dc58c75c", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 578, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/integration/ms-teams/configuration/tenant-based-handles/4e741fa8-8004-11ef-8fa4-da7ad0900002" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 464, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2024-10-01T14:49:05.738Z", + "time": 69 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/examples/v2/microsoft-teams-integration/CreateApiHandle.ts b/examples/v2/microsoft-teams-integration/CreateApiHandle.ts new file mode 100644 index 00000000000..f01443853bb --- /dev/null +++ b/examples/v2/microsoft-teams-integration/CreateApiHandle.ts @@ -0,0 +1,31 @@ +/** + * Create handle returns "CREATED" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration); + +const params: v2.MicrosoftTeamsIntegrationApiCreateApiHandleRequest = { + body: { + data: { + attributes: { + channelId: "fake-channel-id", + name: "fake-handle-name", + teamId: "00000000-0000-0000-0000-000000000000", + tenantId: "00000000-0000-0000-0000-000000000001", + }, + type: "handle", + }, + }, +}; + +apiInstance + .createApiHandle(params) + .then((data: v2.MicrosoftTeamsCreateApiHandleResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/microsoft-teams-integration/CreateApiHandle_1540689753.ts b/examples/v2/microsoft-teams-integration/CreateApiHandle_1540689753.ts new file mode 100644 index 00000000000..e0f93ce0f6a --- /dev/null +++ b/examples/v2/microsoft-teams-integration/CreateApiHandle_1540689753.ts @@ -0,0 +1,32 @@ +/** + * Create api handle returns "CREATED" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration); + +const params: v2.MicrosoftTeamsIntegrationApiCreateApiHandleRequest = { + body: { + data: { + attributes: { + channelId: + "19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2", + name: "Example-Microsoft-Teams-Integration", + teamId: "e5f50a58-c929-4fb3-8866-e2cd836de3c2", + tenantId: "4d3bac44-0230-4732-9e70-cc00736f0a97", + }, + type: "handle", + }, + }, +}; + +apiInstance + .createApiHandle(params) + .then((data: v2.MicrosoftTeamsCreateApiHandleResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/microsoft-teams-integration/DeleteApiHandle.ts b/examples/v2/microsoft-teams-integration/DeleteApiHandle.ts new file mode 100644 index 00000000000..50deafbfb52 --- /dev/null +++ b/examples/v2/microsoft-teams-integration/DeleteApiHandle.ts @@ -0,0 +1,21 @@ +/** + * Delete handle returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration); + +const params: v2.MicrosoftTeamsIntegrationApiDeleteApiHandleRequest = { + handleId: "handle_id", +}; + +apiInstance + .deleteApiHandle(params) + .then((data: any) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/microsoft-teams-integration/DeleteApiHandle_377884154.ts b/examples/v2/microsoft-teams-integration/DeleteApiHandle_377884154.ts new file mode 100644 index 00000000000..26881e87a5b --- /dev/null +++ b/examples/v2/microsoft-teams-integration/DeleteApiHandle_377884154.ts @@ -0,0 +1,24 @@ +/** + * Delete api handle returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration); + +// there is a valid "api_handle" in the system +const API_HANDLE_DATA_ID = process.env.API_HANDLE_DATA_ID as string; + +const params: v2.MicrosoftTeamsIntegrationApiDeleteApiHandleRequest = { + handleId: API_HANDLE_DATA_ID, +}; + +apiInstance + .deleteApiHandle(params) + .then((data: any) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/microsoft-teams-integration/GetApiHandle.ts b/examples/v2/microsoft-teams-integration/GetApiHandle.ts new file mode 100644 index 00000000000..fa1b52e3b7f --- /dev/null +++ b/examples/v2/microsoft-teams-integration/GetApiHandle.ts @@ -0,0 +1,21 @@ +/** + * Get handle information returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration); + +const params: v2.MicrosoftTeamsIntegrationApiGetApiHandleRequest = { + handleId: "handle_id", +}; + +apiInstance + .getApiHandle(params) + .then((data: v2.MicrosoftTeamsApiHandleInfoResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/microsoft-teams-integration/GetApiHandleByName.ts b/examples/v2/microsoft-teams-integration/GetApiHandleByName.ts new file mode 100644 index 00000000000..5beeefd9a8f --- /dev/null +++ b/examples/v2/microsoft-teams-integration/GetApiHandleByName.ts @@ -0,0 +1,21 @@ +/** + * Get handle information by name returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration); + +const params: v2.MicrosoftTeamsIntegrationApiGetApiHandleByNameRequest = { + handleName: "handle_name", +}; + +apiInstance + .getApiHandleByName(params) + .then((data: v2.MicrosoftTeamsApiHandleInfoResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/microsoft-teams-integration/GetApiHandleByName_1103107145.ts b/examples/v2/microsoft-teams-integration/GetApiHandleByName_1103107145.ts new file mode 100644 index 00000000000..c0224eb0e0e --- /dev/null +++ b/examples/v2/microsoft-teams-integration/GetApiHandleByName_1103107145.ts @@ -0,0 +1,25 @@ +/** + * Get api handle information by name returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration); + +// there is a valid "api_handle" in the system +const API_HANDLE_DATA_ATTRIBUTES_NAME = process.env + .API_HANDLE_DATA_ATTRIBUTES_NAME as string; + +const params: v2.MicrosoftTeamsIntegrationApiGetApiHandleByNameRequest = { + handleName: API_HANDLE_DATA_ATTRIBUTES_NAME, +}; + +apiInstance + .getApiHandleByName(params) + .then((data: v2.MicrosoftTeamsApiHandleInfoResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/microsoft-teams-integration/GetApiHandle_2883785101.ts b/examples/v2/microsoft-teams-integration/GetApiHandle_2883785101.ts new file mode 100644 index 00000000000..87196c09c3f --- /dev/null +++ b/examples/v2/microsoft-teams-integration/GetApiHandle_2883785101.ts @@ -0,0 +1,24 @@ +/** + * Get api handle information returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration); + +// there is a valid "api_handle" in the system +const API_HANDLE_DATA_ID = process.env.API_HANDLE_DATA_ID as string; + +const params: v2.MicrosoftTeamsIntegrationApiGetApiHandleRequest = { + handleId: API_HANDLE_DATA_ID, +}; + +apiInstance + .getApiHandle(params) + .then((data: v2.MicrosoftTeamsApiHandleInfoResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/microsoft-teams-integration/GetChannelByName.ts b/examples/v2/microsoft-teams-integration/GetChannelByName.ts new file mode 100644 index 00000000000..2905e7e562f --- /dev/null +++ b/examples/v2/microsoft-teams-integration/GetChannelByName.ts @@ -0,0 +1,23 @@ +/** + * Get channel information by name returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration); + +const params: v2.MicrosoftTeamsIntegrationApiGetChannelByNameRequest = { + tenantName: "tenant_name", + teamName: "team_name", + channelName: "channel_name", +}; + +apiInstance + .getChannelByName(params) + .then((data: v2.MicrosoftTeamsGetChannelByNameResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/microsoft-teams-integration/ListApiHandles.ts b/examples/v2/microsoft-teams-integration/ListApiHandles.ts new file mode 100644 index 00000000000..abcd7ce4d62 --- /dev/null +++ b/examples/v2/microsoft-teams-integration/ListApiHandles.ts @@ -0,0 +1,17 @@ +/** + * Get all handles returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration); + +apiInstance + .listApiHandles() + .then((data: v2.MicrosoftTeamsApiHandlesResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/microsoft-teams-integration/ListApiHandles_769592979.ts b/examples/v2/microsoft-teams-integration/ListApiHandles_769592979.ts new file mode 100644 index 00000000000..c1e2e63db53 --- /dev/null +++ b/examples/v2/microsoft-teams-integration/ListApiHandles_769592979.ts @@ -0,0 +1,17 @@ +/** + * Get all api handles returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration); + +apiInstance + .listApiHandles() + .then((data: v2.MicrosoftTeamsApiHandlesResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/microsoft-teams-integration/UpdateApiHandle.ts b/examples/v2/microsoft-teams-integration/UpdateApiHandle.ts new file mode 100644 index 00000000000..b3380b6ef6a --- /dev/null +++ b/examples/v2/microsoft-teams-integration/UpdateApiHandle.ts @@ -0,0 +1,32 @@ +/** + * Update handle returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration); + +const params: v2.MicrosoftTeamsIntegrationApiUpdateApiHandleRequest = { + body: { + data: { + attributes: { + channelId: "fake-channel-id", + name: "fake-handle-name", + teamId: "00000000-0000-0000-0000-000000000000", + tenantId: "00000000-0000-0000-0000-000000000001", + }, + type: "handle", + }, + }, + handleId: "handle_id", +}; + +apiInstance + .updateApiHandle(params) + .then((data: v2.MicrosoftTeamsApiHandleInfoResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/microsoft-teams-integration/UpdateApiHandle_419892746.ts b/examples/v2/microsoft-teams-integration/UpdateApiHandle_419892746.ts new file mode 100644 index 00000000000..f307f2d4071 --- /dev/null +++ b/examples/v2/microsoft-teams-integration/UpdateApiHandle_419892746.ts @@ -0,0 +1,32 @@ +/** + * Update api handle returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.MicrosoftTeamsIntegrationApi(configuration); + +// there is a valid "api_handle" in the system +const API_HANDLE_DATA_ID = process.env.API_HANDLE_DATA_ID as string; + +const params: v2.MicrosoftTeamsIntegrationApiUpdateApiHandleRequest = { + body: { + data: { + attributes: { + name: "fake-handle-name--updated", + }, + type: "handle", + }, + }, + handleId: API_HANDLE_DATA_ID, +}; + +apiInstance + .updateApiHandle(params) + .then((data: v2.MicrosoftTeamsApiHandleInfoResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/features/support/scenarios_model_mapping.ts b/features/support/scenarios_model_mapping.ts index b1ece00bb6c..af1e5978ccd 100644 --- a/features/support/scenarios_model_mapping.ts +++ b/features/support/scenarios_model_mapping.ts @@ -3694,6 +3694,67 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { }, "operationResponseType": "GCPSTSDelegateAccountResponse", }, + "v2.GetChannelByName": { + "tenantName": { + "type": "string", + "format": "", + }, + "teamName": { + "type": "string", + "format": "", + }, + "channelName": { + "type": "string", + "format": "", + }, + "operationResponseType": "MicrosoftTeamsGetChannelByNameResponse", + }, + "v2.ListApiHandles": { + "tenantId": { + "type": "string", + "format": "", + }, + "operationResponseType": "MicrosoftTeamsApiHandlesResponse", + }, + "v2.CreateApiHandle": { + "body": { + "type": "MicrosoftTeamsCreateApiHandleRequest", + "format": "", + }, + "operationResponseType": "MicrosoftTeamsCreateApiHandleResponse", + }, + "v2.GetApiHandleByName": { + "handleName": { + "type": "string", + "format": "", + }, + "operationResponseType": "MicrosoftTeamsApiHandleInfoResponse", + }, + "v2.DeleteApiHandle": { + "handleId": { + "type": "string", + "format": "", + }, + "operationResponseType": "void", + }, + "v2.GetApiHandle": { + "handleId": { + "type": "string", + "format": "", + }, + "operationResponseType": "MicrosoftTeamsApiHandleInfoResponse", + }, + "v2.UpdateApiHandle": { + "handleId": { + "type": "string", + "format": "", + }, + "body": { + "type": "MicrosoftTeamsUpdateApiHandleRequest", + "format": "", + }, + "operationResponseType": "MicrosoftTeamsApiHandleInfoResponse", + }, "v2.ListOpsgenieServices": { "operationResponseType": "OpsgenieServicesResponse", }, diff --git a/features/v2/given.json b/features/v2/given.json index 65187625d3f..d3652a2a757 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -212,6 +212,18 @@ "tag": "GCP Integration", "operationId": "CreateGCPSTSAccount" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"attributes\": {\n \"name\": \"{{ unique }}\",\n \"tenant_id\": \"4d3bac44-0230-4732-9e70-cc00736f0a97\",\n \"team_id\": \"e5f50a58-c929-4fb3-8866-e2cd836de3c2\",\n \"channel_id\": \"19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2\"\n },\n \"type\": \"handle\"\n }\n}" + } + ], + "step": "there is a valid \"api_handle\" in the system", + "key": "api_handle", + "tag": "Microsoft Teams Integration", + "operationId": "CreateApiHandle" + }, { "parameters": [ { diff --git a/features/v2/microsoft_teams_integration.feature b/features/v2/microsoft_teams_integration.feature new file mode 100644 index 00000000000..f1a34862f85 --- /dev/null +++ b/features/v2/microsoft_teams_integration.feature @@ -0,0 +1,271 @@ +@endpoint(microsoft-teams-integration) @endpoint(microsoft-teams-integration-v2) +Feature: Microsoft Teams Integration + Configure your [Datadog Microsoft Teams + integration](https://docs.datadoghq.com/integrations/microsoft_teams/) + directly through the Datadog API. Note: These endpoints do not support + legacy connector handles. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "MicrosoftTeamsIntegration" API + + @team:DataDog/chat-integrations + Scenario: Create api handle returns "CREATED" response + Given new "CreateApiHandle" request + And body with value {"data": {"attributes": {"channel_id": "19:iD_D2xy_sAa-JV851JJYwIa6mlW9F9Nxm3SLyZq68qY1@thread.tacv2", "name": "{{unique}}", "team_id": "e5f50a58-c929-4fb3-8866-e2cd836de3c2", "tenant_id": "4d3bac44-0230-4732-9e70-cc00736f0a97"}, "type": "handle"}} + When the request is sent + Then the response status is 201 CREATED + And the response "data.attributes.name" is equal to "{{unique}}" + + @generated @skip @team:DataDog/chat-integrations + Scenario: Create handle returns "Bad Request" response + Given new "CreateApiHandle" request + And body with value {"data": {"attributes": {"channel_id": "fake-channel-id", "name": "fake-handle-name", "team_id": "00000000-0000-0000-0000-000000000000", "tenant_id": "00000000-0000-0000-0000-000000000001"}, "type": "handle"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/chat-integrations + Scenario: Create handle returns "CREATED" response + Given new "CreateApiHandle" request + And body with value {"data": {"attributes": {"channel_id": "fake-channel-id", "name": "fake-handle-name", "team_id": "00000000-0000-0000-0000-000000000000", "tenant_id": "00000000-0000-0000-0000-000000000001"}, "type": "handle"}} + When the request is sent + Then the response status is 201 CREATED + + @generated @skip @team:DataDog/chat-integrations + Scenario: Create handle returns "Conflict" response + Given new "CreateApiHandle" request + And body with value {"data": {"attributes": {"channel_id": "fake-channel-id", "name": "fake-handle-name", "team_id": "00000000-0000-0000-0000-000000000000", "tenant_id": "00000000-0000-0000-0000-000000000001"}, "type": "handle"}} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:DataDog/chat-integrations + Scenario: Create handle returns "Failed Precondition" response + Given new "CreateApiHandle" request + And body with value {"data": {"attributes": {"channel_id": "fake-channel-id", "name": "fake-handle-name", "team_id": "00000000-0000-0000-0000-000000000000", "tenant_id": "00000000-0000-0000-0000-000000000001"}, "type": "handle"}} + When the request is sent + Then the response status is 412 Failed Precondition + + @generated @skip @team:DataDog/chat-integrations + Scenario: Create handle returns "Not Found" response + Given new "CreateApiHandle" request + And body with value {"data": {"attributes": {"channel_id": "fake-channel-id", "name": "fake-handle-name", "team_id": "00000000-0000-0000-0000-000000000000", "tenant_id": "00000000-0000-0000-0000-000000000001"}, "type": "handle"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/chat-integrations + Scenario: Delete api handle returns "OK" response + Given there is a valid "api_handle" in the system + And new "DeleteApiHandle" request + And request contains "handle_id" parameter from "api_handle.data.id" + When the request is sent + Then the response status is 204 OK + + @generated @skip @team:DataDog/chat-integrations + Scenario: Delete handle returns "Bad Request" response + Given new "DeleteApiHandle" request + And request contains "handle_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/chat-integrations + Scenario: Delete handle returns "Failed Precondition" response + Given new "DeleteApiHandle" request + And request contains "handle_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 412 Failed Precondition + + @generated @skip @team:DataDog/chat-integrations + Scenario: Delete handle returns "OK" response + Given new "DeleteApiHandle" request + And request contains "handle_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 OK + + @team:DataDog/chat-integrations + Scenario: Get all api handles returns "OK" response + Given there is a valid "api_handle" in the system + And new "ListApiHandles" request + When the request is sent + Then the response status is 200 OK + And the response "data[0].type" is equal to "ms-teams-handle-info" + + @generated @skip @team:DataDog/chat-integrations + Scenario: Get all handles returns "Bad Request" response + Given new "ListApiHandles" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/chat-integrations + Scenario: Get all handles returns "Failed Precondition" response + Given new "ListApiHandles" request + When the request is sent + Then the response status is 412 Failed Precondition + + @generated @skip @team:DataDog/chat-integrations + Scenario: Get all handles returns "Not Found" response + Given new "ListApiHandles" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/chat-integrations + Scenario: Get all handles returns "OK" response + Given new "ListApiHandles" request + When the request is sent + Then the response status is 200 OK + + @team:DataDog/chat-integrations + Scenario: Get api handle information by name returns "OK" response + Given there is a valid "api_handle" in the system + And new "GetApiHandleByName" request + And request contains "handle_name" parameter from "api_handle.data.attributes.name" + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.channel_id" has the same value as "api_handle.data.attributes.channel_id" + And the response "data.attributes.team_id" has the same value as "api_handle.data.attributes.team_id" + And the response "data.attributes.tenant_id" has the same value as "api_handle.data.attributes.tenant_id" + + @team:DataDog/chat-integrations + Scenario: Get api handle information returns "OK" response + Given there is a valid "api_handle" in the system + And new "GetApiHandle" request + And request contains "handle_id" parameter from "api_handle.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.name" has the same value as "api_handle.data.attributes.name" + And the response "data.attributes.channel_id" has the same value as "api_handle.data.attributes.channel_id" + And the response "data.attributes.team_id" has the same value as "api_handle.data.attributes.team_id" + And the response "data.attributes.tenant_id" has the same value as "api_handle.data.attributes.tenant_id" + + @generated @skip @team:DataDog/chat-integrations + Scenario: Get channel information by name returns "Bad Request" response + Given new "GetChannelByName" request + And request contains "tenant_name" parameter from "REPLACE.ME" + And request contains "team_name" parameter from "REPLACE.ME" + And request contains "channel_name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/chat-integrations + Scenario: Get channel information by name returns "Not Found" response + Given new "GetChannelByName" request + And request contains "tenant_name" parameter from "REPLACE.ME" + And request contains "team_name" parameter from "REPLACE.ME" + And request contains "channel_name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/chat-integrations + Scenario: Get channel information by name returns "OK" response + Given new "GetChannelByName" request + And request contains "tenant_name" parameter from "REPLACE.ME" + And request contains "team_name" parameter from "REPLACE.ME" + And request contains "channel_name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/chat-integrations + Scenario: Get handle information by name returns "Bad Request" response + Given new "GetApiHandleByName" request + And request contains "handle_name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/chat-integrations + Scenario: Get handle information by name returns "Failed Precondition" response + Given new "GetApiHandleByName" request + And request contains "handle_name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 412 Failed Precondition + + @generated @skip @team:DataDog/chat-integrations + Scenario: Get handle information by name returns "Not Found" response + Given new "GetApiHandleByName" request + And request contains "handle_name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/chat-integrations + Scenario: Get handle information by name returns "OK" response + Given new "GetApiHandleByName" request + And request contains "handle_name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/chat-integrations + Scenario: Get handle information returns "Bad Request" response + Given new "GetApiHandle" request + And request contains "handle_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/chat-integrations + Scenario: Get handle information returns "Failed Precondition" response + Given new "GetApiHandle" request + And request contains "handle_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 412 Failed Precondition + + @generated @skip @team:DataDog/chat-integrations + Scenario: Get handle information returns "Not Found" response + Given new "GetApiHandle" request + And request contains "handle_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/chat-integrations + Scenario: Get handle information returns "OK" response + Given new "GetApiHandle" request + And request contains "handle_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @team:DataDog/chat-integrations + Scenario: Update api handle returns "OK" response + Given there is a valid "api_handle" in the system + And new "UpdateApiHandle" request + And request contains "handle_id" parameter from "api_handle.data.id" + And body with value {"data": {"attributes": {"name": "{{api_handle.data.attributes.name}}--updated"}, "type": "handle"}} + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.name" is equal to "{{api_handle.data.attributes.name}}--updated" + + @generated @skip @team:DataDog/chat-integrations + Scenario: Update handle returns "Bad Request" response + Given new "UpdateApiHandle" request + And request contains "handle_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"channel_id": "fake-channel-id", "name": "fake-handle-name", "team_id": "00000000-0000-0000-0000-000000000000", "tenant_id": "00000000-0000-0000-0000-000000000001"}, "type": "handle"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/chat-integrations + Scenario: Update handle returns "Conflict" response + Given new "UpdateApiHandle" request + And request contains "handle_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"channel_id": "fake-channel-id", "name": "fake-handle-name", "team_id": "00000000-0000-0000-0000-000000000000", "tenant_id": "00000000-0000-0000-0000-000000000001"}, "type": "handle"}} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:DataDog/chat-integrations + Scenario: Update handle returns "Failed Precondition" response + Given new "UpdateApiHandle" request + And request contains "handle_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"channel_id": "fake-channel-id", "name": "fake-handle-name", "team_id": "00000000-0000-0000-0000-000000000000", "tenant_id": "00000000-0000-0000-0000-000000000001"}, "type": "handle"}} + When the request is sent + Then the response status is 412 Failed Precondition + + @generated @skip @team:DataDog/chat-integrations + Scenario: Update handle returns "Not Found" response + Given new "UpdateApiHandle" request + And request contains "handle_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"channel_id": "fake-channel-id", "name": "fake-handle-name", "team_id": "00000000-0000-0000-0000-000000000000", "tenant_id": "00000000-0000-0000-0000-000000000001"}, "type": "handle"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/chat-integrations + Scenario: Update handle returns "OK" response + Given new "UpdateApiHandle" request + And request contains "handle_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"channel_id": "fake-channel-id", "name": "fake-handle-name", "team_id": "00000000-0000-0000-0000-000000000000", "tenant_id": "00000000-0000-0000-0000-000000000001"}, "type": "handle"}} + When the request is sent + Then the response status is 200 OK diff --git a/features/v2/undo.json b/features/v2/undo.json index c8228c1a92e..66c71e9fbb3 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -788,6 +788,55 @@ "type": "idempotent" } }, + "GetChannelByName": { + "tag": "Microsoft Teams Integration", + "undo": { + "type": "safe" + } + }, + "ListApiHandles": { + "tag": "Microsoft Teams Integration", + "undo": { + "type": "safe" + } + }, + "CreateApiHandle": { + "tag": "Microsoft Teams Integration", + "undo": { + "operationId": "DeleteApiHandle", + "parameters": [ + { + "name": "handle_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "GetApiHandleByName": { + "tag": "Microsoft Teams Integration", + "undo": { + "type": "safe" + } + }, + "DeleteApiHandle": { + "tag": "Microsoft Teams Integration", + "undo": { + "type": "idempotent" + } + }, + "GetApiHandle": { + "tag": "Microsoft Teams Integration", + "undo": { + "type": "safe" + } + }, + "UpdateApiHandle": { + "tag": "Microsoft Teams Integration", + "undo": { + "type": "idempotent" + } + }, "ListOpsgenieServices": { "tag": "Opsgenie Integration", "undo": { diff --git a/packages/datadog-api-client-v2/apis/MicrosoftTeamsIntegrationApi.ts b/packages/datadog-api-client-v2/apis/MicrosoftTeamsIntegrationApi.ts new file mode 100644 index 00000000000..9cf0b671eb6 --- /dev/null +++ b/packages/datadog-api-client-v2/apis/MicrosoftTeamsIntegrationApi.ts @@ -0,0 +1,1006 @@ +import { + BaseAPIRequestFactory, + RequiredError, +} from "../../datadog-api-client-common/baseapi"; +import { + Configuration, + applySecurityAuthentication, +} from "../../datadog-api-client-common/configuration"; +import { + RequestContext, + HttpMethod, + ResponseContext, +} from "../../datadog-api-client-common/http/http"; + +import { logger } from "../../../logger"; +import { ObjectSerializer } from "../models/ObjectSerializer"; +import { ApiException } from "../../datadog-api-client-common/exception"; + +import { APIErrorResponse } from "../models/APIErrorResponse"; +import { MicrosoftTeamsApiHandleInfoResponse } from "../models/MicrosoftTeamsApiHandleInfoResponse"; +import { MicrosoftTeamsApiHandlesResponse } from "../models/MicrosoftTeamsApiHandlesResponse"; +import { MicrosoftTeamsCreateApiHandleRequest } from "../models/MicrosoftTeamsCreateApiHandleRequest"; +import { MicrosoftTeamsCreateApiHandleResponse } from "../models/MicrosoftTeamsCreateApiHandleResponse"; +import { MicrosoftTeamsGetChannelByNameResponse } from "../models/MicrosoftTeamsGetChannelByNameResponse"; +import { MicrosoftTeamsUpdateApiHandleRequest } from "../models/MicrosoftTeamsUpdateApiHandleRequest"; + +export class MicrosoftTeamsIntegrationApiRequestFactory extends BaseAPIRequestFactory { + public async createApiHandle( + body: MicrosoftTeamsCreateApiHandleRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createApiHandle"); + } + + // Path Params + const localVarPath = + "/api/v2/integration/ms-teams/configuration/tenant-based-handles"; + + // Make Request Context + const requestContext = _config + .getServer("v2.MicrosoftTeamsIntegrationApi.createApiHandle") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize( + body, + "MicrosoftTeamsCreateApiHandleRequest", + "" + ), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async deleteApiHandle( + handleId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'handleId' is not null or undefined + if (handleId === null || handleId === undefined) { + throw new RequiredError("handleId", "deleteApiHandle"); + } + + // Path Params + const localVarPath = + "/api/v2/integration/ms-teams/configuration/tenant-based-handles/{handle_id}".replace( + "{handle_id}", + encodeURIComponent(String(handleId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.MicrosoftTeamsIntegrationApi.deleteApiHandle") + .makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "*/*"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async getApiHandle( + handleId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'handleId' is not null or undefined + if (handleId === null || handleId === undefined) { + throw new RequiredError("handleId", "getApiHandle"); + } + + // Path Params + const localVarPath = + "/api/v2/integration/ms-teams/configuration/tenant-based-handles/{handle_id}".replace( + "{handle_id}", + encodeURIComponent(String(handleId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.MicrosoftTeamsIntegrationApi.getApiHandle") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async getApiHandleByName( + handleName: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'handleName' is not null or undefined + if (handleName === null || handleName === undefined) { + throw new RequiredError("handleName", "getApiHandleByName"); + } + + // Path Params + const localVarPath = + "/api/v2/integration/ms-teams/configuration/tenant-based-handles/name/{handle_name}".replace( + "{handle_name}", + encodeURIComponent(String(handleName)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.MicrosoftTeamsIntegrationApi.getApiHandleByName") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async getChannelByName( + tenantName: string, + teamName: string, + channelName: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'tenantName' is not null or undefined + if (tenantName === null || tenantName === undefined) { + throw new RequiredError("tenantName", "getChannelByName"); + } + + // verify required parameter 'teamName' is not null or undefined + if (teamName === null || teamName === undefined) { + throw new RequiredError("teamName", "getChannelByName"); + } + + // verify required parameter 'channelName' is not null or undefined + if (channelName === null || channelName === undefined) { + throw new RequiredError("channelName", "getChannelByName"); + } + + // Path Params + const localVarPath = + "/api/v2/integration/ms-teams/configuration/channel/{tenant_name}/{team_name}/{channel_name}" + .replace("{tenant_name}", encodeURIComponent(String(tenantName))) + .replace("{team_name}", encodeURIComponent(String(teamName))) + .replace("{channel_name}", encodeURIComponent(String(channelName))); + + // Make Request Context + const requestContext = _config + .getServer("v2.MicrosoftTeamsIntegrationApi.getChannelByName") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async listApiHandles( + tenantId?: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // Path Params + const localVarPath = + "/api/v2/integration/ms-teams/configuration/tenant-based-handles"; + + // Make Request Context + const requestContext = _config + .getServer("v2.MicrosoftTeamsIntegrationApi.listApiHandles") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (tenantId !== undefined) { + requestContext.setQueryParam( + "tenant_id", + ObjectSerializer.serialize(tenantId, "string", "") + ); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async updateApiHandle( + handleId: string, + body: MicrosoftTeamsUpdateApiHandleRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'handleId' is not null or undefined + if (handleId === null || handleId === undefined) { + throw new RequiredError("handleId", "updateApiHandle"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateApiHandle"); + } + + // Path Params + const localVarPath = + "/api/v2/integration/ms-teams/configuration/tenant-based-handles/{handle_id}".replace( + "{handle_id}", + encodeURIComponent(String(handleId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.MicrosoftTeamsIntegrationApi.updateApiHandle") + .makeRequestContext(localVarPath, HttpMethod.PATCH); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize( + body, + "MicrosoftTeamsUpdateApiHandleRequest", + "" + ), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } +} + +export class MicrosoftTeamsIntegrationApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createApiHandle + * @throws ApiException if the response code was not in [200, 299] + */ + public async createApiHandle( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 201) { + const body: MicrosoftTeamsCreateApiHandleResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MicrosoftTeamsCreateApiHandleResponse" + ) as MicrosoftTeamsCreateApiHandleResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 409 || + response.httpStatusCode === 412 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: MicrosoftTeamsCreateApiHandleResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MicrosoftTeamsCreateApiHandleResponse", + "" + ) as MicrosoftTeamsCreateApiHandleResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteApiHandle + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteApiHandle(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 204) { + return; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 412 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", + "" + ) as void; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getApiHandle + * @throws ApiException if the response code was not in [200, 299] + */ + public async getApiHandle( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: MicrosoftTeamsApiHandleInfoResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MicrosoftTeamsApiHandleInfoResponse" + ) as MicrosoftTeamsApiHandleInfoResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 412 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: MicrosoftTeamsApiHandleInfoResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MicrosoftTeamsApiHandleInfoResponse", + "" + ) as MicrosoftTeamsApiHandleInfoResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getApiHandleByName + * @throws ApiException if the response code was not in [200, 299] + */ + public async getApiHandleByName( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: MicrosoftTeamsApiHandleInfoResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MicrosoftTeamsApiHandleInfoResponse" + ) as MicrosoftTeamsApiHandleInfoResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 412 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: MicrosoftTeamsApiHandleInfoResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MicrosoftTeamsApiHandleInfoResponse", + "" + ) as MicrosoftTeamsApiHandleInfoResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getChannelByName + * @throws ApiException if the response code was not in [200, 299] + */ + public async getChannelByName( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: MicrosoftTeamsGetChannelByNameResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MicrosoftTeamsGetChannelByNameResponse" + ) as MicrosoftTeamsGetChannelByNameResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: MicrosoftTeamsGetChannelByNameResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MicrosoftTeamsGetChannelByNameResponse", + "" + ) as MicrosoftTeamsGetChannelByNameResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to listApiHandles + * @throws ApiException if the response code was not in [200, 299] + */ + public async listApiHandles( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: MicrosoftTeamsApiHandlesResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MicrosoftTeamsApiHandlesResponse" + ) as MicrosoftTeamsApiHandlesResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 412 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: MicrosoftTeamsApiHandlesResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MicrosoftTeamsApiHandlesResponse", + "" + ) as MicrosoftTeamsApiHandlesResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateApiHandle + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateApiHandle( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: MicrosoftTeamsApiHandleInfoResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MicrosoftTeamsApiHandleInfoResponse" + ) as MicrosoftTeamsApiHandleInfoResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 409 || + response.httpStatusCode === 412 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: MicrosoftTeamsApiHandleInfoResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "MicrosoftTeamsApiHandleInfoResponse", + "" + ) as MicrosoftTeamsApiHandleInfoResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } +} + +export interface MicrosoftTeamsIntegrationApiCreateApiHandleRequest { + /** + * Handle payload. + * @type MicrosoftTeamsCreateApiHandleRequest + */ + body: MicrosoftTeamsCreateApiHandleRequest; +} + +export interface MicrosoftTeamsIntegrationApiDeleteApiHandleRequest { + /** + * Your handle id. + * @type string + */ + handleId: string; +} + +export interface MicrosoftTeamsIntegrationApiGetApiHandleRequest { + /** + * Your handle id. + * @type string + */ + handleId: string; +} + +export interface MicrosoftTeamsIntegrationApiGetApiHandleByNameRequest { + /** + * Your handle name. + * @type string + */ + handleName: string; +} + +export interface MicrosoftTeamsIntegrationApiGetChannelByNameRequest { + /** + * Your tenant name. + * @type string + */ + tenantName: string; + /** + * Your team name. + * @type string + */ + teamName: string; + /** + * Your channel name. + * @type string + */ + channelName: string; +} + +export interface MicrosoftTeamsIntegrationApiListApiHandlesRequest { + /** + * Your tenant id. + * @type string + */ + tenantId?: string; +} + +export interface MicrosoftTeamsIntegrationApiUpdateApiHandleRequest { + /** + * Your handle id. + * @type string + */ + handleId: string; + /** + * Opsgenie service payload. + * @type MicrosoftTeamsUpdateApiHandleRequest + */ + body: MicrosoftTeamsUpdateApiHandleRequest; +} + +export class MicrosoftTeamsIntegrationApi { + private requestFactory: MicrosoftTeamsIntegrationApiRequestFactory; + private responseProcessor: MicrosoftTeamsIntegrationApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: MicrosoftTeamsIntegrationApiRequestFactory, + responseProcessor?: MicrosoftTeamsIntegrationApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = + requestFactory || + new MicrosoftTeamsIntegrationApiRequestFactory(configuration); + this.responseProcessor = + responseProcessor || new MicrosoftTeamsIntegrationApiResponseProcessor(); + } + + /** + * Create a handle in the Datadog Microsoft Teams integration. + * @param param The request object + */ + public createApiHandle( + param: MicrosoftTeamsIntegrationApiCreateApiHandleRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.createApiHandle( + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createApiHandle(responseContext); + }); + }); + } + + /** + * Delete a handle from the Datadog Microsoft Teams integration. + * @param param The request object + */ + public deleteApiHandle( + param: MicrosoftTeamsIntegrationApiDeleteApiHandleRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.deleteApiHandle( + param.handleId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.deleteApiHandle(responseContext); + }); + }); + } + + /** + * Get the tenant, team, and channel information of a handle from the Datadog Microsoft Teams integration. + * @param param The request object + */ + public getApiHandle( + param: MicrosoftTeamsIntegrationApiGetApiHandleRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.getApiHandle( + param.handleId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getApiHandle(responseContext); + }); + }); + } + + /** + * Get the tenant, team, and channel information of a handle by name from the Datadog Microsoft Teams integration. + * @param param The request object + */ + public getApiHandleByName( + param: MicrosoftTeamsIntegrationApiGetApiHandleByNameRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.getApiHandleByName( + param.handleName, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getApiHandleByName(responseContext); + }); + }); + } + + /** + * Get the tenant, team, and channel ID of a channel in the Datadog Microsoft Teams integration. + * @param param The request object + */ + public getChannelByName( + param: MicrosoftTeamsIntegrationApiGetChannelByNameRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.getChannelByName( + param.tenantName, + param.teamName, + param.channelName, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getChannelByName(responseContext); + }); + }); + } + + /** + * Get a list of all handles from the Datadog Microsoft Teams integration. + * @param param The request object + */ + public listApiHandles( + param: MicrosoftTeamsIntegrationApiListApiHandlesRequest = {}, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.listApiHandles( + param.tenantId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listApiHandles(responseContext); + }); + }); + } + + /** + * Update a handle from the Datadog Microsoft Teams integration. + * @param param The request object + */ + public updateApiHandle( + param: MicrosoftTeamsIntegrationApiUpdateApiHandleRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.updateApiHandle( + param.handleId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateApiHandle(responseContext); + }); + }); + } +} diff --git a/packages/datadog-api-client-v2/index.ts b/packages/datadog-api-client-v2/index.ts index 8bfabb0229d..da90b4c9a6c 100644 --- a/packages/datadog-api-client-v2/index.ts +++ b/packages/datadog-api-client-v2/index.ts @@ -288,6 +288,17 @@ export { MetricsApi, } from "./apis/MetricsApi"; +export { + MicrosoftTeamsIntegrationApiCreateApiHandleRequest, + MicrosoftTeamsIntegrationApiDeleteApiHandleRequest, + MicrosoftTeamsIntegrationApiGetApiHandleRequest, + MicrosoftTeamsIntegrationApiGetApiHandleByNameRequest, + MicrosoftTeamsIntegrationApiGetChannelByNameRequest, + MicrosoftTeamsIntegrationApiListApiHandlesRequest, + MicrosoftTeamsIntegrationApiUpdateApiHandleRequest, + MicrosoftTeamsIntegrationApi, +} from "./apis/MicrosoftTeamsIntegrationApi"; + export { MonitorsApiCreateMonitorConfigPolicyRequest, MonitorsApiDeleteMonitorConfigPolicyRequest, @@ -1430,6 +1441,24 @@ export { MetricTagConfigurationUpdateRequest } from "./models/MetricTagConfigura export { MetricType } from "./models/MetricType"; export { MetricVolumes } from "./models/MetricVolumes"; export { MetricVolumesResponse } from "./models/MetricVolumesResponse"; +export { MicrosoftTeamsApiHandleAttributes } from "./models/MicrosoftTeamsApiHandleAttributes"; +export { MicrosoftTeamsApiHandleInfoResponse } from "./models/MicrosoftTeamsApiHandleInfoResponse"; +export { MicrosoftTeamsApiHandleInfoResponseAttributes } from "./models/MicrosoftTeamsApiHandleInfoResponseAttributes"; +export { MicrosoftTeamsApiHandleInfoResponseData } from "./models/MicrosoftTeamsApiHandleInfoResponseData"; +export { MicrosoftTeamsApiHandleInfoType } from "./models/MicrosoftTeamsApiHandleInfoType"; +export { MicrosoftTeamsApiHandleRequestAttributes } from "./models/MicrosoftTeamsApiHandleRequestAttributes"; +export { MicrosoftTeamsApiHandleRequestData } from "./models/MicrosoftTeamsApiHandleRequestData"; +export { MicrosoftTeamsApiHandleResponseData } from "./models/MicrosoftTeamsApiHandleResponseData"; +export { MicrosoftTeamsApiHandlesResponse } from "./models/MicrosoftTeamsApiHandlesResponse"; +export { MicrosoftTeamsApiHandleType } from "./models/MicrosoftTeamsApiHandleType"; +export { MicrosoftTeamsChannelInfoResponseAttributes } from "./models/MicrosoftTeamsChannelInfoResponseAttributes"; +export { MicrosoftTeamsChannelInfoResponseData } from "./models/MicrosoftTeamsChannelInfoResponseData"; +export { MicrosoftTeamsChannelInfoType } from "./models/MicrosoftTeamsChannelInfoType"; +export { MicrosoftTeamsCreateApiHandleRequest } from "./models/MicrosoftTeamsCreateApiHandleRequest"; +export { MicrosoftTeamsCreateApiHandleResponse } from "./models/MicrosoftTeamsCreateApiHandleResponse"; +export { MicrosoftTeamsGetChannelByNameResponse } from "./models/MicrosoftTeamsGetChannelByNameResponse"; +export { MicrosoftTeamsUpdateApiHandleRequest } from "./models/MicrosoftTeamsUpdateApiHandleRequest"; +export { MicrosoftTeamsUpdateApiHandleRequestData } from "./models/MicrosoftTeamsUpdateApiHandleRequestData"; export { MonitorConfigPolicyAttributeCreateRequest } from "./models/MonitorConfigPolicyAttributeCreateRequest"; export { MonitorConfigPolicyAttributeEditRequest } from "./models/MonitorConfigPolicyAttributeEditRequest"; export { MonitorConfigPolicyAttributeResponse } from "./models/MonitorConfigPolicyAttributeResponse"; diff --git a/packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleAttributes.ts b/packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleAttributes.ts new file mode 100644 index 00000000000..3d73488f2c7 --- /dev/null +++ b/packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleAttributes.ts @@ -0,0 +1,76 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Handle attributes. + */ +export class MicrosoftTeamsApiHandleAttributes { + /** + * Channel id. + */ + "channelId"?: string; + /** + * Handle name. + */ + "name"?: string; + /** + * Team id. + */ + "teamId"?: string; + /** + * Tenant id. + */ + "tenantId"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + channelId: { + baseName: "channel_id", + type: "string", + }, + name: { + baseName: "name", + type: "string", + }, + teamId: { + baseName: "team_id", + type: "string", + }, + tenantId: { + baseName: "tenant_id", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return MicrosoftTeamsApiHandleAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleInfoResponse.ts b/packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleInfoResponse.ts new file mode 100644 index 00000000000..0782620f197 --- /dev/null +++ b/packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleInfoResponse.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { MicrosoftTeamsApiHandleInfoResponseData } from "./MicrosoftTeamsApiHandleInfoResponseData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response of a handle. + */ +export class MicrosoftTeamsApiHandleInfoResponse { + /** + * Handle data from a response. + */ + "data"?: MicrosoftTeamsApiHandleInfoResponseData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "MicrosoftTeamsApiHandleInfoResponseData", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return MicrosoftTeamsApiHandleInfoResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleInfoResponseAttributes.ts b/packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleInfoResponseAttributes.ts new file mode 100644 index 00000000000..ec6d9678a1c --- /dev/null +++ b/packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleInfoResponseAttributes.ts @@ -0,0 +1,100 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Handle attributes. + */ +export class MicrosoftTeamsApiHandleInfoResponseAttributes { + /** + * Channel id. + */ + "channelId"?: string; + /** + * Channel name. + */ + "channelName"?: string; + /** + * Handle name. + */ + "name"?: string; + /** + * Team id. + */ + "teamId"?: string; + /** + * Team name. + */ + "teamName"?: string; + /** + * Tenant id. + */ + "tenantId"?: string; + /** + * Tenant name. + */ + "tenantName"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + channelId: { + baseName: "channel_id", + type: "string", + }, + channelName: { + baseName: "channel_name", + type: "string", + }, + name: { + baseName: "name", + type: "string", + }, + teamId: { + baseName: "team_id", + type: "string", + }, + teamName: { + baseName: "team_name", + type: "string", + }, + tenantId: { + baseName: "tenant_id", + type: "string", + }, + tenantName: { + baseName: "tenant_name", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return MicrosoftTeamsApiHandleInfoResponseAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleInfoResponseData.ts b/packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleInfoResponseData.ts new file mode 100644 index 00000000000..d211a040843 --- /dev/null +++ b/packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleInfoResponseData.ts @@ -0,0 +1,70 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { MicrosoftTeamsApiHandleInfoResponseAttributes } from "./MicrosoftTeamsApiHandleInfoResponseAttributes"; +import { MicrosoftTeamsApiHandleInfoType } from "./MicrosoftTeamsApiHandleInfoType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Handle data from a response. + */ +export class MicrosoftTeamsApiHandleInfoResponseData { + /** + * Handle attributes. + */ + "attributes"?: MicrosoftTeamsApiHandleInfoResponseAttributes; + /** + * The ID of the handle. + */ + "id"?: string; + /** + * Handle resource type. + */ + "type"?: MicrosoftTeamsApiHandleInfoType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "MicrosoftTeamsApiHandleInfoResponseAttributes", + }, + id: { + baseName: "id", + type: "string", + }, + type: { + baseName: "type", + type: "MicrosoftTeamsApiHandleInfoType", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return MicrosoftTeamsApiHandleInfoResponseData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleInfoType.ts b/packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleInfoType.ts new file mode 100644 index 00000000000..8d4b9dea8af --- /dev/null +++ b/packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleInfoType.ts @@ -0,0 +1,16 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Handle resource type. + */ + +export type MicrosoftTeamsApiHandleInfoType = + | typeof MS_TEAMS_HANDLE_INFO + | UnparsedObject; +export const MS_TEAMS_HANDLE_INFO = "ms-teams-handle-info"; diff --git a/packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleRequestAttributes.ts b/packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleRequestAttributes.ts new file mode 100644 index 00000000000..90193a5e213 --- /dev/null +++ b/packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleRequestAttributes.ts @@ -0,0 +1,80 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Handle attributes. + */ +export class MicrosoftTeamsApiHandleRequestAttributes { + /** + * Channel id. + */ + "channelId": string; + /** + * Handle name. + */ + "name": string; + /** + * Team id. + */ + "teamId": string; + /** + * Tenant id. + */ + "tenantId": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + channelId: { + baseName: "channel_id", + type: "string", + required: true, + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + teamId: { + baseName: "team_id", + type: "string", + required: true, + }, + tenantId: { + baseName: "tenant_id", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return MicrosoftTeamsApiHandleRequestAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleRequestData.ts b/packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleRequestData.ts new file mode 100644 index 00000000000..f45864dff91 --- /dev/null +++ b/packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleRequestData.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { MicrosoftTeamsApiHandleRequestAttributes } from "./MicrosoftTeamsApiHandleRequestAttributes"; +import { MicrosoftTeamsApiHandleType } from "./MicrosoftTeamsApiHandleType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Handle data from a response. + */ +export class MicrosoftTeamsApiHandleRequestData { + /** + * Handle attributes. + */ + "attributes": MicrosoftTeamsApiHandleRequestAttributes; + /** + * Specifies the handle resource type. + */ + "type": MicrosoftTeamsApiHandleType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "MicrosoftTeamsApiHandleRequestAttributes", + required: true, + }, + type: { + baseName: "type", + type: "MicrosoftTeamsApiHandleType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return MicrosoftTeamsApiHandleRequestData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleResponseData.ts b/packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleResponseData.ts new file mode 100644 index 00000000000..bfd6b10a602 --- /dev/null +++ b/packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleResponseData.ts @@ -0,0 +1,70 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { MicrosoftTeamsApiHandleAttributes } from "./MicrosoftTeamsApiHandleAttributes"; +import { MicrosoftTeamsApiHandleType } from "./MicrosoftTeamsApiHandleType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Handle data from a response. + */ +export class MicrosoftTeamsApiHandleResponseData { + /** + * Handle attributes. + */ + "attributes"?: MicrosoftTeamsApiHandleAttributes; + /** + * The ID of the handle. + */ + "id"?: string; + /** + * Specifies the handle resource type. + */ + "type"?: MicrosoftTeamsApiHandleType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "MicrosoftTeamsApiHandleAttributes", + }, + id: { + baseName: "id", + type: "string", + }, + type: { + baseName: "type", + type: "MicrosoftTeamsApiHandleType", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return MicrosoftTeamsApiHandleResponseData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleType.ts b/packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleType.ts new file mode 100644 index 00000000000..1b695de14d9 --- /dev/null +++ b/packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandleType.ts @@ -0,0 +1,14 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Specifies the handle resource type. + */ + +export type MicrosoftTeamsApiHandleType = typeof HANDLE | UnparsedObject; +export const HANDLE = "handle"; diff --git a/packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandlesResponse.ts b/packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandlesResponse.ts new file mode 100644 index 00000000000..723d52a100e --- /dev/null +++ b/packages/datadog-api-client-v2/models/MicrosoftTeamsApiHandlesResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { MicrosoftTeamsApiHandleInfoResponseData } from "./MicrosoftTeamsApiHandleInfoResponseData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with a list of handles. + */ +export class MicrosoftTeamsApiHandlesResponse { + /** + * An array of handles. + */ + "data": Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return MicrosoftTeamsApiHandlesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/MicrosoftTeamsChannelInfoResponseAttributes.ts b/packages/datadog-api-client-v2/models/MicrosoftTeamsChannelInfoResponseAttributes.ts new file mode 100644 index 00000000000..35f2bb48290 --- /dev/null +++ b/packages/datadog-api-client-v2/models/MicrosoftTeamsChannelInfoResponseAttributes.ts @@ -0,0 +1,68 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Channel attributes. + */ +export class MicrosoftTeamsChannelInfoResponseAttributes { + /** + * Indicates if this is the primary channel. + */ + "isPrimary"?: boolean; + /** + * Team id. + */ + "teamId"?: string; + /** + * Tenant id. + */ + "tenantId"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + isPrimary: { + baseName: "is_primary", + type: "boolean", + }, + teamId: { + baseName: "team_id", + type: "string", + }, + tenantId: { + baseName: "tenant_id", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return MicrosoftTeamsChannelInfoResponseAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/MicrosoftTeamsChannelInfoResponseData.ts b/packages/datadog-api-client-v2/models/MicrosoftTeamsChannelInfoResponseData.ts new file mode 100644 index 00000000000..5468293f46c --- /dev/null +++ b/packages/datadog-api-client-v2/models/MicrosoftTeamsChannelInfoResponseData.ts @@ -0,0 +1,70 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { MicrosoftTeamsChannelInfoResponseAttributes } from "./MicrosoftTeamsChannelInfoResponseAttributes"; +import { MicrosoftTeamsChannelInfoType } from "./MicrosoftTeamsChannelInfoType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Channel data from a response. + */ +export class MicrosoftTeamsChannelInfoResponseData { + /** + * Channel attributes. + */ + "attributes"?: MicrosoftTeamsChannelInfoResponseAttributes; + /** + * The ID of the channel. + */ + "id"?: string; + /** + * Channel info resource type. + */ + "type"?: MicrosoftTeamsChannelInfoType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "MicrosoftTeamsChannelInfoResponseAttributes", + }, + id: { + baseName: "id", + type: "string", + }, + type: { + baseName: "type", + type: "MicrosoftTeamsChannelInfoType", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return MicrosoftTeamsChannelInfoResponseData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/MicrosoftTeamsChannelInfoType.ts b/packages/datadog-api-client-v2/models/MicrosoftTeamsChannelInfoType.ts new file mode 100644 index 00000000000..5c25606e456 --- /dev/null +++ b/packages/datadog-api-client-v2/models/MicrosoftTeamsChannelInfoType.ts @@ -0,0 +1,16 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Channel info resource type. + */ + +export type MicrosoftTeamsChannelInfoType = + | typeof MS_TEAMS_CHANNEL_INFO + | UnparsedObject; +export const MS_TEAMS_CHANNEL_INFO = "ms-teams-channel-info"; diff --git a/packages/datadog-api-client-v2/models/MicrosoftTeamsCreateApiHandleRequest.ts b/packages/datadog-api-client-v2/models/MicrosoftTeamsCreateApiHandleRequest.ts new file mode 100644 index 00000000000..d465f82af74 --- /dev/null +++ b/packages/datadog-api-client-v2/models/MicrosoftTeamsCreateApiHandleRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { MicrosoftTeamsApiHandleRequestData } from "./MicrosoftTeamsApiHandleRequestData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Create handle request. + */ +export class MicrosoftTeamsCreateApiHandleRequest { + /** + * Handle data from a response. + */ + "data": MicrosoftTeamsApiHandleRequestData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "MicrosoftTeamsApiHandleRequestData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return MicrosoftTeamsCreateApiHandleRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/MicrosoftTeamsCreateApiHandleResponse.ts b/packages/datadog-api-client-v2/models/MicrosoftTeamsCreateApiHandleResponse.ts new file mode 100644 index 00000000000..b071a564a1c --- /dev/null +++ b/packages/datadog-api-client-v2/models/MicrosoftTeamsCreateApiHandleResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { MicrosoftTeamsApiHandleResponseData } from "./MicrosoftTeamsApiHandleResponseData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response of a handle. + */ +export class MicrosoftTeamsCreateApiHandleResponse { + /** + * Handle data from a response. + */ + "data": MicrosoftTeamsApiHandleResponseData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "MicrosoftTeamsApiHandleResponseData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return MicrosoftTeamsCreateApiHandleResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/MicrosoftTeamsGetChannelByNameResponse.ts b/packages/datadog-api-client-v2/models/MicrosoftTeamsGetChannelByNameResponse.ts new file mode 100644 index 00000000000..0350b35bcc6 --- /dev/null +++ b/packages/datadog-api-client-v2/models/MicrosoftTeamsGetChannelByNameResponse.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { MicrosoftTeamsChannelInfoResponseData } from "./MicrosoftTeamsChannelInfoResponseData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with channel, team, and tenant ID information. + */ +export class MicrosoftTeamsGetChannelByNameResponse { + /** + * Channel data from a response. + */ + "data"?: MicrosoftTeamsChannelInfoResponseData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "MicrosoftTeamsChannelInfoResponseData", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return MicrosoftTeamsGetChannelByNameResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/MicrosoftTeamsUpdateApiHandleRequest.ts b/packages/datadog-api-client-v2/models/MicrosoftTeamsUpdateApiHandleRequest.ts new file mode 100644 index 00000000000..5cc9edfd30e --- /dev/null +++ b/packages/datadog-api-client-v2/models/MicrosoftTeamsUpdateApiHandleRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { MicrosoftTeamsUpdateApiHandleRequestData } from "./MicrosoftTeamsUpdateApiHandleRequestData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Update handle request. + */ +export class MicrosoftTeamsUpdateApiHandleRequest { + /** + * Handle data from a response. + */ + "data": MicrosoftTeamsUpdateApiHandleRequestData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "MicrosoftTeamsUpdateApiHandleRequestData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return MicrosoftTeamsUpdateApiHandleRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/MicrosoftTeamsUpdateApiHandleRequestData.ts b/packages/datadog-api-client-v2/models/MicrosoftTeamsUpdateApiHandleRequestData.ts new file mode 100644 index 00000000000..10807401133 --- /dev/null +++ b/packages/datadog-api-client-v2/models/MicrosoftTeamsUpdateApiHandleRequestData.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { MicrosoftTeamsApiHandleAttributes } from "./MicrosoftTeamsApiHandleAttributes"; +import { MicrosoftTeamsApiHandleType } from "./MicrosoftTeamsApiHandleType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Handle data from a response. + */ +export class MicrosoftTeamsUpdateApiHandleRequestData { + /** + * Handle attributes. + */ + "attributes": MicrosoftTeamsApiHandleAttributes; + /** + * Specifies the handle resource type. + */ + "type": MicrosoftTeamsApiHandleType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "MicrosoftTeamsApiHandleAttributes", + required: true, + }, + type: { + baseName: "type", + type: "MicrosoftTeamsApiHandleType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return MicrosoftTeamsUpdateApiHandleRequestData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ObjectSerializer.ts b/packages/datadog-api-client-v2/models/ObjectSerializer.ts index 0dbd7431c5e..0c299d8b29d 100644 --- a/packages/datadog-api-client-v2/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v2/models/ObjectSerializer.ts @@ -683,6 +683,21 @@ import { MetricVolumesResponse } from "./MetricVolumesResponse"; import { MetricsAndMetricTagConfigurationsResponse } from "./MetricsAndMetricTagConfigurationsResponse"; import { MetricsScalarQuery } from "./MetricsScalarQuery"; import { MetricsTimeseriesQuery } from "./MetricsTimeseriesQuery"; +import { MicrosoftTeamsApiHandleAttributes } from "./MicrosoftTeamsApiHandleAttributes"; +import { MicrosoftTeamsApiHandleInfoResponse } from "./MicrosoftTeamsApiHandleInfoResponse"; +import { MicrosoftTeamsApiHandleInfoResponseAttributes } from "./MicrosoftTeamsApiHandleInfoResponseAttributes"; +import { MicrosoftTeamsApiHandleInfoResponseData } from "./MicrosoftTeamsApiHandleInfoResponseData"; +import { MicrosoftTeamsApiHandleRequestAttributes } from "./MicrosoftTeamsApiHandleRequestAttributes"; +import { MicrosoftTeamsApiHandleRequestData } from "./MicrosoftTeamsApiHandleRequestData"; +import { MicrosoftTeamsApiHandleResponseData } from "./MicrosoftTeamsApiHandleResponseData"; +import { MicrosoftTeamsApiHandlesResponse } from "./MicrosoftTeamsApiHandlesResponse"; +import { MicrosoftTeamsChannelInfoResponseAttributes } from "./MicrosoftTeamsChannelInfoResponseAttributes"; +import { MicrosoftTeamsChannelInfoResponseData } from "./MicrosoftTeamsChannelInfoResponseData"; +import { MicrosoftTeamsCreateApiHandleRequest } from "./MicrosoftTeamsCreateApiHandleRequest"; +import { MicrosoftTeamsCreateApiHandleResponse } from "./MicrosoftTeamsCreateApiHandleResponse"; +import { MicrosoftTeamsGetChannelByNameResponse } from "./MicrosoftTeamsGetChannelByNameResponse"; +import { MicrosoftTeamsUpdateApiHandleRequest } from "./MicrosoftTeamsUpdateApiHandleRequest"; +import { MicrosoftTeamsUpdateApiHandleRequestData } from "./MicrosoftTeamsUpdateApiHandleRequestData"; import { MonitorConfigPolicyAttributeCreateRequest } from "./MonitorConfigPolicyAttributeCreateRequest"; import { MonitorConfigPolicyAttributeEditRequest } from "./MonitorConfigPolicyAttributeEditRequest"; import { MonitorConfigPolicyAttributeResponse } from "./MonitorConfigPolicyAttributeResponse"; @@ -1569,6 +1584,9 @@ const enumsMap: { [key: string]: any[] } = { "area", ], MetricsDataSource: ["metrics", "cloud_cost"], + MicrosoftTeamsApiHandleInfoType: ["ms-teams-handle-info"], + MicrosoftTeamsApiHandleType: ["handle"], + MicrosoftTeamsChannelInfoType: ["ms-teams-channel-info"], MonitorConfigPolicyResourceType: ["monitor-config-policy"], MonitorConfigPolicyType: ["tag"], MonitorDowntimeMatchResourceType: ["downtime_match"], @@ -2623,6 +2641,27 @@ const typeMap: { [index: string]: any } = { MetricsAndMetricTagConfigurationsResponse, MetricsScalarQuery: MetricsScalarQuery, MetricsTimeseriesQuery: MetricsTimeseriesQuery, + MicrosoftTeamsApiHandleAttributes: MicrosoftTeamsApiHandleAttributes, + MicrosoftTeamsApiHandleInfoResponse: MicrosoftTeamsApiHandleInfoResponse, + MicrosoftTeamsApiHandleInfoResponseAttributes: + MicrosoftTeamsApiHandleInfoResponseAttributes, + MicrosoftTeamsApiHandleInfoResponseData: + MicrosoftTeamsApiHandleInfoResponseData, + MicrosoftTeamsApiHandleRequestAttributes: + MicrosoftTeamsApiHandleRequestAttributes, + MicrosoftTeamsApiHandleRequestData: MicrosoftTeamsApiHandleRequestData, + MicrosoftTeamsApiHandleResponseData: MicrosoftTeamsApiHandleResponseData, + MicrosoftTeamsApiHandlesResponse: MicrosoftTeamsApiHandlesResponse, + MicrosoftTeamsChannelInfoResponseAttributes: + MicrosoftTeamsChannelInfoResponseAttributes, + MicrosoftTeamsChannelInfoResponseData: MicrosoftTeamsChannelInfoResponseData, + MicrosoftTeamsCreateApiHandleRequest: MicrosoftTeamsCreateApiHandleRequest, + MicrosoftTeamsCreateApiHandleResponse: MicrosoftTeamsCreateApiHandleResponse, + MicrosoftTeamsGetChannelByNameResponse: + MicrosoftTeamsGetChannelByNameResponse, + MicrosoftTeamsUpdateApiHandleRequest: MicrosoftTeamsUpdateApiHandleRequest, + MicrosoftTeamsUpdateApiHandleRequestData: + MicrosoftTeamsUpdateApiHandleRequestData, MonitorConfigPolicyAttributeCreateRequest: MonitorConfigPolicyAttributeCreateRequest, MonitorConfigPolicyAttributeEditRequest: