@getzep/zep-cloud 2.2.0 → 2.3.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/Client.d.ts +10 -5
- package/api/errors/BadRequestError.js +17 -7
- package/api/errors/ConflictError.js +17 -7
- package/api/errors/InternalServerError.js +17 -7
- package/api/errors/NotFoundError.js +17 -7
- package/api/errors/UnauthorizedError.js +17 -7
- package/api/resources/document/client/Client.d.ts +18 -13
- package/api/resources/document/client/Client.js +158 -141
- package/api/resources/graph/client/Client.d.ts +13 -8
- package/api/resources/graph/client/Client.js +50 -38
- package/api/resources/graph/resources/edge/client/Client.d.ts +9 -4
- package/api/resources/graph/resources/edge/client/Client.js +51 -37
- package/api/resources/graph/resources/episode/client/Client.d.ts +8 -3
- package/api/resources/graph/resources/episode/client/Client.js +46 -33
- package/api/resources/graph/resources/index.js +17 -7
- package/api/resources/graph/resources/node/client/Client.d.ts +8 -3
- package/api/resources/graph/resources/node/client/Client.js +43 -30
- package/api/resources/group/client/Client.d.ts +7 -2
- package/api/resources/group/client/Client.js +36 -24
- package/api/resources/index.js +17 -7
- package/api/resources/memory/client/Client.d.ts +28 -23
- package/api/resources/memory/client/Client.js +225 -195
- package/api/resources/memory/client/requests/AddMemoryRequest.d.ts +1 -1
- package/api/resources/user/client/Client.d.ts +12 -7
- package/api/resources/user/client/Client.js +82 -65
- package/api/types/GraphDataType.d.ts +1 -1
- package/api/types/GraphSearchScope.d.ts +1 -1
- package/api/types/Reranker.d.ts +1 -1
- package/api/types/RoleType.d.ts +1 -1
- package/api/types/SearchScope.d.ts +1 -1
- package/api/types/SearchType.d.ts +1 -1
- package/core/fetcher/APIResponse.d.ts +1 -1
- package/core/fetcher/Fetcher.d.ts +5 -2
- package/core/fetcher/Fetcher.js +18 -175
- package/core/fetcher/Supplier.d.ts +1 -1
- package/core/fetcher/createRequestUrl.d.ts +1 -0
- package/core/fetcher/createRequestUrl.js +12 -0
- package/core/fetcher/getFetchFn.d.ts +4 -0
- package/core/fetcher/getFetchFn.js +68 -0
- package/core/fetcher/getHeader.js +1 -2
- package/core/fetcher/getRequestBody.d.ts +7 -0
- package/core/fetcher/getRequestBody.js +22 -0
- package/core/fetcher/getResponseBody.d.ts +1 -0
- package/core/fetcher/getResponseBody.js +54 -0
- package/core/fetcher/makeRequest.d.ts +1 -0
- package/core/fetcher/makeRequest.js +42 -0
- package/core/fetcher/requestWithRetries.d.ts +1 -0
- package/core/fetcher/requestWithRetries.js +40 -0
- package/core/fetcher/signals.d.ts +11 -0
- package/core/fetcher/signals.js +36 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +21 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +126 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +59 -0
- package/core/index.js +17 -7
- package/core/runtime/runtime.d.ts +2 -1
- package/core/runtime/runtime.js +12 -1
- package/core/schemas/Schema.d.ts +13 -9
- package/core/schemas/Schema.js +1 -0
- package/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/core/schemas/builders/bigint/bigint.js +49 -0
- package/core/schemas/builders/bigint/index.d.ts +1 -0
- package/core/schemas/builders/bigint/index.js +5 -0
- package/core/schemas/builders/date/date.js +1 -2
- package/core/schemas/builders/enum/enum.js +1 -2
- package/core/schemas/builders/index.d.ts +1 -0
- package/core/schemas/builders/index.js +1 -0
- package/core/schemas/builders/lazy/lazy.d.ts +2 -2
- package/core/schemas/builders/lazy/lazy.js +11 -23
- package/core/schemas/builders/lazy/lazyObject.js +2 -12
- package/core/schemas/builders/list/list.js +32 -46
- package/core/schemas/builders/literals/booleanLiteral.js +1 -2
- package/core/schemas/builders/literals/stringLiteral.js +1 -2
- package/core/schemas/builders/object/object.d.ts +1 -1
- package/core/schemas/builders/object/object.js +120 -114
- package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
- package/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
- package/core/schemas/builders/object/property.js +2 -3
- package/core/schemas/builders/object/types.d.ts +18 -13
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +5 -15
- package/core/schemas/builders/object-like/types.d.ts +1 -1
- package/core/schemas/builders/record/record.js +50 -62
- package/core/schemas/builders/record/types.d.ts +2 -2
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +21 -25
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
- package/core/schemas/builders/set/set.js +7 -17
- package/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +22 -34
- package/core/schemas/builders/union/discriminant.js +1 -2
- package/core/schemas/builders/union/types.d.ts +6 -6
- package/core/schemas/builders/union/union.d.ts +1 -1
- package/core/schemas/builders/union/union.js +52 -64
- package/core/schemas/utils/MaybePromise.d.ts +1 -1
- package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +3 -3
- package/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
- package/core/schemas/utils/entries.d.ts +1 -1
- package/core/schemas/utils/entries.js +1 -2
- package/core/schemas/utils/filterObject.d.ts +1 -1
- package/core/schemas/utils/filterObject.js +1 -2
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +5 -2
- package/core/schemas/utils/isPlainObject.js +1 -2
- package/core/schemas/utils/keys.d.ts +1 -1
- package/core/schemas/utils/keys.js +1 -2
- package/core/schemas/utils/maybeSkipValidation.js +4 -14
- package/core/schemas/utils/partition.js +1 -2
- package/dist/Client.d.ts +10 -5
- package/dist/api/errors/BadRequestError.js +17 -7
- package/dist/api/errors/ConflictError.js +17 -7
- package/dist/api/errors/InternalServerError.js +17 -7
- package/dist/api/errors/NotFoundError.js +17 -7
- package/dist/api/errors/UnauthorizedError.js +17 -7
- package/dist/api/resources/document/client/Client.d.ts +18 -13
- package/dist/api/resources/document/client/Client.js +158 -141
- package/dist/api/resources/graph/client/Client.d.ts +13 -8
- package/dist/api/resources/graph/client/Client.js +50 -38
- package/dist/api/resources/graph/resources/edge/client/Client.d.ts +9 -4
- package/dist/api/resources/graph/resources/edge/client/Client.js +51 -37
- package/dist/api/resources/graph/resources/episode/client/Client.d.ts +8 -3
- package/dist/api/resources/graph/resources/episode/client/Client.js +46 -33
- package/dist/api/resources/graph/resources/index.js +17 -7
- package/dist/api/resources/graph/resources/node/client/Client.d.ts +8 -3
- package/dist/api/resources/graph/resources/node/client/Client.js +43 -30
- package/dist/api/resources/group/client/Client.d.ts +7 -2
- package/dist/api/resources/group/client/Client.js +36 -24
- package/dist/api/resources/index.js +17 -7
- package/dist/api/resources/memory/client/Client.d.ts +28 -23
- package/dist/api/resources/memory/client/Client.js +225 -195
- package/dist/api/resources/memory/client/requests/AddMemoryRequest.d.ts +1 -1
- package/dist/api/resources/user/client/Client.d.ts +12 -7
- package/dist/api/resources/user/client/Client.js +82 -65
- package/dist/api/types/GraphDataType.d.ts +1 -1
- package/dist/api/types/GraphSearchScope.d.ts +1 -1
- package/dist/api/types/Reranker.d.ts +1 -1
- package/dist/api/types/RoleType.d.ts +1 -1
- package/dist/api/types/SearchScope.d.ts +1 -1
- package/dist/api/types/SearchType.d.ts +1 -1
- package/dist/core/fetcher/APIResponse.d.ts +1 -1
- package/dist/core/fetcher/Fetcher.d.ts +5 -2
- package/dist/core/fetcher/Fetcher.js +18 -175
- package/dist/core/fetcher/Supplier.d.ts +1 -1
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/core/fetcher/createRequestUrl.js +12 -0
- package/dist/core/fetcher/getFetchFn.d.ts +4 -0
- package/dist/core/fetcher/getFetchFn.js +68 -0
- package/dist/core/fetcher/getHeader.js +1 -2
- package/dist/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/core/fetcher/getRequestBody.js +22 -0
- package/dist/core/fetcher/getResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getResponseBody.js +54 -0
- package/dist/core/fetcher/makeRequest.d.ts +1 -0
- package/dist/core/fetcher/makeRequest.js +42 -0
- package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
- package/dist/core/fetcher/requestWithRetries.js +40 -0
- package/dist/core/fetcher/signals.d.ts +11 -0
- package/dist/core/fetcher/signals.js +36 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +21 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +126 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +59 -0
- package/dist/core/index.js +17 -7
- package/dist/core/runtime/runtime.d.ts +2 -1
- package/dist/core/runtime/runtime.js +12 -1
- package/dist/core/schemas/Schema.d.ts +13 -9
- package/dist/core/schemas/Schema.js +1 -0
- package/dist/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/dist/core/schemas/builders/bigint/bigint.js +49 -0
- package/dist/core/schemas/builders/bigint/index.d.ts +1 -0
- package/dist/core/schemas/builders/bigint/index.js +5 -0
- package/dist/core/schemas/builders/date/date.js +1 -2
- package/dist/core/schemas/builders/enum/enum.js +1 -2
- package/dist/core/schemas/builders/index.d.ts +1 -0
- package/dist/core/schemas/builders/index.js +1 -0
- package/dist/core/schemas/builders/lazy/lazy.d.ts +2 -2
- package/dist/core/schemas/builders/lazy/lazy.js +11 -23
- package/dist/core/schemas/builders/lazy/lazyObject.js +2 -12
- package/dist/core/schemas/builders/list/list.js +32 -46
- package/dist/core/schemas/builders/literals/booleanLiteral.js +1 -2
- package/dist/core/schemas/builders/literals/stringLiteral.js +1 -2
- package/dist/core/schemas/builders/object/object.d.ts +1 -1
- package/dist/core/schemas/builders/object/object.js +120 -114
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
- package/dist/core/schemas/builders/object/property.js +2 -3
- package/dist/core/schemas/builders/object/types.d.ts +18 -13
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +5 -15
- package/dist/core/schemas/builders/object-like/types.d.ts +1 -1
- package/dist/core/schemas/builders/record/record.js +50 -62
- package/dist/core/schemas/builders/record/types.d.ts +2 -2
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +21 -25
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
- package/dist/core/schemas/builders/set/set.js +7 -17
- package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +22 -34
- package/dist/core/schemas/builders/union/discriminant.js +1 -2
- package/dist/core/schemas/builders/union/types.d.ts +6 -6
- package/dist/core/schemas/builders/union/union.d.ts +1 -1
- package/dist/core/schemas/builders/union/union.js +52 -64
- package/dist/core/schemas/utils/MaybePromise.d.ts +1 -1
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +3 -3
- package/dist/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
- package/dist/core/schemas/utils/entries.d.ts +1 -1
- package/dist/core/schemas/utils/entries.js +1 -2
- package/dist/core/schemas/utils/filterObject.d.ts +1 -1
- package/dist/core/schemas/utils/filterObject.js +1 -2
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +5 -2
- package/dist/core/schemas/utils/isPlainObject.js +1 -2
- package/dist/core/schemas/utils/keys.d.ts +1 -1
- package/dist/core/schemas/utils/keys.js +1 -2
- package/dist/core/schemas/utils/maybeSkipValidation.js +4 -14
- package/dist/core/schemas/utils/partition.js +1 -2
- package/dist/environments.d.ts +1 -1
- package/dist/errors/ZepTimeoutError.d.ts +1 -1
- package/dist/errors/ZepTimeoutError.js +2 -2
- package/dist/extractor/base.js +1 -1
- package/dist/extractor/index.d.ts +2 -2
- package/dist/index.js +17 -7
- package/dist/serialization/resources/document/client/addDocuments.js +17 -7
- package/dist/serialization/resources/document/client/batchDeleteDocuments.js +17 -7
- package/dist/serialization/resources/document/client/batchGetDocuments.js +17 -7
- package/dist/serialization/resources/document/client/batchUpdateDocuments.js +17 -7
- package/dist/serialization/resources/document/client/index.js +17 -7
- package/dist/serialization/resources/document/client/listCollections.js +17 -7
- package/dist/serialization/resources/document/client/requests/CreateDocumentCollectionRequest.js +17 -7
- package/dist/serialization/resources/document/client/requests/DocumentSearchPayload.js +17 -7
- package/dist/serialization/resources/document/client/requests/GetDocumentListRequest.js +17 -7
- package/dist/serialization/resources/document/client/requests/UpdateDocumentCollectionRequest.js +17 -7
- package/dist/serialization/resources/document/client/requests/UpdateDocumentRequest.js +17 -7
- package/dist/serialization/resources/graph/client/requests/AddDataRequest.js +17 -7
- package/dist/serialization/resources/graph/client/requests/GraphSearchQuery.js +17 -7
- package/dist/serialization/resources/graph/resources/edge/client/getByGroupId.js +17 -7
- package/dist/serialization/resources/graph/resources/edge/client/getByUserId.js +17 -7
- package/dist/serialization/resources/graph/resources/edge/client/index.js +17 -7
- package/dist/serialization/resources/graph/resources/index.js +17 -7
- package/dist/serialization/resources/graph/resources/node/client/getByGroupId.js +17 -7
- package/dist/serialization/resources/graph/resources/node/client/getByUserId.js +17 -7
- package/dist/serialization/resources/graph/resources/node/client/index.js +17 -7
- package/dist/serialization/resources/group/client/requests/CreateGroupRequest.js +17 -7
- package/dist/serialization/resources/index.js +17 -7
- package/dist/serialization/resources/memory/client/extractData.js +17 -7
- package/dist/serialization/resources/memory/client/index.js +17 -7
- package/dist/serialization/resources/memory/client/requests/AddFactsRequest.js +17 -7
- package/dist/serialization/resources/memory/client/requests/AddMemoryRequest.js +17 -7
- package/dist/serialization/resources/memory/client/requests/CreateSessionRequest.js +17 -7
- package/dist/serialization/resources/memory/client/requests/EndSessionRequest.js +17 -7
- package/dist/serialization/resources/memory/client/requests/EndSessionsRequest.js +17 -7
- package/dist/serialization/resources/memory/client/requests/ExtractDataRequest.js +17 -7
- package/dist/serialization/resources/memory/client/requests/MemorySearchPayload.js +17 -7
- package/dist/serialization/resources/memory/client/requests/ModelsMessageMetadataUpdate.js +17 -7
- package/dist/serialization/resources/memory/client/requests/SessionSearchQuery.js +17 -7
- package/dist/serialization/resources/memory/client/requests/UpdateSessionRequest.js +17 -7
- package/dist/serialization/resources/memory/client/search.js +17 -7
- package/dist/serialization/resources/user/client/getSessions.js +17 -7
- package/dist/serialization/resources/user/client/index.js +17 -7
- package/dist/serialization/resources/user/client/requests/CreateUserRequest.js +17 -7
- package/dist/serialization/resources/user/client/requests/UpdateUserRequest.js +17 -7
- package/dist/serialization/types/AddMemoryResponse.js +17 -7
- package/dist/serialization/types/ApiError.js +17 -7
- package/dist/serialization/types/ApidataDocument.js +17 -7
- package/dist/serialization/types/ApidataDocumentCollection.js +17 -7
- package/dist/serialization/types/ApidataDocumentSearchResponse.js +17 -7
- package/dist/serialization/types/ApidataDocumentWithScore.js +17 -7
- package/dist/serialization/types/ApidataFactRatingExamples.js +17 -7
- package/dist/serialization/types/ApidataFactRatingInstruction.js +17 -7
- package/dist/serialization/types/ClassifySessionRequest.js +17 -7
- package/dist/serialization/types/CreateDocumentRequest.js +17 -7
- package/dist/serialization/types/EndSessionResponse.js +17 -7
- package/dist/serialization/types/EndSessionsResponse.js +17 -7
- package/dist/serialization/types/EntityEdge.js +17 -7
- package/dist/serialization/types/EntityNode.js +17 -7
- package/dist/serialization/types/Episode.js +17 -7
- package/dist/serialization/types/EpisodeResponse.js +17 -7
- package/dist/serialization/types/Fact.js +17 -7
- package/dist/serialization/types/FactRatingExamples.js +17 -7
- package/dist/serialization/types/FactRatingInstruction.js +17 -7
- package/dist/serialization/types/FactResponse.js +17 -7
- package/dist/serialization/types/FactsResponse.js +17 -7
- package/dist/serialization/types/GraphDataType.js +17 -7
- package/dist/serialization/types/GraphSearchResults.js +17 -7
- package/dist/serialization/types/GraphSearchScope.js +17 -7
- package/dist/serialization/types/Group.js +17 -7
- package/dist/serialization/types/Memory.js +17 -7
- package/dist/serialization/types/MemorySearchResult.js +17 -7
- package/dist/serialization/types/Message.js +17 -7
- package/dist/serialization/types/MessageListResponse.js +17 -7
- package/dist/serialization/types/NewFact.js +17 -7
- package/dist/serialization/types/Question.js +17 -7
- package/dist/serialization/types/Reranker.js +17 -7
- package/dist/serialization/types/RoleType.js +17 -7
- package/dist/serialization/types/SearchScope.js +17 -7
- package/dist/serialization/types/SearchType.js +17 -7
- package/dist/serialization/types/Session.js +17 -7
- package/dist/serialization/types/SessionClassification.js +17 -7
- package/dist/serialization/types/SessionListResponse.js +17 -7
- package/dist/serialization/types/SessionSearchResponse.js +17 -7
- package/dist/serialization/types/SessionSearchResult.js +17 -7
- package/dist/serialization/types/SuccessResponse.js +17 -7
- package/dist/serialization/types/Summary.js +17 -7
- package/dist/serialization/types/SummaryListResponse.js +17 -7
- package/dist/serialization/types/UpdateDocumentListRequest.js +17 -7
- package/dist/serialization/types/User.js +17 -7
- package/dist/serialization/types/UserListResponse.js +17 -7
- package/dist/version.d.ts +1 -0
- package/dist/version.js +4 -0
- package/environments.d.ts +1 -1
- package/errors/ZepTimeoutError.d.ts +1 -1
- package/errors/ZepTimeoutError.js +2 -2
- package/extractor/base.js +1 -1
- package/extractor/index.d.ts +2 -2
- package/index.js +17 -7
- package/{jest.config.js → jest.config.mjs} +4 -1
- package/package.json +25 -16
- package/reference.md +3801 -0
- package/scripts/rename-to-esm-files.js +115 -0
- package/serialization/resources/document/client/addDocuments.js +17 -7
- package/serialization/resources/document/client/batchDeleteDocuments.js +17 -7
- package/serialization/resources/document/client/batchGetDocuments.js +17 -7
- package/serialization/resources/document/client/batchUpdateDocuments.js +17 -7
- package/serialization/resources/document/client/index.js +17 -7
- package/serialization/resources/document/client/listCollections.js +17 -7
- package/serialization/resources/document/client/requests/CreateDocumentCollectionRequest.js +17 -7
- package/serialization/resources/document/client/requests/DocumentSearchPayload.js +17 -7
- package/serialization/resources/document/client/requests/GetDocumentListRequest.js +17 -7
- package/serialization/resources/document/client/requests/UpdateDocumentCollectionRequest.js +17 -7
- package/serialization/resources/document/client/requests/UpdateDocumentRequest.js +17 -7
- package/serialization/resources/graph/client/requests/AddDataRequest.js +17 -7
- package/serialization/resources/graph/client/requests/GraphSearchQuery.js +17 -7
- package/serialization/resources/graph/resources/edge/client/getByGroupId.js +17 -7
- package/serialization/resources/graph/resources/edge/client/getByUserId.js +17 -7
- package/serialization/resources/graph/resources/edge/client/index.js +17 -7
- package/serialization/resources/graph/resources/index.js +17 -7
- package/serialization/resources/graph/resources/node/client/getByGroupId.js +17 -7
- package/serialization/resources/graph/resources/node/client/getByUserId.js +17 -7
- package/serialization/resources/graph/resources/node/client/index.js +17 -7
- package/serialization/resources/group/client/requests/CreateGroupRequest.js +17 -7
- package/serialization/resources/index.js +17 -7
- package/serialization/resources/memory/client/extractData.js +17 -7
- package/serialization/resources/memory/client/index.js +17 -7
- package/serialization/resources/memory/client/requests/AddFactsRequest.js +17 -7
- package/serialization/resources/memory/client/requests/AddMemoryRequest.js +17 -7
- package/serialization/resources/memory/client/requests/CreateSessionRequest.js +17 -7
- package/serialization/resources/memory/client/requests/EndSessionRequest.js +17 -7
- package/serialization/resources/memory/client/requests/EndSessionsRequest.js +17 -7
- package/serialization/resources/memory/client/requests/ExtractDataRequest.js +17 -7
- package/serialization/resources/memory/client/requests/MemorySearchPayload.js +17 -7
- package/serialization/resources/memory/client/requests/ModelsMessageMetadataUpdate.js +17 -7
- package/serialization/resources/memory/client/requests/SessionSearchQuery.js +17 -7
- package/serialization/resources/memory/client/requests/UpdateSessionRequest.js +17 -7
- package/serialization/resources/memory/client/search.js +17 -7
- package/serialization/resources/user/client/getSessions.js +17 -7
- package/serialization/resources/user/client/index.js +17 -7
- package/serialization/resources/user/client/requests/CreateUserRequest.js +17 -7
- package/serialization/resources/user/client/requests/UpdateUserRequest.js +17 -7
- package/serialization/types/AddMemoryResponse.js +17 -7
- package/serialization/types/ApiError.js +17 -7
- package/serialization/types/ApidataDocument.js +17 -7
- package/serialization/types/ApidataDocumentCollection.js +17 -7
- package/serialization/types/ApidataDocumentSearchResponse.js +17 -7
- package/serialization/types/ApidataDocumentWithScore.js +17 -7
- package/serialization/types/ApidataFactRatingExamples.js +17 -7
- package/serialization/types/ApidataFactRatingInstruction.js +17 -7
- package/serialization/types/ClassifySessionRequest.js +17 -7
- package/serialization/types/CreateDocumentRequest.js +17 -7
- package/serialization/types/EndSessionResponse.js +17 -7
- package/serialization/types/EndSessionsResponse.js +17 -7
- package/serialization/types/EntityEdge.js +17 -7
- package/serialization/types/EntityNode.js +17 -7
- package/serialization/types/Episode.js +17 -7
- package/serialization/types/EpisodeResponse.js +17 -7
- package/serialization/types/Fact.js +17 -7
- package/serialization/types/FactRatingExamples.js +17 -7
- package/serialization/types/FactRatingInstruction.js +17 -7
- package/serialization/types/FactResponse.js +17 -7
- package/serialization/types/FactsResponse.js +17 -7
- package/serialization/types/GraphDataType.js +17 -7
- package/serialization/types/GraphSearchResults.js +17 -7
- package/serialization/types/GraphSearchScope.js +17 -7
- package/serialization/types/Group.js +17 -7
- package/serialization/types/Memory.js +17 -7
- package/serialization/types/MemorySearchResult.js +17 -7
- package/serialization/types/Message.js +17 -7
- package/serialization/types/MessageListResponse.js +17 -7
- package/serialization/types/NewFact.js +17 -7
- package/serialization/types/Question.js +17 -7
- package/serialization/types/Reranker.js +17 -7
- package/serialization/types/RoleType.js +17 -7
- package/serialization/types/SearchScope.js +17 -7
- package/serialization/types/SearchType.js +17 -7
- package/serialization/types/Session.js +17 -7
- package/serialization/types/SessionClassification.js +17 -7
- package/serialization/types/SessionListResponse.js +17 -7
- package/serialization/types/SessionSearchResponse.js +17 -7
- package/serialization/types/SessionSearchResult.js +17 -7
- package/serialization/types/SuccessResponse.js +17 -7
- package/serialization/types/Summary.js +17 -7
- package/serialization/types/SummaryListResponse.js +17 -7
- package/serialization/types/UpdateDocumentListRequest.js +17 -7
- package/serialization/types/User.js +17 -7
- package/serialization/types/UserListResponse.js +17 -7
- package/version.d.ts +1 -0
- package/version.js +4 -0
|
@@ -11,9 +11,14 @@ export declare namespace User {
|
|
|
11
11
|
fetcher?: core.FetchFunction;
|
|
12
12
|
}
|
|
13
13
|
interface RequestOptions {
|
|
14
|
+
/** The maximum time to wait for a response in seconds. */
|
|
14
15
|
timeoutInSeconds?: number;
|
|
16
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
15
17
|
maxRetries?: number;
|
|
18
|
+
/** A hook to abort the request. */
|
|
16
19
|
abortSignal?: AbortSignal;
|
|
20
|
+
/** Additional headers to include in the request. */
|
|
21
|
+
headers?: Record<string, string>;
|
|
17
22
|
}
|
|
18
23
|
}
|
|
19
24
|
export declare class User {
|
|
@@ -29,7 +34,7 @@ export declare class User {
|
|
|
29
34
|
* @throws {@link Zep.InternalServerError}
|
|
30
35
|
*
|
|
31
36
|
* @example
|
|
32
|
-
* await
|
|
37
|
+
* await client.user.add()
|
|
33
38
|
*/
|
|
34
39
|
add(request?: Zep.CreateUserRequest, requestOptions?: User.RequestOptions): Promise<Zep.User>;
|
|
35
40
|
/**
|
|
@@ -42,7 +47,7 @@ export declare class User {
|
|
|
42
47
|
* @throws {@link Zep.InternalServerError}
|
|
43
48
|
*
|
|
44
49
|
* @example
|
|
45
|
-
* await
|
|
50
|
+
* await client.user.listOrdered()
|
|
46
51
|
*/
|
|
47
52
|
listOrdered(request?: Zep.UserListOrderedRequest, requestOptions?: User.RequestOptions): Promise<Zep.UserListResponse>;
|
|
48
53
|
/**
|
|
@@ -55,7 +60,7 @@ export declare class User {
|
|
|
55
60
|
* @throws {@link Zep.InternalServerError}
|
|
56
61
|
*
|
|
57
62
|
* @example
|
|
58
|
-
* await
|
|
63
|
+
* await client.user.get("userId")
|
|
59
64
|
*/
|
|
60
65
|
get(userId: string, requestOptions?: User.RequestOptions): Promise<Zep.User>;
|
|
61
66
|
/**
|
|
@@ -68,7 +73,7 @@ export declare class User {
|
|
|
68
73
|
* @throws {@link Zep.InternalServerError}
|
|
69
74
|
*
|
|
70
75
|
* @example
|
|
71
|
-
* await
|
|
76
|
+
* await client.user.delete("userId")
|
|
72
77
|
*/
|
|
73
78
|
delete(userId: string, requestOptions?: User.RequestOptions): Promise<Zep.SuccessResponse>;
|
|
74
79
|
/**
|
|
@@ -83,7 +88,7 @@ export declare class User {
|
|
|
83
88
|
* @throws {@link Zep.InternalServerError}
|
|
84
89
|
*
|
|
85
90
|
* @example
|
|
86
|
-
* await
|
|
91
|
+
* await client.user.update("userId")
|
|
87
92
|
*/
|
|
88
93
|
update(userId: string, request?: Zep.UpdateUserRequest, requestOptions?: User.RequestOptions): Promise<Zep.User>;
|
|
89
94
|
/**
|
|
@@ -96,7 +101,7 @@ export declare class User {
|
|
|
96
101
|
* @throws {@link Zep.InternalServerError}
|
|
97
102
|
*
|
|
98
103
|
* @example
|
|
99
|
-
* await
|
|
104
|
+
* await client.user.getFacts("userId")
|
|
100
105
|
*/
|
|
101
106
|
getFacts(userId: string, requestOptions?: User.RequestOptions): Promise<Zep.FactsResponse>;
|
|
102
107
|
/**
|
|
@@ -108,7 +113,7 @@ export declare class User {
|
|
|
108
113
|
* @throws {@link Zep.InternalServerError}
|
|
109
114
|
*
|
|
110
115
|
* @example
|
|
111
|
-
* await
|
|
116
|
+
* await client.user.getSessions("userId")
|
|
112
117
|
*/
|
|
113
118
|
getSessions(userId: string, requestOptions?: User.RequestOptions): Promise<Zep.Session[]>;
|
|
114
119
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
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
|
+
})();
|
|
28
38
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
39
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
40
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -59,23 +69,24 @@ class User {
|
|
|
59
69
|
* @throws {@link Zep.InternalServerError}
|
|
60
70
|
*
|
|
61
71
|
* @example
|
|
62
|
-
* await
|
|
72
|
+
* await client.user.add()
|
|
63
73
|
*/
|
|
64
|
-
add(
|
|
65
|
-
|
|
66
|
-
|
|
74
|
+
add() {
|
|
75
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
76
|
+
var _a, _b;
|
|
67
77
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
68
78
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "users"),
|
|
69
79
|
method: "POST",
|
|
70
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
80
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.3.0", "User-Agent": "zep-cloud/2.3.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),
|
|
71
81
|
contentType: "application/json",
|
|
72
|
-
|
|
82
|
+
requestType: "json",
|
|
83
|
+
body: serializers.CreateUserRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
73
84
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
74
85
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
75
86
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
76
87
|
});
|
|
77
88
|
if (_response.ok) {
|
|
78
|
-
return
|
|
89
|
+
return serializers.User.parseOrThrow(_response.body, {
|
|
79
90
|
unrecognizedObjectKeys: "passthrough",
|
|
80
91
|
allowUnrecognizedUnionMembers: true,
|
|
81
92
|
allowUnrecognizedEnumValues: true,
|
|
@@ -86,7 +97,7 @@ class User {
|
|
|
86
97
|
if (_response.error.reason === "status-code") {
|
|
87
98
|
switch (_response.error.statusCode) {
|
|
88
99
|
case 400:
|
|
89
|
-
throw new Zep.BadRequestError(
|
|
100
|
+
throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
90
101
|
unrecognizedObjectKeys: "passthrough",
|
|
91
102
|
allowUnrecognizedUnionMembers: true,
|
|
92
103
|
allowUnrecognizedEnumValues: true,
|
|
@@ -94,7 +105,7 @@ class User {
|
|
|
94
105
|
breadcrumbsPrefix: ["response"],
|
|
95
106
|
}));
|
|
96
107
|
case 500:
|
|
97
|
-
throw new Zep.InternalServerError(
|
|
108
|
+
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
98
109
|
unrecognizedObjectKeys: "passthrough",
|
|
99
110
|
allowUnrecognizedUnionMembers: true,
|
|
100
111
|
allowUnrecognizedEnumValues: true,
|
|
@@ -115,7 +126,7 @@ class User {
|
|
|
115
126
|
body: _response.error.rawBody,
|
|
116
127
|
});
|
|
117
128
|
case "timeout":
|
|
118
|
-
throw new errors.ZepTimeoutError();
|
|
129
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling POST /users.");
|
|
119
130
|
case "unknown":
|
|
120
131
|
throw new errors.ZepError({
|
|
121
132
|
message: _response.error.errorMessage,
|
|
@@ -133,11 +144,11 @@ class User {
|
|
|
133
144
|
* @throws {@link Zep.InternalServerError}
|
|
134
145
|
*
|
|
135
146
|
* @example
|
|
136
|
-
* await
|
|
147
|
+
* await client.user.listOrdered()
|
|
137
148
|
*/
|
|
138
|
-
listOrdered(
|
|
139
|
-
|
|
140
|
-
|
|
149
|
+
listOrdered() {
|
|
150
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
151
|
+
var _a, _b;
|
|
141
152
|
const { pageNumber, pageSize } = request;
|
|
142
153
|
const _queryParams = {};
|
|
143
154
|
if (pageNumber != null) {
|
|
@@ -149,15 +160,16 @@ class User {
|
|
|
149
160
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
150
161
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "users-ordered"),
|
|
151
162
|
method: "GET",
|
|
152
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
163
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.3.0", "User-Agent": "zep-cloud/2.3.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),
|
|
153
164
|
contentType: "application/json",
|
|
154
165
|
queryParameters: _queryParams,
|
|
166
|
+
requestType: "json",
|
|
155
167
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
156
168
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
157
169
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
158
170
|
});
|
|
159
171
|
if (_response.ok) {
|
|
160
|
-
return
|
|
172
|
+
return serializers.UserListResponse.parseOrThrow(_response.body, {
|
|
161
173
|
unrecognizedObjectKeys: "passthrough",
|
|
162
174
|
allowUnrecognizedUnionMembers: true,
|
|
163
175
|
allowUnrecognizedEnumValues: true,
|
|
@@ -168,7 +180,7 @@ class User {
|
|
|
168
180
|
if (_response.error.reason === "status-code") {
|
|
169
181
|
switch (_response.error.statusCode) {
|
|
170
182
|
case 400:
|
|
171
|
-
throw new Zep.BadRequestError(
|
|
183
|
+
throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
172
184
|
unrecognizedObjectKeys: "passthrough",
|
|
173
185
|
allowUnrecognizedUnionMembers: true,
|
|
174
186
|
allowUnrecognizedEnumValues: true,
|
|
@@ -176,7 +188,7 @@ class User {
|
|
|
176
188
|
breadcrumbsPrefix: ["response"],
|
|
177
189
|
}));
|
|
178
190
|
case 500:
|
|
179
|
-
throw new Zep.InternalServerError(
|
|
191
|
+
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
180
192
|
unrecognizedObjectKeys: "passthrough",
|
|
181
193
|
allowUnrecognizedUnionMembers: true,
|
|
182
194
|
allowUnrecognizedEnumValues: true,
|
|
@@ -197,7 +209,7 @@ class User {
|
|
|
197
209
|
body: _response.error.rawBody,
|
|
198
210
|
});
|
|
199
211
|
case "timeout":
|
|
200
|
-
throw new errors.ZepTimeoutError();
|
|
212
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /users-ordered.");
|
|
201
213
|
case "unknown":
|
|
202
214
|
throw new errors.ZepError({
|
|
203
215
|
message: _response.error.errorMessage,
|
|
@@ -215,22 +227,23 @@ class User {
|
|
|
215
227
|
* @throws {@link Zep.InternalServerError}
|
|
216
228
|
*
|
|
217
229
|
* @example
|
|
218
|
-
* await
|
|
230
|
+
* await client.user.get("userId")
|
|
219
231
|
*/
|
|
220
232
|
get(userId, requestOptions) {
|
|
221
|
-
var _a, _b;
|
|
222
233
|
return __awaiter(this, void 0, void 0, function* () {
|
|
234
|
+
var _a, _b;
|
|
223
235
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
224
236
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `users/${encodeURIComponent(userId)}`),
|
|
225
237
|
method: "GET",
|
|
226
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
238
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.3.0", "User-Agent": "zep-cloud/2.3.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),
|
|
227
239
|
contentType: "application/json",
|
|
240
|
+
requestType: "json",
|
|
228
241
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
229
242
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
230
243
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
231
244
|
});
|
|
232
245
|
if (_response.ok) {
|
|
233
|
-
return
|
|
246
|
+
return serializers.User.parseOrThrow(_response.body, {
|
|
234
247
|
unrecognizedObjectKeys: "passthrough",
|
|
235
248
|
allowUnrecognizedUnionMembers: true,
|
|
236
249
|
allowUnrecognizedEnumValues: true,
|
|
@@ -241,7 +254,7 @@ class User {
|
|
|
241
254
|
if (_response.error.reason === "status-code") {
|
|
242
255
|
switch (_response.error.statusCode) {
|
|
243
256
|
case 404:
|
|
244
|
-
throw new Zep.NotFoundError(
|
|
257
|
+
throw new Zep.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
245
258
|
unrecognizedObjectKeys: "passthrough",
|
|
246
259
|
allowUnrecognizedUnionMembers: true,
|
|
247
260
|
allowUnrecognizedEnumValues: true,
|
|
@@ -249,7 +262,7 @@ class User {
|
|
|
249
262
|
breadcrumbsPrefix: ["response"],
|
|
250
263
|
}));
|
|
251
264
|
case 500:
|
|
252
|
-
throw new Zep.InternalServerError(
|
|
265
|
+
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
253
266
|
unrecognizedObjectKeys: "passthrough",
|
|
254
267
|
allowUnrecognizedUnionMembers: true,
|
|
255
268
|
allowUnrecognizedEnumValues: true,
|
|
@@ -270,7 +283,7 @@ class User {
|
|
|
270
283
|
body: _response.error.rawBody,
|
|
271
284
|
});
|
|
272
285
|
case "timeout":
|
|
273
|
-
throw new errors.ZepTimeoutError();
|
|
286
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /users/{userId}.");
|
|
274
287
|
case "unknown":
|
|
275
288
|
throw new errors.ZepError({
|
|
276
289
|
message: _response.error.errorMessage,
|
|
@@ -288,22 +301,23 @@ class User {
|
|
|
288
301
|
* @throws {@link Zep.InternalServerError}
|
|
289
302
|
*
|
|
290
303
|
* @example
|
|
291
|
-
* await
|
|
304
|
+
* await client.user.delete("userId")
|
|
292
305
|
*/
|
|
293
306
|
delete(userId, requestOptions) {
|
|
294
|
-
var _a, _b;
|
|
295
307
|
return __awaiter(this, void 0, void 0, function* () {
|
|
308
|
+
var _a, _b;
|
|
296
309
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
297
310
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `users/${encodeURIComponent(userId)}`),
|
|
298
311
|
method: "DELETE",
|
|
299
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
312
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.3.0", "User-Agent": "zep-cloud/2.3.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),
|
|
300
313
|
contentType: "application/json",
|
|
314
|
+
requestType: "json",
|
|
301
315
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
302
316
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
303
317
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
304
318
|
});
|
|
305
319
|
if (_response.ok) {
|
|
306
|
-
return
|
|
320
|
+
return serializers.SuccessResponse.parseOrThrow(_response.body, {
|
|
307
321
|
unrecognizedObjectKeys: "passthrough",
|
|
308
322
|
allowUnrecognizedUnionMembers: true,
|
|
309
323
|
allowUnrecognizedEnumValues: true,
|
|
@@ -314,7 +328,7 @@ class User {
|
|
|
314
328
|
if (_response.error.reason === "status-code") {
|
|
315
329
|
switch (_response.error.statusCode) {
|
|
316
330
|
case 404:
|
|
317
|
-
throw new Zep.NotFoundError(
|
|
331
|
+
throw new Zep.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
318
332
|
unrecognizedObjectKeys: "passthrough",
|
|
319
333
|
allowUnrecognizedUnionMembers: true,
|
|
320
334
|
allowUnrecognizedEnumValues: true,
|
|
@@ -322,7 +336,7 @@ class User {
|
|
|
322
336
|
breadcrumbsPrefix: ["response"],
|
|
323
337
|
}));
|
|
324
338
|
case 500:
|
|
325
|
-
throw new Zep.InternalServerError(
|
|
339
|
+
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
326
340
|
unrecognizedObjectKeys: "passthrough",
|
|
327
341
|
allowUnrecognizedUnionMembers: true,
|
|
328
342
|
allowUnrecognizedEnumValues: true,
|
|
@@ -343,7 +357,7 @@ class User {
|
|
|
343
357
|
body: _response.error.rawBody,
|
|
344
358
|
});
|
|
345
359
|
case "timeout":
|
|
346
|
-
throw new errors.ZepTimeoutError();
|
|
360
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling DELETE /users/{userId}.");
|
|
347
361
|
case "unknown":
|
|
348
362
|
throw new errors.ZepError({
|
|
349
363
|
message: _response.error.errorMessage,
|
|
@@ -363,23 +377,24 @@ class User {
|
|
|
363
377
|
* @throws {@link Zep.InternalServerError}
|
|
364
378
|
*
|
|
365
379
|
* @example
|
|
366
|
-
* await
|
|
380
|
+
* await client.user.update("userId")
|
|
367
381
|
*/
|
|
368
|
-
update(
|
|
369
|
-
|
|
370
|
-
|
|
382
|
+
update(userId_1) {
|
|
383
|
+
return __awaiter(this, arguments, void 0, function* (userId, request = {}, requestOptions) {
|
|
384
|
+
var _a, _b;
|
|
371
385
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
372
386
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `users/${encodeURIComponent(userId)}`),
|
|
373
387
|
method: "PATCH",
|
|
374
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
388
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.3.0", "User-Agent": "zep-cloud/2.3.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),
|
|
375
389
|
contentType: "application/json",
|
|
376
|
-
|
|
390
|
+
requestType: "json",
|
|
391
|
+
body: serializers.UpdateUserRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
377
392
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
378
393
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
379
394
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
380
395
|
});
|
|
381
396
|
if (_response.ok) {
|
|
382
|
-
return
|
|
397
|
+
return serializers.User.parseOrThrow(_response.body, {
|
|
383
398
|
unrecognizedObjectKeys: "passthrough",
|
|
384
399
|
allowUnrecognizedUnionMembers: true,
|
|
385
400
|
allowUnrecognizedEnumValues: true,
|
|
@@ -390,7 +405,7 @@ class User {
|
|
|
390
405
|
if (_response.error.reason === "status-code") {
|
|
391
406
|
switch (_response.error.statusCode) {
|
|
392
407
|
case 400:
|
|
393
|
-
throw new Zep.BadRequestError(
|
|
408
|
+
throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
394
409
|
unrecognizedObjectKeys: "passthrough",
|
|
395
410
|
allowUnrecognizedUnionMembers: true,
|
|
396
411
|
allowUnrecognizedEnumValues: true,
|
|
@@ -398,7 +413,7 @@ class User {
|
|
|
398
413
|
breadcrumbsPrefix: ["response"],
|
|
399
414
|
}));
|
|
400
415
|
case 404:
|
|
401
|
-
throw new Zep.NotFoundError(
|
|
416
|
+
throw new Zep.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
402
417
|
unrecognizedObjectKeys: "passthrough",
|
|
403
418
|
allowUnrecognizedUnionMembers: true,
|
|
404
419
|
allowUnrecognizedEnumValues: true,
|
|
@@ -406,7 +421,7 @@ class User {
|
|
|
406
421
|
breadcrumbsPrefix: ["response"],
|
|
407
422
|
}));
|
|
408
423
|
case 500:
|
|
409
|
-
throw new Zep.InternalServerError(
|
|
424
|
+
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
410
425
|
unrecognizedObjectKeys: "passthrough",
|
|
411
426
|
allowUnrecognizedUnionMembers: true,
|
|
412
427
|
allowUnrecognizedEnumValues: true,
|
|
@@ -427,7 +442,7 @@ class User {
|
|
|
427
442
|
body: _response.error.rawBody,
|
|
428
443
|
});
|
|
429
444
|
case "timeout":
|
|
430
|
-
throw new errors.ZepTimeoutError();
|
|
445
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling PATCH /users/{userId}.");
|
|
431
446
|
case "unknown":
|
|
432
447
|
throw new errors.ZepError({
|
|
433
448
|
message: _response.error.errorMessage,
|
|
@@ -445,22 +460,23 @@ class User {
|
|
|
445
460
|
* @throws {@link Zep.InternalServerError}
|
|
446
461
|
*
|
|
447
462
|
* @example
|
|
448
|
-
* await
|
|
463
|
+
* await client.user.getFacts("userId")
|
|
449
464
|
*/
|
|
450
465
|
getFacts(userId, requestOptions) {
|
|
451
|
-
var _a, _b;
|
|
452
466
|
return __awaiter(this, void 0, void 0, function* () {
|
|
467
|
+
var _a, _b;
|
|
453
468
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
454
469
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `users/${encodeURIComponent(userId)}/facts`),
|
|
455
470
|
method: "GET",
|
|
456
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
471
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.3.0", "User-Agent": "zep-cloud/2.3.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),
|
|
457
472
|
contentType: "application/json",
|
|
473
|
+
requestType: "json",
|
|
458
474
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
459
475
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
460
476
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
461
477
|
});
|
|
462
478
|
if (_response.ok) {
|
|
463
|
-
return
|
|
479
|
+
return serializers.FactsResponse.parseOrThrow(_response.body, {
|
|
464
480
|
unrecognizedObjectKeys: "passthrough",
|
|
465
481
|
allowUnrecognizedUnionMembers: true,
|
|
466
482
|
allowUnrecognizedEnumValues: true,
|
|
@@ -471,7 +487,7 @@ class User {
|
|
|
471
487
|
if (_response.error.reason === "status-code") {
|
|
472
488
|
switch (_response.error.statusCode) {
|
|
473
489
|
case 404:
|
|
474
|
-
throw new Zep.NotFoundError(
|
|
490
|
+
throw new Zep.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
475
491
|
unrecognizedObjectKeys: "passthrough",
|
|
476
492
|
allowUnrecognizedUnionMembers: true,
|
|
477
493
|
allowUnrecognizedEnumValues: true,
|
|
@@ -479,7 +495,7 @@ class User {
|
|
|
479
495
|
breadcrumbsPrefix: ["response"],
|
|
480
496
|
}));
|
|
481
497
|
case 500:
|
|
482
|
-
throw new Zep.InternalServerError(
|
|
498
|
+
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
483
499
|
unrecognizedObjectKeys: "passthrough",
|
|
484
500
|
allowUnrecognizedUnionMembers: true,
|
|
485
501
|
allowUnrecognizedEnumValues: true,
|
|
@@ -500,7 +516,7 @@ class User {
|
|
|
500
516
|
body: _response.error.rawBody,
|
|
501
517
|
});
|
|
502
518
|
case "timeout":
|
|
503
|
-
throw new errors.ZepTimeoutError();
|
|
519
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /users/{userId}/facts.");
|
|
504
520
|
case "unknown":
|
|
505
521
|
throw new errors.ZepError({
|
|
506
522
|
message: _response.error.errorMessage,
|
|
@@ -517,22 +533,23 @@ class User {
|
|
|
517
533
|
* @throws {@link Zep.InternalServerError}
|
|
518
534
|
*
|
|
519
535
|
* @example
|
|
520
|
-
* await
|
|
536
|
+
* await client.user.getSessions("userId")
|
|
521
537
|
*/
|
|
522
538
|
getSessions(userId, requestOptions) {
|
|
523
|
-
var _a, _b;
|
|
524
539
|
return __awaiter(this, void 0, void 0, function* () {
|
|
540
|
+
var _a, _b;
|
|
525
541
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
526
542
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `users/${encodeURIComponent(userId)}/sessions`),
|
|
527
543
|
method: "GET",
|
|
528
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
544
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.3.0", "User-Agent": "zep-cloud/2.3.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),
|
|
529
545
|
contentType: "application/json",
|
|
546
|
+
requestType: "json",
|
|
530
547
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
531
548
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
532
549
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
533
550
|
});
|
|
534
551
|
if (_response.ok) {
|
|
535
|
-
return
|
|
552
|
+
return serializers.user.getSessions.Response.parseOrThrow(_response.body, {
|
|
536
553
|
unrecognizedObjectKeys: "passthrough",
|
|
537
554
|
allowUnrecognizedUnionMembers: true,
|
|
538
555
|
allowUnrecognizedEnumValues: true,
|
|
@@ -543,7 +560,7 @@ class User {
|
|
|
543
560
|
if (_response.error.reason === "status-code") {
|
|
544
561
|
switch (_response.error.statusCode) {
|
|
545
562
|
case 500:
|
|
546
|
-
throw new Zep.InternalServerError(
|
|
563
|
+
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
547
564
|
unrecognizedObjectKeys: "passthrough",
|
|
548
565
|
allowUnrecognizedUnionMembers: true,
|
|
549
566
|
allowUnrecognizedEnumValues: true,
|
|
@@ -564,7 +581,7 @@ class User {
|
|
|
564
581
|
body: _response.error.rawBody,
|
|
565
582
|
});
|
|
566
583
|
case "timeout":
|
|
567
|
-
throw new errors.ZepTimeoutError();
|
|
584
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /users/{userId}/sessions.");
|
|
568
585
|
case "unknown":
|
|
569
586
|
throw new errors.ZepError({
|
|
570
587
|
message: _response.error.errorMessage,
|
|
@@ -573,8 +590,8 @@ class User {
|
|
|
573
590
|
});
|
|
574
591
|
}
|
|
575
592
|
_getCustomAuthorizationHeaders() {
|
|
576
|
-
var _a;
|
|
577
593
|
return __awaiter(this, void 0, void 0, function* () {
|
|
594
|
+
var _a;
|
|
578
595
|
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"];
|
|
579
596
|
return { Authorization: `Api-Key ${apiKeyValue}` };
|
|
580
597
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
4
|
+
export type GraphDataType = "text" | "json" | "message";
|
|
5
5
|
export declare const GraphDataType: {
|
|
6
6
|
readonly Text: "text";
|
|
7
7
|
readonly Json: "json";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
4
|
+
export type GraphSearchScope = "edges" | "nodes";
|
|
5
5
|
export declare const GraphSearchScope: {
|
|
6
6
|
readonly Edges: "edges";
|
|
7
7
|
readonly Nodes: "nodes";
|
package/api/types/Reranker.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
4
|
+
export type Reranker = "rrf" | "mmr" | "node_distance" | "episode_mentions" | "cross_encoder";
|
|
5
5
|
export declare const Reranker: {
|
|
6
6
|
readonly Rrf: "rrf";
|
|
7
7
|
readonly Mmr: "mmr";
|
package/api/types/RoleType.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
4
|
+
export type RoleType = "norole" | "system" | "assistant" | "user" | "function" | "tool";
|
|
5
5
|
export declare const RoleType: {
|
|
6
6
|
readonly NoRole: "norole";
|
|
7
7
|
readonly SystemRole: "system";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
4
|
+
export type SearchScope = "messages" | "summary" | "facts";
|
|
5
5
|
export declare const SearchScope: {
|
|
6
6
|
readonly Messages: "messages";
|
|
7
7
|
readonly Summary: "summary";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
4
|
+
export type SearchType = "similarity" | "mmr";
|
|
5
5
|
export declare const SearchType: {
|
|
6
6
|
readonly Similarity: "similarity";
|
|
7
7
|
readonly Mmr: "mmr";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type APIResponse<Success, Failure> = SuccessfulResponse<Success> | FailedResponse<Failure>;
|
|
2
2
|
export interface SuccessfulResponse<T> {
|
|
3
3
|
ok: true;
|
|
4
4
|
body: T;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { APIResponse } from "./APIResponse";
|
|
2
|
-
export
|
|
2
|
+
export type FetchFunction = <R = unknown>(args: Fetcher.Args) => Promise<APIResponse<R, Fetcher.Error>>;
|
|
3
3
|
export declare namespace Fetcher {
|
|
4
4
|
interface Args {
|
|
5
5
|
url: string;
|
|
@@ -12,7 +12,9 @@ export declare namespace Fetcher {
|
|
|
12
12
|
maxRetries?: number;
|
|
13
13
|
withCredentials?: boolean;
|
|
14
14
|
abortSignal?: AbortSignal;
|
|
15
|
-
|
|
15
|
+
requestType?: "json" | "file" | "bytes";
|
|
16
|
+
responseType?: "json" | "blob" | "sse" | "streaming" | "text" | "arrayBuffer";
|
|
17
|
+
duplex?: "half";
|
|
16
18
|
}
|
|
17
19
|
type Error = FailedStatusCodeError | NonJsonError | TimeoutError | UnknownError;
|
|
18
20
|
interface FailedStatusCodeError {
|
|
@@ -33,4 +35,5 @@ export declare namespace Fetcher {
|
|
|
33
35
|
errorMessage: string;
|
|
34
36
|
}
|
|
35
37
|
}
|
|
38
|
+
export declare function fetcherImpl<R = unknown>(args: Fetcher.Args): Promise<APIResponse<R, Fetcher.Error>>;
|
|
36
39
|
export declare const fetcher: FetchFunction;
|