@crowdin/crowdin-apps-functions
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -75,2 +75,3 @@ import Crowdin, { SourceFilesModel, TranslationsModel } from '@crowdin/crowdin-api-client'; | ||
subscribeLink: string; | ||
initializedAt: string; | ||
constructor(subscribeLink: string); | ||
@@ -77,0 +78,0 @@ } |
@@ -161,2 +161,4 @@ "use strict"; | ||
this.subscribeLink = subscribeLink; | ||
this.initializedAt = initializedAt; | ||
this.code = 402; | ||
} | ||
@@ -172,3 +174,3 @@ } | ||
function getSubscription({ appIdentifier, token, organization, }) { | ||
var _a, _b, _c; | ||
var _a, _b, _c, _d; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
@@ -189,5 +191,5 @@ const url = !!organization | ||
if (e.response.status === 402) { | ||
throw new PaymentRequiredError((_a = e.response.data) === null || _a === void 0 ? void 0 : _a.subscribe_link); | ||
throw new PaymentRequiredError((_a = e.response.data) === null || _a === void 0 ? void 0 : _a.subscribeLink, (_b = e.response.data) === null || _b === void 0 ? void 0 : _b.initializedAt); | ||
} | ||
else if ((_c = (_b = e.response.data) === null || _b === void 0 ? void 0 : _b.error) === null || _c === void 0 ? void 0 : _c.message) { | ||
else if ((_d = (_c = e.response.data) === null || _c === void 0 ? void 0 : _c.error) === null || _d === void 0 ? void 0 : _d.message) { | ||
throw new Error(e.response.data.error.message); | ||
@@ -194,0 +196,0 @@ } |
{ | ||
"name": "@crowdin/crowdin-apps-functions", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Utility library to easily and quickly develop Crowdin App", | ||
@@ -5,0 +5,0 @@ "main": "out/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
40689
492