diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 79c3e338ffb0..0a5310b41d42 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -12266,6 +12266,349 @@ components: type: string x-enum-varnames: - CREATE_RULESET + CreateTableRequest: + description: The definition of `CreateTableRequest` object. + example: + data: + attributes: + description: this is a cloud table generated via a cloud bucket sync + file_metadata: + access_details: + aws_detail: + aws_account_id: test-account-id + aws_bucket_name: test-bucket + file_path: test_rt.csv + sync_enabled: true + schema: + fields: + - name: name + type: STRING + - name: account_id + type: STRING + primary_keys: + - account_id + source: S3 + table_name: test_reference_table + tags: + - test_tag + type: reference_table + properties: + data: + $ref: '#/components/schemas/CreateTableRequestData' + type: object + CreateTableRequestData: + description: The definition of `CreateTableRequestData` object. + properties: + attributes: + $ref: '#/components/schemas/CreateTableRequestDataAttributes' + id: + description: The ID of the reference table. + type: string + type: + $ref: '#/components/schemas/CreateTableRequestDataType' + required: + - type + type: object + CreateTableRequestDataAttributes: + description: The definition of `CreateTableRequestDataAttributes` object. + properties: + description: + description: The description of the reference table. + type: string + file_metadata: + $ref: '#/components/schemas/CreateTableRequestDataAttributesFileMetadata' + schema: + $ref: '#/components/schemas/CreateTableRequestDataAttributesSchema' + source: + $ref: '#/components/schemas/ReferenceTableCreateSourceType' + table_name: + description: The name of the reference table. + example: '' + type: string + tags: + description: The tags of the reference table. + items: + type: string + type: array + required: + - table_name + - schema + - source + type: object + CreateTableRequestDataAttributesFileMetadata: + description: The definition of `CreateTableRequestDataAttributesFileMetadata` + object. + oneOf: + - $ref: '#/components/schemas/CreateTableRequestDataAttributesFileMetadataCloudStorage' + - $ref: '#/components/schemas/CreateTableRequestDataAttributesFileMetadataLocalFile' + CreateTableRequestDataAttributesFileMetadataCloudStorage: + additionalProperties: false + description: Cloud storage file metadata for create requests. Both access_details + and sync_enabled are required. + properties: + access_details: + $ref: '#/components/schemas/CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails' + sync_enabled: + description: Whether this table is synced automatically. + example: false + type: boolean + required: + - access_details + - sync_enabled + title: CloudFileMetadataV2 + type: object + CreateTableRequestDataAttributesFileMetadataLocalFile: + additionalProperties: false + description: Local file metadata for create requests using upload ID. + properties: + upload_id: + description: The upload ID. + example: '' + type: string + required: + - upload_id + title: LocalFileMetadataV2 + type: object + CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails: + description: The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails` + object. + properties: + aws_detail: + $ref: '#/components/schemas/CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail' + azure_detail: + $ref: '#/components/schemas/CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail' + gcp_detail: + $ref: '#/components/schemas/CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail' + type: object + CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail: + description: The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail` + object. + properties: + aws_account_id: + description: The ID of the AWS account. + example: '123456789000' + type: string + aws_bucket_name: + description: The name of the AWS bucket. + example: example-data-bucket + type: string + file_path: + description: The relative file path from the S3 bucket root to the CSV file. + example: reference-tables/users.csv + type: string + required: + - aws_account_id + - aws_bucket_name + - file_path + type: object + x-oneOf-parent: + - AwsDetail + CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail: + description: The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail` + object. + properties: + azure_client_id: + description: The Azure client ID. + example: aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb + type: string + azure_container_name: + description: The name of the Azure container. + example: reference-data + type: string + azure_storage_account_name: + description: The name of the Azure storage account. + example: examplestorageaccount + type: string + azure_tenant_id: + description: The ID of the Azure tenant. + example: cccccccc-4444-5555-6666-dddddddddddd + type: string + file_path: + description: The relative file path from the Azure container root to the + CSV file. + example: tables/users.csv + type: string + required: + - azure_client_id + - azure_container_name + - azure_storage_account_name + - azure_tenant_id + - file_path + type: object + x-oneOf-parent: + - AzureDetail + CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail: + description: The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail` + object. + properties: + file_path: + description: The relative file path from the GCS bucket root to the CSV + file. + example: data/reference_tables/users.csv + type: string + gcp_bucket_name: + description: The name of the GCP bucket. + example: example-data-bucket + type: string + gcp_project_id: + description: The ID of the GCP project. + example: example-gcp-project-12345 + type: string + gcp_service_account_email: + description: The email of the GCP service account. + example: example-service@example-gcp-project-12345.iam.gserviceaccount.com + type: string + required: + - file_path + - gcp_bucket_name + - gcp_project_id + - gcp_service_account_email + type: object + x-oneOf-parent: + - GcpDetail + CreateTableRequestDataAttributesSchema: + description: The definition of `CreateTableRequestDataAttributesSchema` object. + properties: + fields: + description: The `schema` `fields`. + items: + $ref: '#/components/schemas/CreateTableRequestDataAttributesSchemaFieldsItems' + type: array + primary_keys: + description: List of field names that serve as primary keys for the table. + Currently only 1 primary key is supported, and it is used as an ID to + retrieve rows. + example: + - '' + items: + type: string + type: array + required: + - fields + - primary_keys + type: object + CreateTableRequestDataAttributesSchemaFieldsItems: + description: The definition of `CreateTableRequestDataAttributesSchemaFieldsItems` + object. + properties: + name: + description: The field name. + example: '' + type: string + type: + $ref: '#/components/schemas/ReferenceTableSchemaFieldType' + required: + - name + - type + type: object + CreateTableRequestDataType: + default: reference_table + description: Reference table resource type. + enum: + - reference_table + example: reference_table + type: string + x-enum-varnames: + - REFERENCE_TABLE + CreateUploadRequest: + description: The definition of `CreateUploadRequest` object. + properties: + data: + $ref: '#/components/schemas/CreateUploadRequestData' + type: object + CreateUploadRequestData: + description: The definition of `CreateUploadRequestData` object. + properties: + attributes: + $ref: '#/components/schemas/CreateUploadRequestDataAttributes' + id: + description: The ID of the upload. + type: string + type: + $ref: '#/components/schemas/CreateUploadRequestDataType' + required: + - type + type: object + CreateUploadRequestDataAttributes: + description: The definition of `CreateUploadRequestDataAttributes` object. + properties: + headers: + description: The headers of the file to upload. + example: + - '' + items: + type: string + type: array + part_count: + description: The number of parts in the upload. + example: 3 + format: int32 + maximum: 20 + type: integer + part_size: + description: The size of each part in the upload in bytes. For multi-part + uploads (part_count > 1), all parts except the last one must be at least + 5,000,000 bytes. For single-part uploads (part_count = 1), any size is + allowed. + example: 10000000 + format: int64 + type: integer + table_name: + description: The name of the reference table. + example: '' + type: string + required: + - headers + - table_name + - part_count + - part_size + type: object + CreateUploadRequestDataType: + default: upload + description: Upload resource type. + enum: + - upload + example: upload + type: string + x-enum-varnames: + - UPLOAD + CreateUploadResponse: + description: The definition of `CreateUploadResponse` object. + properties: + data: + $ref: '#/components/schemas/CreateUploadResponseData' + type: object + CreateUploadResponseData: + description: The definition of `CreateUploadResponseData` object. + properties: + attributes: + $ref: '#/components/schemas/CreateUploadResponseDataAttributes' + id: + description: The ID of the upload. + type: string + type: + $ref: '#/components/schemas/CreateUploadResponseDataType' + required: + - type + type: object + CreateUploadResponseDataAttributes: + description: The definition of `CreateUploadResponseDataAttributes` object. + properties: + part_urls: + description: The URLs of the parts in the upload. + items: + type: string + type: array + type: object + CreateUploadResponseDataType: + default: upload + description: Upload resource type. + enum: + - upload + example: upload + type: string + x-enum-varnames: + - UPLOAD CreateWorkflowRequest: description: A request object for creating a new workflow. example: @@ -35482,6 +35825,225 @@ components: version: $ref: '#/components/schemas/Version' type: object + PatchTableRequest: + description: The definition of `PatchTableRequest` object. + example: + data: + attributes: + description: this is a cloud table generated via a cloud bucket sync + file_metadata: + access_details: + aws_detail: + aws_account_id: test-account-id + aws_bucket_name: test-bucket + file_path: test_rt.csv + sync_enabled: true + schema: + fields: + - name: id + type: INT32 + - name: name + type: STRING + primary_keys: + - id + sync_enabled: false + tags: + - test_tag + id: 00000000-0000-0000-0000-000000000000 + type: reference_table + properties: + data: + $ref: '#/components/schemas/PatchTableRequestData' + type: object + PatchTableRequestData: + description: The definition of `PatchTableRequestData` object. + properties: + attributes: + $ref: '#/components/schemas/PatchTableRequestDataAttributes' + id: + description: The ID of the reference table. + type: string + type: + $ref: '#/components/schemas/PatchTableRequestDataType' + required: + - type + type: object + PatchTableRequestDataAttributes: + description: The definition of `PatchTableRequestDataAttributes` object. + properties: + description: + description: The description of the reference table. + type: string + file_metadata: + $ref: '#/components/schemas/PatchTableRequestDataAttributesFileMetadata' + schema: + $ref: '#/components/schemas/PatchTableRequestDataAttributesSchema' + sync_enabled: + description: Whether this table is synced automatically. + type: boolean + tags: + description: The tags of the reference table. + items: + type: string + type: array + type: object + PatchTableRequestDataAttributesFileMetadata: + description: The definition of `PatchTableRequestDataAttributesFileMetadata` + object. + oneOf: + - $ref: '#/components/schemas/PatchTableRequestDataAttributesFileMetadataCloudStorage' + - $ref: '#/components/schemas/PatchTableRequestDataAttributesFileMetadataLocalFile' + PatchTableRequestDataAttributesFileMetadataCloudStorage: + additionalProperties: false + description: Cloud storage file metadata for patch requests. Allows partial + updates of access_details and/or sync_enabled. + properties: + access_details: + $ref: '#/components/schemas/PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails' + sync_enabled: + description: Whether this table is synced automatically. + example: false + type: boolean + title: CloudFileMetadataV2 + type: object + PatchTableRequestDataAttributesFileMetadataLocalFile: + additionalProperties: false + description: Local file metadata for patch requests using upload ID. + properties: + upload_id: + description: The upload ID. + example: '' + type: string + required: + - upload_id + title: LocalFileMetadataV2 + type: object + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails: + description: The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails` + object. + properties: + aws_detail: + $ref: '#/components/schemas/PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail' + azure_detail: + $ref: '#/components/schemas/PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail' + gcp_detail: + $ref: '#/components/schemas/PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail' + type: object + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail: + description: The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail` + object. + properties: + aws_account_id: + description: The ID of the AWS account. + example: '123456789000' + type: string + aws_bucket_name: + description: The name of the AWS bucket. + example: example-data-bucket + type: string + file_path: + description: The relative file path from the S3 bucket root to the CSV file. + example: reference-tables/users.csv + type: string + type: object + x-oneOf-parent: + - AwsDetail + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail: + description: The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail` + object. + properties: + azure_client_id: + description: The Azure client ID. + example: aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb + type: string + azure_container_name: + description: The name of the Azure container. + example: reference-data + type: string + azure_storage_account_name: + description: The name of the Azure storage account. + example: examplestorageaccount + type: string + azure_tenant_id: + description: The ID of the Azure tenant. + example: cccccccc-4444-5555-6666-dddddddddddd + type: string + file_path: + description: The relative file path from the Azure container root to the + CSV file. + example: tables/users.csv + type: string + type: object + x-oneOf-parent: + - AzureDetail + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail: + description: The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail` + object. + properties: + file_path: + description: The relative file path from the GCS bucket root to the CSV + file. + example: data/reference_tables/users.csv + type: string + gcp_bucket_name: + description: The name of the GCP bucket. + example: example-data-bucket + type: string + gcp_project_id: + description: The ID of the GCP project. + example: example-gcp-project-12345 + type: string + gcp_service_account_email: + description: The email of the GCP service account. + example: example-service@example-gcp-project-12345.iam.gserviceaccount.com + type: string + type: object + x-oneOf-parent: + - GcpDetail + PatchTableRequestDataAttributesSchema: + description: The definition of `PatchTableRequestDataAttributesSchema` object. + properties: + fields: + description: The `schema` `fields`. + items: + $ref: '#/components/schemas/PatchTableRequestDataAttributesSchemaFieldsItems' + type: array + primary_keys: + description: List of field names that serve as primary keys for the table. + Currently only 1 primary key is supported, and it is used as an ID to + retrieve rows. + example: + - '' + items: + type: string + type: array + required: + - fields + - primary_keys + type: object + PatchTableRequestDataAttributesSchemaFieldsItems: + description: The definition of `PatchTableRequestDataAttributesSchemaFieldsItems` + object. + properties: + name: + description: The field name. + example: '' + type: string + type: + $ref: '#/components/schemas/ReferenceTableSchemaFieldType' + required: + - name + - type + type: object + PatchTableRequestDataType: + default: reference_table + description: Reference table resource type. + enum: + - reference_table + example: reference_table + type: string + x-enum-varnames: + - REFERENCE_TABLE Permission: description: Permission object. properties: @@ -37099,6 +37661,73 @@ components: type: string x-enum-varnames: - RECOMMENDATION + ReferenceTableCreateSourceType: + description: The source type for creating reference table data. Only these source + types can be created via this API. + enum: + - LOCAL_FILE + - S3 + - GCS + - AZURE + example: LOCAL_FILE + type: string + x-enum-varnames: + - LOCAL_FILE + - S3 + - GCS + - AZURE + ReferenceTableSchemaFieldType: + description: The field type for reference table schema fields. + enum: + - STRING + - INT32 + example: STRING + type: string + x-enum-varnames: + - STRING + - INT32 + ReferenceTableSortType: + default: -updated_at + description: Sort field and direction for reference tables. Use field name for + ascending, prefix with "-" for descending. + enum: + - updated_at + - table_name + - status + - -updated_at + - -table_name + - -status + type: string + x-enum-varnames: + - UPDATED_AT + - TABLE_NAME + - STATUS + - MINUS_UPDATED_AT + - MINUS_TABLE_NAME + - MINUS_STATUS + ReferenceTableSourceType: + description: The source type for reference table data. Includes all possible + source types that can appear in responses. + enum: + - LOCAL_FILE + - S3 + - GCS + - AZURE + - SERVICENOW + - SALESFORCE + - DATABRICKS + - SNOWFLAKE + example: LOCAL_FILE + type: string + x-enum-varnames: + - LOCAL_FILE + - S3 + - GCS + - AZURE + - SERVICENOW + - SALESFORCE + - DATABRICKS + - SNOWFLAKE RegisterAppKeyResponse: description: The response object after creating an app key registration. properties: @@ -47003,6 +47632,394 @@ components: format: double type: number type: object + TableResultV2: + description: The definition of `TableResultV2` object. + example: + data: + attributes: + created_by: 00000000-0000-0000-0000-000000000000 + description: example description + file_metadata: + access_details: {} + upload_id: 00000000-0000-0000-0000-000000000000 + last_updated_by: '' + row_count: 5 + schema: + fields: + - name: id + type: INT32 + - name: name + type: STRING + primary_keys: + - id + source: LOCAL_FILE + status: DONE + table_name: test_reference_table + tags: + - tag1 + - tag2 + updated_at: '2000-01-01T01:00:00+00:00' + id: 00000000-0000-0000-0000-000000000000 + type: reference_table + properties: + data: + $ref: '#/components/schemas/TableResultV2Data' + type: object + TableResultV2Array: + description: The definition of `TableResultV2Array` object. + example: + data: + - attributes: + created_by: 00000000-0000-0000-0000-000000000000 + description: example description + file_metadata: + access_details: {} + error_message: '' + error_row_count: 0 + upload_id: 00000000-0000-0000-0000-000000000000 + last_updated_by: '' + row_count: 5 + schema: + fields: + - name: id + type: INT32 + - name: name + type: STRING + primary_keys: + - id + source: LOCAL_FILE + status: DONE + table_name: test_reference_table + tags: + - tag1 + - tag2 + updated_at: '2000-01-01T01:00:00+00:00' + id: 00000000-0000-0000-0000-000000000000 + type: reference_table + - attributes: + created_by: 00000000-0000-0000-0000-000000000000 + description: example description + file_metadata: + access_details: + aws_detail: + aws_account_id: test-account-id + aws_bucket_name: test-bucket + file_path: test_rt.csv + error_message: '' + error_row_count: 0 + sync_enabled: true + last_updated_by: 00000000-0000-0000-0000-000000000000 + row_count: 5 + schema: + fields: + - name: location + type: STRING + - name: file_name + type: STRING + primary_keys: + - location + source: S3 + status: DONE + table_name: test_reference_table_2 + tags: + - test_tag1 + - tag2 + - '3' + updated_at: '2000-01-01T01:00:00+00:00' + id: 00000000-0000-0000-0000-000000000000 + type: reference_table + properties: + data: + description: The reference tables. + items: + $ref: '#/components/schemas/TableResultV2Data' + type: array + required: + - data + type: object + TableResultV2Data: + description: The definition of `TableResultV2Data` object. + properties: + attributes: + $ref: '#/components/schemas/TableResultV2DataAttributes' + id: + description: The ID of the reference table. + type: string + type: + $ref: '#/components/schemas/TableResultV2DataType' + required: + - type + type: object + TableResultV2DataAttributes: + description: The definition of `TableResultV2DataAttributes` object. + properties: + created_by: + description: UUID of the user who created the reference table. + type: string + description: + description: The description of the reference table. + type: string + file_metadata: + $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadata' + last_updated_by: + description: UUID of the user who last updated the reference table. + type: string + row_count: + description: The number of successfully processed rows in the reference + table. + format: int64 + type: integer + schema: + $ref: '#/components/schemas/TableResultV2DataAttributesSchema' + source: + $ref: '#/components/schemas/ReferenceTableSourceType' + status: + description: The status of the reference table. + type: string + table_name: + description: The name of the reference table. + type: string + tags: + description: The tags of the reference table. + items: + type: string + type: array + updated_at: + description: The timestamp of the last update to the reference table in + ISO 8601 format. + type: string + type: object + TableResultV2DataAttributesFileMetadata: + description: The definition of `TableResultV2DataAttributesFileMetadata` object. + oneOf: + - $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataCloudStorage' + - $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataLocalFile' + TableResultV2DataAttributesFileMetadataCloudStorage: + description: File metadata for reference tables created via cloud storage. + properties: + access_details: + $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataOneOfAccessDetails' + error_message: + description: The error message returned from the sync. + type: string + error_row_count: + description: The number of rows that failed to sync. + format: int64 + type: integer + error_type: + $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataCloudStorageErrorType' + sync_enabled: + description: Whether this table is synced automatically. + type: boolean + title: CloudFileMetadataV2 + type: object + TableResultV2DataAttributesFileMetadataCloudStorageErrorType: + description: The type of error that occurred during file processing. This field + provides high-level error categories for easier troubleshooting and is only + present when there are errors. + enum: + - TABLE_SCHEMA_ERROR + - FILE_FORMAT_ERROR + - CONFIGURATION_ERROR + - QUOTA_EXCEEDED + - CONFLICT_ERROR + - VALIDATION_ERROR + - STATE_ERROR + - OPERATION_ERROR + - SYSTEM_ERROR + type: string + x-enum-varnames: + - TABLE_SCHEMA_ERROR + - FILE_FORMAT_ERROR + - CONFIGURATION_ERROR + - QUOTA_EXCEEDED + - CONFLICT_ERROR + - VALIDATION_ERROR + - STATE_ERROR + - OPERATION_ERROR + - SYSTEM_ERROR + TableResultV2DataAttributesFileMetadataLocalFile: + description: File metadata for reference tables created via upload. + properties: + error_message: + description: The error message returned from the creation/update. + type: string + error_row_count: + description: The number of rows that failed to create/update. + format: int64 + type: integer + upload_id: + description: The upload ID that was used to create/update the table. + type: string + title: LocalFileMetadataV2 + type: object + TableResultV2DataAttributesFileMetadataOneOfAccessDetails: + description: The definition of `TableResultV2DataAttributesFileMetadataOneOfAccessDetails` + object. + properties: + aws_detail: + $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail' + azure_detail: + $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail' + gcp_detail: + $ref: '#/components/schemas/TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail' + type: object + TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail: + description: The definition of `TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail` + object. + properties: + aws_account_id: + description: The ID of the AWS account. + example: '123456789000' + type: string + aws_bucket_name: + description: The name of the AWS bucket. + example: example-data-bucket + type: string + file_path: + description: The relative file path from the S3 bucket root to the CSV file. + example: reference-tables/users.csv + type: string + type: object + x-oneOf-parent: + - AwsDetail + TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail: + description: The definition of `TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail` + object. + properties: + azure_client_id: + description: The Azure client ID. + example: aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb + type: string + azure_container_name: + description: The name of the Azure container. + example: reference-data + type: string + azure_storage_account_name: + description: The name of the Azure storage account. + example: examplestorageaccount + type: string + azure_tenant_id: + description: The ID of the Azure tenant. + example: cccccccc-4444-5555-6666-dddddddddddd + type: string + file_path: + description: The relative file path from the Azure container root to the + CSV file. + example: tables/users.csv + type: string + type: object + x-oneOf-parent: + - AzureDetail + TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail: + description: The definition of `TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail` + object. + properties: + file_path: + description: The relative file path from the GCS bucket root to the CSV + file. + example: data/reference_tables/users.csv + type: string + gcp_bucket_name: + description: The name of the GCP bucket. + example: example-data-bucket + type: string + gcp_project_id: + description: The ID of the GCP project. + example: example-gcp-project-12345 + type: string + gcp_service_account_email: + description: The email of the GCP service account. + example: example-service@example-gcp-project-12345.iam.gserviceaccount.com + type: string + type: object + x-oneOf-parent: + - GcpDetail + TableResultV2DataAttributesSchema: + description: The definition of `TableResultV2DataAttributesSchema` object. + properties: + fields: + description: The `schema` `fields`. + items: + $ref: '#/components/schemas/TableResultV2DataAttributesSchemaFieldsItems' + type: array + primary_keys: + description: List of field names that serve as primary keys for the table. + Currently only 1 primary key is supported, and it is used as an ID to + retrieve rows. + example: + - '' + items: + type: string + type: array + required: + - fields + - primary_keys + type: object + TableResultV2DataAttributesSchemaFieldsItems: + description: The definition of `TableResultV2DataAttributesSchemaFieldsItems` + object. + properties: + name: + description: The field name. + example: '' + type: string + type: + $ref: '#/components/schemas/ReferenceTableSchemaFieldType' + required: + - name + - type + type: object + TableResultV2DataType: + default: reference_table + description: Reference table resource type. + enum: + - reference_table + example: reference_table + type: string + x-enum-varnames: + - REFERENCE_TABLE + TableRowResourceArray: + description: The definition of `TableRowResourceArray` object. + properties: + data: + description: The rows. + items: + $ref: '#/components/schemas/TableRowResourceData' + type: array + required: + - data + type: object + TableRowResourceData: + description: The definition of `TableRowResourceData` object. + properties: + attributes: + $ref: '#/components/schemas/TableRowResourceDataAttributes' + id: + description: The ID of the row. + type: string + type: + $ref: '#/components/schemas/TableRowResourceDataType' + required: + - type + type: object + TableRowResourceDataAttributes: + description: The definition of `TableRowResourceDataAttributes` object. + properties: + values: + additionalProperties: {} + description: The values of the row. + type: object + type: object + TableRowResourceDataType: + default: row + description: Row resource type. + enum: + - row + example: row + type: string + x-enum-varnames: + - ROW TagFilter: description: Tag filter for the budget's entries. properties: @@ -66728,6 +67745,284 @@ paths: operator: OR permissions: - timeseries_query + /api/v2/reference-tables/tables: + get: + description: List all reference tables in this organization + operationId: ListTables + parameters: + - description: Number of tables to return + example: 15 + in: query + name: limit + required: false + schema: + default: 15 + format: int64 + maximum: 100 + minimum: 1 + type: integer + - description: Number of tables to skip for pagination + example: 0 + in: query + name: offset + required: false + schema: + default: 0 + format: int64 + minimum: 0 + type: integer + - description: Sort field and direction. Use field name for ascending, prefix + with "-" for descending + example: -updated_at + in: query + name: sort + required: false + schema: + $ref: '#/components/schemas/ReferenceTableSortType' + - description: Filter by table status + example: DONE + in: query + name: filter[status] + required: false + schema: + type: string + - description: Filter by exact table name match + example: my_reference_table + in: query + name: filter[table_name][exact] + required: false + schema: + type: string + - description: Filter by table name containing substring + example: user + in: query + name: filter[table_name][contains] + required: false + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TableResultV2Array' + description: OK + '403': + $ref: '#/components/responses/ForbiddenResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: List tables + tags: + - Reference Tables + post: + description: 'Create a new reference table. You can provide data in two ways: + 1) Call POST api/v2/reference-tables/upload first to get an upload ID, then + PUT chunks of CSV data to each provided URL, and finally call this POST endpoint + with the upload_id in file_metadata, OR 2) Provide access_details in file_metadata + pointing to a CSV file in cloud storage (AWS S3, Azure Blob, or GCP Cloud + Storage).' + operationId: CreateReferenceTable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateTableRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/TableResultV2' + description: Created + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Create reference table + tags: + - Reference Tables + /api/v2/reference-tables/tables/{id}: + delete: + description: Delete a reference table by ID + operationId: DeleteTable + parameters: + - description: The ID of the reference table to delete + in: path + name: id + required: true + schema: + type: string + responses: + '200': + description: OK + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Delete table + tags: + - Reference Tables + get: + description: Get a reference table by ID + operationId: GetTable + parameters: + - description: The ID of the reference table to retrieve + in: path + name: id + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TableResultV2' + description: OK + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get table + tags: + - Reference Tables + patch: + description: 'Update a reference table by ID. You can update the table''s data, + description, and tags. Note: The source type cannot be changed after table + creation. For data updates: For existing tables of type `source:LOCAL_FILE`, + call POST api/v2/reference-tables/uploads first to get an upload ID, then + PUT chunks of CSV data to each provided URL, and finally call this PATCH endpoint + with the upload_id in file_metadata. For existing tables of type `source: + S3, GCS, or AZURE`, provide updated access_details in file_metadata pointing + to a CSV file in the same type of cloud storage.' + operationId: UpdateReferenceTable + parameters: + - description: The ID of the reference table to update + in: path + name: id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchTableRequest' + required: true + responses: + '200': + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Update reference table + tags: + - Reference Tables + /api/v2/reference-tables/tables/{id}/rows: + get: + description: Get reference table rows by their primary key values. + operationId: GetRowsByID + parameters: + - description: The ID of the reference table + example: table-123 + in: path + name: id + required: true + schema: + type: string + - description: List of row IDs (primary key values) to retrieve from the reference + table + example: + - row1 + - row2 + explode: true + in: query + name: row_id + required: true + schema: + items: + type: string + type: array + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TableRowResourceArray' + description: Some or all requested rows were found. + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get rows by id + tags: + - Reference Tables + /api/v2/reference-tables/uploads: + post: + description: Create a reference table upload for bulk data ingestion + operationId: CreateReferenceTableUpload + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateUploadRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/CreateUploadResponse' + description: Created + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Create reference table upload + tags: + - Reference Tables /api/v2/remote_config/products/asm/waf/custom_rules: get: description: Retrieve a list of WAF custom rule. @@ -76923,6 +78218,8 @@ tags: aggregate your RUM events over HTTP. See the [RUM & Session Replay page](https://docs.datadoghq.com/real_user_monitoring/) for more information name: RUM +- description: Auto-generated tag Reference Tables + name: Reference Tables - description: 'A restriction policy defines the access control rules for a resource, mapping a set of relations diff --git a/cassettes/v2/Reference-Tables_3927075843/Create-reference-table-without-upload-or-access-details-returns-Bad-Request-response_3606109934/frozen.json b/cassettes/v2/Reference-Tables_3927075843/Create-reference-table-without-upload-or-access-details-returns-Bad-Request-response_3606109934/frozen.json new file mode 100644 index 000000000000..de727ed01bf8 --- /dev/null +++ b/cassettes/v2/Reference-Tables_3927075843/Create-reference-table-without-upload-or-access-details-returns-Bad-Request-response_3606109934/frozen.json @@ -0,0 +1 @@ +"2025-10-01T20:51:23.877Z" diff --git a/cassettes/v2/Reference-Tables_3927075843/Create-reference-table-without-upload-or-access-details-returns-Bad-Request-response_3606109934/recording.har b/cassettes/v2/Reference-Tables_3927075843/Create-reference-table-without-upload-or-access-details-returns-Bad-Request-response_3606109934/recording.har new file mode 100644 index 000000000000..2c24aea05aaa --- /dev/null +++ b/cassettes/v2/Reference-Tables_3927075843/Create-reference-table-without-upload-or-access-details-returns-Bad-Request-response_3606109934/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "Reference Tables/Create reference table without upload or access details returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "b227430e09eacae9d1cd62ee343d2443", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 371, + "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\":{\"description\":\"Test reference table without upload or access details\",\"schema\":{\"fields\":[{\"name\":\"id\",\"type\":\"STRING\"}],\"primary_keys\":[\"id\"]},\"source\":\"LOCAL_FILE\",\"table_name\":\"test_invalid_table_Test-Create_reference_table_without_upload_or_access_details_returns_Bad_Request_response-1759351883\",\"tags\":[\"test_tag\"]},\"type\":\"reference_table\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/reference-tables/tables" + }, + "response": { + "bodySize": 107, + "content": { + "mimeType": "application/vnd.api+json", + "size": 107, + "text": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"upload_id is required for tables with 'LOCAL_FILE' source\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 670, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2025-10-01T20:51:24.507Z", + "time": 129 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/features/v2/reference_tables.feature b/features/v2/reference_tables.feature new file mode 100644 index 000000000000..17e66019c052 --- /dev/null +++ b/features/v2/reference_tables.feature @@ -0,0 +1,121 @@ +@endpoint(reference-tables) @endpoint(reference-tables-v2) +Feature: Reference Tables + Auto-generated tag Reference Tables + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "ReferenceTables" API + + @generated @skip @team:DataDog/redapl-experiences + Scenario: Create reference table returns "Bad Request" response + Given new "CreateReferenceTable" request + And body with value {"data": {"attributes": {"description": "this is a cloud table generated via a cloud bucket sync", "file_metadata": {"access_details": {"aws_detail": {"aws_account_id": "test-account-id", "aws_bucket_name": "test-bucket", "file_path": "test_rt.csv"}}, "sync_enabled": true}, "schema": {"fields": [{"name": "name", "type": "STRING"}, {"name": "account_id", "type": "STRING"}], "primary_keys": ["account_id"]}, "source": "S3", "table_name": "test_reference_table", "tags": ["test_tag"]}, "type": "reference_table"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/redapl-experiences + Scenario: Create reference table returns "Created" response + Given new "CreateReferenceTable" request + And body with value {"data": {"attributes": {"description": "this is a cloud table generated via a cloud bucket sync", "file_metadata": {"access_details": {"aws_detail": {"aws_account_id": "test-account-id", "aws_bucket_name": "test-bucket", "file_path": "test_rt.csv"}}, "sync_enabled": true}, "schema": {"fields": [{"name": "name", "type": "STRING"}, {"name": "account_id", "type": "STRING"}], "primary_keys": ["account_id"]}, "source": "S3", "table_name": "test_reference_table", "tags": ["test_tag"]}, "type": "reference_table"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/redapl-experiences + Scenario: Create reference table upload returns "Bad Request" response + Given new "CreateReferenceTableUpload" request + And body with value {"data": {"attributes": {"headers": [""], "part_count": 3, "part_size": 10000000, "table_name": ""}, "type": "upload"}} + When the request is sent + Then the response status is 400 Bad Request + + @skip @team:DataDog/redapl-experiences + Scenario: Create reference table upload returns "Created" response + Given new "CreateReferenceTableUpload" request + And body with value {"data": {"attributes": {"headers": ["id", "name", "value"], "table_name": "test_upload_table_{{ unique }}", "part_count": 1, "part_size": 1024}, "type": "upload"}} + When the request is sent + Then the response status is 201 Created + And the response "data.type" is equal to "upload" + And the response "data.attributes.table_name" is equal to "test_upload_table_{{ unique }}" + + @skip @team:DataDog/redapl-experiences + Scenario: Create reference table with upload returns "Created" response + Given new "CreateReferenceTable" request + And body with value {"data": {"attributes": {"description": "Test reference table created via BDD test {{ unique }}", "source": "LOCAL_FILE", "file_metadata": {"upload_id": "test-upload-id-{{ unique }}"}, "schema": {"fields": [{"name": "id", "type": "STRING"}, {"name": "name", "type": "STRING"}, {"name": "value", "type": "INT32"}], "primary_keys": ["id"]}, "table_name": "test_reference_table_{{ unique }}", "tags": ["test_tag"]}, "type": "reference_table"}} + When the request is sent + Then the response status is 201 Created + And the response "data.type" is equal to "reference_table" + And the response "data.attributes.table_name" is equal to "test_reference_table_{{ unique }}" + + @team:DataDog/redapl-experiences + Scenario: Create reference table without upload or access details returns "Bad Request" response + Given new "CreateReferenceTable" request + And body with value {"data": {"attributes": {"description": "Test reference table without upload or access details", "source": "LOCAL_FILE", "schema": {"fields": [{"name": "id", "type": "STRING"}], "primary_keys": ["id"]}, "table_name": "test_invalid_table_{{ unique }}", "tags": ["test_tag"]}, "type": "reference_table"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/redapl-experiences + Scenario: Delete table returns "Not Found" response + Given new "DeleteTable" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/redapl-experiences + Scenario: Delete table returns "OK" response + Given new "DeleteTable" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/redapl-experiences + Scenario: Get rows by id returns "Not Found" response + Given new "GetRowsByID" request + And request contains "id" parameter from "REPLACE.ME" + And request contains "row_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/redapl-experiences + Scenario: Get rows by id returns "Some or all requested rows were found." response + Given new "GetRowsByID" request + And request contains "id" parameter from "REPLACE.ME" + And request contains "row_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 Some or all requested rows were found. + + @generated @skip @team:DataDog/redapl-experiences + Scenario: Get table returns "Not Found" response + Given new "GetTable" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/redapl-experiences + Scenario: Get table returns "OK" response + Given new "GetTable" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @skip @team:DataDog/redapl-experiences + Scenario: List tables returns "OK" response + Given new "ListTables" request + When the request is sent + Then the response status is 200 OK + And the response "data" has length 1 + + @generated @skip @team:DataDog/redapl-experiences + Scenario: Update reference table returns "Bad Request" response + Given new "UpdateReferenceTable" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"description": "this is a cloud table generated via a cloud bucket sync", "file_metadata": {"access_details": {"aws_detail": {"aws_account_id": "test-account-id", "aws_bucket_name": "test-bucket", "file_path": "test_rt.csv"}}, "sync_enabled": true}, "schema": {"fields": [{"name": "id", "type": "INT32"}, {"name": "name", "type": "STRING"}], "primary_keys": ["id"]}, "sync_enabled": false, "tags": ["test_tag"]}, "id": "00000000-0000-0000-0000-000000000000", "type": "reference_table"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/redapl-experiences + Scenario: Update reference table returns "OK" response + Given new "UpdateReferenceTable" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"description": "this is a cloud table generated via a cloud bucket sync", "file_metadata": {"access_details": {"aws_detail": {"aws_account_id": "test-account-id", "aws_bucket_name": "test-bucket", "file_path": "test_rt.csv"}}, "sync_enabled": true}, "schema": {"fields": [{"name": "id", "type": "INT32"}, {"name": "name", "type": "STRING"}], "primary_keys": ["id"]}, "sync_enabled": false, "tags": ["test_tag"]}, "id": "00000000-0000-0000-0000-000000000000", "type": "reference_table"}} + When the request is sent + Then the response status is 200 OK diff --git a/features/v2/undo.json b/features/v2/undo.json index c4c269d3cab9..f57ef9065135 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -2641,6 +2641,55 @@ "type": "idempotent" } }, + "ListTables": { + "tag": "Reference Tables", + "undo": { + "type": "safe" + } + }, + "CreateReferenceTable": { + "tag": "Reference Tables", + "undo": { + "operationId": "DeleteTable", + "parameters": [ + { + "name": "id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteTable": { + "tag": "Reference Tables", + "undo": { + "type": "idempotent" + } + }, + "GetTable": { + "tag": "Reference Tables", + "undo": { + "type": "safe" + } + }, + "UpdateReferenceTable": { + "tag": "Reference Tables", + "undo": { + "type": "idempotent" + } + }, + "GetRowsByID": { + "tag": "Reference Tables", + "undo": { + "type": "safe" + } + }, + "CreateReferenceTableUpload": { + "tag": "Reference Tables", + "undo": { + "type": "idempotent" + } + }, "ListApplicationSecurityWAFCustomRules": { "tag": "Application Security", "undo": { diff --git a/packages/datadog-api-client/README.md b/packages/datadog-api-client/README.md index 151dc7767b8d..b8c0824b1744 100644 --- a/packages/datadog-api-client/README.md +++ b/packages/datadog-api-client/README.md @@ -410,6 +410,7 @@ apiInstance | PagerDuty Integration | @datadog/datadog-api-client-pager-duty-integration | [README.md](../../services/pager-duty-integration/README.md) | | Powerpack | @datadog/datadog-api-client-powerpack | [README.md](../../services/powerpack/README.md) | | Processes | @datadog/datadog-api-client-processes | [README.md](../../services/processes/README.md) | +| Reference Tables | @datadog/datadog-api-client-reference-tables | [README.md](../../services/reference-tables/README.md) | | Restriction Policies | @datadog/datadog-api-client-restriction-policies | [README.md](../../services/restriction-policies/README.md) | | Roles | @datadog/datadog-api-client-roles | [README.md](../../services/roles/README.md) | | RUM | @datadog/datadog-api-client-rum | [README.md](../../services/rum/README.md) | diff --git a/private/bdd_runner/src/support/scenarios_model_mapping.ts b/private/bdd_runner/src/support/scenarios_model_mapping.ts index 0689e2fae8b9..69d3ae13153b 100644 --- a/private/bdd_runner/src/support/scenarios_model_mapping.ts +++ b/private/bdd_runner/src/support/scenarios_model_mapping.ts @@ -7248,6 +7248,83 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = { }, operationResponseType: "ProcessSummariesResponse", }, + "ReferenceTablesApi.V2.ListTables": { + limit: { + type: "number", + format: "int64", + }, + offset: { + type: "number", + format: "int64", + }, + sort: { + type: "ReferenceTableSortType", + format: "", + }, + filterStatus: { + type: "string", + format: "", + }, + filterTableNameExact: { + type: "string", + format: "", + }, + filterTableNameContains: { + type: "string", + format: "", + }, + operationResponseType: "TableResultV2Array", + }, + "ReferenceTablesApi.V2.CreateReferenceTable": { + body: { + type: "CreateTableRequest", + format: "", + }, + operationResponseType: "TableResultV2", + }, + "ReferenceTablesApi.V2.GetTable": { + id: { + type: "string", + format: "", + }, + operationResponseType: "TableResultV2", + }, + "ReferenceTablesApi.V2.DeleteTable": { + id: { + type: "string", + format: "", + }, + operationResponseType: "{}", + }, + "ReferenceTablesApi.V2.UpdateReferenceTable": { + id: { + type: "string", + format: "", + }, + body: { + type: "PatchTableRequest", + format: "", + }, + operationResponseType: "{}", + }, + "ReferenceTablesApi.V2.GetRowsByID": { + id: { + type: "string", + format: "", + }, + rowId: { + type: "Array", + format: "", + }, + operationResponseType: "TableRowResourceArray", + }, + "ReferenceTablesApi.V2.CreateReferenceTableUpload": { + body: { + type: "CreateUploadRequest", + format: "", + }, + operationResponseType: "CreateUploadResponse", + }, "ApplicationSecurityApi.V2.ListApplicationSecurityWAFCustomRules": { operationResponseType: "ApplicationSecurityWafCustomRuleListResponse", }, diff --git a/services/reference_tables/.yarnrc.yml b/services/reference_tables/.yarnrc.yml new file mode 100644 index 000000000000..3186f3f0795a --- /dev/null +++ b/services/reference_tables/.yarnrc.yml @@ -0,0 +1 @@ +nodeLinker: node-modules diff --git a/services/reference_tables/README.md b/services/reference_tables/README.md new file mode 100644 index 000000000000..ba2b402391c9 --- /dev/null +++ b/services/reference_tables/README.md @@ -0,0 +1,36 @@ +# @datadog/datadog-api-client-reference-tables + +## Description + +Auto-generated tag Reference Tables + +## Navigation + +- [Installation](#installation) +- [Getting Started](#getting-started) + +## Installation + +```sh +# NPM +npm install @datadog/datadog-api-client-reference-tables +# Yarn +yarn add @datadog/datadog-api-client-reference-tables +``` + +## Getting Started +```ts +import { createConfiguration } from "@datadog/datadog-api-client"; +import { ReferenceTablesApiV2 } from "@datadog/datadog-api-client-reference-tables"; +import { v2 } from "@datadog/datadog-api-client-reference-tables"; + +const configuration = createConfiguration(); +const apiInstance = new ReferenceTablesApiV2(configuration); +const params = {/* parameters */}; + +apiInstance.listTables(params).then((data) => { + console.log("API called successfully. Returned data: " + JSON.stringify(data)); +}).catch((error) => { + console.error("Error calling API: " + error); +}); +``` \ No newline at end of file diff --git a/services/reference_tables/package.json b/services/reference_tables/package.json new file mode 100644 index 000000000000..eac03a510f78 --- /dev/null +++ b/services/reference_tables/package.json @@ -0,0 +1,43 @@ +{ + "name": "@datadog/datadog-api-client-reference-tables", + "description": "", + "author": "", + "keywords": [ + "api", + "fetch", + "typescript" + ], + "license": "Apache-2.0", + "licenses": [ + { + "type": "Apache-2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0" + } + ], + "repository": { + "type": "git", + "url": "https://github.com/DataDog/datadog-api-client-typescript.git", + "directory": "services/reference-tables" + }, + "files": [ + "dist/**/*" + ], + "main": "./dist/index.js", + "typings": "./dist/index.d.ts", + "scripts": { + "prepack": "yarn workspace @datadog/datadog-api-client build && yarn build", + "build": "yarn generate-version-files && tsc", + "generate-version-files": "node -p \"'export const version = ' + JSON.stringify(require('./package.json').version)\" > src/version.ts" + }, + "dependencies": { + "@datadog/datadog-api-client": "^2.0.0-beta.0" + }, + "devDependencies": { + "typescript": "5.8.3" + }, + "engines": { + "node": ">=18.0.0" + }, + "version": "0.0.1", + "packageManager": "yarn@4.9.1" +} diff --git a/services/reference_tables/src/index.ts b/services/reference_tables/src/index.ts new file mode 100644 index 000000000000..ade268813b01 --- /dev/null +++ b/services/reference_tables/src/index.ts @@ -0,0 +1,3 @@ +export * as v2 from "./v2"; + +export { ReferenceTablesApi as ReferenceTablesApiV2 } from "./v2/ReferenceTablesApi"; diff --git a/services/reference_tables/src/v2/ReferenceTablesApi.ts b/services/reference_tables/src/v2/ReferenceTablesApi.ts new file mode 100644 index 000000000000..ccfc2d9a6de1 --- /dev/null +++ b/services/reference_tables/src/v2/ReferenceTablesApi.ts @@ -0,0 +1,1095 @@ +import { + ApiException, + BaseAPIRequestFactory, + BaseServerConfiguration, + buildUserAgent, + Configuration, + createConfiguration, + deserialize, + getPreferredMediaType, + HttpMethod, + isBrowser, + logger, + normalizeMediaType, + parse, + RequiredError, + RequestContext, + ResponseContext, + serialize, + ServerConfiguration, + stringify, + applySecurityAuthentication, +} from "@datadog/datadog-api-client"; + +import { TypingInfo } from "./models/TypingInfo"; +import { APIErrorResponse } from "./models/APIErrorResponse"; +import { CreateTableRequest } from "./models/CreateTableRequest"; +import { CreateUploadRequest } from "./models/CreateUploadRequest"; +import { CreateUploadResponse } from "./models/CreateUploadResponse"; +import { PatchTableRequest } from "./models/PatchTableRequest"; +import { ReferenceTableSortType } from "./models/ReferenceTableSortType"; +import { TableResultV2 } from "./models/TableResultV2"; +import { TableResultV2Array } from "./models/TableResultV2Array"; +import { TableRowResourceArray } from "./models/TableRowResourceArray"; +import { version } from "../version"; + +export class ReferenceTablesApiRequestFactory extends BaseAPIRequestFactory { + public userAgent: string | undefined; + + public constructor(configuration: Configuration) { + super(configuration); + if (!isBrowser) { + this.userAgent = buildUserAgent("reference-tables", version); + } + } + public async createReferenceTable( + body: CreateTableRequest, + _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", "createReferenceTable"); + } + + // Path Params + const localVarPath = "/api/v2/reference-tables/tables"; + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "ReferenceTablesApi.v2.createReferenceTable", + ReferenceTablesApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.POST, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Body Params + const contentType = getPreferredMediaType(["application/json"]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = stringify( + serialize(body, TypingInfo, "CreateTableRequest", ""), + contentType, + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async createReferenceTableUpload( + body: CreateUploadRequest, + _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", "createReferenceTableUpload"); + } + + // Path Params + const localVarPath = "/api/v2/reference-tables/uploads"; + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "ReferenceTablesApi.v2.createReferenceTableUpload", + ReferenceTablesApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.POST, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Body Params + const contentType = getPreferredMediaType(["application/json"]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = stringify( + serialize(body, TypingInfo, "CreateUploadRequest", ""), + contentType, + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async deleteTable( + id: string, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError("id", "deleteTable"); + } + + // Path Params + const localVarPath = "/api/v2/reference-tables/tables/{id}".replace( + "{id}", + encodeURIComponent(String(id)), + ); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "ReferenceTablesApi.v2.deleteTable", + ReferenceTablesApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.DELETE, + overrides, + ); + requestContext.setHeaderParam("Accept", "*/*"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async getRowsByID( + id: string, + rowId: Array, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError("id", "getRowsByID"); + } + + // verify required parameter 'rowId' is not null or undefined + if (rowId === null || rowId === undefined) { + throw new RequiredError("rowId", "getRowsByID"); + } + + // Path Params + const localVarPath = "/api/v2/reference-tables/tables/{id}/rows".replace( + "{id}", + encodeURIComponent(String(id)), + ); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "ReferenceTablesApi.v2.getRowsByID", + ReferenceTablesApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.GET, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Query Params + if (rowId !== undefined) { + requestContext.setQueryParam( + "row_id", + serialize(rowId, TypingInfo, "Array", ""), + "multi", + ); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async getTable( + id: string, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError("id", "getTable"); + } + + // Path Params + const localVarPath = "/api/v2/reference-tables/tables/{id}".replace( + "{id}", + encodeURIComponent(String(id)), + ); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "ReferenceTablesApi.v2.getTable", + ReferenceTablesApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.GET, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async listTables( + limit?: number, + offset?: number, + sort?: ReferenceTableSortType, + filterStatus?: string, + filterTableNameExact?: string, + filterTableNameContains?: string, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + // Path Params + const localVarPath = "/api/v2/reference-tables/tables"; + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "ReferenceTablesApi.v2.listTables", + ReferenceTablesApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.GET, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Query Params + if (limit !== undefined) { + requestContext.setQueryParam( + "limit", + serialize(limit, TypingInfo, "number", "int64"), + "", + ); + } + if (offset !== undefined) { + requestContext.setQueryParam( + "offset", + serialize(offset, TypingInfo, "number", "int64"), + "", + ); + } + if (sort !== undefined) { + requestContext.setQueryParam( + "sort", + serialize(sort, TypingInfo, "ReferenceTableSortType", ""), + "", + ); + } + if (filterStatus !== undefined) { + requestContext.setQueryParam( + "filter[status]", + serialize(filterStatus, TypingInfo, "string", ""), + "", + ); + } + if (filterTableNameExact !== undefined) { + requestContext.setQueryParam( + "filter[table_name][exact]", + serialize(filterTableNameExact, TypingInfo, "string", ""), + "", + ); + } + if (filterTableNameContains !== undefined) { + requestContext.setQueryParam( + "filter[table_name][contains]", + serialize(filterTableNameContains, TypingInfo, "string", ""), + "", + ); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async updateReferenceTable( + id: string, + body: PatchTableRequest, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError("id", "updateReferenceTable"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateReferenceTable"); + } + + // Path Params + const localVarPath = "/api/v2/reference-tables/tables/{id}".replace( + "{id}", + encodeURIComponent(String(id)), + ); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "ReferenceTablesApi.v2.updateReferenceTable", + ReferenceTablesApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.PATCH, + overrides, + ); + requestContext.setHeaderParam("Accept", "*/*"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Body Params + const contentType = getPreferredMediaType(["application/json"]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = stringify( + serialize(body, TypingInfo, "PatchTableRequest", ""), + contentType, + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } +} + +export class ReferenceTablesApiResponseProcessor { + /** + * 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 createReferenceTable + * @throws ApiException if the response code was not in [200, 299] + */ + public async createReferenceTable( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 201) { + const body: TableResultV2 = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "TableResultV2", + ) as TableResultV2; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 429 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: TableResultV2 = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "TableResultV2", + "", + ) as TableResultV2; + 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 createReferenceTableUpload + * @throws ApiException if the response code was not in [200, 299] + */ + public async createReferenceTableUpload( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 201) { + const body: CreateUploadResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "CreateUploadResponse", + ) as CreateUploadResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 429 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CreateUploadResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "CreateUploadResponse", + "", + ) as CreateUploadResponse; + 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 deleteTable + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteTable(response: ResponseContext): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + return; + } + if ( + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + 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 getRowsByID + * @throws ApiException if the response code was not in [200, 299] + */ + public async getRowsByID( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: TableRowResourceArray = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "TableRowResourceArray", + ) as TableRowResourceArray; + return body; + } + if ( + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: TableRowResourceArray = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "TableRowResourceArray", + "", + ) as TableRowResourceArray; + 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 getTable + * @throws ApiException if the response code was not in [200, 299] + */ + public async getTable(response: ResponseContext): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: TableResultV2 = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "TableResultV2", + ) as TableResultV2; + return body; + } + if ( + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: TableResultV2 = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "TableResultV2", + "", + ) as TableResultV2; + 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 listTables + * @throws ApiException if the response code was not in [200, 299] + */ + public async listTables( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: TableResultV2Array = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "TableResultV2Array", + ) as TableResultV2Array; + return body; + } + if (response.httpStatusCode === 403 || response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: TableResultV2Array = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "TableResultV2Array", + "", + ) as TableResultV2Array; + 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 updateReferenceTable + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateReferenceTable(response: ResponseContext): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + return; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 429 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } +} + +export interface ReferenceTablesApiCreateReferenceTableRequest { + /** + * @type CreateTableRequest + */ + body: CreateTableRequest; +} + +export interface ReferenceTablesApiCreateReferenceTableUploadRequest { + /** + * @type CreateUploadRequest + */ + body: CreateUploadRequest; +} + +export interface ReferenceTablesApiDeleteTableRequest { + /** + * The ID of the reference table to delete + * @type string + */ + id: string; +} + +export interface ReferenceTablesApiGetRowsByIDRequest { + /** + * The ID of the reference table + * @type string + */ + id: string; + /** + * List of row IDs (primary key values) to retrieve from the reference table + * @type Array + */ + rowId: Array; +} + +export interface ReferenceTablesApiGetTableRequest { + /** + * The ID of the reference table to retrieve + * @type string + */ + id: string; +} + +export interface ReferenceTablesApiListTablesRequest { + /** + * Number of tables to return + * @type number + */ + limit?: number; + /** + * Number of tables to skip for pagination + * @type number + */ + offset?: number; + /** + * Sort field and direction. Use field name for ascending, prefix with "-" for descending + * @type ReferenceTableSortType + */ + sort?: ReferenceTableSortType; + /** + * Filter by table status + * @type string + */ + filterStatus?: string; + /** + * Filter by exact table name match + * @type string + */ + filterTableNameExact?: string; + /** + * Filter by table name containing substring + * @type string + */ + filterTableNameContains?: string; +} + +export interface ReferenceTablesApiUpdateReferenceTableRequest { + /** + * The ID of the reference table to update + * @type string + */ + id: string; + /** + * @type PatchTableRequest + */ + body: PatchTableRequest; +} + +export class ReferenceTablesApi { + private requestFactory: ReferenceTablesApiRequestFactory; + private responseProcessor: ReferenceTablesApiResponseProcessor; + private configuration: Configuration; + + static operationServers: { [key: string]: BaseServerConfiguration[] } = {}; + + public constructor( + configuration?: Configuration, + requestFactory?: ReferenceTablesApiRequestFactory, + responseProcessor?: ReferenceTablesApiResponseProcessor, + ) { + this.configuration = configuration || createConfiguration(); + this.requestFactory = + requestFactory || + new ReferenceTablesApiRequestFactory(this.configuration); + this.responseProcessor = + responseProcessor || new ReferenceTablesApiResponseProcessor(); + } + + /** + * Create a new reference table. You can provide data in two ways: 1) Call POST api/v2/reference-tables/upload first to get an upload ID, then PUT chunks of CSV data to each provided URL, and finally call this POST endpoint with the upload_id in file_metadata, OR 2) Provide access_details in file_metadata pointing to a CSV file in cloud storage (AWS S3, Azure Blob, or GCP Cloud Storage). + * @param param The request object + */ + public createReferenceTable( + param: ReferenceTablesApiCreateReferenceTableRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.createReferenceTable( + param.body, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createReferenceTable(responseContext); + }); + }); + } + + /** + * Create a reference table upload for bulk data ingestion + * @param param The request object + */ + public createReferenceTableUpload( + param: ReferenceTablesApiCreateReferenceTableUploadRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = + this.requestFactory.createReferenceTableUpload(param.body, options); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createReferenceTableUpload( + responseContext, + ); + }); + }); + } + + /** + * Delete a reference table by ID + * @param param The request object + */ + public deleteTable( + param: ReferenceTablesApiDeleteTableRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.deleteTable( + param.id, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.deleteTable(responseContext); + }); + }); + } + + /** + * Get reference table rows by their primary key values. + * @param param The request object + */ + public getRowsByID( + param: ReferenceTablesApiGetRowsByIDRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.getRowsByID( + param.id, + param.rowId, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getRowsByID(responseContext); + }); + }); + } + + /** + * Get a reference table by ID + * @param param The request object + */ + public getTable( + param: ReferenceTablesApiGetTableRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.getTable( + param.id, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getTable(responseContext); + }); + }); + } + + /** + * List all reference tables in this organization + * @param param The request object + */ + public listTables( + param: ReferenceTablesApiListTablesRequest = {}, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.listTables( + param.limit, + param.offset, + param.sort, + param.filterStatus, + param.filterTableNameExact, + param.filterTableNameContains, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listTables(responseContext); + }); + }); + } + + /** + * Update a reference table by ID. You can update the table's data, description, and tags. Note: The source type cannot be changed after table creation. For data updates: For existing tables of type `source:LOCAL_FILE`, call POST api/v2/reference-tables/uploads first to get an upload ID, then PUT chunks of CSV data to each provided URL, and finally call this PATCH endpoint with the upload_id in file_metadata. For existing tables of type `source: S3, GCS, or AZURE`, provide updated access_details in file_metadata pointing to a CSV file in the same type of cloud storage. + * @param param The request object + */ + public updateReferenceTable( + param: ReferenceTablesApiUpdateReferenceTableRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.updateReferenceTable( + param.id, + param.body, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateReferenceTable(responseContext); + }); + }); + } +} diff --git a/services/reference_tables/src/v2/index.ts b/services/reference_tables/src/v2/index.ts new file mode 100644 index 000000000000..4d0285615959 --- /dev/null +++ b/services/reference_tables/src/v2/index.ts @@ -0,0 +1,69 @@ +export { + ReferenceTablesApiCreateReferenceTableRequest, + ReferenceTablesApiCreateReferenceTableUploadRequest, + ReferenceTablesApiDeleteTableRequest, + ReferenceTablesApiGetRowsByIDRequest, + ReferenceTablesApiGetTableRequest, + ReferenceTablesApiListTablesRequest, + ReferenceTablesApiUpdateReferenceTableRequest, + ReferenceTablesApi, +} from "./ReferenceTablesApi"; + +export { APIErrorResponse } from "./models/APIErrorResponse"; +export { CreateTableRequest } from "./models/CreateTableRequest"; +export { CreateTableRequestData } from "./models/CreateTableRequestData"; +export { CreateTableRequestDataAttributes } from "./models/CreateTableRequestDataAttributes"; +export { CreateTableRequestDataAttributesFileMetadata } from "./models/CreateTableRequestDataAttributesFileMetadata"; +export { CreateTableRequestDataAttributesFileMetadataCloudStorage } from "./models/CreateTableRequestDataAttributesFileMetadataCloudStorage"; +export { CreateTableRequestDataAttributesFileMetadataLocalFile } from "./models/CreateTableRequestDataAttributesFileMetadataLocalFile"; +export { CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails } from "./models/CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails"; +export { CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail } from "./models/CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail"; +export { CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail } from "./models/CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail"; +export { CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail } from "./models/CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail"; +export { CreateTableRequestDataAttributesSchema } from "./models/CreateTableRequestDataAttributesSchema"; +export { CreateTableRequestDataAttributesSchemaFieldsItems } from "./models/CreateTableRequestDataAttributesSchemaFieldsItems"; +export { CreateTableRequestDataType } from "./models/CreateTableRequestDataType"; +export { CreateUploadRequest } from "./models/CreateUploadRequest"; +export { CreateUploadRequestData } from "./models/CreateUploadRequestData"; +export { CreateUploadRequestDataAttributes } from "./models/CreateUploadRequestDataAttributes"; +export { CreateUploadRequestDataType } from "./models/CreateUploadRequestDataType"; +export { CreateUploadResponse } from "./models/CreateUploadResponse"; +export { CreateUploadResponseData } from "./models/CreateUploadResponseData"; +export { CreateUploadResponseDataAttributes } from "./models/CreateUploadResponseDataAttributes"; +export { CreateUploadResponseDataType } from "./models/CreateUploadResponseDataType"; +export { PatchTableRequest } from "./models/PatchTableRequest"; +export { PatchTableRequestData } from "./models/PatchTableRequestData"; +export { PatchTableRequestDataAttributes } from "./models/PatchTableRequestDataAttributes"; +export { PatchTableRequestDataAttributesFileMetadata } from "./models/PatchTableRequestDataAttributesFileMetadata"; +export { PatchTableRequestDataAttributesFileMetadataCloudStorage } from "./models/PatchTableRequestDataAttributesFileMetadataCloudStorage"; +export { PatchTableRequestDataAttributesFileMetadataLocalFile } from "./models/PatchTableRequestDataAttributesFileMetadataLocalFile"; +export { PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails } from "./models/PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails"; +export { PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail } from "./models/PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail"; +export { PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail } from "./models/PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail"; +export { PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail } from "./models/PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail"; +export { PatchTableRequestDataAttributesSchema } from "./models/PatchTableRequestDataAttributesSchema"; +export { PatchTableRequestDataAttributesSchemaFieldsItems } from "./models/PatchTableRequestDataAttributesSchemaFieldsItems"; +export { PatchTableRequestDataType } from "./models/PatchTableRequestDataType"; +export { ReferenceTableCreateSourceType } from "./models/ReferenceTableCreateSourceType"; +export { ReferenceTableSchemaFieldType } from "./models/ReferenceTableSchemaFieldType"; +export { ReferenceTableSortType } from "./models/ReferenceTableSortType"; +export { ReferenceTableSourceType } from "./models/ReferenceTableSourceType"; +export { TableResultV2 } from "./models/TableResultV2"; +export { TableResultV2Array } from "./models/TableResultV2Array"; +export { TableResultV2Data } from "./models/TableResultV2Data"; +export { TableResultV2DataAttributes } from "./models/TableResultV2DataAttributes"; +export { TableResultV2DataAttributesFileMetadata } from "./models/TableResultV2DataAttributesFileMetadata"; +export { TableResultV2DataAttributesFileMetadataCloudStorage } from "./models/TableResultV2DataAttributesFileMetadataCloudStorage"; +export { TableResultV2DataAttributesFileMetadataCloudStorageErrorType } from "./models/TableResultV2DataAttributesFileMetadataCloudStorageErrorType"; +export { TableResultV2DataAttributesFileMetadataLocalFile } from "./models/TableResultV2DataAttributesFileMetadataLocalFile"; +export { TableResultV2DataAttributesFileMetadataOneOfAccessDetails } from "./models/TableResultV2DataAttributesFileMetadataOneOfAccessDetails"; +export { TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail } from "./models/TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail"; +export { TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail } from "./models/TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail"; +export { TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail } from "./models/TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail"; +export { TableResultV2DataAttributesSchema } from "./models/TableResultV2DataAttributesSchema"; +export { TableResultV2DataAttributesSchemaFieldsItems } from "./models/TableResultV2DataAttributesSchemaFieldsItems"; +export { TableResultV2DataType } from "./models/TableResultV2DataType"; +export { TableRowResourceArray } from "./models/TableRowResourceArray"; +export { TableRowResourceData } from "./models/TableRowResourceData"; +export { TableRowResourceDataAttributes } from "./models/TableRowResourceDataAttributes"; +export { TableRowResourceDataType } from "./models/TableRowResourceDataType"; diff --git a/services/reference_tables/src/v2/models/APIErrorResponse.ts b/services/reference_tables/src/v2/models/APIErrorResponse.ts new file mode 100644 index 000000000000..58d6c35b80f0 --- /dev/null +++ b/services/reference_tables/src/v2/models/APIErrorResponse.ts @@ -0,0 +1,45 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * API error response. + */ +export class APIErrorResponse { + /** + * A list of errors. + */ + "errors": Array; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + errors: { + baseName: "errors", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return APIErrorResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/CreateTableRequest.ts b/services/reference_tables/src/v2/models/CreateTableRequest.ts new file mode 100644 index 000000000000..7cd36cd73802 --- /dev/null +++ b/services/reference_tables/src/v2/models/CreateTableRequest.ts @@ -0,0 +1,46 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { CreateTableRequestData } from "./CreateTableRequestData"; + +/** + * The definition of `CreateTableRequest` object. + */ +export class CreateTableRequest { + /** + * The definition of `CreateTableRequestData` object. + */ + "data"?: CreateTableRequestData; + /** + * 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: "CreateTableRequestData", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateTableRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/CreateTableRequestData.ts b/services/reference_tables/src/v2/models/CreateTableRequestData.ts new file mode 100644 index 000000000000..67a5f9ac7cc2 --- /dev/null +++ b/services/reference_tables/src/v2/models/CreateTableRequestData.ts @@ -0,0 +1,64 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { CreateTableRequestDataAttributes } from "./CreateTableRequestDataAttributes"; +import { CreateTableRequestDataType } from "./CreateTableRequestDataType"; + +/** + * The definition of `CreateTableRequestData` object. + */ +export class CreateTableRequestData { + /** + * The definition of `CreateTableRequestDataAttributes` object. + */ + "attributes"?: CreateTableRequestDataAttributes; + /** + * The ID of the reference table. + */ + "id"?: string; + /** + * Reference table resource type. + */ + "type": CreateTableRequestDataType; + /** + * 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: "CreateTableRequestDataAttributes", + }, + id: { + baseName: "id", + type: "string", + }, + type: { + baseName: "type", + type: "CreateTableRequestDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateTableRequestData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/CreateTableRequestDataAttributes.ts b/services/reference_tables/src/v2/models/CreateTableRequestDataAttributes.ts new file mode 100644 index 000000000000..6d6dc1e3537c --- /dev/null +++ b/services/reference_tables/src/v2/models/CreateTableRequestDataAttributes.ts @@ -0,0 +1,91 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { CreateTableRequestDataAttributesFileMetadata } from "./CreateTableRequestDataAttributesFileMetadata"; +import { CreateTableRequestDataAttributesSchema } from "./CreateTableRequestDataAttributesSchema"; +import { ReferenceTableCreateSourceType } from "./ReferenceTableCreateSourceType"; + +/** + * The definition of `CreateTableRequestDataAttributes` object. + */ +export class CreateTableRequestDataAttributes { + /** + * The description of the reference table. + */ + "description"?: string; + /** + * The definition of `CreateTableRequestDataAttributesFileMetadata` object. + */ + "fileMetadata"?: CreateTableRequestDataAttributesFileMetadata; + /** + * The definition of `CreateTableRequestDataAttributesSchema` object. + */ + "schema": CreateTableRequestDataAttributesSchema; + /** + * The source type for creating reference table data. Only these source types can be created via this API. + */ + "source": ReferenceTableCreateSourceType; + /** + * The name of the reference table. + */ + "tableName": string; + /** + * The tags of the reference table. + */ + "tags"?: Array; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + description: { + baseName: "description", + type: "string", + }, + fileMetadata: { + baseName: "file_metadata", + type: "CreateTableRequestDataAttributesFileMetadata", + }, + schema: { + baseName: "schema", + type: "CreateTableRequestDataAttributesSchema", + required: true, + }, + source: { + baseName: "source", + type: "ReferenceTableCreateSourceType", + required: true, + }, + tableName: { + baseName: "table_name", + type: "string", + required: true, + }, + tags: { + baseName: "tags", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateTableRequestDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/CreateTableRequestDataAttributesFileMetadata.ts b/services/reference_tables/src/v2/models/CreateTableRequestDataAttributesFileMetadata.ts new file mode 100644 index 000000000000..4afe2ac9e247 --- /dev/null +++ b/services/reference_tables/src/v2/models/CreateTableRequestDataAttributesFileMetadata.ts @@ -0,0 +1,12 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +import { CreateTableRequestDataAttributesFileMetadataCloudStorage } from "./CreateTableRequestDataAttributesFileMetadataCloudStorage"; +import { CreateTableRequestDataAttributesFileMetadataLocalFile } from "./CreateTableRequestDataAttributesFileMetadataLocalFile"; + +/** + * The definition of `CreateTableRequestDataAttributesFileMetadata` object. + */ +export type CreateTableRequestDataAttributesFileMetadata = + | CreateTableRequestDataAttributesFileMetadataCloudStorage + | CreateTableRequestDataAttributesFileMetadataLocalFile + | UnparsedObject; diff --git a/services/reference_tables/src/v2/models/CreateTableRequestDataAttributesFileMetadataCloudStorage.ts b/services/reference_tables/src/v2/models/CreateTableRequestDataAttributesFileMetadataCloudStorage.ts new file mode 100644 index 000000000000..36502559def8 --- /dev/null +++ b/services/reference_tables/src/v2/models/CreateTableRequestDataAttributesFileMetadataCloudStorage.ts @@ -0,0 +1,46 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails } from "./CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails"; + +/** + * Cloud storage file metadata for create requests. Both access_details and sync_enabled are required. + */ +export class CreateTableRequestDataAttributesFileMetadataCloudStorage { + /** + * The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails` object. + */ + "accessDetails": CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails; + /** + * Whether this table is synced automatically. + */ + "syncEnabled": boolean; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + accessDetails: { + baseName: "access_details", + type: "CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails", + required: true, + }, + syncEnabled: { + baseName: "sync_enabled", + type: "boolean", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateTableRequestDataAttributesFileMetadataCloudStorage.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/CreateTableRequestDataAttributesFileMetadataLocalFile.ts b/services/reference_tables/src/v2/models/CreateTableRequestDataAttributesFileMetadataLocalFile.ts new file mode 100644 index 000000000000..8b71efc1a6f1 --- /dev/null +++ b/services/reference_tables/src/v2/models/CreateTableRequestDataAttributesFileMetadataLocalFile.ts @@ -0,0 +1,35 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Local file metadata for create requests using upload ID. + */ +export class CreateTableRequestDataAttributesFileMetadataLocalFile { + /** + * The upload ID. + */ + "uploadId": string; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + uploadId: { + baseName: "upload_id", + type: "string", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateTableRequestDataAttributesFileMetadataLocalFile.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails.ts b/services/reference_tables/src/v2/models/CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails.ts new file mode 100644 index 000000000000..9c4b098f9547 --- /dev/null +++ b/services/reference_tables/src/v2/models/CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails.ts @@ -0,0 +1,64 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail } from "./CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail"; +import { CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail } from "./CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail"; +import { CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail } from "./CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail"; + +/** + * The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails` object. + */ +export class CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails { + /** + * The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail` object. + */ + "awsDetail"?: CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail; + /** + * The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail` object. + */ + "azureDetail"?: CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail; + /** + * The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail` object. + */ + "gcpDetail"?: CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail; + /** + * 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 = { + awsDetail: { + baseName: "aws_detail", + type: "CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail", + }, + azureDetail: { + baseName: "azure_detail", + type: "CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail", + }, + gcpDetail: { + baseName: "gcp_detail", + type: "CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail.ts b/services/reference_tables/src/v2/models/CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail.ts new file mode 100644 index 000000000000..54493f048bae --- /dev/null +++ b/services/reference_tables/src/v2/models/CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail.ts @@ -0,0 +1,63 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail` object. + */ +export class CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail { + /** + * The ID of the AWS account. + */ + "awsAccountId": string; + /** + * The name of the AWS bucket. + */ + "awsBucketName": string; + /** + * The relative file path from the S3 bucket root to the CSV file. + */ + "filePath": 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 = { + awsAccountId: { + baseName: "aws_account_id", + type: "string", + required: true, + }, + awsBucketName: { + baseName: "aws_bucket_name", + type: "string", + required: true, + }, + filePath: { + baseName: "file_path", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail.ts b/services/reference_tables/src/v2/models/CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail.ts new file mode 100644 index 000000000000..5c2ee6c0e1ff --- /dev/null +++ b/services/reference_tables/src/v2/models/CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail.ts @@ -0,0 +1,81 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail` object. + */ +export class CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail { + /** + * The Azure client ID. + */ + "azureClientId": string; + /** + * The name of the Azure container. + */ + "azureContainerName": string; + /** + * The name of the Azure storage account. + */ + "azureStorageAccountName": string; + /** + * The ID of the Azure tenant. + */ + "azureTenantId": string; + /** + * The relative file path from the Azure container root to the CSV file. + */ + "filePath": 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 = { + azureClientId: { + baseName: "azure_client_id", + type: "string", + required: true, + }, + azureContainerName: { + baseName: "azure_container_name", + type: "string", + required: true, + }, + azureStorageAccountName: { + baseName: "azure_storage_account_name", + type: "string", + required: true, + }, + azureTenantId: { + baseName: "azure_tenant_id", + type: "string", + required: true, + }, + filePath: { + baseName: "file_path", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail.ts b/services/reference_tables/src/v2/models/CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail.ts new file mode 100644 index 000000000000..d229e8b3e892 --- /dev/null +++ b/services/reference_tables/src/v2/models/CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail.ts @@ -0,0 +1,72 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * The definition of `CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail` object. + */ +export class CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail { + /** + * The relative file path from the GCS bucket root to the CSV file. + */ + "filePath": string; + /** + * The name of the GCP bucket. + */ + "gcpBucketName": string; + /** + * The ID of the GCP project. + */ + "gcpProjectId": string; + /** + * The email of the GCP service account. + */ + "gcpServiceAccountEmail": 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 = { + filePath: { + baseName: "file_path", + type: "string", + required: true, + }, + gcpBucketName: { + baseName: "gcp_bucket_name", + type: "string", + required: true, + }, + gcpProjectId: { + baseName: "gcp_project_id", + type: "string", + required: true, + }, + gcpServiceAccountEmail: { + baseName: "gcp_service_account_email", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/CreateTableRequestDataAttributesSchema.ts b/services/reference_tables/src/v2/models/CreateTableRequestDataAttributesSchema.ts new file mode 100644 index 000000000000..f3796b0bde0d --- /dev/null +++ b/services/reference_tables/src/v2/models/CreateTableRequestDataAttributesSchema.ts @@ -0,0 +1,56 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { CreateTableRequestDataAttributesSchemaFieldsItems } from "./CreateTableRequestDataAttributesSchemaFieldsItems"; + +/** + * The definition of `CreateTableRequestDataAttributesSchema` object. + */ +export class CreateTableRequestDataAttributesSchema { + /** + * The `schema` `fields`. + */ + "fields": Array; + /** + * List of field names that serve as primary keys for the table. Currently only 1 primary key is supported, and it is used as an ID to retrieve rows. + */ + "primaryKeys": 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 = { + fields: { + baseName: "fields", + type: "Array", + required: true, + }, + primaryKeys: { + baseName: "primary_keys", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateTableRequestDataAttributesSchema.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/CreateTableRequestDataAttributesSchemaFieldsItems.ts b/services/reference_tables/src/v2/models/CreateTableRequestDataAttributesSchemaFieldsItems.ts new file mode 100644 index 000000000000..949154787c2a --- /dev/null +++ b/services/reference_tables/src/v2/models/CreateTableRequestDataAttributesSchemaFieldsItems.ts @@ -0,0 +1,56 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { ReferenceTableSchemaFieldType } from "./ReferenceTableSchemaFieldType"; + +/** + * The definition of `CreateTableRequestDataAttributesSchemaFieldsItems` object. + */ +export class CreateTableRequestDataAttributesSchemaFieldsItems { + /** + * The field name. + */ + "name": string; + /** + * The field type for reference table schema fields. + */ + "type": ReferenceTableSchemaFieldType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + name: { + baseName: "name", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "ReferenceTableSchemaFieldType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateTableRequestDataAttributesSchemaFieldsItems.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/CreateTableRequestDataType.ts b/services/reference_tables/src/v2/models/CreateTableRequestDataType.ts new file mode 100644 index 000000000000..e9e748b0d53b --- /dev/null +++ b/services/reference_tables/src/v2/models/CreateTableRequestDataType.ts @@ -0,0 +1,9 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Reference table resource type. + */ +export type CreateTableRequestDataType = + | typeof REFERENCE_TABLE + | UnparsedObject; +export const REFERENCE_TABLE = "reference_table"; diff --git a/services/reference_tables/src/v2/models/CreateUploadRequest.ts b/services/reference_tables/src/v2/models/CreateUploadRequest.ts new file mode 100644 index 000000000000..1ab18168baf0 --- /dev/null +++ b/services/reference_tables/src/v2/models/CreateUploadRequest.ts @@ -0,0 +1,46 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { CreateUploadRequestData } from "./CreateUploadRequestData"; + +/** + * The definition of `CreateUploadRequest` object. + */ +export class CreateUploadRequest { + /** + * The definition of `CreateUploadRequestData` object. + */ + "data"?: CreateUploadRequestData; + /** + * 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: "CreateUploadRequestData", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateUploadRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/CreateUploadRequestData.ts b/services/reference_tables/src/v2/models/CreateUploadRequestData.ts new file mode 100644 index 000000000000..c53f8dbf23df --- /dev/null +++ b/services/reference_tables/src/v2/models/CreateUploadRequestData.ts @@ -0,0 +1,64 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { CreateUploadRequestDataAttributes } from "./CreateUploadRequestDataAttributes"; +import { CreateUploadRequestDataType } from "./CreateUploadRequestDataType"; + +/** + * The definition of `CreateUploadRequestData` object. + */ +export class CreateUploadRequestData { + /** + * The definition of `CreateUploadRequestDataAttributes` object. + */ + "attributes"?: CreateUploadRequestDataAttributes; + /** + * The ID of the upload. + */ + "id"?: string; + /** + * Upload resource type. + */ + "type": CreateUploadRequestDataType; + /** + * 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: "CreateUploadRequestDataAttributes", + }, + id: { + baseName: "id", + type: "string", + }, + type: { + baseName: "type", + type: "CreateUploadRequestDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateUploadRequestData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/CreateUploadRequestDataAttributes.ts b/services/reference_tables/src/v2/models/CreateUploadRequestDataAttributes.ts new file mode 100644 index 000000000000..d0a35b78dbc8 --- /dev/null +++ b/services/reference_tables/src/v2/models/CreateUploadRequestDataAttributes.ts @@ -0,0 +1,74 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * The definition of `CreateUploadRequestDataAttributes` object. + */ +export class CreateUploadRequestDataAttributes { + /** + * The headers of the file to upload. + */ + "headers": Array; + /** + * The number of parts in the upload. + */ + "partCount": number; + /** + * The size of each part in the upload in bytes. For multi-part uploads (part_count > 1), all parts except the last one must be at least 5,000,000 bytes. For single-part uploads (part_count = 1), any size is allowed. + */ + "partSize": number; + /** + * The name of the reference table. + */ + "tableName": 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 = { + headers: { + baseName: "headers", + type: "Array", + required: true, + }, + partCount: { + baseName: "part_count", + type: "number", + required: true, + format: "int32", + }, + partSize: { + baseName: "part_size", + type: "number", + required: true, + format: "int64", + }, + tableName: { + baseName: "table_name", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateUploadRequestDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/CreateUploadRequestDataType.ts b/services/reference_tables/src/v2/models/CreateUploadRequestDataType.ts new file mode 100644 index 000000000000..1c51b47e72c9 --- /dev/null +++ b/services/reference_tables/src/v2/models/CreateUploadRequestDataType.ts @@ -0,0 +1,7 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Upload resource type. + */ +export type CreateUploadRequestDataType = typeof UPLOAD | UnparsedObject; +export const UPLOAD = "upload"; diff --git a/services/reference_tables/src/v2/models/CreateUploadResponse.ts b/services/reference_tables/src/v2/models/CreateUploadResponse.ts new file mode 100644 index 000000000000..16dbaea58615 --- /dev/null +++ b/services/reference_tables/src/v2/models/CreateUploadResponse.ts @@ -0,0 +1,46 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { CreateUploadResponseData } from "./CreateUploadResponseData"; + +/** + * The definition of `CreateUploadResponse` object. + */ +export class CreateUploadResponse { + /** + * The definition of `CreateUploadResponseData` object. + */ + "data"?: CreateUploadResponseData; + /** + * 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: "CreateUploadResponseData", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateUploadResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/CreateUploadResponseData.ts b/services/reference_tables/src/v2/models/CreateUploadResponseData.ts new file mode 100644 index 000000000000..7e2cc1d9cd28 --- /dev/null +++ b/services/reference_tables/src/v2/models/CreateUploadResponseData.ts @@ -0,0 +1,64 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { CreateUploadResponseDataAttributes } from "./CreateUploadResponseDataAttributes"; +import { CreateUploadResponseDataType } from "./CreateUploadResponseDataType"; + +/** + * The definition of `CreateUploadResponseData` object. + */ +export class CreateUploadResponseData { + /** + * The definition of `CreateUploadResponseDataAttributes` object. + */ + "attributes"?: CreateUploadResponseDataAttributes; + /** + * The ID of the upload. + */ + "id"?: string; + /** + * Upload resource type. + */ + "type": CreateUploadResponseDataType; + /** + * 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: "CreateUploadResponseDataAttributes", + }, + id: { + baseName: "id", + type: "string", + }, + type: { + baseName: "type", + type: "CreateUploadResponseDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateUploadResponseData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/CreateUploadResponseDataAttributes.ts b/services/reference_tables/src/v2/models/CreateUploadResponseDataAttributes.ts new file mode 100644 index 000000000000..f7d61ad02b67 --- /dev/null +++ b/services/reference_tables/src/v2/models/CreateUploadResponseDataAttributes.ts @@ -0,0 +1,44 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * The definition of `CreateUploadResponseDataAttributes` object. + */ +export class CreateUploadResponseDataAttributes { + /** + * The URLs of the parts in the upload. + */ + "partUrls"?: 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 = { + partUrls: { + baseName: "part_urls", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateUploadResponseDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/CreateUploadResponseDataType.ts b/services/reference_tables/src/v2/models/CreateUploadResponseDataType.ts new file mode 100644 index 000000000000..bfc1a2be2727 --- /dev/null +++ b/services/reference_tables/src/v2/models/CreateUploadResponseDataType.ts @@ -0,0 +1,7 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Upload resource type. + */ +export type CreateUploadResponseDataType = typeof UPLOAD | UnparsedObject; +export const UPLOAD = "upload"; diff --git a/services/reference_tables/src/v2/models/PatchTableRequest.ts b/services/reference_tables/src/v2/models/PatchTableRequest.ts new file mode 100644 index 000000000000..6450104b741d --- /dev/null +++ b/services/reference_tables/src/v2/models/PatchTableRequest.ts @@ -0,0 +1,46 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { PatchTableRequestData } from "./PatchTableRequestData"; + +/** + * The definition of `PatchTableRequest` object. + */ +export class PatchTableRequest { + /** + * The definition of `PatchTableRequestData` object. + */ + "data"?: PatchTableRequestData; + /** + * 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: "PatchTableRequestData", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return PatchTableRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/PatchTableRequestData.ts b/services/reference_tables/src/v2/models/PatchTableRequestData.ts new file mode 100644 index 000000000000..8d4e193fd442 --- /dev/null +++ b/services/reference_tables/src/v2/models/PatchTableRequestData.ts @@ -0,0 +1,64 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { PatchTableRequestDataAttributes } from "./PatchTableRequestDataAttributes"; +import { PatchTableRequestDataType } from "./PatchTableRequestDataType"; + +/** + * The definition of `PatchTableRequestData` object. + */ +export class PatchTableRequestData { + /** + * The definition of `PatchTableRequestDataAttributes` object. + */ + "attributes"?: PatchTableRequestDataAttributes; + /** + * The ID of the reference table. + */ + "id"?: string; + /** + * Reference table resource type. + */ + "type": PatchTableRequestDataType; + /** + * 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: "PatchTableRequestDataAttributes", + }, + id: { + baseName: "id", + type: "string", + }, + type: { + baseName: "type", + type: "PatchTableRequestDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return PatchTableRequestData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/PatchTableRequestDataAttributes.ts b/services/reference_tables/src/v2/models/PatchTableRequestDataAttributes.ts new file mode 100644 index 000000000000..6bf224cb9a37 --- /dev/null +++ b/services/reference_tables/src/v2/models/PatchTableRequestDataAttributes.ts @@ -0,0 +1,79 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { PatchTableRequestDataAttributesFileMetadata } from "./PatchTableRequestDataAttributesFileMetadata"; +import { PatchTableRequestDataAttributesSchema } from "./PatchTableRequestDataAttributesSchema"; + +/** + * The definition of `PatchTableRequestDataAttributes` object. + */ +export class PatchTableRequestDataAttributes { + /** + * The description of the reference table. + */ + "description"?: string; + /** + * The definition of `PatchTableRequestDataAttributesFileMetadata` object. + */ + "fileMetadata"?: PatchTableRequestDataAttributesFileMetadata; + /** + * The definition of `PatchTableRequestDataAttributesSchema` object. + */ + "schema"?: PatchTableRequestDataAttributesSchema; + /** + * Whether this table is synced automatically. + */ + "syncEnabled"?: boolean; + /** + * The tags of the reference table. + */ + "tags"?: Array; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + description: { + baseName: "description", + type: "string", + }, + fileMetadata: { + baseName: "file_metadata", + type: "PatchTableRequestDataAttributesFileMetadata", + }, + schema: { + baseName: "schema", + type: "PatchTableRequestDataAttributesSchema", + }, + syncEnabled: { + baseName: "sync_enabled", + type: "boolean", + }, + tags: { + baseName: "tags", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return PatchTableRequestDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/PatchTableRequestDataAttributesFileMetadata.ts b/services/reference_tables/src/v2/models/PatchTableRequestDataAttributesFileMetadata.ts new file mode 100644 index 000000000000..70e2c3008f63 --- /dev/null +++ b/services/reference_tables/src/v2/models/PatchTableRequestDataAttributesFileMetadata.ts @@ -0,0 +1,12 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +import { PatchTableRequestDataAttributesFileMetadataCloudStorage } from "./PatchTableRequestDataAttributesFileMetadataCloudStorage"; +import { PatchTableRequestDataAttributesFileMetadataLocalFile } from "./PatchTableRequestDataAttributesFileMetadataLocalFile"; + +/** + * The definition of `PatchTableRequestDataAttributesFileMetadata` object. + */ +export type PatchTableRequestDataAttributesFileMetadata = + | PatchTableRequestDataAttributesFileMetadataCloudStorage + | PatchTableRequestDataAttributesFileMetadataLocalFile + | UnparsedObject; diff --git a/services/reference_tables/src/v2/models/PatchTableRequestDataAttributesFileMetadataCloudStorage.ts b/services/reference_tables/src/v2/models/PatchTableRequestDataAttributesFileMetadataCloudStorage.ts new file mode 100644 index 000000000000..4aaa9f69cfe0 --- /dev/null +++ b/services/reference_tables/src/v2/models/PatchTableRequestDataAttributesFileMetadataCloudStorage.ts @@ -0,0 +1,44 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails } from "./PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails"; + +/** + * Cloud storage file metadata for patch requests. Allows partial updates of access_details and/or sync_enabled. + */ +export class PatchTableRequestDataAttributesFileMetadataCloudStorage { + /** + * The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails` object. + */ + "accessDetails"?: PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails; + /** + * Whether this table is synced automatically. + */ + "syncEnabled"?: boolean; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + accessDetails: { + baseName: "access_details", + type: "PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails", + }, + syncEnabled: { + baseName: "sync_enabled", + type: "boolean", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return PatchTableRequestDataAttributesFileMetadataCloudStorage.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/PatchTableRequestDataAttributesFileMetadataLocalFile.ts b/services/reference_tables/src/v2/models/PatchTableRequestDataAttributesFileMetadataLocalFile.ts new file mode 100644 index 000000000000..07468bca1fa9 --- /dev/null +++ b/services/reference_tables/src/v2/models/PatchTableRequestDataAttributesFileMetadataLocalFile.ts @@ -0,0 +1,35 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Local file metadata for patch requests using upload ID. + */ +export class PatchTableRequestDataAttributesFileMetadataLocalFile { + /** + * The upload ID. + */ + "uploadId": string; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + uploadId: { + baseName: "upload_id", + type: "string", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return PatchTableRequestDataAttributesFileMetadataLocalFile.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails.ts b/services/reference_tables/src/v2/models/PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails.ts new file mode 100644 index 000000000000..e7d553405739 --- /dev/null +++ b/services/reference_tables/src/v2/models/PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails.ts @@ -0,0 +1,64 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail } from "./PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail"; +import { PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail } from "./PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail"; +import { PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail } from "./PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail"; + +/** + * The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails` object. + */ +export class PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails { + /** + * The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail` object. + */ + "awsDetail"?: PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail; + /** + * The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail` object. + */ + "azureDetail"?: PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail; + /** + * The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail` object. + */ + "gcpDetail"?: PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail; + /** + * 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 = { + awsDetail: { + baseName: "aws_detail", + type: "PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail", + }, + azureDetail: { + baseName: "azure_detail", + type: "PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail", + }, + gcpDetail: { + baseName: "gcp_detail", + type: "PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail.ts b/services/reference_tables/src/v2/models/PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail.ts new file mode 100644 index 000000000000..ad39ca1d4ebf --- /dev/null +++ b/services/reference_tables/src/v2/models/PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail.ts @@ -0,0 +1,60 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail` object. + */ +export class PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail { + /** + * The ID of the AWS account. + */ + "awsAccountId"?: string; + /** + * The name of the AWS bucket. + */ + "awsBucketName"?: string; + /** + * The relative file path from the S3 bucket root to the CSV file. + */ + "filePath"?: 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 = { + awsAccountId: { + baseName: "aws_account_id", + type: "string", + }, + awsBucketName: { + baseName: "aws_bucket_name", + type: "string", + }, + filePath: { + baseName: "file_path", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail.ts b/services/reference_tables/src/v2/models/PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail.ts new file mode 100644 index 000000000000..dd2d65872ca5 --- /dev/null +++ b/services/reference_tables/src/v2/models/PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail.ts @@ -0,0 +1,76 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail` object. + */ +export class PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail { + /** + * The Azure client ID. + */ + "azureClientId"?: string; + /** + * The name of the Azure container. + */ + "azureContainerName"?: string; + /** + * The name of the Azure storage account. + */ + "azureStorageAccountName"?: string; + /** + * The ID of the Azure tenant. + */ + "azureTenantId"?: string; + /** + * The relative file path from the Azure container root to the CSV file. + */ + "filePath"?: 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 = { + azureClientId: { + baseName: "azure_client_id", + type: "string", + }, + azureContainerName: { + baseName: "azure_container_name", + type: "string", + }, + azureStorageAccountName: { + baseName: "azure_storage_account_name", + type: "string", + }, + azureTenantId: { + baseName: "azure_tenant_id", + type: "string", + }, + filePath: { + baseName: "file_path", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail.ts b/services/reference_tables/src/v2/models/PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail.ts new file mode 100644 index 000000000000..336086147860 --- /dev/null +++ b/services/reference_tables/src/v2/models/PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail.ts @@ -0,0 +1,68 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * The definition of `PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail` object. + */ +export class PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail { + /** + * The relative file path from the GCS bucket root to the CSV file. + */ + "filePath"?: string; + /** + * The name of the GCP bucket. + */ + "gcpBucketName"?: string; + /** + * The ID of the GCP project. + */ + "gcpProjectId"?: string; + /** + * The email of the GCP service account. + */ + "gcpServiceAccountEmail"?: 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 = { + filePath: { + baseName: "file_path", + type: "string", + }, + gcpBucketName: { + baseName: "gcp_bucket_name", + type: "string", + }, + gcpProjectId: { + baseName: "gcp_project_id", + type: "string", + }, + gcpServiceAccountEmail: { + baseName: "gcp_service_account_email", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/PatchTableRequestDataAttributesSchema.ts b/services/reference_tables/src/v2/models/PatchTableRequestDataAttributesSchema.ts new file mode 100644 index 000000000000..c42c3d2f9f9f --- /dev/null +++ b/services/reference_tables/src/v2/models/PatchTableRequestDataAttributesSchema.ts @@ -0,0 +1,56 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { PatchTableRequestDataAttributesSchemaFieldsItems } from "./PatchTableRequestDataAttributesSchemaFieldsItems"; + +/** + * The definition of `PatchTableRequestDataAttributesSchema` object. + */ +export class PatchTableRequestDataAttributesSchema { + /** + * The `schema` `fields`. + */ + "fields": Array; + /** + * List of field names that serve as primary keys for the table. Currently only 1 primary key is supported, and it is used as an ID to retrieve rows. + */ + "primaryKeys": 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 = { + fields: { + baseName: "fields", + type: "Array", + required: true, + }, + primaryKeys: { + baseName: "primary_keys", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return PatchTableRequestDataAttributesSchema.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/PatchTableRequestDataAttributesSchemaFieldsItems.ts b/services/reference_tables/src/v2/models/PatchTableRequestDataAttributesSchemaFieldsItems.ts new file mode 100644 index 000000000000..30e3877b4151 --- /dev/null +++ b/services/reference_tables/src/v2/models/PatchTableRequestDataAttributesSchemaFieldsItems.ts @@ -0,0 +1,56 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { ReferenceTableSchemaFieldType } from "./ReferenceTableSchemaFieldType"; + +/** + * The definition of `PatchTableRequestDataAttributesSchemaFieldsItems` object. + */ +export class PatchTableRequestDataAttributesSchemaFieldsItems { + /** + * The field name. + */ + "name": string; + /** + * The field type for reference table schema fields. + */ + "type": ReferenceTableSchemaFieldType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + name: { + baseName: "name", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "ReferenceTableSchemaFieldType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return PatchTableRequestDataAttributesSchemaFieldsItems.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/PatchTableRequestDataType.ts b/services/reference_tables/src/v2/models/PatchTableRequestDataType.ts new file mode 100644 index 000000000000..6d0e87af45bb --- /dev/null +++ b/services/reference_tables/src/v2/models/PatchTableRequestDataType.ts @@ -0,0 +1,7 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Reference table resource type. + */ +export type PatchTableRequestDataType = typeof REFERENCE_TABLE | UnparsedObject; +export const REFERENCE_TABLE = "reference_table"; diff --git a/services/reference_tables/src/v2/models/ReferenceTableCreateSourceType.ts b/services/reference_tables/src/v2/models/ReferenceTableCreateSourceType.ts new file mode 100644 index 000000000000..76c319712d5c --- /dev/null +++ b/services/reference_tables/src/v2/models/ReferenceTableCreateSourceType.ts @@ -0,0 +1,15 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * The source type for creating reference table data. Only these source types can be created via this API. + */ +export type ReferenceTableCreateSourceType = + | typeof LOCAL_FILE + | typeof S3 + | typeof GCS + | typeof AZURE + | UnparsedObject; +export const LOCAL_FILE = "LOCAL_FILE"; +export const S3 = "S3"; +export const GCS = "GCS"; +export const AZURE = "AZURE"; diff --git a/services/reference_tables/src/v2/models/ReferenceTableSchemaFieldType.ts b/services/reference_tables/src/v2/models/ReferenceTableSchemaFieldType.ts new file mode 100644 index 000000000000..2c39f415dde3 --- /dev/null +++ b/services/reference_tables/src/v2/models/ReferenceTableSchemaFieldType.ts @@ -0,0 +1,11 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * The field type for reference table schema fields. + */ +export type ReferenceTableSchemaFieldType = + | typeof STRING + | typeof INT32 + | UnparsedObject; +export const STRING = "STRING"; +export const INT32 = "INT32"; diff --git a/services/reference_tables/src/v2/models/ReferenceTableSortType.ts b/services/reference_tables/src/v2/models/ReferenceTableSortType.ts new file mode 100644 index 000000000000..dc51b844f928 --- /dev/null +++ b/services/reference_tables/src/v2/models/ReferenceTableSortType.ts @@ -0,0 +1,19 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Sort field and direction for reference tables. Use field name for ascending, prefix with "-" for descending. + */ +export type ReferenceTableSortType = + | typeof UPDATED_AT + | typeof TABLE_NAME + | typeof STATUS + | typeof MINUS_UPDATED_AT + | typeof MINUS_TABLE_NAME + | typeof MINUS_STATUS + | UnparsedObject; +export const UPDATED_AT = "updated_at"; +export const TABLE_NAME = "table_name"; +export const STATUS = "status"; +export const MINUS_UPDATED_AT = "-updated_at"; +export const MINUS_TABLE_NAME = "-table_name"; +export const MINUS_STATUS = "-status"; diff --git a/services/reference_tables/src/v2/models/ReferenceTableSourceType.ts b/services/reference_tables/src/v2/models/ReferenceTableSourceType.ts new file mode 100644 index 000000000000..3aced28b878f --- /dev/null +++ b/services/reference_tables/src/v2/models/ReferenceTableSourceType.ts @@ -0,0 +1,23 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * The source type for reference table data. Includes all possible source types that can appear in responses. + */ +export type ReferenceTableSourceType = + | typeof LOCAL_FILE + | typeof S3 + | typeof GCS + | typeof AZURE + | typeof SERVICENOW + | typeof SALESFORCE + | typeof DATABRICKS + | typeof SNOWFLAKE + | UnparsedObject; +export const LOCAL_FILE = "LOCAL_FILE"; +export const S3 = "S3"; +export const GCS = "GCS"; +export const AZURE = "AZURE"; +export const SERVICENOW = "SERVICENOW"; +export const SALESFORCE = "SALESFORCE"; +export const DATABRICKS = "DATABRICKS"; +export const SNOWFLAKE = "SNOWFLAKE"; diff --git a/services/reference_tables/src/v2/models/TableResultV2.ts b/services/reference_tables/src/v2/models/TableResultV2.ts new file mode 100644 index 000000000000..331f7fda6bba --- /dev/null +++ b/services/reference_tables/src/v2/models/TableResultV2.ts @@ -0,0 +1,46 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { TableResultV2Data } from "./TableResultV2Data"; + +/** + * The definition of `TableResultV2` object. + */ +export class TableResultV2 { + /** + * The definition of `TableResultV2Data` object. + */ + "data"?: TableResultV2Data; + /** + * 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: "TableResultV2Data", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TableResultV2.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/TableResultV2Array.ts b/services/reference_tables/src/v2/models/TableResultV2Array.ts new file mode 100644 index 000000000000..280ac1052915 --- /dev/null +++ b/services/reference_tables/src/v2/models/TableResultV2Array.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { TableResultV2Data } from "./TableResultV2Data"; + +/** + * The definition of `TableResultV2Array` object. + */ +export class TableResultV2Array { + /** + * The reference tables. + */ + "data": 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 = { + data: { + baseName: "data", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TableResultV2Array.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/TableResultV2Data.ts b/services/reference_tables/src/v2/models/TableResultV2Data.ts new file mode 100644 index 000000000000..8aa3fa6f417a --- /dev/null +++ b/services/reference_tables/src/v2/models/TableResultV2Data.ts @@ -0,0 +1,64 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { TableResultV2DataAttributes } from "./TableResultV2DataAttributes"; +import { TableResultV2DataType } from "./TableResultV2DataType"; + +/** + * The definition of `TableResultV2Data` object. + */ +export class TableResultV2Data { + /** + * The definition of `TableResultV2DataAttributes` object. + */ + "attributes"?: TableResultV2DataAttributes; + /** + * The ID of the reference table. + */ + "id"?: string; + /** + * Reference table resource type. + */ + "type": TableResultV2DataType; + /** + * 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: "TableResultV2DataAttributes", + }, + id: { + baseName: "id", + type: "string", + }, + type: { + baseName: "type", + type: "TableResultV2DataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TableResultV2Data.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/TableResultV2DataAttributes.ts b/services/reference_tables/src/v2/models/TableResultV2DataAttributes.ts new file mode 100644 index 000000000000..472302c68b0a --- /dev/null +++ b/services/reference_tables/src/v2/models/TableResultV2DataAttributes.ts @@ -0,0 +1,129 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { ReferenceTableSourceType } from "./ReferenceTableSourceType"; +import { TableResultV2DataAttributesFileMetadata } from "./TableResultV2DataAttributesFileMetadata"; +import { TableResultV2DataAttributesSchema } from "./TableResultV2DataAttributesSchema"; + +/** + * The definition of `TableResultV2DataAttributes` object. + */ +export class TableResultV2DataAttributes { + /** + * UUID of the user who created the reference table. + */ + "createdBy"?: string; + /** + * The description of the reference table. + */ + "description"?: string; + /** + * The definition of `TableResultV2DataAttributesFileMetadata` object. + */ + "fileMetadata"?: TableResultV2DataAttributesFileMetadata; + /** + * UUID of the user who last updated the reference table. + */ + "lastUpdatedBy"?: string; + /** + * The number of successfully processed rows in the reference table. + */ + "rowCount"?: number; + /** + * The definition of `TableResultV2DataAttributesSchema` object. + */ + "schema"?: TableResultV2DataAttributesSchema; + /** + * The source type for reference table data. Includes all possible source types that can appear in responses. + */ + "source"?: ReferenceTableSourceType; + /** + * The status of the reference table. + */ + "status"?: string; + /** + * The name of the reference table. + */ + "tableName"?: string; + /** + * The tags of the reference table. + */ + "tags"?: Array; + /** + * The timestamp of the last update to the reference table in ISO 8601 format. + */ + "updatedAt"?: 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 = { + createdBy: { + baseName: "created_by", + type: "string", + }, + description: { + baseName: "description", + type: "string", + }, + fileMetadata: { + baseName: "file_metadata", + type: "TableResultV2DataAttributesFileMetadata", + }, + lastUpdatedBy: { + baseName: "last_updated_by", + type: "string", + }, + rowCount: { + baseName: "row_count", + type: "number", + format: "int64", + }, + schema: { + baseName: "schema", + type: "TableResultV2DataAttributesSchema", + }, + source: { + baseName: "source", + type: "ReferenceTableSourceType", + }, + status: { + baseName: "status", + type: "string", + }, + tableName: { + baseName: "table_name", + type: "string", + }, + tags: { + baseName: "tags", + type: "Array", + }, + updatedAt: { + baseName: "updated_at", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TableResultV2DataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/TableResultV2DataAttributesFileMetadata.ts b/services/reference_tables/src/v2/models/TableResultV2DataAttributesFileMetadata.ts new file mode 100644 index 000000000000..29331f5c07e9 --- /dev/null +++ b/services/reference_tables/src/v2/models/TableResultV2DataAttributesFileMetadata.ts @@ -0,0 +1,12 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +import { TableResultV2DataAttributesFileMetadataCloudStorage } from "./TableResultV2DataAttributesFileMetadataCloudStorage"; +import { TableResultV2DataAttributesFileMetadataLocalFile } from "./TableResultV2DataAttributesFileMetadataLocalFile"; + +/** + * The definition of `TableResultV2DataAttributesFileMetadata` object. + */ +export type TableResultV2DataAttributesFileMetadata = + | TableResultV2DataAttributesFileMetadataCloudStorage + | TableResultV2DataAttributesFileMetadataLocalFile + | UnparsedObject; diff --git a/services/reference_tables/src/v2/models/TableResultV2DataAttributesFileMetadataCloudStorage.ts b/services/reference_tables/src/v2/models/TableResultV2DataAttributesFileMetadataCloudStorage.ts new file mode 100644 index 000000000000..9c5a311d573d --- /dev/null +++ b/services/reference_tables/src/v2/models/TableResultV2DataAttributesFileMetadataCloudStorage.ts @@ -0,0 +1,80 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { TableResultV2DataAttributesFileMetadataCloudStorageErrorType } from "./TableResultV2DataAttributesFileMetadataCloudStorageErrorType"; +import { TableResultV2DataAttributesFileMetadataOneOfAccessDetails } from "./TableResultV2DataAttributesFileMetadataOneOfAccessDetails"; + +/** + * File metadata for reference tables created via cloud storage. + */ +export class TableResultV2DataAttributesFileMetadataCloudStorage { + /** + * The definition of `TableResultV2DataAttributesFileMetadataOneOfAccessDetails` object. + */ + "accessDetails"?: TableResultV2DataAttributesFileMetadataOneOfAccessDetails; + /** + * The error message returned from the sync. + */ + "errorMessage"?: string; + /** + * The number of rows that failed to sync. + */ + "errorRowCount"?: number; + /** + * The type of error that occurred during file processing. This field provides high-level error categories for easier troubleshooting and is only present when there are errors. + */ + "errorType"?: TableResultV2DataAttributesFileMetadataCloudStorageErrorType; + /** + * Whether this table is synced automatically. + */ + "syncEnabled"?: 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 = { + accessDetails: { + baseName: "access_details", + type: "TableResultV2DataAttributesFileMetadataOneOfAccessDetails", + }, + errorMessage: { + baseName: "error_message", + type: "string", + }, + errorRowCount: { + baseName: "error_row_count", + type: "number", + format: "int64", + }, + errorType: { + baseName: "error_type", + type: "TableResultV2DataAttributesFileMetadataCloudStorageErrorType", + }, + syncEnabled: { + baseName: "sync_enabled", + type: "boolean", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TableResultV2DataAttributesFileMetadataCloudStorage.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/TableResultV2DataAttributesFileMetadataCloudStorageErrorType.ts b/services/reference_tables/src/v2/models/TableResultV2DataAttributesFileMetadataCloudStorageErrorType.ts new file mode 100644 index 000000000000..a547e3f2c597 --- /dev/null +++ b/services/reference_tables/src/v2/models/TableResultV2DataAttributesFileMetadataCloudStorageErrorType.ts @@ -0,0 +1,25 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * The type of error that occurred during file processing. This field provides high-level error categories for easier troubleshooting and is only present when there are errors. + */ +export type TableResultV2DataAttributesFileMetadataCloudStorageErrorType = + | typeof TABLE_SCHEMA_ERROR + | typeof FILE_FORMAT_ERROR + | typeof CONFIGURATION_ERROR + | typeof QUOTA_EXCEEDED + | typeof CONFLICT_ERROR + | typeof VALIDATION_ERROR + | typeof STATE_ERROR + | typeof OPERATION_ERROR + | typeof SYSTEM_ERROR + | UnparsedObject; +export const TABLE_SCHEMA_ERROR = "TABLE_SCHEMA_ERROR"; +export const FILE_FORMAT_ERROR = "FILE_FORMAT_ERROR"; +export const CONFIGURATION_ERROR = "CONFIGURATION_ERROR"; +export const QUOTA_EXCEEDED = "QUOTA_EXCEEDED"; +export const CONFLICT_ERROR = "CONFLICT_ERROR"; +export const VALIDATION_ERROR = "VALIDATION_ERROR"; +export const STATE_ERROR = "STATE_ERROR"; +export const OPERATION_ERROR = "OPERATION_ERROR"; +export const SYSTEM_ERROR = "SYSTEM_ERROR"; diff --git a/services/reference_tables/src/v2/models/TableResultV2DataAttributesFileMetadataLocalFile.ts b/services/reference_tables/src/v2/models/TableResultV2DataAttributesFileMetadataLocalFile.ts new file mode 100644 index 000000000000..cde22e1c718b --- /dev/null +++ b/services/reference_tables/src/v2/models/TableResultV2DataAttributesFileMetadataLocalFile.ts @@ -0,0 +1,61 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * File metadata for reference tables created via upload. + */ +export class TableResultV2DataAttributesFileMetadataLocalFile { + /** + * The error message returned from the creation/update. + */ + "errorMessage"?: string; + /** + * The number of rows that failed to create/update. + */ + "errorRowCount"?: number; + /** + * The upload ID that was used to create/update the table. + */ + "uploadId"?: 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 = { + errorMessage: { + baseName: "error_message", + type: "string", + }, + errorRowCount: { + baseName: "error_row_count", + type: "number", + format: "int64", + }, + uploadId: { + baseName: "upload_id", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TableResultV2DataAttributesFileMetadataLocalFile.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/TableResultV2DataAttributesFileMetadataOneOfAccessDetails.ts b/services/reference_tables/src/v2/models/TableResultV2DataAttributesFileMetadataOneOfAccessDetails.ts new file mode 100644 index 000000000000..74f14d0e7065 --- /dev/null +++ b/services/reference_tables/src/v2/models/TableResultV2DataAttributesFileMetadataOneOfAccessDetails.ts @@ -0,0 +1,64 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail } from "./TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail"; +import { TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail } from "./TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail"; +import { TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail } from "./TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail"; + +/** + * The definition of `TableResultV2DataAttributesFileMetadataOneOfAccessDetails` object. + */ +export class TableResultV2DataAttributesFileMetadataOneOfAccessDetails { + /** + * The definition of `TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail` object. + */ + "awsDetail"?: TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail; + /** + * The definition of `TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail` object. + */ + "azureDetail"?: TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail; + /** + * The definition of `TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail` object. + */ + "gcpDetail"?: TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail; + /** + * 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 = { + awsDetail: { + baseName: "aws_detail", + type: "TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail", + }, + azureDetail: { + baseName: "azure_detail", + type: "TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail", + }, + gcpDetail: { + baseName: "gcp_detail", + type: "TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TableResultV2DataAttributesFileMetadataOneOfAccessDetails.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail.ts b/services/reference_tables/src/v2/models/TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail.ts new file mode 100644 index 000000000000..131feebf3af4 --- /dev/null +++ b/services/reference_tables/src/v2/models/TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail.ts @@ -0,0 +1,60 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * The definition of `TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail` object. + */ +export class TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail { + /** + * The ID of the AWS account. + */ + "awsAccountId"?: string; + /** + * The name of the AWS bucket. + */ + "awsBucketName"?: string; + /** + * The relative file path from the S3 bucket root to the CSV file. + */ + "filePath"?: 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 = { + awsAccountId: { + baseName: "aws_account_id", + type: "string", + }, + awsBucketName: { + baseName: "aws_bucket_name", + type: "string", + }, + filePath: { + baseName: "file_path", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail.ts b/services/reference_tables/src/v2/models/TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail.ts new file mode 100644 index 000000000000..d380cd967ea5 --- /dev/null +++ b/services/reference_tables/src/v2/models/TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail.ts @@ -0,0 +1,76 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * The definition of `TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail` object. + */ +export class TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail { + /** + * The Azure client ID. + */ + "azureClientId"?: string; + /** + * The name of the Azure container. + */ + "azureContainerName"?: string; + /** + * The name of the Azure storage account. + */ + "azureStorageAccountName"?: string; + /** + * The ID of the Azure tenant. + */ + "azureTenantId"?: string; + /** + * The relative file path from the Azure container root to the CSV file. + */ + "filePath"?: 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 = { + azureClientId: { + baseName: "azure_client_id", + type: "string", + }, + azureContainerName: { + baseName: "azure_container_name", + type: "string", + }, + azureStorageAccountName: { + baseName: "azure_storage_account_name", + type: "string", + }, + azureTenantId: { + baseName: "azure_tenant_id", + type: "string", + }, + filePath: { + baseName: "file_path", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail.ts b/services/reference_tables/src/v2/models/TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail.ts new file mode 100644 index 000000000000..87e0dde75225 --- /dev/null +++ b/services/reference_tables/src/v2/models/TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail.ts @@ -0,0 +1,68 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * The definition of `TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail` object. + */ +export class TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail { + /** + * The relative file path from the GCS bucket root to the CSV file. + */ + "filePath"?: string; + /** + * The name of the GCP bucket. + */ + "gcpBucketName"?: string; + /** + * The ID of the GCP project. + */ + "gcpProjectId"?: string; + /** + * The email of the GCP service account. + */ + "gcpServiceAccountEmail"?: 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 = { + filePath: { + baseName: "file_path", + type: "string", + }, + gcpBucketName: { + baseName: "gcp_bucket_name", + type: "string", + }, + gcpProjectId: { + baseName: "gcp_project_id", + type: "string", + }, + gcpServiceAccountEmail: { + baseName: "gcp_service_account_email", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/TableResultV2DataAttributesSchema.ts b/services/reference_tables/src/v2/models/TableResultV2DataAttributesSchema.ts new file mode 100644 index 000000000000..05fe91b524dd --- /dev/null +++ b/services/reference_tables/src/v2/models/TableResultV2DataAttributesSchema.ts @@ -0,0 +1,56 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { TableResultV2DataAttributesSchemaFieldsItems } from "./TableResultV2DataAttributesSchemaFieldsItems"; + +/** + * The definition of `TableResultV2DataAttributesSchema` object. + */ +export class TableResultV2DataAttributesSchema { + /** + * The `schema` `fields`. + */ + "fields": Array; + /** + * List of field names that serve as primary keys for the table. Currently only 1 primary key is supported, and it is used as an ID to retrieve rows. + */ + "primaryKeys": 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 = { + fields: { + baseName: "fields", + type: "Array", + required: true, + }, + primaryKeys: { + baseName: "primary_keys", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TableResultV2DataAttributesSchema.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/TableResultV2DataAttributesSchemaFieldsItems.ts b/services/reference_tables/src/v2/models/TableResultV2DataAttributesSchemaFieldsItems.ts new file mode 100644 index 000000000000..daf202357833 --- /dev/null +++ b/services/reference_tables/src/v2/models/TableResultV2DataAttributesSchemaFieldsItems.ts @@ -0,0 +1,56 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { ReferenceTableSchemaFieldType } from "./ReferenceTableSchemaFieldType"; + +/** + * The definition of `TableResultV2DataAttributesSchemaFieldsItems` object. + */ +export class TableResultV2DataAttributesSchemaFieldsItems { + /** + * The field name. + */ + "name": string; + /** + * The field type for reference table schema fields. + */ + "type": ReferenceTableSchemaFieldType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + name: { + baseName: "name", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "ReferenceTableSchemaFieldType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TableResultV2DataAttributesSchemaFieldsItems.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/TableResultV2DataType.ts b/services/reference_tables/src/v2/models/TableResultV2DataType.ts new file mode 100644 index 000000000000..3864188ae64e --- /dev/null +++ b/services/reference_tables/src/v2/models/TableResultV2DataType.ts @@ -0,0 +1,7 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Reference table resource type. + */ +export type TableResultV2DataType = typeof REFERENCE_TABLE | UnparsedObject; +export const REFERENCE_TABLE = "reference_table"; diff --git a/services/reference_tables/src/v2/models/TableRowResourceArray.ts b/services/reference_tables/src/v2/models/TableRowResourceArray.ts new file mode 100644 index 000000000000..5f1215d5ee22 --- /dev/null +++ b/services/reference_tables/src/v2/models/TableRowResourceArray.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { TableRowResourceData } from "./TableRowResourceData"; + +/** + * The definition of `TableRowResourceArray` object. + */ +export class TableRowResourceArray { + /** + * The rows. + */ + "data": 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 = { + data: { + baseName: "data", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TableRowResourceArray.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/TableRowResourceData.ts b/services/reference_tables/src/v2/models/TableRowResourceData.ts new file mode 100644 index 000000000000..60ed68eccaf9 --- /dev/null +++ b/services/reference_tables/src/v2/models/TableRowResourceData.ts @@ -0,0 +1,64 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { TableRowResourceDataAttributes } from "./TableRowResourceDataAttributes"; +import { TableRowResourceDataType } from "./TableRowResourceDataType"; + +/** + * The definition of `TableRowResourceData` object. + */ +export class TableRowResourceData { + /** + * The definition of `TableRowResourceDataAttributes` object. + */ + "attributes"?: TableRowResourceDataAttributes; + /** + * The ID of the row. + */ + "id"?: string; + /** + * Row resource type. + */ + "type": TableRowResourceDataType; + /** + * 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: "TableRowResourceDataAttributes", + }, + id: { + baseName: "id", + type: "string", + }, + type: { + baseName: "type", + type: "TableRowResourceDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TableRowResourceData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/TableRowResourceDataAttributes.ts b/services/reference_tables/src/v2/models/TableRowResourceDataAttributes.ts new file mode 100644 index 000000000000..cf4b600bd1ff --- /dev/null +++ b/services/reference_tables/src/v2/models/TableRowResourceDataAttributes.ts @@ -0,0 +1,44 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * The definition of `TableRowResourceDataAttributes` object. + */ +export class TableRowResourceDataAttributes { + /** + * The values of the row. + */ + "values"?: { [key: string]: any }; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + values: { + baseName: "values", + type: "{ [key: string]: any; }", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return TableRowResourceDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/reference_tables/src/v2/models/TableRowResourceDataType.ts b/services/reference_tables/src/v2/models/TableRowResourceDataType.ts new file mode 100644 index 000000000000..073e9a42a161 --- /dev/null +++ b/services/reference_tables/src/v2/models/TableRowResourceDataType.ts @@ -0,0 +1,7 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Row resource type. + */ +export type TableRowResourceDataType = typeof ROW | UnparsedObject; +export const ROW = "row"; diff --git a/services/reference_tables/src/v2/models/TypingInfo.ts b/services/reference_tables/src/v2/models/TypingInfo.ts new file mode 100644 index 000000000000..08bf147af292 --- /dev/null +++ b/services/reference_tables/src/v2/models/TypingInfo.ts @@ -0,0 +1,171 @@ +import { ModelTypingInfo } from "@datadog/datadog-api-client"; + +import { APIErrorResponse } from "./APIErrorResponse"; +import { CreateTableRequest } from "./CreateTableRequest"; +import { CreateTableRequestData } from "./CreateTableRequestData"; +import { CreateTableRequestDataAttributes } from "./CreateTableRequestDataAttributes"; +import { CreateTableRequestDataAttributesFileMetadataCloudStorage } from "./CreateTableRequestDataAttributesFileMetadataCloudStorage"; +import { CreateTableRequestDataAttributesFileMetadataLocalFile } from "./CreateTableRequestDataAttributesFileMetadataLocalFile"; +import { CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails } from "./CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails"; +import { CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail } from "./CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail"; +import { CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail } from "./CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail"; +import { CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail } from "./CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail"; +import { CreateTableRequestDataAttributesSchema } from "./CreateTableRequestDataAttributesSchema"; +import { CreateTableRequestDataAttributesSchemaFieldsItems } from "./CreateTableRequestDataAttributesSchemaFieldsItems"; +import { CreateUploadRequest } from "./CreateUploadRequest"; +import { CreateUploadRequestData } from "./CreateUploadRequestData"; +import { CreateUploadRequestDataAttributes } from "./CreateUploadRequestDataAttributes"; +import { CreateUploadResponse } from "./CreateUploadResponse"; +import { CreateUploadResponseData } from "./CreateUploadResponseData"; +import { CreateUploadResponseDataAttributes } from "./CreateUploadResponseDataAttributes"; +import { PatchTableRequest } from "./PatchTableRequest"; +import { PatchTableRequestData } from "./PatchTableRequestData"; +import { PatchTableRequestDataAttributes } from "./PatchTableRequestDataAttributes"; +import { PatchTableRequestDataAttributesFileMetadataCloudStorage } from "./PatchTableRequestDataAttributesFileMetadataCloudStorage"; +import { PatchTableRequestDataAttributesFileMetadataLocalFile } from "./PatchTableRequestDataAttributesFileMetadataLocalFile"; +import { PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails } from "./PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails"; +import { PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail } from "./PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail"; +import { PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail } from "./PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail"; +import { PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail } from "./PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail"; +import { PatchTableRequestDataAttributesSchema } from "./PatchTableRequestDataAttributesSchema"; +import { PatchTableRequestDataAttributesSchemaFieldsItems } from "./PatchTableRequestDataAttributesSchemaFieldsItems"; +import { TableResultV2 } from "./TableResultV2"; +import { TableResultV2Array } from "./TableResultV2Array"; +import { TableResultV2Data } from "./TableResultV2Data"; +import { TableResultV2DataAttributes } from "./TableResultV2DataAttributes"; +import { TableResultV2DataAttributesFileMetadataCloudStorage } from "./TableResultV2DataAttributesFileMetadataCloudStorage"; +import { TableResultV2DataAttributesFileMetadataLocalFile } from "./TableResultV2DataAttributesFileMetadataLocalFile"; +import { TableResultV2DataAttributesFileMetadataOneOfAccessDetails } from "./TableResultV2DataAttributesFileMetadataOneOfAccessDetails"; +import { TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail } from "./TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail"; +import { TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail } from "./TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail"; +import { TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail } from "./TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail"; +import { TableResultV2DataAttributesSchema } from "./TableResultV2DataAttributesSchema"; +import { TableResultV2DataAttributesSchemaFieldsItems } from "./TableResultV2DataAttributesSchemaFieldsItems"; +import { TableRowResourceArray } from "./TableRowResourceArray"; +import { TableRowResourceData } from "./TableRowResourceData"; +import { TableRowResourceDataAttributes } from "./TableRowResourceDataAttributes"; + +export const TypingInfo: ModelTypingInfo = { + enumsMap: { + CreateTableRequestDataType: ["reference_table"], + CreateUploadRequestDataType: ["upload"], + CreateUploadResponseDataType: ["upload"], + PatchTableRequestDataType: ["reference_table"], + ReferenceTableCreateSourceType: ["LOCAL_FILE", "S3", "GCS", "AZURE"], + ReferenceTableSchemaFieldType: ["STRING", "INT32"], + ReferenceTableSortType: [ + "updated_at", + "table_name", + "status", + "-updated_at", + "-table_name", + "-status", + ], + ReferenceTableSourceType: [ + "LOCAL_FILE", + "S3", + "GCS", + "AZURE", + "SERVICENOW", + "SALESFORCE", + "DATABRICKS", + "SNOWFLAKE", + ], + TableResultV2DataAttributesFileMetadataCloudStorageErrorType: [ + "TABLE_SCHEMA_ERROR", + "FILE_FORMAT_ERROR", + "CONFIGURATION_ERROR", + "QUOTA_EXCEEDED", + "CONFLICT_ERROR", + "VALIDATION_ERROR", + "STATE_ERROR", + "OPERATION_ERROR", + "SYSTEM_ERROR", + ], + TableResultV2DataType: ["reference_table"], + TableRowResourceDataType: ["row"], + }, + oneOfMap: { + CreateTableRequestDataAttributesFileMetadata: [ + "CreateTableRequestDataAttributesFileMetadataCloudStorage", + "CreateTableRequestDataAttributesFileMetadataLocalFile", + ], + PatchTableRequestDataAttributesFileMetadata: [ + "PatchTableRequestDataAttributesFileMetadataCloudStorage", + "PatchTableRequestDataAttributesFileMetadataLocalFile", + ], + TableResultV2DataAttributesFileMetadata: [ + "TableResultV2DataAttributesFileMetadataCloudStorage", + "TableResultV2DataAttributesFileMetadataLocalFile", + ], + }, + typeMap: { + APIErrorResponse: APIErrorResponse, + CreateTableRequest: CreateTableRequest, + CreateTableRequestData: CreateTableRequestData, + CreateTableRequestDataAttributes: CreateTableRequestDataAttributes, + CreateTableRequestDataAttributesFileMetadataCloudStorage: + CreateTableRequestDataAttributesFileMetadataCloudStorage, + CreateTableRequestDataAttributesFileMetadataLocalFile: + CreateTableRequestDataAttributesFileMetadataLocalFile, + CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails: + CreateTableRequestDataAttributesFileMetadataOneOfAccessDetails, + CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail: + CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail, + CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail: + CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail, + CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail: + CreateTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail, + CreateTableRequestDataAttributesSchema: + CreateTableRequestDataAttributesSchema, + CreateTableRequestDataAttributesSchemaFieldsItems: + CreateTableRequestDataAttributesSchemaFieldsItems, + CreateUploadRequest: CreateUploadRequest, + CreateUploadRequestData: CreateUploadRequestData, + CreateUploadRequestDataAttributes: CreateUploadRequestDataAttributes, + CreateUploadResponse: CreateUploadResponse, + CreateUploadResponseData: CreateUploadResponseData, + CreateUploadResponseDataAttributes: CreateUploadResponseDataAttributes, + PatchTableRequest: PatchTableRequest, + PatchTableRequestData: PatchTableRequestData, + PatchTableRequestDataAttributes: PatchTableRequestDataAttributes, + PatchTableRequestDataAttributesFileMetadataCloudStorage: + PatchTableRequestDataAttributesFileMetadataCloudStorage, + PatchTableRequestDataAttributesFileMetadataLocalFile: + PatchTableRequestDataAttributesFileMetadataLocalFile, + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails: + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetails, + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail: + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAwsDetail, + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail: + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsAzureDetail, + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail: + PatchTableRequestDataAttributesFileMetadataOneOfAccessDetailsGcpDetail, + PatchTableRequestDataAttributesSchema: + PatchTableRequestDataAttributesSchema, + PatchTableRequestDataAttributesSchemaFieldsItems: + PatchTableRequestDataAttributesSchemaFieldsItems, + TableResultV2: TableResultV2, + TableResultV2Array: TableResultV2Array, + TableResultV2Data: TableResultV2Data, + TableResultV2DataAttributes: TableResultV2DataAttributes, + TableResultV2DataAttributesFileMetadataCloudStorage: + TableResultV2DataAttributesFileMetadataCloudStorage, + TableResultV2DataAttributesFileMetadataLocalFile: + TableResultV2DataAttributesFileMetadataLocalFile, + TableResultV2DataAttributesFileMetadataOneOfAccessDetails: + TableResultV2DataAttributesFileMetadataOneOfAccessDetails, + TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail: + TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAwsDetail, + TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail: + TableResultV2DataAttributesFileMetadataOneOfAccessDetailsAzureDetail, + TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail: + TableResultV2DataAttributesFileMetadataOneOfAccessDetailsGcpDetail, + TableResultV2DataAttributesSchema: TableResultV2DataAttributesSchema, + TableResultV2DataAttributesSchemaFieldsItems: + TableResultV2DataAttributesSchemaFieldsItems, + TableRowResourceArray: TableRowResourceArray, + TableRowResourceData: TableRowResourceData, + TableRowResourceDataAttributes: TableRowResourceDataAttributes, + }, +}; diff --git a/services/reference_tables/tsconfig.json b/services/reference_tables/tsconfig.json new file mode 100644 index 000000000000..d6c32bfb893c --- /dev/null +++ b/services/reference_tables/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "strict": true, + /* Basic Options */ + "target": "es6", + "module": "commonjs", + "moduleResolution": "node", + "declaration": true, + + "esModuleInterop": true, + "resolveJsonModule": true, + + "noImplicitAny": true, + "noImplicitThis": true, + + /* Additional Checks */ + "noUnusedLocals": false /* Report errors on unused locals. */, // TODO: reenable (unused imports!) + "noUnusedParameters": false /* Report errors on unused parameters. */, // TODO: set to true again + "noImplicitReturns": true /* Report error when not all code paths in function return a value. */, + "noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */, + + "sourceMap": true, + "outDir": "./dist", + "lib": ["es6", "es7"] + }, + "exclude": ["dist", "node_modules", "tests"], + "include": ["src"] +} diff --git a/yarn.lock b/yarn.lock index 89089aed98b6..69779598d684 100644 --- a/yarn.lock +++ b/yarn.lock @@ -829,6 +829,15 @@ __metadata: languageName: unknown linkType: soft +"@datadog/datadog-api-client-reference-tables@workspace:services/reference_tables": + version: 0.0.0-use.local + resolution: "@datadog/datadog-api-client-reference-tables@workspace:services/reference_tables" + dependencies: + "@datadog/datadog-api-client": "npm:^2.0.0-beta.0" + typescript: "npm:5.8.3" + languageName: unknown + linkType: soft + "@datadog/datadog-api-client-restriction-policies@workspace:services/restriction_policies": version: 0.0.0-use.local resolution: "@datadog/datadog-api-client-restriction-policies@workspace:services/restriction_policies"