@airweave/sdk 0.6.0 → 0.6.26
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/README.md +14 -3
- package/dist/cjs/Client.d.ts +4 -8
- package/dist/cjs/Client.js +6 -16
- package/dist/cjs/api/resources/collections/client/Client.d.ts +14 -27
- package/dist/cjs/api/resources/collections/client/Client.js +37 -85
- package/dist/cjs/api/resources/collections/client/requests/ListCollectionsGetRequest.d.ts +6 -7
- package/dist/cjs/api/resources/collections/client/requests/SearchCollectionsReadableIdSearchGetRequest.d.ts +10 -16
- package/dist/cjs/api/resources/collections/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/index.d.ts +0 -4
- package/dist/cjs/api/resources/index.js +1 -5
- package/dist/cjs/api/resources/sourceConnections/client/Client.d.ts +60 -80
- package/dist/cjs/api/resources/sourceConnections/client/Client.js +104 -157
- package/dist/cjs/api/resources/sourceConnections/client/requests/GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest.d.ts +12 -0
- package/dist/cjs/api/resources/sourceConnections/client/requests/ListSourceConnectionsGetRequest.d.ts +6 -10
- package/dist/cjs/api/resources/sourceConnections/client/requests/SourceConnectionCreate.d.ts +21 -20
- package/dist/cjs/api/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.ts +7 -18
- package/dist/cjs/api/resources/sourceConnections/client/requests/index.d.ts +1 -2
- package/dist/cjs/api/resources/sources/client/Client.d.ts +17 -17
- package/dist/cjs/api/resources/sources/client/Client.js +24 -20
- package/dist/cjs/api/types/ActionCheckRequest.d.ts +10 -0
- package/dist/cjs/api/types/ActionCheckResponse.d.ts +3 -16
- package/dist/cjs/api/types/ActionCheckResponse.js +0 -8
- package/dist/cjs/api/types/AuthProvider.d.ts +0 -2
- package/dist/cjs/api/types/AuthProviderAuthentication.d.ts +12 -0
- package/dist/cjs/api/types/AuthProviderConnection.d.ts +2 -0
- package/dist/cjs/api/{resources/authProviders/client/requests → types}/AuthProviderConnectionCreate.d.ts +2 -10
- package/dist/cjs/api/types/AuthenticationDetails.d.ts +19 -0
- package/dist/cjs/api/types/AuthenticationMethod.d.ts +14 -0
- package/dist/cjs/api/types/AuthenticationMethod.js +13 -0
- package/dist/cjs/api/{resources/collections/client/requests → types}/CollectionUpdate.d.ts +4 -4
- package/dist/cjs/api/types/Destination.d.ts +0 -2
- package/dist/cjs/api/types/DestinationWithAuthenticationFields.d.ts +0 -1
- package/dist/cjs/api/types/DirectAuthentication.d.ts +10 -0
- package/dist/cjs/api/types/EmbeddingModel.d.ts +0 -2
- package/dist/cjs/api/types/EmbeddingModelWithAuthenticationFields.d.ts +0 -1
- package/dist/cjs/api/types/EntityCountWithDefinition.d.ts +1 -0
- package/dist/cjs/api/types/EntitySummary.d.ts +11 -0
- package/dist/cjs/api/types/EntityTypeStats.d.ts +10 -0
- package/dist/cjs/api/types/FieldCondition.d.ts +3 -3
- package/dist/cjs/api/types/IntegrationCredentialInDb.d.ts +2 -1
- package/dist/cjs/api/types/IntegrationCredentialRawCreate.d.ts +2 -1
- package/dist/cjs/api/types/MatchPhrase.d.ts +10 -0
- package/dist/cjs/api/types/OAuthBrowserAuthentication.d.ts +14 -0
- package/dist/cjs/api/types/OAuthTokenAuthentication.d.ts +14 -0
- package/dist/cjs/api/types/OAuthType.d.ts +12 -0
- package/dist/cjs/api/types/OAuthType.js +11 -0
- package/dist/cjs/api/types/ScheduleConfig.d.ts +14 -0
- package/dist/cjs/api/types/ScheduleDetails.d.ts +13 -0
- package/dist/cjs/api/types/SingleActionCheckResponse.d.ts +23 -0
- package/dist/cjs/api/types/SingleActionCheckResponse.js +13 -0
- package/dist/cjs/api/types/Source.d.ts +13 -9
- package/dist/cjs/api/types/SourceConnection.d.ts +9 -52
- package/dist/cjs/api/types/SourceConnectionJob.d.ts +9 -34
- package/dist/cjs/api/types/SourceConnectionListItem.d.ts +8 -16
- package/dist/cjs/api/types/SourceConnectionStatus.d.ts +7 -4
- package/dist/cjs/api/types/SourceConnectionStatus.js +5 -2
- package/dist/cjs/api/types/SubscriptionInfo.d.ts +12 -0
- package/dist/cjs/api/types/Sync.d.ts +0 -1
- package/dist/cjs/api/types/SyncCreate.d.ts +0 -1
- package/dist/cjs/api/types/SyncDetails.d.ts +13 -0
- package/dist/cjs/api/types/SyncJobDetails.d.ts +20 -0
- package/dist/cjs/api/types/SyncJobStatus.d.ts +3 -2
- package/dist/cjs/api/types/SyncJobStatus.js +2 -1
- package/dist/cjs/api/types/SyncUpdate.d.ts +0 -1
- package/dist/cjs/api/types/SyncWithSourceConnection.d.ts +0 -1
- package/dist/cjs/api/types/UpdatePlanRequest.d.ts +2 -0
- package/dist/cjs/api/types/UsageSnapshot.d.ts +4 -8
- package/dist/cjs/api/types/index.d.ts +18 -10
- package/dist/cjs/api/types/index.js +18 -10
- package/dist/cjs/core/fetcher/EndpointMetadata.d.ts +13 -0
- package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +12 -0
- package/dist/cjs/core/fetcher/EndpointSupplier.js +22 -0
- package/dist/cjs/core/fetcher/Fetcher.d.ts +5 -3
- package/dist/cjs/core/fetcher/Fetcher.js +4 -3
- package/dist/cjs/core/fetcher/index.d.ts +7 -5
- package/dist/cjs/core/fetcher/index.js +7 -5
- package/dist/cjs/core/fetcher/requestWithRetries.js +44 -8
- package/dist/cjs/core/headers.d.ts +2 -3
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +4 -8
- package/dist/esm/Client.mjs +2 -12
- package/dist/esm/api/resources/collections/client/Client.d.mts +14 -27
- package/dist/esm/api/resources/collections/client/Client.mjs +37 -85
- package/dist/esm/api/resources/collections/client/requests/ListCollectionsGetRequest.d.mts +6 -7
- package/dist/esm/api/resources/collections/client/requests/SearchCollectionsReadableIdSearchGetRequest.d.mts +10 -16
- package/dist/esm/api/resources/collections/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/index.d.mts +0 -4
- package/dist/esm/api/resources/index.mjs +0 -4
- package/dist/esm/api/resources/sourceConnections/client/Client.d.mts +60 -80
- package/dist/esm/api/resources/sourceConnections/client/Client.mjs +104 -157
- package/dist/esm/api/resources/sourceConnections/client/requests/GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest.d.mts +12 -0
- package/dist/esm/api/resources/sourceConnections/client/requests/ListSourceConnectionsGetRequest.d.mts +6 -10
- package/dist/esm/api/resources/sourceConnections/client/requests/SourceConnectionCreate.d.mts +21 -20
- package/dist/esm/api/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.mts +7 -18
- package/dist/esm/api/resources/sourceConnections/client/requests/index.d.mts +1 -2
- package/dist/esm/api/resources/sources/client/Client.d.mts +17 -17
- package/dist/esm/api/resources/sources/client/Client.mjs +24 -20
- package/dist/esm/api/types/ActionCheckRequest.d.mts +10 -0
- package/dist/esm/api/types/ActionCheckResponse.d.mts +3 -16
- package/dist/esm/api/types/ActionCheckResponse.mjs +1 -7
- package/dist/esm/api/types/AuthProvider.d.mts +0 -2
- package/dist/esm/api/types/AuthProviderAuthentication.d.mts +12 -0
- package/dist/esm/api/types/AuthProviderConnection.d.mts +2 -0
- package/dist/esm/api/{resources/authProviders/client/requests → types}/AuthProviderConnectionCreate.d.mts +2 -10
- package/dist/esm/api/types/AuthenticationDetails.d.mts +19 -0
- package/dist/esm/api/types/AuthenticationMethod.d.mts +14 -0
- package/dist/esm/api/types/AuthenticationMethod.mjs +10 -0
- package/dist/esm/api/{resources/collections/client/requests → types}/CollectionUpdate.d.mts +4 -4
- package/dist/esm/api/types/Destination.d.mts +0 -2
- package/dist/esm/api/types/DestinationWithAuthenticationFields.d.mts +0 -1
- package/dist/esm/api/types/DirectAuthentication.d.mts +10 -0
- package/dist/esm/api/types/EmbeddingModel.d.mts +0 -2
- package/dist/esm/api/types/EmbeddingModelWithAuthenticationFields.d.mts +0 -1
- package/dist/esm/api/types/EntityCountWithDefinition.d.mts +1 -0
- package/dist/esm/api/types/EntitySummary.d.mts +11 -0
- package/dist/esm/api/types/EntityTypeStats.d.mts +10 -0
- package/dist/esm/api/types/FieldCondition.d.mts +3 -3
- package/dist/esm/api/types/IntegrationCredentialInDb.d.mts +2 -1
- package/dist/esm/api/types/IntegrationCredentialRawCreate.d.mts +2 -1
- package/dist/esm/api/types/MatchPhrase.d.mts +10 -0
- package/dist/esm/api/types/OAuthBrowserAuthentication.d.mts +14 -0
- package/dist/esm/api/types/OAuthTokenAuthentication.d.mts +14 -0
- package/dist/esm/api/types/OAuthType.d.mts +12 -0
- package/dist/esm/api/types/OAuthType.mjs +8 -0
- package/dist/esm/api/types/ScheduleConfig.d.mts +14 -0
- package/dist/esm/api/types/ScheduleDetails.d.mts +13 -0
- package/dist/esm/api/types/SingleActionCheckResponse.d.mts +23 -0
- package/dist/esm/api/types/SingleActionCheckResponse.mjs +10 -0
- package/dist/esm/api/types/Source.d.mts +13 -9
- package/dist/esm/api/types/SourceConnection.d.mts +9 -52
- package/dist/esm/api/types/SourceConnectionJob.d.mts +9 -34
- package/dist/esm/api/types/SourceConnectionListItem.d.mts +8 -16
- package/dist/esm/api/types/SourceConnectionStatus.d.mts +7 -4
- package/dist/esm/api/types/SourceConnectionStatus.mjs +5 -2
- package/dist/esm/api/types/SubscriptionInfo.d.mts +12 -0
- package/dist/esm/api/types/Sync.d.mts +0 -1
- package/dist/esm/api/types/SyncCreate.d.mts +0 -1
- package/dist/esm/api/types/SyncDetails.d.mts +13 -0
- package/dist/esm/api/types/SyncJobDetails.d.mts +20 -0
- package/dist/esm/api/types/SyncJobStatus.d.mts +3 -2
- package/dist/esm/api/types/SyncJobStatus.mjs +2 -1
- package/dist/esm/api/types/SyncUpdate.d.mts +0 -1
- package/dist/esm/api/types/SyncWithSourceConnection.d.mts +0 -1
- package/dist/esm/api/types/UpdatePlanRequest.d.mts +2 -0
- package/dist/esm/api/types/UsageSnapshot.d.mts +4 -8
- package/dist/esm/api/types/index.d.mts +18 -10
- package/dist/esm/api/types/index.mjs +18 -10
- package/dist/esm/core/fetcher/EndpointMetadata.d.mts +13 -0
- package/dist/esm/core/fetcher/EndpointSupplier.d.mts +12 -0
- package/dist/esm/core/fetcher/EndpointSupplier.mjs +19 -0
- package/dist/esm/core/fetcher/Fetcher.d.mts +5 -3
- package/dist/esm/core/fetcher/Fetcher.mjs +4 -3
- package/dist/esm/core/fetcher/index.d.mts +7 -5
- package/dist/esm/core/fetcher/index.mjs +3 -2
- package/dist/esm/core/fetcher/requestWithRetries.mjs +44 -8
- package/dist/esm/core/headers.d.mts +2 -3
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +8 -13
- package/reference.md +218 -1092
- package/dist/cjs/api/resources/authProviders/client/Client.d.ts +0 -90
- package/dist/cjs/api/resources/authProviders/client/Client.js +0 -213
- package/dist/cjs/api/resources/authProviders/client/index.d.ts +0 -2
- package/dist/cjs/api/resources/authProviders/client/index.js +0 -17
- package/dist/cjs/api/resources/authProviders/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/authProviders/index.d.ts +0 -1
- package/dist/cjs/api/resources/authProviders/index.js +0 -17
- package/dist/cjs/api/resources/sourceConnections/client/requests/BodyRunSourceConnectionsSourceConnectionIdRunPost.d.ts +0 -11
- package/dist/cjs/api/resources/sourceConnections/client/requests/GetSourceConnectionsSourceConnectionIdGetRequest.d.ts +0 -13
- package/dist/cjs/api/resources/whiteLabels/client/Client.d.ts +0 -189
- package/dist/cjs/api/resources/whiteLabels/client/Client.js +0 -585
- package/dist/cjs/api/resources/whiteLabels/client/index.d.ts +0 -2
- package/dist/cjs/api/resources/whiteLabels/client/index.js +0 -17
- package/dist/cjs/api/resources/whiteLabels/client/requests/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.d.ts +0 -16
- package/dist/cjs/api/resources/whiteLabels/client/requests/WhiteLabelCreate.d.ts +0 -28
- package/dist/cjs/api/resources/whiteLabels/client/requests/WhiteLabelUpdate.d.ts +0 -23
- package/dist/cjs/api/resources/whiteLabels/client/requests/index.d.ts +0 -3
- package/dist/cjs/api/resources/whiteLabels/client/requests/index.js +0 -2
- package/dist/cjs/api/resources/whiteLabels/index.d.ts +0 -1
- package/dist/cjs/api/resources/whiteLabels/index.js +0 -17
- package/dist/cjs/api/types/AuthType.d.ts +0 -27
- package/dist/cjs/api/types/AuthType.js +0 -16
- package/dist/cjs/api/types/BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.d.ts +0 -13
- package/dist/cjs/api/types/CancelSubscriptionRequest.d.ts +0 -11
- package/dist/cjs/api/types/OAuth2AuthUrl.d.ts +0 -13
- package/dist/cjs/api/types/SourceConnectionContinuousResponse.d.ts +0 -67
- package/dist/cjs/api/types/SourceConnectionCreateContinuous.d.ts +0 -33
- package/dist/cjs/api/types/SourceConnectionCreateWithCredential.d.ts +0 -25
- package/dist/cjs/api/types/SourceConnectionCreateWithWhiteLabel.d.ts +0 -29
- package/dist/cjs/api/types/SourceConnectionMakeContinuous.d.ts +0 -14
- package/dist/cjs/api/types/WhiteLabel.d.ts +0 -32
- package/dist/esm/api/resources/authProviders/client/Client.d.mts +0 -90
- package/dist/esm/api/resources/authProviders/client/Client.mjs +0 -176
- package/dist/esm/api/resources/authProviders/client/index.d.mts +0 -2
- package/dist/esm/api/resources/authProviders/client/index.mjs +0 -1
- package/dist/esm/api/resources/authProviders/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/authProviders/index.d.mts +0 -1
- package/dist/esm/api/resources/authProviders/index.mjs +0 -1
- package/dist/esm/api/resources/sourceConnections/client/requests/BodyRunSourceConnectionsSourceConnectionIdRunPost.d.mts +0 -11
- package/dist/esm/api/resources/sourceConnections/client/requests/GetSourceConnectionsSourceConnectionIdGetRequest.d.mts +0 -13
- package/dist/esm/api/resources/whiteLabels/client/Client.d.mts +0 -189
- package/dist/esm/api/resources/whiteLabels/client/Client.mjs +0 -548
- package/dist/esm/api/resources/whiteLabels/client/index.d.mts +0 -2
- package/dist/esm/api/resources/whiteLabels/client/index.mjs +0 -1
- package/dist/esm/api/resources/whiteLabels/client/requests/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.d.mts +0 -16
- package/dist/esm/api/resources/whiteLabels/client/requests/WhiteLabelCreate.d.mts +0 -28
- package/dist/esm/api/resources/whiteLabels/client/requests/WhiteLabelUpdate.d.mts +0 -23
- package/dist/esm/api/resources/whiteLabels/client/requests/index.d.mts +0 -3
- package/dist/esm/api/resources/whiteLabels/client/requests/index.mjs +0 -1
- package/dist/esm/api/resources/whiteLabels/index.d.mts +0 -1
- package/dist/esm/api/resources/whiteLabels/index.mjs +0 -1
- package/dist/esm/api/types/AuthType.d.mts +0 -27
- package/dist/esm/api/types/AuthType.mjs +0 -13
- package/dist/esm/api/types/BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.d.mts +0 -13
- package/dist/esm/api/types/CancelSubscriptionRequest.d.mts +0 -11
- package/dist/esm/api/types/OAuth2AuthUrl.d.mts +0 -13
- package/dist/esm/api/types/SourceConnectionContinuousResponse.d.mts +0 -67
- package/dist/esm/api/types/SourceConnectionCreateContinuous.d.mts +0 -33
- package/dist/esm/api/types/SourceConnectionCreateWithCredential.d.mts +0 -25
- package/dist/esm/api/types/SourceConnectionCreateWithWhiteLabel.d.mts +0 -29
- package/dist/esm/api/types/SourceConnectionMakeContinuous.d.mts +0 -14
- package/dist/esm/api/types/WhiteLabel.d.mts +0 -32
- /package/dist/cjs/api/resources/{authProviders/client/requests/AuthProviderConnectionCreate.js → sourceConnections/client/requests/GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest.js} +0 -0
- /package/dist/cjs/api/{resources/collections/client/requests/CollectionUpdate.js → types/ActionCheckRequest.js} +0 -0
- /package/dist/cjs/api/{resources/sourceConnections/client/requests/BodyRunSourceConnectionsSourceConnectionIdRunPost.js → types/AuthProviderAuthentication.js} +0 -0
- /package/dist/cjs/api/{resources/sourceConnections/client/requests/GetSourceConnectionsSourceConnectionIdGetRequest.js → types/AuthProviderConnectionCreate.js} +0 -0
- /package/dist/cjs/api/{resources/whiteLabels/client/requests/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.js → types/AuthenticationDetails.js} +0 -0
- /package/dist/cjs/api/{resources/whiteLabels/client/requests/WhiteLabelCreate.js → types/CollectionUpdate.js} +0 -0
- /package/dist/cjs/api/{resources/whiteLabels/client/requests/WhiteLabelUpdate.js → types/DirectAuthentication.js} +0 -0
- /package/dist/cjs/api/types/{BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.js → EntitySummary.js} +0 -0
- /package/dist/cjs/api/types/{CancelSubscriptionRequest.js → EntityTypeStats.js} +0 -0
- /package/dist/cjs/api/types/{OAuth2AuthUrl.js → MatchPhrase.js} +0 -0
- /package/dist/cjs/api/types/{SourceConnectionContinuousResponse.js → OAuthBrowserAuthentication.js} +0 -0
- /package/dist/cjs/api/types/{SourceConnectionCreateContinuous.js → OAuthTokenAuthentication.js} +0 -0
- /package/dist/cjs/api/types/{SourceConnectionCreateWithCredential.js → ScheduleConfig.js} +0 -0
- /package/dist/cjs/api/types/{SourceConnectionCreateWithWhiteLabel.js → ScheduleDetails.js} +0 -0
- /package/dist/cjs/api/types/{SourceConnectionMakeContinuous.js → SyncDetails.js} +0 -0
- /package/dist/cjs/api/types/{WhiteLabel.js → SyncJobDetails.js} +0 -0
- /package/dist/cjs/{api/resources/authProviders/client/requests/index.js → core/fetcher/EndpointMetadata.js} +0 -0
- /package/dist/esm/api/resources/{authProviders/client/requests/AuthProviderConnectionCreate.mjs → sourceConnections/client/requests/GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest.mjs} +0 -0
- /package/dist/esm/api/{resources/collections/client/requests/CollectionUpdate.mjs → types/ActionCheckRequest.mjs} +0 -0
- /package/dist/esm/api/{resources/sourceConnections/client/requests/BodyRunSourceConnectionsSourceConnectionIdRunPost.mjs → types/AuthProviderAuthentication.mjs} +0 -0
- /package/dist/esm/api/{resources/sourceConnections/client/requests/GetSourceConnectionsSourceConnectionIdGetRequest.mjs → types/AuthProviderConnectionCreate.mjs} +0 -0
- /package/dist/esm/api/{resources/whiteLabels/client/requests/BodyExchangeWhiteLabelOauth2CodeWhiteLabelsWhiteLabelIdOauth2CodeOptions.mjs → types/AuthenticationDetails.mjs} +0 -0
- /package/dist/esm/api/{resources/whiteLabels/client/requests/WhiteLabelCreate.mjs → types/CollectionUpdate.mjs} +0 -0
- /package/dist/esm/api/{resources/whiteLabels/client/requests/WhiteLabelUpdate.mjs → types/DirectAuthentication.mjs} +0 -0
- /package/dist/esm/api/types/{BodyCreateCredentialsFromAuthorizationCodeSourceConnectionsSourceShortNameCodeToTokenCredentialsPost.mjs → EntitySummary.mjs} +0 -0
- /package/dist/esm/api/types/{CancelSubscriptionRequest.mjs → EntityTypeStats.mjs} +0 -0
- /package/dist/esm/api/types/{OAuth2AuthUrl.mjs → MatchPhrase.mjs} +0 -0
- /package/dist/esm/api/types/{SourceConnectionContinuousResponse.mjs → OAuthBrowserAuthentication.mjs} +0 -0
- /package/dist/esm/api/types/{SourceConnectionCreateContinuous.mjs → OAuthTokenAuthentication.mjs} +0 -0
- /package/dist/esm/api/types/{SourceConnectionCreateWithCredential.mjs → ScheduleConfig.mjs} +0 -0
- /package/dist/esm/api/types/{SourceConnectionCreateWithWhiteLabel.mjs → ScheduleDetails.mjs} +0 -0
- /package/dist/esm/api/types/{SourceConnectionMakeContinuous.mjs → SyncDetails.mjs} +0 -0
- /package/dist/esm/api/types/{WhiteLabel.mjs → SyncJobDetails.mjs} +0 -0
- /package/dist/esm/{api/resources/authProviders/client/requests/index.mjs → core/fetcher/EndpointMetadata.mjs} +0 -0
|
@@ -59,12 +59,7 @@ class SourceConnections {
|
|
|
59
59
|
this._options = _options;
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
|
-
* List source connections
|
|
63
|
-
*
|
|
64
|
-
* By default, returns ALL source connections from every collection in your
|
|
65
|
-
* organization. Use the 'collection' parameter to filter results to a specific
|
|
66
|
-
* collection. This is useful for getting an overview of all your data sources
|
|
67
|
-
* or managing connections within a particular collection.
|
|
62
|
+
* List source connections with minimal fields for performance.
|
|
68
63
|
*
|
|
69
64
|
* @param {AirweaveSDK.ListSourceConnectionsGetRequest} request
|
|
70
65
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -72,7 +67,11 @@ class SourceConnections {
|
|
|
72
67
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
73
68
|
*
|
|
74
69
|
* @example
|
|
75
|
-
* await client.sourceConnections.list(
|
|
70
|
+
* await client.sourceConnections.list({
|
|
71
|
+
* collection: "collection",
|
|
72
|
+
* skip: 1,
|
|
73
|
+
* limit: 1
|
|
74
|
+
* })
|
|
76
75
|
*/
|
|
77
76
|
list(request = {}, requestOptions) {
|
|
78
77
|
return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
|
|
@@ -91,11 +90,12 @@ class SourceConnections {
|
|
|
91
90
|
if (limit != null) {
|
|
92
91
|
_queryParams["limit"] = limit.toString();
|
|
93
92
|
}
|
|
93
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
94
94
|
const _response = yield core.fetcher({
|
|
95
|
-
url: core.url.join((
|
|
95
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, "source-connections"),
|
|
96
96
|
method: "GET",
|
|
97
|
-
headers:
|
|
98
|
-
queryParameters: _queryParams,
|
|
97
|
+
headers: _headers,
|
|
98
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
99
99
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
100
100
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
101
101
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -136,20 +136,20 @@ class SourceConnections {
|
|
|
136
136
|
});
|
|
137
137
|
}
|
|
138
138
|
/**
|
|
139
|
-
* Create a new source connection
|
|
139
|
+
* Create a new source connection.
|
|
140
140
|
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
141
|
+
* The authentication configuration determines the flow:
|
|
142
|
+
* - DirectAuthentication: Immediate creation with provided credentials
|
|
143
|
+
* - OAuthBrowserAuthentication: Returns shell with authentication URL
|
|
144
|
+
* - OAuthTokenAuthentication: Immediate creation with provided token
|
|
145
|
+
* - AuthProviderAuthentication: Using external auth provider
|
|
145
146
|
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
* If they are not valid, the data synchronization will fail.<br/><br/>
|
|
147
|
+
* BYOC (Bring Your Own Client) is detected when client_id and client_secret
|
|
148
|
+
* are provided in OAuthBrowserAuthentication.
|
|
149
149
|
*
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
*
|
|
150
|
+
* sync_immediately defaults:
|
|
151
|
+
* - True for: direct, oauth_token, auth_provider
|
|
152
|
+
* - False for: oauth_browser, oauth_byoc (these sync after authentication)
|
|
153
153
|
*
|
|
154
154
|
* @param {AirweaveSDK.SourceConnectionCreate} request
|
|
155
155
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -158,8 +158,8 @@ class SourceConnections {
|
|
|
158
158
|
*
|
|
159
159
|
* @example
|
|
160
160
|
* await client.sourceConnections.create({
|
|
161
|
-
*
|
|
162
|
-
*
|
|
161
|
+
* short_name: "short_name",
|
|
162
|
+
* readable_collection_id: "readable_collection_id"
|
|
163
163
|
* })
|
|
164
164
|
*/
|
|
165
165
|
create(request, requestOptions) {
|
|
@@ -168,11 +168,13 @@ class SourceConnections {
|
|
|
168
168
|
__create(request, requestOptions) {
|
|
169
169
|
return __awaiter(this, void 0, void 0, function* () {
|
|
170
170
|
var _a, _b, _c;
|
|
171
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
171
172
|
const _response = yield core.fetcher({
|
|
172
|
-
url: core.url.join((
|
|
173
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, "source-connections"),
|
|
173
174
|
method: "POST",
|
|
174
|
-
headers:
|
|
175
|
+
headers: _headers,
|
|
175
176
|
contentType: "application/json",
|
|
177
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
176
178
|
requestType: "json",
|
|
177
179
|
body: request,
|
|
178
180
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -212,10 +214,9 @@ class SourceConnections {
|
|
|
212
214
|
});
|
|
213
215
|
}
|
|
214
216
|
/**
|
|
215
|
-
*
|
|
217
|
+
* Get a source connection with optional depth expansion.
|
|
216
218
|
*
|
|
217
|
-
* @param {string} sourceConnectionId
|
|
218
|
-
* @param {AirweaveSDK.GetSourceConnectionsSourceConnectionIdGetRequest} request
|
|
219
|
+
* @param {string} sourceConnectionId
|
|
219
220
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
220
221
|
*
|
|
221
222
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
@@ -223,22 +224,18 @@ class SourceConnections {
|
|
|
223
224
|
* @example
|
|
224
225
|
* await client.sourceConnections.get("source_connection_id")
|
|
225
226
|
*/
|
|
226
|
-
get(sourceConnectionId,
|
|
227
|
-
return core.HttpResponsePromise.fromPromise(this.__get(sourceConnectionId,
|
|
227
|
+
get(sourceConnectionId, requestOptions) {
|
|
228
|
+
return core.HttpResponsePromise.fromPromise(this.__get(sourceConnectionId, requestOptions));
|
|
228
229
|
}
|
|
229
|
-
__get(
|
|
230
|
-
return __awaiter(this,
|
|
230
|
+
__get(sourceConnectionId, requestOptions) {
|
|
231
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
231
232
|
var _a, _b, _c;
|
|
232
|
-
|
|
233
|
-
const _queryParams = {};
|
|
234
|
-
if (showAuthFields != null) {
|
|
235
|
-
_queryParams["show_auth_fields"] = showAuthFields.toString();
|
|
236
|
-
}
|
|
233
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
237
234
|
const _response = yield core.fetcher({
|
|
238
|
-
url: core.url.join((
|
|
235
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
|
|
239
236
|
method: "GET",
|
|
240
|
-
headers:
|
|
241
|
-
queryParameters:
|
|
237
|
+
headers: _headers,
|
|
238
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
242
239
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
243
240
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
244
241
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -276,77 +273,9 @@ class SourceConnections {
|
|
|
276
273
|
});
|
|
277
274
|
}
|
|
278
275
|
/**
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
* Modify the configuration of an existing source connection including its name,
|
|
282
|
-
* authentication credentials, configuration fields, sync schedule, or source-specific settings.
|
|
283
|
-
*
|
|
284
|
-
* @param {string} sourceConnectionId - The unique identifier of the source connection to update
|
|
285
|
-
* @param {AirweaveSDK.SourceConnectionUpdate} request
|
|
286
|
-
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
287
|
-
*
|
|
288
|
-
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
289
|
-
*
|
|
290
|
-
* @example
|
|
291
|
-
* await client.sourceConnections.update("source_connection_id")
|
|
292
|
-
*/
|
|
293
|
-
update(sourceConnectionId, request = {}, requestOptions) {
|
|
294
|
-
return core.HttpResponsePromise.fromPromise(this.__update(sourceConnectionId, request, requestOptions));
|
|
295
|
-
}
|
|
296
|
-
__update(sourceConnectionId_1) {
|
|
297
|
-
return __awaiter(this, arguments, void 0, function* (sourceConnectionId, request = {}, requestOptions) {
|
|
298
|
-
var _a, _b, _c;
|
|
299
|
-
const _response = yield core.fetcher({
|
|
300
|
-
url: core.url.join((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
|
|
301
|
-
method: "PUT",
|
|
302
|
-
headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
303
|
-
contentType: "application/json",
|
|
304
|
-
requestType: "json",
|
|
305
|
-
body: request,
|
|
306
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
307
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
308
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
309
|
-
});
|
|
310
|
-
if (_response.ok) {
|
|
311
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
312
|
-
}
|
|
313
|
-
if (_response.error.reason === "status-code") {
|
|
314
|
-
switch (_response.error.statusCode) {
|
|
315
|
-
case 422:
|
|
316
|
-
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
317
|
-
default:
|
|
318
|
-
throw new errors.AirweaveSDKError({
|
|
319
|
-
statusCode: _response.error.statusCode,
|
|
320
|
-
body: _response.error.body,
|
|
321
|
-
rawResponse: _response.rawResponse,
|
|
322
|
-
});
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
switch (_response.error.reason) {
|
|
326
|
-
case "non-json":
|
|
327
|
-
throw new errors.AirweaveSDKError({
|
|
328
|
-
statusCode: _response.error.statusCode,
|
|
329
|
-
body: _response.error.rawBody,
|
|
330
|
-
rawResponse: _response.rawResponse,
|
|
331
|
-
});
|
|
332
|
-
case "timeout":
|
|
333
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling PUT /source-connections/{source_connection_id}.");
|
|
334
|
-
case "unknown":
|
|
335
|
-
throw new errors.AirweaveSDKError({
|
|
336
|
-
message: _response.error.errorMessage,
|
|
337
|
-
rawResponse: _response.rawResponse,
|
|
338
|
-
});
|
|
339
|
-
}
|
|
340
|
-
});
|
|
341
|
-
}
|
|
342
|
-
/**
|
|
343
|
-
* Delete a source connection and all associated data.
|
|
344
|
-
*
|
|
345
|
-
* Permanently removes the source connection configuration and credentials.
|
|
346
|
-
* By default, previously synced data remains in your destination systems for continuity.
|
|
347
|
-
* Use delete_data=true to also remove all associated data from destination systems.
|
|
276
|
+
* Delete a source connection and all related data.
|
|
348
277
|
*
|
|
349
|
-
* @param {string} sourceConnectionId
|
|
278
|
+
* @param {string} sourceConnectionId
|
|
350
279
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
351
280
|
*
|
|
352
281
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
@@ -360,10 +289,12 @@ class SourceConnections {
|
|
|
360
289
|
__delete(sourceConnectionId, requestOptions) {
|
|
361
290
|
return __awaiter(this, void 0, void 0, function* () {
|
|
362
291
|
var _a, _b, _c;
|
|
292
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
363
293
|
const _response = yield core.fetcher({
|
|
364
|
-
url: core.url.join((
|
|
294
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
|
|
365
295
|
method: "DELETE",
|
|
366
|
-
headers:
|
|
296
|
+
headers: _headers,
|
|
297
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
367
298
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
368
299
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
369
300
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -401,32 +332,36 @@ class SourceConnections {
|
|
|
401
332
|
});
|
|
402
333
|
}
|
|
403
334
|
/**
|
|
404
|
-
*
|
|
335
|
+
* Update a source connection.
|
|
405
336
|
*
|
|
406
|
-
*
|
|
407
|
-
*
|
|
408
|
-
*
|
|
337
|
+
* Updateable fields:
|
|
338
|
+
* - name, description
|
|
339
|
+
* - config_fields
|
|
340
|
+
* - cron_schedule
|
|
341
|
+
* - auth_fields (direct auth only)
|
|
409
342
|
*
|
|
410
|
-
* @param {string} sourceConnectionId
|
|
411
|
-
* @param {AirweaveSDK.
|
|
343
|
+
* @param {string} sourceConnectionId
|
|
344
|
+
* @param {AirweaveSDK.SourceConnectionUpdate} request
|
|
412
345
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
413
346
|
*
|
|
414
347
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
415
348
|
*
|
|
416
349
|
* @example
|
|
417
|
-
* await client.sourceConnections.
|
|
350
|
+
* await client.sourceConnections.update("source_connection_id")
|
|
418
351
|
*/
|
|
419
|
-
|
|
420
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
352
|
+
update(sourceConnectionId, request = {}, requestOptions) {
|
|
353
|
+
return core.HttpResponsePromise.fromPromise(this.__update(sourceConnectionId, request, requestOptions));
|
|
421
354
|
}
|
|
422
|
-
|
|
355
|
+
__update(sourceConnectionId_1) {
|
|
423
356
|
return __awaiter(this, arguments, void 0, function* (sourceConnectionId, request = {}, requestOptions) {
|
|
424
357
|
var _a, _b, _c;
|
|
358
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
425
359
|
const _response = yield core.fetcher({
|
|
426
|
-
url: core.url.join((
|
|
427
|
-
method: "
|
|
428
|
-
headers:
|
|
360
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
|
|
361
|
+
method: "PATCH",
|
|
362
|
+
headers: _headers,
|
|
429
363
|
contentType: "application/json",
|
|
364
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
430
365
|
requestType: "json",
|
|
431
366
|
body: request,
|
|
432
367
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -456,7 +391,7 @@ class SourceConnections {
|
|
|
456
391
|
rawResponse: _response.rawResponse,
|
|
457
392
|
});
|
|
458
393
|
case "timeout":
|
|
459
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling
|
|
394
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling PATCH /source-connections/{source_connection_id}.");
|
|
460
395
|
case "unknown":
|
|
461
396
|
throw new errors.AirweaveSDKError({
|
|
462
397
|
message: _response.error.errorMessage,
|
|
@@ -466,29 +401,30 @@ class SourceConnections {
|
|
|
466
401
|
});
|
|
467
402
|
}
|
|
468
403
|
/**
|
|
469
|
-
*
|
|
404
|
+
* Trigger a sync run for a source connection.
|
|
470
405
|
*
|
|
471
|
-
*
|
|
472
|
-
* failed attempts, and currently running operations.
|
|
406
|
+
* Runs are always executed through Temporal workflow engine.
|
|
473
407
|
*
|
|
474
|
-
* @param {string} sourceConnectionId
|
|
408
|
+
* @param {string} sourceConnectionId
|
|
475
409
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
476
410
|
*
|
|
477
411
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
478
412
|
*
|
|
479
413
|
* @example
|
|
480
|
-
* await client.sourceConnections.
|
|
414
|
+
* await client.sourceConnections.run("source_connection_id")
|
|
481
415
|
*/
|
|
482
|
-
|
|
483
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
416
|
+
run(sourceConnectionId, requestOptions) {
|
|
417
|
+
return core.HttpResponsePromise.fromPromise(this.__run(sourceConnectionId, requestOptions));
|
|
484
418
|
}
|
|
485
|
-
|
|
419
|
+
__run(sourceConnectionId, requestOptions) {
|
|
486
420
|
return __awaiter(this, void 0, void 0, function* () {
|
|
487
421
|
var _a, _b, _c;
|
|
422
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
488
423
|
const _response = yield core.fetcher({
|
|
489
|
-
url: core.url.join((
|
|
490
|
-
method: "
|
|
491
|
-
headers:
|
|
424
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}/run`),
|
|
425
|
+
method: "POST",
|
|
426
|
+
headers: _headers,
|
|
427
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
492
428
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
493
429
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
494
430
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -516,7 +452,7 @@ class SourceConnections {
|
|
|
516
452
|
rawResponse: _response.rawResponse,
|
|
517
453
|
});
|
|
518
454
|
case "timeout":
|
|
519
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling
|
|
455
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /source-connections/{source_connection_id}/run.");
|
|
520
456
|
case "unknown":
|
|
521
457
|
throw new errors.AirweaveSDKError({
|
|
522
458
|
message: _response.error.errorMessage,
|
|
@@ -526,27 +462,36 @@ class SourceConnections {
|
|
|
526
462
|
});
|
|
527
463
|
}
|
|
528
464
|
/**
|
|
529
|
-
* Get
|
|
465
|
+
* Get sync jobs for a source connection.
|
|
530
466
|
*
|
|
531
|
-
* @param {string} sourceConnectionId
|
|
532
|
-
* @param {
|
|
467
|
+
* @param {string} sourceConnectionId
|
|
468
|
+
* @param {AirweaveSDK.GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest} request
|
|
533
469
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
534
470
|
*
|
|
535
471
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
536
472
|
*
|
|
537
473
|
* @example
|
|
538
|
-
* await client.sourceConnections.
|
|
474
|
+
* await client.sourceConnections.getSourceConnectionJobs("source_connection_id", {
|
|
475
|
+
* limit: 1
|
|
476
|
+
* })
|
|
539
477
|
*/
|
|
540
|
-
|
|
541
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
478
|
+
getSourceConnectionJobs(sourceConnectionId, request = {}, requestOptions) {
|
|
479
|
+
return core.HttpResponsePromise.fromPromise(this.__getSourceConnectionJobs(sourceConnectionId, request, requestOptions));
|
|
542
480
|
}
|
|
543
|
-
|
|
544
|
-
return __awaiter(this,
|
|
481
|
+
__getSourceConnectionJobs(sourceConnectionId_1) {
|
|
482
|
+
return __awaiter(this, arguments, void 0, function* (sourceConnectionId, request = {}, requestOptions) {
|
|
545
483
|
var _a, _b, _c;
|
|
484
|
+
const { limit } = request;
|
|
485
|
+
const _queryParams = {};
|
|
486
|
+
if (limit != null) {
|
|
487
|
+
_queryParams["limit"] = limit.toString();
|
|
488
|
+
}
|
|
489
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
546
490
|
const _response = yield core.fetcher({
|
|
547
|
-
url: core.url.join((
|
|
491
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}/jobs`),
|
|
548
492
|
method: "GET",
|
|
549
|
-
headers:
|
|
493
|
+
headers: _headers,
|
|
494
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
550
495
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
551
496
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
552
497
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -574,7 +519,7 @@ class SourceConnections {
|
|
|
574
519
|
rawResponse: _response.rawResponse,
|
|
575
520
|
});
|
|
576
521
|
case "timeout":
|
|
577
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /source-connections/{source_connection_id}/jobs
|
|
522
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /source-connections/{source_connection_id}/jobs.");
|
|
578
523
|
case "unknown":
|
|
579
524
|
throw new errors.AirweaveSDKError({
|
|
580
525
|
message: _response.error.errorMessage,
|
|
@@ -584,14 +529,14 @@ class SourceConnections {
|
|
|
584
529
|
});
|
|
585
530
|
}
|
|
586
531
|
/**
|
|
587
|
-
* Cancel a running sync job.
|
|
532
|
+
* Cancel a running sync job for a source connection.
|
|
588
533
|
*
|
|
589
|
-
*
|
|
590
|
-
* The
|
|
591
|
-
*
|
|
534
|
+
* This endpoint requests cancellation and marks the job as CANCELLING.
|
|
535
|
+
* The workflow updates the final status to CANCELLED when it processes
|
|
536
|
+
* the cancellation request.
|
|
592
537
|
*
|
|
593
|
-
* @param {string} sourceConnectionId
|
|
594
|
-
* @param {string} jobId
|
|
538
|
+
* @param {string} sourceConnectionId
|
|
539
|
+
* @param {string} jobId
|
|
595
540
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
596
541
|
*
|
|
597
542
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
@@ -605,10 +550,12 @@ class SourceConnections {
|
|
|
605
550
|
__cancelJob(sourceConnectionId, jobId, requestOptions) {
|
|
606
551
|
return __awaiter(this, void 0, void 0, function* () {
|
|
607
552
|
var _a, _b, _c;
|
|
553
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
608
554
|
const _response = yield core.fetcher({
|
|
609
|
-
url: core.url.join((
|
|
555
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}/jobs/${encodeURIComponent(jobId)}/cancel`),
|
|
610
556
|
method: "POST",
|
|
611
|
-
headers:
|
|
557
|
+
headers: _headers,
|
|
558
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
612
559
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
613
560
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
614
561
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -3,19 +3,15 @@
|
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* @example
|
|
6
|
-
* {
|
|
6
|
+
* {
|
|
7
|
+
* collection: "collection",
|
|
8
|
+
* skip: 1,
|
|
9
|
+
* limit: 1
|
|
10
|
+
* }
|
|
7
11
|
*/
|
|
8
12
|
export interface ListSourceConnectionsGetRequest {
|
|
9
|
-
/**
|
|
10
|
-
* Filter source connections by collection readable ID
|
|
11
|
-
*/
|
|
13
|
+
/** Filter by collection readable ID */
|
|
12
14
|
collection?: string;
|
|
13
|
-
/**
|
|
14
|
-
* Number of source connections to skip for pagination
|
|
15
|
-
*/
|
|
16
15
|
skip?: number;
|
|
17
|
-
/**
|
|
18
|
-
* Maximum number of source connections to return (1-1000)
|
|
19
|
-
*/
|
|
20
16
|
limit?: number;
|
|
21
17
|
}
|
package/dist/cjs/api/resources/sourceConnections/client/requests/SourceConnectionCreate.d.ts
CHANGED
|
@@ -5,29 +5,30 @@ import * as AirweaveSDK from "../../../../index.js";
|
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
7
|
* {
|
|
8
|
-
*
|
|
9
|
-
*
|
|
8
|
+
* short_name: "short_name",
|
|
9
|
+
* readable_collection_id: "readable_collection_id"
|
|
10
10
|
* }
|
|
11
11
|
*/
|
|
12
12
|
export interface SourceConnectionCreate {
|
|
13
|
-
/**
|
|
14
|
-
name
|
|
15
|
-
/**
|
|
16
|
-
description?: string;
|
|
17
|
-
/** Source-specific configuration parameters required for data extraction. These vary by source type and control how data is retrieved (e.g., database queries, API filters, file paths). Check the documentation of a specific source (for example [Github](https://docs.airweave.ai/docs/connectors/github)) to see what is required. */
|
|
18
|
-
config_fields?: AirweaveSDK.ConfigValues;
|
|
19
|
-
/** Technical identifier of the source type that determines which connector to use for data synchronization. */
|
|
13
|
+
/** Connection name (defaults to '{Source Name} Connection') */
|
|
14
|
+
name?: string;
|
|
15
|
+
/** Source identifier (e.g., 'slack', 'github') */
|
|
20
16
|
short_name: string;
|
|
21
|
-
/**
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
auth_provider
|
|
29
|
-
/** Configuration for the auth provider when using auth_provider field. Required fields vary by auth provider. For Composio, use auth_config_id and account_id to specify which integration and account from Composio you want to use to connect to the source. */
|
|
30
|
-
auth_provider_config?: AirweaveSDK.ConfigValues;
|
|
31
|
-
/** Whether to start an initial data synchronization immediately after creating the connection. */
|
|
17
|
+
/** Collection readable ID */
|
|
18
|
+
readable_collection_id: string;
|
|
19
|
+
/** Connection description */
|
|
20
|
+
description?: string;
|
|
21
|
+
/** Source-specific configuration */
|
|
22
|
+
config?: Record<string, unknown>;
|
|
23
|
+
schedule?: AirweaveSDK.ScheduleConfig;
|
|
24
|
+
/** Run initial sync after creation. Defaults to True for direct/token/auth_provider, False for OAuth browser/BYOC flows (which sync after authentication) */
|
|
32
25
|
sync_immediately?: boolean;
|
|
26
|
+
/** Authentication config (defaults to OAuth browser flow for OAuth sources) */
|
|
27
|
+
authentication?: SourceConnectionCreate.Authentication;
|
|
28
|
+
}
|
|
29
|
+
export declare namespace SourceConnectionCreate {
|
|
30
|
+
/**
|
|
31
|
+
* Authentication config (defaults to OAuth browser flow for OAuth sources)
|
|
32
|
+
*/
|
|
33
|
+
type Authentication = AirweaveSDK.DirectAuthentication | AirweaveSDK.OAuthTokenAuthentication | AirweaveSDK.OAuthBrowserAuthentication | AirweaveSDK.AuthProviderAuthentication;
|
|
33
34
|
}
|
package/dist/cjs/api/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.ts
CHANGED
|
@@ -7,28 +7,17 @@ import * as AirweaveSDK from "../../../../index.js";
|
|
|
7
7
|
* {}
|
|
8
8
|
*/
|
|
9
9
|
export interface SourceConnectionUpdate {
|
|
10
|
-
/** Updated name for the source connection. Must be between 4 and 42 characters. */
|
|
11
10
|
name?: string;
|
|
12
|
-
/** Updated description of what this source connection provides. */
|
|
13
11
|
description?: string;
|
|
14
|
-
/**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
cron_schedule?: string;
|
|
20
|
-
/** Internal connection identifier. This is typically managed automatically and should not be modified manually. */
|
|
21
|
-
connection_id?: string;
|
|
22
|
-
/** ID of the white label integration. Used for custom OAuth integrations with your own branding. */
|
|
23
|
-
white_label_id?: string;
|
|
24
|
-
/** Updated auth provider readable ID. Only relevant if the connection uses an auth provider. */
|
|
25
|
-
auth_provider?: string;
|
|
26
|
-
/** Updated configuration for the auth provider. Only relevant if the connection uses an auth provider. */
|
|
27
|
-
auth_provider_config?: Record<string, unknown>;
|
|
12
|
+
/** Source-specific configuration */
|
|
13
|
+
config?: Record<string, unknown>;
|
|
14
|
+
schedule?: AirweaveSDK.ScheduleConfig;
|
|
15
|
+
/** Authentication config (defaults to OAuth browser flow for OAuth sources) */
|
|
16
|
+
authentication?: SourceConnectionUpdate.Authentication;
|
|
28
17
|
}
|
|
29
18
|
export declare namespace SourceConnectionUpdate {
|
|
30
19
|
/**
|
|
31
|
-
*
|
|
20
|
+
* Authentication config (defaults to OAuth browser flow for OAuth sources)
|
|
32
21
|
*/
|
|
33
|
-
type
|
|
22
|
+
type Authentication = AirweaveSDK.DirectAuthentication | AirweaveSDK.OAuthTokenAuthentication | AirweaveSDK.OAuthBrowserAuthentication | AirweaveSDK.AuthProviderAuthentication;
|
|
34
23
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { type ListSourceConnectionsGetRequest } from "./ListSourceConnectionsGetRequest.js";
|
|
2
2
|
export { type SourceConnectionCreate } from "./SourceConnectionCreate.js";
|
|
3
|
-
export { type GetSourceConnectionsSourceConnectionIdGetRequest } from "./GetSourceConnectionsSourceConnectionIdGetRequest.js";
|
|
4
3
|
export { type SourceConnectionUpdate } from "./SourceConnectionUpdate.js";
|
|
5
|
-
export { type
|
|
4
|
+
export { type GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest } from "./GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest.js";
|