polytomic 1.16.0 → 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 +160 -12
- package/api/resources/connections/client/Client.js +473 -86
- package/api/resources/connections/client/requests/ApiRequest.d.ts +13 -0
- package/api/resources/connections/client/requests/GetConnectionTypeParameterValuesRequestSchema.d.ts +15 -0
- package/api/resources/connections/client/requests/index.d.ts +2 -0
- 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 +4 -0
- package/api/resources/users/client/requests/UpdateUserRequestSchema.d.ts +4 -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/{dist/version.js → api/types/BulkSyncIngestionStatus.js} +3 -2
- 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 +4 -2
- package/api/types/CreateSharedConnectionResponseSchema.d.ts +6 -0
- package/{version.js → api/types/CreateSharedConnectionResponseSchema.js} +3 -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/OutputActor.js +5 -0
- 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 +6 -0
- package/api/types/UtilFieldType.d.ts +1 -1
- package/api/types/V2CreateSharedConnectionResponseEnvelope.d.ts +7 -0
- package/api/types/V2CreateSharedConnectionResponseEnvelope.js +5 -0
- 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/api/types/V3BulkSyncSourceCapabilities.js +5 -0
- 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 +13 -6
- package/api/types/index.js +13 -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 +160 -12
- package/dist/api/resources/connections/client/Client.js +473 -86
- package/dist/api/resources/connections/client/requests/ApiRequest.d.ts +13 -0
- package/dist/api/resources/connections/client/requests/ApiRequest.js +5 -0
- package/dist/api/resources/connections/client/requests/GetConnectionTypeParameterValuesRequestSchema.d.ts +15 -0
- package/dist/api/resources/connections/client/requests/GetConnectionTypeParameterValuesRequestSchema.js +5 -0
- package/dist/api/resources/connections/client/requests/index.d.ts +2 -0
- 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 +4 -0
- package/dist/api/resources/users/client/requests/UpdateUserRequestSchema.d.ts +4 -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/dist/api/types/BulkSyncIngestionStatus.js +5 -0
- 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 +4 -2
- package/dist/api/types/CreateSharedConnectionResponseSchema.d.ts +6 -0
- package/dist/api/types/CreateSharedConnectionResponseSchema.js +5 -0
- 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 +6 -0
- package/dist/api/types/UtilFieldType.d.ts +1 -1
- package/dist/api/types/V2CreateSharedConnectionResponseEnvelope.d.ts +7 -0
- package/dist/api/types/V2CreateSharedConnectionResponseEnvelope.js +5 -0
- 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 +13 -6
- package/dist/api/types/index.js +13 -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 -6547
- package/scripts/rename-to-esm-files.js +0 -115
- package/version.d.ts +0 -1
- /package/api/{types/CommonOutputActor.js → resources/connections/client/requests/ApiRequest.js} +0 -0
- /package/{dist/api/types/CommonOutputActor.js → api/resources/connections/client/requests/GetConnectionTypeParameterValuesRequestSchema.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) {
|
|
@@ -61,19 +51,20 @@ class BulkSync {
|
|
|
61
51
|
constructor(_options) {
|
|
62
52
|
this._options = _options;
|
|
63
53
|
}
|
|
64
|
-
get executions() {
|
|
65
|
-
var _a;
|
|
66
|
-
return ((_a = this._executions) !== null && _a !== void 0 ? _a : (this._executions = new Client_1.Executions(this._options)));
|
|
67
|
-
}
|
|
68
|
-
get schemas() {
|
|
69
|
-
var _a;
|
|
70
|
-
return ((_a = this._schemas) !== null && _a !== void 0 ? _a : (this._schemas = new Client_2.Schemas(this._options)));
|
|
71
|
-
}
|
|
72
|
-
get schedules() {
|
|
73
|
-
var _a;
|
|
74
|
-
return ((_a = this._schedules) !== null && _a !== void 0 ? _a : (this._schedules = new Client_3.Schedules(this._options)));
|
|
75
|
-
}
|
|
76
54
|
/**
|
|
55
|
+
* Lists bulk syncs in the caller's organization.
|
|
56
|
+
*
|
|
57
|
+
* Results are returned as a single `data` array. This version of the endpoint
|
|
58
|
+
* supports the `active` filter but does not support cursor pagination, `limit`,
|
|
59
|
+
* or `page_token` query parameters.
|
|
60
|
+
*
|
|
61
|
+
* If you need a cursor-paginated bulk sync list, use API version `2025-09-18` or
|
|
62
|
+
* later.
|
|
63
|
+
*
|
|
64
|
+
* > 📘 To retrieve a specific sync, use
|
|
65
|
+
* > [`GET /api/bulk/syncs/{id}`](../../../api-reference/bulk-sync/get)
|
|
66
|
+
* > instead of filtering the list client-side.
|
|
67
|
+
*
|
|
77
68
|
* @param {Polytomic.BulkSyncListRequest} request
|
|
78
69
|
* @param {BulkSync.RequestOptions} requestOptions - Request-specific configuration.
|
|
79
70
|
*
|
|
@@ -85,23 +76,30 @@ class BulkSync {
|
|
|
85
76
|
* active: true
|
|
86
77
|
* })
|
|
87
78
|
*/
|
|
88
|
-
list() {
|
|
89
|
-
|
|
90
|
-
|
|
79
|
+
list(request = {}, requestOptions) {
|
|
80
|
+
var _a;
|
|
81
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
91
82
|
const { active } = request;
|
|
92
83
|
const _queryParams = {};
|
|
93
84
|
if (active != null) {
|
|
94
85
|
_queryParams["active"] = active.toString();
|
|
95
86
|
}
|
|
96
87
|
const _response = yield core.fetcher({
|
|
97
|
-
url: (0, url_join_1.default)((
|
|
88
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/bulk/syncs"),
|
|
98
89
|
method: "GET",
|
|
99
|
-
headers:
|
|
90
|
+
headers: {
|
|
91
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
92
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
100
93
|
? yield core.Supplier.get(this._options.version)
|
|
101
|
-
: undefined,
|
|
94
|
+
: undefined,
|
|
95
|
+
"X-Fern-Language": "JavaScript",
|
|
96
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
97
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
98
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
99
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
100
|
+
},
|
|
102
101
|
contentType: "application/json",
|
|
103
102
|
queryParameters: _queryParams,
|
|
104
|
-
requestType: "json",
|
|
105
103
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
106
104
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
107
105
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -129,7 +127,7 @@ class BulkSync {
|
|
|
129
127
|
body: _response.error.rawBody,
|
|
130
128
|
});
|
|
131
129
|
case "timeout":
|
|
132
|
-
throw new errors.PolytomicTimeoutError(
|
|
130
|
+
throw new errors.PolytomicTimeoutError();
|
|
133
131
|
case "unknown":
|
|
134
132
|
throw new errors.PolytomicError({
|
|
135
133
|
message: _response.error.errorMessage,
|
|
@@ -138,9 +136,9 @@ class BulkSync {
|
|
|
138
136
|
});
|
|
139
137
|
}
|
|
140
138
|
/**
|
|
141
|
-
*
|
|
139
|
+
* Creates a new bulk sync from a source connection to a destination connection.
|
|
142
140
|
*
|
|
143
|
-
* Bulk
|
|
141
|
+
* Bulk syncs are used for the ELT pattern (Extract, Load, and Transform), where you want to sync un-transformed data to your data warehouses, databases, or cloud storage buckets like S3.
|
|
144
142
|
*
|
|
145
143
|
* All of the functionality described in [the product
|
|
146
144
|
* documentation](https://docs.polytomic.com/docs/bulk-syncs) is configurable via
|
|
@@ -148,9 +146,9 @@ class BulkSync {
|
|
|
148
146
|
*
|
|
149
147
|
* Sample code examples:
|
|
150
148
|
*
|
|
151
|
-
* - [Bulk sync (ELT) from Salesforce to S3](
|
|
152
|
-
* - [Bulk sync (ELT) from Salesforce to Snowflake](
|
|
153
|
-
* - [Bulk sync (ELT) from HubSpot to PostgreSQL](
|
|
149
|
+
* - [Bulk sync (ELT) from Salesforce to S3](../../../guides/code-examples/bulk-sync-elt-from-salesforce-to-s-3)
|
|
150
|
+
* - [Bulk sync (ELT) from Salesforce to Snowflake](../../../guides/code-examples/bulk-sync-elt-from-salesforce-to-snowflake)
|
|
151
|
+
* - [Bulk sync (ELT) from HubSpot to PostgreSQL](../../../guides/code-examples/bulk-sync-elt-from-hub-spot-to-postgre-sql)
|
|
154
152
|
*
|
|
155
153
|
* ## Connection specific configuration
|
|
156
154
|
*
|
|
@@ -162,8 +160,24 @@ class BulkSync {
|
|
|
162
160
|
* Polytomic reads data from the source connection. This will not be available for
|
|
163
161
|
* integrations that do not support additional configuration.
|
|
164
162
|
*
|
|
165
|
-
* Consult the [connection configurations](
|
|
166
|
-
* to see configurations for particular integrations (for example, [here](
|
|
163
|
+
* Consult the [connection configurations](../../../guides/configuring-your-connections/overview)
|
|
164
|
+
* to see configurations for particular integrations (for example, [here](../../../guides/configuring-your-connections/connections/postgre-sql#source-1) is the available source configuration for the PostgreSQL bulk sync source).
|
|
165
|
+
*
|
|
166
|
+
* ## Defaults and selection behavior
|
|
167
|
+
*
|
|
168
|
+
* If `schemas` is omitted, the sync is created with all available source schemas
|
|
169
|
+
* selected. Pass `schemas` explicitly if you want the initial sync to include
|
|
170
|
+
* only a subset of tables or objects.
|
|
171
|
+
*
|
|
172
|
+
* Schedule times are interpreted in UTC.
|
|
173
|
+
*
|
|
174
|
+
* When omitted, automatic discovery defaults are conservative:
|
|
175
|
+
*
|
|
176
|
+
* - `automatically_add_new_objects` defaults to not enabling newly discovered
|
|
177
|
+
* source objects automatically.
|
|
178
|
+
* - `automatically_add_new_fields` defaults to enabling newly discovered fields
|
|
179
|
+
* on already selected objects.
|
|
180
|
+
* - `normalize_names` defaults to enabled.
|
|
167
181
|
*
|
|
168
182
|
* @param {Polytomic.CreateBulkSyncRequest} request
|
|
169
183
|
* @param {BulkSync.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -182,22 +196,29 @@ class BulkSync {
|
|
|
182
196
|
* destination_connection_id: "248df4b7-aa70-47b8-a036-33ac447e668d",
|
|
183
197
|
* name: "My Bulk Sync",
|
|
184
198
|
* schedule: {
|
|
185
|
-
* frequency:
|
|
199
|
+
* frequency: Polytomic.ScheduleFrequency.Manual
|
|
186
200
|
* },
|
|
187
201
|
* source_connection_id: "248df4b7-aa70-47b8-a036-33ac447e668d"
|
|
188
202
|
* })
|
|
189
203
|
*/
|
|
190
204
|
create(request, requestOptions) {
|
|
205
|
+
var _a;
|
|
191
206
|
return __awaiter(this, void 0, void 0, function* () {
|
|
192
|
-
var _a, _b;
|
|
193
207
|
const _response = yield core.fetcher({
|
|
194
|
-
url: (0, url_join_1.default)((
|
|
208
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/bulk/syncs"),
|
|
195
209
|
method: "POST",
|
|
196
|
-
headers:
|
|
210
|
+
headers: {
|
|
211
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
212
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
197
213
|
? yield core.Supplier.get(this._options.version)
|
|
198
|
-
: undefined,
|
|
214
|
+
: undefined,
|
|
215
|
+
"X-Fern-Language": "JavaScript",
|
|
216
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
217
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
218
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
219
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
220
|
+
},
|
|
199
221
|
contentType: "application/json",
|
|
200
|
-
requestType: "json",
|
|
201
222
|
body: request,
|
|
202
223
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
203
224
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -232,7 +253,7 @@ class BulkSync {
|
|
|
232
253
|
body: _response.error.rawBody,
|
|
233
254
|
});
|
|
234
255
|
case "timeout":
|
|
235
|
-
throw new errors.PolytomicTimeoutError(
|
|
256
|
+
throw new errors.PolytomicTimeoutError();
|
|
236
257
|
case "unknown":
|
|
237
258
|
throw new errors.PolytomicError({
|
|
238
259
|
message: _response.error.errorMessage,
|
|
@@ -241,6 +262,16 @@ class BulkSync {
|
|
|
241
262
|
});
|
|
242
263
|
}
|
|
243
264
|
/**
|
|
265
|
+
* Returns a single bulk sync by ID.
|
|
266
|
+
*
|
|
267
|
+
* The response includes the sync's top-level configuration — source, destination,
|
|
268
|
+
* schedules, and discovery settings.
|
|
269
|
+
*
|
|
270
|
+
* - To check whether the sync is running and see the most-recent execution result,
|
|
271
|
+
* use [`GET /api/bulk/syncs/{id}/status`](../../../../api-reference/bulk-sync/get-status).
|
|
272
|
+
* - To inspect which schemas are selected and how they are configured, use
|
|
273
|
+
* [`GET /api/bulk/syncs/{id}/schemas`](../../../../api-reference/bulk-sync/schemas/list).
|
|
274
|
+
*
|
|
244
275
|
* @param {string} id
|
|
245
276
|
* @param {Polytomic.BulkSyncGetRequest} request
|
|
246
277
|
* @param {BulkSync.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -253,23 +284,30 @@ class BulkSync {
|
|
|
253
284
|
* refresh_schemas: true
|
|
254
285
|
* })
|
|
255
286
|
*/
|
|
256
|
-
get(
|
|
257
|
-
|
|
258
|
-
|
|
287
|
+
get(id, request = {}, requestOptions) {
|
|
288
|
+
var _a;
|
|
289
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
259
290
|
const { refresh_schemas: refreshSchemas } = request;
|
|
260
291
|
const _queryParams = {};
|
|
261
292
|
if (refreshSchemas != null) {
|
|
262
293
|
_queryParams["refresh_schemas"] = refreshSchemas.toString();
|
|
263
294
|
}
|
|
264
295
|
const _response = yield core.fetcher({
|
|
265
|
-
url: (0, url_join_1.default)((
|
|
296
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/bulk/syncs/${encodeURIComponent(id)}`),
|
|
266
297
|
method: "GET",
|
|
267
|
-
headers:
|
|
298
|
+
headers: {
|
|
299
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
300
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
268
301
|
? yield core.Supplier.get(this._options.version)
|
|
269
|
-
: undefined,
|
|
302
|
+
: undefined,
|
|
303
|
+
"X-Fern-Language": "JavaScript",
|
|
304
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
305
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
306
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
307
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
308
|
+
},
|
|
270
309
|
contentType: "application/json",
|
|
271
310
|
queryParameters: _queryParams,
|
|
272
|
-
requestType: "json",
|
|
273
311
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
274
312
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
275
313
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -297,7 +335,7 @@ class BulkSync {
|
|
|
297
335
|
body: _response.error.rawBody,
|
|
298
336
|
});
|
|
299
337
|
case "timeout":
|
|
300
|
-
throw new errors.PolytomicTimeoutError(
|
|
338
|
+
throw new errors.PolytomicTimeoutError();
|
|
301
339
|
case "unknown":
|
|
302
340
|
throw new errors.PolytomicError({
|
|
303
341
|
message: _response.error.errorMessage,
|
|
@@ -306,9 +344,41 @@ class BulkSync {
|
|
|
306
344
|
});
|
|
307
345
|
}
|
|
308
346
|
/**
|
|
347
|
+
* Updates an existing bulk sync's top-level configuration.
|
|
348
|
+
*
|
|
349
|
+
* Updating a bulk sync is a **full replacement** of the sync's top-level
|
|
350
|
+
* configuration. Every field in the request body is written to the sync; any
|
|
351
|
+
* field you omit is cleared or reset to its default value.
|
|
352
|
+
*
|
|
353
|
+
* To make a partial change — for example, toggling `active` or swapping a
|
|
354
|
+
* schedule — fetch the current sync with
|
|
355
|
+
* [`GET /api/bulk/syncs/{id}`](../../../../api-reference/bulk-sync/get),
|
|
356
|
+
* modify the fields you want to change, and send the complete object back in
|
|
357
|
+
* the update request.
|
|
358
|
+
*
|
|
359
|
+
* Updates to `active`, `schedules`, and `policies` take effect immediately.
|
|
360
|
+
* Changes to source or destination configuration take effect on the sync's
|
|
361
|
+
* next execution.
|
|
362
|
+
*
|
|
363
|
+
* Because omitted fields are reset to their defaults, the discovery and
|
|
364
|
+
* naming options behave the same as on create when left out:
|
|
365
|
+
*
|
|
366
|
+
* - `automatically_add_new_objects` resets to not enabling newly discovered
|
|
367
|
+
* source objects automatically.
|
|
368
|
+
* - `automatically_add_new_fields` resets to enabling newly discovered
|
|
369
|
+
* fields on already selected objects.
|
|
370
|
+
* - `normalize_names` resets to enabled.
|
|
371
|
+
*
|
|
372
|
+
* Send the existing values explicitly if you want to preserve a non-default or
|
|
373
|
+
* non-empty setting, including schema and field selections.
|
|
374
|
+
*
|
|
309
375
|
* > 📘 Updating schemas
|
|
310
376
|
* >
|
|
311
|
-
* > Schema updates
|
|
377
|
+
* > Schema updates are not performed through this endpoint. Use the
|
|
378
|
+
* > [Update Bulk Sync Schemas](../../../../api-reference/bulk-sync/schemas/patch)
|
|
379
|
+
* > endpoint to change a subset of schemas, or
|
|
380
|
+
* > [Update Bulk Sync Schema](../../../../api-reference/bulk-sync/schemas/update)
|
|
381
|
+
* > to replace a single schema's configuration.
|
|
312
382
|
*
|
|
313
383
|
* @param {string} id
|
|
314
384
|
* @param {Polytomic.UpdateBulkSyncRequest} request
|
|
@@ -328,22 +398,29 @@ class BulkSync {
|
|
|
328
398
|
* destination_connection_id: "248df4b7-aa70-47b8-a036-33ac447e668d",
|
|
329
399
|
* name: "My Bulk Sync",
|
|
330
400
|
* schedule: {
|
|
331
|
-
* frequency:
|
|
401
|
+
* frequency: Polytomic.ScheduleFrequency.Manual
|
|
332
402
|
* },
|
|
333
403
|
* source_connection_id: "248df4b7-aa70-47b8-a036-33ac447e668d"
|
|
334
404
|
* })
|
|
335
405
|
*/
|
|
336
406
|
update(id, request, requestOptions) {
|
|
407
|
+
var _a;
|
|
337
408
|
return __awaiter(this, void 0, void 0, function* () {
|
|
338
|
-
var _a, _b;
|
|
339
409
|
const _response = yield core.fetcher({
|
|
340
|
-
url: (0, url_join_1.default)((
|
|
410
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/bulk/syncs/${encodeURIComponent(id)}`),
|
|
341
411
|
method: "PUT",
|
|
342
|
-
headers:
|
|
412
|
+
headers: {
|
|
413
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
414
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
343
415
|
? yield core.Supplier.get(this._options.version)
|
|
344
|
-
: undefined,
|
|
416
|
+
: undefined,
|
|
417
|
+
"X-Fern-Language": "JavaScript",
|
|
418
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
419
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
420
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
421
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
422
|
+
},
|
|
345
423
|
contentType: "application/json",
|
|
346
|
-
requestType: "json",
|
|
347
424
|
body: request,
|
|
348
425
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
349
426
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -378,7 +455,7 @@ class BulkSync {
|
|
|
378
455
|
body: _response.error.rawBody,
|
|
379
456
|
});
|
|
380
457
|
case "timeout":
|
|
381
|
-
throw new errors.PolytomicTimeoutError(
|
|
458
|
+
throw new errors.PolytomicTimeoutError();
|
|
382
459
|
case "unknown":
|
|
383
460
|
throw new errors.PolytomicError({
|
|
384
461
|
message: _response.error.errorMessage,
|
|
@@ -387,6 +464,14 @@ class BulkSync {
|
|
|
387
464
|
});
|
|
388
465
|
}
|
|
389
466
|
/**
|
|
467
|
+
* Deletes a bulk sync, cancelling any running executions.
|
|
468
|
+
*
|
|
469
|
+
* Any execution that is currently running is cancelled before the sync record is
|
|
470
|
+
* removed.
|
|
471
|
+
*
|
|
472
|
+
* > 🚧 All associated schedules, schema configurations, and execution history are
|
|
473
|
+
* > deleted along with the sync.
|
|
474
|
+
*
|
|
390
475
|
* @param {string} id
|
|
391
476
|
* @param {Polytomic.BulkSyncRemoveRequest} request
|
|
392
477
|
* @param {BulkSync.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -401,23 +486,30 @@ class BulkSync {
|
|
|
401
486
|
* refresh_schemas: true
|
|
402
487
|
* })
|
|
403
488
|
*/
|
|
404
|
-
remove(
|
|
405
|
-
|
|
406
|
-
|
|
489
|
+
remove(id, request = {}, requestOptions) {
|
|
490
|
+
var _a;
|
|
491
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
407
492
|
const { refresh_schemas: refreshSchemas } = request;
|
|
408
493
|
const _queryParams = {};
|
|
409
494
|
if (refreshSchemas != null) {
|
|
410
495
|
_queryParams["refresh_schemas"] = refreshSchemas.toString();
|
|
411
496
|
}
|
|
412
497
|
const _response = yield core.fetcher({
|
|
413
|
-
url: (0, url_join_1.default)((
|
|
498
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/bulk/syncs/${encodeURIComponent(id)}`),
|
|
414
499
|
method: "DELETE",
|
|
415
|
-
headers:
|
|
500
|
+
headers: {
|
|
501
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
502
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
416
503
|
? yield core.Supplier.get(this._options.version)
|
|
417
|
-
: undefined,
|
|
504
|
+
: undefined,
|
|
505
|
+
"X-Fern-Language": "JavaScript",
|
|
506
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
507
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
508
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
509
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
510
|
+
},
|
|
418
511
|
contentType: "application/json",
|
|
419
512
|
queryParameters: _queryParams,
|
|
420
|
-
requestType: "json",
|
|
421
513
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
422
514
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
423
515
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -449,7 +541,7 @@ class BulkSync {
|
|
|
449
541
|
body: _response.error.rawBody,
|
|
450
542
|
});
|
|
451
543
|
case "timeout":
|
|
452
|
-
throw new errors.PolytomicTimeoutError(
|
|
544
|
+
throw new errors.PolytomicTimeoutError();
|
|
453
545
|
case "unknown":
|
|
454
546
|
throw new errors.PolytomicError({
|
|
455
547
|
message: _response.error.errorMessage,
|
|
@@ -458,6 +550,17 @@ class BulkSync {
|
|
|
458
550
|
});
|
|
459
551
|
}
|
|
460
552
|
/**
|
|
553
|
+
* Sets whether a bulk sync is active.
|
|
554
|
+
*
|
|
555
|
+
* Only active syncs are eligible to execute on their configured schedule.
|
|
556
|
+
* Deactivating a sync prevents future scheduled runs and requests cancellation of
|
|
557
|
+
* any execution that is currently in progress.
|
|
558
|
+
*
|
|
559
|
+
* > 📘 To start or stop a running execution directly, use
|
|
560
|
+
* > [`POST /api/bulk/syncs/{id}/executions`](../../../../../api-reference/bulk-sync/start)
|
|
561
|
+
* > or
|
|
562
|
+
* > [`POST /api/bulk/syncs/{id}/cancel`](../../../../../api-reference/bulk-sync/cancel).
|
|
563
|
+
*
|
|
461
564
|
* @param {string} id
|
|
462
565
|
* @param {Polytomic.ActivateSyncInput} request
|
|
463
566
|
* @param {BulkSync.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -473,16 +576,23 @@ class BulkSync {
|
|
|
473
576
|
* })
|
|
474
577
|
*/
|
|
475
578
|
activate(id, request, requestOptions) {
|
|
579
|
+
var _a;
|
|
476
580
|
return __awaiter(this, void 0, void 0, function* () {
|
|
477
|
-
var _a, _b;
|
|
478
581
|
const _response = yield core.fetcher({
|
|
479
|
-
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/bulk/syncs/${encodeURIComponent(id)}/activate`),
|
|
480
583
|
method: "POST",
|
|
481
|
-
headers:
|
|
584
|
+
headers: {
|
|
585
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
586
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
482
587
|
? yield core.Supplier.get(this._options.version)
|
|
483
|
-
: 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
|
+
},
|
|
484
595
|
contentType: "application/json",
|
|
485
|
-
requestType: "json",
|
|
486
596
|
body: request,
|
|
487
597
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
488
598
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -515,7 +625,7 @@ class BulkSync {
|
|
|
515
625
|
body: _response.error.rawBody,
|
|
516
626
|
});
|
|
517
627
|
case "timeout":
|
|
518
|
-
throw new errors.PolytomicTimeoutError(
|
|
628
|
+
throw new errors.PolytomicTimeoutError();
|
|
519
629
|
case "unknown":
|
|
520
630
|
throw new errors.PolytomicError({
|
|
521
631
|
message: _response.error.errorMessage,
|
|
@@ -524,6 +634,14 @@ class BulkSync {
|
|
|
524
634
|
});
|
|
525
635
|
}
|
|
526
636
|
/**
|
|
637
|
+
* Requests cancellation of any running executions on a bulk sync.
|
|
638
|
+
*
|
|
639
|
+
* Cancellation is asynchronous. A successful response means the cancellation
|
|
640
|
+
* signal has been queued; the running execution continues until the signal is
|
|
641
|
+
* processed. Poll `GET /api/bulk/syncs/{id}/status` until the current execution
|
|
642
|
+
* reaches a terminal state (`completed`, `canceled`, or `failed`) to confirm
|
|
643
|
+
* cancellation has taken effect.
|
|
644
|
+
*
|
|
527
645
|
* @param {string} id - The active execution of this bulk sync ID will be cancelled.
|
|
528
646
|
* @param {BulkSync.RequestOptions} requestOptions - Request-specific configuration.
|
|
529
647
|
*
|
|
@@ -536,16 +654,23 @@ class BulkSync {
|
|
|
536
654
|
* await client.bulkSync.cancel("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
537
655
|
*/
|
|
538
656
|
cancel(id, requestOptions) {
|
|
657
|
+
var _a;
|
|
539
658
|
return __awaiter(this, void 0, void 0, function* () {
|
|
540
|
-
var _a, _b;
|
|
541
659
|
const _response = yield core.fetcher({
|
|
542
|
-
url: (0, url_join_1.default)((
|
|
660
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/bulk/syncs/${encodeURIComponent(id)}/cancel`),
|
|
543
661
|
method: "POST",
|
|
544
|
-
headers:
|
|
662
|
+
headers: {
|
|
663
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
664
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
545
665
|
? yield core.Supplier.get(this._options.version)
|
|
546
|
-
: undefined,
|
|
666
|
+
: undefined,
|
|
667
|
+
"X-Fern-Language": "JavaScript",
|
|
668
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
669
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
670
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
671
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
672
|
+
},
|
|
547
673
|
contentType: "application/json",
|
|
548
|
-
requestType: "json",
|
|
549
674
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
550
675
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
551
676
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -577,7 +702,7 @@ class BulkSync {
|
|
|
577
702
|
body: _response.error.rawBody,
|
|
578
703
|
});
|
|
579
704
|
case "timeout":
|
|
580
|
-
throw new errors.PolytomicTimeoutError(
|
|
705
|
+
throw new errors.PolytomicTimeoutError();
|
|
581
706
|
case "unknown":
|
|
582
707
|
throw new errors.PolytomicError({
|
|
583
708
|
message: _response.error.errorMessage,
|
|
@@ -586,7 +711,24 @@ class BulkSync {
|
|
|
586
711
|
});
|
|
587
712
|
}
|
|
588
713
|
/**
|
|
589
|
-
*
|
|
714
|
+
* Starts a new execution of a bulk sync.
|
|
715
|
+
*
|
|
716
|
+
* This endpoint returns the execution record immediately after the run is queued
|
|
717
|
+
* or started. Use the execution ID with the bulk-sync execution endpoints if you
|
|
718
|
+
* need to monitor progress in detail.
|
|
719
|
+
*
|
|
720
|
+
* ## Execution modes
|
|
721
|
+
*
|
|
722
|
+
* - Set `test=true` to validate the sync without writing to the destination.
|
|
723
|
+
* - Use `resync_mode` for destructive or full-refresh style reruns.
|
|
724
|
+
* - `test` and `resync_mode` are mutually exclusive.
|
|
725
|
+
*
|
|
726
|
+
* The legacy `resync` boolean is no longer accepted on this v5 endpoint. Send
|
|
727
|
+
* `resync_mode` instead.
|
|
728
|
+
*
|
|
729
|
+
* If another execution is already running, the endpoint returns `409 Conflict`.
|
|
730
|
+
*
|
|
731
|
+
* @param {string} id - Unique identifier of the bulk sync.
|
|
590
732
|
* @param {Polytomic.StartBulkSyncRequest} request
|
|
591
733
|
* @param {BulkSync.RequestOptions} requestOptions - Request-specific configuration.
|
|
592
734
|
*
|
|
@@ -597,17 +739,24 @@ class BulkSync {
|
|
|
597
739
|
* @example
|
|
598
740
|
* await client.bulkSync.start("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
599
741
|
*/
|
|
600
|
-
start(
|
|
601
|
-
|
|
602
|
-
|
|
742
|
+
start(id, request = {}, requestOptions) {
|
|
743
|
+
var _a;
|
|
744
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
603
745
|
const _response = yield core.fetcher({
|
|
604
|
-
url: (0, url_join_1.default)((
|
|
746
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/bulk/syncs/${encodeURIComponent(id)}/executions`),
|
|
605
747
|
method: "POST",
|
|
606
|
-
headers:
|
|
748
|
+
headers: {
|
|
749
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
750
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
607
751
|
? yield core.Supplier.get(this._options.version)
|
|
608
|
-
: undefined,
|
|
752
|
+
: undefined,
|
|
753
|
+
"X-Fern-Language": "JavaScript",
|
|
754
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
755
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
756
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
757
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
758
|
+
},
|
|
609
759
|
contentType: "application/json",
|
|
610
|
-
requestType: "json",
|
|
611
760
|
body: request,
|
|
612
761
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
613
762
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -638,7 +787,7 @@ class BulkSync {
|
|
|
638
787
|
body: _response.error.rawBody,
|
|
639
788
|
});
|
|
640
789
|
case "timeout":
|
|
641
|
-
throw new errors.PolytomicTimeoutError(
|
|
790
|
+
throw new errors.PolytomicTimeoutError();
|
|
642
791
|
case "unknown":
|
|
643
792
|
throw new errors.PolytomicError({
|
|
644
793
|
message: _response.error.errorMessage,
|
|
@@ -647,7 +796,19 @@ class BulkSync {
|
|
|
647
796
|
});
|
|
648
797
|
}
|
|
649
798
|
/**
|
|
650
|
-
*
|
|
799
|
+
* Returns the current status of a bulk sync.
|
|
800
|
+
*
|
|
801
|
+
* The response includes the sync's current active/inactive state together with
|
|
802
|
+
* information about the most recent execution — its status, start time, and any
|
|
803
|
+
* errors — making this endpoint well-suited for health checks and monitoring
|
|
804
|
+
* dashboards.
|
|
805
|
+
*
|
|
806
|
+
* For the complete execution history, use
|
|
807
|
+
* [`GET /api/bulk/syncs/{id}/executions`](../../../../../api-reference/bulk-sync/executions/list).
|
|
808
|
+
* For the full details of a specific run, including per-schema breakdowns, use
|
|
809
|
+
* [`GET /api/bulk/syncs/{id}/executions/{exec_id}`](../../../../../api-reference/bulk-sync/executions/get).
|
|
810
|
+
*
|
|
811
|
+
* @param {string} id - Unique identifier of the bulk sync.
|
|
651
812
|
* @param {BulkSync.RequestOptions} requestOptions - Request-specific configuration.
|
|
652
813
|
*
|
|
653
814
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
@@ -658,16 +819,23 @@ class BulkSync {
|
|
|
658
819
|
* await client.bulkSync.getStatus("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
659
820
|
*/
|
|
660
821
|
getStatus(id, requestOptions) {
|
|
822
|
+
var _a;
|
|
661
823
|
return __awaiter(this, void 0, void 0, function* () {
|
|
662
|
-
var _a, _b;
|
|
663
824
|
const _response = yield core.fetcher({
|
|
664
|
-
url: (0, url_join_1.default)((
|
|
825
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/bulk/syncs/${encodeURIComponent(id)}/status`),
|
|
665
826
|
method: "GET",
|
|
666
|
-
headers:
|
|
827
|
+
headers: {
|
|
828
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
829
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
667
830
|
? yield core.Supplier.get(this._options.version)
|
|
668
|
-
: undefined,
|
|
831
|
+
: undefined,
|
|
832
|
+
"X-Fern-Language": "JavaScript",
|
|
833
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
834
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
835
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
836
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
837
|
+
},
|
|
669
838
|
contentType: "application/json",
|
|
670
|
-
requestType: "json",
|
|
671
839
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
672
840
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
673
841
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -697,7 +865,7 @@ class BulkSync {
|
|
|
697
865
|
body: _response.error.rawBody,
|
|
698
866
|
});
|
|
699
867
|
case "timeout":
|
|
700
|
-
throw new errors.PolytomicTimeoutError(
|
|
868
|
+
throw new errors.PolytomicTimeoutError();
|
|
701
869
|
case "unknown":
|
|
702
870
|
throw new errors.PolytomicError({
|
|
703
871
|
message: _response.error.errorMessage,
|
|
@@ -706,7 +874,22 @@ class BulkSync {
|
|
|
706
874
|
});
|
|
707
875
|
}
|
|
708
876
|
/**
|
|
709
|
-
*
|
|
877
|
+
* Lists the schemas (tables or objects) available on a connection for use as a bulk sync source, optionally including per-schema field details.
|
|
878
|
+
*
|
|
879
|
+
* The response reflects what the
|
|
880
|
+
* connection currently has cached; if the upstream source has changed, trigger
|
|
881
|
+
* a refresh first with
|
|
882
|
+
* [`POST /api/connections/{id}/schemas/refresh`](../../../../../api-reference/schemas/refresh).
|
|
883
|
+
*
|
|
884
|
+
* These are the schemas available for selection, not the schemas already
|
|
885
|
+
* configured on any particular sync. To inspect schemas on a running sync, use
|
|
886
|
+
* [`GET /api/bulk/syncs/{id}/schemas`](../../../../../api-reference/bulk-sync/schemas/list).
|
|
887
|
+
*
|
|
888
|
+
* Pass `include_fields=true` to receive per-schema field details in a single call.
|
|
889
|
+
* Omit it when you only need the schema list, as field enumeration can be slow for
|
|
890
|
+
* large sources.
|
|
891
|
+
*
|
|
892
|
+
* @param {string} id - Unique identifier of the connection.
|
|
710
893
|
* @param {Polytomic.BulkSyncGetSourceRequest} request
|
|
711
894
|
* @param {BulkSync.RequestOptions} requestOptions - Request-specific configuration.
|
|
712
895
|
*
|
|
@@ -720,23 +903,30 @@ class BulkSync {
|
|
|
720
903
|
* include_fields: true
|
|
721
904
|
* })
|
|
722
905
|
*/
|
|
723
|
-
getSource(
|
|
724
|
-
|
|
725
|
-
|
|
906
|
+
getSource(id, request = {}, requestOptions) {
|
|
907
|
+
var _a;
|
|
908
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
726
909
|
const { include_fields: includeFields } = request;
|
|
727
910
|
const _queryParams = {};
|
|
728
911
|
if (includeFields != null) {
|
|
729
912
|
_queryParams["include_fields"] = includeFields.toString();
|
|
730
913
|
}
|
|
731
914
|
const _response = yield core.fetcher({
|
|
732
|
-
url: (0, url_join_1.default)((
|
|
915
|
+
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)}/bulksync/source`),
|
|
733
916
|
method: "GET",
|
|
734
|
-
headers:
|
|
917
|
+
headers: {
|
|
918
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
919
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
735
920
|
? yield core.Supplier.get(this._options.version)
|
|
736
|
-
: undefined,
|
|
921
|
+
: undefined,
|
|
922
|
+
"X-Fern-Language": "JavaScript",
|
|
923
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
924
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
925
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
926
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
927
|
+
},
|
|
737
928
|
contentType: "application/json",
|
|
738
929
|
queryParameters: _queryParams,
|
|
739
|
-
requestType: "json",
|
|
740
930
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
741
931
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
742
932
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -768,7 +958,7 @@ class BulkSync {
|
|
|
768
958
|
body: _response.error.rawBody,
|
|
769
959
|
});
|
|
770
960
|
case "timeout":
|
|
771
|
-
throw new errors.PolytomicTimeoutError(
|
|
961
|
+
throw new errors.PolytomicTimeoutError();
|
|
772
962
|
case "unknown":
|
|
773
963
|
throw new errors.PolytomicError({
|
|
774
964
|
message: _response.error.errorMessage,
|
|
@@ -777,6 +967,18 @@ class BulkSync {
|
|
|
777
967
|
});
|
|
778
968
|
}
|
|
779
969
|
/**
|
|
970
|
+
* Describes the destination configuration schema a connection accepts when used as a bulk sync destination.
|
|
971
|
+
*
|
|
972
|
+
* The response is a JSON Schema object describing the shape of the
|
|
973
|
+
* `destination_configuration` field you must supply when
|
|
974
|
+
* [creating](../../../../../api-reference/bulk-sync/create) or
|
|
975
|
+
* [updating](../../../../../api-reference/bulk-sync/update) a bulk sync that uses this
|
|
976
|
+
* connection as its destination. Required fields vary by connection type.
|
|
977
|
+
*
|
|
978
|
+
* > 📘 Fetch this endpoint once per connection type rather than once per sync.
|
|
979
|
+
* > The configuration schema is the same for all syncs sharing the same
|
|
980
|
+
* > destination connection.
|
|
981
|
+
*
|
|
780
982
|
* @param {string} id
|
|
781
983
|
* @param {BulkSync.RequestOptions} requestOptions - Request-specific configuration.
|
|
782
984
|
*
|
|
@@ -789,16 +991,23 @@ class BulkSync {
|
|
|
789
991
|
* await client.bulkSync.getDestination("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
790
992
|
*/
|
|
791
993
|
getDestination(id, requestOptions) {
|
|
994
|
+
var _a;
|
|
792
995
|
return __awaiter(this, void 0, void 0, function* () {
|
|
793
|
-
var _a, _b;
|
|
794
996
|
const _response = yield core.fetcher({
|
|
795
|
-
url: (0, url_join_1.default)((
|
|
997
|
+
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)}/bulksync/target`),
|
|
796
998
|
method: "GET",
|
|
797
|
-
headers:
|
|
999
|
+
headers: {
|
|
1000
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
1001
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
798
1002
|
? yield core.Supplier.get(this._options.version)
|
|
799
|
-
: undefined,
|
|
1003
|
+
: undefined,
|
|
1004
|
+
"X-Fern-Language": "JavaScript",
|
|
1005
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
1006
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
1007
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
1008
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
1009
|
+
},
|
|
800
1010
|
contentType: "application/json",
|
|
801
|
-
requestType: "json",
|
|
802
1011
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
803
1012
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
804
1013
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -830,7 +1039,7 @@ class BulkSync {
|
|
|
830
1039
|
body: _response.error.rawBody,
|
|
831
1040
|
});
|
|
832
1041
|
case "timeout":
|
|
833
|
-
throw new errors.PolytomicTimeoutError(
|
|
1042
|
+
throw new errors.PolytomicTimeoutError();
|
|
834
1043
|
case "unknown":
|
|
835
1044
|
throw new errors.PolytomicError({
|
|
836
1045
|
message: _response.error.errorMessage,
|
|
@@ -838,6 +1047,18 @@ class BulkSync {
|
|
|
838
1047
|
}
|
|
839
1048
|
});
|
|
840
1049
|
}
|
|
1050
|
+
get executions() {
|
|
1051
|
+
var _a;
|
|
1052
|
+
return ((_a = this._executions) !== null && _a !== void 0 ? _a : (this._executions = new Client_1.Executions(this._options)));
|
|
1053
|
+
}
|
|
1054
|
+
get schemas() {
|
|
1055
|
+
var _a;
|
|
1056
|
+
return ((_a = this._schemas) !== null && _a !== void 0 ? _a : (this._schemas = new Client_2.Schemas(this._options)));
|
|
1057
|
+
}
|
|
1058
|
+
get schedules() {
|
|
1059
|
+
var _a;
|
|
1060
|
+
return ((_a = this._schedules) !== null && _a !== void 0 ? _a : (this._schedules = new Client_3.Schedules(this._options)));
|
|
1061
|
+
}
|
|
841
1062
|
_getAuthorizationHeader() {
|
|
842
1063
|
return __awaiter(this, void 0, void 0, function* () {
|
|
843
1064
|
return `Bearer ${yield core.Supplier.get(this._options.token)}`;
|