@airweave/sdk 0.2.27 → 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 +1 -8
- package/Client.js +3 -13
- package/README.md +1 -1
- package/api/index.d.ts +1 -1
- package/api/index.js +1 -1
- package/api/resources/collections/client/Client.d.ts +26 -3
- package/api/resources/collections/client/Client.js +96 -16
- package/api/resources/collections/client/requests/SearchCollectionCollectionsReadableIdSearchGetRequest.d.ts +20 -0
- package/api/resources/collections/client/requests/index.d.ts +1 -0
- package/api/resources/index.d.ts +2 -4
- package/api/resources/index.js +3 -5
- package/api/resources/sourceConnections/client/Client.d.ts +4 -4
- package/api/resources/sourceConnections/client/Client.js +22 -22
- package/api/resources/sourceConnections/client/requests/BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.d.ts +10 -0
- package/api/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.ts +2 -1
- package/api/resources/sourceConnections/client/requests/index.d.ts +1 -0
- package/api/resources/sourceConnections/index.d.ts +1 -0
- package/api/resources/sourceConnections/index.js +1 -0
- package/api/resources/sourceConnections/types/SourceConnectionUpdateAuthFields.d.ts +5 -0
- package/api/resources/sourceConnections/types/index.d.ts +1 -0
- package/api/resources/{connections → sourceConnections/types}/index.js +1 -1
- package/api/resources/sources/client/Client.d.ts +9 -14
- package/api/resources/sources/client/Client.js +13 -21
- 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/IntegrationCredentialInDb.d.ts +18 -0
- package/api/types/IntegrationCredentialRawCreate.d.ts +19 -0
- package/api/types/OAuth2AuthUrl.d.ts +13 -0
- package/api/types/Source.d.ts +4 -1
- package/api/types/SourceConnection.d.ts +2 -0
- package/api/types/SourceConnectionCreate.d.ts +2 -0
- package/api/types/SourceConnectionListItem.d.ts +1 -0
- package/api/types/Sync.d.ts +0 -2
- package/api/types/SyncCreate.d.ts +0 -2
- package/api/types/SyncJob.d.ts +1 -0
- package/api/types/SyncUpdate.d.ts +0 -2
- package/api/types/SyncWithSourceConnection.d.ts +0 -2
- 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 +7 -4
- package/api/types/index.js +7 -4
- package/core/index.d.ts +0 -1
- package/core/index.js +0 -1
- package/dist/Client.d.ts +1 -8
- package/dist/Client.js +3 -13
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +1 -1
- package/dist/api/resources/collections/client/Client.d.ts +26 -3
- package/dist/api/resources/collections/client/Client.js +96 -16
- package/dist/api/resources/collections/client/requests/SearchCollectionCollectionsReadableIdSearchGetRequest.d.ts +20 -0
- package/dist/api/resources/collections/client/requests/index.d.ts +1 -0
- package/dist/api/resources/index.d.ts +2 -4
- package/dist/api/resources/index.js +3 -5
- package/dist/api/resources/sourceConnections/client/Client.d.ts +4 -4
- package/dist/api/resources/sourceConnections/client/Client.js +22 -22
- package/dist/api/resources/sourceConnections/client/requests/BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.d.ts +10 -0
- package/dist/api/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.ts +2 -1
- package/dist/api/resources/sourceConnections/client/requests/index.d.ts +1 -0
- package/dist/api/resources/sourceConnections/index.d.ts +1 -0
- package/dist/api/resources/sourceConnections/index.js +1 -0
- package/dist/api/resources/sourceConnections/types/SourceConnectionUpdateAuthFields.d.ts +5 -0
- package/dist/api/resources/sourceConnections/types/SourceConnectionUpdateAuthFields.js +5 -0
- package/dist/api/resources/sourceConnections/types/index.d.ts +1 -0
- package/{api/resources/whiteLabels/client → dist/api/resources/sourceConnections/types}/index.js +1 -1
- package/dist/api/resources/sources/client/Client.d.ts +9 -14
- package/dist/api/resources/sources/client/Client.js +13 -21
- 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/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/Source.d.ts +4 -1
- package/dist/api/types/SourceConnection.d.ts +2 -0
- package/dist/api/types/SourceConnectionCreate.d.ts +2 -0
- package/dist/api/types/SourceConnectionListItem.d.ts +1 -0
- package/dist/api/types/Sync.d.ts +0 -2
- package/dist/api/types/SyncCreate.d.ts +0 -2
- package/dist/api/types/SyncJob.d.ts +1 -0
- package/dist/api/types/SyncUpdate.d.ts +0 -2
- package/dist/api/types/SyncWithSourceConnection.d.ts +0 -2
- 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 +7 -4
- package/dist/api/types/index.js +7 -4
- package/dist/core/index.d.ts +0 -1
- package/dist/core/index.js +0 -1
- package/dist/serialization/index.d.ts +1 -1
- package/dist/serialization/index.js +1 -1
- package/dist/serialization/resources/index.d.ts +2 -4
- package/dist/serialization/resources/index.js +3 -5
- package/dist/serialization/resources/sourceConnections/client/requests/BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.d.ts +12 -0
- package/dist/serialization/resources/{connections/client/listAllConnectedIntegrations.js → sourceConnections/client/requests/BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.js} +5 -4
- package/dist/serialization/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.ts +3 -1
- package/dist/serialization/resources/sourceConnections/client/requests/SourceConnectionUpdate.js +3 -1
- package/dist/serialization/resources/sourceConnections/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/sourceConnections/client/requests/index.js +3 -1
- package/dist/serialization/resources/sourceConnections/index.d.ts +1 -0
- package/dist/serialization/resources/sourceConnections/index.js +1 -0
- package/dist/serialization/resources/sourceConnections/types/SourceConnectionUpdateAuthFields.d.ts +11 -0
- package/dist/serialization/resources/{whiteLabels/client/listWhiteLabels.js → sourceConnections/types/SourceConnectionUpdateAuthFields.js} +3 -3
- package/dist/serialization/resources/sourceConnections/types/index.d.ts +1 -0
- package/{api/resources/whiteLabels → dist/serialization/resources/sourceConnections/types}/index.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/{BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.js → BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.js} +4 -4
- package/dist/serialization/types/IntegrationCredentialInDb.d.ts +22 -0
- package/{serialization/types/SourceWithAuthenticationFields.js → dist/serialization/types/IntegrationCredentialInDb.js} +8 -13
- package/dist/serialization/types/IntegrationCredentialRawCreate.d.ts +20 -0
- package/dist/serialization/types/{BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js → IntegrationCredentialRawCreate.js} +10 -3
- package/dist/serialization/types/OAuth2AuthUrl.d.ts +12 -0
- package/{serialization/resources/whiteLabels/client/listWhiteLabelSyncs.js → dist/serialization/types/OAuth2AuthUrl.js} +5 -4
- package/dist/serialization/types/Source.d.ts +5 -1
- package/dist/serialization/types/Source.js +5 -1
- package/dist/serialization/types/SourceConnection.d.ts +2 -0
- package/dist/serialization/types/SourceConnection.js +2 -0
- package/dist/serialization/types/SourceConnectionCreate.d.ts +2 -0
- package/dist/serialization/types/SourceConnectionCreate.js +2 -0
- package/dist/serialization/types/SourceConnectionListItem.d.ts +1 -0
- package/dist/serialization/types/SourceConnectionListItem.js +1 -0
- package/dist/serialization/types/Sync.d.ts +0 -2
- package/dist/serialization/types/Sync.js +0 -2
- package/dist/serialization/types/SyncCreate.d.ts +0 -2
- package/dist/serialization/types/SyncCreate.js +0 -2
- package/dist/serialization/types/SyncJob.d.ts +1 -0
- package/dist/serialization/types/SyncJob.js +1 -0
- package/dist/serialization/types/SyncUpdate.d.ts +0 -2
- package/dist/serialization/types/SyncUpdate.js +0 -2
- package/dist/serialization/types/SyncWithSourceConnection.d.ts +0 -2
- package/dist/serialization/types/SyncWithSourceConnection.js +0 -2
- 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/dist/serialization/{resources/whiteLabels/client/requests → types}/WhiteLabelCreate.js +2 -1
- package/dist/serialization/types/WhiteLabelUpdate.d.ts +16 -0
- package/dist/serialization/{resources/whiteLabels/client/requests → types}/WhiteLabelUpdate.js +2 -1
- package/dist/serialization/types/index.d.ts +7 -4
- package/dist/serialization/types/index.js +7 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -3
- package/reference.md +44 -543
- package/serialization/index.d.ts +1 -1
- package/serialization/index.js +1 -1
- package/serialization/resources/index.d.ts +2 -4
- package/serialization/resources/index.js +3 -5
- 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 +3 -1
- package/serialization/resources/sourceConnections/client/requests/SourceConnectionUpdate.js +3 -1
- package/serialization/resources/sourceConnections/client/requests/index.d.ts +1 -0
- package/serialization/resources/sourceConnections/client/requests/index.js +3 -1
- package/serialization/resources/sourceConnections/index.d.ts +1 -0
- package/serialization/resources/sourceConnections/index.js +1 -0
- package/serialization/resources/sourceConnections/types/SourceConnectionUpdateAuthFields.d.ts +11 -0
- package/serialization/resources/{connections/client/listAllConnectedIntegrations.js → sourceConnections/types/SourceConnectionUpdateAuthFields.js} +3 -3
- package/serialization/resources/sourceConnections/types/index.d.ts +1 -0
- package/{dist/api/resources/connections → serialization/resources/sourceConnections/types}/index.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/{BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.js → BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.js} +4 -4
- package/serialization/types/IntegrationCredentialInDb.d.ts +22 -0
- package/{dist/serialization/types/SourceWithAuthenticationFields.js → serialization/types/IntegrationCredentialInDb.js} +8 -13
- package/serialization/types/IntegrationCredentialRawCreate.d.ts +20 -0
- package/serialization/types/{BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js → IntegrationCredentialRawCreate.js} +10 -3
- package/serialization/types/OAuth2AuthUrl.d.ts +12 -0
- package/{dist/serialization/resources/whiteLabels/client/listWhiteLabelSyncs.js → serialization/types/OAuth2AuthUrl.js} +5 -4
- package/serialization/types/Source.d.ts +5 -1
- package/serialization/types/Source.js +5 -1
- package/serialization/types/SourceConnection.d.ts +2 -0
- package/serialization/types/SourceConnection.js +2 -0
- package/serialization/types/SourceConnectionCreate.d.ts +2 -0
- package/serialization/types/SourceConnectionCreate.js +2 -0
- package/serialization/types/SourceConnectionListItem.d.ts +1 -0
- package/serialization/types/SourceConnectionListItem.js +1 -0
- package/serialization/types/Sync.d.ts +0 -2
- package/serialization/types/Sync.js +0 -2
- package/serialization/types/SyncCreate.d.ts +0 -2
- package/serialization/types/SyncCreate.js +0 -2
- package/serialization/types/SyncJob.d.ts +1 -0
- package/serialization/types/SyncJob.js +1 -0
- package/serialization/types/SyncUpdate.d.ts +0 -2
- package/serialization/types/SyncUpdate.js +0 -2
- package/serialization/types/SyncWithSourceConnection.d.ts +0 -2
- package/serialization/types/SyncWithSourceConnection.js +0 -2
- package/serialization/types/WhiteLabel.d.ts +1 -0
- package/serialization/types/WhiteLabel.js +1 -0
- package/serialization/types/WhiteLabelCreate.d.ts +17 -0
- package/serialization/{resources/whiteLabels/client/requests → types}/WhiteLabelCreate.js +2 -1
- package/serialization/types/WhiteLabelUpdate.d.ts +16 -0
- package/serialization/{resources/whiteLabels/client/requests → types}/WhiteLabelUpdate.js +2 -1
- package/serialization/types/index.d.ts +7 -4
- package/serialization/types/index.js +7 -4
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/connections/client/Client.d.ts +0 -73
- package/api/resources/connections/client/Client.js +0 -216
- package/api/resources/connections/client/index.d.ts +0 -1
- package/api/resources/connections/client/index.js +0 -2
- package/api/resources/connections/index.d.ts +0 -1
- package/api/resources/whiteLabels/client/Client.d.ts +0 -169
- package/api/resources/whiteLabels/client/Client.js +0 -526
- package/api/resources/whiteLabels/client/index.d.ts +0 -1
- 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/types/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +0 -7
- package/api/types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.d.ts +0 -8
- package/api/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +0 -9
- package/api/types/SourceWithAuthenticationFields.d.ts +0 -23
- package/core/auth/BasicAuth.d.ts +0 -8
- package/core/auth/BasicAuth.js +0 -26
- package/core/auth/BearerToken.d.ts +0 -5
- package/core/auth/BearerToken.js +0 -15
- package/core/auth/index.d.ts +0 -2
- package/core/auth/index.js +0 -7
- package/dist/api/resources/connections/client/Client.d.ts +0 -73
- package/dist/api/resources/connections/client/Client.js +0 -216
- package/dist/api/resources/connections/client/index.d.ts +0 -1
- package/dist/api/resources/connections/client/index.js +0 -2
- package/dist/api/resources/connections/index.d.ts +0 -1
- package/dist/api/resources/whiteLabels/client/Client.d.ts +0 -169
- package/dist/api/resources/whiteLabels/client/Client.js +0 -526
- 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/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +0 -7
- package/dist/api/types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.d.ts +0 -8
- package/dist/api/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +0 -9
- package/dist/api/types/SourceWithAuthenticationFields.d.ts +0 -23
- package/dist/core/auth/BasicAuth.d.ts +0 -8
- package/dist/core/auth/BasicAuth.js +0 -26
- package/dist/core/auth/BearerToken.d.ts +0 -5
- package/dist/core/auth/BearerToken.js +0 -15
- package/dist/core/auth/index.d.ts +0 -2
- package/dist/core/auth/index.js +0 -7
- package/dist/serialization/resources/connections/client/index.d.ts +0 -1
- package/dist/serialization/resources/connections/client/index.js +0 -37
- package/dist/serialization/resources/connections/client/listAllConnectedIntegrations.d.ts +0 -11
- package/dist/serialization/resources/connections/index.d.ts +0 -1
- package/dist/serialization/resources/connections/index.js +0 -17
- package/dist/serialization/resources/whiteLabels/client/index.d.ts +0 -3
- package/dist/serialization/resources/whiteLabels/client/index.js +0 -42
- package/dist/serialization/resources/whiteLabels/client/listWhiteLabelSyncs.d.ts +0 -11
- package/dist/serialization/resources/whiteLabels/client/listWhiteLabels.d.ts +0 -11
- 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/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +0 -13
- package/dist/serialization/types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.d.ts +0 -14
- package/dist/serialization/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +0 -15
- package/dist/serialization/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js +0 -46
- package/dist/serialization/types/SourceWithAuthenticationFields.d.ts +0 -27
- package/serialization/resources/connections/client/index.d.ts +0 -1
- package/serialization/resources/connections/client/index.js +0 -37
- package/serialization/resources/connections/client/listAllConnectedIntegrations.d.ts +0 -11
- package/serialization/resources/connections/index.d.ts +0 -1
- package/serialization/resources/connections/index.js +0 -17
- package/serialization/resources/whiteLabels/client/index.d.ts +0 -3
- package/serialization/resources/whiteLabels/client/index.js +0 -42
- package/serialization/resources/whiteLabels/client/listWhiteLabelSyncs.d.ts +0 -11
- 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/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.d.ts +0 -13
- package/serialization/types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.d.ts +0 -14
- package/serialization/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.d.ts +0 -15
- package/serialization/types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js +0 -46
- package/serialization/types/SourceWithAuthenticationFields.d.ts +0 -27
- /package/api/resources/{whiteLabels/client/requests/WhiteLabelCreate.js → collections/client/requests/SearchCollectionCollectionsReadableIdSearchGetRequest.js} +0 -0
- /package/api/resources/{whiteLabels/client/requests/WhiteLabelUpdate.js → sourceConnections/client/requests/BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.js} +0 -0
- /package/api/{types/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js → resources/sourceConnections/types/SourceConnectionUpdateAuthFields.js} +0 -0
- /package/api/types/{BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.js → BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.js} +0 -0
- /package/api/types/{BodySendOauth2CodeConnectionsOauth2SourceCodePost.js → BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.js} +0 -0
- /package/api/types/{SourceWithAuthenticationFields.js → IntegrationCredentialInDb.js} +0 -0
- /package/{dist/api/resources/whiteLabels/client/requests/WhiteLabelCreate.js → api/types/IntegrationCredentialRawCreate.js} +0 -0
- /package/{dist/api/resources/whiteLabels/client/requests/WhiteLabelUpdate.js → api/types/OAuth2AuthUrl.js} +0 -0
- /package/{dist/api/types/BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.js → api/types/WhiteLabelCreate.js} +0 -0
- /package/{dist/api/types/BodyCreateSourceConnectionFromOauthConnectionsCreateSourceConnectionFromOauthPost.js → api/types/WhiteLabelUpdate.js} +0 -0
- /package/dist/api/{types/BodySendOauth2CodeConnectionsOauth2SourceCodePost.js → resources/collections/client/requests/SearchCollectionCollectionsReadableIdSearchGetRequest.js} +0 -0
- /package/dist/api/{types/SourceWithAuthenticationFields.js → resources/sourceConnections/client/requests/BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.js} +0 -0
package/Client.d.ts
CHANGED
|
@@ -5,13 +5,10 @@ import * as environments from "./environments";
|
|
|
5
5
|
import * as core from "./core";
|
|
6
6
|
import { Sources } from "./api/resources/sources/client/Client";
|
|
7
7
|
import { Collections } from "./api/resources/collections/client/Client";
|
|
8
|
-
import { Connections } from "./api/resources/connections/client/Client";
|
|
9
8
|
import { SourceConnections } from "./api/resources/sourceConnections/client/Client";
|
|
10
|
-
import { WhiteLabels } from "./api/resources/whiteLabels/client/Client";
|
|
11
9
|
export declare namespace AirweaveSDKClient {
|
|
12
10
|
interface Options {
|
|
13
11
|
environment?: core.Supplier<environments.AirweaveSDKEnvironment | string>;
|
|
14
|
-
token: core.Supplier<core.BearerToken>;
|
|
15
12
|
/** Override the x-api-key header */
|
|
16
13
|
apiKey?: core.Supplier<string | undefined>;
|
|
17
14
|
}
|
|
@@ -32,13 +29,9 @@ export declare class AirweaveSDKClient {
|
|
|
32
29
|
protected readonly _options: AirweaveSDKClient.Options;
|
|
33
30
|
protected _sources: Sources | undefined;
|
|
34
31
|
protected _collections: Collections | undefined;
|
|
35
|
-
protected _connections: Connections | undefined;
|
|
36
32
|
protected _sourceConnections: SourceConnections | undefined;
|
|
37
|
-
|
|
38
|
-
constructor(_options: AirweaveSDKClient.Options);
|
|
33
|
+
constructor(_options?: AirweaveSDKClient.Options);
|
|
39
34
|
get sources(): Sources;
|
|
40
35
|
get collections(): Collections;
|
|
41
|
-
get connections(): Connections;
|
|
42
36
|
get sourceConnections(): SourceConnections;
|
|
43
|
-
get whiteLabels(): WhiteLabels;
|
|
44
37
|
}
|
package/Client.js
CHANGED
|
@@ -6,11 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.AirweaveSDKClient = void 0;
|
|
7
7
|
const Client_1 = require("./api/resources/sources/client/Client");
|
|
8
8
|
const Client_2 = require("./api/resources/collections/client/Client");
|
|
9
|
-
const Client_3 = require("./api/resources/
|
|
10
|
-
const Client_4 = require("./api/resources/sourceConnections/client/Client");
|
|
11
|
-
const Client_5 = require("./api/resources/whiteLabels/client/Client");
|
|
9
|
+
const Client_3 = require("./api/resources/sourceConnections/client/Client");
|
|
12
10
|
class AirweaveSDKClient {
|
|
13
|
-
constructor(_options) {
|
|
11
|
+
constructor(_options = {}) {
|
|
14
12
|
this._options = _options;
|
|
15
13
|
}
|
|
16
14
|
get sources() {
|
|
@@ -21,17 +19,9 @@ class AirweaveSDKClient {
|
|
|
21
19
|
var _a;
|
|
22
20
|
return ((_a = this._collections) !== null && _a !== void 0 ? _a : (this._collections = new Client_2.Collections(this._options)));
|
|
23
21
|
}
|
|
24
|
-
get connections() {
|
|
25
|
-
var _a;
|
|
26
|
-
return ((_a = this._connections) !== null && _a !== void 0 ? _a : (this._connections = new Client_3.Connections(this._options)));
|
|
27
|
-
}
|
|
28
22
|
get sourceConnections() {
|
|
29
23
|
var _a;
|
|
30
|
-
return ((_a = this._sourceConnections) !== null && _a !== void 0 ? _a : (this._sourceConnections = new
|
|
31
|
-
}
|
|
32
|
-
get whiteLabels() {
|
|
33
|
-
var _a;
|
|
34
|
-
return ((_a = this._whiteLabels) !== null && _a !== void 0 ? _a : (this._whiteLabels = new Client_5.WhiteLabels(this._options)));
|
|
24
|
+
return ((_a = this._sourceConnections) !== null && _a !== void 0 ? _a : (this._sourceConnections = new Client_3.SourceConnections(this._options)));
|
|
35
25
|
}
|
|
36
26
|
}
|
|
37
27
|
exports.AirweaveSDKClient = AirweaveSDKClient;
|
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ Instantiate and use the client with the following:
|
|
|
22
22
|
```typescript
|
|
23
23
|
import { AirweaveSDKClient } from "@airweave/sdk";
|
|
24
24
|
|
|
25
|
-
const client = new AirweaveSDKClient({
|
|
25
|
+
const client = new AirweaveSDKClient({ apiKey: "YOUR_API_KEY" });
|
|
26
26
|
await client.collections.createCollection({
|
|
27
27
|
name: "name",
|
|
28
28
|
});
|
package/api/index.d.ts
CHANGED
package/api/index.js
CHANGED
|
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./resources"), exports);
|
|
17
18
|
__exportStar(require("./types"), exports);
|
|
18
19
|
__exportStar(require("./errors"), exports);
|
|
19
|
-
__exportStar(require("./resources"), exports);
|
|
@@ -7,7 +7,6 @@ import * as AirweaveSDK from "../../../index";
|
|
|
7
7
|
export declare namespace Collections {
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.AirweaveSDKEnvironment | string>;
|
|
10
|
-
token: core.Supplier<core.BearerToken>;
|
|
11
10
|
/** Override the x-api-key header */
|
|
12
11
|
apiKey?: core.Supplier<string | undefined>;
|
|
13
12
|
}
|
|
@@ -26,7 +25,7 @@ export declare namespace Collections {
|
|
|
26
25
|
}
|
|
27
26
|
export declare class Collections {
|
|
28
27
|
protected readonly _options: Collections.Options;
|
|
29
|
-
constructor(_options
|
|
28
|
+
constructor(_options?: Collections.Options);
|
|
30
29
|
/**
|
|
31
30
|
* List all collections for the current user's organization.
|
|
32
31
|
*
|
|
@@ -87,6 +86,31 @@ export declare class Collections {
|
|
|
87
86
|
* await client.collections.deleteCollection("readable_id")
|
|
88
87
|
*/
|
|
89
88
|
deleteCollection(readableId: string, request?: AirweaveSDK.DeleteCollectionCollectionsReadableIdDeleteRequest, requestOptions?: Collections.RequestOptions): Promise<AirweaveSDK.Collection>;
|
|
89
|
+
/**
|
|
90
|
+
* Search within a collection identified by readable ID.
|
|
91
|
+
*
|
|
92
|
+
* Args:
|
|
93
|
+
* readable_id: The readable ID of the collection to search
|
|
94
|
+
* query: The search query
|
|
95
|
+
* response_type: Type of response (raw results or AI completion)
|
|
96
|
+
* db: The database session
|
|
97
|
+
* current_user: The current user
|
|
98
|
+
*
|
|
99
|
+
* Returns:
|
|
100
|
+
* dict: Search results or AI completion response
|
|
101
|
+
*
|
|
102
|
+
* @param {string} readableId
|
|
103
|
+
* @param {AirweaveSDK.SearchCollectionCollectionsReadableIdSearchGetRequest} request
|
|
104
|
+
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
105
|
+
*
|
|
106
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* await client.collections.searchCollection("readable_id", {
|
|
110
|
+
* query: "query"
|
|
111
|
+
* })
|
|
112
|
+
*/
|
|
113
|
+
searchCollection(readableId: string, request: AirweaveSDK.SearchCollectionCollectionsReadableIdSearchGetRequest, requestOptions?: Collections.RequestOptions): Promise<AirweaveSDK.SearchResponse>;
|
|
90
114
|
/**
|
|
91
115
|
* Start sync jobs for all source connections in the collection.
|
|
92
116
|
*
|
|
@@ -108,5 +132,4 @@ export declare class Collections {
|
|
|
108
132
|
* await client.collections.refreshAllSourceConnections("readable_id")
|
|
109
133
|
*/
|
|
110
134
|
refreshAllSourceConnections(readableId: string, requestOptions?: Collections.RequestOptions): Promise<AirweaveSDK.SourceConnectionJob[]>;
|
|
111
|
-
protected _getAuthorizationHeader(): Promise<string>;
|
|
112
135
|
}
|
|
@@ -56,7 +56,7 @@ const url_join_1 = __importDefault(require("url-join"));
|
|
|
56
56
|
const serializers = __importStar(require("../../../../serialization/index"));
|
|
57
57
|
const errors = __importStar(require("../../../../errors/index"));
|
|
58
58
|
class Collections {
|
|
59
|
-
constructor(_options) {
|
|
59
|
+
constructor(_options = {}) {
|
|
60
60
|
this._options = _options;
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
@@ -84,9 +84,9 @@ class Collections {
|
|
|
84
84
|
const _response = yield core.fetcher({
|
|
85
85
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "collections"),
|
|
86
86
|
method: "GET",
|
|
87
|
-
headers: Object.assign({
|
|
87
|
+
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
88
88
|
? yield core.Supplier.get(this._options.apiKey)
|
|
89
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "
|
|
89
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.52", "User-Agent": "@airweave/sdk/v0.2.52", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
90
90
|
contentType: "application/json",
|
|
91
91
|
queryParameters: _queryParams,
|
|
92
92
|
requestType: "json",
|
|
@@ -152,9 +152,9 @@ class Collections {
|
|
|
152
152
|
const _response = yield core.fetcher({
|
|
153
153
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "collections"),
|
|
154
154
|
method: "POST",
|
|
155
|
-
headers: Object.assign({
|
|
155
|
+
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
156
156
|
? yield core.Supplier.get(this._options.apiKey)
|
|
157
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "
|
|
157
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.52", "User-Agent": "@airweave/sdk/v0.2.52", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
158
158
|
contentType: "application/json",
|
|
159
159
|
requestType: "json",
|
|
160
160
|
body: serializers.CollectionCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -218,9 +218,9 @@ class Collections {
|
|
|
218
218
|
const _response = yield core.fetcher({
|
|
219
219
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}`),
|
|
220
220
|
method: "GET",
|
|
221
|
-
headers: Object.assign({
|
|
221
|
+
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
222
222
|
? yield core.Supplier.get(this._options.apiKey)
|
|
223
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "
|
|
223
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.52", "User-Agent": "@airweave/sdk/v0.2.52", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
224
224
|
contentType: "application/json",
|
|
225
225
|
requestType: "json",
|
|
226
226
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -298,9 +298,9 @@ class Collections {
|
|
|
298
298
|
const _response = yield core.fetcher({
|
|
299
299
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}`),
|
|
300
300
|
method: "DELETE",
|
|
301
|
-
headers: Object.assign({
|
|
301
|
+
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
302
302
|
? yield core.Supplier.get(this._options.apiKey)
|
|
303
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "
|
|
303
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.52", "User-Agent": "@airweave/sdk/v0.2.52", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
304
304
|
contentType: "application/json",
|
|
305
305
|
queryParameters: _queryParams,
|
|
306
306
|
requestType: "json",
|
|
@@ -347,6 +347,91 @@ class Collections {
|
|
|
347
347
|
}
|
|
348
348
|
});
|
|
349
349
|
}
|
|
350
|
+
/**
|
|
351
|
+
* Search within a collection identified by readable ID.
|
|
352
|
+
*
|
|
353
|
+
* Args:
|
|
354
|
+
* readable_id: The readable ID of the collection to search
|
|
355
|
+
* query: The search query
|
|
356
|
+
* response_type: Type of response (raw results or AI completion)
|
|
357
|
+
* db: The database session
|
|
358
|
+
* current_user: The current user
|
|
359
|
+
*
|
|
360
|
+
* Returns:
|
|
361
|
+
* dict: Search results or AI completion response
|
|
362
|
+
*
|
|
363
|
+
* @param {string} readableId
|
|
364
|
+
* @param {AirweaveSDK.SearchCollectionCollectionsReadableIdSearchGetRequest} request
|
|
365
|
+
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
366
|
+
*
|
|
367
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
368
|
+
*
|
|
369
|
+
* @example
|
|
370
|
+
* await client.collections.searchCollection("readable_id", {
|
|
371
|
+
* query: "query"
|
|
372
|
+
* })
|
|
373
|
+
*/
|
|
374
|
+
searchCollection(readableId, request, requestOptions) {
|
|
375
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
376
|
+
var _a;
|
|
377
|
+
const { query, responseType } = request;
|
|
378
|
+
const _queryParams = {};
|
|
379
|
+
_queryParams["query"] = query;
|
|
380
|
+
if (responseType != null) {
|
|
381
|
+
_queryParams["response_type"] = responseType;
|
|
382
|
+
}
|
|
383
|
+
const _response = yield core.fetcher({
|
|
384
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}/search`),
|
|
385
|
+
method: "GET",
|
|
386
|
+
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
387
|
+
? yield core.Supplier.get(this._options.apiKey)
|
|
388
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.52", "User-Agent": "@airweave/sdk/v0.2.52", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
389
|
+
contentType: "application/json",
|
|
390
|
+
queryParameters: _queryParams,
|
|
391
|
+
requestType: "json",
|
|
392
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
393
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
394
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
395
|
+
});
|
|
396
|
+
if (_response.ok) {
|
|
397
|
+
return serializers.SearchResponse.parseOrThrow(_response.body, {
|
|
398
|
+
unrecognizedObjectKeys: "passthrough",
|
|
399
|
+
allowUnrecognizedUnionMembers: true,
|
|
400
|
+
allowUnrecognizedEnumValues: true,
|
|
401
|
+
breadcrumbsPrefix: ["response"],
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
if (_response.error.reason === "status-code") {
|
|
405
|
+
switch (_response.error.statusCode) {
|
|
406
|
+
case 422:
|
|
407
|
+
throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
408
|
+
unrecognizedObjectKeys: "passthrough",
|
|
409
|
+
allowUnrecognizedUnionMembers: true,
|
|
410
|
+
allowUnrecognizedEnumValues: true,
|
|
411
|
+
breadcrumbsPrefix: ["response"],
|
|
412
|
+
}));
|
|
413
|
+
default:
|
|
414
|
+
throw new errors.AirweaveSDKError({
|
|
415
|
+
statusCode: _response.error.statusCode,
|
|
416
|
+
body: _response.error.body,
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
switch (_response.error.reason) {
|
|
421
|
+
case "non-json":
|
|
422
|
+
throw new errors.AirweaveSDKError({
|
|
423
|
+
statusCode: _response.error.statusCode,
|
|
424
|
+
body: _response.error.rawBody,
|
|
425
|
+
});
|
|
426
|
+
case "timeout":
|
|
427
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /collections/{readable_id}/search.");
|
|
428
|
+
case "unknown":
|
|
429
|
+
throw new errors.AirweaveSDKError({
|
|
430
|
+
message: _response.error.errorMessage,
|
|
431
|
+
});
|
|
432
|
+
}
|
|
433
|
+
});
|
|
434
|
+
}
|
|
350
435
|
/**
|
|
351
436
|
* Start sync jobs for all source connections in the collection.
|
|
352
437
|
*
|
|
@@ -373,9 +458,9 @@ class Collections {
|
|
|
373
458
|
const _response = yield core.fetcher({
|
|
374
459
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}/refresh_all`),
|
|
375
460
|
method: "POST",
|
|
376
|
-
headers: Object.assign({
|
|
461
|
+
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
377
462
|
? yield core.Supplier.get(this._options.apiKey)
|
|
378
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "
|
|
463
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.52", "User-Agent": "@airweave/sdk/v0.2.52", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
379
464
|
contentType: "application/json",
|
|
380
465
|
requestType: "json",
|
|
381
466
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -421,10 +506,5 @@ class Collections {
|
|
|
421
506
|
}
|
|
422
507
|
});
|
|
423
508
|
}
|
|
424
|
-
_getAuthorizationHeader() {
|
|
425
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
426
|
-
return `Bearer ${yield core.Supplier.get(this._options.token)}`;
|
|
427
|
-
});
|
|
428
|
-
}
|
|
429
509
|
}
|
|
430
510
|
exports.Collections = Collections;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as AirweaveSDK from "../../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* query: "query"
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface SearchCollectionCollectionsReadableIdSearchGetRequest {
|
|
12
|
+
/**
|
|
13
|
+
* Search query
|
|
14
|
+
*/
|
|
15
|
+
query: string;
|
|
16
|
+
/**
|
|
17
|
+
* Type of response: raw search results or AI completion
|
|
18
|
+
*/
|
|
19
|
+
responseType?: AirweaveSDK.ResponseType;
|
|
20
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { type ListCollectionsCollectionsGetRequest } from "./ListCollectionsCollectionsGetRequest";
|
|
2
2
|
export { type CollectionCreate } from "./CollectionCreate";
|
|
3
3
|
export { type DeleteCollectionCollectionsReadableIdDeleteRequest } from "./DeleteCollectionCollectionsReadableIdDeleteRequest";
|
|
4
|
+
export { type SearchCollectionCollectionsReadableIdSearchGetRequest } from "./SearchCollectionCollectionsReadableIdSearchGetRequest";
|
package/api/resources/index.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
+
export * as sourceConnections from "./sourceConnections";
|
|
2
|
+
export * from "./sourceConnections/types";
|
|
1
3
|
export * as sources from "./sources";
|
|
2
4
|
export * as collections from "./collections";
|
|
3
|
-
export * as connections from "./connections";
|
|
4
|
-
export * as sourceConnections from "./sourceConnections";
|
|
5
|
-
export * as whiteLabels from "./whiteLabels";
|
|
6
5
|
export * from "./collections/client/requests";
|
|
7
6
|
export * from "./sourceConnections/client/requests";
|
|
8
|
-
export * from "./whiteLabels/client/requests";
|
package/api/resources/index.js
CHANGED
|
@@ -36,12 +36,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.collections = exports.sources = exports.sourceConnections = void 0;
|
|
40
|
+
exports.sourceConnections = __importStar(require("./sourceConnections"));
|
|
41
|
+
__exportStar(require("./sourceConnections/types"), exports);
|
|
40
42
|
exports.sources = __importStar(require("./sources"));
|
|
41
43
|
exports.collections = __importStar(require("./collections"));
|
|
42
|
-
exports.connections = __importStar(require("./connections"));
|
|
43
|
-
exports.sourceConnections = __importStar(require("./sourceConnections"));
|
|
44
|
-
exports.whiteLabels = __importStar(require("./whiteLabels"));
|
|
45
44
|
__exportStar(require("./collections/client/requests"), exports);
|
|
46
45
|
__exportStar(require("./sourceConnections/client/requests"), exports);
|
|
47
|
-
__exportStar(require("./whiteLabels/client/requests"), exports);
|
|
@@ -7,7 +7,6 @@ import * as AirweaveSDK from "../../../index";
|
|
|
7
7
|
export declare namespace SourceConnections {
|
|
8
8
|
interface Options {
|
|
9
9
|
environment?: core.Supplier<environments.AirweaveSDKEnvironment | string>;
|
|
10
|
-
token: core.Supplier<core.BearerToken>;
|
|
11
10
|
/** Override the x-api-key header */
|
|
12
11
|
apiKey?: core.Supplier<string | undefined>;
|
|
13
12
|
}
|
|
@@ -26,7 +25,7 @@ export declare namespace SourceConnections {
|
|
|
26
25
|
}
|
|
27
26
|
export declare class SourceConnections {
|
|
28
27
|
protected readonly _options: SourceConnections.Options;
|
|
29
|
-
constructor(_options
|
|
28
|
+
constructor(_options?: SourceConnections.Options);
|
|
30
29
|
/**
|
|
31
30
|
* List all source connections for the current user.
|
|
32
31
|
*
|
|
@@ -152,6 +151,7 @@ export declare class SourceConnections {
|
|
|
152
151
|
* Args:
|
|
153
152
|
* db: The database session
|
|
154
153
|
* source_connection_id: The ID of the source connection to run
|
|
154
|
+
* access_token: Optional access token to use instead of stored credentials
|
|
155
155
|
* user: The current user
|
|
156
156
|
* background_tasks: Background tasks for async operations
|
|
157
157
|
*
|
|
@@ -159,6 +159,7 @@ export declare class SourceConnections {
|
|
|
159
159
|
* The created sync job
|
|
160
160
|
*
|
|
161
161
|
* @param {string} sourceConnectionId
|
|
162
|
+
* @param {AirweaveSDK.BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost} request
|
|
162
163
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
163
164
|
*
|
|
164
165
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
@@ -166,7 +167,7 @@ export declare class SourceConnections {
|
|
|
166
167
|
* @example
|
|
167
168
|
* await client.sourceConnections.runSourceConnection("source_connection_id")
|
|
168
169
|
*/
|
|
169
|
-
runSourceConnection(sourceConnectionId: string, requestOptions?: SourceConnections.RequestOptions): Promise<AirweaveSDK.SourceConnectionJob>;
|
|
170
|
+
runSourceConnection(sourceConnectionId: string, request?: AirweaveSDK.BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost, requestOptions?: SourceConnections.RequestOptions): Promise<AirweaveSDK.SourceConnectionJob>;
|
|
170
171
|
/**
|
|
171
172
|
* List all sync jobs for a source connection.
|
|
172
173
|
*
|
|
@@ -187,5 +188,4 @@ export declare class SourceConnections {
|
|
|
187
188
|
* await client.sourceConnections.listSourceConnectionJobs("source_connection_id")
|
|
188
189
|
*/
|
|
189
190
|
listSourceConnectionJobs(sourceConnectionId: string, requestOptions?: SourceConnections.RequestOptions): Promise<AirweaveSDK.SourceConnectionJob[]>;
|
|
190
|
-
protected _getAuthorizationHeader(): Promise<string>;
|
|
191
191
|
}
|
|
@@ -56,7 +56,7 @@ const url_join_1 = __importDefault(require("url-join"));
|
|
|
56
56
|
const serializers = __importStar(require("../../../../serialization/index"));
|
|
57
57
|
const errors = __importStar(require("../../../../errors/index"));
|
|
58
58
|
class SourceConnections {
|
|
59
|
-
constructor(_options) {
|
|
59
|
+
constructor(_options = {}) {
|
|
60
60
|
this._options = _options;
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
@@ -97,9 +97,9 @@ class SourceConnections {
|
|
|
97
97
|
const _response = yield core.fetcher({
|
|
98
98
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "source-connections"),
|
|
99
99
|
method: "GET",
|
|
100
|
-
headers: Object.assign({
|
|
100
|
+
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
101
101
|
? yield core.Supplier.get(this._options.apiKey)
|
|
102
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "
|
|
102
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.52", "User-Agent": "@airweave/sdk/v0.2.52", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
103
103
|
contentType: "application/json",
|
|
104
104
|
queryParameters: _queryParams,
|
|
105
105
|
requestType: "json",
|
|
@@ -182,9 +182,9 @@ class SourceConnections {
|
|
|
182
182
|
const _response = yield core.fetcher({
|
|
183
183
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "source-connections"),
|
|
184
184
|
method: "POST",
|
|
185
|
-
headers: Object.assign({
|
|
185
|
+
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
186
186
|
? yield core.Supplier.get(this._options.apiKey)
|
|
187
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "
|
|
187
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.52", "User-Agent": "@airweave/sdk/v0.2.52", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
188
188
|
contentType: "application/json",
|
|
189
189
|
requestType: "json",
|
|
190
190
|
body: serializers.SourceConnectionCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -263,9 +263,9 @@ class SourceConnections {
|
|
|
263
263
|
const _response = yield core.fetcher({
|
|
264
264
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
|
|
265
265
|
method: "GET",
|
|
266
|
-
headers: Object.assign({
|
|
266
|
+
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
267
267
|
? yield core.Supplier.get(this._options.apiKey)
|
|
268
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "
|
|
268
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.52", "User-Agent": "@airweave/sdk/v0.2.52", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
269
269
|
contentType: "application/json",
|
|
270
270
|
queryParameters: _queryParams,
|
|
271
271
|
requestType: "json",
|
|
@@ -339,9 +339,9 @@ class SourceConnections {
|
|
|
339
339
|
const _response = yield core.fetcher({
|
|
340
340
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
|
|
341
341
|
method: "PUT",
|
|
342
|
-
headers: Object.assign({
|
|
342
|
+
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
343
343
|
? yield core.Supplier.get(this._options.apiKey)
|
|
344
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "
|
|
344
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.52", "User-Agent": "@airweave/sdk/v0.2.52", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
345
345
|
contentType: "application/json",
|
|
346
346
|
requestType: "json",
|
|
347
347
|
body: serializers.SourceConnectionUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -420,9 +420,9 @@ class SourceConnections {
|
|
|
420
420
|
const _response = yield core.fetcher({
|
|
421
421
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
|
|
422
422
|
method: "DELETE",
|
|
423
|
-
headers: Object.assign({
|
|
423
|
+
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
424
424
|
? yield core.Supplier.get(this._options.apiKey)
|
|
425
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "
|
|
425
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.52", "User-Agent": "@airweave/sdk/v0.2.52", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
426
426
|
contentType: "application/json",
|
|
427
427
|
queryParameters: _queryParams,
|
|
428
428
|
requestType: "json",
|
|
@@ -475,6 +475,7 @@ class SourceConnections {
|
|
|
475
475
|
* Args:
|
|
476
476
|
* db: The database session
|
|
477
477
|
* source_connection_id: The ID of the source connection to run
|
|
478
|
+
* access_token: Optional access token to use instead of stored credentials
|
|
478
479
|
* user: The current user
|
|
479
480
|
* background_tasks: Background tasks for async operations
|
|
480
481
|
*
|
|
@@ -482,6 +483,7 @@ class SourceConnections {
|
|
|
482
483
|
* The created sync job
|
|
483
484
|
*
|
|
484
485
|
* @param {string} sourceConnectionId
|
|
486
|
+
* @param {AirweaveSDK.BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost} request
|
|
485
487
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
486
488
|
*
|
|
487
489
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
@@ -489,17 +491,20 @@ class SourceConnections {
|
|
|
489
491
|
* @example
|
|
490
492
|
* await client.sourceConnections.runSourceConnection("source_connection_id")
|
|
491
493
|
*/
|
|
492
|
-
runSourceConnection(
|
|
493
|
-
return __awaiter(this,
|
|
494
|
+
runSourceConnection(sourceConnectionId_1) {
|
|
495
|
+
return __awaiter(this, arguments, void 0, function* (sourceConnectionId, request = {}, requestOptions) {
|
|
494
496
|
var _a;
|
|
495
497
|
const _response = yield core.fetcher({
|
|
496
498
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}/run`),
|
|
497
499
|
method: "POST",
|
|
498
|
-
headers: Object.assign({
|
|
500
|
+
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
499
501
|
? yield core.Supplier.get(this._options.apiKey)
|
|
500
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "
|
|
502
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.52", "User-Agent": "@airweave/sdk/v0.2.52", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
501
503
|
contentType: "application/json",
|
|
502
504
|
requestType: "json",
|
|
505
|
+
body: serializers.BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.jsonOrThrow(request, {
|
|
506
|
+
unrecognizedObjectKeys: "strip",
|
|
507
|
+
}),
|
|
503
508
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
504
509
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
505
510
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -568,9 +573,9 @@ class SourceConnections {
|
|
|
568
573
|
const _response = yield core.fetcher({
|
|
569
574
|
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}/jobs`),
|
|
570
575
|
method: "GET",
|
|
571
|
-
headers: Object.assign({
|
|
576
|
+
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
572
577
|
? yield core.Supplier.get(this._options.apiKey)
|
|
573
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "
|
|
578
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.2.52", "User-Agent": "@airweave/sdk/v0.2.52", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
574
579
|
contentType: "application/json",
|
|
575
580
|
requestType: "json",
|
|
576
581
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -616,10 +621,5 @@ class SourceConnections {
|
|
|
616
621
|
}
|
|
617
622
|
});
|
|
618
623
|
}
|
|
619
|
-
_getAuthorizationHeader() {
|
|
620
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
621
|
-
return `Bearer ${yield core.Supplier.get(this._options.token)}`;
|
|
622
|
-
});
|
|
623
|
-
}
|
|
624
624
|
}
|
|
625
625
|
exports.SourceConnections = SourceConnections;
|
|
@@ -10,8 +10,9 @@ export interface SourceConnectionUpdate {
|
|
|
10
10
|
/** Name of the source connection */
|
|
11
11
|
name?: string;
|
|
12
12
|
description?: string;
|
|
13
|
-
authFields?: AirweaveSDK.
|
|
13
|
+
authFields?: AirweaveSDK.SourceConnectionUpdateAuthFields;
|
|
14
14
|
configFields?: AirweaveSDK.ConfigValues;
|
|
15
15
|
cronSchedule?: string;
|
|
16
16
|
connectionId?: string;
|
|
17
|
+
whiteLabelId?: string;
|
|
17
18
|
}
|
|
@@ -2,3 +2,4 @@ export { type ListSourceConnectionsSourceConnectionsGetRequest } from "./ListSou
|
|
|
2
2
|
export { type GetSourceConnectionSourceConnectionsSourceConnectionIdGetRequest } from "./GetSourceConnectionSourceConnectionsSourceConnectionIdGetRequest";
|
|
3
3
|
export { type SourceConnectionUpdate } from "./SourceConnectionUpdate";
|
|
4
4
|
export { type DeleteSourceConnectionSourceConnectionsSourceConnectionIdDeleteRequest } from "./DeleteSourceConnectionSourceConnectionsSourceConnectionIdDeleteRequest";
|
|
5
|
+
export { type BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost } from "./BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost";
|
|
@@ -14,4 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types"), exports);
|
|
17
18
|
__exportStar(require("./client"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./SourceConnectionUpdateAuthFields";
|
|
@@ -14,4 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./SourceConnectionUpdateAuthFields"), exports);
|