@freemius/sdk 0.1.0 → 0.2.0
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/dist/index.d.mts +110 -169
- package/dist/index.d.mts.map +1 -1
- package/dist/index.d.ts +110 -169
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -1
- package/dist/index.mjs +17 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -169,7 +169,7 @@ var WebhookError = class extends Error {
|
|
|
169
169
|
|
|
170
170
|
//#endregion
|
|
171
171
|
//#region package.json
|
|
172
|
-
var version = "0.
|
|
172
|
+
var version = "0.2.0";
|
|
173
173
|
|
|
174
174
|
//#endregion
|
|
175
175
|
//#region src/api/client.ts
|
|
@@ -480,6 +480,22 @@ var User = class extends ApiBase {
|
|
|
480
480
|
if (!this.isGoodResponse(response.response) || !response.data || !response.data) return null;
|
|
481
481
|
return response.data;
|
|
482
482
|
}
|
|
483
|
+
async retrieveHostedCustomerPortal(userId) {
|
|
484
|
+
const response = await this.client.POST(`/products/{product_id}/portal/login.json`, {
|
|
485
|
+
params: { path: { product_id: this.productId } },
|
|
486
|
+
body: { id: idToString(userId) }
|
|
487
|
+
});
|
|
488
|
+
if (!this.isGoodResponse(response.response) || !response.data) return null;
|
|
489
|
+
return response.data;
|
|
490
|
+
}
|
|
491
|
+
async retrieveHostedCustomerPortalByEmail(email) {
|
|
492
|
+
const response = await this.client.POST(`/products/{product_id}/portal/login.json`, {
|
|
493
|
+
params: { path: { product_id: this.productId } },
|
|
494
|
+
body: { email }
|
|
495
|
+
});
|
|
496
|
+
if (!this.isGoodResponse(response.response) || !response.data) return null;
|
|
497
|
+
return response.data;
|
|
498
|
+
}
|
|
483
499
|
};
|
|
484
500
|
|
|
485
501
|
//#endregion
|
package/dist/index.mjs
CHANGED
|
@@ -147,7 +147,7 @@ var WebhookError = class extends Error {
|
|
|
147
147
|
|
|
148
148
|
//#endregion
|
|
149
149
|
//#region package.json
|
|
150
|
-
var version = "0.
|
|
150
|
+
var version = "0.2.0";
|
|
151
151
|
|
|
152
152
|
//#endregion
|
|
153
153
|
//#region src/api/client.ts
|
|
@@ -458,6 +458,22 @@ var User = class extends ApiBase {
|
|
|
458
458
|
if (!this.isGoodResponse(response.response) || !response.data || !response.data) return null;
|
|
459
459
|
return response.data;
|
|
460
460
|
}
|
|
461
|
+
async retrieveHostedCustomerPortal(userId) {
|
|
462
|
+
const response = await this.client.POST(`/products/{product_id}/portal/login.json`, {
|
|
463
|
+
params: { path: { product_id: this.productId } },
|
|
464
|
+
body: { id: idToString(userId) }
|
|
465
|
+
});
|
|
466
|
+
if (!this.isGoodResponse(response.response) || !response.data) return null;
|
|
467
|
+
return response.data;
|
|
468
|
+
}
|
|
469
|
+
async retrieveHostedCustomerPortalByEmail(email) {
|
|
470
|
+
const response = await this.client.POST(`/products/{product_id}/portal/login.json`, {
|
|
471
|
+
params: { path: { product_id: this.productId } },
|
|
472
|
+
body: { email }
|
|
473
|
+
});
|
|
474
|
+
if (!this.isGoodResponse(response.response) || !response.data) return null;
|
|
475
|
+
return response.data;
|
|
476
|
+
}
|
|
461
477
|
};
|
|
462
478
|
|
|
463
479
|
//#endregion
|