parlant-client 0.10.0 → 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 (443) hide show
  1. package/package.json +1 -1
  2. package/src/Client.d.ts +23 -16
  3. package/src/Client.js +29 -24
  4. package/src/api/errors/GatewayTimeoutError.js +17 -7
  5. package/src/api/errors/NotFoundError.js +17 -7
  6. package/src/api/errors/ServiceUnavailableError.js +17 -7
  7. package/src/api/errors/UnprocessableEntityError.js +17 -7
  8. package/src/api/resources/agents/client/Client.d.ts +12 -6
  9. package/src/api/resources/agents/client/Client.js +47 -50
  10. package/src/api/resources/agents/client/requests/AgentCreationParams.d.ts +7 -1
  11. package/src/api/resources/agents/client/requests/AgentUpdateParams.d.ts +5 -1
  12. package/src/api/resources/contextVariables/client/Client.d.ts +46 -48
  13. package/src/api/resources/contextVariables/client/Client.js +111 -122
  14. package/src/api/resources/contextVariables/client/requests/ContextVariableCreationParams.d.ts +3 -1
  15. package/src/api/resources/contextVariables/client/requests/ContextVariableUpdateParams.d.ts +12 -2
  16. package/src/api/resources/contextVariables/client/requests/ContextVariablesDeleteManyRequest.d.ts +13 -0
  17. package/src/api/resources/contextVariables/client/requests/ContextVariablesListRequest.d.ts +13 -0
  18. package/src/api/resources/contextVariables/client/requests/ContextVariablesRetrieveRequest.d.ts +3 -1
  19. package/src/api/resources/contextVariables/client/requests/index.d.ts +2 -0
  20. package/src/api/resources/customers/client/Client.d.ts +7 -3
  21. package/src/api/resources/customers/client/Client.js +42 -47
  22. package/src/api/resources/customers/client/requests/CustomerCreationParams.d.ts +2 -0
  23. package/src/api/resources/glossary/client/Client.d.ts +30 -24
  24. package/src/api/resources/glossary/client/Client.js +71 -70
  25. package/src/api/resources/glossary/client/requests/GlossaryListTermsRequest.d.ts +13 -0
  26. package/src/api/resources/glossary/client/requests/TermCreationParams.d.ts +2 -0
  27. package/src/api/resources/glossary/client/requests/TermUpdateParams.d.ts +7 -1
  28. package/src/api/resources/glossary/client/requests/index.d.ts +1 -0
  29. package/src/api/resources/guidelines/client/Client.d.ts +44 -93
  30. package/src/api/resources/guidelines/client/Client.js +88 -144
  31. package/src/api/resources/guidelines/client/requests/GuidelineCreationParams.d.ts +17 -46
  32. package/src/api/resources/guidelines/client/requests/GuidelineUpdateParams.d.ts +20 -10
  33. package/src/api/resources/guidelines/client/requests/GuidelinesListRequest.d.ts +13 -0
  34. package/src/api/resources/guidelines/client/requests/index.d.ts +1 -0
  35. package/src/api/resources/index.d.ts +10 -8
  36. package/src/api/resources/index.js +28 -16
  37. package/src/api/resources/relationships/client/Client.d.ts +86 -0
  38. package/src/api/resources/relationships/client/Client.js +319 -0
  39. package/src/api/resources/relationships/client/requests/RelationshipCreationParams.d.ts +23 -0
  40. package/src/api/resources/relationships/client/requests/RelationshipsListRequest.d.ts +22 -0
  41. package/src/api/resources/relationships/client/requests/index.d.ts +2 -0
  42. package/src/api/resources/services/client/Client.d.ts +7 -9
  43. package/src/api/resources/services/client/Client.js +36 -44
  44. package/src/api/resources/sessions/client/Client.d.ts +31 -13
  45. package/src/api/resources/sessions/client/Client.js +98 -100
  46. package/src/api/resources/sessions/client/requests/SessionsDeleteEventsRequest.d.ts +1 -1
  47. package/src/api/resources/sessions/client/requests/SessionsDeleteManyRequest.d.ts +4 -1
  48. package/src/api/resources/sessions/client/requests/SessionsListEventsRequest.d.ts +5 -1
  49. package/src/api/resources/sessions/client/requests/SessionsListRequest.d.ts +4 -1
  50. package/src/api/resources/tags/client/Client.d.ts +6 -2
  51. package/src/api/resources/tags/client/Client.js +39 -44
  52. package/src/api/resources/utterances/client/Client.d.ts +102 -0
  53. package/src/api/resources/utterances/client/Client.js +382 -0
  54. package/src/api/resources/utterances/client/requests/UtteranceCreationParams.d.ts +23 -0
  55. package/src/api/resources/utterances/client/requests/UtteranceUpdateParams.d.ts +22 -0
  56. package/src/api/resources/utterances/client/requests/UtterancesListRequest.d.ts +13 -0
  57. package/src/api/resources/utterances/client/requests/index.d.ts +3 -0
  58. package/src/api/resources/utterances/client/requests/index.js +2 -0
  59. package/src/api/types/Agent.d.ts +5 -3
  60. package/src/api/types/AgentTagUpdateParams.d.ts +12 -0
  61. package/src/api/types/AgentTagUpdateParams.js +5 -0
  62. package/src/api/types/CoherenceCheckKindDto.d.ts +1 -1
  63. package/src/api/types/CompositionModeDto.d.ts +19 -0
  64. package/src/api/types/CompositionModeDto.js +12 -0
  65. package/src/api/types/ConnectionPropositionKindDto.d.ts +1 -1
  66. package/src/api/types/ContextVariable.d.ts +3 -5
  67. package/src/api/types/ContextVariableTagsUpdateParams.d.ts +12 -0
  68. package/src/api/types/ContextVariableTagsUpdateParams.js +5 -0
  69. package/src/api/types/Customer.d.ts +1 -1
  70. package/src/api/types/EvaluationCreationParams.d.ts +12 -0
  71. package/src/api/types/EvaluationCreationParams.js +5 -0
  72. package/src/api/types/EvaluationStatusDto.d.ts +1 -1
  73. package/src/api/types/EventKindDto.d.ts +1 -1
  74. package/src/api/types/EventSourceDto.d.ts +1 -1
  75. package/src/api/types/Guideline.d.ts +7 -1
  76. package/src/api/types/{GuidelineProposition.d.ts → GuidelineMatch.d.ts} +2 -2
  77. package/src/api/types/GuidelineMatch.js +5 -0
  78. package/src/api/types/{GuidelinePropositionInspection.d.ts → GuidelineMatchingInspection.d.ts} +3 -3
  79. package/src/api/types/GuidelineMatchingInspection.js +5 -0
  80. package/src/api/types/GuidelineMetadataUpdateParams.d.ts +12 -0
  81. package/src/api/types/GuidelineMetadataUpdateParams.js +5 -0
  82. package/src/api/types/GuidelinePayloadOperationDto.d.ts +1 -1
  83. package/src/api/types/GuidelineRelationshipKindDto.d.ts +11 -0
  84. package/src/api/types/GuidelineRelationshipKindDto.js +10 -0
  85. package/src/api/types/GuidelineTagsUpdateParams.d.ts +12 -0
  86. package/src/api/types/GuidelineTagsUpdateParams.js +5 -0
  87. package/src/api/types/GuidelineWithRelationshipsAndToolAssociations.d.ts +12 -0
  88. package/src/api/types/GuidelineWithRelationshipsAndToolAssociations.js +5 -0
  89. package/src/api/types/LegacyContextVariable.d.ts +22 -0
  90. package/src/api/types/LegacyContextVariable.js +5 -0
  91. package/src/api/types/LegacyContextVariableCreationParams.d.ts +16 -0
  92. package/src/api/types/LegacyContextVariableCreationParams.js +5 -0
  93. package/src/api/types/LegacyContextVariableReadResult.d.ts +12 -0
  94. package/src/api/types/LegacyContextVariableReadResult.js +5 -0
  95. package/src/api/types/LegacyContextVariableUpdateParams.d.ts +16 -0
  96. package/src/api/types/LegacyContextVariableUpdateParams.js +5 -0
  97. package/src/api/types/LegacyGuideline.d.ts +16 -0
  98. package/src/api/types/LegacyGuideline.js +5 -0
  99. package/src/api/types/{GuidelineConnection.d.ts → LegacyGuidelineConnection.d.ts} +4 -4
  100. package/src/api/types/LegacyGuidelineConnection.js +5 -0
  101. package/src/api/types/{GuidelineConnectionAddition.d.ts → LegacyGuidelineConnectionAddition.d.ts} +1 -1
  102. package/src/api/types/LegacyGuidelineConnectionAddition.js +5 -0
  103. package/src/api/types/{GuidelineConnectionUpdateParams.d.ts → LegacyGuidelineConnectionUpdateParams.d.ts} +3 -3
  104. package/src/api/types/LegacyGuidelineConnectionUpdateParams.js +5 -0
  105. package/src/api/types/LegacyGuidelineCreationParams.d.ts +10 -0
  106. package/src/api/types/LegacyGuidelineCreationParams.js +5 -0
  107. package/src/api/types/{GuidelineCreationResult.d.ts → LegacyGuidelineCreationResult.d.ts} +2 -2
  108. package/src/api/types/LegacyGuidelineCreationResult.js +5 -0
  109. package/src/api/types/LegacyGuidelineUpdateParams.d.ts +12 -0
  110. package/src/api/types/LegacyGuidelineUpdateParams.js +5 -0
  111. package/src/api/types/{GuidelineWithConnectionsAndToolAssociations.d.ts → LegacyGuidelineWithConnectionsAndToolAssociations.d.ts} +3 -3
  112. package/src/api/types/LegacyGuidelineWithConnectionsAndToolAssociations.js +5 -0
  113. package/src/api/types/LegacyTerm.d.ts +18 -0
  114. package/src/api/types/LegacyTerm.js +5 -0
  115. package/src/api/types/LegacyTermCreationParams.d.ts +16 -0
  116. package/src/api/types/LegacyTermCreationParams.js +5 -0
  117. package/src/api/types/LegacyTermUpdateParams.d.ts +16 -0
  118. package/src/api/types/LegacyTermUpdateParams.js +5 -0
  119. package/src/api/types/MessageGenerationInspection.d.ts +0 -1
  120. package/src/api/types/Moderation.d.ts +1 -1
  121. package/src/api/types/OpenApiServiceParams.d.ts +2 -2
  122. package/src/api/types/PayloadKindDto.d.ts +1 -1
  123. package/src/api/types/PreparationIteration.d.ts +3 -3
  124. package/src/api/types/PreparationIterationGenerations.d.ts +1 -1
  125. package/src/api/types/PreparationIterationTerm.d.ts +16 -0
  126. package/src/api/types/PreparationIterationTerm.js +5 -0
  127. package/src/api/types/Relationship.d.ts +21 -0
  128. package/src/api/types/Relationship.js +5 -0
  129. package/src/api/types/Tag.d.ts +0 -2
  130. package/src/api/types/Term.d.ts +2 -0
  131. package/src/api/types/TermTagsUpdateParams.d.ts +12 -0
  132. package/src/api/types/TermTagsUpdateParams.js +5 -0
  133. package/src/api/types/ToolParameterDtoEnumItem.d.ts +1 -1
  134. package/src/api/types/ToolParameterTypeDto.d.ts +1 -1
  135. package/src/api/types/ToolServiceKindDto.d.ts +5 -5
  136. package/src/api/types/Utterance.d.ts +16 -0
  137. package/src/api/types/Utterance.js +5 -0
  138. package/src/api/types/UtteranceField.d.ts +10 -0
  139. package/src/api/types/UtteranceField.js +5 -0
  140. package/src/api/types/UtteranceReasonDto.d.ts +1 -1
  141. package/src/api/types/UtteranceTagUpdateParams.d.ts +15 -0
  142. package/src/api/types/UtteranceTagUpdateParams.js +5 -0
  143. package/src/api/types/ValidationErrorLocItem.d.ts +1 -1
  144. package/src/api/types/index.d.ts +31 -7
  145. package/src/api/types/index.js +31 -7
  146. package/src/core/fetcher/APIResponse.d.ts +1 -1
  147. package/src/core/fetcher/Fetcher.d.ts +2 -2
  148. package/src/core/fetcher/Fetcher.js +6 -5
  149. package/src/core/fetcher/Supplier.d.ts +1 -1
  150. package/src/core/fetcher/createRequestUrl.d.ts +1 -1
  151. package/src/core/fetcher/createRequestUrl.js +1 -2
  152. package/src/core/fetcher/getFetchFn.js +18 -9
  153. package/src/core/fetcher/getHeader.js +1 -2
  154. package/src/core/fetcher/getRequestBody.js +5 -5
  155. package/src/core/fetcher/getResponseBody.js +1 -2
  156. package/src/core/fetcher/makeRequest.d.ts +1 -1
  157. package/src/core/fetcher/requestWithRetries.js +4 -5
  158. package/src/core/fetcher/signals.d.ts +0 -1
  159. package/src/core/fetcher/signals.js +2 -3
  160. package/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -1
  161. package/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
  162. package/src/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
  163. package/src/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
  164. package/src/core/fetcher/stream-wrappers/chooseStreamWrapper.js +18 -9
  165. package/src/core/index.js +17 -7
  166. package/src/core/json.d.ts +15 -0
  167. package/src/core/json.js +24 -0
  168. package/src/core/runtime/runtime.d.ts +1 -1
  169. package/src/core/runtime/runtime.js +51 -41
  170. package/src/core/schemas/Schema.d.ts +7 -5
  171. package/src/core/schemas/Schema.js +2 -0
  172. package/src/core/schemas/builders/bigint/bigint.d.ts +1 -1
  173. package/src/core/schemas/builders/bigint/bigint.js +22 -19
  174. package/src/core/schemas/builders/date/date.js +1 -2
  175. package/src/core/schemas/builders/enum/enum.js +1 -2
  176. package/src/core/schemas/builders/lazy/lazy.d.ts +1 -1
  177. package/src/core/schemas/builders/lazy/lazy.js +3 -4
  178. package/src/core/schemas/builders/lazy/lazyObject.js +1 -2
  179. package/src/core/schemas/builders/list/list.js +1 -2
  180. package/src/core/schemas/builders/literals/booleanLiteral.js +1 -2
  181. package/src/core/schemas/builders/literals/stringLiteral.js +1 -2
  182. package/src/core/schemas/builders/object/object.d.ts +1 -1
  183. package/src/core/schemas/builders/object/object.js +31 -3
  184. package/src/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
  185. package/src/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
  186. package/src/core/schemas/builders/object/property.js +2 -3
  187. package/src/core/schemas/builders/object/types.d.ts +16 -11
  188. package/src/core/schemas/builders/object-like/getObjectLikeUtils.js +2 -3
  189. package/src/core/schemas/builders/object-like/types.d.ts +1 -1
  190. package/src/core/schemas/builders/record/record.js +2 -4
  191. package/src/core/schemas/builders/record/types.d.ts +2 -2
  192. package/src/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
  193. package/src/core/schemas/builders/schema-utils/getSchemaUtils.js +67 -4
  194. package/src/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
  195. package/src/core/schemas/builders/set/set.js +1 -2
  196. package/src/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
  197. package/src/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +1 -2
  198. package/src/core/schemas/builders/union/discriminant.js +1 -2
  199. package/src/core/schemas/builders/union/types.d.ts +6 -6
  200. package/src/core/schemas/builders/union/union.d.ts +1 -1
  201. package/src/core/schemas/builders/union/union.js +1 -2
  202. package/src/core/schemas/utils/MaybePromise.d.ts +1 -1
  203. package/src/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +4 -4
  204. package/src/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
  205. package/src/core/schemas/utils/entries.d.ts +1 -1
  206. package/src/core/schemas/utils/entries.js +1 -2
  207. package/src/core/schemas/utils/filterObject.d.ts +1 -1
  208. package/src/core/schemas/utils/filterObject.js +1 -2
  209. package/src/core/schemas/utils/getErrorMessageForIncorrectType.js +1 -2
  210. package/src/core/schemas/utils/isPlainObject.js +1 -2
  211. package/src/core/schemas/utils/keys.d.ts +1 -1
  212. package/src/core/schemas/utils/keys.js +1 -2
  213. package/src/core/schemas/utils/maybeSkipValidation.js +1 -2
  214. package/src/core/schemas/utils/partition.js +1 -2
  215. package/src/errors/ParlantError.js +2 -1
  216. package/src/errors/ParlantTimeoutError.d.ts +1 -1
  217. package/src/errors/ParlantTimeoutError.js +2 -2
  218. package/src/index.d.ts +1 -0
  219. package/src/index.js +19 -8
  220. package/src/serialization/resources/agents/client/index.js +17 -7
  221. package/src/serialization/resources/agents/client/list.js +17 -7
  222. package/src/serialization/resources/agents/client/requests/AgentCreationParams.d.ts +3 -0
  223. package/src/serialization/resources/agents/client/requests/AgentCreationParams.js +20 -7
  224. package/src/serialization/resources/agents/client/requests/AgentUpdateParams.d.ts +4 -0
  225. package/src/serialization/resources/agents/client/requests/AgentUpdateParams.js +21 -7
  226. package/src/serialization/resources/contextVariables/client/index.js +17 -7
  227. package/src/serialization/resources/contextVariables/client/list.js +17 -7
  228. package/src/serialization/resources/contextVariables/client/requests/ContextVariableCreationParams.d.ts +1 -0
  229. package/src/serialization/resources/contextVariables/client/requests/ContextVariableCreationParams.js +18 -7
  230. package/src/serialization/resources/contextVariables/client/requests/ContextVariableUpdateParams.d.ts +2 -0
  231. package/src/serialization/resources/contextVariables/client/requests/ContextVariableUpdateParams.js +19 -7
  232. package/src/serialization/resources/contextVariables/client/requests/ContextVariableValueUpdateParams.js +17 -7
  233. package/src/serialization/resources/customers/client/index.js +17 -7
  234. package/src/serialization/resources/customers/client/list.js +17 -7
  235. package/src/serialization/resources/customers/client/requests/CustomerCreationParams.d.ts +1 -0
  236. package/src/serialization/resources/customers/client/requests/CustomerCreationParams.js +18 -7
  237. package/src/serialization/resources/customers/client/requests/CustomerUpdateParams.js +17 -7
  238. package/src/serialization/resources/glossary/client/index.js +17 -7
  239. package/src/serialization/resources/glossary/client/listTerms.js +17 -7
  240. package/src/serialization/resources/glossary/client/requests/TermCreationParams.d.ts +1 -0
  241. package/src/serialization/resources/glossary/client/requests/TermCreationParams.js +18 -7
  242. package/src/serialization/resources/glossary/client/requests/TermUpdateParams.d.ts +2 -0
  243. package/src/serialization/resources/glossary/client/requests/TermUpdateParams.js +19 -7
  244. package/src/serialization/resources/guidelines/client/index.js +17 -7
  245. package/src/serialization/resources/guidelines/client/list.js +17 -7
  246. package/src/serialization/resources/guidelines/client/requests/GuidelineCreationParams.d.ts +5 -2
  247. package/src/serialization/resources/guidelines/client/requests/GuidelineCreationParams.js +22 -9
  248. package/src/serialization/resources/guidelines/client/requests/GuidelineUpdateParams.d.ts +7 -2
  249. package/src/serialization/resources/guidelines/client/requests/GuidelineUpdateParams.js +24 -9
  250. package/src/serialization/resources/index.d.ts +10 -8
  251. package/src/serialization/resources/index.js +28 -16
  252. package/src/serialization/resources/relationships/client/index.d.ts +2 -0
  253. package/src/serialization/resources/relationships/client/index.js +41 -0
  254. package/src/serialization/resources/relationships/client/list.d.ts +11 -0
  255. package/src/serialization/resources/relationships/client/list.js +42 -0
  256. package/src/serialization/resources/relationships/client/requests/RelationshipCreationParams.d.ts +17 -0
  257. package/src/serialization/resources/relationships/client/requests/RelationshipCreationParams.js +48 -0
  258. package/src/serialization/resources/relationships/client/requests/index.d.ts +1 -0
  259. package/src/serialization/resources/relationships/client/requests/index.js +5 -0
  260. package/src/serialization/resources/relationships/index.d.ts +1 -0
  261. package/src/serialization/resources/relationships/index.js +17 -0
  262. package/src/serialization/resources/services/client/index.js +17 -7
  263. package/src/serialization/resources/services/client/list.js +17 -7
  264. package/src/serialization/resources/services/client/requests/ServiceUpdateParams.js +17 -7
  265. package/src/serialization/resources/sessions/client/index.js +17 -7
  266. package/src/serialization/resources/sessions/client/list.js +17 -7
  267. package/src/serialization/resources/sessions/client/listEvents.js +17 -7
  268. package/src/serialization/resources/sessions/client/requests/EventCreationParams.js +17 -7
  269. package/src/serialization/resources/sessions/client/requests/SessionCreationParams.js +17 -7
  270. package/src/serialization/resources/sessions/client/requests/SessionUpdateParams.js +17 -7
  271. package/src/serialization/resources/tags/client/index.js +17 -7
  272. package/src/serialization/resources/tags/client/list.js +17 -7
  273. package/src/serialization/resources/tags/client/requests/TagCreationParams.js +17 -7
  274. package/src/serialization/resources/tags/client/requests/TagUpdateParams.js +17 -7
  275. package/src/serialization/resources/utterances/client/index.d.ts +2 -0
  276. package/src/serialization/resources/utterances/client/index.js +41 -0
  277. package/src/serialization/resources/utterances/client/list.d.ts +11 -0
  278. package/src/serialization/resources/utterances/client/list.js +42 -0
  279. package/src/serialization/resources/utterances/client/requests/UtteranceCreationParams.d.ts +15 -0
  280. package/src/serialization/resources/utterances/client/requests/UtteranceCreationParams.js +46 -0
  281. package/src/serialization/resources/utterances/client/requests/UtteranceUpdateParams.d.ts +16 -0
  282. package/src/serialization/resources/utterances/client/requests/UtteranceUpdateParams.js +47 -0
  283. package/src/serialization/resources/utterances/client/requests/index.d.ts +2 -0
  284. package/src/serialization/resources/utterances/client/requests/index.js +7 -0
  285. package/src/serialization/resources/utterances/index.d.ts +1 -0
  286. package/src/serialization/resources/utterances/index.js +17 -0
  287. package/src/serialization/types/Agent.d.ts +4 -2
  288. package/src/serialization/types/Agent.js +21 -9
  289. package/src/serialization/types/AgentTagUpdateParams.d.ts +13 -0
  290. package/src/serialization/types/{GuidelineConnectionUpdateParams.js → AgentTagUpdateParams.js} +20 -11
  291. package/src/serialization/types/CoherenceCheck.js +17 -7
  292. package/src/serialization/types/CoherenceCheckKindDto.js +17 -7
  293. package/src/serialization/types/CompositionModeDto.d.ts +10 -0
  294. package/src/serialization/types/{GuidelineConnection.js → CompositionModeDto.js} +19 -15
  295. package/src/serialization/types/ConnectionProposition.js +17 -7
  296. package/src/serialization/types/ConnectionPropositionKindDto.js +17 -7
  297. package/src/serialization/types/ConsumptionOffsets.js +17 -7
  298. package/src/serialization/types/ConsumptionOffsetsUpdateParams.js +17 -7
  299. package/src/serialization/types/ContextVariable.d.ts +1 -0
  300. package/src/serialization/types/ContextVariable.js +18 -7
  301. package/src/serialization/types/ContextVariableAndValue.js +17 -7
  302. package/src/serialization/types/ContextVariableReadResult.js +17 -7
  303. package/src/serialization/types/ContextVariableTagsUpdateParams.d.ts +13 -0
  304. package/src/serialization/types/ContextVariableTagsUpdateParams.js +44 -0
  305. package/src/serialization/types/ContextVariableValue.js +17 -7
  306. package/src/serialization/types/Customer.js +17 -7
  307. package/src/serialization/types/CustomerExtraUpdateParams.js +17 -7
  308. package/src/serialization/types/CustomerTagUpdateParams.js +17 -7
  309. package/src/serialization/types/Evaluation.js +17 -7
  310. package/src/serialization/types/EvaluationCreationParams.d.ts +14 -0
  311. package/src/serialization/{resources/evaluations/client/requests → types}/EvaluationCreationParams.js +19 -9
  312. package/src/serialization/types/EvaluationStatusDto.js +17 -7
  313. package/src/serialization/types/Event.js +17 -7
  314. package/src/serialization/types/EventInspectionResult.js +17 -7
  315. package/src/serialization/types/EventKindDto.js +17 -7
  316. package/src/serialization/types/EventSourceDto.js +17 -7
  317. package/src/serialization/types/EventTrace.js +17 -7
  318. package/src/serialization/types/GenerationInfo.js +17 -7
  319. package/src/serialization/types/Guideline.d.ts +3 -0
  320. package/src/serialization/types/Guideline.js +20 -7
  321. package/src/serialization/types/GuidelineContent.js +17 -7
  322. package/src/serialization/types/GuidelineInvoiceData.js +17 -7
  323. package/src/serialization/types/{GuidelineProposition.d.ts → GuidelineMatch.d.ts} +2 -2
  324. package/src/serialization/types/{GuidelineProposition.js → GuidelineMatch.js} +19 -9
  325. package/src/serialization/types/{GuidelinePropositionInspection.d.ts → GuidelineMatchingInspection.d.ts} +2 -2
  326. package/src/serialization/types/{GuidelinePropositionInspection.js → GuidelineMatchingInspection.js} +19 -9
  327. package/src/serialization/types/GuidelineMetadataUpdateParams.d.ts +13 -0
  328. package/src/serialization/types/GuidelineMetadataUpdateParams.js +44 -0
  329. package/src/serialization/types/GuidelinePayload.js +17 -7
  330. package/src/serialization/types/GuidelinePayloadOperationDto.js +17 -7
  331. package/src/serialization/types/GuidelineRelationshipKindDto.d.ts +10 -0
  332. package/src/serialization/types/{GuidelineCreationResult.js → GuidelineRelationshipKindDto.js} +19 -12
  333. package/src/serialization/types/GuidelineTagsUpdateParams.d.ts +13 -0
  334. package/src/serialization/types/GuidelineTagsUpdateParams.js +44 -0
  335. package/src/serialization/types/GuidelineToolAssociation.js +17 -7
  336. package/src/serialization/types/GuidelineToolAssociationUpdateParams.js +17 -7
  337. package/src/serialization/types/{GuidelineWithConnectionsAndToolAssociations.d.ts → GuidelineWithRelationshipsAndToolAssociations.d.ts} +4 -4
  338. package/src/serialization/types/{GuidelineWithConnectionsAndToolAssociations.js → GuidelineWithRelationshipsAndToolAssociations.js} +21 -11
  339. package/src/serialization/types/HttpValidationError.js +17 -7
  340. package/src/serialization/types/Invoice.js +17 -7
  341. package/src/serialization/types/InvoiceData.js +17 -7
  342. package/src/serialization/types/LegacyContextVariable.d.ts +17 -0
  343. package/src/serialization/types/LegacyContextVariable.js +48 -0
  344. package/src/serialization/types/LegacyContextVariableCreationParams.d.ts +16 -0
  345. package/src/serialization/types/LegacyContextVariableCreationParams.js +47 -0
  346. package/src/serialization/types/LegacyContextVariableReadResult.d.ts +15 -0
  347. package/src/serialization/types/LegacyContextVariableReadResult.js +46 -0
  348. package/src/serialization/types/LegacyContextVariableUpdateParams.d.ts +16 -0
  349. package/src/serialization/types/LegacyContextVariableUpdateParams.js +47 -0
  350. package/src/serialization/types/LegacyGuideline.d.ts +15 -0
  351. package/src/serialization/types/LegacyGuideline.js +46 -0
  352. package/src/serialization/types/LegacyGuidelineConnection.d.ts +16 -0
  353. package/src/serialization/types/LegacyGuidelineConnection.js +47 -0
  354. package/src/serialization/types/{GuidelineConnectionAddition.d.ts → LegacyGuidelineConnectionAddition.d.ts} +2 -2
  355. package/src/serialization/types/{GuidelineConnectionAddition.js → LegacyGuidelineConnectionAddition.js} +19 -9
  356. package/src/serialization/types/LegacyGuidelineConnectionUpdateParams.d.ts +14 -0
  357. package/src/serialization/types/LegacyGuidelineConnectionUpdateParams.js +45 -0
  358. package/src/serialization/types/LegacyGuidelineCreationParams.d.ts +13 -0
  359. package/src/serialization/types/LegacyGuidelineCreationParams.js +44 -0
  360. package/src/serialization/types/LegacyGuidelineCreationResult.d.ts +13 -0
  361. package/src/serialization/types/LegacyGuidelineCreationResult.js +44 -0
  362. package/src/serialization/types/LegacyGuidelineUpdateParams.d.ts +16 -0
  363. package/src/serialization/types/LegacyGuidelineUpdateParams.js +47 -0
  364. package/src/serialization/types/LegacyGuidelineWithConnectionsAndToolAssociations.d.ts +17 -0
  365. package/src/serialization/types/LegacyGuidelineWithConnectionsAndToolAssociations.js +48 -0
  366. package/src/serialization/types/LegacyTerm.d.ts +15 -0
  367. package/src/serialization/types/LegacyTerm.js +46 -0
  368. package/src/serialization/types/LegacyTermCreationParams.d.ts +14 -0
  369. package/src/serialization/types/LegacyTermCreationParams.js +45 -0
  370. package/src/serialization/types/LegacyTermUpdateParams.d.ts +14 -0
  371. package/src/serialization/types/LegacyTermUpdateParams.js +45 -0
  372. package/src/serialization/types/MessageGenerationInspection.js +17 -7
  373. package/src/serialization/types/Moderation.js +17 -7
  374. package/src/serialization/types/OpenApiServiceParams.js +17 -7
  375. package/src/serialization/types/Payload.js +17 -7
  376. package/src/serialization/types/PayloadKindDto.js +17 -7
  377. package/src/serialization/types/PreparationIteration.d.ts +4 -4
  378. package/src/serialization/types/PreparationIteration.js +21 -11
  379. package/src/serialization/types/PreparationIterationGenerations.d.ts +2 -2
  380. package/src/serialization/types/PreparationIterationGenerations.js +19 -9
  381. package/src/serialization/types/PreparationIterationTerm.d.ts +15 -0
  382. package/src/serialization/types/PreparationIterationTerm.js +46 -0
  383. package/src/serialization/types/Relationship.d.ts +21 -0
  384. package/src/serialization/types/Relationship.js +52 -0
  385. package/src/serialization/types/SdkServiceParams.js +17 -7
  386. package/src/serialization/types/Service.js +17 -7
  387. package/src/serialization/types/Session.js +17 -7
  388. package/src/serialization/types/Tag.d.ts +0 -1
  389. package/src/serialization/types/Tag.js +17 -8
  390. package/src/serialization/types/Term.d.ts +1 -0
  391. package/src/serialization/types/Term.js +18 -7
  392. package/src/serialization/types/TermTagsUpdateParams.d.ts +13 -0
  393. package/src/serialization/types/TermTagsUpdateParams.js +44 -0
  394. package/src/serialization/types/Tool.js +17 -7
  395. package/src/serialization/types/ToolCall.js +17 -7
  396. package/src/serialization/types/ToolId.js +17 -7
  397. package/src/serialization/types/ToolParameter.js +17 -7
  398. package/src/serialization/types/ToolParameterDtoEnumItem.js +17 -7
  399. package/src/serialization/types/ToolParameterTypeDto.js +17 -7
  400. package/src/serialization/types/ToolResult.js +17 -7
  401. package/src/serialization/types/ToolServiceKindDto.js +17 -7
  402. package/src/serialization/types/UsageInfo.js +17 -7
  403. package/src/serialization/types/Utterance.d.ts +17 -0
  404. package/src/serialization/types/Utterance.js +48 -0
  405. package/src/serialization/types/UtteranceField.d.ts +14 -0
  406. package/src/serialization/types/UtteranceField.js +45 -0
  407. package/src/serialization/types/UtteranceReasonDto.js +17 -7
  408. package/src/serialization/types/UtteranceRequest.js +17 -7
  409. package/src/serialization/types/UtteranceTagUpdateParams.d.ts +13 -0
  410. package/src/serialization/types/UtteranceTagUpdateParams.js +44 -0
  411. package/src/serialization/types/ValidationError.js +17 -7
  412. package/src/serialization/types/ValidationErrorLocItem.js +17 -7
  413. package/src/serialization/types/index.d.ts +31 -7
  414. package/src/serialization/types/index.js +31 -7
  415. package/src/api/resources/evaluations/client/Client.d.ts +0 -79
  416. package/src/api/resources/evaluations/client/Client.js +0 -218
  417. package/src/api/resources/evaluations/client/requests/EvaluationCreationParams.d.ts +0 -27
  418. package/src/api/resources/evaluations/client/requests/EvaluationsRetrieveRequest.d.ts +0 -13
  419. package/src/api/resources/evaluations/client/requests/index.d.ts +0 -2
  420. package/src/serialization/resources/evaluations/client/requests/EvaluationCreationParams.d.ts +0 -14
  421. package/src/serialization/resources/evaluations/client/requests/index.d.ts +0 -1
  422. package/src/serialization/resources/evaluations/client/requests/index.js +0 -5
  423. package/src/serialization/types/GuidelineConnection.d.ts +0 -16
  424. package/src/serialization/types/GuidelineConnectionUpdateParams.d.ts +0 -14
  425. package/src/serialization/types/GuidelineCreationResult.d.ts +0 -13
  426. /package/src/api/resources/{evaluations/client/requests/EvaluationCreationParams.js → contextVariables/client/requests/ContextVariablesDeleteManyRequest.js} +0 -0
  427. /package/src/api/resources/{evaluations/client/requests/EvaluationsRetrieveRequest.js → contextVariables/client/requests/ContextVariablesListRequest.js} +0 -0
  428. /package/src/api/{types/GuidelineConnection.js → resources/glossary/client/requests/GlossaryListTermsRequest.js} +0 -0
  429. /package/src/api/{types/GuidelineConnectionAddition.js → resources/guidelines/client/requests/GuidelinesListRequest.js} +0 -0
  430. /package/src/api/resources/{evaluations → relationships}/client/index.d.ts +0 -0
  431. /package/src/api/resources/{evaluations → relationships}/client/index.js +0 -0
  432. /package/src/api/{types/GuidelineConnectionUpdateParams.js → resources/relationships/client/requests/RelationshipCreationParams.js} +0 -0
  433. /package/src/api/{types/GuidelineCreationResult.js → resources/relationships/client/requests/RelationshipsListRequest.js} +0 -0
  434. /package/src/api/resources/{evaluations → relationships}/client/requests/index.js +0 -0
  435. /package/src/api/resources/{evaluations → relationships}/index.d.ts +0 -0
  436. /package/src/api/resources/{evaluations → relationships}/index.js +0 -0
  437. /package/src/{serialization/resources/evaluations → api/resources/utterances}/client/index.d.ts +0 -0
  438. /package/src/{serialization/resources/evaluations → api/resources/utterances}/client/index.js +0 -0
  439. /package/src/api/{types/GuidelineProposition.js → resources/utterances/client/requests/UtteranceCreationParams.js} +0 -0
  440. /package/src/api/{types/GuidelinePropositionInspection.js → resources/utterances/client/requests/UtteranceUpdateParams.js} +0 -0
  441. /package/src/api/{types/GuidelineWithConnectionsAndToolAssociations.js → resources/utterances/client/requests/UtterancesListRequest.js} +0 -0
  442. /package/src/{serialization/resources/evaluations → api/resources/utterances}/index.d.ts +0 -0
  443. /package/src/{serialization/resources/evaluations → api/resources/utterances}/index.js +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "parlant-client",
3
- "version": "0.10.0",
3
+ "version": "1.0.0",
4
4
  "main": "src/index.js",
5
5
  "types": "src/index.d.ts",
6
6
  "files": [
package/src/Client.d.ts CHANGED
@@ -3,17 +3,20 @@
3
3
  */
4
4
  import * as core from "./core";
5
5
  import { Agents } from "./api/resources/agents/client/Client";
6
- import { Guidelines } from "./api/resources/guidelines/client/Client";
7
- import { Glossary } from "./api/resources/glossary/client/Client";
8
- import { ContextVariables } from "./api/resources/contextVariables/client/Client";
9
6
  import { Sessions } from "./api/resources/sessions/client/Client";
10
- import { Evaluations } from "./api/resources/evaluations/client/Client";
11
7
  import { Services } from "./api/resources/services/client/Client";
12
8
  import { Tags } from "./api/resources/tags/client/Client";
9
+ import { Glossary } from "./api/resources/glossary/client/Client";
13
10
  import { Customers } from "./api/resources/customers/client/Client";
11
+ import { Utterances } from "./api/resources/utterances/client/Client";
12
+ import { ContextVariables } from "./api/resources/contextVariables/client/Client";
13
+ import { Guidelines } from "./api/resources/guidelines/client/Client";
14
+ import { Relationships } from "./api/resources/relationships/client/Client";
14
15
  export declare namespace ParlantClient {
15
16
  interface Options {
16
17
  environment: core.Supplier<string>;
18
+ /** Specify a custom URL to connect the client to. */
19
+ baseUrl?: core.Supplier<string>;
17
20
  }
18
21
  interface RequestOptions {
19
22
  /** The maximum time to wait for a response in seconds. */
@@ -22,27 +25,31 @@ export declare namespace ParlantClient {
22
25
  maxRetries?: number;
23
26
  /** A hook to abort the request. */
24
27
  abortSignal?: AbortSignal;
28
+ /** Additional headers to include in the request. */
29
+ headers?: Record<string, string>;
25
30
  }
26
31
  }
27
32
  export declare class ParlantClient {
28
33
  protected readonly _options: ParlantClient.Options;
29
- constructor(_options: ParlantClient.Options);
30
34
  protected _agents: Agents | undefined;
31
- get agents(): Agents;
32
- protected _guidelines: Guidelines | undefined;
33
- get guidelines(): Guidelines;
35
+ protected _sessions: Sessions | undefined;
36
+ protected _services: Services | undefined;
37
+ protected _tags: Tags | undefined;
34
38
  protected _glossary: Glossary | undefined;
35
- get glossary(): Glossary;
39
+ protected _customers: Customers | undefined;
40
+ protected _utterances: Utterances | undefined;
36
41
  protected _contextVariables: ContextVariables | undefined;
37
- get contextVariables(): ContextVariables;
38
- protected _sessions: Sessions | undefined;
42
+ protected _guidelines: Guidelines | undefined;
43
+ protected _relationships: Relationships | undefined;
44
+ constructor(_options: ParlantClient.Options);
45
+ get agents(): Agents;
39
46
  get sessions(): Sessions;
40
- protected _evaluations: Evaluations | undefined;
41
- get evaluations(): Evaluations;
42
- protected _services: Services | undefined;
43
47
  get services(): Services;
44
- protected _tags: Tags | undefined;
45
48
  get tags(): Tags;
46
- protected _customers: Customers | undefined;
49
+ get glossary(): Glossary;
47
50
  get customers(): Customers;
51
+ get utterances(): Utterances;
52
+ get contextVariables(): ContextVariables;
53
+ get guidelines(): Guidelines;
54
+ get relationships(): Relationships;
48
55
  }
package/src/Client.js CHANGED
@@ -5,14 +5,15 @@
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ParlantClient = void 0;
7
7
  const Client_1 = require("./api/resources/agents/client/Client");
8
- const Client_2 = require("./api/resources/guidelines/client/Client");
9
- const Client_3 = require("./api/resources/glossary/client/Client");
10
- const Client_4 = require("./api/resources/contextVariables/client/Client");
11
- const Client_5 = require("./api/resources/sessions/client/Client");
12
- const Client_6 = require("./api/resources/evaluations/client/Client");
13
- const Client_7 = require("./api/resources/services/client/Client");
14
- const Client_8 = require("./api/resources/tags/client/Client");
15
- const Client_9 = require("./api/resources/customers/client/Client");
8
+ const Client_2 = require("./api/resources/sessions/client/Client");
9
+ const Client_3 = require("./api/resources/services/client/Client");
10
+ const Client_4 = require("./api/resources/tags/client/Client");
11
+ const Client_5 = require("./api/resources/glossary/client/Client");
12
+ const Client_6 = require("./api/resources/customers/client/Client");
13
+ const Client_7 = require("./api/resources/utterances/client/Client");
14
+ const Client_8 = require("./api/resources/contextVariables/client/Client");
15
+ const Client_9 = require("./api/resources/guidelines/client/Client");
16
+ const Client_10 = require("./api/resources/relationships/client/Client");
16
17
  class ParlantClient {
17
18
  constructor(_options) {
18
19
  this._options = _options;
@@ -21,37 +22,41 @@ class ParlantClient {
21
22
  var _a;
22
23
  return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new Client_1.Agents(this._options)));
23
24
  }
24
- get guidelines() {
25
+ get sessions() {
25
26
  var _a;
26
- return ((_a = this._guidelines) !== null && _a !== void 0 ? _a : (this._guidelines = new Client_2.Guidelines(this._options)));
27
+ return ((_a = this._sessions) !== null && _a !== void 0 ? _a : (this._sessions = new Client_2.Sessions(this._options)));
27
28
  }
28
- get glossary() {
29
+ get services() {
29
30
  var _a;
30
- return ((_a = this._glossary) !== null && _a !== void 0 ? _a : (this._glossary = new Client_3.Glossary(this._options)));
31
+ return ((_a = this._services) !== null && _a !== void 0 ? _a : (this._services = new Client_3.Services(this._options)));
31
32
  }
32
- get contextVariables() {
33
+ get tags() {
33
34
  var _a;
34
- return ((_a = this._contextVariables) !== null && _a !== void 0 ? _a : (this._contextVariables = new Client_4.ContextVariables(this._options)));
35
+ return ((_a = this._tags) !== null && _a !== void 0 ? _a : (this._tags = new Client_4.Tags(this._options)));
35
36
  }
36
- get sessions() {
37
+ get glossary() {
37
38
  var _a;
38
- return ((_a = this._sessions) !== null && _a !== void 0 ? _a : (this._sessions = new Client_5.Sessions(this._options)));
39
+ return ((_a = this._glossary) !== null && _a !== void 0 ? _a : (this._glossary = new Client_5.Glossary(this._options)));
39
40
  }
40
- get evaluations() {
41
+ get customers() {
41
42
  var _a;
42
- return ((_a = this._evaluations) !== null && _a !== void 0 ? _a : (this._evaluations = new Client_6.Evaluations(this._options)));
43
+ return ((_a = this._customers) !== null && _a !== void 0 ? _a : (this._customers = new Client_6.Customers(this._options)));
43
44
  }
44
- get services() {
45
+ get utterances() {
45
46
  var _a;
46
- return ((_a = this._services) !== null && _a !== void 0 ? _a : (this._services = new Client_7.Services(this._options)));
47
+ return ((_a = this._utterances) !== null && _a !== void 0 ? _a : (this._utterances = new Client_7.Utterances(this._options)));
47
48
  }
48
- get tags() {
49
+ get contextVariables() {
49
50
  var _a;
50
- return ((_a = this._tags) !== null && _a !== void 0 ? _a : (this._tags = new Client_8.Tags(this._options)));
51
+ return ((_a = this._contextVariables) !== null && _a !== void 0 ? _a : (this._contextVariables = new Client_8.ContextVariables(this._options)));
51
52
  }
52
- get customers() {
53
+ get guidelines() {
54
+ var _a;
55
+ return ((_a = this._guidelines) !== null && _a !== void 0 ? _a : (this._guidelines = new Client_9.Guidelines(this._options)));
56
+ }
57
+ get relationships() {
53
58
  var _a;
54
- return ((_a = this._customers) !== null && _a !== void 0 ? _a : (this._customers = new Client_9.Customers(this._options)));
59
+ return ((_a = this._relationships) !== null && _a !== void 0 ? _a : (this._relationships = new Client_10.Relationships(this._options)));
55
60
  }
56
61
  }
57
62
  exports.ParlantClient = ParlantClient;
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
20
  });
21
- var __importStar = (this && this.__importStar) || function (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
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  exports.GatewayTimeoutError = void 0;
30
40
  const errors = __importStar(require("../../errors/index"));
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
20
  });
21
- var __importStar = (this && this.__importStar) || function (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
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  exports.NotFoundError = void 0;
30
40
  const errors = __importStar(require("../../errors/index"));
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
20
  });
21
- var __importStar = (this && this.__importStar) || function (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
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  exports.ServiceUnavailableError = void 0;
30
40
  const errors = __importStar(require("../../errors/index"));
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
20
  });
21
- var __importStar = (this && this.__importStar) || function (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
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
39
  exports.UnprocessableEntityError = void 0;
30
40
  const errors = __importStar(require("../../errors/index"));
@@ -6,6 +6,8 @@ import * as Parlant from "../../../index";
6
6
  export declare namespace Agents {
7
7
  interface Options {
8
8
  environment: core.Supplier<string>;
9
+ /** Specify a custom URL to connect the client to. */
10
+ baseUrl?: core.Supplier<string>;
9
11
  }
10
12
  interface RequestOptions {
11
13
  /** The maximum time to wait for a response in seconds. */
@@ -14,6 +16,8 @@ export declare namespace Agents {
14
16
  maxRetries?: number;
15
17
  /** A hook to abort the request. */
16
18
  abortSignal?: AbortSignal;
19
+ /** Additional headers to include in the request. */
20
+ headers?: Record<string, string>;
17
21
  }
18
22
  }
19
23
  export declare class Agents {
@@ -38,7 +42,6 @@ export declare class Agents {
38
42
  * A unique identifier will be automatically generated.
39
43
  *
40
44
  * Default behaviors:
41
- *
42
45
  * - `name` defaults to `"Unnamed Agent"` if not provided
43
46
  * - `description` defaults to `None`
44
47
  * - `max_engine_iterations` defaults to `None` (uses system default)
@@ -52,7 +55,9 @@ export declare class Agents {
52
55
  * await client.agents.create({
53
56
  * name: "Haxon",
54
57
  * description: "Technical Support Assistant",
55
- * maxEngineIterations: 3
58
+ * maxEngineIterations: 3,
59
+ * compositionMode: "fluid",
60
+ * tags: ["tag1", "tag2"]
56
61
  * })
57
62
  */
58
63
  create(request: Parlant.AgentCreationParams, requestOptions?: Agents.RequestOptions): Promise<Parlant.Agent>;
@@ -66,7 +71,7 @@ export declare class Agents {
66
71
  * @throws {@link Parlant.UnprocessableEntityError}
67
72
  *
68
73
  * @example
69
- * await client.agents.retrieve("agent_id")
74
+ * await client.agents.retrieve("IUCGT-lvpS")
70
75
  */
71
76
  retrieve(agentId: string, requestOptions?: Agents.RequestOptions): Promise<Parlant.Agent>;
72
77
  /**
@@ -82,7 +87,7 @@ export declare class Agents {
82
87
  * @throws {@link Parlant.UnprocessableEntityError}
83
88
  *
84
89
  * @example
85
- * await client.agents.delete("agent_id")
90
+ * await client.agents.delete("IUCGT-lvpS")
86
91
  */
87
92
  delete(agentId: string, requestOptions?: Agents.RequestOptions): Promise<void>;
88
93
  /**
@@ -99,10 +104,11 @@ export declare class Agents {
99
104
  * @throws {@link Parlant.UnprocessableEntityError}
100
105
  *
101
106
  * @example
102
- * await client.agents.update("agent_id", {
107
+ * await client.agents.update("IUCGT-lvpS", {
103
108
  * name: "Haxon",
104
109
  * description: "Technical Support Assistant",
105
- * maxEngineIterations: 3
110
+ * maxEngineIterations: 3,
111
+ * compositionMode: "fluid"
106
112
  * })
107
113
  */
108
114
  update(agentId: string, request?: Parlant.AgentUpdateParams, requestOptions?: Agents.RequestOptions): Promise<Parlant.Agent>;
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
18
18
  }) : function(o, v) {
19
19
  o["default"] = v;
20
20
  });
21
- var __importStar = (this && this.__importStar) || function (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
- };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
28
38
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
39
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
40
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -61,14 +71,11 @@ class Agents {
61
71
  */
62
72
  list(requestOptions) {
63
73
  return __awaiter(this, void 0, void 0, function* () {
74
+ var _a;
64
75
  const _response = yield core.fetcher({
65
- url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "agents"),
76
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), "agents"),
66
77
  method: "GET",
67
- headers: {
68
- "X-Fern-Language": "JavaScript",
69
- "X-Fern-Runtime": core.RUNTIME.type,
70
- "X-Fern-Runtime-Version": core.RUNTIME.version,
71
- },
78
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
72
79
  contentType: "application/json",
73
80
  requestType: "json",
74
81
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -96,7 +103,7 @@ class Agents {
96
103
  body: _response.error.rawBody,
97
104
  });
98
105
  case "timeout":
99
- throw new errors.ParlantTimeoutError();
106
+ throw new errors.ParlantTimeoutError("Timeout exceeded when calling GET /agents.");
100
107
  case "unknown":
101
108
  throw new errors.ParlantError({
102
109
  message: _response.error.errorMessage,
@@ -111,7 +118,6 @@ class Agents {
111
118
  * A unique identifier will be automatically generated.
112
119
  *
113
120
  * Default behaviors:
114
- *
115
121
  * - `name` defaults to `"Unnamed Agent"` if not provided
116
122
  * - `description` defaults to `None`
117
123
  * - `max_engine_iterations` defaults to `None` (uses system default)
@@ -125,19 +131,18 @@ class Agents {
125
131
  * await client.agents.create({
126
132
  * name: "Haxon",
127
133
  * description: "Technical Support Assistant",
128
- * maxEngineIterations: 3
134
+ * maxEngineIterations: 3,
135
+ * compositionMode: "fluid",
136
+ * tags: ["tag1", "tag2"]
129
137
  * })
130
138
  */
131
139
  create(request, requestOptions) {
132
140
  return __awaiter(this, void 0, void 0, function* () {
141
+ var _a;
133
142
  const _response = yield core.fetcher({
134
- url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "agents"),
143
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), "agents"),
135
144
  method: "POST",
136
- headers: {
137
- "X-Fern-Language": "JavaScript",
138
- "X-Fern-Runtime": core.RUNTIME.type,
139
- "X-Fern-Runtime-Version": core.RUNTIME.version,
140
- },
145
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
141
146
  contentType: "application/json",
142
147
  requestType: "json",
143
148
  body: serializers.AgentCreationParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -171,7 +176,7 @@ class Agents {
171
176
  body: _response.error.rawBody,
172
177
  });
173
178
  case "timeout":
174
- throw new errors.ParlantTimeoutError();
179
+ throw new errors.ParlantTimeoutError("Timeout exceeded when calling POST /agents.");
175
180
  case "unknown":
176
181
  throw new errors.ParlantError({
177
182
  message: _response.error.errorMessage,
@@ -189,18 +194,15 @@ class Agents {
189
194
  * @throws {@link Parlant.UnprocessableEntityError}
190
195
  *
191
196
  * @example
192
- * await client.agents.retrieve("agent_id")
197
+ * await client.agents.retrieve("IUCGT-lvpS")
193
198
  */
194
199
  retrieve(agentId, requestOptions) {
195
200
  return __awaiter(this, void 0, void 0, function* () {
201
+ var _a;
196
202
  const _response = yield core.fetcher({
197
- url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `agents/${encodeURIComponent(agentId)}`),
203
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `agents/${encodeURIComponent(agentId)}`),
198
204
  method: "GET",
199
- headers: {
200
- "X-Fern-Language": "JavaScript",
201
- "X-Fern-Runtime": core.RUNTIME.type,
202
- "X-Fern-Runtime-Version": core.RUNTIME.version,
203
- },
205
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
204
206
  contentType: "application/json",
205
207
  requestType: "json",
206
208
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -235,7 +237,7 @@ class Agents {
235
237
  body: _response.error.rawBody,
236
238
  });
237
239
  case "timeout":
238
- throw new errors.ParlantTimeoutError();
240
+ throw new errors.ParlantTimeoutError("Timeout exceeded when calling GET /agents/{agent_id}.");
239
241
  case "unknown":
240
242
  throw new errors.ParlantError({
241
243
  message: _response.error.errorMessage,
@@ -256,18 +258,15 @@ class Agents {
256
258
  * @throws {@link Parlant.UnprocessableEntityError}
257
259
  *
258
260
  * @example
259
- * await client.agents.delete("agent_id")
261
+ * await client.agents.delete("IUCGT-lvpS")
260
262
  */
261
263
  delete(agentId, requestOptions) {
262
264
  return __awaiter(this, void 0, void 0, function* () {
265
+ var _a;
263
266
  const _response = yield core.fetcher({
264
- url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `agents/${encodeURIComponent(agentId)}`),
267
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `agents/${encodeURIComponent(agentId)}`),
265
268
  method: "DELETE",
266
- headers: {
267
- "X-Fern-Language": "JavaScript",
268
- "X-Fern-Runtime": core.RUNTIME.type,
269
- "X-Fern-Runtime-Version": core.RUNTIME.version,
270
- },
269
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
271
270
  contentType: "application/json",
272
271
  requestType: "json",
273
272
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -297,7 +296,7 @@ class Agents {
297
296
  body: _response.error.rawBody,
298
297
  });
299
298
  case "timeout":
300
- throw new errors.ParlantTimeoutError();
299
+ throw new errors.ParlantTimeoutError("Timeout exceeded when calling DELETE /agents/{agent_id}.");
301
300
  case "unknown":
302
301
  throw new errors.ParlantError({
303
302
  message: _response.error.errorMessage,
@@ -319,22 +318,20 @@ class Agents {
319
318
  * @throws {@link Parlant.UnprocessableEntityError}
320
319
  *
321
320
  * @example
322
- * await client.agents.update("agent_id", {
321
+ * await client.agents.update("IUCGT-lvpS", {
323
322
  * name: "Haxon",
324
323
  * description: "Technical Support Assistant",
325
- * maxEngineIterations: 3
324
+ * maxEngineIterations: 3,
325
+ * compositionMode: "fluid"
326
326
  * })
327
327
  */
328
- update(agentId, request = {}, requestOptions) {
329
- return __awaiter(this, void 0, void 0, function* () {
328
+ update(agentId_1) {
329
+ return __awaiter(this, arguments, void 0, function* (agentId, request = {}, requestOptions) {
330
+ var _a;
330
331
  const _response = yield core.fetcher({
331
- url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `agents/${encodeURIComponent(agentId)}`),
332
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `agents/${encodeURIComponent(agentId)}`),
332
333
  method: "PATCH",
333
- headers: {
334
- "X-Fern-Language": "JavaScript",
335
- "X-Fern-Runtime": core.RUNTIME.type,
336
- "X-Fern-Runtime-Version": core.RUNTIME.version,
337
- },
334
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
338
335
  contentType: "application/json",
339
336
  requestType: "json",
340
337
  body: serializers.AgentUpdateParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -370,7 +367,7 @@ class Agents {
370
367
  body: _response.error.rawBody,
371
368
  });
372
369
  case "timeout":
373
- throw new errors.ParlantTimeoutError();
370
+ throw new errors.ParlantTimeoutError("Timeout exceeded when calling PATCH /agents/{agent_id}.");
374
371
  case "unknown":
375
372
  throw new errors.ParlantError({
376
373
  message: _response.error.errorMessage,
@@ -1,12 +1,15 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as Parlant from "../../../../index";
4
5
  /**
5
6
  * @example
6
7
  * {
7
8
  * name: "Haxon",
8
9
  * description: "Technical Support Assistant",
9
- * maxEngineIterations: 3
10
+ * maxEngineIterations: 3,
11
+ * compositionMode: "fluid",
12
+ * tags: ["tag1", "tag2"]
10
13
  * }
11
14
  */
12
15
  export interface AgentCreationParams {
@@ -16,4 +19,7 @@ export interface AgentCreationParams {
16
19
  description?: string;
17
20
  /** Maximum number of processing iterations the agent can perform per request */
18
21
  maxEngineIterations?: number;
22
+ compositionMode?: Parlant.CompositionModeDto;
23
+ /** List of tag IDs associated with the agent */
24
+ tags?: string[];
19
25
  }
@@ -1,12 +1,14 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as Parlant from "../../../../index";
4
5
  /**
5
6
  * @example
6
7
  * {
7
8
  * name: "Haxon",
8
9
  * description: "Technical Support Assistant",
9
- * maxEngineIterations: 3
10
+ * maxEngineIterations: 3,
11
+ * compositionMode: "fluid"
10
12
  * }
11
13
  */
12
14
  export interface AgentUpdateParams {
@@ -16,4 +18,6 @@ export interface AgentUpdateParams {
16
18
  description?: string;
17
19
  /** Maximum number of processing iterations the agent can perform per request */
18
20
  maxEngineIterations?: number;
21
+ compositionMode?: Parlant.CompositionModeDto;
22
+ tags?: Parlant.AgentTagUpdateParams;
19
23
  }