polytomic 1.5.0 → 1.9.0
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 +10 -0
- package/Client.js +25 -20
- package/api/errors/BadRequestError.d.ts +2 -2
- package/api/errors/BadRequestError.js +1 -1
- package/api/errors/ForbiddenError.d.ts +2 -2
- package/api/errors/ForbiddenError.js +1 -1
- package/api/errors/InternalServerError.d.ts +2 -2
- package/api/errors/InternalServerError.js +1 -1
- package/api/errors/NotFoundError.d.ts +2 -2
- package/api/errors/NotFoundError.js +1 -1
- package/api/errors/UnauthorizedError.d.ts +2 -2
- package/api/errors/UnauthorizedError.js +1 -1
- package/api/errors/UnprocessableEntityError.d.ts +2 -2
- package/api/errors/UnprocessableEntityError.js +1 -1
- package/api/errors/index.d.ts +1 -1
- package/api/errors/index.js +1 -1
- package/api/resources/bulkSync/client/Client.d.ts +55 -13
- package/api/resources/bulkSync/client/Client.js +109 -42
- package/api/resources/bulkSync/client/requests/CreateBulkSyncRequest.d.ts +2 -4
- package/api/resources/bulkSync/client/requests/UpdateBulkSyncRequest.d.ts +2 -4
- package/api/resources/bulkSync/client/requests/index.d.ts +6 -6
- package/api/resources/bulkSync/resources/executions/client/Client.d.ts +31 -3
- package/api/resources/bulkSync/resources/executions/client/Client.js +106 -10
- package/api/resources/bulkSync/resources/executions/client/index.d.ts +1 -1
- package/api/resources/bulkSync/resources/executions/client/index.js +15 -0
- package/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListStatusRequest.d.ts +24 -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/index.d.ts +1 -0
- package/api/resources/bulkSync/resources/index.js +1 -0
- package/api/resources/bulkSync/resources/schemas/client/Client.d.ts +30 -5
- package/api/resources/bulkSync/resources/schemas/client/Client.js +51 -19
- package/api/resources/bulkSync/resources/schemas/client/requests/BulkSyncSchemasRequest.d.ts +1 -1
- package/api/resources/bulkSync/resources/schemas/client/requests/SchemasListRequest.d.ts +1 -1
- package/api/resources/bulkSync/resources/schemas/client/requests/UpdateBulkSchema.d.ts +2 -1
- package/api/resources/bulkSync/resources/schemas/client/requests/index.d.ts +3 -3
- package/api/resources/bulkSync/types/V2CreateBulkSyncRequestSchemasItem.d.ts +1 -1
- package/api/resources/bulkSync/types/V2UpdateBulkSyncRequestSchemasItem.d.ts +1 -1
- package/api/resources/bulkSync/types/index.d.ts +0 -4
- package/api/resources/bulkSync/types/index.js +0 -4
- package/api/resources/connections/client/Client.d.ts +40 -9
- package/api/resources/connections/client/Client.js +78 -30
- package/api/resources/connections/client/requests/index.d.ts +4 -4
- package/api/resources/events/client/Client.d.ts +15 -3
- package/api/resources/events/client/Client.js +19 -8
- package/api/resources/events/client/requests/index.d.ts +1 -1
- package/api/resources/identity/client/Client.d.ts +11 -2
- package/api/resources/identity/client/Client.js +10 -5
- package/api/resources/index.d.ts +2 -0
- package/api/resources/index.js +3 -1
- package/api/resources/jobs/client/Client.d.ts +13 -2
- package/api/resources/jobs/client/Client.js +13 -6
- package/api/resources/modelSync/client/Client.d.ts +79 -22
- package/api/resources/modelSync/client/Client.js +207 -60
- package/api/resources/modelSync/client/requests/CreateModelSyncRequest.d.ts +4 -7
- package/api/resources/modelSync/client/requests/ModelSyncGetSourceRequest.d.ts +1 -1
- package/api/resources/modelSync/client/requests/UpdateModelSyncRequest.d.ts +4 -7
- package/api/resources/modelSync/client/requests/index.d.ts +6 -6
- package/api/resources/modelSync/resources/executions/client/Client.d.ts +30 -5
- package/api/resources/modelSync/resources/executions/client/Client.js +48 -18
- package/api/resources/models/client/Client.d.ts +46 -9
- package/api/resources/models/client/Client.js +85 -31
- package/api/resources/models/client/requests/GetEnrichmentInputFieldsRequest.d.ts +1 -1
- package/api/resources/models/client/requests/ModelsCreateRequest.d.ts +1 -1
- package/api/resources/models/client/requests/ModelsPreviewRequest.d.ts +1 -1
- package/api/resources/models/client/requests/UpdateModelRequest.d.ts +1 -1
- package/api/resources/models/client/requests/index.d.ts +7 -7
- package/api/resources/organization/client/Client.d.ts +33 -6
- package/api/resources/organization/client/Client.js +55 -20
- package/api/resources/organization/client/requests/index.d.ts +2 -2
- package/api/resources/permissions/client/Client.d.ts +7 -0
- package/api/resources/permissions/resources/policies/client/Client.d.ts +28 -6
- package/api/resources/permissions/resources/policies/client/Client.js +50 -20
- package/api/resources/permissions/resources/policies/client/requests/CreatePolicyRequest.d.ts +1 -1
- package/api/resources/permissions/resources/policies/client/requests/UpdatePolicyRequest.d.ts +1 -1
- package/api/resources/permissions/resources/policies/client/requests/index.d.ts +2 -2
- package/api/resources/permissions/resources/roles/client/Client.d.ts +28 -6
- package/api/resources/permissions/resources/roles/client/Client.js +50 -20
- package/api/resources/permissions/resources/roles/client/requests/index.d.ts +2 -2
- package/api/resources/queryRunner/client/Client.d.ts +58 -0
- package/api/resources/queryRunner/client/Client.js +223 -0
- package/api/resources/queryRunner/client/index.d.ts +1 -0
- package/api/resources/queryRunner/client/index.js +17 -0
- package/api/resources/queryRunner/client/requests/QueryRunnerGetQueryRequest.d.ts +10 -0
- package/api/resources/queryRunner/client/requests/V4RunQueryRequest.d.ts +15 -0
- package/api/resources/queryRunner/client/requests/index.d.ts +2 -0
- package/api/resources/queryRunner/client/requests/index.js +2 -0
- package/api/resources/queryRunner/index.d.ts +1 -0
- package/api/resources/queryRunner/index.js +17 -0
- package/api/resources/schemas/client/Client.d.ts +26 -5
- package/api/resources/schemas/client/Client.js +44 -18
- package/api/resources/users/client/Client.d.ts +45 -7
- package/api/resources/users/client/Client.js +75 -26
- package/api/resources/users/client/requests/index.d.ts +3 -3
- package/api/resources/webhooks/client/Client.d.ts +32 -6
- package/api/resources/webhooks/client/Client.js +54 -20
- package/api/resources/webhooks/client/requests/index.d.ts +2 -2
- package/api/types/ActivateSyncEnvelope.d.ts +1 -1
- package/api/types/ApiKeyResponseEnvelope.d.ts +1 -1
- package/api/types/BulkFilter.d.ts +10 -0
- package/api/types/BulkItemizedSchedule.d.ts +1 -1
- package/api/types/BulkMultiScheduleConfiguration.d.ts +2 -2
- package/api/types/BulkSchedule.d.ts +1 -1
- package/api/types/BulkSchema.d.ts +2 -1
- package/api/types/BulkSchemaEnvelope.d.ts +1 -1
- package/api/types/BulkSyncCanceledEvent.d.ts +11 -0
- package/api/types/BulkSyncCompletedEvent.d.ts +12 -0
- package/api/types/BulkSyncCompletedWithErrorEvent.d.ts +12 -0
- package/api/types/BulkSyncDest.d.ts +2 -2
- package/api/types/BulkSyncDestEnvelope.d.ts +1 -1
- package/api/types/BulkSyncExecution.d.ts +1 -1
- package/api/types/BulkSyncExecutionEnvelope.d.ts +1 -1
- package/api/types/BulkSyncExecutionStatus.d.ts +10 -0
- package/api/types/BulkSyncFailedEvent.d.ts +12 -0
- package/api/types/BulkSyncFailedEvent.js +5 -0
- package/api/types/BulkSyncListEnvelope.d.ts +1 -1
- package/api/types/BulkSyncResponse.d.ts +5 -1
- package/api/types/BulkSyncResponseEnvelope.d.ts +1 -1
- package/api/types/BulkSyncRunningEvent.d.ts +11 -0
- package/api/types/BulkSyncRunningEvent.js +5 -0
- package/api/types/BulkSyncSchemaExecution.d.ts +1 -1
- package/api/types/BulkSyncSchemaExecutionStatus.d.ts +15 -0
- package/api/types/BulkSyncSchemaExecutionStatus.js +5 -0
- package/api/types/BulkSyncSource.d.ts +1 -1
- package/api/types/BulkSyncSourceEnvelope.d.ts +1 -1
- package/api/types/BulkSyncSourceSchemaEnvelope.d.ts +1 -1
- package/api/types/BulkSyncSourceStatusEnvelope.d.ts +1 -1
- package/api/types/BulkSyncStatusEnvelope.d.ts +1 -1
- package/api/types/BulkSyncStatusResponse.d.ts +1 -1
- package/api/types/ConnectCardResponseEnvelope.d.ts +1 -1
- package/api/types/ConnectionListResponseEnvelope.d.ts +1 -1
- package/api/types/ConnectionMetaResponse.d.ts +1 -1
- package/api/types/ConnectionParameterValuesResp.d.ts +1 -1
- package/api/types/ConnectionParameterValuesResponseEnvelope.d.ts +1 -1
- package/api/types/ConnectionResponseEnvelope.d.ts +1 -1
- package/api/types/ConnectionResponseSchema.d.ts +1 -1
- package/api/types/ConnectionTypeResponseEnvelope.d.ts +1 -1
- package/api/types/CreateConnectionResponseEnvelope.d.ts +1 -1
- package/api/types/CreateConnectionResponseSchema.d.ts +1 -1
- package/api/types/CreateModelRequest.d.ts +1 -1
- package/api/types/Enrichment.d.ts +1 -1
- package/api/types/Event.d.ts +2 -1
- package/api/types/EventBody.d.ts +5 -0
- package/api/types/EventBody.js +5 -0
- package/api/types/EventsEnvelope.d.ts +1 -1
- package/api/types/ExecutionLogsResponseEnvelope.d.ts +1 -1
- package/api/types/FieldConfiguration.js +5 -0
- package/api/types/Filter.d.ts +1 -1
- package/api/types/GetConnectionMetaEnvelope.d.ts +1 -1
- package/api/types/GetExecutionResponseEnvelope.d.ts +1 -1
- package/api/types/GetExecutionResponseSchema.d.ts +1 -1
- package/api/types/GetIdentityResponseEnvelope.d.ts +1 -1
- package/api/types/GetModelSyncSourceMetaEnvelope.d.ts +1 -1
- package/api/types/Identity.d.ts +1 -1
- package/api/types/JobResponse.d.ts +1 -1
- package/api/types/JobResponseEnvelope.d.ts +1 -1
- package/api/types/ListBulkSchema.d.ts +1 -1
- package/api/types/ListBulkSyncExecutionStatusEnvelope.d.ts +7 -0
- package/api/types/ListBulkSyncExecutionStatusEnvelope.js +5 -0
- package/api/types/ListBulkSyncExecutionsEnvelope.d.ts +1 -1
- package/api/types/ListExecutionResponseEnvelope.d.ts +1 -1
- package/api/types/ListModelSyncResponseEnvelope.d.ts +1 -1
- package/api/types/ListPoliciesResponseEnvelope.d.ts +1 -1
- package/api/types/ListUsersEnvelope.d.ts +1 -1
- package/api/types/ModelFieldResponse.d.ts +1 -1
- package/api/types/ModelListResponseEnvelope.d.ts +1 -1
- package/api/types/ModelRelation.d.ts +1 -1
- package/api/types/ModelResponse.d.ts +1 -1
- package/api/types/ModelResponseEnvelope.d.ts +1 -1
- package/api/types/ModelSample.d.ts +1 -1
- package/api/types/ModelSampleResponseEnvelope.d.ts +1 -1
- package/api/types/ModelSyncField.d.ts +6 -2
- package/api/types/ModelSyncResponse.d.ts +1 -1
- package/api/types/ModelSyncResponseEnvelope.d.ts +1 -1
- package/api/types/ModelSyncSourceMetaResponse.d.ts +1 -1
- package/api/types/OrganizationEnvelope.d.ts +1 -1
- package/api/types/OrganizationsEnvelope.d.ts +1 -1
- package/api/types/Override.d.ts +1 -1
- package/api/types/Pagination.d.ts +9 -0
- package/api/types/Pagination.js +5 -0
- package/api/types/PolicyResponse.d.ts +1 -1
- package/api/types/PolicyResponseEnvelope.d.ts +1 -1
- package/api/types/Relation.d.ts +1 -1
- package/api/types/RoleListResponseEnvelope.d.ts +1 -1
- package/api/types/RoleResponseEnvelope.d.ts +1 -1
- package/api/types/Schedule.d.ts +1 -1
- package/api/types/ScheduleOptionResponse.d.ts +1 -1
- package/api/types/ScheduleOptionResponseEnvelope.d.ts +1 -1
- package/api/types/ScheduleScheduleOption.d.ts +1 -1
- package/api/types/Schema.d.ts +1 -1
- package/api/{resources/bulkSync/types → types}/SchemaConfiguration.d.ts +3 -2
- package/api/types/SchemaConfiguration.js +5 -0
- package/api/types/SchemaField.d.ts +1 -1
- package/api/types/StartModelSyncResponseEnvelope.d.ts +1 -1
- package/api/types/StartModelSyncResponseSchema.d.ts +1 -1
- package/api/types/SupportedBulkMode.d.ts +12 -0
- package/api/types/SupportedBulkMode.js +5 -0
- package/api/types/SupportedMode.d.ts +6 -5
- package/api/types/SyncCanceledEvent.d.ts +12 -0
- package/api/types/SyncCanceledEvent.js +5 -0
- package/api/types/SyncCompletedEvent.d.ts +25 -0
- package/api/types/SyncCompletedEvent.js +5 -0
- package/api/types/SyncCompletedWithErrorsEvent.d.ts +13 -0
- package/api/types/SyncCompletedWithErrorsEvent.js +5 -0
- package/api/types/SyncDestinationProperties.d.ts +1 -0
- package/api/types/SyncFailedEvent.d.ts +11 -0
- package/api/types/SyncFailedEvent.js +5 -0
- package/api/types/SyncMode.d.ts +17 -0
- package/api/types/SyncMode.js +16 -0
- package/api/types/SyncRunningEvent.d.ts +10 -0
- package/api/types/SyncRunningEvent.js +5 -0
- package/api/types/SyncStatusEnvelope.d.ts +1 -1
- package/api/types/SyncStatusResponse.d.ts +1 -1
- package/api/types/TargetField.d.ts +1 -1
- package/api/types/TargetObject.d.ts +10 -0
- package/api/types/TargetObject.js +5 -0
- package/api/types/TargetResponse.d.ts +1 -1
- package/api/types/TargetResponseEnvelope.d.ts +1 -1
- package/api/types/UserEnvelope.d.ts +1 -1
- package/api/types/V2SchemaConfigurationFieldsItem.d.ts +5 -0
- package/api/types/V2SchemaConfigurationFieldsItem.js +5 -0
- package/api/types/V4QueryResultsEnvelope.d.ts +8 -0
- package/api/types/V4QueryResultsEnvelope.js +5 -0
- package/api/types/V4RunQueryEnvelope.d.ts +7 -0
- package/api/types/V4RunQueryEnvelope.js +5 -0
- package/api/types/V4RunQueryResult.d.ts +18 -0
- package/api/types/V4RunQueryResult.js +5 -0
- package/api/types/V4TargetObjectsResponseEnvelope.d.ts +7 -0
- package/api/types/V4TargetObjectsResponseEnvelope.js +5 -0
- package/api/types/WebhookEnvelope.d.ts +1 -1
- package/api/types/WebhookListEnvelope.d.ts +1 -1
- package/api/types/WorkTaskStatus.d.ts +2 -1
- package/api/types/WorkTaskStatus.js +1 -0
- package/api/types/index.d.ts +27 -1
- package/api/types/index.js +27 -1
- package/core/fetcher/Fetcher.d.ts +3 -2
- package/core/fetcher/Fetcher.js +130 -19
- package/core/runtime/runtime.d.ts +1 -1
- package/core/runtime/runtime.js +11 -1
- package/dist/Client.d.ts +10 -0
- package/dist/Client.js +25 -20
- package/dist/api/errors/BadRequestError.d.ts +2 -2
- package/dist/api/errors/BadRequestError.js +1 -1
- package/dist/api/errors/ForbiddenError.d.ts +2 -2
- package/dist/api/errors/ForbiddenError.js +1 -1
- package/dist/api/errors/InternalServerError.d.ts +2 -2
- package/dist/api/errors/InternalServerError.js +1 -1
- package/dist/api/errors/NotFoundError.d.ts +2 -2
- package/dist/api/errors/NotFoundError.js +1 -1
- package/dist/api/errors/UnauthorizedError.d.ts +2 -2
- package/dist/api/errors/UnauthorizedError.js +1 -1
- package/dist/api/errors/UnprocessableEntityError.d.ts +2 -2
- package/dist/api/errors/UnprocessableEntityError.js +1 -1
- package/dist/api/errors/index.d.ts +1 -1
- package/dist/api/errors/index.js +1 -1
- package/dist/api/resources/bulkSync/client/Client.d.ts +55 -13
- package/dist/api/resources/bulkSync/client/Client.js +109 -42
- package/dist/api/resources/bulkSync/client/requests/CreateBulkSyncRequest.d.ts +2 -4
- package/dist/api/resources/bulkSync/client/requests/UpdateBulkSyncRequest.d.ts +2 -4
- package/dist/api/resources/bulkSync/client/requests/index.d.ts +6 -6
- package/dist/api/resources/bulkSync/resources/executions/client/Client.d.ts +31 -3
- package/dist/api/resources/bulkSync/resources/executions/client/Client.js +106 -10
- package/dist/api/resources/bulkSync/resources/executions/client/index.d.ts +1 -1
- package/dist/api/resources/bulkSync/resources/executions/client/index.js +15 -0
- package/dist/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListStatusRequest.d.ts +24 -0
- package/dist/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListStatusRequest.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/index.d.ts +1 -0
- package/dist/api/resources/bulkSync/resources/index.js +1 -0
- package/dist/api/resources/bulkSync/resources/schemas/client/Client.d.ts +30 -5
- package/dist/api/resources/bulkSync/resources/schemas/client/Client.js +51 -19
- package/dist/api/resources/bulkSync/resources/schemas/client/requests/BulkSyncSchemasRequest.d.ts +1 -1
- package/dist/api/resources/bulkSync/resources/schemas/client/requests/SchemasListRequest.d.ts +1 -1
- package/dist/api/resources/bulkSync/resources/schemas/client/requests/UpdateBulkSchema.d.ts +2 -1
- package/dist/api/resources/bulkSync/resources/schemas/client/requests/index.d.ts +3 -3
- package/dist/api/resources/bulkSync/types/V2CreateBulkSyncRequestSchemasItem.d.ts +1 -1
- package/dist/api/resources/bulkSync/types/V2UpdateBulkSyncRequestSchemasItem.d.ts +1 -1
- package/dist/api/resources/bulkSync/types/index.d.ts +0 -4
- package/dist/api/resources/bulkSync/types/index.js +0 -4
- package/dist/api/resources/connections/client/Client.d.ts +40 -9
- package/dist/api/resources/connections/client/Client.js +78 -30
- package/dist/api/resources/connections/client/requests/index.d.ts +4 -4
- package/dist/api/resources/events/client/Client.d.ts +15 -3
- package/dist/api/resources/events/client/Client.js +19 -8
- package/dist/api/resources/events/client/requests/index.d.ts +1 -1
- package/dist/api/resources/identity/client/Client.d.ts +11 -2
- package/dist/api/resources/identity/client/Client.js +10 -5
- package/dist/api/resources/index.d.ts +2 -0
- package/dist/api/resources/index.js +3 -1
- package/dist/api/resources/jobs/client/Client.d.ts +13 -2
- package/dist/api/resources/jobs/client/Client.js +13 -6
- package/dist/api/resources/modelSync/client/Client.d.ts +79 -22
- package/dist/api/resources/modelSync/client/Client.js +207 -60
- package/dist/api/resources/modelSync/client/requests/CreateModelSyncRequest.d.ts +4 -7
- package/dist/api/resources/modelSync/client/requests/ModelSyncGetSourceRequest.d.ts +1 -1
- package/dist/api/resources/modelSync/client/requests/UpdateModelSyncRequest.d.ts +4 -7
- package/dist/api/resources/modelSync/client/requests/index.d.ts +6 -6
- package/dist/api/resources/modelSync/resources/executions/client/Client.d.ts +30 -5
- package/dist/api/resources/modelSync/resources/executions/client/Client.js +48 -18
- package/dist/api/resources/models/client/Client.d.ts +46 -9
- package/dist/api/resources/models/client/Client.js +85 -31
- package/dist/api/resources/models/client/requests/GetEnrichmentInputFieldsRequest.d.ts +1 -1
- package/dist/api/resources/models/client/requests/ModelsCreateRequest.d.ts +1 -1
- package/dist/api/resources/models/client/requests/ModelsPreviewRequest.d.ts +1 -1
- package/dist/api/resources/models/client/requests/UpdateModelRequest.d.ts +1 -1
- package/dist/api/resources/models/client/requests/index.d.ts +7 -7
- package/dist/api/resources/organization/client/Client.d.ts +33 -6
- package/dist/api/resources/organization/client/Client.js +55 -20
- package/dist/api/resources/organization/client/requests/index.d.ts +2 -2
- package/dist/api/resources/permissions/client/Client.d.ts +7 -0
- package/dist/api/resources/permissions/resources/policies/client/Client.d.ts +28 -6
- package/dist/api/resources/permissions/resources/policies/client/Client.js +50 -20
- package/dist/api/resources/permissions/resources/policies/client/requests/CreatePolicyRequest.d.ts +1 -1
- package/dist/api/resources/permissions/resources/policies/client/requests/UpdatePolicyRequest.d.ts +1 -1
- package/dist/api/resources/permissions/resources/policies/client/requests/index.d.ts +2 -2
- package/dist/api/resources/permissions/resources/roles/client/Client.d.ts +28 -6
- package/dist/api/resources/permissions/resources/roles/client/Client.js +50 -20
- package/dist/api/resources/permissions/resources/roles/client/requests/index.d.ts +2 -2
- package/dist/api/resources/queryRunner/client/Client.d.ts +58 -0
- package/dist/api/resources/queryRunner/client/Client.js +223 -0
- package/dist/api/resources/queryRunner/client/index.d.ts +1 -0
- package/dist/api/resources/queryRunner/client/index.js +17 -0
- package/dist/api/resources/queryRunner/client/requests/QueryRunnerGetQueryRequest.d.ts +10 -0
- package/dist/api/resources/queryRunner/client/requests/QueryRunnerGetQueryRequest.js +5 -0
- package/dist/api/resources/queryRunner/client/requests/V4RunQueryRequest.d.ts +15 -0
- package/dist/api/resources/queryRunner/client/requests/V4RunQueryRequest.js +5 -0
- package/dist/api/resources/queryRunner/client/requests/index.d.ts +2 -0
- package/dist/api/resources/queryRunner/client/requests/index.js +2 -0
- package/dist/api/resources/queryRunner/index.d.ts +1 -0
- package/dist/api/resources/queryRunner/index.js +17 -0
- package/dist/api/resources/schemas/client/Client.d.ts +26 -5
- package/dist/api/resources/schemas/client/Client.js +44 -18
- package/dist/api/resources/users/client/Client.d.ts +45 -7
- package/dist/api/resources/users/client/Client.js +75 -26
- package/dist/api/resources/users/client/requests/index.d.ts +3 -3
- package/dist/api/resources/webhooks/client/Client.d.ts +32 -6
- package/dist/api/resources/webhooks/client/Client.js +54 -20
- package/dist/api/resources/webhooks/client/requests/index.d.ts +2 -2
- package/dist/api/types/ActivateSyncEnvelope.d.ts +1 -1
- package/dist/api/types/ApiKeyResponseEnvelope.d.ts +1 -1
- package/dist/api/types/BulkFilter.d.ts +10 -0
- package/dist/api/types/BulkFilter.js +5 -0
- package/dist/api/types/BulkItemizedSchedule.d.ts +1 -1
- package/dist/api/types/BulkMultiScheduleConfiguration.d.ts +2 -2
- package/dist/api/types/BulkSchedule.d.ts +1 -1
- package/dist/api/types/BulkSchema.d.ts +2 -1
- package/dist/api/types/BulkSchemaEnvelope.d.ts +1 -1
- package/dist/api/types/BulkSyncCanceledEvent.d.ts +11 -0
- package/dist/api/types/BulkSyncCanceledEvent.js +5 -0
- package/dist/api/types/BulkSyncCompletedEvent.d.ts +12 -0
- package/dist/api/types/BulkSyncCompletedEvent.js +5 -0
- package/dist/api/types/BulkSyncCompletedWithErrorEvent.d.ts +12 -0
- package/dist/api/types/BulkSyncCompletedWithErrorEvent.js +5 -0
- package/dist/api/types/BulkSyncDest.d.ts +2 -2
- package/dist/api/types/BulkSyncDestEnvelope.d.ts +1 -1
- package/dist/api/types/BulkSyncExecution.d.ts +1 -1
- package/dist/api/types/BulkSyncExecutionEnvelope.d.ts +1 -1
- package/dist/api/types/BulkSyncExecutionStatus.d.ts +10 -0
- package/dist/api/types/BulkSyncExecutionStatus.js +5 -0
- package/dist/api/types/BulkSyncFailedEvent.d.ts +12 -0
- package/dist/api/types/BulkSyncFailedEvent.js +5 -0
- package/dist/api/types/BulkSyncListEnvelope.d.ts +1 -1
- package/dist/api/types/BulkSyncResponse.d.ts +5 -1
- package/dist/api/types/BulkSyncResponseEnvelope.d.ts +1 -1
- package/dist/api/types/BulkSyncRunningEvent.d.ts +11 -0
- package/dist/api/types/BulkSyncRunningEvent.js +5 -0
- package/dist/api/types/BulkSyncSchemaExecution.d.ts +1 -1
- package/dist/api/types/BulkSyncSchemaExecutionStatus.d.ts +15 -0
- package/dist/api/types/BulkSyncSchemaExecutionStatus.js +5 -0
- package/dist/api/types/BulkSyncSource.d.ts +1 -1
- package/dist/api/types/BulkSyncSourceEnvelope.d.ts +1 -1
- package/dist/api/types/BulkSyncSourceSchemaEnvelope.d.ts +1 -1
- package/dist/api/types/BulkSyncSourceStatusEnvelope.d.ts +1 -1
- package/dist/api/types/BulkSyncStatusEnvelope.d.ts +1 -1
- package/dist/api/types/BulkSyncStatusResponse.d.ts +1 -1
- package/dist/api/types/ConnectCardResponseEnvelope.d.ts +1 -1
- package/dist/api/types/ConnectionListResponseEnvelope.d.ts +1 -1
- package/dist/api/types/ConnectionMetaResponse.d.ts +1 -1
- package/dist/api/types/ConnectionParameterValuesResp.d.ts +1 -1
- package/dist/api/types/ConnectionParameterValuesResponseEnvelope.d.ts +1 -1
- package/dist/api/types/ConnectionResponseEnvelope.d.ts +1 -1
- package/dist/api/types/ConnectionResponseSchema.d.ts +1 -1
- package/dist/api/types/ConnectionTypeResponseEnvelope.d.ts +1 -1
- package/dist/api/types/CreateConnectionResponseEnvelope.d.ts +1 -1
- package/dist/api/types/CreateConnectionResponseSchema.d.ts +1 -1
- package/dist/api/types/CreateModelRequest.d.ts +1 -1
- package/dist/api/types/Enrichment.d.ts +1 -1
- package/dist/api/types/Event.d.ts +2 -1
- package/dist/api/types/EventBody.d.ts +5 -0
- package/dist/api/types/EventBody.js +5 -0
- package/dist/api/types/EventsEnvelope.d.ts +1 -1
- package/dist/api/types/ExecutionLogsResponseEnvelope.d.ts +1 -1
- package/dist/api/types/FieldConfiguration.js +5 -0
- package/dist/api/types/Filter.d.ts +1 -1
- package/dist/api/types/GetConnectionMetaEnvelope.d.ts +1 -1
- package/dist/api/types/GetExecutionResponseEnvelope.d.ts +1 -1
- package/dist/api/types/GetExecutionResponseSchema.d.ts +1 -1
- package/dist/api/types/GetIdentityResponseEnvelope.d.ts +1 -1
- package/dist/api/types/GetModelSyncSourceMetaEnvelope.d.ts +1 -1
- package/dist/api/types/Identity.d.ts +1 -1
- package/dist/api/types/JobResponse.d.ts +1 -1
- package/dist/api/types/JobResponseEnvelope.d.ts +1 -1
- package/dist/api/types/ListBulkSchema.d.ts +1 -1
- package/dist/api/types/ListBulkSyncExecutionStatusEnvelope.d.ts +7 -0
- package/dist/api/types/ListBulkSyncExecutionStatusEnvelope.js +5 -0
- package/dist/api/types/ListBulkSyncExecutionsEnvelope.d.ts +1 -1
- package/dist/api/types/ListExecutionResponseEnvelope.d.ts +1 -1
- package/dist/api/types/ListModelSyncResponseEnvelope.d.ts +1 -1
- package/dist/api/types/ListPoliciesResponseEnvelope.d.ts +1 -1
- package/dist/api/types/ListUsersEnvelope.d.ts +1 -1
- package/dist/api/types/ModelFieldResponse.d.ts +1 -1
- package/dist/api/types/ModelListResponseEnvelope.d.ts +1 -1
- package/dist/api/types/ModelRelation.d.ts +1 -1
- package/dist/api/types/ModelResponse.d.ts +1 -1
- package/dist/api/types/ModelResponseEnvelope.d.ts +1 -1
- package/dist/api/types/ModelSample.d.ts +1 -1
- package/dist/api/types/ModelSampleResponseEnvelope.d.ts +1 -1
- package/dist/api/types/ModelSyncField.d.ts +6 -2
- package/dist/api/types/ModelSyncResponse.d.ts +1 -1
- package/dist/api/types/ModelSyncResponseEnvelope.d.ts +1 -1
- package/dist/api/types/ModelSyncSourceMetaResponse.d.ts +1 -1
- package/dist/api/types/OrganizationEnvelope.d.ts +1 -1
- package/dist/api/types/OrganizationsEnvelope.d.ts +1 -1
- package/dist/api/types/Override.d.ts +1 -1
- package/dist/api/types/Pagination.d.ts +9 -0
- package/dist/api/types/Pagination.js +5 -0
- package/dist/api/types/PolicyResponse.d.ts +1 -1
- package/dist/api/types/PolicyResponseEnvelope.d.ts +1 -1
- package/dist/api/types/Relation.d.ts +1 -1
- package/dist/api/types/RoleListResponseEnvelope.d.ts +1 -1
- package/dist/api/types/RoleResponseEnvelope.d.ts +1 -1
- package/dist/api/types/Schedule.d.ts +1 -1
- package/dist/api/types/ScheduleOptionResponse.d.ts +1 -1
- package/dist/api/types/ScheduleOptionResponseEnvelope.d.ts +1 -1
- package/dist/api/types/ScheduleScheduleOption.d.ts +1 -1
- package/dist/api/types/Schema.d.ts +1 -1
- package/dist/api/{resources/bulkSync/types → types}/SchemaConfiguration.d.ts +3 -2
- package/dist/api/types/SchemaConfiguration.js +5 -0
- package/dist/api/types/SchemaField.d.ts +1 -1
- package/dist/api/types/StartModelSyncResponseEnvelope.d.ts +1 -1
- package/dist/api/types/StartModelSyncResponseSchema.d.ts +1 -1
- package/dist/api/types/SupportedBulkMode.d.ts +12 -0
- package/dist/api/types/SupportedBulkMode.js +5 -0
- package/dist/api/types/SupportedMode.d.ts +6 -5
- package/dist/api/types/SyncCanceledEvent.d.ts +12 -0
- package/dist/api/types/SyncCanceledEvent.js +5 -0
- package/dist/api/types/SyncCompletedEvent.d.ts +25 -0
- package/dist/api/types/SyncCompletedEvent.js +5 -0
- package/dist/api/types/SyncCompletedWithErrorsEvent.d.ts +13 -0
- package/dist/api/types/SyncCompletedWithErrorsEvent.js +5 -0
- package/dist/api/types/SyncDestinationProperties.d.ts +1 -0
- package/dist/api/types/SyncFailedEvent.d.ts +11 -0
- package/dist/api/types/SyncFailedEvent.js +5 -0
- package/dist/api/types/SyncMode.d.ts +17 -0
- package/dist/api/types/SyncMode.js +16 -0
- package/dist/api/types/SyncRunningEvent.d.ts +10 -0
- package/dist/api/types/SyncRunningEvent.js +5 -0
- package/dist/api/types/SyncStatusEnvelope.d.ts +1 -1
- package/dist/api/types/SyncStatusResponse.d.ts +1 -1
- package/dist/api/types/TargetField.d.ts +1 -1
- package/dist/api/types/TargetObject.d.ts +10 -0
- package/dist/api/types/TargetObject.js +5 -0
- package/dist/api/types/TargetResponse.d.ts +1 -1
- package/dist/api/types/TargetResponseEnvelope.d.ts +1 -1
- package/dist/api/types/UserEnvelope.d.ts +1 -1
- package/dist/api/types/V2SchemaConfigurationFieldsItem.d.ts +5 -0
- package/dist/api/types/V2SchemaConfigurationFieldsItem.js +5 -0
- package/dist/api/types/V4QueryResultsEnvelope.d.ts +8 -0
- package/dist/api/types/V4QueryResultsEnvelope.js +5 -0
- package/dist/api/types/V4RunQueryEnvelope.d.ts +7 -0
- package/dist/api/types/V4RunQueryEnvelope.js +5 -0
- package/dist/api/types/V4RunQueryResult.d.ts +18 -0
- package/dist/api/types/V4RunQueryResult.js +5 -0
- package/dist/api/types/V4TargetObjectsResponseEnvelope.d.ts +7 -0
- package/dist/api/types/V4TargetObjectsResponseEnvelope.js +5 -0
- package/dist/api/types/WebhookEnvelope.d.ts +1 -1
- package/dist/api/types/WebhookListEnvelope.d.ts +1 -1
- package/dist/api/types/WorkTaskStatus.d.ts +2 -1
- package/dist/api/types/WorkTaskStatus.js +1 -0
- package/dist/api/types/index.d.ts +27 -1
- package/dist/api/types/index.js +27 -1
- package/dist/core/fetcher/Fetcher.d.ts +3 -2
- package/dist/core/fetcher/Fetcher.js +130 -19
- package/dist/core/runtime/runtime.d.ts +1 -1
- package/dist/core/runtime/runtime.js +11 -1
- package/jest.config.js +2 -2
- package/package.json +13 -6
- package/api/resources/bulkSync/types/V2CreateBulkSyncRequestSchemasItemEnabledFieldsItem.d.ts +0 -5
- package/api/resources/bulkSync/types/V2UpdateBulkSyncRequestSchemasItemEnabledFieldsItem.d.ts +0 -5
- package/dist/api/resources/bulkSync/types/V2CreateBulkSyncRequestSchemasItemEnabledFieldsItem.d.ts +0 -5
- package/dist/api/resources/bulkSync/types/V2UpdateBulkSyncRequestSchemasItemEnabledFieldsItem.d.ts +0 -5
- package/tests/client.test.ts +0 -11
- /package/api/resources/bulkSync/{types/FieldConfiguration.js → resources/executions/client/requests/ExecutionsListStatusRequest.js} +0 -0
- /package/api/resources/{bulkSync/types/SchemaConfiguration.js → queryRunner/client/requests/QueryRunnerGetQueryRequest.js} +0 -0
- /package/api/resources/{bulkSync/types/V2CreateBulkSyncRequestSchemasItemEnabledFieldsItem.js → queryRunner/client/requests/V4RunQueryRequest.js} +0 -0
- /package/api/{resources/bulkSync/types/V2UpdateBulkSyncRequestSchemasItemEnabledFieldsItem.js → types/BulkFilter.js} +0 -0
- /package/{dist/api/resources/bulkSync/types/FieldConfiguration.js → api/types/BulkSyncCanceledEvent.js} +0 -0
- /package/{dist/api/resources/bulkSync/types/SchemaConfiguration.js → api/types/BulkSyncCompletedEvent.js} +0 -0
- /package/{dist/api/resources/bulkSync/types/V2CreateBulkSyncRequestSchemasItemEnabledFieldsItem.js → api/types/BulkSyncCompletedWithErrorEvent.js} +0 -0
- /package/{dist/api/resources/bulkSync/types/V2UpdateBulkSyncRequestSchemasItemEnabledFieldsItem.js → api/types/BulkSyncExecutionStatus.js} +0 -0
- /package/api/{resources/bulkSync/types → types}/FieldConfiguration.d.ts +0 -0
- /package/dist/api/{resources/bulkSync/types → types}/FieldConfiguration.d.ts +0 -0
|
@@ -41,9 +41,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
41
41
|
exports.Users = void 0;
|
|
42
42
|
const environments = __importStar(require("../../../../environments"));
|
|
43
43
|
const core = __importStar(require("../../../../core"));
|
|
44
|
-
const Polytomic = __importStar(require("
|
|
44
|
+
const Polytomic = __importStar(require("../../../index"));
|
|
45
45
|
const url_join_1 = __importDefault(require("url-join"));
|
|
46
|
-
const errors = __importStar(require("../../../../errors"));
|
|
46
|
+
const errors = __importStar(require("../../../../errors/index"));
|
|
47
47
|
class Users {
|
|
48
48
|
constructor(_options) {
|
|
49
49
|
this._options = _options;
|
|
@@ -52,30 +52,37 @@ class Users {
|
|
|
52
52
|
* > 🚧 Requires partner key
|
|
53
53
|
* >
|
|
54
54
|
* > User endpoints are only accessible using [partner keys](https://apidocs.polytomic.com/getting-started/obtaining-api-keys#partner-keys)
|
|
55
|
+
*
|
|
56
|
+
* @param {string} orgId
|
|
57
|
+
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
58
|
+
*
|
|
55
59
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
56
60
|
* @throws {@link Polytomic.NotFoundError}
|
|
57
61
|
*
|
|
58
62
|
* @example
|
|
59
|
-
* await
|
|
63
|
+
* await client.users.list("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
60
64
|
*/
|
|
61
65
|
list(orgId, requestOptions) {
|
|
62
66
|
var _a;
|
|
63
67
|
return __awaiter(this, void 0, void 0, function* () {
|
|
64
68
|
const _response = yield core.fetcher({
|
|
65
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/organizations/${orgId}/users`),
|
|
69
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/organizations/${encodeURIComponent(orgId)}/users`),
|
|
66
70
|
method: "GET",
|
|
67
71
|
headers: {
|
|
68
72
|
Authorization: yield this._getAuthorizationHeader(),
|
|
69
|
-
"X-Polytomic-Version":
|
|
73
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
74
|
+
? yield core.Supplier.get(this._options.version)
|
|
75
|
+
: undefined,
|
|
70
76
|
"X-Fern-Language": "JavaScript",
|
|
71
77
|
"X-Fern-SDK-Name": "polytomic",
|
|
72
|
-
"X-Fern-SDK-Version": "1.
|
|
78
|
+
"X-Fern-SDK-Version": "1.9.0",
|
|
73
79
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
74
80
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
75
81
|
},
|
|
76
82
|
contentType: "application/json",
|
|
77
83
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
78
84
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
85
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
79
86
|
});
|
|
80
87
|
if (_response.ok) {
|
|
81
88
|
return _response.body;
|
|
@@ -112,12 +119,17 @@ class Users {
|
|
|
112
119
|
* > 🚧 Requires partner key
|
|
113
120
|
* >
|
|
114
121
|
* > User endpoints are only accessible using [partner keys](https://apidocs.polytomic.com/getting-started/obtaining-api-keys#partner-keys)
|
|
122
|
+
*
|
|
123
|
+
* @param {string} orgId
|
|
124
|
+
* @param {Polytomic.CreateUserRequestSchema} request
|
|
125
|
+
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
126
|
+
*
|
|
115
127
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
116
128
|
* @throws {@link Polytomic.UnprocessableEntityError}
|
|
117
129
|
* @throws {@link Polytomic.InternalServerError}
|
|
118
130
|
*
|
|
119
131
|
* @example
|
|
120
|
-
* await
|
|
132
|
+
* await client.users.create("248df4b7-aa70-47b8-a036-33ac447e668d", {
|
|
121
133
|
* email: "mail@example.com"
|
|
122
134
|
* })
|
|
123
135
|
*/
|
|
@@ -125,14 +137,16 @@ class Users {
|
|
|
125
137
|
var _a;
|
|
126
138
|
return __awaiter(this, void 0, void 0, function* () {
|
|
127
139
|
const _response = yield core.fetcher({
|
|
128
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/organizations/${orgId}/users`),
|
|
140
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/organizations/${encodeURIComponent(orgId)}/users`),
|
|
129
141
|
method: "POST",
|
|
130
142
|
headers: {
|
|
131
143
|
Authorization: yield this._getAuthorizationHeader(),
|
|
132
|
-
"X-Polytomic-Version":
|
|
144
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
145
|
+
? yield core.Supplier.get(this._options.version)
|
|
146
|
+
: undefined,
|
|
133
147
|
"X-Fern-Language": "JavaScript",
|
|
134
148
|
"X-Fern-SDK-Name": "polytomic",
|
|
135
|
-
"X-Fern-SDK-Version": "1.
|
|
149
|
+
"X-Fern-SDK-Version": "1.9.0",
|
|
136
150
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
137
151
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
138
152
|
},
|
|
@@ -140,6 +154,7 @@ class Users {
|
|
|
140
154
|
body: request,
|
|
141
155
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
142
156
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
157
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
143
158
|
});
|
|
144
159
|
if (_response.ok) {
|
|
145
160
|
return _response.body;
|
|
@@ -178,31 +193,39 @@ class Users {
|
|
|
178
193
|
* > 🚧 Requires partner key
|
|
179
194
|
* >
|
|
180
195
|
* > User endpoints are only accessible using [partner keys](https://apidocs.polytomic.com/getting-started/obtaining-api-keys#partner-keys)
|
|
196
|
+
*
|
|
197
|
+
* @param {string} id
|
|
198
|
+
* @param {string} orgId
|
|
199
|
+
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
200
|
+
*
|
|
181
201
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
182
202
|
* @throws {@link Polytomic.NotFoundError}
|
|
183
203
|
* @throws {@link Polytomic.InternalServerError}
|
|
184
204
|
*
|
|
185
205
|
* @example
|
|
186
|
-
* await
|
|
206
|
+
* await client.users.get("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
187
207
|
*/
|
|
188
208
|
get(id, orgId, requestOptions) {
|
|
189
209
|
var _a;
|
|
190
210
|
return __awaiter(this, void 0, void 0, function* () {
|
|
191
211
|
const _response = yield core.fetcher({
|
|
192
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/organizations/${orgId}/users/${id}`),
|
|
212
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/organizations/${encodeURIComponent(orgId)}/users/${encodeURIComponent(id)}`),
|
|
193
213
|
method: "GET",
|
|
194
214
|
headers: {
|
|
195
215
|
Authorization: yield this._getAuthorizationHeader(),
|
|
196
|
-
"X-Polytomic-Version":
|
|
216
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
217
|
+
? yield core.Supplier.get(this._options.version)
|
|
218
|
+
: undefined,
|
|
197
219
|
"X-Fern-Language": "JavaScript",
|
|
198
220
|
"X-Fern-SDK-Name": "polytomic",
|
|
199
|
-
"X-Fern-SDK-Version": "1.
|
|
221
|
+
"X-Fern-SDK-Version": "1.9.0",
|
|
200
222
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
201
223
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
202
224
|
},
|
|
203
225
|
contentType: "application/json",
|
|
204
226
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
205
227
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
228
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
206
229
|
});
|
|
207
230
|
if (_response.ok) {
|
|
208
231
|
return _response.body;
|
|
@@ -241,12 +264,18 @@ class Users {
|
|
|
241
264
|
* > 🚧 Requires partner key
|
|
242
265
|
* >
|
|
243
266
|
* > User endpoints are only accessible using [partner keys](https://apidocs.polytomic.com/getting-started/obtaining-api-keys#partner-keys)
|
|
267
|
+
*
|
|
268
|
+
* @param {string} id
|
|
269
|
+
* @param {string} orgId
|
|
270
|
+
* @param {Polytomic.UpdateUserRequestSchema} request
|
|
271
|
+
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
272
|
+
*
|
|
244
273
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
245
274
|
* @throws {@link Polytomic.UnprocessableEntityError}
|
|
246
275
|
* @throws {@link Polytomic.InternalServerError}
|
|
247
276
|
*
|
|
248
277
|
* @example
|
|
249
|
-
* await
|
|
278
|
+
* await client.users.update("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d", {
|
|
250
279
|
* email: "mail@example.com"
|
|
251
280
|
* })
|
|
252
281
|
*/
|
|
@@ -254,14 +283,16 @@ class Users {
|
|
|
254
283
|
var _a;
|
|
255
284
|
return __awaiter(this, void 0, void 0, function* () {
|
|
256
285
|
const _response = yield core.fetcher({
|
|
257
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/organizations/${orgId}/users/${id}`),
|
|
286
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/organizations/${encodeURIComponent(orgId)}/users/${encodeURIComponent(id)}`),
|
|
258
287
|
method: "PUT",
|
|
259
288
|
headers: {
|
|
260
289
|
Authorization: yield this._getAuthorizationHeader(),
|
|
261
|
-
"X-Polytomic-Version":
|
|
290
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
291
|
+
? yield core.Supplier.get(this._options.version)
|
|
292
|
+
: undefined,
|
|
262
293
|
"X-Fern-Language": "JavaScript",
|
|
263
294
|
"X-Fern-SDK-Name": "polytomic",
|
|
264
|
-
"X-Fern-SDK-Version": "1.
|
|
295
|
+
"X-Fern-SDK-Version": "1.9.0",
|
|
265
296
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
266
297
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
267
298
|
},
|
|
@@ -269,6 +300,7 @@ class Users {
|
|
|
269
300
|
body: request,
|
|
270
301
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
271
302
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
303
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
272
304
|
});
|
|
273
305
|
if (_response.ok) {
|
|
274
306
|
return _response.body;
|
|
@@ -307,31 +339,39 @@ class Users {
|
|
|
307
339
|
* > 🚧 Requires partner key
|
|
308
340
|
* >
|
|
309
341
|
* > User endpoints are only accessible using [partner keys](https://apidocs.polytomic.com/getting-started/obtaining-api-keys#partner-keys)
|
|
342
|
+
*
|
|
343
|
+
* @param {string} id
|
|
344
|
+
* @param {string} orgId
|
|
345
|
+
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
346
|
+
*
|
|
310
347
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
311
348
|
* @throws {@link Polytomic.NotFoundError}
|
|
312
349
|
* @throws {@link Polytomic.InternalServerError}
|
|
313
350
|
*
|
|
314
351
|
* @example
|
|
315
|
-
* await
|
|
352
|
+
* await client.users.remove("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
316
353
|
*/
|
|
317
354
|
remove(id, orgId, requestOptions) {
|
|
318
355
|
var _a;
|
|
319
356
|
return __awaiter(this, void 0, void 0, function* () {
|
|
320
357
|
const _response = yield core.fetcher({
|
|
321
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/organizations/${orgId}/users/${id}`),
|
|
358
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/organizations/${encodeURIComponent(orgId)}/users/${encodeURIComponent(id)}`),
|
|
322
359
|
method: "DELETE",
|
|
323
360
|
headers: {
|
|
324
361
|
Authorization: yield this._getAuthorizationHeader(),
|
|
325
|
-
"X-Polytomic-Version":
|
|
362
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
363
|
+
? yield core.Supplier.get(this._options.version)
|
|
364
|
+
: undefined,
|
|
326
365
|
"X-Fern-Language": "JavaScript",
|
|
327
366
|
"X-Fern-SDK-Name": "polytomic",
|
|
328
|
-
"X-Fern-SDK-Version": "1.
|
|
367
|
+
"X-Fern-SDK-Version": "1.9.0",
|
|
329
368
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
330
369
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
331
370
|
},
|
|
332
371
|
contentType: "application/json",
|
|
333
372
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
334
373
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
374
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
335
375
|
});
|
|
336
376
|
if (_response.ok) {
|
|
337
377
|
return _response.body;
|
|
@@ -370,12 +410,18 @@ class Users {
|
|
|
370
410
|
* > 🚧 Requires partner key
|
|
371
411
|
* >
|
|
372
412
|
* > User endpoints are only accessible using [partner keys](https://apidocs.polytomic.com/getting-started/obtaining-api-keys#partner-keys)
|
|
413
|
+
*
|
|
414
|
+
* @param {string} orgId
|
|
415
|
+
* @param {string} id
|
|
416
|
+
* @param {Polytomic.UsersCreateApiKeyRequest} request
|
|
417
|
+
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
418
|
+
*
|
|
373
419
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
374
420
|
* @throws {@link Polytomic.NotFoundError}
|
|
375
421
|
* @throws {@link Polytomic.InternalServerError}
|
|
376
422
|
*
|
|
377
423
|
* @example
|
|
378
|
-
* await
|
|
424
|
+
* await client.users.createApiKey("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d", {
|
|
379
425
|
* force: true
|
|
380
426
|
* })
|
|
381
427
|
*/
|
|
@@ -388,14 +434,16 @@ class Users {
|
|
|
388
434
|
_queryParams["force"] = force.toString();
|
|
389
435
|
}
|
|
390
436
|
const _response = yield core.fetcher({
|
|
391
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/organizations/${orgId}/users/${id}/keys`),
|
|
437
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/organizations/${encodeURIComponent(orgId)}/users/${encodeURIComponent(id)}/keys`),
|
|
392
438
|
method: "POST",
|
|
393
439
|
headers: {
|
|
394
440
|
Authorization: yield this._getAuthorizationHeader(),
|
|
395
|
-
"X-Polytomic-Version":
|
|
441
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
442
|
+
? yield core.Supplier.get(this._options.version)
|
|
443
|
+
: undefined,
|
|
396
444
|
"X-Fern-Language": "JavaScript",
|
|
397
445
|
"X-Fern-SDK-Name": "polytomic",
|
|
398
|
-
"X-Fern-SDK-Version": "1.
|
|
446
|
+
"X-Fern-SDK-Version": "1.9.0",
|
|
399
447
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
400
448
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
401
449
|
},
|
|
@@ -403,6 +451,7 @@ class Users {
|
|
|
403
451
|
queryParameters: _queryParams,
|
|
404
452
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
405
453
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
454
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
406
455
|
});
|
|
407
456
|
if (_response.ok) {
|
|
408
457
|
return _response.body;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { CreateUserRequestSchema } from "./CreateUserRequestSchema";
|
|
2
|
-
export { UpdateUserRequestSchema } from "./UpdateUserRequestSchema";
|
|
3
|
-
export { UsersCreateApiKeyRequest } from "./UsersCreateApiKeyRequest";
|
|
1
|
+
export { type CreateUserRequestSchema } from "./CreateUserRequestSchema";
|
|
2
|
+
export { type UpdateUserRequestSchema } from "./UpdateUserRequestSchema";
|
|
3
|
+
export { type UsersCreateApiKeyRequest } from "./UsersCreateApiKeyRequest";
|
|
@@ -3,15 +3,22 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as environments from "../../../../environments";
|
|
5
5
|
import * as core from "../../../../core";
|
|
6
|
-
import * as Polytomic from "
|
|
6
|
+
import * as Polytomic from "../../../index";
|
|
7
7
|
export declare namespace Webhooks {
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.PolytomicEnvironment | string>;
|
|
10
10
|
token: core.Supplier<core.BearerToken>;
|
|
11
|
+
version?: core.Supplier<string | undefined>;
|
|
11
12
|
}
|
|
12
13
|
interface RequestOptions {
|
|
14
|
+
/** The maximum time to wait for a response in seconds. */
|
|
13
15
|
timeoutInSeconds?: number;
|
|
16
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
14
17
|
maxRetries?: number;
|
|
18
|
+
/** A hook to abort the request. */
|
|
19
|
+
abortSignal?: AbortSignal;
|
|
20
|
+
/** Override the X-Polytomic-Version header */
|
|
21
|
+
version?: string | undefined;
|
|
15
22
|
}
|
|
16
23
|
}
|
|
17
24
|
export declare class Webhooks {
|
|
@@ -23,11 +30,14 @@ export declare class Webhooks {
|
|
|
23
30
|
* in that organization.
|
|
24
31
|
*
|
|
25
32
|
* Consult the [Events documentation](https://apidocs.polytomic.com/getting-started/events) for more information.
|
|
33
|
+
*
|
|
34
|
+
* @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
|
|
35
|
+
*
|
|
26
36
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
27
37
|
* @throws {@link Polytomic.InternalServerError}
|
|
28
38
|
*
|
|
29
39
|
* @example
|
|
30
|
-
* await
|
|
40
|
+
* await client.webhooks.list()
|
|
31
41
|
*/
|
|
32
42
|
list(requestOptions?: Webhooks.RequestOptions): Promise<Polytomic.WebhookListEnvelope>;
|
|
33
43
|
/**
|
|
@@ -36,12 +46,16 @@ export declare class Webhooks {
|
|
|
36
46
|
* in that organization.
|
|
37
47
|
*
|
|
38
48
|
* Consult the [Events documentation](https://apidocs.polytomic.com/getting-started/events) for more information.
|
|
49
|
+
*
|
|
50
|
+
* @param {Polytomic.CreateWebhooksSchema} request
|
|
51
|
+
* @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
|
|
52
|
+
*
|
|
39
53
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
40
54
|
* @throws {@link Polytomic.UnprocessableEntityError}
|
|
41
55
|
* @throws {@link Polytomic.InternalServerError}
|
|
42
56
|
*
|
|
43
57
|
* @example
|
|
44
|
-
* await
|
|
58
|
+
* await client.webhooks.create({
|
|
45
59
|
* endpoint: "https://example.com/webhook",
|
|
46
60
|
* secret: "secret"
|
|
47
61
|
* })
|
|
@@ -53,11 +67,15 @@ export declare class Webhooks {
|
|
|
53
67
|
* in that organization.
|
|
54
68
|
*
|
|
55
69
|
* Consult the [Events documentation](https://apidocs.polytomic.com/getting-started/events) for more information.
|
|
70
|
+
*
|
|
71
|
+
* @param {string} id
|
|
72
|
+
* @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
|
|
73
|
+
*
|
|
56
74
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
57
75
|
* @throws {@link Polytomic.NotFoundError}
|
|
58
76
|
*
|
|
59
77
|
* @example
|
|
60
|
-
* await
|
|
78
|
+
* await client.webhooks.get("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
61
79
|
*/
|
|
62
80
|
get(id: string, requestOptions?: Webhooks.RequestOptions): Promise<Polytomic.WebhookEnvelope>;
|
|
63
81
|
/**
|
|
@@ -66,24 +84,32 @@ export declare class Webhooks {
|
|
|
66
84
|
* in that organization.
|
|
67
85
|
*
|
|
68
86
|
* Consult the [Events documentation](https://apidocs.polytomic.com/getting-started/events) for more information.
|
|
87
|
+
*
|
|
88
|
+
* @param {string} id
|
|
89
|
+
* @param {Polytomic.UpdateWebhooksSchema} request
|
|
90
|
+
* @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
|
|
91
|
+
*
|
|
69
92
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
70
93
|
* @throws {@link Polytomic.UnprocessableEntityError}
|
|
71
94
|
* @throws {@link Polytomic.InternalServerError}
|
|
72
95
|
*
|
|
73
96
|
* @example
|
|
74
|
-
* await
|
|
97
|
+
* await client.webhooks.update("248df4b7-aa70-47b8-a036-33ac447e668d", {
|
|
75
98
|
* endpoint: "https://example.com/webhook",
|
|
76
99
|
* secret: "secret"
|
|
77
100
|
* })
|
|
78
101
|
*/
|
|
79
102
|
update(id: string, request: Polytomic.UpdateWebhooksSchema, requestOptions?: Webhooks.RequestOptions): Promise<Polytomic.WebhookEnvelope>;
|
|
80
103
|
/**
|
|
104
|
+
* @param {string} id
|
|
105
|
+
* @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
|
|
106
|
+
*
|
|
81
107
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
82
108
|
* @throws {@link Polytomic.NotFoundError}
|
|
83
109
|
* @throws {@link Polytomic.InternalServerError}
|
|
84
110
|
*
|
|
85
111
|
* @example
|
|
86
|
-
* await
|
|
112
|
+
* await client.webhooks.remove("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
87
113
|
*/
|
|
88
114
|
remove(id: string, requestOptions?: Webhooks.RequestOptions): Promise<void>;
|
|
89
115
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
@@ -41,9 +41,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
41
41
|
exports.Webhooks = void 0;
|
|
42
42
|
const environments = __importStar(require("../../../../environments"));
|
|
43
43
|
const core = __importStar(require("../../../../core"));
|
|
44
|
-
const Polytomic = __importStar(require("
|
|
44
|
+
const Polytomic = __importStar(require("../../../index"));
|
|
45
45
|
const url_join_1 = __importDefault(require("url-join"));
|
|
46
|
-
const errors = __importStar(require("../../../../errors"));
|
|
46
|
+
const errors = __importStar(require("../../../../errors/index"));
|
|
47
47
|
class Webhooks {
|
|
48
48
|
constructor(_options) {
|
|
49
49
|
this._options = _options;
|
|
@@ -54,11 +54,14 @@ class Webhooks {
|
|
|
54
54
|
* in that organization.
|
|
55
55
|
*
|
|
56
56
|
* Consult the [Events documentation](https://apidocs.polytomic.com/getting-started/events) for more information.
|
|
57
|
+
*
|
|
58
|
+
* @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
|
|
59
|
+
*
|
|
57
60
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
58
61
|
* @throws {@link Polytomic.InternalServerError}
|
|
59
62
|
*
|
|
60
63
|
* @example
|
|
61
|
-
* await
|
|
64
|
+
* await client.webhooks.list()
|
|
62
65
|
*/
|
|
63
66
|
list(requestOptions) {
|
|
64
67
|
var _a;
|
|
@@ -68,16 +71,19 @@ class Webhooks {
|
|
|
68
71
|
method: "GET",
|
|
69
72
|
headers: {
|
|
70
73
|
Authorization: yield this._getAuthorizationHeader(),
|
|
71
|
-
"X-Polytomic-Version":
|
|
74
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
75
|
+
? yield core.Supplier.get(this._options.version)
|
|
76
|
+
: undefined,
|
|
72
77
|
"X-Fern-Language": "JavaScript",
|
|
73
78
|
"X-Fern-SDK-Name": "polytomic",
|
|
74
|
-
"X-Fern-SDK-Version": "1.
|
|
79
|
+
"X-Fern-SDK-Version": "1.9.0",
|
|
75
80
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
76
81
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
77
82
|
},
|
|
78
83
|
contentType: "application/json",
|
|
79
84
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
80
85
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
86
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
81
87
|
});
|
|
82
88
|
if (_response.ok) {
|
|
83
89
|
return _response.body;
|
|
@@ -116,12 +122,16 @@ class Webhooks {
|
|
|
116
122
|
* in that organization.
|
|
117
123
|
*
|
|
118
124
|
* Consult the [Events documentation](https://apidocs.polytomic.com/getting-started/events) for more information.
|
|
125
|
+
*
|
|
126
|
+
* @param {Polytomic.CreateWebhooksSchema} request
|
|
127
|
+
* @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
|
|
128
|
+
*
|
|
119
129
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
120
130
|
* @throws {@link Polytomic.UnprocessableEntityError}
|
|
121
131
|
* @throws {@link Polytomic.InternalServerError}
|
|
122
132
|
*
|
|
123
133
|
* @example
|
|
124
|
-
* await
|
|
134
|
+
* await client.webhooks.create({
|
|
125
135
|
* endpoint: "https://example.com/webhook",
|
|
126
136
|
* secret: "secret"
|
|
127
137
|
* })
|
|
@@ -134,10 +144,12 @@ class Webhooks {
|
|
|
134
144
|
method: "POST",
|
|
135
145
|
headers: {
|
|
136
146
|
Authorization: yield this._getAuthorizationHeader(),
|
|
137
|
-
"X-Polytomic-Version":
|
|
147
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
148
|
+
? yield core.Supplier.get(this._options.version)
|
|
149
|
+
: undefined,
|
|
138
150
|
"X-Fern-Language": "JavaScript",
|
|
139
151
|
"X-Fern-SDK-Name": "polytomic",
|
|
140
|
-
"X-Fern-SDK-Version": "1.
|
|
152
|
+
"X-Fern-SDK-Version": "1.9.0",
|
|
141
153
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
142
154
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
143
155
|
},
|
|
@@ -145,6 +157,7 @@ class Webhooks {
|
|
|
145
157
|
body: request,
|
|
146
158
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
147
159
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
160
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
148
161
|
});
|
|
149
162
|
if (_response.ok) {
|
|
150
163
|
return _response.body;
|
|
@@ -185,30 +198,37 @@ class Webhooks {
|
|
|
185
198
|
* in that organization.
|
|
186
199
|
*
|
|
187
200
|
* Consult the [Events documentation](https://apidocs.polytomic.com/getting-started/events) for more information.
|
|
201
|
+
*
|
|
202
|
+
* @param {string} id
|
|
203
|
+
* @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
|
|
204
|
+
*
|
|
188
205
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
189
206
|
* @throws {@link Polytomic.NotFoundError}
|
|
190
207
|
*
|
|
191
208
|
* @example
|
|
192
|
-
* await
|
|
209
|
+
* await client.webhooks.get("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
193
210
|
*/
|
|
194
211
|
get(id, requestOptions) {
|
|
195
212
|
var _a;
|
|
196
213
|
return __awaiter(this, void 0, void 0, function* () {
|
|
197
214
|
const _response = yield core.fetcher({
|
|
198
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/webhooks/${id}`),
|
|
215
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/webhooks/${encodeURIComponent(id)}`),
|
|
199
216
|
method: "GET",
|
|
200
217
|
headers: {
|
|
201
218
|
Authorization: yield this._getAuthorizationHeader(),
|
|
202
|
-
"X-Polytomic-Version":
|
|
219
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
220
|
+
? yield core.Supplier.get(this._options.version)
|
|
221
|
+
: undefined,
|
|
203
222
|
"X-Fern-Language": "JavaScript",
|
|
204
223
|
"X-Fern-SDK-Name": "polytomic",
|
|
205
|
-
"X-Fern-SDK-Version": "1.
|
|
224
|
+
"X-Fern-SDK-Version": "1.9.0",
|
|
206
225
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
207
226
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
208
227
|
},
|
|
209
228
|
contentType: "application/json",
|
|
210
229
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
211
230
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
231
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
212
232
|
});
|
|
213
233
|
if (_response.ok) {
|
|
214
234
|
return _response.body;
|
|
@@ -247,12 +267,17 @@ class Webhooks {
|
|
|
247
267
|
* in that organization.
|
|
248
268
|
*
|
|
249
269
|
* Consult the [Events documentation](https://apidocs.polytomic.com/getting-started/events) for more information.
|
|
270
|
+
*
|
|
271
|
+
* @param {string} id
|
|
272
|
+
* @param {Polytomic.UpdateWebhooksSchema} request
|
|
273
|
+
* @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
|
|
274
|
+
*
|
|
250
275
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
251
276
|
* @throws {@link Polytomic.UnprocessableEntityError}
|
|
252
277
|
* @throws {@link Polytomic.InternalServerError}
|
|
253
278
|
*
|
|
254
279
|
* @example
|
|
255
|
-
* await
|
|
280
|
+
* await client.webhooks.update("248df4b7-aa70-47b8-a036-33ac447e668d", {
|
|
256
281
|
* endpoint: "https://example.com/webhook",
|
|
257
282
|
* secret: "secret"
|
|
258
283
|
* })
|
|
@@ -261,14 +286,16 @@ class Webhooks {
|
|
|
261
286
|
var _a;
|
|
262
287
|
return __awaiter(this, void 0, void 0, function* () {
|
|
263
288
|
const _response = yield core.fetcher({
|
|
264
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/webhooks/${id}`),
|
|
289
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/webhooks/${encodeURIComponent(id)}`),
|
|
265
290
|
method: "PUT",
|
|
266
291
|
headers: {
|
|
267
292
|
Authorization: yield this._getAuthorizationHeader(),
|
|
268
|
-
"X-Polytomic-Version":
|
|
293
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
294
|
+
? yield core.Supplier.get(this._options.version)
|
|
295
|
+
: undefined,
|
|
269
296
|
"X-Fern-Language": "JavaScript",
|
|
270
297
|
"X-Fern-SDK-Name": "polytomic",
|
|
271
|
-
"X-Fern-SDK-Version": "1.
|
|
298
|
+
"X-Fern-SDK-Version": "1.9.0",
|
|
272
299
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
273
300
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
274
301
|
},
|
|
@@ -276,6 +303,7 @@ class Webhooks {
|
|
|
276
303
|
body: request,
|
|
277
304
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
278
305
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
306
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
279
307
|
});
|
|
280
308
|
if (_response.ok) {
|
|
281
309
|
return _response.body;
|
|
@@ -311,31 +339,37 @@ class Webhooks {
|
|
|
311
339
|
});
|
|
312
340
|
}
|
|
313
341
|
/**
|
|
342
|
+
* @param {string} id
|
|
343
|
+
* @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
|
|
344
|
+
*
|
|
314
345
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
315
346
|
* @throws {@link Polytomic.NotFoundError}
|
|
316
347
|
* @throws {@link Polytomic.InternalServerError}
|
|
317
348
|
*
|
|
318
349
|
* @example
|
|
319
|
-
* await
|
|
350
|
+
* await client.webhooks.remove("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
320
351
|
*/
|
|
321
352
|
remove(id, requestOptions) {
|
|
322
353
|
var _a;
|
|
323
354
|
return __awaiter(this, void 0, void 0, function* () {
|
|
324
355
|
const _response = yield core.fetcher({
|
|
325
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/webhooks/${id}`),
|
|
356
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/webhooks/${encodeURIComponent(id)}`),
|
|
326
357
|
method: "DELETE",
|
|
327
358
|
headers: {
|
|
328
359
|
Authorization: yield this._getAuthorizationHeader(),
|
|
329
|
-
"X-Polytomic-Version":
|
|
360
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
361
|
+
? yield core.Supplier.get(this._options.version)
|
|
362
|
+
: undefined,
|
|
330
363
|
"X-Fern-Language": "JavaScript",
|
|
331
364
|
"X-Fern-SDK-Name": "polytomic",
|
|
332
|
-
"X-Fern-SDK-Version": "1.
|
|
365
|
+
"X-Fern-SDK-Version": "1.9.0",
|
|
333
366
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
334
367
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
335
368
|
},
|
|
336
369
|
contentType: "application/json",
|
|
337
370
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
338
371
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
372
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
339
373
|
});
|
|
340
374
|
if (_response.ok) {
|
|
341
375
|
return;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { CreateWebhooksSchema } from "./CreateWebhooksSchema";
|
|
2
|
-
export { UpdateWebhooksSchema } from "./UpdateWebhooksSchema";
|
|
1
|
+
export { type CreateWebhooksSchema } from "./CreateWebhooksSchema";
|
|
2
|
+
export { type UpdateWebhooksSchema } from "./UpdateWebhooksSchema";
|