@archastro/sdk 0.5.2 → 0.6.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 (230) hide show
  1. package/README.md +86 -0
  2. package/dist/auth.d.ts +143 -0
  3. package/dist/auth.d.ts.map +1 -1
  4. package/dist/auth.js +187 -1
  5. package/dist/auth.js.map +1 -1
  6. package/dist/channels/api_chat_channel.d.ts +4 -0
  7. package/dist/channels/api_chat_channel.d.ts.map +1 -1
  8. package/dist/channels/api_chat_channel.js +9 -1
  9. package/dist/channels/api_chat_channel.js.map +1 -1
  10. package/dist/client.d.ts +26 -0
  11. package/dist/client.d.ts.map +1 -1
  12. package/dist/client.js +27 -1
  13. package/dist/client.js.map +1 -1
  14. package/dist/index.d.ts +1 -1
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +2 -2
  17. package/dist/index.js.map +1 -1
  18. package/dist/runtime/http-client.d.ts +17 -0
  19. package/dist/runtime/http-client.d.ts.map +1 -1
  20. package/dist/runtime/http-client.js +116 -0
  21. package/dist/runtime/http-client.js.map +1 -1
  22. package/dist/types/ai.d.ts +421 -14
  23. package/dist/types/ai.d.ts.map +1 -1
  24. package/dist/types/ai.js +121 -41
  25. package/dist/types/ai.js.map +1 -1
  26. package/dist/types/artifacts.d.ts +81 -24
  27. package/dist/types/artifacts.d.ts.map +1 -1
  28. package/dist/types/artifacts.js +39 -21
  29. package/dist/types/artifacts.js.map +1 -1
  30. package/dist/types/automations.d.ts +41 -9
  31. package/dist/types/automations.d.ts.map +1 -1
  32. package/dist/types/automations.js +25 -17
  33. package/dist/types/automations.js.map +1 -1
  34. package/dist/types/chat.d.ts +21560 -0
  35. package/dist/types/chat.d.ts.map +1 -0
  36. package/dist/types/chat.js +70 -0
  37. package/dist/types/chat.js.map +1 -0
  38. package/dist/types/common.d.ts +17031 -2136
  39. package/dist/types/common.d.ts.map +1 -1
  40. package/dist/types/common.js +1701 -332
  41. package/dist/types/common.js.map +1 -1
  42. package/dist/types/config.d.ts +245 -37
  43. package/dist/types/config.d.ts.map +1 -1
  44. package/dist/types/config.js +86 -34
  45. package/dist/types/config.js.map +1 -1
  46. package/dist/types/image.d.ts +27 -4
  47. package/dist/types/image.d.ts.map +1 -1
  48. package/dist/types/image.js +17 -10
  49. package/dist/types/image.js.map +1 -1
  50. package/dist/types/index.d.ts +2 -1
  51. package/dist/types/index.d.ts.map +1 -1
  52. package/dist/types/index.js +3 -2
  53. package/dist/types/index.js.map +1 -1
  54. package/dist/types/invites.d.ts +20 -11
  55. package/dist/types/invites.d.ts.map +1 -1
  56. package/dist/types/invites.js +9 -12
  57. package/dist/types/invites.js.map +1 -1
  58. package/dist/types/notifications.d.ts +163 -0
  59. package/dist/types/notifications.d.ts.map +1 -0
  60. package/dist/types/notifications.js +44 -0
  61. package/dist/types/notifications.js.map +1 -0
  62. package/dist/types/teams.d.ts +1640 -231
  63. package/dist/types/teams.d.ts.map +1 -1
  64. package/dist/types/teams.js +76 -45
  65. package/dist/types/teams.js.map +1 -1
  66. package/dist/types/threads.d.ts +1007 -243
  67. package/dist/types/threads.d.ts.map +1 -1
  68. package/dist/types/threads.js +84 -51
  69. package/dist/types/threads.js.map +1 -1
  70. package/dist/types/users.d.ts +98 -18
  71. package/dist/types/users.d.ts.map +1 -1
  72. package/dist/types/users.js +43 -18
  73. package/dist/types/users.js.map +1 -1
  74. package/dist/v1/resources/activity_feed.d.ts +90 -0
  75. package/dist/v1/resources/activity_feed.d.ts.map +1 -1
  76. package/dist/v1/resources/activity_feed.js +56 -2
  77. package/dist/v1/resources/activity_feed.js.map +1 -1
  78. package/dist/v1/resources/agent_computers.d.ts +48 -2
  79. package/dist/v1/resources/agent_computers.d.ts.map +1 -1
  80. package/dist/v1/resources/agent_computers.js +48 -1
  81. package/dist/v1/resources/agent_computers.js.map +1 -1
  82. package/dist/v1/resources/agent_env_vars.d.ts +50 -0
  83. package/dist/v1/resources/agent_env_vars.d.ts.map +1 -0
  84. package/dist/v1/resources/agent_env_vars.js +56 -0
  85. package/dist/v1/resources/agent_env_vars.js.map +1 -0
  86. package/dist/v1/resources/agent_health_actions.d.ts +43 -0
  87. package/dist/v1/resources/agent_health_actions.d.ts.map +1 -0
  88. package/dist/v1/resources/agent_health_actions.js +50 -0
  89. package/dist/v1/resources/agent_health_actions.js.map +1 -0
  90. package/dist/v1/resources/agent_installations.d.ts +100 -0
  91. package/dist/v1/resources/agent_installations.d.ts.map +1 -1
  92. package/dist/v1/resources/agent_installations.js +106 -2
  93. package/dist/v1/resources/agent_installations.js.map +1 -1
  94. package/dist/v1/resources/agent_routine_runs.d.ts +33 -0
  95. package/dist/v1/resources/agent_routine_runs.d.ts.map +1 -0
  96. package/dist/v1/resources/agent_routine_runs.js +48 -0
  97. package/dist/v1/resources/agent_routine_runs.js.map +1 -0
  98. package/dist/v1/resources/agent_routines.d.ts +148 -2
  99. package/dist/v1/resources/agent_routines.d.ts.map +1 -1
  100. package/dist/v1/resources/agent_routines.js +168 -3
  101. package/dist/v1/resources/agent_routines.js.map +1 -1
  102. package/dist/v1/resources/agent_sessions.d.ts +118 -1
  103. package/dist/v1/resources/agent_sessions.d.ts.map +1 -1
  104. package/dist/v1/resources/agent_sessions.js +134 -2
  105. package/dist/v1/resources/agent_sessions.js.map +1 -1
  106. package/dist/v1/resources/agent_skills.d.ts +83 -1
  107. package/dist/v1/resources/agent_skills.d.ts.map +1 -1
  108. package/dist/v1/resources/agent_skills.js +87 -2
  109. package/dist/v1/resources/agent_skills.js.map +1 -1
  110. package/dist/v1/resources/agent_tools.d.ts +109 -2
  111. package/dist/v1/resources/agent_tools.d.ts.map +1 -1
  112. package/dist/v1/resources/agent_tools.js +114 -2
  113. package/dist/v1/resources/agent_tools.js.map +1 -1
  114. package/dist/v1/resources/agents.d.ts +519 -9
  115. package/dist/v1/resources/agents.d.ts.map +1 -1
  116. package/dist/v1/resources/agents.js +516 -12
  117. package/dist/v1/resources/agents.js.map +1 -1
  118. package/dist/v1/resources/ai.d.ts +174 -3
  119. package/dist/v1/resources/ai.d.ts.map +1 -1
  120. package/dist/v1/resources/ai.js +114 -3
  121. package/dist/v1/resources/ai.js.map +1 -1
  122. package/dist/v1/resources/artifacts.d.ts +73 -0
  123. package/dist/v1/resources/artifacts.d.ts.map +1 -1
  124. package/dist/v1/resources/artifacts.js +74 -2
  125. package/dist/v1/resources/artifacts.js.map +1 -1
  126. package/dist/v1/resources/automation_runs.d.ts +8 -4
  127. package/dist/v1/resources/automation_runs.d.ts.map +1 -1
  128. package/dist/v1/resources/automation_runs.js +9 -5
  129. package/dist/v1/resources/automation_runs.js.map +1 -1
  130. package/dist/v1/resources/automations.d.ts +20 -0
  131. package/dist/v1/resources/automations.d.ts.map +1 -1
  132. package/dist/v1/resources/automations.js +21 -1
  133. package/dist/v1/resources/automations.js.map +1 -1
  134. package/dist/v1/resources/bug_reports.d.ts +29 -0
  135. package/dist/v1/resources/bug_reports.d.ts.map +1 -0
  136. package/dist/v1/resources/bug_reports.js +29 -0
  137. package/dist/v1/resources/bug_reports.js.map +1 -0
  138. package/dist/v1/resources/config.d.ts +437 -4
  139. package/dist/v1/resources/config.d.ts.map +1 -1
  140. package/dist/v1/resources/config.js +497 -9
  141. package/dist/v1/resources/config.js.map +1 -1
  142. package/dist/v1/resources/custom_objects.d.ts +117 -2
  143. package/dist/v1/resources/custom_objects.d.ts.map +1 -1
  144. package/dist/v1/resources/custom_objects.js +132 -3
  145. package/dist/v1/resources/custom_objects.js.map +1 -1
  146. package/dist/v1/resources/files.d.ts +62 -0
  147. package/dist/v1/resources/files.d.ts.map +1 -0
  148. package/dist/v1/resources/files.js +58 -0
  149. package/dist/v1/resources/files.js.map +1 -0
  150. package/dist/v1/resources/index.d.ts +13 -0
  151. package/dist/v1/resources/index.d.ts.map +1 -1
  152. package/dist/v1/resources/index.js +14 -1
  153. package/dist/v1/resources/index.js.map +1 -1
  154. package/dist/v1/resources/installation_sources.d.ts +12 -0
  155. package/dist/v1/resources/installation_sources.d.ts.map +1 -1
  156. package/dist/v1/resources/installation_sources.js +13 -1
  157. package/dist/v1/resources/installation_sources.js.map +1 -1
  158. package/dist/v1/resources/invites.d.ts +15 -0
  159. package/dist/v1/resources/invites.d.ts.map +1 -1
  160. package/dist/v1/resources/invites.js +16 -1
  161. package/dist/v1/resources/invites.js.map +1 -1
  162. package/dist/v1/resources/knowledge_documents.d.ts +104 -0
  163. package/dist/v1/resources/knowledge_documents.d.ts.map +1 -0
  164. package/dist/v1/resources/knowledge_documents.js +112 -0
  165. package/dist/v1/resources/knowledge_documents.js.map +1 -0
  166. package/dist/v1/resources/knowledge_sources.d.ts +190 -0
  167. package/dist/v1/resources/knowledge_sources.d.ts.map +1 -0
  168. package/dist/v1/resources/knowledge_sources.js +176 -0
  169. package/dist/v1/resources/knowledge_sources.js.map +1 -0
  170. package/dist/v1/resources/kv.d.ts +73 -0
  171. package/dist/v1/resources/kv.d.ts.map +1 -1
  172. package/dist/v1/resources/kv.js +96 -3
  173. package/dist/v1/resources/kv.js.map +1 -1
  174. package/dist/v1/resources/notification_preferences.d.ts +61 -0
  175. package/dist/v1/resources/notification_preferences.d.ts.map +1 -0
  176. package/dist/v1/resources/notification_preferences.js +65 -0
  177. package/dist/v1/resources/notification_preferences.js.map +1 -0
  178. package/dist/v1/resources/notifications.d.ts +133 -0
  179. package/dist/v1/resources/notifications.d.ts.map +1 -0
  180. package/dist/v1/resources/notifications.js +136 -0
  181. package/dist/v1/resources/notifications.js.map +1 -0
  182. package/dist/v1/resources/orgs.d.ts +18 -0
  183. package/dist/v1/resources/orgs.d.ts.map +1 -1
  184. package/dist/v1/resources/orgs.js +30 -2
  185. package/dist/v1/resources/orgs.js.map +1 -1
  186. package/dist/v1/resources/slack_channel_bindings.d.ts +101 -0
  187. package/dist/v1/resources/slack_channel_bindings.d.ts.map +1 -0
  188. package/dist/v1/resources/slack_channel_bindings.js +114 -0
  189. package/dist/v1/resources/slack_channel_bindings.js.map +1 -0
  190. package/dist/v1/resources/solution_categories.d.ts +36 -0
  191. package/dist/v1/resources/solution_categories.d.ts.map +1 -0
  192. package/dist/v1/resources/solution_categories.js +55 -0
  193. package/dist/v1/resources/solution_categories.js.map +1 -0
  194. package/dist/v1/resources/solution_tags.d.ts +37 -0
  195. package/dist/v1/resources/solution_tags.d.ts.map +1 -0
  196. package/dist/v1/resources/solution_tags.js +54 -0
  197. package/dist/v1/resources/solution_tags.js.map +1 -0
  198. package/dist/v1/resources/solutions.d.ts +313 -0
  199. package/dist/v1/resources/solutions.d.ts.map +1 -0
  200. package/dist/v1/resources/solutions.js +218 -0
  201. package/dist/v1/resources/solutions.js.map +1 -0
  202. package/dist/v1/resources/team_memberships.d.ts +31 -0
  203. package/dist/v1/resources/team_memberships.d.ts.map +1 -1
  204. package/dist/v1/resources/team_memberships.js +49 -2
  205. package/dist/v1/resources/team_memberships.js.map +1 -1
  206. package/dist/v1/resources/teams.d.ts +461 -49
  207. package/dist/v1/resources/teams.d.ts.map +1 -1
  208. package/dist/v1/resources/teams.js +319 -27
  209. package/dist/v1/resources/teams.js.map +1 -1
  210. package/dist/v1/resources/thread_messages.d.ts +70 -0
  211. package/dist/v1/resources/thread_messages.d.ts.map +1 -1
  212. package/dist/v1/resources/thread_messages.js +85 -2
  213. package/dist/v1/resources/thread_messages.js.map +1 -1
  214. package/dist/v1/resources/threads.d.ts +221 -0
  215. package/dist/v1/resources/threads.d.ts.map +1 -1
  216. package/dist/v1/resources/threads.js +252 -4
  217. package/dist/v1/resources/threads.js.map +1 -1
  218. package/dist/v1/resources/users.d.ts +215 -39
  219. package/dist/v1/resources/users.d.ts.map +1 -1
  220. package/dist/v1/resources/users.js +121 -16
  221. package/dist/v1/resources/users.js.map +1 -1
  222. package/dist/v1.d.ts +26 -0
  223. package/dist/v1.d.ts.map +1 -1
  224. package/dist/v1.js +40 -1
  225. package/dist/v1.js.map +1 -1
  226. package/package.json +4 -2
  227. package/dist/types/agents.d.ts +0 -2084
  228. package/dist/types/agents.d.ts.map +0 -1
  229. package/dist/types/agents.js +0 -203
  230. package/dist/types/agents.js.map +0 -1
@@ -1,54 +1,40 @@
1
1
  import { HttpClient } from "../../runtime/http-client.js";
2
- import type { Artifact } from "../../types/artifacts.js";
3
2
  import type { CustomObject } from "../../types/common.js";
4
3
  import type { Team, TeamInvite, TeamMembership } from "../../types/teams.js";
5
4
  import type { Thread } from "../../types/threads.js";
6
- export declare class TeamArtifactResource {
7
- private http;
8
- constructor(http: HttpClient);
9
- list(team: string): Promise<{
10
- data: {
11
- agent?: string | undefined;
12
- content_type?: string | undefined;
13
- created_at?: string | undefined;
14
- current_version?: string | undefined;
15
- description?: string | undefined;
16
- file?: string | undefined;
17
- file_name?: string | undefined;
18
- file_url?: string | undefined;
19
- id: string;
20
- image_source?: {
21
- file?: string | undefined;
22
- height?: number | undefined;
23
- media?: string | undefined;
24
- mime_type?: string | undefined;
25
- refresh_url?: string | undefined;
26
- url?: string | undefined;
27
- width?: number | undefined;
28
- } | undefined;
29
- name?: string | undefined;
30
- org?: string | undefined;
31
- sandbox?: string | undefined;
32
- team?: string | undefined;
33
- thread?: string | undefined;
34
- updated_at?: string | undefined;
35
- user?: string | undefined;
36
- version?: number | undefined;
37
- }[];
38
- }>;
39
- create(team: string, input: {
40
- artifact: Record<string, unknown>;
41
- }): Promise<Artifact>;
42
- }
43
5
  export declare class TeamCustomObjectResource {
44
6
  private http;
45
7
  constructor(http: HttpClient);
8
+ /**
9
+ * List a team's custom objects
10
+ * Returns a paginated list of custom objects owned by the specified team,
11
+ * filtered to a single schema type. Results are ordered by creation time
12
+ * descending unless `query` is provided, in which case they are ordered by
13
+ * full-text relevance score descending.
14
+ * Use `limit` and `offset` for page-based pagination. Use `row_key` or
15
+ * `sort_key` to narrow results to objects matching those index values.
16
+ * Full-text search via `query` operates only against the fields configured
17
+ * as `search_fields` on the schema.
18
+ * The authenticated user must be a member of the team with sufficient
19
+ * access. Returns 404 if the team is not found, the caller lacks access,
20
+ * or `type` does not match a registered schema for the team's organization.
21
+ * @param team - Team ID (`team_...`). Scopes results to objects owned by this team.
22
+ * @param params - Query parameters.
23
+ * @param params.type - Schema type identifier (`lookup_key`) that filters results to objects of this schema.
24
+ * @param params.limit - Maximum number of objects to return per page.
25
+ * @param params.offset - Number of objects to skip before returning results. Use with `limit` for page-based pagination.
26
+ * @param params.rowKey - Filter results to objects whose `row_key` exactly matches this value.
27
+ * @param params.sortKey - Filter results to objects whose `sort_key` exactly matches this value.
28
+ * @param params.query - Full-text search string matched against the schema's configured `search_fields`. When provided, results are ordered by relevance score descending instead of creation time descending.
29
+ * @returns Successful response
30
+ */
46
31
  list(team: string, params?: {
47
32
  type?: string;
48
33
  limit?: number;
49
34
  offset?: number;
50
35
  rowKey?: string;
51
36
  sortKey?: string;
37
+ query?: string;
52
38
  }): Promise<{
53
39
  data: {
54
40
  created_at?: string | undefined;
@@ -65,6 +51,22 @@ export declare class TeamCustomObjectResource {
65
51
  }[];
66
52
  meta?: Record<string, unknown> | undefined;
67
53
  }>;
54
+ /**
55
+ * Create a team custom object
56
+ * Creates a new custom object owned by the specified team. The object is
57
+ * instantiated against the schema identified by `type` (the schema's
58
+ * `lookup_key`). All field values are validated against that schema's
59
+ * field definitions before the object is persisted.
60
+ * The authenticated user must be a member of the team with sufficient
61
+ * access. If the team is not found or the caller lacks access, the endpoint
62
+ * returns 404. If `type` does not match a registered schema for the team's
63
+ * organization, the endpoint also returns 404.
64
+ * @param team - Team ID (`team_...`). Scopes results to objects owned by this team.
65
+ * @param input - Request body.
66
+ * @param input.fields - Map of field values to set on the new object. Keys and value types must conform to the schema identified by `type`.
67
+ * @param input.type - Schema type identifier (`lookup_key`) that defines the object's fields and validation rules.
68
+ * @returns The newly created custom object.
69
+ */
68
70
  create(team: string, input: {
69
71
  fields: Record<string, unknown>;
70
72
  type: string;
@@ -73,6 +75,32 @@ export declare class TeamCustomObjectResource {
73
75
  export declare class MemberResource {
74
76
  private http;
75
77
  constructor(http: HttpClient);
78
+ /**
79
+ * Remove a member or org from a team
80
+ * Removes a user, agent, or all members of an organization from the specified
81
+ * team. Provide exactly one of `user`, `agent`, or `org` — supplying more than
82
+ * one or none returns a 400 error. On success, returns 204 No Content.
83
+ * When `org` is provided, every user and agent membership belonging to that org
84
+ * is removed in a single call. The caller must be a member of the team's owning
85
+ * org to perform an org-scoped removal. You cannot target the team's owning org
86
+ * itself with this parameter.
87
+ * The caller must have permission to manage the team. When `app` is present, the
88
+ * request is scoped to that app and requires a valid app-scoped token.
89
+ * @param team - Team ID (`team_...`). The team to remove the member from.
90
+ * @returns Empty response. Returns 204 No Content on success.
91
+ */
92
+ remove(team: string): Promise<void>;
93
+ /**
94
+ * List members of a team
95
+ * Returns all members of the specified team, including both users and agents.
96
+ * Members are returned in a single non-paginated array ordered by join time.
97
+ * Bearer-authenticated users must be a member of the team to retrieve its
98
+ * member list. Developer and server-to-server callers can retrieve members for
99
+ * any team visible to their app scope. When `app` is provided, the request is
100
+ * scoped to that app and requires a valid app-scoped token.
101
+ * @param team - Team ID (`team_...`). The team to remove the member from.
102
+ * @returns Successful response
103
+ */
76
104
  list(team: string): Promise<{
77
105
  data: {
78
106
  agent?: {
@@ -98,13 +126,73 @@ export declare class MemberResource {
98
126
  email?: string | undefined;
99
127
  id: string;
100
128
  identity?: string | undefined;
129
+ last_applied_template_config?: string | undefined;
101
130
  lookup_key?: string | undefined;
102
131
  metadata?: Record<string, unknown> | undefined;
103
132
  name?: string | undefined;
104
133
  org?: string | undefined;
134
+ org_name?: string | undefined;
135
+ originator?: string | undefined;
105
136
  phone_number?: string | undefined;
106
137
  sandbox?: string | undefined;
138
+ source_solution?: {
139
+ solution: {
140
+ category_keys?: string[] | undefined;
141
+ created_at?: string | undefined;
142
+ description?: string | undefined;
143
+ id: string;
144
+ kind: string;
145
+ latest_solution?: string | undefined;
146
+ latest_version?: string | undefined;
147
+ lookup_key?: string | undefined;
148
+ metadata?: Record<string, unknown> | undefined;
149
+ name?: string | undefined;
150
+ org?: string | undefined;
151
+ org_logo?: {
152
+ file?: string | undefined;
153
+ height?: number | undefined;
154
+ media?: string | undefined;
155
+ mime_type?: string | undefined;
156
+ refresh_url?: string | undefined;
157
+ url?: string | undefined;
158
+ width?: number | undefined;
159
+ } | undefined;
160
+ org_name?: string | undefined;
161
+ org_slug?: string | undefined;
162
+ owners: string[];
163
+ readme_url?: string | undefined;
164
+ solution_id?: string | undefined;
165
+ solution_version?: string | undefined;
166
+ tag_keys?: string[] | undefined;
167
+ template_kind?: string | undefined;
168
+ templates: {
169
+ description?: string | undefined;
170
+ display_name?: string | undefined;
171
+ id?: string | undefined;
172
+ kind: string;
173
+ lookup_key?: string | undefined;
174
+ name?: string | undefined;
175
+ readme_url?: string | undefined;
176
+ virtual_path?: string | undefined;
177
+ }[];
178
+ updated_at?: string | undefined;
179
+ upgrade_available: boolean;
180
+ virtual_path?: string | undefined;
181
+ };
182
+ template: {
183
+ created_at?: string | undefined;
184
+ description?: string | undefined;
185
+ display_name?: string | undefined;
186
+ id: string;
187
+ kind: string;
188
+ lookup_key?: string | undefined;
189
+ name?: string | undefined;
190
+ updated_at?: string | undefined;
191
+ virtual_path?: string | undefined;
192
+ };
193
+ } | undefined;
107
194
  team?: string | undefined;
195
+ template_upgrade_available?: boolean | undefined;
108
196
  updated_at?: string | undefined;
109
197
  user?: string | undefined;
110
198
  } | undefined;
@@ -128,36 +216,93 @@ export declare class MemberResource {
128
216
  updated_at?: string | undefined;
129
217
  user?: {
130
218
  alias?: string | undefined;
219
+ app?: string | undefined;
220
+ app_name?: string | undefined;
131
221
  email?: string | undefined;
132
222
  id: string;
223
+ is_system_user?: boolean | undefined;
133
224
  metadata?: Record<string, unknown> | undefined;
134
225
  name?: string | undefined;
135
226
  org?: string | undefined;
227
+ org_name?: string | undefined;
228
+ org_role?: string | undefined;
136
229
  sandbox?: string | undefined;
230
+ sandbox_name?: string | undefined;
137
231
  } | undefined;
138
232
  }[];
139
233
  }>;
234
+ /**
235
+ * Add a member to a team
236
+ * Adds a user or agent as a member of the specified team and returns the new
237
+ * membership with HTTP 201. Provide exactly one of `user` or `agent` — supplying
238
+ * both or neither returns a 400 error.
239
+ * The caller must have permission to manage the team. When an `app` is provided,
240
+ * the request is scoped to that app and the caller must hold a valid app-scoped
241
+ * token. The default role is `"member"` when `role` is omitted.
242
+ * @param team - Team ID (`team_...`). The team to remove the member from.
243
+ * @param input - Request body.
244
+ * @param input.agent - Agent ID (`agt_...`) to add as a member. Provide exactly one of `user` or `agent`.
245
+ * @param input.role - Role to assign. One of `"owner"`, `"admin"`, or `"member"`. Defaults to `"member"` when omitted.
246
+ * @param input.user - User ID (`usr_...`) to add as a member. Provide exactly one of `user` or `agent`.
247
+ * @returns The newly created team membership.
248
+ */
140
249
  create(team: string, input: {
141
250
  agent?: string | undefined;
142
251
  role?: string | undefined;
143
252
  user?: string | undefined;
144
253
  }): Promise<TeamMembership>;
254
+ /**
255
+ * Update a team member's role
256
+ * Changes the role of an existing user member on the specified team. Returns the
257
+ * updated membership on success.
258
+ * Only user memberships are supported by this endpoint. Attempting to update an
259
+ * agent membership returns 404. To change an agent's role, remove the existing
260
+ * membership and re-add the agent with the desired role.
261
+ * The caller must have permission to modify the team. You cannot change a member's
262
+ * role across organization boundaries. Demoting the last owner of a team returns
263
+ * 409. An invalid `role` value returns 422. When `app` is provided, the request
264
+ * is scoped to that app and requires a valid app-scoped token.
265
+ * @param team - Team ID (`team_...`). The team to remove the member from.
266
+ * @param user - User ID (`usr_...`) of the existing member whose role should be changed.
267
+ * @param input - Request body.
268
+ * @param input.role - New role to assign. One of `"owner"`, `"admin"`, or `"member"`.
269
+ * @returns The updated team membership reflecting the new role.
270
+ */
271
+ update(team: string, user: string, input: {
272
+ role: string;
273
+ }): Promise<TeamMembership>;
145
274
  }
146
275
  export declare class TeamThreadResource {
147
276
  private http;
148
277
  constructor(http: HttpClient);
278
+ /**
279
+ * List threads for a team
280
+ * Returns all threads owned by the specified team that the authenticated caller
281
+ * has permission to view. The caller must have access to the team; requests
282
+ * without team access are rejected with 404.
283
+ * Threads are returned in a single `data` array. Use the team-scoped thread
284
+ * endpoints to create, update, or delete individual threads.
285
+ * @param team - Team ID (`tem_...`) whose threads should be listed.
286
+ * @returns Successful response
287
+ */
149
288
  list(team: string): Promise<{
150
289
  data: {
151
290
  agent_user?: string | undefined;
152
291
  created_at?: string | undefined;
153
292
  creator?: {
154
293
  alias?: string | undefined;
294
+ app?: string | undefined;
295
+ app_name?: string | undefined;
155
296
  email?: string | undefined;
156
297
  id: string;
298
+ is_system_user?: boolean | undefined;
157
299
  metadata?: Record<string, unknown> | undefined;
158
300
  name?: string | undefined;
159
301
  org?: string | undefined;
302
+ org_name?: string | undefined;
303
+ org_role?: string | undefined;
160
304
  sandbox?: string | undefined;
305
+ sandbox_name?: string | undefined;
161
306
  } | undefined;
162
307
  description?: string | undefined;
163
308
  id: string;
@@ -168,6 +313,7 @@ export declare class TeamThreadResource {
168
313
  key?: string | undefined;
169
314
  last_activity?: string | undefined;
170
315
  metadata?: Record<string, unknown> | undefined;
316
+ muted?: boolean | undefined;
171
317
  org?: string | undefined;
172
318
  parent_message?: {
173
319
  actors?: {
@@ -185,6 +331,7 @@ export declare class TeamThreadResource {
185
331
  } | undefined;
186
332
  }[] | undefined;
187
333
  agent?: string | undefined;
334
+ agent_mode?: "cli" | "embedded" | undefined;
188
335
  attachments?: {
189
336
  content_type?: string | undefined;
190
337
  description?: string | undefined;
@@ -261,12 +408,18 @@ export declare class TeamThreadResource {
261
408
  participant?: string[] | undefined;
262
409
  participants?: {
263
410
  alias?: string | undefined;
411
+ app?: string | undefined;
412
+ app_name?: string | undefined;
264
413
  email?: string | undefined;
265
414
  id: string;
415
+ is_system_user?: boolean | undefined;
266
416
  metadata?: Record<string, unknown> | undefined;
267
417
  name?: string | undefined;
268
418
  org?: string | undefined;
419
+ org_name?: string | undefined;
420
+ org_role?: string | undefined;
269
421
  sandbox?: string | undefined;
422
+ sandbox_name?: string | undefined;
270
423
  }[] | undefined;
271
424
  participating_actor?: string[] | undefined;
272
425
  participating_agents?: {
@@ -292,13 +445,73 @@ export declare class TeamThreadResource {
292
445
  email?: string | undefined;
293
446
  id: string;
294
447
  identity?: string | undefined;
448
+ last_applied_template_config?: string | undefined;
295
449
  lookup_key?: string | undefined;
296
450
  metadata?: Record<string, unknown> | undefined;
297
451
  name?: string | undefined;
298
452
  org?: string | undefined;
453
+ org_name?: string | undefined;
454
+ originator?: string | undefined;
299
455
  phone_number?: string | undefined;
300
456
  sandbox?: string | undefined;
457
+ source_solution?: {
458
+ solution: {
459
+ category_keys?: string[] | undefined;
460
+ created_at?: string | undefined;
461
+ description?: string | undefined;
462
+ id: string;
463
+ kind: string;
464
+ latest_solution?: string | undefined;
465
+ latest_version?: string | undefined;
466
+ lookup_key?: string | undefined;
467
+ metadata?: Record<string, unknown> | undefined;
468
+ name?: string | undefined;
469
+ org?: string | undefined;
470
+ org_logo?: {
471
+ file?: string | undefined;
472
+ height?: number | undefined;
473
+ media?: string | undefined;
474
+ mime_type?: string | undefined;
475
+ refresh_url?: string | undefined;
476
+ url?: string | undefined;
477
+ width?: number | undefined;
478
+ } | undefined;
479
+ org_name?: string | undefined;
480
+ org_slug?: string | undefined;
481
+ owners: string[];
482
+ readme_url?: string | undefined;
483
+ solution_id?: string | undefined;
484
+ solution_version?: string | undefined;
485
+ tag_keys?: string[] | undefined;
486
+ template_kind?: string | undefined;
487
+ templates: {
488
+ description?: string | undefined;
489
+ display_name?: string | undefined;
490
+ id?: string | undefined;
491
+ kind: string;
492
+ lookup_key?: string | undefined;
493
+ name?: string | undefined;
494
+ readme_url?: string | undefined;
495
+ virtual_path?: string | undefined;
496
+ }[];
497
+ updated_at?: string | undefined;
498
+ upgrade_available: boolean;
499
+ virtual_path?: string | undefined;
500
+ };
501
+ template: {
502
+ created_at?: string | undefined;
503
+ description?: string | undefined;
504
+ display_name?: string | undefined;
505
+ id: string;
506
+ kind: string;
507
+ lookup_key?: string | undefined;
508
+ name?: string | undefined;
509
+ updated_at?: string | undefined;
510
+ virtual_path?: string | undefined;
511
+ };
512
+ } | undefined;
301
513
  team?: string | undefined;
514
+ template_upgrade_available?: boolean | undefined;
302
515
  updated_at?: string | undefined;
303
516
  user?: string | undefined;
304
517
  }[] | undefined;
@@ -317,6 +530,23 @@ export declare class TeamThreadResource {
317
530
  user?: string | undefined;
318
531
  }[];
319
532
  }>;
533
+ /**
534
+ * Create a thread for a team
535
+ * Creates a new thread owned by the specified team. The authenticated caller must
536
+ * have access to the team; requests from callers without team access are rejected
537
+ * with 404.
538
+ * If a `profile_picture` is provided in the thread params, it must be
539
+ * base64-encoded image data. The image is uploaded and associated with the thread
540
+ * before creation completes. Omit `profile_picture` to skip this step.
541
+ * By default the platform sends an automatic welcome message into the new thread.
542
+ * Pass `skip_welcome_message: true` to suppress this behavior, for example when
543
+ * creating threads programmatically in bulk or seeding test data.
544
+ * @param team - Team ID (`tem_...`) whose threads should be listed.
545
+ * @param input - Request body.
546
+ * @param input.skip_welcome_message - When `true`, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults to `false`.
547
+ * @param input.thread - Attributes for the new thread. See ThreadCreateParams for available fields.
548
+ * @returns The newly created thread.
549
+ */
320
550
  create(team: string, input: {
321
551
  skip_welcome_message?: boolean | undefined;
322
552
  thread: {
@@ -325,6 +555,7 @@ export declare class TeamThreadResource {
325
555
  is_unlisted?: boolean | undefined;
326
556
  key?: string | undefined;
327
557
  metadata?: Record<string, unknown> | undefined;
558
+ muted?: boolean | undefined;
328
559
  org_id?: string | undefined;
329
560
  profile_picture?: {
330
561
  data?: string | undefined;
@@ -340,15 +571,40 @@ export declare class TeamThreadResource {
340
571
  }
341
572
  export declare class TeamResource {
342
573
  private http;
343
- readonly artifacts: TeamArtifactResource;
344
574
  readonly custom_objects: TeamCustomObjectResource;
345
575
  readonly members: MemberResource;
346
576
  readonly threads: TeamThreadResource;
347
577
  constructor(http: HttpClient);
578
+ /**
579
+ * List teams
580
+ * Returns a paginated list of teams visible to the authenticated user, ordered
581
+ * by creation time descending. Use `membership` to narrow results to teams the
582
+ * caller has joined or teams they are eligible to join based on their ACL
583
+ * visibility.
584
+ * Supports full-text search across team name and description via `search`, and
585
+ * structured metadata filtering via `metadata`. When `app` is present, results
586
+ * are scoped to that app and the caller must hold the corresponding app scope.
587
+ * @param params - Query parameters.
588
+ * @param params.page - Page number to retrieve, starting at 1. Defaults to 1.
589
+ * @param params.pageSize - Number of teams to return per page. Defaults to 25.
590
+ * @param params.search - Full-text search string matched against team name and description.
591
+ * @param params.metadata - Structured metadata filter expression. Only teams whose metadata satisfies the expression are returned.
592
+ * @param params.membership - Filter teams by membership status. `"joined"` returns only teams the caller is a member of. `"joinable"` returns ACL-visible teams the caller has not yet joined. Omit to return all visible teams.
593
+ * @returns Successful response
594
+ */
348
595
  list(params?: {
349
596
  page?: number;
350
597
  pageSize?: number;
351
598
  search?: string;
599
+ metadata?: {
600
+ clause?: Record<string, unknown> | undefined;
601
+ clauses?: Record<string, unknown>[] | undefined;
602
+ key?: string | undefined;
603
+ operator?: "and" | "or" | "eq" | "contains" | "exists" | "not" | undefined;
604
+ path?: string[] | undefined;
605
+ type?: string | undefined;
606
+ value?: unknown | undefined;
607
+ };
352
608
  membership?: string;
353
609
  }): Promise<{
354
610
  data: {
@@ -388,6 +644,22 @@ export declare class TeamResource {
388
644
  total_entries: number;
389
645
  total_pages: number;
390
646
  }>;
647
+ /**
648
+ * Create a team
649
+ * Creates a new team and returns the created team object. The authenticated
650
+ * user becomes the team's owner.
651
+ * When `app` is supplied, the request is scoped to that app and the caller
652
+ * must hold the corresponding app scope. Omit `org` unless you want the team
653
+ * pinned to a specific organization. A default chat thread is provisioned for
654
+ * the team automatically after creation.
655
+ * @param input - Request body.
656
+ * @param input.acl - Access control configuration for the team. Controls who can discover and join the team.
657
+ * @param input.description - Optional human-readable description of the team's purpose.
658
+ * @param input.metadata - Arbitrary key-value pairs you can attach to the team for your own use. Values must be strings.
659
+ * @param input.name - Display name for the team.
660
+ * @param input.org - Organization ID (`org_...`) to associate the team with. Omit to create the team without an org affiliation.
661
+ * @returns The newly created team.
662
+ */
391
663
  create(input: {
392
664
  acl?: {
393
665
  add?: {
@@ -411,11 +683,23 @@ export declare class TeamResource {
411
683
  org?: string | undefined;
412
684
  }): Promise<Team>;
413
685
  /**
414
- * Join a team using an invite code
415
- * Accepts either `join_code` or `invite_code`.
416
- * For user-authenticated requests, the current user joins the team identified by
417
- * the invite code. For server-to-server requests, provide `agent` or `user` to
418
- * add that principal to the team instead.
686
+ * Join a team with an invite code
687
+ * Adds a principal to a team using a 12-character invite code. The invite
688
+ * code can be supplied as either `join_code` or `invite_code`; both are
689
+ * accepted for backwards compatibility.
690
+ * For user-authenticated requests, the currently authenticated user is added
691
+ * to the team. For server-to-server requests, you must supply either `agent`
692
+ * (to add an agent) or `user` (to add a specific user by ID). If the user
693
+ * is already a member of the team, the request succeeds without creating a
694
+ * duplicate membership.
695
+ * This endpoint is rate-limited to 10 requests per minute per IP address to
696
+ * prevent invite-code enumeration.
697
+ * @param input - Request body.
698
+ * @param input.agent - Agent ID (`agent_...`) to add to the team. When provided, the agent is joined instead of the authenticated user. Requires a server-to-server session.
699
+ * @param input.invite_code - 12-character invite code — alias for `join_code` accepted for backwards compatibility.
700
+ * @param input.join_code - 12-character invite code that identifies the team. Mutually usable with `invite_code`.
701
+ * @param input.user - User ID (`user_...`) to add to the team. Required for server-to-server requests when `agent` is not supplied.
702
+ * @returns The team the principal has joined.
419
703
  */
420
704
  joinByCode(input: {
421
705
  agent?: string | undefined;
@@ -423,8 +707,45 @@ export declare class TeamResource {
423
707
  join_code?: string | undefined;
424
708
  user?: string | undefined;
425
709
  }): Promise<Team>;
710
+ /**
711
+ * Delete a team
712
+ * Permanently deletes the team identified by `team`. This action is
713
+ * irreversible — all team memberships, settings, and associated data are
714
+ * removed.
715
+ * The caller must be the team owner or an org admin. When `app` is present,
716
+ * the caller must also hold the corresponding app scope.
717
+ * @param team - Team ID (`team_...`) of the team to delete.
718
+ * @returns Empty response — the team has been deleted.
719
+ */
426
720
  delete(team: string): Promise<void>;
721
+ /**
722
+ * Retrieve a team
723
+ * Returns the full team object for the given `team` ID, including its current
724
+ * member list and all associated threads.
725
+ * The authenticated user must be a member of the team or hold a role that
726
+ * grants visibility (org admin, app scope). When `app` is supplied, the
727
+ * caller must hold the corresponding app scope.
728
+ * @param team - Team ID (`team_...`) of the team to retrieve.
729
+ * @returns The requested team, including its members and threads.
730
+ */
427
731
  get(team: string): Promise<Team>;
732
+ /**
733
+ * Update a team
734
+ * Updates one or more attributes of the team identified by `team`. Only the
735
+ * fields you provide are changed; omitted fields are left as-is.
736
+ * To replace the team's profile picture, supply the `profile_picture` object
737
+ * with base64-encoded image data. The previous picture is deleted after the
738
+ * new one is successfully uploaded. When `app` is present, the caller must hold
739
+ * the corresponding app scope. The caller must be a team owner or org admin.
740
+ * @param team - Team ID (`team_...`) of the team to update.
741
+ * @param input - Request body.
742
+ * @param input.acl - New access control configuration for the team. Replaces the existing ACL.
743
+ * @param input.description - New human-readable description of the team's purpose.
744
+ * @param input.metadata - Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely.
745
+ * @param input.name - New display name for the team.
746
+ * @param input.profile_picture - New profile picture for the team. Provide this object to upload and replace the current picture.
747
+ * @returns The updated team with all changes applied.
748
+ */
428
749
  update(team: string, input: {
429
750
  acl?: {
430
751
  add?: {
@@ -451,20 +772,111 @@ export declare class TeamResource {
451
772
  mime_type?: string | undefined;
452
773
  } | undefined;
453
774
  }): Promise<Team>;
775
+ /**
776
+ * List a team's artifacts
777
+ * Returns all artifacts owned by the specified team. Artifacts represent
778
+ * AI-generated or user-uploaded files associated with agent sessions,
779
+ * threads, or sandboxes — such as images, documents, and code outputs.
780
+ * The authenticated user must be a member of the team. Attempting to list
781
+ * artifacts for a team the caller does not have access to returns 404
782
+ * rather than 403 to avoid leaking team existence.
783
+ * Results are returned in a single page without cursor pagination. Each
784
+ * artifact in the response reflects the state of its current version,
785
+ * including a short-lived signed `file_url` for direct download.
786
+ * @param team - Team ID (`tea_...`). The authenticated user must be a member of this team.
787
+ * @returns Successful response
788
+ */
789
+ artifacts(team: string): Promise<{
790
+ data: {
791
+ agent?: string | undefined;
792
+ content_type?: string | undefined;
793
+ created_at?: string | undefined;
794
+ current_version?: string | undefined;
795
+ description?: string | undefined;
796
+ file?: string | undefined;
797
+ file_name?: string | undefined;
798
+ file_url?: string | undefined;
799
+ id: string;
800
+ image_source?: {
801
+ file?: string | undefined;
802
+ height?: number | undefined;
803
+ media?: string | undefined;
804
+ mime_type?: string | undefined;
805
+ refresh_url?: string | undefined;
806
+ url?: string | undefined;
807
+ width?: number | undefined;
808
+ } | undefined;
809
+ name?: string | undefined;
810
+ org?: string | undefined;
811
+ sandbox?: string | undefined;
812
+ team?: string | undefined;
813
+ thread?: string | undefined;
814
+ updated_at?: string | undefined;
815
+ user?: string | undefined;
816
+ version?: number | undefined;
817
+ }[];
818
+ }>;
819
+ /**
820
+ * Create a team invite
821
+ * Generates a new invite code for the specified team. The authenticated user
822
+ * must be a member of the team with the `owner` or `admin` role.
823
+ * The returned code is a short alphanumeric string that other users can
824
+ * present to join the team. Each call produces a new code; previously issued
825
+ * codes are not invalidated by this request.
826
+ * @param team - Team ID (`tm_...`) identifying the team for which to generate the invite code.
827
+ * @returns The newly created team invite containing the join code.
828
+ */
454
829
  invite(team: string): Promise<TeamInvite>;
830
+ /**
831
+ * Create a team invite (server-to-server)
832
+ * Generates a new invite code for the specified team using server-to-server
833
+ * authentication. Unlike the user-facing create endpoint, this variant does not
834
+ * require the caller to be a team member — it is intended for privileged
835
+ * back-end services acting on behalf of your platform.
836
+ * The returned code is a short alphanumeric string that users can present to
837
+ * join the team. Each call produces a new code; previously issued codes are
838
+ * not invalidated by this request.
839
+ * @param team - Team ID (`tm_...`) identifying the team for which to generate the invite code.
840
+ * @returns Successful response
841
+ */
455
842
  invites(team: string): Promise<{
456
843
  code: string;
457
844
  }>;
458
845
  /**
459
- * Join a team the current user can see
460
- * Joins a specific visible team by team ID.
461
- * For standard user requests, the current user is added to the team. When
462
- * `agent` is provided, the current user must already be a team member and the
463
- * agent is added instead.
846
+ * Join a team
847
+ * Adds a principal to a team that is visible to the authenticated user.
848
+ * By default, the currently authenticated user joins the team. Provide `agent`
849
+ * to add an agent to the team instead — the caller must already be a member of
850
+ * the team to do so. Provide `user` (by ID) or `email` to add another user from
851
+ * your organization — the caller must be a team owner, team admin, or org admin.
852
+ * Only one of `agent`, `user`, or `email` may be supplied per request.
853
+ * If the target principal is already a member of the team, the request succeeds
854
+ * without creating a duplicate membership. Server-to-server callers are not
855
+ * permitted to use this endpoint; use the invite-code endpoint instead.
856
+ * @param team - Team ID (`team_...`) to join.
857
+ * @param input - Request body.
858
+ * @param input.agent - Agent ID (`agent_...`) to add to the team. The caller must already be a member of the team.
859
+ * @param input.email - Email address of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role.
860
+ * @param input.user - User ID (`user_...`) of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role.
861
+ * @returns Empty response — the principal is now a member of the team.
464
862
  */
465
863
  join(team: string, input: {
466
864
  agent?: string | undefined;
865
+ email?: string | undefined;
866
+ user?: string | undefined;
467
867
  }): Promise<void>;
868
+ /**
869
+ * Leave a team
870
+ * Removes a principal from a team. By default, the authenticated user removes
871
+ * themselves from the team. Provide `agent` to remove an agent instead — the
872
+ * caller must be a member of the team to do so.
873
+ * Team owners cannot leave their own team. To transfer ownership first, use
874
+ * the update-membership endpoint, then call this endpoint.
875
+ * For server-to-server requests, `user` is required to identify which user
876
+ * should be removed.
877
+ * @param team - Team ID (`team_...`) to leave.
878
+ * @returns Empty response — the principal has been removed from the team.
879
+ */
468
880
  leave(team: string): Promise<void>;
469
881
  }
470
882
  //# sourceMappingURL=teams.d.ts.map