Skip to content

Commit d08f396

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit a046371 of spec repo (#262)
Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent 5547fe5 commit d08f396

20 files changed

+1041
-18
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.5.1.dev2",
7-
"regenerated": "2021-10-14 17:40:41.250792",
8-
"spec_repo_commit": "5bae09b"
7+
"regenerated": "2021-10-15 13:58:22.489036",
8+
"spec_repo_commit": "a046371"
99
},
1010
"v2": {
1111
"apigentools_version": "1.5.1.dev2",
12-
"regenerated": "2021-10-14 17:41:35.387541",
13-
"spec_repo_commit": "5bae09b"
12+
"regenerated": "2021-10-15 13:59:18.724218",
13+
"spec_repo_commit": "a046371"
1414
}
1515
}
1616
}

docs/v1/SyntheticsApi.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ All URIs are relative to *https://api.datadoghq.com*
2020
| [**getBrowserTestResult**](SyntheticsApi.md#getBrowserTestResult) | **GET** /api/v1/synthetics/tests/browser/{public_id}/results/{result_id} | Get a browser test result |
2121
| [**getGlobalVariable**](SyntheticsApi.md#getGlobalVariable) | **GET** /api/v1/synthetics/variables/{variable_id} | Get a global variable |
2222
| [**getPrivateLocation**](SyntheticsApi.md#getPrivateLocation) | **GET** /api/v1/synthetics/private-locations/{location_id} | Get a private location |
23+
| [**getSyntheticsCIBatch**](SyntheticsApi.md#getSyntheticsCIBatch) | **GET** /api/v1/synthetics/ci/batch/{batch_id} | Get details of batch |
2324
| [**getTest**](SyntheticsApi.md#getTest) | **GET** /api/v1/synthetics/tests/{public_id} | Get a test configuration |
2425
| [**listGlobalVariables**](SyntheticsApi.md#listGlobalVariables) | **GET** /api/v1/synthetics/variables | Get all global variables |
2526
| [**listLocations**](SyntheticsApi.md#listLocations) | **GET** /api/v1/synthetics/locations | Get all locations (public and private) |
@@ -1277,6 +1278,64 @@ apiInstance
12771278

12781279
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
12791280

1281+
## **getSyntheticsCIBatch**
1282+
1283+
> SyntheticsBatchDetails getSyntheticsCIBatch()
1284+
1285+
Get a batch's updated details.
1286+
1287+
### Example
1288+
1289+
```typescript
1290+
import { v1 } from "@datadog/datadog-api-client";
1291+
import * as fs from "fs";
1292+
1293+
const configuration = v1.createConfiguration();
1294+
const apiInstance = new v1.SyntheticsApi(configuration);
1295+
1296+
let params: v1.SyntheticsApiGetSyntheticsCIBatchRequest = {
1297+
// string | The ID of the batch.
1298+
batchId: "batch_id_example",
1299+
};
1300+
1301+
apiInstance
1302+
.getSyntheticsCIBatch(params)
1303+
.then((data: any) => {
1304+
console.log(
1305+
"API called successfully. Returned data: " + JSON.stringify(data)
1306+
);
1307+
})
1308+
.catch((error: any) => console.error(error));
1309+
```
1310+
1311+
### Parameters
1312+
1313+
| Name | Type | Description | Notes |
1314+
| ----------- | ------------ | -------------------- | --------------------- |
1315+
| **batchId** | [**string**] | The ID of the batch. | defaults to undefined |
1316+
1317+
### Return type
1318+
1319+
**SyntheticsBatchDetails**
1320+
1321+
### Authorization
1322+
1323+
[apiKeyAuth](README.md#apiKeyAuth), [appKeyAuth](README.md#appKeyAuth)
1324+
1325+
### HTTP request headers
1326+
1327+
- **Content-Type**: Not defined
1328+
- **Accept**: application/json
1329+
1330+
### HTTP response details
1331+
1332+
| Status code | Description | Response headers |
1333+
| ----------- | --------------------- | ---------------- |
1334+
| **200** | OK | - |
1335+
| **404** | Batch does not exist. | - |
1336+
1337+
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
1338+
12801339
## **getTest**
12811340

12821341
> SyntheticsTestDetails getTest()

features/v1/synthetics.feature

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,20 @@ Feature: Synthetics
389389
When the request is sent
390390
Then the response status is 200 OK
391391

392+
@generated @skip
393+
Scenario: Get details of batch returns "Batch does not exist." response
394+
Given new "GetSyntheticsCIBatch" request
395+
And request contains "batch_id" parameter from "<PATH>"
396+
When the request is sent
397+
Then the response status is 404 Batch does not exist.
398+
399+
@generated @skip
400+
Scenario: Get details of batch returns "OK" response
401+
Given new "GetSyntheticsCIBatch" request
402+
And request contains "batch_id" parameter from "<PATH>"
403+
When the request is sent
404+
Then the response status is 200 OK
405+
392406
@generated @skip
393407
Scenario: Get the list of all tests returns "OK - Returns the list of all Synthetic tests." response
394408
Given new "ListTests" request

features/v1/undo.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -927,6 +927,12 @@
927927
"type": "safe"
928928
}
929929
},
930+
"GetSyntheticsCIBatch": {
931+
"tag": "Synthetics",
932+
"undo": {
933+
"type": "safe"
934+
}
935+
},
930936
"ListLocations": {
931937
"tag": "Synthetics",
932938
"undo": {

packages/datadog-api-client-v1/.openapi-generator/FILES

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,9 @@ models/SyntheticsAssertionOperator.ts
465465
models/SyntheticsAssertionTarget.ts
466466
models/SyntheticsAssertionType.ts
467467
models/SyntheticsBasicAuth.ts
468+
models/SyntheticsBatchDetails.ts
469+
models/SyntheticsBatchDetailsData.ts
470+
models/SyntheticsBatchResult.ts
468471
models/SyntheticsBrowserError.ts
469472
models/SyntheticsBrowserErrorType.ts
470473
models/SyntheticsBrowserTest.ts
@@ -477,11 +480,11 @@ models/SyntheticsBrowserTestResultShortResult.ts
477480
models/SyntheticsBrowserTestType.ts
478481
models/SyntheticsBrowserVariable.ts
479482
models/SyntheticsBrowserVariableType.ts
483+
models/SyntheticsCIBatchMetadata.ts
484+
models/SyntheticsCIBatchMetadataCI.ts
485+
models/SyntheticsCIBatchMetadataGit.ts
480486
models/SyntheticsCITest.ts
481487
models/SyntheticsCITestBody.ts
482-
models/SyntheticsCITestMetadata.ts
483-
models/SyntheticsCITestMetadataCi.ts
484-
models/SyntheticsCITestMetadataGit.ts
485488
models/SyntheticsCheckType.ts
486489
models/SyntheticsConfigVariable.ts
487490
models/SyntheticsConfigVariableType.ts
@@ -515,6 +518,7 @@ models/SyntheticsPrivateLocationSecretsConfigDecryption.ts
515518
models/SyntheticsSSLCertificate.ts
516519
models/SyntheticsSSLCertificateIssuer.ts
517520
models/SyntheticsSSLCertificateSubject.ts
521+
models/SyntheticsStatus.ts
518522
models/SyntheticsStep.ts
519523
models/SyntheticsStepDetail.ts
520524
models/SyntheticsStepDetailWarning.ts
@@ -523,6 +527,7 @@ models/SyntheticsTestConfig.ts
523527
models/SyntheticsTestDetails.ts
524528
models/SyntheticsTestDetailsSubType.ts
525529
models/SyntheticsTestDetailsType.ts
530+
models/SyntheticsTestExecutionRule.ts
526531
models/SyntheticsTestMonitorStatus.ts
527532
models/SyntheticsTestOptions.ts
528533
models/SyntheticsTestOptionsMonitorOptions.ts

packages/datadog-api-client-v1/apis/SyntheticsApi.ts

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { isCodeInRange } from "../util";
99
import { APIErrorResponse } from "../models/APIErrorResponse";
1010
import { SyntheticsAPITest } from "../models/SyntheticsAPITest";
1111
import { SyntheticsAPITestResultFull } from "../models/SyntheticsAPITestResultFull";
12+
import { SyntheticsBatchDetails } from "../models/SyntheticsBatchDetails";
1213
import { SyntheticsBrowserTest } from "../models/SyntheticsBrowserTest";
1314
import { SyntheticsBrowserTestResultFull } from "../models/SyntheticsBrowserTestResultFull";
1415
import { SyntheticsCITestBody } from "../models/SyntheticsCITestBody";
@@ -1082,6 +1083,61 @@ export class SyntheticsApiRequestFactory extends BaseAPIRequestFactory {
10821083
return requestContext;
10831084
}
10841085

1086+
/**
1087+
* Get a batch's updated details.
1088+
* Get details of batch
1089+
* @param batchId The ID of the batch.
1090+
*/
1091+
public async getSyntheticsCIBatch(
1092+
batchId: string,
1093+
_options?: Configuration
1094+
): Promise<RequestContext> {
1095+
const _config = _options || this.configuration;
1096+
1097+
// verify required parameter 'batchId' is not null or undefined
1098+
if (batchId === null || batchId === undefined) {
1099+
throw new RequiredError(
1100+
"Required parameter batchId was null or undefined when calling getSyntheticsCIBatch."
1101+
);
1102+
}
1103+
1104+
// Path Params
1105+
const localVarPath = "/api/v1/synthetics/ci/batch/{batch_id}".replace(
1106+
"{" + "batch_id" + "}",
1107+
encodeURIComponent(String(batchId))
1108+
);
1109+
1110+
// Make Request Context
1111+
const requestContext = getServer(
1112+
_config,
1113+
"SyntheticsApi.getSyntheticsCIBatch"
1114+
).makeRequestContext(localVarPath, HttpMethod.GET);
1115+
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
1116+
requestContext.setHttpConfig(_config.httpConfig);
1117+
1118+
// Query Params
1119+
1120+
// Header Params
1121+
1122+
// Form Params
1123+
1124+
// Body Params
1125+
1126+
let authMethod = null;
1127+
// Apply auth methods
1128+
authMethod = _config.authMethods["apiKeyAuth"];
1129+
if (authMethod) {
1130+
await authMethod.applySecurityAuthentication(requestContext);
1131+
}
1132+
// Apply auth methods
1133+
authMethod = _config.authMethods["appKeyAuth"];
1134+
if (authMethod) {
1135+
await authMethod.applySecurityAuthentication(requestContext);
1136+
}
1137+
1138+
return requestContext;
1139+
}
1140+
10851141
/**
10861142
* Get the detailed configuration associated with a Synthetics test.
10871143
* Get a test configuration
@@ -2544,6 +2600,53 @@ export class SyntheticsApiResponseProcessor {
25442600
);
25452601
}
25462602

2603+
/**
2604+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
2605+
* to the expected objects
2606+
*
2607+
* @params response Response returned by the server for a request to getSyntheticsCIBatch
2608+
* @throws ApiException if the response code was not in [200, 299]
2609+
*/
2610+
public async getSyntheticsCIBatch(
2611+
response: ResponseContext
2612+
): Promise<SyntheticsBatchDetails> {
2613+
const contentType = ObjectSerializer.normalizeMediaType(
2614+
response.headers["content-type"]
2615+
);
2616+
if (isCodeInRange("200", response.httpStatusCode)) {
2617+
const body: SyntheticsBatchDetails = ObjectSerializer.deserialize(
2618+
ObjectSerializer.parse(await response.body.text(), contentType),
2619+
"SyntheticsBatchDetails",
2620+
""
2621+
) as SyntheticsBatchDetails;
2622+
return body;
2623+
}
2624+
if (isCodeInRange("404", response.httpStatusCode)) {
2625+
const body: APIErrorResponse = ObjectSerializer.deserialize(
2626+
ObjectSerializer.parse(await response.body.text(), contentType),
2627+
"APIErrorResponse",
2628+
""
2629+
) as APIErrorResponse;
2630+
throw new ApiException<APIErrorResponse>(404, body);
2631+
}
2632+
2633+
// Work around for missing responses in specification, e.g. for petstore.yaml
2634+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
2635+
const body: SyntheticsBatchDetails = ObjectSerializer.deserialize(
2636+
ObjectSerializer.parse(await response.body.text(), contentType),
2637+
"SyntheticsBatchDetails",
2638+
""
2639+
) as SyntheticsBatchDetails;
2640+
return body;
2641+
}
2642+
2643+
const body = (await response.body.text()) || "";
2644+
throw new ApiException<string>(
2645+
response.httpStatusCode,
2646+
'Unknown API Status Code!\nBody: "' + body + '"'
2647+
);
2648+
}
2649+
25472650
/**
25482651
* Unwraps the actual response sent by the server from the response context and deserializes the response content
25492652
* to the expected objects

packages/datadog-api-client-v1/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ export {
159159
SyntheticsApiGetBrowserTestResultRequest,
160160
SyntheticsApiGetGlobalVariableRequest,
161161
SyntheticsApiGetPrivateLocationRequest,
162+
SyntheticsApiGetSyntheticsCIBatchRequest,
162163
SyntheticsApiGetTestRequest,
163164
SyntheticsApiTriggerCITestsRequest,
164165
SyntheticsApiUpdateAPITestRequest,

packages/datadog-api-client-v1/models/ObjectSerializer.ts

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,9 @@ import { SyntheticsAssertionJSONPathTarget } from "./SyntheticsAssertionJSONPath
295295
import { SyntheticsAssertionJSONPathTargetTarget } from "./SyntheticsAssertionJSONPathTargetTarget";
296296
import { SyntheticsAssertionTarget } from "./SyntheticsAssertionTarget";
297297
import { SyntheticsBasicAuth } from "./SyntheticsBasicAuth";
298+
import { SyntheticsBatchDetails } from "./SyntheticsBatchDetails";
299+
import { SyntheticsBatchDetailsData } from "./SyntheticsBatchDetailsData";
300+
import { SyntheticsBatchResult } from "./SyntheticsBatchResult";
298301
import { SyntheticsBrowserError } from "./SyntheticsBrowserError";
299302
import { SyntheticsBrowserTest } from "./SyntheticsBrowserTest";
300303
import { SyntheticsBrowserTestConfig } from "./SyntheticsBrowserTestConfig";
@@ -304,11 +307,11 @@ import { SyntheticsBrowserTestResultFullCheck } from "./SyntheticsBrowserTestRes
304307
import { SyntheticsBrowserTestResultShort } from "./SyntheticsBrowserTestResultShort";
305308
import { SyntheticsBrowserTestResultShortResult } from "./SyntheticsBrowserTestResultShortResult";
306309
import { SyntheticsBrowserVariable } from "./SyntheticsBrowserVariable";
310+
import { SyntheticsCIBatchMetadata } from "./SyntheticsCIBatchMetadata";
311+
import { SyntheticsCIBatchMetadataCI } from "./SyntheticsCIBatchMetadataCI";
312+
import { SyntheticsCIBatchMetadataGit } from "./SyntheticsCIBatchMetadataGit";
307313
import { SyntheticsCITest } from "./SyntheticsCITest";
308314
import { SyntheticsCITestBody } from "./SyntheticsCITestBody";
309-
import { SyntheticsCITestMetadata } from "./SyntheticsCITestMetadata";
310-
import { SyntheticsCITestMetadataCi } from "./SyntheticsCITestMetadataCi";
311-
import { SyntheticsCITestMetadataGit } from "./SyntheticsCITestMetadataGit";
312315
import { SyntheticsConfigVariable } from "./SyntheticsConfigVariable";
313316
import { SyntheticsCoreWebVitals } from "./SyntheticsCoreWebVitals";
314317
import { SyntheticsDeleteTestsPayload } from "./SyntheticsDeleteTestsPayload";
@@ -578,9 +581,11 @@ const enumsMap: Set<string> = new Set<string>([
578581
"SyntheticsGlobalVariableParseTestOptionsType",
579582
"SyntheticsGlobalVariableParserType",
580583
"SyntheticsPlayingTab",
584+
"SyntheticsStatus",
581585
"SyntheticsStepType",
582586
"SyntheticsTestDetailsSubType",
583587
"SyntheticsTestDetailsType",
588+
"SyntheticsTestExecutionRule",
584589
"SyntheticsTestMonitorStatus",
585590
"SyntheticsTestPauseStatus",
586591
"SyntheticsTestProcessStatus",
@@ -946,6 +951,9 @@ const typeMap: { [index: string]: any } = {
946951
SyntheticsAssertionJSONPathTargetTarget,
947952
SyntheticsAssertionTarget: SyntheticsAssertionTarget,
948953
SyntheticsBasicAuth: SyntheticsBasicAuth,
954+
SyntheticsBatchDetails: SyntheticsBatchDetails,
955+
SyntheticsBatchDetailsData: SyntheticsBatchDetailsData,
956+
SyntheticsBatchResult: SyntheticsBatchResult,
949957
SyntheticsBrowserError: SyntheticsBrowserError,
950958
SyntheticsBrowserTest: SyntheticsBrowserTest,
951959
SyntheticsBrowserTestConfig: SyntheticsBrowserTestConfig,
@@ -956,11 +964,11 @@ const typeMap: { [index: string]: any } = {
956964
SyntheticsBrowserTestResultShortResult:
957965
SyntheticsBrowserTestResultShortResult,
958966
SyntheticsBrowserVariable: SyntheticsBrowserVariable,
967+
SyntheticsCIBatchMetadata: SyntheticsCIBatchMetadata,
968+
SyntheticsCIBatchMetadataCI: SyntheticsCIBatchMetadataCI,
969+
SyntheticsCIBatchMetadataGit: SyntheticsCIBatchMetadataGit,
959970
SyntheticsCITest: SyntheticsCITest,
960971
SyntheticsCITestBody: SyntheticsCITestBody,
961-
SyntheticsCITestMetadata: SyntheticsCITestMetadata,
962-
SyntheticsCITestMetadataCi: SyntheticsCITestMetadataCi,
963-
SyntheticsCITestMetadataGit: SyntheticsCITestMetadataGit,
964972
SyntheticsConfigVariable: SyntheticsConfigVariable,
965973
SyntheticsCoreWebVitals: SyntheticsCoreWebVitals,
966974
SyntheticsDeleteTestsPayload: SyntheticsDeleteTestsPayload,

0 commit comments

Comments
 (0)