mavenagi 0.0.0-alpha.20 → 0.0.0-alpha.21

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 (105) hide show
  1. package/README.md +19 -6
  2. package/api/resources/actions/client/Client.d.ts +1 -1
  3. package/api/resources/actions/client/Client.js +7 -4
  4. package/api/resources/actions/types/ConversationExecutedActionPrecondition.d.ts +1 -3
  5. package/api/resources/actions/types/ConversationPrecondition.d.ts +2 -6
  6. package/api/resources/actions/types/MetadataPrecondition.d.ts +1 -3
  7. package/api/resources/actions/types/PreconditionBase.d.ts +8 -0
  8. package/api/resources/actions/types/PreconditionBase.js +4 -0
  9. package/api/resources/actions/types/TagsPrecondition.d.ts +8 -0
  10. package/api/resources/actions/types/TagsPrecondition.js +4 -0
  11. package/api/resources/actions/types/index.d.ts +4 -2
  12. package/api/resources/actions/types/index.js +4 -2
  13. package/api/resources/appSettings/client/Client.js +2 -1
  14. package/api/resources/conversation/client/Client.d.ts +20 -9
  15. package/api/resources/conversation/client/Client.js +40 -19
  16. package/api/resources/knowledge/client/Client.d.ts +4 -4
  17. package/api/resources/knowledge/client/Client.js +18 -11
  18. package/api/resources/triggers/client/Client.d.ts +1 -1
  19. package/api/resources/triggers/client/Client.js +7 -4
  20. package/api/resources/users/client/Client.d.ts +2 -2
  21. package/api/resources/users/client/Client.js +6 -4
  22. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +8 -8
  23. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +23 -2
  24. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +2 -1
  25. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +16 -0
  26. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +2 -1
  27. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +23 -2
  28. package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -0
  29. package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +1 -1
  30. package/core/schemas/Schema.d.ts +1 -0
  31. package/core/schemas/Schema.js +1 -0
  32. package/core/schemas/builders/bigint/bigint.d.ts +2 -0
  33. package/core/schemas/builders/bigint/bigint.js +46 -0
  34. package/core/schemas/builders/bigint/index.d.ts +1 -0
  35. package/core/schemas/builders/bigint/index.js +1 -0
  36. package/core/schemas/builders/index.d.ts +1 -0
  37. package/core/schemas/builders/index.js +1 -0
  38. package/core/schemas/utils/getErrorMessageForIncorrectType.js +4 -0
  39. package/dist/api/resources/actions/client/Client.d.ts +1 -1
  40. package/dist/api/resources/actions/client/Client.js +7 -4
  41. package/dist/api/resources/actions/types/ConversationExecutedActionPrecondition.d.ts +1 -3
  42. package/dist/api/resources/actions/types/ConversationPrecondition.d.ts +2 -6
  43. package/dist/api/resources/actions/types/MetadataPrecondition.d.ts +1 -3
  44. package/dist/api/resources/actions/types/PreconditionBase.d.ts +8 -0
  45. package/dist/api/resources/actions/types/PreconditionBase.js +4 -0
  46. package/dist/api/resources/actions/types/TagsPrecondition.d.ts +8 -0
  47. package/dist/api/resources/actions/types/TagsPrecondition.js +4 -0
  48. package/dist/api/resources/actions/types/index.d.ts +4 -2
  49. package/dist/api/resources/actions/types/index.js +4 -2
  50. package/dist/api/resources/appSettings/client/Client.js +2 -1
  51. package/dist/api/resources/conversation/client/Client.d.ts +20 -9
  52. package/dist/api/resources/conversation/client/Client.js +40 -19
  53. package/dist/api/resources/knowledge/client/Client.d.ts +4 -4
  54. package/dist/api/resources/knowledge/client/Client.js +18 -11
  55. package/dist/api/resources/triggers/client/Client.d.ts +1 -1
  56. package/dist/api/resources/triggers/client/Client.js +7 -4
  57. package/dist/api/resources/users/client/Client.d.ts +2 -2
  58. package/dist/api/resources/users/client/Client.js +6 -4
  59. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +8 -8
  60. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +23 -2
  61. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +2 -1
  62. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +16 -0
  63. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +2 -1
  64. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +23 -2
  65. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -0
  66. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +1 -1
  67. package/dist/core/schemas/Schema.d.ts +1 -0
  68. package/dist/core/schemas/Schema.js +1 -0
  69. package/dist/core/schemas/builders/bigint/bigint.d.ts +2 -0
  70. package/dist/core/schemas/builders/bigint/bigint.js +46 -0
  71. package/dist/core/schemas/builders/bigint/index.d.ts +1 -0
  72. package/dist/core/schemas/builders/bigint/index.js +1 -0
  73. package/dist/core/schemas/builders/index.d.ts +1 -0
  74. package/dist/core/schemas/builders/index.js +1 -0
  75. package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +4 -0
  76. package/dist/serialization/resources/actions/types/ConversationExecutedActionPrecondition.d.ts +2 -3
  77. package/dist/serialization/resources/actions/types/ConversationExecutedActionPrecondition.js +5 -4
  78. package/dist/serialization/resources/actions/types/ConversationPrecondition.d.ts +2 -2
  79. package/dist/serialization/resources/actions/types/ConversationPrecondition.js +2 -3
  80. package/dist/serialization/resources/actions/types/MetadataPrecondition.d.ts +2 -3
  81. package/dist/serialization/resources/actions/types/MetadataPrecondition.js +5 -4
  82. package/dist/serialization/resources/actions/types/PreconditionBase.d.ts +13 -0
  83. package/dist/serialization/resources/actions/types/PreconditionBase.js +8 -0
  84. package/dist/serialization/resources/actions/types/TagsPrecondition.d.ts +13 -0
  85. package/dist/serialization/resources/actions/types/TagsPrecondition.js +10 -0
  86. package/dist/serialization/resources/actions/types/index.d.ts +4 -2
  87. package/dist/serialization/resources/actions/types/index.js +4 -2
  88. package/dist/version.d.ts +1 -0
  89. package/dist/version.js +1 -0
  90. package/package.json +6 -1
  91. package/reference.md +30 -17
  92. package/serialization/resources/actions/types/ConversationExecutedActionPrecondition.d.ts +2 -3
  93. package/serialization/resources/actions/types/ConversationExecutedActionPrecondition.js +5 -4
  94. package/serialization/resources/actions/types/ConversationPrecondition.d.ts +2 -2
  95. package/serialization/resources/actions/types/ConversationPrecondition.js +2 -3
  96. package/serialization/resources/actions/types/MetadataPrecondition.d.ts +2 -3
  97. package/serialization/resources/actions/types/MetadataPrecondition.js +5 -4
  98. package/serialization/resources/actions/types/PreconditionBase.d.ts +13 -0
  99. package/serialization/resources/actions/types/PreconditionBase.js +8 -0
  100. package/serialization/resources/actions/types/TagsPrecondition.d.ts +13 -0
  101. package/serialization/resources/actions/types/TagsPrecondition.js +10 -0
  102. package/serialization/resources/actions/types/index.d.ts +4 -2
  103. package/serialization/resources/actions/types/index.js +4 -2
  104. package/version.d.ts +1 -0
  105. package/version.js +1 -0
@@ -35,16 +35,27 @@ export class Conversation {
35
35
  * conversationId: {
36
36
  * referenceId: "string"
37
37
  * },
38
- * messages: [{}],
38
+ * messages: [{
39
+ * conversationMessageId: {
40
+ * referenceId: "string"
41
+ * },
42
+ * userId: {
43
+ * referenceId: "string"
44
+ * },
45
+ * text: "string",
46
+ * userMessageType: "USER",
47
+ * createdAt: "2024-01-15T09:30:00Z",
48
+ * updatedAt: "2024-01-15T09:30:00Z"
49
+ * }],
39
50
  * responseConfig: {
40
- * capabilities: [MavenAGI.Capability.Markdown],
51
+ * capabilities: ["MARKDOWN"],
41
52
  * isCopilot: true,
42
- * responseLength: MavenAGI.ResponseLength.Short
53
+ * responseLength: "SHORT"
43
54
  * },
44
55
  * subject: "string",
45
56
  * url: "string",
46
- * createdAt: new Date("2024-01-15T09:30:00.000Z"),
47
- * updatedAt: new Date("2024-01-15T09:30:00.000Z"),
57
+ * createdAt: "2024-01-15T09:30:00Z",
58
+ * updatedAt: "2024-01-15T09:30:00Z",
48
59
  * tags: new Set(["string"]),
49
60
  * metadata: {
50
61
  * "string": "string"
@@ -63,7 +74,8 @@ export class Conversation {
63
74
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
64
75
  "X-Fern-Language": "JavaScript",
65
76
  "X-Fern-SDK-Name": "mavenagi",
66
- "X-Fern-SDK-Version": "0.0.0-alpha.20",
77
+ "X-Fern-SDK-Version": "0.0.0-alpha.21",
78
+ "User-Agent": "mavenagi/0.0.0-alpha.21",
67
79
  "X-Fern-Runtime": core.RUNTIME.type,
68
80
  "X-Fern-Runtime-Version": core.RUNTIME.version,
69
81
  },
@@ -152,7 +164,8 @@ export class Conversation {
152
164
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
153
165
  "X-Fern-Language": "JavaScript",
154
166
  "X-Fern-SDK-Name": "mavenagi",
155
- "X-Fern-SDK-Version": "0.0.0-alpha.20",
167
+ "X-Fern-SDK-Version": "0.0.0-alpha.21",
168
+ "User-Agent": "mavenagi/0.0.0-alpha.21",
156
169
  "X-Fern-Runtime": core.RUNTIME.type,
157
170
  "X-Fern-Runtime-Version": core.RUNTIME.version,
158
171
  },
@@ -235,9 +248,9 @@ export class Conversation {
235
248
  * referenceId: "string"
236
249
  * },
237
250
  * text: "string",
238
- * userMessageType: MavenAGI.UserConversationMessageType.User,
239
- * createdAt: new Date("2024-01-15T09:30:00.000Z"),
240
- * updatedAt: new Date("2024-01-15T09:30:00.000Z")
251
+ * userMessageType: "USER",
252
+ * createdAt: "2024-01-15T09:30:00Z",
253
+ * updatedAt: "2024-01-15T09:30:00Z"
241
254
  * }])
242
255
  */
243
256
  appendNewMessages(conversationId, request, requestOptions) {
@@ -252,7 +265,8 @@ export class Conversation {
252
265
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
253
266
  "X-Fern-Language": "JavaScript",
254
267
  "X-Fern-SDK-Name": "mavenagi",
255
- "X-Fern-SDK-Version": "0.0.0-alpha.20",
268
+ "X-Fern-SDK-Version": "0.0.0-alpha.21",
269
+ "User-Agent": "mavenagi/0.0.0-alpha.21",
256
270
  "X-Fern-Runtime": core.RUNTIME.type,
257
271
  "X-Fern-Runtime-Version": core.RUNTIME.version,
258
272
  },
@@ -352,7 +366,8 @@ export class Conversation {
352
366
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
353
367
  "X-Fern-Language": "JavaScript",
354
368
  "X-Fern-SDK-Name": "mavenagi",
355
- "X-Fern-SDK-Version": "0.0.0-alpha.20",
369
+ "X-Fern-SDK-Version": "0.0.0-alpha.21",
370
+ "User-Agent": "mavenagi/0.0.0-alpha.21",
356
371
  "X-Fern-Runtime": core.RUNTIME.type,
357
372
  "X-Fern-Runtime-Version": core.RUNTIME.version,
358
373
  },
@@ -431,7 +446,8 @@ export class Conversation {
431
446
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
432
447
  "X-Fern-Language": "JavaScript",
433
448
  "X-Fern-SDK-Name": "mavenagi",
434
- "X-Fern-SDK-Version": "0.0.0-alpha.20",
449
+ "X-Fern-SDK-Version": "0.0.0-alpha.21",
450
+ "User-Agent": "mavenagi/0.0.0-alpha.21",
435
451
  "X-Fern-Runtime": core.RUNTIME.type,
436
452
  "X-Fern-Runtime-Version": core.RUNTIME.version,
437
453
  },
@@ -536,7 +552,8 @@ export class Conversation {
536
552
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
537
553
  "X-Fern-Language": "JavaScript",
538
554
  "X-Fern-SDK-Name": "mavenagi",
539
- "X-Fern-SDK-Version": "0.0.0-alpha.20",
555
+ "X-Fern-SDK-Version": "0.0.0-alpha.21",
556
+ "User-Agent": "mavenagi/0.0.0-alpha.21",
540
557
  "X-Fern-Runtime": core.RUNTIME.type,
541
558
  "X-Fern-Runtime-Version": core.RUNTIME.version,
542
559
  },
@@ -625,7 +642,8 @@ export class Conversation {
625
642
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
626
643
  "X-Fern-Language": "JavaScript",
627
644
  "X-Fern-SDK-Name": "mavenagi",
628
- "X-Fern-SDK-Version": "0.0.0-alpha.20",
645
+ "X-Fern-SDK-Version": "0.0.0-alpha.21",
646
+ "User-Agent": "mavenagi/0.0.0-alpha.21",
629
647
  "X-Fern-Runtime": core.RUNTIME.type,
630
648
  "X-Fern-Runtime-Version": core.RUNTIME.version,
631
649
  },
@@ -709,7 +727,7 @@ export class Conversation {
709
727
  * conversationMessageId: {
710
728
  * referenceId: "string"
711
729
  * },
712
- * type: MavenAGI.FeedbackType.ThumbsUp,
730
+ * type: "THUMBS_UP",
713
731
  * text: "string"
714
732
  * })
715
733
  */
@@ -725,7 +743,8 @@ export class Conversation {
725
743
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
726
744
  "X-Fern-Language": "JavaScript",
727
745
  "X-Fern-SDK-Name": "mavenagi",
728
- "X-Fern-SDK-Version": "0.0.0-alpha.20",
746
+ "X-Fern-SDK-Version": "0.0.0-alpha.21",
747
+ "User-Agent": "mavenagi/0.0.0-alpha.21",
729
748
  "X-Fern-Runtime": core.RUNTIME.type,
730
749
  "X-Fern-Runtime-Version": core.RUNTIME.version,
731
750
  },
@@ -822,7 +841,8 @@ export class Conversation {
822
841
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
823
842
  "X-Fern-Language": "JavaScript",
824
843
  "X-Fern-SDK-Name": "mavenagi",
825
- "X-Fern-SDK-Version": "0.0.0-alpha.20",
844
+ "X-Fern-SDK-Version": "0.0.0-alpha.21",
845
+ "User-Agent": "mavenagi/0.0.0-alpha.21",
826
846
  "X-Fern-Runtime": core.RUNTIME.type,
827
847
  "X-Fern-Runtime-Version": core.RUNTIME.version,
828
848
  },
@@ -914,7 +934,8 @@ export class Conversation {
914
934
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
915
935
  "X-Fern-Language": "JavaScript",
916
936
  "X-Fern-SDK-Name": "mavenagi",
917
- "X-Fern-SDK-Version": "0.0.0-alpha.20",
937
+ "X-Fern-SDK-Version": "0.0.0-alpha.21",
938
+ "User-Agent": "mavenagi/0.0.0-alpha.21",
918
939
  "X-Fern-Runtime": core.RUNTIME.type,
919
940
  "X-Fern-Runtime-Version": core.RUNTIME.version,
920
941
  },
@@ -47,7 +47,7 @@ export declare class Knowledge {
47
47
  * referenceId: "help-center"
48
48
  * },
49
49
  * name: "Help center",
50
- * type: MavenAGI.KnowledgeBaseType.Api
50
+ * type: "API"
51
51
  * })
52
52
  */
53
53
  createOrUpdateKnowledgeBase(request: MavenAGI.KnowledgeBaseRequest, requestOptions?: Knowledge.RequestOptions): Promise<MavenAGI.KnowledgeBaseResponse>;
@@ -78,7 +78,7 @@ export declare class Knowledge {
78
78
  *
79
79
  * @example
80
80
  * await client.knowledge.createKnowledgeBaseVersion("help-center", {
81
- * type: MavenAGI.KnowledgeBaseVersionType.Full
81
+ * type: "FULL"
82
82
  * })
83
83
  */
84
84
  createKnowledgeBaseVersion(knowledgeBaseReferenceId: string, request: MavenAGI.KnowledgeBaseVersion, requestOptions?: Knowledge.RequestOptions): Promise<MavenAGI.KnowledgeBaseVersion>;
@@ -112,7 +112,7 @@ export declare class Knowledge {
112
112
  * knowledgeDocumentId: {
113
113
  * referenceId: "getting-started"
114
114
  * },
115
- * contentType: MavenAGI.KnowledgeDocumentContentType.Markdown,
115
+ * contentType: "MARKDOWN",
116
116
  * content: "## Getting started\\nThis is a getting started guide for the help center.",
117
117
  * title: "Getting started"
118
118
  * })
@@ -134,7 +134,7 @@ export declare class Knowledge {
134
134
  * knowledgeDocumentId: {
135
135
  * referenceId: "getting-started"
136
136
  * },
137
- * contentType: MavenAGI.KnowledgeDocumentContentType.Markdown,
137
+ * contentType: "MARKDOWN",
138
138
  * content: "## Getting started\\nThis is a getting started guide for the help center.",
139
139
  * title: "Getting started"
140
140
  * })
@@ -36,7 +36,7 @@ export class Knowledge {
36
36
  * referenceId: "help-center"
37
37
  * },
38
38
  * name: "Help center",
39
- * type: MavenAGI.KnowledgeBaseType.Api
39
+ * type: "API"
40
40
  * })
41
41
  */
42
42
  createOrUpdateKnowledgeBase(request, requestOptions) {
@@ -51,7 +51,8 @@ export class Knowledge {
51
51
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
52
52
  "X-Fern-Language": "JavaScript",
53
53
  "X-Fern-SDK-Name": "mavenagi",
54
- "X-Fern-SDK-Version": "0.0.0-alpha.20",
54
+ "X-Fern-SDK-Version": "0.0.0-alpha.21",
55
+ "User-Agent": "mavenagi/0.0.0-alpha.21",
55
56
  "X-Fern-Runtime": core.RUNTIME.type,
56
57
  "X-Fern-Runtime-Version": core.RUNTIME.version,
57
58
  },
@@ -140,7 +141,8 @@ export class Knowledge {
140
141
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
141
142
  "X-Fern-Language": "JavaScript",
142
143
  "X-Fern-SDK-Name": "mavenagi",
143
- "X-Fern-SDK-Version": "0.0.0-alpha.20",
144
+ "X-Fern-SDK-Version": "0.0.0-alpha.21",
145
+ "User-Agent": "mavenagi/0.0.0-alpha.21",
144
146
  "X-Fern-Runtime": core.RUNTIME.type,
145
147
  "X-Fern-Runtime-Version": core.RUNTIME.version,
146
148
  },
@@ -216,7 +218,7 @@ export class Knowledge {
216
218
  *
217
219
  * @example
218
220
  * await client.knowledge.createKnowledgeBaseVersion("help-center", {
219
- * type: MavenAGI.KnowledgeBaseVersionType.Full
221
+ * type: "FULL"
220
222
  * })
221
223
  */
222
224
  createKnowledgeBaseVersion(knowledgeBaseReferenceId, request, requestOptions) {
@@ -231,7 +233,8 @@ export class Knowledge {
231
233
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
232
234
  "X-Fern-Language": "JavaScript",
233
235
  "X-Fern-SDK-Name": "mavenagi",
234
- "X-Fern-SDK-Version": "0.0.0-alpha.20",
236
+ "X-Fern-SDK-Version": "0.0.0-alpha.21",
237
+ "User-Agent": "mavenagi/0.0.0-alpha.21",
235
238
  "X-Fern-Runtime": core.RUNTIME.type,
236
239
  "X-Fern-Runtime-Version": core.RUNTIME.version,
237
240
  },
@@ -320,7 +323,8 @@ export class Knowledge {
320
323
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
321
324
  "X-Fern-Language": "JavaScript",
322
325
  "X-Fern-SDK-Name": "mavenagi",
323
- "X-Fern-SDK-Version": "0.0.0-alpha.20",
326
+ "X-Fern-SDK-Version": "0.0.0-alpha.21",
327
+ "User-Agent": "mavenagi/0.0.0-alpha.21",
324
328
  "X-Fern-Runtime": core.RUNTIME.type,
325
329
  "X-Fern-Runtime-Version": core.RUNTIME.version,
326
330
  },
@@ -394,7 +398,7 @@ export class Knowledge {
394
398
  * knowledgeDocumentId: {
395
399
  * referenceId: "getting-started"
396
400
  * },
397
- * contentType: MavenAGI.KnowledgeDocumentContentType.Markdown,
401
+ * contentType: "MARKDOWN",
398
402
  * content: "## Getting started\\nThis is a getting started guide for the help center.",
399
403
  * title: "Getting started"
400
404
  * })
@@ -411,7 +415,8 @@ export class Knowledge {
411
415
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
412
416
  "X-Fern-Language": "JavaScript",
413
417
  "X-Fern-SDK-Name": "mavenagi",
414
- "X-Fern-SDK-Version": "0.0.0-alpha.20",
418
+ "X-Fern-SDK-Version": "0.0.0-alpha.21",
419
+ "User-Agent": "mavenagi/0.0.0-alpha.21",
415
420
  "X-Fern-Runtime": core.RUNTIME.type,
416
421
  "X-Fern-Runtime-Version": core.RUNTIME.version,
417
422
  },
@@ -491,7 +496,7 @@ export class Knowledge {
491
496
  * knowledgeDocumentId: {
492
497
  * referenceId: "getting-started"
493
498
  * },
494
- * contentType: MavenAGI.KnowledgeDocumentContentType.Markdown,
499
+ * contentType: "MARKDOWN",
495
500
  * content: "## Getting started\\nThis is a getting started guide for the help center.",
496
501
  * title: "Getting started"
497
502
  * })
@@ -508,7 +513,8 @@ export class Knowledge {
508
513
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
509
514
  "X-Fern-Language": "JavaScript",
510
515
  "X-Fern-SDK-Name": "mavenagi",
511
- "X-Fern-SDK-Version": "0.0.0-alpha.20",
516
+ "X-Fern-SDK-Version": "0.0.0-alpha.21",
517
+ "User-Agent": "mavenagi/0.0.0-alpha.21",
512
518
  "X-Fern-Runtime": core.RUNTIME.type,
513
519
  "X-Fern-Runtime-Version": core.RUNTIME.version,
514
520
  },
@@ -598,7 +604,8 @@ export class Knowledge {
598
604
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
599
605
  "X-Fern-Language": "JavaScript",
600
606
  "X-Fern-SDK-Name": "mavenagi",
601
- "X-Fern-SDK-Version": "0.0.0-alpha.20",
607
+ "X-Fern-SDK-Version": "0.0.0-alpha.21",
608
+ "User-Agent": "mavenagi/0.0.0-alpha.21",
602
609
  "X-Fern-Runtime": core.RUNTIME.type,
603
610
  "X-Fern-Runtime-Version": core.RUNTIME.version,
604
611
  },
@@ -47,7 +47,7 @@ export declare class Triggers {
47
47
  * referenceId: "store-in-snowflake"
48
48
  * },
49
49
  * description: "Stores conversation data in Snowflake",
50
- * type: MavenAGI.EventTriggerType.ConversationCreated
50
+ * type: "CONVERSATION_CREATED"
51
51
  * })
52
52
  */
53
53
  createOrUpdate(request: MavenAGI.EventTriggerRequest, requestOptions?: Triggers.RequestOptions): Promise<MavenAGI.EventTriggerResponse>;
@@ -36,7 +36,7 @@ export class Triggers {
36
36
  * referenceId: "store-in-snowflake"
37
37
  * },
38
38
  * description: "Stores conversation data in Snowflake",
39
- * type: MavenAGI.EventTriggerType.ConversationCreated
39
+ * type: "CONVERSATION_CREATED"
40
40
  * })
41
41
  */
42
42
  createOrUpdate(request, requestOptions) {
@@ -51,7 +51,8 @@ export class Triggers {
51
51
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
52
52
  "X-Fern-Language": "JavaScript",
53
53
  "X-Fern-SDK-Name": "mavenagi",
54
- "X-Fern-SDK-Version": "0.0.0-alpha.20",
54
+ "X-Fern-SDK-Version": "0.0.0-alpha.21",
55
+ "User-Agent": "mavenagi/0.0.0-alpha.21",
55
56
  "X-Fern-Runtime": core.RUNTIME.type,
56
57
  "X-Fern-Runtime-Version": core.RUNTIME.version,
57
58
  },
@@ -140,7 +141,8 @@ export class Triggers {
140
141
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
141
142
  "X-Fern-Language": "JavaScript",
142
143
  "X-Fern-SDK-Name": "mavenagi",
143
- "X-Fern-SDK-Version": "0.0.0-alpha.20",
144
+ "X-Fern-SDK-Version": "0.0.0-alpha.21",
145
+ "User-Agent": "mavenagi/0.0.0-alpha.21",
144
146
  "X-Fern-Runtime": core.RUNTIME.type,
145
147
  "X-Fern-Runtime-Version": core.RUNTIME.version,
146
148
  },
@@ -228,7 +230,8 @@ export class Triggers {
228
230
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
229
231
  "X-Fern-Language": "JavaScript",
230
232
  "X-Fern-SDK-Name": "mavenagi",
231
- "X-Fern-SDK-Version": "0.0.0-alpha.20",
233
+ "X-Fern-SDK-Version": "0.0.0-alpha.21",
234
+ "User-Agent": "mavenagi/0.0.0-alpha.21",
232
235
  "X-Fern-Runtime": core.RUNTIME.type,
233
236
  "X-Fern-Runtime-Version": core.RUNTIME.version,
234
237
  },
@@ -48,12 +48,12 @@ export declare class Users {
48
48
  * },
49
49
  * identifiers: new Set([{
50
50
  * value: "joe@myapp.com",
51
- * type: MavenAGI.AppUserIdentifyingPropertyType.Email
51
+ * type: "EMAIL"
52
52
  * }]),
53
53
  * data: {
54
54
  * "name": {
55
55
  * value: "Joe",
56
- * visibility: MavenAGI.VisibilityType.Visible
56
+ * visibility: "VISIBLE"
57
57
  * }
58
58
  * }
59
59
  * })
@@ -37,12 +37,12 @@ export class Users {
37
37
  * },
38
38
  * identifiers: new Set([{
39
39
  * value: "joe@myapp.com",
40
- * type: MavenAGI.AppUserIdentifyingPropertyType.Email
40
+ * type: "EMAIL"
41
41
  * }]),
42
42
  * data: {
43
43
  * "name": {
44
44
  * value: "Joe",
45
- * visibility: MavenAGI.VisibilityType.Visible
45
+ * visibility: "VISIBLE"
46
46
  * }
47
47
  * }
48
48
  * })
@@ -59,7 +59,8 @@ export class Users {
59
59
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
60
60
  "X-Fern-Language": "JavaScript",
61
61
  "X-Fern-SDK-Name": "mavenagi",
62
- "X-Fern-SDK-Version": "0.0.0-alpha.20",
62
+ "X-Fern-SDK-Version": "0.0.0-alpha.21",
63
+ "User-Agent": "mavenagi/0.0.0-alpha.21",
63
64
  "X-Fern-Runtime": core.RUNTIME.type,
64
65
  "X-Fern-Runtime-Version": core.RUNTIME.version,
65
66
  },
@@ -148,7 +149,8 @@ export class Users {
148
149
  "X-Agent-Id": yield core.Supplier.get(this._options.agentId),
149
150
  "X-Fern-Language": "JavaScript",
150
151
  "X-Fern-SDK-Name": "mavenagi",
151
- "X-Fern-SDK-Version": "0.0.0-alpha.20",
152
+ "X-Fern-SDK-Version": "0.0.0-alpha.21",
153
+ "User-Agent": "mavenagi/0.0.0-alpha.21",
152
154
  "X-Fern-Runtime": core.RUNTIME.type,
153
155
  "X-Fern-Runtime-Version": core.RUNTIME.version,
154
156
  },
@@ -1,24 +1,23 @@
1
- /// <reference types="node" />
2
- import type { Writable } from "stream";
1
+ import type { Writable } from "readable-stream";
3
2
  import { EventCallback, StreamWrapper } from "./chooseStreamWrapper";
4
- export declare class Node18UniversalStreamWrapper implements StreamWrapper<Node18UniversalStreamWrapper | Writable | WritableStream<Uint8Array>, Uint8Array> {
3
+ export declare class Node18UniversalStreamWrapper<ReadFormat extends Uint8Array | Uint16Array | Uint32Array> implements StreamWrapper<Node18UniversalStreamWrapper<ReadFormat> | Writable | WritableStream<ReadFormat>, ReadFormat> {
5
4
  private readableStream;
6
5
  private reader;
7
6
  private events;
8
7
  private paused;
9
8
  private resumeCallback;
10
9
  private encoding;
11
- constructor(readableStream: ReadableStream<Uint8Array>);
10
+ constructor(readableStream: ReadableStream<ReadFormat>);
12
11
  on(event: string, callback: EventCallback): void;
13
12
  off(event: string, callback: EventCallback): void;
14
- pipe(dest: Node18UniversalStreamWrapper | Writable | WritableStream<Uint8Array>): Node18UniversalStreamWrapper | Writable | WritableStream<Uint8Array>;
15
- pipeTo(dest: Node18UniversalStreamWrapper | Writable | WritableStream<Uint8Array>): Node18UniversalStreamWrapper | Writable | WritableStream<Uint8Array>;
16
- unpipe(dest: Node18UniversalStreamWrapper | Writable | WritableStream<Uint8Array>): void;
13
+ pipe(dest: Node18UniversalStreamWrapper<ReadFormat> | Writable | WritableStream<ReadFormat>): Node18UniversalStreamWrapper<ReadFormat> | Writable | WritableStream<ReadFormat>;
14
+ pipeTo(dest: Node18UniversalStreamWrapper<ReadFormat> | Writable | WritableStream<ReadFormat>): Node18UniversalStreamWrapper<ReadFormat> | Writable | WritableStream<ReadFormat>;
15
+ unpipe(dest: Node18UniversalStreamWrapper<ReadFormat> | Writable | WritableStream<ReadFormat>): void;
17
16
  destroy(error?: Error): void;
18
17
  pause(): void;
19
18
  resume(): void;
20
19
  get isPaused(): boolean;
21
- read(): Promise<Uint8Array | undefined>;
20
+ read(): Promise<ReadFormat | undefined>;
22
21
  setEncoding(encoding: string): void;
23
22
  text(): Promise<string>;
24
23
  json<T>(): Promise<T>;
@@ -27,4 +26,5 @@ export declare class Node18UniversalStreamWrapper implements StreamWrapper<Node1
27
26
  private _error;
28
27
  private _emit;
29
28
  private _startReading;
29
+ [Symbol.asyncIterator](): AsyncIterableIterator<ReadFormat>;
30
30
  }
@@ -162,10 +162,12 @@ export class Node18UniversalStreamWrapper {
162
162
  const chunks = [];
163
163
  while (true) {
164
164
  const { done, value } = yield this.reader.read();
165
- if (done)
165
+ if (done) {
166
166
  break;
167
- if (value)
167
+ }
168
+ if (value) {
168
169
  chunks.push(value);
170
+ }
169
171
  }
170
172
  const decoder = new TextDecoder(this.encoding || "utf-8");
171
173
  return decoder.decode(yield new Blob(chunks).arrayBuffer());
@@ -219,4 +221,23 @@ export class Node18UniversalStreamWrapper {
219
221
  }
220
222
  });
221
223
  }
224
+ [Symbol.asyncIterator]() {
225
+ return {
226
+ next: () => __awaiter(this, void 0, void 0, function* () {
227
+ if (this.paused) {
228
+ yield new Promise((resolve) => {
229
+ this.resumeCallback = resolve;
230
+ });
231
+ }
232
+ const { done, value } = yield this.reader.read();
233
+ if (done) {
234
+ return { done: true, value: undefined };
235
+ }
236
+ return { done: false, value };
237
+ }),
238
+ [Symbol.asyncIterator]() {
239
+ return this;
240
+ },
241
+ };
242
+ }
222
243
  }
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import type { Readable, Writable } from "stream";
2
+ import type { Readable, Writable } from "readable-stream";
3
3
  import { EventCallback, StreamWrapper } from "./chooseStreamWrapper";
4
4
  export declare class NodePre18StreamWrapper implements StreamWrapper<Writable, Buffer> {
5
5
  private readableStream;
@@ -18,4 +18,5 @@ export declare class NodePre18StreamWrapper implements StreamWrapper<Writable, B
18
18
  setEncoding(encoding?: string): void;
19
19
  text(): Promise<string>;
20
20
  json<T>(): Promise<T>;
21
+ [Symbol.asyncIterator](): AsyncIterableIterator<Buffer>;
21
22
  }
@@ -101,4 +101,20 @@ export class NodePre18StreamWrapper {
101
101
  return JSON.parse(text);
102
102
  });
103
103
  }
104
+ [Symbol.asyncIterator]() {
105
+ const readableStream = this.readableStream;
106
+ const iterator = readableStream[Symbol.asyncIterator]();
107
+ // Create and return an async iterator that yields buffers
108
+ return {
109
+ next() {
110
+ return __awaiter(this, void 0, void 0, function* () {
111
+ const { value, done } = yield iterator.next();
112
+ return { value: value, done };
113
+ });
114
+ },
115
+ [Symbol.asyncIterator]() {
116
+ return this;
117
+ },
118
+ };
119
+ }
104
120
  }
@@ -12,7 +12,7 @@ export declare class UndiciStreamWrapper<ReadFormat extends Uint8Array | Uint16A
12
12
  off(event: string, callback: EventCallback): void;
13
13
  pipe(dest: UndiciStreamWrapper<ReadFormat> | WritableStream<ReadFormat>): UndiciStreamWrapper<ReadFormat> | WritableStream<ReadFormat>;
14
14
  pipeTo(dest: UndiciStreamWrapper<ReadFormat> | WritableStream<ReadFormat>): UndiciStreamWrapper<ReadFormat> | WritableStream<ReadFormat>;
15
- unpipe(dest: UndiciStreamWrapper<ReadFormat> | WritableStream<any>): void;
15
+ unpipe(dest: UndiciStreamWrapper<ReadFormat> | WritableStream): void;
16
16
  destroy(error?: Error): void;
17
17
  pause(): void;
18
18
  resume(): void;
@@ -26,5 +26,6 @@ export declare class UndiciStreamWrapper<ReadFormat extends Uint8Array | Uint16A
26
26
  private _error;
27
27
  private _emit;
28
28
  private _startReading;
29
+ [Symbol.asyncIterator](): AsyncIterableIterator<ReadFormat>;
29
30
  }
30
31
  export {};
@@ -144,10 +144,12 @@ export class UndiciStreamWrapper {
144
144
  const chunks = [];
145
145
  while (true) {
146
146
  const { done, value } = yield this.reader.read();
147
- if (done)
147
+ if (done) {
148
148
  break;
149
- if (value)
149
+ }
150
+ if (value) {
150
151
  chunks.push(value);
152
+ }
151
153
  }
152
154
  const decoder = new TextDecoder(this.encoding || "utf-8");
153
155
  return decoder.decode(yield new Blob(chunks).arrayBuffer());
@@ -201,4 +203,23 @@ export class UndiciStreamWrapper {
201
203
  }
202
204
  });
203
205
  }
206
+ [Symbol.asyncIterator]() {
207
+ return {
208
+ next: () => __awaiter(this, void 0, void 0, function* () {
209
+ if (this.paused) {
210
+ yield new Promise((resolve) => {
211
+ this.resumeCallback = resolve;
212
+ });
213
+ }
214
+ const { done, value } = yield this.reader.read();
215
+ if (done) {
216
+ return { done: true, value: undefined };
217
+ }
218
+ return { done: false, value };
219
+ }),
220
+ [Symbol.asyncIterator]() {
221
+ return this;
222
+ },
223
+ };
224
+ }
204
225
  }
@@ -13,5 +13,6 @@ export interface StreamWrapper<WritableStream, ReadFormat> {
13
13
  read(): Promise<ReadFormat | undefined>;
14
14
  text(): Promise<string>;
15
15
  json<T>(): Promise<T>;
16
+ [Symbol.asyncIterator](): AsyncIterableIterator<ReadFormat>;
16
17
  }
17
18
  export declare function chooseStreamWrapper(responseBody: any): Promise<Promise<StreamWrapper<any, any>>>;
@@ -13,7 +13,7 @@ export function chooseStreamWrapper(responseBody) {
13
13
  if (RUNTIME.type === "node" && RUNTIME.parsedVersion != null && RUNTIME.parsedVersion >= 18) {
14
14
  return new (yield import("./Node18UniversalStreamWrapper")).Node18UniversalStreamWrapper(responseBody);
15
15
  }
16
- else if (RUNTIME.type !== "node" && typeof fetch == "function") {
16
+ else if (RUNTIME.type !== "node" && typeof fetch === "function") {
17
17
  return new (yield import("./UndiciStreamWrapper")).UndiciStreamWrapper(responseBody);
18
18
  }
19
19
  else {
@@ -8,6 +8,7 @@ export interface BaseSchema<Raw, Parsed> {
8
8
  getType: () => SchemaType | SchemaType;
9
9
  }
10
10
  export declare const SchemaType: {
11
+ readonly BIGINT: "bigint";
11
12
  readonly DATE: "date";
12
13
  readonly ENUM: "enum";
13
14
  readonly LIST: "list";
@@ -1,4 +1,5 @@
1
1
  export const SchemaType = {
2
+ BIGINT: "bigint",
2
3
  DATE: "date",
3
4
  ENUM: "enum",
4
5
  LIST: "list",
@@ -0,0 +1,2 @@
1
+ import { Schema } from "../../Schema";
2
+ export declare function bigint(): Schema<string, bigint>;
@@ -0,0 +1,46 @@
1
+ import { SchemaType } from "../../Schema";
2
+ import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType";
3
+ import { maybeSkipValidation } from "../../utils/maybeSkipValidation";
4
+ import { getSchemaUtils } from "../schema-utils";
5
+ export function bigint() {
6
+ const baseSchema = {
7
+ parse: (raw, { breadcrumbsPrefix = [] } = {}) => {
8
+ if (typeof raw !== "string") {
9
+ return {
10
+ ok: false,
11
+ errors: [
12
+ {
13
+ path: breadcrumbsPrefix,
14
+ message: getErrorMessageForIncorrectType(raw, "string"),
15
+ },
16
+ ],
17
+ };
18
+ }
19
+ return {
20
+ ok: true,
21
+ value: BigInt(raw),
22
+ };
23
+ },
24
+ json: (bigint, { breadcrumbsPrefix = [] } = {}) => {
25
+ if (typeof bigint === "bigint") {
26
+ return {
27
+ ok: true,
28
+ value: bigint.toString(),
29
+ };
30
+ }
31
+ else {
32
+ return {
33
+ ok: false,
34
+ errors: [
35
+ {
36
+ path: breadcrumbsPrefix,
37
+ message: getErrorMessageForIncorrectType(bigint, "bigint"),
38
+ },
39
+ ],
40
+ };
41
+ }
42
+ },
43
+ getType: () => SchemaType.BIGINT,
44
+ };
45
+ return Object.assign(Object.assign({}, maybeSkipValidation(baseSchema)), getSchemaUtils(baseSchema));
46
+ }
@@ -0,0 +1 @@
1
+ export { bigint } from "./bigint";