mavenagi 0.0.0-alpha.9 → 1.0.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.
Files changed (621) hide show
  1. package/Client.d.ts +15 -0
  2. package/Client.js +10 -0
  3. package/README.md +78 -22
  4. package/api/resources/actions/client/Client.d.ts +21 -4
  5. package/api/resources/actions/client/Client.js +33 -19
  6. package/api/resources/actions/types/ActionBase.d.ts +2 -2
  7. package/api/resources/actions/types/ActionRequest.d.ts +12 -4
  8. package/api/resources/actions/types/ActionResponse.d.ts +12 -4
  9. package/api/resources/actions/types/ConversationExecutedActionPrecondition.d.ts +10 -0
  10. package/api/resources/actions/types/ConversationPrecondition.d.ts +16 -0
  11. package/api/resources/actions/types/MetadataPrecondition.d.ts +10 -0
  12. package/api/resources/actions/types/Precondition.d.ts +31 -0
  13. package/api/resources/actions/types/PreconditionBase.d.ts +8 -0
  14. package/api/resources/actions/types/PreconditionGroup.d.ts +8 -0
  15. package/api/resources/actions/types/PreconditionGroupOperator.d.ts +8 -0
  16. package/api/resources/actions/types/PreconditionGroupOperator.js +7 -0
  17. package/api/resources/actions/types/PreconditionOperator.d.ts +7 -0
  18. package/api/resources/actions/types/PreconditionOperator.js +6 -0
  19. package/api/resources/actions/types/TagsPrecondition.d.ts +8 -0
  20. package/api/resources/actions/types/index.d.ts +9 -1
  21. package/api/resources/actions/types/index.js +9 -1
  22. package/api/resources/appSettings/client/Client.d.ts +47 -0
  23. package/api/resources/appSettings/client/Client.js +125 -0
  24. package/api/resources/appSettings/client/index.d.ts +1 -0
  25. package/api/resources/appSettings/client/index.js +1 -0
  26. package/api/resources/appSettings/index.d.ts +1 -0
  27. package/api/resources/appSettings/index.js +1 -0
  28. package/api/resources/commons/types/AppUser.d.ts +3 -4
  29. package/api/resources/commons/types/AppUserIdentifier.d.ts +1 -1
  30. package/api/resources/commons/types/AppUserRequest.d.ts +22 -1
  31. package/api/resources/commons/types/AppUserResponse.d.ts +38 -1
  32. package/api/resources/commons/types/EntityType.d.ts +3 -1
  33. package/api/resources/commons/types/EntityType.js +2 -0
  34. package/api/resources/commons/types/Feedback.d.ts +32 -8
  35. package/api/resources/commons/types/FeedbackBase.d.ts +10 -0
  36. package/api/resources/commons/types/UserData.d.ts +10 -0
  37. package/api/resources/commons/types/VisibilityType.d.ts +9 -0
  38. package/api/resources/commons/types/VisibilityType.js +8 -0
  39. package/api/resources/commons/types/index.d.ts +6 -2
  40. package/api/resources/commons/types/index.js +6 -2
  41. package/api/resources/conversation/client/Client.d.ts +79 -36
  42. package/api/resources/conversation/client/Client.js +227 -91
  43. package/api/resources/conversation/client/index.d.ts +1 -1
  44. package/api/resources/conversation/client/index.js +1 -1
  45. package/api/resources/conversation/client/requests/ConversationGetRequest.d.ts +15 -0
  46. package/api/resources/conversation/client/requests/index.d.ts +1 -0
  47. package/api/resources/conversation/client/requests/index.js +1 -0
  48. package/api/resources/conversation/types/ActionFormField.d.ts +1 -0
  49. package/api/resources/conversation/types/AskRequest.d.ts +21 -5
  50. package/api/resources/conversation/types/AskStreamActionEvent.d.ts +6 -0
  51. package/api/resources/conversation/types/AskStreamStartEvent.d.ts +2 -1
  52. package/api/resources/conversation/types/AskStreamTextEvent.d.ts +1 -0
  53. package/api/resources/conversation/types/Attachment.d.ts +9 -0
  54. package/api/resources/conversation/types/BotChartResponse.d.ts +11 -0
  55. package/api/resources/conversation/types/BotChartResponse.js +4 -0
  56. package/api/resources/conversation/types/BotMessage.d.ts +2 -0
  57. package/api/resources/conversation/types/BotResponse.d.ts +4 -1
  58. package/api/resources/conversation/types/BotResponseMetadata.d.ts +2 -0
  59. package/api/resources/conversation/types/Capability.d.ts +15 -1
  60. package/api/resources/conversation/types/Capability.js +2 -0
  61. package/api/resources/conversation/types/CategorizationResponse.d.ts +6 -0
  62. package/api/resources/conversation/types/CategorizationResponse.js +4 -0
  63. package/api/resources/conversation/types/ChartSpecSchema.d.ts +7 -0
  64. package/api/resources/conversation/types/ChartSpecSchema.js +6 -0
  65. package/api/resources/conversation/types/ConversationAnalysis.d.ts +16 -0
  66. package/api/resources/conversation/types/ConversationAnalysis.js +4 -0
  67. package/api/resources/conversation/types/ConversationBase.d.ts +12 -2
  68. package/api/resources/conversation/types/ConversationMessageBase.d.ts +4 -5
  69. package/api/resources/conversation/types/ConversationMessageRequest.d.ts +3 -1
  70. package/api/resources/conversation/types/ConversationRequest.d.ts +0 -2
  71. package/api/resources/conversation/types/ConversationResponse.d.ts +51 -2
  72. package/api/resources/conversation/types/FeedbackRequest.d.ts +24 -1
  73. package/api/resources/conversation/types/GenerateMavenSuggestionsRequest.d.ts +2 -1
  74. package/api/resources/conversation/types/ResponseConfig.d.ts +4 -4
  75. package/api/resources/conversation/types/Sentiment.d.ts +14 -0
  76. package/api/resources/conversation/types/Sentiment.js +10 -0
  77. package/api/resources/conversation/types/StreamResponse.d.ts +4 -1
  78. package/api/resources/conversation/types/SubmitActionFormRequest.d.ts +1 -3
  79. package/api/resources/conversation/types/UserMessage.d.ts +5 -4
  80. package/api/resources/conversation/types/UserMessageBase.d.ts +11 -0
  81. package/api/resources/conversation/types/UserMessageBase.js +4 -0
  82. package/api/resources/conversation/types/index.d.ts +8 -2
  83. package/api/resources/conversation/types/index.js +8 -2
  84. package/api/resources/index.d.ts +4 -0
  85. package/api/resources/index.js +4 -0
  86. package/api/resources/knowledge/client/Client.d.ts +13 -4
  87. package/api/resources/knowledge/client/Client.js +55 -41
  88. package/api/resources/translations/client/Client.d.ts +52 -0
  89. package/api/resources/translations/client/Client.js +130 -0
  90. package/api/resources/translations/client/index.d.ts +1 -0
  91. package/api/resources/translations/client/index.js +1 -0
  92. package/api/resources/translations/index.d.ts +2 -0
  93. package/api/resources/translations/index.js +2 -0
  94. package/api/resources/translations/types/TranslationRequest.d.ts +16 -0
  95. package/api/resources/translations/types/TranslationRequest.js +4 -0
  96. package/api/resources/translations/types/TranslationResponse.d.ts +13 -0
  97. package/api/resources/translations/types/TranslationResponse.js +4 -0
  98. package/api/resources/translations/types/index.d.ts +2 -0
  99. package/api/resources/translations/types/index.js +2 -0
  100. package/api/resources/triggers/client/Client.d.ts +10 -1
  101. package/api/resources/triggers/client/Client.js +22 -16
  102. package/api/resources/triggers/types/index.d.ts +0 -3
  103. package/api/resources/triggers/types/index.js +0 -3
  104. package/api/resources/users/client/Client.d.ts +27 -12
  105. package/api/resources/users/client/Client.js +33 -23
  106. package/core/fetcher/Fetcher.d.ts +4 -1
  107. package/core/fetcher/Fetcher.js +18 -159
  108. package/core/fetcher/createRequestUrl.d.ts +1 -0
  109. package/core/fetcher/createRequestUrl.js +6 -0
  110. package/core/fetcher/getFetchFn.d.ts +4 -0
  111. package/core/fetcher/getFetchFn.js +32 -0
  112. package/core/fetcher/getRequestBody.d.ts +7 -0
  113. package/core/fetcher/getRequestBody.js +19 -0
  114. package/core/fetcher/getResponseBody.d.ts +1 -0
  115. package/core/fetcher/getResponseBody.js +48 -0
  116. package/core/fetcher/makeRequest.d.ts +1 -0
  117. package/core/fetcher/makeRequest.js +38 -0
  118. package/core/fetcher/requestWithRetries.d.ts +1 -0
  119. package/core/fetcher/requestWithRetries.js +28 -0
  120. package/core/fetcher/signals.d.ts +12 -0
  121. package/core/fetcher/signals.js +32 -0
  122. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
  123. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +243 -0
  124. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
  125. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +120 -0
  126. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
  127. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +225 -0
  128. package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
  129. package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +23 -0
  130. package/core/runtime/runtime.d.ts +1 -0
  131. package/core/runtime/runtime.js +1 -0
  132. package/core/schemas/Schema.d.ts +8 -4
  133. package/core/schemas/Schema.js +1 -0
  134. package/core/schemas/builders/bigint/bigint.d.ts +2 -0
  135. package/core/schemas/builders/bigint/bigint.js +46 -0
  136. package/core/schemas/builders/bigint/index.d.ts +1 -0
  137. package/core/schemas/builders/bigint/index.js +1 -0
  138. package/core/schemas/builders/index.d.ts +1 -0
  139. package/core/schemas/builders/index.js +1 -0
  140. package/core/schemas/builders/lazy/lazy.d.ts +2 -2
  141. package/core/schemas/builders/lazy/lazy.js +8 -19
  142. package/core/schemas/builders/lazy/lazyObject.js +1 -10
  143. package/core/schemas/builders/list/list.js +31 -44
  144. package/core/schemas/builders/object/object.js +90 -111
  145. package/core/schemas/builders/object/types.d.ts +2 -2
  146. package/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
  147. package/core/schemas/builders/record/record.js +49 -60
  148. package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
  149. package/core/schemas/builders/schema-utils/getSchemaUtils.js +18 -21
  150. package/core/schemas/builders/set/set.js +6 -15
  151. package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
  152. package/core/schemas/builders/union/union.js +51 -62
  153. package/core/schemas/utils/getErrorMessageForIncorrectType.js +4 -0
  154. package/core/schemas/utils/maybeSkipValidation.js +3 -12
  155. package/dist/Client.d.ts +15 -0
  156. package/dist/Client.js +10 -0
  157. package/dist/api/resources/actions/client/Client.d.ts +21 -4
  158. package/dist/api/resources/actions/client/Client.js +33 -19
  159. package/dist/api/resources/actions/types/ActionBase.d.ts +2 -2
  160. package/dist/api/resources/actions/types/ActionRequest.d.ts +12 -4
  161. package/dist/api/resources/actions/types/ActionResponse.d.ts +12 -4
  162. package/dist/api/resources/actions/types/ConversationExecutedActionPrecondition.d.ts +10 -0
  163. package/dist/api/resources/actions/types/ConversationExecutedActionPrecondition.js +4 -0
  164. package/dist/api/resources/actions/types/ConversationPrecondition.d.ts +16 -0
  165. package/dist/api/resources/actions/types/ConversationPrecondition.js +4 -0
  166. package/dist/api/resources/actions/types/MetadataPrecondition.d.ts +10 -0
  167. package/dist/api/resources/actions/types/MetadataPrecondition.js +4 -0
  168. package/dist/api/resources/actions/types/Precondition.d.ts +31 -0
  169. package/dist/api/resources/actions/types/Precondition.js +4 -0
  170. package/dist/api/resources/actions/types/PreconditionBase.d.ts +8 -0
  171. package/dist/api/resources/actions/types/PreconditionBase.js +4 -0
  172. package/dist/api/resources/actions/types/PreconditionGroup.d.ts +8 -0
  173. package/dist/api/resources/actions/types/PreconditionGroup.js +4 -0
  174. package/dist/api/resources/actions/types/PreconditionGroupOperator.d.ts +8 -0
  175. package/dist/api/resources/actions/types/PreconditionGroupOperator.js +7 -0
  176. package/dist/api/resources/actions/types/PreconditionOperator.d.ts +7 -0
  177. package/dist/api/resources/actions/types/PreconditionOperator.js +6 -0
  178. package/dist/api/resources/actions/types/TagsPrecondition.d.ts +8 -0
  179. package/dist/api/resources/actions/types/TagsPrecondition.js +4 -0
  180. package/dist/api/resources/actions/types/index.d.ts +9 -1
  181. package/dist/api/resources/actions/types/index.js +9 -1
  182. package/dist/api/resources/appSettings/client/Client.d.ts +47 -0
  183. package/dist/api/resources/appSettings/client/Client.js +125 -0
  184. package/dist/api/resources/appSettings/client/index.d.ts +1 -0
  185. package/dist/api/resources/appSettings/client/index.js +1 -0
  186. package/dist/api/resources/appSettings/index.d.ts +1 -0
  187. package/dist/api/resources/appSettings/index.js +1 -0
  188. package/dist/api/resources/commons/types/AppUser.d.ts +3 -4
  189. package/dist/api/resources/commons/types/AppUserIdentifier.d.ts +1 -1
  190. package/dist/api/resources/commons/types/AppUserRequest.d.ts +22 -1
  191. package/dist/api/resources/commons/types/AppUserResponse.d.ts +38 -1
  192. package/dist/api/resources/commons/types/EntityType.d.ts +3 -1
  193. package/dist/api/resources/commons/types/EntityType.js +2 -0
  194. package/dist/api/resources/commons/types/EventTriggerBase.js +4 -0
  195. package/dist/api/resources/commons/types/EventTriggerResponse.js +4 -0
  196. package/dist/api/resources/commons/types/Feedback.d.ts +32 -8
  197. package/dist/api/resources/commons/types/FeedbackBase.d.ts +10 -0
  198. package/dist/api/resources/commons/types/FeedbackBase.js +4 -0
  199. package/dist/api/resources/commons/types/UserData.d.ts +10 -0
  200. package/dist/api/resources/commons/types/UserData.js +4 -0
  201. package/dist/api/resources/commons/types/VisibilityType.d.ts +9 -0
  202. package/dist/api/resources/commons/types/VisibilityType.js +8 -0
  203. package/dist/api/resources/commons/types/index.d.ts +6 -2
  204. package/dist/api/resources/commons/types/index.js +6 -2
  205. package/dist/api/resources/conversation/client/Client.d.ts +79 -36
  206. package/dist/api/resources/conversation/client/Client.js +227 -91
  207. package/dist/api/resources/conversation/client/index.d.ts +1 -1
  208. package/dist/api/resources/conversation/client/index.js +1 -1
  209. package/dist/api/resources/conversation/client/requests/ConversationGetRequest.d.ts +15 -0
  210. package/dist/api/resources/conversation/client/requests/ConversationGetRequest.js +4 -0
  211. package/dist/api/resources/conversation/client/requests/index.d.ts +1 -0
  212. package/dist/api/resources/conversation/client/requests/index.js +1 -0
  213. package/dist/api/resources/conversation/types/ActionFormField.d.ts +1 -0
  214. package/dist/api/resources/conversation/types/AskRequest.d.ts +21 -5
  215. package/dist/api/resources/conversation/types/AskStreamActionEvent.d.ts +6 -0
  216. package/dist/api/resources/conversation/types/AskStreamActionEvent.js +4 -0
  217. package/dist/api/resources/conversation/types/AskStreamStartEvent.d.ts +2 -1
  218. package/dist/api/resources/conversation/types/AskStreamTextEvent.d.ts +1 -0
  219. package/dist/api/resources/conversation/types/Attachment.d.ts +9 -0
  220. package/dist/api/resources/conversation/types/Attachment.js +4 -0
  221. package/dist/api/resources/conversation/types/BotChartResponse.d.ts +11 -0
  222. package/dist/api/resources/conversation/types/BotChartResponse.js +4 -0
  223. package/dist/api/resources/conversation/types/BotMessage.d.ts +2 -0
  224. package/dist/api/resources/conversation/types/BotResponse.d.ts +4 -1
  225. package/dist/api/resources/conversation/types/BotResponseMetadata.d.ts +2 -0
  226. package/dist/api/resources/conversation/types/Capability.d.ts +15 -1
  227. package/dist/api/resources/conversation/types/Capability.js +2 -0
  228. package/dist/api/resources/conversation/types/CategorizationResponse.d.ts +6 -0
  229. package/dist/api/resources/conversation/types/CategorizationResponse.js +4 -0
  230. package/dist/api/resources/conversation/types/ChartSpecSchema.d.ts +7 -0
  231. package/dist/api/resources/conversation/types/ChartSpecSchema.js +6 -0
  232. package/dist/api/resources/conversation/types/ConversationAnalysis.d.ts +16 -0
  233. package/dist/api/resources/conversation/types/ConversationAnalysis.js +4 -0
  234. package/dist/api/resources/conversation/types/ConversationBase.d.ts +12 -2
  235. package/dist/api/resources/conversation/types/ConversationMessageBase.d.ts +4 -5
  236. package/dist/api/resources/conversation/types/ConversationMessageRequest.d.ts +3 -1
  237. package/dist/api/resources/conversation/types/ConversationRequest.d.ts +0 -2
  238. package/dist/api/resources/conversation/types/ConversationResponse.d.ts +51 -2
  239. package/dist/api/resources/conversation/types/FeedbackRequest.d.ts +24 -1
  240. package/dist/api/resources/conversation/types/GenerateMavenSuggestionsRequest.d.ts +2 -1
  241. package/dist/api/resources/conversation/types/ResponseConfig.d.ts +4 -4
  242. package/dist/api/resources/conversation/types/Sentiment.d.ts +14 -0
  243. package/dist/api/resources/conversation/types/Sentiment.js +10 -0
  244. package/dist/api/resources/conversation/types/StreamResponse.d.ts +4 -1
  245. package/dist/api/resources/conversation/types/SubmitActionFormRequest.d.ts +1 -3
  246. package/dist/api/resources/conversation/types/UserMessage.d.ts +5 -4
  247. package/dist/api/resources/conversation/types/UserMessageBase.d.ts +11 -0
  248. package/dist/api/resources/conversation/types/UserMessageBase.js +4 -0
  249. package/dist/api/resources/conversation/types/index.d.ts +8 -2
  250. package/dist/api/resources/conversation/types/index.js +8 -2
  251. package/dist/api/resources/index.d.ts +4 -0
  252. package/dist/api/resources/index.js +4 -0
  253. package/dist/api/resources/knowledge/client/Client.d.ts +13 -4
  254. package/dist/api/resources/knowledge/client/Client.js +55 -41
  255. package/dist/api/resources/translations/client/Client.d.ts +52 -0
  256. package/dist/api/resources/translations/client/Client.js +130 -0
  257. package/dist/api/resources/translations/client/index.d.ts +1 -0
  258. package/dist/api/resources/translations/client/index.js +1 -0
  259. package/dist/api/resources/translations/index.d.ts +2 -0
  260. package/dist/api/resources/translations/index.js +2 -0
  261. package/dist/api/resources/translations/types/TranslationRequest.d.ts +16 -0
  262. package/dist/api/resources/translations/types/TranslationRequest.js +4 -0
  263. package/dist/api/resources/translations/types/TranslationResponse.d.ts +13 -0
  264. package/dist/api/resources/translations/types/TranslationResponse.js +4 -0
  265. package/dist/api/resources/translations/types/index.d.ts +2 -0
  266. package/dist/api/resources/translations/types/index.js +2 -0
  267. package/dist/api/resources/triggers/client/Client.d.ts +10 -1
  268. package/dist/api/resources/triggers/client/Client.js +22 -16
  269. package/dist/api/resources/triggers/types/index.d.ts +0 -3
  270. package/dist/api/resources/triggers/types/index.js +0 -3
  271. package/dist/api/resources/users/client/Client.d.ts +27 -12
  272. package/dist/api/resources/users/client/Client.js +33 -23
  273. package/dist/core/fetcher/Fetcher.d.ts +4 -1
  274. package/dist/core/fetcher/Fetcher.js +18 -159
  275. package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
  276. package/dist/core/fetcher/createRequestUrl.js +6 -0
  277. package/dist/core/fetcher/getFetchFn.d.ts +4 -0
  278. package/dist/core/fetcher/getFetchFn.js +32 -0
  279. package/dist/core/fetcher/getRequestBody.d.ts +7 -0
  280. package/dist/core/fetcher/getRequestBody.js +19 -0
  281. package/dist/core/fetcher/getResponseBody.d.ts +1 -0
  282. package/dist/core/fetcher/getResponseBody.js +48 -0
  283. package/dist/core/fetcher/makeRequest.d.ts +1 -0
  284. package/dist/core/fetcher/makeRequest.js +38 -0
  285. package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
  286. package/dist/core/fetcher/requestWithRetries.js +28 -0
  287. package/dist/core/fetcher/signals.d.ts +12 -0
  288. package/dist/core/fetcher/signals.js +32 -0
  289. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
  290. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +243 -0
  291. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
  292. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +120 -0
  293. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
  294. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +225 -0
  295. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
  296. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +23 -0
  297. package/dist/core/runtime/runtime.d.ts +1 -0
  298. package/dist/core/runtime/runtime.js +1 -0
  299. package/dist/core/schemas/Schema.d.ts +8 -4
  300. package/dist/core/schemas/Schema.js +1 -0
  301. package/dist/core/schemas/builders/bigint/bigint.d.ts +2 -0
  302. package/dist/core/schemas/builders/bigint/bigint.js +46 -0
  303. package/dist/core/schemas/builders/bigint/index.d.ts +1 -0
  304. package/dist/core/schemas/builders/bigint/index.js +1 -0
  305. package/dist/core/schemas/builders/index.d.ts +1 -0
  306. package/dist/core/schemas/builders/index.js +1 -0
  307. package/dist/core/schemas/builders/lazy/lazy.d.ts +2 -2
  308. package/dist/core/schemas/builders/lazy/lazy.js +8 -19
  309. package/dist/core/schemas/builders/lazy/lazyObject.js +1 -10
  310. package/dist/core/schemas/builders/list/list.js +31 -44
  311. package/dist/core/schemas/builders/object/object.js +90 -111
  312. package/dist/core/schemas/builders/object/types.d.ts +2 -2
  313. package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +3 -12
  314. package/dist/core/schemas/builders/record/record.js +49 -60
  315. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +2 -2
  316. package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +18 -21
  317. package/dist/core/schemas/builders/set/set.js +6 -15
  318. package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +21 -32
  319. package/dist/core/schemas/builders/union/union.js +51 -62
  320. package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +4 -0
  321. package/dist/core/schemas/utils/maybeSkipValidation.js +3 -12
  322. package/dist/serialization/resources/actions/types/ActionBase.d.ts +1 -2
  323. package/dist/serialization/resources/actions/types/ActionBase.js +2 -2
  324. package/dist/serialization/resources/actions/types/ConversationExecutedActionPrecondition.d.ts +14 -0
  325. package/dist/serialization/resources/actions/types/ConversationExecutedActionPrecondition.js +11 -0
  326. package/dist/serialization/resources/actions/types/ConversationPrecondition.d.ts +22 -0
  327. package/dist/serialization/resources/actions/types/ConversationPrecondition.js +17 -0
  328. package/dist/serialization/resources/actions/types/MetadataPrecondition.d.ts +14 -0
  329. package/dist/serialization/resources/actions/types/MetadataPrecondition.js +11 -0
  330. package/dist/serialization/resources/actions/types/Precondition.d.ts +22 -0
  331. package/dist/serialization/resources/actions/types/Precondition.js +19 -0
  332. package/dist/serialization/resources/actions/types/PreconditionBase.d.ts +13 -0
  333. package/dist/serialization/resources/actions/types/PreconditionBase.js +8 -0
  334. package/dist/serialization/resources/actions/types/PreconditionGroup.d.ts +14 -0
  335. package/dist/serialization/resources/actions/types/PreconditionGroup.js +10 -0
  336. package/dist/serialization/resources/actions/types/PreconditionGroupOperator.d.ts +10 -0
  337. package/dist/serialization/resources/actions/types/PreconditionGroupOperator.js +5 -0
  338. package/dist/serialization/resources/actions/types/PreconditionOperator.d.ts +10 -0
  339. package/dist/serialization/resources/actions/types/PreconditionOperator.js +5 -0
  340. package/dist/serialization/resources/actions/types/TagsPrecondition.d.ts +13 -0
  341. package/dist/serialization/resources/actions/types/TagsPrecondition.js +10 -0
  342. package/dist/serialization/resources/actions/types/index.d.ts +9 -1
  343. package/dist/serialization/resources/actions/types/index.js +9 -1
  344. package/dist/serialization/resources/appSettings/client/get.d.ts +9 -0
  345. package/dist/serialization/resources/appSettings/client/get.js +5 -0
  346. package/dist/serialization/resources/appSettings/client/index.d.ts +1 -0
  347. package/dist/serialization/resources/appSettings/client/index.js +1 -0
  348. package/dist/serialization/resources/appSettings/index.d.ts +1 -0
  349. package/dist/serialization/resources/appSettings/index.js +1 -0
  350. package/dist/serialization/resources/commons/types/AppUser.d.ts +4 -4
  351. package/dist/serialization/resources/commons/types/AppUser.js +4 -4
  352. package/dist/serialization/resources/commons/types/AppUserIdentifier.d.ts +1 -1
  353. package/dist/serialization/resources/commons/types/AppUserIdentifier.js +1 -1
  354. package/dist/serialization/resources/commons/types/AppUserRequest.d.ts +4 -1
  355. package/dist/serialization/resources/commons/types/AppUserRequest.js +7 -1
  356. package/dist/serialization/resources/commons/types/AppUserResponse.d.ts +6 -1
  357. package/dist/serialization/resources/commons/types/AppUserResponse.js +9 -1
  358. package/dist/serialization/resources/commons/types/EntityType.d.ts +1 -1
  359. package/dist/serialization/resources/commons/types/EntityType.js +2 -0
  360. package/dist/serialization/resources/{triggers → commons}/types/EventTriggerResponse.d.ts +1 -1
  361. package/dist/serialization/resources/{triggers → commons}/types/EventTriggerResponse.js +1 -1
  362. package/dist/serialization/resources/commons/types/Feedback.d.ts +6 -7
  363. package/dist/serialization/resources/commons/types/Feedback.js +9 -8
  364. package/dist/serialization/resources/commons/types/FeedbackBase.d.ts +14 -0
  365. package/dist/serialization/resources/commons/types/FeedbackBase.js +9 -0
  366. package/dist/serialization/resources/commons/types/UserData.d.ts +14 -0
  367. package/dist/serialization/resources/commons/types/UserData.js +9 -0
  368. package/dist/serialization/resources/commons/types/VisibilityType.d.ts +10 -0
  369. package/dist/serialization/resources/commons/types/VisibilityType.js +5 -0
  370. package/dist/serialization/resources/commons/types/index.d.ts +6 -2
  371. package/dist/serialization/resources/commons/types/index.js +6 -2
  372. package/dist/serialization/resources/conversation/types/ActionFormField.d.ts +1 -0
  373. package/dist/serialization/resources/conversation/types/ActionFormField.js +1 -0
  374. package/dist/serialization/resources/conversation/types/AskRequest.d.ts +5 -5
  375. package/dist/serialization/resources/conversation/types/AskRequest.js +5 -5
  376. package/dist/serialization/resources/conversation/types/AskStreamActionEvent.d.ts +12 -0
  377. package/dist/serialization/resources/conversation/types/AskStreamActionEvent.js +6 -0
  378. package/dist/serialization/resources/conversation/types/AskStreamStartEvent.d.ts +2 -1
  379. package/dist/serialization/resources/conversation/types/AskStreamStartEvent.js +2 -1
  380. package/dist/serialization/resources/{actions/types/Preconditions.d.ts → conversation/types/Attachment.d.ts} +4 -3
  381. package/dist/serialization/resources/conversation/types/Attachment.js +8 -0
  382. package/dist/serialization/resources/conversation/types/BotChartResponse.d.ts +15 -0
  383. package/dist/serialization/resources/conversation/types/BotChartResponse.js +10 -0
  384. package/dist/serialization/resources/conversation/types/BotMessage.d.ts +2 -0
  385. package/dist/serialization/resources/conversation/types/BotMessage.js +2 -0
  386. package/dist/serialization/resources/conversation/types/BotResponse.d.ts +5 -1
  387. package/dist/serialization/resources/conversation/types/BotResponse.js +2 -0
  388. package/dist/serialization/resources/conversation/types/BotResponseMetadata.d.ts +1 -0
  389. package/dist/serialization/resources/conversation/types/BotResponseMetadata.js +1 -0
  390. package/dist/serialization/resources/conversation/types/Capability.d.ts +1 -1
  391. package/dist/serialization/resources/conversation/types/Capability.js +1 -1
  392. package/dist/serialization/resources/conversation/types/CategorizationResponse.d.ts +12 -0
  393. package/dist/serialization/resources/conversation/types/CategorizationResponse.js +7 -0
  394. package/dist/serialization/resources/conversation/types/ChartSpecSchema.d.ts +10 -0
  395. package/dist/serialization/resources/conversation/types/ChartSpecSchema.js +5 -0
  396. package/dist/serialization/resources/conversation/types/ConversationAnalysis.d.ts +17 -0
  397. package/dist/serialization/resources/conversation/types/ConversationAnalysis.js +12 -0
  398. package/dist/serialization/resources/conversation/types/ConversationBase.d.ts +6 -1
  399. package/dist/serialization/resources/conversation/types/ConversationBase.js +6 -1
  400. package/dist/serialization/resources/conversation/types/ConversationMessageBase.d.ts +2 -3
  401. package/dist/serialization/resources/conversation/types/ConversationMessageBase.js +2 -3
  402. package/dist/serialization/resources/conversation/types/ConversationMessageRequest.d.ts +4 -2
  403. package/dist/serialization/resources/conversation/types/ConversationMessageRequest.js +7 -2
  404. package/dist/serialization/resources/conversation/types/ConversationRequest.d.ts +0 -2
  405. package/dist/serialization/resources/conversation/types/ConversationRequest.js +0 -2
  406. package/dist/serialization/resources/conversation/types/ConversationResponse.d.ts +2 -2
  407. package/dist/serialization/resources/conversation/types/ConversationResponse.js +2 -2
  408. package/dist/serialization/resources/conversation/types/FeedbackRequest.d.ts +7 -2
  409. package/dist/serialization/resources/conversation/types/FeedbackRequest.js +10 -2
  410. package/dist/serialization/resources/conversation/types/GenerateMavenSuggestionsRequest.d.ts +2 -1
  411. package/dist/serialization/resources/conversation/types/GenerateMavenSuggestionsRequest.js +2 -1
  412. package/dist/serialization/resources/conversation/types/ResponseConfig.d.ts +3 -3
  413. package/dist/serialization/resources/conversation/types/ResponseConfig.js +3 -3
  414. package/dist/serialization/resources/conversation/types/Sentiment.d.ts +10 -0
  415. package/dist/serialization/resources/conversation/types/Sentiment.js +5 -0
  416. package/dist/serialization/resources/conversation/types/StreamResponse.d.ts +5 -1
  417. package/dist/serialization/resources/conversation/types/StreamResponse.js +2 -0
  418. package/dist/serialization/resources/conversation/types/SubmitActionFormRequest.d.ts +0 -2
  419. package/dist/serialization/resources/conversation/types/SubmitActionFormRequest.js +0 -2
  420. package/dist/serialization/resources/conversation/types/UserMessage.d.ts +5 -5
  421. package/dist/serialization/resources/conversation/types/UserMessage.js +5 -5
  422. package/dist/serialization/resources/conversation/types/UserMessageBase.d.ts +17 -0
  423. package/dist/serialization/resources/conversation/types/UserMessageBase.js +14 -0
  424. package/dist/serialization/resources/conversation/types/index.d.ts +8 -2
  425. package/dist/serialization/resources/conversation/types/index.js +8 -2
  426. package/dist/serialization/resources/index.d.ts +3 -0
  427. package/dist/serialization/resources/index.js +3 -0
  428. package/dist/serialization/resources/translations/index.d.ts +1 -0
  429. package/dist/serialization/resources/translations/index.js +1 -0
  430. package/dist/serialization/resources/translations/types/TranslationRequest.d.ts +13 -0
  431. package/dist/serialization/resources/translations/types/TranslationRequest.js +8 -0
  432. package/dist/serialization/resources/translations/types/TranslationResponse.d.ts +12 -0
  433. package/dist/serialization/resources/translations/types/TranslationResponse.js +7 -0
  434. package/dist/serialization/resources/translations/types/index.d.ts +2 -0
  435. package/dist/serialization/resources/translations/types/index.js +2 -0
  436. package/dist/serialization/resources/triggers/types/EventTriggerRequest.d.ts +1 -1
  437. package/dist/serialization/resources/triggers/types/EventTriggerRequest.js +1 -1
  438. package/dist/serialization/resources/triggers/types/index.d.ts +0 -3
  439. package/dist/serialization/resources/triggers/types/index.js +0 -3
  440. package/dist/version.d.ts +1 -0
  441. package/dist/version.js +1 -0
  442. package/package.json +12 -2
  443. package/reference.md +1953 -0
  444. package/serialization/resources/actions/types/ActionBase.d.ts +1 -2
  445. package/serialization/resources/actions/types/ActionBase.js +2 -2
  446. package/serialization/resources/actions/types/ConversationExecutedActionPrecondition.d.ts +14 -0
  447. package/serialization/resources/actions/types/ConversationExecutedActionPrecondition.js +11 -0
  448. package/serialization/resources/actions/types/ConversationPrecondition.d.ts +22 -0
  449. package/serialization/resources/actions/types/ConversationPrecondition.js +17 -0
  450. package/serialization/resources/actions/types/MetadataPrecondition.d.ts +14 -0
  451. package/serialization/resources/actions/types/MetadataPrecondition.js +11 -0
  452. package/serialization/resources/actions/types/Precondition.d.ts +22 -0
  453. package/serialization/resources/actions/types/Precondition.js +19 -0
  454. package/serialization/resources/actions/types/PreconditionBase.d.ts +13 -0
  455. package/serialization/resources/actions/types/PreconditionBase.js +8 -0
  456. package/serialization/resources/actions/types/PreconditionGroup.d.ts +14 -0
  457. package/serialization/resources/actions/types/PreconditionGroup.js +10 -0
  458. package/serialization/resources/actions/types/PreconditionGroupOperator.d.ts +10 -0
  459. package/serialization/resources/actions/types/PreconditionGroupOperator.js +5 -0
  460. package/serialization/resources/actions/types/PreconditionOperator.d.ts +10 -0
  461. package/serialization/resources/actions/types/PreconditionOperator.js +5 -0
  462. package/serialization/resources/actions/types/TagsPrecondition.d.ts +13 -0
  463. package/serialization/resources/actions/types/TagsPrecondition.js +10 -0
  464. package/serialization/resources/actions/types/index.d.ts +9 -1
  465. package/serialization/resources/actions/types/index.js +9 -1
  466. package/serialization/resources/appSettings/client/get.d.ts +9 -0
  467. package/serialization/resources/appSettings/client/get.js +5 -0
  468. package/serialization/resources/appSettings/client/index.d.ts +1 -0
  469. package/serialization/resources/appSettings/client/index.js +1 -0
  470. package/serialization/resources/appSettings/index.d.ts +1 -0
  471. package/serialization/resources/appSettings/index.js +1 -0
  472. package/serialization/resources/commons/types/AppUser.d.ts +4 -4
  473. package/serialization/resources/commons/types/AppUser.js +4 -4
  474. package/serialization/resources/commons/types/AppUserIdentifier.d.ts +1 -1
  475. package/serialization/resources/commons/types/AppUserIdentifier.js +1 -1
  476. package/serialization/resources/commons/types/AppUserRequest.d.ts +4 -1
  477. package/serialization/resources/commons/types/AppUserRequest.js +7 -1
  478. package/serialization/resources/commons/types/AppUserResponse.d.ts +6 -1
  479. package/serialization/resources/commons/types/AppUserResponse.js +9 -1
  480. package/serialization/resources/commons/types/EntityType.d.ts +1 -1
  481. package/serialization/resources/commons/types/EntityType.js +2 -0
  482. package/serialization/resources/{triggers → commons}/types/EventTriggerResponse.d.ts +1 -1
  483. package/serialization/resources/{triggers → commons}/types/EventTriggerResponse.js +1 -1
  484. package/serialization/resources/commons/types/Feedback.d.ts +6 -7
  485. package/serialization/resources/commons/types/Feedback.js +9 -8
  486. package/serialization/resources/commons/types/FeedbackBase.d.ts +14 -0
  487. package/serialization/resources/commons/types/FeedbackBase.js +9 -0
  488. package/serialization/resources/commons/types/UserData.d.ts +14 -0
  489. package/serialization/resources/commons/types/UserData.js +9 -0
  490. package/serialization/resources/commons/types/VisibilityType.d.ts +10 -0
  491. package/serialization/resources/commons/types/VisibilityType.js +5 -0
  492. package/serialization/resources/commons/types/index.d.ts +6 -2
  493. package/serialization/resources/commons/types/index.js +6 -2
  494. package/serialization/resources/conversation/types/ActionFormField.d.ts +1 -0
  495. package/serialization/resources/conversation/types/ActionFormField.js +1 -0
  496. package/serialization/resources/conversation/types/AskRequest.d.ts +5 -5
  497. package/serialization/resources/conversation/types/AskRequest.js +5 -5
  498. package/serialization/resources/conversation/types/AskStreamActionEvent.d.ts +12 -0
  499. package/serialization/resources/conversation/types/AskStreamActionEvent.js +6 -0
  500. package/serialization/resources/conversation/types/AskStreamStartEvent.d.ts +2 -1
  501. package/serialization/resources/conversation/types/AskStreamStartEvent.js +2 -1
  502. package/serialization/resources/{actions/types/Preconditions.d.ts → conversation/types/Attachment.d.ts} +4 -3
  503. package/serialization/resources/conversation/types/Attachment.js +8 -0
  504. package/serialization/resources/conversation/types/BotChartResponse.d.ts +15 -0
  505. package/serialization/resources/conversation/types/BotChartResponse.js +10 -0
  506. package/serialization/resources/conversation/types/BotMessage.d.ts +2 -0
  507. package/serialization/resources/conversation/types/BotMessage.js +2 -0
  508. package/serialization/resources/conversation/types/BotResponse.d.ts +5 -1
  509. package/serialization/resources/conversation/types/BotResponse.js +2 -0
  510. package/serialization/resources/conversation/types/BotResponseMetadata.d.ts +1 -0
  511. package/serialization/resources/conversation/types/BotResponseMetadata.js +1 -0
  512. package/serialization/resources/conversation/types/Capability.d.ts +1 -1
  513. package/serialization/resources/conversation/types/Capability.js +1 -1
  514. package/serialization/resources/conversation/types/CategorizationResponse.d.ts +12 -0
  515. package/serialization/resources/conversation/types/CategorizationResponse.js +7 -0
  516. package/serialization/resources/conversation/types/ChartSpecSchema.d.ts +10 -0
  517. package/serialization/resources/conversation/types/ChartSpecSchema.js +5 -0
  518. package/serialization/resources/conversation/types/ConversationAnalysis.d.ts +17 -0
  519. package/serialization/resources/conversation/types/ConversationAnalysis.js +12 -0
  520. package/serialization/resources/conversation/types/ConversationBase.d.ts +6 -1
  521. package/serialization/resources/conversation/types/ConversationBase.js +6 -1
  522. package/serialization/resources/conversation/types/ConversationMessageBase.d.ts +2 -3
  523. package/serialization/resources/conversation/types/ConversationMessageBase.js +2 -3
  524. package/serialization/resources/conversation/types/ConversationMessageRequest.d.ts +4 -2
  525. package/serialization/resources/conversation/types/ConversationMessageRequest.js +7 -2
  526. package/serialization/resources/conversation/types/ConversationRequest.d.ts +0 -2
  527. package/serialization/resources/conversation/types/ConversationRequest.js +0 -2
  528. package/serialization/resources/conversation/types/ConversationResponse.d.ts +2 -2
  529. package/serialization/resources/conversation/types/ConversationResponse.js +2 -2
  530. package/serialization/resources/conversation/types/FeedbackRequest.d.ts +7 -2
  531. package/serialization/resources/conversation/types/FeedbackRequest.js +10 -2
  532. package/serialization/resources/conversation/types/GenerateMavenSuggestionsRequest.d.ts +2 -1
  533. package/serialization/resources/conversation/types/GenerateMavenSuggestionsRequest.js +2 -1
  534. package/serialization/resources/conversation/types/ResponseConfig.d.ts +3 -3
  535. package/serialization/resources/conversation/types/ResponseConfig.js +3 -3
  536. package/serialization/resources/conversation/types/Sentiment.d.ts +10 -0
  537. package/serialization/resources/conversation/types/Sentiment.js +5 -0
  538. package/serialization/resources/conversation/types/StreamResponse.d.ts +5 -1
  539. package/serialization/resources/conversation/types/StreamResponse.js +2 -0
  540. package/serialization/resources/conversation/types/SubmitActionFormRequest.d.ts +0 -2
  541. package/serialization/resources/conversation/types/SubmitActionFormRequest.js +0 -2
  542. package/serialization/resources/conversation/types/UserMessage.d.ts +5 -5
  543. package/serialization/resources/conversation/types/UserMessage.js +5 -5
  544. package/serialization/resources/conversation/types/UserMessageBase.d.ts +17 -0
  545. package/serialization/resources/conversation/types/UserMessageBase.js +14 -0
  546. package/serialization/resources/conversation/types/index.d.ts +8 -2
  547. package/serialization/resources/conversation/types/index.js +8 -2
  548. package/serialization/resources/index.d.ts +3 -0
  549. package/serialization/resources/index.js +3 -0
  550. package/serialization/resources/translations/index.d.ts +1 -0
  551. package/serialization/resources/translations/index.js +1 -0
  552. package/serialization/resources/translations/types/TranslationRequest.d.ts +13 -0
  553. package/serialization/resources/translations/types/TranslationRequest.js +8 -0
  554. package/serialization/resources/translations/types/TranslationResponse.d.ts +12 -0
  555. package/serialization/resources/translations/types/TranslationResponse.js +7 -0
  556. package/serialization/resources/translations/types/index.d.ts +2 -0
  557. package/serialization/resources/translations/types/index.js +2 -0
  558. package/serialization/resources/triggers/types/EventTriggerRequest.d.ts +1 -1
  559. package/serialization/resources/triggers/types/EventTriggerRequest.js +1 -1
  560. package/serialization/resources/triggers/types/index.d.ts +0 -3
  561. package/serialization/resources/triggers/types/index.js +0 -3
  562. package/version.d.ts +1 -0
  563. package/version.js +1 -0
  564. package/api/resources/actions/types/Preconditions.d.ts +0 -7
  565. package/api/resources/commons/types/AppUserIdentification.d.ts +0 -8
  566. package/api/resources/commons/types/User.d.ts +0 -10
  567. package/api/resources/conversation/types/ConversationContext.d.ts +0 -20
  568. package/api/resources/conversation/types/ConversationMessageContext.d.ts +0 -12
  569. package/dist/api/resources/actions/types/Preconditions.d.ts +0 -7
  570. package/dist/api/resources/commons/types/AppUserIdentification.d.ts +0 -8
  571. package/dist/api/resources/commons/types/User.d.ts +0 -10
  572. package/dist/api/resources/conversation/types/ConversationContext.d.ts +0 -20
  573. package/dist/api/resources/conversation/types/ConversationMessageContext.d.ts +0 -12
  574. package/dist/serialization/resources/actions/types/Preconditions.js +0 -7
  575. package/dist/serialization/resources/commons/types/AppUserIdentification.d.ts +0 -13
  576. package/dist/serialization/resources/commons/types/AppUserIdentification.js +0 -8
  577. package/dist/serialization/resources/commons/types/User.d.ts +0 -15
  578. package/dist/serialization/resources/commons/types/User.js +0 -10
  579. package/dist/serialization/resources/conversation/types/ConversationContext.d.ts +0 -20
  580. package/dist/serialization/resources/conversation/types/ConversationContext.js +0 -15
  581. package/dist/serialization/resources/conversation/types/ConversationMessageContext.d.ts +0 -16
  582. package/dist/serialization/resources/conversation/types/ConversationMessageContext.js +0 -11
  583. package/serialization/resources/actions/types/Preconditions.js +0 -7
  584. package/serialization/resources/commons/types/AppUserIdentification.d.ts +0 -13
  585. package/serialization/resources/commons/types/AppUserIdentification.js +0 -8
  586. package/serialization/resources/commons/types/User.d.ts +0 -15
  587. package/serialization/resources/commons/types/User.js +0 -10
  588. package/serialization/resources/conversation/types/ConversationContext.d.ts +0 -20
  589. package/serialization/resources/conversation/types/ConversationContext.js +0 -15
  590. package/serialization/resources/conversation/types/ConversationMessageContext.d.ts +0 -16
  591. package/serialization/resources/conversation/types/ConversationMessageContext.js +0 -11
  592. /package/api/resources/actions/types/{Preconditions.js → ConversationExecutedActionPrecondition.js} +0 -0
  593. /package/api/resources/{commons/types/AppUserIdentification.js → actions/types/ConversationPrecondition.js} +0 -0
  594. /package/api/resources/{commons/types/User.js → actions/types/MetadataPrecondition.js} +0 -0
  595. /package/api/resources/{conversation/types/ConversationContext.js → actions/types/Precondition.js} +0 -0
  596. /package/api/resources/{conversation/types/ConversationMessageContext.js → actions/types/PreconditionBase.js} +0 -0
  597. /package/api/resources/{triggers/types/EventTriggerBase.js → actions/types/PreconditionGroup.js} +0 -0
  598. /package/api/resources/{triggers/types/EventTriggerResponse.js → actions/types/TagsPrecondition.js} +0 -0
  599. /package/api/resources/{triggers → commons}/types/EventTriggerBase.d.ts +0 -0
  600. /package/{dist/api/resources/triggers → api/resources/commons}/types/EventTriggerBase.js +0 -0
  601. /package/api/resources/{triggers → commons}/types/EventTriggerResponse.d.ts +0 -0
  602. /package/{dist/api/resources/triggers → api/resources/commons}/types/EventTriggerResponse.js +0 -0
  603. /package/api/resources/{triggers → commons}/types/EventTriggerType.d.ts +0 -0
  604. /package/api/resources/{triggers → commons}/types/EventTriggerType.js +0 -0
  605. /package/{dist/api/resources/actions/types/Preconditions.js → api/resources/commons/types/FeedbackBase.js} +0 -0
  606. /package/{dist/api/resources/commons/types/AppUserIdentification.js → api/resources/commons/types/UserData.js} +0 -0
  607. /package/{dist/api/resources/commons/types/User.js → api/resources/conversation/client/requests/ConversationGetRequest.js} +0 -0
  608. /package/{dist/api/resources/conversation/types/ConversationContext.js → api/resources/conversation/types/AskStreamActionEvent.js} +0 -0
  609. /package/{dist/api/resources/conversation/types/ConversationMessageContext.js → api/resources/conversation/types/Attachment.js} +0 -0
  610. /package/dist/api/resources/{triggers → commons}/types/EventTriggerBase.d.ts +0 -0
  611. /package/dist/api/resources/{triggers → commons}/types/EventTriggerResponse.d.ts +0 -0
  612. /package/dist/api/resources/{triggers → commons}/types/EventTriggerType.d.ts +0 -0
  613. /package/dist/api/resources/{triggers → commons}/types/EventTriggerType.js +0 -0
  614. /package/dist/serialization/resources/{triggers → commons}/types/EventTriggerBase.d.ts +0 -0
  615. /package/dist/serialization/resources/{triggers → commons}/types/EventTriggerBase.js +0 -0
  616. /package/dist/serialization/resources/{triggers → commons}/types/EventTriggerType.d.ts +0 -0
  617. /package/dist/serialization/resources/{triggers → commons}/types/EventTriggerType.js +0 -0
  618. /package/serialization/resources/{triggers → commons}/types/EventTriggerBase.d.ts +0 -0
  619. /package/serialization/resources/{triggers → commons}/types/EventTriggerBase.js +0 -0
  620. /package/serialization/resources/{triggers → commons}/types/EventTriggerType.d.ts +0 -0
  621. /package/serialization/resources/{triggers → commons}/types/EventTriggerType.js +0 -0
@@ -0,0 +1,243 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ export class Node18UniversalStreamWrapper {
11
+ constructor(readableStream) {
12
+ this.readableStream = readableStream;
13
+ this.reader = this.readableStream.getReader();
14
+ this.events = {
15
+ data: [],
16
+ end: [],
17
+ error: [],
18
+ readable: [],
19
+ close: [],
20
+ pause: [],
21
+ resume: [],
22
+ };
23
+ this.paused = false;
24
+ this.resumeCallback = null;
25
+ this.encoding = null;
26
+ }
27
+ on(event, callback) {
28
+ var _a;
29
+ (_a = this.events[event]) === null || _a === void 0 ? void 0 : _a.push(callback);
30
+ }
31
+ off(event, callback) {
32
+ var _a;
33
+ this.events[event] = (_a = this.events[event]) === null || _a === void 0 ? void 0 : _a.filter((cb) => cb !== callback);
34
+ }
35
+ pipe(dest) {
36
+ this.on("data", (chunk) => __awaiter(this, void 0, void 0, function* () {
37
+ if (dest instanceof Node18UniversalStreamWrapper) {
38
+ dest._write(chunk);
39
+ }
40
+ else if (dest instanceof WritableStream) {
41
+ const writer = dest.getWriter();
42
+ writer.write(chunk).then(() => writer.releaseLock());
43
+ }
44
+ else {
45
+ dest.write(chunk);
46
+ }
47
+ }));
48
+ this.on("end", () => __awaiter(this, void 0, void 0, function* () {
49
+ if (dest instanceof Node18UniversalStreamWrapper) {
50
+ dest._end();
51
+ }
52
+ else if (dest instanceof WritableStream) {
53
+ const writer = dest.getWriter();
54
+ writer.close();
55
+ }
56
+ else {
57
+ dest.end();
58
+ }
59
+ }));
60
+ this.on("error", (error) => __awaiter(this, void 0, void 0, function* () {
61
+ if (dest instanceof Node18UniversalStreamWrapper) {
62
+ dest._error(error);
63
+ }
64
+ else if (dest instanceof WritableStream) {
65
+ const writer = dest.getWriter();
66
+ writer.abort(error);
67
+ }
68
+ else {
69
+ dest.destroy(error);
70
+ }
71
+ }));
72
+ this._startReading();
73
+ return dest;
74
+ }
75
+ pipeTo(dest) {
76
+ return this.pipe(dest);
77
+ }
78
+ unpipe(dest) {
79
+ this.off("data", (chunk) => __awaiter(this, void 0, void 0, function* () {
80
+ if (dest instanceof Node18UniversalStreamWrapper) {
81
+ dest._write(chunk);
82
+ }
83
+ else if (dest instanceof WritableStream) {
84
+ const writer = dest.getWriter();
85
+ writer.write(chunk).then(() => writer.releaseLock());
86
+ }
87
+ else {
88
+ dest.write(chunk);
89
+ }
90
+ }));
91
+ this.off("end", () => __awaiter(this, void 0, void 0, function* () {
92
+ if (dest instanceof Node18UniversalStreamWrapper) {
93
+ dest._end();
94
+ }
95
+ else if (dest instanceof WritableStream) {
96
+ const writer = dest.getWriter();
97
+ writer.close();
98
+ }
99
+ else {
100
+ dest.end();
101
+ }
102
+ }));
103
+ this.off("error", (error) => __awaiter(this, void 0, void 0, function* () {
104
+ if (dest instanceof Node18UniversalStreamWrapper) {
105
+ dest._error(error);
106
+ }
107
+ else if (dest instanceof WritableStream) {
108
+ const writer = dest.getWriter();
109
+ writer.abort(error);
110
+ }
111
+ else {
112
+ dest.destroy(error);
113
+ }
114
+ }));
115
+ }
116
+ destroy(error) {
117
+ this.reader
118
+ .cancel(error)
119
+ .then(() => {
120
+ this._emit("close");
121
+ })
122
+ .catch((err) => {
123
+ this._emit("error", err);
124
+ });
125
+ }
126
+ pause() {
127
+ this.paused = true;
128
+ this._emit("pause");
129
+ }
130
+ resume() {
131
+ if (this.paused) {
132
+ this.paused = false;
133
+ this._emit("resume");
134
+ if (this.resumeCallback) {
135
+ this.resumeCallback();
136
+ this.resumeCallback = null;
137
+ }
138
+ }
139
+ }
140
+ get isPaused() {
141
+ return this.paused;
142
+ }
143
+ read() {
144
+ return __awaiter(this, void 0, void 0, function* () {
145
+ if (this.paused) {
146
+ yield new Promise((resolve) => {
147
+ this.resumeCallback = resolve;
148
+ });
149
+ }
150
+ const { done, value } = yield this.reader.read();
151
+ if (done) {
152
+ return undefined;
153
+ }
154
+ return value;
155
+ });
156
+ }
157
+ setEncoding(encoding) {
158
+ this.encoding = encoding;
159
+ }
160
+ text() {
161
+ return __awaiter(this, void 0, void 0, function* () {
162
+ const chunks = [];
163
+ while (true) {
164
+ const { done, value } = yield this.reader.read();
165
+ if (done) {
166
+ break;
167
+ }
168
+ if (value) {
169
+ chunks.push(value);
170
+ }
171
+ }
172
+ const decoder = new TextDecoder(this.encoding || "utf-8");
173
+ return decoder.decode(yield new Blob(chunks).arrayBuffer());
174
+ });
175
+ }
176
+ json() {
177
+ return __awaiter(this, void 0, void 0, function* () {
178
+ const text = yield this.text();
179
+ return JSON.parse(text);
180
+ });
181
+ }
182
+ _write(chunk) {
183
+ this._emit("data", chunk);
184
+ }
185
+ _end() {
186
+ this._emit("end");
187
+ }
188
+ _error(error) {
189
+ this._emit("error", error);
190
+ }
191
+ _emit(event, data) {
192
+ if (this.events[event]) {
193
+ for (const callback of this.events[event] || []) {
194
+ callback(data);
195
+ }
196
+ }
197
+ }
198
+ _startReading() {
199
+ return __awaiter(this, void 0, void 0, function* () {
200
+ try {
201
+ this._emit("readable");
202
+ while (true) {
203
+ if (this.paused) {
204
+ yield new Promise((resolve) => {
205
+ this.resumeCallback = resolve;
206
+ });
207
+ }
208
+ const { done, value } = yield this.reader.read();
209
+ if (done) {
210
+ this._emit("end");
211
+ this._emit("close");
212
+ break;
213
+ }
214
+ if (value) {
215
+ this._emit("data", value);
216
+ }
217
+ }
218
+ }
219
+ catch (error) {
220
+ this._emit("error", error);
221
+ }
222
+ });
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
+ }
243
+ }
@@ -0,0 +1,22 @@
1
+ /// <reference types="node" />
2
+ import type { Readable, Writable } from "readable-stream";
3
+ import { EventCallback, StreamWrapper } from "./chooseStreamWrapper";
4
+ export declare class NodePre18StreamWrapper implements StreamWrapper<Writable, Buffer> {
5
+ private readableStream;
6
+ private encoding;
7
+ constructor(readableStream: Readable);
8
+ on(event: string, callback: EventCallback): void;
9
+ off(event: string, callback: EventCallback): void;
10
+ pipe(dest: Writable): Writable;
11
+ pipeTo(dest: Writable): Writable;
12
+ unpipe(dest?: Writable): void;
13
+ destroy(error?: Error): void;
14
+ pause(): void;
15
+ resume(): void;
16
+ get isPaused(): boolean;
17
+ read(): Promise<Buffer | undefined>;
18
+ setEncoding(encoding?: string): void;
19
+ text(): Promise<string>;
20
+ json<T>(): Promise<T>;
21
+ [Symbol.asyncIterator](): AsyncIterableIterator<Buffer>;
22
+ }
@@ -0,0 +1,120 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ var __asyncValues = (this && this.__asyncValues) || function (o) {
11
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
12
+ var m = o[Symbol.asyncIterator], i;
13
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
14
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
15
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
16
+ };
17
+ export class NodePre18StreamWrapper {
18
+ constructor(readableStream) {
19
+ this.readableStream = readableStream;
20
+ }
21
+ on(event, callback) {
22
+ this.readableStream.on(event, callback);
23
+ }
24
+ off(event, callback) {
25
+ this.readableStream.off(event, callback);
26
+ }
27
+ pipe(dest) {
28
+ this.readableStream.pipe(dest);
29
+ return dest;
30
+ }
31
+ pipeTo(dest) {
32
+ return this.pipe(dest);
33
+ }
34
+ unpipe(dest) {
35
+ if (dest) {
36
+ this.readableStream.unpipe(dest);
37
+ }
38
+ else {
39
+ this.readableStream.unpipe();
40
+ }
41
+ }
42
+ destroy(error) {
43
+ this.readableStream.destroy(error);
44
+ }
45
+ pause() {
46
+ this.readableStream.pause();
47
+ }
48
+ resume() {
49
+ this.readableStream.resume();
50
+ }
51
+ get isPaused() {
52
+ return this.readableStream.isPaused();
53
+ }
54
+ read() {
55
+ return __awaiter(this, void 0, void 0, function* () {
56
+ return new Promise((resolve, reject) => {
57
+ const chunk = this.readableStream.read();
58
+ if (chunk) {
59
+ resolve(chunk);
60
+ }
61
+ else {
62
+ this.readableStream.once("readable", () => {
63
+ const chunk = this.readableStream.read();
64
+ resolve(chunk);
65
+ });
66
+ this.readableStream.once("error", reject);
67
+ }
68
+ });
69
+ });
70
+ }
71
+ setEncoding(encoding) {
72
+ this.readableStream.setEncoding(encoding);
73
+ this.encoding = encoding;
74
+ }
75
+ text() {
76
+ var e_1, _a;
77
+ return __awaiter(this, void 0, void 0, function* () {
78
+ const chunks = [];
79
+ const encoder = new TextEncoder();
80
+ this.readableStream.setEncoding((this.encoding || "utf-8"));
81
+ try {
82
+ for (var _b = __asyncValues(this.readableStream), _c; _c = yield _b.next(), !_c.done;) {
83
+ const chunk = _c.value;
84
+ chunks.push(encoder.encode(chunk));
85
+ }
86
+ }
87
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
88
+ finally {
89
+ try {
90
+ if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
91
+ }
92
+ finally { if (e_1) throw e_1.error; }
93
+ }
94
+ const decoder = new TextDecoder(this.encoding || "utf-8");
95
+ return decoder.decode(Buffer.concat(chunks));
96
+ });
97
+ }
98
+ json() {
99
+ return __awaiter(this, void 0, void 0, function* () {
100
+ const text = yield this.text();
101
+ return JSON.parse(text);
102
+ });
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
+ }
120
+ }
@@ -0,0 +1,31 @@
1
+ import { StreamWrapper } from "./chooseStreamWrapper";
2
+ declare type EventCallback = (data?: any) => void;
3
+ export declare class UndiciStreamWrapper<ReadFormat extends Uint8Array | Uint16Array | Uint32Array> implements StreamWrapper<UndiciStreamWrapper<ReadFormat> | WritableStream<ReadFormat>, ReadFormat> {
4
+ private readableStream;
5
+ private reader;
6
+ private events;
7
+ private paused;
8
+ private resumeCallback;
9
+ private encoding;
10
+ constructor(readableStream: ReadableStream<ReadFormat>);
11
+ on(event: string, callback: EventCallback): void;
12
+ off(event: string, callback: EventCallback): void;
13
+ pipe(dest: UndiciStreamWrapper<ReadFormat> | WritableStream<ReadFormat>): UndiciStreamWrapper<ReadFormat> | WritableStream<ReadFormat>;
14
+ pipeTo(dest: UndiciStreamWrapper<ReadFormat> | WritableStream<ReadFormat>): UndiciStreamWrapper<ReadFormat> | WritableStream<ReadFormat>;
15
+ unpipe(dest: UndiciStreamWrapper<ReadFormat> | WritableStream): void;
16
+ destroy(error?: Error): void;
17
+ pause(): void;
18
+ resume(): void;
19
+ get isPaused(): boolean;
20
+ read(): Promise<ReadFormat | undefined>;
21
+ setEncoding(encoding: string): void;
22
+ text(): Promise<string>;
23
+ json<T>(): Promise<T>;
24
+ private _write;
25
+ private _end;
26
+ private _error;
27
+ private _emit;
28
+ private _startReading;
29
+ [Symbol.asyncIterator](): AsyncIterableIterator<ReadFormat>;
30
+ }
31
+ export {};
@@ -0,0 +1,225 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ export class UndiciStreamWrapper {
11
+ constructor(readableStream) {
12
+ this.readableStream = readableStream;
13
+ this.reader = this.readableStream.getReader();
14
+ this.events = {
15
+ data: [],
16
+ end: [],
17
+ error: [],
18
+ readable: [],
19
+ close: [],
20
+ pause: [],
21
+ resume: [],
22
+ };
23
+ this.paused = false;
24
+ this.resumeCallback = null;
25
+ this.encoding = null;
26
+ }
27
+ on(event, callback) {
28
+ var _a;
29
+ (_a = this.events[event]) === null || _a === void 0 ? void 0 : _a.push(callback);
30
+ }
31
+ off(event, callback) {
32
+ var _a;
33
+ this.events[event] = (_a = this.events[event]) === null || _a === void 0 ? void 0 : _a.filter((cb) => cb !== callback);
34
+ }
35
+ pipe(dest) {
36
+ this.on("data", (chunk) => {
37
+ if (dest instanceof UndiciStreamWrapper) {
38
+ dest._write(chunk);
39
+ }
40
+ else {
41
+ const writer = dest.getWriter();
42
+ writer.write(chunk).then(() => writer.releaseLock());
43
+ }
44
+ });
45
+ this.on("end", () => {
46
+ if (dest instanceof UndiciStreamWrapper) {
47
+ dest._end();
48
+ }
49
+ else {
50
+ const writer = dest.getWriter();
51
+ writer.close();
52
+ }
53
+ });
54
+ this.on("error", (error) => {
55
+ if (dest instanceof UndiciStreamWrapper) {
56
+ dest._error(error);
57
+ }
58
+ else {
59
+ const writer = dest.getWriter();
60
+ writer.abort(error);
61
+ }
62
+ });
63
+ this._startReading();
64
+ return dest;
65
+ }
66
+ pipeTo(dest) {
67
+ return this.pipe(dest);
68
+ }
69
+ unpipe(dest) {
70
+ this.off("data", (chunk) => {
71
+ if (dest instanceof UndiciStreamWrapper) {
72
+ dest._write(chunk);
73
+ }
74
+ else {
75
+ const writer = dest.getWriter();
76
+ writer.write(chunk).then(() => writer.releaseLock());
77
+ }
78
+ });
79
+ this.off("end", () => {
80
+ if (dest instanceof UndiciStreamWrapper) {
81
+ dest._end();
82
+ }
83
+ else {
84
+ const writer = dest.getWriter();
85
+ writer.close();
86
+ }
87
+ });
88
+ this.off("error", (error) => {
89
+ if (dest instanceof UndiciStreamWrapper) {
90
+ dest._error(error);
91
+ }
92
+ else {
93
+ const writer = dest.getWriter();
94
+ writer.abort(error);
95
+ }
96
+ });
97
+ }
98
+ destroy(error) {
99
+ this.reader
100
+ .cancel(error)
101
+ .then(() => {
102
+ this._emit("close");
103
+ })
104
+ .catch((err) => {
105
+ this._emit("error", err);
106
+ });
107
+ }
108
+ pause() {
109
+ this.paused = true;
110
+ this._emit("pause");
111
+ }
112
+ resume() {
113
+ if (this.paused) {
114
+ this.paused = false;
115
+ this._emit("resume");
116
+ if (this.resumeCallback) {
117
+ this.resumeCallback();
118
+ this.resumeCallback = null;
119
+ }
120
+ }
121
+ }
122
+ get isPaused() {
123
+ return this.paused;
124
+ }
125
+ read() {
126
+ return __awaiter(this, void 0, void 0, function* () {
127
+ if (this.paused) {
128
+ yield new Promise((resolve) => {
129
+ this.resumeCallback = resolve;
130
+ });
131
+ }
132
+ const { done, value } = yield this.reader.read();
133
+ if (done) {
134
+ return undefined;
135
+ }
136
+ return value;
137
+ });
138
+ }
139
+ setEncoding(encoding) {
140
+ this.encoding = encoding;
141
+ }
142
+ text() {
143
+ return __awaiter(this, void 0, void 0, function* () {
144
+ const chunks = [];
145
+ while (true) {
146
+ const { done, value } = yield this.reader.read();
147
+ if (done) {
148
+ break;
149
+ }
150
+ if (value) {
151
+ chunks.push(value);
152
+ }
153
+ }
154
+ const decoder = new TextDecoder(this.encoding || "utf-8");
155
+ return decoder.decode(yield new Blob(chunks).arrayBuffer());
156
+ });
157
+ }
158
+ json() {
159
+ return __awaiter(this, void 0, void 0, function* () {
160
+ const text = yield this.text();
161
+ return JSON.parse(text);
162
+ });
163
+ }
164
+ _write(chunk) {
165
+ this._emit("data", chunk);
166
+ }
167
+ _end() {
168
+ this._emit("end");
169
+ }
170
+ _error(error) {
171
+ this._emit("error", error);
172
+ }
173
+ _emit(event, data) {
174
+ if (this.events[event]) {
175
+ for (const callback of this.events[event] || []) {
176
+ callback(data);
177
+ }
178
+ }
179
+ }
180
+ _startReading() {
181
+ return __awaiter(this, void 0, void 0, function* () {
182
+ try {
183
+ this._emit("readable");
184
+ while (true) {
185
+ if (this.paused) {
186
+ yield new Promise((resolve) => {
187
+ this.resumeCallback = resolve;
188
+ });
189
+ }
190
+ const { done, value } = yield this.reader.read();
191
+ if (done) {
192
+ this._emit("end");
193
+ this._emit("close");
194
+ break;
195
+ }
196
+ if (value) {
197
+ this._emit("data", value);
198
+ }
199
+ }
200
+ }
201
+ catch (error) {
202
+ this._emit("error", error);
203
+ }
204
+ });
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
+ }
225
+ }
@@ -0,0 +1,18 @@
1
+ export declare type EventCallback = (data?: any) => void;
2
+ export interface StreamWrapper<WritableStream, ReadFormat> {
3
+ setEncoding(encoding?: string): void;
4
+ on(event: string, callback: EventCallback): void;
5
+ off(event: string, callback: EventCallback): void;
6
+ pipe(dest: WritableStream): WritableStream;
7
+ pipeTo(dest: WritableStream): WritableStream;
8
+ unpipe(dest?: WritableStream): void;
9
+ destroy(error?: Error): void;
10
+ pause(): void;
11
+ resume(): void;
12
+ get isPaused(): boolean;
13
+ read(): Promise<ReadFormat | undefined>;
14
+ text(): Promise<string>;
15
+ json<T>(): Promise<T>;
16
+ [Symbol.asyncIterator](): AsyncIterableIterator<ReadFormat>;
17
+ }
18
+ export declare function chooseStreamWrapper(responseBody: any): Promise<Promise<StreamWrapper<any, any>>>;
@@ -0,0 +1,23 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { RUNTIME } from "../../runtime";
11
+ export function chooseStreamWrapper(responseBody) {
12
+ return __awaiter(this, void 0, void 0, function* () {
13
+ if (RUNTIME.type === "node" && RUNTIME.parsedVersion != null && RUNTIME.parsedVersion >= 18) {
14
+ return new (yield import("./Node18UniversalStreamWrapper")).Node18UniversalStreamWrapper(responseBody);
15
+ }
16
+ else if (RUNTIME.type !== "node" && typeof fetch === "function") {
17
+ return new (yield import("./UndiciStreamWrapper")).UndiciStreamWrapper(responseBody);
18
+ }
19
+ else {
20
+ return new (yield import("./NodePre18StreamWrapper")).NodePre18StreamWrapper(responseBody);
21
+ }
22
+ });
23
+ }
@@ -5,4 +5,5 @@ export declare const RUNTIME: Runtime;
5
5
  export interface Runtime {
6
6
  type: "browser" | "web-worker" | "deno" | "bun" | "node" | "react-native" | "unknown" | "workerd";
7
7
  version?: string;
8
+ parsedVersion?: number;
8
9
  }