polytomic 1.16.1 → 1.18.1
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 +14 -19
- package/api/errors/BadRequestError.js +7 -17
- package/api/errors/ConflictError.js +7 -17
- package/api/errors/ForbiddenError.js +7 -17
- package/api/errors/InternalServerError.js +7 -17
- package/api/errors/NotFoundError.js +7 -17
- package/api/errors/UnauthorizedError.js +7 -17
- package/api/errors/UnprocessableEntityError.js +7 -17
- package/api/resources/bulkSync/client/Client.d.ts +173 -24
- package/api/resources/bulkSync/client/Client.js +339 -118
- package/api/resources/bulkSync/client/requests/BulkSyncGetSourceRequest.d.ts +3 -0
- package/api/resources/bulkSync/client/requests/BulkSyncListRequest.d.ts +3 -0
- package/api/resources/bulkSync/client/requests/CreateBulkSyncRequest.d.ts +1 -1
- package/api/resources/bulkSync/client/requests/StartBulkSyncRequest.d.ts +4 -0
- package/api/resources/bulkSync/client/requests/UpdateBulkSyncRequest.d.ts +1 -1
- package/api/resources/bulkSync/resources/executions/client/Client.d.ts +77 -12
- package/api/resources/bulkSync/resources/executions/client/Client.js +168 -66
- package/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListRequest.d.ts +12 -0
- package/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListStatusRequest.d.ts +3 -3
- package/api/resources/bulkSync/resources/index.js +7 -17
- package/api/resources/bulkSync/resources/schedules/client/Client.d.ts +44 -15
- package/api/resources/bulkSync/resources/schedules/client/Client.js +116 -57
- package/api/resources/bulkSync/resources/schedules/client/requests/CreateScheduleRequest.d.ts +1 -1
- package/api/resources/bulkSync/resources/schedules/client/requests/UpdateScheduleRequest.d.ts +1 -1
- package/api/resources/bulkSync/resources/schemas/client/Client.d.ts +71 -11
- package/api/resources/bulkSync/resources/schemas/client/Client.js +150 -61
- package/api/resources/bulkSync/resources/schemas/client/requests/BulkSyncSchemasRequest.d.ts +1 -0
- package/api/resources/bulkSync/resources/schemas/client/requests/SchemasListRequest.d.ts +3 -0
- package/api/resources/bulkSync/resources/schemas/client/requests/UpdateBulkSchema.d.ts +7 -0
- package/api/resources/bulkSync/types/V2CreateBulkSyncRequestSchemasItem.d.ts +1 -1
- package/api/resources/bulkSync/types/V2UpdateBulkSyncRequestSchemasItem.d.ts +1 -1
- package/api/resources/connections/client/Client.d.ts +134 -18
- package/api/resources/connections/client/Client.js +359 -104
- package/api/resources/connections/client/requests/ApiRequest.d.ts +2 -2
- package/api/resources/events/client/Client.d.ts +20 -7
- package/api/resources/events/client/Client.js +55 -33
- package/api/resources/events/client/requests/EventsListRequest.d.ts +17 -2
- package/api/resources/identity/client/Client.d.ts +11 -6
- package/api/resources/identity/client/Client.js +31 -24
- package/api/resources/index.js +7 -17
- package/api/resources/jobs/client/Client.d.ts +15 -8
- package/api/resources/jobs/client/Client.js +35 -26
- package/api/resources/modelSync/client/Client.d.ts +110 -19
- package/api/resources/modelSync/client/Client.js +287 -118
- package/api/resources/modelSync/client/requests/CreateModelSyncRequest.d.ts +1 -1
- package/api/resources/modelSync/client/requests/ModelSyncGetSourceFieldsRequest.d.ts +3 -0
- package/api/resources/modelSync/client/requests/ModelSyncGetSourceRequest.d.ts +3 -0
- package/api/resources/modelSync/client/requests/UpdateModelSyncRequest.d.ts +1 -1
- package/api/resources/modelSync/resources/executions/client/Client.d.ts +41 -12
- package/api/resources/modelSync/resources/executions/client/Client.js +115 -56
- package/api/resources/modelSync/resources/executions/client/requests/UpdateExecutionRequest.d.ts +1 -1
- package/api/resources/modelSync/resources/index.js +7 -17
- package/api/resources/modelSync/resources/targets/client/Client.d.ts +28 -11
- package/api/resources/modelSync/resources/targets/client/Client.js +89 -49
- package/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetFieldsRequest.d.ts +6 -0
- package/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetRequest.d.ts +6 -0
- package/api/resources/models/client/Client.d.ts +79 -8
- package/api/resources/models/client/Client.js +214 -86
- package/api/resources/models/client/requests/ModelsGetEnrichmentSourceRequest.d.ts +3 -0
- package/api/resources/notifications/client/Client.d.ts +13 -5
- package/api/resources/notifications/client/Client.js +48 -31
- package/api/resources/notifications/client/requests/V4GlobalErrorSubscribersRequest.d.ts +1 -0
- package/api/resources/organization/client/Client.d.ts +31 -13
- package/api/resources/organization/client/Client.js +109 -55
- package/api/resources/organization/client/requests/CreateOrganizationRequestSchema.d.ts +6 -0
- package/api/resources/organization/client/requests/UpdateOrganizationRequestSchema.d.ts +6 -0
- package/api/resources/permissions/client/Client.d.ts +2 -7
- package/api/resources/permissions/resources/index.js +7 -17
- package/api/resources/permissions/resources/policies/client/Client.d.ts +33 -5
- package/api/resources/permissions/resources/policies/client/Client.js +105 -47
- package/api/resources/permissions/resources/roles/client/Client.d.ts +38 -5
- package/api/resources/permissions/resources/roles/client/Client.js +110 -47
- package/api/resources/queryRunner/client/Client.d.ts +26 -7
- package/api/resources/queryRunner/client/Client.js +63 -35
- package/api/resources/queryRunner/client/requests/QueryRunnerGetQueryRequest.d.ts +3 -0
- package/api/resources/schemas/client/Client.d.ts +118 -23
- package/api/resources/schemas/client/Client.js +232 -86
- package/api/resources/schemas/client/requests/SetPrimaryKeysRequest.d.ts +1 -0
- package/api/resources/schemas/client/requests/UpsertSchemaFieldRequest.d.ts +1 -0
- package/api/resources/users/client/Client.d.ts +44 -16
- package/api/resources/users/client/Client.js +133 -66
- package/api/resources/users/client/requests/CreateUserRequestSchema.d.ts +3 -0
- package/api/resources/users/client/requests/UpdateUserRequestSchema.d.ts +3 -0
- package/api/resources/users/client/requests/UsersCreateApiKeyRequest.d.ts +3 -0
- package/api/resources/webhooks/client/Client.d.ts +67 -21
- package/api/resources/webhooks/client/Client.js +165 -75
- package/api/types/ApiKeyResponse.d.ts +1 -0
- package/api/types/BulkBulkSyncSchedule.d.ts +1 -0
- package/api/types/BulkDiscover.d.ts +1 -1
- package/api/types/BulkExecutionStatus.d.ts +1 -1
- package/api/types/BulkFetchMode.d.ts +1 -1
- package/api/types/BulkNormalizeNames.d.ts +1 -1
- package/api/types/BulkOutputDisposition.d.ts +9 -0
- package/api/types/BulkOutputDisposition.js +11 -0
- package/api/types/BulkResyncMode.d.ts +9 -0
- package/api/types/BulkResyncMode.js +11 -0
- package/api/types/BulkScheduleSyncMode.d.ts +1 -1
- package/api/types/BulkSchema.d.ts +2 -0
- package/api/types/BulkSchemaExecutionStatus.d.ts +2 -1
- package/api/types/BulkSchemaExecutionStatus.js +1 -0
- package/api/types/BulkSelectiveMode.d.ts +1 -1
- package/api/types/BulkSyncDest.d.ts +2 -0
- package/api/types/BulkSyncExecution.d.ts +1 -0
- package/api/types/BulkSyncExecutionStatus.d.ts +3 -0
- package/api/types/BulkSyncIngestionStatus.d.ts +14 -0
- package/api/types/BulkSyncMode.d.ts +1 -1
- package/api/types/BulkSyncResponse.d.ts +2 -2
- package/api/types/BulkSyncSchemaExecutionStatus.d.ts +7 -0
- package/api/types/BulkSyncSource.d.ts +1 -0
- package/api/types/BulkSyncStatusResponse.d.ts +1 -0
- package/api/types/ConnectCardResponse.d.ts +1 -0
- package/api/types/ConnectionResponseSchema.d.ts +2 -2
- package/api/types/Event.d.ts +4 -0
- package/api/types/EventBody.d.ts +1 -1
- package/api/types/ExecutionStatus.d.ts +1 -1
- package/api/types/FilterFieldReferenceType.d.ts +1 -1
- package/api/types/FilterFunction.d.ts +1 -1
- package/api/types/GetIdentityResponseSchema.d.ts +2 -0
- package/api/types/IngestionStatusLevel.d.ts +12 -0
- package/api/types/IngestionStatusLevel.js +11 -0
- package/api/types/JobResponse.d.ts +3 -0
- package/api/types/JsonschemaDefinitions.d.ts +1 -1
- package/api/types/JsonschemaForm.d.ts +1 -1
- package/api/types/LabelLabel.d.ts +1 -1
- package/api/types/ModelField.d.ts +1 -1
- package/api/types/ModelResponse.d.ts +2 -2
- package/api/types/ModelSyncMode.d.ts +2 -1
- package/api/types/ModelSyncMode.js +1 -0
- package/api/types/ModelSyncResponse.d.ts +2 -2
- package/api/types/ModelSyncSourceMetaResponse.d.ts +3 -0
- package/api/types/Organization.d.ts +5 -0
- package/api/types/{CommonOutputActor.d.ts → OutputActor.d.ts} +1 -1
- package/api/types/ScheduleFrequency.d.ts +1 -1
- package/api/types/SchemaIdentityFunction.d.ts +1 -1
- package/api/types/SourceMeta.d.ts +3 -0
- package/api/types/TypesType.d.ts +1 -1
- package/api/types/User.d.ts +5 -0
- package/api/types/UtilFieldType.d.ts +1 -1
- package/api/types/V2EnricherConfiguration.d.ts +1 -1
- package/api/types/V2EnricherMapping.d.ts +1 -1
- package/api/types/V2ExecutionLogType.d.ts +1 -1
- package/api/types/V2OrderedMapStringGithubComInvopopJsonschemaSchema.d.ts +1 -1
- package/api/types/V2SampleRecord.d.ts +1 -1
- package/api/types/V2SchemaConfigurationFieldsItem.d.ts +1 -1
- package/api/types/V3BulkSyncSourceCapabilities.d.ts +6 -0
- package/{dist/version.js → api/types/V3BulkSyncSourceCapabilities.js} +3 -2
- package/api/types/V4BulkSyncExecutionLogs.d.ts +6 -1
- package/api/types/V4BulkSyncScheduleApi.d.ts +5 -0
- package/api/types/V4ExportSyncLogsResponse.d.ts +1 -0
- package/api/types/V4GlobalErrorSubscribersResponse.d.ts +1 -0
- package/api/types/V4RunQueryResult.d.ts +2 -1
- package/api/types/V4UserFieldRequest.d.ts +4 -0
- package/api/types/WorkTaskStatus.d.ts +1 -1
- package/api/types/index.d.ts +11 -6
- package/api/types/index.js +11 -6
- package/core/auth/BearerToken.d.ts +1 -1
- package/core/fetcher/APIResponse.d.ts +1 -1
- package/core/fetcher/Fetcher.d.ts +3 -6
- package/core/fetcher/Fetcher.js +189 -20
- package/core/fetcher/Supplier.d.ts +1 -1
- package/core/fetcher/getHeader.js +2 -1
- package/core/runtime/runtime.d.ts +1 -2
- package/core/runtime/runtime.js +41 -52
- package/dist/Client.d.ts +14 -19
- package/dist/api/errors/BadRequestError.js +7 -17
- package/dist/api/errors/ConflictError.js +7 -17
- package/dist/api/errors/ForbiddenError.js +7 -17
- package/dist/api/errors/InternalServerError.js +7 -17
- package/dist/api/errors/NotFoundError.js +7 -17
- package/dist/api/errors/UnauthorizedError.js +7 -17
- package/dist/api/errors/UnprocessableEntityError.js +7 -17
- package/dist/api/resources/bulkSync/client/Client.d.ts +173 -24
- package/dist/api/resources/bulkSync/client/Client.js +339 -118
- package/dist/api/resources/bulkSync/client/requests/BulkSyncGetSourceRequest.d.ts +3 -0
- package/dist/api/resources/bulkSync/client/requests/BulkSyncListRequest.d.ts +3 -0
- package/dist/api/resources/bulkSync/client/requests/CreateBulkSyncRequest.d.ts +1 -1
- package/dist/api/resources/bulkSync/client/requests/StartBulkSyncRequest.d.ts +4 -0
- package/dist/api/resources/bulkSync/client/requests/UpdateBulkSyncRequest.d.ts +1 -1
- package/dist/api/resources/bulkSync/resources/executions/client/Client.d.ts +77 -12
- package/dist/api/resources/bulkSync/resources/executions/client/Client.js +168 -66
- package/dist/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListRequest.d.ts +12 -0
- package/dist/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListStatusRequest.d.ts +3 -3
- package/dist/api/resources/bulkSync/resources/index.js +7 -17
- package/dist/api/resources/bulkSync/resources/schedules/client/Client.d.ts +44 -15
- package/dist/api/resources/bulkSync/resources/schedules/client/Client.js +116 -57
- package/dist/api/resources/bulkSync/resources/schedules/client/requests/CreateScheduleRequest.d.ts +1 -1
- package/dist/api/resources/bulkSync/resources/schedules/client/requests/UpdateScheduleRequest.d.ts +1 -1
- package/dist/api/resources/bulkSync/resources/schemas/client/Client.d.ts +71 -11
- package/dist/api/resources/bulkSync/resources/schemas/client/Client.js +150 -61
- package/dist/api/resources/bulkSync/resources/schemas/client/requests/BulkSyncSchemasRequest.d.ts +1 -0
- package/dist/api/resources/bulkSync/resources/schemas/client/requests/SchemasListRequest.d.ts +3 -0
- package/dist/api/resources/bulkSync/resources/schemas/client/requests/UpdateBulkSchema.d.ts +7 -0
- 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/connections/client/Client.d.ts +134 -18
- package/dist/api/resources/connections/client/Client.js +359 -104
- package/dist/api/resources/connections/client/requests/ApiRequest.d.ts +2 -2
- package/dist/api/resources/events/client/Client.d.ts +20 -7
- package/dist/api/resources/events/client/Client.js +55 -33
- package/dist/api/resources/events/client/requests/EventsListRequest.d.ts +17 -2
- package/dist/api/resources/identity/client/Client.d.ts +11 -6
- package/dist/api/resources/identity/client/Client.js +31 -24
- package/dist/api/resources/index.js +7 -17
- package/dist/api/resources/jobs/client/Client.d.ts +15 -8
- package/dist/api/resources/jobs/client/Client.js +35 -26
- package/dist/api/resources/modelSync/client/Client.d.ts +110 -19
- package/dist/api/resources/modelSync/client/Client.js +287 -118
- package/dist/api/resources/modelSync/client/requests/CreateModelSyncRequest.d.ts +1 -1
- package/dist/api/resources/modelSync/client/requests/ModelSyncGetSourceFieldsRequest.d.ts +3 -0
- package/dist/api/resources/modelSync/client/requests/ModelSyncGetSourceRequest.d.ts +3 -0
- package/dist/api/resources/modelSync/client/requests/UpdateModelSyncRequest.d.ts +1 -1
- package/dist/api/resources/modelSync/resources/executions/client/Client.d.ts +41 -12
- package/dist/api/resources/modelSync/resources/executions/client/Client.js +115 -56
- package/dist/api/resources/modelSync/resources/executions/client/requests/UpdateExecutionRequest.d.ts +1 -1
- package/dist/api/resources/modelSync/resources/index.js +7 -17
- package/dist/api/resources/modelSync/resources/targets/client/Client.d.ts +28 -11
- package/dist/api/resources/modelSync/resources/targets/client/Client.js +89 -49
- package/dist/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetFieldsRequest.d.ts +6 -0
- package/dist/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetRequest.d.ts +6 -0
- package/dist/api/resources/models/client/Client.d.ts +79 -8
- package/dist/api/resources/models/client/Client.js +214 -86
- package/dist/api/resources/models/client/requests/ModelsGetEnrichmentSourceRequest.d.ts +3 -0
- package/dist/api/resources/notifications/client/Client.d.ts +13 -5
- package/dist/api/resources/notifications/client/Client.js +48 -31
- package/dist/api/resources/notifications/client/requests/V4GlobalErrorSubscribersRequest.d.ts +1 -0
- package/dist/api/resources/organization/client/Client.d.ts +31 -13
- package/dist/api/resources/organization/client/Client.js +109 -55
- package/dist/api/resources/organization/client/requests/CreateOrganizationRequestSchema.d.ts +6 -0
- package/dist/api/resources/organization/client/requests/UpdateOrganizationRequestSchema.d.ts +6 -0
- package/dist/api/resources/permissions/client/Client.d.ts +2 -7
- package/dist/api/resources/permissions/resources/index.js +7 -17
- package/dist/api/resources/permissions/resources/policies/client/Client.d.ts +33 -5
- package/dist/api/resources/permissions/resources/policies/client/Client.js +105 -47
- package/dist/api/resources/permissions/resources/roles/client/Client.d.ts +38 -5
- package/dist/api/resources/permissions/resources/roles/client/Client.js +110 -47
- package/dist/api/resources/queryRunner/client/Client.d.ts +26 -7
- package/dist/api/resources/queryRunner/client/Client.js +63 -35
- package/dist/api/resources/queryRunner/client/requests/QueryRunnerGetQueryRequest.d.ts +3 -0
- package/dist/api/resources/schemas/client/Client.d.ts +118 -23
- package/dist/api/resources/schemas/client/Client.js +232 -86
- package/dist/api/resources/schemas/client/requests/SetPrimaryKeysRequest.d.ts +1 -0
- package/dist/api/resources/schemas/client/requests/UpsertSchemaFieldRequest.d.ts +1 -0
- package/dist/api/resources/users/client/Client.d.ts +44 -16
- package/dist/api/resources/users/client/Client.js +133 -66
- package/dist/api/resources/users/client/requests/CreateUserRequestSchema.d.ts +3 -0
- package/dist/api/resources/users/client/requests/UpdateUserRequestSchema.d.ts +3 -0
- package/dist/api/resources/users/client/requests/UsersCreateApiKeyRequest.d.ts +3 -0
- package/dist/api/resources/webhooks/client/Client.d.ts +67 -21
- package/dist/api/resources/webhooks/client/Client.js +165 -75
- package/dist/api/types/ApiKeyResponse.d.ts +1 -0
- package/dist/api/types/BulkBulkSyncSchedule.d.ts +1 -0
- package/dist/api/types/BulkDiscover.d.ts +1 -1
- package/dist/api/types/BulkExecutionStatus.d.ts +1 -1
- package/dist/api/types/BulkFetchMode.d.ts +1 -1
- package/dist/api/types/BulkNormalizeNames.d.ts +1 -1
- package/dist/api/types/BulkOutputDisposition.d.ts +9 -0
- package/dist/api/types/BulkOutputDisposition.js +11 -0
- package/dist/api/types/BulkResyncMode.d.ts +9 -0
- package/dist/api/types/BulkResyncMode.js +11 -0
- package/dist/api/types/BulkScheduleSyncMode.d.ts +1 -1
- package/dist/api/types/BulkSchema.d.ts +2 -0
- package/dist/api/types/BulkSchemaExecutionStatus.d.ts +2 -1
- package/dist/api/types/BulkSchemaExecutionStatus.js +1 -0
- package/dist/api/types/BulkSelectiveMode.d.ts +1 -1
- package/dist/api/types/BulkSyncDest.d.ts +2 -0
- package/dist/api/types/BulkSyncExecution.d.ts +1 -0
- package/dist/api/types/BulkSyncExecutionStatus.d.ts +3 -0
- package/dist/api/types/BulkSyncIngestionStatus.d.ts +14 -0
- package/{version.js → dist/api/types/BulkSyncIngestionStatus.js} +3 -2
- package/dist/api/types/BulkSyncMode.d.ts +1 -1
- package/dist/api/types/BulkSyncResponse.d.ts +2 -2
- package/dist/api/types/BulkSyncSchemaExecutionStatus.d.ts +7 -0
- package/dist/api/types/BulkSyncSource.d.ts +1 -0
- package/dist/api/types/BulkSyncStatusResponse.d.ts +1 -0
- package/dist/api/types/ConnectCardResponse.d.ts +1 -0
- package/dist/api/types/ConnectionResponseSchema.d.ts +2 -2
- package/dist/api/types/Event.d.ts +4 -0
- package/dist/api/types/EventBody.d.ts +1 -1
- package/dist/api/types/ExecutionStatus.d.ts +1 -1
- package/dist/api/types/FilterFieldReferenceType.d.ts +1 -1
- package/dist/api/types/FilterFunction.d.ts +1 -1
- package/dist/api/types/GetIdentityResponseSchema.d.ts +2 -0
- package/dist/api/types/IngestionStatusLevel.d.ts +12 -0
- package/dist/api/types/IngestionStatusLevel.js +11 -0
- package/dist/api/types/JobResponse.d.ts +3 -0
- package/dist/api/types/JsonschemaDefinitions.d.ts +1 -1
- package/dist/api/types/JsonschemaForm.d.ts +1 -1
- package/dist/api/types/LabelLabel.d.ts +1 -1
- package/dist/api/types/ModelField.d.ts +1 -1
- package/dist/api/types/ModelResponse.d.ts +2 -2
- package/dist/api/types/ModelSyncMode.d.ts +2 -1
- package/dist/api/types/ModelSyncMode.js +1 -0
- package/dist/api/types/ModelSyncResponse.d.ts +2 -2
- package/dist/api/types/ModelSyncSourceMetaResponse.d.ts +3 -0
- package/dist/api/types/Organization.d.ts +5 -0
- package/dist/api/types/{CommonOutputActor.d.ts → OutputActor.d.ts} +1 -1
- package/dist/api/types/OutputActor.js +5 -0
- package/dist/api/types/ScheduleFrequency.d.ts +1 -1
- package/dist/api/types/SchemaIdentityFunction.d.ts +1 -1
- package/dist/api/types/SourceMeta.d.ts +3 -0
- package/dist/api/types/TypesType.d.ts +1 -1
- package/dist/api/types/User.d.ts +5 -0
- package/dist/api/types/UtilFieldType.d.ts +1 -1
- package/dist/api/types/V2EnricherConfiguration.d.ts +1 -1
- package/dist/api/types/V2EnricherMapping.d.ts +1 -1
- package/dist/api/types/V2ExecutionLogType.d.ts +1 -1
- package/dist/api/types/V2OrderedMapStringGithubComInvopopJsonschemaSchema.d.ts +1 -1
- package/dist/api/types/V2SampleRecord.d.ts +1 -1
- package/dist/api/types/V2SchemaConfigurationFieldsItem.d.ts +1 -1
- package/dist/api/types/V3BulkSyncSourceCapabilities.d.ts +6 -0
- package/dist/api/types/V3BulkSyncSourceCapabilities.js +5 -0
- package/dist/api/types/V4BulkSyncExecutionLogs.d.ts +6 -1
- package/dist/api/types/V4BulkSyncScheduleApi.d.ts +5 -0
- package/dist/api/types/V4ExportSyncLogsResponse.d.ts +1 -0
- package/dist/api/types/V4GlobalErrorSubscribersResponse.d.ts +1 -0
- package/dist/api/types/V4RunQueryResult.d.ts +2 -1
- package/dist/api/types/V4UserFieldRequest.d.ts +4 -0
- package/dist/api/types/WorkTaskStatus.d.ts +1 -1
- package/dist/api/types/index.d.ts +11 -6
- package/dist/api/types/index.js +11 -6
- package/dist/core/auth/BearerToken.d.ts +1 -1
- package/dist/core/fetcher/APIResponse.d.ts +1 -1
- package/dist/core/fetcher/Fetcher.d.ts +3 -6
- package/dist/core/fetcher/Fetcher.js +189 -20
- package/dist/core/fetcher/Supplier.d.ts +1 -1
- package/dist/core/fetcher/getHeader.js +2 -1
- package/dist/core/runtime/runtime.d.ts +1 -2
- package/dist/core/runtime/runtime.js +41 -52
- package/dist/environments.d.ts +1 -1
- package/dist/errors/PolytomicError.js +1 -2
- package/dist/errors/PolytomicTimeoutError.d.ts +1 -1
- package/dist/errors/PolytomicTimeoutError.js +2 -2
- package/dist/index.js +7 -17
- package/environments.d.ts +1 -1
- package/errors/PolytomicError.js +1 -2
- package/errors/PolytomicTimeoutError.d.ts +1 -1
- package/errors/PolytomicTimeoutError.js +2 -2
- package/index.js +7 -17
- package/{jest.config.mjs → jest.config.js} +1 -4
- package/package.json +17 -18
- package/core/fetcher/createRequestUrl.d.ts +0 -1
- package/core/fetcher/createRequestUrl.js +0 -12
- package/core/fetcher/getFetchFn.d.ts +0 -4
- package/core/fetcher/getFetchFn.js +0 -68
- package/core/fetcher/getRequestBody.d.ts +0 -7
- package/core/fetcher/getRequestBody.js +0 -23
- package/core/fetcher/getResponseBody.d.ts +0 -1
- package/core/fetcher/getResponseBody.js +0 -54
- package/core/fetcher/makeRequest.d.ts +0 -1
- package/core/fetcher/makeRequest.js +0 -42
- package/core/fetcher/requestWithRetries.d.ts +0 -1
- package/core/fetcher/requestWithRetries.js +0 -40
- package/core/fetcher/signals.d.ts +0 -11
- package/core/fetcher/signals.js +0 -36
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +0 -30
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +0 -247
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -21
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +0 -126
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +0 -31
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +0 -229
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +0 -18
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +0 -59
- package/core/json.d.ts +0 -15
- package/core/json.js +0 -24
- package/dist/core/fetcher/createRequestUrl.d.ts +0 -1
- package/dist/core/fetcher/createRequestUrl.js +0 -12
- package/dist/core/fetcher/getFetchFn.d.ts +0 -4
- package/dist/core/fetcher/getFetchFn.js +0 -68
- package/dist/core/fetcher/getRequestBody.d.ts +0 -7
- package/dist/core/fetcher/getRequestBody.js +0 -23
- package/dist/core/fetcher/getResponseBody.d.ts +0 -1
- package/dist/core/fetcher/getResponseBody.js +0 -54
- package/dist/core/fetcher/makeRequest.d.ts +0 -1
- package/dist/core/fetcher/makeRequest.js +0 -42
- package/dist/core/fetcher/requestWithRetries.d.ts +0 -1
- package/dist/core/fetcher/requestWithRetries.js +0 -40
- package/dist/core/fetcher/signals.d.ts +0 -11
- package/dist/core/fetcher/signals.js +0 -36
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +0 -30
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +0 -247
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -21
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +0 -126
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +0 -31
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +0 -229
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +0 -18
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +0 -59
- package/dist/core/json.d.ts +0 -15
- package/dist/core/json.js +0 -24
- package/dist/version.d.ts +0 -1
- package/reference.md +0 -6663
- package/scripts/rename-to-esm-files.js +0 -115
- package/version.d.ts +0 -1
- /package/api/types/{CommonOutputActor.js → BulkSyncIngestionStatus.js} +0 -0
- /package/{dist/api/types/CommonOutputActor.js → api/types/OutputActor.js} +0 -0
|
@@ -18,23 +18,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) ||
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
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
|
+
};
|
|
38
28
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
39
29
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
40
30
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -59,8 +49,20 @@ class Schemas {
|
|
|
59
49
|
this._options = _options;
|
|
60
50
|
}
|
|
61
51
|
/**
|
|
62
|
-
*
|
|
63
|
-
*
|
|
52
|
+
* Creates or updates user-defined fields on a schema, matched by field_id.
|
|
53
|
+
*
|
|
54
|
+
* Fields are matched by `field_id`. Reusing an existing `field_id` updates that
|
|
55
|
+
* field; using a new `field_id` creates a new user-defined field.
|
|
56
|
+
*
|
|
57
|
+
* This makes the endpoint safe to retry when you are intentionally upserting the
|
|
58
|
+
* same field definitions. It is not a patch-by-position operation.
|
|
59
|
+
*
|
|
60
|
+
* If some fields succeed and others fail, the endpoint can return a partial
|
|
61
|
+
* success response. Validate the response status and message rather than assuming
|
|
62
|
+
* the whole batch was applied uniformly.
|
|
63
|
+
*
|
|
64
|
+
* @param {string} connectionId - Unique identifier of the connection.
|
|
65
|
+
* @param {string} schemaId - Identifier of the schema the fields belong to.
|
|
64
66
|
* @param {Polytomic.UpsertSchemaFieldRequest} request
|
|
65
67
|
* @param {Schemas.RequestOptions} requestOptions - Request-specific configuration.
|
|
66
68
|
*
|
|
@@ -72,17 +74,24 @@ class Schemas {
|
|
|
72
74
|
* @example
|
|
73
75
|
* await client.schemas.upsertField("248df4b7-aa70-47b8-a036-33ac447e668d", "public.users")
|
|
74
76
|
*/
|
|
75
|
-
upsertField(
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
upsertField(connectionId, schemaId, request = {}, requestOptions) {
|
|
78
|
+
var _a;
|
|
79
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
80
|
const _response = yield core.fetcher({
|
|
79
|
-
url: (0, url_join_1.default)((
|
|
81
|
+
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)}/schemas/${encodeURIComponent(schemaId)}/fields`),
|
|
80
82
|
method: "POST",
|
|
81
|
-
headers:
|
|
83
|
+
headers: {
|
|
84
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
85
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
82
86
|
? yield core.Supplier.get(this._options.version)
|
|
83
|
-
: undefined,
|
|
87
|
+
: undefined,
|
|
88
|
+
"X-Fern-Language": "JavaScript",
|
|
89
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
90
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
91
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
92
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
93
|
+
},
|
|
84
94
|
contentType: "application/json",
|
|
85
|
-
requestType: "json",
|
|
86
95
|
body: request,
|
|
87
96
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
88
97
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -115,7 +124,7 @@ class Schemas {
|
|
|
115
124
|
body: _response.error.rawBody,
|
|
116
125
|
});
|
|
117
126
|
case "timeout":
|
|
118
|
-
throw new errors.PolytomicTimeoutError(
|
|
127
|
+
throw new errors.PolytomicTimeoutError();
|
|
119
128
|
case "unknown":
|
|
120
129
|
throw new errors.PolytomicError({
|
|
121
130
|
message: _response.error.errorMessage,
|
|
@@ -124,9 +133,20 @@ class Schemas {
|
|
|
124
133
|
});
|
|
125
134
|
}
|
|
126
135
|
/**
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
136
|
+
* Removes a user-defined field from a schema.
|
|
137
|
+
*
|
|
138
|
+
* Only user-defined fields — those created via
|
|
139
|
+
* [`POST /api/connections/{connection_id}/schemas/{schema_id}/fields`](../../../../../../../api-reference/schemas/upsert-field)
|
|
140
|
+
* — can be removed through this endpoint. Fields detected automatically from
|
|
141
|
+
* the source cannot be deleted here; they are managed through schema refresh.
|
|
142
|
+
*
|
|
143
|
+
* > 🚧 Deleting a field that is referenced in an active sync mapping may cause
|
|
144
|
+
* > that sync to error on its next execution. Remove or update any dependent
|
|
145
|
+
* > mappings before deleting the field.
|
|
146
|
+
*
|
|
147
|
+
* @param {string} connectionId - Unique identifier of the connection.
|
|
148
|
+
* @param {string} schemaId - Identifier of the schema the field belongs to.
|
|
149
|
+
* @param {string} fieldId - Identifier of the user-defined field to delete.
|
|
130
150
|
* @param {Schemas.RequestOptions} requestOptions - Request-specific configuration.
|
|
131
151
|
*
|
|
132
152
|
* @throws {@link Polytomic.BadRequestError}
|
|
@@ -138,16 +158,23 @@ class Schemas {
|
|
|
138
158
|
* await client.schemas.deleteField("248df4b7-aa70-47b8-a036-33ac447e668d", "public.users", "first_name")
|
|
139
159
|
*/
|
|
140
160
|
deleteField(connectionId, schemaId, fieldId, requestOptions) {
|
|
161
|
+
var _a;
|
|
141
162
|
return __awaiter(this, void 0, void 0, function* () {
|
|
142
|
-
var _a, _b;
|
|
143
163
|
const _response = yield core.fetcher({
|
|
144
|
-
url: (0, url_join_1.default)((
|
|
164
|
+
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)}/schemas/${encodeURIComponent(schemaId)}/fields/${encodeURIComponent(fieldId)}`),
|
|
145
165
|
method: "DELETE",
|
|
146
|
-
headers:
|
|
166
|
+
headers: {
|
|
167
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
168
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
147
169
|
? yield core.Supplier.get(this._options.version)
|
|
148
|
-
: undefined,
|
|
170
|
+
: undefined,
|
|
171
|
+
"X-Fern-Language": "JavaScript",
|
|
172
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
173
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
174
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
175
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
176
|
+
},
|
|
149
177
|
contentType: "application/json",
|
|
150
|
-
requestType: "json",
|
|
151
178
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
152
179
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
153
180
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -179,7 +206,7 @@ class Schemas {
|
|
|
179
206
|
body: _response.error.rawBody,
|
|
180
207
|
});
|
|
181
208
|
case "timeout":
|
|
182
|
-
throw new errors.PolytomicTimeoutError(
|
|
209
|
+
throw new errors.PolytomicTimeoutError();
|
|
183
210
|
case "unknown":
|
|
184
211
|
throw new errors.PolytomicError({
|
|
185
212
|
message: _response.error.errorMessage,
|
|
@@ -188,8 +215,21 @@ class Schemas {
|
|
|
188
215
|
});
|
|
189
216
|
}
|
|
190
217
|
/**
|
|
191
|
-
*
|
|
192
|
-
*
|
|
218
|
+
* Overrides the primary key detected on a schema.
|
|
219
|
+
*
|
|
220
|
+
* This is a full replacement: the keys you supply become the complete override
|
|
221
|
+
* set, replacing any previously configured overrides. Omitting a key that was
|
|
222
|
+
* previously set removes it.
|
|
223
|
+
*
|
|
224
|
+
* Primary key overrides are useful when the source does not expose a primary
|
|
225
|
+
* key or when the source-detected key is not the correct deduplication
|
|
226
|
+
* identifier for your use case.
|
|
227
|
+
*
|
|
228
|
+
* > 📘 To revert to the source-detected primary keys and remove all overrides,
|
|
229
|
+
* > use [`DELETE /api/connections/{connection_id}/schemas/{schema_id}/primary_keys`](../../../../../../api-reference/schemas/reset-primary-keys).
|
|
230
|
+
*
|
|
231
|
+
* @param {string} connectionId - Unique identifier of the connection.
|
|
232
|
+
* @param {string} schemaId - Identifier of the schema whose primary keys are being overridden.
|
|
193
233
|
* @param {Polytomic.SetPrimaryKeysRequest} request
|
|
194
234
|
* @param {Schemas.RequestOptions} requestOptions - Request-specific configuration.
|
|
195
235
|
*
|
|
@@ -201,17 +241,24 @@ class Schemas {
|
|
|
201
241
|
* @example
|
|
202
242
|
* await client.schemas.setPrimaryKeys("248df4b7-aa70-47b8-a036-33ac447e668d", "public.users")
|
|
203
243
|
*/
|
|
204
|
-
setPrimaryKeys(
|
|
205
|
-
|
|
206
|
-
|
|
244
|
+
setPrimaryKeys(connectionId, schemaId, request = {}, requestOptions) {
|
|
245
|
+
var _a;
|
|
246
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
207
247
|
const _response = yield core.fetcher({
|
|
208
|
-
url: (0, url_join_1.default)((
|
|
248
|
+
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)}/schemas/${encodeURIComponent(schemaId)}/primary_keys`),
|
|
209
249
|
method: "PUT",
|
|
210
|
-
headers:
|
|
250
|
+
headers: {
|
|
251
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
252
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
211
253
|
? yield core.Supplier.get(this._options.version)
|
|
212
|
-
: undefined,
|
|
254
|
+
: undefined,
|
|
255
|
+
"X-Fern-Language": "JavaScript",
|
|
256
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
257
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
258
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
259
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
260
|
+
},
|
|
213
261
|
contentType: "application/json",
|
|
214
|
-
requestType: "json",
|
|
215
262
|
body: request,
|
|
216
263
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
217
264
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -244,7 +291,7 @@ class Schemas {
|
|
|
244
291
|
body: _response.error.rawBody,
|
|
245
292
|
});
|
|
246
293
|
case "timeout":
|
|
247
|
-
throw new errors.PolytomicTimeoutError(
|
|
294
|
+
throw new errors.PolytomicTimeoutError();
|
|
248
295
|
case "unknown":
|
|
249
296
|
throw new errors.PolytomicError({
|
|
250
297
|
message: _response.error.errorMessage,
|
|
@@ -253,10 +300,14 @@ class Schemas {
|
|
|
253
300
|
});
|
|
254
301
|
}
|
|
255
302
|
/**
|
|
256
|
-
*
|
|
303
|
+
* Deletes all primary key overrides for a schema, reverting to the primary keys detected from the source.
|
|
257
304
|
*
|
|
258
|
-
*
|
|
259
|
-
*
|
|
305
|
+
* To replace the overrides with a new set rather than clearing them entirely,
|
|
306
|
+
* use [`PUT /api/connections/{connection_id}/schemas/{schema_id}/primary_keys`](../../../../../../api-reference/schemas/set-primary-keys)
|
|
307
|
+
* instead.
|
|
308
|
+
*
|
|
309
|
+
* @param {string} connectionId - Unique identifier of the connection.
|
|
310
|
+
* @param {string} schemaId - Identifier of the schema whose primary key override should be cleared.
|
|
260
311
|
* @param {Schemas.RequestOptions} requestOptions - Request-specific configuration.
|
|
261
312
|
*
|
|
262
313
|
* @throws {@link Polytomic.BadRequestError}
|
|
@@ -268,16 +319,23 @@ class Schemas {
|
|
|
268
319
|
* await client.schemas.resetPrimaryKeys("248df4b7-aa70-47b8-a036-33ac447e668d", "public.users")
|
|
269
320
|
*/
|
|
270
321
|
resetPrimaryKeys(connectionId, schemaId, requestOptions) {
|
|
322
|
+
var _a;
|
|
271
323
|
return __awaiter(this, void 0, void 0, function* () {
|
|
272
|
-
var _a, _b;
|
|
273
324
|
const _response = yield core.fetcher({
|
|
274
|
-
url: (0, url_join_1.default)((
|
|
325
|
+
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)}/schemas/${encodeURIComponent(schemaId)}/primary_keys`),
|
|
275
326
|
method: "DELETE",
|
|
276
|
-
headers:
|
|
327
|
+
headers: {
|
|
328
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
329
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
277
330
|
? yield core.Supplier.get(this._options.version)
|
|
278
|
-
: undefined,
|
|
331
|
+
: undefined,
|
|
332
|
+
"X-Fern-Language": "JavaScript",
|
|
333
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
334
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
335
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
336
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
337
|
+
},
|
|
279
338
|
contentType: "application/json",
|
|
280
|
-
requestType: "json",
|
|
281
339
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
282
340
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
283
341
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -309,7 +367,7 @@ class Schemas {
|
|
|
309
367
|
body: _response.error.rawBody,
|
|
310
368
|
});
|
|
311
369
|
case "timeout":
|
|
312
|
-
throw new errors.PolytomicTimeoutError(
|
|
370
|
+
throw new errors.PolytomicTimeoutError();
|
|
313
371
|
case "unknown":
|
|
314
372
|
throw new errors.PolytomicError({
|
|
315
373
|
message: _response.error.errorMessage,
|
|
@@ -318,7 +376,28 @@ class Schemas {
|
|
|
318
376
|
});
|
|
319
377
|
}
|
|
320
378
|
/**
|
|
321
|
-
*
|
|
379
|
+
* Refreshes a connection's cached schemas.
|
|
380
|
+
*
|
|
381
|
+
* Call this when the upstream source has added, removed, or changed tables,
|
|
382
|
+
* objects, or fields and you need Polytomic to re-inspect the connection before
|
|
383
|
+
* creating or updating sync configuration.
|
|
384
|
+
*
|
|
385
|
+
* This endpoint does not return the refreshed schemas directly. Follow the
|
|
386
|
+
* `Location` header or poll [`GET /api/connections/{id}/schemas/status`](../../../../../api-reference/schemas/get-status)
|
|
387
|
+
* until the refresh completes, then fetch the schemas you need.
|
|
388
|
+
*
|
|
389
|
+
* > 📘 Schema refresh is asynchronous
|
|
390
|
+
* >
|
|
391
|
+
* > This endpoint kicks off a background refresh of the connection's cached
|
|
392
|
+
* > schemas and returns a `Location` header pointing at
|
|
393
|
+
* > [`GET /api/connections/{id}/schemas/status`](../../../../../api-reference/schemas/get-status).
|
|
394
|
+
* > Poll that endpoint until `cache_status` transitions from `refreshing` to
|
|
395
|
+
* > `fresh` (or until `last_refresh_finished` advances past
|
|
396
|
+
* > `last_refresh_started`) to observe completion.
|
|
397
|
+
* >
|
|
398
|
+
* > Only connections whose current health status is healthy may be refreshed.
|
|
399
|
+
*
|
|
400
|
+
* @param {string} id - Unique identifier of the connection whose schema cache should be refreshed.
|
|
322
401
|
* @param {Schemas.RequestOptions} requestOptions - Request-specific configuration.
|
|
323
402
|
*
|
|
324
403
|
* @throws {@link Polytomic.BadRequestError}
|
|
@@ -330,16 +409,23 @@ class Schemas {
|
|
|
330
409
|
* await client.schemas.refresh("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
331
410
|
*/
|
|
332
411
|
refresh(id, requestOptions) {
|
|
412
|
+
var _a;
|
|
333
413
|
return __awaiter(this, void 0, void 0, function* () {
|
|
334
|
-
var _a, _b;
|
|
335
414
|
const _response = yield core.fetcher({
|
|
336
|
-
url: (0, url_join_1.default)((
|
|
415
|
+
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(id)}/schemas/refresh`),
|
|
337
416
|
method: "POST",
|
|
338
|
-
headers:
|
|
417
|
+
headers: {
|
|
418
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
419
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
339
420
|
? yield core.Supplier.get(this._options.version)
|
|
340
|
-
: undefined,
|
|
421
|
+
: undefined,
|
|
422
|
+
"X-Fern-Language": "JavaScript",
|
|
423
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
424
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
425
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
426
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
427
|
+
},
|
|
341
428
|
contentType: "application/json",
|
|
342
|
-
requestType: "json",
|
|
343
429
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
344
430
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
345
431
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -371,7 +457,7 @@ class Schemas {
|
|
|
371
457
|
body: _response.error.rawBody,
|
|
372
458
|
});
|
|
373
459
|
case "timeout":
|
|
374
|
-
throw new errors.PolytomicTimeoutError(
|
|
460
|
+
throw new errors.PolytomicTimeoutError();
|
|
375
461
|
case "unknown":
|
|
376
462
|
throw new errors.PolytomicError({
|
|
377
463
|
message: _response.error.errorMessage,
|
|
@@ -380,9 +466,25 @@ class Schemas {
|
|
|
380
466
|
});
|
|
381
467
|
}
|
|
382
468
|
/**
|
|
383
|
-
*
|
|
469
|
+
* Returns the current schema inspection status for a connection.
|
|
470
|
+
*
|
|
471
|
+
* Poll this endpoint after calling
|
|
472
|
+
* [`POST /api/connections/{id}/schemas/refresh`](../../../../../api-reference/schemas/refresh) to track
|
|
473
|
+
* progress. When `status` transitions to `completed`, the refreshed schemas
|
|
474
|
+
* are available for use in sync configuration.
|
|
475
|
+
*
|
|
476
|
+
* > 📘 Schema refresh is asynchronous
|
|
477
|
+
* >
|
|
478
|
+
* > This endpoint kicks off a background refresh of the connection's cached
|
|
479
|
+
* > schemas and returns a `Location` header pointing at
|
|
480
|
+
* > [`GET /api/connections/{id}/schemas/status`](../../../../../api-reference/schemas/get-status).
|
|
481
|
+
* > Poll that endpoint until `cache_status` transitions from `refreshing` to
|
|
482
|
+
* > `fresh` (or until `last_refresh_finished` advances past
|
|
483
|
+
* > `last_refresh_started`) to observe completion.
|
|
484
|
+
* >
|
|
485
|
+
* > Only connections whose current health status is healthy may be refreshed.
|
|
384
486
|
*
|
|
385
|
-
* @param {string} id
|
|
487
|
+
* @param {string} id - Unique identifier of the connection whose schema cache status should be returned.
|
|
386
488
|
* @param {Schemas.RequestOptions} requestOptions - Request-specific configuration.
|
|
387
489
|
*
|
|
388
490
|
* @throws {@link Polytomic.BadRequestError}
|
|
@@ -394,16 +496,23 @@ class Schemas {
|
|
|
394
496
|
* await client.schemas.getStatus("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
395
497
|
*/
|
|
396
498
|
getStatus(id, requestOptions) {
|
|
499
|
+
var _a;
|
|
397
500
|
return __awaiter(this, void 0, void 0, function* () {
|
|
398
|
-
var _a, _b;
|
|
399
501
|
const _response = yield core.fetcher({
|
|
400
|
-
url: (0, url_join_1.default)((
|
|
502
|
+
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(id)}/schemas/status`),
|
|
401
503
|
method: "GET",
|
|
402
|
-
headers:
|
|
504
|
+
headers: {
|
|
505
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
506
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
403
507
|
? yield core.Supplier.get(this._options.version)
|
|
404
|
-
: undefined,
|
|
508
|
+
: undefined,
|
|
509
|
+
"X-Fern-Language": "JavaScript",
|
|
510
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
511
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
512
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
513
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
514
|
+
},
|
|
405
515
|
contentType: "application/json",
|
|
406
|
-
requestType: "json",
|
|
407
516
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
408
517
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
409
518
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -435,7 +544,7 @@ class Schemas {
|
|
|
435
544
|
body: _response.error.rawBody,
|
|
436
545
|
});
|
|
437
546
|
case "timeout":
|
|
438
|
-
throw new errors.PolytomicTimeoutError(
|
|
547
|
+
throw new errors.PolytomicTimeoutError();
|
|
439
548
|
case "unknown":
|
|
440
549
|
throw new errors.PolytomicError({
|
|
441
550
|
message: _response.error.errorMessage,
|
|
@@ -444,8 +553,18 @@ class Schemas {
|
|
|
444
553
|
});
|
|
445
554
|
}
|
|
446
555
|
/**
|
|
447
|
-
*
|
|
448
|
-
*
|
|
556
|
+
* Returns a single schema on a connection.
|
|
557
|
+
*
|
|
558
|
+
* The schema is returned from the connection's cached schema set. If the
|
|
559
|
+
* upstream source has changed since the last inspection, the result may be
|
|
560
|
+
* stale.
|
|
561
|
+
*
|
|
562
|
+
* > 📘 Trigger [`POST /api/connections/{id}/schemas/refresh`](../../../../../api-reference/schemas/refresh)
|
|
563
|
+
* > and wait for it to complete before fetching this endpoint if you need
|
|
564
|
+
* > up-to-date field definitions.
|
|
565
|
+
*
|
|
566
|
+
* @param {string} id - Unique identifier of the connection.
|
|
567
|
+
* @param {string} schemaId - Identifier of the schema within the connection. Format depends on the connection type (e.g. schema.table for databases, object name for SaaS backends).
|
|
449
568
|
* @param {Schemas.RequestOptions} requestOptions - Request-specific configuration.
|
|
450
569
|
*
|
|
451
570
|
* @throws {@link Polytomic.BadRequestError}
|
|
@@ -457,16 +576,23 @@ class Schemas {
|
|
|
457
576
|
* await client.schemas.get("248df4b7-aa70-47b8-a036-33ac447e668d", "public.users")
|
|
458
577
|
*/
|
|
459
578
|
get(id, schemaId, requestOptions) {
|
|
579
|
+
var _a;
|
|
460
580
|
return __awaiter(this, void 0, void 0, function* () {
|
|
461
|
-
var _a, _b;
|
|
462
581
|
const _response = yield core.fetcher({
|
|
463
|
-
url: (0, url_join_1.default)((
|
|
582
|
+
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(id)}/schemas/${encodeURIComponent(schemaId)}`),
|
|
464
583
|
method: "GET",
|
|
465
|
-
headers:
|
|
584
|
+
headers: {
|
|
585
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
586
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
466
587
|
? yield core.Supplier.get(this._options.version)
|
|
467
|
-
: undefined,
|
|
588
|
+
: undefined,
|
|
589
|
+
"X-Fern-Language": "JavaScript",
|
|
590
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
591
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
592
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
593
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
594
|
+
},
|
|
468
595
|
contentType: "application/json",
|
|
469
|
-
requestType: "json",
|
|
470
596
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
471
597
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
472
598
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -498,7 +624,7 @@ class Schemas {
|
|
|
498
624
|
body: _response.error.rawBody,
|
|
499
625
|
});
|
|
500
626
|
case "timeout":
|
|
501
|
-
throw new errors.PolytomicTimeoutError(
|
|
627
|
+
throw new errors.PolytomicTimeoutError();
|
|
502
628
|
case "unknown":
|
|
503
629
|
throw new errors.PolytomicError({
|
|
504
630
|
message: _response.error.errorMessage,
|
|
@@ -507,8 +633,21 @@ class Schemas {
|
|
|
507
633
|
});
|
|
508
634
|
}
|
|
509
635
|
/**
|
|
510
|
-
*
|
|
511
|
-
*
|
|
636
|
+
* Returns a sample of records from a schema on a connection.
|
|
637
|
+
*
|
|
638
|
+
* The sample is intended for previewing the shape and values of data before
|
|
639
|
+
* committing to a sync configuration, not for full data export.
|
|
640
|
+
*
|
|
641
|
+
* > 🚧 The sample is not guaranteed to be representative of the full dataset.
|
|
642
|
+
* > Row selection is implementation-defined and may differ across connection
|
|
643
|
+
* > types.
|
|
644
|
+
*
|
|
645
|
+
* > 📘 If the schema's field definitions are stale, refresh them first with
|
|
646
|
+
* > [`POST /api/connections/{id}/schemas/refresh`](../../../../../../api-reference/schemas/refresh) to ensure
|
|
647
|
+
* > the sample aligns with the current schema structure.
|
|
648
|
+
*
|
|
649
|
+
* @param {string} id - Unique identifier of the connection.
|
|
650
|
+
* @param {string} schemaId - Identifier of the schema within the connection.
|
|
512
651
|
* @param {Schemas.RequestOptions} requestOptions - Request-specific configuration.
|
|
513
652
|
*
|
|
514
653
|
* @throws {@link Polytomic.BadRequestError}
|
|
@@ -521,16 +660,23 @@ class Schemas {
|
|
|
521
660
|
* await client.schemas.getRecords("248df4b7-aa70-47b8-a036-33ac447e668d", "public.users")
|
|
522
661
|
*/
|
|
523
662
|
getRecords(id, schemaId, requestOptions) {
|
|
663
|
+
var _a;
|
|
524
664
|
return __awaiter(this, void 0, void 0, function* () {
|
|
525
|
-
var _a, _b;
|
|
526
665
|
const _response = yield core.fetcher({
|
|
527
|
-
url: (0, url_join_1.default)((
|
|
666
|
+
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(id)}/schemas/${encodeURIComponent(schemaId)}/records`),
|
|
528
667
|
method: "GET",
|
|
529
|
-
headers:
|
|
668
|
+
headers: {
|
|
669
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
670
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
530
671
|
? yield core.Supplier.get(this._options.version)
|
|
531
|
-
: undefined,
|
|
672
|
+
: undefined,
|
|
673
|
+
"X-Fern-Language": "JavaScript",
|
|
674
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
675
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
676
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
677
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
678
|
+
},
|
|
532
679
|
contentType: "application/json",
|
|
533
|
-
requestType: "json",
|
|
534
680
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
535
681
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
536
682
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -564,7 +710,7 @@ class Schemas {
|
|
|
564
710
|
body: _response.error.rawBody,
|
|
565
711
|
});
|
|
566
712
|
case "timeout":
|
|
567
|
-
throw new errors.PolytomicTimeoutError(
|
|
713
|
+
throw new errors.PolytomicTimeoutError();
|
|
568
714
|
case "unknown":
|
|
569
715
|
throw new errors.PolytomicError({
|
|
570
716
|
message: _response.error.errorMessage,
|
|
@@ -7,5 +7,6 @@ import * as Polytomic from "../../../../index";
|
|
|
7
7
|
* {}
|
|
8
8
|
*/
|
|
9
9
|
export interface SetPrimaryKeysRequest {
|
|
10
|
+
/** Ordered list of source fields that together form the primary key. Replaces any existing override; supply an empty list to clear. */
|
|
10
11
|
fields?: Polytomic.SchemaPrimaryKeyOverrideInput[];
|
|
11
12
|
}
|
|
@@ -7,5 +7,6 @@ import * as Polytomic from "../../../../index";
|
|
|
7
7
|
* {}
|
|
8
8
|
*/
|
|
9
9
|
export interface UpsertSchemaFieldRequest {
|
|
10
|
+
/** Fields to create or update on the schema. Existing user-defined fields with the same field_id are replaced. */
|
|
10
11
|
fields?: Polytomic.V4UserFieldRequest[];
|
|
11
12
|
}
|