@smapiot/piral-cloud-node 0.16.0 → 0.16.1-pre.20230724.2

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
@@ -119,6 +119,10 @@ declare module "@smapiot/piral-cloud-node" {
119
119
  doQueryGenerators(feed: string, ac?: AbortController): Promise<GeneratorsDTO>;
120
120
  doQueryGeneratorSteps(feed: string, generator: string, ac?: AbortController): Promise<GeneratorStepDTO>;
121
121
  doGeneratePilet(feed: string, generator: string, details: GeneratePiletDetails, ac?: AbortController): Promise<GeneratePiletResult>;
122
+ doQueryAllGenerators(ac?: AbortController): Promise<GeneratorDTO>;
123
+ doCreateGenerator(details: CreateGeneratorDetails, ac?: AbortController): Promise<CreateGeneratorResponse>;
124
+ doQueryGeneratorDetails(generatorId: string, ac?: AbortController): Promise<GeneratorDetails>;
125
+ doDeleteGenerator(generatorId: string, ac?: AbortController): Promise<GeneratorResponse>;
122
126
  }
123
127
 
124
128
  /**
@@ -726,6 +730,38 @@ declare module "@smapiot/piral-cloud-node" {
726
730
  url: string;
727
731
  }
728
732
 
733
+ export interface GeneratorDTO {
734
+ id: string;
735
+ name: string;
736
+ version: string;
737
+ author: string;
738
+ description: string;
739
+ }
740
+
741
+ export interface CreateGeneratorDetails {
742
+ file: string;
743
+ content: string;
744
+ }
745
+
746
+ export interface CreateGeneratorResponse extends GeneratorResponse {
747
+ error: string;
748
+ }
749
+
750
+ export interface GeneratorDetails extends GeneratorDTO {
751
+ file: string;
752
+ error: string;
753
+ readOnly: boolean;
754
+ version: string;
755
+ icon: string;
756
+ }
757
+
758
+ export interface GeneratorResponse {
759
+ id: string;
760
+ success: boolean;
761
+ name: string;
762
+ version: string;
763
+ }
764
+
729
765
  /**
730
766
  * The simple API key options for creating a new service client.
731
767
  */
@@ -917,14 +953,6 @@ declare module "@smapiot/piral-cloud-node" {
917
953
  name: string;
918
954
  }
919
955
 
920
- export interface GeneratorDTO {
921
- id: string;
922
- name: string;
923
- version: string;
924
- author: string;
925
- description: string;
926
- }
927
-
928
956
  export interface BaseFeedDTO {
929
957
  id: string;
930
958
  name: string;
package/lib/index.js CHANGED
@@ -4842,6 +4842,18 @@ var FeedServiceApiClient = class {
4842
4842
  doGeneratePilet(feed, generator, details, ac = mac()) {
4843
4843
  return this.doPost(`feed/${feed}/generator/${generator}`, details, mri(ac));
4844
4844
  }
4845
+ doQueryAllGenerators(ac = mac()) {
4846
+ return this.doGet(`generator`, mri(ac));
4847
+ }
4848
+ doCreateGenerator(details, ac = mac()) {
4849
+ return this.doPost(`generator`, details, mri(ac));
4850
+ }
4851
+ doQueryGeneratorDetails(generatorId, ac = mac()) {
4852
+ return this.doGet(`generator/${generatorId}`, mri(ac));
4853
+ }
4854
+ doDeleteGenerator(generatorId, ac = mac()) {
4855
+ return this.doDelete(`generator/${generatorId}`, mri(ac));
4856
+ }
4845
4857
  };
4846
4858
 
4847
4859
  // node_modules/node-fetch/src/index.js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smapiot/piral-cloud-node",
3
- "version": "0.16.0",
3
+ "version": "0.16.1-pre.20230724.2",
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.16.0",
43
+ "@piral/feed-client": "^0.16.1",
44
44
  "dets": "^0.12.0",
45
45
  "esbuild": "^0.14.51",
46
46
  "node-fetch": "^3.2.10"