@smapiot/piral-cloud-node 0.13.2 → 0.13.3-pre.20230130.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
@@ -62,6 +62,12 @@ declare module "@smapiot/piral-cloud-node" {
62
62
  doAddConfig(feed: string, pilet: string, content: ConfigCreateDetails): Promise<unknown>;
63
63
  doDeleteConfig(feed: string, pilet: string, config: string): Promise<unknown>;
64
64
  doUpdateConfig(feed: string, pilet: string, config: string, content: ConfigUpdateDetails): Promise<unknown>;
65
+ doQueryAllFeedConfigs(feed: string): Promise<AllFeedConfigsDTO>;
66
+ doQueryFeedConfigs(feed: string, configId: string): Promise<FeedConfigsDTO>;
67
+ doQueryFeedConfig(feed: string, configId: string, config: string): Promise<FeedConfigDTO>;
68
+ doAddFeedConfig(feed: string, configId: string, content: ConfigCreateDetails): Promise<unknown>;
69
+ doDeleteFeedConfig(feed: string, configId: string, config: string): Promise<unknown>;
70
+ doUpdateFeedConfig(feed: string, configId: string, config: string, content: ConfigUpdateDetails): Promise<unknown>;
65
71
  doQueryEntities(feed: string): Promise<EntitiesDTO>;
66
72
  doQueryEntity(feed: string, id: string): Promise<EntityDTO>;
67
73
  doAddEntity(feed: string, content: EntityCreateDetails): Promise<unknown>;
@@ -333,13 +339,8 @@ declare module "@smapiot/piral-cloud-node" {
333
339
  pilet: string;
334
340
  }
335
341
 
336
- export interface ConfigDTO {
337
- name: string;
338
- value: any;
339
- feed: string;
342
+ export interface ConfigDTO extends ConfigBaseDTO {
340
343
  pilet: string;
341
- created: string;
342
- changed: string;
343
344
  }
344
345
 
345
346
  export interface ConfigCreateDetails {
@@ -351,6 +352,19 @@ declare module "@smapiot/piral-cloud-node" {
351
352
  value: any;
352
353
  }
353
354
 
355
+ export interface AllFeedConfigsDTO extends ApiData<string> {
356
+ feed: string;
357
+ }
358
+
359
+ export interface FeedConfigsDTO extends ApiData<FeedConfigDTO> {
360
+ feed: string;
361
+ config: string;
362
+ }
363
+
364
+ export interface FeedConfigDTO extends ConfigBaseDTO {
365
+ id: string;
366
+ }
367
+
354
368
  export interface EntitiesDTO extends ApiData<EntityDTO> {
355
369
  feed: string;
356
370
  }
@@ -695,6 +709,14 @@ declare module "@smapiot/piral-cloud-node" {
695
709
  constraints: Array<string>;
696
710
  }
697
711
 
712
+ export interface ConfigBaseDTO {
713
+ name: string;
714
+ value: any;
715
+ feed: string;
716
+ created: string;
717
+ changed: string;
718
+ }
719
+
698
720
  export interface CustomRuleModuleDTO {
699
721
  file: string;
700
722
  success: boolean;
@@ -763,5 +785,5 @@ declare module "@smapiot/piral-cloud-node" {
763
785
  plan: string;
764
786
  }
765
787
 
766
- export type PiletType = "v0" | "v1" | "v2" | "oc" | "sspa" | "wmf";
788
+ export type PiletType = "v0" | "v1" | "v2" | "oc" | "sspa" | "wmf" | "nf";
767
789
  }
package/lib/index.js CHANGED
@@ -4659,6 +4659,24 @@ var FeedServiceApiClient = class {
4659
4659
  doUpdateConfig(feed, pilet, config, content) {
4660
4660
  return this.doPut(`feed/${feed}/pilets/${pilet}/configs/${config}`, content);
4661
4661
  }
4662
+ doQueryAllFeedConfigs(feed) {
4663
+ return this.doGet(`feed/${feed}/configs`);
4664
+ }
4665
+ doQueryFeedConfigs(feed, configId) {
4666
+ return this.doGet(`feed/${feed}/configs/${configId}`);
4667
+ }
4668
+ doQueryFeedConfig(feed, configId, config) {
4669
+ return this.doGet(`feed/${feed}/configs/${configId}/${config}`);
4670
+ }
4671
+ doAddFeedConfig(feed, configId, content) {
4672
+ return this.doPost(`feed/${feed}/configs/${configId}`, content);
4673
+ }
4674
+ doDeleteFeedConfig(feed, configId, config) {
4675
+ return this.doDelete(`feed/${feed}/configs/${configId}/${config}`);
4676
+ }
4677
+ doUpdateFeedConfig(feed, configId, config, content) {
4678
+ return this.doPut(`feed/${feed}/configs/${configId}/${config}`, content);
4679
+ }
4662
4680
  doQueryEntities(feed) {
4663
4681
  return this.doGet(`feed/${feed}/entities`);
4664
4682
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smapiot/piral-cloud-node",
3
- "version": "0.13.2",
3
+ "version": "0.13.3-pre.20230130.1",
4
4
  "description": "Piral Cloud: Node-usable API Client for the Piral Feed Service.",
5
5
  "author": {
6
6
  "name": "smapiot",
@@ -40,7 +40,7 @@
40
40
  "node"
41
41
  ],
42
42
  "devDependencies": {
43
- "@piral/feed-client": "^0.13.2",
43
+ "@piral/feed-client": "^0.13.3",
44
44
  "dets": "^0.12.0",
45
45
  "esbuild": "^0.14.51",
46
46
  "node-fetch": "^3.2.10"