@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 +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,CAAY;IAAG,CAAC;IAExC,KAAK,CAAC,IAAI,CAAC,KAAa;QACtB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,KAAK,kBAAkB,CAAC,CAAC;IACtE,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,KAAa,EAAE,KAAmL;QAC7M,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,KAAK,kBAAkB,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACvG,CAAC;CACF;AAED,MAAM,OAAO,8BAA8B;IACrB;IAApB,YAAoB,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAExC,KAAK,CAAC,IAAI,CAAC,KAAa;QACtB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,KAAK,sBAAsB,CAAC,CAAC;IAC1E,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,KAAa,EAAE,KAA6U;QACvW,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,KAAK,sBAAsB,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAC3G,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,KAAa;QACvB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,KAAK,4BAA4B,CAAC,CAAC;IAChF,CAAC;CACF;AAED,MAAM,OAAO,sBAAsB;IACb;IAApB,YAAoB,IAA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,CAAC;IAC/F,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACH,KAAK,CAAC,OAAO,CAAC,KAAa,EAAE,KAAyY;QACpa,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,KAAK,UAAU,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAC/F,CAAC;CACF"}
@@ -1,9 +1,26 @@
1
1
  import { HttpClient } from "../../runtime/http-client.js";
2
- import type { AICompletionResult, AIImageResult } from "../../types/ai.js";
3
- export declare class ChatResource {
2
+ import type { AIChatStreamDone, AIChatStreamError, AIChatStreamMessageComplete, AIChatStreamMessageDelta, AIChatStreamToolCallDelta, AIChatStreamToolResult, AICompletionResult, AIImageResult } from "../../types/ai.js";
3
+ export declare class CompletionResource {
4
4
  private http;
5
5
  constructor(http: HttpClient);
6
- completions(input: {
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
+ */
23
+ create(input: {
7
24
  context?: Record<string, unknown> | undefined;
8
25
  messages: {
9
26
  content?: string | undefined;
@@ -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,127 @@ export declare class ChatResource {
39
57
  }[] | undefined;
40
58
  };
41
59
  }): Promise<AICompletionResult>;
60
+ /**
61
+ * Stream a chat completion
62
+ * Streams a chat completion over Server-Sent Events. Emits `message_delta`,
63
+ * `message_complete`, `tool_call_*`, `tool_result`, and a terminal `done` (or
64
+ * `error`) event. Same request shape as the non-streaming completion endpoint;
65
+ * the app must have the `llm_calls` entitlement.
66
+ * @param input - Request body.
67
+ * @param input.context - Key-value map used to resolve template variables in message content. Omit if messages contain no templates.
68
+ * @param input.messages - Ordered list of conversation messages to send to the model.
69
+ * @param input.opts - Model and sampling configuration for this request.
70
+ * @returns Server-Sent Events stream
71
+ */
72
+ stream(input: {
73
+ context?: Record<string, unknown> | undefined;
74
+ messages: {
75
+ content?: string | undefined;
76
+ content_parts?: Record<string, unknown>[] | undefined;
77
+ resume_token?: string | undefined;
78
+ role: string;
79
+ structured_output?: unknown | undefined;
80
+ tool_calls?: {
81
+ arguments: Record<string, unknown>;
82
+ id: string;
83
+ name: string;
84
+ thought_signature?: string | undefined;
85
+ }[] | undefined;
86
+ tool_results?: {
87
+ content?: string | undefined;
88
+ id: string;
89
+ name: string;
90
+ resolution?: unknown | undefined;
91
+ }[] | undefined;
92
+ }[];
93
+ opts: {
94
+ max_tokens?: number | undefined;
95
+ model: string;
96
+ server_tools?: Record<string, unknown>[] | undefined;
97
+ temperature?: number | undefined;
98
+ tool_choice?: string | undefined;
99
+ tools?: {
100
+ function: {
101
+ description?: string | undefined;
102
+ name: string;
103
+ parameters: Record<string, unknown>;
104
+ };
105
+ type: string;
106
+ }[] | undefined;
107
+ };
108
+ }): AsyncIterable<{
109
+ event: "done";
110
+ data: AIChatStreamDone;
111
+ } | {
112
+ event: "error";
113
+ data: AIChatStreamError;
114
+ } | {
115
+ event: "message_complete";
116
+ data: AIChatStreamMessageComplete;
117
+ } | {
118
+ event: "message_delta";
119
+ data: AIChatStreamMessageDelta;
120
+ } | {
121
+ event: "tool_call_delta";
122
+ data: AIChatStreamToolCallDelta;
123
+ } | {
124
+ event: "tool_result";
125
+ data: AIChatStreamToolResult;
126
+ }>;
127
+ }
128
+ export declare class ChatResource {
129
+ private http;
130
+ readonly completions: CompletionResource;
131
+ constructor(http: HttpClient);
132
+ /**
133
+ * List available AI models
134
+ * Returns the set of AI models that can be used with the chat completion and
135
+ * workflow endpoints. The list reflects models currently enabled for the
136
+ * platform and includes each model's identifier and whether it is the default.
137
+ * Use the `model` field from any entry in `data` as the value for
138
+ * `opts.model` when calling the completions or workflows endpoint.
139
+ * @returns Successful response
140
+ */
42
141
  models(): Promise<{
43
142
  data: {
143
+ capabilities: "image" | "search" | "thinking"[];
144
+ default: boolean;
44
145
  id: string;
146
+ input_media_formats: string[];
147
+ name: string;
148
+ output_media_formats: string[];
45
149
  }[];
46
150
  }>;
47
151
  }
48
152
  export declare class ImageResource {
49
153
  private http;
50
154
  constructor(http: HttpClient);
155
+ /**
156
+ * Edit an image with a text prompt
157
+ * Applies a text-guided edit to one or more source images and returns the
158
+ * resulting image. Pass the source images as base64-encoded objects in the
159
+ * `images` array alongside a `prompt` describing the desired modification.
160
+ * The underlying provider is selected by the `model` parameter. Omit `model`
161
+ * to use the platform default. Size, quality, style, and format options are
162
+ * forwarded to the provider as-is; unsupported combinations for a given model
163
+ * return a 422 error with the provider's error message.
164
+ * This endpoint requires authentication. The request is billed against the
165
+ * workspace associated with the authenticated user.
166
+ * @param input - Request body.
167
+ * @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.
168
+ * @param input.background - Background treatment for the output. Accepted values and behavior are model-dependent.
169
+ * @param input.height - Explicit output height in pixels. Takes precedence over `size` when both are provided. Not supported by all models.
170
+ * @param input.image_size - Output resolution tier for Gemini models, e.g. `"1K"`, `"2K"`, or `"4K"`. Ignored by non-Gemini models.
171
+ * @param input.images - One or more source images to edit. Each image must be supplied as a base64-encoded object.
172
+ * @param input.model - Model identifier to use for editing. Omit to use the platform default image model.
173
+ * @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.
174
+ * @param input.prompt - Natural-language description of the edit to apply to the source image(s).
175
+ * @param input.quality - Quality preset for the output image. Accepted values and behavior are model-dependent.
176
+ * @param input.size - Output dimensions as a WxH string, e.g. `"1024x1024"`. Applies to OpenAI-compatible models. Omit to use the model's default.
177
+ * @param input.style - Style preset applied to the edit. Accepted values and behavior are model-dependent.
178
+ * @param input.width - Explicit output width in pixels. Takes precedence over `size` when both are provided. Not supported by all models.
179
+ * @returns The resulting edited image, including base64 data or a URL depending on the model.
180
+ */
51
181
  edits(input: {
52
182
  aspect_ratio?: string | undefined;
53
183
  background?: string | undefined;
@@ -65,6 +195,32 @@ export declare class ImageResource {
65
195
  style?: string | undefined;
66
196
  width?: number | undefined;
67
197
  }): Promise<AIImageResult>;
198
+ /**
199
+ * Generate an image from a text prompt
200
+ * Generates one or more images from a natural-language `prompt` using the
201
+ * specified AI image model. The response contains the first generated image;
202
+ * use `n` to request additional images (where supported by the model).
203
+ * The underlying provider is selected by the `model` parameter. Omit `model`
204
+ * to use the platform default. Size, quality, style, and format options are
205
+ * forwarded to the provider as-is; unsupported combinations for a given model
206
+ * return a 422 error with the provider's error message.
207
+ * This endpoint requires authentication. The request is billed against the
208
+ * workspace associated with the authenticated user.
209
+ * @param input - Request body.
210
+ * @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.
211
+ * @param input.background - Background treatment for the output. Accepted values and behavior are model-dependent.
212
+ * @param input.height - Explicit output height in pixels. Takes precedence over `size` when both are provided. Not supported by all models.
213
+ * @param input.image_size - Output resolution tier for Gemini models, e.g. `"1K"`, `"2K"`, or `"4K"`. Ignored by non-Gemini models.
214
+ * @param input.model - Model identifier to use for generation. Omit to use the platform default image model.
215
+ * @param input.n - Number of images to generate. Defaults to `1`. Values greater than `1` are only supported by models that allow batch generation.
216
+ * @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.
217
+ * @param input.prompt - Natural-language description of the image to generate.
218
+ * @param input.quality - Quality preset for the output image. Accepted values and behavior are model-dependent.
219
+ * @param input.size - Output dimensions as a WxH string, e.g. `"1024x1024"`. Applies to OpenAI-compatible models. Omit to use the model's default.
220
+ * @param input.style - Style preset applied to the generated image. Accepted values and behavior are model-dependent.
221
+ * @param input.width - Explicit output width in pixels. Takes precedence over `size` when both are provided. Not supported by all models.
222
+ * @returns The generated image, including base64 data or a URL depending on the model.
223
+ */
68
224
  generations(input: {
69
225
  aspect_ratio?: string | undefined;
70
226
  background?: string | undefined;
@@ -79,9 +235,24 @@ export declare class ImageResource {
79
235
  style?: string | undefined;
80
236
  width?: number | undefined;
81
237
  }): Promise<AIImageResult>;
238
+ /**
239
+ * List available image generation models
240
+ * Returns the list of image generation models available on the platform.
241
+ * Exactly one entry in the list carries `default: true`, indicating the model
242
+ * used when no `model` parameter is supplied to the generation or editing
243
+ * endpoints.
244
+ * This endpoint requires authentication and reflects the models enabled for
245
+ * the authenticated user's workspace.
246
+ * @returns Successful response
247
+ */
82
248
  models(): Promise<{
83
249
  data: {
250
+ capabilities: "image" | "search" | "thinking"[];
251
+ default: boolean;
84
252
  id: string;
253
+ input_media_formats: string[];
254
+ name: string;
255
+ output_media_formats: string[];
85
256
  }[];
86
257
  }>;
87
258
  }
@@ -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,IAA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EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,GAAG,OAAO,CAAC,aAAa,CAAC;IAI/Y;;;;;;;;;OASG;IACG,MAAM,IAAI,OAAO,CAAC;QAAE,IAAI,EAAE;YAAE,YAAY,EAAE,OAAO,GAAG,QAAQ,GAAG,UAAU,EAAE,CAAC;YAAC,OAAO,EAAE,OAAO,CAAC;YAAC,EAAE,EAAE,MAAM,CAAC;YAAC,mBAAmB,EAAE,MAAM,EAAE,CAAC;YAAC,IAAI,EAAE,MAAM,CAAC;YAAC,oBAAoB,EAAE,MAAM,EAAE,CAAA;SAAE,EAAE,CAAA;KAAE,CAAC;CAGpM;AAED,qBAAa,UAAU;IAIT,OAAO,CAAC,IAAI;IAHxB,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;gBAEV,IAAI,EAAE,UAAU;CAIrC"}
@@ -1,14 +1,63 @@
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
4
- export class ChatResource {
3
+ // Content hash: 6debed5501de
4
+ export class CompletionResource {
5
5
  http;
6
6
  constructor(http) {
7
7
  this.http = http;
8
8
  }
9
- async completions(input) {
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
+ */
26
+ async create(input) {
10
27
  return this.http.request(`/api/v1/ai/chat/completions`, { method: "POST", body: input });
11
28
  }
29
+ /**
30
+ * Stream a chat completion
31
+ * Streams a chat completion over Server-Sent Events. Emits `message_delta`,
32
+ * `message_complete`, `tool_call_*`, `tool_result`, and a terminal `done` (or
33
+ * `error`) event. Same request shape as the non-streaming completion endpoint;
34
+ * the app must have the `llm_calls` entitlement.
35
+ * @param input - Request body.
36
+ * @param input.context - Key-value map used to resolve template variables in message content. Omit if messages contain no templates.
37
+ * @param input.messages - Ordered list of conversation messages to send to the model.
38
+ * @param input.opts - Model and sampling configuration for this request.
39
+ * @returns Server-Sent Events stream
40
+ */
41
+ async *stream(input) {
42
+ yield* this.http.streamSSE(`/api/v1/ai/chat/completions/stream`, { method: "POST", body: input });
43
+ }
44
+ }
45
+ export class ChatResource {
46
+ http;
47
+ completions;
48
+ constructor(http) {
49
+ this.http = http;
50
+ this.completions = new CompletionResource(http);
51
+ }
52
+ /**
53
+ * List available AI models
54
+ * Returns the set of AI models that can be used with the chat completion and
55
+ * workflow endpoints. The list reflects models currently enabled for the
56
+ * platform and includes each model's identifier and whether it is the default.
57
+ * Use the `model` field from any entry in `data` as the value for
58
+ * `opts.model` when calling the completions or workflows endpoint.
59
+ * @returns Successful response
60
+ */
12
61
  async models() {
13
62
  return this.http.request(`/api/v1/ai/chat/models`);
14
63
  }
@@ -18,12 +67,74 @@ export class ImageResource {
18
67
  constructor(http) {
19
68
  this.http = http;
20
69
  }
70
+ /**
71
+ * Edit an image with a text prompt
72
+ * Applies a text-guided edit to one or more source images and returns the
73
+ * resulting image. Pass the source images as base64-encoded objects in the
74
+ * `images` array alongside a `prompt` describing the desired modification.
75
+ * The underlying provider is selected by the `model` parameter. Omit `model`
76
+ * to use the platform default. Size, quality, style, and format options are
77
+ * forwarded to the provider as-is; unsupported combinations for a given model
78
+ * return a 422 error with the provider's error message.
79
+ * This endpoint requires authentication. The request is billed against the
80
+ * workspace associated with the authenticated user.
81
+ * @param input - Request body.
82
+ * @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.
83
+ * @param input.background - Background treatment for the output. Accepted values and behavior are model-dependent.
84
+ * @param input.height - Explicit output height in pixels. Takes precedence over `size` when both are provided. Not supported by all models.
85
+ * @param input.image_size - Output resolution tier for Gemini models, e.g. `"1K"`, `"2K"`, or `"4K"`. Ignored by non-Gemini models.
86
+ * @param input.images - One or more source images to edit. Each image must be supplied as a base64-encoded object.
87
+ * @param input.model - Model identifier to use for editing. Omit to use the platform default image model.
88
+ * @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.
89
+ * @param input.prompt - Natural-language description of the edit to apply to the source image(s).
90
+ * @param input.quality - Quality preset for the output image. Accepted values and behavior are model-dependent.
91
+ * @param input.size - Output dimensions as a WxH string, e.g. `"1024x1024"`. Applies to OpenAI-compatible models. Omit to use the model's default.
92
+ * @param input.style - Style preset applied to the edit. Accepted values and behavior are model-dependent.
93
+ * @param input.width - Explicit output width in pixels. Takes precedence over `size` when both are provided. Not supported by all models.
94
+ * @returns The resulting edited image, including base64 data or a URL depending on the model.
95
+ */
21
96
  async edits(input) {
22
97
  return this.http.request(`/api/v1/ai/image/edits`, { method: "POST", body: input });
23
98
  }
99
+ /**
100
+ * Generate an image from a text prompt
101
+ * Generates one or more images from a natural-language `prompt` using the
102
+ * specified AI image model. The response contains the first generated image;
103
+ * use `n` to request additional images (where supported by the model).
104
+ * The underlying provider is selected by the `model` parameter. Omit `model`
105
+ * to use the platform default. Size, quality, style, and format options are
106
+ * forwarded to the provider as-is; unsupported combinations for a given model
107
+ * return a 422 error with the provider's error message.
108
+ * This endpoint requires authentication. The request is billed against the
109
+ * workspace associated with the authenticated user.
110
+ * @param input - Request body.
111
+ * @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.
112
+ * @param input.background - Background treatment for the output. Accepted values and behavior are model-dependent.
113
+ * @param input.height - Explicit output height in pixels. Takes precedence over `size` when both are provided. Not supported by all models.
114
+ * @param input.image_size - Output resolution tier for Gemini models, e.g. `"1K"`, `"2K"`, or `"4K"`. Ignored by non-Gemini models.
115
+ * @param input.model - Model identifier to use for generation. Omit to use the platform default image model.
116
+ * @param input.n - Number of images to generate. Defaults to `1`. Values greater than `1` are only supported by models that allow batch generation.
117
+ * @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.
118
+ * @param input.prompt - Natural-language description of the image to generate.
119
+ * @param input.quality - Quality preset for the output image. Accepted values and behavior are model-dependent.
120
+ * @param input.size - Output dimensions as a WxH string, e.g. `"1024x1024"`. Applies to OpenAI-compatible models. Omit to use the model's default.
121
+ * @param input.style - Style preset applied to the generated image. Accepted values and behavior are model-dependent.
122
+ * @param input.width - Explicit output width in pixels. Takes precedence over `size` when both are provided. Not supported by all models.
123
+ * @returns The generated image, including base64 data or a URL depending on the model.
124
+ */
24
125
  async generations(input) {
25
126
  return this.http.request(`/api/v1/ai/image/generations`, { method: "POST", body: input });
26
127
  }
128
+ /**
129
+ * List available image generation models
130
+ * Returns the list of image generation models available on the platform.
131
+ * Exactly one entry in the list carries `default: true`, indicating the model
132
+ * used when no `model` parameter is supplied to the generation or editing
133
+ * endpoints.
134
+ * This endpoint requires authentication and reflects the models enabled for
135
+ * the authenticated user's workspace.
136
+ * @returns Successful response
137
+ */
27
138
  async models() {
28
139
  return this.http.request(`/api/v1/ai/image/models`);
29
140
  }
@@ -1 +1 @@
1
- {"version":3,"file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AI,CAAC,IAAI,CAAC,OAAO,CAAC,wBAAwB,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACtF,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,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;;;;;;;;;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;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AAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;SAAE,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;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,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