polytomic 1.11.3 → 1.14.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Client.d.ts +20 -15
- package/Client.js +9 -9
- package/LICENSE +1 -1
- package/api/errors/BadRequestError.js +17 -7
- package/api/errors/ConflictError.js +17 -7
- package/api/errors/ForbiddenError.js +17 -7
- package/api/errors/InternalServerError.js +17 -7
- package/api/errors/NotFoundError.js +17 -7
- package/api/errors/UnauthorizedError.js +17 -7
- package/api/errors/UnprocessableEntityError.js +17 -7
- package/api/resources/bulkSync/client/Client.d.ts +47 -6
- package/api/resources/bulkSync/client/Client.js +135 -157
- package/api/resources/bulkSync/client/requests/CreateBulkSyncRequest.d.ts +11 -3
- package/api/resources/bulkSync/client/requests/UpdateBulkSyncRequest.d.ts +11 -3
- package/api/resources/bulkSync/resources/executions/client/Client.d.ts +13 -2
- package/api/resources/bulkSync/resources/executions/client/Client.js +75 -79
- package/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListRequest.d.ts +18 -0
- package/api/resources/bulkSync/resources/executions/client/requests/index.d.ts +1 -0
- package/api/resources/bulkSync/resources/index.d.ts +2 -0
- package/api/resources/bulkSync/resources/index.js +20 -8
- package/api/resources/bulkSync/resources/schedules/client/Client.d.ts +113 -0
- package/api/resources/bulkSync/resources/schedules/client/Client.js +398 -0
- package/api/resources/bulkSync/resources/schedules/client/index.d.ts +1 -0
- package/api/resources/bulkSync/resources/schedules/client/index.js +17 -0
- package/api/resources/bulkSync/resources/schedules/client/requests/CreateScheduleRequest.d.ts +15 -0
- package/api/resources/bulkSync/resources/schedules/client/requests/UpdateScheduleRequest.d.ts +15 -0
- package/api/resources/bulkSync/resources/schedules/client/requests/index.d.ts +2 -0
- package/api/resources/bulkSync/resources/schedules/client/requests/index.js +2 -0
- package/api/resources/bulkSync/resources/schedules/index.d.ts +1 -0
- package/api/resources/bulkSync/resources/schedules/index.js +17 -0
- package/api/resources/bulkSync/resources/schemas/client/Client.d.ts +5 -0
- package/api/resources/bulkSync/resources/schemas/client/Client.js +49 -66
- package/api/resources/bulkSync/resources/schemas/client/requests/UpdateBulkSchema.d.ts +3 -1
- package/api/resources/bulkSync/types/V2CreateBulkSyncRequestSchemasItem.d.ts +1 -1
- package/api/resources/bulkSync/types/V2UpdateBulkSyncRequestSchemasItem.d.ts +1 -1
- package/api/resources/connections/client/Client.d.ts +41 -2
- package/api/resources/connections/client/Client.js +159 -128
- package/api/resources/connections/client/requests/ConnectCardRequest.d.ts +7 -0
- package/api/resources/connections/client/requests/CreateConnectionRequestSchema.d.ts +3 -1
- package/api/resources/connections/client/requests/TestConnectionRequest.d.ts +24 -0
- package/api/resources/connections/client/requests/UpdateConnectionRequestSchema.d.ts +3 -1
- package/api/resources/connections/client/requests/index.d.ts +1 -0
- package/api/resources/events/client/Client.d.ts +7 -2
- package/api/resources/events/client/Client.js +33 -37
- package/api/resources/events/client/requests/EventsListRequest.d.ts +2 -2
- package/api/resources/identity/client/Client.d.ts +7 -0
- package/api/resources/identity/client/Client.js +25 -20
- package/api/resources/index.d.ts +2 -1
- package/api/resources/index.js +20 -9
- package/api/resources/jobs/client/Client.d.ts +7 -2
- package/api/resources/jobs/client/Client.js +25 -22
- package/api/resources/modelSync/client/Client.d.ts +83 -52
- package/api/resources/modelSync/client/Client.js +228 -403
- package/api/resources/modelSync/client/requests/CreateModelSyncRequest.d.ts +14 -5
- package/api/resources/modelSync/client/requests/ModelSyncListRequest.d.ts +1 -1
- package/api/resources/modelSync/client/requests/StartModelSyncRequest.d.ts +1 -0
- package/api/resources/modelSync/client/requests/UpdateModelSyncRequest.d.ts +14 -5
- package/api/resources/modelSync/client/requests/index.d.ts +0 -2
- package/api/resources/modelSync/resources/executions/client/Client.d.ts +36 -8
- package/api/resources/modelSync/resources/executions/client/Client.js +137 -68
- package/api/resources/modelSync/resources/executions/client/index.d.ts +1 -1
- package/api/resources/modelSync/resources/executions/client/index.js +15 -0
- package/api/resources/modelSync/resources/executions/client/requests/ExecutionsListRequest.d.ts +16 -0
- package/api/resources/modelSync/resources/executions/client/requests/ExecutionsListRequest.js +5 -0
- package/api/resources/modelSync/resources/executions/client/requests/UpdateExecutionRequest.d.ts +13 -0
- package/api/resources/modelSync/resources/executions/client/requests/UpdateExecutionRequest.js +5 -0
- package/api/resources/modelSync/resources/executions/client/requests/index.d.ts +2 -0
- package/api/resources/modelSync/resources/executions/client/requests/index.js +2 -0
- package/api/resources/modelSync/resources/index.d.ts +3 -0
- package/api/resources/modelSync/resources/index.js +23 -7
- package/api/resources/modelSync/resources/targets/client/Client.d.ts +143 -0
- package/api/resources/modelSync/resources/targets/client/Client.js +395 -0
- package/api/resources/modelSync/resources/targets/client/index.d.ts +1 -0
- package/api/resources/modelSync/resources/targets/client/index.js +17 -0
- package/api/resources/modelSync/{client/requests/ModelSyncGetTargetFieldsRequest.d.ts → resources/targets/client/requests/TargetsGetTargetFieldsRequest.d.ts} +1 -1
- package/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetFieldsRequest.js +5 -0
- package/{dist/api/resources/modelSync/client/requests/ModelSyncGetTargetRequest.d.ts → api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetRequest.d.ts} +1 -1
- package/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetRequest.js +5 -0
- package/api/resources/modelSync/resources/targets/client/requests/index.d.ts +2 -0
- package/api/resources/modelSync/resources/targets/client/requests/index.js +2 -0
- package/api/resources/modelSync/resources/targets/index.d.ts +1 -0
- package/api/resources/modelSync/resources/targets/index.js +17 -0
- package/api/resources/models/client/Client.d.ts +5 -0
- package/api/resources/models/client/Client.js +83 -135
- package/api/resources/organization/client/Client.d.ts +7 -0
- package/api/resources/organization/client/Client.js +53 -72
- package/api/resources/permissions/client/Client.d.ts +7 -2
- package/api/resources/permissions/resources/index.js +17 -7
- package/api/resources/permissions/resources/policies/client/Client.d.ts +5 -0
- package/api/resources/permissions/resources/policies/client/Client.js +47 -72
- package/api/resources/permissions/resources/roles/client/Client.d.ts +5 -0
- package/api/resources/permissions/resources/roles/client/Client.js +47 -72
- package/api/resources/queryRunner/client/Client.d.ts +5 -0
- package/api/resources/queryRunner/client/Client.js +33 -37
- package/api/resources/schemas/client/Client.d.ts +68 -0
- package/api/resources/schemas/client/Client.js +302 -59
- package/api/resources/schemas/client/index.d.ts +1 -1
- package/api/resources/schemas/client/index.js +15 -0
- package/api/resources/schemas/client/requests/SetPrimaryKeysRequest.d.ts +11 -0
- package/api/resources/schemas/client/requests/SetPrimaryKeysRequest.js +5 -0
- package/api/resources/schemas/client/requests/UpsertSchemaFieldRequest.d.ts +11 -0
- package/api/resources/schemas/client/requests/UpsertSchemaFieldRequest.js +5 -0
- package/api/resources/schemas/client/requests/index.d.ts +2 -0
- package/api/resources/schemas/client/requests/index.js +2 -0
- package/api/resources/users/client/Client.d.ts +5 -0
- package/api/resources/users/client/Client.js +55 -87
- package/api/resources/webhooks/client/Client.d.ts +33 -4
- package/api/resources/webhooks/client/Client.js +169 -76
- package/api/types/BackendOAuthPrompt.d.ts +8 -0
- package/api/types/BackendOAuthPrompt.js +5 -0
- package/api/types/BulkBulkSyncSchedule.d.ts +20 -0
- package/api/types/BulkBulkSyncSchedule.js +5 -0
- package/api/types/BulkDiscover.d.ts +1 -1
- package/api/types/BulkExecutionStatus.d.ts +2 -1
- package/api/types/BulkExecutionStatus.js +1 -0
- package/api/types/BulkFetchMode.d.ts +1 -1
- package/api/types/BulkField.d.ts +2 -0
- package/api/types/BulkNormalizeNames.d.ts +9 -0
- package/api/types/BulkNormalizeNames.js +11 -0
- package/api/types/BulkSchema.d.ts +1 -0
- package/api/types/BulkSchemaExecutionStatus.d.ts +2 -1
- package/api/types/BulkSchemaExecutionStatus.js +1 -0
- package/api/types/BulkSelectiveMode.d.ts +1 -1
- package/api/types/BulkSyncExecution.d.ts +6 -0
- package/api/types/BulkSyncMode.d.ts +11 -0
- package/api/types/BulkSyncMode.js +10 -0
- package/api/types/BulkSyncResponse.d.ts +10 -1
- package/api/types/BulkSyncSchemaExecution.d.ts +3 -0
- package/api/types/CancelModelSyncResponse.d.ts +6 -0
- package/api/types/CancelModelSyncResponse.js +5 -0
- package/api/types/CancelModelSyncResponseEnvelope.d.ts +7 -0
- package/api/types/CancelModelSyncResponseEnvelope.js +5 -0
- package/api/types/ConnectCardResponse.d.ts +1 -0
- package/api/types/ConnectionResponseSchema.d.ts +5 -0
- package/api/types/ConnectionType.d.ts +5 -0
- package/api/types/ConnectionTypeSchema.d.ts +1 -0
- package/api/types/CreateConnectionResponseSchema.d.ts +3 -0
- package/api/types/EventBody.d.ts +1 -1
- package/api/types/ExecutionCounts.d.ts +2 -0
- package/api/types/ExecutionStatus.d.ts +1 -1
- package/api/types/FilterFieldReferenceType.d.ts +1 -1
- package/api/types/FilterFunction.d.ts +3 -1
- package/api/types/FilterFunction.js +2 -0
- package/api/types/GetIdentityResponseSchema.d.ts +7 -0
- package/api/types/JsonschemaDefinitions.d.ts +1 -1
- package/api/types/JsonschemaForm.d.ts +1 -1
- package/api/types/LabelLabel.d.ts +1 -1
- package/api/types/ListBulkSyncExecutionsEnvelope.d.ts +1 -0
- package/api/types/ListExecutionResponseEnvelope.d.ts +1 -0
- package/api/types/ModelField.d.ts +4 -0
- package/api/types/ModelSyncField.d.ts +2 -0
- package/api/types/{SyncMode.d.ts → ModelSyncMode.d.ts} +2 -4
- package/{dist/api/types/SyncMode.js → api/types/ModelSyncMode.js} +2 -4
- package/api/types/ModelSyncResponse.d.ts +6 -1
- package/api/types/PaginationDetails.d.ts +6 -0
- package/api/types/PaginationDetails.js +5 -0
- package/api/types/ScheduleEnvelope.d.ts +7 -0
- package/api/types/ScheduleEnvelope.js +5 -0
- package/api/types/ScheduleFrequency.d.ts +1 -1
- package/api/types/SchedulesEnvelope.d.ts +7 -0
- package/api/types/SchedulesEnvelope.js +5 -0
- package/api/types/SchemaField.d.ts +2 -0
- package/api/types/SchemaIdentityFunction.d.ts +3 -1
- package/api/types/SchemaIdentityFunction.js +2 -0
- package/api/types/SchemaPrimaryKeyOverrideInput.d.ts +7 -0
- package/api/types/SchemaPrimaryKeyOverrideInput.js +5 -0
- package/api/types/StartModelSyncResponseSchema.d.ts +1 -0
- package/api/types/SupportedBulkMode.d.ts +1 -1
- package/api/types/SupportedMode.d.ts +1 -1
- package/api/types/SyncDestinationProperties.d.ts +1 -0
- package/api/types/Target.d.ts +4 -1
- package/api/types/TargetCreateInput.d.ts +11 -0
- package/api/types/TargetCreateInput.js +5 -0
- package/api/types/TargetField.d.ts +1 -0
- package/api/types/TypesType.d.ts +1 -1
- package/api/types/UpdateBulkField.d.ts +9 -0
- package/api/types/UpdateBulkField.js +5 -0
- package/api/types/UtilEnumValue.d.ts +7 -0
- package/api/types/UtilEnumValue.js +5 -0
- package/api/types/UtilFieldType.d.ts +1 -1
- package/api/types/V2ConnectionForm.d.ts +7 -0
- package/api/types/V2ConnectionForm.js +5 -0
- package/api/types/V2EnricherConfiguration.d.ts +1 -1
- package/api/types/V2EnricherMapping.d.ts +1 -1
- package/api/types/V2ExecutionLogType.d.ts +1 -1
- package/api/types/V2OrderedMapStringGithubComInvopopJsonschemaSchema.d.ts +1 -1
- package/api/types/V2SampleRecord.d.ts +1 -1
- package/api/types/V2SchemaConfigurationFieldsItem.d.ts +1 -1
- package/api/types/V4BulkSyncExecutionLogs.d.ts +1 -1
- package/api/types/V4BulkSyncScheduleApi.d.ts +13 -0
- package/api/types/V4BulkSyncScheduleApi.js +5 -0
- package/api/types/V4TargetCreator.d.ts +10 -0
- package/api/types/V4TargetCreator.js +5 -0
- package/api/types/V4TargetObjectsResponseEnvelope.d.ts +1 -0
- package/api/types/V4TargetPropertyValues.d.ts +14 -0
- package/api/types/V4TargetPropertyValues.js +5 -0
- package/api/types/V4TargetPropertyValuesEnvelope.d.ts +7 -0
- package/api/types/V4TargetPropertyValuesEnvelope.js +5 -0
- package/api/types/V4UserFieldRequest.d.ts +10 -0
- package/api/types/V4UserFieldRequest.js +5 -0
- package/api/types/Webhook.d.ts +1 -0
- package/api/types/WorkTaskStatus.d.ts +1 -1
- package/api/types/index.d.ts +20 -1
- package/api/types/index.js +20 -1
- package/core/auth/BearerToken.d.ts +1 -1
- package/core/fetcher/APIResponse.d.ts +1 -1
- package/core/fetcher/Fetcher.d.ts +6 -3
- package/core/fetcher/Fetcher.js +20 -189
- package/core/fetcher/Supplier.d.ts +1 -1
- package/core/fetcher/createRequestUrl.d.ts +1 -0
- package/core/fetcher/createRequestUrl.js +12 -0
- package/core/fetcher/getFetchFn.d.ts +4 -0
- package/core/fetcher/getFetchFn.js +68 -0
- package/core/fetcher/getHeader.js +1 -2
- package/core/fetcher/getRequestBody.d.ts +7 -0
- package/core/fetcher/getRequestBody.js +23 -0
- package/core/fetcher/getResponseBody.d.ts +1 -0
- package/core/fetcher/getResponseBody.js +54 -0
- package/core/fetcher/makeRequest.d.ts +1 -0
- package/core/fetcher/makeRequest.js +42 -0
- package/core/fetcher/requestWithRetries.d.ts +1 -0
- package/core/fetcher/requestWithRetries.js +40 -0
- package/core/fetcher/signals.d.ts +11 -0
- package/core/fetcher/signals.js +36 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +21 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +126 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +59 -0
- package/core/json.d.ts +15 -0
- package/core/json.js +24 -0
- package/core/runtime/runtime.d.ts +2 -1
- package/core/runtime/runtime.js +52 -41
- package/dist/Client.d.ts +20 -15
- package/dist/Client.js +9 -9
- package/dist/api/errors/BadRequestError.js +17 -7
- package/dist/api/errors/ConflictError.js +17 -7
- package/dist/api/errors/ForbiddenError.js +17 -7
- package/dist/api/errors/InternalServerError.js +17 -7
- package/dist/api/errors/NotFoundError.js +17 -7
- package/dist/api/errors/UnauthorizedError.js +17 -7
- package/dist/api/errors/UnprocessableEntityError.js +17 -7
- package/dist/api/resources/bulkSync/client/Client.d.ts +47 -6
- package/dist/api/resources/bulkSync/client/Client.js +135 -157
- package/dist/api/resources/bulkSync/client/requests/CreateBulkSyncRequest.d.ts +11 -3
- package/dist/api/resources/bulkSync/client/requests/UpdateBulkSyncRequest.d.ts +11 -3
- package/dist/api/resources/bulkSync/resources/executions/client/Client.d.ts +13 -2
- package/dist/api/resources/bulkSync/resources/executions/client/Client.js +75 -79
- package/dist/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListRequest.d.ts +18 -0
- package/dist/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListRequest.js +5 -0
- package/dist/api/resources/bulkSync/resources/executions/client/requests/index.d.ts +1 -0
- package/dist/api/resources/bulkSync/resources/index.d.ts +2 -0
- package/dist/api/resources/bulkSync/resources/index.js +20 -8
- package/dist/api/resources/bulkSync/resources/schedules/client/Client.d.ts +113 -0
- package/dist/api/resources/bulkSync/resources/schedules/client/Client.js +398 -0
- package/dist/api/resources/bulkSync/resources/schedules/client/index.d.ts +1 -0
- package/dist/api/resources/bulkSync/resources/schedules/client/index.js +17 -0
- package/dist/api/resources/bulkSync/resources/schedules/client/requests/CreateScheduleRequest.d.ts +15 -0
- package/dist/api/resources/bulkSync/resources/schedules/client/requests/CreateScheduleRequest.js +5 -0
- package/dist/api/resources/bulkSync/resources/schedules/client/requests/UpdateScheduleRequest.d.ts +15 -0
- package/dist/api/resources/bulkSync/resources/schedules/client/requests/UpdateScheduleRequest.js +5 -0
- package/dist/api/resources/bulkSync/resources/schedules/client/requests/index.d.ts +2 -0
- package/dist/api/resources/bulkSync/resources/schedules/client/requests/index.js +2 -0
- package/dist/api/resources/bulkSync/resources/schedules/index.d.ts +1 -0
- package/dist/api/resources/bulkSync/resources/schedules/index.js +17 -0
- package/dist/api/resources/bulkSync/resources/schemas/client/Client.d.ts +5 -0
- package/dist/api/resources/bulkSync/resources/schemas/client/Client.js +49 -66
- package/dist/api/resources/bulkSync/resources/schemas/client/requests/UpdateBulkSchema.d.ts +3 -1
- package/dist/api/resources/bulkSync/types/V2CreateBulkSyncRequestSchemasItem.d.ts +1 -1
- package/dist/api/resources/bulkSync/types/V2UpdateBulkSyncRequestSchemasItem.d.ts +1 -1
- package/dist/api/resources/connections/client/Client.d.ts +41 -2
- package/dist/api/resources/connections/client/Client.js +159 -128
- package/dist/api/resources/connections/client/requests/ConnectCardRequest.d.ts +7 -0
- package/dist/api/resources/connections/client/requests/CreateConnectionRequestSchema.d.ts +3 -1
- package/dist/api/resources/connections/client/requests/TestConnectionRequest.d.ts +24 -0
- package/dist/api/resources/connections/client/requests/TestConnectionRequest.js +5 -0
- package/dist/api/resources/connections/client/requests/UpdateConnectionRequestSchema.d.ts +3 -1
- package/dist/api/resources/connections/client/requests/index.d.ts +1 -0
- package/dist/api/resources/events/client/Client.d.ts +7 -2
- package/dist/api/resources/events/client/Client.js +33 -37
- package/dist/api/resources/events/client/requests/EventsListRequest.d.ts +2 -2
- package/dist/api/resources/identity/client/Client.d.ts +7 -0
- package/dist/api/resources/identity/client/Client.js +25 -20
- package/dist/api/resources/index.d.ts +2 -1
- package/dist/api/resources/index.js +20 -9
- package/dist/api/resources/jobs/client/Client.d.ts +7 -2
- package/dist/api/resources/jobs/client/Client.js +25 -22
- package/dist/api/resources/modelSync/client/Client.d.ts +83 -52
- package/dist/api/resources/modelSync/client/Client.js +228 -403
- package/dist/api/resources/modelSync/client/requests/CreateModelSyncRequest.d.ts +14 -5
- package/dist/api/resources/modelSync/client/requests/ModelSyncListRequest.d.ts +1 -1
- package/dist/api/resources/modelSync/client/requests/StartModelSyncRequest.d.ts +1 -0
- package/dist/api/resources/modelSync/client/requests/UpdateModelSyncRequest.d.ts +14 -5
- package/dist/api/resources/modelSync/client/requests/index.d.ts +0 -2
- package/dist/api/resources/modelSync/resources/executions/client/Client.d.ts +36 -8
- package/dist/api/resources/modelSync/resources/executions/client/Client.js +137 -68
- package/dist/api/resources/modelSync/resources/executions/client/index.d.ts +1 -1
- package/dist/api/resources/modelSync/resources/executions/client/index.js +15 -0
- package/dist/api/resources/modelSync/resources/executions/client/requests/ExecutionsListRequest.d.ts +16 -0
- package/dist/api/resources/modelSync/resources/executions/client/requests/ExecutionsListRequest.js +5 -0
- package/dist/api/resources/modelSync/resources/executions/client/requests/UpdateExecutionRequest.d.ts +13 -0
- package/dist/api/resources/modelSync/resources/executions/client/requests/UpdateExecutionRequest.js +5 -0
- package/dist/api/resources/modelSync/resources/executions/client/requests/index.d.ts +2 -0
- package/dist/api/resources/modelSync/resources/executions/client/requests/index.js +2 -0
- package/dist/api/resources/modelSync/resources/index.d.ts +3 -0
- package/dist/api/resources/modelSync/resources/index.js +23 -7
- package/dist/api/resources/modelSync/resources/targets/client/Client.d.ts +143 -0
- package/dist/api/resources/modelSync/resources/targets/client/Client.js +395 -0
- package/dist/api/resources/modelSync/resources/targets/client/index.d.ts +1 -0
- package/dist/api/resources/modelSync/resources/targets/client/index.js +17 -0
- package/dist/api/resources/modelSync/{client/requests/ModelSyncGetTargetFieldsRequest.d.ts → resources/targets/client/requests/TargetsGetTargetFieldsRequest.d.ts} +1 -1
- package/dist/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetFieldsRequest.js +5 -0
- package/{api/resources/modelSync/client/requests/ModelSyncGetTargetRequest.d.ts → dist/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetRequest.d.ts} +1 -1
- package/dist/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetRequest.js +5 -0
- package/dist/api/resources/modelSync/resources/targets/client/requests/index.d.ts +2 -0
- package/dist/api/resources/modelSync/resources/targets/client/requests/index.js +2 -0
- package/dist/api/resources/modelSync/resources/targets/index.d.ts +1 -0
- package/dist/api/resources/modelSync/resources/targets/index.js +17 -0
- package/dist/api/resources/models/client/Client.d.ts +5 -0
- package/dist/api/resources/models/client/Client.js +83 -135
- package/dist/api/resources/organization/client/Client.d.ts +7 -0
- package/dist/api/resources/organization/client/Client.js +53 -72
- package/dist/api/resources/permissions/client/Client.d.ts +7 -2
- package/dist/api/resources/permissions/resources/index.js +17 -7
- package/dist/api/resources/permissions/resources/policies/client/Client.d.ts +5 -0
- package/dist/api/resources/permissions/resources/policies/client/Client.js +47 -72
- package/dist/api/resources/permissions/resources/roles/client/Client.d.ts +5 -0
- package/dist/api/resources/permissions/resources/roles/client/Client.js +47 -72
- package/dist/api/resources/queryRunner/client/Client.d.ts +5 -0
- package/dist/api/resources/queryRunner/client/Client.js +33 -37
- package/dist/api/resources/schemas/client/Client.d.ts +68 -0
- package/dist/api/resources/schemas/client/Client.js +302 -59
- package/dist/api/resources/schemas/client/index.d.ts +1 -1
- package/dist/api/resources/schemas/client/index.js +15 -0
- package/dist/api/resources/schemas/client/requests/SetPrimaryKeysRequest.d.ts +11 -0
- package/dist/api/resources/schemas/client/requests/SetPrimaryKeysRequest.js +5 -0
- package/dist/api/resources/schemas/client/requests/UpsertSchemaFieldRequest.d.ts +11 -0
- package/dist/api/resources/schemas/client/requests/UpsertSchemaFieldRequest.js +5 -0
- package/dist/api/resources/schemas/client/requests/index.d.ts +2 -0
- package/dist/api/resources/schemas/client/requests/index.js +2 -0
- package/dist/api/resources/users/client/Client.d.ts +5 -0
- package/dist/api/resources/users/client/Client.js +55 -87
- package/dist/api/resources/webhooks/client/Client.d.ts +33 -4
- package/dist/api/resources/webhooks/client/Client.js +169 -76
- package/dist/api/types/BackendOAuthPrompt.d.ts +8 -0
- package/dist/api/types/BackendOAuthPrompt.js +5 -0
- package/dist/api/types/BulkBulkSyncSchedule.d.ts +20 -0
- package/dist/api/types/BulkBulkSyncSchedule.js +5 -0
- package/dist/api/types/BulkDiscover.d.ts +1 -1
- package/dist/api/types/BulkExecutionStatus.d.ts +2 -1
- package/dist/api/types/BulkExecutionStatus.js +1 -0
- package/dist/api/types/BulkFetchMode.d.ts +1 -1
- package/dist/api/types/BulkField.d.ts +2 -0
- package/dist/api/types/BulkNormalizeNames.d.ts +9 -0
- package/dist/api/types/BulkNormalizeNames.js +11 -0
- package/dist/api/types/BulkSchema.d.ts +1 -0
- package/dist/api/types/BulkSchemaExecutionStatus.d.ts +2 -1
- package/dist/api/types/BulkSchemaExecutionStatus.js +1 -0
- package/dist/api/types/BulkSelectiveMode.d.ts +1 -1
- package/dist/api/types/BulkSyncExecution.d.ts +6 -0
- package/dist/api/types/BulkSyncMode.d.ts +11 -0
- package/dist/api/types/BulkSyncMode.js +10 -0
- package/dist/api/types/BulkSyncResponse.d.ts +10 -1
- package/dist/api/types/BulkSyncSchemaExecution.d.ts +3 -0
- package/dist/api/types/CancelModelSyncResponse.d.ts +6 -0
- package/dist/api/types/CancelModelSyncResponse.js +5 -0
- package/dist/api/types/CancelModelSyncResponseEnvelope.d.ts +7 -0
- package/dist/api/types/CancelModelSyncResponseEnvelope.js +5 -0
- package/dist/api/types/ConnectCardResponse.d.ts +1 -0
- package/dist/api/types/ConnectionResponseSchema.d.ts +5 -0
- package/dist/api/types/ConnectionType.d.ts +5 -0
- package/dist/api/types/ConnectionTypeSchema.d.ts +1 -0
- package/dist/api/types/CreateConnectionResponseSchema.d.ts +3 -0
- package/dist/api/types/EventBody.d.ts +1 -1
- package/dist/api/types/ExecutionCounts.d.ts +2 -0
- package/dist/api/types/ExecutionStatus.d.ts +1 -1
- package/dist/api/types/FilterFieldReferenceType.d.ts +1 -1
- package/dist/api/types/FilterFunction.d.ts +3 -1
- package/dist/api/types/FilterFunction.js +2 -0
- package/dist/api/types/GetIdentityResponseSchema.d.ts +7 -0
- package/dist/api/types/JsonschemaDefinitions.d.ts +1 -1
- package/dist/api/types/JsonschemaForm.d.ts +1 -1
- package/dist/api/types/LabelLabel.d.ts +1 -1
- package/dist/api/types/ListBulkSyncExecutionsEnvelope.d.ts +1 -0
- package/dist/api/types/ListExecutionResponseEnvelope.d.ts +1 -0
- package/dist/api/types/ModelField.d.ts +4 -0
- package/dist/api/types/ModelSyncField.d.ts +2 -0
- package/dist/api/types/{SyncMode.d.ts → ModelSyncMode.d.ts} +2 -4
- package/{api/types/SyncMode.js → dist/api/types/ModelSyncMode.js} +2 -4
- package/dist/api/types/ModelSyncResponse.d.ts +6 -1
- package/dist/api/types/PaginationDetails.d.ts +6 -0
- package/dist/api/types/PaginationDetails.js +5 -0
- package/dist/api/types/ScheduleEnvelope.d.ts +7 -0
- package/dist/api/types/ScheduleEnvelope.js +5 -0
- package/dist/api/types/ScheduleFrequency.d.ts +1 -1
- package/dist/api/types/SchedulesEnvelope.d.ts +7 -0
- package/dist/api/types/SchedulesEnvelope.js +5 -0
- package/dist/api/types/SchemaField.d.ts +2 -0
- package/dist/api/types/SchemaIdentityFunction.d.ts +3 -1
- package/dist/api/types/SchemaIdentityFunction.js +2 -0
- package/dist/api/types/SchemaPrimaryKeyOverrideInput.d.ts +7 -0
- package/dist/api/types/SchemaPrimaryKeyOverrideInput.js +5 -0
- package/dist/api/types/StartModelSyncResponseSchema.d.ts +1 -0
- package/dist/api/types/SupportedBulkMode.d.ts +1 -1
- package/dist/api/types/SupportedMode.d.ts +1 -1
- package/dist/api/types/SyncDestinationProperties.d.ts +1 -0
- package/dist/api/types/Target.d.ts +4 -1
- package/dist/api/types/TargetCreateInput.d.ts +11 -0
- package/dist/api/types/TargetCreateInput.js +5 -0
- package/dist/api/types/TargetField.d.ts +1 -0
- package/dist/api/types/TypesType.d.ts +1 -1
- package/dist/api/types/UpdateBulkField.d.ts +9 -0
- package/dist/api/types/UpdateBulkField.js +5 -0
- package/dist/api/types/UtilEnumValue.d.ts +7 -0
- package/dist/api/types/UtilEnumValue.js +5 -0
- package/dist/api/types/UtilFieldType.d.ts +1 -1
- package/dist/api/types/V2ConnectionForm.d.ts +7 -0
- package/dist/api/types/V2ConnectionForm.js +5 -0
- package/dist/api/types/V2EnricherConfiguration.d.ts +1 -1
- package/dist/api/types/V2EnricherMapping.d.ts +1 -1
- package/dist/api/types/V2ExecutionLogType.d.ts +1 -1
- package/dist/api/types/V2OrderedMapStringGithubComInvopopJsonschemaSchema.d.ts +1 -1
- package/dist/api/types/V2SampleRecord.d.ts +1 -1
- package/dist/api/types/V2SchemaConfigurationFieldsItem.d.ts +1 -1
- package/dist/api/types/V4BulkSyncExecutionLogs.d.ts +1 -1
- package/dist/api/types/V4BulkSyncScheduleApi.d.ts +13 -0
- package/dist/api/types/V4BulkSyncScheduleApi.js +5 -0
- package/dist/api/types/V4TargetCreator.d.ts +10 -0
- package/dist/api/types/V4TargetCreator.js +5 -0
- package/dist/api/types/V4TargetObjectsResponseEnvelope.d.ts +1 -0
- package/dist/api/types/V4TargetPropertyValues.d.ts +14 -0
- package/dist/api/types/V4TargetPropertyValues.js +5 -0
- package/dist/api/types/V4TargetPropertyValuesEnvelope.d.ts +7 -0
- package/dist/api/types/V4TargetPropertyValuesEnvelope.js +5 -0
- package/dist/api/types/V4UserFieldRequest.d.ts +10 -0
- package/dist/api/types/V4UserFieldRequest.js +5 -0
- package/dist/api/types/Webhook.d.ts +1 -0
- package/dist/api/types/WorkTaskStatus.d.ts +1 -1
- package/dist/api/types/index.d.ts +20 -1
- package/dist/api/types/index.js +20 -1
- package/dist/core/auth/BearerToken.d.ts +1 -1
- package/dist/core/fetcher/APIResponse.d.ts +1 -1
- package/dist/core/fetcher/Fetcher.d.ts +6 -3
- package/dist/core/fetcher/Fetcher.js +20 -189
- package/dist/core/fetcher/Supplier.d.ts +1 -1
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/core/fetcher/createRequestUrl.js +12 -0
- package/dist/core/fetcher/getFetchFn.d.ts +4 -0
- package/dist/core/fetcher/getFetchFn.js +68 -0
- package/dist/core/fetcher/getHeader.js +1 -2
- package/dist/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/core/fetcher/getRequestBody.js +23 -0
- package/dist/core/fetcher/getResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getResponseBody.js +54 -0
- package/dist/core/fetcher/makeRequest.d.ts +1 -0
- package/dist/core/fetcher/makeRequest.js +42 -0
- package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
- package/dist/core/fetcher/requestWithRetries.js +40 -0
- package/dist/core/fetcher/signals.d.ts +11 -0
- package/dist/core/fetcher/signals.js +36 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +21 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +126 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +59 -0
- package/dist/core/json.d.ts +15 -0
- package/dist/core/json.js +24 -0
- package/dist/core/runtime/runtime.d.ts +2 -1
- package/dist/core/runtime/runtime.js +52 -41
- package/dist/environments.d.ts +1 -1
- package/dist/errors/PolytomicError.js +2 -1
- package/dist/errors/PolytomicTimeoutError.d.ts +1 -1
- package/dist/errors/PolytomicTimeoutError.js +2 -2
- package/dist/index.js +17 -7
- package/dist/version.d.ts +1 -0
- package/dist/version.js +4 -0
- package/environments.d.ts +1 -1
- package/errors/PolytomicError.js +2 -1
- package/errors/PolytomicTimeoutError.d.ts +1 -1
- package/errors/PolytomicTimeoutError.js +2 -2
- package/index.js +17 -7
- package/{jest.config.js → jest.config.mjs} +4 -1
- package/package.json +18 -14
- package/reference.md +6382 -0
- package/scripts/rename-to-esm-files.js +115 -0
- package/version.d.ts +1 -0
- package/version.js +4 -0
- /package/api/resources/{modelSync/client/requests/ModelSyncGetTargetFieldsRequest.js → bulkSync/resources/executions/client/requests/ExecutionsListRequest.js} +0 -0
- /package/api/resources/{modelSync/client/requests/ModelSyncGetTargetRequest.js → bulkSync/resources/schedules/client/requests/CreateScheduleRequest.js} +0 -0
- /package/{dist/api/resources/modelSync/client/requests/ModelSyncGetTargetFieldsRequest.js → api/resources/bulkSync/resources/schedules/client/requests/UpdateScheduleRequest.js} +0 -0
- /package/{dist/api/resources/modelSync/client/requests/ModelSyncGetTargetRequest.js → api/resources/connections/client/requests/TestConnectionRequest.js} +0 -0
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
39
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
40
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -62,23 +72,16 @@ class Organization {
|
|
|
62
72
|
* await client.organization.list()
|
|
63
73
|
*/
|
|
64
74
|
list(requestOptions) {
|
|
65
|
-
var _a;
|
|
66
75
|
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
var _a, _b;
|
|
67
77
|
const _response = yield core.fetcher({
|
|
68
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.
|
|
78
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, "api/organizations"),
|
|
69
79
|
method: "GET",
|
|
70
|
-
headers: {
|
|
71
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
72
|
-
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
80
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
73
81
|
? yield core.Supplier.get(this._options.version)
|
|
74
|
-
: undefined,
|
|
75
|
-
"X-Fern-Language": "JavaScript",
|
|
76
|
-
"X-Fern-SDK-Name": "polytomic",
|
|
77
|
-
"X-Fern-SDK-Version": "1.11.3",
|
|
78
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
79
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
80
|
-
},
|
|
82
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.14.3", "User-Agent": "polytomic/1.14.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
81
83
|
contentType: "application/json",
|
|
84
|
+
requestType: "json",
|
|
82
85
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
83
86
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
84
87
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -106,7 +109,7 @@ class Organization {
|
|
|
106
109
|
body: _response.error.rawBody,
|
|
107
110
|
});
|
|
108
111
|
case "timeout":
|
|
109
|
-
throw new errors.PolytomicTimeoutError();
|
|
112
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/organizations.");
|
|
110
113
|
case "unknown":
|
|
111
114
|
throw new errors.PolytomicError({
|
|
112
115
|
message: _response.error.errorMessage,
|
|
@@ -123,6 +126,7 @@ class Organization {
|
|
|
123
126
|
* @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
|
|
124
127
|
*
|
|
125
128
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
129
|
+
* @throws {@link Polytomic.ConflictError}
|
|
126
130
|
* @throws {@link Polytomic.UnprocessableEntityError}
|
|
127
131
|
* @throws {@link Polytomic.InternalServerError}
|
|
128
132
|
*
|
|
@@ -132,23 +136,16 @@ class Organization {
|
|
|
132
136
|
* })
|
|
133
137
|
*/
|
|
134
138
|
create(request, requestOptions) {
|
|
135
|
-
var _a;
|
|
136
139
|
return __awaiter(this, void 0, void 0, function* () {
|
|
140
|
+
var _a, _b;
|
|
137
141
|
const _response = yield core.fetcher({
|
|
138
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.
|
|
142
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, "api/organizations"),
|
|
139
143
|
method: "POST",
|
|
140
|
-
headers: {
|
|
141
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
142
|
-
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
144
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
143
145
|
? yield core.Supplier.get(this._options.version)
|
|
144
|
-
: undefined,
|
|
145
|
-
"X-Fern-Language": "JavaScript",
|
|
146
|
-
"X-Fern-SDK-Name": "polytomic",
|
|
147
|
-
"X-Fern-SDK-Version": "1.11.3",
|
|
148
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
149
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
150
|
-
},
|
|
146
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.14.3", "User-Agent": "polytomic/1.14.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
151
147
|
contentType: "application/json",
|
|
148
|
+
requestType: "json",
|
|
152
149
|
body: request,
|
|
153
150
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
154
151
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -161,6 +158,8 @@ class Organization {
|
|
|
161
158
|
switch (_response.error.statusCode) {
|
|
162
159
|
case 401:
|
|
163
160
|
throw new Polytomic.UnauthorizedError(_response.error.body);
|
|
161
|
+
case 409:
|
|
162
|
+
throw new Polytomic.ConflictError(_response.error.body);
|
|
164
163
|
case 422:
|
|
165
164
|
throw new Polytomic.UnprocessableEntityError(_response.error.body);
|
|
166
165
|
case 500:
|
|
@@ -179,7 +178,7 @@ class Organization {
|
|
|
179
178
|
body: _response.error.rawBody,
|
|
180
179
|
});
|
|
181
180
|
case "timeout":
|
|
182
|
-
throw new errors.PolytomicTimeoutError();
|
|
181
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling POST /api/organizations.");
|
|
183
182
|
case "unknown":
|
|
184
183
|
throw new errors.PolytomicError({
|
|
185
184
|
message: _response.error.errorMessage,
|
|
@@ -202,23 +201,16 @@ class Organization {
|
|
|
202
201
|
* await client.organization.get("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
203
202
|
*/
|
|
204
203
|
get(id, requestOptions) {
|
|
205
|
-
var _a;
|
|
206
204
|
return __awaiter(this, void 0, void 0, function* () {
|
|
205
|
+
var _a, _b;
|
|
207
206
|
const _response = yield core.fetcher({
|
|
208
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.
|
|
207
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/organizations/${encodeURIComponent(id)}`),
|
|
209
208
|
method: "GET",
|
|
210
|
-
headers: {
|
|
211
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
212
|
-
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
209
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
213
210
|
? yield core.Supplier.get(this._options.version)
|
|
214
|
-
: undefined,
|
|
215
|
-
"X-Fern-Language": "JavaScript",
|
|
216
|
-
"X-Fern-SDK-Name": "polytomic",
|
|
217
|
-
"X-Fern-SDK-Version": "1.11.3",
|
|
218
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
219
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
220
|
-
},
|
|
211
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.14.3", "User-Agent": "polytomic/1.14.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
221
212
|
contentType: "application/json",
|
|
213
|
+
requestType: "json",
|
|
222
214
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
223
215
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
224
216
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -246,7 +238,7 @@ class Organization {
|
|
|
246
238
|
body: _response.error.rawBody,
|
|
247
239
|
});
|
|
248
240
|
case "timeout":
|
|
249
|
-
throw new errors.PolytomicTimeoutError();
|
|
241
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/organizations/{id}.");
|
|
250
242
|
case "unknown":
|
|
251
243
|
throw new errors.PolytomicError({
|
|
252
244
|
message: _response.error.errorMessage,
|
|
@@ -264,6 +256,7 @@ class Organization {
|
|
|
264
256
|
* @param {Organization.RequestOptions} requestOptions - Request-specific configuration.
|
|
265
257
|
*
|
|
266
258
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
259
|
+
* @throws {@link Polytomic.ConflictError}
|
|
267
260
|
* @throws {@link Polytomic.UnprocessableEntityError}
|
|
268
261
|
* @throws {@link Polytomic.InternalServerError}
|
|
269
262
|
*
|
|
@@ -273,23 +266,16 @@ class Organization {
|
|
|
273
266
|
* })
|
|
274
267
|
*/
|
|
275
268
|
update(id, request, requestOptions) {
|
|
276
|
-
var _a;
|
|
277
269
|
return __awaiter(this, void 0, void 0, function* () {
|
|
270
|
+
var _a, _b;
|
|
278
271
|
const _response = yield core.fetcher({
|
|
279
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.
|
|
272
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/organizations/${encodeURIComponent(id)}`),
|
|
280
273
|
method: "PUT",
|
|
281
|
-
headers: {
|
|
282
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
283
|
-
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
274
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
284
275
|
? yield core.Supplier.get(this._options.version)
|
|
285
|
-
: undefined,
|
|
286
|
-
"X-Fern-Language": "JavaScript",
|
|
287
|
-
"X-Fern-SDK-Name": "polytomic",
|
|
288
|
-
"X-Fern-SDK-Version": "1.11.3",
|
|
289
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
290
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
291
|
-
},
|
|
276
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.14.3", "User-Agent": "polytomic/1.14.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
292
277
|
contentType: "application/json",
|
|
278
|
+
requestType: "json",
|
|
293
279
|
body: request,
|
|
294
280
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
295
281
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -302,6 +288,8 @@ class Organization {
|
|
|
302
288
|
switch (_response.error.statusCode) {
|
|
303
289
|
case 401:
|
|
304
290
|
throw new Polytomic.UnauthorizedError(_response.error.body);
|
|
291
|
+
case 409:
|
|
292
|
+
throw new Polytomic.ConflictError(_response.error.body);
|
|
305
293
|
case 422:
|
|
306
294
|
throw new Polytomic.UnprocessableEntityError(_response.error.body);
|
|
307
295
|
case 500:
|
|
@@ -320,7 +308,7 @@ class Organization {
|
|
|
320
308
|
body: _response.error.rawBody,
|
|
321
309
|
});
|
|
322
310
|
case "timeout":
|
|
323
|
-
throw new errors.PolytomicTimeoutError();
|
|
311
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling PUT /api/organizations/{id}.");
|
|
324
312
|
case "unknown":
|
|
325
313
|
throw new errors.PolytomicError({
|
|
326
314
|
message: _response.error.errorMessage,
|
|
@@ -344,23 +332,16 @@ class Organization {
|
|
|
344
332
|
* await client.organization.remove("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
345
333
|
*/
|
|
346
334
|
remove(id, requestOptions) {
|
|
347
|
-
var _a;
|
|
348
335
|
return __awaiter(this, void 0, void 0, function* () {
|
|
336
|
+
var _a, _b;
|
|
349
337
|
const _response = yield core.fetcher({
|
|
350
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.
|
|
338
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/organizations/${encodeURIComponent(id)}`),
|
|
351
339
|
method: "DELETE",
|
|
352
|
-
headers: {
|
|
353
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
354
|
-
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
340
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
355
341
|
? yield core.Supplier.get(this._options.version)
|
|
356
|
-
: undefined,
|
|
357
|
-
"X-Fern-Language": "JavaScript",
|
|
358
|
-
"X-Fern-SDK-Name": "polytomic",
|
|
359
|
-
"X-Fern-SDK-Version": "1.11.3",
|
|
360
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
361
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
362
|
-
},
|
|
342
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.14.3", "User-Agent": "polytomic/1.14.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
363
343
|
contentType: "application/json",
|
|
344
|
+
requestType: "json",
|
|
364
345
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
365
346
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
366
347
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -390,7 +371,7 @@ class Organization {
|
|
|
390
371
|
body: _response.error.rawBody,
|
|
391
372
|
});
|
|
392
373
|
case "timeout":
|
|
393
|
-
throw new errors.PolytomicTimeoutError();
|
|
374
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling DELETE /api/organizations/{id}.");
|
|
394
375
|
case "unknown":
|
|
395
376
|
throw new errors.PolytomicError({
|
|
396
377
|
message: _response.error.errorMessage,
|
|
@@ -8,7 +8,10 @@ import { Roles } from "../resources/roles/client/Client";
|
|
|
8
8
|
export declare namespace Permissions {
|
|
9
9
|
interface Options {
|
|
10
10
|
environment?: core.Supplier<environments.PolytomicEnvironment | string>;
|
|
11
|
+
/** Specify a custom URL to connect the client to. */
|
|
12
|
+
baseUrl?: core.Supplier<string>;
|
|
11
13
|
token: core.Supplier<core.BearerToken>;
|
|
14
|
+
/** Override the X-Polytomic-Version header */
|
|
12
15
|
version?: core.Supplier<string | undefined>;
|
|
13
16
|
}
|
|
14
17
|
interface RequestOptions {
|
|
@@ -20,13 +23,15 @@ export declare namespace Permissions {
|
|
|
20
23
|
abortSignal?: AbortSignal;
|
|
21
24
|
/** Override the X-Polytomic-Version header */
|
|
22
25
|
version?: string | undefined;
|
|
26
|
+
/** Additional headers to include in the request. */
|
|
27
|
+
headers?: Record<string, string>;
|
|
23
28
|
}
|
|
24
29
|
}
|
|
25
30
|
export declare class Permissions {
|
|
26
31
|
protected readonly _options: Permissions.Options;
|
|
27
|
-
constructor(_options: Permissions.Options);
|
|
28
32
|
protected _policies: Policies | undefined;
|
|
29
|
-
get policies(): Policies;
|
|
30
33
|
protected _roles: Roles | undefined;
|
|
34
|
+
constructor(_options: Permissions.Options);
|
|
35
|
+
get policies(): Policies;
|
|
31
36
|
get roles(): Roles;
|
|
32
37
|
}
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
37
|
};
|
|
@@ -7,7 +7,10 @@ import * as Polytomic from "../../../../../index";
|
|
|
7
7
|
export declare namespace Policies {
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.PolytomicEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
10
12
|
token: core.Supplier<core.BearerToken>;
|
|
13
|
+
/** Override the X-Polytomic-Version header */
|
|
11
14
|
version?: core.Supplier<string | undefined>;
|
|
12
15
|
}
|
|
13
16
|
interface RequestOptions {
|
|
@@ -19,6 +22,8 @@ export declare namespace Policies {
|
|
|
19
22
|
abortSignal?: AbortSignal;
|
|
20
23
|
/** Override the X-Polytomic-Version header */
|
|
21
24
|
version?: string | undefined;
|
|
25
|
+
/** Additional headers to include in the request. */
|
|
26
|
+
headers?: Record<string, string>;
|
|
22
27
|
}
|
|
23
28
|
}
|
|
24
29
|
export declare class Policies {
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
39
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
40
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -58,23 +68,16 @@ class Policies {
|
|
|
58
68
|
* await client.permissions.policies.list()
|
|
59
69
|
*/
|
|
60
70
|
list(requestOptions) {
|
|
61
|
-
var _a;
|
|
62
71
|
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
+
var _a, _b;
|
|
63
73
|
const _response = yield core.fetcher({
|
|
64
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.
|
|
74
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, "api/permissions/policies"),
|
|
65
75
|
method: "GET",
|
|
66
|
-
headers: {
|
|
67
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
68
|
-
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
76
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
69
77
|
? yield core.Supplier.get(this._options.version)
|
|
70
|
-
: undefined,
|
|
71
|
-
"X-Fern-Language": "JavaScript",
|
|
72
|
-
"X-Fern-SDK-Name": "polytomic",
|
|
73
|
-
"X-Fern-SDK-Version": "1.11.3",
|
|
74
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
75
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
76
|
-
},
|
|
78
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.14.3", "User-Agent": "polytomic/1.14.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
77
79
|
contentType: "application/json",
|
|
80
|
+
requestType: "json",
|
|
78
81
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
79
82
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
80
83
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -102,7 +105,7 @@ class Policies {
|
|
|
102
105
|
body: _response.error.rawBody,
|
|
103
106
|
});
|
|
104
107
|
case "timeout":
|
|
105
|
-
throw new errors.PolytomicTimeoutError();
|
|
108
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/permissions/policies.");
|
|
106
109
|
case "unknown":
|
|
107
110
|
throw new errors.PolytomicError({
|
|
108
111
|
message: _response.error.errorMessage,
|
|
@@ -126,23 +129,16 @@ class Policies {
|
|
|
126
129
|
* })
|
|
127
130
|
*/
|
|
128
131
|
create(request, requestOptions) {
|
|
129
|
-
var _a;
|
|
130
132
|
return __awaiter(this, void 0, void 0, function* () {
|
|
133
|
+
var _a, _b;
|
|
131
134
|
const _response = yield core.fetcher({
|
|
132
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.
|
|
135
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, "api/permissions/policies"),
|
|
133
136
|
method: "POST",
|
|
134
|
-
headers: {
|
|
135
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
136
|
-
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
137
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
137
138
|
? yield core.Supplier.get(this._options.version)
|
|
138
|
-
: undefined,
|
|
139
|
-
"X-Fern-Language": "JavaScript",
|
|
140
|
-
"X-Fern-SDK-Name": "polytomic",
|
|
141
|
-
"X-Fern-SDK-Version": "1.11.3",
|
|
142
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
143
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
144
|
-
},
|
|
139
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.14.3", "User-Agent": "polytomic/1.14.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
145
140
|
contentType: "application/json",
|
|
141
|
+
requestType: "json",
|
|
146
142
|
body: request,
|
|
147
143
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
148
144
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -177,7 +173,7 @@ class Policies {
|
|
|
177
173
|
body: _response.error.rawBody,
|
|
178
174
|
});
|
|
179
175
|
case "timeout":
|
|
180
|
-
throw new errors.PolytomicTimeoutError();
|
|
176
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling POST /api/permissions/policies.");
|
|
181
177
|
case "unknown":
|
|
182
178
|
throw new errors.PolytomicError({
|
|
183
179
|
message: _response.error.errorMessage,
|
|
@@ -197,23 +193,16 @@ class Policies {
|
|
|
197
193
|
* await client.permissions.policies.get("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
198
194
|
*/
|
|
199
195
|
get(id, requestOptions) {
|
|
200
|
-
var _a;
|
|
201
196
|
return __awaiter(this, void 0, void 0, function* () {
|
|
197
|
+
var _a, _b;
|
|
202
198
|
const _response = yield core.fetcher({
|
|
203
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.
|
|
199
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/permissions/policies/${encodeURIComponent(id)}`),
|
|
204
200
|
method: "GET",
|
|
205
|
-
headers: {
|
|
206
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
207
|
-
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
201
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
208
202
|
? yield core.Supplier.get(this._options.version)
|
|
209
|
-
: undefined,
|
|
210
|
-
"X-Fern-Language": "JavaScript",
|
|
211
|
-
"X-Fern-SDK-Name": "polytomic",
|
|
212
|
-
"X-Fern-SDK-Version": "1.11.3",
|
|
213
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
214
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
215
|
-
},
|
|
203
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.14.3", "User-Agent": "polytomic/1.14.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
216
204
|
contentType: "application/json",
|
|
205
|
+
requestType: "json",
|
|
217
206
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
218
207
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
219
208
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -243,7 +232,7 @@ class Policies {
|
|
|
243
232
|
body: _response.error.rawBody,
|
|
244
233
|
});
|
|
245
234
|
case "timeout":
|
|
246
|
-
throw new errors.PolytomicTimeoutError();
|
|
235
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/permissions/policies/{id}.");
|
|
247
236
|
case "unknown":
|
|
248
237
|
throw new errors.PolytomicError({
|
|
249
238
|
message: _response.error.errorMessage,
|
|
@@ -268,23 +257,16 @@ class Policies {
|
|
|
268
257
|
* })
|
|
269
258
|
*/
|
|
270
259
|
update(id, request, requestOptions) {
|
|
271
|
-
var _a;
|
|
272
260
|
return __awaiter(this, void 0, void 0, function* () {
|
|
261
|
+
var _a, _b;
|
|
273
262
|
const _response = yield core.fetcher({
|
|
274
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.
|
|
263
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/permissions/policies/${encodeURIComponent(id)}`),
|
|
275
264
|
method: "PUT",
|
|
276
|
-
headers: {
|
|
277
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
278
|
-
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
265
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
279
266
|
? yield core.Supplier.get(this._options.version)
|
|
280
|
-
: undefined,
|
|
281
|
-
"X-Fern-Language": "JavaScript",
|
|
282
|
-
"X-Fern-SDK-Name": "polytomic",
|
|
283
|
-
"X-Fern-SDK-Version": "1.11.3",
|
|
284
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
285
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
286
|
-
},
|
|
267
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.14.3", "User-Agent": "polytomic/1.14.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
287
268
|
contentType: "application/json",
|
|
269
|
+
requestType: "json",
|
|
288
270
|
body: request,
|
|
289
271
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
290
272
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -319,7 +301,7 @@ class Policies {
|
|
|
319
301
|
body: _response.error.rawBody,
|
|
320
302
|
});
|
|
321
303
|
case "timeout":
|
|
322
|
-
throw new errors.PolytomicTimeoutError();
|
|
304
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling PUT /api/permissions/policies/{id}.");
|
|
323
305
|
case "unknown":
|
|
324
306
|
throw new errors.PolytomicError({
|
|
325
307
|
message: _response.error.errorMessage,
|
|
@@ -340,23 +322,16 @@ class Policies {
|
|
|
340
322
|
* await client.permissions.policies.remove("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
341
323
|
*/
|
|
342
324
|
remove(id, requestOptions) {
|
|
343
|
-
var _a;
|
|
344
325
|
return __awaiter(this, void 0, void 0, function* () {
|
|
326
|
+
var _a, _b;
|
|
345
327
|
const _response = yield core.fetcher({
|
|
346
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.
|
|
328
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/permissions/policies/${encodeURIComponent(id)}`),
|
|
347
329
|
method: "DELETE",
|
|
348
|
-
headers: {
|
|
349
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
350
|
-
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
330
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
351
331
|
? yield core.Supplier.get(this._options.version)
|
|
352
|
-
: undefined,
|
|
353
|
-
"X-Fern-Language": "JavaScript",
|
|
354
|
-
"X-Fern-SDK-Name": "polytomic",
|
|
355
|
-
"X-Fern-SDK-Version": "1.11.3",
|
|
356
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
357
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
358
|
-
},
|
|
332
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.14.3", "User-Agent": "polytomic/1.14.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
359
333
|
contentType: "application/json",
|
|
334
|
+
requestType: "json",
|
|
360
335
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
361
336
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
362
337
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -388,7 +363,7 @@ class Policies {
|
|
|
388
363
|
body: _response.error.rawBody,
|
|
389
364
|
});
|
|
390
365
|
case "timeout":
|
|
391
|
-
throw new errors.PolytomicTimeoutError();
|
|
366
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling DELETE /api/permissions/policies/{id}.");
|
|
392
367
|
case "unknown":
|
|
393
368
|
throw new errors.PolytomicError({
|
|
394
369
|
message: _response.error.errorMessage,
|
|
@@ -7,7 +7,10 @@ import * as Polytomic from "../../../../../index";
|
|
|
7
7
|
export declare namespace Roles {
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.PolytomicEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
10
12
|
token: core.Supplier<core.BearerToken>;
|
|
13
|
+
/** Override the X-Polytomic-Version header */
|
|
11
14
|
version?: core.Supplier<string | undefined>;
|
|
12
15
|
}
|
|
13
16
|
interface RequestOptions {
|
|
@@ -19,6 +22,8 @@ export declare namespace Roles {
|
|
|
19
22
|
abortSignal?: AbortSignal;
|
|
20
23
|
/** Override the X-Polytomic-Version header */
|
|
21
24
|
version?: string | undefined;
|
|
25
|
+
/** Additional headers to include in the request. */
|
|
26
|
+
headers?: Record<string, string>;
|
|
22
27
|
}
|
|
23
28
|
}
|
|
24
29
|
export declare class Roles {
|