@aui.io/aui-client 3.1.2 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) hide show
  1. package/README.md +196 -69
  2. package/dist/cjs/ApolloClientWrapper.d.ts +52 -24
  3. package/dist/cjs/ApolloClientWrapper.js +86 -58
  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 +52 -24
  84. package/dist/esm/ApolloClientWrapper.mjs +83 -56
  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
@@ -8,16 +8,20 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
- import { mergeHeaders } from "../../../../core/headers.mjs";
11
+ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
12
12
  import * as core from "../../../../core/index.mjs";
13
13
  import * as environments from "../../../../environments.mjs";
14
14
  import * as errors from "../../../../errors/index.mjs";
15
15
  import * as Apollo from "../../../index.mjs";
16
16
  export class Threads {
17
- constructor(_options = {}) {
17
+ constructor(_options) {
18
18
  this._options = _options;
19
19
  }
20
20
  /**
21
+ * List your organization's conversation threads, newest first. Repeatable
22
+ * filters (``tool``, ``rule``, ``param``, ``created``) OR within a field and
23
+ * AND across fields.
24
+ *
21
25
  * @param {Apollo.ListThreadsRequest} request
22
26
  * @param {Threads.RequestOptions} requestOptions - Request-specific configuration.
23
27
  *
@@ -39,7 +43,7 @@ export class Threads {
39
43
  }
40
44
  __listThreads(request, requestOptions) {
41
45
  return __awaiter(this, void 0, void 0, function* () {
42
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
46
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
43
47
  const { filters, "page[size]": pageSize, "page[after]": pageAfter, "page[before]": pageBefore, sort_by: sortBy, sort_order: sortOrder, } = request;
44
48
  const _queryParams = {};
45
49
  _queryParams.filters = filters;
@@ -58,16 +62,19 @@ export class Threads {
58
62
  if (sortOrder != null) {
59
63
  _queryParams.sort_order = sortOrder;
60
64
  }
61
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
65
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
66
+ Authorization: yield this._getAuthorizationHeader(),
67
+ "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,
68
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
62
69
  const _response = yield core.fetcher({
63
- 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"),
70
+ 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"),
64
71
  method: "GET",
65
72
  headers: _headers,
66
73
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
67
- 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,
68
- 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,
74
+ 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,
75
+ 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,
69
76
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
70
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
77
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
71
78
  logging: this._options.logging,
72
79
  });
73
80
  if (_response.ok) {
@@ -115,6 +122,8 @@ export class Threads {
115
122
  });
116
123
  }
117
124
  /**
125
+ * Fetch one thread's details — title, participants, and status.
126
+ *
118
127
  * @param {string} threadId
119
128
  * @param {Threads.RequestOptions} requestOptions - Request-specific configuration.
120
129
  *
@@ -134,17 +143,20 @@ export class Threads {
134
143
  }
135
144
  __getThread(threadId, requestOptions) {
136
145
  return __awaiter(this, void 0, void 0, function* () {
137
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
138
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
146
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
147
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
148
+ Authorization: yield this._getAuthorizationHeader(),
149
+ "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,
150
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
139
151
  const _response = yield core.fetcher({
140
- 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)}`),
152
+ 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)}`),
141
153
  method: "GET",
142
154
  headers: _headers,
143
155
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
144
- 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,
145
- 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,
156
+ 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,
157
+ 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,
146
158
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
147
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
159
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
148
160
  logging: this._options.logging,
149
161
  });
150
162
  if (_response.ok) {
@@ -192,6 +204,96 @@ export class Threads {
192
204
  });
193
205
  }
194
206
  /**
207
+ * Partial update — only ``title`` is updatable for now. Omitted fields are
208
+ * left unchanged; the full updated thread is returned.
209
+ *
210
+ * @param {string} threadId
211
+ * @param {Apollo.UpdateThreadRequest} request
212
+ * @param {Threads.RequestOptions} requestOptions - Request-specific configuration.
213
+ *
214
+ * @throws {@link Apollo.BadRequestError}
215
+ * @throws {@link Apollo.UnauthorizedError}
216
+ * @throws {@link Apollo.ForbiddenError}
217
+ * @throws {@link Apollo.NotFoundError}
218
+ * @throws {@link Apollo.ConflictError}
219
+ * @throws {@link Apollo.UnprocessableEntityError}
220
+ * @throws {@link Apollo.InternalServerError}
221
+ *
222
+ * @example
223
+ * await client.threads.updateThread("threadId")
224
+ */
225
+ updateThread(threadId, request = {}, requestOptions) {
226
+ return core.HttpResponsePromise.fromPromise(this.__updateThread(threadId, request, requestOptions));
227
+ }
228
+ __updateThread(threadId_1) {
229
+ return __awaiter(this, arguments, void 0, function* (threadId, request = {}, requestOptions) {
230
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
231
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
232
+ Authorization: yield this._getAuthorizationHeader(),
233
+ "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,
234
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
235
+ const _response = yield core.fetcher({
236
+ 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)}`),
237
+ method: "PATCH",
238
+ headers: _headers,
239
+ contentType: "application/json",
240
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
241
+ requestType: "json",
242
+ body: request,
243
+ 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,
244
+ 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,
245
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
246
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
247
+ logging: this._options.logging,
248
+ });
249
+ if (_response.ok) {
250
+ return { data: _response.body, rawResponse: _response.rawResponse };
251
+ }
252
+ if (_response.error.reason === "status-code") {
253
+ switch (_response.error.statusCode) {
254
+ case 400:
255
+ throw new Apollo.BadRequestError(_response.error.body, _response.rawResponse);
256
+ case 401:
257
+ throw new Apollo.UnauthorizedError(_response.error.body, _response.rawResponse);
258
+ case 403:
259
+ throw new Apollo.ForbiddenError(_response.error.body, _response.rawResponse);
260
+ case 404:
261
+ throw new Apollo.NotFoundError(_response.error.body, _response.rawResponse);
262
+ case 409:
263
+ throw new Apollo.ConflictError(_response.error.body, _response.rawResponse);
264
+ case 422:
265
+ throw new Apollo.UnprocessableEntityError(_response.error.body, _response.rawResponse);
266
+ case 500:
267
+ throw new Apollo.InternalServerError(_response.error.body, _response.rawResponse);
268
+ default:
269
+ throw new errors.ApolloError({
270
+ statusCode: _response.error.statusCode,
271
+ body: _response.error.body,
272
+ rawResponse: _response.rawResponse,
273
+ });
274
+ }
275
+ }
276
+ switch (_response.error.reason) {
277
+ case "non-json":
278
+ throw new errors.ApolloError({
279
+ statusCode: _response.error.statusCode,
280
+ body: _response.error.rawBody,
281
+ rawResponse: _response.rawResponse,
282
+ });
283
+ case "timeout":
284
+ throw new errors.ApolloTimeoutError("Timeout exceeded when calling PATCH /management/v1/threads/{threadId}.");
285
+ case "unknown":
286
+ throw new errors.ApolloError({
287
+ message: _response.error.errorMessage,
288
+ rawResponse: _response.rawResponse,
289
+ });
290
+ }
291
+ });
292
+ }
293
+ /**
294
+ * The reasoning trace of every interaction in the thread — what the agent
295
+ * understood, which rules fired, and the decisions it took.
296
+ *
195
297
  * @param {string} threadId
196
298
  * @param {Threads.RequestOptions} requestOptions - Request-specific configuration.
197
299
  *
@@ -211,17 +313,20 @@ export class Threads {
211
313
  }
212
314
  __getThreadTrace(threadId, requestOptions) {
213
315
  return __awaiter(this, void 0, void 0, function* () {
214
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
215
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
316
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
317
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
318
+ Authorization: yield this._getAuthorizationHeader(),
319
+ "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,
320
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
216
321
  const _response = yield core.fetcher({
217
- 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`),
322
+ 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`),
218
323
  method: "GET",
219
324
  headers: _headers,
220
325
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
221
- 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,
222
- 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,
326
+ 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,
327
+ 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,
223
328
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
224
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
329
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
225
330
  logging: this._options.logging,
226
331
  });
227
332
  if (_response.ok) {
@@ -269,6 +374,8 @@ export class Threads {
269
374
  });
270
375
  }
271
376
  /**
377
+ * The reasoning trace of a single interaction, resolved by its id.
378
+ *
272
379
  * @param {string} interactionId
273
380
  * @param {Threads.RequestOptions} requestOptions - Request-specific configuration.
274
381
  *
@@ -288,17 +395,20 @@ export class Threads {
288
395
  }
289
396
  __getInteractionTrace(interactionId, requestOptions) {
290
397
  return __awaiter(this, void 0, void 0, function* () {
291
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
292
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
398
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
399
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
400
+ Authorization: yield this._getAuthorizationHeader(),
401
+ "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,
402
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
293
403
  const _response = yield core.fetcher({
294
- 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`),
404
+ 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`),
295
405
  method: "GET",
296
406
  headers: _headers,
297
407
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
298
- 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,
299
- 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,
408
+ 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,
409
+ 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,
300
410
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
301
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
411
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
302
412
  logging: this._options.logging,
303
413
  });
304
414
  if (_response.ok) {
@@ -346,6 +456,8 @@ export class Threads {
346
456
  });
347
457
  }
348
458
  /**
459
+ * The thread's full transcript, in chronological order.
460
+ *
349
461
  * @param {string} threadId
350
462
  * @param {Threads.RequestOptions} requestOptions - Request-specific configuration.
351
463
  *
@@ -365,17 +477,20 @@ export class Threads {
365
477
  }
366
478
  __getThreadMessages(threadId, requestOptions) {
367
479
  return __awaiter(this, void 0, void 0, function* () {
368
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
369
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
480
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
481
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
482
+ Authorization: yield this._getAuthorizationHeader(),
483
+ "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,
484
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
370
485
  const _response = yield core.fetcher({
371
- 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`),
486
+ 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`),
372
487
  method: "GET",
373
488
  headers: _headers,
374
489
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
375
- 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,
376
- 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,
490
+ 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,
491
+ 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,
377
492
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
378
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
493
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
379
494
  logging: this._options.logging,
380
495
  });
381
496
  if (_response.ok) {
@@ -422,4 +537,13 @@ export class Threads {
422
537
  }
423
538
  });
424
539
  }
540
+ _getAuthorizationHeader() {
541
+ return __awaiter(this, void 0, void 0, function* () {
542
+ const bearer = yield core.Supplier.get(this._options.token);
543
+ if (bearer != null) {
544
+ return `Bearer ${bearer}`;
545
+ }
546
+ return undefined;
547
+ });
548
+ }
425
549
  }
@@ -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.mjs";
2
+ export type { UpdateThreadRequest } from "./UpdateThreadRequest.mjs";
@@ -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.mjs";
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.mjs";
2
+ export interface PageAgentVersion {
3
+ results: Apollo.AgentVersion[];
4
+ meta: Apollo.PageMeta;
5
+ links: Apollo.PageLinks;
6
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,6 @@
1
+ import type * as Apollo from "../index.mjs";
2
+ export interface PageProject {
3
+ results: Apollo.Project[];
4
+ meta: Apollo.PageMeta;
5
+ links: Apollo.PageLinks;
6
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,6 @@
1
+ import type * as Apollo from "../index.mjs";
2
+ export interface PageThreadListItem {
3
+ results: Apollo.ThreadListItem[];
4
+ meta: Apollo.PageMeta;
5
+ links: Apollo.PageLinks;
6
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -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.mjs";
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.mjs";
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.mjs";
2
+ export * from "./AgentCreateResponse.mjs";
3
+ export * from "./AgentListFilters.mjs";
4
+ export * from "./AgentUpdateResponse.mjs";
5
+ export * from "./AgentVariables.mjs";
1
6
  export * from "./AgentVersion.mjs";
2
7
  export * from "./AgentVersionArchiveResponse.mjs";
3
8
  export * from "./AgentVersionCreateResponse.mjs";
@@ -6,6 +11,7 @@ export * from "./AgentVersionPublishResponse.mjs";
6
11
  export * from "./AgentVersionPullResponse.mjs";
7
12
  export * from "./AgentVersionPushResponse.mjs";
8
13
  export * from "./AgentVersionUpdateResponse.mjs";
14
+ export * from "./AgentVersionWelcomeMessageResponse.mjs";
9
15
  export * from "./ErrorBody.mjs";
10
16
  export * from "./ErrorDetail.mjs";
11
17
  export * from "./ErrorEnvelope.mjs";
@@ -13,16 +19,7 @@ export * from "./ErrorResponse.mjs";
13
19
  export * from "./ErrorStreamEvent.mjs";
14
20
  export * from "./EventEnvelope.mjs";
15
21
  export * from "./EventEnvelopeBase.mjs";
16
- export * from "./ExternalAgent.mjs";
17
- export * from "./ExternalAgentCreateResponse.mjs";
18
- export * from "./ExternalAgentListFilters.mjs";
19
- export * from "./ExternalAgentUpdateResponse.mjs";
20
- export * from "./ExternalPageAgentVersion.mjs";
21
- export * from "./ExternalPageExternalAgent.mjs";
22
- export * from "./ExternalPageLinks.mjs";
23
- export * from "./ExternalPageMeta.mjs";
24
- export * from "./ExternalPageProject.mjs";
25
- export * from "./ExternalPageThreadListItem.mjs";
22
+ export * from "./GenerateFollowupSuggestionsResponse.mjs";
26
23
  export * from "./HttpValidationError.mjs";
27
24
  export * from "./InitiateThreadResponse.mjs";
28
25
  export * from "./Message.mjs";
@@ -30,6 +27,12 @@ export * from "./MessageCard.mjs";
30
27
  export * from "./MessageEnvelope.mjs";
31
28
  export * from "./MessageParty.mjs";
32
29
  export * from "./MessageStreamEvent.mjs";
30
+ export * from "./PageAgent.mjs";
31
+ export * from "./PageAgentVersion.mjs";
32
+ export * from "./PageLinks.mjs";
33
+ export * from "./PageMeta.mjs";
34
+ export * from "./PageProject.mjs";
35
+ export * from "./PageThreadListItem.mjs";
33
36
  export * from "./Project.mjs";
34
37
  export * from "./ResumeRequest.mjs";
35
38
  export * from "./SendMessageRequest.mjs";