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
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* @example
|
|
6
6
|
* {
|
|
7
|
-
*
|
|
7
|
+
* child_organization_id: "248df4b7-aa70-47b8-a036-33ac447e668d"
|
|
8
8
|
* }
|
|
9
9
|
*/
|
|
10
10
|
export interface ApiRequest {
|
|
11
|
+
child_organization_id: string;
|
|
11
12
|
name?: string;
|
|
12
|
-
organization_id: string;
|
|
13
13
|
}
|
|
@@ -7,10 +7,7 @@ import * as Polytomic from "../../../index";
|
|
|
7
7
|
export declare namespace Events {
|
|
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,25 @@ export declare namespace Events {
|
|
|
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 Events {
|
|
30
25
|
protected readonly _options: Events.Options;
|
|
31
26
|
constructor(_options: Events.Options);
|
|
32
27
|
/**
|
|
28
|
+
* Lists audit events for the caller's organization.
|
|
29
|
+
*
|
|
30
|
+
* Results are paginated. If more events are available, the response includes
|
|
31
|
+
* `pagination.next_page_token`; pass that token back unchanged to continue from
|
|
32
|
+
* the last item you received.
|
|
33
|
+
*
|
|
34
|
+
* Filter by event type using the `event_type` query parameter. Pass one of the
|
|
35
|
+
* identifiers returned by [`GET /api/events_types`](../../api-reference/events/get-types) to
|
|
36
|
+
* narrow results to a specific category of activity.
|
|
37
|
+
*
|
|
38
|
+
* > 📘 Events reflect audit activity scoped to the caller's organization.
|
|
39
|
+
* > The log captures both user-initiated and API-initiated actions.
|
|
40
|
+
*
|
|
33
41
|
* @param {Polytomic.EventsListRequest} request
|
|
34
42
|
* @param {Events.RequestOptions} requestOptions - Request-specific configuration.
|
|
35
43
|
*
|
|
@@ -40,12 +48,17 @@ export declare class Events {
|
|
|
40
48
|
* @example
|
|
41
49
|
* await client.events.list({
|
|
42
50
|
* organization_id: "248df4b7-aa70-47b8-a036-33ac447e668d",
|
|
43
|
-
* starting_after: "2020-01-01T00:00:
|
|
44
|
-
* ending_before: "2020-01-01T00:00:
|
|
51
|
+
* starting_after: new Date("2020-01-01T00:00:00.000Z"),
|
|
52
|
+
* ending_before: new Date("2020-01-01T00:00:00.000Z")
|
|
45
53
|
* })
|
|
46
54
|
*/
|
|
47
55
|
list(request?: Polytomic.EventsListRequest, requestOptions?: Events.RequestOptions): Promise<Polytomic.EventsEnvelope>;
|
|
48
56
|
/**
|
|
57
|
+
* Returns the set of event type identifiers supported by GET /api/events.
|
|
58
|
+
*
|
|
59
|
+
* Use the identifiers returned here as the `event_type` filter value when calling
|
|
60
|
+
* [`GET /api/events`](../../api-reference/events/list).
|
|
61
|
+
*
|
|
49
62
|
* @param {Events.RequestOptions} requestOptions - Request-specific configuration.
|
|
50
63
|
*
|
|
51
64
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
@@ -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,19 @@ class Events {
|
|
|
59
49
|
this._options = _options;
|
|
60
50
|
}
|
|
61
51
|
/**
|
|
52
|
+
* Lists audit events for the caller's organization.
|
|
53
|
+
*
|
|
54
|
+
* Results are paginated. If more events are available, the response includes
|
|
55
|
+
* `pagination.next_page_token`; pass that token back unchanged to continue from
|
|
56
|
+
* the last item you received.
|
|
57
|
+
*
|
|
58
|
+
* Filter by event type using the `event_type` query parameter. Pass one of the
|
|
59
|
+
* identifiers returned by [`GET /api/events_types`](../../api-reference/events/get-types) to
|
|
60
|
+
* narrow results to a specific category of activity.
|
|
61
|
+
*
|
|
62
|
+
* > 📘 Events reflect audit activity scoped to the caller's organization.
|
|
63
|
+
* > The log captures both user-initiated and API-initiated actions.
|
|
64
|
+
*
|
|
62
65
|
* @param {Polytomic.EventsListRequest} request
|
|
63
66
|
* @param {Events.RequestOptions} requestOptions - Request-specific configuration.
|
|
64
67
|
*
|
|
@@ -69,13 +72,13 @@ class Events {
|
|
|
69
72
|
* @example
|
|
70
73
|
* await client.events.list({
|
|
71
74
|
* organization_id: "248df4b7-aa70-47b8-a036-33ac447e668d",
|
|
72
|
-
* starting_after: "2020-01-01T00:00:
|
|
73
|
-
* ending_before: "2020-01-01T00:00:
|
|
75
|
+
* starting_after: new Date("2020-01-01T00:00:00.000Z"),
|
|
76
|
+
* ending_before: new Date("2020-01-01T00:00:00.000Z")
|
|
74
77
|
* })
|
|
75
78
|
*/
|
|
76
|
-
list() {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
+
list(request = {}, requestOptions) {
|
|
80
|
+
var _a;
|
|
81
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
79
82
|
const { organization_id: organizationId, type: type_, starting_after: startingAfter, ending_before: endingBefore, limit, } = request;
|
|
80
83
|
const _queryParams = {};
|
|
81
84
|
if (organizationId != null) {
|
|
@@ -94,14 +97,21 @@ class Events {
|
|
|
94
97
|
_queryParams["limit"] = limit.toString();
|
|
95
98
|
}
|
|
96
99
|
const _response = yield core.fetcher({
|
|
97
|
-
url: (0, url_join_1.default)((
|
|
100
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/events"),
|
|
98
101
|
method: "GET",
|
|
99
|
-
headers:
|
|
102
|
+
headers: {
|
|
103
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
104
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
100
105
|
? yield core.Supplier.get(this._options.version)
|
|
101
|
-
: undefined,
|
|
106
|
+
: undefined,
|
|
107
|
+
"X-Fern-Language": "JavaScript",
|
|
108
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
109
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
110
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
111
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
112
|
+
},
|
|
102
113
|
contentType: "application/json",
|
|
103
114
|
queryParameters: _queryParams,
|
|
104
|
-
requestType: "json",
|
|
105
115
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
106
116
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
107
117
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -131,7 +141,7 @@ class Events {
|
|
|
131
141
|
body: _response.error.rawBody,
|
|
132
142
|
});
|
|
133
143
|
case "timeout":
|
|
134
|
-
throw new errors.PolytomicTimeoutError(
|
|
144
|
+
throw new errors.PolytomicTimeoutError();
|
|
135
145
|
case "unknown":
|
|
136
146
|
throw new errors.PolytomicError({
|
|
137
147
|
message: _response.error.errorMessage,
|
|
@@ -140,6 +150,11 @@ class Events {
|
|
|
140
150
|
});
|
|
141
151
|
}
|
|
142
152
|
/**
|
|
153
|
+
* Returns the set of event type identifiers supported by GET /api/events.
|
|
154
|
+
*
|
|
155
|
+
* Use the identifiers returned here as the `event_type` filter value when calling
|
|
156
|
+
* [`GET /api/events`](../../api-reference/events/list).
|
|
157
|
+
*
|
|
143
158
|
* @param {Events.RequestOptions} requestOptions - Request-specific configuration.
|
|
144
159
|
*
|
|
145
160
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
@@ -148,16 +163,23 @@ class Events {
|
|
|
148
163
|
* await client.events.getTypes()
|
|
149
164
|
*/
|
|
150
165
|
getTypes(requestOptions) {
|
|
166
|
+
var _a;
|
|
151
167
|
return __awaiter(this, void 0, void 0, function* () {
|
|
152
|
-
var _a, _b;
|
|
153
168
|
const _response = yield core.fetcher({
|
|
154
|
-
url: (0, url_join_1.default)((
|
|
169
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/events_types"),
|
|
155
170
|
method: "GET",
|
|
156
|
-
headers:
|
|
171
|
+
headers: {
|
|
172
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
173
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
157
174
|
? yield core.Supplier.get(this._options.version)
|
|
158
|
-
: undefined,
|
|
175
|
+
: undefined,
|
|
176
|
+
"X-Fern-Language": "JavaScript",
|
|
177
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
178
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
179
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
180
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
181
|
+
},
|
|
159
182
|
contentType: "application/json",
|
|
160
|
-
requestType: "json",
|
|
161
183
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
162
184
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
163
185
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -183,7 +205,7 @@ class Events {
|
|
|
183
205
|
body: _response.error.rawBody,
|
|
184
206
|
});
|
|
185
207
|
case "timeout":
|
|
186
|
-
throw new errors.PolytomicTimeoutError(
|
|
208
|
+
throw new errors.PolytomicTimeoutError();
|
|
187
209
|
case "unknown":
|
|
188
210
|
throw new errors.PolytomicError({
|
|
189
211
|
message: _response.error.errorMessage,
|
|
@@ -5,14 +5,29 @@
|
|
|
5
5
|
* @example
|
|
6
6
|
* {
|
|
7
7
|
* organization_id: "248df4b7-aa70-47b8-a036-33ac447e668d",
|
|
8
|
-
* starting_after: "2020-01-01T00:00:
|
|
9
|
-
* ending_before: "2020-01-01T00:00:
|
|
8
|
+
* starting_after: new Date("2020-01-01T00:00:00.000Z"),
|
|
9
|
+
* ending_before: new Date("2020-01-01T00:00:00.000Z")
|
|
10
10
|
* }
|
|
11
11
|
*/
|
|
12
12
|
export interface EventsListRequest {
|
|
13
|
+
/**
|
|
14
|
+
* Organization to list events for. Only used by system callers; normal and partner callers are always scoped to their own organization.
|
|
15
|
+
*/
|
|
13
16
|
organization_id?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Filter to a single event type. Use GET /api/events_types to list valid values.
|
|
19
|
+
*/
|
|
14
20
|
type?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Return events created strictly after this timestamp.
|
|
23
|
+
*/
|
|
15
24
|
starting_after?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Return events created strictly before this timestamp.
|
|
27
|
+
*/
|
|
16
28
|
ending_before?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Maximum number of events to return. Default 10, maximum 100.
|
|
31
|
+
*/
|
|
17
32
|
limit?: number;
|
|
18
33
|
}
|
|
@@ -7,10 +7,7 @@ import * as Polytomic from "../../../index";
|
|
|
7
7
|
export declare namespace Identity {
|
|
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,23 @@ export declare namespace Identity {
|
|
|
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 Identity {
|
|
30
25
|
protected readonly _options: Identity.Options;
|
|
31
26
|
constructor(_options: Identity.Options);
|
|
32
27
|
/**
|
|
33
|
-
* Returns information about the caller
|
|
28
|
+
* Returns information about the authenticated caller and, if applicable, the organization they are scoped to.
|
|
29
|
+
*
|
|
30
|
+
* Use this endpoint to confirm which kind of credential is being used before
|
|
31
|
+
* calling endpoints with stricter authorization rules.
|
|
32
|
+
*
|
|
33
|
+
* For user-scoped credentials, the response includes the resolved user and
|
|
34
|
+
* organization details. For non-user keys, the response identifies the key class
|
|
35
|
+
* with the corresponding boolean flags instead of impersonating a user.
|
|
36
|
+
*
|
|
37
|
+
* This endpoint is especially useful when debugging why a request is being
|
|
38
|
+
* accepted or rejected by endpoints that are limited to particular caller types.
|
|
34
39
|
*
|
|
35
40
|
* @param {Identity.RequestOptions} requestOptions - Request-specific configuration.
|
|
36
41
|
*
|
|
@@ -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,17 @@ class Identity {
|
|
|
59
49
|
this._options = _options;
|
|
60
50
|
}
|
|
61
51
|
/**
|
|
62
|
-
* Returns information about the caller
|
|
52
|
+
* Returns information about the authenticated caller and, if applicable, the organization they are scoped to.
|
|
53
|
+
*
|
|
54
|
+
* Use this endpoint to confirm which kind of credential is being used before
|
|
55
|
+
* calling endpoints with stricter authorization rules.
|
|
56
|
+
*
|
|
57
|
+
* For user-scoped credentials, the response includes the resolved user and
|
|
58
|
+
* organization details. For non-user keys, the response identifies the key class
|
|
59
|
+
* with the corresponding boolean flags instead of impersonating a user.
|
|
60
|
+
*
|
|
61
|
+
* This endpoint is especially useful when debugging why a request is being
|
|
62
|
+
* accepted or rejected by endpoints that are limited to particular caller types.
|
|
63
63
|
*
|
|
64
64
|
* @param {Identity.RequestOptions} requestOptions - Request-specific configuration.
|
|
65
65
|
*
|
|
@@ -70,16 +70,23 @@ class Identity {
|
|
|
70
70
|
* await client.identity.get()
|
|
71
71
|
*/
|
|
72
72
|
get(requestOptions) {
|
|
73
|
+
var _a;
|
|
73
74
|
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
-
var _a, _b;
|
|
75
75
|
const _response = yield core.fetcher({
|
|
76
|
-
url: (0, url_join_1.default)((
|
|
76
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/me"),
|
|
77
77
|
method: "GET",
|
|
78
|
-
headers:
|
|
78
|
+
headers: {
|
|
79
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
80
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
79
81
|
? yield core.Supplier.get(this._options.version)
|
|
80
|
-
: undefined,
|
|
82
|
+
: undefined,
|
|
83
|
+
"X-Fern-Language": "JavaScript",
|
|
84
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
85
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
86
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
87
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
88
|
+
},
|
|
81
89
|
contentType: "application/json",
|
|
82
|
-
requestType: "json",
|
|
83
90
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
84
91
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
85
92
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -107,7 +114,7 @@ class Identity {
|
|
|
107
114
|
body: _response.error.rawBody,
|
|
108
115
|
});
|
|
109
116
|
case "timeout":
|
|
110
|
-
throw new errors.PolytomicTimeoutError(
|
|
117
|
+
throw new errors.PolytomicTimeoutError();
|
|
111
118
|
case "unknown":
|
|
112
119
|
throw new errors.PolytomicError({
|
|
113
120
|
message: _response.error.errorMessage,
|
package/api/resources/index.js
CHANGED
|
@@ -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 Jobs {
|
|
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,16 +19,26 @@ export declare namespace Jobs {
|
|
|
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 Jobs {
|
|
30
25
|
protected readonly _options: Jobs.Options;
|
|
31
26
|
constructor(_options: Jobs.Options);
|
|
32
27
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
28
|
+
* Returns the current state of an asynchronous job.
|
|
29
|
+
*
|
|
30
|
+
* This endpoint is used as a polling target by other asynchronous workflows such
|
|
31
|
+
* as model preview and log export. The caller must know the job `type` and `id`
|
|
32
|
+
* that were returned when the job was created.
|
|
33
|
+
*
|
|
34
|
+
* If the job is still running, the response returns `status: running` and may not
|
|
35
|
+
* include a `result` yet. Once complete, `status` becomes `done` or `failed`.
|
|
36
|
+
*
|
|
37
|
+
* Only specific job types are supported by this endpoint. Passing an unknown
|
|
38
|
+
* `type` returns `400`.
|
|
39
|
+
*
|
|
40
|
+
* @param {string} id - Unique identifier of the job (usually returned by whichever endpoint started the job).
|
|
41
|
+
* @param {string} type - Job type. One of: createmodel, updatemodel, previewmodel, samplemodel, exportlogs.
|
|
35
42
|
* @param {Jobs.RequestOptions} requestOptions - Request-specific configuration.
|
|
36
43
|
*
|
|
37
44
|
* @throws {@link Polytomic.BadRequestError}
|
|
@@ -42,6 +49,6 @@ export declare class Jobs {
|
|
|
42
49
|
* @example
|
|
43
50
|
* await client.jobs.get("248df4b7-aa70-47b8-a036-33ac447e668d", "createmodel")
|
|
44
51
|
*/
|
|
45
|
-
get(id: string,
|
|
52
|
+
get(id: string, type: string, requestOptions?: Jobs.RequestOptions): Promise<Polytomic.JobResponseEnvelope>;
|
|
46
53
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
47
54
|
}
|
|
@@ -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,8 +49,20 @@ class Jobs {
|
|
|
59
49
|
this._options = _options;
|
|
60
50
|
}
|
|
61
51
|
/**
|
|
62
|
-
*
|
|
63
|
-
*
|
|
52
|
+
* Returns the current state of an asynchronous job.
|
|
53
|
+
*
|
|
54
|
+
* This endpoint is used as a polling target by other asynchronous workflows such
|
|
55
|
+
* as model preview and log export. The caller must know the job `type` and `id`
|
|
56
|
+
* that were returned when the job was created.
|
|
57
|
+
*
|
|
58
|
+
* If the job is still running, the response returns `status: running` and may not
|
|
59
|
+
* include a `result` yet. Once complete, `status` becomes `done` or `failed`.
|
|
60
|
+
*
|
|
61
|
+
* Only specific job types are supported by this endpoint. Passing an unknown
|
|
62
|
+
* `type` returns `400`.
|
|
63
|
+
*
|
|
64
|
+
* @param {string} id - Unique identifier of the job (usually returned by whichever endpoint started the job).
|
|
65
|
+
* @param {string} type - Job type. One of: createmodel, updatemodel, previewmodel, samplemodel, exportlogs.
|
|
64
66
|
* @param {Jobs.RequestOptions} requestOptions - Request-specific configuration.
|
|
65
67
|
*
|
|
66
68
|
* @throws {@link Polytomic.BadRequestError}
|
|
@@ -71,17 +73,24 @@ class Jobs {
|
|
|
71
73
|
* @example
|
|
72
74
|
* await client.jobs.get("248df4b7-aa70-47b8-a036-33ac447e668d", "createmodel")
|
|
73
75
|
*/
|
|
74
|
-
get(id,
|
|
76
|
+
get(id, type, requestOptions) {
|
|
77
|
+
var _a;
|
|
75
78
|
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
-
var _a, _b;
|
|
77
79
|
const _response = yield core.fetcher({
|
|
78
|
-
url: (0, url_join_1.default)((
|
|
80
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/jobs/${encodeURIComponent(type)}/${encodeURIComponent(id)}`),
|
|
79
81
|
method: "GET",
|
|
80
|
-
headers:
|
|
82
|
+
headers: {
|
|
83
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
84
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
81
85
|
? yield core.Supplier.get(this._options.version)
|
|
82
|
-
: undefined,
|
|
86
|
+
: undefined,
|
|
87
|
+
"X-Fern-Language": "JavaScript",
|
|
88
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
89
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
90
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
91
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
92
|
+
},
|
|
83
93
|
contentType: "application/json",
|
|
84
|
-
requestType: "json",
|
|
85
94
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
86
95
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
87
96
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -113,7 +122,7 @@ class Jobs {
|
|
|
113
122
|
body: _response.error.rawBody,
|
|
114
123
|
});
|
|
115
124
|
case "timeout":
|
|
116
|
-
throw new errors.PolytomicTimeoutError(
|
|
125
|
+
throw new errors.PolytomicTimeoutError();
|
|
117
126
|
case "unknown":
|
|
118
127
|
throw new errors.PolytomicError({
|
|
119
128
|
message: _response.error.errorMessage,
|