parlant-client 0.5.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 (670) hide show
  1. package/README.md +2 -0
  2. package/package.json +31 -0
  3. package/src/Client.d.ts +55 -0
  4. package/src/Client.js +137 -0
  5. package/src/api/errors/UnprocessableEntityError.d.ts +8 -0
  6. package/src/api/errors/UnprocessableEntityError.js +41 -0
  7. package/src/api/errors/index.d.ts +1 -0
  8. package/src/api/errors/index.js +17 -0
  9. package/src/api/index.d.ts +3 -0
  10. package/src/api/index.js +19 -0
  11. package/src/api/resources/agents/client/Client.d.ts +72 -0
  12. package/src/api/resources/agents/client/Client.js +359 -0
  13. package/src/api/resources/agents/client/index.d.ts +1 -0
  14. package/src/api/resources/agents/client/index.js +17 -0
  15. package/src/api/resources/agents/client/requests/AgentCreationParams.d.ts +14 -0
  16. package/src/api/resources/agents/client/requests/AgentCreationParams.js +5 -0
  17. package/src/api/resources/agents/client/requests/AgentUpdateParams.d.ts +12 -0
  18. package/src/api/resources/agents/client/requests/AgentUpdateParams.js +5 -0
  19. package/src/api/resources/agents/client/requests/index.d.ts +2 -0
  20. package/src/api/resources/agents/client/requests/index.js +2 -0
  21. package/src/api/resources/agents/index.d.ts +1 -0
  22. package/src/api/resources/agents/index.js +17 -0
  23. package/src/api/resources/contextVariables/client/Client.d.ts +131 -0
  24. package/src/api/resources/contextVariables/client/Client.js +643 -0
  25. package/src/api/resources/contextVariables/client/index.d.ts +1 -0
  26. package/src/api/resources/contextVariables/client/index.js +17 -0
  27. package/src/api/resources/contextVariables/client/requests/ContextVariableCreationParams.d.ts +16 -0
  28. package/src/api/resources/contextVariables/client/requests/ContextVariableCreationParams.js +5 -0
  29. package/src/api/resources/contextVariables/client/requests/ContextVariableUpdateParams.d.ts +14 -0
  30. package/src/api/resources/contextVariables/client/requests/ContextVariableUpdateParams.js +5 -0
  31. package/src/api/resources/contextVariables/client/requests/ContextVariableValueUpdateParams.d.ts +14 -0
  32. package/src/api/resources/contextVariables/client/requests/ContextVariableValueUpdateParams.js +5 -0
  33. package/src/api/resources/contextVariables/client/requests/ContextVariablesRetrieveRequest.d.ts +10 -0
  34. package/src/api/resources/contextVariables/client/requests/ContextVariablesRetrieveRequest.js +5 -0
  35. package/src/api/resources/contextVariables/client/requests/index.d.ts +4 -0
  36. package/src/api/resources/contextVariables/client/requests/index.js +2 -0
  37. package/src/api/resources/contextVariables/index.d.ts +1 -0
  38. package/src/api/resources/contextVariables/index.js +17 -0
  39. package/src/api/resources/customers/client/Client.d.ts +72 -0
  40. package/src/api/resources/customers/client/Client.js +359 -0
  41. package/src/api/resources/customers/client/index.d.ts +1 -0
  42. package/src/api/resources/customers/client/index.js +17 -0
  43. package/src/api/resources/customers/client/requests/CustomerCreationParams.d.ts +13 -0
  44. package/src/api/resources/customers/client/requests/CustomerCreationParams.js +5 -0
  45. package/src/api/resources/customers/client/requests/CustomerUpdateParams.d.ts +13 -0
  46. package/src/api/resources/customers/client/requests/CustomerUpdateParams.js +5 -0
  47. package/src/api/resources/customers/client/requests/index.d.ts +2 -0
  48. package/src/api/resources/customers/client/requests/index.js +2 -0
  49. package/src/api/resources/customers/index.d.ts +1 -0
  50. package/src/api/resources/customers/index.js +17 -0
  51. package/src/api/resources/evaluations/client/Client.d.ts +48 -0
  52. package/src/api/resources/evaluations/client/Client.js +193 -0
  53. package/src/api/resources/evaluations/client/index.d.ts +1 -0
  54. package/src/api/resources/evaluations/client/index.js +17 -0
  55. package/src/api/resources/evaluations/client/requests/EvaluationCreationParams.d.ts +17 -0
  56. package/src/api/resources/evaluations/client/requests/EvaluationCreationParams.js +5 -0
  57. package/src/api/resources/evaluations/client/requests/EvaluationsRetrieveRequest.d.ts +10 -0
  58. package/src/api/resources/evaluations/client/requests/EvaluationsRetrieveRequest.js +5 -0
  59. package/src/api/resources/evaluations/client/requests/index.d.ts +2 -0
  60. package/src/api/resources/evaluations/client/requests/index.js +2 -0
  61. package/src/api/resources/evaluations/index.d.ts +1 -0
  62. package/src/api/resources/evaluations/index.js +17 -0
  63. package/src/api/resources/glossary/client/Client.d.ts +80 -0
  64. package/src/api/resources/glossary/client/Client.js +377 -0
  65. package/src/api/resources/glossary/client/index.d.ts +1 -0
  66. package/src/api/resources/glossary/client/index.js +17 -0
  67. package/src/api/resources/glossary/client/requests/TermCreationParams.d.ts +15 -0
  68. package/src/api/resources/glossary/client/requests/TermCreationParams.js +5 -0
  69. package/src/api/resources/glossary/client/requests/TermUpdateParams.d.ts +12 -0
  70. package/src/api/resources/glossary/client/requests/TermUpdateParams.js +5 -0
  71. package/src/api/resources/glossary/client/requests/index.d.ts +2 -0
  72. package/src/api/resources/glossary/client/requests/index.js +2 -0
  73. package/src/api/resources/glossary/index.d.ts +1 -0
  74. package/src/api/resources/glossary/index.js +17 -0
  75. package/src/api/resources/guidelines/client/Client.d.ts +85 -0
  76. package/src/api/resources/guidelines/client/Client.js +382 -0
  77. package/src/api/resources/guidelines/client/index.d.ts +1 -0
  78. package/src/api/resources/guidelines/client/index.js +17 -0
  79. package/src/api/resources/guidelines/client/requests/GuidelineCreationParams.d.ts +19 -0
  80. package/src/api/resources/guidelines/client/requests/GuidelineCreationParams.js +5 -0
  81. package/src/api/resources/guidelines/client/requests/GuidelineUpdateParams.d.ts +12 -0
  82. package/src/api/resources/guidelines/client/requests/GuidelineUpdateParams.js +5 -0
  83. package/src/api/resources/guidelines/client/requests/index.d.ts +2 -0
  84. package/src/api/resources/guidelines/client/requests/index.js +2 -0
  85. package/src/api/resources/guidelines/index.d.ts +1 -0
  86. package/src/api/resources/guidelines/index.js +17 -0
  87. package/src/api/resources/index.d.ts +18 -0
  88. package/src/api/resources/index.js +47 -0
  89. package/src/api/resources/services/client/Client.d.ts +62 -0
  90. package/src/api/resources/services/client/Client.js +294 -0
  91. package/src/api/resources/services/client/index.d.ts +1 -0
  92. package/src/api/resources/services/client/index.js +17 -0
  93. package/src/api/resources/services/client/requests/ServiceUpdateParams.d.ts +15 -0
  94. package/src/api/resources/services/client/requests/ServiceUpdateParams.js +5 -0
  95. package/src/api/resources/services/client/requests/index.d.ts +1 -0
  96. package/src/api/resources/services/client/requests/index.js +2 -0
  97. package/src/api/resources/services/index.d.ts +1 -0
  98. package/src/api/resources/services/index.js +17 -0
  99. package/src/api/resources/sessions/client/Client.d.ts +134 -0
  100. package/src/api/resources/sessions/client/Client.js +755 -0
  101. package/src/api/resources/sessions/client/index.d.ts +1 -0
  102. package/src/api/resources/sessions/client/index.js +17 -0
  103. package/src/api/resources/sessions/client/requests/EventCreationParams.d.ts +17 -0
  104. package/src/api/resources/sessions/client/requests/EventCreationParams.js +5 -0
  105. package/src/api/resources/sessions/client/requests/SessionCreationParams.d.ts +15 -0
  106. package/src/api/resources/sessions/client/requests/SessionCreationParams.js +5 -0
  107. package/src/api/resources/sessions/client/requests/SessionUpdateParams.d.ts +12 -0
  108. package/src/api/resources/sessions/client/requests/SessionUpdateParams.js +5 -0
  109. package/src/api/resources/sessions/client/requests/SessionsDeleteEventsRequest.d.ts +12 -0
  110. package/src/api/resources/sessions/client/requests/SessionsDeleteEventsRequest.js +5 -0
  111. package/src/api/resources/sessions/client/requests/SessionsDeleteManyRequest.d.ts +11 -0
  112. package/src/api/resources/sessions/client/requests/SessionsDeleteManyRequest.js +5 -0
  113. package/src/api/resources/sessions/client/requests/SessionsListEventsRequest.d.ts +18 -0
  114. package/src/api/resources/sessions/client/requests/SessionsListEventsRequest.js +5 -0
  115. package/src/api/resources/sessions/client/requests/SessionsListRequest.d.ts +11 -0
  116. package/src/api/resources/sessions/client/requests/SessionsListRequest.js +5 -0
  117. package/src/api/resources/sessions/client/requests/index.d.ts +7 -0
  118. package/src/api/resources/sessions/client/requests/index.js +2 -0
  119. package/src/api/resources/sessions/index.d.ts +1 -0
  120. package/src/api/resources/sessions/index.js +17 -0
  121. package/src/api/resources/tags/client/Client.d.ts +74 -0
  122. package/src/api/resources/tags/client/Client.js +356 -0
  123. package/src/api/resources/tags/client/index.d.ts +1 -0
  124. package/src/api/resources/tags/client/index.js +17 -0
  125. package/src/api/resources/tags/client/requests/TagCreationParams.d.ts +12 -0
  126. package/src/api/resources/tags/client/requests/TagCreationParams.js +5 -0
  127. package/src/api/resources/tags/client/requests/TagUpdateParams.d.ts +12 -0
  128. package/src/api/resources/tags/client/requests/TagUpdateParams.js +5 -0
  129. package/src/api/resources/tags/client/requests/index.d.ts +2 -0
  130. package/src/api/resources/tags/client/requests/index.js +2 -0
  131. package/src/api/resources/tags/index.d.ts +1 -0
  132. package/src/api/resources/tags/index.js +17 -0
  133. package/src/api/types/Agent.d.ts +10 -0
  134. package/src/api/types/Agent.js +5 -0
  135. package/src/api/types/CoherenceCheck.d.ts +11 -0
  136. package/src/api/types/CoherenceCheck.js +5 -0
  137. package/src/api/types/CoherenceCheckKindDto.d.ts +8 -0
  138. package/src/api/types/CoherenceCheckKindDto.js +10 -0
  139. package/src/api/types/ConnectionKindDto.d.ts +8 -0
  140. package/src/api/types/ConnectionKindDto.js +10 -0
  141. package/src/api/types/ConnectionProposition.d.ts +10 -0
  142. package/src/api/types/ConnectionProposition.js +5 -0
  143. package/src/api/types/ConnectionPropositionKindDto.d.ts +8 -0
  144. package/src/api/types/ConnectionPropositionKindDto.js +10 -0
  145. package/src/api/types/ConsumptionOffsets.d.ts +6 -0
  146. package/src/api/types/ConsumptionOffsets.js +5 -0
  147. package/src/api/types/ConsumptionOffsetsUpdateParams.d.ts +6 -0
  148. package/src/api/types/ConsumptionOffsetsUpdateParams.js +5 -0
  149. package/src/api/types/ContextVariable.d.ts +11 -0
  150. package/src/api/types/ContextVariable.js +5 -0
  151. package/src/api/types/ContextVariableAndValue.d.ts +10 -0
  152. package/src/api/types/ContextVariableAndValue.js +5 -0
  153. package/src/api/types/ContextVariableReadResult.d.ts +8 -0
  154. package/src/api/types/ContextVariableReadResult.js +5 -0
  155. package/src/api/types/ContextVariableValue.d.ts +8 -0
  156. package/src/api/types/ContextVariableValue.js +5 -0
  157. package/src/api/types/Customer.d.ts +10 -0
  158. package/src/api/types/Customer.js +5 -0
  159. package/src/api/types/CustomerExtraUpdateParams.d.ts +7 -0
  160. package/src/api/types/CustomerExtraUpdateParams.js +5 -0
  161. package/src/api/types/DayOfWeekDto.d.ts +13 -0
  162. package/src/api/types/DayOfWeekDto.js +15 -0
  163. package/src/api/types/Evaluation.d.ts +12 -0
  164. package/src/api/types/Evaluation.js +5 -0
  165. package/src/api/types/EvaluationStatusDto.d.ts +10 -0
  166. package/src/api/types/EvaluationStatusDto.js +12 -0
  167. package/src/api/types/Event.d.ts +13 -0
  168. package/src/api/types/Event.js +5 -0
  169. package/src/api/types/EventInspectionResult.d.ts +9 -0
  170. package/src/api/types/EventInspectionResult.js +5 -0
  171. package/src/api/types/EventKindDto.d.ts +10 -0
  172. package/src/api/types/EventKindDto.js +12 -0
  173. package/src/api/types/EventSourceDto.d.ts +12 -0
  174. package/src/api/types/EventSourceDto.js +14 -0
  175. package/src/api/types/EventTrace.d.ts +9 -0
  176. package/src/api/types/EventTrace.js +5 -0
  177. package/src/api/types/FreshnessRules.d.ts +12 -0
  178. package/src/api/types/FreshnessRules.js +5 -0
  179. package/src/api/types/GenerationInfo.d.ts +10 -0
  180. package/src/api/types/GenerationInfo.js +5 -0
  181. package/src/api/types/Guideline.d.ts +8 -0
  182. package/src/api/types/Guideline.js +5 -0
  183. package/src/api/types/GuidelineConnection.d.ts +11 -0
  184. package/src/api/types/GuidelineConnection.js +5 -0
  185. package/src/api/types/GuidelineConnectionAddition.d.ts +9 -0
  186. package/src/api/types/GuidelineConnectionAddition.js +5 -0
  187. package/src/api/types/GuidelineConnectionUpdateParams.d.ts +8 -0
  188. package/src/api/types/GuidelineConnectionUpdateParams.js +5 -0
  189. package/src/api/types/GuidelineContent.d.ts +7 -0
  190. package/src/api/types/GuidelineContent.js +5 -0
  191. package/src/api/types/GuidelineCreationResult.d.ts +7 -0
  192. package/src/api/types/GuidelineCreationResult.js +5 -0
  193. package/src/api/types/GuidelineInvoiceData.d.ts +8 -0
  194. package/src/api/types/GuidelineInvoiceData.js +5 -0
  195. package/src/api/types/GuidelinePayload.d.ts +11 -0
  196. package/src/api/types/GuidelinePayload.js +5 -0
  197. package/src/api/types/GuidelinePayloadOperationDto.d.ts +8 -0
  198. package/src/api/types/GuidelinePayloadOperationDto.js +10 -0
  199. package/src/api/types/GuidelineProposition.d.ts +10 -0
  200. package/src/api/types/GuidelineProposition.js +5 -0
  201. package/src/api/types/GuidelinePropositionInspection.d.ts +8 -0
  202. package/src/api/types/GuidelinePropositionInspection.js +5 -0
  203. package/src/api/types/GuidelineToolAssociation.d.ts +9 -0
  204. package/src/api/types/GuidelineToolAssociation.js +5 -0
  205. package/src/api/types/GuidelineToolAssociationUpdateParams.d.ts +8 -0
  206. package/src/api/types/GuidelineToolAssociationUpdateParams.js +5 -0
  207. package/src/api/types/GuidelineWithConnectionsAndToolAssociations.d.ts +9 -0
  208. package/src/api/types/GuidelineWithConnectionsAndToolAssociations.js +5 -0
  209. package/src/api/types/HttpValidationError.d.ts +7 -0
  210. package/src/api/types/HttpValidationError.js +5 -0
  211. package/src/api/types/Invoice.d.ts +11 -0
  212. package/src/api/types/Invoice.js +5 -0
  213. package/src/api/types/InvoiceData.d.ts +7 -0
  214. package/src/api/types/InvoiceData.js +5 -0
  215. package/src/api/types/MessageGenerationInspection.d.ts +8 -0
  216. package/src/api/types/MessageGenerationInspection.js +5 -0
  217. package/src/api/types/Moderation.d.ts +9 -0
  218. package/src/api/types/Moderation.js +11 -0
  219. package/src/api/types/OpenApiServiceParams.d.ts +7 -0
  220. package/src/api/types/OpenApiServiceParams.js +5 -0
  221. package/src/api/types/Payload.d.ts +8 -0
  222. package/src/api/types/Payload.js +5 -0
  223. package/src/api/types/PayloadKindDto.d.ts +4 -0
  224. package/src/api/types/PayloadKindDto.js +5 -0
  225. package/src/api/types/PreparationIteration.d.ts +11 -0
  226. package/src/api/types/PreparationIteration.js +5 -0
  227. package/src/api/types/PreparationIterationGenerations.d.ts +8 -0
  228. package/src/api/types/PreparationIterationGenerations.js +5 -0
  229. package/src/api/types/SdkServiceParams.d.ts +6 -0
  230. package/src/api/types/SdkServiceParams.js +5 -0
  231. package/src/api/types/Service.d.ts +10 -0
  232. package/src/api/types/Service.js +5 -0
  233. package/src/api/types/Session.d.ts +12 -0
  234. package/src/api/types/Session.js +5 -0
  235. package/src/api/types/Tag.d.ts +8 -0
  236. package/src/api/types/Tag.js +5 -0
  237. package/src/api/types/TagsUpdateParams.d.ts +7 -0
  238. package/src/api/types/TagsUpdateParams.js +5 -0
  239. package/src/api/types/Term.d.ts +9 -0
  240. package/src/api/types/Term.js +5 -0
  241. package/src/api/types/Tool.d.ts +11 -0
  242. package/src/api/types/Tool.js +5 -0
  243. package/src/api/types/ToolCall.d.ts +9 -0
  244. package/src/api/types/ToolCall.js +5 -0
  245. package/src/api/types/ToolId.d.ts +7 -0
  246. package/src/api/types/ToolId.js +5 -0
  247. package/src/api/types/ToolParameter.d.ts +9 -0
  248. package/src/api/types/ToolParameter.js +5 -0
  249. package/src/api/types/ToolParameterDtoEnumItem.d.ts +4 -0
  250. package/src/api/types/ToolParameterDtoEnumItem.js +5 -0
  251. package/src/api/types/ToolParameterTypeDto.d.ts +10 -0
  252. package/src/api/types/ToolParameterTypeDto.js +12 -0
  253. package/src/api/types/ToolResult.d.ts +7 -0
  254. package/src/api/types/ToolResult.js +5 -0
  255. package/src/api/types/ToolServiceKindDto.d.ts +8 -0
  256. package/src/api/types/ToolServiceKindDto.js +10 -0
  257. package/src/api/types/UsageInfo.d.ts +8 -0
  258. package/src/api/types/UsageInfo.js +5 -0
  259. package/src/api/types/ValidationError.d.ts +9 -0
  260. package/src/api/types/ValidationError.js +5 -0
  261. package/src/api/types/ValidationErrorLocItem.d.ts +4 -0
  262. package/src/api/types/ValidationErrorLocItem.js +5 -0
  263. package/src/api/types/index.d.ts +65 -0
  264. package/src/api/types/index.js +81 -0
  265. package/src/core/fetcher/APIResponse.d.ts +10 -0
  266. package/src/core/fetcher/APIResponse.js +2 -0
  267. package/src/core/fetcher/Fetcher.d.ts +39 -0
  268. package/src/core/fetcher/Fetcher.js +99 -0
  269. package/src/core/fetcher/Supplier.d.ts +4 -0
  270. package/src/core/fetcher/Supplier.js +22 -0
  271. package/src/core/fetcher/createRequestUrl.d.ts +1 -0
  272. package/src/core/fetcher/createRequestUrl.js +13 -0
  273. package/src/core/fetcher/getFetchFn.d.ts +4 -0
  274. package/src/core/fetcher/getFetchFn.js +59 -0
  275. package/src/core/fetcher/getHeader.d.ts +1 -0
  276. package/src/core/fetcher/getHeader.js +12 -0
  277. package/src/core/fetcher/getRequestBody.d.ts +7 -0
  278. package/src/core/fetcher/getRequestBody.js +23 -0
  279. package/src/core/fetcher/getResponseBody.d.ts +1 -0
  280. package/src/core/fetcher/getResponseBody.js +55 -0
  281. package/src/core/fetcher/index.d.ts +5 -0
  282. package/src/core/fetcher/index.js +9 -0
  283. package/src/core/fetcher/makeRequest.d.ts +1 -0
  284. package/src/core/fetcher/makeRequest.js +42 -0
  285. package/src/core/fetcher/requestWithRetries.d.ts +1 -0
  286. package/src/core/fetcher/requestWithRetries.js +41 -0
  287. package/src/core/fetcher/signals.d.ts +12 -0
  288. package/src/core/fetcher/signals.js +37 -0
  289. package/src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
  290. package/src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
  291. package/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
  292. package/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +124 -0
  293. package/src/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
  294. package/src/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
  295. package/src/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
  296. package/src/core/fetcher/stream-wrappers/chooseStreamWrapper.js +50 -0
  297. package/src/core/index.d.ts +3 -0
  298. package/src/core/index.js +32 -0
  299. package/src/core/runtime/index.d.ts +1 -0
  300. package/src/core/runtime/index.js +5 -0
  301. package/src/core/runtime/runtime.d.ts +9 -0
  302. package/src/core/runtime/runtime.js +93 -0
  303. package/src/core/schemas/Schema.d.ts +85 -0
  304. package/src/core/schemas/Schema.js +22 -0
  305. package/src/core/schemas/builders/bigint/bigint.d.ts +2 -0
  306. package/src/core/schemas/builders/bigint/bigint.js +50 -0
  307. package/src/core/schemas/builders/bigint/index.d.ts +1 -0
  308. package/src/core/schemas/builders/bigint/index.js +5 -0
  309. package/src/core/schemas/builders/date/date.d.ts +2 -0
  310. package/src/core/schemas/builders/date/date.js +63 -0
  311. package/src/core/schemas/builders/date/index.d.ts +1 -0
  312. package/src/core/schemas/builders/date/index.js +5 -0
  313. package/src/core/schemas/builders/enum/enum.d.ts +2 -0
  314. package/src/core/schemas/builders/enum/enum.js +39 -0
  315. package/src/core/schemas/builders/enum/index.d.ts +1 -0
  316. package/src/core/schemas/builders/enum/index.js +5 -0
  317. package/src/core/schemas/builders/index.d.ts +14 -0
  318. package/src/core/schemas/builders/index.js +30 -0
  319. package/src/core/schemas/builders/lazy/index.d.ts +3 -0
  320. package/src/core/schemas/builders/lazy/index.js +7 -0
  321. package/src/core/schemas/builders/lazy/lazy.d.ts +5 -0
  322. package/src/core/schemas/builders/lazy/lazy.js +25 -0
  323. package/src/core/schemas/builders/lazy/lazyObject.d.ts +3 -0
  324. package/src/core/schemas/builders/lazy/lazyObject.js +12 -0
  325. package/src/core/schemas/builders/list/index.d.ts +1 -0
  326. package/src/core/schemas/builders/list/index.js +5 -0
  327. package/src/core/schemas/builders/list/list.d.ts +2 -0
  328. package/src/core/schemas/builders/list/list.js +55 -0
  329. package/src/core/schemas/builders/literals/booleanLiteral.d.ts +2 -0
  330. package/src/core/schemas/builders/literals/booleanLiteral.js +29 -0
  331. package/src/core/schemas/builders/literals/index.d.ts +2 -0
  332. package/src/core/schemas/builders/literals/index.js +7 -0
  333. package/src/core/schemas/builders/literals/stringLiteral.d.ts +2 -0
  334. package/src/core/schemas/builders/literals/stringLiteral.js +29 -0
  335. package/src/core/schemas/builders/object/index.d.ts +6 -0
  336. package/src/core/schemas/builders/object/index.js +11 -0
  337. package/src/core/schemas/builders/object/object.d.ts +3 -0
  338. package/src/core/schemas/builders/object/object.js +233 -0
  339. package/src/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -0
  340. package/src/core/schemas/builders/object/objectWithoutOptionalProperties.js +8 -0
  341. package/src/core/schemas/builders/object/property.d.ts +8 -0
  342. package/src/core/schemas/builders/object/property.js +16 -0
  343. package/src/core/schemas/builders/object/types.d.ts +26 -0
  344. package/src/core/schemas/builders/object/types.js +2 -0
  345. package/src/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +9 -0
  346. package/src/core/schemas/builders/object-like/getObjectLikeUtils.js +54 -0
  347. package/src/core/schemas/builders/object-like/index.d.ts +2 -0
  348. package/src/core/schemas/builders/object-like/index.js +6 -0
  349. package/src/core/schemas/builders/object-like/types.d.ts +7 -0
  350. package/src/core/schemas/builders/object-like/types.js +2 -0
  351. package/src/core/schemas/builders/primitives/any.d.ts +1 -0
  352. package/src/core/schemas/builders/primitives/any.js +6 -0
  353. package/src/core/schemas/builders/primitives/boolean.d.ts +1 -0
  354. package/src/core/schemas/builders/primitives/boolean.js +25 -0
  355. package/src/core/schemas/builders/primitives/index.d.ts +5 -0
  356. package/src/core/schemas/builders/primitives/index.js +13 -0
  357. package/src/core/schemas/builders/primitives/number.d.ts +1 -0
  358. package/src/core/schemas/builders/primitives/number.js +25 -0
  359. package/src/core/schemas/builders/primitives/string.d.ts +1 -0
  360. package/src/core/schemas/builders/primitives/string.js +25 -0
  361. package/src/core/schemas/builders/primitives/unknown.d.ts +1 -0
  362. package/src/core/schemas/builders/primitives/unknown.js +6 -0
  363. package/src/core/schemas/builders/record/index.d.ts +2 -0
  364. package/src/core/schemas/builders/record/index.js +5 -0
  365. package/src/core/schemas/builders/record/record.d.ts +3 -0
  366. package/src/core/schemas/builders/record/record.js +95 -0
  367. package/src/core/schemas/builders/record/types.d.ts +4 -0
  368. package/src/core/schemas/builders/record/types.js +2 -0
  369. package/src/core/schemas/builders/schema-utils/JsonError.d.ts +5 -0
  370. package/src/core/schemas/builders/schema-utils/JsonError.js +12 -0
  371. package/src/core/schemas/builders/schema-utils/ParseError.d.ts +5 -0
  372. package/src/core/schemas/builders/schema-utils/ParseError.js +12 -0
  373. package/src/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +17 -0
  374. package/src/core/schemas/builders/schema-utils/getSchemaUtils.js +82 -0
  375. package/src/core/schemas/builders/schema-utils/index.d.ts +4 -0
  376. package/src/core/schemas/builders/schema-utils/index.js +11 -0
  377. package/src/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +2 -0
  378. package/src/core/schemas/builders/schema-utils/stringifyValidationErrors.js +10 -0
  379. package/src/core/schemas/builders/set/index.d.ts +1 -0
  380. package/src/core/schemas/builders/set/index.js +5 -0
  381. package/src/core/schemas/builders/set/set.d.ts +2 -0
  382. package/src/core/schemas/builders/set/set.js +44 -0
  383. package/src/core/schemas/builders/undiscriminated-union/index.d.ts +2 -0
  384. package/src/core/schemas/builders/undiscriminated-union/index.js +5 -0
  385. package/src/core/schemas/builders/undiscriminated-union/types.d.ts +4 -0
  386. package/src/core/schemas/builders/undiscriminated-union/types.js +2 -0
  387. package/src/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +3 -0
  388. package/src/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +40 -0
  389. package/src/core/schemas/builders/union/discriminant.d.ts +5 -0
  390. package/src/core/schemas/builders/union/discriminant.js +10 -0
  391. package/src/core/schemas/builders/union/index.d.ts +4 -0
  392. package/src/core/schemas/builders/union/index.js +7 -0
  393. package/src/core/schemas/builders/union/types.d.ts +13 -0
  394. package/src/core/schemas/builders/union/types.js +2 -0
  395. package/src/core/schemas/builders/union/union.d.ts +4 -0
  396. package/src/core/schemas/builders/union/union.js +130 -0
  397. package/src/core/schemas/index.d.ts +2 -0
  398. package/src/core/schemas/index.js +17 -0
  399. package/src/core/schemas/utils/MaybePromise.d.ts +1 -0
  400. package/src/core/schemas/utils/MaybePromise.js +2 -0
  401. package/src/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +7 -0
  402. package/src/core/schemas/utils/addQuestionMarksToNullableProperties.js +2 -0
  403. package/src/core/schemas/utils/createIdentitySchemaCreator.d.ts +2 -0
  404. package/src/core/schemas/utils/createIdentitySchemaCreator.js +16 -0
  405. package/src/core/schemas/utils/entries.d.ts +1 -0
  406. package/src/core/schemas/utils/entries.js +7 -0
  407. package/src/core/schemas/utils/filterObject.d.ts +1 -0
  408. package/src/core/schemas/utils/filterObject.js +14 -0
  409. package/src/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +1 -0
  410. package/src/core/schemas/utils/getErrorMessageForIncorrectType.js +28 -0
  411. package/src/core/schemas/utils/isPlainObject.d.ts +1 -0
  412. package/src/core/schemas/utils/isPlainObject.js +18 -0
  413. package/src/core/schemas/utils/keys.d.ts +1 -0
  414. package/src/core/schemas/utils/keys.js +7 -0
  415. package/src/core/schemas/utils/maybeSkipValidation.d.ts +2 -0
  416. package/src/core/schemas/utils/maybeSkipValidation.js +28 -0
  417. package/src/core/schemas/utils/partition.d.ts +1 -0
  418. package/src/core/schemas/utils/partition.js +16 -0
  419. package/src/errors/ParlantError.d.ts +12 -0
  420. package/src/errors/ParlantError.js +32 -0
  421. package/src/errors/ParlantTimeoutError.d.ts +6 -0
  422. package/src/errors/ParlantTimeoutError.js +13 -0
  423. package/src/errors/index.d.ts +2 -0
  424. package/src/errors/index.js +7 -0
  425. package/src/index.d.ts +3 -0
  426. package/src/index.js +32 -0
  427. package/src/serialization/index.d.ts +2 -0
  428. package/src/serialization/index.js +18 -0
  429. package/src/serialization/resources/agents/client/index.d.ts +2 -0
  430. package/src/serialization/resources/agents/client/index.js +31 -0
  431. package/src/serialization/resources/agents/client/list.d.ts +11 -0
  432. package/src/serialization/resources/agents/client/list.js +32 -0
  433. package/src/serialization/resources/agents/client/requests/AgentCreationParams.d.ts +14 -0
  434. package/src/serialization/resources/agents/client/requests/AgentCreationParams.js +35 -0
  435. package/src/serialization/resources/agents/client/requests/AgentUpdateParams.d.ts +14 -0
  436. package/src/serialization/resources/agents/client/requests/AgentUpdateParams.js +35 -0
  437. package/src/serialization/resources/agents/client/requests/index.d.ts +2 -0
  438. package/src/serialization/resources/agents/client/requests/index.js +7 -0
  439. package/src/serialization/resources/agents/index.d.ts +1 -0
  440. package/src/serialization/resources/agents/index.js +17 -0
  441. package/src/serialization/resources/contextVariables/client/index.d.ts +2 -0
  442. package/src/serialization/resources/contextVariables/client/index.js +31 -0
  443. package/src/serialization/resources/contextVariables/client/list.d.ts +11 -0
  444. package/src/serialization/resources/contextVariables/client/list.js +32 -0
  445. package/src/serialization/resources/contextVariables/client/requests/ContextVariableCreationParams.d.ts +17 -0
  446. package/src/serialization/resources/contextVariables/client/requests/ContextVariableCreationParams.js +38 -0
  447. package/src/serialization/resources/contextVariables/client/requests/ContextVariableUpdateParams.d.ts +17 -0
  448. package/src/serialization/resources/contextVariables/client/requests/ContextVariableUpdateParams.js +38 -0
  449. package/src/serialization/resources/contextVariables/client/requests/ContextVariableValueUpdateParams.d.ts +12 -0
  450. package/src/serialization/resources/contextVariables/client/requests/ContextVariableValueUpdateParams.js +33 -0
  451. package/src/serialization/resources/contextVariables/client/requests/index.d.ts +3 -0
  452. package/src/serialization/resources/contextVariables/client/requests/index.js +9 -0
  453. package/src/serialization/resources/contextVariables/index.d.ts +1 -0
  454. package/src/serialization/resources/contextVariables/index.js +17 -0
  455. package/src/serialization/resources/customers/client/index.d.ts +2 -0
  456. package/src/serialization/resources/customers/client/index.js +31 -0
  457. package/src/serialization/resources/customers/client/list.d.ts +11 -0
  458. package/src/serialization/resources/customers/client/list.js +32 -0
  459. package/src/serialization/resources/customers/client/requests/CustomerCreationParams.d.ts +13 -0
  460. package/src/serialization/resources/customers/client/requests/CustomerCreationParams.js +34 -0
  461. package/src/serialization/resources/customers/client/requests/CustomerUpdateParams.d.ts +16 -0
  462. package/src/serialization/resources/customers/client/requests/CustomerUpdateParams.js +37 -0
  463. package/src/serialization/resources/customers/client/requests/index.d.ts +2 -0
  464. package/src/serialization/resources/customers/client/requests/index.js +7 -0
  465. package/src/serialization/resources/customers/index.d.ts +1 -0
  466. package/src/serialization/resources/customers/index.js +17 -0
  467. package/src/serialization/resources/evaluations/client/index.d.ts +1 -0
  468. package/src/serialization/resources/evaluations/client/index.js +17 -0
  469. package/src/serialization/resources/evaluations/client/requests/EvaluationCreationParams.d.ts +14 -0
  470. package/src/serialization/resources/evaluations/client/requests/EvaluationCreationParams.js +35 -0
  471. package/src/serialization/resources/evaluations/client/requests/index.d.ts +1 -0
  472. package/src/serialization/resources/evaluations/client/requests/index.js +5 -0
  473. package/src/serialization/resources/evaluations/index.d.ts +1 -0
  474. package/src/serialization/resources/evaluations/index.js +17 -0
  475. package/src/serialization/resources/glossary/client/index.d.ts +2 -0
  476. package/src/serialization/resources/glossary/client/index.js +31 -0
  477. package/src/serialization/resources/glossary/client/listTerms.d.ts +11 -0
  478. package/src/serialization/resources/glossary/client/listTerms.js +32 -0
  479. package/src/serialization/resources/glossary/client/requests/TermCreationParams.d.ts +14 -0
  480. package/src/serialization/resources/glossary/client/requests/TermCreationParams.js +35 -0
  481. package/src/serialization/resources/glossary/client/requests/TermUpdateParams.d.ts +14 -0
  482. package/src/serialization/resources/glossary/client/requests/TermUpdateParams.js +35 -0
  483. package/src/serialization/resources/glossary/client/requests/index.d.ts +2 -0
  484. package/src/serialization/resources/glossary/client/requests/index.js +7 -0
  485. package/src/serialization/resources/glossary/index.d.ts +1 -0
  486. package/src/serialization/resources/glossary/index.js +17 -0
  487. package/src/serialization/resources/guidelines/client/index.d.ts +2 -0
  488. package/src/serialization/resources/guidelines/client/index.js +31 -0
  489. package/src/serialization/resources/guidelines/client/list.d.ts +11 -0
  490. package/src/serialization/resources/guidelines/client/list.js +32 -0
  491. package/src/serialization/resources/guidelines/client/requests/GuidelineCreationParams.d.ts +13 -0
  492. package/src/serialization/resources/guidelines/client/requests/GuidelineCreationParams.js +34 -0
  493. package/src/serialization/resources/guidelines/client/requests/GuidelineUpdateParams.d.ts +15 -0
  494. package/src/serialization/resources/guidelines/client/requests/GuidelineUpdateParams.js +36 -0
  495. package/src/serialization/resources/guidelines/client/requests/index.d.ts +2 -0
  496. package/src/serialization/resources/guidelines/client/requests/index.js +7 -0
  497. package/src/serialization/resources/guidelines/index.d.ts +1 -0
  498. package/src/serialization/resources/guidelines/index.js +17 -0
  499. package/src/serialization/resources/index.d.ts +18 -0
  500. package/src/serialization/resources/index.js +47 -0
  501. package/src/serialization/resources/services/client/index.d.ts +2 -0
  502. package/src/serialization/resources/services/client/index.js +31 -0
  503. package/src/serialization/resources/services/client/list.d.ts +11 -0
  504. package/src/serialization/resources/services/client/list.js +32 -0
  505. package/src/serialization/resources/services/client/requests/ServiceUpdateParams.d.ts +17 -0
  506. package/src/serialization/resources/services/client/requests/ServiceUpdateParams.js +38 -0
  507. package/src/serialization/resources/services/client/requests/index.d.ts +1 -0
  508. package/src/serialization/resources/services/client/requests/index.js +5 -0
  509. package/src/serialization/resources/services/index.d.ts +1 -0
  510. package/src/serialization/resources/services/index.js +17 -0
  511. package/src/serialization/resources/sessions/client/index.d.ts +3 -0
  512. package/src/serialization/resources/sessions/client/index.js +32 -0
  513. package/src/serialization/resources/sessions/client/list.d.ts +11 -0
  514. package/src/serialization/resources/sessions/client/list.js +32 -0
  515. package/src/serialization/resources/sessions/client/listEvents.d.ts +11 -0
  516. package/src/serialization/resources/sessions/client/listEvents.js +32 -0
  517. package/src/serialization/resources/sessions/client/requests/EventCreationParams.d.ts +16 -0
  518. package/src/serialization/resources/sessions/client/requests/EventCreationParams.js +37 -0
  519. package/src/serialization/resources/sessions/client/requests/SessionCreationParams.d.ts +14 -0
  520. package/src/serialization/resources/sessions/client/requests/SessionCreationParams.js +35 -0
  521. package/src/serialization/resources/sessions/client/requests/SessionUpdateParams.d.ts +14 -0
  522. package/src/serialization/resources/sessions/client/requests/SessionUpdateParams.js +35 -0
  523. package/src/serialization/resources/sessions/client/requests/index.d.ts +3 -0
  524. package/src/serialization/resources/sessions/client/requests/index.js +9 -0
  525. package/src/serialization/resources/sessions/index.d.ts +1 -0
  526. package/src/serialization/resources/sessions/index.js +17 -0
  527. package/src/serialization/resources/tags/client/index.d.ts +2 -0
  528. package/src/serialization/resources/tags/client/index.js +31 -0
  529. package/src/serialization/resources/tags/client/list.d.ts +11 -0
  530. package/src/serialization/resources/tags/client/list.js +32 -0
  531. package/src/serialization/resources/tags/client/requests/TagCreationParams.d.ts +12 -0
  532. package/src/serialization/resources/tags/client/requests/TagCreationParams.js +33 -0
  533. package/src/serialization/resources/tags/client/requests/TagUpdateParams.d.ts +12 -0
  534. package/src/serialization/resources/tags/client/requests/TagUpdateParams.js +33 -0
  535. package/src/serialization/resources/tags/client/requests/index.d.ts +2 -0
  536. package/src/serialization/resources/tags/client/requests/index.js +7 -0
  537. package/src/serialization/resources/tags/index.d.ts +1 -0
  538. package/src/serialization/resources/tags/index.js +17 -0
  539. package/src/serialization/types/Agent.d.ts +16 -0
  540. package/src/serialization/types/Agent.js +37 -0
  541. package/src/serialization/types/CoherenceCheck.d.ts +18 -0
  542. package/src/serialization/types/CoherenceCheck.js +39 -0
  543. package/src/serialization/types/CoherenceCheckKindDto.d.ts +10 -0
  544. package/src/serialization/types/CoherenceCheckKindDto.js +34 -0
  545. package/src/serialization/types/ConnectionKindDto.d.ts +10 -0
  546. package/src/serialization/types/ConnectionKindDto.js +31 -0
  547. package/src/serialization/types/ConnectionProposition.d.ts +18 -0
  548. package/src/serialization/types/ConnectionProposition.js +39 -0
  549. package/src/serialization/types/ConnectionPropositionKindDto.d.ts +10 -0
  550. package/src/serialization/types/ConnectionPropositionKindDto.js +31 -0
  551. package/src/serialization/types/ConsumptionOffsets.d.ts +12 -0
  552. package/src/serialization/types/ConsumptionOffsets.js +33 -0
  553. package/src/serialization/types/ConsumptionOffsetsUpdateParams.d.ts +12 -0
  554. package/src/serialization/types/ConsumptionOffsetsUpdateParams.js +33 -0
  555. package/src/serialization/types/ContextVariable.d.ts +18 -0
  556. package/src/serialization/types/ContextVariable.js +39 -0
  557. package/src/serialization/types/ContextVariableAndValue.d.ts +16 -0
  558. package/src/serialization/types/ContextVariableAndValue.js +37 -0
  559. package/src/serialization/types/ContextVariableReadResult.d.ts +15 -0
  560. package/src/serialization/types/ContextVariableReadResult.js +36 -0
  561. package/src/serialization/types/ContextVariableValue.d.ts +14 -0
  562. package/src/serialization/types/ContextVariableValue.js +35 -0
  563. package/src/serialization/types/Customer.d.ts +16 -0
  564. package/src/serialization/types/Customer.js +37 -0
  565. package/src/serialization/types/CustomerExtraUpdateParams.d.ts +13 -0
  566. package/src/serialization/types/CustomerExtraUpdateParams.js +34 -0
  567. package/src/serialization/types/DayOfWeekDto.d.ts +10 -0
  568. package/src/serialization/types/DayOfWeekDto.js +31 -0
  569. package/src/serialization/types/Evaluation.d.ts +19 -0
  570. package/src/serialization/types/Evaluation.js +40 -0
  571. package/src/serialization/types/EvaluationStatusDto.d.ts +10 -0
  572. package/src/serialization/types/EvaluationStatusDto.js +31 -0
  573. package/src/serialization/types/Event.d.ts +19 -0
  574. package/src/serialization/types/Event.js +40 -0
  575. package/src/serialization/types/EventInspectionResult.d.ts +16 -0
  576. package/src/serialization/types/EventInspectionResult.js +37 -0
  577. package/src/serialization/types/EventKindDto.d.ts +10 -0
  578. package/src/serialization/types/EventKindDto.js +31 -0
  579. package/src/serialization/types/EventSourceDto.d.ts +10 -0
  580. package/src/serialization/types/EventSourceDto.js +38 -0
  581. package/src/serialization/types/EventTrace.d.ts +17 -0
  582. package/src/serialization/types/EventTrace.js +38 -0
  583. package/src/serialization/types/FreshnessRules.d.ts +18 -0
  584. package/src/serialization/types/FreshnessRules.js +39 -0
  585. package/src/serialization/types/GenerationInfo.d.ts +16 -0
  586. package/src/serialization/types/GenerationInfo.js +37 -0
  587. package/src/serialization/types/Guideline.d.ts +14 -0
  588. package/src/serialization/types/Guideline.js +35 -0
  589. package/src/serialization/types/GuidelineConnection.d.ts +18 -0
  590. package/src/serialization/types/GuidelineConnection.js +39 -0
  591. package/src/serialization/types/GuidelineConnectionAddition.d.ts +15 -0
  592. package/src/serialization/types/GuidelineConnectionAddition.js +36 -0
  593. package/src/serialization/types/GuidelineConnectionUpdateParams.d.ts +14 -0
  594. package/src/serialization/types/GuidelineConnectionUpdateParams.js +35 -0
  595. package/src/serialization/types/GuidelineContent.d.ts +13 -0
  596. package/src/serialization/types/GuidelineContent.js +34 -0
  597. package/src/serialization/types/GuidelineCreationResult.d.ts +13 -0
  598. package/src/serialization/types/GuidelineCreationResult.js +34 -0
  599. package/src/serialization/types/GuidelineInvoiceData.d.ts +15 -0
  600. package/src/serialization/types/GuidelineInvoiceData.js +36 -0
  601. package/src/serialization/types/GuidelinePayload.d.ts +18 -0
  602. package/src/serialization/types/GuidelinePayload.js +39 -0
  603. package/src/serialization/types/GuidelinePayloadOperationDto.d.ts +10 -0
  604. package/src/serialization/types/GuidelinePayloadOperationDto.js +31 -0
  605. package/src/serialization/types/GuidelineProposition.d.ts +16 -0
  606. package/src/serialization/types/GuidelineProposition.js +37 -0
  607. package/src/serialization/types/GuidelinePropositionInspection.d.ts +14 -0
  608. package/src/serialization/types/GuidelinePropositionInspection.js +35 -0
  609. package/src/serialization/types/GuidelineToolAssociation.d.ts +15 -0
  610. package/src/serialization/types/GuidelineToolAssociation.js +36 -0
  611. package/src/serialization/types/GuidelineToolAssociationUpdateParams.d.ts +14 -0
  612. package/src/serialization/types/GuidelineToolAssociationUpdateParams.js +35 -0
  613. package/src/serialization/types/GuidelineWithConnectionsAndToolAssociations.d.ts +17 -0
  614. package/src/serialization/types/GuidelineWithConnectionsAndToolAssociations.js +38 -0
  615. package/src/serialization/types/HttpValidationError.d.ts +13 -0
  616. package/src/serialization/types/HttpValidationError.js +34 -0
  617. package/src/serialization/types/Invoice.d.ts +18 -0
  618. package/src/serialization/types/Invoice.js +39 -0
  619. package/src/serialization/types/InvoiceData.d.ts +13 -0
  620. package/src/serialization/types/InvoiceData.js +34 -0
  621. package/src/serialization/types/MessageGenerationInspection.d.ts +14 -0
  622. package/src/serialization/types/MessageGenerationInspection.js +35 -0
  623. package/src/serialization/types/Moderation.d.ts +10 -0
  624. package/src/serialization/types/Moderation.js +31 -0
  625. package/src/serialization/types/OpenApiServiceParams.d.ts +13 -0
  626. package/src/serialization/types/OpenApiServiceParams.js +34 -0
  627. package/src/serialization/types/Payload.d.ts +15 -0
  628. package/src/serialization/types/Payload.js +36 -0
  629. package/src/serialization/types/PayloadKindDto.d.ts +10 -0
  630. package/src/serialization/types/PayloadKindDto.js +31 -0
  631. package/src/serialization/types/PreparationIteration.d.ts +21 -0
  632. package/src/serialization/types/PreparationIteration.js +42 -0
  633. package/src/serialization/types/PreparationIterationGenerations.d.ts +15 -0
  634. package/src/serialization/types/PreparationIterationGenerations.js +36 -0
  635. package/src/serialization/types/SdkServiceParams.d.ts +12 -0
  636. package/src/serialization/types/SdkServiceParams.js +33 -0
  637. package/src/serialization/types/Service.d.ts +17 -0
  638. package/src/serialization/types/Service.js +38 -0
  639. package/src/serialization/types/Session.d.ts +18 -0
  640. package/src/serialization/types/Session.js +39 -0
  641. package/src/serialization/types/Tag.d.ts +14 -0
  642. package/src/serialization/types/Tag.js +35 -0
  643. package/src/serialization/types/TagsUpdateParams.d.ts +13 -0
  644. package/src/serialization/types/TagsUpdateParams.js +34 -0
  645. package/src/serialization/types/Term.d.ts +15 -0
  646. package/src/serialization/types/Term.js +36 -0
  647. package/src/serialization/types/Tool.d.ts +17 -0
  648. package/src/serialization/types/Tool.js +38 -0
  649. package/src/serialization/types/ToolCall.d.ts +15 -0
  650. package/src/serialization/types/ToolCall.js +36 -0
  651. package/src/serialization/types/ToolId.d.ts +13 -0
  652. package/src/serialization/types/ToolId.js +34 -0
  653. package/src/serialization/types/ToolParameter.d.ts +16 -0
  654. package/src/serialization/types/ToolParameter.js +37 -0
  655. package/src/serialization/types/ToolParameterDtoEnumItem.d.ts +10 -0
  656. package/src/serialization/types/ToolParameterDtoEnumItem.js +31 -0
  657. package/src/serialization/types/ToolParameterTypeDto.d.ts +10 -0
  658. package/src/serialization/types/ToolParameterTypeDto.js +31 -0
  659. package/src/serialization/types/ToolResult.d.ts +13 -0
  660. package/src/serialization/types/ToolResult.js +34 -0
  661. package/src/serialization/types/ToolServiceKindDto.d.ts +10 -0
  662. package/src/serialization/types/ToolServiceKindDto.js +31 -0
  663. package/src/serialization/types/UsageInfo.d.ts +14 -0
  664. package/src/serialization/types/UsageInfo.js +37 -0
  665. package/src/serialization/types/ValidationError.d.ts +15 -0
  666. package/src/serialization/types/ValidationError.js +36 -0
  667. package/src/serialization/types/ValidationErrorLocItem.d.ts +10 -0
  668. package/src/serialization/types/ValidationErrorLocItem.js +31 -0
  669. package/src/serialization/types/index.d.ts +65 -0
  670. package/src/serialization/types/index.js +81 -0
@@ -0,0 +1,643 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
+ return new (P || (P = Promise))(function (resolve, reject) {
31
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
35
+ });
36
+ };
37
+ var __importDefault = (this && this.__importDefault) || function (mod) {
38
+ return (mod && mod.__esModule) ? mod : { "default": mod };
39
+ };
40
+ Object.defineProperty(exports, "__esModule", { value: true });
41
+ exports.ContextVariables = void 0;
42
+ const core = __importStar(require("../../../../core"));
43
+ const Parlant = __importStar(require("../../../index"));
44
+ const url_join_1 = __importDefault(require("url-join"));
45
+ const serializers = __importStar(require("../../../../serialization/index"));
46
+ const errors = __importStar(require("../../../../errors/index"));
47
+ class ContextVariables {
48
+ constructor(_options) {
49
+ this._options = _options;
50
+ }
51
+ /**
52
+ * @param {string} agentId
53
+ * @param {ContextVariables.RequestOptions} requestOptions - Request-specific configuration.
54
+ *
55
+ * @throws {@link Parlant.UnprocessableEntityError}
56
+ *
57
+ * @example
58
+ * await client.contextVariables.list("agent_id")
59
+ */
60
+ list(agentId, requestOptions) {
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ const _response = yield core.fetcher({
63
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `agents/${encodeURIComponent(agentId)}/context-variables`),
64
+ method: "GET",
65
+ headers: {
66
+ "X-Fern-Language": "JavaScript",
67
+ "X-Fern-Runtime": core.RUNTIME.type,
68
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
69
+ },
70
+ contentType: "application/json",
71
+ requestType: "json",
72
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
73
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
74
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
75
+ });
76
+ if (_response.ok) {
77
+ return serializers.contextVariables.list.Response.parseOrThrow(_response.body, {
78
+ unrecognizedObjectKeys: "passthrough",
79
+ allowUnrecognizedUnionMembers: true,
80
+ allowUnrecognizedEnumValues: true,
81
+ breadcrumbsPrefix: ["response"],
82
+ });
83
+ }
84
+ if (_response.error.reason === "status-code") {
85
+ switch (_response.error.statusCode) {
86
+ case 422:
87
+ throw new Parlant.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
88
+ unrecognizedObjectKeys: "passthrough",
89
+ allowUnrecognizedUnionMembers: true,
90
+ allowUnrecognizedEnumValues: true,
91
+ breadcrumbsPrefix: ["response"],
92
+ }));
93
+ default:
94
+ throw new errors.ParlantError({
95
+ statusCode: _response.error.statusCode,
96
+ body: _response.error.body,
97
+ });
98
+ }
99
+ }
100
+ switch (_response.error.reason) {
101
+ case "non-json":
102
+ throw new errors.ParlantError({
103
+ statusCode: _response.error.statusCode,
104
+ body: _response.error.rawBody,
105
+ });
106
+ case "timeout":
107
+ throw new errors.ParlantTimeoutError();
108
+ case "unknown":
109
+ throw new errors.ParlantError({
110
+ message: _response.error.errorMessage,
111
+ });
112
+ }
113
+ });
114
+ }
115
+ /**
116
+ * @param {string} agentId
117
+ * @param {Parlant.ContextVariableCreationParams} request
118
+ * @param {ContextVariables.RequestOptions} requestOptions - Request-specific configuration.
119
+ *
120
+ * @throws {@link Parlant.UnprocessableEntityError}
121
+ *
122
+ * @example
123
+ * await client.contextVariables.create("agent_id", {
124
+ * name: "name"
125
+ * })
126
+ */
127
+ create(agentId, request, requestOptions) {
128
+ return __awaiter(this, void 0, void 0, function* () {
129
+ const _response = yield core.fetcher({
130
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `agents/${encodeURIComponent(agentId)}/context-variables`),
131
+ method: "POST",
132
+ headers: {
133
+ "X-Fern-Language": "JavaScript",
134
+ "X-Fern-Runtime": core.RUNTIME.type,
135
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
136
+ },
137
+ contentType: "application/json",
138
+ requestType: "json",
139
+ body: serializers.ContextVariableCreationParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
140
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
141
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
142
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
143
+ });
144
+ if (_response.ok) {
145
+ return serializers.ContextVariable.parseOrThrow(_response.body, {
146
+ unrecognizedObjectKeys: "passthrough",
147
+ allowUnrecognizedUnionMembers: true,
148
+ allowUnrecognizedEnumValues: true,
149
+ breadcrumbsPrefix: ["response"],
150
+ });
151
+ }
152
+ if (_response.error.reason === "status-code") {
153
+ switch (_response.error.statusCode) {
154
+ case 422:
155
+ throw new Parlant.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
156
+ unrecognizedObjectKeys: "passthrough",
157
+ allowUnrecognizedUnionMembers: true,
158
+ allowUnrecognizedEnumValues: true,
159
+ breadcrumbsPrefix: ["response"],
160
+ }));
161
+ default:
162
+ throw new errors.ParlantError({
163
+ statusCode: _response.error.statusCode,
164
+ body: _response.error.body,
165
+ });
166
+ }
167
+ }
168
+ switch (_response.error.reason) {
169
+ case "non-json":
170
+ throw new errors.ParlantError({
171
+ statusCode: _response.error.statusCode,
172
+ body: _response.error.rawBody,
173
+ });
174
+ case "timeout":
175
+ throw new errors.ParlantTimeoutError();
176
+ case "unknown":
177
+ throw new errors.ParlantError({
178
+ message: _response.error.errorMessage,
179
+ });
180
+ }
181
+ });
182
+ }
183
+ /**
184
+ * @param {string} agentId
185
+ * @param {ContextVariables.RequestOptions} requestOptions - Request-specific configuration.
186
+ *
187
+ * @throws {@link Parlant.UnprocessableEntityError}
188
+ *
189
+ * @example
190
+ * await client.contextVariables.deleteMany("agent_id")
191
+ */
192
+ deleteMany(agentId, requestOptions) {
193
+ return __awaiter(this, void 0, void 0, function* () {
194
+ const _response = yield core.fetcher({
195
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `agents/${encodeURIComponent(agentId)}/context-variables`),
196
+ method: "DELETE",
197
+ headers: {
198
+ "X-Fern-Language": "JavaScript",
199
+ "X-Fern-Runtime": core.RUNTIME.type,
200
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
201
+ },
202
+ contentType: "application/json",
203
+ requestType: "json",
204
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
205
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
206
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
207
+ });
208
+ if (_response.ok) {
209
+ return;
210
+ }
211
+ if (_response.error.reason === "status-code") {
212
+ switch (_response.error.statusCode) {
213
+ case 422:
214
+ throw new Parlant.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
215
+ unrecognizedObjectKeys: "passthrough",
216
+ allowUnrecognizedUnionMembers: true,
217
+ allowUnrecognizedEnumValues: true,
218
+ breadcrumbsPrefix: ["response"],
219
+ }));
220
+ default:
221
+ throw new errors.ParlantError({
222
+ statusCode: _response.error.statusCode,
223
+ body: _response.error.body,
224
+ });
225
+ }
226
+ }
227
+ switch (_response.error.reason) {
228
+ case "non-json":
229
+ throw new errors.ParlantError({
230
+ statusCode: _response.error.statusCode,
231
+ body: _response.error.rawBody,
232
+ });
233
+ case "timeout":
234
+ throw new errors.ParlantTimeoutError();
235
+ case "unknown":
236
+ throw new errors.ParlantError({
237
+ message: _response.error.errorMessage,
238
+ });
239
+ }
240
+ });
241
+ }
242
+ /**
243
+ * @param {string} agentId
244
+ * @param {string} variableId
245
+ * @param {Parlant.ContextVariablesRetrieveRequest} request
246
+ * @param {ContextVariables.RequestOptions} requestOptions - Request-specific configuration.
247
+ *
248
+ * @throws {@link Parlant.UnprocessableEntityError}
249
+ *
250
+ * @example
251
+ * await client.contextVariables.retrieve("agent_id", "variable_id")
252
+ */
253
+ retrieve(agentId, variableId, request = {}, requestOptions) {
254
+ return __awaiter(this, void 0, void 0, function* () {
255
+ const { includeValues } = request;
256
+ const _queryParams = {};
257
+ if (includeValues != null) {
258
+ _queryParams["include_values"] = includeValues.toString();
259
+ }
260
+ const _response = yield core.fetcher({
261
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `agents/${encodeURIComponent(agentId)}/context-variables/${encodeURIComponent(variableId)}`),
262
+ method: "GET",
263
+ headers: {
264
+ "X-Fern-Language": "JavaScript",
265
+ "X-Fern-Runtime": core.RUNTIME.type,
266
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
267
+ },
268
+ contentType: "application/json",
269
+ queryParameters: _queryParams,
270
+ requestType: "json",
271
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
272
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
273
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
274
+ });
275
+ if (_response.ok) {
276
+ return serializers.ContextVariableReadResult.parseOrThrow(_response.body, {
277
+ unrecognizedObjectKeys: "passthrough",
278
+ allowUnrecognizedUnionMembers: true,
279
+ allowUnrecognizedEnumValues: true,
280
+ breadcrumbsPrefix: ["response"],
281
+ });
282
+ }
283
+ if (_response.error.reason === "status-code") {
284
+ switch (_response.error.statusCode) {
285
+ case 422:
286
+ throw new Parlant.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
287
+ unrecognizedObjectKeys: "passthrough",
288
+ allowUnrecognizedUnionMembers: true,
289
+ allowUnrecognizedEnumValues: true,
290
+ breadcrumbsPrefix: ["response"],
291
+ }));
292
+ default:
293
+ throw new errors.ParlantError({
294
+ statusCode: _response.error.statusCode,
295
+ body: _response.error.body,
296
+ });
297
+ }
298
+ }
299
+ switch (_response.error.reason) {
300
+ case "non-json":
301
+ throw new errors.ParlantError({
302
+ statusCode: _response.error.statusCode,
303
+ body: _response.error.rawBody,
304
+ });
305
+ case "timeout":
306
+ throw new errors.ParlantTimeoutError();
307
+ case "unknown":
308
+ throw new errors.ParlantError({
309
+ message: _response.error.errorMessage,
310
+ });
311
+ }
312
+ });
313
+ }
314
+ /**
315
+ * @param {string} agentId
316
+ * @param {string} variableId
317
+ * @param {ContextVariables.RequestOptions} requestOptions - Request-specific configuration.
318
+ *
319
+ * @throws {@link Parlant.UnprocessableEntityError}
320
+ *
321
+ * @example
322
+ * await client.contextVariables.delete("agent_id", "variable_id")
323
+ */
324
+ delete(agentId, variableId, requestOptions) {
325
+ return __awaiter(this, void 0, void 0, function* () {
326
+ const _response = yield core.fetcher({
327
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `agents/${encodeURIComponent(agentId)}/context-variables/${encodeURIComponent(variableId)}`),
328
+ method: "DELETE",
329
+ headers: {
330
+ "X-Fern-Language": "JavaScript",
331
+ "X-Fern-Runtime": core.RUNTIME.type,
332
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
333
+ },
334
+ contentType: "application/json",
335
+ requestType: "json",
336
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
337
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
338
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
339
+ });
340
+ if (_response.ok) {
341
+ return;
342
+ }
343
+ if (_response.error.reason === "status-code") {
344
+ switch (_response.error.statusCode) {
345
+ case 422:
346
+ throw new Parlant.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
347
+ unrecognizedObjectKeys: "passthrough",
348
+ allowUnrecognizedUnionMembers: true,
349
+ allowUnrecognizedEnumValues: true,
350
+ breadcrumbsPrefix: ["response"],
351
+ }));
352
+ default:
353
+ throw new errors.ParlantError({
354
+ statusCode: _response.error.statusCode,
355
+ body: _response.error.body,
356
+ });
357
+ }
358
+ }
359
+ switch (_response.error.reason) {
360
+ case "non-json":
361
+ throw new errors.ParlantError({
362
+ statusCode: _response.error.statusCode,
363
+ body: _response.error.rawBody,
364
+ });
365
+ case "timeout":
366
+ throw new errors.ParlantTimeoutError();
367
+ case "unknown":
368
+ throw new errors.ParlantError({
369
+ message: _response.error.errorMessage,
370
+ });
371
+ }
372
+ });
373
+ }
374
+ /**
375
+ * @param {string} agentId
376
+ * @param {string} variableId
377
+ * @param {Parlant.ContextVariableUpdateParams} request
378
+ * @param {ContextVariables.RequestOptions} requestOptions - Request-specific configuration.
379
+ *
380
+ * @throws {@link Parlant.UnprocessableEntityError}
381
+ *
382
+ * @example
383
+ * await client.contextVariables.update("agent_id", "variable_id")
384
+ */
385
+ update(agentId, variableId, request = {}, requestOptions) {
386
+ return __awaiter(this, void 0, void 0, function* () {
387
+ const _response = yield core.fetcher({
388
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `agents/${encodeURIComponent(agentId)}/context-variables/${encodeURIComponent(variableId)}`),
389
+ method: "PATCH",
390
+ headers: {
391
+ "X-Fern-Language": "JavaScript",
392
+ "X-Fern-Runtime": core.RUNTIME.type,
393
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
394
+ },
395
+ contentType: "application/json",
396
+ requestType: "json",
397
+ body: serializers.ContextVariableUpdateParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
398
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
399
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
400
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
401
+ });
402
+ if (_response.ok) {
403
+ return serializers.ContextVariable.parseOrThrow(_response.body, {
404
+ unrecognizedObjectKeys: "passthrough",
405
+ allowUnrecognizedUnionMembers: true,
406
+ allowUnrecognizedEnumValues: true,
407
+ breadcrumbsPrefix: ["response"],
408
+ });
409
+ }
410
+ if (_response.error.reason === "status-code") {
411
+ switch (_response.error.statusCode) {
412
+ case 422:
413
+ throw new Parlant.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
414
+ unrecognizedObjectKeys: "passthrough",
415
+ allowUnrecognizedUnionMembers: true,
416
+ allowUnrecognizedEnumValues: true,
417
+ breadcrumbsPrefix: ["response"],
418
+ }));
419
+ default:
420
+ throw new errors.ParlantError({
421
+ statusCode: _response.error.statusCode,
422
+ body: _response.error.body,
423
+ });
424
+ }
425
+ }
426
+ switch (_response.error.reason) {
427
+ case "non-json":
428
+ throw new errors.ParlantError({
429
+ statusCode: _response.error.statusCode,
430
+ body: _response.error.rawBody,
431
+ });
432
+ case "timeout":
433
+ throw new errors.ParlantTimeoutError();
434
+ case "unknown":
435
+ throw new errors.ParlantError({
436
+ message: _response.error.errorMessage,
437
+ });
438
+ }
439
+ });
440
+ }
441
+ /**
442
+ * @param {string} agentId
443
+ * @param {string} variableId
444
+ * @param {string} key
445
+ * @param {ContextVariables.RequestOptions} requestOptions - Request-specific configuration.
446
+ *
447
+ * @throws {@link Parlant.UnprocessableEntityError}
448
+ *
449
+ * @example
450
+ * await client.contextVariables.getValue("agent_id", "variable_id", "key")
451
+ */
452
+ getValue(agentId, variableId, key, requestOptions) {
453
+ return __awaiter(this, void 0, void 0, function* () {
454
+ const _response = yield core.fetcher({
455
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `agents/${encodeURIComponent(agentId)}/context-variables/${encodeURIComponent(variableId)}/${encodeURIComponent(key)}`),
456
+ method: "GET",
457
+ headers: {
458
+ "X-Fern-Language": "JavaScript",
459
+ "X-Fern-Runtime": core.RUNTIME.type,
460
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
461
+ },
462
+ contentType: "application/json",
463
+ requestType: "json",
464
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
465
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
466
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
467
+ });
468
+ if (_response.ok) {
469
+ return serializers.ContextVariableValue.parseOrThrow(_response.body, {
470
+ unrecognizedObjectKeys: "passthrough",
471
+ allowUnrecognizedUnionMembers: true,
472
+ allowUnrecognizedEnumValues: true,
473
+ breadcrumbsPrefix: ["response"],
474
+ });
475
+ }
476
+ if (_response.error.reason === "status-code") {
477
+ switch (_response.error.statusCode) {
478
+ case 422:
479
+ throw new Parlant.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
480
+ unrecognizedObjectKeys: "passthrough",
481
+ allowUnrecognizedUnionMembers: true,
482
+ allowUnrecognizedEnumValues: true,
483
+ breadcrumbsPrefix: ["response"],
484
+ }));
485
+ default:
486
+ throw new errors.ParlantError({
487
+ statusCode: _response.error.statusCode,
488
+ body: _response.error.body,
489
+ });
490
+ }
491
+ }
492
+ switch (_response.error.reason) {
493
+ case "non-json":
494
+ throw new errors.ParlantError({
495
+ statusCode: _response.error.statusCode,
496
+ body: _response.error.rawBody,
497
+ });
498
+ case "timeout":
499
+ throw new errors.ParlantTimeoutError();
500
+ case "unknown":
501
+ throw new errors.ParlantError({
502
+ message: _response.error.errorMessage,
503
+ });
504
+ }
505
+ });
506
+ }
507
+ /**
508
+ * @param {string} agentId
509
+ * @param {string} variableId
510
+ * @param {string} key
511
+ * @param {Parlant.ContextVariableValueUpdateParams} request
512
+ * @param {ContextVariables.RequestOptions} requestOptions - Request-specific configuration.
513
+ *
514
+ * @throws {@link Parlant.UnprocessableEntityError}
515
+ *
516
+ * @example
517
+ * await client.contextVariables.setValue("string", "string", "string", {
518
+ * data: {
519
+ * "key": "value"
520
+ * }
521
+ * })
522
+ */
523
+ setValue(agentId, variableId, key, request, requestOptions) {
524
+ return __awaiter(this, void 0, void 0, function* () {
525
+ const _response = yield core.fetcher({
526
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `agents/${encodeURIComponent(agentId)}/context-variables/${encodeURIComponent(variableId)}/${encodeURIComponent(key)}`),
527
+ method: "PUT",
528
+ headers: {
529
+ "X-Fern-Language": "JavaScript",
530
+ "X-Fern-Runtime": core.RUNTIME.type,
531
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
532
+ },
533
+ contentType: "application/json",
534
+ requestType: "json",
535
+ body: serializers.ContextVariableValueUpdateParams.jsonOrThrow(request, {
536
+ unrecognizedObjectKeys: "strip",
537
+ }),
538
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
539
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
540
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
541
+ });
542
+ if (_response.ok) {
543
+ return serializers.ContextVariableValue.parseOrThrow(_response.body, {
544
+ unrecognizedObjectKeys: "passthrough",
545
+ allowUnrecognizedUnionMembers: true,
546
+ allowUnrecognizedEnumValues: true,
547
+ breadcrumbsPrefix: ["response"],
548
+ });
549
+ }
550
+ if (_response.error.reason === "status-code") {
551
+ switch (_response.error.statusCode) {
552
+ case 422:
553
+ throw new Parlant.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
554
+ unrecognizedObjectKeys: "passthrough",
555
+ allowUnrecognizedUnionMembers: true,
556
+ allowUnrecognizedEnumValues: true,
557
+ breadcrumbsPrefix: ["response"],
558
+ }));
559
+ default:
560
+ throw new errors.ParlantError({
561
+ statusCode: _response.error.statusCode,
562
+ body: _response.error.body,
563
+ });
564
+ }
565
+ }
566
+ switch (_response.error.reason) {
567
+ case "non-json":
568
+ throw new errors.ParlantError({
569
+ statusCode: _response.error.statusCode,
570
+ body: _response.error.rawBody,
571
+ });
572
+ case "timeout":
573
+ throw new errors.ParlantTimeoutError();
574
+ case "unknown":
575
+ throw new errors.ParlantError({
576
+ message: _response.error.errorMessage,
577
+ });
578
+ }
579
+ });
580
+ }
581
+ /**
582
+ * @param {string} agentId
583
+ * @param {string} variableId
584
+ * @param {string} key
585
+ * @param {ContextVariables.RequestOptions} requestOptions - Request-specific configuration.
586
+ *
587
+ * @throws {@link Parlant.UnprocessableEntityError}
588
+ *
589
+ * @example
590
+ * await client.contextVariables.deleteValue("agent_id", "variable_id", "key")
591
+ */
592
+ deleteValue(agentId, variableId, key, requestOptions) {
593
+ return __awaiter(this, void 0, void 0, function* () {
594
+ const _response = yield core.fetcher({
595
+ url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `agents/${encodeURIComponent(agentId)}/context-variables/${encodeURIComponent(variableId)}/${encodeURIComponent(key)}`),
596
+ method: "DELETE",
597
+ headers: {
598
+ "X-Fern-Language": "JavaScript",
599
+ "X-Fern-Runtime": core.RUNTIME.type,
600
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
601
+ },
602
+ contentType: "application/json",
603
+ requestType: "json",
604
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
605
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
606
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
607
+ });
608
+ if (_response.ok) {
609
+ return;
610
+ }
611
+ if (_response.error.reason === "status-code") {
612
+ switch (_response.error.statusCode) {
613
+ case 422:
614
+ throw new Parlant.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
615
+ unrecognizedObjectKeys: "passthrough",
616
+ allowUnrecognizedUnionMembers: true,
617
+ allowUnrecognizedEnumValues: true,
618
+ breadcrumbsPrefix: ["response"],
619
+ }));
620
+ default:
621
+ throw new errors.ParlantError({
622
+ statusCode: _response.error.statusCode,
623
+ body: _response.error.body,
624
+ });
625
+ }
626
+ }
627
+ switch (_response.error.reason) {
628
+ case "non-json":
629
+ throw new errors.ParlantError({
630
+ statusCode: _response.error.statusCode,
631
+ body: _response.error.rawBody,
632
+ });
633
+ case "timeout":
634
+ throw new errors.ParlantTimeoutError();
635
+ case "unknown":
636
+ throw new errors.ParlantError({
637
+ message: _response.error.errorMessage,
638
+ });
639
+ }
640
+ });
641
+ }
642
+ }
643
+ exports.ContextVariables = ContextVariables;
@@ -0,0 +1 @@
1
+ export * from "./requests";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests"), exports);
@@ -0,0 +1,16 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Parlant from "../../../../index";
5
+ /**
6
+ * @example
7
+ * {
8
+ * name: "name"
9
+ * }
10
+ */
11
+ export interface ContextVariableCreationParams {
12
+ name: string;
13
+ description?: string;
14
+ toolId?: Parlant.ToolId;
15
+ freshnessRules?: Parlant.FreshnessRules;
16
+ }