@aui.io/aui-client 1.2.33 → 1.2.34

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 (206) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/controllerApi/client/Client.d.ts +14 -2
  3. package/dist/cjs/api/resources/controllerApi/client/Client.js +68 -3
  4. package/dist/cjs/api/resources/controllerApi/client/requests/SubmitMessageRequest.d.ts +5 -3
  5. package/dist/cjs/api/types/Card.d.ts +1 -0
  6. package/dist/cjs/api/types/EntityItemParameter.d.ts +2 -1
  7. package/dist/cjs/api/types/Message.d.ts +1 -0
  8. package/dist/cjs/api/types/TaskParameter.d.ts +1 -0
  9. package/dist/cjs/api/types/TracSelfReviewSubEntity.d.ts +4 -0
  10. package/dist/cjs/api/types/TracSelfReviewSubEntity.js +3 -0
  11. package/dist/cjs/api/types/TraceActiveTool.d.ts +5 -0
  12. package/dist/cjs/api/types/TraceActiveTool.js +3 -0
  13. package/dist/cjs/api/types/TraceActiveToolStatus.d.ts +6 -0
  14. package/dist/cjs/api/types/TraceActiveToolStatus.js +9 -0
  15. package/dist/cjs/api/types/TraceApiResponseSubEntity.d.ts +5 -0
  16. package/dist/cjs/api/types/TraceApiResponseSubEntity.js +3 -0
  17. package/dist/cjs/api/types/TraceContext.d.ts +8 -0
  18. package/dist/cjs/api/types/TraceContext.js +3 -0
  19. package/dist/cjs/api/types/TraceDecisionActivateSubTool.d.ts +8 -0
  20. package/dist/cjs/api/types/TraceDecisionActivateSubTool.js +3 -0
  21. package/dist/cjs/api/types/TraceDecisionActivateTool.d.ts +9 -0
  22. package/dist/cjs/api/types/TraceDecisionActivateTool.js +3 -0
  23. package/dist/cjs/api/types/TraceDecisionAskForConfirmation.d.ts +7 -0
  24. package/dist/cjs/api/types/TraceDecisionAskForConfirmation.js +3 -0
  25. package/dist/cjs/api/types/TraceDecisionCallIntegration.d.ts +10 -0
  26. package/dist/cjs/api/types/TraceDecisionCallIntegration.js +3 -0
  27. package/dist/cjs/api/types/TraceDecisionParamsCheck.d.ts +8 -0
  28. package/dist/cjs/api/types/TraceDecisionParamsCheck.js +3 -0
  29. package/dist/cjs/api/types/TraceDecisionRuleTriggered.d.ts +10 -0
  30. package/dist/cjs/api/types/TraceDecisionRuleTriggered.js +3 -0
  31. package/dist/cjs/api/types/TraceDecisionSelfReview.d.ts +7 -0
  32. package/dist/cjs/api/types/TraceDecisionSelfReview.js +3 -0
  33. package/dist/cjs/api/types/TraceDecisionToolTextResponse.d.ts +11 -0
  34. package/dist/cjs/api/types/TraceDecisionToolTextResponse.js +3 -0
  35. package/dist/cjs/api/types/TraceDecisionType.d.ts +15 -0
  36. package/dist/cjs/api/types/TraceDecisionType.js +18 -0
  37. package/dist/cjs/api/types/TraceEntity.d.ts +9 -0
  38. package/dist/cjs/api/types/TraceEntity.js +3 -0
  39. package/dist/cjs/api/types/TraceEntitySource.d.ts +7 -0
  40. package/dist/cjs/api/types/TraceEntitySource.js +10 -0
  41. package/dist/cjs/api/types/TraceGuardrails.d.ts +4 -0
  42. package/dist/cjs/api/types/TraceGuardrails.js +3 -0
  43. package/dist/cjs/api/types/TraceInfo.d.ts +17 -0
  44. package/dist/cjs/api/types/TraceInfo.js +3 -0
  45. package/dist/cjs/api/types/TraceInput.d.ts +6 -0
  46. package/dist/cjs/api/types/TraceInput.js +3 -0
  47. package/dist/cjs/api/types/TraceIntegrationRequest.d.ts +7 -0
  48. package/dist/cjs/api/types/TraceIntegrationRequest.js +3 -0
  49. package/dist/cjs/api/types/TraceIntegrationResponse.d.ts +5 -0
  50. package/dist/cjs/api/types/TraceIntegrationResponse.js +3 -0
  51. package/dist/cjs/api/types/TraceIntegrationResponseItem.d.ts +5 -0
  52. package/dist/cjs/api/types/TraceIntegrationResponseItem.js +3 -0
  53. package/dist/cjs/api/types/TraceIntegrationType.d.ts +10 -0
  54. package/dist/cjs/api/types/TraceIntegrationType.js +13 -0
  55. package/dist/cjs/api/types/TraceParamsCheckStatus.d.ts +8 -0
  56. package/dist/cjs/api/types/TraceParamsCheckStatus.js +11 -0
  57. package/dist/cjs/api/types/TraceQuestionReason.d.ts +7 -0
  58. package/dist/cjs/api/types/TraceQuestionReason.js +10 -0
  59. package/dist/cjs/api/types/TraceRagIntegration.d.ts +10 -0
  60. package/dist/cjs/api/types/TraceRagIntegration.js +3 -0
  61. package/dist/cjs/api/types/TraceRagRequest.d.ts +6 -0
  62. package/dist/cjs/api/types/TraceRagRequest.js +3 -0
  63. package/dist/cjs/api/types/TraceRagResource.d.ts +10 -0
  64. package/dist/cjs/api/types/TraceRagResource.js +3 -0
  65. package/dist/cjs/api/types/TraceRagResponse.d.ts +7 -0
  66. package/dist/cjs/api/types/TraceRagResponse.js +3 -0
  67. package/dist/cjs/api/types/TraceReferencedEntity.d.ts +6 -0
  68. package/dist/cjs/api/types/TraceReferencedEntity.js +3 -0
  69. package/dist/cjs/api/types/TraceResponse.d.ts +13 -0
  70. package/dist/cjs/api/types/TraceResponse.js +3 -0
  71. package/dist/cjs/api/types/TraceResponseType.d.ts +9 -0
  72. package/dist/cjs/api/types/TraceResponseType.js +12 -0
  73. package/dist/cjs/api/types/TraceRestIntegration.d.ts +15 -0
  74. package/dist/cjs/api/types/TraceRestIntegration.js +3 -0
  75. package/dist/cjs/api/types/TraceRuleAction.d.ts +9 -0
  76. package/dist/cjs/api/types/TraceRuleAction.js +12 -0
  77. package/dist/cjs/api/types/TraceRuleBase.d.ts +9 -0
  78. package/dist/cjs/api/types/TraceRuleBase.js +3 -0
  79. package/dist/cjs/api/types/TraceRuleParamsMissing.d.ts +7 -0
  80. package/dist/cjs/api/types/TraceRuleParamsMissing.js +3 -0
  81. package/dist/cjs/api/types/TraceRuleType.d.ts +10 -0
  82. package/dist/cjs/api/types/TraceRuleType.js +13 -0
  83. package/dist/cjs/api/types/TraceSelfReviewEntity.d.ts +9 -0
  84. package/dist/cjs/api/types/TraceSelfReviewEntity.js +3 -0
  85. package/dist/cjs/api/types/TraceSelfReviewSection.d.ts +7 -0
  86. package/dist/cjs/api/types/TraceSelfReviewSection.js +3 -0
  87. package/dist/cjs/api/types/TraceSubEntity.d.ts +5 -0
  88. package/dist/cjs/api/types/TraceSubEntity.js +3 -0
  89. package/dist/cjs/api/types/TraceTrigger.d.ts +9 -0
  90. package/dist/cjs/api/types/TraceTrigger.js +3 -0
  91. package/dist/cjs/api/types/TraceTriggerType.d.ts +9 -0
  92. package/dist/cjs/api/types/TraceTriggerType.js +12 -0
  93. package/dist/cjs/api/types/TraceUnderstanding.d.ts +6 -0
  94. package/dist/cjs/api/types/TraceUnderstanding.js +3 -0
  95. package/dist/cjs/api/types/VectorSearchTaskInteractionQaAnswerScoreLabel.d.ts +5 -0
  96. package/dist/cjs/api/types/VectorSearchTaskInteractionQaAnswerScoreLabel.js +8 -0
  97. package/dist/cjs/api/types/WorkflowCheckStatus.d.ts +7 -0
  98. package/dist/cjs/api/types/WorkflowCheckStatus.js +10 -0
  99. package/dist/cjs/api/types/index.d.ts +45 -0
  100. package/dist/cjs/api/types/index.js +45 -0
  101. package/dist/cjs/version.d.ts +1 -1
  102. package/dist/cjs/version.js +1 -1
  103. package/dist/esm/Client.mjs +2 -2
  104. package/dist/esm/api/resources/controllerApi/client/Client.d.mts +14 -2
  105. package/dist/esm/api/resources/controllerApi/client/Client.mjs +68 -3
  106. package/dist/esm/api/resources/controllerApi/client/requests/SubmitMessageRequest.d.mts +5 -3
  107. package/dist/esm/api/types/Card.d.mts +1 -0
  108. package/dist/esm/api/types/EntityItemParameter.d.mts +2 -1
  109. package/dist/esm/api/types/Message.d.mts +1 -0
  110. package/dist/esm/api/types/TaskParameter.d.mts +1 -0
  111. package/dist/esm/api/types/TracSelfReviewSubEntity.d.mts +4 -0
  112. package/dist/esm/api/types/TracSelfReviewSubEntity.mjs +2 -0
  113. package/dist/esm/api/types/TraceActiveTool.d.mts +5 -0
  114. package/dist/esm/api/types/TraceActiveTool.mjs +2 -0
  115. package/dist/esm/api/types/TraceActiveToolStatus.d.mts +6 -0
  116. package/dist/esm/api/types/TraceActiveToolStatus.mjs +6 -0
  117. package/dist/esm/api/types/TraceApiResponseSubEntity.d.mts +5 -0
  118. package/dist/esm/api/types/TraceApiResponseSubEntity.mjs +2 -0
  119. package/dist/esm/api/types/TraceContext.d.mts +8 -0
  120. package/dist/esm/api/types/TraceContext.mjs +2 -0
  121. package/dist/esm/api/types/TraceDecisionActivateSubTool.d.mts +8 -0
  122. package/dist/esm/api/types/TraceDecisionActivateSubTool.mjs +2 -0
  123. package/dist/esm/api/types/TraceDecisionActivateTool.d.mts +9 -0
  124. package/dist/esm/api/types/TraceDecisionActivateTool.mjs +2 -0
  125. package/dist/esm/api/types/TraceDecisionAskForConfirmation.d.mts +7 -0
  126. package/dist/esm/api/types/TraceDecisionAskForConfirmation.mjs +2 -0
  127. package/dist/esm/api/types/TraceDecisionCallIntegration.d.mts +10 -0
  128. package/dist/esm/api/types/TraceDecisionCallIntegration.mjs +2 -0
  129. package/dist/esm/api/types/TraceDecisionParamsCheck.d.mts +8 -0
  130. package/dist/esm/api/types/TraceDecisionParamsCheck.mjs +2 -0
  131. package/dist/esm/api/types/TraceDecisionRuleTriggered.d.mts +10 -0
  132. package/dist/esm/api/types/TraceDecisionRuleTriggered.mjs +2 -0
  133. package/dist/esm/api/types/TraceDecisionSelfReview.d.mts +7 -0
  134. package/dist/esm/api/types/TraceDecisionSelfReview.mjs +2 -0
  135. package/dist/esm/api/types/TraceDecisionToolTextResponse.d.mts +11 -0
  136. package/dist/esm/api/types/TraceDecisionToolTextResponse.mjs +2 -0
  137. package/dist/esm/api/types/TraceDecisionType.d.mts +15 -0
  138. package/dist/esm/api/types/TraceDecisionType.mjs +15 -0
  139. package/dist/esm/api/types/TraceEntity.d.mts +9 -0
  140. package/dist/esm/api/types/TraceEntity.mjs +2 -0
  141. package/dist/esm/api/types/TraceEntitySource.d.mts +7 -0
  142. package/dist/esm/api/types/TraceEntitySource.mjs +7 -0
  143. package/dist/esm/api/types/TraceGuardrails.d.mts +4 -0
  144. package/dist/esm/api/types/TraceGuardrails.mjs +2 -0
  145. package/dist/esm/api/types/TraceInfo.d.mts +17 -0
  146. package/dist/esm/api/types/TraceInfo.mjs +2 -0
  147. package/dist/esm/api/types/TraceInput.d.mts +6 -0
  148. package/dist/esm/api/types/TraceInput.mjs +2 -0
  149. package/dist/esm/api/types/TraceIntegrationRequest.d.mts +7 -0
  150. package/dist/esm/api/types/TraceIntegrationRequest.mjs +2 -0
  151. package/dist/esm/api/types/TraceIntegrationResponse.d.mts +5 -0
  152. package/dist/esm/api/types/TraceIntegrationResponse.mjs +2 -0
  153. package/dist/esm/api/types/TraceIntegrationResponseItem.d.mts +5 -0
  154. package/dist/esm/api/types/TraceIntegrationResponseItem.mjs +2 -0
  155. package/dist/esm/api/types/TraceIntegrationType.d.mts +10 -0
  156. package/dist/esm/api/types/TraceIntegrationType.mjs +10 -0
  157. package/dist/esm/api/types/TraceParamsCheckStatus.d.mts +8 -0
  158. package/dist/esm/api/types/TraceParamsCheckStatus.mjs +8 -0
  159. package/dist/esm/api/types/TraceQuestionReason.d.mts +7 -0
  160. package/dist/esm/api/types/TraceQuestionReason.mjs +7 -0
  161. package/dist/esm/api/types/TraceRagIntegration.d.mts +10 -0
  162. package/dist/esm/api/types/TraceRagIntegration.mjs +2 -0
  163. package/dist/esm/api/types/TraceRagRequest.d.mts +6 -0
  164. package/dist/esm/api/types/TraceRagRequest.mjs +2 -0
  165. package/dist/esm/api/types/TraceRagResource.d.mts +10 -0
  166. package/dist/esm/api/types/TraceRagResource.mjs +2 -0
  167. package/dist/esm/api/types/TraceRagResponse.d.mts +7 -0
  168. package/dist/esm/api/types/TraceRagResponse.mjs +2 -0
  169. package/dist/esm/api/types/TraceReferencedEntity.d.mts +6 -0
  170. package/dist/esm/api/types/TraceReferencedEntity.mjs +2 -0
  171. package/dist/esm/api/types/TraceResponse.d.mts +13 -0
  172. package/dist/esm/api/types/TraceResponse.mjs +2 -0
  173. package/dist/esm/api/types/TraceResponseType.d.mts +9 -0
  174. package/dist/esm/api/types/TraceResponseType.mjs +9 -0
  175. package/dist/esm/api/types/TraceRestIntegration.d.mts +15 -0
  176. package/dist/esm/api/types/TraceRestIntegration.mjs +2 -0
  177. package/dist/esm/api/types/TraceRuleAction.d.mts +9 -0
  178. package/dist/esm/api/types/TraceRuleAction.mjs +9 -0
  179. package/dist/esm/api/types/TraceRuleBase.d.mts +9 -0
  180. package/dist/esm/api/types/TraceRuleBase.mjs +2 -0
  181. package/dist/esm/api/types/TraceRuleParamsMissing.d.mts +7 -0
  182. package/dist/esm/api/types/TraceRuleParamsMissing.mjs +2 -0
  183. package/dist/esm/api/types/TraceRuleType.d.mts +10 -0
  184. package/dist/esm/api/types/TraceRuleType.mjs +10 -0
  185. package/dist/esm/api/types/TraceSelfReviewEntity.d.mts +9 -0
  186. package/dist/esm/api/types/TraceSelfReviewEntity.mjs +2 -0
  187. package/dist/esm/api/types/TraceSelfReviewSection.d.mts +7 -0
  188. package/dist/esm/api/types/TraceSelfReviewSection.mjs +2 -0
  189. package/dist/esm/api/types/TraceSubEntity.d.mts +5 -0
  190. package/dist/esm/api/types/TraceSubEntity.mjs +2 -0
  191. package/dist/esm/api/types/TraceTrigger.d.mts +9 -0
  192. package/dist/esm/api/types/TraceTrigger.mjs +2 -0
  193. package/dist/esm/api/types/TraceTriggerType.d.mts +9 -0
  194. package/dist/esm/api/types/TraceTriggerType.mjs +9 -0
  195. package/dist/esm/api/types/TraceUnderstanding.d.mts +6 -0
  196. package/dist/esm/api/types/TraceUnderstanding.mjs +2 -0
  197. package/dist/esm/api/types/VectorSearchTaskInteractionQaAnswerScoreLabel.d.mts +5 -0
  198. package/dist/esm/api/types/VectorSearchTaskInteractionQaAnswerScoreLabel.mjs +5 -0
  199. package/dist/esm/api/types/WorkflowCheckStatus.d.mts +7 -0
  200. package/dist/esm/api/types/WorkflowCheckStatus.mjs +7 -0
  201. package/dist/esm/api/types/index.d.mts +45 -0
  202. package/dist/esm/api/types/index.mjs +45 -0
  203. package/dist/esm/version.d.mts +1 -1
  204. package/dist/esm/version.mjs +1 -1
  205. package/package.json +1 -1
  206. package/reference.md +59 -2
@@ -45,8 +45,8 @@ class ApolloClient {
45
45
  "x-network-api-key": _options === null || _options === void 0 ? void 0 : _options.networkApiKey,
46
46
  "X-Fern-Language": "JavaScript",
47
47
  "X-Fern-SDK-Name": "@aui.io/aui-client",
48
- "X-Fern-SDK-Version": "1.2.33",
49
- "User-Agent": "@aui.io/aui-client/1.2.33",
48
+ "X-Fern-SDK-Version": "1.2.34",
49
+ "User-Agent": "@aui.io/aui-client/1.2.34",
50
50
  "X-Fern-Runtime": core.RUNTIME.type,
51
51
  "X-Fern-Runtime-Version": core.RUNTIME.version,
52
52
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -69,9 +69,9 @@ export declare class ControllerApi {
69
69
  *
70
70
  * @example
71
71
  * await client.controllerApi.sendMessage({
72
+ * include_trace_info: true,
72
73
  * is_external_api: true,
73
- * task_id: "task_id",
74
- * text: "text"
74
+ * task_id: "task_id"
75
75
  * })
76
76
  */
77
77
  sendMessage(request: Apollo.SubmitMessageRequest, requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Apollo.Message>;
@@ -126,6 +126,18 @@ export declare class ControllerApi {
126
126
  */
127
127
  getWorkflowsMetadata(requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Apollo.WorkflowsMetadataResponse>;
128
128
  private __getWorkflowsMetadata;
129
+ /**
130
+ * @param {string} taskId
131
+ * @param {string} messageId
132
+ * @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
133
+ *
134
+ * @throws {@link Apollo.UnprocessableEntityError}
135
+ *
136
+ * @example
137
+ * await client.controllerApi.getTraceInfo("task_id", "message_id")
138
+ */
139
+ getTraceInfo(taskId: string, messageId: string, requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Record<string, unknown>>;
140
+ private __getTraceInfo;
129
141
  /**
130
142
  * Start a text conversation (WhatsApp or SMS).
131
143
  *
@@ -335,9 +335,9 @@ class ControllerApi {
335
335
  *
336
336
  * @example
337
337
  * await client.controllerApi.sendMessage({
338
+ * include_trace_info: true,
338
339
  * is_external_api: true,
339
- * task_id: "task_id",
340
- * text: "text"
340
+ * task_id: "task_id"
341
341
  * })
342
342
  */
343
343
  sendMessage(request, requestOptions) {
@@ -346,8 +346,11 @@ class ControllerApi {
346
346
  __sendMessage(request, requestOptions) {
347
347
  return __awaiter(this, void 0, void 0, function* () {
348
348
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
349
- const { is_external_api: isExternalApi } = request, _body = __rest(request, ["is_external_api"]);
349
+ const { include_trace_info: includeTraceInfo, is_external_api: isExternalApi } = request, _body = __rest(request, ["include_trace_info", "is_external_api"]);
350
350
  const _queryParams = {};
351
+ if (includeTraceInfo != null) {
352
+ _queryParams.include_trace_info = includeTraceInfo.toString();
353
+ }
351
354
  if (isExternalApi != null) {
352
355
  _queryParams.is_external_api = isExternalApi.toString();
353
356
  }
@@ -659,6 +662,68 @@ class ControllerApi {
659
662
  }
660
663
  });
661
664
  }
665
+ /**
666
+ * @param {string} taskId
667
+ * @param {string} messageId
668
+ * @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
669
+ *
670
+ * @throws {@link Apollo.UnprocessableEntityError}
671
+ *
672
+ * @example
673
+ * await client.controllerApi.getTraceInfo("task_id", "message_id")
674
+ */
675
+ getTraceInfo(taskId, messageId, requestOptions) {
676
+ return core.HttpResponsePromise.fromPromise(this.__getTraceInfo(taskId, messageId, requestOptions));
677
+ }
678
+ __getTraceInfo(taskId, messageId, requestOptions) {
679
+ return __awaiter(this, void 0, void 0, function* () {
680
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
681
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
682
+ "x-network-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.networkApiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.networkApiKey,
683
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
684
+ const _response = yield core.fetcher({
685
+ url: core.url.join((_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : ((_e = (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ApolloEnvironment.Gcp).base, `api/v1/external/tasks/${core.url.encodePathParam(taskId)}/messages/${core.url.encodePathParam(messageId)}/trace-info`),
686
+ method: "GET",
687
+ headers: _headers,
688
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
689
+ timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
690
+ maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
691
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
692
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
693
+ logging: this._options.logging,
694
+ });
695
+ if (_response.ok) {
696
+ return { data: _response.body, rawResponse: _response.rawResponse };
697
+ }
698
+ if (_response.error.reason === "status-code") {
699
+ switch (_response.error.statusCode) {
700
+ case 422:
701
+ throw new Apollo.UnprocessableEntityError(_response.error.body, _response.rawResponse);
702
+ default:
703
+ throw new errors.ApolloError({
704
+ statusCode: _response.error.statusCode,
705
+ body: _response.error.body,
706
+ rawResponse: _response.rawResponse,
707
+ });
708
+ }
709
+ }
710
+ switch (_response.error.reason) {
711
+ case "non-json":
712
+ throw new errors.ApolloError({
713
+ statusCode: _response.error.statusCode,
714
+ body: _response.error.rawBody,
715
+ rawResponse: _response.rawResponse,
716
+ });
717
+ case "timeout":
718
+ throw new errors.ApolloTimeoutError("Timeout exceeded when calling GET /api/v1/external/tasks/{task_id}/messages/{message_id}/trace-info.");
719
+ case "unknown":
720
+ throw new errors.ApolloError({
721
+ message: _response.error.errorMessage,
722
+ rawResponse: _response.rawResponse,
723
+ });
724
+ }
725
+ });
726
+ }
662
727
  /**
663
728
  * Start a text conversation (WhatsApp or SMS).
664
729
  *
@@ -2,15 +2,17 @@ import type * as Apollo from "../../../../index.js";
2
2
  /**
3
3
  * @example
4
4
  * {
5
+ * include_trace_info: true,
5
6
  * is_external_api: true,
6
- * task_id: "task_id",
7
- * text: "text"
7
+ * task_id: "task_id"
8
8
  * }
9
9
  */
10
10
  export interface SubmitMessageRequest {
11
+ include_trace_info?: boolean;
11
12
  is_external_api?: boolean;
12
13
  task_id: string;
13
- text: string;
14
+ text?: string;
14
15
  context?: Apollo.Context;
15
16
  agent_variables?: Record<string, unknown>;
17
+ static_context?: Record<string, unknown>;
16
18
  }
@@ -8,4 +8,5 @@ export interface Card {
8
8
  sub_entities?: Apollo.MessageCardSubEntity[];
9
9
  self_review?: Apollo.TaskInteractionOptionSelfReview;
10
10
  is_recommended: boolean;
11
+ rendered_jsx?: string;
11
12
  }
@@ -1,11 +1,12 @@
1
1
  import type * as Apollo from "../index.js";
2
2
  export interface EntityItemParameter {
3
3
  param: string;
4
- title: string;
4
+ title?: string;
5
5
  name?: string;
6
6
  value?: unknown;
7
7
  type?: Apollo.ParameterType;
8
8
  show?: boolean;
9
9
  populateToUserProfile?: boolean;
10
10
  excludeFromContext?: boolean;
11
+ code?: string;
11
12
  }
@@ -10,4 +10,5 @@ export interface Message {
10
10
  followup_suggestions: string[];
11
11
  executed_workflows?: string[];
12
12
  url?: string;
13
+ trace_info?: Apollo.TraceInfo;
13
14
  }
@@ -11,6 +11,7 @@ export interface TaskParameter {
11
11
  is_value_filled?: boolean;
12
12
  is_visible?: boolean;
13
13
  param_type?: Apollo.ParameterType;
14
+ code?: string;
14
15
  }
15
16
  export declare namespace TaskParameter {
16
17
  type Value = Apollo.TaskParameterValue | Apollo.TaskParameterRangeValue | Apollo.TaskParameterObjectValue;
@@ -0,0 +1,4 @@
1
+ export interface TracSelfReviewSubEntity {
2
+ entity: string;
3
+ reference?: string;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import type * as Apollo from "../index.js";
2
+ export interface TraceActiveTool {
3
+ tool: string;
4
+ status: Apollo.TraceActiveToolStatus;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ /** Schema: awaiting_params | awaiting_confirmation. */
2
+ export declare const TraceActiveToolStatus: {
3
+ readonly AwaitingParams: "awaiting_params";
4
+ readonly AwaitingConfirmation: "awaiting_confirmation";
5
+ };
6
+ export type TraceActiveToolStatus = (typeof TraceActiveToolStatus)[keyof typeof TraceActiveToolStatus];
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.TraceActiveToolStatus = void 0;
5
+ /** Schema: awaiting_params | awaiting_confirmation. */
6
+ exports.TraceActiveToolStatus = {
7
+ AwaitingParams: "awaiting_params",
8
+ AwaitingConfirmation: "awaiting_confirmation",
9
+ };
@@ -0,0 +1,5 @@
1
+ export interface TraceApiResponseSubEntity {
2
+ entity: string;
3
+ params?: Record<string, unknown>;
4
+ reference?: string;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ import type * as Apollo from "../index.js";
2
+ export interface TraceContext {
3
+ active_tools?: Apollo.TraceActiveTool[];
4
+ entities?: Apollo.TraceEntity[];
5
+ static_context?: Record<string, unknown>[];
6
+ message_params?: Record<string, unknown>;
7
+ response_params?: Record<string, unknown>;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ import type * as Apollo from "../index.js";
2
+ export interface TraceDecisionActivateSubTool {
3
+ type?: Apollo.TraceDecisionType;
4
+ tool: string;
5
+ parent_tool: string;
6
+ trigger: Apollo.TraceTrigger;
7
+ track_id?: string;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ import type * as Apollo from "../index.js";
2
+ export interface TraceDecisionActivateTool {
3
+ type?: Apollo.TraceDecisionType;
4
+ tool: string;
5
+ trigger: Apollo.TraceTrigger;
6
+ track_id?: string;
7
+ referenced_entities?: Apollo.TraceReferencedEntity[];
8
+ check_status?: Apollo.WorkflowCheckStatus;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import type * as Apollo from "../index.js";
2
+ export interface TraceDecisionAskForConfirmation {
3
+ type?: Apollo.TraceDecisionType;
4
+ tool: string;
5
+ confirmation_preview?: Record<string, unknown>[];
6
+ track_id?: string;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ import type * as Apollo from "../index.js";
2
+ export interface TraceDecisionCallIntegration {
3
+ type?: Apollo.TraceDecisionType;
4
+ tool: string;
5
+ integration: TraceDecisionCallIntegration.Integration;
6
+ track_id?: string;
7
+ }
8
+ export declare namespace TraceDecisionCallIntegration {
9
+ type Integration = Apollo.TraceRestIntegration | Apollo.TraceRagIntegration;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ import type * as Apollo from "../index.js";
2
+ export interface TraceDecisionParamsCheck {
3
+ type?: Apollo.TraceDecisionType;
4
+ tool: string;
5
+ status: Apollo.TraceParamsCheckStatus;
6
+ missing_params?: string[];
7
+ track_id?: string;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ import type * as Apollo from "../index.js";
2
+ export interface TraceDecisionRuleTriggered {
3
+ type?: Apollo.TraceDecisionType;
4
+ tool: string;
5
+ rule: TraceDecisionRuleTriggered.Rule;
6
+ track_id?: string;
7
+ }
8
+ export declare namespace TraceDecisionRuleTriggered {
9
+ type Rule = Apollo.TraceRuleBase | Apollo.TraceRuleParamsMissing;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import type * as Apollo from "../index.js";
2
+ export interface TraceDecisionSelfReview {
3
+ type?: Apollo.TraceDecisionType;
4
+ tool: string;
5
+ track_id?: string;
6
+ entities?: Apollo.TraceSelfReviewEntity[];
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ import type * as Apollo from "../index.js";
2
+ export interface TraceDecisionToolTextResponse {
3
+ type?: Apollo.TraceDecisionType;
4
+ tool: string;
5
+ status: string;
6
+ text?: string;
7
+ track_id?: string;
8
+ tone_of_voice?: string;
9
+ brevity?: string;
10
+ guideline?: string;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ /** Schema: no_tool | activate_tool | params_check | rule_triggered | call_integration | ask_question | ask_confirmation | block | self_review. */
2
+ export declare const TraceDecisionType: {
3
+ readonly NoTool: "no_tool";
4
+ readonly ActivateTool: "activate_tool";
5
+ readonly ActivateSubTool: "activate_sub_tool";
6
+ readonly ParamsCheck: "params_check";
7
+ readonly RuleTriggered: "rule_triggered";
8
+ readonly CallIntegration: "call_integration";
9
+ readonly AskQuestion: "ask_question";
10
+ readonly AskConfirmation: "ask_confirmation";
11
+ readonly Block: "block";
12
+ readonly SelfReview: "self_review";
13
+ readonly ToolTextResponse: "tool_text_response";
14
+ };
15
+ export type TraceDecisionType = (typeof TraceDecisionType)[keyof typeof TraceDecisionType];
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.TraceDecisionType = void 0;
5
+ /** Schema: no_tool | activate_tool | params_check | rule_triggered | call_integration | ask_question | ask_confirmation | block | self_review. */
6
+ exports.TraceDecisionType = {
7
+ NoTool: "no_tool",
8
+ ActivateTool: "activate_tool",
9
+ ActivateSubTool: "activate_sub_tool",
10
+ ParamsCheck: "params_check",
11
+ RuleTriggered: "rule_triggered",
12
+ CallIntegration: "call_integration",
13
+ AskQuestion: "ask_question",
14
+ AskConfirmation: "ask_confirmation",
15
+ Block: "block",
16
+ SelfReview: "self_review",
17
+ ToolTextResponse: "tool_text_response",
18
+ };
@@ -0,0 +1,9 @@
1
+ import type * as Apollo from "../index.js";
2
+ export interface TraceEntity {
3
+ entity: string;
4
+ identifier?: string;
5
+ reference?: string;
6
+ source: Apollo.TraceEntitySource;
7
+ params?: Record<string, unknown>;
8
+ sub_entities?: Apollo.TraceSubEntity[];
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ /** Entity source. Schema enum: external_context | user_message | response_mapping. */
2
+ export declare const TraceEntitySource: {
3
+ readonly ExternalContext: "external_context";
4
+ readonly UserMessage: "user_message";
5
+ readonly ResponseMapping: "response_mapping";
6
+ };
7
+ export type TraceEntitySource = (typeof TraceEntitySource)[keyof typeof TraceEntitySource];
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.TraceEntitySource = void 0;
5
+ /** Entity source. Schema enum: external_context | user_message | response_mapping. */
6
+ exports.TraceEntitySource = {
7
+ ExternalContext: "external_context",
8
+ UserMessage: "user_message",
9
+ ResponseMapping: "response_mapping",
10
+ };
@@ -0,0 +1,4 @@
1
+ export interface TraceGuardrails {
2
+ passed: boolean;
3
+ reason?: string;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,17 @@
1
+ import type * as Apollo from "../index.js";
2
+ /**
3
+ * Root trace. Schema: input, understanding, decisions, response (required); context (optional).
4
+ */
5
+ export interface TraceInfo {
6
+ input: Apollo.TraceInput;
7
+ context?: Apollo.TraceContext;
8
+ understanding: Apollo.TraceUnderstanding;
9
+ decisions?: TraceInfo.Decisions.Item[];
10
+ response: Apollo.TraceResponse;
11
+ }
12
+ export declare namespace TraceInfo {
13
+ type Decisions = Decisions.Item[];
14
+ namespace Decisions {
15
+ type Item = Apollo.TraceDecisionActivateTool | Apollo.TraceDecisionRuleTriggered | Apollo.TraceDecisionParamsCheck | Apollo.TraceDecisionCallIntegration | Apollo.TraceDecisionAskForConfirmation | Apollo.TraceDecisionToolTextResponse | Apollo.TraceDecisionSelfReview | Apollo.TraceDecisionActivateSubTool;
16
+ }
17
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Schema: message (required).
3
+ */
4
+ export interface TraceInput {
5
+ message: string;
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ export interface TraceIntegrationRequest {
2
+ name: string;
3
+ url: string;
4
+ method: string;
5
+ category: string;
6
+ params?: unknown;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import type * as Apollo from "../index.js";
2
+ export interface TraceIntegrationResponse {
3
+ name: string;
4
+ items?: Apollo.TraceIntegrationResponseItem[];
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import type * as Apollo from "../index.js";
2
+ export interface TraceIntegrationResponseItem {
3
+ params?: Record<string, unknown>;
4
+ sub_entities?: Apollo.TraceApiResponseSubEntity[];
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ /** Schema: REST | MCP | RAG | INTERNAL_CONTEXT | STRUCTURED | GEN_AI. */
2
+ export declare const TraceIntegrationType: {
3
+ readonly Rest: "REST";
4
+ readonly Mcp: "MCP";
5
+ readonly Rag: "RAG";
6
+ readonly InternalContext: "INTERNAL_CONTEXT";
7
+ readonly Structured: "STRUCTURED";
8
+ readonly GenAi: "GEN_AI";
9
+ };
10
+ export type TraceIntegrationType = (typeof TraceIntegrationType)[keyof typeof TraceIntegrationType];
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.TraceIntegrationType = void 0;
5
+ /** Schema: REST | MCP | RAG | INTERNAL_CONTEXT | STRUCTURED | GEN_AI. */
6
+ exports.TraceIntegrationType = {
7
+ Rest: "REST",
8
+ Mcp: "MCP",
9
+ Rag: "RAG",
10
+ InternalContext: "INTERNAL_CONTEXT",
11
+ Structured: "STRUCTURED",
12
+ GenAi: "GEN_AI",
13
+ };
@@ -0,0 +1,8 @@
1
+ /** Schema: all_filled | missing_required | missing_optional_ask_once. */
2
+ export declare const TraceParamsCheckStatus: {
3
+ readonly AllFilled: "all_filled";
4
+ readonly MissingRequired: "missing_required";
5
+ readonly MissingOptional: "missing_optional";
6
+ readonly MissingOptionalAskOnce: "missing_optional_ask_once";
7
+ };
8
+ export type TraceParamsCheckStatus = (typeof TraceParamsCheckStatus)[keyof typeof TraceParamsCheckStatus];
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.TraceParamsCheckStatus = void 0;
5
+ /** Schema: all_filled | missing_required | missing_optional_ask_once. */
6
+ exports.TraceParamsCheckStatus = {
7
+ AllFilled: "all_filled",
8
+ MissingRequired: "missing_required",
9
+ MissingOptional: "missing_optional",
10
+ MissingOptionalAskOnce: "missing_optional_ask_once",
11
+ };
@@ -0,0 +1,7 @@
1
+ /** Schema: missing_params | from_rule | clarification. Why asking a question. */
2
+ export declare const TraceQuestionReason: {
3
+ readonly MissingParams: "missing_params";
4
+ readonly FromRule: "from_rule";
5
+ readonly Clarification: "clarification";
6
+ };
7
+ export type TraceQuestionReason = (typeof TraceQuestionReason)[keyof typeof TraceQuestionReason];
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.TraceQuestionReason = void 0;
5
+ /** Schema: missing_params | from_rule | clarification. Why asking a question. */
6
+ exports.TraceQuestionReason = {
7
+ MissingParams: "missing_params",
8
+ FromRule: "from_rule",
9
+ Clarification: "clarification",
10
+ };