From 49801fb89ec94660e23d000abe84f5cc81ee049d Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 27 Jul 2026 13:21:03 +0000 Subject: [PATCH] Regenerate client from commit fe5d20e of spec repo --- .generator/schemas/v2/openapi.yaml | 1267 ++++++++++++ .../v2/rum-operations/CreateRUMOperation.ts | 56 + .../CreateRUMOperationStrongLink.ts | 33 + .../v2/rum-operations/DeleteRUMOperation.ts | 22 + .../DeleteRUMOperationStrongLink.ts | 23 + examples/v2/rum-operations/GetRUMOperation.ts | 22 + .../rum-operations/GetRUMOperationByName.ts | 22 + .../ListRUMOperationStrongLinks.ts | 17 + .../v2/rum-operations/ListRUMOperations.ts | 18 + .../v2/rum-operations/UpdateRUMOperation.ts | 58 + .../UpdateRUMOperationStrongLink.ts | 31 + features/support/scenarios_model_mapping.ts | 122 ++ features/v2/rum_operations.feature | 234 +++ features/v2/undo.json | 60 + .../configuration.ts | 9 + .../apis/RUMOperationsApi.ts | 1759 +++++++++++++++++ packages/datadog-api-client-v2/index.ts | 48 + .../models/ObjectSerializer.ts | 74 + .../models/RUMOperationCreateRequest.ts | 54 + .../models/RUMOperationCreateRequestData.ts | 64 + .../RUMOperationJourneyCompositeRule.ts | 91 + .../RUMOperationJourneyCompositeRuleKind.ts | 19 + .../models/RUMOperationJourneyNode.ts | 61 + .../models/RUMOperationJourneyPredicate.ts | 53 + .../models/RUMOperationJourneyRum.ts | 54 + .../models/RUMOperationJourneyStep.ts | 74 + .../models/RUMOperationJourneyStepType.ts | 24 + .../models/RUMOperationRequestAttributes.ts | 113 ++ .../models/RUMOperationResponse.ts | 54 + .../models/RUMOperationResponseAttributes.ts | 157 ++ .../models/RUMOperationResponseData.ts | 73 + .../RUMOperationStrongLinkCreateRequest.ts | 54 + ...rationStrongLinkCreateRequestAttributes.ts | 105 + ...RUMOperationStrongLinkCreateRequestData.ts | 64 + .../models/RUMOperationStrongLinkResponse.ts | 54 + ...UMOperationStrongLinkResponseAttributes.ts | 106 + .../RUMOperationStrongLinkResponseData.ts | 73 + .../models/RUMOperationStrongLinkStatus.ts | 20 + .../models/RUMOperationStrongLinkType.ts | 14 + .../RUMOperationStrongLinkUpdateRequest.ts | 54 + ...rationStrongLinkUpdateRequestAttributes.ts | 54 + ...RUMOperationStrongLinkUpdateRequestData.ts | 64 + .../RUMOperationStrongLinkUpdateStatus.ts | 18 + .../RUMOperationStrongLinksListResponse.ts | 60 + ...RUMOperationStrongLinksListResponseMeta.ts | 71 + .../models/RUMOperationType.ts | 14 + .../models/RUMOperationUpdateRequest.ts | 54 + .../models/RUMOperationUpdateRequestData.ts | 73 + .../models/RUMOperationUser.ts | 76 + .../models/RUMOperationsListResponse.ts | 60 + .../models/RUMOperationsListResponseMeta.ts | 53 + .../RUMOperationsListResponseMetaPage.ts | 115 ++ 52 files changed, 6022 insertions(+) create mode 100644 examples/v2/rum-operations/CreateRUMOperation.ts create mode 100644 examples/v2/rum-operations/CreateRUMOperationStrongLink.ts create mode 100644 examples/v2/rum-operations/DeleteRUMOperation.ts create mode 100644 examples/v2/rum-operations/DeleteRUMOperationStrongLink.ts create mode 100644 examples/v2/rum-operations/GetRUMOperation.ts create mode 100644 examples/v2/rum-operations/GetRUMOperationByName.ts create mode 100644 examples/v2/rum-operations/ListRUMOperationStrongLinks.ts create mode 100644 examples/v2/rum-operations/ListRUMOperations.ts create mode 100644 examples/v2/rum-operations/UpdateRUMOperation.ts create mode 100644 examples/v2/rum-operations/UpdateRUMOperationStrongLink.ts create mode 100644 features/v2/rum_operations.feature create mode 100644 packages/datadog-api-client-v2/apis/RUMOperationsApi.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationCreateRequest.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationCreateRequestData.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationJourneyCompositeRule.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationJourneyCompositeRuleKind.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationJourneyNode.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationJourneyPredicate.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationJourneyRum.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationJourneyStep.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationJourneyStepType.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationRequestAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationResponse.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationResponseAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationResponseData.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationStrongLinkCreateRequest.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationStrongLinkCreateRequestAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationStrongLinkCreateRequestData.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationStrongLinkResponse.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationStrongLinkResponseAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationStrongLinkResponseData.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationStrongLinkStatus.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationStrongLinkType.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationStrongLinkUpdateRequest.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationStrongLinkUpdateRequestAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationStrongLinkUpdateRequestData.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationStrongLinkUpdateStatus.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationStrongLinksListResponse.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationStrongLinksListResponseMeta.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationType.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationUpdateRequest.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationUpdateRequestData.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationUser.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationsListResponse.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationsListResponseMeta.ts create mode 100644 packages/datadog-api-client-v2/models/RUMOperationsListResponseMetaPage.ts diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 9d6b430aeeca..ad5d03c1b518 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -80253,6 +80253,579 @@ components: RUMGroupByTotalString: description: A string to use as the key value for the total bucket. type: string + RUMOperationCreateRequest: + description: The request body for creating a RUM operation. + properties: + data: + $ref: "#/components/schemas/RUMOperationCreateRequestData" + required: + - data + type: object + RUMOperationCreateRequestData: + description: The data object for creating a RUM operation. + properties: + attributes: + $ref: "#/components/schemas/RUMOperationRequestAttributes" + type: + $ref: "#/components/schemas/RUMOperationType" + required: + - type + - attributes + type: object + RUMOperationJourneyCompositeRule: + description: |- + A composite rule combining several predicates. Used as an alternative to `nodes` on a journey + step when several conditions must be matched together, in any order or in a specific order. + properties: + composite_rule_id: + description: The unique identifier of the composite rule. Generated by the server if omitted. + readOnly: true + type: string + config_version: + description: A hash of the composite rule's configuration, computed by the server. + readOnly: true + type: string + kind: + $ref: "#/components/schemas/RUMOperationJourneyCompositeRuleKind" + max_window_ms: + description: The maximum time window, in milliseconds, in which all predicates must match. + example: 30000 + format: int64 + type: integer + predicates: + description: The list of predicates that must be matched by RUM events. + items: + $ref: "#/components/schemas/RUMOperationJourneyPredicate" + type: array + required: + - kind + - predicates + type: object + RUMOperationJourneyCompositeRuleKind: + description: |- + The rule used to combine the composite rule's predicates. `all_of` requires every predicate + to match, in any order. `in_order` requires every predicate to match in the given order. + enum: + - all_of + - in_order + example: all_of + type: string + x-enum-varnames: + - ALL_OF + - IN_ORDER + RUMOperationJourneyNode: + description: A single node within a RUM operation journey step, matching RUM events with a query. + properties: + id: + description: The unique identifier of the node. Generated by the server if omitted. + readOnly: true + type: string + query: + description: The RUM search query used to match events for this node. + example: "@type:action @action.type:click" + type: string + required: + - query + type: object + RUMOperationJourneyPredicate: + description: A single predicate within a composite rule, matching RUM events with a query. + properties: + query: + description: The RUM search query used to match events for this predicate. + example: "@type:action @action.type:click" + type: string + required: + - query + type: object + RUMOperationJourneyRum: + description: The definition of a RUM operation's journey, used to detect it from RUM events. + properties: + rum_steps: + description: The ordered list of steps composing the RUM journey. + items: + $ref: "#/components/schemas/RUMOperationJourneyStep" + type: array + required: + - rum_steps + type: object + RUMOperationJourneyStep: + description: |- + A single step of a RUM operation's journey. Matches RUM events either through a list of `nodes` + or through a `composite` rule; the two are mutually exclusive. + properties: + composite: + $ref: "#/components/schemas/RUMOperationJourneyCompositeRule" + nodes: + description: The list of nodes that can match this step. Mutually exclusive with `composite`. + items: + $ref: "#/components/schemas/RUMOperationJourneyNode" + type: array + type: + $ref: "#/components/schemas/RUMOperationJourneyStepType" + required: + - type + type: object + RUMOperationJourneyStepType: + description: The type of a step within a RUM operation's journey. + enum: + - start + - update + - stop + - error + - abandoned + example: start + type: string + x-enum-varnames: + - START + - UPDATE + - STOP + - ERROR + - ABANDONED + RUMOperationRequestAttributes: + description: Attributes for creating or updating a RUM operation. + properties: + application_id: + description: The RUM application ID the operation belongs to. + example: "abc12345-1234-5678-abcd-ef1234567890" + format: uuid + nullable: true + type: string + category: + description: The category of the RUM operation. + nullable: true + type: string + description: + description: A description of the RUM operation. + nullable: true + type: string + display_name: + description: A human-readable display name for the RUM operation. + example: Checkout completed + type: string + feature_ids: + description: The list of feature IDs associated with the RUM operation. + items: + type: string + type: array + journey_rum: + $ref: "#/components/schemas/RUMOperationJourneyRum" + name: + description: The unique name of the RUM operation. Must not contain spaces. + example: checkout_completed + type: string + tags: + description: A list of tags associated with the RUM operation. + example: + - "team:checkout" + items: + type: string + type: array + required: + - name + - tags + - journey_rum + type: object + RUMOperationResponse: + description: The response for a single RUM operation. + properties: + data: + $ref: "#/components/schemas/RUMOperationResponseData" + required: + - data + type: object + RUMOperationResponseAttributes: + description: Attributes of a RUM operation response. + properties: + application_id: + description: The RUM application ID the operation belongs to. + format: uuid + nullable: true + type: string + category: + description: The category of the RUM operation. + nullable: true + type: string + created_at: + description: The timestamp when the RUM operation was created. + format: date-time + readOnly: true + type: string + created_by: + $ref: "#/components/schemas/RUMOperationUser" + description: + description: A description of the RUM operation. + nullable: true + type: string + display_name: + description: A human-readable display name for the RUM operation. + example: Checkout completed + type: string + feature_ids: + description: The list of feature IDs associated with the RUM operation. + items: + type: string + type: array + journey_rum: + $ref: "#/components/schemas/RUMOperationJourneyRum" + name: + description: The unique name of the RUM operation. Must not contain spaces. + example: checkout_completed + type: string + org_id: + description: The ID of the organization the RUM operation belongs to. + format: int64 + readOnly: true + type: integer + tags: + description: A list of tags associated with the RUM operation. + example: + - "team:checkout" + items: + type: string + type: array + updated_at: + description: The timestamp when the RUM operation was last updated. + format: date-time + nullable: true + readOnly: true + type: string + updated_by: + $ref: "#/components/schemas/RUMOperationUser" + required: + - name + - tags + - journey_rum + type: object + RUMOperationResponseData: + description: The data object in a RUM operation response. + properties: + attributes: + $ref: "#/components/schemas/RUMOperationResponseAttributes" + id: + description: The unique identifier of the RUM operation. + example: "abc12345-1234-5678-abcd-ef1234567890" + readOnly: true + type: string + type: + $ref: "#/components/schemas/RUMOperationType" + required: + - id + - type + - attributes + type: object + RUMOperationStrongLinkCreateRequest: + description: The request body for creating a RUM operation strong link. + properties: + data: + $ref: "#/components/schemas/RUMOperationStrongLinkCreateRequestData" + required: + - data + type: object + RUMOperationStrongLinkCreateRequestAttributes: + description: Attributes for creating a RUM operation strong link. + properties: + application_id: + description: The RUM application ID used when creating a stub operation from `operation_name`. + format: uuid + type: string + description: + description: A description of the strong link. + nullable: true + type: string + feature_id: + description: The unique identifier of the feature to link. + example: "feature-123" + type: string + operation_id: + description: |- + The unique identifier of the RUM operation to link. Either `operation_id` or + `operation_name` is required. + example: "abc12345-1234-5678-abcd-ef1234567890" + type: string + operation_name: + description: |- + The name of the RUM operation to link. Either `operation_id` or `operation_name` is + required. If no operation with this name exists, a stub operation is created. + type: string + status: + $ref: "#/components/schemas/RUMOperationStrongLinkStatus" + tags: + description: A list of tags associated with the strong link. + items: + type: string + type: array + required: + - feature_id + type: object + RUMOperationStrongLinkCreateRequestData: + description: The data object for creating a RUM operation strong link. + properties: + attributes: + $ref: "#/components/schemas/RUMOperationStrongLinkCreateRequestAttributes" + type: + $ref: "#/components/schemas/RUMOperationStrongLinkType" + required: + - type + - attributes + type: object + RUMOperationStrongLinkResponse: + description: The response for a single RUM operation strong link. + properties: + data: + $ref: "#/components/schemas/RUMOperationStrongLinkResponseData" + required: + - data + type: object + RUMOperationStrongLinkResponseAttributes: + description: Attributes of a RUM operation strong link response. + properties: + created_at: + description: The timestamp when the strong link was created. + format: date-time + readOnly: true + type: string + description: + description: A description of the strong link. + nullable: true + type: string + feature_id: + description: The unique identifier of the linked feature. + example: "feature-123" + readOnly: true + type: string + operation_id: + description: The unique identifier of the linked RUM operation. + example: "abc12345-1234-5678-abcd-ef1234567890" + readOnly: true + type: string + status: + $ref: "#/components/schemas/RUMOperationStrongLinkStatus" + tags: + description: A list of tags associated with the strong link. + items: + type: string + type: array + updated_at: + description: The timestamp when the strong link was last updated. + format: date-time + nullable: true + readOnly: true + type: string + required: + - operation_id + - feature_id + - status + type: object + RUMOperationStrongLinkResponseData: + description: The data object in a RUM operation strong link response. + properties: + attributes: + $ref: "#/components/schemas/RUMOperationStrongLinkResponseAttributes" + id: + description: The unique identifier of the strong link, formatted as `:`. + example: "abc12345-1234-5678-abcd-ef1234567890:feature-123" + readOnly: true + type: string + type: + $ref: "#/components/schemas/RUMOperationStrongLinkType" + required: + - id + - type + - attributes + type: object + RUMOperationStrongLinkStatus: + description: The status of a RUM operation strong link. + enum: + - DRAFT + - CONFIRMED + - REJECTED + example: CONFIRMED + type: string + x-enum-varnames: + - DRAFT + - CONFIRMED + - REJECTED + RUMOperationStrongLinkType: + description: The JSON:API type for RUM operation strong link resources. + enum: + - strong_links + example: strong_links + type: string + x-enum-varnames: + - STRONG_LINKS + RUMOperationStrongLinkUpdateRequest: + description: The request body for updating a RUM operation strong link. + properties: + data: + $ref: "#/components/schemas/RUMOperationStrongLinkUpdateRequestData" + required: + - data + type: object + RUMOperationStrongLinkUpdateRequestAttributes: + description: Attributes for updating a RUM operation strong link. + properties: + status: + $ref: "#/components/schemas/RUMOperationStrongLinkUpdateStatus" + required: + - status + type: object + RUMOperationStrongLinkUpdateRequestData: + description: The data object for updating a RUM operation strong link. + properties: + attributes: + $ref: "#/components/schemas/RUMOperationStrongLinkUpdateRequestAttributes" + type: + $ref: "#/components/schemas/RUMOperationStrongLinkType" + required: + - type + - attributes + type: object + RUMOperationStrongLinkUpdateStatus: + description: The status of a RUM operation strong link. Can only be set to `CONFIRMED` or `REJECTED`. + enum: + - CONFIRMED + - REJECTED + example: CONFIRMED + type: string + x-enum-varnames: + - CONFIRMED + - REJECTED + RUMOperationStrongLinksListResponse: + description: The response for a list of RUM operation strong links. + properties: + data: + items: + $ref: "#/components/schemas/RUMOperationStrongLinkResponseData" + type: array + meta: + $ref: "#/components/schemas/RUMOperationStrongLinksListResponseMeta" + required: + - data + type: object + RUMOperationStrongLinksListResponseMeta: + description: Metadata for a list of RUM operation strong links. + properties: + limit: + description: The pagination limit. + format: int64 + type: integer + offset: + description: The current offset. + format: int64 + type: integer + total: + description: The total number of strong links matching the request. + format: int64 + type: integer + type: object + RUMOperationType: + description: The JSON:API type for RUM operation resources. + enum: + - operations + example: operations + type: string + x-enum-varnames: + - OPERATIONS + RUMOperationUpdateRequest: + description: The request body for updating a RUM operation. + properties: + data: + $ref: "#/components/schemas/RUMOperationUpdateRequestData" + required: + - data + type: object + RUMOperationUpdateRequestData: + description: The data object for updating a RUM operation. + properties: + attributes: + $ref: "#/components/schemas/RUMOperationRequestAttributes" + id: + description: The unique identifier of the RUM operation. Must match the ID in the URL path. + example: "abc12345-1234-5678-abcd-ef1234567890" + type: string + type: + $ref: "#/components/schemas/RUMOperationType" + required: + - id + - type + - attributes + type: object + RUMOperationUser: + description: A Datadog user referenced by a RUM operation. + properties: + email: + description: The email of the user. + readOnly: true + type: string + handle: + description: The handle of the user. + readOnly: true + type: string + name: + description: The name of the user. + readOnly: true + type: string + uuid: + description: The UUID of the user. + readOnly: true + type: string + type: object + RUMOperationsListResponse: + description: The response for a list of RUM operations. + properties: + data: + items: + $ref: "#/components/schemas/RUMOperationResponseData" + type: array + meta: + $ref: "#/components/schemas/RUMOperationsListResponseMeta" + required: + - data + type: object + RUMOperationsListResponseMeta: + description: Metadata for a list of RUM operations. + properties: + page: + $ref: "#/components/schemas/RUMOperationsListResponseMetaPage" + type: object + RUMOperationsListResponseMetaPage: + description: Pagination metadata for a list of RUM operations. + properties: + first_offset: + description: The offset of the first page. + format: int64 + type: integer + last_offset: + description: The offset of the last page. + format: int64 + type: integer + limit: + description: The pagination limit. + format: int64 + type: integer + next_offset: + description: The offset of the next page, if any. + format: int64 + nullable: true + type: integer + offset: + description: The current offset. + format: int64 + type: integer + prev_offset: + description: The offset of the previous page, if any. + format: int64 + nullable: true + type: integer + total: + description: The total number of RUM operations matching the search. + format: int64 + type: integer + type: + description: The type of pagination used. + example: offset + type: string + type: object RUMProductAnalyticsRetentionScale: description: Product Analytics retention scale configuration. properties: @@ -175740,6 +176313,694 @@ paths: operator: OR permissions: - rum_apps_read + /api/v2/rum/operations: + post: + description: Create a new RUM operation, defining the journey used to detect it from RUM events. + operationId: CreateRUMOperation + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/RUMOperationCreateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + application_id: "abc12345-1234-5678-abcd-ef1234567890" + category: conversion + created_at: "2024-01-15T10:30:00Z" + created_by: + email: jane.doe@example.com + handle: jane.doe + name: Jane Doe + uuid: "abc12345-1234-5678-abcd-ef1234567890" + description: "Tracks users completing the checkout flow." + display_name: Checkout completed + feature_ids: + - "feature-123" + journey_rum: + rum_steps: + - nodes: + - id: "node-1" + query: '@type:action @action.type:click @action.target.name:"Checkout"' + type: start + - nodes: + - id: "node-2" + query: '@type:action @action.type:click @action.target.name:"Confirm order"' + type: stop + name: checkout_completed + org_id: 123456 + tags: + - "team:checkout" + updated_at: + updated_by: + id: "abc12345-1234-5678-abcd-ef1234567890" + type: operations + schema: + $ref: "#/components/schemas/RUMOperationResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Conflict. An operation with this name already exists. + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Create a RUM operation + tags: + - RUM Operations + 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/rum/operations/by-name/{name}: + get: + description: Retrieve a specific RUM operation by its unique name. + operationId: GetRUMOperationByName + parameters: + - description: The unique name of the RUM operation. + in: path + name: name + required: true + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + application_id: "abc12345-1234-5678-abcd-ef1234567890" + category: conversion + created_at: "2024-01-15T10:30:00Z" + created_by: + email: jane.doe@example.com + handle: jane.doe + name: Jane Doe + uuid: "abc12345-1234-5678-abcd-ef1234567890" + description: "Tracks users completing the checkout flow." + display_name: Checkout completed + feature_ids: + - "feature-123" + journey_rum: + rum_steps: + - nodes: + - id: "node-1" + query: '@type:action @action.type:click @action.target.name:"Checkout"' + type: start + - nodes: + - id: "node-2" + query: '@type:action @action.type:click @action.target.name:"Confirm order"' + type: stop + name: checkout_completed + org_id: 123456 + tags: + - "team:checkout" + updated_at: + updated_by: + id: "abc12345-1234-5678-abcd-ef1234567890" + type: operations + schema: + $ref: "#/components/schemas/RUMOperationResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get a RUM operation by name + tags: + - RUM Operations + 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/rum/operations/search: + get: + description: Search RUM operations for your organization. Supports filtering by query, creator, team, feature, and application. + operationId: ListRUMOperations + parameters: + - description: A search query to filter operations by name. + in: query + name: query + required: false + schema: + example: "checkout" + type: string + - description: Offset for pagination. + in: query + name: page[offset] + required: false + schema: + default: 0 + format: int64 + minimum: 0 + type: integer + - description: Number of items per page. Maximum of 100. + in: query + name: page[limit] + required: false + schema: + default: 50 + format: int64 + maximum: 100 + minimum: 1 + type: integer + - description: Filter operations by the email of their creator. + in: query + name: creator + required: false + schema: + example: user@example.com + type: string + - description: Filter operations by team. Accepts a comma-separated list of teams. + in: query + name: team + required: false + schema: + example: "frontend,checkout" + type: string + - description: Filter operations by feature ID. Accepts a comma-separated list of feature IDs. + in: query + name: feature_id + required: false + schema: + type: string + - description: Filter operations by RUM application ID. + in: query + name: application_id + required: false + schema: + example: "abc12345-1234-5678-abcd-ef1234567890" + format: uuid + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + application_id: "abc12345-1234-5678-abcd-ef1234567890" + category: conversion + created_at: "2024-01-15T10:30:00Z" + created_by: + email: jane.doe@example.com + handle: jane.doe + name: Jane Doe + uuid: "abc12345-1234-5678-abcd-ef1234567890" + description: "Tracks users completing the checkout flow." + display_name: Checkout completed + feature_ids: + - "feature-123" + journey_rum: + rum_steps: + - nodes: + - id: "node-1" + query: '@type:action @action.type:click @action.target.name:"Checkout"' + type: start + - nodes: + - id: "node-2" + query: '@type:action @action.type:click @action.target.name:"Confirm order"' + type: stop + name: checkout_completed + org_id: 123456 + tags: + - "team:checkout" + updated_at: + updated_by: + id: "abc12345-1234-5678-abcd-ef1234567890" + type: operations + meta: + page: + first_offset: 0 + last_offset: 0 + limit: 50 + next_offset: + offset: 0 + prev_offset: + total: 1 + type: offset + schema: + $ref: "#/components/schemas/RUMOperationsListResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Search RUM operations + tags: + - RUM Operations + 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/rum/operations/strong_links: + get: + description: |- + List strong links between RUM operations and features. A strong link confirms that a feature + belongs to an operation. Provide `operation_id`, `feature_id`, or both to filter results; + at least one is required. + operationId: ListRUMOperationStrongLinks + parameters: + - description: Filter strong links by RUM operation ID. + in: query + name: operation_id + required: false + schema: + type: string + - description: Filter strong links by feature ID. + in: query + name: feature_id + required: false + schema: + type: string + - description: Offset for pagination. + in: query + name: page[offset] + required: false + schema: + default: 0 + format: int64 + minimum: 0 + type: integer + - description: Number of items per page. Maximum of 200. + in: query + name: page[limit] + required: false + schema: + default: 50 + format: int64 + maximum: 200 + minimum: 1 + type: integer + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + created_at: "2024-01-15T10:30:00Z" + description: "Confirmed link between checkout_completed and feature-123." + feature_id: "feature-123" + operation_id: "abc12345-1234-5678-abcd-ef1234567890" + status: CONFIRMED + tags: + - "team:checkout" + updated_at: + id: "abc12345-1234-5678-abcd-ef1234567890:feature-123" + type: strong_links + meta: + limit: 50 + offset: 0 + total: 1 + schema: + $ref: "#/components/schemas/RUMOperationStrongLinksListResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List RUM operation strong links + tags: + - RUM Operations + post: + description: |- + Create a strong link between a RUM operation and a feature, confirming that the feature + belongs to the operation. The operation can be identified by `operation_id` or `operation_name`; + if `operation_name` does not match an existing operation, a stub operation is created. + operationId: CreateRUMOperationStrongLink + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/RUMOperationStrongLinkCreateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-15T10:30:00Z" + description: "Confirmed link between checkout_completed and feature-123." + feature_id: "feature-123" + operation_id: "abc12345-1234-5678-abcd-ef1234567890" + status: CONFIRMED + tags: + - "team:checkout" + updated_at: + id: "abc12345-1234-5678-abcd-ef1234567890:feature-123" + type: strong_links + schema: + $ref: "#/components/schemas/RUMOperationStrongLinkResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found. The referenced `operation_id` does not exist. + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Conflict. A strong link between this operation and feature already exists. + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Create a RUM operation strong link + tags: + - RUM Operations + 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/rum/operations/strong_links/{rum_operation_id}/{feature_id}: + delete: + description: Delete the strong link between a RUM operation and a feature. + operationId: DeleteRUMOperationStrongLink + parameters: + - description: The unique identifier of the RUM operation. + in: path + name: rum_operation_id + required: true + schema: + type: string + - description: The unique identifier of the feature. + in: path + name: feature_id + required: true + schema: + type: string + responses: + "204": + description: No Content + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Delete a RUM operation strong link + tags: + - RUM Operations + 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/). + put: + description: Update the status of a strong link between a RUM operation and a feature. + operationId: UpdateRUMOperationStrongLink + parameters: + - description: The unique identifier of the RUM operation. + in: path + name: rum_operation_id + required: true + schema: + type: string + - description: The unique identifier of the feature. + in: path + name: feature_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/RUMOperationStrongLinkUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-15T10:30:00Z" + description: "Confirmed link between checkout_completed and feature-123." + feature_id: "feature-123" + operation_id: "abc12345-1234-5678-abcd-ef1234567890" + status: CONFIRMED + tags: + - "team:checkout" + updated_at: "2024-01-16T09:00:00Z" + id: "abc12345-1234-5678-abcd-ef1234567890:feature-123" + type: strong_links + schema: + $ref: "#/components/schemas/RUMOperationStrongLinkResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Update a RUM operation strong link + tags: + - RUM Operations + 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/rum/operations/{rum_operation_id}: + delete: + description: Delete a RUM operation. + operationId: DeleteRUMOperation + parameters: + - description: The unique identifier of the RUM operation to delete. + in: path + name: rum_operation_id + required: true + schema: + type: string + responses: + "204": + description: No Content + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Delete a RUM operation + tags: + - RUM Operations + 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/). + get: + description: Retrieve a specific RUM operation by its unique identifier. + operationId: GetRUMOperation + parameters: + - description: The unique identifier of the RUM operation. + in: path + name: rum_operation_id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + application_id: "abc12345-1234-5678-abcd-ef1234567890" + category: conversion + created_at: "2024-01-15T10:30:00Z" + created_by: + email: jane.doe@example.com + handle: jane.doe + name: Jane Doe + uuid: "abc12345-1234-5678-abcd-ef1234567890" + description: "Tracks users completing the checkout flow." + display_name: Checkout completed + feature_ids: + - "feature-123" + journey_rum: + rum_steps: + - nodes: + - id: "node-1" + query: '@type:action @action.type:click @action.target.name:"Checkout"' + type: start + - nodes: + - id: "node-2" + query: '@type:action @action.type:click @action.target.name:"Confirm order"' + type: stop + name: checkout_completed + org_id: 123456 + tags: + - "team:checkout" + updated_at: + updated_by: + id: "abc12345-1234-5678-abcd-ef1234567890" + type: operations + schema: + $ref: "#/components/schemas/RUMOperationResponse" + description: OK + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get a RUM operation + tags: + - RUM Operations + 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/). + put: + description: |- + Update an existing RUM operation. Fields omitted from the request body keep their existing value, + with the exception of `journey_rum`, which is required and fully replaced on every update. + operationId: UpdateRUMOperation + parameters: + - description: The unique identifier of the RUM operation to update. + in: path + name: rum_operation_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/RUMOperationUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + application_id: "abc12345-1234-5678-abcd-ef1234567890" + category: conversion + created_at: "2024-01-15T10:30:00Z" + created_by: + email: jane.doe@example.com + handle: jane.doe + name: Jane Doe + uuid: "abc12345-1234-5678-abcd-ef1234567890" + description: "Tracks users completing the checkout flow." + display_name: Checkout completed + feature_ids: + - "feature-123" + journey_rum: + rum_steps: + - nodes: + - id: "node-1" + query: '@type:action @action.type:click @action.target.name:"Checkout"' + type: start + - nodes: + - id: "node-2" + query: '@type:action @action.type:click @action.target.name:"Confirm order"' + type: stop + name: checkout_completed + org_id: 123456 + tags: + - "team:checkout" + updated_at: "2024-01-16T09:00:00Z" + updated_by: + email: jane.doe@example.com + handle: jane.doe + name: Jane Doe + uuid: "abc12345-1234-5678-abcd-ef1234567890" + id: "abc12345-1234-5678-abcd-ef1234567890" + type: operations + schema: + $ref: "#/components/schemas/RUMOperationResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Conflict. An operation with this name already exists. + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Update a RUM operation + tags: + - RUM Operations + 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/rum/query/insight/aggregated_long_tasks: post: description: |- @@ -204655,6 +205916,12 @@ tags: - description: |- Get insights into the performance of your Real User Monitoring (RUM) applications over HTTP. See the [RUM & Session Replay page](https://docs.datadoghq.com/real_user_monitoring/) for more information name: RUM Insights + - description: |- + Manage [RUM Operations](https://docs.datadoghq.com/real_user_monitoring/), business + transactions detected from RUM events through a configurable journey, and their strong links + to features. See the [RUM & Session Replay page](https://docs.datadoghq.com/real_user_monitoring/) + for more information. + name: RUM Operations - description: |- Manage [RUM SDK configurations](https://docs.datadoghq.com/real_user_monitoring/) delivered to RUM applications via Remote Configuration. externalDocs: diff --git a/examples/v2/rum-operations/CreateRUMOperation.ts b/examples/v2/rum-operations/CreateRUMOperation.ts new file mode 100644 index 000000000000..c92f883b8bbb --- /dev/null +++ b/examples/v2/rum-operations/CreateRUMOperation.ts @@ -0,0 +1,56 @@ +/** + * Create a RUM operation returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.createRUMOperation"] = true; +const apiInstance = new v2.RUMOperationsApi(configuration); + +const params: v2.RUMOperationsApiCreateRUMOperationRequest = { + body: { + data: { + attributes: { + applicationId: "abc12345-1234-5678-abcd-ef1234567890", + category: undefined, + description: undefined, + displayName: "Checkout completed", + featureIds: [], + journeyRum: { + rumSteps: [ + { + composite: { + kind: "all_of", + maxWindowMs: 30000, + predicates: [ + { + query: "@type:action @action.type:click", + }, + ], + }, + nodes: [ + { + query: "@type:action @action.type:click", + }, + ], + type: "start", + }, + ], + }, + name: "checkout_completed", + tags: ["team:checkout"], + }, + type: "operations", + }, + }, +}; + +apiInstance + .createRUMOperation(params) + .then((data: v2.RUMOperationResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/rum-operations/CreateRUMOperationStrongLink.ts b/examples/v2/rum-operations/CreateRUMOperationStrongLink.ts new file mode 100644 index 000000000000..93a9af4e8f98 --- /dev/null +++ b/examples/v2/rum-operations/CreateRUMOperationStrongLink.ts @@ -0,0 +1,33 @@ +/** + * Create a RUM operation strong link returns "Created" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.createRUMOperationStrongLink"] = true; +const apiInstance = new v2.RUMOperationsApi(configuration); + +const params: v2.RUMOperationsApiCreateRUMOperationStrongLinkRequest = { + body: { + data: { + attributes: { + description: undefined, + featureId: "feature-123", + operationId: "abc12345-1234-5678-abcd-ef1234567890", + status: "CONFIRMED", + tags: [], + }, + type: "strong_links", + }, + }, +}; + +apiInstance + .createRUMOperationStrongLink(params) + .then((data: v2.RUMOperationStrongLinkResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/rum-operations/DeleteRUMOperation.ts b/examples/v2/rum-operations/DeleteRUMOperation.ts new file mode 100644 index 000000000000..24f226195896 --- /dev/null +++ b/examples/v2/rum-operations/DeleteRUMOperation.ts @@ -0,0 +1,22 @@ +/** + * Delete a RUM operation returns "No Content" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.deleteRUMOperation"] = true; +const apiInstance = new v2.RUMOperationsApi(configuration); + +const params: v2.RUMOperationsApiDeleteRUMOperationRequest = { + rumOperationId: "rum_operation_id", +}; + +apiInstance + .deleteRUMOperation(params) + .then((data: any) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/rum-operations/DeleteRUMOperationStrongLink.ts b/examples/v2/rum-operations/DeleteRUMOperationStrongLink.ts new file mode 100644 index 000000000000..e5969d7cec3f --- /dev/null +++ b/examples/v2/rum-operations/DeleteRUMOperationStrongLink.ts @@ -0,0 +1,23 @@ +/** + * Delete a RUM operation strong link returns "No Content" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.deleteRUMOperationStrongLink"] = true; +const apiInstance = new v2.RUMOperationsApi(configuration); + +const params: v2.RUMOperationsApiDeleteRUMOperationStrongLinkRequest = { + rumOperationId: "rum_operation_id", + featureId: "feature_id", +}; + +apiInstance + .deleteRUMOperationStrongLink(params) + .then((data: any) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/rum-operations/GetRUMOperation.ts b/examples/v2/rum-operations/GetRUMOperation.ts new file mode 100644 index 000000000000..aab61c8a583a --- /dev/null +++ b/examples/v2/rum-operations/GetRUMOperation.ts @@ -0,0 +1,22 @@ +/** + * Get a RUM operation returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.getRUMOperation"] = true; +const apiInstance = new v2.RUMOperationsApi(configuration); + +const params: v2.RUMOperationsApiGetRUMOperationRequest = { + rumOperationId: "rum_operation_id", +}; + +apiInstance + .getRUMOperation(params) + .then((data: v2.RUMOperationResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/rum-operations/GetRUMOperationByName.ts b/examples/v2/rum-operations/GetRUMOperationByName.ts new file mode 100644 index 000000000000..f0a86558d5c7 --- /dev/null +++ b/examples/v2/rum-operations/GetRUMOperationByName.ts @@ -0,0 +1,22 @@ +/** + * Get a RUM operation by name returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.getRUMOperationByName"] = true; +const apiInstance = new v2.RUMOperationsApi(configuration); + +const params: v2.RUMOperationsApiGetRUMOperationByNameRequest = { + name: "name", +}; + +apiInstance + .getRUMOperationByName(params) + .then((data: v2.RUMOperationResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/rum-operations/ListRUMOperationStrongLinks.ts b/examples/v2/rum-operations/ListRUMOperationStrongLinks.ts new file mode 100644 index 000000000000..6518f39120ab --- /dev/null +++ b/examples/v2/rum-operations/ListRUMOperationStrongLinks.ts @@ -0,0 +1,17 @@ +/** + * List RUM operation strong links returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.RUMOperationsApi(configuration); + +apiInstance + .listRUMOperationStrongLinks() + .then((data: v2.RUMOperationStrongLinksListResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/rum-operations/ListRUMOperations.ts b/examples/v2/rum-operations/ListRUMOperations.ts new file mode 100644 index 000000000000..930937d83037 --- /dev/null +++ b/examples/v2/rum-operations/ListRUMOperations.ts @@ -0,0 +1,18 @@ +/** + * Search RUM operations returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.listRUMOperations"] = true; +const apiInstance = new v2.RUMOperationsApi(configuration); + +apiInstance + .listRUMOperations() + .then((data: v2.RUMOperationsListResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/rum-operations/UpdateRUMOperation.ts b/examples/v2/rum-operations/UpdateRUMOperation.ts new file mode 100644 index 000000000000..e8a685897284 --- /dev/null +++ b/examples/v2/rum-operations/UpdateRUMOperation.ts @@ -0,0 +1,58 @@ +/** + * Update a RUM operation returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.updateRUMOperation"] = true; +const apiInstance = new v2.RUMOperationsApi(configuration); + +const params: v2.RUMOperationsApiUpdateRUMOperationRequest = { + body: { + data: { + attributes: { + applicationId: "abc12345-1234-5678-abcd-ef1234567890", + category: undefined, + description: undefined, + displayName: "Checkout completed", + featureIds: [], + journeyRum: { + rumSteps: [ + { + composite: { + kind: "all_of", + maxWindowMs: 30000, + predicates: [ + { + query: "@type:action @action.type:click", + }, + ], + }, + nodes: [ + { + query: "@type:action @action.type:click", + }, + ], + type: "start", + }, + ], + }, + name: "checkout_completed", + tags: ["team:checkout"], + }, + id: "abc12345-1234-5678-abcd-ef1234567890", + type: "operations", + }, + }, + rumOperationId: "rum_operation_id", +}; + +apiInstance + .updateRUMOperation(params) + .then((data: v2.RUMOperationResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/rum-operations/UpdateRUMOperationStrongLink.ts b/examples/v2/rum-operations/UpdateRUMOperationStrongLink.ts new file mode 100644 index 000000000000..4fcd5ab65e66 --- /dev/null +++ b/examples/v2/rum-operations/UpdateRUMOperationStrongLink.ts @@ -0,0 +1,31 @@ +/** + * Update a RUM operation strong link returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.updateRUMOperationStrongLink"] = true; +const apiInstance = new v2.RUMOperationsApi(configuration); + +const params: v2.RUMOperationsApiUpdateRUMOperationStrongLinkRequest = { + body: { + data: { + attributes: { + status: "CONFIRMED", + }, + type: "strong_links", + }, + }, + rumOperationId: "rum_operation_id", + featureId: "feature_id", +}; + +apiInstance + .updateRUMOperationStrongLink(params) + .then((data: v2.RUMOperationStrongLinkResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/features/support/scenarios_model_mapping.ts b/features/support/scenarios_model_mapping.ts index d097590338e7..cd8381df1f06 100644 --- a/features/support/scenarios_model_mapping.ts +++ b/features/support/scenarios_model_mapping.ts @@ -14902,6 +14902,128 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { }, "operationResponseType": "{}", }, + "v2.CreateRUMOperation": { + "body": { + "type": "RUMOperationCreateRequest", + "format": "", + }, + "operationResponseType": "RUMOperationResponse", + }, + "v2.GetRUMOperationByName": { + "name": { + "type": "string", + "format": "", + }, + "operationResponseType": "RUMOperationResponse", + }, + "v2.ListRUMOperations": { + "query": { + "type": "string", + "format": "", + }, + "pageOffset": { + "type": "number", + "format": "int64", + }, + "pageLimit": { + "type": "number", + "format": "int64", + }, + "creator": { + "type": "string", + "format": "", + }, + "team": { + "type": "string", + "format": "", + }, + "featureId": { + "type": "string", + "format": "", + }, + "applicationId": { + "type": "string", + "format": "uuid", + }, + "operationResponseType": "RUMOperationsListResponse", + }, + "v2.ListRUMOperationStrongLinks": { + "operationId": { + "type": "string", + "format": "", + }, + "featureId": { + "type": "string", + "format": "", + }, + "pageOffset": { + "type": "number", + "format": "int64", + }, + "pageLimit": { + "type": "number", + "format": "int64", + }, + "operationResponseType": "RUMOperationStrongLinksListResponse", + }, + "v2.CreateRUMOperationStrongLink": { + "body": { + "type": "RUMOperationStrongLinkCreateRequest", + "format": "", + }, + "operationResponseType": "RUMOperationStrongLinkResponse", + }, + "v2.UpdateRUMOperationStrongLink": { + "rumOperationId": { + "type": "string", + "format": "", + }, + "featureId": { + "type": "string", + "format": "", + }, + "body": { + "type": "RUMOperationStrongLinkUpdateRequest", + "format": "", + }, + "operationResponseType": "RUMOperationStrongLinkResponse", + }, + "v2.DeleteRUMOperationStrongLink": { + "rumOperationId": { + "type": "string", + "format": "", + }, + "featureId": { + "type": "string", + "format": "", + }, + "operationResponseType": "{}", + }, + "v2.GetRUMOperation": { + "rumOperationId": { + "type": "string", + "format": "", + }, + "operationResponseType": "RUMOperationResponse", + }, + "v2.UpdateRUMOperation": { + "rumOperationId": { + "type": "string", + "format": "", + }, + "body": { + "type": "RUMOperationUpdateRequest", + "format": "", + }, + "operationResponseType": "RUMOperationResponse", + }, + "v2.DeleteRUMOperation": { + "rumOperationId": { + "type": "string", + "format": "", + }, + "operationResponseType": "{}", + }, "v2.QueryAggregatedLongTasks": { "body": { "type": "AggregatedLongTasksRequest", diff --git a/features/v2/rum_operations.feature b/features/v2/rum_operations.feature new file mode 100644 index 000000000000..e2e2043ed776 --- /dev/null +++ b/features/v2/rum_operations.feature @@ -0,0 +1,234 @@ +@endpoint(rum-operations) @endpoint(rum-operations-v2) +Feature: RUM Operations + Manage [RUM Operations](https://docs.datadoghq.com/real_user_monitoring/), + business transactions detected from RUM events through a configurable + journey, and their strong links to features. See the [RUM & Session Replay + page](https://docs.datadoghq.com/real_user_monitoring/) for more + information. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "RUMOperations" API + + @generated @skip @team:DataDog/rum-backend + Scenario: Create a RUM operation returns "Bad Request" response + Given operation "CreateRUMOperation" enabled + And new "CreateRUMOperation" request + And body with value {"data": {"attributes": {"application_id": "abc12345-1234-5678-abcd-ef1234567890", "category": null, "description": null, "display_name": "Checkout completed", "feature_ids": [], "journey_rum": {"rum_steps": [{"composite": {"kind": "all_of", "max_window_ms": 30000, "predicates": [{"query": "@type:action @action.type:click"}]}, "nodes": [{"query": "@type:action @action.type:click"}], "type": "start"}]}, "name": "checkout_completed", "tags": ["team:checkout"]}, "type": "operations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: Create a RUM operation returns "Conflict. An operation with this name already exists." response + Given operation "CreateRUMOperation" enabled + And new "CreateRUMOperation" request + And body with value {"data": {"attributes": {"application_id": "abc12345-1234-5678-abcd-ef1234567890", "category": null, "description": null, "display_name": "Checkout completed", "feature_ids": [], "journey_rum": {"rum_steps": [{"composite": {"kind": "all_of", "max_window_ms": 30000, "predicates": [{"query": "@type:action @action.type:click"}]}, "nodes": [{"query": "@type:action @action.type:click"}], "type": "start"}]}, "name": "checkout_completed", "tags": ["team:checkout"]}, "type": "operations"}} + When the request is sent + Then the response status is 409 Conflict. An operation with this name already exists. + + @generated @skip @team:DataDog/rum-backend + Scenario: Create a RUM operation returns "OK" response + Given operation "CreateRUMOperation" enabled + And new "CreateRUMOperation" request + And body with value {"data": {"attributes": {"application_id": "abc12345-1234-5678-abcd-ef1234567890", "category": null, "description": null, "display_name": "Checkout completed", "feature_ids": [], "journey_rum": {"rum_steps": [{"composite": {"kind": "all_of", "max_window_ms": 30000, "predicates": [{"query": "@type:action @action.type:click"}]}, "nodes": [{"query": "@type:action @action.type:click"}], "type": "start"}]}, "name": "checkout_completed", "tags": ["team:checkout"]}, "type": "operations"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/rum-backend + Scenario: Create a RUM operation strong link returns "Bad Request" response + Given operation "CreateRUMOperationStrongLink" enabled + And new "CreateRUMOperationStrongLink" request + And body with value {"data": {"attributes": {"description": null, "feature_id": "feature-123", "operation_id": "abc12345-1234-5678-abcd-ef1234567890", "status": "CONFIRMED", "tags": []}, "type": "strong_links"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: Create a RUM operation strong link returns "Conflict. A strong link between this operation and feature already exists." response + Given operation "CreateRUMOperationStrongLink" enabled + And new "CreateRUMOperationStrongLink" request + And body with value {"data": {"attributes": {"description": null, "feature_id": "feature-123", "operation_id": "abc12345-1234-5678-abcd-ef1234567890", "status": "CONFIRMED", "tags": []}, "type": "strong_links"}} + When the request is sent + Then the response status is 409 Conflict. A strong link between this operation and feature already exists. + + @generated @skip @team:DataDog/rum-backend + Scenario: Create a RUM operation strong link returns "Created" response + Given operation "CreateRUMOperationStrongLink" enabled + And new "CreateRUMOperationStrongLink" request + And body with value {"data": {"attributes": {"description": null, "feature_id": "feature-123", "operation_id": "abc12345-1234-5678-abcd-ef1234567890", "status": "CONFIRMED", "tags": []}, "type": "strong_links"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/rum-backend + Scenario: Create a RUM operation strong link returns "Not Found. The referenced `operation_id` does not exist." response + Given operation "CreateRUMOperationStrongLink" enabled + And new "CreateRUMOperationStrongLink" request + And body with value {"data": {"attributes": {"description": null, "feature_id": "feature-123", "operation_id": "abc12345-1234-5678-abcd-ef1234567890", "status": "CONFIRMED", "tags": []}, "type": "strong_links"}} + When the request is sent + Then the response status is 404 Not Found. The referenced `operation_id` does not exist. + + @generated @skip @team:DataDog/rum-backend + Scenario: Delete a RUM operation returns "No Content" response + Given operation "DeleteRUMOperation" enabled + And new "DeleteRUMOperation" request + And request contains "rum_operation_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/rum-backend + Scenario: Delete a RUM operation returns "Not Found" response + Given operation "DeleteRUMOperation" enabled + And new "DeleteRUMOperation" request + And request contains "rum_operation_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/rum-backend + Scenario: Delete a RUM operation strong link returns "No Content" response + Given operation "DeleteRUMOperationStrongLink" enabled + And new "DeleteRUMOperationStrongLink" request + And request contains "rum_operation_id" parameter from "REPLACE.ME" + And request contains "feature_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/rum-backend + Scenario: Delete a RUM operation strong link returns "Not Found" response + Given operation "DeleteRUMOperationStrongLink" enabled + And new "DeleteRUMOperationStrongLink" request + And request contains "rum_operation_id" parameter from "REPLACE.ME" + And request contains "feature_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/rum-backend + Scenario: Get a RUM operation by name returns "Bad Request" response + Given operation "GetRUMOperationByName" enabled + And new "GetRUMOperationByName" request + And request contains "name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: Get a RUM operation by name returns "Not Found" response + Given operation "GetRUMOperationByName" enabled + And new "GetRUMOperationByName" request + And request contains "name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/rum-backend + Scenario: Get a RUM operation by name returns "OK" response + Given operation "GetRUMOperationByName" enabled + And new "GetRUMOperationByName" request + And request contains "name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/rum-backend + Scenario: Get a RUM operation returns "Not Found" response + Given operation "GetRUMOperation" enabled + And new "GetRUMOperation" request + And request contains "rum_operation_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/rum-backend + Scenario: Get a RUM operation returns "OK" response + Given operation "GetRUMOperation" enabled + And new "GetRUMOperation" request + And request contains "rum_operation_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/rum-backend + Scenario: List RUM operation strong links returns "Bad Request" response + Given new "ListRUMOperationStrongLinks" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: List RUM operation strong links returns "OK" response + Given new "ListRUMOperationStrongLinks" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/rum-backend + Scenario: Search RUM operations returns "Bad Request" response + Given operation "ListRUMOperations" enabled + And new "ListRUMOperations" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: Search RUM operations returns "OK" response + Given operation "ListRUMOperations" enabled + And new "ListRUMOperations" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/rum-backend + Scenario: Update a RUM operation returns "Bad Request" response + Given operation "UpdateRUMOperation" enabled + And new "UpdateRUMOperation" request + And request contains "rum_operation_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"application_id": "abc12345-1234-5678-abcd-ef1234567890", "category": null, "description": null, "display_name": "Checkout completed", "feature_ids": [], "journey_rum": {"rum_steps": [{"composite": {"kind": "all_of", "max_window_ms": 30000, "predicates": [{"query": "@type:action @action.type:click"}]}, "nodes": [{"query": "@type:action @action.type:click"}], "type": "start"}]}, "name": "checkout_completed", "tags": ["team:checkout"]}, "id": "abc12345-1234-5678-abcd-ef1234567890", "type": "operations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: Update a RUM operation returns "Conflict. An operation with this name already exists." response + Given operation "UpdateRUMOperation" enabled + And new "UpdateRUMOperation" request + And request contains "rum_operation_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"application_id": "abc12345-1234-5678-abcd-ef1234567890", "category": null, "description": null, "display_name": "Checkout completed", "feature_ids": [], "journey_rum": {"rum_steps": [{"composite": {"kind": "all_of", "max_window_ms": 30000, "predicates": [{"query": "@type:action @action.type:click"}]}, "nodes": [{"query": "@type:action @action.type:click"}], "type": "start"}]}, "name": "checkout_completed", "tags": ["team:checkout"]}, "id": "abc12345-1234-5678-abcd-ef1234567890", "type": "operations"}} + When the request is sent + Then the response status is 409 Conflict. An operation with this name already exists. + + @generated @skip @team:DataDog/rum-backend + Scenario: Update a RUM operation returns "Not Found" response + Given operation "UpdateRUMOperation" enabled + And new "UpdateRUMOperation" request + And request contains "rum_operation_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"application_id": "abc12345-1234-5678-abcd-ef1234567890", "category": null, "description": null, "display_name": "Checkout completed", "feature_ids": [], "journey_rum": {"rum_steps": [{"composite": {"kind": "all_of", "max_window_ms": 30000, "predicates": [{"query": "@type:action @action.type:click"}]}, "nodes": [{"query": "@type:action @action.type:click"}], "type": "start"}]}, "name": "checkout_completed", "tags": ["team:checkout"]}, "id": "abc12345-1234-5678-abcd-ef1234567890", "type": "operations"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/rum-backend + Scenario: Update a RUM operation returns "OK" response + Given operation "UpdateRUMOperation" enabled + And new "UpdateRUMOperation" request + And request contains "rum_operation_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"application_id": "abc12345-1234-5678-abcd-ef1234567890", "category": null, "description": null, "display_name": "Checkout completed", "feature_ids": [], "journey_rum": {"rum_steps": [{"composite": {"kind": "all_of", "max_window_ms": 30000, "predicates": [{"query": "@type:action @action.type:click"}]}, "nodes": [{"query": "@type:action @action.type:click"}], "type": "start"}]}, "name": "checkout_completed", "tags": ["team:checkout"]}, "id": "abc12345-1234-5678-abcd-ef1234567890", "type": "operations"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/rum-backend + Scenario: Update a RUM operation strong link returns "Bad Request" response + Given operation "UpdateRUMOperationStrongLink" enabled + And new "UpdateRUMOperationStrongLink" request + And request contains "rum_operation_id" parameter from "REPLACE.ME" + And request contains "feature_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"status": "CONFIRMED"}, "type": "strong_links"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: Update a RUM operation strong link returns "Not Found" response + Given operation "UpdateRUMOperationStrongLink" enabled + And new "UpdateRUMOperationStrongLink" request + And request contains "rum_operation_id" parameter from "REPLACE.ME" + And request contains "feature_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"status": "CONFIRMED"}, "type": "strong_links"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/rum-backend + Scenario: Update a RUM operation strong link returns "OK" response + Given operation "UpdateRUMOperationStrongLink" enabled + And new "UpdateRUMOperationStrongLink" request + And request contains "rum_operation_id" parameter from "REPLACE.ME" + And request contains "feature_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"status": "CONFIRMED"}, "type": "strong_links"}} + When the request is sent + Then the response status is 200 OK diff --git a/features/v2/undo.json b/features/v2/undo.json index d93991ac7d73..d147093e60df 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -6960,6 +6960,66 @@ "type": "safe" } }, + "CreateRUMOperation": { + "tag": "RUM Operations", + "undo": { + "type": "unsafe" + } + }, + "GetRUMOperationByName": { + "tag": "RUM Operations", + "undo": { + "type": "safe" + } + }, + "ListRUMOperations": { + "tag": "RUM Operations", + "undo": { + "type": "safe" + } + }, + "ListRUMOperationStrongLinks": { + "tag": "RUM Operations", + "undo": { + "type": "safe" + } + }, + "CreateRUMOperationStrongLink": { + "tag": "RUM Operations", + "undo": { + "type": "unsafe" + } + }, + "DeleteRUMOperationStrongLink": { + "tag": "RUM Operations", + "undo": { + "type": "idempotent" + } + }, + "UpdateRUMOperationStrongLink": { + "tag": "RUM Operations", + "undo": { + "type": "idempotent" + } + }, + "DeleteRUMOperation": { + "tag": "RUM Operations", + "undo": { + "type": "idempotent" + } + }, + "GetRUMOperation": { + "tag": "RUM Operations", + "undo": { + "type": "safe" + } + }, + "UpdateRUMOperation": { + "tag": "RUM Operations", + "undo": { + "type": "idempotent" + } + }, "QueryAggregatedLongTasks": { "tag": "RUM Insights", "undo": { diff --git a/packages/datadog-api-client-common/configuration.ts b/packages/datadog-api-client-common/configuration.ts index ebabaac11b6e..ba451067b416 100644 --- a/packages/datadog-api-client-common/configuration.ts +++ b/packages/datadog-api-client-common/configuration.ts @@ -673,6 +673,15 @@ export function createConfiguration( "v2.deleteRumRateLimitConfig": false, "v2.getRumRateLimitConfig": false, "v2.updateRumRateLimitConfig": false, + "v2.createRUMOperation": false, + "v2.createRUMOperationStrongLink": false, + "v2.deleteRUMOperation": false, + "v2.deleteRUMOperationStrongLink": false, + "v2.getRUMOperation": false, + "v2.getRUMOperationByName": false, + "v2.listRUMOperations": false, + "v2.updateRUMOperation": false, + "v2.updateRUMOperationStrongLink": false, "v2.queryAggregatedLongTasks": false, "v2.queryAggregatedSignalsProblems": false, "v2.queryAggregatedWaterfall": false, diff --git a/packages/datadog-api-client-v2/apis/RUMOperationsApi.ts b/packages/datadog-api-client-v2/apis/RUMOperationsApi.ts new file mode 100644 index 000000000000..4f3bc0814f30 --- /dev/null +++ b/packages/datadog-api-client-v2/apis/RUMOperationsApi.ts @@ -0,0 +1,1759 @@ +import { + BaseAPIRequestFactory, + RequiredError, +} from "../../datadog-api-client-common/baseapi"; +import { + Configuration, + applySecurityAuthentication, +} from "../../datadog-api-client-common/configuration"; +import { + RequestContext, + HttpMethod, + ResponseContext, +} from "../../datadog-api-client-common/http/http"; + +import { logger } from "../../../logger"; +import { ObjectSerializer } from "../models/ObjectSerializer"; +import { ApiException } from "../../datadog-api-client-common/exception"; + +import { APIErrorResponse } from "../models/APIErrorResponse"; +import { JSONAPIErrorResponse } from "../models/JSONAPIErrorResponse"; +import { RUMOperationCreateRequest } from "../models/RUMOperationCreateRequest"; +import { RUMOperationResponse } from "../models/RUMOperationResponse"; +import { RUMOperationsListResponse } from "../models/RUMOperationsListResponse"; +import { RUMOperationStrongLinkCreateRequest } from "../models/RUMOperationStrongLinkCreateRequest"; +import { RUMOperationStrongLinkResponse } from "../models/RUMOperationStrongLinkResponse"; +import { RUMOperationStrongLinksListResponse } from "../models/RUMOperationStrongLinksListResponse"; +import { RUMOperationStrongLinkUpdateRequest } from "../models/RUMOperationStrongLinkUpdateRequest"; +import { RUMOperationUpdateRequest } from "../models/RUMOperationUpdateRequest"; + +export class RUMOperationsApiRequestFactory extends BaseAPIRequestFactory { + public async createRUMOperation( + body: RUMOperationCreateRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'createRUMOperation'"); + if (!_config.unstableOperations["v2.createRUMOperation"]) { + throw new Error("Unstable operation 'createRUMOperation' is disabled"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createRUMOperation"); + } + + // Path Params + const localVarPath = "/api/v2/rum/operations"; + + // Make Request Context + const requestContext = _config + .getServer("v2.RUMOperationsApi.createRUMOperation") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "RUMOperationCreateRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async createRUMOperationStrongLink( + body: RUMOperationStrongLinkCreateRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'createRUMOperationStrongLink'"); + if (!_config.unstableOperations["v2.createRUMOperationStrongLink"]) { + throw new Error( + "Unstable operation 'createRUMOperationStrongLink' is disabled" + ); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createRUMOperationStrongLink"); + } + + // Path Params + const localVarPath = "/api/v2/rum/operations/strong_links"; + + // Make Request Context + const requestContext = _config + .getServer("v2.RUMOperationsApi.createRUMOperationStrongLink") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize( + body, + "RUMOperationStrongLinkCreateRequest", + "" + ), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async deleteRUMOperation( + rumOperationId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'deleteRUMOperation'"); + if (!_config.unstableOperations["v2.deleteRUMOperation"]) { + throw new Error("Unstable operation 'deleteRUMOperation' is disabled"); + } + + // verify required parameter 'rumOperationId' is not null or undefined + if (rumOperationId === null || rumOperationId === undefined) { + throw new RequiredError("rumOperationId", "deleteRUMOperation"); + } + + // Path Params + const localVarPath = "/api/v2/rum/operations/{rum_operation_id}".replace( + "{rum_operation_id}", + encodeURIComponent(String(rumOperationId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.RUMOperationsApi.deleteRUMOperation") + .makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "*/*"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async deleteRUMOperationStrongLink( + rumOperationId: string, + featureId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'deleteRUMOperationStrongLink'"); + if (!_config.unstableOperations["v2.deleteRUMOperationStrongLink"]) { + throw new Error( + "Unstable operation 'deleteRUMOperationStrongLink' is disabled" + ); + } + + // verify required parameter 'rumOperationId' is not null or undefined + if (rumOperationId === null || rumOperationId === undefined) { + throw new RequiredError("rumOperationId", "deleteRUMOperationStrongLink"); + } + + // verify required parameter 'featureId' is not null or undefined + if (featureId === null || featureId === undefined) { + throw new RequiredError("featureId", "deleteRUMOperationStrongLink"); + } + + // Path Params + const localVarPath = + "/api/v2/rum/operations/strong_links/{rum_operation_id}/{feature_id}" + .replace( + "{rum_operation_id}", + encodeURIComponent(String(rumOperationId)) + ) + .replace("{feature_id}", encodeURIComponent(String(featureId))); + + // Make Request Context + const requestContext = _config + .getServer("v2.RUMOperationsApi.deleteRUMOperationStrongLink") + .makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "*/*"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async getRUMOperation( + rumOperationId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'getRUMOperation'"); + if (!_config.unstableOperations["v2.getRUMOperation"]) { + throw new Error("Unstable operation 'getRUMOperation' is disabled"); + } + + // verify required parameter 'rumOperationId' is not null or undefined + if (rumOperationId === null || rumOperationId === undefined) { + throw new RequiredError("rumOperationId", "getRUMOperation"); + } + + // Path Params + const localVarPath = "/api/v2/rum/operations/{rum_operation_id}".replace( + "{rum_operation_id}", + encodeURIComponent(String(rumOperationId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.RUMOperationsApi.getRUMOperation") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async getRUMOperationByName( + name: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'getRUMOperationByName'"); + if (!_config.unstableOperations["v2.getRUMOperationByName"]) { + throw new Error("Unstable operation 'getRUMOperationByName' is disabled"); + } + + // verify required parameter 'name' is not null or undefined + if (name === null || name === undefined) { + throw new RequiredError("name", "getRUMOperationByName"); + } + + // Path Params + const localVarPath = "/api/v2/rum/operations/by-name/{name}".replace( + "{name}", + encodeURIComponent(String(name)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.RUMOperationsApi.getRUMOperationByName") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async listRUMOperations( + query?: string, + pageOffset?: number, + pageLimit?: number, + creator?: string, + team?: string, + featureId?: string, + applicationId?: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'listRUMOperations'"); + if (!_config.unstableOperations["v2.listRUMOperations"]) { + throw new Error("Unstable operation 'listRUMOperations' is disabled"); + } + + // Path Params + const localVarPath = "/api/v2/rum/operations/search"; + + // Make Request Context + const requestContext = _config + .getServer("v2.RUMOperationsApi.listRUMOperations") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (query !== undefined) { + requestContext.setQueryParam( + "query", + ObjectSerializer.serialize(query, "string", ""), + "" + ); + } + if (pageOffset !== undefined) { + requestContext.setQueryParam( + "page[offset]", + ObjectSerializer.serialize(pageOffset, "number", "int64"), + "" + ); + } + if (pageLimit !== undefined) { + requestContext.setQueryParam( + "page[limit]", + ObjectSerializer.serialize(pageLimit, "number", "int64"), + "" + ); + } + if (creator !== undefined) { + requestContext.setQueryParam( + "creator", + ObjectSerializer.serialize(creator, "string", ""), + "" + ); + } + if (team !== undefined) { + requestContext.setQueryParam( + "team", + ObjectSerializer.serialize(team, "string", ""), + "" + ); + } + if (featureId !== undefined) { + requestContext.setQueryParam( + "feature_id", + ObjectSerializer.serialize(featureId, "string", ""), + "" + ); + } + if (applicationId !== undefined) { + requestContext.setQueryParam( + "application_id", + ObjectSerializer.serialize(applicationId, "string", "uuid"), + "" + ); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async listRUMOperationStrongLinks( + operationId?: string, + featureId?: string, + pageOffset?: number, + pageLimit?: number, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // Path Params + const localVarPath = "/api/v2/rum/operations/strong_links"; + + // Make Request Context + const requestContext = _config + .getServer("v2.RUMOperationsApi.listRUMOperationStrongLinks") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (operationId !== undefined) { + requestContext.setQueryParam( + "operation_id", + ObjectSerializer.serialize(operationId, "string", ""), + "" + ); + } + if (featureId !== undefined) { + requestContext.setQueryParam( + "feature_id", + ObjectSerializer.serialize(featureId, "string", ""), + "" + ); + } + if (pageOffset !== undefined) { + requestContext.setQueryParam( + "page[offset]", + ObjectSerializer.serialize(pageOffset, "number", "int64"), + "" + ); + } + if (pageLimit !== undefined) { + requestContext.setQueryParam( + "page[limit]", + ObjectSerializer.serialize(pageLimit, "number", "int64"), + "" + ); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async updateRUMOperation( + rumOperationId: string, + body: RUMOperationUpdateRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'updateRUMOperation'"); + if (!_config.unstableOperations["v2.updateRUMOperation"]) { + throw new Error("Unstable operation 'updateRUMOperation' is disabled"); + } + + // verify required parameter 'rumOperationId' is not null or undefined + if (rumOperationId === null || rumOperationId === undefined) { + throw new RequiredError("rumOperationId", "updateRUMOperation"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateRUMOperation"); + } + + // Path Params + const localVarPath = "/api/v2/rum/operations/{rum_operation_id}".replace( + "{rum_operation_id}", + encodeURIComponent(String(rumOperationId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.RUMOperationsApi.updateRUMOperation") + .makeRequestContext(localVarPath, HttpMethod.PUT); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "RUMOperationUpdateRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async updateRUMOperationStrongLink( + rumOperationId: string, + featureId: string, + body: RUMOperationStrongLinkUpdateRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'updateRUMOperationStrongLink'"); + if (!_config.unstableOperations["v2.updateRUMOperationStrongLink"]) { + throw new Error( + "Unstable operation 'updateRUMOperationStrongLink' is disabled" + ); + } + + // verify required parameter 'rumOperationId' is not null or undefined + if (rumOperationId === null || rumOperationId === undefined) { + throw new RequiredError("rumOperationId", "updateRUMOperationStrongLink"); + } + + // verify required parameter 'featureId' is not null or undefined + if (featureId === null || featureId === undefined) { + throw new RequiredError("featureId", "updateRUMOperationStrongLink"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateRUMOperationStrongLink"); + } + + // Path Params + const localVarPath = + "/api/v2/rum/operations/strong_links/{rum_operation_id}/{feature_id}" + .replace( + "{rum_operation_id}", + encodeURIComponent(String(rumOperationId)) + ) + .replace("{feature_id}", encodeURIComponent(String(featureId))); + + // Make Request Context + const requestContext = _config + .getServer("v2.RUMOperationsApi.updateRUMOperationStrongLink") + .makeRequestContext(localVarPath, HttpMethod.PUT); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize( + body, + "RUMOperationStrongLinkUpdateRequest", + "" + ), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } +} + +export class RUMOperationsApiResponseProcessor { + /** + * 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 createRUMOperation + * @throws ApiException if the response code was not in [200, 299] + */ + public async createRUMOperation( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: RUMOperationResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RUMOperationResponse" + ) as RUMOperationResponse; + return body; + } + if (response.httpStatusCode === 400 || response.httpStatusCode === 409) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "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 = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: RUMOperationResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RUMOperationResponse", + "" + ) as RUMOperationResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createRUMOperationStrongLink + * @throws ApiException if the response code was not in [200, 299] + */ + public async createRUMOperationStrongLink( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 201) { + const body: RUMOperationStrongLinkResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RUMOperationStrongLinkResponse" + ) as RUMOperationStrongLinkResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 404 || + response.httpStatusCode === 409 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "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 = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: RUMOperationStrongLinkResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RUMOperationStrongLinkResponse", + "" + ) as RUMOperationStrongLinkResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteRUMOperation + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteRUMOperation(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 204) { + return; + } + if (response.httpStatusCode === 404) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "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 = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteRUMOperationStrongLink + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteRUMOperationStrongLink( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 204) { + return; + } + if (response.httpStatusCode === 404) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "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 = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getRUMOperation + * @throws ApiException if the response code was not in [200, 299] + */ + public async getRUMOperation( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: RUMOperationResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RUMOperationResponse" + ) as RUMOperationResponse; + return body; + } + if (response.httpStatusCode === 404) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "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 = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: RUMOperationResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RUMOperationResponse", + "" + ) as RUMOperationResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getRUMOperationByName + * @throws ApiException if the response code was not in [200, 299] + */ + public async getRUMOperationByName( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: RUMOperationResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RUMOperationResponse" + ) as RUMOperationResponse; + return body; + } + if (response.httpStatusCode === 400 || response.httpStatusCode === 404) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "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 = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: RUMOperationResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RUMOperationResponse", + "" + ) as RUMOperationResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to listRUMOperations + * @throws ApiException if the response code was not in [200, 299] + */ + public async listRUMOperations( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: RUMOperationsListResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RUMOperationsListResponse" + ) as RUMOperationsListResponse; + return body; + } + if (response.httpStatusCode === 400) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "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 = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: RUMOperationsListResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RUMOperationsListResponse", + "" + ) as RUMOperationsListResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to listRUMOperationStrongLinks + * @throws ApiException if the response code was not in [200, 299] + */ + public async listRUMOperationStrongLinks( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: RUMOperationStrongLinksListResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RUMOperationStrongLinksListResponse" + ) as RUMOperationStrongLinksListResponse; + return body; + } + if (response.httpStatusCode === 400) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "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 = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: RUMOperationStrongLinksListResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RUMOperationStrongLinksListResponse", + "" + ) as RUMOperationStrongLinksListResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateRUMOperation + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateRUMOperation( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: RUMOperationResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RUMOperationResponse" + ) as RUMOperationResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 404 || + response.httpStatusCode === 409 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "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 = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: RUMOperationResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RUMOperationResponse", + "" + ) as RUMOperationResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateRUMOperationStrongLink + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateRUMOperationStrongLink( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: RUMOperationStrongLinkResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RUMOperationStrongLinkResponse" + ) as RUMOperationStrongLinkResponse; + return body; + } + if (response.httpStatusCode === 400 || response.httpStatusCode === 404) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "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 = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: RUMOperationStrongLinkResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "RUMOperationStrongLinkResponse", + "" + ) as RUMOperationStrongLinkResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } +} + +export interface RUMOperationsApiCreateRUMOperationRequest { + /** + * @type RUMOperationCreateRequest + */ + body: RUMOperationCreateRequest; +} + +export interface RUMOperationsApiCreateRUMOperationStrongLinkRequest { + /** + * @type RUMOperationStrongLinkCreateRequest + */ + body: RUMOperationStrongLinkCreateRequest; +} + +export interface RUMOperationsApiDeleteRUMOperationRequest { + /** + * The unique identifier of the RUM operation to delete. + * @type string + */ + rumOperationId: string; +} + +export interface RUMOperationsApiDeleteRUMOperationStrongLinkRequest { + /** + * The unique identifier of the RUM operation. + * @type string + */ + rumOperationId: string; + /** + * The unique identifier of the feature. + * @type string + */ + featureId: string; +} + +export interface RUMOperationsApiGetRUMOperationRequest { + /** + * The unique identifier of the RUM operation. + * @type string + */ + rumOperationId: string; +} + +export interface RUMOperationsApiGetRUMOperationByNameRequest { + /** + * The unique name of the RUM operation. + * @type string + */ + name: string; +} + +export interface RUMOperationsApiListRUMOperationsRequest { + /** + * A search query to filter operations by name. + * @type string + */ + query?: string; + /** + * Offset for pagination. + * @type number + */ + pageOffset?: number; + /** + * Number of items per page. Maximum of 100. + * @type number + */ + pageLimit?: number; + /** + * Filter operations by the email of their creator. + * @type string + */ + creator?: string; + /** + * Filter operations by team. Accepts a comma-separated list of teams. + * @type string + */ + team?: string; + /** + * Filter operations by feature ID. Accepts a comma-separated list of feature IDs. + * @type string + */ + featureId?: string; + /** + * Filter operations by RUM application ID. + * @type string + */ + applicationId?: string; +} + +export interface RUMOperationsApiListRUMOperationStrongLinksRequest { + /** + * Filter strong links by RUM operation ID. + * @type string + */ + operationId?: string; + /** + * Filter strong links by feature ID. + * @type string + */ + featureId?: string; + /** + * Offset for pagination. + * @type number + */ + pageOffset?: number; + /** + * Number of items per page. Maximum of 200. + * @type number + */ + pageLimit?: number; +} + +export interface RUMOperationsApiUpdateRUMOperationRequest { + /** + * The unique identifier of the RUM operation to update. + * @type string + */ + rumOperationId: string; + /** + * @type RUMOperationUpdateRequest + */ + body: RUMOperationUpdateRequest; +} + +export interface RUMOperationsApiUpdateRUMOperationStrongLinkRequest { + /** + * The unique identifier of the RUM operation. + * @type string + */ + rumOperationId: string; + /** + * The unique identifier of the feature. + * @type string + */ + featureId: string; + /** + * @type RUMOperationStrongLinkUpdateRequest + */ + body: RUMOperationStrongLinkUpdateRequest; +} + +export class RUMOperationsApi { + private requestFactory: RUMOperationsApiRequestFactory; + private responseProcessor: RUMOperationsApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: RUMOperationsApiRequestFactory, + responseProcessor?: RUMOperationsApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = + requestFactory || new RUMOperationsApiRequestFactory(configuration); + this.responseProcessor = + responseProcessor || new RUMOperationsApiResponseProcessor(); + } + + /** + * Create a new RUM operation, defining the journey used to detect it from RUM events. + * @param param The request object + */ + public createRUMOperation( + param: RUMOperationsApiCreateRUMOperationRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.createRUMOperation( + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createRUMOperation(responseContext); + }); + }); + } + + /** + * Create a strong link between a RUM operation and a feature, confirming that the feature + * belongs to the operation. The operation can be identified by `operation_id` or `operation_name`; + * if `operation_name` does not match an existing operation, a stub operation is created. + * @param param The request object + */ + public createRUMOperationStrongLink( + param: RUMOperationsApiCreateRUMOperationStrongLinkRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.createRUMOperationStrongLink(param.body, options); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createRUMOperationStrongLink( + responseContext + ); + }); + }); + } + + /** + * Delete a RUM operation. + * @param param The request object + */ + public deleteRUMOperation( + param: RUMOperationsApiDeleteRUMOperationRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.deleteRUMOperation( + param.rumOperationId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.deleteRUMOperation(responseContext); + }); + }); + } + + /** + * Delete the strong link between a RUM operation and a feature. + * @param param The request object + */ + public deleteRUMOperationStrongLink( + param: RUMOperationsApiDeleteRUMOperationStrongLinkRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.deleteRUMOperationStrongLink( + param.rumOperationId, + param.featureId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.deleteRUMOperationStrongLink( + responseContext + ); + }); + }); + } + + /** + * Retrieve a specific RUM operation by its unique identifier. + * @param param The request object + */ + public getRUMOperation( + param: RUMOperationsApiGetRUMOperationRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.getRUMOperation( + param.rumOperationId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getRUMOperation(responseContext); + }); + }); + } + + /** + * Retrieve a specific RUM operation by its unique name. + * @param param The request object + */ + public getRUMOperationByName( + param: RUMOperationsApiGetRUMOperationByNameRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.getRUMOperationByName( + param.name, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getRUMOperationByName(responseContext); + }); + }); + } + + /** + * Search RUM operations for your organization. Supports filtering by query, creator, team, feature, and application. + * @param param The request object + */ + public listRUMOperations( + param: RUMOperationsApiListRUMOperationsRequest = {}, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.listRUMOperations( + param.query, + param.pageOffset, + param.pageLimit, + param.creator, + param.team, + param.featureId, + param.applicationId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listRUMOperations(responseContext); + }); + }); + } + + /** + * List strong links between RUM operations and features. A strong link confirms that a feature + * belongs to an operation. Provide `operation_id`, `feature_id`, or both to filter results; + * at least one is required. + * @param param The request object + */ + public listRUMOperationStrongLinks( + param: RUMOperationsApiListRUMOperationStrongLinksRequest = {}, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.listRUMOperationStrongLinks( + param.operationId, + param.featureId, + param.pageOffset, + param.pageLimit, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listRUMOperationStrongLinks( + responseContext + ); + }); + }); + } + + /** + * Update an existing RUM operation. Fields omitted from the request body keep their existing value, + * with the exception of `journey_rum`, which is required and fully replaced on every update. + * @param param The request object + */ + public updateRUMOperation( + param: RUMOperationsApiUpdateRUMOperationRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.updateRUMOperation( + param.rumOperationId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateRUMOperation(responseContext); + }); + }); + } + + /** + * Update the status of a strong link between a RUM operation and a feature. + * @param param The request object + */ + public updateRUMOperationStrongLink( + param: RUMOperationsApiUpdateRUMOperationStrongLinkRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.updateRUMOperationStrongLink( + param.rumOperationId, + param.featureId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateRUMOperationStrongLink( + responseContext + ); + }); + }); + } +} diff --git a/packages/datadog-api-client-v2/index.ts b/packages/datadog-api-client-v2/index.ts index 1222b3d1ae7f..64e4d0dc8bae 100644 --- a/packages/datadog-api-client-v2/index.ts +++ b/packages/datadog-api-client-v2/index.ts @@ -1190,6 +1190,20 @@ export { RUMInsightsApi, } from "./apis/RUMInsightsApi"; +export { + RUMOperationsApiCreateRUMOperationRequest, + RUMOperationsApiCreateRUMOperationStrongLinkRequest, + RUMOperationsApiDeleteRUMOperationRequest, + RUMOperationsApiDeleteRUMOperationStrongLinkRequest, + RUMOperationsApiGetRUMOperationRequest, + RUMOperationsApiGetRUMOperationByNameRequest, + RUMOperationsApiListRUMOperationStrongLinksRequest, + RUMOperationsApiListRUMOperationsRequest, + RUMOperationsApiUpdateRUMOperationRequest, + RUMOperationsApiUpdateRUMOperationStrongLinkRequest, + RUMOperationsApi, +} from "./apis/RUMOperationsApi"; + export { RUMRemoteConfigApiGetRumSdkConfigRequest, RUMRemoteConfigApiUpdateRumSdkConfigRequest, @@ -6950,6 +6964,40 @@ export { RumMetricUpdateAttributes } from "./models/RumMetricUpdateAttributes"; export { RumMetricUpdateCompute } from "./models/RumMetricUpdateCompute"; export { RumMetricUpdateData } from "./models/RumMetricUpdateData"; export { RumMetricUpdateRequest } from "./models/RumMetricUpdateRequest"; +export { RUMOperationCreateRequest } from "./models/RUMOperationCreateRequest"; +export { RUMOperationCreateRequestData } from "./models/RUMOperationCreateRequestData"; +export { RUMOperationJourneyCompositeRule } from "./models/RUMOperationJourneyCompositeRule"; +export { RUMOperationJourneyCompositeRuleKind } from "./models/RUMOperationJourneyCompositeRuleKind"; +export { RUMOperationJourneyNode } from "./models/RUMOperationJourneyNode"; +export { RUMOperationJourneyPredicate } from "./models/RUMOperationJourneyPredicate"; +export { RUMOperationJourneyRum } from "./models/RUMOperationJourneyRum"; +export { RUMOperationJourneyStep } from "./models/RUMOperationJourneyStep"; +export { RUMOperationJourneyStepType } from "./models/RUMOperationJourneyStepType"; +export { RUMOperationRequestAttributes } from "./models/RUMOperationRequestAttributes"; +export { RUMOperationResponse } from "./models/RUMOperationResponse"; +export { RUMOperationResponseAttributes } from "./models/RUMOperationResponseAttributes"; +export { RUMOperationResponseData } from "./models/RUMOperationResponseData"; +export { RUMOperationsListResponse } from "./models/RUMOperationsListResponse"; +export { RUMOperationsListResponseMeta } from "./models/RUMOperationsListResponseMeta"; +export { RUMOperationsListResponseMetaPage } from "./models/RUMOperationsListResponseMetaPage"; +export { RUMOperationStrongLinkCreateRequest } from "./models/RUMOperationStrongLinkCreateRequest"; +export { RUMOperationStrongLinkCreateRequestAttributes } from "./models/RUMOperationStrongLinkCreateRequestAttributes"; +export { RUMOperationStrongLinkCreateRequestData } from "./models/RUMOperationStrongLinkCreateRequestData"; +export { RUMOperationStrongLinkResponse } from "./models/RUMOperationStrongLinkResponse"; +export { RUMOperationStrongLinkResponseAttributes } from "./models/RUMOperationStrongLinkResponseAttributes"; +export { RUMOperationStrongLinkResponseData } from "./models/RUMOperationStrongLinkResponseData"; +export { RUMOperationStrongLinksListResponse } from "./models/RUMOperationStrongLinksListResponse"; +export { RUMOperationStrongLinksListResponseMeta } from "./models/RUMOperationStrongLinksListResponseMeta"; +export { RUMOperationStrongLinkStatus } from "./models/RUMOperationStrongLinkStatus"; +export { RUMOperationStrongLinkType } from "./models/RUMOperationStrongLinkType"; +export { RUMOperationStrongLinkUpdateRequest } from "./models/RUMOperationStrongLinkUpdateRequest"; +export { RUMOperationStrongLinkUpdateRequestAttributes } from "./models/RUMOperationStrongLinkUpdateRequestAttributes"; +export { RUMOperationStrongLinkUpdateRequestData } from "./models/RUMOperationStrongLinkUpdateRequestData"; +export { RUMOperationStrongLinkUpdateStatus } from "./models/RUMOperationStrongLinkUpdateStatus"; +export { RUMOperationType } from "./models/RUMOperationType"; +export { RUMOperationUpdateRequest } from "./models/RUMOperationUpdateRequest"; +export { RUMOperationUpdateRequestData } from "./models/RUMOperationUpdateRequestData"; +export { RUMOperationUser } from "./models/RUMOperationUser"; export { RumPermanentRetentionFilterAttributes } from "./models/RumPermanentRetentionFilterAttributes"; export { RumPermanentRetentionFilterData } from "./models/RumPermanentRetentionFilterData"; export { RumPermanentRetentionFilterEditability } from "./models/RumPermanentRetentionFilterEditability"; diff --git a/packages/datadog-api-client-v2/models/ObjectSerializer.ts b/packages/datadog-api-client-v2/models/ObjectSerializer.ts index f414f7627b3e..3e12f54a3d07 100644 --- a/packages/datadog-api-client-v2/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v2/models/ObjectSerializer.ts @@ -3687,6 +3687,34 @@ import { RUMEventProcessingScale } from "./RUMEventProcessingScale"; import { RUMEventsResponse } from "./RUMEventsResponse"; import { RUMGroupBy } from "./RUMGroupBy"; import { RUMGroupByHistogram } from "./RUMGroupByHistogram"; +import { RUMOperationCreateRequest } from "./RUMOperationCreateRequest"; +import { RUMOperationCreateRequestData } from "./RUMOperationCreateRequestData"; +import { RUMOperationJourneyCompositeRule } from "./RUMOperationJourneyCompositeRule"; +import { RUMOperationJourneyNode } from "./RUMOperationJourneyNode"; +import { RUMOperationJourneyPredicate } from "./RUMOperationJourneyPredicate"; +import { RUMOperationJourneyRum } from "./RUMOperationJourneyRum"; +import { RUMOperationJourneyStep } from "./RUMOperationJourneyStep"; +import { RUMOperationRequestAttributes } from "./RUMOperationRequestAttributes"; +import { RUMOperationResponse } from "./RUMOperationResponse"; +import { RUMOperationResponseAttributes } from "./RUMOperationResponseAttributes"; +import { RUMOperationResponseData } from "./RUMOperationResponseData"; +import { RUMOperationStrongLinkCreateRequest } from "./RUMOperationStrongLinkCreateRequest"; +import { RUMOperationStrongLinkCreateRequestAttributes } from "./RUMOperationStrongLinkCreateRequestAttributes"; +import { RUMOperationStrongLinkCreateRequestData } from "./RUMOperationStrongLinkCreateRequestData"; +import { RUMOperationStrongLinkResponse } from "./RUMOperationStrongLinkResponse"; +import { RUMOperationStrongLinkResponseAttributes } from "./RUMOperationStrongLinkResponseAttributes"; +import { RUMOperationStrongLinkResponseData } from "./RUMOperationStrongLinkResponseData"; +import { RUMOperationStrongLinkUpdateRequest } from "./RUMOperationStrongLinkUpdateRequest"; +import { RUMOperationStrongLinkUpdateRequestAttributes } from "./RUMOperationStrongLinkUpdateRequestAttributes"; +import { RUMOperationStrongLinkUpdateRequestData } from "./RUMOperationStrongLinkUpdateRequestData"; +import { RUMOperationStrongLinksListResponse } from "./RUMOperationStrongLinksListResponse"; +import { RUMOperationStrongLinksListResponseMeta } from "./RUMOperationStrongLinksListResponseMeta"; +import { RUMOperationUpdateRequest } from "./RUMOperationUpdateRequest"; +import { RUMOperationUpdateRequestData } from "./RUMOperationUpdateRequestData"; +import { RUMOperationUser } from "./RUMOperationUser"; +import { RUMOperationsListResponse } from "./RUMOperationsListResponse"; +import { RUMOperationsListResponseMeta } from "./RUMOperationsListResponseMeta"; +import { RUMOperationsListResponseMetaPage } from "./RUMOperationsListResponseMetaPage"; import { RUMProductAnalyticsRetentionScale } from "./RUMProductAnalyticsRetentionScale"; import { RUMProductScales } from "./RUMProductScales"; import { RUMQueryFilter } from "./RUMQueryFilter"; @@ -7339,6 +7367,18 @@ const enumsMap: { [key: string]: any[] } = { RUMComputeType: ["timeseries", "total"], RUMEventProcessingState: ["ALL", "ERROR_FOCUSED_MODE", "NONE"], RUMEventType: ["rum"], + RUMOperationJourneyCompositeRuleKind: ["all_of", "in_order"], + RUMOperationJourneyStepType: [ + "start", + "update", + "stop", + "error", + "abandoned", + ], + RUMOperationStrongLinkStatus: ["DRAFT", "CONFIRMED", "REJECTED"], + RUMOperationStrongLinkType: ["strong_links"], + RUMOperationStrongLinkUpdateStatus: ["CONFIRMED", "REJECTED"], + RUMOperationType: ["operations"], RUMProductAnalyticsRetentionState: ["MAX", "NONE"], RUMResponseStatus: ["done", "timeout"], RUMSort: ["timestamp", "-timestamp"], @@ -12789,6 +12829,40 @@ const typeMap: { [index: string]: any } = { RUMEventsResponse: RUMEventsResponse, RUMGroupBy: RUMGroupBy, RUMGroupByHistogram: RUMGroupByHistogram, + RUMOperationCreateRequest: RUMOperationCreateRequest, + RUMOperationCreateRequestData: RUMOperationCreateRequestData, + RUMOperationJourneyCompositeRule: RUMOperationJourneyCompositeRule, + RUMOperationJourneyNode: RUMOperationJourneyNode, + RUMOperationJourneyPredicate: RUMOperationJourneyPredicate, + RUMOperationJourneyRum: RUMOperationJourneyRum, + RUMOperationJourneyStep: RUMOperationJourneyStep, + RUMOperationRequestAttributes: RUMOperationRequestAttributes, + RUMOperationResponse: RUMOperationResponse, + RUMOperationResponseAttributes: RUMOperationResponseAttributes, + RUMOperationResponseData: RUMOperationResponseData, + RUMOperationStrongLinkCreateRequest: RUMOperationStrongLinkCreateRequest, + RUMOperationStrongLinkCreateRequestAttributes: + RUMOperationStrongLinkCreateRequestAttributes, + RUMOperationStrongLinkCreateRequestData: + RUMOperationStrongLinkCreateRequestData, + RUMOperationStrongLinkResponse: RUMOperationStrongLinkResponse, + RUMOperationStrongLinkResponseAttributes: + RUMOperationStrongLinkResponseAttributes, + RUMOperationStrongLinkResponseData: RUMOperationStrongLinkResponseData, + RUMOperationStrongLinkUpdateRequest: RUMOperationStrongLinkUpdateRequest, + RUMOperationStrongLinkUpdateRequestAttributes: + RUMOperationStrongLinkUpdateRequestAttributes, + RUMOperationStrongLinkUpdateRequestData: + RUMOperationStrongLinkUpdateRequestData, + RUMOperationStrongLinksListResponse: RUMOperationStrongLinksListResponse, + RUMOperationStrongLinksListResponseMeta: + RUMOperationStrongLinksListResponseMeta, + RUMOperationUpdateRequest: RUMOperationUpdateRequest, + RUMOperationUpdateRequestData: RUMOperationUpdateRequestData, + RUMOperationUser: RUMOperationUser, + RUMOperationsListResponse: RUMOperationsListResponse, + RUMOperationsListResponseMeta: RUMOperationsListResponseMeta, + RUMOperationsListResponseMetaPage: RUMOperationsListResponseMetaPage, RUMProductAnalyticsRetentionScale: RUMProductAnalyticsRetentionScale, RUMProductScales: RUMProductScales, RUMQueryFilter: RUMQueryFilter, diff --git a/packages/datadog-api-client-v2/models/RUMOperationCreateRequest.ts b/packages/datadog-api-client-v2/models/RUMOperationCreateRequest.ts new file mode 100644 index 000000000000..980ec817d611 --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationCreateRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { RUMOperationCreateRequestData } from "./RUMOperationCreateRequestData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The request body for creating a RUM operation. + */ +export class RUMOperationCreateRequest { + /** + * The data object for creating a RUM operation. + */ + "data": RUMOperationCreateRequestData; + + /** + * 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: "RUMOperationCreateRequestData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return RUMOperationCreateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/RUMOperationCreateRequestData.ts b/packages/datadog-api-client-v2/models/RUMOperationCreateRequestData.ts new file mode 100644 index 000000000000..c8e3b81b24bf --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationCreateRequestData.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { RUMOperationRequestAttributes } from "./RUMOperationRequestAttributes"; +import { RUMOperationType } from "./RUMOperationType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The data object for creating a RUM operation. + */ +export class RUMOperationCreateRequestData { + /** + * Attributes for creating or updating a RUM operation. + */ + "attributes": RUMOperationRequestAttributes; + /** + * The JSON:API type for RUM operation resources. + */ + "type": RUMOperationType; + + /** + * 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: "RUMOperationRequestAttributes", + required: true, + }, + type: { + baseName: "type", + type: "RUMOperationType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return RUMOperationCreateRequestData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/RUMOperationJourneyCompositeRule.ts b/packages/datadog-api-client-v2/models/RUMOperationJourneyCompositeRule.ts new file mode 100644 index 000000000000..8cbef125319b --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationJourneyCompositeRule.ts @@ -0,0 +1,91 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { RUMOperationJourneyCompositeRuleKind } from "./RUMOperationJourneyCompositeRuleKind"; +import { RUMOperationJourneyPredicate } from "./RUMOperationJourneyPredicate"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * A composite rule combining several predicates. Used as an alternative to `nodes` on a journey + * step when several conditions must be matched together, in any order or in a specific order. + */ +export class RUMOperationJourneyCompositeRule { + /** + * The unique identifier of the composite rule. Generated by the server if omitted. + */ + "compositeRuleId"?: string; + /** + * A hash of the composite rule's configuration, computed by the server. + */ + "configVersion"?: string; + /** + * The rule used to combine the composite rule's predicates. `all_of` requires every predicate + * to match, in any order. `in_order` requires every predicate to match in the given order. + */ + "kind": RUMOperationJourneyCompositeRuleKind; + /** + * The maximum time window, in milliseconds, in which all predicates must match. + */ + "maxWindowMs"?: number; + /** + * The list of predicates that must be matched by RUM events. + */ + "predicates": 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 = { + compositeRuleId: { + baseName: "composite_rule_id", + type: "string", + }, + configVersion: { + baseName: "config_version", + type: "string", + }, + kind: { + baseName: "kind", + type: "RUMOperationJourneyCompositeRuleKind", + required: true, + }, + maxWindowMs: { + baseName: "max_window_ms", + type: "number", + format: "int64", + }, + predicates: { + baseName: "predicates", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return RUMOperationJourneyCompositeRule.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/RUMOperationJourneyCompositeRuleKind.ts b/packages/datadog-api-client-v2/models/RUMOperationJourneyCompositeRuleKind.ts new file mode 100644 index 000000000000..9022f8dcc93d --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationJourneyCompositeRuleKind.ts @@ -0,0 +1,19 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The rule used to combine the composite rule's predicates. `all_of` requires every predicate + * to match, in any order. `in_order` requires every predicate to match in the given order. + */ + +export type RUMOperationJourneyCompositeRuleKind = + | typeof ALL_OF + | typeof IN_ORDER + | UnparsedObject; +export const ALL_OF = "all_of"; +export const IN_ORDER = "in_order"; diff --git a/packages/datadog-api-client-v2/models/RUMOperationJourneyNode.ts b/packages/datadog-api-client-v2/models/RUMOperationJourneyNode.ts new file mode 100644 index 000000000000..ab72105a23b2 --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationJourneyNode.ts @@ -0,0 +1,61 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * A single node within a RUM operation journey step, matching RUM events with a query. + */ +export class RUMOperationJourneyNode { + /** + * The unique identifier of the node. Generated by the server if omitted. + */ + "id"?: string; + /** + * The RUM search query used to match events for this node. + */ + "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 = { + id: { + baseName: "id", + type: "string", + }, + query: { + baseName: "query", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return RUMOperationJourneyNode.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/RUMOperationJourneyPredicate.ts b/packages/datadog-api-client-v2/models/RUMOperationJourneyPredicate.ts new file mode 100644 index 000000000000..4c10e1bcbba3 --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationJourneyPredicate.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * A single predicate within a composite rule, matching RUM events with a query. + */ +export class RUMOperationJourneyPredicate { + /** + * The RUM search query used to match events for this predicate. + */ + "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 = { + query: { + baseName: "query", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return RUMOperationJourneyPredicate.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/RUMOperationJourneyRum.ts b/packages/datadog-api-client-v2/models/RUMOperationJourneyRum.ts new file mode 100644 index 000000000000..12deb03e6aa7 --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationJourneyRum.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { RUMOperationJourneyStep } from "./RUMOperationJourneyStep"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of a RUM operation's journey, used to detect it from RUM events. + */ +export class RUMOperationJourneyRum { + /** + * The ordered list of steps composing the RUM journey. + */ + "rumSteps": 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 = { + rumSteps: { + baseName: "rum_steps", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return RUMOperationJourneyRum.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/RUMOperationJourneyStep.ts b/packages/datadog-api-client-v2/models/RUMOperationJourneyStep.ts new file mode 100644 index 000000000000..bc9522e2fa44 --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationJourneyStep.ts @@ -0,0 +1,74 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { RUMOperationJourneyCompositeRule } from "./RUMOperationJourneyCompositeRule"; +import { RUMOperationJourneyNode } from "./RUMOperationJourneyNode"; +import { RUMOperationJourneyStepType } from "./RUMOperationJourneyStepType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * A single step of a RUM operation's journey. Matches RUM events either through a list of `nodes` + * or through a `composite` rule; the two are mutually exclusive. + */ +export class RUMOperationJourneyStep { + /** + * A composite rule combining several predicates. Used as an alternative to `nodes` on a journey + * step when several conditions must be matched together, in any order or in a specific order. + */ + "composite"?: RUMOperationJourneyCompositeRule; + /** + * The list of nodes that can match this step. Mutually exclusive with `composite`. + */ + "nodes"?: Array; + /** + * The type of a step within a RUM operation's journey. + */ + "type": RUMOperationJourneyStepType; + + /** + * 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 = { + composite: { + baseName: "composite", + type: "RUMOperationJourneyCompositeRule", + }, + nodes: { + baseName: "nodes", + type: "Array", + }, + type: { + baseName: "type", + type: "RUMOperationJourneyStepType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return RUMOperationJourneyStep.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/RUMOperationJourneyStepType.ts b/packages/datadog-api-client-v2/models/RUMOperationJourneyStepType.ts new file mode 100644 index 000000000000..080a47323b16 --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationJourneyStepType.ts @@ -0,0 +1,24 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The type of a step within a RUM operation's journey. + */ + +export type RUMOperationJourneyStepType = + | typeof START + | typeof UPDATE + | typeof STOP + | typeof ERROR + | typeof ABANDONED + | UnparsedObject; +export const START = "start"; +export const UPDATE = "update"; +export const STOP = "stop"; +export const ERROR = "error"; +export const ABANDONED = "abandoned"; diff --git a/packages/datadog-api-client-v2/models/RUMOperationRequestAttributes.ts b/packages/datadog-api-client-v2/models/RUMOperationRequestAttributes.ts new file mode 100644 index 000000000000..100226d8c4bd --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationRequestAttributes.ts @@ -0,0 +1,113 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { RUMOperationJourneyRum } from "./RUMOperationJourneyRum"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes for creating or updating a RUM operation. + */ +export class RUMOperationRequestAttributes { + /** + * The RUM application ID the operation belongs to. + */ + "applicationId"?: string; + /** + * The category of the RUM operation. + */ + "category"?: string; + /** + * A description of the RUM operation. + */ + "description"?: string; + /** + * A human-readable display name for the RUM operation. + */ + "displayName"?: string; + /** + * The list of feature IDs associated with the RUM operation. + */ + "featureIds"?: Array; + /** + * The definition of a RUM operation's journey, used to detect it from RUM events. + */ + "journeyRum": RUMOperationJourneyRum; + /** + * The unique name of the RUM operation. Must not contain spaces. + */ + "name": string; + /** + * A list of tags associated with the RUM operation. + */ + "tags": 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 = { + applicationId: { + baseName: "application_id", + type: "string", + format: "uuid", + }, + category: { + baseName: "category", + type: "string", + }, + description: { + baseName: "description", + type: "string", + }, + displayName: { + baseName: "display_name", + type: "string", + }, + featureIds: { + baseName: "feature_ids", + type: "Array", + }, + journeyRum: { + baseName: "journey_rum", + type: "RUMOperationJourneyRum", + required: true, + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + tags: { + baseName: "tags", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return RUMOperationRequestAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/RUMOperationResponse.ts b/packages/datadog-api-client-v2/models/RUMOperationResponse.ts new file mode 100644 index 000000000000..658f4403dc09 --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { RUMOperationResponseData } from "./RUMOperationResponseData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The response for a single RUM operation. + */ +export class RUMOperationResponse { + /** + * The data object in a RUM operation response. + */ + "data": RUMOperationResponseData; + + /** + * 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: "RUMOperationResponseData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return RUMOperationResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/RUMOperationResponseAttributes.ts b/packages/datadog-api-client-v2/models/RUMOperationResponseAttributes.ts new file mode 100644 index 000000000000..6d5dcf853636 --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationResponseAttributes.ts @@ -0,0 +1,157 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { RUMOperationJourneyRum } from "./RUMOperationJourneyRum"; +import { RUMOperationUser } from "./RUMOperationUser"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of a RUM operation response. + */ +export class RUMOperationResponseAttributes { + /** + * The RUM application ID the operation belongs to. + */ + "applicationId"?: string; + /** + * The category of the RUM operation. + */ + "category"?: string; + /** + * The timestamp when the RUM operation was created. + */ + "createdAt"?: Date; + /** + * A Datadog user referenced by a RUM operation. + */ + "createdBy"?: RUMOperationUser; + /** + * A description of the RUM operation. + */ + "description"?: string; + /** + * A human-readable display name for the RUM operation. + */ + "displayName"?: string; + /** + * The list of feature IDs associated with the RUM operation. + */ + "featureIds"?: Array; + /** + * The definition of a RUM operation's journey, used to detect it from RUM events. + */ + "journeyRum": RUMOperationJourneyRum; + /** + * The unique name of the RUM operation. Must not contain spaces. + */ + "name": string; + /** + * The ID of the organization the RUM operation belongs to. + */ + "orgId"?: number; + /** + * A list of tags associated with the RUM operation. + */ + "tags": Array; + /** + * The timestamp when the RUM operation was last updated. + */ + "updatedAt"?: Date; + /** + * A Datadog user referenced by a RUM operation. + */ + "updatedBy"?: RUMOperationUser; + + /** + * 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 = { + applicationId: { + baseName: "application_id", + type: "string", + format: "uuid", + }, + category: { + baseName: "category", + type: "string", + }, + createdAt: { + baseName: "created_at", + type: "Date", + format: "date-time", + }, + createdBy: { + baseName: "created_by", + type: "RUMOperationUser", + }, + description: { + baseName: "description", + type: "string", + }, + displayName: { + baseName: "display_name", + type: "string", + }, + featureIds: { + baseName: "feature_ids", + type: "Array", + }, + journeyRum: { + baseName: "journey_rum", + type: "RUMOperationJourneyRum", + required: true, + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + orgId: { + baseName: "org_id", + type: "number", + format: "int64", + }, + tags: { + baseName: "tags", + type: "Array", + required: true, + }, + updatedAt: { + baseName: "updated_at", + type: "Date", + format: "date-time", + }, + updatedBy: { + baseName: "updated_by", + type: "RUMOperationUser", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return RUMOperationResponseAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/RUMOperationResponseData.ts b/packages/datadog-api-client-v2/models/RUMOperationResponseData.ts new file mode 100644 index 000000000000..e7a203dbd9a5 --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationResponseData.ts @@ -0,0 +1,73 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { RUMOperationResponseAttributes } from "./RUMOperationResponseAttributes"; +import { RUMOperationType } from "./RUMOperationType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The data object in a RUM operation response. + */ +export class RUMOperationResponseData { + /** + * Attributes of a RUM operation response. + */ + "attributes": RUMOperationResponseAttributes; + /** + * The unique identifier of the RUM operation. + */ + "id": string; + /** + * The JSON:API type for RUM operation resources. + */ + "type": RUMOperationType; + + /** + * 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: "RUMOperationResponseAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "RUMOperationType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return RUMOperationResponseData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/RUMOperationStrongLinkCreateRequest.ts b/packages/datadog-api-client-v2/models/RUMOperationStrongLinkCreateRequest.ts new file mode 100644 index 000000000000..ce87fdf0bff8 --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationStrongLinkCreateRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { RUMOperationStrongLinkCreateRequestData } from "./RUMOperationStrongLinkCreateRequestData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The request body for creating a RUM operation strong link. + */ +export class RUMOperationStrongLinkCreateRequest { + /** + * The data object for creating a RUM operation strong link. + */ + "data": RUMOperationStrongLinkCreateRequestData; + + /** + * 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: "RUMOperationStrongLinkCreateRequestData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return RUMOperationStrongLinkCreateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/RUMOperationStrongLinkCreateRequestAttributes.ts b/packages/datadog-api-client-v2/models/RUMOperationStrongLinkCreateRequestAttributes.ts new file mode 100644 index 000000000000..c528b80bf19d --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationStrongLinkCreateRequestAttributes.ts @@ -0,0 +1,105 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { RUMOperationStrongLinkStatus } from "./RUMOperationStrongLinkStatus"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes for creating a RUM operation strong link. + */ +export class RUMOperationStrongLinkCreateRequestAttributes { + /** + * The RUM application ID used when creating a stub operation from `operation_name`. + */ + "applicationId"?: string; + /** + * A description of the strong link. + */ + "description"?: string; + /** + * The unique identifier of the feature to link. + */ + "featureId": string; + /** + * The unique identifier of the RUM operation to link. Either `operation_id` or + * `operation_name` is required. + */ + "operationId"?: string; + /** + * The name of the RUM operation to link. Either `operation_id` or `operation_name` is + * required. If no operation with this name exists, a stub operation is created. + */ + "operationName"?: string; + /** + * The status of a RUM operation strong link. + */ + "status"?: RUMOperationStrongLinkStatus; + /** + * A list of tags associated with the strong link. + */ + "tags"?: 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 = { + applicationId: { + baseName: "application_id", + type: "string", + format: "uuid", + }, + description: { + baseName: "description", + type: "string", + }, + featureId: { + baseName: "feature_id", + type: "string", + required: true, + }, + operationId: { + baseName: "operation_id", + type: "string", + }, + operationName: { + baseName: "operation_name", + type: "string", + }, + status: { + baseName: "status", + type: "RUMOperationStrongLinkStatus", + }, + tags: { + baseName: "tags", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return RUMOperationStrongLinkCreateRequestAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/RUMOperationStrongLinkCreateRequestData.ts b/packages/datadog-api-client-v2/models/RUMOperationStrongLinkCreateRequestData.ts new file mode 100644 index 000000000000..2d8fc1047295 --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationStrongLinkCreateRequestData.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { RUMOperationStrongLinkCreateRequestAttributes } from "./RUMOperationStrongLinkCreateRequestAttributes"; +import { RUMOperationStrongLinkType } from "./RUMOperationStrongLinkType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The data object for creating a RUM operation strong link. + */ +export class RUMOperationStrongLinkCreateRequestData { + /** + * Attributes for creating a RUM operation strong link. + */ + "attributes": RUMOperationStrongLinkCreateRequestAttributes; + /** + * The JSON:API type for RUM operation strong link resources. + */ + "type": RUMOperationStrongLinkType; + + /** + * 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: "RUMOperationStrongLinkCreateRequestAttributes", + required: true, + }, + type: { + baseName: "type", + type: "RUMOperationStrongLinkType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return RUMOperationStrongLinkCreateRequestData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/RUMOperationStrongLinkResponse.ts b/packages/datadog-api-client-v2/models/RUMOperationStrongLinkResponse.ts new file mode 100644 index 000000000000..7e2b431e00fb --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationStrongLinkResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { RUMOperationStrongLinkResponseData } from "./RUMOperationStrongLinkResponseData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The response for a single RUM operation strong link. + */ +export class RUMOperationStrongLinkResponse { + /** + * The data object in a RUM operation strong link response. + */ + "data": RUMOperationStrongLinkResponseData; + + /** + * 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: "RUMOperationStrongLinkResponseData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return RUMOperationStrongLinkResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/RUMOperationStrongLinkResponseAttributes.ts b/packages/datadog-api-client-v2/models/RUMOperationStrongLinkResponseAttributes.ts new file mode 100644 index 000000000000..9946423424d6 --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationStrongLinkResponseAttributes.ts @@ -0,0 +1,106 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { RUMOperationStrongLinkStatus } from "./RUMOperationStrongLinkStatus"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of a RUM operation strong link response. + */ +export class RUMOperationStrongLinkResponseAttributes { + /** + * The timestamp when the strong link was created. + */ + "createdAt"?: Date; + /** + * A description of the strong link. + */ + "description"?: string; + /** + * The unique identifier of the linked feature. + */ + "featureId": string; + /** + * The unique identifier of the linked RUM operation. + */ + "operationId": string; + /** + * The status of a RUM operation strong link. + */ + "status": RUMOperationStrongLinkStatus; + /** + * A list of tags associated with the strong link. + */ + "tags"?: Array; + /** + * The timestamp when the strong link was last updated. + */ + "updatedAt"?: Date; + + /** + * 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 = { + createdAt: { + baseName: "created_at", + type: "Date", + format: "date-time", + }, + description: { + baseName: "description", + type: "string", + }, + featureId: { + baseName: "feature_id", + type: "string", + required: true, + }, + operationId: { + baseName: "operation_id", + type: "string", + required: true, + }, + status: { + baseName: "status", + type: "RUMOperationStrongLinkStatus", + required: true, + }, + tags: { + baseName: "tags", + type: "Array", + }, + updatedAt: { + baseName: "updated_at", + type: "Date", + format: "date-time", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return RUMOperationStrongLinkResponseAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/RUMOperationStrongLinkResponseData.ts b/packages/datadog-api-client-v2/models/RUMOperationStrongLinkResponseData.ts new file mode 100644 index 000000000000..61ce4d52c608 --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationStrongLinkResponseData.ts @@ -0,0 +1,73 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { RUMOperationStrongLinkResponseAttributes } from "./RUMOperationStrongLinkResponseAttributes"; +import { RUMOperationStrongLinkType } from "./RUMOperationStrongLinkType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The data object in a RUM operation strong link response. + */ +export class RUMOperationStrongLinkResponseData { + /** + * Attributes of a RUM operation strong link response. + */ + "attributes": RUMOperationStrongLinkResponseAttributes; + /** + * The unique identifier of the strong link, formatted as `:`. + */ + "id": string; + /** + * The JSON:API type for RUM operation strong link resources. + */ + "type": RUMOperationStrongLinkType; + + /** + * 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: "RUMOperationStrongLinkResponseAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "RUMOperationStrongLinkType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return RUMOperationStrongLinkResponseData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/RUMOperationStrongLinkStatus.ts b/packages/datadog-api-client-v2/models/RUMOperationStrongLinkStatus.ts new file mode 100644 index 000000000000..7999ddbfdb68 --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationStrongLinkStatus.ts @@ -0,0 +1,20 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The status of a RUM operation strong link. + */ + +export type RUMOperationStrongLinkStatus = + | typeof DRAFT + | typeof CONFIRMED + | typeof REJECTED + | UnparsedObject; +export const DRAFT = "DRAFT"; +export const CONFIRMED = "CONFIRMED"; +export const REJECTED = "REJECTED"; diff --git a/packages/datadog-api-client-v2/models/RUMOperationStrongLinkType.ts b/packages/datadog-api-client-v2/models/RUMOperationStrongLinkType.ts new file mode 100644 index 000000000000..3544a074476f --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationStrongLinkType.ts @@ -0,0 +1,14 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The JSON:API type for RUM operation strong link resources. + */ + +export type RUMOperationStrongLinkType = typeof STRONG_LINKS | UnparsedObject; +export const STRONG_LINKS = "strong_links"; diff --git a/packages/datadog-api-client-v2/models/RUMOperationStrongLinkUpdateRequest.ts b/packages/datadog-api-client-v2/models/RUMOperationStrongLinkUpdateRequest.ts new file mode 100644 index 000000000000..9cbfb972000d --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationStrongLinkUpdateRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { RUMOperationStrongLinkUpdateRequestData } from "./RUMOperationStrongLinkUpdateRequestData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The request body for updating a RUM operation strong link. + */ +export class RUMOperationStrongLinkUpdateRequest { + /** + * The data object for updating a RUM operation strong link. + */ + "data": RUMOperationStrongLinkUpdateRequestData; + + /** + * 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: "RUMOperationStrongLinkUpdateRequestData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return RUMOperationStrongLinkUpdateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/RUMOperationStrongLinkUpdateRequestAttributes.ts b/packages/datadog-api-client-v2/models/RUMOperationStrongLinkUpdateRequestAttributes.ts new file mode 100644 index 000000000000..5bde57bad974 --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationStrongLinkUpdateRequestAttributes.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { RUMOperationStrongLinkUpdateStatus } from "./RUMOperationStrongLinkUpdateStatus"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes for updating a RUM operation strong link. + */ +export class RUMOperationStrongLinkUpdateRequestAttributes { + /** + * The status of a RUM operation strong link. Can only be set to `CONFIRMED` or `REJECTED`. + */ + "status": RUMOperationStrongLinkUpdateStatus; + + /** + * 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 = { + status: { + baseName: "status", + type: "RUMOperationStrongLinkUpdateStatus", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return RUMOperationStrongLinkUpdateRequestAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/RUMOperationStrongLinkUpdateRequestData.ts b/packages/datadog-api-client-v2/models/RUMOperationStrongLinkUpdateRequestData.ts new file mode 100644 index 000000000000..73aedd971c48 --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationStrongLinkUpdateRequestData.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { RUMOperationStrongLinkType } from "./RUMOperationStrongLinkType"; +import { RUMOperationStrongLinkUpdateRequestAttributes } from "./RUMOperationStrongLinkUpdateRequestAttributes"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The data object for updating a RUM operation strong link. + */ +export class RUMOperationStrongLinkUpdateRequestData { + /** + * Attributes for updating a RUM operation strong link. + */ + "attributes": RUMOperationStrongLinkUpdateRequestAttributes; + /** + * The JSON:API type for RUM operation strong link resources. + */ + "type": RUMOperationStrongLinkType; + + /** + * 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: "RUMOperationStrongLinkUpdateRequestAttributes", + required: true, + }, + type: { + baseName: "type", + type: "RUMOperationStrongLinkType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return RUMOperationStrongLinkUpdateRequestData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/RUMOperationStrongLinkUpdateStatus.ts b/packages/datadog-api-client-v2/models/RUMOperationStrongLinkUpdateStatus.ts new file mode 100644 index 000000000000..fb755d9a0efb --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationStrongLinkUpdateStatus.ts @@ -0,0 +1,18 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The status of a RUM operation strong link. Can only be set to `CONFIRMED` or `REJECTED`. + */ + +export type RUMOperationStrongLinkUpdateStatus = + | typeof CONFIRMED + | typeof REJECTED + | UnparsedObject; +export const CONFIRMED = "CONFIRMED"; +export const REJECTED = "REJECTED"; diff --git a/packages/datadog-api-client-v2/models/RUMOperationStrongLinksListResponse.ts b/packages/datadog-api-client-v2/models/RUMOperationStrongLinksListResponse.ts new file mode 100644 index 000000000000..c881ad187059 --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationStrongLinksListResponse.ts @@ -0,0 +1,60 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { RUMOperationStrongLinkResponseData } from "./RUMOperationStrongLinkResponseData"; +import { RUMOperationStrongLinksListResponseMeta } from "./RUMOperationStrongLinksListResponseMeta"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The response for a list of RUM operation strong links. + */ +export class RUMOperationStrongLinksListResponse { + "data": Array; + /** + * Metadata for a list of RUM operation strong links. + */ + "meta"?: RUMOperationStrongLinksListResponseMeta; + + /** + * 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: "Array", + required: true, + }, + meta: { + baseName: "meta", + type: "RUMOperationStrongLinksListResponseMeta", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return RUMOperationStrongLinksListResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/RUMOperationStrongLinksListResponseMeta.ts b/packages/datadog-api-client-v2/models/RUMOperationStrongLinksListResponseMeta.ts new file mode 100644 index 000000000000..0814990e2cfe --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationStrongLinksListResponseMeta.ts @@ -0,0 +1,71 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Metadata for a list of RUM operation strong links. + */ +export class RUMOperationStrongLinksListResponseMeta { + /** + * The pagination limit. + */ + "limit"?: number; + /** + * The current offset. + */ + "offset"?: number; + /** + * The total number of strong links matching the request. + */ + "total"?: 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 = { + limit: { + baseName: "limit", + type: "number", + format: "int64", + }, + offset: { + baseName: "offset", + type: "number", + format: "int64", + }, + total: { + baseName: "total", + type: "number", + format: "int64", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return RUMOperationStrongLinksListResponseMeta.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/RUMOperationType.ts b/packages/datadog-api-client-v2/models/RUMOperationType.ts new file mode 100644 index 000000000000..6aa05615924e --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationType.ts @@ -0,0 +1,14 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The JSON:API type for RUM operation resources. + */ + +export type RUMOperationType = typeof OPERATIONS | UnparsedObject; +export const OPERATIONS = "operations"; diff --git a/packages/datadog-api-client-v2/models/RUMOperationUpdateRequest.ts b/packages/datadog-api-client-v2/models/RUMOperationUpdateRequest.ts new file mode 100644 index 000000000000..c2aa1ebedca9 --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationUpdateRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { RUMOperationUpdateRequestData } from "./RUMOperationUpdateRequestData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The request body for updating a RUM operation. + */ +export class RUMOperationUpdateRequest { + /** + * The data object for updating a RUM operation. + */ + "data": RUMOperationUpdateRequestData; + + /** + * 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: "RUMOperationUpdateRequestData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return RUMOperationUpdateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/RUMOperationUpdateRequestData.ts b/packages/datadog-api-client-v2/models/RUMOperationUpdateRequestData.ts new file mode 100644 index 000000000000..401e79560c18 --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationUpdateRequestData.ts @@ -0,0 +1,73 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { RUMOperationRequestAttributes } from "./RUMOperationRequestAttributes"; +import { RUMOperationType } from "./RUMOperationType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The data object for updating a RUM operation. + */ +export class RUMOperationUpdateRequestData { + /** + * Attributes for creating or updating a RUM operation. + */ + "attributes": RUMOperationRequestAttributes; + /** + * The unique identifier of the RUM operation. Must match the ID in the URL path. + */ + "id": string; + /** + * The JSON:API type for RUM operation resources. + */ + "type": RUMOperationType; + + /** + * 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: "RUMOperationRequestAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "RUMOperationType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return RUMOperationUpdateRequestData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/RUMOperationUser.ts b/packages/datadog-api-client-v2/models/RUMOperationUser.ts new file mode 100644 index 000000000000..b62b5e0ac578 --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationUser.ts @@ -0,0 +1,76 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * A Datadog user referenced by a RUM operation. + */ +export class RUMOperationUser { + /** + * The email of the user. + */ + "email"?: string; + /** + * The handle of the user. + */ + "handle"?: string; + /** + * The name of the user. + */ + "name"?: string; + /** + * The UUID of the user. + */ + "uuid"?: 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 = { + email: { + baseName: "email", + type: "string", + }, + handle: { + baseName: "handle", + type: "string", + }, + name: { + baseName: "name", + type: "string", + }, + uuid: { + baseName: "uuid", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return RUMOperationUser.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/RUMOperationsListResponse.ts b/packages/datadog-api-client-v2/models/RUMOperationsListResponse.ts new file mode 100644 index 000000000000..bcb79e5edea2 --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationsListResponse.ts @@ -0,0 +1,60 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { RUMOperationResponseData } from "./RUMOperationResponseData"; +import { RUMOperationsListResponseMeta } from "./RUMOperationsListResponseMeta"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The response for a list of RUM operations. + */ +export class RUMOperationsListResponse { + "data": Array; + /** + * Metadata for a list of RUM operations. + */ + "meta"?: RUMOperationsListResponseMeta; + + /** + * 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: "Array", + required: true, + }, + meta: { + baseName: "meta", + type: "RUMOperationsListResponseMeta", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return RUMOperationsListResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/RUMOperationsListResponseMeta.ts b/packages/datadog-api-client-v2/models/RUMOperationsListResponseMeta.ts new file mode 100644 index 000000000000..4fefcba5bbeb --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationsListResponseMeta.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { RUMOperationsListResponseMetaPage } from "./RUMOperationsListResponseMetaPage"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Metadata for a list of RUM operations. + */ +export class RUMOperationsListResponseMeta { + /** + * Pagination metadata for a list of RUM operations. + */ + "page"?: RUMOperationsListResponseMetaPage; + + /** + * 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 = { + page: { + baseName: "page", + type: "RUMOperationsListResponseMetaPage", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return RUMOperationsListResponseMeta.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/RUMOperationsListResponseMetaPage.ts b/packages/datadog-api-client-v2/models/RUMOperationsListResponseMetaPage.ts new file mode 100644 index 000000000000..541fbf30484e --- /dev/null +++ b/packages/datadog-api-client-v2/models/RUMOperationsListResponseMetaPage.ts @@ -0,0 +1,115 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Pagination metadata for a list of RUM operations. + */ +export class RUMOperationsListResponseMetaPage { + /** + * The offset of the first page. + */ + "firstOffset"?: number; + /** + * The offset of the last page. + */ + "lastOffset"?: number; + /** + * The pagination limit. + */ + "limit"?: number; + /** + * The offset of the next page, if any. + */ + "nextOffset"?: number; + /** + * The current offset. + */ + "offset"?: number; + /** + * The offset of the previous page, if any. + */ + "prevOffset"?: number; + /** + * The total number of RUM operations matching the search. + */ + "total"?: number; + /** + * The type of pagination used. + */ + "type"?: 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 = { + firstOffset: { + baseName: "first_offset", + type: "number", + format: "int64", + }, + lastOffset: { + baseName: "last_offset", + type: "number", + format: "int64", + }, + limit: { + baseName: "limit", + type: "number", + format: "int64", + }, + nextOffset: { + baseName: "next_offset", + type: "number", + format: "int64", + }, + offset: { + baseName: "offset", + type: "number", + format: "int64", + }, + prevOffset: { + baseName: "prev_offset", + type: "number", + format: "int64", + }, + total: { + baseName: "total", + type: "number", + format: "int64", + }, + type: { + baseName: "type", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return RUMOperationsListResponseMetaPage.attributeTypeMap; + } + + public constructor() {} +}