Skip to content

Commit e1173a6

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 4602cff of spec repo
1 parent f651870 commit e1173a6

File tree

15 files changed

+661
-718
lines changed

15 files changed

+661
-718
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83879,7 +83879,7 @@ paths:
8387983879
- teams_read
8388083880
summary: Delete team connections
8388183881
tags:
83882-
- Team Connections
83882+
- Teams
8388383883
x-permission:
8388483884
operator: OR
8388583885
permissions:
@@ -83958,7 +83958,7 @@ paths:
8395883958
- teams_read
8395983959
summary: List team connections
8396083960
tags:
83961-
- Team Connections
83961+
- Teams
8396283962
x-pagination:
8396383963
limitParam: page[size]
8396483964
pageParam: page[number]
@@ -84002,7 +84002,7 @@ paths:
8400284002
- teams_read
8400384003
summary: Create team connections
8400484004
tags:
84005-
- Team Connections
84005+
- Teams
8400684006
x-permission:
8400784007
operator: OR
8400884008
permissions:
@@ -87323,9 +87323,6 @@ tags:
8732387323
use Datadog\u2019s API to\nmanage both test types programmatically.\n\nFor more
8732487324
information about Synthetics, see the [Synthetics overview](https://docs.datadoghq.com/synthetics/)."
8732587325
name: Synthetics
87326-
- description: View and manage relationships between Datadog teams and teams from
87327-
external sources, such as GitHub.
87328-
name: Team Connections
8732987326
- description: View and manage teams within Datadog. See the [Teams page](https://docs.datadoghq.com/account_management/teams/)
8733087327
for more information.
8733187328
name: Teams

examples/v2/team-connections/CreateTeamConnections.ts renamed to examples/v2/teams/CreateTeamConnections.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import { client, v2 } from "@datadog/datadog-api-client";
66

77
const configuration = client.createConfiguration();
88
configuration.unstableOperations["v2.createTeamConnections"] = true;
9-
const apiInstance = new v2.TeamConnectionsApi(configuration);
9+
const apiInstance = new v2.TeamsApi(configuration);
1010

1111
// there is a valid "dd_team" in the system
1212
const DD_TEAM_DATA_ID = process.env.DD_TEAM_DATA_ID as string;
1313

14-
const params: v2.TeamConnectionsApiCreateTeamConnectionsRequest = {
14+
const params: v2.TeamsApiCreateTeamConnectionsRequest = {
1515
body: {
1616
data: [
1717
{

examples/v2/team-connections/DeleteTeamConnections.ts renamed to examples/v2/teams/DeleteTeamConnections.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import { client, v2 } from "@datadog/datadog-api-client";
66

77
const configuration = client.createConfiguration();
88
configuration.unstableOperations["v2.deleteTeamConnections"] = true;
9-
const apiInstance = new v2.TeamConnectionsApi(configuration);
9+
const apiInstance = new v2.TeamsApi(configuration);
1010

11-
const params: v2.TeamConnectionsApiDeleteTeamConnectionsRequest = {
11+
const params: v2.TeamsApiDeleteTeamConnectionsRequest = {
1212
body: {
1313
data: [
1414
{

examples/v2/team-connections/ListTeamConnections.ts renamed to examples/v2/teams/ListTeamConnections.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { client, v2 } from "@datadog/datadog-api-client";
66

77
const configuration = client.createConfiguration();
88
configuration.unstableOperations["v2.listTeamConnections"] = true;
9-
const apiInstance = new v2.TeamConnectionsApi(configuration);
9+
const apiInstance = new v2.TeamsApi(configuration);
1010

1111
apiInstance
1212
.listTeamConnections()

examples/v2/team-connections/ListTeamConnections_1473516764.ts renamed to examples/v2/teams/ListTeamConnections_1473516764.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import { client, v2 } from "@datadog/datadog-api-client";
66

77
const configuration = client.createConfiguration();
88
configuration.unstableOperations["v2.listTeamConnections"] = true;
9-
const apiInstance = new v2.TeamConnectionsApi(configuration);
9+
const apiInstance = new v2.TeamsApi(configuration);
1010

11-
const params: v2.TeamConnectionsApiListTeamConnectionsRequest = {
11+
const params: v2.TeamsApiListTeamConnectionsRequest = {
1212
pageSize: 10,
1313
filterSources: ["github"],
1414
};

examples/v2/team-connections/ListTeamConnections_2418873869.ts renamed to examples/v2/teams/ListTeamConnections_2418873869.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { client, v2 } from "@datadog/datadog-api-client";
66

77
const configuration = client.createConfiguration();
88
configuration.unstableOperations["v2.listTeamConnections"] = true;
9-
const apiInstance = new v2.TeamConnectionsApi(configuration);
9+
const apiInstance = new v2.TeamsApi(configuration);
1010

1111
(async () => {
1212
try {

features/support/scenarios_model_mapping.ts

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -8947,6 +8947,47 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
89478947
},
89488948
"operationResponseType": "{}",
89498949
},
8950+
"v2.ListTeamConnections": {
8951+
"pageSize": {
8952+
"type": "number",
8953+
"format": "int64",
8954+
},
8955+
"pageNumber": {
8956+
"type": "number",
8957+
"format": "int64",
8958+
},
8959+
"filterSources": {
8960+
"type": "Array<string>",
8961+
"format": "",
8962+
},
8963+
"filterTeamIds": {
8964+
"type": "Array<string>",
8965+
"format": "",
8966+
},
8967+
"filterConnectedTeamIds": {
8968+
"type": "Array<string>",
8969+
"format": "",
8970+
},
8971+
"filterConnectionIds": {
8972+
"type": "Array<string>",
8973+
"format": "",
8974+
},
8975+
"operationResponseType": "TeamConnectionsResponse",
8976+
},
8977+
"v2.CreateTeamConnections": {
8978+
"body": {
8979+
"type": "TeamConnectionCreateRequest",
8980+
"format": "",
8981+
},
8982+
"operationResponseType": "TeamConnectionsResponse",
8983+
},
8984+
"v2.DeleteTeamConnections": {
8985+
"body": {
8986+
"type": "TeamConnectionDeleteRequest",
8987+
"format": "",
8988+
},
8989+
"operationResponseType": "{}",
8990+
},
89508991
"v2.GetTeamSync": {
89518992
"filterSource": {
89528993
"type": "TeamSyncAttributesSource",
@@ -9171,47 +9212,6 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
91719212
},
91729213
"operationResponseType": "UserTeamsResponse",
91739214
},
9174-
"v2.ListTeamConnections": {
9175-
"pageSize": {
9176-
"type": "number",
9177-
"format": "int64",
9178-
},
9179-
"pageNumber": {
9180-
"type": "number",
9181-
"format": "int64",
9182-
},
9183-
"filterSources": {
9184-
"type": "Array<string>",
9185-
"format": "",
9186-
},
9187-
"filterTeamIds": {
9188-
"type": "Array<string>",
9189-
"format": "",
9190-
},
9191-
"filterConnectedTeamIds": {
9192-
"type": "Array<string>",
9193-
"format": "",
9194-
},
9195-
"filterConnectionIds": {
9196-
"type": "Array<string>",
9197-
"format": "",
9198-
},
9199-
"operationResponseType": "TeamConnectionsResponse",
9200-
},
9201-
"v2.CreateTeamConnections": {
9202-
"body": {
9203-
"type": "TeamConnectionCreateRequest",
9204-
"format": "",
9205-
},
9206-
"operationResponseType": "TeamConnectionsResponse",
9207-
},
9208-
"v2.DeleteTeamConnections": {
9209-
"body": {
9210-
"type": "TeamConnectionDeleteRequest",
9211-
"format": "",
9212-
},
9213-
"operationResponseType": "{}",
9214-
},
92159215
"v2.ListIncidentTeams": {
92169216
"include": {
92179217
"type": "IncidentRelatedObject",

features/v2/given.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1209,7 +1209,7 @@
12091209
"source": "data.data[0]",
12101210
"step": "there is a valid \"team_connection\" in the system",
12111211
"key": "team_connection",
1212-
"tag": "Team Connections",
1212+
"tag": "Teams",
12131213
"operationId": "CreateTeamConnections"
12141214
},
12151215
{

features/v2/team_connections.feature

Lines changed: 0 additions & 93 deletions
This file was deleted.

features/v2/teams.feature

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,60 @@ Feature: Teams
115115
And the response "data.attributes.visible_modules" is equal to ["m1","m2"]
116116
And the response "data.attributes.hidden_modules" is equal to ["m3"]
117117

118+
@skip @team:DataDog/aaa-omg
119+
Scenario: Create team connections returns "Bad Request" response
120+
Given operation "CreateTeamConnections" enabled
121+
And new "CreateTeamConnections" request
122+
And body with value {"data": [{"attributes": {"source": "github"}, "relationships": {"connected_team": {"data": {"id": "@MyGitHubAccount/my-team-name", "type": "github_team"}}, "team": {"data": {"type": "team"}}}, "type": "team_connection"}]}
123+
When the request is sent
124+
Then the response status is 400 Bad Request
125+
126+
@generated @skip @team:DataDog/aaa-omg
127+
Scenario: Create team connections returns "Conflict" response
128+
Given operation "CreateTeamConnections" enabled
129+
And new "CreateTeamConnections" request
130+
And body with value {"data": [{"attributes": {"managed_by": "github_sync", "source": "github"}, "relationships": {"connected_team": {"data": {"id": "@GitHubOrg/team-handle", "type": "github_team"}}, "team": {"data": {"id": "87654321-4321-8765-dcba-210987654321", "type": "team"}}}, "type": "team_connection"}]}
131+
When the request is sent
132+
Then the response status is 409 Conflict
133+
134+
@skip @team:DataDog/aaa-omg
135+
Scenario: Create team connections returns "Created" response
136+
Given operation "CreateTeamConnections" enabled
137+
And new "CreateTeamConnections" request
138+
And there is a valid "dd_team" in the system
139+
And body with value {"data": [{"type": "team_connection", "attributes": {"source": "github", "managed_by": "datadog"}, "relationships": {"team": {"data": {"id": "{{ dd_team.data.id }}", "type": "team"}}, "connected_team": {"data": {"id": "@MyGitHubAccount/my-team-name", "type": "github_team"}}}}]}
140+
When the request is sent
141+
Then the response status is 201 Created
142+
And the response "data.data[0].attributes.source" is equal to "github"
143+
And the response "data.data[0].attributes.managed_by" is equal to "datadog"
144+
And the response "data.data[0].relationships.team.data.id" is equal to "{{ dd_team.data.id }}"
145+
And the response "data.data[0].relationships.connected_team.data.id" is equal to "@MyGitHubAccount/my-team-name"
146+
And the response "data.data[0].type" is equal to "team_connection"
147+
148+
@skip @team:DataDog/aaa-omg
149+
Scenario: Delete team connections returns "Bad Request" response
150+
Given operation "DeleteTeamConnections" enabled
151+
And new "DeleteTeamConnections" request
152+
And body with value {"data": [{"type": "team_connection"}]}
153+
When the request is sent
154+
Then the response status is 400 Bad Request
155+
156+
@generated @skip @team:DataDog/aaa-omg
157+
Scenario: Delete team connections returns "No Content" response
158+
Given operation "DeleteTeamConnections" enabled
159+
And new "DeleteTeamConnections" request
160+
And body with value {"data": [{"id": "12345678-1234-5678-9abc-123456789012", "type": "team_connection"}]}
161+
When the request is sent
162+
Then the response status is 204 No Content
163+
164+
@generated @skip @team:DataDog/aaa-omg
165+
Scenario: Delete team connections returns "Not Found" response
166+
Given operation "DeleteTeamConnections" enabled
167+
And new "DeleteTeamConnections" request
168+
And body with value {"data": [{"id": "12345678-1234-5678-9abc-123456789012", "type": "team_connection"}]}
169+
When the request is sent
170+
Then the response status is 404 Not Found
171+
118172
@team:DataDog/aaa-omg
119173
Scenario: Get a team hierarchy link returns "API error response." response
120174
Given new "GetTeamHierarchyLink" request
@@ -341,6 +395,36 @@ Feature: Teams
341395
When the request is sent
342396
Then the response status is 200 OK
343397

398+
@generated @skip @team:DataDog/aaa-omg
399+
Scenario: List team connections returns "Bad Request" response
400+
Given operation "ListTeamConnections" enabled
401+
And new "ListTeamConnections" request
402+
When the request is sent
403+
Then the response status is 400 Bad Request
404+
405+
@generated @skip @team:DataDog/aaa-omg
406+
Scenario: List team connections returns "OK" response
407+
Given operation "ListTeamConnections" enabled
408+
And new "ListTeamConnections" request
409+
When the request is sent
410+
Then the response status is 200 OK
411+
412+
@generated @skip @team:DataDog/aaa-omg @with-pagination
413+
Scenario: List team connections returns "OK" response with pagination
414+
Given operation "ListTeamConnections" enabled
415+
And new "ListTeamConnections" request
416+
When the request with pagination is sent
417+
Then the response status is 200 OK
418+
419+
@skip @team:DataDog/aaa-omg
420+
Scenario: List team connections with filters returns "OK" response
421+
Given operation "ListTeamConnections" enabled
422+
And new "ListTeamConnections" request
423+
And request contains "filter[sources]" parameter with value ["github"]
424+
And request contains "page[size]" parameter with value 10
425+
When the request is sent
426+
Then the response status is 200 OK
427+
344428
@generated @skip @team:DataDog/aaa-omg
345429
Scenario: Remove a member team returns "API error response." response
346430
Given operation "RemoveMemberTeam" enabled

0 commit comments

Comments
 (0)