Skip to content

Commit 7d4691a

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 8122caa of spec repo
1 parent e385c11 commit 7d4691a

File tree

74 files changed

+5895
-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.

74 files changed

+5895
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 1167 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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+
@generated @skip @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": "this is a cloud table generated via a cloud bucket sync", "file_metadata": {"access_details": {"aws_detail": {"aws_account_id": "test-account-id", "aws_bucket_name": "test-bucket", "file_path": "test_rt.csv"}}, "error_message": "", "error_row_count": 0, "sync_enabled": true}, "schema": {"fields": [{"name": "name", "type": "STRING"}, {"name": "account_id", "type": "STRING"}], "primary_keys": ["account_id"]}, "source": "S3", "table_name": "test_reference_table", "tags": ["test_tag"]}, "type": "reference_table"}}
14+
When the request is sent
15+
Then the response status is 201 Created
16+
17+
@team:DataDog/redapl-experiences
18+
Scenario: Create reference table upload returns "Created" response
19+
Given new "CreateReferenceTableUpload" request
20+
And body with value {"data": {"attributes": {"headers": ["id", "name", "value"], "table_name": "test_upload_table_{{ unique }}", "part_count": 1, "part_size": 1024}, "type": "upload"}}
21+
When the request is sent
22+
Then the response status is 201 Created
23+
And the response "data.type" is equal to "upload"
24+
And the response "data.attributes.table_name" is equal to "test_upload_table_{{ unique }}"
25+
26+
@team:DataDog/redapl-experiences
27+
Scenario: Create reference table with upload returns "Created" response
28+
Given new "CreateReferenceTable" request
29+
And body with value {"data": {"attributes": {"description": "Test reference table created via BDD test {{ unique }}", "source": "LOCAL_FILE", "file_metadata": {"upload_id": "test-upload-id-{{ unique }}", "error_message": "", "error_row_count": 0}, "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"}}
30+
When the request is sent
31+
Then the response status is 201 Created
32+
And the response "data.type" is equal to "reference_table"
33+
And the response "data.attributes.table_name" is equal to "test_reference_table_{{ unique }}"
34+
35+
@team:DataDog/redapl-experiences
36+
Scenario: Create reference table without upload or access details returns "Bad Request" response
37+
Given new "CreateReferenceTable" request
38+
And body with value {"data": {"attributes": {"description": "Test reference table without upload or access details", "source": "LOCAL_FILE", "schema": {"fields": [{"name": "id", "type": "STRING"}], "primary_keys": ["id"]}, "table_name": "test_invalid_table_{{ unique }}", "tags": ["test_tag"]}, "type": "reference_table"}}
39+
When the request is sent
40+
Then the response status is 400 Bad Request
41+
42+
@generated @skip @team:DataDog/redapl-experiences
43+
Scenario: Delete table returns "OK" response
44+
Given new "DeleteTable" request
45+
And request contains "id" parameter from "REPLACE.ME"
46+
When the request is sent
47+
Then the response status is 200 OK
48+
49+
@generated @skip @team:DataDog/redapl-experiences
50+
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
51+
Given new "GetRowsByID" request
52+
And request contains "row_id" parameter from "REPLACE.ME"
53+
And request contains "id" parameter from "REPLACE.ME"
54+
When the request is sent
55+
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.
56+
57+
@generated @skip @team:DataDog/redapl-experiences
58+
Scenario: Get table returns "OK" response
59+
Given new "GetTable" request
60+
And request contains "id" parameter from "REPLACE.ME"
61+
When the request is sent
62+
Then the response status is 200 OK
63+
64+
@team:DataDog/redapl-experiences
65+
Scenario: List tables returns "OK" response
66+
Given new "ListTables" request
67+
When the request is sent
68+
Then the response status is 200 OK
69+
And the response "data" has field "array"
70+
71+
@generated @skip @team:DataDog/redapl-experiences
72+
Scenario: Update reference table returns "OK" response
73+
Given new "UpdateReferenceTable" request
74+
And request contains "id" parameter from "REPLACE.ME"
75+
And body with value {"data": {"attributes": {"access_details": {}, "description": "this is a cloud table generated via a cloud bucket sync", "file_metadata": {"access_details": {"aws_detail": {"aws_account_id": "test-account-id", "aws_bucket_name": "test-bucket", "file_path": "test_rt.csv"}}, "error_message": "", "error_row_count": 0, "sync_enabled": true}, "schema": {"fields": [{"name": "id", "type": "INT64"}, {"name": "name", "type": "STRING"}], "primary_keys": ["id"]}, "sync_enabled": false, "tags": ["test_tag"]}, "id": "00000000-0000-0000-0000-000000000000", "type": "reference_table"}}
76+
When the request is sent
77+
Then the response status is 200 OK

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)