@alva-ai/toolkit 0.7.0 → 0.8.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.
package/dist/index.cjs CHANGED
@@ -303,7 +303,8 @@ var ReleaseResource = class {
303
303
  description: params.description,
304
304
  feeds: params.feeds,
305
305
  trading_symbols: params.trading_symbols,
306
- template_id: params.template_id
306
+ skill_id: params.skill_id,
307
+ tags: params.tags
307
308
  }
308
309
  });
309
310
  }
@@ -321,6 +322,32 @@ var ReleaseResource = class {
321
322
  }
322
323
  };
323
324
 
325
+ // src/resources/feed.ts
326
+ var FeedResource = class {
327
+ constructor(client) {
328
+ this.client = client;
329
+ }
330
+ client;
331
+ /**
332
+ * Soft-delete a feed and all its active majors. Cascades:
333
+ * - all active feed_majors are soft-deleted in the same transaction
334
+ * - associated producer cronjobs are removed best-effort (the cronjob
335
+ * scavenger reconciles any leftover rows on its next sweep)
336
+ *
337
+ * Auth: caller must own the feed (uid match), enforced by the backend.
338
+ */
339
+ async delete(params) {
340
+ this.client._requireAuth();
341
+ if (!Number.isInteger(params.id) || params.id <= 0) {
342
+ throw new Error("feed id must be a positive integer");
343
+ }
344
+ return this.client._request(
345
+ "DELETE",
346
+ `/api/v1/feed/${encodeURIComponent(String(params.id))}`
347
+ );
348
+ }
349
+ };
350
+
324
351
  // src/resources/secrets.ts
325
352
  var SecretsResource = class {
326
353
  constructor(client) {
@@ -1882,16 +1909,16 @@ var PushSubscriptionsResource = class {
1882
1909
  );
1883
1910
  }
1884
1911
  /**
1885
- * List the caller's personal push subscriptions across all targets
1886
- * (playbook + feed). Defaults to currently-active rows only; pass
1887
- * `include_history=true` to also return previously-unsubscribed rows.
1912
+ * List the caller's currently active personal push subscriptions.
1913
+ * Results are cursor-paginated.
1888
1914
  */
1889
1915
  async list(params = {}) {
1890
1916
  this.client._requireAuth();
1891
1917
  const query = {};
1892
- if (params.include_history !== void 0) {
1893
- query.include_history = String(params.include_history);
1918
+ if (params.first !== void 0 && params.first > 0) {
1919
+ query.first = String(params.first);
1894
1920
  }
1921
+ if (params.cursor) query.cursor = params.cursor;
1895
1922
  return this.client._request("GET", "/api/v1/me/push-subscriptions", {
1896
1923
  query
1897
1924
  });
@@ -1973,6 +2000,7 @@ var AlvaClient = class {
1973
2000
  _run;
1974
2001
  _deploy;
1975
2002
  _release;
2003
+ _feed;
1976
2004
  _secrets;
1977
2005
  _sdk;
1978
2006
  _dataSkills;
@@ -2004,6 +2032,9 @@ var AlvaClient = class {
2004
2032
  get release() {
2005
2033
  return this._release ??= new ReleaseResource(this);
2006
2034
  }
2035
+ get feed() {
2036
+ return this._feed ??= new FeedResource(this);
2037
+ }
2007
2038
  get secrets() {
2008
2039
  return this._secrets ??= new SecretsResource(this);
2009
2040
  }
@@ -2135,7 +2166,7 @@ var AlvaClient = class {
2135
2166
  };
2136
2167
 
2137
2168
  // src/index.ts
2138
- var VERSION = true ? "0.7.0" : "dev";
2169
+ var VERSION = true ? "0.8.0" : "dev";
2139
2170
  // Annotate the CommonJS export names for ESM import in node:
2140
2171
  0 && (module.exports = {
2141
2172
  AlvaClient,