@smapiot/piral-cloud-browser 0.14.1 → 0.14.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
@@ -103,6 +103,7 @@ declare module "@smapiot/piral-cloud-browser" {
103
103
  doQueryNpmPackage(feed: string, name: string, ac?: AbortController): Promise<NpmPackageDTO>;
104
104
  doUploadNpmPackage(feed: string, name: string, body: any, ac?: AbortController): Promise<void>;
105
105
  doDownloadFile(fileUrl: string, ac?: AbortController): Promise<Blob>;
106
+ doGetLicenseInfo(ac?: AbortController): Promise<LicenseInfo>;
106
107
  }
107
108
 
108
109
  /**
@@ -616,6 +617,17 @@ declare module "@smapiot/piral-cloud-browser" {
616
617
  }>;
617
618
  }
618
619
 
620
+ export interface LicenseInfo {
621
+ /**
622
+ * The reference name identifying the licensee.
623
+ */
624
+ customer: string;
625
+ /**
626
+ * The expiration date of the license provided as an ISO-datetime string.
627
+ */
628
+ expires: string;
629
+ }
630
+
619
631
  /**
620
632
  * The simple API key options for creating a new service client.
621
633
  */
package/lib/index.js CHANGED
@@ -127,9 +127,7 @@ var FeedServiceApiClient = class {
127
127
  return this.doPost(`pilet/${feed}`, form, mri(ac));
128
128
  }
129
129
  doQueryCurrentPilets(feed, ac = mac()) {
130
- return this.doGet(`pilet/${feed}`, mri(ac)).then(
131
- (res) => res.items
132
- );
130
+ return this.doGet(`pilet/${feed}`, mri(ac)).then((res) => res.items);
133
131
  }
134
132
  doQueryPiletDetails(feed, pilet, ac = mac()) {
135
133
  return this.doGet(`feed/${feed}/pilets/${pilet}`, mri(ac));
@@ -359,11 +357,7 @@ var FeedServiceApiClient = class {
359
357
  return this.doGet(`feed/${feed}/analysis`, mri(ac));
360
358
  }
361
359
  doRecheckDomains(feed, domains, ac = mac()) {
362
- return this.doPut(
363
- `feed/${feed}/domains`,
364
- { domains },
365
- mri(ac)
366
- );
360
+ return this.doPut(`feed/${feed}/domains`, { domains }, mri(ac));
367
361
  }
368
362
  doQueryFeedStatistics(feed, from, to, ac = mac()) {
369
363
  const queryString = makeQueryString({ from, to });
@@ -389,6 +383,9 @@ var FeedServiceApiClient = class {
389
383
  doDownloadFile(fileUrl, ac = mac()) {
390
384
  return fetchWithToken(this.http, fileUrl, mri(ac)).then((res) => res.blob());
391
385
  }
386
+ doGetLicenseInfo(ac = mac()) {
387
+ return this.doGet("license", mri(ac));
388
+ }
392
389
  };
393
390
 
394
391
  // src/utils.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smapiot/piral-cloud-browser",
3
- "version": "0.14.1",
3
+ "version": "0.14.2",
4
4
  "description": "Piral Cloud: Browser-usable API Client for the Piral Feed Service.",
5
5
  "author": {
6
6
  "name": "smapiot",
@@ -40,7 +40,7 @@
40
40
  "browser"
41
41
  ],
42
42
  "devDependencies": {
43
- "@piral/feed-client": "^0.14.1",
43
+ "@piral/feed-client": "^0.14.2",
44
44
  "dets": "^0.12.0",
45
45
  "esbuild": "^0.14.51"
46
46
  }