Skip to content

Commit 90bf832

Browse files
api-clients-generation-pipeline[bot]therveci.datadog-api-spec
authored
Fix typescript after first publish (#172)
* Use npmName in examples * Fix result display * Add files directive * Regenerate client from commit 7120617 of spec repo Co-authored-by: Thomas Hervé <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent cdf8847 commit 90bf832

Some content is hidden

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

46 files changed

+576
-575
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.4.1.dev8",
7-
"regenerated": "2021-06-08 14:41:37.177785",
8-
"spec_repo_commit": "e6c8320"
7+
"regenerated": "2021-06-09 07:30:10.498956",
8+
"spec_repo_commit": "7120617"
99
},
1010
"v2": {
1111
"apigentools_version": "1.4.1.dev8",
12-
"regenerated": "2021-06-08 14:42:25.511908",
13-
"spec_repo_commit": "e6c8320"
12+
"regenerated": "2021-06-09 07:30:56.552493",
13+
"spec_repo_commit": "7120617"
1414
}
1515
}
1616
}

.generator/templates/api_doc.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Method | HTTP request | Description
2222

2323

2424
```typescript
25-
import { {{{moduleName}}} } from '{{{projectName}}}';
25+
import { {{{moduleName}}} } from '{{{npmName}}}';
2626
import * as fs from 'fs';
2727

2828
const configuration = {{{moduleName}}}.createConfiguration();
@@ -38,7 +38,7 @@ let params:{{{moduleName}}}.{{classname}}{{operationIdCamelCase}}Request = {
3838
{{/hasParams}}
3939

4040
apiInstance.{{{operationId}}}({{#hasParams}}params{{/hasParams}}).then((data:any) => {
41-
console.log('API called successfully. Returned data: ' + data);
41+
console.log('API called successfully. Returned data: ' + JSON.stringify(data));
4242
}).catch((error:any) => console.error(error));
4343
```
4444

check-examples.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ yarn
1111
./extract-code-blocks.sh examples $1
1212

1313
# temporary fix to compile example files
14-
find examples/$1 -type f -name "*.ts" | xargs sed -i.bak 's_datadog-api-client_../../../index_1'
14+
find examples/$1 -type f -name "*.ts" | xargs sed -i.bak 's_@datadog/datadog-api-client_../../../index_1'
1515

1616
touch examples/$1/tsconfig.json
1717

docs/v1/AWSIntegrationApi.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Create a Datadog-Amazon Web Services integration. Using the `POST` method update
2424

2525

2626
```typescript
27-
import { v1 } from 'datadog-api-client';
27+
import { v1 } from '@datadog/datadog-api-client';
2828
import * as fs from 'fs';
2929

3030
const configuration = v1.createConfiguration();
@@ -47,7 +47,7 @@ let params:v1.AWSIntegrationApiCreateAWSAccountRequest = {
4747
};
4848

4949
apiInstance.createAWSAccount(params).then((data:any) => {
50-
console.log('API called successfully. Returned data: ' + data);
50+
console.log('API called successfully. Returned data: ' + JSON.stringify(data));
5151
}).catch((error:any) => console.error(error));
5252
```
5353

@@ -92,7 +92,7 @@ Set an AWS tag filter.
9292

9393

9494
```typescript
95-
import { v1 } from 'datadog-api-client';
95+
import { v1 } from '@datadog/datadog-api-client';
9696
import * as fs from 'fs';
9797

9898
const configuration = v1.createConfiguration();
@@ -108,7 +108,7 @@ let params:v1.AWSIntegrationApiCreateAWSTagFilterRequest = {
108108
};
109109

110110
apiInstance.createAWSTagFilter(params).then((data:any) => {
111-
console.log('API called successfully. Returned data: ' + data);
111+
console.log('API called successfully. Returned data: ' + JSON.stringify(data));
112112
}).catch((error:any) => console.error(error));
113113
```
114114

@@ -152,7 +152,7 @@ Generate a new AWS external ID for a given AWS account ID and role name pair.
152152

153153

154154
```typescript
155-
import { v1 } from 'datadog-api-client';
155+
import { v1 } from '@datadog/datadog-api-client';
156156
import * as fs from 'fs';
157157

158158
const configuration = v1.createConfiguration();
@@ -175,7 +175,7 @@ let params:v1.AWSIntegrationApiCreateNewAWSExternalIDRequest = {
175175
};
176176

177177
apiInstance.createNewAWSExternalID(params).then((data:any) => {
178-
console.log('API called successfully. Returned data: ' + data);
178+
console.log('API called successfully. Returned data: ' + JSON.stringify(data));
179179
}).catch((error:any) => console.error(error));
180180
```
181181

@@ -219,7 +219,7 @@ Delete a Datadog-AWS integration matching the specified `account_id` and `role_n
219219

220220

221221
```typescript
222-
import { v1 } from 'datadog-api-client';
222+
import { v1 } from '@datadog/datadog-api-client';
223223
import * as fs from 'fs';
224224

225225
const configuration = v1.createConfiguration();
@@ -242,7 +242,7 @@ let params:v1.AWSIntegrationApiDeleteAWSAccountRequest = {
242242
};
243243

244244
apiInstance.deleteAWSAccount(params).then((data:any) => {
245-
console.log('API called successfully. Returned data: ' + data);
245+
console.log('API called successfully. Returned data: ' + JSON.stringify(data));
246246
}).catch((error:any) => console.error(error));
247247
```
248248

@@ -287,7 +287,7 @@ Delete a tag filtering entry.
287287

288288

289289
```typescript
290-
import { v1 } from 'datadog-api-client';
290+
import { v1 } from '@datadog/datadog-api-client';
291291
import * as fs from 'fs';
292292

293293
const configuration = v1.createConfiguration();
@@ -302,7 +302,7 @@ let params:v1.AWSIntegrationApiDeleteAWSTagFilterRequest = {
302302
};
303303

304304
apiInstance.deleteAWSTagFilter(params).then((data:any) => {
305-
console.log('API called successfully. Returned data: ' + data);
305+
console.log('API called successfully. Returned data: ' + JSON.stringify(data));
306306
}).catch((error:any) => console.error(error));
307307
```
308308

@@ -346,7 +346,7 @@ List all Datadog-AWS integrations available in your Datadog organization.
346346

347347

348348
```typescript
349-
import { v1 } from 'datadog-api-client';
349+
import { v1 } from '@datadog/datadog-api-client';
350350
import * as fs from 'fs';
351351

352352
const configuration = v1.createConfiguration();
@@ -362,7 +362,7 @@ let params:v1.AWSIntegrationApiListAWSAccountsRequest = {
362362
};
363363

364364
apiInstance.listAWSAccounts(params).then((data:any) => {
365-
console.log('API called successfully. Returned data: ' + data);
365+
console.log('API called successfully. Returned data: ' + JSON.stringify(data));
366366
}).catch((error:any) => console.error(error));
367367
```
368368

@@ -408,7 +408,7 @@ Get all AWS tag filters.
408408

409409

410410
```typescript
411-
import { v1 } from 'datadog-api-client';
411+
import { v1 } from '@datadog/datadog-api-client';
412412
import * as fs from 'fs';
413413

414414
const configuration = v1.createConfiguration();
@@ -420,7 +420,7 @@ let params:v1.AWSIntegrationApiListAWSTagFiltersRequest = {
420420
};
421421

422422
apiInstance.listAWSTagFilters(params).then((data:any) => {
423-
console.log('API called successfully. Returned data: ' + data);
423+
console.log('API called successfully. Returned data: ' + JSON.stringify(data));
424424
}).catch((error:any) => console.error(error));
425425
```
426426

@@ -464,15 +464,15 @@ List all namespace rules for a given Datadog-AWS integration. This endpoint take
464464

465465

466466
```typescript
467-
import { v1 } from 'datadog-api-client';
467+
import { v1 } from '@datadog/datadog-api-client';
468468
import * as fs from 'fs';
469469

470470
const configuration = v1.createConfiguration();
471471
const apiInstance = new v1.AWSIntegrationApi(configuration);
472472

473473

474474
apiInstance.listAvailableAWSNamespaces().then((data:any) => {
475-
console.log('API called successfully. Returned data: ' + data);
475+
console.log('API called successfully. Returned data: ' + JSON.stringify(data));
476476
}).catch((error:any) => console.error(error));
477477
```
478478

@@ -512,7 +512,7 @@ Update a Datadog-Amazon Web Services integration.
512512

513513

514514
```typescript
515-
import { v1 } from 'datadog-api-client';
515+
import { v1 } from '@datadog/datadog-api-client';
516516
import * as fs from 'fs';
517517

518518
const configuration = v1.createConfiguration();
@@ -541,7 +541,7 @@ let params:v1.AWSIntegrationApiUpdateAWSAccountRequest = {
541541
};
542542

543543
apiInstance.updateAWSAccount(params).then((data:any) => {
544-
console.log('API called successfully. Returned data: ' + data);
544+
console.log('API called successfully. Returned data: ' + JSON.stringify(data));
545545
}).catch((error:any) => console.error(error));
546546
```
547547

docs/v1/AWSLogsIntegrationApi.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Test if permissions are present to add a log-forwarding triggers for the given s
2222

2323

2424
```typescript
25-
import { v1 } from 'datadog-api-client';
25+
import { v1 } from '@datadog/datadog-api-client';
2626
import * as fs from 'fs';
2727

2828
const configuration = v1.createConfiguration();
@@ -37,7 +37,7 @@ let params:v1.AWSLogsIntegrationApiCheckAWSLogsLambdaAsyncRequest = {
3737
};
3838

3939
apiInstance.checkAWSLogsLambdaAsync(params).then((data:any) => {
40-
console.log('API called successfully. Returned data: ' + data);
40+
console.log('API called successfully. Returned data: ' + JSON.stringify(data));
4141
}).catch((error:any) => console.error(error));
4242
```
4343

@@ -81,7 +81,7 @@ Test if permissions are present to add log-forwarding triggers for the given ser
8181

8282

8383
```typescript
84-
import { v1 } from 'datadog-api-client';
84+
import { v1 } from '@datadog/datadog-api-client';
8585
import * as fs from 'fs';
8686

8787
const configuration = v1.createConfiguration();
@@ -96,7 +96,7 @@ let params:v1.AWSLogsIntegrationApiCheckAWSLogsServicesAsyncRequest = {
9696
};
9797

9898
apiInstance.checkAWSLogsServicesAsync(params).then((data:any) => {
99-
console.log('API called successfully. Returned data: ' + data);
99+
console.log('API called successfully. Returned data: ' + JSON.stringify(data));
100100
}).catch((error:any) => console.error(error));
101101
```
102102

@@ -140,7 +140,7 @@ Attach the Lambda ARN of the Lambda created for the Datadog-AWS log collection t
140140

141141

142142
```typescript
143-
import { v1 } from 'datadog-api-client';
143+
import { v1 } from '@datadog/datadog-api-client';
144144
import * as fs from 'fs';
145145

146146
const configuration = v1.createConfiguration();
@@ -155,7 +155,7 @@ let params:v1.AWSLogsIntegrationApiCreateAWSLambdaARNRequest = {
155155
};
156156

157157
apiInstance.createAWSLambdaARN(params).then((data:any) => {
158-
console.log('API called successfully. Returned data: ' + data);
158+
console.log('API called successfully. Returned data: ' + JSON.stringify(data));
159159
}).catch((error:any) => console.error(error));
160160
```
161161

@@ -199,7 +199,7 @@ Delete a Datadog-AWS logs configuration by removing the specific Lambda ARN asso
199199

200200

201201
```typescript
202-
import { v1 } from 'datadog-api-client';
202+
import { v1 } from '@datadog/datadog-api-client';
203203
import * as fs from 'fs';
204204

205205
const configuration = v1.createConfiguration();
@@ -214,7 +214,7 @@ let params:v1.AWSLogsIntegrationApiDeleteAWSLambdaARNRequest = {
214214
};
215215

216216
apiInstance.deleteAWSLambdaARN(params).then((data:any) => {
217-
console.log('API called successfully. Returned data: ' + data);
217+
console.log('API called successfully. Returned data: ' + JSON.stringify(data));
218218
}).catch((error:any) => console.error(error));
219219
```
220220

@@ -258,7 +258,7 @@ Enable automatic log collection for a list of services. This should be run after
258258

259259

260260
```typescript
261-
import { v1 } from 'datadog-api-client';
261+
import { v1 } from '@datadog/datadog-api-client';
262262
import * as fs from 'fs';
263263

264264
const configuration = v1.createConfiguration();
@@ -273,7 +273,7 @@ let params:v1.AWSLogsIntegrationApiEnableAWSLogServicesRequest = {
273273
};
274274

275275
apiInstance.enableAWSLogServices(params).then((data:any) => {
276-
console.log('API called successfully. Returned data: ' + data);
276+
console.log('API called successfully. Returned data: ' + JSON.stringify(data));
277277
}).catch((error:any) => console.error(error));
278278
```
279279

@@ -317,15 +317,15 @@ List all Datadog-AWS Logs integrations configured in your Datadog account.
317317

318318

319319
```typescript
320-
import { v1 } from 'datadog-api-client';
320+
import { v1 } from '@datadog/datadog-api-client';
321321
import * as fs from 'fs';
322322

323323
const configuration = v1.createConfiguration();
324324
const apiInstance = new v1.AWSLogsIntegrationApi(configuration);
325325

326326

327327
apiInstance.listAWSLogsIntegrations().then((data:any) => {
328-
console.log('API called successfully. Returned data: ' + data);
328+
console.log('API called successfully. Returned data: ' + JSON.stringify(data));
329329
}).catch((error:any) => console.error(error));
330330
```
331331

@@ -366,15 +366,15 @@ Get the list of current AWS services that Datadog offers automatic log collectio
366366

367367

368368
```typescript
369-
import { v1 } from 'datadog-api-client';
369+
import { v1 } from '@datadog/datadog-api-client';
370370
import * as fs from 'fs';
371371

372372
const configuration = v1.createConfiguration();
373373
const apiInstance = new v1.AWSLogsIntegrationApi(configuration);
374374

375375

376376
apiInstance.listAWSLogsServices().then((data:any) => {
377-
console.log('API called successfully. Returned data: ' + data);
377+
console.log('API called successfully. Returned data: ' + JSON.stringify(data));
378378
}).catch((error:any) => console.error(error));
379379
```
380380

docs/v1/AuthenticationApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ Check if the API key (not the APP key) is valid. If invalid, a 403 is returned.
1616

1717

1818
```typescript
19-
import { v1 } from 'datadog-api-client';
19+
import { v1 } from '@datadog/datadog-api-client';
2020
import * as fs from 'fs';
2121

2222
const configuration = v1.createConfiguration();
2323
const apiInstance = new v1.AuthenticationApi(configuration);
2424

2525

2626
apiInstance.validate().then((data:any) => {
27-
console.log('API called successfully. Returned data: ' + data);
27+
console.log('API called successfully. Returned data: ' + JSON.stringify(data));
2828
}).catch((error:any) => console.error(error));
2929
```
3030

0 commit comments

Comments
 (0)