@archastro/sdk 0.5.2 → 0.5.3

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 (222) 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/client.d.ts +26 -0
  7. package/dist/client.d.ts.map +1 -1
  8. package/dist/client.js +27 -1
  9. package/dist/client.js.map +1 -1
  10. package/dist/index.d.ts +1 -1
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +2 -2
  13. package/dist/index.js.map +1 -1
  14. package/dist/types/ai.d.ts +150 -12
  15. package/dist/types/ai.d.ts.map +1 -1
  16. package/dist/types/ai.js +71 -41
  17. package/dist/types/ai.js.map +1 -1
  18. package/dist/types/artifacts.d.ts +81 -24
  19. package/dist/types/artifacts.d.ts.map +1 -1
  20. package/dist/types/artifacts.js +39 -21
  21. package/dist/types/artifacts.js.map +1 -1
  22. package/dist/types/automations.d.ts +41 -9
  23. package/dist/types/automations.d.ts.map +1 -1
  24. package/dist/types/automations.js +25 -17
  25. package/dist/types/automations.js.map +1 -1
  26. package/dist/types/chat.d.ts +21418 -0
  27. package/dist/types/chat.d.ts.map +1 -0
  28. package/dist/types/chat.js +70 -0
  29. package/dist/types/chat.js.map +1 -0
  30. package/dist/types/common.d.ts +16970 -2136
  31. package/dist/types/common.d.ts.map +1 -1
  32. package/dist/types/common.js +1695 -332
  33. package/dist/types/common.js.map +1 -1
  34. package/dist/types/config.d.ts +239 -31
  35. package/dist/types/config.d.ts.map +1 -1
  36. package/dist/types/config.js +86 -34
  37. package/dist/types/config.js.map +1 -1
  38. package/dist/types/image.d.ts +27 -4
  39. package/dist/types/image.d.ts.map +1 -1
  40. package/dist/types/image.js +17 -10
  41. package/dist/types/image.js.map +1 -1
  42. package/dist/types/index.d.ts +2 -1
  43. package/dist/types/index.d.ts.map +1 -1
  44. package/dist/types/index.js +3 -2
  45. package/dist/types/index.js.map +1 -1
  46. package/dist/types/invites.d.ts +20 -11
  47. package/dist/types/invites.d.ts.map +1 -1
  48. package/dist/types/invites.js +9 -12
  49. package/dist/types/invites.js.map +1 -1
  50. package/dist/types/notifications.d.ts +163 -0
  51. package/dist/types/notifications.d.ts.map +1 -0
  52. package/dist/types/notifications.js +44 -0
  53. package/dist/types/notifications.js.map +1 -0
  54. package/dist/types/teams.d.ts +1628 -231
  55. package/dist/types/teams.d.ts.map +1 -1
  56. package/dist/types/teams.js +76 -45
  57. package/dist/types/teams.js.map +1 -1
  58. package/dist/types/threads.d.ts +997 -243
  59. package/dist/types/threads.d.ts.map +1 -1
  60. package/dist/types/threads.js +84 -51
  61. package/dist/types/threads.js.map +1 -1
  62. package/dist/types/users.d.ts +98 -18
  63. package/dist/types/users.d.ts.map +1 -1
  64. package/dist/types/users.js +43 -18
  65. package/dist/types/users.js.map +1 -1
  66. package/dist/v1/resources/activity_feed.d.ts +89 -0
  67. package/dist/v1/resources/activity_feed.d.ts.map +1 -1
  68. package/dist/v1/resources/activity_feed.js +56 -2
  69. package/dist/v1/resources/activity_feed.js.map +1 -1
  70. package/dist/v1/resources/agent_computers.d.ts +48 -2
  71. package/dist/v1/resources/agent_computers.d.ts.map +1 -1
  72. package/dist/v1/resources/agent_computers.js +48 -1
  73. package/dist/v1/resources/agent_computers.js.map +1 -1
  74. package/dist/v1/resources/agent_env_vars.d.ts +50 -0
  75. package/dist/v1/resources/agent_env_vars.d.ts.map +1 -0
  76. package/dist/v1/resources/agent_env_vars.js +56 -0
  77. package/dist/v1/resources/agent_env_vars.js.map +1 -0
  78. package/dist/v1/resources/agent_health_actions.d.ts +43 -0
  79. package/dist/v1/resources/agent_health_actions.d.ts.map +1 -0
  80. package/dist/v1/resources/agent_health_actions.js +50 -0
  81. package/dist/v1/resources/agent_health_actions.js.map +1 -0
  82. package/dist/v1/resources/agent_installations.d.ts +100 -0
  83. package/dist/v1/resources/agent_installations.d.ts.map +1 -1
  84. package/dist/v1/resources/agent_installations.js +106 -2
  85. package/dist/v1/resources/agent_installations.js.map +1 -1
  86. package/dist/v1/resources/agent_routine_runs.d.ts +33 -0
  87. package/dist/v1/resources/agent_routine_runs.d.ts.map +1 -0
  88. package/dist/v1/resources/agent_routine_runs.js +48 -0
  89. package/dist/v1/resources/agent_routine_runs.js.map +1 -0
  90. package/dist/v1/resources/agent_routines.d.ts +148 -2
  91. package/dist/v1/resources/agent_routines.d.ts.map +1 -1
  92. package/dist/v1/resources/agent_routines.js +168 -3
  93. package/dist/v1/resources/agent_routines.js.map +1 -1
  94. package/dist/v1/resources/agent_sessions.d.ts +118 -1
  95. package/dist/v1/resources/agent_sessions.d.ts.map +1 -1
  96. package/dist/v1/resources/agent_sessions.js +134 -2
  97. package/dist/v1/resources/agent_sessions.js.map +1 -1
  98. package/dist/v1/resources/agent_skills.d.ts +83 -1
  99. package/dist/v1/resources/agent_skills.d.ts.map +1 -1
  100. package/dist/v1/resources/agent_skills.js +87 -2
  101. package/dist/v1/resources/agent_skills.js.map +1 -1
  102. package/dist/v1/resources/agent_tools.d.ts +109 -2
  103. package/dist/v1/resources/agent_tools.d.ts.map +1 -1
  104. package/dist/v1/resources/agent_tools.js +114 -2
  105. package/dist/v1/resources/agent_tools.js.map +1 -1
  106. package/dist/v1/resources/agents.d.ts +517 -9
  107. package/dist/v1/resources/agents.d.ts.map +1 -1
  108. package/dist/v1/resources/agents.js +515 -12
  109. package/dist/v1/resources/agents.js.map +1 -1
  110. package/dist/v1/resources/ai.d.ts +93 -0
  111. package/dist/v1/resources/ai.d.ts.map +1 -1
  112. package/dist/v1/resources/ai.js +89 -1
  113. package/dist/v1/resources/ai.js.map +1 -1
  114. package/dist/v1/resources/artifacts.d.ts +73 -0
  115. package/dist/v1/resources/artifacts.d.ts.map +1 -1
  116. package/dist/v1/resources/artifacts.js +74 -2
  117. package/dist/v1/resources/artifacts.js.map +1 -1
  118. package/dist/v1/resources/automation_runs.d.ts +8 -4
  119. package/dist/v1/resources/automation_runs.d.ts.map +1 -1
  120. package/dist/v1/resources/automation_runs.js +9 -5
  121. package/dist/v1/resources/automation_runs.js.map +1 -1
  122. package/dist/v1/resources/automations.d.ts +20 -0
  123. package/dist/v1/resources/automations.d.ts.map +1 -1
  124. package/dist/v1/resources/automations.js +21 -1
  125. package/dist/v1/resources/automations.js.map +1 -1
  126. package/dist/v1/resources/bug_reports.d.ts +29 -0
  127. package/dist/v1/resources/bug_reports.d.ts.map +1 -0
  128. package/dist/v1/resources/bug_reports.js +29 -0
  129. package/dist/v1/resources/bug_reports.js.map +1 -0
  130. package/dist/v1/resources/config.d.ts +429 -4
  131. package/dist/v1/resources/config.d.ts.map +1 -1
  132. package/dist/v1/resources/config.js +493 -9
  133. package/dist/v1/resources/config.js.map +1 -1
  134. package/dist/v1/resources/custom_objects.d.ts +117 -2
  135. package/dist/v1/resources/custom_objects.d.ts.map +1 -1
  136. package/dist/v1/resources/custom_objects.js +132 -3
  137. package/dist/v1/resources/custom_objects.js.map +1 -1
  138. package/dist/v1/resources/files.d.ts +62 -0
  139. package/dist/v1/resources/files.d.ts.map +1 -0
  140. package/dist/v1/resources/files.js +58 -0
  141. package/dist/v1/resources/files.js.map +1 -0
  142. package/dist/v1/resources/index.d.ts +13 -0
  143. package/dist/v1/resources/index.d.ts.map +1 -1
  144. package/dist/v1/resources/index.js +14 -1
  145. package/dist/v1/resources/index.js.map +1 -1
  146. package/dist/v1/resources/installation_sources.d.ts +12 -0
  147. package/dist/v1/resources/installation_sources.d.ts.map +1 -1
  148. package/dist/v1/resources/installation_sources.js +13 -1
  149. package/dist/v1/resources/installation_sources.js.map +1 -1
  150. package/dist/v1/resources/invites.d.ts +15 -0
  151. package/dist/v1/resources/invites.d.ts.map +1 -1
  152. package/dist/v1/resources/invites.js +16 -1
  153. package/dist/v1/resources/invites.js.map +1 -1
  154. package/dist/v1/resources/knowledge_documents.d.ts +104 -0
  155. package/dist/v1/resources/knowledge_documents.d.ts.map +1 -0
  156. package/dist/v1/resources/knowledge_documents.js +112 -0
  157. package/dist/v1/resources/knowledge_documents.js.map +1 -0
  158. package/dist/v1/resources/knowledge_sources.d.ts +190 -0
  159. package/dist/v1/resources/knowledge_sources.d.ts.map +1 -0
  160. package/dist/v1/resources/knowledge_sources.js +176 -0
  161. package/dist/v1/resources/knowledge_sources.js.map +1 -0
  162. package/dist/v1/resources/kv.d.ts +73 -0
  163. package/dist/v1/resources/kv.d.ts.map +1 -1
  164. package/dist/v1/resources/kv.js +96 -3
  165. package/dist/v1/resources/kv.js.map +1 -1
  166. package/dist/v1/resources/notification_preferences.d.ts +61 -0
  167. package/dist/v1/resources/notification_preferences.d.ts.map +1 -0
  168. package/dist/v1/resources/notification_preferences.js +65 -0
  169. package/dist/v1/resources/notification_preferences.js.map +1 -0
  170. package/dist/v1/resources/notifications.d.ts +133 -0
  171. package/dist/v1/resources/notifications.d.ts.map +1 -0
  172. package/dist/v1/resources/notifications.js +136 -0
  173. package/dist/v1/resources/notifications.js.map +1 -0
  174. package/dist/v1/resources/orgs.d.ts +18 -0
  175. package/dist/v1/resources/orgs.d.ts.map +1 -1
  176. package/dist/v1/resources/orgs.js +30 -2
  177. package/dist/v1/resources/orgs.js.map +1 -1
  178. package/dist/v1/resources/slack_channel_bindings.d.ts +101 -0
  179. package/dist/v1/resources/slack_channel_bindings.d.ts.map +1 -0
  180. package/dist/v1/resources/slack_channel_bindings.js +114 -0
  181. package/dist/v1/resources/slack_channel_bindings.js.map +1 -0
  182. package/dist/v1/resources/solution_categories.d.ts +36 -0
  183. package/dist/v1/resources/solution_categories.d.ts.map +1 -0
  184. package/dist/v1/resources/solution_categories.js +55 -0
  185. package/dist/v1/resources/solution_categories.js.map +1 -0
  186. package/dist/v1/resources/solution_tags.d.ts +37 -0
  187. package/dist/v1/resources/solution_tags.d.ts.map +1 -0
  188. package/dist/v1/resources/solution_tags.js +54 -0
  189. package/dist/v1/resources/solution_tags.js.map +1 -0
  190. package/dist/v1/resources/solutions.d.ts +309 -0
  191. package/dist/v1/resources/solutions.d.ts.map +1 -0
  192. package/dist/v1/resources/solutions.js +214 -0
  193. package/dist/v1/resources/solutions.js.map +1 -0
  194. package/dist/v1/resources/team_memberships.d.ts +31 -0
  195. package/dist/v1/resources/team_memberships.d.ts.map +1 -1
  196. package/dist/v1/resources/team_memberships.js +49 -2
  197. package/dist/v1/resources/team_memberships.js.map +1 -1
  198. package/dist/v1/resources/teams.d.ts +458 -49
  199. package/dist/v1/resources/teams.d.ts.map +1 -1
  200. package/dist/v1/resources/teams.js +319 -27
  201. package/dist/v1/resources/teams.js.map +1 -1
  202. package/dist/v1/resources/thread_messages.d.ts +70 -0
  203. package/dist/v1/resources/thread_messages.d.ts.map +1 -1
  204. package/dist/v1/resources/thread_messages.js +85 -2
  205. package/dist/v1/resources/thread_messages.js.map +1 -1
  206. package/dist/v1/resources/threads.d.ts +201 -0
  207. package/dist/v1/resources/threads.d.ts.map +1 -1
  208. package/dist/v1/resources/threads.js +220 -4
  209. package/dist/v1/resources/threads.js.map +1 -1
  210. package/dist/v1/resources/users.d.ts +213 -39
  211. package/dist/v1/resources/users.d.ts.map +1 -1
  212. package/dist/v1/resources/users.js +121 -16
  213. package/dist/v1/resources/users.js.map +1 -1
  214. package/dist/v1.d.ts +26 -0
  215. package/dist/v1.d.ts.map +1 -1
  216. package/dist/v1.js +40 -1
  217. package/dist/v1.js.map +1 -1
  218. package/package.json +3 -1
  219. package/dist/types/agents.d.ts +0 -2084
  220. package/dist/types/agents.d.ts.map +0 -1
  221. package/dist/types/agents.js +0 -203
  222. package/dist/types/agents.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"agents.js","sourceRoot":"","sources":["../../../src/v1/resources/agents.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,wEAAwE;AACxE,6BAA6B;AAO7B,MAAM,OAAO,0BAA0B;IACjB;IAApB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CA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/F,CAAC;CACF"}
@@ -3,6 +3,23 @@ import type { AICompletionResult, AIImageResult } from "../../types/ai.js";
3
3
  export declare class ChatResource {
4
4
  private http;
5
5
  constructor(http: HttpClient);
6
+ /**
7
+ * Create a chat completion
8
+ * Sends a list of messages to the configured AI provider and returns a single
9
+ * completion. Use this endpoint when you want direct, low-level access to the
10
+ * underlying model without any workflow or agent orchestration.
11
+ * The authenticated app must have the `llm_calls` entitlement enabled on its
12
+ * plan. Requests that exceed the plan quota are rejected with `402`. Token
13
+ * usage is recorded against the authenticated app and organization.
14
+ * Supply `tools` and `tool_choice` to enable OpenAI-compatible function
15
+ * calling. Use `server_tools` to activate platform-managed tools such as
16
+ * search that run on the server side before the response is returned.
17
+ * @param input - Request body.
18
+ * @param input.context - Key-value map used to resolve template variables in message content. Omit if messages contain no templates.
19
+ * @param input.messages - Ordered list of conversation messages to send to the model.
20
+ * @param input.opts - Model and sampling configuration for this request.
21
+ * @returns The completed AI response, including the generated message, finish reason, and token usage.
22
+ */
6
23
  completions(input: {
7
24
  context?: Record<string, unknown> | undefined;
8
25
  messages: {
@@ -29,6 +46,7 @@ export declare class ChatResource {
29
46
  model: string;
30
47
  server_tools?: Record<string, unknown>[] | undefined;
31
48
  temperature?: number | undefined;
49
+ tool_choice?: string | undefined;
32
50
  tools?: {
33
51
  function: {
34
52
  description?: string | undefined;
@@ -39,15 +57,52 @@ export declare class ChatResource {
39
57
  }[] | undefined;
40
58
  };
41
59
  }): Promise<AICompletionResult>;
60
+ /**
61
+ * List available AI models
62
+ * Returns the set of AI models that can be used with the chat completion and
63
+ * workflow endpoints. The list reflects models currently enabled for the
64
+ * platform and includes each model's identifier and whether it is the default.
65
+ * Use the `model` field from any entry in `data` as the value for
66
+ * `opts.model` when calling the completions or workflows endpoint.
67
+ * @returns Successful response
68
+ */
42
69
  models(): Promise<{
43
70
  data: {
71
+ default: boolean;
44
72
  id: string;
73
+ name: string;
45
74
  }[];
46
75
  }>;
47
76
  }
48
77
  export declare class ImageResource {
49
78
  private http;
50
79
  constructor(http: HttpClient);
80
+ /**
81
+ * Edit an image with a text prompt
82
+ * Applies a text-guided edit to one or more source images and returns the
83
+ * resulting image. Pass the source images as base64-encoded objects in the
84
+ * `images` array alongside a `prompt` describing the desired modification.
85
+ * The underlying provider is selected by the `model` parameter. Omit `model`
86
+ * to use the platform default. Size, quality, style, and format options are
87
+ * forwarded to the provider as-is; unsupported combinations for a given model
88
+ * return a 422 error with the provider's error message.
89
+ * This endpoint requires authentication. The request is billed against the
90
+ * workspace associated with the authenticated user.
91
+ * @param input - Request body.
92
+ * @param input.aspect_ratio - Desired aspect ratio of the output, e.g. `"1:1"` or `"16:9"`. Not supported by all models; omit to use the model's default.
93
+ * @param input.background - Background treatment for the output. Accepted values and behavior are model-dependent.
94
+ * @param input.height - Explicit output height in pixels. Takes precedence over `size` when both are provided. Not supported by all models.
95
+ * @param input.image_size - Output resolution tier for Gemini models, e.g. `"1K"`, `"2K"`, or `"4K"`. Ignored by non-Gemini models.
96
+ * @param input.images - One or more source images to edit. Each image must be supplied as a base64-encoded object.
97
+ * @param input.model - Model identifier to use for editing. Omit to use the platform default image model.
98
+ * @param input.output_format - Desired MIME type or format for the returned image. Common values: `"png"`, `"jpeg"`, `"webp"`. Defaults to the model's native format.
99
+ * @param input.prompt - Natural-language description of the edit to apply to the source image(s).
100
+ * @param input.quality - Quality preset for the output image. Accepted values and behavior are model-dependent.
101
+ * @param input.size - Output dimensions as a WxH string, e.g. `"1024x1024"`. Applies to OpenAI-compatible models. Omit to use the model's default.
102
+ * @param input.style - Style preset applied to the edit. Accepted values and behavior are model-dependent.
103
+ * @param input.width - Explicit output width in pixels. Takes precedence over `size` when both are provided. Not supported by all models.
104
+ * @returns The resulting edited image, including base64 data or a URL depending on the model.
105
+ */
51
106
  edits(input: {
52
107
  aspect_ratio?: string | undefined;
53
108
  background?: string | undefined;
@@ -65,6 +120,32 @@ export declare class ImageResource {
65
120
  style?: string | undefined;
66
121
  width?: number | undefined;
67
122
  }): Promise<AIImageResult>;
123
+ /**
124
+ * Generate an image from a text prompt
125
+ * Generates one or more images from a natural-language `prompt` using the
126
+ * specified AI image model. The response contains the first generated image;
127
+ * use `n` to request additional images (where supported by the model).
128
+ * The underlying provider is selected by the `model` parameter. Omit `model`
129
+ * to use the platform default. Size, quality, style, and format options are
130
+ * forwarded to the provider as-is; unsupported combinations for a given model
131
+ * return a 422 error with the provider's error message.
132
+ * This endpoint requires authentication. The request is billed against the
133
+ * workspace associated with the authenticated user.
134
+ * @param input - Request body.
135
+ * @param input.aspect_ratio - Desired aspect ratio of the output, e.g. `"1:1"` or `"16:9"`. Not supported by all models; omit to use the model's default.
136
+ * @param input.background - Background treatment for the output. Accepted values and behavior are model-dependent.
137
+ * @param input.height - Explicit output height in pixels. Takes precedence over `size` when both are provided. Not supported by all models.
138
+ * @param input.image_size - Output resolution tier for Gemini models, e.g. `"1K"`, `"2K"`, or `"4K"`. Ignored by non-Gemini models.
139
+ * @param input.model - Model identifier to use for generation. Omit to use the platform default image model.
140
+ * @param input.n - Number of images to generate. Defaults to `1`. Values greater than `1` are only supported by models that allow batch generation.
141
+ * @param input.output_format - Desired MIME type or format for the returned image. Common values: `"png"`, `"jpeg"`, `"webp"`. Defaults to the model's native format.
142
+ * @param input.prompt - Natural-language description of the image to generate.
143
+ * @param input.quality - Quality preset for the output image. Accepted values and behavior are model-dependent.
144
+ * @param input.size - Output dimensions as a WxH string, e.g. `"1024x1024"`. Applies to OpenAI-compatible models. Omit to use the model's default.
145
+ * @param input.style - Style preset applied to the generated image. Accepted values and behavior are model-dependent.
146
+ * @param input.width - Explicit output width in pixels. Takes precedence over `size` when both are provided. Not supported by all models.
147
+ * @returns The generated image, including base64 data or a URL depending on the model.
148
+ */
68
149
  generations(input: {
69
150
  aspect_ratio?: string | undefined;
70
151
  background?: string | undefined;
@@ -79,9 +160,21 @@ export declare class ImageResource {
79
160
  style?: string | undefined;
80
161
  width?: number | undefined;
81
162
  }): Promise<AIImageResult>;
163
+ /**
164
+ * List available image generation models
165
+ * Returns the list of image generation models available on the platform.
166
+ * Exactly one entry in the list carries `default: true`, indicating the model
167
+ * used when no `model` parameter is supplied to the generation or editing
168
+ * endpoints.
169
+ * This endpoint requires authentication and reflects the models enabled for
170
+ * the authenticated user's workspace.
171
+ * @returns Successful response
172
+ */
82
173
  models(): Promise<{
83
174
  data: {
175
+ default: boolean;
84
176
  id: string;
177
+ name: string;
85
178
  }[];
86
179
  }>;
87
180
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../../../src/v1/resources/ai.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAE3E,qBAAa,YAAY;IACX,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE9B,WAAW,CAAC,KAAK,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;QAAC,QAAQ,EAAE;YAAE,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAAC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,SAAS,CAAC;YAAC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAAC,IAAI,EAAE,MAAM,CAAC;YAAC,iBAAiB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;YAAC,UAAU,CAAC,EAAE;gBAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAAC,EAAE,EAAE,MAAM,CAAC;gBAAC,IAAI,EAAE,MAAM,CAAC;gBAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;aAAE,EAAE,GAAG,SAAS,CAAC;YAAC,YAAY,CAAC,EAAE;gBAAE,O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IAAI,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;gBAEV,IAAI,EAAE,UAAU;CAIrC"}
@@ -1,14 +1,40 @@
1
1
  // Copyright (c) 2026 ArchAstro Inc. All Rights Reserved.
2
2
  // This file is auto-generated by @archastro/sdk-generator. Do not edit.
3
- // Content hash: 5c5449b134e8
3
+ // Content hash: 7e929808992d
4
4
  export class ChatResource {
5
5
  http;
6
6
  constructor(http) {
7
7
  this.http = http;
8
8
  }
9
+ /**
10
+ * Create a chat completion
11
+ * Sends a list of messages to the configured AI provider and returns a single
12
+ * completion. Use this endpoint when you want direct, low-level access to the
13
+ * underlying model without any workflow or agent orchestration.
14
+ * The authenticated app must have the `llm_calls` entitlement enabled on its
15
+ * plan. Requests that exceed the plan quota are rejected with `402`. Token
16
+ * usage is recorded against the authenticated app and organization.
17
+ * Supply `tools` and `tool_choice` to enable OpenAI-compatible function
18
+ * calling. Use `server_tools` to activate platform-managed tools such as
19
+ * search that run on the server side before the response is returned.
20
+ * @param input - Request body.
21
+ * @param input.context - Key-value map used to resolve template variables in message content. Omit if messages contain no templates.
22
+ * @param input.messages - Ordered list of conversation messages to send to the model.
23
+ * @param input.opts - Model and sampling configuration for this request.
24
+ * @returns The completed AI response, including the generated message, finish reason, and token usage.
25
+ */
9
26
  async completions(input) {
10
27
  return this.http.request(`/api/v1/ai/chat/completions`, { method: "POST", body: input });
11
28
  }
29
+ /**
30
+ * List available AI models
31
+ * Returns the set of AI models that can be used with the chat completion and
32
+ * workflow endpoints. The list reflects models currently enabled for the
33
+ * platform and includes each model's identifier and whether it is the default.
34
+ * Use the `model` field from any entry in `data` as the value for
35
+ * `opts.model` when calling the completions or workflows endpoint.
36
+ * @returns Successful response
37
+ */
12
38
  async models() {
13
39
  return this.http.request(`/api/v1/ai/chat/models`);
14
40
  }
@@ -18,12 +44,74 @@ export class ImageResource {
18
44
  constructor(http) {
19
45
  this.http = http;
20
46
  }
47
+ /**
48
+ * Edit an image with a text prompt
49
+ * Applies a text-guided edit to one or more source images and returns the
50
+ * resulting image. Pass the source images as base64-encoded objects in the
51
+ * `images` array alongside a `prompt` describing the desired modification.
52
+ * The underlying provider is selected by the `model` parameter. Omit `model`
53
+ * to use the platform default. Size, quality, style, and format options are
54
+ * forwarded to the provider as-is; unsupported combinations for a given model
55
+ * return a 422 error with the provider's error message.
56
+ * This endpoint requires authentication. The request is billed against the
57
+ * workspace associated with the authenticated user.
58
+ * @param input - Request body.
59
+ * @param input.aspect_ratio - Desired aspect ratio of the output, e.g. `"1:1"` or `"16:9"`. Not supported by all models; omit to use the model's default.
60
+ * @param input.background - Background treatment for the output. Accepted values and behavior are model-dependent.
61
+ * @param input.height - Explicit output height in pixels. Takes precedence over `size` when both are provided. Not supported by all models.
62
+ * @param input.image_size - Output resolution tier for Gemini models, e.g. `"1K"`, `"2K"`, or `"4K"`. Ignored by non-Gemini models.
63
+ * @param input.images - One or more source images to edit. Each image must be supplied as a base64-encoded object.
64
+ * @param input.model - Model identifier to use for editing. Omit to use the platform default image model.
65
+ * @param input.output_format - Desired MIME type or format for the returned image. Common values: `"png"`, `"jpeg"`, `"webp"`. Defaults to the model's native format.
66
+ * @param input.prompt - Natural-language description of the edit to apply to the source image(s).
67
+ * @param input.quality - Quality preset for the output image. Accepted values and behavior are model-dependent.
68
+ * @param input.size - Output dimensions as a WxH string, e.g. `"1024x1024"`. Applies to OpenAI-compatible models. Omit to use the model's default.
69
+ * @param input.style - Style preset applied to the edit. Accepted values and behavior are model-dependent.
70
+ * @param input.width - Explicit output width in pixels. Takes precedence over `size` when both are provided. Not supported by all models.
71
+ * @returns The resulting edited image, including base64 data or a URL depending on the model.
72
+ */
21
73
  async edits(input) {
22
74
  return this.http.request(`/api/v1/ai/image/edits`, { method: "POST", body: input });
23
75
  }
76
+ /**
77
+ * Generate an image from a text prompt
78
+ * Generates one or more images from a natural-language `prompt` using the
79
+ * specified AI image model. The response contains the first generated image;
80
+ * use `n` to request additional images (where supported by the model).
81
+ * The underlying provider is selected by the `model` parameter. Omit `model`
82
+ * to use the platform default. Size, quality, style, and format options are
83
+ * forwarded to the provider as-is; unsupported combinations for a given model
84
+ * return a 422 error with the provider's error message.
85
+ * This endpoint requires authentication. The request is billed against the
86
+ * workspace associated with the authenticated user.
87
+ * @param input - Request body.
88
+ * @param input.aspect_ratio - Desired aspect ratio of the output, e.g. `"1:1"` or `"16:9"`. Not supported by all models; omit to use the model's default.
89
+ * @param input.background - Background treatment for the output. Accepted values and behavior are model-dependent.
90
+ * @param input.height - Explicit output height in pixels. Takes precedence over `size` when both are provided. Not supported by all models.
91
+ * @param input.image_size - Output resolution tier for Gemini models, e.g. `"1K"`, `"2K"`, or `"4K"`. Ignored by non-Gemini models.
92
+ * @param input.model - Model identifier to use for generation. Omit to use the platform default image model.
93
+ * @param input.n - Number of images to generate. Defaults to `1`. Values greater than `1` are only supported by models that allow batch generation.
94
+ * @param input.output_format - Desired MIME type or format for the returned image. Common values: `"png"`, `"jpeg"`, `"webp"`. Defaults to the model's native format.
95
+ * @param input.prompt - Natural-language description of the image to generate.
96
+ * @param input.quality - Quality preset for the output image. Accepted values and behavior are model-dependent.
97
+ * @param input.size - Output dimensions as a WxH string, e.g. `"1024x1024"`. Applies to OpenAI-compatible models. Omit to use the model's default.
98
+ * @param input.style - Style preset applied to the generated image. Accepted values and behavior are model-dependent.
99
+ * @param input.width - Explicit output width in pixels. Takes precedence over `size` when both are provided. Not supported by all models.
100
+ * @returns The generated image, including base64 data or a URL depending on the model.
101
+ */
24
102
  async generations(input) {
25
103
  return this.http.request(`/api/v1/ai/image/generations`, { method: "POST", body: input });
26
104
  }
105
+ /**
106
+ * List available image generation models
107
+ * Returns the list of image generation models available on the platform.
108
+ * Exactly one entry in the list carries `default: true`, indicating the model
109
+ * used when no `model` parameter is supplied to the generation or editing
110
+ * endpoints.
111
+ * This endpoint requires authentication and reflects the models enabled for
112
+ * the authenticated user's workspace.
113
+ * @returns Successful response
114
+ */
27
115
  async models() {
28
116
  return this.http.request(`/api/v1/ai/image/models`);
29
117
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ai.js","sourceRoot":"","sources":["../../../src/v1/resources/ai.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,wEAAwE;AACxE,6BAA6B;AAK7B,MAAM,OAAO,YAAY;IACH;IAApB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExC,KAAK,CAAC,WAAW,CAAC,KAAoxB;QACpyB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,6BAA6B,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAC3F,CAAC;IAED,KAAK,CAAC,MAAM;QACV,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC;IACrD,CAAC;CACF;AAED,MAAM,OAAO,aAAa;IACJ;IAApB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExC,KAAK,CAAC,KAAK,CAAC,KAAkY;QAC5Y,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,wBAAwB,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACtF,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,KAAoW;QACpX,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,8BAA8B,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAC5F,CAAC;IAED,KAAK,CAAC,MAAM;QACV,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;CACF;AAED,MAAM,OAAO,UAAU;IAID;IAHX,IAAI,CAAe;IACnB,KAAK,CAAgB;IAE9B,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI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5F,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,MAAM;QACV,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;CACF;AAED,MAAM,OAAO,UAAU;IAID;IAHX,IAAI,CAAe;IACnB,KAAK,CAAgB;IAE9B,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;QAClC,IAAI,CAAC,IAAI,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,CAAC,KAAK,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;CACF"}
@@ -3,17 +3,90 @@ import type { Artifact } from "../../types/artifacts.js";
3
3
  export declare class ArtifactResource {
4
4
  private http;
5
5
  constructor(http: HttpClient);
6
+ /**
7
+ * Delete an artifact
8
+ * Permanently deletes the artifact and all associated file versions. This
9
+ * operation is irreversible — deleted artifacts and their file content cannot
10
+ * be recovered.
11
+ * The authenticated user must have write access to the artifact's owning team
12
+ * or organization. Returns 404 if the artifact does not exist or is not
13
+ * accessible to the caller.
14
+ * @param artifact - Artifact ID (`art_...`) of the artifact to delete.
15
+ * @returns Empty body. HTTP 204 indicates the artifact and all associated file versions were permanently deleted.
16
+ */
6
17
  delete(artifact: string): Promise<void>;
18
+ /**
19
+ * Retrieve an artifact
20
+ * Returns the artifact identified by `artifact`. The response includes metadata
21
+ * such as name, description, version, and a signed `file_url` for downloading
22
+ * the current file version. Image artifacts also include an `image_source` object
23
+ * with display-ready metadata.
24
+ * The authenticated user must have read access to the artifact's owning team or
25
+ * organization. Returns 404 if the artifact does not exist or is not accessible
26
+ * to the caller.
27
+ * @param artifact - Artifact ID (`art_...`) of the artifact to retrieve.
28
+ * @returns The requested artifact, including its current version's file metadata and signed download URL.
29
+ */
7
30
  get(artifact: string): Promise<Artifact>;
31
+ /**
32
+ * Update an artifact
33
+ * Updates the metadata and, optionally, the file content of an existing artifact.
34
+ * This endpoint uses optimistic concurrency control: you must supply the artifact's
35
+ * current `version` number as `from_version`. If another update has incremented the
36
+ * version since you last fetched the artifact, the request returns 409.
37
+ * To replace the artifact's file, include a nested `file` object with Base64
38
+ * `data`, `filename`, and `mime_type`. Omitting `file` leaves the existing file
39
+ * unchanged. The authenticated user or developer must have write access to the
40
+ * artifact's owner.
41
+ * @param artifact - Artifact ID (`art_...`) of the artifact to update.
42
+ * @param input - Request body.
43
+ * @param input.description - New description for the artifact. Omit to leave the existing description unchanged.
44
+ * @param input.file - Replacement file payload. Omit to leave the current file unchanged.
45
+ * @param input.file_content - Legacy flat Base64 file content. Prefer `file.data`.
46
+ * @param input.file_content_type - Legacy flat MIME type. Prefer `file.mime_type`.
47
+ * @param input.file_name - Legacy flat filename. Prefer `file.filename`.
48
+ * @param input.from_version - The artifact's current version number, used for optimistic concurrency control. Returns 409 if this value does not match the server's current version.
49
+ * @param input.name - New display name for the artifact. Omit to leave the existing name unchanged.
50
+ * @returns The artifact after applying the update, reflecting the new version number and any changed metadata or file.
51
+ */
8
52
  replace(artifact: string, input: {
9
53
  description?: string | undefined;
54
+ file?: {
55
+ data: string;
56
+ filename?: string | undefined;
57
+ mime_type?: string | undefined;
58
+ } | undefined;
10
59
  file_content?: string | undefined;
11
60
  file_content_type?: string | undefined;
12
61
  file_name?: string | undefined;
13
62
  from_version: number;
14
63
  name?: string | undefined;
15
64
  }): Promise<Artifact>;
65
+ /**
66
+ * Archive an artifact
67
+ * Soft-deletes the artifact identified by `artifact`. The artifact record is
68
+ * retained in storage but is no longer returned by the list or show endpoints.
69
+ * The authenticated user must have write access to the artifact's owning team or
70
+ * organization. Attempting to archive an artifact you do not own returns 403.
71
+ * Attempting to archive an artifact that does not exist or is already archived
72
+ * returns 404.
73
+ * @param artifact - Artifact ID (`art_...`) of the artifact to archive.
74
+ * @returns Returns 204 No Content on success. The artifact is soft-deleted and no longer accessible through the API.
75
+ */
16
76
  archive(artifact: string): Promise<void>;
77
+ /**
78
+ * Retrieve raw artifact file content
79
+ * Returns the raw binary content of the file stored for the specified artifact.
80
+ * The response `Content-Type` header reflects the artifact file's MIME type, so
81
+ * you can pipe the response body directly to disk or display it in a browser.
82
+ * By default the endpoint serves the artifact's current version. Pass the
83
+ * `version` parameter to retrieve a specific historical version. The authenticated
84
+ * user must have read access to the artifact's owning team or organization.
85
+ * @param artifact - Artifact ID (`art_...`) of the artifact whose content to retrieve.
86
+ * @param params - Query parameters.
87
+ * @param params.version - Version number to retrieve. Omit to return the artifact's current version.
88
+ * @returns Raw binary content of the artifact file. The `Content-Type` header is set to the artifact's stored MIME type.
89
+ */
17
90
  content(artifact: string, params?: {
18
91
  version?: number;
19
92
  }): Promise<{
@@ -1 +1 @@
1
- {"version":3,"file":"artifacts.d.ts","sourceRoot":"","sources":["../../../src/v1/resources/artifacts.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,qBAAa,gBAAgB;IACf,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE9B,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIvC,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAIxC,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,GAAG,OAAO,CAAC,QAAQ,CAAC;IAIrP,OAAO,CAAC,QAAQ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AA;KAAE,GAAG,OAAO,CAAC,QAAQ,CAAC;IAI/V;;;;;;;;;;OAUG;IACG,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI9C;;;;;;;;;;;;OAYG;IACG,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,WAAW,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;CAQpH"}
@@ -1,25 +1,97 @@
1
1
  // Copyright (c) 2026 ArchAstro Inc. All Rights Reserved.
2
2
  // This file is auto-generated by @archastro/sdk-generator. Do not edit.
3
- // Content hash: 99249c36f1a6
3
+ // Content hash: 338b48a6c451
4
4
  export class ArtifactResource {
5
5
  http;
6
6
  constructor(http) {
7
7
  this.http = http;
8
8
  }
9
+ /**
10
+ * Delete an artifact
11
+ * Permanently deletes the artifact and all associated file versions. This
12
+ * operation is irreversible — deleted artifacts and their file content cannot
13
+ * be recovered.
14
+ * The authenticated user must have write access to the artifact's owning team
15
+ * or organization. Returns 404 if the artifact does not exist or is not
16
+ * accessible to the caller.
17
+ * @param artifact - Artifact ID (`art_...`) of the artifact to delete.
18
+ * @returns Empty body. HTTP 204 indicates the artifact and all associated file versions were permanently deleted.
19
+ */
9
20
  async delete(artifact) {
10
21
  await this.http.request(`/api/v1/artifacts/${artifact}`, { method: "DELETE" });
11
22
  }
23
+ /**
24
+ * Retrieve an artifact
25
+ * Returns the artifact identified by `artifact`. The response includes metadata
26
+ * such as name, description, version, and a signed `file_url` for downloading
27
+ * the current file version. Image artifacts also include an `image_source` object
28
+ * with display-ready metadata.
29
+ * The authenticated user must have read access to the artifact's owning team or
30
+ * organization. Returns 404 if the artifact does not exist or is not accessible
31
+ * to the caller.
32
+ * @param artifact - Artifact ID (`art_...`) of the artifact to retrieve.
33
+ * @returns The requested artifact, including its current version's file metadata and signed download URL.
34
+ */
12
35
  async get(artifact) {
13
36
  return this.http.request(`/api/v1/artifacts/${artifact}`);
14
37
  }
38
+ /**
39
+ * Update an artifact
40
+ * Updates the metadata and, optionally, the file content of an existing artifact.
41
+ * This endpoint uses optimistic concurrency control: you must supply the artifact's
42
+ * current `version` number as `from_version`. If another update has incremented the
43
+ * version since you last fetched the artifact, the request returns 409.
44
+ * To replace the artifact's file, include a nested `file` object with Base64
45
+ * `data`, `filename`, and `mime_type`. Omitting `file` leaves the existing file
46
+ * unchanged. The authenticated user or developer must have write access to the
47
+ * artifact's owner.
48
+ * @param artifact - Artifact ID (`art_...`) of the artifact to update.
49
+ * @param input - Request body.
50
+ * @param input.description - New description for the artifact. Omit to leave the existing description unchanged.
51
+ * @param input.file - Replacement file payload. Omit to leave the current file unchanged.
52
+ * @param input.file_content - Legacy flat Base64 file content. Prefer `file.data`.
53
+ * @param input.file_content_type - Legacy flat MIME type. Prefer `file.mime_type`.
54
+ * @param input.file_name - Legacy flat filename. Prefer `file.filename`.
55
+ * @param input.from_version - The artifact's current version number, used for optimistic concurrency control. Returns 409 if this value does not match the server's current version.
56
+ * @param input.name - New display name for the artifact. Omit to leave the existing name unchanged.
57
+ * @returns The artifact after applying the update, reflecting the new version number and any changed metadata or file.
58
+ */
15
59
  async replace(artifact, input) {
16
60
  return this.http.request(`/api/v1/artifacts/${artifact}`, { method: "PUT", body: input });
17
61
  }
62
+ /**
63
+ * Archive an artifact
64
+ * Soft-deletes the artifact identified by `artifact`. The artifact record is
65
+ * retained in storage but is no longer returned by the list or show endpoints.
66
+ * The authenticated user must have write access to the artifact's owning team or
67
+ * organization. Attempting to archive an artifact you do not own returns 403.
68
+ * Attempting to archive an artifact that does not exist or is already archived
69
+ * returns 404.
70
+ * @param artifact - Artifact ID (`art_...`) of the artifact to archive.
71
+ * @returns Returns 204 No Content on success. The artifact is soft-deleted and no longer accessible through the API.
72
+ */
18
73
  async archive(artifact) {
19
74
  await this.http.request(`/api/v1/artifacts/${artifact}/archive`, { method: "POST" });
20
75
  }
76
+ /**
77
+ * Retrieve raw artifact file content
78
+ * Returns the raw binary content of the file stored for the specified artifact.
79
+ * The response `Content-Type` header reflects the artifact file's MIME type, so
80
+ * you can pipe the response body directly to disk or display it in a browser.
81
+ * By default the endpoint serves the artifact's current version. Pass the
82
+ * `version` parameter to retrieve a specific historical version. The authenticated
83
+ * user must have read access to the artifact's owning team or organization.
84
+ * @param artifact - Artifact ID (`art_...`) of the artifact whose content to retrieve.
85
+ * @param params - Query parameters.
86
+ * @param params.version - Version number to retrieve. Omit to return the artifact's current version.
87
+ * @returns Raw binary content of the artifact file. The `Content-Type` header is set to the artifact's stored MIME type.
88
+ */
21
89
  async content(artifact, params) {
22
- return this.http.requestRaw(`/api/v1/artifacts/${artifact}/content`, { query: params });
90
+ const query = {};
91
+ if (params?.version !== undefined) {
92
+ query["version"] = params?.version;
93
+ }
94
+ return this.http.requestRaw(`/api/v1/artifacts/${artifact}/content`, { query });
23
95
  }
24
96
  }
25
97
  //# sourceMappingURL=artifacts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../../../src/v1/resources/artifacts.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,wEAAwE;AACxE,6BAA6B;AAK7B,MAAM,OAAO,gBAAgB;IACP;IAApB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExC,KAAK,CAAC,MAAM,CAAC,QAAgB;QAC3B,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,qBAAqB,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;IACjF,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,QAAgB;QACxB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,qBAAqB,QAAQ,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,QAAgB,EAAE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EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAC5F,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,OAAO,CAAC,QAAgB;QAC5B,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,qBAAqB,QAAQ,UAAU,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACvF,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,OAAO,CAAC,QAAgB,EAAE,MAA6B;QAC3D,MAAM,KAAK,GAA6F,EAAE,CAAC;QAC3G,IAAI,MAAM,EAAE,OAAO,KAAK,SAAS,EAAE,CAAC;YAClC,KAAK,CAAC,SAAS,CAAC,GAAG,MAAM,EAAE,OAAO,CAAC;QACrC,CAAC;QAED,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,qBAAqB,QAAQ,UAAU,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IAClF,CAAC;CACF"}
@@ -4,10 +4,14 @@ export declare class AutomationRunResource {
4
4
  private http;
5
5
  constructor(http: HttpClient);
6
6
  /**
7
- * Get a single invoked automation run
8
- * Fetches one run created by an invoked automation.
9
- * This public lookup route only returns runs whose parent automation has
10
- * `type: :invoked`.
7
+ * Retrieve an automation run
8
+ * Returns a single run created by an invoked automation.
9
+ * This endpoint is restricted to runs whose parent automation has
10
+ * `type: "invoked"`. Attempting to retrieve a run from a non-invoked
11
+ * automation returns 404. The authenticated user must have access to the
12
+ * automation run's parent automation within their workspace.
13
+ * @param automationRun - Automation run ID (`arun_...`). Must belong to an invoked automation accessible to the authenticated user.
14
+ * @returns The requested automation run.
11
15
  */
12
16
  get(automationRun: string): Promise<AutomationRun>;
13
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"automation_runs.d.ts","sourceRoot":"","sources":["../../../src/v1/resources/automation_runs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEhE,qBAAa,qBAAqB;IACpB,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAEpC;;;;;OAKG;IACG,GAAG,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;CAGzD"}
1
+ {"version":3,"file":"automation_runs.d.ts","sourceRoot":"","sources":["../../../src/v1/resources/automation_runs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEhE,qBAAa,qBAAqB;IACpB,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAEpC;;;;;;;;;OASG;IACG,GAAG,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;CAGzD"}
@@ -1,16 +1,20 @@
1
1
  // Copyright (c) 2026 ArchAstro Inc. All Rights Reserved.
2
2
  // This file is auto-generated by @archastro/sdk-generator. Do not edit.
3
- // Content hash: 1b3c68c546f2
3
+ // Content hash: 99110a203b3c
4
4
  export class AutomationRunResource {
5
5
  http;
6
6
  constructor(http) {
7
7
  this.http = http;
8
8
  }
9
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`.
10
+ * Retrieve an automation run
11
+ * Returns a single run created by an invoked automation.
12
+ * This endpoint is restricted to runs whose parent automation has
13
+ * `type: "invoked"`. Attempting to retrieve a run from a non-invoked
14
+ * automation returns 404. The authenticated user must have access to the
15
+ * automation run's parent automation within their workspace.
16
+ * @param automationRun - Automation run ID (`arun_...`). Must belong to an invoked automation accessible to the authenticated user.
17
+ * @returns The requested automation run.
14
18
  */
15
19
  async get(automationRun) {
16
20
  return this.http.request(`/api/v1/automation_runs/${automationRun}`);
@@ -1 +1 @@
1
- {"version":3,"file":"automation_runs.js","sourceRoot":"","sources":["../../../src/v1/resources/automation_runs.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,wEAAwE;AACxE,6BAA6B;AAK7B,MAAM,OAAO,qBAAqB;IACZ;IAApB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExC;;;;;OAKG;IACH,KAAK,CAAC,GAAG,CAAC,aAAqB;QAC7B,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,2BAA2B,aAAa,EAAE,CAAC,CAAC;IACvE,CAAC;CACF"}
1
+ {"version":3,"file":"automation_runs.js","sourceRoot":"","sources":["../../../src/v1/resources/automation_runs.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,wEAAwE;AACxE,6BAA6B;AAK7B,MAAM,OAAO,qBAAqB;IACZ;IAApB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExC;;;;;;;;;OASG;IACH,KAAK,CAAC,GAAG,CAAC,aAAqB;QAC7B,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,2BAA2B,aAAa,EAAE,CAAC,CAAC;IACvE,CAAC;CACF"}
@@ -3,6 +3,26 @@ import type { AutomationRun } from "../../types/automations.js";
3
3
  export declare class AutomationResource {
4
4
  private http;
5
5
  constructor(http: HttpClient);
6
+ /**
7
+ * Invoke an automation
8
+ * Triggers a single run of an automation that has `type: "invoked"`. Returns
9
+ * the resulting automation run object, which you can use to poll or display
10
+ * run status.
11
+ * Both server-to-server (secret key) and user (publishable key + JWT) auth
12
+ * are supported. The automation's `invoke_auth` setting controls which auth
13
+ * modes are accepted; requests using an unsupported mode are rejected with
14
+ * 403. For server-to-server callers the run executes under the identity
15
+ * configured in the automation's `run_as_user` or `run_as_agent` fields. For
16
+ * authenticated user callers the invoking user's identity is used
17
+ * automatically.
18
+ * If you supply an `idempotency_key`, a second request with the same key
19
+ * returns the existing run rather than creating a new one.
20
+ * @param automation - Automation ID (`auto_...`) or `lookup_key` of the automation to invoke.
21
+ * @param input - Request body.
22
+ * @param input.idempotency_key - Unique key to deduplicate concurrent or retried invocations. A second request with the same key returns the existing run instead of creating a new one.
23
+ * @param input.payload - Arbitrary input data passed to the automation. Validated against the automation's `input_schema` when one is configured; the request is rejected with 422 if validation fails.
24
+ * @returns The automation run created by this invocation.
25
+ */
6
26
  invoke(automation: string, input: {
7
27
  idempotency_key?: string | undefined;
8
28
  payload?: Record<string, unknown> | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"automations.d.ts","sourceRoot":"","sources":["../../../src/v1/resources/automations.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEhE,qBAAa,kBAAkB;IACjB,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE9B,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE;QAAE,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;KAAE,GAAG,OAAO,CAAC,aAAa,CAAC;CAGzJ"}
1
+ {"version":3,"file":"automations.d.ts","sourceRoot":"","sources":["../../../src/v1/resources/automations.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEhE,qBAAa,kBAAkB;IACjB,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAEpC;;;;;;;;;;;;;;;;;;;OAmBG;IACG,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE;QAAE,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;KAAE,GAAG,OAAO,CAAC,aAAa,CAAC;CAGzJ"}