@airweave/sdk 0.2.26 → 0.2.27
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 +8 -13
- package/Client.js +13 -23
- package/README.md +10 -8
- package/api/index.d.ts +1 -1
- package/api/index.js +1 -1
- package/api/resources/collections/client/Client.d.ts +112 -0
- package/{dist/api/resources/apiKeys → api/resources/collections}/client/Client.js +133 -94
- package/api/resources/collections/client/requests/CollectionCreate.d.ts +15 -0
- package/{dist/api/resources/sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.d.ts → api/resources/collections/client/requests/DeleteCollectionCollectionsReadableIdDeleteRequest.d.ts} +1 -1
- package/{dist/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.d.ts → api/resources/collections/client/requests/ListCollectionsCollectionsGetRequest.d.ts} +1 -1
- package/api/resources/collections/client/requests/index.d.ts +3 -0
- package/api/resources/connections/client/Client.d.ts +3 -177
- package/api/resources/connections/client/Client.js +7 -553
- package/api/resources/connections/client/index.d.ts +1 -1
- package/api/resources/connections/client/index.js +0 -15
- package/api/resources/index.d.ts +4 -9
- package/api/resources/index.js +5 -10
- package/api/resources/sourceConnections/client/Client.d.ts +191 -0
- package/{dist/api/resources/sync → api/resources/sourceConnections}/client/Client.js +121 -412
- package/api/resources/sourceConnections/client/requests/DeleteSourceConnectionSourceConnectionsSourceConnectionIdDeleteRequest.d.ts +10 -0
- package/api/resources/sourceConnections/client/requests/GetSourceConnectionSourceConnectionsSourceConnectionIdGetRequest.d.ts +10 -0
- package/api/resources/{sync/client/requests/ListSyncsSyncGetRequest.d.ts → sourceConnections/client/requests/ListSourceConnectionsSourceConnectionsGetRequest.d.ts} +5 -2
- package/api/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.ts +17 -0
- package/api/resources/sourceConnections/client/requests/index.d.ts +4 -0
- package/api/resources/sources/client/Client.d.ts +4 -2
- package/api/resources/sources/client/Client.js +11 -6
- package/api/resources/whiteLabels/client/Client.d.ts +3 -47
- package/api/resources/whiteLabels/client/Client.js +20 -170
- package/api/types/ApiKey.d.ts +3 -3
- package/api/{resources/apiKeys/client/requests → types}/ApiKeyCreate.d.ts +2 -2
- package/{dist/api/resources/connections/client/requests → api/types}/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +1 -9
- package/api/types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.d.ts +8 -0
- package/api/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +2 -0
- package/api/types/Collection.d.ts +19 -0
- package/api/types/CollectionStatus.d.ts +13 -0
- package/api/types/CollectionStatus.js +12 -0
- package/api/types/CollectionUpdate.d.ts +10 -0
- package/api/types/ConfigValues.d.ts +9 -0
- package/{dist/api/types/DestinationWithConfigFields.d.ts → api/types/DestinationWithAuthenticationFields.d.ts} +2 -2
- package/{dist/api/types/EmbeddingModelWithConfigFields.d.ts → api/types/EmbeddingModelWithAuthenticationFields.d.ts} +2 -2
- package/api/types/EntityCount.d.ts +9 -0
- package/api/types/Organization.d.ts +13 -0
- package/api/types/ResponseType.d.ts +11 -0
- package/api/types/ResponseType.js +10 -0
- package/api/types/SearchResponse.d.ts +13 -0
- package/api/types/SearchStatus.d.ts +12 -0
- package/api/types/SearchStatus.js +11 -0
- package/api/types/SourceConnection.d.ts +31 -0
- package/api/types/SourceConnectionAuthFields.d.ts +5 -0
- package/api/types/SourceConnectionCreate.d.ts +21 -0
- package/api/types/SourceConnectionJob.d.ts +30 -0
- package/api/types/SourceConnectionListItem.d.ts +21 -0
- package/api/types/SourceConnectionStatus.d.ts +12 -0
- package/api/types/SourceConnectionStatus.js +11 -0
- package/api/types/{SourceWithConfigFields.d.ts → SourceWithAuthenticationFields.d.ts} +2 -2
- package/{dist/api/resources/sync/client/requests → api/types}/SyncCreate.d.ts +2 -7
- package/api/types/SyncJob.d.ts +6 -4
- package/api/{resources/sync/client/requests → types}/SyncUpdate.d.ts +2 -3
- package/api/types/User.d.ts +1 -1
- package/api/types/UserCreate.d.ts +11 -0
- package/api/types/index.d.ts +24 -4
- package/api/types/index.js +24 -4
- package/core/auth/BasicAuth.d.ts +8 -0
- package/core/auth/BasicAuth.js +26 -0
- package/core/auth/BearerToken.d.ts +5 -0
- package/core/auth/BearerToken.js +15 -0
- package/core/auth/index.d.ts +2 -0
- package/core/auth/index.js +7 -0
- package/core/index.d.ts +1 -0
- package/core/index.js +1 -0
- package/dist/Client.d.ts +8 -13
- package/dist/Client.js +13 -23
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +1 -1
- package/dist/api/resources/collections/client/Client.d.ts +112 -0
- package/{api/resources/apiKeys → dist/api/resources/collections}/client/Client.js +133 -94
- package/dist/api/resources/collections/client/requests/CollectionCreate.d.ts +15 -0
- package/{api/resources/sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.d.ts → dist/api/resources/collections/client/requests/DeleteCollectionCollectionsReadableIdDeleteRequest.d.ts} +1 -1
- package/{api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.d.ts → dist/api/resources/collections/client/requests/ListCollectionsCollectionsGetRequest.d.ts} +1 -1
- package/dist/api/resources/collections/client/requests/index.d.ts +3 -0
- package/dist/api/resources/connections/client/Client.d.ts +3 -177
- package/dist/api/resources/connections/client/Client.js +7 -553
- package/dist/api/resources/connections/client/index.d.ts +1 -1
- package/dist/api/resources/connections/client/index.js +0 -15
- package/dist/api/resources/index.d.ts +4 -9
- package/dist/api/resources/index.js +5 -10
- package/dist/api/resources/sourceConnections/client/Client.d.ts +191 -0
- package/{api/resources/sync → dist/api/resources/sourceConnections}/client/Client.js +121 -412
- package/dist/api/resources/sourceConnections/client/requests/DeleteSourceConnectionSourceConnectionsSourceConnectionIdDeleteRequest.d.ts +10 -0
- package/dist/api/resources/sourceConnections/client/requests/DeleteSourceConnectionSourceConnectionsSourceConnectionIdDeleteRequest.js +5 -0
- package/dist/api/resources/sourceConnections/client/requests/GetSourceConnectionSourceConnectionsSourceConnectionIdGetRequest.d.ts +10 -0
- package/dist/api/resources/sourceConnections/client/requests/GetSourceConnectionSourceConnectionsSourceConnectionIdGetRequest.js +5 -0
- package/{api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.d.ts → dist/api/resources/sourceConnections/client/requests/ListSourceConnectionsSourceConnectionsGetRequest.d.ts} +5 -1
- package/dist/api/resources/sourceConnections/client/requests/ListSourceConnectionsSourceConnectionsGetRequest.js +5 -0
- package/dist/api/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.ts +17 -0
- package/dist/api/resources/sourceConnections/client/requests/SourceConnectionUpdate.js +5 -0
- package/dist/api/resources/sourceConnections/client/requests/index.d.ts +4 -0
- package/dist/api/resources/sources/client/Client.d.ts +4 -2
- package/dist/api/resources/sources/client/Client.js +11 -6
- package/dist/api/resources/whiteLabels/client/Client.d.ts +3 -47
- package/dist/api/resources/whiteLabels/client/Client.js +20 -170
- package/dist/api/types/ApiKey.d.ts +3 -3
- package/dist/api/{resources/apiKeys/client/requests → types}/ApiKeyCreate.d.ts +2 -2
- package/dist/api/types/ApiKeyCreate.js +5 -0
- package/{api/resources/connections/client/requests → dist/api/types}/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +1 -9
- package/dist/api/types/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js +5 -0
- package/dist/api/types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.d.ts +8 -0
- package/dist/api/types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.js +5 -0
- package/dist/api/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +2 -0
- package/dist/api/types/Collection.d.ts +19 -0
- package/dist/api/types/Collection.js +5 -0
- package/dist/api/types/CollectionStatus.d.ts +13 -0
- package/dist/api/types/CollectionStatus.js +12 -0
- package/dist/api/types/CollectionUpdate.d.ts +10 -0
- package/dist/api/types/CollectionUpdate.js +5 -0
- package/dist/api/types/ConfigValues.d.ts +9 -0
- package/dist/api/types/ConfigValues.js +5 -0
- package/{api/types/DestinationWithConfigFields.d.ts → dist/api/types/DestinationWithAuthenticationFields.d.ts} +2 -2
- package/dist/api/types/DestinationWithAuthenticationFields.js +5 -0
- package/{api/types/EmbeddingModelWithConfigFields.d.ts → dist/api/types/EmbeddingModelWithAuthenticationFields.d.ts} +2 -2
- package/dist/api/types/EmbeddingModelWithAuthenticationFields.js +5 -0
- package/dist/api/types/EntityCount.d.ts +9 -0
- package/dist/api/types/EntityCount.js +5 -0
- package/dist/api/types/Organization.d.ts +13 -0
- package/dist/api/types/Organization.js +5 -0
- package/dist/api/types/ResponseType.d.ts +11 -0
- package/dist/api/types/ResponseType.js +10 -0
- package/dist/api/types/SearchResponse.d.ts +13 -0
- package/dist/api/types/SearchResponse.js +5 -0
- package/dist/api/types/SearchStatus.d.ts +12 -0
- package/dist/api/types/SearchStatus.js +11 -0
- package/dist/api/types/SourceConnection.d.ts +31 -0
- package/dist/api/types/SourceConnection.js +5 -0
- package/dist/api/types/SourceConnectionAuthFields.d.ts +5 -0
- package/dist/api/types/SourceConnectionAuthFields.js +5 -0
- package/dist/api/types/SourceConnectionCreate.d.ts +21 -0
- package/dist/api/types/SourceConnectionCreate.js +5 -0
- package/dist/api/types/SourceConnectionJob.d.ts +30 -0
- package/dist/api/types/SourceConnectionJob.js +5 -0
- package/dist/api/types/SourceConnectionListItem.d.ts +21 -0
- package/dist/api/types/SourceConnectionListItem.js +5 -0
- package/dist/api/types/SourceConnectionStatus.d.ts +12 -0
- package/dist/api/types/SourceConnectionStatus.js +11 -0
- package/dist/api/types/{SourceWithConfigFields.d.ts → SourceWithAuthenticationFields.d.ts} +2 -2
- package/dist/api/types/SourceWithAuthenticationFields.js +5 -0
- package/{api/resources/sync/client/requests → dist/api/types}/SyncCreate.d.ts +2 -7
- package/dist/api/types/SyncCreate.js +5 -0
- package/dist/api/types/SyncJob.d.ts +6 -4
- package/dist/api/{resources/sync/client/requests → types}/SyncUpdate.d.ts +2 -3
- package/dist/api/types/SyncUpdate.js +5 -0
- package/dist/api/types/User.d.ts +1 -1
- package/dist/api/types/UserCreate.d.ts +11 -0
- package/dist/api/types/UserCreate.js +5 -0
- package/dist/api/types/index.d.ts +24 -4
- package/dist/api/types/index.js +24 -4
- package/dist/core/auth/BasicAuth.d.ts +8 -0
- package/dist/core/auth/BasicAuth.js +26 -0
- package/dist/core/auth/BearerToken.d.ts +5 -0
- package/dist/core/auth/BearerToken.js +15 -0
- package/dist/core/auth/index.d.ts +2 -0
- package/dist/core/auth/index.js +7 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +1 -0
- package/dist/serialization/index.d.ts +1 -1
- package/dist/serialization/index.js +1 -1
- package/dist/serialization/resources/collections/client/index.d.ts +3 -0
- package/dist/serialization/resources/{apiKeys → collections}/client/index.js +3 -2
- package/dist/serialization/resources/{apiKeys/client/readApiKeys.d.ts → collections/client/listCollections.d.ts} +3 -3
- package/{serialization/resources/connections/client/listConnectedIntegrations.js → dist/serialization/resources/collections/client/listCollections.js} +2 -2
- package/dist/serialization/resources/{embeddingModels/client/readEmbeddingModels.d.ts → collections/client/refreshAllSourceConnections.d.ts} +3 -3
- package/dist/serialization/resources/{apiKeys/client/readApiKeys.js → collections/client/refreshAllSourceConnections.js} +2 -2
- package/dist/serialization/resources/{apiKeys/client/requests/ApiKeyCreate.d.ts → collections/client/requests/CollectionCreate.d.ts} +4 -3
- package/dist/serialization/resources/collections/client/requests/CollectionCreate.js +44 -0
- package/dist/serialization/resources/collections/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/collections/client/requests/index.js +5 -0
- package/dist/serialization/resources/connections/client/index.d.ts +0 -5
- package/dist/serialization/resources/connections/client/index.js +1 -9
- package/dist/serialization/resources/index.d.ts +4 -8
- package/dist/serialization/resources/index.js +5 -9
- package/dist/serialization/resources/sourceConnections/client/index.d.ts +3 -0
- package/{serialization/resources/sync → dist/serialization/resources/sourceConnections}/client/index.js +3 -3
- package/dist/serialization/resources/{connections/client/listConnectedIntegrations.d.ts → sourceConnections/client/listSourceConnectionJobs.d.ts} +3 -3
- package/dist/serialization/resources/{connections/client/getConnectionCredentials.js → sourceConnections/client/listSourceConnectionJobs.js} +2 -1
- package/dist/serialization/resources/sourceConnections/client/listSourceConnections.d.ts +11 -0
- package/dist/serialization/resources/sourceConnections/client/listSourceConnections.js +42 -0
- package/dist/serialization/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.ts +18 -0
- package/dist/serialization/resources/sourceConnections/client/requests/SourceConnectionUpdate.js +49 -0
- package/dist/serialization/resources/sourceConnections/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/sourceConnections/client/requests/index.js +5 -0
- package/dist/serialization/resources/whiteLabels/client/index.d.ts +0 -2
- package/dist/serialization/resources/whiteLabels/client/index.js +1 -3
- package/dist/serialization/types/ApiKey.d.ts +2 -2
- package/dist/serialization/types/ApiKey.js +2 -2
- package/dist/serialization/types/ApiKeyCreate.d.ts +12 -0
- package/{serialization/resources/apiKeys/client/requests → dist/serialization/types}/ApiKeyCreate.js +1 -1
- package/dist/serialization/types/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +13 -0
- package/dist/serialization/{resources/connections/client/requests → types}/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js +2 -2
- package/dist/serialization/types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.d.ts +14 -0
- package/dist/serialization/types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.js +45 -0
- package/dist/serialization/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +2 -0
- package/dist/serialization/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js +2 -0
- package/dist/serialization/types/{ApiKeyWithPlainKey.d.ts → Collection.d.ts} +7 -7
- package/{serialization/types/ApiKeyWithPlainKey.js → dist/serialization/types/Collection.js} +7 -7
- package/dist/serialization/types/CollectionStatus.d.ts +10 -0
- package/dist/serialization/types/CollectionStatus.js +41 -0
- package/dist/serialization/types/CollectionUpdate.d.ts +12 -0
- package/dist/serialization/types/CollectionUpdate.js +43 -0
- package/dist/serialization/types/ConfigValues.d.ts +10 -0
- package/dist/serialization/types/ConfigValues.js +41 -0
- package/dist/serialization/types/{DestinationWithConfigFields.d.ts → DestinationWithAuthenticationFields.d.ts} +3 -3
- package/dist/serialization/types/{DestinationWithConfigFields.js → DestinationWithAuthenticationFields.js} +3 -3
- package/{serialization/types/EmbeddingModelWithConfigFields.d.ts → dist/serialization/types/EmbeddingModelWithAuthenticationFields.d.ts} +3 -3
- package/{serialization/types/EmbeddingModelWithConfigFields.js → dist/serialization/types/EmbeddingModelWithAuthenticationFields.js} +3 -3
- package/dist/serialization/types/EntityCount.d.ts +12 -0
- package/dist/serialization/{resources/connections/client/sendOauth2WhiteLabelCode.js → types/EntityCount.js} +5 -3
- package/dist/serialization/types/Organization.d.ts +16 -0
- package/dist/serialization/types/Organization.js +47 -0
- package/dist/serialization/types/ResponseType.d.ts +10 -0
- package/dist/serialization/{resources/connections/client/getOauth2WhiteLabelAuthUrl.js → types/ResponseType.js} +3 -3
- package/dist/serialization/types/SearchResponse.d.ts +17 -0
- package/dist/serialization/types/SearchResponse.js +48 -0
- package/dist/serialization/types/SearchStatus.d.ts +10 -0
- package/dist/serialization/types/SearchStatus.js +41 -0
- package/dist/serialization/types/SourceConnection.d.ts +36 -0
- package/dist/serialization/types/SourceConnection.js +67 -0
- package/dist/serialization/types/SourceConnectionAuthFields.d.ts +11 -0
- package/dist/serialization/types/SourceConnectionAuthFields.js +42 -0
- package/dist/serialization/types/SourceConnectionCreate.d.ts +20 -0
- package/dist/serialization/types/SourceConnectionCreate.js +51 -0
- package/dist/serialization/types/SourceConnectionJob.d.ts +30 -0
- package/dist/serialization/types/SourceConnectionJob.js +61 -0
- package/dist/serialization/types/SourceConnectionListItem.d.ts +21 -0
- package/dist/serialization/types/SourceConnectionListItem.js +52 -0
- package/dist/serialization/types/SourceConnectionStatus.d.ts +10 -0
- package/dist/serialization/types/SourceConnectionStatus.js +41 -0
- package/dist/serialization/types/{SourceWithConfigFields.d.ts → SourceWithAuthenticationFields.d.ts} +3 -3
- package/dist/serialization/types/{SourceWithConfigFields.js → SourceWithAuthenticationFields.js} +3 -3
- package/{serialization/resources/sync/client/requests → dist/serialization/types}/SyncCreate.d.ts +5 -5
- package/dist/serialization/{resources/sync/client/requests → types}/SyncCreate.js +2 -2
- package/dist/serialization/types/SyncJob.d.ts +6 -4
- package/dist/serialization/types/SyncJob.js +6 -4
- package/dist/serialization/{resources/sync/client/requests → types}/SyncUpdate.d.ts +5 -5
- package/{serialization/resources/sync/client/requests → dist/serialization/types}/SyncUpdate.js +2 -2
- package/dist/serialization/types/User.d.ts +1 -1
- package/dist/serialization/types/User.js +1 -1
- package/dist/serialization/types/UserCreate.d.ts +14 -0
- package/dist/serialization/types/UserCreate.js +45 -0
- package/dist/serialization/types/index.d.ts +24 -4
- package/dist/serialization/types/index.js +24 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -2
- package/reference.md +257 -1437
- package/serialization/index.d.ts +1 -1
- package/serialization/index.js +1 -1
- package/serialization/resources/collections/client/index.d.ts +3 -0
- package/serialization/resources/{apiKeys → collections}/client/index.js +3 -2
- package/{dist/serialization/resources/sync/client/listSyncJobs.d.ts → serialization/resources/collections/client/listCollections.d.ts} +3 -3
- package/{dist/serialization/resources/connections/client/listConnectedIntegrations.js → serialization/resources/collections/client/listCollections.js} +2 -2
- package/{dist/serialization/resources/sync/client/listAllJobs.d.ts → serialization/resources/collections/client/refreshAllSourceConnections.d.ts} +3 -3
- package/serialization/resources/collections/client/refreshAllSourceConnections.js +42 -0
- package/serialization/resources/{apiKeys/client/requests/ApiKeyCreate.d.ts → collections/client/requests/CollectionCreate.d.ts} +4 -3
- package/serialization/resources/collections/client/requests/CollectionCreate.js +44 -0
- package/serialization/resources/collections/client/requests/index.d.ts +1 -0
- package/serialization/resources/collections/client/requests/index.js +5 -0
- package/serialization/resources/connections/client/index.d.ts +0 -5
- package/serialization/resources/connections/client/index.js +1 -9
- package/serialization/resources/index.d.ts +4 -8
- package/serialization/resources/index.js +5 -9
- package/serialization/resources/sourceConnections/client/index.d.ts +3 -0
- package/{dist/serialization/resources/sync → serialization/resources/sourceConnections}/client/index.js +3 -3
- package/serialization/resources/sourceConnections/client/listSourceConnectionJobs.d.ts +11 -0
- package/serialization/resources/sourceConnections/client/listSourceConnectionJobs.js +42 -0
- package/serialization/resources/sourceConnections/client/listSourceConnections.d.ts +11 -0
- package/serialization/resources/sourceConnections/client/listSourceConnections.js +42 -0
- package/serialization/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.ts +18 -0
- package/serialization/resources/sourceConnections/client/requests/SourceConnectionUpdate.js +49 -0
- package/serialization/resources/sourceConnections/client/requests/index.d.ts +1 -0
- package/serialization/resources/sourceConnections/client/requests/index.js +5 -0
- package/serialization/resources/whiteLabels/client/index.d.ts +0 -2
- package/serialization/resources/whiteLabels/client/index.js +1 -3
- package/serialization/types/ApiKey.d.ts +2 -2
- package/serialization/types/ApiKey.js +2 -2
- package/serialization/types/ApiKeyCreate.d.ts +12 -0
- package/{dist/serialization/resources/apiKeys/client/requests → serialization/types}/ApiKeyCreate.js +1 -1
- package/serialization/types/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +13 -0
- package/serialization/{resources/connections/client/requests → types}/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js +2 -2
- package/serialization/types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.d.ts +14 -0
- package/serialization/types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.js +45 -0
- package/serialization/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +2 -0
- package/serialization/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js +2 -0
- package/serialization/types/{ApiKeyWithPlainKey.d.ts → Collection.d.ts} +7 -7
- package/{dist/serialization/types/ApiKeyWithPlainKey.js → serialization/types/Collection.js} +7 -7
- package/serialization/types/CollectionStatus.d.ts +10 -0
- package/serialization/types/CollectionStatus.js +41 -0
- package/serialization/types/CollectionUpdate.d.ts +12 -0
- package/serialization/types/CollectionUpdate.js +43 -0
- package/serialization/types/ConfigValues.d.ts +10 -0
- package/serialization/types/ConfigValues.js +41 -0
- package/serialization/types/{DestinationWithConfigFields.d.ts → DestinationWithAuthenticationFields.d.ts} +3 -3
- package/serialization/types/{DestinationWithConfigFields.js → DestinationWithAuthenticationFields.js} +3 -3
- package/{dist/serialization/types/EmbeddingModelWithConfigFields.d.ts → serialization/types/EmbeddingModelWithAuthenticationFields.d.ts} +3 -3
- package/{dist/serialization/types/EmbeddingModelWithConfigFields.js → serialization/types/EmbeddingModelWithAuthenticationFields.js} +3 -3
- package/serialization/types/EntityCount.d.ts +12 -0
- package/{dist/serialization/resources/whiteLabels/client/getWhiteLabelOauth2AuthUrl.js → serialization/types/EntityCount.js} +5 -3
- package/serialization/types/Organization.d.ts +16 -0
- package/serialization/types/Organization.js +47 -0
- package/serialization/types/ResponseType.d.ts +10 -0
- package/{dist/serialization/resources/whiteLabels/client/exchangeWhiteLabelOauth2Code.js → serialization/types/ResponseType.js} +3 -3
- package/serialization/types/SearchResponse.d.ts +17 -0
- package/serialization/types/SearchResponse.js +48 -0
- package/serialization/types/SearchStatus.d.ts +10 -0
- package/serialization/types/SearchStatus.js +41 -0
- package/serialization/types/SourceConnection.d.ts +36 -0
- package/serialization/types/SourceConnection.js +67 -0
- package/serialization/types/SourceConnectionAuthFields.d.ts +11 -0
- package/serialization/types/SourceConnectionAuthFields.js +42 -0
- package/serialization/types/SourceConnectionCreate.d.ts +20 -0
- package/serialization/types/SourceConnectionCreate.js +51 -0
- package/serialization/types/SourceConnectionJob.d.ts +30 -0
- package/serialization/types/SourceConnectionJob.js +61 -0
- package/serialization/types/SourceConnectionListItem.d.ts +21 -0
- package/serialization/types/SourceConnectionListItem.js +52 -0
- package/serialization/types/SourceConnectionStatus.d.ts +10 -0
- package/serialization/types/SourceConnectionStatus.js +41 -0
- package/serialization/types/{SourceWithConfigFields.d.ts → SourceWithAuthenticationFields.d.ts} +3 -3
- package/serialization/types/{SourceWithConfigFields.js → SourceWithAuthenticationFields.js} +3 -3
- package/{dist/serialization/resources/sync/client/requests → serialization/types}/SyncCreate.d.ts +5 -5
- package/serialization/{resources/sync/client/requests → types}/SyncCreate.js +2 -2
- package/serialization/types/SyncJob.d.ts +6 -4
- package/serialization/types/SyncJob.js +6 -4
- package/serialization/{resources/sync/client/requests → types}/SyncUpdate.d.ts +5 -5
- package/{dist/serialization/resources/sync/client/requests → serialization/types}/SyncUpdate.js +2 -2
- package/serialization/types/User.d.ts +1 -1
- package/serialization/types/User.js +1 -1
- package/serialization/types/UserCreate.d.ts +14 -0
- package/serialization/types/UserCreate.js +45 -0
- package/serialization/types/index.d.ts +24 -4
- package/serialization/types/index.js +24 -4
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/apiKeys/client/Client.d.ts +0 -131
- package/api/resources/apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.d.ts +0 -12
- package/api/resources/apiKeys/client/requests/index.d.ts +0 -3
- package/api/resources/connections/client/requests/index.d.ts +0 -1
- package/api/resources/embeddingModels/client/Client.d.ts +0 -71
- package/api/resources/embeddingModels/client/Client.js +0 -211
- package/api/resources/embeddingModels/client/index.d.ts +0 -1
- package/api/resources/search/client/Client.d.ts +0 -55
- package/api/resources/search/client/Client.js +0 -147
- package/api/resources/search/client/requests/SearchSearchGetRequest.d.ts +0 -20
- package/api/resources/search/client/requests/index.d.ts +0 -1
- package/api/resources/sync/client/Client.d.ts +0 -275
- package/api/resources/sync/client/requests/index.d.ts +0 -5
- package/api/resources/sync/client/requests/index.js +0 -2
- package/api/resources/sync/index.d.ts +0 -2
- package/api/resources/sync/index.js +0 -18
- package/api/resources/sync/types/ListSyncsSyncGetResponse.d.ts +0 -5
- package/api/resources/sync/types/index.d.ts +0 -1
- package/api/resources/sync/types/index.js +0 -17
- package/api/types/ApiKeyWithPlainKey.d.ts +0 -18
- package/dist/api/resources/apiKeys/client/Client.d.ts +0 -131
- package/dist/api/resources/apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.d.ts +0 -12
- package/dist/api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.d.ts +0 -11
- package/dist/api/resources/apiKeys/client/requests/index.d.ts +0 -3
- package/dist/api/resources/apiKeys/client/requests/index.js +0 -2
- package/dist/api/resources/connections/client/requests/index.d.ts +0 -1
- package/dist/api/resources/connections/client/requests/index.js +0 -2
- package/dist/api/resources/embeddingModels/client/Client.d.ts +0 -71
- package/dist/api/resources/embeddingModels/client/Client.js +0 -211
- package/dist/api/resources/embeddingModels/client/index.d.ts +0 -1
- package/dist/api/resources/embeddingModels/client/index.js +0 -2
- package/dist/api/resources/search/client/Client.d.ts +0 -55
- package/dist/api/resources/search/client/Client.js +0 -147
- package/dist/api/resources/search/client/index.d.ts +0 -1
- package/dist/api/resources/search/client/index.js +0 -17
- package/dist/api/resources/search/client/requests/SearchSearchGetRequest.d.ts +0 -20
- package/dist/api/resources/search/client/requests/index.d.ts +0 -1
- package/dist/api/resources/search/client/requests/index.js +0 -2
- package/dist/api/resources/sync/client/Client.d.ts +0 -275
- package/dist/api/resources/sync/client/index.d.ts +0 -1
- package/dist/api/resources/sync/client/index.js +0 -17
- package/dist/api/resources/sync/client/requests/ListSyncsSyncGetRequest.d.ts +0 -12
- package/dist/api/resources/sync/client/requests/index.d.ts +0 -5
- package/dist/api/resources/sync/client/requests/index.js +0 -2
- package/dist/api/resources/sync/index.d.ts +0 -2
- package/dist/api/resources/sync/index.js +0 -18
- package/dist/api/resources/sync/types/ListSyncsSyncGetResponse.d.ts +0 -5
- package/dist/api/resources/sync/types/index.d.ts +0 -1
- package/dist/api/resources/sync/types/index.js +0 -17
- package/dist/api/types/ApiKeyWithPlainKey.d.ts +0 -18
- package/dist/serialization/resources/apiKeys/client/index.d.ts +0 -2
- package/dist/serialization/resources/apiKeys/client/requests/index.d.ts +0 -1
- package/dist/serialization/resources/apiKeys/client/requests/index.js +0 -5
- package/dist/serialization/resources/connections/client/getConnectionCredentials.d.ts +0 -9
- package/dist/serialization/resources/connections/client/getOauth2WhiteLabelAuthUrl.d.ts +0 -9
- package/dist/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +0 -13
- package/dist/serialization/resources/connections/client/requests/index.d.ts +0 -1
- package/dist/serialization/resources/connections/client/requests/index.js +0 -5
- package/dist/serialization/resources/connections/client/sendOauth2WhiteLabelCode.d.ts +0 -9
- package/dist/serialization/resources/embeddingModels/client/index.d.ts +0 -1
- package/dist/serialization/resources/embeddingModels/client/index.js +0 -37
- package/dist/serialization/resources/embeddingModels/client/readEmbeddingModels.js +0 -42
- package/dist/serialization/resources/search/client/index.d.ts +0 -1
- package/dist/serialization/resources/search/client/index.js +0 -37
- package/dist/serialization/resources/search/client/search.d.ts +0 -9
- package/dist/serialization/resources/search/client/search.js +0 -41
- package/dist/serialization/resources/search/index.d.ts +0 -1
- package/dist/serialization/resources/search/index.js +0 -17
- package/dist/serialization/resources/sync/client/index.d.ts +0 -3
- package/dist/serialization/resources/sync/client/listAllJobs.js +0 -42
- package/dist/serialization/resources/sync/client/listSyncJobs.js +0 -42
- package/dist/serialization/resources/sync/client/requests/index.d.ts +0 -2
- package/dist/serialization/resources/sync/client/requests/index.js +0 -7
- package/dist/serialization/resources/sync/index.d.ts +0 -2
- package/dist/serialization/resources/sync/index.js +0 -18
- package/dist/serialization/resources/sync/types/ListSyncsSyncGetResponse.d.ts +0 -12
- package/dist/serialization/resources/sync/types/ListSyncsSyncGetResponse.js +0 -46
- package/dist/serialization/resources/sync/types/index.d.ts +0 -1
- package/dist/serialization/resources/sync/types/index.js +0 -17
- package/dist/serialization/resources/whiteLabels/client/exchangeWhiteLabelOauth2Code.d.ts +0 -9
- package/dist/serialization/resources/whiteLabels/client/getWhiteLabelOauth2AuthUrl.d.ts +0 -9
- package/serialization/resources/apiKeys/client/index.d.ts +0 -2
- package/serialization/resources/apiKeys/client/readApiKeys.d.ts +0 -11
- package/serialization/resources/apiKeys/client/readApiKeys.js +0 -42
- package/serialization/resources/apiKeys/client/requests/index.d.ts +0 -1
- package/serialization/resources/apiKeys/client/requests/index.js +0 -5
- package/serialization/resources/apiKeys/index.d.ts +0 -1
- package/serialization/resources/apiKeys/index.js +0 -17
- package/serialization/resources/connections/client/getConnectionCredentials.d.ts +0 -9
- package/serialization/resources/connections/client/getConnectionCredentials.js +0 -41
- package/serialization/resources/connections/client/getOauth2WhiteLabelAuthUrl.d.ts +0 -9
- package/serialization/resources/connections/client/getOauth2WhiteLabelAuthUrl.js +0 -41
- package/serialization/resources/connections/client/listConnectedIntegrations.d.ts +0 -11
- package/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +0 -13
- package/serialization/resources/connections/client/requests/index.d.ts +0 -1
- package/serialization/resources/connections/client/requests/index.js +0 -5
- package/serialization/resources/connections/client/sendOauth2WhiteLabelCode.d.ts +0 -9
- package/serialization/resources/connections/client/sendOauth2WhiteLabelCode.js +0 -41
- package/serialization/resources/embeddingModels/client/index.d.ts +0 -1
- package/serialization/resources/embeddingModels/client/index.js +0 -37
- package/serialization/resources/embeddingModels/client/readEmbeddingModels.d.ts +0 -11
- package/serialization/resources/embeddingModels/client/readEmbeddingModels.js +0 -42
- package/serialization/resources/embeddingModels/index.d.ts +0 -1
- package/serialization/resources/embeddingModels/index.js +0 -17
- package/serialization/resources/search/client/index.d.ts +0 -1
- package/serialization/resources/search/client/index.js +0 -37
- package/serialization/resources/search/client/search.d.ts +0 -9
- package/serialization/resources/search/client/search.js +0 -41
- package/serialization/resources/search/index.d.ts +0 -1
- package/serialization/resources/search/index.js +0 -17
- package/serialization/resources/sync/client/index.d.ts +0 -3
- package/serialization/resources/sync/client/listAllJobs.d.ts +0 -11
- package/serialization/resources/sync/client/listAllJobs.js +0 -42
- package/serialization/resources/sync/client/listSyncJobs.d.ts +0 -11
- package/serialization/resources/sync/client/listSyncJobs.js +0 -42
- package/serialization/resources/sync/client/requests/index.d.ts +0 -2
- package/serialization/resources/sync/client/requests/index.js +0 -7
- package/serialization/resources/sync/index.d.ts +0 -2
- package/serialization/resources/sync/index.js +0 -18
- package/serialization/resources/sync/types/ListSyncsSyncGetResponse.d.ts +0 -12
- package/serialization/resources/sync/types/ListSyncsSyncGetResponse.js +0 -46
- package/serialization/resources/sync/types/index.d.ts +0 -1
- package/serialization/resources/sync/types/index.js +0 -17
- package/serialization/resources/whiteLabels/client/exchangeWhiteLabelOauth2Code.d.ts +0 -9
- package/serialization/resources/whiteLabels/client/exchangeWhiteLabelOauth2Code.js +0 -41
- package/serialization/resources/whiteLabels/client/getWhiteLabelOauth2AuthUrl.d.ts +0 -9
- package/serialization/resources/whiteLabels/client/getWhiteLabelOauth2AuthUrl.js +0 -41
- /package/api/resources/{apiKeys → collections}/client/index.d.ts +0 -0
- /package/api/resources/{apiKeys → collections}/client/index.js +0 -0
- /package/api/resources/{apiKeys/client/requests/ApiKeyCreate.js → collections/client/requests/CollectionCreate.js} +0 -0
- /package/api/resources/{apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.js → collections/client/requests/DeleteCollectionCollectionsReadableIdDeleteRequest.js} +0 -0
- /package/api/resources/{apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.js → collections/client/requests/ListCollectionsCollectionsGetRequest.js} +0 -0
- /package/api/resources/{apiKeys → collections}/client/requests/index.js +0 -0
- /package/api/resources/{apiKeys → collections}/index.d.ts +0 -0
- /package/api/resources/{apiKeys → collections}/index.js +0 -0
- /package/api/resources/{search → sourceConnections}/client/index.d.ts +0 -0
- /package/api/resources/{search → sourceConnections}/client/index.js +0 -0
- /package/api/resources/{connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js → sourceConnections/client/requests/DeleteSourceConnectionSourceConnectionsSourceConnectionIdDeleteRequest.js} +0 -0
- /package/api/resources/{search/client/requests/SearchSearchGetRequest.js → sourceConnections/client/requests/GetSourceConnectionSourceConnectionsSourceConnectionIdGetRequest.js} +0 -0
- /package/api/resources/{sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.js → sourceConnections/client/requests/ListSourceConnectionsSourceConnectionsGetRequest.js} +0 -0
- /package/api/resources/{sync/client/requests/ListAllJobsSyncJobsGetRequest.js → sourceConnections/client/requests/SourceConnectionUpdate.js} +0 -0
- /package/api/resources/{connections → sourceConnections}/client/requests/index.js +0 -0
- /package/api/resources/{embeddingModels → sourceConnections}/index.d.ts +0 -0
- /package/api/resources/{embeddingModels → sourceConnections}/index.js +0 -0
- /package/{dist/api/resources/apiKeys/client/requests → api/types}/ApiKeyCreate.js +0 -0
- /package/{dist/api/resources/connections/client/requests → api/types}/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js +0 -0
- /package/api/{resources/sync/client/requests/ListSyncsSyncGetRequest.js → types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.js} +0 -0
- /package/api/{resources/sync/client/requests/SyncCreate.js → types/Collection.js} +0 -0
- /package/api/{resources/sync/client/requests/SyncUpdate.js → types/CollectionUpdate.js} +0 -0
- /package/api/{resources/sync/types/ListSyncsSyncGetResponse.js → types/ConfigValues.js} +0 -0
- /package/api/types/{ApiKeyWithPlainKey.js → DestinationWithAuthenticationFields.js} +0 -0
- /package/api/types/{DestinationWithConfigFields.js → EmbeddingModelWithAuthenticationFields.js} +0 -0
- /package/api/types/{EmbeddingModelWithConfigFields.js → EntityCount.js} +0 -0
- /package/api/types/{SourceWithConfigFields.js → Organization.js} +0 -0
- /package/{dist/api/resources/apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.js → api/types/SearchResponse.js} +0 -0
- /package/{dist/api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.js → api/types/SourceConnection.js} +0 -0
- /package/{dist/api/resources/search/client/requests/SearchSearchGetRequest.js → api/types/SourceConnectionAuthFields.js} +0 -0
- /package/{dist/api/resources/sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.js → api/types/SourceConnectionCreate.js} +0 -0
- /package/{dist/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.js → api/types/SourceConnectionJob.js} +0 -0
- /package/{dist/api/resources/sync/client/requests/ListSyncsSyncGetRequest.js → api/types/SourceConnectionListItem.js} +0 -0
- /package/{dist/api/resources/sync/client/requests/SyncCreate.js → api/types/SourceWithAuthenticationFields.js} +0 -0
- /package/{dist/api/resources/sync/client/requests/SyncUpdate.js → api/types/SyncCreate.js} +0 -0
- /package/{dist/api/resources/sync/types/ListSyncsSyncGetResponse.js → api/types/SyncUpdate.js} +0 -0
- /package/{dist/api/types/ApiKeyWithPlainKey.js → api/types/UserCreate.js} +0 -0
- /package/{api/resources/sync → dist/api/resources/collections}/client/index.d.ts +0 -0
- /package/{api/resources/sync → dist/api/resources/collections}/client/index.js +0 -0
- /package/dist/api/{types/DestinationWithConfigFields.js → resources/collections/client/requests/CollectionCreate.js} +0 -0
- /package/dist/api/{types/EmbeddingModelWithConfigFields.js → resources/collections/client/requests/DeleteCollectionCollectionsReadableIdDeleteRequest.js} +0 -0
- /package/dist/api/{types/SourceWithConfigFields.js → resources/collections/client/requests/ListCollectionsCollectionsGetRequest.js} +0 -0
- /package/{api/resources/embeddingModels/client → dist/api/resources/collections/client/requests}/index.js +0 -0
- /package/{api/resources/search → dist/api/resources/collections}/index.d.ts +0 -0
- /package/{api/resources/search → dist/api/resources/collections}/index.js +0 -0
- /package/dist/api/resources/{apiKeys → sourceConnections}/client/index.d.ts +0 -0
- /package/dist/api/resources/{apiKeys → sourceConnections}/client/index.js +0 -0
- /package/{api/resources/search → dist/api/resources/sourceConnections}/client/requests/index.js +0 -0
- /package/dist/api/resources/{apiKeys → sourceConnections}/index.d.ts +0 -0
- /package/dist/api/resources/{apiKeys → sourceConnections}/index.js +0 -0
- /package/dist/{api/resources/embeddingModels → serialization/resources/collections}/index.d.ts +0 -0
- /package/dist/{api/resources/embeddingModels → serialization/resources/collections}/index.js +0 -0
- /package/dist/{api/resources/search → serialization/resources/sourceConnections}/index.d.ts +0 -0
- /package/dist/{api/resources/search → serialization/resources/sourceConnections}/index.js +0 -0
- /package/{dist/serialization/resources/apiKeys → serialization/resources/collections}/index.d.ts +0 -0
- /package/{dist/serialization/resources/apiKeys → serialization/resources/collections}/index.js +0 -0
- /package/{dist/serialization/resources/embeddingModels → serialization/resources/sourceConnections}/index.d.ts +0 -0
- /package/{dist/serialization/resources/embeddingModels → serialization/resources/sourceConnections}/index.js +0 -0
|
@@ -48,60 +48,58 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
48
48
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
49
|
};
|
|
50
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
-
exports.
|
|
51
|
+
exports.SourceConnections = void 0;
|
|
52
52
|
const environments = __importStar(require("../../../../environments"));
|
|
53
53
|
const core = __importStar(require("../../../../core"));
|
|
54
54
|
const AirweaveSDK = __importStar(require("../../../index"));
|
|
55
55
|
const url_join_1 = __importDefault(require("url-join"));
|
|
56
56
|
const serializers = __importStar(require("../../../../serialization/index"));
|
|
57
57
|
const errors = __importStar(require("../../../../errors/index"));
|
|
58
|
-
class
|
|
59
|
-
constructor(_options
|
|
58
|
+
class SourceConnections {
|
|
59
|
+
constructor(_options) {
|
|
60
60
|
this._options = _options;
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
|
-
* List all
|
|
63
|
+
* List all source connections for the current user.
|
|
64
64
|
*
|
|
65
65
|
* Args:
|
|
66
|
-
* -----
|
|
67
66
|
* db: The database session
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
67
|
+
* collection: The collection to filter by
|
|
68
|
+
* skip: The number of connections to skip
|
|
69
|
+
* limit: The number of connections to return
|
|
71
70
|
* user: The current user
|
|
72
71
|
*
|
|
73
72
|
* Returns:
|
|
74
|
-
*
|
|
75
|
-
* list[schemas.Sync] | list[schemas.SyncWithSourceConnection]: A list of syncs
|
|
73
|
+
* A list of source connection list items with essential information
|
|
76
74
|
*
|
|
77
|
-
* @param {AirweaveSDK.
|
|
78
|
-
* @param {
|
|
75
|
+
* @param {AirweaveSDK.ListSourceConnectionsSourceConnectionsGetRequest} request
|
|
76
|
+
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
79
77
|
*
|
|
80
78
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
81
79
|
*
|
|
82
80
|
* @example
|
|
83
|
-
* await client.
|
|
81
|
+
* await client.sourceConnections.listSourceConnections()
|
|
84
82
|
*/
|
|
85
|
-
|
|
83
|
+
listSourceConnections() {
|
|
86
84
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
87
85
|
var _a;
|
|
88
|
-
const { skip, limit
|
|
86
|
+
const { collection, skip, limit } = request;
|
|
89
87
|
const _queryParams = {};
|
|
88
|
+
if (collection != null) {
|
|
89
|
+
_queryParams["collection"] = collection;
|
|
90
|
+
}
|
|
90
91
|
if (skip != null) {
|
|
91
92
|
_queryParams["skip"] = skip.toString();
|
|
92
93
|
}
|
|
93
94
|
if (limit != null) {
|
|
94
95
|
_queryParams["limit"] = limit.toString();
|
|
95
96
|
}
|
|
96
|
-
if (withSourceConnection != null) {
|
|
97
|
-
_queryParams["with_source_connection"] = withSourceConnection.toString();
|
|
98
|
-
}
|
|
99
97
|
const _response = yield core.fetcher({
|
|
100
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "
|
|
98
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "source-connections"),
|
|
101
99
|
method: "GET",
|
|
102
|
-
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
100
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
103
101
|
? yield core.Supplier.get(this._options.apiKey)
|
|
104
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.
|
|
102
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.27", "User-Agent": "@airweave/sdk/0.2.27", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
105
103
|
contentType: "application/json",
|
|
106
104
|
queryParameters: _queryParams,
|
|
107
105
|
requestType: "json",
|
|
@@ -110,7 +108,7 @@ class Sync {
|
|
|
110
108
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
111
109
|
});
|
|
112
110
|
if (_response.ok) {
|
|
113
|
-
return serializers.
|
|
111
|
+
return serializers.sourceConnections.listSourceConnections.Response.parseOrThrow(_response.body, {
|
|
114
112
|
unrecognizedObjectKeys: "passthrough",
|
|
115
113
|
allowUnrecognizedUnionMembers: true,
|
|
116
114
|
allowUnrecognizedEnumValues: true,
|
|
@@ -140,7 +138,7 @@ class Sync {
|
|
|
140
138
|
body: _response.error.rawBody,
|
|
141
139
|
});
|
|
142
140
|
case "timeout":
|
|
143
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /
|
|
141
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /source-connections.");
|
|
144
142
|
case "unknown":
|
|
145
143
|
throw new errors.AirweaveSDKError({
|
|
146
144
|
message: _response.error.errorMessage,
|
|
@@ -149,49 +147,53 @@ class Sync {
|
|
|
149
147
|
});
|
|
150
148
|
}
|
|
151
149
|
/**
|
|
152
|
-
* Create a new
|
|
150
|
+
* Create a new source connection.
|
|
151
|
+
*
|
|
152
|
+
* This endpoint creates:
|
|
153
|
+
* 1. An integration credential with the provided auth fields
|
|
154
|
+
* 2. A collection if not provided
|
|
155
|
+
* 3. The source connection
|
|
156
|
+
* 4. A sync configuration and DAG
|
|
157
|
+
* 5. A sync job if immediate execution is requested
|
|
153
158
|
*
|
|
154
159
|
* Args:
|
|
155
|
-
* -----
|
|
156
160
|
* db: The database session
|
|
157
|
-
*
|
|
161
|
+
* source_connection_in: The source connection to create
|
|
158
162
|
* user: The current user
|
|
159
|
-
* background_tasks:
|
|
163
|
+
* background_tasks: Background tasks for async operations
|
|
160
164
|
*
|
|
161
165
|
* Returns:
|
|
162
|
-
*
|
|
163
|
-
* sync (schemas.Sync): The created sync
|
|
166
|
+
* The created source connection
|
|
164
167
|
*
|
|
165
|
-
* @param {AirweaveSDK.
|
|
166
|
-
* @param {
|
|
168
|
+
* @param {AirweaveSDK.SourceConnectionCreate} request
|
|
169
|
+
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
167
170
|
*
|
|
168
171
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
169
172
|
*
|
|
170
173
|
* @example
|
|
171
|
-
* await client.
|
|
174
|
+
* await client.sourceConnections.createSourceConnection({
|
|
172
175
|
* name: "name",
|
|
173
|
-
*
|
|
174
|
-
* destinationConnectionIds: ["destination_connection_ids"]
|
|
176
|
+
* shortName: "short_name"
|
|
175
177
|
* })
|
|
176
178
|
*/
|
|
177
|
-
|
|
179
|
+
createSourceConnection(request, requestOptions) {
|
|
178
180
|
return __awaiter(this, void 0, void 0, function* () {
|
|
179
181
|
var _a;
|
|
180
182
|
const _response = yield core.fetcher({
|
|
181
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "
|
|
183
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "source-connections"),
|
|
182
184
|
method: "POST",
|
|
183
|
-
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
185
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
184
186
|
? yield core.Supplier.get(this._options.apiKey)
|
|
185
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.
|
|
187
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.27", "User-Agent": "@airweave/sdk/0.2.27", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
186
188
|
contentType: "application/json",
|
|
187
189
|
requestType: "json",
|
|
188
|
-
body: serializers.
|
|
190
|
+
body: serializers.SourceConnectionCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
189
191
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
190
192
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
191
193
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
192
194
|
});
|
|
193
195
|
if (_response.ok) {
|
|
194
|
-
return serializers.
|
|
196
|
+
return serializers.SourceConnection.parseOrThrow(_response.body, {
|
|
195
197
|
unrecognizedObjectKeys: "passthrough",
|
|
196
198
|
allowUnrecognizedUnionMembers: true,
|
|
197
199
|
allowUnrecognizedEnumValues: true,
|
|
@@ -221,7 +223,7 @@ class Sync {
|
|
|
221
223
|
body: _response.error.rawBody,
|
|
222
224
|
});
|
|
223
225
|
case "timeout":
|
|
224
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /
|
|
226
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /source-connections.");
|
|
225
227
|
case "unknown":
|
|
226
228
|
throw new errors.AirweaveSDKError({
|
|
227
229
|
message: _response.error.errorMessage,
|
|
@@ -230,44 +232,40 @@ class Sync {
|
|
|
230
232
|
});
|
|
231
233
|
}
|
|
232
234
|
/**
|
|
233
|
-
*
|
|
235
|
+
* Get a specific source connection by ID.
|
|
234
236
|
*
|
|
235
237
|
* Args:
|
|
236
|
-
* -----
|
|
237
238
|
* db: The database session
|
|
238
|
-
*
|
|
239
|
-
*
|
|
239
|
+
* source_connection_id: The ID of the source connection
|
|
240
|
+
* show_auth_fields: Whether to show the auth fields, default is False
|
|
240
241
|
* user: The current user
|
|
241
242
|
*
|
|
242
243
|
* Returns:
|
|
243
|
-
*
|
|
244
|
-
* list[schemas.SyncJob]: A list of all sync jobs
|
|
244
|
+
* The source connection
|
|
245
245
|
*
|
|
246
|
-
* @param {
|
|
247
|
-
* @param {
|
|
246
|
+
* @param {string} sourceConnectionId
|
|
247
|
+
* @param {AirweaveSDK.GetSourceConnectionSourceConnectionsSourceConnectionIdGetRequest} request
|
|
248
|
+
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
248
249
|
*
|
|
249
250
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
250
251
|
*
|
|
251
252
|
* @example
|
|
252
|
-
* await client.
|
|
253
|
+
* await client.sourceConnections.getSourceConnection("source_connection_id")
|
|
253
254
|
*/
|
|
254
|
-
|
|
255
|
-
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
255
|
+
getSourceConnection(sourceConnectionId_1) {
|
|
256
|
+
return __awaiter(this, arguments, void 0, function* (sourceConnectionId, request = {}, requestOptions) {
|
|
256
257
|
var _a;
|
|
257
|
-
const {
|
|
258
|
+
const { showAuthFields } = request;
|
|
258
259
|
const _queryParams = {};
|
|
259
|
-
if (
|
|
260
|
-
_queryParams["
|
|
261
|
-
}
|
|
262
|
-
if (limit != null) {
|
|
263
|
-
_queryParams["limit"] = limit.toString();
|
|
260
|
+
if (showAuthFields != null) {
|
|
261
|
+
_queryParams["show_auth_fields"] = showAuthFields.toString();
|
|
264
262
|
}
|
|
265
263
|
const _response = yield core.fetcher({
|
|
266
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production,
|
|
264
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
|
|
267
265
|
method: "GET",
|
|
268
|
-
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
266
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
269
267
|
? yield core.Supplier.get(this._options.apiKey)
|
|
270
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.
|
|
268
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.27", "User-Agent": "@airweave/sdk/0.2.27", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
271
269
|
contentType: "application/json",
|
|
272
270
|
queryParameters: _queryParams,
|
|
273
271
|
requestType: "json",
|
|
@@ -276,7 +274,7 @@ class Sync {
|
|
|
276
274
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
277
275
|
});
|
|
278
276
|
if (_response.ok) {
|
|
279
|
-
return serializers.
|
|
277
|
+
return serializers.SourceConnection.parseOrThrow(_response.body, {
|
|
280
278
|
unrecognizedObjectKeys: "passthrough",
|
|
281
279
|
allowUnrecognizedUnionMembers: true,
|
|
282
280
|
allowUnrecognizedEnumValues: true,
|
|
@@ -306,7 +304,7 @@ class Sync {
|
|
|
306
304
|
body: _response.error.rawBody,
|
|
307
305
|
});
|
|
308
306
|
case "timeout":
|
|
309
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /
|
|
307
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /source-connections/{source_connection_id}.");
|
|
310
308
|
case "unknown":
|
|
311
309
|
throw new errors.AirweaveSDKError({
|
|
312
310
|
message: _response.error.errorMessage,
|
|
@@ -315,43 +313,44 @@ class Sync {
|
|
|
315
313
|
});
|
|
316
314
|
}
|
|
317
315
|
/**
|
|
318
|
-
*
|
|
316
|
+
* Update a source connection.
|
|
319
317
|
*
|
|
320
318
|
* Args:
|
|
321
|
-
* -----
|
|
322
319
|
* db: The database session
|
|
323
|
-
*
|
|
320
|
+
* source_connection_id: The ID of the source connection to update
|
|
321
|
+
* source_connection_in: The updated source connection data
|
|
324
322
|
* user: The current user
|
|
325
323
|
*
|
|
326
324
|
* Returns:
|
|
327
|
-
*
|
|
328
|
-
* sync (schemas.Sync): The sync
|
|
325
|
+
* The updated source connection
|
|
329
326
|
*
|
|
330
|
-
* @param {string}
|
|
331
|
-
* @param {
|
|
327
|
+
* @param {string} sourceConnectionId
|
|
328
|
+
* @param {AirweaveSDK.SourceConnectionUpdate} request
|
|
329
|
+
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
332
330
|
*
|
|
333
331
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
334
332
|
*
|
|
335
333
|
* @example
|
|
336
|
-
* await client.
|
|
334
|
+
* await client.sourceConnections.updateSourceConnection("source_connection_id")
|
|
337
335
|
*/
|
|
338
|
-
|
|
339
|
-
return __awaiter(this,
|
|
336
|
+
updateSourceConnection(sourceConnectionId_1) {
|
|
337
|
+
return __awaiter(this, arguments, void 0, function* (sourceConnectionId, request = {}, requestOptions) {
|
|
340
338
|
var _a;
|
|
341
339
|
const _response = yield core.fetcher({
|
|
342
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `
|
|
343
|
-
method: "
|
|
344
|
-
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
340
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
|
|
341
|
+
method: "PUT",
|
|
342
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
345
343
|
? yield core.Supplier.get(this._options.apiKey)
|
|
346
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.
|
|
344
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.27", "User-Agent": "@airweave/sdk/0.2.27", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
347
345
|
contentType: "application/json",
|
|
348
346
|
requestType: "json",
|
|
347
|
+
body: serializers.SourceConnectionUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
349
348
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
350
349
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
351
350
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
352
351
|
});
|
|
353
352
|
if (_response.ok) {
|
|
354
|
-
return serializers.
|
|
353
|
+
return serializers.SourceConnection.parseOrThrow(_response.body, {
|
|
355
354
|
unrecognizedObjectKeys: "passthrough",
|
|
356
355
|
allowUnrecognizedUnionMembers: true,
|
|
357
356
|
allowUnrecognizedEnumValues: true,
|
|
@@ -381,7 +380,7 @@ class Sync {
|
|
|
381
380
|
body: _response.error.rawBody,
|
|
382
381
|
});
|
|
383
382
|
case "timeout":
|
|
384
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling
|
|
383
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling PUT /source-connections/{source_connection_id}.");
|
|
385
384
|
case "unknown":
|
|
386
385
|
throw new errors.AirweaveSDKError({
|
|
387
386
|
message: _response.error.errorMessage,
|
|
@@ -390,30 +389,28 @@ class Sync {
|
|
|
390
389
|
});
|
|
391
390
|
}
|
|
392
391
|
/**
|
|
393
|
-
* Delete a
|
|
392
|
+
* Delete a source connection and all related components.
|
|
394
393
|
*
|
|
395
394
|
* Args:
|
|
396
|
-
* -----
|
|
397
395
|
* db: The database session
|
|
398
|
-
*
|
|
399
|
-
* delete_data: Whether to delete the
|
|
396
|
+
* source_connection_id: The ID of the source connection to delete
|
|
397
|
+
* delete_data: Whether to delete the associated data in destinations
|
|
400
398
|
* user: The current user
|
|
401
399
|
*
|
|
402
400
|
* Returns:
|
|
403
|
-
*
|
|
404
|
-
* sync (schemas.Sync): The deleted sync
|
|
401
|
+
* The deleted source connection
|
|
405
402
|
*
|
|
406
|
-
* @param {string}
|
|
407
|
-
* @param {AirweaveSDK.
|
|
408
|
-
* @param {
|
|
403
|
+
* @param {string} sourceConnectionId
|
|
404
|
+
* @param {AirweaveSDK.DeleteSourceConnectionSourceConnectionsSourceConnectionIdDeleteRequest} request
|
|
405
|
+
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
409
406
|
*
|
|
410
407
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
411
408
|
*
|
|
412
409
|
* @example
|
|
413
|
-
* await client.
|
|
410
|
+
* await client.sourceConnections.deleteSourceConnection("source_connection_id")
|
|
414
411
|
*/
|
|
415
|
-
|
|
416
|
-
return __awaiter(this, arguments, void 0, function* (
|
|
412
|
+
deleteSourceConnection(sourceConnectionId_1) {
|
|
413
|
+
return __awaiter(this, arguments, void 0, function* (sourceConnectionId, request = {}, requestOptions) {
|
|
417
414
|
var _a;
|
|
418
415
|
const { deleteData } = request;
|
|
419
416
|
const _queryParams = {};
|
|
@@ -421,11 +418,11 @@ class Sync {
|
|
|
421
418
|
_queryParams["delete_data"] = deleteData.toString();
|
|
422
419
|
}
|
|
423
420
|
const _response = yield core.fetcher({
|
|
424
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `
|
|
421
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
|
|
425
422
|
method: "DELETE",
|
|
426
|
-
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
423
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
427
424
|
? yield core.Supplier.get(this._options.apiKey)
|
|
428
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.
|
|
425
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.27", "User-Agent": "@airweave/sdk/0.2.27", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
429
426
|
contentType: "application/json",
|
|
430
427
|
queryParameters: _queryParams,
|
|
431
428
|
requestType: "json",
|
|
@@ -434,7 +431,7 @@ class Sync {
|
|
|
434
431
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
435
432
|
});
|
|
436
433
|
if (_response.ok) {
|
|
437
|
-
return serializers.
|
|
434
|
+
return serializers.SourceConnection.parseOrThrow(_response.body, {
|
|
438
435
|
unrecognizedObjectKeys: "passthrough",
|
|
439
436
|
allowUnrecognizedUnionMembers: true,
|
|
440
437
|
allowUnrecognizedEnumValues: true,
|
|
@@ -464,7 +461,7 @@ class Sync {
|
|
|
464
461
|
body: _response.error.rawBody,
|
|
465
462
|
});
|
|
466
463
|
case "timeout":
|
|
467
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling DELETE /
|
|
464
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling DELETE /source-connections/{source_connection_id}.");
|
|
468
465
|
case "unknown":
|
|
469
466
|
throw new errors.AirweaveSDKError({
|
|
470
467
|
message: _response.error.errorMessage,
|
|
@@ -473,189 +470,34 @@ class Sync {
|
|
|
473
470
|
});
|
|
474
471
|
}
|
|
475
472
|
/**
|
|
476
|
-
*
|
|
473
|
+
* Trigger a sync run for a source connection.
|
|
477
474
|
*
|
|
478
475
|
* Args:
|
|
479
|
-
* -----
|
|
480
476
|
* db: The database session
|
|
481
|
-
*
|
|
482
|
-
* sync_update: The sync update data
|
|
477
|
+
* source_connection_id: The ID of the source connection to run
|
|
483
478
|
* user: The current user
|
|
479
|
+
* background_tasks: Background tasks for async operations
|
|
484
480
|
*
|
|
485
481
|
* Returns:
|
|
486
|
-
*
|
|
487
|
-
* sync (schemas.Sync): The updated sync
|
|
482
|
+
* The created sync job
|
|
488
483
|
*
|
|
489
|
-
* @param {string}
|
|
490
|
-
* @param {
|
|
491
|
-
* @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
|
|
484
|
+
* @param {string} sourceConnectionId
|
|
485
|
+
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
492
486
|
*
|
|
493
487
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
494
488
|
*
|
|
495
489
|
* @example
|
|
496
|
-
* await client.
|
|
490
|
+
* await client.sourceConnections.runSourceConnection("source_connection_id")
|
|
497
491
|
*/
|
|
498
|
-
|
|
499
|
-
return __awaiter(this, arguments, void 0, function* (syncId, request = {}, requestOptions) {
|
|
500
|
-
var _a;
|
|
501
|
-
const _response = yield core.fetcher({
|
|
502
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `sync/${encodeURIComponent(syncId)}`),
|
|
503
|
-
method: "PATCH",
|
|
504
|
-
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
505
|
-
? yield core.Supplier.get(this._options.apiKey)
|
|
506
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.26", "User-Agent": "@airweave/sdk/0.2.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
507
|
-
contentType: "application/json",
|
|
508
|
-
requestType: "json",
|
|
509
|
-
body: serializers.SyncUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
510
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
511
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
512
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
513
|
-
});
|
|
514
|
-
if (_response.ok) {
|
|
515
|
-
return serializers.Sync.parseOrThrow(_response.body, {
|
|
516
|
-
unrecognizedObjectKeys: "passthrough",
|
|
517
|
-
allowUnrecognizedUnionMembers: true,
|
|
518
|
-
allowUnrecognizedEnumValues: true,
|
|
519
|
-
breadcrumbsPrefix: ["response"],
|
|
520
|
-
});
|
|
521
|
-
}
|
|
522
|
-
if (_response.error.reason === "status-code") {
|
|
523
|
-
switch (_response.error.statusCode) {
|
|
524
|
-
case 422:
|
|
525
|
-
throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
526
|
-
unrecognizedObjectKeys: "passthrough",
|
|
527
|
-
allowUnrecognizedUnionMembers: true,
|
|
528
|
-
allowUnrecognizedEnumValues: true,
|
|
529
|
-
breadcrumbsPrefix: ["response"],
|
|
530
|
-
}));
|
|
531
|
-
default:
|
|
532
|
-
throw new errors.AirweaveSDKError({
|
|
533
|
-
statusCode: _response.error.statusCode,
|
|
534
|
-
body: _response.error.body,
|
|
535
|
-
});
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
switch (_response.error.reason) {
|
|
539
|
-
case "non-json":
|
|
540
|
-
throw new errors.AirweaveSDKError({
|
|
541
|
-
statusCode: _response.error.statusCode,
|
|
542
|
-
body: _response.error.rawBody,
|
|
543
|
-
});
|
|
544
|
-
case "timeout":
|
|
545
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling PATCH /sync/{sync_id}.");
|
|
546
|
-
case "unknown":
|
|
547
|
-
throw new errors.AirweaveSDKError({
|
|
548
|
-
message: _response.error.errorMessage,
|
|
549
|
-
});
|
|
550
|
-
}
|
|
551
|
-
});
|
|
552
|
-
}
|
|
553
|
-
/**
|
|
554
|
-
* Trigger a sync run.
|
|
555
|
-
*
|
|
556
|
-
* Args:
|
|
557
|
-
* -----
|
|
558
|
-
* db: The database session
|
|
559
|
-
* sync_id: The ID of the sync to run
|
|
560
|
-
* user: The current user
|
|
561
|
-
* background_tasks: The background tasks
|
|
562
|
-
*
|
|
563
|
-
* Returns:
|
|
564
|
-
* --------
|
|
565
|
-
* sync_job (schemas.SyncJob): The sync job
|
|
566
|
-
*
|
|
567
|
-
* @param {string} syncId
|
|
568
|
-
* @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
|
|
569
|
-
*
|
|
570
|
-
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
571
|
-
*
|
|
572
|
-
* @example
|
|
573
|
-
* await client.sync.runSync("sync_id")
|
|
574
|
-
*/
|
|
575
|
-
runSync(syncId, requestOptions) {
|
|
492
|
+
runSourceConnection(sourceConnectionId, requestOptions) {
|
|
576
493
|
return __awaiter(this, void 0, void 0, function* () {
|
|
577
494
|
var _a;
|
|
578
495
|
const _response = yield core.fetcher({
|
|
579
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `
|
|
496
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}/run`),
|
|
580
497
|
method: "POST",
|
|
581
|
-
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
582
|
-
? yield core.Supplier.get(this._options.apiKey)
|
|
583
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.26", "User-Agent": "@airweave/sdk/0.2.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
584
|
-
contentType: "application/json",
|
|
585
|
-
requestType: "json",
|
|
586
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
587
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
588
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
589
|
-
});
|
|
590
|
-
if (_response.ok) {
|
|
591
|
-
return serializers.SyncJob.parseOrThrow(_response.body, {
|
|
592
|
-
unrecognizedObjectKeys: "passthrough",
|
|
593
|
-
allowUnrecognizedUnionMembers: true,
|
|
594
|
-
allowUnrecognizedEnumValues: true,
|
|
595
|
-
breadcrumbsPrefix: ["response"],
|
|
596
|
-
});
|
|
597
|
-
}
|
|
598
|
-
if (_response.error.reason === "status-code") {
|
|
599
|
-
switch (_response.error.statusCode) {
|
|
600
|
-
case 422:
|
|
601
|
-
throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
602
|
-
unrecognizedObjectKeys: "passthrough",
|
|
603
|
-
allowUnrecognizedUnionMembers: true,
|
|
604
|
-
allowUnrecognizedEnumValues: true,
|
|
605
|
-
breadcrumbsPrefix: ["response"],
|
|
606
|
-
}));
|
|
607
|
-
default:
|
|
608
|
-
throw new errors.AirweaveSDKError({
|
|
609
|
-
statusCode: _response.error.statusCode,
|
|
610
|
-
body: _response.error.body,
|
|
611
|
-
});
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
switch (_response.error.reason) {
|
|
615
|
-
case "non-json":
|
|
616
|
-
throw new errors.AirweaveSDKError({
|
|
617
|
-
statusCode: _response.error.statusCode,
|
|
618
|
-
body: _response.error.rawBody,
|
|
619
|
-
});
|
|
620
|
-
case "timeout":
|
|
621
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /sync/{sync_id}/run.");
|
|
622
|
-
case "unknown":
|
|
623
|
-
throw new errors.AirweaveSDKError({
|
|
624
|
-
message: _response.error.errorMessage,
|
|
625
|
-
});
|
|
626
|
-
}
|
|
627
|
-
});
|
|
628
|
-
}
|
|
629
|
-
/**
|
|
630
|
-
* List all jobs for a specific sync.
|
|
631
|
-
*
|
|
632
|
-
* Args:
|
|
633
|
-
* -----
|
|
634
|
-
* db: The database session
|
|
635
|
-
* sync_id: The ID of the sync to list jobs for
|
|
636
|
-
* user: The current user
|
|
637
|
-
*
|
|
638
|
-
* Returns:
|
|
639
|
-
* --------
|
|
640
|
-
* list[schemas.SyncJob]: A list of sync jobs
|
|
641
|
-
*
|
|
642
|
-
* @param {string} syncId
|
|
643
|
-
* @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
|
|
644
|
-
*
|
|
645
|
-
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
646
|
-
*
|
|
647
|
-
* @example
|
|
648
|
-
* await client.sync.listSyncJobs("sync_id")
|
|
649
|
-
*/
|
|
650
|
-
listSyncJobs(syncId, requestOptions) {
|
|
651
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
652
|
-
var _a;
|
|
653
|
-
const _response = yield core.fetcher({
|
|
654
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `sync/${encodeURIComponent(syncId)}/jobs`),
|
|
655
|
-
method: "GET",
|
|
656
|
-
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
498
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
657
499
|
? yield core.Supplier.get(this._options.apiKey)
|
|
658
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.
|
|
500
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.27", "User-Agent": "@airweave/sdk/0.2.27", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
659
501
|
contentType: "application/json",
|
|
660
502
|
requestType: "json",
|
|
661
503
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -663,7 +505,7 @@ class Sync {
|
|
|
663
505
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
664
506
|
});
|
|
665
507
|
if (_response.ok) {
|
|
666
|
-
return serializers.
|
|
508
|
+
return serializers.SourceConnectionJob.parseOrThrow(_response.body, {
|
|
667
509
|
unrecognizedObjectKeys: "passthrough",
|
|
668
510
|
allowUnrecognizedUnionMembers: true,
|
|
669
511
|
allowUnrecognizedEnumValues: true,
|
|
@@ -693,7 +535,7 @@ class Sync {
|
|
|
693
535
|
body: _response.error.rawBody,
|
|
694
536
|
});
|
|
695
537
|
case "timeout":
|
|
696
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling
|
|
538
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /source-connections/{source_connection_id}/run.");
|
|
697
539
|
case "unknown":
|
|
698
540
|
throw new errors.AirweaveSDKError({
|
|
699
541
|
message: _response.error.errorMessage,
|
|
@@ -702,37 +544,33 @@ class Sync {
|
|
|
702
544
|
});
|
|
703
545
|
}
|
|
704
546
|
/**
|
|
705
|
-
*
|
|
547
|
+
* List all sync jobs for a source connection.
|
|
706
548
|
*
|
|
707
549
|
* Args:
|
|
708
|
-
* -----
|
|
709
550
|
* db: The database session
|
|
710
|
-
*
|
|
711
|
-
* job_id: The ID of the job to get
|
|
551
|
+
* source_connection_id: The ID of the source connection
|
|
712
552
|
* user: The current user
|
|
713
553
|
*
|
|
714
554
|
* Returns:
|
|
715
|
-
*
|
|
716
|
-
* sync_job (schemas.SyncJob): The sync job
|
|
555
|
+
* A list of sync jobs
|
|
717
556
|
*
|
|
718
|
-
* @param {string}
|
|
719
|
-
* @param {
|
|
720
|
-
* @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
|
|
557
|
+
* @param {string} sourceConnectionId
|
|
558
|
+
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
721
559
|
*
|
|
722
560
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
723
561
|
*
|
|
724
562
|
* @example
|
|
725
|
-
* await client.
|
|
563
|
+
* await client.sourceConnections.listSourceConnectionJobs("source_connection_id")
|
|
726
564
|
*/
|
|
727
|
-
|
|
565
|
+
listSourceConnectionJobs(sourceConnectionId, requestOptions) {
|
|
728
566
|
return __awaiter(this, void 0, void 0, function* () {
|
|
729
567
|
var _a;
|
|
730
568
|
const _response = yield core.fetcher({
|
|
731
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `
|
|
569
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}/jobs`),
|
|
732
570
|
method: "GET",
|
|
733
|
-
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
571
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
734
572
|
? yield core.Supplier.get(this._options.apiKey)
|
|
735
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.
|
|
573
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.27", "User-Agent": "@airweave/sdk/0.2.27", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
736
574
|
contentType: "application/json",
|
|
737
575
|
requestType: "json",
|
|
738
576
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -740,7 +578,7 @@ class Sync {
|
|
|
740
578
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
741
579
|
});
|
|
742
580
|
if (_response.ok) {
|
|
743
|
-
return serializers.
|
|
581
|
+
return serializers.sourceConnections.listSourceConnectionJobs.Response.parseOrThrow(_response.body, {
|
|
744
582
|
unrecognizedObjectKeys: "passthrough",
|
|
745
583
|
allowUnrecognizedUnionMembers: true,
|
|
746
584
|
allowUnrecognizedEnumValues: true,
|
|
@@ -770,7 +608,7 @@ class Sync {
|
|
|
770
608
|
body: _response.error.rawBody,
|
|
771
609
|
});
|
|
772
610
|
case "timeout":
|
|
773
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /
|
|
611
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /source-connections/{source_connection_id}/jobs.");
|
|
774
612
|
case "unknown":
|
|
775
613
|
throw new errors.AirweaveSDKError({
|
|
776
614
|
message: _response.error.errorMessage,
|
|
@@ -778,139 +616,10 @@ class Sync {
|
|
|
778
616
|
}
|
|
779
617
|
});
|
|
780
618
|
}
|
|
781
|
-
|
|
782
|
-
* Server-Sent Events (SSE) endpoint to subscribe to a sync job's progress.
|
|
783
|
-
*
|
|
784
|
-
* Args:
|
|
785
|
-
* -----
|
|
786
|
-
* job_id: The ID of the job to subscribe to
|
|
787
|
-
* user: The current user
|
|
788
|
-
*
|
|
789
|
-
* Returns:
|
|
790
|
-
* --------
|
|
791
|
-
* StreamingResponse: The streaming response
|
|
792
|
-
*
|
|
793
|
-
* @param {string} jobId
|
|
794
|
-
* @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
|
|
795
|
-
*
|
|
796
|
-
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
797
|
-
*
|
|
798
|
-
* @example
|
|
799
|
-
* await client.sync.subscribeSyncJob("job_id")
|
|
800
|
-
*/
|
|
801
|
-
subscribeSyncJob(jobId, requestOptions) {
|
|
619
|
+
_getAuthorizationHeader() {
|
|
802
620
|
return __awaiter(this, void 0, void 0, function* () {
|
|
803
|
-
|
|
804
|
-
const _response = yield core.fetcher({
|
|
805
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `sync/job/${encodeURIComponent(jobId)}/subscribe`),
|
|
806
|
-
method: "GET",
|
|
807
|
-
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
808
|
-
? yield core.Supplier.get(this._options.apiKey)
|
|
809
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.26", "User-Agent": "@airweave/sdk/0.2.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
810
|
-
contentType: "application/json",
|
|
811
|
-
requestType: "json",
|
|
812
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
813
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
814
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
815
|
-
});
|
|
816
|
-
if (_response.ok) {
|
|
817
|
-
return _response.body;
|
|
818
|
-
}
|
|
819
|
-
if (_response.error.reason === "status-code") {
|
|
820
|
-
switch (_response.error.statusCode) {
|
|
821
|
-
case 422:
|
|
822
|
-
throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
823
|
-
unrecognizedObjectKeys: "passthrough",
|
|
824
|
-
allowUnrecognizedUnionMembers: true,
|
|
825
|
-
allowUnrecognizedEnumValues: true,
|
|
826
|
-
breadcrumbsPrefix: ["response"],
|
|
827
|
-
}));
|
|
828
|
-
default:
|
|
829
|
-
throw new errors.AirweaveSDKError({
|
|
830
|
-
statusCode: _response.error.statusCode,
|
|
831
|
-
body: _response.error.body,
|
|
832
|
-
});
|
|
833
|
-
}
|
|
834
|
-
}
|
|
835
|
-
switch (_response.error.reason) {
|
|
836
|
-
case "non-json":
|
|
837
|
-
throw new errors.AirweaveSDKError({
|
|
838
|
-
statusCode: _response.error.statusCode,
|
|
839
|
-
body: _response.error.rawBody,
|
|
840
|
-
});
|
|
841
|
-
case "timeout":
|
|
842
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /sync/job/{job_id}/subscribe.");
|
|
843
|
-
case "unknown":
|
|
844
|
-
throw new errors.AirweaveSDKError({
|
|
845
|
-
message: _response.error.errorMessage,
|
|
846
|
-
});
|
|
847
|
-
}
|
|
848
|
-
});
|
|
849
|
-
}
|
|
850
|
-
/**
|
|
851
|
-
* Get the DAG for a specific sync.
|
|
852
|
-
*
|
|
853
|
-
* @param {string} syncId
|
|
854
|
-
* @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
|
|
855
|
-
*
|
|
856
|
-
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
857
|
-
*
|
|
858
|
-
* @example
|
|
859
|
-
* await client.sync.getSyncDag("sync_id")
|
|
860
|
-
*/
|
|
861
|
-
getSyncDag(syncId, requestOptions) {
|
|
862
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
863
|
-
var _a;
|
|
864
|
-
const _response = yield core.fetcher({
|
|
865
|
-
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `sync/${encodeURIComponent(syncId)}/dag`),
|
|
866
|
-
method: "GET",
|
|
867
|
-
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
868
|
-
? yield core.Supplier.get(this._options.apiKey)
|
|
869
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.26", "User-Agent": "@airweave/sdk/0.2.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
870
|
-
contentType: "application/json",
|
|
871
|
-
requestType: "json",
|
|
872
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
873
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
874
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
875
|
-
});
|
|
876
|
-
if (_response.ok) {
|
|
877
|
-
return serializers.SyncDag.parseOrThrow(_response.body, {
|
|
878
|
-
unrecognizedObjectKeys: "passthrough",
|
|
879
|
-
allowUnrecognizedUnionMembers: true,
|
|
880
|
-
allowUnrecognizedEnumValues: true,
|
|
881
|
-
breadcrumbsPrefix: ["response"],
|
|
882
|
-
});
|
|
883
|
-
}
|
|
884
|
-
if (_response.error.reason === "status-code") {
|
|
885
|
-
switch (_response.error.statusCode) {
|
|
886
|
-
case 422:
|
|
887
|
-
throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
888
|
-
unrecognizedObjectKeys: "passthrough",
|
|
889
|
-
allowUnrecognizedUnionMembers: true,
|
|
890
|
-
allowUnrecognizedEnumValues: true,
|
|
891
|
-
breadcrumbsPrefix: ["response"],
|
|
892
|
-
}));
|
|
893
|
-
default:
|
|
894
|
-
throw new errors.AirweaveSDKError({
|
|
895
|
-
statusCode: _response.error.statusCode,
|
|
896
|
-
body: _response.error.body,
|
|
897
|
-
});
|
|
898
|
-
}
|
|
899
|
-
}
|
|
900
|
-
switch (_response.error.reason) {
|
|
901
|
-
case "non-json":
|
|
902
|
-
throw new errors.AirweaveSDKError({
|
|
903
|
-
statusCode: _response.error.statusCode,
|
|
904
|
-
body: _response.error.rawBody,
|
|
905
|
-
});
|
|
906
|
-
case "timeout":
|
|
907
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /sync/{sync_id}/dag.");
|
|
908
|
-
case "unknown":
|
|
909
|
-
throw new errors.AirweaveSDKError({
|
|
910
|
-
message: _response.error.errorMessage,
|
|
911
|
-
});
|
|
912
|
-
}
|
|
621
|
+
return `Bearer ${yield core.Supplier.get(this._options.token)}`;
|
|
913
622
|
});
|
|
914
623
|
}
|
|
915
624
|
}
|
|
916
|
-
exports.
|
|
625
|
+
exports.SourceConnections = SourceConnections;
|