@airweave/sdk 0.0.1 → 0.0.82
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 +61 -0
- package/Client.js +67 -0
- package/README.md +155 -1
- package/api/errors/UnprocessableEntityError.d.ts +8 -0
- package/api/errors/UnprocessableEntityError.js +51 -0
- package/api/errors/index.d.ts +1 -0
- package/api/errors/index.js +17 -0
- package/api/index.d.ts +3 -0
- package/api/index.js +19 -0
- package/api/resources/connections/client/Client.d.ts +320 -0
- package/api/resources/connections/client/Client.js +1001 -0
- package/api/resources/connections/client/index.d.ts +1 -0
- package/api/resources/connections/client/index.js +17 -0
- package/api/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +15 -0
- package/api/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js +5 -0
- package/api/resources/connections/client/requests/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +14 -0
- package/api/resources/connections/client/requests/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js +5 -0
- package/api/resources/connections/client/requests/GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest.d.ts +12 -0
- package/api/resources/connections/client/requests/GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest.js +5 -0
- package/api/resources/connections/client/requests/index.d.ts +3 -0
- package/api/resources/connections/client/requests/index.js +2 -0
- package/api/resources/connections/index.d.ts +1 -0
- package/api/resources/connections/index.js +17 -0
- package/api/resources/cursorDevelopment/client/Client.d.ts +56 -0
- package/api/resources/cursorDevelopment/client/Client.js +143 -0
- package/api/resources/cursorDevelopment/client/index.d.ts +1 -0
- package/api/resources/cursorDevelopment/client/index.js +2 -0
- package/api/resources/cursorDevelopment/index.d.ts +1 -0
- package/api/resources/cursorDevelopment/index.js +17 -0
- package/api/resources/destinations/client/Client.d.ts +71 -0
- package/api/resources/destinations/client/Client.js +211 -0
- package/api/resources/destinations/client/index.d.ts +1 -0
- package/api/resources/destinations/client/index.js +2 -0
- package/api/resources/destinations/index.d.ts +1 -0
- package/api/resources/destinations/index.js +17 -0
- package/api/resources/embeddingModels/client/Client.d.ts +71 -0
- package/api/resources/embeddingModels/client/Client.js +211 -0
- package/api/resources/embeddingModels/client/index.d.ts +1 -0
- package/api/resources/embeddingModels/client/index.js +2 -0
- package/api/resources/embeddingModels/index.d.ts +1 -0
- package/api/resources/embeddingModels/index.js +17 -0
- package/api/resources/entities/client/Client.d.ts +155 -0
- package/api/resources/entities/client/Client.js +624 -0
- package/api/resources/entities/client/index.d.ts +1 -0
- package/api/resources/entities/client/index.js +17 -0
- package/api/resources/entities/client/requests/EntityDefinitionCreate.d.ts +23 -0
- package/api/resources/entities/client/requests/EntityDefinitionCreate.js +5 -0
- package/api/resources/entities/client/requests/EntityDefinitionUpdate.d.ts +23 -0
- package/api/resources/entities/client/requests/EntityDefinitionUpdate.js +5 -0
- package/api/resources/entities/client/requests/EntityRelationCreate.d.ts +17 -0
- package/api/resources/entities/client/requests/EntityRelationCreate.js +5 -0
- package/api/resources/entities/client/requests/EntityRelationUpdate.d.ts +17 -0
- package/api/resources/entities/client/requests/EntityRelationUpdate.js +5 -0
- package/api/resources/entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.d.ts +12 -0
- package/api/resources/entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.js +5 -0
- package/api/resources/entities/client/requests/index.d.ts +5 -0
- package/api/resources/entities/client/requests/index.js +2 -0
- package/api/resources/entities/index.d.ts +2 -0
- package/api/resources/entities/index.js +18 -0
- package/api/resources/entities/types/EntityDefinitionCreateEntitySchema.d.ts +4 -0
- package/api/resources/entities/types/EntityDefinitionCreateEntitySchema.js +5 -0
- package/api/resources/entities/types/EntityDefinitionUpdateEntitySchema.d.ts +4 -0
- package/api/resources/entities/types/EntityDefinitionUpdateEntitySchema.js +5 -0
- package/api/resources/entities/types/index.d.ts +2 -0
- package/api/resources/entities/types/index.js +18 -0
- package/api/resources/index.d.ts +19 -0
- package/api/resources/index.js +58 -0
- package/api/resources/search/client/Client.d.ts +55 -0
- package/api/resources/search/client/Client.js +147 -0
- package/api/resources/search/client/index.d.ts +1 -0
- package/api/resources/search/client/index.js +17 -0
- package/api/resources/search/client/requests/SearchSearchGetRequest.d.ts +20 -0
- package/api/resources/search/client/requests/SearchSearchGetRequest.js +5 -0
- package/api/resources/search/client/requests/index.d.ts +1 -0
- package/api/resources/search/client/requests/index.js +2 -0
- package/api/resources/search/index.d.ts +1 -0
- package/api/resources/search/index.js +17 -0
- package/api/resources/sources/client/Client.d.ts +71 -0
- package/api/resources/sources/client/Client.js +211 -0
- package/api/resources/sources/client/index.d.ts +1 -0
- package/api/resources/sources/client/index.js +2 -0
- package/api/resources/sources/index.d.ts +1 -0
- package/api/resources/sources/index.js +17 -0
- package/api/resources/sync/client/Client.d.ts +275 -0
- package/api/resources/sync/client/Client.js +916 -0
- package/api/resources/sync/client/index.d.ts +1 -0
- package/api/resources/sync/client/index.js +17 -0
- package/api/resources/sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.d.ts +10 -0
- package/api/resources/sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.js +5 -0
- package/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.d.ts +11 -0
- package/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.js +5 -0
- package/api/resources/sync/client/requests/ListSyncsSyncGetRequest.d.ts +12 -0
- package/api/resources/sync/client/requests/ListSyncsSyncGetRequest.js +5 -0
- package/api/resources/sync/client/requests/SyncCreate.d.ts +26 -0
- package/api/resources/sync/client/requests/SyncCreate.js +5 -0
- package/api/resources/sync/client/requests/SyncUpdate.d.ts +17 -0
- package/api/resources/sync/client/requests/SyncUpdate.js +5 -0
- package/api/resources/sync/client/requests/index.d.ts +5 -0
- package/api/resources/sync/client/requests/index.js +2 -0
- package/api/resources/sync/index.d.ts +2 -0
- package/api/resources/sync/index.js +18 -0
- package/api/resources/sync/types/ListSyncsSyncGetResponse.d.ts +5 -0
- package/api/resources/sync/types/ListSyncsSyncGetResponse.js +5 -0
- package/api/resources/sync/types/index.d.ts +1 -0
- package/api/resources/sync/types/index.js +17 -0
- package/api/resources/transformers/client/Client.d.ts +77 -0
- package/api/resources/transformers/client/Client.js +272 -0
- package/api/resources/transformers/client/index.d.ts +1 -0
- package/api/resources/transformers/client/index.js +17 -0
- package/api/resources/transformers/client/requests/TransformerCreate.d.ts +22 -0
- package/api/resources/transformers/client/requests/TransformerCreate.js +5 -0
- package/api/resources/transformers/client/requests/TransformerUpdate.d.ts +22 -0
- package/api/resources/transformers/client/requests/TransformerUpdate.js +5 -0
- package/api/resources/transformers/client/requests/index.d.ts +2 -0
- package/api/resources/transformers/client/requests/index.js +2 -0
- package/api/resources/transformers/index.d.ts +1 -0
- package/api/resources/transformers/index.js +17 -0
- package/api/resources/users/client/Client.d.ts +48 -0
- package/api/resources/users/client/Client.js +135 -0
- package/api/resources/users/client/index.d.ts +1 -0
- package/api/resources/users/client/index.js +2 -0
- package/api/resources/users/index.d.ts +1 -0
- package/api/resources/users/index.js +17 -0
- package/api/resources/whiteLabels/client/Client.d.ts +213 -0
- package/api/resources/whiteLabels/client/Client.js +676 -0
- package/api/resources/whiteLabels/client/index.d.ts +1 -0
- package/api/resources/whiteLabels/client/index.js +17 -0
- package/api/resources/whiteLabels/client/requests/WhiteLabelCreate.d.ts +20 -0
- package/api/resources/whiteLabels/client/requests/WhiteLabelCreate.js +5 -0
- package/api/resources/whiteLabels/client/requests/WhiteLabelUpdate.d.ts +13 -0
- package/api/resources/whiteLabels/client/requests/WhiteLabelUpdate.js +5 -0
- package/api/resources/whiteLabels/client/requests/index.d.ts +2 -0
- package/api/resources/whiteLabels/client/requests/index.js +2 -0
- package/api/resources/whiteLabels/index.d.ts +1 -0
- package/api/resources/whiteLabels/index.js +17 -0
- package/api/types/ApiKey.d.ts +17 -0
- package/api/types/ApiKey.js +5 -0
- package/api/types/ApiKeyCreate.d.ts +9 -0
- package/api/types/ApiKeyCreate.js +5 -0
- package/api/types/ApiKeyWithPlainKey.d.ts +18 -0
- package/api/types/ApiKeyWithPlainKey.js +5 -0
- package/api/types/AuthType.d.ts +28 -0
- package/api/types/AuthType.js +16 -0
- package/api/types/Chat.d.ts +22 -0
- package/api/types/Chat.js +5 -0
- package/api/types/ChatCreate.d.ts +14 -0
- package/api/types/ChatCreate.js +5 -0
- package/api/types/ChatMessage.d.ts +18 -0
- package/api/types/ChatMessage.js +5 -0
- package/api/types/ChatMessageCreate.d.ts +10 -0
- package/api/types/ChatMessageCreate.js +5 -0
- package/api/types/ChatUpdate.d.ts +12 -0
- package/api/types/ChatUpdate.js +5 -0
- package/api/types/ConfigField.d.ts +12 -0
- package/api/types/ConfigField.js +5 -0
- package/api/types/Connection.d.ts +18 -0
- package/api/types/Connection.js +5 -0
- package/api/types/ConnectionStatus.d.ts +12 -0
- package/api/types/ConnectionStatus.js +11 -0
- package/api/types/DagEdge.d.ts +15 -0
- package/api/types/DagEdge.js +5 -0
- package/api/types/DagEdgeCreate.d.ts +10 -0
- package/api/types/DagEdgeCreate.js +5 -0
- package/api/types/DagNode.d.ts +20 -0
- package/api/types/DagNode.js +5 -0
- package/api/types/DagNodeCreate.d.ts +17 -0
- package/api/types/DagNodeCreate.js +5 -0
- package/api/types/Destination.d.ts +22 -0
- package/api/types/Destination.js +5 -0
- package/api/types/DestinationWithConfigFields.d.ts +23 -0
- package/api/types/DestinationWithConfigFields.js +5 -0
- package/api/types/EmbeddingModel.d.ts +20 -0
- package/api/types/EmbeddingModel.js +5 -0
- package/api/types/EmbeddingModelWithConfigFields.d.ts +21 -0
- package/api/types/EmbeddingModelWithConfigFields.js +5 -0
- package/api/types/EntityDefinition.d.ts +18 -0
- package/api/types/EntityDefinition.js +5 -0
- package/api/types/EntityDefinitionEntitySchema.d.ts +4 -0
- package/api/types/EntityDefinitionEntitySchema.js +5 -0
- package/api/types/EntityRelation.d.ts +16 -0
- package/api/types/EntityRelation.js +5 -0
- package/api/types/EntityType.d.ts +11 -0
- package/api/types/EntityType.js +10 -0
- package/api/types/Fields.d.ts +10 -0
- package/api/types/Fields.js +5 -0
- package/api/types/HttpValidationError.d.ts +7 -0
- package/api/types/HttpValidationError.js +5 -0
- package/api/types/IntegrationType.d.ts +12 -0
- package/api/types/IntegrationType.js +11 -0
- package/api/types/NodeType.d.ts +13 -0
- package/api/types/NodeType.js +12 -0
- package/api/types/Source.d.ts +22 -0
- package/api/types/Source.js +5 -0
- package/api/types/SourceWithConfigFields.d.ts +23 -0
- package/api/types/SourceWithConfigFields.js +5 -0
- package/api/types/Sync.d.ts +26 -0
- package/api/types/Sync.js +5 -0
- package/api/types/SyncDag.d.ts +29 -0
- package/api/types/SyncDag.js +5 -0
- package/api/types/SyncDagCreate.d.ts +14 -0
- package/api/types/SyncDagCreate.js +5 -0
- package/api/types/SyncDagUpdate.d.ts +14 -0
- package/api/types/SyncDagUpdate.js +5 -0
- package/api/types/SyncJob.d.ts +27 -0
- package/api/types/SyncJob.js +5 -0
- package/api/types/SyncJobStatus.d.ts +13 -0
- package/api/types/SyncJobStatus.js +12 -0
- package/api/types/SyncStatus.d.ts +12 -0
- package/api/types/SyncStatus.js +11 -0
- package/api/types/SyncWithSourceConnection.d.ts +27 -0
- package/api/types/SyncWithSourceConnection.js +5 -0
- package/api/types/Transformer.d.ts +19 -0
- package/api/types/Transformer.js +5 -0
- package/api/types/User.d.ts +13 -0
- package/api/types/User.js +5 -0
- package/api/types/ValidationError.d.ts +9 -0
- package/api/types/ValidationError.js +5 -0
- package/api/types/ValidationErrorLocItem.d.ts +4 -0
- package/api/types/ValidationErrorLocItem.js +5 -0
- package/api/types/WhiteLabel.d.ts +19 -0
- package/api/types/WhiteLabel.js +5 -0
- package/api/types/index.d.ts +43 -0
- package/api/types/index.js +59 -0
- package/core/fetcher/APIResponse.d.ts +10 -0
- package/core/fetcher/APIResponse.js +2 -0
- package/core/fetcher/Fetcher.d.ts +39 -0
- package/core/fetcher/Fetcher.js +99 -0
- package/core/fetcher/Supplier.d.ts +4 -0
- package/core/fetcher/Supplier.js +22 -0
- 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.d.ts +1 -0
- package/core/fetcher/getHeader.js +11 -0
- package/core/fetcher/getRequestBody.d.ts +7 -0
- package/core/fetcher/getRequestBody.js +22 -0
- package/core/fetcher/getResponseBody.d.ts +1 -0
- package/core/fetcher/getResponseBody.js +54 -0
- package/core/fetcher/index.d.ts +5 -0
- package/core/fetcher/index.js +9 -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/index.d.ts +3 -0
- package/core/index.js +42 -0
- package/core/runtime/index.d.ts +1 -0
- package/core/runtime/index.js +5 -0
- package/core/runtime/runtime.d.ts +9 -0
- package/core/runtime/runtime.js +93 -0
- package/core/schemas/Schema.d.ts +85 -0
- package/core/schemas/Schema.js +22 -0
- package/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/core/schemas/builders/bigint/bigint.js +49 -0
- package/core/schemas/builders/bigint/index.d.ts +1 -0
- package/core/schemas/builders/bigint/index.js +5 -0
- package/core/schemas/builders/date/date.d.ts +2 -0
- package/core/schemas/builders/date/date.js +62 -0
- package/core/schemas/builders/date/index.d.ts +1 -0
- package/core/schemas/builders/date/index.js +5 -0
- package/core/schemas/builders/enum/enum.d.ts +2 -0
- package/core/schemas/builders/enum/enum.js +38 -0
- package/core/schemas/builders/enum/index.d.ts +1 -0
- package/core/schemas/builders/enum/index.js +5 -0
- package/core/schemas/builders/index.d.ts +14 -0
- package/core/schemas/builders/index.js +30 -0
- package/core/schemas/builders/lazy/index.d.ts +3 -0
- package/core/schemas/builders/lazy/index.js +7 -0
- package/core/schemas/builders/lazy/lazy.d.ts +5 -0
- package/core/schemas/builders/lazy/lazy.js +24 -0
- package/core/schemas/builders/lazy/lazyObject.d.ts +3 -0
- package/core/schemas/builders/lazy/lazyObject.js +11 -0
- package/core/schemas/builders/list/index.d.ts +1 -0
- package/core/schemas/builders/list/index.js +5 -0
- package/core/schemas/builders/list/list.d.ts +2 -0
- package/core/schemas/builders/list/list.js +54 -0
- package/core/schemas/builders/literals/booleanLiteral.d.ts +2 -0
- package/core/schemas/builders/literals/booleanLiteral.js +28 -0
- package/core/schemas/builders/literals/index.d.ts +2 -0
- package/core/schemas/builders/literals/index.js +7 -0
- package/core/schemas/builders/literals/stringLiteral.d.ts +2 -0
- package/core/schemas/builders/literals/stringLiteral.js +28 -0
- package/core/schemas/builders/object/index.d.ts +6 -0
- package/core/schemas/builders/object/index.js +11 -0
- package/core/schemas/builders/object/object.d.ts +3 -0
- package/core/schemas/builders/object/object.js +260 -0
- package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -0
- package/core/schemas/builders/object/objectWithoutOptionalProperties.js +7 -0
- package/core/schemas/builders/object/property.d.ts +8 -0
- package/core/schemas/builders/object/property.js +15 -0
- package/core/schemas/builders/object/types.d.ts +31 -0
- package/core/schemas/builders/object/types.js +2 -0
- package/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +9 -0
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +53 -0
- package/core/schemas/builders/object-like/index.d.ts +2 -0
- package/core/schemas/builders/object-like/index.js +6 -0
- package/core/schemas/builders/object-like/types.d.ts +7 -0
- package/core/schemas/builders/object-like/types.js +2 -0
- package/core/schemas/builders/primitives/any.d.ts +1 -0
- package/core/schemas/builders/primitives/any.js +6 -0
- package/core/schemas/builders/primitives/boolean.d.ts +1 -0
- package/core/schemas/builders/primitives/boolean.js +25 -0
- package/core/schemas/builders/primitives/index.d.ts +5 -0
- package/core/schemas/builders/primitives/index.js +13 -0
- package/core/schemas/builders/primitives/number.d.ts +1 -0
- package/core/schemas/builders/primitives/number.js +25 -0
- package/core/schemas/builders/primitives/string.d.ts +1 -0
- package/core/schemas/builders/primitives/string.js +25 -0
- package/core/schemas/builders/primitives/unknown.d.ts +1 -0
- package/core/schemas/builders/primitives/unknown.js +6 -0
- package/core/schemas/builders/record/index.d.ts +2 -0
- package/core/schemas/builders/record/index.js +5 -0
- package/core/schemas/builders/record/record.d.ts +3 -0
- package/core/schemas/builders/record/record.js +94 -0
- package/core/schemas/builders/record/types.d.ts +4 -0
- package/core/schemas/builders/record/types.js +2 -0
- package/core/schemas/builders/schema-utils/JsonError.d.ts +5 -0
- package/core/schemas/builders/schema-utils/JsonError.js +12 -0
- package/core/schemas/builders/schema-utils/ParseError.d.ts +5 -0
- package/core/schemas/builders/schema-utils/ParseError.js +12 -0
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +17 -0
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +81 -0
- package/core/schemas/builders/schema-utils/index.d.ts +4 -0
- package/core/schemas/builders/schema-utils/index.js +11 -0
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +2 -0
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +9 -0
- package/core/schemas/builders/set/index.d.ts +1 -0
- package/core/schemas/builders/set/index.js +5 -0
- package/core/schemas/builders/set/set.d.ts +2 -0
- package/core/schemas/builders/set/set.js +43 -0
- package/core/schemas/builders/undiscriminated-union/index.d.ts +2 -0
- package/core/schemas/builders/undiscriminated-union/index.js +5 -0
- package/core/schemas/builders/undiscriminated-union/types.d.ts +4 -0
- package/core/schemas/builders/undiscriminated-union/types.js +2 -0
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +3 -0
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +39 -0
- package/core/schemas/builders/union/discriminant.d.ts +5 -0
- package/core/schemas/builders/union/discriminant.js +9 -0
- package/core/schemas/builders/union/index.d.ts +4 -0
- package/core/schemas/builders/union/index.js +7 -0
- package/core/schemas/builders/union/types.d.ts +13 -0
- package/core/schemas/builders/union/types.js +2 -0
- package/core/schemas/builders/union/union.d.ts +4 -0
- package/core/schemas/builders/union/union.js +129 -0
- package/core/schemas/index.d.ts +2 -0
- package/core/schemas/index.js +17 -0
- package/core/schemas/utils/MaybePromise.d.ts +1 -0
- package/core/schemas/utils/MaybePromise.js +2 -0
- package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +7 -0
- package/core/schemas/utils/addQuestionMarksToNullableProperties.js +2 -0
- package/core/schemas/utils/createIdentitySchemaCreator.d.ts +2 -0
- package/core/schemas/utils/createIdentitySchemaCreator.js +15 -0
- package/core/schemas/utils/entries.d.ts +1 -0
- package/core/schemas/utils/entries.js +6 -0
- package/core/schemas/utils/filterObject.d.ts +1 -0
- package/core/schemas/utils/filterObject.js +13 -0
- package/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +1 -0
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +27 -0
- package/core/schemas/utils/isPlainObject.d.ts +1 -0
- package/core/schemas/utils/isPlainObject.js +17 -0
- package/core/schemas/utils/keys.d.ts +1 -0
- package/core/schemas/utils/keys.js +6 -0
- package/core/schemas/utils/maybeSkipValidation.d.ts +2 -0
- package/core/schemas/utils/maybeSkipValidation.js +27 -0
- package/core/schemas/utils/partition.d.ts +1 -0
- package/core/schemas/utils/partition.js +15 -0
- package/dist/Client.d.ts +61 -0
- package/dist/Client.js +67 -0
- package/dist/api/errors/UnprocessableEntityError.d.ts +8 -0
- package/dist/api/errors/UnprocessableEntityError.js +51 -0
- package/dist/api/errors/index.d.ts +1 -0
- package/dist/api/errors/index.js +17 -0
- package/dist/api/index.d.ts +3 -0
- package/dist/api/index.js +19 -0
- package/dist/api/resources/connections/client/Client.d.ts +320 -0
- package/dist/api/resources/connections/client/Client.js +1001 -0
- package/dist/api/resources/connections/client/index.d.ts +1 -0
- package/dist/api/resources/connections/client/index.js +17 -0
- package/dist/api/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +15 -0
- package/dist/api/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js +5 -0
- package/dist/api/resources/connections/client/requests/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +14 -0
- package/dist/api/resources/connections/client/requests/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js +5 -0
- package/dist/api/resources/connections/client/requests/GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest.d.ts +12 -0
- package/dist/api/resources/connections/client/requests/GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest.js +5 -0
- package/dist/api/resources/connections/client/requests/index.d.ts +3 -0
- package/dist/api/resources/connections/client/requests/index.js +2 -0
- package/dist/api/resources/connections/index.d.ts +1 -0
- package/dist/api/resources/connections/index.js +17 -0
- package/dist/api/resources/cursorDevelopment/client/Client.d.ts +56 -0
- package/dist/api/resources/cursorDevelopment/client/Client.js +143 -0
- package/dist/api/resources/cursorDevelopment/client/index.d.ts +1 -0
- package/dist/api/resources/cursorDevelopment/client/index.js +2 -0
- package/dist/api/resources/cursorDevelopment/index.d.ts +1 -0
- package/dist/api/resources/cursorDevelopment/index.js +17 -0
- package/dist/api/resources/destinations/client/Client.d.ts +71 -0
- package/dist/api/resources/destinations/client/Client.js +211 -0
- package/dist/api/resources/destinations/client/index.d.ts +1 -0
- package/dist/api/resources/destinations/client/index.js +2 -0
- package/dist/api/resources/destinations/index.d.ts +1 -0
- package/dist/api/resources/destinations/index.js +17 -0
- package/dist/api/resources/embeddingModels/client/Client.d.ts +71 -0
- package/dist/api/resources/embeddingModels/client/Client.js +211 -0
- package/dist/api/resources/embeddingModels/client/index.d.ts +1 -0
- package/dist/api/resources/embeddingModels/client/index.js +2 -0
- package/dist/api/resources/embeddingModels/index.d.ts +1 -0
- package/dist/api/resources/embeddingModels/index.js +17 -0
- package/dist/api/resources/entities/client/Client.d.ts +155 -0
- package/dist/api/resources/entities/client/Client.js +624 -0
- package/dist/api/resources/entities/client/index.d.ts +1 -0
- package/dist/api/resources/entities/client/index.js +17 -0
- package/dist/api/resources/entities/client/requests/EntityDefinitionCreate.d.ts +23 -0
- package/dist/api/resources/entities/client/requests/EntityDefinitionCreate.js +5 -0
- package/dist/api/resources/entities/client/requests/EntityDefinitionUpdate.d.ts +23 -0
- package/dist/api/resources/entities/client/requests/EntityDefinitionUpdate.js +5 -0
- package/dist/api/resources/entities/client/requests/EntityRelationCreate.d.ts +17 -0
- package/dist/api/resources/entities/client/requests/EntityRelationCreate.js +5 -0
- package/dist/api/resources/entities/client/requests/EntityRelationUpdate.d.ts +17 -0
- package/dist/api/resources/entities/client/requests/EntityRelationUpdate.js +5 -0
- package/dist/api/resources/entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.d.ts +12 -0
- package/dist/api/resources/entities/client/requests/GetEntityDefinitionsBySourceShortNameEntitiesDefinitionsBySourceGetRequest.js +5 -0
- package/dist/api/resources/entities/client/requests/index.d.ts +5 -0
- package/dist/api/resources/entities/client/requests/index.js +2 -0
- package/dist/api/resources/entities/index.d.ts +2 -0
- package/dist/api/resources/entities/index.js +18 -0
- package/dist/api/resources/entities/types/EntityDefinitionCreateEntitySchema.d.ts +4 -0
- package/dist/api/resources/entities/types/EntityDefinitionCreateEntitySchema.js +5 -0
- package/dist/api/resources/entities/types/EntityDefinitionUpdateEntitySchema.d.ts +4 -0
- package/dist/api/resources/entities/types/EntityDefinitionUpdateEntitySchema.js +5 -0
- package/dist/api/resources/entities/types/index.d.ts +2 -0
- package/dist/api/resources/entities/types/index.js +18 -0
- package/dist/api/resources/index.d.ts +19 -0
- package/dist/api/resources/index.js +58 -0
- package/dist/api/resources/search/client/Client.d.ts +55 -0
- package/dist/api/resources/search/client/Client.js +147 -0
- package/dist/api/resources/search/client/index.d.ts +1 -0
- package/dist/api/resources/search/client/index.js +17 -0
- package/dist/api/resources/search/client/requests/SearchSearchGetRequest.d.ts +20 -0
- package/dist/api/resources/search/client/requests/SearchSearchGetRequest.js +5 -0
- package/dist/api/resources/search/client/requests/index.d.ts +1 -0
- package/dist/api/resources/search/client/requests/index.js +2 -0
- package/dist/api/resources/search/index.d.ts +1 -0
- package/dist/api/resources/search/index.js +17 -0
- package/dist/api/resources/sources/client/Client.d.ts +71 -0
- package/dist/api/resources/sources/client/Client.js +211 -0
- package/dist/api/resources/sources/client/index.d.ts +1 -0
- package/dist/api/resources/sources/client/index.js +2 -0
- package/dist/api/resources/sources/index.d.ts +1 -0
- package/dist/api/resources/sources/index.js +17 -0
- package/dist/api/resources/sync/client/Client.d.ts +275 -0
- package/dist/api/resources/sync/client/Client.js +916 -0
- package/dist/api/resources/sync/client/index.d.ts +1 -0
- package/dist/api/resources/sync/client/index.js +17 -0
- package/dist/api/resources/sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.d.ts +10 -0
- package/dist/api/resources/sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.js +5 -0
- package/dist/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.d.ts +11 -0
- package/dist/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.js +5 -0
- package/dist/api/resources/sync/client/requests/ListSyncsSyncGetRequest.d.ts +12 -0
- package/dist/api/resources/sync/client/requests/ListSyncsSyncGetRequest.js +5 -0
- package/dist/api/resources/sync/client/requests/SyncCreate.d.ts +26 -0
- package/dist/api/resources/sync/client/requests/SyncCreate.js +5 -0
- package/dist/api/resources/sync/client/requests/SyncUpdate.d.ts +17 -0
- package/dist/api/resources/sync/client/requests/SyncUpdate.js +5 -0
- package/dist/api/resources/sync/client/requests/index.d.ts +5 -0
- package/dist/api/resources/sync/client/requests/index.js +2 -0
- package/dist/api/resources/sync/index.d.ts +2 -0
- package/dist/api/resources/sync/index.js +18 -0
- package/dist/api/resources/sync/types/ListSyncsSyncGetResponse.d.ts +5 -0
- package/dist/api/resources/sync/types/ListSyncsSyncGetResponse.js +5 -0
- package/dist/api/resources/sync/types/index.d.ts +1 -0
- package/dist/api/resources/sync/types/index.js +17 -0
- package/dist/api/resources/transformers/client/Client.d.ts +77 -0
- package/dist/api/resources/transformers/client/Client.js +272 -0
- package/dist/api/resources/transformers/client/index.d.ts +1 -0
- package/dist/api/resources/transformers/client/index.js +17 -0
- package/dist/api/resources/transformers/client/requests/TransformerCreate.d.ts +22 -0
- package/dist/api/resources/transformers/client/requests/TransformerCreate.js +5 -0
- package/dist/api/resources/transformers/client/requests/TransformerUpdate.d.ts +22 -0
- package/dist/api/resources/transformers/client/requests/TransformerUpdate.js +5 -0
- package/dist/api/resources/transformers/client/requests/index.d.ts +2 -0
- package/dist/api/resources/transformers/client/requests/index.js +2 -0
- package/dist/api/resources/transformers/index.d.ts +1 -0
- package/dist/api/resources/transformers/index.js +17 -0
- package/dist/api/resources/users/client/Client.d.ts +48 -0
- package/dist/api/resources/users/client/Client.js +135 -0
- package/dist/api/resources/users/client/index.d.ts +1 -0
- package/dist/api/resources/users/client/index.js +2 -0
- package/dist/api/resources/users/index.d.ts +1 -0
- package/dist/api/resources/users/index.js +17 -0
- package/dist/api/resources/whiteLabels/client/Client.d.ts +213 -0
- package/dist/api/resources/whiteLabels/client/Client.js +676 -0
- package/dist/api/resources/whiteLabels/client/index.d.ts +1 -0
- package/dist/api/resources/whiteLabels/client/index.js +17 -0
- package/dist/api/resources/whiteLabels/client/requests/WhiteLabelCreate.d.ts +20 -0
- package/dist/api/resources/whiteLabels/client/requests/WhiteLabelCreate.js +5 -0
- package/dist/api/resources/whiteLabels/client/requests/WhiteLabelUpdate.d.ts +13 -0
- package/dist/api/resources/whiteLabels/client/requests/WhiteLabelUpdate.js +5 -0
- package/dist/api/resources/whiteLabels/client/requests/index.d.ts +2 -0
- package/dist/api/resources/whiteLabels/client/requests/index.js +2 -0
- package/dist/api/resources/whiteLabels/index.d.ts +1 -0
- package/dist/api/resources/whiteLabels/index.js +17 -0
- package/dist/api/types/ApiKey.d.ts +17 -0
- package/dist/api/types/ApiKey.js +5 -0
- package/dist/api/types/ApiKeyCreate.d.ts +9 -0
- package/dist/api/types/ApiKeyCreate.js +5 -0
- package/dist/api/types/ApiKeyWithPlainKey.d.ts +18 -0
- package/dist/api/types/ApiKeyWithPlainKey.js +5 -0
- package/dist/api/types/AuthType.d.ts +28 -0
- package/dist/api/types/AuthType.js +16 -0
- package/dist/api/types/Chat.d.ts +22 -0
- package/dist/api/types/Chat.js +5 -0
- package/dist/api/types/ChatCreate.d.ts +14 -0
- package/dist/api/types/ChatCreate.js +5 -0
- package/dist/api/types/ChatMessage.d.ts +18 -0
- package/dist/api/types/ChatMessage.js +5 -0
- package/dist/api/types/ChatMessageCreate.d.ts +10 -0
- package/dist/api/types/ChatMessageCreate.js +5 -0
- package/dist/api/types/ChatUpdate.d.ts +12 -0
- package/dist/api/types/ChatUpdate.js +5 -0
- package/dist/api/types/ConfigField.d.ts +12 -0
- package/dist/api/types/ConfigField.js +5 -0
- package/dist/api/types/Connection.d.ts +18 -0
- package/dist/api/types/Connection.js +5 -0
- package/dist/api/types/ConnectionStatus.d.ts +12 -0
- package/dist/api/types/ConnectionStatus.js +11 -0
- package/dist/api/types/DagEdge.d.ts +15 -0
- package/dist/api/types/DagEdge.js +5 -0
- package/dist/api/types/DagEdgeCreate.d.ts +10 -0
- package/dist/api/types/DagEdgeCreate.js +5 -0
- package/dist/api/types/DagNode.d.ts +20 -0
- package/dist/api/types/DagNode.js +5 -0
- package/dist/api/types/DagNodeCreate.d.ts +17 -0
- package/dist/api/types/DagNodeCreate.js +5 -0
- package/dist/api/types/Destination.d.ts +22 -0
- package/dist/api/types/Destination.js +5 -0
- package/dist/api/types/DestinationWithConfigFields.d.ts +23 -0
- package/dist/api/types/DestinationWithConfigFields.js +5 -0
- package/dist/api/types/EmbeddingModel.d.ts +20 -0
- package/dist/api/types/EmbeddingModel.js +5 -0
- package/dist/api/types/EmbeddingModelWithConfigFields.d.ts +21 -0
- package/dist/api/types/EmbeddingModelWithConfigFields.js +5 -0
- package/dist/api/types/EntityDefinition.d.ts +18 -0
- package/dist/api/types/EntityDefinition.js +5 -0
- package/dist/api/types/EntityDefinitionEntitySchema.d.ts +4 -0
- package/dist/api/types/EntityDefinitionEntitySchema.js +5 -0
- package/dist/api/types/EntityRelation.d.ts +16 -0
- package/dist/api/types/EntityRelation.js +5 -0
- package/dist/api/types/EntityType.d.ts +11 -0
- package/dist/api/types/EntityType.js +10 -0
- package/dist/api/types/Fields.d.ts +10 -0
- package/dist/api/types/Fields.js +5 -0
- package/dist/api/types/HttpValidationError.d.ts +7 -0
- package/dist/api/types/HttpValidationError.js +5 -0
- package/dist/api/types/IntegrationType.d.ts +12 -0
- package/dist/api/types/IntegrationType.js +11 -0
- package/dist/api/types/NodeType.d.ts +13 -0
- package/dist/api/types/NodeType.js +12 -0
- package/dist/api/types/Source.d.ts +22 -0
- package/dist/api/types/Source.js +5 -0
- package/dist/api/types/SourceWithConfigFields.d.ts +23 -0
- package/dist/api/types/SourceWithConfigFields.js +5 -0
- package/dist/api/types/Sync.d.ts +26 -0
- package/dist/api/types/Sync.js +5 -0
- package/dist/api/types/SyncDag.d.ts +29 -0
- package/dist/api/types/SyncDag.js +5 -0
- package/dist/api/types/SyncDagCreate.d.ts +14 -0
- package/dist/api/types/SyncDagCreate.js +5 -0
- package/dist/api/types/SyncDagUpdate.d.ts +14 -0
- package/dist/api/types/SyncDagUpdate.js +5 -0
- package/dist/api/types/SyncJob.d.ts +27 -0
- package/dist/api/types/SyncJob.js +5 -0
- package/dist/api/types/SyncJobStatus.d.ts +13 -0
- package/dist/api/types/SyncJobStatus.js +12 -0
- package/dist/api/types/SyncStatus.d.ts +12 -0
- package/dist/api/types/SyncStatus.js +11 -0
- package/dist/api/types/SyncWithSourceConnection.d.ts +27 -0
- package/dist/api/types/SyncWithSourceConnection.js +5 -0
- package/dist/api/types/Transformer.d.ts +19 -0
- package/dist/api/types/Transformer.js +5 -0
- package/dist/api/types/User.d.ts +13 -0
- package/dist/api/types/User.js +5 -0
- package/dist/api/types/ValidationError.d.ts +9 -0
- package/dist/api/types/ValidationError.js +5 -0
- package/dist/api/types/ValidationErrorLocItem.d.ts +4 -0
- package/dist/api/types/ValidationErrorLocItem.js +5 -0
- package/dist/api/types/WhiteLabel.d.ts +19 -0
- package/dist/api/types/WhiteLabel.js +5 -0
- package/dist/api/types/index.d.ts +43 -0
- package/dist/api/types/index.js +59 -0
- package/dist/core/fetcher/APIResponse.d.ts +10 -0
- package/dist/core/fetcher/APIResponse.js +2 -0
- package/dist/core/fetcher/Fetcher.d.ts +39 -0
- package/dist/core/fetcher/Fetcher.js +99 -0
- package/dist/core/fetcher/Supplier.d.ts +4 -0
- package/dist/core/fetcher/Supplier.js +22 -0
- 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.d.ts +1 -0
- package/dist/core/fetcher/getHeader.js +11 -0
- package/dist/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/core/fetcher/getRequestBody.js +22 -0
- package/dist/core/fetcher/getResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getResponseBody.js +54 -0
- package/dist/core/fetcher/index.d.ts +5 -0
- package/dist/core/fetcher/index.js +9 -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/index.d.ts +3 -0
- package/dist/core/index.js +42 -0
- package/dist/core/runtime/index.d.ts +1 -0
- package/dist/core/runtime/index.js +5 -0
- package/dist/core/runtime/runtime.d.ts +9 -0
- package/dist/core/runtime/runtime.js +93 -0
- package/dist/core/schemas/Schema.d.ts +85 -0
- package/dist/core/schemas/Schema.js +22 -0
- package/dist/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/dist/core/schemas/builders/bigint/bigint.js +49 -0
- package/dist/core/schemas/builders/bigint/index.d.ts +1 -0
- package/dist/core/schemas/builders/bigint/index.js +5 -0
- package/dist/core/schemas/builders/date/date.d.ts +2 -0
- package/dist/core/schemas/builders/date/date.js +62 -0
- package/dist/core/schemas/builders/date/index.d.ts +1 -0
- package/dist/core/schemas/builders/date/index.js +5 -0
- package/dist/core/schemas/builders/enum/enum.d.ts +2 -0
- package/dist/core/schemas/builders/enum/enum.js +38 -0
- package/dist/core/schemas/builders/enum/index.d.ts +1 -0
- package/dist/core/schemas/builders/enum/index.js +5 -0
- package/dist/core/schemas/builders/index.d.ts +14 -0
- package/dist/core/schemas/builders/index.js +30 -0
- package/dist/core/schemas/builders/lazy/index.d.ts +3 -0
- package/dist/core/schemas/builders/lazy/index.js +7 -0
- package/dist/core/schemas/builders/lazy/lazy.d.ts +5 -0
- package/dist/core/schemas/builders/lazy/lazy.js +24 -0
- package/dist/core/schemas/builders/lazy/lazyObject.d.ts +3 -0
- package/dist/core/schemas/builders/lazy/lazyObject.js +11 -0
- package/dist/core/schemas/builders/list/index.d.ts +1 -0
- package/dist/core/schemas/builders/list/index.js +5 -0
- package/dist/core/schemas/builders/list/list.d.ts +2 -0
- package/dist/core/schemas/builders/list/list.js +54 -0
- package/dist/core/schemas/builders/literals/booleanLiteral.d.ts +2 -0
- package/dist/core/schemas/builders/literals/booleanLiteral.js +28 -0
- package/dist/core/schemas/builders/literals/index.d.ts +2 -0
- package/dist/core/schemas/builders/literals/index.js +7 -0
- package/dist/core/schemas/builders/literals/stringLiteral.d.ts +2 -0
- package/dist/core/schemas/builders/literals/stringLiteral.js +28 -0
- package/dist/core/schemas/builders/object/index.d.ts +6 -0
- package/dist/core/schemas/builders/object/index.js +11 -0
- package/dist/core/schemas/builders/object/object.d.ts +3 -0
- package/dist/core/schemas/builders/object/object.js +260 -0
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -0
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +7 -0
- package/dist/core/schemas/builders/object/property.d.ts +8 -0
- package/dist/core/schemas/builders/object/property.js +15 -0
- package/dist/core/schemas/builders/object/types.d.ts +31 -0
- package/dist/core/schemas/builders/object/types.js +2 -0
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +9 -0
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +53 -0
- package/dist/core/schemas/builders/object-like/index.d.ts +2 -0
- package/dist/core/schemas/builders/object-like/index.js +6 -0
- package/dist/core/schemas/builders/object-like/types.d.ts +7 -0
- package/dist/core/schemas/builders/object-like/types.js +2 -0
- package/dist/core/schemas/builders/primitives/any.d.ts +1 -0
- package/dist/core/schemas/builders/primitives/any.js +6 -0
- package/dist/core/schemas/builders/primitives/boolean.d.ts +1 -0
- package/dist/core/schemas/builders/primitives/boolean.js +25 -0
- package/dist/core/schemas/builders/primitives/index.d.ts +5 -0
- package/dist/core/schemas/builders/primitives/index.js +13 -0
- package/dist/core/schemas/builders/primitives/number.d.ts +1 -0
- package/dist/core/schemas/builders/primitives/number.js +25 -0
- package/dist/core/schemas/builders/primitives/string.d.ts +1 -0
- package/dist/core/schemas/builders/primitives/string.js +25 -0
- package/dist/core/schemas/builders/primitives/unknown.d.ts +1 -0
- package/dist/core/schemas/builders/primitives/unknown.js +6 -0
- package/dist/core/schemas/builders/record/index.d.ts +2 -0
- package/dist/core/schemas/builders/record/index.js +5 -0
- package/dist/core/schemas/builders/record/record.d.ts +3 -0
- package/dist/core/schemas/builders/record/record.js +94 -0
- package/dist/core/schemas/builders/record/types.d.ts +4 -0
- package/dist/core/schemas/builders/record/types.js +2 -0
- package/dist/core/schemas/builders/schema-utils/JsonError.d.ts +5 -0
- package/dist/core/schemas/builders/schema-utils/JsonError.js +12 -0
- package/dist/core/schemas/builders/schema-utils/ParseError.d.ts +5 -0
- package/dist/core/schemas/builders/schema-utils/ParseError.js +12 -0
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +17 -0
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +81 -0
- package/dist/core/schemas/builders/schema-utils/index.d.ts +4 -0
- package/dist/core/schemas/builders/schema-utils/index.js +11 -0
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +2 -0
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +9 -0
- package/dist/core/schemas/builders/set/index.d.ts +1 -0
- package/dist/core/schemas/builders/set/index.js +5 -0
- package/dist/core/schemas/builders/set/set.d.ts +2 -0
- package/dist/core/schemas/builders/set/set.js +43 -0
- package/dist/core/schemas/builders/undiscriminated-union/index.d.ts +2 -0
- package/dist/core/schemas/builders/undiscriminated-union/index.js +5 -0
- package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +4 -0
- package/dist/core/schemas/builders/undiscriminated-union/types.js +2 -0
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +3 -0
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +39 -0
- package/dist/core/schemas/builders/union/discriminant.d.ts +5 -0
- package/dist/core/schemas/builders/union/discriminant.js +9 -0
- package/dist/core/schemas/builders/union/index.d.ts +4 -0
- package/dist/core/schemas/builders/union/index.js +7 -0
- package/dist/core/schemas/builders/union/types.d.ts +13 -0
- package/dist/core/schemas/builders/union/types.js +2 -0
- package/dist/core/schemas/builders/union/union.d.ts +4 -0
- package/dist/core/schemas/builders/union/union.js +129 -0
- package/dist/core/schemas/index.d.ts +2 -0
- package/dist/core/schemas/index.js +17 -0
- package/dist/core/schemas/utils/MaybePromise.d.ts +1 -0
- package/dist/core/schemas/utils/MaybePromise.js +2 -0
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +7 -0
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.js +2 -0
- package/dist/core/schemas/utils/createIdentitySchemaCreator.d.ts +2 -0
- package/dist/core/schemas/utils/createIdentitySchemaCreator.js +15 -0
- package/dist/core/schemas/utils/entries.d.ts +1 -0
- package/dist/core/schemas/utils/entries.js +6 -0
- package/dist/core/schemas/utils/filterObject.d.ts +1 -0
- package/dist/core/schemas/utils/filterObject.js +13 -0
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +1 -0
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +27 -0
- package/dist/core/schemas/utils/isPlainObject.d.ts +1 -0
- package/dist/core/schemas/utils/isPlainObject.js +17 -0
- package/dist/core/schemas/utils/keys.d.ts +1 -0
- package/dist/core/schemas/utils/keys.js +6 -0
- package/dist/core/schemas/utils/maybeSkipValidation.d.ts +2 -0
- package/dist/core/schemas/utils/maybeSkipValidation.js +27 -0
- package/dist/core/schemas/utils/partition.d.ts +1 -0
- package/dist/core/schemas/utils/partition.js +15 -0
- package/dist/environments.d.ts +8 -0
- package/dist/environments.js +10 -0
- package/dist/errors/AirweaveSDKError.d.ts +12 -0
- package/dist/errors/AirweaveSDKError.js +32 -0
- package/dist/errors/AirweaveSDKTimeoutError.d.ts +6 -0
- package/dist/errors/AirweaveSDKTimeoutError.js +13 -0
- package/dist/errors/index.d.ts +2 -0
- package/dist/errors/index.js +7 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +44 -0
- package/dist/serialization/index.d.ts +2 -0
- package/dist/serialization/index.js +18 -0
- package/dist/serialization/resources/connections/client/getConnectionCredentials.d.ts +9 -0
- package/dist/serialization/resources/connections/client/getConnectionCredentials.js +41 -0
- package/dist/serialization/resources/connections/client/getOauth2AuthUrl.d.ts +9 -0
- package/dist/serialization/resources/connections/client/getOauth2AuthUrl.js +41 -0
- package/dist/serialization/resources/connections/client/getOauth2WhiteLabelAuthUrl.d.ts +9 -0
- package/dist/serialization/resources/connections/client/getOauth2WhiteLabelAuthUrl.js +41 -0
- package/dist/serialization/resources/connections/client/index.d.ts +7 -0
- package/dist/serialization/resources/connections/client/index.js +46 -0
- package/dist/serialization/resources/connections/client/listAllConnectedIntegrations.d.ts +11 -0
- package/dist/serialization/resources/connections/client/listAllConnectedIntegrations.js +42 -0
- package/dist/serialization/resources/connections/client/listConnectedIntegrations.d.ts +11 -0
- package/dist/serialization/resources/connections/client/listConnectedIntegrations.js +42 -0
- package/dist/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +13 -0
- package/dist/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js +44 -0
- package/dist/serialization/resources/connections/client/requests/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +13 -0
- package/dist/serialization/resources/connections/client/requests/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js +44 -0
- package/dist/serialization/resources/connections/client/requests/index.d.ts +2 -0
- package/dist/serialization/resources/connections/client/requests/index.js +7 -0
- package/dist/serialization/resources/connections/client/sendOauth2WhiteLabelCode.d.ts +9 -0
- package/dist/serialization/resources/connections/client/sendOauth2WhiteLabelCode.js +41 -0
- package/dist/serialization/resources/connections/index.d.ts +1 -0
- package/dist/serialization/resources/connections/index.js +17 -0
- package/dist/serialization/resources/destinations/client/index.d.ts +1 -0
- package/dist/serialization/resources/destinations/client/index.js +37 -0
- package/dist/serialization/resources/destinations/client/listDestinations.d.ts +11 -0
- package/dist/serialization/resources/destinations/client/listDestinations.js +42 -0
- package/dist/serialization/resources/destinations/index.d.ts +1 -0
- package/dist/serialization/resources/destinations/index.js +17 -0
- package/dist/serialization/resources/embeddingModels/client/index.d.ts +1 -0
- package/dist/serialization/resources/embeddingModels/client/index.js +37 -0
- package/dist/serialization/resources/embeddingModels/client/readEmbeddingModels.d.ts +11 -0
- package/dist/serialization/resources/embeddingModels/client/readEmbeddingModels.js +42 -0
- package/dist/serialization/resources/embeddingModels/index.d.ts +1 -0
- package/dist/serialization/resources/embeddingModels/index.js +17 -0
- package/dist/serialization/resources/entities/client/getEntityDefinitionsByIds.d.ts +15 -0
- package/dist/serialization/resources/entities/client/getEntityDefinitionsByIds.js +43 -0
- package/dist/serialization/resources/entities/client/getEntityDefinitionsBySourceShortName.d.ts +11 -0
- package/dist/serialization/resources/entities/client/getEntityDefinitionsBySourceShortName.js +42 -0
- package/dist/serialization/resources/entities/client/index.d.ts +5 -0
- package/dist/serialization/resources/entities/client/index.js +44 -0
- package/dist/serialization/resources/entities/client/listEntityDefinitions.d.ts +11 -0
- package/dist/serialization/resources/entities/client/listEntityDefinitions.js +42 -0
- package/dist/serialization/resources/entities/client/listEntityRelations.d.ts +11 -0
- package/dist/serialization/resources/entities/client/listEntityRelations.js +42 -0
- package/dist/serialization/resources/entities/client/requests/EntityDefinitionCreate.d.ts +20 -0
- package/dist/serialization/resources/entities/client/requests/EntityDefinitionCreate.js +51 -0
- package/dist/serialization/resources/entities/client/requests/EntityDefinitionUpdate.d.ts +20 -0
- package/dist/serialization/resources/entities/client/requests/EntityDefinitionUpdate.js +51 -0
- package/dist/serialization/resources/entities/client/requests/EntityRelationCreate.d.ts +15 -0
- package/dist/serialization/resources/entities/client/requests/EntityRelationCreate.js +46 -0
- package/dist/serialization/resources/entities/client/requests/EntityRelationUpdate.d.ts +15 -0
- package/dist/serialization/resources/entities/client/requests/EntityRelationUpdate.js +46 -0
- package/dist/serialization/resources/entities/client/requests/index.d.ts +4 -0
- package/dist/serialization/resources/entities/client/requests/index.js +11 -0
- package/dist/serialization/resources/entities/index.d.ts +2 -0
- package/dist/serialization/resources/entities/index.js +18 -0
- package/dist/serialization/resources/entities/types/EntityDefinitionCreateEntitySchema.d.ts +10 -0
- package/dist/serialization/resources/entities/types/EntityDefinitionCreateEntitySchema.js +44 -0
- package/dist/serialization/resources/entities/types/EntityDefinitionUpdateEntitySchema.d.ts +10 -0
- package/dist/serialization/resources/entities/types/EntityDefinitionUpdateEntitySchema.js +44 -0
- package/dist/serialization/resources/entities/types/index.d.ts +2 -0
- package/dist/serialization/resources/entities/types/index.js +18 -0
- package/dist/serialization/resources/index.d.ts +16 -0
- package/dist/serialization/resources/index.js +55 -0
- package/dist/serialization/resources/search/client/index.d.ts +1 -0
- package/dist/serialization/resources/search/client/index.js +37 -0
- package/dist/serialization/resources/search/client/search.d.ts +9 -0
- package/dist/serialization/resources/search/client/search.js +41 -0
- package/dist/serialization/resources/search/index.d.ts +1 -0
- package/dist/serialization/resources/search/index.js +17 -0
- package/dist/serialization/resources/sources/client/index.d.ts +1 -0
- package/dist/serialization/resources/sources/client/index.js +37 -0
- package/dist/serialization/resources/sources/client/readSources.d.ts +11 -0
- package/dist/serialization/resources/sources/client/readSources.js +42 -0
- package/dist/serialization/resources/sources/index.d.ts +1 -0
- package/dist/serialization/resources/sources/index.js +17 -0
- package/dist/serialization/resources/sync/client/index.d.ts +3 -0
- package/dist/serialization/resources/sync/client/index.js +42 -0
- package/dist/serialization/resources/sync/client/listAllJobs.d.ts +11 -0
- package/dist/serialization/resources/sync/client/listAllJobs.js +42 -0
- package/dist/serialization/resources/sync/client/listSyncJobs.d.ts +11 -0
- package/dist/serialization/resources/sync/client/listSyncJobs.js +42 -0
- package/dist/serialization/resources/sync/client/requests/SyncCreate.d.ts +24 -0
- package/dist/serialization/resources/sync/client/requests/SyncCreate.js +55 -0
- package/dist/serialization/resources/sync/client/requests/SyncUpdate.d.ts +19 -0
- package/dist/serialization/resources/sync/client/requests/SyncUpdate.js +50 -0
- package/dist/serialization/resources/sync/client/requests/index.d.ts +2 -0
- package/dist/serialization/resources/sync/client/requests/index.js +7 -0
- package/dist/serialization/resources/sync/index.d.ts +2 -0
- package/dist/serialization/resources/sync/index.js +18 -0
- package/dist/serialization/resources/sync/types/ListSyncsSyncGetResponse.d.ts +12 -0
- package/dist/serialization/resources/sync/types/ListSyncsSyncGetResponse.js +46 -0
- package/dist/serialization/resources/sync/types/index.d.ts +1 -0
- package/dist/serialization/resources/sync/types/index.js +17 -0
- package/dist/serialization/resources/transformers/client/index.d.ts +2 -0
- package/dist/serialization/resources/transformers/client/index.js +41 -0
- package/dist/serialization/resources/transformers/client/listTransformers.d.ts +11 -0
- package/dist/serialization/resources/transformers/client/listTransformers.js +42 -0
- package/dist/serialization/resources/transformers/client/requests/TransformerCreate.d.ts +18 -0
- package/dist/serialization/resources/transformers/client/requests/TransformerCreate.js +49 -0
- package/dist/serialization/resources/transformers/client/requests/TransformerUpdate.d.ts +18 -0
- package/dist/serialization/resources/transformers/client/requests/TransformerUpdate.js +49 -0
- package/dist/serialization/resources/transformers/client/requests/index.d.ts +2 -0
- package/dist/serialization/resources/transformers/client/requests/index.js +7 -0
- package/dist/serialization/resources/transformers/index.d.ts +1 -0
- package/dist/serialization/resources/transformers/index.js +17 -0
- package/dist/serialization/resources/whiteLabels/client/exchangeWhiteLabelOauth2Code.d.ts +9 -0
- package/dist/serialization/resources/whiteLabels/client/exchangeWhiteLabelOauth2Code.js +41 -0
- package/dist/serialization/resources/whiteLabels/client/getWhiteLabelOauth2AuthUrl.d.ts +9 -0
- package/dist/serialization/resources/whiteLabels/client/getWhiteLabelOauth2AuthUrl.js +41 -0
- package/dist/serialization/resources/whiteLabels/client/index.d.ts +5 -0
- package/dist/serialization/resources/whiteLabels/client/index.js +44 -0
- package/dist/serialization/resources/whiteLabels/client/listWhiteLabelSyncs.d.ts +11 -0
- package/dist/serialization/resources/whiteLabels/client/listWhiteLabelSyncs.js +42 -0
- package/dist/serialization/resources/whiteLabels/client/listWhiteLabels.d.ts +11 -0
- package/dist/serialization/resources/whiteLabels/client/listWhiteLabels.js +42 -0
- package/dist/serialization/resources/whiteLabels/client/requests/WhiteLabelCreate.d.ts +16 -0
- package/dist/serialization/resources/whiteLabels/client/requests/WhiteLabelCreate.js +47 -0
- package/dist/serialization/resources/whiteLabels/client/requests/WhiteLabelUpdate.d.ts +15 -0
- package/dist/serialization/resources/whiteLabels/client/requests/WhiteLabelUpdate.js +46 -0
- package/dist/serialization/resources/whiteLabels/client/requests/index.d.ts +2 -0
- package/dist/serialization/resources/whiteLabels/client/requests/index.js +7 -0
- package/dist/serialization/resources/whiteLabels/index.d.ts +1 -0
- package/dist/serialization/resources/whiteLabels/index.js +17 -0
- package/dist/serialization/types/ApiKey.d.ts +20 -0
- package/dist/serialization/types/ApiKey.js +51 -0
- package/dist/serialization/types/ApiKeyCreate.d.ts +12 -0
- package/dist/serialization/types/ApiKeyCreate.js +43 -0
- package/dist/serialization/types/ApiKeyWithPlainKey.d.ts +21 -0
- package/dist/serialization/types/ApiKeyWithPlainKey.js +52 -0
- package/dist/serialization/types/AuthType.d.ts +10 -0
- package/dist/serialization/types/AuthType.js +50 -0
- package/dist/serialization/types/Chat.d.ts +25 -0
- package/dist/serialization/types/Chat.js +56 -0
- package/dist/serialization/types/ChatCreate.d.ts +17 -0
- package/dist/serialization/types/ChatCreate.js +48 -0
- package/dist/serialization/types/ChatMessage.d.ts +21 -0
- package/dist/serialization/types/ChatMessage.js +52 -0
- package/dist/serialization/types/ChatMessageCreate.d.ts +13 -0
- package/dist/serialization/types/ChatMessageCreate.js +44 -0
- package/dist/serialization/types/ChatUpdate.d.ts +15 -0
- package/dist/serialization/types/ChatUpdate.js +46 -0
- package/dist/serialization/types/ConfigField.d.ts +15 -0
- package/dist/serialization/types/ConfigField.js +46 -0
- package/dist/serialization/types/Connection.d.ts +22 -0
- package/dist/serialization/types/Connection.js +53 -0
- package/dist/serialization/types/ConnectionStatus.d.ts +10 -0
- package/dist/serialization/types/ConnectionStatus.js +41 -0
- package/dist/serialization/types/DagEdge.d.ts +18 -0
- package/dist/serialization/types/DagEdge.js +49 -0
- package/dist/serialization/types/DagEdgeCreate.d.ts +13 -0
- package/dist/serialization/types/DagEdgeCreate.js +44 -0
- package/dist/serialization/types/DagNode.d.ts +23 -0
- package/dist/serialization/types/DagNode.js +54 -0
- package/dist/serialization/types/DagNodeCreate.d.ts +19 -0
- package/dist/serialization/types/DagNodeCreate.js +50 -0
- package/dist/serialization/types/Destination.d.ts +25 -0
- package/dist/serialization/types/Destination.js +56 -0
- package/dist/serialization/types/DestinationWithConfigFields.d.ts +27 -0
- package/dist/serialization/types/DestinationWithConfigFields.js +58 -0
- package/dist/serialization/types/EmbeddingModel.d.ts +23 -0
- package/dist/serialization/types/EmbeddingModel.js +54 -0
- package/dist/serialization/types/EmbeddingModelWithConfigFields.d.ts +25 -0
- package/dist/serialization/types/EmbeddingModelWithConfigFields.js +56 -0
- package/dist/serialization/types/EntityDefinition.d.ts +22 -0
- package/dist/serialization/types/EntityDefinition.js +53 -0
- package/dist/serialization/types/EntityDefinitionEntitySchema.d.ts +10 -0
- package/dist/serialization/types/EntityDefinitionEntitySchema.js +44 -0
- package/dist/serialization/types/EntityRelation.d.ts +19 -0
- package/dist/serialization/types/EntityRelation.js +50 -0
- package/dist/serialization/types/EntityType.d.ts +10 -0
- package/dist/serialization/types/EntityType.js +41 -0
- package/dist/serialization/types/Fields.d.ts +13 -0
- package/dist/serialization/types/Fields.js +44 -0
- package/dist/serialization/types/HttpValidationError.d.ts +13 -0
- package/dist/serialization/types/HttpValidationError.js +44 -0
- package/dist/serialization/types/IntegrationType.d.ts +10 -0
- package/dist/serialization/types/IntegrationType.js +41 -0
- package/dist/serialization/types/NodeType.d.ts +10 -0
- package/dist/serialization/types/NodeType.js +41 -0
- package/dist/serialization/types/Source.d.ts +25 -0
- package/dist/serialization/types/Source.js +56 -0
- package/dist/serialization/types/SourceWithConfigFields.d.ts +27 -0
- package/dist/serialization/types/SourceWithConfigFields.js +58 -0
- package/dist/serialization/types/Sync.d.ts +29 -0
- package/dist/serialization/types/Sync.js +60 -0
- package/dist/serialization/types/SyncDag.d.ts +22 -0
- package/dist/serialization/types/SyncDag.js +53 -0
- package/dist/serialization/types/SyncDagCreate.d.ts +18 -0
- package/dist/serialization/types/SyncDagCreate.js +49 -0
- package/dist/serialization/types/SyncDagUpdate.d.ts +18 -0
- package/dist/serialization/types/SyncDagUpdate.js +49 -0
- package/dist/serialization/types/SyncJob.d.ts +29 -0
- package/dist/serialization/types/SyncJob.js +60 -0
- package/dist/serialization/types/SyncJobStatus.d.ts +10 -0
- package/dist/serialization/types/SyncJobStatus.js +41 -0
- package/dist/serialization/types/SyncStatus.d.ts +10 -0
- package/dist/serialization/types/SyncStatus.js +41 -0
- package/dist/serialization/types/SyncWithSourceConnection.d.ts +31 -0
- package/dist/serialization/types/SyncWithSourceConnection.js +62 -0
- package/dist/serialization/types/Transformer.d.ts +22 -0
- package/dist/serialization/types/Transformer.js +53 -0
- package/dist/serialization/types/User.d.ts +16 -0
- package/dist/serialization/types/User.js +47 -0
- package/dist/serialization/types/ValidationError.d.ts +15 -0
- package/dist/serialization/types/ValidationError.js +46 -0
- package/dist/serialization/types/ValidationErrorLocItem.d.ts +10 -0
- package/dist/serialization/types/ValidationErrorLocItem.js +41 -0
- package/dist/serialization/types/WhiteLabel.d.ts +22 -0
- package/dist/serialization/types/WhiteLabel.js +53 -0
- package/dist/serialization/types/index.d.ts +43 -0
- package/dist/serialization/types/index.js +59 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +4 -0
- package/environments.d.ts +8 -0
- package/environments.js +10 -0
- package/errors/AirweaveSDKError.d.ts +12 -0
- package/errors/AirweaveSDKError.js +32 -0
- package/errors/AirweaveSDKTimeoutError.d.ts +6 -0
- package/errors/AirweaveSDKTimeoutError.js +13 -0
- package/errors/index.d.ts +2 -0
- package/errors/index.js +7 -0
- package/index.d.ts +4 -0
- package/index.js +44 -1
- package/jest.config.js +5 -0
- package/package.json +41 -14
- package/reference.md +3733 -0
- package/serialization/index.d.ts +2 -0
- package/serialization/index.js +18 -0
- package/serialization/resources/connections/client/getConnectionCredentials.d.ts +9 -0
- package/serialization/resources/connections/client/getConnectionCredentials.js +41 -0
- package/serialization/resources/connections/client/getOauth2AuthUrl.d.ts +9 -0
- package/serialization/resources/connections/client/getOauth2AuthUrl.js +41 -0
- package/serialization/resources/connections/client/getOauth2WhiteLabelAuthUrl.d.ts +9 -0
- package/serialization/resources/connections/client/getOauth2WhiteLabelAuthUrl.js +41 -0
- package/serialization/resources/connections/client/index.d.ts +7 -0
- package/serialization/resources/connections/client/index.js +46 -0
- package/serialization/resources/connections/client/listAllConnectedIntegrations.d.ts +11 -0
- package/serialization/resources/connections/client/listAllConnectedIntegrations.js +42 -0
- package/serialization/resources/connections/client/listConnectedIntegrations.d.ts +11 -0
- package/serialization/resources/connections/client/listConnectedIntegrations.js +42 -0
- package/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +13 -0
- package/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js +44 -0
- package/serialization/resources/connections/client/requests/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +13 -0
- package/serialization/resources/connections/client/requests/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js +44 -0
- package/serialization/resources/connections/client/requests/index.d.ts +2 -0
- package/serialization/resources/connections/client/requests/index.js +7 -0
- package/serialization/resources/connections/client/sendOauth2WhiteLabelCode.d.ts +9 -0
- package/serialization/resources/connections/client/sendOauth2WhiteLabelCode.js +41 -0
- package/serialization/resources/connections/index.d.ts +1 -0
- package/serialization/resources/connections/index.js +17 -0
- package/serialization/resources/destinations/client/index.d.ts +1 -0
- package/serialization/resources/destinations/client/index.js +37 -0
- package/serialization/resources/destinations/client/listDestinations.d.ts +11 -0
- package/serialization/resources/destinations/client/listDestinations.js +42 -0
- package/serialization/resources/destinations/index.d.ts +1 -0
- package/serialization/resources/destinations/index.js +17 -0
- package/serialization/resources/embeddingModels/client/index.d.ts +1 -0
- package/serialization/resources/embeddingModels/client/index.js +37 -0
- package/serialization/resources/embeddingModels/client/readEmbeddingModels.d.ts +11 -0
- package/serialization/resources/embeddingModels/client/readEmbeddingModels.js +42 -0
- package/serialization/resources/embeddingModels/index.d.ts +1 -0
- package/serialization/resources/embeddingModels/index.js +17 -0
- package/serialization/resources/entities/client/getEntityDefinitionsByIds.d.ts +15 -0
- package/serialization/resources/entities/client/getEntityDefinitionsByIds.js +43 -0
- package/serialization/resources/entities/client/getEntityDefinitionsBySourceShortName.d.ts +11 -0
- package/serialization/resources/entities/client/getEntityDefinitionsBySourceShortName.js +42 -0
- package/serialization/resources/entities/client/index.d.ts +5 -0
- package/serialization/resources/entities/client/index.js +44 -0
- package/serialization/resources/entities/client/listEntityDefinitions.d.ts +11 -0
- package/serialization/resources/entities/client/listEntityDefinitions.js +42 -0
- package/serialization/resources/entities/client/listEntityRelations.d.ts +11 -0
- package/serialization/resources/entities/client/listEntityRelations.js +42 -0
- package/serialization/resources/entities/client/requests/EntityDefinitionCreate.d.ts +20 -0
- package/serialization/resources/entities/client/requests/EntityDefinitionCreate.js +51 -0
- package/serialization/resources/entities/client/requests/EntityDefinitionUpdate.d.ts +20 -0
- package/serialization/resources/entities/client/requests/EntityDefinitionUpdate.js +51 -0
- package/serialization/resources/entities/client/requests/EntityRelationCreate.d.ts +15 -0
- package/serialization/resources/entities/client/requests/EntityRelationCreate.js +46 -0
- package/serialization/resources/entities/client/requests/EntityRelationUpdate.d.ts +15 -0
- package/serialization/resources/entities/client/requests/EntityRelationUpdate.js +46 -0
- package/serialization/resources/entities/client/requests/index.d.ts +4 -0
- package/serialization/resources/entities/client/requests/index.js +11 -0
- package/serialization/resources/entities/index.d.ts +2 -0
- package/serialization/resources/entities/index.js +18 -0
- package/serialization/resources/entities/types/EntityDefinitionCreateEntitySchema.d.ts +10 -0
- package/serialization/resources/entities/types/EntityDefinitionCreateEntitySchema.js +44 -0
- package/serialization/resources/entities/types/EntityDefinitionUpdateEntitySchema.d.ts +10 -0
- package/serialization/resources/entities/types/EntityDefinitionUpdateEntitySchema.js +44 -0
- package/serialization/resources/entities/types/index.d.ts +2 -0
- package/serialization/resources/entities/types/index.js +18 -0
- package/serialization/resources/index.d.ts +16 -0
- package/serialization/resources/index.js +55 -0
- package/serialization/resources/search/client/index.d.ts +1 -0
- package/serialization/resources/search/client/index.js +37 -0
- package/serialization/resources/search/client/search.d.ts +9 -0
- package/serialization/resources/search/client/search.js +41 -0
- package/serialization/resources/search/index.d.ts +1 -0
- package/serialization/resources/search/index.js +17 -0
- package/serialization/resources/sources/client/index.d.ts +1 -0
- package/serialization/resources/sources/client/index.js +37 -0
- package/serialization/resources/sources/client/readSources.d.ts +11 -0
- package/serialization/resources/sources/client/readSources.js +42 -0
- package/serialization/resources/sources/index.d.ts +1 -0
- package/serialization/resources/sources/index.js +17 -0
- package/serialization/resources/sync/client/index.d.ts +3 -0
- package/serialization/resources/sync/client/index.js +42 -0
- package/serialization/resources/sync/client/listAllJobs.d.ts +11 -0
- package/serialization/resources/sync/client/listAllJobs.js +42 -0
- package/serialization/resources/sync/client/listSyncJobs.d.ts +11 -0
- package/serialization/resources/sync/client/listSyncJobs.js +42 -0
- package/serialization/resources/sync/client/requests/SyncCreate.d.ts +24 -0
- package/serialization/resources/sync/client/requests/SyncCreate.js +55 -0
- package/serialization/resources/sync/client/requests/SyncUpdate.d.ts +19 -0
- package/serialization/resources/sync/client/requests/SyncUpdate.js +50 -0
- package/serialization/resources/sync/client/requests/index.d.ts +2 -0
- package/serialization/resources/sync/client/requests/index.js +7 -0
- package/serialization/resources/sync/index.d.ts +2 -0
- package/serialization/resources/sync/index.js +18 -0
- package/serialization/resources/sync/types/ListSyncsSyncGetResponse.d.ts +12 -0
- package/serialization/resources/sync/types/ListSyncsSyncGetResponse.js +46 -0
- package/serialization/resources/sync/types/index.d.ts +1 -0
- package/serialization/resources/sync/types/index.js +17 -0
- package/serialization/resources/transformers/client/index.d.ts +2 -0
- package/serialization/resources/transformers/client/index.js +41 -0
- package/serialization/resources/transformers/client/listTransformers.d.ts +11 -0
- package/serialization/resources/transformers/client/listTransformers.js +42 -0
- package/serialization/resources/transformers/client/requests/TransformerCreate.d.ts +18 -0
- package/serialization/resources/transformers/client/requests/TransformerCreate.js +49 -0
- package/serialization/resources/transformers/client/requests/TransformerUpdate.d.ts +18 -0
- package/serialization/resources/transformers/client/requests/TransformerUpdate.js +49 -0
- package/serialization/resources/transformers/client/requests/index.d.ts +2 -0
- package/serialization/resources/transformers/client/requests/index.js +7 -0
- package/serialization/resources/transformers/index.d.ts +1 -0
- package/serialization/resources/transformers/index.js +17 -0
- package/serialization/resources/whiteLabels/client/exchangeWhiteLabelOauth2Code.d.ts +9 -0
- package/serialization/resources/whiteLabels/client/exchangeWhiteLabelOauth2Code.js +41 -0
- package/serialization/resources/whiteLabels/client/getWhiteLabelOauth2AuthUrl.d.ts +9 -0
- package/serialization/resources/whiteLabels/client/getWhiteLabelOauth2AuthUrl.js +41 -0
- package/serialization/resources/whiteLabels/client/index.d.ts +5 -0
- package/serialization/resources/whiteLabels/client/index.js +44 -0
- package/serialization/resources/whiteLabels/client/listWhiteLabelSyncs.d.ts +11 -0
- package/serialization/resources/whiteLabels/client/listWhiteLabelSyncs.js +42 -0
- package/serialization/resources/whiteLabels/client/listWhiteLabels.d.ts +11 -0
- package/serialization/resources/whiteLabels/client/listWhiteLabels.js +42 -0
- package/serialization/resources/whiteLabels/client/requests/WhiteLabelCreate.d.ts +16 -0
- package/serialization/resources/whiteLabels/client/requests/WhiteLabelCreate.js +47 -0
- package/serialization/resources/whiteLabels/client/requests/WhiteLabelUpdate.d.ts +15 -0
- package/serialization/resources/whiteLabels/client/requests/WhiteLabelUpdate.js +46 -0
- package/serialization/resources/whiteLabels/client/requests/index.d.ts +2 -0
- package/serialization/resources/whiteLabels/client/requests/index.js +7 -0
- package/serialization/resources/whiteLabels/index.d.ts +1 -0
- package/serialization/resources/whiteLabels/index.js +17 -0
- package/serialization/types/ApiKey.d.ts +20 -0
- package/serialization/types/ApiKey.js +51 -0
- package/serialization/types/ApiKeyCreate.d.ts +12 -0
- package/serialization/types/ApiKeyCreate.js +43 -0
- package/serialization/types/ApiKeyWithPlainKey.d.ts +21 -0
- package/serialization/types/ApiKeyWithPlainKey.js +52 -0
- package/serialization/types/AuthType.d.ts +10 -0
- package/serialization/types/AuthType.js +50 -0
- package/serialization/types/Chat.d.ts +25 -0
- package/serialization/types/Chat.js +56 -0
- package/serialization/types/ChatCreate.d.ts +17 -0
- package/serialization/types/ChatCreate.js +48 -0
- package/serialization/types/ChatMessage.d.ts +21 -0
- package/serialization/types/ChatMessage.js +52 -0
- package/serialization/types/ChatMessageCreate.d.ts +13 -0
- package/serialization/types/ChatMessageCreate.js +44 -0
- package/serialization/types/ChatUpdate.d.ts +15 -0
- package/serialization/types/ChatUpdate.js +46 -0
- package/serialization/types/ConfigField.d.ts +15 -0
- package/serialization/types/ConfigField.js +46 -0
- package/serialization/types/Connection.d.ts +22 -0
- package/serialization/types/Connection.js +53 -0
- package/serialization/types/ConnectionStatus.d.ts +10 -0
- package/serialization/types/ConnectionStatus.js +41 -0
- package/serialization/types/DagEdge.d.ts +18 -0
- package/serialization/types/DagEdge.js +49 -0
- package/serialization/types/DagEdgeCreate.d.ts +13 -0
- package/serialization/types/DagEdgeCreate.js +44 -0
- package/serialization/types/DagNode.d.ts +23 -0
- package/serialization/types/DagNode.js +54 -0
- package/serialization/types/DagNodeCreate.d.ts +19 -0
- package/serialization/types/DagNodeCreate.js +50 -0
- package/serialization/types/Destination.d.ts +25 -0
- package/serialization/types/Destination.js +56 -0
- package/serialization/types/DestinationWithConfigFields.d.ts +27 -0
- package/serialization/types/DestinationWithConfigFields.js +58 -0
- package/serialization/types/EmbeddingModel.d.ts +23 -0
- package/serialization/types/EmbeddingModel.js +54 -0
- package/serialization/types/EmbeddingModelWithConfigFields.d.ts +25 -0
- package/serialization/types/EmbeddingModelWithConfigFields.js +56 -0
- package/serialization/types/EntityDefinition.d.ts +22 -0
- package/serialization/types/EntityDefinition.js +53 -0
- package/serialization/types/EntityDefinitionEntitySchema.d.ts +10 -0
- package/serialization/types/EntityDefinitionEntitySchema.js +44 -0
- package/serialization/types/EntityRelation.d.ts +19 -0
- package/serialization/types/EntityRelation.js +50 -0
- package/serialization/types/EntityType.d.ts +10 -0
- package/serialization/types/EntityType.js +41 -0
- package/serialization/types/Fields.d.ts +13 -0
- package/serialization/types/Fields.js +44 -0
- package/serialization/types/HttpValidationError.d.ts +13 -0
- package/serialization/types/HttpValidationError.js +44 -0
- package/serialization/types/IntegrationType.d.ts +10 -0
- package/serialization/types/IntegrationType.js +41 -0
- package/serialization/types/NodeType.d.ts +10 -0
- package/serialization/types/NodeType.js +41 -0
- package/serialization/types/Source.d.ts +25 -0
- package/serialization/types/Source.js +56 -0
- package/serialization/types/SourceWithConfigFields.d.ts +27 -0
- package/serialization/types/SourceWithConfigFields.js +58 -0
- package/serialization/types/Sync.d.ts +29 -0
- package/serialization/types/Sync.js +60 -0
- package/serialization/types/SyncDag.d.ts +22 -0
- package/serialization/types/SyncDag.js +53 -0
- package/serialization/types/SyncDagCreate.d.ts +18 -0
- package/serialization/types/SyncDagCreate.js +49 -0
- package/serialization/types/SyncDagUpdate.d.ts +18 -0
- package/serialization/types/SyncDagUpdate.js +49 -0
- package/serialization/types/SyncJob.d.ts +29 -0
- package/serialization/types/SyncJob.js +60 -0
- package/serialization/types/SyncJobStatus.d.ts +10 -0
- package/serialization/types/SyncJobStatus.js +41 -0
- package/serialization/types/SyncStatus.d.ts +10 -0
- package/serialization/types/SyncStatus.js +41 -0
- package/serialization/types/SyncWithSourceConnection.d.ts +31 -0
- package/serialization/types/SyncWithSourceConnection.js +62 -0
- package/serialization/types/Transformer.d.ts +22 -0
- package/serialization/types/Transformer.js +53 -0
- package/serialization/types/User.d.ts +16 -0
- package/serialization/types/User.js +47 -0
- package/serialization/types/ValidationError.d.ts +15 -0
- package/serialization/types/ValidationError.js +46 -0
- package/serialization/types/ValidationErrorLocItem.d.ts +10 -0
- package/serialization/types/ValidationErrorLocItem.js +41 -0
- package/serialization/types/WhiteLabel.d.ts +22 -0
- package/serialization/types/WhiteLabel.js +53 -0
- package/serialization/types/index.d.ts +43 -0
- package/serialization/types/index.js +59 -0
- package/version.d.ts +1 -0
- package/version.js +4 -0
|
@@ -0,0 +1,1001 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
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
|
+
})();
|
|
38
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
39
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
40
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
41
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
42
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
43
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
44
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
48
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
|
+
};
|
|
50
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
+
exports.Connections = void 0;
|
|
52
|
+
const environments = __importStar(require("../../../../environments"));
|
|
53
|
+
const core = __importStar(require("../../../../core"));
|
|
54
|
+
const AirweaveSDK = __importStar(require("../../../index"));
|
|
55
|
+
const url_join_1 = __importDefault(require("url-join"));
|
|
56
|
+
const serializers = __importStar(require("../../../../serialization/index"));
|
|
57
|
+
const errors = __importStar(require("../../../../errors/index"));
|
|
58
|
+
class Connections {
|
|
59
|
+
constructor(_options = {}) {
|
|
60
|
+
this._options = _options;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Get a specific connection.
|
|
64
|
+
*
|
|
65
|
+
* Args:
|
|
66
|
+
* -----
|
|
67
|
+
* connection_id: The ID of the connection to get.
|
|
68
|
+
* db: The database session.
|
|
69
|
+
* user: The current user.
|
|
70
|
+
*
|
|
71
|
+
* Returns:
|
|
72
|
+
* -------
|
|
73
|
+
* schemas.Connection: The connection.
|
|
74
|
+
*
|
|
75
|
+
* @param {string} connectionId
|
|
76
|
+
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
77
|
+
*
|
|
78
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* await client.connections.getConnection("connection_id")
|
|
82
|
+
*/
|
|
83
|
+
getConnection(connectionId, requestOptions) {
|
|
84
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
85
|
+
var _a;
|
|
86
|
+
const _response = yield core.fetcher({
|
|
87
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/detail/${encodeURIComponent(connectionId)}`),
|
|
88
|
+
method: "GET",
|
|
89
|
+
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
90
|
+
? yield core.Supplier.get(this._options.apiKey)
|
|
91
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.0.82", "User-Agent": "@airweave/sdk/0.0.82", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
92
|
+
contentType: "application/json",
|
|
93
|
+
requestType: "json",
|
|
94
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
95
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
96
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
97
|
+
});
|
|
98
|
+
if (_response.ok) {
|
|
99
|
+
return serializers.Connection.parseOrThrow(_response.body, {
|
|
100
|
+
unrecognizedObjectKeys: "passthrough",
|
|
101
|
+
allowUnrecognizedUnionMembers: true,
|
|
102
|
+
allowUnrecognizedEnumValues: true,
|
|
103
|
+
breadcrumbsPrefix: ["response"],
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
if (_response.error.reason === "status-code") {
|
|
107
|
+
switch (_response.error.statusCode) {
|
|
108
|
+
case 422:
|
|
109
|
+
throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
110
|
+
unrecognizedObjectKeys: "passthrough",
|
|
111
|
+
allowUnrecognizedUnionMembers: true,
|
|
112
|
+
allowUnrecognizedEnumValues: true,
|
|
113
|
+
breadcrumbsPrefix: ["response"],
|
|
114
|
+
}));
|
|
115
|
+
default:
|
|
116
|
+
throw new errors.AirweaveSDKError({
|
|
117
|
+
statusCode: _response.error.statusCode,
|
|
118
|
+
body: _response.error.body,
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
switch (_response.error.reason) {
|
|
123
|
+
case "non-json":
|
|
124
|
+
throw new errors.AirweaveSDKError({
|
|
125
|
+
statusCode: _response.error.statusCode,
|
|
126
|
+
body: _response.error.rawBody,
|
|
127
|
+
});
|
|
128
|
+
case "timeout":
|
|
129
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /connections/detail/{connection_id}.");
|
|
130
|
+
case "unknown":
|
|
131
|
+
throw new errors.AirweaveSDKError({
|
|
132
|
+
message: _response.error.errorMessage,
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Get all active connections for the current user across all integration types.
|
|
139
|
+
*
|
|
140
|
+
* Args:
|
|
141
|
+
* -----
|
|
142
|
+
* db: The database session.
|
|
143
|
+
* user: The current user.
|
|
144
|
+
*
|
|
145
|
+
* Returns:
|
|
146
|
+
* -------
|
|
147
|
+
* list[schemas.Connection]: The list of connections.
|
|
148
|
+
*
|
|
149
|
+
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
150
|
+
*
|
|
151
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
152
|
+
*
|
|
153
|
+
* @example
|
|
154
|
+
* await client.connections.listAllConnectedIntegrations()
|
|
155
|
+
*/
|
|
156
|
+
listAllConnectedIntegrations(requestOptions) {
|
|
157
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
158
|
+
var _a;
|
|
159
|
+
const _response = yield core.fetcher({
|
|
160
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "connections/list"),
|
|
161
|
+
method: "GET",
|
|
162
|
+
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
163
|
+
? yield core.Supplier.get(this._options.apiKey)
|
|
164
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.0.82", "User-Agent": "@airweave/sdk/0.0.82", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
165
|
+
contentType: "application/json",
|
|
166
|
+
requestType: "json",
|
|
167
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
168
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
169
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
170
|
+
});
|
|
171
|
+
if (_response.ok) {
|
|
172
|
+
return serializers.connections.listAllConnectedIntegrations.Response.parseOrThrow(_response.body, {
|
|
173
|
+
unrecognizedObjectKeys: "passthrough",
|
|
174
|
+
allowUnrecognizedUnionMembers: true,
|
|
175
|
+
allowUnrecognizedEnumValues: true,
|
|
176
|
+
breadcrumbsPrefix: ["response"],
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
if (_response.error.reason === "status-code") {
|
|
180
|
+
switch (_response.error.statusCode) {
|
|
181
|
+
case 422:
|
|
182
|
+
throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
183
|
+
unrecognizedObjectKeys: "passthrough",
|
|
184
|
+
allowUnrecognizedUnionMembers: true,
|
|
185
|
+
allowUnrecognizedEnumValues: true,
|
|
186
|
+
breadcrumbsPrefix: ["response"],
|
|
187
|
+
}));
|
|
188
|
+
default:
|
|
189
|
+
throw new errors.AirweaveSDKError({
|
|
190
|
+
statusCode: _response.error.statusCode,
|
|
191
|
+
body: _response.error.body,
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
switch (_response.error.reason) {
|
|
196
|
+
case "non-json":
|
|
197
|
+
throw new errors.AirweaveSDKError({
|
|
198
|
+
statusCode: _response.error.statusCode,
|
|
199
|
+
body: _response.error.rawBody,
|
|
200
|
+
});
|
|
201
|
+
case "timeout":
|
|
202
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /connections/list.");
|
|
203
|
+
case "unknown":
|
|
204
|
+
throw new errors.AirweaveSDKError({
|
|
205
|
+
message: _response.error.errorMessage,
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Get all integrations of specified type connected to the current user.
|
|
212
|
+
*
|
|
213
|
+
* Args:
|
|
214
|
+
* -----
|
|
215
|
+
* integration_type (IntegrationType): The type of integration to get connections for.
|
|
216
|
+
* db (AsyncSession): The database session.
|
|
217
|
+
* user (schemas.User): The current user.
|
|
218
|
+
*
|
|
219
|
+
* Returns:
|
|
220
|
+
* -------
|
|
221
|
+
* list[schemas.Connection]: The list of connections.
|
|
222
|
+
*
|
|
223
|
+
* @param {AirweaveSDK.IntegrationType} integrationType
|
|
224
|
+
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
225
|
+
*
|
|
226
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
227
|
+
*
|
|
228
|
+
* @example
|
|
229
|
+
* await client.connections.listConnectedIntegrations("source")
|
|
230
|
+
*/
|
|
231
|
+
listConnectedIntegrations(integrationType, requestOptions) {
|
|
232
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
233
|
+
var _a;
|
|
234
|
+
const _response = yield core.fetcher({
|
|
235
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/list/${encodeURIComponent(serializers.IntegrationType.jsonOrThrow(integrationType))}`),
|
|
236
|
+
method: "GET",
|
|
237
|
+
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
238
|
+
? yield core.Supplier.get(this._options.apiKey)
|
|
239
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.0.82", "User-Agent": "@airweave/sdk/0.0.82", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
240
|
+
contentType: "application/json",
|
|
241
|
+
requestType: "json",
|
|
242
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
243
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
244
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
245
|
+
});
|
|
246
|
+
if (_response.ok) {
|
|
247
|
+
return serializers.connections.listConnectedIntegrations.Response.parseOrThrow(_response.body, {
|
|
248
|
+
unrecognizedObjectKeys: "passthrough",
|
|
249
|
+
allowUnrecognizedUnionMembers: true,
|
|
250
|
+
allowUnrecognizedEnumValues: true,
|
|
251
|
+
breadcrumbsPrefix: ["response"],
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
if (_response.error.reason === "status-code") {
|
|
255
|
+
switch (_response.error.statusCode) {
|
|
256
|
+
case 422:
|
|
257
|
+
throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
258
|
+
unrecognizedObjectKeys: "passthrough",
|
|
259
|
+
allowUnrecognizedUnionMembers: true,
|
|
260
|
+
allowUnrecognizedEnumValues: true,
|
|
261
|
+
breadcrumbsPrefix: ["response"],
|
|
262
|
+
}));
|
|
263
|
+
default:
|
|
264
|
+
throw new errors.AirweaveSDKError({
|
|
265
|
+
statusCode: _response.error.statusCode,
|
|
266
|
+
body: _response.error.body,
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
switch (_response.error.reason) {
|
|
271
|
+
case "non-json":
|
|
272
|
+
throw new errors.AirweaveSDKError({
|
|
273
|
+
statusCode: _response.error.statusCode,
|
|
274
|
+
body: _response.error.rawBody,
|
|
275
|
+
});
|
|
276
|
+
case "timeout":
|
|
277
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /connections/list/{integration_type}.");
|
|
278
|
+
case "unknown":
|
|
279
|
+
throw new errors.AirweaveSDKError({
|
|
280
|
+
message: _response.error.errorMessage,
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Connect to a source, destination, or embedding model.
|
|
287
|
+
*
|
|
288
|
+
* Expects a POST body with:
|
|
289
|
+
* ```json
|
|
290
|
+
* {
|
|
291
|
+
* "name": "required connection name",
|
|
292
|
+
* ... other config fields specific to the integration type ...
|
|
293
|
+
* }
|
|
294
|
+
* ```
|
|
295
|
+
*
|
|
296
|
+
* Args:
|
|
297
|
+
* -----
|
|
298
|
+
* db: The database session.
|
|
299
|
+
* integration_type: The type of integration to connect to.
|
|
300
|
+
* short_name: The short name of the integration to connect to.
|
|
301
|
+
* name: The name of the connection.
|
|
302
|
+
* config_fields: The config fields for the integration.
|
|
303
|
+
* user: The current user.
|
|
304
|
+
*
|
|
305
|
+
* Returns:
|
|
306
|
+
* -------
|
|
307
|
+
* schemas.Connection: The connection.
|
|
308
|
+
*
|
|
309
|
+
* @param {AirweaveSDK.IntegrationType} integrationType
|
|
310
|
+
* @param {string} shortName
|
|
311
|
+
* @param {AirweaveSDK.BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost} request
|
|
312
|
+
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
313
|
+
*
|
|
314
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
315
|
+
*
|
|
316
|
+
* @example
|
|
317
|
+
* await client.connections.connectIntegration("source", "short_name", {
|
|
318
|
+
* configFields: {
|
|
319
|
+
* "key": "value"
|
|
320
|
+
* }
|
|
321
|
+
* })
|
|
322
|
+
*/
|
|
323
|
+
connectIntegration(integrationType, shortName, request, requestOptions) {
|
|
324
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
325
|
+
var _a;
|
|
326
|
+
const _response = yield core.fetcher({
|
|
327
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/connect/${encodeURIComponent(serializers.IntegrationType.jsonOrThrow(integrationType))}/${encodeURIComponent(shortName)}`),
|
|
328
|
+
method: "POST",
|
|
329
|
+
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
330
|
+
? yield core.Supplier.get(this._options.apiKey)
|
|
331
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.0.82", "User-Agent": "@airweave/sdk/0.0.82", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
332
|
+
contentType: "application/json",
|
|
333
|
+
requestType: "json",
|
|
334
|
+
body: serializers.BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
335
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
336
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
337
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
338
|
+
});
|
|
339
|
+
if (_response.ok) {
|
|
340
|
+
return serializers.Connection.parseOrThrow(_response.body, {
|
|
341
|
+
unrecognizedObjectKeys: "passthrough",
|
|
342
|
+
allowUnrecognizedUnionMembers: true,
|
|
343
|
+
allowUnrecognizedEnumValues: true,
|
|
344
|
+
breadcrumbsPrefix: ["response"],
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
if (_response.error.reason === "status-code") {
|
|
348
|
+
switch (_response.error.statusCode) {
|
|
349
|
+
case 422:
|
|
350
|
+
throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
351
|
+
unrecognizedObjectKeys: "passthrough",
|
|
352
|
+
allowUnrecognizedUnionMembers: true,
|
|
353
|
+
allowUnrecognizedEnumValues: true,
|
|
354
|
+
breadcrumbsPrefix: ["response"],
|
|
355
|
+
}));
|
|
356
|
+
default:
|
|
357
|
+
throw new errors.AirweaveSDKError({
|
|
358
|
+
statusCode: _response.error.statusCode,
|
|
359
|
+
body: _response.error.body,
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
switch (_response.error.reason) {
|
|
364
|
+
case "non-json":
|
|
365
|
+
throw new errors.AirweaveSDKError({
|
|
366
|
+
statusCode: _response.error.statusCode,
|
|
367
|
+
body: _response.error.rawBody,
|
|
368
|
+
});
|
|
369
|
+
case "timeout":
|
|
370
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /connections/connect/{integration_type}/{short_name}.");
|
|
371
|
+
case "unknown":
|
|
372
|
+
throw new errors.AirweaveSDKError({
|
|
373
|
+
message: _response.error.errorMessage,
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Get the credentials for a connection.
|
|
380
|
+
*
|
|
381
|
+
* Args:
|
|
382
|
+
* -----
|
|
383
|
+
* connection_id (UUID): The ID of the connection to get credentials for
|
|
384
|
+
* db (AsyncSession): The database session
|
|
385
|
+
* user (schemas.User): The current user
|
|
386
|
+
*
|
|
387
|
+
* Returns:
|
|
388
|
+
* -------
|
|
389
|
+
* decrypted_credentials (dict): The credentials for the connection
|
|
390
|
+
*
|
|
391
|
+
* @param {string} connectionId
|
|
392
|
+
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
393
|
+
*
|
|
394
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
395
|
+
*
|
|
396
|
+
* @example
|
|
397
|
+
* await client.connections.getConnectionCredentials("connection_id")
|
|
398
|
+
*/
|
|
399
|
+
getConnectionCredentials(connectionId, requestOptions) {
|
|
400
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
401
|
+
var _a;
|
|
402
|
+
const _response = yield core.fetcher({
|
|
403
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/credentials/${encodeURIComponent(connectionId)}`),
|
|
404
|
+
method: "GET",
|
|
405
|
+
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
406
|
+
? yield core.Supplier.get(this._options.apiKey)
|
|
407
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.0.82", "User-Agent": "@airweave/sdk/0.0.82", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
408
|
+
contentType: "application/json",
|
|
409
|
+
requestType: "json",
|
|
410
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
411
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
412
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
413
|
+
});
|
|
414
|
+
if (_response.ok) {
|
|
415
|
+
return serializers.connections.getConnectionCredentials.Response.parseOrThrow(_response.body, {
|
|
416
|
+
unrecognizedObjectKeys: "passthrough",
|
|
417
|
+
allowUnrecognizedUnionMembers: true,
|
|
418
|
+
allowUnrecognizedEnumValues: true,
|
|
419
|
+
breadcrumbsPrefix: ["response"],
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
if (_response.error.reason === "status-code") {
|
|
423
|
+
switch (_response.error.statusCode) {
|
|
424
|
+
case 422:
|
|
425
|
+
throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
426
|
+
unrecognizedObjectKeys: "passthrough",
|
|
427
|
+
allowUnrecognizedUnionMembers: true,
|
|
428
|
+
allowUnrecognizedEnumValues: true,
|
|
429
|
+
breadcrumbsPrefix: ["response"],
|
|
430
|
+
}));
|
|
431
|
+
default:
|
|
432
|
+
throw new errors.AirweaveSDKError({
|
|
433
|
+
statusCode: _response.error.statusCode,
|
|
434
|
+
body: _response.error.body,
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
switch (_response.error.reason) {
|
|
439
|
+
case "non-json":
|
|
440
|
+
throw new errors.AirweaveSDKError({
|
|
441
|
+
statusCode: _response.error.statusCode,
|
|
442
|
+
body: _response.error.rawBody,
|
|
443
|
+
});
|
|
444
|
+
case "timeout":
|
|
445
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /connections/credentials/{connection_id}.");
|
|
446
|
+
case "unknown":
|
|
447
|
+
throw new errors.AirweaveSDKError({
|
|
448
|
+
message: _response.error.errorMessage,
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* Delete a connection.
|
|
455
|
+
*
|
|
456
|
+
* Deletes the connection and integration credential.
|
|
457
|
+
*
|
|
458
|
+
* Args:
|
|
459
|
+
* -----
|
|
460
|
+
* db (AsyncSession): The database session
|
|
461
|
+
* connection_id (UUID): The ID of the connection to delete
|
|
462
|
+
* user (schemas.User): The current user
|
|
463
|
+
*
|
|
464
|
+
* Returns:
|
|
465
|
+
* --------
|
|
466
|
+
* connection (schemas.Connection): The deleted connection
|
|
467
|
+
*
|
|
468
|
+
* @param {string} connectionId
|
|
469
|
+
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
470
|
+
*
|
|
471
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
472
|
+
*
|
|
473
|
+
* @example
|
|
474
|
+
* await client.connections.deleteConnection("connection_id")
|
|
475
|
+
*/
|
|
476
|
+
deleteConnection(connectionId, requestOptions) {
|
|
477
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
478
|
+
var _a;
|
|
479
|
+
const _response = yield core.fetcher({
|
|
480
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/delete/source/${encodeURIComponent(connectionId)}`),
|
|
481
|
+
method: "DELETE",
|
|
482
|
+
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
483
|
+
? yield core.Supplier.get(this._options.apiKey)
|
|
484
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.0.82", "User-Agent": "@airweave/sdk/0.0.82", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
485
|
+
contentType: "application/json",
|
|
486
|
+
requestType: "json",
|
|
487
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
488
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
489
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
490
|
+
});
|
|
491
|
+
if (_response.ok) {
|
|
492
|
+
return serializers.Connection.parseOrThrow(_response.body, {
|
|
493
|
+
unrecognizedObjectKeys: "passthrough",
|
|
494
|
+
allowUnrecognizedUnionMembers: true,
|
|
495
|
+
allowUnrecognizedEnumValues: true,
|
|
496
|
+
breadcrumbsPrefix: ["response"],
|
|
497
|
+
});
|
|
498
|
+
}
|
|
499
|
+
if (_response.error.reason === "status-code") {
|
|
500
|
+
switch (_response.error.statusCode) {
|
|
501
|
+
case 422:
|
|
502
|
+
throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
503
|
+
unrecognizedObjectKeys: "passthrough",
|
|
504
|
+
allowUnrecognizedUnionMembers: true,
|
|
505
|
+
allowUnrecognizedEnumValues: true,
|
|
506
|
+
breadcrumbsPrefix: ["response"],
|
|
507
|
+
}));
|
|
508
|
+
default:
|
|
509
|
+
throw new errors.AirweaveSDKError({
|
|
510
|
+
statusCode: _response.error.statusCode,
|
|
511
|
+
body: _response.error.body,
|
|
512
|
+
});
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
switch (_response.error.reason) {
|
|
516
|
+
case "non-json":
|
|
517
|
+
throw new errors.AirweaveSDKError({
|
|
518
|
+
statusCode: _response.error.statusCode,
|
|
519
|
+
body: _response.error.rawBody,
|
|
520
|
+
});
|
|
521
|
+
case "timeout":
|
|
522
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling DELETE /connections/delete/source/{connection_id}.");
|
|
523
|
+
case "unknown":
|
|
524
|
+
throw new errors.AirweaveSDKError({
|
|
525
|
+
message: _response.error.errorMessage,
|
|
526
|
+
});
|
|
527
|
+
}
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* Disconnect from a source connection.
|
|
532
|
+
*
|
|
533
|
+
* Args:
|
|
534
|
+
* -----
|
|
535
|
+
* db (AsyncSession): The database session
|
|
536
|
+
* connection_id (UUID): The ID of the connection to disconnect
|
|
537
|
+
* user (schemas.User): The current user
|
|
538
|
+
*
|
|
539
|
+
* Returns:
|
|
540
|
+
* --------
|
|
541
|
+
* connection_schema (schemas.Connection): The disconnected connection
|
|
542
|
+
*
|
|
543
|
+
* @param {string} connectionId
|
|
544
|
+
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
545
|
+
*
|
|
546
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
547
|
+
*
|
|
548
|
+
* @example
|
|
549
|
+
* await client.connections.disconnectSourceConnection("connection_id")
|
|
550
|
+
*/
|
|
551
|
+
disconnectSourceConnection(connectionId, requestOptions) {
|
|
552
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
553
|
+
var _a;
|
|
554
|
+
const _response = yield core.fetcher({
|
|
555
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/disconnect/source/${encodeURIComponent(connectionId)}`),
|
|
556
|
+
method: "PUT",
|
|
557
|
+
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
558
|
+
? yield core.Supplier.get(this._options.apiKey)
|
|
559
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.0.82", "User-Agent": "@airweave/sdk/0.0.82", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
560
|
+
contentType: "application/json",
|
|
561
|
+
requestType: "json",
|
|
562
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
563
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
564
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
565
|
+
});
|
|
566
|
+
if (_response.ok) {
|
|
567
|
+
return serializers.Connection.parseOrThrow(_response.body, {
|
|
568
|
+
unrecognizedObjectKeys: "passthrough",
|
|
569
|
+
allowUnrecognizedUnionMembers: true,
|
|
570
|
+
allowUnrecognizedEnumValues: true,
|
|
571
|
+
breadcrumbsPrefix: ["response"],
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
if (_response.error.reason === "status-code") {
|
|
575
|
+
switch (_response.error.statusCode) {
|
|
576
|
+
case 422:
|
|
577
|
+
throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
578
|
+
unrecognizedObjectKeys: "passthrough",
|
|
579
|
+
allowUnrecognizedUnionMembers: true,
|
|
580
|
+
allowUnrecognizedEnumValues: true,
|
|
581
|
+
breadcrumbsPrefix: ["response"],
|
|
582
|
+
}));
|
|
583
|
+
default:
|
|
584
|
+
throw new errors.AirweaveSDKError({
|
|
585
|
+
statusCode: _response.error.statusCode,
|
|
586
|
+
body: _response.error.body,
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
switch (_response.error.reason) {
|
|
591
|
+
case "non-json":
|
|
592
|
+
throw new errors.AirweaveSDKError({
|
|
593
|
+
statusCode: _response.error.statusCode,
|
|
594
|
+
body: _response.error.rawBody,
|
|
595
|
+
});
|
|
596
|
+
case "timeout":
|
|
597
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling PUT /connections/disconnect/source/{connection_id}.");
|
|
598
|
+
case "unknown":
|
|
599
|
+
throw new errors.AirweaveSDKError({
|
|
600
|
+
message: _response.error.errorMessage,
|
|
601
|
+
});
|
|
602
|
+
}
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
/**
|
|
606
|
+
* Disconnect from a destination connection.
|
|
607
|
+
*
|
|
608
|
+
* Args:
|
|
609
|
+
* -----
|
|
610
|
+
* db (AsyncSession): The database session
|
|
611
|
+
* connection_id (UUID): The ID of the connection to disconnect
|
|
612
|
+
* user (schemas.User): The current user
|
|
613
|
+
*
|
|
614
|
+
* Returns:
|
|
615
|
+
* --------
|
|
616
|
+
* connection_schema (schemas.Connection): The disconnected connection
|
|
617
|
+
*
|
|
618
|
+
* @param {string} connectionId
|
|
619
|
+
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
620
|
+
*
|
|
621
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
622
|
+
*
|
|
623
|
+
* @example
|
|
624
|
+
* await client.connections.disconnectDestinationConnection("connection_id")
|
|
625
|
+
*/
|
|
626
|
+
disconnectDestinationConnection(connectionId, requestOptions) {
|
|
627
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
628
|
+
var _a;
|
|
629
|
+
const _response = yield core.fetcher({
|
|
630
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/disconnect/destination/${encodeURIComponent(connectionId)}`),
|
|
631
|
+
method: "PUT",
|
|
632
|
+
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
633
|
+
? yield core.Supplier.get(this._options.apiKey)
|
|
634
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.0.82", "User-Agent": "@airweave/sdk/0.0.82", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
635
|
+
contentType: "application/json",
|
|
636
|
+
requestType: "json",
|
|
637
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
638
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
639
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
640
|
+
});
|
|
641
|
+
if (_response.ok) {
|
|
642
|
+
return serializers.Connection.parseOrThrow(_response.body, {
|
|
643
|
+
unrecognizedObjectKeys: "passthrough",
|
|
644
|
+
allowUnrecognizedUnionMembers: true,
|
|
645
|
+
allowUnrecognizedEnumValues: true,
|
|
646
|
+
breadcrumbsPrefix: ["response"],
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
if (_response.error.reason === "status-code") {
|
|
650
|
+
switch (_response.error.statusCode) {
|
|
651
|
+
case 422:
|
|
652
|
+
throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
653
|
+
unrecognizedObjectKeys: "passthrough",
|
|
654
|
+
allowUnrecognizedUnionMembers: true,
|
|
655
|
+
allowUnrecognizedEnumValues: true,
|
|
656
|
+
breadcrumbsPrefix: ["response"],
|
|
657
|
+
}));
|
|
658
|
+
default:
|
|
659
|
+
throw new errors.AirweaveSDKError({
|
|
660
|
+
statusCode: _response.error.statusCode,
|
|
661
|
+
body: _response.error.body,
|
|
662
|
+
});
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
switch (_response.error.reason) {
|
|
666
|
+
case "non-json":
|
|
667
|
+
throw new errors.AirweaveSDKError({
|
|
668
|
+
statusCode: _response.error.statusCode,
|
|
669
|
+
body: _response.error.rawBody,
|
|
670
|
+
});
|
|
671
|
+
case "timeout":
|
|
672
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling PUT /connections/disconnect/destination/{connection_id}.");
|
|
673
|
+
case "unknown":
|
|
674
|
+
throw new errors.AirweaveSDKError({
|
|
675
|
+
message: _response.error.errorMessage,
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
});
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* Get the OAuth2 authorization URL for a source.
|
|
682
|
+
*
|
|
683
|
+
* Args:
|
|
684
|
+
* -----
|
|
685
|
+
* db: The database session
|
|
686
|
+
* short_name: The short name of the source
|
|
687
|
+
* user: The current user
|
|
688
|
+
*
|
|
689
|
+
* @param {AirweaveSDK.GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest} request
|
|
690
|
+
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
691
|
+
*
|
|
692
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
693
|
+
*
|
|
694
|
+
* @example
|
|
695
|
+
* await client.connections.getOauth2AuthUrl({
|
|
696
|
+
* shortName: "short_name"
|
|
697
|
+
* })
|
|
698
|
+
*/
|
|
699
|
+
getOauth2AuthUrl(request, requestOptions) {
|
|
700
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
701
|
+
var _a;
|
|
702
|
+
const { shortName } = request;
|
|
703
|
+
const _queryParams = {};
|
|
704
|
+
_queryParams["short_name"] = shortName;
|
|
705
|
+
const _response = yield core.fetcher({
|
|
706
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "connections/oauth2/source/auth_url"),
|
|
707
|
+
method: "GET",
|
|
708
|
+
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
709
|
+
? yield core.Supplier.get(this._options.apiKey)
|
|
710
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.0.82", "User-Agent": "@airweave/sdk/0.0.82", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
711
|
+
contentType: "application/json",
|
|
712
|
+
queryParameters: _queryParams,
|
|
713
|
+
requestType: "json",
|
|
714
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
715
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
716
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
717
|
+
});
|
|
718
|
+
if (_response.ok) {
|
|
719
|
+
return serializers.connections.getOauth2AuthUrl.Response.parseOrThrow(_response.body, {
|
|
720
|
+
unrecognizedObjectKeys: "passthrough",
|
|
721
|
+
allowUnrecognizedUnionMembers: true,
|
|
722
|
+
allowUnrecognizedEnumValues: true,
|
|
723
|
+
breadcrumbsPrefix: ["response"],
|
|
724
|
+
});
|
|
725
|
+
}
|
|
726
|
+
if (_response.error.reason === "status-code") {
|
|
727
|
+
switch (_response.error.statusCode) {
|
|
728
|
+
case 422:
|
|
729
|
+
throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
730
|
+
unrecognizedObjectKeys: "passthrough",
|
|
731
|
+
allowUnrecognizedUnionMembers: true,
|
|
732
|
+
allowUnrecognizedEnumValues: true,
|
|
733
|
+
breadcrumbsPrefix: ["response"],
|
|
734
|
+
}));
|
|
735
|
+
default:
|
|
736
|
+
throw new errors.AirweaveSDKError({
|
|
737
|
+
statusCode: _response.error.statusCode,
|
|
738
|
+
body: _response.error.body,
|
|
739
|
+
});
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
switch (_response.error.reason) {
|
|
743
|
+
case "non-json":
|
|
744
|
+
throw new errors.AirweaveSDKError({
|
|
745
|
+
statusCode: _response.error.statusCode,
|
|
746
|
+
body: _response.error.rawBody,
|
|
747
|
+
});
|
|
748
|
+
case "timeout":
|
|
749
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /connections/oauth2/source/auth_url.");
|
|
750
|
+
case "unknown":
|
|
751
|
+
throw new errors.AirweaveSDKError({
|
|
752
|
+
message: _response.error.errorMessage,
|
|
753
|
+
});
|
|
754
|
+
}
|
|
755
|
+
});
|
|
756
|
+
}
|
|
757
|
+
/**
|
|
758
|
+
* Send the OAuth2 authorization code for a source.
|
|
759
|
+
*
|
|
760
|
+
* This will:
|
|
761
|
+
* 1. Get the OAuth2 settings for the source
|
|
762
|
+
* 2. Exchange the authorization code for a token
|
|
763
|
+
* 3. Create an integration credential with the token
|
|
764
|
+
*
|
|
765
|
+
* Args:
|
|
766
|
+
* -----
|
|
767
|
+
* db: The database session
|
|
768
|
+
* short_name: The short name of the source
|
|
769
|
+
* code: The authorization code
|
|
770
|
+
* user: The current user
|
|
771
|
+
*
|
|
772
|
+
* Returns:
|
|
773
|
+
* --------
|
|
774
|
+
* connection (schemas.Connection): The created connection
|
|
775
|
+
*
|
|
776
|
+
* @param {AirweaveSDK.BodySendOauth2CodeConnectionsOauth2SourceCodePost} request
|
|
777
|
+
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
778
|
+
*
|
|
779
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
780
|
+
*
|
|
781
|
+
* @example
|
|
782
|
+
* await client.connections.sendOauth2Code({
|
|
783
|
+
* shortName: "short_name",
|
|
784
|
+
* code: "code"
|
|
785
|
+
* })
|
|
786
|
+
*/
|
|
787
|
+
sendOauth2Code(request, requestOptions) {
|
|
788
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
789
|
+
var _a;
|
|
790
|
+
const _response = yield core.fetcher({
|
|
791
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "connections/oauth2/source/code"),
|
|
792
|
+
method: "POST",
|
|
793
|
+
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
794
|
+
? yield core.Supplier.get(this._options.apiKey)
|
|
795
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.0.82", "User-Agent": "@airweave/sdk/0.0.82", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
796
|
+
contentType: "application/json",
|
|
797
|
+
requestType: "json",
|
|
798
|
+
body: serializers.BodySendOauth2CodeConnectionsOauth2SourceCodePost.jsonOrThrow(request, {
|
|
799
|
+
unrecognizedObjectKeys: "strip",
|
|
800
|
+
}),
|
|
801
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
802
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
803
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
804
|
+
});
|
|
805
|
+
if (_response.ok) {
|
|
806
|
+
return serializers.Connection.parseOrThrow(_response.body, {
|
|
807
|
+
unrecognizedObjectKeys: "passthrough",
|
|
808
|
+
allowUnrecognizedUnionMembers: true,
|
|
809
|
+
allowUnrecognizedEnumValues: true,
|
|
810
|
+
breadcrumbsPrefix: ["response"],
|
|
811
|
+
});
|
|
812
|
+
}
|
|
813
|
+
if (_response.error.reason === "status-code") {
|
|
814
|
+
switch (_response.error.statusCode) {
|
|
815
|
+
case 422:
|
|
816
|
+
throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
817
|
+
unrecognizedObjectKeys: "passthrough",
|
|
818
|
+
allowUnrecognizedUnionMembers: true,
|
|
819
|
+
allowUnrecognizedEnumValues: true,
|
|
820
|
+
breadcrumbsPrefix: ["response"],
|
|
821
|
+
}));
|
|
822
|
+
default:
|
|
823
|
+
throw new errors.AirweaveSDKError({
|
|
824
|
+
statusCode: _response.error.statusCode,
|
|
825
|
+
body: _response.error.body,
|
|
826
|
+
});
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
switch (_response.error.reason) {
|
|
830
|
+
case "non-json":
|
|
831
|
+
throw new errors.AirweaveSDKError({
|
|
832
|
+
statusCode: _response.error.statusCode,
|
|
833
|
+
body: _response.error.rawBody,
|
|
834
|
+
});
|
|
835
|
+
case "timeout":
|
|
836
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /connections/oauth2/source/code.");
|
|
837
|
+
case "unknown":
|
|
838
|
+
throw new errors.AirweaveSDKError({
|
|
839
|
+
message: _response.error.errorMessage,
|
|
840
|
+
});
|
|
841
|
+
}
|
|
842
|
+
});
|
|
843
|
+
}
|
|
844
|
+
/**
|
|
845
|
+
* Exchange the OAuth2 authorization code for a white label integration.
|
|
846
|
+
*
|
|
847
|
+
* Args:
|
|
848
|
+
* -----
|
|
849
|
+
* db: The database session
|
|
850
|
+
* white_label_id: The ID of the white label integration
|
|
851
|
+
* code: The authorization code
|
|
852
|
+
* user: The current user
|
|
853
|
+
* background_tasks: The background tasks
|
|
854
|
+
*
|
|
855
|
+
* Returns:
|
|
856
|
+
* --------
|
|
857
|
+
* connection (schemas.Connection): The created connection
|
|
858
|
+
*
|
|
859
|
+
* @param {string} whiteLabelId
|
|
860
|
+
* @param {string} request
|
|
861
|
+
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
862
|
+
*
|
|
863
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
864
|
+
*
|
|
865
|
+
* @example
|
|
866
|
+
* await client.connections.sendOauth2WhiteLabelCode("white_label_id", "string")
|
|
867
|
+
*/
|
|
868
|
+
sendOauth2WhiteLabelCode(whiteLabelId, request, requestOptions) {
|
|
869
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
870
|
+
var _a;
|
|
871
|
+
const _response = yield core.fetcher({
|
|
872
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/oauth2/white-label/${encodeURIComponent(whiteLabelId)}/code`),
|
|
873
|
+
method: "POST",
|
|
874
|
+
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
875
|
+
? yield core.Supplier.get(this._options.apiKey)
|
|
876
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.0.82", "User-Agent": "@airweave/sdk/0.0.82", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
877
|
+
contentType: "application/json",
|
|
878
|
+
requestType: "json",
|
|
879
|
+
body: serializers.connections.sendOauth2WhiteLabelCode.Request.jsonOrThrow(request, {
|
|
880
|
+
unrecognizedObjectKeys: "strip",
|
|
881
|
+
}),
|
|
882
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
883
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
884
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
885
|
+
});
|
|
886
|
+
if (_response.ok) {
|
|
887
|
+
return serializers.Connection.parseOrThrow(_response.body, {
|
|
888
|
+
unrecognizedObjectKeys: "passthrough",
|
|
889
|
+
allowUnrecognizedUnionMembers: true,
|
|
890
|
+
allowUnrecognizedEnumValues: true,
|
|
891
|
+
breadcrumbsPrefix: ["response"],
|
|
892
|
+
});
|
|
893
|
+
}
|
|
894
|
+
if (_response.error.reason === "status-code") {
|
|
895
|
+
switch (_response.error.statusCode) {
|
|
896
|
+
case 422:
|
|
897
|
+
throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
898
|
+
unrecognizedObjectKeys: "passthrough",
|
|
899
|
+
allowUnrecognizedUnionMembers: true,
|
|
900
|
+
allowUnrecognizedEnumValues: true,
|
|
901
|
+
breadcrumbsPrefix: ["response"],
|
|
902
|
+
}));
|
|
903
|
+
default:
|
|
904
|
+
throw new errors.AirweaveSDKError({
|
|
905
|
+
statusCode: _response.error.statusCode,
|
|
906
|
+
body: _response.error.body,
|
|
907
|
+
});
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
switch (_response.error.reason) {
|
|
911
|
+
case "non-json":
|
|
912
|
+
throw new errors.AirweaveSDKError({
|
|
913
|
+
statusCode: _response.error.statusCode,
|
|
914
|
+
body: _response.error.rawBody,
|
|
915
|
+
});
|
|
916
|
+
case "timeout":
|
|
917
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /connections/oauth2/white-label/{white_label_id}/code.");
|
|
918
|
+
case "unknown":
|
|
919
|
+
throw new errors.AirweaveSDKError({
|
|
920
|
+
message: _response.error.errorMessage,
|
|
921
|
+
});
|
|
922
|
+
}
|
|
923
|
+
});
|
|
924
|
+
}
|
|
925
|
+
/**
|
|
926
|
+
* Get the OAuth2 authorization URL for a white label integration.
|
|
927
|
+
*
|
|
928
|
+
* Args:
|
|
929
|
+
* -----
|
|
930
|
+
* db: The database session
|
|
931
|
+
* white_label_id: The ID of the white label integration
|
|
932
|
+
* user: The current user
|
|
933
|
+
*
|
|
934
|
+
* Returns:
|
|
935
|
+
* --------
|
|
936
|
+
* str: The OAuth2 authorization URL
|
|
937
|
+
*
|
|
938
|
+
* @param {string} whiteLabelId
|
|
939
|
+
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
940
|
+
*
|
|
941
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
942
|
+
*
|
|
943
|
+
* @example
|
|
944
|
+
* await client.connections.getOauth2WhiteLabelAuthUrl("white_label_id")
|
|
945
|
+
*/
|
|
946
|
+
getOauth2WhiteLabelAuthUrl(whiteLabelId, requestOptions) {
|
|
947
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
948
|
+
var _a;
|
|
949
|
+
const _response = yield core.fetcher({
|
|
950
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/oauth2/white-label/${encodeURIComponent(whiteLabelId)}/auth_url`),
|
|
951
|
+
method: "GET",
|
|
952
|
+
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
953
|
+
? yield core.Supplier.get(this._options.apiKey)
|
|
954
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.0.82", "User-Agent": "@airweave/sdk/0.0.82", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
955
|
+
contentType: "application/json",
|
|
956
|
+
requestType: "json",
|
|
957
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
958
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
959
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
960
|
+
});
|
|
961
|
+
if (_response.ok) {
|
|
962
|
+
return serializers.connections.getOauth2WhiteLabelAuthUrl.Response.parseOrThrow(_response.body, {
|
|
963
|
+
unrecognizedObjectKeys: "passthrough",
|
|
964
|
+
allowUnrecognizedUnionMembers: true,
|
|
965
|
+
allowUnrecognizedEnumValues: true,
|
|
966
|
+
breadcrumbsPrefix: ["response"],
|
|
967
|
+
});
|
|
968
|
+
}
|
|
969
|
+
if (_response.error.reason === "status-code") {
|
|
970
|
+
switch (_response.error.statusCode) {
|
|
971
|
+
case 422:
|
|
972
|
+
throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
973
|
+
unrecognizedObjectKeys: "passthrough",
|
|
974
|
+
allowUnrecognizedUnionMembers: true,
|
|
975
|
+
allowUnrecognizedEnumValues: true,
|
|
976
|
+
breadcrumbsPrefix: ["response"],
|
|
977
|
+
}));
|
|
978
|
+
default:
|
|
979
|
+
throw new errors.AirweaveSDKError({
|
|
980
|
+
statusCode: _response.error.statusCode,
|
|
981
|
+
body: _response.error.body,
|
|
982
|
+
});
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
switch (_response.error.reason) {
|
|
986
|
+
case "non-json":
|
|
987
|
+
throw new errors.AirweaveSDKError({
|
|
988
|
+
statusCode: _response.error.statusCode,
|
|
989
|
+
body: _response.error.rawBody,
|
|
990
|
+
});
|
|
991
|
+
case "timeout":
|
|
992
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /connections/oauth2/white-label/{white_label_id}/auth_url.");
|
|
993
|
+
case "unknown":
|
|
994
|
+
throw new errors.AirweaveSDKError({
|
|
995
|
+
message: _response.error.errorMessage,
|
|
996
|
+
});
|
|
997
|
+
}
|
|
998
|
+
});
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
exports.Connections = Connections;
|