polytomic 1.5.0 → 1.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Client.d.ts +10 -0
- package/Client.js +25 -20
- package/api/errors/BadRequestError.d.ts +2 -2
- package/api/errors/BadRequestError.js +1 -1
- package/api/errors/ForbiddenError.d.ts +2 -2
- package/api/errors/ForbiddenError.js +1 -1
- package/api/errors/InternalServerError.d.ts +2 -2
- package/api/errors/InternalServerError.js +1 -1
- package/api/errors/NotFoundError.d.ts +2 -2
- package/api/errors/NotFoundError.js +1 -1
- package/api/errors/UnauthorizedError.d.ts +2 -2
- package/api/errors/UnauthorizedError.js +1 -1
- package/api/errors/UnprocessableEntityError.d.ts +2 -2
- package/api/errors/UnprocessableEntityError.js +1 -1
- package/api/resources/bulkSync/client/Client.d.ts +54 -11
- package/api/resources/bulkSync/client/Client.js +106 -40
- package/api/resources/bulkSync/client/requests/CreateBulkSyncRequest.d.ts +1 -1
- package/api/resources/bulkSync/client/requests/UpdateBulkSyncRequest.d.ts +1 -1
- package/api/resources/bulkSync/client/requests/index.d.ts +6 -6
- package/api/resources/bulkSync/resources/executions/client/Client.d.ts +31 -3
- package/api/resources/bulkSync/resources/executions/client/Client.js +106 -10
- package/api/resources/bulkSync/resources/executions/client/index.d.ts +1 -1
- package/api/resources/bulkSync/resources/executions/client/index.js +15 -0
- package/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListStatusRequest.d.ts +24 -0
- package/api/resources/bulkSync/resources/executions/client/requests/index.d.ts +1 -0
- package/api/resources/bulkSync/resources/executions/client/requests/index.js +2 -0
- package/api/resources/bulkSync/resources/index.d.ts +1 -0
- package/api/resources/bulkSync/resources/index.js +1 -0
- package/api/resources/bulkSync/resources/schemas/client/Client.d.ts +29 -5
- package/api/resources/bulkSync/resources/schemas/client/Client.js +48 -19
- package/api/resources/bulkSync/resources/schemas/client/requests/BulkSyncSchemasRequest.d.ts +1 -1
- package/api/resources/bulkSync/resources/schemas/client/requests/SchemasListRequest.d.ts +1 -1
- package/api/resources/bulkSync/resources/schemas/client/requests/UpdateBulkSchema.d.ts +2 -1
- package/api/resources/bulkSync/resources/schemas/client/requests/index.d.ts +3 -3
- package/api/resources/bulkSync/types/V2CreateBulkSyncRequestSchemasItem.d.ts +1 -1
- package/api/resources/bulkSync/types/V2UpdateBulkSyncRequestSchemasItem.d.ts +1 -1
- package/api/resources/bulkSync/types/index.d.ts +0 -4
- package/api/resources/bulkSync/types/index.js +0 -4
- package/api/resources/connections/client/Client.d.ts +40 -9
- package/api/resources/connections/client/Client.js +78 -30
- package/api/resources/connections/client/requests/index.d.ts +4 -4
- package/api/resources/events/client/Client.d.ts +15 -3
- package/api/resources/events/client/Client.js +19 -8
- package/api/resources/events/client/requests/index.d.ts +1 -1
- package/api/resources/identity/client/Client.d.ts +11 -2
- package/api/resources/identity/client/Client.js +10 -5
- package/api/resources/index.d.ts +2 -0
- package/api/resources/index.js +3 -1
- package/api/resources/jobs/client/Client.d.ts +13 -2
- package/api/resources/jobs/client/Client.js +13 -6
- package/api/resources/modelSync/client/Client.d.ts +65 -22
- package/api/resources/modelSync/client/Client.js +135 -60
- package/api/resources/modelSync/client/requests/CreateModelSyncRequest.d.ts +4 -7
- package/api/resources/modelSync/client/requests/ModelSyncGetSourceRequest.d.ts +1 -1
- package/api/resources/modelSync/client/requests/UpdateModelSyncRequest.d.ts +4 -7
- package/api/resources/modelSync/client/requests/index.d.ts +6 -6
- package/api/resources/modelSync/resources/executions/client/Client.d.ts +30 -5
- package/api/resources/modelSync/resources/executions/client/Client.js +48 -18
- package/api/resources/models/client/Client.d.ts +46 -9
- package/api/resources/models/client/Client.js +85 -31
- package/api/resources/models/client/requests/GetEnrichmentInputFieldsRequest.d.ts +1 -1
- package/api/resources/models/client/requests/ModelsCreateRequest.d.ts +1 -1
- package/api/resources/models/client/requests/ModelsPreviewRequest.d.ts +1 -1
- package/api/resources/models/client/requests/UpdateModelRequest.d.ts +1 -1
- package/api/resources/models/client/requests/index.d.ts +7 -7
- package/api/resources/organization/client/Client.d.ts +33 -6
- package/api/resources/organization/client/Client.js +55 -20
- package/api/resources/organization/client/requests/index.d.ts +2 -2
- package/api/resources/permissions/client/Client.d.ts +7 -0
- package/api/resources/permissions/resources/policies/client/Client.d.ts +28 -6
- package/api/resources/permissions/resources/policies/client/Client.js +50 -20
- package/api/resources/permissions/resources/policies/client/requests/CreatePolicyRequest.d.ts +1 -1
- package/api/resources/permissions/resources/policies/client/requests/UpdatePolicyRequest.d.ts +1 -1
- package/api/resources/permissions/resources/policies/client/requests/index.d.ts +2 -2
- package/api/resources/permissions/resources/roles/client/Client.d.ts +28 -6
- package/api/resources/permissions/resources/roles/client/Client.js +50 -20
- package/api/resources/permissions/resources/roles/client/requests/index.d.ts +2 -2
- package/api/resources/queryRunner/client/Client.d.ts +58 -0
- package/api/resources/queryRunner/client/Client.js +223 -0
- package/api/resources/queryRunner/client/index.d.ts +1 -0
- package/api/resources/queryRunner/client/index.js +17 -0
- package/api/resources/queryRunner/client/requests/QueryRunnerGetQueryRequest.d.ts +10 -0
- package/api/resources/queryRunner/client/requests/V4RunQueryRequest.d.ts +15 -0
- package/api/resources/queryRunner/client/requests/index.d.ts +2 -0
- package/api/resources/queryRunner/client/requests/index.js +2 -0
- package/api/resources/queryRunner/index.d.ts +1 -0
- package/api/resources/queryRunner/index.js +17 -0
- package/api/resources/schemas/client/Client.d.ts +26 -5
- package/api/resources/schemas/client/Client.js +44 -18
- package/api/resources/users/client/Client.d.ts +45 -7
- package/api/resources/users/client/Client.js +75 -26
- package/api/resources/users/client/requests/index.d.ts +3 -3
- package/api/resources/webhooks/client/Client.d.ts +32 -6
- package/api/resources/webhooks/client/Client.js +54 -20
- package/api/resources/webhooks/client/requests/index.d.ts +2 -2
- package/api/types/ActivateSyncEnvelope.d.ts +1 -1
- package/api/types/ApiKeyResponseEnvelope.d.ts +1 -1
- package/api/types/BulkFilter.d.ts +10 -0
- package/api/types/BulkItemizedSchedule.d.ts +1 -1
- package/api/types/BulkMultiScheduleConfiguration.d.ts +2 -2
- package/api/types/BulkSchedule.d.ts +1 -1
- package/api/types/BulkSchema.d.ts +2 -1
- package/api/types/BulkSchemaEnvelope.d.ts +1 -1
- package/api/types/BulkSyncCanceledEvent.d.ts +11 -0
- package/api/types/BulkSyncCompletedEvent.d.ts +12 -0
- package/api/types/BulkSyncCompletedWithErrorEvent.d.ts +12 -0
- package/api/types/BulkSyncDest.d.ts +1 -1
- package/api/types/BulkSyncDestEnvelope.d.ts +1 -1
- package/api/types/BulkSyncExecution.d.ts +1 -1
- package/api/types/BulkSyncExecutionEnvelope.d.ts +1 -1
- package/api/types/BulkSyncExecutionStatus.d.ts +10 -0
- package/api/types/BulkSyncFailedEvent.d.ts +12 -0
- package/api/types/BulkSyncFailedEvent.js +5 -0
- package/api/types/BulkSyncListEnvelope.d.ts +1 -1
- package/api/types/BulkSyncResponse.d.ts +1 -1
- package/api/types/BulkSyncResponseEnvelope.d.ts +1 -1
- package/api/types/BulkSyncRunningEvent.d.ts +11 -0
- package/api/types/BulkSyncRunningEvent.js +5 -0
- package/api/types/BulkSyncSchemaExecution.d.ts +1 -1
- package/api/types/BulkSyncSchemaExecutionStatus.d.ts +15 -0
- package/api/types/BulkSyncSchemaExecutionStatus.js +5 -0
- package/api/types/BulkSyncSource.d.ts +1 -1
- package/api/types/BulkSyncSourceEnvelope.d.ts +1 -1
- package/api/types/BulkSyncSourceSchemaEnvelope.d.ts +1 -1
- package/api/types/BulkSyncSourceStatusEnvelope.d.ts +1 -1
- package/api/types/BulkSyncStatusEnvelope.d.ts +1 -1
- package/api/types/BulkSyncStatusResponse.d.ts +1 -1
- package/api/types/ConnectCardResponseEnvelope.d.ts +1 -1
- package/api/types/ConnectionListResponseEnvelope.d.ts +1 -1
- package/api/types/ConnectionMetaResponse.d.ts +1 -1
- package/api/types/ConnectionParameterValuesResp.d.ts +1 -1
- package/api/types/ConnectionParameterValuesResponseEnvelope.d.ts +1 -1
- package/api/types/ConnectionResponseEnvelope.d.ts +1 -1
- package/api/types/ConnectionResponseSchema.d.ts +1 -1
- package/api/types/ConnectionTypeResponseEnvelope.d.ts +1 -1
- package/api/types/CreateConnectionResponseEnvelope.d.ts +1 -1
- package/api/types/CreateConnectionResponseSchema.d.ts +1 -1
- package/api/types/CreateModelRequest.d.ts +1 -1
- package/api/types/Enrichment.d.ts +1 -1
- package/api/types/Event.d.ts +2 -1
- package/api/types/EventBody.d.ts +5 -0
- package/api/types/EventBody.js +5 -0
- package/api/types/EventsEnvelope.d.ts +1 -1
- package/api/types/ExecutionLogsResponseEnvelope.d.ts +1 -1
- package/api/types/FieldConfiguration.js +5 -0
- package/api/types/Filter.d.ts +1 -1
- package/api/types/GetConnectionMetaEnvelope.d.ts +1 -1
- package/api/types/GetExecutionResponseEnvelope.d.ts +1 -1
- package/api/types/GetExecutionResponseSchema.d.ts +1 -1
- package/api/types/GetIdentityResponseEnvelope.d.ts +1 -1
- package/api/types/GetModelSyncSourceMetaEnvelope.d.ts +1 -1
- package/api/types/Identity.d.ts +1 -1
- package/api/types/JobResponse.d.ts +1 -1
- package/api/types/JobResponseEnvelope.d.ts +1 -1
- package/api/types/ListBulkSchema.d.ts +1 -1
- package/api/types/ListBulkSyncExecutionStatusEnvelope.d.ts +7 -0
- package/api/types/ListBulkSyncExecutionStatusEnvelope.js +5 -0
- package/api/types/ListBulkSyncExecutionsEnvelope.d.ts +1 -1
- package/api/types/ListExecutionResponseEnvelope.d.ts +1 -1
- package/api/types/ListModelSyncResponseEnvelope.d.ts +1 -1
- package/api/types/ListPoliciesResponseEnvelope.d.ts +1 -1
- package/api/types/ListUsersEnvelope.d.ts +1 -1
- package/api/types/ModelFieldResponse.d.ts +1 -1
- package/api/types/ModelListResponseEnvelope.d.ts +1 -1
- package/api/types/ModelRelation.d.ts +1 -1
- package/api/types/ModelResponse.d.ts +1 -1
- package/api/types/ModelResponseEnvelope.d.ts +1 -1
- package/api/types/ModelSample.d.ts +1 -1
- package/api/types/ModelSampleResponseEnvelope.d.ts +1 -1
- package/api/types/ModelSyncField.d.ts +6 -2
- package/api/types/ModelSyncResponse.d.ts +1 -1
- package/api/types/ModelSyncResponseEnvelope.d.ts +1 -1
- package/api/types/ModelSyncSourceMetaResponse.d.ts +1 -1
- package/api/types/OrganizationEnvelope.d.ts +1 -1
- package/api/types/OrganizationsEnvelope.d.ts +1 -1
- package/api/types/Override.d.ts +1 -1
- package/api/types/Pagination.d.ts +9 -0
- package/api/types/Pagination.js +5 -0
- package/api/types/PolicyResponse.d.ts +1 -1
- package/api/types/PolicyResponseEnvelope.d.ts +1 -1
- package/api/types/Relation.d.ts +1 -1
- package/api/types/RoleListResponseEnvelope.d.ts +1 -1
- package/api/types/RoleResponseEnvelope.d.ts +1 -1
- package/api/types/Schedule.d.ts +1 -1
- package/api/types/ScheduleOptionResponse.d.ts +1 -1
- package/api/types/ScheduleOptionResponseEnvelope.d.ts +1 -1
- package/api/types/ScheduleScheduleOption.d.ts +1 -1
- package/api/types/Schema.d.ts +1 -1
- package/api/{resources/bulkSync/types → types}/SchemaConfiguration.d.ts +3 -2
- package/api/types/SchemaConfiguration.js +5 -0
- package/api/types/SchemaField.d.ts +1 -1
- package/api/types/StartModelSyncResponseEnvelope.d.ts +1 -1
- package/api/types/StartModelSyncResponseSchema.d.ts +1 -1
- package/api/types/SyncCanceledEvent.d.ts +12 -0
- package/api/types/SyncCanceledEvent.js +5 -0
- package/api/types/SyncCompletedEvent.d.ts +25 -0
- package/api/types/SyncCompletedEvent.js +5 -0
- package/api/types/SyncCompletedWithErrorsEvent.d.ts +13 -0
- package/api/types/SyncCompletedWithErrorsEvent.js +5 -0
- package/api/types/SyncDestinationProperties.d.ts +1 -0
- package/api/types/SyncFailedEvent.d.ts +11 -0
- package/api/types/SyncFailedEvent.js +5 -0
- package/api/types/SyncRunningEvent.d.ts +10 -0
- package/api/types/SyncRunningEvent.js +5 -0
- package/api/types/SyncStatusEnvelope.d.ts +1 -1
- package/api/types/SyncStatusResponse.d.ts +1 -1
- package/api/types/TargetField.d.ts +1 -1
- package/api/types/TargetResponse.d.ts +1 -1
- package/api/types/TargetResponseEnvelope.d.ts +1 -1
- package/api/types/UserEnvelope.d.ts +1 -1
- package/api/types/V2SchemaConfigurationFieldsItem.d.ts +5 -0
- package/api/types/V2SchemaConfigurationFieldsItem.js +5 -0
- package/api/types/V4QueryResultsEnvelope.d.ts +8 -0
- package/api/types/V4QueryResultsEnvelope.js +5 -0
- package/api/types/V4RunQueryEnvelope.d.ts +7 -0
- package/api/types/V4RunQueryEnvelope.js +5 -0
- package/api/types/V4RunQueryResult.d.ts +18 -0
- package/api/types/V4RunQueryResult.js +5 -0
- package/api/types/WebhookEnvelope.d.ts +1 -1
- package/api/types/WebhookListEnvelope.d.ts +1 -1
- package/api/types/WorkTaskStatus.d.ts +2 -1
- package/api/types/WorkTaskStatus.js +1 -0
- package/api/types/index.d.ts +22 -0
- package/api/types/index.js +22 -0
- package/core/fetcher/Fetcher.d.ts +3 -2
- package/core/fetcher/Fetcher.js +130 -19
- package/core/runtime/runtime.d.ts +1 -1
- package/core/runtime/runtime.js +11 -1
- package/dist/Client.d.ts +10 -0
- package/dist/Client.js +25 -20
- package/dist/api/errors/BadRequestError.d.ts +2 -2
- package/dist/api/errors/BadRequestError.js +1 -1
- package/dist/api/errors/ForbiddenError.d.ts +2 -2
- package/dist/api/errors/ForbiddenError.js +1 -1
- package/dist/api/errors/InternalServerError.d.ts +2 -2
- package/dist/api/errors/InternalServerError.js +1 -1
- package/dist/api/errors/NotFoundError.d.ts +2 -2
- package/dist/api/errors/NotFoundError.js +1 -1
- package/dist/api/errors/UnauthorizedError.d.ts +2 -2
- package/dist/api/errors/UnauthorizedError.js +1 -1
- package/dist/api/errors/UnprocessableEntityError.d.ts +2 -2
- package/dist/api/errors/UnprocessableEntityError.js +1 -1
- package/dist/api/resources/bulkSync/client/Client.d.ts +54 -11
- package/dist/api/resources/bulkSync/client/Client.js +106 -40
- package/dist/api/resources/bulkSync/client/requests/CreateBulkSyncRequest.d.ts +1 -1
- package/dist/api/resources/bulkSync/client/requests/UpdateBulkSyncRequest.d.ts +1 -1
- package/dist/api/resources/bulkSync/client/requests/index.d.ts +6 -6
- package/dist/api/resources/bulkSync/resources/executions/client/Client.d.ts +31 -3
- package/dist/api/resources/bulkSync/resources/executions/client/Client.js +106 -10
- package/dist/api/resources/bulkSync/resources/executions/client/index.d.ts +1 -1
- package/dist/api/resources/bulkSync/resources/executions/client/index.js +15 -0
- package/dist/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListStatusRequest.d.ts +24 -0
- package/dist/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListStatusRequest.js +5 -0
- package/dist/api/resources/bulkSync/resources/executions/client/requests/index.d.ts +1 -0
- package/dist/api/resources/bulkSync/resources/executions/client/requests/index.js +2 -0
- package/dist/api/resources/bulkSync/resources/index.d.ts +1 -0
- package/dist/api/resources/bulkSync/resources/index.js +1 -0
- package/dist/api/resources/bulkSync/resources/schemas/client/Client.d.ts +29 -5
- package/dist/api/resources/bulkSync/resources/schemas/client/Client.js +48 -19
- package/dist/api/resources/bulkSync/resources/schemas/client/requests/BulkSyncSchemasRequest.d.ts +1 -1
- package/dist/api/resources/bulkSync/resources/schemas/client/requests/SchemasListRequest.d.ts +1 -1
- package/dist/api/resources/bulkSync/resources/schemas/client/requests/UpdateBulkSchema.d.ts +2 -1
- package/dist/api/resources/bulkSync/resources/schemas/client/requests/index.d.ts +3 -3
- package/dist/api/resources/bulkSync/types/V2CreateBulkSyncRequestSchemasItem.d.ts +1 -1
- package/dist/api/resources/bulkSync/types/V2UpdateBulkSyncRequestSchemasItem.d.ts +1 -1
- package/dist/api/resources/bulkSync/types/index.d.ts +0 -4
- package/dist/api/resources/bulkSync/types/index.js +0 -4
- package/dist/api/resources/connections/client/Client.d.ts +40 -9
- package/dist/api/resources/connections/client/Client.js +78 -30
- package/dist/api/resources/connections/client/requests/index.d.ts +4 -4
- package/dist/api/resources/events/client/Client.d.ts +15 -3
- package/dist/api/resources/events/client/Client.js +19 -8
- package/dist/api/resources/events/client/requests/index.d.ts +1 -1
- package/dist/api/resources/identity/client/Client.d.ts +11 -2
- package/dist/api/resources/identity/client/Client.js +10 -5
- package/dist/api/resources/index.d.ts +2 -0
- package/dist/api/resources/index.js +3 -1
- package/dist/api/resources/jobs/client/Client.d.ts +13 -2
- package/dist/api/resources/jobs/client/Client.js +13 -6
- package/dist/api/resources/modelSync/client/Client.d.ts +65 -22
- package/dist/api/resources/modelSync/client/Client.js +135 -60
- package/dist/api/resources/modelSync/client/requests/CreateModelSyncRequest.d.ts +4 -7
- package/dist/api/resources/modelSync/client/requests/ModelSyncGetSourceRequest.d.ts +1 -1
- package/dist/api/resources/modelSync/client/requests/UpdateModelSyncRequest.d.ts +4 -7
- package/dist/api/resources/modelSync/client/requests/index.d.ts +6 -6
- package/dist/api/resources/modelSync/resources/executions/client/Client.d.ts +30 -5
- package/dist/api/resources/modelSync/resources/executions/client/Client.js +48 -18
- package/dist/api/resources/models/client/Client.d.ts +46 -9
- package/dist/api/resources/models/client/Client.js +85 -31
- package/dist/api/resources/models/client/requests/GetEnrichmentInputFieldsRequest.d.ts +1 -1
- package/dist/api/resources/models/client/requests/ModelsCreateRequest.d.ts +1 -1
- package/dist/api/resources/models/client/requests/ModelsPreviewRequest.d.ts +1 -1
- package/dist/api/resources/models/client/requests/UpdateModelRequest.d.ts +1 -1
- package/dist/api/resources/models/client/requests/index.d.ts +7 -7
- package/dist/api/resources/organization/client/Client.d.ts +33 -6
- package/dist/api/resources/organization/client/Client.js +55 -20
- package/dist/api/resources/organization/client/requests/index.d.ts +2 -2
- package/dist/api/resources/permissions/client/Client.d.ts +7 -0
- package/dist/api/resources/permissions/resources/policies/client/Client.d.ts +28 -6
- package/dist/api/resources/permissions/resources/policies/client/Client.js +50 -20
- package/dist/api/resources/permissions/resources/policies/client/requests/CreatePolicyRequest.d.ts +1 -1
- package/dist/api/resources/permissions/resources/policies/client/requests/UpdatePolicyRequest.d.ts +1 -1
- package/dist/api/resources/permissions/resources/policies/client/requests/index.d.ts +2 -2
- package/dist/api/resources/permissions/resources/roles/client/Client.d.ts +28 -6
- package/dist/api/resources/permissions/resources/roles/client/Client.js +50 -20
- package/dist/api/resources/permissions/resources/roles/client/requests/index.d.ts +2 -2
- package/dist/api/resources/queryRunner/client/Client.d.ts +58 -0
- package/dist/api/resources/queryRunner/client/Client.js +223 -0
- package/dist/api/resources/queryRunner/client/index.d.ts +1 -0
- package/dist/api/resources/queryRunner/client/index.js +17 -0
- package/dist/api/resources/queryRunner/client/requests/QueryRunnerGetQueryRequest.d.ts +10 -0
- package/dist/api/resources/queryRunner/client/requests/QueryRunnerGetQueryRequest.js +5 -0
- package/dist/api/resources/queryRunner/client/requests/V4RunQueryRequest.d.ts +15 -0
- package/dist/api/resources/queryRunner/client/requests/V4RunQueryRequest.js +5 -0
- package/dist/api/resources/queryRunner/client/requests/index.d.ts +2 -0
- package/dist/api/resources/queryRunner/client/requests/index.js +2 -0
- package/dist/api/resources/queryRunner/index.d.ts +1 -0
- package/dist/api/resources/queryRunner/index.js +17 -0
- package/dist/api/resources/schemas/client/Client.d.ts +26 -5
- package/dist/api/resources/schemas/client/Client.js +44 -18
- package/dist/api/resources/users/client/Client.d.ts +45 -7
- package/dist/api/resources/users/client/Client.js +75 -26
- package/dist/api/resources/users/client/requests/index.d.ts +3 -3
- package/dist/api/resources/webhooks/client/Client.d.ts +32 -6
- package/dist/api/resources/webhooks/client/Client.js +54 -20
- package/dist/api/resources/webhooks/client/requests/index.d.ts +2 -2
- package/dist/api/types/ActivateSyncEnvelope.d.ts +1 -1
- package/dist/api/types/ApiKeyResponseEnvelope.d.ts +1 -1
- package/dist/api/types/BulkFilter.d.ts +10 -0
- package/dist/api/types/BulkFilter.js +5 -0
- package/dist/api/types/BulkItemizedSchedule.d.ts +1 -1
- package/dist/api/types/BulkMultiScheduleConfiguration.d.ts +2 -2
- package/dist/api/types/BulkSchedule.d.ts +1 -1
- package/dist/api/types/BulkSchema.d.ts +2 -1
- package/dist/api/types/BulkSchemaEnvelope.d.ts +1 -1
- package/dist/api/types/BulkSyncCanceledEvent.d.ts +11 -0
- package/dist/api/types/BulkSyncCanceledEvent.js +5 -0
- package/dist/api/types/BulkSyncCompletedEvent.d.ts +12 -0
- package/dist/api/types/BulkSyncCompletedEvent.js +5 -0
- package/dist/api/types/BulkSyncCompletedWithErrorEvent.d.ts +12 -0
- package/dist/api/types/BulkSyncCompletedWithErrorEvent.js +5 -0
- package/dist/api/types/BulkSyncDest.d.ts +1 -1
- package/dist/api/types/BulkSyncDestEnvelope.d.ts +1 -1
- package/dist/api/types/BulkSyncExecution.d.ts +1 -1
- package/dist/api/types/BulkSyncExecutionEnvelope.d.ts +1 -1
- package/dist/api/types/BulkSyncExecutionStatus.d.ts +10 -0
- package/dist/api/types/BulkSyncExecutionStatus.js +5 -0
- package/dist/api/types/BulkSyncFailedEvent.d.ts +12 -0
- package/dist/api/types/BulkSyncFailedEvent.js +5 -0
- package/dist/api/types/BulkSyncListEnvelope.d.ts +1 -1
- package/dist/api/types/BulkSyncResponse.d.ts +1 -1
- package/dist/api/types/BulkSyncResponseEnvelope.d.ts +1 -1
- package/dist/api/types/BulkSyncRunningEvent.d.ts +11 -0
- package/dist/api/types/BulkSyncRunningEvent.js +5 -0
- package/dist/api/types/BulkSyncSchemaExecution.d.ts +1 -1
- package/dist/api/types/BulkSyncSchemaExecutionStatus.d.ts +15 -0
- package/dist/api/types/BulkSyncSchemaExecutionStatus.js +5 -0
- package/dist/api/types/BulkSyncSource.d.ts +1 -1
- package/dist/api/types/BulkSyncSourceEnvelope.d.ts +1 -1
- package/dist/api/types/BulkSyncSourceSchemaEnvelope.d.ts +1 -1
- package/dist/api/types/BulkSyncSourceStatusEnvelope.d.ts +1 -1
- package/dist/api/types/BulkSyncStatusEnvelope.d.ts +1 -1
- package/dist/api/types/BulkSyncStatusResponse.d.ts +1 -1
- package/dist/api/types/ConnectCardResponseEnvelope.d.ts +1 -1
- package/dist/api/types/ConnectionListResponseEnvelope.d.ts +1 -1
- package/dist/api/types/ConnectionMetaResponse.d.ts +1 -1
- package/dist/api/types/ConnectionParameterValuesResp.d.ts +1 -1
- package/dist/api/types/ConnectionParameterValuesResponseEnvelope.d.ts +1 -1
- package/dist/api/types/ConnectionResponseEnvelope.d.ts +1 -1
- package/dist/api/types/ConnectionResponseSchema.d.ts +1 -1
- package/dist/api/types/ConnectionTypeResponseEnvelope.d.ts +1 -1
- package/dist/api/types/CreateConnectionResponseEnvelope.d.ts +1 -1
- package/dist/api/types/CreateConnectionResponseSchema.d.ts +1 -1
- package/dist/api/types/CreateModelRequest.d.ts +1 -1
- package/dist/api/types/Enrichment.d.ts +1 -1
- package/dist/api/types/Event.d.ts +2 -1
- package/dist/api/types/EventBody.d.ts +5 -0
- package/dist/api/types/EventBody.js +5 -0
- package/dist/api/types/EventsEnvelope.d.ts +1 -1
- package/dist/api/types/ExecutionLogsResponseEnvelope.d.ts +1 -1
- package/dist/api/types/FieldConfiguration.js +5 -0
- package/dist/api/types/Filter.d.ts +1 -1
- package/dist/api/types/GetConnectionMetaEnvelope.d.ts +1 -1
- package/dist/api/types/GetExecutionResponseEnvelope.d.ts +1 -1
- package/dist/api/types/GetExecutionResponseSchema.d.ts +1 -1
- package/dist/api/types/GetIdentityResponseEnvelope.d.ts +1 -1
- package/dist/api/types/GetModelSyncSourceMetaEnvelope.d.ts +1 -1
- package/dist/api/types/Identity.d.ts +1 -1
- package/dist/api/types/JobResponse.d.ts +1 -1
- package/dist/api/types/JobResponseEnvelope.d.ts +1 -1
- package/dist/api/types/ListBulkSchema.d.ts +1 -1
- package/dist/api/types/ListBulkSyncExecutionStatusEnvelope.d.ts +7 -0
- package/dist/api/types/ListBulkSyncExecutionStatusEnvelope.js +5 -0
- package/dist/api/types/ListBulkSyncExecutionsEnvelope.d.ts +1 -1
- package/dist/api/types/ListExecutionResponseEnvelope.d.ts +1 -1
- package/dist/api/types/ListModelSyncResponseEnvelope.d.ts +1 -1
- package/dist/api/types/ListPoliciesResponseEnvelope.d.ts +1 -1
- package/dist/api/types/ListUsersEnvelope.d.ts +1 -1
- package/dist/api/types/ModelFieldResponse.d.ts +1 -1
- package/dist/api/types/ModelListResponseEnvelope.d.ts +1 -1
- package/dist/api/types/ModelRelation.d.ts +1 -1
- package/dist/api/types/ModelResponse.d.ts +1 -1
- package/dist/api/types/ModelResponseEnvelope.d.ts +1 -1
- package/dist/api/types/ModelSample.d.ts +1 -1
- package/dist/api/types/ModelSampleResponseEnvelope.d.ts +1 -1
- package/dist/api/types/ModelSyncField.d.ts +6 -2
- package/dist/api/types/ModelSyncResponse.d.ts +1 -1
- package/dist/api/types/ModelSyncResponseEnvelope.d.ts +1 -1
- package/dist/api/types/ModelSyncSourceMetaResponse.d.ts +1 -1
- package/dist/api/types/OrganizationEnvelope.d.ts +1 -1
- package/dist/api/types/OrganizationsEnvelope.d.ts +1 -1
- package/dist/api/types/Override.d.ts +1 -1
- package/dist/api/types/Pagination.d.ts +9 -0
- package/dist/api/types/Pagination.js +5 -0
- package/dist/api/types/PolicyResponse.d.ts +1 -1
- package/dist/api/types/PolicyResponseEnvelope.d.ts +1 -1
- package/dist/api/types/Relation.d.ts +1 -1
- package/dist/api/types/RoleListResponseEnvelope.d.ts +1 -1
- package/dist/api/types/RoleResponseEnvelope.d.ts +1 -1
- package/dist/api/types/Schedule.d.ts +1 -1
- package/dist/api/types/ScheduleOptionResponse.d.ts +1 -1
- package/dist/api/types/ScheduleOptionResponseEnvelope.d.ts +1 -1
- package/dist/api/types/ScheduleScheduleOption.d.ts +1 -1
- package/dist/api/types/Schema.d.ts +1 -1
- package/dist/api/{resources/bulkSync/types → types}/SchemaConfiguration.d.ts +3 -2
- package/dist/api/types/SchemaConfiguration.js +5 -0
- package/dist/api/types/SchemaField.d.ts +1 -1
- package/dist/api/types/StartModelSyncResponseEnvelope.d.ts +1 -1
- package/dist/api/types/StartModelSyncResponseSchema.d.ts +1 -1
- package/dist/api/types/SyncCanceledEvent.d.ts +12 -0
- package/dist/api/types/SyncCanceledEvent.js +5 -0
- package/dist/api/types/SyncCompletedEvent.d.ts +25 -0
- package/dist/api/types/SyncCompletedEvent.js +5 -0
- package/dist/api/types/SyncCompletedWithErrorsEvent.d.ts +13 -0
- package/dist/api/types/SyncCompletedWithErrorsEvent.js +5 -0
- package/dist/api/types/SyncDestinationProperties.d.ts +1 -0
- package/dist/api/types/SyncFailedEvent.d.ts +11 -0
- package/dist/api/types/SyncFailedEvent.js +5 -0
- package/dist/api/types/SyncRunningEvent.d.ts +10 -0
- package/dist/api/types/SyncRunningEvent.js +5 -0
- package/dist/api/types/SyncStatusEnvelope.d.ts +1 -1
- package/dist/api/types/SyncStatusResponse.d.ts +1 -1
- package/dist/api/types/TargetField.d.ts +1 -1
- package/dist/api/types/TargetResponse.d.ts +1 -1
- package/dist/api/types/TargetResponseEnvelope.d.ts +1 -1
- package/dist/api/types/UserEnvelope.d.ts +1 -1
- package/dist/api/types/V2SchemaConfigurationFieldsItem.d.ts +5 -0
- package/dist/api/types/V2SchemaConfigurationFieldsItem.js +5 -0
- package/dist/api/types/V4QueryResultsEnvelope.d.ts +8 -0
- package/dist/api/types/V4QueryResultsEnvelope.js +5 -0
- package/dist/api/types/V4RunQueryEnvelope.d.ts +7 -0
- package/dist/api/types/V4RunQueryEnvelope.js +5 -0
- package/dist/api/types/V4RunQueryResult.d.ts +18 -0
- package/dist/api/types/V4RunQueryResult.js +5 -0
- package/dist/api/types/WebhookEnvelope.d.ts +1 -1
- package/dist/api/types/WebhookListEnvelope.d.ts +1 -1
- package/dist/api/types/WorkTaskStatus.d.ts +2 -1
- package/dist/api/types/WorkTaskStatus.js +1 -0
- package/dist/api/types/index.d.ts +22 -0
- package/dist/api/types/index.js +22 -0
- package/dist/core/fetcher/Fetcher.d.ts +3 -2
- package/dist/core/fetcher/Fetcher.js +130 -19
- package/dist/core/runtime/runtime.d.ts +1 -1
- package/dist/core/runtime/runtime.js +11 -1
- package/jest.config.js +2 -2
- package/package.json +13 -6
- package/api/resources/bulkSync/types/V2CreateBulkSyncRequestSchemasItemEnabledFieldsItem.d.ts +0 -5
- package/api/resources/bulkSync/types/V2UpdateBulkSyncRequestSchemasItemEnabledFieldsItem.d.ts +0 -5
- package/dist/api/resources/bulkSync/types/V2CreateBulkSyncRequestSchemasItemEnabledFieldsItem.d.ts +0 -5
- package/dist/api/resources/bulkSync/types/V2UpdateBulkSyncRequestSchemasItemEnabledFieldsItem.d.ts +0 -5
- package/tests/client.test.ts +0 -11
- /package/api/resources/bulkSync/{types/FieldConfiguration.js → resources/executions/client/requests/ExecutionsListStatusRequest.js} +0 -0
- /package/api/resources/{bulkSync/types/SchemaConfiguration.js → queryRunner/client/requests/QueryRunnerGetQueryRequest.js} +0 -0
- /package/api/resources/{bulkSync/types/V2CreateBulkSyncRequestSchemasItemEnabledFieldsItem.js → queryRunner/client/requests/V4RunQueryRequest.js} +0 -0
- /package/api/{resources/bulkSync/types/V2UpdateBulkSyncRequestSchemasItemEnabledFieldsItem.js → types/BulkFilter.js} +0 -0
- /package/{dist/api/resources/bulkSync/types/FieldConfiguration.js → api/types/BulkSyncCanceledEvent.js} +0 -0
- /package/{dist/api/resources/bulkSync/types/SchemaConfiguration.js → api/types/BulkSyncCompletedEvent.js} +0 -0
- /package/{dist/api/resources/bulkSync/types/V2CreateBulkSyncRequestSchemasItemEnabledFieldsItem.js → api/types/BulkSyncCompletedWithErrorEvent.js} +0 -0
- /package/{dist/api/resources/bulkSync/types/V2UpdateBulkSyncRequestSchemasItemEnabledFieldsItem.js → api/types/BulkSyncExecutionStatus.js} +0 -0
- /package/api/{resources/bulkSync/types → types}/FieldConfiguration.d.ts +0 -0
- /package/dist/api/{resources/bulkSync/types → types}/FieldConfiguration.d.ts +0 -0
|
@@ -3,29 +3,41 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as environments from "../../../../../../environments";
|
|
5
5
|
import * as core from "../../../../../../core";
|
|
6
|
-
import * as Polytomic from "
|
|
6
|
+
import * as Polytomic from "../../../../../index";
|
|
7
7
|
export declare namespace Roles {
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.PolytomicEnvironment | string>;
|
|
10
10
|
token: core.Supplier<core.BearerToken>;
|
|
11
|
+
version?: core.Supplier<string | undefined>;
|
|
11
12
|
}
|
|
12
13
|
interface RequestOptions {
|
|
14
|
+
/** The maximum time to wait for a response in seconds. */
|
|
13
15
|
timeoutInSeconds?: number;
|
|
16
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
14
17
|
maxRetries?: number;
|
|
18
|
+
/** A hook to abort the request. */
|
|
19
|
+
abortSignal?: AbortSignal;
|
|
20
|
+
/** Override the X-Polytomic-Version header */
|
|
21
|
+
version?: string | undefined;
|
|
15
22
|
}
|
|
16
23
|
}
|
|
17
24
|
export declare class Roles {
|
|
18
25
|
protected readonly _options: Roles.Options;
|
|
19
26
|
constructor(_options: Roles.Options);
|
|
20
27
|
/**
|
|
28
|
+
* @param {Roles.RequestOptions} requestOptions - Request-specific configuration.
|
|
29
|
+
*
|
|
21
30
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
22
31
|
* @throws {@link Polytomic.InternalServerError}
|
|
23
32
|
*
|
|
24
33
|
* @example
|
|
25
|
-
* await
|
|
34
|
+
* await client.permissions.roles.list()
|
|
26
35
|
*/
|
|
27
36
|
list(requestOptions?: Roles.RequestOptions): Promise<Polytomic.RoleListResponseEnvelope>;
|
|
28
37
|
/**
|
|
38
|
+
* @param {Polytomic.permissions.CreateRoleRequest} request
|
|
39
|
+
* @param {Roles.RequestOptions} requestOptions - Request-specific configuration.
|
|
40
|
+
*
|
|
29
41
|
* @throws {@link Polytomic.BadRequestError}
|
|
30
42
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
31
43
|
* @throws {@link Polytomic.ForbiddenError}
|
|
@@ -33,20 +45,27 @@ export declare class Roles {
|
|
|
33
45
|
* @throws {@link Polytomic.InternalServerError}
|
|
34
46
|
*
|
|
35
47
|
* @example
|
|
36
|
-
* await
|
|
48
|
+
* await client.permissions.roles.create({
|
|
37
49
|
* name: "Custom"
|
|
38
50
|
* })
|
|
39
51
|
*/
|
|
40
52
|
create(request: Polytomic.permissions.CreateRoleRequest, requestOptions?: Roles.RequestOptions): Promise<Polytomic.RoleResponseEnvelope>;
|
|
41
53
|
/**
|
|
54
|
+
* @param {string} id
|
|
55
|
+
* @param {Roles.RequestOptions} requestOptions - Request-specific configuration.
|
|
56
|
+
*
|
|
42
57
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
43
58
|
* @throws {@link Polytomic.NotFoundError}
|
|
44
59
|
*
|
|
45
60
|
* @example
|
|
46
|
-
* await
|
|
61
|
+
* await client.permissions.roles.get("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
47
62
|
*/
|
|
48
63
|
get(id: string, requestOptions?: Roles.RequestOptions): Promise<Polytomic.RoleResponseEnvelope>;
|
|
49
64
|
/**
|
|
65
|
+
* @param {string} id
|
|
66
|
+
* @param {Polytomic.permissions.UpdateRoleRequest} request
|
|
67
|
+
* @param {Roles.RequestOptions} requestOptions - Request-specific configuration.
|
|
68
|
+
*
|
|
50
69
|
* @throws {@link Polytomic.BadRequestError}
|
|
51
70
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
52
71
|
* @throws {@link Polytomic.ForbiddenError}
|
|
@@ -54,19 +73,22 @@ export declare class Roles {
|
|
|
54
73
|
* @throws {@link Polytomic.InternalServerError}
|
|
55
74
|
*
|
|
56
75
|
* @example
|
|
57
|
-
* await
|
|
76
|
+
* await client.permissions.roles.update("248df4b7-aa70-47b8-a036-33ac447e668d", {
|
|
58
77
|
* name: "Custom"
|
|
59
78
|
* })
|
|
60
79
|
*/
|
|
61
80
|
update(id: string, request: Polytomic.permissions.UpdateRoleRequest, requestOptions?: Roles.RequestOptions): Promise<Polytomic.RoleResponseEnvelope>;
|
|
62
81
|
/**
|
|
82
|
+
* @param {string} id
|
|
83
|
+
* @param {Roles.RequestOptions} requestOptions - Request-specific configuration.
|
|
84
|
+
*
|
|
63
85
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
64
86
|
* @throws {@link Polytomic.ForbiddenError}
|
|
65
87
|
* @throws {@link Polytomic.NotFoundError}
|
|
66
88
|
* @throws {@link Polytomic.InternalServerError}
|
|
67
89
|
*
|
|
68
90
|
* @example
|
|
69
|
-
* await
|
|
91
|
+
* await client.permissions.roles.remove("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
70
92
|
*/
|
|
71
93
|
remove(id: string, requestOptions?: Roles.RequestOptions): Promise<void>;
|
|
72
94
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
@@ -41,19 +41,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
41
41
|
exports.Roles = void 0;
|
|
42
42
|
const environments = __importStar(require("../../../../../../environments"));
|
|
43
43
|
const core = __importStar(require("../../../../../../core"));
|
|
44
|
-
const Polytomic = __importStar(require("
|
|
44
|
+
const Polytomic = __importStar(require("../../../../../index"));
|
|
45
45
|
const url_join_1 = __importDefault(require("url-join"));
|
|
46
|
-
const errors = __importStar(require("../../../../../../errors"));
|
|
46
|
+
const errors = __importStar(require("../../../../../../errors/index"));
|
|
47
47
|
class Roles {
|
|
48
48
|
constructor(_options) {
|
|
49
49
|
this._options = _options;
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
|
+
* @param {Roles.RequestOptions} requestOptions - Request-specific configuration.
|
|
53
|
+
*
|
|
52
54
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
53
55
|
* @throws {@link Polytomic.InternalServerError}
|
|
54
56
|
*
|
|
55
57
|
* @example
|
|
56
|
-
* await
|
|
58
|
+
* await client.permissions.roles.list()
|
|
57
59
|
*/
|
|
58
60
|
list(requestOptions) {
|
|
59
61
|
var _a;
|
|
@@ -63,16 +65,19 @@ class Roles {
|
|
|
63
65
|
method: "GET",
|
|
64
66
|
headers: {
|
|
65
67
|
Authorization: yield this._getAuthorizationHeader(),
|
|
66
|
-
"X-Polytomic-Version":
|
|
68
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
69
|
+
? yield core.Supplier.get(this._options.version)
|
|
70
|
+
: undefined,
|
|
67
71
|
"X-Fern-Language": "JavaScript",
|
|
68
72
|
"X-Fern-SDK-Name": "polytomic",
|
|
69
|
-
"X-Fern-SDK-Version": "1.
|
|
73
|
+
"X-Fern-SDK-Version": "1.8.4",
|
|
70
74
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
71
75
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
72
76
|
},
|
|
73
77
|
contentType: "application/json",
|
|
74
78
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
75
79
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
80
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
76
81
|
});
|
|
77
82
|
if (_response.ok) {
|
|
78
83
|
return _response.body;
|
|
@@ -106,6 +111,9 @@ class Roles {
|
|
|
106
111
|
});
|
|
107
112
|
}
|
|
108
113
|
/**
|
|
114
|
+
* @param {Polytomic.permissions.CreateRoleRequest} request
|
|
115
|
+
* @param {Roles.RequestOptions} requestOptions - Request-specific configuration.
|
|
116
|
+
*
|
|
109
117
|
* @throws {@link Polytomic.BadRequestError}
|
|
110
118
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
111
119
|
* @throws {@link Polytomic.ForbiddenError}
|
|
@@ -113,7 +121,7 @@ class Roles {
|
|
|
113
121
|
* @throws {@link Polytomic.InternalServerError}
|
|
114
122
|
*
|
|
115
123
|
* @example
|
|
116
|
-
* await
|
|
124
|
+
* await client.permissions.roles.create({
|
|
117
125
|
* name: "Custom"
|
|
118
126
|
* })
|
|
119
127
|
*/
|
|
@@ -125,10 +133,12 @@ class Roles {
|
|
|
125
133
|
method: "POST",
|
|
126
134
|
headers: {
|
|
127
135
|
Authorization: yield this._getAuthorizationHeader(),
|
|
128
|
-
"X-Polytomic-Version":
|
|
136
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
137
|
+
? yield core.Supplier.get(this._options.version)
|
|
138
|
+
: undefined,
|
|
129
139
|
"X-Fern-Language": "JavaScript",
|
|
130
140
|
"X-Fern-SDK-Name": "polytomic",
|
|
131
|
-
"X-Fern-SDK-Version": "1.
|
|
141
|
+
"X-Fern-SDK-Version": "1.8.4",
|
|
132
142
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
133
143
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
134
144
|
},
|
|
@@ -136,6 +146,7 @@ class Roles {
|
|
|
136
146
|
body: request,
|
|
137
147
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
138
148
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
149
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
139
150
|
});
|
|
140
151
|
if (_response.ok) {
|
|
141
152
|
return _response.body;
|
|
@@ -175,30 +186,36 @@ class Roles {
|
|
|
175
186
|
});
|
|
176
187
|
}
|
|
177
188
|
/**
|
|
189
|
+
* @param {string} id
|
|
190
|
+
* @param {Roles.RequestOptions} requestOptions - Request-specific configuration.
|
|
191
|
+
*
|
|
178
192
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
179
193
|
* @throws {@link Polytomic.NotFoundError}
|
|
180
194
|
*
|
|
181
195
|
* @example
|
|
182
|
-
* await
|
|
196
|
+
* await client.permissions.roles.get("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
183
197
|
*/
|
|
184
198
|
get(id, requestOptions) {
|
|
185
199
|
var _a;
|
|
186
200
|
return __awaiter(this, void 0, void 0, function* () {
|
|
187
201
|
const _response = yield core.fetcher({
|
|
188
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/permissions/roles/${id}`),
|
|
202
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/permissions/roles/${encodeURIComponent(id)}`),
|
|
189
203
|
method: "GET",
|
|
190
204
|
headers: {
|
|
191
205
|
Authorization: yield this._getAuthorizationHeader(),
|
|
192
|
-
"X-Polytomic-Version":
|
|
206
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
207
|
+
? yield core.Supplier.get(this._options.version)
|
|
208
|
+
: undefined,
|
|
193
209
|
"X-Fern-Language": "JavaScript",
|
|
194
210
|
"X-Fern-SDK-Name": "polytomic",
|
|
195
|
-
"X-Fern-SDK-Version": "1.
|
|
211
|
+
"X-Fern-SDK-Version": "1.8.4",
|
|
196
212
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
197
213
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
198
214
|
},
|
|
199
215
|
contentType: "application/json",
|
|
200
216
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
201
217
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
218
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
202
219
|
});
|
|
203
220
|
if (_response.ok) {
|
|
204
221
|
return _response.body;
|
|
@@ -232,6 +249,10 @@ class Roles {
|
|
|
232
249
|
});
|
|
233
250
|
}
|
|
234
251
|
/**
|
|
252
|
+
* @param {string} id
|
|
253
|
+
* @param {Polytomic.permissions.UpdateRoleRequest} request
|
|
254
|
+
* @param {Roles.RequestOptions} requestOptions - Request-specific configuration.
|
|
255
|
+
*
|
|
235
256
|
* @throws {@link Polytomic.BadRequestError}
|
|
236
257
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
237
258
|
* @throws {@link Polytomic.ForbiddenError}
|
|
@@ -239,7 +260,7 @@ class Roles {
|
|
|
239
260
|
* @throws {@link Polytomic.InternalServerError}
|
|
240
261
|
*
|
|
241
262
|
* @example
|
|
242
|
-
* await
|
|
263
|
+
* await client.permissions.roles.update("248df4b7-aa70-47b8-a036-33ac447e668d", {
|
|
243
264
|
* name: "Custom"
|
|
244
265
|
* })
|
|
245
266
|
*/
|
|
@@ -247,14 +268,16 @@ class Roles {
|
|
|
247
268
|
var _a;
|
|
248
269
|
return __awaiter(this, void 0, void 0, function* () {
|
|
249
270
|
const _response = yield core.fetcher({
|
|
250
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/permissions/roles/${id}`),
|
|
271
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/permissions/roles/${encodeURIComponent(id)}`),
|
|
251
272
|
method: "PUT",
|
|
252
273
|
headers: {
|
|
253
274
|
Authorization: yield this._getAuthorizationHeader(),
|
|
254
|
-
"X-Polytomic-Version":
|
|
275
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
276
|
+
? yield core.Supplier.get(this._options.version)
|
|
277
|
+
: undefined,
|
|
255
278
|
"X-Fern-Language": "JavaScript",
|
|
256
279
|
"X-Fern-SDK-Name": "polytomic",
|
|
257
|
-
"X-Fern-SDK-Version": "1.
|
|
280
|
+
"X-Fern-SDK-Version": "1.8.4",
|
|
258
281
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
259
282
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
260
283
|
},
|
|
@@ -262,6 +285,7 @@ class Roles {
|
|
|
262
285
|
body: request,
|
|
263
286
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
264
287
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
288
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
265
289
|
});
|
|
266
290
|
if (_response.ok) {
|
|
267
291
|
return _response.body;
|
|
@@ -301,32 +325,38 @@ class Roles {
|
|
|
301
325
|
});
|
|
302
326
|
}
|
|
303
327
|
/**
|
|
328
|
+
* @param {string} id
|
|
329
|
+
* @param {Roles.RequestOptions} requestOptions - Request-specific configuration.
|
|
330
|
+
*
|
|
304
331
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
305
332
|
* @throws {@link Polytomic.ForbiddenError}
|
|
306
333
|
* @throws {@link Polytomic.NotFoundError}
|
|
307
334
|
* @throws {@link Polytomic.InternalServerError}
|
|
308
335
|
*
|
|
309
336
|
* @example
|
|
310
|
-
* await
|
|
337
|
+
* await client.permissions.roles.remove("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
311
338
|
*/
|
|
312
339
|
remove(id, requestOptions) {
|
|
313
340
|
var _a;
|
|
314
341
|
return __awaiter(this, void 0, void 0, function* () {
|
|
315
342
|
const _response = yield core.fetcher({
|
|
316
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/permissions/roles/${id}`),
|
|
343
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/permissions/roles/${encodeURIComponent(id)}`),
|
|
317
344
|
method: "DELETE",
|
|
318
345
|
headers: {
|
|
319
346
|
Authorization: yield this._getAuthorizationHeader(),
|
|
320
|
-
"X-Polytomic-Version":
|
|
347
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
348
|
+
? yield core.Supplier.get(this._options.version)
|
|
349
|
+
: undefined,
|
|
321
350
|
"X-Fern-Language": "JavaScript",
|
|
322
351
|
"X-Fern-SDK-Name": "polytomic",
|
|
323
|
-
"X-Fern-SDK-Version": "1.
|
|
352
|
+
"X-Fern-SDK-Version": "1.8.4",
|
|
324
353
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
325
354
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
326
355
|
},
|
|
327
356
|
contentType: "application/json",
|
|
328
357
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
329
358
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
359
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
330
360
|
});
|
|
331
361
|
if (_response.ok) {
|
|
332
362
|
return;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { CreateRoleRequest } from "./CreateRoleRequest";
|
|
2
|
-
export { UpdateRoleRequest } from "./UpdateRoleRequest";
|
|
1
|
+
export { type CreateRoleRequest } from "./CreateRoleRequest";
|
|
2
|
+
export { type UpdateRoleRequest } from "./UpdateRoleRequest";
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../environments";
|
|
5
|
+
import * as core from "../../../../core";
|
|
6
|
+
import * as Polytomic from "../../../index";
|
|
7
|
+
export declare namespace QueryRunner {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.PolytomicEnvironment | string>;
|
|
10
|
+
token: core.Supplier<core.BearerToken>;
|
|
11
|
+
version?: core.Supplier<string | undefined>;
|
|
12
|
+
}
|
|
13
|
+
interface RequestOptions {
|
|
14
|
+
/** The maximum time to wait for a response in seconds. */
|
|
15
|
+
timeoutInSeconds?: number;
|
|
16
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
17
|
+
maxRetries?: number;
|
|
18
|
+
/** A hook to abort the request. */
|
|
19
|
+
abortSignal?: AbortSignal;
|
|
20
|
+
/** Override the X-Polytomic-Version header */
|
|
21
|
+
version?: string | undefined;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export declare class QueryRunner {
|
|
25
|
+
protected readonly _options: QueryRunner.Options;
|
|
26
|
+
constructor(_options: QueryRunner.Options);
|
|
27
|
+
/**
|
|
28
|
+
* @param {string} connectionId
|
|
29
|
+
* @param {Polytomic.V4RunQueryRequest} request
|
|
30
|
+
* @param {QueryRunner.RequestOptions} requestOptions - Request-specific configuration.
|
|
31
|
+
*
|
|
32
|
+
* @throws {@link Polytomic.BadRequestError}
|
|
33
|
+
* @throws {@link Polytomic.UnauthorizedError}
|
|
34
|
+
* @throws {@link Polytomic.NotFoundError}
|
|
35
|
+
* @throws {@link Polytomic.InternalServerError}
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* await client.queryRunner.runQuery("248df4b7-aa70-47b8-a036-33ac447e668d", {
|
|
39
|
+
* query: "SELECT * FROM table"
|
|
40
|
+
* })
|
|
41
|
+
*/
|
|
42
|
+
runQuery(connectionId: string, request?: Polytomic.V4RunQueryRequest, requestOptions?: QueryRunner.RequestOptions): Promise<Polytomic.V4RunQueryEnvelope>;
|
|
43
|
+
/**
|
|
44
|
+
* @param {string} id
|
|
45
|
+
* @param {Polytomic.QueryRunnerGetQueryRequest} request
|
|
46
|
+
* @param {QueryRunner.RequestOptions} requestOptions - Request-specific configuration.
|
|
47
|
+
*
|
|
48
|
+
* @throws {@link Polytomic.BadRequestError}
|
|
49
|
+
* @throws {@link Polytomic.UnauthorizedError}
|
|
50
|
+
* @throws {@link Polytomic.NotFoundError}
|
|
51
|
+
* @throws {@link Polytomic.InternalServerError}
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* await client.queryRunner.getQuery("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
55
|
+
*/
|
|
56
|
+
getQuery(id: string, request?: Polytomic.QueryRunnerGetQueryRequest, requestOptions?: QueryRunner.RequestOptions): Promise<Polytomic.V4QueryResultsEnvelope>;
|
|
57
|
+
protected _getAuthorizationHeader(): Promise<string>;
|
|
58
|
+
}
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
31
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
32
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
33
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
34
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
38
|
+
var t = {};
|
|
39
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
40
|
+
t[p] = s[p];
|
|
41
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
42
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
43
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
44
|
+
t[p[i]] = s[p[i]];
|
|
45
|
+
}
|
|
46
|
+
return t;
|
|
47
|
+
};
|
|
48
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
49
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
50
|
+
};
|
|
51
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52
|
+
exports.QueryRunner = void 0;
|
|
53
|
+
const environments = __importStar(require("../../../../environments"));
|
|
54
|
+
const core = __importStar(require("../../../../core"));
|
|
55
|
+
const Polytomic = __importStar(require("../../../index"));
|
|
56
|
+
const url_join_1 = __importDefault(require("url-join"));
|
|
57
|
+
const errors = __importStar(require("../../../../errors/index"));
|
|
58
|
+
class QueryRunner {
|
|
59
|
+
constructor(_options) {
|
|
60
|
+
this._options = _options;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* @param {string} connectionId
|
|
64
|
+
* @param {Polytomic.V4RunQueryRequest} request
|
|
65
|
+
* @param {QueryRunner.RequestOptions} requestOptions - Request-specific configuration.
|
|
66
|
+
*
|
|
67
|
+
* @throws {@link Polytomic.BadRequestError}
|
|
68
|
+
* @throws {@link Polytomic.UnauthorizedError}
|
|
69
|
+
* @throws {@link Polytomic.NotFoundError}
|
|
70
|
+
* @throws {@link Polytomic.InternalServerError}
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* await client.queryRunner.runQuery("248df4b7-aa70-47b8-a036-33ac447e668d", {
|
|
74
|
+
* query: "SELECT * FROM table"
|
|
75
|
+
* })
|
|
76
|
+
*/
|
|
77
|
+
runQuery(connectionId, request = {}, requestOptions) {
|
|
78
|
+
var _a;
|
|
79
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
80
|
+
const { query } = request, _body = __rest(request, ["query"]);
|
|
81
|
+
const _queryParams = {};
|
|
82
|
+
if (query != null) {
|
|
83
|
+
_queryParams["query"] = query;
|
|
84
|
+
}
|
|
85
|
+
const _response = yield core.fetcher({
|
|
86
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/connections/${encodeURIComponent(connectionId)}/query`),
|
|
87
|
+
method: "POST",
|
|
88
|
+
headers: {
|
|
89
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
90
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
91
|
+
? yield core.Supplier.get(this._options.version)
|
|
92
|
+
: undefined,
|
|
93
|
+
"X-Fern-Language": "JavaScript",
|
|
94
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
95
|
+
"X-Fern-SDK-Version": "1.8.4",
|
|
96
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
97
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
98
|
+
},
|
|
99
|
+
contentType: "application/json",
|
|
100
|
+
queryParameters: _queryParams,
|
|
101
|
+
body: _body,
|
|
102
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
103
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
104
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
105
|
+
});
|
|
106
|
+
if (_response.ok) {
|
|
107
|
+
return _response.body;
|
|
108
|
+
}
|
|
109
|
+
if (_response.error.reason === "status-code") {
|
|
110
|
+
switch (_response.error.statusCode) {
|
|
111
|
+
case 400:
|
|
112
|
+
throw new Polytomic.BadRequestError(_response.error.body);
|
|
113
|
+
case 401:
|
|
114
|
+
throw new Polytomic.UnauthorizedError(_response.error.body);
|
|
115
|
+
case 404:
|
|
116
|
+
throw new Polytomic.NotFoundError(_response.error.body);
|
|
117
|
+
case 500:
|
|
118
|
+
throw new Polytomic.InternalServerError(_response.error.body);
|
|
119
|
+
default:
|
|
120
|
+
throw new errors.PolytomicError({
|
|
121
|
+
statusCode: _response.error.statusCode,
|
|
122
|
+
body: _response.error.body,
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
switch (_response.error.reason) {
|
|
127
|
+
case "non-json":
|
|
128
|
+
throw new errors.PolytomicError({
|
|
129
|
+
statusCode: _response.error.statusCode,
|
|
130
|
+
body: _response.error.rawBody,
|
|
131
|
+
});
|
|
132
|
+
case "timeout":
|
|
133
|
+
throw new errors.PolytomicTimeoutError();
|
|
134
|
+
case "unknown":
|
|
135
|
+
throw new errors.PolytomicError({
|
|
136
|
+
message: _response.error.errorMessage,
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* @param {string} id
|
|
143
|
+
* @param {Polytomic.QueryRunnerGetQueryRequest} request
|
|
144
|
+
* @param {QueryRunner.RequestOptions} requestOptions - Request-specific configuration.
|
|
145
|
+
*
|
|
146
|
+
* @throws {@link Polytomic.BadRequestError}
|
|
147
|
+
* @throws {@link Polytomic.UnauthorizedError}
|
|
148
|
+
* @throws {@link Polytomic.NotFoundError}
|
|
149
|
+
* @throws {@link Polytomic.InternalServerError}
|
|
150
|
+
*
|
|
151
|
+
* @example
|
|
152
|
+
* await client.queryRunner.getQuery("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
153
|
+
*/
|
|
154
|
+
getQuery(id, request = {}, requestOptions) {
|
|
155
|
+
var _a;
|
|
156
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
157
|
+
const { page } = request;
|
|
158
|
+
const _queryParams = {};
|
|
159
|
+
if (page != null) {
|
|
160
|
+
_queryParams["page"] = page;
|
|
161
|
+
}
|
|
162
|
+
const _response = yield core.fetcher({
|
|
163
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/queries/${encodeURIComponent(id)}`),
|
|
164
|
+
method: "GET",
|
|
165
|
+
headers: {
|
|
166
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
167
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
168
|
+
? yield core.Supplier.get(this._options.version)
|
|
169
|
+
: undefined,
|
|
170
|
+
"X-Fern-Language": "JavaScript",
|
|
171
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
172
|
+
"X-Fern-SDK-Version": "1.8.4",
|
|
173
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
174
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
175
|
+
},
|
|
176
|
+
contentType: "application/json",
|
|
177
|
+
queryParameters: _queryParams,
|
|
178
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
179
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
180
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
181
|
+
});
|
|
182
|
+
if (_response.ok) {
|
|
183
|
+
return _response.body;
|
|
184
|
+
}
|
|
185
|
+
if (_response.error.reason === "status-code") {
|
|
186
|
+
switch (_response.error.statusCode) {
|
|
187
|
+
case 400:
|
|
188
|
+
throw new Polytomic.BadRequestError(_response.error.body);
|
|
189
|
+
case 401:
|
|
190
|
+
throw new Polytomic.UnauthorizedError(_response.error.body);
|
|
191
|
+
case 404:
|
|
192
|
+
throw new Polytomic.NotFoundError(_response.error.body);
|
|
193
|
+
case 500:
|
|
194
|
+
throw new Polytomic.InternalServerError(_response.error.body);
|
|
195
|
+
default:
|
|
196
|
+
throw new errors.PolytomicError({
|
|
197
|
+
statusCode: _response.error.statusCode,
|
|
198
|
+
body: _response.error.body,
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
switch (_response.error.reason) {
|
|
203
|
+
case "non-json":
|
|
204
|
+
throw new errors.PolytomicError({
|
|
205
|
+
statusCode: _response.error.statusCode,
|
|
206
|
+
body: _response.error.rawBody,
|
|
207
|
+
});
|
|
208
|
+
case "timeout":
|
|
209
|
+
throw new errors.PolytomicTimeoutError();
|
|
210
|
+
case "unknown":
|
|
211
|
+
throw new errors.PolytomicError({
|
|
212
|
+
message: _response.error.errorMessage,
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
_getAuthorizationHeader() {
|
|
218
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
219
|
+
return `Bearer ${yield core.Supplier.get(this._options.token)}`;
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
exports.QueryRunner = QueryRunner;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* query: "SELECT * FROM table"
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface V4RunQueryRequest {
|
|
11
|
+
/**
|
|
12
|
+
* The query to execute against the connection.
|
|
13
|
+
*/
|
|
14
|
+
query?: string;
|
|
15
|
+
}
|