From 77f1b2f2003657214836703c6d72a1d3b64a5d15 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 21 Nov 2025 12:59:49 +0000 Subject: [PATCH] Regenerate client from commit 73f2ad5 of spec repo --- .generator/schemas/v2/openapi.yaml | 315 ++++++++++++++++++ examples/v2/synthetics/PatchGlobalVariable.ts | 34 ++ features/support/scenarios_model_mapping.ts | 11 + features/v2/synthetics.feature | 24 ++ features/v2/undo.json | 6 + .../apis/SyntheticsApi.ts | 157 +++++++++ packages/datadog-api-client-v2/index.ts | 19 ++ .../models/GlobalVariableData.ts | 70 ++++ .../models/GlobalVariableJsonPatchRequest.ts | 51 +++ .../GlobalVariableJsonPatchRequestData.ts | 56 ++++ ...lVariableJsonPatchRequestDataAttributes.ts | 50 +++ .../models/GlobalVariableJsonPatchType.ts | 16 + .../models/GlobalVariableResponse.ts | 53 +++ .../models/GlobalVariableType.ts | 14 + .../models/JsonPatchOperation.ts | 71 ++++ .../models/JsonPatchOperationOp.ts | 26 ++ .../models/ObjectSerializer.ts | 39 +++ .../models/SyntheticsGlobalVariable.ts | 131 ++++++++ .../SyntheticsGlobalVariableAttributes.ts | 52 +++ .../models/SyntheticsGlobalVariableOptions.ts | 53 +++ ...yntheticsGlobalVariableParseTestOptions.ts | 79 +++++ ...eticsGlobalVariableParseTestOptionsType.ts | 22 ++ .../SyntheticsGlobalVariableParserType.ts | 22 ++ .../SyntheticsGlobalVariableTOTPParameters.ts | 62 ++++ .../models/SyntheticsGlobalVariableValue.ts | 70 ++++ .../models/SyntheticsVariableParser.ts | 62 ++++ 26 files changed, 1565 insertions(+) create mode 100644 examples/v2/synthetics/PatchGlobalVariable.ts create mode 100644 packages/datadog-api-client-v2/models/GlobalVariableData.ts create mode 100644 packages/datadog-api-client-v2/models/GlobalVariableJsonPatchRequest.ts create mode 100644 packages/datadog-api-client-v2/models/GlobalVariableJsonPatchRequestData.ts create mode 100644 packages/datadog-api-client-v2/models/GlobalVariableJsonPatchRequestDataAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/GlobalVariableJsonPatchType.ts create mode 100644 packages/datadog-api-client-v2/models/GlobalVariableResponse.ts create mode 100644 packages/datadog-api-client-v2/models/GlobalVariableType.ts create mode 100644 packages/datadog-api-client-v2/models/JsonPatchOperation.ts create mode 100644 packages/datadog-api-client-v2/models/JsonPatchOperationOp.ts create mode 100644 packages/datadog-api-client-v2/models/SyntheticsGlobalVariable.ts create mode 100644 packages/datadog-api-client-v2/models/SyntheticsGlobalVariableAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/SyntheticsGlobalVariableOptions.ts create mode 100644 packages/datadog-api-client-v2/models/SyntheticsGlobalVariableParseTestOptions.ts create mode 100644 packages/datadog-api-client-v2/models/SyntheticsGlobalVariableParseTestOptionsType.ts create mode 100644 packages/datadog-api-client-v2/models/SyntheticsGlobalVariableParserType.ts create mode 100644 packages/datadog-api-client-v2/models/SyntheticsGlobalVariableTOTPParameters.ts create mode 100644 packages/datadog-api-client-v2/models/SyntheticsGlobalVariableValue.ts create mode 100644 packages/datadog-api-client-v2/models/SyntheticsVariableParser.ts diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 9bceb715496a..1fe0e1f167d1 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -23651,6 +23651,61 @@ components: required: - type type: object + GlobalVariableData: + description: Synthetics global variable data. Wrapper around the global variable + object. + properties: + attributes: + $ref: '#/components/schemas/SyntheticsGlobalVariable' + id: + description: Global variable identifier. + type: string + type: + $ref: '#/components/schemas/GlobalVariableType' + type: object + GlobalVariableJsonPatchRequest: + description: JSON Patch request for global variable. + properties: + data: + $ref: '#/components/schemas/GlobalVariableJsonPatchRequestData' + required: + - data + type: object + GlobalVariableJsonPatchRequestData: + properties: + attributes: + $ref: '#/components/schemas/GlobalVariableJsonPatchRequestDataAttributes' + type: + $ref: '#/components/schemas/GlobalVariableJsonPatchType' + type: object + GlobalVariableJsonPatchRequestDataAttributes: + properties: + json_patch: + description: JSON Patch operations following RFC 6902. + items: + $ref: '#/components/schemas/JsonPatchOperation' + type: array + type: object + GlobalVariableJsonPatchType: + description: Global variable JSON Patch type. + enum: + - global_variables_json_patch + type: string + x-enum-varnames: + - GLOBAL_VARIABLES_JSON_PATCH + GlobalVariableResponse: + description: Global variable response. + properties: + data: + $ref: '#/components/schemas/GlobalVariableData' + type: object + GlobalVariableType: + description: Global variable type. + enum: + - global_variables + type: string + x-enum-varnames: + - GLOBAL_VARIABLES GoogleMeetConfigurationReference: description: A reference to a Google Meet Configuration resource. nullable: true @@ -28404,6 +28459,40 @@ components: - to - index type: object + JsonPatchOperation: + description: A JSON Patch operation as per RFC 6902. + properties: + op: + $ref: '#/components/schemas/JsonPatchOperationOp' + path: + description: A JSON Pointer path (e.g., "/name", "/value/secure"). + example: /name + type: string + value: + description: The value to use for the operation (not applicable for "remove" + and "test" operations). + required: + - op + - path + type: object + JsonPatchOperationOp: + description: The operation to perform. + enum: + - add + - remove + - replace + - move + - copy + - test + example: add + type: string + x-enum-varnames: + - ADD + - REMOVE + - REPLACE + - MOVE + - COPY + - TEST KindAttributes: description: Kind attributes. properties: @@ -51322,6 +51411,178 @@ components: format: double type: number type: object + SyntheticsGlobalVariable: + description: Synthetic global variable. + properties: + attributes: + $ref: '#/components/schemas/SyntheticsGlobalVariableAttributes' + description: + description: Description of the global variable. + example: Example description + type: string + id: + description: Unique identifier of the global variable. + readOnly: true + type: string + is_fido: + description: Determines if the global variable is a FIDO variable. + type: boolean + is_totp: + description: Determines if the global variable is a TOTP/MFA variable. + type: boolean + name: + description: Name of the global variable. Unique across Synthetic global + variables. + example: MY_VARIABLE + type: string + parse_test_options: + $ref: '#/components/schemas/SyntheticsGlobalVariableParseTestOptions' + parse_test_public_id: + description: A Synthetic test ID to use as a test to generate the variable + value. + example: abc-def-123 + type: string + tags: + description: Tags of the global variable. + example: + - team:front + - test:workflow-1 + items: + description: Tag name. + type: string + type: array + value: + $ref: '#/components/schemas/SyntheticsGlobalVariableValue' + required: + - description + - name + - tags + - value + type: object + SyntheticsGlobalVariableAttributes: + description: Attributes of the global variable. + properties: + restricted_roles: + $ref: '#/components/schemas/SyntheticsRestrictedRoles' + type: object + SyntheticsGlobalVariableOptions: + description: Options for the Global Variable for MFA. + properties: + totp_parameters: + $ref: '#/components/schemas/SyntheticsGlobalVariableTOTPParameters' + type: object + SyntheticsGlobalVariableParseTestOptions: + description: Parser options to use for retrieving a Synthetic global variable + from a Synthetic test. Used in conjunction with `parse_test_public_id`. + properties: + field: + description: When type is `http_header`, name of the header to use to extract + the value. + example: content-type + type: string + localVariableName: + description: When type is `local_variable`, name of the local variable to + use to extract the value. + example: LOCAL_VARIABLE + type: string + parser: + $ref: '#/components/schemas/SyntheticsVariableParser' + type: + $ref: '#/components/schemas/SyntheticsGlobalVariableParseTestOptionsType' + required: + - type + type: object + SyntheticsGlobalVariableParseTestOptionsType: + description: Type of value to extract from a test for a Synthetic global variable. + enum: + - http_body + - http_header + - http_status_code + - local_variable + example: http_body + type: string + x-enum-varnames: + - HTTP_BODY + - HTTP_HEADER + - HTTP_STATUS_CODE + - LOCAL_VARIABLE + SyntheticsGlobalVariableParserType: + description: Type of parser for a Synthetic global variable from a synthetics + test. + enum: + - raw + - json_path + - regex + - x_path + example: raw + type: string + x-enum-varnames: + - RAW + - JSON_PATH + - REGEX + - X_PATH + SyntheticsGlobalVariableTOTPParameters: + description: Parameters for the TOTP/MFA variable + properties: + digits: + description: Number of digits for the OTP code. + example: 6 + format: int32 + maximum: 10 + minimum: 4 + type: integer + refresh_interval: + description: Interval for which to refresh the token (in seconds). + example: 30 + format: int32 + maximum: 999 + minimum: 0 + type: integer + type: object + SyntheticsGlobalVariableValue: + description: Value of the global variable. + example: + secure: true + value: value + properties: + options: + $ref: '#/components/schemas/SyntheticsGlobalVariableOptions' + secure: + description: Determines if the value of the variable is hidden. + type: boolean + value: + description: 'Value of the global variable. When reading a global variable, + + the value will not be present if the variable is hidden with the `secure` + property.' + example: example-value + type: string + type: object + SyntheticsRestrictedRoles: + description: A list of role identifiers that can be pulled from the Roles API, + for restricting read and write access. + example: + - xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + items: + description: UUID for a role. + example: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + type: string + type: array + SyntheticsVariableParser: + description: Details of the parser to use for the global variable. + example: + type: regex + value: .* + properties: + type: + $ref: '#/components/schemas/SyntheticsGlobalVariableParserType' + value: + description: Regex or JSON path used for the parser. Not used with type + `raw`. + type: string + required: + - type + type: object TableResultV2: description: A reference table resource containing its full configuration and state. @@ -81694,6 +81955,60 @@ paths: operator: OR permissions: - billing_edit + /api/v2/synthetics/variables/{variable_id}/jsonpatch: + patch: + description: 'Patch a global variable using JSON Patch (RFC 6902). + + This endpoint allows partial updates to a global variable by specifying only + the fields to modify. + + + Common operations include: + + - Replace field values: `{"op": "replace", "path": "/name", "value": "new_name"}` + + - Update nested values: `{"op": "replace", "path": "/value/value", "value": + "new_value"}` + + - Add/update tags: `{"op": "add", "path": "/tags/-", "value": "new_tag"}` + + - Remove fields: `{"op": "remove", "path": "/description"}`' + operationId: PatchGlobalVariable + parameters: + - description: The ID of the global variable. + in: path + name: variable_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GlobalVariableJsonPatchRequest' + description: JSON Patch document with operations to apply. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GlobalVariableResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Patch a global variable + tags: + - Synthetics + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - synthetics_global_variable_write /api/v2/tags/enrichment: get: description: List all tag pipeline rulesets - Retrieve a list of all tag pipeline diff --git a/examples/v2/synthetics/PatchGlobalVariable.ts b/examples/v2/synthetics/PatchGlobalVariable.ts new file mode 100644 index 000000000000..8e4f50616f1b --- /dev/null +++ b/examples/v2/synthetics/PatchGlobalVariable.ts @@ -0,0 +1,34 @@ +/** + * Patch a global variable returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.SyntheticsApi(configuration); + +const params: v2.SyntheticsApiPatchGlobalVariableRequest = { + body: { + data: { + attributes: { + jsonPatch: [ + { + op: "add", + path: "/name", + }, + ], + }, + type: "global_variables_json_patch", + }, + }, + variableId: "variable_id", +}; + +apiInstance + .patchGlobalVariable(params) + .then((data: v2.GlobalVariableResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/features/support/scenarios_model_mapping.ts b/features/support/scenarios_model_mapping.ts index 7bfe6adf50be..9a256380fabb 100644 --- a/features/support/scenarios_model_mapping.ts +++ b/features/support/scenarios_model_mapping.ts @@ -8725,6 +8725,17 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { }, "operationResponseType": "OnDemandConcurrencyCapResponse", }, + "v2.PatchGlobalVariable": { + "variableId": { + "type": "string", + "format": "", + }, + "body": { + "type": "GlobalVariableJsonPatchRequest", + "format": "", + }, + "operationResponseType": "GlobalVariableResponse", + }, "v2.ListTeams": { "pageNumber": { "type": "number", diff --git a/features/v2/synthetics.feature b/features/v2/synthetics.feature index 73efa73ec291..133993b11b7b 100644 --- a/features/v2/synthetics.feature +++ b/features/v2/synthetics.feature @@ -20,6 +20,30 @@ Feature: Synthetics When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/synthetics-managing + Scenario: Patch a global variable returns "Bad Request" response + Given new "PatchGlobalVariable" request + And request contains "variable_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"json_patch": [{"op": "add", "path": "/name"}]}, "type": "global_variables_json_patch"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Patch a global variable returns "Not Found" response + Given new "PatchGlobalVariable" request + And request contains "variable_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"json_patch": [{"op": "add", "path": "/name"}]}, "type": "global_variables_json_patch"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Patch a global variable returns "OK" response + Given new "PatchGlobalVariable" request + And request contains "variable_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"json_patch": [{"op": "add", "path": "/name"}]}, "type": "global_variables_json_patch"}} + When the request is sent + Then the response status is 200 OK + @team:DataDog/synthetics-managing Scenario: Save new value for on-demand concurrency cap returns "OK" response Given new "SetOnDemandConcurrencyCap" request diff --git a/features/v2/undo.json b/features/v2/undo.json index 3799e64e630d..f4cbbb2baae9 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -4284,6 +4284,12 @@ "type": "safe" } }, + "PatchGlobalVariable": { + "tag": "Synthetics", + "undo": { + "type": "safe" + } + }, "ListTagPipelinesRulesets": { "tag": "Cloud Cost Management", "undo": { diff --git a/packages/datadog-api-client-v2/apis/SyntheticsApi.ts b/packages/datadog-api-client-v2/apis/SyntheticsApi.ts index 3dc8b39d8eb3..e2f8d017304f 100644 --- a/packages/datadog-api-client-v2/apis/SyntheticsApi.ts +++ b/packages/datadog-api-client-v2/apis/SyntheticsApi.ts @@ -17,6 +17,8 @@ import { ObjectSerializer } from "../models/ObjectSerializer"; import { ApiException } from "../../datadog-api-client-common/exception"; import { APIErrorResponse } from "../models/APIErrorResponse"; +import { GlobalVariableJsonPatchRequest } from "../models/GlobalVariableJsonPatchRequest"; +import { GlobalVariableResponse } from "../models/GlobalVariableResponse"; import { OnDemandConcurrencyCapAttributes } from "../models/OnDemandConcurrencyCapAttributes"; import { OnDemandConcurrencyCapResponse } from "../models/OnDemandConcurrencyCapResponse"; @@ -46,6 +48,57 @@ export class SyntheticsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + public async patchGlobalVariable( + variableId: string, + body: GlobalVariableJsonPatchRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'variableId' is not null or undefined + if (variableId === null || variableId === undefined) { + throw new RequiredError("variableId", "patchGlobalVariable"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "patchGlobalVariable"); + } + + // Path Params + const localVarPath = + "/api/v2/synthetics/variables/{variable_id}/jsonpatch".replace( + "{variable_id}", + encodeURIComponent(String(variableId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.SyntheticsApi.patchGlobalVariable") + .makeRequestContext(localVarPath, HttpMethod.PATCH); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "GlobalVariableJsonPatchRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + public async setOnDemandConcurrencyCap( body: OnDemandConcurrencyCapAttributes, _options?: Configuration @@ -148,6 +201,68 @@ export class SyntheticsApiResponseProcessor { ); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to patchGlobalVariable + * @throws ApiException if the response code was not in [200, 299] + */ + public async patchGlobalVariable( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: GlobalVariableResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GlobalVariableResponse" + ) as GlobalVariableResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: GlobalVariableResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GlobalVariableResponse", + "" + ) as GlobalVariableResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -207,6 +322,19 @@ export class SyntheticsApiResponseProcessor { } } +export interface SyntheticsApiPatchGlobalVariableRequest { + /** + * The ID of the global variable. + * @type string + */ + variableId: string; + /** + * JSON Patch document with operations to apply. + * @type GlobalVariableJsonPatchRequest + */ + body: GlobalVariableJsonPatchRequest; +} + export interface SyntheticsApiSetOnDemandConcurrencyCapRequest { /** * . @@ -252,6 +380,35 @@ export class SyntheticsApi { }); } + /** + * Patch a global variable using JSON Patch (RFC 6902). + * This endpoint allows partial updates to a global variable by specifying only the fields to modify. + * + * Common operations include: + * - Replace field values: `{"op": "replace", "path": "/name", "value": "new_name"}` + * - Update nested values: `{"op": "replace", "path": "/value/value", "value": "new_value"}` + * - Add/update tags: `{"op": "add", "path": "/tags/-", "value": "new_tag"}` + * - Remove fields: `{"op": "remove", "path": "/description"}` + * @param param The request object + */ + public patchGlobalVariable( + param: SyntheticsApiPatchGlobalVariableRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.patchGlobalVariable( + param.variableId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.patchGlobalVariable(responseContext); + }); + }); + } + /** * Save new value for on-demand concurrency cap. * @param param The request object diff --git a/packages/datadog-api-client-v2/index.ts b/packages/datadog-api-client-v2/index.ts index 00bee8317f47..2c5cbe78c77c 100644 --- a/packages/datadog-api-client-v2/index.ts +++ b/packages/datadog-api-client-v2/index.ts @@ -857,6 +857,7 @@ export { } from "./apis/StaticAnalysisApi"; export { + SyntheticsApiPatchGlobalVariableRequest, SyntheticsApiSetOnDemandConcurrencyCapRequest, SyntheticsApi, } from "./apis/SyntheticsApi"; @@ -2362,6 +2363,13 @@ export { GitlabCredentialsUpdate } from "./models/GitlabCredentialsUpdate"; export { GitlabIntegration } from "./models/GitlabIntegration"; export { GitlabIntegrationType } from "./models/GitlabIntegrationType"; export { GitlabIntegrationUpdate } from "./models/GitlabIntegrationUpdate"; +export { GlobalVariableData } from "./models/GlobalVariableData"; +export { GlobalVariableJsonPatchRequest } from "./models/GlobalVariableJsonPatchRequest"; +export { GlobalVariableJsonPatchRequestData } from "./models/GlobalVariableJsonPatchRequestData"; +export { GlobalVariableJsonPatchRequestDataAttributes } from "./models/GlobalVariableJsonPatchRequestDataAttributes"; +export { GlobalVariableJsonPatchType } from "./models/GlobalVariableJsonPatchType"; +export { GlobalVariableResponse } from "./models/GlobalVariableResponse"; +export { GlobalVariableType } from "./models/GlobalVariableType"; export { GoogleMeetConfigurationReference } from "./models/GoogleMeetConfigurationReference"; export { GoogleMeetConfigurationReferenceData } from "./models/GoogleMeetConfigurationReferenceData"; export { GreyNoiseAPIKey } from "./models/GreyNoiseAPIKey"; @@ -2659,6 +2667,8 @@ export { JobDefinitionFromRule } from "./models/JobDefinitionFromRule"; export { JSONAPIErrorItem } from "./models/JSONAPIErrorItem"; export { JSONAPIErrorItemSource } from "./models/JSONAPIErrorItemSource"; export { JSONAPIErrorResponse } from "./models/JSONAPIErrorResponse"; +export { JsonPatchOperation } from "./models/JsonPatchOperation"; +export { JsonPatchOperationOp } from "./models/JsonPatchOperationOp"; export { KindAttributes } from "./models/KindAttributes"; export { KindData } from "./models/KindData"; export { KindMetadata } from "./models/KindMetadata"; @@ -4162,6 +4172,15 @@ export { StatsigIntegrationUpdate } from "./models/StatsigIntegrationUpdate"; export { Step } from "./models/Step"; export { StepDisplay } from "./models/StepDisplay"; export { StepDisplayBounds } from "./models/StepDisplayBounds"; +export { SyntheticsGlobalVariable } from "./models/SyntheticsGlobalVariable"; +export { SyntheticsGlobalVariableAttributes } from "./models/SyntheticsGlobalVariableAttributes"; +export { SyntheticsGlobalVariableOptions } from "./models/SyntheticsGlobalVariableOptions"; +export { SyntheticsGlobalVariableParserType } from "./models/SyntheticsGlobalVariableParserType"; +export { SyntheticsGlobalVariableParseTestOptions } from "./models/SyntheticsGlobalVariableParseTestOptions"; +export { SyntheticsGlobalVariableParseTestOptionsType } from "./models/SyntheticsGlobalVariableParseTestOptionsType"; +export { SyntheticsGlobalVariableTOTPParameters } from "./models/SyntheticsGlobalVariableTOTPParameters"; +export { SyntheticsGlobalVariableValue } from "./models/SyntheticsGlobalVariableValue"; +export { SyntheticsVariableParser } from "./models/SyntheticsVariableParser"; export { TableResultV2 } from "./models/TableResultV2"; export { TableResultV2Array } from "./models/TableResultV2Array"; export { TableResultV2Data } from "./models/TableResultV2Data"; diff --git a/packages/datadog-api-client-v2/models/GlobalVariableData.ts b/packages/datadog-api-client-v2/models/GlobalVariableData.ts new file mode 100644 index 000000000000..8b523af082b7 --- /dev/null +++ b/packages/datadog-api-client-v2/models/GlobalVariableData.ts @@ -0,0 +1,70 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { GlobalVariableType } from "./GlobalVariableType"; +import { SyntheticsGlobalVariable } from "./SyntheticsGlobalVariable"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Synthetics global variable data. Wrapper around the global variable object. + */ +export class GlobalVariableData { + /** + * Synthetic global variable. + */ + "attributes"?: SyntheticsGlobalVariable; + /** + * Global variable identifier. + */ + "id"?: string; + /** + * Global variable type. + */ + "type"?: GlobalVariableType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "SyntheticsGlobalVariable", + }, + id: { + baseName: "id", + type: "string", + }, + type: { + baseName: "type", + type: "GlobalVariableType", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return GlobalVariableData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/GlobalVariableJsonPatchRequest.ts b/packages/datadog-api-client-v2/models/GlobalVariableJsonPatchRequest.ts new file mode 100644 index 000000000000..b7c990fb6603 --- /dev/null +++ b/packages/datadog-api-client-v2/models/GlobalVariableJsonPatchRequest.ts @@ -0,0 +1,51 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { GlobalVariableJsonPatchRequestData } from "./GlobalVariableJsonPatchRequestData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * JSON Patch request for global variable. + */ +export class GlobalVariableJsonPatchRequest { + "data": GlobalVariableJsonPatchRequestData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "GlobalVariableJsonPatchRequestData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return GlobalVariableJsonPatchRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/GlobalVariableJsonPatchRequestData.ts b/packages/datadog-api-client-v2/models/GlobalVariableJsonPatchRequestData.ts new file mode 100644 index 000000000000..a80565120a37 --- /dev/null +++ b/packages/datadog-api-client-v2/models/GlobalVariableJsonPatchRequestData.ts @@ -0,0 +1,56 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { GlobalVariableJsonPatchRequestDataAttributes } from "./GlobalVariableJsonPatchRequestDataAttributes"; +import { GlobalVariableJsonPatchType } from "./GlobalVariableJsonPatchType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +export class GlobalVariableJsonPatchRequestData { + "attributes"?: GlobalVariableJsonPatchRequestDataAttributes; + /** + * Global variable JSON Patch type. + */ + "type"?: GlobalVariableJsonPatchType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "GlobalVariableJsonPatchRequestDataAttributes", + }, + type: { + baseName: "type", + type: "GlobalVariableJsonPatchType", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return GlobalVariableJsonPatchRequestData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/GlobalVariableJsonPatchRequestDataAttributes.ts b/packages/datadog-api-client-v2/models/GlobalVariableJsonPatchRequestDataAttributes.ts new file mode 100644 index 000000000000..b2da837d0f59 --- /dev/null +++ b/packages/datadog-api-client-v2/models/GlobalVariableJsonPatchRequestDataAttributes.ts @@ -0,0 +1,50 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { JsonPatchOperation } from "./JsonPatchOperation"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +export class GlobalVariableJsonPatchRequestDataAttributes { + /** + * JSON Patch operations following RFC 6902. + */ + "jsonPatch"?: Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + jsonPatch: { + baseName: "json_patch", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return GlobalVariableJsonPatchRequestDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/GlobalVariableJsonPatchType.ts b/packages/datadog-api-client-v2/models/GlobalVariableJsonPatchType.ts new file mode 100644 index 000000000000..c1326a4861ac --- /dev/null +++ b/packages/datadog-api-client-v2/models/GlobalVariableJsonPatchType.ts @@ -0,0 +1,16 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Global variable JSON Patch type. + */ + +export type GlobalVariableJsonPatchType = + | typeof GLOBAL_VARIABLES_JSON_PATCH + | UnparsedObject; +export const GLOBAL_VARIABLES_JSON_PATCH = "global_variables_json_patch"; diff --git a/packages/datadog-api-client-v2/models/GlobalVariableResponse.ts b/packages/datadog-api-client-v2/models/GlobalVariableResponse.ts new file mode 100644 index 000000000000..9b583dbb12c0 --- /dev/null +++ b/packages/datadog-api-client-v2/models/GlobalVariableResponse.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { GlobalVariableData } from "./GlobalVariableData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Global variable response. + */ +export class GlobalVariableResponse { + /** + * Synthetics global variable data. Wrapper around the global variable object. + */ + "data"?: GlobalVariableData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "GlobalVariableData", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return GlobalVariableResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/GlobalVariableType.ts b/packages/datadog-api-client-v2/models/GlobalVariableType.ts new file mode 100644 index 000000000000..b281cd78fb95 --- /dev/null +++ b/packages/datadog-api-client-v2/models/GlobalVariableType.ts @@ -0,0 +1,14 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Global variable type. + */ + +export type GlobalVariableType = typeof GLOBAL_VARIABLES | UnparsedObject; +export const GLOBAL_VARIABLES = "global_variables"; diff --git a/packages/datadog-api-client-v2/models/JsonPatchOperation.ts b/packages/datadog-api-client-v2/models/JsonPatchOperation.ts new file mode 100644 index 000000000000..d04d32323d0c --- /dev/null +++ b/packages/datadog-api-client-v2/models/JsonPatchOperation.ts @@ -0,0 +1,71 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { JsonPatchOperationOp } from "./JsonPatchOperationOp"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * A JSON Patch operation as per RFC 6902. + */ +export class JsonPatchOperation { + /** + * The operation to perform. + */ + "op": JsonPatchOperationOp; + /** + * A JSON Pointer path (e.g., "/name", "/value/secure"). + */ + "path": string; + /** + * The value to use for the operation (not applicable for "remove" and "test" operations). + */ + "value"?: any; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + op: { + baseName: "op", + type: "JsonPatchOperationOp", + required: true, + }, + path: { + baseName: "path", + type: "string", + required: true, + }, + value: { + baseName: "value", + type: "any", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return JsonPatchOperation.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/JsonPatchOperationOp.ts b/packages/datadog-api-client-v2/models/JsonPatchOperationOp.ts new file mode 100644 index 000000000000..387eabcfa834 --- /dev/null +++ b/packages/datadog-api-client-v2/models/JsonPatchOperationOp.ts @@ -0,0 +1,26 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The operation to perform. + */ + +export type JsonPatchOperationOp = + | typeof ADD + | typeof REMOVE + | typeof REPLACE + | typeof MOVE + | typeof COPY + | typeof TEST + | UnparsedObject; +export const ADD = "add"; +export const REMOVE = "remove"; +export const REPLACE = "replace"; +export const MOVE = "move"; +export const COPY = "copy"; +export const TEST = "test"; diff --git a/packages/datadog-api-client-v2/models/ObjectSerializer.ts b/packages/datadog-api-client-v2/models/ObjectSerializer.ts index df5aaf40e489..063ef0c2944f 100644 --- a/packages/datadog-api-client-v2/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v2/models/ObjectSerializer.ts @@ -1078,6 +1078,11 @@ import { GitlabAPIKey } from "./GitlabAPIKey"; import { GitlabAPIKeyUpdate } from "./GitlabAPIKeyUpdate"; import { GitlabIntegration } from "./GitlabIntegration"; import { GitlabIntegrationUpdate } from "./GitlabIntegrationUpdate"; +import { GlobalVariableData } from "./GlobalVariableData"; +import { GlobalVariableJsonPatchRequest } from "./GlobalVariableJsonPatchRequest"; +import { GlobalVariableJsonPatchRequestData } from "./GlobalVariableJsonPatchRequestData"; +import { GlobalVariableJsonPatchRequestDataAttributes } from "./GlobalVariableJsonPatchRequestDataAttributes"; +import { GlobalVariableResponse } from "./GlobalVariableResponse"; import { GoogleMeetConfigurationReference } from "./GoogleMeetConfigurationReference"; import { GoogleMeetConfigurationReferenceData } from "./GoogleMeetConfigurationReferenceData"; import { GreyNoiseAPIKey } from "./GreyNoiseAPIKey"; @@ -1302,6 +1307,7 @@ import { JobCreateResponse } from "./JobCreateResponse"; import { JobCreateResponseData } from "./JobCreateResponseData"; import { JobDefinition } from "./JobDefinition"; import { JobDefinitionFromRule } from "./JobDefinitionFromRule"; +import { JsonPatchOperation } from "./JsonPatchOperation"; import { KindAttributes } from "./KindAttributes"; import { KindData } from "./KindData"; import { KindMetadata } from "./KindMetadata"; @@ -2400,6 +2406,13 @@ import { StatsigIntegrationUpdate } from "./StatsigIntegrationUpdate"; import { Step } from "./Step"; import { StepDisplay } from "./StepDisplay"; import { StepDisplayBounds } from "./StepDisplayBounds"; +import { SyntheticsGlobalVariable } from "./SyntheticsGlobalVariable"; +import { SyntheticsGlobalVariableAttributes } from "./SyntheticsGlobalVariableAttributes"; +import { SyntheticsGlobalVariableOptions } from "./SyntheticsGlobalVariableOptions"; +import { SyntheticsGlobalVariableParseTestOptions } from "./SyntheticsGlobalVariableParseTestOptions"; +import { SyntheticsGlobalVariableTOTPParameters } from "./SyntheticsGlobalVariableTOTPParameters"; +import { SyntheticsGlobalVariableValue } from "./SyntheticsGlobalVariableValue"; +import { SyntheticsVariableParser } from "./SyntheticsVariableParser"; import { TableResultV2 } from "./TableResultV2"; import { TableResultV2Array } from "./TableResultV2Array"; import { TableResultV2Data } from "./TableResultV2Data"; @@ -3219,6 +3232,8 @@ const enumsMap: { [key: string]: any[] } = { ], GitlabAPIKeyType: ["GitlabAPIKey"], GitlabIntegrationType: ["Gitlab"], + GlobalVariableJsonPatchType: ["global_variables_json_patch"], + GlobalVariableType: ["global_variables"], GreyNoiseAPIKeyType: ["GreyNoiseAPIKey"], GreyNoiseIntegrationType: ["GreyNoise"], HTTPIntegrationType: ["HTTP"], @@ -3357,6 +3372,7 @@ const enumsMap: { [key: string]: any[] } = { IssuesSearchRequestDataAttributesTrack: ["trace", "logs", "rum"], IssuesSearchRequestDataType: ["search_request"], IssuesSearchResultType: ["error_tracking_search_result"], + JsonPatchOperationOp: ["add", "remove", "replace", "move", "copy", "test"], LaunchDarklyAPIKeyType: ["LaunchDarklyAPIKey"], LaunchDarklyIntegrationType: ["LaunchDarkly"], LayerRelationshipsMembersDataItemsType: ["members"], @@ -4106,6 +4122,13 @@ const enumsMap: { [key: string]: any[] } = { StateVariableType: ["stateVariable"], StatsigAPIKeyType: ["StatsigAPIKey"], StatsigIntegrationType: ["Statsig"], + SyntheticsGlobalVariableParseTestOptionsType: [ + "http_body", + "http_header", + "http_status_code", + "local_variable", + ], + SyntheticsGlobalVariableParserType: ["raw", "json_path", "regex", "x_path"], TableResultV2DataAttributesFileMetadataCloudStorageErrorType: [ "TABLE_SCHEMA_ERROR", "FILE_FORMAT_ERROR", @@ -5573,6 +5596,12 @@ const typeMap: { [index: string]: any } = { GitlabAPIKeyUpdate: GitlabAPIKeyUpdate, GitlabIntegration: GitlabIntegration, GitlabIntegrationUpdate: GitlabIntegrationUpdate, + GlobalVariableData: GlobalVariableData, + GlobalVariableJsonPatchRequest: GlobalVariableJsonPatchRequest, + GlobalVariableJsonPatchRequestData: GlobalVariableJsonPatchRequestData, + GlobalVariableJsonPatchRequestDataAttributes: + GlobalVariableJsonPatchRequestDataAttributes, + GlobalVariableResponse: GlobalVariableResponse, GoogleMeetConfigurationReference: GoogleMeetConfigurationReference, GoogleMeetConfigurationReferenceData: GoogleMeetConfigurationReferenceData, GreyNoiseAPIKey: GreyNoiseAPIKey, @@ -5821,6 +5850,7 @@ const typeMap: { [index: string]: any } = { JobCreateResponseData: JobCreateResponseData, JobDefinition: JobDefinition, JobDefinitionFromRule: JobDefinitionFromRule, + JsonPatchOperation: JsonPatchOperation, KindAttributes: KindAttributes, KindData: KindData, KindMetadata: KindMetadata, @@ -7153,6 +7183,15 @@ const typeMap: { [index: string]: any } = { Step: Step, StepDisplay: StepDisplay, StepDisplayBounds: StepDisplayBounds, + SyntheticsGlobalVariable: SyntheticsGlobalVariable, + SyntheticsGlobalVariableAttributes: SyntheticsGlobalVariableAttributes, + SyntheticsGlobalVariableOptions: SyntheticsGlobalVariableOptions, + SyntheticsGlobalVariableParseTestOptions: + SyntheticsGlobalVariableParseTestOptions, + SyntheticsGlobalVariableTOTPParameters: + SyntheticsGlobalVariableTOTPParameters, + SyntheticsGlobalVariableValue: SyntheticsGlobalVariableValue, + SyntheticsVariableParser: SyntheticsVariableParser, TableResultV2: TableResultV2, TableResultV2Array: TableResultV2Array, TableResultV2Data: TableResultV2Data, diff --git a/packages/datadog-api-client-v2/models/SyntheticsGlobalVariable.ts b/packages/datadog-api-client-v2/models/SyntheticsGlobalVariable.ts new file mode 100644 index 000000000000..5eece2108626 --- /dev/null +++ b/packages/datadog-api-client-v2/models/SyntheticsGlobalVariable.ts @@ -0,0 +1,131 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { SyntheticsGlobalVariableAttributes } from "./SyntheticsGlobalVariableAttributes"; +import { SyntheticsGlobalVariableParseTestOptions } from "./SyntheticsGlobalVariableParseTestOptions"; +import { SyntheticsGlobalVariableValue } from "./SyntheticsGlobalVariableValue"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Synthetic global variable. + */ +export class SyntheticsGlobalVariable { + /** + * Attributes of the global variable. + */ + "attributes"?: SyntheticsGlobalVariableAttributes; + /** + * Description of the global variable. + */ + "description": string; + /** + * Unique identifier of the global variable. + */ + "id"?: string; + /** + * Determines if the global variable is a FIDO variable. + */ + "isFido"?: boolean; + /** + * Determines if the global variable is a TOTP/MFA variable. + */ + "isTotp"?: boolean; + /** + * Name of the global variable. Unique across Synthetic global variables. + */ + "name": string; + /** + * Parser options to use for retrieving a Synthetic global variable from a Synthetic test. Used in conjunction with `parse_test_public_id`. + */ + "parseTestOptions"?: SyntheticsGlobalVariableParseTestOptions; + /** + * A Synthetic test ID to use as a test to generate the variable value. + */ + "parseTestPublicId"?: string; + /** + * Tags of the global variable. + */ + "tags": Array; + /** + * Value of the global variable. + */ + "value": SyntheticsGlobalVariableValue; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "SyntheticsGlobalVariableAttributes", + }, + description: { + baseName: "description", + type: "string", + required: true, + }, + id: { + baseName: "id", + type: "string", + }, + isFido: { + baseName: "is_fido", + type: "boolean", + }, + isTotp: { + baseName: "is_totp", + type: "boolean", + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + parseTestOptions: { + baseName: "parse_test_options", + type: "SyntheticsGlobalVariableParseTestOptions", + }, + parseTestPublicId: { + baseName: "parse_test_public_id", + type: "string", + }, + tags: { + baseName: "tags", + type: "Array", + required: true, + }, + value: { + baseName: "value", + type: "SyntheticsGlobalVariableValue", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return SyntheticsGlobalVariable.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/SyntheticsGlobalVariableAttributes.ts b/packages/datadog-api-client-v2/models/SyntheticsGlobalVariableAttributes.ts new file mode 100644 index 000000000000..e671f5e04b65 --- /dev/null +++ b/packages/datadog-api-client-v2/models/SyntheticsGlobalVariableAttributes.ts @@ -0,0 +1,52 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of the global variable. + */ +export class SyntheticsGlobalVariableAttributes { + /** + * A list of role identifiers that can be pulled from the Roles API, for restricting read and write access. + */ + "restrictedRoles"?: Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + restrictedRoles: { + baseName: "restricted_roles", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return SyntheticsGlobalVariableAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/SyntheticsGlobalVariableOptions.ts b/packages/datadog-api-client-v2/models/SyntheticsGlobalVariableOptions.ts new file mode 100644 index 000000000000..08274c069c4e --- /dev/null +++ b/packages/datadog-api-client-v2/models/SyntheticsGlobalVariableOptions.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { SyntheticsGlobalVariableTOTPParameters } from "./SyntheticsGlobalVariableTOTPParameters"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Options for the Global Variable for MFA. + */ +export class SyntheticsGlobalVariableOptions { + /** + * Parameters for the TOTP/MFA variable + */ + "totpParameters"?: SyntheticsGlobalVariableTOTPParameters; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + totpParameters: { + baseName: "totp_parameters", + type: "SyntheticsGlobalVariableTOTPParameters", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return SyntheticsGlobalVariableOptions.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/SyntheticsGlobalVariableParseTestOptions.ts b/packages/datadog-api-client-v2/models/SyntheticsGlobalVariableParseTestOptions.ts new file mode 100644 index 000000000000..7393b5045c57 --- /dev/null +++ b/packages/datadog-api-client-v2/models/SyntheticsGlobalVariableParseTestOptions.ts @@ -0,0 +1,79 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { SyntheticsGlobalVariableParseTestOptionsType } from "./SyntheticsGlobalVariableParseTestOptionsType"; +import { SyntheticsVariableParser } from "./SyntheticsVariableParser"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Parser options to use for retrieving a Synthetic global variable from a Synthetic test. Used in conjunction with `parse_test_public_id`. + */ +export class SyntheticsGlobalVariableParseTestOptions { + /** + * When type is `http_header`, name of the header to use to extract the value. + */ + "field"?: string; + /** + * When type is `local_variable`, name of the local variable to use to extract the value. + */ + "localVariableName"?: string; + /** + * Details of the parser to use for the global variable. + */ + "parser"?: SyntheticsVariableParser; + /** + * Type of value to extract from a test for a Synthetic global variable. + */ + "type": SyntheticsGlobalVariableParseTestOptionsType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + field: { + baseName: "field", + type: "string", + }, + localVariableName: { + baseName: "localVariableName", + type: "string", + }, + parser: { + baseName: "parser", + type: "SyntheticsVariableParser", + }, + type: { + baseName: "type", + type: "SyntheticsGlobalVariableParseTestOptionsType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return SyntheticsGlobalVariableParseTestOptions.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/SyntheticsGlobalVariableParseTestOptionsType.ts b/packages/datadog-api-client-v2/models/SyntheticsGlobalVariableParseTestOptionsType.ts new file mode 100644 index 000000000000..fb58ae86750d --- /dev/null +++ b/packages/datadog-api-client-v2/models/SyntheticsGlobalVariableParseTestOptionsType.ts @@ -0,0 +1,22 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Type of value to extract from a test for a Synthetic global variable. + */ + +export type SyntheticsGlobalVariableParseTestOptionsType = + | typeof HTTP_BODY + | typeof HTTP_HEADER + | typeof HTTP_STATUS_CODE + | typeof LOCAL_VARIABLE + | UnparsedObject; +export const HTTP_BODY = "http_body"; +export const HTTP_HEADER = "http_header"; +export const HTTP_STATUS_CODE = "http_status_code"; +export const LOCAL_VARIABLE = "local_variable"; diff --git a/packages/datadog-api-client-v2/models/SyntheticsGlobalVariableParserType.ts b/packages/datadog-api-client-v2/models/SyntheticsGlobalVariableParserType.ts new file mode 100644 index 000000000000..be86ddcad0bf --- /dev/null +++ b/packages/datadog-api-client-v2/models/SyntheticsGlobalVariableParserType.ts @@ -0,0 +1,22 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Type of parser for a Synthetic global variable from a synthetics test. + */ + +export type SyntheticsGlobalVariableParserType = + | typeof RAW + | typeof JSON_PATH + | typeof REGEX + | typeof X_PATH + | UnparsedObject; +export const RAW = "raw"; +export const JSON_PATH = "json_path"; +export const REGEX = "regex"; +export const X_PATH = "x_path"; diff --git a/packages/datadog-api-client-v2/models/SyntheticsGlobalVariableTOTPParameters.ts b/packages/datadog-api-client-v2/models/SyntheticsGlobalVariableTOTPParameters.ts new file mode 100644 index 000000000000..5c2cfbb9979c --- /dev/null +++ b/packages/datadog-api-client-v2/models/SyntheticsGlobalVariableTOTPParameters.ts @@ -0,0 +1,62 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Parameters for the TOTP/MFA variable + */ +export class SyntheticsGlobalVariableTOTPParameters { + /** + * Number of digits for the OTP code. + */ + "digits"?: number; + /** + * Interval for which to refresh the token (in seconds). + */ + "refreshInterval"?: number; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + digits: { + baseName: "digits", + type: "number", + format: "int32", + }, + refreshInterval: { + baseName: "refresh_interval", + type: "number", + format: "int32", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return SyntheticsGlobalVariableTOTPParameters.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/SyntheticsGlobalVariableValue.ts b/packages/datadog-api-client-v2/models/SyntheticsGlobalVariableValue.ts new file mode 100644 index 000000000000..4d44435dacb4 --- /dev/null +++ b/packages/datadog-api-client-v2/models/SyntheticsGlobalVariableValue.ts @@ -0,0 +1,70 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { SyntheticsGlobalVariableOptions } from "./SyntheticsGlobalVariableOptions"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Value of the global variable. + */ +export class SyntheticsGlobalVariableValue { + /** + * Options for the Global Variable for MFA. + */ + "options"?: SyntheticsGlobalVariableOptions; + /** + * Determines if the value of the variable is hidden. + */ + "secure"?: boolean; + /** + * Value of the global variable. When reading a global variable, + * the value will not be present if the variable is hidden with the `secure` property. + */ + "value"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + options: { + baseName: "options", + type: "SyntheticsGlobalVariableOptions", + }, + secure: { + baseName: "secure", + type: "boolean", + }, + value: { + baseName: "value", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return SyntheticsGlobalVariableValue.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/SyntheticsVariableParser.ts b/packages/datadog-api-client-v2/models/SyntheticsVariableParser.ts new file mode 100644 index 000000000000..ade03b99f55f --- /dev/null +++ b/packages/datadog-api-client-v2/models/SyntheticsVariableParser.ts @@ -0,0 +1,62 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { SyntheticsGlobalVariableParserType } from "./SyntheticsGlobalVariableParserType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Details of the parser to use for the global variable. + */ +export class SyntheticsVariableParser { + /** + * Type of parser for a Synthetic global variable from a synthetics test. + */ + "type": SyntheticsGlobalVariableParserType; + /** + * Regex or JSON path used for the parser. Not used with type `raw`. + */ + "value"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + type: { + baseName: "type", + type: "SyntheticsGlobalVariableParserType", + required: true, + }, + value: { + baseName: "value", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return SyntheticsVariableParser.attributeTypeMap; + } + + public constructor() {} +}