diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index d22c0abd5859..ccc3331457df 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1260,6 +1260,24 @@ components: required: true schema: type: string + environment_id: + description: The ID of the environment. + in: path + name: environment_id + required: true + schema: + example: "550e8400-e29b-41d4-a716-446655440001" + format: uuid + type: string + feature_flag_id: + description: The ID of the feature flag. + in: path + name: feature_flag_id + required: true + schema: + example: "550e8400-e29b-41d4-a716-446655440000" + format: uuid + type: string requestBodies: {} responses: BadRequestResponse: @@ -14739,6 +14757,127 @@ components: - address - formats type: object + CreateEnvironmentAttributes: + description: Attributes for creating a new environment. + properties: + is_production: + default: false + description: Indicates whether this is a production environment. + example: false + type: boolean + name: + description: The name of the environment. + example: "env-search-term" + type: string + queries: + description: List of queries to define the environment scope. + example: ["staging", "test"] + items: + type: string + minItems: 1 + type: array + require_feature_flag_approval: + default: false + description: Indicates whether feature flag changes require approval in this environment. + example: false + type: boolean + required: + - name + - queries + type: object + CreateEnvironmentData: + description: Data for creating a new environment. + properties: + attributes: + $ref: "#/components/schemas/CreateEnvironmentAttributes" + type: + $ref: "#/components/schemas/CreateEnvironmentDataType" + required: + - type + - attributes + type: object + CreateEnvironmentDataType: + description: The resource type. + enum: + - "environments" + example: "environments" + type: string + x-enum-varnames: + - ENVIRONMENTS + CreateEnvironmentRequest: + description: Request to create a new environment. + properties: + data: + $ref: "#/components/schemas/CreateEnvironmentData" + required: + - data + type: object + CreateFeatureFlagAttributes: + description: Attributes for creating a new feature flag. + properties: + default_variant_key: + description: The key of the default variant. + example: "variant-abc123" + nullable: true + type: string + description: + description: The description of the feature flag. + example: "This is an example feature flag for demonstration" + type: string + json_schema: + description: JSON schema for validation when value_type is JSON. + example: '{"type": "object", "properties": {"enabled": {"type": "boolean"}}}' + nullable: true + type: string + key: + description: The unique key of the feature flag. + example: "feature-flag-abc123" + type: string + name: + description: The name of the feature flag. + example: "Feature Flag ABC123" + type: string + value_type: + $ref: "#/components/schemas/ValueType" + variants: + description: The variants of the feature flag. + items: + $ref: "#/components/schemas/CreateVariant" + type: array + required: + - key + - name + - description + - value_type + - variants + type: object + CreateFeatureFlagData: + description: Data for creating a new feature flag. + properties: + attributes: + $ref: "#/components/schemas/CreateFeatureFlagAttributes" + type: + $ref: "#/components/schemas/CreateFeatureFlagDataType" + required: + - type + - attributes + type: object + CreateFeatureFlagDataType: + description: The resource type. + enum: + - "feature-flags" + example: "feature-flags" + type: string + x-enum-varnames: + - FEATURE_FLAGS + CreateFeatureFlagRequest: + description: Request to create a new feature flag. + properties: + data: + $ref: "#/components/schemas/CreateFeatureFlagData" + required: + - data + type: object CreateIncidentNotificationRuleRequest: description: Create request for a notification rule. properties: @@ -15998,6 +16137,26 @@ components: required: - data type: object + CreateVariant: + description: Request to create a variant. + properties: + key: + description: The unique key of the variant. + example: "variant-abc123" + type: string + name: + description: The name of the variant. + example: "Variant ABC123" + type: string + value: + description: The value of the variant as a string. + example: "true" + type: string + required: + - key + - name + - value + type: object CreateWorkflowRequest: description: A request object for creating a new workflow. example: @@ -22405,6 +22564,94 @@ components: minLength: 1 type: string type: object + Environment: + description: A feature flag environment resource. + properties: + attributes: + $ref: "#/components/schemas/EnvironmentAttributes" + id: + description: The unique identifier of the environment. + example: "550e8400-e29b-41d4-a716-446655440001" + format: uuid + type: string + type: + $ref: "#/components/schemas/CreateEnvironmentDataType" + required: + - id + - type + - attributes + type: object + EnvironmentAttributes: + description: Attributes of an environment. + properties: + created_at: + description: The timestamp when the environment was created. + example: "2023-01-01T00:00:00Z" + format: date-time + type: string + description: + description: The description of the environment. + example: "Test environment XYZ789" + nullable: true + type: string + is_production: + description: Indicates whether this is a production environment. + example: false + type: boolean + key: + description: The unique key of the environment. + example: "env-search-term" + type: string + name: + description: The name of the environment. + example: "env-search-term" + type: string + queries: + description: List of queries to define the environment scope. + example: ["staging", "test"] + items: + type: string + minItems: 1 + type: array + require_feature_flag_approval: + description: Indicates whether feature flag changes require approval in this environment. + example: false + type: boolean + updated_at: + description: The timestamp when the environment was last updated. + example: "2023-01-01T00:00:00Z" + format: date-time + type: string + required: + - name + type: object + EnvironmentResponse: + description: Response containing an environment. + properties: + data: + $ref: "#/components/schemas/Environment" + required: + - data + type: object + EnvironmentsPaginationMeta: + description: Pagination metadata for environments. + properties: + page: + $ref: "#/components/schemas/EnvironmentsPaginationMetaPage" + type: object + EnvironmentsPaginationMetaPage: + properties: + total_count: + description: Total number of items. + example: 10 + format: int64 + type: integer + total_filtered_count: + description: Total number of items matching the filter. + example: 5 + format: int64 + type: integer + type: object ErrorHandler: description: Used to handle errors in an action. properties: @@ -24133,6 +24380,203 @@ components: $ref: "#/components/schemas/FastlyServiceData" type: array type: object + FeatureFlag: + description: A feature flag resource. + properties: + attributes: + $ref: "#/components/schemas/FeatureFlagAttributes" + id: + description: The unique identifier of the feature flag. + example: "550e8400-e29b-41d4-a716-446655440000" + format: uuid + type: string + type: + $ref: "#/components/schemas/CreateFeatureFlagDataType" + required: + - id + - type + - attributes + type: object + FeatureFlagAttributes: + description: Attributes of a feature flag. + properties: + archived_at: + description: The timestamp when the feature flag was archived. + example: "2023-01-01T00:00:00Z" + format: date-time + nullable: true + type: string + created_at: + description: The timestamp when the feature flag was created. + example: "2023-01-01T00:00:00Z" + format: date-time + type: string + created_by: + description: The ID of the user who created the feature flag. + example: "550e8400-e29b-41d4-a716-446655440010" + format: uuid + type: string + description: + description: The description of the feature flag. + example: "This is an example feature flag for demonstration" + type: string + distribution_channel: + description: Distribution channel for the feature flag. + example: "ALL" + type: string + feature_flag_environments: + description: Environment-specific settings for the feature flag. + items: + $ref: "#/components/schemas/FeatureFlagEnvironment" + type: array + json_schema: + description: JSON schema for validation when value_type is JSON. + example: '{"type": "object", "properties": {"enabled": {"type": "boolean"}}}' + nullable: true + type: string + key: + description: The unique key of the feature flag. + example: "feature-flag-abc123" + type: string + last_updated_by: + description: The ID of the user who last updated the feature flag. + example: "550e8400-e29b-41d4-a716-446655440010" + format: uuid + type: string + name: + description: The name of the feature flag. + example: "Feature Flag ABC123" + type: string + require_approval: + description: Indicates whether this feature flag requires approval for changes. + example: false + type: boolean + updated_at: + description: The timestamp when the feature flag was last updated. + example: "2023-01-01T00:00:00Z" + format: date-time + type: string + value_type: + $ref: "#/components/schemas/ValueType" + variants: + description: The variants of the feature flag. + items: + $ref: "#/components/schemas/Variant" + type: array + required: + - key + - name + - description + - value_type + - variants + type: object + FeatureFlagEnvironment: + description: Environment-specific settings for a feature flag. + properties: + allocations: + additionalProperties: {} + description: Allocation metadata for this environment. + nullable: true + type: object + default_allocation_key: + description: The allocation key used for the default variant. + example: "allocation-default-123abc" + type: string + default_variant_id: + description: The ID of the default variant for this environment. + example: "550e8400-e29b-41d4-a716-446655440002" + nullable: true + type: string + environment_id: + description: The ID of the environment. + example: "550e8400-e29b-41d4-a716-446655440001" + format: uuid + type: string + environment_name: + description: The name of the environment. + example: "env-search-term" + type: string + is_production: + description: Indicates whether the environment is production. + example: false + type: boolean + override_allocation_key: + description: The allocation key used for the override variant. + example: "allocation-override-123abc" + type: string + override_variant_id: + description: The ID of the override variant for this environment. + example: "550e8400-e29b-41d4-a716-446655440003" + nullable: true + type: string + pending_suggestion_id: + description: Pending suggestion identifier, if approval is required. + example: "550e8400-e29b-41d4-a716-446655440099" + nullable: true + type: string + require_feature_flag_approval: + description: Indicates whether feature flag changes require approval in this environment. + example: false + type: boolean + rollout_percentage: + description: Rollout percentage for this environment. + example: 0 + format: int64 + maximum: 100 + minimum: 0 + type: integer + rules: + description: Environment targeting rules for this feature flag. + items: + $ref: "#/components/schemas/FeatureFlagTargetingRule" + type: array + status: + $ref: "#/components/schemas/FeatureFlagStatus" + required: + - environment_id + - status + type: object + FeatureFlagResponse: + description: Response containing a feature flag. + properties: + data: + $ref: "#/components/schemas/FeatureFlag" + required: + - data + type: object + FeatureFlagStatus: + description: The status of a feature flag in an environment. + enum: + - ENABLED + - DISABLED + example: "ENABLED" + type: string + x-enum-varnames: + - ENABLED + - DISABLED + FeatureFlagTargetingRule: + additionalProperties: {} + description: A targeting rule for a feature flag. + type: object + FeatureFlagsPaginationMeta: + description: Pagination metadata for feature flags. + properties: + page: + $ref: "#/components/schemas/FeatureFlagsPaginationMetaPage" + type: object + FeatureFlagsPaginationMetaPage: + properties: + total_count: + description: Total number of items. + example: 100 + format: int64 + type: integer + total_filtered_count: + description: Total number of items matching the filter. + example: 25 + format: int64 + type: integer + type: object FiltersPerProduct: description: Product-specific filters for the dataset. properties: @@ -35306,6 +35750,32 @@ components: description: Current link. type: string type: object + ListEnvironmentsResponse: + description: Response containing a list of environments. + properties: + data: + description: List of environments. + items: + $ref: "#/components/schemas/Environment" + type: array + meta: + $ref: "#/components/schemas/EnvironmentsPaginationMeta" + required: + - data + type: object + ListFeatureFlagsResponse: + description: Response containing a list of feature flags. + properties: + data: + description: List of feature flags. + items: + $ref: "#/components/schemas/FeatureFlag" + type: array + meta: + $ref: "#/components/schemas/FeatureFlagsPaginationMeta" + required: + - data + type: object ListFindingsData: description: Array of findings. items: @@ -66865,6 +67335,100 @@ components: - name - options type: object + UpdateEnvironmentAttributes: + description: Attributes for updating an environment. + properties: + is_production: + description: Indicates whether this is a production environment. + example: false + type: boolean + name: + description: The name of the environment. + example: "Environment XYZ789" + type: string + queries: + description: List of queries to define the environment scope. + example: ["staging", "test"] + items: + type: string + minItems: 1 + type: array + require_feature_flag_approval: + description: Indicates whether feature flag changes require approval in this environment. + example: true + type: boolean + type: object + UpdateEnvironmentData: + description: Data for updating an environment. + properties: + attributes: + $ref: "#/components/schemas/UpdateEnvironmentAttributes" + type: + $ref: "#/components/schemas/UpdateEnvironmentDataType" + required: + - type + - attributes + type: object + UpdateEnvironmentDataType: + description: The resource type. + enum: + - "environments" + example: "environments" + type: string + x-enum-varnames: + - ENVIRONMENTS + UpdateEnvironmentRequest: + description: Request to update an environment. + properties: + data: + $ref: "#/components/schemas/UpdateEnvironmentData" + required: + - data + type: object + UpdateFeatureFlagAttributes: + description: Attributes for updating a feature flag. + properties: + description: + description: The description of the feature flag. + example: "Updated description for feature flag XYZ789" + type: string + json_schema: + description: JSON schema for validation when value_type is JSON. + example: '{"type": "object", "properties": {"enabled": {"type": "boolean"}}}' + nullable: true + type: string + name: + description: The name of the feature flag. + example: "Updated Feature Flag XYZ789" + type: string + type: object + UpdateFeatureFlagData: + description: Data for updating a feature flag. + properties: + attributes: + $ref: "#/components/schemas/UpdateFeatureFlagAttributes" + type: + $ref: "#/components/schemas/UpdateFeatureFlagDataType" + required: + - type + - attributes + type: object + UpdateFeatureFlagDataType: + description: The resource type. + enum: + - "feature-flags" + example: "feature-flags" + type: string + x-enum-varnames: + - FEATURE_FLAGS + UpdateFeatureFlagRequest: + description: Request to update a feature flag. + properties: + data: + $ref: "#/components/schemas/UpdateFeatureFlagData" + required: + - data + type: object UpdateFlakyTestsRequest: description: Request to update the state of multiple flaky tests. properties: @@ -68466,6 +69030,58 @@ components: $ref: "#/components/schemas/ValidationError" type: array type: object + ValueType: + description: The type of values for the feature flag variants. + enum: + - BOOLEAN + - INTEGER + - NUMERIC + - STRING + - JSON + example: "BOOLEAN" + type: string + x-enum-varnames: + - BOOLEAN + - INTEGER + - NUMERIC + - STRING + - JSON + Variant: + description: A variant of a feature flag. + properties: + created_at: + description: The timestamp when the variant was created. + example: "2023-01-01T00:00:00Z" + format: date-time + type: string + id: + description: The unique identifier of the variant. + example: "550e8400-e29b-41d4-a716-446655440002" + format: uuid + type: string + key: + description: The unique key of the variant. + example: "variant-abc123" + type: string + name: + description: The name of the variant. + example: "Variant ABC123" + type: string + updated_at: + description: The timestamp when the variant was last updated. + example: "2023-01-01T00:00:00Z" + format: date-time + type: string + value: + description: The value of the variant as a string. + example: "true" + type: string + required: + - id + - key + - name + - value + type: object Version: description: Version of the notification rule. It is updated when the rule is modified. example: 1 @@ -80292,6 +80908,634 @@ paths: operator: OR permissions: - events_read + /api/v2/feature-flags: + get: + description: |- + Returns a list of feature flags for the organization. + Supports filtering by key and archived status. + operationId: ListFeatureFlags + parameters: + - description: Filter feature flags by key (partial matching). + example: "flag-search-term" + in: query + name: key + schema: + type: string + - description: Filter by archived status. + example: false + in: query + name: is_archived + schema: + type: boolean + - description: Maximum number of results to return. + example: 10 + in: query + name: limit + schema: + default: 100 + maximum: 1000 + minimum: 1 + type: integer + - description: Number of results to skip. + example: 0 + in: query + name: offset + schema: + default: 0 + minimum: 0 + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ListFeatureFlagsResponse" + description: OK + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List feature flags + tags: + - Feature Flags + x-permission: + operator: AND + permissions: + - feature_flag_config_read + - feature_flag_environment_config_read + post: + description: |- + Creates a new feature flag with variants. + operationId: CreateFeatureFlag + requestBody: + content: + application/json: + example: + data: + attributes: + description: "Demo feature flag with unique identifier" + key: "feature-flag-demo123" + name: "Feature Flag Demo123" + value_type: "BOOLEAN" + variants: + - key: "variant-demo123" + name: "Variant Demo123" + value: "true" + type: "feature-flags" + schema: + $ref: "#/components/schemas/CreateFeatureFlagRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/FeatureFlagResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Conflict + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Create a feature flag + tags: + - Feature Flags + x-permission: + operator: AND + permissions: + - feature_flag_config_write + - feature_flag_environment_config_read + /api/v2/feature-flags/environments: + get: + description: |- + Returns a list of environments for the organization. + Supports filtering by name and key. + operationId: ListFeatureFlagsEnvironments + parameters: + - description: Filter environments by name (partial matching). + example: "env-search-term" + in: query + name: name + schema: + type: string + - description: Filter environments by key (partial matching). + example: "env-partial" + in: query + name: key + schema: + type: string + - description: Maximum number of results to return. + example: 10 + in: query + name: limit + schema: + default: 100 + maximum: 1000 + minimum: 1 + type: integer + - description: Number of results to skip. + example: 0 + in: query + name: offset + schema: + default: 0 + minimum: 0 + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ListEnvironmentsResponse" + description: OK + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List environments + tags: + - Feature Flags + x-permission: + operator: AND + permissions: + - feature_flag_environment_config_read + post: + description: |- + Creates a new environment for organizing feature flags. + operationId: CreateFeatureFlagsEnvironment + requestBody: + content: + application/json: + example: + data: + attributes: + name: "Environment Demo123" + queries: ["env-demo123", "queries-demo456"] + type: "environments" + schema: + $ref: "#/components/schemas/CreateEnvironmentRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/EnvironmentResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Conflict + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Create an environment + tags: + - Feature Flags + x-permission: + operator: AND + permissions: + - feature_flag_environment_config_write + /api/v2/feature-flags/environments/{environment_id}: + delete: + description: |- + Deletes an environment. This operation cannot be undone. + operationId: DeleteFeatureFlagsEnvironment + parameters: + - $ref: "#/components/parameters/environment_id" + responses: + "204": + description: No Content + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Delete an environment + tags: + - Feature Flags + x-permission: + operator: AND + permissions: + - feature_flag_environment_config_write + get: + description: |- + Returns the details of a specific environment. + operationId: GetFeatureFlagsEnvironment + parameters: + - $ref: "#/components/parameters/environment_id" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/EnvironmentResponse" + description: OK + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get an environment + tags: + - Feature Flags + x-permission: + operator: AND + permissions: + - feature_flag_environment_config_read + put: + description: |- + Updates an existing environment's metadata such as + name and description. + operationId: UpdateFeatureFlagsEnvironment + parameters: + - $ref: "#/components/parameters/environment_id" + requestBody: + content: + application/json: + example: + data: + attributes: + name: "Updated Environment XYZ789" + queries: ["updated-env-xyz789", "updated-queries-abc456"] + type: "environments" + schema: + $ref: "#/components/schemas/UpdateEnvironmentRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/EnvironmentResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Update an environment + tags: + - Feature Flags + x-permission: + operator: AND + permissions: + - feature_flag_environment_config_write + /api/v2/feature-flags/{feature_flag_id}: + get: + description: |- + Returns the details of a specific feature flag + including variants and environment status. + operationId: GetFeatureFlag + parameters: + - $ref: "#/components/parameters/feature_flag_id" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/FeatureFlagResponse" + description: OK + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get a feature flag + tags: + - Feature Flags + x-permission: + operator: AND + permissions: + - feature_flag_config_read + - feature_flag_environment_config_read + put: + description: |- + Updates an existing feature flag's metadata such as + name and description. Does not modify targeting rules or allocations. + operationId: UpdateFeatureFlag + parameters: + - $ref: "#/components/parameters/feature_flag_id" + requestBody: + content: + application/json: + example: + data: + attributes: + description: "Updated description for feature flag XYZ789" + name: "Updated Feature Flag XYZ789" + type: "feature-flags" + schema: + $ref: "#/components/schemas/UpdateFeatureFlagRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/FeatureFlagResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Update a feature flag + tags: + - Feature Flags + x-permission: + operator: AND + permissions: + - feature_flag_config_write + - feature_flag_environment_config_read + /api/v2/feature-flags/{feature_flag_id}/archive: + post: + description: |- + Archives a feature flag. Archived flags are + hidden from the main list but remain accessible and can be unarchived. + operationId: ArchiveFeatureFlag + parameters: + - $ref: "#/components/parameters/feature_flag_id" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/FeatureFlagResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Archive a feature flag + tags: + - Feature Flags + x-permission: + operator: AND + permissions: + - feature_flag_config_write + - feature_flag_environment_config_read + /api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/disable: + post: + description: |- + Disable a feature flag in a specific environment. + operationId: DisableFeatureFlagEnvironment + parameters: + - $ref: "#/components/parameters/feature_flag_id" + - $ref: "#/components/parameters/environment_id" + responses: + "200": + description: OK + "202": + description: Accepted - Approval required for this change + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Disable a feature flag in an environment + tags: + - Feature Flags + x-permission: + operator: AND + permissions: + - feature_flag_config_write + - feature_flag_environment_config_read + /api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/enable: + post: + description: |- + Enable a feature flag in a specific environment. + operationId: EnableFeatureFlagEnvironment + parameters: + - $ref: "#/components/parameters/feature_flag_id" + - $ref: "#/components/parameters/environment_id" + responses: + "200": + description: OK + "202": + description: Accepted - Approval required for this change + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Enable a feature flag in an environment + tags: + - Feature Flags + x-permission: + operator: AND + permissions: + - feature_flag_config_write + - feature_flag_environment_config_read + /api/v2/feature-flags/{feature_flag_id}/unarchive: + post: + description: |- + Unarchives a previously archived feature flag, + making it visible in the main list again. + operationId: UnarchiveFeatureFlag + parameters: + - $ref: "#/components/parameters/feature_flag_id" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/FeatureFlagResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Unarchive a feature flag + tags: + - Feature Flags + x-permission: + operator: AND + permissions: + - feature_flag_config_write + - feature_flag_environment_config_read /api/v2/hamr: get: description: |- @@ -106907,6 +108151,8 @@ tags: - description: |- Manage your Datadog Fastly integration accounts and services directly through the Datadog API. See the [Fastly integration page](https://docs.datadoghq.com/integrations/fastly/) for more information. name: Fastly Integration + - description: Manage feature flags and environments. + name: Feature Flags - description: |- Manage automated deployments across your fleet of hosts. diff --git a/cassettes/v2/Feature-Flags_3833710718/Archive-a-feature-flag-returns-OK-response_588598812/frozen.json b/cassettes/v2/Feature-Flags_3833710718/Archive-a-feature-flag-returns-OK-response_588598812/frozen.json new file mode 100644 index 000000000000..5518c3cd4616 --- /dev/null +++ b/cassettes/v2/Feature-Flags_3833710718/Archive-a-feature-flag-returns-OK-response_588598812/frozen.json @@ -0,0 +1 @@ +"2026-03-17T17:26:21.682Z" diff --git a/cassettes/v2/Feature-Flags_3833710718/Archive-a-feature-flag-returns-OK-response_588598812/recording.har b/cassettes/v2/Feature-Flags_3833710718/Archive-a-feature-flag-returns-OK-response_588598812/recording.har new file mode 100644 index 000000000000..51c1bb3a8a0a --- /dev/null +++ b/cassettes/v2/Feature-Flags_3833710718/Archive-a-feature-flag-returns-OK-response_588598812/recording.har @@ -0,0 +1,196 @@ +{ + "log": { + "_recordingName": "Feature Flags/Archive a feature flag returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "520160944c1c4e68d20c450fd196db60", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 652, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 565, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"description\":\"Test feature flag for BDD scenarios\",\"key\":\"test-feature-flag-Test-Archive_a_feature_flag_returns_OK_response-1773768381\",\"name\":\"Test Feature Flag Test-Archive_a_feature_flag_returns_OK_response-1773768381\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"key\":\"variant-Test-Archive_a_feature_flag_returns_OK_response-1773768381-1\",\"name\":\"Variant Test-Archive_a_feature_flag_returns_OK_response-1773768381 A\",\"value\":\"true\"},{\"key\":\"variant-Test-Archive_a_feature_flag_returns_OK_response-1773768381-2\",\"name\":\"Variant Test-Archive_a_feature_flag_returns_OK_response-1773768381 B\",\"value\":\"false\"}]},\"type\":\"feature-flags\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/feature-flags" + }, + "response": { + "bodySize": 2330, + "content": { + "mimeType": "application/vnd.api+json", + "size": 2330, + "text": "{\"data\":{\"id\":\"194c984e-34a0-4388-89d4-94a818312493\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":null,\"created_at\":\"2026-03-17T17:26:21.863655Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"58f4eaa1-9868-40c4-927f-10c6bf2bd133\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-a8a51d28e424\",\"override_allocation_key\":\"allocation-override-a8a51d28e424\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"58f4eaa1-9868-40c4-927f-10c6bf2bd133\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-f1974d82b5b7\",\"override_allocation_key\":\"allocation-override-f1974d82b5b7\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Archive_a_feature_flag_returns_OK_response-1773768381\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Archive_a_feature_flag_returns_OK_response-1773768381\",\"require_approval\":false,\"updated_at\":\"2026-03-17T17:26:21.863655Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"58f4eaa1-9868-40c4-927f-10c6bf2bd133\",\"key\":\"variant-Test-Archive_a_feature_flag_returns_OK_response-1773768381-1\",\"name\":\"Variant Test-Archive_a_feature_flag_returns_OK_response-1773768381 A\",\"value\":\"true\",\"created_at\":\"2026-03-17T17:26:21.86806Z\",\"updated_at\":\"2026-03-17T17:26:21.86806Z\"},{\"id\":\"9cda04ed-7ff3-4cf8-89ac-3f0e33b8f6e1\",\"key\":\"variant-Test-Archive_a_feature_flag_returns_OK_response-1773768381-2\",\"name\":\"Variant Test-Archive_a_feature_flag_returns_OK_response-1773768381 B\",\"value\":\"false\",\"created_at\":\"2026-03-17T17:26:21.872328Z\",\"updated_at\":\"2026-03-17T17:26:21.872328Z\"}]}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 533, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-03-17T17:26:21.687Z", + "time": 387 + }, + { + "_id": "198a8da095adb72dc23a9a7c4b2cc8c3", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 577, + "httpVersion": "HTTP/1.1", + "method": "POST", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/feature-flags/194c984e-34a0-4388-89d4-94a818312493/archive" + }, + "response": { + "bodySize": 2355, + "content": { + "mimeType": "application/vnd.api+json", + "size": 2355, + "text": "{\"data\":{\"id\":\"194c984e-34a0-4388-89d4-94a818312493\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-17T17:26:22.178257Z\",\"created_at\":\"2026-03-17T17:26:21.863655Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"58f4eaa1-9868-40c4-927f-10c6bf2bd133\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-a8a51d28e424\",\"override_allocation_key\":\"allocation-override-a8a51d28e424\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"58f4eaa1-9868-40c4-927f-10c6bf2bd133\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-f1974d82b5b7\",\"override_allocation_key\":\"allocation-override-f1974d82b5b7\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Archive_a_feature_flag_returns_OK_response-1773768381\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Archive_a_feature_flag_returns_OK_response-1773768381\",\"require_approval\":false,\"updated_at\":\"2026-03-17T17:26:22.178257Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"58f4eaa1-9868-40c4-927f-10c6bf2bd133\",\"key\":\"variant-Test-Archive_a_feature_flag_returns_OK_response-1773768381-1\",\"name\":\"Variant Test-Archive_a_feature_flag_returns_OK_response-1773768381 A\",\"value\":\"true\",\"created_at\":\"2026-03-17T17:26:21.86806Z\",\"updated_at\":\"2026-03-17T17:26:21.86806Z\"},{\"id\":\"9cda04ed-7ff3-4cf8-89ac-3f0e33b8f6e1\",\"key\":\"variant-Test-Archive_a_feature_flag_returns_OK_response-1773768381-2\",\"name\":\"Variant Test-Archive_a_feature_flag_returns_OK_response-1773768381 B\",\"value\":\"false\",\"created_at\":\"2026-03-17T17:26:21.872328Z\",\"updated_at\":\"2026-03-17T17:26:21.872328Z\"}]}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 533, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-03-17T17:26:22.082Z", + "time": 332 + }, + { + "_id": "5a7a53f1237893200b28bfcc6a899608", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 581, + "httpVersion": "HTTP/1.1", + "method": "POST", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/feature-flags/194c984e-34a0-4388-89d4-94a818312493/unarchive" + }, + "response": { + "bodySize": 2330, + "content": { + "mimeType": "application/vnd.api+json", + "size": 2330, + "text": "{\"data\":{\"id\":\"194c984e-34a0-4388-89d4-94a818312493\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":null,\"created_at\":\"2026-03-17T17:26:21.863655Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"58f4eaa1-9868-40c4-927f-10c6bf2bd133\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-a8a51d28e424\",\"override_allocation_key\":\"allocation-override-a8a51d28e424\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"58f4eaa1-9868-40c4-927f-10c6bf2bd133\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-f1974d82b5b7\",\"override_allocation_key\":\"allocation-override-f1974d82b5b7\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Archive_a_feature_flag_returns_OK_response-1773768381\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Archive_a_feature_flag_returns_OK_response-1773768381\",\"require_approval\":false,\"updated_at\":\"2026-03-17T17:26:22.541762Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"58f4eaa1-9868-40c4-927f-10c6bf2bd133\",\"key\":\"variant-Test-Archive_a_feature_flag_returns_OK_response-1773768381-1\",\"name\":\"Variant Test-Archive_a_feature_flag_returns_OK_response-1773768381 A\",\"value\":\"true\",\"created_at\":\"2026-03-17T17:26:21.86806Z\",\"updated_at\":\"2026-03-17T17:26:21.86806Z\"},{\"id\":\"9cda04ed-7ff3-4cf8-89ac-3f0e33b8f6e1\",\"key\":\"variant-Test-Archive_a_feature_flag_returns_OK_response-1773768381-2\",\"name\":\"Variant Test-Archive_a_feature_flag_returns_OK_response-1773768381 B\",\"value\":\"false\",\"created_at\":\"2026-03-17T17:26:21.872328Z\",\"updated_at\":\"2026-03-17T17:26:21.872328Z\"}]}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 533, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-03-17T17:26:22.423Z", + "time": 414 + }, + { + "_id": "198a8da095adb72dc23a9a7c4b2cc8c3", + "_order": 1, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 577, + "httpVersion": "HTTP/1.1", + "method": "POST", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/feature-flags/194c984e-34a0-4388-89d4-94a818312493/archive" + }, + "response": { + "bodySize": 2355, + "content": { + "mimeType": "application/vnd.api+json", + "size": 2355, + "text": "{\"data\":{\"id\":\"194c984e-34a0-4388-89d4-94a818312493\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-17T17:26:22.921183Z\",\"created_at\":\"2026-03-17T17:26:21.863655Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"58f4eaa1-9868-40c4-927f-10c6bf2bd133\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-a8a51d28e424\",\"override_allocation_key\":\"allocation-override-a8a51d28e424\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"58f4eaa1-9868-40c4-927f-10c6bf2bd133\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-f1974d82b5b7\",\"override_allocation_key\":\"allocation-override-f1974d82b5b7\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Archive_a_feature_flag_returns_OK_response-1773768381\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Archive_a_feature_flag_returns_OK_response-1773768381\",\"require_approval\":false,\"updated_at\":\"2026-03-17T17:26:22.921183Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"58f4eaa1-9868-40c4-927f-10c6bf2bd133\",\"key\":\"variant-Test-Archive_a_feature_flag_returns_OK_response-1773768381-1\",\"name\":\"Variant Test-Archive_a_feature_flag_returns_OK_response-1773768381 A\",\"value\":\"true\",\"created_at\":\"2026-03-17T17:26:21.86806Z\",\"updated_at\":\"2026-03-17T17:26:21.86806Z\"},{\"id\":\"9cda04ed-7ff3-4cf8-89ac-3f0e33b8f6e1\",\"key\":\"variant-Test-Archive_a_feature_flag_returns_OK_response-1773768381-2\",\"name\":\"Variant Test-Archive_a_feature_flag_returns_OK_response-1773768381 B\",\"value\":\"false\",\"created_at\":\"2026-03-17T17:26:21.872328Z\",\"updated_at\":\"2026-03-17T17:26:21.872328Z\"}]}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 533, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-03-17T17:26:22.841Z", + "time": 284 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Feature-Flags_3833710718/Create-a-feature-flag-returns-Created-response_1455968540/frozen.json b/cassettes/v2/Feature-Flags_3833710718/Create-a-feature-flag-returns-Created-response_1455968540/frozen.json new file mode 100644 index 000000000000..fbc69f642975 --- /dev/null +++ b/cassettes/v2/Feature-Flags_3833710718/Create-a-feature-flag-returns-Created-response_1455968540/frozen.json @@ -0,0 +1 @@ +"2026-03-17T17:26:23.134Z" diff --git a/cassettes/v2/Feature-Flags_3833710718/Create-a-feature-flag-returns-Created-response_1455968540/recording.har b/cassettes/v2/Feature-Flags_3833710718/Create-a-feature-flag-returns-Created-response_1455968540/recording.har new file mode 100644 index 000000000000..15b69a34319c --- /dev/null +++ b/cassettes/v2/Feature-Flags_3833710718/Create-a-feature-flag-returns-Created-response_1455968540/recording.har @@ -0,0 +1,110 @@ +{ + "log": { + "_recordingName": "Feature Flags/Create a feature flag returns \"Created\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "32196dcbfbc60b1087b37d7d674d5674", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 773, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 565, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"default_variant_key\":\"variant-Test-Create_a_feature_flag_returns_Created_response-1773768383-1\",\"description\":\"Test feature flag for BDD scenarios\",\"key\":\"test-feature-flag-Test-Create_a_feature_flag_returns_Created_response-1773768383\",\"name\":\"Test Feature Flag Test-Create_a_feature_flag_returns_Created_response-1773768383\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"key\":\"variant-Test-Create_a_feature_flag_returns_Created_response-1773768383-1\",\"name\":\"Variant Test-Create_a_feature_flag_returns_Created_response-1773768383 A\",\"value\":\"true\"},{\"key\":\"variant-Test-Create_a_feature_flag_returns_Created_response-1773768383-2\",\"name\":\"Variant Test-Create_a_feature_flag_returns_Created_response-1773768383 B\",\"value\":\"false\"}]},\"type\":\"feature-flags\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/feature-flags" + }, + "response": { + "bodySize": 2354, + "content": { + "mimeType": "application/vnd.api+json", + "size": 2354, + "text": "{\"data\":{\"id\":\"6fa35bee-ba95-4f15-b50d-c361e155f2ae\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":null,\"created_at\":\"2026-03-17T17:26:23.233582Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"8cddd390-eb33-4430-a0e5-89134e033633\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-61ba48eebc90\",\"override_allocation_key\":\"allocation-override-61ba48eebc90\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"8cddd390-eb33-4430-a0e5-89134e033633\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-2e4b491cac9c\",\"override_allocation_key\":\"allocation-override-2e4b491cac9c\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Create_a_feature_flag_returns_Created_response-1773768383\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Create_a_feature_flag_returns_Created_response-1773768383\",\"require_approval\":false,\"updated_at\":\"2026-03-17T17:26:23.233582Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"8cddd390-eb33-4430-a0e5-89134e033633\",\"key\":\"variant-Test-Create_a_feature_flag_returns_Created_response-1773768383-1\",\"name\":\"Variant Test-Create_a_feature_flag_returns_Created_response-1773768383 A\",\"value\":\"true\",\"created_at\":\"2026-03-17T17:26:23.23848Z\",\"updated_at\":\"2026-03-17T17:26:23.23848Z\"},{\"id\":\"62dcbb05-dad0-4fbb-ab67-d308ca03bec0\",\"key\":\"variant-Test-Create_a_feature_flag_returns_Created_response-1773768383-2\",\"name\":\"Variant Test-Create_a_feature_flag_returns_Created_response-1773768383 B\",\"value\":\"false\",\"created_at\":\"2026-03-17T17:26:23.243558Z\",\"updated_at\":\"2026-03-17T17:26:23.243558Z\"}]}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 533, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-03-17T17:26:23.138Z", + "time": 337 + }, + { + "_id": "3f2ee9cf2516648409fd0fe3d7643726", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 577, + "httpVersion": "HTTP/1.1", + "method": "POST", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/feature-flags/6fa35bee-ba95-4f15-b50d-c361e155f2ae/archive" + }, + "response": { + "bodySize": 2379, + "content": { + "mimeType": "application/vnd.api+json", + "size": 2379, + "text": "{\"data\":{\"id\":\"6fa35bee-ba95-4f15-b50d-c361e155f2ae\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-17T17:26:23.573178Z\",\"created_at\":\"2026-03-17T17:26:23.233582Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"8cddd390-eb33-4430-a0e5-89134e033633\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-61ba48eebc90\",\"override_allocation_key\":\"allocation-override-61ba48eebc90\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"8cddd390-eb33-4430-a0e5-89134e033633\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-2e4b491cac9c\",\"override_allocation_key\":\"allocation-override-2e4b491cac9c\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Create_a_feature_flag_returns_Created_response-1773768383\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Create_a_feature_flag_returns_Created_response-1773768383\",\"require_approval\":false,\"updated_at\":\"2026-03-17T17:26:23.573178Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"8cddd390-eb33-4430-a0e5-89134e033633\",\"key\":\"variant-Test-Create_a_feature_flag_returns_Created_response-1773768383-1\",\"name\":\"Variant Test-Create_a_feature_flag_returns_Created_response-1773768383 A\",\"value\":\"true\",\"created_at\":\"2026-03-17T17:26:23.23848Z\",\"updated_at\":\"2026-03-17T17:26:23.23848Z\"},{\"id\":\"62dcbb05-dad0-4fbb-ab67-d308ca03bec0\",\"key\":\"variant-Test-Create_a_feature_flag_returns_Created_response-1773768383-2\",\"name\":\"Variant Test-Create_a_feature_flag_returns_Created_response-1773768383 B\",\"value\":\"false\",\"created_at\":\"2026-03-17T17:26:23.243558Z\",\"updated_at\":\"2026-03-17T17:26:23.243558Z\"}]}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 533, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-03-17T17:26:23.482Z", + "time": 406 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Feature-Flags_3833710718/Create-an-environment-returns-Created-response_2381451289/frozen.json b/cassettes/v2/Feature-Flags_3833710718/Create-an-environment-returns-Created-response_2381451289/frozen.json new file mode 100644 index 000000000000..5506c98904de --- /dev/null +++ b/cassettes/v2/Feature-Flags_3833710718/Create-an-environment-returns-Created-response_2381451289/frozen.json @@ -0,0 +1 @@ +"2026-03-17T17:26:23.896Z" diff --git a/cassettes/v2/Feature-Flags_3833710718/Create-an-environment-returns-Created-response_2381451289/recording.har b/cassettes/v2/Feature-Flags_3833710718/Create-an-environment-returns-Created-response_2381451289/recording.har new file mode 100644 index 000000000000..1e5f3efea8df --- /dev/null +++ b/cassettes/v2/Feature-Flags_3833710718/Create-an-environment-returns-Created-response_2381451289/recording.har @@ -0,0 +1,104 @@ +{ + "log": { + "_recordingName": "Feature Flags/Create an environment returns \"Created\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "ab87ebd6cb38c6e2cde271eeb436dc8d", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 287, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 578, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"name\":\"Test Environment Test-Create_an_environment_returns_Created_response-1773768383\",\"queries\":[\"test-Test-Create_an_environment_returns_Created_response-1773768383\",\"env-Test-Create_an_environment_returns_Created_response-1773768383\"]},\"type\":\"environments\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/feature-flags/environments" + }, + "response": { + "bodySize": 391, + "content": { + "mimeType": "application/vnd.api+json", + "size": 391, + "text": "{\"data\":{\"id\":\"b7fd5cfe-3350-4db5-9731-1702b2fc9ab7\",\"type\":\"environments\",\"attributes\":{\"is_production\":false,\"name\":\"Test Environment Test-Create_an_environment_returns_Created_response-1773768383\",\"queries\":[\"test-Test-Create_an_environment_returns_Created_response-1773768383\",\"env-Test-Create_an_environment_returns_Created_response-1773768383\"],\"require_feature_flag_approval\":false}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 532, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-03-17T17:26:23.898Z", + "time": 173 + }, + { + "_id": "70868c2f5d6c8b940250e3f5ccb37ac8", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 551, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/feature-flags/environments/b7fd5cfe-3350-4db5-9731-1702b2fc9ab7" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 471, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2026-03-17T17:26:24.075Z", + "time": 235 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Feature-Flags_3833710718/Get-a-feature-flag-returns-OK-response_2915714942/frozen.json b/cassettes/v2/Feature-Flags_3833710718/Get-a-feature-flag-returns-OK-response_2915714942/frozen.json new file mode 100644 index 000000000000..b6e908c88619 --- /dev/null +++ b/cassettes/v2/Feature-Flags_3833710718/Get-a-feature-flag-returns-OK-response_2915714942/frozen.json @@ -0,0 +1 @@ +"2026-03-17T17:26:24.320Z" diff --git a/cassettes/v2/Feature-Flags_3833710718/Get-a-feature-flag-returns-OK-response_2915714942/recording.har b/cassettes/v2/Feature-Flags_3833710718/Get-a-feature-flag-returns-OK-response_2915714942/recording.har new file mode 100644 index 000000000000..6c95e58f4e28 --- /dev/null +++ b/cassettes/v2/Feature-Flags_3833710718/Get-a-feature-flag-returns-OK-response_2915714942/recording.har @@ -0,0 +1,153 @@ +{ + "log": { + "_recordingName": "Feature Flags/Get a feature flag returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "05bd338a0d56c3107ee26ec02643f283", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 628, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 565, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"description\":\"Test feature flag for BDD scenarios\",\"key\":\"test-feature-flag-Test-Get_a_feature_flag_returns_OK_response-1773768384\",\"name\":\"Test Feature Flag Test-Get_a_feature_flag_returns_OK_response-1773768384\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"key\":\"variant-Test-Get_a_feature_flag_returns_OK_response-1773768384-1\",\"name\":\"Variant Test-Get_a_feature_flag_returns_OK_response-1773768384 A\",\"value\":\"true\"},{\"key\":\"variant-Test-Get_a_feature_flag_returns_OK_response-1773768384-2\",\"name\":\"Variant Test-Get_a_feature_flag_returns_OK_response-1773768384 B\",\"value\":\"false\"}]},\"type\":\"feature-flags\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/feature-flags" + }, + "response": { + "bodySize": 2308, + "content": { + "mimeType": "application/vnd.api+json", + "size": 2308, + "text": "{\"data\":{\"id\":\"e534f5d9-6883-4167-9695-00445005a23f\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":null,\"created_at\":\"2026-03-17T17:26:24.476682Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"01acab73-99ca-4c28-96f1-56b2abc12275\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-6bea15c01017\",\"override_allocation_key\":\"allocation-override-6bea15c01017\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"01acab73-99ca-4c28-96f1-56b2abc12275\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-f8960a34da10\",\"override_allocation_key\":\"allocation-override-f8960a34da10\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Get_a_feature_flag_returns_OK_response-1773768384\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Get_a_feature_flag_returns_OK_response-1773768384\",\"require_approval\":false,\"updated_at\":\"2026-03-17T17:26:24.476682Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"01acab73-99ca-4c28-96f1-56b2abc12275\",\"key\":\"variant-Test-Get_a_feature_flag_returns_OK_response-1773768384-1\",\"name\":\"Variant Test-Get_a_feature_flag_returns_OK_response-1773768384 A\",\"value\":\"true\",\"created_at\":\"2026-03-17T17:26:24.479508Z\",\"updated_at\":\"2026-03-17T17:26:24.479508Z\"},{\"id\":\"1889f1c9-961f-4202-aae1-ad8b3a8fe369\",\"key\":\"variant-Test-Get_a_feature_flag_returns_OK_response-1773768384-2\",\"name\":\"Variant Test-Get_a_feature_flag_returns_OK_response-1773768384 B\",\"value\":\"false\",\"created_at\":\"2026-03-17T17:26:24.482785Z\",\"updated_at\":\"2026-03-17T17:26:24.482785Z\"}]}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 533, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-03-17T17:26:24.326Z", + "time": 230 + }, + { + "_id": "0ea29353097d7f4a520301c4e3c98ad9", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 545, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/feature-flags/e534f5d9-6883-4167-9695-00445005a23f" + }, + "response": { + "bodySize": 2308, + "content": { + "mimeType": "application/vnd.api+json", + "size": 2308, + "text": "{\"data\":{\"id\":\"e534f5d9-6883-4167-9695-00445005a23f\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":null,\"created_at\":\"2026-03-17T17:26:24.476682Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"01acab73-99ca-4c28-96f1-56b2abc12275\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-6bea15c01017\",\"override_allocation_key\":\"allocation-override-6bea15c01017\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"01acab73-99ca-4c28-96f1-56b2abc12275\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-f8960a34da10\",\"override_allocation_key\":\"allocation-override-f8960a34da10\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Get_a_feature_flag_returns_OK_response-1773768384\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Get_a_feature_flag_returns_OK_response-1773768384\",\"require_approval\":false,\"updated_at\":\"2026-03-17T17:26:24.476682Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"01acab73-99ca-4c28-96f1-56b2abc12275\",\"key\":\"variant-Test-Get_a_feature_flag_returns_OK_response-1773768384-1\",\"name\":\"Variant Test-Get_a_feature_flag_returns_OK_response-1773768384 A\",\"value\":\"true\",\"created_at\":\"2026-03-17T17:26:24.479508Z\",\"updated_at\":\"2026-03-17T17:26:24.479508Z\"},{\"id\":\"1889f1c9-961f-4202-aae1-ad8b3a8fe369\",\"key\":\"variant-Test-Get_a_feature_flag_returns_OK_response-1773768384-2\",\"name\":\"Variant Test-Get_a_feature_flag_returns_OK_response-1773768384 B\",\"value\":\"false\",\"created_at\":\"2026-03-17T17:26:24.482785Z\",\"updated_at\":\"2026-03-17T17:26:24.482785Z\"}]}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 533, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-03-17T17:26:24.561Z", + "time": 114 + }, + { + "_id": "dad6f4f50f395345f27c14371376086d", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 577, + "httpVersion": "HTTP/1.1", + "method": "POST", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/feature-flags/e534f5d9-6883-4167-9695-00445005a23f/archive" + }, + "response": { + "bodySize": 2333, + "content": { + "mimeType": "application/vnd.api+json", + "size": 2333, + "text": "{\"data\":{\"id\":\"e534f5d9-6883-4167-9695-00445005a23f\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-17T17:26:24.762691Z\",\"created_at\":\"2026-03-17T17:26:24.476682Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"01acab73-99ca-4c28-96f1-56b2abc12275\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-6bea15c01017\",\"override_allocation_key\":\"allocation-override-6bea15c01017\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"01acab73-99ca-4c28-96f1-56b2abc12275\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-f8960a34da10\",\"override_allocation_key\":\"allocation-override-f8960a34da10\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Get_a_feature_flag_returns_OK_response-1773768384\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Get_a_feature_flag_returns_OK_response-1773768384\",\"require_approval\":false,\"updated_at\":\"2026-03-17T17:26:24.762691Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"01acab73-99ca-4c28-96f1-56b2abc12275\",\"key\":\"variant-Test-Get_a_feature_flag_returns_OK_response-1773768384-1\",\"name\":\"Variant Test-Get_a_feature_flag_returns_OK_response-1773768384 A\",\"value\":\"true\",\"created_at\":\"2026-03-17T17:26:24.479508Z\",\"updated_at\":\"2026-03-17T17:26:24.479508Z\"},{\"id\":\"1889f1c9-961f-4202-aae1-ad8b3a8fe369\",\"key\":\"variant-Test-Get_a_feature_flag_returns_OK_response-1773768384-2\",\"name\":\"Variant Test-Get_a_feature_flag_returns_OK_response-1773768384 B\",\"value\":\"false\",\"created_at\":\"2026-03-17T17:26:24.482785Z\",\"updated_at\":\"2026-03-17T17:26:24.482785Z\"}]}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 533, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-03-17T17:26:24.680Z", + "time": 253 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Feature-Flags_3833710718/List-feature-flags-returns-OK-response_2201385082/frozen.json b/cassettes/v2/Feature-Flags_3833710718/List-feature-flags-returns-OK-response_2201385082/frozen.json new file mode 100644 index 000000000000..4f58120dabdd --- /dev/null +++ b/cassettes/v2/Feature-Flags_3833710718/List-feature-flags-returns-OK-response_2201385082/frozen.json @@ -0,0 +1 @@ +"2026-03-17T17:26:24.940Z" diff --git a/cassettes/v2/Feature-Flags_3833710718/List-feature-flags-returns-OK-response_2201385082/recording.har b/cassettes/v2/Feature-Flags_3833710718/List-feature-flags-returns-OK-response_2201385082/recording.har new file mode 100644 index 000000000000..558559542545 --- /dev/null +++ b/cassettes/v2/Feature-Flags_3833710718/List-feature-flags-returns-OK-response_2201385082/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "Feature Flags/List feature flags returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "2d25fd460cb26ab0a71a4280391169d0", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 510, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/feature-flags" + }, + "response": { + "bodySize": 96664, + "content": { + "mimeType": "application/vnd.api+json", + "size": 96664, + "text": "{\"data\":[{\"id\":\"e534f5d9-6883-4167-9695-00445005a23f\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-17T17:26:24.762691Z\",\"created_at\":\"2026-03-17T17:26:24.476682Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"01acab73-99ca-4c28-96f1-56b2abc12275\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-6bea15c01017\",\"override_allocation_key\":\"allocation-override-6bea15c01017\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"01acab73-99ca-4c28-96f1-56b2abc12275\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-f8960a34da10\",\"override_allocation_key\":\"allocation-override-f8960a34da10\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Get_a_feature_flag_returns_OK_response-1773768384\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Get_a_feature_flag_returns_OK_response-1773768384\",\"require_approval\":false,\"updated_at\":\"2026-03-17T17:26:24.762691Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"01acab73-99ca-4c28-96f1-56b2abc12275\",\"key\":\"variant-Test-Get_a_feature_flag_returns_OK_response-1773768384-1\",\"name\":\"Variant Test-Get_a_feature_flag_returns_OK_response-1773768384 A\",\"value\":\"true\",\"created_at\":\"2026-03-17T17:26:24.479508Z\",\"updated_at\":\"2026-03-17T17:26:24.479508Z\"},{\"id\":\"1889f1c9-961f-4202-aae1-ad8b3a8fe369\",\"key\":\"variant-Test-Get_a_feature_flag_returns_OK_response-1773768384-2\",\"name\":\"Variant Test-Get_a_feature_flag_returns_OK_response-1773768384 B\",\"value\":\"false\",\"created_at\":\"2026-03-17T17:26:24.482785Z\",\"updated_at\":\"2026-03-17T17:26:24.482785Z\"}]}},{\"id\":\"6fa35bee-ba95-4f15-b50d-c361e155f2ae\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-17T17:26:23.573178Z\",\"created_at\":\"2026-03-17T17:26:23.233582Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"8cddd390-eb33-4430-a0e5-89134e033633\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-61ba48eebc90\",\"override_allocation_key\":\"allocation-override-61ba48eebc90\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"8cddd390-eb33-4430-a0e5-89134e033633\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-2e4b491cac9c\",\"override_allocation_key\":\"allocation-override-2e4b491cac9c\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Create_a_feature_flag_returns_Created_response-1773768383\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Create_a_feature_flag_returns_Created_response-1773768383\",\"require_approval\":false,\"updated_at\":\"2026-03-17T17:26:23.573178Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"8cddd390-eb33-4430-a0e5-89134e033633\",\"key\":\"variant-Test-Create_a_feature_flag_returns_Created_response-1773768383-1\",\"name\":\"Variant Test-Create_a_feature_flag_returns_Created_response-1773768383 A\",\"value\":\"true\",\"created_at\":\"2026-03-17T17:26:23.23848Z\",\"updated_at\":\"2026-03-17T17:26:23.23848Z\"},{\"id\":\"62dcbb05-dad0-4fbb-ab67-d308ca03bec0\",\"key\":\"variant-Test-Create_a_feature_flag_returns_Created_response-1773768383-2\",\"name\":\"Variant Test-Create_a_feature_flag_returns_Created_response-1773768383 B\",\"value\":\"false\",\"created_at\":\"2026-03-17T17:26:23.243558Z\",\"updated_at\":\"2026-03-17T17:26:23.243558Z\"}]}},{\"id\":\"194c984e-34a0-4388-89d4-94a818312493\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-17T17:26:22.921183Z\",\"created_at\":\"2026-03-17T17:26:21.863655Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"58f4eaa1-9868-40c4-927f-10c6bf2bd133\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-a8a51d28e424\",\"override_allocation_key\":\"allocation-override-a8a51d28e424\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"58f4eaa1-9868-40c4-927f-10c6bf2bd133\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-f1974d82b5b7\",\"override_allocation_key\":\"allocation-override-f1974d82b5b7\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Archive_a_feature_flag_returns_OK_response-1773768381\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Archive_a_feature_flag_returns_OK_response-1773768381\",\"require_approval\":false,\"updated_at\":\"2026-03-17T17:26:22.921183Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"58f4eaa1-9868-40c4-927f-10c6bf2bd133\",\"key\":\"variant-Test-Archive_a_feature_flag_returns_OK_response-1773768381-1\",\"name\":\"Variant Test-Archive_a_feature_flag_returns_OK_response-1773768381 A\",\"value\":\"true\",\"created_at\":\"2026-03-17T17:26:21.86806Z\",\"updated_at\":\"2026-03-17T17:26:21.86806Z\"},{\"id\":\"9cda04ed-7ff3-4cf8-89ac-3f0e33b8f6e1\",\"key\":\"variant-Test-Archive_a_feature_flag_returns_OK_response-1773768381-2\",\"name\":\"Variant Test-Archive_a_feature_flag_returns_OK_response-1773768381 B\",\"value\":\"false\",\"created_at\":\"2026-03-17T17:26:21.872328Z\",\"updated_at\":\"2026-03-17T17:26:21.872328Z\"}]}},{\"id\":\"201bdbf0-1c80-4660-95bf-cc30c7ce2401\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-17T15:08:57.257128Z\",\"created_at\":\"2026-03-17T15:08:57.035045Z\",\"created_by\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"12e38f0b-20a4-4ed3-b25f-61c34b54e47d\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-351fbd61cc67\",\"override_allocation_key\":\"allocation-override-351fbd61cc67\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"12e38f0b-20a4-4ed3-b25f-61c34b54e47d\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-249549624198\",\"override_allocation_key\":\"allocation-override-249549624198\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Update_a_feature_flag_returns_OK_response-1773760136\",\"last_updated_by\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"Test Feature Flag Test-Update_a_feature_flag_returns_OK_response-1773760136\",\"require_approval\":false,\"updated_at\":\"2026-03-17T15:08:57.257128Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"12e38f0b-20a4-4ed3-b25f-61c34b54e47d\",\"key\":\"variant-Test-Update_a_feature_flag_returns_OK_response-1773760136-1\",\"name\":\"Variant Test-Update_a_feature_flag_returns_OK_response-1773760136 A\",\"value\":\"true\",\"created_at\":\"2026-03-17T15:08:57.039839Z\",\"updated_at\":\"2026-03-17T15:08:57.039839Z\"},{\"id\":\"e190d95f-1150-409c-9eb6-959b746bf452\",\"key\":\"variant-Test-Update_a_feature_flag_returns_OK_response-1773760136-2\",\"name\":\"Variant Test-Update_a_feature_flag_returns_OK_response-1773760136 B\",\"value\":\"false\",\"created_at\":\"2026-03-17T15:08:57.044352Z\",\"updated_at\":\"2026-03-17T15:08:57.044352Z\"}]}},{\"id\":\"eab9c92e-199c-4bc9-84f0-20551cd7cc4a\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-17T15:08:56.608346Z\",\"created_at\":\"2026-03-17T15:08:56.398337Z\",\"created_by\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"af3d3e5d-6cc7-4b05-8964-a707e48ea198\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-b33799d7bae7\",\"override_allocation_key\":\"allocation-override-b33799d7bae7\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"af3d3e5d-6cc7-4b05-8964-a707e48ea198\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-4cb65fb41004\",\"override_allocation_key\":\"allocation-override-4cb65fb41004\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Get_a_feature_flag_returns_OK_response-1773760136\",\"last_updated_by\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"Test Feature Flag Test-Get_a_feature_flag_returns_OK_response-1773760136\",\"require_approval\":false,\"updated_at\":\"2026-03-17T15:08:56.608346Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"af3d3e5d-6cc7-4b05-8964-a707e48ea198\",\"key\":\"variant-Test-Get_a_feature_flag_returns_OK_response-1773760136-1\",\"name\":\"Variant Test-Get_a_feature_flag_returns_OK_response-1773760136 A\",\"value\":\"true\",\"created_at\":\"2026-03-17T15:08:56.40304Z\",\"updated_at\":\"2026-03-17T15:08:56.40304Z\"},{\"id\":\"39e6b5b6-6c35-4dfc-9dd7-66398c392155\",\"key\":\"variant-Test-Get_a_feature_flag_returns_OK_response-1773760136-2\",\"name\":\"Variant Test-Get_a_feature_flag_returns_OK_response-1773760136 B\",\"value\":\"false\",\"created_at\":\"2026-03-17T15:08:56.407701Z\",\"updated_at\":\"2026-03-17T15:08:56.407701Z\"}]}},{\"id\":\"9a3ce628-9519-4b66-8c7b-66b876aa06f5\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-17T15:08:55.931129Z\",\"created_at\":\"2026-03-17T15:08:55.625956Z\",\"created_by\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"207f0378-5e66-4dbe-8cc3-c24c08a2bf7a\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-35f6338b1693\",\"override_allocation_key\":\"allocation-override-35f6338b1693\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"207f0378-5e66-4dbe-8cc3-c24c08a2bf7a\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-c7b8d27ca798\",\"override_allocation_key\":\"allocation-override-c7b8d27ca798\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Archive_a_feature_flag_returns_OK_response-1773760134\",\"last_updated_by\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"Test Feature Flag Test-Archive_a_feature_flag_returns_OK_response-1773760134\",\"require_approval\":false,\"updated_at\":\"2026-03-17T15:08:55.931129Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"207f0378-5e66-4dbe-8cc3-c24c08a2bf7a\",\"key\":\"variant-Test-Archive_a_feature_flag_returns_OK_response-1773760134-1\",\"name\":\"Variant Test-Archive_a_feature_flag_returns_OK_response-1773760134 A\",\"value\":\"true\",\"created_at\":\"2026-03-17T15:08:55.632964Z\",\"updated_at\":\"2026-03-17T15:08:55.632964Z\"},{\"id\":\"cb77f2cf-2cff-47a4-bb45-06269f7f0caa\",\"key\":\"variant-Test-Archive_a_feature_flag_returns_OK_response-1773760134-2\",\"name\":\"Variant Test-Archive_a_feature_flag_returns_OK_response-1773760134 B\",\"value\":\"false\",\"created_at\":\"2026-03-17T15:08:55.638427Z\",\"updated_at\":\"2026-03-17T15:08:55.638427Z\"}]}},{\"id\":\"7dc4f6d7-e9d0-4185-b5f0-7b9db2e78eda\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-13T19:20:52.438694Z\",\"created_at\":\"2026-03-13T19:20:51.50037Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Updated description for the feature flag\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"06f16f9c-a9bb-47d9-8a2a-619533d36d5e\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-88187e7b6e51\",\"override_allocation_key\":\"allocation-override-88187e7b6e51\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"06f16f9c-a9bb-47d9-8a2a-619533d36d5e\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-10ba6fd58e8d\",\"override_allocation_key\":\"allocation-override-10ba6fd58e8d\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Update_a_feature_flag_returns_OK_response-1773429651\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Updated Test Feature Flag Test-Update_a_feature_flag_returns_OK_response-1773429651\",\"require_approval\":false,\"updated_at\":\"2026-03-13T19:20:52.438694Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"06f16f9c-a9bb-47d9-8a2a-619533d36d5e\",\"key\":\"variant-Test-Update_a_feature_flag_returns_OK_response-1773429651-1\",\"name\":\"Variant Test-Update_a_feature_flag_returns_OK_response-1773429651 A\",\"value\":\"true\",\"created_at\":\"2026-03-13T19:20:51.505338Z\",\"updated_at\":\"2026-03-13T19:20:51.505338Z\"},{\"id\":\"2d024126-2526-4d3a-9dc5-11df237a4ad6\",\"key\":\"variant-Test-Update_a_feature_flag_returns_OK_response-1773429651-2\",\"name\":\"Variant Test-Update_a_feature_flag_returns_OK_response-1773429651 B\",\"value\":\"false\",\"created_at\":\"2026-03-13T19:20:51.510522Z\",\"updated_at\":\"2026-03-13T19:20:51.510522Z\"}]}},{\"id\":\"ab8ed7a2-1f14-4bed-9f9d-6e81cbbd6119\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-13T19:20:50.696628Z\",\"created_at\":\"2026-03-13T19:20:50.025005Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"bb9b6386-477d-483b-b971-6aa0ce56c947\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-af658c22b724\",\"override_allocation_key\":\"allocation-override-af658c22b724\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"bb9b6386-477d-483b-b971-6aa0ce56c947\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-df870b1a44d6\",\"override_allocation_key\":\"allocation-override-df870b1a44d6\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Get_a_feature_flag_returns_OK_response-1773429649\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Get_a_feature_flag_returns_OK_response-1773429649\",\"require_approval\":false,\"updated_at\":\"2026-03-13T19:20:50.696628Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"bb9b6386-477d-483b-b971-6aa0ce56c947\",\"key\":\"variant-Test-Get_a_feature_flag_returns_OK_response-1773429649-1\",\"name\":\"Variant Test-Get_a_feature_flag_returns_OK_response-1773429649 A\",\"value\":\"true\",\"created_at\":\"2026-03-13T19:20:50.029758Z\",\"updated_at\":\"2026-03-13T19:20:50.029758Z\"},{\"id\":\"e867fa19-8d94-4985-a91d-16ae56ba0dae\",\"key\":\"variant-Test-Get_a_feature_flag_returns_OK_response-1773429649-2\",\"name\":\"Variant Test-Get_a_feature_flag_returns_OK_response-1773429649 B\",\"value\":\"false\",\"created_at\":\"2026-03-13T19:20:50.034524Z\",\"updated_at\":\"2026-03-13T19:20:50.034524Z\"}]}},{\"id\":\"d0692b6c-d099-4311-aa06-ece56f0404ce\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-13T19:20:48.748098Z\",\"created_at\":\"2026-03-13T19:20:48.31821Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"350a67c9-7f99-4a54-a0b4-6e816073de44\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-13d5cca82e36\",\"override_allocation_key\":\"allocation-override-13d5cca82e36\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"350a67c9-7f99-4a54-a0b4-6e816073de44\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-83d5e3e7be2c\",\"override_allocation_key\":\"allocation-override-83d5e3e7be2c\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Create_a_feature_flag_returns_Created_response-1773429647\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Create_a_feature_flag_returns_Created_response-1773429647\",\"require_approval\":false,\"updated_at\":\"2026-03-13T19:20:48.748098Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"350a67c9-7f99-4a54-a0b4-6e816073de44\",\"key\":\"variant-Test-Create_a_feature_flag_returns_Created_response-1773429647-1\",\"name\":\"Variant Test-Create_a_feature_flag_returns_Created_response-1773429647 A\",\"value\":\"true\",\"created_at\":\"2026-03-13T19:20:48.323062Z\",\"updated_at\":\"2026-03-13T19:20:48.323062Z\"},{\"id\":\"93a50632-e7c5-4cfa-bd7d-49dd6fa480ee\",\"key\":\"variant-Test-Create_a_feature_flag_returns_Created_response-1773429647-2\",\"name\":\"Variant Test-Create_a_feature_flag_returns_Created_response-1773429647 B\",\"value\":\"false\",\"created_at\":\"2026-03-13T19:20:48.328149Z\",\"updated_at\":\"2026-03-13T19:20:48.328149Z\"}]}},{\"id\":\"a6334abf-af4c-45f4-a5da-9906bf2d5ab3\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-13T19:20:47.574492Z\",\"created_at\":\"2026-03-13T19:20:46.170014Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"2251f13b-addb-4015-b4ec-f0b9e0517de2\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-ddf49525f4d2\",\"override_allocation_key\":\"allocation-override-ddf49525f4d2\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"2251f13b-addb-4015-b4ec-f0b9e0517de2\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-f76229e13e34\",\"override_allocation_key\":\"allocation-override-f76229e13e34\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Archive_a_feature_flag_returns_OK_response-1773429645\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Archive_a_feature_flag_returns_OK_response-1773429645\",\"require_approval\":false,\"updated_at\":\"2026-03-13T19:20:47.574492Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"2251f13b-addb-4015-b4ec-f0b9e0517de2\",\"key\":\"variant-Test-Archive_a_feature_flag_returns_OK_response-1773429645-1\",\"name\":\"Variant Test-Archive_a_feature_flag_returns_OK_response-1773429645 A\",\"value\":\"true\",\"created_at\":\"2026-03-13T19:20:46.176771Z\",\"updated_at\":\"2026-03-13T19:20:46.176771Z\"},{\"id\":\"da742de9-5ac7-4352-bf78-0e4ea73b4cca\",\"key\":\"variant-Test-Archive_a_feature_flag_returns_OK_response-1773429645-2\",\"name\":\"Variant Test-Archive_a_feature_flag_returns_OK_response-1773429645 B\",\"value\":\"false\",\"created_at\":\"2026-03-13T19:20:46.182512Z\",\"updated_at\":\"2026-03-13T19:20:46.182512Z\"}]}},{\"id\":\"173d224a-6400-4677-9e8e-5aa20a94fcae\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-12T13:49:05.555164Z\",\"created_at\":\"2026-03-12T13:49:05.026326Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Updated description for the feature flag\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"d51ad06c-f0ba-42a6-a889-144de626e1e3\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-6851fe2abd67\",\"override_allocation_key\":\"allocation-override-6851fe2abd67\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"d51ad06c-f0ba-42a6-a889-144de626e1e3\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-e30e5bf098a3\",\"override_allocation_key\":\"allocation-override-e30e5bf098a3\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Typescript-Update_a_feature_flag_returns_OK_response-1773323344\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Updated Test Feature Flag Test-Typescript-Update_a_feature_flag_returns_OK_response-1773323344\",\"require_approval\":false,\"updated_at\":\"2026-03-12T13:49:05.555164Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"d51ad06c-f0ba-42a6-a889-144de626e1e3\",\"key\":\"variant-Test-Typescript-Update_a_feature_flag_returns_OK_response-1773323344-1\",\"name\":\"Variant Test-Typescript-Update_a_feature_flag_returns_OK_response-1773323344 A\",\"value\":\"true\",\"created_at\":\"2026-03-12T13:49:05.031021Z\",\"updated_at\":\"2026-03-12T13:49:05.031021Z\"},{\"id\":\"3324cbaa-21ed-4977-a2ec-0cff602ede43\",\"key\":\"variant-Test-Typescript-Update_a_feature_flag_returns_OK_response-1773323344-2\",\"name\":\"Variant Test-Typescript-Update_a_feature_flag_returns_OK_response-1773323344 B\",\"value\":\"false\",\"created_at\":\"2026-03-12T13:49:05.035596Z\",\"updated_at\":\"2026-03-12T13:49:05.035596Z\"}]}},{\"id\":\"2aefffce-cb05-453c-9577-337cd8de16cd\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-12T13:49:04.563057Z\",\"created_at\":\"2026-03-12T13:49:04.167214Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"10f3f194-64b5-4543-9eb1-bf2d7d4626d3\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-78828809a780\",\"override_allocation_key\":\"allocation-override-78828809a780\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"10f3f194-64b5-4543-9eb1-bf2d7d4626d3\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-83df2d008fa8\",\"override_allocation_key\":\"allocation-override-83df2d008fa8\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Typescript-Get_a_feature_flag_returns_OK_response-1773323343\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Typescript-Get_a_feature_flag_returns_OK_response-1773323343\",\"require_approval\":false,\"updated_at\":\"2026-03-12T13:49:04.563057Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"10f3f194-64b5-4543-9eb1-bf2d7d4626d3\",\"key\":\"variant-Test-Typescript-Get_a_feature_flag_returns_OK_response-1773323343-1\",\"name\":\"Variant Test-Typescript-Get_a_feature_flag_returns_OK_response-1773323343 A\",\"value\":\"true\",\"created_at\":\"2026-03-12T13:49:04.173174Z\",\"updated_at\":\"2026-03-12T13:49:04.173174Z\"},{\"id\":\"9929e94b-d0a2-4523-a052-66685dac6541\",\"key\":\"variant-Test-Typescript-Get_a_feature_flag_returns_OK_response-1773323343-2\",\"name\":\"Variant Test-Typescript-Get_a_feature_flag_returns_OK_response-1773323343 B\",\"value\":\"false\",\"created_at\":\"2026-03-12T13:49:04.178659Z\",\"updated_at\":\"2026-03-12T13:49:04.178659Z\"}]}},{\"id\":\"5484a62d-afef-46cf-93a1-232d29c399d8\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-12T13:49:03.377158Z\",\"created_at\":\"2026-03-12T13:49:03.083348Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"fdfe0dd2-5568-4557-9ddf-268ddf0ff375\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-940dcb6aa56e\",\"override_allocation_key\":\"allocation-override-940dcb6aa56e\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"fdfe0dd2-5568-4557-9ddf-268ddf0ff375\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-4f4a2d214725\",\"override_allocation_key\":\"allocation-override-4f4a2d214725\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773323342\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Typescript-Create_a_feature_flag_returns_Created_response-1773323342\",\"require_approval\":false,\"updated_at\":\"2026-03-12T13:49:03.377158Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"fdfe0dd2-5568-4557-9ddf-268ddf0ff375\",\"key\":\"variant-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773323342-1\",\"name\":\"Variant Test-Typescript-Create_a_feature_flag_returns_Created_response-1773323342 A\",\"value\":\"true\",\"created_at\":\"2026-03-12T13:49:03.089739Z\",\"updated_at\":\"2026-03-12T13:49:03.089739Z\"},{\"id\":\"eec95a5d-c74c-4064-9c5f-bbe1178e63fd\",\"key\":\"variant-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773323342-2\",\"name\":\"Variant Test-Typescript-Create_a_feature_flag_returns_Created_response-1773323342 B\",\"value\":\"false\",\"created_at\":\"2026-03-12T13:49:03.095502Z\",\"updated_at\":\"2026-03-12T13:49:03.095502Z\"}]}},{\"id\":\"28f766de-b389-4f27-8288-7d9ef1119039\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-12T13:49:02.75851Z\",\"created_at\":\"2026-03-12T13:49:01.969907Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"5f312336-9d12-4944-93ce-e2464ecdfcf5\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-ef26dc74afc1\",\"override_allocation_key\":\"allocation-override-ef26dc74afc1\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"5f312336-9d12-4944-93ce-e2464ecdfcf5\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-bcccf2a8d98b\",\"override_allocation_key\":\"allocation-override-bcccf2a8d98b\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773323341\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773323341\",\"require_approval\":false,\"updated_at\":\"2026-03-12T13:49:02.75851Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"5f312336-9d12-4944-93ce-e2464ecdfcf5\",\"key\":\"variant-Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773323341-1\",\"name\":\"Variant Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773323341 A\",\"value\":\"true\",\"created_at\":\"2026-03-12T13:49:01.976745Z\",\"updated_at\":\"2026-03-12T13:49:01.976745Z\"},{\"id\":\"11a385a4-3651-4097-a745-35b2b81fdd8b\",\"key\":\"variant-Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773323341-2\",\"name\":\"Variant Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773323341 B\",\"value\":\"false\",\"created_at\":\"2026-03-12T13:49:01.98373Z\",\"updated_at\":\"2026-03-12T13:49:01.98373Z\"}]}},{\"id\":\"b0c0b541-7549-40ef-89bc-040fbf823e05\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-12T13:48:15.234733Z\",\"created_at\":\"2026-03-12T13:48:14.775626Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Updated description for the feature flag\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"3b965c85-3a97-40bf-9a2e-f06c8c9a11dc\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-3bb2c180b14a\",\"override_allocation_key\":\"allocation-override-3bb2c180b14a\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"3b965c85-3a97-40bf-9a2e-f06c8c9a11dc\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-5eae473d48e8\",\"override_allocation_key\":\"allocation-override-5eae473d48e8\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Update_a_feature_flag_returns_OK_response-1773323294\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Updated Test Feature Flag Test-Update_a_feature_flag_returns_OK_response-1773323294\",\"require_approval\":false,\"updated_at\":\"2026-03-12T13:48:15.234733Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"3b965c85-3a97-40bf-9a2e-f06c8c9a11dc\",\"key\":\"variant-Test-Update_a_feature_flag_returns_OK_response-1773323294-1\",\"name\":\"Variant Test-Update_a_feature_flag_returns_OK_response-1773323294 A\",\"value\":\"true\",\"created_at\":\"2026-03-12T13:48:14.7803Z\",\"updated_at\":\"2026-03-12T13:48:14.7803Z\"},{\"id\":\"13387543-5f87-4ac2-bdf5-408b5b58a208\",\"key\":\"variant-Test-Update_a_feature_flag_returns_OK_response-1773323294-2\",\"name\":\"Variant Test-Update_a_feature_flag_returns_OK_response-1773323294 B\",\"value\":\"false\",\"created_at\":\"2026-03-12T13:48:14.785248Z\",\"updated_at\":\"2026-03-12T13:48:14.785248Z\"}]}},{\"id\":\"59bd115c-500a-4dbd-a770-d9d5829e5d6a\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-12T13:48:14.3091Z\",\"created_at\":\"2026-03-12T13:48:13.926176Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"45a3942c-d14e-4761-8a4f-f5bb02e63b68\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-ac5e7a87ec55\",\"override_allocation_key\":\"allocation-override-ac5e7a87ec55\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"45a3942c-d14e-4761-8a4f-f5bb02e63b68\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-3e00655483cd\",\"override_allocation_key\":\"allocation-override-3e00655483cd\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Get_a_feature_flag_returns_OK_response-1773323293\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Get_a_feature_flag_returns_OK_response-1773323293\",\"require_approval\":false,\"updated_at\":\"2026-03-12T13:48:14.3091Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"45a3942c-d14e-4761-8a4f-f5bb02e63b68\",\"key\":\"variant-Test-Get_a_feature_flag_returns_OK_response-1773323293-1\",\"name\":\"Variant Test-Get_a_feature_flag_returns_OK_response-1773323293 A\",\"value\":\"true\",\"created_at\":\"2026-03-12T13:48:13.930949Z\",\"updated_at\":\"2026-03-12T13:48:13.930949Z\"},{\"id\":\"43e96383-b555-47d1-bc48-a6719703b23a\",\"key\":\"variant-Test-Get_a_feature_flag_returns_OK_response-1773323293-2\",\"name\":\"Variant Test-Get_a_feature_flag_returns_OK_response-1773323293 B\",\"value\":\"false\",\"created_at\":\"2026-03-12T13:48:13.935301Z\",\"updated_at\":\"2026-03-12T13:48:13.935301Z\"}]}},{\"id\":\"55694d1f-0ecf-457b-8765-1075c5182ec4\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-12T13:48:13.084527Z\",\"created_at\":\"2026-03-12T13:48:12.787529Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"cddba14c-e97e-4b2e-9eaa-52c23dbcc691\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-98b1ea18f09d\",\"override_allocation_key\":\"allocation-override-98b1ea18f09d\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"cddba14c-e97e-4b2e-9eaa-52c23dbcc691\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-5843fabb9120\",\"override_allocation_key\":\"allocation-override-5843fabb9120\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Create_a_feature_flag_returns_Created_response-1773323292\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Create_a_feature_flag_returns_Created_response-1773323292\",\"require_approval\":false,\"updated_at\":\"2026-03-12T13:48:13.084527Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"cddba14c-e97e-4b2e-9eaa-52c23dbcc691\",\"key\":\"variant-Test-Create_a_feature_flag_returns_Created_response-1773323292-1\",\"name\":\"Variant Test-Create_a_feature_flag_returns_Created_response-1773323292 A\",\"value\":\"true\",\"created_at\":\"2026-03-12T13:48:12.791897Z\",\"updated_at\":\"2026-03-12T13:48:12.791897Z\"},{\"id\":\"423fefd9-874c-410f-8617-cf91be28226d\",\"key\":\"variant-Test-Create_a_feature_flag_returns_Created_response-1773323292-2\",\"name\":\"Variant Test-Create_a_feature_flag_returns_Created_response-1773323292 B\",\"value\":\"false\",\"created_at\":\"2026-03-12T13:48:12.796927Z\",\"updated_at\":\"2026-03-12T13:48:12.796927Z\"}]}},{\"id\":\"64b9acee-69a6-429f-bf3b-e8591def9a28\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-12T13:48:12.520657Z\",\"created_at\":\"2026-03-12T13:48:11.603943Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"4d3177b9-15f9-427c-907e-6c8b2f0b8ad2\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-596d031ae077\",\"override_allocation_key\":\"allocation-override-596d031ae077\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"4d3177b9-15f9-427c-907e-6c8b2f0b8ad2\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-164ee56390fc\",\"override_allocation_key\":\"allocation-override-164ee56390fc\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Archive_a_feature_flag_returns_OK_response-1773323291\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Archive_a_feature_flag_returns_OK_response-1773323291\",\"require_approval\":false,\"updated_at\":\"2026-03-12T13:48:12.520657Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"4d3177b9-15f9-427c-907e-6c8b2f0b8ad2\",\"key\":\"variant-Test-Archive_a_feature_flag_returns_OK_response-1773323291-1\",\"name\":\"Variant Test-Archive_a_feature_flag_returns_OK_response-1773323291 A\",\"value\":\"true\",\"created_at\":\"2026-03-12T13:48:11.611055Z\",\"updated_at\":\"2026-03-12T13:48:11.611055Z\"},{\"id\":\"40ebd34c-ce19-45cb-99e0-ef84af768b77\",\"key\":\"variant-Test-Archive_a_feature_flag_returns_OK_response-1773323291-2\",\"name\":\"Variant Test-Archive_a_feature_flag_returns_OK_response-1773323291 B\",\"value\":\"false\",\"created_at\":\"2026-03-12T13:48:11.616674Z\",\"updated_at\":\"2026-03-12T13:48:11.616674Z\"}]}},{\"id\":\"c0ca7995-4ba7-4263-8526-4e27dc050e19\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-12T13:37:26.996021Z\",\"created_at\":\"2026-03-12T13:37:26.513284Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Updated description for the feature flag\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"502ba420-4a65-4fbb-ac9f-37b1330de706\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-ae5bf74294fb\",\"override_allocation_key\":\"allocation-override-ae5bf74294fb\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"502ba420-4a65-4fbb-ac9f-37b1330de706\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-db47f795ca48\",\"override_allocation_key\":\"allocation-override-db47f795ca48\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322646\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Updated Test Feature Flag Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322646\",\"require_approval\":false,\"updated_at\":\"2026-03-12T13:37:26.996021Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"502ba420-4a65-4fbb-ac9f-37b1330de706\",\"key\":\"variant-Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322646-1\",\"name\":\"Variant Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322646 A\",\"value\":\"true\",\"created_at\":\"2026-03-12T13:37:26.519774Z\",\"updated_at\":\"2026-03-12T13:37:26.519774Z\"},{\"id\":\"31e7b908-2a21-4f0d-8294-20daf3017499\",\"key\":\"variant-Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322646-2\",\"name\":\"Variant Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322646 B\",\"value\":\"false\",\"created_at\":\"2026-03-12T13:37:26.5259Z\",\"updated_at\":\"2026-03-12T13:37:26.5259Z\"}]}},{\"id\":\"66ff7dd8-ae9f-4054-811f-31cbc1764ce3\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-12T13:37:26.234873Z\",\"created_at\":\"2026-03-12T13:37:25.860537Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"f12ee573-3d7c-45df-b44c-04bd1a017230\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-6cefeac941a7\",\"override_allocation_key\":\"allocation-override-6cefeac941a7\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"f12ee573-3d7c-45df-b44c-04bd1a017230\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-436103151bc8\",\"override_allocation_key\":\"allocation-override-436103151bc8\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322645\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322645\",\"require_approval\":false,\"updated_at\":\"2026-03-12T13:37:26.234873Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"f12ee573-3d7c-45df-b44c-04bd1a017230\",\"key\":\"variant-Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322645-1\",\"name\":\"Variant Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322645 A\",\"value\":\"true\",\"created_at\":\"2026-03-12T13:37:25.86685Z\",\"updated_at\":\"2026-03-12T13:37:25.86685Z\"},{\"id\":\"552b341c-716f-4c2e-af25-3ee52da7b915\",\"key\":\"variant-Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322645-2\",\"name\":\"Variant Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322645 B\",\"value\":\"false\",\"created_at\":\"2026-03-12T13:37:25.872916Z\",\"updated_at\":\"2026-03-12T13:37:25.872916Z\"}]}},{\"id\":\"934e15fa-1c36-405f-90e7-566d01bfabf9\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-12T13:37:25.520279Z\",\"created_at\":\"2026-03-12T13:37:25.133654Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"61cdc701-e9e1-4b70-aeb6-31dcda9aee59\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-f395401aa479\",\"override_allocation_key\":\"allocation-override-f395401aa479\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"61cdc701-e9e1-4b70-aeb6-31dcda9aee59\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-bfe69c37a0df\",\"override_allocation_key\":\"allocation-override-bfe69c37a0df\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322644\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322644\",\"require_approval\":false,\"updated_at\":\"2026-03-12T13:37:25.520279Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"61cdc701-e9e1-4b70-aeb6-31dcda9aee59\",\"key\":\"variant-Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322644-1\",\"name\":\"Variant Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322644 A\",\"value\":\"true\",\"created_at\":\"2026-03-12T13:37:25.141637Z\",\"updated_at\":\"2026-03-12T13:37:25.141637Z\"},{\"id\":\"a96b8e1a-6dce-4a8a-9e99-b4971c1144d8\",\"key\":\"variant-Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322644-2\",\"name\":\"Variant Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322644 B\",\"value\":\"false\",\"created_at\":\"2026-03-12T13:37:25.147213Z\",\"updated_at\":\"2026-03-12T13:37:25.147213Z\"}]}},{\"id\":\"649cf64b-3319-4068-a811-e34dcca65a9e\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-12T13:37:24.262463Z\",\"created_at\":\"2026-03-12T13:37:23.95992Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"3b088710-98d0-4229-a0c2-2b2fc33cb432\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-b2ad57f61640\",\"override_allocation_key\":\"allocation-override-b2ad57f61640\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"3b088710-98d0-4229-a0c2-2b2fc33cb432\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-5fc1041f29f2\",\"override_allocation_key\":\"allocation-override-5fc1041f29f2\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322643\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322643\",\"require_approval\":false,\"updated_at\":\"2026-03-12T13:37:24.262463Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"3b088710-98d0-4229-a0c2-2b2fc33cb432\",\"key\":\"variant-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322643-1\",\"name\":\"Variant Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322643 A\",\"value\":\"true\",\"created_at\":\"2026-03-12T13:37:23.964217Z\",\"updated_at\":\"2026-03-12T13:37:23.964217Z\"},{\"id\":\"f7401bd2-09ec-4a84-94f8-e5d5e6324464\",\"key\":\"variant-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322643-2\",\"name\":\"Variant Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322643 B\",\"value\":\"false\",\"created_at\":\"2026-03-12T13:37:23.968881Z\",\"updated_at\":\"2026-03-12T13:37:23.968881Z\"}]}},{\"id\":\"31fc8390-46c7-45ba-a73e-022fa3ec1978\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-12T13:37:23.66621Z\",\"created_at\":\"2026-03-12T13:37:23.013799Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"20dc24ee-b02a-4983-872e-f4472613987b\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-6ebf32d824fb\",\"override_allocation_key\":\"allocation-override-6ebf32d824fb\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"20dc24ee-b02a-4983-872e-f4472613987b\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-a2eeb96ed627\",\"override_allocation_key\":\"allocation-override-a2eeb96ed627\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322642\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322642\",\"require_approval\":false,\"updated_at\":\"2026-03-12T13:37:23.66621Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"20dc24ee-b02a-4983-872e-f4472613987b\",\"key\":\"variant-Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322642-1\",\"name\":\"Variant Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322642 A\",\"value\":\"true\",\"created_at\":\"2026-03-12T13:37:23.018388Z\",\"updated_at\":\"2026-03-12T13:37:23.018388Z\"},{\"id\":\"34f79e9c-8323-4f5d-b180-57c1639546d1\",\"key\":\"variant-Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322642-2\",\"name\":\"Variant Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322642 B\",\"value\":\"false\",\"created_at\":\"2026-03-12T13:37:23.022712Z\",\"updated_at\":\"2026-03-12T13:37:23.022712Z\"}]}},{\"id\":\"cf10259e-0961-4e83-aa5a-23399693ed2d\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-12T13:37:04.551098Z\",\"created_at\":\"2026-03-12T13:37:04.254615Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"e6521d4d-53c6-4a83-a772-2e48a9660641\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-adb6e39257cb\",\"override_allocation_key\":\"allocation-override-adb6e39257cb\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"e6521d4d-53c6-4a83-a772-2e48a9660641\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-5b1113f8c525\",\"override_allocation_key\":\"allocation-override-5b1113f8c525\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322624\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322624\",\"require_approval\":false,\"updated_at\":\"2026-03-12T13:37:04.551098Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"e6521d4d-53c6-4a83-a772-2e48a9660641\",\"key\":\"variant-Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322624-1\",\"name\":\"Variant Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322624 A\",\"value\":\"true\",\"created_at\":\"2026-03-12T13:37:04.259439Z\",\"updated_at\":\"2026-03-12T13:37:04.259439Z\"},{\"id\":\"d9181ab0-b509-4c59-b65d-8ca14ab5004e\",\"key\":\"variant-Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322624-2\",\"name\":\"Variant Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322624 B\",\"value\":\"false\",\"created_at\":\"2026-03-12T13:37:04.264649Z\",\"updated_at\":\"2026-03-12T13:37:04.264649Z\"}]}},{\"id\":\"76efa54a-39b5-4d42-b779-c9cfe7ee6ab7\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-12T13:36:04.882778Z\",\"created_at\":\"2026-03-12T13:36:04.294528Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Updated description for the feature flag\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"172650da-6586-4ae2-bfeb-abd71c62b3b2\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-2865f9a10bdc\",\"override_allocation_key\":\"allocation-override-2865f9a10bdc\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"172650da-6586-4ae2-bfeb-abd71c62b3b2\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-cc6052398290\",\"override_allocation_key\":\"allocation-override-cc6052398290\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322564\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Updated Test Feature Flag Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322564\",\"require_approval\":false,\"updated_at\":\"2026-03-12T13:36:04.882778Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"172650da-6586-4ae2-bfeb-abd71c62b3b2\",\"key\":\"variant-Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322564-1\",\"name\":\"Variant Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322564 A\",\"value\":\"true\",\"created_at\":\"2026-03-12T13:36:04.300781Z\",\"updated_at\":\"2026-03-12T13:36:04.300781Z\"},{\"id\":\"9b3ba26b-15f9-40b9-8889-f6bcdcce8426\",\"key\":\"variant-Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322564-2\",\"name\":\"Variant Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322564 B\",\"value\":\"false\",\"created_at\":\"2026-03-12T13:36:04.3077Z\",\"updated_at\":\"2026-03-12T13:36:04.3077Z\"}]}},{\"id\":\"939bf7aa-df2c-487b-8660-d8928ab124dc\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-12T13:36:04.005165Z\",\"created_at\":\"2026-03-12T13:36:03.616473Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"df2f03c7-39c9-4df8-8911-d2b824a4f0ad\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-9a30508e6edd\",\"override_allocation_key\":\"allocation-override-9a30508e6edd\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"df2f03c7-39c9-4df8-8911-d2b824a4f0ad\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-3a23cb825eff\",\"override_allocation_key\":\"allocation-override-3a23cb825eff\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322563\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322563\",\"require_approval\":false,\"updated_at\":\"2026-03-12T13:36:04.005165Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"df2f03c7-39c9-4df8-8911-d2b824a4f0ad\",\"key\":\"variant-Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322563-1\",\"name\":\"Variant Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322563 A\",\"value\":\"true\",\"created_at\":\"2026-03-12T13:36:03.620876Z\",\"updated_at\":\"2026-03-12T13:36:03.620876Z\"},{\"id\":\"b58af744-c67e-4cf2-8cf3-de1e8131a1a2\",\"key\":\"variant-Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322563-2\",\"name\":\"Variant Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322563 B\",\"value\":\"false\",\"created_at\":\"2026-03-12T13:36:03.625764Z\",\"updated_at\":\"2026-03-12T13:36:03.625764Z\"}]}},{\"id\":\"30179b76-f599-497a-95c1-626e071f728c\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-12T13:36:03.158483Z\",\"created_at\":\"2026-03-12T13:36:02.828264Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"af8b295b-d73e-4cf4-8017-eac71968d68b\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-d690389682fb\",\"override_allocation_key\":\"allocation-override-d690389682fb\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"af8b295b-d73e-4cf4-8017-eac71968d68b\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-06307bf47e2d\",\"override_allocation_key\":\"allocation-override-06307bf47e2d\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322562\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322562\",\"require_approval\":false,\"updated_at\":\"2026-03-12T13:36:03.158483Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"af8b295b-d73e-4cf4-8017-eac71968d68b\",\"key\":\"variant-Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322562-1\",\"name\":\"Variant Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322562 A\",\"value\":\"true\",\"created_at\":\"2026-03-12T13:36:02.832979Z\",\"updated_at\":\"2026-03-12T13:36:02.832979Z\"},{\"id\":\"77961d40-5e99-43cc-81a9-0837e427e171\",\"key\":\"variant-Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322562-2\",\"name\":\"Variant Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322562 B\",\"value\":\"false\",\"created_at\":\"2026-03-12T13:36:02.838213Z\",\"updated_at\":\"2026-03-12T13:36:02.838213Z\"}]}},{\"id\":\"520bad99-27db-47c6-bb75-f30c5a5fcaa3\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-12T13:36:02.121769Z\",\"created_at\":\"2026-03-12T13:36:01.822833Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"0cde96d3-fead-473d-b545-2732d594eb63\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-86717f6b9203\",\"override_allocation_key\":\"allocation-override-86717f6b9203\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"0cde96d3-fead-473d-b545-2732d594eb63\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-dfa229becc6e\",\"override_allocation_key\":\"allocation-override-dfa229becc6e\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322561\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322561\",\"require_approval\":false,\"updated_at\":\"2026-03-12T13:36:02.121769Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"0cde96d3-fead-473d-b545-2732d594eb63\",\"key\":\"variant-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322561-1\",\"name\":\"Variant Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322561 A\",\"value\":\"true\",\"created_at\":\"2026-03-12T13:36:01.82783Z\",\"updated_at\":\"2026-03-12T13:36:01.82783Z\"},{\"id\":\"09e25a9f-9147-48ce-be76-166e67e29cdc\",\"key\":\"variant-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322561-2\",\"name\":\"Variant Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322561 B\",\"value\":\"false\",\"created_at\":\"2026-03-12T13:36:01.833351Z\",\"updated_at\":\"2026-03-12T13:36:01.833351Z\"}]}},{\"id\":\"e3e4bbc9-742e-4a9e-b515-786ead78d659\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-12T13:36:01.495545Z\",\"created_at\":\"2026-03-12T13:36:00.688626Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"d3e9926b-399e-465f-8c81-815abe9707a0\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-8775f72a7f1c\",\"override_allocation_key\":\"allocation-override-8775f72a7f1c\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"d3e9926b-399e-465f-8c81-815abe9707a0\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-5b4a926b851e\",\"override_allocation_key\":\"allocation-override-5b4a926b851e\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322560\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322560\",\"require_approval\":false,\"updated_at\":\"2026-03-12T13:36:01.495545Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"d3e9926b-399e-465f-8c81-815abe9707a0\",\"key\":\"variant-Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322560-1\",\"name\":\"Variant Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322560 A\",\"value\":\"true\",\"created_at\":\"2026-03-12T13:36:00.696201Z\",\"updated_at\":\"2026-03-12T13:36:00.696201Z\"},{\"id\":\"6e54e3b1-c3e0-4405-a427-e53a7c946e91\",\"key\":\"variant-Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322560-2\",\"name\":\"Variant Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322560 B\",\"value\":\"false\",\"created_at\":\"2026-03-12T13:36:00.7022Z\",\"updated_at\":\"2026-03-12T13:36:00.7022Z\"}]}},{\"id\":\"f17a953b-ab1f-4c8a-bfb3-e193c9cf6b5f\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-12T13:35:22.504749Z\",\"created_at\":\"2026-03-12T13:35:21.585632Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"bd52986d-33c7-43ec-8ccf-8c0e4147015b\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-37c4b5e5e41e\",\"override_allocation_key\":\"allocation-override-37c4b5e5e41e\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"bd52986d-33c7-43ec-8ccf-8c0e4147015b\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-152180b1f742\",\"override_allocation_key\":\"allocation-override-152180b1f742\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322521\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322521\",\"require_approval\":false,\"updated_at\":\"2026-03-12T13:35:22.504749Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"bd52986d-33c7-43ec-8ccf-8c0e4147015b\",\"key\":\"variant-Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322521-1\",\"name\":\"Variant Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322521 A\",\"value\":\"true\",\"created_at\":\"2026-03-12T13:35:21.590133Z\",\"updated_at\":\"2026-03-12T13:35:21.590133Z\"},{\"id\":\"3ceb9689-56a0-44c1-abdf-3746f7958b57\",\"key\":\"variant-Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322521-2\",\"name\":\"Variant Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322521 B\",\"value\":\"false\",\"created_at\":\"2026-03-12T13:35:21.595396Z\",\"updated_at\":\"2026-03-12T13:35:21.595396Z\"}]}},{\"id\":\"eaac3ab2-8d2d-4399-8717-bea75c5aa0c8\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-12T13:34:28.507848Z\",\"created_at\":\"2026-03-12T13:34:28.216131Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"1a6e287b-207e-494b-b483-82ac7beb6020\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-8263824cf1ab\",\"override_allocation_key\":\"allocation-override-8263824cf1ab\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"1a6e287b-207e-494b-b483-82ac7beb6020\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-537626bbec02\",\"override_allocation_key\":\"allocation-override-537626bbec02\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322468\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322468\",\"require_approval\":false,\"updated_at\":\"2026-03-12T13:34:28.507848Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"1a6e287b-207e-494b-b483-82ac7beb6020\",\"key\":\"variant-Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322468-1\",\"name\":\"Variant Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322468 A\",\"value\":\"true\",\"created_at\":\"2026-03-12T13:34:28.221737Z\",\"updated_at\":\"2026-03-12T13:34:28.221737Z\"},{\"id\":\"6f4b9ea2-419e-4977-8a3e-1221f94ec73c\",\"key\":\"variant-Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322468-2\",\"name\":\"Variant Test-Typescript-Update_a_feature_flag_returns_OK_response-1773322468 B\",\"value\":\"false\",\"created_at\":\"2026-03-12T13:34:28.22761Z\",\"updated_at\":\"2026-03-12T13:34:28.22761Z\"}]}},{\"id\":\"01994288-6ced-437b-a949-bb4f743ea987\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-12T13:34:27.88931Z\",\"created_at\":\"2026-03-12T13:34:27.608307Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"8287eb2c-ac59-4ea0-86e8-324e22810cd2\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-30b47ee21882\",\"override_allocation_key\":\"allocation-override-30b47ee21882\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"8287eb2c-ac59-4ea0-86e8-324e22810cd2\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-6f5b7879de7b\",\"override_allocation_key\":\"allocation-override-6f5b7879de7b\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322467\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322467\",\"require_approval\":false,\"updated_at\":\"2026-03-12T13:34:27.88931Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"8287eb2c-ac59-4ea0-86e8-324e22810cd2\",\"key\":\"variant-Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322467-1\",\"name\":\"Variant Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322467 A\",\"value\":\"true\",\"created_at\":\"2026-03-12T13:34:27.612949Z\",\"updated_at\":\"2026-03-12T13:34:27.612949Z\"},{\"id\":\"4b6b9a64-c8b0-4f98-bffe-9dc846d9cadd\",\"key\":\"variant-Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322467-2\",\"name\":\"Variant Test-Typescript-Unarchive_a_feature_flag_returns_OK_response-1773322467 B\",\"value\":\"false\",\"created_at\":\"2026-03-12T13:34:27.61778Z\",\"updated_at\":\"2026-03-12T13:34:27.61778Z\"}]}},{\"id\":\"5ccb0634-cab1-4369-aee0-4d246eea0b00\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-12T13:34:26.991783Z\",\"created_at\":\"2026-03-12T13:34:26.708177Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"b3fec388-4cb6-4f2b-a1e0-61d6b0564416\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-f572d815dc0c\",\"override_allocation_key\":\"allocation-override-f572d815dc0c\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"b3fec388-4cb6-4f2b-a1e0-61d6b0564416\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-d5fb95b9f3f3\",\"override_allocation_key\":\"allocation-override-d5fb95b9f3f3\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322466\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322466\",\"require_approval\":false,\"updated_at\":\"2026-03-12T13:34:26.991783Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"b3fec388-4cb6-4f2b-a1e0-61d6b0564416\",\"key\":\"variant-Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322466-1\",\"name\":\"Variant Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322466 A\",\"value\":\"true\",\"created_at\":\"2026-03-12T13:34:26.712521Z\",\"updated_at\":\"2026-03-12T13:34:26.712521Z\"},{\"id\":\"9fdacc99-a7a9-4176-b9f7-f33b52d73487\",\"key\":\"variant-Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322466-2\",\"name\":\"Variant Test-Typescript-Get_a_feature_flag_returns_OK_response-1773322466 B\",\"value\":\"false\",\"created_at\":\"2026-03-12T13:34:26.718409Z\",\"updated_at\":\"2026-03-12T13:34:26.718409Z\"}]}},{\"id\":\"2e3b8c6f-2174-4f69-9be7-0aae9c0064c5\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-12T13:34:25.871324Z\",\"created_at\":\"2026-03-12T13:34:25.555886Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"9a137623-f60b-4570-b7a2-363bc2e49740\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-699356128b8a\",\"override_allocation_key\":\"allocation-override-699356128b8a\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"9a137623-f60b-4570-b7a2-363bc2e49740\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-b51659ae5261\",\"override_allocation_key\":\"allocation-override-b51659ae5261\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322465\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322465\",\"require_approval\":false,\"updated_at\":\"2026-03-12T13:34:25.871324Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"9a137623-f60b-4570-b7a2-363bc2e49740\",\"key\":\"variant-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322465-1\",\"name\":\"Variant Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322465 A\",\"value\":\"true\",\"created_at\":\"2026-03-12T13:34:25.561069Z\",\"updated_at\":\"2026-03-12T13:34:25.561069Z\"},{\"id\":\"02485a39-3f89-46d3-a606-7e3809d88f3d\",\"key\":\"variant-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322465-2\",\"name\":\"Variant Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322465 B\",\"value\":\"false\",\"created_at\":\"2026-03-12T13:34:25.566671Z\",\"updated_at\":\"2026-03-12T13:34:25.566671Z\"}]}},{\"id\":\"9565a371-5d11-45ed-920f-e33680804da2\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-12T13:34:25.246768Z\",\"created_at\":\"2026-03-12T13:34:24.968319Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"f54c2bfa-aad4-4c3c-81f8-6b143076ec65\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-9cad342badc6\",\"override_allocation_key\":\"allocation-override-9cad342badc6\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"f54c2bfa-aad4-4c3c-81f8-6b143076ec65\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-e5d795e7c26b\",\"override_allocation_key\":\"allocation-override-e5d795e7c26b\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322464\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322464\",\"require_approval\":false,\"updated_at\":\"2026-03-12T13:34:25.246768Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"f54c2bfa-aad4-4c3c-81f8-6b143076ec65\",\"key\":\"variant-Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322464-1\",\"name\":\"Variant Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322464 A\",\"value\":\"true\",\"created_at\":\"2026-03-12T13:34:24.974913Z\",\"updated_at\":\"2026-03-12T13:34:24.974913Z\"},{\"id\":\"4e94d070-9c62-493b-99e7-76411709eee7\",\"key\":\"variant-Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322464-2\",\"name\":\"Variant Test-Typescript-Archive_a_feature_flag_returns_OK_response-1773322464 B\",\"value\":\"false\",\"created_at\":\"2026-03-12T13:34:24.981579Z\",\"updated_at\":\"2026-03-12T13:34:24.981579Z\"}]}},{\"id\":\"a7648841-2496-4459-9f8e-022cd0c97513\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-12T13:32:23.480861Z\",\"created_at\":\"2026-03-12T13:32:22.618952Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"0c4209be-e7d9-4f78-85ed-08711a76579b\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-28a7a71b6da9\",\"override_allocation_key\":\"allocation-override-28a7a71b6da9\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"0c4209be-e7d9-4f78-85ed-08711a76579b\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-940e7867ddcf\",\"override_allocation_key\":\"allocation-override-940e7867ddcf\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322342\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322342\",\"require_approval\":false,\"updated_at\":\"2026-03-12T13:32:23.480861Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"0c4209be-e7d9-4f78-85ed-08711a76579b\",\"key\":\"variant-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322342-1\",\"name\":\"Variant Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322342 A\",\"value\":\"true\",\"created_at\":\"2026-03-12T13:32:22.626024Z\",\"updated_at\":\"2026-03-12T13:32:22.626024Z\"},{\"id\":\"602d40bc-a95e-40ac-af42-9bf2eb9fb316\",\"key\":\"variant-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322342-2\",\"name\":\"Variant Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322342 B\",\"value\":\"false\",\"created_at\":\"2026-03-12T13:32:22.632151Z\",\"updated_at\":\"2026-03-12T13:32:22.632151Z\"}]}},{\"id\":\"2ec35434-b877-4e53-8ae1-979c29256fe1\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":null,\"created_at\":\"2026-03-12T13:29:26.717726Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"8af6a5ba-2f99-41e7-bac4-deef9931bff0\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-15ab366aa784\",\"override_allocation_key\":\"allocation-override-15ab366aa784\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"8af6a5ba-2f99-41e7-bac4-deef9931bff0\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-26afbfd56519\",\"override_allocation_key\":\"allocation-override-26afbfd56519\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322166\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Typescript-Create_a_feature_flag_returns_Created_response-1773322166\",\"require_approval\":false,\"updated_at\":\"2026-03-12T13:29:26.717726Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"8af6a5ba-2f99-41e7-bac4-deef9931bff0\",\"key\":\"control\",\"name\":\"Control Variant\",\"value\":\"true\",\"created_at\":\"2026-03-12T13:29:26.724161Z\",\"updated_at\":\"2026-03-12T13:29:26.724161Z\"},{\"id\":\"2a776a3d-3a95-485f-a5c0-2b7a88f37592\",\"key\":\"treatment\",\"name\":\"Treatment Variant\",\"value\":\"false\",\"created_at\":\"2026-03-12T13:29:26.729873Z\",\"updated_at\":\"2026-03-12T13:29:26.729873Z\"}]}},{\"id\":\"be858a9c-b138-41e0-9a69-1d9428af7eae\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":null,\"created_at\":\"2026-03-12T13:15:39.888601Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"72e742af-53eb-42d4-b37d-439f9bec5fc6\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-02014ec620b9\",\"override_allocation_key\":\"allocation-override-02014ec620b9\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"72e742af-53eb-42d4-b37d-439f9bec5fc6\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-107fa83042b3\",\"override_allocation_key\":\"allocation-override-107fa83042b3\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773321339\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Typescript-Create_a_feature_flag_returns_Created_response-1773321339\",\"require_approval\":false,\"updated_at\":\"2026-03-12T13:15:39.888601Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"72e742af-53eb-42d4-b37d-439f9bec5fc6\",\"key\":\"control\",\"name\":\"Control Variant\",\"value\":\"true\",\"created_at\":\"2026-03-12T13:15:39.894436Z\",\"updated_at\":\"2026-03-12T13:15:39.894436Z\"},{\"id\":\"48831504-3d32-4a92-923a-48fd42ad92e6\",\"key\":\"treatment\",\"name\":\"Treatment Variant\",\"value\":\"false\",\"created_at\":\"2026-03-12T13:15:39.899596Z\",\"updated_at\":\"2026-03-12T13:15:39.899596Z\"}]}},{\"id\":\"3277d991-9fe1-4f28-b9cb-18be80b12062\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":null,\"created_at\":\"2026-03-12T13:10:40.38077Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"f0c2b512-3699-44ce-a649-12ea64ed3583\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-da2fbe33b5a0\",\"override_allocation_key\":\"allocation-override-da2fbe33b5a0\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"f0c2b512-3699-44ce-a649-12ea64ed3583\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-fc3b39d59b88\",\"override_allocation_key\":\"allocation-override-fc3b39d59b88\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773321040\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Typescript-Create_a_feature_flag_returns_Created_response-1773321040\",\"require_approval\":false,\"updated_at\":\"2026-03-12T13:10:40.38077Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"f0c2b512-3699-44ce-a649-12ea64ed3583\",\"key\":\"control\",\"name\":\"Control Variant\",\"value\":\"true\",\"created_at\":\"2026-03-12T13:10:40.388021Z\",\"updated_at\":\"2026-03-12T13:10:40.388021Z\"},{\"id\":\"20f36481-56b9-4375-b8ed-8a49f08d32a3\",\"key\":\"treatment\",\"name\":\"Treatment Variant\",\"value\":\"false\",\"created_at\":\"2026-03-12T13:10:40.395371Z\",\"updated_at\":\"2026-03-12T13:10:40.395371Z\"}]}},{\"id\":\"6a5bea8b-df58-4fd0-afd0-9638ece57040\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":null,\"created_at\":\"2026-03-12T13:08:25.297211Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"5b707087-cec0-4881-9697-9b30643fa169\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-82644cffc884\",\"override_allocation_key\":\"allocation-override-82644cffc884\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"5b707087-cec0-4881-9697-9b30643fa169\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-ae59c175742b\",\"override_allocation_key\":\"allocation-override-ae59c175742b\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773320905\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Typescript-Create_a_feature_flag_returns_Created_response-1773320905\",\"require_approval\":false,\"updated_at\":\"2026-03-12T13:08:25.297211Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"5b707087-cec0-4881-9697-9b30643fa169\",\"key\":\"control\",\"name\":\"Control Variant\",\"value\":\"true\",\"created_at\":\"2026-03-12T13:08:25.304617Z\",\"updated_at\":\"2026-03-12T13:08:25.304617Z\"},{\"id\":\"458b8b3e-4d00-436e-81b8-b2a38bd81393\",\"key\":\"treatment\",\"name\":\"Treatment Variant\",\"value\":\"false\",\"created_at\":\"2026-03-12T13:08:25.311822Z\",\"updated_at\":\"2026-03-12T13:08:25.311822Z\"}]}},{\"id\":\"7d07186d-23c7-404e-9ec6-893938d28700\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":null,\"created_at\":\"2026-03-12T13:06:17.973951Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"ded05994-1aab-4654-9974-96dda26dded8\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-27665a2a516f\",\"override_allocation_key\":\"allocation-override-27665a2a516f\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"ded05994-1aab-4654-9974-96dda26dded8\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-22f957f03cae\",\"override_allocation_key\":\"allocation-override-22f957f03cae\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Typescript-Create_a_feature_flag_returns_Created_response-1773320777\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Typescript-Create_a_feature_flag_returns_Created_response-1773320777\",\"require_approval\":false,\"updated_at\":\"2026-03-12T13:06:17.973951Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"ded05994-1aab-4654-9974-96dda26dded8\",\"key\":\"control\",\"name\":\"Control Variant\",\"value\":\"true\",\"created_at\":\"2026-03-12T13:06:17.980872Z\",\"updated_at\":\"2026-03-12T13:06:17.980872Z\"},{\"id\":\"ce407a13-d353-4219-afed-56b30baf2c65\",\"key\":\"treatment\",\"name\":\"Treatment Variant\",\"value\":\"false\",\"created_at\":\"2026-03-12T13:06:17.987094Z\",\"updated_at\":\"2026-03-12T13:06:17.987094Z\"}]}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 539, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-03-17T17:26:24.943Z", + "time": 143 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Feature-Flags_3833710718/Update-a-feature-flag-returns-OK-response_4076263415/frozen.json b/cassettes/v2/Feature-Flags_3833710718/Update-a-feature-flag-returns-OK-response_4076263415/frozen.json new file mode 100644 index 000000000000..89e037f14067 --- /dev/null +++ b/cassettes/v2/Feature-Flags_3833710718/Update-a-feature-flag-returns-OK-response_4076263415/frozen.json @@ -0,0 +1 @@ +"2026-03-17T17:26:25.094Z" diff --git a/cassettes/v2/Feature-Flags_3833710718/Update-a-feature-flag-returns-OK-response_4076263415/recording.har b/cassettes/v2/Feature-Flags_3833710718/Update-a-feature-flag-returns-OK-response_4076263415/recording.har new file mode 100644 index 000000000000..1ff2bf86cc86 --- /dev/null +++ b/cassettes/v2/Feature-Flags_3833710718/Update-a-feature-flag-returns-OK-response_4076263415/recording.har @@ -0,0 +1,163 @@ +{ + "log": { + "_recordingName": "Feature Flags/Update a feature flag returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "22a2716735006fcf951e571439a71ce6", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 646, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 565, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"description\":\"Test feature flag for BDD scenarios\",\"key\":\"test-feature-flag-Test-Update_a_feature_flag_returns_OK_response-1773768385\",\"name\":\"Test Feature Flag Test-Update_a_feature_flag_returns_OK_response-1773768385\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"key\":\"variant-Test-Update_a_feature_flag_returns_OK_response-1773768385-1\",\"name\":\"Variant Test-Update_a_feature_flag_returns_OK_response-1773768385 A\",\"value\":\"true\"},{\"key\":\"variant-Test-Update_a_feature_flag_returns_OK_response-1773768385-2\",\"name\":\"Variant Test-Update_a_feature_flag_returns_OK_response-1773768385 B\",\"value\":\"false\"}]},\"type\":\"feature-flags\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/feature-flags" + }, + "response": { + "bodySize": 2326, + "content": { + "mimeType": "application/vnd.api+json", + "size": 2326, + "text": "{\"data\":{\"id\":\"d85c87aa-0135-44bd-82fe-2a1d94ef47b8\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":null,\"created_at\":\"2026-03-17T17:26:25.181649Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Test feature flag for BDD scenarios\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"8060af6a-82b1-41aa-afa1-67c31941759b\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-655048e8bd8f\",\"override_allocation_key\":\"allocation-override-655048e8bd8f\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"8060af6a-82b1-41aa-afa1-67c31941759b\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-bd1885d53d49\",\"override_allocation_key\":\"allocation-override-bd1885d53d49\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Update_a_feature_flag_returns_OK_response-1773768385\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Test Feature Flag Test-Update_a_feature_flag_returns_OK_response-1773768385\",\"require_approval\":false,\"updated_at\":\"2026-03-17T17:26:25.181649Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"8060af6a-82b1-41aa-afa1-67c31941759b\",\"key\":\"variant-Test-Update_a_feature_flag_returns_OK_response-1773768385-1\",\"name\":\"Variant Test-Update_a_feature_flag_returns_OK_response-1773768385 A\",\"value\":\"true\",\"created_at\":\"2026-03-17T17:26:25.186574Z\",\"updated_at\":\"2026-03-17T17:26:25.186574Z\"},{\"id\":\"c64c899c-f77d-4219-9fcd-a61bc0ddd7ef\",\"key\":\"variant-Test-Update_a_feature_flag_returns_OK_response-1773768385-2\",\"name\":\"Variant Test-Update_a_feature_flag_returns_OK_response-1773768385 B\",\"value\":\"false\",\"created_at\":\"2026-03-17T17:26:25.189886Z\",\"updated_at\":\"2026-03-17T17:26:25.189886Z\"}]}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 533, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-03-17T17:26:25.096Z", + "time": 187 + }, + { + "_id": "7d42aa8616de701eedda3d8e330dd724", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 198, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 601, + "httpVersion": "HTTP/1.1", + "method": "PUT", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"description\":\"Updated description for the feature flag\",\"name\":\"Updated Test Feature Flag Test-Update_a_feature_flag_returns_OK_response-1773768385\"},\"type\":\"feature-flags\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/feature-flags/d85c87aa-0135-44bd-82fe-2a1d94ef47b8" + }, + "response": { + "bodySize": 2339, + "content": { + "mimeType": "application/vnd.api+json", + "size": 2339, + "text": "{\"data\":{\"id\":\"d85c87aa-0135-44bd-82fe-2a1d94ef47b8\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":null,\"created_at\":\"2026-03-17T17:26:25.181649Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Updated description for the feature flag\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"8060af6a-82b1-41aa-afa1-67c31941759b\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-655048e8bd8f\",\"override_allocation_key\":\"allocation-override-655048e8bd8f\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"8060af6a-82b1-41aa-afa1-67c31941759b\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-bd1885d53d49\",\"override_allocation_key\":\"allocation-override-bd1885d53d49\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Update_a_feature_flag_returns_OK_response-1773768385\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Updated Test Feature Flag Test-Update_a_feature_flag_returns_OK_response-1773768385\",\"require_approval\":false,\"updated_at\":\"2026-03-17T17:26:25.380092Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"8060af6a-82b1-41aa-afa1-67c31941759b\",\"key\":\"variant-Test-Update_a_feature_flag_returns_OK_response-1773768385-1\",\"name\":\"Variant Test-Update_a_feature_flag_returns_OK_response-1773768385 A\",\"value\":\"true\",\"created_at\":\"2026-03-17T17:26:25.186574Z\",\"updated_at\":\"2026-03-17T17:26:25.186574Z\"},{\"id\":\"c64c899c-f77d-4219-9fcd-a61bc0ddd7ef\",\"key\":\"variant-Test-Update_a_feature_flag_returns_OK_response-1773768385-2\",\"name\":\"Variant Test-Update_a_feature_flag_returns_OK_response-1773768385 B\",\"value\":\"false\",\"created_at\":\"2026-03-17T17:26:25.189886Z\",\"updated_at\":\"2026-03-17T17:26:25.189886Z\"}]}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 533, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-03-17T17:26:25.287Z", + "time": 305 + }, + { + "_id": "9b470dd5319d6f5bc90409a1d66eb919", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 577, + "httpVersion": "HTTP/1.1", + "method": "POST", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/feature-flags/d85c87aa-0135-44bd-82fe-2a1d94ef47b8/archive" + }, + "response": { + "bodySize": 2364, + "content": { + "mimeType": "application/vnd.api+json", + "size": 2364, + "text": "{\"data\":{\"id\":\"d85c87aa-0135-44bd-82fe-2a1d94ef47b8\",\"type\":\"feature-flags\",\"attributes\":{\"archived_at\":\"2026-03-17T17:26:25.680224Z\",\"created_at\":\"2026-03-17T17:26:25.181649Z\",\"created_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Updated description for the feature flag\",\"distribution_channel\":\"ALL\",\"feature_flag_environments\":[{\"environment_id\":\"0b94dbaa-9efb-419d-8bd7-ef56f3828986\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773321543\",\"status\":\"DISABLED\",\"default_variant_id\":\"8060af6a-82b1-41aa-afa1-67c31941759b\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-655048e8bd8f\",\"override_allocation_key\":\"allocation-override-655048e8bd8f\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false},{\"environment_id\":\"afdaa512-6307-4965-bf92-62cc6bea5d00\",\"environment_name\":\"Test Environment Test-Typescript-Create_an_environment_returns_Created_response-1773322166\",\"status\":\"DISABLED\",\"default_variant_id\":\"8060af6a-82b1-41aa-afa1-67c31941759b\",\"override_variant_id\":null,\"default_allocation_key\":\"allocation-default-bd1885d53d49\",\"override_allocation_key\":\"allocation-override-bd1885d53d49\",\"rules\":[],\"rollout_percentage\":0,\"allocations\":null,\"is_production\":false,\"pending_suggestion_id\":null,\"require_feature_flag_approval\":false}],\"key\":\"test-feature-flag-Test-Update_a_feature_flag_returns_OK_response-1773768385\",\"last_updated_by\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"Updated Test Feature Flag Test-Update_a_feature_flag_returns_OK_response-1773768385\",\"require_approval\":false,\"updated_at\":\"2026-03-17T17:26:25.680224Z\",\"value_type\":\"BOOLEAN\",\"variants\":[{\"id\":\"8060af6a-82b1-41aa-afa1-67c31941759b\",\"key\":\"variant-Test-Update_a_feature_flag_returns_OK_response-1773768385-1\",\"name\":\"Variant Test-Update_a_feature_flag_returns_OK_response-1773768385 A\",\"value\":\"true\",\"created_at\":\"2026-03-17T17:26:25.186574Z\",\"updated_at\":\"2026-03-17T17:26:25.186574Z\"},{\"id\":\"c64c899c-f77d-4219-9fcd-a61bc0ddd7ef\",\"key\":\"variant-Test-Update_a_feature_flag_returns_OK_response-1773768385-2\",\"name\":\"Variant Test-Update_a_feature_flag_returns_OK_response-1773768385 B\",\"value\":\"false\",\"created_at\":\"2026-03-17T17:26:25.189886Z\",\"updated_at\":\"2026-03-17T17:26:25.189886Z\"}]}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 533, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-03-17T17:26:25.597Z", + "time": 248 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/examples/v2/feature-flags/ArchiveFeatureFlag.ts b/examples/v2/feature-flags/ArchiveFeatureFlag.ts new file mode 100644 index 000000000000..17b3d4be42a0 --- /dev/null +++ b/examples/v2/feature-flags/ArchiveFeatureFlag.ts @@ -0,0 +1,24 @@ +/** + * Archive a feature flag returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.FeatureFlagsApi(configuration); + +// there is a valid "feature_flag" in the system +const FEATURE_FLAG_DATA_ID = process.env.FEATURE_FLAG_DATA_ID as string; + +const params: v2.FeatureFlagsApiArchiveFeatureFlagRequest = { + featureFlagId: FEATURE_FLAG_DATA_ID, +}; + +apiInstance + .archiveFeatureFlag(params) + .then((data: v2.FeatureFlagResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/feature-flags/CreateFeatureFlag.ts b/examples/v2/feature-flags/CreateFeatureFlag.ts new file mode 100644 index 000000000000..bb1041818a17 --- /dev/null +++ b/examples/v2/feature-flags/CreateFeatureFlag.ts @@ -0,0 +1,44 @@ +/** + * Create a feature flag returns "Created" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.FeatureFlagsApi(configuration); + +const params: v2.FeatureFlagsApiCreateFeatureFlagRequest = { + body: { + data: { + type: "feature-flags", + attributes: { + defaultVariantKey: "variant-Example-Feature-Flag-1", + description: "Test feature flag for BDD scenarios", + key: "test-feature-flag-Example-Feature-Flag", + name: "Test Feature Flag Example-Feature-Flag", + valueType: "BOOLEAN", + variants: [ + { + key: "variant-Example-Feature-Flag-1", + name: "Variant Example-Feature-Flag A", + value: "true", + }, + { + key: "variant-Example-Feature-Flag-2", + name: "Variant Example-Feature-Flag B", + value: "false", + }, + ], + }, + }, + }, +}; + +apiInstance + .createFeatureFlag(params) + .then((data: v2.FeatureFlagResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/feature-flags/CreateFeatureFlagsEnvironment.ts b/examples/v2/feature-flags/CreateFeatureFlagsEnvironment.ts new file mode 100644 index 000000000000..51426072b87a --- /dev/null +++ b/examples/v2/feature-flags/CreateFeatureFlagsEnvironment.ts @@ -0,0 +1,29 @@ +/** + * Create an environment returns "Created" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.FeatureFlagsApi(configuration); + +const params: v2.FeatureFlagsApiCreateFeatureFlagsEnvironmentRequest = { + body: { + data: { + type: "environments", + attributes: { + name: "Test Environment Example-Feature-Flag", + queries: ["test-Example-Feature-Flag", "env-Example-Feature-Flag"], + }, + }, + }, +}; + +apiInstance + .createFeatureFlagsEnvironment(params) + .then((data: v2.EnvironmentResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/feature-flags/DeleteFeatureFlagsEnvironment.ts b/examples/v2/feature-flags/DeleteFeatureFlagsEnvironment.ts new file mode 100644 index 000000000000..ced6721f9a75 --- /dev/null +++ b/examples/v2/feature-flags/DeleteFeatureFlagsEnvironment.ts @@ -0,0 +1,24 @@ +/** + * Delete an environment returns "No Content" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.FeatureFlagsApi(configuration); + +// there is a valid "environment" in the system +const ENVIRONMENT_DATA_ID = process.env.ENVIRONMENT_DATA_ID as string; + +const params: v2.FeatureFlagsApiDeleteFeatureFlagsEnvironmentRequest = { + environmentId: ENVIRONMENT_DATA_ID, +}; + +apiInstance + .deleteFeatureFlagsEnvironment(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/feature-flags/DisableFeatureFlagEnvironment.ts b/examples/v2/feature-flags/DisableFeatureFlagEnvironment.ts new file mode 100644 index 000000000000..c2cba82e6faf --- /dev/null +++ b/examples/v2/feature-flags/DisableFeatureFlagEnvironment.ts @@ -0,0 +1,28 @@ +/** + * Disable a feature flag in an environment returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.FeatureFlagsApi(configuration); + +// there is a valid "feature_flag" in the system +const FEATURE_FLAG_DATA_ID = process.env.FEATURE_FLAG_DATA_ID as string; + +// there is a valid "environment" in the system +const ENVIRONMENT_DATA_ID = process.env.ENVIRONMENT_DATA_ID as string; + +const params: v2.FeatureFlagsApiDisableFeatureFlagEnvironmentRequest = { + featureFlagId: FEATURE_FLAG_DATA_ID, + environmentId: ENVIRONMENT_DATA_ID, +}; + +apiInstance + .disableFeatureFlagEnvironment(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/feature-flags/EnableFeatureFlagEnvironment.ts b/examples/v2/feature-flags/EnableFeatureFlagEnvironment.ts new file mode 100644 index 000000000000..85496b983aa3 --- /dev/null +++ b/examples/v2/feature-flags/EnableFeatureFlagEnvironment.ts @@ -0,0 +1,28 @@ +/** + * Enable a feature flag in an environment returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.FeatureFlagsApi(configuration); + +// there is a valid "feature_flag" in the system +const FEATURE_FLAG_DATA_ID = process.env.FEATURE_FLAG_DATA_ID as string; + +// there is a valid "environment" in the system +const ENVIRONMENT_DATA_ID = process.env.ENVIRONMENT_DATA_ID as string; + +const params: v2.FeatureFlagsApiEnableFeatureFlagEnvironmentRequest = { + featureFlagId: FEATURE_FLAG_DATA_ID, + environmentId: ENVIRONMENT_DATA_ID, +}; + +apiInstance + .enableFeatureFlagEnvironment(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/feature-flags/GetFeatureFlag.ts b/examples/v2/feature-flags/GetFeatureFlag.ts new file mode 100644 index 000000000000..b7b2e2940234 --- /dev/null +++ b/examples/v2/feature-flags/GetFeatureFlag.ts @@ -0,0 +1,24 @@ +/** + * Get a feature flag returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.FeatureFlagsApi(configuration); + +// there is a valid "feature_flag" in the system +const FEATURE_FLAG_DATA_ID = process.env.FEATURE_FLAG_DATA_ID as string; + +const params: v2.FeatureFlagsApiGetFeatureFlagRequest = { + featureFlagId: FEATURE_FLAG_DATA_ID, +}; + +apiInstance + .getFeatureFlag(params) + .then((data: v2.FeatureFlagResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/feature-flags/GetFeatureFlagsEnvironment.ts b/examples/v2/feature-flags/GetFeatureFlagsEnvironment.ts new file mode 100644 index 000000000000..11f96cd10af3 --- /dev/null +++ b/examples/v2/feature-flags/GetFeatureFlagsEnvironment.ts @@ -0,0 +1,24 @@ +/** + * Get an environment returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.FeatureFlagsApi(configuration); + +// there is a valid "environment" in the system +const ENVIRONMENT_DATA_ID = process.env.ENVIRONMENT_DATA_ID as string; + +const params: v2.FeatureFlagsApiGetFeatureFlagsEnvironmentRequest = { + environmentId: ENVIRONMENT_DATA_ID, +}; + +apiInstance + .getFeatureFlagsEnvironment(params) + .then((data: v2.EnvironmentResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/feature-flags/ListFeatureFlags.ts b/examples/v2/feature-flags/ListFeatureFlags.ts new file mode 100644 index 000000000000..84c6ea34bd71 --- /dev/null +++ b/examples/v2/feature-flags/ListFeatureFlags.ts @@ -0,0 +1,17 @@ +/** + * List feature flags returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.FeatureFlagsApi(configuration); + +apiInstance + .listFeatureFlags() + .then((data: v2.ListFeatureFlagsResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/feature-flags/ListFeatureFlagsEnvironments.ts b/examples/v2/feature-flags/ListFeatureFlagsEnvironments.ts new file mode 100644 index 000000000000..07afcec53225 --- /dev/null +++ b/examples/v2/feature-flags/ListFeatureFlagsEnvironments.ts @@ -0,0 +1,17 @@ +/** + * List environments returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.FeatureFlagsApi(configuration); + +apiInstance + .listFeatureFlagsEnvironments() + .then((data: v2.ListEnvironmentsResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/feature-flags/UnarchiveFeatureFlag.ts b/examples/v2/feature-flags/UnarchiveFeatureFlag.ts new file mode 100644 index 000000000000..121516b5be4b --- /dev/null +++ b/examples/v2/feature-flags/UnarchiveFeatureFlag.ts @@ -0,0 +1,24 @@ +/** + * Unarchive a feature flag returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.FeatureFlagsApi(configuration); + +// there is a valid "feature_flag" in the system +const FEATURE_FLAG_DATA_ID = process.env.FEATURE_FLAG_DATA_ID as string; + +const params: v2.FeatureFlagsApiUnarchiveFeatureFlagRequest = { + featureFlagId: FEATURE_FLAG_DATA_ID, +}; + +apiInstance + .unarchiveFeatureFlag(params) + .then((data: v2.FeatureFlagResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/feature-flags/UpdateFeatureFlag.ts b/examples/v2/feature-flags/UpdateFeatureFlag.ts new file mode 100644 index 000000000000..fa74def7e5e4 --- /dev/null +++ b/examples/v2/feature-flags/UpdateFeatureFlag.ts @@ -0,0 +1,33 @@ +/** + * Update a feature flag returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.FeatureFlagsApi(configuration); + +// there is a valid "feature_flag" in the system +const FEATURE_FLAG_DATA_ID = process.env.FEATURE_FLAG_DATA_ID as string; + +const params: v2.FeatureFlagsApiUpdateFeatureFlagRequest = { + body: { + data: { + type: "feature-flags", + attributes: { + description: "Updated description for the feature flag", + name: "Updated Test Feature Flag Example-Feature-Flag", + }, + }, + }, + featureFlagId: FEATURE_FLAG_DATA_ID, +}; + +apiInstance + .updateFeatureFlag(params) + .then((data: v2.FeatureFlagResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/feature-flags/UpdateFeatureFlagsEnvironment.ts b/examples/v2/feature-flags/UpdateFeatureFlagsEnvironment.ts new file mode 100644 index 000000000000..6fe1354ccb40 --- /dev/null +++ b/examples/v2/feature-flags/UpdateFeatureFlagsEnvironment.ts @@ -0,0 +1,33 @@ +/** + * Update an environment returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.FeatureFlagsApi(configuration); + +// there is a valid "environment" in the system +const ENVIRONMENT_DATA_ID = process.env.ENVIRONMENT_DATA_ID as string; + +const params: v2.FeatureFlagsApiUpdateFeatureFlagsEnvironmentRequest = { + body: { + data: { + type: "environments", + attributes: { + name: "Updated Test Environment Example-Feature-Flag", + queries: ["updated-Example-Feature-Flag", "live-Example-Feature-Flag"], + }, + }, + }, + environmentId: ENVIRONMENT_DATA_ID, +}; + +apiInstance + .updateFeatureFlagsEnvironment(params) + .then((data: v2.EnvironmentResponse) => { + 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 55091f960eb4..ee1ae84b9b3e 100644 --- a/features/support/scenarios_model_mapping.ts +++ b/features/support/scenarios_model_mapping.ts @@ -6117,6 +6117,137 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { }, "operationResponseType": "V2EventResponse", }, + "v2.ListFeatureFlags": { + "key": { + "type": "string", + "format": "", + }, + "isArchived": { + "type": "boolean", + "format": "", + }, + "limit": { + "type": "number", + "format": "", + }, + "offset": { + "type": "number", + "format": "", + }, + "operationResponseType": "ListFeatureFlagsResponse", + }, + "v2.CreateFeatureFlag": { + "body": { + "type": "CreateFeatureFlagRequest", + "format": "", + }, + "operationResponseType": "FeatureFlagResponse", + }, + "v2.ListFeatureFlagsEnvironments": { + "name": { + "type": "string", + "format": "", + }, + "key": { + "type": "string", + "format": "", + }, + "limit": { + "type": "number", + "format": "", + }, + "offset": { + "type": "number", + "format": "", + }, + "operationResponseType": "ListEnvironmentsResponse", + }, + "v2.CreateFeatureFlagsEnvironment": { + "body": { + "type": "CreateEnvironmentRequest", + "format": "", + }, + "operationResponseType": "EnvironmentResponse", + }, + "v2.GetFeatureFlagsEnvironment": { + "environmentId": { + "type": "string", + "format": "uuid", + }, + "operationResponseType": "EnvironmentResponse", + }, + "v2.UpdateFeatureFlagsEnvironment": { + "environmentId": { + "type": "string", + "format": "uuid", + }, + "body": { + "type": "UpdateEnvironmentRequest", + "format": "", + }, + "operationResponseType": "EnvironmentResponse", + }, + "v2.DeleteFeatureFlagsEnvironment": { + "environmentId": { + "type": "string", + "format": "uuid", + }, + "operationResponseType": "{}", + }, + "v2.GetFeatureFlag": { + "featureFlagId": { + "type": "string", + "format": "uuid", + }, + "operationResponseType": "FeatureFlagResponse", + }, + "v2.UpdateFeatureFlag": { + "featureFlagId": { + "type": "string", + "format": "uuid", + }, + "body": { + "type": "UpdateFeatureFlagRequest", + "format": "", + }, + "operationResponseType": "FeatureFlagResponse", + }, + "v2.ArchiveFeatureFlag": { + "featureFlagId": { + "type": "string", + "format": "uuid", + }, + "operationResponseType": "FeatureFlagResponse", + }, + "v2.DisableFeatureFlagEnvironment": { + "featureFlagId": { + "type": "string", + "format": "uuid", + }, + "environmentId": { + "type": "string", + "format": "uuid", + }, + "operationResponseType": "{}", + }, + "v2.EnableFeatureFlagEnvironment": { + "featureFlagId": { + "type": "string", + "format": "uuid", + }, + "environmentId": { + "type": "string", + "format": "uuid", + }, + "operationResponseType": "{}", + }, + "v2.UnarchiveFeatureFlag": { + "featureFlagId": { + "type": "string", + "format": "uuid", + }, + "operationResponseType": "FeatureFlagResponse", + }, "v2.GetHamrOrgConnection": { "operationResponseType": "HamrOrgConnectionResponse", }, diff --git a/features/v2/feature_flags.feature b/features/v2/feature_flags.feature new file mode 100644 index 000000000000..fcf9045b9d94 --- /dev/null +++ b/features/v2/feature_flags.feature @@ -0,0 +1,265 @@ +@endpoint(feature-flags) @endpoint(feature-flags-v2) +Feature: Feature Flags + Manage feature flags and environments. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "FeatureFlags" API + + @skip @team:DataDog/feature-flags + Scenario: Archive a feature flag returns "Bad Request" response + Given new "ArchiveFeatureFlag" request + And request contains "feature_flag_id" parameter with value "00000000-0000-0000-0000-000000000000" + When the request is sent + Then the response status is 400 Bad Request + + @skip @team:DataDog/feature-flags + Scenario: Archive a feature flag returns "Not Found" response + Given new "ArchiveFeatureFlag" request + And request contains "feature_flag_id" parameter with value "00000000-0000-0000-0000-000000000000" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/feature-flags + Scenario: Archive a feature flag returns "OK" response + Given there is a valid "feature_flag" in the system + And new "ArchiveFeatureFlag" request + And request contains "feature_flag_id" parameter from "feature_flag.data.id" + When the request is sent + Then the response status is 200 OK + + @skip @team:DataDog/feature-flags + Scenario: Create a feature flag returns "Bad Request" response + Given new "CreateFeatureFlag" request + And body with value {"data": {"type": "feature-flags", "attributes": {"default_variant_key": "control", "description": "This is an example feature flag for demonstration", "json_schema": "{\"type\": \"object\", \"properties\": {\"enabled\": {\"type\": \"boolean\"}}}", "key": "example-feature-flag", "name": "Example Feature Flag", "value_type": "BOOLEAN", "variants": [{"key": "control", "name": "Control Variant", "value": "true"}]}}} + When the request is sent + Then the response status is 400 Bad Request + + @skip @team:DataDog/feature-flags + Scenario: Create a feature flag returns "Conflict" response + Given new "CreateFeatureFlag" request + And body with value {"data": {"type": "feature-flags", "attributes": {"default_variant_key": "control", "description": "This is an example feature flag for demonstration", "json_schema": "{\"type\": \"object\", \"properties\": {\"enabled\": {\"type\": \"boolean\"}}}", "key": "example-feature-flag", "name": "Example Feature Flag", "value_type": "BOOLEAN", "variants": [{"key": "control", "name": "Control Variant", "value": "true"}]}}} + When the request is sent + Then the response status is 409 Conflict + + @team:DataDog/feature-flags + Scenario: Create a feature flag returns "Created" response + Given new "CreateFeatureFlag" request + And body with value {"data": {"type": "feature-flags", "attributes": {"default_variant_key": "variant-{{ unique }}-1", "description": "Test feature flag for BDD scenarios", "key": "test-feature-flag-{{ unique }}", "name": "Test Feature Flag {{ unique }}", "value_type": "BOOLEAN", "variants": [{"key": "variant-{{ unique }}-1", "name": "Variant {{ unique }} A", "value": "true"}, {"key": "variant-{{ unique }}-2", "name": "Variant {{ unique }} B", "value": "false"}]}}} + When the request is sent + Then the response status is 201 Created + And the response "data.attributes.key" is equal to "test-feature-flag-{{ unique }}" + And the response "data.attributes.name" is equal to "Test Feature Flag {{ unique }}" + And the response "data.attributes.value_type" is equal to "BOOLEAN" + + @skip @team:DataDog/feature-flags + Scenario: Create an environment returns "Bad Request" response + Given new "CreateFeatureFlagsEnvironment" request + And body with value {"data": {"type": "environments", "attributes": {"description": "Staging environment for testing", "key": "staging", "name": "staging"}}} + When the request is sent + Then the response status is 400 Bad Request + + @skip @team:DataDog/feature-flags + Scenario: Create an environment returns "Conflict" response + Given new "CreateFeatureFlagsEnvironment" request + And body with value {"data": {"type": "environments", "attributes": {"description": "Staging environment for testing", "key": "staging", "name": "staging"}}} + When the request is sent + Then the response status is 409 Conflict + + @team:DataDog/feature-flags + Scenario: Create an environment returns "Created" response + Given new "CreateFeatureFlagsEnvironment" request + And body with value {"data": {"type": "environments", "attributes": {"name": "Test Environment {{ unique }}", "queries": ["test-{{ unique }}", "env-{{ unique }}"]}}} + When the request is sent + Then the response status is 201 Created + + @skip @team:DataDog/feature-flags + Scenario: Delete an environment returns "No Content" response + Given there is a valid "environment" in the system + And new "DeleteFeatureFlagsEnvironment" request + And request contains "environment_id" parameter from "environment.data.id" + When the request is sent + Then the response status is 204 No Content + + @skip @team:DataDog/feature-flags + Scenario: Delete an environment returns "Not Found" response + Given new "DeleteFeatureFlagsEnvironment" request + And request contains "environment_id" parameter with value "00000000-0000-0000-0000-000000000000" + When the request is sent + Then the response status is 404 Not Found + + @skip @team:DataDog/feature-flags + Scenario: Disable a feature flag in an environment returns "Accepted - Approval required for this change" response + Given there is a valid "feature_flag" in the system + And there is a valid "environment" in the system + And new "DisableFeatureFlagEnvironment" request + And request contains "feature_flag_id" parameter from "feature_flag.data.id" + And request contains "environment_id" parameter from "environment.data.id" + When the request is sent + Then the response status is 202 Accepted - Approval required for this change + + @skip @team:DataDog/feature-flags + Scenario: Disable a feature flag in an environment returns "Not Found" response + Given new "DisableFeatureFlagEnvironment" request + And request contains "feature_flag_id" parameter with value "00000000-0000-0000-0000-000000000000" + And request contains "environment_id" parameter with value "00000000-0000-0000-0000-000000000001" + When the request is sent + Then the response status is 404 Not Found + + @skip @team:DataDog/feature-flags + Scenario: Disable a feature flag in an environment returns "OK" response + Given there is a valid "feature_flag" in the system + And there is a valid "environment" in the system + And new "DisableFeatureFlagEnvironment" request + And request contains "feature_flag_id" parameter from "feature_flag.data.id" + And request contains "environment_id" parameter from "environment.data.id" + When the request is sent + Then the response status is 200 OK + + @skip @team:DataDog/feature-flags + Scenario: Enable a feature flag in an environment returns "Accepted - Approval required for this change" response + Given there is a valid "feature_flag" in the system + And there is a valid "environment" in the system + And new "EnableFeatureFlagEnvironment" request + And request contains "feature_flag_id" parameter from "feature_flag.data.id" + And request contains "environment_id" parameter from "environment.data.id" + When the request is sent + Then the response status is 202 Accepted - Approval required for this change + + @skip @team:DataDog/feature-flags + Scenario: Enable a feature flag in an environment returns "Not Found" response + Given new "EnableFeatureFlagEnvironment" request + And request contains "feature_flag_id" parameter with value "00000000-0000-0000-0000-000000000000" + And request contains "environment_id" parameter with value "00000000-0000-0000-0000-000000000001" + When the request is sent + Then the response status is 404 Not Found + + @skip @team:DataDog/feature-flags + Scenario: Enable a feature flag in an environment returns "OK" response + Given there is a valid "feature_flag" in the system + And there is a valid "environment" in the system + And new "EnableFeatureFlagEnvironment" request + And request contains "feature_flag_id" parameter from "feature_flag.data.id" + And request contains "environment_id" parameter from "environment.data.id" + When the request is sent + Then the response status is 200 OK + + @skip @team:DataDog/feature-flags + Scenario: Get a feature flag returns "Not Found" response + Given new "GetFeatureFlag" request + And request contains "feature_flag_id" parameter with value "00000000-0000-0000-0000-000000000000" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/feature-flags + Scenario: Get a feature flag returns "OK" response + Given there is a valid "feature_flag" in the system + And new "GetFeatureFlag" request + And request contains "feature_flag_id" parameter from "feature_flag.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.key" has the same value as "feature_flag.data.attributes.key" + And the response "data.attributes.name" has the same value as "feature_flag.data.attributes.name" + And the response "data.attributes.value_type" has the same value as "feature_flag.data.attributes.value_type" + + @skip @team:DataDog/feature-flags + Scenario: Get an environment returns "Not Found" response + Given new "GetFeatureFlagsEnvironment" request + And request contains "environment_id" parameter with value "00000000-0000-0000-0000-000000000000" + When the request is sent + Then the response status is 404 Not Found + + @skip @team:DataDog/feature-flags + Scenario: Get an environment returns "OK" response + Given there is a valid "environment" in the system + And new "GetFeatureFlagsEnvironment" request + And request contains "environment_id" parameter from "environment.data.id" + When the request is sent + Then the response status is 200 OK + + @skip @team:DataDog/feature-flags + Scenario: List environments returns "OK" response + Given new "ListFeatureFlagsEnvironments" request + When the request is sent + Then the response status is 200 OK + + @team:DataDog/feature-flags + Scenario: List feature flags returns "OK" response + Given new "ListFeatureFlags" request + When the request is sent + Then the response status is 200 OK + + @skip @team:DataDog/feature-flags + Scenario: Unarchive a feature flag returns "Bad Request" response + Given new "UnarchiveFeatureFlag" request + And request contains "feature_flag_id" parameter with value "00000000-0000-0000-0000-000000000000" + When the request is sent + Then the response status is 400 Bad Request + + @skip @team:DataDog/feature-flags + Scenario: Unarchive a feature flag returns "Not Found" response + Given new "UnarchiveFeatureFlag" request + And request contains "feature_flag_id" parameter with value "00000000-0000-0000-0000-000000000000" + When the request is sent + Then the response status is 404 Not Found + + @skip @team:DataDog/feature-flags + Scenario: Unarchive a feature flag returns "OK" response + Given there is a valid "feature_flag" in the system + And new "UnarchiveFeatureFlag" request + And request contains "feature_flag_id" parameter from "feature_flag.data.id" + When the request is sent + Then the response status is 200 OK + + @skip @team:DataDog/feature-flags + Scenario: Update a feature flag returns "Bad Request" response + Given new "UpdateFeatureFlag" request + And request contains "feature_flag_id" parameter with value "00000000-0000-0000-0000-000000000000" + And body with value {"data": {"type": "feature-flags", "attributes": {"description": "Updated description for the feature flag", "json_schema": "{\"type\": \"object\", \"properties\": {\"enabled\": {\"type\": \"boolean\"}}}", "name": "Updated Feature Flag Name"}}} + When the request is sent + Then the response status is 400 Bad Request + + @skip @team:DataDog/feature-flags + Scenario: Update a feature flag returns "Not Found" response + Given new "UpdateFeatureFlag" request + And request contains "feature_flag_id" parameter with value "00000000-0000-0000-0000-000000000000" + And body with value {"data": {"type": "feature-flags", "attributes": {"description": "Updated description for the feature flag", "json_schema": "{\"type\": \"object\", \"properties\": {\"enabled\": {\"type\": \"boolean\"}}}", "name": "Updated Feature Flag Name"}}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/feature-flags + Scenario: Update a feature flag returns "OK" response + Given there is a valid "feature_flag" in the system + And new "UpdateFeatureFlag" request + And request contains "feature_flag_id" parameter from "feature_flag.data.id" + And body with value {"data": {"type": "feature-flags", "attributes": {"description": "Updated description for the feature flag", "name": "Updated Test Feature Flag {{ unique }}"}}} + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.name" is equal to "Updated Test Feature Flag {{ unique }}" + And the response "data.attributes.description" is equal to "Updated description for the feature flag" + + @skip @team:DataDog/feature-flags + Scenario: Update an environment returns "Bad Request" response + Given new "UpdateFeatureFlagsEnvironment" request + And request contains "environment_id" parameter with value "00000000-0000-0000-0000-000000000000" + And body with value {"data": {"type": "environments", "attributes": {"description": "Updated staging environment description", "name": "Updated Staging"}}} + When the request is sent + Then the response status is 400 Bad Request + + @skip @team:DataDog/feature-flags + Scenario: Update an environment returns "Not Found" response + Given new "UpdateFeatureFlagsEnvironment" request + And request contains "environment_id" parameter with value "00000000-0000-0000-0000-000000000000" + And body with value {"data": {"type": "environments", "attributes": {"description": "Updated staging environment description", "name": "Updated Staging"}}} + When the request is sent + Then the response status is 404 Not Found + + @skip @team:DataDog/feature-flags + Scenario: Update an environment returns "OK" response + Given there is a valid "environment" in the system + And new "UpdateFeatureFlagsEnvironment" request + And request contains "environment_id" parameter from "environment.data.id" + And body with value {"data": {"type": "environments", "attributes": {"name": "Updated Test Environment {{ unique }}", "queries": ["updated-{{ unique }}", "live-{{ unique }}"]}}} + When the request is sent + Then the response status is 200 OK diff --git a/features/v2/given.json b/features/v2/given.json index 76980d4ce3dc..61c0b7da7457 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -429,6 +429,30 @@ "tag": "Error Tracking", "operationId": "SearchIssues" }, + { + "parameters": [ + { + "name": "body", + "value": "{\"data\": {\"type\": \"feature-flags\", \"attributes\": {\"key\": \"test-feature-flag-{{ unique }}\", \"name\": \"Test Feature Flag {{ unique }}\", \"description\": \"Test feature flag for BDD scenarios\", \"value_type\": \"BOOLEAN\", \"variants\": [{\"key\": \"variant-{{ unique }}-1\", \"name\": \"Variant {{ unique }} A\", \"value\": \"true\"}, {\"key\": \"variant-{{ unique }}-2\", \"name\": \"Variant {{ unique }} B\", \"value\": \"false\"}]}}}" + } + ], + "step": "there is a valid \"feature_flag\" in the system", + "key": "feature_flag", + "tag": "Feature Flags", + "operationId": "CreateFeatureFlag" + }, + { + "parameters": [ + { + "name": "body", + "value": "{\"data\": {\"type\": \"environments\", \"attributes\": {\"name\": \"Test Environment {{ unique }}\", \"queries\": [\"test-{{ unique }}\", \"env-{{ unique }}\"]}}}" + } + ], + "step": "there is a valid \"environment\" in the system", + "key": "environment", + "tag": "Feature Flags", + "operationId": "CreateFeatureFlagsEnvironment" + }, { "parameters": [ { diff --git a/features/v2/undo.json b/features/v2/undo.json index a04c9b283b90..28ebe49741d0 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -1749,6 +1749,112 @@ "type": "safe" } }, + "ListFeatureFlags": { + "tag": "Feature Flags", + "undo": { + "type": "safe" + } + }, + "CreateFeatureFlag": { + "tag": "Feature Flags", + "undo": { + "operationId": "ArchiveFeatureFlag", + "parameters": [ + { + "name": "feature_flag_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "ListFeatureFlagsEnvironments": { + "tag": "Feature Flags", + "undo": { + "type": "safe" + } + }, + "CreateFeatureFlagsEnvironment": { + "tag": "Feature Flags", + "undo": { + "operationId": "DeleteFeatureFlagsEnvironment", + "parameters": [ + { + "name": "environment_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteFeatureFlagsEnvironment": { + "tag": "Feature Flags", + "undo": { + "type": "idempotent" + } + }, + "GetFeatureFlagsEnvironment": { + "tag": "Feature Flags", + "undo": { + "type": "safe" + } + }, + "UpdateFeatureFlagsEnvironment": { + "tag": "Feature Flags", + "undo": { + "type": "idempotent" + } + }, + "GetFeatureFlag": { + "tag": "Feature Flags", + "undo": { + "type": "safe" + } + }, + "UpdateFeatureFlag": { + "tag": "Feature Flags", + "undo": { + "type": "idempotent" + } + }, + "ArchiveFeatureFlag": { + "tag": "Feature Flags", + "undo": { + "operationId": "UnarchiveFeatureFlag", + "parameters": [ + { + "name": "feature_flag_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DisableFeatureFlagEnvironment": { + "tag": "Feature Flags", + "undo": { + "type": "idempotent" + } + }, + "EnableFeatureFlagEnvironment": { + "tag": "Feature Flags", + "undo": { + "type": "idempotent" + } + }, + "UnarchiveFeatureFlag": { + "tag": "Feature Flags", + "undo": { + "operationId": "ArchiveFeatureFlag", + "parameters": [ + { + "name": "feature_flag_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, "GetHamrOrgConnection": { "tag": "High Availability MultiRegion", "undo": { diff --git a/packages/datadog-api-client-v2/apis/FeatureFlagsApi.ts b/packages/datadog-api-client-v2/apis/FeatureFlagsApi.ts new file mode 100644 index 000000000000..f5f5d71defcf --- /dev/null +++ b/packages/datadog-api-client-v2/apis/FeatureFlagsApi.ts @@ -0,0 +1,1830 @@ +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 { CreateEnvironmentRequest } from "../models/CreateEnvironmentRequest"; +import { CreateFeatureFlagRequest } from "../models/CreateFeatureFlagRequest"; +import { EnvironmentResponse } from "../models/EnvironmentResponse"; +import { FeatureFlagResponse } from "../models/FeatureFlagResponse"; +import { ListEnvironmentsResponse } from "../models/ListEnvironmentsResponse"; +import { ListFeatureFlagsResponse } from "../models/ListFeatureFlagsResponse"; +import { UpdateEnvironmentRequest } from "../models/UpdateEnvironmentRequest"; +import { UpdateFeatureFlagRequest } from "../models/UpdateFeatureFlagRequest"; + +export class FeatureFlagsApiRequestFactory extends BaseAPIRequestFactory { + public async archiveFeatureFlag( + featureFlagId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'featureFlagId' is not null or undefined + if (featureFlagId === null || featureFlagId === undefined) { + throw new RequiredError("featureFlagId", "archiveFeatureFlag"); + } + + // Path Params + const localVarPath = + "/api/v2/feature-flags/{feature_flag_id}/archive".replace( + "{feature_flag_id}", + encodeURIComponent(String(featureFlagId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.FeatureFlagsApi.archiveFeatureFlag") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async createFeatureFlag( + body: CreateFeatureFlagRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createFeatureFlag"); + } + + // Path Params + const localVarPath = "/api/v2/feature-flags"; + + // Make Request Context + const requestContext = _config + .getServer("v2.FeatureFlagsApi.createFeatureFlag") + .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, "CreateFeatureFlagRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async createFeatureFlagsEnvironment( + body: CreateEnvironmentRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createFeatureFlagsEnvironment"); + } + + // Path Params + const localVarPath = "/api/v2/feature-flags/environments"; + + // Make Request Context + const requestContext = _config + .getServer("v2.FeatureFlagsApi.createFeatureFlagsEnvironment") + .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, "CreateEnvironmentRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async deleteFeatureFlagsEnvironment( + environmentId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'environmentId' is not null or undefined + if (environmentId === null || environmentId === undefined) { + throw new RequiredError("environmentId", "deleteFeatureFlagsEnvironment"); + } + + // Path Params + const localVarPath = + "/api/v2/feature-flags/environments/{environment_id}".replace( + "{environment_id}", + encodeURIComponent(String(environmentId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.FeatureFlagsApi.deleteFeatureFlagsEnvironment") + .makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "*/*"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async disableFeatureFlagEnvironment( + featureFlagId: string, + environmentId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'featureFlagId' is not null or undefined + if (featureFlagId === null || featureFlagId === undefined) { + throw new RequiredError("featureFlagId", "disableFeatureFlagEnvironment"); + } + + // verify required parameter 'environmentId' is not null or undefined + if (environmentId === null || environmentId === undefined) { + throw new RequiredError("environmentId", "disableFeatureFlagEnvironment"); + } + + // Path Params + const localVarPath = + "/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/disable" + .replace("{feature_flag_id}", encodeURIComponent(String(featureFlagId))) + .replace("{environment_id}", encodeURIComponent(String(environmentId))); + + // Make Request Context + const requestContext = _config + .getServer("v2.FeatureFlagsApi.disableFeatureFlagEnvironment") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "*/*"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async enableFeatureFlagEnvironment( + featureFlagId: string, + environmentId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'featureFlagId' is not null or undefined + if (featureFlagId === null || featureFlagId === undefined) { + throw new RequiredError("featureFlagId", "enableFeatureFlagEnvironment"); + } + + // verify required parameter 'environmentId' is not null or undefined + if (environmentId === null || environmentId === undefined) { + throw new RequiredError("environmentId", "enableFeatureFlagEnvironment"); + } + + // Path Params + const localVarPath = + "/api/v2/feature-flags/{feature_flag_id}/environments/{environment_id}/enable" + .replace("{feature_flag_id}", encodeURIComponent(String(featureFlagId))) + .replace("{environment_id}", encodeURIComponent(String(environmentId))); + + // Make Request Context + const requestContext = _config + .getServer("v2.FeatureFlagsApi.enableFeatureFlagEnvironment") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "*/*"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async getFeatureFlag( + featureFlagId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'featureFlagId' is not null or undefined + if (featureFlagId === null || featureFlagId === undefined) { + throw new RequiredError("featureFlagId", "getFeatureFlag"); + } + + // Path Params + const localVarPath = "/api/v2/feature-flags/{feature_flag_id}".replace( + "{feature_flag_id}", + encodeURIComponent(String(featureFlagId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.FeatureFlagsApi.getFeatureFlag") + .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 getFeatureFlagsEnvironment( + environmentId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'environmentId' is not null or undefined + if (environmentId === null || environmentId === undefined) { + throw new RequiredError("environmentId", "getFeatureFlagsEnvironment"); + } + + // Path Params + const localVarPath = + "/api/v2/feature-flags/environments/{environment_id}".replace( + "{environment_id}", + encodeURIComponent(String(environmentId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.FeatureFlagsApi.getFeatureFlagsEnvironment") + .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 listFeatureFlags( + key?: string, + isArchived?: boolean, + limit?: number, + offset?: number, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // Path Params + const localVarPath = "/api/v2/feature-flags"; + + // Make Request Context + const requestContext = _config + .getServer("v2.FeatureFlagsApi.listFeatureFlags") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (key !== undefined) { + requestContext.setQueryParam( + "key", + ObjectSerializer.serialize(key, "string", ""), + "" + ); + } + if (isArchived !== undefined) { + requestContext.setQueryParam( + "is_archived", + ObjectSerializer.serialize(isArchived, "boolean", ""), + "" + ); + } + if (limit !== undefined) { + requestContext.setQueryParam( + "limit", + ObjectSerializer.serialize(limit, "number", ""), + "" + ); + } + if (offset !== undefined) { + requestContext.setQueryParam( + "offset", + ObjectSerializer.serialize(offset, "number", ""), + "" + ); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async listFeatureFlagsEnvironments( + name?: string, + key?: string, + limit?: number, + offset?: number, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // Path Params + const localVarPath = "/api/v2/feature-flags/environments"; + + // Make Request Context + const requestContext = _config + .getServer("v2.FeatureFlagsApi.listFeatureFlagsEnvironments") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (name !== undefined) { + requestContext.setQueryParam( + "name", + ObjectSerializer.serialize(name, "string", ""), + "" + ); + } + if (key !== undefined) { + requestContext.setQueryParam( + "key", + ObjectSerializer.serialize(key, "string", ""), + "" + ); + } + if (limit !== undefined) { + requestContext.setQueryParam( + "limit", + ObjectSerializer.serialize(limit, "number", ""), + "" + ); + } + if (offset !== undefined) { + requestContext.setQueryParam( + "offset", + ObjectSerializer.serialize(offset, "number", ""), + "" + ); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async unarchiveFeatureFlag( + featureFlagId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'featureFlagId' is not null or undefined + if (featureFlagId === null || featureFlagId === undefined) { + throw new RequiredError("featureFlagId", "unarchiveFeatureFlag"); + } + + // Path Params + const localVarPath = + "/api/v2/feature-flags/{feature_flag_id}/unarchive".replace( + "{feature_flag_id}", + encodeURIComponent(String(featureFlagId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.FeatureFlagsApi.unarchiveFeatureFlag") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async updateFeatureFlag( + featureFlagId: string, + body: UpdateFeatureFlagRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'featureFlagId' is not null or undefined + if (featureFlagId === null || featureFlagId === undefined) { + throw new RequiredError("featureFlagId", "updateFeatureFlag"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateFeatureFlag"); + } + + // Path Params + const localVarPath = "/api/v2/feature-flags/{feature_flag_id}".replace( + "{feature_flag_id}", + encodeURIComponent(String(featureFlagId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.FeatureFlagsApi.updateFeatureFlag") + .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, "UpdateFeatureFlagRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async updateFeatureFlagsEnvironment( + environmentId: string, + body: UpdateEnvironmentRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'environmentId' is not null or undefined + if (environmentId === null || environmentId === undefined) { + throw new RequiredError("environmentId", "updateFeatureFlagsEnvironment"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateFeatureFlagsEnvironment"); + } + + // Path Params + const localVarPath = + "/api/v2/feature-flags/environments/{environment_id}".replace( + "{environment_id}", + encodeURIComponent(String(environmentId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.FeatureFlagsApi.updateFeatureFlagsEnvironment") + .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, "UpdateEnvironmentRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } +} + +export class FeatureFlagsApiResponseProcessor { + /** + * 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 archiveFeatureFlag + * @throws ApiException if the response code was not in [200, 299] + */ + public async archiveFeatureFlag( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: FeatureFlagResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "FeatureFlagResponse" + ) as FeatureFlagResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: FeatureFlagResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "FeatureFlagResponse", + "" + ) as FeatureFlagResponse; + 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 createFeatureFlag + * @throws ApiException if the response code was not in [200, 299] + */ + public async createFeatureFlag( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 201) { + const body: FeatureFlagResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "FeatureFlagResponse" + ) as FeatureFlagResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 409 || + 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: FeatureFlagResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "FeatureFlagResponse", + "" + ) as FeatureFlagResponse; + 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 createFeatureFlagsEnvironment + * @throws ApiException if the response code was not in [200, 299] + */ + public async createFeatureFlagsEnvironment( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 201) { + const body: EnvironmentResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EnvironmentResponse" + ) as EnvironmentResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 409 || + 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: EnvironmentResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EnvironmentResponse", + "" + ) as EnvironmentResponse; + 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 deleteFeatureFlagsEnvironment + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteFeatureFlagsEnvironment( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 204) { + return; + } + if ( + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + 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 disableFeatureFlagEnvironment + * @throws ApiException if the response code was not in [200, 299] + */ + public async disableFeatureFlagEnvironment( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200 || response.httpStatusCode === 202) { + return; + } + if ( + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + 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 enableFeatureFlagEnvironment + * @throws ApiException if the response code was not in [200, 299] + */ + public async enableFeatureFlagEnvironment( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200 || response.httpStatusCode === 202) { + return; + } + if ( + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + 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 getFeatureFlag + * @throws ApiException if the response code was not in [200, 299] + */ + public async getFeatureFlag( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: FeatureFlagResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "FeatureFlagResponse" + ) as FeatureFlagResponse; + return body; + } + if ( + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: FeatureFlagResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "FeatureFlagResponse", + "" + ) as FeatureFlagResponse; + 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 getFeatureFlagsEnvironment + * @throws ApiException if the response code was not in [200, 299] + */ + public async getFeatureFlagsEnvironment( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: EnvironmentResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EnvironmentResponse" + ) as EnvironmentResponse; + return body; + } + if ( + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: EnvironmentResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EnvironmentResponse", + "" + ) as EnvironmentResponse; + 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 listFeatureFlags + * @throws ApiException if the response code was not in [200, 299] + */ + public async listFeatureFlags( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: ListFeatureFlagsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ListFeatureFlagsResponse" + ) as ListFeatureFlagsResponse; + return body; + } + if (response.httpStatusCode === 403 || 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: ListFeatureFlagsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ListFeatureFlagsResponse", + "" + ) as ListFeatureFlagsResponse; + 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 listFeatureFlagsEnvironments + * @throws ApiException if the response code was not in [200, 299] + */ + public async listFeatureFlagsEnvironments( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: ListEnvironmentsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ListEnvironmentsResponse" + ) as ListEnvironmentsResponse; + return body; + } + if (response.httpStatusCode === 403 || 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: ListEnvironmentsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ListEnvironmentsResponse", + "" + ) as ListEnvironmentsResponse; + 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 unarchiveFeatureFlag + * @throws ApiException if the response code was not in [200, 299] + */ + public async unarchiveFeatureFlag( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: FeatureFlagResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "FeatureFlagResponse" + ) as FeatureFlagResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: FeatureFlagResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "FeatureFlagResponse", + "" + ) as FeatureFlagResponse; + 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 updateFeatureFlag + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateFeatureFlag( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: FeatureFlagResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "FeatureFlagResponse" + ) as FeatureFlagResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: FeatureFlagResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "FeatureFlagResponse", + "" + ) as FeatureFlagResponse; + 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 updateFeatureFlagsEnvironment + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateFeatureFlagsEnvironment( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: EnvironmentResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EnvironmentResponse" + ) as EnvironmentResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: EnvironmentResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "EnvironmentResponse", + "" + ) as EnvironmentResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } +} + +export interface FeatureFlagsApiArchiveFeatureFlagRequest { + /** + * The ID of the feature flag. + * @type string + */ + featureFlagId: string; +} + +export interface FeatureFlagsApiCreateFeatureFlagRequest { + /** + * @type CreateFeatureFlagRequest + */ + body: CreateFeatureFlagRequest; +} + +export interface FeatureFlagsApiCreateFeatureFlagsEnvironmentRequest { + /** + * @type CreateEnvironmentRequest + */ + body: CreateEnvironmentRequest; +} + +export interface FeatureFlagsApiDeleteFeatureFlagsEnvironmentRequest { + /** + * The ID of the environment. + * @type string + */ + environmentId: string; +} + +export interface FeatureFlagsApiDisableFeatureFlagEnvironmentRequest { + /** + * The ID of the feature flag. + * @type string + */ + featureFlagId: string; + /** + * The ID of the environment. + * @type string + */ + environmentId: string; +} + +export interface FeatureFlagsApiEnableFeatureFlagEnvironmentRequest { + /** + * The ID of the feature flag. + * @type string + */ + featureFlagId: string; + /** + * The ID of the environment. + * @type string + */ + environmentId: string; +} + +export interface FeatureFlagsApiGetFeatureFlagRequest { + /** + * The ID of the feature flag. + * @type string + */ + featureFlagId: string; +} + +export interface FeatureFlagsApiGetFeatureFlagsEnvironmentRequest { + /** + * The ID of the environment. + * @type string + */ + environmentId: string; +} + +export interface FeatureFlagsApiListFeatureFlagsRequest { + /** + * Filter feature flags by key (partial matching). + * @type string + */ + key?: string; + /** + * Filter by archived status. + * @type boolean + */ + isArchived?: boolean; + /** + * Maximum number of results to return. + * @type number + */ + limit?: number; + /** + * Number of results to skip. + * @type number + */ + offset?: number; +} + +export interface FeatureFlagsApiListFeatureFlagsEnvironmentsRequest { + /** + * Filter environments by name (partial matching). + * @type string + */ + name?: string; + /** + * Filter environments by key (partial matching). + * @type string + */ + key?: string; + /** + * Maximum number of results to return. + * @type number + */ + limit?: number; + /** + * Number of results to skip. + * @type number + */ + offset?: number; +} + +export interface FeatureFlagsApiUnarchiveFeatureFlagRequest { + /** + * The ID of the feature flag. + * @type string + */ + featureFlagId: string; +} + +export interface FeatureFlagsApiUpdateFeatureFlagRequest { + /** + * The ID of the feature flag. + * @type string + */ + featureFlagId: string; + /** + * @type UpdateFeatureFlagRequest + */ + body: UpdateFeatureFlagRequest; +} + +export interface FeatureFlagsApiUpdateFeatureFlagsEnvironmentRequest { + /** + * The ID of the environment. + * @type string + */ + environmentId: string; + /** + * @type UpdateEnvironmentRequest + */ + body: UpdateEnvironmentRequest; +} + +export class FeatureFlagsApi { + private requestFactory: FeatureFlagsApiRequestFactory; + private responseProcessor: FeatureFlagsApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: FeatureFlagsApiRequestFactory, + responseProcessor?: FeatureFlagsApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = + requestFactory || new FeatureFlagsApiRequestFactory(configuration); + this.responseProcessor = + responseProcessor || new FeatureFlagsApiResponseProcessor(); + } + + /** + * Archives a feature flag. Archived flags are + * hidden from the main list but remain accessible and can be unarchived. + * @param param The request object + */ + public archiveFeatureFlag( + param: FeatureFlagsApiArchiveFeatureFlagRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.archiveFeatureFlag( + param.featureFlagId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.archiveFeatureFlag(responseContext); + }); + }); + } + + /** + * Creates a new feature flag with variants. + * @param param The request object + */ + public createFeatureFlag( + param: FeatureFlagsApiCreateFeatureFlagRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.createFeatureFlag( + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createFeatureFlag(responseContext); + }); + }); + } + + /** + * Creates a new environment for organizing feature flags. + * @param param The request object + */ + public createFeatureFlagsEnvironment( + param: FeatureFlagsApiCreateFeatureFlagsEnvironmentRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.createFeatureFlagsEnvironment(param.body, options); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createFeatureFlagsEnvironment( + responseContext + ); + }); + }); + } + + /** + * Deletes an environment. This operation cannot be undone. + * @param param The request object + */ + public deleteFeatureFlagsEnvironment( + param: FeatureFlagsApiDeleteFeatureFlagsEnvironmentRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.deleteFeatureFlagsEnvironment( + param.environmentId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.deleteFeatureFlagsEnvironment( + responseContext + ); + }); + }); + } + + /** + * Disable a feature flag in a specific environment. + * @param param The request object + */ + public disableFeatureFlagEnvironment( + param: FeatureFlagsApiDisableFeatureFlagEnvironmentRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.disableFeatureFlagEnvironment( + param.featureFlagId, + param.environmentId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.disableFeatureFlagEnvironment( + responseContext + ); + }); + }); + } + + /** + * Enable a feature flag in a specific environment. + * @param param The request object + */ + public enableFeatureFlagEnvironment( + param: FeatureFlagsApiEnableFeatureFlagEnvironmentRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.enableFeatureFlagEnvironment( + param.featureFlagId, + param.environmentId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.enableFeatureFlagEnvironment( + responseContext + ); + }); + }); + } + + /** + * Returns the details of a specific feature flag + * including variants and environment status. + * @param param The request object + */ + public getFeatureFlag( + param: FeatureFlagsApiGetFeatureFlagRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.getFeatureFlag( + param.featureFlagId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getFeatureFlag(responseContext); + }); + }); + } + + /** + * Returns the details of a specific environment. + * @param param The request object + */ + public getFeatureFlagsEnvironment( + param: FeatureFlagsApiGetFeatureFlagsEnvironmentRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.getFeatureFlagsEnvironment( + param.environmentId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getFeatureFlagsEnvironment( + responseContext + ); + }); + }); + } + + /** + * Returns a list of feature flags for the organization. + * Supports filtering by key and archived status. + * @param param The request object + */ + public listFeatureFlags( + param: FeatureFlagsApiListFeatureFlagsRequest = {}, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.listFeatureFlags( + param.key, + param.isArchived, + param.limit, + param.offset, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listFeatureFlags(responseContext); + }); + }); + } + + /** + * Returns a list of environments for the organization. + * Supports filtering by name and key. + * @param param The request object + */ + public listFeatureFlagsEnvironments( + param: FeatureFlagsApiListFeatureFlagsEnvironmentsRequest = {}, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.listFeatureFlagsEnvironments( + param.name, + param.key, + param.limit, + param.offset, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listFeatureFlagsEnvironments( + responseContext + ); + }); + }); + } + + /** + * Unarchives a previously archived feature flag, + * making it visible in the main list again. + * @param param The request object + */ + public unarchiveFeatureFlag( + param: FeatureFlagsApiUnarchiveFeatureFlagRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.unarchiveFeatureFlag( + param.featureFlagId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.unarchiveFeatureFlag(responseContext); + }); + }); + } + + /** + * Updates an existing feature flag's metadata such as + * name and description. Does not modify targeting rules or allocations. + * @param param The request object + */ + public updateFeatureFlag( + param: FeatureFlagsApiUpdateFeatureFlagRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.updateFeatureFlag( + param.featureFlagId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateFeatureFlag(responseContext); + }); + }); + } + + /** + * Updates an existing environment's metadata such as + * name and description. + * @param param The request object + */ + public updateFeatureFlagsEnvironment( + param: FeatureFlagsApiUpdateFeatureFlagsEnvironmentRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.updateFeatureFlagsEnvironment( + param.environmentId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateFeatureFlagsEnvironment( + responseContext + ); + }); + }); + } +} diff --git a/packages/datadog-api-client-v2/index.ts b/packages/datadog-api-client-v2/index.ts index 2301c85e53db..3d6aba936d34 100644 --- a/packages/datadog-api-client-v2/index.ts +++ b/packages/datadog-api-client-v2/index.ts @@ -400,6 +400,23 @@ export { FastlyIntegrationApi, } from "./apis/FastlyIntegrationApi"; +export { + FeatureFlagsApiArchiveFeatureFlagRequest, + FeatureFlagsApiCreateFeatureFlagRequest, + FeatureFlagsApiCreateFeatureFlagsEnvironmentRequest, + FeatureFlagsApiDeleteFeatureFlagsEnvironmentRequest, + FeatureFlagsApiDisableFeatureFlagEnvironmentRequest, + FeatureFlagsApiEnableFeatureFlagEnvironmentRequest, + FeatureFlagsApiGetFeatureFlagRequest, + FeatureFlagsApiGetFeatureFlagsEnvironmentRequest, + FeatureFlagsApiListFeatureFlagsRequest, + FeatureFlagsApiListFeatureFlagsEnvironmentsRequest, + FeatureFlagsApiUnarchiveFeatureFlagRequest, + FeatureFlagsApiUpdateFeatureFlagRequest, + FeatureFlagsApiUpdateFeatureFlagsEnvironmentRequest, + FeatureFlagsApi, +} from "./apis/FeatureFlagsApi"; + export { FleetAutomationApiCancelFleetDeploymentRequest, FleetAutomationApiCreateFleetDeploymentConfigureRequest, @@ -2098,6 +2115,14 @@ export { CreateDeploymentRuleParams } from "./models/CreateDeploymentRuleParams" export { CreateDeploymentRuleParamsData } from "./models/CreateDeploymentRuleParamsData"; export { CreateDeploymentRuleParamsDataAttributes } from "./models/CreateDeploymentRuleParamsDataAttributes"; export { CreateEmailNotificationChannelConfig } from "./models/CreateEmailNotificationChannelConfig"; +export { CreateEnvironmentAttributes } from "./models/CreateEnvironmentAttributes"; +export { CreateEnvironmentData } from "./models/CreateEnvironmentData"; +export { CreateEnvironmentDataType } from "./models/CreateEnvironmentDataType"; +export { CreateEnvironmentRequest } from "./models/CreateEnvironmentRequest"; +export { CreateFeatureFlagAttributes } from "./models/CreateFeatureFlagAttributes"; +export { CreateFeatureFlagData } from "./models/CreateFeatureFlagData"; +export { CreateFeatureFlagDataType } from "./models/CreateFeatureFlagDataType"; +export { CreateFeatureFlagRequest } from "./models/CreateFeatureFlagRequest"; export { CreateIncidentNotificationRuleRequest } from "./models/CreateIncidentNotificationRuleRequest"; export { CreateIncidentNotificationTemplateRequest } from "./models/CreateIncidentNotificationTemplateRequest"; export { CreateJiraIssueRequestArray } from "./models/CreateJiraIssueRequestArray"; @@ -2177,6 +2202,7 @@ export { CreateUploadResponseData } from "./models/CreateUploadResponseData"; export { CreateUploadResponseDataAttributes } from "./models/CreateUploadResponseDataAttributes"; export { CreateUploadResponseDataType } from "./models/CreateUploadResponseDataType"; export { CreateUserNotificationChannelRequest } from "./models/CreateUserNotificationChannelRequest"; +export { CreateVariant } from "./models/CreateVariant"; export { CreateWorkflowRequest } from "./models/CreateWorkflowRequest"; export { CreateWorkflowResponse } from "./models/CreateWorkflowResponse"; export { Creator } from "./models/Creator"; @@ -2593,6 +2619,11 @@ export { EntityV3System } from "./models/EntityV3System"; export { EntityV3SystemDatadog } from "./models/EntityV3SystemDatadog"; export { EntityV3SystemKind } from "./models/EntityV3SystemKind"; export { EntityV3SystemSpec } from "./models/EntityV3SystemSpec"; +export { Environment } from "./models/Environment"; +export { EnvironmentAttributes } from "./models/EnvironmentAttributes"; +export { EnvironmentResponse } from "./models/EnvironmentResponse"; +export { EnvironmentsPaginationMeta } from "./models/EnvironmentsPaginationMeta"; +export { EnvironmentsPaginationMetaPage } from "./models/EnvironmentsPaginationMetaPage"; export { EPSS } from "./models/EPSS"; export { ErrorHandler } from "./models/ErrorHandler"; export { Escalation } from "./models/Escalation"; @@ -2718,6 +2749,13 @@ export { FastlyServiceRequest } from "./models/FastlyServiceRequest"; export { FastlyServiceResponse } from "./models/FastlyServiceResponse"; export { FastlyServicesResponse } from "./models/FastlyServicesResponse"; export { FastlyServiceType } from "./models/FastlyServiceType"; +export { FeatureFlag } from "./models/FeatureFlag"; +export { FeatureFlagAttributes } from "./models/FeatureFlagAttributes"; +export { FeatureFlagEnvironment } from "./models/FeatureFlagEnvironment"; +export { FeatureFlagResponse } from "./models/FeatureFlagResponse"; +export { FeatureFlagsPaginationMeta } from "./models/FeatureFlagsPaginationMeta"; +export { FeatureFlagsPaginationMetaPage } from "./models/FeatureFlagsPaginationMetaPage"; +export { FeatureFlagStatus } from "./models/FeatureFlagStatus"; export { FiltersPerProduct } from "./models/FiltersPerProduct"; export { Finding } from "./models/Finding"; export { FindingAttributes } from "./models/FindingAttributes"; @@ -3399,6 +3437,8 @@ export { ListDowntimesResponse } from "./models/ListDowntimesResponse"; export { ListEntityCatalogResponse } from "./models/ListEntityCatalogResponse"; export { ListEntityCatalogResponseIncludedItem } from "./models/ListEntityCatalogResponseIncludedItem"; export { ListEntityCatalogResponseLinks } from "./models/ListEntityCatalogResponseLinks"; +export { ListEnvironmentsResponse } from "./models/ListEnvironmentsResponse"; +export { ListFeatureFlagsResponse } from "./models/ListFeatureFlagsResponse"; export { ListFindingsMeta } from "./models/ListFindingsMeta"; export { ListFindingsPage } from "./models/ListFindingsPage"; export { ListFindingsResponse } from "./models/ListFindingsResponse"; @@ -5606,6 +5646,14 @@ export { UpdateDeploymentGateParamsDataAttributes } from "./models/UpdateDeploym export { UpdateDeploymentRuleParams } from "./models/UpdateDeploymentRuleParams"; export { UpdateDeploymentRuleParamsData } from "./models/UpdateDeploymentRuleParamsData"; export { UpdateDeploymentRuleParamsDataAttributes } from "./models/UpdateDeploymentRuleParamsDataAttributes"; +export { UpdateEnvironmentAttributes } from "./models/UpdateEnvironmentAttributes"; +export { UpdateEnvironmentData } from "./models/UpdateEnvironmentData"; +export { UpdateEnvironmentDataType } from "./models/UpdateEnvironmentDataType"; +export { UpdateEnvironmentRequest } from "./models/UpdateEnvironmentRequest"; +export { UpdateFeatureFlagAttributes } from "./models/UpdateFeatureFlagAttributes"; +export { UpdateFeatureFlagData } from "./models/UpdateFeatureFlagData"; +export { UpdateFeatureFlagDataType } from "./models/UpdateFeatureFlagDataType"; +export { UpdateFeatureFlagRequest } from "./models/UpdateFeatureFlagRequest"; export { UpdateFlakyTestsRequest } from "./models/UpdateFlakyTestsRequest"; export { UpdateFlakyTestsRequestAttributes } from "./models/UpdateFlakyTestsRequestAttributes"; export { UpdateFlakyTestsRequestData } from "./models/UpdateFlakyTestsRequestData"; @@ -5726,6 +5774,8 @@ export { V2EventResponse } from "./models/V2EventResponse"; export { ValidationError } from "./models/ValidationError"; export { ValidationErrorMeta } from "./models/ValidationErrorMeta"; export { ValidationResponse } from "./models/ValidationResponse"; +export { ValueType } from "./models/ValueType"; +export { Variant } from "./models/Variant"; export { VersionHistoryUpdate } from "./models/VersionHistoryUpdate"; export { VersionHistoryUpdateType } from "./models/VersionHistoryUpdateType"; export { ViewershipHistorySessionArray } from "./models/ViewershipHistorySessionArray"; diff --git a/packages/datadog-api-client-v2/models/CreateEnvironmentAttributes.ts b/packages/datadog-api-client-v2/models/CreateEnvironmentAttributes.ts new file mode 100644 index 000000000000..8767ed6e0cde --- /dev/null +++ b/packages/datadog-api-client-v2/models/CreateEnvironmentAttributes.ts @@ -0,0 +1,78 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes for creating a new environment. + */ +export class CreateEnvironmentAttributes { + /** + * Indicates whether this is a production environment. + */ + "isProduction"?: boolean; + /** + * The name of the environment. + */ + "name": string; + /** + * List of queries to define the environment scope. + */ + "queries": Array; + /** + * Indicates whether feature flag changes require approval in this environment. + */ + "requireFeatureFlagApproval"?: boolean; + + /** + * 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 = { + isProduction: { + baseName: "is_production", + type: "boolean", + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + queries: { + baseName: "queries", + type: "Array", + required: true, + }, + requireFeatureFlagApproval: { + baseName: "require_feature_flag_approval", + type: "boolean", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateEnvironmentAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CreateEnvironmentData.ts b/packages/datadog-api-client-v2/models/CreateEnvironmentData.ts new file mode 100644 index 000000000000..427a94dd4cb6 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CreateEnvironmentData.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 { CreateEnvironmentAttributes } from "./CreateEnvironmentAttributes"; +import { CreateEnvironmentDataType } from "./CreateEnvironmentDataType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Data for creating a new environment. + */ +export class CreateEnvironmentData { + /** + * Attributes for creating a new environment. + */ + "attributes": CreateEnvironmentAttributes; + /** + * The resource type. + */ + "type": CreateEnvironmentDataType; + + /** + * 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: "CreateEnvironmentAttributes", + required: true, + }, + type: { + baseName: "type", + type: "CreateEnvironmentDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateEnvironmentData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CreateEnvironmentDataType.ts b/packages/datadog-api-client-v2/models/CreateEnvironmentDataType.ts new file mode 100644 index 000000000000..cbf723668669 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CreateEnvironmentDataType.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 resource type. + */ + +export type CreateEnvironmentDataType = typeof ENVIRONMENTS | UnparsedObject; +export const ENVIRONMENTS = "environments"; diff --git a/packages/datadog-api-client-v2/models/CreateEnvironmentRequest.ts b/packages/datadog-api-client-v2/models/CreateEnvironmentRequest.ts new file mode 100644 index 000000000000..3786525d1ee3 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CreateEnvironmentRequest.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 { CreateEnvironmentData } from "./CreateEnvironmentData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Request to create a new environment. + */ +export class CreateEnvironmentRequest { + /** + * Data for creating a new environment. + */ + "data": CreateEnvironmentData; + + /** + * 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: "CreateEnvironmentData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateEnvironmentRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CreateFeatureFlagAttributes.ts b/packages/datadog-api-client-v2/models/CreateFeatureFlagAttributes.ts new file mode 100644 index 000000000000..1b36224d4fe1 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CreateFeatureFlagAttributes.ts @@ -0,0 +1,107 @@ +/** + * 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 { CreateVariant } from "./CreateVariant"; +import { ValueType } from "./ValueType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes for creating a new feature flag. + */ +export class CreateFeatureFlagAttributes { + /** + * The key of the default variant. + */ + "defaultVariantKey"?: string; + /** + * The description of the feature flag. + */ + "description": string; + /** + * JSON schema for validation when value_type is JSON. + */ + "jsonSchema"?: string; + /** + * The unique key of the feature flag. + */ + "key": string; + /** + * The name of the feature flag. + */ + "name": string; + /** + * The type of values for the feature flag variants. + */ + "valueType": ValueType; + /** + * The variants of the feature flag. + */ + "variants": 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 = { + defaultVariantKey: { + baseName: "default_variant_key", + type: "string", + }, + description: { + baseName: "description", + type: "string", + required: true, + }, + jsonSchema: { + baseName: "json_schema", + type: "string", + }, + key: { + baseName: "key", + type: "string", + required: true, + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + valueType: { + baseName: "value_type", + type: "ValueType", + required: true, + }, + variants: { + baseName: "variants", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateFeatureFlagAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CreateFeatureFlagData.ts b/packages/datadog-api-client-v2/models/CreateFeatureFlagData.ts new file mode 100644 index 000000000000..7083ad4c15ae --- /dev/null +++ b/packages/datadog-api-client-v2/models/CreateFeatureFlagData.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 { CreateFeatureFlagAttributes } from "./CreateFeatureFlagAttributes"; +import { CreateFeatureFlagDataType } from "./CreateFeatureFlagDataType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Data for creating a new feature flag. + */ +export class CreateFeatureFlagData { + /** + * Attributes for creating a new feature flag. + */ + "attributes": CreateFeatureFlagAttributes; + /** + * The resource type. + */ + "type": CreateFeatureFlagDataType; + + /** + * 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: "CreateFeatureFlagAttributes", + required: true, + }, + type: { + baseName: "type", + type: "CreateFeatureFlagDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateFeatureFlagData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CreateFeatureFlagDataType.ts b/packages/datadog-api-client-v2/models/CreateFeatureFlagDataType.ts new file mode 100644 index 000000000000..b737d8066118 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CreateFeatureFlagDataType.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 resource type. + */ + +export type CreateFeatureFlagDataType = typeof FEATURE_FLAGS | UnparsedObject; +export const FEATURE_FLAGS = "feature-flags"; diff --git a/packages/datadog-api-client-v2/models/CreateFeatureFlagRequest.ts b/packages/datadog-api-client-v2/models/CreateFeatureFlagRequest.ts new file mode 100644 index 000000000000..2bb957e46422 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CreateFeatureFlagRequest.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 { CreateFeatureFlagData } from "./CreateFeatureFlagData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Request to create a new feature flag. + */ +export class CreateFeatureFlagRequest { + /** + * Data for creating a new feature flag. + */ + "data": CreateFeatureFlagData; + + /** + * 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: "CreateFeatureFlagData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateFeatureFlagRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CreateVariant.ts b/packages/datadog-api-client-v2/models/CreateVariant.ts new file mode 100644 index 000000000000..d297cde77472 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CreateVariant.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"; + +/** + * Request to create a variant. + */ +export class CreateVariant { + /** + * The unique key of the variant. + */ + "key": string; + /** + * The name of the variant. + */ + "name": string; + /** + * The value of the variant as a string. + */ + "value": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + key: { + baseName: "key", + type: "string", + required: true, + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + value: { + baseName: "value", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateVariant.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/Environment.ts b/packages/datadog-api-client-v2/models/Environment.ts new file mode 100644 index 000000000000..65a0b96a7442 --- /dev/null +++ b/packages/datadog-api-client-v2/models/Environment.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 { CreateEnvironmentDataType } from "./CreateEnvironmentDataType"; +import { EnvironmentAttributes } from "./EnvironmentAttributes"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * A feature flag environment resource. + */ +export class Environment { + /** + * Attributes of an environment. + */ + "attributes": EnvironmentAttributes; + /** + * The unique identifier of the environment. + */ + "id": string; + /** + * The resource type. + */ + "type": CreateEnvironmentDataType; + + /** + * 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: "EnvironmentAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + type: { + baseName: "type", + type: "CreateEnvironmentDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return Environment.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/EnvironmentAttributes.ts b/packages/datadog-api-client-v2/models/EnvironmentAttributes.ts new file mode 100644 index 000000000000..e6bff2ffb3f2 --- /dev/null +++ b/packages/datadog-api-client-v2/models/EnvironmentAttributes.ts @@ -0,0 +1,111 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of an environment. + */ +export class EnvironmentAttributes { + /** + * The timestamp when the environment was created. + */ + "createdAt"?: Date; + /** + * The description of the environment. + */ + "description"?: string; + /** + * Indicates whether this is a production environment. + */ + "isProduction"?: boolean; + /** + * The unique key of the environment. + */ + "key"?: string; + /** + * The name of the environment. + */ + "name": string; + /** + * List of queries to define the environment scope. + */ + "queries"?: Array; + /** + * Indicates whether feature flag changes require approval in this environment. + */ + "requireFeatureFlagApproval"?: boolean; + /** + * The timestamp when the environment 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", + }, + isProduction: { + baseName: "is_production", + type: "boolean", + }, + key: { + baseName: "key", + type: "string", + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + queries: { + baseName: "queries", + type: "Array", + }, + requireFeatureFlagApproval: { + baseName: "require_feature_flag_approval", + type: "boolean", + }, + updatedAt: { + baseName: "updated_at", + type: "Date", + format: "date-time", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return EnvironmentAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/EnvironmentResponse.ts b/packages/datadog-api-client-v2/models/EnvironmentResponse.ts new file mode 100644 index 000000000000..06a25d1271ad --- /dev/null +++ b/packages/datadog-api-client-v2/models/EnvironmentResponse.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 { Environment } from "./Environment"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response containing an environment. + */ +export class EnvironmentResponse { + /** + * A feature flag environment resource. + */ + "data": Environment; + + /** + * 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: "Environment", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return EnvironmentResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/EnvironmentsPaginationMeta.ts b/packages/datadog-api-client-v2/models/EnvironmentsPaginationMeta.ts new file mode 100644 index 000000000000..64728113d84d --- /dev/null +++ b/packages/datadog-api-client-v2/models/EnvironmentsPaginationMeta.ts @@ -0,0 +1,50 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { EnvironmentsPaginationMetaPage } from "./EnvironmentsPaginationMetaPage"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Pagination metadata for environments. + */ +export class EnvironmentsPaginationMeta { + "page"?: EnvironmentsPaginationMetaPage; + + /** + * 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: "EnvironmentsPaginationMetaPage", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return EnvironmentsPaginationMeta.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/EnvironmentsPaginationMetaPage.ts b/packages/datadog-api-client-v2/models/EnvironmentsPaginationMetaPage.ts new file mode 100644 index 000000000000..6e36befe4e4f --- /dev/null +++ b/packages/datadog-api-client-v2/models/EnvironmentsPaginationMetaPage.ts @@ -0,0 +1,59 @@ +/** + * 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"; + +export class EnvironmentsPaginationMetaPage { + /** + * Total number of items. + */ + "totalCount"?: number; + /** + * Total number of items matching the filter. + */ + "totalFilteredCount"?: 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 = { + totalCount: { + baseName: "total_count", + type: "number", + format: "int64", + }, + totalFilteredCount: { + baseName: "total_filtered_count", + type: "number", + format: "int64", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return EnvironmentsPaginationMetaPage.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/FeatureFlag.ts b/packages/datadog-api-client-v2/models/FeatureFlag.ts new file mode 100644 index 000000000000..88a3087b8c5c --- /dev/null +++ b/packages/datadog-api-client-v2/models/FeatureFlag.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 { CreateFeatureFlagDataType } from "./CreateFeatureFlagDataType"; +import { FeatureFlagAttributes } from "./FeatureFlagAttributes"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * A feature flag resource. + */ +export class FeatureFlag { + /** + * Attributes of a feature flag. + */ + "attributes": FeatureFlagAttributes; + /** + * The unique identifier of the feature flag. + */ + "id": string; + /** + * The resource type. + */ + "type": CreateFeatureFlagDataType; + + /** + * 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: "FeatureFlagAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + type: { + baseName: "type", + type: "CreateFeatureFlagDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FeatureFlag.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/FeatureFlagAttributes.ts b/packages/datadog-api-client-v2/models/FeatureFlagAttributes.ts new file mode 100644 index 000000000000..40c651521c8b --- /dev/null +++ b/packages/datadog-api-client-v2/models/FeatureFlagAttributes.ts @@ -0,0 +1,169 @@ +/** + * 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 { FeatureFlagEnvironment } from "./FeatureFlagEnvironment"; +import { ValueType } from "./ValueType"; +import { Variant } from "./Variant"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of a feature flag. + */ +export class FeatureFlagAttributes { + /** + * The timestamp when the feature flag was archived. + */ + "archivedAt"?: Date; + /** + * The timestamp when the feature flag was created. + */ + "createdAt"?: Date; + /** + * The ID of the user who created the feature flag. + */ + "createdBy"?: string; + /** + * The description of the feature flag. + */ + "description": string; + /** + * Distribution channel for the feature flag. + */ + "distributionChannel"?: string; + /** + * Environment-specific settings for the feature flag. + */ + "featureFlagEnvironments"?: Array; + /** + * JSON schema for validation when value_type is JSON. + */ + "jsonSchema"?: string; + /** + * The unique key of the feature flag. + */ + "key": string; + /** + * The ID of the user who last updated the feature flag. + */ + "lastUpdatedBy"?: string; + /** + * The name of the feature flag. + */ + "name": string; + /** + * Indicates whether this feature flag requires approval for changes. + */ + "requireApproval"?: boolean; + /** + * The timestamp when the feature flag was last updated. + */ + "updatedAt"?: Date; + /** + * The type of values for the feature flag variants. + */ + "valueType": ValueType; + /** + * The variants of the feature flag. + */ + "variants": 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 = { + archivedAt: { + baseName: "archived_at", + type: "Date", + format: "date-time", + }, + createdAt: { + baseName: "created_at", + type: "Date", + format: "date-time", + }, + createdBy: { + baseName: "created_by", + type: "string", + format: "uuid", + }, + description: { + baseName: "description", + type: "string", + required: true, + }, + distributionChannel: { + baseName: "distribution_channel", + type: "string", + }, + featureFlagEnvironments: { + baseName: "feature_flag_environments", + type: "Array", + }, + jsonSchema: { + baseName: "json_schema", + type: "string", + }, + key: { + baseName: "key", + type: "string", + required: true, + }, + lastUpdatedBy: { + baseName: "last_updated_by", + type: "string", + format: "uuid", + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + requireApproval: { + baseName: "require_approval", + type: "boolean", + }, + updatedAt: { + baseName: "updated_at", + type: "Date", + format: "date-time", + }, + valueType: { + baseName: "value_type", + type: "ValueType", + required: true, + }, + variants: { + baseName: "variants", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FeatureFlagAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/FeatureFlagEnvironment.ts b/packages/datadog-api-client-v2/models/FeatureFlagEnvironment.ts new file mode 100644 index 000000000000..4f7409d3fba6 --- /dev/null +++ b/packages/datadog-api-client-v2/models/FeatureFlagEnvironment.ts @@ -0,0 +1,153 @@ +/** + * 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 { FeatureFlagStatus } from "./FeatureFlagStatus"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Environment-specific settings for a feature flag. + */ +export class FeatureFlagEnvironment { + /** + * Allocation metadata for this environment. + */ + "allocations"?: { [key: string]: any }; + /** + * The allocation key used for the default variant. + */ + "defaultAllocationKey"?: string; + /** + * The ID of the default variant for this environment. + */ + "defaultVariantId"?: string; + /** + * The ID of the environment. + */ + "environmentId": string; + /** + * The name of the environment. + */ + "environmentName"?: string; + /** + * Indicates whether the environment is production. + */ + "isProduction"?: boolean; + /** + * The allocation key used for the override variant. + */ + "overrideAllocationKey"?: string; + /** + * The ID of the override variant for this environment. + */ + "overrideVariantId"?: string; + /** + * Pending suggestion identifier, if approval is required. + */ + "pendingSuggestionId"?: string; + /** + * Indicates whether feature flag changes require approval in this environment. + */ + "requireFeatureFlagApproval"?: boolean; + /** + * Rollout percentage for this environment. + */ + "rolloutPercentage"?: number; + /** + * Environment targeting rules for this feature flag. + */ + "rules"?: Array<{ [key: string]: any }>; + /** + * The status of a feature flag in an environment. + */ + "status": FeatureFlagStatus; + + /** + * 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 = { + allocations: { + baseName: "allocations", + type: "{ [key: string]: any; }", + }, + defaultAllocationKey: { + baseName: "default_allocation_key", + type: "string", + }, + defaultVariantId: { + baseName: "default_variant_id", + type: "string", + }, + environmentId: { + baseName: "environment_id", + type: "string", + required: true, + format: "uuid", + }, + environmentName: { + baseName: "environment_name", + type: "string", + }, + isProduction: { + baseName: "is_production", + type: "boolean", + }, + overrideAllocationKey: { + baseName: "override_allocation_key", + type: "string", + }, + overrideVariantId: { + baseName: "override_variant_id", + type: "string", + }, + pendingSuggestionId: { + baseName: "pending_suggestion_id", + type: "string", + }, + requireFeatureFlagApproval: { + baseName: "require_feature_flag_approval", + type: "boolean", + }, + rolloutPercentage: { + baseName: "rollout_percentage", + type: "number", + format: "int64", + }, + rules: { + baseName: "rules", + type: "Array<{ [key: string]: any; }>", + }, + status: { + baseName: "status", + type: "FeatureFlagStatus", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FeatureFlagEnvironment.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/FeatureFlagResponse.ts b/packages/datadog-api-client-v2/models/FeatureFlagResponse.ts new file mode 100644 index 000000000000..e72fbd90211e --- /dev/null +++ b/packages/datadog-api-client-v2/models/FeatureFlagResponse.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 { FeatureFlag } from "./FeatureFlag"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response containing a feature flag. + */ +export class FeatureFlagResponse { + /** + * A feature flag resource. + */ + "data": FeatureFlag; + + /** + * 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: "FeatureFlag", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FeatureFlagResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/FeatureFlagStatus.ts b/packages/datadog-api-client-v2/models/FeatureFlagStatus.ts new file mode 100644 index 000000000000..4d14897eb74b --- /dev/null +++ b/packages/datadog-api-client-v2/models/FeatureFlagStatus.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 feature flag in an environment. + */ + +export type FeatureFlagStatus = + | typeof ENABLED + | typeof DISABLED + | UnparsedObject; +export const ENABLED = "ENABLED"; +export const DISABLED = "DISABLED"; diff --git a/packages/datadog-api-client-v2/models/FeatureFlagsPaginationMeta.ts b/packages/datadog-api-client-v2/models/FeatureFlagsPaginationMeta.ts new file mode 100644 index 000000000000..d5caae0a088d --- /dev/null +++ b/packages/datadog-api-client-v2/models/FeatureFlagsPaginationMeta.ts @@ -0,0 +1,50 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { FeatureFlagsPaginationMetaPage } from "./FeatureFlagsPaginationMetaPage"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Pagination metadata for feature flags. + */ +export class FeatureFlagsPaginationMeta { + "page"?: FeatureFlagsPaginationMetaPage; + + /** + * 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: "FeatureFlagsPaginationMetaPage", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FeatureFlagsPaginationMeta.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/FeatureFlagsPaginationMetaPage.ts b/packages/datadog-api-client-v2/models/FeatureFlagsPaginationMetaPage.ts new file mode 100644 index 000000000000..6fd34a85aa03 --- /dev/null +++ b/packages/datadog-api-client-v2/models/FeatureFlagsPaginationMetaPage.ts @@ -0,0 +1,59 @@ +/** + * 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"; + +export class FeatureFlagsPaginationMetaPage { + /** + * Total number of items. + */ + "totalCount"?: number; + /** + * Total number of items matching the filter. + */ + "totalFilteredCount"?: 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 = { + totalCount: { + baseName: "total_count", + type: "number", + format: "int64", + }, + totalFilteredCount: { + baseName: "total_filtered_count", + type: "number", + format: "int64", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return FeatureFlagsPaginationMetaPage.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ListEnvironmentsResponse.ts b/packages/datadog-api-client-v2/models/ListEnvironmentsResponse.ts new file mode 100644 index 000000000000..e37cdce73032 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ListEnvironmentsResponse.ts @@ -0,0 +1,63 @@ +/** + * 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 { Environment } from "./Environment"; +import { EnvironmentsPaginationMeta } from "./EnvironmentsPaginationMeta"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response containing a list of environments. + */ +export class ListEnvironmentsResponse { + /** + * List of environments. + */ + "data": Array; + /** + * Pagination metadata for environments. + */ + "meta"?: EnvironmentsPaginationMeta; + + /** + * 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: "EnvironmentsPaginationMeta", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ListEnvironmentsResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ListFeatureFlagsResponse.ts b/packages/datadog-api-client-v2/models/ListFeatureFlagsResponse.ts new file mode 100644 index 000000000000..c57267e789e3 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ListFeatureFlagsResponse.ts @@ -0,0 +1,63 @@ +/** + * 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 { FeatureFlag } from "./FeatureFlag"; +import { FeatureFlagsPaginationMeta } from "./FeatureFlagsPaginationMeta"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response containing a list of feature flags. + */ +export class ListFeatureFlagsResponse { + /** + * List of feature flags. + */ + "data": Array; + /** + * Pagination metadata for feature flags. + */ + "meta"?: FeatureFlagsPaginationMeta; + + /** + * 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: "FeatureFlagsPaginationMeta", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ListFeatureFlagsResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ObjectSerializer.ts b/packages/datadog-api-client-v2/models/ObjectSerializer.ts index e246c4a33d91..425837e5d499 100644 --- a/packages/datadog-api-client-v2/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v2/models/ObjectSerializer.ts @@ -674,6 +674,12 @@ import { CreateDeploymentRuleParams } from "./CreateDeploymentRuleParams"; import { CreateDeploymentRuleParamsData } from "./CreateDeploymentRuleParamsData"; import { CreateDeploymentRuleParamsDataAttributes } from "./CreateDeploymentRuleParamsDataAttributes"; import { CreateEmailNotificationChannelConfig } from "./CreateEmailNotificationChannelConfig"; +import { CreateEnvironmentAttributes } from "./CreateEnvironmentAttributes"; +import { CreateEnvironmentData } from "./CreateEnvironmentData"; +import { CreateEnvironmentRequest } from "./CreateEnvironmentRequest"; +import { CreateFeatureFlagAttributes } from "./CreateFeatureFlagAttributes"; +import { CreateFeatureFlagData } from "./CreateFeatureFlagData"; +import { CreateFeatureFlagRequest } from "./CreateFeatureFlagRequest"; import { CreateIncidentNotificationRuleRequest } from "./CreateIncidentNotificationRuleRequest"; import { CreateIncidentNotificationTemplateRequest } from "./CreateIncidentNotificationTemplateRequest"; import { CreateJiraIssueRequestArray } from "./CreateJiraIssueRequestArray"; @@ -743,6 +749,7 @@ import { CreateUploadResponse } from "./CreateUploadResponse"; import { CreateUploadResponseData } from "./CreateUploadResponseData"; import { CreateUploadResponseDataAttributes } from "./CreateUploadResponseDataAttributes"; import { CreateUserNotificationChannelRequest } from "./CreateUserNotificationChannelRequest"; +import { CreateVariant } from "./CreateVariant"; import { CreateWorkflowRequest } from "./CreateWorkflowRequest"; import { CreateWorkflowResponse } from "./CreateWorkflowResponse"; import { Creator } from "./Creator"; @@ -1069,6 +1076,11 @@ import { EntityV3ServiceSpec } from "./EntityV3ServiceSpec"; import { EntityV3System } from "./EntityV3System"; import { EntityV3SystemDatadog } from "./EntityV3SystemDatadog"; import { EntityV3SystemSpec } from "./EntityV3SystemSpec"; +import { Environment } from "./Environment"; +import { EnvironmentAttributes } from "./EnvironmentAttributes"; +import { EnvironmentResponse } from "./EnvironmentResponse"; +import { EnvironmentsPaginationMeta } from "./EnvironmentsPaginationMeta"; +import { EnvironmentsPaginationMetaPage } from "./EnvironmentsPaginationMetaPage"; import { ErrorHandler } from "./ErrorHandler"; import { Escalation } from "./Escalation"; import { EscalationPolicy } from "./EscalationPolicy"; @@ -1160,6 +1172,12 @@ import { FastlyServiceData } from "./FastlyServiceData"; import { FastlyServiceRequest } from "./FastlyServiceRequest"; import { FastlyServiceResponse } from "./FastlyServiceResponse"; import { FastlyServicesResponse } from "./FastlyServicesResponse"; +import { FeatureFlag } from "./FeatureFlag"; +import { FeatureFlagAttributes } from "./FeatureFlagAttributes"; +import { FeatureFlagEnvironment } from "./FeatureFlagEnvironment"; +import { FeatureFlagResponse } from "./FeatureFlagResponse"; +import { FeatureFlagsPaginationMeta } from "./FeatureFlagsPaginationMeta"; +import { FeatureFlagsPaginationMetaPage } from "./FeatureFlagsPaginationMetaPage"; import { FiltersPerProduct } from "./FiltersPerProduct"; import { Finding } from "./Finding"; import { FindingAttributes } from "./FindingAttributes"; @@ -1757,6 +1775,8 @@ import { ListDevicesResponseMetadataPage } from "./ListDevicesResponseMetadataPa import { ListDowntimesResponse } from "./ListDowntimesResponse"; import { ListEntityCatalogResponse } from "./ListEntityCatalogResponse"; import { ListEntityCatalogResponseLinks } from "./ListEntityCatalogResponseLinks"; +import { ListEnvironmentsResponse } from "./ListEnvironmentsResponse"; +import { ListFeatureFlagsResponse } from "./ListFeatureFlagsResponse"; import { ListFindingsMeta } from "./ListFindingsMeta"; import { ListFindingsPage } from "./ListFindingsPage"; import { ListFindingsResponse } from "./ListFindingsResponse"; @@ -3333,6 +3353,12 @@ import { UpdateDeploymentGateParamsDataAttributes } from "./UpdateDeploymentGate import { UpdateDeploymentRuleParams } from "./UpdateDeploymentRuleParams"; import { UpdateDeploymentRuleParamsData } from "./UpdateDeploymentRuleParamsData"; import { UpdateDeploymentRuleParamsDataAttributes } from "./UpdateDeploymentRuleParamsDataAttributes"; +import { UpdateEnvironmentAttributes } from "./UpdateEnvironmentAttributes"; +import { UpdateEnvironmentData } from "./UpdateEnvironmentData"; +import { UpdateEnvironmentRequest } from "./UpdateEnvironmentRequest"; +import { UpdateFeatureFlagAttributes } from "./UpdateFeatureFlagAttributes"; +import { UpdateFeatureFlagData } from "./UpdateFeatureFlagData"; +import { UpdateFeatureFlagRequest } from "./UpdateFeatureFlagRequest"; import { UpdateFlakyTestsRequest } from "./UpdateFlakyTestsRequest"; import { UpdateFlakyTestsRequestAttributes } from "./UpdateFlakyTestsRequestAttributes"; import { UpdateFlakyTestsRequestData } from "./UpdateFlakyTestsRequestData"; @@ -3428,6 +3454,7 @@ import { V2EventResponse } from "./V2EventResponse"; import { ValidationError } from "./ValidationError"; import { ValidationErrorMeta } from "./ValidationErrorMeta"; import { ValidationResponse } from "./ValidationResponse"; +import { Variant } from "./Variant"; import { VersionHistoryUpdate } from "./VersionHistoryUpdate"; import { ViewershipHistorySessionArray } from "./ViewershipHistorySessionArray"; import { ViewershipHistorySessionData } from "./ViewershipHistorySessionData"; @@ -3859,6 +3886,8 @@ const enumsMap: { [key: string]: any[] } = { "monitoring", "resolved", ], + CreateEnvironmentDataType: ["environments"], + CreateFeatureFlagDataType: ["feature-flags"], CreatePageRequestDataType: ["pages"], CreatePageResponseDataType: ["pages"], CreateRulesetRequestDataType: ["create_ruleset"], @@ -4031,6 +4060,7 @@ const enumsMap: { [key: string]: any[] } = { FastlyAccountType: ["fastly-accounts"], FastlyIntegrationType: ["Fastly"], FastlyServiceType: ["fastly-services"], + FeatureFlagStatus: ["ENABLED", "DISABLED"], FindingDataType: ["findings"], FindingEvaluation: ["pass", "fail"], FindingMuteReason: [ @@ -5360,6 +5390,8 @@ const enumsMap: { [key: string]: any[] } = { UCConfigPairDataType: ["azure_uc_configs"], UpdateAppsDatastoreItemRequestDataType: ["items"], UpdateConnectionRequestDataType: ["connection_id"], + UpdateEnvironmentDataType: ["environments"], + UpdateFeatureFlagDataType: ["feature-flags"], UpdateFlakyTestsRequestDataType: ["update_flaky_test_state_request"], UpdateFlakyTestsRequestTestNewState: [ "active", @@ -5384,6 +5416,7 @@ const enumsMap: { [key: string]: any[] } = { UserTeamType: ["team_memberships"], UserTeamUserType: ["users"], UsersType: ["users"], + ValueType: ["BOOLEAN", "INTEGER", "NUMERIC", "STRING", "JSON"], VersionHistoryUpdateType: ["create", "update", "delete"], ViewershipHistorySessionDataType: ["rum_replay_session"], VirusTotalAPIKeyType: ["VirusTotalAPIKey"], @@ -6301,6 +6334,12 @@ const typeMap: { [index: string]: any } = { CreateDeploymentRuleParamsDataAttributes: CreateDeploymentRuleParamsDataAttributes, CreateEmailNotificationChannelConfig: CreateEmailNotificationChannelConfig, + CreateEnvironmentAttributes: CreateEnvironmentAttributes, + CreateEnvironmentData: CreateEnvironmentData, + CreateEnvironmentRequest: CreateEnvironmentRequest, + CreateFeatureFlagAttributes: CreateFeatureFlagAttributes, + CreateFeatureFlagData: CreateFeatureFlagData, + CreateFeatureFlagRequest: CreateFeatureFlagRequest, CreateIncidentNotificationRuleRequest: CreateIncidentNotificationRuleRequest, CreateIncidentNotificationTemplateRequest: CreateIncidentNotificationTemplateRequest, @@ -6395,6 +6434,7 @@ const typeMap: { [index: string]: any } = { CreateUploadResponseData: CreateUploadResponseData, CreateUploadResponseDataAttributes: CreateUploadResponseDataAttributes, CreateUserNotificationChannelRequest: CreateUserNotificationChannelRequest, + CreateVariant: CreateVariant, CreateWorkflowRequest: CreateWorkflowRequest, CreateWorkflowResponse: CreateWorkflowResponse, Creator: Creator, @@ -6782,6 +6822,11 @@ const typeMap: { [index: string]: any } = { EntityV3System: EntityV3System, EntityV3SystemDatadog: EntityV3SystemDatadog, EntityV3SystemSpec: EntityV3SystemSpec, + Environment: Environment, + EnvironmentAttributes: EnvironmentAttributes, + EnvironmentResponse: EnvironmentResponse, + EnvironmentsPaginationMeta: EnvironmentsPaginationMeta, + EnvironmentsPaginationMetaPage: EnvironmentsPaginationMetaPage, ErrorHandler: ErrorHandler, Escalation: Escalation, EscalationPolicy: EscalationPolicy, @@ -6888,6 +6933,12 @@ const typeMap: { [index: string]: any } = { FastlyServiceRequest: FastlyServiceRequest, FastlyServiceResponse: FastlyServiceResponse, FastlyServicesResponse: FastlyServicesResponse, + FeatureFlag: FeatureFlag, + FeatureFlagAttributes: FeatureFlagAttributes, + FeatureFlagEnvironment: FeatureFlagEnvironment, + FeatureFlagResponse: FeatureFlagResponse, + FeatureFlagsPaginationMeta: FeatureFlagsPaginationMeta, + FeatureFlagsPaginationMetaPage: FeatureFlagsPaginationMetaPage, FiltersPerProduct: FiltersPerProduct, Finding: Finding, FindingAttributes: FindingAttributes, @@ -7558,6 +7609,8 @@ const typeMap: { [index: string]: any } = { ListDowntimesResponse: ListDowntimesResponse, ListEntityCatalogResponse: ListEntityCatalogResponse, ListEntityCatalogResponseLinks: ListEntityCatalogResponseLinks, + ListEnvironmentsResponse: ListEnvironmentsResponse, + ListFeatureFlagsResponse: ListFeatureFlagsResponse, ListFindingsMeta: ListFindingsMeta, ListFindingsPage: ListFindingsPage, ListFindingsResponse: ListFindingsResponse, @@ -9509,6 +9562,12 @@ const typeMap: { [index: string]: any } = { UpdateDeploymentRuleParamsData: UpdateDeploymentRuleParamsData, UpdateDeploymentRuleParamsDataAttributes: UpdateDeploymentRuleParamsDataAttributes, + UpdateEnvironmentAttributes: UpdateEnvironmentAttributes, + UpdateEnvironmentData: UpdateEnvironmentData, + UpdateEnvironmentRequest: UpdateEnvironmentRequest, + UpdateFeatureFlagAttributes: UpdateFeatureFlagAttributes, + UpdateFeatureFlagData: UpdateFeatureFlagData, + UpdateFeatureFlagRequest: UpdateFeatureFlagRequest, UpdateFlakyTestsRequest: UpdateFlakyTestsRequest, UpdateFlakyTestsRequestAttributes: UpdateFlakyTestsRequestAttributes, UpdateFlakyTestsRequestData: UpdateFlakyTestsRequestData, @@ -9620,6 +9679,7 @@ const typeMap: { [index: string]: any } = { ValidationError: ValidationError, ValidationErrorMeta: ValidationErrorMeta, ValidationResponse: ValidationResponse, + Variant: Variant, VersionHistoryUpdate: VersionHistoryUpdate, ViewershipHistorySessionArray: ViewershipHistorySessionArray, ViewershipHistorySessionData: ViewershipHistorySessionData, diff --git a/packages/datadog-api-client-v2/models/UpdateEnvironmentAttributes.ts b/packages/datadog-api-client-v2/models/UpdateEnvironmentAttributes.ts new file mode 100644 index 000000000000..20afe740bdfd --- /dev/null +++ b/packages/datadog-api-client-v2/models/UpdateEnvironmentAttributes.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"; + +/** + * Attributes for updating an environment. + */ +export class UpdateEnvironmentAttributes { + /** + * Indicates whether this is a production environment. + */ + "isProduction"?: boolean; + /** + * The name of the environment. + */ + "name"?: string; + /** + * List of queries to define the environment scope. + */ + "queries"?: Array; + /** + * Indicates whether feature flag changes require approval in this environment. + */ + "requireFeatureFlagApproval"?: boolean; + + /** + * 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 = { + isProduction: { + baseName: "is_production", + type: "boolean", + }, + name: { + baseName: "name", + type: "string", + }, + queries: { + baseName: "queries", + type: "Array", + }, + requireFeatureFlagApproval: { + baseName: "require_feature_flag_approval", + type: "boolean", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return UpdateEnvironmentAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/UpdateEnvironmentData.ts b/packages/datadog-api-client-v2/models/UpdateEnvironmentData.ts new file mode 100644 index 000000000000..44f720b7cffb --- /dev/null +++ b/packages/datadog-api-client-v2/models/UpdateEnvironmentData.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 { UpdateEnvironmentAttributes } from "./UpdateEnvironmentAttributes"; +import { UpdateEnvironmentDataType } from "./UpdateEnvironmentDataType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Data for updating an environment. + */ +export class UpdateEnvironmentData { + /** + * Attributes for updating an environment. + */ + "attributes": UpdateEnvironmentAttributes; + /** + * The resource type. + */ + "type": UpdateEnvironmentDataType; + + /** + * 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: "UpdateEnvironmentAttributes", + required: true, + }, + type: { + baseName: "type", + type: "UpdateEnvironmentDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return UpdateEnvironmentData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/UpdateEnvironmentDataType.ts b/packages/datadog-api-client-v2/models/UpdateEnvironmentDataType.ts new file mode 100644 index 000000000000..f36a997c6c76 --- /dev/null +++ b/packages/datadog-api-client-v2/models/UpdateEnvironmentDataType.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 resource type. + */ + +export type UpdateEnvironmentDataType = typeof ENVIRONMENTS | UnparsedObject; +export const ENVIRONMENTS = "environments"; diff --git a/packages/datadog-api-client-v2/models/UpdateEnvironmentRequest.ts b/packages/datadog-api-client-v2/models/UpdateEnvironmentRequest.ts new file mode 100644 index 000000000000..1a33f185e79f --- /dev/null +++ b/packages/datadog-api-client-v2/models/UpdateEnvironmentRequest.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 { UpdateEnvironmentData } from "./UpdateEnvironmentData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Request to update an environment. + */ +export class UpdateEnvironmentRequest { + /** + * Data for updating an environment. + */ + "data": UpdateEnvironmentData; + + /** + * 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: "UpdateEnvironmentData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return UpdateEnvironmentRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/UpdateFeatureFlagAttributes.ts b/packages/datadog-api-client-v2/models/UpdateFeatureFlagAttributes.ts new file mode 100644 index 000000000000..0d9fe73b034c --- /dev/null +++ b/packages/datadog-api-client-v2/models/UpdateFeatureFlagAttributes.ts @@ -0,0 +1,68 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes for updating a feature flag. + */ +export class UpdateFeatureFlagAttributes { + /** + * The description of the feature flag. + */ + "description"?: string; + /** + * JSON schema for validation when value_type is JSON. + */ + "jsonSchema"?: string; + /** + * The name of the feature flag. + */ + "name"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + description: { + baseName: "description", + type: "string", + }, + jsonSchema: { + baseName: "json_schema", + type: "string", + }, + name: { + baseName: "name", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return UpdateFeatureFlagAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/UpdateFeatureFlagData.ts b/packages/datadog-api-client-v2/models/UpdateFeatureFlagData.ts new file mode 100644 index 000000000000..6a7622834109 --- /dev/null +++ b/packages/datadog-api-client-v2/models/UpdateFeatureFlagData.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 { UpdateFeatureFlagAttributes } from "./UpdateFeatureFlagAttributes"; +import { UpdateFeatureFlagDataType } from "./UpdateFeatureFlagDataType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Data for updating a feature flag. + */ +export class UpdateFeatureFlagData { + /** + * Attributes for updating a feature flag. + */ + "attributes": UpdateFeatureFlagAttributes; + /** + * The resource type. + */ + "type": UpdateFeatureFlagDataType; + + /** + * 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: "UpdateFeatureFlagAttributes", + required: true, + }, + type: { + baseName: "type", + type: "UpdateFeatureFlagDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return UpdateFeatureFlagData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/UpdateFeatureFlagDataType.ts b/packages/datadog-api-client-v2/models/UpdateFeatureFlagDataType.ts new file mode 100644 index 000000000000..cef142bf6897 --- /dev/null +++ b/packages/datadog-api-client-v2/models/UpdateFeatureFlagDataType.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 resource type. + */ + +export type UpdateFeatureFlagDataType = typeof FEATURE_FLAGS | UnparsedObject; +export const FEATURE_FLAGS = "feature-flags"; diff --git a/packages/datadog-api-client-v2/models/UpdateFeatureFlagRequest.ts b/packages/datadog-api-client-v2/models/UpdateFeatureFlagRequest.ts new file mode 100644 index 000000000000..a0108bafa975 --- /dev/null +++ b/packages/datadog-api-client-v2/models/UpdateFeatureFlagRequest.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 { UpdateFeatureFlagData } from "./UpdateFeatureFlagData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Request to update a feature flag. + */ +export class UpdateFeatureFlagRequest { + /** + * Data for updating a feature flag. + */ + "data": UpdateFeatureFlagData; + + /** + * 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: "UpdateFeatureFlagData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return UpdateFeatureFlagRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ValueType.ts b/packages/datadog-api-client-v2/models/ValueType.ts new file mode 100644 index 000000000000..917d60f2d083 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ValueType.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 values for the feature flag variants. + */ + +export type ValueType = + | typeof BOOLEAN + | typeof INTEGER + | typeof NUMERIC + | typeof STRING + | typeof JSON + | UnparsedObject; +export const BOOLEAN = "BOOLEAN"; +export const INTEGER = "INTEGER"; +export const NUMERIC = "NUMERIC"; +export const STRING = "STRING"; +export const JSON = "JSON"; diff --git a/packages/datadog-api-client-v2/models/Variant.ts b/packages/datadog-api-client-v2/models/Variant.ts new file mode 100644 index 000000000000..a4ea7c820230 --- /dev/null +++ b/packages/datadog-api-client-v2/models/Variant.ts @@ -0,0 +1,99 @@ +/** + * 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 variant of a feature flag. + */ +export class Variant { + /** + * The timestamp when the variant was created. + */ + "createdAt"?: Date; + /** + * The unique identifier of the variant. + */ + "id": string; + /** + * The unique key of the variant. + */ + "key": string; + /** + * The name of the variant. + */ + "name": string; + /** + * The timestamp when the variant was last updated. + */ + "updatedAt"?: Date; + /** + * The value of the variant as a string. + */ + "value": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + createdAt: { + baseName: "created_at", + type: "Date", + format: "date-time", + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + key: { + baseName: "key", + type: "string", + required: true, + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + updatedAt: { + baseName: "updated_at", + type: "Date", + format: "date-time", + }, + value: { + baseName: "value", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return Variant.attributeTypeMap; + } + + public constructor() {} +}