From 24939670547bc2772da45b2e18bdd35720683f2a Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 8 Sep 2026 17:08:11 +0000 Subject: [PATCH] Regenerate client from commit 1cd323e of spec repo --- .generator/schemas/v2/openapi.yaml | 783 ++++++++++++++++++ .../timeseries_anomaly_investigations.feature | 32 + features/v2/undo.json | 6 + packages/datadog-api-client/README.md | 1 + .../src/support/scenarios_model_mapping.ts | 8 + .../.yarnrc.yml | 1 + .../README.md | 44 + .../package.json | 43 + .../src/index.ts | 3 + .../v2/TimeseriesAnomalyInvestigationsApi.ts | 248 ++++++ .../src/v2/index.ts | 47 ++ .../src/v2/models/APIErrorResponse.ts | 45 + .../src/v2/models/JSONAPIErrorItem.ts | 78 ++ .../src/v2/models/JSONAPIErrorItemSource.ts | 60 ++ .../src/v2/models/JSONAPIErrorResponse.ts | 47 ++ .../TimeseriesAnomalyInvestigationAnomaly.ts | 116 +++ ...eriesAnomalyInvestigationAnomalyFinding.ts | 65 ++ ...sAnomalyInvestigationAnomalyFindingType.ts | 9 + ...meseriesAnomalyInvestigationAnomalyType.ts | 11 + ...eriesAnomalyInvestigationCompleteStatus.ts | 9 + ...AnomalyInvestigationConfigurationSource.ts | 11 + ...imeseriesAnomalyInvestigationDataSource.ts | 9 + ...TimeseriesAnomalyInvestigationDetection.ts | 56 ++ .../TimeseriesAnomalyInvestigationFinding.ts | 12 + ...eriesAnomalyInvestigationFindingSynonym.ts | 54 ++ ...imeseriesAnomalyInvestigationFindingTag.ts | 85 ++ .../TimeseriesAnomalyInvestigationFormula.ts | 55 ++ ...eseriesAnomalyInvestigationFormulaLimit.ts | 55 ++ ...esAnomalyInvestigationFormulaLimitOrder.ts | 11 + ...seriesAnomalyInvestigationInfluenceType.ts | 11 + ...omalyInvestigationInfluentialTagFinding.ts | 75 ++ ...yInvestigationInfluentialTagFindingType.ts | 9 + .../TimeseriesAnomalyInvestigationInterval.ts | 56 ++ ...iesAnomalyInvestigationMaximumDeviation.ts | 66 ++ .../TimeseriesAnomalyInvestigationMetaType.ts | 10 + ...meseriesAnomalyInvestigationMetricQuery.ts | 81 ++ ...nomalyInvestigationQueryExecutionStatus.ts | 11 + ...meseriesAnomalyInvestigationQueryStatus.ts | 56 ++ .../TimeseriesAnomalyInvestigationRequest.ts | 47 ++ ...esAnomalyInvestigationRequestAttributes.ts | 47 ++ ...meseriesAnomalyInvestigationRequestData.ts | 57 ++ .../TimeseriesAnomalyInvestigationResponse.ts | 57 ++ ...sAnomalyInvestigationResponseAttributes.ts | 47 ++ ...eseriesAnomalyInvestigationResponseData.ts | 67 ++ ...imeseriesAnomalyInvestigationResponseID.ts | 9 + ...eseriesAnomalyInvestigationResponseMeta.ts | 97 +++ .../TimeseriesAnomalyInvestigationResult.ts | 57 ++ ...eriesAnomalyInvestigationResultsWarning.ts | 54 ++ .../TimeseriesAnomalyInvestigationSeries.ts | 64 ++ ...meseriesAnomalyInvestigationTagAnalysis.ts | 73 ++ ...esAnomalyInvestigationTagAnalysisStatus.ts | 13 + ...esAnomalyInvestigationTimeseriesRequest.ts | 86 ++ .../TimeseriesAnomalyInvestigationType.ts | 10 + .../src/v2/models/TypingInfo.ts | 117 +++ .../tsconfig.json | 28 + yarn.lock | 9 + 56 files changed, 3318 insertions(+) create mode 100644 features/v2/timeseries_anomaly_investigations.feature create mode 100644 services/timeseries_anomaly_investigations/.yarnrc.yml create mode 100644 services/timeseries_anomaly_investigations/README.md create mode 100644 services/timeseries_anomaly_investigations/package.json create mode 100644 services/timeseries_anomaly_investigations/src/index.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/TimeseriesAnomalyInvestigationsApi.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/index.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/APIErrorResponse.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/JSONAPIErrorItem.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/JSONAPIErrorItemSource.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/JSONAPIErrorResponse.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationAnomaly.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationAnomalyFinding.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationAnomalyFindingType.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationAnomalyType.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationCompleteStatus.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationConfigurationSource.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationDataSource.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationDetection.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationFinding.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationFindingSynonym.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationFindingTag.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationFormula.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationFormulaLimit.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationFormulaLimitOrder.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationInfluenceType.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationInfluentialTagFinding.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationInfluentialTagFindingType.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationInterval.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationMaximumDeviation.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationMetaType.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationMetricQuery.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationQueryExecutionStatus.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationQueryStatus.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationRequest.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationRequestAttributes.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationRequestData.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationResponse.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationResponseAttributes.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationResponseData.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationResponseID.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationResponseMeta.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationResult.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationResultsWarning.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationSeries.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationTagAnalysis.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationTagAnalysisStatus.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationTimeseriesRequest.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationType.ts create mode 100644 services/timeseries_anomaly_investigations/src/v2/models/TypingInfo.ts create mode 100644 services/timeseries_anomaly_investigations/tsconfig.json diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 0cbaf7439c53..d17e8422b8ae 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -120348,6 +120348,646 @@ components: $ref: '#/components/schemas/TimelineCellResource' type: array type: object + TimeseriesAnomalyInvestigationAnomaly: + description: Most significant anomaly detected in the request. + properties: + anomaly_detection: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationDetection' + detected_interval: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationInterval' + display_interval: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationInterval' + findings: + description: Deterministic explanations for the anomaly, ordered by importance. + example: [] + items: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationFinding' + maxItems: 3 + type: array + maximum_deviation: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationMaximumDeviation' + series: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationSeries' + tag_analysis: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationTagAnalysis' + type: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationAnomalyType' + required: + - series + - anomaly_detection + - detected_interval + - display_interval + - type + - maximum_deviation + - tag_analysis + - findings + type: object + TimeseriesAnomalyInvestigationAnomalyFinding: + description: Finding that describes the anomaly when completed analysis produces no displayable influential tags. + properties: + description: + description: Deterministic explanation of the finding. + example: "The service:api series rose outside its expected range." + type: string + headline: + description: Concise, deterministic finding title. + example: "An anomaly was detected on service:api" + type: string + type: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationAnomalyFindingType' + required: + - type + - headline + - description + type: object + TimeseriesAnomalyInvestigationAnomalyFindingType: + description: Finding category for an anomaly without a displayable influential tag. + enum: + - anomaly + example: anomaly + type: string + x-enum-varnames: + - ANOMALY + TimeseriesAnomalyInvestigationAnomalyType: + description: Direction of an anomaly relative to its expected range. + enum: + - spike + - dip + example: spike + type: string + x-enum-varnames: + - SPIKE + - DIP + TimeseriesAnomalyInvestigationCompleteStatus: + description: Status value indicating successful completion. + enum: + - complete + example: complete + type: string + x-enum-varnames: + - COMPLETE + TimeseriesAnomalyInvestigationConfigurationSource: + description: Source of the anomaly detection configuration. + enum: + - request_formula + - watchdog_explains_default + example: request_formula + type: string + x-enum-varnames: + - REQUEST_FORMULA + - WATCHDOG_EXPLAINS_DEFAULT + TimeseriesAnomalyInvestigationDataSource: + description: Data source for an anomaly investigation query. + enum: + - metrics + example: metrics + type: string + x-enum-varnames: + - METRICS + TimeseriesAnomalyInvestigationDetection: + description: Anomaly detection configuration used for the result. + properties: + configuration_source: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationConfigurationSource' + profile: + description: Applied Watchdog Explains profile, or null when the request supplied an explicit `anomalies()` formula. The current Watchdog profile is `watchdog_explains_v1`. + example: + nullable: true + type: string + required: + - configuration_source + - profile + type: object + TimeseriesAnomalyInvestigationFinding: + description: Deterministic explanation for a detected anomaly. + oneOf: + - $ref: '#/components/schemas/TimeseriesAnomalyInvestigationInfluentialTagFinding' + - $ref: '#/components/schemas/TimeseriesAnomalyInvestigationAnomalyFinding' + TimeseriesAnomalyInvestigationFindingSynonym: + description: Tag grouped under an influential tag by synonym analysis. + properties: + key: + description: Synonymous tag key. + example: app + type: string + values: + description: Values associated with the synonymous tag. + example: + - api + items: + description: Synonymous tag value. + example: api + type: string + type: array + required: + - key + - values + type: object + TimeseriesAnomalyInvestigationFindingTag: + description: Structured tag evidence for an influential-tag finding. + properties: + influence_type: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationInfluenceType' + key: + description: Influential tag key. + example: service + type: string + rating: + description: Influence rating from 1 through 5. + example: 5.0 + format: double + maximum: 5 + minimum: 1 + type: number + synonyms: + description: Tags grouped with this tag by Variation of Influence synonym analysis. + example: [] + items: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationFindingSynonym' + type: array + values: + description: Influential values for the tag key. + example: + - api + items: + description: Influential tag value. + example: api + type: string + type: array + required: + - key + - values + - influence_type + - rating + - synonyms + type: object + TimeseriesAnomalyInvestigationFormula: + description: Formula evaluated by the timeseries request. + properties: + formula: + description: Formula expression referencing one or more named queries. + example: "anomalies(query1, 'agile', 3)" + minLength: 1 + type: string + limit: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationFormulaLimit' + required: + - formula + type: object + TimeseriesAnomalyInvestigationFormulaLimit: + description: Optional formula limit accepted for compatibility with Timeseries API requests. Formula limits have no effect on timeseries queries. + properties: + count: + description: Requested result limit. This field has no effect on a timeseries anomaly investigation. + example: 10 + format: int64 + minimum: 0 + type: integer + order: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationFormulaLimitOrder' + type: object + TimeseriesAnomalyInvestigationFormulaLimitOrder: + description: Sort order used when applying a formula series limit. + enum: + - asc + - desc + example: desc + type: string + x-enum-varnames: + - ASC + - DESC + TimeseriesAnomalyInvestigationInfluenceType: + description: Kind of influence a tag has on a series. + enum: + - shape + - value + example: shape + type: string + x-enum-varnames: + - SHAPE + - VALUE + TimeseriesAnomalyInvestigationInfluentialTagFinding: + description: Finding that attributes an anomaly to an influential tag. + properties: + description: + description: Deterministic explanation of the finding. + example: "Filtering out service:api flattens the spike." + type: string + headline: + description: Concise, deterministic finding title. + example: "service:api is the likely cause" + type: string + tag: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationFindingTag' + type: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationInfluentialTagFindingType' + required: + - type + - headline + - description + - tag + type: object + TimeseriesAnomalyInvestigationInfluentialTagFindingType: + description: Finding category for an influential tag. + enum: + - influential_tag + example: influential_tag + type: string + x-enum-varnames: + - INFLUENTIAL_TAG + TimeseriesAnomalyInvestigationInterval: + description: Inclusive time interval in milliseconds since the Unix epoch. + properties: + end: + description: Timestamp of the final point in the interval. + example: 1754406120000 + format: int64 + type: integer + start: + description: Inclusive start of the interval. + example: 1754406060000 + format: int64 + type: integer + required: + - start + - end + type: object + TimeseriesAnomalyInvestigationMaximumDeviation: + description: Most anomalous point within the detected interval. + properties: + delta_from_boundary: + description: Absolute distance between the observed value and the nearest anomaly boundary. + example: 7.0 + format: double + minimum: 0 + type: number + timestamp: + description: Point timestamp in milliseconds since the Unix epoch. + example: 1754406090000 + format: int64 + type: integer + value: + description: Observed value at the point. + example: 42.0 + format: double + type: number + required: + - timestamp + - value + - delta_from_boundary + type: object + TimeseriesAnomalyInvestigationMetaType: + description: Response metadata type for a timeseries anomaly investigation. + enum: + - timeseries_anomaly_investigation + example: timeseries_anomaly_investigation + type: string + x-enum-varnames: + - TIMESERIES_ANOMALY_INVESTIGATION + TimeseriesAnomalyInvestigationMetricQuery: + description: Metrics query referenced by a formula. + properties: + aggregator: + description: Optional scalar aggregator accepted for request compatibility. This field is ignored for timeseries queries. + example: avg + type: string + cross_org_uuids: + description: Optional organization UUID used for a cross-organization query. Each query accepts at most one UUID; use separate queries for separate organizations. Influential-tag analysis is currently unsupported for cross-organization queries, but anomaly detection still runs. + example: + - "00000000-0000-0000-0000-000000000000" + items: + description: Organization UUID to query. + example: "00000000-0000-0000-0000-000000000000" + minLength: 1 + type: string + maxItems: 1 + type: array + data_source: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationDataSource' + name: + description: Name used to reference this query from formulas. + example: query1 + minLength: 1 + type: string + query: + description: Datadog metrics query expression. + example: "avg:system.cpu.user{env:prod} by {service}" + minLength: 1 + type: string + required: + - data_source + - name + - query + type: object + TimeseriesAnomalyInvestigationQueryExecutionStatus: + description: Current execution status for a named query. + enum: + - running + - done + example: done + type: string + x-enum-varnames: + - RUNNING + - DONE + TimeseriesAnomalyInvestigationQueryStatus: + description: Execution status for one named query. + properties: + name: + description: Query name from the request. + example: query1 + type: string + status: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationQueryExecutionStatus' + required: + - name + - status + type: object + TimeseriesAnomalyInvestigationRequest: + description: Request to investigate a metrics timeseries for anomalies. + properties: + data: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationRequestData' + required: + - data + type: object + TimeseriesAnomalyInvestigationRequestAttributes: + description: Attributes of an anomaly investigation request. + properties: + requests: + description: Timeseries requests to investigate. This API version accepts exactly one request. + example: + - formulas: + - formula: "anomalies(query1, 'agile', 3)" + from: 1754406000000 + queries: + - data_source: metrics + name: query1 + query: "avg:system.cpu.user{env:prod} by {service}" + to: 1754423940000 + items: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationTimeseriesRequest' + maxItems: 1 + minItems: 1 + type: array + required: + - requests + type: object + TimeseriesAnomalyInvestigationRequestData: + description: JSON:API resource containing an anomaly investigation request. + properties: + attributes: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationRequestAttributes' + type: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationType' + required: + - type + - attributes + type: object + TimeseriesAnomalyInvestigationResponse: + description: Response containing the anomaly investigation results and timeseries metadata. + properties: + data: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationResponseData' + meta: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationResponseMeta' + required: + - data + - meta + type: object + TimeseriesAnomalyInvestigationResponseAttributes: + description: Attributes of an anomaly investigation response. + properties: + results: + description: Results returned in the same order as the submitted requests. This API version returns exactly one result. + example: + - anomalies: [] + status: complete + items: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationResult' + maxItems: 1 + minItems: 1 + type: array + required: + - results + type: object + TimeseriesAnomalyInvestigationResponseData: + description: JSON:API resource containing anomaly investigation results. + properties: + attributes: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationResponseAttributes' + id: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationResponseID' + type: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationType' + required: + - id + - type + - attributes + type: object + TimeseriesAnomalyInvestigationResponseID: + description: Stable identifier for an anomaly investigation response resource. + enum: + - "0" + example: "0" + type: string + x-enum-varnames: + - ZERO + TimeseriesAnomalyInvestigationResponseMeta: + description: Timeseries execution metadata for the single request accepted by this API version. + properties: + from_date: + description: Effective start of the timeseries query in milliseconds since the Unix epoch. + example: 1754406000000 + format: int64 + type: integer + interval: + description: Effective timeseries interval in milliseconds. + example: 60000 + format: int64 + minimum: 1 + type: integer + queries: + description: Execution status for the request's queries. + example: + - name: query1 + status: done + items: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationQueryStatus' + type: array + res_type: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationMetaType' + results_warnings: + description: Non-fatal warnings produced while executing the investigation. + example: [] + items: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationResultsWarning' + type: array + to_date: + description: Effective end of the timeseries query in milliseconds since the Unix epoch. + example: 1754423940000 + format: int64 + type: integer + required: + - from_date + - to_date + - interval + - queries + - results_warnings + - res_type + type: object + TimeseriesAnomalyInvestigationResult: + description: Completed result for one timeseries request. The anomalies array is empty when no qualifying anomaly is found. + properties: + anomalies: + description: Detected anomalies. This API version returns at most one anomaly. + example: [] + items: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationAnomaly' + maxItems: 1 + type: array + status: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationCompleteStatus' + required: + - status + - anomalies + type: object + TimeseriesAnomalyInvestigationResultsWarning: + description: Non-fatal warning produced while executing the investigation. + properties: + message: + description: Human-readable warning message. + example: "Influential tag analysis failed for at least one detected anomaly." + type: string + name: + description: Machine-readable warning name. + example: tag_analysis_failed + type: string + required: + - name + - message + type: object + TimeseriesAnomalyInvestigationSeries: + description: Logical series on which the anomaly was detected. + properties: + group_tags: + description: Tags identifying the selected group. Empty for a query without grouping. + example: + - "service:api" + items: + description: Tag in `key:value` form. + example: "service:api" + type: string + type: array + label: + description: Display label for the selected series. + example: api + type: string + query_index: + description: Zero-based index of the caller's formula that produced the series. + example: 0 + format: int64 + minimum: 0 + type: integer + required: + - query_index + - group_tags + - label + type: object + TimeseriesAnomalyInvestigationTagAnalysis: + description: Summary of optional influential-tag enrichment. Count and key fields are present only when analysis completes; enrichment availability does not affect completion of the investigation result. + properties: + analyzed_tag_keys: + description: Tag keys analyzed. Present only when analysis completes. + example: + - service + - env + items: + description: Analyzed tag key. + example: service + type: string + type: array + status: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationTagAnalysisStatus' + tag_keys_analyzed: + description: Number of tag keys analyzed. Present only when analysis completes. + example: 2 + format: int64 + minimum: 0 + type: integer + tag_values_analyzed: + description: Number of tag values analyzed. Present only when analysis completes. + example: 4 + format: int64 + minimum: 0 + type: integer + required: + - status + type: object + TimeseriesAnomalyInvestigationTagAnalysisStatus: + description: Outcome of optional influential-tag enrichment. + enum: + - complete + - unsupported + - failed + example: complete + type: string + x-enum-varnames: + - COMPLETE + - UNSUPPORTED + - FAILED + TimeseriesAnomalyInvestigationTimeseriesRequest: + description: Metrics timeseries request to investigate. + properties: + formulas: + description: Formulas to evaluate. Each formula may contain an explicit `anomalies()` call or a supported metrics expression. + example: + - formula: "anomalies(query1, 'agile', 3)" + items: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationFormula' + minItems: 1 + type: array + from: + description: Start of the investigation time window in milliseconds since the Unix epoch. + example: 1754406000000 + format: int64 + minimum: 1 + type: integer + interval: + description: Optional requested aggregation interval in milliseconds. + example: 60000 + format: int64 + minimum: 1 + type: integer + queries: + description: Metrics queries referenced by the formulas. + example: + - data_source: metrics + name: query1 + query: "avg:system.cpu.user{env:prod} by {service}" + items: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationMetricQuery' + minItems: 1 + type: array + to: + description: End of the investigation time window in milliseconds since the Unix epoch. Must be later than `from`. + example: 1754423940000 + format: int64 + minimum: 1 + type: integer + required: + - formulas + - from + - to + - queries + type: object + TimeseriesAnomalyInvestigationType: + description: Resource type for a timeseries anomaly investigation. + enum: + - timeseries_anomaly_investigation + example: timeseries_anomaly_investigation + type: string + x-enum-varnames: + - TIMESERIES_ANOMALY_INVESTIGATION TimeseriesFormulaQueryRequest: description: A request wrapper around a single timeseries query to be executed. properties: @@ -221738,6 +222378,147 @@ paths: operator: OR permissions: - test_optimization_read + /api/v2/timeseries-anomaly-investigations: + post: + description: |- + Investigates a metrics timeseries request for its most significant anomaly and returns deterministic findings. + Metrics queries with or without grouping are supported. This API version accepts exactly one request and returns at most one anomaly. + operationId: CreateTimeseriesAnomalyInvestigation + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + requests: + - formulas: + - formula: "anomalies(query1, 'agile', 3)" + from: 1754406000000 + queries: + - data_source: metrics + name: query1 + query: "avg:system.cpu.user{env:prod} by {service}" + to: 1754423940000 + type: timeseries_anomaly_investigation + schema: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationRequest' + description: Metrics timeseries request to investigate. The request body must not exceed 2 MiB. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + results: + - anomalies: + - anomaly_detection: + configuration_source: request_formula + profile: + detected_interval: + end: 1754406120000 + start: 1754406060000 + display_interval: + end: 1754406150000 + start: 1754406030000 + findings: + - description: "Filtering out service:api flattens the spike." + headline: "service:api is the likely cause" + tag: + influence_type: shape + key: service + rating: 5.0 + synonyms: [] + values: + - api + type: influential_tag + maximum_deviation: + delta_from_boundary: 7.0 + timestamp: 1754406090000 + value: 42.0 + series: + group_tags: + - "service:api" + label: api + query_index: 0 + tag_analysis: + analyzed_tag_keys: + - service + - env + status: complete + tag_keys_analyzed: 2 + tag_values_analyzed: 4 + type: spike + status: complete + id: "0" + type: timeseries_anomaly_investigation + meta: + from_date: 1754406000000 + interval: 60000 + queries: + - name: query1 + status: done + res_type: timeseries_anomaly_investigation + results_warnings: [] + to_date: 1754423940000 + schema: + $ref: '#/components/schemas/TimeseriesAnomalyInvestigationResponse' + description: OK + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden + "413": + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Payload Too Large + "422": + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Unprocessable Entity + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - timeseries_query + - metrics_read + summary: Investigate a timeseries anomaly + tags: + - Timeseries Anomaly Investigations + x-codegen-request-body-name: body + x-permission: + operator: AND + permissions: + - timeseries_query + - metrics_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/trace/{trace_id}: get: description: |- @@ -226104,6 +226885,8 @@ tags: name: Test Optimization - description: Ingest and manage threat intelligence data for security enrichment and investigation. name: Threat Intelligence + - description: Investigate metrics timeseries anomalies and return deterministic findings. + name: Timeseries Anomaly Investigations - description: |- Manage your Datadog Twilio integration accounts directly through the Datadog API. Create, update, and delete accounts, configure authentication and settings, and diff --git a/features/v2/timeseries_anomaly_investigations.feature b/features/v2/timeseries_anomaly_investigations.feature new file mode 100644 index 000000000000..6803ddc44775 --- /dev/null +++ b/features/v2/timeseries_anomaly_investigations.feature @@ -0,0 +1,32 @@ +@endpoint(timeseries-anomaly-investigations) @endpoint(timeseries-anomaly-investigations-v2) +Feature: Timeseries Anomaly Investigations + Investigate metrics timeseries anomalies and return deterministic + findings. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "TimeseriesAnomalyInvestigations" API + And operation "CreateTimeseriesAnomalyInvestigation" enabled + And new "CreateTimeseriesAnomalyInvestigation" request + And body with value {"data": {"attributes": {"requests": [{"formulas": [{"formula": "anomalies(query1, 'agile', 3)"}], "from": 1754406000000, "queries": [{"data_source": "metrics", "name": "query1", "query": "avg:system.cpu.user{env:prod} by {service}"}], "to": 1754423940000}]}, "type": "timeseries_anomaly_investigation"}} + + @generated @skip @team:DataDog/dataviz-backend-maintainers + Scenario: Investigate a timeseries anomaly returns "Bad Request" response + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/dataviz-backend-maintainers + Scenario: Investigate a timeseries anomaly returns "OK" response + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/dataviz-backend-maintainers + Scenario: Investigate a timeseries anomaly returns "Payload Too Large" response + When the request is sent + Then the response status is 413 Payload Too Large + + @generated @skip @team:DataDog/dataviz-backend-maintainers + Scenario: Investigate a timeseries anomaly returns "Unprocessable Entity" response + When the request is sent + Then the response status is 422 Unprocessable Entity diff --git a/features/v2/undo.json b/features/v2/undo.json index a2d33ddd9441..22c02b5bcbd6 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -10259,6 +10259,12 @@ "type": "safe" } }, + "CreateTimeseriesAnomalyInvestigation": { + "tag": "Timeseries Anomaly Investigations", + "undo": { + "type": "safe" + } + }, "GetTraceByID": { "tag": "APM Trace", "undo": { diff --git a/packages/datadog-api-client/README.md b/packages/datadog-api-client/README.md index 7b0aef700fd1..90d8366f07d5 100644 --- a/packages/datadog-api-client/README.md +++ b/packages/datadog-api-client/README.md @@ -498,6 +498,7 @@ apiInstance | Teams | @datadog/datadog-api-client-teams | [README.md](../../services/teams/README.md) | | Test Optimization | @datadog/datadog-api-client-test-optimization | [README.md](../../services/test-optimization/README.md) | | Threat Intelligence | @datadog/datadog-api-client-threat-intelligence | [README.md](../../services/threat-intelligence/README.md) | +| Timeseries Anomaly Investigations | @datadog/datadog-api-client-timeseries-anomaly-investigations | [README.md](../../services/timeseries-anomaly-investigations/README.md) | | Twilio Integration Accounts | @datadog/datadog-api-client-twilio-integration-accounts | [README.md](../../services/twilio-integration-accounts/README.md) | | Usage Metering | @datadog/datadog-api-client-usage-metering | [README.md](../../services/usage-metering/README.md) | | User Authorized Clients | @datadog/datadog-api-client-user-authorized-clients | [README.md](../../services/user-authorized-clients/README.md) | diff --git a/private/bdd_runner/src/support/scenarios_model_mapping.ts b/private/bdd_runner/src/support/scenarios_model_mapping.ts index 744afba21f6c..4066c7be88bb 100644 --- a/private/bdd_runner/src/support/scenarios_model_mapping.ts +++ b/private/bdd_runner/src/support/scenarios_model_mapping.ts @@ -18864,6 +18864,14 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = { }, operationResponseType: "UserTeamsResponse", }, + "TimeseriesAnomalyInvestigationsApi.V2.CreateTimeseriesAnomalyInvestigation": + { + body: { + type: "TimeseriesAnomalyInvestigationRequest", + format: "", + }, + operationResponseType: "TimeseriesAnomalyInvestigationResponse", + }, "UserAuthorizedClientsApi.V2.ListUserAuthorizedClients": { pageSize: { type: "number", diff --git a/services/timeseries_anomaly_investigations/.yarnrc.yml b/services/timeseries_anomaly_investigations/.yarnrc.yml new file mode 100644 index 000000000000..3186f3f0795a --- /dev/null +++ b/services/timeseries_anomaly_investigations/.yarnrc.yml @@ -0,0 +1 @@ +nodeLinker: node-modules diff --git a/services/timeseries_anomaly_investigations/README.md b/services/timeseries_anomaly_investigations/README.md new file mode 100644 index 000000000000..dd0761aa2a91 --- /dev/null +++ b/services/timeseries_anomaly_investigations/README.md @@ -0,0 +1,44 @@ +# @datadog/datadog-api-client-timeseries-anomaly-investigations + +## Description + +Investigate metrics timeseries anomalies and return deterministic findings. + +## Navigation + +- [Installation](#installation) +- [Getting Started](#getting-started) + +## Installation + +```sh +# NPM +npm install @datadog/datadog-api-client-timeseries-anomaly-investigations +# Yarn +yarn add @datadog/datadog-api-client-timeseries-anomaly-investigations +``` + +## Getting Started +```ts +import { createConfiguration } from "@datadog/datadog-api-client"; +import { TimeseriesAnomalyInvestigationsApiV2 } from "@datadog/datadog-api-client-timeseries-anomaly-investigations"; +import { v2 } from "@datadog/datadog-api-client-timeseries-anomaly-investigations"; + +const configuration = createConfiguration(); +// Enable unstable operations +const configurationOpts = { + unstableOperations: { + "TimeseriesAnomalyInvestigationsApi.v2.createTimeseriesAnomalyInvestigation": true + } +} + +const configuration = createConfiguration(configurationOpts); +const apiInstance = new TimeseriesAnomalyInvestigationsApiV2(configuration); +const params = {/* parameters */}; + +apiInstance.createTimeseriesAnomalyInvestigation(params).then((data) => { + console.log("API called successfully. Returned data: " + JSON.stringify(data)); +}).catch((error) => { + console.error("Error calling API: " + error); +}); +``` \ No newline at end of file diff --git a/services/timeseries_anomaly_investigations/package.json b/services/timeseries_anomaly_investigations/package.json new file mode 100644 index 000000000000..4580501ce5de --- /dev/null +++ b/services/timeseries_anomaly_investigations/package.json @@ -0,0 +1,43 @@ +{ + "name": "@datadog/datadog-api-client-timeseries-anomaly-investigations", + "description": "", + "author": "", + "keywords": [ + "api", + "fetch", + "typescript" + ], + "license": "Apache-2.0", + "licenses": [ + { + "type": "Apache-2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0" + } + ], + "repository": { + "type": "git", + "url": "https://github.com/DataDog/datadog-api-client-typescript.git", + "directory": "services/timeseries-anomaly-investigations" + }, + "files": [ + "dist/**/*" + ], + "main": "./dist/index.js", + "typings": "./dist/index.d.ts", + "scripts": { + "prepack": "yarn workspace @datadog/datadog-api-client build && yarn build", + "build": "yarn generate-version-files && tsc", + "generate-version-files": "node -p \"'export const version = ' + JSON.stringify(require('./package.json').version)\" > src/version.ts" + }, + "dependencies": { + "@datadog/datadog-api-client": "^2.0.0-beta.2" + }, + "devDependencies": { + "typescript": "5.8.3" + }, + "engines": { + "node": ">=18.0.0" + }, + "version": "0.0.1", + "packageManager": "yarn@4.9.1" +} diff --git a/services/timeseries_anomaly_investigations/src/index.ts b/services/timeseries_anomaly_investigations/src/index.ts new file mode 100644 index 000000000000..ddcaefdaece9 --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/index.ts @@ -0,0 +1,3 @@ +export * as v2 from "./v2"; + +export { TimeseriesAnomalyInvestigationsApi as TimeseriesAnomalyInvestigationsApiV2 } from "./v2/TimeseriesAnomalyInvestigationsApi"; diff --git a/services/timeseries_anomaly_investigations/src/v2/TimeseriesAnomalyInvestigationsApi.ts b/services/timeseries_anomaly_investigations/src/v2/TimeseriesAnomalyInvestigationsApi.ts new file mode 100644 index 000000000000..bdc37173da7a --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/TimeseriesAnomalyInvestigationsApi.ts @@ -0,0 +1,248 @@ +import { + ApiException, + BaseAPIRequestFactory, + BaseServerConfiguration, + buildUserAgent, + Configuration, + createConfiguration, + deserialize, + getPreferredMediaType, + HttpMethod, + isBrowser, + logger, + normalizeMediaType, + parse, + RequiredError, + RequestContext, + ResponseContext, + serialize, + ServerConfiguration, + stringify, + applySecurityAuthentication, +} from "@datadog/datadog-api-client"; + +import { TypingInfo } from "./models/TypingInfo"; +import { APIErrorResponse } from "./models/APIErrorResponse"; +import { JSONAPIErrorResponse } from "./models/JSONAPIErrorResponse"; +import { TimeseriesAnomalyInvestigationRequest } from "./models/TimeseriesAnomalyInvestigationRequest"; +import { TimeseriesAnomalyInvestigationResponse } from "./models/TimeseriesAnomalyInvestigationResponse"; +import { version } from "../version"; + +export class TimeseriesAnomalyInvestigationsApiRequestFactory extends BaseAPIRequestFactory { + public userAgent: string | undefined; + + public constructor(configuration: Configuration) { + super(configuration); + if (!isBrowser) { + this.userAgent = buildUserAgent( + "timeseries-anomaly-investigations", + version, + ); + } + } + public async createTimeseriesAnomalyInvestigation( + body: TimeseriesAnomalyInvestigationRequest, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if ( + !_config.unstableOperations[ + "TimeseriesAnomalyInvestigationsApi.v2.createTimeseriesAnomalyInvestigation" + ] + ) { + throw new Error( + "Unstable operation 'createTimeseriesAnomalyInvestigation' is disabled. Enable it by setting `configuration.unstableOperations['TimeseriesAnomalyInvestigationsApi.v2.createTimeseriesAnomalyInvestigation'] = true`", + ); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createTimeseriesAnomalyInvestigation"); + } + + // Path Params + const localVarPath = "/api/v2/timeseries-anomaly-investigations"; + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "TimeseriesAnomalyInvestigationsApi.v2.createTimeseriesAnomalyInvestigation", + TimeseriesAnomalyInvestigationsApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.POST, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Set IaC header + if (_config.isIaC) { + requestContext.setHeaderParam("X-Datadog-Managed-By", "iac"); + } + + // Body Params + const contentType = getPreferredMediaType(["application/json"]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = stringify( + serialize(body, TypingInfo, "TimeseriesAnomalyInvestigationRequest", ""), + contentType, + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } +} + +export class TimeseriesAnomalyInvestigationsApiResponseProcessor { + /** + * 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 createTimeseriesAnomalyInvestigation + * @throws ApiException if the response code was not in [200, 299] + */ + public async createTimeseriesAnomalyInvestigation( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: TimeseriesAnomalyInvestigationResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "TimeseriesAnomalyInvestigationResponse", + ) as TimeseriesAnomalyInvestigationResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 413 || + response.httpStatusCode === 422 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "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: TimeseriesAnomalyInvestigationResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "TimeseriesAnomalyInvestigationResponse", + "", + ) as TimeseriesAnomalyInvestigationResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } +} + +export interface TimeseriesAnomalyInvestigationsApiCreateTimeseriesAnomalyInvestigationRequest { + /** + * Metrics timeseries request to investigate. The request body must not exceed 2 MiB. + * @type TimeseriesAnomalyInvestigationRequest + */ + body: TimeseriesAnomalyInvestigationRequest; +} + +export class TimeseriesAnomalyInvestigationsApi { + private requestFactory: TimeseriesAnomalyInvestigationsApiRequestFactory; + private responseProcessor: TimeseriesAnomalyInvestigationsApiResponseProcessor; + private configuration: Configuration; + + static operationServers: { [key: string]: BaseServerConfiguration[] } = {}; + + public constructor( + configuration?: Configuration, + requestFactory?: TimeseriesAnomalyInvestigationsApiRequestFactory, + responseProcessor?: TimeseriesAnomalyInvestigationsApiResponseProcessor, + ) { + this.configuration = configuration || createConfiguration(); + this.requestFactory = + requestFactory || + new TimeseriesAnomalyInvestigationsApiRequestFactory(this.configuration); + this.responseProcessor = + responseProcessor || + new TimeseriesAnomalyInvestigationsApiResponseProcessor(); + } + + /** + * Investigates a metrics timeseries request for its most significant anomaly and returns deterministic findings. + * Metrics queries with or without grouping are supported. This API version accepts exactly one request and returns at most one anomaly. + * @param param The request object + */ + public createTimeseriesAnomalyInvestigation( + param: TimeseriesAnomalyInvestigationsApiCreateTimeseriesAnomalyInvestigationRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = + this.requestFactory.createTimeseriesAnomalyInvestigation( + param.body, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createTimeseriesAnomalyInvestigation( + responseContext, + ); + }); + }); + } +} diff --git a/services/timeseries_anomaly_investigations/src/v2/index.ts b/services/timeseries_anomaly_investigations/src/v2/index.ts new file mode 100644 index 000000000000..736bf58a8273 --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/index.ts @@ -0,0 +1,47 @@ +export { + TimeseriesAnomalyInvestigationsApiCreateTimeseriesAnomalyInvestigationRequest, + TimeseriesAnomalyInvestigationsApi, +} from "./TimeseriesAnomalyInvestigationsApi"; + +export { APIErrorResponse } from "./models/APIErrorResponse"; +export { JSONAPIErrorItem } from "./models/JSONAPIErrorItem"; +export { JSONAPIErrorItemSource } from "./models/JSONAPIErrorItemSource"; +export { JSONAPIErrorResponse } from "./models/JSONAPIErrorResponse"; +export { TimeseriesAnomalyInvestigationAnomaly } from "./models/TimeseriesAnomalyInvestigationAnomaly"; +export { TimeseriesAnomalyInvestigationAnomalyFinding } from "./models/TimeseriesAnomalyInvestigationAnomalyFinding"; +export { TimeseriesAnomalyInvestigationAnomalyFindingType } from "./models/TimeseriesAnomalyInvestigationAnomalyFindingType"; +export { TimeseriesAnomalyInvestigationAnomalyType } from "./models/TimeseriesAnomalyInvestigationAnomalyType"; +export { TimeseriesAnomalyInvestigationCompleteStatus } from "./models/TimeseriesAnomalyInvestigationCompleteStatus"; +export { TimeseriesAnomalyInvestigationConfigurationSource } from "./models/TimeseriesAnomalyInvestigationConfigurationSource"; +export { TimeseriesAnomalyInvestigationDataSource } from "./models/TimeseriesAnomalyInvestigationDataSource"; +export { TimeseriesAnomalyInvestigationDetection } from "./models/TimeseriesAnomalyInvestigationDetection"; +export { TimeseriesAnomalyInvestigationFinding } from "./models/TimeseriesAnomalyInvestigationFinding"; +export { TimeseriesAnomalyInvestigationFindingSynonym } from "./models/TimeseriesAnomalyInvestigationFindingSynonym"; +export { TimeseriesAnomalyInvestigationFindingTag } from "./models/TimeseriesAnomalyInvestigationFindingTag"; +export { TimeseriesAnomalyInvestigationFormula } from "./models/TimeseriesAnomalyInvestigationFormula"; +export { TimeseriesAnomalyInvestigationFormulaLimit } from "./models/TimeseriesAnomalyInvestigationFormulaLimit"; +export { TimeseriesAnomalyInvestigationFormulaLimitOrder } from "./models/TimeseriesAnomalyInvestigationFormulaLimitOrder"; +export { TimeseriesAnomalyInvestigationInfluenceType } from "./models/TimeseriesAnomalyInvestigationInfluenceType"; +export { TimeseriesAnomalyInvestigationInfluentialTagFinding } from "./models/TimeseriesAnomalyInvestigationInfluentialTagFinding"; +export { TimeseriesAnomalyInvestigationInfluentialTagFindingType } from "./models/TimeseriesAnomalyInvestigationInfluentialTagFindingType"; +export { TimeseriesAnomalyInvestigationInterval } from "./models/TimeseriesAnomalyInvestigationInterval"; +export { TimeseriesAnomalyInvestigationMaximumDeviation } from "./models/TimeseriesAnomalyInvestigationMaximumDeviation"; +export { TimeseriesAnomalyInvestigationMetaType } from "./models/TimeseriesAnomalyInvestigationMetaType"; +export { TimeseriesAnomalyInvestigationMetricQuery } from "./models/TimeseriesAnomalyInvestigationMetricQuery"; +export { TimeseriesAnomalyInvestigationQueryExecutionStatus } from "./models/TimeseriesAnomalyInvestigationQueryExecutionStatus"; +export { TimeseriesAnomalyInvestigationQueryStatus } from "./models/TimeseriesAnomalyInvestigationQueryStatus"; +export { TimeseriesAnomalyInvestigationRequest } from "./models/TimeseriesAnomalyInvestigationRequest"; +export { TimeseriesAnomalyInvestigationRequestAttributes } from "./models/TimeseriesAnomalyInvestigationRequestAttributes"; +export { TimeseriesAnomalyInvestigationRequestData } from "./models/TimeseriesAnomalyInvestigationRequestData"; +export { TimeseriesAnomalyInvestigationResponse } from "./models/TimeseriesAnomalyInvestigationResponse"; +export { TimeseriesAnomalyInvestigationResponseAttributes } from "./models/TimeseriesAnomalyInvestigationResponseAttributes"; +export { TimeseriesAnomalyInvestigationResponseData } from "./models/TimeseriesAnomalyInvestigationResponseData"; +export { TimeseriesAnomalyInvestigationResponseID } from "./models/TimeseriesAnomalyInvestigationResponseID"; +export { TimeseriesAnomalyInvestigationResponseMeta } from "./models/TimeseriesAnomalyInvestigationResponseMeta"; +export { TimeseriesAnomalyInvestigationResult } from "./models/TimeseriesAnomalyInvestigationResult"; +export { TimeseriesAnomalyInvestigationResultsWarning } from "./models/TimeseriesAnomalyInvestigationResultsWarning"; +export { TimeseriesAnomalyInvestigationSeries } from "./models/TimeseriesAnomalyInvestigationSeries"; +export { TimeseriesAnomalyInvestigationTagAnalysis } from "./models/TimeseriesAnomalyInvestigationTagAnalysis"; +export { TimeseriesAnomalyInvestigationTagAnalysisStatus } from "./models/TimeseriesAnomalyInvestigationTagAnalysisStatus"; +export { TimeseriesAnomalyInvestigationTimeseriesRequest } from "./models/TimeseriesAnomalyInvestigationTimeseriesRequest"; +export { TimeseriesAnomalyInvestigationType } from "./models/TimeseriesAnomalyInvestigationType"; diff --git a/services/timeseries_anomaly_investigations/src/v2/models/APIErrorResponse.ts b/services/timeseries_anomaly_investigations/src/v2/models/APIErrorResponse.ts new file mode 100644 index 000000000000..58d6c35b80f0 --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/APIErrorResponse.ts @@ -0,0 +1,45 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * API error response. + */ +export class APIErrorResponse { + /** + * A list of errors. + */ + "errors": 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 = { + errors: { + baseName: "errors", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return APIErrorResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/timeseries_anomaly_investigations/src/v2/models/JSONAPIErrorItem.ts b/services/timeseries_anomaly_investigations/src/v2/models/JSONAPIErrorItem.ts new file mode 100644 index 000000000000..a1ca45cd463c --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/JSONAPIErrorItem.ts @@ -0,0 +1,78 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { JSONAPIErrorItemSource } from "./JSONAPIErrorItemSource"; + +/** + * API error response body + */ +export class JSONAPIErrorItem { + /** + * A human-readable explanation specific to this occurrence of the error. + */ + "detail"?: string; + /** + * Non-standard meta-information about the error + */ + "meta"?: { [key: string]: any }; + /** + * References to the source of the error. + */ + "source"?: JSONAPIErrorItemSource; + /** + * Status code of the response. + */ + "status"?: string; + /** + * Short human-readable summary of the error. + */ + "title"?: 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 = { + detail: { + baseName: "detail", + type: "string", + }, + meta: { + baseName: "meta", + type: "{ [key: string]: any; }", + }, + source: { + baseName: "source", + type: "JSONAPIErrorItemSource", + }, + status: { + baseName: "status", + type: "string", + }, + title: { + baseName: "title", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return JSONAPIErrorItem.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/timeseries_anomaly_investigations/src/v2/models/JSONAPIErrorItemSource.ts b/services/timeseries_anomaly_investigations/src/v2/models/JSONAPIErrorItemSource.ts new file mode 100644 index 000000000000..5889114315fa --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/JSONAPIErrorItemSource.ts @@ -0,0 +1,60 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * References to the source of the error. + */ +export class JSONAPIErrorItemSource { + /** + * A string indicating the name of a single request header which caused the error. + */ + "header"?: string; + /** + * A string indicating which URI query parameter caused the error. + */ + "parameter"?: string; + /** + * A JSON pointer to the value in the request document that caused the error. + */ + "pointer"?: 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 = { + header: { + baseName: "header", + type: "string", + }, + parameter: { + baseName: "parameter", + type: "string", + }, + pointer: { + baseName: "pointer", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return JSONAPIErrorItemSource.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/timeseries_anomaly_investigations/src/v2/models/JSONAPIErrorResponse.ts b/services/timeseries_anomaly_investigations/src/v2/models/JSONAPIErrorResponse.ts new file mode 100644 index 000000000000..68aa04ffc27b --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/JSONAPIErrorResponse.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { JSONAPIErrorItem } from "./JSONAPIErrorItem"; + +/** + * API error response. + */ +export class JSONAPIErrorResponse { + /** + * A list of errors. + */ + "errors": 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 = { + errors: { + baseName: "errors", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return JSONAPIErrorResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationAnomaly.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationAnomaly.ts new file mode 100644 index 000000000000..c5f68c1dd54e --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationAnomaly.ts @@ -0,0 +1,116 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { TimeseriesAnomalyInvestigationAnomalyType } from "./TimeseriesAnomalyInvestigationAnomalyType"; +import { TimeseriesAnomalyInvestigationDetection } from "./TimeseriesAnomalyInvestigationDetection"; +import { TimeseriesAnomalyInvestigationFinding } from "./TimeseriesAnomalyInvestigationFinding"; +import { TimeseriesAnomalyInvestigationInterval } from "./TimeseriesAnomalyInvestigationInterval"; +import { TimeseriesAnomalyInvestigationMaximumDeviation } from "./TimeseriesAnomalyInvestigationMaximumDeviation"; +import { TimeseriesAnomalyInvestigationSeries } from "./TimeseriesAnomalyInvestigationSeries"; +import { TimeseriesAnomalyInvestigationTagAnalysis } from "./TimeseriesAnomalyInvestigationTagAnalysis"; + +/** + * Most significant anomaly detected in the request. + */ +export class TimeseriesAnomalyInvestigationAnomaly { + /** + * Anomaly detection configuration used for the result. + */ + "anomalyDetection": TimeseriesAnomalyInvestigationDetection; + /** + * Inclusive time interval in milliseconds since the Unix epoch. + */ + "detectedInterval": TimeseriesAnomalyInvestigationInterval; + /** + * Inclusive time interval in milliseconds since the Unix epoch. + */ + "displayInterval": TimeseriesAnomalyInvestigationInterval; + /** + * Deterministic explanations for the anomaly, ordered by importance. + */ + "findings": Array; + /** + * Most anomalous point within the detected interval. + */ + "maximumDeviation": TimeseriesAnomalyInvestigationMaximumDeviation; + /** + * Logical series on which the anomaly was detected. + */ + "series": TimeseriesAnomalyInvestigationSeries; + /** + * Summary of optional influential-tag enrichment. Count and key fields are present only when analysis completes; enrichment availability does not affect completion of the investigation result. + */ + "tagAnalysis": TimeseriesAnomalyInvestigationTagAnalysis; + /** + * Direction of an anomaly relative to its expected range. + */ + "type": TimeseriesAnomalyInvestigationAnomalyType; + /** + * 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 = { + anomalyDetection: { + baseName: "anomaly_detection", + type: "TimeseriesAnomalyInvestigationDetection", + required: true, + }, + detectedInterval: { + baseName: "detected_interval", + type: "TimeseriesAnomalyInvestigationInterval", + required: true, + }, + displayInterval: { + baseName: "display_interval", + type: "TimeseriesAnomalyInvestigationInterval", + required: true, + }, + findings: { + baseName: "findings", + type: "Array", + required: true, + }, + maximumDeviation: { + baseName: "maximum_deviation", + type: "TimeseriesAnomalyInvestigationMaximumDeviation", + required: true, + }, + series: { + baseName: "series", + type: "TimeseriesAnomalyInvestigationSeries", + required: true, + }, + tagAnalysis: { + baseName: "tag_analysis", + type: "TimeseriesAnomalyInvestigationTagAnalysis", + required: true, + }, + type: { + baseName: "type", + type: "TimeseriesAnomalyInvestigationAnomalyType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationAnomaly.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationAnomalyFinding.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationAnomalyFinding.ts new file mode 100644 index 000000000000..1338fcd7b01a --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationAnomalyFinding.ts @@ -0,0 +1,65 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { TimeseriesAnomalyInvestigationAnomalyFindingType } from "./TimeseriesAnomalyInvestigationAnomalyFindingType"; + +/** + * Finding that describes the anomaly when completed analysis produces no displayable influential tags. + */ +export class TimeseriesAnomalyInvestigationAnomalyFinding { + /** + * Deterministic explanation of the finding. + */ + "description": string; + /** + * Concise, deterministic finding title. + */ + "headline": string; + /** + * Finding category for an anomaly without a displayable influential tag. + */ + "type": TimeseriesAnomalyInvestigationAnomalyFindingType; + /** + * 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 = { + description: { + baseName: "description", + type: "string", + required: true, + }, + headline: { + baseName: "headline", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "TimeseriesAnomalyInvestigationAnomalyFindingType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationAnomalyFinding.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationAnomalyFindingType.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationAnomalyFindingType.ts new file mode 100644 index 000000000000..10c6c7ac2201 --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationAnomalyFindingType.ts @@ -0,0 +1,9 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Finding category for an anomaly without a displayable influential tag. + */ +export type TimeseriesAnomalyInvestigationAnomalyFindingType = + | typeof ANOMALY + | UnparsedObject; +export const ANOMALY = "anomaly"; diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationAnomalyType.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationAnomalyType.ts new file mode 100644 index 000000000000..f5d3c95c2d3e --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationAnomalyType.ts @@ -0,0 +1,11 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Direction of an anomaly relative to its expected range. + */ +export type TimeseriesAnomalyInvestigationAnomalyType = + | typeof SPIKE + | typeof DIP + | UnparsedObject; +export const SPIKE = "spike"; +export const DIP = "dip"; diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationCompleteStatus.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationCompleteStatus.ts new file mode 100644 index 000000000000..ed5022b132ab --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationCompleteStatus.ts @@ -0,0 +1,9 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Status value indicating successful completion. + */ +export type TimeseriesAnomalyInvestigationCompleteStatus = + | typeof COMPLETE + | UnparsedObject; +export const COMPLETE = "complete"; diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationConfigurationSource.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationConfigurationSource.ts new file mode 100644 index 000000000000..a5bb594c6300 --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationConfigurationSource.ts @@ -0,0 +1,11 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Source of the anomaly detection configuration. + */ +export type TimeseriesAnomalyInvestigationConfigurationSource = + | typeof REQUEST_FORMULA + | typeof WATCHDOG_EXPLAINS_DEFAULT + | UnparsedObject; +export const REQUEST_FORMULA = "request_formula"; +export const WATCHDOG_EXPLAINS_DEFAULT = "watchdog_explains_default"; diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationDataSource.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationDataSource.ts new file mode 100644 index 000000000000..2569b8849171 --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationDataSource.ts @@ -0,0 +1,9 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Data source for an anomaly investigation query. + */ +export type TimeseriesAnomalyInvestigationDataSource = + | typeof METRICS + | UnparsedObject; +export const METRICS = "metrics"; diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationDetection.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationDetection.ts new file mode 100644 index 000000000000..0195178e042e --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationDetection.ts @@ -0,0 +1,56 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { TimeseriesAnomalyInvestigationConfigurationSource } from "./TimeseriesAnomalyInvestigationConfigurationSource"; + +/** + * Anomaly detection configuration used for the result. + */ +export class TimeseriesAnomalyInvestigationDetection { + /** + * Source of the anomaly detection configuration. + */ + "configurationSource": TimeseriesAnomalyInvestigationConfigurationSource; + /** + * Applied Watchdog Explains profile, or null when the request supplied an explicit `anomalies()` formula. The current Watchdog profile is `watchdog_explains_v1`. + */ + "profile": string | null; + /** + * 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 = { + configurationSource: { + baseName: "configuration_source", + type: "TimeseriesAnomalyInvestigationConfigurationSource", + required: true, + }, + profile: { + baseName: "profile", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationDetection.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationFinding.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationFinding.ts new file mode 100644 index 000000000000..e6d258de5843 --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationFinding.ts @@ -0,0 +1,12 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +import { TimeseriesAnomalyInvestigationAnomalyFinding } from "./TimeseriesAnomalyInvestigationAnomalyFinding"; +import { TimeseriesAnomalyInvestigationInfluentialTagFinding } from "./TimeseriesAnomalyInvestigationInfluentialTagFinding"; + +/** + * Deterministic explanation for a detected anomaly. + */ +export type TimeseriesAnomalyInvestigationFinding = + | TimeseriesAnomalyInvestigationInfluentialTagFinding + | TimeseriesAnomalyInvestigationAnomalyFinding + | UnparsedObject; diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationFindingSynonym.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationFindingSynonym.ts new file mode 100644 index 000000000000..9f23aea1aec6 --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationFindingSynonym.ts @@ -0,0 +1,54 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Tag grouped under an influential tag by synonym analysis. + */ +export class TimeseriesAnomalyInvestigationFindingSynonym { + /** + * Synonymous tag key. + */ + "key": string; + /** + * Values associated with the synonymous tag. + */ + "values": 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 = { + key: { + baseName: "key", + type: "string", + required: true, + }, + values: { + baseName: "values", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationFindingSynonym.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationFindingTag.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationFindingTag.ts new file mode 100644 index 000000000000..feab733d3e73 --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationFindingTag.ts @@ -0,0 +1,85 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { TimeseriesAnomalyInvestigationFindingSynonym } from "./TimeseriesAnomalyInvestigationFindingSynonym"; +import { TimeseriesAnomalyInvestigationInfluenceType } from "./TimeseriesAnomalyInvestigationInfluenceType"; + +/** + * Structured tag evidence for an influential-tag finding. + */ +export class TimeseriesAnomalyInvestigationFindingTag { + /** + * Kind of influence a tag has on a series. + */ + "influenceType": TimeseriesAnomalyInvestigationInfluenceType; + /** + * Influential tag key. + */ + "key": string; + /** + * Influence rating from 1 through 5. + */ + "rating": number; + /** + * Tags grouped with this tag by Variation of Influence synonym analysis. + */ + "synonyms": Array; + /** + * Influential values for the tag key. + */ + "values": 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 = { + influenceType: { + baseName: "influence_type", + type: "TimeseriesAnomalyInvestigationInfluenceType", + required: true, + }, + key: { + baseName: "key", + type: "string", + required: true, + }, + rating: { + baseName: "rating", + type: "number", + required: true, + format: "double", + }, + synonyms: { + baseName: "synonyms", + type: "Array", + required: true, + }, + values: { + baseName: "values", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationFindingTag.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationFormula.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationFormula.ts new file mode 100644 index 000000000000..1309fc8aa5ee --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationFormula.ts @@ -0,0 +1,55 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { TimeseriesAnomalyInvestigationFormulaLimit } from "./TimeseriesAnomalyInvestigationFormulaLimit"; + +/** + * Formula evaluated by the timeseries request. + */ +export class TimeseriesAnomalyInvestigationFormula { + /** + * Formula expression referencing one or more named queries. + */ + "formula": string; + /** + * Optional formula limit accepted for compatibility with Timeseries API requests. Formula limits have no effect on timeseries queries. + */ + "limit"?: TimeseriesAnomalyInvestigationFormulaLimit; + /** + * 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 = { + formula: { + baseName: "formula", + type: "string", + required: true, + }, + limit: { + baseName: "limit", + type: "TimeseriesAnomalyInvestigationFormulaLimit", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationFormula.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationFormulaLimit.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationFormulaLimit.ts new file mode 100644 index 000000000000..15477bfa16c0 --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationFormulaLimit.ts @@ -0,0 +1,55 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { TimeseriesAnomalyInvestigationFormulaLimitOrder } from "./TimeseriesAnomalyInvestigationFormulaLimitOrder"; + +/** + * Optional formula limit accepted for compatibility with Timeseries API requests. Formula limits have no effect on timeseries queries. + */ +export class TimeseriesAnomalyInvestigationFormulaLimit { + /** + * Requested result limit. This field has no effect on a timeseries anomaly investigation. + */ + "count"?: number; + /** + * Sort order used when applying a formula series limit. + */ + "order"?: TimeseriesAnomalyInvestigationFormulaLimitOrder; + /** + * 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 = { + count: { + baseName: "count", + type: "number", + format: "int64", + }, + order: { + baseName: "order", + type: "TimeseriesAnomalyInvestigationFormulaLimitOrder", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationFormulaLimit.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationFormulaLimitOrder.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationFormulaLimitOrder.ts new file mode 100644 index 000000000000..dfdb7c20d8a1 --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationFormulaLimitOrder.ts @@ -0,0 +1,11 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Sort order used when applying a formula series limit. + */ +export type TimeseriesAnomalyInvestigationFormulaLimitOrder = + | typeof ASC + | typeof DESC + | UnparsedObject; +export const ASC = "asc"; +export const DESC = "desc"; diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationInfluenceType.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationInfluenceType.ts new file mode 100644 index 000000000000..0213ccfd05c6 --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationInfluenceType.ts @@ -0,0 +1,11 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Kind of influence a tag has on a series. + */ +export type TimeseriesAnomalyInvestigationInfluenceType = + | typeof SHAPE + | typeof VALUE + | UnparsedObject; +export const SHAPE = "shape"; +export const VALUE = "value"; diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationInfluentialTagFinding.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationInfluentialTagFinding.ts new file mode 100644 index 000000000000..0939d8fe987f --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationInfluentialTagFinding.ts @@ -0,0 +1,75 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { TimeseriesAnomalyInvestigationFindingTag } from "./TimeseriesAnomalyInvestigationFindingTag"; +import { TimeseriesAnomalyInvestigationInfluentialTagFindingType } from "./TimeseriesAnomalyInvestigationInfluentialTagFindingType"; + +/** + * Finding that attributes an anomaly to an influential tag. + */ +export class TimeseriesAnomalyInvestigationInfluentialTagFinding { + /** + * Deterministic explanation of the finding. + */ + "description": string; + /** + * Concise, deterministic finding title. + */ + "headline": string; + /** + * Structured tag evidence for an influential-tag finding. + */ + "tag": TimeseriesAnomalyInvestigationFindingTag; + /** + * Finding category for an influential tag. + */ + "type": TimeseriesAnomalyInvestigationInfluentialTagFindingType; + /** + * 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 = { + description: { + baseName: "description", + type: "string", + required: true, + }, + headline: { + baseName: "headline", + type: "string", + required: true, + }, + tag: { + baseName: "tag", + type: "TimeseriesAnomalyInvestigationFindingTag", + required: true, + }, + type: { + baseName: "type", + type: "TimeseriesAnomalyInvestigationInfluentialTagFindingType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationInfluentialTagFinding.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationInfluentialTagFindingType.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationInfluentialTagFindingType.ts new file mode 100644 index 000000000000..ee7767484472 --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationInfluentialTagFindingType.ts @@ -0,0 +1,9 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Finding category for an influential tag. + */ +export type TimeseriesAnomalyInvestigationInfluentialTagFindingType = + | typeof INFLUENTIAL_TAG + | UnparsedObject; +export const INFLUENTIAL_TAG = "influential_tag"; diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationInterval.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationInterval.ts new file mode 100644 index 000000000000..1ee9c26223c9 --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationInterval.ts @@ -0,0 +1,56 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Inclusive time interval in milliseconds since the Unix epoch. + */ +export class TimeseriesAnomalyInvestigationInterval { + /** + * Timestamp of the final point in the interval. + */ + "end": number; + /** + * Inclusive start of the interval. + */ + "start": 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 = { + end: { + baseName: "end", + type: "number", + required: true, + format: "int64", + }, + start: { + baseName: "start", + type: "number", + required: true, + format: "int64", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationInterval.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationMaximumDeviation.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationMaximumDeviation.ts new file mode 100644 index 000000000000..c2feee1fa64e --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationMaximumDeviation.ts @@ -0,0 +1,66 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Most anomalous point within the detected interval. + */ +export class TimeseriesAnomalyInvestigationMaximumDeviation { + /** + * Absolute distance between the observed value and the nearest anomaly boundary. + */ + "deltaFromBoundary": number; + /** + * Point timestamp in milliseconds since the Unix epoch. + */ + "timestamp": number; + /** + * Observed value at the point. + */ + "value": 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 = { + deltaFromBoundary: { + baseName: "delta_from_boundary", + type: "number", + required: true, + format: "double", + }, + timestamp: { + baseName: "timestamp", + type: "number", + required: true, + format: "int64", + }, + value: { + baseName: "value", + type: "number", + required: true, + format: "double", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationMaximumDeviation.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationMetaType.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationMetaType.ts new file mode 100644 index 000000000000..9d3f01b9dc4f --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationMetaType.ts @@ -0,0 +1,10 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Response metadata type for a timeseries anomaly investigation. + */ +export type TimeseriesAnomalyInvestigationMetaType = + | typeof TIMESERIES_ANOMALY_INVESTIGATION + | UnparsedObject; +export const TIMESERIES_ANOMALY_INVESTIGATION = + "timeseries_anomaly_investigation"; diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationMetricQuery.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationMetricQuery.ts new file mode 100644 index 000000000000..2bbd3285755a --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationMetricQuery.ts @@ -0,0 +1,81 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { TimeseriesAnomalyInvestigationDataSource } from "./TimeseriesAnomalyInvestigationDataSource"; + +/** + * Metrics query referenced by a formula. + */ +export class TimeseriesAnomalyInvestigationMetricQuery { + /** + * Optional scalar aggregator accepted for request compatibility. This field is ignored for timeseries queries. + */ + "aggregator"?: string; + /** + * Optional organization UUID used for a cross-organization query. Each query accepts at most one UUID; use separate queries for separate organizations. Influential-tag analysis is currently unsupported for cross-organization queries, but anomaly detection still runs. + */ + "crossOrgUuids"?: Array; + /** + * Data source for an anomaly investigation query. + */ + "dataSource": TimeseriesAnomalyInvestigationDataSource; + /** + * Name used to reference this query from formulas. + */ + "name": string; + /** + * Datadog metrics query expression. + */ + "query": 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 = { + aggregator: { + baseName: "aggregator", + type: "string", + }, + crossOrgUuids: { + baseName: "cross_org_uuids", + type: "Array", + }, + dataSource: { + baseName: "data_source", + type: "TimeseriesAnomalyInvestigationDataSource", + required: true, + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + query: { + baseName: "query", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationMetricQuery.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationQueryExecutionStatus.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationQueryExecutionStatus.ts new file mode 100644 index 000000000000..a94b878550b0 --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationQueryExecutionStatus.ts @@ -0,0 +1,11 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Current execution status for a named query. + */ +export type TimeseriesAnomalyInvestigationQueryExecutionStatus = + | typeof RUNNING + | typeof DONE + | UnparsedObject; +export const RUNNING = "running"; +export const DONE = "done"; diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationQueryStatus.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationQueryStatus.ts new file mode 100644 index 000000000000..3a464f0facfa --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationQueryStatus.ts @@ -0,0 +1,56 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { TimeseriesAnomalyInvestigationQueryExecutionStatus } from "./TimeseriesAnomalyInvestigationQueryExecutionStatus"; + +/** + * Execution status for one named query. + */ +export class TimeseriesAnomalyInvestigationQueryStatus { + /** + * Query name from the request. + */ + "name": string; + /** + * Current execution status for a named query. + */ + "status": TimeseriesAnomalyInvestigationQueryExecutionStatus; + /** + * 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 = { + name: { + baseName: "name", + type: "string", + required: true, + }, + status: { + baseName: "status", + type: "TimeseriesAnomalyInvestigationQueryExecutionStatus", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationQueryStatus.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationRequest.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationRequest.ts new file mode 100644 index 000000000000..3d1261f7cd6f --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationRequest.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { TimeseriesAnomalyInvestigationRequestData } from "./TimeseriesAnomalyInvestigationRequestData"; + +/** + * Request to investigate a metrics timeseries for anomalies. + */ +export class TimeseriesAnomalyInvestigationRequest { + /** + * JSON:API resource containing an anomaly investigation request. + */ + "data": TimeseriesAnomalyInvestigationRequestData; + /** + * 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: "TimeseriesAnomalyInvestigationRequestData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationRequestAttributes.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationRequestAttributes.ts new file mode 100644 index 000000000000..1fd815fa64e8 --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationRequestAttributes.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { TimeseriesAnomalyInvestigationTimeseriesRequest } from "./TimeseriesAnomalyInvestigationTimeseriesRequest"; + +/** + * Attributes of an anomaly investigation request. + */ +export class TimeseriesAnomalyInvestigationRequestAttributes { + /** + * Timeseries requests to investigate. This API version accepts exactly one request. + */ + "requests": [TimeseriesAnomalyInvestigationTimeseriesRequest]; + /** + * 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 = { + requests: { + baseName: "requests", + type: "[TimeseriesAnomalyInvestigationTimeseriesRequest]", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationRequestAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationRequestData.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationRequestData.ts new file mode 100644 index 000000000000..3706efad0393 --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationRequestData.ts @@ -0,0 +1,57 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { TimeseriesAnomalyInvestigationRequestAttributes } from "./TimeseriesAnomalyInvestigationRequestAttributes"; +import { TimeseriesAnomalyInvestigationType } from "./TimeseriesAnomalyInvestigationType"; + +/** + * JSON:API resource containing an anomaly investigation request. + */ +export class TimeseriesAnomalyInvestigationRequestData { + /** + * Attributes of an anomaly investigation request. + */ + "attributes": TimeseriesAnomalyInvestigationRequestAttributes; + /** + * Resource type for a timeseries anomaly investigation. + */ + "type": TimeseriesAnomalyInvestigationType; + /** + * 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: "TimeseriesAnomalyInvestigationRequestAttributes", + required: true, + }, + type: { + baseName: "type", + type: "TimeseriesAnomalyInvestigationType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationRequestData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationResponse.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationResponse.ts new file mode 100644 index 000000000000..26df5c2655b5 --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationResponse.ts @@ -0,0 +1,57 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { TimeseriesAnomalyInvestigationResponseData } from "./TimeseriesAnomalyInvestigationResponseData"; +import { TimeseriesAnomalyInvestigationResponseMeta } from "./TimeseriesAnomalyInvestigationResponseMeta"; + +/** + * Response containing the anomaly investigation results and timeseries metadata. + */ +export class TimeseriesAnomalyInvestigationResponse { + /** + * JSON:API resource containing anomaly investigation results. + */ + "data": TimeseriesAnomalyInvestigationResponseData; + /** + * Timeseries execution metadata for the single request accepted by this API version. + */ + "meta": TimeseriesAnomalyInvestigationResponseMeta; + /** + * 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: "TimeseriesAnomalyInvestigationResponseData", + required: true, + }, + meta: { + baseName: "meta", + type: "TimeseriesAnomalyInvestigationResponseMeta", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationResponseAttributes.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationResponseAttributes.ts new file mode 100644 index 000000000000..74cdb197bb43 --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationResponseAttributes.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { TimeseriesAnomalyInvestigationResult } from "./TimeseriesAnomalyInvestigationResult"; + +/** + * Attributes of an anomaly investigation response. + */ +export class TimeseriesAnomalyInvestigationResponseAttributes { + /** + * Results returned in the same order as the submitted requests. This API version returns exactly one result. + */ + "results": [TimeseriesAnomalyInvestigationResult]; + /** + * 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 = { + results: { + baseName: "results", + type: "[TimeseriesAnomalyInvestigationResult]", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationResponseAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationResponseData.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationResponseData.ts new file mode 100644 index 000000000000..af645a14aa7c --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationResponseData.ts @@ -0,0 +1,67 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { TimeseriesAnomalyInvestigationResponseAttributes } from "./TimeseriesAnomalyInvestigationResponseAttributes"; +import { TimeseriesAnomalyInvestigationResponseID } from "./TimeseriesAnomalyInvestigationResponseID"; +import { TimeseriesAnomalyInvestigationType } from "./TimeseriesAnomalyInvestigationType"; + +/** + * JSON:API resource containing anomaly investigation results. + */ +export class TimeseriesAnomalyInvestigationResponseData { + /** + * Attributes of an anomaly investigation response. + */ + "attributes": TimeseriesAnomalyInvestigationResponseAttributes; + /** + * Stable identifier for an anomaly investigation response resource. + */ + "id": TimeseriesAnomalyInvestigationResponseID; + /** + * Resource type for a timeseries anomaly investigation. + */ + "type": TimeseriesAnomalyInvestigationType; + /** + * 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: "TimeseriesAnomalyInvestigationResponseAttributes", + required: true, + }, + id: { + baseName: "id", + type: "TimeseriesAnomalyInvestigationResponseID", + required: true, + }, + type: { + baseName: "type", + type: "TimeseriesAnomalyInvestigationType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationResponseData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationResponseID.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationResponseID.ts new file mode 100644 index 000000000000..99c10f64aff0 --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationResponseID.ts @@ -0,0 +1,9 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Stable identifier for an anomaly investigation response resource. + */ +export type TimeseriesAnomalyInvestigationResponseID = + | typeof ZERO + | UnparsedObject; +export const ZERO = "0"; diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationResponseMeta.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationResponseMeta.ts new file mode 100644 index 000000000000..6414c20614b0 --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationResponseMeta.ts @@ -0,0 +1,97 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { TimeseriesAnomalyInvestigationMetaType } from "./TimeseriesAnomalyInvestigationMetaType"; +import { TimeseriesAnomalyInvestigationQueryStatus } from "./TimeseriesAnomalyInvestigationQueryStatus"; +import { TimeseriesAnomalyInvestigationResultsWarning } from "./TimeseriesAnomalyInvestigationResultsWarning"; + +/** + * Timeseries execution metadata for the single request accepted by this API version. + */ +export class TimeseriesAnomalyInvestigationResponseMeta { + /** + * Effective start of the timeseries query in milliseconds since the Unix epoch. + */ + "fromDate": number; + /** + * Effective timeseries interval in milliseconds. + */ + "interval": number; + /** + * Execution status for the request's queries. + */ + "queries": Array; + /** + * Response metadata type for a timeseries anomaly investigation. + */ + "resType": TimeseriesAnomalyInvestigationMetaType; + /** + * Non-fatal warnings produced while executing the investigation. + */ + "resultsWarnings": Array; + /** + * Effective end of the timeseries query in milliseconds since the Unix epoch. + */ + "toDate": 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 = { + fromDate: { + baseName: "from_date", + type: "number", + required: true, + format: "int64", + }, + interval: { + baseName: "interval", + type: "number", + required: true, + format: "int64", + }, + queries: { + baseName: "queries", + type: "Array", + required: true, + }, + resType: { + baseName: "res_type", + type: "TimeseriesAnomalyInvestigationMetaType", + required: true, + }, + resultsWarnings: { + baseName: "results_warnings", + type: "Array", + required: true, + }, + toDate: { + baseName: "to_date", + type: "number", + required: true, + format: "int64", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationResponseMeta.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationResult.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationResult.ts new file mode 100644 index 000000000000..e00d8689aa4e --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationResult.ts @@ -0,0 +1,57 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { TimeseriesAnomalyInvestigationAnomaly } from "./TimeseriesAnomalyInvestigationAnomaly"; +import { TimeseriesAnomalyInvestigationCompleteStatus } from "./TimeseriesAnomalyInvestigationCompleteStatus"; + +/** + * Completed result for one timeseries request. The anomalies array is empty when no qualifying anomaly is found. + */ +export class TimeseriesAnomalyInvestigationResult { + /** + * Detected anomalies. This API version returns at most one anomaly. + */ + "anomalies": Array; + /** + * Status value indicating successful completion. + */ + "status": TimeseriesAnomalyInvestigationCompleteStatus; + /** + * 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 = { + anomalies: { + baseName: "anomalies", + type: "Array", + required: true, + }, + status: { + baseName: "status", + type: "TimeseriesAnomalyInvestigationCompleteStatus", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationResult.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationResultsWarning.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationResultsWarning.ts new file mode 100644 index 000000000000..9f6496ce8c21 --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationResultsWarning.ts @@ -0,0 +1,54 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Non-fatal warning produced while executing the investigation. + */ +export class TimeseriesAnomalyInvestigationResultsWarning { + /** + * Human-readable warning message. + */ + "message": string; + /** + * Machine-readable warning name. + */ + "name": 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 = { + message: { + baseName: "message", + type: "string", + required: true, + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationResultsWarning.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationSeries.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationSeries.ts new file mode 100644 index 000000000000..8b524f586163 --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationSeries.ts @@ -0,0 +1,64 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Logical series on which the anomaly was detected. + */ +export class TimeseriesAnomalyInvestigationSeries { + /** + * Tags identifying the selected group. Empty for a query without grouping. + */ + "groupTags": Array; + /** + * Display label for the selected series. + */ + "label": string; + /** + * Zero-based index of the caller's formula that produced the series. + */ + "queryIndex": 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 = { + groupTags: { + baseName: "group_tags", + type: "Array", + required: true, + }, + label: { + baseName: "label", + type: "string", + required: true, + }, + queryIndex: { + baseName: "query_index", + type: "number", + required: true, + format: "int64", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationSeries.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationTagAnalysis.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationTagAnalysis.ts new file mode 100644 index 000000000000..ddf1324a5a2a --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationTagAnalysis.ts @@ -0,0 +1,73 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { TimeseriesAnomalyInvestigationTagAnalysisStatus } from "./TimeseriesAnomalyInvestigationTagAnalysisStatus"; + +/** + * Summary of optional influential-tag enrichment. Count and key fields are present only when analysis completes; enrichment availability does not affect completion of the investigation result. + */ +export class TimeseriesAnomalyInvestigationTagAnalysis { + /** + * Tag keys analyzed. Present only when analysis completes. + */ + "analyzedTagKeys"?: Array; + /** + * Outcome of optional influential-tag enrichment. + */ + "status": TimeseriesAnomalyInvestigationTagAnalysisStatus; + /** + * Number of tag keys analyzed. Present only when analysis completes. + */ + "tagKeysAnalyzed"?: number; + /** + * Number of tag values analyzed. Present only when analysis completes. + */ + "tagValuesAnalyzed"?: 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 = { + analyzedTagKeys: { + baseName: "analyzed_tag_keys", + type: "Array", + }, + status: { + baseName: "status", + type: "TimeseriesAnomalyInvestigationTagAnalysisStatus", + required: true, + }, + tagKeysAnalyzed: { + baseName: "tag_keys_analyzed", + type: "number", + format: "int64", + }, + tagValuesAnalyzed: { + baseName: "tag_values_analyzed", + type: "number", + format: "int64", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationTagAnalysis.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationTagAnalysisStatus.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationTagAnalysisStatus.ts new file mode 100644 index 000000000000..8f7a9ed5a8dc --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationTagAnalysisStatus.ts @@ -0,0 +1,13 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Outcome of optional influential-tag enrichment. + */ +export type TimeseriesAnomalyInvestigationTagAnalysisStatus = + | typeof COMPLETE + | typeof UNSUPPORTED + | typeof FAILED + | UnparsedObject; +export const COMPLETE = "complete"; +export const UNSUPPORTED = "unsupported"; +export const FAILED = "failed"; diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationTimeseriesRequest.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationTimeseriesRequest.ts new file mode 100644 index 000000000000..5b550d2b54a6 --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationTimeseriesRequest.ts @@ -0,0 +1,86 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { TimeseriesAnomalyInvestigationFormula } from "./TimeseriesAnomalyInvestigationFormula"; +import { TimeseriesAnomalyInvestigationMetricQuery } from "./TimeseriesAnomalyInvestigationMetricQuery"; + +/** + * Metrics timeseries request to investigate. + */ +export class TimeseriesAnomalyInvestigationTimeseriesRequest { + /** + * Formulas to evaluate. Each formula may contain an explicit `anomalies()` call or a supported metrics expression. + */ + "formulas": Array; + /** + * Start of the investigation time window in milliseconds since the Unix epoch. + */ + "from": number; + /** + * Optional requested aggregation interval in milliseconds. + */ + "interval"?: number; + /** + * Metrics queries referenced by the formulas. + */ + "queries": Array; + /** + * End of the investigation time window in milliseconds since the Unix epoch. Must be later than `from`. + */ + "to": 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 = { + formulas: { + baseName: "formulas", + type: "Array", + required: true, + }, + from: { + baseName: "from", + type: "number", + required: true, + format: "int64", + }, + interval: { + baseName: "interval", + type: "number", + format: "int64", + }, + queries: { + baseName: "queries", + type: "Array", + required: true, + }, + to: { + baseName: "to", + type: "number", + required: true, + format: "int64", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TimeseriesAnomalyInvestigationTimeseriesRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationType.ts b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationType.ts new file mode 100644 index 000000000000..798d54d03947 --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TimeseriesAnomalyInvestigationType.ts @@ -0,0 +1,10 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Resource type for a timeseries anomaly investigation. + */ +export type TimeseriesAnomalyInvestigationType = + | typeof TIMESERIES_ANOMALY_INVESTIGATION + | UnparsedObject; +export const TIMESERIES_ANOMALY_INVESTIGATION = + "timeseries_anomaly_investigation"; diff --git a/services/timeseries_anomaly_investigations/src/v2/models/TypingInfo.ts b/services/timeseries_anomaly_investigations/src/v2/models/TypingInfo.ts new file mode 100644 index 000000000000..293405b111e6 --- /dev/null +++ b/services/timeseries_anomaly_investigations/src/v2/models/TypingInfo.ts @@ -0,0 +1,117 @@ +import { ModelTypingInfo } from "@datadog/datadog-api-client"; + +import { APIErrorResponse } from "./APIErrorResponse"; +import { JSONAPIErrorItem } from "./JSONAPIErrorItem"; +import { JSONAPIErrorItemSource } from "./JSONAPIErrorItemSource"; +import { JSONAPIErrorResponse } from "./JSONAPIErrorResponse"; +import { TimeseriesAnomalyInvestigationAnomaly } from "./TimeseriesAnomalyInvestigationAnomaly"; +import { TimeseriesAnomalyInvestigationAnomalyFinding } from "./TimeseriesAnomalyInvestigationAnomalyFinding"; +import { TimeseriesAnomalyInvestigationDetection } from "./TimeseriesAnomalyInvestigationDetection"; +import { TimeseriesAnomalyInvestigationFindingSynonym } from "./TimeseriesAnomalyInvestigationFindingSynonym"; +import { TimeseriesAnomalyInvestigationFindingTag } from "./TimeseriesAnomalyInvestigationFindingTag"; +import { TimeseriesAnomalyInvestigationFormula } from "./TimeseriesAnomalyInvestigationFormula"; +import { TimeseriesAnomalyInvestigationFormulaLimit } from "./TimeseriesAnomalyInvestigationFormulaLimit"; +import { TimeseriesAnomalyInvestigationInfluentialTagFinding } from "./TimeseriesAnomalyInvestigationInfluentialTagFinding"; +import { TimeseriesAnomalyInvestigationInterval } from "./TimeseriesAnomalyInvestigationInterval"; +import { TimeseriesAnomalyInvestigationMaximumDeviation } from "./TimeseriesAnomalyInvestigationMaximumDeviation"; +import { TimeseriesAnomalyInvestigationMetricQuery } from "./TimeseriesAnomalyInvestigationMetricQuery"; +import { TimeseriesAnomalyInvestigationQueryStatus } from "./TimeseriesAnomalyInvestigationQueryStatus"; +import { TimeseriesAnomalyInvestigationRequest } from "./TimeseriesAnomalyInvestigationRequest"; +import { TimeseriesAnomalyInvestigationRequestAttributes } from "./TimeseriesAnomalyInvestigationRequestAttributes"; +import { TimeseriesAnomalyInvestigationRequestData } from "./TimeseriesAnomalyInvestigationRequestData"; +import { TimeseriesAnomalyInvestigationResponse } from "./TimeseriesAnomalyInvestigationResponse"; +import { TimeseriesAnomalyInvestigationResponseAttributes } from "./TimeseriesAnomalyInvestigationResponseAttributes"; +import { TimeseriesAnomalyInvestigationResponseData } from "./TimeseriesAnomalyInvestigationResponseData"; +import { TimeseriesAnomalyInvestigationResponseMeta } from "./TimeseriesAnomalyInvestigationResponseMeta"; +import { TimeseriesAnomalyInvestigationResult } from "./TimeseriesAnomalyInvestigationResult"; +import { TimeseriesAnomalyInvestigationResultsWarning } from "./TimeseriesAnomalyInvestigationResultsWarning"; +import { TimeseriesAnomalyInvestigationSeries } from "./TimeseriesAnomalyInvestigationSeries"; +import { TimeseriesAnomalyInvestigationTagAnalysis } from "./TimeseriesAnomalyInvestigationTagAnalysis"; +import { TimeseriesAnomalyInvestigationTimeseriesRequest } from "./TimeseriesAnomalyInvestigationTimeseriesRequest"; + +export const TypingInfo: ModelTypingInfo = { + enumsMap: { + TimeseriesAnomalyInvestigationAnomalyFindingType: ["anomaly"], + TimeseriesAnomalyInvestigationAnomalyType: ["spike", "dip"], + TimeseriesAnomalyInvestigationCompleteStatus: ["complete"], + TimeseriesAnomalyInvestigationConfigurationSource: [ + "request_formula", + "watchdog_explains_default", + ], + TimeseriesAnomalyInvestigationDataSource: ["metrics"], + TimeseriesAnomalyInvestigationFormulaLimitOrder: ["asc", "desc"], + TimeseriesAnomalyInvestigationInfluenceType: ["shape", "value"], + TimeseriesAnomalyInvestigationInfluentialTagFindingType: [ + "influential_tag", + ], + TimeseriesAnomalyInvestigationMetaType: [ + "timeseries_anomaly_investigation", + ], + TimeseriesAnomalyInvestigationQueryExecutionStatus: ["running", "done"], + TimeseriesAnomalyInvestigationResponseID: ["0"], + TimeseriesAnomalyInvestigationTagAnalysisStatus: [ + "complete", + "unsupported", + "failed", + ], + TimeseriesAnomalyInvestigationType: ["timeseries_anomaly_investigation"], + }, + oneOfMap: { + TimeseriesAnomalyInvestigationFinding: [ + "TimeseriesAnomalyInvestigationInfluentialTagFinding", + "TimeseriesAnomalyInvestigationAnomalyFinding", + ], + }, + typeMap: { + APIErrorResponse: APIErrorResponse, + JSONAPIErrorItem: JSONAPIErrorItem, + JSONAPIErrorItemSource: JSONAPIErrorItemSource, + JSONAPIErrorResponse: JSONAPIErrorResponse, + TimeseriesAnomalyInvestigationAnomaly: + TimeseriesAnomalyInvestigationAnomaly, + TimeseriesAnomalyInvestigationAnomalyFinding: + TimeseriesAnomalyInvestigationAnomalyFinding, + TimeseriesAnomalyInvestigationDetection: + TimeseriesAnomalyInvestigationDetection, + TimeseriesAnomalyInvestigationFindingSynonym: + TimeseriesAnomalyInvestigationFindingSynonym, + TimeseriesAnomalyInvestigationFindingTag: + TimeseriesAnomalyInvestigationFindingTag, + TimeseriesAnomalyInvestigationFormula: + TimeseriesAnomalyInvestigationFormula, + TimeseriesAnomalyInvestigationFormulaLimit: + TimeseriesAnomalyInvestigationFormulaLimit, + TimeseriesAnomalyInvestigationInfluentialTagFinding: + TimeseriesAnomalyInvestigationInfluentialTagFinding, + TimeseriesAnomalyInvestigationInterval: + TimeseriesAnomalyInvestigationInterval, + TimeseriesAnomalyInvestigationMaximumDeviation: + TimeseriesAnomalyInvestigationMaximumDeviation, + TimeseriesAnomalyInvestigationMetricQuery: + TimeseriesAnomalyInvestigationMetricQuery, + TimeseriesAnomalyInvestigationQueryStatus: + TimeseriesAnomalyInvestigationQueryStatus, + TimeseriesAnomalyInvestigationRequest: + TimeseriesAnomalyInvestigationRequest, + TimeseriesAnomalyInvestigationRequestAttributes: + TimeseriesAnomalyInvestigationRequestAttributes, + TimeseriesAnomalyInvestigationRequestData: + TimeseriesAnomalyInvestigationRequestData, + TimeseriesAnomalyInvestigationResponse: + TimeseriesAnomalyInvestigationResponse, + TimeseriesAnomalyInvestigationResponseAttributes: + TimeseriesAnomalyInvestigationResponseAttributes, + TimeseriesAnomalyInvestigationResponseData: + TimeseriesAnomalyInvestigationResponseData, + TimeseriesAnomalyInvestigationResponseMeta: + TimeseriesAnomalyInvestigationResponseMeta, + TimeseriesAnomalyInvestigationResult: TimeseriesAnomalyInvestigationResult, + TimeseriesAnomalyInvestigationResultsWarning: + TimeseriesAnomalyInvestigationResultsWarning, + TimeseriesAnomalyInvestigationSeries: TimeseriesAnomalyInvestigationSeries, + TimeseriesAnomalyInvestigationTagAnalysis: + TimeseriesAnomalyInvestigationTagAnalysis, + TimeseriesAnomalyInvestigationTimeseriesRequest: + TimeseriesAnomalyInvestigationTimeseriesRequest, + }, +}; diff --git a/services/timeseries_anomaly_investigations/tsconfig.json b/services/timeseries_anomaly_investigations/tsconfig.json new file mode 100644 index 000000000000..d6c32bfb893c --- /dev/null +++ b/services/timeseries_anomaly_investigations/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "strict": true, + /* Basic Options */ + "target": "es6", + "module": "commonjs", + "moduleResolution": "node", + "declaration": true, + + "esModuleInterop": true, + "resolveJsonModule": true, + + "noImplicitAny": true, + "noImplicitThis": true, + + /* Additional Checks */ + "noUnusedLocals": false /* Report errors on unused locals. */, // TODO: reenable (unused imports!) + "noUnusedParameters": false /* Report errors on unused parameters. */, // TODO: set to true again + "noImplicitReturns": true /* Report error when not all code paths in function return a value. */, + "noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */, + + "sourceMap": true, + "outDir": "./dist", + "lib": ["es6", "es7"] + }, + "exclude": ["dist", "node_modules", "tests"], + "include": ["src"] +} diff --git a/yarn.lock b/yarn.lock index ba51dce6b87f..16130dd586cd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1711,6 +1711,15 @@ __metadata: languageName: unknown linkType: soft +"@datadog/datadog-api-client-timeseries-anomaly-investigations@workspace:services/timeseries_anomaly_investigations": + version: 0.0.0-use.local + resolution: "@datadog/datadog-api-client-timeseries-anomaly-investigations@workspace:services/timeseries_anomaly_investigations" + dependencies: + "@datadog/datadog-api-client": "npm:^2.0.0-beta.2" + typescript: "npm:5.8.3" + languageName: unknown + linkType: soft + "@datadog/datadog-api-client-twilio-integration-accounts@workspace:services/twilio_integration_accounts": version: 0.0.0-use.local resolution: "@datadog/datadog-api-client-twilio-integration-accounts@workspace:services/twilio_integration_accounts"