@getzep/zep-cloud 2.3.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.
Files changed (77) hide show
  1. package/api/resources/document/client/Client.js +13 -13
  2. package/api/resources/graph/client/Client.js +2 -2
  3. package/api/resources/graph/resources/edge/client/Client.js +4 -4
  4. package/api/resources/graph/resources/episode/client/Client.js +3 -3
  5. package/api/resources/graph/resources/node/client/Client.js +3 -3
  6. package/api/resources/group/client/Client.d.ts +39 -0
  7. package/api/resources/group/client/Client.js +233 -2
  8. package/api/resources/group/client/requests/CreateGroupRequest.d.ts +1 -1
  9. package/api/resources/group/client/requests/GetGroupsOrderedRequest.d.ts +17 -0
  10. package/api/resources/group/client/requests/index.d.ts +1 -0
  11. package/api/resources/memory/client/Client.js +22 -22
  12. package/api/resources/user/client/Client.js +7 -7
  13. package/api/types/Group.d.ts +3 -0
  14. package/api/types/GroupListResponse.d.ts +9 -0
  15. package/api/types/Memory.d.ts +4 -1
  16. package/api/types/Session.d.ts +1 -1
  17. package/api/types/index.d.ts +2 -3
  18. package/api/types/index.js +2 -3
  19. package/dist/api/resources/document/client/Client.js +13 -13
  20. package/dist/api/resources/graph/client/Client.js +2 -2
  21. package/dist/api/resources/graph/resources/edge/client/Client.js +4 -4
  22. package/dist/api/resources/graph/resources/episode/client/Client.js +3 -3
  23. package/dist/api/resources/graph/resources/node/client/Client.js +3 -3
  24. package/dist/api/resources/group/client/Client.d.ts +39 -0
  25. package/dist/api/resources/group/client/Client.js +233 -2
  26. package/dist/api/resources/group/client/requests/CreateGroupRequest.d.ts +1 -1
  27. package/dist/api/resources/group/client/requests/GetGroupsOrderedRequest.d.ts +17 -0
  28. package/dist/api/resources/group/client/requests/index.d.ts +1 -0
  29. package/dist/api/resources/memory/client/Client.js +22 -22
  30. package/dist/api/resources/user/client/Client.js +7 -7
  31. package/dist/api/types/Group.d.ts +3 -0
  32. package/dist/api/types/GroupListResponse.d.ts +9 -0
  33. package/dist/api/types/Memory.d.ts +4 -1
  34. package/dist/api/types/Session.d.ts +1 -1
  35. package/dist/api/types/index.d.ts +2 -3
  36. package/dist/api/types/index.js +2 -3
  37. package/dist/serialization/resources/group/client/requests/CreateGroupRequest.d.ts +2 -2
  38. package/dist/serialization/resources/group/client/requests/CreateGroupRequest.js +2 -2
  39. package/dist/serialization/types/Group.d.ts +3 -0
  40. package/dist/serialization/types/Group.js +3 -0
  41. package/dist/serialization/types/GroupListResponse.d.ts +15 -0
  42. package/{serialization/types/ApidataFactRatingExamples.js → dist/serialization/types/GroupListResponse.js} +6 -5
  43. package/dist/serialization/types/Session.d.ts +2 -2
  44. package/dist/serialization/types/Session.js +2 -2
  45. package/dist/serialization/types/index.d.ts +2 -3
  46. package/dist/serialization/types/index.js +2 -3
  47. package/dist/version.d.ts +1 -1
  48. package/dist/version.js +1 -1
  49. package/jest.config.mjs +1 -1
  50. package/package.json +1 -1
  51. package/reference.md +189 -0
  52. package/serialization/resources/group/client/requests/CreateGroupRequest.d.ts +2 -2
  53. package/serialization/resources/group/client/requests/CreateGroupRequest.js +2 -2
  54. package/serialization/types/Group.d.ts +3 -0
  55. package/serialization/types/Group.js +3 -0
  56. package/serialization/types/GroupListResponse.d.ts +15 -0
  57. package/{dist/serialization/types/ApidataFactRatingExamples.js → serialization/types/GroupListResponse.js} +6 -5
  58. package/serialization/types/Session.d.ts +2 -2
  59. package/serialization/types/Session.js +2 -2
  60. package/serialization/types/index.d.ts +2 -3
  61. package/serialization/types/index.js +2 -3
  62. package/version.d.ts +1 -1
  63. package/version.js +1 -1
  64. package/api/types/ApidataFactRatingExamples.d.ts +0 -8
  65. package/api/types/ApidataFactRatingInstruction.d.ts +0 -21
  66. package/dist/api/types/ApidataFactRatingExamples.d.ts +0 -8
  67. package/dist/api/types/ApidataFactRatingInstruction.d.ts +0 -21
  68. package/dist/serialization/types/ApidataFactRatingExamples.d.ts +0 -14
  69. package/dist/serialization/types/ApidataFactRatingInstruction.d.ts +0 -14
  70. package/dist/serialization/types/ApidataFactRatingInstruction.js +0 -45
  71. package/serialization/types/ApidataFactRatingExamples.d.ts +0 -14
  72. package/serialization/types/ApidataFactRatingInstruction.d.ts +0 -14
  73. package/serialization/types/ApidataFactRatingInstruction.js +0 -45
  74. /package/api/{types/ApidataFactRatingExamples.js → resources/group/client/requests/GetGroupsOrderedRequest.js} +0 -0
  75. /package/api/types/{ApidataFactRatingInstruction.js → GroupListResponse.js} +0 -0
  76. /package/dist/api/{types/ApidataFactRatingExamples.js → resources/group/client/requests/GetGroupsOrderedRequest.js} +0 -0
  77. /package/dist/api/types/{ApidataFactRatingInstruction.js → GroupListResponse.js} +0 -0
@@ -77,7 +77,7 @@ class Edge {
77
77
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
78
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)}`),
79
79
  method: "GET",
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),
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),
81
81
  contentType: "application/json",
82
82
  requestType: "json",
83
83
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -151,7 +151,7 @@ class Edge {
151
151
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
152
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)}`),
153
153
  method: "GET",
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),
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),
155
155
  contentType: "application/json",
156
156
  requestType: "json",
157
157
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -226,7 +226,7 @@ class Edge {
226
226
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
227
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)}`),
228
228
  method: "GET",
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),
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),
230
230
  contentType: "application/json",
231
231
  requestType: "json",
232
232
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -308,7 +308,7 @@ class Edge {
308
308
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
309
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)}`),
310
310
  method: "DELETE",
311
- 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),
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),
312
312
  contentType: "application/json",
313
313
  requestType: "json",
314
314
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -83,7 +83,7 @@ class Episode {
83
83
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
84
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)}`),
85
85
  method: "GET",
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),
86
+ 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),
87
87
  contentType: "application/json",
88
88
  queryParameters: _queryParams,
89
89
  requestType: "json",
@@ -164,7 +164,7 @@ class Episode {
164
164
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
165
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)}`),
166
166
  method: "GET",
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),
167
+ 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),
168
168
  contentType: "application/json",
169
169
  queryParameters: _queryParams,
170
170
  requestType: "json",
@@ -239,7 +239,7 @@ class Episode {
239
239
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
240
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)}`),
241
241
  method: "GET",
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),
242
+ 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),
243
243
  contentType: "application/json",
244
244
  requestType: "json",
245
245
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -77,7 +77,7 @@ class Node {
77
77
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
78
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)}`),
79
79
  method: "GET",
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),
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),
81
81
  contentType: "application/json",
82
82
  requestType: "json",
83
83
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -151,7 +151,7 @@ class Node {
151
151
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
152
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)}`),
153
153
  method: "GET",
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),
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),
155
155
  contentType: "application/json",
156
156
  requestType: "json",
157
157
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -226,7 +226,7 @@ class Node {
226
226
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
227
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)}`),
228
228
  method: "GET",
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),
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),
230
230
  contentType: "application/json",
231
231
  requestType: "json",
232
232
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -39,6 +39,32 @@ export declare class Group {
39
39
  * })
40
40
  */
41
41
  add(request: Zep.CreateGroupRequest, requestOptions?: Group.RequestOptions): Promise<Zep.Group>;
42
+ /**
43
+ * List all groups with pagination.
44
+ *
45
+ * @param {Zep.GetGroupsOrderedRequest} request
46
+ * @param {Group.RequestOptions} requestOptions - Request-specific configuration.
47
+ *
48
+ * @throws {@link Zep.BadRequestError}
49
+ * @throws {@link Zep.InternalServerError}
50
+ *
51
+ * @example
52
+ * await client.group.listAllGroups()
53
+ */
54
+ listAllGroups(request?: Zep.GetGroupsOrderedRequest, requestOptions?: Group.RequestOptions): Promise<Zep.GroupListResponse>;
55
+ /**
56
+ * Get a group.
57
+ *
58
+ * @param {string} groupId - The group_id of the group to get.
59
+ * @param {Group.RequestOptions} requestOptions - Request-specific configuration.
60
+ *
61
+ * @throws {@link Zep.NotFoundError}
62
+ * @throws {@link Zep.InternalServerError}
63
+ *
64
+ * @example
65
+ * await client.group.getAGroup("groupId")
66
+ */
67
+ getAGroup(groupId: string, requestOptions?: Group.RequestOptions): Promise<Zep.Group>;
42
68
  /**
43
69
  * Delete group
44
70
  *
@@ -53,6 +79,19 @@ export declare class Group {
53
79
  * await client.group.delete("groupId")
54
80
  */
55
81
  delete(groupId: string, requestOptions?: Group.RequestOptions): Promise<Zep.SuccessResponse>;
82
+ /**
83
+ * Get group facts.
84
+ *
85
+ * @param {string} groupId - The group_id of the group to get.
86
+ * @param {Group.RequestOptions} requestOptions - Request-specific configuration.
87
+ *
88
+ * @throws {@link Zep.NotFoundError}
89
+ * @throws {@link Zep.InternalServerError}
90
+ *
91
+ * @example
92
+ * await client.group.getFacts("groupId")
93
+ */
94
+ getFacts(groupId: string, requestOptions?: Group.RequestOptions): Promise<Zep.FactsResponse>;
56
95
  protected _getCustomAuthorizationHeaders(): Promise<{
57
96
  Authorization: string;
58
97
  }>;
@@ -79,7 +79,7 @@ class Group {
79
79
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
80
80
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "groups"),
81
81
  method: "POST",
82
- 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),
82
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.3.1", "User-Agent": "zep-cloud/2.3.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
83
83
  contentType: "application/json",
84
84
  requestType: "json",
85
85
  body: serializers.CreateGroupRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -136,6 +136,163 @@ class Group {
136
136
  }
137
137
  });
138
138
  }
139
+ /**
140
+ * List all groups with pagination.
141
+ *
142
+ * @param {Zep.GetGroupsOrderedRequest} request
143
+ * @param {Group.RequestOptions} requestOptions - Request-specific configuration.
144
+ *
145
+ * @throws {@link Zep.BadRequestError}
146
+ * @throws {@link Zep.InternalServerError}
147
+ *
148
+ * @example
149
+ * await client.group.listAllGroups()
150
+ */
151
+ listAllGroups() {
152
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
153
+ var _a, _b;
154
+ const { pageNumber, pageSize } = request;
155
+ const _queryParams = {};
156
+ if (pageNumber != null) {
157
+ _queryParams["pageNumber"] = pageNumber.toString();
158
+ }
159
+ if (pageSize != null) {
160
+ _queryParams["pageSize"] = pageSize.toString();
161
+ }
162
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
163
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, "groups-ordered"),
164
+ method: "GET",
165
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.3.1", "User-Agent": "zep-cloud/2.3.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
166
+ contentType: "application/json",
167
+ queryParameters: _queryParams,
168
+ requestType: "json",
169
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
170
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
171
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
172
+ });
173
+ if (_response.ok) {
174
+ return serializers.GroupListResponse.parseOrThrow(_response.body, {
175
+ unrecognizedObjectKeys: "passthrough",
176
+ allowUnrecognizedUnionMembers: true,
177
+ allowUnrecognizedEnumValues: true,
178
+ skipValidation: true,
179
+ breadcrumbsPrefix: ["response"],
180
+ });
181
+ }
182
+ if (_response.error.reason === "status-code") {
183
+ switch (_response.error.statusCode) {
184
+ case 400:
185
+ throw new Zep.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
186
+ unrecognizedObjectKeys: "passthrough",
187
+ allowUnrecognizedUnionMembers: true,
188
+ allowUnrecognizedEnumValues: true,
189
+ skipValidation: true,
190
+ breadcrumbsPrefix: ["response"],
191
+ }));
192
+ case 500:
193
+ throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
194
+ unrecognizedObjectKeys: "passthrough",
195
+ allowUnrecognizedUnionMembers: true,
196
+ allowUnrecognizedEnumValues: true,
197
+ skipValidation: true,
198
+ breadcrumbsPrefix: ["response"],
199
+ }));
200
+ default:
201
+ throw new errors.ZepError({
202
+ statusCode: _response.error.statusCode,
203
+ body: _response.error.body,
204
+ });
205
+ }
206
+ }
207
+ switch (_response.error.reason) {
208
+ case "non-json":
209
+ throw new errors.ZepError({
210
+ statusCode: _response.error.statusCode,
211
+ body: _response.error.rawBody,
212
+ });
213
+ case "timeout":
214
+ throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /groups-ordered.");
215
+ case "unknown":
216
+ throw new errors.ZepError({
217
+ message: _response.error.errorMessage,
218
+ });
219
+ }
220
+ });
221
+ }
222
+ /**
223
+ * Get a group.
224
+ *
225
+ * @param {string} groupId - The group_id of the group to get.
226
+ * @param {Group.RequestOptions} requestOptions - Request-specific configuration.
227
+ *
228
+ * @throws {@link Zep.NotFoundError}
229
+ * @throws {@link Zep.InternalServerError}
230
+ *
231
+ * @example
232
+ * await client.group.getAGroup("groupId")
233
+ */
234
+ getAGroup(groupId, requestOptions) {
235
+ return __awaiter(this, void 0, void 0, function* () {
236
+ var _a, _b;
237
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
238
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `groups/${encodeURIComponent(groupId)}`),
239
+ method: "GET",
240
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.3.1", "User-Agent": "zep-cloud/2.3.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
241
+ contentType: "application/json",
242
+ requestType: "json",
243
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
244
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
245
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
246
+ });
247
+ if (_response.ok) {
248
+ return serializers.Group.parseOrThrow(_response.body, {
249
+ unrecognizedObjectKeys: "passthrough",
250
+ allowUnrecognizedUnionMembers: true,
251
+ allowUnrecognizedEnumValues: true,
252
+ skipValidation: true,
253
+ breadcrumbsPrefix: ["response"],
254
+ });
255
+ }
256
+ if (_response.error.reason === "status-code") {
257
+ switch (_response.error.statusCode) {
258
+ case 404:
259
+ throw new Zep.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
260
+ unrecognizedObjectKeys: "passthrough",
261
+ allowUnrecognizedUnionMembers: true,
262
+ allowUnrecognizedEnumValues: true,
263
+ skipValidation: true,
264
+ breadcrumbsPrefix: ["response"],
265
+ }));
266
+ case 500:
267
+ throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
268
+ unrecognizedObjectKeys: "passthrough",
269
+ allowUnrecognizedUnionMembers: true,
270
+ allowUnrecognizedEnumValues: true,
271
+ skipValidation: true,
272
+ breadcrumbsPrefix: ["response"],
273
+ }));
274
+ default:
275
+ throw new errors.ZepError({
276
+ statusCode: _response.error.statusCode,
277
+ body: _response.error.body,
278
+ });
279
+ }
280
+ }
281
+ switch (_response.error.reason) {
282
+ case "non-json":
283
+ throw new errors.ZepError({
284
+ statusCode: _response.error.statusCode,
285
+ body: _response.error.rawBody,
286
+ });
287
+ case "timeout":
288
+ throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /groups/{groupId}.");
289
+ case "unknown":
290
+ throw new errors.ZepError({
291
+ message: _response.error.errorMessage,
292
+ });
293
+ }
294
+ });
295
+ }
139
296
  /**
140
297
  * Delete group
141
298
  *
@@ -155,7 +312,7 @@ class Group {
155
312
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
156
313
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `groups/${encodeURIComponent(groupId)}`),
157
314
  method: "DELETE",
158
- 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),
315
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.3.1", "User-Agent": "zep-cloud/2.3.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
159
316
  contentType: "application/json",
160
317
  requestType: "json",
161
318
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -219,6 +376,80 @@ class Group {
219
376
  }
220
377
  });
221
378
  }
379
+ /**
380
+ * Get group facts.
381
+ *
382
+ * @param {string} groupId - The group_id of the group to get.
383
+ * @param {Group.RequestOptions} requestOptions - Request-specific configuration.
384
+ *
385
+ * @throws {@link Zep.NotFoundError}
386
+ * @throws {@link Zep.InternalServerError}
387
+ *
388
+ * @example
389
+ * await client.group.getFacts("groupId")
390
+ */
391
+ getFacts(groupId, requestOptions) {
392
+ return __awaiter(this, void 0, void 0, function* () {
393
+ var _a, _b;
394
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
395
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ZepEnvironment.Default, `groups/${encodeURIComponent(groupId)}/facts`),
396
+ method: "GET",
397
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "zep-cloud", "X-Fern-SDK-Version": "2.3.1", "User-Agent": "zep-cloud/2.3.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
398
+ contentType: "application/json",
399
+ requestType: "json",
400
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
401
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
402
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
403
+ });
404
+ if (_response.ok) {
405
+ return serializers.FactsResponse.parseOrThrow(_response.body, {
406
+ unrecognizedObjectKeys: "passthrough",
407
+ allowUnrecognizedUnionMembers: true,
408
+ allowUnrecognizedEnumValues: true,
409
+ skipValidation: true,
410
+ breadcrumbsPrefix: ["response"],
411
+ });
412
+ }
413
+ if (_response.error.reason === "status-code") {
414
+ switch (_response.error.statusCode) {
415
+ case 404:
416
+ throw new Zep.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
417
+ unrecognizedObjectKeys: "passthrough",
418
+ allowUnrecognizedUnionMembers: true,
419
+ allowUnrecognizedEnumValues: true,
420
+ skipValidation: true,
421
+ breadcrumbsPrefix: ["response"],
422
+ }));
423
+ case 500:
424
+ throw new Zep.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
425
+ unrecognizedObjectKeys: "passthrough",
426
+ allowUnrecognizedUnionMembers: true,
427
+ allowUnrecognizedEnumValues: true,
428
+ skipValidation: true,
429
+ breadcrumbsPrefix: ["response"],
430
+ }));
431
+ default:
432
+ throw new errors.ZepError({
433
+ statusCode: _response.error.statusCode,
434
+ body: _response.error.body,
435
+ });
436
+ }
437
+ }
438
+ switch (_response.error.reason) {
439
+ case "non-json":
440
+ throw new errors.ZepError({
441
+ statusCode: _response.error.statusCode,
442
+ body: _response.error.rawBody,
443
+ });
444
+ case "timeout":
445
+ throw new errors.ZepTimeoutError("Timeout exceeded when calling GET /groups/{groupId}/facts.");
446
+ case "unknown":
447
+ throw new errors.ZepError({
448
+ message: _response.error.errorMessage,
449
+ });
450
+ }
451
+ });
452
+ }
222
453
  _getCustomAuthorizationHeaders() {
223
454
  return __awaiter(this, void 0, void 0, function* () {
224
455
  var _a;
@@ -11,7 +11,7 @@ import * as Zep from "../../../../index";
11
11
  export interface CreateGroupRequest {
12
12
  description?: string;
13
13
  /** UserIDs []string `json:"user_ids"` */
14
- factRatingInstruction?: Zep.ApidataFactRatingInstruction;
14
+ factRatingInstruction?: Zep.FactRatingInstruction;
15
15
  groupId: string;
16
16
  name?: string;
17
17
  }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
8
+ export interface GetGroupsOrderedRequest {
9
+ /**
10
+ * Page number for pagination, starting from 1
11
+ */
12
+ pageNumber?: number;
13
+ /**
14
+ * Number of groups to retrieve per page
15
+ */
16
+ pageSize?: number;
17
+ }
@@ -1 +1,2 @@
1
1
  export { type CreateGroupRequest } from "./CreateGroupRequest";
2
+ export { type GetGroupsOrderedRequest } from "./GetGroupsOrderedRequest";