polytomic 1.16.1 → 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 +134 -18
- package/api/resources/connections/client/Client.js +359 -104
- package/api/resources/connections/client/requests/ApiRequest.d.ts +2 -2
- 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 +3 -0
- package/api/resources/users/client/requests/UpdateUserRequestSchema.d.ts +3 -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/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 +2 -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/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 +5 -0
- package/api/types/UtilFieldType.d.ts +1 -1
- 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/{dist/version.js → api/types/V3BulkSyncSourceCapabilities.js} +3 -2
- 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 +11 -6
- package/api/types/index.js +11 -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 +134 -18
- package/dist/api/resources/connections/client/Client.js +359 -104
- package/dist/api/resources/connections/client/requests/ApiRequest.d.ts +2 -2
- 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 +3 -0
- package/dist/api/resources/users/client/requests/UpdateUserRequestSchema.d.ts +3 -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/{version.js → dist/api/types/BulkSyncIngestionStatus.js} +3 -2
- 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 +2 -2
- 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 +5 -0
- package/dist/api/types/UtilFieldType.d.ts +1 -1
- 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 +11 -6
- package/dist/api/types/index.js +11 -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 -6663
- package/scripts/rename-to-esm-files.js +0 -115
- package/version.d.ts +0 -1
- /package/api/types/{CommonOutputActor.js → BulkSyncIngestionStatus.js} +0 -0
- /package/{dist/api/types/CommonOutputActor.js → api/types/OutputActor.js} +0 -0
|
@@ -8,10 +8,7 @@ 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>;
|
|
13
11
|
token: core.Supplier<core.BearerToken>;
|
|
14
|
-
/** Override the X-Polytomic-Version header */
|
|
15
12
|
version?: core.Supplier<string | undefined>;
|
|
16
13
|
}
|
|
17
14
|
interface RequestOptions {
|
|
@@ -23,15 +20,13 @@ export declare namespace Permissions {
|
|
|
23
20
|
abortSignal?: AbortSignal;
|
|
24
21
|
/** Override the X-Polytomic-Version header */
|
|
25
22
|
version?: string | undefined;
|
|
26
|
-
/** Additional headers to include in the request. */
|
|
27
|
-
headers?: Record<string, string>;
|
|
28
23
|
}
|
|
29
24
|
}
|
|
30
25
|
export declare class Permissions {
|
|
31
26
|
protected readonly _options: Permissions.Options;
|
|
32
|
-
protected _policies: Policies | undefined;
|
|
33
|
-
protected _roles: Roles | undefined;
|
|
34
27
|
constructor(_options: Permissions.Options);
|
|
28
|
+
protected _policies: Policies | undefined;
|
|
35
29
|
get policies(): Policies;
|
|
30
|
+
protected _roles: Roles | undefined;
|
|
36
31
|
get roles(): Roles;
|
|
37
32
|
}
|
|
@@ -15,23 +15,13 @@ 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) ||
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
})();
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
35
25
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
36
26
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
27
|
};
|
|
@@ -7,10 +7,7 @@ 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>;
|
|
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,14 +19,20 @@ export declare namespace Policies {
|
|
|
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 Policies {
|
|
30
25
|
protected readonly _options: Policies.Options;
|
|
31
26
|
constructor(_options: Policies.Options);
|
|
32
27
|
/**
|
|
28
|
+
* Lists all policies in the caller's organization.
|
|
29
|
+
*
|
|
30
|
+
* Each policy binds one or more roles to a set of resources, controlling what
|
|
31
|
+
* actions members with those roles can perform on those resources.
|
|
32
|
+
*
|
|
33
|
+
* To inspect a specific policy in detail, use
|
|
34
|
+
* [`GET /api/permissions/policies/{id}`](../../../api-reference/permissions/policies/get).
|
|
35
|
+
*
|
|
33
36
|
* @param {Policies.RequestOptions} requestOptions - Request-specific configuration.
|
|
34
37
|
*
|
|
35
38
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
@@ -40,6 +43,13 @@ export declare class Policies {
|
|
|
40
43
|
*/
|
|
41
44
|
list(requestOptions?: Policies.RequestOptions): Promise<Polytomic.ListPoliciesResponseEnvelope>;
|
|
42
45
|
/**
|
|
46
|
+
* Creates a new policy.
|
|
47
|
+
*
|
|
48
|
+
* A policy binds one or more roles to a set of resources, granting members who
|
|
49
|
+
* hold those roles the actions defined by them. Roles must already exist before
|
|
50
|
+
* they are referenced in a policy; create roles using
|
|
51
|
+
* [`POST /api/permissions/roles`](../../../api-reference/permissions/roles/create).
|
|
52
|
+
*
|
|
43
53
|
* @param {Polytomic.permissions.CreatePolicyRequest} request
|
|
44
54
|
* @param {Policies.RequestOptions} requestOptions - Request-specific configuration.
|
|
45
55
|
*
|
|
@@ -56,6 +66,11 @@ export declare class Policies {
|
|
|
56
66
|
*/
|
|
57
67
|
create(request: Polytomic.permissions.CreatePolicyRequest, requestOptions?: Policies.RequestOptions): Promise<Polytomic.PolicyResponseEnvelope>;
|
|
58
68
|
/**
|
|
69
|
+
* Returns a single policy by ID, including all action/role bindings it defines.
|
|
70
|
+
*
|
|
71
|
+
* Returns the full set of action/role bindings defined by the policy, including
|
|
72
|
+
* the resources it applies to.
|
|
73
|
+
*
|
|
59
74
|
* @param {string} id
|
|
60
75
|
* @param {Policies.RequestOptions} requestOptions - Request-specific configuration.
|
|
61
76
|
*
|
|
@@ -68,6 +83,14 @@ export declare class Policies {
|
|
|
68
83
|
*/
|
|
69
84
|
get(id: string, requestOptions?: Policies.RequestOptions): Promise<Polytomic.PolicyResponseEnvelope>;
|
|
70
85
|
/**
|
|
86
|
+
* Updates an existing policy.
|
|
87
|
+
*
|
|
88
|
+
* The update is a **full replacement** of the policy's bindings. Any role or
|
|
89
|
+
* resource binding not included in the request body is removed. To make a
|
|
90
|
+
* partial change, fetch the current policy with
|
|
91
|
+
* [`GET /api/permissions/policies/{id}`](../../../../api-reference/permissions/policies/get), modify the relevant bindings,
|
|
92
|
+
* and send the complete object back.
|
|
93
|
+
*
|
|
71
94
|
* @param {string} id
|
|
72
95
|
* @param {Polytomic.permissions.UpdatePolicyRequest} request
|
|
73
96
|
* @param {Policies.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -85,6 +108,11 @@ export declare class Policies {
|
|
|
85
108
|
*/
|
|
86
109
|
update(id: string, request: Polytomic.permissions.UpdatePolicyRequest, requestOptions?: Policies.RequestOptions): Promise<Polytomic.PolicyResponseEnvelope>;
|
|
87
110
|
/**
|
|
111
|
+
* Deletes a policy.
|
|
112
|
+
*
|
|
113
|
+
* Deletion is permanent. Any access that was granted solely through this policy
|
|
114
|
+
* is revoked immediately for all users who depended on it.
|
|
115
|
+
*
|
|
88
116
|
* @param {string} id
|
|
89
117
|
* @param {Policies.RequestOptions} requestOptions - Request-specific configuration.
|
|
90
118
|
*
|
|
@@ -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,6 +49,14 @@ class Policies {
|
|
|
59
49
|
this._options = _options;
|
|
60
50
|
}
|
|
61
51
|
/**
|
|
52
|
+
* Lists all policies in the caller's organization.
|
|
53
|
+
*
|
|
54
|
+
* Each policy binds one or more roles to a set of resources, controlling what
|
|
55
|
+
* actions members with those roles can perform on those resources.
|
|
56
|
+
*
|
|
57
|
+
* To inspect a specific policy in detail, use
|
|
58
|
+
* [`GET /api/permissions/policies/{id}`](../../../api-reference/permissions/policies/get).
|
|
59
|
+
*
|
|
62
60
|
* @param {Policies.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
61
|
*
|
|
64
62
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
@@ -68,16 +66,23 @@ class Policies {
|
|
|
68
66
|
* await client.permissions.policies.list()
|
|
69
67
|
*/
|
|
70
68
|
list(requestOptions) {
|
|
69
|
+
var _a;
|
|
71
70
|
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
-
var _a, _b;
|
|
73
71
|
const _response = yield core.fetcher({
|
|
74
|
-
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/permissions/policies"),
|
|
75
73
|
method: "GET",
|
|
76
|
-
headers:
|
|
74
|
+
headers: {
|
|
75
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
76
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
77
77
|
? yield core.Supplier.get(this._options.version)
|
|
78
|
-
: 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
|
+
},
|
|
79
85
|
contentType: "application/json",
|
|
80
|
-
requestType: "json",
|
|
81
86
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
82
87
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
83
88
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -105,7 +110,7 @@ class Policies {
|
|
|
105
110
|
body: _response.error.rawBody,
|
|
106
111
|
});
|
|
107
112
|
case "timeout":
|
|
108
|
-
throw new errors.PolytomicTimeoutError(
|
|
113
|
+
throw new errors.PolytomicTimeoutError();
|
|
109
114
|
case "unknown":
|
|
110
115
|
throw new errors.PolytomicError({
|
|
111
116
|
message: _response.error.errorMessage,
|
|
@@ -114,6 +119,13 @@ class Policies {
|
|
|
114
119
|
});
|
|
115
120
|
}
|
|
116
121
|
/**
|
|
122
|
+
* Creates a new policy.
|
|
123
|
+
*
|
|
124
|
+
* A policy binds one or more roles to a set of resources, granting members who
|
|
125
|
+
* hold those roles the actions defined by them. Roles must already exist before
|
|
126
|
+
* they are referenced in a policy; create roles using
|
|
127
|
+
* [`POST /api/permissions/roles`](../../../api-reference/permissions/roles/create).
|
|
128
|
+
*
|
|
117
129
|
* @param {Polytomic.permissions.CreatePolicyRequest} request
|
|
118
130
|
* @param {Policies.RequestOptions} requestOptions - Request-specific configuration.
|
|
119
131
|
*
|
|
@@ -129,16 +141,23 @@ class Policies {
|
|
|
129
141
|
* })
|
|
130
142
|
*/
|
|
131
143
|
create(request, requestOptions) {
|
|
144
|
+
var _a;
|
|
132
145
|
return __awaiter(this, void 0, void 0, function* () {
|
|
133
|
-
var _a, _b;
|
|
134
146
|
const _response = yield core.fetcher({
|
|
135
|
-
url: (0, url_join_1.default)((
|
|
147
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/permissions/policies"),
|
|
136
148
|
method: "POST",
|
|
137
|
-
headers:
|
|
149
|
+
headers: {
|
|
150
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
151
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
138
152
|
? yield core.Supplier.get(this._options.version)
|
|
139
|
-
: undefined,
|
|
153
|
+
: undefined,
|
|
154
|
+
"X-Fern-Language": "JavaScript",
|
|
155
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
156
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
157
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
158
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
159
|
+
},
|
|
140
160
|
contentType: "application/json",
|
|
141
|
-
requestType: "json",
|
|
142
161
|
body: request,
|
|
143
162
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
144
163
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -173,7 +192,7 @@ class Policies {
|
|
|
173
192
|
body: _response.error.rawBody,
|
|
174
193
|
});
|
|
175
194
|
case "timeout":
|
|
176
|
-
throw new errors.PolytomicTimeoutError(
|
|
195
|
+
throw new errors.PolytomicTimeoutError();
|
|
177
196
|
case "unknown":
|
|
178
197
|
throw new errors.PolytomicError({
|
|
179
198
|
message: _response.error.errorMessage,
|
|
@@ -182,6 +201,11 @@ class Policies {
|
|
|
182
201
|
});
|
|
183
202
|
}
|
|
184
203
|
/**
|
|
204
|
+
* Returns a single policy by ID, including all action/role bindings it defines.
|
|
205
|
+
*
|
|
206
|
+
* Returns the full set of action/role bindings defined by the policy, including
|
|
207
|
+
* the resources it applies to.
|
|
208
|
+
*
|
|
185
209
|
* @param {string} id
|
|
186
210
|
* @param {Policies.RequestOptions} requestOptions - Request-specific configuration.
|
|
187
211
|
*
|
|
@@ -193,16 +217,23 @@ class Policies {
|
|
|
193
217
|
* await client.permissions.policies.get("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
194
218
|
*/
|
|
195
219
|
get(id, requestOptions) {
|
|
220
|
+
var _a;
|
|
196
221
|
return __awaiter(this, void 0, void 0, function* () {
|
|
197
|
-
var _a, _b;
|
|
198
222
|
const _response = yield core.fetcher({
|
|
199
|
-
url: (0, url_join_1.default)((
|
|
223
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/permissions/policies/${encodeURIComponent(id)}`),
|
|
200
224
|
method: "GET",
|
|
201
|
-
headers:
|
|
225
|
+
headers: {
|
|
226
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
227
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
202
228
|
? yield core.Supplier.get(this._options.version)
|
|
203
|
-
: undefined,
|
|
229
|
+
: undefined,
|
|
230
|
+
"X-Fern-Language": "JavaScript",
|
|
231
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
232
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
233
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
234
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
235
|
+
},
|
|
204
236
|
contentType: "application/json",
|
|
205
|
-
requestType: "json",
|
|
206
237
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
207
238
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
208
239
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -232,7 +263,7 @@ class Policies {
|
|
|
232
263
|
body: _response.error.rawBody,
|
|
233
264
|
});
|
|
234
265
|
case "timeout":
|
|
235
|
-
throw new errors.PolytomicTimeoutError(
|
|
266
|
+
throw new errors.PolytomicTimeoutError();
|
|
236
267
|
case "unknown":
|
|
237
268
|
throw new errors.PolytomicError({
|
|
238
269
|
message: _response.error.errorMessage,
|
|
@@ -241,6 +272,14 @@ class Policies {
|
|
|
241
272
|
});
|
|
242
273
|
}
|
|
243
274
|
/**
|
|
275
|
+
* Updates an existing policy.
|
|
276
|
+
*
|
|
277
|
+
* The update is a **full replacement** of the policy's bindings. Any role or
|
|
278
|
+
* resource binding not included in the request body is removed. To make a
|
|
279
|
+
* partial change, fetch the current policy with
|
|
280
|
+
* [`GET /api/permissions/policies/{id}`](../../../../api-reference/permissions/policies/get), modify the relevant bindings,
|
|
281
|
+
* and send the complete object back.
|
|
282
|
+
*
|
|
244
283
|
* @param {string} id
|
|
245
284
|
* @param {Polytomic.permissions.UpdatePolicyRequest} request
|
|
246
285
|
* @param {Policies.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -257,16 +296,23 @@ class Policies {
|
|
|
257
296
|
* })
|
|
258
297
|
*/
|
|
259
298
|
update(id, request, requestOptions) {
|
|
299
|
+
var _a;
|
|
260
300
|
return __awaiter(this, void 0, void 0, function* () {
|
|
261
|
-
var _a, _b;
|
|
262
301
|
const _response = yield core.fetcher({
|
|
263
|
-
url: (0, url_join_1.default)((
|
|
302
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/permissions/policies/${encodeURIComponent(id)}`),
|
|
264
303
|
method: "PUT",
|
|
265
|
-
headers:
|
|
304
|
+
headers: {
|
|
305
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
306
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
266
307
|
? yield core.Supplier.get(this._options.version)
|
|
267
|
-
: undefined,
|
|
308
|
+
: undefined,
|
|
309
|
+
"X-Fern-Language": "JavaScript",
|
|
310
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
311
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
312
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
313
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
314
|
+
},
|
|
268
315
|
contentType: "application/json",
|
|
269
|
-
requestType: "json",
|
|
270
316
|
body: request,
|
|
271
317
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
272
318
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -301,7 +347,7 @@ class Policies {
|
|
|
301
347
|
body: _response.error.rawBody,
|
|
302
348
|
});
|
|
303
349
|
case "timeout":
|
|
304
|
-
throw new errors.PolytomicTimeoutError(
|
|
350
|
+
throw new errors.PolytomicTimeoutError();
|
|
305
351
|
case "unknown":
|
|
306
352
|
throw new errors.PolytomicError({
|
|
307
353
|
message: _response.error.errorMessage,
|
|
@@ -310,6 +356,11 @@ class Policies {
|
|
|
310
356
|
});
|
|
311
357
|
}
|
|
312
358
|
/**
|
|
359
|
+
* Deletes a policy.
|
|
360
|
+
*
|
|
361
|
+
* Deletion is permanent. Any access that was granted solely through this policy
|
|
362
|
+
* is revoked immediately for all users who depended on it.
|
|
363
|
+
*
|
|
313
364
|
* @param {string} id
|
|
314
365
|
* @param {Policies.RequestOptions} requestOptions - Request-specific configuration.
|
|
315
366
|
*
|
|
@@ -322,16 +373,23 @@ class Policies {
|
|
|
322
373
|
* await client.permissions.policies.remove("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
323
374
|
*/
|
|
324
375
|
remove(id, requestOptions) {
|
|
376
|
+
var _a;
|
|
325
377
|
return __awaiter(this, void 0, void 0, function* () {
|
|
326
|
-
var _a, _b;
|
|
327
378
|
const _response = yield core.fetcher({
|
|
328
|
-
url: (0, url_join_1.default)((
|
|
379
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/permissions/policies/${encodeURIComponent(id)}`),
|
|
329
380
|
method: "DELETE",
|
|
330
|
-
headers:
|
|
381
|
+
headers: {
|
|
382
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
383
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
331
384
|
? yield core.Supplier.get(this._options.version)
|
|
332
|
-
: undefined,
|
|
385
|
+
: undefined,
|
|
386
|
+
"X-Fern-Language": "JavaScript",
|
|
387
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
388
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
389
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
390
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
391
|
+
},
|
|
333
392
|
contentType: "application/json",
|
|
334
|
-
requestType: "json",
|
|
335
393
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
336
394
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
337
395
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -363,7 +421,7 @@ class Policies {
|
|
|
363
421
|
body: _response.error.rawBody,
|
|
364
422
|
});
|
|
365
423
|
case "timeout":
|
|
366
|
-
throw new errors.PolytomicTimeoutError(
|
|
424
|
+
throw new errors.PolytomicTimeoutError();
|
|
367
425
|
case "unknown":
|
|
368
426
|
throw new errors.PolytomicError({
|
|
369
427
|
message: _response.error.errorMessage,
|
|
@@ -7,10 +7,7 @@ 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>;
|
|
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,14 +19,21 @@ export declare namespace Roles {
|
|
|
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 Roles {
|
|
30
25
|
protected readonly _options: Roles.Options;
|
|
31
26
|
constructor(_options: Roles.Options);
|
|
32
27
|
/**
|
|
28
|
+
* Lists all permissions roles available in the caller's organization, including built-in system roles.
|
|
29
|
+
*
|
|
30
|
+
* System roles such as Admin and Member are always present in every organization
|
|
31
|
+
* and cannot be modified or deleted. Custom roles appear alongside them and can
|
|
32
|
+
* be created, updated, or removed as needed.
|
|
33
|
+
*
|
|
34
|
+
* To inspect or modify a specific role, use
|
|
35
|
+
* [`GET /api/permissions/roles/{id}`](../../../api-reference/permissions/roles/get).
|
|
36
|
+
*
|
|
33
37
|
* @param {Roles.RequestOptions} requestOptions - Request-specific configuration.
|
|
34
38
|
*
|
|
35
39
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
@@ -40,6 +44,14 @@ export declare class Roles {
|
|
|
40
44
|
*/
|
|
41
45
|
list(requestOptions?: Roles.RequestOptions): Promise<Polytomic.RoleListResponseEnvelope>;
|
|
42
46
|
/**
|
|
47
|
+
* Creates a new permissions role.
|
|
48
|
+
*
|
|
49
|
+
* Provide a `name` for the new role. The role is immediately available for use
|
|
50
|
+
* in permission policies.
|
|
51
|
+
*
|
|
52
|
+
* To attach the role to resources, create or update a policy using
|
|
53
|
+
* [`POST /api/permissions/policies`](../../../api-reference/permissions/policies/create).
|
|
54
|
+
*
|
|
43
55
|
* @param {Polytomic.permissions.CreateRoleRequest} request
|
|
44
56
|
* @param {Roles.RequestOptions} requestOptions - Request-specific configuration.
|
|
45
57
|
*
|
|
@@ -56,6 +68,10 @@ export declare class Roles {
|
|
|
56
68
|
*/
|
|
57
69
|
create(request: Polytomic.permissions.CreateRoleRequest, requestOptions?: Roles.RequestOptions): Promise<Polytomic.RoleResponseEnvelope>;
|
|
58
70
|
/**
|
|
71
|
+
* Returns a single permissions role by ID.
|
|
72
|
+
*
|
|
73
|
+
* Returns the role's name, action set, and whether it is a built-in system role.
|
|
74
|
+
*
|
|
59
75
|
* @param {string} id
|
|
60
76
|
* @param {Roles.RequestOptions} requestOptions - Request-specific configuration.
|
|
61
77
|
*
|
|
@@ -67,6 +83,13 @@ export declare class Roles {
|
|
|
67
83
|
*/
|
|
68
84
|
get(id: string, requestOptions?: Roles.RequestOptions): Promise<Polytomic.RoleResponseEnvelope>;
|
|
69
85
|
/**
|
|
86
|
+
* Updates an existing permissions role's name and action set.
|
|
87
|
+
*
|
|
88
|
+
* The update is a **full replacement** of the role definition.
|
|
89
|
+
*
|
|
90
|
+
* > 🚧 Built-in system roles (such as Admin and Member) cannot be updated.
|
|
91
|
+
* > Attempting to modify a system role returns an error.
|
|
92
|
+
*
|
|
70
93
|
* @param {string} id
|
|
71
94
|
* @param {Polytomic.permissions.UpdateRoleRequest} request
|
|
72
95
|
* @param {Roles.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -84,6 +107,16 @@ export declare class Roles {
|
|
|
84
107
|
*/
|
|
85
108
|
update(id: string, request: Polytomic.permissions.UpdateRoleRequest, requestOptions?: Roles.RequestOptions): Promise<Polytomic.RoleResponseEnvelope>;
|
|
86
109
|
/**
|
|
110
|
+
* Deletes a permissions role.
|
|
111
|
+
*
|
|
112
|
+
* > 🚧 Built-in system roles (such as Admin and Member) cannot be deleted.
|
|
113
|
+
* > Attempting to delete a system role returns an error.
|
|
114
|
+
*
|
|
115
|
+
* Deleting a role does not automatically remove it from any policies that
|
|
116
|
+
* reference it. Update those policies separately using
|
|
117
|
+
* [`PUT /api/permissions/policies/{id}`](../../../../api-reference/permissions/policies/update) to avoid
|
|
118
|
+
* leaving stale role references.
|
|
119
|
+
*
|
|
87
120
|
* @param {string} id
|
|
88
121
|
* @param {Roles.RequestOptions} requestOptions - Request-specific configuration.
|
|
89
122
|
*
|