@licensespring/node-sdk 1.1.18 → 1.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.
Files changed (66) hide show
  1. package/License.key +1 -0
  2. package/dist/package.json +16 -9
  3. package/dist/src/abstract-manager.d.ts +42 -15
  4. package/dist/src/abstract-manager.js +248 -22
  5. package/dist/src/abstract-manager.js.map +1 -1
  6. package/dist/src/api.d.ts +25 -4978
  7. package/dist/src/api.js +1596 -4511
  8. package/dist/src/api.js.map +1 -1
  9. package/dist/src/bundle-file.d.ts +11 -0
  10. package/dist/src/bundle-file.js +110 -0
  11. package/dist/src/bundle-file.js.map +1 -0
  12. package/dist/src/bundle-manager.d.ts +17 -0
  13. package/dist/src/bundle-manager.js +252 -0
  14. package/dist/src/bundle-manager.js.map +1 -0
  15. package/dist/src/common.d.ts +1 -0
  16. package/dist/src/common.js +5 -1
  17. package/dist/src/common.js.map +1 -1
  18. package/dist/src/index.d.ts +2 -1
  19. package/dist/src/index.js +3 -1
  20. package/dist/src/index.js.map +1 -1
  21. package/dist/src/license-data.d.ts +13 -7
  22. package/dist/src/license-data.js +66 -71
  23. package/dist/src/license-data.js.map +1 -1
  24. package/dist/src/license-file.d.ts +8 -19
  25. package/dist/src/license-file.js +38 -315
  26. package/dist/src/license-file.js.map +1 -1
  27. package/dist/src/license-manager.d.ts +23 -32
  28. package/dist/src/license-manager.js +213 -313
  29. package/dist/src/license-manager.js.map +1 -1
  30. package/dist/src/license.d.ts +16 -15
  31. package/dist/src/license.js +145 -142
  32. package/dist/src/license.js.map +1 -1
  33. package/dist/src/logger.d.ts +1 -0
  34. package/dist/src/logger.js +28 -5
  35. package/dist/src/logger.js.map +1 -1
  36. package/dist/src/offline-activation.d.ts +2 -1
  37. package/dist/src/offline-activation.js.map +1 -1
  38. package/dist/src/response-types.d.ts +489 -0
  39. package/dist/src/response-types.js +12 -0
  40. package/dist/src/response-types.js.map +1 -0
  41. package/dist/src/schema.d.ts +4 -2
  42. package/dist/src/schema.js +6 -2
  43. package/dist/src/schema.js.map +1 -1
  44. package/dist/src/storage-file.d.ts +24 -0
  45. package/dist/src/storage-file.js +354 -0
  46. package/dist/src/storage-file.js.map +1 -0
  47. package/dist/src/test/api-response-mock.d.ts +1435 -0
  48. package/dist/src/test/api-response-mock.js +1966 -0
  49. package/dist/src/test/api-response-mock.js.map +1 -0
  50. package/dist/src/test/api.test.d.ts +1 -0
  51. package/dist/src/test/api.test.js +228 -0
  52. package/dist/src/test/api.test.js.map +1 -0
  53. package/dist/src/test/bundle-manager.test.d.ts +0 -0
  54. package/dist/src/test/bundle-manager.test.js +15 -0
  55. package/dist/src/test/bundle-manager.test.js.map +1 -0
  56. package/dist/src/test/jest.setup.d.ts +1 -0
  57. package/dist/src/test/jest.setup.js +17 -0
  58. package/dist/src/test/jest.setup.js.map +1 -0
  59. package/dist/src/test/license-manager.test.d.ts +1 -0
  60. package/dist/src/test/license-manager.test.js +1011 -0
  61. package/dist/src/test/license-manager.test.js.map +1 -0
  62. package/dist/src/types.d.ts +35 -219
  63. package/dist/src/types.js.map +1 -1
  64. package/dist/src/watchdog.js +1 -1
  65. package/dist/src/watchdog.js.map +1 -1
  66. package/package.json +16 -9
package/License.key ADDED
@@ -0,0 +1 @@
1
+ MrTriS2kZMsRjwvj4xVjTg==iqr91/QREgPNLd4awQzm9iIZY/zj3GBKyjvyRYPMtloFUmi0x2fy7iOf5JpGF+xlzXOebrAVnvnOpAcGJuOK7j6gu2odtu+ubhYlX9Ygtt6/SYfhDf11khAD14oXeqQXLlVe/8MIGtyrrXBVxZWq35cBuU044gw6DxC+z1itumRESetanozRZ6nJY4OdOnNe8/DLSqTZ0XUQo/cNqis97ofaDdvZ23gI8vCCI9/8PADwHlslX8EuqoAqwBP7gzecGZo+otJ0CjUhRMJXDRgvJpd17JTG3GO6AgR4NFFjhWNKsvw7tQJlBhLtDlfvPv1zJsiFKupIVivrLDTCw2SQBIOoQC/nm1+aRdi4Y0LVIY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dHk+e8/2a18XgY1JJrSY2E1e+MTBI8NPqICmICh3XDEi5ahr61DZadR1vO0HHIVz1p4kkln89R7zXDUSTLpf+yuz8LRes3j4EZ9b7S51M4w7q69INcGhbG5EMAZ09vElxqD0kNJQs/IGTLM19F3o/M0/cvwTdlBzulrNecWoPFU2WIwo92DU664x93ee1tW6cfICZErkpXYZUqw9cI1RgvkgQMn0E4ClVXRL9rFg5qRdtlPqwp8T+ha7O0xI9Onf07RIhaFFoMGrasHPn/5IxFkTGp5udcHNUKTkNOO4o8lebiFG9ul5lfOg5MljMfrlE/ujXqK6bAqWVJ1fBuF4zNKPHFCVdf6C5YyVzvXcKSulZQ7o1bS3vBC2RyE/pTvpDPlYxH92hz6dAJcCTcmQ6OGG95soiq4SoUQSzTKr7I458BuAkdcP01cC5aw42d1iZC6+WIBgEeS013Ue425hrwVW7zgmeVxKhrPe/dsOnCVgXRUJu1cXjDOzrA5iz8oNodrmdWC+BEpxvZAhmVh52kg/DkJY6/deazrmLzjed4CwWeb+9W0vvTtDKMnOU=
package/dist/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@licensespring/node-sdk",
3
- "version": "1.1.18",
3
+ "version": "1.2.0",
4
4
  "main": "dist/src/index.js",
5
5
  "modules": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
7
7
  "scripts": {
8
- "build": "NODE_ENV=dev npm i && NODE_ENV=dev node ./hwid/install.js && NODE_ENV=dev npx eslint . && NODE_ENV=dev npx jest --passWithNoTests && NODE_ENV=test npx tsc && cpx .env.prod dist && cpx \"hwid/hardware_id_generator/**/*\" dist/hwid/hardware_id_generator",
8
+ "build": "NODE_ENV=dev npm i && NODE_ENV=dev node ./hwid/install.js && NODE_ENV=dev npx eslint . && NODE_ENV=dev npx jest && NODE_ENV=test npx tsc && cpx .env.prod dist && cpx \"hwid/hardware_id_generator/**/*\" dist/hwid/hardware_id_generator",
9
9
  "test": "NODE_ENV=dev npx jest",
10
10
  "prepare": "ts-patch install && typia patch",
11
11
  "dev-test": "NODE_ENV=dev npx ts-node index.ts"
@@ -17,19 +17,26 @@
17
17
  "license": "ISC",
18
18
  "description": "",
19
19
  "devDependencies": {
20
+ "@deboxsoft/cpx": "^1.5.0",
20
21
  "@eslint/js": "^9.11.1",
21
22
  "@types/elliptic": "^6.4.18",
22
23
  "@types/eslint__js": "^8.42.3",
23
- "@types/jest": "^29.5.13",
24
- "@deboxsoft/cpx": "^1.5.0",
25
- "eslint": "^9.11.1",
26
- "jest": "^29.7.0",
27
- "json-schema-to-ts": "^3.1.1",
28
- "ts-jest": "^29.2.5",
29
24
  "ts-patch": "^3.2.1",
30
25
  "typedoc": "^0.27.4",
31
26
  "typescript": "^5.6.2",
32
- "typescript-eslint": "^8.7.0"
27
+ "typescript-eslint": "^8.7.0",
28
+ "@types/jest": "^29.5.14",
29
+ "babel-jest": "^29.7.0",
30
+ "eslint": "^9.21.0",
31
+ "eslint-plugin-jest": "^28.11.0",
32
+ "eslint-plugin-unicorn": "^57.0.0",
33
+ "jest": "^29.7.0",
34
+ "jest-esm-transformer": "^1.0.0",
35
+ "jest-extended": "^4.0.2",
36
+ "jest-junit": "^16.0.0",
37
+ "jest-mock-extended": "^4.0.0-beta1",
38
+ "json-schema-to-ts": "^3.1.1",
39
+ "ts-jest": "^29.3.4"
33
40
  },
34
41
  "dependencies": {
35
42
  "axios": "^1.7.7",
@@ -1,24 +1,51 @@
1
- import LicenseAPI from './api';
2
- import { HardwareIdAlgorithm, LicensespringConfigDef, LogLevel } from './types';
3
- import LicenseFile from './license-file';
4
- import License from './license';
5
- import FloatingAPI from './floating';
6
- import { Watchdog } from './watchdog';
7
1
  import { AxiosProxyConfig } from 'axios';
8
- export default class AbstractManager {
9
- protected config: LicensespringConfigDef;
2
+ import { changePassword, installationFile, ssoUrl, versions } from './schema';
3
+ import { DateISO8601UTC, HardwareIdAlgorithm, LicensespringConfig, LicensespringConfigDef, LogLevel, CreateOfflineActivationRequestPayload, CreateOfflineDeactivationRequestPayload, Managed } from './types';
4
+ import { FromSchema } from 'json-schema-to-ts';
5
+ import { Watchdog } from './watchdog';
6
+ import FloatingAPI from './floating';
7
+ import LicenseAPI from './api';
8
+ import StorageFile from './storage-file';
9
+ export declare abstract class AbstractManager {
10
10
  protected hardwareIDMethod: number;
11
- protected licenseAPI: LicenseAPI;
12
- protected floatingAPI: FloatingAPI;
13
- protected licenseFile: LicenseFile;
14
- watchdog: Watchdog;
11
+ protected readonly licenseAPI: LicenseAPI;
12
+ protected readonly floatingAPI: FloatingAPI;
13
+ watchdog: Watchdog | undefined;
14
+ protected config: LicensespringConfig;
15
+ protected abstract licenseFile: StorageFile;
15
16
  constructor(config: LicensespringConfigDef, hardwareIDMethod?: number);
16
17
  setLogLevel(level: LogLevel): void;
17
18
  setProxy(proxy: AxiosProxyConfig | null): void;
18
19
  getHardwareID(algorithm?: HardwareIdAlgorithm): string;
19
- loadLicense(): License;
20
+ get dataLocation(): string;
21
+ get licenseFileName(): string;
20
22
  isLicenseFileCorrupted(): boolean;
21
23
  clearLocalStorage(): void;
22
- get dataLocation(): string | undefined;
23
- get licenseFileName(): string | undefined;
24
+ checkLicenseStatus(license: {
25
+ license_active: boolean;
26
+ license_enabled: boolean;
27
+ validity_period: DateISO8601UTC | null;
28
+ }): void;
29
+ isValid(license: {
30
+ license_active: boolean;
31
+ license_enabled: boolean;
32
+ validity_period: DateISO8601UTC | null;
33
+ }): boolean;
34
+ maintenanceDaysRemaining(license: {
35
+ enable_maintenance_period: boolean;
36
+ maintenance_period: string | null;
37
+ }): number | null;
38
+ daysRemaining(license: {
39
+ grace_period: number;
40
+ validity_period: DateISO8601UTC | null;
41
+ }): number | undefined;
42
+ changePassword(payload: FromSchema<(typeof changePassword)['body']>): Promise<boolean>;
43
+ getVersions(payload: Managed<FromSchema<(typeof versions)['querystring']>>): Promise<import("./response-types").VersionsResponse>;
44
+ getInstallationFile(payload: Managed<FromSchema<(typeof installationFile)['querystring']>>): Promise<import("./response-types").InstallationFileResponse>;
45
+ getSSOUrl(payload: FromSchema<(typeof ssoUrl)['querystring']>): Promise<import("./response-types").SSOUrlResponse>;
46
+ getAirGapActivationCode(initializationCode: string, licenseKey: string): string;
47
+ createOfflineActivationPayload(payload: Managed<CreateOfflineActivationRequestPayload>): string;
48
+ createOfflineDeactivationPayload(payload: Managed<CreateOfflineDeactivationRequestPayload>): string;
49
+ decodeOfflineActivationPayload(payload: string): any;
50
+ decodeOfflineDeactivationPayload(payload: string): any;
24
51
  }
@@ -22,31 +22,43 @@ var __importStar = (this && this.__importStar) || function (mod) {
22
22
  __setModuleDefault(result, mod);
23
23
  return result;
24
24
  };
25
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
+ return new (P || (P = Promise))(function (resolve, reject) {
28
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
32
+ });
33
+ };
25
34
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
35
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
36
  };
28
37
  Object.defineProperty(exports, "__esModule", { value: true });
38
+ exports.AbstractManager = void 0;
39
+ const dotenv = __importStar(require("dotenv"));
40
+ const dayjs_1 = __importDefault(require("dayjs"));
41
+ const floating_1 = __importDefault(require("./floating"));
42
+ const isSameOrAfter_js_1 = __importDefault(require("dayjs/plugin/isSameOrAfter.js"));
29
43
  const api_1 = __importDefault(require("./api"));
44
+ const version_1 = __importDefault(require("./version"));
30
45
  const typia_1 = __importDefault(require("typia"));
31
- const dotenv = __importStar(require("dotenv"));
46
+ const utc_js_1 = __importDefault(require("dayjs/plugin/utc.js"));
47
+ dayjs_1.default.extend(utc_js_1.default);
48
+ dayjs_1.default.extend(isSameOrAfter_js_1.default);
32
49
  try {
33
- dotenv.config({ path: `./.env${!!process.env.NODE_ENV ? '.' + process.env.NODE_ENV : ''}` });
50
+ dotenv.config({ path: `../.env${!!process.env.NODE_ENV ? '.' + process.env.NODE_ENV : ''}` });
34
51
  }
35
52
  catch (e) {
36
53
  console.warn('Configuration Warning: env file not found, skipping.');
37
54
  }
38
- const license_file_1 = __importDefault(require("./license-file"));
39
- const license_1 = __importDefault(require("./license"));
40
- const version_1 = __importDefault(require("./version"));
41
- const floating_1 = __importDefault(require("./floating"));
42
- const watchdog_1 = require("./watchdog");
43
55
  class AbstractManager {
44
56
  constructor(config, hardwareIDMethod = 0) {
45
57
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
46
- this.config = config;
47
58
  this.hardwareIDMethod = hardwareIDMethod;
59
+ this.watchdog = undefined;
48
60
  const _config = Object.assign(Object.assign({}, config), { apiPath: (_a = config.apiPath) !== null && _a !== void 0 ? _a : process.env.API_PATH, publicKey: (_b = config.publicKey) !== null && _b !== void 0 ? _b : process.env.PUBLIC_KEY, filename: (_c = config.filename) !== null && _c !== void 0 ? _c : process.env.FILENAME, filePath: (_d = config.filePath) !== null && _d !== void 0 ? _d : process.env.FILE_PATH, gracePeriod: (_e = config.gracePeriod) !== null && _e !== void 0 ? _e : 24, fileKey: (_f = config.fileKey) !== null && _f !== void 0 ? _f : process.env.LICENSE_FILE_KEY, isGuardFileEnabled: (_h = (_g = config.isGuardFileEnabled) !== null && _g !== void 0 ? _g : !!process.env.GUARD_FILE_ENABLED) !== null && _h !== void 0 ? _h : false, hardwareIDMethod: (_j = hardwareIDMethod !== null && hardwareIDMethod !== void 0 ? hardwareIDMethod : config.hardwareIDMethod) !== null && _j !== void 0 ? _j : 0, sdkVersion: version_1.default, proxy: config.proxy });
49
- (() => { const $guard = typia_1.default.assert.guard; const $io0 = input => "string" === typeof input.apiKey && "string" === typeof input.sharedKey && "string" === typeof input.apiPath && "string" === typeof input.publicKey && "string" === typeof input.productCode && "string" === typeof input.appName && "string" === typeof input.appVersion && "string" === typeof input.filePath && "string" === typeof input.filename && "number" === typeof input.gracePeriod && "string" === typeof input.fileKey && (undefined === input.airGapKey || "string" === typeof input.airGapKey) && "boolean" === typeof input.isGuardFileEnabled && "number" === typeof input.hardwareIDMethod && "string" === typeof input.sdkVersion && (undefined === input.proxy || "object" === typeof input.proxy && null !== input.proxy && $io1(input.proxy)) && (undefined === input.logLevel || "error" === input.logLevel || "off" === input.logLevel || "debug" === input.logLevel || "info" === input.logLevel || "warn" === input.logLevel); const $io1 = input => "string" === typeof input.host && "number" === typeof input.port && (undefined === input.auth || "object" === typeof input.auth && null !== input.auth && $io2(input.auth)) && (undefined === input.protocol || "string" === typeof input.protocol); const $io2 = input => "string" === typeof input.username && "string" === typeof input.password; const $io3 = input => "string" === typeof input.clientID && "string" === typeof input.clientSecret && "string" === typeof input.tokenUrl && "string" === typeof input.apiPath && "string" === typeof input.publicKey && "string" === typeof input.productCode && "string" === typeof input.appName && "string" === typeof input.appVersion && "string" === typeof input.filePath && "string" === typeof input.filename && "number" === typeof input.gracePeriod && "string" === typeof input.fileKey && (undefined === input.airGapKey || "string" === typeof input.airGapKey) && "boolean" === typeof input.isGuardFileEnabled && "number" === typeof input.hardwareIDMethod && "string" === typeof input.sdkVersion && (undefined === input.proxy || "object" === typeof input.proxy && null !== input.proxy && $io1(input.proxy)) && (undefined === input.logLevel || "error" === input.logLevel || "off" === input.logLevel || "debug" === input.logLevel || "info" === input.logLevel || "warn" === input.logLevel); const $iu0 = input => (() => {
61
+ (() => { const $guard = typia_1.default.assert.guard; const $io0 = input => "string" === typeof input.apiKey && "string" === typeof input.sharedKey && "string" === typeof input.apiPath && "string" === typeof input.publicKey && "string" === typeof input.productCode && "string" === typeof input.appName && "string" === typeof input.appVersion && "string" === typeof input.filePath && "string" === typeof input.filename && "number" === typeof input.gracePeriod && "string" === typeof input.fileKey && (undefined === input.airGapKey || "string" === typeof input.airGapKey) && "boolean" === typeof input.isGuardFileEnabled && "number" === typeof input.hardwareIDMethod && "string" === typeof input.sdkVersion && (undefined === input.proxy || "object" === typeof input.proxy && null !== input.proxy && $io1(input.proxy)) && (undefined === input.logLevel || "debug" === input.logLevel || "info" === input.logLevel || "warn" === input.logLevel || "error" === input.logLevel || "off" === input.logLevel); const $io1 = input => "string" === typeof input.host && "number" === typeof input.port && (undefined === input.auth || "object" === typeof input.auth && null !== input.auth && $io2(input.auth)) && (undefined === input.protocol || "string" === typeof input.protocol); const $io2 = input => "string" === typeof input.username && "string" === typeof input.password; const $io3 = input => "string" === typeof input.clientID && "string" === typeof input.clientSecret && "string" === typeof input.tokenUrl && "string" === typeof input.apiPath && "string" === typeof input.publicKey && "string" === typeof input.productCode && "string" === typeof input.appName && "string" === typeof input.appVersion && "string" === typeof input.filePath && "string" === typeof input.filename && "number" === typeof input.gracePeriod && "string" === typeof input.fileKey && (undefined === input.airGapKey || "string" === typeof input.airGapKey) && "boolean" === typeof input.isGuardFileEnabled && "number" === typeof input.hardwareIDMethod && "string" === typeof input.sdkVersion && (undefined === input.proxy || "object" === typeof input.proxy && null !== input.proxy && $io1(input.proxy)) && (undefined === input.logLevel || "debug" === input.logLevel || "info" === input.logLevel || "warn" === input.logLevel || "error" === input.logLevel || "off" === input.logLevel); const $iu0 = input => (() => {
50
62
  if (undefined !== input.apiKey)
51
63
  return $io0(input);
52
64
  else if (undefined !== input.clientID)
@@ -121,7 +133,7 @@ class AbstractManager {
121
133
  path: _path + ".proxy",
122
134
  expected: "(AxiosProxyConfig | undefined)",
123
135
  value: input.proxy
124
- }, _errorFactory)) && (undefined === input.logLevel || "error" === input.logLevel || "off" === input.logLevel || "debug" === input.logLevel || "info" === input.logLevel || "warn" === input.logLevel || $guard(_exceptionable, {
136
+ }, _errorFactory)) && (undefined === input.logLevel || "debug" === input.logLevel || "info" === input.logLevel || "warn" === input.logLevel || "error" === input.logLevel || "off" === input.logLevel || $guard(_exceptionable, {
125
137
  path: _path + ".logLevel",
126
138
  expected: "(\"debug\" | \"error\" | \"info\" | \"off\" | \"warn\" | undefined)",
127
139
  value: input.logLevel
@@ -225,7 +237,7 @@ class AbstractManager {
225
237
  path: _path + ".proxy",
226
238
  expected: "(AxiosProxyConfig | undefined)",
227
239
  value: input.proxy
228
- }, _errorFactory)) && (undefined === input.logLevel || "error" === input.logLevel || "off" === input.logLevel || "debug" === input.logLevel || "info" === input.logLevel || "warn" === input.logLevel || $guard(_exceptionable, {
240
+ }, _errorFactory)) && (undefined === input.logLevel || "debug" === input.logLevel || "info" === input.logLevel || "warn" === input.logLevel || "error" === input.logLevel || "off" === input.logLevel || $guard(_exceptionable, {
229
241
  path: _path + ".logLevel",
230
242
  expected: "(\"debug\" | \"error\" | \"info\" | \"off\" | \"warn\" | undefined)",
231
243
  value: input.logLevel
@@ -266,11 +278,9 @@ class AbstractManager {
266
278
  }
267
279
  return input;
268
280
  }; })()(hardwareIDMethod);
281
+ this.config = _config;
269
282
  this.licenseAPI = new api_1.default(_config);
270
- this.licenseFile = new license_file_1.default(_config, this.licenseAPI.getHardwareID(hardwareIDMethod));
271
283
  this.floatingAPI = new floating_1.default(_config, this.config.productCode);
272
- this.watchdog = new watchdog_1.Watchdog(new license_1.default(this.config.productCode, this.licenseAPI, this.licenseFile, this.floatingAPI));
273
- this.config = _config;
274
284
  this.setLogLevel((_k = config.logLevel) !== null && _k !== void 0 ? _k : 'off');
275
285
  }
276
286
  setLogLevel(level) {
@@ -286,9 +296,11 @@ class AbstractManager {
286
296
  if (algorithm === void 0) { algorithm = (_a = this.config.hardwareIDMethod) !== null && _a !== void 0 ? _a : 0; }
287
297
  return this.licenseAPI.getHardwareID(algorithm);
288
298
  }
289
- loadLicense() {
290
- this.licenseFile.loadLicenseFile();
291
- return new license_1.default(this.config.productCode, this.licenseAPI, this.licenseFile, this.floatingAPI);
299
+ get dataLocation() {
300
+ return this.config.filePath;
301
+ }
302
+ get licenseFileName() {
303
+ return this.config.filename;
292
304
  }
293
305
  isLicenseFileCorrupted() {
294
306
  try {
@@ -302,12 +314,226 @@ class AbstractManager {
302
314
  clearLocalStorage() {
303
315
  this.licenseFile.clearStorage();
304
316
  }
305
- get dataLocation() {
306
- return this.config.filePath;
317
+ checkLicenseStatus(license) {
318
+ if (!license.license_enabled) {
319
+ throw { status: 400, code: 'license_not_enabled', message: 'The license is not enabled' };
320
+ }
321
+ if (!license.license_active) {
322
+ throw { status: 400, code: 'license_not_active', message: 'The license is not active' };
323
+ }
324
+ if (license.validity_period) {
325
+ if ((0, dayjs_1.default)().utc().startOf('day').isSameOrAfter(license.validity_period)) {
326
+ throw { status: 400, code: 'license_expired', message: 'The license is expired' };
327
+ }
328
+ }
307
329
  }
308
- get licenseFileName() {
309
- return this.config.filename;
330
+ isValid(license) {
331
+ if (!license.license_enabled) {
332
+ return false;
333
+ }
334
+ if (!license.license_active) {
335
+ return false;
336
+ }
337
+ if (license.validity_period) {
338
+ if ((0, dayjs_1.default)().utc().startOf('day').isSameOrAfter(license.validity_period)) {
339
+ return false;
340
+ }
341
+ }
342
+ return true;
343
+ }
344
+ maintenanceDaysRemaining(license) {
345
+ if (license.enable_maintenance_period) {
346
+ return (0, dayjs_1.default)(license.maintenance_period).utc().endOf('day').diff((0, dayjs_1.default)().utc().startOf('day'), 'day');
347
+ }
348
+ return null;
349
+ }
350
+ daysRemaining(license) {
351
+ if (license.validity_period) {
352
+ return (0, dayjs_1.default)(license.validity_period).utc().add(license.grace_period || 0, 'hours').endOf('day').diff((0, dayjs_1.default)().utc().startOf('day'), 'day');
353
+ }
354
+ }
355
+ changePassword(payload) {
356
+ return __awaiter(this, void 0, void 0, function* () {
357
+ (() => { const $guard = typia_1.default.assert.guard; const $join = typia_1.default.assert.join; const $io0 = input => "string" === typeof input.username && "string" === typeof input.password && "string" === typeof input.new_password && Object.keys(input).every(key => {
358
+ if (["username", "password", "new_password"].some(prop => key === prop))
359
+ return true;
360
+ const value = input[key];
361
+ if (undefined === value)
362
+ return true;
363
+ return true;
364
+ }); const $ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.username || $guard(_exceptionable, {
365
+ path: _path + ".username",
366
+ expected: "string",
367
+ value: input.username
368
+ }, _errorFactory)) && ("string" === typeof input.password || $guard(_exceptionable, {
369
+ path: _path + ".password",
370
+ expected: "string",
371
+ value: input.password
372
+ }, _errorFactory)) && ("string" === typeof input.new_password || $guard(_exceptionable, {
373
+ path: _path + ".new_password",
374
+ expected: "string",
375
+ value: input.new_password
376
+ }, _errorFactory)) && (false === _exceptionable || Object.keys(input).every(key => {
377
+ if (["username", "password", "new_password"].some(prop => key === prop))
378
+ return true;
379
+ const value = input[key];
380
+ if (undefined === value)
381
+ return true;
382
+ return true;
383
+ })); const __is = input => "object" === typeof input && null !== input && $io0(input); let _errorFactory; return (input, errorFactory) => {
384
+ if (false === __is(input)) {
385
+ _errorFactory = errorFactory;
386
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || $guard(true, {
387
+ path: _path + "",
388
+ expected: "__type",
389
+ value: input
390
+ }, _errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
391
+ path: _path + "",
392
+ expected: "__type",
393
+ value: input
394
+ }, _errorFactory))(input, "$input", true);
395
+ }
396
+ return input;
397
+ }; })()(payload);
398
+ return yield this.licenseAPI.changePassword(payload);
399
+ });
400
+ }
401
+ ;
402
+ getVersions(payload) {
403
+ return __awaiter(this, void 0, void 0, function* () {
404
+ (() => { const $guard = typia_1.default.assert.guard; const $join = typia_1.default.assert.join; const $io0 = input => Object.keys(input).every(key => {
405
+ const value = input[key];
406
+ if (undefined === value)
407
+ return true;
408
+ return true;
409
+ }); const $ao0 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
410
+ const value = input[key];
411
+ if (undefined === value)
412
+ return true;
413
+ return true;
414
+ }); const __is = input => "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input); let _errorFactory; return (input, errorFactory) => {
415
+ if (false === __is(input)) {
416
+ _errorFactory = errorFactory;
417
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
418
+ path: _path + "",
419
+ expected: "Managed<{ [x: string]: unknown; username?: string | undefined; bundle_code?: string | undefined; env?: string | undefined; sdk_ver?: string | undefined; channel?: string | undefined; license_key: string; hardware_id: string; product: string; } | { ...; }>",
420
+ value: input
421
+ }, _errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
422
+ path: _path + "",
423
+ expected: "Managed<{ [x: string]: unknown; username?: string | undefined; bundle_code?: string | undefined; env?: string | undefined; sdk_ver?: string | undefined; channel?: string | undefined; license_key: string; hardware_id: string; product: string; } | { ...; }>",
424
+ value: input
425
+ }, _errorFactory))(input, "$input", true);
426
+ }
427
+ return input;
428
+ }; })()(payload);
429
+ return yield this.licenseAPI.getVersions(Object.assign(Object.assign({}, payload), { product: this.config.productCode, hardware_id: this.getHardwareID() }));
430
+ });
431
+ }
432
+ ;
433
+ getInstallationFile(payload) {
434
+ return __awaiter(this, void 0, void 0, function* () {
435
+ (() => { const $guard = typia_1.default.assert.guard; const $join = typia_1.default.assert.join; const $io0 = input => Object.keys(input).every(key => {
436
+ const value = input[key];
437
+ if (undefined === value)
438
+ return true;
439
+ return true;
440
+ }); const $ao0 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
441
+ const value = input[key];
442
+ if (undefined === value)
443
+ return true;
444
+ return true;
445
+ }); const __is = input => "object" === typeof input && null !== input && false === Array.isArray(input) && $io0(input); let _errorFactory; return (input, errorFactory) => {
446
+ if (false === __is(input)) {
447
+ _errorFactory = errorFactory;
448
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input && false === Array.isArray(input) || $guard(true, {
449
+ path: _path + "",
450
+ expected: "Managed<{ [x: string]: unknown; username?: string | undefined; bundle_code?: string | undefined; env?: string | undefined; sdk_ver?: string | undefined; channel?: string | undefined; version?: string | undefined; license_key: string; hardware_id: string; product: string; } | { ...; }>",
451
+ value: input
452
+ }, _errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
453
+ path: _path + "",
454
+ expected: "Managed<{ [x: string]: unknown; username?: string | undefined; bundle_code?: string | undefined; env?: string | undefined; sdk_ver?: string | undefined; channel?: string | undefined; version?: string | undefined; license_key: string; hardware_id: string; product: string; } | { ...; }>",
455
+ value: input
456
+ }, _errorFactory))(input, "$input", true);
457
+ }
458
+ return input;
459
+ }; })()(payload);
460
+ return yield this.licenseAPI.getInstallationFile(Object.assign(Object.assign({}, payload), { product: this.config.productCode, hardware_id: this.getHardwareID() }));
461
+ });
462
+ }
463
+ ;
464
+ getSSOUrl(payload) {
465
+ return __awaiter(this, void 0, void 0, function* () {
466
+ (() => { const $guard = typia_1.default.assert.guard; const $join = typia_1.default.assert.join; const $io0 = input => (undefined === input.bundle_code || "string" === typeof input.bundle_code) && (undefined === input.response_type || "string" === typeof input.response_type) && "string" === typeof input.product && "string" === typeof input.customer_account_code && Object.keys(input).every(key => {
467
+ if (["bundle_code", "response_type", "product", "customer_account_code"].some(prop => key === prop))
468
+ return true;
469
+ const value = input[key];
470
+ if (undefined === value)
471
+ return true;
472
+ return true;
473
+ }); const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.bundle_code || "string" === typeof input.bundle_code || $guard(_exceptionable, {
474
+ path: _path + ".bundle_code",
475
+ expected: "(string | undefined)",
476
+ value: input.bundle_code
477
+ }, _errorFactory)) && (undefined === input.response_type || "string" === typeof input.response_type || $guard(_exceptionable, {
478
+ path: _path + ".response_type",
479
+ expected: "(string | undefined)",
480
+ value: input.response_type
481
+ }, _errorFactory)) && ("string" === typeof input.product || $guard(_exceptionable, {
482
+ path: _path + ".product",
483
+ expected: "string",
484
+ value: input.product
485
+ }, _errorFactory)) && ("string" === typeof input.customer_account_code || $guard(_exceptionable, {
486
+ path: _path + ".customer_account_code",
487
+ expected: "string",
488
+ value: input.customer_account_code
489
+ }, _errorFactory)) && (false === _exceptionable || Object.keys(input).every(key => {
490
+ if (["bundle_code", "response_type", "product", "customer_account_code"].some(prop => key === prop))
491
+ return true;
492
+ const value = input[key];
493
+ if (undefined === value)
494
+ return true;
495
+ return true;
496
+ })); const __is = input => "object" === typeof input && null !== input && $io0(input); let _errorFactory; return (input, errorFactory) => {
497
+ if (false === __is(input)) {
498
+ _errorFactory = errorFactory;
499
+ ((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || $guard(true, {
500
+ path: _path + "",
501
+ expected: "__type",
502
+ value: input
503
+ }, _errorFactory)) && $ao0(input, _path + "", true) || $guard(true, {
504
+ path: _path + "",
505
+ expected: "__type",
506
+ value: input
507
+ }, _errorFactory))(input, "$input", true);
508
+ }
509
+ return input;
510
+ }; })()(payload);
511
+ return yield this.licenseAPI.getSSOUrl(payload);
512
+ });
513
+ }
514
+ ;
515
+ getAirGapActivationCode(initializationCode, licenseKey) {
516
+ const response = this.licenseAPI.getAirGapActivationCode(initializationCode, licenseKey);
517
+ const guardFile = {
518
+ id: licenseKey,
519
+ device_id: this.getHardwareID(),
520
+ date_created: (0, dayjs_1.default)().utc().toISOString(),
521
+ };
522
+ this.licenseFile.saveGuardFile(guardFile);
523
+ return response;
524
+ }
525
+ createOfflineActivationPayload(payload) {
526
+ return this.licenseAPI.createOfflineActivationPayload(Object.assign(Object.assign({}, payload), { product: this.config.productCode, hardware_id: this.getHardwareID() }));
527
+ }
528
+ createOfflineDeactivationPayload(payload) {
529
+ return this.licenseAPI.createOfflineDeactivationPayload(Object.assign(Object.assign({}, payload), { product: this.config.productCode, hardware_id: this.getHardwareID() }));
530
+ }
531
+ decodeOfflineActivationPayload(payload) {
532
+ return this.licenseAPI.decodeOfflineActivationPayload(payload);
533
+ }
534
+ decodeOfflineDeactivationPayload(payload) {
535
+ return this.licenseAPI.decodeOfflineDeactivationPayload(payload);
310
536
  }
311
537
  }
312
- exports.default = AbstractManager;
538
+ exports.AbstractManager = AbstractManager;
313
539
  //# sourceMappingURL=abstract-manager.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"abstract-manager.js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