@smapiot/piral-cloud-browser 1.17.0-pre.20250718.4 → 1.17.0-pre.20250925.1

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/lib/index.d.ts CHANGED
@@ -83,6 +83,8 @@ declare module "@smapiot/piral-cloud-browser" {
83
83
  doQueryAllUsers(q: string, offset?: number, count?: number, ac?: AbortController): Promise<AllUsersDTO>;
84
84
  doQueryFeedContributors(feed: string, ac?: AbortController): Promise<FeedContributorsDTO>;
85
85
  doPutFeedContributors(feed: string, content: ContributorUpdateDetails, ac?: AbortController): Promise<unknown>;
86
+ doQueryFeedTags(feed: string, ac?: AbortController): Promise<FeedTagsDTO>;
87
+ doDeleteFeedTag(feed: string, tag: string, ac?: AbortController): Promise<unknown>;
86
88
  doQueryConfigs(feed: string, pilet: string, ac?: AbortController): Promise<ConfigsDTO>;
87
89
  doQueryConfig(feed: string, pilet: string, config: string, ac?: AbortController): Promise<ConfigDTO>;
88
90
  doAddConfig(feed: string, pilet: string, content: ConfigCreateDetails, ac?: AbortController): Promise<unknown>;
@@ -552,6 +554,8 @@ declare module "@smapiot/piral-cloud-browser" {
552
554
  }>;
553
555
  }
554
556
 
557
+ export interface FeedTagsDTO extends ApiData<FeedTagDTO> {}
558
+
555
559
  export interface ConfigsDTO extends ApiData<ConfigDTO> {
556
560
  feed: string;
557
561
  pilet: string;
@@ -1147,6 +1151,10 @@ declare module "@smapiot/piral-cloud-browser" {
1147
1151
  constraints: Array<string>;
1148
1152
  }
1149
1153
 
1154
+ export interface FeedTagDTO {
1155
+ id: string;
1156
+ }
1157
+
1150
1158
  export interface ConfigBaseDTO {
1151
1159
  name: string;
1152
1160
  value: any;
package/lib/index.js CHANGED
@@ -116,6 +116,8 @@ var FeedServiceApiClient = class {
116
116
  }
117
117
  );
118
118
  }
119
+ } else if (res.status >= 500 && res.status < 600) {
120
+ throw new Error(`HTTP call failed with status ${res.status}: ${res.statusText}`);
119
121
  }
120
122
  return res;
121
123
  }).then(getJsonResponse);
@@ -369,6 +371,12 @@ var FeedServiceApiClient = class {
369
371
  doPutFeedContributors(feed, content, ac = mac()) {
370
372
  return this.doPut(`feed/${feed}/contributors`, content, mri(ac));
371
373
  }
374
+ doQueryFeedTags(feed, ac = mac()) {
375
+ return this.doGet(`feed/${feed}/tags`, mri(ac));
376
+ }
377
+ doDeleteFeedTag(feed, tag, ac = mac()) {
378
+ return this.doDelete(`feed/${feed}/tags/${tag}`, mri(ac));
379
+ }
372
380
  doQueryConfigs(feed, pilet, ac = mac()) {
373
381
  return this.doGet(`feed/${feed}/pilets/${pilet}/configs`, mri(ac));
374
382
  }
package/lib/sdk.js CHANGED
@@ -141,6 +141,8 @@ var feedService = (() => {
141
141
  }
142
142
  );
143
143
  }
144
+ } else if (res.status >= 500 && res.status < 600) {
145
+ throw new Error(`HTTP call failed with status ${res.status}: ${res.statusText}`);
144
146
  }
145
147
  return res;
146
148
  }).then(getJsonResponse);
@@ -394,6 +396,12 @@ var feedService = (() => {
394
396
  doPutFeedContributors(feed, content, ac = mac()) {
395
397
  return this.doPut(`feed/${feed}/contributors`, content, mri(ac));
396
398
  }
399
+ doQueryFeedTags(feed, ac = mac()) {
400
+ return this.doGet(`feed/${feed}/tags`, mri(ac));
401
+ }
402
+ doDeleteFeedTag(feed, tag, ac = mac()) {
403
+ return this.doDelete(`feed/${feed}/tags/${tag}`, mri(ac));
404
+ }
397
405
  doQueryConfigs(feed, pilet, ac = mac()) {
398
406
  return this.doGet(`feed/${feed}/pilets/${pilet}/configs`, mri(ac));
399
407
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smapiot/piral-cloud-browser",
3
- "version": "1.17.0-pre.20250718.4",
3
+ "version": "1.17.0-pre.20250925.1",
4
4
  "description": "Piral Cloud: Browser-usable API Client for the Piral Feed Service.",
5
5
  "author": {
6
6
  "name": "smapiot",