@smapiot/piral-cloud-browser 1.18.0-pre.20251119.1 → 1.18.0-pre.20251201.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 +29 -0
- package/lib/index.js +22 -0
- package/lib/sdk.js +22 -0
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -152,6 +152,10 @@ declare module "@smapiot/piral-cloud-browser" {
|
|
|
152
152
|
doSendNotification(details: SendNotificationDetails, ac?: AbortController): Promise<unknown>;
|
|
153
153
|
doQueryIssues(ac?: AbortController): Promise<IssueDTO>;
|
|
154
154
|
doCreateIssue(details: CreateIssueDetails, ac?: AbortController): Promise<CreateIssueResponse>;
|
|
155
|
+
doQueryInstalledPlugins(q: string, offset?: number, count?: number, ac?: AbortController): Promise<ServicePluginDTO>;
|
|
156
|
+
doQueryMarketplacePlugins(q: string, offset?: number, count?: number, ac?: AbortController): Promise<ServicePluginDTO>;
|
|
157
|
+
doQueryInstalledPluginDetails(id: string, ac?: AbortController): Promise<ServicePluginItem>;
|
|
158
|
+
doInstallPlugin(details: InstallServicePluginDetails, ac?: AbortController): Promise<CreateIssueResponse>;
|
|
155
159
|
}
|
|
156
160
|
|
|
157
161
|
/**
|
|
@@ -309,6 +313,7 @@ declare module "@smapiot/piral-cloud-browser" {
|
|
|
309
313
|
description: string;
|
|
310
314
|
source: string;
|
|
311
315
|
trigger: EnvironmentTriggerType;
|
|
316
|
+
prefill?: boolean;
|
|
312
317
|
time: number;
|
|
313
318
|
rules: EnvironmentApprovalRules;
|
|
314
319
|
format?: string;
|
|
@@ -978,6 +983,18 @@ declare module "@smapiot/piral-cloud-browser" {
|
|
|
978
983
|
success: boolean;
|
|
979
984
|
}
|
|
980
985
|
|
|
986
|
+
export interface ServicePluginDTO extends ApiData<ServicePluginItem> {}
|
|
987
|
+
|
|
988
|
+
export interface ServicePluginItem {
|
|
989
|
+
id: string;
|
|
990
|
+
name: string;
|
|
991
|
+
version: string;
|
|
992
|
+
description: string;
|
|
993
|
+
author: string;
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
export type InstallServicePluginDetails = InstallServicePluginDirectlyDetails | InstallServicePluginFromMarketplaceDetails;
|
|
997
|
+
|
|
981
998
|
/**
|
|
982
999
|
* The simple API key options for creating a new service client.
|
|
983
1000
|
*/
|
|
@@ -1264,6 +1281,17 @@ declare module "@smapiot/piral-cloud-browser" {
|
|
|
1264
1281
|
|
|
1265
1282
|
export interface NotificationItem {}
|
|
1266
1283
|
|
|
1284
|
+
export interface InstallServicePluginDirectlyDetails {
|
|
1285
|
+
source: "upload";
|
|
1286
|
+
file: string;
|
|
1287
|
+
content: string;
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
export interface InstallServicePluginFromMarketplaceDetails {
|
|
1291
|
+
source: "marketplace";
|
|
1292
|
+
reference: string;
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1267
1295
|
export interface ShortFeedDTO extends BaseFeedDTO {
|
|
1268
1296
|
contributors: undefined;
|
|
1269
1297
|
targetFeeds: undefined;
|
|
@@ -1288,6 +1316,7 @@ declare module "@smapiot/piral-cloud-browser" {
|
|
|
1288
1316
|
environment: boolean;
|
|
1289
1317
|
mapping: Record<string, string>;
|
|
1290
1318
|
fallback: string;
|
|
1319
|
+
noFallback?: boolean;
|
|
1291
1320
|
};
|
|
1292
1321
|
}
|
|
1293
1322
|
|
package/lib/index.js
CHANGED
|
@@ -587,6 +587,28 @@ var FeedServiceApiClient = class {
|
|
|
587
587
|
doCreateIssue(details, ac = mac()) {
|
|
588
588
|
return this.doPost("issue", details, mri(ac));
|
|
589
589
|
}
|
|
590
|
+
doQueryInstalledPlugins(q, offset, count, ac = mac()) {
|
|
591
|
+
const queryString = makeQueryString({
|
|
592
|
+
q,
|
|
593
|
+
offset,
|
|
594
|
+
count
|
|
595
|
+
});
|
|
596
|
+
return this.doGet(`plugins/installed?${queryString}`, mri(ac));
|
|
597
|
+
}
|
|
598
|
+
doQueryMarketplacePlugins(q, offset, count, ac = mac()) {
|
|
599
|
+
const queryString = makeQueryString({
|
|
600
|
+
q,
|
|
601
|
+
offset,
|
|
602
|
+
count
|
|
603
|
+
});
|
|
604
|
+
return this.doGet(`plugins/marketplace?${queryString}`, mri(ac));
|
|
605
|
+
}
|
|
606
|
+
doQueryInstalledPluginDetails(id, ac = mac()) {
|
|
607
|
+
return this.doGet(`plugins/installed/${id}`, mri(ac));
|
|
608
|
+
}
|
|
609
|
+
doInstallPlugin(details, ac = mac()) {
|
|
610
|
+
return this.doPost("plugins/installed", details, mri(ac));
|
|
611
|
+
}
|
|
590
612
|
};
|
|
591
613
|
|
|
592
614
|
// src/utils.ts
|
package/lib/sdk.js
CHANGED
|
@@ -612,6 +612,28 @@ var feedService = (() => {
|
|
|
612
612
|
doCreateIssue(details, ac = mac()) {
|
|
613
613
|
return this.doPost("issue", details, mri(ac));
|
|
614
614
|
}
|
|
615
|
+
doQueryInstalledPlugins(q, offset, count, ac = mac()) {
|
|
616
|
+
const queryString = makeQueryString({
|
|
617
|
+
q,
|
|
618
|
+
offset,
|
|
619
|
+
count
|
|
620
|
+
});
|
|
621
|
+
return this.doGet(`plugins/installed?${queryString}`, mri(ac));
|
|
622
|
+
}
|
|
623
|
+
doQueryMarketplacePlugins(q, offset, count, ac = mac()) {
|
|
624
|
+
const queryString = makeQueryString({
|
|
625
|
+
q,
|
|
626
|
+
offset,
|
|
627
|
+
count
|
|
628
|
+
});
|
|
629
|
+
return this.doGet(`plugins/marketplace?${queryString}`, mri(ac));
|
|
630
|
+
}
|
|
631
|
+
doQueryInstalledPluginDetails(id, ac = mac()) {
|
|
632
|
+
return this.doGet(`plugins/installed/${id}`, mri(ac));
|
|
633
|
+
}
|
|
634
|
+
doInstallPlugin(details, ac = mac()) {
|
|
635
|
+
return this.doPost("plugins/installed", details, mri(ac));
|
|
636
|
+
}
|
|
615
637
|
};
|
|
616
638
|
|
|
617
639
|
// src/utils.ts
|
package/package.json
CHANGED