@airweave/sdk 0.2.26 → 0.2.52
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 +6 -18
- package/Client.js +8 -28
- package/README.md +9 -7
- package/api/resources/collections/client/Client.d.ts +135 -0
- package/api/resources/{apiKeys → collections}/client/Client.js +205 -86
- 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/SearchCollectionCollectionsReadableIdSearchGetRequest.d.ts +20 -0
- package/api/resources/collections/client/requests/index.d.ts +4 -0
- package/api/resources/index.d.ts +5 -12
- package/api/resources/index.js +6 -13
- package/api/resources/sourceConnections/client/Client.d.ts +191 -0
- package/{dist/api/resources/whiteLabels → api/resources/sourceConnections}/client/Client.js +138 -189
- package/api/resources/sourceConnections/client/requests/BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.d.ts +10 -0
- 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 +18 -0
- package/api/resources/sourceConnections/client/requests/index.d.ts +5 -0
- package/api/resources/{sync/types/ListSyncsSyncGetResponse.d.ts → sourceConnections/types/SourceConnectionUpdateAuthFields.d.ts} +1 -1
- package/api/resources/sourceConnections/types/index.d.ts +1 -0
- package/api/resources/sourceConnections/types/index.js +17 -0
- package/api/resources/sources/client/Client.d.ts +8 -11
- package/api/resources/sources/client/Client.js +10 -13
- package/api/types/ApiKey.d.ts +3 -3
- package/api/{resources/apiKeys/client/requests → types}/ApiKeyCreate.d.ts +2 -2
- package/api/types/AuthType.d.ts +2 -3
- package/api/types/AuthType.js +1 -1
- package/api/types/BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.d.ts +9 -0
- package/api/types/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.d.ts +8 -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/IntegrationCredentialInDb.d.ts +18 -0
- package/api/types/IntegrationCredentialRawCreate.d.ts +19 -0
- package/api/types/OAuth2AuthUrl.d.ts +13 -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/Source.d.ts +4 -1
- package/api/types/SourceConnection.d.ts +33 -0
- package/api/types/SourceConnectionAuthFields.d.ts +5 -0
- package/api/types/SourceConnectionCreate.d.ts +23 -0
- package/api/types/SourceConnectionJob.d.ts +30 -0
- package/api/types/SourceConnectionListItem.d.ts +22 -0
- package/api/types/SourceConnectionStatus.d.ts +12 -0
- package/api/types/SourceConnectionStatus.js +11 -0
- package/api/types/Sync.d.ts +0 -2
- package/{dist/api/resources/sync/client/requests → api/types}/SyncCreate.d.ts +2 -9
- package/api/types/SyncJob.d.ts +7 -4
- package/api/{resources/sync/client/requests → types}/SyncUpdate.d.ts +2 -5
- package/api/types/SyncWithSourceConnection.d.ts +0 -2
- package/api/types/User.d.ts +1 -1
- package/api/types/UserCreate.d.ts +11 -0
- package/api/types/WhiteLabel.d.ts +1 -0
- package/api/{resources/whiteLabels/client/requests → types}/WhiteLabelCreate.d.ts +2 -8
- package/api/{resources/whiteLabels/client/requests → types}/WhiteLabelUpdate.d.ts +2 -2
- package/api/types/index.d.ts +28 -5
- package/api/types/index.js +28 -5
- package/dist/Client.d.ts +6 -18
- package/dist/Client.js +8 -28
- package/dist/api/resources/collections/client/Client.d.ts +135 -0
- package/dist/api/resources/{apiKeys → collections}/client/Client.js +205 -86
- 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/ListCollectionsCollectionsGetRequest.js +5 -0
- package/dist/api/resources/collections/client/requests/SearchCollectionCollectionsReadableIdSearchGetRequest.d.ts +20 -0
- package/dist/api/resources/collections/client/requests/SearchCollectionCollectionsReadableIdSearchGetRequest.js +5 -0
- package/dist/api/resources/collections/client/requests/index.d.ts +4 -0
- package/dist/api/resources/index.d.ts +5 -12
- package/dist/api/resources/index.js +6 -13
- package/dist/api/resources/sourceConnections/client/Client.d.ts +191 -0
- package/{api/resources/whiteLabels → dist/api/resources/sourceConnections}/client/Client.js +138 -189
- package/dist/api/resources/sourceConnections/client/requests/BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.d.ts +10 -0
- package/dist/api/resources/sourceConnections/client/requests/BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.js +5 -0
- 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 +18 -0
- package/dist/api/resources/sourceConnections/client/requests/SourceConnectionUpdate.js +5 -0
- package/dist/api/resources/sourceConnections/client/requests/index.d.ts +5 -0
- package/dist/api/resources/{sync/types/ListSyncsSyncGetResponse.d.ts → sourceConnections/types/SourceConnectionUpdateAuthFields.d.ts} +1 -1
- package/dist/api/resources/sourceConnections/types/SourceConnectionUpdateAuthFields.js +5 -0
- package/dist/api/resources/sourceConnections/types/index.d.ts +1 -0
- package/dist/api/resources/sourceConnections/types/index.js +17 -0
- package/dist/api/resources/sources/client/Client.d.ts +8 -11
- package/dist/api/resources/sources/client/Client.js +10 -13
- 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/dist/api/types/AuthType.d.ts +2 -3
- package/dist/api/types/AuthType.js +1 -1
- package/dist/api/types/BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.d.ts +9 -0
- package/dist/api/types/BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.js +5 -0
- package/dist/api/types/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.d.ts +8 -0
- package/dist/api/types/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.js +5 -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/IntegrationCredentialInDb.d.ts +18 -0
- package/dist/api/types/IntegrationCredentialInDb.js +5 -0
- package/dist/api/types/IntegrationCredentialRawCreate.d.ts +19 -0
- package/dist/api/types/IntegrationCredentialRawCreate.js +5 -0
- package/dist/api/types/OAuth2AuthUrl.d.ts +13 -0
- package/dist/api/types/OAuth2AuthUrl.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/Source.d.ts +4 -1
- package/dist/api/types/SourceConnection.d.ts +33 -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 +23 -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 +22 -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/Sync.d.ts +0 -2
- package/{api/resources/sync/client/requests → dist/api/types}/SyncCreate.d.ts +2 -9
- package/dist/api/types/SyncCreate.js +5 -0
- package/dist/api/types/SyncJob.d.ts +7 -4
- package/dist/api/{resources/sync/client/requests → types}/SyncUpdate.d.ts +2 -5
- package/dist/api/types/SyncUpdate.js +5 -0
- package/dist/api/types/SyncWithSourceConnection.d.ts +0 -2
- 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/WhiteLabel.d.ts +1 -0
- package/dist/api/{resources/whiteLabels/client/requests → types}/WhiteLabelCreate.d.ts +2 -8
- package/dist/api/types/WhiteLabelCreate.js +5 -0
- package/dist/api/{resources/whiteLabels/client/requests → types}/WhiteLabelUpdate.d.ts +2 -2
- package/dist/api/types/WhiteLabelUpdate.js +5 -0
- package/dist/api/types/index.d.ts +28 -5
- package/dist/api/types/index.js +28 -5
- 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/dist/serialization/resources/{connections/client/listConnectedIntegrations.js → collections/client/listCollections.js} +2 -2
- package/dist/serialization/resources/{connections/client/listConnectedIntegrations.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/index.d.ts +5 -11
- package/dist/serialization/resources/index.js +6 -12
- package/dist/serialization/resources/sourceConnections/client/index.d.ts +3 -0
- package/{serialization/resources/apiKeys → dist/serialization/resources/sourceConnections}/client/index.js +3 -2
- package/dist/serialization/resources/{connections/client/listAllConnectedIntegrations.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/BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.d.ts +12 -0
- package/dist/serialization/resources/sourceConnections/client/requests/BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.js +43 -0
- package/dist/serialization/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.ts +20 -0
- package/dist/serialization/resources/sourceConnections/client/requests/SourceConnectionUpdate.js +51 -0
- package/dist/serialization/resources/sourceConnections/client/requests/index.d.ts +2 -0
- package/dist/serialization/resources/sourceConnections/client/requests/index.js +7 -0
- package/dist/serialization/resources/sourceConnections/types/SourceConnectionUpdateAuthFields.d.ts +11 -0
- package/dist/serialization/resources/sourceConnections/types/SourceConnectionUpdateAuthFields.js +42 -0
- package/dist/serialization/resources/sourceConnections/types/index.d.ts +1 -0
- package/dist/serialization/resources/sourceConnections/types/index.js +17 -0
- 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/AuthType.d.ts +1 -1
- package/dist/serialization/types/AuthType.js +1 -1
- package/dist/serialization/types/BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.d.ts +15 -0
- package/dist/serialization/types/BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.js +46 -0
- package/dist/serialization/types/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.d.ts +14 -0
- package/dist/serialization/types/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.js +45 -0
- package/dist/serialization/types/{ApiKeyWithPlainKey.d.ts → Collection.d.ts} +7 -7
- package/dist/serialization/types/{ApiKeyWithPlainKey.js → 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/{serialization/types/DestinationWithConfigFields.d.ts → dist/serialization/types/DestinationWithAuthenticationFields.d.ts} +3 -3
- package/{serialization/types/DestinationWithConfigFields.js → dist/serialization/types/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/IntegrationCredentialInDb.d.ts +22 -0
- package/dist/serialization/types/{SourceWithConfigFields.js → IntegrationCredentialInDb.js} +8 -13
- package/dist/serialization/types/IntegrationCredentialRawCreate.d.ts +20 -0
- package/dist/serialization/types/IntegrationCredentialRawCreate.js +51 -0
- package/dist/serialization/types/OAuth2AuthUrl.d.ts +12 -0
- package/dist/serialization/types/OAuth2AuthUrl.js +43 -0
- 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/Source.d.ts +5 -1
- package/dist/serialization/types/Source.js +5 -1
- package/dist/serialization/types/SourceConnection.d.ts +38 -0
- package/dist/serialization/types/SourceConnection.js +69 -0
- package/dist/serialization/types/SourceConnectionAuthFields.d.ts +11 -0
- package/dist/serialization/types/{BodySendOauth2CodeConnectionsOauth2SourceCodePost.js → SourceConnectionAuthFields.js} +3 -5
- package/dist/serialization/types/SourceConnectionCreate.d.ts +22 -0
- package/dist/serialization/types/SourceConnectionCreate.js +53 -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 +22 -0
- package/dist/serialization/types/SourceConnectionListItem.js +53 -0
- package/dist/serialization/types/SourceConnectionStatus.d.ts +10 -0
- package/dist/serialization/types/SourceConnectionStatus.js +41 -0
- package/dist/serialization/types/Sync.d.ts +0 -2
- package/dist/serialization/types/Sync.js +0 -2
- package/dist/serialization/{resources/sync/client/requests → types}/SyncCreate.d.ts +5 -7
- package/{serialization/resources/sync/client/requests → dist/serialization/types}/SyncCreate.js +2 -4
- package/dist/serialization/types/SyncJob.d.ts +7 -4
- package/dist/serialization/types/SyncJob.js +7 -4
- package/dist/serialization/types/SyncUpdate.d.ts +17 -0
- package/{serialization/resources/sync/client/requests → dist/serialization/types}/SyncUpdate.js +2 -4
- package/dist/serialization/types/SyncWithSourceConnection.d.ts +0 -2
- package/dist/serialization/types/SyncWithSourceConnection.js +0 -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/WhiteLabel.d.ts +1 -0
- package/dist/serialization/types/WhiteLabel.js +1 -0
- package/dist/serialization/types/WhiteLabelCreate.d.ts +17 -0
- package/{serialization/resources/whiteLabels/client/requests → dist/serialization/types}/WhiteLabelCreate.js +2 -1
- package/dist/serialization/types/WhiteLabelUpdate.d.ts +16 -0
- package/{serialization/resources/whiteLabels/client/requests → dist/serialization/types}/WhiteLabelUpdate.js +2 -1
- package/dist/serialization/types/index.d.ts +28 -5
- package/dist/serialization/types/index.js +28 -5
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +188 -1867
- package/serialization/resources/collections/client/index.d.ts +3 -0
- package/serialization/resources/{sync → collections}/client/index.js +3 -3
- package/{dist/serialization/resources/whiteLabels/client/listWhiteLabelSyncs.d.ts → serialization/resources/collections/client/listCollections.d.ts} +3 -3
- package/{dist/serialization/resources/connections/client/listAllConnectedIntegrations.js → serialization/resources/collections/client/listCollections.js} +2 -2
- package/{dist/serialization/resources/embeddingModels/client/readEmbeddingModels.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/index.d.ts +5 -11
- package/serialization/resources/index.js +6 -12
- 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/BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.d.ts +12 -0
- package/serialization/resources/sourceConnections/client/requests/BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.js +43 -0
- package/serialization/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.ts +20 -0
- package/serialization/resources/sourceConnections/client/requests/SourceConnectionUpdate.js +51 -0
- package/serialization/resources/sourceConnections/client/requests/index.d.ts +2 -0
- package/serialization/resources/sourceConnections/client/requests/index.js +7 -0
- package/serialization/resources/sourceConnections/types/SourceConnectionUpdateAuthFields.d.ts +11 -0
- package/serialization/resources/sourceConnections/types/SourceConnectionUpdateAuthFields.js +42 -0
- package/serialization/resources/sourceConnections/types/index.d.ts +1 -0
- package/serialization/resources/sourceConnections/types/index.js +17 -0
- 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/AuthType.d.ts +1 -1
- package/serialization/types/AuthType.js +1 -1
- package/serialization/types/BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.d.ts +15 -0
- package/serialization/types/BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.js +46 -0
- package/serialization/types/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.d.ts +14 -0
- package/serialization/types/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.js +45 -0
- package/serialization/types/{ApiKeyWithPlainKey.d.ts → Collection.d.ts} +7 -7
- package/serialization/types/{ApiKeyWithPlainKey.js → 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/{dist/serialization/types/DestinationWithConfigFields.d.ts → serialization/types/DestinationWithAuthenticationFields.d.ts} +3 -3
- package/{dist/serialization/types/DestinationWithConfigFields.js → serialization/types/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/IntegrationCredentialInDb.d.ts +22 -0
- package/serialization/types/{SourceWithConfigFields.js → IntegrationCredentialInDb.js} +8 -13
- package/serialization/types/IntegrationCredentialRawCreate.d.ts +20 -0
- package/serialization/types/IntegrationCredentialRawCreate.js +51 -0
- package/serialization/types/OAuth2AuthUrl.d.ts +12 -0
- package/serialization/types/OAuth2AuthUrl.js +43 -0
- 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/Source.d.ts +5 -1
- package/serialization/types/Source.js +5 -1
- package/serialization/types/SourceConnection.d.ts +38 -0
- package/serialization/types/SourceConnection.js +69 -0
- package/serialization/types/SourceConnectionAuthFields.d.ts +11 -0
- package/serialization/types/{BodySendOauth2CodeConnectionsOauth2SourceCodePost.js → SourceConnectionAuthFields.js} +3 -5
- package/serialization/types/SourceConnectionCreate.d.ts +22 -0
- package/serialization/types/SourceConnectionCreate.js +53 -0
- package/serialization/types/SourceConnectionJob.d.ts +30 -0
- package/serialization/types/SourceConnectionJob.js +61 -0
- package/serialization/types/SourceConnectionListItem.d.ts +22 -0
- package/serialization/types/SourceConnectionListItem.js +53 -0
- package/serialization/types/SourceConnectionStatus.d.ts +10 -0
- package/serialization/types/SourceConnectionStatus.js +41 -0
- package/serialization/types/Sync.d.ts +0 -2
- package/serialization/types/Sync.js +0 -2
- package/serialization/{resources/sync/client/requests → types}/SyncCreate.d.ts +5 -7
- package/{dist/serialization/resources/sync/client/requests → serialization/types}/SyncCreate.js +2 -4
- package/serialization/types/SyncJob.d.ts +7 -4
- package/serialization/types/SyncJob.js +7 -4
- package/serialization/types/SyncUpdate.d.ts +17 -0
- package/{dist/serialization/resources/sync/client/requests → serialization/types}/SyncUpdate.js +2 -4
- package/serialization/types/SyncWithSourceConnection.d.ts +0 -2
- package/serialization/types/SyncWithSourceConnection.js +0 -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/WhiteLabel.d.ts +1 -0
- package/serialization/types/WhiteLabel.js +1 -0
- package/serialization/types/WhiteLabelCreate.d.ts +17 -0
- package/{dist/serialization/resources/whiteLabels/client/requests → serialization/types}/WhiteLabelCreate.js +2 -1
- package/serialization/types/WhiteLabelUpdate.d.ts +16 -0
- package/{dist/serialization/resources/whiteLabels/client/requests → serialization/types}/WhiteLabelUpdate.js +2 -1
- package/serialization/types/index.d.ts +28 -5
- package/serialization/types/index.js +28 -5
- 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/Client.d.ts +0 -247
- package/api/resources/connections/client/Client.js +0 -762
- package/api/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +0 -15
- 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/Client.js +0 -916
- 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/types/index.d.ts +0 -1
- package/api/resources/sync/types/index.js +0 -17
- package/api/resources/whiteLabels/client/Client.d.ts +0 -213
- package/api/resources/whiteLabels/client/index.d.ts +0 -1
- package/api/resources/whiteLabels/client/index.js +0 -17
- package/api/resources/whiteLabels/client/requests/index.d.ts +0 -2
- package/api/resources/whiteLabels/client/requests/index.js +0 -2
- package/api/resources/whiteLabels/index.d.ts +0 -1
- package/api/resources/whiteLabels/index.js +0 -17
- package/api/types/ApiKeyWithPlainKey.d.ts +0 -18
- package/api/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +0 -7
- package/api/types/SourceWithConfigFields.d.ts +0 -23
- package/dist/api/resources/apiKeys/client/Client.d.ts +0 -131
- package/dist/api/resources/apiKeys/client/index.d.ts +0 -1
- package/dist/api/resources/apiKeys/client/index.js +0 -17
- 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/apiKeys/index.d.ts +0 -1
- package/dist/api/resources/apiKeys/index.js +0 -17
- package/dist/api/resources/connections/client/Client.d.ts +0 -247
- package/dist/api/resources/connections/client/Client.js +0 -762
- package/dist/api/resources/connections/client/index.d.ts +0 -1
- package/dist/api/resources/connections/client/index.js +0 -17
- package/dist/api/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +0 -15
- 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/connections/index.d.ts +0 -1
- package/dist/api/resources/connections/index.js +0 -17
- 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/embeddingModels/index.d.ts +0 -1
- package/dist/api/resources/embeddingModels/index.js +0 -17
- 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/search/index.d.ts +0 -1
- package/dist/api/resources/search/index.js +0 -17
- package/dist/api/resources/sync/client/Client.d.ts +0 -275
- package/dist/api/resources/sync/client/Client.js +0 -916
- 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/types/index.d.ts +0 -1
- package/dist/api/resources/sync/types/index.js +0 -17
- package/dist/api/resources/whiteLabels/client/Client.d.ts +0 -213
- package/dist/api/resources/whiteLabels/client/index.d.ts +0 -1
- package/dist/api/resources/whiteLabels/client/index.js +0 -17
- package/dist/api/resources/whiteLabels/client/requests/index.d.ts +0 -2
- package/dist/api/resources/whiteLabels/client/requests/index.js +0 -2
- package/dist/api/resources/whiteLabels/index.d.ts +0 -1
- package/dist/api/resources/whiteLabels/index.js +0 -17
- package/dist/api/types/ApiKeyWithPlainKey.d.ts +0 -18
- package/dist/api/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +0 -7
- package/dist/api/types/SourceWithConfigFields.d.ts +0 -23
- 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/apiKeys/index.d.ts +0 -1
- package/dist/serialization/resources/apiKeys/index.js +0 -17
- 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/index.d.ts +0 -6
- package/dist/serialization/resources/connections/client/index.js +0 -45
- package/dist/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +0 -13
- package/dist/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js +0 -44
- 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/connections/index.d.ts +0 -1
- package/dist/serialization/resources/connections/index.js +0 -17
- 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/embeddingModels/index.d.ts +0 -1
- package/dist/serialization/resources/embeddingModels/index.js +0 -17
- 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.d.ts +0 -11
- package/dist/serialization/resources/sync/client/listAllJobs.js +0 -42
- package/dist/serialization/resources/sync/client/listSyncJobs.d.ts +0 -11
- package/dist/serialization/resources/sync/client/listSyncJobs.js +0 -42
- package/dist/serialization/resources/sync/client/requests/SyncUpdate.d.ts +0 -19
- 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/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/dist/serialization/resources/whiteLabels/client/index.d.ts +0 -5
- package/dist/serialization/resources/whiteLabels/client/index.js +0 -44
- package/dist/serialization/resources/whiteLabels/client/listWhiteLabelSyncs.js +0 -42
- package/dist/serialization/resources/whiteLabels/client/listWhiteLabels.d.ts +0 -11
- package/dist/serialization/resources/whiteLabels/client/listWhiteLabels.js +0 -42
- package/dist/serialization/resources/whiteLabels/client/requests/WhiteLabelCreate.d.ts +0 -16
- package/dist/serialization/resources/whiteLabels/client/requests/WhiteLabelUpdate.d.ts +0 -15
- package/dist/serialization/resources/whiteLabels/client/requests/index.d.ts +0 -2
- package/dist/serialization/resources/whiteLabels/client/requests/index.js +0 -7
- package/dist/serialization/resources/whiteLabels/index.d.ts +0 -1
- package/dist/serialization/resources/whiteLabels/index.js +0 -17
- package/dist/serialization/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +0 -13
- package/dist/serialization/types/SourceWithConfigFields.d.ts +0 -27
- 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/index.d.ts +0 -6
- package/serialization/resources/connections/client/index.js +0 -45
- package/serialization/resources/connections/client/listAllConnectedIntegrations.d.ts +0 -11
- package/serialization/resources/connections/client/listAllConnectedIntegrations.js +0 -42
- package/serialization/resources/connections/client/listConnectedIntegrations.d.ts +0 -11
- package/serialization/resources/connections/client/listConnectedIntegrations.js +0 -42
- package/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +0 -13
- package/serialization/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js +0 -44
- 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/connections/index.d.ts +0 -1
- package/serialization/resources/connections/index.js +0 -17
- 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/SyncUpdate.d.ts +0 -19
- 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/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/serialization/resources/whiteLabels/client/index.d.ts +0 -5
- package/serialization/resources/whiteLabels/client/index.js +0 -44
- package/serialization/resources/whiteLabels/client/listWhiteLabelSyncs.d.ts +0 -11
- package/serialization/resources/whiteLabels/client/listWhiteLabelSyncs.js +0 -42
- package/serialization/resources/whiteLabels/client/listWhiteLabels.d.ts +0 -11
- package/serialization/resources/whiteLabels/client/listWhiteLabels.js +0 -42
- package/serialization/resources/whiteLabels/client/requests/WhiteLabelCreate.d.ts +0 -16
- package/serialization/resources/whiteLabels/client/requests/WhiteLabelUpdate.d.ts +0 -15
- package/serialization/resources/whiteLabels/client/requests/index.d.ts +0 -2
- package/serialization/resources/whiteLabels/client/requests/index.js +0 -7
- package/serialization/resources/whiteLabels/index.d.ts +0 -1
- package/serialization/resources/whiteLabels/index.js +0 -17
- package/serialization/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +0 -13
- package/serialization/types/SourceWithConfigFields.d.ts +0 -27
- /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/{connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js → collections/client/requests/SearchCollectionCollectionsReadableIdSearchGetRequest.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/{connections → sourceConnections}/client/index.d.ts +0 -0
- /package/api/resources/{connections → sourceConnections}/client/index.js +0 -0
- /package/api/resources/{search/client/requests/SearchSearchGetRequest.js → sourceConnections/client/requests/BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.js} +0 -0
- /package/api/resources/{sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.js → sourceConnections/client/requests/DeleteSourceConnectionSourceConnectionsSourceConnectionIdDeleteRequest.js} +0 -0
- /package/api/resources/{sync/client/requests/ListAllJobsSyncJobsGetRequest.js → sourceConnections/client/requests/GetSourceConnectionSourceConnectionsSourceConnectionIdGetRequest.js} +0 -0
- /package/api/resources/{sync/client/requests/ListSyncsSyncGetRequest.js → sourceConnections/client/requests/ListSourceConnectionsSourceConnectionsGetRequest.js} +0 -0
- /package/api/resources/{sync/client/requests/SyncCreate.js → sourceConnections/client/requests/SourceConnectionUpdate.js} +0 -0
- /package/api/resources/{connections → sourceConnections}/client/requests/index.js +0 -0
- /package/api/resources/{sync → sourceConnections}/index.d.ts +0 -0
- /package/api/resources/{sync → sourceConnections}/index.js +0 -0
- /package/api/resources/{sync/client/requests/SyncUpdate.js → sourceConnections/types/SourceConnectionUpdateAuthFields.js} +0 -0
- /package/{dist/api/resources/apiKeys/client/requests → api/types}/ApiKeyCreate.js +0 -0
- /package/api/{resources/sync/types/ListSyncsSyncGetResponse.js → types/BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.js} +0 -0
- /package/api/{resources/whiteLabels/client/requests/WhiteLabelCreate.js → types/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.js} +0 -0
- /package/api/{resources/whiteLabels/client/requests/WhiteLabelUpdate.js → types/Collection.js} +0 -0
- /package/api/types/{ApiKeyWithPlainKey.js → CollectionUpdate.js} +0 -0
- /package/api/types/{BodySendOauth2CodeConnectionsOauth2SourceCodePost.js → ConfigValues.js} +0 -0
- /package/api/types/{DestinationWithConfigFields.js → DestinationWithAuthenticationFields.js} +0 -0
- /package/api/types/{EmbeddingModelWithConfigFields.js → EmbeddingModelWithAuthenticationFields.js} +0 -0
- /package/api/types/{SourceWithConfigFields.js → EntityCount.js} +0 -0
- /package/{dist/api/resources/apiKeys/client/requests/DeleteApiKeyApiKeysDeleteRequest.js → api/types/IntegrationCredentialInDb.js} +0 -0
- /package/{dist/api/resources/apiKeys/client/requests/ReadApiKeysApiKeysGetRequest.js → api/types/IntegrationCredentialRawCreate.js} +0 -0
- /package/{dist/api/resources/connections/client/requests/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js → api/types/OAuth2AuthUrl.js} +0 -0
- /package/{dist/api/resources/search/client/requests/SearchSearchGetRequest.js → api/types/Organization.js} +0 -0
- /package/{dist/api/resources/sync/client/requests/DeleteSyncSyncSyncIdDeleteRequest.js → api/types/SearchResponse.js} +0 -0
- /package/{dist/api/resources/sync/client/requests/ListAllJobsSyncJobsGetRequest.js → api/types/SourceConnection.js} +0 -0
- /package/{dist/api/resources/sync/client/requests/ListSyncsSyncGetRequest.js → api/types/SourceConnectionAuthFields.js} +0 -0
- /package/{dist/api/resources/sync/client/requests/SyncCreate.js → api/types/SourceConnectionCreate.js} +0 -0
- /package/{dist/api/resources/sync/client/requests/SyncUpdate.js → api/types/SourceConnectionJob.js} +0 -0
- /package/{dist/api/resources/sync/types/ListSyncsSyncGetResponse.js → api/types/SourceConnectionListItem.js} +0 -0
- /package/{dist/api/resources/whiteLabels/client/requests/WhiteLabelCreate.js → api/types/SyncCreate.js} +0 -0
- /package/{dist/api/resources/whiteLabels/client/requests/WhiteLabelUpdate.js → api/types/SyncUpdate.js} +0 -0
- /package/{dist/api/types/ApiKeyWithPlainKey.js → api/types/UserCreate.js} +0 -0
- /package/{dist/api/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js → api/types/WhiteLabelCreate.js} +0 -0
- /package/{dist/api/types/DestinationWithConfigFields.js → api/types/WhiteLabelUpdate.js} +0 -0
- /package/{api/resources/search → dist/api/resources/collections}/client/index.d.ts +0 -0
- /package/{api/resources/search → dist/api/resources/collections}/client/index.js +0 -0
- /package/dist/api/{types/EmbeddingModelWithConfigFields.js → resources/collections/client/requests/CollectionCreate.js} +0 -0
- /package/dist/api/{types/SourceWithConfigFields.js → resources/collections/client/requests/DeleteCollectionCollectionsReadableIdDeleteRequest.js} +0 -0
- /package/{api/resources/embeddingModels/client → dist/api/resources/collections/client/requests}/index.js +0 -0
- /package/{api/resources/connections → dist/api/resources/collections}/index.d.ts +0 -0
- /package/{api/resources/connections → dist/api/resources/collections}/index.js +0 -0
- /package/{api/resources/sync → dist/api/resources/sourceConnections}/client/index.d.ts +0 -0
- /package/{api/resources/sync → dist/api/resources/sourceConnections}/client/index.js +0 -0
- /package/{api/resources/search → dist/api/resources/sourceConnections}/client/requests/index.js +0 -0
- /package/dist/api/resources/{sync → sourceConnections}/index.d.ts +0 -0
- /package/dist/api/resources/{sync → sourceConnections}/index.js +0 -0
- /package/{api/resources/embeddingModels → dist/serialization/resources/collections}/index.d.ts +0 -0
- /package/{api/resources/embeddingModels → dist/serialization/resources/collections}/index.js +0 -0
- /package/dist/serialization/resources/{sync → sourceConnections}/index.d.ts +0 -0
- /package/dist/serialization/resources/{sync → sourceConnections}/index.js +0 -0
- /package/{api/resources/search → serialization/resources/collections}/index.d.ts +0 -0
- /package/{api/resources/search → serialization/resources/collections}/index.js +0 -0
- /package/serialization/resources/{sync → sourceConnections}/index.d.ts +0 -0
- /package/serialization/resources/{sync → sourceConnections}/index.js +0 -0
|
@@ -1,916 +0,0 @@
|
|
|
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.Sync = 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 Sync {
|
|
59
|
-
constructor(_options = {}) {
|
|
60
|
-
this._options = _options;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* List all syncs for the current user.
|
|
64
|
-
*
|
|
65
|
-
* Args:
|
|
66
|
-
* -----
|
|
67
|
-
* db: The database session
|
|
68
|
-
* skip: The number of syncs to skip
|
|
69
|
-
* limit: The number of syncs to return
|
|
70
|
-
* with_source_connection: Whether to include the source connection in the response
|
|
71
|
-
* user: The current user
|
|
72
|
-
*
|
|
73
|
-
* Returns:
|
|
74
|
-
* --------
|
|
75
|
-
* list[schemas.Sync] | list[schemas.SyncWithSourceConnection]: A list of syncs
|
|
76
|
-
*
|
|
77
|
-
* @param {AirweaveSDK.ListSyncsSyncGetRequest} request
|
|
78
|
-
* @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
|
|
79
|
-
*
|
|
80
|
-
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
81
|
-
*
|
|
82
|
-
* @example
|
|
83
|
-
* await client.sync.listSyncs()
|
|
84
|
-
*/
|
|
85
|
-
listSyncs() {
|
|
86
|
-
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
87
|
-
var _a;
|
|
88
|
-
const { skip, limit, withSourceConnection } = request;
|
|
89
|
-
const _queryParams = {};
|
|
90
|
-
if (skip != null) {
|
|
91
|
-
_queryParams["skip"] = skip.toString();
|
|
92
|
-
}
|
|
93
|
-
if (limit != null) {
|
|
94
|
-
_queryParams["limit"] = limit.toString();
|
|
95
|
-
}
|
|
96
|
-
if (withSourceConnection != null) {
|
|
97
|
-
_queryParams["with_source_connection"] = withSourceConnection.toString();
|
|
98
|
-
}
|
|
99
|
-
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, "sync/"),
|
|
101
|
-
method: "GET",
|
|
102
|
-
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
103
|
-
? 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.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),
|
|
105
|
-
contentType: "application/json",
|
|
106
|
-
queryParameters: _queryParams,
|
|
107
|
-
requestType: "json",
|
|
108
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
109
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
110
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
111
|
-
});
|
|
112
|
-
if (_response.ok) {
|
|
113
|
-
return serializers.ListSyncsSyncGetResponse.parseOrThrow(_response.body, {
|
|
114
|
-
unrecognizedObjectKeys: "passthrough",
|
|
115
|
-
allowUnrecognizedUnionMembers: true,
|
|
116
|
-
allowUnrecognizedEnumValues: true,
|
|
117
|
-
breadcrumbsPrefix: ["response"],
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
if (_response.error.reason === "status-code") {
|
|
121
|
-
switch (_response.error.statusCode) {
|
|
122
|
-
case 422:
|
|
123
|
-
throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
124
|
-
unrecognizedObjectKeys: "passthrough",
|
|
125
|
-
allowUnrecognizedUnionMembers: true,
|
|
126
|
-
allowUnrecognizedEnumValues: true,
|
|
127
|
-
breadcrumbsPrefix: ["response"],
|
|
128
|
-
}));
|
|
129
|
-
default:
|
|
130
|
-
throw new errors.AirweaveSDKError({
|
|
131
|
-
statusCode: _response.error.statusCode,
|
|
132
|
-
body: _response.error.body,
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
switch (_response.error.reason) {
|
|
137
|
-
case "non-json":
|
|
138
|
-
throw new errors.AirweaveSDKError({
|
|
139
|
-
statusCode: _response.error.statusCode,
|
|
140
|
-
body: _response.error.rawBody,
|
|
141
|
-
});
|
|
142
|
-
case "timeout":
|
|
143
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /sync/.");
|
|
144
|
-
case "unknown":
|
|
145
|
-
throw new errors.AirweaveSDKError({
|
|
146
|
-
message: _response.error.errorMessage,
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* Create a new sync configuration.
|
|
153
|
-
*
|
|
154
|
-
* Args:
|
|
155
|
-
* -----
|
|
156
|
-
* db: The database session
|
|
157
|
-
* sync_in: The sync to create
|
|
158
|
-
* user: The current user
|
|
159
|
-
* background_tasks: The background tasks
|
|
160
|
-
*
|
|
161
|
-
* Returns:
|
|
162
|
-
* --------
|
|
163
|
-
* sync (schemas.Sync): The created sync
|
|
164
|
-
*
|
|
165
|
-
* @param {AirweaveSDK.SyncCreate} request
|
|
166
|
-
* @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
|
|
167
|
-
*
|
|
168
|
-
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
169
|
-
*
|
|
170
|
-
* @example
|
|
171
|
-
* await client.sync.createSync({
|
|
172
|
-
* name: "name",
|
|
173
|
-
* sourceConnectionId: "source_connection_id",
|
|
174
|
-
* destinationConnectionIds: ["destination_connection_ids"]
|
|
175
|
-
* })
|
|
176
|
-
*/
|
|
177
|
-
createSync(request, requestOptions) {
|
|
178
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
179
|
-
var _a;
|
|
180
|
-
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, "sync/"),
|
|
182
|
-
method: "POST",
|
|
183
|
-
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
184
|
-
? 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.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),
|
|
186
|
-
contentType: "application/json",
|
|
187
|
-
requestType: "json",
|
|
188
|
-
body: serializers.SyncCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
189
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
190
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
191
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
192
|
-
});
|
|
193
|
-
if (_response.ok) {
|
|
194
|
-
return serializers.Sync.parseOrThrow(_response.body, {
|
|
195
|
-
unrecognizedObjectKeys: "passthrough",
|
|
196
|
-
allowUnrecognizedUnionMembers: true,
|
|
197
|
-
allowUnrecognizedEnumValues: true,
|
|
198
|
-
breadcrumbsPrefix: ["response"],
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
if (_response.error.reason === "status-code") {
|
|
202
|
-
switch (_response.error.statusCode) {
|
|
203
|
-
case 422:
|
|
204
|
-
throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
205
|
-
unrecognizedObjectKeys: "passthrough",
|
|
206
|
-
allowUnrecognizedUnionMembers: true,
|
|
207
|
-
allowUnrecognizedEnumValues: true,
|
|
208
|
-
breadcrumbsPrefix: ["response"],
|
|
209
|
-
}));
|
|
210
|
-
default:
|
|
211
|
-
throw new errors.AirweaveSDKError({
|
|
212
|
-
statusCode: _response.error.statusCode,
|
|
213
|
-
body: _response.error.body,
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
switch (_response.error.reason) {
|
|
218
|
-
case "non-json":
|
|
219
|
-
throw new errors.AirweaveSDKError({
|
|
220
|
-
statusCode: _response.error.statusCode,
|
|
221
|
-
body: _response.error.rawBody,
|
|
222
|
-
});
|
|
223
|
-
case "timeout":
|
|
224
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /sync/.");
|
|
225
|
-
case "unknown":
|
|
226
|
-
throw new errors.AirweaveSDKError({
|
|
227
|
-
message: _response.error.errorMessage,
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
* List all sync jobs across all syncs.
|
|
234
|
-
*
|
|
235
|
-
* Args:
|
|
236
|
-
* -----
|
|
237
|
-
* db: The database session
|
|
238
|
-
* skip: The number of jobs to skip
|
|
239
|
-
* limit: The number of jobs to return
|
|
240
|
-
* user: The current user
|
|
241
|
-
*
|
|
242
|
-
* Returns:
|
|
243
|
-
* --------
|
|
244
|
-
* list[schemas.SyncJob]: A list of all sync jobs
|
|
245
|
-
*
|
|
246
|
-
* @param {AirweaveSDK.ListAllJobsSyncJobsGetRequest} request
|
|
247
|
-
* @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
|
|
248
|
-
*
|
|
249
|
-
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
250
|
-
*
|
|
251
|
-
* @example
|
|
252
|
-
* await client.sync.listAllJobs()
|
|
253
|
-
*/
|
|
254
|
-
listAllJobs() {
|
|
255
|
-
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
256
|
-
var _a;
|
|
257
|
-
const { skip, limit } = request;
|
|
258
|
-
const _queryParams = {};
|
|
259
|
-
if (skip != null) {
|
|
260
|
-
_queryParams["skip"] = skip.toString();
|
|
261
|
-
}
|
|
262
|
-
if (limit != null) {
|
|
263
|
-
_queryParams["limit"] = limit.toString();
|
|
264
|
-
}
|
|
265
|
-
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, "sync/jobs"),
|
|
267
|
-
method: "GET",
|
|
268
|
-
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
269
|
-
? 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.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),
|
|
271
|
-
contentType: "application/json",
|
|
272
|
-
queryParameters: _queryParams,
|
|
273
|
-
requestType: "json",
|
|
274
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
275
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
276
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
277
|
-
});
|
|
278
|
-
if (_response.ok) {
|
|
279
|
-
return serializers.sync.listAllJobs.Response.parseOrThrow(_response.body, {
|
|
280
|
-
unrecognizedObjectKeys: "passthrough",
|
|
281
|
-
allowUnrecognizedUnionMembers: true,
|
|
282
|
-
allowUnrecognizedEnumValues: true,
|
|
283
|
-
breadcrumbsPrefix: ["response"],
|
|
284
|
-
});
|
|
285
|
-
}
|
|
286
|
-
if (_response.error.reason === "status-code") {
|
|
287
|
-
switch (_response.error.statusCode) {
|
|
288
|
-
case 422:
|
|
289
|
-
throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
290
|
-
unrecognizedObjectKeys: "passthrough",
|
|
291
|
-
allowUnrecognizedUnionMembers: true,
|
|
292
|
-
allowUnrecognizedEnumValues: true,
|
|
293
|
-
breadcrumbsPrefix: ["response"],
|
|
294
|
-
}));
|
|
295
|
-
default:
|
|
296
|
-
throw new errors.AirweaveSDKError({
|
|
297
|
-
statusCode: _response.error.statusCode,
|
|
298
|
-
body: _response.error.body,
|
|
299
|
-
});
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
switch (_response.error.reason) {
|
|
303
|
-
case "non-json":
|
|
304
|
-
throw new errors.AirweaveSDKError({
|
|
305
|
-
statusCode: _response.error.statusCode,
|
|
306
|
-
body: _response.error.rawBody,
|
|
307
|
-
});
|
|
308
|
-
case "timeout":
|
|
309
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /sync/jobs.");
|
|
310
|
-
case "unknown":
|
|
311
|
-
throw new errors.AirweaveSDKError({
|
|
312
|
-
message: _response.error.errorMessage,
|
|
313
|
-
});
|
|
314
|
-
}
|
|
315
|
-
});
|
|
316
|
-
}
|
|
317
|
-
/**
|
|
318
|
-
* Get a specific sync by ID.
|
|
319
|
-
*
|
|
320
|
-
* Args:
|
|
321
|
-
* -----
|
|
322
|
-
* db: The database session
|
|
323
|
-
* sync_id: The ID of the sync to get
|
|
324
|
-
* user: The current user
|
|
325
|
-
*
|
|
326
|
-
* Returns:
|
|
327
|
-
* --------
|
|
328
|
-
* sync (schemas.Sync): The sync
|
|
329
|
-
*
|
|
330
|
-
* @param {string} syncId
|
|
331
|
-
* @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
|
|
332
|
-
*
|
|
333
|
-
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
334
|
-
*
|
|
335
|
-
* @example
|
|
336
|
-
* await client.sync.getSync("sync_id")
|
|
337
|
-
*/
|
|
338
|
-
getSync(syncId, requestOptions) {
|
|
339
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
340
|
-
var _a;
|
|
341
|
-
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, `sync/${encodeURIComponent(syncId)}`),
|
|
343
|
-
method: "GET",
|
|
344
|
-
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
345
|
-
? 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.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),
|
|
347
|
-
contentType: "application/json",
|
|
348
|
-
requestType: "json",
|
|
349
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
350
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
351
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
352
|
-
});
|
|
353
|
-
if (_response.ok) {
|
|
354
|
-
return serializers.Sync.parseOrThrow(_response.body, {
|
|
355
|
-
unrecognizedObjectKeys: "passthrough",
|
|
356
|
-
allowUnrecognizedUnionMembers: true,
|
|
357
|
-
allowUnrecognizedEnumValues: true,
|
|
358
|
-
breadcrumbsPrefix: ["response"],
|
|
359
|
-
});
|
|
360
|
-
}
|
|
361
|
-
if (_response.error.reason === "status-code") {
|
|
362
|
-
switch (_response.error.statusCode) {
|
|
363
|
-
case 422:
|
|
364
|
-
throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
365
|
-
unrecognizedObjectKeys: "passthrough",
|
|
366
|
-
allowUnrecognizedUnionMembers: true,
|
|
367
|
-
allowUnrecognizedEnumValues: true,
|
|
368
|
-
breadcrumbsPrefix: ["response"],
|
|
369
|
-
}));
|
|
370
|
-
default:
|
|
371
|
-
throw new errors.AirweaveSDKError({
|
|
372
|
-
statusCode: _response.error.statusCode,
|
|
373
|
-
body: _response.error.body,
|
|
374
|
-
});
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
switch (_response.error.reason) {
|
|
378
|
-
case "non-json":
|
|
379
|
-
throw new errors.AirweaveSDKError({
|
|
380
|
-
statusCode: _response.error.statusCode,
|
|
381
|
-
body: _response.error.rawBody,
|
|
382
|
-
});
|
|
383
|
-
case "timeout":
|
|
384
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /sync/{sync_id}.");
|
|
385
|
-
case "unknown":
|
|
386
|
-
throw new errors.AirweaveSDKError({
|
|
387
|
-
message: _response.error.errorMessage,
|
|
388
|
-
});
|
|
389
|
-
}
|
|
390
|
-
});
|
|
391
|
-
}
|
|
392
|
-
/**
|
|
393
|
-
* Delete a sync configuration and optionally its associated data.
|
|
394
|
-
*
|
|
395
|
-
* Args:
|
|
396
|
-
* -----
|
|
397
|
-
* db: The database session
|
|
398
|
-
* sync_id: The ID of the sync to delete
|
|
399
|
-
* delete_data: Whether to delete the data associated with the sync
|
|
400
|
-
* user: The current user
|
|
401
|
-
*
|
|
402
|
-
* Returns:
|
|
403
|
-
* --------
|
|
404
|
-
* sync (schemas.Sync): The deleted sync
|
|
405
|
-
*
|
|
406
|
-
* @param {string} syncId
|
|
407
|
-
* @param {AirweaveSDK.DeleteSyncSyncSyncIdDeleteRequest} request
|
|
408
|
-
* @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
|
|
409
|
-
*
|
|
410
|
-
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
411
|
-
*
|
|
412
|
-
* @example
|
|
413
|
-
* await client.sync.deleteSync("sync_id")
|
|
414
|
-
*/
|
|
415
|
-
deleteSync(syncId_1) {
|
|
416
|
-
return __awaiter(this, arguments, void 0, function* (syncId, request = {}, requestOptions) {
|
|
417
|
-
var _a;
|
|
418
|
-
const { deleteData } = request;
|
|
419
|
-
const _queryParams = {};
|
|
420
|
-
if (deleteData != null) {
|
|
421
|
-
_queryParams["delete_data"] = deleteData.toString();
|
|
422
|
-
}
|
|
423
|
-
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, `sync/${encodeURIComponent(syncId)}`),
|
|
425
|
-
method: "DELETE",
|
|
426
|
-
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
427
|
-
? 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.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),
|
|
429
|
-
contentType: "application/json",
|
|
430
|
-
queryParameters: _queryParams,
|
|
431
|
-
requestType: "json",
|
|
432
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
433
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
434
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
435
|
-
});
|
|
436
|
-
if (_response.ok) {
|
|
437
|
-
return serializers.Sync.parseOrThrow(_response.body, {
|
|
438
|
-
unrecognizedObjectKeys: "passthrough",
|
|
439
|
-
allowUnrecognizedUnionMembers: true,
|
|
440
|
-
allowUnrecognizedEnumValues: true,
|
|
441
|
-
breadcrumbsPrefix: ["response"],
|
|
442
|
-
});
|
|
443
|
-
}
|
|
444
|
-
if (_response.error.reason === "status-code") {
|
|
445
|
-
switch (_response.error.statusCode) {
|
|
446
|
-
case 422:
|
|
447
|
-
throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
448
|
-
unrecognizedObjectKeys: "passthrough",
|
|
449
|
-
allowUnrecognizedUnionMembers: true,
|
|
450
|
-
allowUnrecognizedEnumValues: true,
|
|
451
|
-
breadcrumbsPrefix: ["response"],
|
|
452
|
-
}));
|
|
453
|
-
default:
|
|
454
|
-
throw new errors.AirweaveSDKError({
|
|
455
|
-
statusCode: _response.error.statusCode,
|
|
456
|
-
body: _response.error.body,
|
|
457
|
-
});
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
switch (_response.error.reason) {
|
|
461
|
-
case "non-json":
|
|
462
|
-
throw new errors.AirweaveSDKError({
|
|
463
|
-
statusCode: _response.error.statusCode,
|
|
464
|
-
body: _response.error.rawBody,
|
|
465
|
-
});
|
|
466
|
-
case "timeout":
|
|
467
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling DELETE /sync/{sync_id}.");
|
|
468
|
-
case "unknown":
|
|
469
|
-
throw new errors.AirweaveSDKError({
|
|
470
|
-
message: _response.error.errorMessage,
|
|
471
|
-
});
|
|
472
|
-
}
|
|
473
|
-
});
|
|
474
|
-
}
|
|
475
|
-
/**
|
|
476
|
-
* Update a sync configuration.
|
|
477
|
-
*
|
|
478
|
-
* Args:
|
|
479
|
-
* -----
|
|
480
|
-
* db: The database session
|
|
481
|
-
* sync_id: The ID of the sync to update
|
|
482
|
-
* sync_update: The sync update data
|
|
483
|
-
* user: The current user
|
|
484
|
-
*
|
|
485
|
-
* Returns:
|
|
486
|
-
* --------
|
|
487
|
-
* sync (schemas.Sync): The updated sync
|
|
488
|
-
*
|
|
489
|
-
* @param {string} syncId
|
|
490
|
-
* @param {AirweaveSDK.SyncUpdate} request
|
|
491
|
-
* @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
|
|
492
|
-
*
|
|
493
|
-
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
494
|
-
*
|
|
495
|
-
* @example
|
|
496
|
-
* await client.sync.updateSync("sync_id")
|
|
497
|
-
*/
|
|
498
|
-
updateSync(syncId_1) {
|
|
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) {
|
|
576
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
577
|
-
var _a;
|
|
578
|
-
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, `sync/${encodeURIComponent(syncId)}/run`),
|
|
580
|
-
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
|
|
657
|
-
? 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.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),
|
|
659
|
-
contentType: "application/json",
|
|
660
|
-
requestType: "json",
|
|
661
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
662
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
663
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
664
|
-
});
|
|
665
|
-
if (_response.ok) {
|
|
666
|
-
return serializers.sync.listSyncJobs.Response.parseOrThrow(_response.body, {
|
|
667
|
-
unrecognizedObjectKeys: "passthrough",
|
|
668
|
-
allowUnrecognizedUnionMembers: true,
|
|
669
|
-
allowUnrecognizedEnumValues: true,
|
|
670
|
-
breadcrumbsPrefix: ["response"],
|
|
671
|
-
});
|
|
672
|
-
}
|
|
673
|
-
if (_response.error.reason === "status-code") {
|
|
674
|
-
switch (_response.error.statusCode) {
|
|
675
|
-
case 422:
|
|
676
|
-
throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
677
|
-
unrecognizedObjectKeys: "passthrough",
|
|
678
|
-
allowUnrecognizedUnionMembers: true,
|
|
679
|
-
allowUnrecognizedEnumValues: true,
|
|
680
|
-
breadcrumbsPrefix: ["response"],
|
|
681
|
-
}));
|
|
682
|
-
default:
|
|
683
|
-
throw new errors.AirweaveSDKError({
|
|
684
|
-
statusCode: _response.error.statusCode,
|
|
685
|
-
body: _response.error.body,
|
|
686
|
-
});
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
switch (_response.error.reason) {
|
|
690
|
-
case "non-json":
|
|
691
|
-
throw new errors.AirweaveSDKError({
|
|
692
|
-
statusCode: _response.error.statusCode,
|
|
693
|
-
body: _response.error.rawBody,
|
|
694
|
-
});
|
|
695
|
-
case "timeout":
|
|
696
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /sync/{sync_id}/jobs.");
|
|
697
|
-
case "unknown":
|
|
698
|
-
throw new errors.AirweaveSDKError({
|
|
699
|
-
message: _response.error.errorMessage,
|
|
700
|
-
});
|
|
701
|
-
}
|
|
702
|
-
});
|
|
703
|
-
}
|
|
704
|
-
/**
|
|
705
|
-
* Get details of a specific sync job.
|
|
706
|
-
*
|
|
707
|
-
* Args:
|
|
708
|
-
* -----
|
|
709
|
-
* db: The database session
|
|
710
|
-
* sync_id: The ID of the sync to list jobs for
|
|
711
|
-
* job_id: The ID of the job to get
|
|
712
|
-
* user: The current user
|
|
713
|
-
*
|
|
714
|
-
* Returns:
|
|
715
|
-
* --------
|
|
716
|
-
* sync_job (schemas.SyncJob): The sync job
|
|
717
|
-
*
|
|
718
|
-
* @param {string} syncId
|
|
719
|
-
* @param {string} jobId
|
|
720
|
-
* @param {Sync.RequestOptions} requestOptions - Request-specific configuration.
|
|
721
|
-
*
|
|
722
|
-
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
723
|
-
*
|
|
724
|
-
* @example
|
|
725
|
-
* await client.sync.getSyncJob("sync_id", "job_id")
|
|
726
|
-
*/
|
|
727
|
-
getSyncJob(syncId, jobId, requestOptions) {
|
|
728
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
729
|
-
var _a;
|
|
730
|
-
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, `sync/${encodeURIComponent(syncId)}/job/${encodeURIComponent(jobId)}`),
|
|
732
|
-
method: "GET",
|
|
733
|
-
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
734
|
-
? 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.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),
|
|
736
|
-
contentType: "application/json",
|
|
737
|
-
requestType: "json",
|
|
738
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
739
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
740
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
741
|
-
});
|
|
742
|
-
if (_response.ok) {
|
|
743
|
-
return serializers.SyncJob.parseOrThrow(_response.body, {
|
|
744
|
-
unrecognizedObjectKeys: "passthrough",
|
|
745
|
-
allowUnrecognizedUnionMembers: true,
|
|
746
|
-
allowUnrecognizedEnumValues: true,
|
|
747
|
-
breadcrumbsPrefix: ["response"],
|
|
748
|
-
});
|
|
749
|
-
}
|
|
750
|
-
if (_response.error.reason === "status-code") {
|
|
751
|
-
switch (_response.error.statusCode) {
|
|
752
|
-
case 422:
|
|
753
|
-
throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
754
|
-
unrecognizedObjectKeys: "passthrough",
|
|
755
|
-
allowUnrecognizedUnionMembers: true,
|
|
756
|
-
allowUnrecognizedEnumValues: true,
|
|
757
|
-
breadcrumbsPrefix: ["response"],
|
|
758
|
-
}));
|
|
759
|
-
default:
|
|
760
|
-
throw new errors.AirweaveSDKError({
|
|
761
|
-
statusCode: _response.error.statusCode,
|
|
762
|
-
body: _response.error.body,
|
|
763
|
-
});
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
switch (_response.error.reason) {
|
|
767
|
-
case "non-json":
|
|
768
|
-
throw new errors.AirweaveSDKError({
|
|
769
|
-
statusCode: _response.error.statusCode,
|
|
770
|
-
body: _response.error.rawBody,
|
|
771
|
-
});
|
|
772
|
-
case "timeout":
|
|
773
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /sync/{sync_id}/job/{job_id}.");
|
|
774
|
-
case "unknown":
|
|
775
|
-
throw new errors.AirweaveSDKError({
|
|
776
|
-
message: _response.error.errorMessage,
|
|
777
|
-
});
|
|
778
|
-
}
|
|
779
|
-
});
|
|
780
|
-
}
|
|
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) {
|
|
802
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
803
|
-
var _a;
|
|
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
|
-
}
|
|
913
|
-
});
|
|
914
|
-
}
|
|
915
|
-
}
|
|
916
|
-
exports.Sync = Sync;
|