polytomic 25.9.2 → 25.9.4
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/BaseClient.d.ts +15 -0
- package/BaseClient.js +17 -2
- package/Client.d.ts +9 -0
- package/Client.js +37 -22
- package/api/errors/BadGatewayError.d.ts +1 -0
- package/api/errors/BadGatewayError.js +1 -1
- package/api/errors/BadRequestError.d.ts +1 -0
- package/api/errors/BadRequestError.js +1 -1
- package/api/errors/ConflictError.d.ts +1 -0
- package/api/errors/ConflictError.js +1 -1
- package/api/errors/ForbiddenError.d.ts +1 -0
- package/api/errors/ForbiddenError.js +1 -1
- package/api/errors/GatewayTimeoutError.d.ts +1 -0
- package/api/errors/GatewayTimeoutError.js +1 -1
- package/api/errors/InternalServerError.d.ts +1 -0
- package/api/errors/InternalServerError.js +1 -1
- package/api/errors/NotFoundError.d.ts +1 -0
- package/api/errors/NotFoundError.js +1 -1
- package/api/errors/RequestTimeoutError.d.ts +1 -0
- package/api/errors/RequestTimeoutError.js +1 -1
- package/api/errors/ServiceUnavailableError.d.ts +7 -0
- package/api/errors/ServiceUnavailableError.js +54 -0
- package/api/errors/TooManyRequestsError.d.ts +1 -0
- package/api/errors/TooManyRequestsError.js +1 -1
- package/api/errors/UnauthorizedError.d.ts +1 -0
- package/api/errors/UnauthorizedError.js +1 -1
- package/api/errors/UnprocessableEntityError.d.ts +1 -0
- package/api/errors/UnprocessableEntityError.js +1 -1
- package/api/errors/index.d.ts +1 -0
- package/api/errors/index.js +1 -0
- package/api/resources/bulkSync/client/Client.d.ts +25 -0
- package/api/resources/bulkSync/client/Client.js +38 -10
- package/api/resources/bulkSync/client/requests/StartBulkSyncRequest.d.ts +1 -1
- package/api/resources/bulkSync/resources/errorHandling/client/Client.d.ts +51 -0
- package/api/resources/bulkSync/resources/errorHandling/client/Client.js +190 -0
- package/api/resources/bulkSync/resources/errorHandling/client/index.d.ts +1 -0
- package/api/resources/bulkSync/resources/errorHandling/client/index.js +17 -0
- package/api/resources/bulkSync/resources/errorHandling/client/requests/UpdateBulkSyncErrorHandlingRequest.d.ts +8 -0
- package/api/resources/bulkSync/resources/errorHandling/client/requests/index.d.ts +1 -0
- package/api/resources/bulkSync/resources/errorHandling/client/requests/index.js +2 -0
- package/api/resources/bulkSync/resources/errorHandling/exports.d.ts +2 -0
- package/api/resources/bulkSync/resources/errorHandling/exports.js +21 -0
- package/api/resources/bulkSync/resources/errorHandling/index.d.ts +1 -0
- package/api/resources/bulkSync/resources/errorHandling/index.js +17 -0
- package/api/resources/bulkSync/resources/executions/client/Client.d.ts +41 -2
- package/api/resources/bulkSync/resources/executions/client/Client.js +97 -2
- package/api/resources/bulkSync/resources/executions/client/requests/ExecutionsGetIngestConsoleLogsRequest.d.ts +16 -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 +3 -1
- package/api/resources/bulkSync/resources/schedules/client/Client.d.ts +10 -0
- package/api/resources/bulkSync/resources/schedules/client/Client.js +13 -2
- package/api/resources/bulkSync/resources/schemas/client/Client.d.ts +10 -0
- package/api/resources/bulkSync/resources/schemas/client/Client.js +13 -2
- package/api/resources/bulkSync/resources/schemas/client/requests/SchemasListRequest.d.ts +1 -1
- package/api/resources/connections/client/Client.d.ts +73 -136
- package/api/resources/connections/client/Client.js +131 -350
- package/api/resources/connections/client/requests/ConnectCardRequest.d.ts +4 -0
- package/api/resources/connections/client/requests/index.d.ts +0 -2
- package/api/resources/connections/exports.d.ts +1 -0
- package/api/resources/connections/exports.js +1 -0
- package/api/resources/connections/index.d.ts +1 -0
- package/api/resources/connections/index.js +1 -0
- package/api/resources/connections/resources/index.d.ts +4 -0
- package/api/resources/connections/resources/index.js +43 -0
- package/api/resources/connections/resources/proxy/client/Client.d.ts +161 -0
- package/api/resources/connections/resources/proxy/client/Client.js +408 -0
- package/api/resources/connections/resources/proxy/client/index.d.ts +1 -0
- package/api/resources/connections/resources/proxy/client/index.js +17 -0
- package/api/resources/connections/{client → resources/proxy/client}/requests/ExecuteConnectionProxyRequest.d.ts +3 -1
- package/api/resources/connections/resources/proxy/client/requests/UpdateConnectionProxySettingsRequest.d.ts +10 -0
- package/api/resources/connections/resources/proxy/client/requests/index.d.ts +2 -0
- package/api/resources/connections/resources/proxy/client/requests/index.js +2 -0
- package/api/resources/connections/resources/proxy/exports.d.ts +2 -0
- package/api/resources/connections/resources/proxy/exports.js +21 -0
- package/api/resources/connections/resources/proxy/index.d.ts +1 -0
- package/api/resources/connections/resources/proxy/index.js +17 -0
- package/api/resources/connections/resources/sharedConnections/client/Client.d.ts +89 -0
- package/api/resources/connections/resources/sharedConnections/client/Client.js +274 -0
- package/api/resources/connections/resources/sharedConnections/client/index.d.ts +1 -0
- package/api/resources/connections/resources/sharedConnections/client/index.js +17 -0
- package/api/resources/connections/resources/sharedConnections/client/requests/index.d.ts +1 -0
- package/api/resources/connections/resources/sharedConnections/client/requests/index.js +2 -0
- package/api/resources/connections/resources/sharedConnections/exports.d.ts +2 -0
- package/api/resources/connections/resources/sharedConnections/exports.js +21 -0
- package/api/resources/connections/resources/sharedConnections/index.d.ts +1 -0
- package/api/resources/connections/resources/sharedConnections/index.js +17 -0
- package/api/resources/entities/client/Client.d.ts +15 -2
- package/api/resources/entities/client/Client.js +15 -2
- package/api/resources/events/client/Client.d.ts +5 -0
- package/api/resources/events/client/Client.js +5 -0
- package/api/resources/harbors/client/Client.d.ts +789 -0
- package/api/resources/harbors/client/Client.js +2362 -0
- package/api/resources/harbors/client/index.d.ts +1 -0
- package/api/resources/harbors/client/index.js +17 -0
- package/api/resources/harbors/client/requests/CreateHarborContextDraftRequest.d.ts +17 -0
- package/api/resources/harbors/client/requests/CreateHarborContextRequest.d.ts +15 -0
- package/api/resources/harbors/client/requests/CreateHarborRequest.d.ts +19 -0
- package/api/resources/harbors/client/requests/HarborsCloseSessionRequest.d.ts +12 -0
- package/api/resources/harbors/client/requests/HarborsCloseSessionRequest.js +3 -0
- package/api/resources/harbors/client/requests/HarborsDeleteContextDraftRequest.d.ts +8 -0
- package/api/resources/harbors/client/requests/HarborsDeleteContextDraftRequest.js +3 -0
- package/api/resources/harbors/client/requests/HarborsDeleteContextRequest.d.ts +8 -0
- package/api/resources/harbors/client/requests/HarborsDeleteContextRequest.js +3 -0
- package/api/resources/harbors/client/requests/HarborsGetAuthorizedSchemaRequest.d.ts +8 -0
- package/api/resources/harbors/client/requests/HarborsGetAuthorizedSchemaRequest.js +3 -0
- package/api/resources/harbors/client/requests/HarborsGetContextDraftRequest.d.ts +8 -0
- package/api/resources/harbors/client/requests/HarborsGetContextDraftRequest.js +3 -0
- package/api/resources/harbors/client/requests/HarborsGetContextRequest.d.ts +8 -0
- package/api/resources/harbors/client/requests/HarborsGetContextRequest.js +3 -0
- package/api/resources/harbors/client/requests/HarborsGetContextVersionRequest.d.ts +8 -0
- package/api/resources/harbors/client/requests/HarborsGetContextVersionRequest.js +3 -0
- package/api/resources/harbors/client/requests/HarborsListAuthorizedConnectionsRequest.d.ts +13 -0
- package/api/resources/harbors/client/requests/HarborsListAuthorizedConnectionsRequest.js +3 -0
- package/api/resources/harbors/client/requests/HarborsListAuthorizedSchemasRequest.d.ts +13 -0
- package/api/resources/harbors/client/requests/HarborsListAuthorizedSchemasRequest.js +3 -0
- package/api/resources/harbors/client/requests/HarborsListContextDraftsRequest.d.ts +13 -0
- package/api/resources/harbors/client/requests/HarborsListContextDraftsRequest.js +3 -0
- package/api/resources/harbors/client/requests/HarborsListContextVersionsRequest.d.ts +15 -0
- package/api/resources/harbors/client/requests/HarborsListContextVersionsRequest.js +3 -0
- package/api/resources/harbors/client/requests/HarborsListContextsRequest.d.ts +15 -0
- package/api/resources/harbors/client/requests/HarborsListContextsRequest.js +3 -0
- package/api/resources/harbors/client/requests/HarborsListKeysRequest.d.ts +13 -0
- package/api/resources/harbors/client/requests/HarborsListKeysRequest.js +3 -0
- package/api/resources/harbors/client/requests/HarborsListRequest.d.ts +13 -0
- package/api/resources/harbors/client/requests/HarborsListRequest.js +3 -0
- package/api/resources/harbors/client/requests/HarborsListUsersRequest.d.ts +13 -0
- package/api/resources/harbors/client/requests/HarborsListUsersRequest.js +3 -0
- package/api/resources/harbors/client/requests/HarborsPromoteContextDraftRequest.d.ts +8 -0
- package/api/resources/harbors/client/requests/HarborsPromoteContextDraftRequest.js +3 -0
- package/api/resources/harbors/client/requests/InviteHarborUserRequest.d.ts +10 -0
- package/api/resources/harbors/client/requests/InviteHarborUserRequest.js +3 -0
- package/api/resources/harbors/client/requests/RegisterHarborSessionRequest.d.ts +17 -0
- package/api/resources/harbors/client/requests/RegisterHarborSessionRequest.js +3 -0
- package/api/resources/harbors/client/requests/ResolveHarborSourceMappingsRequest.d.ts +9 -0
- package/api/resources/harbors/client/requests/ResolveHarborSourceMappingsRequest.js +3 -0
- package/api/resources/harbors/client/requests/SaveHarborContextDraftRequest.d.ts +19 -0
- package/api/resources/harbors/client/requests/SaveHarborContextDraftRequest.js +3 -0
- package/api/resources/harbors/client/requests/SaveHarborContextRequest.d.ts +19 -0
- package/api/resources/harbors/client/requests/SaveHarborContextRequest.js +3 -0
- package/api/resources/harbors/client/requests/UpdateHarborRequest.d.ts +12 -0
- package/api/resources/harbors/client/requests/UpdateHarborRequest.js +3 -0
- package/api/resources/harbors/client/requests/index.d.ts +25 -0
- package/api/resources/harbors/client/requests/index.js +2 -0
- package/api/resources/harbors/exports.d.ts +2 -0
- package/api/resources/harbors/exports.js +21 -0
- package/api/resources/harbors/index.d.ts +1 -0
- package/api/resources/harbors/index.js +17 -0
- package/api/resources/identity/client/Client.d.ts +2 -0
- package/api/resources/identity/client/Client.js +2 -0
- package/api/resources/index.d.ts +6 -0
- package/api/resources/index.js +7 -1
- package/api/resources/jobs/client/Client.d.ts +3 -1
- package/api/resources/jobs/client/Client.js +3 -1
- package/api/resources/modelSync/client/Client.d.ts +34 -5
- package/api/resources/modelSync/client/Client.js +58 -13
- package/api/resources/modelSync/client/requests/{CreateSyncRequest.d.ts → CreateModelSyncV5Request.d.ts} +8 -6
- package/api/resources/modelSync/client/requests/CreateModelSyncV5Request.js +3 -0
- package/api/resources/modelSync/client/requests/ModelSyncGetSourceFieldsRequest.d.ts +1 -1
- package/api/resources/modelSync/client/requests/ModelSyncGetSourceRequest.d.ts +1 -1
- package/api/resources/modelSync/client/requests/{UpdateSyncRequest.d.ts → UpdateModelSyncV5Request.d.ts} +8 -6
- package/api/resources/modelSync/client/requests/UpdateModelSyncV5Request.js +3 -0
- package/api/resources/modelSync/client/requests/index.d.ts +2 -2
- package/api/resources/modelSync/resources/errorHandling/client/Client.d.ts +51 -0
- package/api/resources/modelSync/resources/errorHandling/client/Client.js +184 -0
- package/api/resources/modelSync/resources/errorHandling/client/index.d.ts +1 -0
- package/api/resources/modelSync/resources/errorHandling/client/index.js +17 -0
- package/api/resources/modelSync/resources/errorHandling/client/requests/UpdateSyncErrorHandlingRequest.d.ts +14 -0
- package/api/resources/modelSync/resources/errorHandling/client/requests/UpdateSyncErrorHandlingRequest.js +3 -0
- package/api/resources/modelSync/resources/errorHandling/client/requests/index.d.ts +1 -0
- package/api/resources/modelSync/resources/errorHandling/client/requests/index.js +2 -0
- package/api/resources/modelSync/resources/errorHandling/exports.d.ts +2 -0
- package/api/resources/modelSync/resources/errorHandling/exports.js +21 -0
- package/api/resources/modelSync/resources/errorHandling/index.d.ts +1 -0
- package/api/resources/modelSync/resources/errorHandling/index.js +17 -0
- package/api/resources/modelSync/resources/executions/client/Client.d.ts +35 -4
- package/api/resources/modelSync/resources/executions/client/Client.js +74 -4
- package/api/resources/modelSync/resources/index.d.ts +2 -0
- package/api/resources/modelSync/resources/index.js +3 -1
- package/api/resources/modelSync/resources/targets/client/Client.d.ts +46 -5
- package/api/resources/modelSync/resources/targets/client/Client.js +65 -12
- package/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetFieldsRequest.d.ts +5 -3
- package/api/resources/modelSync/resources/targets/client/requests/TargetsListRequest.d.ts +10 -0
- package/api/resources/modelSync/resources/targets/client/requests/TargetsListRequest.js +3 -0
- package/api/resources/modelSync/resources/targets/client/requests/index.d.ts +1 -0
- package/api/resources/models/client/Client.d.ts +18 -0
- package/api/resources/models/client/Client.js +23 -4
- package/api/resources/models/client/requests/ModelsGetEnrichmentSourceRequest.d.ts +1 -1
- package/api/resources/notifications/client/Client.d.ts +4 -0
- package/api/resources/notifications/client/Client.js +6 -1
- package/api/resources/organization/client/Client.d.ts +49 -0
- package/api/resources/organization/client/Client.js +148 -2
- package/api/resources/organization/client/requests/UpdateRecordLoggingSettingsRequest.d.ts +12 -0
- package/api/resources/organization/client/requests/UpdateRecordLoggingSettingsRequest.js +3 -0
- package/api/resources/organization/client/requests/index.d.ts +1 -0
- package/api/resources/permissions/resources/policies/client/Client.d.ts +10 -0
- package/api/resources/permissions/resources/policies/client/Client.js +13 -2
- package/api/resources/permissions/resources/roles/client/Client.d.ts +10 -0
- package/api/resources/permissions/resources/roles/client/Client.js +13 -2
- package/api/resources/queryRunner/client/Client.d.ts +4 -0
- package/api/resources/queryRunner/client/Client.js +6 -1
- package/api/resources/recordViewLinks/client/Client.d.ts +59 -0
- package/api/resources/recordViewLinks/client/Client.js +211 -0
- package/api/resources/recordViewLinks/client/index.d.ts +1 -0
- package/api/resources/recordViewLinks/client/index.js +17 -0
- package/api/resources/recordViewLinks/client/requests/CreateRecordViewLinkRequest.d.ts +25 -0
- package/api/resources/recordViewLinks/client/requests/CreateRecordViewLinkRequest.js +3 -0
- package/api/resources/recordViewLinks/client/requests/RecordViewLinksGetCapabilitiesRequest.d.ts +15 -0
- package/api/resources/recordViewLinks/client/requests/RecordViewLinksGetCapabilitiesRequest.js +3 -0
- package/api/resources/recordViewLinks/client/requests/index.d.ts +2 -0
- package/api/resources/recordViewLinks/client/requests/index.js +2 -0
- package/api/resources/recordViewLinks/exports.d.ts +2 -0
- package/api/resources/recordViewLinks/exports.js +21 -0
- package/api/resources/recordViewLinks/index.d.ts +1 -0
- package/api/resources/recordViewLinks/index.js +17 -0
- package/api/resources/schemas/client/Client.d.ts +36 -0
- package/api/resources/schemas/client/Client.js +87 -2
- package/api/resources/schemas/client/requests/PatchSchemaFieldRequest.d.ts +16 -0
- package/api/resources/schemas/client/requests/PatchSchemaFieldRequest.js +3 -0
- package/api/resources/schemas/client/requests/index.d.ts +1 -0
- package/api/resources/temporaryCredentials/client/Client.d.ts +79 -0
- package/api/resources/temporaryCredentials/client/Client.js +178 -0
- package/api/resources/temporaryCredentials/client/index.d.ts +1 -0
- package/api/resources/temporaryCredentials/client/index.js +17 -0
- package/api/resources/temporaryCredentials/client/requests/CreateTemporaryCredentialRequest.d.ts +16 -0
- package/api/resources/temporaryCredentials/client/requests/CreateTemporaryCredentialRequest.js +3 -0
- package/api/resources/temporaryCredentials/client/requests/index.d.ts +1 -0
- package/api/resources/temporaryCredentials/client/requests/index.js +2 -0
- package/api/resources/temporaryCredentials/exports.d.ts +2 -0
- package/api/resources/temporaryCredentials/exports.js +21 -0
- package/api/resources/temporaryCredentials/index.d.ts +1 -0
- package/api/resources/temporaryCredentials/index.js +17 -0
- package/api/resources/users/client/Client.d.ts +24 -2
- package/api/resources/users/client/Client.js +31 -5
- package/api/resources/webhooks/client/Client.d.ts +14 -0
- package/api/resources/webhooks/client/Client.js +17 -2
- package/api/types/BackendConnectionCapabilities.d.ts +1 -0
- package/api/types/BulkSyncErrorHandling.d.ts +4 -0
- package/api/types/BulkSyncErrorHandling.js +3 -0
- package/api/types/BulkSyncErrorHandlingEnvelope.d.ts +4 -0
- package/api/types/BulkSyncErrorHandlingEnvelope.js +3 -0
- package/api/types/BulkSyncExecution.d.ts +2 -0
- package/api/types/BulkSyncSchemaExecution.d.ts +2 -0
- package/api/types/BulkSyncSourceCapabilities.d.ts +2 -0
- package/api/types/CloseHarborSessionEnvelope.d.ts +9 -0
- package/api/types/CloseHarborSessionEnvelope.js +3 -0
- package/api/types/ConnectCardResponse.d.ts +2 -2
- package/api/types/ConnectSessionResponse.d.ts +22 -0
- package/api/types/ConnectSessionResponse.js +3 -0
- package/api/types/ConnectSessionResponseEnvelope.d.ts +4 -0
- package/api/types/ConnectSessionResponseEnvelope.js +3 -0
- package/api/types/ConnectionParameterValue.d.ts +1 -0
- package/api/types/ConnectionParameterValuesResponseEnvelope.d.ts +1 -1
- package/api/types/ConnectionProxyResponse.d.ts +8 -2
- package/api/types/ConnectionProxySettingsEnvelope.d.ts +4 -0
- package/api/types/ConnectionProxySettingsEnvelope.js +3 -0
- package/api/types/ConnectionProxySettingsResponse.d.ts +12 -0
- package/api/types/ConnectionProxySettingsResponse.js +3 -0
- package/api/types/ConnectionType.d.ts +1 -0
- package/api/types/ConnectionTypeSchema.d.ts +1 -0
- package/api/types/ConnectionUsageCategoryStats.d.ts +8 -0
- package/api/types/ConnectionUsageCategoryStats.js +3 -0
- package/api/types/ConnectionUsageResponse.d.ts +11 -0
- package/api/types/ConnectionUsageResponse.js +3 -0
- package/api/types/ConnectionUsageSyncStats.d.ts +15 -0
- package/api/types/ConnectionUsageSyncStats.js +3 -0
- package/api/types/CreateHarborEnvelope.d.ts +4 -0
- package/api/types/CreateHarborEnvelope.js +3 -0
- package/api/types/CreateHarborResponse.d.ts +5 -0
- package/api/types/CreateHarborResponse.js +3 -0
- package/api/types/CreateRecordViewLinkEnvelope.d.ts +4 -0
- package/api/types/CreateRecordViewLinkEnvelope.js +3 -0
- package/api/types/CreateRecordViewLinkResponse.d.ts +10 -0
- package/api/types/CreateRecordViewLinkResponse.js +3 -0
- package/api/types/CurrentOrgListUsersEnvelope.d.ts +4 -0
- package/api/types/CurrentOrgListUsersEnvelope.js +3 -0
- package/api/types/CurrentOrgUserEnvelope.d.ts +4 -0
- package/api/types/CurrentOrgUserEnvelope.js +3 -0
- package/api/types/CurrentOrgUserResponse.d.ts +16 -0
- package/api/types/CurrentOrgUserResponse.js +3 -0
- package/api/types/DeletedHarborContextDraftEnvelope.d.ts +9 -0
- package/api/types/DeletedHarborContextDraftEnvelope.js +3 -0
- package/api/types/DeletedHarborContextEnvelope.d.ts +9 -0
- package/api/types/DeletedHarborContextEnvelope.js +3 -0
- package/api/types/DeletedHarborEnvelope.d.ts +4 -0
- package/api/types/DeletedHarborEnvelope.js +3 -0
- package/api/types/DeletedHarborResponse.d.ts +4 -0
- package/api/types/DeletedHarborResponse.js +3 -0
- package/api/types/EntityResponse.d.ts +2 -2
- package/api/types/EventingBulkSyncCompletedEvent.d.ts +2 -0
- package/api/types/EventingBulkSyncCompletedWithErrorEvent.d.ts +2 -0
- package/api/types/EventingBulkSyncFailedEvent.d.ts +2 -0
- package/api/types/EventingBulkSyncSchedule.d.ts +4 -0
- package/api/types/EventingBulkSyncSchedule.js +3 -0
- package/api/types/EventingSyncCompletedEvent.d.ts +3 -0
- package/api/types/EventingSyncSchedule.d.ts +3 -0
- package/api/types/EventingSyncSchedule.js +3 -0
- package/api/types/Filter.d.ts +3 -2
- package/api/types/GetConnectionUsageEnvelope.d.ts +4 -0
- package/api/types/GetConnectionUsageEnvelope.js +3 -0
- package/api/types/GetExecutionResponseSchema.d.ts +2 -0
- package/api/types/GetIdentityResponseSchema.d.ts +2 -0
- package/api/types/GetRecordViewCapabilitiesEnvelope.d.ts +4 -0
- package/api/types/GetRecordViewCapabilitiesEnvelope.js +3 -0
- package/api/types/HarborApiKeyCreatedResponse.d.ts +10 -0
- package/api/types/HarborApiKeyCreatedResponse.js +3 -0
- package/api/types/HarborConnectionListEnvelope.d.ts +5 -0
- package/api/types/HarborConnectionListEnvelope.js +3 -0
- package/api/types/HarborConnectionResponse.d.ts +6 -0
- package/api/types/HarborConnectionResponse.js +3 -0
- package/api/types/HarborConnectionSchemaEnvelope.d.ts +4 -0
- package/api/types/HarborConnectionSchemaEnvelope.js +3 -0
- package/api/types/HarborContextDraftEnvelope.d.ts +4 -0
- package/api/types/HarborContextDraftEnvelope.js +3 -0
- package/api/types/HarborContextDraftListEnvelope.d.ts +5 -0
- package/api/types/HarborContextDraftListEnvelope.js +3 -0
- package/api/types/HarborContextDraftMetadataResponse.d.ts +26 -0
- package/api/types/HarborContextDraftMetadataResponse.js +3 -0
- package/api/types/HarborContextDraftResponse.d.ts +28 -0
- package/api/types/HarborContextDraftResponse.js +3 -0
- package/api/types/HarborContextEnvelope.d.ts +4 -0
- package/api/types/HarborContextEnvelope.js +3 -0
- package/api/types/HarborContextListEnvelope.d.ts +5 -0
- package/api/types/HarborContextListEnvelope.js +3 -0
- package/api/types/HarborContextMetadataResponse.d.ts +16 -0
- package/api/types/HarborContextMetadataResponse.js +3 -0
- package/api/types/HarborContextResponse.d.ts +18 -0
- package/api/types/HarborContextResponse.js +3 -0
- package/api/types/HarborContextVersionEnvelope.d.ts +4 -0
- package/api/types/HarborContextVersionEnvelope.js +3 -0
- package/api/types/HarborContextVersionListEnvelope.d.ts +5 -0
- package/api/types/HarborContextVersionListEnvelope.js +3 -0
- package/api/types/HarborContextVersionMetadataResponse.d.ts +18 -0
- package/api/types/HarborContextVersionMetadataResponse.js +3 -0
- package/api/types/HarborContextVersionResponse.d.ts +20 -0
- package/api/types/HarborContextVersionResponse.js +3 -0
- package/api/types/HarborDatasetStatusResponse.d.ts +8 -0
- package/api/types/HarborDatasetStatusResponse.js +3 -0
- package/api/types/HarborEnvelope.d.ts +4 -0
- package/api/types/HarborEnvelope.js +3 -0
- package/api/types/HarborKeyEnvelope.d.ts +4 -0
- package/api/types/HarborKeyEnvelope.js +3 -0
- package/api/types/HarborKeyListEnvelope.d.ts +5 -0
- package/api/types/HarborKeyListEnvelope.js +3 -0
- package/api/types/HarborKeyResponse.d.ts +16 -0
- package/api/types/HarborKeyResponse.js +3 -0
- package/api/types/HarborListEnvelope.d.ts +5 -0
- package/api/types/HarborListEnvelope.js +3 -0
- package/api/types/HarborPipelineStatusResponse.d.ts +21 -0
- package/api/types/HarborPipelineStatusResponse.js +12 -0
- package/api/types/HarborResponse.d.ts +20 -0
- package/api/types/HarborResponse.js +3 -0
- package/api/types/HarborSchemaListEnvelope.d.ts +6 -0
- package/api/types/HarborSchemaListEnvelope.js +3 -0
- package/api/types/HarborSchemaResponse.d.ts +4 -0
- package/api/types/HarborSchemaResponse.js +3 -0
- package/api/types/HarborSourceMappingResponse.d.ts +8 -0
- package/api/types/HarborSourceMappingResponse.js +3 -0
- package/api/types/HarborSourceReference.d.ts +8 -0
- package/api/types/HarborSourceReference.js +3 -0
- package/api/types/HarborStatusEnvelope.d.ts +4 -0
- package/api/types/HarborStatusEnvelope.js +3 -0
- package/api/types/HarborStatusResponse.d.ts +7 -0
- package/api/types/HarborStatusResponse.js +3 -0
- package/api/types/HarborStatusScheduleResponse.d.ts +28 -0
- package/api/types/HarborStatusScheduleResponse.js +3 -0
- package/api/types/HarborUserEnvelope.d.ts +4 -0
- package/api/types/HarborUserEnvelope.js +3 -0
- package/api/types/HarborUserListEnvelope.d.ts +5 -0
- package/api/types/HarborUserListEnvelope.js +3 -0
- package/api/types/HarborUserResponse.d.ts +16 -0
- package/api/types/HarborUserResponse.js +3 -0
- package/api/types/IdentityCredentialApiKeyProfileSchema.d.ts +12 -0
- package/api/types/IdentityCredentialApiKeyProfileSchema.js +3 -0
- package/api/types/IdentityCredentialCapabilitiesSchema.d.ts +5 -0
- package/api/types/IdentityCredentialCapabilitiesSchema.js +3 -0
- package/api/types/IdentityCredentialConnectionCapabilitySchema.d.ts +4 -0
- package/api/types/IdentityCredentialConnectionCapabilitySchema.js +3 -0
- package/api/types/IdentityCredentialHarborSchema.d.ts +10 -0
- package/api/types/IdentityCredentialHarborSchema.js +3 -0
- package/api/types/IdentityCredentialSchema.d.ts +13 -0
- package/api/types/IdentityCredentialSchema.js +3 -0
- package/api/types/IdentityFunction.d.ts +2 -0
- package/api/types/LogsIndexEntry.d.ts +6 -0
- package/api/types/LogsIndexEntry.js +3 -0
- package/api/types/LogsIndexResponse.d.ts +9 -0
- package/api/types/LogsIndexResponse.js +3 -0
- package/api/types/LogsIndexResponseEnvelope.d.ts +4 -0
- package/api/types/LogsIndexResponseEnvelope.js +3 -0
- package/api/types/Mode.d.ts +6 -0
- package/api/types/ModelFilterCondition.d.ts +11 -0
- package/api/types/ModelFilterCondition.js +3 -0
- package/api/types/ModelFilters.d.ts +10 -0
- package/api/types/ModelFilters.js +3 -0
- package/api/types/{SyncResponse.d.ts → ModelSyncV5Response.d.ts} +7 -3
- package/api/types/ModelSyncV5Response.js +3 -0
- package/api/types/ModelSyncV5ResponseEnvelope.d.ts +4 -0
- package/api/types/ModelSyncV5ResponseEnvelope.js +3 -0
- package/api/types/{Target.d.ts → ModelSyncV5Target.d.ts} +2 -1
- package/api/types/ModelSyncV5Target.js +3 -0
- package/api/types/OverrideField.d.ts +13 -0
- package/api/types/OverrideField.js +3 -0
- package/api/types/OverrideFieldInput.d.ts +18 -0
- package/api/types/OverrideFieldInput.js +3 -0
- package/api/types/RecordLoggingSettingsEnvelope.d.ts +4 -0
- package/api/types/RecordLoggingSettingsEnvelope.js +3 -0
- package/api/types/RecordLoggingSettingsResponse.d.ts +8 -0
- package/api/types/RecordLoggingSettingsResponse.js +3 -0
- package/api/types/RecordviewCapabilities.d.ts +12 -0
- package/api/types/RecordviewCapabilities.js +3 -0
- package/api/types/RegisterHarborSessionEnvelope.d.ts +4 -0
- package/api/types/RegisterHarborSessionEnvelope.js +3 -0
- package/api/types/RegisterHarborSessionResponse.d.ts +6 -0
- package/api/types/RegisterHarborSessionResponse.js +3 -0
- package/api/types/ResolveHarborSourceMappingsEnvelope.d.ts +12 -0
- package/api/types/ResolveHarborSourceMappingsEnvelope.js +3 -0
- package/api/types/RevokedHarborKeyEnvelope.d.ts +9 -0
- package/api/types/RevokedHarborKeyEnvelope.js +3 -0
- package/api/types/SchemaField.d.ts +5 -1
- package/api/types/SchemaFieldResponseEnvelope.d.ts +4 -0
- package/api/types/SchemaFieldResponseEnvelope.js +3 -0
- package/api/types/SyncDestinationProperties.d.ts +15 -0
- package/api/types/SyncErrorHandling.d.ts +10 -0
- package/api/types/SyncErrorHandling.js +3 -0
- package/api/types/SyncErrorHandlingEnvelope.d.ts +4 -0
- package/api/types/SyncErrorHandlingEnvelope.js +3 -0
- package/api/types/SyncField.d.ts +1 -1
- package/api/types/SyncSourceMetaResponse.d.ts +1 -1
- package/api/types/TargetCreator.d.ts +1 -1
- package/api/types/TargetField.d.ts +15 -0
- package/api/types/TargetFilterCondition.d.ts +13 -0
- package/api/types/TargetFilterCondition.js +3 -0
- package/api/types/TargetFilters.d.ts +10 -0
- package/api/types/TargetFilters.js +3 -0
- package/api/types/TargetResponse.d.ts +5 -0
- package/api/types/TemporaryCredentialResponse.d.ts +10 -0
- package/api/types/TemporaryCredentialResponse.js +3 -0
- package/api/types/TemporaryCredentialResponseEnvelope.d.ts +4 -0
- package/api/types/TemporaryCredentialResponseEnvelope.js +3 -0
- package/api/types/TemporaryCredentialSubject.d.ts +26 -0
- package/api/types/TemporaryCredentialSubject.js +17 -0
- package/api/types/TypesDefinition.d.ts +1 -0
- package/api/types/TypesDefinition.js +3 -0
- package/api/types/UnassignedHarborUserEnvelope.d.ts +9 -0
- package/api/types/UnassignedHarborUserEnvelope.js +3 -0
- package/api/types/index.d.ts +91 -4
- package/api/types/index.js +91 -4
- package/core/auth/AuthProvider.d.ts +1 -0
- package/core/auth/AuthProvider.js +7 -0
- package/core/auth/index.d.ts +1 -1
- package/core/auth/index.js +3 -1
- package/core/fetcher/Fetcher.js +9 -92
- package/core/fetcher/getResponseBody.js +11 -0
- package/core/fetcher/makePassthroughRequest.js +26 -4
- package/core/fetcher/redactUrl.d.ts +2 -0
- package/core/fetcher/redactUrl.js +88 -0
- package/core/fetcher/requestWithRetries.js +4 -1
- package/core/fetcher/signals.js +9 -1
- package/core/requestBody.d.ts +12 -0
- package/core/requestBody.js +26 -0
- package/core/runtime/index.d.ts +1 -1
- package/core/runtime/index.js +2 -1
- package/core/runtime/runtime.d.ts +19 -0
- package/core/runtime/runtime.js +74 -2
- package/core/url/qs.js +2 -2
- package/errors/PolytomicError.d.ts +1 -0
- package/errors/PolytomicError.js +5 -1
- package/errors/PolytomicTimeoutError.d.ts +2 -2
- package/errors/PolytomicTimeoutError.js +40 -6
- package/package.json +2 -2
- package/reference.md +5034 -1329
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/types/SyncResponseEnvelope.d.ts +0 -4
- package/api/types/TargetCreateInput.d.ts +0 -8
- /package/api/resources/{connections/client/requests/ExecuteConnectionProxyRequest.js → bulkSync/resources/errorHandling/client/requests/UpdateBulkSyncErrorHandlingRequest.js} +0 -0
- /package/api/resources/{connections/client/requests/PartnerCreateSharedConnectionRequestSchema.js → bulkSync/resources/executions/client/requests/ExecutionsGetIngestConsoleLogsRequest.js} +0 -0
- /package/api/resources/{modelSync/client/requests/CreateSyncRequest.js → connections/resources/proxy/client/requests/ExecuteConnectionProxyRequest.js} +0 -0
- /package/api/resources/{modelSync/client/requests/UpdateSyncRequest.js → connections/resources/proxy/client/requests/UpdateConnectionProxySettingsRequest.js} +0 -0
- /package/api/resources/connections/{client → resources/sharedConnections/client}/requests/PartnerCreateSharedConnectionRequestSchema.d.ts +0 -0
- /package/api/{types/SyncResponse.js → resources/connections/resources/sharedConnections/client/requests/PartnerCreateSharedConnectionRequestSchema.js} +0 -0
- /package/api/{types/SyncResponseEnvelope.js → resources/harbors/client/requests/CreateHarborContextDraftRequest.js} +0 -0
- /package/api/{types/Target.js → resources/harbors/client/requests/CreateHarborContextRequest.js} +0 -0
- /package/api/{types/TargetCreateInput.js → resources/harbors/client/requests/CreateHarborRequest.js} +0 -0
|
@@ -47,14 +47,25 @@ exports.ConnectionsClient = void 0;
|
|
|
47
47
|
const BaseClient_1 = require("../../../../BaseClient");
|
|
48
48
|
const core = __importStar(require("../../../../core"));
|
|
49
49
|
const headers_1 = require("../../../../core/headers");
|
|
50
|
+
const requestBody_1 = require("../../../../core/requestBody");
|
|
50
51
|
const environments = __importStar(require("../../../../environments"));
|
|
51
52
|
const handleNonStatusCodeError_1 = require("../../../../errors/handleNonStatusCodeError");
|
|
52
53
|
const errors = __importStar(require("../../../../errors/index"));
|
|
53
54
|
const Polytomic = __importStar(require("../../../index"));
|
|
55
|
+
const Client_1 = require("../resources/proxy/client/Client");
|
|
56
|
+
const Client_2 = require("../resources/sharedConnections/client/Client");
|
|
54
57
|
class ConnectionsClient {
|
|
55
58
|
constructor(options = {}) {
|
|
56
59
|
this._options = (0, BaseClient_1.normalizeClientOptionsWithAuth)(options);
|
|
57
60
|
}
|
|
61
|
+
get proxy() {
|
|
62
|
+
var _a;
|
|
63
|
+
return ((_a = this._proxy) !== null && _a !== void 0 ? _a : (this._proxy = new Client_1.ProxyClient(this._options)));
|
|
64
|
+
}
|
|
65
|
+
get sharedConnections() {
|
|
66
|
+
var _a;
|
|
67
|
+
return ((_a = this._sharedConnections) !== null && _a !== void 0 ? _a : (this._sharedConnections = new Client_2.SharedConnectionsClient(this._options)));
|
|
68
|
+
}
|
|
58
69
|
/**
|
|
59
70
|
* Lists all connection types supported by this deployment.
|
|
60
71
|
*
|
|
@@ -68,6 +79,8 @@ class ConnectionsClient {
|
|
|
68
79
|
* @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
69
80
|
*
|
|
70
81
|
* @throws {@link Polytomic.InternalServerError}
|
|
82
|
+
* @throws {@link errors.PolytomicError}
|
|
83
|
+
* @throws {@link errors.PolytomicTimeoutError}
|
|
71
84
|
*
|
|
72
85
|
* @example
|
|
73
86
|
* await client.connections.getTypes()
|
|
@@ -128,6 +141,8 @@ class ConnectionsClient {
|
|
|
128
141
|
*
|
|
129
142
|
* @throws {@link Polytomic.NotFoundError}
|
|
130
143
|
* @throws {@link Polytomic.InternalServerError}
|
|
144
|
+
* @throws {@link errors.PolytomicError}
|
|
145
|
+
* @throws {@link errors.PolytomicTimeoutError}
|
|
131
146
|
*
|
|
132
147
|
* @example
|
|
133
148
|
* await client.connections.getConnectionTypeSchema("postgresql")
|
|
@@ -191,6 +206,8 @@ class ConnectionsClient {
|
|
|
191
206
|
* @throws {@link Polytomic.BadRequestError}
|
|
192
207
|
* @throws {@link Polytomic.NotFoundError}
|
|
193
208
|
* @throws {@link Polytomic.InternalServerError}
|
|
209
|
+
* @throws {@link errors.PolytomicError}
|
|
210
|
+
* @throws {@link errors.PolytomicTimeoutError}
|
|
194
211
|
*
|
|
195
212
|
* @example
|
|
196
213
|
* await client.connections.getTypeParameterValues("type", {
|
|
@@ -215,7 +232,7 @@ class ConnectionsClient {
|
|
|
215
232
|
contentType: "application/json",
|
|
216
233
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
217
234
|
requestType: "json",
|
|
218
|
-
body: request,
|
|
235
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(request, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
219
236
|
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
220
237
|
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
221
238
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -262,6 +279,8 @@ class ConnectionsClient {
|
|
|
262
279
|
* @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
263
280
|
*
|
|
264
281
|
* @throws {@link Polytomic.InternalServerError}
|
|
282
|
+
* @throws {@link errors.PolytomicError}
|
|
283
|
+
* @throws {@link errors.PolytomicTimeoutError}
|
|
265
284
|
*
|
|
266
285
|
* @example
|
|
267
286
|
* await client.connections.list()
|
|
@@ -329,6 +348,8 @@ class ConnectionsClient {
|
|
|
329
348
|
* @throws {@link Polytomic.ForbiddenError}
|
|
330
349
|
* @throws {@link Polytomic.UnprocessableEntityError}
|
|
331
350
|
* @throws {@link Polytomic.InternalServerError}
|
|
351
|
+
* @throws {@link errors.PolytomicError}
|
|
352
|
+
* @throws {@link errors.PolytomicTimeoutError}
|
|
332
353
|
*
|
|
333
354
|
* @example
|
|
334
355
|
* await client.connections.create({
|
|
@@ -361,7 +382,7 @@ class ConnectionsClient {
|
|
|
361
382
|
contentType: "application/json",
|
|
362
383
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
363
384
|
requestType: "json",
|
|
364
|
-
body: request,
|
|
385
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(request, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
365
386
|
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
366
387
|
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
367
388
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -398,7 +419,13 @@ class ConnectionsClient {
|
|
|
398
419
|
});
|
|
399
420
|
}
|
|
400
421
|
/**
|
|
401
|
-
* Creates a Polytomic Connect session and returns a
|
|
422
|
+
* Creates a Polytomic Connect session and returns a URL for creating or reconnecting a Connection.
|
|
423
|
+
*
|
|
424
|
+
* Open the returned URL, or send it to the person who will set up the Connection.
|
|
425
|
+
* Polytomic Connect guides them through authentication and configuration, then
|
|
426
|
+
* redirects them to `redirect_url`.
|
|
427
|
+
*
|
|
428
|
+
* Each session can create or reconnect one Connection.
|
|
402
429
|
*
|
|
403
430
|
* See also:
|
|
404
431
|
*
|
|
@@ -409,8 +436,12 @@ class ConnectionsClient {
|
|
|
409
436
|
*
|
|
410
437
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
411
438
|
* @throws {@link Polytomic.ForbiddenError}
|
|
439
|
+
* @throws {@link Polytomic.NotFoundError}
|
|
440
|
+
* @throws {@link Polytomic.ConflictError}
|
|
412
441
|
* @throws {@link Polytomic.UnprocessableEntityError}
|
|
413
442
|
* @throws {@link Polytomic.InternalServerError}
|
|
443
|
+
* @throws {@link errors.PolytomicError}
|
|
444
|
+
* @throws {@link errors.PolytomicTimeoutError}
|
|
414
445
|
*
|
|
415
446
|
* @example
|
|
416
447
|
* await client.connections.connect({
|
|
@@ -436,7 +467,7 @@ class ConnectionsClient {
|
|
|
436
467
|
contentType: "application/json",
|
|
437
468
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
438
469
|
requestType: "json",
|
|
439
|
-
body: request,
|
|
470
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(request, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
440
471
|
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
441
472
|
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
442
473
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -455,6 +486,10 @@ class ConnectionsClient {
|
|
|
455
486
|
throw new Polytomic.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
456
487
|
case 403:
|
|
457
488
|
throw new Polytomic.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
489
|
+
case 404:
|
|
490
|
+
throw new Polytomic.NotFoundError(_response.error.body, _response.rawResponse);
|
|
491
|
+
case 409:
|
|
492
|
+
throw new Polytomic.ConflictError(_response.error.body, _response.rawResponse);
|
|
458
493
|
case 422:
|
|
459
494
|
throw new Polytomic.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
460
495
|
case 500:
|
|
@@ -470,6 +505,64 @@ class ConnectionsClient {
|
|
|
470
505
|
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/api/connections/connect/");
|
|
471
506
|
});
|
|
472
507
|
}
|
|
508
|
+
/**
|
|
509
|
+
* Returns trusted metadata for the authenticated Polytomic Connect session.
|
|
510
|
+
*
|
|
511
|
+
* Returns the trusted metadata stored for a Polytomic Connect session. Authenticate with the opaque Connect token in the `token` query parameter.
|
|
512
|
+
*
|
|
513
|
+
* The response includes the server-enforced connection name, fixed type or whitelist, bound connection ID, completion redirect, branding, and absolute expiration time.
|
|
514
|
+
*
|
|
515
|
+
* @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
516
|
+
*
|
|
517
|
+
* @throws {@link Polytomic.UnauthorizedError}
|
|
518
|
+
* @throws {@link errors.PolytomicError}
|
|
519
|
+
* @throws {@link errors.PolytomicTimeoutError}
|
|
520
|
+
*
|
|
521
|
+
* @example
|
|
522
|
+
* await client.connections.getConnectSession()
|
|
523
|
+
*/
|
|
524
|
+
getConnectSession(requestOptions) {
|
|
525
|
+
return core.HttpResponsePromise.fromPromise(this.__getConnectSession(requestOptions));
|
|
526
|
+
}
|
|
527
|
+
__getConnectSession(requestOptions) {
|
|
528
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
529
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
530
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
531
|
+
const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
532
|
+
"X-Polytomic-Version": (_d = (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.version) !== null && _d !== void 0 ? _d : "2025-09-18",
|
|
533
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
534
|
+
const _response = yield core.fetcher({
|
|
535
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.PolytomicEnvironment.Default, "api/connections/connect/session"),
|
|
536
|
+
method: "GET",
|
|
537
|
+
headers: _headers,
|
|
538
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
539
|
+
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
540
|
+
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
541
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
542
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
543
|
+
logging: this._options.logging,
|
|
544
|
+
});
|
|
545
|
+
if (_response.ok) {
|
|
546
|
+
return {
|
|
547
|
+
data: _response.body,
|
|
548
|
+
rawResponse: _response.rawResponse,
|
|
549
|
+
};
|
|
550
|
+
}
|
|
551
|
+
if (_response.error.reason === "status-code") {
|
|
552
|
+
switch (_response.error.statusCode) {
|
|
553
|
+
case 401:
|
|
554
|
+
throw new Polytomic.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
555
|
+
default:
|
|
556
|
+
throw new errors.PolytomicError({
|
|
557
|
+
statusCode: _response.error.statusCode,
|
|
558
|
+
body: _response.error.body,
|
|
559
|
+
rawResponse: _response.rawResponse,
|
|
560
|
+
});
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/api/connections/connect/session");
|
|
564
|
+
});
|
|
565
|
+
}
|
|
473
566
|
/**
|
|
474
567
|
* Tests a connection configuration.
|
|
475
568
|
*
|
|
@@ -490,6 +583,8 @@ class ConnectionsClient {
|
|
|
490
583
|
* @throws {@link Polytomic.BadRequestError}
|
|
491
584
|
* @throws {@link Polytomic.NotFoundError}
|
|
492
585
|
* @throws {@link Polytomic.InternalServerError}
|
|
586
|
+
* @throws {@link errors.PolytomicError}
|
|
587
|
+
* @throws {@link errors.PolytomicTimeoutError}
|
|
493
588
|
*
|
|
494
589
|
* @example
|
|
495
590
|
* await client.connections.testConnection({
|
|
@@ -520,7 +615,7 @@ class ConnectionsClient {
|
|
|
520
615
|
contentType: "application/json",
|
|
521
616
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
522
617
|
requestType: "json",
|
|
523
|
-
body: request,
|
|
618
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(request, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
524
619
|
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
525
620
|
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
526
621
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -562,6 +657,8 @@ class ConnectionsClient {
|
|
|
562
657
|
*
|
|
563
658
|
* @throws {@link Polytomic.NotFoundError}
|
|
564
659
|
* @throws {@link Polytomic.InternalServerError}
|
|
660
|
+
* @throws {@link errors.PolytomicError}
|
|
661
|
+
* @throws {@link errors.PolytomicTimeoutError}
|
|
565
662
|
*
|
|
566
663
|
* @example
|
|
567
664
|
* await client.connections.get("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
@@ -633,6 +730,8 @@ class ConnectionsClient {
|
|
|
633
730
|
* @throws {@link Polytomic.NotFoundError}
|
|
634
731
|
* @throws {@link Polytomic.UnprocessableEntityError}
|
|
635
732
|
* @throws {@link Polytomic.InternalServerError}
|
|
733
|
+
* @throws {@link errors.PolytomicError}
|
|
734
|
+
* @throws {@link errors.PolytomicTimeoutError}
|
|
636
735
|
*
|
|
637
736
|
* @example
|
|
638
737
|
* await client.connections.update("248df4b7-aa70-47b8-a036-33ac447e668d", {
|
|
@@ -664,7 +763,7 @@ class ConnectionsClient {
|
|
|
664
763
|
contentType: "application/json",
|
|
665
764
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
666
765
|
requestType: "json",
|
|
667
|
-
body: request,
|
|
766
|
+
body: (0, requestBody_1.mergeAdditionalBodyParameters)(request, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
|
|
668
767
|
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
669
768
|
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
670
769
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -719,6 +818,8 @@ class ConnectionsClient {
|
|
|
719
818
|
* @throws {@link Polytomic.NotFoundError}
|
|
720
819
|
* @throws {@link Polytomic.UnprocessableEntityError}
|
|
721
820
|
* @throws {@link Polytomic.InternalServerError}
|
|
821
|
+
* @throws {@link errors.PolytomicError}
|
|
822
|
+
* @throws {@link errors.PolytomicTimeoutError}
|
|
722
823
|
*
|
|
723
824
|
* @example
|
|
724
825
|
* await client.connections.delete("248df4b7-aa70-47b8-a036-33ac447e668d", {
|
|
@@ -798,6 +899,8 @@ class ConnectionsClient {
|
|
|
798
899
|
*
|
|
799
900
|
* @throws {@link Polytomic.NotFoundError}
|
|
800
901
|
* @throws {@link Polytomic.InternalServerError}
|
|
902
|
+
* @throws {@link errors.PolytomicError}
|
|
903
|
+
* @throws {@link errors.PolytomicTimeoutError}
|
|
801
904
|
*
|
|
802
905
|
* @example
|
|
803
906
|
* await client.connections.getParameterValues("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
@@ -847,145 +950,38 @@ class ConnectionsClient {
|
|
|
847
950
|
});
|
|
848
951
|
}
|
|
849
952
|
/**
|
|
850
|
-
*
|
|
851
|
-
*
|
|
852
|
-
* This endpoint is intended for controlled passthrough use, not as a general
|
|
853
|
-
* replacement for Polytomic's modeled endpoints. The request is executed with the
|
|
854
|
-
* connection's stored credentials and inherited base URL, headers, and query
|
|
855
|
-
* parameters.
|
|
953
|
+
* Returns the connection's API consumption over the last 24 hours, broken down by sync when the backend supports it.
|
|
856
954
|
*
|
|
857
|
-
*
|
|
858
|
-
* [`GET /api/connections/{id}/proxy/info`](../../../../api-reference/connections/get-proxy-info)
|
|
859
|
-
* to inspect the inherited base URL, blocked headers, accepted body types, and
|
|
860
|
-
* size and rate limits.
|
|
955
|
+
* Not all integrations support usage reporting.
|
|
861
956
|
*
|
|
862
|
-
*
|
|
957
|
+
* - `callsLast24h` is null when the backend does not expose a usage count.
|
|
958
|
+
* - `reportsSyncStats` is `false`, and `bySync` is empty, when the backend
|
|
959
|
+
* reports a total but cannot attribute calls to individual syncs.
|
|
863
960
|
*
|
|
864
|
-
* -
|
|
865
|
-
*
|
|
866
|
-
*
|
|
867
|
-
*
|
|
868
|
-
*
|
|
869
|
-
*
|
|
870
|
-
*
|
|
961
|
+
* When per-sync stats are available, each entry in `bySync` carries a
|
|
962
|
+
* `categories` breakdown. **Category keys and labels are integration-specific.**
|
|
963
|
+
* For example, Salesforce reports `rest` and `bulk` categories
|
|
964
|
+
* (collapsing Bulk API v1 and v2 into a single `bulk` bucket), while another
|
|
965
|
+
* integration may report an entirely different set or none at all. Treat `key`
|
|
966
|
+
* as an opaque, backend-defined identifier and use `label` for display; do not
|
|
967
|
+
* assume a fixed vocabulary across connection types.
|
|
871
968
|
*
|
|
872
|
-
*
|
|
873
|
-
* with audit logs.
|
|
874
|
-
*
|
|
875
|
-
* @param {string} id - Unique identifier of the connection to proxy the request through.
|
|
876
|
-
* @param {Polytomic.ExecuteConnectionProxyRequest} request
|
|
877
|
-
* @param {ConnectionsClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
|
|
878
|
-
*
|
|
879
|
-
* @throws {@link Polytomic.BadRequestError}
|
|
880
|
-
* @throws {@link Polytomic.UnauthorizedError}
|
|
881
|
-
* @throws {@link Polytomic.ForbiddenError}
|
|
882
|
-
* @throws {@link Polytomic.NotFoundError}
|
|
883
|
-
* @throws {@link Polytomic.TooManyRequestsError}
|
|
884
|
-
* @throws {@link Polytomic.InternalServerError}
|
|
885
|
-
* @throws {@link Polytomic.BadGatewayError}
|
|
886
|
-
* @throws {@link Polytomic.GatewayTimeoutError}
|
|
887
|
-
*
|
|
888
|
-
* @example
|
|
889
|
-
* await client.connections.executeProxy("248df4b7-aa70-47b8-a036-33ac447e668d", {
|
|
890
|
-
* request: {
|
|
891
|
-
* method: "GET",
|
|
892
|
-
* path: "/v1/objects"
|
|
893
|
-
* }
|
|
894
|
-
* })
|
|
895
|
-
*/
|
|
896
|
-
executeProxy(id, request, requestOptions) {
|
|
897
|
-
return core.HttpResponsePromise.fromPromise(this.__executeProxy(id, request, requestOptions));
|
|
898
|
-
}
|
|
899
|
-
__executeProxy(id, request, requestOptions) {
|
|
900
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
901
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
902
|
-
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
903
|
-
const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
904
|
-
"Idempotency-Key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey,
|
|
905
|
-
"X-Polytomic-Version": (_d = (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.version) !== null && _d !== void 0 ? _d : "2025-09-18",
|
|
906
|
-
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
907
|
-
const _response = yield core.fetcher({
|
|
908
|
-
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.PolytomicEnvironment.Default, `api/connections/${core.url.encodePathParam(id)}/proxy`),
|
|
909
|
-
method: "POST",
|
|
910
|
-
headers: _headers,
|
|
911
|
-
contentType: "application/json",
|
|
912
|
-
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
913
|
-
requestType: "json",
|
|
914
|
-
body: request,
|
|
915
|
-
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
916
|
-
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
917
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
918
|
-
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
919
|
-
logging: this._options.logging,
|
|
920
|
-
});
|
|
921
|
-
if (_response.ok) {
|
|
922
|
-
return {
|
|
923
|
-
data: _response.body,
|
|
924
|
-
rawResponse: _response.rawResponse,
|
|
925
|
-
};
|
|
926
|
-
}
|
|
927
|
-
if (_response.error.reason === "status-code") {
|
|
928
|
-
switch (_response.error.statusCode) {
|
|
929
|
-
case 400:
|
|
930
|
-
throw new Polytomic.BadRequestError(_response.error.body, _response.rawResponse);
|
|
931
|
-
case 401:
|
|
932
|
-
throw new Polytomic.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
933
|
-
case 403:
|
|
934
|
-
throw new Polytomic.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
935
|
-
case 404:
|
|
936
|
-
throw new Polytomic.NotFoundError(_response.error.body, _response.rawResponse);
|
|
937
|
-
case 429:
|
|
938
|
-
throw new Polytomic.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
939
|
-
case 500:
|
|
940
|
-
throw new Polytomic.InternalServerError(_response.error.body, _response.rawResponse);
|
|
941
|
-
case 502:
|
|
942
|
-
throw new Polytomic.BadGatewayError(_response.error.body, _response.rawResponse);
|
|
943
|
-
case 504:
|
|
944
|
-
throw new Polytomic.GatewayTimeoutError(_response.error.body, _response.rawResponse);
|
|
945
|
-
default:
|
|
946
|
-
throw new errors.PolytomicError({
|
|
947
|
-
statusCode: _response.error.statusCode,
|
|
948
|
-
body: _response.error.body,
|
|
949
|
-
rawResponse: _response.rawResponse,
|
|
950
|
-
});
|
|
951
|
-
}
|
|
952
|
-
}
|
|
953
|
-
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/api/connections/{id}/proxy");
|
|
954
|
-
});
|
|
955
|
-
}
|
|
956
|
-
/**
|
|
957
|
-
* Returns the proxy contract for a connection.
|
|
958
|
-
*
|
|
959
|
-
* Use this endpoint before calling
|
|
960
|
-
* [`POST /api/connections/{id}/proxy`](../../../../../api-reference/connections/execute-proxy)
|
|
961
|
-
* when you need to build requests programmatically. The response shows:
|
|
962
|
-
*
|
|
963
|
-
* - the inherited base URL that all proxied requests are sent to
|
|
964
|
-
* - locked headers and query parameters that are attached automatically
|
|
965
|
-
* - blocked request and response headers
|
|
966
|
-
* - allowed HTTP methods and body shapes
|
|
967
|
-
* - timeout, rate-limit, and payload-size limits
|
|
968
|
-
*
|
|
969
|
-
* Sensitive inherited header and query values are redacted in the response. The
|
|
970
|
-
* contract is still useful for discovering which keys are fixed by the
|
|
971
|
-
* connection, even though their raw values are not exposed.
|
|
972
|
-
*
|
|
973
|
-
* @param {string} id - Unique identifier of the connection whose proxy contract should be returned.
|
|
969
|
+
* @param {string} id - Unique identifier of the connection whose API consumption should be returned.
|
|
974
970
|
* @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
975
971
|
*
|
|
976
|
-
* @throws {@link Polytomic.BadRequestError}
|
|
977
972
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
978
|
-
* @throws {@link Polytomic.ForbiddenError}
|
|
979
973
|
* @throws {@link Polytomic.NotFoundError}
|
|
980
974
|
* @throws {@link Polytomic.InternalServerError}
|
|
975
|
+
* @throws {@link errors.PolytomicError}
|
|
976
|
+
* @throws {@link errors.PolytomicTimeoutError}
|
|
981
977
|
*
|
|
982
978
|
* @example
|
|
983
|
-
* await client.connections.
|
|
979
|
+
* await client.connections.getUsage("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
984
980
|
*/
|
|
985
|
-
|
|
986
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
981
|
+
getUsage(id, requestOptions) {
|
|
982
|
+
return core.HttpResponsePromise.fromPromise(this.__getUsage(id, requestOptions));
|
|
987
983
|
}
|
|
988
|
-
|
|
984
|
+
__getUsage(id, requestOptions) {
|
|
989
985
|
return __awaiter(this, void 0, void 0, function* () {
|
|
990
986
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
991
987
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
@@ -993,7 +989,7 @@ class ConnectionsClient {
|
|
|
993
989
|
"X-Polytomic-Version": (_d = (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.version) !== null && _d !== void 0 ? _d : "2025-09-18",
|
|
994
990
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
995
991
|
const _response = yield core.fetcher({
|
|
996
|
-
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.PolytomicEnvironment.Default, `api/connections/${core.url.encodePathParam(id)}/
|
|
992
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.PolytomicEnvironment.Default, `api/connections/${core.url.encodePathParam(id)}/usage`),
|
|
997
993
|
method: "GET",
|
|
998
994
|
headers: _headers,
|
|
999
995
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
@@ -1004,227 +1000,12 @@ class ConnectionsClient {
|
|
|
1004
1000
|
logging: this._options.logging,
|
|
1005
1001
|
});
|
|
1006
1002
|
if (_response.ok) {
|
|
1007
|
-
return {
|
|
1008
|
-
data: _response.body,
|
|
1009
|
-
rawResponse: _response.rawResponse,
|
|
1010
|
-
};
|
|
1003
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
1011
1004
|
}
|
|
1012
1005
|
if (_response.error.reason === "status-code") {
|
|
1013
1006
|
switch (_response.error.statusCode) {
|
|
1014
|
-
case 400:
|
|
1015
|
-
throw new Polytomic.BadRequestError(_response.error.body, _response.rawResponse);
|
|
1016
1007
|
case 401:
|
|
1017
1008
|
throw new Polytomic.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
1018
|
-
case 403:
|
|
1019
|
-
throw new Polytomic.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
1020
|
-
case 404:
|
|
1021
|
-
throw new Polytomic.NotFoundError(_response.error.body, _response.rawResponse);
|
|
1022
|
-
case 500:
|
|
1023
|
-
throw new Polytomic.InternalServerError(_response.error.body, _response.rawResponse);
|
|
1024
|
-
default:
|
|
1025
|
-
throw new errors.PolytomicError({
|
|
1026
|
-
statusCode: _response.error.statusCode,
|
|
1027
|
-
body: _response.error.body,
|
|
1028
|
-
rawResponse: _response.rawResponse,
|
|
1029
|
-
});
|
|
1030
|
-
}
|
|
1031
|
-
}
|
|
1032
|
-
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/api/connections/{id}/proxy/info");
|
|
1033
|
-
});
|
|
1034
|
-
}
|
|
1035
|
-
/**
|
|
1036
|
-
* Lists shared copies of a connection that the caller's organization owns.
|
|
1037
|
-
*
|
|
1038
|
-
* The returned connections are the child copies, not the parent connection
|
|
1039
|
-
* itself. This is useful when a partner workflow needs to confirm which
|
|
1040
|
-
* downstream organizations have already received a shared copy.
|
|
1041
|
-
*
|
|
1042
|
-
* Creating a new shared copy is a separate operation. Use
|
|
1043
|
-
* [`POST /api/organizations/{org_id}/connections/{connection_id}/share`](../../../../api-reference/connections/create-shared-connection)
|
|
1044
|
-
* for the v5 partner-scoped flow.
|
|
1045
|
-
*
|
|
1046
|
-
* @param {string} id - Unique identifier of the parent connection whose shared copies should be listed.
|
|
1047
|
-
* @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1048
|
-
*
|
|
1049
|
-
* @throws {@link Polytomic.ForbiddenError}
|
|
1050
|
-
* @throws {@link Polytomic.NotFoundError}
|
|
1051
|
-
* @throws {@link Polytomic.UnprocessableEntityError}
|
|
1052
|
-
* @throws {@link Polytomic.InternalServerError}
|
|
1053
|
-
*
|
|
1054
|
-
* @example
|
|
1055
|
-
* await client.connections.listSharedConnections("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
1056
|
-
*/
|
|
1057
|
-
listSharedConnections(id, requestOptions) {
|
|
1058
|
-
return core.HttpResponsePromise.fromPromise(this.__listSharedConnections(id, requestOptions));
|
|
1059
|
-
}
|
|
1060
|
-
__listSharedConnections(id, requestOptions) {
|
|
1061
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1062
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
1063
|
-
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1064
|
-
const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
1065
|
-
"X-Polytomic-Version": (_d = (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.version) !== null && _d !== void 0 ? _d : "2025-09-18",
|
|
1066
|
-
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1067
|
-
const _response = yield core.fetcher({
|
|
1068
|
-
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.PolytomicEnvironment.Default, `api/connections/${core.url.encodePathParam(id)}/shared`),
|
|
1069
|
-
method: "GET",
|
|
1070
|
-
headers: _headers,
|
|
1071
|
-
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
1072
|
-
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
1073
|
-
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
1074
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1075
|
-
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
1076
|
-
logging: this._options.logging,
|
|
1077
|
-
});
|
|
1078
|
-
if (_response.ok) {
|
|
1079
|
-
return {
|
|
1080
|
-
data: _response.body,
|
|
1081
|
-
rawResponse: _response.rawResponse,
|
|
1082
|
-
};
|
|
1083
|
-
}
|
|
1084
|
-
if (_response.error.reason === "status-code") {
|
|
1085
|
-
switch (_response.error.statusCode) {
|
|
1086
|
-
case 403:
|
|
1087
|
-
throw new Polytomic.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
1088
|
-
case 404:
|
|
1089
|
-
throw new Polytomic.NotFoundError(_response.error.body, _response.rawResponse);
|
|
1090
|
-
case 422:
|
|
1091
|
-
throw new Polytomic.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
1092
|
-
case 500:
|
|
1093
|
-
throw new Polytomic.InternalServerError(_response.error.body, _response.rawResponse);
|
|
1094
|
-
default:
|
|
1095
|
-
throw new errors.PolytomicError({
|
|
1096
|
-
statusCode: _response.error.statusCode,
|
|
1097
|
-
body: _response.error.body,
|
|
1098
|
-
rawResponse: _response.rawResponse,
|
|
1099
|
-
});
|
|
1100
|
-
}
|
|
1101
|
-
}
|
|
1102
|
-
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/api/connections/{id}/shared");
|
|
1103
|
-
});
|
|
1104
|
-
}
|
|
1105
|
-
/**
|
|
1106
|
-
* Lists shared copies of a connection owned by a specific organization in the partner account.
|
|
1107
|
-
*
|
|
1108
|
-
* The `org_id` must match the organization that owns the parent connection. If it
|
|
1109
|
-
* does not, the endpoint returns `404` rather than exposing information about the
|
|
1110
|
-
* parent connection.
|
|
1111
|
-
*
|
|
1112
|
-
* This endpoint is useful in partner workflows where the parent connection is in
|
|
1113
|
-
* the partner owner organization and the caller needs to audit which child
|
|
1114
|
-
* organizations already have a shared copy.
|
|
1115
|
-
*
|
|
1116
|
-
* @param {string} org_id - Unique identifier of the organization that owns the parent connection.
|
|
1117
|
-
* @param {string} connection_id - Unique identifier of the parent connection whose shared copies should be listed.
|
|
1118
|
-
* @param {ConnectionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1119
|
-
*
|
|
1120
|
-
* @throws {@link Polytomic.ForbiddenError}
|
|
1121
|
-
* @throws {@link Polytomic.NotFoundError}
|
|
1122
|
-
* @throws {@link Polytomic.UnprocessableEntityError}
|
|
1123
|
-
* @throws {@link Polytomic.InternalServerError}
|
|
1124
|
-
*
|
|
1125
|
-
* @example
|
|
1126
|
-
* await client.connections.listSharedConnectionsForPartner("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
1127
|
-
*/
|
|
1128
|
-
listSharedConnectionsForPartner(org_id, connection_id, requestOptions) {
|
|
1129
|
-
return core.HttpResponsePromise.fromPromise(this.__listSharedConnectionsForPartner(org_id, connection_id, requestOptions));
|
|
1130
|
-
}
|
|
1131
|
-
__listSharedConnectionsForPartner(org_id, connection_id, requestOptions) {
|
|
1132
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1133
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
1134
|
-
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1135
|
-
const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
1136
|
-
"X-Polytomic-Version": (_d = (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.version) !== null && _d !== void 0 ? _d : "2025-09-18",
|
|
1137
|
-
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1138
|
-
const _response = yield core.fetcher({
|
|
1139
|
-
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.PolytomicEnvironment.Default, `api/organizations/${core.url.encodePathParam(org_id)}/connections/${core.url.encodePathParam(connection_id)}/shared`),
|
|
1140
|
-
method: "GET",
|
|
1141
|
-
headers: _headers,
|
|
1142
|
-
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
1143
|
-
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
1144
|
-
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
1145
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1146
|
-
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
1147
|
-
logging: this._options.logging,
|
|
1148
|
-
});
|
|
1149
|
-
if (_response.ok) {
|
|
1150
|
-
return {
|
|
1151
|
-
data: _response.body,
|
|
1152
|
-
rawResponse: _response.rawResponse,
|
|
1153
|
-
};
|
|
1154
|
-
}
|
|
1155
|
-
if (_response.error.reason === "status-code") {
|
|
1156
|
-
switch (_response.error.statusCode) {
|
|
1157
|
-
case 403:
|
|
1158
|
-
throw new Polytomic.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
1159
|
-
case 404:
|
|
1160
|
-
throw new Polytomic.NotFoundError(_response.error.body, _response.rawResponse);
|
|
1161
|
-
case 422:
|
|
1162
|
-
throw new Polytomic.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
1163
|
-
case 500:
|
|
1164
|
-
throw new Polytomic.InternalServerError(_response.error.body, _response.rawResponse);
|
|
1165
|
-
default:
|
|
1166
|
-
throw new errors.PolytomicError({
|
|
1167
|
-
statusCode: _response.error.statusCode,
|
|
1168
|
-
body: _response.error.body,
|
|
1169
|
-
rawResponse: _response.rawResponse,
|
|
1170
|
-
});
|
|
1171
|
-
}
|
|
1172
|
-
}
|
|
1173
|
-
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/api/organizations/{org_id}/connections/{connection_id}/shared");
|
|
1174
|
-
});
|
|
1175
|
-
}
|
|
1176
|
-
/**
|
|
1177
|
-
* Shares a connection with another organization in the caller's partner account.
|
|
1178
|
-
*
|
|
1179
|
-
* @param {string} org_id - Unique identifier of the organization that owns the parent connection.
|
|
1180
|
-
* @param {string} connection_id - Unique identifier of the parent connection to share.
|
|
1181
|
-
* @param {Polytomic.PartnerCreateSharedConnectionRequestSchema} request
|
|
1182
|
-
* @param {ConnectionsClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
|
|
1183
|
-
*
|
|
1184
|
-
* @throws {@link Polytomic.ForbiddenError}
|
|
1185
|
-
* @throws {@link Polytomic.NotFoundError}
|
|
1186
|
-
* @throws {@link Polytomic.InternalServerError}
|
|
1187
|
-
*
|
|
1188
|
-
* @example
|
|
1189
|
-
* await client.connections.createSharedConnection("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d", {
|
|
1190
|
-
* child_organization_id: "248df4b7-aa70-47b8-a036-33ac447e668d"
|
|
1191
|
-
* })
|
|
1192
|
-
*/
|
|
1193
|
-
createSharedConnection(org_id, connection_id, request, requestOptions) {
|
|
1194
|
-
return core.HttpResponsePromise.fromPromise(this.__createSharedConnection(org_id, connection_id, request, requestOptions));
|
|
1195
|
-
}
|
|
1196
|
-
__createSharedConnection(org_id, connection_id, request, requestOptions) {
|
|
1197
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1198
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
1199
|
-
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1200
|
-
const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
|
|
1201
|
-
"Idempotency-Key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey,
|
|
1202
|
-
"X-Polytomic-Version": (_d = (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.version) !== null && _d !== void 0 ? _d : "2025-09-18",
|
|
1203
|
-
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1204
|
-
const _response = yield core.fetcher({
|
|
1205
|
-
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.PolytomicEnvironment.Default, `api/organizations/${core.url.encodePathParam(org_id)}/connections/${core.url.encodePathParam(connection_id)}/shared`),
|
|
1206
|
-
method: "POST",
|
|
1207
|
-
headers: _headers,
|
|
1208
|
-
contentType: "application/json",
|
|
1209
|
-
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
1210
|
-
requestType: "json",
|
|
1211
|
-
body: request,
|
|
1212
|
-
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
1213
|
-
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
1214
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1215
|
-
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
1216
|
-
logging: this._options.logging,
|
|
1217
|
-
});
|
|
1218
|
-
if (_response.ok) {
|
|
1219
|
-
return {
|
|
1220
|
-
data: _response.body,
|
|
1221
|
-
rawResponse: _response.rawResponse,
|
|
1222
|
-
};
|
|
1223
|
-
}
|
|
1224
|
-
if (_response.error.reason === "status-code") {
|
|
1225
|
-
switch (_response.error.statusCode) {
|
|
1226
|
-
case 403:
|
|
1227
|
-
throw new Polytomic.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
1228
1009
|
case 404:
|
|
1229
1010
|
throw new Polytomic.NotFoundError(_response.error.body, _response.rawResponse);
|
|
1230
1011
|
case 500:
|
|
@@ -1237,7 +1018,7 @@ class ConnectionsClient {
|
|
|
1237
1018
|
});
|
|
1238
1019
|
}
|
|
1239
1020
|
}
|
|
1240
|
-
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "
|
|
1021
|
+
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/api/connections/{id}/usage");
|
|
1241
1022
|
});
|
|
1242
1023
|
}
|
|
1243
1024
|
}
|