@airweave/sdk 0.9.42 → 0.9.44
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/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/collections/client/Client.d.ts +53 -0
- package/dist/cjs/api/resources/collections/client/Client.js +261 -0
- package/dist/cjs/api/{types → resources/collections/client/requests}/ClassicSearchRequest.d.ts +5 -2
- package/dist/cjs/api/{types → resources/collections/client/requests}/InstantSearchRequest.d.ts +5 -2
- package/dist/cjs/api/resources/collections/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/types/AgenticSearchDoneEvent.d.ts +25 -0
- package/dist/cjs/api/types/AgenticSearchErrorEvent.d.ts +8 -0
- package/dist/cjs/api/types/AgenticSearchEvent.d.ts +25 -0
- package/dist/cjs/api/types/AgenticSearchRerankingEvent.d.ts +16 -0
- package/dist/cjs/api/types/AgenticSearchStartedEvent.d.ts +12 -0
- package/dist/cjs/api/types/AgenticSearchThinkingEvent.d.ts +18 -0
- package/dist/cjs/api/types/AgenticSearchToolCallEvent.d.ts +38 -0
- package/dist/cjs/api/types/AgenticSearchToolCallEvent.js +21 -0
- package/dist/cjs/api/types/CollectToolStats.d.ts +15 -0
- package/dist/cjs/api/types/CountToolStats.d.ts +10 -0
- package/dist/cjs/api/types/EntitySummary.d.ts +5 -0
- package/dist/cjs/api/types/ErrorToolStats.d.ts +9 -0
- package/dist/cjs/api/types/FinishToolStats.d.ts +13 -0
- package/dist/cjs/api/types/NavigateToolStats.d.ts +13 -0
- package/dist/cjs/api/types/ReadToolStats.d.ts +15 -0
- package/dist/cjs/api/types/RetrievalStrategy.d.ts +4 -4
- package/dist/cjs/api/types/RetrievalStrategy.js +2 -2
- package/dist/cjs/api/types/ReviewToolStats.d.ts +12 -0
- package/dist/cjs/api/types/SearchToolStats.d.ts +14 -0
- package/dist/cjs/api/types/index.d.ts +15 -68
- package/dist/cjs/api/types/index.js +15 -68
- package/dist/cjs/core/index.d.ts +1 -0
- package/dist/cjs/core/index.js +1 -0
- package/dist/cjs/core/stream/Stream.d.ts +46 -0
- package/dist/cjs/core/stream/Stream.js +169 -0
- package/dist/cjs/core/stream/index.d.ts +1 -0
- package/dist/cjs/core/stream/index.js +5 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/collections/client/Client.d.mts +53 -0
- package/dist/esm/api/resources/collections/client/Client.mjs +261 -0
- package/dist/esm/api/{types → resources/collections/client/requests}/ClassicSearchRequest.d.mts +5 -2
- package/dist/esm/api/{types → resources/collections/client/requests}/InstantSearchRequest.d.mts +5 -2
- package/dist/esm/api/resources/collections/client/requests/index.d.mts +2 -0
- package/dist/esm/api/types/AgenticSearchDoneEvent.d.mts +25 -0
- package/dist/esm/api/types/AgenticSearchErrorEvent.d.mts +8 -0
- package/dist/esm/api/types/AgenticSearchEvent.d.mts +25 -0
- package/dist/esm/api/types/AgenticSearchRerankingEvent.d.mts +16 -0
- package/dist/esm/api/types/AgenticSearchStartedEvent.d.mts +12 -0
- package/dist/esm/api/types/AgenticSearchThinkingEvent.d.mts +18 -0
- package/dist/esm/api/types/AgenticSearchToolCallEvent.d.mts +38 -0
- package/dist/esm/api/types/AgenticSearchToolCallEvent.mjs +18 -0
- package/dist/esm/api/types/CollectToolStats.d.mts +15 -0
- package/dist/esm/api/types/CountToolStats.d.mts +10 -0
- package/dist/esm/api/types/EntitySummary.d.mts +5 -0
- package/dist/esm/api/types/ErrorToolStats.d.mts +9 -0
- package/dist/esm/api/types/FinishToolStats.d.mts +13 -0
- package/dist/esm/api/types/NavigateToolStats.d.mts +13 -0
- package/dist/esm/api/types/ReadToolStats.d.mts +15 -0
- package/dist/esm/api/types/RetrievalStrategy.d.mts +4 -4
- package/dist/esm/api/types/RetrievalStrategy.mjs +2 -2
- package/dist/esm/api/types/ReviewToolStats.d.mts +12 -0
- package/dist/esm/api/types/SearchToolStats.d.mts +14 -0
- package/dist/esm/api/types/index.d.mts +15 -68
- package/dist/esm/api/types/index.mjs +15 -68
- package/dist/esm/core/index.d.mts +1 -0
- package/dist/esm/core/index.mjs +1 -0
- package/dist/esm/core/stream/Stream.d.mts +46 -0
- package/dist/esm/core/stream/Stream.mjs +164 -0
- package/dist/esm/core/stream/index.d.mts +1 -0
- package/dist/esm/core/stream/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +295 -0
- package/dist/cjs/api/types/ActionCheckRequest.d.ts +0 -10
- package/dist/cjs/api/types/ActionCheckResponse.d.ts +0 -10
- package/dist/cjs/api/types/AdminSearchDestination.d.ts +0 -7
- package/dist/cjs/api/types/AdminSyncInfo.d.ts +0 -36
- package/dist/cjs/api/types/ApiKey.d.ts +0 -17
- package/dist/cjs/api/types/ApiKeyCreate.d.ts +0 -10
- package/dist/cjs/api/types/AuthProviderConnection.d.ts +0 -23
- package/dist/cjs/api/types/AuthProviderConnectionCreate.d.ts +0 -19
- package/dist/cjs/api/types/AuthProviderConnectionUpdate.d.ts +0 -15
- package/dist/cjs/api/types/AuthProviderMetadata.d.ts +0 -17
- package/dist/cjs/api/types/BillingPeriod.d.ts +0 -30
- package/dist/cjs/api/types/BillingPeriodStatus.d.ts +0 -14
- package/dist/cjs/api/types/BillingPeriodStatus.js +0 -13
- package/dist/cjs/api/types/BillingPeriodUsage.d.ts +0 -27
- package/dist/cjs/api/types/BillingPlan.d.ts +0 -14
- package/dist/cjs/api/types/BillingPlan.js +0 -13
- package/dist/cjs/api/types/BillingStatus.d.ts +0 -16
- package/dist/cjs/api/types/BillingStatus.js +0 -15
- package/dist/cjs/api/types/BillingTransition.d.ts +0 -15
- package/dist/cjs/api/types/BillingTransition.js +0 -14
- package/dist/cjs/api/types/BodyChangeMemberRoleOrganizationsOrganizationIdMembersUserIdPatch.d.ts +0 -6
- package/dist/cjs/api/types/BodyResyncWithExecutionConfigAdminResyncSyncIdPost.d.ts +0 -10
- package/dist/cjs/api/types/BrowseNode.d.ts +0 -15
- package/dist/cjs/api/types/BrowseNode.js +0 -5
- package/dist/cjs/api/types/BrowseTreeResponse.d.ts +0 -12
- package/dist/cjs/api/types/BrowseTreeResponse.js +0 -5
- package/dist/cjs/api/types/CheckStatus.d.ts +0 -12
- package/dist/cjs/api/types/CheckStatus.js +0 -11
- package/dist/cjs/api/types/CheckoutSessionRequest.d.ts +0 -14
- package/dist/cjs/api/types/CheckoutSessionRequest.js +0 -5
- package/dist/cjs/api/types/CheckoutSessionResponse.d.ts +0 -10
- package/dist/cjs/api/types/CheckoutSessionResponse.js +0 -5
- package/dist/cjs/api/types/ConfigValues.d.ts +0 -9
- package/dist/cjs/api/types/ConfigValues.js +0 -5
- package/dist/cjs/api/types/ConnectSessionContext.d.ts +0 -26
- package/dist/cjs/api/types/ConnectSessionContext.js +0 -5
- package/dist/cjs/api/types/ConnectSessionCreate.d.ts +0 -20
- package/dist/cjs/api/types/ConnectSessionCreate.js +0 -5
- package/dist/cjs/api/types/ConnectSessionMode.d.ts +0 -18
- package/dist/cjs/api/types/ConnectSessionMode.js +0 -12
- package/dist/cjs/api/types/ConnectSessionResponse.d.ts +0 -16
- package/dist/cjs/api/types/ConnectSessionResponse.js +0 -5
- package/dist/cjs/api/types/CustomerPortalRequest.d.ts +0 -10
- package/dist/cjs/api/types/CustomerPortalRequest.js +0 -5
- package/dist/cjs/api/types/CustomerPortalResponse.d.ts +0 -10
- package/dist/cjs/api/types/CustomerPortalResponse.js +0 -5
- package/dist/cjs/api/types/DependencyCheck.d.ts +0 -12
- package/dist/cjs/api/types/DependencyCheck.js +0 -5
- package/dist/cjs/api/types/EntityCountWithDefinition.d.ts +0 -17
- package/dist/cjs/api/types/EntityCountWithDefinition.js +0 -5
- package/dist/cjs/api/types/EntityDefinitionMetadata.d.ts +0 -15
- package/dist/cjs/api/types/EntityDefinitionMetadata.js +0 -5
- package/dist/cjs/api/types/FeatureFlag.d.ts +0 -17
- package/dist/cjs/api/types/FeatureFlag.js +0 -14
- package/dist/cjs/api/types/InternalAgenticSearchRequest.d.ts +0 -19
- package/dist/cjs/api/types/InternalAgenticSearchRequest.js +0 -5
- package/dist/cjs/api/types/InvitationCreate.d.ts +0 -10
- package/dist/cjs/api/types/InvitationCreate.js +0 -5
- package/dist/cjs/api/types/InvitationResponse.d.ts +0 -13
- package/dist/cjs/api/types/InvitationResponse.js +0 -5
- package/dist/cjs/api/types/LivenessResponse.d.ts +0 -9
- package/dist/cjs/api/types/LivenessResponse.js +0 -5
- package/dist/cjs/api/types/MemberResponse.d.ts +0 -15
- package/dist/cjs/api/types/MemberResponse.js +0 -5
- package/dist/cjs/api/types/MessageResponse.d.ts +0 -10
- package/dist/cjs/api/types/MessageResponse.js +0 -5
- package/dist/cjs/api/types/NodeSelectionData.d.ts +0 -12
- package/dist/cjs/api/types/NodeSelectionData.js +0 -5
- package/dist/cjs/api/types/NodeSelectionRequest.d.ts +0 -10
- package/dist/cjs/api/types/NodeSelectionRequest.js +0 -5
- package/dist/cjs/api/types/NodeSelectionResponse.d.ts +0 -14
- package/dist/cjs/api/types/NodeSelectionResponse.js +0 -5
- package/dist/cjs/api/types/Organization.d.ts +0 -29
- package/dist/cjs/api/types/Organization.js +0 -5
- package/dist/cjs/api/types/OrganizationBilling.d.ts +0 -44
- package/dist/cjs/api/types/OrganizationBilling.js +0 -5
- package/dist/cjs/api/types/OrganizationCreate.d.ts +0 -16
- package/dist/cjs/api/types/OrganizationCreate.js +0 -5
- package/dist/cjs/api/types/OrganizationMetrics.d.ts +0 -47
- package/dist/cjs/api/types/OrganizationMetrics.js +0 -5
- package/dist/cjs/api/types/OrganizationWithRole.d.ts +0 -22
- package/dist/cjs/api/types/OrganizationWithRole.js +0 -5
- package/dist/cjs/api/types/ReadinessResponse.d.ts +0 -18
- package/dist/cjs/api/types/ReadinessResponse.js +0 -13
- package/dist/cjs/api/types/SearchRequest.d.ts +0 -34
- package/dist/cjs/api/types/SearchRequest.js +0 -5
- package/dist/cjs/api/types/SearchResponse.d.ts +0 -15
- package/dist/cjs/api/types/SearchResponse.js +0 -5
- package/dist/cjs/api/types/SingleActionCheckResponse.d.ts +0 -23
- package/dist/cjs/api/types/SingleActionCheckResponse.js +0 -13
- package/dist/cjs/api/types/SourceRateLimit.d.ts +0 -18
- package/dist/cjs/api/types/SourceRateLimit.js +0 -5
- package/dist/cjs/api/types/SourceRateLimitResponse.d.ts +0 -17
- package/dist/cjs/api/types/SourceRateLimitResponse.js +0 -5
- package/dist/cjs/api/types/SourceRateLimitUpdateRequest.d.ts +0 -12
- package/dist/cjs/api/types/SourceRateLimitUpdateRequest.js +0 -5
- package/dist/cjs/api/types/SubscriptionInfo.d.ts +0 -52
- package/dist/cjs/api/types/SubscriptionInfo.js +0 -5
- package/dist/cjs/api/types/SyncJob.d.ts +0 -33
- package/dist/cjs/api/types/SyncJob.js +0 -5
- package/dist/cjs/api/types/SyncStatus.d.ts +0 -12
- package/dist/cjs/api/types/SyncStatus.js +0 -11
- package/dist/cjs/api/types/UpdatePlanRequest.d.ts +0 -12
- package/dist/cjs/api/types/UpdatePlanRequest.js +0 -5
- package/dist/cjs/api/types/UsageDashboard.d.ts +0 -23
- package/dist/cjs/api/types/UsageDashboard.js +0 -5
- package/dist/cjs/api/types/UsageSnapshot.d.ts +0 -32
- package/dist/cjs/api/types/UsageSnapshot.js +0 -5
- package/dist/cjs/api/types/UsageTrend.d.ts +0 -14
- package/dist/cjs/api/types/UsageTrend.js +0 -5
- package/dist/cjs/api/types/User.d.ts +0 -18
- package/dist/cjs/api/types/User.js +0 -5
- package/dist/cjs/api/types/UserCreate.d.ts +0 -11
- package/dist/cjs/api/types/UserCreate.js +0 -5
- package/dist/cjs/api/types/UserOrganization.d.ts +0 -14
- package/dist/cjs/api/types/UserOrganization.js +0 -5
- package/dist/cjs/api/types/VerifyOAuthRequest.d.ts +0 -10
- package/dist/cjs/api/types/VerifyOAuthRequest.js +0 -5
- package/dist/esm/api/types/ActionCheckRequest.d.mts +0 -10
- package/dist/esm/api/types/ActionCheckResponse.d.mts +0 -10
- package/dist/esm/api/types/AdminSearchDestination.d.mts +0 -7
- package/dist/esm/api/types/AdminSyncInfo.d.mts +0 -36
- package/dist/esm/api/types/ApiKey.d.mts +0 -17
- package/dist/esm/api/types/ApiKeyCreate.d.mts +0 -10
- package/dist/esm/api/types/AuthProviderConnection.d.mts +0 -23
- package/dist/esm/api/types/AuthProviderConnectionCreate.d.mts +0 -19
- package/dist/esm/api/types/AuthProviderConnectionUpdate.d.mts +0 -15
- package/dist/esm/api/types/AuthProviderMetadata.d.mts +0 -17
- package/dist/esm/api/types/BillingPeriod.d.mts +0 -30
- package/dist/esm/api/types/BillingPeriodStatus.d.mts +0 -14
- package/dist/esm/api/types/BillingPeriodStatus.mjs +0 -10
- package/dist/esm/api/types/BillingPeriodUsage.d.mts +0 -27
- package/dist/esm/api/types/BillingPlan.d.mts +0 -14
- package/dist/esm/api/types/BillingPlan.mjs +0 -10
- package/dist/esm/api/types/BillingStatus.d.mts +0 -16
- package/dist/esm/api/types/BillingStatus.mjs +0 -12
- package/dist/esm/api/types/BillingTransition.d.mts +0 -15
- package/dist/esm/api/types/BillingTransition.mjs +0 -11
- package/dist/esm/api/types/BodyChangeMemberRoleOrganizationsOrganizationIdMembersUserIdPatch.d.mts +0 -6
- package/dist/esm/api/types/BodyResyncWithExecutionConfigAdminResyncSyncIdPost.d.mts +0 -10
- package/dist/esm/api/types/BrowseNode.d.mts +0 -15
- package/dist/esm/api/types/BrowseNode.mjs +0 -4
- package/dist/esm/api/types/BrowseTreeResponse.d.mts +0 -12
- package/dist/esm/api/types/BrowseTreeResponse.mjs +0 -4
- package/dist/esm/api/types/CheckStatus.d.mts +0 -12
- package/dist/esm/api/types/CheckStatus.mjs +0 -8
- package/dist/esm/api/types/CheckoutSessionRequest.d.mts +0 -14
- package/dist/esm/api/types/CheckoutSessionRequest.mjs +0 -4
- package/dist/esm/api/types/CheckoutSessionResponse.d.mts +0 -10
- package/dist/esm/api/types/CheckoutSessionResponse.mjs +0 -4
- package/dist/esm/api/types/ConfigValues.d.mts +0 -9
- package/dist/esm/api/types/ConfigValues.mjs +0 -4
- package/dist/esm/api/types/ConnectSessionContext.d.mts +0 -26
- package/dist/esm/api/types/ConnectSessionContext.mjs +0 -4
- package/dist/esm/api/types/ConnectSessionCreate.d.mts +0 -20
- package/dist/esm/api/types/ConnectSessionCreate.mjs +0 -4
- package/dist/esm/api/types/ConnectSessionMode.d.mts +0 -18
- package/dist/esm/api/types/ConnectSessionMode.mjs +0 -9
- package/dist/esm/api/types/ConnectSessionResponse.d.mts +0 -16
- package/dist/esm/api/types/ConnectSessionResponse.mjs +0 -4
- package/dist/esm/api/types/CustomerPortalRequest.d.mts +0 -10
- package/dist/esm/api/types/CustomerPortalRequest.mjs +0 -4
- package/dist/esm/api/types/CustomerPortalResponse.d.mts +0 -10
- package/dist/esm/api/types/CustomerPortalResponse.mjs +0 -4
- package/dist/esm/api/types/DependencyCheck.d.mts +0 -12
- package/dist/esm/api/types/DependencyCheck.mjs +0 -4
- package/dist/esm/api/types/EntityCountWithDefinition.d.mts +0 -17
- package/dist/esm/api/types/EntityCountWithDefinition.mjs +0 -4
- package/dist/esm/api/types/EntityDefinitionMetadata.d.mts +0 -15
- package/dist/esm/api/types/EntityDefinitionMetadata.mjs +0 -4
- package/dist/esm/api/types/FeatureFlag.d.mts +0 -17
- package/dist/esm/api/types/FeatureFlag.mjs +0 -11
- package/dist/esm/api/types/InternalAgenticSearchRequest.d.mts +0 -19
- package/dist/esm/api/types/InternalAgenticSearchRequest.mjs +0 -4
- package/dist/esm/api/types/InvitationCreate.d.mts +0 -10
- package/dist/esm/api/types/InvitationCreate.mjs +0 -4
- package/dist/esm/api/types/InvitationResponse.d.mts +0 -13
- package/dist/esm/api/types/InvitationResponse.mjs +0 -4
- package/dist/esm/api/types/LivenessResponse.d.mts +0 -9
- package/dist/esm/api/types/LivenessResponse.mjs +0 -4
- package/dist/esm/api/types/MemberResponse.d.mts +0 -15
- package/dist/esm/api/types/MemberResponse.mjs +0 -4
- package/dist/esm/api/types/MessageResponse.d.mts +0 -10
- package/dist/esm/api/types/MessageResponse.mjs +0 -4
- package/dist/esm/api/types/NodeSelectionData.d.mts +0 -12
- package/dist/esm/api/types/NodeSelectionData.mjs +0 -4
- package/dist/esm/api/types/NodeSelectionRequest.d.mts +0 -10
- package/dist/esm/api/types/NodeSelectionRequest.mjs +0 -4
- package/dist/esm/api/types/NodeSelectionResponse.d.mts +0 -14
- package/dist/esm/api/types/NodeSelectionResponse.mjs +0 -4
- package/dist/esm/api/types/Organization.d.mts +0 -29
- package/dist/esm/api/types/Organization.mjs +0 -4
- package/dist/esm/api/types/OrganizationBilling.d.mts +0 -44
- package/dist/esm/api/types/OrganizationBilling.mjs +0 -4
- package/dist/esm/api/types/OrganizationCreate.d.mts +0 -16
- package/dist/esm/api/types/OrganizationCreate.mjs +0 -4
- package/dist/esm/api/types/OrganizationMetrics.d.mts +0 -47
- package/dist/esm/api/types/OrganizationMetrics.mjs +0 -4
- package/dist/esm/api/types/OrganizationWithRole.d.mts +0 -22
- package/dist/esm/api/types/OrganizationWithRole.mjs +0 -4
- package/dist/esm/api/types/ReadinessResponse.d.mts +0 -18
- package/dist/esm/api/types/ReadinessResponse.mjs +0 -10
- package/dist/esm/api/types/SearchRequest.d.mts +0 -34
- package/dist/esm/api/types/SearchRequest.mjs +0 -4
- package/dist/esm/api/types/SearchResponse.d.mts +0 -15
- package/dist/esm/api/types/SearchResponse.mjs +0 -4
- package/dist/esm/api/types/SingleActionCheckResponse.d.mts +0 -23
- package/dist/esm/api/types/SingleActionCheckResponse.mjs +0 -10
- package/dist/esm/api/types/SourceRateLimit.d.mts +0 -18
- package/dist/esm/api/types/SourceRateLimit.mjs +0 -4
- package/dist/esm/api/types/SourceRateLimitResponse.d.mts +0 -17
- package/dist/esm/api/types/SourceRateLimitResponse.mjs +0 -4
- package/dist/esm/api/types/SourceRateLimitUpdateRequest.d.mts +0 -12
- package/dist/esm/api/types/SourceRateLimitUpdateRequest.mjs +0 -4
- package/dist/esm/api/types/SubscriptionInfo.d.mts +0 -52
- package/dist/esm/api/types/SubscriptionInfo.mjs +0 -4
- package/dist/esm/api/types/SyncJob.d.mts +0 -33
- package/dist/esm/api/types/SyncJob.mjs +0 -4
- package/dist/esm/api/types/SyncStatus.d.mts +0 -12
- package/dist/esm/api/types/SyncStatus.mjs +0 -8
- package/dist/esm/api/types/UpdatePlanRequest.d.mts +0 -12
- package/dist/esm/api/types/UpdatePlanRequest.mjs +0 -4
- package/dist/esm/api/types/UsageDashboard.d.mts +0 -23
- package/dist/esm/api/types/UsageDashboard.mjs +0 -4
- package/dist/esm/api/types/UsageSnapshot.d.mts +0 -32
- package/dist/esm/api/types/UsageSnapshot.mjs +0 -4
- package/dist/esm/api/types/UsageTrend.d.mts +0 -14
- package/dist/esm/api/types/UsageTrend.mjs +0 -4
- package/dist/esm/api/types/User.d.mts +0 -18
- package/dist/esm/api/types/User.mjs +0 -4
- package/dist/esm/api/types/UserCreate.d.mts +0 -11
- package/dist/esm/api/types/UserCreate.mjs +0 -4
- package/dist/esm/api/types/UserOrganization.d.mts +0 -14
- package/dist/esm/api/types/UserOrganization.mjs +0 -4
- package/dist/esm/api/types/VerifyOAuthRequest.d.mts +0 -10
- package/dist/esm/api/types/VerifyOAuthRequest.mjs +0 -4
- /package/dist/cjs/api/{types → resources/collections/client/requests}/ClassicSearchRequest.js +0 -0
- /package/dist/cjs/api/{types → resources/collections/client/requests}/InstantSearchRequest.js +0 -0
- /package/dist/cjs/api/types/{ActionCheckRequest.js → AgenticSearchDoneEvent.js} +0 -0
- /package/dist/cjs/api/types/{ActionCheckResponse.js → AgenticSearchErrorEvent.js} +0 -0
- /package/dist/cjs/api/types/{AdminSearchDestination.js → AgenticSearchEvent.js} +0 -0
- /package/dist/cjs/api/types/{AdminSyncInfo.js → AgenticSearchRerankingEvent.js} +0 -0
- /package/dist/cjs/api/types/{ApiKey.js → AgenticSearchStartedEvent.js} +0 -0
- /package/dist/cjs/api/types/{ApiKeyCreate.js → AgenticSearchThinkingEvent.js} +0 -0
- /package/dist/cjs/api/types/{AuthProviderConnection.js → CollectToolStats.js} +0 -0
- /package/dist/cjs/api/types/{AuthProviderConnectionCreate.js → CountToolStats.js} +0 -0
- /package/dist/cjs/api/types/{AuthProviderConnectionUpdate.js → ErrorToolStats.js} +0 -0
- /package/dist/cjs/api/types/{AuthProviderMetadata.js → FinishToolStats.js} +0 -0
- /package/dist/cjs/api/types/{BillingPeriod.js → NavigateToolStats.js} +0 -0
- /package/dist/cjs/api/types/{BillingPeriodUsage.js → ReadToolStats.js} +0 -0
- /package/dist/cjs/api/types/{BodyChangeMemberRoleOrganizationsOrganizationIdMembersUserIdPatch.js → ReviewToolStats.js} +0 -0
- /package/dist/cjs/api/types/{BodyResyncWithExecutionConfigAdminResyncSyncIdPost.js → SearchToolStats.js} +0 -0
- /package/dist/esm/api/{types → resources/collections/client/requests}/ClassicSearchRequest.mjs +0 -0
- /package/dist/esm/api/{types → resources/collections/client/requests}/InstantSearchRequest.mjs +0 -0
- /package/dist/esm/api/types/{ActionCheckRequest.mjs → AgenticSearchDoneEvent.mjs} +0 -0
- /package/dist/esm/api/types/{ActionCheckResponse.mjs → AgenticSearchErrorEvent.mjs} +0 -0
- /package/dist/esm/api/types/{AdminSearchDestination.mjs → AgenticSearchEvent.mjs} +0 -0
- /package/dist/esm/api/types/{AdminSyncInfo.mjs → AgenticSearchRerankingEvent.mjs} +0 -0
- /package/dist/esm/api/types/{ApiKey.mjs → AgenticSearchStartedEvent.mjs} +0 -0
- /package/dist/esm/api/types/{ApiKeyCreate.mjs → AgenticSearchThinkingEvent.mjs} +0 -0
- /package/dist/esm/api/types/{AuthProviderConnection.mjs → CollectToolStats.mjs} +0 -0
- /package/dist/esm/api/types/{AuthProviderConnectionCreate.mjs → CountToolStats.mjs} +0 -0
- /package/dist/esm/api/types/{AuthProviderConnectionUpdate.mjs → ErrorToolStats.mjs} +0 -0
- /package/dist/esm/api/types/{AuthProviderMetadata.mjs → FinishToolStats.mjs} +0 -0
- /package/dist/esm/api/types/{BillingPeriod.mjs → NavigateToolStats.mjs} +0 -0
- /package/dist/esm/api/types/{BillingPeriodUsage.mjs → ReadToolStats.mjs} +0 -0
- /package/dist/esm/api/types/{BodyChangeMemberRoleOrganizationsOrganizationIdMembersUserIdPatch.mjs → ReviewToolStats.mjs} +0 -0
- /package/dist/esm/api/types/{BodyResyncWithExecutionConfigAdminResyncSyncIdPost.mjs → SearchToolStats.mjs} +0 -0
package/dist/cjs/Client.js
CHANGED
|
@@ -48,8 +48,8 @@ class AirweaveSDKClient {
|
|
|
48
48
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
49
49
|
"X-Fern-Language": "JavaScript",
|
|
50
50
|
"X-Fern-SDK-Name": "@airweave/sdk",
|
|
51
|
-
"X-Fern-SDK-Version": "v0.9.
|
|
52
|
-
"User-Agent": "@airweave/sdk/v0.9.
|
|
51
|
+
"X-Fern-SDK-Version": "v0.9.44",
|
|
52
|
+
"User-Agent": "@airweave/sdk/v0.9.44",
|
|
53
53
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
54
54
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
55
55
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -149,5 +149,58 @@ export declare class Collections {
|
|
|
149
149
|
*/
|
|
150
150
|
update(readableId: string, request?: AirweaveSDK.CollectionUpdate, requestOptions?: Collections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.Collection>;
|
|
151
151
|
private __update;
|
|
152
|
+
/**
|
|
153
|
+
* Direct vector search.
|
|
154
|
+
*
|
|
155
|
+
* @param {string} readableId
|
|
156
|
+
* @param {AirweaveSDK.InstantSearchRequest} request
|
|
157
|
+
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
158
|
+
*
|
|
159
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
160
|
+
*
|
|
161
|
+
* @example
|
|
162
|
+
* await client.collections.instantSearch("readable_id", {
|
|
163
|
+
* query: "query"
|
|
164
|
+
* })
|
|
165
|
+
*/
|
|
166
|
+
instantSearch(readableId: string, request: AirweaveSDK.InstantSearchRequest, requestOptions?: Collections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SearchV2Response>;
|
|
167
|
+
private __instantSearch;
|
|
168
|
+
/**
|
|
169
|
+
* AI-optimized search.
|
|
170
|
+
*
|
|
171
|
+
* @param {string} readableId
|
|
172
|
+
* @param {AirweaveSDK.ClassicSearchRequest} request
|
|
173
|
+
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
174
|
+
*
|
|
175
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
176
|
+
*
|
|
177
|
+
* @example
|
|
178
|
+
* await client.collections.classicSearch("readable_id", {
|
|
179
|
+
* query: "query"
|
|
180
|
+
* })
|
|
181
|
+
*/
|
|
182
|
+
classicSearch(readableId: string, request: AirweaveSDK.ClassicSearchRequest, requestOptions?: Collections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SearchV2Response>;
|
|
183
|
+
private __classicSearch;
|
|
184
|
+
/**
|
|
185
|
+
* Agent that iteratively searches, reads, navigates hierarchies, and collects results.
|
|
186
|
+
*
|
|
187
|
+
* @param {string} readableId
|
|
188
|
+
* @param {AirweaveSDK.AgenticSearchRequest} request
|
|
189
|
+
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
190
|
+
*
|
|
191
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
192
|
+
*
|
|
193
|
+
* @example
|
|
194
|
+
* await client.collections.agenticSearch("readable_id", {
|
|
195
|
+
* query: "query"
|
|
196
|
+
* })
|
|
197
|
+
*/
|
|
198
|
+
agenticSearch(readableId: string, request: AirweaveSDK.AgenticSearchRequest, requestOptions?: Collections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SearchV2Response>;
|
|
199
|
+
private __agenticSearch;
|
|
200
|
+
/**
|
|
201
|
+
* Streaming agentic search via Server-Sent Events. Returns real-time events as the agent searches.
|
|
202
|
+
*/
|
|
203
|
+
streamAgenticSearch(readableId: string, request: AirweaveSDK.AgenticSearchRequest, requestOptions?: Collections.RequestOptions): core.HttpResponsePromise<core.Stream<AirweaveSDK.AgenticSearchEvent>>;
|
|
204
|
+
private __streamAgenticSearch;
|
|
152
205
|
protected _getCustomAuthorizationHeaders(): Promise<Record<string, string | undefined>>;
|
|
153
206
|
}
|
|
@@ -438,6 +438,267 @@ class Collections {
|
|
|
438
438
|
}
|
|
439
439
|
});
|
|
440
440
|
}
|
|
441
|
+
/**
|
|
442
|
+
* Direct vector search.
|
|
443
|
+
*
|
|
444
|
+
* @param {string} readableId
|
|
445
|
+
* @param {AirweaveSDK.InstantSearchRequest} request
|
|
446
|
+
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
447
|
+
*
|
|
448
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
449
|
+
*
|
|
450
|
+
* @example
|
|
451
|
+
* await client.collections.instantSearch("readable_id", {
|
|
452
|
+
* query: "query"
|
|
453
|
+
* })
|
|
454
|
+
*/
|
|
455
|
+
instantSearch(readableId, request, requestOptions) {
|
|
456
|
+
return core.HttpResponsePromise.fromPromise(this.__instantSearch(readableId, request, requestOptions));
|
|
457
|
+
}
|
|
458
|
+
__instantSearch(readableId, request, requestOptions) {
|
|
459
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
460
|
+
var _a, _b, _c;
|
|
461
|
+
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);
|
|
462
|
+
const _response = yield core.fetcher({
|
|
463
|
+
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/instant`),
|
|
464
|
+
method: "POST",
|
|
465
|
+
headers: _headers,
|
|
466
|
+
contentType: "application/json",
|
|
467
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
468
|
+
requestType: "json",
|
|
469
|
+
body: request,
|
|
470
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
471
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
472
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
473
|
+
});
|
|
474
|
+
if (_response.ok) {
|
|
475
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
476
|
+
}
|
|
477
|
+
if (_response.error.reason === "status-code") {
|
|
478
|
+
switch (_response.error.statusCode) {
|
|
479
|
+
case 422:
|
|
480
|
+
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
481
|
+
default:
|
|
482
|
+
throw new errors.AirweaveSDKError({
|
|
483
|
+
statusCode: _response.error.statusCode,
|
|
484
|
+
body: _response.error.body,
|
|
485
|
+
rawResponse: _response.rawResponse,
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
switch (_response.error.reason) {
|
|
490
|
+
case "non-json":
|
|
491
|
+
throw new errors.AirweaveSDKError({
|
|
492
|
+
statusCode: _response.error.statusCode,
|
|
493
|
+
body: _response.error.rawBody,
|
|
494
|
+
rawResponse: _response.rawResponse,
|
|
495
|
+
});
|
|
496
|
+
case "timeout":
|
|
497
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /collections/{readable_id}/search/instant.");
|
|
498
|
+
case "unknown":
|
|
499
|
+
throw new errors.AirweaveSDKError({
|
|
500
|
+
message: _response.error.errorMessage,
|
|
501
|
+
rawResponse: _response.rawResponse,
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* AI-optimized search.
|
|
508
|
+
*
|
|
509
|
+
* @param {string} readableId
|
|
510
|
+
* @param {AirweaveSDK.ClassicSearchRequest} request
|
|
511
|
+
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
512
|
+
*
|
|
513
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
514
|
+
*
|
|
515
|
+
* @example
|
|
516
|
+
* await client.collections.classicSearch("readable_id", {
|
|
517
|
+
* query: "query"
|
|
518
|
+
* })
|
|
519
|
+
*/
|
|
520
|
+
classicSearch(readableId, request, requestOptions) {
|
|
521
|
+
return core.HttpResponsePromise.fromPromise(this.__classicSearch(readableId, request, requestOptions));
|
|
522
|
+
}
|
|
523
|
+
__classicSearch(readableId, request, requestOptions) {
|
|
524
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
525
|
+
var _a, _b, _c;
|
|
526
|
+
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);
|
|
527
|
+
const _response = yield core.fetcher({
|
|
528
|
+
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/classic`),
|
|
529
|
+
method: "POST",
|
|
530
|
+
headers: _headers,
|
|
531
|
+
contentType: "application/json",
|
|
532
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
533
|
+
requestType: "json",
|
|
534
|
+
body: request,
|
|
535
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
536
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
537
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
538
|
+
});
|
|
539
|
+
if (_response.ok) {
|
|
540
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
541
|
+
}
|
|
542
|
+
if (_response.error.reason === "status-code") {
|
|
543
|
+
switch (_response.error.statusCode) {
|
|
544
|
+
case 422:
|
|
545
|
+
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
546
|
+
default:
|
|
547
|
+
throw new errors.AirweaveSDKError({
|
|
548
|
+
statusCode: _response.error.statusCode,
|
|
549
|
+
body: _response.error.body,
|
|
550
|
+
rawResponse: _response.rawResponse,
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
switch (_response.error.reason) {
|
|
555
|
+
case "non-json":
|
|
556
|
+
throw new errors.AirweaveSDKError({
|
|
557
|
+
statusCode: _response.error.statusCode,
|
|
558
|
+
body: _response.error.rawBody,
|
|
559
|
+
rawResponse: _response.rawResponse,
|
|
560
|
+
});
|
|
561
|
+
case "timeout":
|
|
562
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /collections/{readable_id}/search/classic.");
|
|
563
|
+
case "unknown":
|
|
564
|
+
throw new errors.AirweaveSDKError({
|
|
565
|
+
message: _response.error.errorMessage,
|
|
566
|
+
rawResponse: _response.rawResponse,
|
|
567
|
+
});
|
|
568
|
+
}
|
|
569
|
+
});
|
|
570
|
+
}
|
|
571
|
+
/**
|
|
572
|
+
* Agent that iteratively searches, reads, navigates hierarchies, and collects results.
|
|
573
|
+
*
|
|
574
|
+
* @param {string} readableId
|
|
575
|
+
* @param {AirweaveSDK.AgenticSearchRequest} request
|
|
576
|
+
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
577
|
+
*
|
|
578
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
579
|
+
*
|
|
580
|
+
* @example
|
|
581
|
+
* await client.collections.agenticSearch("readable_id", {
|
|
582
|
+
* query: "query"
|
|
583
|
+
* })
|
|
584
|
+
*/
|
|
585
|
+
agenticSearch(readableId, request, requestOptions) {
|
|
586
|
+
return core.HttpResponsePromise.fromPromise(this.__agenticSearch(readableId, request, requestOptions));
|
|
587
|
+
}
|
|
588
|
+
__agenticSearch(readableId, request, requestOptions) {
|
|
589
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
590
|
+
var _a, _b, _c;
|
|
591
|
+
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);
|
|
592
|
+
const _response = yield core.fetcher({
|
|
593
|
+
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/agentic`),
|
|
594
|
+
method: "POST",
|
|
595
|
+
headers: _headers,
|
|
596
|
+
contentType: "application/json",
|
|
597
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
598
|
+
requestType: "json",
|
|
599
|
+
body: request,
|
|
600
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
601
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
602
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
603
|
+
});
|
|
604
|
+
if (_response.ok) {
|
|
605
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
606
|
+
}
|
|
607
|
+
if (_response.error.reason === "status-code") {
|
|
608
|
+
switch (_response.error.statusCode) {
|
|
609
|
+
case 422:
|
|
610
|
+
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
611
|
+
default:
|
|
612
|
+
throw new errors.AirweaveSDKError({
|
|
613
|
+
statusCode: _response.error.statusCode,
|
|
614
|
+
body: _response.error.body,
|
|
615
|
+
rawResponse: _response.rawResponse,
|
|
616
|
+
});
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
switch (_response.error.reason) {
|
|
620
|
+
case "non-json":
|
|
621
|
+
throw new errors.AirweaveSDKError({
|
|
622
|
+
statusCode: _response.error.statusCode,
|
|
623
|
+
body: _response.error.rawBody,
|
|
624
|
+
rawResponse: _response.rawResponse,
|
|
625
|
+
});
|
|
626
|
+
case "timeout":
|
|
627
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /collections/{readable_id}/search/agentic.");
|
|
628
|
+
case "unknown":
|
|
629
|
+
throw new errors.AirweaveSDKError({
|
|
630
|
+
message: _response.error.errorMessage,
|
|
631
|
+
rawResponse: _response.rawResponse,
|
|
632
|
+
});
|
|
633
|
+
}
|
|
634
|
+
});
|
|
635
|
+
}
|
|
636
|
+
/**
|
|
637
|
+
* Streaming agentic search via Server-Sent Events. Returns real-time events as the agent searches.
|
|
638
|
+
*/
|
|
639
|
+
streamAgenticSearch(readableId, request, requestOptions) {
|
|
640
|
+
return core.HttpResponsePromise.fromPromise(this.__streamAgenticSearch(readableId, request, requestOptions));
|
|
641
|
+
}
|
|
642
|
+
__streamAgenticSearch(readableId, request, requestOptions) {
|
|
643
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
644
|
+
var _a, _b, _c;
|
|
645
|
+
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);
|
|
646
|
+
const _response = yield core.fetcher({
|
|
647
|
+
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/agentic/stream`),
|
|
648
|
+
method: "POST",
|
|
649
|
+
headers: _headers,
|
|
650
|
+
contentType: "application/json",
|
|
651
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
652
|
+
requestType: "json",
|
|
653
|
+
body: request,
|
|
654
|
+
responseType: "sse",
|
|
655
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
656
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
657
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
658
|
+
});
|
|
659
|
+
if (_response.ok) {
|
|
660
|
+
return {
|
|
661
|
+
data: new core.Stream({
|
|
662
|
+
stream: _response.body,
|
|
663
|
+
parse: (data) => data,
|
|
664
|
+
signal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
665
|
+
eventShape: {
|
|
666
|
+
type: "sse",
|
|
667
|
+
streamTerminator: "[DONE]",
|
|
668
|
+
},
|
|
669
|
+
}),
|
|
670
|
+
rawResponse: _response.rawResponse,
|
|
671
|
+
};
|
|
672
|
+
}
|
|
673
|
+
if (_response.error.reason === "status-code") {
|
|
674
|
+
switch (_response.error.statusCode) {
|
|
675
|
+
case 422:
|
|
676
|
+
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
677
|
+
default:
|
|
678
|
+
throw new errors.AirweaveSDKError({
|
|
679
|
+
statusCode: _response.error.statusCode,
|
|
680
|
+
body: _response.error.body,
|
|
681
|
+
rawResponse: _response.rawResponse,
|
|
682
|
+
});
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
switch (_response.error.reason) {
|
|
686
|
+
case "non-json":
|
|
687
|
+
throw new errors.AirweaveSDKError({
|
|
688
|
+
statusCode: _response.error.statusCode,
|
|
689
|
+
body: _response.error.rawBody,
|
|
690
|
+
rawResponse: _response.rawResponse,
|
|
691
|
+
});
|
|
692
|
+
case "timeout":
|
|
693
|
+
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /collections/{readable_id}/search/agentic/stream.");
|
|
694
|
+
case "unknown":
|
|
695
|
+
throw new errors.AirweaveSDKError({
|
|
696
|
+
message: _response.error.errorMessage,
|
|
697
|
+
rawResponse: _response.rawResponse,
|
|
698
|
+
});
|
|
699
|
+
}
|
|
700
|
+
});
|
|
701
|
+
}
|
|
441
702
|
_getCustomAuthorizationHeaders() {
|
|
442
703
|
return __awaiter(this, void 0, void 0, function* () {
|
|
443
704
|
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
package/dist/cjs/api/{types → resources/collections/client/requests}/ClassicSearchRequest.d.ts
RENAMED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as AirweaveSDK from "
|
|
4
|
+
import * as AirweaveSDK from "../../../../index.js";
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* query: "query"
|
|
9
|
+
* }
|
|
7
10
|
*/
|
|
8
11
|
export interface ClassicSearchRequest {
|
|
9
12
|
/** Search query text. */
|
package/dist/cjs/api/{types → resources/collections/client/requests}/InstantSearchRequest.d.ts
RENAMED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
import * as AirweaveSDK from "
|
|
4
|
+
import * as AirweaveSDK from "../../../../index.js";
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* query: "query"
|
|
9
|
+
* }
|
|
7
10
|
*/
|
|
8
11
|
export interface InstantSearchRequest {
|
|
9
12
|
/** Search query text. */
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { type ListCollectionsGetRequest } from "./ListCollectionsGetRequest.js";
|
|
2
2
|
export { type CollectionCreate } from "./CollectionCreate.js";
|
|
3
3
|
export { type CollectionUpdate } from "./CollectionUpdate.js";
|
|
4
|
+
export { type InstantSearchRequest } from "./InstantSearchRequest.js";
|
|
5
|
+
export { type ClassicSearchRequest } from "./ClassicSearchRequest.js";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as AirweaveSDK from "../index.js";
|
|
5
|
+
export interface AgenticSearchDoneEvent {
|
|
6
|
+
/** Full result set. */
|
|
7
|
+
results: AirweaveSDK.SearchResult[];
|
|
8
|
+
duration_ms: number;
|
|
9
|
+
diagnostics?: AgenticSearchDoneEvent.Diagnostics;
|
|
10
|
+
}
|
|
11
|
+
export declare namespace AgenticSearchDoneEvent {
|
|
12
|
+
interface Diagnostics {
|
|
13
|
+
total_iterations?: number;
|
|
14
|
+
all_seen_entity_ids?: string[];
|
|
15
|
+
all_read_entity_ids?: string[];
|
|
16
|
+
all_collected_entity_ids?: string[];
|
|
17
|
+
max_iterations_hit?: boolean;
|
|
18
|
+
total_llm_retries?: number;
|
|
19
|
+
stagnation_nudges_sent?: number;
|
|
20
|
+
prompt_tokens?: number;
|
|
21
|
+
completion_tokens?: number;
|
|
22
|
+
cache_creation_input_tokens?: number;
|
|
23
|
+
cache_read_input_tokens?: number;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as AirweaveSDK from "../index.js";
|
|
5
|
+
export type AgenticSearchEvent = AirweaveSDK.AgenticSearchEvent.Started | AirweaveSDK.AgenticSearchEvent.Thinking | AirweaveSDK.AgenticSearchEvent.ToolCall | AirweaveSDK.AgenticSearchEvent.Reranking | AirweaveSDK.AgenticSearchEvent.Done | AirweaveSDK.AgenticSearchEvent.Error_;
|
|
6
|
+
export declare namespace AgenticSearchEvent {
|
|
7
|
+
interface Started extends AirweaveSDK.AgenticSearchStartedEvent {
|
|
8
|
+
type: "started";
|
|
9
|
+
}
|
|
10
|
+
interface Thinking extends AirweaveSDK.AgenticSearchThinkingEvent {
|
|
11
|
+
type: "thinking";
|
|
12
|
+
}
|
|
13
|
+
interface ToolCall extends AirweaveSDK.AgenticSearchToolCallEvent {
|
|
14
|
+
type: "tool_call";
|
|
15
|
+
}
|
|
16
|
+
interface Reranking extends AirweaveSDK.AgenticSearchRerankingEvent {
|
|
17
|
+
type: "reranking";
|
|
18
|
+
}
|
|
19
|
+
interface Done extends AirweaveSDK.AgenticSearchDoneEvent {
|
|
20
|
+
type: "done";
|
|
21
|
+
}
|
|
22
|
+
interface Error_ extends AirweaveSDK.AgenticSearchErrorEvent {
|
|
23
|
+
type: "error";
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface AgenticSearchRerankingEvent {
|
|
5
|
+
duration_ms: number;
|
|
6
|
+
diagnostics: AgenticSearchRerankingEvent.Diagnostics;
|
|
7
|
+
}
|
|
8
|
+
export declare namespace AgenticSearchRerankingEvent {
|
|
9
|
+
interface Diagnostics {
|
|
10
|
+
input_count?: number;
|
|
11
|
+
output_count?: number;
|
|
12
|
+
model?: string;
|
|
13
|
+
top_relevance_score?: number;
|
|
14
|
+
bottom_relevance_score?: number;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface AgenticSearchStartedEvent {
|
|
5
|
+
request_id: string;
|
|
6
|
+
tier: string;
|
|
7
|
+
collection_readable_id: string;
|
|
8
|
+
query: string;
|
|
9
|
+
thinking?: boolean;
|
|
10
|
+
filter?: Record<string, unknown>[];
|
|
11
|
+
limit?: number;
|
|
12
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface AgenticSearchThinkingEvent {
|
|
5
|
+
/** Extended reasoning text from the LLM. */
|
|
6
|
+
thinking?: string;
|
|
7
|
+
/** Conversational text output before tool calls. */
|
|
8
|
+
text?: string;
|
|
9
|
+
duration_ms: number;
|
|
10
|
+
diagnostics: AgenticSearchThinkingEvent.Diagnostics;
|
|
11
|
+
}
|
|
12
|
+
export declare namespace AgenticSearchThinkingEvent {
|
|
13
|
+
interface Diagnostics {
|
|
14
|
+
iteration?: number;
|
|
15
|
+
prompt_tokens?: number;
|
|
16
|
+
completion_tokens?: number;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as AirweaveSDK from "../index.js";
|
|
5
|
+
export interface AgenticSearchToolCallEvent {
|
|
6
|
+
tool_name: AgenticSearchToolCallEvent.ToolName;
|
|
7
|
+
duration_ms: number;
|
|
8
|
+
diagnostics: AgenticSearchToolCallEvent.Diagnostics;
|
|
9
|
+
}
|
|
10
|
+
export declare namespace AgenticSearchToolCallEvent {
|
|
11
|
+
type ToolName = "search" | "read" | "add_to_results" | "remove_from_results" | "count" | "get_children" | "get_siblings" | "get_parent" | "review_results" | "return_results_to_user";
|
|
12
|
+
const ToolName: {
|
|
13
|
+
readonly Search: "search";
|
|
14
|
+
readonly Read: "read";
|
|
15
|
+
readonly AddToResults: "add_to_results";
|
|
16
|
+
readonly RemoveFromResults: "remove_from_results";
|
|
17
|
+
readonly Count: "count";
|
|
18
|
+
readonly GetChildren: "get_children";
|
|
19
|
+
readonly GetSiblings: "get_siblings";
|
|
20
|
+
readonly GetParent: "get_parent";
|
|
21
|
+
readonly ReviewResults: "review_results";
|
|
22
|
+
readonly ReturnResultsToUser: "return_results_to_user";
|
|
23
|
+
};
|
|
24
|
+
interface Diagnostics {
|
|
25
|
+
iteration?: number;
|
|
26
|
+
tool_call_id?: string;
|
|
27
|
+
/** Full LLM-generated tool input. */
|
|
28
|
+
arguments?: Record<string, unknown>;
|
|
29
|
+
/** Output stats. Shape depends on tool_name. */
|
|
30
|
+
stats?: Diagnostics.Stats;
|
|
31
|
+
}
|
|
32
|
+
namespace Diagnostics {
|
|
33
|
+
/**
|
|
34
|
+
* Output stats. Shape depends on tool_name.
|
|
35
|
+
*/
|
|
36
|
+
type Stats = AirweaveSDK.SearchToolStats | AirweaveSDK.ReadToolStats | AirweaveSDK.CollectToolStats | AirweaveSDK.CountToolStats | AirweaveSDK.NavigateToolStats | AirweaveSDK.ReviewToolStats | AirweaveSDK.FinishToolStats | AirweaveSDK.ErrorToolStats;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AgenticSearchToolCallEvent = void 0;
|
|
7
|
+
var AgenticSearchToolCallEvent;
|
|
8
|
+
(function (AgenticSearchToolCallEvent) {
|
|
9
|
+
AgenticSearchToolCallEvent.ToolName = {
|
|
10
|
+
Search: "search",
|
|
11
|
+
Read: "read",
|
|
12
|
+
AddToResults: "add_to_results",
|
|
13
|
+
RemoveFromResults: "remove_from_results",
|
|
14
|
+
Count: "count",
|
|
15
|
+
GetChildren: "get_children",
|
|
16
|
+
GetSiblings: "get_siblings",
|
|
17
|
+
GetParent: "get_parent",
|
|
18
|
+
ReviewResults: "review_results",
|
|
19
|
+
ReturnResultsToUser: "return_results_to_user",
|
|
20
|
+
};
|
|
21
|
+
})(AgenticSearchToolCallEvent || (exports.AgenticSearchToolCallEvent = AgenticSearchToolCallEvent = {}));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as AirweaveSDK from "../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* Stats from add_to_results or remove_from_results.
|
|
7
|
+
*/
|
|
8
|
+
export interface CollectToolStats {
|
|
9
|
+
added?: number;
|
|
10
|
+
already_collected?: number;
|
|
11
|
+
not_found?: number;
|
|
12
|
+
/** Total results collected after this operation. */
|
|
13
|
+
total_collected?: number;
|
|
14
|
+
entities?: AirweaveSDK.EntitySummary[];
|
|
15
|
+
}
|
|
@@ -8,4 +8,9 @@ import * as AirweaveSDK from "../index.js";
|
|
|
8
8
|
export interface EntitySummary {
|
|
9
9
|
total_entities?: number;
|
|
10
10
|
by_type?: Record<string, AirweaveSDK.EntityTypeStats>;
|
|
11
|
+
entity_id?: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
entity_type?: string;
|
|
14
|
+
source_name?: string;
|
|
15
|
+
relevance_score?: number;
|
|
11
16
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Stats from return_results_to_user.
|
|
6
|
+
*/
|
|
7
|
+
export interface FinishToolStats {
|
|
8
|
+
/** Whether the agent accepted the result set. */
|
|
9
|
+
accepted?: boolean;
|
|
10
|
+
total_collected?: number;
|
|
11
|
+
/** Warning if very few results collected relative to seen. */
|
|
12
|
+
warning?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as AirweaveSDK from "../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* Stats from get_children, get_siblings, or get_parent.
|
|
7
|
+
*/
|
|
8
|
+
export interface NavigateToolStats {
|
|
9
|
+
result_count?: number;
|
|
10
|
+
/** Human-readable label, e.g. 'children of chan-engineering'. */
|
|
11
|
+
context_label?: string;
|
|
12
|
+
first_results?: AirweaveSDK.EntitySummary[];
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as AirweaveSDK from "../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* Stats from a read tool call.
|
|
7
|
+
*/
|
|
8
|
+
export interface ReadToolStats {
|
|
9
|
+
/** Entities successfully read. */
|
|
10
|
+
found?: number;
|
|
11
|
+
/** Entity IDs that weren't found. */
|
|
12
|
+
not_found?: number;
|
|
13
|
+
entities?: AirweaveSDK.EntitySummary[];
|
|
14
|
+
context_label?: string;
|
|
15
|
+
}
|