@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
|
@@ -14,14 +14,25 @@ export declare namespace Graph {
|
|
|
14
14
|
fetcher?: core.FetchFunction;
|
|
15
15
|
}
|
|
16
16
|
interface RequestOptions {
|
|
17
|
+
/** The maximum time to wait for a response in seconds. */
|
|
17
18
|
timeoutInSeconds?: number;
|
|
19
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
18
20
|
maxRetries?: number;
|
|
21
|
+
/** A hook to abort the request. */
|
|
19
22
|
abortSignal?: AbortSignal;
|
|
23
|
+
/** Additional headers to include in the request. */
|
|
24
|
+
headers?: Record<string, string>;
|
|
20
25
|
}
|
|
21
26
|
}
|
|
22
27
|
export declare class Graph {
|
|
23
28
|
protected readonly _options: Graph.Options;
|
|
29
|
+
protected _edge: Edge | undefined;
|
|
30
|
+
protected _episode: Episode | undefined;
|
|
31
|
+
protected _node: Node | undefined;
|
|
24
32
|
constructor(_options?: Graph.Options);
|
|
33
|
+
get edge(): Edge;
|
|
34
|
+
get episode(): Episode;
|
|
35
|
+
get node(): Node;
|
|
25
36
|
/**
|
|
26
37
|
* Add data to the graph
|
|
27
38
|
*
|
|
@@ -32,7 +43,7 @@ export declare class Graph {
|
|
|
32
43
|
* @throws {@link Zep.InternalServerError}
|
|
33
44
|
*
|
|
34
45
|
* @example
|
|
35
|
-
* await
|
|
46
|
+
* await client.graph.add()
|
|
36
47
|
*/
|
|
37
48
|
add(request?: Zep.AddDataRequest, requestOptions?: Graph.RequestOptions): Promise<Zep.SuccessResponse>;
|
|
38
49
|
/**
|
|
@@ -45,17 +56,11 @@ export declare class Graph {
|
|
|
45
56
|
* @throws {@link Zep.InternalServerError}
|
|
46
57
|
*
|
|
47
58
|
* @example
|
|
48
|
-
* await
|
|
59
|
+
* await client.graph.search({
|
|
49
60
|
* query: "query"
|
|
50
61
|
* })
|
|
51
62
|
*/
|
|
52
63
|
search(request: Zep.GraphSearchQuery, requestOptions?: Graph.RequestOptions): Promise<Zep.GraphSearchResults>;
|
|
53
|
-
protected _edge: Edge | undefined;
|
|
54
|
-
get edge(): Edge;
|
|
55
|
-
protected _episode: Episode | undefined;
|
|
56
|
-
get episode(): Episode;
|
|
57
|
-
protected _node: Node | undefined;
|
|
58
|
-
get node(): Node;
|
|
59
64
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
60
65
|
Authorization: string;
|
|
61
66
|
}>;
|
|
@@ -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) {
|
|
@@ -52,6 +62,18 @@ class Graph {
|
|
|
52
62
|
constructor(_options = {}) {
|
|
53
63
|
this._options = _options;
|
|
54
64
|
}
|
|
65
|
+
get edge() {
|
|
66
|
+
var _a;
|
|
67
|
+
return ((_a = this._edge) !== null && _a !== void 0 ? _a : (this._edge = new Client_1.Edge(this._options)));
|
|
68
|
+
}
|
|
69
|
+
get episode() {
|
|
70
|
+
var _a;
|
|
71
|
+
return ((_a = this._episode) !== null && _a !== void 0 ? _a : (this._episode = new Client_2.Episode(this._options)));
|
|
72
|
+
}
|
|
73
|
+
get node() {
|
|
74
|
+
var _a;
|
|
75
|
+
return ((_a = this._node) !== null && _a !== void 0 ? _a : (this._node = new Client_3.Node(this._options)));
|
|
76
|
+
}
|
|
55
77
|
/**
|
|
56
78
|
* Add data to the graph
|
|
57
79
|
*
|
|
@@ -62,23 +84,24 @@ class Graph {
|
|
|
62
84
|
* @throws {@link Zep.InternalServerError}
|
|
63
85
|
*
|
|
64
86
|
* @example
|
|
65
|
-
* await
|
|
87
|
+
* await client.graph.add()
|
|
66
88
|
*/
|
|
67
|
-
add(
|
|
68
|
-
|
|
69
|
-
|
|
89
|
+
add() {
|
|
90
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
91
|
+
var _a, _b;
|
|
70
92
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
71
93
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "graph"),
|
|
72
94
|
method: "POST",
|
|
73
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.2.
|
|
95
|
+
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),
|
|
74
96
|
contentType: "application/json",
|
|
75
|
-
|
|
97
|
+
requestType: "json",
|
|
98
|
+
body: serializers.AddDataRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
76
99
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
77
100
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
78
101
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
79
102
|
});
|
|
80
103
|
if (_response.ok) {
|
|
81
|
-
return
|
|
104
|
+
return serializers.SuccessResponse.parseOrThrow(_response.body, {
|
|
82
105
|
unrecognizedObjectKeys: "passthrough",
|
|
83
106
|
allowUnrecognizedUnionMembers: true,
|
|
84
107
|
allowUnrecognizedEnumValues: true,
|
|
@@ -89,7 +112,7 @@ class Graph {
|
|
|
89
112
|
if (_response.error.reason === "status-code") {
|
|
90
113
|
switch (_response.error.statusCode) {
|
|
91
114
|
case 400:
|
|
92
|
-
throw new Zep.BadRequestError(
|
|
115
|
+
throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
93
116
|
unrecognizedObjectKeys: "passthrough",
|
|
94
117
|
allowUnrecognizedUnionMembers: true,
|
|
95
118
|
allowUnrecognizedEnumValues: true,
|
|
@@ -97,7 +120,7 @@ class Graph {
|
|
|
97
120
|
breadcrumbsPrefix: ["response"],
|
|
98
121
|
}));
|
|
99
122
|
case 500:
|
|
100
|
-
throw new Zep.InternalServerError(
|
|
123
|
+
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
101
124
|
unrecognizedObjectKeys: "passthrough",
|
|
102
125
|
allowUnrecognizedUnionMembers: true,
|
|
103
126
|
allowUnrecognizedEnumValues: true,
|
|
@@ -118,7 +141,7 @@ class Graph {
|
|
|
118
141
|
body: _response.error.rawBody,
|
|
119
142
|
});
|
|
120
143
|
case "timeout":
|
|
121
|
-
throw new errors.ZepTimeoutError();
|
|
144
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling POST /graph.");
|
|
122
145
|
case "unknown":
|
|
123
146
|
throw new errors.ZepError({
|
|
124
147
|
message: _response.error.errorMessage,
|
|
@@ -136,25 +159,26 @@ class Graph {
|
|
|
136
159
|
* @throws {@link Zep.InternalServerError}
|
|
137
160
|
*
|
|
138
161
|
* @example
|
|
139
|
-
* await
|
|
162
|
+
* await client.graph.search({
|
|
140
163
|
* query: "query"
|
|
141
164
|
* })
|
|
142
165
|
*/
|
|
143
166
|
search(request, requestOptions) {
|
|
144
|
-
var _a, _b;
|
|
145
167
|
return __awaiter(this, void 0, void 0, function* () {
|
|
168
|
+
var _a, _b;
|
|
146
169
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
147
170
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "graph/search"),
|
|
148
171
|
method: "POST",
|
|
149
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.2.
|
|
172
|
+
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),
|
|
150
173
|
contentType: "application/json",
|
|
151
|
-
|
|
174
|
+
requestType: "json",
|
|
175
|
+
body: serializers.GraphSearchQuery.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
152
176
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
153
177
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
154
178
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
155
179
|
});
|
|
156
180
|
if (_response.ok) {
|
|
157
|
-
return
|
|
181
|
+
return serializers.GraphSearchResults.parseOrThrow(_response.body, {
|
|
158
182
|
unrecognizedObjectKeys: "passthrough",
|
|
159
183
|
allowUnrecognizedUnionMembers: true,
|
|
160
184
|
allowUnrecognizedEnumValues: true,
|
|
@@ -165,7 +189,7 @@ class Graph {
|
|
|
165
189
|
if (_response.error.reason === "status-code") {
|
|
166
190
|
switch (_response.error.statusCode) {
|
|
167
191
|
case 400:
|
|
168
|
-
throw new Zep.BadRequestError(
|
|
192
|
+
throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
169
193
|
unrecognizedObjectKeys: "passthrough",
|
|
170
194
|
allowUnrecognizedUnionMembers: true,
|
|
171
195
|
allowUnrecognizedEnumValues: true,
|
|
@@ -173,7 +197,7 @@ class Graph {
|
|
|
173
197
|
breadcrumbsPrefix: ["response"],
|
|
174
198
|
}));
|
|
175
199
|
case 500:
|
|
176
|
-
throw new Zep.InternalServerError(
|
|
200
|
+
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
177
201
|
unrecognizedObjectKeys: "passthrough",
|
|
178
202
|
allowUnrecognizedUnionMembers: true,
|
|
179
203
|
allowUnrecognizedEnumValues: true,
|
|
@@ -194,7 +218,7 @@ class Graph {
|
|
|
194
218
|
body: _response.error.rawBody,
|
|
195
219
|
});
|
|
196
220
|
case "timeout":
|
|
197
|
-
throw new errors.ZepTimeoutError();
|
|
221
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling POST /graph/search.");
|
|
198
222
|
case "unknown":
|
|
199
223
|
throw new errors.ZepError({
|
|
200
224
|
message: _response.error.errorMessage,
|
|
@@ -202,21 +226,9 @@ class Graph {
|
|
|
202
226
|
}
|
|
203
227
|
});
|
|
204
228
|
}
|
|
205
|
-
get edge() {
|
|
206
|
-
var _a;
|
|
207
|
-
return ((_a = this._edge) !== null && _a !== void 0 ? _a : (this._edge = new Client_1.Edge(this._options)));
|
|
208
|
-
}
|
|
209
|
-
get episode() {
|
|
210
|
-
var _a;
|
|
211
|
-
return ((_a = this._episode) !== null && _a !== void 0 ? _a : (this._episode = new Client_2.Episode(this._options)));
|
|
212
|
-
}
|
|
213
|
-
get node() {
|
|
214
|
-
var _a;
|
|
215
|
-
return ((_a = this._node) !== null && _a !== void 0 ? _a : (this._node = new Client_3.Node(this._options)));
|
|
216
|
-
}
|
|
217
229
|
_getCustomAuthorizationHeaders() {
|
|
218
|
-
var _a;
|
|
219
230
|
return __awaiter(this, void 0, void 0, function* () {
|
|
231
|
+
var _a;
|
|
220
232
|
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"];
|
|
221
233
|
return { Authorization: `Api-Key ${apiKeyValue}` };
|
|
222
234
|
});
|
|
@@ -11,9 +11,14 @@ export declare namespace Edge {
|
|
|
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 Edge {
|
|
@@ -29,7 +34,7 @@ export declare class Edge {
|
|
|
29
34
|
* @throws {@link Zep.InternalServerError}
|
|
30
35
|
*
|
|
31
36
|
* @example
|
|
32
|
-
* await
|
|
37
|
+
* await client.graph.edge.getByGroupId("group_id")
|
|
33
38
|
*/
|
|
34
39
|
getByGroupId(groupId: string, requestOptions?: Edge.RequestOptions): Promise<Zep.EntityEdge[]>;
|
|
35
40
|
/**
|
|
@@ -42,7 +47,7 @@ export declare class Edge {
|
|
|
42
47
|
* @throws {@link Zep.InternalServerError}
|
|
43
48
|
*
|
|
44
49
|
* @example
|
|
45
|
-
* await
|
|
50
|
+
* await client.graph.edge.getByUserId("user_id")
|
|
46
51
|
*/
|
|
47
52
|
getByUserId(userId: string, requestOptions?: Edge.RequestOptions): Promise<Zep.EntityEdge[]>;
|
|
48
53
|
/**
|
|
@@ -56,7 +61,7 @@ export declare class Edge {
|
|
|
56
61
|
* @throws {@link Zep.InternalServerError}
|
|
57
62
|
*
|
|
58
63
|
* @example
|
|
59
|
-
* await
|
|
64
|
+
* await client.graph.edge.get("uuid")
|
|
60
65
|
*/
|
|
61
66
|
get(uuid: string, requestOptions?: Edge.RequestOptions): Promise<Zep.EntityEdge>;
|
|
62
67
|
/**
|
|
@@ -69,7 +74,7 @@ export declare class Edge {
|
|
|
69
74
|
* @throws {@link Zep.InternalServerError}
|
|
70
75
|
*
|
|
71
76
|
* @example
|
|
72
|
-
* await
|
|
77
|
+
* await client.graph.edge.delete("uuid")
|
|
73
78
|
*/
|
|
74
79
|
delete(uuid: string, requestOptions?: Edge.RequestOptions): Promise<Zep.SuccessResponse>;
|
|
75
80
|
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,22 +69,23 @@ class Edge {
|
|
|
59
69
|
* @throws {@link Zep.InternalServerError}
|
|
60
70
|
*
|
|
61
71
|
* @example
|
|
62
|
-
* await
|
|
72
|
+
* await client.graph.edge.getByGroupId("group_id")
|
|
63
73
|
*/
|
|
64
74
|
getByGroupId(groupId, requestOptions) {
|
|
65
|
-
var _a, _b;
|
|
66
75
|
return __awaiter(this, void 0, void 0, function* () {
|
|
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, `graph/edge/group/${encodeURIComponent(groupId)}`),
|
|
69
79
|
method: "GET",
|
|
70
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.2.
|
|
80
|
+
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),
|
|
71
81
|
contentType: "application/json",
|
|
82
|
+
requestType: "json",
|
|
72
83
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
73
84
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
74
85
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
75
86
|
});
|
|
76
87
|
if (_response.ok) {
|
|
77
|
-
return
|
|
88
|
+
return serializers.graph.edge.getByGroupId.Response.parseOrThrow(_response.body, {
|
|
78
89
|
unrecognizedObjectKeys: "passthrough",
|
|
79
90
|
allowUnrecognizedUnionMembers: true,
|
|
80
91
|
allowUnrecognizedEnumValues: true,
|
|
@@ -85,7 +96,7 @@ class Edge {
|
|
|
85
96
|
if (_response.error.reason === "status-code") {
|
|
86
97
|
switch (_response.error.statusCode) {
|
|
87
98
|
case 400:
|
|
88
|
-
throw new Zep.BadRequestError(
|
|
99
|
+
throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
89
100
|
unrecognizedObjectKeys: "passthrough",
|
|
90
101
|
allowUnrecognizedUnionMembers: true,
|
|
91
102
|
allowUnrecognizedEnumValues: true,
|
|
@@ -93,7 +104,7 @@ class Edge {
|
|
|
93
104
|
breadcrumbsPrefix: ["response"],
|
|
94
105
|
}));
|
|
95
106
|
case 500:
|
|
96
|
-
throw new Zep.InternalServerError(
|
|
107
|
+
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
97
108
|
unrecognizedObjectKeys: "passthrough",
|
|
98
109
|
allowUnrecognizedUnionMembers: true,
|
|
99
110
|
allowUnrecognizedEnumValues: true,
|
|
@@ -114,7 +125,7 @@ class Edge {
|
|
|
114
125
|
body: _response.error.rawBody,
|
|
115
126
|
});
|
|
116
127
|
case "timeout":
|
|
117
|
-
throw new errors.ZepTimeoutError();
|
|
128
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /graph/edge/group/{group_id}.");
|
|
118
129
|
case "unknown":
|
|
119
130
|
throw new errors.ZepError({
|
|
120
131
|
message: _response.error.errorMessage,
|
|
@@ -132,22 +143,23 @@ class Edge {
|
|
|
132
143
|
* @throws {@link Zep.InternalServerError}
|
|
133
144
|
*
|
|
134
145
|
* @example
|
|
135
|
-
* await
|
|
146
|
+
* await client.graph.edge.getByUserId("user_id")
|
|
136
147
|
*/
|
|
137
148
|
getByUserId(userId, requestOptions) {
|
|
138
|
-
var _a, _b;
|
|
139
149
|
return __awaiter(this, void 0, void 0, function* () {
|
|
150
|
+
var _a, _b;
|
|
140
151
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
141
152
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `graph/edge/user/${encodeURIComponent(userId)}`),
|
|
142
153
|
method: "GET",
|
|
143
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.2.
|
|
154
|
+
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),
|
|
144
155
|
contentType: "application/json",
|
|
156
|
+
requestType: "json",
|
|
145
157
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
146
158
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
147
159
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
148
160
|
});
|
|
149
161
|
if (_response.ok) {
|
|
150
|
-
return
|
|
162
|
+
return serializers.graph.edge.getByUserId.Response.parseOrThrow(_response.body, {
|
|
151
163
|
unrecognizedObjectKeys: "passthrough",
|
|
152
164
|
allowUnrecognizedUnionMembers: true,
|
|
153
165
|
allowUnrecognizedEnumValues: true,
|
|
@@ -158,7 +170,7 @@ class Edge {
|
|
|
158
170
|
if (_response.error.reason === "status-code") {
|
|
159
171
|
switch (_response.error.statusCode) {
|
|
160
172
|
case 400:
|
|
161
|
-
throw new Zep.BadRequestError(
|
|
173
|
+
throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
162
174
|
unrecognizedObjectKeys: "passthrough",
|
|
163
175
|
allowUnrecognizedUnionMembers: true,
|
|
164
176
|
allowUnrecognizedEnumValues: true,
|
|
@@ -166,7 +178,7 @@ class Edge {
|
|
|
166
178
|
breadcrumbsPrefix: ["response"],
|
|
167
179
|
}));
|
|
168
180
|
case 500:
|
|
169
|
-
throw new Zep.InternalServerError(
|
|
181
|
+
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
170
182
|
unrecognizedObjectKeys: "passthrough",
|
|
171
183
|
allowUnrecognizedUnionMembers: true,
|
|
172
184
|
allowUnrecognizedEnumValues: true,
|
|
@@ -187,7 +199,7 @@ class Edge {
|
|
|
187
199
|
body: _response.error.rawBody,
|
|
188
200
|
});
|
|
189
201
|
case "timeout":
|
|
190
|
-
throw new errors.ZepTimeoutError();
|
|
202
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /graph/edge/user/{user_id}.");
|
|
191
203
|
case "unknown":
|
|
192
204
|
throw new errors.ZepError({
|
|
193
205
|
message: _response.error.errorMessage,
|
|
@@ -206,22 +218,23 @@ class Edge {
|
|
|
206
218
|
* @throws {@link Zep.InternalServerError}
|
|
207
219
|
*
|
|
208
220
|
* @example
|
|
209
|
-
* await
|
|
221
|
+
* await client.graph.edge.get("uuid")
|
|
210
222
|
*/
|
|
211
223
|
get(uuid, requestOptions) {
|
|
212
|
-
var _a, _b;
|
|
213
224
|
return __awaiter(this, void 0, void 0, function* () {
|
|
225
|
+
var _a, _b;
|
|
214
226
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
215
227
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `graph/edge/${encodeURIComponent(uuid)}`),
|
|
216
228
|
method: "GET",
|
|
217
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.2.
|
|
229
|
+
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),
|
|
218
230
|
contentType: "application/json",
|
|
231
|
+
requestType: "json",
|
|
219
232
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
220
233
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
221
234
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
222
235
|
});
|
|
223
236
|
if (_response.ok) {
|
|
224
|
-
return
|
|
237
|
+
return serializers.EntityEdge.parseOrThrow(_response.body, {
|
|
225
238
|
unrecognizedObjectKeys: "passthrough",
|
|
226
239
|
allowUnrecognizedUnionMembers: true,
|
|
227
240
|
allowUnrecognizedEnumValues: true,
|
|
@@ -232,7 +245,7 @@ class Edge {
|
|
|
232
245
|
if (_response.error.reason === "status-code") {
|
|
233
246
|
switch (_response.error.statusCode) {
|
|
234
247
|
case 400:
|
|
235
|
-
throw new Zep.BadRequestError(
|
|
248
|
+
throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
236
249
|
unrecognizedObjectKeys: "passthrough",
|
|
237
250
|
allowUnrecognizedUnionMembers: true,
|
|
238
251
|
allowUnrecognizedEnumValues: true,
|
|
@@ -240,7 +253,7 @@ class Edge {
|
|
|
240
253
|
breadcrumbsPrefix: ["response"],
|
|
241
254
|
}));
|
|
242
255
|
case 404:
|
|
243
|
-
throw new Zep.NotFoundError(
|
|
256
|
+
throw new Zep.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
244
257
|
unrecognizedObjectKeys: "passthrough",
|
|
245
258
|
allowUnrecognizedUnionMembers: true,
|
|
246
259
|
allowUnrecognizedEnumValues: true,
|
|
@@ -248,7 +261,7 @@ class Edge {
|
|
|
248
261
|
breadcrumbsPrefix: ["response"],
|
|
249
262
|
}));
|
|
250
263
|
case 500:
|
|
251
|
-
throw new Zep.InternalServerError(
|
|
264
|
+
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
252
265
|
unrecognizedObjectKeys: "passthrough",
|
|
253
266
|
allowUnrecognizedUnionMembers: true,
|
|
254
267
|
allowUnrecognizedEnumValues: true,
|
|
@@ -269,7 +282,7 @@ class Edge {
|
|
|
269
282
|
body: _response.error.rawBody,
|
|
270
283
|
});
|
|
271
284
|
case "timeout":
|
|
272
|
-
throw new errors.ZepTimeoutError();
|
|
285
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /graph/edge/{uuid}.");
|
|
273
286
|
case "unknown":
|
|
274
287
|
throw new errors.ZepError({
|
|
275
288
|
message: _response.error.errorMessage,
|
|
@@ -287,22 +300,23 @@ class Edge {
|
|
|
287
300
|
* @throws {@link Zep.InternalServerError}
|
|
288
301
|
*
|
|
289
302
|
* @example
|
|
290
|
-
* await
|
|
303
|
+
* await client.graph.edge.delete("uuid")
|
|
291
304
|
*/
|
|
292
305
|
delete(uuid, requestOptions) {
|
|
293
|
-
var _a, _b;
|
|
294
306
|
return __awaiter(this, void 0, void 0, function* () {
|
|
307
|
+
var _a, _b;
|
|
295
308
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
296
309
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `graph/edge/${encodeURIComponent(uuid)}`),
|
|
297
310
|
method: "DELETE",
|
|
298
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.2.
|
|
311
|
+
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),
|
|
299
312
|
contentType: "application/json",
|
|
313
|
+
requestType: "json",
|
|
300
314
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
301
315
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
302
316
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
303
317
|
});
|
|
304
318
|
if (_response.ok) {
|
|
305
|
-
return
|
|
319
|
+
return serializers.SuccessResponse.parseOrThrow(_response.body, {
|
|
306
320
|
unrecognizedObjectKeys: "passthrough",
|
|
307
321
|
allowUnrecognizedUnionMembers: true,
|
|
308
322
|
allowUnrecognizedEnumValues: true,
|
|
@@ -313,7 +327,7 @@ class Edge {
|
|
|
313
327
|
if (_response.error.reason === "status-code") {
|
|
314
328
|
switch (_response.error.statusCode) {
|
|
315
329
|
case 400:
|
|
316
|
-
throw new Zep.BadRequestError(
|
|
330
|
+
throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
317
331
|
unrecognizedObjectKeys: "passthrough",
|
|
318
332
|
allowUnrecognizedUnionMembers: true,
|
|
319
333
|
allowUnrecognizedEnumValues: true,
|
|
@@ -321,7 +335,7 @@ class Edge {
|
|
|
321
335
|
breadcrumbsPrefix: ["response"],
|
|
322
336
|
}));
|
|
323
337
|
case 500:
|
|
324
|
-
throw new Zep.InternalServerError(
|
|
338
|
+
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
325
339
|
unrecognizedObjectKeys: "passthrough",
|
|
326
340
|
allowUnrecognizedUnionMembers: true,
|
|
327
341
|
allowUnrecognizedEnumValues: true,
|
|
@@ -342,7 +356,7 @@ class Edge {
|
|
|
342
356
|
body: _response.error.rawBody,
|
|
343
357
|
});
|
|
344
358
|
case "timeout":
|
|
345
|
-
throw new errors.ZepTimeoutError();
|
|
359
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling DELETE /graph/edge/{uuid}.");
|
|
346
360
|
case "unknown":
|
|
347
361
|
throw new errors.ZepError({
|
|
348
362
|
message: _response.error.errorMessage,
|
|
@@ -351,8 +365,8 @@ class Edge {
|
|
|
351
365
|
});
|
|
352
366
|
}
|
|
353
367
|
_getCustomAuthorizationHeaders() {
|
|
354
|
-
var _a;
|
|
355
368
|
return __awaiter(this, void 0, void 0, function* () {
|
|
369
|
+
var _a;
|
|
356
370
|
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"];
|
|
357
371
|
return { Authorization: `Api-Key ${apiKeyValue}` };
|
|
358
372
|
});
|
|
@@ -11,9 +11,14 @@ export declare namespace Episode {
|
|
|
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 Episode {
|
|
@@ -30,7 +35,7 @@ export declare class Episode {
|
|
|
30
35
|
* @throws {@link Zep.InternalServerError}
|
|
31
36
|
*
|
|
32
37
|
* @example
|
|
33
|
-
* await
|
|
38
|
+
* await client.graph.episode.getByGroupId("group_id")
|
|
34
39
|
*/
|
|
35
40
|
getByGroupId(groupId: string, request?: Zep.graph.EpisodeGetByGroupIdRequest, requestOptions?: Episode.RequestOptions): Promise<Zep.EpisodeResponse>;
|
|
36
41
|
/**
|
|
@@ -44,7 +49,7 @@ export declare class Episode {
|
|
|
44
49
|
* @throws {@link Zep.InternalServerError}
|
|
45
50
|
*
|
|
46
51
|
* @example
|
|
47
|
-
* await
|
|
52
|
+
* await client.graph.episode.getByUserId("user_id")
|
|
48
53
|
*/
|
|
49
54
|
getByUserId(userId: string, request?: Zep.graph.EpisodeGetByUserIdRequest, requestOptions?: Episode.RequestOptions): Promise<Zep.EpisodeResponse>;
|
|
50
55
|
/**
|
|
@@ -57,7 +62,7 @@ export declare class Episode {
|
|
|
57
62
|
* @throws {@link Zep.InternalServerError}
|
|
58
63
|
*
|
|
59
64
|
* @example
|
|
60
|
-
* await
|
|
65
|
+
* await client.graph.episode.get("uuid")
|
|
61
66
|
*/
|
|
62
67
|
get(uuid: string, requestOptions?: Episode.RequestOptions): Promise<Zep.Episode>;
|
|
63
68
|
protected _getCustomAuthorizationHeaders(): Promise<{
|