@getzep/zep-cloud 2.2.0 → 2.3.1
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 +46 -2
- package/api/resources/group/client/Client.js +267 -24
- package/api/resources/group/client/requests/CreateGroupRequest.d.ts +1 -1
- package/api/resources/group/client/requests/GetGroupsOrderedRequest.d.ts +17 -0
- package/api/resources/group/client/requests/index.d.ts +1 -0
- 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/Group.d.ts +3 -0
- package/api/types/GroupListResponse.d.ts +9 -0
- package/api/types/Memory.d.ts +4 -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/api/types/Session.d.ts +1 -1
- package/api/types/index.d.ts +2 -3
- package/api/types/index.js +2 -3
- 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 +46 -2
- package/dist/api/resources/group/client/Client.js +267 -24
- package/dist/api/resources/group/client/requests/CreateGroupRequest.d.ts +1 -1
- package/dist/api/resources/group/client/requests/GetGroupsOrderedRequest.d.ts +17 -0
- package/dist/api/resources/group/client/requests/index.d.ts +1 -0
- 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/Group.d.ts +3 -0
- package/dist/api/types/GroupListResponse.d.ts +9 -0
- package/dist/api/types/Memory.d.ts +4 -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/api/types/Session.d.ts +1 -1
- package/dist/api/types/index.d.ts +2 -3
- package/dist/api/types/index.js +2 -3
- 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.d.ts +2 -2
- package/dist/serialization/resources/group/client/requests/CreateGroupRequest.js +19 -9
- 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/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.d.ts +3 -0
- package/dist/serialization/types/Group.js +20 -7
- package/dist/serialization/types/GroupListResponse.d.ts +15 -0
- package/dist/serialization/types/GroupListResponse.js +46 -0
- 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.d.ts +2 -2
- package/dist/serialization/types/Session.js +19 -9
- 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/serialization/types/index.d.ts +2 -3
- package/dist/serialization/types/index.js +2 -3
- 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 +3990 -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.d.ts +2 -2
- package/serialization/resources/group/client/requests/CreateGroupRequest.js +19 -9
- 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/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.d.ts +3 -0
- package/serialization/types/Group.js +20 -7
- package/serialization/types/GroupListResponse.d.ts +15 -0
- package/serialization/types/GroupListResponse.js +46 -0
- 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.d.ts +2 -2
- package/serialization/types/Session.js +19 -9
- 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/serialization/types/index.d.ts +2 -3
- package/serialization/types/index.js +2 -3
- package/version.d.ts +1 -0
- package/version.js +4 -0
- package/api/types/ApidataFactRatingExamples.d.ts +0 -8
- package/api/types/ApidataFactRatingInstruction.d.ts +0 -21
- package/dist/api/types/ApidataFactRatingExamples.d.ts +0 -8
- package/dist/api/types/ApidataFactRatingInstruction.d.ts +0 -21
- package/dist/serialization/types/ApidataFactRatingExamples.d.ts +0 -14
- package/dist/serialization/types/ApidataFactRatingExamples.js +0 -35
- package/dist/serialization/types/ApidataFactRatingInstruction.d.ts +0 -14
- package/dist/serialization/types/ApidataFactRatingInstruction.js +0 -35
- package/serialization/types/ApidataFactRatingExamples.d.ts +0 -14
- package/serialization/types/ApidataFactRatingExamples.js +0 -35
- package/serialization/types/ApidataFactRatingInstruction.d.ts +0 -14
- package/serialization/types/ApidataFactRatingInstruction.js +0 -35
- /package/api/{types/ApidataFactRatingExamples.js → resources/group/client/requests/GetGroupsOrderedRequest.js} +0 -0
- /package/api/types/{ApidataFactRatingInstruction.js → GroupListResponse.js} +0 -0
- /package/dist/api/{types/ApidataFactRatingExamples.js → resources/group/client/requests/GetGroupsOrderedRequest.js} +0 -0
- /package/dist/api/types/{ApidataFactRatingInstruction.js → GroupListResponse.js} +0 -0
|
@@ -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,25 +69,26 @@ class Group {
|
|
|
59
69
|
* @throws {@link Zep.InternalServerError}
|
|
60
70
|
*
|
|
61
71
|
* @example
|
|
62
|
-
* await
|
|
72
|
+
* await client.group.add({
|
|
63
73
|
* groupId: "group_id"
|
|
64
74
|
* })
|
|
65
75
|
*/
|
|
66
76
|
add(request, requestOptions) {
|
|
67
|
-
var _a, _b;
|
|
68
77
|
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
var _a, _b;
|
|
69
79
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
70
80
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "groups"),
|
|
71
81
|
method: "POST",
|
|
72
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.2.
|
|
82
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.3.1", "User-Agent": "zep-cloud/2.3.1", "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),
|
|
73
83
|
contentType: "application/json",
|
|
74
|
-
|
|
84
|
+
requestType: "json",
|
|
85
|
+
body: serializers.CreateGroupRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
75
86
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
76
87
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
77
88
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
78
89
|
});
|
|
79
90
|
if (_response.ok) {
|
|
80
|
-
return
|
|
91
|
+
return serializers.Group.parseOrThrow(_response.body, {
|
|
81
92
|
unrecognizedObjectKeys: "passthrough",
|
|
82
93
|
allowUnrecognizedUnionMembers: true,
|
|
83
94
|
allowUnrecognizedEnumValues: true,
|
|
@@ -88,7 +99,164 @@ class Group {
|
|
|
88
99
|
if (_response.error.reason === "status-code") {
|
|
89
100
|
switch (_response.error.statusCode) {
|
|
90
101
|
case 400:
|
|
91
|
-
throw new Zep.BadRequestError(
|
|
102
|
+
throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
103
|
+
unrecognizedObjectKeys: "passthrough",
|
|
104
|
+
allowUnrecognizedUnionMembers: true,
|
|
105
|
+
allowUnrecognizedEnumValues: true,
|
|
106
|
+
skipValidation: true,
|
|
107
|
+
breadcrumbsPrefix: ["response"],
|
|
108
|
+
}));
|
|
109
|
+
case 500:
|
|
110
|
+
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
111
|
+
unrecognizedObjectKeys: "passthrough",
|
|
112
|
+
allowUnrecognizedUnionMembers: true,
|
|
113
|
+
allowUnrecognizedEnumValues: true,
|
|
114
|
+
skipValidation: true,
|
|
115
|
+
breadcrumbsPrefix: ["response"],
|
|
116
|
+
}));
|
|
117
|
+
default:
|
|
118
|
+
throw new errors.ZepError({
|
|
119
|
+
statusCode: _response.error.statusCode,
|
|
120
|
+
body: _response.error.body,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
switch (_response.error.reason) {
|
|
125
|
+
case "non-json":
|
|
126
|
+
throw new errors.ZepError({
|
|
127
|
+
statusCode: _response.error.statusCode,
|
|
128
|
+
body: _response.error.rawBody,
|
|
129
|
+
});
|
|
130
|
+
case "timeout":
|
|
131
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling POST /groups.");
|
|
132
|
+
case "unknown":
|
|
133
|
+
throw new errors.ZepError({
|
|
134
|
+
message: _response.error.errorMessage,
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* List all groups with pagination.
|
|
141
|
+
*
|
|
142
|
+
* @param {Zep.GetGroupsOrderedRequest} request
|
|
143
|
+
* @param {Group.RequestOptions} requestOptions - Request-specific configuration.
|
|
144
|
+
*
|
|
145
|
+
* @throws {@link Zep.BadRequestError}
|
|
146
|
+
* @throws {@link Zep.InternalServerError}
|
|
147
|
+
*
|
|
148
|
+
* @example
|
|
149
|
+
* await client.group.listAllGroups()
|
|
150
|
+
*/
|
|
151
|
+
listAllGroups() {
|
|
152
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
153
|
+
var _a, _b;
|
|
154
|
+
const { pageNumber, pageSize } = request;
|
|
155
|
+
const _queryParams = {};
|
|
156
|
+
if (pageNumber != null) {
|
|
157
|
+
_queryParams["pageNumber"] = pageNumber.toString();
|
|
158
|
+
}
|
|
159
|
+
if (pageSize != null) {
|
|
160
|
+
_queryParams["pageSize"] = pageSize.toString();
|
|
161
|
+
}
|
|
162
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
163
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "groups-ordered"),
|
|
164
|
+
method: "GET",
|
|
165
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.3.1", "User-Agent": "zep-cloud/2.3.1", "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),
|
|
166
|
+
contentType: "application/json",
|
|
167
|
+
queryParameters: _queryParams,
|
|
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.GroupListResponse.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 500:
|
|
193
|
+
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
194
|
+
unrecognizedObjectKeys: "passthrough",
|
|
195
|
+
allowUnrecognizedUnionMembers: true,
|
|
196
|
+
allowUnrecognizedEnumValues: true,
|
|
197
|
+
skipValidation: true,
|
|
198
|
+
breadcrumbsPrefix: ["response"],
|
|
199
|
+
}));
|
|
200
|
+
default:
|
|
201
|
+
throw new errors.ZepError({
|
|
202
|
+
statusCode: _response.error.statusCode,
|
|
203
|
+
body: _response.error.body,
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
switch (_response.error.reason) {
|
|
208
|
+
case "non-json":
|
|
209
|
+
throw new errors.ZepError({
|
|
210
|
+
statusCode: _response.error.statusCode,
|
|
211
|
+
body: _response.error.rawBody,
|
|
212
|
+
});
|
|
213
|
+
case "timeout":
|
|
214
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /groups-ordered.");
|
|
215
|
+
case "unknown":
|
|
216
|
+
throw new errors.ZepError({
|
|
217
|
+
message: _response.error.errorMessage,
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Get a group.
|
|
224
|
+
*
|
|
225
|
+
* @param {string} groupId - The group_id of the group to get.
|
|
226
|
+
* @param {Group.RequestOptions} requestOptions - Request-specific configuration.
|
|
227
|
+
*
|
|
228
|
+
* @throws {@link Zep.NotFoundError}
|
|
229
|
+
* @throws {@link Zep.InternalServerError}
|
|
230
|
+
*
|
|
231
|
+
* @example
|
|
232
|
+
* await client.group.getAGroup("groupId")
|
|
233
|
+
*/
|
|
234
|
+
getAGroup(groupId, requestOptions) {
|
|
235
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
236
|
+
var _a, _b;
|
|
237
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
238
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `groups/${encodeURIComponent(groupId)}`),
|
|
239
|
+
method: "GET",
|
|
240
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.3.1", "User-Agent": "zep-cloud/2.3.1", "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),
|
|
241
|
+
contentType: "application/json",
|
|
242
|
+
requestType: "json",
|
|
243
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
244
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
245
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
246
|
+
});
|
|
247
|
+
if (_response.ok) {
|
|
248
|
+
return serializers.Group.parseOrThrow(_response.body, {
|
|
249
|
+
unrecognizedObjectKeys: "passthrough",
|
|
250
|
+
allowUnrecognizedUnionMembers: true,
|
|
251
|
+
allowUnrecognizedEnumValues: true,
|
|
252
|
+
skipValidation: true,
|
|
253
|
+
breadcrumbsPrefix: ["response"],
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
if (_response.error.reason === "status-code") {
|
|
257
|
+
switch (_response.error.statusCode) {
|
|
258
|
+
case 404:
|
|
259
|
+
throw new Zep.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
92
260
|
unrecognizedObjectKeys: "passthrough",
|
|
93
261
|
allowUnrecognizedUnionMembers: true,
|
|
94
262
|
allowUnrecognizedEnumValues: true,
|
|
@@ -96,7 +264,7 @@ class Group {
|
|
|
96
264
|
breadcrumbsPrefix: ["response"],
|
|
97
265
|
}));
|
|
98
266
|
case 500:
|
|
99
|
-
throw new Zep.InternalServerError(
|
|
267
|
+
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
100
268
|
unrecognizedObjectKeys: "passthrough",
|
|
101
269
|
allowUnrecognizedUnionMembers: true,
|
|
102
270
|
allowUnrecognizedEnumValues: true,
|
|
@@ -117,7 +285,7 @@ class Group {
|
|
|
117
285
|
body: _response.error.rawBody,
|
|
118
286
|
});
|
|
119
287
|
case "timeout":
|
|
120
|
-
throw new errors.ZepTimeoutError();
|
|
288
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /groups/{groupId}.");
|
|
121
289
|
case "unknown":
|
|
122
290
|
throw new errors.ZepError({
|
|
123
291
|
message: _response.error.errorMessage,
|
|
@@ -136,22 +304,23 @@ class Group {
|
|
|
136
304
|
* @throws {@link Zep.InternalServerError}
|
|
137
305
|
*
|
|
138
306
|
* @example
|
|
139
|
-
* await
|
|
307
|
+
* await client.group.delete("groupId")
|
|
140
308
|
*/
|
|
141
309
|
delete(groupId, requestOptions) {
|
|
142
|
-
var _a, _b;
|
|
143
310
|
return __awaiter(this, void 0, void 0, function* () {
|
|
311
|
+
var _a, _b;
|
|
144
312
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
145
313
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `groups/${encodeURIComponent(groupId)}`),
|
|
146
314
|
method: "DELETE",
|
|
147
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.2.
|
|
315
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.3.1", "User-Agent": "zep-cloud/2.3.1", "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),
|
|
148
316
|
contentType: "application/json",
|
|
317
|
+
requestType: "json",
|
|
149
318
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
150
319
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
151
320
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
152
321
|
});
|
|
153
322
|
if (_response.ok) {
|
|
154
|
-
return
|
|
323
|
+
return serializers.SuccessResponse.parseOrThrow(_response.body, {
|
|
155
324
|
unrecognizedObjectKeys: "passthrough",
|
|
156
325
|
allowUnrecognizedUnionMembers: true,
|
|
157
326
|
allowUnrecognizedEnumValues: true,
|
|
@@ -162,7 +331,7 @@ class Group {
|
|
|
162
331
|
if (_response.error.reason === "status-code") {
|
|
163
332
|
switch (_response.error.statusCode) {
|
|
164
333
|
case 400:
|
|
165
|
-
throw new Zep.BadRequestError(
|
|
334
|
+
throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
166
335
|
unrecognizedObjectKeys: "passthrough",
|
|
167
336
|
allowUnrecognizedUnionMembers: true,
|
|
168
337
|
allowUnrecognizedEnumValues: true,
|
|
@@ -170,7 +339,81 @@ class Group {
|
|
|
170
339
|
breadcrumbsPrefix: ["response"],
|
|
171
340
|
}));
|
|
172
341
|
case 404:
|
|
173
|
-
throw new Zep.NotFoundError(
|
|
342
|
+
throw new Zep.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
343
|
+
unrecognizedObjectKeys: "passthrough",
|
|
344
|
+
allowUnrecognizedUnionMembers: true,
|
|
345
|
+
allowUnrecognizedEnumValues: true,
|
|
346
|
+
skipValidation: true,
|
|
347
|
+
breadcrumbsPrefix: ["response"],
|
|
348
|
+
}));
|
|
349
|
+
case 500:
|
|
350
|
+
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
351
|
+
unrecognizedObjectKeys: "passthrough",
|
|
352
|
+
allowUnrecognizedUnionMembers: true,
|
|
353
|
+
allowUnrecognizedEnumValues: true,
|
|
354
|
+
skipValidation: true,
|
|
355
|
+
breadcrumbsPrefix: ["response"],
|
|
356
|
+
}));
|
|
357
|
+
default:
|
|
358
|
+
throw new errors.ZepError({
|
|
359
|
+
statusCode: _response.error.statusCode,
|
|
360
|
+
body: _response.error.body,
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
switch (_response.error.reason) {
|
|
365
|
+
case "non-json":
|
|
366
|
+
throw new errors.ZepError({
|
|
367
|
+
statusCode: _response.error.statusCode,
|
|
368
|
+
body: _response.error.rawBody,
|
|
369
|
+
});
|
|
370
|
+
case "timeout":
|
|
371
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling DELETE /groups/{groupId}.");
|
|
372
|
+
case "unknown":
|
|
373
|
+
throw new errors.ZepError({
|
|
374
|
+
message: _response.error.errorMessage,
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* Get group facts.
|
|
381
|
+
*
|
|
382
|
+
* @param {string} groupId - The group_id of the group to get.
|
|
383
|
+
* @param {Group.RequestOptions} requestOptions - Request-specific configuration.
|
|
384
|
+
*
|
|
385
|
+
* @throws {@link Zep.NotFoundError}
|
|
386
|
+
* @throws {@link Zep.InternalServerError}
|
|
387
|
+
*
|
|
388
|
+
* @example
|
|
389
|
+
* await client.group.getFacts("groupId")
|
|
390
|
+
*/
|
|
391
|
+
getFacts(groupId, requestOptions) {
|
|
392
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
393
|
+
var _a, _b;
|
|
394
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
395
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `groups/${encodeURIComponent(groupId)}/facts`),
|
|
396
|
+
method: "GET",
|
|
397
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.3.1", "User-Agent": "zep-cloud/2.3.1", "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),
|
|
398
|
+
contentType: "application/json",
|
|
399
|
+
requestType: "json",
|
|
400
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
401
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
402
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
403
|
+
});
|
|
404
|
+
if (_response.ok) {
|
|
405
|
+
return serializers.FactsResponse.parseOrThrow(_response.body, {
|
|
406
|
+
unrecognizedObjectKeys: "passthrough",
|
|
407
|
+
allowUnrecognizedUnionMembers: true,
|
|
408
|
+
allowUnrecognizedEnumValues: true,
|
|
409
|
+
skipValidation: true,
|
|
410
|
+
breadcrumbsPrefix: ["response"],
|
|
411
|
+
});
|
|
412
|
+
}
|
|
413
|
+
if (_response.error.reason === "status-code") {
|
|
414
|
+
switch (_response.error.statusCode) {
|
|
415
|
+
case 404:
|
|
416
|
+
throw new Zep.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
174
417
|
unrecognizedObjectKeys: "passthrough",
|
|
175
418
|
allowUnrecognizedUnionMembers: true,
|
|
176
419
|
allowUnrecognizedEnumValues: true,
|
|
@@ -178,7 +421,7 @@ class Group {
|
|
|
178
421
|
breadcrumbsPrefix: ["response"],
|
|
179
422
|
}));
|
|
180
423
|
case 500:
|
|
181
|
-
throw new Zep.InternalServerError(
|
|
424
|
+
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
182
425
|
unrecognizedObjectKeys: "passthrough",
|
|
183
426
|
allowUnrecognizedUnionMembers: true,
|
|
184
427
|
allowUnrecognizedEnumValues: true,
|
|
@@ -199,7 +442,7 @@ class Group {
|
|
|
199
442
|
body: _response.error.rawBody,
|
|
200
443
|
});
|
|
201
444
|
case "timeout":
|
|
202
|
-
throw new errors.ZepTimeoutError();
|
|
445
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /groups/{groupId}/facts.");
|
|
203
446
|
case "unknown":
|
|
204
447
|
throw new errors.ZepError({
|
|
205
448
|
message: _response.error.errorMessage,
|
|
@@ -208,8 +451,8 @@ class Group {
|
|
|
208
451
|
});
|
|
209
452
|
}
|
|
210
453
|
_getCustomAuthorizationHeaders() {
|
|
211
|
-
var _a;
|
|
212
454
|
return __awaiter(this, void 0, void 0, function* () {
|
|
455
|
+
var _a;
|
|
213
456
|
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"];
|
|
214
457
|
return { Authorization: `Api-Key ${apiKeyValue}` };
|
|
215
458
|
});
|
|
@@ -11,7 +11,7 @@ import * as Zep from "../../../../index";
|
|
|
11
11
|
export interface CreateGroupRequest {
|
|
12
12
|
description?: string;
|
|
13
13
|
/** UserIDs []string `json:"user_ids"` */
|
|
14
|
-
factRatingInstruction?: Zep.
|
|
14
|
+
factRatingInstruction?: Zep.FactRatingInstruction;
|
|
15
15
|
groupId: string;
|
|
16
16
|
name?: string;
|
|
17
17
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {}
|
|
7
|
+
*/
|
|
8
|
+
export interface GetGroupsOrderedRequest {
|
|
9
|
+
/**
|
|
10
|
+
* Page number for pagination, starting from 1
|
|
11
|
+
*/
|
|
12
|
+
pageNumber?: number;
|
|
13
|
+
/**
|
|
14
|
+
* Number of groups to retrieve per page
|
|
15
|
+
*/
|
|
16
|
+
pageSize?: number;
|
|
17
|
+
}
|
package/api/resources/index.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
37
|
};
|
|
@@ -11,9 +11,14 @@ export declare namespace Memory {
|
|
|
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 Memory {
|
|
@@ -29,7 +34,7 @@ export declare class Memory {
|
|
|
29
34
|
* @throws {@link Zep.InternalServerError}
|
|
30
35
|
*
|
|
31
36
|
* @example
|
|
32
|
-
* await
|
|
37
|
+
* await client.memory.getFact("factUUID")
|
|
33
38
|
*/
|
|
34
39
|
getFact(factUuid: string, requestOptions?: Memory.RequestOptions): Promise<Zep.FactResponse>;
|
|
35
40
|
/**
|
|
@@ -42,7 +47,7 @@ export declare class Memory {
|
|
|
42
47
|
* @throws {@link Zep.InternalServerError}
|
|
43
48
|
*
|
|
44
49
|
* @example
|
|
45
|
-
* await
|
|
50
|
+
* await client.memory.deleteFact("factUUID")
|
|
46
51
|
*/
|
|
47
52
|
deleteFact(factUuid: string, requestOptions?: Memory.RequestOptions): Promise<Zep.SuccessResponse>;
|
|
48
53
|
/**
|
|
@@ -55,7 +60,7 @@ export declare class Memory {
|
|
|
55
60
|
* @throws {@link Zep.InternalServerError}
|
|
56
61
|
*
|
|
57
62
|
* @example
|
|
58
|
-
* await
|
|
63
|
+
* await client.memory.addSession({
|
|
59
64
|
* sessionId: "session_id",
|
|
60
65
|
* userId: "user_id"
|
|
61
66
|
* })
|
|
@@ -71,7 +76,7 @@ export declare class Memory {
|
|
|
71
76
|
* @throws {@link Zep.InternalServerError}
|
|
72
77
|
*
|
|
73
78
|
* @example
|
|
74
|
-
* await
|
|
79
|
+
* await client.memory.listSessions()
|
|
75
80
|
*/
|
|
76
81
|
listSessions(request?: Zep.MemoryListSessionsRequest, requestOptions?: Memory.RequestOptions): Promise<Zep.SessionListResponse>;
|
|
77
82
|
/**
|
|
@@ -85,7 +90,7 @@ export declare class Memory {
|
|
|
85
90
|
* @throws {@link Zep.InternalServerError}
|
|
86
91
|
*
|
|
87
92
|
* @example
|
|
88
|
-
* await
|
|
93
|
+
* await client.memory.endSessions({
|
|
89
94
|
* sessionIds: ["session_ids"]
|
|
90
95
|
* })
|
|
91
96
|
*/
|
|
@@ -99,7 +104,7 @@ export declare class Memory {
|
|
|
99
104
|
* @throws {@link Zep.InternalServerError}
|
|
100
105
|
*
|
|
101
106
|
* @example
|
|
102
|
-
* await
|
|
107
|
+
* await client.memory.searchSessions({
|
|
103
108
|
* text: "text"
|
|
104
109
|
* })
|
|
105
110
|
*/
|
|
@@ -114,7 +119,7 @@ export declare class Memory {
|
|
|
114
119
|
* @throws {@link Zep.InternalServerError}
|
|
115
120
|
*
|
|
116
121
|
* @example
|
|
117
|
-
* await
|
|
122
|
+
* await client.memory.getSession("sessionId")
|
|
118
123
|
*/
|
|
119
124
|
getSession(sessionId: string, requestOptions?: Memory.RequestOptions): Promise<Zep.Session>;
|
|
120
125
|
/**
|
|
@@ -130,7 +135,7 @@ export declare class Memory {
|
|
|
130
135
|
* @throws {@link Zep.InternalServerError}
|
|
131
136
|
*
|
|
132
137
|
* @example
|
|
133
|
-
* await
|
|
138
|
+
* await client.memory.updateSession("sessionId", {
|
|
134
139
|
* metadata: {
|
|
135
140
|
* "key": "value"
|
|
136
141
|
* }
|
|
@@ -148,7 +153,7 @@ export declare class Memory {
|
|
|
148
153
|
* @throws {@link Zep.InternalServerError}
|
|
149
154
|
*
|
|
150
155
|
* @example
|
|
151
|
-
* await
|
|
156
|
+
* await client.memory.classifySession("sessionId", {
|
|
152
157
|
* classes: ["classes"],
|
|
153
158
|
* name: "name"
|
|
154
159
|
* })
|
|
@@ -166,7 +171,7 @@ export declare class Memory {
|
|
|
166
171
|
* @throws {@link Zep.InternalServerError}
|
|
167
172
|
*
|
|
168
173
|
* @example
|
|
169
|
-
* await
|
|
174
|
+
* await client.memory.endSession("sessionId")
|
|
170
175
|
*/
|
|
171
176
|
endSession(sessionId: string, request?: Zep.EndSessionRequest, requestOptions?: Memory.RequestOptions): Promise<Zep.EndSessionResponse>;
|
|
172
177
|
/**
|
|
@@ -181,7 +186,7 @@ export declare class Memory {
|
|
|
181
186
|
* @throws {@link Zep.InternalServerError}
|
|
182
187
|
*
|
|
183
188
|
* @example
|
|
184
|
-
* await
|
|
189
|
+
* await client.memory.extractData("sessionId", {
|
|
185
190
|
* lastN: 1,
|
|
186
191
|
* modelSchema: "model_schema"
|
|
187
192
|
* })
|
|
@@ -198,7 +203,7 @@ export declare class Memory {
|
|
|
198
203
|
* @throws {@link Zep.InternalServerError}
|
|
199
204
|
*
|
|
200
205
|
* @example
|
|
201
|
-
* await
|
|
206
|
+
* await client.memory.getSessionFacts("sessionId")
|
|
202
207
|
*/
|
|
203
208
|
getSessionFacts(sessionId: string, request?: Zep.MemoryGetSessionFactsRequest, requestOptions?: Memory.RequestOptions): Promise<Zep.FactsResponse>;
|
|
204
209
|
/**
|
|
@@ -212,7 +217,7 @@ export declare class Memory {
|
|
|
212
217
|
* @throws {@link Zep.InternalServerError}
|
|
213
218
|
*
|
|
214
219
|
* @example
|
|
215
|
-
* await
|
|
220
|
+
* await client.memory.addSessionFacts("sessionId")
|
|
216
221
|
*/
|
|
217
222
|
addSessionFacts(sessionId: string, request?: Zep.AddFactsRequest, requestOptions?: Memory.RequestOptions): Promise<Zep.SuccessResponse>;
|
|
218
223
|
/**
|
|
@@ -226,7 +231,7 @@ export declare class Memory {
|
|
|
226
231
|
* @throws {@link Zep.InternalServerError}
|
|
227
232
|
*
|
|
228
233
|
* @example
|
|
229
|
-
* await
|
|
234
|
+
* await client.memory.get("sessionId")
|
|
230
235
|
*/
|
|
231
236
|
get(sessionId: string, request?: Zep.MemoryGetRequest, requestOptions?: Memory.RequestOptions): Promise<Zep.Memory>;
|
|
232
237
|
/**
|
|
@@ -239,10 +244,10 @@ export declare class Memory {
|
|
|
239
244
|
* @throws {@link Zep.InternalServerError}
|
|
240
245
|
*
|
|
241
246
|
* @example
|
|
242
|
-
* await
|
|
247
|
+
* await client.memory.add("sessionId", {
|
|
243
248
|
* messages: [{
|
|
244
249
|
* content: "content",
|
|
245
|
-
* roleType:
|
|
250
|
+
* roleType: "norole"
|
|
246
251
|
* }]
|
|
247
252
|
* })
|
|
248
253
|
*/
|
|
@@ -257,7 +262,7 @@ export declare class Memory {
|
|
|
257
262
|
* @throws {@link Zep.InternalServerError}
|
|
258
263
|
*
|
|
259
264
|
* @example
|
|
260
|
-
* await
|
|
265
|
+
* await client.memory.delete("sessionId")
|
|
261
266
|
*/
|
|
262
267
|
delete(sessionId: string, requestOptions?: Memory.RequestOptions): Promise<Zep.SuccessResponse>;
|
|
263
268
|
/**
|
|
@@ -271,7 +276,7 @@ export declare class Memory {
|
|
|
271
276
|
* @throws {@link Zep.InternalServerError}
|
|
272
277
|
*
|
|
273
278
|
* @example
|
|
274
|
-
* await
|
|
279
|
+
* await client.memory.getSessionMessages("sessionId")
|
|
275
280
|
*/
|
|
276
281
|
getSessionMessages(sessionId: string, request?: Zep.MemoryGetSessionMessagesRequest, requestOptions?: Memory.RequestOptions): Promise<Zep.MessageListResponse>;
|
|
277
282
|
/**
|
|
@@ -285,7 +290,7 @@ export declare class Memory {
|
|
|
285
290
|
* @throws {@link Zep.InternalServerError}
|
|
286
291
|
*
|
|
287
292
|
* @example
|
|
288
|
-
* await
|
|
293
|
+
* await client.memory.getSessionMessage("sessionId", "messageUUID")
|
|
289
294
|
*/
|
|
290
295
|
getSessionMessage(sessionId: string, messageUuid: string, requestOptions?: Memory.RequestOptions): Promise<Zep.Message>;
|
|
291
296
|
/**
|
|
@@ -300,7 +305,7 @@ export declare class Memory {
|
|
|
300
305
|
* @throws {@link Zep.InternalServerError}
|
|
301
306
|
*
|
|
302
307
|
* @example
|
|
303
|
-
* await
|
|
308
|
+
* await client.memory.updateMessageMetadata("sessionId", "messageUUID", {
|
|
304
309
|
* metadata: {
|
|
305
310
|
* "key": "value"
|
|
306
311
|
* }
|
|
@@ -318,7 +323,7 @@ export declare class Memory {
|
|
|
318
323
|
* @throws {@link Zep.InternalServerError}
|
|
319
324
|
*
|
|
320
325
|
* @example
|
|
321
|
-
* await
|
|
326
|
+
* await client.memory.search("sessionId")
|
|
322
327
|
*/
|
|
323
328
|
search(sessionId: string, request?: Zep.MemorySearchPayload, requestOptions?: Memory.RequestOptions): Promise<Zep.MemorySearchResult[]>;
|
|
324
329
|
/**
|
|
@@ -331,7 +336,7 @@ export declare class Memory {
|
|
|
331
336
|
* @throws {@link Zep.InternalServerError}
|
|
332
337
|
*
|
|
333
338
|
* @example
|
|
334
|
-
* await
|
|
339
|
+
* await client.memory.getSummaries("sessionId")
|
|
335
340
|
*/
|
|
336
341
|
getSummaries(sessionId: string, requestOptions?: Memory.RequestOptions): Promise<Zep.SummaryListResponse>;
|
|
337
342
|
/**
|
|
@@ -345,7 +350,7 @@ export declare class Memory {
|
|
|
345
350
|
* @throws {@link Zep.InternalServerError}
|
|
346
351
|
*
|
|
347
352
|
* @example
|
|
348
|
-
* await
|
|
353
|
+
* await client.memory.synthesizeQuestion("sessionId")
|
|
349
354
|
*/
|
|
350
355
|
synthesizeQuestion(sessionId: string, request?: Zep.MemorySynthesizeQuestionRequest, requestOptions?: Memory.RequestOptions): Promise<Zep.Question>;
|
|
351
356
|
protected _getCustomAuthorizationHeaders(): Promise<{
|