@archastro/sdk 0.1.0 → 0.4.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 (155) hide show
  1. package/README.md +165 -0
  2. package/dist/client.d.ts +13 -13
  3. package/dist/client.d.ts.map +1 -1
  4. package/dist/client.js +27 -27
  5. package/dist/client.js.map +1 -1
  6. package/dist/index.d.ts +1 -1
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +2 -2
  9. package/dist/index.js.map +1 -1
  10. package/dist/runtime/http-client.d.ts +7 -0
  11. package/dist/runtime/http-client.d.ts.map +1 -1
  12. package/dist/runtime/http-client.js +55 -0
  13. package/dist/runtime/http-client.js.map +1 -1
  14. package/dist/types/agents.d.ts +662 -431
  15. package/dist/types/agents.d.ts.map +1 -1
  16. package/dist/types/agents.js +51 -37
  17. package/dist/types/agents.js.map +1 -1
  18. package/dist/types/ai.d.ts +49 -49
  19. package/dist/types/ai.js +6 -6
  20. package/dist/types/ai.js.map +1 -1
  21. package/dist/types/api.d.ts +169 -0
  22. package/dist/types/api.d.ts.map +1 -0
  23. package/dist/types/api.js +49 -0
  24. package/dist/types/api.js.map +1 -0
  25. package/dist/types/artifacts.d.ts +102 -22
  26. package/dist/types/artifacts.d.ts.map +1 -1
  27. package/dist/types/artifacts.js +4 -3
  28. package/dist/types/artifacts.js.map +1 -1
  29. package/dist/types/automations.d.ts +13 -13
  30. package/dist/types/automations.js +4 -4
  31. package/dist/types/automations.js.map +1 -1
  32. package/dist/types/chat.d.ts +258 -6
  33. package/dist/types/chat.d.ts.map +1 -1
  34. package/dist/types/chat.js +5 -3
  35. package/dist/types/chat.js.map +1 -1
  36. package/dist/types/common.d.ts +3596 -980
  37. package/dist/types/common.d.ts.map +1 -1
  38. package/dist/types/common.js +281 -166
  39. package/dist/types/common.js.map +1 -1
  40. package/dist/types/config.d.ts +30 -30
  41. package/dist/types/config.js +6 -6
  42. package/dist/types/config.js.map +1 -1
  43. package/dist/types/device.d.ts +26 -0
  44. package/dist/types/device.d.ts.map +1 -0
  45. package/dist/types/device.js +14 -0
  46. package/dist/types/device.js.map +1 -0
  47. package/dist/types/index.d.ts +0 -4
  48. package/dist/types/index.d.ts.map +1 -1
  49. package/dist/types/index.js +1 -5
  50. package/dist/types/index.js.map +1 -1
  51. package/dist/types/me.d.ts +176 -20
  52. package/dist/types/me.d.ts.map +1 -1
  53. package/dist/types/me.js +4 -3
  54. package/dist/types/me.js.map +1 -1
  55. package/dist/types/members.d.ts +3 -3
  56. package/dist/types/members.js +2 -2
  57. package/dist/types/members.js.map +1 -1
  58. package/dist/types/messages.d.ts +457 -49
  59. package/dist/types/messages.d.ts.map +1 -1
  60. package/dist/types/messages.js +19 -18
  61. package/dist/types/messages.js.map +1 -1
  62. package/dist/types/oauth.d.ts +206 -0
  63. package/dist/types/oauth.d.ts.map +1 -0
  64. package/dist/types/oauth.js +51 -0
  65. package/dist/types/oauth.js.map +1 -0
  66. package/dist/types/orgs.d.ts +6 -6
  67. package/dist/types/picture.d.ts +2 -2
  68. package/dist/types/profile.d.ts +2 -2
  69. package/dist/types/reactions.d.ts +3 -3
  70. package/dist/types/reactions.js +2 -2
  71. package/dist/types/reactions.js.map +1 -1
  72. package/dist/types/schedules.d.ts +5 -5
  73. package/dist/types/schedules.js +2 -2
  74. package/dist/types/schedules.js.map +1 -1
  75. package/dist/types/system.d.ts +2 -2
  76. package/dist/types/teams.d.ts +750 -70
  77. package/dist/types/teams.d.ts.map +1 -1
  78. package/dist/types/teams.js +13 -10
  79. package/dist/types/teams.js.map +1 -1
  80. package/dist/types/threads.d.ts +1158 -194
  81. package/dist/types/threads.d.ts.map +1 -1
  82. package/dist/types/threads.js +26 -26
  83. package/dist/types/threads.js.map +1 -1
  84. package/dist/types/users.d.ts +53 -13
  85. package/dist/types/users.d.ts.map +1 -1
  86. package/dist/types/users.js +4 -4
  87. package/dist/types/users.js.map +1 -1
  88. package/dist/v1/resources/agent_installations.d.ts +4 -4
  89. package/dist/v1/resources/agent_installations.d.ts.map +1 -1
  90. package/dist/v1/resources/agent_installations.js +3 -3
  91. package/dist/v1/resources/agent_installations.js.map +1 -1
  92. package/dist/v1/resources/agent_routines.d.ts +9 -14
  93. package/dist/v1/resources/agent_routines.d.ts.map +1 -1
  94. package/dist/v1/resources/agent_routines.js +11 -19
  95. package/dist/v1/resources/agent_routines.js.map +1 -1
  96. package/dist/v1/resources/agent_sessions.d.ts +1 -0
  97. package/dist/v1/resources/agent_sessions.d.ts.map +1 -1
  98. package/dist/v1/resources/agent_sessions.js +1 -1
  99. package/dist/v1/resources/agent_sessions.js.map +1 -1
  100. package/dist/v1/resources/agent_tools.d.ts +1 -6
  101. package/dist/v1/resources/agent_tools.d.ts.map +1 -1
  102. package/dist/v1/resources/agent_tools.js +4 -12
  103. package/dist/v1/resources/agent_tools.js.map +1 -1
  104. package/dist/v1/resources/agents.d.ts +24 -26
  105. package/dist/v1/resources/agents.d.ts.map +1 -1
  106. package/dist/v1/resources/agents.js +25 -31
  107. package/dist/v1/resources/agents.js.map +1 -1
  108. package/dist/v1/resources/ai.d.ts +5 -15
  109. package/dist/v1/resources/ai.d.ts.map +1 -1
  110. package/dist/v1/resources/ai.js +6 -22
  111. package/dist/v1/resources/ai.js.map +1 -1
  112. package/dist/v1/resources/api.d.ts +1026 -0
  113. package/dist/v1/resources/api.d.ts.map +1 -0
  114. package/dist/v1/resources/api.js +944 -0
  115. package/dist/v1/resources/api.js.map +1 -0
  116. package/dist/v1/resources/artifacts.d.ts +7 -9
  117. package/dist/v1/resources/artifacts.d.ts.map +1 -1
  118. package/dist/v1/resources/artifacts.js +5 -13
  119. package/dist/v1/resources/artifacts.js.map +1 -1
  120. package/dist/v1/resources/config.d.ts +41 -53
  121. package/dist/v1/resources/config.d.ts.map +1 -1
  122. package/dist/v1/resources/config.js +18 -42
  123. package/dist/v1/resources/config.js.map +1 -1
  124. package/dist/v1/resources/custom_objects.d.ts +2 -2
  125. package/dist/v1/resources/custom_objects.d.ts.map +1 -1
  126. package/dist/v1/resources/custom_objects.js +1 -1
  127. package/dist/v1/resources/index.d.ts +13 -13
  128. package/dist/v1/resources/index.d.ts.map +1 -1
  129. package/dist/v1/resources/index.js +14 -14
  130. package/dist/v1/resources/index.js.map +1 -1
  131. package/dist/v1/resources/oauth.d.ts +25 -0
  132. package/dist/v1/resources/oauth.d.ts.map +1 -0
  133. package/dist/v1/resources/oauth.js +41 -0
  134. package/dist/v1/resources/oauth.js.map +1 -0
  135. package/dist/v1/resources/teams.d.ts +212 -55
  136. package/dist/v1/resources/teams.d.ts.map +1 -1
  137. package/dist/v1/resources/teams.js +18 -26
  138. package/dist/v1/resources/teams.js.map +1 -1
  139. package/dist/v1/resources/thread_messages.d.ts +5 -11
  140. package/dist/v1/resources/thread_messages.d.ts.map +1 -1
  141. package/dist/v1/resources/thread_messages.js +4 -12
  142. package/dist/v1/resources/thread_messages.js.map +1 -1
  143. package/dist/v1/resources/threads.d.ts +131 -65
  144. package/dist/v1/resources/threads.d.ts.map +1 -1
  145. package/dist/v1/resources/threads.js +20 -68
  146. package/dist/v1/resources/threads.js.map +1 -1
  147. package/dist/v1/resources/users.d.ts +144 -45
  148. package/dist/v1/resources/users.d.ts.map +1 -1
  149. package/dist/v1/resources/users.js +10 -34
  150. package/dist/v1/resources/users.js.map +1 -1
  151. package/dist/v1.d.ts +13 -13
  152. package/dist/v1.d.ts.map +1 -1
  153. package/dist/v1.js +27 -27
  154. package/dist/v1.js.map +1 -1
  155. package/package.json +1 -1
@@ -0,0 +1,944 @@
1
+ // Copyright (c) 2026 ArchAstro Inc. All Rights Reserved.
2
+ // This file is auto-generated by @archastro/sdk-generator. Do not edit.
3
+ // Content hash: 2ab79ca4c833
4
+ export class AutomationRunResource {
5
+ http;
6
+ constructor(http) {
7
+ this.http = http;
8
+ }
9
+ /**
10
+ * Get a single invoked automation run
11
+ * Fetches one run created by an invoked automation.
12
+ * This public lookup route only returns runs whose parent automation has
13
+ * `type: :invoked`.
14
+ */
15
+ async get(automationRun) {
16
+ return this.http.request(`/api/v1/automation_runs/${automationRun}`);
17
+ }
18
+ }
19
+ export class SystemResource {
20
+ http;
21
+ constructor(http) {
22
+ this.http = http;
23
+ }
24
+ async list(params) {
25
+ return this.http.request(`/api/v1/config/system`, { query: params });
26
+ }
27
+ async clone(system, input) {
28
+ return this.http.request(`/api/v1/config/system/${system}/clone`, { method: "POST", body: input });
29
+ }
30
+ async get(system) {
31
+ return this.http.request(`/api/v1/config/system/${system}`);
32
+ }
33
+ }
34
+ export class SchemaResource {
35
+ http;
36
+ constructor(http) {
37
+ this.http = http;
38
+ }
39
+ async list(kind) {
40
+ return this.http.request(`/api/v1/config/kinds/${kind}/schema`);
41
+ }
42
+ }
43
+ export class KindResource {
44
+ http;
45
+ schema;
46
+ constructor(http) {
47
+ this.http = http;
48
+ this.schema = new SchemaResource(http);
49
+ }
50
+ async list(params) {
51
+ return this.http.request(`/api/v1/config/kinds`, { query: params });
52
+ }
53
+ }
54
+ export class VersionResource {
55
+ http;
56
+ constructor(http) {
57
+ this.http = http;
58
+ }
59
+ async list(config, params) {
60
+ return this.http.request(`/api/v1/config/${config}/versions`, { query: params });
61
+ }
62
+ }
63
+ export class ApiV1ConfigContentResource {
64
+ http;
65
+ constructor(http) {
66
+ this.http = http;
67
+ }
68
+ async list(config, params) {
69
+ return this.http.request(`/api/v1/config/${config}/content`, { query: params });
70
+ }
71
+ }
72
+ export class ConfigResource {
73
+ http;
74
+ system;
75
+ kinds;
76
+ versions;
77
+ content;
78
+ constructor(http) {
79
+ this.http = http;
80
+ this.system = new SystemResource(http);
81
+ this.kinds = new KindResource(http);
82
+ this.versions = new VersionResource(http);
83
+ this.content = new ApiV1ConfigContentResource(http);
84
+ }
85
+ async delete(config) {
86
+ await this.http.request(`/api/v1/config/${config}`, { method: "DELETE" });
87
+ }
88
+ async get(config, params) {
89
+ return this.http.request(`/api/v1/config/${config}`, { query: params });
90
+ }
91
+ async replace(config, input) {
92
+ return this.http.request(`/api/v1/config/${config}`, { method: "PUT", body: input });
93
+ }
94
+ async validate(input) {
95
+ return this.http.request(`/api/v1/config/validate`, { method: "POST", body: input });
96
+ }
97
+ async list(params) {
98
+ return this.http.request(`/api/v1/config`, { query: params });
99
+ }
100
+ async create(input) {
101
+ return this.http.request(`/api/v1/config`, { method: "POST", body: input });
102
+ }
103
+ async unarchive(config, input) {
104
+ return this.http.request(`/api/v1/config/${config}/unarchive`, { method: "POST", body: input });
105
+ }
106
+ async archive(config, input) {
107
+ return this.http.request(`/api/v1/config/${config}/archive`, { method: "POST", body: input });
108
+ }
109
+ async encryptSecret(input) {
110
+ return this.http.request(`/api/v1/config/encrypt_secret`, { method: "POST", body: input });
111
+ }
112
+ }
113
+ export class ContentResource {
114
+ http;
115
+ constructor(http) {
116
+ this.http = http;
117
+ }
118
+ async list(artifact, params) {
119
+ return this.http.request(`/api/v1/artifacts/${artifact}/content`, { query: params });
120
+ }
121
+ }
122
+ export class ArtifactResource {
123
+ http;
124
+ content;
125
+ constructor(http) {
126
+ this.http = http;
127
+ this.content = new ContentResource(http);
128
+ }
129
+ async delete(artifact) {
130
+ await this.http.request(`/api/v1/artifacts/${artifact}`, { method: "DELETE" });
131
+ }
132
+ async get(artifact) {
133
+ return this.http.request(`/api/v1/artifacts/${artifact}`);
134
+ }
135
+ async replace(artifact, input) {
136
+ return this.http.request(`/api/v1/artifacts/${artifact}`, { method: "PUT", body: input });
137
+ }
138
+ async archive(artifact, input) {
139
+ return this.http.request(`/api/v1/artifacts/${artifact}/archive`, { method: "POST", body: input });
140
+ }
141
+ }
142
+ export class ApiV1InstallationSourceResource {
143
+ http;
144
+ constructor(http) {
145
+ this.http = http;
146
+ }
147
+ async delete(source) {
148
+ await this.http.request(`/api/v1/installation_sources/${source}`, { method: "DELETE" });
149
+ }
150
+ }
151
+ export class AgentSessionResource {
152
+ http;
153
+ constructor(http) {
154
+ this.http = http;
155
+ }
156
+ async cancel(agentSession, input) {
157
+ return this.http.request(`/api/v1/agent_sessions/${agentSession}/cancel`, { method: "POST", body: input });
158
+ }
159
+ async delete(agentSession) {
160
+ await this.http.request(`/api/v1/agent_sessions/${agentSession}`, { method: "DELETE" });
161
+ }
162
+ async get(agentSession) {
163
+ return this.http.request(`/api/v1/agent_sessions/${agentSession}`);
164
+ }
165
+ async update(agentSession, input) {
166
+ return this.http.request(`/api/v1/agent_sessions/${agentSession}`, { method: "PATCH", body: input });
167
+ }
168
+ async list(params) {
169
+ return this.http.request(`/api/v1/agent_sessions`, { query: params });
170
+ }
171
+ async create(input) {
172
+ return this.http.request(`/api/v1/agent_sessions`, { method: "POST", body: input });
173
+ }
174
+ async message(agentSession, input) {
175
+ return this.http.request(`/api/v1/agent_sessions/${agentSession}/message`, { method: "POST", body: input });
176
+ }
177
+ }
178
+ export class ApiV1TeamArtifactResource {
179
+ http;
180
+ constructor(http) {
181
+ this.http = http;
182
+ }
183
+ async list(team) {
184
+ return this.http.request(`/api/v1/teams/${team}/artifacts`);
185
+ }
186
+ async create(team, input) {
187
+ return this.http.request(`/api/v1/teams/${team}/artifacts`, { method: "POST", body: input });
188
+ }
189
+ }
190
+ export class MemberResource {
191
+ http;
192
+ constructor(http) {
193
+ this.http = http;
194
+ }
195
+ async list(team) {
196
+ return this.http.request(`/api/v1/teams/${team}/members`);
197
+ }
198
+ async create(team, input) {
199
+ return this.http.request(`/api/v1/teams/${team}/members`, { method: "POST", body: input });
200
+ }
201
+ }
202
+ export class ApiV1TeamThreadResource {
203
+ http;
204
+ constructor(http) {
205
+ this.http = http;
206
+ }
207
+ async list(team) {
208
+ return this.http.request(`/api/v1/teams/${team}/threads`);
209
+ }
210
+ async create(team, input) {
211
+ return this.http.request(`/api/v1/teams/${team}/threads`, { method: "POST", body: input });
212
+ }
213
+ }
214
+ export class LeaveResource {
215
+ http;
216
+ constructor(http) {
217
+ this.http = http;
218
+ }
219
+ async remove(team) {
220
+ await this.http.request(`/api/v1/teams/${team}/leave`, { method: "DELETE" });
221
+ }
222
+ }
223
+ export class ApiV1TeamCustomObjectResource {
224
+ http;
225
+ constructor(http) {
226
+ this.http = http;
227
+ }
228
+ async list(team, params) {
229
+ return this.http.request(`/api/v1/teams/${team}/custom_objects`, { query: params });
230
+ }
231
+ async create(team, input) {
232
+ return this.http.request(`/api/v1/teams/${team}/custom_objects`, { method: "POST", body: input });
233
+ }
234
+ }
235
+ export class TeamResource {
236
+ http;
237
+ artifacts;
238
+ members;
239
+ threads;
240
+ leave;
241
+ custom_objects;
242
+ constructor(http) {
243
+ this.http = http;
244
+ this.artifacts = new ApiV1TeamArtifactResource(http);
245
+ this.members = new MemberResource(http);
246
+ this.threads = new ApiV1TeamThreadResource(http);
247
+ this.leave = new LeaveResource(http);
248
+ this.custom_objects = new ApiV1TeamCustomObjectResource(http);
249
+ }
250
+ /**
251
+ * Join a team using an invite code
252
+ * Accepts either `join_code` or `invite_code`.
253
+ * For user-authenticated requests, the current user joins the team identified by
254
+ * the invite code. For server-to-server requests, provide `agent` or `user` to
255
+ * add that principal to the team instead.
256
+ */
257
+ async joinByCode(input) {
258
+ return this.http.request(`/api/v1/teams/join_by_code`, { method: "POST", body: input });
259
+ }
260
+ async delete(team) {
261
+ await this.http.request(`/api/v1/teams/${team}`, { method: "DELETE" });
262
+ }
263
+ async get(team) {
264
+ return this.http.request(`/api/v1/teams/${team}`);
265
+ }
266
+ async update(team, input) {
267
+ return this.http.request(`/api/v1/teams/${team}`, { method: "PATCH", body: input });
268
+ }
269
+ /**
270
+ * Join a team the current user can see
271
+ * Joins a specific visible team by team ID.
272
+ * For standard user requests, the current user is added to the team. When
273
+ * `agent` is provided, the current user must already be a team member and the
274
+ * agent is added instead.
275
+ */
276
+ async join(team, input) {
277
+ return this.http.request(`/api/v1/teams/${team}/join`, { method: "POST", body: input });
278
+ }
279
+ async list(params) {
280
+ return this.http.request(`/api/v1/teams`, { query: params });
281
+ }
282
+ async create(input) {
283
+ return this.http.request(`/api/v1/teams`, { method: "POST", body: input });
284
+ }
285
+ async invites(team, input) {
286
+ return this.http.request(`/api/v1/teams/${team}/invites`, { method: "POST", body: input });
287
+ }
288
+ async invite(team, input) {
289
+ return this.http.request(`/api/v1/teams/${team}/invite`, { method: "POST", body: input });
290
+ }
291
+ }
292
+ export class CatalogResource {
293
+ http;
294
+ constructor(http) {
295
+ this.http = http;
296
+ }
297
+ async list() {
298
+ return this.http.request(`/api/v1/agent_tools/catalog`);
299
+ }
300
+ }
301
+ export class AgentToolResource {
302
+ http;
303
+ catalog;
304
+ constructor(http) {
305
+ this.http = http;
306
+ this.catalog = new CatalogResource(http);
307
+ }
308
+ async delete(tool) {
309
+ await this.http.request(`/api/v1/agent_tools/${tool}`, { method: "DELETE" });
310
+ }
311
+ async get(tool) {
312
+ return this.http.request(`/api/v1/agent_tools/${tool}`);
313
+ }
314
+ async update(tool, input) {
315
+ return this.http.request(`/api/v1/agent_tools/${tool}`, { method: "PATCH", body: input });
316
+ }
317
+ async list(params) {
318
+ return this.http.request(`/api/v1/agent_tools`, { query: params });
319
+ }
320
+ async deactivate(tool, input) {
321
+ return this.http.request(`/api/v1/agent_tools/${tool}/deactivate`, { method: "POST", body: input });
322
+ }
323
+ async activate(tool, input) {
324
+ return this.http.request(`/api/v1/agent_tools/${tool}/activate`, { method: "POST", body: input });
325
+ }
326
+ }
327
+ export class TeamMembershipResource {
328
+ http;
329
+ constructor(http) {
330
+ this.http = http;
331
+ }
332
+ async delete(teamMembership) {
333
+ await this.http.request(`/api/v1/team_memberships/${teamMembership}`, { method: "DELETE" });
334
+ }
335
+ async list(params) {
336
+ return this.http.request(`/api/v1/team_memberships`, { query: params });
337
+ }
338
+ }
339
+ export class InstallationSourceResource {
340
+ http;
341
+ constructor(http) {
342
+ this.http = http;
343
+ }
344
+ async list(installation) {
345
+ return this.http.request(`/api/v1/agent_installations/${installation}/installation_sources`);
346
+ }
347
+ async create(installation, input) {
348
+ return this.http.request(`/api/v1/agent_installations/${installation}/installation_sources`, { method: "POST", body: input });
349
+ }
350
+ }
351
+ export class ApiV1AgentInstallationResource {
352
+ http;
353
+ installation_sources;
354
+ constructor(http) {
355
+ this.http = http;
356
+ this.installation_sources = new InstallationSourceResource(http);
357
+ }
358
+ async pause(installation, input) {
359
+ return this.http.request(`/api/v1/agent_installations/${installation}/pause`, { method: "POST", body: input });
360
+ }
361
+ async list(params) {
362
+ return this.http.request(`/api/v1/agent_installations`, { query: params });
363
+ }
364
+ async activate(installation, input) {
365
+ return this.http.request(`/api/v1/agent_installations/${installation}/activate`, { method: "POST", body: input });
366
+ }
367
+ async delete(installation) {
368
+ await this.http.request(`/api/v1/agent_installations/${installation}`, { method: "DELETE" });
369
+ }
370
+ async get(installation) {
371
+ return this.http.request(`/api/v1/agent_installations/${installation}`);
372
+ }
373
+ async suspend(installation, input) {
374
+ return this.http.request(`/api/v1/agent_installations/${installation}/suspend`, { method: "POST", body: input });
375
+ }
376
+ }
377
+ export class ApiV1OrgResource {
378
+ http;
379
+ constructor(http) {
380
+ this.http = http;
381
+ }
382
+ async list(params) {
383
+ return this.http.request(`/api/v1/orgs`, { query: params });
384
+ }
385
+ }
386
+ export class ApiV1AgentComputerResource {
387
+ http;
388
+ constructor(http) {
389
+ this.http = http;
390
+ }
391
+ async refresh(computer, input) {
392
+ return this.http.request(`/api/v1/agent_computers/${computer}/refresh`, { method: "POST", body: input });
393
+ }
394
+ async delete(computer) {
395
+ await this.http.request(`/api/v1/agent_computers/${computer}`, { method: "DELETE" });
396
+ }
397
+ async get(computer) {
398
+ return this.http.request(`/api/v1/agent_computers/${computer}`);
399
+ }
400
+ async exec(computer, input) {
401
+ return this.http.request(`/api/v1/agent_computers/${computer}/exec`, { method: "POST", body: input });
402
+ }
403
+ }
404
+ export class RunResource {
405
+ http;
406
+ constructor(http) {
407
+ this.http = http;
408
+ }
409
+ async list(routine, params) {
410
+ return this.http.request(`/api/v1/agent_routines/${routine}/runs`, { query: params });
411
+ }
412
+ async get(routine, run) {
413
+ return this.http.request(`/api/v1/agent_routines/runs/${run}`);
414
+ }
415
+ }
416
+ export class PresetResource {
417
+ http;
418
+ constructor(http) {
419
+ this.http = http;
420
+ }
421
+ async list() {
422
+ return this.http.request(`/api/v1/agent_routines/presets`);
423
+ }
424
+ }
425
+ export class AgentRoutineResource {
426
+ http;
427
+ runs;
428
+ presets;
429
+ constructor(http) {
430
+ this.http = http;
431
+ this.runs = new RunResource(http);
432
+ this.presets = new PresetResource(http);
433
+ }
434
+ async list(params) {
435
+ return this.http.request(`/api/v1/agent_routines`, { query: params });
436
+ }
437
+ async invoke(routine, input) {
438
+ return this.http.request(`/api/v1/agent_routines/${routine}/invoke`, { method: "POST", body: input });
439
+ }
440
+ async activate(routine, input) {
441
+ return this.http.request(`/api/v1/agent_routines/${routine}/activate`, { method: "POST", body: input });
442
+ }
443
+ async pause(routine, input) {
444
+ return this.http.request(`/api/v1/agent_routines/${routine}/pause`, { method: "POST", body: input });
445
+ }
446
+ async delete(routine) {
447
+ await this.http.request(`/api/v1/agent_routines/${routine}`, { method: "DELETE" });
448
+ }
449
+ async get(routine) {
450
+ return this.http.request(`/api/v1/agent_routines/${routine}`);
451
+ }
452
+ async update(routine, input) {
453
+ return this.http.request(`/api/v1/agent_routines/${routine}`, { method: "PATCH", body: input });
454
+ }
455
+ }
456
+ export class ApiV1AgentAgentInstallationKindResource {
457
+ http;
458
+ constructor(http) {
459
+ this.http = http;
460
+ }
461
+ async list(agent) {
462
+ return this.http.request(`/api/v1/agents/${agent}/agent_installations/kinds`);
463
+ }
464
+ }
465
+ export class AgentInstallationResource {
466
+ http;
467
+ kinds;
468
+ constructor(http) {
469
+ this.http = http;
470
+ this.kinds = new ApiV1AgentAgentInstallationKindResource(http);
471
+ }
472
+ async list(agent) {
473
+ return this.http.request(`/api/v1/agents/${agent}/agent_installations`);
474
+ }
475
+ async create(agent, input) {
476
+ return this.http.request(`/api/v1/agents/${agent}/agent_installations`, { method: "POST", body: input });
477
+ }
478
+ }
479
+ export class AgentComputerResource {
480
+ http;
481
+ constructor(http) {
482
+ this.http = http;
483
+ }
484
+ async list(agent) {
485
+ return this.http.request(`/api/v1/agents/${agent}/agent_computers`);
486
+ }
487
+ async create(agent, input) {
488
+ return this.http.request(`/api/v1/agents/${agent}/agent_computers`, { method: "POST", body: input });
489
+ }
490
+ }
491
+ export class ApiV1AgentAgentToolResource {
492
+ http;
493
+ constructor(http) {
494
+ this.http = http;
495
+ }
496
+ async list(agent, params) {
497
+ return this.http.request(`/api/v1/agents/${agent}/agent_tools`, { query: params });
498
+ }
499
+ async create(agent, input) {
500
+ return this.http.request(`/api/v1/agents/${agent}/agent_tools`, { method: "POST", body: input });
501
+ }
502
+ }
503
+ export class ScheduleResource {
504
+ http;
505
+ constructor(http) {
506
+ this.http = http;
507
+ }
508
+ async get(agent, schedule) {
509
+ return this.http.request(`/api/v1/agents/${agent}/schedules/${schedule}`);
510
+ }
511
+ async list(agent, params) {
512
+ return this.http.request(`/api/v1/agents/${agent}/schedules`, { query: params });
513
+ }
514
+ }
515
+ export class AgentWorkingMemoryResource {
516
+ http;
517
+ constructor(http) {
518
+ this.http = http;
519
+ }
520
+ async list(agent, params) {
521
+ return this.http.request(`/api/v1/agents/${agent}/agent_working_memory`, { query: params });
522
+ }
523
+ }
524
+ export class AgentResource {
525
+ http;
526
+ agent_installations;
527
+ agent_computers;
528
+ agent_tools;
529
+ schedules;
530
+ agent_working_memory;
531
+ constructor(http) {
532
+ this.http = http;
533
+ this.agent_installations = new AgentInstallationResource(http);
534
+ this.agent_computers = new AgentComputerResource(http);
535
+ this.agent_tools = new ApiV1AgentAgentToolResource(http);
536
+ this.schedules = new ScheduleResource(http);
537
+ this.agent_working_memory = new AgentWorkingMemoryResource(http);
538
+ }
539
+ async delete(agent) {
540
+ await this.http.request(`/api/v1/agents/${agent}`, { method: "DELETE" });
541
+ }
542
+ async get(agent) {
543
+ return this.http.request(`/api/v1/agents/${agent}`);
544
+ }
545
+ async update(agent, input) {
546
+ return this.http.request(`/api/v1/agents/${agent}`, { method: "PATCH", body: input });
547
+ }
548
+ async agentRoutines(agent, input) {
549
+ return this.http.request(`/api/v1/agents/${agent}/agent_routines`, { method: "POST", body: input });
550
+ }
551
+ async list(params) {
552
+ return this.http.request(`/api/v1/agents`, { query: params });
553
+ }
554
+ async create(input) {
555
+ return this.http.request(`/api/v1/agents`, { method: "POST", body: input });
556
+ }
557
+ async threads(agent, input) {
558
+ return this.http.request(`/api/v1/agents/${agent}/threads`, { method: "POST", body: input });
559
+ }
560
+ async search(agent, input) {
561
+ return this.http.request(`/api/v1/agents/${agent}/search`, { method: "POST", body: input });
562
+ }
563
+ }
564
+ export class AgentSkillResource {
565
+ http;
566
+ constructor(http) {
567
+ this.http = http;
568
+ }
569
+ async activate(agentSkill, input) {
570
+ return this.http.request(`/api/v1/agent_skills/${agentSkill}/activate`, { method: "POST", body: input });
571
+ }
572
+ async delete(agentSkill) {
573
+ await this.http.request(`/api/v1/agent_skills/${agentSkill}`, { method: "DELETE" });
574
+ }
575
+ async get(agentSkill) {
576
+ return this.http.request(`/api/v1/agent_skills/${agentSkill}`);
577
+ }
578
+ async update(agentSkill, input) {
579
+ return this.http.request(`/api/v1/agent_skills/${agentSkill}`, { method: "PATCH", body: input });
580
+ }
581
+ async list(params) {
582
+ return this.http.request(`/api/v1/agent_skills`, { query: params });
583
+ }
584
+ async create(input) {
585
+ return this.http.request(`/api/v1/agent_skills`, { method: "POST", body: input });
586
+ }
587
+ async deactivate(agentSkill, input) {
588
+ return this.http.request(`/api/v1/agent_skills/${agentSkill}/deactivate`, { method: "POST", body: input });
589
+ }
590
+ }
591
+ export class ReadStatuResource {
592
+ http;
593
+ constructor(http) {
594
+ this.http = http;
595
+ }
596
+ async list(thread, params) {
597
+ return this.http.request(`/api/v1/threads/${thread}/read_status`, { query: params });
598
+ }
599
+ }
600
+ export class SearchResource {
601
+ http;
602
+ constructor(http) {
603
+ this.http = http;
604
+ }
605
+ async list(thread, params) {
606
+ return this.http.request(`/api/v1/threads/${thread}/search`, { query: params });
607
+ }
608
+ }
609
+ export class MessageResource {
610
+ http;
611
+ constructor(http) {
612
+ this.http = http;
613
+ }
614
+ async list(thread, params) {
615
+ return this.http.request(`/api/v1/threads/${thread}/messages`, { query: params });
616
+ }
617
+ }
618
+ export class ApiV1ThreadMemberResource {
619
+ http;
620
+ constructor(http) {
621
+ this.http = http;
622
+ }
623
+ async remove(thread) {
624
+ await this.http.request(`/api/v1/threads/${thread}/members`, { method: "DELETE" });
625
+ }
626
+ async list(thread) {
627
+ return this.http.request(`/api/v1/threads/${thread}/members`);
628
+ }
629
+ async create(thread, input) {
630
+ return this.http.request(`/api/v1/threads/${thread}/members`, { method: "POST", body: input });
631
+ }
632
+ }
633
+ export class PictureResource {
634
+ http;
635
+ constructor(http) {
636
+ this.http = http;
637
+ }
638
+ async replace(thread, input) {
639
+ return this.http.request(`/api/v1/threads/${thread}/picture`, { method: "PUT", body: input });
640
+ }
641
+ }
642
+ export class ApiV1ThreadAgentResource {
643
+ http;
644
+ constructor(http) {
645
+ this.http = http;
646
+ }
647
+ async list(thread) {
648
+ return this.http.request(`/api/v1/threads/${thread}/agents`);
649
+ }
650
+ }
651
+ export class SettingResource {
652
+ http;
653
+ constructor(http) {
654
+ this.http = http;
655
+ }
656
+ async list(thread) {
657
+ return this.http.request(`/api/v1/threads/${thread}/settings`);
658
+ }
659
+ async replace(thread, input) {
660
+ return this.http.request(`/api/v1/threads/${thread}/settings`, { method: "PUT", body: input });
661
+ }
662
+ }
663
+ export class ApiV1ThreadArtifactResource {
664
+ http;
665
+ constructor(http) {
666
+ this.http = http;
667
+ }
668
+ async list(thread) {
669
+ return this.http.request(`/api/v1/threads/${thread}/artifacts`);
670
+ }
671
+ }
672
+ export class ThreadResource {
673
+ http;
674
+ read_status;
675
+ search;
676
+ messages;
677
+ members;
678
+ picture;
679
+ agents;
680
+ settings;
681
+ artifacts;
682
+ constructor(http) {
683
+ this.http = http;
684
+ this.read_status = new ReadStatuResource(http);
685
+ this.search = new SearchResource(http);
686
+ this.messages = new MessageResource(http);
687
+ this.members = new ApiV1ThreadMemberResource(http);
688
+ this.picture = new PictureResource(http);
689
+ this.agents = new ApiV1ThreadAgentResource(http);
690
+ this.settings = new SettingResource(http);
691
+ this.artifacts = new ApiV1ThreadArtifactResource(http);
692
+ }
693
+ async markRead(thread, input) {
694
+ return this.http.request(`/api/v1/threads/${thread}/mark_read`, { method: "POST", body: input });
695
+ }
696
+ async delete(thread) {
697
+ await this.http.request(`/api/v1/threads/${thread}`, { method: "DELETE" });
698
+ }
699
+ async get(thread) {
700
+ return this.http.request(`/api/v1/threads/${thread}`);
701
+ }
702
+ async replace(thread, input) {
703
+ return this.http.request(`/api/v1/threads/${thread}`, { method: "PUT", body: input });
704
+ }
705
+ }
706
+ export class MeResource {
707
+ http;
708
+ constructor(http) {
709
+ this.http = http;
710
+ }
711
+ async list() {
712
+ return this.http.request(`/api/v1/users/me`);
713
+ }
714
+ }
715
+ export class OrgResource {
716
+ http;
717
+ constructor(http) {
718
+ this.http = http;
719
+ }
720
+ async list(user) {
721
+ return this.http.request(`/api/v1/users/${user}/orgs`);
722
+ }
723
+ }
724
+ export class ApiV1UserArtifactResource {
725
+ http;
726
+ constructor(http) {
727
+ this.http = http;
728
+ }
729
+ async list(user) {
730
+ return this.http.request(`/api/v1/users/${user}/artifacts`);
731
+ }
732
+ async create(user, input) {
733
+ return this.http.request(`/api/v1/users/${user}/artifacts`, { method: "POST", body: input });
734
+ }
735
+ }
736
+ export class ApiV1UserThreadResource {
737
+ http;
738
+ constructor(http) {
739
+ this.http = http;
740
+ }
741
+ async list(user, params) {
742
+ return this.http.request(`/api/v1/users/${user}/threads`, { query: params });
743
+ }
744
+ async create(user, input) {
745
+ return this.http.request(`/api/v1/users/${user}/threads`, { method: "POST", body: input });
746
+ }
747
+ }
748
+ export class ProfileResource {
749
+ http;
750
+ constructor(http) {
751
+ this.http = http;
752
+ }
753
+ async replace(user, input) {
754
+ return this.http.request(`/api/v1/users/${user}/profile`, { method: "PUT", body: input });
755
+ }
756
+ }
757
+ export class UserResource {
758
+ http;
759
+ me;
760
+ orgs;
761
+ artifacts;
762
+ threads;
763
+ profile;
764
+ constructor(http) {
765
+ this.http = http;
766
+ this.me = new MeResource(http);
767
+ this.orgs = new OrgResource(http);
768
+ this.artifacts = new ApiV1UserArtifactResource(http);
769
+ this.threads = new ApiV1UserThreadResource(http);
770
+ this.profile = new ProfileResource(http);
771
+ }
772
+ async get(user) {
773
+ return this.http.request(`/api/v1/users/${user}`);
774
+ }
775
+ }
776
+ export class CustomObjectResource {
777
+ http;
778
+ constructor(http) {
779
+ this.http = http;
780
+ }
781
+ async delete(object) {
782
+ await this.http.request(`/api/v1/custom_objects/${object}`, { method: "DELETE" });
783
+ }
784
+ async get(object, params) {
785
+ return this.http.request(`/api/v1/custom_objects/${object}`, { query: params });
786
+ }
787
+ async replace(object, input) {
788
+ return this.http.request(`/api/v1/custom_objects/${object}`, { method: "PUT", body: input });
789
+ }
790
+ }
791
+ export class AutomationResource {
792
+ http;
793
+ constructor(http) {
794
+ this.http = http;
795
+ }
796
+ async invoke(automation, input) {
797
+ return this.http.request(`/api/v1/automations/${automation}/invoke`, { method: "POST", body: input });
798
+ }
799
+ }
800
+ export class ReactionResource {
801
+ http;
802
+ constructor(http) {
803
+ this.http = http;
804
+ }
805
+ async remove(message) {
806
+ await this.http.request(`/api/v1/thread_messages/${message}/reactions`, { method: "DELETE" });
807
+ }
808
+ async create(message, input) {
809
+ return this.http.request(`/api/v1/thread_messages/${message}/reactions`, { method: "POST", body: input });
810
+ }
811
+ }
812
+ export class ReplyResource {
813
+ http;
814
+ constructor(http) {
815
+ this.http = http;
816
+ }
817
+ async list(message, params) {
818
+ return this.http.request(`/api/v1/thread_messages/${message}/replies`, { query: params });
819
+ }
820
+ }
821
+ export class ThreadMessageResource {
822
+ http;
823
+ reactions;
824
+ replies;
825
+ constructor(http) {
826
+ this.http = http;
827
+ this.reactions = new ReactionResource(http);
828
+ this.replies = new ReplyResource(http);
829
+ }
830
+ async delete(message) {
831
+ await this.http.request(`/api/v1/thread_messages/${message}`, { method: "DELETE" });
832
+ }
833
+ async replace(message, input) {
834
+ return this.http.request(`/api/v1/thread_messages/${message}`, { method: "PUT", body: input });
835
+ }
836
+ }
837
+ export class ApiV1AiChatModelResource {
838
+ http;
839
+ constructor(http) {
840
+ this.http = http;
841
+ }
842
+ async list() {
843
+ return this.http.request(`/api/v1/ai/chat/models`);
844
+ }
845
+ }
846
+ export class ChatResource {
847
+ http;
848
+ models;
849
+ constructor(http) {
850
+ this.http = http;
851
+ this.models = new ApiV1AiChatModelResource(http);
852
+ }
853
+ async completions(input) {
854
+ return this.http.request(`/api/v1/ai/chat/completions`, { method: "POST", body: input });
855
+ }
856
+ }
857
+ export class ModelResource {
858
+ http;
859
+ constructor(http) {
860
+ this.http = http;
861
+ }
862
+ async list() {
863
+ return this.http.request(`/api/v1/ai/image/models`);
864
+ }
865
+ }
866
+ export class ImageResource {
867
+ http;
868
+ models;
869
+ constructor(http) {
870
+ this.http = http;
871
+ this.models = new ModelResource(http);
872
+ }
873
+ async edits(input) {
874
+ return this.http.request(`/api/v1/ai/image/edits`, { method: "POST", body: input });
875
+ }
876
+ async generations(input) {
877
+ return this.http.request(`/api/v1/ai/image/generations`, { method: "POST", body: input });
878
+ }
879
+ }
880
+ export class AiResource {
881
+ http;
882
+ chat;
883
+ image;
884
+ constructor(http) {
885
+ this.http = http;
886
+ this.chat = new ChatResource(http);
887
+ this.image = new ImageResource(http);
888
+ }
889
+ }
890
+ export class V1Resource {
891
+ http;
892
+ automation_runs;
893
+ config;
894
+ artifacts;
895
+ installation_sources;
896
+ agent_sessions;
897
+ teams;
898
+ agent_tools;
899
+ team_memberships;
900
+ agent_installations;
901
+ orgs;
902
+ agent_computers;
903
+ agent_routines;
904
+ agents;
905
+ agent_skills;
906
+ threads;
907
+ users;
908
+ custom_objects;
909
+ automations;
910
+ thread_messages;
911
+ ai;
912
+ constructor(http) {
913
+ this.http = http;
914
+ this.automation_runs = new AutomationRunResource(http);
915
+ this.config = new ConfigResource(http);
916
+ this.artifacts = new ArtifactResource(http);
917
+ this.installation_sources = new ApiV1InstallationSourceResource(http);
918
+ this.agent_sessions = new AgentSessionResource(http);
919
+ this.teams = new TeamResource(http);
920
+ this.agent_tools = new AgentToolResource(http);
921
+ this.team_memberships = new TeamMembershipResource(http);
922
+ this.agent_installations = new ApiV1AgentInstallationResource(http);
923
+ this.orgs = new ApiV1OrgResource(http);
924
+ this.agent_computers = new ApiV1AgentComputerResource(http);
925
+ this.agent_routines = new AgentRoutineResource(http);
926
+ this.agents = new AgentResource(http);
927
+ this.agent_skills = new AgentSkillResource(http);
928
+ this.threads = new ThreadResource(http);
929
+ this.users = new UserResource(http);
930
+ this.custom_objects = new CustomObjectResource(http);
931
+ this.automations = new AutomationResource(http);
932
+ this.thread_messages = new ThreadMessageResource(http);
933
+ this.ai = new AiResource(http);
934
+ }
935
+ }
936
+ export class ApiResource {
937
+ http;
938
+ v1;
939
+ constructor(http) {
940
+ this.http = http;
941
+ this.v1 = new V1Resource(http);
942
+ }
943
+ }
944
+ //# sourceMappingURL=api.js.map