@hydradb/sdk 0.0.3 → 2.0.0
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 +381 -472
- package/dist/BaseClient.d.ts +6 -2
- package/dist/BaseClient.js +31 -15
- package/dist/Client.d.ts +28 -32
- package/dist/Client.js +99 -73
- package/dist/api/client/requests/QueryRequest.d.ts +40 -0
- package/dist/api/client/requests/index.d.ts +1 -0
- package/dist/api/errors/BadRequestError.js +17 -7
- package/dist/api/errors/ForbiddenError.js +17 -7
- package/dist/api/errors/InternalServerError.js +17 -7
- package/dist/api/errors/NotFoundError.js +17 -7
- package/dist/api/errors/ServiceUnavailableError.js +17 -7
- package/dist/api/errors/TooManyRequestsError.d.ts +1 -2
- package/dist/api/errors/TooManyRequestsError.js +17 -7
- package/dist/api/errors/UnauthorizedError.js +17 -7
- package/dist/api/errors/UnprocessableEntityError.js +17 -7
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +1 -0
- package/dist/api/resources/context/client/Client.d.ts +131 -0
- package/dist/api/resources/context/client/Client.js +587 -0
- package/dist/api/resources/context/client/requests/BodyIngestContextIngestPost.d.ts +26 -0
- package/dist/api/resources/context/client/requests/InspectContextRequest.d.ts +20 -0
- package/dist/api/resources/{fetch/client/requests/GraphRelationsBySourceIdFetchRequest.d.ts → context/client/requests/RelationsContextRequest.d.ts} +10 -9
- package/dist/api/resources/context/client/requests/StatusContextRequest.d.ts +16 -0
- package/dist/api/resources/context/client/requests/V2ListContentRequest.d.ts +25 -0
- package/dist/api/resources/context/client/requests/V2SourceDeleteRequest.d.ts +16 -0
- package/dist/api/resources/context/client/requests/index.d.ts +6 -0
- package/dist/api/resources/context/exports.d.ts +2 -0
- package/dist/api/resources/{recall → context}/exports.js +2 -2
- package/dist/api/resources/index.d.ts +6 -19
- package/dist/api/resources/index.js +24 -27
- package/dist/api/resources/{tenant → tenants}/client/Client.d.ts +39 -39
- package/dist/api/resources/{tenant → tenants}/client/Client.js +204 -130
- package/dist/api/resources/tenants/client/requests/DeleteTenantsRequest.d.ts +10 -0
- package/dist/api/resources/tenants/client/requests/StatsTenantsRequest.d.ts +10 -0
- package/dist/api/resources/tenants/client/requests/StatusTenantsRequest.d.ts +10 -0
- package/dist/api/resources/tenants/client/requests/SubTenantsTenantsRequest.d.ts +10 -0
- package/dist/api/resources/tenants/client/requests/index.d.ts +4 -0
- package/dist/api/resources/tenants/exports.d.ts +2 -0
- package/dist/api/resources/{data → tenants}/exports.js +2 -2
- package/dist/api/resources/webhooks/client/Client.d.ts +87 -0
- package/dist/api/resources/webhooks/client/Client.js +429 -0
- package/dist/api/resources/webhooks/client/requests/GetDeliveryWebhooksRequest.d.ts +9 -0
- package/dist/api/resources/webhooks/client/requests/ListDeliveriesWebhooksRequest.d.ts +12 -0
- package/dist/api/resources/webhooks/client/requests/RetryDeliveryWebhooksRequest.d.ts +9 -0
- package/dist/api/resources/webhooks/client/requests/index.d.ts +3 -0
- package/dist/api/resources/webhooks/exports.d.ts +2 -0
- package/dist/api/resources/{fetch → webhooks}/exports.js +2 -2
- package/dist/api/types/CollectionStats.d.ts +1 -1
- package/dist/api/types/ContentFilter.d.ts +9 -5
- package/dist/api/types/CustomPropertyDefinition.d.ts +7 -7
- package/dist/api/types/DeleteUserMemoryResponse.d.ts +2 -2
- package/dist/api/types/DeliveryItem.d.ts +12 -0
- package/dist/api/types/DeliveryListResponse.d.ts +7 -0
- package/dist/api/types/Entity.d.ts +3 -3
- package/dist/api/types/ErrorDetail.d.ts +4 -0
- package/dist/api/types/GraphContext.d.ts +4 -4
- package/dist/api/types/InfraStatusResponseV2.d.ts +17 -0
- package/dist/api/types/InfraV2.d.ts +11 -0
- package/dist/api/types/IngestType.d.ts +5 -0
- package/dist/api/types/{ListContentKind.js → IngestType.js} +3 -3
- package/dist/api/types/ListUserMemoriesResponse.d.ts +3 -3
- package/dist/api/types/PaginationMeta.d.ts +4 -4
- package/dist/api/types/QueryApiResponse.d.ts +7 -0
- package/dist/api/types/QueryBy.d.ts +6 -0
- package/dist/api/types/QueryBy.js +9 -0
- package/dist/api/types/QueryRequestAlpha.d.ts +4 -0
- package/dist/api/types/RelationEvidence.d.ts +9 -9
- package/dist/api/types/ResponseMeta.d.ts +4 -0
- package/dist/api/types/RetryResponse.d.ts +5 -0
- package/dist/api/types/ScoredPathResponse.d.ts +4 -4
- package/dist/api/types/SourceDeleteApiResponse.d.ts +7 -0
- package/dist/api/types/SourceDeleteApiResponseData.d.ts +2 -0
- package/dist/api/types/SourceDeleteResponse.d.ts +4 -4
- package/dist/api/types/SourceDeleteResultItem.d.ts +2 -2
- package/dist/api/types/SourceFetchApiResponse.d.ts +7 -0
- package/dist/api/types/SourceGraphRelationsResponse.d.ts +4 -4
- package/dist/api/types/SourceInfo.d.ts +13 -7
- package/dist/api/types/SourceIngestApiResponse.d.ts +7 -0
- package/dist/api/types/SourceIngestApiResponseData.d.ts +2 -0
- package/dist/api/types/SourceListApiResponse.d.ts +7 -0
- package/dist/api/types/SourceListApiResponseData.d.ts +2 -0
- package/dist/api/types/SourceRelationsApiResponse.d.ts +7 -0
- package/dist/api/types/SourceStatusApiResponse.d.ts +7 -0
- package/dist/api/types/SourceType.d.ts +7 -0
- package/dist/api/types/SourceType.js +10 -0
- package/dist/api/types/SubTenantIdsResponse.d.ts +2 -2
- package/dist/api/types/TenantCreateAcceptedResponse.d.ts +3 -3
- package/dist/api/types/TenantCreateApiResponse.d.ts +7 -0
- package/dist/api/{resources/tenant/client/requests → types}/TenantCreateRequest.d.ts +9 -9
- package/dist/api/types/TenantDeleteApiResponse.d.ts +7 -0
- package/dist/api/types/TenantDeleteResponse.d.ts +3 -3
- package/dist/api/types/TenantIdsResponse.d.ts +3 -3
- package/dist/api/types/TenantInfraStatusApiResponse.d.ts +7 -0
- package/dist/api/types/TenantListApiResponse.d.ts +7 -0
- package/dist/api/types/TenantStatsApiResponse.d.ts +7 -0
- package/dist/api/types/TenantStatsResponse.d.ts +5 -5
- package/dist/api/types/TenantSubTenantsApiResponse.d.ts +7 -0
- package/dist/api/types/TripletWithEvidence.d.ts +1 -1
- package/dist/api/types/UserMemory.d.ts +4 -2
- package/dist/api/types/V2AddMemoryResponse.d.ts +11 -0
- package/dist/api/types/V2BatchProcessingStatus.d.ts +5 -0
- package/dist/api/types/V2Chunk.d.ts +29 -0
- package/dist/api/types/{MemoryResultItem.d.ts → V2MemoryResultItem.d.ts} +8 -9
- package/dist/api/types/V2ProcessingStatus.d.ts +18 -0
- package/dist/api/types/V2ProcessingStatusIndexingStatus.d.ts +10 -0
- package/dist/api/types/V2ProcessingStatusIndexingStatus.js +13 -0
- package/dist/api/types/V2RetrievalResult.d.ts +12 -0
- package/dist/api/types/V2SourceFetchResponse.d.ts +23 -0
- package/dist/api/types/V2SourceListResponse.d.ts +1 -0
- package/dist/api/types/V2SourceUploadResponse.d.ts +11 -0
- package/dist/api/types/V2SourceUploadResultItem.d.ts +13 -0
- package/dist/api/types/VectorstoreStatus.d.ts +6 -0
- package/dist/api/types/WebhookDeleteApiResponse.d.ts +7 -0
- package/dist/api/types/WebhookDeleteResponse.d.ts +4 -0
- package/dist/api/types/WebhookDeliveryItemApiResponse.d.ts +7 -0
- package/dist/api/types/WebhookDeliveryListApiResponse.d.ts +7 -0
- package/dist/api/types/WebhookGetApiResponse.d.ts +7 -0
- package/dist/api/types/WebhookGetResponse.d.ts +6 -0
- package/dist/api/types/WebhookRegisterApiResponse.d.ts +7 -0
- package/dist/api/types/WebhookRegisterRequest.d.ts +8 -0
- package/dist/api/types/WebhookRegisterRequest.js +3 -0
- package/dist/api/types/WebhookRegisterResponse.d.ts +7 -0
- package/dist/api/types/WebhookRegisterResponse.js +3 -0
- package/dist/api/types/WebhookRetryApiResponse.d.ts +7 -0
- package/dist/api/types/WebhookRetryApiResponse.js +3 -0
- package/dist/api/types/WebhookTestApiResponse.d.ts +7 -0
- package/dist/api/types/WebhookTestApiResponse.js +3 -0
- package/dist/api/types/WebhookTestResponse.d.ts +5 -0
- package/dist/api/types/WebhookTestResponse.js +3 -0
- package/dist/api/types/index.d.ts +52 -39
- package/dist/api/types/index.js +52 -39
- package/dist/auth/BearerAuthProvider.d.ts +1 -1
- package/dist/auth/BearerAuthProvider.js +18 -8
- package/dist/core/auth/AuthProvider.js +1 -2
- package/dist/core/auth/BasicAuth.js +2 -3
- package/dist/core/base64.js +2 -3
- package/dist/core/fetcher/BinaryResponse.js +1 -2
- package/dist/core/fetcher/Fetcher.js +7 -9
- package/dist/core/fetcher/Headers.d.ts +1 -2
- package/dist/core/fetcher/Headers.js +3 -11
- package/dist/core/fetcher/RawResponse.js +2 -2
- package/dist/core/fetcher/createRequestUrl.js +1 -2
- package/dist/core/fetcher/getErrorResponseBody.js +3 -5
- package/dist/core/fetcher/getFetchFn.js +1 -2
- package/dist/core/fetcher/getHeader.js +1 -2
- package/dist/core/fetcher/getRequestBody.js +1 -2
- package/dist/core/fetcher/getResponseBody.js +1 -2
- package/dist/core/fetcher/makePassthroughRequest.js +12 -13
- package/dist/core/fetcher/makeRequest.js +13 -6
- package/dist/core/fetcher/requestWithRetries.js +1 -2
- package/dist/core/fetcher/signals.js +4 -5
- package/dist/core/file/file.js +29 -21
- package/dist/core/file/types.d.ts +0 -4
- package/dist/core/form-data-utils/FormDataWrapper.js +22 -32
- package/dist/core/form-data-utils/encodeAsFormParameter.js +1 -2
- package/dist/core/headers.d.ts +2 -3
- package/dist/core/headers.js +10 -9
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +19 -8
- package/dist/core/json.d.ts +1 -1
- package/dist/core/json.js +2 -2
- package/dist/core/logging/exports.js +17 -7
- package/dist/core/logging/logger.js +6 -7
- package/dist/core/runtime/runtime.js +7 -8
- package/dist/core/schemas/Schema.d.ts +88 -0
- package/dist/core/schemas/Schema.js +25 -0
- package/dist/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/dist/core/schemas/builders/bigint/bigint.js +56 -0
- package/dist/core/schemas/builders/bigint/index.d.ts +1 -0
- package/dist/core/schemas/builders/bigint/index.js +5 -0
- package/dist/core/schemas/builders/date/date.d.ts +2 -0
- package/dist/core/schemas/builders/date/date.js +65 -0
- package/dist/core/schemas/builders/date/index.d.ts +1 -0
- package/dist/core/schemas/builders/date/index.js +5 -0
- package/dist/core/schemas/builders/enum/enum.d.ts +3 -0
- package/dist/core/schemas/builders/enum/enum.js +45 -0
- package/dist/core/schemas/builders/enum/index.d.ts +1 -0
- package/dist/core/schemas/builders/enum/index.js +6 -0
- package/dist/core/schemas/builders/index.d.ts +14 -0
- package/dist/core/schemas/builders/index.js +30 -0
- package/dist/core/schemas/builders/lazy/index.d.ts +3 -0
- package/dist/core/schemas/builders/lazy/index.js +7 -0
- package/dist/core/schemas/builders/lazy/lazy.d.ts +5 -0
- package/dist/core/schemas/builders/lazy/lazy.js +27 -0
- package/dist/core/schemas/builders/lazy/lazyObject.d.ts +3 -0
- package/dist/core/schemas/builders/lazy/lazyObject.js +20 -0
- package/dist/core/schemas/builders/list/index.d.ts +1 -0
- package/dist/core/schemas/builders/list/index.js +5 -0
- package/dist/core/schemas/builders/list/list.d.ts +2 -0
- package/dist/core/schemas/builders/list/list.js +52 -0
- package/dist/core/schemas/builders/literals/booleanLiteral.d.ts +2 -0
- package/dist/core/schemas/builders/literals/booleanLiteral.js +28 -0
- package/dist/core/schemas/builders/literals/index.d.ts +2 -0
- package/dist/core/schemas/builders/literals/index.js +7 -0
- package/dist/core/schemas/builders/literals/stringLiteral.d.ts +2 -0
- package/dist/core/schemas/builders/literals/stringLiteral.js +28 -0
- package/dist/core/schemas/builders/object/index.d.ts +6 -0
- package/dist/core/schemas/builders/object/index.js +11 -0
- package/dist/core/schemas/builders/object/object.d.ts +3 -0
- package/dist/core/schemas/builders/object/object.js +385 -0
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -0
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +7 -0
- package/dist/core/schemas/builders/object/property.d.ts +8 -0
- package/dist/core/schemas/builders/object/property.js +15 -0
- package/dist/core/schemas/builders/object/types.d.ts +31 -0
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +9 -0
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +66 -0
- package/dist/core/schemas/builders/object-like/index.d.ts +2 -0
- package/dist/core/schemas/builders/object-like/index.js +6 -0
- package/dist/core/schemas/builders/object-like/types.d.ts +7 -0
- package/dist/core/schemas/builders/primitives/any.d.ts +2 -0
- package/dist/core/schemas/builders/primitives/any.js +9 -0
- package/dist/core/schemas/builders/primitives/boolean.d.ts +2 -0
- package/dist/core/schemas/builders/primitives/boolean.js +25 -0
- package/dist/core/schemas/builders/primitives/index.d.ts +6 -0
- package/dist/core/schemas/builders/primitives/index.js +15 -0
- package/dist/core/schemas/builders/primitives/never.d.ts +2 -0
- package/dist/core/schemas/builders/primitives/never.js +14 -0
- package/dist/core/schemas/builders/primitives/number.d.ts +2 -0
- package/dist/core/schemas/builders/primitives/number.js +25 -0
- package/dist/core/schemas/builders/primitives/string.d.ts +2 -0
- package/dist/core/schemas/builders/primitives/string.js +25 -0
- package/dist/core/schemas/builders/primitives/unknown.d.ts +2 -0
- package/dist/core/schemas/builders/primitives/unknown.js +6 -0
- package/dist/core/schemas/builders/record/index.d.ts +2 -0
- package/dist/core/schemas/builders/record/index.js +6 -0
- package/dist/core/schemas/builders/record/record.d.ts +4 -0
- package/dist/core/schemas/builders/record/record.js +137 -0
- package/dist/core/schemas/builders/record/types.d.ts +6 -0
- package/dist/core/schemas/builders/schema-utils/JsonError.d.ts +5 -0
- package/dist/core/schemas/builders/schema-utils/JsonError.js +13 -0
- package/dist/core/schemas/builders/schema-utils/ParseError.d.ts +5 -0
- package/dist/core/schemas/builders/schema-utils/ParseError.js +13 -0
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +21 -0
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +157 -0
- package/dist/core/schemas/builders/schema-utils/index.d.ts +4 -0
- package/dist/core/schemas/builders/schema-utils/index.js +11 -0
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +2 -0
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +9 -0
- package/dist/core/schemas/builders/set/index.d.ts +1 -0
- package/dist/core/schemas/builders/set/index.js +5 -0
- package/dist/core/schemas/builders/set/set.d.ts +2 -0
- package/dist/core/schemas/builders/set/set.js +45 -0
- package/dist/core/schemas/builders/undiscriminated-union/index.d.ts +2 -0
- package/dist/core/schemas/builders/undiscriminated-union/index.js +5 -0
- package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +4 -0
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +3 -0
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +42 -0
- package/dist/core/schemas/builders/union/discriminant.d.ts +5 -0
- package/dist/core/schemas/builders/union/discriminant.js +9 -0
- package/dist/core/schemas/builders/union/index.d.ts +4 -0
- package/dist/core/schemas/builders/union/index.js +7 -0
- package/dist/core/schemas/builders/union/types.d.ts +13 -0
- package/dist/core/schemas/builders/union/union.d.ts +4 -0
- package/dist/core/schemas/builders/union/union.js +130 -0
- package/dist/core/schemas/index.d.ts +2 -0
- package/dist/core/schemas/index.js +17 -0
- package/dist/core/schemas/utils/MaybePromise.d.ts +1 -0
- package/dist/core/schemas/utils/MaybePromise.js +2 -0
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +7 -0
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.js +2 -0
- package/dist/core/schemas/utils/createIdentitySchemaCreator.d.ts +2 -0
- package/dist/core/schemas/utils/createIdentitySchemaCreator.js +18 -0
- package/dist/core/schemas/utils/entries.d.ts +1 -0
- package/dist/core/schemas/utils/entries.js +6 -0
- package/dist/core/schemas/utils/filterObject.d.ts +1 -0
- package/dist/core/schemas/utils/filterObject.js +13 -0
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +1 -0
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +27 -0
- package/dist/core/schemas/utils/isPlainObject.d.ts +1 -0
- package/dist/core/schemas/utils/isPlainObject.js +15 -0
- package/dist/core/schemas/utils/keys.d.ts +1 -0
- package/dist/core/schemas/utils/keys.js +6 -0
- package/dist/core/schemas/utils/maybeSkipValidation.d.ts +2 -0
- package/dist/core/schemas/utils/maybeSkipValidation.js +31 -0
- package/dist/core/schemas/utils/partition.d.ts +1 -0
- package/dist/core/schemas/utils/partition.js +15 -0
- package/dist/core/url/QueryStringBuilder.js +2 -3
- package/dist/core/url/encodePathParam.js +1 -2
- package/dist/core/url/join.js +4 -5
- package/dist/core/url/qs.js +5 -3
- package/dist/errors/HydraDBTimeoutError.js +1 -1
- package/dist/errors/handleNonStatusCodeError.js +18 -9
- package/dist/helpers/buildString.d.ts +16 -0
- package/dist/helpers/buildString.js +204 -0
- package/dist/helpers/index.d.ts +1 -0
- package/dist/helpers/index.js +8 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +21 -8
- package/dist/serialization/client/requests/QueryRequest.d.ts +28 -0
- package/dist/serialization/client/requests/QueryRequest.js +60 -0
- package/dist/serialization/client/requests/index.d.ts +1 -0
- package/dist/serialization/client/requests/index.js +5 -0
- package/dist/{api/resources/fetch → serialization}/index.d.ts +1 -0
- package/dist/{api/resources/fetch → serialization}/index.js +1 -0
- package/dist/serialization/resources/context/client/requests/V2ListContentRequest.d.ts +18 -0
- package/dist/serialization/resources/context/client/requests/V2ListContentRequest.js +50 -0
- package/dist/serialization/resources/context/client/requests/V2SourceDeleteRequest.d.ts +13 -0
- package/dist/serialization/resources/context/client/requests/V2SourceDeleteRequest.js +45 -0
- package/dist/serialization/resources/context/client/requests/index.d.ts +2 -0
- package/dist/serialization/resources/context/client/requests/index.js +7 -0
- package/dist/serialization/resources/index.d.ts +2 -0
- package/dist/serialization/resources/index.js +41 -0
- package/dist/serialization/types/Bm25OperatorType.d.ts +7 -0
- package/dist/serialization/types/Bm25OperatorType.js +39 -0
- package/dist/serialization/types/CollectionStats.d.ts +10 -0
- package/dist/serialization/types/CollectionStats.js +42 -0
- package/dist/serialization/types/ContentFilter.d.ts +11 -0
- package/dist/serialization/types/ContentFilter.js +43 -0
- package/dist/serialization/types/CustomPropertyDefinition.d.ts +17 -0
- package/dist/serialization/types/CustomPropertyDefinition.js +49 -0
- package/dist/serialization/types/DeleteUserMemoryResponse.d.ts +10 -0
- package/dist/serialization/types/DeleteUserMemoryResponse.js +42 -0
- package/dist/serialization/types/DeliveryItem.d.ts +18 -0
- package/dist/serialization/types/DeliveryItem.js +50 -0
- package/dist/serialization/types/DeliveryListResponse.d.ts +12 -0
- package/dist/serialization/types/DeliveryListResponse.js +44 -0
- package/dist/serialization/types/Entity.d.ts +13 -0
- package/dist/serialization/types/Entity.js +45 -0
- package/dist/serialization/types/ErrorDetail.d.ts +10 -0
- package/dist/serialization/types/ErrorDetail.js +42 -0
- package/dist/serialization/types/GraphContext.d.ts +13 -0
- package/dist/serialization/types/GraphContext.js +47 -0
- package/dist/serialization/types/InfraStatusResponseV2.d.ts +13 -0
- package/dist/serialization/types/InfraStatusResponseV2.js +45 -0
- package/dist/serialization/types/InfraV2.d.ts +13 -0
- package/dist/serialization/types/InfraV2.js +45 -0
- package/dist/serialization/types/IngestType.d.ts +7 -0
- package/dist/serialization/types/IngestType.js +39 -0
- package/dist/serialization/types/ListUserMemoriesResponse.d.ts +14 -0
- package/dist/serialization/types/ListUserMemoriesResponse.js +46 -0
- package/dist/serialization/types/MilvusDataType.d.ts +7 -0
- package/dist/serialization/types/MilvusDataType.js +52 -0
- package/dist/serialization/types/PaginationMeta.d.ts +14 -0
- package/dist/serialization/types/PaginationMeta.js +46 -0
- package/dist/serialization/types/PathTriplet.d.ts +13 -0
- package/dist/serialization/types/PathTriplet.js +45 -0
- package/dist/serialization/types/QueryApiResponse.d.ts +15 -0
- package/dist/serialization/types/QueryApiResponse.js +47 -0
- package/dist/serialization/types/QueryBy.d.ts +7 -0
- package/dist/serialization/types/QueryBy.js +42 -0
- package/dist/serialization/types/QueryRequestAlpha.d.ts +7 -0
- package/dist/serialization/types/QueryRequestAlpha.js +39 -0
- package/dist/serialization/types/RelationEvidence.d.ts +18 -0
- package/dist/serialization/types/RelationEvidence.js +50 -0
- package/dist/serialization/types/ResponseMeta.d.ts +10 -0
- package/dist/serialization/types/ResponseMeta.js +42 -0
- package/dist/serialization/types/RetrieveMode.d.ts +7 -0
- package/dist/serialization/types/RetrieveMode.js +39 -0
- package/dist/serialization/types/RetryResponse.d.ts +11 -0
- package/dist/serialization/types/RetryResponse.js +43 -0
- package/dist/serialization/types/ScoredPathResponse.d.ts +14 -0
- package/dist/serialization/types/ScoredPathResponse.js +46 -0
- package/dist/serialization/types/SourceDeleteApiResponse.d.ts +15 -0
- package/dist/serialization/types/SourceDeleteApiResponse.js +47 -0
- package/dist/serialization/types/SourceDeleteApiResponseData.d.ts +9 -0
- package/dist/serialization/types/SourceDeleteApiResponseData.js +41 -0
- package/dist/serialization/types/SourceDeleteResponse.d.ts +13 -0
- package/dist/serialization/types/SourceDeleteResponse.js +45 -0
- package/dist/serialization/types/SourceDeleteResultItem.d.ts +11 -0
- package/dist/serialization/types/SourceDeleteResultItem.js +43 -0
- package/dist/serialization/types/SourceFetchApiResponse.d.ts +15 -0
- package/dist/serialization/types/SourceFetchApiResponse.js +47 -0
- package/dist/serialization/types/SourceGraphRelationsResponse.d.ts +14 -0
- package/dist/serialization/types/SourceGraphRelationsResponse.js +46 -0
- package/dist/serialization/types/SourceInfo.d.ts +19 -0
- package/dist/serialization/types/SourceInfo.js +51 -0
- package/dist/serialization/types/SourceIngestApiResponse.d.ts +15 -0
- package/dist/serialization/types/SourceIngestApiResponse.js +47 -0
- package/dist/serialization/types/SourceIngestApiResponseData.d.ts +9 -0
- package/dist/serialization/types/SourceIngestApiResponseData.js +41 -0
- package/dist/serialization/types/SourceListApiResponse.d.ts +15 -0
- package/dist/serialization/types/SourceListApiResponse.js +47 -0
- package/dist/serialization/types/SourceListApiResponseData.d.ts +9 -0
- package/dist/serialization/types/SourceListApiResponseData.js +41 -0
- package/dist/serialization/types/SourceRelationsApiResponse.d.ts +15 -0
- package/dist/serialization/types/SourceRelationsApiResponse.js +47 -0
- package/dist/serialization/types/SourceStatus.d.ts +7 -0
- package/dist/serialization/types/SourceStatus.js +39 -0
- package/dist/serialization/types/SourceStatusApiResponse.d.ts +15 -0
- package/dist/serialization/types/SourceStatusApiResponse.js +47 -0
- package/dist/serialization/types/SourceType.d.ts +7 -0
- package/dist/serialization/types/SourceType.js +39 -0
- package/dist/serialization/types/SubTenantIdsResponse.d.ts +10 -0
- package/dist/serialization/types/SubTenantIdsResponse.js +42 -0
- package/dist/serialization/types/TenantCreateAcceptedResponse.d.ts +11 -0
- package/dist/serialization/types/TenantCreateAcceptedResponse.js +43 -0
- package/dist/serialization/types/TenantCreateApiResponse.d.ts +15 -0
- package/dist/serialization/types/TenantCreateApiResponse.js +47 -0
- package/dist/serialization/types/TenantCreateRequest.d.ts +13 -0
- package/dist/serialization/types/TenantCreateRequest.js +45 -0
- package/dist/serialization/types/TenantDeleteApiResponse.d.ts +15 -0
- package/dist/serialization/types/TenantDeleteApiResponse.js +47 -0
- package/dist/serialization/types/TenantDeleteResponse.d.ts +11 -0
- package/dist/serialization/types/TenantDeleteResponse.js +43 -0
- package/dist/serialization/types/TenantIdsResponse.d.ts +11 -0
- package/dist/serialization/types/TenantIdsResponse.js +45 -0
- package/dist/serialization/types/TenantInfraStatusApiResponse.d.ts +15 -0
- package/dist/serialization/types/TenantInfraStatusApiResponse.js +47 -0
- package/dist/serialization/types/TenantListApiResponse.d.ts +15 -0
- package/dist/serialization/types/TenantListApiResponse.js +47 -0
- package/dist/serialization/types/TenantStatsApiResponse.d.ts +15 -0
- package/dist/serialization/types/TenantStatsApiResponse.js +47 -0
- package/dist/serialization/types/TenantStatsResponse.d.ts +13 -0
- package/dist/serialization/types/TenantStatsResponse.js +45 -0
- package/dist/serialization/types/TenantSubTenantsApiResponse.d.ts +15 -0
- package/dist/serialization/types/TenantSubTenantsApiResponse.js +47 -0
- package/dist/serialization/types/TripletWithEvidence.d.ts +14 -0
- package/dist/serialization/types/TripletWithEvidence.js +46 -0
- package/dist/serialization/types/UserMemory.d.ts +11 -0
- package/dist/serialization/types/UserMemory.js +43 -0
- package/dist/serialization/types/V2AddMemoryResponse.d.ts +14 -0
- package/dist/serialization/types/V2AddMemoryResponse.js +46 -0
- package/dist/serialization/types/V2BatchProcessingStatus.d.ts +10 -0
- package/dist/serialization/types/V2BatchProcessingStatus.js +42 -0
- package/dist/serialization/types/V2Chunk.d.ts +20 -0
- package/dist/serialization/types/V2Chunk.js +54 -0
- package/dist/serialization/types/V2MemoryResultItem.d.ts +15 -0
- package/dist/serialization/types/V2MemoryResultItem.js +47 -0
- package/dist/serialization/types/V2ProcessingStatus.d.ts +15 -0
- package/dist/serialization/types/V2ProcessingStatus.js +47 -0
- package/dist/serialization/types/V2ProcessingStatusIndexingStatus.d.ts +7 -0
- package/dist/serialization/types/V2ProcessingStatusIndexingStatus.js +39 -0
- package/dist/serialization/types/V2RetrievalResult.d.ts +15 -0
- package/dist/serialization/types/V2RetrievalResult.js +47 -0
- package/dist/serialization/types/V2SourceFetchResponse.d.ts +17 -0
- package/dist/serialization/types/V2SourceFetchResponse.js +49 -0
- package/dist/serialization/types/V2SourceListResponse.d.ts +7 -0
- package/dist/serialization/types/V2SourceListResponse.js +39 -0
- package/dist/serialization/types/V2SourceUploadResponse.d.ts +14 -0
- package/dist/serialization/types/V2SourceUploadResponse.js +46 -0
- package/dist/serialization/types/V2SourceUploadResultItem.d.ts +14 -0
- package/dist/serialization/types/V2SourceUploadResultItem.js +46 -0
- package/dist/serialization/types/VectorstoreStatus.d.ts +10 -0
- package/dist/serialization/types/VectorstoreStatus.js +42 -0
- package/dist/serialization/types/WebhookDeleteApiResponse.d.ts +15 -0
- package/dist/serialization/types/WebhookDeleteApiResponse.js +47 -0
- package/dist/serialization/types/WebhookDeleteResponse.d.ts +10 -0
- package/dist/serialization/types/WebhookDeleteResponse.js +42 -0
- package/dist/serialization/types/WebhookDeliveryItemApiResponse.d.ts +15 -0
- package/dist/serialization/types/WebhookDeliveryItemApiResponse.js +47 -0
- package/dist/serialization/types/WebhookDeliveryListApiResponse.d.ts +15 -0
- package/dist/serialization/types/WebhookDeliveryListApiResponse.js +47 -0
- package/dist/serialization/types/WebhookGetApiResponse.d.ts +15 -0
- package/dist/serialization/types/WebhookGetApiResponse.js +47 -0
- package/dist/serialization/types/WebhookGetResponse.d.ts +12 -0
- package/dist/serialization/types/WebhookGetResponse.js +44 -0
- package/dist/serialization/types/WebhookRegisterApiResponse.d.ts +15 -0
- package/dist/serialization/types/WebhookRegisterApiResponse.js +47 -0
- package/dist/serialization/types/WebhookRegisterRequest.d.ts +11 -0
- package/dist/serialization/types/WebhookRegisterRequest.js +43 -0
- package/dist/serialization/types/WebhookRegisterResponse.d.ts +13 -0
- package/dist/serialization/types/WebhookRegisterResponse.js +45 -0
- package/dist/serialization/types/WebhookRetryApiResponse.d.ts +15 -0
- package/dist/serialization/types/WebhookRetryApiResponse.js +47 -0
- package/dist/serialization/types/WebhookTestApiResponse.d.ts +15 -0
- package/dist/serialization/types/WebhookTestApiResponse.js +47 -0
- package/dist/serialization/types/WebhookTestResponse.d.ts +11 -0
- package/dist/serialization/types/WebhookTestResponse.js +43 -0
- package/dist/serialization/types/index.d.ts +78 -0
- package/dist/serialization/types/index.js +94 -0
- package/package.json +12 -2
- package/dist/api/resources/data/client/Client.d.ts +0 -33
- package/dist/api/resources/data/client/Client.js +0 -108
- package/dist/api/resources/data/client/requests/SourceDeleteRequest.d.ts +0 -13
- package/dist/api/resources/data/client/requests/index.d.ts +0 -1
- package/dist/api/resources/data/exports.d.ts +0 -2
- package/dist/api/resources/embeddings/client/Client.d.ts +0 -111
- package/dist/api/resources/embeddings/client/Client.js +0 -339
- package/dist/api/resources/embeddings/client/requests/BodyFilterRawEmbeddingsEndpointEmbeddingsFilterRawEmbeddingsPost.d.ts +0 -21
- package/dist/api/resources/embeddings/client/requests/BodyInsertRawEmbeddingsEndpointEmbeddingsInsertRawEmbeddingsPost.d.ts +0 -36
- package/dist/api/resources/embeddings/client/requests/BodySearchRawEmbeddingsEndpointEmbeddingsSearchRawEmbeddingsPost.d.ts +0 -22
- package/dist/api/resources/embeddings/client/requests/DeleteEmbeddingsRequest.d.ts +0 -16
- package/dist/api/resources/embeddings/client/requests/index.d.ts +0 -4
- package/dist/api/resources/embeddings/exports.d.ts +0 -2
- package/dist/api/resources/embeddings/exports.js +0 -21
- package/dist/api/resources/fetch/client/Client.d.ts +0 -72
- package/dist/api/resources/fetch/client/Client.js +0 -252
- package/dist/api/resources/fetch/client/requests/ListContentRequest.d.ts +0 -25
- package/dist/api/resources/fetch/client/requests/SourceFetchRequest.d.ts +0 -20
- package/dist/api/resources/fetch/client/requests/index.d.ts +0 -3
- package/dist/api/resources/fetch/exports.d.ts +0 -2
- package/dist/api/resources/fetch/types/ListDataFetchResponse.d.ts +0 -2
- package/dist/api/resources/fetch/types/index.d.ts +0 -1
- package/dist/api/resources/fetch/types/index.js +0 -17
- package/dist/api/resources/graphHealth/client/Client.d.ts +0 -32
- package/dist/api/resources/graphHealth/client/Client.js +0 -115
- package/dist/api/resources/graphHealth/client/requests/GetSuperNodesGraphHealthSuperNodesGetRequest.d.ts +0 -16
- package/dist/api/resources/graphHealth/client/requests/index.d.ts +0 -1
- package/dist/api/resources/graphHealth/exports.d.ts +0 -2
- package/dist/api/resources/graphHealth/exports.js +0 -21
- package/dist/api/resources/ingestionPipeline/client/Client.d.ts +0 -27
- package/dist/api/resources/ingestionPipeline/client/Client.js +0 -90
- package/dist/api/resources/ingestionPipeline/client/requests/MemoryIngestRequest.d.ts +0 -19
- package/dist/api/resources/ingestionPipeline/client/requests/index.d.ts +0 -1
- package/dist/api/resources/ingestionPipeline/exports.d.ts +0 -2
- package/dist/api/resources/ingestionPipeline/exports.js +0 -21
- package/dist/api/resources/key/client/Client.d.ts +0 -30
- package/dist/api/resources/key/client/Client.js +0 -104
- package/dist/api/resources/key/client/requests/ApiKeyCreateRequest.d.ts +0 -14
- package/dist/api/resources/key/client/requests/index.d.ts +0 -1
- package/dist/api/resources/key/exports.d.ts +0 -2
- package/dist/api/resources/key/exports.js +0 -21
- package/dist/api/resources/key/index.d.ts +0 -1
- package/dist/api/resources/key/index.js +0 -17
- package/dist/api/resources/recall/client/Client.d.ts +0 -97
- package/dist/api/resources/recall/client/Client.js +0 -324
- package/dist/api/resources/recall/client/index.d.ts +0 -1
- package/dist/api/resources/recall/client/index.js +0 -17
- package/dist/api/resources/recall/client/requests/FullTextSearchRequest.d.ts +0 -22
- package/dist/api/resources/recall/client/requests/QnASearchRequest.d.ts +0 -38
- package/dist/api/resources/recall/client/requests/index.d.ts +0 -2
- package/dist/api/resources/recall/exports.d.ts +0 -2
- package/dist/api/resources/recall/index.d.ts +0 -1
- package/dist/api/resources/recall/index.js +0 -17
- package/dist/api/resources/tenant/client/index.d.ts +0 -1
- package/dist/api/resources/tenant/client/index.js +0 -17
- package/dist/api/resources/tenant/client/requests/DeleteTenantTenantRequest.d.ts +0 -10
- package/dist/api/resources/tenant/client/requests/GetInfraStatusTenantRequest.d.ts +0 -10
- package/dist/api/resources/tenant/client/requests/GetSubTenantIdsTenantRequest.d.ts +0 -10
- package/dist/api/resources/tenant/client/requests/MonitorTenantRequest.d.ts +0 -10
- package/dist/api/resources/tenant/client/requests/index.d.ts +0 -5
- package/dist/api/resources/tenant/exports.d.ts +0 -2
- package/dist/api/resources/tenant/exports.js +0 -21
- package/dist/api/resources/tenant/index.d.ts +0 -1
- package/dist/api/resources/tenant/index.js +0 -17
- package/dist/api/resources/upload/client/Client.d.ts +0 -92
- package/dist/api/resources/upload/client/Client.js +0 -349
- package/dist/api/resources/upload/client/index.d.ts +0 -1
- package/dist/api/resources/upload/client/index.js +0 -17
- package/dist/api/resources/upload/client/requests/BodyAddMemoryMemoriesAddMemoryPost.d.ts +0 -18
- package/dist/api/resources/upload/client/requests/BodyUploadKnowledgeIngestionUploadKnowledgePost.d.ts +0 -23
- package/dist/api/resources/upload/client/requests/DeleteMemoryUploadRequest.d.ts +0 -15
- package/dist/api/resources/upload/client/requests/VerifyProcessingUploadRequest.d.ts +0 -16
- package/dist/api/resources/upload/client/requests/index.d.ts +0 -4
- package/dist/api/resources/upload/exports.d.ts +0 -2
- package/dist/api/resources/upload/exports.js +0 -21
- package/dist/api/resources/upload/index.d.ts +0 -1
- package/dist/api/resources/upload/index.js +0 -17
- package/dist/api/types/ActualErrorResponse.d.ts +0 -4
- package/dist/api/types/AddMemoryResponse.d.ts +0 -14
- package/dist/api/types/ApiKeyCreateResponse.d.ts +0 -14
- package/dist/api/types/AttachmentModel.d.ts +0 -17
- package/dist/api/types/BatchProcessingStatus.d.ts +0 -5
- package/dist/api/types/ContentModel.d.ts +0 -14
- package/dist/api/types/CortexModelsResponseCommonsActualErrorResponse.d.ts +0 -4
- package/dist/api/types/CortexModelsResponseCommonsErrorResponse.d.ts +0 -5
- package/dist/api/types/DeleteResult.d.ts +0 -11
- package/dist/api/types/ErrorResponse.d.ts +0 -5
- package/dist/api/types/FetchMode.d.ts +0 -7
- package/dist/api/types/FetchMode.js +0 -10
- package/dist/api/types/ForcefulRelationsPayload.d.ts +0 -6
- package/dist/api/types/HttpValidationError.d.ts +0 -4
- package/dist/api/types/Infra.d.ts +0 -5
- package/dist/api/types/InfraStatusResponse.d.ts +0 -14
- package/dist/api/types/IngestResponse.d.ts +0 -4
- package/dist/api/types/InsertResult.d.ts +0 -13
- package/dist/api/types/ListContentKind.d.ts +0 -5
- package/dist/api/types/MemoryItem.d.ts +0 -44
- package/dist/api/types/ProcessingStatus.d.ts +0 -26
- package/dist/api/types/ProcessingStatus.js +0 -16
- package/dist/api/types/QnASearchResponse.d.ts +0 -17
- package/dist/api/types/RawEmbeddingDocument.d.ts +0 -16
- package/dist/api/types/RawEmbeddingSearchResult.d.ts +0 -16
- package/dist/api/types/RawEmbeddingVector.d.ts +0 -9
- package/dist/api/types/RecallSearchRequest.d.ts +0 -34
- package/dist/api/types/RetrievalResult.d.ts +0 -12
- package/dist/api/types/SearchMode.d.ts +0 -6
- package/dist/api/types/SearchMode.js +0 -9
- package/dist/api/types/SourceFetchResponse.d.ts +0 -23
- package/dist/api/types/SourceListResponse.d.ts +0 -1
- package/dist/api/types/SourceModel.d.ts +0 -42
- package/dist/api/types/SourceUploadResponse.d.ts +0 -11
- package/dist/api/types/SourceUploadResultItem.d.ts +0 -11
- package/dist/api/types/SuperNodeItem.d.ts +0 -9
- package/dist/api/types/SuperNodeResponse.d.ts +0 -11
- package/dist/api/types/SupportedLlmProviders.d.ts +0 -8
- package/dist/api/types/SupportedLlmProviders.js +0 -11
- package/dist/api/types/UserAssistantPair.d.ts +0 -9
- package/dist/api/types/ValidationError.d.ts +0 -11
- package/dist/api/types/VectorStoreChunk.d.ts +0 -26
- /package/dist/api/{resources/data/client → client}/index.d.ts +0 -0
- /package/dist/api/{resources/data/client → client}/index.js +0 -0
- /package/dist/api/{resources/data/client/requests/SourceDeleteRequest.js → client/requests/QueryRequest.js} +0 -0
- /package/dist/api/{resources/data/client → client}/requests/index.js +0 -0
- /package/dist/api/resources/{embeddings → context}/client/index.d.ts +0 -0
- /package/dist/api/resources/{embeddings → context}/client/index.js +0 -0
- /package/dist/api/resources/{embeddings/client/requests/BodyFilterRawEmbeddingsEndpointEmbeddingsFilterRawEmbeddingsPost.js → context/client/requests/BodyIngestContextIngestPost.js} +0 -0
- /package/dist/api/resources/{embeddings/client/requests/BodyInsertRawEmbeddingsEndpointEmbeddingsInsertRawEmbeddingsPost.js → context/client/requests/InspectContextRequest.js} +0 -0
- /package/dist/api/resources/{embeddings/client/requests/BodySearchRawEmbeddingsEndpointEmbeddingsSearchRawEmbeddingsPost.js → context/client/requests/RelationsContextRequest.js} +0 -0
- /package/dist/api/resources/{embeddings/client/requests/DeleteEmbeddingsRequest.js → context/client/requests/StatusContextRequest.js} +0 -0
- /package/dist/api/resources/{fetch/client/requests/GraphRelationsBySourceIdFetchRequest.js → context/client/requests/V2ListContentRequest.js} +0 -0
- /package/dist/api/resources/{fetch/client/requests/ListContentRequest.js → context/client/requests/V2SourceDeleteRequest.js} +0 -0
- /package/dist/api/resources/{embeddings → context}/client/requests/index.js +0 -0
- /package/dist/api/resources/{data → context}/index.d.ts +0 -0
- /package/dist/api/resources/{data → context}/index.js +0 -0
- /package/dist/api/resources/{fetch → tenants}/client/index.d.ts +0 -0
- /package/dist/api/resources/{fetch → tenants}/client/index.js +0 -0
- /package/dist/api/resources/{fetch/client/requests/SourceFetchRequest.js → tenants/client/requests/DeleteTenantsRequest.js} +0 -0
- /package/dist/api/resources/{fetch/types/ListDataFetchResponse.js → tenants/client/requests/StatsTenantsRequest.js} +0 -0
- /package/dist/api/resources/{graphHealth/client/requests/GetSuperNodesGraphHealthSuperNodesGetRequest.js → tenants/client/requests/StatusTenantsRequest.js} +0 -0
- /package/dist/api/resources/{ingestionPipeline/client/requests/MemoryIngestRequest.js → tenants/client/requests/SubTenantsTenantsRequest.js} +0 -0
- /package/dist/api/resources/{fetch → tenants}/client/requests/index.js +0 -0
- /package/dist/api/resources/{embeddings → tenants}/index.d.ts +0 -0
- /package/dist/api/resources/{embeddings → tenants}/index.js +0 -0
- /package/dist/api/resources/{graphHealth → webhooks}/client/index.d.ts +0 -0
- /package/dist/api/resources/{graphHealth → webhooks}/client/index.js +0 -0
- /package/dist/api/resources/{key/client/requests/ApiKeyCreateRequest.js → webhooks/client/requests/GetDeliveryWebhooksRequest.js} +0 -0
- /package/dist/api/resources/{recall/client/requests/FullTextSearchRequest.js → webhooks/client/requests/ListDeliveriesWebhooksRequest.js} +0 -0
- /package/dist/api/resources/{recall/client/requests/QnASearchRequest.js → webhooks/client/requests/RetryDeliveryWebhooksRequest.js} +0 -0
- /package/dist/api/resources/{graphHealth → webhooks}/client/requests/index.js +0 -0
- /package/dist/api/resources/{graphHealth → webhooks}/index.d.ts +0 -0
- /package/dist/api/resources/{graphHealth → webhooks}/index.js +0 -0
- /package/dist/api/{resources/tenant/client/requests/DeleteTenantTenantRequest.js → types/DeliveryItem.js} +0 -0
- /package/dist/api/{resources/tenant/client/requests/GetInfraStatusTenantRequest.js → types/DeliveryListResponse.js} +0 -0
- /package/dist/api/{resources/tenant/client/requests/GetSubTenantIdsTenantRequest.js → types/ErrorDetail.js} +0 -0
- /package/dist/api/{resources/tenant/client/requests/MonitorTenantRequest.js → types/InfraStatusResponseV2.js} +0 -0
- /package/dist/api/{resources/tenant/client/requests/TenantCreateRequest.js → types/InfraV2.js} +0 -0
- /package/dist/api/{resources/upload/client/requests/BodyAddMemoryMemoriesAddMemoryPost.js → types/QueryApiResponse.js} +0 -0
- /package/dist/api/{resources/upload/client/requests/BodyUploadKnowledgeIngestionUploadKnowledgePost.js → types/QueryRequestAlpha.js} +0 -0
- /package/dist/api/{resources/upload/client/requests/DeleteMemoryUploadRequest.js → types/ResponseMeta.js} +0 -0
- /package/dist/api/{resources/upload/client/requests/VerifyProcessingUploadRequest.js → types/RetryResponse.js} +0 -0
- /package/dist/api/types/{ActualErrorResponse.js → SourceDeleteApiResponse.js} +0 -0
- /package/dist/api/types/{AddMemoryResponse.js → SourceDeleteApiResponseData.js} +0 -0
- /package/dist/api/types/{ApiKeyCreateResponse.js → SourceFetchApiResponse.js} +0 -0
- /package/dist/api/types/{AttachmentModel.js → SourceIngestApiResponse.js} +0 -0
- /package/dist/api/types/{BatchProcessingStatus.js → SourceIngestApiResponseData.js} +0 -0
- /package/dist/api/types/{ContentModel.js → SourceListApiResponse.js} +0 -0
- /package/dist/api/types/{CortexModelsResponseCommonsActualErrorResponse.js → SourceListApiResponseData.js} +0 -0
- /package/dist/api/types/{CortexModelsResponseCommonsErrorResponse.js → SourceRelationsApiResponse.js} +0 -0
- /package/dist/api/types/{DeleteResult.js → SourceStatusApiResponse.js} +0 -0
- /package/dist/api/types/{ErrorResponse.js → TenantCreateApiResponse.js} +0 -0
- /package/dist/api/types/{ForcefulRelationsPayload.js → TenantCreateRequest.js} +0 -0
- /package/dist/api/types/{HttpValidationError.js → TenantDeleteApiResponse.js} +0 -0
- /package/dist/api/types/{Infra.js → TenantInfraStatusApiResponse.js} +0 -0
- /package/dist/api/types/{InfraStatusResponse.js → TenantListApiResponse.js} +0 -0
- /package/dist/api/types/{IngestResponse.js → TenantStatsApiResponse.js} +0 -0
- /package/dist/api/types/{InsertResult.js → TenantSubTenantsApiResponse.js} +0 -0
- /package/dist/api/types/{MemoryItem.js → V2AddMemoryResponse.js} +0 -0
- /package/dist/api/types/{MemoryResultItem.js → V2BatchProcessingStatus.js} +0 -0
- /package/dist/api/types/{QnASearchResponse.js → V2Chunk.js} +0 -0
- /package/dist/api/types/{RawEmbeddingDocument.js → V2MemoryResultItem.js} +0 -0
- /package/dist/api/types/{RawEmbeddingSearchResult.js → V2ProcessingStatus.js} +0 -0
- /package/dist/api/types/{RawEmbeddingVector.js → V2RetrievalResult.js} +0 -0
- /package/dist/api/types/{RecallSearchRequest.js → V2SourceFetchResponse.js} +0 -0
- /package/dist/api/types/{RetrievalResult.js → V2SourceListResponse.js} +0 -0
- /package/dist/api/types/{SourceFetchResponse.js → V2SourceUploadResponse.js} +0 -0
- /package/dist/api/types/{SourceListResponse.js → V2SourceUploadResultItem.js} +0 -0
- /package/dist/api/types/{SourceModel.js → VectorstoreStatus.js} +0 -0
- /package/dist/api/types/{SourceUploadResponse.js → WebhookDeleteApiResponse.js} +0 -0
- /package/dist/api/types/{SourceUploadResultItem.js → WebhookDeleteResponse.js} +0 -0
- /package/dist/api/types/{SuperNodeItem.js → WebhookDeliveryItemApiResponse.js} +0 -0
- /package/dist/api/types/{SuperNodeResponse.js → WebhookDeliveryListApiResponse.js} +0 -0
- /package/dist/api/types/{UserAssistantPair.js → WebhookGetApiResponse.js} +0 -0
- /package/dist/api/types/{ValidationError.js → WebhookGetResponse.js} +0 -0
- /package/dist/api/types/{VectorStoreChunk.js → WebhookRegisterApiResponse.js} +0 -0
- /package/dist/{api/resources/key/client/requests/index.js → core/schemas/builders/object/types.js} +0 -0
- /package/dist/{api/resources/ingestionPipeline/client/requests/index.js → core/schemas/builders/object-like/types.js} +0 -0
- /package/dist/{api/resources/recall/client/requests/index.js → core/schemas/builders/record/types.js} +0 -0
- /package/dist/{api/resources/tenant/client/requests/index.js → core/schemas/builders/undiscriminated-union/types.js} +0 -0
- /package/dist/{api/resources/upload/client/requests/index.js → core/schemas/builders/union/types.js} +0 -0
- /package/dist/{api/resources/ingestionPipeline → serialization}/client/index.d.ts +0 -0
- /package/dist/{api/resources/ingestionPipeline → serialization}/client/index.js +0 -0
- /package/dist/{api/resources/key → serialization/resources/context}/client/index.d.ts +0 -0
- /package/dist/{api/resources/key → serialization/resources/context}/client/index.js +0 -0
- /package/dist/{api/resources/ingestionPipeline → serialization/resources/context}/index.d.ts +0 -0
- /package/dist/{api/resources/ingestionPipeline → serialization/resources/context}/index.js +0 -0
|
@@ -0,0 +1,587 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.ContextClient = void 0;
|
|
38
|
+
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
39
|
+
const headers_js_1 = require("../../../../core/headers.js");
|
|
40
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
41
|
+
const environments = __importStar(require("../../../../environments.js"));
|
|
42
|
+
const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
|
|
43
|
+
const errors = __importStar(require("../../../../errors/index.js"));
|
|
44
|
+
const serializers = __importStar(require("../../../../serialization/index.js"));
|
|
45
|
+
const HydraDB = __importStar(require("../../../index.js"));
|
|
46
|
+
class ContextClient {
|
|
47
|
+
constructor(options) {
|
|
48
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* @param {HydraDB.BodyIngestContextIngestPost} request
|
|
52
|
+
* @param {ContextClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
53
|
+
*
|
|
54
|
+
* @throws {@link HydraDB.BadRequestError}
|
|
55
|
+
* @throws {@link HydraDB.UnauthorizedError}
|
|
56
|
+
* @throws {@link HydraDB.ForbiddenError}
|
|
57
|
+
* @throws {@link HydraDB.NotFoundError}
|
|
58
|
+
* @throws {@link HydraDB.UnprocessableEntityError}
|
|
59
|
+
* @throws {@link HydraDB.InternalServerError}
|
|
60
|
+
* @throws {@link HydraDB.ServiceUnavailableError}
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* import { createReadStream } from "fs";
|
|
64
|
+
* await client.context.ingest({
|
|
65
|
+
* tenantId: "tenant_id"
|
|
66
|
+
* })
|
|
67
|
+
*/
|
|
68
|
+
ingest(request, requestOptions) {
|
|
69
|
+
return core.HttpResponsePromise.fromPromise(this.__ingest(request, requestOptions));
|
|
70
|
+
}
|
|
71
|
+
async __ingest(request, requestOptions) {
|
|
72
|
+
const _body = await core.newFormData();
|
|
73
|
+
if (request.type != null) {
|
|
74
|
+
_body.append("type", serializers.IngestType.jsonOrThrow(request.type, {
|
|
75
|
+
unrecognizedObjectKeys: "strip",
|
|
76
|
+
omitUndefined: true,
|
|
77
|
+
}));
|
|
78
|
+
}
|
|
79
|
+
_body.append("tenant_id", request.tenantId);
|
|
80
|
+
if (request.subTenantId != null) {
|
|
81
|
+
_body.append("sub_tenant_id", request.subTenantId);
|
|
82
|
+
}
|
|
83
|
+
if (request.upsert != null) {
|
|
84
|
+
_body.append("upsert", request.upsert?.toString());
|
|
85
|
+
}
|
|
86
|
+
if (request.documents != null) {
|
|
87
|
+
for (const _file of request.documents) {
|
|
88
|
+
await _body.appendFile("documents", _file);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
if (request.documentMetadata != null) {
|
|
92
|
+
_body.append("document_metadata", request.documentMetadata);
|
|
93
|
+
}
|
|
94
|
+
if (request.appKnowledge != null) {
|
|
95
|
+
_body.append("app_knowledge", request.appKnowledge);
|
|
96
|
+
}
|
|
97
|
+
if (request.memories != null) {
|
|
98
|
+
_body.append("memories", request.memories);
|
|
99
|
+
}
|
|
100
|
+
const _maybeEncodedRequest = await _body.getRequest();
|
|
101
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
102
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
103
|
+
"API-Version": requestOptions?.apiVersion ?? this._options?.apiVersion ?? "2",
|
|
104
|
+
..._maybeEncodedRequest.headers,
|
|
105
|
+
}), requestOptions?.headers);
|
|
106
|
+
const _response = await core.fetcher({
|
|
107
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
108
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
109
|
+
environments.HydraDBEnvironment.HydradDb, "context/ingest"),
|
|
110
|
+
method: "POST",
|
|
111
|
+
headers: _headers,
|
|
112
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
113
|
+
requestType: "file",
|
|
114
|
+
duplex: _maybeEncodedRequest.duplex,
|
|
115
|
+
body: _maybeEncodedRequest.body,
|
|
116
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
117
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
118
|
+
abortSignal: requestOptions?.abortSignal,
|
|
119
|
+
fetchFn: this._options?.fetch,
|
|
120
|
+
logging: this._options.logging,
|
|
121
|
+
});
|
|
122
|
+
if (_response.ok) {
|
|
123
|
+
return {
|
|
124
|
+
data: serializers.SourceIngestApiResponse.parseOrThrow(_response.body, {
|
|
125
|
+
unrecognizedObjectKeys: "passthrough",
|
|
126
|
+
allowUnrecognizedUnionMembers: true,
|
|
127
|
+
allowUnrecognizedEnumValues: true,
|
|
128
|
+
skipValidation: true,
|
|
129
|
+
breadcrumbsPrefix: ["response"],
|
|
130
|
+
}),
|
|
131
|
+
rawResponse: _response.rawResponse,
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
if (_response.error.reason === "status-code") {
|
|
135
|
+
switch (_response.error.statusCode) {
|
|
136
|
+
case 400:
|
|
137
|
+
throw new HydraDB.BadRequestError(_response.error.body, _response.rawResponse);
|
|
138
|
+
case 401:
|
|
139
|
+
throw new HydraDB.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
140
|
+
case 403:
|
|
141
|
+
throw new HydraDB.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
142
|
+
case 404:
|
|
143
|
+
throw new HydraDB.NotFoundError(_response.error.body, _response.rawResponse);
|
|
144
|
+
case 422:
|
|
145
|
+
throw new HydraDB.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
146
|
+
case 500:
|
|
147
|
+
throw new HydraDB.InternalServerError(_response.error.body, _response.rawResponse);
|
|
148
|
+
case 503:
|
|
149
|
+
throw new HydraDB.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
150
|
+
default:
|
|
151
|
+
throw new errors.HydraDBError({
|
|
152
|
+
statusCode: _response.error.statusCode,
|
|
153
|
+
body: _response.error.body,
|
|
154
|
+
rawResponse: _response.rawResponse,
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/context/ingest");
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* @param {HydraDB.StatusContextRequest} request
|
|
162
|
+
* @param {ContextClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
163
|
+
*
|
|
164
|
+
* @throws {@link HydraDB.BadRequestError}
|
|
165
|
+
* @throws {@link HydraDB.UnauthorizedError}
|
|
166
|
+
* @throws {@link HydraDB.ForbiddenError}
|
|
167
|
+
* @throws {@link HydraDB.NotFoundError}
|
|
168
|
+
* @throws {@link HydraDB.UnprocessableEntityError}
|
|
169
|
+
* @throws {@link HydraDB.InternalServerError}
|
|
170
|
+
* @throws {@link HydraDB.ServiceUnavailableError}
|
|
171
|
+
*
|
|
172
|
+
* @example
|
|
173
|
+
* await client.context.status({
|
|
174
|
+
* tenantId: "tenant_1234"
|
|
175
|
+
* })
|
|
176
|
+
*/
|
|
177
|
+
status(request = {}, requestOptions) {
|
|
178
|
+
return core.HttpResponsePromise.fromPromise(this.__status(request, requestOptions));
|
|
179
|
+
}
|
|
180
|
+
async __status(request = {}, requestOptions) {
|
|
181
|
+
const { id, ids, tenantId, subTenantId } = request;
|
|
182
|
+
const _queryParams = {
|
|
183
|
+
id,
|
|
184
|
+
ids,
|
|
185
|
+
tenant_id: tenantId,
|
|
186
|
+
sub_tenant_id: subTenantId,
|
|
187
|
+
};
|
|
188
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
189
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "API-Version": requestOptions?.apiVersion ?? this._options?.apiVersion ?? "2" }), requestOptions?.headers);
|
|
190
|
+
const _response = await core.fetcher({
|
|
191
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
192
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
193
|
+
environments.HydraDBEnvironment.HydradDb, "context/status"),
|
|
194
|
+
method: "GET",
|
|
195
|
+
headers: _headers,
|
|
196
|
+
queryString: core.url
|
|
197
|
+
.queryBuilder()
|
|
198
|
+
.addMany(_queryParams)
|
|
199
|
+
.mergeAdditional(requestOptions?.queryParams)
|
|
200
|
+
.build(),
|
|
201
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
202
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
203
|
+
abortSignal: requestOptions?.abortSignal,
|
|
204
|
+
fetchFn: this._options?.fetch,
|
|
205
|
+
logging: this._options.logging,
|
|
206
|
+
});
|
|
207
|
+
if (_response.ok) {
|
|
208
|
+
return {
|
|
209
|
+
data: serializers.SourceStatusApiResponse.parseOrThrow(_response.body, {
|
|
210
|
+
unrecognizedObjectKeys: "passthrough",
|
|
211
|
+
allowUnrecognizedUnionMembers: true,
|
|
212
|
+
allowUnrecognizedEnumValues: true,
|
|
213
|
+
skipValidation: true,
|
|
214
|
+
breadcrumbsPrefix: ["response"],
|
|
215
|
+
}),
|
|
216
|
+
rawResponse: _response.rawResponse,
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
if (_response.error.reason === "status-code") {
|
|
220
|
+
switch (_response.error.statusCode) {
|
|
221
|
+
case 400:
|
|
222
|
+
throw new HydraDB.BadRequestError(_response.error.body, _response.rawResponse);
|
|
223
|
+
case 401:
|
|
224
|
+
throw new HydraDB.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
225
|
+
case 403:
|
|
226
|
+
throw new HydraDB.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
227
|
+
case 404:
|
|
228
|
+
throw new HydraDB.NotFoundError(_response.error.body, _response.rawResponse);
|
|
229
|
+
case 422:
|
|
230
|
+
throw new HydraDB.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
231
|
+
case 500:
|
|
232
|
+
throw new HydraDB.InternalServerError(_response.error.body, _response.rawResponse);
|
|
233
|
+
case 503:
|
|
234
|
+
throw new HydraDB.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
235
|
+
default:
|
|
236
|
+
throw new errors.HydraDBError({
|
|
237
|
+
statusCode: _response.error.statusCode,
|
|
238
|
+
body: _response.error.body,
|
|
239
|
+
rawResponse: _response.rawResponse,
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/context/status");
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* @param {HydraDB.InspectContextRequest} request
|
|
247
|
+
* @param {ContextClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
248
|
+
*
|
|
249
|
+
* @throws {@link HydraDB.BadRequestError}
|
|
250
|
+
* @throws {@link HydraDB.UnauthorizedError}
|
|
251
|
+
* @throws {@link HydraDB.ForbiddenError}
|
|
252
|
+
* @throws {@link HydraDB.NotFoundError}
|
|
253
|
+
* @throws {@link HydraDB.UnprocessableEntityError}
|
|
254
|
+
* @throws {@link HydraDB.InternalServerError}
|
|
255
|
+
* @throws {@link HydraDB.ServiceUnavailableError}
|
|
256
|
+
*
|
|
257
|
+
* @example
|
|
258
|
+
* await client.context.inspect({
|
|
259
|
+
* id: "HydraDoc1234",
|
|
260
|
+
* tenantId: "tenant_1234",
|
|
261
|
+
* mode: "<str>"
|
|
262
|
+
* })
|
|
263
|
+
*/
|
|
264
|
+
inspect(request, requestOptions) {
|
|
265
|
+
return core.HttpResponsePromise.fromPromise(this.__inspect(request, requestOptions));
|
|
266
|
+
}
|
|
267
|
+
async __inspect(request, requestOptions) {
|
|
268
|
+
const { id, tenantId, subTenantId, mode, expirySeconds } = request;
|
|
269
|
+
const _queryParams = {
|
|
270
|
+
id,
|
|
271
|
+
tenant_id: tenantId,
|
|
272
|
+
sub_tenant_id: subTenantId,
|
|
273
|
+
mode,
|
|
274
|
+
expiry_seconds: expirySeconds,
|
|
275
|
+
};
|
|
276
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
277
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "API-Version": requestOptions?.apiVersion ?? this._options?.apiVersion ?? "2" }), requestOptions?.headers);
|
|
278
|
+
const _response = await core.fetcher({
|
|
279
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
280
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
281
|
+
environments.HydraDBEnvironment.HydradDb, "context/inspect"),
|
|
282
|
+
method: "GET",
|
|
283
|
+
headers: _headers,
|
|
284
|
+
queryString: core.url
|
|
285
|
+
.queryBuilder()
|
|
286
|
+
.addMany(_queryParams)
|
|
287
|
+
.mergeAdditional(requestOptions?.queryParams)
|
|
288
|
+
.build(),
|
|
289
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
290
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
291
|
+
abortSignal: requestOptions?.abortSignal,
|
|
292
|
+
fetchFn: this._options?.fetch,
|
|
293
|
+
logging: this._options.logging,
|
|
294
|
+
});
|
|
295
|
+
if (_response.ok) {
|
|
296
|
+
return {
|
|
297
|
+
data: serializers.SourceFetchApiResponse.parseOrThrow(_response.body, {
|
|
298
|
+
unrecognizedObjectKeys: "passthrough",
|
|
299
|
+
allowUnrecognizedUnionMembers: true,
|
|
300
|
+
allowUnrecognizedEnumValues: true,
|
|
301
|
+
skipValidation: true,
|
|
302
|
+
breadcrumbsPrefix: ["response"],
|
|
303
|
+
}),
|
|
304
|
+
rawResponse: _response.rawResponse,
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
if (_response.error.reason === "status-code") {
|
|
308
|
+
switch (_response.error.statusCode) {
|
|
309
|
+
case 400:
|
|
310
|
+
throw new HydraDB.BadRequestError(_response.error.body, _response.rawResponse);
|
|
311
|
+
case 401:
|
|
312
|
+
throw new HydraDB.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
313
|
+
case 403:
|
|
314
|
+
throw new HydraDB.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
315
|
+
case 404:
|
|
316
|
+
throw new HydraDB.NotFoundError(_response.error.body, _response.rawResponse);
|
|
317
|
+
case 422:
|
|
318
|
+
throw new HydraDB.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
319
|
+
case 500:
|
|
320
|
+
throw new HydraDB.InternalServerError(_response.error.body, _response.rawResponse);
|
|
321
|
+
case 503:
|
|
322
|
+
throw new HydraDB.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
323
|
+
default:
|
|
324
|
+
throw new errors.HydraDBError({
|
|
325
|
+
statusCode: _response.error.statusCode,
|
|
326
|
+
body: _response.error.body,
|
|
327
|
+
rawResponse: _response.rawResponse,
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/context/inspect");
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* @param {HydraDB.V2ListContentRequest} request
|
|
335
|
+
* @param {ContextClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
336
|
+
*
|
|
337
|
+
* @throws {@link HydraDB.BadRequestError}
|
|
338
|
+
* @throws {@link HydraDB.UnauthorizedError}
|
|
339
|
+
* @throws {@link HydraDB.ForbiddenError}
|
|
340
|
+
* @throws {@link HydraDB.NotFoundError}
|
|
341
|
+
* @throws {@link HydraDB.UnprocessableEntityError}
|
|
342
|
+
* @throws {@link HydraDB.InternalServerError}
|
|
343
|
+
* @throws {@link HydraDB.ServiceUnavailableError}
|
|
344
|
+
*
|
|
345
|
+
* @example
|
|
346
|
+
* await client.context.list({
|
|
347
|
+
* tenantId: "tenant_1234"
|
|
348
|
+
* })
|
|
349
|
+
*/
|
|
350
|
+
list(request, requestOptions) {
|
|
351
|
+
return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
|
|
352
|
+
}
|
|
353
|
+
async __list(request, requestOptions) {
|
|
354
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
355
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "API-Version": requestOptions?.apiVersion ?? this._options?.apiVersion ?? "2" }), requestOptions?.headers);
|
|
356
|
+
const _response = await core.fetcher({
|
|
357
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
358
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
359
|
+
environments.HydraDBEnvironment.HydradDb, "context/list"),
|
|
360
|
+
method: "POST",
|
|
361
|
+
headers: _headers,
|
|
362
|
+
contentType: "application/json",
|
|
363
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
364
|
+
requestType: "json",
|
|
365
|
+
body: serializers.V2ListContentRequest.jsonOrThrow(request, {
|
|
366
|
+
unrecognizedObjectKeys: "strip",
|
|
367
|
+
omitUndefined: true,
|
|
368
|
+
}),
|
|
369
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
370
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
371
|
+
abortSignal: requestOptions?.abortSignal,
|
|
372
|
+
fetchFn: this._options?.fetch,
|
|
373
|
+
logging: this._options.logging,
|
|
374
|
+
});
|
|
375
|
+
if (_response.ok) {
|
|
376
|
+
return {
|
|
377
|
+
data: serializers.SourceListApiResponse.parseOrThrow(_response.body, {
|
|
378
|
+
unrecognizedObjectKeys: "passthrough",
|
|
379
|
+
allowUnrecognizedUnionMembers: true,
|
|
380
|
+
allowUnrecognizedEnumValues: true,
|
|
381
|
+
skipValidation: true,
|
|
382
|
+
breadcrumbsPrefix: ["response"],
|
|
383
|
+
}),
|
|
384
|
+
rawResponse: _response.rawResponse,
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
if (_response.error.reason === "status-code") {
|
|
388
|
+
switch (_response.error.statusCode) {
|
|
389
|
+
case 400:
|
|
390
|
+
throw new HydraDB.BadRequestError(_response.error.body, _response.rawResponse);
|
|
391
|
+
case 401:
|
|
392
|
+
throw new HydraDB.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
393
|
+
case 403:
|
|
394
|
+
throw new HydraDB.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
395
|
+
case 404:
|
|
396
|
+
throw new HydraDB.NotFoundError(_response.error.body, _response.rawResponse);
|
|
397
|
+
case 422:
|
|
398
|
+
throw new HydraDB.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
399
|
+
case 500:
|
|
400
|
+
throw new HydraDB.InternalServerError(_response.error.body, _response.rawResponse);
|
|
401
|
+
case 503:
|
|
402
|
+
throw new HydraDB.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
403
|
+
default:
|
|
404
|
+
throw new errors.HydraDBError({
|
|
405
|
+
statusCode: _response.error.statusCode,
|
|
406
|
+
body: _response.error.body,
|
|
407
|
+
rawResponse: _response.rawResponse,
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/context/list");
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* @param {HydraDB.V2SourceDeleteRequest} request
|
|
415
|
+
* @param {ContextClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
416
|
+
*
|
|
417
|
+
* @throws {@link HydraDB.BadRequestError}
|
|
418
|
+
* @throws {@link HydraDB.UnauthorizedError}
|
|
419
|
+
* @throws {@link HydraDB.ForbiddenError}
|
|
420
|
+
* @throws {@link HydraDB.NotFoundError}
|
|
421
|
+
* @throws {@link HydraDB.UnprocessableEntityError}
|
|
422
|
+
* @throws {@link HydraDB.InternalServerError}
|
|
423
|
+
* @throws {@link HydraDB.ServiceUnavailableError}
|
|
424
|
+
*
|
|
425
|
+
* @example
|
|
426
|
+
* await client.context.delete({
|
|
427
|
+
* tenantId: "tenant_1234",
|
|
428
|
+
* ids: ["HydraDoc1234", "HydraDoc4567"]
|
|
429
|
+
* })
|
|
430
|
+
*/
|
|
431
|
+
delete(request, requestOptions) {
|
|
432
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions));
|
|
433
|
+
}
|
|
434
|
+
async __delete(request, requestOptions) {
|
|
435
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
436
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "API-Version": requestOptions?.apiVersion ?? this._options?.apiVersion ?? "2" }), requestOptions?.headers);
|
|
437
|
+
const _response = await core.fetcher({
|
|
438
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
439
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
440
|
+
environments.HydraDBEnvironment.HydradDb, "context"),
|
|
441
|
+
method: "DELETE",
|
|
442
|
+
headers: _headers,
|
|
443
|
+
contentType: "application/json",
|
|
444
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
445
|
+
requestType: "json",
|
|
446
|
+
body: serializers.V2SourceDeleteRequest.jsonOrThrow(request, {
|
|
447
|
+
unrecognizedObjectKeys: "strip",
|
|
448
|
+
omitUndefined: true,
|
|
449
|
+
}),
|
|
450
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
451
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
452
|
+
abortSignal: requestOptions?.abortSignal,
|
|
453
|
+
fetchFn: this._options?.fetch,
|
|
454
|
+
logging: this._options.logging,
|
|
455
|
+
});
|
|
456
|
+
if (_response.ok) {
|
|
457
|
+
return {
|
|
458
|
+
data: serializers.SourceDeleteApiResponse.parseOrThrow(_response.body, {
|
|
459
|
+
unrecognizedObjectKeys: "passthrough",
|
|
460
|
+
allowUnrecognizedUnionMembers: true,
|
|
461
|
+
allowUnrecognizedEnumValues: true,
|
|
462
|
+
skipValidation: true,
|
|
463
|
+
breadcrumbsPrefix: ["response"],
|
|
464
|
+
}),
|
|
465
|
+
rawResponse: _response.rawResponse,
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
if (_response.error.reason === "status-code") {
|
|
469
|
+
switch (_response.error.statusCode) {
|
|
470
|
+
case 400:
|
|
471
|
+
throw new HydraDB.BadRequestError(_response.error.body, _response.rawResponse);
|
|
472
|
+
case 401:
|
|
473
|
+
throw new HydraDB.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
474
|
+
case 403:
|
|
475
|
+
throw new HydraDB.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
476
|
+
case 404:
|
|
477
|
+
throw new HydraDB.NotFoundError(_response.error.body, _response.rawResponse);
|
|
478
|
+
case 422:
|
|
479
|
+
throw new HydraDB.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
480
|
+
case 500:
|
|
481
|
+
throw new HydraDB.InternalServerError(_response.error.body, _response.rawResponse);
|
|
482
|
+
case 503:
|
|
483
|
+
throw new HydraDB.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
484
|
+
default:
|
|
485
|
+
throw new errors.HydraDBError({
|
|
486
|
+
statusCode: _response.error.statusCode,
|
|
487
|
+
body: _response.error.body,
|
|
488
|
+
rawResponse: _response.rawResponse,
|
|
489
|
+
});
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/context");
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
495
|
+
* @param {HydraDB.RelationsContextRequest} request
|
|
496
|
+
* @param {ContextClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
497
|
+
*
|
|
498
|
+
* @throws {@link HydraDB.BadRequestError}
|
|
499
|
+
* @throws {@link HydraDB.UnauthorizedError}
|
|
500
|
+
* @throws {@link HydraDB.ForbiddenError}
|
|
501
|
+
* @throws {@link HydraDB.NotFoundError}
|
|
502
|
+
* @throws {@link HydraDB.UnprocessableEntityError}
|
|
503
|
+
* @throws {@link HydraDB.InternalServerError}
|
|
504
|
+
* @throws {@link HydraDB.ServiceUnavailableError}
|
|
505
|
+
*
|
|
506
|
+
* @example
|
|
507
|
+
* await client.context.relations({
|
|
508
|
+
* tenantId: "tenant_1234"
|
|
509
|
+
* })
|
|
510
|
+
*/
|
|
511
|
+
relations(request, requestOptions) {
|
|
512
|
+
return core.HttpResponsePromise.fromPromise(this.__relations(request, requestOptions));
|
|
513
|
+
}
|
|
514
|
+
async __relations(request, requestOptions) {
|
|
515
|
+
const { tenantId, id, type: type_, subTenantId, limit, cursor } = request;
|
|
516
|
+
const _queryParams = {
|
|
517
|
+
tenant_id: tenantId,
|
|
518
|
+
id,
|
|
519
|
+
type: type_ != null
|
|
520
|
+
? serializers.IngestType.jsonOrThrow(type_, {
|
|
521
|
+
unrecognizedObjectKeys: "strip",
|
|
522
|
+
omitUndefined: true,
|
|
523
|
+
})
|
|
524
|
+
: undefined,
|
|
525
|
+
sub_tenant_id: subTenantId,
|
|
526
|
+
limit,
|
|
527
|
+
cursor,
|
|
528
|
+
};
|
|
529
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
530
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "API-Version": requestOptions?.apiVersion ?? this._options?.apiVersion ?? "2" }), requestOptions?.headers);
|
|
531
|
+
const _response = await core.fetcher({
|
|
532
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
533
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
534
|
+
environments.HydraDBEnvironment.HydradDb, "context/relations"),
|
|
535
|
+
method: "GET",
|
|
536
|
+
headers: _headers,
|
|
537
|
+
queryString: core.url
|
|
538
|
+
.queryBuilder()
|
|
539
|
+
.addMany(_queryParams)
|
|
540
|
+
.mergeAdditional(requestOptions?.queryParams)
|
|
541
|
+
.build(),
|
|
542
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
543
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
544
|
+
abortSignal: requestOptions?.abortSignal,
|
|
545
|
+
fetchFn: this._options?.fetch,
|
|
546
|
+
logging: this._options.logging,
|
|
547
|
+
});
|
|
548
|
+
if (_response.ok) {
|
|
549
|
+
return {
|
|
550
|
+
data: serializers.SourceRelationsApiResponse.parseOrThrow(_response.body, {
|
|
551
|
+
unrecognizedObjectKeys: "passthrough",
|
|
552
|
+
allowUnrecognizedUnionMembers: true,
|
|
553
|
+
allowUnrecognizedEnumValues: true,
|
|
554
|
+
skipValidation: true,
|
|
555
|
+
breadcrumbsPrefix: ["response"],
|
|
556
|
+
}),
|
|
557
|
+
rawResponse: _response.rawResponse,
|
|
558
|
+
};
|
|
559
|
+
}
|
|
560
|
+
if (_response.error.reason === "status-code") {
|
|
561
|
+
switch (_response.error.statusCode) {
|
|
562
|
+
case 400:
|
|
563
|
+
throw new HydraDB.BadRequestError(_response.error.body, _response.rawResponse);
|
|
564
|
+
case 401:
|
|
565
|
+
throw new HydraDB.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
566
|
+
case 403:
|
|
567
|
+
throw new HydraDB.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
568
|
+
case 404:
|
|
569
|
+
throw new HydraDB.NotFoundError(_response.error.body, _response.rawResponse);
|
|
570
|
+
case 422:
|
|
571
|
+
throw new HydraDB.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
572
|
+
case 500:
|
|
573
|
+
throw new HydraDB.InternalServerError(_response.error.body, _response.rawResponse);
|
|
574
|
+
case 503:
|
|
575
|
+
throw new HydraDB.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
576
|
+
default:
|
|
577
|
+
throw new errors.HydraDBError({
|
|
578
|
+
statusCode: _response.error.statusCode,
|
|
579
|
+
body: _response.error.body,
|
|
580
|
+
rawResponse: _response.rawResponse,
|
|
581
|
+
});
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/context/relations");
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
exports.ContextClient = ContextClient;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type * as core from "../../../../../core/index.js";
|
|
2
|
+
import type * as HydraDB from "../../../../index.js";
|
|
3
|
+
/**
|
|
4
|
+
* @example
|
|
5
|
+
* {
|
|
6
|
+
* tenantId: "tenant_id"
|
|
7
|
+
* }
|
|
8
|
+
*/
|
|
9
|
+
export interface BodyIngestContextIngestPost {
|
|
10
|
+
/** Type of content: 'knowledge' or 'memory' */
|
|
11
|
+
type?: HydraDB.IngestType;
|
|
12
|
+
/** Unique identifier for the tenant/organization */
|
|
13
|
+
tenantId: string;
|
|
14
|
+
/** Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used. */
|
|
15
|
+
subTenantId?: string;
|
|
16
|
+
/** If true, update existing sources with the same id. */
|
|
17
|
+
upsert?: boolean;
|
|
18
|
+
/** Documents to upload (knowledge only). Omit when ingesting memories. */
|
|
19
|
+
documents?: core.file.Uploadable[] | undefined;
|
|
20
|
+
/** JSON array of per-file metadata objects (knowledge only). Each object may include: id (optional), metadata, additional_metadata, infer, and relations. */
|
|
21
|
+
documentMetadata?: string | null;
|
|
22
|
+
/** JSON: single source object or array of app-generated sources (knowledge only). */
|
|
23
|
+
appKnowledge?: string | null;
|
|
24
|
+
/** JSON array of memory items (memory only). Each item has text, title, infer, metadata. */
|
|
25
|
+
memories?: string | null;
|
|
26
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* id: "HydraDoc1234",
|
|
5
|
+
* tenantId: "tenant_1234",
|
|
6
|
+
* mode: "<str>"
|
|
7
|
+
* }
|
|
8
|
+
*/
|
|
9
|
+
export interface InspectContextRequest {
|
|
10
|
+
/** Source ID of the document to fetch */
|
|
11
|
+
id: string;
|
|
12
|
+
/** Unique identifier for the tenant/organization */
|
|
13
|
+
tenantId: string;
|
|
14
|
+
/** Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used. */
|
|
15
|
+
subTenantId?: string | null;
|
|
16
|
+
/** Fetch mode: 'content', 'url', or 'both' */
|
|
17
|
+
mode?: string;
|
|
18
|
+
/** Presigned URL expiry (seconds) */
|
|
19
|
+
expirySeconds?: number;
|
|
20
|
+
}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
+
import type * as HydraDB from "../../../../index.js";
|
|
1
2
|
/**
|
|
2
3
|
* @example
|
|
3
4
|
* {
|
|
4
|
-
*
|
|
5
|
+
* tenantId: "tenant_1234"
|
|
5
6
|
* }
|
|
6
7
|
*/
|
|
7
|
-
export interface
|
|
8
|
-
/** Source ID. If omitted, returns relations across the entire sub-tenant. */
|
|
9
|
-
source_id?: string | null;
|
|
8
|
+
export interface RelationsContextRequest {
|
|
10
9
|
/** Unique identifier for the tenant/organization */
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
|
|
10
|
+
tenantId: string;
|
|
11
|
+
/** Source ID. If omitted, returns relations across the entire sub-tenant. */
|
|
12
|
+
id?: string | null;
|
|
13
|
+
/** Type of content: 'knowledge' or 'memory' */
|
|
14
|
+
type?: HydraDB.IngestType;
|
|
14
15
|
/** Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used. */
|
|
15
|
-
|
|
16
|
+
subTenantId?: string | null;
|
|
16
17
|
/** Maximum number of relation groups to return */
|
|
17
18
|
limit?: number;
|
|
18
|
-
/** Pagination cursor
|
|
19
|
+
/** Pagination cursor from a previous response. */
|
|
19
20
|
cursor?: number | null;
|
|
20
21
|
}
|