@airweave/sdk 0.7.19 → 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
|
@@ -59,20 +59,25 @@ class Collections {
|
|
|
59
59
|
this._options = _options;
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
|
-
*
|
|
62
|
+
* Retrieve all collections belonging to your organization.
|
|
63
63
|
*
|
|
64
|
-
* Collections are
|
|
64
|
+
* Collections are containers that group related data from one or more source
|
|
65
|
+
* connections, enabling unified search across multiple data sources.
|
|
66
|
+
*
|
|
67
|
+
* Results are sorted by creation date (newest first) and support pagination
|
|
68
|
+
* and text search filtering.
|
|
65
69
|
*
|
|
66
70
|
* @param {AirweaveSDK.ListCollectionsGetRequest} request
|
|
67
71
|
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
68
72
|
*
|
|
69
73
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
74
|
+
* @throws {@link AirweaveSDK.TooManyRequestsError}
|
|
70
75
|
*
|
|
71
76
|
* @example
|
|
72
77
|
* await client.collections.list({
|
|
73
|
-
* skip:
|
|
74
|
-
* limit:
|
|
75
|
-
* search: "
|
|
78
|
+
* skip: 0,
|
|
79
|
+
* limit: 100,
|
|
80
|
+
* search: "customer"
|
|
76
81
|
* })
|
|
77
82
|
*/
|
|
78
83
|
list(request = {}, requestOptions) {
|
|
@@ -80,7 +85,7 @@ class Collections {
|
|
|
80
85
|
}
|
|
81
86
|
__list() {
|
|
82
87
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
83
|
-
var _a, _b, _c
|
|
88
|
+
var _a, _b, _c;
|
|
84
89
|
const { skip, limit, search } = request;
|
|
85
90
|
const _queryParams = {};
|
|
86
91
|
if (skip != null) {
|
|
@@ -92,9 +97,9 @@ class Collections {
|
|
|
92
97
|
if (search != null) {
|
|
93
98
|
_queryParams["search"] = search;
|
|
94
99
|
}
|
|
95
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({
|
|
100
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
96
101
|
const _response = yield core.fetcher({
|
|
97
|
-
url: core.url.join((
|
|
102
|
+
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"),
|
|
98
103
|
method: "GET",
|
|
99
104
|
headers: _headers,
|
|
100
105
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -109,6 +114,8 @@ class Collections {
|
|
|
109
114
|
switch (_response.error.statusCode) {
|
|
110
115
|
case 422:
|
|
111
116
|
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
117
|
+
case 429:
|
|
118
|
+
throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
112
119
|
default:
|
|
113
120
|
throw new errors.AirweaveSDKError({
|
|
114
121
|
statusCode: _response.error.statusCode,
|
|
@@ -135,15 +142,22 @@ class Collections {
|
|
|
135
142
|
});
|
|
136
143
|
}
|
|
137
144
|
/**
|
|
138
|
-
* Create a new collection.
|
|
145
|
+
* Create a new collection in your organization.
|
|
146
|
+
*
|
|
147
|
+
* Collections are containers for organizing and searching across data from multiple
|
|
148
|
+
* sources. After creation, add source connections to begin syncing data.
|
|
139
149
|
*
|
|
140
|
-
* The
|
|
141
|
-
*
|
|
150
|
+
* The collection will be assigned a unique `readable_id` based on the name you provide,
|
|
151
|
+
* which is used in URLs and API calls. You can optionally configure:
|
|
152
|
+
*
|
|
153
|
+
* - **Sync schedule**: How frequently to automatically sync data from all sources
|
|
154
|
+
* - **Custom readable_id**: Provide your own identifier (must be unique and URL-safe)
|
|
142
155
|
*
|
|
143
156
|
* @param {AirweaveSDK.CollectionCreate} request
|
|
144
157
|
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
145
158
|
*
|
|
146
159
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
160
|
+
* @throws {@link AirweaveSDK.TooManyRequestsError}
|
|
147
161
|
*
|
|
148
162
|
* @example
|
|
149
163
|
* await client.collections.create({
|
|
@@ -156,10 +170,10 @@ class Collections {
|
|
|
156
170
|
}
|
|
157
171
|
__create(request, requestOptions) {
|
|
158
172
|
return __awaiter(this, void 0, void 0, function* () {
|
|
159
|
-
var _a, _b, _c
|
|
160
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({
|
|
173
|
+
var _a, _b, _c;
|
|
174
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
161
175
|
const _response = yield core.fetcher({
|
|
162
|
-
url: core.url.join((
|
|
176
|
+
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"),
|
|
163
177
|
method: "POST",
|
|
164
178
|
headers: _headers,
|
|
165
179
|
contentType: "application/json",
|
|
@@ -177,6 +191,8 @@ class Collections {
|
|
|
177
191
|
switch (_response.error.statusCode) {
|
|
178
192
|
case 422:
|
|
179
193
|
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
194
|
+
case 429:
|
|
195
|
+
throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
180
196
|
default:
|
|
181
197
|
throw new errors.AirweaveSDKError({
|
|
182
198
|
statusCode: _response.error.statusCode,
|
|
@@ -203,25 +219,31 @@ class Collections {
|
|
|
203
219
|
});
|
|
204
220
|
}
|
|
205
221
|
/**
|
|
206
|
-
* Retrieve a specific collection by its readable ID.
|
|
222
|
+
* Retrieve details of a specific collection by its readable ID.
|
|
223
|
+
*
|
|
224
|
+
* Returns the complete collection configuration including sync settings, status,
|
|
225
|
+
* and metadata. Use this to check the current state of a collection or to get
|
|
226
|
+
* configuration details before making updates.
|
|
207
227
|
*
|
|
208
228
|
* @param {string} readableId - The unique readable identifier of the collection (e.g., 'finance-data-ab123')
|
|
209
229
|
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
210
230
|
*
|
|
231
|
+
* @throws {@link AirweaveSDK.NotFoundError}
|
|
211
232
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
233
|
+
* @throws {@link AirweaveSDK.TooManyRequestsError}
|
|
212
234
|
*
|
|
213
235
|
* @example
|
|
214
|
-
* await client.collections.get("
|
|
236
|
+
* await client.collections.get("customer-support-tickets-x7k9m")
|
|
215
237
|
*/
|
|
216
238
|
get(readableId, requestOptions) {
|
|
217
239
|
return core.HttpResponsePromise.fromPromise(this.__get(readableId, requestOptions));
|
|
218
240
|
}
|
|
219
241
|
__get(readableId, requestOptions) {
|
|
220
242
|
return __awaiter(this, void 0, void 0, function* () {
|
|
221
|
-
var _a, _b, _c
|
|
222
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({
|
|
243
|
+
var _a, _b, _c;
|
|
244
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
223
245
|
const _response = yield core.fetcher({
|
|
224
|
-
url: core.url.join((
|
|
246
|
+
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)}`),
|
|
225
247
|
method: "GET",
|
|
226
248
|
headers: _headers,
|
|
227
249
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -234,8 +256,12 @@ class Collections {
|
|
|
234
256
|
}
|
|
235
257
|
if (_response.error.reason === "status-code") {
|
|
236
258
|
switch (_response.error.statusCode) {
|
|
259
|
+
case 404:
|
|
260
|
+
throw new AirweaveSDK.NotFoundError(_response.error.body, _response.rawResponse);
|
|
237
261
|
case 422:
|
|
238
262
|
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
263
|
+
case 429:
|
|
264
|
+
throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
239
265
|
default:
|
|
240
266
|
throw new errors.AirweaveSDKError({
|
|
241
267
|
statusCode: _response.error.statusCode,
|
|
@@ -262,29 +288,35 @@ class Collections {
|
|
|
262
288
|
});
|
|
263
289
|
}
|
|
264
290
|
/**
|
|
265
|
-
*
|
|
291
|
+
* Permanently delete a collection and all associated data.
|
|
266
292
|
*
|
|
267
|
-
*
|
|
268
|
-
*
|
|
269
|
-
*
|
|
293
|
+
* This operation:
|
|
294
|
+
* - Removes all synced data from the vector database
|
|
295
|
+
* - Deletes all source connections within the collection
|
|
296
|
+
* - Cancels any scheduled sync jobs
|
|
297
|
+
* - Cleans up all related resources
|
|
298
|
+
*
|
|
299
|
+
* **Warning**: This action cannot be undone. All data will be permanently deleted.
|
|
270
300
|
*
|
|
271
301
|
* @param {string} readableId - The unique readable identifier of the collection to delete
|
|
272
302
|
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
273
303
|
*
|
|
304
|
+
* @throws {@link AirweaveSDK.NotFoundError}
|
|
274
305
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
306
|
+
* @throws {@link AirweaveSDK.TooManyRequestsError}
|
|
275
307
|
*
|
|
276
308
|
* @example
|
|
277
|
-
* await client.collections.delete("
|
|
309
|
+
* await client.collections.delete("customer-support-tickets-x7k9m")
|
|
278
310
|
*/
|
|
279
311
|
delete(readableId, requestOptions) {
|
|
280
312
|
return core.HttpResponsePromise.fromPromise(this.__delete(readableId, requestOptions));
|
|
281
313
|
}
|
|
282
314
|
__delete(readableId, requestOptions) {
|
|
283
315
|
return __awaiter(this, void 0, void 0, function* () {
|
|
284
|
-
var _a, _b, _c
|
|
285
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({
|
|
316
|
+
var _a, _b, _c;
|
|
317
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
286
318
|
const _response = yield core.fetcher({
|
|
287
|
-
url: core.url.join((
|
|
319
|
+
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)}`),
|
|
288
320
|
method: "DELETE",
|
|
289
321
|
headers: _headers,
|
|
290
322
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -297,8 +329,12 @@ class Collections {
|
|
|
297
329
|
}
|
|
298
330
|
if (_response.error.reason === "status-code") {
|
|
299
331
|
switch (_response.error.statusCode) {
|
|
332
|
+
case 404:
|
|
333
|
+
throw new AirweaveSDK.NotFoundError(_response.error.body, _response.rawResponse);
|
|
300
334
|
case 422:
|
|
301
335
|
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
336
|
+
case 429:
|
|
337
|
+
throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
302
338
|
default:
|
|
303
339
|
throw new errors.AirweaveSDKError({
|
|
304
340
|
statusCode: _response.error.statusCode,
|
|
@@ -325,30 +361,111 @@ class Collections {
|
|
|
325
361
|
});
|
|
326
362
|
}
|
|
327
363
|
/**
|
|
328
|
-
*
|
|
364
|
+
* Update an existing collection's properties.
|
|
365
|
+
*
|
|
366
|
+
* You can modify:
|
|
367
|
+
* - **Name**: The display name shown in the UI
|
|
368
|
+
* - **Sync configuration**: Schedule settings for automatic data synchronization
|
|
369
|
+
*
|
|
370
|
+
* Note that the `readable_id` cannot be changed after creation to maintain stable
|
|
371
|
+
* API endpoints and preserve existing integrations.
|
|
372
|
+
*
|
|
373
|
+
* @param {string} readableId - The unique readable identifier of the collection to update
|
|
374
|
+
* @param {AirweaveSDK.CollectionUpdate} request
|
|
375
|
+
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
376
|
+
*
|
|
377
|
+
* @throws {@link AirweaveSDK.NotFoundError}
|
|
378
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
379
|
+
* @throws {@link AirweaveSDK.TooManyRequestsError}
|
|
380
|
+
*
|
|
381
|
+
* @example
|
|
382
|
+
* await client.collections.update("customer-support-tickets-x7k9m", {
|
|
383
|
+
* name: "Updated Finance Data"
|
|
384
|
+
* })
|
|
385
|
+
*/
|
|
386
|
+
update(readableId, request = {}, requestOptions) {
|
|
387
|
+
return core.HttpResponsePromise.fromPromise(this.__update(readableId, request, requestOptions));
|
|
388
|
+
}
|
|
389
|
+
__update(readableId_1) {
|
|
390
|
+
return __awaiter(this, arguments, void 0, function* (readableId, request = {}, requestOptions) {
|
|
391
|
+
var _a, _b, _c;
|
|
392
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
393
|
+
const _response = yield core.fetcher({
|
|
394
|
+
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)}`),
|
|
395
|
+
method: "PATCH",
|
|
396
|
+
headers: _headers,
|
|
397
|
+
contentType: "application/json",
|
|
398
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
399
|
+
requestType: "json",
|
|
400
|
+
body: request,
|
|
401
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
402
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
403
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
404
|
+
});
|
|
405
|
+
if (_response.ok) {
|
|
406
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
407
|
+
}
|
|
408
|
+
if (_response.error.reason === "status-code") {
|
|
409
|
+
switch (_response.error.statusCode) {
|
|
410
|
+
case 404:
|
|
411
|
+
throw new AirweaveSDK.NotFoundError(_response.error.body, _response.rawResponse);
|
|
412
|
+
case 422:
|
|
413
|
+
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
414
|
+
case 429:
|
|
415
|
+
throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
416
|
+
default:
|
|
417
|
+
throw new errors.AirweaveSDKError({
|
|
418
|
+
statusCode: _response.error.statusCode,
|
|
419
|
+
body: _response.error.body,
|
|
420
|
+
rawResponse: _response.rawResponse,
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
switch (_response.error.reason) {
|
|
425
|
+
case "non-json":
|
|
426
|
+
throw new errors.AirweaveSDKError({
|
|
427
|
+
statusCode: _response.error.statusCode,
|
|
428
|
+
body: _response.error.rawBody,
|
|
429
|
+
rawResponse: _response.rawResponse,
|
|
430
|
+
});
|
|
431
|
+
case "timeout":
|
|
432
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling PATCH /collections/{readable_id}.");
|
|
433
|
+
case "unknown":
|
|
434
|
+
throw new errors.AirweaveSDKError({
|
|
435
|
+
message: _response.error.errorMessage,
|
|
436
|
+
rawResponse: _response.rawResponse,
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* Trigger data synchronization for all source connections in a collection.
|
|
329
443
|
*
|
|
330
|
-
*
|
|
331
|
-
*
|
|
332
|
-
*
|
|
333
|
-
* endpoints
|
|
444
|
+
* Starts sync jobs for every source connection in the collection, pulling the latest
|
|
445
|
+
* data from each connected source. Jobs run asynchronously in the background.
|
|
446
|
+
*
|
|
447
|
+
* Returns a list of sync jobs that were created. Use the source connection endpoints
|
|
448
|
+
* to monitor the progress and status of individual sync jobs.
|
|
334
449
|
*
|
|
335
450
|
* @param {string} readableId - The unique readable identifier of the collection to refresh
|
|
336
451
|
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
337
452
|
*
|
|
453
|
+
* @throws {@link AirweaveSDK.NotFoundError}
|
|
338
454
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
455
|
+
* @throws {@link AirweaveSDK.TooManyRequestsError}
|
|
339
456
|
*
|
|
340
457
|
* @example
|
|
341
|
-
* await client.collections.refreshAllSourceConnections("
|
|
458
|
+
* await client.collections.refreshAllSourceConnections("customer-support-tickets-x7k9m")
|
|
342
459
|
*/
|
|
343
460
|
refreshAllSourceConnections(readableId, requestOptions) {
|
|
344
461
|
return core.HttpResponsePromise.fromPromise(this.__refreshAllSourceConnections(readableId, requestOptions));
|
|
345
462
|
}
|
|
346
463
|
__refreshAllSourceConnections(readableId, requestOptions) {
|
|
347
464
|
return __awaiter(this, void 0, void 0, function* () {
|
|
348
|
-
var _a, _b, _c
|
|
349
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({
|
|
465
|
+
var _a, _b, _c;
|
|
466
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
350
467
|
const _response = yield core.fetcher({
|
|
351
|
-
url: core.url.join((
|
|
468
|
+
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`),
|
|
352
469
|
method: "POST",
|
|
353
470
|
headers: _headers,
|
|
354
471
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -361,8 +478,12 @@ class Collections {
|
|
|
361
478
|
}
|
|
362
479
|
if (_response.error.reason === "status-code") {
|
|
363
480
|
switch (_response.error.statusCode) {
|
|
481
|
+
case 404:
|
|
482
|
+
throw new AirweaveSDK.NotFoundError(_response.error.body, _response.rawResponse);
|
|
364
483
|
case 422:
|
|
365
484
|
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
485
|
+
case 429:
|
|
486
|
+
throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
366
487
|
default:
|
|
367
488
|
throw new errors.AirweaveSDKError({
|
|
368
489
|
statusCode: _response.error.statusCode,
|
|
@@ -389,23 +510,29 @@ class Collections {
|
|
|
389
510
|
});
|
|
390
511
|
}
|
|
391
512
|
/**
|
|
392
|
-
*
|
|
513
|
+
* **DEPRECATED**: Use POST /collections/{readable_id}/search instead.
|
|
393
514
|
*
|
|
394
|
-
*
|
|
395
|
-
*
|
|
515
|
+
* This legacy GET endpoint provides basic search functionality via query parameters.
|
|
516
|
+
* Migrate to the POST endpoint for access to advanced features like:
|
|
517
|
+
* - Structured filters
|
|
518
|
+
* - Query expansion
|
|
519
|
+
* - Reranking
|
|
520
|
+
* - Streaming responses
|
|
396
521
|
*
|
|
397
522
|
* @param {string} readableId - The unique readable identifier of the collection to search
|
|
398
523
|
* @param {AirweaveSDK.SearchGetLegacyCollectionsReadableIdSearchGetRequest} request
|
|
399
524
|
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
400
525
|
*
|
|
526
|
+
* @throws {@link AirweaveSDK.NotFoundError}
|
|
401
527
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
528
|
+
* @throws {@link AirweaveSDK.TooManyRequestsError}
|
|
402
529
|
*
|
|
403
530
|
* @example
|
|
404
|
-
* await client.collections.searchGetLegacy("
|
|
405
|
-
* query: "
|
|
531
|
+
* await client.collections.searchGetLegacy("customer-support-tickets-x7k9m", {
|
|
532
|
+
* query: "How do I reset my password?",
|
|
406
533
|
* response_type: "raw",
|
|
407
|
-
* limit:
|
|
408
|
-
* offset:
|
|
534
|
+
* limit: 10,
|
|
535
|
+
* offset: 0,
|
|
409
536
|
* recency_bias: 1.1
|
|
410
537
|
* })
|
|
411
538
|
*/
|
|
@@ -414,7 +541,7 @@ class Collections {
|
|
|
414
541
|
}
|
|
415
542
|
__searchGetLegacy(readableId, request, requestOptions) {
|
|
416
543
|
return __awaiter(this, void 0, void 0, function* () {
|
|
417
|
-
var _a, _b, _c
|
|
544
|
+
var _a, _b, _c;
|
|
418
545
|
const { query, response_type: responseType, limit, offset, recency_bias: recencyBias } = request;
|
|
419
546
|
const _queryParams = {};
|
|
420
547
|
_queryParams["query"] = query;
|
|
@@ -430,9 +557,9 @@ class Collections {
|
|
|
430
557
|
if (recencyBias != null) {
|
|
431
558
|
_queryParams["recency_bias"] = recencyBias.toString();
|
|
432
559
|
}
|
|
433
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({
|
|
560
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
434
561
|
const _response = yield core.fetcher({
|
|
435
|
-
url: core.url.join((
|
|
562
|
+
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`),
|
|
436
563
|
method: "GET",
|
|
437
564
|
headers: _headers,
|
|
438
565
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -445,8 +572,12 @@ class Collections {
|
|
|
445
572
|
}
|
|
446
573
|
if (_response.error.reason === "status-code") {
|
|
447
574
|
switch (_response.error.statusCode) {
|
|
575
|
+
case 404:
|
|
576
|
+
throw new AirweaveSDK.NotFoundError(_response.error.body, _response.rawResponse);
|
|
448
577
|
case 422:
|
|
449
578
|
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
579
|
+
case 429:
|
|
580
|
+
throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
450
581
|
default:
|
|
451
582
|
throw new errors.AirweaveSDKError({
|
|
452
583
|
statusCode: _response.error.statusCode,
|
|
@@ -473,20 +604,35 @@ class Collections {
|
|
|
473
604
|
});
|
|
474
605
|
}
|
|
475
606
|
/**
|
|
476
|
-
* Search your collection.
|
|
607
|
+
* Search your collection using semantic and hybrid search.
|
|
608
|
+
*
|
|
609
|
+
* This is the primary search endpoint providing powerful AI-powered search capabilities:
|
|
477
610
|
*
|
|
478
|
-
*
|
|
611
|
+
* **Search Strategies:**
|
|
612
|
+
* - **hybrid** (default): Combines neural (semantic) and keyword (BM25) matching
|
|
613
|
+
* - **neural**: Pure semantic search using embeddings
|
|
614
|
+
* - **keyword**: Traditional keyword-based BM25 search
|
|
615
|
+
*
|
|
616
|
+
* **Features:**
|
|
617
|
+
* - **Query expansion**: Generate query variations to improve recall
|
|
618
|
+
* - **Filter interpretation**: Extract structured filters from natural language
|
|
619
|
+
* - **Reranking**: LLM-based reranking for improved relevance
|
|
620
|
+
* - **Answer generation**: AI-generated answers based on search results
|
|
621
|
+
*
|
|
622
|
+
* **Note**: Accepts both new SearchRequest and legacy LegacySearchRequest formats
|
|
479
623
|
* for backwards compatibility.
|
|
480
624
|
*
|
|
481
|
-
* @param {string} readableId - The unique readable identifier of the collection
|
|
625
|
+
* @param {string} readableId - The unique readable identifier of the collection to search
|
|
482
626
|
* @param {AirweaveSDK.SearchCollectionsReadableIdSearchPostRequest} request
|
|
483
627
|
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
484
628
|
*
|
|
629
|
+
* @throws {@link AirweaveSDK.NotFoundError}
|
|
485
630
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
631
|
+
* @throws {@link AirweaveSDK.TooManyRequestsError}
|
|
486
632
|
*
|
|
487
633
|
* @example
|
|
488
|
-
* await client.collections.search("
|
|
489
|
-
* query: "
|
|
634
|
+
* await client.collections.search("customer-support-tickets-x7k9m", {
|
|
635
|
+
* query: "How do I reset my password?"
|
|
490
636
|
* })
|
|
491
637
|
*/
|
|
492
638
|
search(readableId, request, requestOptions) {
|
|
@@ -494,10 +640,10 @@ class Collections {
|
|
|
494
640
|
}
|
|
495
641
|
__search(readableId, request, requestOptions) {
|
|
496
642
|
return __awaiter(this, void 0, void 0, function* () {
|
|
497
|
-
var _a, _b, _c
|
|
498
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({
|
|
643
|
+
var _a, _b, _c;
|
|
644
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
499
645
|
const _response = yield core.fetcher({
|
|
500
|
-
url: core.url.join((
|
|
646
|
+
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`),
|
|
501
647
|
method: "POST",
|
|
502
648
|
headers: _headers,
|
|
503
649
|
contentType: "application/json",
|
|
@@ -509,15 +655,16 @@ class Collections {
|
|
|
509
655
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
510
656
|
});
|
|
511
657
|
if (_response.ok) {
|
|
512
|
-
return {
|
|
513
|
-
data: _response.body,
|
|
514
|
-
rawResponse: _response.rawResponse,
|
|
515
|
-
};
|
|
658
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
516
659
|
}
|
|
517
660
|
if (_response.error.reason === "status-code") {
|
|
518
661
|
switch (_response.error.statusCode) {
|
|
662
|
+
case 404:
|
|
663
|
+
throw new AirweaveSDK.NotFoundError(_response.error.body, _response.rawResponse);
|
|
519
664
|
case 422:
|
|
520
665
|
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
666
|
+
case 429:
|
|
667
|
+
throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
521
668
|
default:
|
|
522
669
|
throw new errors.AirweaveSDKError({
|
|
523
670
|
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.js";
|
|
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.js";
|
|
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.js";
|
|
|
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.js";
|
|
2
2
|
export { type CollectionCreate } from "./CollectionCreate.js";
|
|
3
|
+
export { type CollectionUpdate } from "./CollectionUpdate.js";
|
|
3
4
|
export { type SearchGetLegacyCollectionsReadableIdSearchGetRequest } from "./SearchGetLegacyCollectionsReadableIdSearchGetRequest.js";
|
|
@@ -15,4 +15,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./SearchCollectionsReadableIdSearchPostRequest.js"), exports);
|
|
18
|
-
__exportStar(require("./SearchCollectionsReadableIdSearchPostResponse.js"), exports);
|
|
@@ -2,5 +2,7 @@ export * as collections from "./collections/index.js";
|
|
|
2
2
|
export * from "./collections/types/index.js";
|
|
3
3
|
export * as sources from "./sources/index.js";
|
|
4
4
|
export * as sourceConnections from "./sourceConnections/index.js";
|
|
5
|
+
export * as webhooks from "./webhooks/index.js";
|
|
5
6
|
export * from "./collections/client/requests/index.js";
|
|
6
7
|
export * from "./sourceConnections/client/requests/index.js";
|
|
8
|
+
export * from "./webhooks/client/requests/index.js";
|
|
@@ -36,10 +36,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.sourceConnections = exports.sources = exports.collections = void 0;
|
|
39
|
+
exports.webhooks = exports.sourceConnections = exports.sources = exports.collections = void 0;
|
|
40
40
|
exports.collections = __importStar(require("./collections/index.js"));
|
|
41
41
|
__exportStar(require("./collections/types/index.js"), exports);
|
|
42
42
|
exports.sources = __importStar(require("./sources/index.js"));
|
|
43
43
|
exports.sourceConnections = __importStar(require("./sourceConnections/index.js"));
|
|
44
|
+
exports.webhooks = __importStar(require("./webhooks/index.js"));
|
|
44
45
|
__exportStar(require("./collections/client/requests/index.js"), exports);
|
|
45
46
|
__exportStar(require("./sourceConnections/client/requests/index.js"), exports);
|
|
47
|
+
__exportStar(require("./webhooks/client/requests/index.js"), exports);
|