@aui.io/aui-client 3.1.2 → 3.2.1

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 (197) hide show
  1. package/README.md +226 -143
  2. package/dist/cjs/ApolloClientWrapper.d.ts +54 -26
  3. package/dist/cjs/ApolloClientWrapper.js +88 -64
  4. package/dist/cjs/BaseClient.d.ts +5 -0
  5. package/dist/cjs/Client.d.ts +4 -1
  6. package/dist/cjs/Client.js +24 -9
  7. package/dist/cjs/api/resources/agentVersions/client/Client.d.ts +26 -2
  8. package/dist/cjs/api/resources/agentVersions/client/Client.js +96 -43
  9. package/dist/cjs/api/resources/agentVersions/client/requests/AgentVersionPushRequest.d.ts +1 -1
  10. package/dist/cjs/api/resources/agents/client/Client.d.ts +22 -7
  11. package/dist/cjs/api/resources/agents/client/Client.js +80 -39
  12. package/dist/cjs/api/resources/agents/client/requests/{ExternalAgentCreateRequest.d.ts → AgentCreateRequest.d.ts} +1 -1
  13. package/dist/{esm/api/resources/agents/client/requests/ExternalAgentUpdateRequest.d.mts → cjs/api/resources/agents/client/requests/AgentUpdateRequest.d.ts} +1 -1
  14. package/dist/cjs/api/resources/agents/client/requests/ListAgentsRequest.d.ts +1 -1
  15. package/dist/cjs/api/resources/agents/client/requests/index.d.ts +2 -2
  16. package/dist/cjs/api/resources/auth/client/Client.d.ts +3 -2
  17. package/dist/cjs/api/resources/auth/client/Client.js +20 -8
  18. package/dist/cjs/api/resources/channels/client/Client.d.ts +7 -6
  19. package/dist/cjs/api/resources/channels/client/Client.js +24 -12
  20. package/dist/cjs/api/resources/channels/client/requests/InitiateThreadRequest.d.ts +3 -10
  21. package/dist/cjs/api/resources/messaging/client/Client.d.ts +51 -14
  22. package/dist/cjs/api/resources/messaging/client/Client.js +249 -50
  23. package/dist/cjs/api/resources/messaging/client/requests/GenerateFollowupSuggestionsRequest.d.ts +9 -0
  24. package/dist/cjs/api/resources/messaging/client/requests/RerunMessageRequest.d.ts +2 -2
  25. package/dist/cjs/api/resources/messaging/client/requests/StreamMessageRequest.d.ts +0 -1
  26. package/dist/cjs/api/resources/messaging/client/requests/index.d.ts +1 -0
  27. package/dist/cjs/api/resources/projects/client/Client.d.ts +14 -2
  28. package/dist/cjs/api/resources/projects/client/Client.js +66 -31
  29. package/dist/cjs/api/resources/session/client/Client.d.ts +2 -1
  30. package/dist/cjs/api/resources/session/client/Client.js +12 -2
  31. package/dist/cjs/api/resources/threads/client/Client.d.ts +37 -2
  32. package/dist/cjs/api/resources/threads/client/Client.js +155 -31
  33. package/dist/cjs/api/resources/threads/client/requests/UpdateThreadRequest.d.ts +8 -0
  34. package/dist/cjs/api/resources/threads/client/requests/index.d.ts +1 -0
  35. package/dist/cjs/api/types/{ExternalAgent.d.ts → Agent.d.ts} +1 -1
  36. package/dist/cjs/api/types/{ExternalAgentCreateResponse.d.ts → AgentCreateResponse.d.ts} +1 -1
  37. package/dist/cjs/api/types/{ExternalAgentListFilters.d.ts → AgentListFilters.d.ts} +1 -1
  38. package/dist/{esm/api/types/ExternalAgentUpdateResponse.d.mts → cjs/api/types/AgentUpdateResponse.d.ts} +1 -1
  39. package/dist/cjs/api/types/AgentVariables.d.ts +12 -0
  40. package/dist/cjs/api/types/AgentVersionPullResponse.d.ts +2 -3
  41. package/dist/cjs/api/types/AgentVersionPushResponse.d.ts +1 -1
  42. package/dist/cjs/api/types/AgentVersionWelcomeMessageResponse.d.ts +6 -0
  43. package/dist/cjs/api/types/GenerateFollowupSuggestionsResponse.d.ts +4 -0
  44. package/dist/cjs/api/types/PageAgent.d.ts +6 -0
  45. package/dist/cjs/api/types/PageAgentVersion.d.ts +6 -0
  46. package/dist/cjs/api/types/PageAgentVersion.js +3 -0
  47. package/dist/cjs/api/types/{ExternalPageLinks.d.ts → PageLinks.d.ts} +1 -1
  48. package/dist/cjs/api/types/PageLinks.js +3 -0
  49. package/dist/cjs/api/types/{ExternalPageMeta.d.ts → PageMeta.d.ts} +1 -1
  50. package/dist/cjs/api/types/PageMeta.js +3 -0
  51. package/dist/cjs/api/types/PageProject.d.ts +6 -0
  52. package/dist/cjs/api/types/PageProject.js +3 -0
  53. package/dist/cjs/api/types/PageThreadListItem.d.ts +6 -0
  54. package/dist/cjs/api/types/PageThreadListItem.js +3 -0
  55. package/dist/cjs/api/types/Project.d.ts +1 -1
  56. package/dist/cjs/api/types/SendMessageRequest.d.ts +7 -5
  57. package/dist/cjs/api/types/ThreadListFilters.d.ts +2 -5
  58. package/dist/cjs/api/types/TokenResponse.d.ts +4 -8
  59. package/dist/cjs/api/types/TraceDecision.d.ts +1 -2
  60. package/dist/cjs/api/types/VersionStats.d.ts +1 -2
  61. package/dist/cjs/api/types/index.d.ts +13 -10
  62. package/dist/cjs/api/types/index.js +13 -10
  63. package/dist/cjs/core/auth/AuthProvider.d.ts +4 -0
  64. package/dist/cjs/core/auth/AuthProvider.js +2 -0
  65. package/dist/cjs/core/auth/AuthRequest.d.ts +9 -0
  66. package/dist/cjs/core/auth/AuthRequest.js +2 -0
  67. package/dist/cjs/core/auth/BasicAuth.d.ts +8 -0
  68. package/dist/cjs/core/auth/BasicAuth.js +27 -0
  69. package/dist/cjs/core/auth/BearerToken.d.ts +5 -0
  70. package/dist/cjs/core/auth/BearerToken.js +15 -0
  71. package/dist/cjs/core/auth/index.d.ts +4 -0
  72. package/dist/cjs/core/auth/index.js +7 -0
  73. package/dist/cjs/core/base64.d.ts +2 -0
  74. package/dist/cjs/core/base64.js +26 -0
  75. package/dist/cjs/core/index.d.ts +2 -0
  76. package/dist/cjs/core/index.js +2 -0
  77. package/dist/cjs/environments.d.ts +2 -2
  78. package/dist/cjs/environments.js +2 -2
  79. package/dist/cjs/index.d.ts +1 -1
  80. package/dist/cjs/index.js +3 -2
  81. package/dist/cjs/version.d.ts +1 -1
  82. package/dist/cjs/version.js +1 -1
  83. package/dist/esm/ApolloClientWrapper.d.mts +54 -26
  84. package/dist/esm/ApolloClientWrapper.mjs +85 -62
  85. package/dist/esm/BaseClient.d.mts +5 -0
  86. package/dist/esm/Client.d.mts +4 -1
  87. package/dist/esm/Client.mjs +25 -10
  88. package/dist/esm/api/resources/agentVersions/client/Client.d.mts +26 -2
  89. package/dist/esm/api/resources/agentVersions/client/Client.mjs +97 -44
  90. package/dist/esm/api/resources/agentVersions/client/requests/AgentVersionPushRequest.d.mts +1 -1
  91. package/dist/esm/api/resources/agents/client/Client.d.mts +22 -7
  92. package/dist/esm/api/resources/agents/client/Client.mjs +81 -40
  93. package/dist/esm/api/resources/agents/client/requests/{ExternalAgentCreateRequest.d.mts → AgentCreateRequest.d.mts} +1 -1
  94. package/dist/{cjs/api/resources/agents/client/requests/ExternalAgentUpdateRequest.d.ts → esm/api/resources/agents/client/requests/AgentUpdateRequest.d.mts} +1 -1
  95. package/dist/esm/api/resources/agents/client/requests/ListAgentsRequest.d.mts +1 -1
  96. package/dist/esm/api/resources/agents/client/requests/index.d.mts +2 -2
  97. package/dist/esm/api/resources/auth/client/Client.d.mts +3 -2
  98. package/dist/esm/api/resources/auth/client/Client.mjs +21 -9
  99. package/dist/esm/api/resources/channels/client/Client.d.mts +7 -6
  100. package/dist/esm/api/resources/channels/client/Client.mjs +25 -13
  101. package/dist/esm/api/resources/channels/client/requests/InitiateThreadRequest.d.mts +3 -10
  102. package/dist/esm/api/resources/messaging/client/Client.d.mts +51 -14
  103. package/dist/esm/api/resources/messaging/client/Client.mjs +249 -50
  104. package/dist/esm/api/resources/messaging/client/requests/GenerateFollowupSuggestionsRequest.d.mts +9 -0
  105. package/dist/esm/api/resources/messaging/client/requests/RerunMessageRequest.d.mts +2 -2
  106. package/dist/esm/api/resources/messaging/client/requests/StreamMessageRequest.d.mts +0 -1
  107. package/dist/esm/api/resources/messaging/client/requests/index.d.mts +1 -0
  108. package/dist/esm/api/resources/projects/client/Client.d.mts +14 -2
  109. package/dist/esm/api/resources/projects/client/Client.mjs +67 -32
  110. package/dist/esm/api/resources/session/client/Client.d.mts +2 -1
  111. package/dist/esm/api/resources/session/client/Client.mjs +12 -2
  112. package/dist/esm/api/resources/threads/client/Client.d.mts +37 -2
  113. package/dist/esm/api/resources/threads/client/Client.mjs +156 -32
  114. package/dist/esm/api/resources/threads/client/requests/UpdateThreadRequest.d.mts +8 -0
  115. package/dist/esm/api/resources/threads/client/requests/index.d.mts +1 -0
  116. package/dist/esm/api/types/{ExternalAgent.d.mts → Agent.d.mts} +1 -1
  117. package/dist/esm/api/types/{ExternalAgentCreateResponse.d.mts → AgentCreateResponse.d.mts} +1 -1
  118. package/dist/esm/api/types/{ExternalAgentListFilters.d.mts → AgentListFilters.d.mts} +1 -1
  119. package/dist/{cjs/api/types/ExternalAgentUpdateResponse.d.ts → esm/api/types/AgentUpdateResponse.d.mts} +1 -1
  120. package/dist/esm/api/types/AgentVariables.d.mts +12 -0
  121. package/dist/esm/api/types/AgentVersionPullResponse.d.mts +2 -3
  122. package/dist/esm/api/types/AgentVersionPushResponse.d.mts +1 -1
  123. package/dist/esm/api/types/AgentVersionWelcomeMessageResponse.d.mts +6 -0
  124. package/dist/esm/api/types/GenerateFollowupSuggestionsResponse.d.mts +4 -0
  125. package/dist/esm/api/types/PageAgent.d.mts +6 -0
  126. package/dist/esm/api/types/PageAgentVersion.d.mts +6 -0
  127. package/dist/esm/api/types/PageAgentVersion.mjs +2 -0
  128. package/dist/esm/api/types/{ExternalPageLinks.d.mts → PageLinks.d.mts} +1 -1
  129. package/dist/esm/api/types/PageLinks.mjs +2 -0
  130. package/dist/esm/api/types/{ExternalPageMeta.d.mts → PageMeta.d.mts} +1 -1
  131. package/dist/esm/api/types/PageMeta.mjs +2 -0
  132. package/dist/esm/api/types/PageProject.d.mts +6 -0
  133. package/dist/esm/api/types/PageProject.mjs +2 -0
  134. package/dist/esm/api/types/PageThreadListItem.d.mts +6 -0
  135. package/dist/esm/api/types/PageThreadListItem.mjs +2 -0
  136. package/dist/esm/api/types/Project.d.mts +1 -1
  137. package/dist/esm/api/types/SendMessageRequest.d.mts +7 -5
  138. package/dist/esm/api/types/ThreadListFilters.d.mts +2 -5
  139. package/dist/esm/api/types/TokenResponse.d.mts +4 -8
  140. package/dist/esm/api/types/TraceDecision.d.mts +1 -2
  141. package/dist/esm/api/types/VersionStats.d.mts +1 -2
  142. package/dist/esm/api/types/index.d.mts +13 -10
  143. package/dist/esm/api/types/index.mjs +13 -10
  144. package/dist/esm/core/auth/AuthProvider.d.mts +4 -0
  145. package/dist/esm/core/auth/AuthProvider.mjs +1 -0
  146. package/dist/esm/core/auth/AuthRequest.d.mts +9 -0
  147. package/dist/esm/core/auth/AuthRequest.mjs +1 -0
  148. package/dist/esm/core/auth/BasicAuth.d.mts +8 -0
  149. package/dist/esm/core/auth/BasicAuth.mjs +24 -0
  150. package/dist/esm/core/auth/BearerToken.d.mts +5 -0
  151. package/dist/esm/core/auth/BearerToken.mjs +12 -0
  152. package/dist/esm/core/auth/index.d.mts +4 -0
  153. package/dist/esm/core/auth/index.mjs +2 -0
  154. package/dist/esm/core/base64.d.mts +2 -0
  155. package/dist/esm/core/base64.mjs +22 -0
  156. package/dist/esm/core/index.d.mts +2 -0
  157. package/dist/esm/core/index.mjs +2 -0
  158. package/dist/esm/environments.d.mts +2 -2
  159. package/dist/esm/environments.mjs +2 -2
  160. package/dist/esm/index.d.mts +1 -1
  161. package/dist/esm/index.mjs +1 -1
  162. package/dist/esm/version.d.mts +1 -1
  163. package/dist/esm/version.mjs +1 -1
  164. package/package.json +1 -1
  165. package/reference.md +568 -29
  166. package/dist/cjs/api/types/ExternalPageAgentVersion.d.ts +0 -6
  167. package/dist/cjs/api/types/ExternalPageExternalAgent.d.ts +0 -6
  168. package/dist/cjs/api/types/ExternalPageProject.d.ts +0 -6
  169. package/dist/cjs/api/types/ExternalPageThreadListItem.d.ts +0 -6
  170. package/dist/esm/api/types/ExternalPageAgentVersion.d.mts +0 -6
  171. package/dist/esm/api/types/ExternalPageExternalAgent.d.mts +0 -6
  172. package/dist/esm/api/types/ExternalPageProject.d.mts +0 -6
  173. package/dist/esm/api/types/ExternalPageThreadListItem.d.mts +0 -6
  174. /package/dist/cjs/api/resources/agents/client/requests/{ExternalAgentCreateRequest.js → AgentCreateRequest.js} +0 -0
  175. /package/dist/cjs/api/resources/agents/client/requests/{ExternalAgentUpdateRequest.js → AgentUpdateRequest.js} +0 -0
  176. /package/dist/cjs/api/{types/ExternalAgent.js → resources/messaging/client/requests/GenerateFollowupSuggestionsRequest.js} +0 -0
  177. /package/dist/cjs/api/{types/ExternalAgentCreateResponse.js → resources/threads/client/requests/UpdateThreadRequest.js} +0 -0
  178. /package/dist/cjs/api/types/{ExternalAgentListFilters.js → Agent.js} +0 -0
  179. /package/dist/cjs/api/types/{ExternalAgentUpdateResponse.js → AgentCreateResponse.js} +0 -0
  180. /package/dist/cjs/api/types/{ExternalPageAgentVersion.js → AgentListFilters.js} +0 -0
  181. /package/dist/cjs/api/types/{ExternalPageExternalAgent.js → AgentUpdateResponse.js} +0 -0
  182. /package/dist/cjs/api/types/{ExternalPageLinks.js → AgentVariables.js} +0 -0
  183. /package/dist/cjs/api/types/{ExternalPageMeta.js → AgentVersionWelcomeMessageResponse.js} +0 -0
  184. /package/dist/cjs/api/types/{ExternalPageProject.js → GenerateFollowupSuggestionsResponse.js} +0 -0
  185. /package/dist/cjs/api/types/{ExternalPageThreadListItem.js → PageAgent.js} +0 -0
  186. /package/dist/esm/api/resources/agents/client/requests/{ExternalAgentCreateRequest.mjs → AgentCreateRequest.mjs} +0 -0
  187. /package/dist/esm/api/resources/agents/client/requests/{ExternalAgentUpdateRequest.mjs → AgentUpdateRequest.mjs} +0 -0
  188. /package/dist/esm/api/{types/ExternalAgent.mjs → resources/messaging/client/requests/GenerateFollowupSuggestionsRequest.mjs} +0 -0
  189. /package/dist/esm/api/{types/ExternalAgentCreateResponse.mjs → resources/threads/client/requests/UpdateThreadRequest.mjs} +0 -0
  190. /package/dist/esm/api/types/{ExternalAgentListFilters.mjs → Agent.mjs} +0 -0
  191. /package/dist/esm/api/types/{ExternalAgentUpdateResponse.mjs → AgentCreateResponse.mjs} +0 -0
  192. /package/dist/esm/api/types/{ExternalPageAgentVersion.mjs → AgentListFilters.mjs} +0 -0
  193. /package/dist/esm/api/types/{ExternalPageExternalAgent.mjs → AgentUpdateResponse.mjs} +0 -0
  194. /package/dist/esm/api/types/{ExternalPageLinks.mjs → AgentVariables.mjs} +0 -0
  195. /package/dist/esm/api/types/{ExternalPageMeta.mjs → AgentVersionWelcomeMessageResponse.mjs} +0 -0
  196. /package/dist/esm/api/types/{ExternalPageProject.mjs → GenerateFollowupSuggestionsResponse.mjs} +0 -0
  197. /package/dist/esm/api/types/{ExternalPageThreadListItem.mjs → PageAgent.mjs} +0 -0
@@ -50,10 +50,14 @@ const environments = __importStar(require("../../../../environments.js"));
50
50
  const errors = __importStar(require("../../../../errors/index.js"));
51
51
  const Apollo = __importStar(require("../../../index.js"));
52
52
  class Threads {
53
- constructor(_options = {}) {
53
+ constructor(_options) {
54
54
  this._options = _options;
55
55
  }
56
56
  /**
57
+ * List your organization's conversation threads, newest first. Repeatable
58
+ * filters (``tool``, ``rule``, ``param``, ``created``) OR within a field and
59
+ * AND across fields.
60
+ *
57
61
  * @param {Apollo.ListThreadsRequest} request
58
62
  * @param {Threads.RequestOptions} requestOptions - Request-specific configuration.
59
63
  *
@@ -75,7 +79,7 @@ class Threads {
75
79
  }
76
80
  __listThreads(request, requestOptions) {
77
81
  return __awaiter(this, void 0, void 0, function* () {
78
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
82
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
79
83
  const { filters, "page[size]": pageSize, "page[after]": pageAfter, "page[before]": pageBefore, sort_by: sortBy, sort_order: sortOrder, } = request;
80
84
  const _queryParams = {};
81
85
  _queryParams.filters = filters;
@@ -94,16 +98,19 @@ class Threads {
94
98
  if (sortOrder != null) {
95
99
  _queryParams.sort_order = sortOrder;
96
100
  }
97
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
101
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
102
+ Authorization: yield this._getAuthorizationHeader(),
103
+ "x-organization-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.organizationApiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.organizationApiKey,
104
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
98
105
  const _response = yield core.fetcher({
99
- url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ApolloEnvironment.Gcp).base, "management/v1/threads"),
106
+ 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, "management/v1/threads"),
100
107
  method: "GET",
101
108
  headers: _headers,
102
109
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
103
- timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
104
- maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
110
+ 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,
111
+ 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,
105
112
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
106
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
113
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
107
114
  logging: this._options.logging,
108
115
  });
109
116
  if (_response.ok) {
@@ -151,6 +158,8 @@ class Threads {
151
158
  });
152
159
  }
153
160
  /**
161
+ * Fetch one thread's details — title, participants, and status.
162
+ *
154
163
  * @param {string} threadId
155
164
  * @param {Threads.RequestOptions} requestOptions - Request-specific configuration.
156
165
  *
@@ -170,17 +179,20 @@ class Threads {
170
179
  }
171
180
  __getThread(threadId, requestOptions) {
172
181
  return __awaiter(this, void 0, void 0, function* () {
173
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
174
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
182
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
183
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
184
+ Authorization: yield this._getAuthorizationHeader(),
185
+ "x-organization-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.organizationApiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.organizationApiKey,
186
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
175
187
  const _response = yield core.fetcher({
176
- url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ApolloEnvironment.Gcp).base, `management/v1/threads/${core.url.encodePathParam(threadId)}`),
188
+ 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, `management/v1/threads/${core.url.encodePathParam(threadId)}`),
177
189
  method: "GET",
178
190
  headers: _headers,
179
191
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
180
- timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
181
- maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
192
+ 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,
193
+ 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,
182
194
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
183
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
195
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
184
196
  logging: this._options.logging,
185
197
  });
186
198
  if (_response.ok) {
@@ -228,6 +240,96 @@ class Threads {
228
240
  });
229
241
  }
230
242
  /**
243
+ * Partial update — only ``title`` is updatable for now. Omitted fields are
244
+ * left unchanged; the full updated thread is returned.
245
+ *
246
+ * @param {string} threadId
247
+ * @param {Apollo.UpdateThreadRequest} request
248
+ * @param {Threads.RequestOptions} requestOptions - Request-specific configuration.
249
+ *
250
+ * @throws {@link Apollo.BadRequestError}
251
+ * @throws {@link Apollo.UnauthorizedError}
252
+ * @throws {@link Apollo.ForbiddenError}
253
+ * @throws {@link Apollo.NotFoundError}
254
+ * @throws {@link Apollo.ConflictError}
255
+ * @throws {@link Apollo.UnprocessableEntityError}
256
+ * @throws {@link Apollo.InternalServerError}
257
+ *
258
+ * @example
259
+ * await client.threads.updateThread("threadId")
260
+ */
261
+ updateThread(threadId, request = {}, requestOptions) {
262
+ return core.HttpResponsePromise.fromPromise(this.__updateThread(threadId, request, requestOptions));
263
+ }
264
+ __updateThread(threadId_1) {
265
+ return __awaiter(this, arguments, void 0, function* (threadId, request = {}, requestOptions) {
266
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
267
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
268
+ Authorization: yield this._getAuthorizationHeader(),
269
+ "x-organization-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.organizationApiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.organizationApiKey,
270
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
271
+ const _response = yield core.fetcher({
272
+ 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, `management/v1/threads/${core.url.encodePathParam(threadId)}`),
273
+ method: "PATCH",
274
+ headers: _headers,
275
+ contentType: "application/json",
276
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
277
+ requestType: "json",
278
+ body: request,
279
+ 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,
280
+ 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,
281
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
282
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
283
+ logging: this._options.logging,
284
+ });
285
+ if (_response.ok) {
286
+ return { data: _response.body, rawResponse: _response.rawResponse };
287
+ }
288
+ if (_response.error.reason === "status-code") {
289
+ switch (_response.error.statusCode) {
290
+ case 400:
291
+ throw new Apollo.BadRequestError(_response.error.body, _response.rawResponse);
292
+ case 401:
293
+ throw new Apollo.UnauthorizedError(_response.error.body, _response.rawResponse);
294
+ case 403:
295
+ throw new Apollo.ForbiddenError(_response.error.body, _response.rawResponse);
296
+ case 404:
297
+ throw new Apollo.NotFoundError(_response.error.body, _response.rawResponse);
298
+ case 409:
299
+ throw new Apollo.ConflictError(_response.error.body, _response.rawResponse);
300
+ case 422:
301
+ throw new Apollo.UnprocessableEntityError(_response.error.body, _response.rawResponse);
302
+ case 500:
303
+ throw new Apollo.InternalServerError(_response.error.body, _response.rawResponse);
304
+ default:
305
+ throw new errors.ApolloError({
306
+ statusCode: _response.error.statusCode,
307
+ body: _response.error.body,
308
+ rawResponse: _response.rawResponse,
309
+ });
310
+ }
311
+ }
312
+ switch (_response.error.reason) {
313
+ case "non-json":
314
+ throw new errors.ApolloError({
315
+ statusCode: _response.error.statusCode,
316
+ body: _response.error.rawBody,
317
+ rawResponse: _response.rawResponse,
318
+ });
319
+ case "timeout":
320
+ throw new errors.ApolloTimeoutError("Timeout exceeded when calling PATCH /management/v1/threads/{threadId}.");
321
+ case "unknown":
322
+ throw new errors.ApolloError({
323
+ message: _response.error.errorMessage,
324
+ rawResponse: _response.rawResponse,
325
+ });
326
+ }
327
+ });
328
+ }
329
+ /**
330
+ * The reasoning trace of every interaction in the thread — what the agent
331
+ * understood, which rules fired, and the decisions it took.
332
+ *
231
333
  * @param {string} threadId
232
334
  * @param {Threads.RequestOptions} requestOptions - Request-specific configuration.
233
335
  *
@@ -247,17 +349,20 @@ class Threads {
247
349
  }
248
350
  __getThreadTrace(threadId, requestOptions) {
249
351
  return __awaiter(this, void 0, void 0, function* () {
250
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
251
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
352
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
353
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
354
+ Authorization: yield this._getAuthorizationHeader(),
355
+ "x-organization-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.organizationApiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.organizationApiKey,
356
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
252
357
  const _response = yield core.fetcher({
253
- url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ApolloEnvironment.Gcp).base, `management/v1/threads/${core.url.encodePathParam(threadId)}/trace`),
358
+ 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, `management/v1/threads/${core.url.encodePathParam(threadId)}/trace`),
254
359
  method: "GET",
255
360
  headers: _headers,
256
361
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
257
- timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
258
- maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
362
+ 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,
363
+ 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,
259
364
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
260
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
365
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
261
366
  logging: this._options.logging,
262
367
  });
263
368
  if (_response.ok) {
@@ -305,6 +410,8 @@ class Threads {
305
410
  });
306
411
  }
307
412
  /**
413
+ * The reasoning trace of a single interaction, resolved by its id.
414
+ *
308
415
  * @param {string} interactionId
309
416
  * @param {Threads.RequestOptions} requestOptions - Request-specific configuration.
310
417
  *
@@ -324,17 +431,20 @@ class Threads {
324
431
  }
325
432
  __getInteractionTrace(interactionId, requestOptions) {
326
433
  return __awaiter(this, void 0, void 0, function* () {
327
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
328
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
434
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
435
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
436
+ Authorization: yield this._getAuthorizationHeader(),
437
+ "x-organization-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.organizationApiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.organizationApiKey,
438
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
329
439
  const _response = yield core.fetcher({
330
- url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ApolloEnvironment.Gcp).base, `management/v1/interactions/${core.url.encodePathParam(interactionId)}/trace`),
440
+ 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, `management/v1/interactions/${core.url.encodePathParam(interactionId)}/trace`),
331
441
  method: "GET",
332
442
  headers: _headers,
333
443
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
334
- timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
335
- maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
444
+ 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,
445
+ 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,
336
446
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
337
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
447
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
338
448
  logging: this._options.logging,
339
449
  });
340
450
  if (_response.ok) {
@@ -382,6 +492,8 @@ class Threads {
382
492
  });
383
493
  }
384
494
  /**
495
+ * The thread's full transcript, in chronological order.
496
+ *
385
497
  * @param {string} threadId
386
498
  * @param {Threads.RequestOptions} requestOptions - Request-specific configuration.
387
499
  *
@@ -401,17 +513,20 @@ class Threads {
401
513
  }
402
514
  __getThreadMessages(threadId, requestOptions) {
403
515
  return __awaiter(this, void 0, void 0, function* () {
404
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
405
- const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
516
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
517
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
518
+ Authorization: yield this._getAuthorizationHeader(),
519
+ "x-organization-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.organizationApiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.organizationApiKey,
520
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
406
521
  const _response = yield core.fetcher({
407
- url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.ApolloEnvironment.Gcp).base, `management/v1/threads/${core.url.encodePathParam(threadId)}/messages`),
522
+ 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, `management/v1/threads/${core.url.encodePathParam(threadId)}/messages`),
408
523
  method: "GET",
409
524
  headers: _headers,
410
525
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
411
- timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
412
- maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
526
+ 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,
527
+ 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,
413
528
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
414
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
529
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
415
530
  logging: this._options.logging,
416
531
  });
417
532
  if (_response.ok) {
@@ -458,5 +573,14 @@ class Threads {
458
573
  }
459
574
  });
460
575
  }
576
+ _getAuthorizationHeader() {
577
+ return __awaiter(this, void 0, void 0, function* () {
578
+ const bearer = yield core.Supplier.get(this._options.token);
579
+ if (bearer != null) {
580
+ return `Bearer ${bearer}`;
581
+ }
582
+ return undefined;
583
+ });
584
+ }
461
585
  }
462
586
  exports.Threads = Threads;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @example
3
+ * {}
4
+ */
5
+ export interface UpdateThreadRequest {
6
+ /** New thread title; omit to leave the title unchanged. */
7
+ title?: string;
8
+ }
@@ -1 +1,2 @@
1
1
  export type { ListThreadsRequest } from "./ListThreadsRequest.js";
2
+ export type { UpdateThreadRequest } from "./UpdateThreadRequest.js";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * The published Agent shape.
3
3
  */
4
- export interface ExternalAgent {
4
+ export interface Agent {
5
5
  /** Agent id */
6
6
  id: string;
7
7
  /** Owning project id */
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Returns the created agent.
3
3
  */
4
- export interface ExternalAgentCreateResponse {
4
+ export interface AgentCreateResponse {
5
5
  /** Agent id */
6
6
  id: string;
7
7
  /** Owning project id */
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Query filters for listing agents in a project.
3
3
  */
4
- export interface ExternalAgentListFilters {
4
+ export interface AgentListFilters {
5
5
  /** Case-insensitive substring match on name */
6
6
  name?: string;
7
7
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Returns the updated agent.
3
3
  */
4
- export interface ExternalAgentUpdateResponse {
4
+ export interface AgentUpdateResponse {
5
5
  /** Agent id */
6
6
  id: string;
7
7
  /** Owning project id */
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Per-message values for the agent's configured context variables:
3
+ * ``static`` values substitute the static context's ``{{placeholders}}``;
4
+ * ``dynamic`` values parameterize the dynamic-context API calls. On a key
5
+ * collision, the ``dynamic`` value wins.
6
+ */
7
+ export interface AgentVariables {
8
+ /** Values substituted into the agent's static context placeholders. */
9
+ static?: Record<string, string>;
10
+ /** Values for the variables of the agent's dynamic-context API calls. */
11
+ dynamic?: Record<string, string>;
12
+ }
@@ -1,13 +1,12 @@
1
1
  /**
2
- * A version's config bundle — full parity with agent-settings, clients
3
- * already know this shape (per the original push/pull design).
2
+ * A version's configuration bundle.
4
3
  */
5
4
  export interface AgentVersionPullResponse {
6
5
  return_type?: string;
7
6
  agent_id: string;
8
7
  version_id: string;
9
8
  version_tag: string;
10
- /** Parsed agent-settings bundle */
9
+ /** Parsed agent configuration bundle */
11
10
  bundle: Record<string, unknown>;
12
11
  /** Cache-metadata expiry for this payload */
13
12
  expires_at: string;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Result of a push. ``gcs_key`` (raw storage path) is not exposed.
2
+ * Result of a push: the new revision's identity and content digest.
3
3
  */
4
4
  export interface AgentVersionPushResponse {
5
5
  agent_id: string;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * The agent's welcome message (from ``general_settings.welcome_message``).
3
+ */
4
+ export interface AgentVersionWelcomeMessageResponse {
5
+ welcome_message?: string;
6
+ }
@@ -0,0 +1,4 @@
1
+ export interface GenerateFollowupSuggestionsResponse {
2
+ suggestions?: string[];
3
+ metadata_id?: string;
4
+ }
@@ -0,0 +1,6 @@
1
+ import type * as Apollo from "../index.js";
2
+ export interface PageAgent {
3
+ results: Apollo.Agent[];
4
+ meta: Apollo.PageMeta;
5
+ links: Apollo.PageLinks;
6
+ }
@@ -0,0 +1,6 @@
1
+ import type * as Apollo from "../index.js";
2
+ export interface PageAgentVersion {
3
+ results: Apollo.AgentVersion[];
4
+ meta: Apollo.PageMeta;
5
+ links: Apollo.PageLinks;
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 });
@@ -1,4 +1,4 @@
1
- export interface ExternalPageLinks {
1
+ export interface PageLinks {
2
2
  next?: string;
3
3
  prev?: string;
4
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 });
@@ -1,4 +1,4 @@
1
- export interface ExternalPageMeta {
1
+ export interface PageMeta {
2
2
  has_more: boolean;
3
3
  after_cursor?: string;
4
4
  before_cursor?: string;
@@ -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
+ import type * as Apollo from "../index.js";
2
+ export interface PageProject {
3
+ results: Apollo.Project[];
4
+ meta: Apollo.PageMeta;
5
+ links: Apollo.PageLinks;
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,6 @@
1
+ import type * as Apollo from "../index.js";
2
+ export interface PageThreadListItem {
3
+ results: Apollo.ThreadListItem[];
4
+ meta: Apollo.PageMeta;
5
+ links: Apollo.PageLinks;
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 });
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The published Project shape (SDK entity: ``Project``).
2
+ * A project groups your agents within an organization.
3
3
  */
4
4
  export interface Project {
5
5
  /** Project id */
@@ -1,13 +1,15 @@
1
+ import type * as Apollo from "../index.js";
1
2
  /**
2
- * Send-message contract. ``agent_id`` is required; org comes from the gateway
3
- * header, not the body. ``thread_id`` is optional: present -> append to that
4
- * thread; absent -> a new thread is auto-created and its id returned.
3
+ * Send a message to your agent the agent is identified by your access
4
+ * token. ``thread_id`` is optional: present -> append to that thread; absent
5
+ * -> a new thread is created automatically and its id returned.
5
6
  */
6
7
  export interface SendMessageRequest {
7
- agent_id: string;
8
8
  text: string;
9
9
  user_id: string;
10
10
  thread_id?: string;
11
- /** Signed image URL for vision input; forwarded to IA as body.image.signed_url. */
11
+ /** Signed image URL for vision input. */
12
12
  image_url?: string;
13
+ /** Per-message values for the agent's configured context variables. */
14
+ agent_variables?: Apollo.AgentVariables;
13
15
  }
@@ -1,9 +1,6 @@
1
1
  /**
2
- * Query params for ``GET /management/v1/threads`` the thread-filter DSL.
3
- *
4
- * The full grammar is modeled and shape-validated here; malformed values 422 at
5
- * the boundary. Translation to intelligent-agent, and rejection of the filters it
6
- * doesn't serve, lives in ``mapping.internal_thread_filters_from_external``.
2
+ * Query filters for listing threads. Repeatable filters (``tool``,
3
+ * ``rule``, ``param``, ``created``) OR within a field and AND across fields.
7
4
  */
8
5
  export interface ThreadListFilters {
9
6
  /** Filter by project (account) id */
@@ -1,12 +1,8 @@
1
1
  /**
2
- * RFC 6749 §5.1 successful token response.
3
- *
4
- * Extended with the network's ``agent_id`` and ``organization_id``. RFC 6749
5
- * §5.1 permits additional response parameters, so they ride alongside the
6
- * standard token fields. ``organization_id`` is a passthrough from identity's
7
- * PK-exchange result; ``agent_id`` is resolved from agent-settings by the PK's
8
- * network scope and is ``None`` when the network has no agent (or the PK is not
9
- * network-scoped).
2
+ * Successful token response (RFC 6749 §5.1), extended with the agent and
3
+ * organization behind the exchanged key. Send the token as
4
+ * ``Authorization: Bearer <access_token>``; ``agent_id`` is the agent your
5
+ * messaging calls run against (``null`` when the key carries no agent).
10
6
  */
11
7
  export interface TokenResponse {
12
8
  access_token: string;
@@ -1,7 +1,6 @@
1
1
  import type * as Apollo from "../index.js";
2
2
  /**
3
- * Shared structural fields across decision variants. ``call_integration``
4
- * decisions are filtered out by the scrub before this model is built.
3
+ * One decision the agent took while handling the message.
5
4
  */
6
5
  export interface TraceDecision {
7
6
  type?: string;
@@ -1,6 +1,5 @@
1
1
  /**
2
- * Counts of cloned/configured entities in a version — the customer's own
3
- * config counts, not upstream plumbing.
2
+ * Counts of the entities configured in a version.
4
3
  */
5
4
  export interface VersionStats {
6
5
  workflows?: number;
@@ -1,3 +1,8 @@
1
+ export * from "./Agent.js";
2
+ export * from "./AgentCreateResponse.js";
3
+ export * from "./AgentListFilters.js";
4
+ export * from "./AgentUpdateResponse.js";
5
+ export * from "./AgentVariables.js";
1
6
  export * from "./AgentVersion.js";
2
7
  export * from "./AgentVersionArchiveResponse.js";
3
8
  export * from "./AgentVersionCreateResponse.js";
@@ -6,6 +11,7 @@ export * from "./AgentVersionPublishResponse.js";
6
11
  export * from "./AgentVersionPullResponse.js";
7
12
  export * from "./AgentVersionPushResponse.js";
8
13
  export * from "./AgentVersionUpdateResponse.js";
14
+ export * from "./AgentVersionWelcomeMessageResponse.js";
9
15
  export * from "./ErrorBody.js";
10
16
  export * from "./ErrorDetail.js";
11
17
  export * from "./ErrorEnvelope.js";
@@ -13,16 +19,7 @@ export * from "./ErrorResponse.js";
13
19
  export * from "./ErrorStreamEvent.js";
14
20
  export * from "./EventEnvelope.js";
15
21
  export * from "./EventEnvelopeBase.js";
16
- export * from "./ExternalAgent.js";
17
- export * from "./ExternalAgentCreateResponse.js";
18
- export * from "./ExternalAgentListFilters.js";
19
- export * from "./ExternalAgentUpdateResponse.js";
20
- export * from "./ExternalPageAgentVersion.js";
21
- export * from "./ExternalPageExternalAgent.js";
22
- export * from "./ExternalPageLinks.js";
23
- export * from "./ExternalPageMeta.js";
24
- export * from "./ExternalPageProject.js";
25
- export * from "./ExternalPageThreadListItem.js";
22
+ export * from "./GenerateFollowupSuggestionsResponse.js";
26
23
  export * from "./HttpValidationError.js";
27
24
  export * from "./InitiateThreadResponse.js";
28
25
  export * from "./Message.js";
@@ -30,6 +27,12 @@ export * from "./MessageCard.js";
30
27
  export * from "./MessageEnvelope.js";
31
28
  export * from "./MessageParty.js";
32
29
  export * from "./MessageStreamEvent.js";
30
+ export * from "./PageAgent.js";
31
+ export * from "./PageAgentVersion.js";
32
+ export * from "./PageLinks.js";
33
+ export * from "./PageMeta.js";
34
+ export * from "./PageProject.js";
35
+ export * from "./PageThreadListItem.js";
33
36
  export * from "./Project.js";
34
37
  export * from "./ResumeRequest.js";
35
38
  export * from "./SendMessageRequest.js";