Skip to content

Commit d5ce8da

Browse files
api-clients-generation-pipeline[bot]skarimoci.datadog-api-spec
authored
Trigger format pipeline for TS (#2135)
* add basic linter and formatter * install before run * run on ts files only * js files as well * add back generate.sh * Regenerate client from commit 13d1130f23c1897768dad6288021e8ac9fd73e01 of spec repo --------- Co-authored-by: Sherzod Karimov <sherzod.karimov@datadoghq.com> Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 20a6748 commit d5ce8da

File tree

355 files changed

+9785
-7879
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

355 files changed

+9785
-7879
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-04-03 13:11:44.896804",
8-
"spec_repo_commit": "341c3f5"
7+
"regenerated": "2025-04-03 18:18:29.713122",
8+
"spec_repo_commit": "13d1130"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-04-03 13:11:44.912645",
13-
"spec_repo_commit": "341c3f5"
12+
"regenerated": "2025-04-03 18:18:29.728290",
13+
"spec_repo_commit": "13d1130"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13489,6 +13489,10 @@ components:
1348913489
default: true
1349013490
description: Show the main body of the alert event.
1349113491
type: boolean
13492+
mute_buttons:
13493+
default: false
13494+
description: Show interactive buttons to mute the alerting monitor.
13495+
type: boolean
1349213496
notified:
1349313497
default: true
1349413498
description: Show the list of @-handles in the alert event.
@@ -13507,12 +13511,14 @@ components:
1350713511
example:
1350813512
- display:
1350913513
message: true
13514+
mute_buttons: true
1351013515
notified: true
1351113516
snapshot: true
1351213517
tags: true
1351313518
name: '#channel_name_main_account'
1351413519
- display:
1351513520
message: true
13521+
mute_buttons: true
1351613522
notified: true
1351713523
snapshot: false
1351813524
tags: true

.generator/schemas/v2/openapi.yaml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30212,7 +30212,7 @@ components:
3021230212
type: string
3021330213
type: object
3021430214
SingleAggregatedConnectionResponseArray:
30215-
description: The definition of `SingleAggregatedConnectionResponseArray` object.
30215+
description: List of aggregated connections.
3021630216
example:
3021730217
data:
3021830218
- attributes:
@@ -30236,25 +30236,25 @@ components:
3023630236
type: aggregated_connection
3023730237
properties:
3023830238
data:
30239-
description: The `SingleAggregatedConnectionResponseArray` `data`.
30239+
description: Array of aggregated connection objects.
3024030240
items:
3024130241
$ref: '#/components/schemas/SingleAggregatedConnectionResponseData'
3024230242
type: array
3024330243
type: object
3024430244
SingleAggregatedConnectionResponseData:
30245-
description: The definition of `SingleAggregatedConnectionResponseData` object.
30245+
description: Object describing an aggregated connection.
3024630246
properties:
3024730247
attributes:
3024830248
$ref: '#/components/schemas/SingleAggregatedConnectionResponseDataAttributes'
3024930249
id:
30250-
description: The `SingleAggregatedConnectionResponseData` `id`.
30250+
description: A unique identifier for the aggregated connection based on
30251+
the group by values.
3025130252
type: string
3025230253
type:
3025330254
$ref: '#/components/schemas/SingleAggregatedConnectionResponseDataType'
3025430255
type: object
3025530256
SingleAggregatedConnectionResponseDataAttributes:
30256-
description: The definition of `SingleAggregatedConnectionResponseDataAttributes`
30257-
object.
30257+
description: Attributes for an aggregated connection.
3025830258
properties:
3025930259
bytes_sent_by_client:
3026030260
description: The total number of bytes sent by the client over the given
@@ -30268,10 +30268,11 @@ components:
3026830268
type: integer
3026930269
group_bys:
3027030270
additionalProperties:
30271+
description: The values for each group by.
3027130272
items:
3027230273
type: string
3027330274
type: array
30274-
description: The `attributes` `group_bys`.
30275+
description: The key, value pairs for each group by.
3027530276
type: object
3027630277
packets_sent_by_client:
3027730278
description: The total number of packets sent by the client over the given
@@ -30322,9 +30323,7 @@ components:
3032230323
type: object
3032330324
SingleAggregatedConnectionResponseDataType:
3032430325
default: aggregated_connection
30325-
description: 'Aggregated connection resource type. Allowed enum values: `aggregated_connection`.
30326-
30327-
default: `aggregated_connection`'
30326+
description: Aggregated connection resource type.
3032830327
enum:
3032930328
- aggregated_connection
3033030329
type: string
@@ -44426,22 +44425,22 @@ paths:
4442644425
- Network Device Monitoring
4442744426
/api/v2/network/connections/aggregate:
4442844427
get:
44429-
description: Get aggregated connections
44428+
description: Get all aggregated connections.
4443044429
operationId: GetAggregatedConnections
4443144430
parameters:
4443244431
- description: Unix timestamp (number of seconds since epoch) of the start of
4443344432
the query window. If not provided, the start of the query window is 15 minutes
44434-
before the "to" timestamp. If neither "from" nor "to" are provided, the
44435-
query window is [now - 15m, now].
44433+
before the `to` timestamp. If neither `from` nor `to` are provided, the
44434+
query window is `[now - 15m, now]`.
4443644435
in: query
4443744436
name: from
4443844437
schema:
4443944438
format: int64
4444044439
type: integer
4444144440
- description: Unix timestamp (number of seconds since epoch) of the end of
4444244441
the query window. If not provided, the end of the query window is the current
44443-
time. If neither "from" nor "to" are provided, the query window is [now
44444-
- 15m, now].
44442+
time. If neither `from` nor `to` are provided, the query window is `[now
44443+
- 15m, now]`.
4444544444
in: query
4444644445
name: to
4444744446
schema:
@@ -44478,7 +44477,7 @@ paths:
4447844477
$ref: '#/components/responses/BadRequestResponse'
4447944478
'429':
4448044479
$ref: '#/components/responses/TooManyRequestsResponse'
44481-
summary: Get aggregated connections
44480+
summary: Get all aggregated connections
4448244481
tags:
4448344482
- Cloud Network Monitoring
4448444483
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,

.github/workflows/test.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ jobs:
3838
- uses: actions/checkout@v3
3939
if: github.event.pull_request.head.repo.full_name == github.repository
4040
with:
41-
fetch-depth: 0
4241
ref: ${{ github.event.pull_request.head.sha }}
4342
token: ${{ steps.get_token.outputs.token }}
4443
- uses: actions/setup-python@v4
@@ -59,13 +58,9 @@ jobs:
5958
path: ~/.cache/pre-commit
6059
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
6160
- id: pre_commit
62-
name: Run pre-commit
61+
name: Run generate to fix lint and format
6362
if: github.event.action != 'closed' && github.event.pull_request.merged != true
64-
run: |
65-
pre-commit run --from-ref "${FROM_REF}" --to-ref "${TO_REF}" --show-diff-on-failure --color=always
66-
env:
67-
FROM_REF: ${{ github.event.pull_request.base.sha }}
68-
TO_REF: ${{ github.event.pull_request.head.sha }}
63+
run: bash -c "./generate.sh"
6964
- name: Commit changes
7065
if: github.event.pull_request.head.repo.full_name == github.repository && failure()
7166
run: |-

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,3 @@ version.ts
2323
__pycache__
2424
*.pyc
2525
*.pyo
26-

.pre-commit-config.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
11
repos:
22
- repo: local
33
hooks:
4+
- id: generate
5+
name: Generate
6+
language: node
7+
entry: bash -c "./generate.sh"
8+
pass_filenames: false
49
- id: lint
510
name: Lint
611
language: node
712
entry: yarn run lint:fix
813
stages: [manual]
914
pass_filenames: false
1015
language_version: "21.7.3"
16+
- id: format
17+
name: Format code
18+
language: node
19+
entry: yarn run format
20+
stages: [manual]
21+
pass_filenames: false
22+
language_version: "21.7.3"

eslint.config.mjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// @ts-check
2+
3+
import tseslint from 'typescript-eslint';
4+
5+
export default tseslint.config(
6+
// // TODO: Enable and fix all issues after the migration and tests are passing
7+
// tseslint.configs.recommended,
8+
// tseslint.configs.strict,
9+
// tseslint.configs.stylistic,
10+
);

features/v1/slack_integration.feature

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,122 +9,122 @@ Feature: Slack Integration
99
And a valid "appKeyAuth" key in the system
1010
And an instance of "SlackIntegration" API
1111

12-
@generated @skip @team:DataDog/saas-integrations
12+
@generated @skip @team:DataDog/chat-integrations
1313
Scenario: Create a Slack integration channel returns "Bad Request" response
1414
Given new "CreateSlackIntegrationChannel" request
1515
And request contains "account_name" parameter from "REPLACE.ME"
16-
And body with value {"display": {"message": true, "notified": true, "snapshot": true, "tags": true}, "name": "#general"}
16+
And body with value {"display": {"message": true, "mute_buttons": false, "notified": true, "snapshot": true, "tags": true}, "name": "#general"}
1717
When the request is sent
1818
Then the response status is 400 Bad Request
1919

20-
@generated @skip @team:DataDog/saas-integrations
20+
@generated @skip @team:DataDog/chat-integrations
2121
Scenario: Create a Slack integration channel returns "Item Not Found" response
2222
Given new "CreateSlackIntegrationChannel" request
2323
And request contains "account_name" parameter from "REPLACE.ME"
24-
And body with value {"display": {"message": true, "notified": true, "snapshot": true, "tags": true}, "name": "#general"}
24+
And body with value {"display": {"message": true, "mute_buttons": false, "notified": true, "snapshot": true, "tags": true}, "name": "#general"}
2525
When the request is sent
2626
Then the response status is 404 Item Not Found
2727

28-
@generated @skip @team:DataDog/saas-integrations
28+
@generated @skip @team:DataDog/chat-integrations
2929
Scenario: Create a Slack integration channel returns "OK" response
3030
Given new "CreateSlackIntegrationChannel" request
3131
And request contains "account_name" parameter from "REPLACE.ME"
32-
And body with value {"display": {"message": true, "notified": true, "snapshot": true, "tags": true}, "name": "#general"}
32+
And body with value {"display": {"message": true, "mute_buttons": false, "notified": true, "snapshot": true, "tags": true}, "name": "#general"}
3333
When the request is sent
3434
Then the response status is 200 OK
3535

36-
@generated @skip @team:DataDog/saas-integrations
36+
@generated @skip @team:DataDog/chat-integrations
3737
Scenario: Get a Slack integration channel returns "Bad Request" response
3838
Given new "GetSlackIntegrationChannel" request
3939
And request contains "account_name" parameter from "REPLACE.ME"
4040
And request contains "channel_name" parameter from "REPLACE.ME"
4141
When the request is sent
4242
Then the response status is 400 Bad Request
4343

44-
@generated @skip @team:DataDog/saas-integrations
44+
@generated @skip @team:DataDog/chat-integrations
4545
Scenario: Get a Slack integration channel returns "Item Not Found" response
4646
Given new "GetSlackIntegrationChannel" request
4747
And request contains "account_name" parameter from "REPLACE.ME"
4848
And request contains "channel_name" parameter from "REPLACE.ME"
4949
When the request is sent
5050
Then the response status is 404 Item Not Found
5151

52-
@generated @skip @team:DataDog/saas-integrations
52+
@generated @skip @team:DataDog/chat-integrations
5353
Scenario: Get a Slack integration channel returns "OK" response
5454
Given new "GetSlackIntegrationChannel" request
5555
And request contains "account_name" parameter from "REPLACE.ME"
5656
And request contains "channel_name" parameter from "REPLACE.ME"
5757
When the request is sent
5858
Then the response status is 200 OK
5959

60-
@generated @skip @team:DataDog/saas-integrations
60+
@generated @skip @team:DataDog/chat-integrations
6161
Scenario: Get all channels in a Slack integration returns "Bad Request" response
6262
Given new "GetSlackIntegrationChannels" request
6363
And request contains "account_name" parameter from "REPLACE.ME"
6464
When the request is sent
6565
Then the response status is 400 Bad Request
6666

67-
@generated @skip @team:DataDog/saas-integrations
67+
@generated @skip @team:DataDog/chat-integrations
6868
Scenario: Get all channels in a Slack integration returns "Item Not Found" response
6969
Given new "GetSlackIntegrationChannels" request
7070
And request contains "account_name" parameter from "REPLACE.ME"
7171
When the request is sent
7272
Then the response status is 404 Item Not Found
7373

74-
@generated @skip @team:DataDog/saas-integrations
74+
@generated @skip @team:DataDog/chat-integrations
7575
Scenario: Get all channels in a Slack integration returns "OK" response
7676
Given new "GetSlackIntegrationChannels" request
7777
And request contains "account_name" parameter from "REPLACE.ME"
7878
When the request is sent
7979
Then the response status is 200 OK
8080

81-
@generated @skip @team:DataDog/saas-integrations
81+
@generated @skip @team:DataDog/chat-integrations
8282
Scenario: Remove a Slack integration channel returns "Bad Request" response
8383
Given new "RemoveSlackIntegrationChannel" request
8484
And request contains "account_name" parameter from "REPLACE.ME"
8585
And request contains "channel_name" parameter from "REPLACE.ME"
8686
When the request is sent
8787
Then the response status is 400 Bad Request
8888

89-
@generated @skip @team:DataDog/saas-integrations
89+
@generated @skip @team:DataDog/chat-integrations
9090
Scenario: Remove a Slack integration channel returns "Item Not Found" response
9191
Given new "RemoveSlackIntegrationChannel" request
9292
And request contains "account_name" parameter from "REPLACE.ME"
9393
And request contains "channel_name" parameter from "REPLACE.ME"
9494
When the request is sent
9595
Then the response status is 404 Item Not Found
9696

97-
@generated @skip @team:DataDog/saas-integrations
97+
@generated @skip @team:DataDog/chat-integrations
9898
Scenario: Remove a Slack integration channel returns "The channel was removed successfully." response
9999
Given new "RemoveSlackIntegrationChannel" request
100100
And request contains "account_name" parameter from "REPLACE.ME"
101101
And request contains "channel_name" parameter from "REPLACE.ME"
102102
When the request is sent
103103
Then the response status is 204 The channel was removed successfully.
104104

105-
@generated @skip @team:DataDog/saas-integrations
105+
@generated @skip @team:DataDog/chat-integrations
106106
Scenario: Update a Slack integration channel returns "Bad Request" response
107107
Given new "UpdateSlackIntegrationChannel" request
108108
And request contains "account_name" parameter from "REPLACE.ME"
109109
And request contains "channel_name" parameter from "REPLACE.ME"
110-
And body with value {"display": {"message": true, "notified": true, "snapshot": true, "tags": true}, "name": "#general"}
110+
And body with value {"display": {"message": true, "mute_buttons": false, "notified": true, "snapshot": true, "tags": true}, "name": "#general"}
111111
When the request is sent
112112
Then the response status is 400 Bad Request
113113

114-
@generated @skip @team:DataDog/saas-integrations
114+
@generated @skip @team:DataDog/chat-integrations
115115
Scenario: Update a Slack integration channel returns "Item Not Found" response
116116
Given new "UpdateSlackIntegrationChannel" request
117117
And request contains "account_name" parameter from "REPLACE.ME"
118118
And request contains "channel_name" parameter from "REPLACE.ME"
119-
And body with value {"display": {"message": true, "notified": true, "snapshot": true, "tags": true}, "name": "#general"}
119+
And body with value {"display": {"message": true, "mute_buttons": false, "notified": true, "snapshot": true, "tags": true}, "name": "#general"}
120120
When the request is sent
121121
Then the response status is 404 Item Not Found
122122

123-
@generated @skip @team:DataDog/saas-integrations
123+
@generated @skip @team:DataDog/chat-integrations
124124
Scenario: Update a Slack integration channel returns "OK" response
125125
Given new "UpdateSlackIntegrationChannel" request
126126
And request contains "account_name" parameter from "REPLACE.ME"
127127
And request contains "channel_name" parameter from "REPLACE.ME"
128-
And body with value {"display": {"message": true, "notified": true, "snapshot": true, "tags": true}, "name": "#general"}
128+
And body with value {"display": {"message": true, "mute_buttons": false, "notified": true, "snapshot": true, "tags": true}, "name": "#general"}
129129
When the request is sent
130130
Then the response status is 200 OK

features/v2/cloud_network_monitoring.feature

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ Feature: Cloud Network Monitoring
1212
And operation "GetAggregatedConnections" enabled
1313
And new "GetAggregatedConnections" request
1414

15-
@generated @skip @team:Datadog/networks
16-
Scenario: Get aggregated connections returns "Bad Request" response
17-
When the request is sent
18-
Then the response status is 400 Bad Request
19-
2015
@team:Datadog/networks
2116
Scenario: Get aggregated connections returns "OK" response
2217
When the request is sent
@@ -27,3 +22,8 @@ Feature: Cloud Network Monitoring
2722
Given request contains "limit" parameter with value 6000
2823
When the request is sent
2924
Then the response status is 400 Bad Request
25+
26+
@generated @skip @team:Datadog/networks
27+
Scenario: Get all aggregated connections returns "OK" response
28+
When the request is sent
29+
Then the response status is 200 OK

generate.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ pre_commit_wrapper () {
2424
}
2525

2626
# pre_commit_wrapper lint
27+
pre_commit_wrapper format

0 commit comments

Comments
 (0)