polytomic 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Client.d.ts +50 -0
- package/Client.js +62 -0
- package/LICENSE +21 -0
- package/README.md +109 -0
- package/api/errors/UnauthorizedError.d.ts +8 -0
- package/api/errors/UnauthorizedError.js +41 -0
- package/api/errors/index.d.ts +1 -0
- package/api/errors/index.js +17 -0
- package/api/index.d.ts +3 -0
- package/api/index.js +19 -0
- package/api/resources/bulkSync/client/Client.d.ts +126 -0
- package/api/resources/bulkSync/client/Client.js +710 -0
- package/api/resources/bulkSync/client/index.d.ts +1 -0
- package/api/resources/bulkSync/client/index.js +17 -0
- package/api/resources/bulkSync/client/requests/BulkSyncGetRequest.d.ts +10 -0
- package/api/resources/bulkSync/client/requests/BulkSyncGetRequest.js +5 -0
- package/api/resources/bulkSync/client/requests/BulkSyncGetSourceRequest.d.ts +11 -0
- package/api/resources/bulkSync/client/requests/BulkSyncGetSourceRequest.js +5 -0
- package/api/resources/bulkSync/client/requests/BulkSyncRemoveRequest.d.ts +10 -0
- package/api/resources/bulkSync/client/requests/BulkSyncRemoveRequest.js +5 -0
- package/api/resources/bulkSync/client/requests/V2CreateBulkSyncRequest.d.ts +34 -0
- package/api/resources/bulkSync/client/requests/V2CreateBulkSyncRequest.js +5 -0
- package/api/resources/bulkSync/client/requests/V2UpdateBulkSyncRequest.d.ts +29 -0
- package/api/resources/bulkSync/client/requests/V2UpdateBulkSyncRequest.js +5 -0
- package/api/resources/bulkSync/client/requests/index.d.ts +5 -0
- package/api/resources/bulkSync/client/requests/index.js +2 -0
- package/api/resources/bulkSync/index.d.ts +2 -0
- package/api/resources/bulkSync/index.js +18 -0
- package/api/resources/bulkSync/resources/executions/client/Client.d.ts +43 -0
- package/api/resources/bulkSync/resources/executions/client/Client.js +224 -0
- package/api/resources/bulkSync/resources/executions/client/index.d.ts +1 -0
- package/api/resources/bulkSync/resources/executions/client/index.js +17 -0
- package/api/resources/bulkSync/resources/executions/client/requests/V3StartBulkSyncRequest.d.ts +12 -0
- package/api/resources/bulkSync/resources/executions/client/requests/V3StartBulkSyncRequest.js +5 -0
- package/api/resources/bulkSync/resources/executions/client/requests/index.d.ts +1 -0
- package/api/resources/bulkSync/resources/executions/client/requests/index.js +2 -0
- package/api/resources/bulkSync/resources/executions/index.d.ts +1 -0
- package/api/resources/bulkSync/resources/executions/index.js +17 -0
- package/api/resources/bulkSync/resources/index.d.ts +4 -0
- package/api/resources/bulkSync/resources/index.js +33 -0
- package/api/resources/bulkSync/resources/schemas/client/Client.d.ts +43 -0
- package/api/resources/bulkSync/resources/schemas/client/Client.js +224 -0
- package/api/resources/bulkSync/resources/schemas/client/index.d.ts +1 -0
- package/api/resources/bulkSync/resources/schemas/client/index.js +17 -0
- package/api/resources/bulkSync/resources/schemas/client/requests/V3UpdateBulkSchema.d.ts +13 -0
- package/api/resources/bulkSync/resources/schemas/client/requests/V3UpdateBulkSchema.js +5 -0
- package/api/resources/bulkSync/resources/schemas/client/requests/index.d.ts +1 -0
- package/api/resources/bulkSync/resources/schemas/client/requests/index.js +2 -0
- package/api/resources/bulkSync/resources/schemas/index.d.ts +1 -0
- package/api/resources/bulkSync/resources/schemas/index.js +17 -0
- package/api/resources/connections/client/Client.d.ts +111 -0
- package/api/resources/connections/client/Client.js +729 -0
- package/api/resources/connections/client/index.d.ts +1 -0
- package/api/resources/connections/client/index.js +17 -0
- package/api/resources/connections/client/requests/ConnectionsGetTargetRequest.d.ts +11 -0
- package/api/resources/connections/client/requests/ConnectionsGetTargetRequest.js +5 -0
- package/api/resources/connections/client/requests/ConnectionsRemoveRequest.d.ts +10 -0
- package/api/resources/connections/client/requests/ConnectionsRemoveRequest.js +5 -0
- package/api/resources/connections/client/requests/V2CreateConnectionRequestSchema.d.ts +21 -0
- package/api/resources/connections/client/requests/V2CreateConnectionRequestSchema.js +5 -0
- package/api/resources/connections/client/requests/V2ModelFieldsRequest.d.ts +10 -0
- package/api/resources/connections/client/requests/V2ModelFieldsRequest.js +5 -0
- package/api/resources/connections/client/requests/V2TargetRequest.d.ts +13 -0
- package/api/resources/connections/client/requests/V2TargetRequest.js +5 -0
- package/api/resources/connections/client/requests/V2UpdateConnectionRequestSchema.d.ts +19 -0
- package/api/resources/connections/client/requests/V2UpdateConnectionRequestSchema.js +5 -0
- package/api/resources/connections/client/requests/V3ConnectCardRequest.d.ts +19 -0
- package/api/resources/connections/client/requests/V3ConnectCardRequest.js +5 -0
- package/api/resources/connections/client/requests/index.d.ts +7 -0
- package/api/resources/connections/client/requests/index.js +2 -0
- package/api/resources/connections/index.d.ts +1 -0
- package/api/resources/connections/index.js +17 -0
- package/api/resources/events/client/Client.d.ts +40 -0
- package/api/resources/events/client/Client.js +191 -0
- package/api/resources/events/client/index.d.ts +1 -0
- package/api/resources/events/client/index.js +17 -0
- package/api/resources/events/client/requests/EventsApiV2GetEventsRequest.d.ts +18 -0
- package/api/resources/events/client/requests/EventsApiV2GetEventsRequest.js +5 -0
- package/api/resources/events/client/requests/index.d.ts +1 -0
- package/api/resources/events/client/requests/index.js +2 -0
- package/api/resources/events/index.d.ts +1 -0
- package/api/resources/events/index.js +17 -0
- package/api/resources/index.d.ts +19 -0
- package/api/resources/index.js +48 -0
- package/api/resources/modelSync/client/Client.d.ts +131 -0
- package/api/resources/modelSync/client/Client.js +552 -0
- package/api/resources/modelSync/client/index.d.ts +1 -0
- package/api/resources/modelSync/client/index.js +17 -0
- package/api/resources/modelSync/client/requests/V2CreateSyncRequest.d.ts +48 -0
- package/api/resources/modelSync/client/requests/V2CreateSyncRequest.js +5 -0
- package/api/resources/modelSync/client/requests/V2StartSyncRequest.d.ts +10 -0
- package/api/resources/modelSync/client/requests/V2StartSyncRequest.js +5 -0
- package/api/resources/modelSync/client/requests/V2UpdateSyncRequest.d.ts +48 -0
- package/api/resources/modelSync/client/requests/V2UpdateSyncRequest.js +5 -0
- package/api/resources/modelSync/client/requests/index.d.ts +3 -0
- package/api/resources/modelSync/client/requests/index.js +2 -0
- package/api/resources/modelSync/index.d.ts +3 -0
- package/api/resources/modelSync/index.js +19 -0
- package/api/resources/modelSync/resources/executions/client/Client.d.ts +36 -0
- package/api/resources/modelSync/resources/executions/client/Client.js +169 -0
- package/api/resources/modelSync/resources/executions/client/index.d.ts +1 -0
- package/api/resources/modelSync/resources/executions/client/index.js +2 -0
- package/api/resources/modelSync/resources/executions/index.d.ts +1 -0
- package/api/resources/modelSync/resources/executions/index.js +17 -0
- package/api/resources/modelSync/resources/index.d.ts +1 -0
- package/api/resources/modelSync/resources/index.js +27 -0
- package/api/resources/modelSync/types/V2CreateSyncRequestMode.d.ts +12 -0
- package/api/resources/modelSync/types/V2CreateSyncRequestMode.js +14 -0
- package/api/resources/modelSync/types/V2UpdateSyncRequestMode.d.ts +12 -0
- package/api/resources/modelSync/types/V2UpdateSyncRequestMode.js +14 -0
- package/api/resources/modelSync/types/index.d.ts +2 -0
- package/api/resources/modelSync/types/index.js +18 -0
- package/api/resources/models/client/Client.d.ts +63 -0
- package/api/resources/models/client/Client.js +339 -0
- package/api/resources/models/client/index.d.ts +1 -0
- package/api/resources/models/client/index.js +17 -0
- package/api/resources/models/client/requests/V2CreateModelRequest.d.ts +24 -0
- package/api/resources/models/client/requests/V2CreateModelRequest.js +5 -0
- package/api/resources/models/client/requests/V2UpdateModelRequest.d.ts +24 -0
- package/api/resources/models/client/requests/V2UpdateModelRequest.js +5 -0
- package/api/resources/models/client/requests/index.d.ts +2 -0
- package/api/resources/models/client/requests/index.js +2 -0
- package/api/resources/models/index.d.ts +1 -0
- package/api/resources/models/index.js +17 -0
- package/api/resources/organization/client/Client.d.ts +76 -0
- package/api/resources/organization/client/Client.js +352 -0
- package/api/resources/organization/client/index.d.ts +1 -0
- package/api/resources/organization/client/index.js +17 -0
- package/api/resources/organization/client/requests/V2CreateOrganizationRequestSchema.d.ts +17 -0
- package/api/resources/organization/client/requests/V2CreateOrganizationRequestSchema.js +5 -0
- package/api/resources/organization/client/requests/V2UpdateOrganizationRequestSchema.d.ts +17 -0
- package/api/resources/organization/client/requests/V2UpdateOrganizationRequestSchema.js +5 -0
- package/api/resources/organization/client/requests/index.d.ts +2 -0
- package/api/resources/organization/client/requests/index.js +2 -0
- package/api/resources/organization/index.d.ts +1 -0
- package/api/resources/organization/index.js +17 -0
- package/api/resources/permissions/client/Client.d.ts +26 -0
- package/api/resources/permissions/client/Client.js +22 -0
- package/api/resources/permissions/client/index.d.ts +1 -0
- package/api/resources/permissions/client/index.js +2 -0
- package/api/resources/permissions/index.d.ts +2 -0
- package/api/resources/permissions/index.js +18 -0
- package/api/resources/permissions/resources/index.d.ts +4 -0
- package/api/resources/permissions/resources/index.js +33 -0
- package/api/resources/permissions/resources/policies/client/Client.d.ts +69 -0
- package/api/resources/permissions/resources/policies/client/Client.js +345 -0
- package/api/resources/permissions/resources/policies/client/index.d.ts +1 -0
- package/api/resources/permissions/resources/policies/client/index.js +17 -0
- package/api/resources/permissions/resources/policies/client/requests/V2CreatePolicyRequest.d.ts +19 -0
- package/api/resources/permissions/resources/policies/client/requests/V2CreatePolicyRequest.js +5 -0
- package/api/resources/permissions/resources/policies/client/requests/V2UpdatePolicyRequest.d.ts +19 -0
- package/api/resources/permissions/resources/policies/client/requests/V2UpdatePolicyRequest.js +5 -0
- package/api/resources/permissions/resources/policies/client/requests/index.d.ts +2 -0
- package/api/resources/permissions/resources/policies/client/requests/index.js +2 -0
- package/api/resources/permissions/resources/policies/index.d.ts +1 -0
- package/api/resources/permissions/resources/policies/index.js +17 -0
- package/api/resources/permissions/resources/roles/client/Client.d.ts +61 -0
- package/api/resources/permissions/resources/roles/client/Client.js +337 -0
- package/api/resources/permissions/resources/roles/client/index.d.ts +1 -0
- package/api/resources/permissions/resources/roles/client/index.js +17 -0
- package/api/resources/permissions/resources/roles/client/requests/V2CreateRoleRequest.d.ts +13 -0
- package/api/resources/permissions/resources/roles/client/requests/V2CreateRoleRequest.js +5 -0
- package/api/resources/permissions/resources/roles/client/requests/V2UpdateRoleRequest.d.ts +13 -0
- package/api/resources/permissions/resources/roles/client/requests/V2UpdateRoleRequest.js +5 -0
- package/api/resources/permissions/resources/roles/client/requests/index.d.ts +2 -0
- package/api/resources/permissions/resources/roles/client/requests/index.js +2 -0
- package/api/resources/permissions/resources/roles/index.d.ts +1 -0
- package/api/resources/permissions/resources/roles/index.js +17 -0
- package/api/resources/schemas/client/Client.d.ts +29 -0
- package/api/resources/schemas/client/Client.js +115 -0
- package/api/resources/schemas/client/index.d.ts +1 -0
- package/api/resources/schemas/client/index.js +2 -0
- package/api/resources/schemas/index.d.ts +1 -0
- package/api/resources/schemas/index.js +17 -0
- package/api/resources/users/client/Client.d.ts +86 -0
- package/api/resources/users/client/Client.js +415 -0
- package/api/resources/users/client/index.d.ts +1 -0
- package/api/resources/users/client/index.js +17 -0
- package/api/resources/users/client/requests/UsersCreateApiKeyRequest.d.ts +10 -0
- package/api/resources/users/client/requests/UsersCreateApiKeyRequest.js +5 -0
- package/api/resources/users/client/requests/V2CreateUserRequestSchema.d.ts +13 -0
- package/api/resources/users/client/requests/V2CreateUserRequestSchema.js +5 -0
- package/api/resources/users/client/requests/V2UpdateUserRequestSchema.d.ts +13 -0
- package/api/resources/users/client/requests/V2UpdateUserRequestSchema.js +5 -0
- package/api/resources/users/client/requests/index.d.ts +3 -0
- package/api/resources/users/client/requests/index.js +2 -0
- package/api/resources/users/index.d.ts +1 -0
- package/api/resources/users/index.js +17 -0
- package/api/resources/webhooks/client/Client.d.ts +83 -0
- package/api/resources/webhooks/client/Client.js +359 -0
- package/api/resources/webhooks/client/index.d.ts +1 -0
- package/api/resources/webhooks/client/index.js +17 -0
- package/api/resources/webhooks/client/requests/V2CreateWebhooksSchema.d.ts +15 -0
- package/api/resources/webhooks/client/requests/V2CreateWebhooksSchema.js +5 -0
- package/api/resources/webhooks/client/requests/V2UpdateWebhooksSchema.d.ts +15 -0
- package/api/resources/webhooks/client/requests/V2UpdateWebhooksSchema.js +5 -0
- package/api/resources/webhooks/client/requests/index.d.ts +2 -0
- package/api/resources/webhooks/client/requests/index.js +2 -0
- package/api/resources/webhooks/index.d.ts +1 -0
- package/api/resources/webhooks/index.js +17 -0
- package/api/types/BulkSchedule.d.ts +11 -0
- package/api/types/BulkSchedule.js +5 -0
- package/api/types/LabelLabel.d.ts +4 -0
- package/api/types/LabelLabel.js +5 -0
- package/api/types/RestErrResponse.d.ts +13 -0
- package/api/types/RestErrResponse.js +5 -0
- package/api/types/SchemaAssociation.d.ts +9 -0
- package/api/types/SchemaAssociation.js +5 -0
- package/api/types/SyncDestinationProperties.d.ts +15 -0
- package/api/types/SyncDestinationProperties.js +5 -0
- package/api/types/V2ActivateSyncEnvelope.d.ts +7 -0
- package/api/types/V2ActivateSyncEnvelope.js +5 -0
- package/api/types/V2ActivateSyncInput.d.ts +6 -0
- package/api/types/V2ActivateSyncInput.js +5 -0
- package/api/types/V2ActivateSyncOutput.d.ts +7 -0
- package/api/types/V2ActivateSyncOutput.js +5 -0
- package/api/types/V2ApiKeyResponse.d.ts +6 -0
- package/api/types/V2ApiKeyResponse.js +5 -0
- package/api/types/V2ApiKeyResponseEnvelope.d.ts +7 -0
- package/api/types/V2ApiKeyResponseEnvelope.js +5 -0
- package/api/types/V2BulkSyncDest.d.ts +8 -0
- package/api/types/V2BulkSyncDest.js +5 -0
- package/api/types/V2BulkSyncDestEnvelope.d.ts +7 -0
- package/api/types/V2BulkSyncDestEnvelope.js +5 -0
- package/api/types/V2BulkSyncListEnvelope.d.ts +7 -0
- package/api/types/V2BulkSyncListEnvelope.js +5 -0
- package/api/types/V2BulkSyncResponse.d.ts +18 -0
- package/api/types/V2BulkSyncResponse.js +5 -0
- package/api/types/V2BulkSyncResponseEnvelope.d.ts +7 -0
- package/api/types/V2BulkSyncResponseEnvelope.js +5 -0
- package/api/types/V2ConfigurationValue.d.ts +7 -0
- package/api/types/V2ConfigurationValue.js +5 -0
- package/api/types/V2ConnectionListResponseEnvelope.d.ts +7 -0
- package/api/types/V2ConnectionListResponseEnvelope.js +5 -0
- package/api/types/V2ConnectionMeta.d.ts +8 -0
- package/api/types/V2ConnectionMeta.js +5 -0
- package/api/types/V2ConnectionMetaResponse.d.ts +9 -0
- package/api/types/V2ConnectionMetaResponse.js +5 -0
- package/api/types/V2ConnectionResponseEnvelope.d.ts +7 -0
- package/api/types/V2ConnectionResponseEnvelope.js +5 -0
- package/api/types/V2ConnectionResponseSchema.d.ts +14 -0
- package/api/types/V2ConnectionResponseSchema.js +5 -0
- package/api/types/V2ConnectionType.d.ts +9 -0
- package/api/types/V2ConnectionType.js +5 -0
- package/api/types/V2ConnectionTypeResponseEnvelope.d.ts +7 -0
- package/api/types/V2ConnectionTypeResponseEnvelope.js +5 -0
- package/api/types/V2ConnectionTypeSchema.d.ts +7 -0
- package/api/types/V2ConnectionTypeSchema.js +5 -0
- package/api/types/V2CreateConnectionResponseEnvelope.d.ts +7 -0
- package/api/types/V2CreateConnectionResponseEnvelope.js +5 -0
- package/api/types/V2CreateConnectionResponseSchema.d.ts +18 -0
- package/api/types/V2CreateConnectionResponseSchema.js +5 -0
- package/api/types/V2Event.d.ts +10 -0
- package/api/types/V2Event.js +5 -0
- package/api/types/V2EventTypesEnvelope.d.ts +6 -0
- package/api/types/V2EventTypesEnvelope.js +5 -0
- package/api/types/V2EventsEnvelope.d.ts +7 -0
- package/api/types/V2EventsEnvelope.js +5 -0
- package/api/types/V2ExecutionCounts.d.ts +9 -0
- package/api/types/V2ExecutionCounts.js +5 -0
- package/api/types/V2Filter.d.ts +10 -0
- package/api/types/V2Filter.js +5 -0
- package/api/types/V2GetConnectionMetaEnvelope.d.ts +7 -0
- package/api/types/V2GetConnectionMetaEnvelope.js +5 -0
- package/api/types/V2GetExecutionResponseEnvelope.d.ts +7 -0
- package/api/types/V2GetExecutionResponseEnvelope.js +5 -0
- package/api/types/V2GetExecutionResponseSchema.d.ts +14 -0
- package/api/types/V2GetExecutionResponseSchema.js +5 -0
- package/api/types/V2GetIdentityResponseEnvelope.d.ts +7 -0
- package/api/types/V2GetIdentityResponseEnvelope.js +5 -0
- package/api/types/V2GetIdentityResponseSchema.d.ts +14 -0
- package/api/types/V2GetIdentityResponseSchema.js +5 -0
- package/api/types/V2Identity.d.ts +11 -0
- package/api/types/V2Identity.js +5 -0
- package/api/types/V2IdentityFunction.d.ts +7 -0
- package/api/types/V2IdentityFunction.js +5 -0
- package/api/types/V2ListExecutionResponseEnvelope.d.ts +7 -0
- package/api/types/V2ListExecutionResponseEnvelope.js +5 -0
- package/api/types/V2ListPoliciesResponseEnvelope.d.ts +7 -0
- package/api/types/V2ListPoliciesResponseEnvelope.js +5 -0
- package/api/types/V2ListSyncResponseEnvelope.d.ts +7 -0
- package/api/types/V2ListSyncResponseEnvelope.js +5 -0
- package/api/types/V2ListUsersEnvelope.d.ts +7 -0
- package/api/types/V2ListUsersEnvelope.js +5 -0
- package/api/types/V2Mode.d.ts +11 -0
- package/api/types/V2Mode.js +5 -0
- package/api/types/V2ModelField.d.ts +13 -0
- package/api/types/V2ModelField.js +5 -0
- package/api/types/V2ModelFieldRequest.d.ts +9 -0
- package/api/types/V2ModelFieldRequest.js +5 -0
- package/api/types/V2ModelFieldResponse.d.ts +7 -0
- package/api/types/V2ModelFieldResponse.js +5 -0
- package/api/types/V2ModelListResponseEnvelope.d.ts +7 -0
- package/api/types/V2ModelListResponseEnvelope.js +5 -0
- package/api/types/V2ModelResponse.d.ts +19 -0
- package/api/types/V2ModelResponse.js +5 -0
- package/api/types/V2ModelResponseEnvelope.d.ts +7 -0
- package/api/types/V2ModelResponseEnvelope.js +5 -0
- package/api/types/V2Organization.d.ts +10 -0
- package/api/types/V2Organization.js +5 -0
- package/api/types/V2OrganizationEnvelope.d.ts +7 -0
- package/api/types/V2OrganizationEnvelope.js +5 -0
- package/api/types/V2OrganizationsEnvelope.d.ts +7 -0
- package/api/types/V2OrganizationsEnvelope.js +5 -0
- package/api/types/V2Override.d.ts +9 -0
- package/api/types/V2Override.js +5 -0
- package/api/types/V2PolicyAction.d.ts +7 -0
- package/api/types/V2PolicyAction.js +5 -0
- package/api/types/V2PolicyResponse.d.ts +11 -0
- package/api/types/V2PolicyResponse.js +5 -0
- package/api/types/V2PolicyResponseEnvelope.d.ts +7 -0
- package/api/types/V2PolicyResponseEnvelope.js +5 -0
- package/api/types/V2Relation.d.ts +8 -0
- package/api/types/V2Relation.js +5 -0
- package/api/types/V2RelationTo.d.ts +7 -0
- package/api/types/V2RelationTo.js +5 -0
- package/api/types/V2RoleListResponseEnvelope.d.ts +7 -0
- package/api/types/V2RoleListResponseEnvelope.js +5 -0
- package/api/types/V2RoleResponse.d.ts +9 -0
- package/api/types/V2RoleResponse.js +5 -0
- package/api/types/V2RoleResponseEnvelope.d.ts +7 -0
- package/api/types/V2RoleResponseEnvelope.js +5 -0
- package/api/types/V2RunAfter.d.ts +7 -0
- package/api/types/V2RunAfter.js +5 -0
- package/api/types/V2Schedule.d.ts +13 -0
- package/api/types/V2Schedule.js +5 -0
- package/api/types/V2Source.d.ts +7 -0
- package/api/types/V2Source.js +5 -0
- package/api/types/V2StartSyncResponseEnvelope.d.ts +7 -0
- package/api/types/V2StartSyncResponseEnvelope.js +5 -0
- package/api/types/V2StartSyncResponseSchema.d.ts +8 -0
- package/api/types/V2StartSyncResponseSchema.js +5 -0
- package/api/types/V2SupportedMode.d.ts +12 -0
- package/api/types/V2SupportedMode.js +5 -0
- package/api/types/V2SyncField.d.ts +11 -0
- package/api/types/V2SyncField.js +5 -0
- package/api/types/V2SyncResponse.d.ts +21 -0
- package/api/types/V2SyncResponse.js +5 -0
- package/api/types/V2SyncResponseEnvelope.d.ts +7 -0
- package/api/types/V2SyncResponseEnvelope.js +5 -0
- package/api/types/V2SyncStatusEnvelope.d.ts +7 -0
- package/api/types/V2SyncStatusEnvelope.js +5 -0
- package/api/types/V2SyncStatusResponse.d.ts +9 -0
- package/api/types/V2SyncStatusResponse.js +5 -0
- package/api/types/V2Target.d.ts +11 -0
- package/api/types/V2Target.js +5 -0
- package/api/types/V2TargetField.d.ts +18 -0
- package/api/types/V2TargetField.js +5 -0
- package/api/types/V2TargetResponse.d.ts +12 -0
- package/api/types/V2TargetResponse.js +5 -0
- package/api/types/V2TargetResponseEnvelope.d.ts +7 -0
- package/api/types/V2TargetResponseEnvelope.js +5 -0
- package/api/types/V2User.d.ts +9 -0
- package/api/types/V2User.js +5 -0
- package/api/types/V2UserEnvelope.d.ts +7 -0
- package/api/types/V2UserEnvelope.js +5 -0
- package/api/types/V2Webhook.d.ts +10 -0
- package/api/types/V2Webhook.js +5 -0
- package/api/types/V2WebhookEnvelope.d.ts +7 -0
- package/api/types/V2WebhookEnvelope.js +5 -0
- package/api/types/V2WebhookListEnvelope.d.ts +7 -0
- package/api/types/V2WebhookListEnvelope.js +5 -0
- package/api/types/V3BulkField.d.ts +8 -0
- package/api/types/V3BulkField.js +5 -0
- package/api/types/V3BulkSchema.d.ts +10 -0
- package/api/types/V3BulkSchema.js +5 -0
- package/api/types/V3BulkSchemaEnvelope.d.ts +7 -0
- package/api/types/V3BulkSchemaEnvelope.js +5 -0
- package/api/types/V3BulkSyncExecution.d.ts +15 -0
- package/api/types/V3BulkSyncExecution.js +5 -0
- package/api/types/V3BulkSyncExecutionEnvelope.d.ts +7 -0
- package/api/types/V3BulkSyncExecutionEnvelope.js +5 -0
- package/api/types/V3BulkSyncSchemaExecution.d.ts +12 -0
- package/api/types/V3BulkSyncSchemaExecution.js +5 -0
- package/api/types/V3BulkSyncSource.d.ts +8 -0
- package/api/types/V3BulkSyncSource.js +5 -0
- package/api/types/V3BulkSyncSourceEnvelope.d.ts +7 -0
- package/api/types/V3BulkSyncSourceEnvelope.js +5 -0
- package/api/types/V3BulkSyncSourceSchemaEnvelope.d.ts +7 -0
- package/api/types/V3BulkSyncSourceSchemaEnvelope.js +5 -0
- package/api/types/V3BulkSyncSourceStatus.d.ts +8 -0
- package/api/types/V3BulkSyncSourceStatus.js +5 -0
- package/api/types/V3BulkSyncSourceStatusEnvelope.d.ts +7 -0
- package/api/types/V3BulkSyncSourceStatusEnvelope.js +5 -0
- package/api/types/V3BulkSyncStatusEnvelope.d.ts +7 -0
- package/api/types/V3BulkSyncStatusEnvelope.js +5 -0
- package/api/types/V3BulkSyncStatusResponse.d.ts +9 -0
- package/api/types/V3BulkSyncStatusResponse.js +5 -0
- package/api/types/V3ConnectCardResponse.d.ts +7 -0
- package/api/types/V3ConnectCardResponse.js +5 -0
- package/api/types/V3ConnectCardResponseEnvelope.d.ts +7 -0
- package/api/types/V3ConnectCardResponseEnvelope.js +5 -0
- package/api/types/V3ListBulkSchemaEnvelope.d.ts +7 -0
- package/api/types/V3ListBulkSchemaEnvelope.js +5 -0
- package/api/types/V3ListBulkSyncExecutionsEnvelope.d.ts +7 -0
- package/api/types/V3ListBulkSyncExecutionsEnvelope.js +5 -0
- package/api/types/V3PickValue.d.ts +7 -0
- package/api/types/V3PickValue.js +5 -0
- package/api/types/V3Schema.d.ts +9 -0
- package/api/types/V3Schema.js +5 -0
- package/api/types/V3SchemaField.d.ts +12 -0
- package/api/types/V3SchemaField.js +5 -0
- package/api/types/V3SchemaRecordsResponseEnvelope.d.ts +6 -0
- package/api/types/V3SchemaRecordsResponseEnvelope.js +5 -0
- package/api/types/index.d.ts +102 -0
- package/api/types/index.js +118 -0
- package/core/auth/BasicAuth.d.ts +8 -0
- package/core/auth/BasicAuth.js +26 -0
- package/core/auth/BearerToken.d.ts +5 -0
- package/core/auth/BearerToken.js +15 -0
- package/core/auth/index.d.ts +2 -0
- package/core/auth/index.js +7 -0
- package/core/fetcher/APIResponse.d.ts +10 -0
- package/core/fetcher/APIResponse.js +2 -0
- package/core/fetcher/Fetcher.d.ts +35 -0
- package/core/fetcher/Fetcher.js +151 -0
- package/core/fetcher/Supplier.d.ts +4 -0
- package/core/fetcher/Supplier.js +22 -0
- package/core/fetcher/getHeader.d.ts +1 -0
- package/core/fetcher/getHeader.js +12 -0
- package/core/fetcher/index.d.ts +5 -0
- package/core/fetcher/index.js +9 -0
- package/core/index.d.ts +2 -0
- package/core/index.js +18 -0
- package/dist/Client.d.ts +50 -0
- package/dist/Client.js +62 -0
- package/dist/api/errors/UnauthorizedError.d.ts +8 -0
- package/dist/api/errors/UnauthorizedError.js +41 -0
- package/dist/api/errors/index.d.ts +1 -0
- package/dist/api/errors/index.js +17 -0
- package/dist/api/index.d.ts +3 -0
- package/dist/api/index.js +19 -0
- package/dist/api/resources/bulkSync/client/Client.d.ts +126 -0
- package/dist/api/resources/bulkSync/client/Client.js +710 -0
- package/dist/api/resources/bulkSync/client/index.d.ts +1 -0
- package/dist/api/resources/bulkSync/client/index.js +17 -0
- package/dist/api/resources/bulkSync/client/requests/BulkSyncGetRequest.d.ts +10 -0
- package/dist/api/resources/bulkSync/client/requests/BulkSyncGetRequest.js +5 -0
- package/dist/api/resources/bulkSync/client/requests/BulkSyncGetSourceRequest.d.ts +11 -0
- package/dist/api/resources/bulkSync/client/requests/BulkSyncGetSourceRequest.js +5 -0
- package/dist/api/resources/bulkSync/client/requests/BulkSyncRemoveRequest.d.ts +10 -0
- package/dist/api/resources/bulkSync/client/requests/BulkSyncRemoveRequest.js +5 -0
- package/dist/api/resources/bulkSync/client/requests/V2CreateBulkSyncRequest.d.ts +34 -0
- package/dist/api/resources/bulkSync/client/requests/V2CreateBulkSyncRequest.js +5 -0
- package/dist/api/resources/bulkSync/client/requests/V2UpdateBulkSyncRequest.d.ts +29 -0
- package/dist/api/resources/bulkSync/client/requests/V2UpdateBulkSyncRequest.js +5 -0
- package/dist/api/resources/bulkSync/client/requests/index.d.ts +5 -0
- package/dist/api/resources/bulkSync/client/requests/index.js +2 -0
- package/dist/api/resources/bulkSync/index.d.ts +2 -0
- package/dist/api/resources/bulkSync/index.js +18 -0
- package/dist/api/resources/bulkSync/resources/executions/client/Client.d.ts +43 -0
- package/dist/api/resources/bulkSync/resources/executions/client/Client.js +224 -0
- package/dist/api/resources/bulkSync/resources/executions/client/index.d.ts +1 -0
- package/dist/api/resources/bulkSync/resources/executions/client/index.js +17 -0
- package/dist/api/resources/bulkSync/resources/executions/client/requests/V3StartBulkSyncRequest.d.ts +12 -0
- package/dist/api/resources/bulkSync/resources/executions/client/requests/V3StartBulkSyncRequest.js +5 -0
- package/dist/api/resources/bulkSync/resources/executions/client/requests/index.d.ts +1 -0
- package/dist/api/resources/bulkSync/resources/executions/client/requests/index.js +2 -0
- package/dist/api/resources/bulkSync/resources/executions/index.d.ts +1 -0
- package/dist/api/resources/bulkSync/resources/executions/index.js +17 -0
- package/dist/api/resources/bulkSync/resources/index.d.ts +4 -0
- package/dist/api/resources/bulkSync/resources/index.js +33 -0
- package/dist/api/resources/bulkSync/resources/schemas/client/Client.d.ts +43 -0
- package/dist/api/resources/bulkSync/resources/schemas/client/Client.js +224 -0
- package/dist/api/resources/bulkSync/resources/schemas/client/index.d.ts +1 -0
- package/dist/api/resources/bulkSync/resources/schemas/client/index.js +17 -0
- package/dist/api/resources/bulkSync/resources/schemas/client/requests/V3UpdateBulkSchema.d.ts +13 -0
- package/dist/api/resources/bulkSync/resources/schemas/client/requests/V3UpdateBulkSchema.js +5 -0
- package/dist/api/resources/bulkSync/resources/schemas/client/requests/index.d.ts +1 -0
- package/dist/api/resources/bulkSync/resources/schemas/client/requests/index.js +2 -0
- package/dist/api/resources/bulkSync/resources/schemas/index.d.ts +1 -0
- package/dist/api/resources/bulkSync/resources/schemas/index.js +17 -0
- package/dist/api/resources/connections/client/Client.d.ts +111 -0
- package/dist/api/resources/connections/client/Client.js +729 -0
- package/dist/api/resources/connections/client/index.d.ts +1 -0
- package/dist/api/resources/connections/client/index.js +17 -0
- package/dist/api/resources/connections/client/requests/ConnectionsGetTargetRequest.d.ts +11 -0
- package/dist/api/resources/connections/client/requests/ConnectionsGetTargetRequest.js +5 -0
- package/dist/api/resources/connections/client/requests/ConnectionsRemoveRequest.d.ts +10 -0
- package/dist/api/resources/connections/client/requests/ConnectionsRemoveRequest.js +5 -0
- package/dist/api/resources/connections/client/requests/V2CreateConnectionRequestSchema.d.ts +21 -0
- package/dist/api/resources/connections/client/requests/V2CreateConnectionRequestSchema.js +5 -0
- package/dist/api/resources/connections/client/requests/V2ModelFieldsRequest.d.ts +10 -0
- package/dist/api/resources/connections/client/requests/V2ModelFieldsRequest.js +5 -0
- package/dist/api/resources/connections/client/requests/V2TargetRequest.d.ts +13 -0
- package/dist/api/resources/connections/client/requests/V2TargetRequest.js +5 -0
- package/dist/api/resources/connections/client/requests/V2UpdateConnectionRequestSchema.d.ts +19 -0
- package/dist/api/resources/connections/client/requests/V2UpdateConnectionRequestSchema.js +5 -0
- package/dist/api/resources/connections/client/requests/V3ConnectCardRequest.d.ts +19 -0
- package/dist/api/resources/connections/client/requests/V3ConnectCardRequest.js +5 -0
- package/dist/api/resources/connections/client/requests/index.d.ts +7 -0
- package/dist/api/resources/connections/client/requests/index.js +2 -0
- package/dist/api/resources/connections/index.d.ts +1 -0
- package/dist/api/resources/connections/index.js +17 -0
- package/dist/api/resources/events/client/Client.d.ts +40 -0
- package/dist/api/resources/events/client/Client.js +191 -0
- package/dist/api/resources/events/client/index.d.ts +1 -0
- package/dist/api/resources/events/client/index.js +17 -0
- package/dist/api/resources/events/client/requests/EventsApiV2GetEventsRequest.d.ts +18 -0
- package/dist/api/resources/events/client/requests/EventsApiV2GetEventsRequest.js +5 -0
- package/dist/api/resources/events/client/requests/index.d.ts +1 -0
- package/dist/api/resources/events/client/requests/index.js +2 -0
- package/dist/api/resources/events/index.d.ts +1 -0
- package/dist/api/resources/events/index.js +17 -0
- package/dist/api/resources/index.d.ts +19 -0
- package/dist/api/resources/index.js +48 -0
- package/dist/api/resources/modelSync/client/Client.d.ts +131 -0
- package/dist/api/resources/modelSync/client/Client.js +552 -0
- package/dist/api/resources/modelSync/client/index.d.ts +1 -0
- package/dist/api/resources/modelSync/client/index.js +17 -0
- package/dist/api/resources/modelSync/client/requests/V2CreateSyncRequest.d.ts +48 -0
- package/dist/api/resources/modelSync/client/requests/V2CreateSyncRequest.js +5 -0
- package/dist/api/resources/modelSync/client/requests/V2StartSyncRequest.d.ts +10 -0
- package/dist/api/resources/modelSync/client/requests/V2StartSyncRequest.js +5 -0
- package/dist/api/resources/modelSync/client/requests/V2UpdateSyncRequest.d.ts +48 -0
- package/dist/api/resources/modelSync/client/requests/V2UpdateSyncRequest.js +5 -0
- package/dist/api/resources/modelSync/client/requests/index.d.ts +3 -0
- package/dist/api/resources/modelSync/client/requests/index.js +2 -0
- package/dist/api/resources/modelSync/index.d.ts +3 -0
- package/dist/api/resources/modelSync/index.js +19 -0
- package/dist/api/resources/modelSync/resources/executions/client/Client.d.ts +36 -0
- package/dist/api/resources/modelSync/resources/executions/client/Client.js +169 -0
- package/dist/api/resources/modelSync/resources/executions/client/index.d.ts +1 -0
- package/dist/api/resources/modelSync/resources/executions/client/index.js +2 -0
- package/dist/api/resources/modelSync/resources/executions/index.d.ts +1 -0
- package/dist/api/resources/modelSync/resources/executions/index.js +17 -0
- package/dist/api/resources/modelSync/resources/index.d.ts +1 -0
- package/dist/api/resources/modelSync/resources/index.js +27 -0
- package/dist/api/resources/modelSync/types/V2CreateSyncRequestMode.d.ts +12 -0
- package/dist/api/resources/modelSync/types/V2CreateSyncRequestMode.js +14 -0
- package/dist/api/resources/modelSync/types/V2UpdateSyncRequestMode.d.ts +12 -0
- package/dist/api/resources/modelSync/types/V2UpdateSyncRequestMode.js +14 -0
- package/dist/api/resources/modelSync/types/index.d.ts +2 -0
- package/dist/api/resources/modelSync/types/index.js +18 -0
- package/dist/api/resources/models/client/Client.d.ts +63 -0
- package/dist/api/resources/models/client/Client.js +339 -0
- package/dist/api/resources/models/client/index.d.ts +1 -0
- package/dist/api/resources/models/client/index.js +17 -0
- package/dist/api/resources/models/client/requests/V2CreateModelRequest.d.ts +24 -0
- package/dist/api/resources/models/client/requests/V2CreateModelRequest.js +5 -0
- package/dist/api/resources/models/client/requests/V2UpdateModelRequest.d.ts +24 -0
- package/dist/api/resources/models/client/requests/V2UpdateModelRequest.js +5 -0
- package/dist/api/resources/models/client/requests/index.d.ts +2 -0
- package/dist/api/resources/models/client/requests/index.js +2 -0
- package/dist/api/resources/models/index.d.ts +1 -0
- package/dist/api/resources/models/index.js +17 -0
- package/dist/api/resources/organization/client/Client.d.ts +76 -0
- package/dist/api/resources/organization/client/Client.js +352 -0
- package/dist/api/resources/organization/client/index.d.ts +1 -0
- package/dist/api/resources/organization/client/index.js +17 -0
- package/dist/api/resources/organization/client/requests/V2CreateOrganizationRequestSchema.d.ts +17 -0
- package/dist/api/resources/organization/client/requests/V2CreateOrganizationRequestSchema.js +5 -0
- package/dist/api/resources/organization/client/requests/V2UpdateOrganizationRequestSchema.d.ts +17 -0
- package/dist/api/resources/organization/client/requests/V2UpdateOrganizationRequestSchema.js +5 -0
- package/dist/api/resources/organization/client/requests/index.d.ts +2 -0
- package/dist/api/resources/organization/client/requests/index.js +2 -0
- package/dist/api/resources/organization/index.d.ts +1 -0
- package/dist/api/resources/organization/index.js +17 -0
- package/dist/api/resources/permissions/client/Client.d.ts +26 -0
- package/dist/api/resources/permissions/client/Client.js +22 -0
- package/dist/api/resources/permissions/client/index.d.ts +1 -0
- package/dist/api/resources/permissions/client/index.js +2 -0
- package/dist/api/resources/permissions/index.d.ts +2 -0
- package/dist/api/resources/permissions/index.js +18 -0
- package/dist/api/resources/permissions/resources/index.d.ts +4 -0
- package/dist/api/resources/permissions/resources/index.js +33 -0
- package/dist/api/resources/permissions/resources/policies/client/Client.d.ts +69 -0
- package/dist/api/resources/permissions/resources/policies/client/Client.js +345 -0
- package/dist/api/resources/permissions/resources/policies/client/index.d.ts +1 -0
- package/dist/api/resources/permissions/resources/policies/client/index.js +17 -0
- package/dist/api/resources/permissions/resources/policies/client/requests/V2CreatePolicyRequest.d.ts +19 -0
- package/dist/api/resources/permissions/resources/policies/client/requests/V2CreatePolicyRequest.js +5 -0
- package/dist/api/resources/permissions/resources/policies/client/requests/V2UpdatePolicyRequest.d.ts +19 -0
- package/dist/api/resources/permissions/resources/policies/client/requests/V2UpdatePolicyRequest.js +5 -0
- package/dist/api/resources/permissions/resources/policies/client/requests/index.d.ts +2 -0
- package/dist/api/resources/permissions/resources/policies/client/requests/index.js +2 -0
- package/dist/api/resources/permissions/resources/policies/index.d.ts +1 -0
- package/dist/api/resources/permissions/resources/policies/index.js +17 -0
- package/dist/api/resources/permissions/resources/roles/client/Client.d.ts +61 -0
- package/dist/api/resources/permissions/resources/roles/client/Client.js +337 -0
- package/dist/api/resources/permissions/resources/roles/client/index.d.ts +1 -0
- package/dist/api/resources/permissions/resources/roles/client/index.js +17 -0
- package/dist/api/resources/permissions/resources/roles/client/requests/V2CreateRoleRequest.d.ts +13 -0
- package/dist/api/resources/permissions/resources/roles/client/requests/V2CreateRoleRequest.js +5 -0
- package/dist/api/resources/permissions/resources/roles/client/requests/V2UpdateRoleRequest.d.ts +13 -0
- package/dist/api/resources/permissions/resources/roles/client/requests/V2UpdateRoleRequest.js +5 -0
- package/dist/api/resources/permissions/resources/roles/client/requests/index.d.ts +2 -0
- package/dist/api/resources/permissions/resources/roles/client/requests/index.js +2 -0
- package/dist/api/resources/permissions/resources/roles/index.d.ts +1 -0
- package/dist/api/resources/permissions/resources/roles/index.js +17 -0
- package/dist/api/resources/schemas/client/Client.d.ts +29 -0
- package/dist/api/resources/schemas/client/Client.js +115 -0
- package/dist/api/resources/schemas/client/index.d.ts +1 -0
- package/dist/api/resources/schemas/client/index.js +2 -0
- package/dist/api/resources/schemas/index.d.ts +1 -0
- package/dist/api/resources/schemas/index.js +17 -0
- package/dist/api/resources/users/client/Client.d.ts +86 -0
- package/dist/api/resources/users/client/Client.js +415 -0
- package/dist/api/resources/users/client/index.d.ts +1 -0
- package/dist/api/resources/users/client/index.js +17 -0
- package/dist/api/resources/users/client/requests/UsersCreateApiKeyRequest.d.ts +10 -0
- package/dist/api/resources/users/client/requests/UsersCreateApiKeyRequest.js +5 -0
- package/dist/api/resources/users/client/requests/V2CreateUserRequestSchema.d.ts +13 -0
- package/dist/api/resources/users/client/requests/V2CreateUserRequestSchema.js +5 -0
- package/dist/api/resources/users/client/requests/V2UpdateUserRequestSchema.d.ts +13 -0
- package/dist/api/resources/users/client/requests/V2UpdateUserRequestSchema.js +5 -0
- package/dist/api/resources/users/client/requests/index.d.ts +3 -0
- package/dist/api/resources/users/client/requests/index.js +2 -0
- package/dist/api/resources/users/index.d.ts +1 -0
- package/dist/api/resources/users/index.js +17 -0
- package/dist/api/resources/webhooks/client/Client.d.ts +83 -0
- package/dist/api/resources/webhooks/client/Client.js +359 -0
- package/dist/api/resources/webhooks/client/index.d.ts +1 -0
- package/dist/api/resources/webhooks/client/index.js +17 -0
- package/dist/api/resources/webhooks/client/requests/V2CreateWebhooksSchema.d.ts +15 -0
- package/dist/api/resources/webhooks/client/requests/V2CreateWebhooksSchema.js +5 -0
- package/dist/api/resources/webhooks/client/requests/V2UpdateWebhooksSchema.d.ts +15 -0
- package/dist/api/resources/webhooks/client/requests/V2UpdateWebhooksSchema.js +5 -0
- package/dist/api/resources/webhooks/client/requests/index.d.ts +2 -0
- package/dist/api/resources/webhooks/client/requests/index.js +2 -0
- package/dist/api/resources/webhooks/index.d.ts +1 -0
- package/dist/api/resources/webhooks/index.js +17 -0
- package/dist/api/types/BulkSchedule.d.ts +11 -0
- package/dist/api/types/BulkSchedule.js +5 -0
- package/dist/api/types/LabelLabel.d.ts +4 -0
- package/dist/api/types/LabelLabel.js +5 -0
- package/dist/api/types/RestErrResponse.d.ts +13 -0
- package/dist/api/types/RestErrResponse.js +5 -0
- package/dist/api/types/SchemaAssociation.d.ts +9 -0
- package/dist/api/types/SchemaAssociation.js +5 -0
- package/dist/api/types/SyncDestinationProperties.d.ts +15 -0
- package/dist/api/types/SyncDestinationProperties.js +5 -0
- package/dist/api/types/V2ActivateSyncEnvelope.d.ts +7 -0
- package/dist/api/types/V2ActivateSyncEnvelope.js +5 -0
- package/dist/api/types/V2ActivateSyncInput.d.ts +6 -0
- package/dist/api/types/V2ActivateSyncInput.js +5 -0
- package/dist/api/types/V2ActivateSyncOutput.d.ts +7 -0
- package/dist/api/types/V2ActivateSyncOutput.js +5 -0
- package/dist/api/types/V2ApiKeyResponse.d.ts +6 -0
- package/dist/api/types/V2ApiKeyResponse.js +5 -0
- package/dist/api/types/V2ApiKeyResponseEnvelope.d.ts +7 -0
- package/dist/api/types/V2ApiKeyResponseEnvelope.js +5 -0
- package/dist/api/types/V2BulkSyncDest.d.ts +8 -0
- package/dist/api/types/V2BulkSyncDest.js +5 -0
- package/dist/api/types/V2BulkSyncDestEnvelope.d.ts +7 -0
- package/dist/api/types/V2BulkSyncDestEnvelope.js +5 -0
- package/dist/api/types/V2BulkSyncListEnvelope.d.ts +7 -0
- package/dist/api/types/V2BulkSyncListEnvelope.js +5 -0
- package/dist/api/types/V2BulkSyncResponse.d.ts +18 -0
- package/dist/api/types/V2BulkSyncResponse.js +5 -0
- package/dist/api/types/V2BulkSyncResponseEnvelope.d.ts +7 -0
- package/dist/api/types/V2BulkSyncResponseEnvelope.js +5 -0
- package/dist/api/types/V2ConfigurationValue.d.ts +7 -0
- package/dist/api/types/V2ConfigurationValue.js +5 -0
- package/dist/api/types/V2ConnectionListResponseEnvelope.d.ts +7 -0
- package/dist/api/types/V2ConnectionListResponseEnvelope.js +5 -0
- package/dist/api/types/V2ConnectionMeta.d.ts +8 -0
- package/dist/api/types/V2ConnectionMeta.js +5 -0
- package/dist/api/types/V2ConnectionMetaResponse.d.ts +9 -0
- package/dist/api/types/V2ConnectionMetaResponse.js +5 -0
- package/dist/api/types/V2ConnectionResponseEnvelope.d.ts +7 -0
- package/dist/api/types/V2ConnectionResponseEnvelope.js +5 -0
- package/dist/api/types/V2ConnectionResponseSchema.d.ts +14 -0
- package/dist/api/types/V2ConnectionResponseSchema.js +5 -0
- package/dist/api/types/V2ConnectionType.d.ts +9 -0
- package/dist/api/types/V2ConnectionType.js +5 -0
- package/dist/api/types/V2ConnectionTypeResponseEnvelope.d.ts +7 -0
- package/dist/api/types/V2ConnectionTypeResponseEnvelope.js +5 -0
- package/dist/api/types/V2ConnectionTypeSchema.d.ts +7 -0
- package/dist/api/types/V2ConnectionTypeSchema.js +5 -0
- package/dist/api/types/V2CreateConnectionResponseEnvelope.d.ts +7 -0
- package/dist/api/types/V2CreateConnectionResponseEnvelope.js +5 -0
- package/dist/api/types/V2CreateConnectionResponseSchema.d.ts +18 -0
- package/dist/api/types/V2CreateConnectionResponseSchema.js +5 -0
- package/dist/api/types/V2Event.d.ts +10 -0
- package/dist/api/types/V2Event.js +5 -0
- package/dist/api/types/V2EventTypesEnvelope.d.ts +6 -0
- package/dist/api/types/V2EventTypesEnvelope.js +5 -0
- package/dist/api/types/V2EventsEnvelope.d.ts +7 -0
- package/dist/api/types/V2EventsEnvelope.js +5 -0
- package/dist/api/types/V2ExecutionCounts.d.ts +9 -0
- package/dist/api/types/V2ExecutionCounts.js +5 -0
- package/dist/api/types/V2Filter.d.ts +10 -0
- package/dist/api/types/V2Filter.js +5 -0
- package/dist/api/types/V2GetConnectionMetaEnvelope.d.ts +7 -0
- package/dist/api/types/V2GetConnectionMetaEnvelope.js +5 -0
- package/dist/api/types/V2GetExecutionResponseEnvelope.d.ts +7 -0
- package/dist/api/types/V2GetExecutionResponseEnvelope.js +5 -0
- package/dist/api/types/V2GetExecutionResponseSchema.d.ts +14 -0
- package/dist/api/types/V2GetExecutionResponseSchema.js +5 -0
- package/dist/api/types/V2GetIdentityResponseEnvelope.d.ts +7 -0
- package/dist/api/types/V2GetIdentityResponseEnvelope.js +5 -0
- package/dist/api/types/V2GetIdentityResponseSchema.d.ts +14 -0
- package/dist/api/types/V2GetIdentityResponseSchema.js +5 -0
- package/dist/api/types/V2Identity.d.ts +11 -0
- package/dist/api/types/V2Identity.js +5 -0
- package/dist/api/types/V2IdentityFunction.d.ts +7 -0
- package/dist/api/types/V2IdentityFunction.js +5 -0
- package/dist/api/types/V2ListExecutionResponseEnvelope.d.ts +7 -0
- package/dist/api/types/V2ListExecutionResponseEnvelope.js +5 -0
- package/dist/api/types/V2ListPoliciesResponseEnvelope.d.ts +7 -0
- package/dist/api/types/V2ListPoliciesResponseEnvelope.js +5 -0
- package/dist/api/types/V2ListSyncResponseEnvelope.d.ts +7 -0
- package/dist/api/types/V2ListSyncResponseEnvelope.js +5 -0
- package/dist/api/types/V2ListUsersEnvelope.d.ts +7 -0
- package/dist/api/types/V2ListUsersEnvelope.js +5 -0
- package/dist/api/types/V2Mode.d.ts +11 -0
- package/dist/api/types/V2Mode.js +5 -0
- package/dist/api/types/V2ModelField.d.ts +13 -0
- package/dist/api/types/V2ModelField.js +5 -0
- package/dist/api/types/V2ModelFieldRequest.d.ts +9 -0
- package/dist/api/types/V2ModelFieldRequest.js +5 -0
- package/dist/api/types/V2ModelFieldResponse.d.ts +7 -0
- package/dist/api/types/V2ModelFieldResponse.js +5 -0
- package/dist/api/types/V2ModelListResponseEnvelope.d.ts +7 -0
- package/dist/api/types/V2ModelListResponseEnvelope.js +5 -0
- package/dist/api/types/V2ModelResponse.d.ts +19 -0
- package/dist/api/types/V2ModelResponse.js +5 -0
- package/dist/api/types/V2ModelResponseEnvelope.d.ts +7 -0
- package/dist/api/types/V2ModelResponseEnvelope.js +5 -0
- package/dist/api/types/V2Organization.d.ts +10 -0
- package/dist/api/types/V2Organization.js +5 -0
- package/dist/api/types/V2OrganizationEnvelope.d.ts +7 -0
- package/dist/api/types/V2OrganizationEnvelope.js +5 -0
- package/dist/api/types/V2OrganizationsEnvelope.d.ts +7 -0
- package/dist/api/types/V2OrganizationsEnvelope.js +5 -0
- package/dist/api/types/V2Override.d.ts +9 -0
- package/dist/api/types/V2Override.js +5 -0
- package/dist/api/types/V2PolicyAction.d.ts +7 -0
- package/dist/api/types/V2PolicyAction.js +5 -0
- package/dist/api/types/V2PolicyResponse.d.ts +11 -0
- package/dist/api/types/V2PolicyResponse.js +5 -0
- package/dist/api/types/V2PolicyResponseEnvelope.d.ts +7 -0
- package/dist/api/types/V2PolicyResponseEnvelope.js +5 -0
- package/dist/api/types/V2Relation.d.ts +8 -0
- package/dist/api/types/V2Relation.js +5 -0
- package/dist/api/types/V2RelationTo.d.ts +7 -0
- package/dist/api/types/V2RelationTo.js +5 -0
- package/dist/api/types/V2RoleListResponseEnvelope.d.ts +7 -0
- package/dist/api/types/V2RoleListResponseEnvelope.js +5 -0
- package/dist/api/types/V2RoleResponse.d.ts +9 -0
- package/dist/api/types/V2RoleResponse.js +5 -0
- package/dist/api/types/V2RoleResponseEnvelope.d.ts +7 -0
- package/dist/api/types/V2RoleResponseEnvelope.js +5 -0
- package/dist/api/types/V2RunAfter.d.ts +7 -0
- package/dist/api/types/V2RunAfter.js +5 -0
- package/dist/api/types/V2Schedule.d.ts +13 -0
- package/dist/api/types/V2Schedule.js +5 -0
- package/dist/api/types/V2Source.d.ts +7 -0
- package/dist/api/types/V2Source.js +5 -0
- package/dist/api/types/V2StartSyncResponseEnvelope.d.ts +7 -0
- package/dist/api/types/V2StartSyncResponseEnvelope.js +5 -0
- package/dist/api/types/V2StartSyncResponseSchema.d.ts +8 -0
- package/dist/api/types/V2StartSyncResponseSchema.js +5 -0
- package/dist/api/types/V2SupportedMode.d.ts +12 -0
- package/dist/api/types/V2SupportedMode.js +5 -0
- package/dist/api/types/V2SyncField.d.ts +11 -0
- package/dist/api/types/V2SyncField.js +5 -0
- package/dist/api/types/V2SyncResponse.d.ts +21 -0
- package/dist/api/types/V2SyncResponse.js +5 -0
- package/dist/api/types/V2SyncResponseEnvelope.d.ts +7 -0
- package/dist/api/types/V2SyncResponseEnvelope.js +5 -0
- package/dist/api/types/V2SyncStatusEnvelope.d.ts +7 -0
- package/dist/api/types/V2SyncStatusEnvelope.js +5 -0
- package/dist/api/types/V2SyncStatusResponse.d.ts +9 -0
- package/dist/api/types/V2SyncStatusResponse.js +5 -0
- package/dist/api/types/V2Target.d.ts +11 -0
- package/dist/api/types/V2Target.js +5 -0
- package/dist/api/types/V2TargetField.d.ts +18 -0
- package/dist/api/types/V2TargetField.js +5 -0
- package/dist/api/types/V2TargetResponse.d.ts +12 -0
- package/dist/api/types/V2TargetResponse.js +5 -0
- package/dist/api/types/V2TargetResponseEnvelope.d.ts +7 -0
- package/dist/api/types/V2TargetResponseEnvelope.js +5 -0
- package/dist/api/types/V2User.d.ts +9 -0
- package/dist/api/types/V2User.js +5 -0
- package/dist/api/types/V2UserEnvelope.d.ts +7 -0
- package/dist/api/types/V2UserEnvelope.js +5 -0
- package/dist/api/types/V2Webhook.d.ts +10 -0
- package/dist/api/types/V2Webhook.js +5 -0
- package/dist/api/types/V2WebhookEnvelope.d.ts +7 -0
- package/dist/api/types/V2WebhookEnvelope.js +5 -0
- package/dist/api/types/V2WebhookListEnvelope.d.ts +7 -0
- package/dist/api/types/V2WebhookListEnvelope.js +5 -0
- package/dist/api/types/V3BulkField.d.ts +8 -0
- package/dist/api/types/V3BulkField.js +5 -0
- package/dist/api/types/V3BulkSchema.d.ts +10 -0
- package/dist/api/types/V3BulkSchema.js +5 -0
- package/dist/api/types/V3BulkSchemaEnvelope.d.ts +7 -0
- package/dist/api/types/V3BulkSchemaEnvelope.js +5 -0
- package/dist/api/types/V3BulkSyncExecution.d.ts +15 -0
- package/dist/api/types/V3BulkSyncExecution.js +5 -0
- package/dist/api/types/V3BulkSyncExecutionEnvelope.d.ts +7 -0
- package/dist/api/types/V3BulkSyncExecutionEnvelope.js +5 -0
- package/dist/api/types/V3BulkSyncSchemaExecution.d.ts +12 -0
- package/dist/api/types/V3BulkSyncSchemaExecution.js +5 -0
- package/dist/api/types/V3BulkSyncSource.d.ts +8 -0
- package/dist/api/types/V3BulkSyncSource.js +5 -0
- package/dist/api/types/V3BulkSyncSourceEnvelope.d.ts +7 -0
- package/dist/api/types/V3BulkSyncSourceEnvelope.js +5 -0
- package/dist/api/types/V3BulkSyncSourceSchemaEnvelope.d.ts +7 -0
- package/dist/api/types/V3BulkSyncSourceSchemaEnvelope.js +5 -0
- package/dist/api/types/V3BulkSyncSourceStatus.d.ts +8 -0
- package/dist/api/types/V3BulkSyncSourceStatus.js +5 -0
- package/dist/api/types/V3BulkSyncSourceStatusEnvelope.d.ts +7 -0
- package/dist/api/types/V3BulkSyncSourceStatusEnvelope.js +5 -0
- package/dist/api/types/V3BulkSyncStatusEnvelope.d.ts +7 -0
- package/dist/api/types/V3BulkSyncStatusEnvelope.js +5 -0
- package/dist/api/types/V3BulkSyncStatusResponse.d.ts +9 -0
- package/dist/api/types/V3BulkSyncStatusResponse.js +5 -0
- package/dist/api/types/V3ConnectCardResponse.d.ts +7 -0
- package/dist/api/types/V3ConnectCardResponse.js +5 -0
- package/dist/api/types/V3ConnectCardResponseEnvelope.d.ts +7 -0
- package/dist/api/types/V3ConnectCardResponseEnvelope.js +5 -0
- package/dist/api/types/V3ListBulkSchemaEnvelope.d.ts +7 -0
- package/dist/api/types/V3ListBulkSchemaEnvelope.js +5 -0
- package/dist/api/types/V3ListBulkSyncExecutionsEnvelope.d.ts +7 -0
- package/dist/api/types/V3ListBulkSyncExecutionsEnvelope.js +5 -0
- package/dist/api/types/V3PickValue.d.ts +7 -0
- package/dist/api/types/V3PickValue.js +5 -0
- package/dist/api/types/V3Schema.d.ts +9 -0
- package/dist/api/types/V3Schema.js +5 -0
- package/dist/api/types/V3SchemaField.d.ts +12 -0
- package/dist/api/types/V3SchemaField.js +5 -0
- package/dist/api/types/V3SchemaRecordsResponseEnvelope.d.ts +6 -0
- package/dist/api/types/V3SchemaRecordsResponseEnvelope.js +5 -0
- package/dist/api/types/index.d.ts +102 -0
- package/dist/api/types/index.js +118 -0
- package/dist/core/auth/BasicAuth.d.ts +8 -0
- package/dist/core/auth/BasicAuth.js +26 -0
- package/dist/core/auth/BearerToken.d.ts +5 -0
- package/dist/core/auth/BearerToken.js +15 -0
- package/dist/core/auth/index.d.ts +2 -0
- package/dist/core/auth/index.js +7 -0
- package/dist/core/fetcher/APIResponse.d.ts +10 -0
- package/dist/core/fetcher/APIResponse.js +2 -0
- package/dist/core/fetcher/Fetcher.d.ts +35 -0
- package/dist/core/fetcher/Fetcher.js +151 -0
- package/dist/core/fetcher/Supplier.d.ts +4 -0
- package/dist/core/fetcher/Supplier.js +22 -0
- package/dist/core/fetcher/getHeader.d.ts +1 -0
- package/dist/core/fetcher/getHeader.js +12 -0
- package/dist/core/fetcher/index.d.ts +5 -0
- package/dist/core/fetcher/index.js +9 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.js +18 -0
- package/dist/environments.d.ts +7 -0
- package/dist/environments.js +9 -0
- package/dist/errors/PolytomicError.d.ts +12 -0
- package/dist/errors/PolytomicError.js +32 -0
- package/dist/errors/PolytomicTimeoutError.d.ts +6 -0
- package/dist/errors/PolytomicTimeoutError.js +13 -0
- package/dist/errors/index.d.ts +2 -0
- package/dist/errors/index.js +7 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +34 -0
- package/environments.d.ts +7 -0
- package/environments.js +9 -0
- package/errors/PolytomicError.d.ts +12 -0
- package/errors/PolytomicError.js +32 -0
- package/errors/PolytomicTimeoutError.d.ts +6 -0
- package/errors/PolytomicTimeoutError.js +13 -0
- package/errors/index.d.ts +2 -0
- package/errors/index.js +7 -0
- package/index.d.ts +4 -0
- package/index.js +34 -0
- package/jest.config.js +5 -0
- package/package.json +33 -0
- package/tests/client.test.ts +11 -0
|
@@ -0,0 +1,729 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated 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 (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
31
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
32
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
33
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
34
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
38
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
39
|
+
};
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.Connections = void 0;
|
|
42
|
+
const environments = __importStar(require("../../../../environments"));
|
|
43
|
+
const core = __importStar(require("../../../../core"));
|
|
44
|
+
const Polytomic = __importStar(require("../../.."));
|
|
45
|
+
const url_join_1 = __importDefault(require("url-join"));
|
|
46
|
+
const errors = __importStar(require("../../../../errors"));
|
|
47
|
+
class Connections {
|
|
48
|
+
constructor(_options = {}) {
|
|
49
|
+
this._options = _options;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* @throws {@link Polytomic.UnauthorizedError}
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* await polytomic.connections.getTypes()
|
|
56
|
+
*/
|
|
57
|
+
getTypes(requestOptions) {
|
|
58
|
+
var _a;
|
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
const _response = yield core.fetcher({
|
|
61
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/connection_types"),
|
|
62
|
+
method: "GET",
|
|
63
|
+
headers: {
|
|
64
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
65
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.polytomicVersion)) != null
|
|
66
|
+
? yield core.Supplier.get(this._options.polytomicVersion)
|
|
67
|
+
: undefined,
|
|
68
|
+
"X-Fern-Language": "JavaScript",
|
|
69
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
70
|
+
"X-Fern-SDK-Version": "0.0.1",
|
|
71
|
+
},
|
|
72
|
+
contentType: "application/json",
|
|
73
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
74
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
75
|
+
});
|
|
76
|
+
if (_response.ok) {
|
|
77
|
+
return _response.body;
|
|
78
|
+
}
|
|
79
|
+
if (_response.error.reason === "status-code") {
|
|
80
|
+
switch (_response.error.statusCode) {
|
|
81
|
+
case 401:
|
|
82
|
+
throw new Polytomic.UnauthorizedError(_response.error.body);
|
|
83
|
+
default:
|
|
84
|
+
throw new errors.PolytomicError({
|
|
85
|
+
statusCode: _response.error.statusCode,
|
|
86
|
+
body: _response.error.body,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
switch (_response.error.reason) {
|
|
91
|
+
case "non-json":
|
|
92
|
+
throw new errors.PolytomicError({
|
|
93
|
+
statusCode: _response.error.statusCode,
|
|
94
|
+
body: _response.error.rawBody,
|
|
95
|
+
});
|
|
96
|
+
case "timeout":
|
|
97
|
+
throw new errors.PolytomicTimeoutError();
|
|
98
|
+
case "unknown":
|
|
99
|
+
throw new errors.PolytomicError({
|
|
100
|
+
message: _response.error.errorMessage,
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* @throws {@link Polytomic.UnauthorizedError}
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* await polytomic.connections.list()
|
|
110
|
+
*/
|
|
111
|
+
list(requestOptions) {
|
|
112
|
+
var _a;
|
|
113
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
114
|
+
const _response = yield core.fetcher({
|
|
115
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/connections"),
|
|
116
|
+
method: "GET",
|
|
117
|
+
headers: {
|
|
118
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
119
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.polytomicVersion)) != null
|
|
120
|
+
? yield core.Supplier.get(this._options.polytomicVersion)
|
|
121
|
+
: undefined,
|
|
122
|
+
"X-Fern-Language": "JavaScript",
|
|
123
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
124
|
+
"X-Fern-SDK-Version": "0.0.1",
|
|
125
|
+
},
|
|
126
|
+
contentType: "application/json",
|
|
127
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
128
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
129
|
+
});
|
|
130
|
+
if (_response.ok) {
|
|
131
|
+
return _response.body;
|
|
132
|
+
}
|
|
133
|
+
if (_response.error.reason === "status-code") {
|
|
134
|
+
switch (_response.error.statusCode) {
|
|
135
|
+
case 401:
|
|
136
|
+
throw new Polytomic.UnauthorizedError(_response.error.body);
|
|
137
|
+
default:
|
|
138
|
+
throw new errors.PolytomicError({
|
|
139
|
+
statusCode: _response.error.statusCode,
|
|
140
|
+
body: _response.error.body,
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
switch (_response.error.reason) {
|
|
145
|
+
case "non-json":
|
|
146
|
+
throw new errors.PolytomicError({
|
|
147
|
+
statusCode: _response.error.statusCode,
|
|
148
|
+
body: _response.error.rawBody,
|
|
149
|
+
});
|
|
150
|
+
case "timeout":
|
|
151
|
+
throw new errors.PolytomicTimeoutError();
|
|
152
|
+
case "unknown":
|
|
153
|
+
throw new errors.PolytomicError({
|
|
154
|
+
message: _response.error.errorMessage,
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* @throws {@link Polytomic.UnauthorizedError}
|
|
161
|
+
*
|
|
162
|
+
* @example
|
|
163
|
+
* await polytomic.connections.create({
|
|
164
|
+
* name: "name",
|
|
165
|
+
* type: "type"
|
|
166
|
+
* })
|
|
167
|
+
*/
|
|
168
|
+
create(request, requestOptions) {
|
|
169
|
+
var _a;
|
|
170
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
171
|
+
const _response = yield core.fetcher({
|
|
172
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/connections"),
|
|
173
|
+
method: "POST",
|
|
174
|
+
headers: {
|
|
175
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
176
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.polytomicVersion)) != null
|
|
177
|
+
? yield core.Supplier.get(this._options.polytomicVersion)
|
|
178
|
+
: undefined,
|
|
179
|
+
"X-Fern-Language": "JavaScript",
|
|
180
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
181
|
+
"X-Fern-SDK-Version": "0.0.1",
|
|
182
|
+
},
|
|
183
|
+
contentType: "application/json",
|
|
184
|
+
body: request,
|
|
185
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
186
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
187
|
+
});
|
|
188
|
+
if (_response.ok) {
|
|
189
|
+
return _response.body;
|
|
190
|
+
}
|
|
191
|
+
if (_response.error.reason === "status-code") {
|
|
192
|
+
switch (_response.error.statusCode) {
|
|
193
|
+
case 401:
|
|
194
|
+
throw new Polytomic.UnauthorizedError(_response.error.body);
|
|
195
|
+
default:
|
|
196
|
+
throw new errors.PolytomicError({
|
|
197
|
+
statusCode: _response.error.statusCode,
|
|
198
|
+
body: _response.error.body,
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
switch (_response.error.reason) {
|
|
203
|
+
case "non-json":
|
|
204
|
+
throw new errors.PolytomicError({
|
|
205
|
+
statusCode: _response.error.statusCode,
|
|
206
|
+
body: _response.error.rawBody,
|
|
207
|
+
});
|
|
208
|
+
case "timeout":
|
|
209
|
+
throw new errors.PolytomicTimeoutError();
|
|
210
|
+
case "unknown":
|
|
211
|
+
throw new errors.PolytomicError({
|
|
212
|
+
message: _response.error.errorMessage,
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* @throws {@link Polytomic.UnauthorizedError}
|
|
219
|
+
*
|
|
220
|
+
* @example
|
|
221
|
+
* await polytomic.connections.apiV3Connect({
|
|
222
|
+
* connection: "248df4b7-aa70-47b8-a036-33ac447e668d",
|
|
223
|
+
* name: "name",
|
|
224
|
+
* redirect_url: "redirect_url"
|
|
225
|
+
* })
|
|
226
|
+
*/
|
|
227
|
+
apiV3Connect(request, requestOptions) {
|
|
228
|
+
var _a;
|
|
229
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
230
|
+
const _response = yield core.fetcher({
|
|
231
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/connections/connect"),
|
|
232
|
+
method: "POST",
|
|
233
|
+
headers: {
|
|
234
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
235
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.polytomicVersion)) != null
|
|
236
|
+
? yield core.Supplier.get(this._options.polytomicVersion)
|
|
237
|
+
: undefined,
|
|
238
|
+
"X-Fern-Language": "JavaScript",
|
|
239
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
240
|
+
"X-Fern-SDK-Version": "0.0.1",
|
|
241
|
+
},
|
|
242
|
+
contentType: "application/json",
|
|
243
|
+
body: request,
|
|
244
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
245
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
246
|
+
});
|
|
247
|
+
if (_response.ok) {
|
|
248
|
+
return _response.body;
|
|
249
|
+
}
|
|
250
|
+
if (_response.error.reason === "status-code") {
|
|
251
|
+
switch (_response.error.statusCode) {
|
|
252
|
+
case 401:
|
|
253
|
+
throw new Polytomic.UnauthorizedError(_response.error.body);
|
|
254
|
+
default:
|
|
255
|
+
throw new errors.PolytomicError({
|
|
256
|
+
statusCode: _response.error.statusCode,
|
|
257
|
+
body: _response.error.body,
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
switch (_response.error.reason) {
|
|
262
|
+
case "non-json":
|
|
263
|
+
throw new errors.PolytomicError({
|
|
264
|
+
statusCode: _response.error.statusCode,
|
|
265
|
+
body: _response.error.rawBody,
|
|
266
|
+
});
|
|
267
|
+
case "timeout":
|
|
268
|
+
throw new errors.PolytomicTimeoutError();
|
|
269
|
+
case "unknown":
|
|
270
|
+
throw new errors.PolytomicError({
|
|
271
|
+
message: _response.error.errorMessage,
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* @throws {@link Polytomic.UnauthorizedError}
|
|
278
|
+
*
|
|
279
|
+
* @example
|
|
280
|
+
* await polytomic.connections.get("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
281
|
+
*/
|
|
282
|
+
get(id, requestOptions) {
|
|
283
|
+
var _a;
|
|
284
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
285
|
+
const _response = yield core.fetcher({
|
|
286
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/connections/${id}`),
|
|
287
|
+
method: "GET",
|
|
288
|
+
headers: {
|
|
289
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
290
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.polytomicVersion)) != null
|
|
291
|
+
? yield core.Supplier.get(this._options.polytomicVersion)
|
|
292
|
+
: undefined,
|
|
293
|
+
"X-Fern-Language": "JavaScript",
|
|
294
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
295
|
+
"X-Fern-SDK-Version": "0.0.1",
|
|
296
|
+
},
|
|
297
|
+
contentType: "application/json",
|
|
298
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
299
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
300
|
+
});
|
|
301
|
+
if (_response.ok) {
|
|
302
|
+
return _response.body;
|
|
303
|
+
}
|
|
304
|
+
if (_response.error.reason === "status-code") {
|
|
305
|
+
switch (_response.error.statusCode) {
|
|
306
|
+
case 401:
|
|
307
|
+
throw new Polytomic.UnauthorizedError(_response.error.body);
|
|
308
|
+
default:
|
|
309
|
+
throw new errors.PolytomicError({
|
|
310
|
+
statusCode: _response.error.statusCode,
|
|
311
|
+
body: _response.error.body,
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
switch (_response.error.reason) {
|
|
316
|
+
case "non-json":
|
|
317
|
+
throw new errors.PolytomicError({
|
|
318
|
+
statusCode: _response.error.statusCode,
|
|
319
|
+
body: _response.error.rawBody,
|
|
320
|
+
});
|
|
321
|
+
case "timeout":
|
|
322
|
+
throw new errors.PolytomicTimeoutError();
|
|
323
|
+
case "unknown":
|
|
324
|
+
throw new errors.PolytomicError({
|
|
325
|
+
message: _response.error.errorMessage,
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* @throws {@link Polytomic.UnauthorizedError}
|
|
332
|
+
*
|
|
333
|
+
* @example
|
|
334
|
+
* await polytomic.connections.remove("248df4b7-aa70-47b8-a036-33ac447e668d", {})
|
|
335
|
+
*/
|
|
336
|
+
remove(id, request = {}, requestOptions) {
|
|
337
|
+
var _a;
|
|
338
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
339
|
+
const { force } = request;
|
|
340
|
+
const _queryParams = {};
|
|
341
|
+
if (force != null) {
|
|
342
|
+
_queryParams["force"] = force.toString();
|
|
343
|
+
}
|
|
344
|
+
const _response = yield core.fetcher({
|
|
345
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/connections/${id}`),
|
|
346
|
+
method: "DELETE",
|
|
347
|
+
headers: {
|
|
348
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
349
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.polytomicVersion)) != null
|
|
350
|
+
? yield core.Supplier.get(this._options.polytomicVersion)
|
|
351
|
+
: undefined,
|
|
352
|
+
"X-Fern-Language": "JavaScript",
|
|
353
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
354
|
+
"X-Fern-SDK-Version": "0.0.1",
|
|
355
|
+
},
|
|
356
|
+
contentType: "application/json",
|
|
357
|
+
queryParameters: _queryParams,
|
|
358
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
359
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
360
|
+
});
|
|
361
|
+
if (_response.ok) {
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
364
|
+
if (_response.error.reason === "status-code") {
|
|
365
|
+
switch (_response.error.statusCode) {
|
|
366
|
+
case 401:
|
|
367
|
+
throw new Polytomic.UnauthorizedError(_response.error.body);
|
|
368
|
+
default:
|
|
369
|
+
throw new errors.PolytomicError({
|
|
370
|
+
statusCode: _response.error.statusCode,
|
|
371
|
+
body: _response.error.body,
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
switch (_response.error.reason) {
|
|
376
|
+
case "non-json":
|
|
377
|
+
throw new errors.PolytomicError({
|
|
378
|
+
statusCode: _response.error.statusCode,
|
|
379
|
+
body: _response.error.rawBody,
|
|
380
|
+
});
|
|
381
|
+
case "timeout":
|
|
382
|
+
throw new errors.PolytomicTimeoutError();
|
|
383
|
+
case "unknown":
|
|
384
|
+
throw new errors.PolytomicError({
|
|
385
|
+
message: _response.error.errorMessage,
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* @throws {@link Polytomic.UnauthorizedError}
|
|
392
|
+
*
|
|
393
|
+
* @example
|
|
394
|
+
* await polytomic.connections.update("248df4b7-aa70-47b8-a036-33ac447e668d", {
|
|
395
|
+
* name: "name"
|
|
396
|
+
* })
|
|
397
|
+
*/
|
|
398
|
+
update(id, request, requestOptions) {
|
|
399
|
+
var _a;
|
|
400
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
401
|
+
const _response = yield core.fetcher({
|
|
402
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/connections/${id}`),
|
|
403
|
+
method: "PATCH",
|
|
404
|
+
headers: {
|
|
405
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
406
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.polytomicVersion)) != null
|
|
407
|
+
? yield core.Supplier.get(this._options.polytomicVersion)
|
|
408
|
+
: undefined,
|
|
409
|
+
"X-Fern-Language": "JavaScript",
|
|
410
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
411
|
+
"X-Fern-SDK-Version": "0.0.1",
|
|
412
|
+
},
|
|
413
|
+
contentType: "application/json",
|
|
414
|
+
body: request,
|
|
415
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
416
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
417
|
+
});
|
|
418
|
+
if (_response.ok) {
|
|
419
|
+
return _response.body;
|
|
420
|
+
}
|
|
421
|
+
if (_response.error.reason === "status-code") {
|
|
422
|
+
switch (_response.error.statusCode) {
|
|
423
|
+
case 401:
|
|
424
|
+
throw new Polytomic.UnauthorizedError(_response.error.body);
|
|
425
|
+
default:
|
|
426
|
+
throw new errors.PolytomicError({
|
|
427
|
+
statusCode: _response.error.statusCode,
|
|
428
|
+
body: _response.error.body,
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
switch (_response.error.reason) {
|
|
433
|
+
case "non-json":
|
|
434
|
+
throw new errors.PolytomicError({
|
|
435
|
+
statusCode: _response.error.statusCode,
|
|
436
|
+
body: _response.error.rawBody,
|
|
437
|
+
});
|
|
438
|
+
case "timeout":
|
|
439
|
+
throw new errors.PolytomicTimeoutError();
|
|
440
|
+
case "unknown":
|
|
441
|
+
throw new errors.PolytomicError({
|
|
442
|
+
message: _response.error.errorMessage,
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* @throws {@link Polytomic.UnauthorizedError}
|
|
449
|
+
*
|
|
450
|
+
* @example
|
|
451
|
+
* await polytomic.connections.getSource("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
452
|
+
*/
|
|
453
|
+
getSource(id, requestOptions) {
|
|
454
|
+
var _a;
|
|
455
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
456
|
+
const _response = yield core.fetcher({
|
|
457
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/connections/${id}/source`),
|
|
458
|
+
method: "GET",
|
|
459
|
+
headers: {
|
|
460
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
461
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.polytomicVersion)) != null
|
|
462
|
+
? yield core.Supplier.get(this._options.polytomicVersion)
|
|
463
|
+
: undefined,
|
|
464
|
+
"X-Fern-Language": "JavaScript",
|
|
465
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
466
|
+
"X-Fern-SDK-Version": "0.0.1",
|
|
467
|
+
},
|
|
468
|
+
contentType: "application/json",
|
|
469
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
470
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
471
|
+
});
|
|
472
|
+
if (_response.ok) {
|
|
473
|
+
return _response.body;
|
|
474
|
+
}
|
|
475
|
+
if (_response.error.reason === "status-code") {
|
|
476
|
+
switch (_response.error.statusCode) {
|
|
477
|
+
case 401:
|
|
478
|
+
throw new Polytomic.UnauthorizedError(_response.error.body);
|
|
479
|
+
default:
|
|
480
|
+
throw new errors.PolytomicError({
|
|
481
|
+
statusCode: _response.error.statusCode,
|
|
482
|
+
body: _response.error.body,
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
switch (_response.error.reason) {
|
|
487
|
+
case "non-json":
|
|
488
|
+
throw new errors.PolytomicError({
|
|
489
|
+
statusCode: _response.error.statusCode,
|
|
490
|
+
body: _response.error.rawBody,
|
|
491
|
+
});
|
|
492
|
+
case "timeout":
|
|
493
|
+
throw new errors.PolytomicTimeoutError();
|
|
494
|
+
case "unknown":
|
|
495
|
+
throw new errors.PolytomicError({
|
|
496
|
+
message: _response.error.errorMessage,
|
|
497
|
+
});
|
|
498
|
+
}
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
/**
|
|
502
|
+
* @throws {@link Polytomic.UnauthorizedError}
|
|
503
|
+
*
|
|
504
|
+
* @example
|
|
505
|
+
* await polytomic.connections.getSourceFields("248df4b7-aa70-47b8-a036-33ac447e668d", {})
|
|
506
|
+
*/
|
|
507
|
+
getSourceFields(id, request = {}, requestOptions) {
|
|
508
|
+
var _a;
|
|
509
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
510
|
+
const _response = yield core.fetcher({
|
|
511
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/connections/${id}/source/fields`),
|
|
512
|
+
method: "POST",
|
|
513
|
+
headers: {
|
|
514
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
515
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.polytomicVersion)) != null
|
|
516
|
+
? yield core.Supplier.get(this._options.polytomicVersion)
|
|
517
|
+
: undefined,
|
|
518
|
+
"X-Fern-Language": "JavaScript",
|
|
519
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
520
|
+
"X-Fern-SDK-Version": "0.0.1",
|
|
521
|
+
},
|
|
522
|
+
contentType: "application/json",
|
|
523
|
+
body: request,
|
|
524
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
525
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
526
|
+
});
|
|
527
|
+
if (_response.ok) {
|
|
528
|
+
return _response.body;
|
|
529
|
+
}
|
|
530
|
+
if (_response.error.reason === "status-code") {
|
|
531
|
+
switch (_response.error.statusCode) {
|
|
532
|
+
case 401:
|
|
533
|
+
throw new Polytomic.UnauthorizedError(_response.error.body);
|
|
534
|
+
default:
|
|
535
|
+
throw new errors.PolytomicError({
|
|
536
|
+
statusCode: _response.error.statusCode,
|
|
537
|
+
body: _response.error.body,
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
switch (_response.error.reason) {
|
|
542
|
+
case "non-json":
|
|
543
|
+
throw new errors.PolytomicError({
|
|
544
|
+
statusCode: _response.error.statusCode,
|
|
545
|
+
body: _response.error.rawBody,
|
|
546
|
+
});
|
|
547
|
+
case "timeout":
|
|
548
|
+
throw new errors.PolytomicTimeoutError();
|
|
549
|
+
case "unknown":
|
|
550
|
+
throw new errors.PolytomicError({
|
|
551
|
+
message: _response.error.errorMessage,
|
|
552
|
+
});
|
|
553
|
+
}
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
* @throws {@link Polytomic.UnauthorizedError}
|
|
558
|
+
*
|
|
559
|
+
* @example
|
|
560
|
+
* await polytomic.connections.getTarget("248df4b7-aa70-47b8-a036-33ac447e668d", {})
|
|
561
|
+
*/
|
|
562
|
+
getTarget(id, request = {}, requestOptions) {
|
|
563
|
+
var _a;
|
|
564
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
565
|
+
const { type: type_, search } = request;
|
|
566
|
+
const _queryParams = {};
|
|
567
|
+
if (type_ != null) {
|
|
568
|
+
_queryParams["type"] = type_;
|
|
569
|
+
}
|
|
570
|
+
if (search != null) {
|
|
571
|
+
_queryParams["search"] = search;
|
|
572
|
+
}
|
|
573
|
+
const _response = yield core.fetcher({
|
|
574
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/connections/${id}/target`),
|
|
575
|
+
method: "GET",
|
|
576
|
+
headers: {
|
|
577
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
578
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.polytomicVersion)) != null
|
|
579
|
+
? yield core.Supplier.get(this._options.polytomicVersion)
|
|
580
|
+
: undefined,
|
|
581
|
+
"X-Fern-Language": "JavaScript",
|
|
582
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
583
|
+
"X-Fern-SDK-Version": "0.0.1",
|
|
584
|
+
},
|
|
585
|
+
contentType: "application/json",
|
|
586
|
+
queryParameters: _queryParams,
|
|
587
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
588
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
589
|
+
});
|
|
590
|
+
if (_response.ok) {
|
|
591
|
+
return _response.body;
|
|
592
|
+
}
|
|
593
|
+
if (_response.error.reason === "status-code") {
|
|
594
|
+
switch (_response.error.statusCode) {
|
|
595
|
+
case 401:
|
|
596
|
+
throw new Polytomic.UnauthorizedError(_response.error.body);
|
|
597
|
+
default:
|
|
598
|
+
throw new errors.PolytomicError({
|
|
599
|
+
statusCode: _response.error.statusCode,
|
|
600
|
+
body: _response.error.body,
|
|
601
|
+
});
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
switch (_response.error.reason) {
|
|
605
|
+
case "non-json":
|
|
606
|
+
throw new errors.PolytomicError({
|
|
607
|
+
statusCode: _response.error.statusCode,
|
|
608
|
+
body: _response.error.rawBody,
|
|
609
|
+
});
|
|
610
|
+
case "timeout":
|
|
611
|
+
throw new errors.PolytomicTimeoutError();
|
|
612
|
+
case "unknown":
|
|
613
|
+
throw new errors.PolytomicError({
|
|
614
|
+
message: _response.error.errorMessage,
|
|
615
|
+
});
|
|
616
|
+
}
|
|
617
|
+
});
|
|
618
|
+
}
|
|
619
|
+
/**
|
|
620
|
+
* @throws {@link Polytomic.UnauthorizedError}
|
|
621
|
+
*
|
|
622
|
+
* @example
|
|
623
|
+
* await polytomic.connections.getTargetFields("248df4b7-aa70-47b8-a036-33ac447e668d", {
|
|
624
|
+
* target: "database.table"
|
|
625
|
+
* })
|
|
626
|
+
*/
|
|
627
|
+
getTargetFields(id, request, requestOptions) {
|
|
628
|
+
var _a;
|
|
629
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
630
|
+
const _response = yield core.fetcher({
|
|
631
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/connections/${id}/target/fields`),
|
|
632
|
+
method: "POST",
|
|
633
|
+
headers: {
|
|
634
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
635
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.polytomicVersion)) != null
|
|
636
|
+
? yield core.Supplier.get(this._options.polytomicVersion)
|
|
637
|
+
: undefined,
|
|
638
|
+
"X-Fern-Language": "JavaScript",
|
|
639
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
640
|
+
"X-Fern-SDK-Version": "0.0.1",
|
|
641
|
+
},
|
|
642
|
+
contentType: "application/json",
|
|
643
|
+
body: request,
|
|
644
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
645
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
646
|
+
});
|
|
647
|
+
if (_response.ok) {
|
|
648
|
+
return _response.body;
|
|
649
|
+
}
|
|
650
|
+
if (_response.error.reason === "status-code") {
|
|
651
|
+
switch (_response.error.statusCode) {
|
|
652
|
+
case 401:
|
|
653
|
+
throw new Polytomic.UnauthorizedError(_response.error.body);
|
|
654
|
+
default:
|
|
655
|
+
throw new errors.PolytomicError({
|
|
656
|
+
statusCode: _response.error.statusCode,
|
|
657
|
+
body: _response.error.body,
|
|
658
|
+
});
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
switch (_response.error.reason) {
|
|
662
|
+
case "non-json":
|
|
663
|
+
throw new errors.PolytomicError({
|
|
664
|
+
statusCode: _response.error.statusCode,
|
|
665
|
+
body: _response.error.rawBody,
|
|
666
|
+
});
|
|
667
|
+
case "timeout":
|
|
668
|
+
throw new errors.PolytomicTimeoutError();
|
|
669
|
+
case "unknown":
|
|
670
|
+
throw new errors.PolytomicError({
|
|
671
|
+
message: _response.error.errorMessage,
|
|
672
|
+
});
|
|
673
|
+
}
|
|
674
|
+
});
|
|
675
|
+
}
|
|
676
|
+
connect(requestOptions) {
|
|
677
|
+
var _a;
|
|
678
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
679
|
+
const _response = yield core.fetcher({
|
|
680
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/connections/connect"),
|
|
681
|
+
method: "POST",
|
|
682
|
+
headers: {
|
|
683
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
684
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.polytomicVersion)) != null
|
|
685
|
+
? yield core.Supplier.get(this._options.polytomicVersion)
|
|
686
|
+
: undefined,
|
|
687
|
+
"X-Fern-Language": "JavaScript",
|
|
688
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
689
|
+
"X-Fern-SDK-Version": "0.0.1",
|
|
690
|
+
},
|
|
691
|
+
contentType: "application/json",
|
|
692
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
693
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
694
|
+
});
|
|
695
|
+
if (_response.ok) {
|
|
696
|
+
return;
|
|
697
|
+
}
|
|
698
|
+
if (_response.error.reason === "status-code") {
|
|
699
|
+
throw new errors.PolytomicError({
|
|
700
|
+
statusCode: _response.error.statusCode,
|
|
701
|
+
body: _response.error.body,
|
|
702
|
+
});
|
|
703
|
+
}
|
|
704
|
+
switch (_response.error.reason) {
|
|
705
|
+
case "non-json":
|
|
706
|
+
throw new errors.PolytomicError({
|
|
707
|
+
statusCode: _response.error.statusCode,
|
|
708
|
+
body: _response.error.rawBody,
|
|
709
|
+
});
|
|
710
|
+
case "timeout":
|
|
711
|
+
throw new errors.PolytomicTimeoutError();
|
|
712
|
+
case "unknown":
|
|
713
|
+
throw new errors.PolytomicError({
|
|
714
|
+
message: _response.error.errorMessage,
|
|
715
|
+
});
|
|
716
|
+
}
|
|
717
|
+
});
|
|
718
|
+
}
|
|
719
|
+
_getAuthorizationHeader() {
|
|
720
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
721
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
722
|
+
if (bearer != null) {
|
|
723
|
+
return `Bearer ${bearer}`;
|
|
724
|
+
}
|
|
725
|
+
return undefined;
|
|
726
|
+
});
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
exports.Connections = Connections;
|