@inconvoai/node 0.4.0 → 0.5.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 (284) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +36 -19
  3. package/client.d.mts +0 -9
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +0 -9
  6. package/client.d.ts.map +1 -1
  7. package/client.js +0 -9
  8. package/client.js.map +1 -1
  9. package/client.mjs +0 -9
  10. package/client.mjs.map +1 -1
  11. package/index.d.mts +1 -1
  12. package/index.d.ts +1 -1
  13. package/package.json +1 -1
  14. package/resources/agents/agents.d.mts +12 -0
  15. package/resources/agents/agents.d.mts.map +1 -1
  16. package/resources/agents/agents.d.ts +12 -0
  17. package/resources/agents/agents.d.ts.map +1 -1
  18. package/resources/agents/agents.js +12 -0
  19. package/resources/agents/agents.js.map +1 -1
  20. package/resources/agents/agents.mjs +12 -0
  21. package/resources/agents/agents.mjs.map +1 -1
  22. package/resources/{conversations → agents/conversations}/conversations.d.mts +24 -13
  23. package/resources/agents/conversations/conversations.d.mts.map +1 -0
  24. package/resources/{conversations → agents/conversations}/conversations.d.ts +24 -13
  25. package/resources/agents/conversations/conversations.d.ts.map +1 -0
  26. package/resources/agents/conversations/conversations.js +64 -0
  27. package/resources/agents/conversations/conversations.js.map +1 -0
  28. package/resources/agents/conversations/conversations.mjs +59 -0
  29. package/resources/agents/conversations/conversations.mjs.map +1 -0
  30. package/resources/{conversations → agents/conversations}/index.d.mts +1 -1
  31. package/resources/agents/conversations/index.d.mts.map +1 -0
  32. package/resources/{conversations → agents/conversations}/index.d.ts +1 -1
  33. package/resources/agents/conversations/index.d.ts.map +1 -0
  34. package/resources/agents/conversations/index.js.map +1 -0
  35. package/resources/agents/conversations/index.mjs.map +1 -0
  36. package/resources/{conversations → agents/conversations}/response/feedback.d.mts +25 -9
  37. package/resources/agents/conversations/response/feedback.d.mts.map +1 -0
  38. package/resources/{conversations → agents/conversations}/response/feedback.d.ts +25 -9
  39. package/resources/agents/conversations/response/feedback.d.ts.map +1 -0
  40. package/resources/agents/conversations/response/feedback.js +50 -0
  41. package/resources/agents/conversations/response/feedback.js.map +1 -0
  42. package/resources/agents/conversations/response/feedback.mjs +46 -0
  43. package/resources/agents/conversations/response/feedback.mjs.map +1 -0
  44. package/resources/agents/conversations/response/index.d.mts.map +1 -0
  45. package/resources/agents/conversations/response/index.d.ts.map +1 -0
  46. package/resources/agents/conversations/response/index.js.map +1 -0
  47. package/resources/agents/conversations/response/index.mjs.map +1 -0
  48. package/resources/{conversations → agents/conversations}/response/response.d.mts +30 -15
  49. package/resources/agents/conversations/response/response.d.mts.map +1 -0
  50. package/resources/{conversations → agents/conversations}/response/response.d.ts +30 -15
  51. package/resources/agents/conversations/response/response.d.ts.map +1 -0
  52. package/resources/{conversations → agents/conversations}/response/response.js +17 -13
  53. package/resources/agents/conversations/response/response.js.map +1 -0
  54. package/resources/{conversations → agents/conversations}/response/response.mjs +16 -12
  55. package/resources/agents/conversations/response/response.mjs.map +1 -0
  56. package/resources/agents/conversations/response.d.mts.map +1 -0
  57. package/resources/agents/conversations/response.d.ts.map +1 -0
  58. package/resources/{conversations → agents/conversations}/response.js +1 -1
  59. package/resources/agents/conversations/response.js.map +1 -0
  60. package/resources/agents/conversations/response.mjs.map +1 -0
  61. package/resources/agents/conversations.d.mts.map +1 -0
  62. package/resources/agents/conversations.d.ts.map +1 -0
  63. package/resources/{conversations.js → agents/conversations.js} +1 -1
  64. package/resources/agents/conversations.js.map +1 -0
  65. package/resources/agents/conversations.mjs.map +1 -0
  66. package/resources/agents/data-summary.d.mts +7 -1
  67. package/resources/agents/data-summary.d.mts.map +1 -1
  68. package/resources/agents/data-summary.d.ts +7 -1
  69. package/resources/agents/data-summary.d.ts.map +1 -1
  70. package/resources/agents/data-summary.js +9 -2
  71. package/resources/agents/data-summary.js.map +1 -1
  72. package/resources/agents/data-summary.mjs +9 -2
  73. package/resources/agents/data-summary.mjs.map +1 -1
  74. package/resources/{datasets → agents/datasets}/context.d.mts +28 -13
  75. package/resources/agents/datasets/context.d.mts.map +1 -0
  76. package/resources/{datasets → agents/datasets}/context.d.ts +28 -13
  77. package/resources/agents/datasets/context.d.ts.map +1 -0
  78. package/resources/agents/datasets/context.js +64 -0
  79. package/resources/agents/datasets/context.js.map +1 -0
  80. package/resources/agents/datasets/context.mjs +60 -0
  81. package/resources/agents/datasets/context.mjs.map +1 -0
  82. package/resources/{datasets → agents/datasets}/datasets.d.mts +3 -3
  83. package/resources/agents/datasets/datasets.d.mts.map +1 -0
  84. package/resources/{datasets → agents/datasets}/datasets.d.ts +3 -3
  85. package/resources/agents/datasets/datasets.d.ts.map +1 -0
  86. package/resources/{datasets → agents/datasets}/datasets.js +2 -2
  87. package/resources/agents/datasets/datasets.js.map +1 -0
  88. package/resources/{datasets → agents/datasets}/datasets.mjs +1 -1
  89. package/resources/agents/datasets/datasets.mjs.map +1 -0
  90. package/resources/{datasets → agents/datasets}/index.d.mts +1 -1
  91. package/resources/agents/datasets/index.d.mts.map +1 -0
  92. package/resources/{datasets → agents/datasets}/index.d.ts +1 -1
  93. package/resources/agents/datasets/index.d.ts.map +1 -0
  94. package/resources/agents/datasets/index.js.map +1 -0
  95. package/resources/agents/datasets/index.mjs.map +1 -0
  96. package/resources/agents/datasets/user.d.mts +98 -0
  97. package/resources/agents/datasets/user.d.mts.map +1 -0
  98. package/resources/agents/datasets/user.d.ts +98 -0
  99. package/resources/agents/datasets/user.d.ts.map +1 -0
  100. package/resources/agents/datasets/user.js +59 -0
  101. package/resources/agents/datasets/user.js.map +1 -0
  102. package/resources/agents/datasets/user.mjs +55 -0
  103. package/resources/agents/datasets/user.mjs.map +1 -0
  104. package/resources/agents/datasets.d.mts.map +1 -0
  105. package/resources/agents/datasets.d.ts.map +1 -0
  106. package/resources/{datasets.js → agents/datasets.js} +1 -1
  107. package/resources/agents/datasets.js.map +1 -0
  108. package/resources/agents/datasets.mjs.map +1 -0
  109. package/resources/agents/index.d.mts +3 -0
  110. package/resources/agents/index.d.mts.map +1 -1
  111. package/resources/agents/index.d.ts +3 -0
  112. package/resources/agents/index.d.ts.map +1 -1
  113. package/resources/agents/index.js +7 -1
  114. package/resources/agents/index.js.map +1 -1
  115. package/resources/agents/index.mjs +3 -0
  116. package/resources/agents/index.mjs.map +1 -1
  117. package/resources/agents/mcp-servers/index.d.mts +3 -0
  118. package/resources/agents/mcp-servers/index.d.mts.map +1 -0
  119. package/resources/agents/mcp-servers/index.d.ts +3 -0
  120. package/resources/agents/mcp-servers/index.d.ts.map +1 -0
  121. package/resources/agents/mcp-servers/index.js.map +1 -0
  122. package/resources/agents/mcp-servers/index.mjs.map +1 -0
  123. package/resources/agents/mcp-servers/mcp-servers.d.mts +10 -0
  124. package/resources/agents/mcp-servers/mcp-servers.d.mts.map +1 -0
  125. package/resources/agents/mcp-servers/mcp-servers.d.ts +10 -0
  126. package/resources/agents/mcp-servers/mcp-servers.d.ts.map +1 -0
  127. package/resources/{mcp-servers → agents/mcp-servers}/mcp-servers.js +2 -2
  128. package/resources/agents/mcp-servers/mcp-servers.js.map +1 -0
  129. package/resources/{mcp-servers → agents/mcp-servers}/mcp-servers.mjs +2 -2
  130. package/resources/agents/mcp-servers/mcp-servers.mjs.map +1 -0
  131. package/resources/agents/mcp-servers/tenants.d.mts +79 -0
  132. package/resources/agents/mcp-servers/tenants.d.mts.map +1 -0
  133. package/resources/agents/mcp-servers/tenants.d.ts +79 -0
  134. package/resources/agents/mcp-servers/tenants.d.ts.map +1 -0
  135. package/resources/agents/mcp-servers/tenants.js +50 -0
  136. package/resources/agents/mcp-servers/tenants.js.map +1 -0
  137. package/resources/agents/mcp-servers/tenants.mjs +46 -0
  138. package/resources/agents/mcp-servers/tenants.mjs.map +1 -0
  139. package/resources/agents/mcp-servers.d.mts.map +1 -0
  140. package/resources/agents/mcp-servers.d.ts.map +1 -0
  141. package/resources/{mcp-servers.js → agents/mcp-servers.js} +1 -1
  142. package/resources/agents/mcp-servers.js.map +1 -0
  143. package/resources/agents/mcp-servers.mjs.map +1 -0
  144. package/resources/index.d.mts +0 -3
  145. package/resources/index.d.mts.map +1 -1
  146. package/resources/index.d.ts +0 -3
  147. package/resources/index.d.ts.map +1 -1
  148. package/resources/index.js +1 -7
  149. package/resources/index.js.map +1 -1
  150. package/resources/index.mjs +0 -3
  151. package/resources/index.mjs.map +1 -1
  152. package/src/client.ts +0 -31
  153. package/src/index.ts +1 -1
  154. package/src/resources/agents/agents.ts +36 -0
  155. package/src/resources/{conversations → agents/conversations}/conversations.ts +42 -18
  156. package/src/resources/{conversations → agents/conversations}/index.ts +1 -0
  157. package/src/resources/{conversations → agents/conversations}/response/feedback.ts +38 -20
  158. package/src/resources/{conversations → agents/conversations}/response/response.ts +45 -23
  159. package/src/resources/agents/data-summary.ts +9 -2
  160. package/src/resources/{datasets → agents/datasets}/context.ts +42 -21
  161. package/src/resources/{datasets → agents/datasets}/datasets.ts +3 -1
  162. package/src/resources/{datasets → agents/datasets}/index.ts +1 -0
  163. package/src/resources/agents/datasets/user.ts +151 -0
  164. package/src/resources/agents/index.ts +12 -0
  165. package/src/resources/{mcp-servers → agents/mcp-servers}/index.ts +1 -0
  166. package/src/resources/{mcp-servers → agents/mcp-servers}/mcp-servers.ts +9 -2
  167. package/src/resources/agents/mcp-servers/tenants.ts +108 -0
  168. package/src/resources/index.ts +0 -11
  169. package/src/version.ts +1 -1
  170. package/version.d.mts +1 -1
  171. package/version.d.ts +1 -1
  172. package/version.js +1 -1
  173. package/version.mjs +1 -1
  174. package/resources/conversations/conversations.d.mts.map +0 -1
  175. package/resources/conversations/conversations.d.ts.map +0 -1
  176. package/resources/conversations/conversations.js +0 -61
  177. package/resources/conversations/conversations.js.map +0 -1
  178. package/resources/conversations/conversations.mjs +0 -56
  179. package/resources/conversations/conversations.mjs.map +0 -1
  180. package/resources/conversations/index.d.mts.map +0 -1
  181. package/resources/conversations/index.d.ts.map +0 -1
  182. package/resources/conversations/index.js.map +0 -1
  183. package/resources/conversations/index.mjs.map +0 -1
  184. package/resources/conversations/response/feedback.d.mts.map +0 -1
  185. package/resources/conversations/response/feedback.d.ts.map +0 -1
  186. package/resources/conversations/response/feedback.js +0 -48
  187. package/resources/conversations/response/feedback.js.map +0 -1
  188. package/resources/conversations/response/feedback.mjs +0 -44
  189. package/resources/conversations/response/feedback.mjs.map +0 -1
  190. package/resources/conversations/response/index.d.mts.map +0 -1
  191. package/resources/conversations/response/index.d.ts.map +0 -1
  192. package/resources/conversations/response/index.js.map +0 -1
  193. package/resources/conversations/response/index.mjs.map +0 -1
  194. package/resources/conversations/response/response.d.mts.map +0 -1
  195. package/resources/conversations/response/response.d.ts.map +0 -1
  196. package/resources/conversations/response/response.js.map +0 -1
  197. package/resources/conversations/response/response.mjs.map +0 -1
  198. package/resources/conversations/response.d.mts.map +0 -1
  199. package/resources/conversations/response.d.ts.map +0 -1
  200. package/resources/conversations/response.js.map +0 -1
  201. package/resources/conversations/response.mjs.map +0 -1
  202. package/resources/conversations.d.mts.map +0 -1
  203. package/resources/conversations.d.ts.map +0 -1
  204. package/resources/conversations.js.map +0 -1
  205. package/resources/conversations.mjs.map +0 -1
  206. package/resources/datasets/context.d.mts.map +0 -1
  207. package/resources/datasets/context.d.ts.map +0 -1
  208. package/resources/datasets/context.js +0 -61
  209. package/resources/datasets/context.js.map +0 -1
  210. package/resources/datasets/context.mjs +0 -57
  211. package/resources/datasets/context.mjs.map +0 -1
  212. package/resources/datasets/datasets.d.mts.map +0 -1
  213. package/resources/datasets/datasets.d.ts.map +0 -1
  214. package/resources/datasets/datasets.js.map +0 -1
  215. package/resources/datasets/datasets.mjs.map +0 -1
  216. package/resources/datasets/index.d.mts.map +0 -1
  217. package/resources/datasets/index.d.ts.map +0 -1
  218. package/resources/datasets/index.js.map +0 -1
  219. package/resources/datasets/index.mjs.map +0 -1
  220. package/resources/datasets/user.d.mts +0 -77
  221. package/resources/datasets/user.d.mts.map +0 -1
  222. package/resources/datasets/user.d.ts +0 -77
  223. package/resources/datasets/user.d.ts.map +0 -1
  224. package/resources/datasets/user.js +0 -50
  225. package/resources/datasets/user.js.map +0 -1
  226. package/resources/datasets/user.mjs +0 -46
  227. package/resources/datasets/user.mjs.map +0 -1
  228. package/resources/datasets.d.mts.map +0 -1
  229. package/resources/datasets.d.ts.map +0 -1
  230. package/resources/datasets.js.map +0 -1
  231. package/resources/datasets.mjs.map +0 -1
  232. package/resources/mcp-servers/index.d.mts +0 -3
  233. package/resources/mcp-servers/index.d.mts.map +0 -1
  234. package/resources/mcp-servers/index.d.ts +0 -3
  235. package/resources/mcp-servers/index.d.ts.map +0 -1
  236. package/resources/mcp-servers/index.js.map +0 -1
  237. package/resources/mcp-servers/index.mjs.map +0 -1
  238. package/resources/mcp-servers/mcp-servers.d.mts +0 -10
  239. package/resources/mcp-servers/mcp-servers.d.mts.map +0 -1
  240. package/resources/mcp-servers/mcp-servers.d.ts +0 -10
  241. package/resources/mcp-servers/mcp-servers.d.ts.map +0 -1
  242. package/resources/mcp-servers/mcp-servers.js.map +0 -1
  243. package/resources/mcp-servers/mcp-servers.mjs.map +0 -1
  244. package/resources/mcp-servers/tenants.d.mts +0 -63
  245. package/resources/mcp-servers/tenants.d.mts.map +0 -1
  246. package/resources/mcp-servers/tenants.d.ts +0 -63
  247. package/resources/mcp-servers/tenants.d.ts.map +0 -1
  248. package/resources/mcp-servers/tenants.js +0 -47
  249. package/resources/mcp-servers/tenants.js.map +0 -1
  250. package/resources/mcp-servers/tenants.mjs +0 -43
  251. package/resources/mcp-servers/tenants.mjs.map +0 -1
  252. package/resources/mcp-servers.d.mts.map +0 -1
  253. package/resources/mcp-servers.d.ts.map +0 -1
  254. package/resources/mcp-servers.js.map +0 -1
  255. package/resources/mcp-servers.mjs.map +0 -1
  256. package/src/resources/datasets/user.ts +0 -120
  257. package/src/resources/mcp-servers/tenants.ts +0 -81
  258. /package/resources/{conversations → agents/conversations}/index.js +0 -0
  259. /package/resources/{conversations → agents/conversations}/index.mjs +0 -0
  260. /package/resources/{conversations → agents/conversations}/response/index.d.mts +0 -0
  261. /package/resources/{conversations → agents/conversations}/response/index.d.ts +0 -0
  262. /package/resources/{conversations → agents/conversations}/response/index.js +0 -0
  263. /package/resources/{conversations → agents/conversations}/response/index.mjs +0 -0
  264. /package/resources/{conversations → agents/conversations}/response.d.mts +0 -0
  265. /package/resources/{conversations → agents/conversations}/response.d.ts +0 -0
  266. /package/resources/{conversations → agents/conversations}/response.mjs +0 -0
  267. /package/resources/{conversations.d.mts → agents/conversations.d.mts} +0 -0
  268. /package/resources/{conversations.d.ts → agents/conversations.d.ts} +0 -0
  269. /package/resources/{conversations.mjs → agents/conversations.mjs} +0 -0
  270. /package/resources/{datasets → agents/datasets}/index.js +0 -0
  271. /package/resources/{datasets → agents/datasets}/index.mjs +0 -0
  272. /package/resources/{datasets.d.mts → agents/datasets.d.mts} +0 -0
  273. /package/resources/{datasets.d.ts → agents/datasets.d.ts} +0 -0
  274. /package/resources/{datasets.mjs → agents/datasets.mjs} +0 -0
  275. /package/resources/{mcp-servers → agents/mcp-servers}/index.js +0 -0
  276. /package/resources/{mcp-servers → agents/mcp-servers}/index.mjs +0 -0
  277. /package/resources/{mcp-servers.d.mts → agents/mcp-servers.d.mts} +0 -0
  278. /package/resources/{mcp-servers.d.ts → agents/mcp-servers.d.ts} +0 -0
  279. /package/resources/{mcp-servers.mjs → agents/mcp-servers.mjs} +0 -0
  280. /package/src/resources/{conversations → agents/conversations}/response/index.ts +0 -0
  281. /package/src/resources/{conversations → agents/conversations}/response.ts +0 -0
  282. /package/src/resources/{conversations.ts → agents/conversations.ts} +0 -0
  283. /package/src/resources/{datasets.ts → agents/datasets.ts} +0 -0
  284. /package/src/resources/{mcp-servers.ts → agents/mcp-servers.ts} +0 -0
@@ -1,11 +1,11 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { APIResource } from '../../core/resource';
4
- import { APIPromise } from '../../core/api-promise';
5
- import { type Uploadable } from '../../core/uploads';
6
- import { RequestOptions } from '../../internal/request-options';
7
- import { multipartFormRequestOptions } from '../../internal/uploads';
8
- import { path } from '../../internal/utils/path';
3
+ import { APIResource } from '../../../core/resource';
4
+ import { APIPromise } from '../../../core/api-promise';
5
+ import { type Uploadable } from '../../../core/uploads';
6
+ import { RequestOptions } from '../../../internal/request-options';
7
+ import { multipartFormRequestOptions } from '../../../internal/uploads';
8
+ import { path } from '../../../internal/utils/path';
9
9
 
10
10
  export class Context extends APIResource {
11
11
  /**
@@ -14,9 +14,9 @@ export class Context extends APIResource {
14
14
  *
15
15
  * @example
16
16
  * ```ts
17
- * const contexts = await client.datasets.context.list(
17
+ * const contexts = await client.agents.datasets.context.list(
18
18
  * 'org_456',
19
- * { contextKey: 'orgId' },
19
+ * { agentId: 'agentId', contextKey: 'orgId' },
20
20
  * );
21
21
  * ```
22
22
  */
@@ -25,8 +25,8 @@ export class Context extends APIResource {
25
25
  params: ContextListParams,
26
26
  options?: RequestOptions,
27
27
  ): APIPromise<ContextListResponse> {
28
- const { contextKey } = params;
29
- return this._client.get(path`/datasets/context/${contextKey}/${contextValue}`, options);
28
+ const { agentId, contextKey } = params;
29
+ return this._client.get(path`/agents/${agentId}/datasets/context/${contextKey}/${contextValue}`, options);
30
30
  }
31
31
 
32
32
  /**
@@ -34,9 +34,13 @@ export class Context extends APIResource {
34
34
  *
35
35
  * @example
36
36
  * ```ts
37
- * const context = await client.datasets.context.delete(
37
+ * const context = await client.agents.datasets.context.delete(
38
38
  * 'shared_data.csv',
39
- * { contextKey: 'orgId', contextValue: 'org_456' },
39
+ * {
40
+ * agentId: 'agentId',
41
+ * contextKey: 'orgId',
42
+ * contextValue: 'org_456',
43
+ * },
40
44
  * );
41
45
  * ```
42
46
  */
@@ -45,8 +49,11 @@ export class Context extends APIResource {
45
49
  params: ContextDeleteParams,
46
50
  options?: RequestOptions,
47
51
  ): APIPromise<ContextDeleteResponse> {
48
- const { contextKey, contextValue } = params;
49
- return this._client.delete(path`/datasets/context/${contextKey}/${contextValue}/${filename}`, options);
52
+ const { agentId, contextKey, contextValue } = params;
53
+ return this._client.delete(
54
+ path`/agents/${agentId}/datasets/context/${contextKey}/${contextValue}/${filename}`,
55
+ options,
56
+ );
50
57
  }
51
58
 
52
59
  /**
@@ -55,13 +62,12 @@ export class Context extends APIResource {
55
62
  *
56
63
  * @example
57
64
  * ```ts
58
- * const response = await client.datasets.context.upload(
59
- * 'org_456',
60
- * {
65
+ * const response =
66
+ * await client.agents.datasets.context.upload('org_456', {
67
+ * agentId: 'agentId',
61
68
  * contextKey: 'orgId',
62
69
  * file: fs.createReadStream('path/to/file'),
63
- * },
64
- * );
70
+ * });
65
71
  * ```
66
72
  */
67
73
  upload(
@@ -69,9 +75,9 @@ export class Context extends APIResource {
69
75
  params: ContextUploadParams,
70
76
  options?: RequestOptions,
71
77
  ): APIPromise<ContextUploadResponse> {
72
- const { contextKey, ...body } = params;
78
+ const { agentId, contextKey, ...body } = params;
73
79
  return this._client.post(
74
- path`/datasets/context/${contextKey}/${contextValue}`,
80
+ path`/agents/${agentId}/datasets/context/${contextKey}/${contextValue}`,
75
81
  multipartFormRequestOptions({ body, ...options }, this._client),
76
82
  );
77
83
  }
@@ -106,6 +112,11 @@ export namespace ContextUploadResponse {
106
112
  }
107
113
 
108
114
  export interface ContextListParams {
115
+ /**
116
+ * The unique identifier of the agent
117
+ */
118
+ agentId: string;
119
+
109
120
  /**
110
121
  * The context key (e.g., "orgId", "teamId")
111
122
  */
@@ -113,6 +124,11 @@ export interface ContextListParams {
113
124
  }
114
125
 
115
126
  export interface ContextDeleteParams {
127
+ /**
128
+ * The unique identifier of the agent
129
+ */
130
+ agentId: string;
131
+
116
132
  /**
117
133
  * The context key (e.g., "orgId", "teamId")
118
134
  */
@@ -125,6 +141,11 @@ export interface ContextDeleteParams {
125
141
  }
126
142
 
127
143
  export interface ContextUploadParams {
144
+ /**
145
+ * Path param: The unique identifier of the agent
146
+ */
147
+ agentId: string;
148
+
128
149
  /**
129
150
  * Path param: The context key (e.g., "orgId", "teamId")
130
151
  */
@@ -1,6 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { APIResource } from '../../core/resource';
3
+ import { APIResource } from '../../../core/resource';
4
4
  import * as ContextAPI from './context';
5
5
  import {
6
6
  Context,
@@ -16,6 +16,7 @@ import {
16
16
  User,
17
17
  UserDeleteParams,
18
18
  UserDeleteResponse,
19
+ UserListParams,
19
20
  UserListResponse,
20
21
  UserUploadParams,
21
22
  UserUploadResponse,
@@ -35,6 +36,7 @@ export declare namespace Datasets {
35
36
  type UserListResponse as UserListResponse,
36
37
  type UserDeleteResponse as UserDeleteResponse,
37
38
  type UserUploadResponse as UserUploadResponse,
39
+ type UserListParams as UserListParams,
38
40
  type UserDeleteParams as UserDeleteParams,
39
41
  type UserUploadParams as UserUploadParams,
40
42
  };
@@ -15,6 +15,7 @@ export {
15
15
  type UserListResponse,
16
16
  type UserDeleteResponse,
17
17
  type UserUploadResponse,
18
+ type UserListParams,
18
19
  type UserDeleteParams,
19
20
  type UserUploadParams,
20
21
  } from './user';
@@ -0,0 +1,151 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../core/resource';
4
+ import { APIPromise } from '../../../core/api-promise';
5
+ import { type Uploadable } from '../../../core/uploads';
6
+ import { RequestOptions } from '../../../internal/request-options';
7
+ import { multipartFormRequestOptions } from '../../../internal/uploads';
8
+ import { path } from '../../../internal/utils/path';
9
+
10
+ export class User extends APIResource {
11
+ /**
12
+ * List all dataset files scoped to a specific user.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * const users = await client.agents.datasets.user.list(
17
+ * 'user_123',
18
+ * { agentId: 'agentId' },
19
+ * );
20
+ * ```
21
+ */
22
+ list(
23
+ userIdentifier: string,
24
+ params: UserListParams,
25
+ options?: RequestOptions,
26
+ ): APIPromise<UserListResponse> {
27
+ const { agentId } = params;
28
+ return this._client.get(path`/agents/${agentId}/datasets/user/${userIdentifier}`, options);
29
+ }
30
+
31
+ /**
32
+ * Delete a dataset file scoped to a specific user.
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * const user = await client.agents.datasets.user.delete(
37
+ * 'data.csv',
38
+ * { agentId: 'agentId', userIdentifier: 'user_123' },
39
+ * );
40
+ * ```
41
+ */
42
+ delete(
43
+ filename: string,
44
+ params: UserDeleteParams,
45
+ options?: RequestOptions,
46
+ ): APIPromise<UserDeleteResponse> {
47
+ const { agentId, userIdentifier } = params;
48
+ return this._client.delete(path`/agents/${agentId}/datasets/user/${userIdentifier}/${filename}`, options);
49
+ }
50
+
51
+ /**
52
+ * Upload a dataset file scoped to a specific user.
53
+ *
54
+ * @example
55
+ * ```ts
56
+ * const response = await client.agents.datasets.user.upload(
57
+ * 'user_123',
58
+ * {
59
+ * agentId: 'agentId',
60
+ * file: fs.createReadStream('path/to/file'),
61
+ * },
62
+ * );
63
+ * ```
64
+ */
65
+ upload(
66
+ userIdentifier: string,
67
+ params: UserUploadParams,
68
+ options?: RequestOptions,
69
+ ): APIPromise<UserUploadResponse> {
70
+ const { agentId, ...body } = params;
71
+ return this._client.post(
72
+ path`/agents/${agentId}/datasets/user/${userIdentifier}`,
73
+ multipartFormRequestOptions({ body, ...options }, this._client),
74
+ );
75
+ }
76
+ }
77
+
78
+ export interface UserListResponse {
79
+ files: Array<string>;
80
+ }
81
+
82
+ export interface UserDeleteResponse {
83
+ file: string;
84
+
85
+ success: boolean;
86
+
87
+ error?: string;
88
+ }
89
+
90
+ export interface UserUploadResponse {
91
+ file: UserUploadResponse.File;
92
+
93
+ error?: string;
94
+ }
95
+
96
+ export namespace UserUploadResponse {
97
+ export interface File {
98
+ name: string;
99
+
100
+ path: string;
101
+
102
+ size: number;
103
+ }
104
+ }
105
+
106
+ export interface UserListParams {
107
+ /**
108
+ * The unique identifier of the agent
109
+ */
110
+ agentId: string;
111
+ }
112
+
113
+ export interface UserDeleteParams {
114
+ /**
115
+ * The unique identifier of the agent
116
+ */
117
+ agentId: string;
118
+
119
+ /**
120
+ * The user identifier
121
+ */
122
+ userIdentifier: string;
123
+ }
124
+
125
+ export interface UserUploadParams {
126
+ /**
127
+ * Path param: The unique identifier of the agent
128
+ */
129
+ agentId: string;
130
+
131
+ /**
132
+ * Body param: The file to upload (CSV or JSON, max 10MB)
133
+ */
134
+ file: Uploadable;
135
+
136
+ /**
137
+ * Body param: Optional notes or description for the dataset
138
+ */
139
+ notes?: string;
140
+ }
141
+
142
+ export declare namespace User {
143
+ export {
144
+ type UserListResponse as UserListResponse,
145
+ type UserDeleteResponse as UserDeleteResponse,
146
+ type UserUploadResponse as UserUploadResponse,
147
+ type UserListParams as UserListParams,
148
+ type UserDeleteParams as UserDeleteParams,
149
+ type UserUploadParams as UserUploadParams,
150
+ };
151
+ }
@@ -1,4 +1,16 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  export { Agents } from './agents';
4
+ export {
5
+ Conversations,
6
+ type InconvoConversation,
7
+ type ConversationCreateResponse,
8
+ type ConversationListResponse,
9
+ type ConversationCreateParams,
10
+ type ConversationRetrieveParams,
11
+ type ConversationListParams,
12
+ type ConversationListResponsesConversationsCursor,
13
+ } from './conversations/index';
4
14
  export { DataSummary, type DataSummaryRetrieveResponse } from './data-summary';
15
+ export { Datasets } from './datasets/index';
16
+ export { McpServers } from './mcp-servers/index';
@@ -4,6 +4,7 @@ export { McpServers } from './mcp-servers';
4
4
  export {
5
5
  Tenants,
6
6
  type TenantCreateResponse,
7
+ type TenantDeleteResponse,
7
8
  type TenantCreateParams,
8
9
  type TenantDeleteParams,
9
10
  } from './tenants';
@@ -1,8 +1,14 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { APIResource } from '../../core/resource';
3
+ import { APIResource } from '../../../core/resource';
4
4
  import * as TenantsAPI from './tenants';
5
- import { TenantCreateParams, TenantCreateResponse, TenantDeleteParams, Tenants } from './tenants';
5
+ import {
6
+ TenantCreateParams,
7
+ TenantCreateResponse,
8
+ TenantDeleteParams,
9
+ TenantDeleteResponse,
10
+ Tenants,
11
+ } from './tenants';
6
12
 
7
13
  export class McpServers extends APIResource {
8
14
  tenants: TenantsAPI.Tenants = new TenantsAPI.Tenants(this._client);
@@ -14,6 +20,7 @@ export declare namespace McpServers {
14
20
  export {
15
21
  Tenants as Tenants,
16
22
  type TenantCreateResponse as TenantCreateResponse,
23
+ type TenantDeleteResponse as TenantDeleteResponse,
17
24
  type TenantCreateParams as TenantCreateParams,
18
25
  type TenantDeleteParams as TenantDeleteParams,
19
26
  };
@@ -0,0 +1,108 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../core/resource';
4
+ import { APIPromise } from '../../../core/api-promise';
5
+ import { RequestOptions } from '../../../internal/request-options';
6
+ import { path } from '../../../internal/utils/path';
7
+
8
+ export class Tenants extends APIResource {
9
+ /**
10
+ * Create a tenant for an MCP Server
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const tenant =
15
+ * await client.agents.mcpServers.tenants.create(
16
+ * 'mcpserver_id',
17
+ * {
18
+ * agentId: 'agentId',
19
+ * tenant: {
20
+ * 'fromapi@api.com': { organisationId: 'bar' },
21
+ * },
22
+ * },
23
+ * );
24
+ * ```
25
+ */
26
+ create(
27
+ mcpserverID: string,
28
+ params: TenantCreateParams,
29
+ options?: RequestOptions,
30
+ ): APIPromise<TenantCreateResponse> {
31
+ const { agentId, tenant } = params;
32
+ return this._client.post(path`/agents/${agentId}/mcpservers/${mcpserverID}/tenants`, {
33
+ body: tenant,
34
+ ...options,
35
+ });
36
+ }
37
+
38
+ /**
39
+ * Delete a tenant mapping from an MCP Server
40
+ *
41
+ * @example
42
+ * ```ts
43
+ * const tenant =
44
+ * await client.agents.mcpServers.tenants.delete(
45
+ * 'mcpserver_id',
46
+ * { agentId: 'agentId', tenant_key: 'tenant_key' },
47
+ * );
48
+ * ```
49
+ */
50
+ delete(
51
+ mcpserverID: string,
52
+ params: TenantDeleteParams,
53
+ options?: RequestOptions,
54
+ ): APIPromise<TenantDeleteResponse> {
55
+ const { agentId, tenant_key } = params;
56
+ return this._client.delete(
57
+ path`/agents/${agentId}/mcpservers/${mcpserverID}/tenants/${tenant_key}`,
58
+ options,
59
+ );
60
+ }
61
+ }
62
+
63
+ /**
64
+ * Arbitrary key-value mapping.
65
+ *
66
+ * - Keys are strings.
67
+ * - Values are JSON objects with arbitrary properties.
68
+ */
69
+ export type TenantCreateResponse = { [key: string]: { [key: string]: unknown } };
70
+
71
+ export interface TenantDeleteResponse {
72
+ success: boolean;
73
+
74
+ tenantKey: string;
75
+ }
76
+
77
+ export interface TenantCreateParams {
78
+ /**
79
+ * Path param: The unique identifier of the agent
80
+ */
81
+ agentId: string;
82
+
83
+ /**
84
+ * Body param: Arbitrary key-value mapping.
85
+ *
86
+ * - Keys are strings.
87
+ * - Values are JSON objects with arbitrary properties.
88
+ */
89
+ tenant: { [key: string]: { [key: string]: unknown } };
90
+ }
91
+
92
+ export interface TenantDeleteParams {
93
+ /**
94
+ * The unique identifier of the agent
95
+ */
96
+ agentId: string;
97
+
98
+ tenant_key: string;
99
+ }
100
+
101
+ export declare namespace Tenants {
102
+ export {
103
+ type TenantCreateResponse as TenantCreateResponse,
104
+ type TenantDeleteResponse as TenantDeleteResponse,
105
+ type TenantCreateParams as TenantCreateParams,
106
+ type TenantDeleteParams as TenantDeleteParams,
107
+ };
108
+ }
@@ -1,14 +1,3 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  export { Agents } from './agents/agents';
4
- export {
5
- Conversations,
6
- type InconvoConversation,
7
- type ConversationCreateResponse,
8
- type ConversationListResponse,
9
- type ConversationCreateParams,
10
- type ConversationListParams,
11
- type ConversationListResponsesConversationsCursor,
12
- } from './conversations/conversations';
13
- export { Datasets } from './datasets/datasets';
14
- export { McpServers } from './mcp-servers/mcp-servers';
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.4.0'; // x-release-please-version
1
+ export const VERSION = '0.5.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.4.0";
1
+ export declare const VERSION = "0.5.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.4.0";
1
+ export declare const VERSION = "0.5.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.4.0'; // x-release-please-version
4
+ exports.VERSION = '0.5.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.4.0'; // x-release-please-version
1
+ export const VERSION = '0.5.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conversations.d.mts","sourceRoot":"","sources":["../../src/resources/conversations/conversations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,EACL,KAAK,EACL,QAAQ,EACR,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,KAAK,EACN;OACM,EAAE,UAAU,EAAE;OACd,EAAE,mBAAmB,EAAE,KAAK,yBAAyB,EAAE,WAAW,EAAE;OACpE,EAAE,cAAc,EAAE;AAGzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAA0C;IAExE;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAI,EAAE,wBAAwB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC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D;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,WAAW,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;CAC1C;AAED,MAAM,WAAW,sBAAuB,SAAQ,yBAAyB;IACvE;;;OAGG;IACH,WAAW,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAEjD;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAID,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EACL,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,4CAA4C,IAAI,4CAA4C,EACjG,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;IAEF,OAAO,EACL,QAAQ,IAAI,QAAQ,EACpB,KAAK,KAAK,IAAI,KAAK,EACnB,KAAK,KAAK,IAAI,KAAK,EACnB,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"conversations.d.ts","sourceRoot":"","sources":["../../src/resources/conversations/conversations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,EACL,KAAK,EACL,QAAQ,EACR,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,KAAK,EACN;OACM,EAAE,UAAU,EAA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AC;CACH"}
@@ -1,61 +0,0 @@
1
- "use strict";
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Conversations = void 0;
5
- const tslib_1 = require("../../internal/tslib.js");
6
- const resource_1 = require("../../core/resource.js");
7
- const ResponseAPI = tslib_1.__importStar(require("./response/response.js"));
8
- const response_1 = require("./response/response.js");
9
- const pagination_1 = require("../../core/pagination.js");
10
- const path_1 = require("../../internal/utils/path.js");
11
- class Conversations extends resource_1.APIResource {
12
- constructor() {
13
- super(...arguments);
14
- this.response = new ResponseAPI.Response(this._client);
15
- }
16
- /**
17
- * Create conversation
18
- *
19
- * @example
20
- * ```ts
21
- * const conversation = await client.conversations.create({
22
- * userIdentifier: 'user_123',
23
- * });
24
- * ```
25
- */
26
- create(body, options) {
27
- return this._client.post('/conversations', { body, ...options });
28
- }
29
- /**
30
- * Retrieve conversation
31
- *
32
- * @example
33
- * ```ts
34
- * const inconvoConversation =
35
- * await client.conversations.retrieve('id');
36
- * ```
37
- */
38
- retrieve(id, options) {
39
- return this._client.get((0, path_1.path) `/conversations/${id}`, options);
40
- }
41
- /**
42
- * List conversations
43
- *
44
- * @example
45
- * ```ts
46
- * // Automatically fetches more pages as needed.
47
- * for await (const conversationListResponse of client.conversations.list()) {
48
- * // ...
49
- * }
50
- * ```
51
- */
52
- list(query = {}, options) {
53
- return this._client.getAPIList('/conversations', (pagination_1.ConversationsCursor), {
54
- query,
55
- ...options,
56
- });
57
- }
58
- }
59
- exports.Conversations = Conversations;
60
- Conversations.Response = response_1.Response;
61
- //# sourceMappingURL=conversations.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conversations.js","sourceRoot":"","sources":["../../src/resources/conversations/conversations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,4EAAmD;AACnD,qDAQ6B;AAE7B,yDAAyG;AAEzG,uDAAiD;AAEjD,MAAa,aAAc,SAAQ,sBAAW;IAA9C;;QACE,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAiD1E,CAAC;IA/CC;;;;;;;;;OASG;IACH,MAAM,CAAC,IAA8B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;IAED;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,kBAAkB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAA,gCAA6C,CAAA,EAAE;YAC9F,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAlDD,sCAkDC;AAkFD,aAAa,CAAC,QAAQ,GAAG,mBAAQ,CAAC"}
@@ -1,56 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from "../../core/resource.mjs";
3
- import * as ResponseAPI from "./response/response.mjs";
4
- import { Response, } from "./response/response.mjs";
5
- import { ConversationsCursor } from "../../core/pagination.mjs";
6
- import { path } from "../../internal/utils/path.mjs";
7
- export class Conversations extends APIResource {
8
- constructor() {
9
- super(...arguments);
10
- this.response = new ResponseAPI.Response(this._client);
11
- }
12
- /**
13
- * Create conversation
14
- *
15
- * @example
16
- * ```ts
17
- * const conversation = await client.conversations.create({
18
- * userIdentifier: 'user_123',
19
- * });
20
- * ```
21
- */
22
- create(body, options) {
23
- return this._client.post('/conversations', { body, ...options });
24
- }
25
- /**
26
- * Retrieve conversation
27
- *
28
- * @example
29
- * ```ts
30
- * const inconvoConversation =
31
- * await client.conversations.retrieve('id');
32
- * ```
33
- */
34
- retrieve(id, options) {
35
- return this._client.get(path `/conversations/${id}`, options);
36
- }
37
- /**
38
- * List conversations
39
- *
40
- * @example
41
- * ```ts
42
- * // Automatically fetches more pages as needed.
43
- * for await (const conversationListResponse of client.conversations.list()) {
44
- * // ...
45
- * }
46
- * ```
47
- */
48
- list(query = {}, options) {
49
- return this._client.getAPIList('/conversations', (ConversationsCursor), {
50
- query,
51
- ...options,
52
- });
53
- }
54
- }
55
- Conversations.Response = Response;
56
- //# sourceMappingURL=conversations.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conversations.mjs","sourceRoot":"","sources":["../../src/resources/conversations/conversations.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,EAEL,QAAQ,GAMT;OAEM,EAAE,mBAAmB,EAA+C;OAEpE,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,aAAc,SAAQ,WAAW;IAA9C;;QACE,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAiD1E,CAAC;IA/CC;;;;;;;;;OASG;IACH,MAAM,CAAC,IAA8B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;IAED;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,kBAAkB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAA,mBAA6C,CAAA,EAAE;YAC9F,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAkFD,aAAa,CAAC,QAAQ,GAAG,QAAQ,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/conversations/index.ts"],"names":[],"mappings":"OAEO,EACL,aAAa,EACb,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,4CAA4C,GAClD;OACM,EACL,QAAQ,EACR,KAAK,KAAK,EACV,KAAK,KAAK,EACV,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,GAC5B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/conversations/index.ts"],"names":[],"mappings":"OAEO,EACL,aAAa,EACb,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,4CAA4C,GAClD;OACM,EACL,QAAQ,EACR,KAAK,KAAK,EACV,KAAK,KAAK,EACV,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,GAC5B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/conversations/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,oDAQyB;AAPvB,8GAAA,aAAa,OAAA;AAQf,6CAQ0B;AAPxB,iGAAA,QAAQ,OAAA"}