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
|
@@ -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,15 @@ class Connections {
|
|
|
59
49
|
this._options = _options;
|
|
60
50
|
}
|
|
61
51
|
/**
|
|
52
|
+
* Lists all connection types supported by this deployment.
|
|
53
|
+
*
|
|
54
|
+
* Each entry includes per-type metadata:
|
|
55
|
+
*
|
|
56
|
+
* - The available operations the connection type supports.
|
|
57
|
+
* - Its category.
|
|
58
|
+
* - Whether the connection type is enabled for the caller's organization.
|
|
59
|
+
* - Which modes (source, destination, enrichment) it can act as.
|
|
60
|
+
*
|
|
62
61
|
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
62
|
*
|
|
64
63
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
@@ -68,16 +67,23 @@ class Connections {
|
|
|
68
67
|
* await client.connections.getTypes()
|
|
69
68
|
*/
|
|
70
69
|
getTypes(requestOptions) {
|
|
70
|
+
var _a;
|
|
71
71
|
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
-
var _a, _b;
|
|
73
72
|
const _response = yield core.fetcher({
|
|
74
|
-
url: (0, url_join_1.default)((
|
|
73
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/connection_types"),
|
|
75
74
|
method: "GET",
|
|
76
|
-
headers:
|
|
75
|
+
headers: {
|
|
76
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
77
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
77
78
|
? yield core.Supplier.get(this._options.version)
|
|
78
|
-
: undefined,
|
|
79
|
+
: undefined,
|
|
80
|
+
"X-Fern-Language": "JavaScript",
|
|
81
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
82
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
83
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
84
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
85
|
+
},
|
|
79
86
|
contentType: "application/json",
|
|
80
|
-
requestType: "json",
|
|
81
87
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
82
88
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
83
89
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -105,7 +111,7 @@ class Connections {
|
|
|
105
111
|
body: _response.error.rawBody,
|
|
106
112
|
});
|
|
107
113
|
case "timeout":
|
|
108
|
-
throw new errors.PolytomicTimeoutError(
|
|
114
|
+
throw new errors.PolytomicTimeoutError();
|
|
109
115
|
case "unknown":
|
|
110
116
|
throw new errors.PolytomicError({
|
|
111
117
|
message: _response.error.errorMessage,
|
|
@@ -114,7 +120,16 @@ class Connections {
|
|
|
114
120
|
});
|
|
115
121
|
}
|
|
116
122
|
/**
|
|
117
|
-
*
|
|
123
|
+
* Returns the JSON schema for a connection type.
|
|
124
|
+
*
|
|
125
|
+
* This schema is intended for building forms or validating configuration payloads
|
|
126
|
+
* client-side. It describes the structure Polytomic expects when you create or
|
|
127
|
+
* update a connection of the given type.
|
|
128
|
+
*
|
|
129
|
+
* The response is metadata about the shape of the configuration, not a live
|
|
130
|
+
* connection instance and not a set of current credential values.
|
|
131
|
+
*
|
|
132
|
+
* @param {string} id - Connection type identifier (e.g. postgresql, salesforce, hubspot).
|
|
118
133
|
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
119
134
|
*
|
|
120
135
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
@@ -125,16 +140,23 @@ class Connections {
|
|
|
125
140
|
* await client.connections.getConnectionTypeSchema("postgresql")
|
|
126
141
|
*/
|
|
127
142
|
getConnectionTypeSchema(id, requestOptions) {
|
|
143
|
+
var _a;
|
|
128
144
|
return __awaiter(this, void 0, void 0, function* () {
|
|
129
|
-
var _a, _b;
|
|
130
145
|
const _response = yield core.fetcher({
|
|
131
|
-
url: (0, url_join_1.default)((
|
|
146
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/connection_types/${encodeURIComponent(id)}`),
|
|
132
147
|
method: "GET",
|
|
133
|
-
headers:
|
|
148
|
+
headers: {
|
|
149
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
150
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
134
151
|
? yield core.Supplier.get(this._options.version)
|
|
135
|
-
: undefined,
|
|
152
|
+
: undefined,
|
|
153
|
+
"X-Fern-Language": "JavaScript",
|
|
154
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
155
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
156
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
157
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
158
|
+
},
|
|
136
159
|
contentType: "application/json",
|
|
137
|
-
requestType: "json",
|
|
138
160
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
139
161
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
140
162
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -164,7 +186,7 @@ class Connections {
|
|
|
164
186
|
body: _response.error.rawBody,
|
|
165
187
|
});
|
|
166
188
|
case "timeout":
|
|
167
|
-
throw new errors.PolytomicTimeoutError(
|
|
189
|
+
throw new errors.PolytomicTimeoutError();
|
|
168
190
|
case "unknown":
|
|
169
191
|
throw new errors.PolytomicError({
|
|
170
192
|
message: _response.error.errorMessage,
|
|
@@ -173,7 +195,17 @@ class Connections {
|
|
|
173
195
|
});
|
|
174
196
|
}
|
|
175
197
|
/**
|
|
176
|
-
*
|
|
198
|
+
* Returns completion values for parameter fields on a connection type.
|
|
199
|
+
*
|
|
200
|
+
* This endpoint is useful during connection setup, before a connection exists or
|
|
201
|
+
* before you want to persist it. The supplied `parameters` are applied to a
|
|
202
|
+
* temporary in-memory connection shape and used to resolve dependent options.
|
|
203
|
+
*
|
|
204
|
+
* When an endpoint requires upstream authorization before it can return values,
|
|
205
|
+
* Polytomic returns an error instead of guessing. In that case, complete the
|
|
206
|
+
* authorization flow first and call the endpoint again.
|
|
207
|
+
*
|
|
208
|
+
* @param {string} type
|
|
177
209
|
* @param {Polytomic.GetConnectionTypeParameterValuesRequestSchema} request
|
|
178
210
|
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
179
211
|
*
|
|
@@ -187,17 +219,24 @@ class Connections {
|
|
|
187
219
|
* field: "field"
|
|
188
220
|
* })
|
|
189
221
|
*/
|
|
190
|
-
getTypeParameterValues(
|
|
222
|
+
getTypeParameterValues(type, request, requestOptions) {
|
|
223
|
+
var _a;
|
|
191
224
|
return __awaiter(this, void 0, void 0, function* () {
|
|
192
|
-
var _a, _b;
|
|
193
225
|
const _response = yield core.fetcher({
|
|
194
|
-
url: (0, url_join_1.default)((
|
|
226
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/connection_types/${encodeURIComponent(type)}/parameter_values`),
|
|
195
227
|
method: "POST",
|
|
196
|
-
headers:
|
|
228
|
+
headers: {
|
|
229
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
230
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
197
231
|
? yield core.Supplier.get(this._options.version)
|
|
198
|
-
: undefined,
|
|
232
|
+
: undefined,
|
|
233
|
+
"X-Fern-Language": "JavaScript",
|
|
234
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
235
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
236
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
237
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
238
|
+
},
|
|
199
239
|
contentType: "application/json",
|
|
200
|
-
requestType: "json",
|
|
201
240
|
body: request,
|
|
202
241
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
203
242
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -230,7 +269,7 @@ class Connections {
|
|
|
230
269
|
body: _response.error.rawBody,
|
|
231
270
|
});
|
|
232
271
|
case "timeout":
|
|
233
|
-
throw new errors.PolytomicTimeoutError(
|
|
272
|
+
throw new errors.PolytomicTimeoutError();
|
|
234
273
|
case "unknown":
|
|
235
274
|
throw new errors.PolytomicError({
|
|
236
275
|
message: _response.error.errorMessage,
|
|
@@ -239,6 +278,17 @@ class Connections {
|
|
|
239
278
|
});
|
|
240
279
|
}
|
|
241
280
|
/**
|
|
281
|
+
* Lists every connection in the caller's organization, with sensitive fields redacted.
|
|
282
|
+
*
|
|
283
|
+
* Sensitive configuration values — passwords, API tokens, private keys — are
|
|
284
|
+
* redacted from all responses. To understand which fields a connection type
|
|
285
|
+
* exposes, consult the parameter schema returned by
|
|
286
|
+
* [`GET /api/connection_types`](../../api-reference/connections/get-types).
|
|
287
|
+
*
|
|
288
|
+
* To inspect the data objects available on a specific connection, use
|
|
289
|
+
* [`POST /api/connections/{id}/schemas/refresh`](../../api-reference/schemas/refresh)
|
|
290
|
+
* followed by [`GET /api/connections/{id}/schemas/status`](../../api-reference/schemas/get-status).
|
|
291
|
+
*
|
|
242
292
|
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
243
293
|
*
|
|
244
294
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
@@ -248,16 +298,23 @@ class Connections {
|
|
|
248
298
|
* await client.connections.list()
|
|
249
299
|
*/
|
|
250
300
|
list(requestOptions) {
|
|
301
|
+
var _a;
|
|
251
302
|
return __awaiter(this, void 0, void 0, function* () {
|
|
252
|
-
var _a, _b;
|
|
253
303
|
const _response = yield core.fetcher({
|
|
254
|
-
url: (0, url_join_1.default)((
|
|
304
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/connections"),
|
|
255
305
|
method: "GET",
|
|
256
|
-
headers:
|
|
306
|
+
headers: {
|
|
307
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
308
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
257
309
|
? yield core.Supplier.get(this._options.version)
|
|
258
|
-
: undefined,
|
|
310
|
+
: undefined,
|
|
311
|
+
"X-Fern-Language": "JavaScript",
|
|
312
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
313
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
314
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
315
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
316
|
+
},
|
|
259
317
|
contentType: "application/json",
|
|
260
|
-
requestType: "json",
|
|
261
318
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
262
319
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
263
320
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -285,7 +342,7 @@ class Connections {
|
|
|
285
342
|
body: _response.error.rawBody,
|
|
286
343
|
});
|
|
287
344
|
case "timeout":
|
|
288
|
-
throw new errors.PolytomicTimeoutError(
|
|
345
|
+
throw new errors.PolytomicTimeoutError();
|
|
289
346
|
case "unknown":
|
|
290
347
|
throw new errors.PolytomicError({
|
|
291
348
|
message: _response.error.errorMessage,
|
|
@@ -294,6 +351,18 @@ class Connections {
|
|
|
294
351
|
});
|
|
295
352
|
}
|
|
296
353
|
/**
|
|
354
|
+
* Creates a new connection of the specified type.
|
|
355
|
+
*
|
|
356
|
+
* Use [`GET /api/connection_types`](../../api-reference/connections/get-types) to retrieve the
|
|
357
|
+
* list of available types and their parameter schemas. The `configuration`
|
|
358
|
+
* object is type-specific; consult the [integration
|
|
359
|
+
* guides](../../guides/configuring-your-connections/overview)
|
|
360
|
+
* for the required and optional fields for each type.
|
|
361
|
+
*
|
|
362
|
+
* > 📘 Polytomic validates the connection against the upstream service
|
|
363
|
+
* > immediately on creation. The request will fail if the credentials or
|
|
364
|
+
* > endpoint cannot be reached.
|
|
365
|
+
*
|
|
297
366
|
* @param {Polytomic.CreateConnectionRequestSchema} request
|
|
298
367
|
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
299
368
|
*
|
|
@@ -317,16 +386,23 @@ class Connections {
|
|
|
317
386
|
* })
|
|
318
387
|
*/
|
|
319
388
|
create(request, requestOptions) {
|
|
389
|
+
var _a;
|
|
320
390
|
return __awaiter(this, void 0, void 0, function* () {
|
|
321
|
-
var _a, _b;
|
|
322
391
|
const _response = yield core.fetcher({
|
|
323
|
-
url: (0, url_join_1.default)((
|
|
392
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/connections"),
|
|
324
393
|
method: "POST",
|
|
325
|
-
headers:
|
|
394
|
+
headers: {
|
|
395
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
396
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
326
397
|
? yield core.Supplier.get(this._options.version)
|
|
327
|
-
: undefined,
|
|
398
|
+
: undefined,
|
|
399
|
+
"X-Fern-Language": "JavaScript",
|
|
400
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
401
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
402
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
403
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
404
|
+
},
|
|
328
405
|
contentType: "application/json",
|
|
329
|
-
requestType: "json",
|
|
330
406
|
body: request,
|
|
331
407
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
332
408
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -361,7 +437,7 @@ class Connections {
|
|
|
361
437
|
body: _response.error.rawBody,
|
|
362
438
|
});
|
|
363
439
|
case "timeout":
|
|
364
|
-
throw new errors.PolytomicTimeoutError(
|
|
440
|
+
throw new errors.PolytomicTimeoutError();
|
|
365
441
|
case "unknown":
|
|
366
442
|
throw new errors.PolytomicError({
|
|
367
443
|
message: _response.error.errorMessage,
|
|
@@ -370,15 +446,11 @@ class Connections {
|
|
|
370
446
|
});
|
|
371
447
|
}
|
|
372
448
|
/**
|
|
373
|
-
* Creates a
|
|
374
|
-
*
|
|
375
|
-
* This endpoint configures a Polytomic Connect request and returns the URL to
|
|
376
|
-
* redirect users to. This allows embedding Polytomic connection authorization in
|
|
377
|
-
* other applications.
|
|
449
|
+
* Creates a Polytomic Connect session and returns a redirect URL that embeds the Connect modal.
|
|
378
450
|
*
|
|
379
451
|
* See also:
|
|
380
452
|
*
|
|
381
|
-
* - [Embedding authentication](
|
|
453
|
+
* - [Embedding authentication](../../../guides/embedding-authentication), a guide to using Polytomic Connect.
|
|
382
454
|
*
|
|
383
455
|
* @param {Polytomic.ConnectCardRequest} request
|
|
384
456
|
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -395,16 +467,23 @@ class Connections {
|
|
|
395
467
|
* })
|
|
396
468
|
*/
|
|
397
469
|
connect(request, requestOptions) {
|
|
470
|
+
var _a;
|
|
398
471
|
return __awaiter(this, void 0, void 0, function* () {
|
|
399
|
-
var _a, _b;
|
|
400
472
|
const _response = yield core.fetcher({
|
|
401
|
-
url: (0, url_join_1.default)((
|
|
473
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/connections/connect/"),
|
|
402
474
|
method: "POST",
|
|
403
|
-
headers:
|
|
475
|
+
headers: {
|
|
476
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
477
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
404
478
|
? yield core.Supplier.get(this._options.version)
|
|
405
|
-
: undefined,
|
|
479
|
+
: undefined,
|
|
480
|
+
"X-Fern-Language": "JavaScript",
|
|
481
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
482
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
483
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
484
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
485
|
+
},
|
|
406
486
|
contentType: "application/json",
|
|
407
|
-
requestType: "json",
|
|
408
487
|
body: request,
|
|
409
488
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
410
489
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -437,7 +516,7 @@ class Connections {
|
|
|
437
516
|
body: _response.error.rawBody,
|
|
438
517
|
});
|
|
439
518
|
case "timeout":
|
|
440
|
-
throw new errors.PolytomicTimeoutError(
|
|
519
|
+
throw new errors.PolytomicTimeoutError();
|
|
441
520
|
case "unknown":
|
|
442
521
|
throw new errors.PolytomicError({
|
|
443
522
|
message: _response.error.errorMessage,
|
|
@@ -448,6 +527,17 @@ class Connections {
|
|
|
448
527
|
/**
|
|
449
528
|
* Tests a connection configuration.
|
|
450
529
|
*
|
|
530
|
+
* This endpoint is useful for setup flows that want to verify credentials before
|
|
531
|
+
* persisting them.
|
|
532
|
+
*
|
|
533
|
+
* If you provide `connection_id`, Polytomic starts from the saved configuration
|
|
534
|
+
* for that connection and then applies the request's `configuration` values on
|
|
535
|
+
* top. This lets callers test a partial change without resending every existing
|
|
536
|
+
* field.
|
|
537
|
+
*
|
|
538
|
+
* The request does not persist any configuration changes even when validation
|
|
539
|
+
* succeeds.
|
|
540
|
+
*
|
|
451
541
|
* @param {Polytomic.TestConnectionRequest} request
|
|
452
542
|
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
453
543
|
*
|
|
@@ -469,16 +559,23 @@ class Connections {
|
|
|
469
559
|
* })
|
|
470
560
|
*/
|
|
471
561
|
testConnection(request, requestOptions) {
|
|
562
|
+
var _a;
|
|
472
563
|
return __awaiter(this, void 0, void 0, function* () {
|
|
473
|
-
var _a, _b;
|
|
474
564
|
const _response = yield core.fetcher({
|
|
475
|
-
url: (0, url_join_1.default)((
|
|
565
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, "api/connections/test"),
|
|
476
566
|
method: "POST",
|
|
477
|
-
headers:
|
|
567
|
+
headers: {
|
|
568
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
569
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
478
570
|
? yield core.Supplier.get(this._options.version)
|
|
479
|
-
: undefined,
|
|
571
|
+
: undefined,
|
|
572
|
+
"X-Fern-Language": "JavaScript",
|
|
573
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
574
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
575
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
576
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
577
|
+
},
|
|
480
578
|
contentType: "application/json",
|
|
481
|
-
requestType: "json",
|
|
482
579
|
body: request,
|
|
483
580
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
484
581
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -511,7 +608,7 @@ class Connections {
|
|
|
511
608
|
body: _response.error.rawBody,
|
|
512
609
|
});
|
|
513
610
|
case "timeout":
|
|
514
|
-
throw new errors.PolytomicTimeoutError(
|
|
611
|
+
throw new errors.PolytomicTimeoutError();
|
|
515
612
|
case "unknown":
|
|
516
613
|
throw new errors.PolytomicError({
|
|
517
614
|
message: _response.error.errorMessage,
|
|
@@ -520,6 +617,13 @@ class Connections {
|
|
|
520
617
|
});
|
|
521
618
|
}
|
|
522
619
|
/**
|
|
620
|
+
* Returns a single connection by ID, with sensitive fields redacted.
|
|
621
|
+
*
|
|
622
|
+
* To inspect the schemas available on this connection, trigger a refresh with
|
|
623
|
+
* [`POST /api/connections/{id}/schemas/refresh`](../../../api-reference/schemas/refresh) and
|
|
624
|
+
* track progress via
|
|
625
|
+
* [`GET /api/connections/{id}/schemas/status`](../../../api-reference/schemas/get-status).
|
|
626
|
+
*
|
|
523
627
|
* @param {string} id
|
|
524
628
|
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
525
629
|
*
|
|
@@ -531,16 +635,23 @@ class Connections {
|
|
|
531
635
|
* await client.connections.get("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
532
636
|
*/
|
|
533
637
|
get(id, requestOptions) {
|
|
638
|
+
var _a;
|
|
534
639
|
return __awaiter(this, void 0, void 0, function* () {
|
|
535
|
-
var _a, _b;
|
|
536
640
|
const _response = yield core.fetcher({
|
|
537
|
-
url: (0, url_join_1.default)((
|
|
641
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/connections/${encodeURIComponent(id)}`),
|
|
538
642
|
method: "GET",
|
|
539
|
-
headers:
|
|
643
|
+
headers: {
|
|
644
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
645
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
540
646
|
? yield core.Supplier.get(this._options.version)
|
|
541
|
-
: undefined,
|
|
647
|
+
: undefined,
|
|
648
|
+
"X-Fern-Language": "JavaScript",
|
|
649
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
650
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
651
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
652
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
653
|
+
},
|
|
542
654
|
contentType: "application/json",
|
|
543
|
-
requestType: "json",
|
|
544
655
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
545
656
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
546
657
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -570,7 +681,7 @@ class Connections {
|
|
|
570
681
|
body: _response.error.rawBody,
|
|
571
682
|
});
|
|
572
683
|
case "timeout":
|
|
573
|
-
throw new errors.PolytomicTimeoutError(
|
|
684
|
+
throw new errors.PolytomicTimeoutError();
|
|
574
685
|
case "unknown":
|
|
575
686
|
throw new errors.PolytomicError({
|
|
576
687
|
message: _response.error.errorMessage,
|
|
@@ -579,6 +690,21 @@ class Connections {
|
|
|
579
690
|
});
|
|
580
691
|
}
|
|
581
692
|
/**
|
|
693
|
+
* Updates a connection's configuration.
|
|
694
|
+
*
|
|
695
|
+
* Updating a connection is a **full replacement** of its configuration. Any
|
|
696
|
+
* `configuration` field you omit is cleared. To make a partial change, fetch
|
|
697
|
+
* the current connection with
|
|
698
|
+
* [`GET /api/connections/{id}`](../../../api-reference/connections/get), apply your edits, and send the
|
|
699
|
+
* complete object back.
|
|
700
|
+
*
|
|
701
|
+
* > 📘 The connection is re-validated against the upstream service after every
|
|
702
|
+
* > update. The request will fail if the new credentials or endpoint cannot be
|
|
703
|
+
* > reached.
|
|
704
|
+
*
|
|
705
|
+
* Syncs that are already running when the update is submitted are not
|
|
706
|
+
* interrupted; the updated configuration takes effect on their next execution.
|
|
707
|
+
*
|
|
582
708
|
* @param {string} id
|
|
583
709
|
* @param {Polytomic.UpdateConnectionRequestSchema} request
|
|
584
710
|
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -603,16 +729,23 @@ class Connections {
|
|
|
603
729
|
* })
|
|
604
730
|
*/
|
|
605
731
|
update(id, request, requestOptions) {
|
|
732
|
+
var _a;
|
|
606
733
|
return __awaiter(this, void 0, void 0, function* () {
|
|
607
|
-
var _a, _b;
|
|
608
734
|
const _response = yield core.fetcher({
|
|
609
|
-
url: (0, url_join_1.default)((
|
|
735
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/connections/${encodeURIComponent(id)}`),
|
|
610
736
|
method: "PUT",
|
|
611
|
-
headers:
|
|
737
|
+
headers: {
|
|
738
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
739
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
612
740
|
? yield core.Supplier.get(this._options.version)
|
|
613
|
-
: undefined,
|
|
741
|
+
: undefined,
|
|
742
|
+
"X-Fern-Language": "JavaScript",
|
|
743
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
744
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
745
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
746
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
747
|
+
},
|
|
614
748
|
contentType: "application/json",
|
|
615
|
-
requestType: "json",
|
|
616
749
|
body: request,
|
|
617
750
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
618
751
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -649,7 +782,7 @@ class Connections {
|
|
|
649
782
|
body: _response.error.rawBody,
|
|
650
783
|
});
|
|
651
784
|
case "timeout":
|
|
652
|
-
throw new errors.PolytomicTimeoutError(
|
|
785
|
+
throw new errors.PolytomicTimeoutError();
|
|
653
786
|
case "unknown":
|
|
654
787
|
throw new errors.PolytomicError({
|
|
655
788
|
message: _response.error.errorMessage,
|
|
@@ -658,6 +791,13 @@ class Connections {
|
|
|
658
791
|
});
|
|
659
792
|
}
|
|
660
793
|
/**
|
|
794
|
+
* Deletes a connection.
|
|
795
|
+
*
|
|
796
|
+
* > 🚧 Deleting a connection that is referenced by fieldsets, syncs, bulk
|
|
797
|
+
* > syncs, or schedules returns `422 connection in use` unless you pass
|
|
798
|
+
* > `force=true`. With `force=true`, the API deletes those dependent
|
|
799
|
+
* > resources before removing the connection.
|
|
800
|
+
*
|
|
661
801
|
* @param {string} id
|
|
662
802
|
* @param {Polytomic.ConnectionsRemoveRequest} request
|
|
663
803
|
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -673,23 +813,30 @@ class Connections {
|
|
|
673
813
|
* force: true
|
|
674
814
|
* })
|
|
675
815
|
*/
|
|
676
|
-
remove(
|
|
677
|
-
|
|
678
|
-
|
|
816
|
+
remove(id, request = {}, requestOptions) {
|
|
817
|
+
var _a;
|
|
818
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
679
819
|
const { force } = request;
|
|
680
820
|
const _queryParams = {};
|
|
681
821
|
if (force != null) {
|
|
682
822
|
_queryParams["force"] = force.toString();
|
|
683
823
|
}
|
|
684
824
|
const _response = yield core.fetcher({
|
|
685
|
-
url: (0, url_join_1.default)((
|
|
825
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/connections/${encodeURIComponent(id)}`),
|
|
686
826
|
method: "DELETE",
|
|
687
|
-
headers:
|
|
827
|
+
headers: {
|
|
828
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
829
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
688
830
|
? yield core.Supplier.get(this._options.version)
|
|
689
|
-
: undefined,
|
|
831
|
+
: undefined,
|
|
832
|
+
"X-Fern-Language": "JavaScript",
|
|
833
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
834
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
835
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
836
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
837
|
+
},
|
|
690
838
|
contentType: "application/json",
|
|
691
839
|
queryParameters: _queryParams,
|
|
692
|
-
requestType: "json",
|
|
693
840
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
694
841
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
695
842
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -723,7 +870,7 @@ class Connections {
|
|
|
723
870
|
body: _response.error.rawBody,
|
|
724
871
|
});
|
|
725
872
|
case "timeout":
|
|
726
|
-
throw new errors.PolytomicTimeoutError(
|
|
873
|
+
throw new errors.PolytomicTimeoutError();
|
|
727
874
|
case "unknown":
|
|
728
875
|
throw new errors.PolytomicError({
|
|
729
876
|
message: _response.error.errorMessage,
|
|
@@ -732,6 +879,17 @@ class Connections {
|
|
|
732
879
|
});
|
|
733
880
|
}
|
|
734
881
|
/**
|
|
882
|
+
* Returns completion values for parameter fields on a persisted connection.
|
|
883
|
+
*
|
|
884
|
+
* Use this endpoint when the available options for one parameter depend on the
|
|
885
|
+
* connection's saved credentials or previously selected settings. For example,
|
|
886
|
+
* after a connection is authorized, the upstream service may be able to return
|
|
887
|
+
* lists of databases, schemas, or similar selectable values.
|
|
888
|
+
*
|
|
889
|
+
* For new setup flows, prefer
|
|
890
|
+
* [`POST /api/connection_types/{type}/parameter_values`](../../../../api-reference/connections/get-type-parameter-values),
|
|
891
|
+
* which lets you resolve completions before the connection has been created.
|
|
892
|
+
*
|
|
735
893
|
* @param {string} id
|
|
736
894
|
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
737
895
|
*
|
|
@@ -743,16 +901,23 @@ class Connections {
|
|
|
743
901
|
* await client.connections.getParameterValues("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
744
902
|
*/
|
|
745
903
|
getParameterValues(id, requestOptions) {
|
|
904
|
+
var _a;
|
|
746
905
|
return __awaiter(this, void 0, void 0, function* () {
|
|
747
|
-
var _a, _b;
|
|
748
906
|
const _response = yield core.fetcher({
|
|
749
|
-
url: (0, url_join_1.default)((
|
|
907
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/connections/${encodeURIComponent(id)}/parameter_values`),
|
|
750
908
|
method: "GET",
|
|
751
|
-
headers:
|
|
909
|
+
headers: {
|
|
910
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
911
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
752
912
|
? yield core.Supplier.get(this._options.version)
|
|
753
|
-
: undefined,
|
|
913
|
+
: undefined,
|
|
914
|
+
"X-Fern-Language": "JavaScript",
|
|
915
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
916
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
917
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
918
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
919
|
+
},
|
|
754
920
|
contentType: "application/json",
|
|
755
|
-
requestType: "json",
|
|
756
921
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
757
922
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
758
923
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -782,7 +947,7 @@ class Connections {
|
|
|
782
947
|
body: _response.error.rawBody,
|
|
783
948
|
});
|
|
784
949
|
case "timeout":
|
|
785
|
-
throw new errors.PolytomicTimeoutError(
|
|
950
|
+
throw new errors.PolytomicTimeoutError();
|
|
786
951
|
case "unknown":
|
|
787
952
|
throw new errors.PolytomicError({
|
|
788
953
|
message: _response.error.errorMessage,
|
|
@@ -791,31 +956,45 @@ class Connections {
|
|
|
791
956
|
});
|
|
792
957
|
}
|
|
793
958
|
/**
|
|
794
|
-
*
|
|
959
|
+
* Shares a connection with another organization in the caller's partner account.
|
|
960
|
+
*
|
|
961
|
+
* > 🚧 Requires partner key
|
|
962
|
+
* >
|
|
963
|
+
* > Shared connections can only be created by using [partner keys](../../../../guides/obtaining-api-keys#partner-keys).
|
|
964
|
+
*
|
|
965
|
+
* @param {string} parentConnectionId
|
|
795
966
|
* @param {Polytomic.ApiRequest} request
|
|
796
967
|
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
797
968
|
*
|
|
798
969
|
* @throws {@link Polytomic.UnauthorizedError}
|
|
799
970
|
* @throws {@link Polytomic.ForbiddenError}
|
|
800
971
|
* @throws {@link Polytomic.NotFoundError}
|
|
972
|
+
* @throws {@link Polytomic.UnprocessableEntityError}
|
|
801
973
|
* @throws {@link Polytomic.InternalServerError}
|
|
802
974
|
*
|
|
803
975
|
* @example
|
|
804
|
-
* await client.connections.
|
|
805
|
-
*
|
|
976
|
+
* await client.connections.createSharedConnection("248df4b7-aa70-47b8-a036-33ac447e668d", {
|
|
977
|
+
* child_organization_id: "248df4b7-aa70-47b8-a036-33ac447e668d"
|
|
806
978
|
* })
|
|
807
979
|
*/
|
|
808
|
-
|
|
980
|
+
createSharedConnection(parentConnectionId, request, requestOptions) {
|
|
981
|
+
var _a;
|
|
809
982
|
return __awaiter(this, void 0, void 0, function* () {
|
|
810
|
-
var _a, _b;
|
|
811
983
|
const _response = yield core.fetcher({
|
|
812
|
-
url: (0, url_join_1.default)((
|
|
984
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/connections/${encodeURIComponent(parentConnectionId)}/share`),
|
|
813
985
|
method: "POST",
|
|
814
|
-
headers:
|
|
986
|
+
headers: {
|
|
987
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
988
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
815
989
|
? yield core.Supplier.get(this._options.version)
|
|
816
|
-
: undefined,
|
|
990
|
+
: undefined,
|
|
991
|
+
"X-Fern-Language": "JavaScript",
|
|
992
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
993
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
994
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
995
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
996
|
+
},
|
|
817
997
|
contentType: "application/json",
|
|
818
|
-
requestType: "json",
|
|
819
998
|
body: request,
|
|
820
999
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
821
1000
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -832,6 +1011,82 @@ class Connections {
|
|
|
832
1011
|
throw new Polytomic.ForbiddenError(_response.error.body);
|
|
833
1012
|
case 404:
|
|
834
1013
|
throw new Polytomic.NotFoundError(_response.error.body);
|
|
1014
|
+
case 422:
|
|
1015
|
+
throw new Polytomic.UnprocessableEntityError(_response.error.body);
|
|
1016
|
+
case 500:
|
|
1017
|
+
throw new Polytomic.InternalServerError(_response.error.body);
|
|
1018
|
+
default:
|
|
1019
|
+
throw new errors.PolytomicError({
|
|
1020
|
+
statusCode: _response.error.statusCode,
|
|
1021
|
+
body: _response.error.body,
|
|
1022
|
+
});
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
switch (_response.error.reason) {
|
|
1026
|
+
case "non-json":
|
|
1027
|
+
throw new errors.PolytomicError({
|
|
1028
|
+
statusCode: _response.error.statusCode,
|
|
1029
|
+
body: _response.error.rawBody,
|
|
1030
|
+
});
|
|
1031
|
+
case "timeout":
|
|
1032
|
+
throw new errors.PolytomicTimeoutError();
|
|
1033
|
+
case "unknown":
|
|
1034
|
+
throw new errors.PolytomicError({
|
|
1035
|
+
message: _response.error.errorMessage,
|
|
1036
|
+
});
|
|
1037
|
+
}
|
|
1038
|
+
});
|
|
1039
|
+
}
|
|
1040
|
+
/**
|
|
1041
|
+
* Lists shared copies of a connection.
|
|
1042
|
+
*
|
|
1043
|
+
* @param {string} parentConnectionId
|
|
1044
|
+
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
1045
|
+
*
|
|
1046
|
+
* @throws {@link Polytomic.UnauthorizedError}
|
|
1047
|
+
* @throws {@link Polytomic.ForbiddenError}
|
|
1048
|
+
* @throws {@link Polytomic.NotFoundError}
|
|
1049
|
+
* @throws {@link Polytomic.UnprocessableEntityError}
|
|
1050
|
+
* @throws {@link Polytomic.InternalServerError}
|
|
1051
|
+
*
|
|
1052
|
+
* @example
|
|
1053
|
+
* await client.connections.listSharedConnections("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
1054
|
+
*/
|
|
1055
|
+
listSharedConnections(parentConnectionId, requestOptions) {
|
|
1056
|
+
var _a;
|
|
1057
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1058
|
+
const _response = yield core.fetcher({
|
|
1059
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PolytomicEnvironment.Default, `api/connections/${encodeURIComponent(parentConnectionId)}/shared`),
|
|
1060
|
+
method: "GET",
|
|
1061
|
+
headers: {
|
|
1062
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
1063
|
+
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
1064
|
+
? yield core.Supplier.get(this._options.version)
|
|
1065
|
+
: undefined,
|
|
1066
|
+
"X-Fern-Language": "JavaScript",
|
|
1067
|
+
"X-Fern-SDK-Name": "polytomic",
|
|
1068
|
+
"X-Fern-SDK-Version": "1.18.1",
|
|
1069
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
1070
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
1071
|
+
},
|
|
1072
|
+
contentType: "application/json",
|
|
1073
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
1074
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
1075
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1076
|
+
});
|
|
1077
|
+
if (_response.ok) {
|
|
1078
|
+
return _response.body;
|
|
1079
|
+
}
|
|
1080
|
+
if (_response.error.reason === "status-code") {
|
|
1081
|
+
switch (_response.error.statusCode) {
|
|
1082
|
+
case 401:
|
|
1083
|
+
throw new Polytomic.UnauthorizedError(_response.error.body);
|
|
1084
|
+
case 403:
|
|
1085
|
+
throw new Polytomic.ForbiddenError(_response.error.body);
|
|
1086
|
+
case 404:
|
|
1087
|
+
throw new Polytomic.NotFoundError(_response.error.body);
|
|
1088
|
+
case 422:
|
|
1089
|
+
throw new Polytomic.UnprocessableEntityError(_response.error.body);
|
|
835
1090
|
case 500:
|
|
836
1091
|
throw new Polytomic.InternalServerError(_response.error.body);
|
|
837
1092
|
default:
|
|
@@ -848,7 +1103,7 @@ class Connections {
|
|
|
848
1103
|
body: _response.error.rawBody,
|
|
849
1104
|
});
|
|
850
1105
|
case "timeout":
|
|
851
|
-
throw new errors.PolytomicTimeoutError(
|
|
1106
|
+
throw new errors.PolytomicTimeoutError();
|
|
852
1107
|
case "unknown":
|
|
853
1108
|
throw new errors.PolytomicError({
|
|
854
1109
|
message: _response.error.errorMessage,
|