@airweave/sdk 0.7.20 → 0.8.76
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 +1 -5
- package/dist/cjs/Client.d.ts +3 -8
- package/dist/cjs/Client.js +7 -4
- package/dist/cjs/api/errors/ConflictError.d.ts +9 -0
- package/dist/cjs/api/errors/ConflictError.js +52 -0
- package/dist/cjs/api/errors/NotFoundError.d.ts +9 -0
- package/dist/cjs/api/errors/NotFoundError.js +52 -0
- package/dist/cjs/api/errors/TooManyRequestsError.d.ts +9 -0
- package/dist/cjs/api/errors/TooManyRequestsError.js +52 -0
- package/dist/cjs/api/errors/UnprocessableEntityError.d.ts +1 -2
- package/dist/cjs/api/errors/index.d.ts +3 -0
- package/dist/cjs/api/errors/index.js +3 -0
- package/dist/cjs/api/resources/collections/client/Client.d.ts +107 -42
- package/dist/cjs/api/resources/collections/client/Client.js +205 -58
- package/dist/cjs/api/resources/collections/client/requests/CollectionCreate.d.ts +3 -0
- package/dist/cjs/api/resources/collections/client/requests/CollectionUpdate.d.ts +16 -0
- package/dist/cjs/api/resources/collections/client/requests/ListCollectionsGetRequest.d.ts +4 -4
- package/dist/cjs/api/resources/collections/client/requests/SearchGetLegacyCollectionsReadableIdSearchGetRequest.d.ts +4 -4
- package/dist/cjs/api/resources/collections/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/collections/types/index.d.ts +0 -1
- package/dist/cjs/api/resources/collections/types/index.js +0 -1
- package/dist/cjs/api/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/index.js +3 -1
- package/dist/cjs/api/resources/sourceConnections/client/Client.d.ts +96 -62
- package/dist/cjs/api/resources/sourceConnections/client/Client.js +152 -78
- package/dist/cjs/api/resources/sourceConnections/client/requests/GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest.d.ts +2 -1
- package/dist/cjs/api/resources/sourceConnections/client/requests/ListSourceConnectionsGetRequest.d.ts +4 -2
- package/dist/cjs/api/resources/sourceConnections/client/requests/RunSourceConnectionsSourceConnectionIdRunPostRequest.d.ts +2 -2
- package/dist/cjs/api/resources/sourceConnections/client/requests/SourceConnectionCreate.d.ts +10 -9
- package/dist/cjs/api/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.ts +6 -3
- package/dist/cjs/api/resources/sources/client/Client.d.ts +24 -13
- package/dist/cjs/api/resources/sources/client/Client.js +36 -11
- package/dist/cjs/api/resources/webhooks/client/Client.d.ts +231 -0
- package/dist/cjs/api/resources/webhooks/client/Client.js +689 -0
- package/dist/cjs/api/resources/webhooks/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/webhooks/client/index.js +17 -0
- package/dist/cjs/api/resources/webhooks/client/requests/CreateSubscriptionRequest.d.ts +19 -0
- package/dist/cjs/api/resources/webhooks/client/requests/GetMessageWebhooksMessagesMessageIdGetRequest.d.ts +13 -0
- package/dist/cjs/api/resources/webhooks/client/requests/GetMessagesWebhooksMessagesGetRequest.d.ts +11 -0
- package/dist/cjs/api/resources/webhooks/client/requests/GetSubscriptionWebhooksSubscriptionsSubscriptionIdGetRequest.d.ts +13 -0
- package/dist/cjs/api/resources/webhooks/client/requests/PatchSubscriptionRequest.d.ts +18 -0
- package/dist/cjs/api/resources/webhooks/client/requests/RecoverMessagesRequest.d.ts +15 -0
- package/dist/cjs/api/resources/webhooks/client/requests/index.d.ts +6 -0
- package/dist/cjs/api/resources/webhooks/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/webhooks/index.d.ts +1 -0
- package/dist/cjs/api/resources/webhooks/index.js +17 -0
- package/dist/cjs/api/types/AdminSearchDestination.d.ts +11 -0
- package/dist/cjs/api/types/AdminSearchDestination.js +10 -0
- package/dist/cjs/api/types/{SyncWithSourceConnection.d.ts → AdminSyncInfo.d.ts} +14 -3
- package/dist/cjs/api/types/BehaviorConfig.d.ts +14 -0
- package/dist/cjs/api/types/BodyResyncWithExecutionConfigAdminResyncSyncIdPost.d.ts +10 -0
- package/dist/cjs/api/types/Collection.d.ts +4 -2
- package/dist/cjs/api/types/ConfigField.d.ts +2 -0
- package/dist/cjs/api/types/ConflictErrorResponse.d.ts +13 -0
- package/dist/cjs/api/types/CursorConfig.d.ts +12 -0
- package/dist/cjs/api/types/DeliveryAttempt.d.ts +28 -0
- package/dist/cjs/api/types/DestinationConfig.d.ts +16 -0
- package/dist/cjs/api/types/EventType.d.ts +14 -0
- package/dist/cjs/api/types/EventType.js +13 -0
- package/dist/cjs/api/types/FeatureFlag.d.ts +4 -1
- package/dist/cjs/api/types/FeatureFlag.js +3 -0
- package/dist/cjs/api/types/HandlerConfig.d.ts +14 -0
- package/dist/cjs/api/types/LegacySearchRequest.d.ts +2 -2
- package/dist/cjs/api/types/NotFoundErrorResponse.d.ts +10 -0
- package/dist/cjs/api/types/RateLimitErrorResponse.d.ts +13 -0
- package/dist/cjs/api/types/RecoveryTask.d.ts +16 -0
- package/dist/cjs/api/types/S3ConfigRequest.d.ts +5 -9
- package/dist/cjs/api/types/SearchRequest.d.ts +15 -12
- package/dist/cjs/api/types/SearchResponse.d.ts +6 -3
- package/dist/cjs/api/types/Source.d.ts +4 -0
- package/dist/cjs/api/types/SourceConnection.d.ts +19 -3
- package/dist/cjs/api/types/SourceConnectionJob.d.ts +16 -1
- package/dist/cjs/api/types/SourceConnectionListItem.d.ts +13 -2
- package/dist/cjs/api/types/Sync.d.ts +1 -0
- package/dist/cjs/api/types/SyncConfig.d.ts +17 -0
- package/dist/cjs/api/types/SyncCreate.d.ts +1 -0
- package/dist/cjs/api/types/SyncEventPayload.d.ts +15 -0
- package/dist/cjs/api/types/SyncJob.d.ts +2 -0
- package/dist/cjs/api/types/SyncUpdate.d.ts +1 -0
- package/dist/cjs/api/types/ValidationErrorDetail.d.ts +14 -0
- package/dist/cjs/api/types/ValidationErrorResponse.d.ts +14 -0
- package/dist/cjs/api/types/WebhookMessage.d.ts +23 -0
- package/dist/cjs/api/types/WebhookMessageWithAttempts.d.ts +23 -0
- package/dist/cjs/api/types/WebhookSubscription.d.ts +27 -0
- package/dist/cjs/api/types/index.d.ts +20 -25
- package/dist/cjs/api/types/index.js +20 -25
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +3 -8
- package/dist/esm/Client.mjs +7 -4
- package/dist/esm/api/errors/ConflictError.d.mts +9 -0
- package/dist/esm/api/errors/ConflictError.mjs +15 -0
- package/dist/esm/api/errors/NotFoundError.d.mts +9 -0
- package/dist/esm/api/errors/NotFoundError.mjs +15 -0
- package/dist/esm/api/errors/TooManyRequestsError.d.mts +9 -0
- package/dist/esm/api/errors/TooManyRequestsError.mjs +15 -0
- package/dist/esm/api/errors/UnprocessableEntityError.d.mts +1 -2
- package/dist/esm/api/errors/index.d.mts +3 -0
- package/dist/esm/api/errors/index.mjs +3 -0
- package/dist/esm/api/resources/collections/client/Client.d.mts +107 -42
- package/dist/esm/api/resources/collections/client/Client.mjs +205 -58
- package/dist/esm/api/resources/collections/client/requests/CollectionCreate.d.mts +3 -0
- package/dist/esm/api/resources/collections/client/requests/CollectionUpdate.d.mts +16 -0
- package/dist/esm/api/resources/collections/client/requests/ListCollectionsGetRequest.d.mts +4 -4
- package/dist/esm/api/resources/collections/client/requests/SearchGetLegacyCollectionsReadableIdSearchGetRequest.d.mts +4 -4
- package/dist/esm/api/resources/collections/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/collections/types/index.d.mts +0 -1
- package/dist/esm/api/resources/collections/types/index.mjs +0 -1
- package/dist/esm/api/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/index.mjs +2 -0
- package/dist/esm/api/resources/sourceConnections/client/Client.d.mts +96 -62
- package/dist/esm/api/resources/sourceConnections/client/Client.mjs +152 -78
- package/dist/esm/api/resources/sourceConnections/client/requests/GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest.d.mts +2 -1
- package/dist/esm/api/resources/sourceConnections/client/requests/ListSourceConnectionsGetRequest.d.mts +4 -2
- package/dist/esm/api/resources/sourceConnections/client/requests/RunSourceConnectionsSourceConnectionIdRunPostRequest.d.mts +2 -2
- package/dist/esm/api/resources/sourceConnections/client/requests/SourceConnectionCreate.d.mts +10 -9
- package/dist/esm/api/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.mts +6 -3
- package/dist/esm/api/resources/sources/client/Client.d.mts +24 -13
- package/dist/esm/api/resources/sources/client/Client.mjs +36 -11
- package/dist/esm/api/resources/webhooks/client/Client.d.mts +231 -0
- package/dist/esm/api/resources/webhooks/client/Client.mjs +652 -0
- package/dist/esm/api/resources/webhooks/client/index.d.mts +2 -0
- package/dist/esm/api/resources/webhooks/client/index.mjs +1 -0
- package/dist/esm/api/resources/webhooks/client/requests/CreateSubscriptionRequest.d.mts +19 -0
- package/dist/esm/api/resources/webhooks/client/requests/GetMessageWebhooksMessagesMessageIdGetRequest.d.mts +13 -0
- package/dist/esm/api/resources/webhooks/client/requests/GetMessagesWebhooksMessagesGetRequest.d.mts +11 -0
- package/dist/esm/api/resources/webhooks/client/requests/GetSubscriptionWebhooksSubscriptionsSubscriptionIdGetRequest.d.mts +13 -0
- package/dist/esm/api/resources/webhooks/client/requests/PatchSubscriptionRequest.d.mts +18 -0
- package/dist/esm/api/resources/webhooks/client/requests/RecoverMessagesRequest.d.mts +15 -0
- package/dist/esm/api/resources/webhooks/client/requests/index.d.mts +6 -0
- package/dist/esm/api/resources/webhooks/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/webhooks/index.d.mts +1 -0
- package/dist/esm/api/resources/webhooks/index.mjs +1 -0
- package/dist/esm/api/types/AdminSearchDestination.d.mts +11 -0
- package/dist/esm/api/types/AdminSearchDestination.mjs +7 -0
- package/dist/esm/api/types/{SyncWithSourceConnection.d.mts → AdminSyncInfo.d.mts} +14 -3
- package/dist/esm/api/types/BehaviorConfig.d.mts +14 -0
- package/dist/esm/api/types/BodyResyncWithExecutionConfigAdminResyncSyncIdPost.d.mts +10 -0
- package/dist/esm/api/types/Collection.d.mts +4 -2
- package/dist/esm/api/types/ConfigField.d.mts +2 -0
- package/dist/esm/api/types/ConflictErrorResponse.d.mts +13 -0
- package/dist/esm/api/types/CursorConfig.d.mts +12 -0
- package/dist/esm/api/types/DeliveryAttempt.d.mts +28 -0
- package/dist/esm/api/types/DestinationConfig.d.mts +16 -0
- package/dist/esm/api/types/EventType.d.mts +14 -0
- package/dist/esm/api/types/EventType.mjs +10 -0
- package/dist/esm/api/types/FeatureFlag.d.mts +4 -1
- package/dist/esm/api/types/FeatureFlag.mjs +3 -0
- package/dist/esm/api/types/HandlerConfig.d.mts +14 -0
- package/dist/esm/api/types/LegacySearchRequest.d.mts +2 -2
- package/dist/esm/api/types/NotFoundErrorResponse.d.mts +10 -0
- package/dist/esm/api/types/RateLimitErrorResponse.d.mts +13 -0
- package/dist/esm/api/types/RecoveryTask.d.mts +16 -0
- package/dist/esm/api/types/S3ConfigRequest.d.mts +5 -9
- package/dist/esm/api/types/SearchRequest.d.mts +15 -12
- package/dist/esm/api/types/SearchResponse.d.mts +6 -3
- package/dist/esm/api/types/Source.d.mts +4 -0
- package/dist/esm/api/types/SourceConnection.d.mts +19 -3
- package/dist/esm/api/types/SourceConnectionJob.d.mts +16 -1
- package/dist/esm/api/types/SourceConnectionListItem.d.mts +13 -2
- package/dist/esm/api/types/Sync.d.mts +1 -0
- package/dist/esm/api/types/SyncConfig.d.mts +17 -0
- package/dist/esm/api/types/SyncCreate.d.mts +1 -0
- package/dist/esm/api/types/SyncEventPayload.d.mts +15 -0
- package/dist/esm/api/types/SyncJob.d.mts +2 -0
- package/dist/esm/api/types/SyncUpdate.d.mts +1 -0
- package/dist/esm/api/types/ValidationErrorDetail.d.mts +14 -0
- package/dist/esm/api/types/ValidationErrorResponse.d.mts +14 -0
- package/dist/esm/api/types/WebhookMessage.d.mts +23 -0
- package/dist/esm/api/types/WebhookMessageWithAttempts.d.mts +23 -0
- package/dist/esm/api/types/WebhookSubscription.d.mts +27 -0
- package/dist/esm/api/types/index.d.mts +20 -25
- package/dist/esm/api/types/index.mjs +20 -25
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +891 -121
- package/dist/cjs/api/resources/collections/types/SearchCollectionsReadableIdSearchPostResponse.d.ts +0 -5
- package/dist/cjs/api/types/CollectionUpdate.d.ts +0 -13
- package/dist/cjs/api/types/DatetimeRange.d.ts +0 -34
- package/dist/cjs/api/types/FieldCondition.d.ts +0 -33
- package/dist/cjs/api/types/Filter.d.ts +0 -28
- package/dist/cjs/api/types/GeoBoundingBox.d.ts +0 -13
- package/dist/cjs/api/types/GeoLineString.d.ts +0 -11
- package/dist/cjs/api/types/GeoPoint.d.ts +0 -12
- package/dist/cjs/api/types/GeoPolygon.d.ts +0 -13
- package/dist/cjs/api/types/GeoRadius.d.ts +0 -13
- package/dist/cjs/api/types/HasIdCondition.d.ts +0 -16
- package/dist/cjs/api/types/HasVectorCondition.d.ts +0 -10
- package/dist/cjs/api/types/IsEmptyCondition.d.ts +0 -11
- package/dist/cjs/api/types/IsNullCondition.d.ts +0 -11
- package/dist/cjs/api/types/MatchAny.d.ts +0 -16
- package/dist/cjs/api/types/MatchExcept.d.ts +0 -16
- package/dist/cjs/api/types/MatchPhrase.d.ts +0 -10
- package/dist/cjs/api/types/MatchText.d.ts +0 -10
- package/dist/cjs/api/types/MatchValue.d.ts +0 -16
- package/dist/cjs/api/types/MinShould.d.ts +0 -16
- package/dist/cjs/api/types/Nested.d.ts +0 -13
- package/dist/cjs/api/types/NestedCondition.d.ts +0 -8
- package/dist/cjs/api/types/PayloadField.d.ts +0 -10
- package/dist/cjs/api/types/Range.d.ts +0 -16
- package/dist/cjs/api/types/ValuesCount.d.ts +0 -16
- package/dist/cjs/api/types/ValuesCount.js +0 -5
- package/dist/esm/api/resources/collections/types/SearchCollectionsReadableIdSearchPostResponse.d.mts +0 -5
- package/dist/esm/api/types/CollectionUpdate.d.mts +0 -13
- package/dist/esm/api/types/DatetimeRange.d.mts +0 -34
- package/dist/esm/api/types/FieldCondition.d.mts +0 -33
- package/dist/esm/api/types/Filter.d.mts +0 -28
- package/dist/esm/api/types/GeoBoundingBox.d.mts +0 -13
- package/dist/esm/api/types/GeoLineString.d.mts +0 -11
- package/dist/esm/api/types/GeoPoint.d.mts +0 -12
- package/dist/esm/api/types/GeoPolygon.d.mts +0 -13
- package/dist/esm/api/types/GeoRadius.d.mts +0 -13
- package/dist/esm/api/types/HasIdCondition.d.mts +0 -16
- package/dist/esm/api/types/HasVectorCondition.d.mts +0 -10
- package/dist/esm/api/types/IsEmptyCondition.d.mts +0 -11
- package/dist/esm/api/types/IsNullCondition.d.mts +0 -11
- package/dist/esm/api/types/MatchAny.d.mts +0 -16
- package/dist/esm/api/types/MatchExcept.d.mts +0 -16
- package/dist/esm/api/types/MatchPhrase.d.mts +0 -10
- package/dist/esm/api/types/MatchText.d.mts +0 -10
- package/dist/esm/api/types/MatchValue.d.mts +0 -16
- package/dist/esm/api/types/MinShould.d.mts +0 -16
- package/dist/esm/api/types/Nested.d.mts +0 -13
- package/dist/esm/api/types/NestedCondition.d.mts +0 -8
- package/dist/esm/api/types/PayloadField.d.mts +0 -10
- package/dist/esm/api/types/Range.d.mts +0 -16
- package/dist/esm/api/types/ValuesCount.d.mts +0 -16
- package/dist/esm/api/types/ValuesCount.mjs +0 -4
- /package/dist/cjs/api/{types → resources/collections/client/requests}/CollectionUpdate.js +0 -0
- /package/dist/cjs/api/resources/{collections/types/SearchCollectionsReadableIdSearchPostResponse.js → webhooks/client/requests/CreateSubscriptionRequest.js} +0 -0
- /package/dist/cjs/api/{types/DatetimeRange.js → resources/webhooks/client/requests/GetMessageWebhooksMessagesMessageIdGetRequest.js} +0 -0
- /package/dist/cjs/api/{types/FieldCondition.js → resources/webhooks/client/requests/GetMessagesWebhooksMessagesGetRequest.js} +0 -0
- /package/dist/cjs/api/{types/Filter.js → resources/webhooks/client/requests/GetSubscriptionWebhooksSubscriptionsSubscriptionIdGetRequest.js} +0 -0
- /package/dist/cjs/api/{types/GeoBoundingBox.js → resources/webhooks/client/requests/PatchSubscriptionRequest.js} +0 -0
- /package/dist/cjs/api/{types/GeoLineString.js → resources/webhooks/client/requests/RecoverMessagesRequest.js} +0 -0
- /package/dist/cjs/api/types/{GeoPoint.js → AdminSyncInfo.js} +0 -0
- /package/dist/cjs/api/types/{GeoPolygon.js → BehaviorConfig.js} +0 -0
- /package/dist/cjs/api/types/{GeoRadius.js → BodyResyncWithExecutionConfigAdminResyncSyncIdPost.js} +0 -0
- /package/dist/cjs/api/types/{HasIdCondition.js → ConflictErrorResponse.js} +0 -0
- /package/dist/cjs/api/types/{HasVectorCondition.js → CursorConfig.js} +0 -0
- /package/dist/cjs/api/types/{IsEmptyCondition.js → DeliveryAttempt.js} +0 -0
- /package/dist/cjs/api/types/{IsNullCondition.js → DestinationConfig.js} +0 -0
- /package/dist/cjs/api/types/{MatchAny.js → HandlerConfig.js} +0 -0
- /package/dist/cjs/api/types/{MatchExcept.js → NotFoundErrorResponse.js} +0 -0
- /package/dist/cjs/api/types/{MatchPhrase.js → RateLimitErrorResponse.js} +0 -0
- /package/dist/cjs/api/types/{MatchText.js → RecoveryTask.js} +0 -0
- /package/dist/cjs/api/types/{MatchValue.js → SyncConfig.js} +0 -0
- /package/dist/cjs/api/types/{MinShould.js → SyncEventPayload.js} +0 -0
- /package/dist/cjs/api/types/{Nested.js → ValidationErrorDetail.js} +0 -0
- /package/dist/cjs/api/types/{NestedCondition.js → ValidationErrorResponse.js} +0 -0
- /package/dist/cjs/api/types/{PayloadField.js → WebhookMessage.js} +0 -0
- /package/dist/cjs/api/types/{Range.js → WebhookMessageWithAttempts.js} +0 -0
- /package/dist/cjs/api/types/{SyncWithSourceConnection.js → WebhookSubscription.js} +0 -0
- /package/dist/esm/api/{types → resources/collections/client/requests}/CollectionUpdate.mjs +0 -0
- /package/dist/esm/api/resources/{collections/types/SearchCollectionsReadableIdSearchPostResponse.mjs → webhooks/client/requests/CreateSubscriptionRequest.mjs} +0 -0
- /package/dist/esm/api/{types/DatetimeRange.mjs → resources/webhooks/client/requests/GetMessageWebhooksMessagesMessageIdGetRequest.mjs} +0 -0
- /package/dist/esm/api/{types/FieldCondition.mjs → resources/webhooks/client/requests/GetMessagesWebhooksMessagesGetRequest.mjs} +0 -0
- /package/dist/esm/api/{types/Filter.mjs → resources/webhooks/client/requests/GetSubscriptionWebhooksSubscriptionsSubscriptionIdGetRequest.mjs} +0 -0
- /package/dist/esm/api/{types/GeoBoundingBox.mjs → resources/webhooks/client/requests/PatchSubscriptionRequest.mjs} +0 -0
- /package/dist/esm/api/{types/GeoLineString.mjs → resources/webhooks/client/requests/RecoverMessagesRequest.mjs} +0 -0
- /package/dist/esm/api/types/{GeoPoint.mjs → AdminSyncInfo.mjs} +0 -0
- /package/dist/esm/api/types/{GeoPolygon.mjs → BehaviorConfig.mjs} +0 -0
- /package/dist/esm/api/types/{GeoRadius.mjs → BodyResyncWithExecutionConfigAdminResyncSyncIdPost.mjs} +0 -0
- /package/dist/esm/api/types/{HasIdCondition.mjs → ConflictErrorResponse.mjs} +0 -0
- /package/dist/esm/api/types/{HasVectorCondition.mjs → CursorConfig.mjs} +0 -0
- /package/dist/esm/api/types/{IsEmptyCondition.mjs → DeliveryAttempt.mjs} +0 -0
- /package/dist/esm/api/types/{IsNullCondition.mjs → DestinationConfig.mjs} +0 -0
- /package/dist/esm/api/types/{MatchAny.mjs → HandlerConfig.mjs} +0 -0
- /package/dist/esm/api/types/{MatchExcept.mjs → NotFoundErrorResponse.mjs} +0 -0
- /package/dist/esm/api/types/{MatchPhrase.mjs → RateLimitErrorResponse.mjs} +0 -0
- /package/dist/esm/api/types/{MatchText.mjs → RecoveryTask.mjs} +0 -0
- /package/dist/esm/api/types/{MatchValue.mjs → SyncConfig.mjs} +0 -0
- /package/dist/esm/api/types/{MinShould.mjs → SyncEventPayload.mjs} +0 -0
- /package/dist/esm/api/types/{Nested.mjs → ValidationErrorDetail.mjs} +0 -0
- /package/dist/esm/api/types/{NestedCondition.mjs → ValidationErrorResponse.mjs} +0 -0
- /package/dist/esm/api/types/{PayloadField.mjs → WebhookMessage.mjs} +0 -0
- /package/dist/esm/api/types/{Range.mjs → WebhookMessageWithAttempts.mjs} +0 -0
- /package/dist/esm/api/types/{SyncWithSourceConnection.mjs → WebhookSubscription.mjs} +0 -0
|
@@ -23,18 +23,25 @@ export class SourceConnections {
|
|
|
23
23
|
this._options = _options;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* Retrieve all source connections for your organization.
|
|
27
|
+
*
|
|
28
|
+
* Returns a lightweight list of source connections with essential fields for
|
|
29
|
+
* display and navigation. Use the collection filter to see connections within
|
|
30
|
+
* a specific collection.
|
|
31
|
+
*
|
|
32
|
+
* For full connection details including sync history, use the GET /{id} endpoint.
|
|
27
33
|
*
|
|
28
34
|
* @param {AirweaveSDK.ListSourceConnectionsGetRequest} request
|
|
29
35
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
30
36
|
*
|
|
31
37
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
38
|
+
* @throws {@link AirweaveSDK.TooManyRequestsError}
|
|
32
39
|
*
|
|
33
40
|
* @example
|
|
34
41
|
* await client.sourceConnections.list({
|
|
35
42
|
* collection: "collection",
|
|
36
|
-
* skip:
|
|
37
|
-
* limit:
|
|
43
|
+
* skip: 0,
|
|
44
|
+
* limit: 100
|
|
38
45
|
* })
|
|
39
46
|
*/
|
|
40
47
|
list(request = {}, requestOptions) {
|
|
@@ -42,7 +49,7 @@ export class SourceConnections {
|
|
|
42
49
|
}
|
|
43
50
|
__list() {
|
|
44
51
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
45
|
-
var _a, _b, _c
|
|
52
|
+
var _a, _b, _c;
|
|
46
53
|
const { collection, skip, limit } = request;
|
|
47
54
|
const _queryParams = {};
|
|
48
55
|
if (collection != null) {
|
|
@@ -54,9 +61,9 @@ export class SourceConnections {
|
|
|
54
61
|
if (limit != null) {
|
|
55
62
|
_queryParams["limit"] = limit.toString();
|
|
56
63
|
}
|
|
57
|
-
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({
|
|
64
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
58
65
|
const _response = yield core.fetcher({
|
|
59
|
-
url: core.url.join((
|
|
66
|
+
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"),
|
|
60
67
|
method: "GET",
|
|
61
68
|
headers: _headers,
|
|
62
69
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -74,6 +81,8 @@ export class SourceConnections {
|
|
|
74
81
|
switch (_response.error.statusCode) {
|
|
75
82
|
case 422:
|
|
76
83
|
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
84
|
+
case 429:
|
|
85
|
+
throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
77
86
|
default:
|
|
78
87
|
throw new errors.AirweaveSDKError({
|
|
79
88
|
statusCode: _response.error.statusCode,
|
|
@@ -100,30 +109,27 @@ export class SourceConnections {
|
|
|
100
109
|
});
|
|
101
110
|
}
|
|
102
111
|
/**
|
|
103
|
-
* Create a new source connection.
|
|
112
|
+
* Create a new source connection to sync data from an external source.
|
|
104
113
|
*
|
|
105
|
-
* The authentication
|
|
106
|
-
* - DirectAuthentication: Immediate creation with provided credentials
|
|
107
|
-
* - OAuthBrowserAuthentication: Returns shell with authentication URL
|
|
108
|
-
* - OAuthTokenAuthentication: Immediate creation with provided token
|
|
109
|
-
* - AuthProviderAuthentication: Using external auth provider
|
|
114
|
+
* The authentication method determines the creation flow:
|
|
110
115
|
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
116
|
+
* - **Direct**: Provide credentials (API key, token) directly. Connection is created immediately.
|
|
117
|
+
* - **OAuth Browser**: Returns a connection with an `auth_url` to redirect users for authentication.
|
|
118
|
+
* - **OAuth Token**: Provide an existing OAuth token. Connection is created immediately.
|
|
119
|
+
* - **Auth Provider**: Use a pre-configured auth provider (e.g., Composio, Pipedream).
|
|
113
120
|
*
|
|
114
|
-
*
|
|
115
|
-
* - True for: direct, oauth_token, auth_provider
|
|
116
|
-
* - False for: oauth_browser, oauth_byoc (these sync after authentication)
|
|
121
|
+
* After successful authentication, data sync can begin automatically or on-demand.
|
|
117
122
|
*
|
|
118
123
|
* @param {AirweaveSDK.SourceConnectionCreate} request
|
|
119
124
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
120
125
|
*
|
|
121
126
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
127
|
+
* @throws {@link AirweaveSDK.TooManyRequestsError}
|
|
122
128
|
*
|
|
123
129
|
* @example
|
|
124
130
|
* await client.sourceConnections.create({
|
|
125
|
-
* short_name: "
|
|
126
|
-
* readable_collection_id: "
|
|
131
|
+
* short_name: "github",
|
|
132
|
+
* readable_collection_id: "customer-support-tickets-x7k9m"
|
|
127
133
|
* })
|
|
128
134
|
*/
|
|
129
135
|
create(request, requestOptions) {
|
|
@@ -131,10 +137,10 @@ export class SourceConnections {
|
|
|
131
137
|
}
|
|
132
138
|
__create(request, requestOptions) {
|
|
133
139
|
return __awaiter(this, void 0, void 0, function* () {
|
|
134
|
-
var _a, _b, _c
|
|
135
|
-
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({
|
|
140
|
+
var _a, _b, _c;
|
|
141
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
136
142
|
const _response = yield core.fetcher({
|
|
137
|
-
url: core.url.join((
|
|
143
|
+
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"),
|
|
138
144
|
method: "POST",
|
|
139
145
|
headers: _headers,
|
|
140
146
|
contentType: "application/json",
|
|
@@ -152,6 +158,8 @@ export class SourceConnections {
|
|
|
152
158
|
switch (_response.error.statusCode) {
|
|
153
159
|
case 422:
|
|
154
160
|
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
161
|
+
case 429:
|
|
162
|
+
throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
155
163
|
default:
|
|
156
164
|
throw new errors.AirweaveSDKError({
|
|
157
165
|
statusCode: _response.error.statusCode,
|
|
@@ -178,25 +186,33 @@ export class SourceConnections {
|
|
|
178
186
|
});
|
|
179
187
|
}
|
|
180
188
|
/**
|
|
181
|
-
*
|
|
189
|
+
* Retrieve details of a specific source connection.
|
|
190
|
+
*
|
|
191
|
+
* Returns complete information about the connection including:
|
|
192
|
+
* - Configuration settings
|
|
193
|
+
* - Authentication status
|
|
194
|
+
* - Sync schedule and history
|
|
195
|
+
* - Entity statistics
|
|
182
196
|
*
|
|
183
|
-
* @param {string} sourceConnectionId
|
|
197
|
+
* @param {string} sourceConnectionId - Unique identifier of the source connection (UUID)
|
|
184
198
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
185
199
|
*
|
|
200
|
+
* @throws {@link AirweaveSDK.NotFoundError}
|
|
186
201
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
202
|
+
* @throws {@link AirweaveSDK.TooManyRequestsError}
|
|
187
203
|
*
|
|
188
204
|
* @example
|
|
189
|
-
* await client.sourceConnections.get("
|
|
205
|
+
* await client.sourceConnections.get("550e8400-e29b-41d4-a716-446655440000")
|
|
190
206
|
*/
|
|
191
207
|
get(sourceConnectionId, requestOptions) {
|
|
192
208
|
return core.HttpResponsePromise.fromPromise(this.__get(sourceConnectionId, requestOptions));
|
|
193
209
|
}
|
|
194
210
|
__get(sourceConnectionId, requestOptions) {
|
|
195
211
|
return __awaiter(this, void 0, void 0, function* () {
|
|
196
|
-
var _a, _b, _c
|
|
197
|
-
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({
|
|
212
|
+
var _a, _b, _c;
|
|
213
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
198
214
|
const _response = yield core.fetcher({
|
|
199
|
-
url: core.url.join((
|
|
215
|
+
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)}`),
|
|
200
216
|
method: "GET",
|
|
201
217
|
headers: _headers,
|
|
202
218
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -209,8 +225,12 @@ export class SourceConnections {
|
|
|
209
225
|
}
|
|
210
226
|
if (_response.error.reason === "status-code") {
|
|
211
227
|
switch (_response.error.statusCode) {
|
|
228
|
+
case 404:
|
|
229
|
+
throw new AirweaveSDK.NotFoundError(_response.error.body, _response.rawResponse);
|
|
212
230
|
case 422:
|
|
213
231
|
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
232
|
+
case 429:
|
|
233
|
+
throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
214
234
|
default:
|
|
215
235
|
throw new errors.AirweaveSDKError({
|
|
216
236
|
statusCode: _response.error.statusCode,
|
|
@@ -237,25 +257,34 @@ export class SourceConnections {
|
|
|
237
257
|
});
|
|
238
258
|
}
|
|
239
259
|
/**
|
|
240
|
-
*
|
|
260
|
+
* Permanently delete a source connection and all its synced data.
|
|
261
|
+
*
|
|
262
|
+
* This operation:
|
|
263
|
+
* - Removes all entities synced from this source from the vector database
|
|
264
|
+
* - Cancels any scheduled or running sync jobs
|
|
265
|
+
* - Deletes the connection configuration and credentials
|
|
266
|
+
*
|
|
267
|
+
* **Warning**: This action cannot be undone. All synced data will be permanently deleted.
|
|
241
268
|
*
|
|
242
|
-
* @param {string} sourceConnectionId
|
|
269
|
+
* @param {string} sourceConnectionId - Unique identifier of the source connection to delete (UUID)
|
|
243
270
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
244
271
|
*
|
|
272
|
+
* @throws {@link AirweaveSDK.NotFoundError}
|
|
245
273
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
274
|
+
* @throws {@link AirweaveSDK.TooManyRequestsError}
|
|
246
275
|
*
|
|
247
276
|
* @example
|
|
248
|
-
* await client.sourceConnections.delete("
|
|
277
|
+
* await client.sourceConnections.delete("550e8400-e29b-41d4-a716-446655440000")
|
|
249
278
|
*/
|
|
250
279
|
delete(sourceConnectionId, requestOptions) {
|
|
251
280
|
return core.HttpResponsePromise.fromPromise(this.__delete(sourceConnectionId, requestOptions));
|
|
252
281
|
}
|
|
253
282
|
__delete(sourceConnectionId, requestOptions) {
|
|
254
283
|
return __awaiter(this, void 0, void 0, function* () {
|
|
255
|
-
var _a, _b, _c
|
|
256
|
-
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({
|
|
284
|
+
var _a, _b, _c;
|
|
285
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
257
286
|
const _response = yield core.fetcher({
|
|
258
|
-
url: core.url.join((
|
|
287
|
+
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)}`),
|
|
259
288
|
method: "DELETE",
|
|
260
289
|
headers: _headers,
|
|
261
290
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -268,8 +297,12 @@ export class SourceConnections {
|
|
|
268
297
|
}
|
|
269
298
|
if (_response.error.reason === "status-code") {
|
|
270
299
|
switch (_response.error.statusCode) {
|
|
300
|
+
case 404:
|
|
301
|
+
throw new AirweaveSDK.NotFoundError(_response.error.body, _response.rawResponse);
|
|
271
302
|
case 422:
|
|
272
303
|
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
304
|
+
case 429:
|
|
305
|
+
throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
273
306
|
default:
|
|
274
307
|
throw new errors.AirweaveSDKError({
|
|
275
308
|
statusCode: _response.error.statusCode,
|
|
@@ -296,32 +329,36 @@ export class SourceConnections {
|
|
|
296
329
|
});
|
|
297
330
|
}
|
|
298
331
|
/**
|
|
299
|
-
* Update
|
|
332
|
+
* Update an existing source connection's configuration.
|
|
300
333
|
*
|
|
301
|
-
*
|
|
302
|
-
* -
|
|
303
|
-
* -
|
|
304
|
-
* -
|
|
305
|
-
* -
|
|
334
|
+
* You can modify:
|
|
335
|
+
* - **Name and description**: Display information
|
|
336
|
+
* - **Configuration**: Source-specific settings (e.g., repository name, filters)
|
|
337
|
+
* - **Schedule**: Cron expression for automatic syncs
|
|
338
|
+
* - **Authentication**: Update credentials (direct auth only)
|
|
306
339
|
*
|
|
307
|
-
*
|
|
340
|
+
* Only include the fields you want to change; omitted fields retain their current values.
|
|
341
|
+
*
|
|
342
|
+
* @param {string} sourceConnectionId - Unique identifier of the source connection to update (UUID)
|
|
308
343
|
* @param {AirweaveSDK.SourceConnectionUpdate} request
|
|
309
344
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
310
345
|
*
|
|
346
|
+
* @throws {@link AirweaveSDK.NotFoundError}
|
|
311
347
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
348
|
+
* @throws {@link AirweaveSDK.TooManyRequestsError}
|
|
312
349
|
*
|
|
313
350
|
* @example
|
|
314
|
-
* await client.sourceConnections.update("
|
|
351
|
+
* await client.sourceConnections.update("550e8400-e29b-41d4-a716-446655440000")
|
|
315
352
|
*/
|
|
316
353
|
update(sourceConnectionId, request = {}, requestOptions) {
|
|
317
354
|
return core.HttpResponsePromise.fromPromise(this.__update(sourceConnectionId, request, requestOptions));
|
|
318
355
|
}
|
|
319
356
|
__update(sourceConnectionId_1) {
|
|
320
357
|
return __awaiter(this, arguments, void 0, function* (sourceConnectionId, request = {}, requestOptions) {
|
|
321
|
-
var _a, _b, _c
|
|
322
|
-
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({
|
|
358
|
+
var _a, _b, _c;
|
|
359
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
323
360
|
const _response = yield core.fetcher({
|
|
324
|
-
url: core.url.join((
|
|
361
|
+
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)}`),
|
|
325
362
|
method: "PATCH",
|
|
326
363
|
headers: _headers,
|
|
327
364
|
contentType: "application/json",
|
|
@@ -337,8 +374,12 @@ export class SourceConnections {
|
|
|
337
374
|
}
|
|
338
375
|
if (_response.error.reason === "status-code") {
|
|
339
376
|
switch (_response.error.statusCode) {
|
|
377
|
+
case 404:
|
|
378
|
+
throw new AirweaveSDK.NotFoundError(_response.error.body, _response.rawResponse);
|
|
340
379
|
case 422:
|
|
341
380
|
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
381
|
+
case 429:
|
|
382
|
+
throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
342
383
|
default:
|
|
343
384
|
throw new errors.AirweaveSDKError({
|
|
344
385
|
statusCode: _response.error.statusCode,
|
|
@@ -365,28 +406,27 @@ export class SourceConnections {
|
|
|
365
406
|
});
|
|
366
407
|
}
|
|
367
408
|
/**
|
|
368
|
-
* Trigger a
|
|
409
|
+
* Trigger a data synchronization job for a source connection.
|
|
369
410
|
*
|
|
370
|
-
*
|
|
411
|
+
* Starts an asynchronous sync job that pulls the latest data from the connected
|
|
412
|
+
* source. The job runs in the background and you can monitor its progress using
|
|
413
|
+
* the jobs endpoint.
|
|
371
414
|
*
|
|
372
|
-
*
|
|
373
|
-
*
|
|
374
|
-
* source_connection_id: ID of the source connection to run
|
|
375
|
-
* ctx: API context with organization and user information
|
|
376
|
-
* guard_rail: Guard rail service for usage limits
|
|
377
|
-
* force_full_sync: If True, forces a full sync with orphaned entity cleanup
|
|
378
|
-
* for continuous syncs. Raises 400 error if used on
|
|
379
|
-
* non-continuous syncs (which are always full syncs).
|
|
415
|
+
* For continuous sync connections, this performs an incremental sync by default.
|
|
416
|
+
* Use `force_full_sync=true` to perform a complete re-sync of all data.
|
|
380
417
|
*
|
|
381
|
-
* @param {string} sourceConnectionId
|
|
418
|
+
* @param {string} sourceConnectionId - Unique identifier of the source connection to sync (UUID)
|
|
382
419
|
* @param {AirweaveSDK.RunSourceConnectionsSourceConnectionIdRunPostRequest} request
|
|
383
420
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
384
421
|
*
|
|
422
|
+
* @throws {@link AirweaveSDK.NotFoundError}
|
|
423
|
+
* @throws {@link AirweaveSDK.ConflictError}
|
|
385
424
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
425
|
+
* @throws {@link AirweaveSDK.TooManyRequestsError}
|
|
386
426
|
*
|
|
387
427
|
* @example
|
|
388
|
-
* await client.sourceConnections.run("
|
|
389
|
-
* force_full_sync:
|
|
428
|
+
* await client.sourceConnections.run("550e8400-e29b-41d4-a716-446655440000", {
|
|
429
|
+
* force_full_sync: false
|
|
390
430
|
* })
|
|
391
431
|
*/
|
|
392
432
|
run(sourceConnectionId, request = {}, requestOptions) {
|
|
@@ -394,15 +434,15 @@ export class SourceConnections {
|
|
|
394
434
|
}
|
|
395
435
|
__run(sourceConnectionId_1) {
|
|
396
436
|
return __awaiter(this, arguments, void 0, function* (sourceConnectionId, request = {}, requestOptions) {
|
|
397
|
-
var _a, _b, _c
|
|
437
|
+
var _a, _b, _c;
|
|
398
438
|
const { force_full_sync: forceFullSync } = request;
|
|
399
439
|
const _queryParams = {};
|
|
400
440
|
if (forceFullSync != null) {
|
|
401
441
|
_queryParams["force_full_sync"] = forceFullSync.toString();
|
|
402
442
|
}
|
|
403
|
-
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({
|
|
443
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
404
444
|
const _response = yield core.fetcher({
|
|
405
|
-
url: core.url.join((
|
|
445
|
+
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`),
|
|
406
446
|
method: "POST",
|
|
407
447
|
headers: _headers,
|
|
408
448
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -415,8 +455,14 @@ export class SourceConnections {
|
|
|
415
455
|
}
|
|
416
456
|
if (_response.error.reason === "status-code") {
|
|
417
457
|
switch (_response.error.statusCode) {
|
|
458
|
+
case 404:
|
|
459
|
+
throw new AirweaveSDK.NotFoundError(_response.error.body, _response.rawResponse);
|
|
460
|
+
case 409:
|
|
461
|
+
throw new AirweaveSDK.ConflictError(_response.error.body, _response.rawResponse);
|
|
418
462
|
case 422:
|
|
419
463
|
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
464
|
+
case 429:
|
|
465
|
+
throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
420
466
|
default:
|
|
421
467
|
throw new errors.AirweaveSDKError({
|
|
422
468
|
statusCode: _response.error.statusCode,
|
|
@@ -443,17 +489,30 @@ export class SourceConnections {
|
|
|
443
489
|
});
|
|
444
490
|
}
|
|
445
491
|
/**
|
|
446
|
-
*
|
|
492
|
+
* Retrieve the sync job history for a source connection.
|
|
493
|
+
*
|
|
494
|
+
* Returns a list of sync jobs ordered by creation time (newest first). Each job
|
|
495
|
+
* includes status, timing information, and entity counts.
|
|
447
496
|
*
|
|
448
|
-
*
|
|
497
|
+
* Job statuses:
|
|
498
|
+
* - **PENDING**: Job is queued and waiting to start
|
|
499
|
+
* - **RUNNING**: Sync is actively pulling and processing data
|
|
500
|
+
* - **COMPLETED**: Sync finished successfully
|
|
501
|
+
* - **FAILED**: Sync encountered an error
|
|
502
|
+
* - **CANCELLED**: Sync was manually cancelled
|
|
503
|
+
* - **CANCELLING**: Cancellation has been requested
|
|
504
|
+
*
|
|
505
|
+
* @param {string} sourceConnectionId - Unique identifier of the source connection (UUID)
|
|
449
506
|
* @param {AirweaveSDK.GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest} request
|
|
450
507
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
451
508
|
*
|
|
509
|
+
* @throws {@link AirweaveSDK.NotFoundError}
|
|
452
510
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
511
|
+
* @throws {@link AirweaveSDK.TooManyRequestsError}
|
|
453
512
|
*
|
|
454
513
|
* @example
|
|
455
|
-
* await client.sourceConnections.getSourceConnectionJobs("
|
|
456
|
-
* limit:
|
|
514
|
+
* await client.sourceConnections.getSourceConnectionJobs("550e8400-e29b-41d4-a716-446655440000", {
|
|
515
|
+
* limit: 100
|
|
457
516
|
* })
|
|
458
517
|
*/
|
|
459
518
|
getSourceConnectionJobs(sourceConnectionId, request = {}, requestOptions) {
|
|
@@ -461,15 +520,15 @@ export class SourceConnections {
|
|
|
461
520
|
}
|
|
462
521
|
__getSourceConnectionJobs(sourceConnectionId_1) {
|
|
463
522
|
return __awaiter(this, arguments, void 0, function* (sourceConnectionId, request = {}, requestOptions) {
|
|
464
|
-
var _a, _b, _c
|
|
523
|
+
var _a, _b, _c;
|
|
465
524
|
const { limit } = request;
|
|
466
525
|
const _queryParams = {};
|
|
467
526
|
if (limit != null) {
|
|
468
527
|
_queryParams["limit"] = limit.toString();
|
|
469
528
|
}
|
|
470
|
-
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({
|
|
529
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
471
530
|
const _response = yield core.fetcher({
|
|
472
|
-
url: core.url.join((
|
|
531
|
+
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`),
|
|
473
532
|
method: "GET",
|
|
474
533
|
headers: _headers,
|
|
475
534
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -482,8 +541,12 @@ export class SourceConnections {
|
|
|
482
541
|
}
|
|
483
542
|
if (_response.error.reason === "status-code") {
|
|
484
543
|
switch (_response.error.statusCode) {
|
|
544
|
+
case 404:
|
|
545
|
+
throw new AirweaveSDK.NotFoundError(_response.error.body, _response.rawResponse);
|
|
485
546
|
case 422:
|
|
486
547
|
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
548
|
+
case 429:
|
|
549
|
+
throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
487
550
|
default:
|
|
488
551
|
throw new errors.AirweaveSDKError({
|
|
489
552
|
statusCode: _response.error.statusCode,
|
|
@@ -510,30 +573,35 @@ export class SourceConnections {
|
|
|
510
573
|
});
|
|
511
574
|
}
|
|
512
575
|
/**
|
|
513
|
-
*
|
|
576
|
+
* Request cancellation of a running sync job.
|
|
577
|
+
*
|
|
578
|
+
* The job will be marked as CANCELLING and the sync workflow will stop at the
|
|
579
|
+
* next checkpoint. Already-processed entities are retained.
|
|
514
580
|
*
|
|
515
|
-
*
|
|
516
|
-
*
|
|
517
|
-
* the cancellation request.
|
|
581
|
+
* **Note**: Cancellation is asynchronous. The job status will change to CANCELLED
|
|
582
|
+
* once the workflow has fully stopped.
|
|
518
583
|
*
|
|
519
|
-
* @param {string} sourceConnectionId
|
|
520
|
-
* @param {string} jobId
|
|
584
|
+
* @param {string} sourceConnectionId - Unique identifier of the source connection (UUID)
|
|
585
|
+
* @param {string} jobId - Unique identifier of the sync job to cancel (UUID)
|
|
521
586
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
522
587
|
*
|
|
588
|
+
* @throws {@link AirweaveSDK.NotFoundError}
|
|
589
|
+
* @throws {@link AirweaveSDK.ConflictError}
|
|
523
590
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
591
|
+
* @throws {@link AirweaveSDK.TooManyRequestsError}
|
|
524
592
|
*
|
|
525
593
|
* @example
|
|
526
|
-
* await client.sourceConnections.cancelJob("
|
|
594
|
+
* await client.sourceConnections.cancelJob("550e8400-e29b-41d4-a716-446655440000", "660e8400-e29b-41d4-a716-446655440001")
|
|
527
595
|
*/
|
|
528
596
|
cancelJob(sourceConnectionId, jobId, requestOptions) {
|
|
529
597
|
return core.HttpResponsePromise.fromPromise(this.__cancelJob(sourceConnectionId, jobId, requestOptions));
|
|
530
598
|
}
|
|
531
599
|
__cancelJob(sourceConnectionId, jobId, requestOptions) {
|
|
532
600
|
return __awaiter(this, void 0, void 0, function* () {
|
|
533
|
-
var _a, _b, _c
|
|
534
|
-
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({
|
|
601
|
+
var _a, _b, _c;
|
|
602
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
535
603
|
const _response = yield core.fetcher({
|
|
536
|
-
url: core.url.join((
|
|
604
|
+
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`),
|
|
537
605
|
method: "POST",
|
|
538
606
|
headers: _headers,
|
|
539
607
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -546,8 +614,14 @@ export class SourceConnections {
|
|
|
546
614
|
}
|
|
547
615
|
if (_response.error.reason === "status-code") {
|
|
548
616
|
switch (_response.error.statusCode) {
|
|
617
|
+
case 404:
|
|
618
|
+
throw new AirweaveSDK.NotFoundError(_response.error.body, _response.rawResponse);
|
|
619
|
+
case 409:
|
|
620
|
+
throw new AirweaveSDK.ConflictError(_response.error.body, _response.rawResponse);
|
|
549
621
|
case 422:
|
|
550
622
|
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
623
|
+
case 429:
|
|
624
|
+
throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
551
625
|
default:
|
|
552
626
|
throw new errors.AirweaveSDKError({
|
|
553
627
|
statusCode: _response.error.statusCode,
|
|
@@ -5,13 +5,15 @@
|
|
|
5
5
|
* @example
|
|
6
6
|
* {
|
|
7
7
|
* collection: "collection",
|
|
8
|
-
* skip:
|
|
9
|
-
* limit:
|
|
8
|
+
* skip: 0,
|
|
9
|
+
* limit: 100
|
|
10
10
|
* }
|
|
11
11
|
*/
|
|
12
12
|
export interface ListSourceConnectionsGetRequest {
|
|
13
13
|
/** Filter by collection readable ID */
|
|
14
14
|
collection?: string;
|
|
15
|
+
/** Number of connections to skip for pagination */
|
|
15
16
|
skip?: number;
|
|
17
|
+
/** Maximum number of connections to return (1-1000) */
|
|
16
18
|
limit?: number;
|
|
17
19
|
}
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* @example
|
|
6
6
|
* {
|
|
7
|
-
* force_full_sync:
|
|
7
|
+
* force_full_sync: false
|
|
8
8
|
* }
|
|
9
9
|
*/
|
|
10
10
|
export interface RunSourceConnectionsSourceConnectionIdRunPostRequest {
|
|
11
|
-
/** Force a full sync ignoring cursor data
|
|
11
|
+
/** Force a full sync ignoring cursor data. Only applies to continuous sync connections. Non-continuous connections always perform full syncs. */
|
|
12
12
|
force_full_sync?: boolean;
|
|
13
13
|
}
|
package/dist/esm/api/resources/sourceConnections/client/requests/SourceConnectionCreate.d.mts
CHANGED
|
@@ -5,32 +5,33 @@ import * as AirweaveSDK from "../../../../index.mjs";
|
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
7
|
* {
|
|
8
|
-
* short_name: "
|
|
9
|
-
* readable_collection_id: "
|
|
8
|
+
* short_name: "github",
|
|
9
|
+
* readable_collection_id: "customer-support-tickets-x7k9m"
|
|
10
10
|
* }
|
|
11
11
|
*/
|
|
12
12
|
export interface SourceConnectionCreate {
|
|
13
|
-
/**
|
|
13
|
+
/** Display name for the connection. If not provided, defaults to '{Source Name} Connection'. */
|
|
14
14
|
name?: string;
|
|
15
|
-
/** Source identifier (e.g., 'slack', 'github') */
|
|
15
|
+
/** Source type identifier (e.g., 'slack', 'github', 'notion') */
|
|
16
16
|
short_name: string;
|
|
17
|
-
/**
|
|
17
|
+
/** The readable ID of the collection to add this connection to */
|
|
18
18
|
readable_collection_id: string;
|
|
19
|
-
/**
|
|
19
|
+
/** Optional description of what this connection is used for */
|
|
20
20
|
description?: string;
|
|
21
|
-
/** Source-specific configuration */
|
|
21
|
+
/** Source-specific configuration (e.g., repository name, filters) */
|
|
22
22
|
config?: Record<string, unknown>;
|
|
23
|
+
/** Optional sync schedule configuration */
|
|
23
24
|
schedule?: AirweaveSDK.ScheduleConfig;
|
|
24
25
|
/** Run initial sync after creation. Defaults to True for direct/token/auth_provider, False for OAuth browser/BYOC flows (which sync after authentication) */
|
|
25
26
|
sync_immediately?: boolean;
|
|
26
|
-
/** Authentication
|
|
27
|
+
/** Authentication configuration. Type is auto-detected from provided fields. */
|
|
27
28
|
authentication?: SourceConnectionCreate.Authentication;
|
|
28
29
|
/** URL to redirect to after OAuth flow completes (only used for OAuth flows) */
|
|
29
30
|
redirect_url?: string;
|
|
30
31
|
}
|
|
31
32
|
export declare namespace SourceConnectionCreate {
|
|
32
33
|
/**
|
|
33
|
-
*
|
|
34
|
+
* Updated authentication credentials (direct auth only)
|
|
34
35
|
*/
|
|
35
36
|
type Authentication = AirweaveSDK.DirectAuthentication | AirweaveSDK.OAuthTokenAuthentication | AirweaveSDK.OAuthBrowserAuthentication | AirweaveSDK.AuthProviderAuthentication;
|
|
36
37
|
}
|
package/dist/esm/api/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.mts
CHANGED
|
@@ -7,17 +7,20 @@ import * as AirweaveSDK from "../../../../index.mjs";
|
|
|
7
7
|
* {}
|
|
8
8
|
*/
|
|
9
9
|
export interface SourceConnectionUpdate {
|
|
10
|
+
/** Updated display name for the connection */
|
|
10
11
|
name?: string;
|
|
12
|
+
/** Updated description */
|
|
11
13
|
description?: string;
|
|
12
|
-
/**
|
|
14
|
+
/** Updated source-specific configuration */
|
|
13
15
|
config?: Record<string, unknown>;
|
|
16
|
+
/** Updated sync schedule configuration */
|
|
14
17
|
schedule?: AirweaveSDK.ScheduleConfig;
|
|
15
|
-
/**
|
|
18
|
+
/** Updated authentication credentials (direct auth only) */
|
|
16
19
|
authentication?: SourceConnectionUpdate.Authentication;
|
|
17
20
|
}
|
|
18
21
|
export declare namespace SourceConnectionUpdate {
|
|
19
22
|
/**
|
|
20
|
-
*
|
|
23
|
+
* Updated authentication credentials (direct auth only)
|
|
21
24
|
*/
|
|
22
25
|
type Authentication = AirweaveSDK.DirectAuthentication | AirweaveSDK.OAuthTokenAuthentication | AirweaveSDK.OAuthBrowserAuthentication | AirweaveSDK.AuthProviderAuthentication;
|
|
23
26
|
}
|