@smapiot/piral-cloud-node 1.13.2 → 1.13.3-pre.20240229.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.cjs.js +7 -0
- package/lib/index.d.ts +24 -0
- package/lib/index.esm.js +7 -0
- package/package.json +2 -2
package/lib/index.cjs.js
CHANGED
|
@@ -5319,6 +5319,13 @@ var FeedServiceApiClient = class {
|
|
|
5319
5319
|
doQueryDashboard(ac = mac()) {
|
|
5320
5320
|
return this.doGet("dashboard", mri(ac));
|
|
5321
5321
|
}
|
|
5322
|
+
doQueryDashboardFeeds(offset = "", count = "40", ac = mac()) {
|
|
5323
|
+
const queryString = makeQueryString({ offset, count });
|
|
5324
|
+
return this.doGet(`dashboard/feeds?${queryString}`, mri(ac));
|
|
5325
|
+
}
|
|
5326
|
+
doSendNotification(details, ac = mac()) {
|
|
5327
|
+
return this.doPost(`dashboard/notifications`, details, mri(ac));
|
|
5328
|
+
}
|
|
5322
5329
|
doQueryIssues(ac = mac()) {
|
|
5323
5330
|
return this.doGet("issue", mri(ac));
|
|
5324
5331
|
}
|
package/lib/index.d.ts
CHANGED
|
@@ -125,6 +125,8 @@ declare module "@smapiot/piral-cloud-node" {
|
|
|
125
125
|
doQueryGeneratorDetails(generatorId: string, ac?: AbortController): Promise<GeneratorDetails>;
|
|
126
126
|
doDeleteGenerator(generatorId: string, ac?: AbortController): Promise<GeneratorResponse>;
|
|
127
127
|
doQueryDashboard(ac?: AbortController): Promise<DashboardResponse>;
|
|
128
|
+
doQueryDashboardFeeds(offset?: string, count?: string, ac?: AbortController): Promise<DashboardFeedsResponse>;
|
|
129
|
+
doSendNotification(details: SendNotificationDetails, ac?: AbortController): Promise<unknown>;
|
|
128
130
|
doQueryIssues(ac?: AbortController): Promise<IssueDTO>;
|
|
129
131
|
doCreateIssue(details: CreateIssueDetails, ac?: AbortController): Promise<CreateIssueResponse>;
|
|
130
132
|
}
|
|
@@ -781,6 +783,15 @@ declare module "@smapiot/piral-cloud-node" {
|
|
|
781
783
|
|
|
782
784
|
export interface DashboardResponse extends ApiData<RecentChange> {}
|
|
783
785
|
|
|
786
|
+
export interface DashboardFeedsResponse extends ApiData<DashboardFeed> {}
|
|
787
|
+
|
|
788
|
+
export interface SendNotificationDetails {
|
|
789
|
+
subject: string;
|
|
790
|
+
content: string;
|
|
791
|
+
recipients: Array<string>;
|
|
792
|
+
severity?: "info" | "critical" | "high" | "medium" | "low";
|
|
793
|
+
}
|
|
794
|
+
|
|
784
795
|
export interface IssueDTO extends ApiData<NotificationItem> {}
|
|
785
796
|
|
|
786
797
|
export interface CreateIssueDetails {
|
|
@@ -1002,6 +1013,19 @@ declare module "@smapiot/piral-cloud-node" {
|
|
|
1002
1013
|
value: any;
|
|
1003
1014
|
}
|
|
1004
1015
|
|
|
1016
|
+
export interface DashboardFeed {
|
|
1017
|
+
id: string;
|
|
1018
|
+
name: string;
|
|
1019
|
+
account: string;
|
|
1020
|
+
description: string;
|
|
1021
|
+
active: boolean;
|
|
1022
|
+
deleted: boolean;
|
|
1023
|
+
integrity: boolean;
|
|
1024
|
+
npmRegistry: boolean;
|
|
1025
|
+
hook: string;
|
|
1026
|
+
hosts: Array<string>;
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1005
1029
|
export interface NotificationItem {}
|
|
1006
1030
|
|
|
1007
1031
|
export interface BaseFeedDTO {
|
package/lib/index.esm.js
CHANGED
|
@@ -5318,6 +5318,13 @@ var FeedServiceApiClient = class {
|
|
|
5318
5318
|
doQueryDashboard(ac = mac()) {
|
|
5319
5319
|
return this.doGet("dashboard", mri(ac));
|
|
5320
5320
|
}
|
|
5321
|
+
doQueryDashboardFeeds(offset = "", count = "40", ac = mac()) {
|
|
5322
|
+
const queryString = makeQueryString({ offset, count });
|
|
5323
|
+
return this.doGet(`dashboard/feeds?${queryString}`, mri(ac));
|
|
5324
|
+
}
|
|
5325
|
+
doSendNotification(details, ac = mac()) {
|
|
5326
|
+
return this.doPost(`dashboard/notifications`, details, mri(ac));
|
|
5327
|
+
}
|
|
5321
5328
|
doQueryIssues(ac = mac()) {
|
|
5322
5329
|
return this.doGet("issue", mri(ac));
|
|
5323
5330
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smapiot/piral-cloud-node",
|
|
3
|
-
"version": "1.13.2",
|
|
3
|
+
"version": "1.13.3-pre.20240229.2",
|
|
4
4
|
"description": "Piral Cloud: Node-usable API Client for the Piral Feed Service.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "smapiot",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"node"
|
|
52
52
|
],
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@piral/feed-client": "^1.13.
|
|
54
|
+
"@piral/feed-client": "^1.13.3",
|
|
55
55
|
"dets": "^0.14.1",
|
|
56
56
|
"esbuild": "^0.14.27",
|
|
57
57
|
"node-fetch": "^3.3.2"
|