@getzep/zep-cloud 2.21.0 → 3.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/package.json +62 -26
- package/reference.md +160 -2302
- package/Client.d.ts +0 -41
- package/Client.js +0 -37
- package/api/errors/BadRequestError.d.ts +0 -8
- package/api/errors/BadRequestError.js +0 -51
- package/api/errors/ConflictError.d.ts +0 -8
- package/api/errors/ConflictError.js +0 -51
- package/api/errors/InternalServerError.d.ts +0 -8
- package/api/errors/InternalServerError.js +0 -51
- package/api/errors/NotFoundError.d.ts +0 -8
- package/api/errors/NotFoundError.js +0 -51
- package/api/errors/UnauthorizedError.d.ts +0 -8
- package/api/errors/UnauthorizedError.js +0 -51
- package/api/errors/index.d.ts +0 -5
- package/api/errors/index.js +0 -21
- package/api/index.d.ts +0 -3
- package/api/index.js +0 -19
- package/api/resources/document/client/Client.d.ts +0 -231
- package/api/resources/document/client/Client.js +0 -1237
- package/api/resources/document/client/index.d.ts +0 -1
- package/api/resources/document/client/index.js +0 -17
- package/api/resources/document/client/requests/CreateDocumentCollectionRequest.d.ts +0 -11
- package/api/resources/document/client/requests/CreateDocumentCollectionRequest.js +0 -5
- package/api/resources/document/client/requests/DocumentSearchPayload.d.ts +0 -23
- package/api/resources/document/client/requests/DocumentSearchPayload.js +0 -5
- package/api/resources/document/client/requests/GetDocumentListRequest.d.ts +0 -11
- package/api/resources/document/client/requests/GetDocumentListRequest.js +0 -5
- package/api/resources/document/client/requests/UpdateDocumentCollectionRequest.d.ts +0 -11
- package/api/resources/document/client/requests/UpdateDocumentCollectionRequest.js +0 -5
- package/api/resources/document/client/requests/UpdateDocumentRequest.d.ts +0 -11
- package/api/resources/document/client/requests/UpdateDocumentRequest.js +0 -5
- package/api/resources/document/client/requests/index.d.ts +0 -5
- package/api/resources/document/client/requests/index.js +0 -2
- package/api/resources/document/index.d.ts +0 -1
- package/api/resources/document/index.js +0 -17
- package/api/resources/graph/client/Client.d.ts +0 -143
- package/api/resources/graph/client/Client.js +0 -622
- package/api/resources/graph/client/index.d.ts +0 -1
- package/api/resources/graph/client/index.js +0 -17
- package/api/resources/graph/client/requests/AddDataBatchRequest.d.ts +0 -18
- package/api/resources/graph/client/requests/AddDataBatchRequest.js +0 -5
- package/api/resources/graph/client/requests/AddDataRequest.d.ts +0 -19
- package/api/resources/graph/client/requests/AddDataRequest.js +0 -5
- package/api/resources/graph/client/requests/AddTripleRequest.d.ts +0 -41
- package/api/resources/graph/client/requests/AddTripleRequest.js +0 -5
- package/api/resources/graph/client/requests/CloneGraphRequest.d.ts +0 -17
- package/api/resources/graph/client/requests/CloneGraphRequest.js +0 -5
- package/api/resources/graph/client/requests/EntityTypeRequest.d.ts +0 -12
- package/api/resources/graph/client/requests/EntityTypeRequest.js +0 -5
- package/api/resources/graph/client/requests/GraphSearchQuery.d.ts +0 -36
- package/api/resources/graph/client/requests/GraphSearchQuery.js +0 -5
- package/api/resources/graph/client/requests/index.d.ts +0 -6
- package/api/resources/graph/client/requests/index.js +0 -2
- package/api/resources/graph/index.d.ts +0 -2
- package/api/resources/graph/index.js +0 -18
- package/api/resources/graph/resources/edge/client/Client.d.ts +0 -85
- package/api/resources/graph/resources/edge/client/Client.js +0 -379
- package/api/resources/graph/resources/edge/client/index.d.ts +0 -1
- package/api/resources/graph/resources/edge/client/index.js +0 -2
- package/api/resources/graph/resources/edge/index.d.ts +0 -1
- package/api/resources/graph/resources/edge/index.js +0 -17
- package/api/resources/graph/resources/episode/client/Client.d.ts +0 -98
- package/api/resources/graph/resources/episode/client/Client.js +0 -463
- package/api/resources/graph/resources/episode/client/index.d.ts +0 -1
- package/api/resources/graph/resources/episode/client/index.js +0 -17
- package/api/resources/graph/resources/episode/client/requests/EpisodeGetByGroupIdRequest.d.ts +0 -13
- package/api/resources/graph/resources/episode/client/requests/EpisodeGetByGroupIdRequest.js +0 -5
- package/api/resources/graph/resources/episode/client/requests/EpisodeGetByUserIdRequest.d.ts +0 -13
- package/api/resources/graph/resources/episode/client/requests/EpisodeGetByUserIdRequest.js +0 -5
- package/api/resources/graph/resources/episode/client/requests/index.d.ts +0 -2
- package/api/resources/graph/resources/episode/client/requests/index.js +0 -2
- package/api/resources/graph/resources/episode/index.d.ts +0 -1
- package/api/resources/graph/resources/episode/index.js +0 -17
- package/api/resources/graph/resources/index.d.ts +0 -4
- package/api/resources/graph/resources/index.js +0 -43
- package/api/resources/graph/resources/node/client/Client.d.ts +0 -98
- package/api/resources/graph/resources/node/client/Client.js +0 -453
- package/api/resources/graph/resources/node/client/index.d.ts +0 -1
- package/api/resources/graph/resources/node/client/index.js +0 -2
- package/api/resources/graph/resources/node/index.d.ts +0 -1
- package/api/resources/graph/resources/node/index.js +0 -17
- package/api/resources/group/client/Client.d.ts +0 -113
- package/api/resources/group/client/Client.js +0 -546
- package/api/resources/group/client/index.d.ts +0 -1
- package/api/resources/group/client/index.js +0 -17
- package/api/resources/group/client/requests/CreateGroupRequest.d.ts +0 -16
- package/api/resources/group/client/requests/CreateGroupRequest.js +0 -5
- package/api/resources/group/client/requests/GetGroupsOrderedRequest.d.ts +0 -17
- package/api/resources/group/client/requests/GetGroupsOrderedRequest.js +0 -5
- package/api/resources/group/client/requests/UpdateGroupRequest.d.ts +0 -13
- package/api/resources/group/client/requests/UpdateGroupRequest.js +0 -5
- package/api/resources/group/client/requests/index.d.ts +0 -3
- package/api/resources/group/client/requests/index.js +0 -2
- package/api/resources/group/index.d.ts +0 -1
- package/api/resources/group/index.js +0 -17
- package/api/resources/index.d.ts +0 -10
- package/api/resources/index.js +0 -49
- package/api/resources/memory/client/Client.d.ts +0 -361
- package/api/resources/memory/client/Client.js +0 -1846
- package/api/resources/memory/client/index.d.ts +0 -1
- package/api/resources/memory/client/index.js +0 -17
- package/api/resources/memory/client/requests/AddFactsRequest.d.ts +0 -15
- package/api/resources/memory/client/requests/AddFactsRequest.js +0 -5
- package/api/resources/memory/client/requests/AddMemoryRequest.d.ts +0 -29
- package/api/resources/memory/client/requests/AddMemoryRequest.js +0 -5
- package/api/resources/memory/client/requests/CreateSessionRequest.d.ts +0 -21
- package/api/resources/memory/client/requests/CreateSessionRequest.js +0 -5
- package/api/resources/memory/client/requests/EndSessionRequest.d.ts +0 -12
- package/api/resources/memory/client/requests/EndSessionRequest.js +0 -5
- package/api/resources/memory/client/requests/EndSessionsRequest.d.ts +0 -13
- package/api/resources/memory/client/requests/EndSessionsRequest.js +0 -5
- package/api/resources/memory/client/requests/ExtractDataRequest.d.ts +0 -23
- package/api/resources/memory/client/requests/ExtractDataRequest.js +0 -5
- package/api/resources/memory/client/requests/MemoryGetRequest.d.ts +0 -17
- package/api/resources/memory/client/requests/MemoryGetRequest.js +0 -5
- package/api/resources/memory/client/requests/MemoryGetSessionFactsRequest.d.ts +0 -13
- package/api/resources/memory/client/requests/MemoryGetSessionFactsRequest.js +0 -5
- package/api/resources/memory/client/requests/MemoryGetSessionMessagesRequest.d.ts +0 -17
- package/api/resources/memory/client/requests/MemoryGetSessionMessagesRequest.js +0 -5
- package/api/resources/memory/client/requests/MemoryListSessionsRequest.d.ts +0 -25
- package/api/resources/memory/client/requests/MemoryListSessionsRequest.js +0 -5
- package/api/resources/memory/client/requests/MemorySearchPayload.d.ts +0 -22
- package/api/resources/memory/client/requests/MemorySearchPayload.js +0 -5
- package/api/resources/memory/client/requests/MemorySynthesizeQuestionRequest.d.ts +0 -13
- package/api/resources/memory/client/requests/MemorySynthesizeQuestionRequest.js +0 -5
- package/api/resources/memory/client/requests/ModelsMessageMetadataUpdate.d.ts +0 -15
- package/api/resources/memory/client/requests/ModelsMessageMetadataUpdate.js +0 -5
- package/api/resources/memory/client/requests/SessionSearchQuery.d.ts +0 -34
- package/api/resources/memory/client/requests/SessionSearchQuery.js +0 -5
- package/api/resources/memory/client/requests/UpdateSessionRequest.d.ts +0 -21
- package/api/resources/memory/client/requests/UpdateSessionRequest.js +0 -5
- package/api/resources/memory/client/requests/index.d.ts +0 -15
- package/api/resources/memory/client/requests/index.js +0 -2
- package/api/resources/memory/index.d.ts +0 -1
- package/api/resources/memory/index.js +0 -17
- package/api/resources/user/client/Client.d.ts +0 -137
- package/api/resources/user/client/Client.js +0 -676
- package/api/resources/user/client/index.d.ts +0 -1
- package/api/resources/user/client/index.js +0 -17
- package/api/resources/user/client/requests/CreateUserRequest.d.ts +0 -24
- package/api/resources/user/client/requests/CreateUserRequest.js +0 -5
- package/api/resources/user/client/requests/UpdateUserRequest.d.ts +0 -20
- package/api/resources/user/client/requests/UpdateUserRequest.js +0 -5
- package/api/resources/user/client/requests/UserListOrderedRequest.d.ts +0 -17
- package/api/resources/user/client/requests/UserListOrderedRequest.js +0 -5
- package/api/resources/user/client/requests/index.d.ts +0 -3
- package/api/resources/user/client/requests/index.js +0 -2
- package/api/resources/user/index.d.ts +0 -1
- package/api/resources/user/index.js +0 -17
- package/api/types/AddMemoryResponse.d.ts +0 -6
- package/api/types/AddMemoryResponse.js +0 -5
- package/api/types/AddTripleResponse.d.ts +0 -9
- package/api/types/AddTripleResponse.js +0 -5
- package/api/types/ApiError.d.ts +0 -6
- package/api/types/ApiError.js +0 -5
- package/api/types/ApidataDocument.d.ts +0 -13
- package/api/types/ApidataDocument.js +0 -5
- package/api/types/ApidataDocumentCollection.d.ts +0 -18
- package/api/types/ApidataDocumentCollection.js +0 -5
- package/api/types/ApidataDocumentSearchResponse.d.ts +0 -11
- package/api/types/ApidataDocumentSearchResponse.js +0 -5
- package/api/types/ApidataDocumentWithScore.d.ts +0 -14
- package/api/types/ApidataDocumentWithScore.js +0 -5
- package/api/types/ClassifySessionRequest.d.ts +0 -15
- package/api/types/ClassifySessionRequest.js +0 -5
- package/api/types/CloneGraphResponse.d.ts +0 -7
- package/api/types/CloneGraphResponse.js +0 -5
- package/api/types/ComparisonOperator.d.ts +0 -12
- package/api/types/ComparisonOperator.js +0 -14
- package/api/types/CreateDocumentRequest.d.ts +0 -8
- package/api/types/CreateDocumentRequest.js +0 -5
- package/api/types/DateFilter.d.ts +0 -10
- package/api/types/DateFilter.js +0 -5
- package/api/types/EdgeType.d.ts +0 -10
- package/api/types/EdgeType.js +0 -5
- package/api/types/EndSessionResponse.d.ts +0 -8
- package/api/types/EndSessionResponse.js +0 -5
- package/api/types/EndSessionsResponse.d.ts +0 -7
- package/api/types/EndSessionsResponse.js +0 -5
- package/api/types/EntityEdge.d.ts +0 -27
- package/api/types/EntityEdge.js +0 -5
- package/api/types/EntityEdgeSourceTarget.d.ts +0 -9
- package/api/types/EntityEdgeSourceTarget.js +0 -5
- package/api/types/EntityNode.d.ts +0 -17
- package/api/types/EntityNode.js +0 -5
- package/api/types/EntityProperty.d.ts +0 -9
- package/api/types/EntityProperty.js +0 -5
- package/api/types/EntityPropertyType.d.ts +0 -10
- package/api/types/EntityPropertyType.js +0 -12
- package/api/types/EntityType.d.ts +0 -9
- package/api/types/EntityType.js +0 -5
- package/api/types/EntityTypeResponse.d.ts +0 -8
- package/api/types/EntityTypeResponse.js +0 -5
- package/api/types/Episode.d.ts +0 -17
- package/api/types/Episode.js +0 -5
- package/api/types/EpisodeData.d.ts +0 -10
- package/api/types/EpisodeData.js +0 -5
- package/api/types/EpisodeMentions.d.ts +0 -8
- package/api/types/EpisodeMentions.js +0 -5
- package/api/types/EpisodeResponse.d.ts +0 -7
- package/api/types/EpisodeResponse.js +0 -5
- package/api/types/Fact.d.ts +0 -17
- package/api/types/Fact.js +0 -5
- package/api/types/FactRatingExamples.d.ts +0 -8
- package/api/types/FactRatingExamples.js +0 -5
- package/api/types/FactRatingInstruction.d.ts +0 -21
- package/api/types/FactRatingInstruction.js +0 -5
- package/api/types/FactResponse.d.ts +0 -7
- package/api/types/FactResponse.js +0 -5
- package/api/types/FactsResponse.d.ts +0 -7
- package/api/types/FactsResponse.js +0 -5
- package/api/types/GraphDataType.d.ts +0 -9
- package/api/types/GraphDataType.js +0 -11
- package/api/types/GraphEdgesRequest.d.ts +0 -9
- package/api/types/GraphEdgesRequest.js +0 -5
- package/api/types/GraphNodesRequest.d.ts +0 -9
- package/api/types/GraphNodesRequest.js +0 -5
- package/api/types/GraphSearchResults.d.ts +0 -9
- package/api/types/GraphSearchResults.js +0 -5
- package/api/types/GraphSearchScope.d.ts +0 -9
- package/api/types/GraphSearchScope.js +0 -11
- package/api/types/Group.d.ts +0 -16
- package/api/types/Group.js +0 -5
- package/api/types/GroupListResponse.d.ts +0 -9
- package/api/types/GroupListResponse.js +0 -5
- package/api/types/Memory.d.ts +0 -18
- package/api/types/Memory.js +0 -5
- package/api/types/MemorySearchResult.d.ts +0 -10
- package/api/types/MemorySearchResult.js +0 -5
- package/api/types/Message.d.ts +0 -24
- package/api/types/Message.js +0 -5
- package/api/types/MessageListResponse.d.ts +0 -12
- package/api/types/MessageListResponse.js +0 -5
- package/api/types/NewFact.d.ts +0 -6
- package/api/types/NewFact.js +0 -5
- package/api/types/Question.d.ts +0 -6
- package/api/types/Question.js +0 -5
- package/api/types/Reranker.d.ts +0 -11
- package/api/types/Reranker.js +0 -13
- package/api/types/RoleType.d.ts +0 -12
- package/api/types/RoleType.js +0 -14
- package/api/types/SearchFilters.d.ts +0 -42
- package/api/types/SearchFilters.js +0 -5
- package/api/types/SearchScope.d.ts +0 -9
- package/api/types/SearchScope.js +0 -11
- package/api/types/SearchType.d.ts +0 -8
- package/api/types/SearchType.js +0 -10
- package/api/types/Session.d.ts +0 -23
- package/api/types/Session.js +0 -5
- package/api/types/SessionClassification.d.ts +0 -7
- package/api/types/SessionClassification.js +0 -5
- package/api/types/SessionListResponse.d.ts +0 -9
- package/api/types/SessionListResponse.js +0 -5
- package/api/types/SessionSearchResponse.d.ts +0 -7
- package/api/types/SessionSearchResponse.js +0 -5
- package/api/types/SessionSearchResult.d.ts +0 -11
- package/api/types/SessionSearchResult.js +0 -5
- package/api/types/SuccessResponse.d.ts +0 -6
- package/api/types/SuccessResponse.js +0 -5
- package/api/types/Summary.d.ts +0 -15
- package/api/types/Summary.js +0 -5
- package/api/types/SummaryListResponse.d.ts +0 -9
- package/api/types/SummaryListResponse.js +0 -5
- package/api/types/UpdateDocumentListRequest.d.ts +0 -8
- package/api/types/UpdateDocumentListRequest.js +0 -5
- package/api/types/User.d.ts +0 -22
- package/api/types/User.js +0 -5
- package/api/types/UserListResponse.d.ts +0 -9
- package/api/types/UserListResponse.js +0 -5
- package/api/types/UserNodeResponse.d.ts +0 -7
- package/api/types/UserNodeResponse.js +0 -5
- package/api/types/index.d.ts +0 -61
- package/api/types/index.js +0 -77
- package/contextString.d.ts +0 -16
- package/contextString.js +0 -75
- package/core/fetcher/APIResponse.d.ts +0 -10
- package/core/fetcher/APIResponse.js +0 -2
- package/core/fetcher/Fetcher.d.ts +0 -39
- package/core/fetcher/Fetcher.js +0 -99
- package/core/fetcher/Supplier.d.ts +0 -4
- package/core/fetcher/Supplier.js +0 -22
- package/core/fetcher/createRequestUrl.d.ts +0 -1
- package/core/fetcher/createRequestUrl.js +0 -12
- package/core/fetcher/getFetchFn.d.ts +0 -4
- package/core/fetcher/getFetchFn.js +0 -68
- package/core/fetcher/getHeader.d.ts +0 -1
- package/core/fetcher/getHeader.js +0 -11
- package/core/fetcher/getRequestBody.d.ts +0 -7
- package/core/fetcher/getRequestBody.js +0 -22
- package/core/fetcher/getResponseBody.d.ts +0 -1
- package/core/fetcher/getResponseBody.js +0 -54
- package/core/fetcher/index.d.ts +0 -5
- package/core/fetcher/index.js +0 -9
- package/core/fetcher/makeRequest.d.ts +0 -1
- package/core/fetcher/makeRequest.js +0 -42
- package/core/fetcher/requestWithRetries.d.ts +0 -1
- package/core/fetcher/requestWithRetries.js +0 -40
- package/core/fetcher/signals.d.ts +0 -11
- package/core/fetcher/signals.js +0 -36
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +0 -30
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +0 -247
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -21
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +0 -126
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +0 -31
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +0 -229
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +0 -18
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +0 -59
- package/core/index.d.ts +0 -3
- package/core/index.js +0 -42
- package/core/runtime/index.d.ts +0 -1
- package/core/runtime/index.js +0 -5
- package/core/runtime/runtime.d.ts +0 -9
- package/core/runtime/runtime.js +0 -93
- package/core/schemas/Schema.d.ts +0 -85
- package/core/schemas/Schema.js +0 -22
- package/core/schemas/builders/bigint/bigint.d.ts +0 -2
- package/core/schemas/builders/bigint/bigint.js +0 -49
- package/core/schemas/builders/bigint/index.d.ts +0 -1
- package/core/schemas/builders/bigint/index.js +0 -5
- package/core/schemas/builders/date/date.d.ts +0 -2
- package/core/schemas/builders/date/date.js +0 -62
- package/core/schemas/builders/date/index.d.ts +0 -1
- package/core/schemas/builders/date/index.js +0 -5
- package/core/schemas/builders/enum/enum.d.ts +0 -2
- package/core/schemas/builders/enum/enum.js +0 -38
- package/core/schemas/builders/enum/index.d.ts +0 -1
- package/core/schemas/builders/enum/index.js +0 -5
- package/core/schemas/builders/index.d.ts +0 -14
- package/core/schemas/builders/index.js +0 -30
- package/core/schemas/builders/lazy/index.d.ts +0 -3
- package/core/schemas/builders/lazy/index.js +0 -7
- package/core/schemas/builders/lazy/lazy.d.ts +0 -5
- package/core/schemas/builders/lazy/lazy.js +0 -24
- package/core/schemas/builders/lazy/lazyObject.d.ts +0 -3
- package/core/schemas/builders/lazy/lazyObject.js +0 -11
- package/core/schemas/builders/list/index.d.ts +0 -1
- package/core/schemas/builders/list/index.js +0 -5
- package/core/schemas/builders/list/list.d.ts +0 -2
- package/core/schemas/builders/list/list.js +0 -54
- package/core/schemas/builders/literals/booleanLiteral.d.ts +0 -2
- package/core/schemas/builders/literals/booleanLiteral.js +0 -28
- package/core/schemas/builders/literals/index.d.ts +0 -2
- package/core/schemas/builders/literals/index.js +0 -7
- package/core/schemas/builders/literals/stringLiteral.d.ts +0 -2
- package/core/schemas/builders/literals/stringLiteral.js +0 -28
- package/core/schemas/builders/object/index.d.ts +0 -6
- package/core/schemas/builders/object/index.js +0 -11
- package/core/schemas/builders/object/object.d.ts +0 -3
- package/core/schemas/builders/object/object.js +0 -260
- package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +0 -6
- package/core/schemas/builders/object/objectWithoutOptionalProperties.js +0 -7
- package/core/schemas/builders/object/property.d.ts +0 -8
- package/core/schemas/builders/object/property.js +0 -15
- package/core/schemas/builders/object/types.d.ts +0 -31
- package/core/schemas/builders/object/types.js +0 -2
- package/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +0 -9
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +0 -53
- package/core/schemas/builders/object-like/index.d.ts +0 -2
- package/core/schemas/builders/object-like/index.js +0 -6
- package/core/schemas/builders/object-like/types.d.ts +0 -7
- package/core/schemas/builders/object-like/types.js +0 -2
- package/core/schemas/builders/primitives/any.d.ts +0 -1
- package/core/schemas/builders/primitives/any.js +0 -6
- package/core/schemas/builders/primitives/boolean.d.ts +0 -1
- package/core/schemas/builders/primitives/boolean.js +0 -25
- package/core/schemas/builders/primitives/index.d.ts +0 -5
- package/core/schemas/builders/primitives/index.js +0 -13
- package/core/schemas/builders/primitives/number.d.ts +0 -1
- package/core/schemas/builders/primitives/number.js +0 -25
- package/core/schemas/builders/primitives/string.d.ts +0 -1
- package/core/schemas/builders/primitives/string.js +0 -25
- package/core/schemas/builders/primitives/unknown.d.ts +0 -1
- package/core/schemas/builders/primitives/unknown.js +0 -6
- package/core/schemas/builders/record/index.d.ts +0 -2
- package/core/schemas/builders/record/index.js +0 -5
- package/core/schemas/builders/record/record.d.ts +0 -3
- package/core/schemas/builders/record/record.js +0 -94
- package/core/schemas/builders/record/types.d.ts +0 -4
- package/core/schemas/builders/record/types.js +0 -2
- package/core/schemas/builders/schema-utils/JsonError.d.ts +0 -5
- package/core/schemas/builders/schema-utils/JsonError.js +0 -12
- package/core/schemas/builders/schema-utils/ParseError.d.ts +0 -5
- package/core/schemas/builders/schema-utils/ParseError.js +0 -12
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +0 -17
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +0 -81
- package/core/schemas/builders/schema-utils/index.d.ts +0 -4
- package/core/schemas/builders/schema-utils/index.js +0 -11
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +0 -2
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +0 -9
- package/core/schemas/builders/set/index.d.ts +0 -1
- package/core/schemas/builders/set/index.js +0 -5
- package/core/schemas/builders/set/set.d.ts +0 -2
- package/core/schemas/builders/set/set.js +0 -43
- package/core/schemas/builders/undiscriminated-union/index.d.ts +0 -2
- package/core/schemas/builders/undiscriminated-union/index.js +0 -5
- package/core/schemas/builders/undiscriminated-union/types.d.ts +0 -4
- package/core/schemas/builders/undiscriminated-union/types.js +0 -2
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +0 -3
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +0 -39
- package/core/schemas/builders/union/discriminant.d.ts +0 -5
- package/core/schemas/builders/union/discriminant.js +0 -9
- package/core/schemas/builders/union/index.d.ts +0 -4
- package/core/schemas/builders/union/index.js +0 -7
- package/core/schemas/builders/union/types.d.ts +0 -13
- package/core/schemas/builders/union/types.js +0 -2
- package/core/schemas/builders/union/union.d.ts +0 -4
- package/core/schemas/builders/union/union.js +0 -129
- package/core/schemas/index.d.ts +0 -2
- package/core/schemas/index.js +0 -17
- package/core/schemas/utils/MaybePromise.d.ts +0 -1
- package/core/schemas/utils/MaybePromise.js +0 -2
- package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +0 -7
- package/core/schemas/utils/addQuestionMarksToNullableProperties.js +0 -2
- package/core/schemas/utils/createIdentitySchemaCreator.d.ts +0 -2
- package/core/schemas/utils/createIdentitySchemaCreator.js +0 -15
- package/core/schemas/utils/entries.d.ts +0 -1
- package/core/schemas/utils/entries.js +0 -6
- package/core/schemas/utils/filterObject.d.ts +0 -1
- package/core/schemas/utils/filterObject.js +0 -13
- package/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +0 -1
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +0 -27
- package/core/schemas/utils/isPlainObject.d.ts +0 -1
- package/core/schemas/utils/isPlainObject.js +0 -17
- package/core/schemas/utils/keys.d.ts +0 -1
- package/core/schemas/utils/keys.js +0 -6
- package/core/schemas/utils/maybeSkipValidation.d.ts +0 -2
- package/core/schemas/utils/maybeSkipValidation.js +0 -27
- package/core/schemas/utils/partition.d.ts +0 -1
- package/core/schemas/utils/partition.js +0 -15
- package/dist/Client.d.ts +0 -41
- package/dist/Client.js +0 -37
- package/dist/api/errors/BadRequestError.d.ts +0 -8
- package/dist/api/errors/BadRequestError.js +0 -51
- package/dist/api/errors/ConflictError.d.ts +0 -8
- package/dist/api/errors/ConflictError.js +0 -51
- package/dist/api/errors/InternalServerError.d.ts +0 -8
- package/dist/api/errors/InternalServerError.js +0 -51
- package/dist/api/errors/NotFoundError.d.ts +0 -8
- package/dist/api/errors/NotFoundError.js +0 -51
- package/dist/api/errors/UnauthorizedError.d.ts +0 -8
- package/dist/api/errors/UnauthorizedError.js +0 -51
- package/dist/api/errors/index.d.ts +0 -5
- package/dist/api/errors/index.js +0 -21
- package/dist/api/index.d.ts +0 -3
- package/dist/api/index.js +0 -19
- package/dist/api/resources/document/client/Client.d.ts +0 -231
- package/dist/api/resources/document/client/Client.js +0 -1237
- package/dist/api/resources/document/client/index.d.ts +0 -1
- package/dist/api/resources/document/client/index.js +0 -17
- package/dist/api/resources/document/client/requests/CreateDocumentCollectionRequest.d.ts +0 -11
- package/dist/api/resources/document/client/requests/CreateDocumentCollectionRequest.js +0 -5
- package/dist/api/resources/document/client/requests/DocumentSearchPayload.d.ts +0 -23
- package/dist/api/resources/document/client/requests/DocumentSearchPayload.js +0 -5
- package/dist/api/resources/document/client/requests/GetDocumentListRequest.d.ts +0 -11
- package/dist/api/resources/document/client/requests/GetDocumentListRequest.js +0 -5
- package/dist/api/resources/document/client/requests/UpdateDocumentCollectionRequest.d.ts +0 -11
- package/dist/api/resources/document/client/requests/UpdateDocumentCollectionRequest.js +0 -5
- package/dist/api/resources/document/client/requests/UpdateDocumentRequest.d.ts +0 -11
- package/dist/api/resources/document/client/requests/UpdateDocumentRequest.js +0 -5
- package/dist/api/resources/document/client/requests/index.d.ts +0 -5
- package/dist/api/resources/document/client/requests/index.js +0 -2
- package/dist/api/resources/document/index.d.ts +0 -1
- package/dist/api/resources/document/index.js +0 -17
- package/dist/api/resources/graph/client/Client.d.ts +0 -143
- package/dist/api/resources/graph/client/Client.js +0 -622
- package/dist/api/resources/graph/client/index.d.ts +0 -1
- package/dist/api/resources/graph/client/index.js +0 -17
- package/dist/api/resources/graph/client/requests/AddDataBatchRequest.d.ts +0 -18
- package/dist/api/resources/graph/client/requests/AddDataBatchRequest.js +0 -5
- package/dist/api/resources/graph/client/requests/AddDataRequest.d.ts +0 -19
- package/dist/api/resources/graph/client/requests/AddDataRequest.js +0 -5
- package/dist/api/resources/graph/client/requests/AddTripleRequest.d.ts +0 -41
- package/dist/api/resources/graph/client/requests/AddTripleRequest.js +0 -5
- package/dist/api/resources/graph/client/requests/CloneGraphRequest.d.ts +0 -17
- package/dist/api/resources/graph/client/requests/CloneGraphRequest.js +0 -5
- package/dist/api/resources/graph/client/requests/EntityTypeRequest.d.ts +0 -12
- package/dist/api/resources/graph/client/requests/EntityTypeRequest.js +0 -5
- package/dist/api/resources/graph/client/requests/GraphSearchQuery.d.ts +0 -36
- package/dist/api/resources/graph/client/requests/GraphSearchQuery.js +0 -5
- package/dist/api/resources/graph/client/requests/index.d.ts +0 -6
- package/dist/api/resources/graph/client/requests/index.js +0 -2
- package/dist/api/resources/graph/index.d.ts +0 -2
- package/dist/api/resources/graph/index.js +0 -18
- package/dist/api/resources/graph/resources/edge/client/Client.d.ts +0 -85
- package/dist/api/resources/graph/resources/edge/client/Client.js +0 -379
- package/dist/api/resources/graph/resources/edge/client/index.d.ts +0 -1
- package/dist/api/resources/graph/resources/edge/client/index.js +0 -2
- package/dist/api/resources/graph/resources/edge/index.d.ts +0 -1
- package/dist/api/resources/graph/resources/edge/index.js +0 -17
- package/dist/api/resources/graph/resources/episode/client/Client.d.ts +0 -98
- package/dist/api/resources/graph/resources/episode/client/Client.js +0 -463
- package/dist/api/resources/graph/resources/episode/client/index.d.ts +0 -1
- package/dist/api/resources/graph/resources/episode/client/index.js +0 -17
- package/dist/api/resources/graph/resources/episode/client/requests/EpisodeGetByGroupIdRequest.d.ts +0 -13
- package/dist/api/resources/graph/resources/episode/client/requests/EpisodeGetByGroupIdRequest.js +0 -5
- package/dist/api/resources/graph/resources/episode/client/requests/EpisodeGetByUserIdRequest.d.ts +0 -13
- package/dist/api/resources/graph/resources/episode/client/requests/EpisodeGetByUserIdRequest.js +0 -5
- package/dist/api/resources/graph/resources/episode/client/requests/index.d.ts +0 -2
- package/dist/api/resources/graph/resources/episode/client/requests/index.js +0 -2
- package/dist/api/resources/graph/resources/episode/index.d.ts +0 -1
- package/dist/api/resources/graph/resources/episode/index.js +0 -17
- package/dist/api/resources/graph/resources/index.d.ts +0 -4
- package/dist/api/resources/graph/resources/index.js +0 -43
- package/dist/api/resources/graph/resources/node/client/Client.d.ts +0 -98
- package/dist/api/resources/graph/resources/node/client/Client.js +0 -453
- package/dist/api/resources/graph/resources/node/client/index.d.ts +0 -1
- package/dist/api/resources/graph/resources/node/client/index.js +0 -2
- package/dist/api/resources/graph/resources/node/index.d.ts +0 -1
- package/dist/api/resources/graph/resources/node/index.js +0 -17
- package/dist/api/resources/group/client/Client.d.ts +0 -113
- package/dist/api/resources/group/client/Client.js +0 -546
- package/dist/api/resources/group/client/index.d.ts +0 -1
- package/dist/api/resources/group/client/index.js +0 -17
- package/dist/api/resources/group/client/requests/CreateGroupRequest.d.ts +0 -16
- package/dist/api/resources/group/client/requests/CreateGroupRequest.js +0 -5
- package/dist/api/resources/group/client/requests/GetGroupsOrderedRequest.d.ts +0 -17
- package/dist/api/resources/group/client/requests/GetGroupsOrderedRequest.js +0 -5
- package/dist/api/resources/group/client/requests/UpdateGroupRequest.d.ts +0 -13
- package/dist/api/resources/group/client/requests/UpdateGroupRequest.js +0 -5
- package/dist/api/resources/group/client/requests/index.d.ts +0 -3
- package/dist/api/resources/group/client/requests/index.js +0 -2
- package/dist/api/resources/group/index.d.ts +0 -1
- package/dist/api/resources/group/index.js +0 -17
- package/dist/api/resources/index.d.ts +0 -10
- package/dist/api/resources/index.js +0 -49
- package/dist/api/resources/memory/client/Client.d.ts +0 -361
- package/dist/api/resources/memory/client/Client.js +0 -1846
- package/dist/api/resources/memory/client/index.d.ts +0 -1
- package/dist/api/resources/memory/client/index.js +0 -17
- package/dist/api/resources/memory/client/requests/AddFactsRequest.d.ts +0 -15
- package/dist/api/resources/memory/client/requests/AddFactsRequest.js +0 -5
- package/dist/api/resources/memory/client/requests/AddMemoryRequest.d.ts +0 -29
- package/dist/api/resources/memory/client/requests/AddMemoryRequest.js +0 -5
- package/dist/api/resources/memory/client/requests/CreateSessionRequest.d.ts +0 -21
- package/dist/api/resources/memory/client/requests/CreateSessionRequest.js +0 -5
- package/dist/api/resources/memory/client/requests/EndSessionRequest.d.ts +0 -12
- package/dist/api/resources/memory/client/requests/EndSessionRequest.js +0 -5
- package/dist/api/resources/memory/client/requests/EndSessionsRequest.d.ts +0 -13
- package/dist/api/resources/memory/client/requests/EndSessionsRequest.js +0 -5
- package/dist/api/resources/memory/client/requests/ExtractDataRequest.d.ts +0 -23
- package/dist/api/resources/memory/client/requests/ExtractDataRequest.js +0 -5
- package/dist/api/resources/memory/client/requests/MemoryGetRequest.d.ts +0 -17
- package/dist/api/resources/memory/client/requests/MemoryGetRequest.js +0 -5
- package/dist/api/resources/memory/client/requests/MemoryGetSessionFactsRequest.d.ts +0 -13
- package/dist/api/resources/memory/client/requests/MemoryGetSessionFactsRequest.js +0 -5
- package/dist/api/resources/memory/client/requests/MemoryGetSessionMessagesRequest.d.ts +0 -17
- package/dist/api/resources/memory/client/requests/MemoryGetSessionMessagesRequest.js +0 -5
- package/dist/api/resources/memory/client/requests/MemoryListSessionsRequest.d.ts +0 -25
- package/dist/api/resources/memory/client/requests/MemoryListSessionsRequest.js +0 -5
- package/dist/api/resources/memory/client/requests/MemorySearchPayload.d.ts +0 -22
- package/dist/api/resources/memory/client/requests/MemorySearchPayload.js +0 -5
- package/dist/api/resources/memory/client/requests/MemorySynthesizeQuestionRequest.d.ts +0 -13
- package/dist/api/resources/memory/client/requests/MemorySynthesizeQuestionRequest.js +0 -5
- package/dist/api/resources/memory/client/requests/ModelsMessageMetadataUpdate.d.ts +0 -15
- package/dist/api/resources/memory/client/requests/ModelsMessageMetadataUpdate.js +0 -5
- package/dist/api/resources/memory/client/requests/SessionSearchQuery.d.ts +0 -34
- package/dist/api/resources/memory/client/requests/SessionSearchQuery.js +0 -5
- package/dist/api/resources/memory/client/requests/UpdateSessionRequest.d.ts +0 -21
- package/dist/api/resources/memory/client/requests/UpdateSessionRequest.js +0 -5
- package/dist/api/resources/memory/client/requests/index.d.ts +0 -15
- package/dist/api/resources/memory/client/requests/index.js +0 -2
- package/dist/api/resources/memory/index.d.ts +0 -1
- package/dist/api/resources/memory/index.js +0 -17
- package/dist/api/resources/user/client/Client.d.ts +0 -137
- package/dist/api/resources/user/client/Client.js +0 -676
- package/dist/api/resources/user/client/index.d.ts +0 -1
- package/dist/api/resources/user/client/index.js +0 -17
- package/dist/api/resources/user/client/requests/CreateUserRequest.d.ts +0 -24
- package/dist/api/resources/user/client/requests/CreateUserRequest.js +0 -5
- package/dist/api/resources/user/client/requests/UpdateUserRequest.d.ts +0 -20
- package/dist/api/resources/user/client/requests/UpdateUserRequest.js +0 -5
- package/dist/api/resources/user/client/requests/UserListOrderedRequest.d.ts +0 -17
- package/dist/api/resources/user/client/requests/UserListOrderedRequest.js +0 -5
- package/dist/api/resources/user/client/requests/index.d.ts +0 -3
- package/dist/api/resources/user/client/requests/index.js +0 -2
- package/dist/api/resources/user/index.d.ts +0 -1
- package/dist/api/resources/user/index.js +0 -17
- package/dist/api/types/AddMemoryResponse.d.ts +0 -6
- package/dist/api/types/AddMemoryResponse.js +0 -5
- package/dist/api/types/AddTripleResponse.d.ts +0 -9
- package/dist/api/types/AddTripleResponse.js +0 -5
- package/dist/api/types/ApiError.d.ts +0 -6
- package/dist/api/types/ApiError.js +0 -5
- package/dist/api/types/ApidataDocument.d.ts +0 -13
- package/dist/api/types/ApidataDocument.js +0 -5
- package/dist/api/types/ApidataDocumentCollection.d.ts +0 -18
- package/dist/api/types/ApidataDocumentCollection.js +0 -5
- package/dist/api/types/ApidataDocumentSearchResponse.d.ts +0 -11
- package/dist/api/types/ApidataDocumentSearchResponse.js +0 -5
- package/dist/api/types/ApidataDocumentWithScore.d.ts +0 -14
- package/dist/api/types/ApidataDocumentWithScore.js +0 -5
- package/dist/api/types/ClassifySessionRequest.d.ts +0 -15
- package/dist/api/types/ClassifySessionRequest.js +0 -5
- package/dist/api/types/CloneGraphResponse.d.ts +0 -7
- package/dist/api/types/CloneGraphResponse.js +0 -5
- package/dist/api/types/ComparisonOperator.d.ts +0 -12
- package/dist/api/types/ComparisonOperator.js +0 -14
- package/dist/api/types/CreateDocumentRequest.d.ts +0 -8
- package/dist/api/types/CreateDocumentRequest.js +0 -5
- package/dist/api/types/DateFilter.d.ts +0 -10
- package/dist/api/types/DateFilter.js +0 -5
- package/dist/api/types/EdgeType.d.ts +0 -10
- package/dist/api/types/EdgeType.js +0 -5
- package/dist/api/types/EndSessionResponse.d.ts +0 -8
- package/dist/api/types/EndSessionResponse.js +0 -5
- package/dist/api/types/EndSessionsResponse.d.ts +0 -7
- package/dist/api/types/EndSessionsResponse.js +0 -5
- package/dist/api/types/EntityEdge.d.ts +0 -27
- package/dist/api/types/EntityEdge.js +0 -5
- package/dist/api/types/EntityEdgeSourceTarget.d.ts +0 -9
- package/dist/api/types/EntityEdgeSourceTarget.js +0 -5
- package/dist/api/types/EntityNode.d.ts +0 -17
- package/dist/api/types/EntityNode.js +0 -5
- package/dist/api/types/EntityProperty.d.ts +0 -9
- package/dist/api/types/EntityProperty.js +0 -5
- package/dist/api/types/EntityPropertyType.d.ts +0 -10
- package/dist/api/types/EntityPropertyType.js +0 -12
- package/dist/api/types/EntityType.d.ts +0 -9
- package/dist/api/types/EntityType.js +0 -5
- package/dist/api/types/EntityTypeResponse.d.ts +0 -8
- package/dist/api/types/EntityTypeResponse.js +0 -5
- package/dist/api/types/Episode.d.ts +0 -17
- package/dist/api/types/Episode.js +0 -5
- package/dist/api/types/EpisodeData.d.ts +0 -10
- package/dist/api/types/EpisodeData.js +0 -5
- package/dist/api/types/EpisodeMentions.d.ts +0 -8
- package/dist/api/types/EpisodeMentions.js +0 -5
- package/dist/api/types/EpisodeResponse.d.ts +0 -7
- package/dist/api/types/EpisodeResponse.js +0 -5
- package/dist/api/types/Fact.d.ts +0 -17
- package/dist/api/types/Fact.js +0 -5
- package/dist/api/types/FactRatingExamples.d.ts +0 -8
- package/dist/api/types/FactRatingExamples.js +0 -5
- package/dist/api/types/FactRatingInstruction.d.ts +0 -21
- package/dist/api/types/FactRatingInstruction.js +0 -5
- package/dist/api/types/FactResponse.d.ts +0 -7
- package/dist/api/types/FactResponse.js +0 -5
- package/dist/api/types/FactsResponse.d.ts +0 -7
- package/dist/api/types/FactsResponse.js +0 -5
- package/dist/api/types/GraphDataType.d.ts +0 -9
- package/dist/api/types/GraphDataType.js +0 -11
- package/dist/api/types/GraphEdgesRequest.d.ts +0 -9
- package/dist/api/types/GraphEdgesRequest.js +0 -5
- package/dist/api/types/GraphNodesRequest.d.ts +0 -9
- package/dist/api/types/GraphNodesRequest.js +0 -5
- package/dist/api/types/GraphSearchResults.d.ts +0 -9
- package/dist/api/types/GraphSearchResults.js +0 -5
- package/dist/api/types/GraphSearchScope.d.ts +0 -9
- package/dist/api/types/GraphSearchScope.js +0 -11
- package/dist/api/types/Group.d.ts +0 -16
- package/dist/api/types/Group.js +0 -5
- package/dist/api/types/GroupListResponse.d.ts +0 -9
- package/dist/api/types/GroupListResponse.js +0 -5
- package/dist/api/types/Memory.d.ts +0 -18
- package/dist/api/types/Memory.js +0 -5
- package/dist/api/types/MemorySearchResult.d.ts +0 -10
- package/dist/api/types/MemorySearchResult.js +0 -5
- package/dist/api/types/Message.d.ts +0 -24
- package/dist/api/types/Message.js +0 -5
- package/dist/api/types/MessageListResponse.d.ts +0 -12
- package/dist/api/types/MessageListResponse.js +0 -5
- package/dist/api/types/NewFact.d.ts +0 -6
- package/dist/api/types/NewFact.js +0 -5
- package/dist/api/types/Question.d.ts +0 -6
- package/dist/api/types/Question.js +0 -5
- package/dist/api/types/Reranker.d.ts +0 -11
- package/dist/api/types/Reranker.js +0 -13
- package/dist/api/types/RoleType.d.ts +0 -12
- package/dist/api/types/RoleType.js +0 -14
- package/dist/api/types/SearchFilters.d.ts +0 -42
- package/dist/api/types/SearchFilters.js +0 -5
- package/dist/api/types/SearchScope.d.ts +0 -9
- package/dist/api/types/SearchScope.js +0 -11
- package/dist/api/types/SearchType.d.ts +0 -8
- package/dist/api/types/SearchType.js +0 -10
- package/dist/api/types/Session.d.ts +0 -23
- package/dist/api/types/Session.js +0 -5
- package/dist/api/types/SessionClassification.d.ts +0 -7
- package/dist/api/types/SessionClassification.js +0 -5
- package/dist/api/types/SessionListResponse.d.ts +0 -9
- package/dist/api/types/SessionListResponse.js +0 -5
- package/dist/api/types/SessionSearchResponse.d.ts +0 -7
- package/dist/api/types/SessionSearchResponse.js +0 -5
- package/dist/api/types/SessionSearchResult.d.ts +0 -11
- package/dist/api/types/SessionSearchResult.js +0 -5
- package/dist/api/types/SuccessResponse.d.ts +0 -6
- package/dist/api/types/SuccessResponse.js +0 -5
- package/dist/api/types/Summary.d.ts +0 -15
- package/dist/api/types/Summary.js +0 -5
- package/dist/api/types/SummaryListResponse.d.ts +0 -9
- package/dist/api/types/SummaryListResponse.js +0 -5
- package/dist/api/types/UpdateDocumentListRequest.d.ts +0 -8
- package/dist/api/types/UpdateDocumentListRequest.js +0 -5
- package/dist/api/types/User.d.ts +0 -22
- package/dist/api/types/User.js +0 -5
- package/dist/api/types/UserListResponse.d.ts +0 -9
- package/dist/api/types/UserListResponse.js +0 -5
- package/dist/api/types/UserNodeResponse.d.ts +0 -7
- package/dist/api/types/UserNodeResponse.js +0 -5
- package/dist/api/types/index.d.ts +0 -61
- package/dist/api/types/index.js +0 -77
- package/dist/contextString.d.ts +0 -16
- package/dist/contextString.js +0 -75
- package/dist/core/fetcher/APIResponse.d.ts +0 -10
- package/dist/core/fetcher/APIResponse.js +0 -2
- package/dist/core/fetcher/Fetcher.d.ts +0 -39
- package/dist/core/fetcher/Fetcher.js +0 -99
- package/dist/core/fetcher/Supplier.d.ts +0 -4
- package/dist/core/fetcher/Supplier.js +0 -22
- package/dist/core/fetcher/createRequestUrl.d.ts +0 -1
- package/dist/core/fetcher/createRequestUrl.js +0 -12
- package/dist/core/fetcher/getFetchFn.d.ts +0 -4
- package/dist/core/fetcher/getFetchFn.js +0 -68
- package/dist/core/fetcher/getHeader.d.ts +0 -1
- package/dist/core/fetcher/getHeader.js +0 -11
- package/dist/core/fetcher/getRequestBody.d.ts +0 -7
- package/dist/core/fetcher/getRequestBody.js +0 -22
- package/dist/core/fetcher/getResponseBody.d.ts +0 -1
- package/dist/core/fetcher/getResponseBody.js +0 -54
- package/dist/core/fetcher/index.d.ts +0 -5
- package/dist/core/fetcher/index.js +0 -9
- package/dist/core/fetcher/makeRequest.d.ts +0 -1
- package/dist/core/fetcher/makeRequest.js +0 -42
- package/dist/core/fetcher/requestWithRetries.d.ts +0 -1
- package/dist/core/fetcher/requestWithRetries.js +0 -40
- package/dist/core/fetcher/signals.d.ts +0 -11
- package/dist/core/fetcher/signals.js +0 -36
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +0 -30
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +0 -247
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -21
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +0 -126
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +0 -31
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +0 -229
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +0 -18
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +0 -59
- package/dist/core/index.d.ts +0 -3
- package/dist/core/index.js +0 -42
- package/dist/core/runtime/index.d.ts +0 -1
- package/dist/core/runtime/index.js +0 -5
- package/dist/core/runtime/runtime.d.ts +0 -9
- package/dist/core/runtime/runtime.js +0 -93
- package/dist/core/schemas/Schema.d.ts +0 -85
- package/dist/core/schemas/Schema.js +0 -22
- package/dist/core/schemas/builders/bigint/bigint.d.ts +0 -2
- package/dist/core/schemas/builders/bigint/bigint.js +0 -49
- package/dist/core/schemas/builders/bigint/index.d.ts +0 -1
- package/dist/core/schemas/builders/bigint/index.js +0 -5
- package/dist/core/schemas/builders/date/date.d.ts +0 -2
- package/dist/core/schemas/builders/date/date.js +0 -62
- package/dist/core/schemas/builders/date/index.d.ts +0 -1
- package/dist/core/schemas/builders/date/index.js +0 -5
- package/dist/core/schemas/builders/enum/enum.d.ts +0 -2
- package/dist/core/schemas/builders/enum/enum.js +0 -38
- package/dist/core/schemas/builders/enum/index.d.ts +0 -1
- package/dist/core/schemas/builders/enum/index.js +0 -5
- package/dist/core/schemas/builders/index.d.ts +0 -14
- package/dist/core/schemas/builders/index.js +0 -30
- package/dist/core/schemas/builders/lazy/index.d.ts +0 -3
- package/dist/core/schemas/builders/lazy/index.js +0 -7
- package/dist/core/schemas/builders/lazy/lazy.d.ts +0 -5
- package/dist/core/schemas/builders/lazy/lazy.js +0 -24
- package/dist/core/schemas/builders/lazy/lazyObject.d.ts +0 -3
- package/dist/core/schemas/builders/lazy/lazyObject.js +0 -11
- package/dist/core/schemas/builders/list/index.d.ts +0 -1
- package/dist/core/schemas/builders/list/index.js +0 -5
- package/dist/core/schemas/builders/list/list.d.ts +0 -2
- package/dist/core/schemas/builders/list/list.js +0 -54
- package/dist/core/schemas/builders/literals/booleanLiteral.d.ts +0 -2
- package/dist/core/schemas/builders/literals/booleanLiteral.js +0 -28
- package/dist/core/schemas/builders/literals/index.d.ts +0 -2
- package/dist/core/schemas/builders/literals/index.js +0 -7
- package/dist/core/schemas/builders/literals/stringLiteral.d.ts +0 -2
- package/dist/core/schemas/builders/literals/stringLiteral.js +0 -28
- package/dist/core/schemas/builders/object/index.d.ts +0 -6
- package/dist/core/schemas/builders/object/index.js +0 -11
- package/dist/core/schemas/builders/object/object.d.ts +0 -3
- package/dist/core/schemas/builders/object/object.js +0 -260
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +0 -6
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +0 -7
- package/dist/core/schemas/builders/object/property.d.ts +0 -8
- package/dist/core/schemas/builders/object/property.js +0 -15
- package/dist/core/schemas/builders/object/types.d.ts +0 -31
- package/dist/core/schemas/builders/object/types.js +0 -2
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +0 -9
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +0 -53
- package/dist/core/schemas/builders/object-like/index.d.ts +0 -2
- package/dist/core/schemas/builders/object-like/index.js +0 -6
- package/dist/core/schemas/builders/object-like/types.d.ts +0 -7
- package/dist/core/schemas/builders/object-like/types.js +0 -2
- package/dist/core/schemas/builders/primitives/any.d.ts +0 -1
- package/dist/core/schemas/builders/primitives/any.js +0 -6
- package/dist/core/schemas/builders/primitives/boolean.d.ts +0 -1
- package/dist/core/schemas/builders/primitives/boolean.js +0 -25
- package/dist/core/schemas/builders/primitives/index.d.ts +0 -5
- package/dist/core/schemas/builders/primitives/index.js +0 -13
- package/dist/core/schemas/builders/primitives/number.d.ts +0 -1
- package/dist/core/schemas/builders/primitives/number.js +0 -25
- package/dist/core/schemas/builders/primitives/string.d.ts +0 -1
- package/dist/core/schemas/builders/primitives/string.js +0 -25
- package/dist/core/schemas/builders/primitives/unknown.d.ts +0 -1
- package/dist/core/schemas/builders/primitives/unknown.js +0 -6
- package/dist/core/schemas/builders/record/index.d.ts +0 -2
- package/dist/core/schemas/builders/record/index.js +0 -5
- package/dist/core/schemas/builders/record/record.d.ts +0 -3
- package/dist/core/schemas/builders/record/record.js +0 -94
- package/dist/core/schemas/builders/record/types.d.ts +0 -4
- package/dist/core/schemas/builders/record/types.js +0 -2
- package/dist/core/schemas/builders/schema-utils/JsonError.d.ts +0 -5
- package/dist/core/schemas/builders/schema-utils/JsonError.js +0 -12
- package/dist/core/schemas/builders/schema-utils/ParseError.d.ts +0 -5
- package/dist/core/schemas/builders/schema-utils/ParseError.js +0 -12
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +0 -17
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +0 -81
- package/dist/core/schemas/builders/schema-utils/index.d.ts +0 -4
- package/dist/core/schemas/builders/schema-utils/index.js +0 -11
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +0 -2
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +0 -9
- package/dist/core/schemas/builders/set/index.d.ts +0 -1
- package/dist/core/schemas/builders/set/index.js +0 -5
- package/dist/core/schemas/builders/set/set.d.ts +0 -2
- package/dist/core/schemas/builders/set/set.js +0 -43
- package/dist/core/schemas/builders/undiscriminated-union/index.d.ts +0 -2
- package/dist/core/schemas/builders/undiscriminated-union/index.js +0 -5
- package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +0 -4
- package/dist/core/schemas/builders/undiscriminated-union/types.js +0 -2
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +0 -3
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +0 -39
- package/dist/core/schemas/builders/union/discriminant.d.ts +0 -5
- package/dist/core/schemas/builders/union/discriminant.js +0 -9
- package/dist/core/schemas/builders/union/index.d.ts +0 -4
- package/dist/core/schemas/builders/union/index.js +0 -7
- package/dist/core/schemas/builders/union/types.d.ts +0 -13
- package/dist/core/schemas/builders/union/types.js +0 -2
- package/dist/core/schemas/builders/union/union.d.ts +0 -4
- package/dist/core/schemas/builders/union/union.js +0 -129
- package/dist/core/schemas/index.d.ts +0 -2
- package/dist/core/schemas/index.js +0 -17
- package/dist/core/schemas/utils/MaybePromise.d.ts +0 -1
- package/dist/core/schemas/utils/MaybePromise.js +0 -2
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +0 -7
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.js +0 -2
- package/dist/core/schemas/utils/createIdentitySchemaCreator.d.ts +0 -2
- package/dist/core/schemas/utils/createIdentitySchemaCreator.js +0 -15
- package/dist/core/schemas/utils/entries.d.ts +0 -1
- package/dist/core/schemas/utils/entries.js +0 -6
- package/dist/core/schemas/utils/filterObject.d.ts +0 -1
- package/dist/core/schemas/utils/filterObject.js +0 -13
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +0 -1
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +0 -27
- package/dist/core/schemas/utils/isPlainObject.d.ts +0 -1
- package/dist/core/schemas/utils/isPlainObject.js +0 -17
- package/dist/core/schemas/utils/keys.d.ts +0 -1
- package/dist/core/schemas/utils/keys.js +0 -6
- package/dist/core/schemas/utils/maybeSkipValidation.d.ts +0 -2
- package/dist/core/schemas/utils/maybeSkipValidation.js +0 -27
- package/dist/core/schemas/utils/partition.d.ts +0 -1
- package/dist/core/schemas/utils/partition.js +0 -15
- package/dist/environments.d.ts +0 -7
- package/dist/environments.js +0 -9
- package/dist/errors/ZepError.d.ts +0 -12
- package/dist/errors/ZepError.js +0 -32
- package/dist/errors/ZepTimeoutError.d.ts +0 -6
- package/dist/errors/ZepTimeoutError.js +0 -13
- package/dist/errors/index.d.ts +0 -2
- package/dist/errors/index.js +0 -7
- package/dist/extractor/base.d.ts +0 -22
- package/dist/extractor/base.js +0 -20
- package/dist/extractor/date.d.ts +0 -24
- package/dist/extractor/date.js +0 -29
- package/dist/extractor/index.d.ts +0 -283
- package/dist/extractor/index.js +0 -31
- package/dist/extractor/number.d.ts +0 -27
- package/dist/extractor/number.js +0 -37
- package/dist/extractor/regex.d.ts +0 -30
- package/dist/extractor/regex.js +0 -29
- package/dist/extractor/text.d.ts +0 -29
- package/dist/extractor/text.js +0 -43
- package/dist/index.d.ts +0 -6
- package/dist/index.js +0 -48
- package/dist/serialization/index.d.ts +0 -2
- package/dist/serialization/index.js +0 -18
- package/dist/serialization/resources/document/client/addDocuments.d.ts +0 -15
- package/dist/serialization/resources/document/client/addDocuments.js +0 -43
- package/dist/serialization/resources/document/client/batchDeleteDocuments.d.ts +0 -9
- package/dist/serialization/resources/document/client/batchDeleteDocuments.js +0 -41
- package/dist/serialization/resources/document/client/batchGetDocuments.d.ts +0 -11
- package/dist/serialization/resources/document/client/batchGetDocuments.js +0 -42
- package/dist/serialization/resources/document/client/batchUpdateDocuments.d.ts +0 -11
- package/dist/serialization/resources/document/client/batchUpdateDocuments.js +0 -42
- package/dist/serialization/resources/document/client/index.d.ts +0 -6
- package/dist/serialization/resources/document/client/index.js +0 -45
- package/dist/serialization/resources/document/client/listCollections.d.ts +0 -11
- package/dist/serialization/resources/document/client/listCollections.js +0 -42
- package/dist/serialization/resources/document/client/requests/CreateDocumentCollectionRequest.d.ts +0 -13
- package/dist/serialization/resources/document/client/requests/CreateDocumentCollectionRequest.js +0 -44
- package/dist/serialization/resources/document/client/requests/DocumentSearchPayload.d.ts +0 -17
- package/dist/serialization/resources/document/client/requests/DocumentSearchPayload.js +0 -48
- package/dist/serialization/resources/document/client/requests/GetDocumentListRequest.d.ts +0 -13
- package/dist/serialization/resources/document/client/requests/GetDocumentListRequest.js +0 -44
- package/dist/serialization/resources/document/client/requests/UpdateDocumentCollectionRequest.d.ts +0 -13
- package/dist/serialization/resources/document/client/requests/UpdateDocumentCollectionRequest.js +0 -44
- package/dist/serialization/resources/document/client/requests/UpdateDocumentRequest.d.ts +0 -13
- package/dist/serialization/resources/document/client/requests/UpdateDocumentRequest.js +0 -44
- package/dist/serialization/resources/document/client/requests/index.d.ts +0 -5
- package/dist/serialization/resources/document/client/requests/index.js +0 -13
- package/dist/serialization/resources/document/index.d.ts +0 -1
- package/dist/serialization/resources/document/index.js +0 -17
- package/dist/serialization/resources/graph/client/addBatch.d.ts +0 -11
- package/dist/serialization/resources/graph/client/addBatch.js +0 -42
- package/dist/serialization/resources/graph/client/index.d.ts +0 -2
- package/dist/serialization/resources/graph/client/index.js +0 -41
- package/dist/serialization/resources/graph/client/requests/AddDataBatchRequest.d.ts +0 -15
- package/dist/serialization/resources/graph/client/requests/AddDataBatchRequest.js +0 -46
- package/dist/serialization/resources/graph/client/requests/AddDataRequest.d.ts +0 -18
- package/dist/serialization/resources/graph/client/requests/AddDataRequest.js +0 -49
- package/dist/serialization/resources/graph/client/requests/AddTripleRequest.d.ts +0 -26
- package/dist/serialization/resources/graph/client/requests/AddTripleRequest.js +0 -57
- package/dist/serialization/resources/graph/client/requests/CloneGraphRequest.d.ts +0 -15
- package/dist/serialization/resources/graph/client/requests/CloneGraphRequest.js +0 -46
- package/dist/serialization/resources/graph/client/requests/EntityTypeRequest.d.ts +0 -15
- package/dist/serialization/resources/graph/client/requests/EntityTypeRequest.js +0 -46
- package/dist/serialization/resources/graph/client/requests/GraphSearchQuery.d.ts +0 -26
- package/dist/serialization/resources/graph/client/requests/GraphSearchQuery.js +0 -57
- package/dist/serialization/resources/graph/client/requests/index.d.ts +0 -6
- package/dist/serialization/resources/graph/client/requests/index.js +0 -15
- package/dist/serialization/resources/graph/index.d.ts +0 -2
- package/dist/serialization/resources/graph/index.js +0 -18
- package/dist/serialization/resources/graph/resources/edge/client/getByGroupId.d.ts +0 -11
- package/dist/serialization/resources/graph/resources/edge/client/getByGroupId.js +0 -42
- package/dist/serialization/resources/graph/resources/edge/client/getByUserId.d.ts +0 -11
- package/dist/serialization/resources/graph/resources/edge/client/getByUserId.js +0 -42
- package/dist/serialization/resources/graph/resources/edge/client/index.d.ts +0 -2
- package/dist/serialization/resources/graph/resources/edge/client/index.js +0 -38
- package/dist/serialization/resources/graph/resources/edge/index.d.ts +0 -1
- package/dist/serialization/resources/graph/resources/edge/index.js +0 -17
- package/dist/serialization/resources/graph/resources/index.d.ts +0 -2
- package/dist/serialization/resources/graph/resources/index.js +0 -38
- package/dist/serialization/resources/graph/resources/node/client/getByGroupId.d.ts +0 -11
- package/dist/serialization/resources/graph/resources/node/client/getByGroupId.js +0 -42
- package/dist/serialization/resources/graph/resources/node/client/getByUserId.d.ts +0 -11
- package/dist/serialization/resources/graph/resources/node/client/getByUserId.js +0 -42
- package/dist/serialization/resources/graph/resources/node/client/getEdges.d.ts +0 -11
- package/dist/serialization/resources/graph/resources/node/client/getEdges.js +0 -42
- package/dist/serialization/resources/graph/resources/node/client/index.d.ts +0 -3
- package/dist/serialization/resources/graph/resources/node/client/index.js +0 -39
- package/dist/serialization/resources/graph/resources/node/index.d.ts +0 -1
- package/dist/serialization/resources/graph/resources/node/index.js +0 -17
- package/dist/serialization/resources/group/client/index.d.ts +0 -1
- package/dist/serialization/resources/group/client/index.js +0 -17
- package/dist/serialization/resources/group/client/requests/CreateGroupRequest.d.ts +0 -16
- package/dist/serialization/resources/group/client/requests/CreateGroupRequest.js +0 -47
- package/dist/serialization/resources/group/client/requests/UpdateGroupRequest.d.ts +0 -15
- package/dist/serialization/resources/group/client/requests/UpdateGroupRequest.js +0 -46
- package/dist/serialization/resources/group/client/requests/index.d.ts +0 -2
- package/dist/serialization/resources/group/client/requests/index.js +0 -7
- package/dist/serialization/resources/group/index.d.ts +0 -1
- package/dist/serialization/resources/group/index.js +0 -17
- package/dist/serialization/resources/index.d.ts +0 -10
- package/dist/serialization/resources/index.js +0 -49
- package/dist/serialization/resources/memory/client/extractData.d.ts +0 -9
- package/dist/serialization/resources/memory/client/extractData.js +0 -41
- package/dist/serialization/resources/memory/client/index.d.ts +0 -3
- package/dist/serialization/resources/memory/client/index.js +0 -42
- package/dist/serialization/resources/memory/client/requests/AddFactsRequest.d.ts +0 -13
- package/dist/serialization/resources/memory/client/requests/AddFactsRequest.js +0 -44
- package/dist/serialization/resources/memory/client/requests/AddMemoryRequest.d.ts +0 -18
- package/dist/serialization/resources/memory/client/requests/AddMemoryRequest.js +0 -49
- package/dist/serialization/resources/memory/client/requests/CreateSessionRequest.d.ts +0 -16
- package/dist/serialization/resources/memory/client/requests/CreateSessionRequest.js +0 -47
- package/dist/serialization/resources/memory/client/requests/EndSessionRequest.d.ts +0 -14
- package/dist/serialization/resources/memory/client/requests/EndSessionRequest.js +0 -45
- package/dist/serialization/resources/memory/client/requests/EndSessionsRequest.d.ts +0 -13
- package/dist/serialization/resources/memory/client/requests/EndSessionsRequest.js +0 -44
- package/dist/serialization/resources/memory/client/requests/ExtractDataRequest.d.ts +0 -15
- package/dist/serialization/resources/memory/client/requests/ExtractDataRequest.js +0 -46
- package/dist/serialization/resources/memory/client/requests/MemorySearchPayload.d.ts +0 -20
- package/dist/serialization/resources/memory/client/requests/MemorySearchPayload.js +0 -51
- package/dist/serialization/resources/memory/client/requests/ModelsMessageMetadataUpdate.d.ts +0 -12
- package/dist/serialization/resources/memory/client/requests/ModelsMessageMetadataUpdate.js +0 -43
- package/dist/serialization/resources/memory/client/requests/SessionSearchQuery.d.ts +0 -22
- package/dist/serialization/resources/memory/client/requests/SessionSearchQuery.js +0 -53
- package/dist/serialization/resources/memory/client/requests/UpdateSessionRequest.d.ts +0 -14
- package/dist/serialization/resources/memory/client/requests/UpdateSessionRequest.js +0 -45
- package/dist/serialization/resources/memory/client/requests/index.d.ts +0 -10
- package/dist/serialization/resources/memory/client/requests/index.js +0 -23
- package/dist/serialization/resources/memory/client/search.d.ts +0 -11
- package/dist/serialization/resources/memory/client/search.js +0 -42
- package/dist/serialization/resources/memory/index.d.ts +0 -1
- package/dist/serialization/resources/memory/index.js +0 -17
- package/dist/serialization/resources/user/client/getSessions.d.ts +0 -11
- package/dist/serialization/resources/user/client/getSessions.js +0 -42
- package/dist/serialization/resources/user/client/index.d.ts +0 -2
- package/dist/serialization/resources/user/client/index.js +0 -41
- package/dist/serialization/resources/user/client/requests/CreateUserRequest.d.ts +0 -18
- package/dist/serialization/resources/user/client/requests/CreateUserRequest.js +0 -49
- package/dist/serialization/resources/user/client/requests/UpdateUserRequest.d.ts +0 -17
- package/dist/serialization/resources/user/client/requests/UpdateUserRequest.js +0 -48
- package/dist/serialization/resources/user/client/requests/index.d.ts +0 -2
- package/dist/serialization/resources/user/client/requests/index.js +0 -7
- package/dist/serialization/resources/user/index.d.ts +0 -1
- package/dist/serialization/resources/user/index.js +0 -17
- package/dist/serialization/types/AddMemoryResponse.d.ts +0 -12
- package/dist/serialization/types/AddMemoryResponse.js +0 -43
- package/dist/serialization/types/AddTripleResponse.d.ts +0 -16
- package/dist/serialization/types/AddTripleResponse.js +0 -47
- package/dist/serialization/types/ApiError.d.ts +0 -12
- package/dist/serialization/types/ApiError.js +0 -43
- package/dist/serialization/types/ApidataDocument.d.ts +0 -19
- package/dist/serialization/types/ApidataDocument.js +0 -50
- package/dist/serialization/types/ApidataDocumentCollection.d.ts +0 -24
- package/dist/serialization/types/ApidataDocumentCollection.js +0 -55
- package/dist/serialization/types/ApidataDocumentSearchResponse.d.ts +0 -17
- package/dist/serialization/types/ApidataDocumentSearchResponse.js +0 -48
- package/dist/serialization/types/ApidataDocumentWithScore.d.ts +0 -20
- package/dist/serialization/types/ApidataDocumentWithScore.js +0 -51
- package/dist/serialization/types/ClassifySessionRequest.d.ts +0 -16
- package/dist/serialization/types/ClassifySessionRequest.js +0 -47
- package/dist/serialization/types/CloneGraphResponse.d.ts +0 -13
- package/dist/serialization/types/CloneGraphResponse.js +0 -44
- package/dist/serialization/types/ComparisonOperator.d.ts +0 -10
- package/dist/serialization/types/ComparisonOperator.js +0 -41
- package/dist/serialization/types/CreateDocumentRequest.d.ts +0 -14
- package/dist/serialization/types/CreateDocumentRequest.js +0 -45
- package/dist/serialization/types/DateFilter.d.ts +0 -14
- package/dist/serialization/types/DateFilter.js +0 -45
- package/dist/serialization/types/EdgeType.d.ts +0 -17
- package/dist/serialization/types/EdgeType.js +0 -48
- package/dist/serialization/types/EndSessionResponse.d.ts +0 -15
- package/dist/serialization/types/EndSessionResponse.js +0 -46
- package/dist/serialization/types/EndSessionsResponse.d.ts +0 -13
- package/dist/serialization/types/EndSessionsResponse.js +0 -44
- package/dist/serialization/types/EntityEdge.d.ts +0 -22
- package/dist/serialization/types/EntityEdge.js +0 -53
- package/dist/serialization/types/EntityEdgeSourceTarget.d.ts +0 -13
- package/dist/serialization/types/EntityEdgeSourceTarget.js +0 -44
- package/dist/serialization/types/EntityNode.d.ts +0 -17
- package/dist/serialization/types/EntityNode.js +0 -48
- package/dist/serialization/types/EntityProperty.d.ts +0 -15
- package/dist/serialization/types/EntityProperty.js +0 -46
- package/dist/serialization/types/EntityPropertyType.d.ts +0 -10
- package/dist/serialization/types/EntityPropertyType.js +0 -41
- package/dist/serialization/types/EntityType.d.ts +0 -15
- package/dist/serialization/types/EntityType.js +0 -46
- package/dist/serialization/types/EntityTypeResponse.d.ts +0 -15
- package/dist/serialization/types/EntityTypeResponse.js +0 -46
- package/dist/serialization/types/Episode.d.ts +0 -22
- package/dist/serialization/types/Episode.js +0 -53
- package/dist/serialization/types/EpisodeData.d.ts +0 -16
- package/dist/serialization/types/EpisodeData.js +0 -47
- package/dist/serialization/types/EpisodeMentions.d.ts +0 -15
- package/dist/serialization/types/EpisodeMentions.js +0 -46
- package/dist/serialization/types/EpisodeResponse.d.ts +0 -13
- package/dist/serialization/types/EpisodeResponse.js +0 -44
- package/dist/serialization/types/Fact.d.ts +0 -22
- package/dist/serialization/types/Fact.js +0 -53
- package/dist/serialization/types/FactRatingExamples.d.ts +0 -14
- package/dist/serialization/types/FactRatingExamples.js +0 -45
- package/dist/serialization/types/FactRatingInstruction.d.ts +0 -14
- package/dist/serialization/types/FactRatingInstruction.js +0 -45
- package/dist/serialization/types/FactResponse.d.ts +0 -13
- package/dist/serialization/types/FactResponse.js +0 -44
- package/dist/serialization/types/FactsResponse.d.ts +0 -13
- package/dist/serialization/types/FactsResponse.js +0 -44
- package/dist/serialization/types/GraphDataType.d.ts +0 -10
- package/dist/serialization/types/GraphDataType.js +0 -41
- package/dist/serialization/types/GraphEdgesRequest.d.ts +0 -13
- package/dist/serialization/types/GraphEdgesRequest.js +0 -44
- package/dist/serialization/types/GraphNodesRequest.d.ts +0 -13
- package/dist/serialization/types/GraphNodesRequest.js +0 -44
- package/dist/serialization/types/GraphSearchResults.d.ts +0 -17
- package/dist/serialization/types/GraphSearchResults.js +0 -48
- package/dist/serialization/types/GraphSearchScope.d.ts +0 -10
- package/dist/serialization/types/GraphSearchScope.js +0 -41
- package/dist/serialization/types/Group.d.ts +0 -21
- package/dist/serialization/types/Group.js +0 -52
- package/dist/serialization/types/GroupListResponse.d.ts +0 -15
- package/dist/serialization/types/GroupListResponse.js +0 -46
- package/dist/serialization/types/Memory.d.ts +0 -20
- package/dist/serialization/types/Memory.js +0 -51
- package/dist/serialization/types/MemorySearchResult.d.ts +0 -17
- package/dist/serialization/types/MemorySearchResult.js +0 -48
- package/dist/serialization/types/Message.d.ts +0 -21
- package/dist/serialization/types/Message.js +0 -52
- package/dist/serialization/types/MessageListResponse.d.ts +0 -15
- package/dist/serialization/types/MessageListResponse.js +0 -46
- package/dist/serialization/types/NewFact.d.ts +0 -12
- package/dist/serialization/types/NewFact.js +0 -43
- package/dist/serialization/types/Question.d.ts +0 -12
- package/dist/serialization/types/Question.js +0 -43
- package/dist/serialization/types/Reranker.d.ts +0 -10
- package/dist/serialization/types/Reranker.js +0 -47
- package/dist/serialization/types/RoleType.d.ts +0 -10
- package/dist/serialization/types/RoleType.js +0 -48
- package/dist/serialization/types/SearchFilters.d.ts +0 -18
- package/dist/serialization/types/SearchFilters.js +0 -49
- package/dist/serialization/types/SearchScope.d.ts +0 -10
- package/dist/serialization/types/SearchScope.js +0 -41
- package/dist/serialization/types/SearchType.d.ts +0 -10
- package/dist/serialization/types/SearchType.js +0 -41
- package/dist/serialization/types/Session.d.ts +0 -25
- package/dist/serialization/types/Session.js +0 -56
- package/dist/serialization/types/SessionClassification.d.ts +0 -13
- package/dist/serialization/types/SessionClassification.js +0 -44
- package/dist/serialization/types/SessionListResponse.d.ts +0 -15
- package/dist/serialization/types/SessionListResponse.js +0 -46
- package/dist/serialization/types/SessionSearchResponse.d.ts +0 -13
- package/dist/serialization/types/SessionSearchResponse.js +0 -44
- package/dist/serialization/types/SessionSearchResult.d.ts +0 -19
- package/dist/serialization/types/SessionSearchResult.js +0 -50
- package/dist/serialization/types/SuccessResponse.d.ts +0 -12
- package/dist/serialization/types/SuccessResponse.js +0 -43
- package/dist/serialization/types/Summary.d.ts +0 -17
- package/dist/serialization/types/Summary.js +0 -48
- package/dist/serialization/types/SummaryListResponse.d.ts +0 -15
- package/dist/serialization/types/SummaryListResponse.js +0 -46
- package/dist/serialization/types/UpdateDocumentListRequest.d.ts +0 -14
- package/dist/serialization/types/UpdateDocumentListRequest.js +0 -45
- package/dist/serialization/types/User.d.ts +0 -25
- package/dist/serialization/types/User.js +0 -56
- package/dist/serialization/types/UserListResponse.d.ts +0 -15
- package/dist/serialization/types/UserListResponse.js +0 -46
- package/dist/serialization/types/UserNodeResponse.d.ts +0 -13
- package/dist/serialization/types/UserNodeResponse.js +0 -44
- package/dist/serialization/types/index.d.ts +0 -61
- package/dist/serialization/types/index.js +0 -77
- package/dist/version.d.ts +0 -1
- package/dist/version.js +0 -4
- package/dist/wrapper/graph.d.ts +0 -83
- package/dist/wrapper/graph.js +0 -114
- package/dist/wrapper/index.d.ts +0 -7
- package/dist/wrapper/index.js +0 -15
- package/dist/wrapper/memory.d.ts +0 -37
- package/dist/wrapper/memory.js +0 -61
- package/dist/wrapper/ontology.d.ts +0 -436
- package/dist/wrapper/ontology.js +0 -100
- package/environments.d.ts +0 -7
- package/environments.js +0 -9
- package/errors/ZepError.d.ts +0 -12
- package/errors/ZepError.js +0 -32
- package/errors/ZepTimeoutError.d.ts +0 -6
- package/errors/ZepTimeoutError.js +0 -13
- package/errors/index.d.ts +0 -2
- package/errors/index.js +0 -7
- package/examples/graph/conversations.ts +0 -297
- package/examples/graph/entity_type_example.ts +0 -44
- package/examples/graph/group_graph_example.ts +0 -61
- package/examples/graph/user_graph_example.ts +0 -171
- package/examples/langgraph/.env.example +0 -7
- package/examples/langgraph/README.md +0 -165
- package/examples/langgraph/agent.ts +0 -261
- package/examples/langgraph/package-lock.json +0 -1697
- package/examples/langgraph/package.json +0 -20
- package/examples/langgraph/zep-memory.ts +0 -271
- package/examples/memory/chat_shoe_store_history.ts +0 -104
- package/examples/memory/memory_example.ts +0 -148
- package/examples/users/users.ts +0 -81
- package/extractor/base.d.ts +0 -22
- package/extractor/base.js +0 -20
- package/extractor/date.d.ts +0 -24
- package/extractor/date.js +0 -29
- package/extractor/index.d.ts +0 -283
- package/extractor/index.js +0 -31
- package/extractor/number.d.ts +0 -27
- package/extractor/number.js +0 -37
- package/extractor/regex.d.ts +0 -30
- package/extractor/regex.js +0 -29
- package/extractor/text.d.ts +0 -29
- package/extractor/text.js +0 -43
- package/index.d.ts +0 -6
- package/index.js +0 -48
- package/jest.config.mjs +0 -8
- package/scripts/rename-to-esm-files.js +0 -115
- package/serialization/index.d.ts +0 -2
- package/serialization/index.js +0 -18
- package/serialization/resources/document/client/addDocuments.d.ts +0 -15
- package/serialization/resources/document/client/addDocuments.js +0 -43
- package/serialization/resources/document/client/batchDeleteDocuments.d.ts +0 -9
- package/serialization/resources/document/client/batchDeleteDocuments.js +0 -41
- package/serialization/resources/document/client/batchGetDocuments.d.ts +0 -11
- package/serialization/resources/document/client/batchGetDocuments.js +0 -42
- package/serialization/resources/document/client/batchUpdateDocuments.d.ts +0 -11
- package/serialization/resources/document/client/batchUpdateDocuments.js +0 -42
- package/serialization/resources/document/client/index.d.ts +0 -6
- package/serialization/resources/document/client/index.js +0 -45
- package/serialization/resources/document/client/listCollections.d.ts +0 -11
- package/serialization/resources/document/client/listCollections.js +0 -42
- package/serialization/resources/document/client/requests/CreateDocumentCollectionRequest.d.ts +0 -13
- package/serialization/resources/document/client/requests/CreateDocumentCollectionRequest.js +0 -44
- package/serialization/resources/document/client/requests/DocumentSearchPayload.d.ts +0 -17
- package/serialization/resources/document/client/requests/DocumentSearchPayload.js +0 -48
- package/serialization/resources/document/client/requests/GetDocumentListRequest.d.ts +0 -13
- package/serialization/resources/document/client/requests/GetDocumentListRequest.js +0 -44
- package/serialization/resources/document/client/requests/UpdateDocumentCollectionRequest.d.ts +0 -13
- package/serialization/resources/document/client/requests/UpdateDocumentCollectionRequest.js +0 -44
- package/serialization/resources/document/client/requests/UpdateDocumentRequest.d.ts +0 -13
- package/serialization/resources/document/client/requests/UpdateDocumentRequest.js +0 -44
- package/serialization/resources/document/client/requests/index.d.ts +0 -5
- package/serialization/resources/document/client/requests/index.js +0 -13
- package/serialization/resources/document/index.d.ts +0 -1
- package/serialization/resources/document/index.js +0 -17
- package/serialization/resources/graph/client/addBatch.d.ts +0 -11
- package/serialization/resources/graph/client/addBatch.js +0 -42
- package/serialization/resources/graph/client/index.d.ts +0 -2
- package/serialization/resources/graph/client/index.js +0 -41
- package/serialization/resources/graph/client/requests/AddDataBatchRequest.d.ts +0 -15
- package/serialization/resources/graph/client/requests/AddDataBatchRequest.js +0 -46
- package/serialization/resources/graph/client/requests/AddDataRequest.d.ts +0 -18
- package/serialization/resources/graph/client/requests/AddDataRequest.js +0 -49
- package/serialization/resources/graph/client/requests/AddTripleRequest.d.ts +0 -26
- package/serialization/resources/graph/client/requests/AddTripleRequest.js +0 -57
- package/serialization/resources/graph/client/requests/CloneGraphRequest.d.ts +0 -15
- package/serialization/resources/graph/client/requests/CloneGraphRequest.js +0 -46
- package/serialization/resources/graph/client/requests/EntityTypeRequest.d.ts +0 -15
- package/serialization/resources/graph/client/requests/EntityTypeRequest.js +0 -46
- package/serialization/resources/graph/client/requests/GraphSearchQuery.d.ts +0 -26
- package/serialization/resources/graph/client/requests/GraphSearchQuery.js +0 -57
- package/serialization/resources/graph/client/requests/index.d.ts +0 -6
- package/serialization/resources/graph/client/requests/index.js +0 -15
- package/serialization/resources/graph/index.d.ts +0 -2
- package/serialization/resources/graph/index.js +0 -18
- package/serialization/resources/graph/resources/edge/client/getByGroupId.d.ts +0 -11
- package/serialization/resources/graph/resources/edge/client/getByGroupId.js +0 -42
- package/serialization/resources/graph/resources/edge/client/getByUserId.d.ts +0 -11
- package/serialization/resources/graph/resources/edge/client/getByUserId.js +0 -42
- package/serialization/resources/graph/resources/edge/client/index.d.ts +0 -2
- package/serialization/resources/graph/resources/edge/client/index.js +0 -38
- package/serialization/resources/graph/resources/edge/index.d.ts +0 -1
- package/serialization/resources/graph/resources/edge/index.js +0 -17
- package/serialization/resources/graph/resources/index.d.ts +0 -2
- package/serialization/resources/graph/resources/index.js +0 -38
- package/serialization/resources/graph/resources/node/client/getByGroupId.d.ts +0 -11
- package/serialization/resources/graph/resources/node/client/getByGroupId.js +0 -42
- package/serialization/resources/graph/resources/node/client/getByUserId.d.ts +0 -11
- package/serialization/resources/graph/resources/node/client/getByUserId.js +0 -42
- package/serialization/resources/graph/resources/node/client/getEdges.d.ts +0 -11
- package/serialization/resources/graph/resources/node/client/getEdges.js +0 -42
- package/serialization/resources/graph/resources/node/client/index.d.ts +0 -3
- package/serialization/resources/graph/resources/node/client/index.js +0 -39
- package/serialization/resources/graph/resources/node/index.d.ts +0 -1
- package/serialization/resources/graph/resources/node/index.js +0 -17
- package/serialization/resources/group/client/index.d.ts +0 -1
- package/serialization/resources/group/client/index.js +0 -17
- package/serialization/resources/group/client/requests/CreateGroupRequest.d.ts +0 -16
- package/serialization/resources/group/client/requests/CreateGroupRequest.js +0 -47
- package/serialization/resources/group/client/requests/UpdateGroupRequest.d.ts +0 -15
- package/serialization/resources/group/client/requests/UpdateGroupRequest.js +0 -46
- package/serialization/resources/group/client/requests/index.d.ts +0 -2
- package/serialization/resources/group/client/requests/index.js +0 -7
- package/serialization/resources/group/index.d.ts +0 -1
- package/serialization/resources/group/index.js +0 -17
- package/serialization/resources/index.d.ts +0 -10
- package/serialization/resources/index.js +0 -49
- package/serialization/resources/memory/client/extractData.d.ts +0 -9
- package/serialization/resources/memory/client/extractData.js +0 -41
- package/serialization/resources/memory/client/index.d.ts +0 -3
- package/serialization/resources/memory/client/index.js +0 -42
- package/serialization/resources/memory/client/requests/AddFactsRequest.d.ts +0 -13
- package/serialization/resources/memory/client/requests/AddFactsRequest.js +0 -44
- package/serialization/resources/memory/client/requests/AddMemoryRequest.d.ts +0 -18
- package/serialization/resources/memory/client/requests/AddMemoryRequest.js +0 -49
- package/serialization/resources/memory/client/requests/CreateSessionRequest.d.ts +0 -16
- package/serialization/resources/memory/client/requests/CreateSessionRequest.js +0 -47
- package/serialization/resources/memory/client/requests/EndSessionRequest.d.ts +0 -14
- package/serialization/resources/memory/client/requests/EndSessionRequest.js +0 -45
- package/serialization/resources/memory/client/requests/EndSessionsRequest.d.ts +0 -13
- package/serialization/resources/memory/client/requests/EndSessionsRequest.js +0 -44
- package/serialization/resources/memory/client/requests/ExtractDataRequest.d.ts +0 -15
- package/serialization/resources/memory/client/requests/ExtractDataRequest.js +0 -46
- package/serialization/resources/memory/client/requests/MemorySearchPayload.d.ts +0 -20
- package/serialization/resources/memory/client/requests/MemorySearchPayload.js +0 -51
- package/serialization/resources/memory/client/requests/ModelsMessageMetadataUpdate.d.ts +0 -12
- package/serialization/resources/memory/client/requests/ModelsMessageMetadataUpdate.js +0 -43
- package/serialization/resources/memory/client/requests/SessionSearchQuery.d.ts +0 -22
- package/serialization/resources/memory/client/requests/SessionSearchQuery.js +0 -53
- package/serialization/resources/memory/client/requests/UpdateSessionRequest.d.ts +0 -14
- package/serialization/resources/memory/client/requests/UpdateSessionRequest.js +0 -45
- package/serialization/resources/memory/client/requests/index.d.ts +0 -10
- package/serialization/resources/memory/client/requests/index.js +0 -23
- package/serialization/resources/memory/client/search.d.ts +0 -11
- package/serialization/resources/memory/client/search.js +0 -42
- package/serialization/resources/memory/index.d.ts +0 -1
- package/serialization/resources/memory/index.js +0 -17
- package/serialization/resources/user/client/getSessions.d.ts +0 -11
- package/serialization/resources/user/client/getSessions.js +0 -42
- package/serialization/resources/user/client/index.d.ts +0 -2
- package/serialization/resources/user/client/index.js +0 -41
- package/serialization/resources/user/client/requests/CreateUserRequest.d.ts +0 -18
- package/serialization/resources/user/client/requests/CreateUserRequest.js +0 -49
- package/serialization/resources/user/client/requests/UpdateUserRequest.d.ts +0 -17
- package/serialization/resources/user/client/requests/UpdateUserRequest.js +0 -48
- package/serialization/resources/user/client/requests/index.d.ts +0 -2
- package/serialization/resources/user/client/requests/index.js +0 -7
- package/serialization/resources/user/index.d.ts +0 -1
- package/serialization/resources/user/index.js +0 -17
- package/serialization/types/AddMemoryResponse.d.ts +0 -12
- package/serialization/types/AddMemoryResponse.js +0 -43
- package/serialization/types/AddTripleResponse.d.ts +0 -16
- package/serialization/types/AddTripleResponse.js +0 -47
- package/serialization/types/ApiError.d.ts +0 -12
- package/serialization/types/ApiError.js +0 -43
- package/serialization/types/ApidataDocument.d.ts +0 -19
- package/serialization/types/ApidataDocument.js +0 -50
- package/serialization/types/ApidataDocumentCollection.d.ts +0 -24
- package/serialization/types/ApidataDocumentCollection.js +0 -55
- package/serialization/types/ApidataDocumentSearchResponse.d.ts +0 -17
- package/serialization/types/ApidataDocumentSearchResponse.js +0 -48
- package/serialization/types/ApidataDocumentWithScore.d.ts +0 -20
- package/serialization/types/ApidataDocumentWithScore.js +0 -51
- package/serialization/types/ClassifySessionRequest.d.ts +0 -16
- package/serialization/types/ClassifySessionRequest.js +0 -47
- package/serialization/types/CloneGraphResponse.d.ts +0 -13
- package/serialization/types/CloneGraphResponse.js +0 -44
- package/serialization/types/ComparisonOperator.d.ts +0 -10
- package/serialization/types/ComparisonOperator.js +0 -41
- package/serialization/types/CreateDocumentRequest.d.ts +0 -14
- package/serialization/types/CreateDocumentRequest.js +0 -45
- package/serialization/types/DateFilter.d.ts +0 -14
- package/serialization/types/DateFilter.js +0 -45
- package/serialization/types/EdgeType.d.ts +0 -17
- package/serialization/types/EdgeType.js +0 -48
- package/serialization/types/EndSessionResponse.d.ts +0 -15
- package/serialization/types/EndSessionResponse.js +0 -46
- package/serialization/types/EndSessionsResponse.d.ts +0 -13
- package/serialization/types/EndSessionsResponse.js +0 -44
- package/serialization/types/EntityEdge.d.ts +0 -22
- package/serialization/types/EntityEdge.js +0 -53
- package/serialization/types/EntityEdgeSourceTarget.d.ts +0 -13
- package/serialization/types/EntityEdgeSourceTarget.js +0 -44
- package/serialization/types/EntityNode.d.ts +0 -17
- package/serialization/types/EntityNode.js +0 -48
- package/serialization/types/EntityProperty.d.ts +0 -15
- package/serialization/types/EntityProperty.js +0 -46
- package/serialization/types/EntityPropertyType.d.ts +0 -10
- package/serialization/types/EntityPropertyType.js +0 -41
- package/serialization/types/EntityType.d.ts +0 -15
- package/serialization/types/EntityType.js +0 -46
- package/serialization/types/EntityTypeResponse.d.ts +0 -15
- package/serialization/types/EntityTypeResponse.js +0 -46
- package/serialization/types/Episode.d.ts +0 -22
- package/serialization/types/Episode.js +0 -53
- package/serialization/types/EpisodeData.d.ts +0 -16
- package/serialization/types/EpisodeData.js +0 -47
- package/serialization/types/EpisodeMentions.d.ts +0 -15
- package/serialization/types/EpisodeMentions.js +0 -46
- package/serialization/types/EpisodeResponse.d.ts +0 -13
- package/serialization/types/EpisodeResponse.js +0 -44
- package/serialization/types/Fact.d.ts +0 -22
- package/serialization/types/Fact.js +0 -53
- package/serialization/types/FactRatingExamples.d.ts +0 -14
- package/serialization/types/FactRatingExamples.js +0 -45
- package/serialization/types/FactRatingInstruction.d.ts +0 -14
- package/serialization/types/FactRatingInstruction.js +0 -45
- package/serialization/types/FactResponse.d.ts +0 -13
- package/serialization/types/FactResponse.js +0 -44
- package/serialization/types/FactsResponse.d.ts +0 -13
- package/serialization/types/FactsResponse.js +0 -44
- package/serialization/types/GraphDataType.d.ts +0 -10
- package/serialization/types/GraphDataType.js +0 -41
- package/serialization/types/GraphEdgesRequest.d.ts +0 -13
- package/serialization/types/GraphEdgesRequest.js +0 -44
- package/serialization/types/GraphNodesRequest.d.ts +0 -13
- package/serialization/types/GraphNodesRequest.js +0 -44
- package/serialization/types/GraphSearchResults.d.ts +0 -17
- package/serialization/types/GraphSearchResults.js +0 -48
- package/serialization/types/GraphSearchScope.d.ts +0 -10
- package/serialization/types/GraphSearchScope.js +0 -41
- package/serialization/types/Group.d.ts +0 -21
- package/serialization/types/Group.js +0 -52
- package/serialization/types/GroupListResponse.d.ts +0 -15
- package/serialization/types/GroupListResponse.js +0 -46
- package/serialization/types/Memory.d.ts +0 -20
- package/serialization/types/Memory.js +0 -51
- package/serialization/types/MemorySearchResult.d.ts +0 -17
- package/serialization/types/MemorySearchResult.js +0 -48
- package/serialization/types/Message.d.ts +0 -21
- package/serialization/types/Message.js +0 -52
- package/serialization/types/MessageListResponse.d.ts +0 -15
- package/serialization/types/MessageListResponse.js +0 -46
- package/serialization/types/NewFact.d.ts +0 -12
- package/serialization/types/NewFact.js +0 -43
- package/serialization/types/Question.d.ts +0 -12
- package/serialization/types/Question.js +0 -43
- package/serialization/types/Reranker.d.ts +0 -10
- package/serialization/types/Reranker.js +0 -47
- package/serialization/types/RoleType.d.ts +0 -10
- package/serialization/types/RoleType.js +0 -48
- package/serialization/types/SearchFilters.d.ts +0 -18
- package/serialization/types/SearchFilters.js +0 -49
- package/serialization/types/SearchScope.d.ts +0 -10
- package/serialization/types/SearchScope.js +0 -41
- package/serialization/types/SearchType.d.ts +0 -10
- package/serialization/types/SearchType.js +0 -41
- package/serialization/types/Session.d.ts +0 -25
- package/serialization/types/Session.js +0 -56
- package/serialization/types/SessionClassification.d.ts +0 -13
- package/serialization/types/SessionClassification.js +0 -44
- package/serialization/types/SessionListResponse.d.ts +0 -15
- package/serialization/types/SessionListResponse.js +0 -46
- package/serialization/types/SessionSearchResponse.d.ts +0 -13
- package/serialization/types/SessionSearchResponse.js +0 -44
- package/serialization/types/SessionSearchResult.d.ts +0 -19
- package/serialization/types/SessionSearchResult.js +0 -50
- package/serialization/types/SuccessResponse.d.ts +0 -12
- package/serialization/types/SuccessResponse.js +0 -43
- package/serialization/types/Summary.d.ts +0 -17
- package/serialization/types/Summary.js +0 -48
- package/serialization/types/SummaryListResponse.d.ts +0 -15
- package/serialization/types/SummaryListResponse.js +0 -46
- package/serialization/types/UpdateDocumentListRequest.d.ts +0 -14
- package/serialization/types/UpdateDocumentListRequest.js +0 -45
- package/serialization/types/User.d.ts +0 -25
- package/serialization/types/User.js +0 -56
- package/serialization/types/UserListResponse.d.ts +0 -15
- package/serialization/types/UserListResponse.js +0 -46
- package/serialization/types/UserNodeResponse.d.ts +0 -13
- package/serialization/types/UserNodeResponse.js +0 -44
- package/serialization/types/index.d.ts +0 -61
- package/serialization/types/index.js +0 -77
- package/version.d.ts +0 -1
- package/version.js +0 -4
- package/wrapper/graph.d.ts +0 -83
- package/wrapper/graph.js +0 -114
- package/wrapper/index.d.ts +0 -7
- package/wrapper/index.js +0 -15
- package/wrapper/memory.d.ts +0 -37
- package/wrapper/memory.js +0 -61
- package/wrapper/ontology.d.ts +0 -436
- package/wrapper/ontology.js +0 -100
|
@@ -1,1237 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
39
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
40
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
41
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
42
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
43
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
44
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
48
|
-
var t = {};
|
|
49
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
50
|
-
t[p] = s[p];
|
|
51
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
52
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
53
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
54
|
-
t[p[i]] = s[p[i]];
|
|
55
|
-
}
|
|
56
|
-
return t;
|
|
57
|
-
};
|
|
58
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
59
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
60
|
-
};
|
|
61
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
62
|
-
exports.Document = void 0;
|
|
63
|
-
const environments = __importStar(require("../../../../environments"));
|
|
64
|
-
const core = __importStar(require("../../../../core"));
|
|
65
|
-
const Zep = __importStar(require("../../../index"));
|
|
66
|
-
const url_join_1 = __importDefault(require("url-join"));
|
|
67
|
-
const serializers = __importStar(require("../../../../serialization/index"));
|
|
68
|
-
const errors = __importStar(require("../../../../errors/index"));
|
|
69
|
-
class Document {
|
|
70
|
-
constructor(_options = {}) {
|
|
71
|
-
this._options = _options;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Returns a list of all DocumentCollections.
|
|
75
|
-
*
|
|
76
|
-
* @param {Document.RequestOptions} requestOptions - Request-specific configuration.
|
|
77
|
-
*
|
|
78
|
-
* @throws {@link Zep.UnauthorizedError}
|
|
79
|
-
* @throws {@link Zep.InternalServerError}
|
|
80
|
-
*
|
|
81
|
-
* @example
|
|
82
|
-
* await client.document.listCollections()
|
|
83
|
-
*/
|
|
84
|
-
listCollections(requestOptions) {
|
|
85
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
-
var _a, _b;
|
|
87
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
88
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "collections"),
|
|
89
|
-
method: "GET",
|
|
90
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.21.0", "User-Agent": "zep-cloud/2.21.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
91
|
-
contentType: "application/json",
|
|
92
|
-
requestType: "json",
|
|
93
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
94
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
95
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
96
|
-
});
|
|
97
|
-
if (_response.ok) {
|
|
98
|
-
return serializers.document.listCollections.Response.parseOrThrow(_response.body, {
|
|
99
|
-
unrecognizedObjectKeys: "passthrough",
|
|
100
|
-
allowUnrecognizedUnionMembers: true,
|
|
101
|
-
allowUnrecognizedEnumValues: true,
|
|
102
|
-
skipValidation: true,
|
|
103
|
-
breadcrumbsPrefix: ["response"],
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
if (_response.error.reason === "status-code") {
|
|
107
|
-
switch (_response.error.statusCode) {
|
|
108
|
-
case 401:
|
|
109
|
-
throw new Zep.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
110
|
-
unrecognizedObjectKeys: "passthrough",
|
|
111
|
-
allowUnrecognizedUnionMembers: true,
|
|
112
|
-
allowUnrecognizedEnumValues: true,
|
|
113
|
-
skipValidation: true,
|
|
114
|
-
breadcrumbsPrefix: ["response"],
|
|
115
|
-
}));
|
|
116
|
-
case 500:
|
|
117
|
-
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
118
|
-
unrecognizedObjectKeys: "passthrough",
|
|
119
|
-
allowUnrecognizedUnionMembers: true,
|
|
120
|
-
allowUnrecognizedEnumValues: true,
|
|
121
|
-
skipValidation: true,
|
|
122
|
-
breadcrumbsPrefix: ["response"],
|
|
123
|
-
}));
|
|
124
|
-
default:
|
|
125
|
-
throw new errors.ZepError({
|
|
126
|
-
statusCode: _response.error.statusCode,
|
|
127
|
-
body: _response.error.body,
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
switch (_response.error.reason) {
|
|
132
|
-
case "non-json":
|
|
133
|
-
throw new errors.ZepError({
|
|
134
|
-
statusCode: _response.error.statusCode,
|
|
135
|
-
body: _response.error.rawBody,
|
|
136
|
-
});
|
|
137
|
-
case "timeout":
|
|
138
|
-
throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /collections.");
|
|
139
|
-
case "unknown":
|
|
140
|
-
throw new errors.ZepError({
|
|
141
|
-
message: _response.error.errorMessage,
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* Returns a DocumentCollection if it exists.
|
|
148
|
-
*
|
|
149
|
-
* @param {string} collectionName - Name of the Document Collection
|
|
150
|
-
* @param {Document.RequestOptions} requestOptions - Request-specific configuration.
|
|
151
|
-
*
|
|
152
|
-
* @throws {@link Zep.BadRequestError}
|
|
153
|
-
* @throws {@link Zep.UnauthorizedError}
|
|
154
|
-
* @throws {@link Zep.NotFoundError}
|
|
155
|
-
* @throws {@link Zep.InternalServerError}
|
|
156
|
-
*
|
|
157
|
-
* @example
|
|
158
|
-
* await client.document.getCollection("collectionName")
|
|
159
|
-
*/
|
|
160
|
-
getCollection(collectionName, requestOptions) {
|
|
161
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
162
|
-
var _a, _b;
|
|
163
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
164
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}`),
|
|
165
|
-
method: "GET",
|
|
166
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.21.0", "User-Agent": "zep-cloud/2.21.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
167
|
-
contentType: "application/json",
|
|
168
|
-
requestType: "json",
|
|
169
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
170
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
171
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
172
|
-
});
|
|
173
|
-
if (_response.ok) {
|
|
174
|
-
return serializers.ApidataDocumentCollection.parseOrThrow(_response.body, {
|
|
175
|
-
unrecognizedObjectKeys: "passthrough",
|
|
176
|
-
allowUnrecognizedUnionMembers: true,
|
|
177
|
-
allowUnrecognizedEnumValues: true,
|
|
178
|
-
skipValidation: true,
|
|
179
|
-
breadcrumbsPrefix: ["response"],
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
if (_response.error.reason === "status-code") {
|
|
183
|
-
switch (_response.error.statusCode) {
|
|
184
|
-
case 400:
|
|
185
|
-
throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
186
|
-
unrecognizedObjectKeys: "passthrough",
|
|
187
|
-
allowUnrecognizedUnionMembers: true,
|
|
188
|
-
allowUnrecognizedEnumValues: true,
|
|
189
|
-
skipValidation: true,
|
|
190
|
-
breadcrumbsPrefix: ["response"],
|
|
191
|
-
}));
|
|
192
|
-
case 401:
|
|
193
|
-
throw new Zep.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
194
|
-
unrecognizedObjectKeys: "passthrough",
|
|
195
|
-
allowUnrecognizedUnionMembers: true,
|
|
196
|
-
allowUnrecognizedEnumValues: true,
|
|
197
|
-
skipValidation: true,
|
|
198
|
-
breadcrumbsPrefix: ["response"],
|
|
199
|
-
}));
|
|
200
|
-
case 404:
|
|
201
|
-
throw new Zep.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
202
|
-
unrecognizedObjectKeys: "passthrough",
|
|
203
|
-
allowUnrecognizedUnionMembers: true,
|
|
204
|
-
allowUnrecognizedEnumValues: true,
|
|
205
|
-
skipValidation: true,
|
|
206
|
-
breadcrumbsPrefix: ["response"],
|
|
207
|
-
}));
|
|
208
|
-
case 500:
|
|
209
|
-
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
210
|
-
unrecognizedObjectKeys: "passthrough",
|
|
211
|
-
allowUnrecognizedUnionMembers: true,
|
|
212
|
-
allowUnrecognizedEnumValues: true,
|
|
213
|
-
skipValidation: true,
|
|
214
|
-
breadcrumbsPrefix: ["response"],
|
|
215
|
-
}));
|
|
216
|
-
default:
|
|
217
|
-
throw new errors.ZepError({
|
|
218
|
-
statusCode: _response.error.statusCode,
|
|
219
|
-
body: _response.error.body,
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
switch (_response.error.reason) {
|
|
224
|
-
case "non-json":
|
|
225
|
-
throw new errors.ZepError({
|
|
226
|
-
statusCode: _response.error.statusCode,
|
|
227
|
-
body: _response.error.rawBody,
|
|
228
|
-
});
|
|
229
|
-
case "timeout":
|
|
230
|
-
throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /collections/{collectionName}.");
|
|
231
|
-
case "unknown":
|
|
232
|
-
throw new errors.ZepError({
|
|
233
|
-
message: _response.error.errorMessage,
|
|
234
|
-
});
|
|
235
|
-
}
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
/**
|
|
239
|
-
* If a collection with the same name already exists, an error will be returned.
|
|
240
|
-
*
|
|
241
|
-
* @param {string} collectionName - Name of the Document Collection
|
|
242
|
-
* @param {Zep.CreateDocumentCollectionRequest} request
|
|
243
|
-
* @param {Document.RequestOptions} requestOptions - Request-specific configuration.
|
|
244
|
-
*
|
|
245
|
-
* @throws {@link Zep.BadRequestError}
|
|
246
|
-
* @throws {@link Zep.UnauthorizedError}
|
|
247
|
-
* @throws {@link Zep.NotFoundError}
|
|
248
|
-
* @throws {@link Zep.InternalServerError}
|
|
249
|
-
*
|
|
250
|
-
* @example
|
|
251
|
-
* await client.document.addCollection("collectionName")
|
|
252
|
-
*/
|
|
253
|
-
addCollection(collectionName_1) {
|
|
254
|
-
return __awaiter(this, arguments, void 0, function* (collectionName, request = {}, requestOptions) {
|
|
255
|
-
var _a, _b;
|
|
256
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
257
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}`),
|
|
258
|
-
method: "POST",
|
|
259
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.21.0", "User-Agent": "zep-cloud/2.21.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
260
|
-
contentType: "application/json",
|
|
261
|
-
requestType: "json",
|
|
262
|
-
body: serializers.CreateDocumentCollectionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
263
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
264
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
265
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
266
|
-
});
|
|
267
|
-
if (_response.ok) {
|
|
268
|
-
return serializers.SuccessResponse.parseOrThrow(_response.body, {
|
|
269
|
-
unrecognizedObjectKeys: "passthrough",
|
|
270
|
-
allowUnrecognizedUnionMembers: true,
|
|
271
|
-
allowUnrecognizedEnumValues: true,
|
|
272
|
-
skipValidation: true,
|
|
273
|
-
breadcrumbsPrefix: ["response"],
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
if (_response.error.reason === "status-code") {
|
|
277
|
-
switch (_response.error.statusCode) {
|
|
278
|
-
case 400:
|
|
279
|
-
throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
280
|
-
unrecognizedObjectKeys: "passthrough",
|
|
281
|
-
allowUnrecognizedUnionMembers: true,
|
|
282
|
-
allowUnrecognizedEnumValues: true,
|
|
283
|
-
skipValidation: true,
|
|
284
|
-
breadcrumbsPrefix: ["response"],
|
|
285
|
-
}));
|
|
286
|
-
case 401:
|
|
287
|
-
throw new Zep.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
288
|
-
unrecognizedObjectKeys: "passthrough",
|
|
289
|
-
allowUnrecognizedUnionMembers: true,
|
|
290
|
-
allowUnrecognizedEnumValues: true,
|
|
291
|
-
skipValidation: true,
|
|
292
|
-
breadcrumbsPrefix: ["response"],
|
|
293
|
-
}));
|
|
294
|
-
case 404:
|
|
295
|
-
throw new Zep.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
296
|
-
unrecognizedObjectKeys: "passthrough",
|
|
297
|
-
allowUnrecognizedUnionMembers: true,
|
|
298
|
-
allowUnrecognizedEnumValues: true,
|
|
299
|
-
skipValidation: true,
|
|
300
|
-
breadcrumbsPrefix: ["response"],
|
|
301
|
-
}));
|
|
302
|
-
case 500:
|
|
303
|
-
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
304
|
-
unrecognizedObjectKeys: "passthrough",
|
|
305
|
-
allowUnrecognizedUnionMembers: true,
|
|
306
|
-
allowUnrecognizedEnumValues: true,
|
|
307
|
-
skipValidation: true,
|
|
308
|
-
breadcrumbsPrefix: ["response"],
|
|
309
|
-
}));
|
|
310
|
-
default:
|
|
311
|
-
throw new errors.ZepError({
|
|
312
|
-
statusCode: _response.error.statusCode,
|
|
313
|
-
body: _response.error.body,
|
|
314
|
-
});
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
switch (_response.error.reason) {
|
|
318
|
-
case "non-json":
|
|
319
|
-
throw new errors.ZepError({
|
|
320
|
-
statusCode: _response.error.statusCode,
|
|
321
|
-
body: _response.error.rawBody,
|
|
322
|
-
});
|
|
323
|
-
case "timeout":
|
|
324
|
-
throw new errors.ZepTimeoutError("Timeout exceeded when calling POST /collections/{collectionName}.");
|
|
325
|
-
case "unknown":
|
|
326
|
-
throw new errors.ZepError({
|
|
327
|
-
message: _response.error.errorMessage,
|
|
328
|
-
});
|
|
329
|
-
}
|
|
330
|
-
});
|
|
331
|
-
}
|
|
332
|
-
/**
|
|
333
|
-
* If a collection with the same name already exists, it will be overwritten.
|
|
334
|
-
*
|
|
335
|
-
* @param {string} collectionName - Name of the Document Collection
|
|
336
|
-
* @param {Document.RequestOptions} requestOptions - Request-specific configuration.
|
|
337
|
-
*
|
|
338
|
-
* @throws {@link Zep.BadRequestError}
|
|
339
|
-
* @throws {@link Zep.UnauthorizedError}
|
|
340
|
-
* @throws {@link Zep.NotFoundError}
|
|
341
|
-
* @throws {@link Zep.InternalServerError}
|
|
342
|
-
*
|
|
343
|
-
* @example
|
|
344
|
-
* await client.document.deleteCollection("collectionName")
|
|
345
|
-
*/
|
|
346
|
-
deleteCollection(collectionName, requestOptions) {
|
|
347
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
348
|
-
var _a, _b;
|
|
349
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
350
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}`),
|
|
351
|
-
method: "DELETE",
|
|
352
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.21.0", "User-Agent": "zep-cloud/2.21.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
353
|
-
contentType: "application/json",
|
|
354
|
-
requestType: "json",
|
|
355
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
356
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
357
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
358
|
-
});
|
|
359
|
-
if (_response.ok) {
|
|
360
|
-
return serializers.SuccessResponse.parseOrThrow(_response.body, {
|
|
361
|
-
unrecognizedObjectKeys: "passthrough",
|
|
362
|
-
allowUnrecognizedUnionMembers: true,
|
|
363
|
-
allowUnrecognizedEnumValues: true,
|
|
364
|
-
skipValidation: true,
|
|
365
|
-
breadcrumbsPrefix: ["response"],
|
|
366
|
-
});
|
|
367
|
-
}
|
|
368
|
-
if (_response.error.reason === "status-code") {
|
|
369
|
-
switch (_response.error.statusCode) {
|
|
370
|
-
case 400:
|
|
371
|
-
throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
372
|
-
unrecognizedObjectKeys: "passthrough",
|
|
373
|
-
allowUnrecognizedUnionMembers: true,
|
|
374
|
-
allowUnrecognizedEnumValues: true,
|
|
375
|
-
skipValidation: true,
|
|
376
|
-
breadcrumbsPrefix: ["response"],
|
|
377
|
-
}));
|
|
378
|
-
case 401:
|
|
379
|
-
throw new Zep.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
380
|
-
unrecognizedObjectKeys: "passthrough",
|
|
381
|
-
allowUnrecognizedUnionMembers: true,
|
|
382
|
-
allowUnrecognizedEnumValues: true,
|
|
383
|
-
skipValidation: true,
|
|
384
|
-
breadcrumbsPrefix: ["response"],
|
|
385
|
-
}));
|
|
386
|
-
case 404:
|
|
387
|
-
throw new Zep.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
388
|
-
unrecognizedObjectKeys: "passthrough",
|
|
389
|
-
allowUnrecognizedUnionMembers: true,
|
|
390
|
-
allowUnrecognizedEnumValues: true,
|
|
391
|
-
skipValidation: true,
|
|
392
|
-
breadcrumbsPrefix: ["response"],
|
|
393
|
-
}));
|
|
394
|
-
case 500:
|
|
395
|
-
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
396
|
-
unrecognizedObjectKeys: "passthrough",
|
|
397
|
-
allowUnrecognizedUnionMembers: true,
|
|
398
|
-
allowUnrecognizedEnumValues: true,
|
|
399
|
-
skipValidation: true,
|
|
400
|
-
breadcrumbsPrefix: ["response"],
|
|
401
|
-
}));
|
|
402
|
-
default:
|
|
403
|
-
throw new errors.ZepError({
|
|
404
|
-
statusCode: _response.error.statusCode,
|
|
405
|
-
body: _response.error.body,
|
|
406
|
-
});
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
switch (_response.error.reason) {
|
|
410
|
-
case "non-json":
|
|
411
|
-
throw new errors.ZepError({
|
|
412
|
-
statusCode: _response.error.statusCode,
|
|
413
|
-
body: _response.error.rawBody,
|
|
414
|
-
});
|
|
415
|
-
case "timeout":
|
|
416
|
-
throw new errors.ZepTimeoutError("Timeout exceeded when calling DELETE /collections/{collectionName}.");
|
|
417
|
-
case "unknown":
|
|
418
|
-
throw new errors.ZepError({
|
|
419
|
-
message: _response.error.errorMessage,
|
|
420
|
-
});
|
|
421
|
-
}
|
|
422
|
-
});
|
|
423
|
-
}
|
|
424
|
-
/**
|
|
425
|
-
* Updates a DocumentCollection
|
|
426
|
-
*
|
|
427
|
-
* @param {string} collectionName - Name of the Document Collection
|
|
428
|
-
* @param {Zep.UpdateDocumentCollectionRequest} request
|
|
429
|
-
* @param {Document.RequestOptions} requestOptions - Request-specific configuration.
|
|
430
|
-
*
|
|
431
|
-
* @throws {@link Zep.BadRequestError}
|
|
432
|
-
* @throws {@link Zep.UnauthorizedError}
|
|
433
|
-
* @throws {@link Zep.NotFoundError}
|
|
434
|
-
* @throws {@link Zep.InternalServerError}
|
|
435
|
-
*
|
|
436
|
-
* @example
|
|
437
|
-
* await client.document.updateCollection("collectionName")
|
|
438
|
-
*/
|
|
439
|
-
updateCollection(collectionName_1) {
|
|
440
|
-
return __awaiter(this, arguments, void 0, function* (collectionName, request = {}, requestOptions) {
|
|
441
|
-
var _a, _b;
|
|
442
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
443
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}`),
|
|
444
|
-
method: "PATCH",
|
|
445
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.21.0", "User-Agent": "zep-cloud/2.21.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
446
|
-
contentType: "application/json",
|
|
447
|
-
requestType: "json",
|
|
448
|
-
body: serializers.UpdateDocumentCollectionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
449
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
450
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
451
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
452
|
-
});
|
|
453
|
-
if (_response.ok) {
|
|
454
|
-
return serializers.SuccessResponse.parseOrThrow(_response.body, {
|
|
455
|
-
unrecognizedObjectKeys: "passthrough",
|
|
456
|
-
allowUnrecognizedUnionMembers: true,
|
|
457
|
-
allowUnrecognizedEnumValues: true,
|
|
458
|
-
skipValidation: true,
|
|
459
|
-
breadcrumbsPrefix: ["response"],
|
|
460
|
-
});
|
|
461
|
-
}
|
|
462
|
-
if (_response.error.reason === "status-code") {
|
|
463
|
-
switch (_response.error.statusCode) {
|
|
464
|
-
case 400:
|
|
465
|
-
throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
466
|
-
unrecognizedObjectKeys: "passthrough",
|
|
467
|
-
allowUnrecognizedUnionMembers: true,
|
|
468
|
-
allowUnrecognizedEnumValues: true,
|
|
469
|
-
skipValidation: true,
|
|
470
|
-
breadcrumbsPrefix: ["response"],
|
|
471
|
-
}));
|
|
472
|
-
case 401:
|
|
473
|
-
throw new Zep.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
474
|
-
unrecognizedObjectKeys: "passthrough",
|
|
475
|
-
allowUnrecognizedUnionMembers: true,
|
|
476
|
-
allowUnrecognizedEnumValues: true,
|
|
477
|
-
skipValidation: true,
|
|
478
|
-
breadcrumbsPrefix: ["response"],
|
|
479
|
-
}));
|
|
480
|
-
case 404:
|
|
481
|
-
throw new Zep.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
482
|
-
unrecognizedObjectKeys: "passthrough",
|
|
483
|
-
allowUnrecognizedUnionMembers: true,
|
|
484
|
-
allowUnrecognizedEnumValues: true,
|
|
485
|
-
skipValidation: true,
|
|
486
|
-
breadcrumbsPrefix: ["response"],
|
|
487
|
-
}));
|
|
488
|
-
case 500:
|
|
489
|
-
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
490
|
-
unrecognizedObjectKeys: "passthrough",
|
|
491
|
-
allowUnrecognizedUnionMembers: true,
|
|
492
|
-
allowUnrecognizedEnumValues: true,
|
|
493
|
-
skipValidation: true,
|
|
494
|
-
breadcrumbsPrefix: ["response"],
|
|
495
|
-
}));
|
|
496
|
-
default:
|
|
497
|
-
throw new errors.ZepError({
|
|
498
|
-
statusCode: _response.error.statusCode,
|
|
499
|
-
body: _response.error.body,
|
|
500
|
-
});
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
switch (_response.error.reason) {
|
|
504
|
-
case "non-json":
|
|
505
|
-
throw new errors.ZepError({
|
|
506
|
-
statusCode: _response.error.statusCode,
|
|
507
|
-
body: _response.error.rawBody,
|
|
508
|
-
});
|
|
509
|
-
case "timeout":
|
|
510
|
-
throw new errors.ZepTimeoutError("Timeout exceeded when calling PATCH /collections/{collectionName}.");
|
|
511
|
-
case "unknown":
|
|
512
|
-
throw new errors.ZepError({
|
|
513
|
-
message: _response.error.errorMessage,
|
|
514
|
-
});
|
|
515
|
-
}
|
|
516
|
-
});
|
|
517
|
-
}
|
|
518
|
-
/**
|
|
519
|
-
* Creates Documents in a specified DocumentCollection and returns their UUIDs.
|
|
520
|
-
*
|
|
521
|
-
* @param {string} collectionName - Name of the Document Collection
|
|
522
|
-
* @param {Zep.CreateDocumentRequest[]} request
|
|
523
|
-
* @param {Document.RequestOptions} requestOptions - Request-specific configuration.
|
|
524
|
-
*
|
|
525
|
-
* @throws {@link Zep.BadRequestError}
|
|
526
|
-
* @throws {@link Zep.UnauthorizedError}
|
|
527
|
-
* @throws {@link Zep.InternalServerError}
|
|
528
|
-
*
|
|
529
|
-
* @example
|
|
530
|
-
* await client.document.addDocuments("collectionName", [{
|
|
531
|
-
* content: "content"
|
|
532
|
-
* }])
|
|
533
|
-
*/
|
|
534
|
-
addDocuments(collectionName, request, requestOptions) {
|
|
535
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
536
|
-
var _a, _b;
|
|
537
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
538
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}/documents`),
|
|
539
|
-
method: "POST",
|
|
540
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.21.0", "User-Agent": "zep-cloud/2.21.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
541
|
-
contentType: "application/json",
|
|
542
|
-
requestType: "json",
|
|
543
|
-
body: serializers.document.addDocuments.Request.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
544
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
545
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
546
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
547
|
-
});
|
|
548
|
-
if (_response.ok) {
|
|
549
|
-
return serializers.document.addDocuments.Response.parseOrThrow(_response.body, {
|
|
550
|
-
unrecognizedObjectKeys: "passthrough",
|
|
551
|
-
allowUnrecognizedUnionMembers: true,
|
|
552
|
-
allowUnrecognizedEnumValues: true,
|
|
553
|
-
skipValidation: true,
|
|
554
|
-
breadcrumbsPrefix: ["response"],
|
|
555
|
-
});
|
|
556
|
-
}
|
|
557
|
-
if (_response.error.reason === "status-code") {
|
|
558
|
-
switch (_response.error.statusCode) {
|
|
559
|
-
case 400:
|
|
560
|
-
throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
561
|
-
unrecognizedObjectKeys: "passthrough",
|
|
562
|
-
allowUnrecognizedUnionMembers: true,
|
|
563
|
-
allowUnrecognizedEnumValues: true,
|
|
564
|
-
skipValidation: true,
|
|
565
|
-
breadcrumbsPrefix: ["response"],
|
|
566
|
-
}));
|
|
567
|
-
case 401:
|
|
568
|
-
throw new Zep.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
569
|
-
unrecognizedObjectKeys: "passthrough",
|
|
570
|
-
allowUnrecognizedUnionMembers: true,
|
|
571
|
-
allowUnrecognizedEnumValues: true,
|
|
572
|
-
skipValidation: true,
|
|
573
|
-
breadcrumbsPrefix: ["response"],
|
|
574
|
-
}));
|
|
575
|
-
case 500:
|
|
576
|
-
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
577
|
-
unrecognizedObjectKeys: "passthrough",
|
|
578
|
-
allowUnrecognizedUnionMembers: true,
|
|
579
|
-
allowUnrecognizedEnumValues: true,
|
|
580
|
-
skipValidation: true,
|
|
581
|
-
breadcrumbsPrefix: ["response"],
|
|
582
|
-
}));
|
|
583
|
-
default:
|
|
584
|
-
throw new errors.ZepError({
|
|
585
|
-
statusCode: _response.error.statusCode,
|
|
586
|
-
body: _response.error.body,
|
|
587
|
-
});
|
|
588
|
-
}
|
|
589
|
-
}
|
|
590
|
-
switch (_response.error.reason) {
|
|
591
|
-
case "non-json":
|
|
592
|
-
throw new errors.ZepError({
|
|
593
|
-
statusCode: _response.error.statusCode,
|
|
594
|
-
body: _response.error.rawBody,
|
|
595
|
-
});
|
|
596
|
-
case "timeout":
|
|
597
|
-
throw new errors.ZepTimeoutError("Timeout exceeded when calling POST /collections/{collectionName}/documents.");
|
|
598
|
-
case "unknown":
|
|
599
|
-
throw new errors.ZepError({
|
|
600
|
-
message: _response.error.errorMessage,
|
|
601
|
-
});
|
|
602
|
-
}
|
|
603
|
-
});
|
|
604
|
-
}
|
|
605
|
-
/**
|
|
606
|
-
* Deletes specified Documents from a DocumentCollection.
|
|
607
|
-
*
|
|
608
|
-
* @param {string} collectionName - Name of the Document Collection
|
|
609
|
-
* @param {string[]} request
|
|
610
|
-
* @param {Document.RequestOptions} requestOptions - Request-specific configuration.
|
|
611
|
-
*
|
|
612
|
-
* @throws {@link Zep.BadRequestError}
|
|
613
|
-
* @throws {@link Zep.UnauthorizedError}
|
|
614
|
-
* @throws {@link Zep.InternalServerError}
|
|
615
|
-
*
|
|
616
|
-
* @example
|
|
617
|
-
* await client.document.batchDeleteDocuments("collectionName", ["string"])
|
|
618
|
-
*/
|
|
619
|
-
batchDeleteDocuments(collectionName, request, requestOptions) {
|
|
620
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
621
|
-
var _a, _b;
|
|
622
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
623
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}/documents/batchDelete`),
|
|
624
|
-
method: "POST",
|
|
625
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.21.0", "User-Agent": "zep-cloud/2.21.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
626
|
-
contentType: "application/json",
|
|
627
|
-
requestType: "json",
|
|
628
|
-
body: serializers.document.batchDeleteDocuments.Request.jsonOrThrow(request, {
|
|
629
|
-
unrecognizedObjectKeys: "strip",
|
|
630
|
-
}),
|
|
631
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
632
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
633
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
634
|
-
});
|
|
635
|
-
if (_response.ok) {
|
|
636
|
-
return serializers.SuccessResponse.parseOrThrow(_response.body, {
|
|
637
|
-
unrecognizedObjectKeys: "passthrough",
|
|
638
|
-
allowUnrecognizedUnionMembers: true,
|
|
639
|
-
allowUnrecognizedEnumValues: true,
|
|
640
|
-
skipValidation: true,
|
|
641
|
-
breadcrumbsPrefix: ["response"],
|
|
642
|
-
});
|
|
643
|
-
}
|
|
644
|
-
if (_response.error.reason === "status-code") {
|
|
645
|
-
switch (_response.error.statusCode) {
|
|
646
|
-
case 400:
|
|
647
|
-
throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
648
|
-
unrecognizedObjectKeys: "passthrough",
|
|
649
|
-
allowUnrecognizedUnionMembers: true,
|
|
650
|
-
allowUnrecognizedEnumValues: true,
|
|
651
|
-
skipValidation: true,
|
|
652
|
-
breadcrumbsPrefix: ["response"],
|
|
653
|
-
}));
|
|
654
|
-
case 401:
|
|
655
|
-
throw new Zep.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
656
|
-
unrecognizedObjectKeys: "passthrough",
|
|
657
|
-
allowUnrecognizedUnionMembers: true,
|
|
658
|
-
allowUnrecognizedEnumValues: true,
|
|
659
|
-
skipValidation: true,
|
|
660
|
-
breadcrumbsPrefix: ["response"],
|
|
661
|
-
}));
|
|
662
|
-
case 500:
|
|
663
|
-
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
664
|
-
unrecognizedObjectKeys: "passthrough",
|
|
665
|
-
allowUnrecognizedUnionMembers: true,
|
|
666
|
-
allowUnrecognizedEnumValues: true,
|
|
667
|
-
skipValidation: true,
|
|
668
|
-
breadcrumbsPrefix: ["response"],
|
|
669
|
-
}));
|
|
670
|
-
default:
|
|
671
|
-
throw new errors.ZepError({
|
|
672
|
-
statusCode: _response.error.statusCode,
|
|
673
|
-
body: _response.error.body,
|
|
674
|
-
});
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
switch (_response.error.reason) {
|
|
678
|
-
case "non-json":
|
|
679
|
-
throw new errors.ZepError({
|
|
680
|
-
statusCode: _response.error.statusCode,
|
|
681
|
-
body: _response.error.rawBody,
|
|
682
|
-
});
|
|
683
|
-
case "timeout":
|
|
684
|
-
throw new errors.ZepTimeoutError("Timeout exceeded when calling POST /collections/{collectionName}/documents/batchDelete.");
|
|
685
|
-
case "unknown":
|
|
686
|
-
throw new errors.ZepError({
|
|
687
|
-
message: _response.error.errorMessage,
|
|
688
|
-
});
|
|
689
|
-
}
|
|
690
|
-
});
|
|
691
|
-
}
|
|
692
|
-
/**
|
|
693
|
-
* Returns Documents from a DocumentCollection specified by UUID or ID.
|
|
694
|
-
*
|
|
695
|
-
* @param {string} collectionName - Name of the Document Collection
|
|
696
|
-
* @param {Zep.GetDocumentListRequest} request
|
|
697
|
-
* @param {Document.RequestOptions} requestOptions - Request-specific configuration.
|
|
698
|
-
*
|
|
699
|
-
* @throws {@link Zep.BadRequestError}
|
|
700
|
-
* @throws {@link Zep.UnauthorizedError}
|
|
701
|
-
* @throws {@link Zep.InternalServerError}
|
|
702
|
-
*
|
|
703
|
-
* @example
|
|
704
|
-
* await client.document.batchGetDocuments("collectionName")
|
|
705
|
-
*/
|
|
706
|
-
batchGetDocuments(collectionName_1) {
|
|
707
|
-
return __awaiter(this, arguments, void 0, function* (collectionName, request = {}, requestOptions) {
|
|
708
|
-
var _a, _b;
|
|
709
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
710
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}/documents/batchGet`),
|
|
711
|
-
method: "POST",
|
|
712
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.21.0", "User-Agent": "zep-cloud/2.21.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
713
|
-
contentType: "application/json",
|
|
714
|
-
requestType: "json",
|
|
715
|
-
body: serializers.GetDocumentListRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
716
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
717
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
718
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
719
|
-
});
|
|
720
|
-
if (_response.ok) {
|
|
721
|
-
return serializers.document.batchGetDocuments.Response.parseOrThrow(_response.body, {
|
|
722
|
-
unrecognizedObjectKeys: "passthrough",
|
|
723
|
-
allowUnrecognizedUnionMembers: true,
|
|
724
|
-
allowUnrecognizedEnumValues: true,
|
|
725
|
-
skipValidation: true,
|
|
726
|
-
breadcrumbsPrefix: ["response"],
|
|
727
|
-
});
|
|
728
|
-
}
|
|
729
|
-
if (_response.error.reason === "status-code") {
|
|
730
|
-
switch (_response.error.statusCode) {
|
|
731
|
-
case 400:
|
|
732
|
-
throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
733
|
-
unrecognizedObjectKeys: "passthrough",
|
|
734
|
-
allowUnrecognizedUnionMembers: true,
|
|
735
|
-
allowUnrecognizedEnumValues: true,
|
|
736
|
-
skipValidation: true,
|
|
737
|
-
breadcrumbsPrefix: ["response"],
|
|
738
|
-
}));
|
|
739
|
-
case 401:
|
|
740
|
-
throw new Zep.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
741
|
-
unrecognizedObjectKeys: "passthrough",
|
|
742
|
-
allowUnrecognizedUnionMembers: true,
|
|
743
|
-
allowUnrecognizedEnumValues: true,
|
|
744
|
-
skipValidation: true,
|
|
745
|
-
breadcrumbsPrefix: ["response"],
|
|
746
|
-
}));
|
|
747
|
-
case 500:
|
|
748
|
-
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
749
|
-
unrecognizedObjectKeys: "passthrough",
|
|
750
|
-
allowUnrecognizedUnionMembers: true,
|
|
751
|
-
allowUnrecognizedEnumValues: true,
|
|
752
|
-
skipValidation: true,
|
|
753
|
-
breadcrumbsPrefix: ["response"],
|
|
754
|
-
}));
|
|
755
|
-
default:
|
|
756
|
-
throw new errors.ZepError({
|
|
757
|
-
statusCode: _response.error.statusCode,
|
|
758
|
-
body: _response.error.body,
|
|
759
|
-
});
|
|
760
|
-
}
|
|
761
|
-
}
|
|
762
|
-
switch (_response.error.reason) {
|
|
763
|
-
case "non-json":
|
|
764
|
-
throw new errors.ZepError({
|
|
765
|
-
statusCode: _response.error.statusCode,
|
|
766
|
-
body: _response.error.rawBody,
|
|
767
|
-
});
|
|
768
|
-
case "timeout":
|
|
769
|
-
throw new errors.ZepTimeoutError("Timeout exceeded when calling POST /collections/{collectionName}/documents/batchGet.");
|
|
770
|
-
case "unknown":
|
|
771
|
-
throw new errors.ZepError({
|
|
772
|
-
message: _response.error.errorMessage,
|
|
773
|
-
});
|
|
774
|
-
}
|
|
775
|
-
});
|
|
776
|
-
}
|
|
777
|
-
/**
|
|
778
|
-
* Updates Documents in a specified DocumentCollection.
|
|
779
|
-
*
|
|
780
|
-
* @param {string} collectionName - Name of the Document Collection
|
|
781
|
-
* @param {Zep.UpdateDocumentListRequest[]} request
|
|
782
|
-
* @param {Document.RequestOptions} requestOptions - Request-specific configuration.
|
|
783
|
-
*
|
|
784
|
-
* @throws {@link Zep.BadRequestError}
|
|
785
|
-
* @throws {@link Zep.UnauthorizedError}
|
|
786
|
-
* @throws {@link Zep.InternalServerError}
|
|
787
|
-
*
|
|
788
|
-
* @example
|
|
789
|
-
* await client.document.batchUpdateDocuments("collectionName", [{
|
|
790
|
-
* uuid: "uuid"
|
|
791
|
-
* }])
|
|
792
|
-
*/
|
|
793
|
-
batchUpdateDocuments(collectionName, request, requestOptions) {
|
|
794
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
795
|
-
var _a, _b;
|
|
796
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
797
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}/documents/batchUpdate`),
|
|
798
|
-
method: "PATCH",
|
|
799
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.21.0", "User-Agent": "zep-cloud/2.21.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
800
|
-
contentType: "application/json",
|
|
801
|
-
requestType: "json",
|
|
802
|
-
body: serializers.document.batchUpdateDocuments.Request.jsonOrThrow(request, {
|
|
803
|
-
unrecognizedObjectKeys: "strip",
|
|
804
|
-
}),
|
|
805
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
806
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
807
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
808
|
-
});
|
|
809
|
-
if (_response.ok) {
|
|
810
|
-
return serializers.SuccessResponse.parseOrThrow(_response.body, {
|
|
811
|
-
unrecognizedObjectKeys: "passthrough",
|
|
812
|
-
allowUnrecognizedUnionMembers: true,
|
|
813
|
-
allowUnrecognizedEnumValues: true,
|
|
814
|
-
skipValidation: true,
|
|
815
|
-
breadcrumbsPrefix: ["response"],
|
|
816
|
-
});
|
|
817
|
-
}
|
|
818
|
-
if (_response.error.reason === "status-code") {
|
|
819
|
-
switch (_response.error.statusCode) {
|
|
820
|
-
case 400:
|
|
821
|
-
throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
822
|
-
unrecognizedObjectKeys: "passthrough",
|
|
823
|
-
allowUnrecognizedUnionMembers: true,
|
|
824
|
-
allowUnrecognizedEnumValues: true,
|
|
825
|
-
skipValidation: true,
|
|
826
|
-
breadcrumbsPrefix: ["response"],
|
|
827
|
-
}));
|
|
828
|
-
case 401:
|
|
829
|
-
throw new Zep.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
830
|
-
unrecognizedObjectKeys: "passthrough",
|
|
831
|
-
allowUnrecognizedUnionMembers: true,
|
|
832
|
-
allowUnrecognizedEnumValues: true,
|
|
833
|
-
skipValidation: true,
|
|
834
|
-
breadcrumbsPrefix: ["response"],
|
|
835
|
-
}));
|
|
836
|
-
case 500:
|
|
837
|
-
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
838
|
-
unrecognizedObjectKeys: "passthrough",
|
|
839
|
-
allowUnrecognizedUnionMembers: true,
|
|
840
|
-
allowUnrecognizedEnumValues: true,
|
|
841
|
-
skipValidation: true,
|
|
842
|
-
breadcrumbsPrefix: ["response"],
|
|
843
|
-
}));
|
|
844
|
-
default:
|
|
845
|
-
throw new errors.ZepError({
|
|
846
|
-
statusCode: _response.error.statusCode,
|
|
847
|
-
body: _response.error.body,
|
|
848
|
-
});
|
|
849
|
-
}
|
|
850
|
-
}
|
|
851
|
-
switch (_response.error.reason) {
|
|
852
|
-
case "non-json":
|
|
853
|
-
throw new errors.ZepError({
|
|
854
|
-
statusCode: _response.error.statusCode,
|
|
855
|
-
body: _response.error.rawBody,
|
|
856
|
-
});
|
|
857
|
-
case "timeout":
|
|
858
|
-
throw new errors.ZepTimeoutError("Timeout exceeded when calling PATCH /collections/{collectionName}/documents/batchUpdate.");
|
|
859
|
-
case "unknown":
|
|
860
|
-
throw new errors.ZepError({
|
|
861
|
-
message: _response.error.errorMessage,
|
|
862
|
-
});
|
|
863
|
-
}
|
|
864
|
-
});
|
|
865
|
-
}
|
|
866
|
-
/**
|
|
867
|
-
* Returns specified Document from a DocumentCollection.
|
|
868
|
-
*
|
|
869
|
-
* @param {string} collectionName - Name of the Document Collection
|
|
870
|
-
* @param {string} documentUuid - UUID of the Document to be updated
|
|
871
|
-
* @param {Document.RequestOptions} requestOptions - Request-specific configuration.
|
|
872
|
-
*
|
|
873
|
-
* @throws {@link Zep.BadRequestError}
|
|
874
|
-
* @throws {@link Zep.UnauthorizedError}
|
|
875
|
-
* @throws {@link Zep.InternalServerError}
|
|
876
|
-
*
|
|
877
|
-
* @example
|
|
878
|
-
* await client.document.getsADocumentFromADocumentCollectionByUuid("collectionName", "documentUUID")
|
|
879
|
-
*/
|
|
880
|
-
getsADocumentFromADocumentCollectionByUuid(collectionName, documentUuid, requestOptions) {
|
|
881
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
882
|
-
var _a, _b;
|
|
883
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
884
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}/documents/uuid/${encodeURIComponent(documentUuid)}`),
|
|
885
|
-
method: "GET",
|
|
886
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.21.0", "User-Agent": "zep-cloud/2.21.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
887
|
-
contentType: "application/json",
|
|
888
|
-
requestType: "json",
|
|
889
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
890
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
891
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
892
|
-
});
|
|
893
|
-
if (_response.ok) {
|
|
894
|
-
return serializers.ApidataDocument.parseOrThrow(_response.body, {
|
|
895
|
-
unrecognizedObjectKeys: "passthrough",
|
|
896
|
-
allowUnrecognizedUnionMembers: true,
|
|
897
|
-
allowUnrecognizedEnumValues: true,
|
|
898
|
-
skipValidation: true,
|
|
899
|
-
breadcrumbsPrefix: ["response"],
|
|
900
|
-
});
|
|
901
|
-
}
|
|
902
|
-
if (_response.error.reason === "status-code") {
|
|
903
|
-
switch (_response.error.statusCode) {
|
|
904
|
-
case 400:
|
|
905
|
-
throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
906
|
-
unrecognizedObjectKeys: "passthrough",
|
|
907
|
-
allowUnrecognizedUnionMembers: true,
|
|
908
|
-
allowUnrecognizedEnumValues: true,
|
|
909
|
-
skipValidation: true,
|
|
910
|
-
breadcrumbsPrefix: ["response"],
|
|
911
|
-
}));
|
|
912
|
-
case 401:
|
|
913
|
-
throw new Zep.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
914
|
-
unrecognizedObjectKeys: "passthrough",
|
|
915
|
-
allowUnrecognizedUnionMembers: true,
|
|
916
|
-
allowUnrecognizedEnumValues: true,
|
|
917
|
-
skipValidation: true,
|
|
918
|
-
breadcrumbsPrefix: ["response"],
|
|
919
|
-
}));
|
|
920
|
-
case 500:
|
|
921
|
-
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
922
|
-
unrecognizedObjectKeys: "passthrough",
|
|
923
|
-
allowUnrecognizedUnionMembers: true,
|
|
924
|
-
allowUnrecognizedEnumValues: true,
|
|
925
|
-
skipValidation: true,
|
|
926
|
-
breadcrumbsPrefix: ["response"],
|
|
927
|
-
}));
|
|
928
|
-
default:
|
|
929
|
-
throw new errors.ZepError({
|
|
930
|
-
statusCode: _response.error.statusCode,
|
|
931
|
-
body: _response.error.body,
|
|
932
|
-
});
|
|
933
|
-
}
|
|
934
|
-
}
|
|
935
|
-
switch (_response.error.reason) {
|
|
936
|
-
case "non-json":
|
|
937
|
-
throw new errors.ZepError({
|
|
938
|
-
statusCode: _response.error.statusCode,
|
|
939
|
-
body: _response.error.rawBody,
|
|
940
|
-
});
|
|
941
|
-
case "timeout":
|
|
942
|
-
throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /collections/{collectionName}/documents/uuid/{documentUUID}.");
|
|
943
|
-
case "unknown":
|
|
944
|
-
throw new errors.ZepError({
|
|
945
|
-
message: _response.error.errorMessage,
|
|
946
|
-
});
|
|
947
|
-
}
|
|
948
|
-
});
|
|
949
|
-
}
|
|
950
|
-
/**
|
|
951
|
-
* Delete specified Document from a DocumentCollection.
|
|
952
|
-
*
|
|
953
|
-
* @param {string} collectionName - Name of the Document Collection
|
|
954
|
-
* @param {string} documentUuid - UUID of the Document to be deleted
|
|
955
|
-
* @param {Document.RequestOptions} requestOptions - Request-specific configuration.
|
|
956
|
-
*
|
|
957
|
-
* @throws {@link Zep.BadRequestError}
|
|
958
|
-
* @throws {@link Zep.UnauthorizedError}
|
|
959
|
-
* @throws {@link Zep.NotFoundError}
|
|
960
|
-
* @throws {@link Zep.InternalServerError}
|
|
961
|
-
*
|
|
962
|
-
* @example
|
|
963
|
-
* await client.document.deleteDocument("collectionName", "documentUUID")
|
|
964
|
-
*/
|
|
965
|
-
deleteDocument(collectionName, documentUuid, requestOptions) {
|
|
966
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
967
|
-
var _a, _b;
|
|
968
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
969
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}/documents/uuid/${encodeURIComponent(documentUuid)}`),
|
|
970
|
-
method: "DELETE",
|
|
971
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.21.0", "User-Agent": "zep-cloud/2.21.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
972
|
-
contentType: "application/json",
|
|
973
|
-
requestType: "json",
|
|
974
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
975
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
976
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
977
|
-
});
|
|
978
|
-
if (_response.ok) {
|
|
979
|
-
return serializers.SuccessResponse.parseOrThrow(_response.body, {
|
|
980
|
-
unrecognizedObjectKeys: "passthrough",
|
|
981
|
-
allowUnrecognizedUnionMembers: true,
|
|
982
|
-
allowUnrecognizedEnumValues: true,
|
|
983
|
-
skipValidation: true,
|
|
984
|
-
breadcrumbsPrefix: ["response"],
|
|
985
|
-
});
|
|
986
|
-
}
|
|
987
|
-
if (_response.error.reason === "status-code") {
|
|
988
|
-
switch (_response.error.statusCode) {
|
|
989
|
-
case 400:
|
|
990
|
-
throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
991
|
-
unrecognizedObjectKeys: "passthrough",
|
|
992
|
-
allowUnrecognizedUnionMembers: true,
|
|
993
|
-
allowUnrecognizedEnumValues: true,
|
|
994
|
-
skipValidation: true,
|
|
995
|
-
breadcrumbsPrefix: ["response"],
|
|
996
|
-
}));
|
|
997
|
-
case 401:
|
|
998
|
-
throw new Zep.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
999
|
-
unrecognizedObjectKeys: "passthrough",
|
|
1000
|
-
allowUnrecognizedUnionMembers: true,
|
|
1001
|
-
allowUnrecognizedEnumValues: true,
|
|
1002
|
-
skipValidation: true,
|
|
1003
|
-
breadcrumbsPrefix: ["response"],
|
|
1004
|
-
}));
|
|
1005
|
-
case 404:
|
|
1006
|
-
throw new Zep.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1007
|
-
unrecognizedObjectKeys: "passthrough",
|
|
1008
|
-
allowUnrecognizedUnionMembers: true,
|
|
1009
|
-
allowUnrecognizedEnumValues: true,
|
|
1010
|
-
skipValidation: true,
|
|
1011
|
-
breadcrumbsPrefix: ["response"],
|
|
1012
|
-
}));
|
|
1013
|
-
case 500:
|
|
1014
|
-
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1015
|
-
unrecognizedObjectKeys: "passthrough",
|
|
1016
|
-
allowUnrecognizedUnionMembers: true,
|
|
1017
|
-
allowUnrecognizedEnumValues: true,
|
|
1018
|
-
skipValidation: true,
|
|
1019
|
-
breadcrumbsPrefix: ["response"],
|
|
1020
|
-
}));
|
|
1021
|
-
default:
|
|
1022
|
-
throw new errors.ZepError({
|
|
1023
|
-
statusCode: _response.error.statusCode,
|
|
1024
|
-
body: _response.error.body,
|
|
1025
|
-
});
|
|
1026
|
-
}
|
|
1027
|
-
}
|
|
1028
|
-
switch (_response.error.reason) {
|
|
1029
|
-
case "non-json":
|
|
1030
|
-
throw new errors.ZepError({
|
|
1031
|
-
statusCode: _response.error.statusCode,
|
|
1032
|
-
body: _response.error.rawBody,
|
|
1033
|
-
});
|
|
1034
|
-
case "timeout":
|
|
1035
|
-
throw new errors.ZepTimeoutError("Timeout exceeded when calling DELETE /collections/{collectionName}/documents/uuid/{documentUUID}.");
|
|
1036
|
-
case "unknown":
|
|
1037
|
-
throw new errors.ZepError({
|
|
1038
|
-
message: _response.error.errorMessage,
|
|
1039
|
-
});
|
|
1040
|
-
}
|
|
1041
|
-
});
|
|
1042
|
-
}
|
|
1043
|
-
/**
|
|
1044
|
-
* Updates a Document in a DocumentCollection by UUID
|
|
1045
|
-
*
|
|
1046
|
-
* @param {string} collectionName - Name of the Document Collection
|
|
1047
|
-
* @param {string} documentUuid - UUID of the Document to be updated
|
|
1048
|
-
* @param {Zep.UpdateDocumentRequest} request
|
|
1049
|
-
* @param {Document.RequestOptions} requestOptions - Request-specific configuration.
|
|
1050
|
-
*
|
|
1051
|
-
* @throws {@link Zep.BadRequestError}
|
|
1052
|
-
* @throws {@link Zep.UnauthorizedError}
|
|
1053
|
-
* @throws {@link Zep.NotFoundError}
|
|
1054
|
-
* @throws {@link Zep.InternalServerError}
|
|
1055
|
-
*
|
|
1056
|
-
* @example
|
|
1057
|
-
* await client.document.updatesADocument("collectionName", "documentUUID")
|
|
1058
|
-
*/
|
|
1059
|
-
updatesADocument(collectionName_1, documentUuid_1) {
|
|
1060
|
-
return __awaiter(this, arguments, void 0, function* (collectionName, documentUuid, request = {}, requestOptions) {
|
|
1061
|
-
var _a, _b;
|
|
1062
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1063
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}/documents/uuid/${encodeURIComponent(documentUuid)}`),
|
|
1064
|
-
method: "PATCH",
|
|
1065
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.21.0", "User-Agent": "zep-cloud/2.21.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1066
|
-
contentType: "application/json",
|
|
1067
|
-
requestType: "json",
|
|
1068
|
-
body: serializers.UpdateDocumentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
1069
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
1070
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
1071
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1072
|
-
});
|
|
1073
|
-
if (_response.ok) {
|
|
1074
|
-
return serializers.SuccessResponse.parseOrThrow(_response.body, {
|
|
1075
|
-
unrecognizedObjectKeys: "passthrough",
|
|
1076
|
-
allowUnrecognizedUnionMembers: true,
|
|
1077
|
-
allowUnrecognizedEnumValues: true,
|
|
1078
|
-
skipValidation: true,
|
|
1079
|
-
breadcrumbsPrefix: ["response"],
|
|
1080
|
-
});
|
|
1081
|
-
}
|
|
1082
|
-
if (_response.error.reason === "status-code") {
|
|
1083
|
-
switch (_response.error.statusCode) {
|
|
1084
|
-
case 400:
|
|
1085
|
-
throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1086
|
-
unrecognizedObjectKeys: "passthrough",
|
|
1087
|
-
allowUnrecognizedUnionMembers: true,
|
|
1088
|
-
allowUnrecognizedEnumValues: true,
|
|
1089
|
-
skipValidation: true,
|
|
1090
|
-
breadcrumbsPrefix: ["response"],
|
|
1091
|
-
}));
|
|
1092
|
-
case 401:
|
|
1093
|
-
throw new Zep.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1094
|
-
unrecognizedObjectKeys: "passthrough",
|
|
1095
|
-
allowUnrecognizedUnionMembers: true,
|
|
1096
|
-
allowUnrecognizedEnumValues: true,
|
|
1097
|
-
skipValidation: true,
|
|
1098
|
-
breadcrumbsPrefix: ["response"],
|
|
1099
|
-
}));
|
|
1100
|
-
case 404:
|
|
1101
|
-
throw new Zep.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1102
|
-
unrecognizedObjectKeys: "passthrough",
|
|
1103
|
-
allowUnrecognizedUnionMembers: true,
|
|
1104
|
-
allowUnrecognizedEnumValues: true,
|
|
1105
|
-
skipValidation: true,
|
|
1106
|
-
breadcrumbsPrefix: ["response"],
|
|
1107
|
-
}));
|
|
1108
|
-
case 500:
|
|
1109
|
-
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1110
|
-
unrecognizedObjectKeys: "passthrough",
|
|
1111
|
-
allowUnrecognizedUnionMembers: true,
|
|
1112
|
-
allowUnrecognizedEnumValues: true,
|
|
1113
|
-
skipValidation: true,
|
|
1114
|
-
breadcrumbsPrefix: ["response"],
|
|
1115
|
-
}));
|
|
1116
|
-
default:
|
|
1117
|
-
throw new errors.ZepError({
|
|
1118
|
-
statusCode: _response.error.statusCode,
|
|
1119
|
-
body: _response.error.body,
|
|
1120
|
-
});
|
|
1121
|
-
}
|
|
1122
|
-
}
|
|
1123
|
-
switch (_response.error.reason) {
|
|
1124
|
-
case "non-json":
|
|
1125
|
-
throw new errors.ZepError({
|
|
1126
|
-
statusCode: _response.error.statusCode,
|
|
1127
|
-
body: _response.error.rawBody,
|
|
1128
|
-
});
|
|
1129
|
-
case "timeout":
|
|
1130
|
-
throw new errors.ZepTimeoutError("Timeout exceeded when calling PATCH /collections/{collectionName}/documents/uuid/{documentUUID}.");
|
|
1131
|
-
case "unknown":
|
|
1132
|
-
throw new errors.ZepError({
|
|
1133
|
-
message: _response.error.errorMessage,
|
|
1134
|
-
});
|
|
1135
|
-
}
|
|
1136
|
-
});
|
|
1137
|
-
}
|
|
1138
|
-
/**
|
|
1139
|
-
* Searches over documents in a collection based on provided search criteria. One of text or metadata must be provided. Returns an empty list if no documents are found.
|
|
1140
|
-
*
|
|
1141
|
-
* @param {string} collectionName - Name of the Document Collection
|
|
1142
|
-
* @param {Zep.DocumentSearchPayload} request
|
|
1143
|
-
* @param {Document.RequestOptions} requestOptions - Request-specific configuration.
|
|
1144
|
-
*
|
|
1145
|
-
* @throws {@link Zep.BadRequestError}
|
|
1146
|
-
* @throws {@link Zep.UnauthorizedError}
|
|
1147
|
-
* @throws {@link Zep.InternalServerError}
|
|
1148
|
-
*
|
|
1149
|
-
* @example
|
|
1150
|
-
* await client.document.search("collectionName")
|
|
1151
|
-
*/
|
|
1152
|
-
search(collectionName_1) {
|
|
1153
|
-
return __awaiter(this, arguments, void 0, function* (collectionName, request = {}, requestOptions) {
|
|
1154
|
-
var _a, _b;
|
|
1155
|
-
const { limit } = request, _body = __rest(request, ["limit"]);
|
|
1156
|
-
const _queryParams = {};
|
|
1157
|
-
if (limit != null) {
|
|
1158
|
-
_queryParams["limit"] = limit.toString();
|
|
1159
|
-
}
|
|
1160
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1161
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `collections/${encodeURIComponent(collectionName)}/search`),
|
|
1162
|
-
method: "POST",
|
|
1163
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.21.0", "User-Agent": "zep-cloud/2.21.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1164
|
-
contentType: "application/json",
|
|
1165
|
-
queryParameters: _queryParams,
|
|
1166
|
-
requestType: "json",
|
|
1167
|
-
body: serializers.DocumentSearchPayload.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
1168
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
1169
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
1170
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1171
|
-
});
|
|
1172
|
-
if (_response.ok) {
|
|
1173
|
-
return serializers.ApidataDocumentSearchResponse.parseOrThrow(_response.body, {
|
|
1174
|
-
unrecognizedObjectKeys: "passthrough",
|
|
1175
|
-
allowUnrecognizedUnionMembers: true,
|
|
1176
|
-
allowUnrecognizedEnumValues: true,
|
|
1177
|
-
skipValidation: true,
|
|
1178
|
-
breadcrumbsPrefix: ["response"],
|
|
1179
|
-
});
|
|
1180
|
-
}
|
|
1181
|
-
if (_response.error.reason === "status-code") {
|
|
1182
|
-
switch (_response.error.statusCode) {
|
|
1183
|
-
case 400:
|
|
1184
|
-
throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1185
|
-
unrecognizedObjectKeys: "passthrough",
|
|
1186
|
-
allowUnrecognizedUnionMembers: true,
|
|
1187
|
-
allowUnrecognizedEnumValues: true,
|
|
1188
|
-
skipValidation: true,
|
|
1189
|
-
breadcrumbsPrefix: ["response"],
|
|
1190
|
-
}));
|
|
1191
|
-
case 401:
|
|
1192
|
-
throw new Zep.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1193
|
-
unrecognizedObjectKeys: "passthrough",
|
|
1194
|
-
allowUnrecognizedUnionMembers: true,
|
|
1195
|
-
allowUnrecognizedEnumValues: true,
|
|
1196
|
-
skipValidation: true,
|
|
1197
|
-
breadcrumbsPrefix: ["response"],
|
|
1198
|
-
}));
|
|
1199
|
-
case 500:
|
|
1200
|
-
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1201
|
-
unrecognizedObjectKeys: "passthrough",
|
|
1202
|
-
allowUnrecognizedUnionMembers: true,
|
|
1203
|
-
allowUnrecognizedEnumValues: true,
|
|
1204
|
-
skipValidation: true,
|
|
1205
|
-
breadcrumbsPrefix: ["response"],
|
|
1206
|
-
}));
|
|
1207
|
-
default:
|
|
1208
|
-
throw new errors.ZepError({
|
|
1209
|
-
statusCode: _response.error.statusCode,
|
|
1210
|
-
body: _response.error.body,
|
|
1211
|
-
});
|
|
1212
|
-
}
|
|
1213
|
-
}
|
|
1214
|
-
switch (_response.error.reason) {
|
|
1215
|
-
case "non-json":
|
|
1216
|
-
throw new errors.ZepError({
|
|
1217
|
-
statusCode: _response.error.statusCode,
|
|
1218
|
-
body: _response.error.rawBody,
|
|
1219
|
-
});
|
|
1220
|
-
case "timeout":
|
|
1221
|
-
throw new errors.ZepTimeoutError("Timeout exceeded when calling POST /collections/{collectionName}/search.");
|
|
1222
|
-
case "unknown":
|
|
1223
|
-
throw new errors.ZepError({
|
|
1224
|
-
message: _response.error.errorMessage,
|
|
1225
|
-
});
|
|
1226
|
-
}
|
|
1227
|
-
});
|
|
1228
|
-
}
|
|
1229
|
-
_getCustomAuthorizationHeaders() {
|
|
1230
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1231
|
-
var _a;
|
|
1232
|
-
const apiKeyValue = (_a = (yield core.Supplier.get(this._options.apiKey))) !== null && _a !== void 0 ? _a : process === null || process === void 0 ? void 0 : process.env["ZEP_API_KEY"];
|
|
1233
|
-
return { Authorization: `Api-Key ${apiKeyValue}` };
|
|
1234
|
-
});
|
|
1235
|
-
}
|
|
1236
|
-
}
|
|
1237
|
-
exports.Document = Document;
|