@smapiot/piral-cloud-node 0.12.4 → 0.13.0-pre.20221003.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 +47 -1
- package/lib/index.js +15 -0
- package/package.json +2 -2
package/lib/index.d.ts
CHANGED
|
@@ -70,9 +70,14 @@ declare module "@smapiot/piral-cloud-node" {
|
|
|
70
70
|
doQueryUsers(): Promise<UsersDTO>;
|
|
71
71
|
doQueryUser(id: string): Promise<UserDTO>;
|
|
72
72
|
doAddUser(content: UserCreateDetails): Promise<ChangedUserDTO>;
|
|
73
|
-
doDeleteUser(id: string): Promise<
|
|
73
|
+
doDeleteUser(id: string): Promise<DeletedUserDTO>;
|
|
74
74
|
doUpdateUser(id: string, content: UserUpdateDetails): Promise<ChangedUserDTO>;
|
|
75
75
|
doQueryCustomRules(): Promise<CustomRuleModulesDTO>;
|
|
76
|
+
doQueryGroups(): Promise<GroupsDTO>;
|
|
77
|
+
doQueryGroup(id: string): Promise<GroupDetailsDTO>;
|
|
78
|
+
doAddGroup(content: GroupCreateDetails): Promise<GroupDetailsDTO>;
|
|
79
|
+
doUpdateGroup(id: string, content: GroupUpdateDetails): Promise<GroupDetailsDTO>;
|
|
80
|
+
doDeleteGroup(id: string): Promise<DeletedGroupDTO>;
|
|
76
81
|
doAddCustomRules(file: string, content: string): Promise<ChangedCustomRuleModuleDTO>;
|
|
77
82
|
doDeleteCustomRule(file: string): Promise<ChangedCustomRuleModuleDTO>;
|
|
78
83
|
doQueryCustomRuleDetails(file: string): Promise<CustomRuleDetailsDTO>;
|
|
@@ -209,6 +214,7 @@ declare module "@smapiot/piral-cloud-node" {
|
|
|
209
214
|
|
|
210
215
|
export interface FeedCheckDTO {
|
|
211
216
|
exists: boolean;
|
|
217
|
+
restore?: boolean;
|
|
212
218
|
self: boolean;
|
|
213
219
|
feed: string;
|
|
214
220
|
}
|
|
@@ -395,6 +401,11 @@ declare module "@smapiot/piral-cloud-node" {
|
|
|
395
401
|
success: boolean;
|
|
396
402
|
}
|
|
397
403
|
|
|
404
|
+
export interface DeletedUserDTO {
|
|
405
|
+
id: string;
|
|
406
|
+
success: boolean;
|
|
407
|
+
}
|
|
408
|
+
|
|
398
409
|
export interface UserUpdateDetails {
|
|
399
410
|
name?: string;
|
|
400
411
|
provider?: string;
|
|
@@ -407,6 +418,34 @@ declare module "@smapiot/piral-cloud-node" {
|
|
|
407
418
|
items: Array<CustomRuleModuleDTO>;
|
|
408
419
|
}
|
|
409
420
|
|
|
421
|
+
export interface GroupsDTO extends ApiData<GroupDTO> {}
|
|
422
|
+
|
|
423
|
+
export interface GroupDetailsDTO extends GroupDTO {
|
|
424
|
+
changed: string;
|
|
425
|
+
created: string;
|
|
426
|
+
members: Array<{
|
|
427
|
+
id: string;
|
|
428
|
+
name: string;
|
|
429
|
+
}>;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
export interface GroupCreateDetails {
|
|
433
|
+
name: string;
|
|
434
|
+
description?: string;
|
|
435
|
+
members?: Array<string>;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
export interface GroupUpdateDetails {
|
|
439
|
+
name?: string;
|
|
440
|
+
description?: string;
|
|
441
|
+
members?: Array<string>;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
export interface DeletedGroupDTO {
|
|
445
|
+
id: string;
|
|
446
|
+
success: boolean;
|
|
447
|
+
}
|
|
448
|
+
|
|
410
449
|
export interface ChangedCustomRuleModuleDTO {
|
|
411
450
|
success: boolean;
|
|
412
451
|
file: string;
|
|
@@ -652,6 +691,13 @@ declare module "@smapiot/piral-cloud-node" {
|
|
|
652
691
|
error?: string;
|
|
653
692
|
}
|
|
654
693
|
|
|
694
|
+
export interface GroupDTO {
|
|
695
|
+
id: string;
|
|
696
|
+
name: string;
|
|
697
|
+
description: string;
|
|
698
|
+
memberCount: number;
|
|
699
|
+
}
|
|
700
|
+
|
|
655
701
|
export interface FeedRequestsDTO {
|
|
656
702
|
count: number;
|
|
657
703
|
from: string;
|
package/lib/index.js
CHANGED
|
@@ -4687,6 +4687,21 @@ var FeedServiceApiClient = class {
|
|
|
4687
4687
|
doQueryCustomRules() {
|
|
4688
4688
|
return this.doGet(`customrule`);
|
|
4689
4689
|
}
|
|
4690
|
+
doQueryGroups() {
|
|
4691
|
+
return this.doGet(`group`);
|
|
4692
|
+
}
|
|
4693
|
+
doQueryGroup(id) {
|
|
4694
|
+
return this.doGet(`group/${id}`);
|
|
4695
|
+
}
|
|
4696
|
+
doAddGroup(content) {
|
|
4697
|
+
return this.doPost(`group`, content);
|
|
4698
|
+
}
|
|
4699
|
+
doUpdateGroup(id, content) {
|
|
4700
|
+
return this.doPut(`group/${id}`, content);
|
|
4701
|
+
}
|
|
4702
|
+
doDeleteGroup(id) {
|
|
4703
|
+
return this.doDelete(`group/${id}`);
|
|
4704
|
+
}
|
|
4690
4705
|
doAddCustomRules(file, content) {
|
|
4691
4706
|
return this.doPost(`customrule`, {
|
|
4692
4707
|
file,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smapiot/piral-cloud-node",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0-pre.20221003.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.
|
|
43
|
+
"@piral/feed-client": "^0.13.0",
|
|
44
44
|
"dets": "^0.12.0",
|
|
45
45
|
"esbuild": "^0.14.51",
|
|
46
46
|
"node-fetch": "^3.2.10"
|