polytomic 1.16.0 → 1.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Client.d.ts +14 -19
- package/api/errors/BadRequestError.js +7 -17
- package/api/errors/ConflictError.js +7 -17
- package/api/errors/ForbiddenError.js +7 -17
- package/api/errors/InternalServerError.js +7 -17
- package/api/errors/NotFoundError.js +7 -17
- package/api/errors/UnauthorizedError.js +7 -17
- package/api/errors/UnprocessableEntityError.js +7 -17
- package/api/resources/bulkSync/client/Client.d.ts +173 -24
- package/api/resources/bulkSync/client/Client.js +339 -118
- package/api/resources/bulkSync/client/requests/BulkSyncGetSourceRequest.d.ts +3 -0
- package/api/resources/bulkSync/client/requests/BulkSyncListRequest.d.ts +3 -0
- package/api/resources/bulkSync/client/requests/CreateBulkSyncRequest.d.ts +1 -1
- package/api/resources/bulkSync/client/requests/StartBulkSyncRequest.d.ts +4 -0
- package/api/resources/bulkSync/client/requests/UpdateBulkSyncRequest.d.ts +1 -1
- package/api/resources/bulkSync/resources/executions/client/Client.d.ts +77 -12
- package/api/resources/bulkSync/resources/executions/client/Client.js +168 -66
- package/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListRequest.d.ts +12 -0
- package/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListStatusRequest.d.ts +3 -3
- package/api/resources/bulkSync/resources/index.js +7 -17
- package/api/resources/bulkSync/resources/schedules/client/Client.d.ts +44 -15
- package/api/resources/bulkSync/resources/schedules/client/Client.js +116 -57
- package/api/resources/bulkSync/resources/schedules/client/requests/CreateScheduleRequest.d.ts +1 -1
- package/api/resources/bulkSync/resources/schedules/client/requests/UpdateScheduleRequest.d.ts +1 -1
- package/api/resources/bulkSync/resources/schemas/client/Client.d.ts +71 -11
- package/api/resources/bulkSync/resources/schemas/client/Client.js +150 -61
- package/api/resources/bulkSync/resources/schemas/client/requests/BulkSyncSchemasRequest.d.ts +1 -0
- package/api/resources/bulkSync/resources/schemas/client/requests/SchemasListRequest.d.ts +3 -0
- package/api/resources/bulkSync/resources/schemas/client/requests/UpdateBulkSchema.d.ts +7 -0
- 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 +160 -12
- package/api/resources/connections/client/Client.js +473 -86
- package/api/resources/connections/client/requests/ApiRequest.d.ts +13 -0
- package/api/resources/connections/client/requests/GetConnectionTypeParameterValuesRequestSchema.d.ts +15 -0
- package/api/resources/connections/client/requests/index.d.ts +2 -0
- package/api/resources/events/client/Client.d.ts +20 -7
- package/api/resources/events/client/Client.js +55 -33
- package/api/resources/events/client/requests/EventsListRequest.d.ts +17 -2
- package/api/resources/identity/client/Client.d.ts +11 -6
- package/api/resources/identity/client/Client.js +31 -24
- package/api/resources/index.js +7 -17
- package/api/resources/jobs/client/Client.d.ts +15 -8
- package/api/resources/jobs/client/Client.js +35 -26
- package/api/resources/modelSync/client/Client.d.ts +110 -19
- package/api/resources/modelSync/client/Client.js +287 -118
- package/api/resources/modelSync/client/requests/CreateModelSyncRequest.d.ts +1 -1
- package/api/resources/modelSync/client/requests/ModelSyncGetSourceFieldsRequest.d.ts +3 -0
- package/api/resources/modelSync/client/requests/ModelSyncGetSourceRequest.d.ts +3 -0
- package/api/resources/modelSync/client/requests/UpdateModelSyncRequest.d.ts +1 -1
- package/api/resources/modelSync/resources/executions/client/Client.d.ts +41 -12
- package/api/resources/modelSync/resources/executions/client/Client.js +115 -56
- package/api/resources/modelSync/resources/executions/client/requests/UpdateExecutionRequest.d.ts +1 -1
- package/api/resources/modelSync/resources/index.js +7 -17
- package/api/resources/modelSync/resources/targets/client/Client.d.ts +28 -11
- package/api/resources/modelSync/resources/targets/client/Client.js +89 -49
- package/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetFieldsRequest.d.ts +6 -0
- package/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetRequest.d.ts +6 -0
- package/api/resources/models/client/Client.d.ts +79 -8
- package/api/resources/models/client/Client.js +214 -86
- package/api/resources/models/client/requests/ModelsGetEnrichmentSourceRequest.d.ts +3 -0
- package/api/resources/notifications/client/Client.d.ts +13 -5
- package/api/resources/notifications/client/Client.js +48 -31
- package/api/resources/notifications/client/requests/V4GlobalErrorSubscribersRequest.d.ts +1 -0
- package/api/resources/organization/client/Client.d.ts +31 -13
- package/api/resources/organization/client/Client.js +109 -55
- package/api/resources/organization/client/requests/CreateOrganizationRequestSchema.d.ts +6 -0
- package/api/resources/organization/client/requests/UpdateOrganizationRequestSchema.d.ts +6 -0
- package/api/resources/permissions/client/Client.d.ts +2 -7
- package/api/resources/permissions/resources/index.js +7 -17
- package/api/resources/permissions/resources/policies/client/Client.d.ts +33 -5
- package/api/resources/permissions/resources/policies/client/Client.js +105 -47
- package/api/resources/permissions/resources/roles/client/Client.d.ts +38 -5
- package/api/resources/permissions/resources/roles/client/Client.js +110 -47
- package/api/resources/queryRunner/client/Client.d.ts +26 -7
- package/api/resources/queryRunner/client/Client.js +63 -35
- package/api/resources/queryRunner/client/requests/QueryRunnerGetQueryRequest.d.ts +3 -0
- package/api/resources/schemas/client/Client.d.ts +118 -23
- package/api/resources/schemas/client/Client.js +232 -86
- package/api/resources/schemas/client/requests/SetPrimaryKeysRequest.d.ts +1 -0
- package/api/resources/schemas/client/requests/UpsertSchemaFieldRequest.d.ts +1 -0
- package/api/resources/users/client/Client.d.ts +44 -16
- package/api/resources/users/client/Client.js +133 -66
- package/api/resources/users/client/requests/CreateUserRequestSchema.d.ts +4 -0
- package/api/resources/users/client/requests/UpdateUserRequestSchema.d.ts +4 -0
- package/api/resources/users/client/requests/UsersCreateApiKeyRequest.d.ts +3 -0
- package/api/resources/webhooks/client/Client.d.ts +67 -21
- package/api/resources/webhooks/client/Client.js +165 -75
- package/api/types/ApiKeyResponse.d.ts +1 -0
- package/api/types/BulkBulkSyncSchedule.d.ts +1 -0
- package/api/types/BulkDiscover.d.ts +1 -1
- package/api/types/BulkExecutionStatus.d.ts +1 -1
- package/api/types/BulkFetchMode.d.ts +1 -1
- package/api/types/BulkNormalizeNames.d.ts +1 -1
- package/api/types/BulkOutputDisposition.d.ts +9 -0
- package/api/types/BulkOutputDisposition.js +11 -0
- package/api/types/BulkResyncMode.d.ts +9 -0
- package/api/types/BulkResyncMode.js +11 -0
- package/api/types/BulkScheduleSyncMode.d.ts +1 -1
- package/api/types/BulkSchema.d.ts +2 -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/BulkSyncDest.d.ts +2 -0
- package/api/types/BulkSyncExecution.d.ts +1 -0
- package/api/types/BulkSyncExecutionStatus.d.ts +3 -0
- package/api/types/BulkSyncIngestionStatus.d.ts +14 -0
- package/{dist/version.js → api/types/BulkSyncIngestionStatus.js} +3 -2
- package/api/types/BulkSyncMode.d.ts +1 -1
- package/api/types/BulkSyncResponse.d.ts +2 -2
- package/api/types/BulkSyncSchemaExecutionStatus.d.ts +7 -0
- package/api/types/BulkSyncSource.d.ts +1 -0
- package/api/types/BulkSyncStatusResponse.d.ts +1 -0
- package/api/types/ConnectCardResponse.d.ts +1 -0
- package/api/types/ConnectionResponseSchema.d.ts +4 -2
- package/api/types/CreateSharedConnectionResponseSchema.d.ts +6 -0
- package/{version.js → api/types/CreateSharedConnectionResponseSchema.js} +3 -2
- package/api/types/Event.d.ts +4 -0
- package/api/types/EventBody.d.ts +1 -1
- package/api/types/ExecutionStatus.d.ts +1 -1
- package/api/types/FilterFieldReferenceType.d.ts +1 -1
- package/api/types/FilterFunction.d.ts +1 -1
- package/api/types/GetIdentityResponseSchema.d.ts +2 -0
- package/api/types/IngestionStatusLevel.d.ts +12 -0
- package/api/types/IngestionStatusLevel.js +11 -0
- package/api/types/JobResponse.d.ts +3 -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/ModelField.d.ts +1 -1
- package/api/types/ModelResponse.d.ts +2 -2
- package/api/types/ModelSyncMode.d.ts +2 -1
- package/api/types/ModelSyncMode.js +1 -0
- package/api/types/ModelSyncResponse.d.ts +2 -2
- package/api/types/ModelSyncSourceMetaResponse.d.ts +3 -0
- package/api/types/Organization.d.ts +5 -0
- package/api/types/{CommonOutputActor.d.ts → OutputActor.d.ts} +1 -1
- package/api/types/OutputActor.js +5 -0
- package/api/types/ScheduleFrequency.d.ts +1 -1
- package/api/types/SchemaIdentityFunction.d.ts +1 -1
- package/api/types/SourceMeta.d.ts +3 -0
- package/api/types/TypesType.d.ts +1 -1
- package/api/types/User.d.ts +6 -0
- package/api/types/UtilFieldType.d.ts +1 -1
- package/api/types/V2CreateSharedConnectionResponseEnvelope.d.ts +7 -0
- package/api/types/V2CreateSharedConnectionResponseEnvelope.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/V3BulkSyncSourceCapabilities.d.ts +6 -0
- package/api/types/V3BulkSyncSourceCapabilities.js +5 -0
- package/api/types/V4BulkSyncExecutionLogs.d.ts +6 -1
- package/api/types/V4BulkSyncScheduleApi.d.ts +5 -0
- package/api/types/V4ExportSyncLogsResponse.d.ts +1 -0
- package/api/types/V4GlobalErrorSubscribersResponse.d.ts +1 -0
- package/api/types/V4RunQueryResult.d.ts +2 -1
- package/api/types/V4UserFieldRequest.d.ts +4 -0
- package/api/types/WorkTaskStatus.d.ts +1 -1
- package/api/types/index.d.ts +13 -6
- package/api/types/index.js +13 -6
- package/core/auth/BearerToken.d.ts +1 -1
- package/core/fetcher/APIResponse.d.ts +1 -1
- package/core/fetcher/Fetcher.d.ts +3 -6
- package/core/fetcher/Fetcher.js +189 -20
- package/core/fetcher/Supplier.d.ts +1 -1
- package/core/fetcher/getHeader.js +2 -1
- package/core/runtime/runtime.d.ts +1 -2
- package/core/runtime/runtime.js +41 -52
- package/dist/Client.d.ts +14 -19
- package/dist/api/errors/BadRequestError.js +7 -17
- package/dist/api/errors/ConflictError.js +7 -17
- package/dist/api/errors/ForbiddenError.js +7 -17
- package/dist/api/errors/InternalServerError.js +7 -17
- package/dist/api/errors/NotFoundError.js +7 -17
- package/dist/api/errors/UnauthorizedError.js +7 -17
- package/dist/api/errors/UnprocessableEntityError.js +7 -17
- package/dist/api/resources/bulkSync/client/Client.d.ts +173 -24
- package/dist/api/resources/bulkSync/client/Client.js +339 -118
- package/dist/api/resources/bulkSync/client/requests/BulkSyncGetSourceRequest.d.ts +3 -0
- package/dist/api/resources/bulkSync/client/requests/BulkSyncListRequest.d.ts +3 -0
- package/dist/api/resources/bulkSync/client/requests/CreateBulkSyncRequest.d.ts +1 -1
- package/dist/api/resources/bulkSync/client/requests/StartBulkSyncRequest.d.ts +4 -0
- package/dist/api/resources/bulkSync/client/requests/UpdateBulkSyncRequest.d.ts +1 -1
- package/dist/api/resources/bulkSync/resources/executions/client/Client.d.ts +77 -12
- package/dist/api/resources/bulkSync/resources/executions/client/Client.js +168 -66
- package/dist/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListRequest.d.ts +12 -0
- package/dist/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListStatusRequest.d.ts +3 -3
- package/dist/api/resources/bulkSync/resources/index.js +7 -17
- package/dist/api/resources/bulkSync/resources/schedules/client/Client.d.ts +44 -15
- package/dist/api/resources/bulkSync/resources/schedules/client/Client.js +116 -57
- package/dist/api/resources/bulkSync/resources/schedules/client/requests/CreateScheduleRequest.d.ts +1 -1
- package/dist/api/resources/bulkSync/resources/schedules/client/requests/UpdateScheduleRequest.d.ts +1 -1
- package/dist/api/resources/bulkSync/resources/schemas/client/Client.d.ts +71 -11
- package/dist/api/resources/bulkSync/resources/schemas/client/Client.js +150 -61
- package/dist/api/resources/bulkSync/resources/schemas/client/requests/BulkSyncSchemasRequest.d.ts +1 -0
- package/dist/api/resources/bulkSync/resources/schemas/client/requests/SchemasListRequest.d.ts +3 -0
- package/dist/api/resources/bulkSync/resources/schemas/client/requests/UpdateBulkSchema.d.ts +7 -0
- 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 +160 -12
- package/dist/api/resources/connections/client/Client.js +473 -86
- package/dist/api/resources/connections/client/requests/ApiRequest.d.ts +13 -0
- package/dist/api/resources/connections/client/requests/ApiRequest.js +5 -0
- package/dist/api/resources/connections/client/requests/GetConnectionTypeParameterValuesRequestSchema.d.ts +15 -0
- package/dist/api/resources/connections/client/requests/GetConnectionTypeParameterValuesRequestSchema.js +5 -0
- package/dist/api/resources/connections/client/requests/index.d.ts +2 -0
- package/dist/api/resources/events/client/Client.d.ts +20 -7
- package/dist/api/resources/events/client/Client.js +55 -33
- package/dist/api/resources/events/client/requests/EventsListRequest.d.ts +17 -2
- package/dist/api/resources/identity/client/Client.d.ts +11 -6
- package/dist/api/resources/identity/client/Client.js +31 -24
- package/dist/api/resources/index.js +7 -17
- package/dist/api/resources/jobs/client/Client.d.ts +15 -8
- package/dist/api/resources/jobs/client/Client.js +35 -26
- package/dist/api/resources/modelSync/client/Client.d.ts +110 -19
- package/dist/api/resources/modelSync/client/Client.js +287 -118
- package/dist/api/resources/modelSync/client/requests/CreateModelSyncRequest.d.ts +1 -1
- package/dist/api/resources/modelSync/client/requests/ModelSyncGetSourceFieldsRequest.d.ts +3 -0
- package/dist/api/resources/modelSync/client/requests/ModelSyncGetSourceRequest.d.ts +3 -0
- package/dist/api/resources/modelSync/client/requests/UpdateModelSyncRequest.d.ts +1 -1
- package/dist/api/resources/modelSync/resources/executions/client/Client.d.ts +41 -12
- package/dist/api/resources/modelSync/resources/executions/client/Client.js +115 -56
- package/dist/api/resources/modelSync/resources/executions/client/requests/UpdateExecutionRequest.d.ts +1 -1
- package/dist/api/resources/modelSync/resources/index.js +7 -17
- package/dist/api/resources/modelSync/resources/targets/client/Client.d.ts +28 -11
- package/dist/api/resources/modelSync/resources/targets/client/Client.js +89 -49
- package/dist/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetFieldsRequest.d.ts +6 -0
- package/dist/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetRequest.d.ts +6 -0
- package/dist/api/resources/models/client/Client.d.ts +79 -8
- package/dist/api/resources/models/client/Client.js +214 -86
- package/dist/api/resources/models/client/requests/ModelsGetEnrichmentSourceRequest.d.ts +3 -0
- package/dist/api/resources/notifications/client/Client.d.ts +13 -5
- package/dist/api/resources/notifications/client/Client.js +48 -31
- package/dist/api/resources/notifications/client/requests/V4GlobalErrorSubscribersRequest.d.ts +1 -0
- package/dist/api/resources/organization/client/Client.d.ts +31 -13
- package/dist/api/resources/organization/client/Client.js +109 -55
- package/dist/api/resources/organization/client/requests/CreateOrganizationRequestSchema.d.ts +6 -0
- package/dist/api/resources/organization/client/requests/UpdateOrganizationRequestSchema.d.ts +6 -0
- package/dist/api/resources/permissions/client/Client.d.ts +2 -7
- package/dist/api/resources/permissions/resources/index.js +7 -17
- package/dist/api/resources/permissions/resources/policies/client/Client.d.ts +33 -5
- package/dist/api/resources/permissions/resources/policies/client/Client.js +105 -47
- package/dist/api/resources/permissions/resources/roles/client/Client.d.ts +38 -5
- package/dist/api/resources/permissions/resources/roles/client/Client.js +110 -47
- package/dist/api/resources/queryRunner/client/Client.d.ts +26 -7
- package/dist/api/resources/queryRunner/client/Client.js +63 -35
- package/dist/api/resources/queryRunner/client/requests/QueryRunnerGetQueryRequest.d.ts +3 -0
- package/dist/api/resources/schemas/client/Client.d.ts +118 -23
- package/dist/api/resources/schemas/client/Client.js +232 -86
- package/dist/api/resources/schemas/client/requests/SetPrimaryKeysRequest.d.ts +1 -0
- package/dist/api/resources/schemas/client/requests/UpsertSchemaFieldRequest.d.ts +1 -0
- package/dist/api/resources/users/client/Client.d.ts +44 -16
- package/dist/api/resources/users/client/Client.js +133 -66
- package/dist/api/resources/users/client/requests/CreateUserRequestSchema.d.ts +4 -0
- package/dist/api/resources/users/client/requests/UpdateUserRequestSchema.d.ts +4 -0
- package/dist/api/resources/users/client/requests/UsersCreateApiKeyRequest.d.ts +3 -0
- package/dist/api/resources/webhooks/client/Client.d.ts +67 -21
- package/dist/api/resources/webhooks/client/Client.js +165 -75
- package/dist/api/types/ApiKeyResponse.d.ts +1 -0
- package/dist/api/types/BulkBulkSyncSchedule.d.ts +1 -0
- package/dist/api/types/BulkDiscover.d.ts +1 -1
- package/dist/api/types/BulkExecutionStatus.d.ts +1 -1
- package/dist/api/types/BulkFetchMode.d.ts +1 -1
- package/dist/api/types/BulkNormalizeNames.d.ts +1 -1
- package/dist/api/types/BulkOutputDisposition.d.ts +9 -0
- package/dist/api/types/BulkOutputDisposition.js +11 -0
- package/dist/api/types/BulkResyncMode.d.ts +9 -0
- package/dist/api/types/BulkResyncMode.js +11 -0
- package/dist/api/types/BulkScheduleSyncMode.d.ts +1 -1
- package/dist/api/types/BulkSchema.d.ts +2 -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/BulkSyncDest.d.ts +2 -0
- package/dist/api/types/BulkSyncExecution.d.ts +1 -0
- package/dist/api/types/BulkSyncExecutionStatus.d.ts +3 -0
- package/dist/api/types/BulkSyncIngestionStatus.d.ts +14 -0
- package/dist/api/types/BulkSyncIngestionStatus.js +5 -0
- package/dist/api/types/BulkSyncMode.d.ts +1 -1
- package/dist/api/types/BulkSyncResponse.d.ts +2 -2
- package/dist/api/types/BulkSyncSchemaExecutionStatus.d.ts +7 -0
- package/dist/api/types/BulkSyncSource.d.ts +1 -0
- package/dist/api/types/BulkSyncStatusResponse.d.ts +1 -0
- package/dist/api/types/ConnectCardResponse.d.ts +1 -0
- package/dist/api/types/ConnectionResponseSchema.d.ts +4 -2
- package/dist/api/types/CreateSharedConnectionResponseSchema.d.ts +6 -0
- package/dist/api/types/CreateSharedConnectionResponseSchema.js +5 -0
- package/dist/api/types/Event.d.ts +4 -0
- package/dist/api/types/EventBody.d.ts +1 -1
- 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 +1 -1
- package/dist/api/types/GetIdentityResponseSchema.d.ts +2 -0
- package/dist/api/types/IngestionStatusLevel.d.ts +12 -0
- package/dist/api/types/IngestionStatusLevel.js +11 -0
- package/dist/api/types/JobResponse.d.ts +3 -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/ModelField.d.ts +1 -1
- package/dist/api/types/ModelResponse.d.ts +2 -2
- package/dist/api/types/ModelSyncMode.d.ts +2 -1
- package/dist/api/types/ModelSyncMode.js +1 -0
- package/dist/api/types/ModelSyncResponse.d.ts +2 -2
- package/dist/api/types/ModelSyncSourceMetaResponse.d.ts +3 -0
- package/dist/api/types/Organization.d.ts +5 -0
- package/dist/api/types/{CommonOutputActor.d.ts → OutputActor.d.ts} +1 -1
- package/dist/api/types/OutputActor.js +5 -0
- package/dist/api/types/ScheduleFrequency.d.ts +1 -1
- package/dist/api/types/SchemaIdentityFunction.d.ts +1 -1
- package/dist/api/types/SourceMeta.d.ts +3 -0
- package/dist/api/types/TypesType.d.ts +1 -1
- package/dist/api/types/User.d.ts +6 -0
- package/dist/api/types/UtilFieldType.d.ts +1 -1
- package/dist/api/types/V2CreateSharedConnectionResponseEnvelope.d.ts +7 -0
- package/dist/api/types/V2CreateSharedConnectionResponseEnvelope.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/V3BulkSyncSourceCapabilities.d.ts +6 -0
- package/dist/api/types/V3BulkSyncSourceCapabilities.js +5 -0
- package/dist/api/types/V4BulkSyncExecutionLogs.d.ts +6 -1
- package/dist/api/types/V4BulkSyncScheduleApi.d.ts +5 -0
- package/dist/api/types/V4ExportSyncLogsResponse.d.ts +1 -0
- package/dist/api/types/V4GlobalErrorSubscribersResponse.d.ts +1 -0
- package/dist/api/types/V4RunQueryResult.d.ts +2 -1
- package/dist/api/types/V4UserFieldRequest.d.ts +4 -0
- package/dist/api/types/WorkTaskStatus.d.ts +1 -1
- package/dist/api/types/index.d.ts +13 -6
- package/dist/api/types/index.js +13 -6
- 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 +3 -6
- package/dist/core/fetcher/Fetcher.js +189 -20
- package/dist/core/fetcher/Supplier.d.ts +1 -1
- package/dist/core/fetcher/getHeader.js +2 -1
- package/dist/core/runtime/runtime.d.ts +1 -2
- package/dist/core/runtime/runtime.js +41 -52
- package/dist/environments.d.ts +1 -1
- package/dist/errors/PolytomicError.js +1 -2
- package/dist/errors/PolytomicTimeoutError.d.ts +1 -1
- package/dist/errors/PolytomicTimeoutError.js +2 -2
- package/dist/index.js +7 -17
- package/environments.d.ts +1 -1
- package/errors/PolytomicError.js +1 -2
- package/errors/PolytomicTimeoutError.d.ts +1 -1
- package/errors/PolytomicTimeoutError.js +2 -2
- package/index.js +7 -17
- package/{jest.config.mjs → jest.config.js} +1 -4
- package/package.json +17 -18
- package/core/fetcher/createRequestUrl.d.ts +0 -1
- package/core/fetcher/createRequestUrl.js +0 -12
- package/core/fetcher/getFetchFn.d.ts +0 -4
- package/core/fetcher/getFetchFn.js +0 -68
- package/core/fetcher/getRequestBody.d.ts +0 -7
- package/core/fetcher/getRequestBody.js +0 -23
- package/core/fetcher/getResponseBody.d.ts +0 -1
- package/core/fetcher/getResponseBody.js +0 -54
- package/core/fetcher/makeRequest.d.ts +0 -1
- package/core/fetcher/makeRequest.js +0 -42
- package/core/fetcher/requestWithRetries.d.ts +0 -1
- package/core/fetcher/requestWithRetries.js +0 -40
- package/core/fetcher/signals.d.ts +0 -11
- package/core/fetcher/signals.js +0 -36
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +0 -30
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +0 -247
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -21
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +0 -126
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +0 -31
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +0 -229
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +0 -18
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +0 -59
- package/core/json.d.ts +0 -15
- package/core/json.js +0 -24
- package/dist/core/fetcher/createRequestUrl.d.ts +0 -1
- package/dist/core/fetcher/createRequestUrl.js +0 -12
- package/dist/core/fetcher/getFetchFn.d.ts +0 -4
- package/dist/core/fetcher/getFetchFn.js +0 -68
- package/dist/core/fetcher/getRequestBody.d.ts +0 -7
- package/dist/core/fetcher/getRequestBody.js +0 -23
- package/dist/core/fetcher/getResponseBody.d.ts +0 -1
- package/dist/core/fetcher/getResponseBody.js +0 -54
- package/dist/core/fetcher/makeRequest.d.ts +0 -1
- package/dist/core/fetcher/makeRequest.js +0 -42
- package/dist/core/fetcher/requestWithRetries.d.ts +0 -1
- package/dist/core/fetcher/requestWithRetries.js +0 -40
- package/dist/core/fetcher/signals.d.ts +0 -11
- package/dist/core/fetcher/signals.js +0 -36
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +0 -30
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +0 -247
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -21
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +0 -126
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +0 -31
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +0 -229
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +0 -18
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +0 -59
- package/dist/core/json.d.ts +0 -15
- package/dist/core/json.js +0 -24
- package/dist/version.d.ts +0 -1
- package/reference.md +0 -6547
- package/scripts/rename-to-esm-files.js +0 -115
- package/version.d.ts +0 -1
- /package/api/{types/CommonOutputActor.js → resources/connections/client/requests/ApiRequest.js} +0 -0
- /package/{dist/api/types/CommonOutputActor.js → api/resources/connections/client/requests/GetConnectionTypeParameterValuesRequestSchema.js} +0 -0
|
@@ -7,10 +7,7 @@ import * as Polytomic from "../../../index";
|
|
|
7
7
|
export declare namespace Users {
|
|
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>;
|
|
12
10
|
token: core.Supplier<core.BearerToken>;
|
|
13
|
-
/** Override the X-Polytomic-Version header */
|
|
14
11
|
version?: core.Supplier<string | undefined>;
|
|
15
12
|
}
|
|
16
13
|
interface RequestOptions {
|
|
@@ -22,15 +19,19 @@ export declare namespace Users {
|
|
|
22
19
|
abortSignal?: AbortSignal;
|
|
23
20
|
/** Override the X-Polytomic-Version header */
|
|
24
21
|
version?: string | undefined;
|
|
25
|
-
/** Additional headers to include in the request. */
|
|
26
|
-
headers?: Record<string, string>;
|
|
27
22
|
}
|
|
28
23
|
}
|
|
29
24
|
export declare class Users {
|
|
30
25
|
protected readonly _options: Users.Options;
|
|
31
26
|
constructor(_options: Users.Options);
|
|
32
27
|
/**
|
|
33
|
-
*
|
|
28
|
+
* Lists all users in the specified organization.
|
|
29
|
+
*
|
|
30
|
+
* > 🚧 Requires partner key
|
|
31
|
+
* >
|
|
32
|
+
* > User endpoints are only accessible using [partner keys](../../../../guides/obtaining-api-keys#partner-keys).
|
|
33
|
+
*
|
|
34
|
+
* @param {string} orgId - Unique identifier of the organization whose users should be listed.
|
|
34
35
|
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
35
36
|
*
|
|
36
37
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
@@ -42,7 +43,13 @@ export declare class Users {
|
|
|
42
43
|
*/
|
|
43
44
|
list(orgId: string, requestOptions?: Users.RequestOptions): Promise<Polytomic.ListUsersEnvelope>;
|
|
44
45
|
/**
|
|
45
|
-
*
|
|
46
|
+
* Creates a new user in the specified organization and assigns the requested permissions roles.
|
|
47
|
+
*
|
|
48
|
+
* > 🚧 Requires partner key
|
|
49
|
+
* >
|
|
50
|
+
* > User endpoints are only accessible using [partner keys](../../../../guides/obtaining-api-keys#partner-keys).
|
|
51
|
+
*
|
|
52
|
+
* @param {string} orgId - Unique identifier of the organization the user belongs to.
|
|
46
53
|
* @param {Polytomic.CreateUserRequestSchema} request
|
|
47
54
|
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
48
55
|
*
|
|
@@ -58,8 +65,14 @@ export declare class Users {
|
|
|
58
65
|
*/
|
|
59
66
|
create(orgId: string, request: Polytomic.CreateUserRequestSchema, requestOptions?: Users.RequestOptions): Promise<Polytomic.UserEnvelope>;
|
|
60
67
|
/**
|
|
61
|
-
*
|
|
62
|
-
*
|
|
68
|
+
* Returns a single user in the specified organization.
|
|
69
|
+
*
|
|
70
|
+
* > 🚧 Requires partner key
|
|
71
|
+
* >
|
|
72
|
+
* > User endpoints are only accessible using [partner keys](../../../../../guides/obtaining-api-keys#partner-keys).
|
|
73
|
+
*
|
|
74
|
+
* @param {string} id - Unique identifier of the user.
|
|
75
|
+
* @param {string} orgId - Unique identifier of the organization the user belongs to.
|
|
63
76
|
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
64
77
|
*
|
|
65
78
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
@@ -72,8 +85,14 @@ export declare class Users {
|
|
|
72
85
|
*/
|
|
73
86
|
get(id: string, orgId: string, requestOptions?: Users.RequestOptions): Promise<Polytomic.UserEnvelope>;
|
|
74
87
|
/**
|
|
75
|
-
*
|
|
76
|
-
*
|
|
88
|
+
* Updates a user's assigned permissions roles.
|
|
89
|
+
*
|
|
90
|
+
* > 🚧 Requires partner key
|
|
91
|
+
* >
|
|
92
|
+
* > User endpoints are only accessible using [partner keys](../../../../../guides/obtaining-api-keys#partner-keys).
|
|
93
|
+
*
|
|
94
|
+
* @param {string} id - Unique identifier of the user to update.
|
|
95
|
+
* @param {string} orgId - Unique identifier of the organization the user belongs to.
|
|
77
96
|
* @param {Polytomic.UpdateUserRequestSchema} request
|
|
78
97
|
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
79
98
|
*
|
|
@@ -89,8 +108,14 @@ export declare class Users {
|
|
|
89
108
|
*/
|
|
90
109
|
update(id: string, orgId: string, request: Polytomic.UpdateUserRequestSchema, requestOptions?: Users.RequestOptions): Promise<Polytomic.UserEnvelope>;
|
|
91
110
|
/**
|
|
92
|
-
*
|
|
93
|
-
*
|
|
111
|
+
* Deletes a user from the specified organization.
|
|
112
|
+
*
|
|
113
|
+
* > 🚧 Requires partner key
|
|
114
|
+
* >
|
|
115
|
+
* > User endpoints are only accessible using [partner keys](../../../../../guides/obtaining-api-keys#partner-keys).
|
|
116
|
+
*
|
|
117
|
+
* @param {string} id - Unique identifier of the user.
|
|
118
|
+
* @param {string} orgId - Unique identifier of the organization the user belongs to.
|
|
94
119
|
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
95
120
|
*
|
|
96
121
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
@@ -103,16 +128,19 @@ export declare class Users {
|
|
|
103
128
|
*/
|
|
104
129
|
remove(id: string, orgId: string, requestOptions?: Users.RequestOptions): Promise<Polytomic.UserEnvelope>;
|
|
105
130
|
/**
|
|
131
|
+
* Issues a new API key for the specified user.
|
|
132
|
+
*
|
|
106
133
|
* > 🚧 Requires partner key
|
|
107
134
|
* >
|
|
108
|
-
* > User endpoints are only accessible using [partner keys](
|
|
135
|
+
* > User endpoints are only accessible using [partner keys](../../../../../../guides/obtaining-api-keys#partner-keys).
|
|
109
136
|
*
|
|
110
|
-
* @param {string} orgId
|
|
111
|
-
* @param {string} id
|
|
137
|
+
* @param {string} orgId - Unique identifier of the organization the user belongs to.
|
|
138
|
+
* @param {string} id - Unique identifier of the user the key will be issued for.
|
|
112
139
|
* @param {Polytomic.UsersCreateApiKeyRequest} request
|
|
113
140
|
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
114
141
|
*
|
|
115
142
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
143
|
+
* @throws {@link Polytomic.ForbiddenError}
|
|
116
144
|
* @throws {@link Polytomic.NotFoundError}
|
|
117
145
|
* @throws {@link Polytomic.InternalServerError}
|
|
118
146
|
*
|
|
@@ -18,23 +18,13 @@ 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) ||
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
})();
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
38
28
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
39
29
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
40
30
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -59,7 +49,13 @@ class Users {
|
|
|
59
49
|
this._options = _options;
|
|
60
50
|
}
|
|
61
51
|
/**
|
|
62
|
-
*
|
|
52
|
+
* Lists all users in the specified organization.
|
|
53
|
+
*
|
|
54
|
+
* > 🚧 Requires partner key
|
|
55
|
+
* >
|
|
56
|
+
* > User endpoints are only accessible using [partner keys](../../../../guides/obtaining-api-keys#partner-keys).
|
|
57
|
+
*
|
|
58
|
+
* @param {string} orgId - Unique identifier of the organization whose users should be listed.
|
|
63
59
|
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
64
60
|
*
|
|
65
61
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
@@ -70,16 +66,23 @@ class Users {
|
|
|
70
66
|
* await client.users.list("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
71
67
|
*/
|
|
72
68
|
list(orgId, requestOptions) {
|
|
69
|
+
var _a;
|
|
73
70
|
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
-
var _a, _b;
|
|
75
71
|
const _response = yield core.fetcher({
|
|
76
|
-
url: (0, url_join_1.default)((
|
|
72
|
+
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`),
|
|
77
73
|
method: "GET",
|
|
78
|
-
headers:
|
|
74
|
+
headers: {
|
|
75
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
76
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
79
77
|
? yield core.Supplier.get(this._options.version)
|
|
80
|
-
: undefined,
|
|
78
|
+
: undefined,
|
|
79
|
+
"X-Fern-Language": "JavaScript",
|
|
80
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
81
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
82
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
83
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
84
|
+
},
|
|
81
85
|
contentType: "application/json",
|
|
82
|
-
requestType: "json",
|
|
83
86
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
84
87
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
85
88
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -109,7 +112,7 @@ class Users {
|
|
|
109
112
|
body: _response.error.rawBody,
|
|
110
113
|
});
|
|
111
114
|
case "timeout":
|
|
112
|
-
throw new errors.PolytomicTimeoutError(
|
|
115
|
+
throw new errors.PolytomicTimeoutError();
|
|
113
116
|
case "unknown":
|
|
114
117
|
throw new errors.PolytomicError({
|
|
115
118
|
message: _response.error.errorMessage,
|
|
@@ -118,7 +121,13 @@ class Users {
|
|
|
118
121
|
});
|
|
119
122
|
}
|
|
120
123
|
/**
|
|
121
|
-
*
|
|
124
|
+
* Creates a new user in the specified organization and assigns the requested permissions roles.
|
|
125
|
+
*
|
|
126
|
+
* > 🚧 Requires partner key
|
|
127
|
+
* >
|
|
128
|
+
* > User endpoints are only accessible using [partner keys](../../../../guides/obtaining-api-keys#partner-keys).
|
|
129
|
+
*
|
|
130
|
+
* @param {string} orgId - Unique identifier of the organization the user belongs to.
|
|
122
131
|
* @param {Polytomic.CreateUserRequestSchema} request
|
|
123
132
|
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
124
133
|
*
|
|
@@ -133,16 +142,23 @@ class Users {
|
|
|
133
142
|
* })
|
|
134
143
|
*/
|
|
135
144
|
create(orgId, request, requestOptions) {
|
|
145
|
+
var _a;
|
|
136
146
|
return __awaiter(this, void 0, void 0, function* () {
|
|
137
|
-
var _a, _b;
|
|
138
147
|
const _response = yield core.fetcher({
|
|
139
|
-
url: (0, url_join_1.default)((
|
|
148
|
+
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`),
|
|
140
149
|
method: "POST",
|
|
141
|
-
headers:
|
|
150
|
+
headers: {
|
|
151
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
152
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
142
153
|
? yield core.Supplier.get(this._options.version)
|
|
143
|
-
: undefined,
|
|
154
|
+
: undefined,
|
|
155
|
+
"X-Fern-Language": "JavaScript",
|
|
156
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
157
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
158
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
159
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
160
|
+
},
|
|
144
161
|
contentType: "application/json",
|
|
145
|
-
requestType: "json",
|
|
146
162
|
body: request,
|
|
147
163
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
148
164
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -175,7 +191,7 @@ class Users {
|
|
|
175
191
|
body: _response.error.rawBody,
|
|
176
192
|
});
|
|
177
193
|
case "timeout":
|
|
178
|
-
throw new errors.PolytomicTimeoutError(
|
|
194
|
+
throw new errors.PolytomicTimeoutError();
|
|
179
195
|
case "unknown":
|
|
180
196
|
throw new errors.PolytomicError({
|
|
181
197
|
message: _response.error.errorMessage,
|
|
@@ -184,8 +200,14 @@ class Users {
|
|
|
184
200
|
});
|
|
185
201
|
}
|
|
186
202
|
/**
|
|
187
|
-
*
|
|
188
|
-
*
|
|
203
|
+
* Returns a single user in the specified organization.
|
|
204
|
+
*
|
|
205
|
+
* > 🚧 Requires partner key
|
|
206
|
+
* >
|
|
207
|
+
* > User endpoints are only accessible using [partner keys](../../../../../guides/obtaining-api-keys#partner-keys).
|
|
208
|
+
*
|
|
209
|
+
* @param {string} id - Unique identifier of the user.
|
|
210
|
+
* @param {string} orgId - Unique identifier of the organization the user belongs to.
|
|
189
211
|
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
190
212
|
*
|
|
191
213
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
@@ -197,16 +219,23 @@ class Users {
|
|
|
197
219
|
* await client.users.get("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
198
220
|
*/
|
|
199
221
|
get(id, orgId, requestOptions) {
|
|
222
|
+
var _a;
|
|
200
223
|
return __awaiter(this, void 0, void 0, function* () {
|
|
201
|
-
var _a, _b;
|
|
202
224
|
const _response = yield core.fetcher({
|
|
203
|
-
url: (0, url_join_1.default)((
|
|
225
|
+
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)}`),
|
|
204
226
|
method: "GET",
|
|
205
|
-
headers:
|
|
227
|
+
headers: {
|
|
228
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
229
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
206
230
|
? yield core.Supplier.get(this._options.version)
|
|
207
|
-
: undefined,
|
|
231
|
+
: undefined,
|
|
232
|
+
"X-Fern-Language": "JavaScript",
|
|
233
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
234
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
235
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
236
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
237
|
+
},
|
|
208
238
|
contentType: "application/json",
|
|
209
|
-
requestType: "json",
|
|
210
239
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
211
240
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
212
241
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -238,7 +267,7 @@ class Users {
|
|
|
238
267
|
body: _response.error.rawBody,
|
|
239
268
|
});
|
|
240
269
|
case "timeout":
|
|
241
|
-
throw new errors.PolytomicTimeoutError(
|
|
270
|
+
throw new errors.PolytomicTimeoutError();
|
|
242
271
|
case "unknown":
|
|
243
272
|
throw new errors.PolytomicError({
|
|
244
273
|
message: _response.error.errorMessage,
|
|
@@ -247,8 +276,14 @@ class Users {
|
|
|
247
276
|
});
|
|
248
277
|
}
|
|
249
278
|
/**
|
|
250
|
-
*
|
|
251
|
-
*
|
|
279
|
+
* Updates a user's assigned permissions roles.
|
|
280
|
+
*
|
|
281
|
+
* > 🚧 Requires partner key
|
|
282
|
+
* >
|
|
283
|
+
* > User endpoints are only accessible using [partner keys](../../../../../guides/obtaining-api-keys#partner-keys).
|
|
284
|
+
*
|
|
285
|
+
* @param {string} id - Unique identifier of the user to update.
|
|
286
|
+
* @param {string} orgId - Unique identifier of the organization the user belongs to.
|
|
252
287
|
* @param {Polytomic.UpdateUserRequestSchema} request
|
|
253
288
|
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
254
289
|
*
|
|
@@ -263,16 +298,23 @@ class Users {
|
|
|
263
298
|
* })
|
|
264
299
|
*/
|
|
265
300
|
update(id, orgId, request, requestOptions) {
|
|
301
|
+
var _a;
|
|
266
302
|
return __awaiter(this, void 0, void 0, function* () {
|
|
267
|
-
var _a, _b;
|
|
268
303
|
const _response = yield core.fetcher({
|
|
269
|
-
url: (0, url_join_1.default)((
|
|
304
|
+
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)}`),
|
|
270
305
|
method: "PUT",
|
|
271
|
-
headers:
|
|
306
|
+
headers: {
|
|
307
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
308
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
272
309
|
? yield core.Supplier.get(this._options.version)
|
|
273
|
-
: undefined,
|
|
310
|
+
: undefined,
|
|
311
|
+
"X-Fern-Language": "JavaScript",
|
|
312
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
313
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
314
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
315
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
316
|
+
},
|
|
274
317
|
contentType: "application/json",
|
|
275
|
-
requestType: "json",
|
|
276
318
|
body: request,
|
|
277
319
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
278
320
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -305,7 +347,7 @@ class Users {
|
|
|
305
347
|
body: _response.error.rawBody,
|
|
306
348
|
});
|
|
307
349
|
case "timeout":
|
|
308
|
-
throw new errors.PolytomicTimeoutError(
|
|
350
|
+
throw new errors.PolytomicTimeoutError();
|
|
309
351
|
case "unknown":
|
|
310
352
|
throw new errors.PolytomicError({
|
|
311
353
|
message: _response.error.errorMessage,
|
|
@@ -314,8 +356,14 @@ class Users {
|
|
|
314
356
|
});
|
|
315
357
|
}
|
|
316
358
|
/**
|
|
317
|
-
*
|
|
318
|
-
*
|
|
359
|
+
* Deletes a user from the specified organization.
|
|
360
|
+
*
|
|
361
|
+
* > 🚧 Requires partner key
|
|
362
|
+
* >
|
|
363
|
+
* > User endpoints are only accessible using [partner keys](../../../../../guides/obtaining-api-keys#partner-keys).
|
|
364
|
+
*
|
|
365
|
+
* @param {string} id - Unique identifier of the user.
|
|
366
|
+
* @param {string} orgId - Unique identifier of the organization the user belongs to.
|
|
319
367
|
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
320
368
|
*
|
|
321
369
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
@@ -327,16 +375,23 @@ class Users {
|
|
|
327
375
|
* await client.users.remove("248df4b7-aa70-47b8-a036-33ac447e668d", "248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
328
376
|
*/
|
|
329
377
|
remove(id, orgId, requestOptions) {
|
|
378
|
+
var _a;
|
|
330
379
|
return __awaiter(this, void 0, void 0, function* () {
|
|
331
|
-
var _a, _b;
|
|
332
380
|
const _response = yield core.fetcher({
|
|
333
|
-
url: (0, url_join_1.default)((
|
|
381
|
+
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)}`),
|
|
334
382
|
method: "DELETE",
|
|
335
|
-
headers:
|
|
383
|
+
headers: {
|
|
384
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
385
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
336
386
|
? yield core.Supplier.get(this._options.version)
|
|
337
|
-
: undefined,
|
|
387
|
+
: undefined,
|
|
388
|
+
"X-Fern-Language": "JavaScript",
|
|
389
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
390
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
391
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
392
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
393
|
+
},
|
|
338
394
|
contentType: "application/json",
|
|
339
|
-
requestType: "json",
|
|
340
395
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
341
396
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
342
397
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -368,7 +423,7 @@ class Users {
|
|
|
368
423
|
body: _response.error.rawBody,
|
|
369
424
|
});
|
|
370
425
|
case "timeout":
|
|
371
|
-
throw new errors.PolytomicTimeoutError(
|
|
426
|
+
throw new errors.PolytomicTimeoutError();
|
|
372
427
|
case "unknown":
|
|
373
428
|
throw new errors.PolytomicError({
|
|
374
429
|
message: _response.error.errorMessage,
|
|
@@ -377,16 +432,19 @@ class Users {
|
|
|
377
432
|
});
|
|
378
433
|
}
|
|
379
434
|
/**
|
|
435
|
+
* Issues a new API key for the specified user.
|
|
436
|
+
*
|
|
380
437
|
* > 🚧 Requires partner key
|
|
381
438
|
* >
|
|
382
|
-
* > User endpoints are only accessible using [partner keys](
|
|
439
|
+
* > User endpoints are only accessible using [partner keys](../../../../../../guides/obtaining-api-keys#partner-keys).
|
|
383
440
|
*
|
|
384
|
-
* @param {string} orgId
|
|
385
|
-
* @param {string} id
|
|
441
|
+
* @param {string} orgId - Unique identifier of the organization the user belongs to.
|
|
442
|
+
* @param {string} id - Unique identifier of the user the key will be issued for.
|
|
386
443
|
* @param {Polytomic.UsersCreateApiKeyRequest} request
|
|
387
444
|
* @param {Users.RequestOptions} requestOptions - Request-specific configuration.
|
|
388
445
|
*
|
|
389
446
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
447
|
+
* @throws {@link Polytomic.ForbiddenError}
|
|
390
448
|
* @throws {@link Polytomic.NotFoundError}
|
|
391
449
|
* @throws {@link Polytomic.InternalServerError}
|
|
392
450
|
*
|
|
@@ -395,23 +453,30 @@ class Users {
|
|
|
395
453
|
* force: true
|
|
396
454
|
* })
|
|
397
455
|
*/
|
|
398
|
-
createApiKey(
|
|
399
|
-
|
|
400
|
-
|
|
456
|
+
createApiKey(orgId, id, request = {}, requestOptions) {
|
|
457
|
+
var _a;
|
|
458
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
401
459
|
const { force } = request;
|
|
402
460
|
const _queryParams = {};
|
|
403
461
|
if (force != null) {
|
|
404
462
|
_queryParams["force"] = force.toString();
|
|
405
463
|
}
|
|
406
464
|
const _response = yield core.fetcher({
|
|
407
|
-
url: (0, url_join_1.default)((
|
|
465
|
+
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`),
|
|
408
466
|
method: "POST",
|
|
409
|
-
headers:
|
|
467
|
+
headers: {
|
|
468
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
469
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
410
470
|
? yield core.Supplier.get(this._options.version)
|
|
411
|
-
: undefined,
|
|
471
|
+
: undefined,
|
|
472
|
+
"X-Fern-Language": "JavaScript",
|
|
473
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
474
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
475
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
476
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
477
|
+
},
|
|
412
478
|
contentType: "application/json",
|
|
413
479
|
queryParameters: _queryParams,
|
|
414
|
-
requestType: "json",
|
|
415
480
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
416
481
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
417
482
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -423,6 +488,8 @@ class Users {
|
|
|
423
488
|
switch (_response.error.statusCode) {
|
|
424
489
|
case 401:
|
|
425
490
|
throw new Polytomic.UnauthorizedError(_response.error.body);
|
|
491
|
+
case 403:
|
|
492
|
+
throw new Polytomic.ForbiddenError(_response.error.body);
|
|
426
493
|
case 404:
|
|
427
494
|
throw new Polytomic.NotFoundError(_response.error.body);
|
|
428
495
|
case 500:
|
|
@@ -441,7 +508,7 @@ class Users {
|
|
|
441
508
|
body: _response.error.rawBody,
|
|
442
509
|
});
|
|
443
510
|
case "timeout":
|
|
444
|
-
throw new errors.PolytomicTimeoutError(
|
|
511
|
+
throw new errors.PolytomicTimeoutError();
|
|
445
512
|
case "unknown":
|
|
446
513
|
throw new errors.PolytomicError({
|
|
447
514
|
message: _response.error.errorMessage,
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
* }
|
|
9
9
|
*/
|
|
10
10
|
export interface CreateUserRequestSchema {
|
|
11
|
+
/** Email address used to sign the user in and receive notifications. */
|
|
11
12
|
email: string;
|
|
13
|
+
/** Deprecated legacy role name. Use role_ids instead; setting both role and role_ids in the same request is rejected. */
|
|
12
14
|
role?: string;
|
|
15
|
+
/** Identifiers of the permissions roles to assign to the user. Must contain at least one entry when provided. */
|
|
16
|
+
role_ids?: string[];
|
|
13
17
|
}
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
* }
|
|
9
9
|
*/
|
|
10
10
|
export interface UpdateUserRequestSchema {
|
|
11
|
+
/** Email address used to sign the user in and receive notifications. */
|
|
11
12
|
email: string;
|
|
13
|
+
/** Deprecated legacy role name. Use role_ids instead; setting both role and role_ids in the same request is rejected. */
|
|
12
14
|
role?: string;
|
|
15
|
+
/** Identifiers of the permissions roles to assign to the user. Must contain at least one entry when provided. */
|
|
16
|
+
role_ids?: string[];
|
|
13
17
|
}
|