polytomic 1.11.3 → 1.14.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Client.d.ts +20 -15
- package/Client.js +9 -9
- package/LICENSE +1 -1
- package/api/errors/BadRequestError.js +17 -7
- package/api/errors/ConflictError.js +17 -7
- package/api/errors/ForbiddenError.js +17 -7
- package/api/errors/InternalServerError.js +17 -7
- package/api/errors/NotFoundError.js +17 -7
- package/api/errors/UnauthorizedError.js +17 -7
- package/api/errors/UnprocessableEntityError.js +17 -7
- package/api/resources/bulkSync/client/Client.d.ts +47 -6
- package/api/resources/bulkSync/client/Client.js +135 -157
- package/api/resources/bulkSync/client/requests/CreateBulkSyncRequest.d.ts +11 -3
- package/api/resources/bulkSync/client/requests/UpdateBulkSyncRequest.d.ts +11 -3
- package/api/resources/bulkSync/resources/executions/client/Client.d.ts +13 -2
- package/api/resources/bulkSync/resources/executions/client/Client.js +75 -79
- package/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListRequest.d.ts +18 -0
- package/api/resources/bulkSync/resources/executions/client/requests/index.d.ts +1 -0
- package/api/resources/bulkSync/resources/index.d.ts +2 -0
- package/api/resources/bulkSync/resources/index.js +20 -8
- package/api/resources/bulkSync/resources/schedules/client/Client.d.ts +113 -0
- package/api/resources/bulkSync/resources/schedules/client/Client.js +398 -0
- package/api/resources/bulkSync/resources/schedules/client/index.d.ts +1 -0
- package/api/resources/bulkSync/resources/schedules/client/index.js +17 -0
- package/api/resources/bulkSync/resources/schedules/client/requests/CreateScheduleRequest.d.ts +15 -0
- package/api/resources/bulkSync/resources/schedules/client/requests/UpdateScheduleRequest.d.ts +15 -0
- package/api/resources/bulkSync/resources/schedules/client/requests/index.d.ts +2 -0
- package/api/resources/bulkSync/resources/schedules/client/requests/index.js +2 -0
- package/api/resources/bulkSync/resources/schedules/index.d.ts +1 -0
- package/api/resources/bulkSync/resources/schedules/index.js +17 -0
- package/api/resources/bulkSync/resources/schemas/client/Client.d.ts +5 -0
- package/api/resources/bulkSync/resources/schemas/client/Client.js +49 -66
- package/api/resources/bulkSync/resources/schemas/client/requests/UpdateBulkSchema.d.ts +3 -1
- package/api/resources/bulkSync/types/V2CreateBulkSyncRequestSchemasItem.d.ts +1 -1
- package/api/resources/bulkSync/types/V2UpdateBulkSyncRequestSchemasItem.d.ts +1 -1
- package/api/resources/connections/client/Client.d.ts +41 -2
- package/api/resources/connections/client/Client.js +159 -128
- package/api/resources/connections/client/requests/ConnectCardRequest.d.ts +7 -0
- package/api/resources/connections/client/requests/CreateConnectionRequestSchema.d.ts +3 -1
- package/api/resources/connections/client/requests/TestConnectionRequest.d.ts +24 -0
- package/api/resources/connections/client/requests/UpdateConnectionRequestSchema.d.ts +3 -1
- package/api/resources/connections/client/requests/index.d.ts +1 -0
- package/api/resources/events/client/Client.d.ts +7 -2
- package/api/resources/events/client/Client.js +33 -37
- package/api/resources/events/client/requests/EventsListRequest.d.ts +2 -2
- package/api/resources/identity/client/Client.d.ts +7 -0
- package/api/resources/identity/client/Client.js +25 -20
- package/api/resources/index.d.ts +2 -1
- package/api/resources/index.js +20 -9
- package/api/resources/jobs/client/Client.d.ts +7 -2
- package/api/resources/jobs/client/Client.js +25 -22
- package/api/resources/modelSync/client/Client.d.ts +83 -52
- package/api/resources/modelSync/client/Client.js +228 -403
- package/api/resources/modelSync/client/requests/CreateModelSyncRequest.d.ts +14 -5
- package/api/resources/modelSync/client/requests/ModelSyncListRequest.d.ts +1 -1
- package/api/resources/modelSync/client/requests/StartModelSyncRequest.d.ts +1 -0
- package/api/resources/modelSync/client/requests/UpdateModelSyncRequest.d.ts +14 -5
- package/api/resources/modelSync/client/requests/index.d.ts +0 -2
- package/api/resources/modelSync/resources/executions/client/Client.d.ts +36 -8
- package/api/resources/modelSync/resources/executions/client/Client.js +137 -68
- package/api/resources/modelSync/resources/executions/client/index.d.ts +1 -1
- package/api/resources/modelSync/resources/executions/client/index.js +15 -0
- package/api/resources/modelSync/resources/executions/client/requests/ExecutionsListRequest.d.ts +16 -0
- package/api/resources/modelSync/resources/executions/client/requests/ExecutionsListRequest.js +5 -0
- package/api/resources/modelSync/resources/executions/client/requests/UpdateExecutionRequest.d.ts +13 -0
- package/api/resources/modelSync/resources/executions/client/requests/UpdateExecutionRequest.js +5 -0
- package/api/resources/modelSync/resources/executions/client/requests/index.d.ts +2 -0
- package/api/resources/modelSync/resources/executions/client/requests/index.js +2 -0
- package/api/resources/modelSync/resources/index.d.ts +3 -0
- package/api/resources/modelSync/resources/index.js +23 -7
- package/api/resources/modelSync/resources/targets/client/Client.d.ts +143 -0
- package/api/resources/modelSync/resources/targets/client/Client.js +395 -0
- package/api/resources/modelSync/resources/targets/client/index.d.ts +1 -0
- package/api/resources/modelSync/resources/targets/client/index.js +17 -0
- package/api/resources/modelSync/{client/requests/ModelSyncGetTargetFieldsRequest.d.ts → resources/targets/client/requests/TargetsGetTargetFieldsRequest.d.ts} +1 -1
- package/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetFieldsRequest.js +5 -0
- package/{dist/api/resources/modelSync/client/requests/ModelSyncGetTargetRequest.d.ts → api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetRequest.d.ts} +1 -1
- package/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetRequest.js +5 -0
- package/api/resources/modelSync/resources/targets/client/requests/index.d.ts +2 -0
- package/api/resources/modelSync/resources/targets/client/requests/index.js +2 -0
- package/api/resources/modelSync/resources/targets/index.d.ts +1 -0
- package/api/resources/modelSync/resources/targets/index.js +17 -0
- package/api/resources/models/client/Client.d.ts +5 -0
- package/api/resources/models/client/Client.js +83 -135
- package/api/resources/organization/client/Client.d.ts +7 -0
- package/api/resources/organization/client/Client.js +53 -72
- package/api/resources/permissions/client/Client.d.ts +7 -2
- package/api/resources/permissions/resources/index.js +17 -7
- package/api/resources/permissions/resources/policies/client/Client.d.ts +5 -0
- package/api/resources/permissions/resources/policies/client/Client.js +47 -72
- package/api/resources/permissions/resources/roles/client/Client.d.ts +5 -0
- package/api/resources/permissions/resources/roles/client/Client.js +47 -72
- package/api/resources/queryRunner/client/Client.d.ts +5 -0
- package/api/resources/queryRunner/client/Client.js +33 -37
- package/api/resources/schemas/client/Client.d.ts +68 -0
- package/api/resources/schemas/client/Client.js +302 -59
- package/api/resources/schemas/client/index.d.ts +1 -1
- package/api/resources/schemas/client/index.js +15 -0
- package/api/resources/schemas/client/requests/SetPrimaryKeysRequest.d.ts +11 -0
- package/api/resources/schemas/client/requests/SetPrimaryKeysRequest.js +5 -0
- package/api/resources/schemas/client/requests/UpsertSchemaFieldRequest.d.ts +11 -0
- package/api/resources/schemas/client/requests/UpsertSchemaFieldRequest.js +5 -0
- package/api/resources/schemas/client/requests/index.d.ts +2 -0
- package/api/resources/schemas/client/requests/index.js +2 -0
- package/api/resources/users/client/Client.d.ts +5 -0
- package/api/resources/users/client/Client.js +55 -87
- package/api/resources/webhooks/client/Client.d.ts +33 -4
- package/api/resources/webhooks/client/Client.js +169 -76
- package/api/types/BackendConnectionCapabilities.d.ts +9 -0
- package/api/types/BackendConnectionCapabilities.js +5 -0
- package/api/types/BackendOAuthPrompt.d.ts +8 -0
- package/api/types/BackendOAuthPrompt.js +5 -0
- package/api/types/BulkBulkSyncSchedule.d.ts +20 -0
- package/api/types/BulkBulkSyncSchedule.js +5 -0
- package/api/types/BulkDiscover.d.ts +1 -1
- package/api/types/BulkExecutionStatus.d.ts +2 -1
- package/api/types/BulkExecutionStatus.js +1 -0
- package/api/types/BulkFetchMode.d.ts +1 -1
- package/api/types/BulkField.d.ts +2 -0
- package/api/types/BulkNormalizeNames.d.ts +9 -0
- package/api/types/BulkNormalizeNames.js +11 -0
- package/api/types/BulkSchema.d.ts +1 -0
- package/api/types/BulkSchemaExecutionStatus.d.ts +2 -1
- package/api/types/BulkSchemaExecutionStatus.js +1 -0
- package/api/types/BulkSelectiveMode.d.ts +1 -1
- package/api/types/BulkSyncExecution.d.ts +6 -0
- package/api/types/BulkSyncMode.d.ts +11 -0
- package/api/types/BulkSyncMode.js +10 -0
- package/api/types/BulkSyncResponse.d.ts +10 -1
- package/api/types/BulkSyncSchemaExecution.d.ts +3 -0
- package/api/types/CancelModelSyncResponse.d.ts +6 -0
- package/api/types/CancelModelSyncResponse.js +5 -0
- package/api/types/CancelModelSyncResponseEnvelope.d.ts +7 -0
- package/api/types/CancelModelSyncResponseEnvelope.js +5 -0
- package/api/types/ConnectCardResponse.d.ts +1 -0
- package/api/types/ConnectionResponseSchema.d.ts +5 -0
- package/api/types/ConnectionType.d.ts +6 -0
- package/api/types/ConnectionTypeSchema.d.ts +1 -0
- package/api/types/CreateConnectionResponseSchema.d.ts +3 -0
- package/api/types/EventBody.d.ts +1 -1
- package/api/types/ExecutionCounts.d.ts +2 -0
- package/api/types/ExecutionStatus.d.ts +1 -1
- package/api/types/FilterFieldReferenceType.d.ts +1 -1
- package/api/types/FilterFunction.d.ts +3 -1
- package/api/types/FilterFunction.js +2 -0
- package/api/types/GetIdentityResponseSchema.d.ts +7 -0
- package/api/types/JsonschemaDefinitions.d.ts +1 -1
- package/api/types/JsonschemaForm.d.ts +1 -1
- package/api/types/LabelLabel.d.ts +1 -1
- package/api/types/ListBulkSyncExecutionsEnvelope.d.ts +1 -0
- package/api/types/ListExecutionResponseEnvelope.d.ts +1 -0
- package/api/types/ModelField.d.ts +4 -0
- package/api/types/ModelSyncField.d.ts +2 -0
- package/api/types/{SyncMode.d.ts → ModelSyncMode.d.ts} +2 -4
- package/{dist/api/types/SyncMode.js → api/types/ModelSyncMode.js} +2 -4
- package/api/types/ModelSyncResponse.d.ts +6 -1
- package/api/types/PaginationDetails.d.ts +6 -0
- package/api/types/PaginationDetails.js +5 -0
- package/api/types/ScheduleEnvelope.d.ts +7 -0
- package/api/types/ScheduleEnvelope.js +5 -0
- package/api/types/ScheduleFrequency.d.ts +1 -1
- package/api/types/SchedulesEnvelope.d.ts +7 -0
- package/api/types/SchedulesEnvelope.js +5 -0
- package/api/types/SchemaField.d.ts +2 -0
- package/api/types/SchemaIdentityFunction.d.ts +3 -1
- package/api/types/SchemaIdentityFunction.js +2 -0
- package/api/types/SchemaPrimaryKeyOverrideInput.d.ts +7 -0
- package/api/types/SchemaPrimaryKeyOverrideInput.js +5 -0
- package/api/types/StartModelSyncResponseSchema.d.ts +1 -0
- package/api/types/SupportedBulkMode.d.ts +1 -1
- package/api/types/SupportedMode.d.ts +1 -1
- package/api/types/SyncDestinationProperties.d.ts +1 -0
- package/api/types/Target.d.ts +4 -1
- package/api/types/TargetCreateInput.d.ts +11 -0
- package/api/types/TargetCreateInput.js +5 -0
- package/api/types/TargetField.d.ts +1 -0
- package/api/types/TypesType.d.ts +1 -1
- package/api/types/UpdateBulkField.d.ts +9 -0
- package/api/types/UpdateBulkField.js +5 -0
- package/api/types/UtilEnumValue.d.ts +7 -0
- package/api/types/UtilEnumValue.js +5 -0
- package/api/types/UtilFieldType.d.ts +1 -1
- package/api/types/V2ConnectionForm.d.ts +7 -0
- package/api/types/V2ConnectionForm.js +5 -0
- package/api/types/V2EnricherConfiguration.d.ts +1 -1
- package/api/types/V2EnricherMapping.d.ts +1 -1
- package/api/types/V2ExecutionLogType.d.ts +1 -1
- package/api/types/V2OrderedMapStringGithubComInvopopJsonschemaSchema.d.ts +1 -1
- package/api/types/V2SampleRecord.d.ts +1 -1
- package/api/types/V2SchemaConfigurationFieldsItem.d.ts +1 -1
- package/api/types/V4BulkSyncExecutionLogs.d.ts +1 -1
- package/api/types/V4BulkSyncScheduleApi.d.ts +13 -0
- package/api/types/V4BulkSyncScheduleApi.js +5 -0
- package/api/types/V4TargetCreator.d.ts +10 -0
- package/api/types/V4TargetCreator.js +5 -0
- package/api/types/V4TargetObjectsResponseEnvelope.d.ts +1 -0
- package/api/types/V4TargetPropertyValues.d.ts +14 -0
- package/api/types/V4TargetPropertyValues.js +5 -0
- package/api/types/V4TargetPropertyValuesEnvelope.d.ts +7 -0
- package/api/types/V4TargetPropertyValuesEnvelope.js +5 -0
- package/api/types/V4UserFieldRequest.d.ts +10 -0
- package/api/types/V4UserFieldRequest.js +5 -0
- package/api/types/Webhook.d.ts +1 -0
- package/api/types/WorkTaskStatus.d.ts +1 -1
- package/api/types/index.d.ts +21 -1
- package/api/types/index.js +21 -1
- package/core/auth/BearerToken.d.ts +1 -1
- package/core/fetcher/APIResponse.d.ts +1 -1
- package/core/fetcher/Fetcher.d.ts +6 -3
- package/core/fetcher/Fetcher.js +20 -189
- package/core/fetcher/Supplier.d.ts +1 -1
- package/core/fetcher/createRequestUrl.d.ts +1 -0
- package/core/fetcher/createRequestUrl.js +12 -0
- package/core/fetcher/getFetchFn.d.ts +4 -0
- package/core/fetcher/getFetchFn.js +68 -0
- package/core/fetcher/getHeader.js +1 -2
- package/core/fetcher/getRequestBody.d.ts +7 -0
- package/core/fetcher/getRequestBody.js +23 -0
- package/core/fetcher/getResponseBody.d.ts +1 -0
- package/core/fetcher/getResponseBody.js +54 -0
- package/core/fetcher/makeRequest.d.ts +1 -0
- package/core/fetcher/makeRequest.js +42 -0
- package/core/fetcher/requestWithRetries.d.ts +1 -0
- package/core/fetcher/requestWithRetries.js +40 -0
- package/core/fetcher/signals.d.ts +11 -0
- package/core/fetcher/signals.js +36 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +21 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +126 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +59 -0
- package/core/json.d.ts +15 -0
- package/core/json.js +24 -0
- package/core/runtime/runtime.d.ts +2 -1
- package/core/runtime/runtime.js +52 -41
- package/dist/Client.d.ts +20 -15
- package/dist/Client.js +9 -9
- package/dist/api/errors/BadRequestError.js +17 -7
- package/dist/api/errors/ConflictError.js +17 -7
- package/dist/api/errors/ForbiddenError.js +17 -7
- package/dist/api/errors/InternalServerError.js +17 -7
- package/dist/api/errors/NotFoundError.js +17 -7
- package/dist/api/errors/UnauthorizedError.js +17 -7
- package/dist/api/errors/UnprocessableEntityError.js +17 -7
- package/dist/api/resources/bulkSync/client/Client.d.ts +47 -6
- package/dist/api/resources/bulkSync/client/Client.js +135 -157
- package/dist/api/resources/bulkSync/client/requests/CreateBulkSyncRequest.d.ts +11 -3
- package/dist/api/resources/bulkSync/client/requests/UpdateBulkSyncRequest.d.ts +11 -3
- package/dist/api/resources/bulkSync/resources/executions/client/Client.d.ts +13 -2
- package/dist/api/resources/bulkSync/resources/executions/client/Client.js +75 -79
- package/dist/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListRequest.d.ts +18 -0
- package/dist/api/resources/bulkSync/resources/executions/client/requests/ExecutionsListRequest.js +5 -0
- package/dist/api/resources/bulkSync/resources/executions/client/requests/index.d.ts +1 -0
- package/dist/api/resources/bulkSync/resources/index.d.ts +2 -0
- package/dist/api/resources/bulkSync/resources/index.js +20 -8
- package/dist/api/resources/bulkSync/resources/schedules/client/Client.d.ts +113 -0
- package/dist/api/resources/bulkSync/resources/schedules/client/Client.js +398 -0
- package/dist/api/resources/bulkSync/resources/schedules/client/index.d.ts +1 -0
- package/dist/api/resources/bulkSync/resources/schedules/client/index.js +17 -0
- package/dist/api/resources/bulkSync/resources/schedules/client/requests/CreateScheduleRequest.d.ts +15 -0
- package/dist/api/resources/bulkSync/resources/schedules/client/requests/CreateScheduleRequest.js +5 -0
- package/dist/api/resources/bulkSync/resources/schedules/client/requests/UpdateScheduleRequest.d.ts +15 -0
- package/dist/api/resources/bulkSync/resources/schedules/client/requests/UpdateScheduleRequest.js +5 -0
- package/dist/api/resources/bulkSync/resources/schedules/client/requests/index.d.ts +2 -0
- package/dist/api/resources/bulkSync/resources/schedules/client/requests/index.js +2 -0
- package/dist/api/resources/bulkSync/resources/schedules/index.d.ts +1 -0
- package/dist/api/resources/bulkSync/resources/schedules/index.js +17 -0
- package/dist/api/resources/bulkSync/resources/schemas/client/Client.d.ts +5 -0
- package/dist/api/resources/bulkSync/resources/schemas/client/Client.js +49 -66
- package/dist/api/resources/bulkSync/resources/schemas/client/requests/UpdateBulkSchema.d.ts +3 -1
- package/dist/api/resources/bulkSync/types/V2CreateBulkSyncRequestSchemasItem.d.ts +1 -1
- package/dist/api/resources/bulkSync/types/V2UpdateBulkSyncRequestSchemasItem.d.ts +1 -1
- package/dist/api/resources/connections/client/Client.d.ts +41 -2
- package/dist/api/resources/connections/client/Client.js +159 -128
- package/dist/api/resources/connections/client/requests/ConnectCardRequest.d.ts +7 -0
- package/dist/api/resources/connections/client/requests/CreateConnectionRequestSchema.d.ts +3 -1
- package/dist/api/resources/connections/client/requests/TestConnectionRequest.d.ts +24 -0
- package/dist/api/resources/connections/client/requests/TestConnectionRequest.js +5 -0
- package/dist/api/resources/connections/client/requests/UpdateConnectionRequestSchema.d.ts +3 -1
- package/dist/api/resources/connections/client/requests/index.d.ts +1 -0
- package/dist/api/resources/events/client/Client.d.ts +7 -2
- package/dist/api/resources/events/client/Client.js +33 -37
- package/dist/api/resources/events/client/requests/EventsListRequest.d.ts +2 -2
- package/dist/api/resources/identity/client/Client.d.ts +7 -0
- package/dist/api/resources/identity/client/Client.js +25 -20
- package/dist/api/resources/index.d.ts +2 -1
- package/dist/api/resources/index.js +20 -9
- package/dist/api/resources/jobs/client/Client.d.ts +7 -2
- package/dist/api/resources/jobs/client/Client.js +25 -22
- package/dist/api/resources/modelSync/client/Client.d.ts +83 -52
- package/dist/api/resources/modelSync/client/Client.js +228 -403
- package/dist/api/resources/modelSync/client/requests/CreateModelSyncRequest.d.ts +14 -5
- package/dist/api/resources/modelSync/client/requests/ModelSyncListRequest.d.ts +1 -1
- package/dist/api/resources/modelSync/client/requests/StartModelSyncRequest.d.ts +1 -0
- package/dist/api/resources/modelSync/client/requests/UpdateModelSyncRequest.d.ts +14 -5
- package/dist/api/resources/modelSync/client/requests/index.d.ts +0 -2
- package/dist/api/resources/modelSync/resources/executions/client/Client.d.ts +36 -8
- package/dist/api/resources/modelSync/resources/executions/client/Client.js +137 -68
- package/dist/api/resources/modelSync/resources/executions/client/index.d.ts +1 -1
- package/dist/api/resources/modelSync/resources/executions/client/index.js +15 -0
- package/dist/api/resources/modelSync/resources/executions/client/requests/ExecutionsListRequest.d.ts +16 -0
- package/dist/api/resources/modelSync/resources/executions/client/requests/ExecutionsListRequest.js +5 -0
- package/dist/api/resources/modelSync/resources/executions/client/requests/UpdateExecutionRequest.d.ts +13 -0
- package/dist/api/resources/modelSync/resources/executions/client/requests/UpdateExecutionRequest.js +5 -0
- package/dist/api/resources/modelSync/resources/executions/client/requests/index.d.ts +2 -0
- package/dist/api/resources/modelSync/resources/executions/client/requests/index.js +2 -0
- package/dist/api/resources/modelSync/resources/index.d.ts +3 -0
- package/dist/api/resources/modelSync/resources/index.js +23 -7
- package/dist/api/resources/modelSync/resources/targets/client/Client.d.ts +143 -0
- package/dist/api/resources/modelSync/resources/targets/client/Client.js +395 -0
- package/dist/api/resources/modelSync/resources/targets/client/index.d.ts +1 -0
- package/dist/api/resources/modelSync/resources/targets/client/index.js +17 -0
- package/dist/api/resources/modelSync/{client/requests/ModelSyncGetTargetFieldsRequest.d.ts → resources/targets/client/requests/TargetsGetTargetFieldsRequest.d.ts} +1 -1
- package/dist/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetFieldsRequest.js +5 -0
- package/{api/resources/modelSync/client/requests/ModelSyncGetTargetRequest.d.ts → dist/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetRequest.d.ts} +1 -1
- package/dist/api/resources/modelSync/resources/targets/client/requests/TargetsGetTargetRequest.js +5 -0
- package/dist/api/resources/modelSync/resources/targets/client/requests/index.d.ts +2 -0
- package/dist/api/resources/modelSync/resources/targets/client/requests/index.js +2 -0
- package/dist/api/resources/modelSync/resources/targets/index.d.ts +1 -0
- package/dist/api/resources/modelSync/resources/targets/index.js +17 -0
- package/dist/api/resources/models/client/Client.d.ts +5 -0
- package/dist/api/resources/models/client/Client.js +83 -135
- package/dist/api/resources/organization/client/Client.d.ts +7 -0
- package/dist/api/resources/organization/client/Client.js +53 -72
- package/dist/api/resources/permissions/client/Client.d.ts +7 -2
- package/dist/api/resources/permissions/resources/index.js +17 -7
- package/dist/api/resources/permissions/resources/policies/client/Client.d.ts +5 -0
- package/dist/api/resources/permissions/resources/policies/client/Client.js +47 -72
- package/dist/api/resources/permissions/resources/roles/client/Client.d.ts +5 -0
- package/dist/api/resources/permissions/resources/roles/client/Client.js +47 -72
- package/dist/api/resources/queryRunner/client/Client.d.ts +5 -0
- package/dist/api/resources/queryRunner/client/Client.js +33 -37
- package/dist/api/resources/schemas/client/Client.d.ts +68 -0
- package/dist/api/resources/schemas/client/Client.js +302 -59
- package/dist/api/resources/schemas/client/index.d.ts +1 -1
- package/dist/api/resources/schemas/client/index.js +15 -0
- package/dist/api/resources/schemas/client/requests/SetPrimaryKeysRequest.d.ts +11 -0
- package/dist/api/resources/schemas/client/requests/SetPrimaryKeysRequest.js +5 -0
- package/dist/api/resources/schemas/client/requests/UpsertSchemaFieldRequest.d.ts +11 -0
- package/dist/api/resources/schemas/client/requests/UpsertSchemaFieldRequest.js +5 -0
- package/dist/api/resources/schemas/client/requests/index.d.ts +2 -0
- package/dist/api/resources/schemas/client/requests/index.js +2 -0
- package/dist/api/resources/users/client/Client.d.ts +5 -0
- package/dist/api/resources/users/client/Client.js +55 -87
- package/dist/api/resources/webhooks/client/Client.d.ts +33 -4
- package/dist/api/resources/webhooks/client/Client.js +169 -76
- package/dist/api/types/BackendConnectionCapabilities.d.ts +9 -0
- package/dist/api/types/BackendConnectionCapabilities.js +5 -0
- package/dist/api/types/BackendOAuthPrompt.d.ts +8 -0
- package/dist/api/types/BackendOAuthPrompt.js +5 -0
- package/dist/api/types/BulkBulkSyncSchedule.d.ts +20 -0
- package/dist/api/types/BulkBulkSyncSchedule.js +5 -0
- package/dist/api/types/BulkDiscover.d.ts +1 -1
- package/dist/api/types/BulkExecutionStatus.d.ts +2 -1
- package/dist/api/types/BulkExecutionStatus.js +1 -0
- package/dist/api/types/BulkFetchMode.d.ts +1 -1
- package/dist/api/types/BulkField.d.ts +2 -0
- package/dist/api/types/BulkNormalizeNames.d.ts +9 -0
- package/dist/api/types/BulkNormalizeNames.js +11 -0
- package/dist/api/types/BulkSchema.d.ts +1 -0
- package/dist/api/types/BulkSchemaExecutionStatus.d.ts +2 -1
- package/dist/api/types/BulkSchemaExecutionStatus.js +1 -0
- package/dist/api/types/BulkSelectiveMode.d.ts +1 -1
- package/dist/api/types/BulkSyncExecution.d.ts +6 -0
- package/dist/api/types/BulkSyncMode.d.ts +11 -0
- package/dist/api/types/BulkSyncMode.js +10 -0
- package/dist/api/types/BulkSyncResponse.d.ts +10 -1
- package/dist/api/types/BulkSyncSchemaExecution.d.ts +3 -0
- package/dist/api/types/CancelModelSyncResponse.d.ts +6 -0
- package/dist/api/types/CancelModelSyncResponse.js +5 -0
- package/dist/api/types/CancelModelSyncResponseEnvelope.d.ts +7 -0
- package/dist/api/types/CancelModelSyncResponseEnvelope.js +5 -0
- package/dist/api/types/ConnectCardResponse.d.ts +1 -0
- package/dist/api/types/ConnectionResponseSchema.d.ts +5 -0
- package/dist/api/types/ConnectionType.d.ts +6 -0
- package/dist/api/types/ConnectionTypeSchema.d.ts +1 -0
- package/dist/api/types/CreateConnectionResponseSchema.d.ts +3 -0
- package/dist/api/types/EventBody.d.ts +1 -1
- package/dist/api/types/ExecutionCounts.d.ts +2 -0
- package/dist/api/types/ExecutionStatus.d.ts +1 -1
- package/dist/api/types/FilterFieldReferenceType.d.ts +1 -1
- package/dist/api/types/FilterFunction.d.ts +3 -1
- package/dist/api/types/FilterFunction.js +2 -0
- package/dist/api/types/GetIdentityResponseSchema.d.ts +7 -0
- package/dist/api/types/JsonschemaDefinitions.d.ts +1 -1
- package/dist/api/types/JsonschemaForm.d.ts +1 -1
- package/dist/api/types/LabelLabel.d.ts +1 -1
- package/dist/api/types/ListBulkSyncExecutionsEnvelope.d.ts +1 -0
- package/dist/api/types/ListExecutionResponseEnvelope.d.ts +1 -0
- package/dist/api/types/ModelField.d.ts +4 -0
- package/dist/api/types/ModelSyncField.d.ts +2 -0
- package/dist/api/types/{SyncMode.d.ts → ModelSyncMode.d.ts} +2 -4
- package/{api/types/SyncMode.js → dist/api/types/ModelSyncMode.js} +2 -4
- package/dist/api/types/ModelSyncResponse.d.ts +6 -1
- package/dist/api/types/PaginationDetails.d.ts +6 -0
- package/dist/api/types/PaginationDetails.js +5 -0
- package/dist/api/types/ScheduleEnvelope.d.ts +7 -0
- package/dist/api/types/ScheduleEnvelope.js +5 -0
- package/dist/api/types/ScheduleFrequency.d.ts +1 -1
- package/dist/api/types/SchedulesEnvelope.d.ts +7 -0
- package/dist/api/types/SchedulesEnvelope.js +5 -0
- package/dist/api/types/SchemaField.d.ts +2 -0
- package/dist/api/types/SchemaIdentityFunction.d.ts +3 -1
- package/dist/api/types/SchemaIdentityFunction.js +2 -0
- package/dist/api/types/SchemaPrimaryKeyOverrideInput.d.ts +7 -0
- package/dist/api/types/SchemaPrimaryKeyOverrideInput.js +5 -0
- package/dist/api/types/StartModelSyncResponseSchema.d.ts +1 -0
- package/dist/api/types/SupportedBulkMode.d.ts +1 -1
- package/dist/api/types/SupportedMode.d.ts +1 -1
- package/dist/api/types/SyncDestinationProperties.d.ts +1 -0
- package/dist/api/types/Target.d.ts +4 -1
- package/dist/api/types/TargetCreateInput.d.ts +11 -0
- package/dist/api/types/TargetCreateInput.js +5 -0
- package/dist/api/types/TargetField.d.ts +1 -0
- package/dist/api/types/TypesType.d.ts +1 -1
- package/dist/api/types/UpdateBulkField.d.ts +9 -0
- package/dist/api/types/UpdateBulkField.js +5 -0
- package/dist/api/types/UtilEnumValue.d.ts +7 -0
- package/dist/api/types/UtilEnumValue.js +5 -0
- package/dist/api/types/UtilFieldType.d.ts +1 -1
- package/dist/api/types/V2ConnectionForm.d.ts +7 -0
- package/dist/api/types/V2ConnectionForm.js +5 -0
- package/dist/api/types/V2EnricherConfiguration.d.ts +1 -1
- package/dist/api/types/V2EnricherMapping.d.ts +1 -1
- package/dist/api/types/V2ExecutionLogType.d.ts +1 -1
- package/dist/api/types/V2OrderedMapStringGithubComInvopopJsonschemaSchema.d.ts +1 -1
- package/dist/api/types/V2SampleRecord.d.ts +1 -1
- package/dist/api/types/V2SchemaConfigurationFieldsItem.d.ts +1 -1
- package/dist/api/types/V4BulkSyncExecutionLogs.d.ts +1 -1
- package/dist/api/types/V4BulkSyncScheduleApi.d.ts +13 -0
- package/dist/api/types/V4BulkSyncScheduleApi.js +5 -0
- package/dist/api/types/V4TargetCreator.d.ts +10 -0
- package/dist/api/types/V4TargetCreator.js +5 -0
- package/dist/api/types/V4TargetObjectsResponseEnvelope.d.ts +1 -0
- package/dist/api/types/V4TargetPropertyValues.d.ts +14 -0
- package/dist/api/types/V4TargetPropertyValues.js +5 -0
- package/dist/api/types/V4TargetPropertyValuesEnvelope.d.ts +7 -0
- package/dist/api/types/V4TargetPropertyValuesEnvelope.js +5 -0
- package/dist/api/types/V4UserFieldRequest.d.ts +10 -0
- package/dist/api/types/V4UserFieldRequest.js +5 -0
- package/dist/api/types/Webhook.d.ts +1 -0
- package/dist/api/types/WorkTaskStatus.d.ts +1 -1
- package/dist/api/types/index.d.ts +21 -1
- package/dist/api/types/index.js +21 -1
- package/dist/core/auth/BearerToken.d.ts +1 -1
- package/dist/core/fetcher/APIResponse.d.ts +1 -1
- package/dist/core/fetcher/Fetcher.d.ts +6 -3
- package/dist/core/fetcher/Fetcher.js +20 -189
- package/dist/core/fetcher/Supplier.d.ts +1 -1
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/core/fetcher/createRequestUrl.js +12 -0
- package/dist/core/fetcher/getFetchFn.d.ts +4 -0
- package/dist/core/fetcher/getFetchFn.js +68 -0
- package/dist/core/fetcher/getHeader.js +1 -2
- package/dist/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/core/fetcher/getRequestBody.js +23 -0
- package/dist/core/fetcher/getResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getResponseBody.js +54 -0
- package/dist/core/fetcher/makeRequest.d.ts +1 -0
- package/dist/core/fetcher/makeRequest.js +42 -0
- package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
- package/dist/core/fetcher/requestWithRetries.js +40 -0
- package/dist/core/fetcher/signals.d.ts +11 -0
- package/dist/core/fetcher/signals.js +36 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +21 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +126 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +59 -0
- package/dist/core/json.d.ts +15 -0
- package/dist/core/json.js +24 -0
- package/dist/core/runtime/runtime.d.ts +2 -1
- package/dist/core/runtime/runtime.js +52 -41
- package/dist/environments.d.ts +1 -1
- package/dist/errors/PolytomicError.js +2 -1
- package/dist/errors/PolytomicTimeoutError.d.ts +1 -1
- package/dist/errors/PolytomicTimeoutError.js +2 -2
- package/dist/index.js +17 -7
- package/dist/version.d.ts +1 -0
- package/dist/version.js +4 -0
- package/environments.d.ts +1 -1
- package/errors/PolytomicError.js +2 -1
- package/errors/PolytomicTimeoutError.d.ts +1 -1
- package/errors/PolytomicTimeoutError.js +2 -2
- package/index.js +17 -7
- package/{jest.config.js → jest.config.mjs} +4 -1
- package/package.json +18 -14
- package/reference.md +6382 -0
- package/scripts/rename-to-esm-files.js +115 -0
- package/version.d.ts +1 -0
- package/version.js +4 -0
- /package/api/resources/{modelSync/client/requests/ModelSyncGetTargetFieldsRequest.js → bulkSync/resources/executions/client/requests/ExecutionsListRequest.js} +0 -0
- /package/api/resources/{modelSync/client/requests/ModelSyncGetTargetRequest.js → bulkSync/resources/schedules/client/requests/CreateScheduleRequest.js} +0 -0
- /package/{dist/api/resources/modelSync/client/requests/ModelSyncGetTargetFieldsRequest.js → api/resources/bulkSync/resources/schedules/client/requests/UpdateScheduleRequest.js} +0 -0
- /package/{dist/api/resources/modelSync/client/requests/ModelSyncGetTargetRequest.js → api/resources/connections/client/requests/TestConnectionRequest.js} +0 -0
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
39
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
40
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -58,23 +68,16 @@ class Connections {
|
|
|
58
68
|
* await client.connections.getTypes()
|
|
59
69
|
*/
|
|
60
70
|
getTypes(requestOptions) {
|
|
61
|
-
var _a;
|
|
62
71
|
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
+
var _a, _b;
|
|
63
73
|
const _response = yield core.fetcher({
|
|
64
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.
|
|
74
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, "api/connection_types"),
|
|
65
75
|
method: "GET",
|
|
66
|
-
headers: {
|
|
67
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
68
|
-
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
76
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
69
77
|
? yield core.Supplier.get(this._options.version)
|
|
70
|
-
: undefined,
|
|
71
|
-
"X-Fern-Language": "JavaScript",
|
|
72
|
-
"X-Fern-SDK-Name": "polytomic",
|
|
73
|
-
"X-Fern-SDK-Version": "1.11.3",
|
|
74
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
75
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
76
|
-
},
|
|
78
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.14.4", "User-Agent": "polytomic/1.14.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
77
79
|
contentType: "application/json",
|
|
80
|
+
requestType: "json",
|
|
78
81
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
79
82
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
80
83
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -102,7 +105,7 @@ class Connections {
|
|
|
102
105
|
body: _response.error.rawBody,
|
|
103
106
|
});
|
|
104
107
|
case "timeout":
|
|
105
|
-
throw new errors.PolytomicTimeoutError();
|
|
108
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/connection_types.");
|
|
106
109
|
case "unknown":
|
|
107
110
|
throw new errors.PolytomicError({
|
|
108
111
|
message: _response.error.errorMessage,
|
|
@@ -122,23 +125,16 @@ class Connections {
|
|
|
122
125
|
* await client.connections.getConnectionTypeSchema("postgresql")
|
|
123
126
|
*/
|
|
124
127
|
getConnectionTypeSchema(id, requestOptions) {
|
|
125
|
-
var _a;
|
|
126
128
|
return __awaiter(this, void 0, void 0, function* () {
|
|
129
|
+
var _a, _b;
|
|
127
130
|
const _response = yield core.fetcher({
|
|
128
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.
|
|
131
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/connection_types/${encodeURIComponent(id)}`),
|
|
129
132
|
method: "GET",
|
|
130
|
-
headers: {
|
|
131
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
132
|
-
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
133
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
133
134
|
? yield core.Supplier.get(this._options.version)
|
|
134
|
-
: undefined,
|
|
135
|
-
"X-Fern-Language": "JavaScript",
|
|
136
|
-
"X-Fern-SDK-Name": "polytomic",
|
|
137
|
-
"X-Fern-SDK-Version": "1.11.3",
|
|
138
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
139
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
140
|
-
},
|
|
135
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.14.4", "User-Agent": "polytomic/1.14.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
141
136
|
contentType: "application/json",
|
|
137
|
+
requestType: "json",
|
|
142
138
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
143
139
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
144
140
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -168,7 +164,7 @@ class Connections {
|
|
|
168
164
|
body: _response.error.rawBody,
|
|
169
165
|
});
|
|
170
166
|
case "timeout":
|
|
171
|
-
throw new errors.PolytomicTimeoutError();
|
|
167
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/connection_types/{id}.");
|
|
172
168
|
case "unknown":
|
|
173
169
|
throw new errors.PolytomicError({
|
|
174
170
|
message: _response.error.errorMessage,
|
|
@@ -186,23 +182,16 @@ class Connections {
|
|
|
186
182
|
* await client.connections.list()
|
|
187
183
|
*/
|
|
188
184
|
list(requestOptions) {
|
|
189
|
-
var _a;
|
|
190
185
|
return __awaiter(this, void 0, void 0, function* () {
|
|
186
|
+
var _a, _b;
|
|
191
187
|
const _response = yield core.fetcher({
|
|
192
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.
|
|
188
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, "api/connections"),
|
|
193
189
|
method: "GET",
|
|
194
|
-
headers: {
|
|
195
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
196
|
-
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
190
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
197
191
|
? yield core.Supplier.get(this._options.version)
|
|
198
|
-
: undefined,
|
|
199
|
-
"X-Fern-Language": "JavaScript",
|
|
200
|
-
"X-Fern-SDK-Name": "polytomic",
|
|
201
|
-
"X-Fern-SDK-Version": "1.11.3",
|
|
202
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
203
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
204
|
-
},
|
|
192
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.14.4", "User-Agent": "polytomic/1.14.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
205
193
|
contentType: "application/json",
|
|
194
|
+
requestType: "json",
|
|
206
195
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
207
196
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
208
197
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -230,7 +219,7 @@ class Connections {
|
|
|
230
219
|
body: _response.error.rawBody,
|
|
231
220
|
});
|
|
232
221
|
case "timeout":
|
|
233
|
-
throw new errors.PolytomicTimeoutError();
|
|
222
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/connections.");
|
|
234
223
|
case "unknown":
|
|
235
224
|
throw new errors.PolytomicError({
|
|
236
225
|
message: _response.error.errorMessage,
|
|
@@ -253,7 +242,7 @@ class Connections {
|
|
|
253
242
|
* configuration: {
|
|
254
243
|
* "database": "example",
|
|
255
244
|
* "hostname": "postgres.example.com",
|
|
256
|
-
* "password": "
|
|
245
|
+
* "password": "********",
|
|
257
246
|
* "port": 5432,
|
|
258
247
|
* "username": "user"
|
|
259
248
|
* },
|
|
@@ -262,23 +251,16 @@ class Connections {
|
|
|
262
251
|
* })
|
|
263
252
|
*/
|
|
264
253
|
create(request, requestOptions) {
|
|
265
|
-
var _a;
|
|
266
254
|
return __awaiter(this, void 0, void 0, function* () {
|
|
255
|
+
var _a, _b;
|
|
267
256
|
const _response = yield core.fetcher({
|
|
268
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.
|
|
257
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, "api/connections"),
|
|
269
258
|
method: "POST",
|
|
270
|
-
headers: {
|
|
271
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
272
|
-
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
259
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
273
260
|
? yield core.Supplier.get(this._options.version)
|
|
274
|
-
: undefined,
|
|
275
|
-
"X-Fern-Language": "JavaScript",
|
|
276
|
-
"X-Fern-SDK-Name": "polytomic",
|
|
277
|
-
"X-Fern-SDK-Version": "1.11.3",
|
|
278
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
279
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
280
|
-
},
|
|
261
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.14.4", "User-Agent": "polytomic/1.14.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
281
262
|
contentType: "application/json",
|
|
263
|
+
requestType: "json",
|
|
282
264
|
body: request,
|
|
283
265
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
284
266
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -313,7 +295,7 @@ class Connections {
|
|
|
313
295
|
body: _response.error.rawBody,
|
|
314
296
|
});
|
|
315
297
|
case "timeout":
|
|
316
|
-
throw new errors.PolytomicTimeoutError();
|
|
298
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling POST /api/connections.");
|
|
317
299
|
case "unknown":
|
|
318
300
|
throw new errors.PolytomicError({
|
|
319
301
|
message: _response.error.errorMessage,
|
|
@@ -322,6 +304,16 @@ class Connections {
|
|
|
322
304
|
});
|
|
323
305
|
}
|
|
324
306
|
/**
|
|
307
|
+
* Creates a new request for [Polytomic Connect](https://www.polytomic.com/connect).
|
|
308
|
+
*
|
|
309
|
+
* This endpoint configures a Polytomic Connect request and returns the URL to
|
|
310
|
+
* redirect users to. This allows embedding Polytomic connection authorization in
|
|
311
|
+
* other applications.
|
|
312
|
+
*
|
|
313
|
+
* See also:
|
|
314
|
+
*
|
|
315
|
+
* - [Embedding authentication](https://apidocs.polytomic.com/2024-02-08/guides/embedding-authentication), a guide to using Polytomic Connect.
|
|
316
|
+
*
|
|
325
317
|
* @param {Polytomic.ConnectCardRequest} request
|
|
326
318
|
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
327
319
|
*
|
|
@@ -337,23 +329,16 @@ class Connections {
|
|
|
337
329
|
* })
|
|
338
330
|
*/
|
|
339
331
|
connect(request, requestOptions) {
|
|
340
|
-
var _a;
|
|
341
332
|
return __awaiter(this, void 0, void 0, function* () {
|
|
333
|
+
var _a, _b;
|
|
342
334
|
const _response = yield core.fetcher({
|
|
343
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.
|
|
335
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, "api/connections/connect/"),
|
|
344
336
|
method: "POST",
|
|
345
|
-
headers: {
|
|
346
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
347
|
-
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
337
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
348
338
|
? yield core.Supplier.get(this._options.version)
|
|
349
|
-
: undefined,
|
|
350
|
-
"X-Fern-Language": "JavaScript",
|
|
351
|
-
"X-Fern-SDK-Name": "polytomic",
|
|
352
|
-
"X-Fern-SDK-Version": "1.11.3",
|
|
353
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
354
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
355
|
-
},
|
|
339
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.14.4", "User-Agent": "polytomic/1.14.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
356
340
|
contentType: "application/json",
|
|
341
|
+
requestType: "json",
|
|
357
342
|
body: request,
|
|
358
343
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
359
344
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -386,7 +371,81 @@ class Connections {
|
|
|
386
371
|
body: _response.error.rawBody,
|
|
387
372
|
});
|
|
388
373
|
case "timeout":
|
|
389
|
-
throw new errors.PolytomicTimeoutError();
|
|
374
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling POST /api/connections/connect/.");
|
|
375
|
+
case "unknown":
|
|
376
|
+
throw new errors.PolytomicError({
|
|
377
|
+
message: _response.error.errorMessage,
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* Tests a connection configuration.
|
|
384
|
+
*
|
|
385
|
+
* @param {Polytomic.TestConnectionRequest} request
|
|
386
|
+
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
387
|
+
*
|
|
388
|
+
* @throws {@link Polytomic.BadRequestError}
|
|
389
|
+
* @throws {@link Polytomic.UnauthorizedError}
|
|
390
|
+
* @throws {@link Polytomic.NotFoundError}
|
|
391
|
+
* @throws {@link Polytomic.InternalServerError}
|
|
392
|
+
*
|
|
393
|
+
* @example
|
|
394
|
+
* await client.connections.testConnection({
|
|
395
|
+
* configuration: {
|
|
396
|
+
* "database": "example",
|
|
397
|
+
* "hostname": "postgres.example.com",
|
|
398
|
+
* "password": "password",
|
|
399
|
+
* "port": 5432,
|
|
400
|
+
* "username": "user"
|
|
401
|
+
* },
|
|
402
|
+
* type: "postgresql"
|
|
403
|
+
* })
|
|
404
|
+
*/
|
|
405
|
+
testConnection(request, requestOptions) {
|
|
406
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
407
|
+
var _a, _b;
|
|
408
|
+
const _response = yield core.fetcher({
|
|
409
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, "api/connections/test"),
|
|
410
|
+
method: "POST",
|
|
411
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
412
|
+
? yield core.Supplier.get(this._options.version)
|
|
413
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.14.4", "User-Agent": "polytomic/1.14.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
414
|
+
contentType: "application/json",
|
|
415
|
+
requestType: "json",
|
|
416
|
+
body: request,
|
|
417
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
418
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
419
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
420
|
+
});
|
|
421
|
+
if (_response.ok) {
|
|
422
|
+
return;
|
|
423
|
+
}
|
|
424
|
+
if (_response.error.reason === "status-code") {
|
|
425
|
+
switch (_response.error.statusCode) {
|
|
426
|
+
case 400:
|
|
427
|
+
throw new Polytomic.BadRequestError(_response.error.body);
|
|
428
|
+
case 401:
|
|
429
|
+
throw new Polytomic.UnauthorizedError(_response.error.body);
|
|
430
|
+
case 404:
|
|
431
|
+
throw new Polytomic.NotFoundError(_response.error.body);
|
|
432
|
+
case 500:
|
|
433
|
+
throw new Polytomic.InternalServerError(_response.error.body);
|
|
434
|
+
default:
|
|
435
|
+
throw new errors.PolytomicError({
|
|
436
|
+
statusCode: _response.error.statusCode,
|
|
437
|
+
body: _response.error.body,
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
switch (_response.error.reason) {
|
|
442
|
+
case "non-json":
|
|
443
|
+
throw new errors.PolytomicError({
|
|
444
|
+
statusCode: _response.error.statusCode,
|
|
445
|
+
body: _response.error.rawBody,
|
|
446
|
+
});
|
|
447
|
+
case "timeout":
|
|
448
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling POST /api/connections/test.");
|
|
390
449
|
case "unknown":
|
|
391
450
|
throw new errors.PolytomicError({
|
|
392
451
|
message: _response.error.errorMessage,
|
|
@@ -406,23 +465,16 @@ class Connections {
|
|
|
406
465
|
* await client.connections.get("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
407
466
|
*/
|
|
408
467
|
get(id, requestOptions) {
|
|
409
|
-
var _a;
|
|
410
468
|
return __awaiter(this, void 0, void 0, function* () {
|
|
469
|
+
var _a, _b;
|
|
411
470
|
const _response = yield core.fetcher({
|
|
412
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.
|
|
471
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/connections/${encodeURIComponent(id)}`),
|
|
413
472
|
method: "GET",
|
|
414
|
-
headers: {
|
|
415
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
416
|
-
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
473
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
417
474
|
? yield core.Supplier.get(this._options.version)
|
|
418
|
-
: undefined,
|
|
419
|
-
"X-Fern-Language": "JavaScript",
|
|
420
|
-
"X-Fern-SDK-Name": "polytomic",
|
|
421
|
-
"X-Fern-SDK-Version": "1.11.3",
|
|
422
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
423
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
424
|
-
},
|
|
475
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.14.4", "User-Agent": "polytomic/1.14.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
425
476
|
contentType: "application/json",
|
|
477
|
+
requestType: "json",
|
|
426
478
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
427
479
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
428
480
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -452,7 +504,7 @@ class Connections {
|
|
|
452
504
|
body: _response.error.rawBody,
|
|
453
505
|
});
|
|
454
506
|
case "timeout":
|
|
455
|
-
throw new errors.PolytomicTimeoutError();
|
|
507
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/connections/{id}.");
|
|
456
508
|
case "unknown":
|
|
457
509
|
throw new errors.PolytomicError({
|
|
458
510
|
message: _response.error.errorMessage,
|
|
@@ -477,7 +529,7 @@ class Connections {
|
|
|
477
529
|
* configuration: {
|
|
478
530
|
* "database": "example",
|
|
479
531
|
* "hostname": "postgres.example.com",
|
|
480
|
-
* "password": "
|
|
532
|
+
* "password": "********",
|
|
481
533
|
* "port": 5432,
|
|
482
534
|
* "username": "user"
|
|
483
535
|
* },
|
|
@@ -485,23 +537,16 @@ class Connections {
|
|
|
485
537
|
* })
|
|
486
538
|
*/
|
|
487
539
|
update(id, request, requestOptions) {
|
|
488
|
-
var _a;
|
|
489
540
|
return __awaiter(this, void 0, void 0, function* () {
|
|
541
|
+
var _a, _b;
|
|
490
542
|
const _response = yield core.fetcher({
|
|
491
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.
|
|
543
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/connections/${encodeURIComponent(id)}`),
|
|
492
544
|
method: "PUT",
|
|
493
|
-
headers: {
|
|
494
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
495
|
-
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
545
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
496
546
|
? yield core.Supplier.get(this._options.version)
|
|
497
|
-
: undefined,
|
|
498
|
-
"X-Fern-Language": "JavaScript",
|
|
499
|
-
"X-Fern-SDK-Name": "polytomic",
|
|
500
|
-
"X-Fern-SDK-Version": "1.11.3",
|
|
501
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
502
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
503
|
-
},
|
|
547
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.14.4", "User-Agent": "polytomic/1.14.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
504
548
|
contentType: "application/json",
|
|
549
|
+
requestType: "json",
|
|
505
550
|
body: request,
|
|
506
551
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
507
552
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -538,7 +583,7 @@ class Connections {
|
|
|
538
583
|
body: _response.error.rawBody,
|
|
539
584
|
});
|
|
540
585
|
case "timeout":
|
|
541
|
-
throw new errors.PolytomicTimeoutError();
|
|
586
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling PUT /api/connections/{id}.");
|
|
542
587
|
case "unknown":
|
|
543
588
|
throw new errors.PolytomicError({
|
|
544
589
|
message: _response.error.errorMessage,
|
|
@@ -562,30 +607,23 @@ class Connections {
|
|
|
562
607
|
* force: true
|
|
563
608
|
* })
|
|
564
609
|
*/
|
|
565
|
-
remove(
|
|
566
|
-
|
|
567
|
-
|
|
610
|
+
remove(id_1) {
|
|
611
|
+
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
|
612
|
+
var _a, _b;
|
|
568
613
|
const { force } = request;
|
|
569
614
|
const _queryParams = {};
|
|
570
615
|
if (force != null) {
|
|
571
616
|
_queryParams["force"] = force.toString();
|
|
572
617
|
}
|
|
573
618
|
const _response = yield core.fetcher({
|
|
574
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.
|
|
619
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/connections/${encodeURIComponent(id)}`),
|
|
575
620
|
method: "DELETE",
|
|
576
|
-
headers: {
|
|
577
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
578
|
-
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
621
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
579
622
|
? yield core.Supplier.get(this._options.version)
|
|
580
|
-
: undefined,
|
|
581
|
-
"X-Fern-Language": "JavaScript",
|
|
582
|
-
"X-Fern-SDK-Name": "polytomic",
|
|
583
|
-
"X-Fern-SDK-Version": "1.11.3",
|
|
584
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
585
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
586
|
-
},
|
|
623
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.14.4", "User-Agent": "polytomic/1.14.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
587
624
|
contentType: "application/json",
|
|
588
625
|
queryParameters: _queryParams,
|
|
626
|
+
requestType: "json",
|
|
589
627
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
590
628
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
591
629
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -619,7 +657,7 @@ class Connections {
|
|
|
619
657
|
body: _response.error.rawBody,
|
|
620
658
|
});
|
|
621
659
|
case "timeout":
|
|
622
|
-
throw new errors.PolytomicTimeoutError();
|
|
660
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling DELETE /api/connections/{id}.");
|
|
623
661
|
case "unknown":
|
|
624
662
|
throw new errors.PolytomicError({
|
|
625
663
|
message: _response.error.errorMessage,
|
|
@@ -639,23 +677,16 @@ class Connections {
|
|
|
639
677
|
* await client.connections.getParameterValues("248df4b7-aa70-47b8-a036-33ac447e668d")
|
|
640
678
|
*/
|
|
641
679
|
getParameterValues(id, requestOptions) {
|
|
642
|
-
var _a;
|
|
643
680
|
return __awaiter(this, void 0, void 0, function* () {
|
|
681
|
+
var _a, _b;
|
|
644
682
|
const _response = yield core.fetcher({
|
|
645
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.
|
|
683
|
+
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.PolytomicEnvironment.Default, `api/connections/${encodeURIComponent(id)}/parameter_values`),
|
|
646
684
|
method: "GET",
|
|
647
|
-
headers: {
|
|
648
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
649
|
-
"X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
685
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Polytomic-Version": (yield core.Supplier.get(this._options.version)) != null
|
|
650
686
|
? yield core.Supplier.get(this._options.version)
|
|
651
|
-
: undefined,
|
|
652
|
-
"X-Fern-Language": "JavaScript",
|
|
653
|
-
"X-Fern-SDK-Name": "polytomic",
|
|
654
|
-
"X-Fern-SDK-Version": "1.11.3",
|
|
655
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
656
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
657
|
-
},
|
|
687
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "polytomic", "X-Fern-SDK-Version": "1.14.4", "User-Agent": "polytomic/1.14.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
658
688
|
contentType: "application/json",
|
|
689
|
+
requestType: "json",
|
|
659
690
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
660
691
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
661
692
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -685,7 +716,7 @@ class Connections {
|
|
|
685
716
|
body: _response.error.rawBody,
|
|
686
717
|
});
|
|
687
718
|
case "timeout":
|
|
688
|
-
throw new errors.PolytomicTimeoutError();
|
|
719
|
+
throw new errors.PolytomicTimeoutError("Timeout exceeded when calling GET /api/connections/{id}/parameter_values.");
|
|
689
720
|
case "unknown":
|
|
690
721
|
throw new errors.PolytomicError({
|
|
691
722
|
message: _response.error.errorMessage,
|
|
@@ -9,10 +9,17 @@
|
|
|
9
9
|
* }
|
|
10
10
|
*/
|
|
11
11
|
export interface ConnectCardRequest {
|
|
12
|
+
/** The id of an existing connection to update. */
|
|
12
13
|
connection?: string;
|
|
14
|
+
/** Whether to use the dark theme for the Connect modal. */
|
|
15
|
+
dark?: boolean;
|
|
16
|
+
/** Name of the new connection. Must be unique per organization. */
|
|
13
17
|
name: string;
|
|
14
18
|
organization_id?: string;
|
|
19
|
+
/** URL to redirect to after connection is created. */
|
|
15
20
|
redirect_url: string;
|
|
21
|
+
/** Connection type to create. */
|
|
16
22
|
type?: string;
|
|
23
|
+
/** List of connection types which are allowed to be created. Ignored if type is set. */
|
|
17
24
|
whitelist?: string[];
|
|
18
25
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* configuration: {
|
|
8
8
|
* "database": "example",
|
|
9
9
|
* "hostname": "postgres.example.com",
|
|
10
|
-
* "password": "
|
|
10
|
+
* "password": "********",
|
|
11
11
|
* "port": 5432,
|
|
12
12
|
* "username": "user"
|
|
13
13
|
* },
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
*/
|
|
18
18
|
export interface CreateConnectionRequestSchema {
|
|
19
19
|
configuration: Record<string, unknown>;
|
|
20
|
+
/** Override interval for connection health checking. */
|
|
21
|
+
healthcheck_interval?: string;
|
|
20
22
|
name: string;
|
|
21
23
|
organization_id?: string;
|
|
22
24
|
policies?: string[];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* configuration: {
|
|
8
|
+
* "database": "example",
|
|
9
|
+
* "hostname": "postgres.example.com",
|
|
10
|
+
* "password": "password",
|
|
11
|
+
* "port": 5432,
|
|
12
|
+
* "username": "user"
|
|
13
|
+
* },
|
|
14
|
+
* type: "postgresql"
|
|
15
|
+
* }
|
|
16
|
+
*/
|
|
17
|
+
export interface TestConnectionRequest {
|
|
18
|
+
/** Connection configuration to test. */
|
|
19
|
+
configuration: Record<string, unknown>;
|
|
20
|
+
/** Optional existing connection ID to use as a base for testing. The provided configuration will be merged over the stored configuration for this connection before testing. */
|
|
21
|
+
connection_id?: string;
|
|
22
|
+
/** The type of connection to test. */
|
|
23
|
+
type: string;
|
|
24
|
+
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* configuration: {
|
|
8
8
|
* "database": "example",
|
|
9
9
|
* "hostname": "postgres.example.com",
|
|
10
|
-
* "password": "
|
|
10
|
+
* "password": "********",
|
|
11
11
|
* "port": 5432,
|
|
12
12
|
* "username": "user"
|
|
13
13
|
* },
|
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export interface UpdateConnectionRequestSchema {
|
|
18
18
|
configuration: Record<string, unknown>;
|
|
19
|
+
/** Override interval for connection health checking. */
|
|
20
|
+
healthcheck_interval?: string;
|
|
19
21
|
name: string;
|
|
20
22
|
organization_id?: string;
|
|
21
23
|
policies?: string[];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { type CreateConnectionRequestSchema } from "./CreateConnectionRequestSchema";
|
|
2
2
|
export { type ConnectCardRequest } from "./ConnectCardRequest";
|
|
3
|
+
export { type TestConnectionRequest } from "./TestConnectionRequest";
|
|
3
4
|
export { type UpdateConnectionRequestSchema } from "./UpdateConnectionRequestSchema";
|
|
4
5
|
export { type ConnectionsRemoveRequest } from "./ConnectionsRemoveRequest";
|
|
@@ -7,7 +7,10 @@ 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>;
|
|
10
12
|
token: core.Supplier<core.BearerToken>;
|
|
13
|
+
/** Override the X-Polytomic-Version header */
|
|
11
14
|
version?: core.Supplier<string | undefined>;
|
|
12
15
|
}
|
|
13
16
|
interface RequestOptions {
|
|
@@ -19,6 +22,8 @@ export declare namespace Events {
|
|
|
19
22
|
abortSignal?: AbortSignal;
|
|
20
23
|
/** Override the X-Polytomic-Version header */
|
|
21
24
|
version?: string | undefined;
|
|
25
|
+
/** Additional headers to include in the request. */
|
|
26
|
+
headers?: Record<string, string>;
|
|
22
27
|
}
|
|
23
28
|
}
|
|
24
29
|
export declare class Events {
|
|
@@ -35,8 +40,8 @@ export declare class Events {
|
|
|
35
40
|
* @example
|
|
36
41
|
* await client.events.list({
|
|
37
42
|
* organization_id: "248df4b7-aa70-47b8-a036-33ac447e668d",
|
|
38
|
-
* starting_after:
|
|
39
|
-
* ending_before:
|
|
43
|
+
* starting_after: "2020-01-01T00:00:00Z",
|
|
44
|
+
* ending_before: "2020-01-01T00:00:00Z"
|
|
40
45
|
* })
|
|
41
46
|
*/
|
|
42
47
|
list(request?: Polytomic.EventsListRequest, requestOptions?: Events.RequestOptions): Promise<Polytomic.EventsEnvelope>;
|