polytomic 1.11.2 → 1.14.3
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 +20 -15
- package/Client.js +9 -9
- package/LICENSE +1 -1
- package/api/errors/BadRequestError.js +17 -7
- package/api/errors/ConflictError.js +17 -7
- package/api/errors/ForbiddenError.js +17 -7
- package/api/errors/InternalServerError.js +17 -7
- package/api/errors/NotFoundError.js +17 -7
- package/api/errors/UnauthorizedError.js +17 -7
- package/api/errors/UnprocessableEntityError.js +17 -7
- package/api/resources/bulkSync/client/Client.d.ts +47 -6
- package/api/resources/bulkSync/client/Client.js +135 -157
- package/api/resources/bulkSync/client/requests/CreateBulkSyncRequest.d.ts +11 -3
- package/api/resources/bulkSync/client/requests/UpdateBulkSyncRequest.d.ts +11 -3
- package/api/resources/bulkSync/resources/executions/client/Client.d.ts +13 -2
- package/api/resources/bulkSync/resources/executions/client/Client.js +75 -79
- package/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListRequest.d.ts +18 -0
- package/api/resources/bulkSync/resources/executions/client/requests/index.d.ts +1 -0
- package/api/resources/bulkSync/resources/index.d.ts +2 -0
- package/api/resources/bulkSync/resources/index.js +20 -8
- package/api/resources/bulkSync/resources/schedules/client/Client.d.ts +113 -0
- package/api/resources/bulkSync/resources/schedules/client/Client.js +398 -0
- package/api/resources/bulkSync/resources/schedules/client/index.d.ts +1 -0
- package/api/resources/bulkSync/resources/schedules/client/index.js +17 -0
- package/api/resources/bulkSync/resources/schedules/client/requests/CreateScheduleRequest.d.ts +15 -0
- package/api/resources/bulkSync/resources/schedules/client/requests/UpdateScheduleRequest.d.ts +15 -0
- package/api/resources/bulkSync/resources/schedules/client/requests/index.d.ts +2 -0
- package/api/resources/bulkSync/resources/schedules/client/requests/index.js +2 -0
- package/api/resources/bulkSync/resources/schedules/index.d.ts +1 -0
- package/api/resources/bulkSync/resources/schedules/index.js +17 -0
- package/api/resources/bulkSync/resources/schemas/client/Client.d.ts +5 -0
- package/api/resources/bulkSync/resources/schemas/client/Client.js +49 -66
- package/api/resources/bulkSync/resources/schemas/client/requests/UpdateBulkSchema.d.ts +3 -1
- 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 +41 -2
- package/api/resources/connections/client/Client.js +159 -128
- package/api/resources/connections/client/requests/ConnectCardRequest.d.ts +7 -0
- package/api/resources/connections/client/requests/CreateConnectionRequestSchema.d.ts +3 -1
- package/api/resources/connections/client/requests/TestConnectionRequest.d.ts +24 -0
- package/api/resources/connections/client/requests/UpdateConnectionRequestSchema.d.ts +3 -1
- package/api/resources/connections/client/requests/index.d.ts +1 -0
- package/api/resources/events/client/Client.d.ts +7 -2
- package/api/resources/events/client/Client.js +33 -37
- package/api/resources/events/client/requests/EventsListRequest.d.ts +2 -2
- package/api/resources/identity/client/Client.d.ts +7 -0
- package/api/resources/identity/client/Client.js +25 -20
- package/api/resources/index.d.ts +2 -1
- package/api/resources/index.js +20 -9
- package/api/resources/jobs/client/Client.d.ts +7 -2
- package/api/resources/jobs/client/Client.js +25 -22
- package/api/resources/modelSync/client/Client.d.ts +83 -52
- package/api/resources/modelSync/client/Client.js +228 -403
- package/api/resources/modelSync/client/requests/CreateModelSyncRequest.d.ts +14 -5
- package/api/resources/modelSync/client/requests/ModelSyncListRequest.d.ts +1 -1
- package/api/resources/modelSync/client/requests/StartModelSyncRequest.d.ts +1 -0
- package/api/resources/modelSync/client/requests/UpdateModelSyncRequest.d.ts +14 -5
- package/api/resources/modelSync/client/requests/index.d.ts +0 -2
- package/api/resources/modelSync/resources/executions/client/Client.d.ts +36 -8
- package/api/resources/modelSync/resources/executions/client/Client.js +137 -68
- package/api/resources/modelSync/resources/executions/client/index.d.ts +1 -1
- package/api/resources/modelSync/resources/executions/client/index.js +15 -0
- package/api/resources/modelSync/resources/executions/client/requests/ExecutionsListRequest.d.ts +16 -0
- package/api/resources/modelSync/resources/executions/client/requests/ExecutionsListRequest.js +5 -0
- package/api/resources/modelSync/resources/executions/client/requests/UpdateExecutionRequest.d.ts +13 -0
- package/api/resources/modelSync/resources/executions/client/requests/UpdateExecutionRequest.js +5 -0
- package/api/resources/modelSync/resources/executions/client/requests/index.d.ts +2 -0
- package/api/resources/modelSync/resources/executions/client/requests/index.js +2 -0
- package/api/resources/modelSync/resources/index.d.ts +3 -0
- package/api/resources/modelSync/resources/index.js +23 -7
- package/api/resources/modelSync/resources/targets/client/Client.d.ts +143 -0
- package/api/resources/modelSync/resources/targets/client/Client.js +395 -0
- package/api/resources/modelSync/resources/targets/client/index.d.ts +1 -0
- package/api/resources/modelSync/resources/targets/client/index.js +17 -0
- package/api/resources/modelSync/{client/requests/ModelSyncGetTargetFieldsRequest.d.ts → resources/targets/client/requests/TargetsGetTargetFieldsRequest.d.ts} +1 -1
- package/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetFieldsRequest.js +5 -0
- package/{dist/api/resources/modelSync/client/requests/ModelSyncGetTargetRequest.d.ts → api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetRequest.d.ts} +1 -1
- package/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetRequest.js +5 -0
- package/api/resources/modelSync/resources/targets/client/requests/index.d.ts +2 -0
- package/api/resources/modelSync/resources/targets/client/requests/index.js +2 -0
- package/api/resources/modelSync/resources/targets/index.d.ts +1 -0
- package/api/resources/modelSync/resources/targets/index.js +17 -0
- package/api/resources/models/client/Client.d.ts +5 -0
- package/api/resources/models/client/Client.js +83 -135
- package/api/resources/organization/client/Client.d.ts +7 -0
- package/api/resources/organization/client/Client.js +53 -72
- package/api/resources/permissions/client/Client.d.ts +7 -2
- package/api/resources/permissions/resources/index.js +17 -7
- package/api/resources/permissions/resources/policies/client/Client.d.ts +5 -0
- package/api/resources/permissions/resources/policies/client/Client.js +47 -72
- package/api/resources/permissions/resources/roles/client/Client.d.ts +5 -0
- package/api/resources/permissions/resources/roles/client/Client.js +47 -72
- package/api/resources/queryRunner/client/Client.d.ts +5 -0
- package/api/resources/queryRunner/client/Client.js +33 -37
- package/api/resources/schemas/client/Client.d.ts +68 -0
- package/api/resources/schemas/client/Client.js +302 -59
- package/api/resources/schemas/client/index.d.ts +1 -1
- package/api/resources/schemas/client/index.js +15 -0
- package/api/resources/schemas/client/requests/SetPrimaryKeysRequest.d.ts +11 -0
- package/api/resources/schemas/client/requests/SetPrimaryKeysRequest.js +5 -0
- package/api/resources/schemas/client/requests/UpsertSchemaFieldRequest.d.ts +11 -0
- package/api/resources/schemas/client/requests/UpsertSchemaFieldRequest.js +5 -0
- package/api/resources/schemas/client/requests/index.d.ts +2 -0
- package/api/resources/schemas/client/requests/index.js +2 -0
- package/api/resources/users/client/Client.d.ts +5 -0
- package/api/resources/users/client/Client.js +55 -87
- package/api/resources/webhooks/client/Client.d.ts +33 -4
- package/api/resources/webhooks/client/Client.js +169 -76
- package/api/types/BackendOAuthPrompt.d.ts +8 -0
- package/api/types/BackendOAuthPrompt.js +5 -0
- package/api/types/BulkBulkSyncSchedule.d.ts +20 -0
- package/api/types/BulkBulkSyncSchedule.js +5 -0
- package/api/types/BulkDiscover.d.ts +1 -1
- package/api/types/BulkExecutionStatus.d.ts +2 -1
- package/api/types/BulkExecutionStatus.js +1 -0
- package/api/types/BulkFetchMode.d.ts +1 -1
- package/api/types/BulkField.d.ts +2 -0
- package/api/types/BulkNormalizeNames.d.ts +9 -0
- package/api/types/BulkNormalizeNames.js +11 -0
- package/api/types/BulkSchema.d.ts +1 -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/BulkSyncExecution.d.ts +6 -0
- package/api/types/BulkSyncMode.d.ts +11 -0
- package/api/types/BulkSyncMode.js +10 -0
- package/api/types/BulkSyncResponse.d.ts +10 -1
- package/api/types/BulkSyncSchemaExecution.d.ts +3 -0
- package/api/types/CancelModelSyncResponse.d.ts +6 -0
- package/api/types/CancelModelSyncResponse.js +5 -0
- package/api/types/CancelModelSyncResponseEnvelope.d.ts +7 -0
- package/api/types/CancelModelSyncResponseEnvelope.js +5 -0
- package/api/types/ConnectCardResponse.d.ts +1 -0
- package/api/types/ConnectionResponseSchema.d.ts +5 -0
- package/api/types/ConnectionType.d.ts +5 -0
- package/api/types/ConnectionTypeSchema.d.ts +1 -0
- package/api/types/CreateConnectionResponseSchema.d.ts +3 -0
- package/api/types/EventBody.d.ts +1 -1
- package/api/types/ExecutionCounts.d.ts +2 -0
- package/api/types/ExecutionStatus.d.ts +1 -1
- package/api/types/FilterFieldReferenceType.d.ts +1 -1
- package/api/types/FilterFunction.d.ts +3 -1
- package/api/types/FilterFunction.js +2 -0
- package/api/types/GetIdentityResponseSchema.d.ts +7 -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/ListBulkSyncExecutionsEnvelope.d.ts +1 -0
- package/api/types/ListExecutionResponseEnvelope.d.ts +1 -0
- package/api/types/ModelField.d.ts +4 -0
- package/api/types/ModelSyncField.d.ts +2 -0
- package/api/types/{SyncMode.d.ts → ModelSyncMode.d.ts} +2 -4
- package/{dist/api/types/SyncMode.js → api/types/ModelSyncMode.js} +2 -4
- package/api/types/ModelSyncResponse.d.ts +6 -1
- package/api/types/PaginationDetails.d.ts +6 -0
- package/api/types/PaginationDetails.js +5 -0
- package/api/types/ScheduleEnvelope.d.ts +7 -0
- package/api/types/ScheduleEnvelope.js +5 -0
- package/api/types/ScheduleFrequency.d.ts +1 -1
- package/api/types/SchedulesEnvelope.d.ts +7 -0
- package/api/types/SchedulesEnvelope.js +5 -0
- package/api/types/SchemaField.d.ts +2 -0
- package/api/types/SchemaIdentityFunction.d.ts +3 -1
- package/api/types/SchemaIdentityFunction.js +2 -0
- package/api/types/SchemaPrimaryKeyOverrideInput.d.ts +7 -0
- package/api/types/SchemaPrimaryKeyOverrideInput.js +5 -0
- package/api/types/StartModelSyncResponseSchema.d.ts +1 -0
- package/api/types/SupportedBulkMode.d.ts +1 -1
- package/api/types/SupportedMode.d.ts +1 -1
- package/api/types/SyncDestinationProperties.d.ts +1 -0
- package/api/types/Target.d.ts +4 -1
- package/api/types/TargetCreateInput.d.ts +11 -0
- package/api/types/TargetCreateInput.js +5 -0
- package/api/types/TargetField.d.ts +1 -0
- package/api/types/TypesType.d.ts +1 -1
- package/api/types/UpdateBulkField.d.ts +9 -0
- package/api/types/UpdateBulkField.js +5 -0
- package/api/types/UtilEnumValue.d.ts +7 -0
- package/api/types/UtilEnumValue.js +5 -0
- package/api/types/UtilFieldType.d.ts +1 -1
- package/api/types/V2ConnectionForm.d.ts +7 -0
- package/api/types/V2ConnectionForm.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/V4BulkSyncExecutionLogs.d.ts +1 -1
- package/api/types/V4BulkSyncScheduleApi.d.ts +13 -0
- package/api/types/V4BulkSyncScheduleApi.js +5 -0
- package/api/types/V4TargetCreator.d.ts +10 -0
- package/api/types/V4TargetCreator.js +5 -0
- package/api/types/V4TargetObjectsResponseEnvelope.d.ts +1 -0
- package/api/types/V4TargetPropertyValues.d.ts +14 -0
- package/api/types/V4TargetPropertyValues.js +5 -0
- package/api/types/V4TargetPropertyValuesEnvelope.d.ts +7 -0
- package/api/types/V4TargetPropertyValuesEnvelope.js +5 -0
- package/api/types/V4UserFieldRequest.d.ts +10 -0
- package/api/types/V4UserFieldRequest.js +5 -0
- package/api/types/Webhook.d.ts +1 -0
- package/api/types/WorkTaskStatus.d.ts +1 -1
- package/api/types/index.d.ts +20 -1
- package/api/types/index.js +20 -1
- package/core/auth/BearerToken.d.ts +1 -1
- package/core/fetcher/APIResponse.d.ts +1 -1
- package/core/fetcher/Fetcher.d.ts +6 -3
- package/core/fetcher/Fetcher.js +20 -189
- package/core/fetcher/Supplier.d.ts +1 -1
- package/core/fetcher/createRequestUrl.d.ts +1 -0
- package/core/fetcher/createRequestUrl.js +12 -0
- package/core/fetcher/getFetchFn.d.ts +4 -0
- package/core/fetcher/getFetchFn.js +68 -0
- package/core/fetcher/getHeader.js +1 -2
- package/core/fetcher/getRequestBody.d.ts +7 -0
- package/core/fetcher/getRequestBody.js +23 -0
- package/core/fetcher/getResponseBody.d.ts +1 -0
- package/core/fetcher/getResponseBody.js +54 -0
- package/core/fetcher/makeRequest.d.ts +1 -0
- package/core/fetcher/makeRequest.js +42 -0
- package/core/fetcher/requestWithRetries.d.ts +1 -0
- package/core/fetcher/requestWithRetries.js +40 -0
- package/core/fetcher/signals.d.ts +11 -0
- package/core/fetcher/signals.js +36 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +21 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +126 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +59 -0
- package/core/json.d.ts +15 -0
- package/core/json.js +24 -0
- package/core/runtime/runtime.d.ts +2 -1
- package/core/runtime/runtime.js +52 -41
- package/dist/Client.d.ts +20 -15
- package/dist/Client.js +9 -9
- package/dist/api/errors/BadRequestError.js +17 -7
- package/dist/api/errors/ConflictError.js +17 -7
- package/dist/api/errors/ForbiddenError.js +17 -7
- package/dist/api/errors/InternalServerError.js +17 -7
- package/dist/api/errors/NotFoundError.js +17 -7
- package/dist/api/errors/UnauthorizedError.js +17 -7
- package/dist/api/errors/UnprocessableEntityError.js +17 -7
- package/dist/api/resources/bulkSync/client/Client.d.ts +47 -6
- package/dist/api/resources/bulkSync/client/Client.js +135 -157
- package/dist/api/resources/bulkSync/client/requests/CreateBulkSyncRequest.d.ts +11 -3
- package/dist/api/resources/bulkSync/client/requests/UpdateBulkSyncRequest.d.ts +11 -3
- package/dist/api/resources/bulkSync/resources/executions/client/Client.d.ts +13 -2
- package/dist/api/resources/bulkSync/resources/executions/client/Client.js +75 -79
- package/dist/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListRequest.d.ts +18 -0
- package/dist/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListRequest.js +5 -0
- package/dist/api/resources/bulkSync/resources/executions/client/requests/index.d.ts +1 -0
- package/dist/api/resources/bulkSync/resources/index.d.ts +2 -0
- package/dist/api/resources/bulkSync/resources/index.js +20 -8
- package/dist/api/resources/bulkSync/resources/schedules/client/Client.d.ts +113 -0
- package/dist/api/resources/bulkSync/resources/schedules/client/Client.js +398 -0
- package/dist/api/resources/bulkSync/resources/schedules/client/index.d.ts +1 -0
- package/dist/api/resources/bulkSync/resources/schedules/client/index.js +17 -0
- package/dist/api/resources/bulkSync/resources/schedules/client/requests/CreateScheduleRequest.d.ts +15 -0
- package/dist/api/resources/bulkSync/resources/schedules/client/requests/CreateScheduleRequest.js +5 -0
- package/dist/api/resources/bulkSync/resources/schedules/client/requests/UpdateScheduleRequest.d.ts +15 -0
- package/dist/api/resources/bulkSync/resources/schedules/client/requests/UpdateScheduleRequest.js +5 -0
- package/dist/api/resources/bulkSync/resources/schedules/client/requests/index.d.ts +2 -0
- package/dist/api/resources/bulkSync/resources/schedules/client/requests/index.js +2 -0
- package/dist/api/resources/bulkSync/resources/schedules/index.d.ts +1 -0
- package/dist/api/resources/bulkSync/resources/schedules/index.js +17 -0
- package/dist/api/resources/bulkSync/resources/schemas/client/Client.d.ts +5 -0
- package/dist/api/resources/bulkSync/resources/schemas/client/Client.js +49 -66
- package/dist/api/resources/bulkSync/resources/schemas/client/requests/UpdateBulkSchema.d.ts +3 -1
- 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 +41 -2
- package/dist/api/resources/connections/client/Client.js +159 -128
- package/dist/api/resources/connections/client/requests/ConnectCardRequest.d.ts +7 -0
- package/dist/api/resources/connections/client/requests/CreateConnectionRequestSchema.d.ts +3 -1
- package/dist/api/resources/connections/client/requests/TestConnectionRequest.d.ts +24 -0
- package/dist/api/resources/connections/client/requests/TestConnectionRequest.js +5 -0
- package/dist/api/resources/connections/client/requests/UpdateConnectionRequestSchema.d.ts +3 -1
- package/dist/api/resources/connections/client/requests/index.d.ts +1 -0
- package/dist/api/resources/events/client/Client.d.ts +7 -2
- package/dist/api/resources/events/client/Client.js +33 -37
- package/dist/api/resources/events/client/requests/EventsListRequest.d.ts +2 -2
- package/dist/api/resources/identity/client/Client.d.ts +7 -0
- package/dist/api/resources/identity/client/Client.js +25 -20
- package/dist/api/resources/index.d.ts +2 -1
- package/dist/api/resources/index.js +20 -9
- package/dist/api/resources/jobs/client/Client.d.ts +7 -2
- package/dist/api/resources/jobs/client/Client.js +25 -22
- package/dist/api/resources/modelSync/client/Client.d.ts +83 -52
- package/dist/api/resources/modelSync/client/Client.js +228 -403
- package/dist/api/resources/modelSync/client/requests/CreateModelSyncRequest.d.ts +14 -5
- package/dist/api/resources/modelSync/client/requests/ModelSyncListRequest.d.ts +1 -1
- package/dist/api/resources/modelSync/client/requests/StartModelSyncRequest.d.ts +1 -0
- package/dist/api/resources/modelSync/client/requests/UpdateModelSyncRequest.d.ts +14 -5
- package/dist/api/resources/modelSync/client/requests/index.d.ts +0 -2
- package/dist/api/resources/modelSync/resources/executions/client/Client.d.ts +36 -8
- package/dist/api/resources/modelSync/resources/executions/client/Client.js +137 -68
- package/dist/api/resources/modelSync/resources/executions/client/index.d.ts +1 -1
- package/dist/api/resources/modelSync/resources/executions/client/index.js +15 -0
- package/dist/api/resources/modelSync/resources/executions/client/requests/ExecutionsListRequest.d.ts +16 -0
- package/dist/api/resources/modelSync/resources/executions/client/requests/ExecutionsListRequest.js +5 -0
- package/dist/api/resources/modelSync/resources/executions/client/requests/UpdateExecutionRequest.d.ts +13 -0
- package/dist/api/resources/modelSync/resources/executions/client/requests/UpdateExecutionRequest.js +5 -0
- package/dist/api/resources/modelSync/resources/executions/client/requests/index.d.ts +2 -0
- package/dist/api/resources/modelSync/resources/executions/client/requests/index.js +2 -0
- package/dist/api/resources/modelSync/resources/index.d.ts +3 -0
- package/dist/api/resources/modelSync/resources/index.js +23 -7
- package/dist/api/resources/modelSync/resources/targets/client/Client.d.ts +143 -0
- package/dist/api/resources/modelSync/resources/targets/client/Client.js +395 -0
- package/dist/api/resources/modelSync/resources/targets/client/index.d.ts +1 -0
- package/dist/api/resources/modelSync/resources/targets/client/index.js +17 -0
- package/dist/api/resources/modelSync/{client/requests/ModelSyncGetTargetFieldsRequest.d.ts → resources/targets/client/requests/TargetsGetTargetFieldsRequest.d.ts} +1 -1
- package/dist/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetFieldsRequest.js +5 -0
- package/{api/resources/modelSync/client/requests/ModelSyncGetTargetRequest.d.ts → dist/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetRequest.d.ts} +1 -1
- package/dist/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetRequest.js +5 -0
- package/dist/api/resources/modelSync/resources/targets/client/requests/index.d.ts +2 -0
- package/dist/api/resources/modelSync/resources/targets/client/requests/index.js +2 -0
- package/dist/api/resources/modelSync/resources/targets/index.d.ts +1 -0
- package/dist/api/resources/modelSync/resources/targets/index.js +17 -0
- package/dist/api/resources/models/client/Client.d.ts +5 -0
- package/dist/api/resources/models/client/Client.js +83 -135
- package/dist/api/resources/organization/client/Client.d.ts +7 -0
- package/dist/api/resources/organization/client/Client.js +53 -72
- package/dist/api/resources/permissions/client/Client.d.ts +7 -2
- package/dist/api/resources/permissions/resources/index.js +17 -7
- package/dist/api/resources/permissions/resources/policies/client/Client.d.ts +5 -0
- package/dist/api/resources/permissions/resources/policies/client/Client.js +47 -72
- package/dist/api/resources/permissions/resources/roles/client/Client.d.ts +5 -0
- package/dist/api/resources/permissions/resources/roles/client/Client.js +47 -72
- package/dist/api/resources/queryRunner/client/Client.d.ts +5 -0
- package/dist/api/resources/queryRunner/client/Client.js +33 -37
- package/dist/api/resources/schemas/client/Client.d.ts +68 -0
- package/dist/api/resources/schemas/client/Client.js +302 -59
- package/dist/api/resources/schemas/client/index.d.ts +1 -1
- package/dist/api/resources/schemas/client/index.js +15 -0
- package/dist/api/resources/schemas/client/requests/SetPrimaryKeysRequest.d.ts +11 -0
- package/dist/api/resources/schemas/client/requests/SetPrimaryKeysRequest.js +5 -0
- package/dist/api/resources/schemas/client/requests/UpsertSchemaFieldRequest.d.ts +11 -0
- package/dist/api/resources/schemas/client/requests/UpsertSchemaFieldRequest.js +5 -0
- package/dist/api/resources/schemas/client/requests/index.d.ts +2 -0
- package/dist/api/resources/schemas/client/requests/index.js +2 -0
- package/dist/api/resources/users/client/Client.d.ts +5 -0
- package/dist/api/resources/users/client/Client.js +55 -87
- package/dist/api/resources/webhooks/client/Client.d.ts +33 -4
- package/dist/api/resources/webhooks/client/Client.js +169 -76
- package/dist/api/types/BackendOAuthPrompt.d.ts +8 -0
- package/dist/api/types/BackendOAuthPrompt.js +5 -0
- package/dist/api/types/BulkBulkSyncSchedule.d.ts +20 -0
- package/dist/api/types/BulkBulkSyncSchedule.js +5 -0
- package/dist/api/types/BulkDiscover.d.ts +1 -1
- package/dist/api/types/BulkExecutionStatus.d.ts +2 -1
- package/dist/api/types/BulkExecutionStatus.js +1 -0
- package/dist/api/types/BulkFetchMode.d.ts +1 -1
- package/dist/api/types/BulkField.d.ts +2 -0
- package/dist/api/types/BulkNormalizeNames.d.ts +9 -0
- package/dist/api/types/BulkNormalizeNames.js +11 -0
- package/dist/api/types/BulkSchema.d.ts +1 -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/BulkSyncExecution.d.ts +6 -0
- package/dist/api/types/BulkSyncMode.d.ts +11 -0
- package/dist/api/types/BulkSyncMode.js +10 -0
- package/dist/api/types/BulkSyncResponse.d.ts +10 -1
- package/dist/api/types/BulkSyncSchemaExecution.d.ts +3 -0
- package/dist/api/types/CancelModelSyncResponse.d.ts +6 -0
- package/dist/api/types/CancelModelSyncResponse.js +5 -0
- package/dist/api/types/CancelModelSyncResponseEnvelope.d.ts +7 -0
- package/dist/api/types/CancelModelSyncResponseEnvelope.js +5 -0
- package/dist/api/types/ConnectCardResponse.d.ts +1 -0
- package/dist/api/types/ConnectionResponseSchema.d.ts +5 -0
- package/dist/api/types/ConnectionType.d.ts +5 -0
- package/dist/api/types/ConnectionTypeSchema.d.ts +1 -0
- package/dist/api/types/CreateConnectionResponseSchema.d.ts +3 -0
- package/dist/api/types/EventBody.d.ts +1 -1
- package/dist/api/types/ExecutionCounts.d.ts +2 -0
- 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 +3 -1
- package/dist/api/types/FilterFunction.js +2 -0
- package/dist/api/types/GetIdentityResponseSchema.d.ts +7 -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/ListBulkSyncExecutionsEnvelope.d.ts +1 -0
- package/dist/api/types/ListExecutionResponseEnvelope.d.ts +1 -0
- package/dist/api/types/ModelField.d.ts +4 -0
- package/dist/api/types/ModelSyncField.d.ts +2 -0
- package/dist/api/types/{SyncMode.d.ts → ModelSyncMode.d.ts} +2 -4
- package/{api/types/SyncMode.js → dist/api/types/ModelSyncMode.js} +2 -4
- package/dist/api/types/ModelSyncResponse.d.ts +6 -1
- package/dist/api/types/PaginationDetails.d.ts +6 -0
- package/dist/api/types/PaginationDetails.js +5 -0
- package/dist/api/types/ScheduleEnvelope.d.ts +7 -0
- package/dist/api/types/ScheduleEnvelope.js +5 -0
- package/dist/api/types/ScheduleFrequency.d.ts +1 -1
- package/dist/api/types/SchedulesEnvelope.d.ts +7 -0
- package/dist/api/types/SchedulesEnvelope.js +5 -0
- package/dist/api/types/SchemaField.d.ts +2 -0
- package/dist/api/types/SchemaIdentityFunction.d.ts +3 -1
- package/dist/api/types/SchemaIdentityFunction.js +2 -0
- package/dist/api/types/SchemaPrimaryKeyOverrideInput.d.ts +7 -0
- package/dist/api/types/SchemaPrimaryKeyOverrideInput.js +5 -0
- package/dist/api/types/StartModelSyncResponseSchema.d.ts +1 -0
- package/dist/api/types/SupportedBulkMode.d.ts +1 -1
- package/dist/api/types/SupportedMode.d.ts +1 -1
- package/dist/api/types/SyncDestinationProperties.d.ts +1 -0
- package/dist/api/types/Target.d.ts +4 -1
- package/dist/api/types/TargetCreateInput.d.ts +11 -0
- package/dist/api/types/TargetCreateInput.js +5 -0
- package/dist/api/types/TargetField.d.ts +1 -0
- package/dist/api/types/TypesType.d.ts +1 -1
- package/dist/api/types/UpdateBulkField.d.ts +9 -0
- package/dist/api/types/UpdateBulkField.js +5 -0
- package/dist/api/types/UtilEnumValue.d.ts +7 -0
- package/dist/api/types/UtilEnumValue.js +5 -0
- package/dist/api/types/UtilFieldType.d.ts +1 -1
- package/dist/api/types/V2ConnectionForm.d.ts +7 -0
- package/dist/api/types/V2ConnectionForm.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/V4BulkSyncExecutionLogs.d.ts +1 -1
- package/dist/api/types/V4BulkSyncScheduleApi.d.ts +13 -0
- package/dist/api/types/V4BulkSyncScheduleApi.js +5 -0
- package/dist/api/types/V4TargetCreator.d.ts +10 -0
- package/dist/api/types/V4TargetCreator.js +5 -0
- package/dist/api/types/V4TargetObjectsResponseEnvelope.d.ts +1 -0
- package/dist/api/types/V4TargetPropertyValues.d.ts +14 -0
- package/dist/api/types/V4TargetPropertyValues.js +5 -0
- package/dist/api/types/V4TargetPropertyValuesEnvelope.d.ts +7 -0
- package/dist/api/types/V4TargetPropertyValuesEnvelope.js +5 -0
- package/dist/api/types/V4UserFieldRequest.d.ts +10 -0
- package/dist/api/types/V4UserFieldRequest.js +5 -0
- package/dist/api/types/Webhook.d.ts +1 -0
- package/dist/api/types/WorkTaskStatus.d.ts +1 -1
- package/dist/api/types/index.d.ts +20 -1
- package/dist/api/types/index.js +20 -1
- 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 +6 -3
- package/dist/core/fetcher/Fetcher.js +20 -189
- package/dist/core/fetcher/Supplier.d.ts +1 -1
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/core/fetcher/createRequestUrl.js +12 -0
- package/dist/core/fetcher/getFetchFn.d.ts +4 -0
- package/dist/core/fetcher/getFetchFn.js +68 -0
- package/dist/core/fetcher/getHeader.js +1 -2
- package/dist/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/core/fetcher/getRequestBody.js +23 -0
- package/dist/core/fetcher/getResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getResponseBody.js +54 -0
- package/dist/core/fetcher/makeRequest.d.ts +1 -0
- package/dist/core/fetcher/makeRequest.js +42 -0
- package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
- package/dist/core/fetcher/requestWithRetries.js +40 -0
- package/dist/core/fetcher/signals.d.ts +11 -0
- package/dist/core/fetcher/signals.js +36 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +21 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +126 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +59 -0
- package/dist/core/json.d.ts +15 -0
- package/dist/core/json.js +24 -0
- package/dist/core/runtime/runtime.d.ts +2 -1
- package/dist/core/runtime/runtime.js +52 -41
- package/dist/environments.d.ts +1 -1
- package/dist/errors/PolytomicError.js +2 -1
- package/dist/errors/PolytomicTimeoutError.d.ts +1 -1
- package/dist/errors/PolytomicTimeoutError.js +2 -2
- package/dist/index.js +17 -7
- package/dist/version.d.ts +1 -0
- package/dist/version.js +4 -0
- package/environments.d.ts +1 -1
- package/errors/PolytomicError.js +2 -1
- package/errors/PolytomicTimeoutError.d.ts +1 -1
- package/errors/PolytomicTimeoutError.js +2 -2
- package/index.js +17 -7
- package/{jest.config.js → jest.config.mjs} +4 -1
- package/package.json +18 -14
- package/reference.md +6382 -0
- package/scripts/rename-to-esm-files.js +115 -0
- package/version.d.ts +1 -0
- package/version.js +4 -0
- /package/api/resources/{modelSync/client/requests/ModelSyncGetTargetFieldsRequest.js → bulkSync/resources/executions/client/requests/ExecutionsListRequest.js} +0 -0
- /package/api/resources/{modelSync/client/requests/ModelSyncGetTargetRequest.js → bulkSync/resources/schedules/client/requests/CreateScheduleRequest.js} +0 -0
- /package/{dist/api/resources/modelSync/client/requests/ModelSyncGetTargetFieldsRequest.js → api/resources/bulkSync/resources/schedules/client/requests/UpdateScheduleRequest.js} +0 -0
- /package/{dist/api/resources/modelSync/client/requests/ModelSyncGetTargetRequest.js → api/resources/connections/client/requests/TestConnectionRequest.js} +0 -0
|
@@ -18,13 +18,23 @@ 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) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
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
|
+
})();
|
|
28
38
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
39
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
40
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -46,10 +56,23 @@ const url_join_1 = __importDefault(require("url-join"));
|
|
|
46
56
|
const errors = __importStar(require("../../../../errors/index"));
|
|
47
57
|
const Client_1 = require("../resources/executions/client/Client");
|
|
48
58
|
const Client_2 = require("../resources/schemas/client/Client");
|
|
59
|
+
const Client_3 = require("../resources/schedules/client/Client");
|
|
49
60
|
class BulkSync {
|
|
50
61
|
constructor(_options) {
|
|
51
62
|
this._options = _options;
|
|
52
63
|
}
|
|
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
|
+
}
|
|
53
76
|
/**
|
|
54
77
|
* @param {Polytomic.BulkSyncListRequest} request
|
|
55
78
|
* @param {BulkSync.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -62,30 +85,23 @@ class BulkSync {
|
|
|
62
85
|
* active: true
|
|
63
86
|
* })
|
|
64
87
|
*/
|
|
65
|
-
list(
|
|
66
|
-
|
|
67
|
-
|
|
88
|
+
list() {
|
|
89
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
90
|
+
var _a, _b;
|
|
68
91
|
const { active } = request;
|
|
69
92
|
const _queryParams = {};
|
|
70
93
|
if (active != null) {
|
|
71
94
|
_queryParams["active"] = active.toString();
|
|
72
95
|
}
|
|
73
96
|
const _response = yield core.fetcher({
|
|
74
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.
|
|
97
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, "api/bulk/syncs"),
|
|
75
98
|
method: "GET",
|
|
76
|
-
headers: {
|
|
77
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
78
|
-
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
99
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
79
100
|
? yield core.Supplier.get(this._options.version)
|
|
80
|
-
: undefined,
|
|
81
|
-
"X-Fern-Language": "JavaScript",
|
|
82
|
-
"X-Fern-SDK-Name": "polytomic",
|
|
83
|
-
"X-Fern-SDK-Version": "1.11.2",
|
|
84
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
85
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
86
|
-
},
|
|
101
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.14.3", "User-Agent": "polytomic/1.14.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
87
102
|
contentType: "application/json",
|
|
88
103
|
queryParameters: _queryParams,
|
|
104
|
+
requestType: "json",
|
|
89
105
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
90
106
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
91
107
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -113,7 +129,7 @@ class BulkSync {
|
|
|
113
129
|
body: _response.error.rawBody,
|
|
114
130
|
});
|
|
115
131
|
case "timeout":
|
|
116
|
-
throw new errors.PolytomicTimeoutError();
|
|
132
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/bulk/syncs.");
|
|
117
133
|
case "unknown":
|
|
118
134
|
throw new errors.PolytomicError({
|
|
119
135
|
message: _response.error.errorMessage,
|
|
@@ -122,6 +138,33 @@ class BulkSync {
|
|
|
122
138
|
});
|
|
123
139
|
}
|
|
124
140
|
/**
|
|
141
|
+
* Create a new Bulk Sync from a source to a destination (data warehouse, database, or cloud storage bucket like S3).
|
|
142
|
+
*
|
|
143
|
+
* 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
|
+
*
|
|
145
|
+
* All of the functionality described in [the product
|
|
146
|
+
* documentation](https://docs.polytomic.com/docs/bulk-syncs) is configurable via
|
|
147
|
+
* the API.
|
|
148
|
+
*
|
|
149
|
+
* Sample code examples:
|
|
150
|
+
*
|
|
151
|
+
* - [Bulk sync (ELT) from Salesforce to S3](https://apidocs.polytomic.com/guides/code-examples/bulk-sync-elt-from-salesforce-to-s-3)
|
|
152
|
+
* - [Bulk sync (ELT) from Salesforce to Snowflake](https://apidocs.polytomic.com/guides/code-examples/bulk-sync-elt-from-salesforce-to-snowflake)
|
|
153
|
+
* - [Bulk sync (ELT) from HubSpot to PostgreSQL](https://apidocs.polytomic.com/guides/code-examples/bulk-sync-elt-from-hub-spot-to-postgre-sql)
|
|
154
|
+
*
|
|
155
|
+
* ## Connection specific configuration
|
|
156
|
+
*
|
|
157
|
+
* The `destination_configuration` is integration-specific configuration for the
|
|
158
|
+
* selected bulk sync destination. This includes settings such as the output schema
|
|
159
|
+
* and is required when creating a new sync.
|
|
160
|
+
*
|
|
161
|
+
* The `source_configuration` is optional. It allows configuration for how
|
|
162
|
+
* Polytomic reads data from the source connection. This will not be available for
|
|
163
|
+
* integrations that do not support additional configuration.
|
|
164
|
+
*
|
|
165
|
+
* Consult the [connection configurations](https://apidocs.polytomic.com/2024-02-08/guides/configuring-your-connections/overview)
|
|
166
|
+
* to see configurations for particular integrations (for example, [here](https://apidocs.polytomic.com/2024-02-08/guides/configuring-your-connections/connections/postgre-sql#source-1) is the available source configuration for the PostgreSQL bulk sync source).
|
|
167
|
+
*
|
|
125
168
|
* @param {Polytomic.CreateBulkSyncRequest} request
|
|
126
169
|
* @param {BulkSync.RequestOptions} requestOptions - Request-specific configuration.
|
|
127
170
|
*
|
|
@@ -133,32 +176,28 @@ class BulkSync {
|
|
|
133
176
|
*
|
|
134
177
|
* @example
|
|
135
178
|
* await client.bulkSync.create({
|
|
179
|
+
* destination_configuration: {
|
|
180
|
+
* "schema": "my_schema"
|
|
181
|
+
* },
|
|
136
182
|
* destination_connection_id: "248df4b7-aa70-47b8-a036-33ac447e668d",
|
|
137
183
|
* name: "My Bulk Sync",
|
|
138
184
|
* schedule: {
|
|
139
|
-
* frequency:
|
|
185
|
+
* frequency: "manual"
|
|
140
186
|
* },
|
|
141
187
|
* source_connection_id: "248df4b7-aa70-47b8-a036-33ac447e668d"
|
|
142
188
|
* })
|
|
143
189
|
*/
|
|
144
190
|
create(request, requestOptions) {
|
|
145
|
-
var _a;
|
|
146
191
|
return __awaiter(this, void 0, void 0, function* () {
|
|
192
|
+
var _a, _b;
|
|
147
193
|
const _response = yield core.fetcher({
|
|
148
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.
|
|
194
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, "api/bulk/syncs"),
|
|
149
195
|
method: "POST",
|
|
150
|
-
headers: {
|
|
151
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
152
|
-
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
196
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
153
197
|
? yield core.Supplier.get(this._options.version)
|
|
154
|
-
: undefined,
|
|
155
|
-
"X-Fern-Language": "JavaScript",
|
|
156
|
-
"X-Fern-SDK-Name": "polytomic",
|
|
157
|
-
"X-Fern-SDK-Version": "1.11.2",
|
|
158
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
159
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
160
|
-
},
|
|
198
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.14.3", "User-Agent": "polytomic/1.14.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
161
199
|
contentType: "application/json",
|
|
200
|
+
requestType: "json",
|
|
162
201
|
body: request,
|
|
163
202
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
164
203
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -193,7 +232,7 @@ class BulkSync {
|
|
|
193
232
|
body: _response.error.rawBody,
|
|
194
233
|
});
|
|
195
234
|
case "timeout":
|
|
196
|
-
throw new errors.PolytomicTimeoutError();
|
|
235
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling POST /api/bulk/syncs.");
|
|
197
236
|
case "unknown":
|
|
198
237
|
throw new errors.PolytomicError({
|
|
199
238
|
message: _response.error.errorMessage,
|
|
@@ -214,30 +253,23 @@ class BulkSync {
|
|
|
214
253
|
* refresh_schemas: true
|
|
215
254
|
* })
|
|
216
255
|
*/
|
|
217
|
-
get(
|
|
218
|
-
|
|
219
|
-
|
|
256
|
+
get(id_1) {
|
|
257
|
+
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
|
258
|
+
var _a, _b;
|
|
220
259
|
const { refresh_schemas: refreshSchemas } = request;
|
|
221
260
|
const _queryParams = {};
|
|
222
261
|
if (refreshSchemas != null) {
|
|
223
262
|
_queryParams["refresh_schemas"] = refreshSchemas.toString();
|
|
224
263
|
}
|
|
225
264
|
const _response = yield core.fetcher({
|
|
226
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.
|
|
265
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/bulk/syncs/${encodeURIComponent(id)}`),
|
|
227
266
|
method: "GET",
|
|
228
|
-
headers: {
|
|
229
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
230
|
-
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
267
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
231
268
|
? yield core.Supplier.get(this._options.version)
|
|
232
|
-
: undefined,
|
|
233
|
-
"X-Fern-Language": "JavaScript",
|
|
234
|
-
"X-Fern-SDK-Name": "polytomic",
|
|
235
|
-
"X-Fern-SDK-Version": "1.11.2",
|
|
236
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
237
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
238
|
-
},
|
|
269
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.14.3", "User-Agent": "polytomic/1.14.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
239
270
|
contentType: "application/json",
|
|
240
271
|
queryParameters: _queryParams,
|
|
272
|
+
requestType: "json",
|
|
241
273
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
242
274
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
243
275
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -265,7 +297,7 @@ class BulkSync {
|
|
|
265
297
|
body: _response.error.rawBody,
|
|
266
298
|
});
|
|
267
299
|
case "timeout":
|
|
268
|
-
throw new errors.PolytomicTimeoutError();
|
|
300
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/bulk/syncs/{id}.");
|
|
269
301
|
case "unknown":
|
|
270
302
|
throw new errors.PolytomicError({
|
|
271
303
|
message: _response.error.errorMessage,
|
|
@@ -290,32 +322,28 @@ class BulkSync {
|
|
|
290
322
|
*
|
|
291
323
|
* @example
|
|
292
324
|
* await client.bulkSync.update("248df4b7-aa70-47b8-a036-33ac447e668d", {
|
|
325
|
+
* destination_configuration: {
|
|
326
|
+
* "schema": "my_schema"
|
|
327
|
+
* },
|
|
293
328
|
* destination_connection_id: "248df4b7-aa70-47b8-a036-33ac447e668d",
|
|
294
329
|
* name: "My Bulk Sync",
|
|
295
330
|
* schedule: {
|
|
296
|
-
* frequency:
|
|
331
|
+
* frequency: "manual"
|
|
297
332
|
* },
|
|
298
333
|
* source_connection_id: "248df4b7-aa70-47b8-a036-33ac447e668d"
|
|
299
334
|
* })
|
|
300
335
|
*/
|
|
301
336
|
update(id, request, requestOptions) {
|
|
302
|
-
var _a;
|
|
303
337
|
return __awaiter(this, void 0, void 0, function* () {
|
|
338
|
+
var _a, _b;
|
|
304
339
|
const _response = yield core.fetcher({
|
|
305
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.
|
|
340
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/bulk/syncs/${encodeURIComponent(id)}`),
|
|
306
341
|
method: "PUT",
|
|
307
|
-
headers: {
|
|
308
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
309
|
-
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
342
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
310
343
|
? yield core.Supplier.get(this._options.version)
|
|
311
|
-
: undefined,
|
|
312
|
-
"X-Fern-Language": "JavaScript",
|
|
313
|
-
"X-Fern-SDK-Name": "polytomic",
|
|
314
|
-
"X-Fern-SDK-Version": "1.11.2",
|
|
315
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
316
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
317
|
-
},
|
|
344
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.14.3", "User-Agent": "polytomic/1.14.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
318
345
|
contentType: "application/json",
|
|
346
|
+
requestType: "json",
|
|
319
347
|
body: request,
|
|
320
348
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
321
349
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -350,7 +378,7 @@ class BulkSync {
|
|
|
350
378
|
body: _response.error.rawBody,
|
|
351
379
|
});
|
|
352
380
|
case "timeout":
|
|
353
|
-
throw new errors.PolytomicTimeoutError();
|
|
381
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling PUT /api/bulk/syncs/{id}.");
|
|
354
382
|
case "unknown":
|
|
355
383
|
throw new errors.PolytomicError({
|
|
356
384
|
message: _response.error.errorMessage,
|
|
@@ -373,30 +401,23 @@ class BulkSync {
|
|
|
373
401
|
* refresh_schemas: true
|
|
374
402
|
* })
|
|
375
403
|
*/
|
|
376
|
-
remove(
|
|
377
|
-
|
|
378
|
-
|
|
404
|
+
remove(id_1) {
|
|
405
|
+
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
|
406
|
+
var _a, _b;
|
|
379
407
|
const { refresh_schemas: refreshSchemas } = request;
|
|
380
408
|
const _queryParams = {};
|
|
381
409
|
if (refreshSchemas != null) {
|
|
382
410
|
_queryParams["refresh_schemas"] = refreshSchemas.toString();
|
|
383
411
|
}
|
|
384
412
|
const _response = yield core.fetcher({
|
|
385
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.
|
|
413
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/bulk/syncs/${encodeURIComponent(id)}`),
|
|
386
414
|
method: "DELETE",
|
|
387
|
-
headers: {
|
|
388
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
389
|
-
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
415
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
390
416
|
? yield core.Supplier.get(this._options.version)
|
|
391
|
-
: undefined,
|
|
392
|
-
"X-Fern-Language": "JavaScript",
|
|
393
|
-
"X-Fern-SDK-Name": "polytomic",
|
|
394
|
-
"X-Fern-SDK-Version": "1.11.2",
|
|
395
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
396
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
397
|
-
},
|
|
417
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.14.3", "User-Agent": "polytomic/1.14.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
398
418
|
contentType: "application/json",
|
|
399
419
|
queryParameters: _queryParams,
|
|
420
|
+
requestType: "json",
|
|
400
421
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
401
422
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
402
423
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -428,7 +449,7 @@ class BulkSync {
|
|
|
428
449
|
body: _response.error.rawBody,
|
|
429
450
|
});
|
|
430
451
|
case "timeout":
|
|
431
|
-
throw new errors.PolytomicTimeoutError();
|
|
452
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling DELETE /api/bulk/syncs/{id}.");
|
|
432
453
|
case "unknown":
|
|
433
454
|
throw new errors.PolytomicError({
|
|
434
455
|
message: _response.error.errorMessage,
|
|
@@ -452,23 +473,16 @@ class BulkSync {
|
|
|
452
473
|
* })
|
|
453
474
|
*/
|
|
454
475
|
activate(id, request, requestOptions) {
|
|
455
|
-
var _a;
|
|
456
476
|
return __awaiter(this, void 0, void 0, function* () {
|
|
477
|
+
var _a, _b;
|
|
457
478
|
const _response = yield core.fetcher({
|
|
458
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.
|
|
479
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/bulk/syncs/${encodeURIComponent(id)}/activate`),
|
|
459
480
|
method: "POST",
|
|
460
|
-
headers: {
|
|
461
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
462
|
-
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
481
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
463
482
|
? yield core.Supplier.get(this._options.version)
|
|
464
|
-
: undefined,
|
|
465
|
-
"X-Fern-Language": "JavaScript",
|
|
466
|
-
"X-Fern-SDK-Name": "polytomic",
|
|
467
|
-
"X-Fern-SDK-Version": "1.11.2",
|
|
468
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
469
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
470
|
-
},
|
|
483
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.14.3", "User-Agent": "polytomic/1.14.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
471
484
|
contentType: "application/json",
|
|
485
|
+
requestType: "json",
|
|
472
486
|
body: request,
|
|
473
487
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
474
488
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -501,7 +515,7 @@ class BulkSync {
|
|
|
501
515
|
body: _response.error.rawBody,
|
|
502
516
|
});
|
|
503
517
|
case "timeout":
|
|
504
|
-
throw new errors.PolytomicTimeoutError();
|
|
518
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling POST /api/bulk/syncs/{id}/activate.");
|
|
505
519
|
case "unknown":
|
|
506
520
|
throw new errors.PolytomicError({
|
|
507
521
|
message: _response.error.errorMessage,
|
|
@@ -521,24 +535,17 @@ class BulkSync {
|
|
|
521
535
|
* @example
|
|
522
536
|
* await client.bulkSync.start("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
523
537
|
*/
|
|
524
|
-
start(
|
|
525
|
-
|
|
526
|
-
|
|
538
|
+
start(id_1) {
|
|
539
|
+
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
|
540
|
+
var _a, _b;
|
|
527
541
|
const _response = yield core.fetcher({
|
|
528
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.
|
|
542
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/bulk/syncs/${encodeURIComponent(id)}/executions`),
|
|
529
543
|
method: "POST",
|
|
530
|
-
headers: {
|
|
531
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
532
|
-
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
544
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
533
545
|
? yield core.Supplier.get(this._options.version)
|
|
534
|
-
: undefined,
|
|
535
|
-
"X-Fern-Language": "JavaScript",
|
|
536
|
-
"X-Fern-SDK-Name": "polytomic",
|
|
537
|
-
"X-Fern-SDK-Version": "1.11.2",
|
|
538
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
539
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
540
|
-
},
|
|
546
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.14.3", "User-Agent": "polytomic/1.14.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
541
547
|
contentType: "application/json",
|
|
548
|
+
requestType: "json",
|
|
542
549
|
body: request,
|
|
543
550
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
544
551
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -569,7 +576,7 @@ class BulkSync {
|
|
|
569
576
|
body: _response.error.rawBody,
|
|
570
577
|
});
|
|
571
578
|
case "timeout":
|
|
572
|
-
throw new errors.PolytomicTimeoutError();
|
|
579
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling POST /api/bulk/syncs/{id}/executions.");
|
|
573
580
|
case "unknown":
|
|
574
581
|
throw new errors.PolytomicError({
|
|
575
582
|
message: _response.error.errorMessage,
|
|
@@ -589,23 +596,16 @@ class BulkSync {
|
|
|
589
596
|
* await client.bulkSync.getStatus("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
590
597
|
*/
|
|
591
598
|
getStatus(id, requestOptions) {
|
|
592
|
-
var _a;
|
|
593
599
|
return __awaiter(this, void 0, void 0, function* () {
|
|
600
|
+
var _a, _b;
|
|
594
601
|
const _response = yield core.fetcher({
|
|
595
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.
|
|
602
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/bulk/syncs/${encodeURIComponent(id)}/status`),
|
|
596
603
|
method: "GET",
|
|
597
|
-
headers: {
|
|
598
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
599
|
-
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
604
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
600
605
|
? yield core.Supplier.get(this._options.version)
|
|
601
|
-
: undefined,
|
|
602
|
-
"X-Fern-Language": "JavaScript",
|
|
603
|
-
"X-Fern-SDK-Name": "polytomic",
|
|
604
|
-
"X-Fern-SDK-Version": "1.11.2",
|
|
605
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
606
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
607
|
-
},
|
|
606
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.14.3", "User-Agent": "polytomic/1.14.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
608
607
|
contentType: "application/json",
|
|
608
|
+
requestType: "json",
|
|
609
609
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
610
610
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
611
611
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -635,7 +635,7 @@ class BulkSync {
|
|
|
635
635
|
body: _response.error.rawBody,
|
|
636
636
|
});
|
|
637
637
|
case "timeout":
|
|
638
|
-
throw new errors.PolytomicTimeoutError();
|
|
638
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/bulk/syncs/{id}/status.");
|
|
639
639
|
case "unknown":
|
|
640
640
|
throw new errors.PolytomicError({
|
|
641
641
|
message: _response.error.errorMessage,
|
|
@@ -658,30 +658,23 @@ class BulkSync {
|
|
|
658
658
|
* include_fields: true
|
|
659
659
|
* })
|
|
660
660
|
*/
|
|
661
|
-
getSource(
|
|
662
|
-
|
|
663
|
-
|
|
661
|
+
getSource(id_1) {
|
|
662
|
+
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
|
663
|
+
var _a, _b;
|
|
664
664
|
const { include_fields: includeFields } = request;
|
|
665
665
|
const _queryParams = {};
|
|
666
666
|
if (includeFields != null) {
|
|
667
667
|
_queryParams["include_fields"] = includeFields.toString();
|
|
668
668
|
}
|
|
669
669
|
const _response = yield core.fetcher({
|
|
670
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.
|
|
670
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/connections/${encodeURIComponent(id)}/bulksync/source`),
|
|
671
671
|
method: "GET",
|
|
672
|
-
headers: {
|
|
673
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
674
|
-
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
672
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
675
673
|
? yield core.Supplier.get(this._options.version)
|
|
676
|
-
: undefined,
|
|
677
|
-
"X-Fern-Language": "JavaScript",
|
|
678
|
-
"X-Fern-SDK-Name": "polytomic",
|
|
679
|
-
"X-Fern-SDK-Version": "1.11.2",
|
|
680
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
681
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
682
|
-
},
|
|
674
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.14.3", "User-Agent": "polytomic/1.14.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
683
675
|
contentType: "application/json",
|
|
684
676
|
queryParameters: _queryParams,
|
|
677
|
+
requestType: "json",
|
|
685
678
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
686
679
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
687
680
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -713,7 +706,7 @@ class BulkSync {
|
|
|
713
706
|
body: _response.error.rawBody,
|
|
714
707
|
});
|
|
715
708
|
case "timeout":
|
|
716
|
-
throw new errors.PolytomicTimeoutError();
|
|
709
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/connections/{id}/bulksync/source.");
|
|
717
710
|
case "unknown":
|
|
718
711
|
throw new errors.PolytomicError({
|
|
719
712
|
message: _response.error.errorMessage,
|
|
@@ -734,23 +727,16 @@ class BulkSync {
|
|
|
734
727
|
* await client.bulkSync.getDestination("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
735
728
|
*/
|
|
736
729
|
getDestination(id, requestOptions) {
|
|
737
|
-
var _a;
|
|
738
730
|
return __awaiter(this, void 0, void 0, function* () {
|
|
731
|
+
var _a, _b;
|
|
739
732
|
const _response = yield core.fetcher({
|
|
740
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.
|
|
733
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/connections/${encodeURIComponent(id)}/bulksync/target`),
|
|
741
734
|
method: "GET",
|
|
742
|
-
headers: {
|
|
743
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
744
|
-
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
735
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
745
736
|
? yield core.Supplier.get(this._options.version)
|
|
746
|
-
: undefined,
|
|
747
|
-
"X-Fern-Language": "JavaScript",
|
|
748
|
-
"X-Fern-SDK-Name": "polytomic",
|
|
749
|
-
"X-Fern-SDK-Version": "1.11.2",
|
|
750
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
751
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
752
|
-
},
|
|
737
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.14.3", "User-Agent": "polytomic/1.14.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
753
738
|
contentType: "application/json",
|
|
739
|
+
requestType: "json",
|
|
754
740
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
755
741
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
756
742
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -782,7 +768,7 @@ class BulkSync {
|
|
|
782
768
|
body: _response.error.rawBody,
|
|
783
769
|
});
|
|
784
770
|
case "timeout":
|
|
785
|
-
throw new errors.PolytomicTimeoutError();
|
|
771
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/connections/{id}/bulksync/target.");
|
|
786
772
|
case "unknown":
|
|
787
773
|
throw new errors.PolytomicError({
|
|
788
774
|
message: _response.error.errorMessage,
|
|
@@ -790,14 +776,6 @@ class BulkSync {
|
|
|
790
776
|
}
|
|
791
777
|
});
|
|
792
778
|
}
|
|
793
|
-
get executions() {
|
|
794
|
-
var _a;
|
|
795
|
-
return ((_a = this._executions) !== null && _a !== void 0 ? _a : (this._executions = new Client_1.Executions(this._options)));
|
|
796
|
-
}
|
|
797
|
-
get schemas() {
|
|
798
|
-
var _a;
|
|
799
|
-
return ((_a = this._schemas) !== null && _a !== void 0 ? _a : (this._schemas = new Client_2.Schemas(this._options)));
|
|
800
|
-
}
|
|
801
779
|
_getAuthorizationHeader() {
|
|
802
780
|
return __awaiter(this, void 0, void 0, function* () {
|
|
803
781
|
return `Bearer ${yield core.Supplier.get(this._options.token)}`;
|
|
@@ -5,10 +5,13 @@ import * as Polytomic from "../../../../index";
|
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
7
|
* {
|
|
8
|
+
* destination_configuration: {
|
|
9
|
+
* "schema": "my_schema"
|
|
10
|
+
* },
|
|
8
11
|
* destination_connection_id: "248df4b7-aa70-47b8-a036-33ac447e668d",
|
|
9
12
|
* name: "My Bulk Sync",
|
|
10
13
|
* schedule: {
|
|
11
|
-
* frequency:
|
|
14
|
+
* frequency: "manual"
|
|
12
15
|
* },
|
|
13
16
|
* source_connection_id: "248df4b7-aa70-47b8-a036-33ac447e668d"
|
|
14
17
|
* }
|
|
@@ -17,16 +20,21 @@ export interface CreateBulkSyncRequest {
|
|
|
17
20
|
active?: boolean;
|
|
18
21
|
automatically_add_new_fields?: Polytomic.BulkDiscover;
|
|
19
22
|
automatically_add_new_objects?: Polytomic.BulkDiscover;
|
|
23
|
+
/** Override the default concurrency limit for this sync. */
|
|
24
|
+
concurrency_limit?: number;
|
|
20
25
|
data_cutoff_timestamp?: string;
|
|
21
|
-
destination_configuration
|
|
26
|
+
destination_configuration: Record<string, unknown>;
|
|
22
27
|
destination_connection_id: string;
|
|
23
28
|
disable_record_timestamps?: boolean;
|
|
24
29
|
/** DEPRECATED: Use automatically_add_new_objects/automatically_add_new_fields instead */
|
|
25
30
|
discover?: boolean;
|
|
26
|
-
mode?: Polytomic.
|
|
31
|
+
mode?: Polytomic.BulkSyncMode;
|
|
27
32
|
name: string;
|
|
33
|
+
normalize_names?: Polytomic.BulkNormalizeNames;
|
|
28
34
|
organization_id?: string;
|
|
29
35
|
policies?: string[];
|
|
36
|
+
/** Override the default resync concurrency limit for this sync. */
|
|
37
|
+
resync_concurrency_limit?: number;
|
|
30
38
|
schedule: Polytomic.BulkSchedule;
|
|
31
39
|
/** List of schemas to sync; if omitted, all schemas will be selected for syncing. */
|
|
32
40
|
schemas?: Polytomic.V2CreateBulkSyncRequestSchemasItem[];
|
|
@@ -5,10 +5,13 @@ import * as Polytomic from "../../../../index";
|
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
7
|
* {
|
|
8
|
+
* destination_configuration: {
|
|
9
|
+
* "schema": "my_schema"
|
|
10
|
+
* },
|
|
8
11
|
* destination_connection_id: "248df4b7-aa70-47b8-a036-33ac447e668d",
|
|
9
12
|
* name: "My Bulk Sync",
|
|
10
13
|
* schedule: {
|
|
11
|
-
* frequency:
|
|
14
|
+
* frequency: "manual"
|
|
12
15
|
* },
|
|
13
16
|
* source_connection_id: "248df4b7-aa70-47b8-a036-33ac447e668d"
|
|
14
17
|
* }
|
|
@@ -17,16 +20,21 @@ export interface UpdateBulkSyncRequest {
|
|
|
17
20
|
active?: boolean;
|
|
18
21
|
automatically_add_new_fields?: Polytomic.BulkDiscover;
|
|
19
22
|
automatically_add_new_objects?: Polytomic.BulkDiscover;
|
|
23
|
+
/** Override the default concurrency limit for this sync. */
|
|
24
|
+
concurrency_limit?: number;
|
|
20
25
|
data_cutoff_timestamp?: string;
|
|
21
|
-
destination_configuration
|
|
26
|
+
destination_configuration: Record<string, unknown>;
|
|
22
27
|
destination_connection_id: string;
|
|
23
28
|
disable_record_timestamps?: boolean;
|
|
24
29
|
/** DEPRECATED: Use automatically_add_new_objects/automatically_add_new_fields instead */
|
|
25
30
|
discover?: boolean;
|
|
26
|
-
mode?: Polytomic.
|
|
31
|
+
mode?: Polytomic.BulkSyncMode;
|
|
27
32
|
name: string;
|
|
33
|
+
normalize_names?: Polytomic.BulkNormalizeNames;
|
|
28
34
|
organization_id?: string;
|
|
29
35
|
policies?: string[];
|
|
36
|
+
/** Override the default resync concurrency limit for this sync. */
|
|
37
|
+
resync_concurrency_limit?: number;
|
|
30
38
|
schedule: Polytomic.BulkSchedule;
|
|
31
39
|
/** List of schemas to sync; if omitted, all schemas will be selected for syncing. */
|
|
32
40
|
schemas?: Polytomic.V2UpdateBulkSyncRequestSchemasItem[];
|