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,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BasicAuth = void 0;
|
|
4
|
+
const js_base64_1 = require("js-base64");
|
|
5
|
+
const BASIC_AUTH_HEADER_PREFIX = /^Basic /i;
|
|
6
|
+
exports.BasicAuth = {
|
|
7
|
+
toAuthorizationHeader: (basicAuth) => {
|
|
8
|
+
if (basicAuth == null) {
|
|
9
|
+
return undefined;
|
|
10
|
+
}
|
|
11
|
+
const token = js_base64_1.Base64.encode(`${basicAuth.username}:${basicAuth.password}`);
|
|
12
|
+
return `Basic ${token}`;
|
|
13
|
+
},
|
|
14
|
+
fromAuthorizationHeader: (header) => {
|
|
15
|
+
const credentials = header.replace(BASIC_AUTH_HEADER_PREFIX, "");
|
|
16
|
+
const decoded = js_base64_1.Base64.decode(credentials);
|
|
17
|
+
const [username, password] = decoded.split(":", 2);
|
|
18
|
+
if (username == null || password == null) {
|
|
19
|
+
throw new Error("Invalid basic auth");
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
username,
|
|
23
|
+
password,
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BearerToken = void 0;
|
|
4
|
+
const BEARER_AUTH_HEADER_PREFIX = /^Bearer /i;
|
|
5
|
+
exports.BearerToken = {
|
|
6
|
+
toAuthorizationHeader: (token) => {
|
|
7
|
+
if (token == null) {
|
|
8
|
+
return undefined;
|
|
9
|
+
}
|
|
10
|
+
return `Bearer ${token}`;
|
|
11
|
+
},
|
|
12
|
+
fromAuthorizationHeader: (header) => {
|
|
13
|
+
return header.replace(BEARER_AUTH_HEADER_PREFIX, "").trim();
|
|
14
|
+
},
|
|
15
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BearerToken = exports.BasicAuth = void 0;
|
|
4
|
+
var BasicAuth_1 = require("./BasicAuth");
|
|
5
|
+
Object.defineProperty(exports, "BasicAuth", { enumerable: true, get: function () { return BasicAuth_1.BasicAuth; } });
|
|
6
|
+
var BearerToken_1 = require("./BearerToken");
|
|
7
|
+
Object.defineProperty(exports, "BearerToken", { enumerable: true, get: function () { return BearerToken_1.BearerToken; } });
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare type APIResponse<Success, Failure> = SuccessfulResponse<Success> | FailedResponse<Failure>;
|
|
2
|
+
export interface SuccessfulResponse<T> {
|
|
3
|
+
ok: true;
|
|
4
|
+
body: T;
|
|
5
|
+
headers?: Record<string, any>;
|
|
6
|
+
}
|
|
7
|
+
export interface FailedResponse<T> {
|
|
8
|
+
ok: false;
|
|
9
|
+
error: T;
|
|
10
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { APIResponse } from "./APIResponse";
|
|
2
|
+
export declare type FetchFunction = <R = unknown>(args: Fetcher.Args) => Promise<APIResponse<R, Fetcher.Error>>;
|
|
3
|
+
export declare namespace Fetcher {
|
|
4
|
+
interface Args {
|
|
5
|
+
url: string;
|
|
6
|
+
method: string;
|
|
7
|
+
contentType?: string;
|
|
8
|
+
headers?: Record<string, string | undefined>;
|
|
9
|
+
queryParameters?: Record<string, string | string[]>;
|
|
10
|
+
body?: unknown;
|
|
11
|
+
timeoutMs?: number;
|
|
12
|
+
maxRetries?: number;
|
|
13
|
+
withCredentials?: boolean;
|
|
14
|
+
responseType?: "json" | "blob" | "streaming";
|
|
15
|
+
}
|
|
16
|
+
type Error = FailedStatusCodeError | NonJsonError | TimeoutError | UnknownError;
|
|
17
|
+
interface FailedStatusCodeError {
|
|
18
|
+
reason: "status-code";
|
|
19
|
+
statusCode: number;
|
|
20
|
+
body: unknown;
|
|
21
|
+
}
|
|
22
|
+
interface NonJsonError {
|
|
23
|
+
reason: "non-json";
|
|
24
|
+
statusCode: number;
|
|
25
|
+
rawBody: string;
|
|
26
|
+
}
|
|
27
|
+
interface TimeoutError {
|
|
28
|
+
reason: "timeout";
|
|
29
|
+
}
|
|
30
|
+
interface UnknownError {
|
|
31
|
+
reason: "unknown";
|
|
32
|
+
errorMessage: string;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export declare const fetcher: FetchFunction;
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.fetcher = void 0;
|
|
16
|
+
const form_data_1 = __importDefault(require("form-data"));
|
|
17
|
+
const qs_1 = __importDefault(require("qs"));
|
|
18
|
+
const INITIAL_RETRY_DELAY = 1;
|
|
19
|
+
const MAX_RETRY_DELAY = 60;
|
|
20
|
+
const DEFAULT_MAX_RETRIES = 2;
|
|
21
|
+
function fetcherImpl(args) {
|
|
22
|
+
var _a, _b;
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const headers = {};
|
|
25
|
+
if (args.body !== undefined && args.contentType != null) {
|
|
26
|
+
headers["Content-Type"] = args.contentType;
|
|
27
|
+
}
|
|
28
|
+
if (args.headers != null) {
|
|
29
|
+
for (const [key, value] of Object.entries(args.headers)) {
|
|
30
|
+
if (value != null) {
|
|
31
|
+
headers[key] = value;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
const url = Object.keys((_a = args.queryParameters) !== null && _a !== void 0 ? _a : {}).length > 0
|
|
36
|
+
? `${args.url}?${qs_1.default.stringify(args.queryParameters, { arrayFormat: "repeat" })}`
|
|
37
|
+
: args.url;
|
|
38
|
+
let body = undefined;
|
|
39
|
+
if (args.body instanceof form_data_1.default) {
|
|
40
|
+
// @ts-expect-error
|
|
41
|
+
body = args.body;
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
body = JSON.stringify(args.body);
|
|
45
|
+
}
|
|
46
|
+
const fetchFn = typeof fetch == "function" ? fetch : require("node-fetch");
|
|
47
|
+
const makeRequest = () => __awaiter(this, void 0, void 0, function* () {
|
|
48
|
+
const controller = new AbortController();
|
|
49
|
+
let abortId = undefined;
|
|
50
|
+
if (args.timeoutMs != null) {
|
|
51
|
+
abortId = setTimeout(() => controller.abort(), args.timeoutMs);
|
|
52
|
+
}
|
|
53
|
+
const response = yield fetchFn(url, {
|
|
54
|
+
method: args.method,
|
|
55
|
+
headers,
|
|
56
|
+
body,
|
|
57
|
+
signal: controller.signal,
|
|
58
|
+
credentials: args.withCredentials ? "include" : undefined,
|
|
59
|
+
});
|
|
60
|
+
if (abortId != null) {
|
|
61
|
+
clearTimeout(abortId);
|
|
62
|
+
}
|
|
63
|
+
return response;
|
|
64
|
+
});
|
|
65
|
+
try {
|
|
66
|
+
let response = yield makeRequest();
|
|
67
|
+
for (let i = 0; i < ((_b = args.maxRetries) !== null && _b !== void 0 ? _b : DEFAULT_MAX_RETRIES); ++i) {
|
|
68
|
+
if (response.status === 408 ||
|
|
69
|
+
response.status === 409 ||
|
|
70
|
+
response.status === 429 ||
|
|
71
|
+
response.status >= 500) {
|
|
72
|
+
const delay = Math.min(INITIAL_RETRY_DELAY * Math.pow(i, 2), MAX_RETRY_DELAY);
|
|
73
|
+
yield new Promise((resolve) => setTimeout(resolve, delay));
|
|
74
|
+
response = yield makeRequest();
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
let body;
|
|
81
|
+
if (response.body != null && args.responseType === "blob") {
|
|
82
|
+
body = yield response.blob();
|
|
83
|
+
}
|
|
84
|
+
else if (response.body != null && args.responseType === "streaming") {
|
|
85
|
+
body = response.body;
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
const text = yield response.text();
|
|
89
|
+
if (text.length > 0) {
|
|
90
|
+
try {
|
|
91
|
+
body = JSON.parse(text);
|
|
92
|
+
}
|
|
93
|
+
catch (err) {
|
|
94
|
+
return {
|
|
95
|
+
ok: false,
|
|
96
|
+
error: {
|
|
97
|
+
reason: "non-json",
|
|
98
|
+
statusCode: response.status,
|
|
99
|
+
rawBody: text,
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
if (response.status >= 200 && response.status < 400) {
|
|
106
|
+
return {
|
|
107
|
+
ok: true,
|
|
108
|
+
body: body,
|
|
109
|
+
headers: response.headers,
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
return {
|
|
114
|
+
ok: false,
|
|
115
|
+
error: {
|
|
116
|
+
reason: "status-code",
|
|
117
|
+
statusCode: response.status,
|
|
118
|
+
body,
|
|
119
|
+
},
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
catch (error) {
|
|
124
|
+
if (error instanceof Error && error.name === "AbortError") {
|
|
125
|
+
return {
|
|
126
|
+
ok: false,
|
|
127
|
+
error: {
|
|
128
|
+
reason: "timeout",
|
|
129
|
+
},
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
else if (error instanceof Error) {
|
|
133
|
+
return {
|
|
134
|
+
ok: false,
|
|
135
|
+
error: {
|
|
136
|
+
reason: "unknown",
|
|
137
|
+
errorMessage: error.message,
|
|
138
|
+
},
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
return {
|
|
142
|
+
ok: false,
|
|
143
|
+
error: {
|
|
144
|
+
reason: "unknown",
|
|
145
|
+
errorMessage: JSON.stringify(error),
|
|
146
|
+
},
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
exports.fetcher = fetcherImpl;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Supplier = void 0;
|
|
13
|
+
exports.Supplier = {
|
|
14
|
+
get: (supplier) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
if (typeof supplier === "function") {
|
|
16
|
+
return supplier();
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
return supplier;
|
|
20
|
+
}
|
|
21
|
+
}),
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getHeader(headers: Record<string, any>, header: string): string | undefined;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getHeader = void 0;
|
|
4
|
+
function getHeader(headers, header) {
|
|
5
|
+
for (const [headerKey, headerValue] of Object.entries(headers)) {
|
|
6
|
+
if (headerKey.toLowerCase() === header.toLowerCase()) {
|
|
7
|
+
return headerValue;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
return undefined;
|
|
11
|
+
}
|
|
12
|
+
exports.getHeader = getHeader;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Supplier = exports.getHeader = exports.fetcher = void 0;
|
|
4
|
+
var Fetcher_1 = require("./Fetcher");
|
|
5
|
+
Object.defineProperty(exports, "fetcher", { enumerable: true, get: function () { return Fetcher_1.fetcher; } });
|
|
6
|
+
var getHeader_1 = require("./getHeader");
|
|
7
|
+
Object.defineProperty(exports, "getHeader", { enumerable: true, get: function () { return getHeader_1.getHeader; } });
|
|
8
|
+
var Supplier_1 = require("./Supplier");
|
|
9
|
+
Object.defineProperty(exports, "Supplier", { enumerable: true, get: function () { return Supplier_1.Supplier; } });
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./fetcher"), exports);
|
|
18
|
+
__exportStar(require("./auth"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PolytomicEnvironment = void 0;
|
|
7
|
+
exports.PolytomicEnvironment = {
|
|
8
|
+
Default: "https://app.polytomic.com/",
|
|
9
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export declare class PolytomicError extends Error {
|
|
5
|
+
readonly statusCode?: number;
|
|
6
|
+
readonly body?: unknown;
|
|
7
|
+
constructor({ message, statusCode, body }: {
|
|
8
|
+
message?: string;
|
|
9
|
+
statusCode?: number;
|
|
10
|
+
body?: unknown;
|
|
11
|
+
});
|
|
12
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PolytomicError = void 0;
|
|
7
|
+
class PolytomicError extends Error {
|
|
8
|
+
constructor({ message, statusCode, body }) {
|
|
9
|
+
super(buildMessage({ message, statusCode, body }));
|
|
10
|
+
Object.setPrototypeOf(this, PolytomicError.prototype);
|
|
11
|
+
if (statusCode != null) {
|
|
12
|
+
this.statusCode = statusCode;
|
|
13
|
+
}
|
|
14
|
+
if (body !== undefined) {
|
|
15
|
+
this.body = body;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.PolytomicError = PolytomicError;
|
|
20
|
+
function buildMessage({ message, statusCode, body, }) {
|
|
21
|
+
let lines = [];
|
|
22
|
+
if (message != null) {
|
|
23
|
+
lines.push(message);
|
|
24
|
+
}
|
|
25
|
+
if (statusCode != null) {
|
|
26
|
+
lines.push(`Status code: ${statusCode.toString()}`);
|
|
27
|
+
}
|
|
28
|
+
if (body != null) {
|
|
29
|
+
lines.push(`Body: ${JSON.stringify(body, undefined, 2)}`);
|
|
30
|
+
}
|
|
31
|
+
return lines.join("\n");
|
|
32
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PolytomicTimeoutError = void 0;
|
|
7
|
+
class PolytomicTimeoutError extends Error {
|
|
8
|
+
constructor() {
|
|
9
|
+
super("Timeout");
|
|
10
|
+
Object.setPrototypeOf(this, PolytomicTimeoutError.prototype);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.PolytomicTimeoutError = PolytomicTimeoutError;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PolytomicTimeoutError = exports.PolytomicError = void 0;
|
|
4
|
+
var PolytomicError_1 = require("./PolytomicError");
|
|
5
|
+
Object.defineProperty(exports, "PolytomicError", { enumerable: true, get: function () { return PolytomicError_1.PolytomicError; } });
|
|
6
|
+
var PolytomicTimeoutError_1 = require("./PolytomicTimeoutError");
|
|
7
|
+
Object.defineProperty(exports, "PolytomicTimeoutError", { enumerable: true, get: function () { return PolytomicTimeoutError_1.PolytomicTimeoutError; } });
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.PolytomicTimeoutError = exports.PolytomicError = exports.PolytomicEnvironment = exports.PolytomicClient = exports.Polytomic = void 0;
|
|
27
|
+
exports.Polytomic = __importStar(require("./api"));
|
|
28
|
+
var Client_1 = require("./Client");
|
|
29
|
+
Object.defineProperty(exports, "PolytomicClient", { enumerable: true, get: function () { return Client_1.PolytomicClient; } });
|
|
30
|
+
var environments_1 = require("./environments");
|
|
31
|
+
Object.defineProperty(exports, "PolytomicEnvironment", { enumerable: true, get: function () { return environments_1.PolytomicEnvironment; } });
|
|
32
|
+
var errors_1 = require("./errors");
|
|
33
|
+
Object.defineProperty(exports, "PolytomicError", { enumerable: true, get: function () { return errors_1.PolytomicError; } });
|
|
34
|
+
Object.defineProperty(exports, "PolytomicTimeoutError", { enumerable: true, get: function () { return errors_1.PolytomicTimeoutError; } });
|
package/environments.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PolytomicEnvironment = void 0;
|
|
7
|
+
exports.PolytomicEnvironment = {
|
|
8
|
+
Default: "https://app.polytomic.com/",
|
|
9
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export declare class PolytomicError extends Error {
|
|
5
|
+
readonly statusCode?: number;
|
|
6
|
+
readonly body?: unknown;
|
|
7
|
+
constructor({ message, statusCode, body }: {
|
|
8
|
+
message?: string;
|
|
9
|
+
statusCode?: number;
|
|
10
|
+
body?: unknown;
|
|
11
|
+
});
|
|
12
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PolytomicError = void 0;
|
|
7
|
+
class PolytomicError extends Error {
|
|
8
|
+
constructor({ message, statusCode, body }) {
|
|
9
|
+
super(buildMessage({ message, statusCode, body }));
|
|
10
|
+
Object.setPrototypeOf(this, PolytomicError.prototype);
|
|
11
|
+
if (statusCode != null) {
|
|
12
|
+
this.statusCode = statusCode;
|
|
13
|
+
}
|
|
14
|
+
if (body !== undefined) {
|
|
15
|
+
this.body = body;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.PolytomicError = PolytomicError;
|
|
20
|
+
function buildMessage({ message, statusCode, body, }) {
|
|
21
|
+
let lines = [];
|
|
22
|
+
if (message != null) {
|
|
23
|
+
lines.push(message);
|
|
24
|
+
}
|
|
25
|
+
if (statusCode != null) {
|
|
26
|
+
lines.push(`Status code: ${statusCode.toString()}`);
|
|
27
|
+
}
|
|
28
|
+
if (body != null) {
|
|
29
|
+
lines.push(`Body: ${JSON.stringify(body, undefined, 2)}`);
|
|
30
|
+
}
|
|
31
|
+
return lines.join("\n");
|
|
32
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PolytomicTimeoutError = void 0;
|
|
7
|
+
class PolytomicTimeoutError extends Error {
|
|
8
|
+
constructor() {
|
|
9
|
+
super("Timeout");
|
|
10
|
+
Object.setPrototypeOf(this, PolytomicTimeoutError.prototype);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.PolytomicTimeoutError = PolytomicTimeoutError;
|
package/errors/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PolytomicTimeoutError = exports.PolytomicError = void 0;
|
|
4
|
+
var PolytomicError_1 = require("./PolytomicError");
|
|
5
|
+
Object.defineProperty(exports, "PolytomicError", { enumerable: true, get: function () { return PolytomicError_1.PolytomicError; } });
|
|
6
|
+
var PolytomicTimeoutError_1 = require("./PolytomicTimeoutError");
|
|
7
|
+
Object.defineProperty(exports, "PolytomicTimeoutError", { enumerable: true, get: function () { return PolytomicTimeoutError_1.PolytomicTimeoutError; } });
|
package/index.d.ts
ADDED
package/index.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.PolytomicTimeoutError = exports.PolytomicError = exports.PolytomicEnvironment = exports.PolytomicClient = exports.Polytomic = void 0;
|
|
27
|
+
exports.Polytomic = __importStar(require("./api"));
|
|
28
|
+
var Client_1 = require("./Client");
|
|
29
|
+
Object.defineProperty(exports, "PolytomicClient", { enumerable: true, get: function () { return Client_1.PolytomicClient; } });
|
|
30
|
+
var environments_1 = require("./environments");
|
|
31
|
+
Object.defineProperty(exports, "PolytomicEnvironment", { enumerable: true, get: function () { return environments_1.PolytomicEnvironment; } });
|
|
32
|
+
var errors_1 = require("./errors");
|
|
33
|
+
Object.defineProperty(exports, "PolytomicError", { enumerable: true, get: function () { return errors_1.PolytomicError; } });
|
|
34
|
+
Object.defineProperty(exports, "PolytomicTimeoutError", { enumerable: true, get: function () { return errors_1.PolytomicTimeoutError; } });
|