Skip to content

Commit 97bcb5a

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 77c1729 of spec repo
1 parent e385c11 commit 97bcb5a

File tree

75 files changed

+5919
-0
lines changed

Some content is hidden

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

75 files changed

+5919
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 1173 additions & 0 deletions
Large diffs are not rendered by default.

features/v2/given.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,13 @@
669669
"tag": "Powerpack",
670670
"operationId": "CreatePowerpack"
671671
},
672+
{
673+
"source": "data[0]",
674+
"step": "there is a valid \"reference_table\" in the system",
675+
"key": "reference_table",
676+
"tag": "Reference Tables",
677+
"operationId": "ListTables"
678+
},
672679
{
673680
"parameters": [
674681
{
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
@endpoint(reference-tables) @endpoint(reference-tables-v2)
2+
Feature: Reference Tables
3+
Auto-generated tag Reference Tables
4+
5+
Background:
6+
Given a valid "apiKeyAuth" key in the system
7+
And a valid "appKeyAuth" key in the system
8+
And an instance of "ReferenceTables" API
9+
10+
@integration-only @team:DataDog/redapl-experiences
11+
Scenario: Create reference table returns "Created" response
12+
Given new "CreateReferenceTable" request
13+
And body with value {"data": {"attributes": {"description": "Test reference table created via BDD test {{ unique }}", "source": "LOCAL_FILE", "schema": {"fields": [{"name": "id", "type": "STRING"}, {"name": "name", "type": "STRING"}, {"name": "value", "type": "INT32"}], "primary_keys": ["id"]}, "table_name": "test_reference_table_{{ unique }}", "tags": ["test_tag"]}, "type": "reference_table"}}
14+
When the request is sent
15+
Then the response status is 201 Created
16+
And the response "data.type" is equal to "reference_table"
17+
And the response "data.attributes.table_name" is equal to "test_reference_table_{{ unique }}"
18+
19+
@integration-only @team:DataDog/redapl-experiences
20+
Scenario: Create reference table upload returns "Created" response
21+
Given new "CreateReferenceTableUpload" request
22+
And body with value {"data": {"attributes": {"headers": ["id", "name", "value"], "table_name": "test_upload_table_{{ unique }}", "part_count": 1, "part_size": 1024}, "type": "upload"}}
23+
When the request is sent
24+
Then the response status is 201 Created
25+
And the response "data.type" is equal to "upload"
26+
And the response "data.attributes.table_name" is equal to "test_upload_table_{{ unique }}"
27+
28+
@integration-only @team:DataDog/redapl-experiences
29+
Scenario: Delete table returns "OK" response
30+
Given there is a valid "reference_table" in the system
31+
And new "DeleteTable" request
32+
And request contains "id" parameter from "reference_table.data.id"
33+
When the request is sent
34+
Then the response status is 200 OK
35+
36+
@integration-only @team:DataDog/redapl-experiences
37+
Scenario: Get rows by id returns "Successfully retrieved rows. Some or all requested rows were found. Metadata about not-found rows is included in the meta object." response
38+
Given there is a valid "reference_table" in the system
39+
And new "GetRowsByID" request
40+
And request contains "row_id" parameter with value ["test_row_1", "test_row_2"]
41+
And request contains "id" parameter from "reference_table.data.id"
42+
When the request is sent
43+
Then the response status is 200 Successfully retrieved rows. Some or all requested rows were found. Metadata about not-found rows is included in the meta object.
44+
And the response "data" has field "array"
45+
46+
@integration-only @team:DataDog/redapl-experiences
47+
Scenario: Get table returns "OK" response
48+
Given there is a valid "reference_table" in the system
49+
And new "GetTable" request
50+
And request contains "id" parameter from "reference_table.data.id"
51+
When the request is sent
52+
Then the response status is 200 OK
53+
And the response "data.type" is equal to "reference_table"
54+
And the response "data.id" has the same value as "reference_table.data.id"
55+
56+
@integration-only @team:DataDog/redapl-experiences
57+
Scenario: List tables returns "OK" response
58+
Given new "ListTables" request
59+
When the request is sent
60+
Then the response status is 200 OK
61+
And the response "data" has field "array"
62+
63+
@integration-only @team:DataDog/redapl-experiences
64+
Scenario: Update reference table returns "OK" response
65+
Given there is a valid "reference_table" in the system
66+
And new "UpdateReferenceTable" request
67+
And request contains "id" parameter from "reference_table.data.id"
68+
And body with value {"data": {"attributes": {"description": "Updated test reference table description {{ unique }}"}, "type": "reference_table"}}
69+
When the request is sent
70+
Then the response status is 200 OK
71+
And the response "data.type" is equal to "reference_table"
72+
And the response "data.attributes.description" is equal to "Updated test reference table description {{ unique }}"

features/v2/undo.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2635,6 +2635,55 @@
26352635
"type": "idempotent"
26362636
}
26372637
},
2638+
"ListTables": {
2639+
"tag": "Reference Tables",
2640+
"undo": {
2641+
"type": "safe"
2642+
}
2643+
},
2644+
"CreateReferenceTable": {
2645+
"tag": "Reference Tables",
2646+
"undo": {
2647+
"operationId": "DeleteTable",
2648+
"parameters": [
2649+
{
2650+
"name": "id",
2651+
"source": "data.id"
2652+
}
2653+
],
2654+
"type": "unsafe"
2655+
}
2656+
},
2657+
"DeleteTable": {
2658+
"tag": "Reference Tables",
2659+
"undo": {
2660+
"type": "idempotent"
2661+
}
2662+
},
2663+
"GetTable": {
2664+
"tag": "Reference Tables",
2665+
"undo": {
2666+
"type": "safe"
2667+
}
2668+
},
2669+
"UpdateReferenceTable": {
2670+
"tag": "Reference Tables",
2671+
"undo": {
2672+
"type": "idempotent"
2673+
}
2674+
},
2675+
"GetRowsByID": {
2676+
"tag": "Reference Tables",
2677+
"undo": {
2678+
"type": "safe"
2679+
}
2680+
},
2681+
"CreateReferenceTableUpload": {
2682+
"tag": "Reference Tables",
2683+
"undo": {
2684+
"type": "idempotent"
2685+
}
2686+
},
26382687
"ListApplicationSecurityWAFCustomRules": {
26392688
"tag": "Application Security",
26402689
"undo": {

packages/datadog-api-client/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,7 @@ apiInstance
410410
| PagerDuty Integration | @datadog/datadog-api-client-pager-duty-integration | [README.md](../../services/pager-duty-integration/README.md) |
411411
| Powerpack | @datadog/datadog-api-client-powerpack | [README.md](../../services/powerpack/README.md) |
412412
| Processes | @datadog/datadog-api-client-processes | [README.md](../../services/processes/README.md) |
413+
| Reference Tables | @datadog/datadog-api-client-reference-tables | [README.md](../../services/reference-tables/README.md) |
413414
| Restriction Policies | @datadog/datadog-api-client-restriction-policies | [README.md](../../services/restriction-policies/README.md) |
414415
| Roles | @datadog/datadog-api-client-roles | [README.md](../../services/roles/README.md) |
415416
| RUM | @datadog/datadog-api-client-rum | [README.md](../../services/rum/README.md) |

private/bdd_runner/src/support/scenarios_model_mapping.ts

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7234,6 +7234,59 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
72347234
},
72357235
operationResponseType: "ProcessSummariesResponse",
72367236
},
7237+
"ReferenceTablesApi.V2.ListTables": {
7238+
operationResponseType: "TableResultV2Array",
7239+
},
7240+
"ReferenceTablesApi.V2.CreateReferenceTable": {
7241+
body: {
7242+
type: "CreateTableRequest",
7243+
format: "",
7244+
},
7245+
operationResponseType: "TableResultV2",
7246+
},
7247+
"ReferenceTablesApi.V2.GetTable": {
7248+
id: {
7249+
type: "string",
7250+
format: "",
7251+
},
7252+
operationResponseType: "TableResultV2",
7253+
},
7254+
"ReferenceTablesApi.V2.DeleteTable": {
7255+
id: {
7256+
type: "string",
7257+
format: "",
7258+
},
7259+
operationResponseType: "{}",
7260+
},
7261+
"ReferenceTablesApi.V2.UpdateReferenceTable": {
7262+
id: {
7263+
type: "string",
7264+
format: "",
7265+
},
7266+
body: {
7267+
type: "PatchTableRequest",
7268+
format: "",
7269+
},
7270+
operationResponseType: "TableResultV2",
7271+
},
7272+
"ReferenceTablesApi.V2.GetRowsByID": {
7273+
rowId: {
7274+
type: "Array<string>",
7275+
format: "",
7276+
},
7277+
id: {
7278+
type: "string",
7279+
format: "",
7280+
},
7281+
operationResponseType: "TableRowResourceArray",
7282+
},
7283+
"ReferenceTablesApi.V2.CreateReferenceTableUpload": {
7284+
body: {
7285+
type: "CreateUploadRequest",
7286+
format: "",
7287+
},
7288+
operationResponseType: "CreateUploadResponse",
7289+
},
72377290
"ApplicationSecurityApi.V2.ListApplicationSecurityWAFCustomRules": {
72387291
operationResponseType: "ApplicationSecurityWafCustomRuleListResponse",
72397292
},
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# @datadog/datadog-api-client-reference-tables
2+
3+
## Description
4+
5+
Auto-generated tag Reference Tables
6+
7+
## Navigation
8+
9+
- [Installation](#installation)
10+
- [Getting Started](#getting-started)
11+
12+
## Installation
13+
14+
```sh
15+
# NPM
16+
npm install @datadog/datadog-api-client-reference-tables
17+
# Yarn
18+
yarn add @datadog/datadog-api-client-reference-tables
19+
```
20+
21+
## Getting Started
22+
```ts
23+
import { createConfiguration } from "@datadog/datadog-api-client";
24+
import { ReferenceTablesApiV2 } from "@datadog/datadog-api-client-reference-tables";
25+
import { v2 } from "@datadog/datadog-api-client-reference-tables";
26+
27+
const configuration = createConfiguration();
28+
const apiInstance = new ReferenceTablesApiV2(configuration);
29+
30+
apiInstance.listTables().then((data) => {
31+
console.log("API called successfully. Returned data: " + JSON.stringify(data));
32+
}).catch((error) => {
33+
console.error("Error calling API: " + error);
34+
});
35+
```
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"name": "@datadog/datadog-api-client-reference-tables",
3+
"description": "",
4+
"author": "",
5+
"keywords": [
6+
"api",
7+
"fetch",
8+
"typescript"
9+
],
10+
"license": "Apache-2.0",
11+
"licenses": [
12+
{
13+
"type": "Apache-2.0",
14+
"url": "http://www.apache.org/licenses/LICENSE-2.0"
15+
}
16+
],
17+
"repository": {
18+
"type": "git",
19+
"url": "https://github.com/DataDog/datadog-api-client-typescript.git",
20+
"directory": "services/reference-tables"
21+
},
22+
"files": [
23+
"dist/**/*"
24+
],
25+
"main": "./dist/index.js",
26+
"typings": "./dist/index.d.ts",
27+
"scripts": {
28+
"prepack": "yarn workspace @datadog/datadog-api-client build && yarn build",
29+
"build": "yarn generate-version-files && tsc",
30+
"generate-version-files": "node -p \"'export const version = ' + JSON.stringify(require('./package.json').version)\" > src/version.ts"
31+
},
32+
"dependencies": {
33+
"@datadog/datadog-api-client": "^2.0.0-beta.0"
34+
},
35+
"devDependencies": {
36+
"typescript": "5.8.3"
37+
},
38+
"engines": {
39+
"node": ">=18.0.0"
40+
},
41+
"version": "0.0.1",
42+
"packageManager": "[email protected]"
43+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export * as v2 from "./v2";
2+
3+
export { ReferenceTablesApi as ReferenceTablesApiV2 } from "./v2/ReferenceTablesApi";

0 commit comments

Comments
 (0)