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
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Polytomic from "../index";
|
|
5
|
+
export interface V4TargetCreator {
|
|
6
|
+
/** The properties that are required for target creation. */
|
|
7
|
+
properties?: Polytomic.TargetCreateInput[];
|
|
8
|
+
/** True if the connection supports target creation. */
|
|
9
|
+
supported?: boolean;
|
|
10
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Polytomic from "../index";
|
|
5
|
+
export interface V4TargetPropertyValues {
|
|
6
|
+
/** True if the property is an enum. */
|
|
7
|
+
enum?: boolean;
|
|
8
|
+
/** The identifier of the target property. */
|
|
9
|
+
id?: string;
|
|
10
|
+
/** A human readable title for the target property. */
|
|
11
|
+
title?: string;
|
|
12
|
+
/** Valid values for the target property. */
|
|
13
|
+
values?: Polytomic.UtilEnumValue[];
|
|
14
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
4
|
+
export type WorkTaskStatus = "created" | "running" | "done" | "failed";
|
|
5
5
|
export declare const WorkTaskStatus: {
|
|
6
6
|
readonly Created: "created";
|
|
7
7
|
readonly Running: "running";
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
export * from "./ApiError";
|
|
2
|
+
export * from "./BackendOAuthPrompt";
|
|
3
|
+
export * from "./BulkBulkSyncSchedule";
|
|
2
4
|
export * from "./BulkDiscover";
|
|
3
5
|
export * from "./BulkExecutionStatus";
|
|
4
6
|
export * from "./BulkItemizedSchedule";
|
|
5
7
|
export * from "./BulkMultiScheduleConfiguration";
|
|
8
|
+
export * from "./BulkNormalizeNames";
|
|
6
9
|
export * from "./BulkSchedule";
|
|
7
10
|
export * from "./BulkSchemaExecutionStatus";
|
|
8
11
|
export * from "./BulkSelectiveMode";
|
|
12
|
+
export * from "./BulkSyncMode";
|
|
9
13
|
export * from "./CommonOutputActor";
|
|
10
14
|
export * from "./BulkSyncCanceledEvent";
|
|
11
15
|
export * from "./BulkSyncCompletedEvent";
|
|
@@ -26,16 +30,19 @@ export * from "./LabelLabel";
|
|
|
26
30
|
export * from "./ModelModelFieldRequest";
|
|
27
31
|
export * from "./ModelRelation";
|
|
28
32
|
export * from "./ModelRelationTo";
|
|
33
|
+
export * from "./ModelSyncMode";
|
|
29
34
|
export * from "./RestErrResponse";
|
|
30
35
|
export * from "./ScheduleFrequency";
|
|
31
36
|
export * from "./ScheduleScheduleOption";
|
|
32
37
|
export * from "./SchemaAssociation";
|
|
33
38
|
export * from "./SchemaIdentityFunction";
|
|
39
|
+
export * from "./SchemaPrimaryKeyOverrideInput";
|
|
34
40
|
export * from "./SyncDestinationProperties";
|
|
41
|
+
export * from "./TargetCreateInput";
|
|
35
42
|
export * from "./TypesType";
|
|
43
|
+
export * from "./UtilEnumValue";
|
|
36
44
|
export * from "./ExecutionStatus";
|
|
37
45
|
export * from "./UtilFieldType";
|
|
38
|
-
export * from "./SyncMode";
|
|
39
46
|
export * from "./ApiKeyResponse";
|
|
40
47
|
export * from "./ApiKeyResponseEnvelope";
|
|
41
48
|
export * from "./ActivateSyncEnvelope";
|
|
@@ -47,7 +54,10 @@ export * from "./BulkSyncDestEnvelope";
|
|
|
47
54
|
export * from "./BulkSyncListEnvelope";
|
|
48
55
|
export * from "./BulkSyncResponse";
|
|
49
56
|
export * from "./BulkSyncResponseEnvelope";
|
|
57
|
+
export * from "./CancelModelSyncResponse";
|
|
58
|
+
export * from "./CancelModelSyncResponseEnvelope";
|
|
50
59
|
export * from "./ConfigurationValue";
|
|
60
|
+
export * from "./V2ConnectionForm";
|
|
51
61
|
export * from "./ConnectionListResponseEnvelope";
|
|
52
62
|
export * from "./ConnectionMeta";
|
|
53
63
|
export * from "./ConnectionMetaResponse";
|
|
@@ -102,6 +112,7 @@ export * from "./Organization";
|
|
|
102
112
|
export * from "./OrganizationEnvelope";
|
|
103
113
|
export * from "./OrganizationsEnvelope";
|
|
104
114
|
export * from "./Override";
|
|
115
|
+
export * from "./PaginationDetails";
|
|
105
116
|
export * from "./PolicyAction";
|
|
106
117
|
export * from "./PolicyResponse";
|
|
107
118
|
export * from "./PolicyResponseEnvelope";
|
|
@@ -157,9 +168,11 @@ export * from "./PickValue";
|
|
|
157
168
|
export * from "./Schema";
|
|
158
169
|
export * from "./SchemaField";
|
|
159
170
|
export * from "./SchemaRecordsResponseEnvelope";
|
|
171
|
+
export * from "./UpdateBulkField";
|
|
160
172
|
export * from "./V4BulkSyncExecutionLogs";
|
|
161
173
|
export * from "./V4BulkSyncExecutionLogsEnvelope";
|
|
162
174
|
export * from "./BulkSyncExecutionStatus";
|
|
175
|
+
export * from "./V4BulkSyncScheduleApi";
|
|
163
176
|
export * from "./BulkSyncSchemaExecutionStatus";
|
|
164
177
|
export * from "./V4ExportSyncLogsEnvelope";
|
|
165
178
|
export * from "./V4ExportSyncLogsResponse";
|
|
@@ -169,9 +182,15 @@ export * from "./V4QueryResultsEnvelope";
|
|
|
169
182
|
export * from "./V4RunQueryEnvelope";
|
|
170
183
|
export * from "./Pagination";
|
|
171
184
|
export * from "./V4RunQueryResult";
|
|
185
|
+
export * from "./ScheduleEnvelope";
|
|
186
|
+
export * from "./SchedulesEnvelope";
|
|
172
187
|
export * from "./SourceMeta";
|
|
173
188
|
export * from "./SupportedMode";
|
|
174
189
|
export * from "./ModelSyncSourceMetaResponse";
|
|
190
|
+
export * from "./V4TargetCreator";
|
|
175
191
|
export * from "./TargetObject";
|
|
176
192
|
export * from "./V4TargetObjectsResponseEnvelope";
|
|
193
|
+
export * from "./V4TargetPropertyValues";
|
|
194
|
+
export * from "./V4TargetPropertyValuesEnvelope";
|
|
195
|
+
export * from "./V4UserFieldRequest";
|
|
177
196
|
export * from "./WorkTaskStatus";
|
package/dist/api/types/index.js
CHANGED
|
@@ -15,13 +15,17 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./ApiError"), exports);
|
|
18
|
+
__exportStar(require("./BackendOAuthPrompt"), exports);
|
|
19
|
+
__exportStar(require("./BulkBulkSyncSchedule"), exports);
|
|
18
20
|
__exportStar(require("./BulkDiscover"), exports);
|
|
19
21
|
__exportStar(require("./BulkExecutionStatus"), exports);
|
|
20
22
|
__exportStar(require("./BulkItemizedSchedule"), exports);
|
|
21
23
|
__exportStar(require("./BulkMultiScheduleConfiguration"), exports);
|
|
24
|
+
__exportStar(require("./BulkNormalizeNames"), exports);
|
|
22
25
|
__exportStar(require("./BulkSchedule"), exports);
|
|
23
26
|
__exportStar(require("./BulkSchemaExecutionStatus"), exports);
|
|
24
27
|
__exportStar(require("./BulkSelectiveMode"), exports);
|
|
28
|
+
__exportStar(require("./BulkSyncMode"), exports);
|
|
25
29
|
__exportStar(require("./CommonOutputActor"), exports);
|
|
26
30
|
__exportStar(require("./BulkSyncCanceledEvent"), exports);
|
|
27
31
|
__exportStar(require("./BulkSyncCompletedEvent"), exports);
|
|
@@ -42,16 +46,19 @@ __exportStar(require("./LabelLabel"), exports);
|
|
|
42
46
|
__exportStar(require("./ModelModelFieldRequest"), exports);
|
|
43
47
|
__exportStar(require("./ModelRelation"), exports);
|
|
44
48
|
__exportStar(require("./ModelRelationTo"), exports);
|
|
49
|
+
__exportStar(require("./ModelSyncMode"), exports);
|
|
45
50
|
__exportStar(require("./RestErrResponse"), exports);
|
|
46
51
|
__exportStar(require("./ScheduleFrequency"), exports);
|
|
47
52
|
__exportStar(require("./ScheduleScheduleOption"), exports);
|
|
48
53
|
__exportStar(require("./SchemaAssociation"), exports);
|
|
49
54
|
__exportStar(require("./SchemaIdentityFunction"), exports);
|
|
55
|
+
__exportStar(require("./SchemaPrimaryKeyOverrideInput"), exports);
|
|
50
56
|
__exportStar(require("./SyncDestinationProperties"), exports);
|
|
57
|
+
__exportStar(require("./TargetCreateInput"), exports);
|
|
51
58
|
__exportStar(require("./TypesType"), exports);
|
|
59
|
+
__exportStar(require("./UtilEnumValue"), exports);
|
|
52
60
|
__exportStar(require("./ExecutionStatus"), exports);
|
|
53
61
|
__exportStar(require("./UtilFieldType"), exports);
|
|
54
|
-
__exportStar(require("./SyncMode"), exports);
|
|
55
62
|
__exportStar(require("./ApiKeyResponse"), exports);
|
|
56
63
|
__exportStar(require("./ApiKeyResponseEnvelope"), exports);
|
|
57
64
|
__exportStar(require("./ActivateSyncEnvelope"), exports);
|
|
@@ -63,7 +70,10 @@ __exportStar(require("./BulkSyncDestEnvelope"), exports);
|
|
|
63
70
|
__exportStar(require("./BulkSyncListEnvelope"), exports);
|
|
64
71
|
__exportStar(require("./BulkSyncResponse"), exports);
|
|
65
72
|
__exportStar(require("./BulkSyncResponseEnvelope"), exports);
|
|
73
|
+
__exportStar(require("./CancelModelSyncResponse"), exports);
|
|
74
|
+
__exportStar(require("./CancelModelSyncResponseEnvelope"), exports);
|
|
66
75
|
__exportStar(require("./ConfigurationValue"), exports);
|
|
76
|
+
__exportStar(require("./V2ConnectionForm"), exports);
|
|
67
77
|
__exportStar(require("./ConnectionListResponseEnvelope"), exports);
|
|
68
78
|
__exportStar(require("./ConnectionMeta"), exports);
|
|
69
79
|
__exportStar(require("./ConnectionMetaResponse"), exports);
|
|
@@ -118,6 +128,7 @@ __exportStar(require("./Organization"), exports);
|
|
|
118
128
|
__exportStar(require("./OrganizationEnvelope"), exports);
|
|
119
129
|
__exportStar(require("./OrganizationsEnvelope"), exports);
|
|
120
130
|
__exportStar(require("./Override"), exports);
|
|
131
|
+
__exportStar(require("./PaginationDetails"), exports);
|
|
121
132
|
__exportStar(require("./PolicyAction"), exports);
|
|
122
133
|
__exportStar(require("./PolicyResponse"), exports);
|
|
123
134
|
__exportStar(require("./PolicyResponseEnvelope"), exports);
|
|
@@ -173,9 +184,11 @@ __exportStar(require("./PickValue"), exports);
|
|
|
173
184
|
__exportStar(require("./Schema"), exports);
|
|
174
185
|
__exportStar(require("./SchemaField"), exports);
|
|
175
186
|
__exportStar(require("./SchemaRecordsResponseEnvelope"), exports);
|
|
187
|
+
__exportStar(require("./UpdateBulkField"), exports);
|
|
176
188
|
__exportStar(require("./V4BulkSyncExecutionLogs"), exports);
|
|
177
189
|
__exportStar(require("./V4BulkSyncExecutionLogsEnvelope"), exports);
|
|
178
190
|
__exportStar(require("./BulkSyncExecutionStatus"), exports);
|
|
191
|
+
__exportStar(require("./V4BulkSyncScheduleApi"), exports);
|
|
179
192
|
__exportStar(require("./BulkSyncSchemaExecutionStatus"), exports);
|
|
180
193
|
__exportStar(require("./V4ExportSyncLogsEnvelope"), exports);
|
|
181
194
|
__exportStar(require("./V4ExportSyncLogsResponse"), exports);
|
|
@@ -185,9 +198,15 @@ __exportStar(require("./V4QueryResultsEnvelope"), exports);
|
|
|
185
198
|
__exportStar(require("./V4RunQueryEnvelope"), exports);
|
|
186
199
|
__exportStar(require("./Pagination"), exports);
|
|
187
200
|
__exportStar(require("./V4RunQueryResult"), exports);
|
|
201
|
+
__exportStar(require("./ScheduleEnvelope"), exports);
|
|
202
|
+
__exportStar(require("./SchedulesEnvelope"), exports);
|
|
188
203
|
__exportStar(require("./SourceMeta"), exports);
|
|
189
204
|
__exportStar(require("./SupportedMode"), exports);
|
|
190
205
|
__exportStar(require("./ModelSyncSourceMetaResponse"), exports);
|
|
206
|
+
__exportStar(require("./V4TargetCreator"), exports);
|
|
191
207
|
__exportStar(require("./TargetObject"), exports);
|
|
192
208
|
__exportStar(require("./V4TargetObjectsResponseEnvelope"), exports);
|
|
209
|
+
__exportStar(require("./V4TargetPropertyValues"), exports);
|
|
210
|
+
__exportStar(require("./V4TargetPropertyValuesEnvelope"), exports);
|
|
211
|
+
__exportStar(require("./V4UserFieldRequest"), exports);
|
|
193
212
|
__exportStar(require("./WorkTaskStatus"), exports);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type APIResponse<Success, Failure> = SuccessfulResponse<Success> | FailedResponse<Failure>;
|
|
2
2
|
export interface SuccessfulResponse<T> {
|
|
3
3
|
ok: true;
|
|
4
4
|
body: T;
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { APIResponse } from "./APIResponse";
|
|
2
|
-
export
|
|
2
|
+
export type FetchFunction = <R = unknown>(args: Fetcher.Args) => Promise<APIResponse<R, Fetcher.Error>>;
|
|
3
3
|
export declare namespace Fetcher {
|
|
4
4
|
interface Args {
|
|
5
5
|
url: string;
|
|
6
6
|
method: string;
|
|
7
7
|
contentType?: string;
|
|
8
8
|
headers?: Record<string, string | undefined>;
|
|
9
|
-
queryParameters?: Record<string, string | string[] | object | object[]>;
|
|
9
|
+
queryParameters?: Record<string, string | string[] | object | object[] | null>;
|
|
10
10
|
body?: unknown;
|
|
11
11
|
timeoutMs?: number;
|
|
12
12
|
maxRetries?: number;
|
|
13
13
|
withCredentials?: boolean;
|
|
14
14
|
abortSignal?: AbortSignal;
|
|
15
|
-
|
|
15
|
+
requestType?: "json" | "file" | "bytes";
|
|
16
|
+
responseType?: "json" | "blob" | "sse" | "streaming" | "text" | "arrayBuffer";
|
|
17
|
+
duplex?: "half";
|
|
16
18
|
}
|
|
17
19
|
type Error = FailedStatusCodeError | NonJsonError | TimeoutError | UnknownError;
|
|
18
20
|
interface FailedStatusCodeError {
|
|
@@ -33,4 +35,5 @@ export declare namespace Fetcher {
|
|
|
33
35
|
errorMessage: string;
|
|
34
36
|
}
|
|
35
37
|
}
|
|
38
|
+
export declare function fetcherImpl<R = unknown>(args: Fetcher.Args): Promise<APIResponse<R, Fetcher.Error>>;
|
|
36
39
|
export declare const fetcher: FetchFunction;
|
|
@@ -1,27 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -31,18 +8,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
31
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
9
|
});
|
|
33
10
|
};
|
|
34
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
-
};
|
|
37
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
12
|
exports.fetcher = void 0;
|
|
39
|
-
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
const
|
|
13
|
+
exports.fetcherImpl = fetcherImpl;
|
|
14
|
+
const json_1 = require("../json");
|
|
15
|
+
const createRequestUrl_1 = require("./createRequestUrl");
|
|
16
|
+
const getFetchFn_1 = require("./getFetchFn");
|
|
17
|
+
const getRequestBody_1 = require("./getRequestBody");
|
|
18
|
+
const getResponseBody_1 = require("./getResponseBody");
|
|
19
|
+
const makeRequest_1 = require("./makeRequest");
|
|
20
|
+
const requestWithRetries_1 = require("./requestWithRetries");
|
|
44
21
|
function fetcherImpl(args) {
|
|
45
|
-
var _a, _b;
|
|
46
22
|
return __awaiter(this, void 0, void 0, function* () {
|
|
47
23
|
const headers = {};
|
|
48
24
|
if (args.body !== undefined && args.contentType != null) {
|
|
@@ -55,116 +31,21 @@ function fetcherImpl(args) {
|
|
|
55
31
|
}
|
|
56
32
|
}
|
|
57
33
|
}
|
|
58
|
-
const url =
|
|
59
|
-
|
|
60
|
-
: args.
|
|
61
|
-
|
|
62
|
-
const maybeStringifyBody = (body) => {
|
|
63
|
-
if (body instanceof Uint8Array) {
|
|
64
|
-
return body;
|
|
65
|
-
}
|
|
66
|
-
else if (args.contentType === "application/x-www-form-urlencoded" && typeof args.body === "string") {
|
|
67
|
-
return args.body;
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
return JSON.stringify(body);
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
if (runtime_1.RUNTIME.type === "node") {
|
|
74
|
-
if (args.body instanceof (yield Promise.resolve().then(() => __importStar(require("formdata-node")))).FormData) {
|
|
75
|
-
// @ts-expect-error
|
|
76
|
-
body = args.body;
|
|
77
|
-
}
|
|
78
|
-
else if (args.body instanceof (yield Promise.resolve().then(() => __importStar(require("stream")))).Readable) {
|
|
79
|
-
// @ts-expect-error
|
|
80
|
-
body = args.body;
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
body = maybeStringifyBody(args.body);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
if (args.body instanceof (yield Promise.resolve().then(() => __importStar(require("form-data")))).default) {
|
|
88
|
-
// @ts-expect-error
|
|
89
|
-
body = args.body;
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
body = maybeStringifyBody(args.body);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
const fetchFn = yield getFetchFn();
|
|
96
|
-
const makeRequest = () => __awaiter(this, void 0, void 0, function* () {
|
|
97
|
-
const signals = [];
|
|
98
|
-
// Add timeout signal
|
|
99
|
-
let timeoutAbortId = undefined;
|
|
100
|
-
if (args.timeoutMs != null) {
|
|
101
|
-
const { signal, abortId } = getTimeoutSignal(args.timeoutMs);
|
|
102
|
-
timeoutAbortId = abortId;
|
|
103
|
-
signals.push(signal);
|
|
104
|
-
}
|
|
105
|
-
// Add arbitrary signal
|
|
106
|
-
if (args.abortSignal != null) {
|
|
107
|
-
signals.push(args.abortSignal);
|
|
108
|
-
}
|
|
109
|
-
const response = yield fetchFn(url, {
|
|
110
|
-
method: args.method,
|
|
111
|
-
headers,
|
|
112
|
-
body,
|
|
113
|
-
signal: anySignal(signals),
|
|
114
|
-
credentials: args.withCredentials ? "include" : undefined,
|
|
115
|
-
});
|
|
116
|
-
if (timeoutAbortId != null) {
|
|
117
|
-
clearTimeout(timeoutAbortId);
|
|
118
|
-
}
|
|
119
|
-
return response;
|
|
34
|
+
const url = (0, createRequestUrl_1.createRequestUrl)(args.url, args.queryParameters);
|
|
35
|
+
const requestBody = yield (0, getRequestBody_1.getRequestBody)({
|
|
36
|
+
body: args.body,
|
|
37
|
+
type: args.requestType === "json" ? "json" : "other",
|
|
120
38
|
});
|
|
39
|
+
const fetchFn = yield (0, getFetchFn_1.getFetchFn)();
|
|
121
40
|
try {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
response.status === 429 ||
|
|
127
|
-
response.status >= 500) {
|
|
128
|
-
const delay = Math.min(INITIAL_RETRY_DELAY * Math.pow(i, 2), MAX_RETRY_DELAY);
|
|
129
|
-
yield new Promise((resolve) => setTimeout(resolve, delay));
|
|
130
|
-
response = yield makeRequest();
|
|
131
|
-
}
|
|
132
|
-
else {
|
|
133
|
-
break;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
let body;
|
|
137
|
-
if (response.body != null && args.responseType === "blob") {
|
|
138
|
-
body = yield response.blob();
|
|
139
|
-
}
|
|
140
|
-
else if (response.body != null && args.responseType === "streaming") {
|
|
141
|
-
body = response.body;
|
|
142
|
-
}
|
|
143
|
-
else if (response.body != null && args.responseType === "text") {
|
|
144
|
-
body = yield response.text();
|
|
145
|
-
}
|
|
146
|
-
else {
|
|
147
|
-
const text = yield response.text();
|
|
148
|
-
if (text.length > 0) {
|
|
149
|
-
try {
|
|
150
|
-
body = JSON.parse(text);
|
|
151
|
-
}
|
|
152
|
-
catch (err) {
|
|
153
|
-
return {
|
|
154
|
-
ok: false,
|
|
155
|
-
error: {
|
|
156
|
-
reason: "non-json",
|
|
157
|
-
statusCode: response.status,
|
|
158
|
-
rawBody: text,
|
|
159
|
-
},
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
41
|
+
const response = yield (0, requestWithRetries_1.requestWithRetries)(() => __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
return (0, makeRequest_1.makeRequest)(fetchFn, url, args.method, headers, requestBody, args.timeoutMs, args.abortSignal, args.withCredentials, args.duplex);
|
|
43
|
+
}), args.maxRetries);
|
|
44
|
+
const responseBody = yield (0, getResponseBody_1.getResponseBody)(response, args.responseType);
|
|
164
45
|
if (response.status >= 200 && response.status < 400) {
|
|
165
46
|
return {
|
|
166
47
|
ok: true,
|
|
167
|
-
body:
|
|
48
|
+
body: responseBody,
|
|
168
49
|
headers: response.headers,
|
|
169
50
|
};
|
|
170
51
|
}
|
|
@@ -174,7 +55,7 @@ function fetcherImpl(args) {
|
|
|
174
55
|
error: {
|
|
175
56
|
reason: "status-code",
|
|
176
57
|
statusCode: response.status,
|
|
177
|
-
body,
|
|
58
|
+
body: responseBody,
|
|
178
59
|
},
|
|
179
60
|
};
|
|
180
61
|
}
|
|
@@ -210,60 +91,10 @@ function fetcherImpl(args) {
|
|
|
210
91
|
ok: false,
|
|
211
92
|
error: {
|
|
212
93
|
reason: "unknown",
|
|
213
|
-
errorMessage:
|
|
94
|
+
errorMessage: (0, json_1.toJson)(error),
|
|
214
95
|
},
|
|
215
96
|
};
|
|
216
97
|
}
|
|
217
98
|
});
|
|
218
99
|
}
|
|
219
|
-
const TIMEOUT = "timeout";
|
|
220
|
-
function getTimeoutSignal(timeoutMs) {
|
|
221
|
-
const controller = new AbortController();
|
|
222
|
-
const abortId = setTimeout(() => controller.abort(TIMEOUT), timeoutMs);
|
|
223
|
-
return { signal: controller.signal, abortId };
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* Returns an abort signal that is getting aborted when
|
|
227
|
-
* at least one of the specified abort signals is aborted.
|
|
228
|
-
*
|
|
229
|
-
* Requires at least node.js 18.
|
|
230
|
-
*/
|
|
231
|
-
function anySignal(...args) {
|
|
232
|
-
// Allowing signals to be passed either as array
|
|
233
|
-
// of signals or as multiple arguments.
|
|
234
|
-
const signals = (args.length === 1 && Array.isArray(args[0]) ? args[0] : args);
|
|
235
|
-
const controller = new AbortController();
|
|
236
|
-
for (const signal of signals) {
|
|
237
|
-
if (signal.aborted) {
|
|
238
|
-
// Exiting early if one of the signals
|
|
239
|
-
// is already aborted.
|
|
240
|
-
controller.abort(signal === null || signal === void 0 ? void 0 : signal.reason);
|
|
241
|
-
break;
|
|
242
|
-
}
|
|
243
|
-
// Listening for signals and removing the listeners
|
|
244
|
-
// when at least one symbol is aborted.
|
|
245
|
-
signal.addEventListener("abort", () => controller.abort(signal === null || signal === void 0 ? void 0 : signal.reason), {
|
|
246
|
-
signal: controller.signal,
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
return controller.signal;
|
|
250
|
-
}
|
|
251
|
-
/**
|
|
252
|
-
* Returns a fetch function based on the runtime
|
|
253
|
-
*/
|
|
254
|
-
function getFetchFn() {
|
|
255
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
256
|
-
// In Node.js environments, the SDK always uses`node-fetch`.
|
|
257
|
-
if (runtime_1.RUNTIME.type === "node") {
|
|
258
|
-
return (yield Promise.resolve().then(() => __importStar(require("node-fetch")))).default;
|
|
259
|
-
}
|
|
260
|
-
// Otherwise the SDK uses global fetch if available,
|
|
261
|
-
// and falls back to node-fetch.
|
|
262
|
-
if (typeof fetch == "function") {
|
|
263
|
-
return fetch;
|
|
264
|
-
}
|
|
265
|
-
// Defaults to node `node-fetch` if global fetch isn't available
|
|
266
|
-
return (yield Promise.resolve().then(() => __importStar(require("node-fetch")))).default;
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
100
|
exports.fetcher = fetcherImpl;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createRequestUrl(baseUrl: string, queryParameters?: Record<string, string | string[] | object | object[] | null>): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.createRequestUrl = createRequestUrl;
|
|
7
|
+
const qs_1 = __importDefault(require("qs"));
|
|
8
|
+
function createRequestUrl(baseUrl, queryParameters) {
|
|
9
|
+
return Object.keys(queryParameters !== null && queryParameters !== void 0 ? queryParameters : {}).length > 0
|
|
10
|
+
? `${baseUrl}?${qs_1.default.stringify(queryParameters, { arrayFormat: "repeat" })}`
|
|
11
|
+
: baseUrl;
|
|
12
|
+
}
|