@startanaicompany/cli 1.4.17 → 1.4.18

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.
package/src/lib/api.js CHANGED
@@ -186,6 +186,24 @@ async function healthCheck() {
186
186
  return response.data;
187
187
  }
188
188
 
189
+ /**
190
+ * Get deployment history for an application
191
+ */
192
+ async function getDeployments(uuid, params = {}) {
193
+ const client = createClient();
194
+ const response = await client.get(`/applications/${uuid}/deployments`, { params });
195
+ return response.data;
196
+ }
197
+
198
+ /**
199
+ * Get deployment logs (build logs, not runtime logs)
200
+ */
201
+ async function getDeploymentLogs(uuid, params = {}) {
202
+ const client = createClient();
203
+ const response = await client.get(`/applications/${uuid}/deployment-logs`, { params });
204
+ return response.data;
205
+ }
206
+
189
207
  /**
190
208
  * Request login OTP (no API key required)
191
209
  */
@@ -241,6 +259,37 @@ async function getApiKeyInfo() {
241
259
  return response.data;
242
260
  }
243
261
 
262
+ /**
263
+ * Get environment variables for an application
264
+ */
265
+ async function getEnvironmentVariables(uuid) {
266
+ const client = createClient();
267
+ const response = await client.get(`/applications/${uuid}/env`);
268
+ return response.data;
269
+ }
270
+
271
+ /**
272
+ * Execute a command in the application container
273
+ * @param {string} uuid - Application UUID
274
+ * @param {object} execRequest - { command, workdir, timeout }
275
+ */
276
+ async function executeCommand(uuid, execRequest) {
277
+ const client = createClient();
278
+ const response = await client.post(`/applications/${uuid}/exec`, execRequest);
279
+ return response.data;
280
+ }
281
+
282
+ /**
283
+ * Get execution history for an application
284
+ * @param {string} uuid - Application UUID
285
+ * @param {object} params - { limit, offset }
286
+ */
287
+ async function getExecutionHistory(uuid, params = {}) {
288
+ const client = createClient();
289
+ const response = await client.get(`/applications/${uuid}/exec/history`, { params });
290
+ return response.data;
291
+ }
292
+
244
293
  module.exports = {
245
294
  createClient,
246
295
  login,
@@ -254,6 +303,7 @@ module.exports = {
254
303
  deployApplication,
255
304
  getApplicationLogs,
256
305
  updateEnvironmentVariables,
306
+ getEnvironmentVariables,
257
307
  updateDomain,
258
308
  deleteApplication,
259
309
  healthCheck,
@@ -261,4 +311,8 @@ module.exports = {
261
311
  verifyLoginOtp,
262
312
  regenerateApiKey,
263
313
  getApiKeyInfo,
314
+ getDeployments,
315
+ getDeploymentLogs,
316
+ executeCommand,
317
+ getExecutionHistory,
264
318
  };