@getzep/zep-cloud 2.2.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Client.d.ts +10 -5
- package/api/errors/BadRequestError.js +17 -7
- package/api/errors/ConflictError.js +17 -7
- package/api/errors/InternalServerError.js +17 -7
- package/api/errors/NotFoundError.js +17 -7
- package/api/errors/UnauthorizedError.js +17 -7
- package/api/resources/document/client/Client.d.ts +18 -13
- package/api/resources/document/client/Client.js +158 -141
- package/api/resources/graph/client/Client.d.ts +13 -8
- package/api/resources/graph/client/Client.js +50 -38
- package/api/resources/graph/resources/edge/client/Client.d.ts +9 -4
- package/api/resources/graph/resources/edge/client/Client.js +51 -37
- package/api/resources/graph/resources/episode/client/Client.d.ts +8 -3
- package/api/resources/graph/resources/episode/client/Client.js +46 -33
- package/api/resources/graph/resources/index.js +17 -7
- package/api/resources/graph/resources/node/client/Client.d.ts +8 -3
- package/api/resources/graph/resources/node/client/Client.js +43 -30
- package/api/resources/group/client/Client.d.ts +7 -2
- package/api/resources/group/client/Client.js +36 -24
- package/api/resources/index.js +17 -7
- package/api/resources/memory/client/Client.d.ts +28 -23
- package/api/resources/memory/client/Client.js +225 -195
- package/api/resources/memory/client/requests/AddMemoryRequest.d.ts +1 -1
- package/api/resources/user/client/Client.d.ts +12 -7
- package/api/resources/user/client/Client.js +82 -65
- package/api/types/GraphDataType.d.ts +1 -1
- package/api/types/GraphSearchScope.d.ts +1 -1
- package/api/types/Reranker.d.ts +1 -1
- package/api/types/RoleType.d.ts +1 -1
- package/api/types/SearchScope.d.ts +1 -1
- package/api/types/SearchType.d.ts +1 -1
- package/core/fetcher/APIResponse.d.ts +1 -1
- package/core/fetcher/Fetcher.d.ts +5 -2
- package/core/fetcher/Fetcher.js +18 -175
- package/core/fetcher/Supplier.d.ts +1 -1
- package/core/fetcher/createRequestUrl.d.ts +1 -0
- package/core/fetcher/createRequestUrl.js +12 -0
- package/core/fetcher/getFetchFn.d.ts +4 -0
- package/core/fetcher/getFetchFn.js +68 -0
- package/core/fetcher/getHeader.js +1 -2
- package/core/fetcher/getRequestBody.d.ts +7 -0
- package/core/fetcher/getRequestBody.js +22 -0
- package/core/fetcher/getResponseBody.d.ts +1 -0
- package/core/fetcher/getResponseBody.js +54 -0
- package/core/fetcher/makeRequest.d.ts +1 -0
- package/core/fetcher/makeRequest.js +42 -0
- package/core/fetcher/requestWithRetries.d.ts +1 -0
- package/core/fetcher/requestWithRetries.js +40 -0
- package/core/fetcher/signals.d.ts +11 -0
- package/core/fetcher/signals.js +36 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +21 -0
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +126 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +59 -0
- package/core/index.js +17 -7
- package/core/runtime/runtime.d.ts +2 -1
- package/core/runtime/runtime.js +12 -1
- package/core/schemas/Schema.d.ts +13 -9
- package/core/schemas/Schema.js +1 -0
- package/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/core/schemas/builders/bigint/bigint.js +49 -0
- package/core/schemas/builders/bigint/index.d.ts +1 -0
- package/core/schemas/builders/bigint/index.js +5 -0
- package/core/schemas/builders/date/date.js +1 -2
- package/core/schemas/builders/enum/enum.js +1 -2
- package/core/schemas/builders/index.d.ts +1 -0
- package/core/schemas/builders/index.js +1 -0
- package/core/schemas/builders/lazy/lazy.d.ts +2 -2
- package/core/schemas/builders/lazy/lazy.js +11 -23
- package/core/schemas/builders/lazy/lazyObject.js +2 -12
- package/core/schemas/builders/list/list.js +32 -46
- package/core/schemas/builders/literals/booleanLiteral.js +1 -2
- package/core/schemas/builders/literals/stringLiteral.js +1 -2
- package/core/schemas/builders/object/object.d.ts +1 -1
- package/core/schemas/builders/object/object.js +120 -114
- package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
- package/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
- package/core/schemas/builders/object/property.js +2 -3
- package/core/schemas/builders/object/types.d.ts +18 -13
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +5 -15
- package/core/schemas/builders/object-like/types.d.ts +1 -1
- package/core/schemas/builders/record/record.js +50 -62
- package/core/schemas/builders/record/types.d.ts +2 -2
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +21 -25
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
- package/core/schemas/builders/set/set.js +7 -17
- package/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +22 -34
- package/core/schemas/builders/union/discriminant.js +1 -2
- package/core/schemas/builders/union/types.d.ts +6 -6
- package/core/schemas/builders/union/union.d.ts +1 -1
- package/core/schemas/builders/union/union.js +52 -64
- package/core/schemas/utils/MaybePromise.d.ts +1 -1
- package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +3 -3
- package/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
- package/core/schemas/utils/entries.d.ts +1 -1
- package/core/schemas/utils/entries.js +1 -2
- package/core/schemas/utils/filterObject.d.ts +1 -1
- package/core/schemas/utils/filterObject.js +1 -2
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +5 -2
- package/core/schemas/utils/isPlainObject.js +1 -2
- package/core/schemas/utils/keys.d.ts +1 -1
- package/core/schemas/utils/keys.js +1 -2
- package/core/schemas/utils/maybeSkipValidation.js +4 -14
- package/core/schemas/utils/partition.js +1 -2
- package/dist/Client.d.ts +10 -5
- package/dist/api/errors/BadRequestError.js +17 -7
- package/dist/api/errors/ConflictError.js +17 -7
- package/dist/api/errors/InternalServerError.js +17 -7
- package/dist/api/errors/NotFoundError.js +17 -7
- package/dist/api/errors/UnauthorizedError.js +17 -7
- package/dist/api/resources/document/client/Client.d.ts +18 -13
- package/dist/api/resources/document/client/Client.js +158 -141
- package/dist/api/resources/graph/client/Client.d.ts +13 -8
- package/dist/api/resources/graph/client/Client.js +50 -38
- package/dist/api/resources/graph/resources/edge/client/Client.d.ts +9 -4
- package/dist/api/resources/graph/resources/edge/client/Client.js +51 -37
- package/dist/api/resources/graph/resources/episode/client/Client.d.ts +8 -3
- package/dist/api/resources/graph/resources/episode/client/Client.js +46 -33
- package/dist/api/resources/graph/resources/index.js +17 -7
- package/dist/api/resources/graph/resources/node/client/Client.d.ts +8 -3
- package/dist/api/resources/graph/resources/node/client/Client.js +43 -30
- package/dist/api/resources/group/client/Client.d.ts +7 -2
- package/dist/api/resources/group/client/Client.js +36 -24
- package/dist/api/resources/index.js +17 -7
- package/dist/api/resources/memory/client/Client.d.ts +28 -23
- package/dist/api/resources/memory/client/Client.js +225 -195
- package/dist/api/resources/memory/client/requests/AddMemoryRequest.d.ts +1 -1
- package/dist/api/resources/user/client/Client.d.ts +12 -7
- package/dist/api/resources/user/client/Client.js +82 -65
- package/dist/api/types/GraphDataType.d.ts +1 -1
- package/dist/api/types/GraphSearchScope.d.ts +1 -1
- package/dist/api/types/Reranker.d.ts +1 -1
- package/dist/api/types/RoleType.d.ts +1 -1
- package/dist/api/types/SearchScope.d.ts +1 -1
- package/dist/api/types/SearchType.d.ts +1 -1
- package/dist/core/fetcher/APIResponse.d.ts +1 -1
- package/dist/core/fetcher/Fetcher.d.ts +5 -2
- package/dist/core/fetcher/Fetcher.js +18 -175
- package/dist/core/fetcher/Supplier.d.ts +1 -1
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/core/fetcher/createRequestUrl.js +12 -0
- package/dist/core/fetcher/getFetchFn.d.ts +4 -0
- package/dist/core/fetcher/getFetchFn.js +68 -0
- package/dist/core/fetcher/getHeader.js +1 -2
- package/dist/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/core/fetcher/getRequestBody.js +22 -0
- package/dist/core/fetcher/getResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getResponseBody.js +54 -0
- package/dist/core/fetcher/makeRequest.d.ts +1 -0
- package/dist/core/fetcher/makeRequest.js +42 -0
- package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
- package/dist/core/fetcher/requestWithRetries.js +40 -0
- package/dist/core/fetcher/signals.d.ts +11 -0
- package/dist/core/fetcher/signals.js +36 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
- package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +21 -0
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +126 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +59 -0
- package/dist/core/index.js +17 -7
- package/dist/core/runtime/runtime.d.ts +2 -1
- package/dist/core/runtime/runtime.js +12 -1
- package/dist/core/schemas/Schema.d.ts +13 -9
- package/dist/core/schemas/Schema.js +1 -0
- package/dist/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/dist/core/schemas/builders/bigint/bigint.js +49 -0
- package/dist/core/schemas/builders/bigint/index.d.ts +1 -0
- package/dist/core/schemas/builders/bigint/index.js +5 -0
- package/dist/core/schemas/builders/date/date.js +1 -2
- package/dist/core/schemas/builders/enum/enum.js +1 -2
- package/dist/core/schemas/builders/index.d.ts +1 -0
- package/dist/core/schemas/builders/index.js +1 -0
- package/dist/core/schemas/builders/lazy/lazy.d.ts +2 -2
- package/dist/core/schemas/builders/lazy/lazy.js +11 -23
- package/dist/core/schemas/builders/lazy/lazyObject.js +2 -12
- package/dist/core/schemas/builders/list/list.js +32 -46
- package/dist/core/schemas/builders/literals/booleanLiteral.js +1 -2
- package/dist/core/schemas/builders/literals/stringLiteral.js +1 -2
- package/dist/core/schemas/builders/object/object.d.ts +1 -1
- package/dist/core/schemas/builders/object/object.js +120 -114
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
- package/dist/core/schemas/builders/object/property.js +2 -3
- package/dist/core/schemas/builders/object/types.d.ts +18 -13
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +5 -15
- package/dist/core/schemas/builders/object-like/types.d.ts +1 -1
- package/dist/core/schemas/builders/record/record.js +50 -62
- package/dist/core/schemas/builders/record/types.d.ts +2 -2
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +21 -25
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
- package/dist/core/schemas/builders/set/set.js +7 -17
- package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +22 -34
- package/dist/core/schemas/builders/union/discriminant.js +1 -2
- package/dist/core/schemas/builders/union/types.d.ts +6 -6
- package/dist/core/schemas/builders/union/union.d.ts +1 -1
- package/dist/core/schemas/builders/union/union.js +52 -64
- package/dist/core/schemas/utils/MaybePromise.d.ts +1 -1
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +3 -3
- package/dist/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
- package/dist/core/schemas/utils/entries.d.ts +1 -1
- package/dist/core/schemas/utils/entries.js +1 -2
- package/dist/core/schemas/utils/filterObject.d.ts +1 -1
- package/dist/core/schemas/utils/filterObject.js +1 -2
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +5 -2
- package/dist/core/schemas/utils/isPlainObject.js +1 -2
- package/dist/core/schemas/utils/keys.d.ts +1 -1
- package/dist/core/schemas/utils/keys.js +1 -2
- package/dist/core/schemas/utils/maybeSkipValidation.js +4 -14
- package/dist/core/schemas/utils/partition.js +1 -2
- package/dist/environments.d.ts +1 -1
- package/dist/errors/ZepTimeoutError.d.ts +1 -1
- package/dist/errors/ZepTimeoutError.js +2 -2
- package/dist/extractor/base.js +1 -1
- package/dist/extractor/index.d.ts +2 -2
- package/dist/index.js +17 -7
- package/dist/serialization/resources/document/client/addDocuments.js +17 -7
- package/dist/serialization/resources/document/client/batchDeleteDocuments.js +17 -7
- package/dist/serialization/resources/document/client/batchGetDocuments.js +17 -7
- package/dist/serialization/resources/document/client/batchUpdateDocuments.js +17 -7
- package/dist/serialization/resources/document/client/index.js +17 -7
- package/dist/serialization/resources/document/client/listCollections.js +17 -7
- package/dist/serialization/resources/document/client/requests/CreateDocumentCollectionRequest.js +17 -7
- package/dist/serialization/resources/document/client/requests/DocumentSearchPayload.js +17 -7
- package/dist/serialization/resources/document/client/requests/GetDocumentListRequest.js +17 -7
- package/dist/serialization/resources/document/client/requests/UpdateDocumentCollectionRequest.js +17 -7
- package/dist/serialization/resources/document/client/requests/UpdateDocumentRequest.js +17 -7
- package/dist/serialization/resources/graph/client/requests/AddDataRequest.js +17 -7
- package/dist/serialization/resources/graph/client/requests/GraphSearchQuery.js +17 -7
- package/dist/serialization/resources/graph/resources/edge/client/getByGroupId.js +17 -7
- package/dist/serialization/resources/graph/resources/edge/client/getByUserId.js +17 -7
- package/dist/serialization/resources/graph/resources/edge/client/index.js +17 -7
- package/dist/serialization/resources/graph/resources/index.js +17 -7
- package/dist/serialization/resources/graph/resources/node/client/getByGroupId.js +17 -7
- package/dist/serialization/resources/graph/resources/node/client/getByUserId.js +17 -7
- package/dist/serialization/resources/graph/resources/node/client/index.js +17 -7
- package/dist/serialization/resources/group/client/requests/CreateGroupRequest.js +17 -7
- package/dist/serialization/resources/index.js +17 -7
- package/dist/serialization/resources/memory/client/extractData.js +17 -7
- package/dist/serialization/resources/memory/client/index.js +17 -7
- package/dist/serialization/resources/memory/client/requests/AddFactsRequest.js +17 -7
- package/dist/serialization/resources/memory/client/requests/AddMemoryRequest.js +17 -7
- package/dist/serialization/resources/memory/client/requests/CreateSessionRequest.js +17 -7
- package/dist/serialization/resources/memory/client/requests/EndSessionRequest.js +17 -7
- package/dist/serialization/resources/memory/client/requests/EndSessionsRequest.js +17 -7
- package/dist/serialization/resources/memory/client/requests/ExtractDataRequest.js +17 -7
- package/dist/serialization/resources/memory/client/requests/MemorySearchPayload.js +17 -7
- package/dist/serialization/resources/memory/client/requests/ModelsMessageMetadataUpdate.js +17 -7
- package/dist/serialization/resources/memory/client/requests/SessionSearchQuery.js +17 -7
- package/dist/serialization/resources/memory/client/requests/UpdateSessionRequest.js +17 -7
- package/dist/serialization/resources/memory/client/search.js +17 -7
- package/dist/serialization/resources/user/client/getSessions.js +17 -7
- package/dist/serialization/resources/user/client/index.js +17 -7
- package/dist/serialization/resources/user/client/requests/CreateUserRequest.js +17 -7
- package/dist/serialization/resources/user/client/requests/UpdateUserRequest.js +17 -7
- package/dist/serialization/types/AddMemoryResponse.js +17 -7
- package/dist/serialization/types/ApiError.js +17 -7
- package/dist/serialization/types/ApidataDocument.js +17 -7
- package/dist/serialization/types/ApidataDocumentCollection.js +17 -7
- package/dist/serialization/types/ApidataDocumentSearchResponse.js +17 -7
- package/dist/serialization/types/ApidataDocumentWithScore.js +17 -7
- package/dist/serialization/types/ApidataFactRatingExamples.js +17 -7
- package/dist/serialization/types/ApidataFactRatingInstruction.js +17 -7
- package/dist/serialization/types/ClassifySessionRequest.js +17 -7
- package/dist/serialization/types/CreateDocumentRequest.js +17 -7
- package/dist/serialization/types/EndSessionResponse.js +17 -7
- package/dist/serialization/types/EndSessionsResponse.js +17 -7
- package/dist/serialization/types/EntityEdge.js +17 -7
- package/dist/serialization/types/EntityNode.js +17 -7
- package/dist/serialization/types/Episode.js +17 -7
- package/dist/serialization/types/EpisodeResponse.js +17 -7
- package/dist/serialization/types/Fact.js +17 -7
- package/dist/serialization/types/FactRatingExamples.js +17 -7
- package/dist/serialization/types/FactRatingInstruction.js +17 -7
- package/dist/serialization/types/FactResponse.js +17 -7
- package/dist/serialization/types/FactsResponse.js +17 -7
- package/dist/serialization/types/GraphDataType.js +17 -7
- package/dist/serialization/types/GraphSearchResults.js +17 -7
- package/dist/serialization/types/GraphSearchScope.js +17 -7
- package/dist/serialization/types/Group.js +17 -7
- package/dist/serialization/types/Memory.js +17 -7
- package/dist/serialization/types/MemorySearchResult.js +17 -7
- package/dist/serialization/types/Message.js +17 -7
- package/dist/serialization/types/MessageListResponse.js +17 -7
- package/dist/serialization/types/NewFact.js +17 -7
- package/dist/serialization/types/Question.js +17 -7
- package/dist/serialization/types/Reranker.js +17 -7
- package/dist/serialization/types/RoleType.js +17 -7
- package/dist/serialization/types/SearchScope.js +17 -7
- package/dist/serialization/types/SearchType.js +17 -7
- package/dist/serialization/types/Session.js +17 -7
- package/dist/serialization/types/SessionClassification.js +17 -7
- package/dist/serialization/types/SessionListResponse.js +17 -7
- package/dist/serialization/types/SessionSearchResponse.js +17 -7
- package/dist/serialization/types/SessionSearchResult.js +17 -7
- package/dist/serialization/types/SuccessResponse.js +17 -7
- package/dist/serialization/types/Summary.js +17 -7
- package/dist/serialization/types/SummaryListResponse.js +17 -7
- package/dist/serialization/types/UpdateDocumentListRequest.js +17 -7
- package/dist/serialization/types/User.js +17 -7
- package/dist/serialization/types/UserListResponse.js +17 -7
- package/dist/version.d.ts +1 -0
- package/dist/version.js +4 -0
- package/environments.d.ts +1 -1
- package/errors/ZepTimeoutError.d.ts +1 -1
- package/errors/ZepTimeoutError.js +2 -2
- package/extractor/base.js +1 -1
- package/extractor/index.d.ts +2 -2
- package/index.js +17 -7
- package/{jest.config.js → jest.config.mjs} +4 -1
- package/package.json +25 -16
- package/reference.md +3801 -0
- package/scripts/rename-to-esm-files.js +115 -0
- package/serialization/resources/document/client/addDocuments.js +17 -7
- package/serialization/resources/document/client/batchDeleteDocuments.js +17 -7
- package/serialization/resources/document/client/batchGetDocuments.js +17 -7
- package/serialization/resources/document/client/batchUpdateDocuments.js +17 -7
- package/serialization/resources/document/client/index.js +17 -7
- package/serialization/resources/document/client/listCollections.js +17 -7
- package/serialization/resources/document/client/requests/CreateDocumentCollectionRequest.js +17 -7
- package/serialization/resources/document/client/requests/DocumentSearchPayload.js +17 -7
- package/serialization/resources/document/client/requests/GetDocumentListRequest.js +17 -7
- package/serialization/resources/document/client/requests/UpdateDocumentCollectionRequest.js +17 -7
- package/serialization/resources/document/client/requests/UpdateDocumentRequest.js +17 -7
- package/serialization/resources/graph/client/requests/AddDataRequest.js +17 -7
- package/serialization/resources/graph/client/requests/GraphSearchQuery.js +17 -7
- package/serialization/resources/graph/resources/edge/client/getByGroupId.js +17 -7
- package/serialization/resources/graph/resources/edge/client/getByUserId.js +17 -7
- package/serialization/resources/graph/resources/edge/client/index.js +17 -7
- package/serialization/resources/graph/resources/index.js +17 -7
- package/serialization/resources/graph/resources/node/client/getByGroupId.js +17 -7
- package/serialization/resources/graph/resources/node/client/getByUserId.js +17 -7
- package/serialization/resources/graph/resources/node/client/index.js +17 -7
- package/serialization/resources/group/client/requests/CreateGroupRequest.js +17 -7
- package/serialization/resources/index.js +17 -7
- package/serialization/resources/memory/client/extractData.js +17 -7
- package/serialization/resources/memory/client/index.js +17 -7
- package/serialization/resources/memory/client/requests/AddFactsRequest.js +17 -7
- package/serialization/resources/memory/client/requests/AddMemoryRequest.js +17 -7
- package/serialization/resources/memory/client/requests/CreateSessionRequest.js +17 -7
- package/serialization/resources/memory/client/requests/EndSessionRequest.js +17 -7
- package/serialization/resources/memory/client/requests/EndSessionsRequest.js +17 -7
- package/serialization/resources/memory/client/requests/ExtractDataRequest.js +17 -7
- package/serialization/resources/memory/client/requests/MemorySearchPayload.js +17 -7
- package/serialization/resources/memory/client/requests/ModelsMessageMetadataUpdate.js +17 -7
- package/serialization/resources/memory/client/requests/SessionSearchQuery.js +17 -7
- package/serialization/resources/memory/client/requests/UpdateSessionRequest.js +17 -7
- package/serialization/resources/memory/client/search.js +17 -7
- package/serialization/resources/user/client/getSessions.js +17 -7
- package/serialization/resources/user/client/index.js +17 -7
- package/serialization/resources/user/client/requests/CreateUserRequest.js +17 -7
- package/serialization/resources/user/client/requests/UpdateUserRequest.js +17 -7
- package/serialization/types/AddMemoryResponse.js +17 -7
- package/serialization/types/ApiError.js +17 -7
- package/serialization/types/ApidataDocument.js +17 -7
- package/serialization/types/ApidataDocumentCollection.js +17 -7
- package/serialization/types/ApidataDocumentSearchResponse.js +17 -7
- package/serialization/types/ApidataDocumentWithScore.js +17 -7
- package/serialization/types/ApidataFactRatingExamples.js +17 -7
- package/serialization/types/ApidataFactRatingInstruction.js +17 -7
- package/serialization/types/ClassifySessionRequest.js +17 -7
- package/serialization/types/CreateDocumentRequest.js +17 -7
- package/serialization/types/EndSessionResponse.js +17 -7
- package/serialization/types/EndSessionsResponse.js +17 -7
- package/serialization/types/EntityEdge.js +17 -7
- package/serialization/types/EntityNode.js +17 -7
- package/serialization/types/Episode.js +17 -7
- package/serialization/types/EpisodeResponse.js +17 -7
- package/serialization/types/Fact.js +17 -7
- package/serialization/types/FactRatingExamples.js +17 -7
- package/serialization/types/FactRatingInstruction.js +17 -7
- package/serialization/types/FactResponse.js +17 -7
- package/serialization/types/FactsResponse.js +17 -7
- package/serialization/types/GraphDataType.js +17 -7
- package/serialization/types/GraphSearchResults.js +17 -7
- package/serialization/types/GraphSearchScope.js +17 -7
- package/serialization/types/Group.js +17 -7
- package/serialization/types/Memory.js +17 -7
- package/serialization/types/MemorySearchResult.js +17 -7
- package/serialization/types/Message.js +17 -7
- package/serialization/types/MessageListResponse.js +17 -7
- package/serialization/types/NewFact.js +17 -7
- package/serialization/types/Question.js +17 -7
- package/serialization/types/Reranker.js +17 -7
- package/serialization/types/RoleType.js +17 -7
- package/serialization/types/SearchScope.js +17 -7
- package/serialization/types/SearchType.js +17 -7
- package/serialization/types/Session.js +17 -7
- package/serialization/types/SessionClassification.js +17 -7
- package/serialization/types/SessionListResponse.js +17 -7
- package/serialization/types/SessionSearchResponse.js +17 -7
- package/serialization/types/SessionSearchResult.js +17 -7
- package/serialization/types/SuccessResponse.js +17 -7
- package/serialization/types/Summary.js +17 -7
- package/serialization/types/SummaryListResponse.js +17 -7
- package/serialization/types/UpdateDocumentListRequest.js +17 -7
- package/serialization/types/User.js +17 -7
- package/serialization/types/UserListResponse.js +17 -7
- package/version.d.ts +1 -0
- package/version.js +4 -0
|
@@ -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) {
|
|
@@ -60,11 +70,11 @@ class Episode {
|
|
|
60
70
|
* @throws {@link Zep.InternalServerError}
|
|
61
71
|
*
|
|
62
72
|
* @example
|
|
63
|
-
* await
|
|
73
|
+
* await client.graph.episode.getByGroupId("group_id")
|
|
64
74
|
*/
|
|
65
|
-
getByGroupId(
|
|
66
|
-
|
|
67
|
-
|
|
75
|
+
getByGroupId(groupId_1) {
|
|
76
|
+
return __awaiter(this, arguments, void 0, function* (groupId, request = {}, requestOptions) {
|
|
77
|
+
var _a, _b;
|
|
68
78
|
const { lastn } = request;
|
|
69
79
|
const _queryParams = {};
|
|
70
80
|
if (lastn != null) {
|
|
@@ -73,15 +83,16 @@ class Episode {
|
|
|
73
83
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
74
84
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `graph/episodes/group/${encodeURIComponent(groupId)}`),
|
|
75
85
|
method: "GET",
|
|
76
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
86
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.3.0", "User-Agent": "zep-cloud/2.3.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
77
87
|
contentType: "application/json",
|
|
78
88
|
queryParameters: _queryParams,
|
|
89
|
+
requestType: "json",
|
|
79
90
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
80
91
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
81
92
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
82
93
|
});
|
|
83
94
|
if (_response.ok) {
|
|
84
|
-
return
|
|
95
|
+
return serializers.EpisodeResponse.parseOrThrow(_response.body, {
|
|
85
96
|
unrecognizedObjectKeys: "passthrough",
|
|
86
97
|
allowUnrecognizedUnionMembers: true,
|
|
87
98
|
allowUnrecognizedEnumValues: true,
|
|
@@ -92,7 +103,7 @@ class Episode {
|
|
|
92
103
|
if (_response.error.reason === "status-code") {
|
|
93
104
|
switch (_response.error.statusCode) {
|
|
94
105
|
case 400:
|
|
95
|
-
throw new Zep.BadRequestError(
|
|
106
|
+
throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
96
107
|
unrecognizedObjectKeys: "passthrough",
|
|
97
108
|
allowUnrecognizedUnionMembers: true,
|
|
98
109
|
allowUnrecognizedEnumValues: true,
|
|
@@ -100,7 +111,7 @@ class Episode {
|
|
|
100
111
|
breadcrumbsPrefix: ["response"],
|
|
101
112
|
}));
|
|
102
113
|
case 500:
|
|
103
|
-
throw new Zep.InternalServerError(
|
|
114
|
+
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
104
115
|
unrecognizedObjectKeys: "passthrough",
|
|
105
116
|
allowUnrecognizedUnionMembers: true,
|
|
106
117
|
allowUnrecognizedEnumValues: true,
|
|
@@ -121,7 +132,7 @@ class Episode {
|
|
|
121
132
|
body: _response.error.rawBody,
|
|
122
133
|
});
|
|
123
134
|
case "timeout":
|
|
124
|
-
throw new errors.ZepTimeoutError();
|
|
135
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /graph/episodes/group/{group_id}.");
|
|
125
136
|
case "unknown":
|
|
126
137
|
throw new errors.ZepError({
|
|
127
138
|
message: _response.error.errorMessage,
|
|
@@ -140,11 +151,11 @@ class Episode {
|
|
|
140
151
|
* @throws {@link Zep.InternalServerError}
|
|
141
152
|
*
|
|
142
153
|
* @example
|
|
143
|
-
* await
|
|
154
|
+
* await client.graph.episode.getByUserId("user_id")
|
|
144
155
|
*/
|
|
145
|
-
getByUserId(
|
|
146
|
-
|
|
147
|
-
|
|
156
|
+
getByUserId(userId_1) {
|
|
157
|
+
return __awaiter(this, arguments, void 0, function* (userId, request = {}, requestOptions) {
|
|
158
|
+
var _a, _b;
|
|
148
159
|
const { lastn } = request;
|
|
149
160
|
const _queryParams = {};
|
|
150
161
|
if (lastn != null) {
|
|
@@ -153,15 +164,16 @@ class Episode {
|
|
|
153
164
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
154
165
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `graph/episodes/user/${encodeURIComponent(userId)}`),
|
|
155
166
|
method: "GET",
|
|
156
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
167
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.3.0", "User-Agent": "zep-cloud/2.3.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
157
168
|
contentType: "application/json",
|
|
158
169
|
queryParameters: _queryParams,
|
|
170
|
+
requestType: "json",
|
|
159
171
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
160
172
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
161
173
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
162
174
|
});
|
|
163
175
|
if (_response.ok) {
|
|
164
|
-
return
|
|
176
|
+
return serializers.EpisodeResponse.parseOrThrow(_response.body, {
|
|
165
177
|
unrecognizedObjectKeys: "passthrough",
|
|
166
178
|
allowUnrecognizedUnionMembers: true,
|
|
167
179
|
allowUnrecognizedEnumValues: true,
|
|
@@ -172,7 +184,7 @@ class Episode {
|
|
|
172
184
|
if (_response.error.reason === "status-code") {
|
|
173
185
|
switch (_response.error.statusCode) {
|
|
174
186
|
case 400:
|
|
175
|
-
throw new Zep.BadRequestError(
|
|
187
|
+
throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
176
188
|
unrecognizedObjectKeys: "passthrough",
|
|
177
189
|
allowUnrecognizedUnionMembers: true,
|
|
178
190
|
allowUnrecognizedEnumValues: true,
|
|
@@ -180,7 +192,7 @@ class Episode {
|
|
|
180
192
|
breadcrumbsPrefix: ["response"],
|
|
181
193
|
}));
|
|
182
194
|
case 500:
|
|
183
|
-
throw new Zep.InternalServerError(
|
|
195
|
+
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
184
196
|
unrecognizedObjectKeys: "passthrough",
|
|
185
197
|
allowUnrecognizedUnionMembers: true,
|
|
186
198
|
allowUnrecognizedEnumValues: true,
|
|
@@ -201,7 +213,7 @@ class Episode {
|
|
|
201
213
|
body: _response.error.rawBody,
|
|
202
214
|
});
|
|
203
215
|
case "timeout":
|
|
204
|
-
throw new errors.ZepTimeoutError();
|
|
216
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /graph/episodes/user/{user_id}.");
|
|
205
217
|
case "unknown":
|
|
206
218
|
throw new errors.ZepError({
|
|
207
219
|
message: _response.error.errorMessage,
|
|
@@ -219,22 +231,23 @@ class Episode {
|
|
|
219
231
|
* @throws {@link Zep.InternalServerError}
|
|
220
232
|
*
|
|
221
233
|
* @example
|
|
222
|
-
* await
|
|
234
|
+
* await client.graph.episode.get("uuid")
|
|
223
235
|
*/
|
|
224
236
|
get(uuid, requestOptions) {
|
|
225
|
-
var _a, _b;
|
|
226
237
|
return __awaiter(this, void 0, void 0, function* () {
|
|
238
|
+
var _a, _b;
|
|
227
239
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
228
240
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `graph/episodes/${encodeURIComponent(uuid)}`),
|
|
229
241
|
method: "GET",
|
|
230
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
242
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.3.0", "User-Agent": "zep-cloud/2.3.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
231
243
|
contentType: "application/json",
|
|
244
|
+
requestType: "json",
|
|
232
245
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
233
246
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
234
247
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
235
248
|
});
|
|
236
249
|
if (_response.ok) {
|
|
237
|
-
return
|
|
250
|
+
return serializers.Episode.parseOrThrow(_response.body, {
|
|
238
251
|
unrecognizedObjectKeys: "passthrough",
|
|
239
252
|
allowUnrecognizedUnionMembers: true,
|
|
240
253
|
allowUnrecognizedEnumValues: true,
|
|
@@ -245,7 +258,7 @@ class Episode {
|
|
|
245
258
|
if (_response.error.reason === "status-code") {
|
|
246
259
|
switch (_response.error.statusCode) {
|
|
247
260
|
case 400:
|
|
248
|
-
throw new Zep.BadRequestError(
|
|
261
|
+
throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
249
262
|
unrecognizedObjectKeys: "passthrough",
|
|
250
263
|
allowUnrecognizedUnionMembers: true,
|
|
251
264
|
allowUnrecognizedEnumValues: true,
|
|
@@ -253,7 +266,7 @@ class Episode {
|
|
|
253
266
|
breadcrumbsPrefix: ["response"],
|
|
254
267
|
}));
|
|
255
268
|
case 500:
|
|
256
|
-
throw new Zep.InternalServerError(
|
|
269
|
+
throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
257
270
|
unrecognizedObjectKeys: "passthrough",
|
|
258
271
|
allowUnrecognizedUnionMembers: true,
|
|
259
272
|
allowUnrecognizedEnumValues: true,
|
|
@@ -274,7 +287,7 @@ class Episode {
|
|
|
274
287
|
body: _response.error.rawBody,
|
|
275
288
|
});
|
|
276
289
|
case "timeout":
|
|
277
|
-
throw new errors.ZepTimeoutError();
|
|
290
|
+
throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /graph/episodes/{uuid}.");
|
|
278
291
|
case "unknown":
|
|
279
292
|
throw new errors.ZepError({
|
|
280
293
|
message: _response.error.errorMessage,
|
|
@@ -283,8 +296,8 @@ class Episode {
|
|
|
283
296
|
});
|
|
284
297
|
}
|
|
285
298
|
_getCustomAuthorizationHeaders() {
|
|
286
|
-
var _a;
|
|
287
299
|
return __awaiter(this, void 0, void 0, function* () {
|
|
300
|
+
var _a;
|
|
288
301
|
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"];
|
|
289
302
|
return { Authorization: `Api-Key ${apiKeyValue}` };
|
|
290
303
|
});
|
|
@@ -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 Node {
|
|
|
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 Node {
|
|
@@ -29,7 +34,7 @@ export declare class Node {
|
|
|
29
34
|
* @throws {@link Zep.InternalServerError}
|
|
30
35
|
*
|
|
31
36
|
* @example
|
|
32
|
-
* await
|
|
37
|
+
* await client.graph.node.getByGroupId("group_id")
|
|
33
38
|
*/
|
|
34
39
|
getByGroupId(groupId: string, requestOptions?: Node.RequestOptions): Promise<Zep.EntityNode[]>;
|
|
35
40
|
/**
|
|
@@ -42,7 +47,7 @@ export declare class Node {
|
|
|
42
47
|
* @throws {@link Zep.InternalServerError}
|
|
43
48
|
*
|
|
44
49
|
* @example
|
|
45
|
-
* await
|
|
50
|
+
* await client.graph.node.getByUserId("user_id")
|
|
46
51
|
*/
|
|
47
52
|
getByUserId(userId: string, requestOptions?: Node.RequestOptions): Promise<Zep.EntityNode[]>;
|
|
48
53
|
/**
|
|
@@ -56,7 +61,7 @@ export declare class Node {
|
|
|
56
61
|
* @throws {@link Zep.InternalServerError}
|
|
57
62
|
*
|
|
58
63
|
* @example
|
|
59
|
-
* await
|
|
64
|
+
* await client.graph.node.get("uuid")
|
|
60
65
|
*/
|
|
61
66
|
get(uuid: string, requestOptions?: Node.RequestOptions): Promise<Zep.EntityNode>;
|
|
62
67
|
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 Node {
|
|
|
59
69
|
* @throws {@link Zep.InternalServerError}
|
|
60
70
|
*
|
|
61
71
|
* @example
|
|
62
|
-
* await
|
|
72
|
+
* await client.graph.node.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/node/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.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
80
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.3.0", "User-Agent": "zep-cloud/2.3.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
71
81
|
contentType: "application/json",
|
|
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.node.getByGroupId.Response.parseOrThrow(_response.body, {
|
|
78
89
|
unrecognizedObjectKeys: "passthrough",
|
|
79
90
|
allowUnrecognizedUnionMembers: true,
|
|
80
91
|
allowUnrecognizedEnumValues: true,
|
|
@@ -85,7 +96,7 @@ class Node {
|
|
|
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 Node {
|
|
|
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 Node {
|
|
|
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/node/group/{group_id}.");
|
|
118
129
|
case "unknown":
|
|
119
130
|
throw new errors.ZepError({
|
|
120
131
|
message: _response.error.errorMessage,
|
|
@@ -132,22 +143,23 @@ class Node {
|
|
|
132
143
|
* @throws {@link Zep.InternalServerError}
|
|
133
144
|
*
|
|
134
145
|
* @example
|
|
135
|
-
* await
|
|
146
|
+
* await client.graph.node.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/node/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.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
154
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.3.0", "User-Agent": "zep-cloud/2.3.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
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.node.getByUserId.Response.parseOrThrow(_response.body, {
|
|
151
163
|
unrecognizedObjectKeys: "passthrough",
|
|
152
164
|
allowUnrecognizedUnionMembers: true,
|
|
153
165
|
allowUnrecognizedEnumValues: true,
|
|
@@ -158,7 +170,7 @@ class Node {
|
|
|
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 Node {
|
|
|
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 Node {
|
|
|
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/node/user/{user_id}.");
|
|
191
203
|
case "unknown":
|
|
192
204
|
throw new errors.ZepError({
|
|
193
205
|
message: _response.error.errorMessage,
|
|
@@ -206,22 +218,23 @@ class Node {
|
|
|
206
218
|
* @throws {@link Zep.InternalServerError}
|
|
207
219
|
*
|
|
208
220
|
* @example
|
|
209
|
-
* await
|
|
221
|
+
* await client.graph.node.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/node/${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.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
229
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.3.0", "User-Agent": "zep-cloud/2.3.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
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.EntityNode.parseOrThrow(_response.body, {
|
|
225
238
|
unrecognizedObjectKeys: "passthrough",
|
|
226
239
|
allowUnrecognizedUnionMembers: true,
|
|
227
240
|
allowUnrecognizedEnumValues: true,
|
|
@@ -232,7 +245,7 @@ class Node {
|
|
|
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 Node {
|
|
|
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 Node {
|
|
|
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 Node {
|
|
|
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/node/{uuid}.");
|
|
273
286
|
case "unknown":
|
|
274
287
|
throw new errors.ZepError({
|
|
275
288
|
message: _response.error.errorMessage,
|
|
@@ -278,8 +291,8 @@ class Node {
|
|
|
278
291
|
});
|
|
279
292
|
}
|
|
280
293
|
_getCustomAuthorizationHeaders() {
|
|
281
|
-
var _a;
|
|
282
294
|
return __awaiter(this, void 0, void 0, function* () {
|
|
295
|
+
var _a;
|
|
283
296
|
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"];
|
|
284
297
|
return { Authorization: `Api-Key ${apiKeyValue}` };
|
|
285
298
|
});
|
|
@@ -11,9 +11,14 @@ export declare namespace Group {
|
|
|
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 Group {
|
|
@@ -29,7 +34,7 @@ export declare class Group {
|
|
|
29
34
|
* @throws {@link Zep.InternalServerError}
|
|
30
35
|
*
|
|
31
36
|
* @example
|
|
32
|
-
* await
|
|
37
|
+
* await client.group.add({
|
|
33
38
|
* groupId: "group_id"
|
|
34
39
|
* })
|
|
35
40
|
*/
|
|
@@ -45,7 +50,7 @@ export declare class Group {
|
|
|
45
50
|
* @throws {@link Zep.InternalServerError}
|
|
46
51
|
*
|
|
47
52
|
* @example
|
|
48
|
-
* await
|
|
53
|
+
* await client.group.delete("groupId")
|
|
49
54
|
*/
|
|
50
55
|
delete(groupId: string, requestOptions?: Group.RequestOptions): Promise<Zep.SuccessResponse>;
|
|
51
56
|
protected _getCustomAuthorizationHeaders(): Promise<{
|