diff --git a/.apigentools-info b/.apigentools-info index e1659d30071c..a80e32a968f1 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-05-14 15:44:19.067688", - "spec_repo_commit": "64f5e7ee" + "regenerated": "2025-05-14 18:18:46.632078", + "spec_repo_commit": "9d44adf0" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-05-14 15:44:19.084378", - "spec_repo_commit": "64f5e7ee" + "regenerated": "2025-05-14 18:18:46.648216", + "spec_repo_commit": "9d44adf0" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index bfe39072ee55..fcabb1e48d07 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -14221,8 +14221,8 @@ components: operator: $ref: '#/components/schemas/SyntheticsAssertionBodyHashOperator' target: + $ref: '#/components/schemas/SyntheticsAssertionTargetValue' description: Value used by the operator. - example: 123456 type: $ref: '#/components/schemas/SyntheticsAssertionBodyHashType' required: @@ -14278,6 +14278,7 @@ components: description: The specific operator to use on the path. type: string targetValue: + $ref: '#/components/schemas/SyntheticsAssertionTargetValue' description: The path target value to compare to. type: object SyntheticsAssertionJSONSchemaMetaSchema: @@ -14385,8 +14386,8 @@ components: description: The associated assertion property. type: string target: + $ref: '#/components/schemas/SyntheticsAssertionTargetValue' description: Value used by the operator. - example: 123456 timingsScope: $ref: '#/components/schemas/SyntheticsAssertionTimingsScope' type: @@ -14396,6 +14397,19 @@ components: - operator - target type: object + SyntheticsAssertionTargetValue: + description: Value used by the operator in assertions. Can be either a number + or string. + oneOf: + - $ref: '#/components/schemas/SyntheticsAssertionTargetValueNumber' + - $ref: '#/components/schemas/SyntheticsAssertionTargetValueString' + SyntheticsAssertionTargetValueNumber: + description: Numeric value used by the operator in assertions. + format: int64 + type: integer + SyntheticsAssertionTargetValueString: + description: String value used by the operator in assertions. + type: string SyntheticsAssertionTimingsScope: description: Timings scope for response time assertions. enum: @@ -14480,6 +14494,7 @@ components: description: The specific operator to use on the path. type: string targetValue: + $ref: '#/components/schemas/SyntheticsAssertionTargetValue' description: The path target value to compare to. xPath: description: The X path to assert. diff --git a/packages/datadog-api-client-v1/index.ts b/packages/datadog-api-client-v1/index.ts index 1ea249f433c7..352991e8967e 100644 --- a/packages/datadog-api-client-v1/index.ts +++ b/packages/datadog-api-client-v1/index.ts @@ -901,6 +901,7 @@ export { SyntheticsAssertionJSONSchemaTarget } from "./models/SyntheticsAssertio export { SyntheticsAssertionJSONSchemaTargetTarget } from "./models/SyntheticsAssertionJSONSchemaTargetTarget"; export { SyntheticsAssertionOperator } from "./models/SyntheticsAssertionOperator"; export { SyntheticsAssertionTarget } from "./models/SyntheticsAssertionTarget"; +export { SyntheticsAssertionTargetValue } from "./models/SyntheticsAssertionTargetValue"; export { SyntheticsAssertionTimingsScope } from "./models/SyntheticsAssertionTimingsScope"; export { SyntheticsAssertionType } from "./models/SyntheticsAssertionType"; export { SyntheticsAssertionXPathOperator } from "./models/SyntheticsAssertionXPathOperator"; diff --git a/packages/datadog-api-client-v1/models/ObjectSerializer.ts b/packages/datadog-api-client-v1/models/ObjectSerializer.ts index 6fb53470f770..2999494d8f3b 100644 --- a/packages/datadog-api-client-v1/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v1/models/ObjectSerializer.ts @@ -2450,6 +2450,7 @@ const oneOfMap: { [index: string]: string[] } = { "SyntheticsAssertionXPathTarget", "SyntheticsAssertionJavascript", ], + SyntheticsAssertionTargetValue: ["number", "string"], SyntheticsBasicAuth: [ "SyntheticsBasicAuthWeb", "SyntheticsBasicAuthSigv4", diff --git a/packages/datadog-api-client-v1/models/SyntheticsAssertionBodyHashTarget.ts b/packages/datadog-api-client-v1/models/SyntheticsAssertionBodyHashTarget.ts index 82d124169e4b..cbac2c174ec9 100644 --- a/packages/datadog-api-client-v1/models/SyntheticsAssertionBodyHashTarget.ts +++ b/packages/datadog-api-client-v1/models/SyntheticsAssertionBodyHashTarget.ts @@ -5,6 +5,7 @@ */ import { SyntheticsAssertionBodyHashOperator } from "./SyntheticsAssertionBodyHashOperator"; import { SyntheticsAssertionBodyHashType } from "./SyntheticsAssertionBodyHashType"; +import { SyntheticsAssertionTargetValue } from "./SyntheticsAssertionTargetValue"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; @@ -17,9 +18,9 @@ export class SyntheticsAssertionBodyHashTarget { */ "operator": SyntheticsAssertionBodyHashOperator; /** - * Value used by the operator. + * Value used by the operator in assertions. Can be either a number or string. */ - "target": any; + "target": SyntheticsAssertionTargetValue; /** * Type of the assertion. */ @@ -48,7 +49,7 @@ export class SyntheticsAssertionBodyHashTarget { }, target: { baseName: "target", - type: "any", + type: "SyntheticsAssertionTargetValue", required: true, }, type: { diff --git a/packages/datadog-api-client-v1/models/SyntheticsAssertionJSONPathTargetTarget.ts b/packages/datadog-api-client-v1/models/SyntheticsAssertionJSONPathTargetTarget.ts index 34877f61afc6..a2a3bbd52846 100644 --- a/packages/datadog-api-client-v1/models/SyntheticsAssertionJSONPathTargetTarget.ts +++ b/packages/datadog-api-client-v1/models/SyntheticsAssertionJSONPathTargetTarget.ts @@ -3,6 +3,7 @@ * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2020-Present Datadog, Inc. */ +import { SyntheticsAssertionTargetValue } from "./SyntheticsAssertionTargetValue"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; @@ -23,9 +24,9 @@ export class SyntheticsAssertionJSONPathTargetTarget { */ "operator"?: string; /** - * The path target value to compare to. + * Value used by the operator in assertions. Can be either a number or string. */ - "targetValue"?: any; + "targetValue"?: SyntheticsAssertionTargetValue; /** * A container for additional, undeclared properties. @@ -57,7 +58,7 @@ export class SyntheticsAssertionJSONPathTargetTarget { }, targetValue: { baseName: "targetValue", - type: "any", + type: "SyntheticsAssertionTargetValue", }, additionalProperties: { baseName: "additionalProperties", diff --git a/packages/datadog-api-client-v1/models/SyntheticsAssertionTarget.ts b/packages/datadog-api-client-v1/models/SyntheticsAssertionTarget.ts index 8aba8e635a68..fadf85eb32dd 100644 --- a/packages/datadog-api-client-v1/models/SyntheticsAssertionTarget.ts +++ b/packages/datadog-api-client-v1/models/SyntheticsAssertionTarget.ts @@ -4,6 +4,7 @@ * Copyright 2020-Present Datadog, Inc. */ import { SyntheticsAssertionOperator } from "./SyntheticsAssertionOperator"; +import { SyntheticsAssertionTargetValue } from "./SyntheticsAssertionTargetValue"; import { SyntheticsAssertionTimingsScope } from "./SyntheticsAssertionTimingsScope"; import { SyntheticsAssertionType } from "./SyntheticsAssertionType"; @@ -22,9 +23,9 @@ export class SyntheticsAssertionTarget { */ "property"?: string; /** - * Value used by the operator. + * Value used by the operator in assertions. Can be either a number or string. */ - "target": any; + "target": SyntheticsAssertionTargetValue; /** * Timings scope for response time assertions. */ @@ -61,7 +62,7 @@ export class SyntheticsAssertionTarget { }, target: { baseName: "target", - type: "any", + type: "SyntheticsAssertionTargetValue", required: true, }, timingsScope: { diff --git a/packages/datadog-api-client-v1/models/SyntheticsAssertionTargetValue.ts b/packages/datadog-api-client-v1/models/SyntheticsAssertionTargetValue.ts new file mode 100644 index 000000000000..ce77b6d1276c --- /dev/null +++ b/packages/datadog-api-client-v1/models/SyntheticsAssertionTargetValue.ts @@ -0,0 +1,13 @@ +/** + * 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"; + +/** + * Value used by the operator in assertions. Can be either a number or string. + */ + +export type SyntheticsAssertionTargetValue = number | string | UnparsedObject; diff --git a/packages/datadog-api-client-v1/models/SyntheticsAssertionXPathTargetTarget.ts b/packages/datadog-api-client-v1/models/SyntheticsAssertionXPathTargetTarget.ts index 5464389eeed9..102ccacccdc0 100644 --- a/packages/datadog-api-client-v1/models/SyntheticsAssertionXPathTargetTarget.ts +++ b/packages/datadog-api-client-v1/models/SyntheticsAssertionXPathTargetTarget.ts @@ -3,6 +3,7 @@ * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2020-Present Datadog, Inc. */ +import { SyntheticsAssertionTargetValue } from "./SyntheticsAssertionTargetValue"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; @@ -15,9 +16,9 @@ export class SyntheticsAssertionXPathTargetTarget { */ "operator"?: string; /** - * The path target value to compare to. + * Value used by the operator in assertions. Can be either a number or string. */ - "targetValue"?: any; + "targetValue"?: SyntheticsAssertionTargetValue; /** * The X path to assert. */ @@ -45,7 +46,7 @@ export class SyntheticsAssertionXPathTargetTarget { }, targetValue: { baseName: "targetValue", - type: "any", + type: "SyntheticsAssertionTargetValue", }, xPath: { baseName: "xPath",