@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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fetcher =
|
|
3
|
+
exports.fetcher = void 0;
|
|
4
|
+
exports.fetcherImpl = fetcherImpl;
|
|
4
5
|
const json_js_1 = require("../json.js");
|
|
5
6
|
const logger_js_1 = require("../logging/logger.js");
|
|
6
7
|
const createRequestUrl_js_1 = require("./createRequestUrl.js");
|
|
@@ -131,14 +132,13 @@ function redactUrl(url) {
|
|
|
131
132
|
const decodedKey = decodeURIComponent(key);
|
|
132
133
|
shouldRedact = SENSITIVE_QUERY_PARAMS.has(decodedKey.toLowerCase());
|
|
133
134
|
}
|
|
134
|
-
catch
|
|
135
|
+
catch { }
|
|
135
136
|
}
|
|
136
137
|
redactedParams.push(shouldRedact ? `${key}=[REDACTED]` : param);
|
|
137
138
|
}
|
|
138
139
|
return url.slice(0, queryStart + 1) + redactedParams.join("&") + url.slice(queryEnd);
|
|
139
140
|
}
|
|
140
141
|
async function getHeaders(args) {
|
|
141
|
-
var _a;
|
|
142
142
|
const newHeaders = new Headers_js_1.Headers();
|
|
143
143
|
newHeaders.set("Accept", args.responseType === "json"
|
|
144
144
|
? "application/json"
|
|
@@ -154,7 +154,7 @@ async function getHeaders(args) {
|
|
|
154
154
|
return newHeaders;
|
|
155
155
|
}
|
|
156
156
|
for (const [key, value] of Object.entries(args.headers)) {
|
|
157
|
-
const result = await EndpointSupplier_js_1.EndpointSupplier.get(value, { endpointMetadata:
|
|
157
|
+
const result = await EndpointSupplier_js_1.EndpointSupplier.get(value, { endpointMetadata: args.endpointMetadata ?? {} });
|
|
158
158
|
if (typeof result === "string") {
|
|
159
159
|
newHeaders.set(key, result);
|
|
160
160
|
continue;
|
|
@@ -167,7 +167,6 @@ async function getHeaders(args) {
|
|
|
167
167
|
return newHeaders;
|
|
168
168
|
}
|
|
169
169
|
async function fetcherImpl(args) {
|
|
170
|
-
var _a, _b, _c;
|
|
171
170
|
let url = args.url;
|
|
172
171
|
if (args.queryString != null && args.queryString.length > 0) {
|
|
173
172
|
url = `${url}?${args.queryString}`;
|
|
@@ -177,9 +176,9 @@ async function fetcherImpl(args) {
|
|
|
177
176
|
}
|
|
178
177
|
const requestBody = await (0, getRequestBody_js_1.getRequestBody)({
|
|
179
178
|
body: args.body,
|
|
180
|
-
type:
|
|
179
|
+
type: args.requestType ?? "other",
|
|
181
180
|
});
|
|
182
|
-
const fetchFn =
|
|
181
|
+
const fetchFn = args.fetchFn ?? (await (0, getFetchFn_js_1.getFetchFn)());
|
|
183
182
|
const headers = await getHeaders(args);
|
|
184
183
|
const logger = (0, logger_js_1.createLogger)(args.logging);
|
|
185
184
|
if (logger.isDebug()) {
|
|
@@ -234,7 +233,7 @@ async function fetcherImpl(args) {
|
|
|
234
233
|
}
|
|
235
234
|
}
|
|
236
235
|
catch (error) {
|
|
237
|
-
if (
|
|
236
|
+
if (args.abortSignal?.aborted) {
|
|
238
237
|
if (logger.isError()) {
|
|
239
238
|
const metadata = {
|
|
240
239
|
method: args.method,
|
|
@@ -308,5 +307,4 @@ async function fetcherImpl(args) {
|
|
|
308
307
|
};
|
|
309
308
|
}
|
|
310
309
|
}
|
|
311
|
-
exports.fetcherImpl = fetcherImpl;
|
|
312
310
|
exports.fetcher = fetcherImpl;
|
|
@@ -6,9 +6,6 @@ if (typeof globalThis.Headers !== "undefined") {
|
|
|
6
6
|
exports.Headers = Headers = globalThis.Headers;
|
|
7
7
|
}
|
|
8
8
|
else {
|
|
9
|
-
// This is a polyfill for the Headers class that is compatible with node-fetch.
|
|
10
|
-
// We use `as any` to bypass the TypeScript compiler's type checking, as the
|
|
11
|
-
// generated polyfill is not perfectly compatible with the node-fetch types.
|
|
12
9
|
exports.Headers = Headers = class Headers {
|
|
13
10
|
constructor(init) {
|
|
14
11
|
this.headers = new Map();
|
|
@@ -62,9 +59,11 @@ else {
|
|
|
62
59
|
}
|
|
63
60
|
forEach(callbackfn, thisArg) {
|
|
64
61
|
const boundCallback = thisArg ? callbackfn.bind(thisArg) : callbackfn;
|
|
65
|
-
// @ts-ignore
|
|
66
62
|
this.headers.forEach((values, key) => boundCallback(values.join(", "), key, this));
|
|
67
63
|
}
|
|
64
|
+
getSetCookie() {
|
|
65
|
+
return this.headers.get("set-cookie") || [];
|
|
66
|
+
}
|
|
68
67
|
*entries() {
|
|
69
68
|
for (const [key, values] of this.headers.entries()) {
|
|
70
69
|
yield [key, values.join(", ")];
|
|
@@ -81,12 +80,5 @@ else {
|
|
|
81
80
|
[Symbol.iterator]() {
|
|
82
81
|
return this.entries();
|
|
83
82
|
}
|
|
84
|
-
raw() {
|
|
85
|
-
const result = {};
|
|
86
|
-
for (const [key, values] of this.headers.entries()) {
|
|
87
|
-
result[key] = values;
|
|
88
|
-
}
|
|
89
|
-
return result;
|
|
90
|
-
}
|
|
91
83
|
};
|
|
92
84
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.unknownRawResponse = exports.abortRawResponse = void 0;
|
|
4
|
+
exports.toRawResponse = toRawResponse;
|
|
4
5
|
const Headers_js_1 = require("./Headers.js");
|
|
5
6
|
/**
|
|
6
7
|
* A raw response indicating that the request was aborted.
|
|
@@ -41,4 +42,3 @@ function toRawResponse(response) {
|
|
|
41
42
|
url: response.url,
|
|
42
43
|
};
|
|
43
44
|
}
|
|
44
|
-
exports.toRawResponse = toRawResponse;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createRequestUrl =
|
|
3
|
+
exports.createRequestUrl = createRequestUrl;
|
|
4
4
|
const qs_js_1 = require("../url/qs.js");
|
|
5
5
|
function createRequestUrl(baseUrl, queryParameters) {
|
|
6
6
|
const queryString = (0, qs_js_1.toQueryString)(queryParameters, { arrayFormat: "repeat" });
|
|
7
7
|
return queryString ? `${baseUrl}?${queryString}` : baseUrl;
|
|
8
8
|
}
|
|
9
|
-
exports.createRequestUrl = createRequestUrl;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getErrorResponseBody =
|
|
3
|
+
exports.getErrorResponseBody = getErrorResponseBody;
|
|
4
4
|
const json_js_1 = require("../json.js");
|
|
5
5
|
const getResponseBody_js_1 = require("./getResponseBody.js");
|
|
6
6
|
async function getErrorResponseBody(response) {
|
|
7
|
-
|
|
8
|
-
let contentType = (_a = response.headers.get("Content-Type")) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
7
|
+
let contentType = response.headers.get("Content-Type")?.toLowerCase();
|
|
9
8
|
if (contentType == null || contentType.length === 0) {
|
|
10
9
|
return (0, getResponseBody_js_1.getResponseBody)(response);
|
|
11
10
|
}
|
|
12
11
|
if (contentType.indexOf(";") !== -1) {
|
|
13
|
-
contentType =
|
|
12
|
+
contentType = contentType.split(";")[0]?.trim() ?? "";
|
|
14
13
|
}
|
|
15
14
|
switch (contentType) {
|
|
16
15
|
case "application/hal+json":
|
|
@@ -32,4 +31,3 @@ async function getErrorResponseBody(response) {
|
|
|
32
31
|
return await response.text();
|
|
33
32
|
}
|
|
34
33
|
}
|
|
35
|
-
exports.getErrorResponseBody = getErrorResponseBody;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getHeader =
|
|
3
|
+
exports.getHeader = getHeader;
|
|
4
4
|
function getHeader(headers, header) {
|
|
5
5
|
for (const [headerKey, headerValue] of Object.entries(headers)) {
|
|
6
6
|
if (headerKey.toLowerCase() === header.toLowerCase()) {
|
|
@@ -9,4 +9,3 @@ function getHeader(headers, header) {
|
|
|
9
9
|
}
|
|
10
10
|
return undefined;
|
|
11
11
|
}
|
|
12
|
-
exports.getHeader = getHeader;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getRequestBody =
|
|
3
|
+
exports.getRequestBody = getRequestBody;
|
|
4
4
|
const json_js_1 = require("../json.js");
|
|
5
5
|
const qs_js_1 = require("../url/qs.js");
|
|
6
6
|
async function getRequestBody({ body, type }) {
|
|
@@ -14,4 +14,3 @@ async function getRequestBody({ body, type }) {
|
|
|
14
14
|
return body;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
exports.getRequestBody = getRequestBody;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getResponseBody =
|
|
3
|
+
exports.getResponseBody = getResponseBody;
|
|
4
4
|
const json_js_1 = require("../json.js");
|
|
5
5
|
const BinaryResponse_js_1 = require("./BinaryResponse.js");
|
|
6
6
|
async function getResponseBody(response, responseType) {
|
|
@@ -56,4 +56,3 @@ async function getResponseBody(response, responseType) {
|
|
|
56
56
|
}
|
|
57
57
|
return undefined;
|
|
58
58
|
}
|
|
59
|
-
exports.getResponseBody = getResponseBody;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makePassthroughRequest =
|
|
3
|
+
exports.makePassthroughRequest = makePassthroughRequest;
|
|
4
4
|
const logger_js_1 = require("../logging/logger.js");
|
|
5
5
|
const join_js_1 = require("../url/join.js");
|
|
6
6
|
const EndpointSupplier_js_1 = require("./EndpointSupplier.js");
|
|
@@ -19,7 +19,6 @@ const Supplier_js_1 = require("./Supplier.js");
|
|
|
19
19
|
* @returns A standard Response object.
|
|
20
20
|
*/
|
|
21
21
|
async function makePassthroughRequest(input, init, clientOptions, requestOptions) {
|
|
22
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
23
22
|
const logger = (0, logger_js_1.createLogger)(clientOptions.logging);
|
|
24
23
|
// Extract URL and default init properties from Request object if provided
|
|
25
24
|
let url;
|
|
@@ -46,7 +45,8 @@ async function makePassthroughRequest(input, init, clientOptions, requestOptions
|
|
|
46
45
|
url = input instanceof URL ? input.toString() : input;
|
|
47
46
|
}
|
|
48
47
|
// Resolve the base URL
|
|
49
|
-
const baseUrl = (
|
|
48
|
+
const baseUrl = (clientOptions.baseUrl != null ? await Supplier_js_1.Supplier.get(clientOptions.baseUrl) : undefined) ??
|
|
49
|
+
(clientOptions.environment != null ? await Supplier_js_1.Supplier.get(clientOptions.environment) : undefined);
|
|
50
50
|
// Determine the full URL
|
|
51
51
|
let fullUrl;
|
|
52
52
|
if (url.startsWith("http://") || url.startsWith("https://")) {
|
|
@@ -77,7 +77,7 @@ async function makePassthroughRequest(input, init, clientOptions, requestOptions
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
// Apply user-provided headers from init
|
|
80
|
-
if (
|
|
80
|
+
if (effectiveInit?.headers != null) {
|
|
81
81
|
const initHeaders = effectiveInit.headers instanceof Headers
|
|
82
82
|
? Object.fromEntries(effectiveInit.headers.entries())
|
|
83
83
|
: Array.isArray(effectiveInit.headers)
|
|
@@ -90,18 +90,18 @@ async function makePassthroughRequest(input, init, clientOptions, requestOptions
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
// Apply per-request option headers (highest priority)
|
|
93
|
-
if (
|
|
93
|
+
if (requestOptions?.headers != null) {
|
|
94
94
|
for (const [key, value] of Object.entries(requestOptions.headers)) {
|
|
95
95
|
mergedHeaders[key.toLowerCase()] = value;
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
-
const method =
|
|
99
|
-
const body = effectiveInit
|
|
100
|
-
const timeoutInSeconds =
|
|
98
|
+
const method = effectiveInit?.method ?? "GET";
|
|
99
|
+
const body = effectiveInit?.body;
|
|
100
|
+
const timeoutInSeconds = requestOptions?.timeoutInSeconds ?? clientOptions.timeoutInSeconds;
|
|
101
101
|
const timeoutMs = timeoutInSeconds != null ? timeoutInSeconds * 1000 : undefined;
|
|
102
|
-
const maxRetries =
|
|
103
|
-
const abortSignal =
|
|
104
|
-
const fetchFn =
|
|
102
|
+
const maxRetries = requestOptions?.maxRetries ?? clientOptions.maxRetries;
|
|
103
|
+
const abortSignal = requestOptions?.abortSignal ?? effectiveInit?.signal ?? undefined;
|
|
104
|
+
const fetchFn = clientOptions.fetch ?? (await (0, getFetchFn_js_1.getFetchFn)());
|
|
105
105
|
if (logger.isDebug()) {
|
|
106
106
|
logger.debug("Making passthrough HTTP request", {
|
|
107
107
|
method,
|
|
@@ -109,7 +109,7 @@ async function makePassthroughRequest(input, init, clientOptions, requestOptions
|
|
|
109
109
|
hasBody: body != null,
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
|
-
const response = await (0, requestWithRetries_js_1.requestWithRetries)(async () => (0, makeRequest_js_1.makeRequest)(fetchFn, fullUrl, method, mergedHeaders, body
|
|
112
|
+
const response = await (0, requestWithRetries_js_1.requestWithRetries)(async () => (0, makeRequest_js_1.makeRequest)(fetchFn, fullUrl, method, mergedHeaders, body ?? undefined, timeoutMs, abortSignal, effectiveInit?.credentials === "include", undefined, // duplex
|
|
113
113
|
false), maxRetries);
|
|
114
114
|
if (logger.isDebug()) {
|
|
115
115
|
logger.debug("Passthrough HTTP request completed", {
|
|
@@ -120,4 +120,3 @@ async function makePassthroughRequest(input, init, clientOptions, requestOptions
|
|
|
120
120
|
}
|
|
121
121
|
return response;
|
|
122
122
|
}
|
|
123
|
-
exports.makePassthroughRequest = makePassthroughRequest;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makeRequest =
|
|
3
|
+
exports.makeRequest = void 0;
|
|
4
|
+
exports.isCacheNoStoreSupported = isCacheNoStoreSupported;
|
|
5
|
+
exports.resetCacheNoStoreSupported = resetCacheNoStoreSupported;
|
|
4
6
|
const signals_js_1 = require("./signals.js");
|
|
5
7
|
/**
|
|
6
8
|
* Cached result of checking whether the current runtime supports
|
|
@@ -16,19 +18,17 @@ function isCacheNoStoreSupported() {
|
|
|
16
18
|
new Request("http://localhost", { cache: "no-store" });
|
|
17
19
|
_cacheNoStoreSupported = true;
|
|
18
20
|
}
|
|
19
|
-
catch
|
|
21
|
+
catch {
|
|
20
22
|
_cacheNoStoreSupported = false;
|
|
21
23
|
}
|
|
22
24
|
return _cacheNoStoreSupported;
|
|
23
25
|
}
|
|
24
|
-
exports.isCacheNoStoreSupported = isCacheNoStoreSupported;
|
|
25
26
|
/**
|
|
26
27
|
* Reset the cached result of `isCacheNoStoreSupported`. Exposed for testing only.
|
|
27
28
|
*/
|
|
28
29
|
function resetCacheNoStoreSupported() {
|
|
29
30
|
_cacheNoStoreSupported = undefined;
|
|
30
31
|
}
|
|
31
|
-
exports.resetCacheNoStoreSupported = resetCacheNoStoreSupported;
|
|
32
32
|
const makeRequest = async (fetchFn, url, method, headers, requestBody, timeoutMs, abortSignal, withCredentials, duplex, disableCache) => {
|
|
33
33
|
const signals = [];
|
|
34
34
|
let timeoutAbortId;
|
|
@@ -41,9 +41,16 @@ const makeRequest = async (fetchFn, url, method, headers, requestBody, timeoutMs
|
|
|
41
41
|
signals.push(abortSignal);
|
|
42
42
|
}
|
|
43
43
|
const newSignals = (0, signals_js_1.anySignal)(signals);
|
|
44
|
-
const response = await fetchFn(url,
|
|
44
|
+
const response = await fetchFn(url, {
|
|
45
|
+
method: method,
|
|
46
|
+
headers,
|
|
47
|
+
body: requestBody,
|
|
48
|
+
signal: newSignals,
|
|
49
|
+
credentials: withCredentials ? "include" : undefined,
|
|
45
50
|
// @ts-ignore
|
|
46
|
-
duplex
|
|
51
|
+
duplex,
|
|
52
|
+
...(disableCache && isCacheNoStoreSupported() ? { cache: "no-store" } : {}),
|
|
53
|
+
});
|
|
47
54
|
if (timeoutAbortId != null) {
|
|
48
55
|
clearTimeout(timeoutAbortId);
|
|
49
56
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.requestWithRetries =
|
|
3
|
+
exports.requestWithRetries = requestWithRetries;
|
|
4
4
|
const INITIAL_RETRY_DELAY = 1000; // in milliseconds
|
|
5
5
|
const MAX_RETRY_DELAY = 60000; // in milliseconds
|
|
6
6
|
const DEFAULT_MAX_RETRIES = 2;
|
|
@@ -57,4 +57,3 @@ async function requestWithRetries(requestFn, maxRetries = DEFAULT_MAX_RETRIES) {
|
|
|
57
57
|
}
|
|
58
58
|
return response;
|
|
59
59
|
}
|
|
60
|
-
exports.requestWithRetries = requestWithRetries;
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getTimeoutSignal = getTimeoutSignal;
|
|
4
|
+
exports.anySignal = anySignal;
|
|
4
5
|
const TIMEOUT = "timeout";
|
|
5
6
|
function getTimeoutSignal(timeoutMs) {
|
|
6
7
|
const controller = new AbortController();
|
|
7
8
|
const abortId = setTimeout(() => controller.abort(TIMEOUT), timeoutMs);
|
|
8
9
|
return { signal: controller.signal, abortId };
|
|
9
10
|
}
|
|
10
|
-
exports.getTimeoutSignal = getTimeoutSignal;
|
|
11
11
|
function anySignal(...args) {
|
|
12
12
|
const signals = (args.length === 1 && Array.isArray(args[0]) ? args[0] : args);
|
|
13
13
|
const controller = new AbortController();
|
|
14
14
|
for (const signal of signals) {
|
|
15
15
|
if (signal.aborted) {
|
|
16
|
-
controller.abort(signal
|
|
16
|
+
controller.abort(signal?.reason);
|
|
17
17
|
break;
|
|
18
18
|
}
|
|
19
|
-
signal.addEventListener("abort", () => controller.abort(signal
|
|
19
|
+
signal.addEventListener("abort", () => controller.abort(signal?.reason), {
|
|
20
20
|
signal: controller.signal,
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
return controller.signal;
|
|
24
24
|
}
|
|
25
|
-
exports.anySignal = anySignal;
|
package/dist/core/file/file.js
CHANGED
|
@@ -15,15 +15,26 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
36
|
+
exports.toBinaryUploadRequest = toBinaryUploadRequest;
|
|
37
|
+
exports.toMultipartDataPart = toMultipartDataPart;
|
|
27
38
|
async function toBinaryUploadRequest(file) {
|
|
28
39
|
const { data, filename, contentLength, contentType } = await getFileWithMetadata(file);
|
|
29
40
|
const request = {
|
|
@@ -41,7 +52,6 @@ async function toBinaryUploadRequest(file) {
|
|
|
41
52
|
}
|
|
42
53
|
return request;
|
|
43
54
|
}
|
|
44
|
-
exports.toBinaryUploadRequest = toBinaryUploadRequest;
|
|
45
55
|
async function toMultipartDataPart(file) {
|
|
46
56
|
const { data, filename, contentType } = await getFileWithMetadata(file, {
|
|
47
57
|
noSniffFileSize: true,
|
|
@@ -52,9 +62,7 @@ async function toMultipartDataPart(file) {
|
|
|
52
62
|
contentType,
|
|
53
63
|
};
|
|
54
64
|
}
|
|
55
|
-
exports.toMultipartDataPart = toMultipartDataPart;
|
|
56
65
|
async function getFileWithMetadata(file, { noSniffFileSize } = {}) {
|
|
57
|
-
var _a, _b, _c, _d, _e;
|
|
58
66
|
if (isFileLike(file)) {
|
|
59
67
|
return getFileWithMetadata({
|
|
60
68
|
data: file,
|
|
@@ -62,12 +70,12 @@ async function getFileWithMetadata(file, { noSniffFileSize } = {}) {
|
|
|
62
70
|
}
|
|
63
71
|
if ("path" in file) {
|
|
64
72
|
const fs = await Promise.resolve().then(() => __importStar(require("fs")));
|
|
65
|
-
if (!
|
|
73
|
+
if (!fs?.createReadStream) {
|
|
66
74
|
throw new Error("File path uploads are not supported in this environment.");
|
|
67
75
|
}
|
|
68
76
|
const data = fs.createReadStream(file.path);
|
|
69
|
-
const contentLength =
|
|
70
|
-
const filename =
|
|
77
|
+
const contentLength = file.contentLength ?? (noSniffFileSize === true ? undefined : await tryGetFileSizeFromPath(file.path));
|
|
78
|
+
const filename = file.filename ?? getNameFromPath(file.path);
|
|
71
79
|
return {
|
|
72
80
|
data,
|
|
73
81
|
filename,
|
|
@@ -77,14 +85,15 @@ async function getFileWithMetadata(file, { noSniffFileSize } = {}) {
|
|
|
77
85
|
}
|
|
78
86
|
if ("data" in file) {
|
|
79
87
|
const data = file.data;
|
|
80
|
-
const contentLength =
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
88
|
+
const contentLength = file.contentLength ??
|
|
89
|
+
(await tryGetContentLengthFromFileLike(data, {
|
|
90
|
+
noSniffFileSize,
|
|
91
|
+
}));
|
|
92
|
+
const filename = file.filename ?? tryGetNameFromFileLike(data);
|
|
84
93
|
return {
|
|
85
94
|
data,
|
|
86
95
|
filename,
|
|
87
|
-
contentType:
|
|
96
|
+
contentType: file.contentType ?? tryGetContentTypeFromFileLike(data),
|
|
88
97
|
contentLength,
|
|
89
98
|
};
|
|
90
99
|
}
|
|
@@ -101,10 +110,9 @@ function isFileLike(value) {
|
|
|
101
110
|
isReadableStream(value));
|
|
102
111
|
}
|
|
103
112
|
async function tryGetFileSizeFromPath(path) {
|
|
104
|
-
var _a;
|
|
105
113
|
try {
|
|
106
114
|
const fs = await Promise.resolve().then(() => __importStar(require("fs")));
|
|
107
|
-
if (!
|
|
115
|
+
if (!fs?.promises?.stat) {
|
|
108
116
|
return undefined;
|
|
109
117
|
}
|
|
110
118
|
const fileStat = await fs.promises.stat(path);
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
/// <reference types="node" />
|
|
4
|
-
/// <reference types="node" />
|
|
5
1
|
/**
|
|
6
2
|
* A file that can be uploaded. Can be a file-like object (stream, buffer, blob, etc.),
|
|
7
3
|
* a path to a file, or an object with a file-like object and metadata.
|
|
@@ -15,29 +15,32 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
32
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
-
exports.FormDataWrapper =
|
|
36
|
+
exports.FormDataWrapper = void 0;
|
|
37
|
+
exports.newFormData = newFormData;
|
|
34
38
|
const index_js_1 = require("../../core/file/index.js");
|
|
35
39
|
const json_js_1 = require("../../core/json.js");
|
|
36
40
|
const index_js_2 = require("../runtime/index.js");
|
|
37
41
|
async function newFormData() {
|
|
38
42
|
return new FormDataWrapper();
|
|
39
43
|
}
|
|
40
|
-
exports.newFormData = newFormData;
|
|
41
44
|
class FormDataWrapper {
|
|
42
45
|
constructor() {
|
|
43
46
|
this.fd = new FormData();
|
|
@@ -80,25 +83,12 @@ function isArrayBufferView(value) {
|
|
|
80
83
|
return ArrayBuffer.isView(value);
|
|
81
84
|
}
|
|
82
85
|
async function streamToBuffer(stream) {
|
|
83
|
-
var _a, e_1, _b, _c;
|
|
84
86
|
if (index_js_2.RUNTIME.type === "node") {
|
|
85
87
|
const { Readable } = await Promise.resolve().then(() => __importStar(require("stream")));
|
|
86
88
|
if (stream instanceof Readable) {
|
|
87
89
|
const chunks = [];
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
_c = stream_1_1.value;
|
|
91
|
-
_d = false;
|
|
92
|
-
const chunk = _c;
|
|
93
|
-
chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
97
|
-
finally {
|
|
98
|
-
try {
|
|
99
|
-
if (!_d && !_a && (_b = stream_1.return)) await _b.call(stream_1);
|
|
100
|
-
}
|
|
101
|
-
finally { if (e_1) throw e_1.error; }
|
|
90
|
+
for await (const chunk of stream) {
|
|
91
|
+
chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
|
|
102
92
|
}
|
|
103
93
|
return Buffer.concat(chunks);
|
|
104
94
|
}
|
|
@@ -149,7 +139,7 @@ async function convertToBlob(value, contentType) {
|
|
|
149
139
|
return new Blob([value], { type: contentType });
|
|
150
140
|
}
|
|
151
141
|
if (typeof value === "object" && value !== null) {
|
|
152
|
-
return new Blob([(0, json_js_1.toJson)(value)], { type: contentType
|
|
142
|
+
return new Blob([(0, json_js_1.toJson)(value)], { type: contentType ?? "application/json" });
|
|
153
143
|
}
|
|
154
144
|
return new Blob([String(value)], { type: contentType });
|
|
155
145
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.encodeAsFormParameter =
|
|
3
|
+
exports.encodeAsFormParameter = encodeAsFormParameter;
|
|
4
4
|
const qs_js_1 = require("../url/qs.js");
|
|
5
5
|
function encodeAsFormParameter(value) {
|
|
6
6
|
const stringified = (0, qs_js_1.toQueryString)(value, { encode: false });
|
|
@@ -10,4 +10,3 @@ function encodeAsFormParameter(value) {
|
|
|
10
10
|
});
|
|
11
11
|
return Object.fromEntries(keyValuePairs);
|
|
12
12
|
}
|
|
13
|
-
exports.encodeAsFormParameter = encodeAsFormParameter;
|
package/dist/core/headers.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function
|
|
3
|
-
export declare function mergeOnlyDefinedHeaders(...headersArray: (Record<string, string | core.Supplier<string | undefined> | undefined> | undefined)[]): Record<string, string | core.Supplier<string | undefined>>;
|
|
1
|
+
export declare function mergeHeaders(...headersArray: (Record<string, unknown> | null | undefined)[]): Record<string, unknown>;
|
|
2
|
+
export declare function mergeOnlyDefinedHeaders(...headersArray: (Record<string, unknown> | null | undefined)[]): Record<string, unknown>;
|
package/dist/core/headers.js
CHANGED
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.mergeHeaders = mergeHeaders;
|
|
4
|
+
exports.mergeOnlyDefinedHeaders = mergeOnlyDefinedHeaders;
|
|
4
5
|
function mergeHeaders(...headersArray) {
|
|
5
6
|
const result = {};
|
|
6
7
|
for (const [key, value] of headersArray
|
|
7
8
|
.filter((headers) => headers != null)
|
|
8
|
-
.flatMap((headers) => Object.entries(headers
|
|
9
|
+
.flatMap((headers) => Object.entries(headers))) {
|
|
10
|
+
const insensitiveKey = key.toLowerCase();
|
|
9
11
|
if (value != null) {
|
|
10
|
-
result[
|
|
12
|
+
result[insensitiveKey] = value;
|
|
11
13
|
}
|
|
12
|
-
else if (
|
|
13
|
-
delete result[
|
|
14
|
+
else if (insensitiveKey in result) {
|
|
15
|
+
delete result[insensitiveKey];
|
|
14
16
|
}
|
|
15
17
|
}
|
|
16
18
|
return result;
|
|
17
19
|
}
|
|
18
|
-
exports.mergeHeaders = mergeHeaders;
|
|
19
20
|
function mergeOnlyDefinedHeaders(...headersArray) {
|
|
20
21
|
const result = {};
|
|
21
22
|
for (const [key, value] of headersArray
|
|
22
23
|
.filter((headers) => headers != null)
|
|
23
|
-
.flatMap((headers) => Object.entries(headers
|
|
24
|
+
.flatMap((headers) => Object.entries(headers))) {
|
|
25
|
+
const insensitiveKey = key.toLowerCase();
|
|
24
26
|
if (value != null) {
|
|
25
|
-
result[
|
|
27
|
+
result[insensitiveKey] = value;
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
return result;
|
|
29
31
|
}
|
|
30
|
-
exports.mergeOnlyDefinedHeaders = mergeOnlyDefinedHeaders;
|
package/dist/core/index.d.ts
CHANGED