@smapiot/piral-cloud-node 0.15.0-pre.20230323.2 → 0.15.0-pre.20230331.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 +14 -2
- package/lib/index.js +11 -2
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -23,13 +23,15 @@ declare module "@smapiot/piral-cloud-node" {
|
|
|
23
23
|
getPilets(ac?: AbortController): Promise<Array<PiletMetadataDTO>>;
|
|
24
24
|
doQueryFeeds(ac?: AbortController): Promise<FeedsDTO>;
|
|
25
25
|
doQueryFeed(feed: string, ac?: AbortController): Promise<FeedDTO>;
|
|
26
|
-
doQueryPages(feed: string, ac?: AbortController): Promise<PagesDTO>;
|
|
26
|
+
doQueryPages(feed: string, tag?: string, ac?: AbortController): Promise<PagesDTO>;
|
|
27
|
+
doUpdatePage(feed: string, version: string, content: PageUpdateDetails, tag?: string, ac?: AbortController): Promise<unknown>;
|
|
27
28
|
doPublishPage(feed: string, content: PagePublishDetails, ac?: AbortController): Promise<unknown>;
|
|
28
29
|
doQueryAllPilets(feed: string, tag?: string, view?: "all" | "selected", ac?: AbortController): Promise<SelectedPiletsDTO>;
|
|
29
30
|
doQueryUploadedPilets(feed: string, name: string, offset?: string, count?: string, ac?: AbortController): Promise<UploadedPiletsDTO>;
|
|
30
31
|
doPublishPilet(feed: string, tag: string, file: File, ac?: AbortController): Promise<unknown>;
|
|
31
32
|
doQueryCurrentPilets(feed: string, ac?: AbortController): Promise<Array<PiletMetadataDTO>>;
|
|
32
33
|
doQueryPiletDetails(feed: string, pilet: string, ac?: AbortController): Promise<PiletDTO>;
|
|
34
|
+
doQueryPiletReadme(feed: string, pilet: string, ac?: AbortController): Promise<PiletReadmeDTO>;
|
|
33
35
|
doQueryFeedExists(feed: string, ac?: AbortController): Promise<FeedCheckDTO>;
|
|
34
36
|
doQueryApiKeyScopes(ac?: AbortController): Promise<ApiKeyScopesDTO>;
|
|
35
37
|
doQueryApiKeys(feed: string, ac?: AbortController): Promise<ApiKeysDTO>;
|
|
@@ -206,12 +208,18 @@ declare module "@smapiot/piral-cloud-node" {
|
|
|
206
208
|
|
|
207
209
|
export interface PagesDTO extends ApiData<PageDTO> {
|
|
208
210
|
feed: string;
|
|
211
|
+
tags: Array<string>;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export interface PageUpdateDetails {
|
|
215
|
+
active: boolean;
|
|
209
216
|
}
|
|
210
217
|
|
|
211
218
|
export interface PagePublishDetails {
|
|
212
219
|
version: string;
|
|
213
220
|
type: "custom" | "none" | "docs" | "siteless";
|
|
214
221
|
embed: "yes" | "no";
|
|
222
|
+
tag?: string;
|
|
215
223
|
options?: any;
|
|
216
224
|
files?: Array<[string, Blob]>;
|
|
217
225
|
}
|
|
@@ -240,6 +248,10 @@ declare module "@smapiot/piral-cloud-node" {
|
|
|
240
248
|
canDelete: boolean;
|
|
241
249
|
}
|
|
242
250
|
|
|
251
|
+
export interface PiletReadmeDTO {
|
|
252
|
+
content: string;
|
|
253
|
+
}
|
|
254
|
+
|
|
243
255
|
export interface FeedCheckDTO {
|
|
244
256
|
exists: boolean;
|
|
245
257
|
restore?: boolean;
|
|
@@ -737,7 +749,7 @@ declare module "@smapiot/piral-cloud-node" {
|
|
|
737
749
|
continuation: string;
|
|
738
750
|
}
|
|
739
751
|
|
|
740
|
-
export type PiletType = "v0" | "v1" | "v2" | "oc" | "sspa" | "wmf" | "nf";
|
|
752
|
+
export type PiletType = "v0" | "v1" | "v2" | "oc" | "sspa" | "wmf" | "nf" | "esm" | "json" | "yaml";
|
|
741
753
|
|
|
742
754
|
export interface ApiKeyDTO {
|
|
743
755
|
id: string;
|
package/lib/index.js
CHANGED
|
@@ -4500,8 +4500,11 @@ var FeedServiceApiClient = class {
|
|
|
4500
4500
|
doQueryFeed(feed, ac = mac()) {
|
|
4501
4501
|
return this.doGet(`feed/${feed}`, mri(ac));
|
|
4502
4502
|
}
|
|
4503
|
-
doQueryPages(feed, ac = mac()) {
|
|
4504
|
-
return this.doGet(`feed/${feed}/page`, mri(ac));
|
|
4503
|
+
doQueryPages(feed, tag = "latest", ac = mac()) {
|
|
4504
|
+
return this.doGet(`feed/${feed}/page?tag=${tag}`, mri(ac));
|
|
4505
|
+
}
|
|
4506
|
+
doUpdatePage(feed, version, content, tag = "latest", ac = mac()) {
|
|
4507
|
+
return this.doPut(`feed/${feed}/page/${version}?tag=${tag}`, content, mri(ac));
|
|
4505
4508
|
}
|
|
4506
4509
|
doPublishPage(feed, content, ac = mac()) {
|
|
4507
4510
|
const { FormData: FormData2 } = this.http;
|
|
@@ -4509,6 +4512,9 @@ var FeedServiceApiClient = class {
|
|
|
4509
4512
|
form.append("version", content.version);
|
|
4510
4513
|
form.append("type", content.type);
|
|
4511
4514
|
form.append("embed", content.embed);
|
|
4515
|
+
if (content.tag) {
|
|
4516
|
+
form.append("tag", content.tag);
|
|
4517
|
+
}
|
|
4512
4518
|
if (content.options) {
|
|
4513
4519
|
form.append("options", JSON.stringify(content.options));
|
|
4514
4520
|
}
|
|
@@ -4540,6 +4546,9 @@ var FeedServiceApiClient = class {
|
|
|
4540
4546
|
doQueryPiletDetails(feed, pilet, ac = mac()) {
|
|
4541
4547
|
return this.doGet(`feed/${feed}/pilets/${pilet}`, mri(ac));
|
|
4542
4548
|
}
|
|
4549
|
+
doQueryPiletReadme(feed, pilet, ac = mac()) {
|
|
4550
|
+
return this.doGet(`feed/${feed}/pilets/${pilet}/readme`, mri(ac));
|
|
4551
|
+
}
|
|
4543
4552
|
doQueryFeedExists(feed, ac = mac()) {
|
|
4544
4553
|
return this.doGet(`feed/${feed}/check`, mri(ac));
|
|
4545
4554
|
}
|