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) {
|
|
@@ -52,7 +42,6 @@ exports.ModelSync = void 0;
|
|
|
52
42
|
const environments = __importStar(require("../../../../environments"));
|
|
53
43
|
const core = __importStar(require("../../../../core"));
|
|
54
44
|
const Polytomic = __importStar(require("../../../index"));
|
|
55
|
-
const json_1 = require("../../../../core/json");
|
|
56
45
|
const url_join_1 = __importDefault(require("url-join"));
|
|
57
46
|
const errors = __importStar(require("../../../../errors/index"));
|
|
58
47
|
const Client_1 = require("../resources/targets/client/Client");
|
|
@@ -61,16 +50,15 @@ class ModelSync {
|
|
|
61
50
|
constructor(_options) {
|
|
62
51
|
this._options = _options;
|
|
63
52
|
}
|
|
64
|
-
get targets() {
|
|
65
|
-
var _a;
|
|
66
|
-
return ((_a = this._targets) !== null && _a !== void 0 ? _a : (this._targets = new Client_1.Targets(this._options)));
|
|
67
|
-
}
|
|
68
|
-
get executions() {
|
|
69
|
-
var _a;
|
|
70
|
-
return ((_a = this._executions) !== null && _a !== void 0 ? _a : (this._executions = new Client_2.Executions(this._options)));
|
|
71
|
-
}
|
|
72
53
|
/**
|
|
73
|
-
*
|
|
54
|
+
* Describes the source configuration available on a connection for use as a model sync source.
|
|
55
|
+
*
|
|
56
|
+
* Use this endpoint before creating a model to understand what configuration is
|
|
57
|
+
* available. Once you have a configuration, resolve the fields available for
|
|
58
|
+
* sync mapping with
|
|
59
|
+
* [`GET /api/connections/{id}/modelsync/source/fields`](../../../../../api-reference/model-sync/get-source-fields).
|
|
60
|
+
*
|
|
61
|
+
* @param {string} id - Unique identifier of the connection.
|
|
74
62
|
* @param {Polytomic.ModelSyncGetSourceRequest} request
|
|
75
63
|
* @param {ModelSync.RequestOptions} requestOptions - Request-specific configuration.
|
|
76
64
|
*
|
|
@@ -83,23 +71,30 @@ class ModelSync {
|
|
|
83
71
|
* @example
|
|
84
72
|
* await client.modelSync.getSource("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
85
73
|
*/
|
|
86
|
-
getSource(
|
|
87
|
-
|
|
88
|
-
|
|
74
|
+
getSource(id, request = {}, requestOptions) {
|
|
75
|
+
var _a;
|
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
89
77
|
const { params } = request;
|
|
90
78
|
const _queryParams = {};
|
|
91
79
|
if (params != null) {
|
|
92
|
-
_queryParams["params"] =
|
|
80
|
+
_queryParams["params"] = JSON.stringify(params);
|
|
93
81
|
}
|
|
94
82
|
const _response = yield core.fetcher({
|
|
95
|
-
url: (0, url_join_1.default)((
|
|
83
|
+
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)}/modelsync/source`),
|
|
96
84
|
method: "GET",
|
|
97
|
-
headers:
|
|
85
|
+
headers: {
|
|
86
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
87
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
98
88
|
? yield core.Supplier.get(this._options.version)
|
|
99
|
-
: undefined,
|
|
89
|
+
: undefined,
|
|
90
|
+
"X-Fern-Language": "JavaScript",
|
|
91
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
92
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
93
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
94
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
95
|
+
},
|
|
100
96
|
contentType: "application/json",
|
|
101
97
|
queryParameters: _queryParams,
|
|
102
|
-
requestType: "json",
|
|
103
98
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
104
99
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
105
100
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -133,7 +128,7 @@ class ModelSync {
|
|
|
133
128
|
body: _response.error.rawBody,
|
|
134
129
|
});
|
|
135
130
|
case "timeout":
|
|
136
|
-
throw new errors.PolytomicTimeoutError(
|
|
131
|
+
throw new errors.PolytomicTimeoutError();
|
|
137
132
|
case "unknown":
|
|
138
133
|
throw new errors.PolytomicError({
|
|
139
134
|
message: _response.error.errorMessage,
|
|
@@ -142,7 +137,20 @@ class ModelSync {
|
|
|
142
137
|
});
|
|
143
138
|
}
|
|
144
139
|
/**
|
|
145
|
-
*
|
|
140
|
+
* Returns the source fields available on a connection for a given source configuration.
|
|
141
|
+
*
|
|
142
|
+
* Pass the model's source configuration as query parameters to resolve the
|
|
143
|
+
* fields that the connection will expose for that specific configuration. The
|
|
144
|
+
* returned fields are what can be referenced in sync field mappings.
|
|
145
|
+
*
|
|
146
|
+
* > 📘 Results depend on the source configuration you supply. A different
|
|
147
|
+
* > table or query in the configuration may return a completely different field
|
|
148
|
+
* > list.
|
|
149
|
+
*
|
|
150
|
+
* The available source configuration parameters are described by
|
|
151
|
+
* [`GET /api/connections/{id}/modelsync/source`](../../../../../../api-reference/model-sync/get-source).
|
|
152
|
+
*
|
|
153
|
+
* @param {string} id - Unique identifier of the connection.
|
|
146
154
|
* @param {Polytomic.ModelSyncGetSourceFieldsRequest} request
|
|
147
155
|
* @param {ModelSync.RequestOptions} requestOptions - Request-specific configuration.
|
|
148
156
|
*
|
|
@@ -155,23 +163,30 @@ class ModelSync {
|
|
|
155
163
|
* @example
|
|
156
164
|
* await client.modelSync.getSourceFields("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
157
165
|
*/
|
|
158
|
-
getSourceFields(
|
|
159
|
-
|
|
160
|
-
|
|
166
|
+
getSourceFields(id, request = {}, requestOptions) {
|
|
167
|
+
var _a;
|
|
168
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
161
169
|
const { params } = request;
|
|
162
170
|
const _queryParams = {};
|
|
163
171
|
if (params != null) {
|
|
164
|
-
_queryParams["params"] =
|
|
172
|
+
_queryParams["params"] = JSON.stringify(params);
|
|
165
173
|
}
|
|
166
174
|
const _response = yield core.fetcher({
|
|
167
|
-
url: (0, url_join_1.default)((
|
|
175
|
+
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)}/modelsync/source/fields`),
|
|
168
176
|
method: "GET",
|
|
169
|
-
headers:
|
|
177
|
+
headers: {
|
|
178
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
179
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
170
180
|
? yield core.Supplier.get(this._options.version)
|
|
171
|
-
: undefined,
|
|
181
|
+
: undefined,
|
|
182
|
+
"X-Fern-Language": "JavaScript",
|
|
183
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
184
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
185
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
186
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
187
|
+
},
|
|
172
188
|
contentType: "application/json",
|
|
173
189
|
queryParameters: _queryParams,
|
|
174
|
-
requestType: "json",
|
|
175
190
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
176
191
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
177
192
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -205,7 +220,7 @@ class ModelSync {
|
|
|
205
220
|
body: _response.error.rawBody,
|
|
206
221
|
});
|
|
207
222
|
case "timeout":
|
|
208
|
-
throw new errors.PolytomicTimeoutError(
|
|
223
|
+
throw new errors.PolytomicTimeoutError();
|
|
209
224
|
case "unknown":
|
|
210
225
|
throw new errors.PolytomicError({
|
|
211
226
|
message: _response.error.errorMessage,
|
|
@@ -214,6 +229,21 @@ class ModelSync {
|
|
|
214
229
|
});
|
|
215
230
|
}
|
|
216
231
|
/**
|
|
232
|
+
* Lists all model syncs in the caller's organization.
|
|
233
|
+
*
|
|
234
|
+
* Results are ordered by `updated_at` descending, with `id` used as a tiebreaker.
|
|
235
|
+
* If more results are available, the response includes `pagination.next_page_token`.
|
|
236
|
+
* Pass that token back unchanged to continue from the last item you received.
|
|
237
|
+
*
|
|
238
|
+
* The token is opaque. Do not construct or edit it yourself.
|
|
239
|
+
*
|
|
240
|
+
* The `limit` is capped at 50. Values above that cap are reduced to 50, and
|
|
241
|
+
* non-positive values fall back to the same default.
|
|
242
|
+
*
|
|
243
|
+
* This endpoint returns syncs visible to the current caller's organization scope.
|
|
244
|
+
* To inspect a specific sync in more detail, follow up with
|
|
245
|
+
* [`GET /api/syncs/{id}`](../../api-reference/model-sync/get).
|
|
246
|
+
*
|
|
217
247
|
* @param {Polytomic.ModelSyncListRequest} request
|
|
218
248
|
* @param {ModelSync.RequestOptions} requestOptions - Request-specific configuration.
|
|
219
249
|
*
|
|
@@ -228,9 +258,9 @@ class ModelSync {
|
|
|
228
258
|
* target_connection_id: "0b155265-c537-44c9-9359-a3ceb468a4da"
|
|
229
259
|
* })
|
|
230
260
|
*/
|
|
231
|
-
list() {
|
|
232
|
-
|
|
233
|
-
|
|
261
|
+
list(request = {}, requestOptions) {
|
|
262
|
+
var _a;
|
|
263
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
234
264
|
const { active, mode, target_connection_id: targetConnectionId } = request;
|
|
235
265
|
const _queryParams = {};
|
|
236
266
|
if (active != null) {
|
|
@@ -243,14 +273,21 @@ class ModelSync {
|
|
|
243
273
|
_queryParams["target_connection_id"] = targetConnectionId;
|
|
244
274
|
}
|
|
245
275
|
const _response = yield core.fetcher({
|
|
246
|
-
url: (0, url_join_1.default)((
|
|
276
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/syncs"),
|
|
247
277
|
method: "GET",
|
|
248
|
-
headers:
|
|
278
|
+
headers: {
|
|
279
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
280
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
249
281
|
? yield core.Supplier.get(this._options.version)
|
|
250
|
-
: undefined,
|
|
282
|
+
: undefined,
|
|
283
|
+
"X-Fern-Language": "JavaScript",
|
|
284
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
285
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
286
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
287
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
288
|
+
},
|
|
251
289
|
contentType: "application/json",
|
|
252
290
|
queryParameters: _queryParams,
|
|
253
|
-
requestType: "json",
|
|
254
291
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
255
292
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
256
293
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -282,7 +319,7 @@ class ModelSync {
|
|
|
282
319
|
body: _response.error.rawBody,
|
|
283
320
|
});
|
|
284
321
|
case "timeout":
|
|
285
|
-
throw new errors.PolytomicTimeoutError(
|
|
322
|
+
throw new errors.PolytomicTimeoutError();
|
|
286
323
|
case "unknown":
|
|
287
324
|
throw new errors.PolytomicError({
|
|
288
325
|
message: _response.error.errorMessage,
|
|
@@ -291,6 +328,8 @@ class ModelSync {
|
|
|
291
328
|
});
|
|
292
329
|
}
|
|
293
330
|
/**
|
|
331
|
+
* Creates a new model sync.
|
|
332
|
+
*
|
|
294
333
|
* Create a new sync from one or more models to a destination.
|
|
295
334
|
*
|
|
296
335
|
* All of the functionality described in [the product
|
|
@@ -299,15 +338,15 @@ class ModelSync {
|
|
|
299
338
|
*
|
|
300
339
|
* Guides:
|
|
301
340
|
*
|
|
302
|
-
* - [Model sync (Reverse ETL) from Snowflake query to Salesforce](
|
|
303
|
-
* - [Joined model sync from Postgres, Airtable, and Stripe to Hubspot](
|
|
341
|
+
* - [Model sync (Reverse ETL) from Snowflake query to Salesforce](../../guides/code-examples/model-sync-reverse-etl-from-snowflake-query-to-salesforce)
|
|
342
|
+
* - [Joined model sync from Postgres, Airtable, and Stripe to Hubspot](../../guides/code-examples/joined-model-sync-from-postgres-airtable-and-stripe-to-hubspot)
|
|
304
343
|
*
|
|
305
344
|
* ## Targets (Destinations)
|
|
306
345
|
*
|
|
307
346
|
* Polytomic refers to a model sync's destination as the "target object", or
|
|
308
347
|
* target. Target objects are identified by a connection ID and an object ID. You
|
|
309
348
|
* can retrieve a list of all target objects for a connection using the [Get Target
|
|
310
|
-
* Objects](
|
|
349
|
+
* Objects](../../api-reference/model-sync/targets/list) endpoint.
|
|
311
350
|
*
|
|
312
351
|
* The `target` object in the request specifies information about the sync destination.
|
|
313
352
|
*
|
|
@@ -320,10 +359,10 @@ class ModelSync {
|
|
|
320
359
|
*
|
|
321
360
|
* Some connections support additional configuration for targets. For example,
|
|
322
361
|
* [Salesforce
|
|
323
|
-
* connections](
|
|
362
|
+
* connections](../../guides/configuring-your-connections/connections/salesforce#target)
|
|
324
363
|
* support optionally specifying the ingestion API to use. The target specific
|
|
325
364
|
* options are passed as `configuration`; consult the [integration
|
|
326
|
-
* guides](
|
|
365
|
+
* guides](../../guides/configuring-your-connections/overview)
|
|
327
366
|
* for details about specific connection configurations.
|
|
328
367
|
*
|
|
329
368
|
* ### Creating a new target
|
|
@@ -345,7 +384,7 @@ class ModelSync {
|
|
|
345
384
|
* },
|
|
346
385
|
* ```
|
|
347
386
|
*
|
|
348
|
-
* The [Get Target List](
|
|
387
|
+
* The [Get Target List](../../api-reference/model-sync/targets/list) endpoint returns information about whether
|
|
349
388
|
* a connection supports target creation.
|
|
350
389
|
*
|
|
351
390
|
* @param {Polytomic.CreateModelSyncRequest} request
|
|
@@ -362,7 +401,7 @@ class ModelSync {
|
|
|
362
401
|
* fields: [{
|
|
363
402
|
* target: "name"
|
|
364
403
|
* }],
|
|
365
|
-
* mode:
|
|
404
|
+
* mode: Polytomic.ModelSyncMode.Create,
|
|
366
405
|
* name: "Users Sync",
|
|
367
406
|
* schedule: {},
|
|
368
407
|
* target: {
|
|
@@ -371,16 +410,23 @@ class ModelSync {
|
|
|
371
410
|
* })
|
|
372
411
|
*/
|
|
373
412
|
create(request, requestOptions) {
|
|
413
|
+
var _a;
|
|
374
414
|
return __awaiter(this, void 0, void 0, function* () {
|
|
375
|
-
var _a, _b;
|
|
376
415
|
const _response = yield core.fetcher({
|
|
377
|
-
url: (0, url_join_1.default)((
|
|
416
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/syncs"),
|
|
378
417
|
method: "POST",
|
|
379
|
-
headers:
|
|
418
|
+
headers: {
|
|
419
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
420
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
380
421
|
? yield core.Supplier.get(this._options.version)
|
|
381
|
-
: undefined,
|
|
422
|
+
: undefined,
|
|
423
|
+
"X-Fern-Language": "JavaScript",
|
|
424
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
425
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
426
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
427
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
428
|
+
},
|
|
382
429
|
contentType: "application/json",
|
|
383
|
-
requestType: "json",
|
|
384
430
|
body: request,
|
|
385
431
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
386
432
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -415,7 +461,7 @@ class ModelSync {
|
|
|
415
461
|
body: _response.error.rawBody,
|
|
416
462
|
});
|
|
417
463
|
case "timeout":
|
|
418
|
-
throw new errors.PolytomicTimeoutError(
|
|
464
|
+
throw new errors.PolytomicTimeoutError();
|
|
419
465
|
case "unknown":
|
|
420
466
|
throw new errors.PolytomicError({
|
|
421
467
|
message: _response.error.errorMessage,
|
|
@@ -424,6 +470,12 @@ class ModelSync {
|
|
|
424
470
|
});
|
|
425
471
|
}
|
|
426
472
|
/**
|
|
473
|
+
* Returns the schedule types available when creating or updating a model sync.
|
|
474
|
+
*
|
|
475
|
+
* Use the `type` identifiers returned by this endpoint in the `schedule` field
|
|
476
|
+
* when creating or updating a sync via
|
|
477
|
+
* [`POST /api/syncs`](../../../api-reference/model-sync/create) or [`PUT /api/syncs/{id}`](../../../api-reference/model-sync/update).
|
|
478
|
+
*
|
|
427
479
|
* @param {ModelSync.RequestOptions} requestOptions - Request-specific configuration.
|
|
428
480
|
*
|
|
429
481
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
@@ -433,16 +485,23 @@ class ModelSync {
|
|
|
433
485
|
* await client.modelSync.getScheduleOptions()
|
|
434
486
|
*/
|
|
435
487
|
getScheduleOptions(requestOptions) {
|
|
488
|
+
var _a;
|
|
436
489
|
return __awaiter(this, void 0, void 0, function* () {
|
|
437
|
-
var _a, _b;
|
|
438
490
|
const _response = yield core.fetcher({
|
|
439
|
-
url: (0, url_join_1.default)((
|
|
491
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/syncs/schedules"),
|
|
440
492
|
method: "GET",
|
|
441
|
-
headers:
|
|
493
|
+
headers: {
|
|
494
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
495
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
442
496
|
? yield core.Supplier.get(this._options.version)
|
|
443
|
-
: undefined,
|
|
497
|
+
: undefined,
|
|
498
|
+
"X-Fern-Language": "JavaScript",
|
|
499
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
500
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
501
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
502
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
503
|
+
},
|
|
444
504
|
contentType: "application/json",
|
|
445
|
-
requestType: "json",
|
|
446
505
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
447
506
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
448
507
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -470,7 +529,7 @@ class ModelSync {
|
|
|
470
529
|
body: _response.error.rawBody,
|
|
471
530
|
});
|
|
472
531
|
case "timeout":
|
|
473
|
-
throw new errors.PolytomicTimeoutError(
|
|
532
|
+
throw new errors.PolytomicTimeoutError();
|
|
474
533
|
case "unknown":
|
|
475
534
|
throw new errors.PolytomicError({
|
|
476
535
|
message: _response.error.errorMessage,
|
|
@@ -479,6 +538,12 @@ class ModelSync {
|
|
|
479
538
|
});
|
|
480
539
|
}
|
|
481
540
|
/**
|
|
541
|
+
* Returns a single model sync by ID.
|
|
542
|
+
*
|
|
543
|
+
* To check whether a sync is currently running or has recently completed, use
|
|
544
|
+
* [`GET /api/syncs/{id}/status`](../../../api-reference/model-sync/get-status). For the full history of
|
|
545
|
+
* executions, use [`GET /api/syncs/{id}/executions`](../../../api-reference/model-sync/executions/list).
|
|
546
|
+
*
|
|
482
547
|
* @param {string} id
|
|
483
548
|
* @param {ModelSync.RequestOptions} requestOptions - Request-specific configuration.
|
|
484
549
|
*
|
|
@@ -490,16 +555,23 @@ class ModelSync {
|
|
|
490
555
|
* await client.modelSync.get("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
491
556
|
*/
|
|
492
557
|
get(id, requestOptions) {
|
|
558
|
+
var _a;
|
|
493
559
|
return __awaiter(this, void 0, void 0, function* () {
|
|
494
|
-
var _a, _b;
|
|
495
560
|
const _response = yield core.fetcher({
|
|
496
|
-
url: (0, url_join_1.default)((
|
|
561
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/syncs/${encodeURIComponent(id)}`),
|
|
497
562
|
method: "GET",
|
|
498
|
-
headers:
|
|
563
|
+
headers: {
|
|
564
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
565
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
499
566
|
? yield core.Supplier.get(this._options.version)
|
|
500
|
-
: undefined,
|
|
567
|
+
: undefined,
|
|
568
|
+
"X-Fern-Language": "JavaScript",
|
|
569
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
570
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
571
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
572
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
573
|
+
},
|
|
501
574
|
contentType: "application/json",
|
|
502
|
-
requestType: "json",
|
|
503
575
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
504
576
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
505
577
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -529,7 +601,7 @@ class ModelSync {
|
|
|
529
601
|
body: _response.error.rawBody,
|
|
530
602
|
});
|
|
531
603
|
case "timeout":
|
|
532
|
-
throw new errors.PolytomicTimeoutError(
|
|
604
|
+
throw new errors.PolytomicTimeoutError();
|
|
533
605
|
case "unknown":
|
|
534
606
|
throw new errors.PolytomicError({
|
|
535
607
|
message: _response.error.errorMessage,
|
|
@@ -538,6 +610,22 @@ class ModelSync {
|
|
|
538
610
|
});
|
|
539
611
|
}
|
|
540
612
|
/**
|
|
613
|
+
* Updates a model sync's configuration.
|
|
614
|
+
*
|
|
615
|
+
* Updating a model sync is a **full replacement** of the sync's configuration.
|
|
616
|
+
* Every field in the request body is written to the sync; any field you omit is
|
|
617
|
+
* cleared or reset to its default value.
|
|
618
|
+
*
|
|
619
|
+
* To make a partial change — for example, toggling `active` or adjusting a
|
|
620
|
+
* single field mapping — fetch the current sync with
|
|
621
|
+
* [`GET /api/syncs/{id}`](../../../api-reference/model-sync/get),
|
|
622
|
+
* modify the fields you want to change, and send the complete object back in
|
|
623
|
+
* the update request.
|
|
624
|
+
*
|
|
625
|
+
* Updates to `active`, `schedule`, and `policies` take effect immediately.
|
|
626
|
+
* Changes to source fields, target configuration, filters, or field mappings
|
|
627
|
+
* take effect on the sync's next execution.
|
|
628
|
+
*
|
|
541
629
|
* @param {string} id
|
|
542
630
|
* @param {Polytomic.UpdateModelSyncRequest} request
|
|
543
631
|
* @param {ModelSync.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -554,7 +642,7 @@ class ModelSync {
|
|
|
554
642
|
* fields: [{
|
|
555
643
|
* target: "name"
|
|
556
644
|
* }],
|
|
557
|
-
* mode:
|
|
645
|
+
* mode: Polytomic.ModelSyncMode.Create,
|
|
558
646
|
* name: "Users Sync",
|
|
559
647
|
* schedule: {},
|
|
560
648
|
* target: {
|
|
@@ -563,16 +651,23 @@ class ModelSync {
|
|
|
563
651
|
* })
|
|
564
652
|
*/
|
|
565
653
|
update(id, request, requestOptions) {
|
|
654
|
+
var _a;
|
|
566
655
|
return __awaiter(this, void 0, void 0, function* () {
|
|
567
|
-
var _a, _b;
|
|
568
656
|
const _response = yield core.fetcher({
|
|
569
|
-
url: (0, url_join_1.default)((
|
|
657
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/syncs/${encodeURIComponent(id)}`),
|
|
570
658
|
method: "PUT",
|
|
571
|
-
headers:
|
|
659
|
+
headers: {
|
|
660
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
661
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
572
662
|
? yield core.Supplier.get(this._options.version)
|
|
573
|
-
: undefined,
|
|
663
|
+
: undefined,
|
|
664
|
+
"X-Fern-Language": "JavaScript",
|
|
665
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
666
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
667
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
668
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
669
|
+
},
|
|
574
670
|
contentType: "application/json",
|
|
575
|
-
requestType: "json",
|
|
576
671
|
body: request,
|
|
577
672
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
578
673
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -609,7 +704,7 @@ class ModelSync {
|
|
|
609
704
|
body: _response.error.rawBody,
|
|
610
705
|
});
|
|
611
706
|
case "timeout":
|
|
612
|
-
throw new errors.PolytomicTimeoutError(
|
|
707
|
+
throw new errors.PolytomicTimeoutError();
|
|
613
708
|
case "unknown":
|
|
614
709
|
throw new errors.PolytomicError({
|
|
615
710
|
message: _response.error.errorMessage,
|
|
@@ -618,6 +713,12 @@ class ModelSync {
|
|
|
618
713
|
});
|
|
619
714
|
}
|
|
620
715
|
/**
|
|
716
|
+
* Deletes a model sync, cancelling any running executions.
|
|
717
|
+
*
|
|
718
|
+
* Deletion is permanent. Any running execution is cancelled before the sync
|
|
719
|
+
* record is removed. Deleted syncs cannot be recovered; recreate them using
|
|
720
|
+
* [`POST /api/syncs`](../../../api-reference/model-sync/create) if needed.
|
|
721
|
+
*
|
|
621
722
|
* @param {string} id
|
|
622
723
|
* @param {ModelSync.RequestOptions} requestOptions - Request-specific configuration.
|
|
623
724
|
*
|
|
@@ -631,16 +732,23 @@ class ModelSync {
|
|
|
631
732
|
* await client.modelSync.remove("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
632
733
|
*/
|
|
633
734
|
remove(id, requestOptions) {
|
|
735
|
+
var _a;
|
|
634
736
|
return __awaiter(this, void 0, void 0, function* () {
|
|
635
|
-
var _a, _b;
|
|
636
737
|
const _response = yield core.fetcher({
|
|
637
|
-
url: (0, url_join_1.default)((
|
|
738
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/syncs/${encodeURIComponent(id)}`),
|
|
638
739
|
method: "DELETE",
|
|
639
|
-
headers:
|
|
740
|
+
headers: {
|
|
741
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
742
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
640
743
|
? yield core.Supplier.get(this._options.version)
|
|
641
|
-
: undefined,
|
|
744
|
+
: undefined,
|
|
745
|
+
"X-Fern-Language": "JavaScript",
|
|
746
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
747
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
748
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
749
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
750
|
+
},
|
|
642
751
|
contentType: "application/json",
|
|
643
|
-
requestType: "json",
|
|
644
752
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
645
753
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
646
754
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -674,7 +782,7 @@ class ModelSync {
|
|
|
674
782
|
body: _response.error.rawBody,
|
|
675
783
|
});
|
|
676
784
|
case "timeout":
|
|
677
|
-
throw new errors.PolytomicTimeoutError(
|
|
785
|
+
throw new errors.PolytomicTimeoutError();
|
|
678
786
|
case "unknown":
|
|
679
787
|
throw new errors.PolytomicError({
|
|
680
788
|
message: _response.error.errorMessage,
|
|
@@ -683,6 +791,15 @@ class ModelSync {
|
|
|
683
791
|
});
|
|
684
792
|
}
|
|
685
793
|
/**
|
|
794
|
+
* Sets whether a model sync is active.
|
|
795
|
+
*
|
|
796
|
+
* Only active syncs execute on schedule or in response to a manual trigger. Set
|
|
797
|
+
* `active` to `false` to pause a sync without deleting it.
|
|
798
|
+
*
|
|
799
|
+
* > 📘 Deactivating a sync does not cancel an execution that is already in
|
|
800
|
+
* > progress. Use [`POST /api/syncs/{id}/cancel`](../../../../api-reference/model-sync/cancel) to stop a
|
|
801
|
+
* > running execution.
|
|
802
|
+
*
|
|
686
803
|
* @param {string} id
|
|
687
804
|
* @param {Polytomic.ActivateSyncInput} request
|
|
688
805
|
* @param {ModelSync.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -698,16 +815,23 @@ class ModelSync {
|
|
|
698
815
|
* })
|
|
699
816
|
*/
|
|
700
817
|
activate(id, request, requestOptions) {
|
|
818
|
+
var _a;
|
|
701
819
|
return __awaiter(this, void 0, void 0, function* () {
|
|
702
|
-
var _a, _b;
|
|
703
820
|
const _response = yield core.fetcher({
|
|
704
|
-
url: (0, url_join_1.default)((
|
|
821
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/syncs/${encodeURIComponent(id)}/activate`),
|
|
705
822
|
method: "POST",
|
|
706
|
-
headers:
|
|
823
|
+
headers: {
|
|
824
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
825
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
707
826
|
? yield core.Supplier.get(this._options.version)
|
|
708
|
-
: undefined,
|
|
827
|
+
: undefined,
|
|
828
|
+
"X-Fern-Language": "JavaScript",
|
|
829
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
830
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
831
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
832
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
833
|
+
},
|
|
709
834
|
contentType: "application/json",
|
|
710
|
-
requestType: "json",
|
|
711
835
|
body: request,
|
|
712
836
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
713
837
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -740,7 +864,7 @@ class ModelSync {
|
|
|
740
864
|
body: _response.error.rawBody,
|
|
741
865
|
});
|
|
742
866
|
case "timeout":
|
|
743
|
-
throw new errors.PolytomicTimeoutError(
|
|
867
|
+
throw new errors.PolytomicTimeoutError();
|
|
744
868
|
case "unknown":
|
|
745
869
|
throw new errors.PolytomicError({
|
|
746
870
|
message: _response.error.errorMessage,
|
|
@@ -749,6 +873,14 @@ class ModelSync {
|
|
|
749
873
|
});
|
|
750
874
|
}
|
|
751
875
|
/**
|
|
876
|
+
* Requests cancellation of any running executions on a model sync.
|
|
877
|
+
*
|
|
878
|
+
* Cancellation is asynchronous. A successful response means the cancellation
|
|
879
|
+
* signal has been queued; the running execution continues until the signal is
|
|
880
|
+
* processed. Poll `GET /api/syncs/{id}/status` until the current execution
|
|
881
|
+
* reaches a terminal state (`completed`, `canceled`, or `failed`) to confirm
|
|
882
|
+
* cancellation has taken effect.
|
|
883
|
+
*
|
|
752
884
|
* @param {string} id - The active execution of this sync ID will be cancelled.
|
|
753
885
|
* @param {ModelSync.RequestOptions} requestOptions - Request-specific configuration.
|
|
754
886
|
*
|
|
@@ -761,16 +893,23 @@ class ModelSync {
|
|
|
761
893
|
* await client.modelSync.cancel("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
762
894
|
*/
|
|
763
895
|
cancel(id, requestOptions) {
|
|
896
|
+
var _a;
|
|
764
897
|
return __awaiter(this, void 0, void 0, function* () {
|
|
765
|
-
var _a, _b;
|
|
766
898
|
const _response = yield core.fetcher({
|
|
767
|
-
url: (0, url_join_1.default)((
|
|
899
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/syncs/${encodeURIComponent(id)}/cancel`),
|
|
768
900
|
method: "POST",
|
|
769
|
-
headers:
|
|
901
|
+
headers: {
|
|
902
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
903
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
770
904
|
? yield core.Supplier.get(this._options.version)
|
|
771
|
-
: undefined,
|
|
905
|
+
: undefined,
|
|
906
|
+
"X-Fern-Language": "JavaScript",
|
|
907
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
908
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
909
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
910
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
911
|
+
},
|
|
772
912
|
contentType: "application/json",
|
|
773
|
-
requestType: "json",
|
|
774
913
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
775
914
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
776
915
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -802,7 +941,7 @@ class ModelSync {
|
|
|
802
941
|
body: _response.error.rawBody,
|
|
803
942
|
});
|
|
804
943
|
case "timeout":
|
|
805
|
-
throw new errors.PolytomicTimeoutError(
|
|
944
|
+
throw new errors.PolytomicTimeoutError();
|
|
806
945
|
case "unknown":
|
|
807
946
|
throw new errors.PolytomicError({
|
|
808
947
|
message: _response.error.errorMessage,
|
|
@@ -811,6 +950,8 @@ class ModelSync {
|
|
|
811
950
|
});
|
|
812
951
|
}
|
|
813
952
|
/**
|
|
953
|
+
* Starts a new execution of a model sync.
|
|
954
|
+
*
|
|
814
955
|
* > 🚧 Force full resync
|
|
815
956
|
* >
|
|
816
957
|
* > Use caution when setting the `resync` parameter to `true`. This will force a full resync of the data from the source system. This can be a time-consuming operation and may impact the performance of the source system. It is recommended to only use this option when necessary.
|
|
@@ -829,17 +970,24 @@ class ModelSync {
|
|
|
829
970
|
* @example
|
|
830
971
|
* await client.modelSync.start("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
831
972
|
*/
|
|
832
|
-
start(
|
|
833
|
-
|
|
834
|
-
|
|
973
|
+
start(id, request = {}, requestOptions) {
|
|
974
|
+
var _a;
|
|
975
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
835
976
|
const _response = yield core.fetcher({
|
|
836
|
-
url: (0, url_join_1.default)((
|
|
977
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/syncs/${encodeURIComponent(id)}/executions`),
|
|
837
978
|
method: "POST",
|
|
838
|
-
headers:
|
|
979
|
+
headers: {
|
|
980
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
981
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
839
982
|
? yield core.Supplier.get(this._options.version)
|
|
840
|
-
: undefined,
|
|
983
|
+
: undefined,
|
|
984
|
+
"X-Fern-Language": "JavaScript",
|
|
985
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
986
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
987
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
988
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
989
|
+
},
|
|
841
990
|
contentType: "application/json",
|
|
842
|
-
requestType: "json",
|
|
843
991
|
body: request,
|
|
844
992
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
845
993
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -876,7 +1024,7 @@ class ModelSync {
|
|
|
876
1024
|
body: _response.error.rawBody,
|
|
877
1025
|
});
|
|
878
1026
|
case "timeout":
|
|
879
|
-
throw new errors.PolytomicTimeoutError(
|
|
1027
|
+
throw new errors.PolytomicTimeoutError();
|
|
880
1028
|
case "unknown":
|
|
881
1029
|
throw new errors.PolytomicError({
|
|
882
1030
|
message: _response.error.errorMessage,
|
|
@@ -885,6 +1033,12 @@ class ModelSync {
|
|
|
885
1033
|
});
|
|
886
1034
|
}
|
|
887
1035
|
/**
|
|
1036
|
+
* Returns the current status of a model sync.
|
|
1037
|
+
*
|
|
1038
|
+
* The response includes a summary of the most recent execution, including its
|
|
1039
|
+
* start time, completion time, and record counts. For the complete execution
|
|
1040
|
+
* history, use [`GET /api/syncs/{id}/executions`](../../../../api-reference/model-sync/executions/list).
|
|
1041
|
+
*
|
|
888
1042
|
* @param {string} id
|
|
889
1043
|
* @param {ModelSync.RequestOptions} requestOptions - Request-specific configuration.
|
|
890
1044
|
*
|
|
@@ -896,16 +1050,23 @@ class ModelSync {
|
|
|
896
1050
|
* await client.modelSync.getStatus("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
897
1051
|
*/
|
|
898
1052
|
getStatus(id, requestOptions) {
|
|
1053
|
+
var _a;
|
|
899
1054
|
return __awaiter(this, void 0, void 0, function* () {
|
|
900
|
-
var _a, _b;
|
|
901
1055
|
const _response = yield core.fetcher({
|
|
902
|
-
url: (0, url_join_1.default)((
|
|
1056
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/syncs/${encodeURIComponent(id)}/status`),
|
|
903
1057
|
method: "GET",
|
|
904
|
-
headers:
|
|
1058
|
+
headers: {
|
|
1059
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
1060
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
905
1061
|
? yield core.Supplier.get(this._options.version)
|
|
906
|
-
: undefined,
|
|
1062
|
+
: undefined,
|
|
1063
|
+
"X-Fern-Language": "JavaScript",
|
|
1064
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
1065
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
1066
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
1067
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
1068
|
+
},
|
|
907
1069
|
contentType: "application/json",
|
|
908
|
-
requestType: "json",
|
|
909
1070
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
910
1071
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
911
1072
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -935,7 +1096,7 @@ class ModelSync {
|
|
|
935
1096
|
body: _response.error.rawBody,
|
|
936
1097
|
});
|
|
937
1098
|
case "timeout":
|
|
938
|
-
throw new errors.PolytomicTimeoutError(
|
|
1099
|
+
throw new errors.PolytomicTimeoutError();
|
|
939
1100
|
case "unknown":
|
|
940
1101
|
throw new errors.PolytomicError({
|
|
941
1102
|
message: _response.error.errorMessage,
|
|
@@ -943,6 +1104,14 @@ class ModelSync {
|
|
|
943
1104
|
}
|
|
944
1105
|
});
|
|
945
1106
|
}
|
|
1107
|
+
get targets() {
|
|
1108
|
+
var _a;
|
|
1109
|
+
return ((_a = this._targets) !== null && _a !== void 0 ? _a : (this._targets = new Client_1.Targets(this._options)));
|
|
1110
|
+
}
|
|
1111
|
+
get executions() {
|
|
1112
|
+
var _a;
|
|
1113
|
+
return ((_a = this._executions) !== null && _a !== void 0 ? _a : (this._executions = new Client_2.Executions(this._options)));
|
|
1114
|
+
}
|
|
946
1115
|
_getAuthorizationHeader() {
|
|
947
1116
|
return __awaiter(this, void 0, void 0, function* () {
|
|
948
1117
|
return `Bearer ${yield core.Supplier.get(this._options.token)}`;
|