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
|
@@ -15,13 +15,29 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
36
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
24
37
|
};
|
|
25
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.executions = void 0;
|
|
39
|
+
exports.executions = exports.targets = void 0;
|
|
40
|
+
exports.targets = __importStar(require("./targets"));
|
|
27
41
|
exports.executions = __importStar(require("./executions"));
|
|
42
|
+
__exportStar(require("./targets/client/requests"), exports);
|
|
43
|
+
__exportStar(require("./executions/client/requests"), exports);
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../../../environments";
|
|
5
|
+
import * as core from "../../../../../../core";
|
|
6
|
+
import * as Polytomic from "../../../../../index";
|
|
7
|
+
export declare namespace Targets {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.PolytomicEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
12
|
+
token: core.Supplier<core.BearerToken>;
|
|
13
|
+
/** Override the X-Polytomic-Version header */
|
|
14
|
+
version?: core.Supplier<string | undefined>;
|
|
15
|
+
}
|
|
16
|
+
interface RequestOptions {
|
|
17
|
+
/** The maximum time to wait for a response in seconds. */
|
|
18
|
+
timeoutInSeconds?: number;
|
|
19
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
20
|
+
maxRetries?: number;
|
|
21
|
+
/** A hook to abort the request. */
|
|
22
|
+
abortSignal?: AbortSignal;
|
|
23
|
+
/** Override the X-Polytomic-Version header */
|
|
24
|
+
version?: string | undefined;
|
|
25
|
+
/** Additional headers to include in the request. */
|
|
26
|
+
headers?: Record<string, string>;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export declare class Targets {
|
|
30
|
+
protected readonly _options: Targets.Options;
|
|
31
|
+
constructor(_options: Targets.Options);
|
|
32
|
+
/**
|
|
33
|
+
* @param {string} id
|
|
34
|
+
* @param {Polytomic.modelSync.TargetsGetTargetRequest} request
|
|
35
|
+
* @param {Targets.RequestOptions} requestOptions - Request-specific configuration.
|
|
36
|
+
*
|
|
37
|
+
* @throws {@link Polytomic.BadRequestError}
|
|
38
|
+
* @throws {@link Polytomic.UnauthorizedError}
|
|
39
|
+
* @throws {@link Polytomic.ForbiddenError}
|
|
40
|
+
* @throws {@link Polytomic.NotFoundError}
|
|
41
|
+
* @throws {@link Polytomic.InternalServerError}
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* await client.modelSync.targets.getTarget("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
45
|
+
*/
|
|
46
|
+
getTarget(id: string, request?: Polytomic.modelSync.TargetsGetTargetRequest, requestOptions?: Targets.RequestOptions): Promise<Polytomic.GetConnectionMetaEnvelope>;
|
|
47
|
+
/**
|
|
48
|
+
* @param {string} id
|
|
49
|
+
* @param {Polytomic.modelSync.TargetsGetTargetFieldsRequest} request
|
|
50
|
+
* @param {Targets.RequestOptions} requestOptions - Request-specific configuration.
|
|
51
|
+
*
|
|
52
|
+
* @throws {@link Polytomic.UnauthorizedError}
|
|
53
|
+
* @throws {@link Polytomic.ForbiddenError}
|
|
54
|
+
* @throws {@link Polytomic.NotFoundError}
|
|
55
|
+
* @throws {@link Polytomic.InternalServerError}
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* await client.modelSync.targets.getTargetFields("248df4b7-aa70-47b8-a036-33ac447e668d", {
|
|
59
|
+
* target: "database.table",
|
|
60
|
+
* refresh: false
|
|
61
|
+
* })
|
|
62
|
+
*/
|
|
63
|
+
getTargetFields(id: string, request: Polytomic.modelSync.TargetsGetTargetFieldsRequest, requestOptions?: Targets.RequestOptions): Promise<Polytomic.TargetResponseEnvelope>;
|
|
64
|
+
/**
|
|
65
|
+
* Returns available model sync destinations for a connection.
|
|
66
|
+
*
|
|
67
|
+
* If the connection supports creating new destinations, the `target_creation`
|
|
68
|
+
* object will contain information on what properties are required to create the
|
|
69
|
+
* target.
|
|
70
|
+
*
|
|
71
|
+
* Target creation properties are all string values; the `enum` flag indicates if
|
|
72
|
+
* the property has a fixed set of valid values. When `enum` is `true`, the [Target
|
|
73
|
+
* Creation Property
|
|
74
|
+
* Values](https://apidocs.polytomic.com/2024-02-08/api-reference/model-sync/targets/get-create-property)
|
|
75
|
+
* endpoint can be used to retrieve the valid values.
|
|
76
|
+
*
|
|
77
|
+
* ## Sync modes
|
|
78
|
+
*
|
|
79
|
+
* The sync mode determines which records are written to the destination for a
|
|
80
|
+
* model sync. The `modes` array for a target object defines the `id` along with
|
|
81
|
+
* what operations the mode supports.
|
|
82
|
+
*
|
|
83
|
+
* @param {string} id
|
|
84
|
+
* @param {Targets.RequestOptions} requestOptions - Request-specific configuration.
|
|
85
|
+
*
|
|
86
|
+
* @throws {@link Polytomic.BadRequestError}
|
|
87
|
+
* @throws {@link Polytomic.UnauthorizedError}
|
|
88
|
+
* @throws {@link Polytomic.ForbiddenError}
|
|
89
|
+
* @throws {@link Polytomic.NotFoundError}
|
|
90
|
+
* @throws {@link Polytomic.InternalServerError}
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* await client.modelSync.targets.list("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
94
|
+
*/
|
|
95
|
+
list(id: string, requestOptions?: Targets.RequestOptions): Promise<Polytomic.V4TargetObjectsResponseEnvelope>;
|
|
96
|
+
/**
|
|
97
|
+
* Connections which support creating new sync target objects (destinations) will
|
|
98
|
+
* return `target_creation` with their [target object list](./list). This endpoint
|
|
99
|
+
* will return possible values for properties where `enum` is `true`.
|
|
100
|
+
*
|
|
101
|
+
* If the connection does not support creating new target objects, an HTTP 404 will
|
|
102
|
+
* be returned.
|
|
103
|
+
*
|
|
104
|
+
* The `values` array lists the valid options (and labels) for the property. Each
|
|
105
|
+
* member of the `values` array has a `label` and `value`. For exaample,
|
|
106
|
+
*
|
|
107
|
+
* ```json
|
|
108
|
+
* {
|
|
109
|
+
* "data": [
|
|
110
|
+
* {
|
|
111
|
+
* "id": "account",
|
|
112
|
+
* "title": "Account ID",
|
|
113
|
+
* "enum": true,
|
|
114
|
+
* "values": [
|
|
115
|
+
* {
|
|
116
|
+
* "value": "1234567::urn:li:organization:987654",
|
|
117
|
+
* "label": "Polytomic Inc. (1234567)"
|
|
118
|
+
* }
|
|
119
|
+
* ]
|
|
120
|
+
* }
|
|
121
|
+
* ]
|
|
122
|
+
* }
|
|
123
|
+
* ```
|
|
124
|
+
*
|
|
125
|
+
* The `value` for the selected option should be passed when [creating a
|
|
126
|
+
* sync](https://apidocs.polytomic.com/2024-02-08/api-reference/model-sync/create).
|
|
127
|
+
*
|
|
128
|
+
* @param {string} id
|
|
129
|
+
* @param {string} property
|
|
130
|
+
* @param {Targets.RequestOptions} requestOptions - Request-specific configuration.
|
|
131
|
+
*
|
|
132
|
+
* @throws {@link Polytomic.BadRequestError}
|
|
133
|
+
* @throws {@link Polytomic.UnauthorizedError}
|
|
134
|
+
* @throws {@link Polytomic.ForbiddenError}
|
|
135
|
+
* @throws {@link Polytomic.NotFoundError}
|
|
136
|
+
* @throws {@link Polytomic.InternalServerError}
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* await client.modelSync.targets.getCreateProperty("248df4b7-aa70-47b8-a036-33ac447e668d", "property")
|
|
140
|
+
*/
|
|
141
|
+
getCreateProperty(id: string, property: string, requestOptions?: Targets.RequestOptions): Promise<Polytomic.V4TargetPropertyValuesEnvelope>;
|
|
142
|
+
protected _getAuthorizationHeader(): Promise<string>;
|
|
143
|
+
}
|
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
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
|
+
})();
|
|
38
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
39
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
40
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
41
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
42
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
43
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
44
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
48
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
|
+
};
|
|
50
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
+
exports.Targets = void 0;
|
|
52
|
+
const environments = __importStar(require("../../../../../../environments"));
|
|
53
|
+
const core = __importStar(require("../../../../../../core"));
|
|
54
|
+
const Polytomic = __importStar(require("../../../../../index"));
|
|
55
|
+
const url_join_1 = __importDefault(require("url-join"));
|
|
56
|
+
const errors = __importStar(require("../../../../../../errors/index"));
|
|
57
|
+
class Targets {
|
|
58
|
+
constructor(_options) {
|
|
59
|
+
this._options = _options;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* @param {string} id
|
|
63
|
+
* @param {Polytomic.modelSync.TargetsGetTargetRequest} request
|
|
64
|
+
* @param {Targets.RequestOptions} requestOptions - Request-specific configuration.
|
|
65
|
+
*
|
|
66
|
+
* @throws {@link Polytomic.BadRequestError}
|
|
67
|
+
* @throws {@link Polytomic.UnauthorizedError}
|
|
68
|
+
* @throws {@link Polytomic.ForbiddenError}
|
|
69
|
+
* @throws {@link Polytomic.NotFoundError}
|
|
70
|
+
* @throws {@link Polytomic.InternalServerError}
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* await client.modelSync.targets.getTarget("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
74
|
+
*/
|
|
75
|
+
getTarget(id_1) {
|
|
76
|
+
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
|
77
|
+
var _a, _b;
|
|
78
|
+
const { type: type_, search } = request;
|
|
79
|
+
const _queryParams = {};
|
|
80
|
+
if (type_ != null) {
|
|
81
|
+
_queryParams["type"] = type_;
|
|
82
|
+
}
|
|
83
|
+
if (search != null) {
|
|
84
|
+
_queryParams["search"] = search;
|
|
85
|
+
}
|
|
86
|
+
const _response = yield core.fetcher({
|
|
87
|
+
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)}/modelsync/target`),
|
|
88
|
+
method: "GET",
|
|
89
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
90
|
+
? yield core.Supplier.get(this._options.version)
|
|
91
|
+
: 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),
|
|
92
|
+
contentType: "application/json",
|
|
93
|
+
queryParameters: _queryParams,
|
|
94
|
+
requestType: "json",
|
|
95
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
96
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
97
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
98
|
+
});
|
|
99
|
+
if (_response.ok) {
|
|
100
|
+
return _response.body;
|
|
101
|
+
}
|
|
102
|
+
if (_response.error.reason === "status-code") {
|
|
103
|
+
switch (_response.error.statusCode) {
|
|
104
|
+
case 400:
|
|
105
|
+
throw new Polytomic.BadRequestError(_response.error.body);
|
|
106
|
+
case 401:
|
|
107
|
+
throw new Polytomic.UnauthorizedError(_response.error.body);
|
|
108
|
+
case 403:
|
|
109
|
+
throw new Polytomic.ForbiddenError(_response.error.body);
|
|
110
|
+
case 404:
|
|
111
|
+
throw new Polytomic.NotFoundError(_response.error.body);
|
|
112
|
+
case 500:
|
|
113
|
+
throw new Polytomic.InternalServerError(_response.error.body);
|
|
114
|
+
default:
|
|
115
|
+
throw new errors.PolytomicError({
|
|
116
|
+
statusCode: _response.error.statusCode,
|
|
117
|
+
body: _response.error.body,
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
switch (_response.error.reason) {
|
|
122
|
+
case "non-json":
|
|
123
|
+
throw new errors.PolytomicError({
|
|
124
|
+
statusCode: _response.error.statusCode,
|
|
125
|
+
body: _response.error.rawBody,
|
|
126
|
+
});
|
|
127
|
+
case "timeout":
|
|
128
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/connections/{id}/modelsync/target.");
|
|
129
|
+
case "unknown":
|
|
130
|
+
throw new errors.PolytomicError({
|
|
131
|
+
message: _response.error.errorMessage,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* @param {string} id
|
|
138
|
+
* @param {Polytomic.modelSync.TargetsGetTargetFieldsRequest} request
|
|
139
|
+
* @param {Targets.RequestOptions} requestOptions - Request-specific configuration.
|
|
140
|
+
*
|
|
141
|
+
* @throws {@link Polytomic.UnauthorizedError}
|
|
142
|
+
* @throws {@link Polytomic.ForbiddenError}
|
|
143
|
+
* @throws {@link Polytomic.NotFoundError}
|
|
144
|
+
* @throws {@link Polytomic.InternalServerError}
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* await client.modelSync.targets.getTargetFields("248df4b7-aa70-47b8-a036-33ac447e668d", {
|
|
148
|
+
* target: "database.table",
|
|
149
|
+
* refresh: false
|
|
150
|
+
* })
|
|
151
|
+
*/
|
|
152
|
+
getTargetFields(id, request, requestOptions) {
|
|
153
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
154
|
+
var _a, _b;
|
|
155
|
+
const { target, refresh } = request;
|
|
156
|
+
const _queryParams = {};
|
|
157
|
+
_queryParams["target"] = target;
|
|
158
|
+
if (refresh != null) {
|
|
159
|
+
_queryParams["refresh"] = refresh.toString();
|
|
160
|
+
}
|
|
161
|
+
const _response = yield core.fetcher({
|
|
162
|
+
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)}/modelsync/target/fields`),
|
|
163
|
+
method: "GET",
|
|
164
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
165
|
+
? yield core.Supplier.get(this._options.version)
|
|
166
|
+
: 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),
|
|
167
|
+
contentType: "application/json",
|
|
168
|
+
queryParameters: _queryParams,
|
|
169
|
+
requestType: "json",
|
|
170
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
171
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
172
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
173
|
+
});
|
|
174
|
+
if (_response.ok) {
|
|
175
|
+
return _response.body;
|
|
176
|
+
}
|
|
177
|
+
if (_response.error.reason === "status-code") {
|
|
178
|
+
switch (_response.error.statusCode) {
|
|
179
|
+
case 401:
|
|
180
|
+
throw new Polytomic.UnauthorizedError(_response.error.body);
|
|
181
|
+
case 403:
|
|
182
|
+
throw new Polytomic.ForbiddenError(_response.error.body);
|
|
183
|
+
case 404:
|
|
184
|
+
throw new Polytomic.NotFoundError(_response.error.body);
|
|
185
|
+
case 500:
|
|
186
|
+
throw new Polytomic.InternalServerError(_response.error.body);
|
|
187
|
+
default:
|
|
188
|
+
throw new errors.PolytomicError({
|
|
189
|
+
statusCode: _response.error.statusCode,
|
|
190
|
+
body: _response.error.body,
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
switch (_response.error.reason) {
|
|
195
|
+
case "non-json":
|
|
196
|
+
throw new errors.PolytomicError({
|
|
197
|
+
statusCode: _response.error.statusCode,
|
|
198
|
+
body: _response.error.rawBody,
|
|
199
|
+
});
|
|
200
|
+
case "timeout":
|
|
201
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/connections/{id}/modelsync/target/fields.");
|
|
202
|
+
case "unknown":
|
|
203
|
+
throw new errors.PolytomicError({
|
|
204
|
+
message: _response.error.errorMessage,
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Returns available model sync destinations for a connection.
|
|
211
|
+
*
|
|
212
|
+
* If the connection supports creating new destinations, the `target_creation`
|
|
213
|
+
* object will contain information on what properties are required to create the
|
|
214
|
+
* target.
|
|
215
|
+
*
|
|
216
|
+
* Target creation properties are all string values; the `enum` flag indicates if
|
|
217
|
+
* the property has a fixed set of valid values. When `enum` is `true`, the [Target
|
|
218
|
+
* Creation Property
|
|
219
|
+
* Values](https://apidocs.polytomic.com/2024-02-08/api-reference/model-sync/targets/get-create-property)
|
|
220
|
+
* endpoint can be used to retrieve the valid values.
|
|
221
|
+
*
|
|
222
|
+
* ## Sync modes
|
|
223
|
+
*
|
|
224
|
+
* The sync mode determines which records are written to the destination for a
|
|
225
|
+
* model sync. The `modes` array for a target object defines the `id` along with
|
|
226
|
+
* what operations the mode supports.
|
|
227
|
+
*
|
|
228
|
+
* @param {string} id
|
|
229
|
+
* @param {Targets.RequestOptions} requestOptions - Request-specific configuration.
|
|
230
|
+
*
|
|
231
|
+
* @throws {@link Polytomic.BadRequestError}
|
|
232
|
+
* @throws {@link Polytomic.UnauthorizedError}
|
|
233
|
+
* @throws {@link Polytomic.ForbiddenError}
|
|
234
|
+
* @throws {@link Polytomic.NotFoundError}
|
|
235
|
+
* @throws {@link Polytomic.InternalServerError}
|
|
236
|
+
*
|
|
237
|
+
* @example
|
|
238
|
+
* await client.modelSync.targets.list("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
239
|
+
*/
|
|
240
|
+
list(id, requestOptions) {
|
|
241
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
242
|
+
var _a, _b;
|
|
243
|
+
const _response = yield core.fetcher({
|
|
244
|
+
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)}/modelsync/targetobjects`),
|
|
245
|
+
method: "GET",
|
|
246
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
247
|
+
? yield core.Supplier.get(this._options.version)
|
|
248
|
+
: 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),
|
|
249
|
+
contentType: "application/json",
|
|
250
|
+
requestType: "json",
|
|
251
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
252
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
253
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
254
|
+
});
|
|
255
|
+
if (_response.ok) {
|
|
256
|
+
return _response.body;
|
|
257
|
+
}
|
|
258
|
+
if (_response.error.reason === "status-code") {
|
|
259
|
+
switch (_response.error.statusCode) {
|
|
260
|
+
case 400:
|
|
261
|
+
throw new Polytomic.BadRequestError(_response.error.body);
|
|
262
|
+
case 401:
|
|
263
|
+
throw new Polytomic.UnauthorizedError(_response.error.body);
|
|
264
|
+
case 403:
|
|
265
|
+
throw new Polytomic.ForbiddenError(_response.error.body);
|
|
266
|
+
case 404:
|
|
267
|
+
throw new Polytomic.NotFoundError(_response.error.body);
|
|
268
|
+
case 500:
|
|
269
|
+
throw new Polytomic.InternalServerError(_response.error.body);
|
|
270
|
+
default:
|
|
271
|
+
throw new errors.PolytomicError({
|
|
272
|
+
statusCode: _response.error.statusCode,
|
|
273
|
+
body: _response.error.body,
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
switch (_response.error.reason) {
|
|
278
|
+
case "non-json":
|
|
279
|
+
throw new errors.PolytomicError({
|
|
280
|
+
statusCode: _response.error.statusCode,
|
|
281
|
+
body: _response.error.rawBody,
|
|
282
|
+
});
|
|
283
|
+
case "timeout":
|
|
284
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/connections/{id}/modelsync/targetobjects.");
|
|
285
|
+
case "unknown":
|
|
286
|
+
throw new errors.PolytomicError({
|
|
287
|
+
message: _response.error.errorMessage,
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Connections which support creating new sync target objects (destinations) will
|
|
294
|
+
* return `target_creation` with their [target object list](./list). This endpoint
|
|
295
|
+
* will return possible values for properties where `enum` is `true`.
|
|
296
|
+
*
|
|
297
|
+
* If the connection does not support creating new target objects, an HTTP 404 will
|
|
298
|
+
* be returned.
|
|
299
|
+
*
|
|
300
|
+
* The `values` array lists the valid options (and labels) for the property. Each
|
|
301
|
+
* member of the `values` array has a `label` and `value`. For exaample,
|
|
302
|
+
*
|
|
303
|
+
* ```json
|
|
304
|
+
* {
|
|
305
|
+
* "data": [
|
|
306
|
+
* {
|
|
307
|
+
* "id": "account",
|
|
308
|
+
* "title": "Account ID",
|
|
309
|
+
* "enum": true,
|
|
310
|
+
* "values": [
|
|
311
|
+
* {
|
|
312
|
+
* "value": "1234567::urn:li:organization:987654",
|
|
313
|
+
* "label": "Polytomic Inc. (1234567)"
|
|
314
|
+
* }
|
|
315
|
+
* ]
|
|
316
|
+
* }
|
|
317
|
+
* ]
|
|
318
|
+
* }
|
|
319
|
+
* ```
|
|
320
|
+
*
|
|
321
|
+
* The `value` for the selected option should be passed when [creating a
|
|
322
|
+
* sync](https://apidocs.polytomic.com/2024-02-08/api-reference/model-sync/create).
|
|
323
|
+
*
|
|
324
|
+
* @param {string} id
|
|
325
|
+
* @param {string} property
|
|
326
|
+
* @param {Targets.RequestOptions} requestOptions - Request-specific configuration.
|
|
327
|
+
*
|
|
328
|
+
* @throws {@link Polytomic.BadRequestError}
|
|
329
|
+
* @throws {@link Polytomic.UnauthorizedError}
|
|
330
|
+
* @throws {@link Polytomic.ForbiddenError}
|
|
331
|
+
* @throws {@link Polytomic.NotFoundError}
|
|
332
|
+
* @throws {@link Polytomic.InternalServerError}
|
|
333
|
+
*
|
|
334
|
+
* @example
|
|
335
|
+
* await client.modelSync.targets.getCreateProperty("248df4b7-aa70-47b8-a036-33ac447e668d", "property")
|
|
336
|
+
*/
|
|
337
|
+
getCreateProperty(id, property, requestOptions) {
|
|
338
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
339
|
+
var _a, _b;
|
|
340
|
+
const _response = yield core.fetcher({
|
|
341
|
+
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)}/modelsync/targetobjects/properties/${encodeURIComponent(property)}`),
|
|
342
|
+
method: "GET",
|
|
343
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
344
|
+
? yield core.Supplier.get(this._options.version)
|
|
345
|
+
: 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),
|
|
346
|
+
contentType: "application/json",
|
|
347
|
+
requestType: "json",
|
|
348
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
349
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
350
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
351
|
+
});
|
|
352
|
+
if (_response.ok) {
|
|
353
|
+
return _response.body;
|
|
354
|
+
}
|
|
355
|
+
if (_response.error.reason === "status-code") {
|
|
356
|
+
switch (_response.error.statusCode) {
|
|
357
|
+
case 400:
|
|
358
|
+
throw new Polytomic.BadRequestError(_response.error.body);
|
|
359
|
+
case 401:
|
|
360
|
+
throw new Polytomic.UnauthorizedError(_response.error.body);
|
|
361
|
+
case 403:
|
|
362
|
+
throw new Polytomic.ForbiddenError(_response.error.body);
|
|
363
|
+
case 404:
|
|
364
|
+
throw new Polytomic.NotFoundError(_response.error.body);
|
|
365
|
+
case 500:
|
|
366
|
+
throw new Polytomic.InternalServerError(_response.error.body);
|
|
367
|
+
default:
|
|
368
|
+
throw new errors.PolytomicError({
|
|
369
|
+
statusCode: _response.error.statusCode,
|
|
370
|
+
body: _response.error.body,
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
switch (_response.error.reason) {
|
|
375
|
+
case "non-json":
|
|
376
|
+
throw new errors.PolytomicError({
|
|
377
|
+
statusCode: _response.error.statusCode,
|
|
378
|
+
body: _response.error.rawBody,
|
|
379
|
+
});
|
|
380
|
+
case "timeout":
|
|
381
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/connections/{id}/modelsync/targetobjects/properties/{property}.");
|
|
382
|
+
case "unknown":
|
|
383
|
+
throw new errors.PolytomicError({
|
|
384
|
+
message: _response.error.errorMessage,
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
_getAuthorizationHeader() {
|
|
390
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
391
|
+
return `Bearer ${yield core.Supplier.get(this._options.token)}`;
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
exports.Targets = Targets;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests";
|
|
@@ -0,0 +1,17 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client";
|
|
@@ -0,0 +1,17 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client"), exports);
|