@aui.io/aui-client 1.2.32 → 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 (216) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/controllerApi/client/Client.d.ts +32 -2
  3. package/dist/cjs/api/resources/controllerApi/client/Client.js +142 -3
  4. package/dist/cjs/api/resources/controllerApi/client/requests/SubmitMessageRequest.d.ts +5 -3
  5. package/dist/cjs/api/resources/controllerApi/client/requests/TextConversationInitiateRequest.d.ts +15 -0
  6. package/dist/cjs/api/resources/controllerApi/client/requests/TextConversationInitiateRequest.js +3 -0
  7. package/dist/cjs/api/resources/controllerApi/client/requests/index.d.ts +1 -0
  8. package/dist/cjs/api/types/Card.d.ts +1 -0
  9. package/dist/cjs/api/types/EntityItemParameter.d.ts +2 -1
  10. package/dist/cjs/api/types/Message.d.ts +1 -0
  11. package/dist/cjs/api/types/TaskParameter.d.ts +1 -0
  12. package/dist/cjs/api/types/TextConversationInitiateResponse.d.ts +6 -0
  13. package/dist/cjs/api/types/TextConversationInitiateResponse.js +3 -0
  14. package/dist/cjs/api/types/TracSelfReviewSubEntity.d.ts +4 -0
  15. package/dist/cjs/api/types/TracSelfReviewSubEntity.js +3 -0
  16. package/dist/cjs/api/types/TraceActiveTool.d.ts +5 -0
  17. package/dist/cjs/api/types/TraceActiveTool.js +3 -0
  18. package/dist/cjs/api/types/TraceActiveToolStatus.d.ts +6 -0
  19. package/dist/cjs/api/types/TraceActiveToolStatus.js +9 -0
  20. package/dist/cjs/api/types/TraceApiResponseSubEntity.d.ts +5 -0
  21. package/dist/cjs/api/types/TraceApiResponseSubEntity.js +3 -0
  22. package/dist/cjs/api/types/TraceContext.d.ts +8 -0
  23. package/dist/cjs/api/types/TraceContext.js +3 -0
  24. package/dist/cjs/api/types/TraceDecisionActivateSubTool.d.ts +8 -0
  25. package/dist/cjs/api/types/TraceDecisionActivateSubTool.js +3 -0
  26. package/dist/cjs/api/types/TraceDecisionActivateTool.d.ts +9 -0
  27. package/dist/cjs/api/types/TraceDecisionActivateTool.js +3 -0
  28. package/dist/cjs/api/types/TraceDecisionAskForConfirmation.d.ts +7 -0
  29. package/dist/cjs/api/types/TraceDecisionAskForConfirmation.js +3 -0
  30. package/dist/cjs/api/types/TraceDecisionCallIntegration.d.ts +10 -0
  31. package/dist/cjs/api/types/TraceDecisionCallIntegration.js +3 -0
  32. package/dist/cjs/api/types/TraceDecisionParamsCheck.d.ts +8 -0
  33. package/dist/cjs/api/types/TraceDecisionParamsCheck.js +3 -0
  34. package/dist/cjs/api/types/TraceDecisionRuleTriggered.d.ts +10 -0
  35. package/dist/cjs/api/types/TraceDecisionRuleTriggered.js +3 -0
  36. package/dist/cjs/api/types/TraceDecisionSelfReview.d.ts +7 -0
  37. package/dist/cjs/api/types/TraceDecisionSelfReview.js +3 -0
  38. package/dist/cjs/api/types/TraceDecisionToolTextResponse.d.ts +11 -0
  39. package/dist/cjs/api/types/TraceDecisionToolTextResponse.js +3 -0
  40. package/dist/cjs/api/types/TraceDecisionType.d.ts +15 -0
  41. package/dist/cjs/api/types/TraceDecisionType.js +18 -0
  42. package/dist/cjs/api/types/TraceEntity.d.ts +9 -0
  43. package/dist/cjs/api/types/TraceEntity.js +3 -0
  44. package/dist/cjs/api/types/TraceEntitySource.d.ts +7 -0
  45. package/dist/cjs/api/types/TraceEntitySource.js +10 -0
  46. package/dist/cjs/api/types/TraceGuardrails.d.ts +4 -0
  47. package/dist/cjs/api/types/TraceGuardrails.js +3 -0
  48. package/dist/cjs/api/types/TraceInfo.d.ts +17 -0
  49. package/dist/cjs/api/types/TraceInfo.js +3 -0
  50. package/dist/cjs/api/types/TraceInput.d.ts +6 -0
  51. package/dist/cjs/api/types/TraceInput.js +3 -0
  52. package/dist/cjs/api/types/TraceIntegrationRequest.d.ts +7 -0
  53. package/dist/cjs/api/types/TraceIntegrationRequest.js +3 -0
  54. package/dist/cjs/api/types/TraceIntegrationResponse.d.ts +5 -0
  55. package/dist/cjs/api/types/TraceIntegrationResponse.js +3 -0
  56. package/dist/cjs/api/types/TraceIntegrationResponseItem.d.ts +5 -0
  57. package/dist/cjs/api/types/TraceIntegrationResponseItem.js +3 -0
  58. package/dist/cjs/api/types/TraceIntegrationType.d.ts +10 -0
  59. package/dist/cjs/api/types/TraceIntegrationType.js +13 -0
  60. package/dist/cjs/api/types/TraceParamsCheckStatus.d.ts +8 -0
  61. package/dist/cjs/api/types/TraceParamsCheckStatus.js +11 -0
  62. package/dist/cjs/api/types/TraceQuestionReason.d.ts +7 -0
  63. package/dist/cjs/api/types/TraceQuestionReason.js +10 -0
  64. package/dist/cjs/api/types/TraceRagIntegration.d.ts +10 -0
  65. package/dist/cjs/api/types/TraceRagIntegration.js +3 -0
  66. package/dist/cjs/api/types/TraceRagRequest.d.ts +6 -0
  67. package/dist/cjs/api/types/TraceRagRequest.js +3 -0
  68. package/dist/cjs/api/types/TraceRagResource.d.ts +10 -0
  69. package/dist/cjs/api/types/TraceRagResource.js +3 -0
  70. package/dist/cjs/api/types/TraceRagResponse.d.ts +7 -0
  71. package/dist/cjs/api/types/TraceRagResponse.js +3 -0
  72. package/dist/cjs/api/types/TraceReferencedEntity.d.ts +6 -0
  73. package/dist/cjs/api/types/TraceReferencedEntity.js +3 -0
  74. package/dist/cjs/api/types/TraceResponse.d.ts +13 -0
  75. package/dist/cjs/api/types/TraceResponse.js +3 -0
  76. package/dist/cjs/api/types/TraceResponseType.d.ts +9 -0
  77. package/dist/cjs/api/types/TraceResponseType.js +12 -0
  78. package/dist/cjs/api/types/TraceRestIntegration.d.ts +15 -0
  79. package/dist/cjs/api/types/TraceRestIntegration.js +3 -0
  80. package/dist/cjs/api/types/TraceRuleAction.d.ts +9 -0
  81. package/dist/cjs/api/types/TraceRuleAction.js +12 -0
  82. package/dist/cjs/api/types/TraceRuleBase.d.ts +9 -0
  83. package/dist/cjs/api/types/TraceRuleBase.js +3 -0
  84. package/dist/cjs/api/types/TraceRuleParamsMissing.d.ts +7 -0
  85. package/dist/cjs/api/types/TraceRuleParamsMissing.js +3 -0
  86. package/dist/cjs/api/types/TraceRuleType.d.ts +10 -0
  87. package/dist/cjs/api/types/TraceRuleType.js +13 -0
  88. package/dist/cjs/api/types/TraceSelfReviewEntity.d.ts +9 -0
  89. package/dist/cjs/api/types/TraceSelfReviewEntity.js +3 -0
  90. package/dist/cjs/api/types/TraceSelfReviewSection.d.ts +7 -0
  91. package/dist/cjs/api/types/TraceSelfReviewSection.js +3 -0
  92. package/dist/cjs/api/types/TraceSubEntity.d.ts +5 -0
  93. package/dist/cjs/api/types/TraceSubEntity.js +3 -0
  94. package/dist/cjs/api/types/TraceTrigger.d.ts +9 -0
  95. package/dist/cjs/api/types/TraceTrigger.js +3 -0
  96. package/dist/cjs/api/types/TraceTriggerType.d.ts +9 -0
  97. package/dist/cjs/api/types/TraceTriggerType.js +12 -0
  98. package/dist/cjs/api/types/TraceUnderstanding.d.ts +6 -0
  99. package/dist/cjs/api/types/TraceUnderstanding.js +3 -0
  100. package/dist/cjs/api/types/VectorSearchTaskInteractionQaAnswerScoreLabel.d.ts +5 -0
  101. package/dist/cjs/api/types/VectorSearchTaskInteractionQaAnswerScoreLabel.js +8 -0
  102. package/dist/cjs/api/types/WorkflowCheckStatus.d.ts +7 -0
  103. package/dist/cjs/api/types/WorkflowCheckStatus.js +10 -0
  104. package/dist/cjs/api/types/index.d.ts +46 -0
  105. package/dist/cjs/api/types/index.js +46 -0
  106. package/dist/cjs/version.d.ts +1 -1
  107. package/dist/cjs/version.js +1 -1
  108. package/dist/esm/Client.mjs +2 -2
  109. package/dist/esm/api/resources/controllerApi/client/Client.d.mts +32 -2
  110. package/dist/esm/api/resources/controllerApi/client/Client.mjs +142 -3
  111. package/dist/esm/api/resources/controllerApi/client/requests/SubmitMessageRequest.d.mts +5 -3
  112. package/dist/esm/api/resources/controllerApi/client/requests/TextConversationInitiateRequest.d.mts +15 -0
  113. package/dist/esm/api/resources/controllerApi/client/requests/TextConversationInitiateRequest.mjs +2 -0
  114. package/dist/esm/api/resources/controllerApi/client/requests/index.d.mts +1 -0
  115. package/dist/esm/api/types/Card.d.mts +1 -0
  116. package/dist/esm/api/types/EntityItemParameter.d.mts +2 -1
  117. package/dist/esm/api/types/Message.d.mts +1 -0
  118. package/dist/esm/api/types/TaskParameter.d.mts +1 -0
  119. package/dist/esm/api/types/TextConversationInitiateResponse.d.mts +6 -0
  120. package/dist/esm/api/types/TextConversationInitiateResponse.mjs +2 -0
  121. package/dist/esm/api/types/TracSelfReviewSubEntity.d.mts +4 -0
  122. package/dist/esm/api/types/TracSelfReviewSubEntity.mjs +2 -0
  123. package/dist/esm/api/types/TraceActiveTool.d.mts +5 -0
  124. package/dist/esm/api/types/TraceActiveTool.mjs +2 -0
  125. package/dist/esm/api/types/TraceActiveToolStatus.d.mts +6 -0
  126. package/dist/esm/api/types/TraceActiveToolStatus.mjs +6 -0
  127. package/dist/esm/api/types/TraceApiResponseSubEntity.d.mts +5 -0
  128. package/dist/esm/api/types/TraceApiResponseSubEntity.mjs +2 -0
  129. package/dist/esm/api/types/TraceContext.d.mts +8 -0
  130. package/dist/esm/api/types/TraceContext.mjs +2 -0
  131. package/dist/esm/api/types/TraceDecisionActivateSubTool.d.mts +8 -0
  132. package/dist/esm/api/types/TraceDecisionActivateSubTool.mjs +2 -0
  133. package/dist/esm/api/types/TraceDecisionActivateTool.d.mts +9 -0
  134. package/dist/esm/api/types/TraceDecisionActivateTool.mjs +2 -0
  135. package/dist/esm/api/types/TraceDecisionAskForConfirmation.d.mts +7 -0
  136. package/dist/esm/api/types/TraceDecisionAskForConfirmation.mjs +2 -0
  137. package/dist/esm/api/types/TraceDecisionCallIntegration.d.mts +10 -0
  138. package/dist/esm/api/types/TraceDecisionCallIntegration.mjs +2 -0
  139. package/dist/esm/api/types/TraceDecisionParamsCheck.d.mts +8 -0
  140. package/dist/esm/api/types/TraceDecisionParamsCheck.mjs +2 -0
  141. package/dist/esm/api/types/TraceDecisionRuleTriggered.d.mts +10 -0
  142. package/dist/esm/api/types/TraceDecisionRuleTriggered.mjs +2 -0
  143. package/dist/esm/api/types/TraceDecisionSelfReview.d.mts +7 -0
  144. package/dist/esm/api/types/TraceDecisionSelfReview.mjs +2 -0
  145. package/dist/esm/api/types/TraceDecisionToolTextResponse.d.mts +11 -0
  146. package/dist/esm/api/types/TraceDecisionToolTextResponse.mjs +2 -0
  147. package/dist/esm/api/types/TraceDecisionType.d.mts +15 -0
  148. package/dist/esm/api/types/TraceDecisionType.mjs +15 -0
  149. package/dist/esm/api/types/TraceEntity.d.mts +9 -0
  150. package/dist/esm/api/types/TraceEntity.mjs +2 -0
  151. package/dist/esm/api/types/TraceEntitySource.d.mts +7 -0
  152. package/dist/esm/api/types/TraceEntitySource.mjs +7 -0
  153. package/dist/esm/api/types/TraceGuardrails.d.mts +4 -0
  154. package/dist/esm/api/types/TraceGuardrails.mjs +2 -0
  155. package/dist/esm/api/types/TraceInfo.d.mts +17 -0
  156. package/dist/esm/api/types/TraceInfo.mjs +2 -0
  157. package/dist/esm/api/types/TraceInput.d.mts +6 -0
  158. package/dist/esm/api/types/TraceInput.mjs +2 -0
  159. package/dist/esm/api/types/TraceIntegrationRequest.d.mts +7 -0
  160. package/dist/esm/api/types/TraceIntegrationRequest.mjs +2 -0
  161. package/dist/esm/api/types/TraceIntegrationResponse.d.mts +5 -0
  162. package/dist/esm/api/types/TraceIntegrationResponse.mjs +2 -0
  163. package/dist/esm/api/types/TraceIntegrationResponseItem.d.mts +5 -0
  164. package/dist/esm/api/types/TraceIntegrationResponseItem.mjs +2 -0
  165. package/dist/esm/api/types/TraceIntegrationType.d.mts +10 -0
  166. package/dist/esm/api/types/TraceIntegrationType.mjs +10 -0
  167. package/dist/esm/api/types/TraceParamsCheckStatus.d.mts +8 -0
  168. package/dist/esm/api/types/TraceParamsCheckStatus.mjs +8 -0
  169. package/dist/esm/api/types/TraceQuestionReason.d.mts +7 -0
  170. package/dist/esm/api/types/TraceQuestionReason.mjs +7 -0
  171. package/dist/esm/api/types/TraceRagIntegration.d.mts +10 -0
  172. package/dist/esm/api/types/TraceRagIntegration.mjs +2 -0
  173. package/dist/esm/api/types/TraceRagRequest.d.mts +6 -0
  174. package/dist/esm/api/types/TraceRagRequest.mjs +2 -0
  175. package/dist/esm/api/types/TraceRagResource.d.mts +10 -0
  176. package/dist/esm/api/types/TraceRagResource.mjs +2 -0
  177. package/dist/esm/api/types/TraceRagResponse.d.mts +7 -0
  178. package/dist/esm/api/types/TraceRagResponse.mjs +2 -0
  179. package/dist/esm/api/types/TraceReferencedEntity.d.mts +6 -0
  180. package/dist/esm/api/types/TraceReferencedEntity.mjs +2 -0
  181. package/dist/esm/api/types/TraceResponse.d.mts +13 -0
  182. package/dist/esm/api/types/TraceResponse.mjs +2 -0
  183. package/dist/esm/api/types/TraceResponseType.d.mts +9 -0
  184. package/dist/esm/api/types/TraceResponseType.mjs +9 -0
  185. package/dist/esm/api/types/TraceRestIntegration.d.mts +15 -0
  186. package/dist/esm/api/types/TraceRestIntegration.mjs +2 -0
  187. package/dist/esm/api/types/TraceRuleAction.d.mts +9 -0
  188. package/dist/esm/api/types/TraceRuleAction.mjs +9 -0
  189. package/dist/esm/api/types/TraceRuleBase.d.mts +9 -0
  190. package/dist/esm/api/types/TraceRuleBase.mjs +2 -0
  191. package/dist/esm/api/types/TraceRuleParamsMissing.d.mts +7 -0
  192. package/dist/esm/api/types/TraceRuleParamsMissing.mjs +2 -0
  193. package/dist/esm/api/types/TraceRuleType.d.mts +10 -0
  194. package/dist/esm/api/types/TraceRuleType.mjs +10 -0
  195. package/dist/esm/api/types/TraceSelfReviewEntity.d.mts +9 -0
  196. package/dist/esm/api/types/TraceSelfReviewEntity.mjs +2 -0
  197. package/dist/esm/api/types/TraceSelfReviewSection.d.mts +7 -0
  198. package/dist/esm/api/types/TraceSelfReviewSection.mjs +2 -0
  199. package/dist/esm/api/types/TraceSubEntity.d.mts +5 -0
  200. package/dist/esm/api/types/TraceSubEntity.mjs +2 -0
  201. package/dist/esm/api/types/TraceTrigger.d.mts +9 -0
  202. package/dist/esm/api/types/TraceTrigger.mjs +2 -0
  203. package/dist/esm/api/types/TraceTriggerType.d.mts +9 -0
  204. package/dist/esm/api/types/TraceTriggerType.mjs +9 -0
  205. package/dist/esm/api/types/TraceUnderstanding.d.mts +6 -0
  206. package/dist/esm/api/types/TraceUnderstanding.mjs +2 -0
  207. package/dist/esm/api/types/VectorSearchTaskInteractionQaAnswerScoreLabel.d.mts +5 -0
  208. package/dist/esm/api/types/VectorSearchTaskInteractionQaAnswerScoreLabel.mjs +5 -0
  209. package/dist/esm/api/types/WorkflowCheckStatus.d.mts +7 -0
  210. package/dist/esm/api/types/WorkflowCheckStatus.mjs +7 -0
  211. package/dist/esm/api/types/index.d.mts +46 -0
  212. package/dist/esm/api/types/index.mjs +46 -0
  213. package/dist/esm/version.d.mts +1 -1
  214. package/dist/esm/version.mjs +1 -1
  215. package/package.json +1 -1
  216. package/reference.md +127 -2
@@ -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,4 +126,34 @@ 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;
141
+ /**
142
+ * Start a text conversation (WhatsApp or SMS).
143
+ *
144
+ * Creates a task and then proxies to third-party-auth(BE) service to send the initial message.
145
+ *
146
+ * @param {Apollo.TextConversationInitiateRequest} request
147
+ * @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
148
+ *
149
+ * @throws {@link Apollo.UnprocessableEntityError}
150
+ *
151
+ * @example
152
+ * await client.controllerApi.startTextConversation({
153
+ * phoneNumber: "phoneNumber",
154
+ * channel: "channel"
155
+ * })
156
+ */
157
+ startTextConversation(request: Apollo.TextConversationInitiateRequest, requestOptions?: ControllerApi.RequestOptions): core.HttpResponsePromise<Apollo.TextConversationInitiateResponse>;
158
+ private __startTextConversation;
129
159
  }
@@ -299,9 +299,9 @@ export class ControllerApi {
299
299
  *
300
300
  * @example
301
301
  * await client.controllerApi.sendMessage({
302
+ * include_trace_info: true,
302
303
  * is_external_api: true,
303
- * task_id: "task_id",
304
- * text: "text"
304
+ * task_id: "task_id"
305
305
  * })
306
306
  */
307
307
  sendMessage(request, requestOptions) {
@@ -310,8 +310,11 @@ export class ControllerApi {
310
310
  __sendMessage(request, requestOptions) {
311
311
  return __awaiter(this, void 0, void 0, function* () {
312
312
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
313
- const { is_external_api: isExternalApi } = request, _body = __rest(request, ["is_external_api"]);
313
+ const { include_trace_info: includeTraceInfo, is_external_api: isExternalApi } = request, _body = __rest(request, ["include_trace_info", "is_external_api"]);
314
314
  const _queryParams = {};
315
+ if (includeTraceInfo != null) {
316
+ _queryParams.include_trace_info = includeTraceInfo.toString();
317
+ }
315
318
  if (isExternalApi != null) {
316
319
  _queryParams.is_external_api = isExternalApi.toString();
317
320
  }
@@ -623,4 +626,140 @@ export class ControllerApi {
623
626
  }
624
627
  });
625
628
  }
629
+ /**
630
+ * @param {string} taskId
631
+ * @param {string} messageId
632
+ * @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
633
+ *
634
+ * @throws {@link Apollo.UnprocessableEntityError}
635
+ *
636
+ * @example
637
+ * await client.controllerApi.getTraceInfo("task_id", "message_id")
638
+ */
639
+ getTraceInfo(taskId, messageId, requestOptions) {
640
+ return core.HttpResponsePromise.fromPromise(this.__getTraceInfo(taskId, messageId, requestOptions));
641
+ }
642
+ __getTraceInfo(taskId, messageId, requestOptions) {
643
+ return __awaiter(this, void 0, void 0, function* () {
644
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
645
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
646
+ "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,
647
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
648
+ const _response = yield core.fetcher({
649
+ 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`),
650
+ method: "GET",
651
+ headers: _headers,
652
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
653
+ 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,
654
+ 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,
655
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
656
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
657
+ logging: this._options.logging,
658
+ });
659
+ if (_response.ok) {
660
+ return { data: _response.body, rawResponse: _response.rawResponse };
661
+ }
662
+ if (_response.error.reason === "status-code") {
663
+ switch (_response.error.statusCode) {
664
+ case 422:
665
+ throw new Apollo.UnprocessableEntityError(_response.error.body, _response.rawResponse);
666
+ default:
667
+ throw new errors.ApolloError({
668
+ statusCode: _response.error.statusCode,
669
+ body: _response.error.body,
670
+ rawResponse: _response.rawResponse,
671
+ });
672
+ }
673
+ }
674
+ switch (_response.error.reason) {
675
+ case "non-json":
676
+ throw new errors.ApolloError({
677
+ statusCode: _response.error.statusCode,
678
+ body: _response.error.rawBody,
679
+ rawResponse: _response.rawResponse,
680
+ });
681
+ case "timeout":
682
+ throw new errors.ApolloTimeoutError("Timeout exceeded when calling GET /api/v1/external/tasks/{task_id}/messages/{message_id}/trace-info.");
683
+ case "unknown":
684
+ throw new errors.ApolloError({
685
+ message: _response.error.errorMessage,
686
+ rawResponse: _response.rawResponse,
687
+ });
688
+ }
689
+ });
690
+ }
691
+ /**
692
+ * Start a text conversation (WhatsApp or SMS).
693
+ *
694
+ * Creates a task and then proxies to third-party-auth(BE) service to send the initial message.
695
+ *
696
+ * @param {Apollo.TextConversationInitiateRequest} request
697
+ * @param {ControllerApi.RequestOptions} requestOptions - Request-specific configuration.
698
+ *
699
+ * @throws {@link Apollo.UnprocessableEntityError}
700
+ *
701
+ * @example
702
+ * await client.controllerApi.startTextConversation({
703
+ * phoneNumber: "phoneNumber",
704
+ * channel: "channel"
705
+ * })
706
+ */
707
+ startTextConversation(request, requestOptions) {
708
+ return core.HttpResponsePromise.fromPromise(this.__startTextConversation(request, requestOptions));
709
+ }
710
+ __startTextConversation(request, requestOptions) {
711
+ return __awaiter(this, void 0, void 0, function* () {
712
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
713
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
714
+ "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,
715
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
716
+ const _response = yield core.fetcher({
717
+ 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/text/conversation"),
718
+ method: "POST",
719
+ headers: _headers,
720
+ contentType: "application/json",
721
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
722
+ requestType: "json",
723
+ body: request,
724
+ 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,
725
+ 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,
726
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
727
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
728
+ logging: this._options.logging,
729
+ });
730
+ if (_response.ok) {
731
+ return {
732
+ data: _response.body,
733
+ rawResponse: _response.rawResponse,
734
+ };
735
+ }
736
+ if (_response.error.reason === "status-code") {
737
+ switch (_response.error.statusCode) {
738
+ case 422:
739
+ throw new Apollo.UnprocessableEntityError(_response.error.body, _response.rawResponse);
740
+ default:
741
+ throw new errors.ApolloError({
742
+ statusCode: _response.error.statusCode,
743
+ body: _response.error.body,
744
+ rawResponse: _response.rawResponse,
745
+ });
746
+ }
747
+ }
748
+ switch (_response.error.reason) {
749
+ case "non-json":
750
+ throw new errors.ApolloError({
751
+ statusCode: _response.error.statusCode,
752
+ body: _response.error.rawBody,
753
+ rawResponse: _response.rawResponse,
754
+ });
755
+ case "timeout":
756
+ throw new errors.ApolloTimeoutError("Timeout exceeded when calling POST /api/v1/external/text/conversation.");
757
+ case "unknown":
758
+ throw new errors.ApolloError({
759
+ message: _response.error.errorMessage,
760
+ rawResponse: _response.rawResponse,
761
+ });
762
+ }
763
+ });
764
+ }
626
765
  }
@@ -2,15 +2,17 @@ import type * as Apollo from "../../../../index.mjs";
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
  }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * phoneNumber: "phoneNumber",
5
+ * channel: "channel"
6
+ * }
7
+ */
8
+ export interface TextConversationInitiateRequest {
9
+ /** Phone number in E.164 format (e.g., +1234567890) */
10
+ phoneNumber: string;
11
+ /** Channel type: 'whatsapp' or 'sms' */
12
+ channel: string;
13
+ /** Optional initial message to send */
14
+ message?: string;
15
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -2,3 +2,4 @@ export type { CreateTaskRequest } from "./CreateTaskRequest.mjs";
2
2
  export type { GetProductMetadataRequest } from "./GetProductMetadataRequest.mjs";
3
3
  export type { ListUserTasksRequest } from "./ListUserTasksRequest.mjs";
4
4
  export type { SubmitMessageRequest } from "./SubmitMessageRequest.mjs";
5
+ export type { TextConversationInitiateRequest } from "./TextConversationInitiateRequest.mjs";
@@ -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.mjs";
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,6 @@
1
+ export interface TextConversationInitiateResponse {
2
+ status: boolean;
3
+ data: Record<string, string>;
4
+ message: string;
5
+ statusCode: number;
6
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ export interface TracSelfReviewSubEntity {
2
+ entity: string;
3
+ reference?: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,5 @@
1
+ import type * as Apollo from "../index.mjs";
2
+ export interface TraceActiveTool {
3
+ tool: string;
4
+ status: Apollo.TraceActiveToolStatus;
5
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -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,6 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ /** Schema: awaiting_params | awaiting_confirmation. */
3
+ export const TraceActiveToolStatus = {
4
+ AwaitingParams: "awaiting_params",
5
+ AwaitingConfirmation: "awaiting_confirmation",
6
+ };
@@ -0,0 +1,5 @@
1
+ export interface TraceApiResponseSubEntity {
2
+ entity: string;
3
+ params?: Record<string, unknown>;
4
+ reference?: string;
5
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,8 @@
1
+ import type * as Apollo from "../index.mjs";
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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,8 @@
1
+ import type * as Apollo from "../index.mjs";
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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,9 @@
1
+ import type * as Apollo from "../index.mjs";
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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,7 @@
1
+ import type * as Apollo from "../index.mjs";
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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,10 @@
1
+ import type * as Apollo from "../index.mjs";
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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,8 @@
1
+ import type * as Apollo from "../index.mjs";
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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,10 @@
1
+ import type * as Apollo from "../index.mjs";
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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,7 @@
1
+ import type * as Apollo from "../index.mjs";
2
+ export interface TraceDecisionSelfReview {
3
+ type?: Apollo.TraceDecisionType;
4
+ tool: string;
5
+ track_id?: string;
6
+ entities?: Apollo.TraceSelfReviewEntity[];
7
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,11 @@
1
+ import type * as Apollo from "../index.mjs";
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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -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,15 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ /** Schema: no_tool | activate_tool | params_check | rule_triggered | call_integration | ask_question | ask_confirmation | block | self_review. */
3
+ export const TraceDecisionType = {
4
+ NoTool: "no_tool",
5
+ ActivateTool: "activate_tool",
6
+ ActivateSubTool: "activate_sub_tool",
7
+ ParamsCheck: "params_check",
8
+ RuleTriggered: "rule_triggered",
9
+ CallIntegration: "call_integration",
10
+ AskQuestion: "ask_question",
11
+ AskConfirmation: "ask_confirmation",
12
+ Block: "block",
13
+ SelfReview: "self_review",
14
+ ToolTextResponse: "tool_text_response",
15
+ };
@@ -0,0 +1,9 @@
1
+ import type * as Apollo from "../index.mjs";
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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -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,7 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ /** Entity source. Schema enum: external_context | user_message | response_mapping. */
3
+ export const TraceEntitySource = {
4
+ ExternalContext: "external_context",
5
+ UserMessage: "user_message",
6
+ ResponseMapping: "response_mapping",
7
+ };
@@ -0,0 +1,4 @@
1
+ export interface TraceGuardrails {
2
+ passed: boolean;
3
+ reason?: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,17 @@
1
+ import type * as Apollo from "../index.mjs";
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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Schema: message (required).
3
+ */
4
+ export interface TraceInput {
5
+ message: string;
6
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,5 @@
1
+ import type * as Apollo from "../index.mjs";
2
+ export interface TraceIntegrationResponse {
3
+ name: string;
4
+ items?: Apollo.TraceIntegrationResponseItem[];
5
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,5 @@
1
+ import type * as Apollo from "../index.mjs";
2
+ export interface TraceIntegrationResponseItem {
3
+ params?: Record<string, unknown>;
4
+ sub_entities?: Apollo.TraceApiResponseSubEntity[];
5
+ }