@airweave/sdk 0.7.20 → 0.8.77
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 +24 -0
- package/dist/cjs/api/types/EventType.js +19 -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 +21 -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/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 +22 -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 +19 -25
- package/dist/cjs/api/types/index.js +19 -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 +24 -0
- package/dist/esm/api/types/EventType.mjs +16 -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 +21 -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/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 +22 -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 +19 -25
- package/dist/esm/api/types/index.mjs +19 -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/SyncWithSourceConnection.js +0 -5
- 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/SyncWithSourceConnection.mjs +0 -4
- 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 → ValidationErrorDetail.js} +0 -0
- /package/dist/cjs/api/types/{Nested.js → ValidationErrorResponse.js} +0 -0
- /package/dist/cjs/api/types/{NestedCondition.js → WebhookMessage.js} +0 -0
- /package/dist/cjs/api/types/{PayloadField.js → WebhookMessageWithAttempts.js} +0 -0
- /package/dist/cjs/api/types/{Range.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 → ValidationErrorDetail.mjs} +0 -0
- /package/dist/esm/api/types/{Nested.mjs → ValidationErrorResponse.mjs} +0 -0
- /package/dist/esm/api/types/{NestedCondition.mjs → WebhookMessage.mjs} +0 -0
- /package/dist/esm/api/types/{PayloadField.mjs → WebhookMessageWithAttempts.mjs} +0 -0
- /package/dist/esm/api/types/{Range.mjs → WebhookSubscription.mjs} +0 -0
|
@@ -23,20 +23,25 @@ export class Collections {
|
|
|
23
23
|
this._options = _options;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* Retrieve all collections belonging to your organization.
|
|
27
27
|
*
|
|
28
|
-
* Collections are
|
|
28
|
+
* Collections are containers that group related data from one or more source
|
|
29
|
+
* connections, enabling unified search across multiple data sources.
|
|
30
|
+
*
|
|
31
|
+
* Results are sorted by creation date (newest first) and support pagination
|
|
32
|
+
* and text search filtering.
|
|
29
33
|
*
|
|
30
34
|
* @param {AirweaveSDK.ListCollectionsGetRequest} request
|
|
31
35
|
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
32
36
|
*
|
|
33
37
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
38
|
+
* @throws {@link AirweaveSDK.TooManyRequestsError}
|
|
34
39
|
*
|
|
35
40
|
* @example
|
|
36
41
|
* await client.collections.list({
|
|
37
|
-
* skip:
|
|
38
|
-
* limit:
|
|
39
|
-
* search: "
|
|
42
|
+
* skip: 0,
|
|
43
|
+
* limit: 100,
|
|
44
|
+
* search: "customer"
|
|
40
45
|
* })
|
|
41
46
|
*/
|
|
42
47
|
list(request = {}, requestOptions) {
|
|
@@ -44,7 +49,7 @@ export class Collections {
|
|
|
44
49
|
}
|
|
45
50
|
__list() {
|
|
46
51
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
47
|
-
var _a, _b, _c
|
|
52
|
+
var _a, _b, _c;
|
|
48
53
|
const { skip, limit, search } = request;
|
|
49
54
|
const _queryParams = {};
|
|
50
55
|
if (skip != null) {
|
|
@@ -56,9 +61,9 @@ export class Collections {
|
|
|
56
61
|
if (search != null) {
|
|
57
62
|
_queryParams["search"] = search;
|
|
58
63
|
}
|
|
59
|
-
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);
|
|
60
65
|
const _response = yield core.fetcher({
|
|
61
|
-
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, "collections"),
|
|
62
67
|
method: "GET",
|
|
63
68
|
headers: _headers,
|
|
64
69
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -73,6 +78,8 @@ export class Collections {
|
|
|
73
78
|
switch (_response.error.statusCode) {
|
|
74
79
|
case 422:
|
|
75
80
|
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
81
|
+
case 429:
|
|
82
|
+
throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
76
83
|
default:
|
|
77
84
|
throw new errors.AirweaveSDKError({
|
|
78
85
|
statusCode: _response.error.statusCode,
|
|
@@ -99,15 +106,22 @@ export class Collections {
|
|
|
99
106
|
});
|
|
100
107
|
}
|
|
101
108
|
/**
|
|
102
|
-
* Create a new collection.
|
|
109
|
+
* Create a new collection in your organization.
|
|
110
|
+
*
|
|
111
|
+
* Collections are containers for organizing and searching across data from multiple
|
|
112
|
+
* sources. After creation, add source connections to begin syncing data.
|
|
103
113
|
*
|
|
104
|
-
* The
|
|
105
|
-
*
|
|
114
|
+
* The collection will be assigned a unique `readable_id` based on the name you provide,
|
|
115
|
+
* which is used in URLs and API calls. You can optionally configure:
|
|
116
|
+
*
|
|
117
|
+
* - **Sync schedule**: How frequently to automatically sync data from all sources
|
|
118
|
+
* - **Custom readable_id**: Provide your own identifier (must be unique and URL-safe)
|
|
106
119
|
*
|
|
107
120
|
* @param {AirweaveSDK.CollectionCreate} request
|
|
108
121
|
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
109
122
|
*
|
|
110
123
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
124
|
+
* @throws {@link AirweaveSDK.TooManyRequestsError}
|
|
111
125
|
*
|
|
112
126
|
* @example
|
|
113
127
|
* await client.collections.create({
|
|
@@ -120,10 +134,10 @@ export class Collections {
|
|
|
120
134
|
}
|
|
121
135
|
__create(request, requestOptions) {
|
|
122
136
|
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
-
var _a, _b, _c
|
|
124
|
-
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({
|
|
137
|
+
var _a, _b, _c;
|
|
138
|
+
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);
|
|
125
139
|
const _response = yield core.fetcher({
|
|
126
|
-
url: core.url.join((
|
|
140
|
+
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, "collections"),
|
|
127
141
|
method: "POST",
|
|
128
142
|
headers: _headers,
|
|
129
143
|
contentType: "application/json",
|
|
@@ -141,6 +155,8 @@ export class Collections {
|
|
|
141
155
|
switch (_response.error.statusCode) {
|
|
142
156
|
case 422:
|
|
143
157
|
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
158
|
+
case 429:
|
|
159
|
+
throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
144
160
|
default:
|
|
145
161
|
throw new errors.AirweaveSDKError({
|
|
146
162
|
statusCode: _response.error.statusCode,
|
|
@@ -167,25 +183,31 @@ export class Collections {
|
|
|
167
183
|
});
|
|
168
184
|
}
|
|
169
185
|
/**
|
|
170
|
-
* Retrieve a specific collection by its readable ID.
|
|
186
|
+
* Retrieve details of a specific collection by its readable ID.
|
|
187
|
+
*
|
|
188
|
+
* Returns the complete collection configuration including sync settings, status,
|
|
189
|
+
* and metadata. Use this to check the current state of a collection or to get
|
|
190
|
+
* configuration details before making updates.
|
|
171
191
|
*
|
|
172
192
|
* @param {string} readableId - The unique readable identifier of the collection (e.g., 'finance-data-ab123')
|
|
173
193
|
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
174
194
|
*
|
|
195
|
+
* @throws {@link AirweaveSDK.NotFoundError}
|
|
175
196
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
197
|
+
* @throws {@link AirweaveSDK.TooManyRequestsError}
|
|
176
198
|
*
|
|
177
199
|
* @example
|
|
178
|
-
* await client.collections.get("
|
|
200
|
+
* await client.collections.get("customer-support-tickets-x7k9m")
|
|
179
201
|
*/
|
|
180
202
|
get(readableId, requestOptions) {
|
|
181
203
|
return core.HttpResponsePromise.fromPromise(this.__get(readableId, requestOptions));
|
|
182
204
|
}
|
|
183
205
|
__get(readableId, requestOptions) {
|
|
184
206
|
return __awaiter(this, void 0, void 0, function* () {
|
|
185
|
-
var _a, _b, _c
|
|
186
|
-
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({
|
|
207
|
+
var _a, _b, _c;
|
|
208
|
+
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);
|
|
187
209
|
const _response = yield core.fetcher({
|
|
188
|
-
url: core.url.join((
|
|
210
|
+
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, `collections/${encodeURIComponent(readableId)}`),
|
|
189
211
|
method: "GET",
|
|
190
212
|
headers: _headers,
|
|
191
213
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -198,8 +220,12 @@ export class Collections {
|
|
|
198
220
|
}
|
|
199
221
|
if (_response.error.reason === "status-code") {
|
|
200
222
|
switch (_response.error.statusCode) {
|
|
223
|
+
case 404:
|
|
224
|
+
throw new AirweaveSDK.NotFoundError(_response.error.body, _response.rawResponse);
|
|
201
225
|
case 422:
|
|
202
226
|
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
227
|
+
case 429:
|
|
228
|
+
throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
203
229
|
default:
|
|
204
230
|
throw new errors.AirweaveSDKError({
|
|
205
231
|
statusCode: _response.error.statusCode,
|
|
@@ -226,29 +252,35 @@ export class Collections {
|
|
|
226
252
|
});
|
|
227
253
|
}
|
|
228
254
|
/**
|
|
229
|
-
*
|
|
255
|
+
* Permanently delete a collection and all associated data.
|
|
230
256
|
*
|
|
231
|
-
*
|
|
232
|
-
*
|
|
233
|
-
*
|
|
257
|
+
* This operation:
|
|
258
|
+
* - Removes all synced data from the vector database
|
|
259
|
+
* - Deletes all source connections within the collection
|
|
260
|
+
* - Cancels any scheduled sync jobs
|
|
261
|
+
* - Cleans up all related resources
|
|
262
|
+
*
|
|
263
|
+
* **Warning**: This action cannot be undone. All data will be permanently deleted.
|
|
234
264
|
*
|
|
235
265
|
* @param {string} readableId - The unique readable identifier of the collection to delete
|
|
236
266
|
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
237
267
|
*
|
|
268
|
+
* @throws {@link AirweaveSDK.NotFoundError}
|
|
238
269
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
270
|
+
* @throws {@link AirweaveSDK.TooManyRequestsError}
|
|
239
271
|
*
|
|
240
272
|
* @example
|
|
241
|
-
* await client.collections.delete("
|
|
273
|
+
* await client.collections.delete("customer-support-tickets-x7k9m")
|
|
242
274
|
*/
|
|
243
275
|
delete(readableId, requestOptions) {
|
|
244
276
|
return core.HttpResponsePromise.fromPromise(this.__delete(readableId, requestOptions));
|
|
245
277
|
}
|
|
246
278
|
__delete(readableId, requestOptions) {
|
|
247
279
|
return __awaiter(this, void 0, void 0, function* () {
|
|
248
|
-
var _a, _b, _c
|
|
249
|
-
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({
|
|
280
|
+
var _a, _b, _c;
|
|
281
|
+
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);
|
|
250
282
|
const _response = yield core.fetcher({
|
|
251
|
-
url: core.url.join((
|
|
283
|
+
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, `collections/${encodeURIComponent(readableId)}`),
|
|
252
284
|
method: "DELETE",
|
|
253
285
|
headers: _headers,
|
|
254
286
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -261,8 +293,12 @@ export class Collections {
|
|
|
261
293
|
}
|
|
262
294
|
if (_response.error.reason === "status-code") {
|
|
263
295
|
switch (_response.error.statusCode) {
|
|
296
|
+
case 404:
|
|
297
|
+
throw new AirweaveSDK.NotFoundError(_response.error.body, _response.rawResponse);
|
|
264
298
|
case 422:
|
|
265
299
|
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
300
|
+
case 429:
|
|
301
|
+
throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
266
302
|
default:
|
|
267
303
|
throw new errors.AirweaveSDKError({
|
|
268
304
|
statusCode: _response.error.statusCode,
|
|
@@ -289,30 +325,111 @@ export class Collections {
|
|
|
289
325
|
});
|
|
290
326
|
}
|
|
291
327
|
/**
|
|
292
|
-
*
|
|
328
|
+
* Update an existing collection's properties.
|
|
329
|
+
*
|
|
330
|
+
* You can modify:
|
|
331
|
+
* - **Name**: The display name shown in the UI
|
|
332
|
+
* - **Sync configuration**: Schedule settings for automatic data synchronization
|
|
333
|
+
*
|
|
334
|
+
* Note that the `readable_id` cannot be changed after creation to maintain stable
|
|
335
|
+
* API endpoints and preserve existing integrations.
|
|
336
|
+
*
|
|
337
|
+
* @param {string} readableId - The unique readable identifier of the collection to update
|
|
338
|
+
* @param {AirweaveSDK.CollectionUpdate} request
|
|
339
|
+
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
340
|
+
*
|
|
341
|
+
* @throws {@link AirweaveSDK.NotFoundError}
|
|
342
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
343
|
+
* @throws {@link AirweaveSDK.TooManyRequestsError}
|
|
344
|
+
*
|
|
345
|
+
* @example
|
|
346
|
+
* await client.collections.update("customer-support-tickets-x7k9m", {
|
|
347
|
+
* name: "Updated Finance Data"
|
|
348
|
+
* })
|
|
349
|
+
*/
|
|
350
|
+
update(readableId, request = {}, requestOptions) {
|
|
351
|
+
return core.HttpResponsePromise.fromPromise(this.__update(readableId, request, requestOptions));
|
|
352
|
+
}
|
|
353
|
+
__update(readableId_1) {
|
|
354
|
+
return __awaiter(this, arguments, void 0, function* (readableId, request = {}, requestOptions) {
|
|
355
|
+
var _a, _b, _c;
|
|
356
|
+
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);
|
|
357
|
+
const _response = yield core.fetcher({
|
|
358
|
+
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, `collections/${encodeURIComponent(readableId)}`),
|
|
359
|
+
method: "PATCH",
|
|
360
|
+
headers: _headers,
|
|
361
|
+
contentType: "application/json",
|
|
362
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
363
|
+
requestType: "json",
|
|
364
|
+
body: request,
|
|
365
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
366
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
367
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
368
|
+
});
|
|
369
|
+
if (_response.ok) {
|
|
370
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
371
|
+
}
|
|
372
|
+
if (_response.error.reason === "status-code") {
|
|
373
|
+
switch (_response.error.statusCode) {
|
|
374
|
+
case 404:
|
|
375
|
+
throw new AirweaveSDK.NotFoundError(_response.error.body, _response.rawResponse);
|
|
376
|
+
case 422:
|
|
377
|
+
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
378
|
+
case 429:
|
|
379
|
+
throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
380
|
+
default:
|
|
381
|
+
throw new errors.AirweaveSDKError({
|
|
382
|
+
statusCode: _response.error.statusCode,
|
|
383
|
+
body: _response.error.body,
|
|
384
|
+
rawResponse: _response.rawResponse,
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
switch (_response.error.reason) {
|
|
389
|
+
case "non-json":
|
|
390
|
+
throw new errors.AirweaveSDKError({
|
|
391
|
+
statusCode: _response.error.statusCode,
|
|
392
|
+
body: _response.error.rawBody,
|
|
393
|
+
rawResponse: _response.rawResponse,
|
|
394
|
+
});
|
|
395
|
+
case "timeout":
|
|
396
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling PATCH /collections/{readable_id}.");
|
|
397
|
+
case "unknown":
|
|
398
|
+
throw new errors.AirweaveSDKError({
|
|
399
|
+
message: _response.error.errorMessage,
|
|
400
|
+
rawResponse: _response.rawResponse,
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* Trigger data synchronization for all source connections in a collection.
|
|
293
407
|
*
|
|
294
|
-
*
|
|
295
|
-
*
|
|
296
|
-
*
|
|
297
|
-
* endpoints
|
|
408
|
+
* Starts sync jobs for every source connection in the collection, pulling the latest
|
|
409
|
+
* data from each connected source. Jobs run asynchronously in the background.
|
|
410
|
+
*
|
|
411
|
+
* Returns a list of sync jobs that were created. Use the source connection endpoints
|
|
412
|
+
* to monitor the progress and status of individual sync jobs.
|
|
298
413
|
*
|
|
299
414
|
* @param {string} readableId - The unique readable identifier of the collection to refresh
|
|
300
415
|
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
301
416
|
*
|
|
417
|
+
* @throws {@link AirweaveSDK.NotFoundError}
|
|
302
418
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
419
|
+
* @throws {@link AirweaveSDK.TooManyRequestsError}
|
|
303
420
|
*
|
|
304
421
|
* @example
|
|
305
|
-
* await client.collections.refreshAllSourceConnections("
|
|
422
|
+
* await client.collections.refreshAllSourceConnections("customer-support-tickets-x7k9m")
|
|
306
423
|
*/
|
|
307
424
|
refreshAllSourceConnections(readableId, requestOptions) {
|
|
308
425
|
return core.HttpResponsePromise.fromPromise(this.__refreshAllSourceConnections(readableId, requestOptions));
|
|
309
426
|
}
|
|
310
427
|
__refreshAllSourceConnections(readableId, requestOptions) {
|
|
311
428
|
return __awaiter(this, void 0, void 0, function* () {
|
|
312
|
-
var _a, _b, _c
|
|
313
|
-
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({
|
|
429
|
+
var _a, _b, _c;
|
|
430
|
+
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);
|
|
314
431
|
const _response = yield core.fetcher({
|
|
315
|
-
url: core.url.join((
|
|
432
|
+
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, `collections/${encodeURIComponent(readableId)}/refresh_all`),
|
|
316
433
|
method: "POST",
|
|
317
434
|
headers: _headers,
|
|
318
435
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -325,8 +442,12 @@ export class Collections {
|
|
|
325
442
|
}
|
|
326
443
|
if (_response.error.reason === "status-code") {
|
|
327
444
|
switch (_response.error.statusCode) {
|
|
445
|
+
case 404:
|
|
446
|
+
throw new AirweaveSDK.NotFoundError(_response.error.body, _response.rawResponse);
|
|
328
447
|
case 422:
|
|
329
448
|
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
449
|
+
case 429:
|
|
450
|
+
throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
330
451
|
default:
|
|
331
452
|
throw new errors.AirweaveSDKError({
|
|
332
453
|
statusCode: _response.error.statusCode,
|
|
@@ -353,23 +474,29 @@ export class Collections {
|
|
|
353
474
|
});
|
|
354
475
|
}
|
|
355
476
|
/**
|
|
356
|
-
*
|
|
477
|
+
* **DEPRECATED**: Use POST /collections/{readable_id}/search instead.
|
|
357
478
|
*
|
|
358
|
-
*
|
|
359
|
-
*
|
|
479
|
+
* This legacy GET endpoint provides basic search functionality via query parameters.
|
|
480
|
+
* Migrate to the POST endpoint for access to advanced features like:
|
|
481
|
+
* - Structured filters
|
|
482
|
+
* - Query expansion
|
|
483
|
+
* - Reranking
|
|
484
|
+
* - Streaming responses
|
|
360
485
|
*
|
|
361
486
|
* @param {string} readableId - The unique readable identifier of the collection to search
|
|
362
487
|
* @param {AirweaveSDK.SearchGetLegacyCollectionsReadableIdSearchGetRequest} request
|
|
363
488
|
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
364
489
|
*
|
|
490
|
+
* @throws {@link AirweaveSDK.NotFoundError}
|
|
365
491
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
492
|
+
* @throws {@link AirweaveSDK.TooManyRequestsError}
|
|
366
493
|
*
|
|
367
494
|
* @example
|
|
368
|
-
* await client.collections.searchGetLegacy("
|
|
369
|
-
* query: "
|
|
495
|
+
* await client.collections.searchGetLegacy("customer-support-tickets-x7k9m", {
|
|
496
|
+
* query: "How do I reset my password?",
|
|
370
497
|
* response_type: "raw",
|
|
371
|
-
* limit:
|
|
372
|
-
* offset:
|
|
498
|
+
* limit: 10,
|
|
499
|
+
* offset: 0,
|
|
373
500
|
* recency_bias: 1.1
|
|
374
501
|
* })
|
|
375
502
|
*/
|
|
@@ -378,7 +505,7 @@ export class Collections {
|
|
|
378
505
|
}
|
|
379
506
|
__searchGetLegacy(readableId, request, requestOptions) {
|
|
380
507
|
return __awaiter(this, void 0, void 0, function* () {
|
|
381
|
-
var _a, _b, _c
|
|
508
|
+
var _a, _b, _c;
|
|
382
509
|
const { query, response_type: responseType, limit, offset, recency_bias: recencyBias } = request;
|
|
383
510
|
const _queryParams = {};
|
|
384
511
|
_queryParams["query"] = query;
|
|
@@ -394,9 +521,9 @@ export class Collections {
|
|
|
394
521
|
if (recencyBias != null) {
|
|
395
522
|
_queryParams["recency_bias"] = recencyBias.toString();
|
|
396
523
|
}
|
|
397
|
-
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({
|
|
524
|
+
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);
|
|
398
525
|
const _response = yield core.fetcher({
|
|
399
|
-
url: core.url.join((
|
|
526
|
+
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, `collections/${encodeURIComponent(readableId)}/search`),
|
|
400
527
|
method: "GET",
|
|
401
528
|
headers: _headers,
|
|
402
529
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -409,8 +536,12 @@ export class Collections {
|
|
|
409
536
|
}
|
|
410
537
|
if (_response.error.reason === "status-code") {
|
|
411
538
|
switch (_response.error.statusCode) {
|
|
539
|
+
case 404:
|
|
540
|
+
throw new AirweaveSDK.NotFoundError(_response.error.body, _response.rawResponse);
|
|
412
541
|
case 422:
|
|
413
542
|
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
543
|
+
case 429:
|
|
544
|
+
throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
414
545
|
default:
|
|
415
546
|
throw new errors.AirweaveSDKError({
|
|
416
547
|
statusCode: _response.error.statusCode,
|
|
@@ -437,20 +568,35 @@ export class Collections {
|
|
|
437
568
|
});
|
|
438
569
|
}
|
|
439
570
|
/**
|
|
440
|
-
* Search your collection.
|
|
571
|
+
* Search your collection using semantic and hybrid search.
|
|
572
|
+
*
|
|
573
|
+
* This is the primary search endpoint providing powerful AI-powered search capabilities:
|
|
441
574
|
*
|
|
442
|
-
*
|
|
575
|
+
* **Search Strategies:**
|
|
576
|
+
* - **hybrid** (default): Combines neural (semantic) and keyword (BM25) matching
|
|
577
|
+
* - **neural**: Pure semantic search using embeddings
|
|
578
|
+
* - **keyword**: Traditional keyword-based BM25 search
|
|
579
|
+
*
|
|
580
|
+
* **Features:**
|
|
581
|
+
* - **Query expansion**: Generate query variations to improve recall
|
|
582
|
+
* - **Filter interpretation**: Extract structured filters from natural language
|
|
583
|
+
* - **Reranking**: LLM-based reranking for improved relevance
|
|
584
|
+
* - **Answer generation**: AI-generated answers based on search results
|
|
585
|
+
*
|
|
586
|
+
* **Note**: Accepts both new SearchRequest and legacy LegacySearchRequest formats
|
|
443
587
|
* for backwards compatibility.
|
|
444
588
|
*
|
|
445
|
-
* @param {string} readableId - The unique readable identifier of the collection
|
|
589
|
+
* @param {string} readableId - The unique readable identifier of the collection to search
|
|
446
590
|
* @param {AirweaveSDK.SearchCollectionsReadableIdSearchPostRequest} request
|
|
447
591
|
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
448
592
|
*
|
|
593
|
+
* @throws {@link AirweaveSDK.NotFoundError}
|
|
449
594
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
595
|
+
* @throws {@link AirweaveSDK.TooManyRequestsError}
|
|
450
596
|
*
|
|
451
597
|
* @example
|
|
452
|
-
* await client.collections.search("
|
|
453
|
-
* query: "
|
|
598
|
+
* await client.collections.search("customer-support-tickets-x7k9m", {
|
|
599
|
+
* query: "How do I reset my password?"
|
|
454
600
|
* })
|
|
455
601
|
*/
|
|
456
602
|
search(readableId, request, requestOptions) {
|
|
@@ -458,10 +604,10 @@ export class Collections {
|
|
|
458
604
|
}
|
|
459
605
|
__search(readableId, request, requestOptions) {
|
|
460
606
|
return __awaiter(this, void 0, void 0, function* () {
|
|
461
|
-
var _a, _b, _c
|
|
462
|
-
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({
|
|
607
|
+
var _a, _b, _c;
|
|
608
|
+
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);
|
|
463
609
|
const _response = yield core.fetcher({
|
|
464
|
-
url: core.url.join((
|
|
610
|
+
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, `collections/${encodeURIComponent(readableId)}/search`),
|
|
465
611
|
method: "POST",
|
|
466
612
|
headers: _headers,
|
|
467
613
|
contentType: "application/json",
|
|
@@ -473,15 +619,16 @@ export class Collections {
|
|
|
473
619
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
474
620
|
});
|
|
475
621
|
if (_response.ok) {
|
|
476
|
-
return {
|
|
477
|
-
data: _response.body,
|
|
478
|
-
rawResponse: _response.rawResponse,
|
|
479
|
-
};
|
|
622
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
480
623
|
}
|
|
481
624
|
if (_response.error.reason === "status-code") {
|
|
482
625
|
switch (_response.error.statusCode) {
|
|
626
|
+
case 404:
|
|
627
|
+
throw new AirweaveSDK.NotFoundError(_response.error.body, _response.rawResponse);
|
|
483
628
|
case 422:
|
|
484
629
|
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
630
|
+
case 429:
|
|
631
|
+
throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
485
632
|
default:
|
|
486
633
|
throw new errors.AirweaveSDKError({
|
|
487
634
|
statusCode: _response.error.statusCode,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as AirweaveSDK from "../../../../index.mjs";
|
|
4
5
|
/**
|
|
5
6
|
* @example
|
|
6
7
|
* {
|
|
@@ -13,4 +14,6 @@ export interface CollectionCreate {
|
|
|
13
14
|
name: string;
|
|
14
15
|
/** URL-safe unique identifier used in API endpoints. Must contain only lowercase letters, numbers, and hyphens. If not provided, it will be automatically generated from the collection name with a random suffix for uniqueness (e.g., 'finance-data-ab123'). */
|
|
15
16
|
readable_id?: string;
|
|
17
|
+
/** Default sync configuration for all syncs in this collection. This provides collection-level defaults that can be overridden at sync or job level. */
|
|
18
|
+
sync_config?: AirweaveSDK.SyncConfig;
|
|
16
19
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as AirweaveSDK from "../../../../index.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* name: "Updated Finance Data"
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface CollectionUpdate {
|
|
12
|
+
/** Updated display name for the collection. Must be between 4 and 64 characters. */
|
|
13
|
+
name?: string;
|
|
14
|
+
/** Default sync configuration for all syncs in this collection. This provides collection-level defaults that can be overridden at sync or job level. */
|
|
15
|
+
sync_config?: AirweaveSDK.SyncConfig;
|
|
16
|
+
}
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* @example
|
|
6
6
|
* {
|
|
7
|
-
* skip:
|
|
8
|
-
* limit:
|
|
9
|
-
* search: "
|
|
7
|
+
* skip: 0,
|
|
8
|
+
* limit: 100,
|
|
9
|
+
* search: "customer"
|
|
10
10
|
* }
|
|
11
11
|
*/
|
|
12
12
|
export interface ListCollectionsGetRequest {
|
|
@@ -14,6 +14,6 @@ export interface ListCollectionsGetRequest {
|
|
|
14
14
|
skip?: number;
|
|
15
15
|
/** Maximum number of collections to return (1-1000) */
|
|
16
16
|
limit?: number;
|
|
17
|
-
/** Search term to filter by name or readable_id */
|
|
17
|
+
/** Search term to filter collections by name or readable_id */
|
|
18
18
|
search?: string;
|
|
19
19
|
}
|
|
@@ -5,10 +5,10 @@ import * as AirweaveSDK from "../../../../index.mjs";
|
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
7
|
* {
|
|
8
|
-
* query: "
|
|
8
|
+
* query: "How do I reset my password?",
|
|
9
9
|
* response_type: "raw",
|
|
10
|
-
* limit:
|
|
11
|
-
* offset:
|
|
10
|
+
* limit: 10,
|
|
11
|
+
* offset: 0,
|
|
12
12
|
* recency_bias: 1.1
|
|
13
13
|
* }
|
|
14
14
|
*/
|
|
@@ -21,6 +21,6 @@ export interface SearchGetLegacyCollectionsReadableIdSearchGetRequest {
|
|
|
21
21
|
limit?: number;
|
|
22
22
|
/** Number of results to skip for pagination */
|
|
23
23
|
offset?: number;
|
|
24
|
-
/** How much to weigh recency vs similarity (0
|
|
24
|
+
/** How much to weigh recency vs similarity (0=similarity only, 1=recency only) */
|
|
25
25
|
recency_bias?: number;
|
|
26
26
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { type ListCollectionsGetRequest } from "./ListCollectionsGetRequest.mjs";
|
|
2
2
|
export { type CollectionCreate } from "./CollectionCreate.mjs";
|
|
3
|
+
export { type CollectionUpdate } from "./CollectionUpdate.mjs";
|
|
3
4
|
export { type SearchGetLegacyCollectionsReadableIdSearchGetRequest } from "./SearchGetLegacyCollectionsReadableIdSearchGetRequest.mjs";
|
|
@@ -2,5 +2,7 @@ export * as collections from "./collections/index.mjs";
|
|
|
2
2
|
export * from "./collections/types/index.mjs";
|
|
3
3
|
export * as sources from "./sources/index.mjs";
|
|
4
4
|
export * as sourceConnections from "./sourceConnections/index.mjs";
|
|
5
|
+
export * as webhooks from "./webhooks/index.mjs";
|
|
5
6
|
export * from "./collections/client/requests/index.mjs";
|
|
6
7
|
export * from "./sourceConnections/client/requests/index.mjs";
|
|
8
|
+
export * from "./webhooks/client/requests/index.mjs";
|
|
@@ -2,5 +2,7 @@ export * as collections from "./collections/index.mjs";
|
|
|
2
2
|
export * from "./collections/types/index.mjs";
|
|
3
3
|
export * as sources from "./sources/index.mjs";
|
|
4
4
|
export * as sourceConnections from "./sourceConnections/index.mjs";
|
|
5
|
+
export * as webhooks from "./webhooks/index.mjs";
|
|
5
6
|
export * from "./collections/client/requests/index.mjs";
|
|
6
7
|
export * from "./sourceConnections/client/requests/index.mjs";
|
|
8
|
+
export * from "./webhooks/client/requests/index.mjs";
|