@licensespring/node-sdk 1.0.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/README.md +1 -0
- package/dist/.env.prod +22 -0
- package/dist/hwid/hardware_id_generator/CHANGELOG.md +4 -0
- package/dist/hwid/hardware_id_generator/bin/linux/aarch64/glibc/libhardware_id_generator.so +0 -0
- package/dist/hwid/hardware_id_generator/bin/linux/aarch64/musl/libhardware_id_generator.so +0 -0
- package/dist/hwid/hardware_id_generator/bin/linux/arm/glibc/libhardware_id_generator.so +0 -0
- package/dist/hwid/hardware_id_generator/bin/linux/arm/musl/libhardware_id_generator.so +0 -0
- package/dist/hwid/hardware_id_generator/bin/linux/i686/glibc/libhardware_id_generator.so +0 -0
- package/dist/hwid/hardware_id_generator/bin/linux/i686/musl/libhardware_id_generator.so +0 -0
- package/dist/hwid/hardware_id_generator/bin/linux/ppc64le/glibc/libhardware_id_generator.so +0 -0
- package/dist/hwid/hardware_id_generator/bin/linux/ppc64le/musl/libhardware_id_generator.so +0 -0
- package/dist/hwid/hardware_id_generator/bin/linux/riscv64/glibc/libhardware_id_generator.so +0 -0
- package/dist/hwid/hardware_id_generator/bin/linux/riscv64/musl/libhardware_id_generator.so +0 -0
- package/dist/hwid/hardware_id_generator/bin/linux/s390x/glibc/libhardware_id_generator.so +0 -0
- package/dist/hwid/hardware_id_generator/bin/linux/s390x/musl/libhardware_id_generator.so +0 -0
- package/dist/hwid/hardware_id_generator/bin/linux/x86_64/glibc/libhardware_id_generator.so +0 -0
- package/dist/hwid/hardware_id_generator/bin/linux/x86_64/musl/libhardware_id_generator.so +0 -0
- package/dist/hwid/hardware_id_generator/bin/macos/arm64/libhardware_id_generator.so +0 -0
- package/dist/hwid/hardware_id_generator/bin/macos/x86_64/libhardware_id_generator.so +0 -0
- package/dist/hwid/hardware_id_generator/bin/windows/arm/hardware_id_generator.dll +0 -0
- package/dist/hwid/hardware_id_generator/bin/windows/arm64/hardware_id_generator.dll +0 -0
- package/dist/hwid/hardware_id_generator/bin/windows/x64/hardware_id_generator.dll +0 -0
- package/dist/hwid/hardware_id_generator/bin/windows/x86/hardware_id_generator.dll +0 -0
- package/dist/hwid/hardware_id_generator/documentation/Documentation.html +1 -0
- package/dist/hwid/hardware_id_generator/documentation/README.md +25 -0
- package/dist/hwid/hardware_id_generator/documentation/html/annotated.html +115 -0
- package/dist/hwid/hardware_id_generator/documentation/html/annotated_dup.js +10 -0
- package/dist/hwid/hardware_id_generator/documentation/html/bc_s.png +0 -0
- package/dist/hwid/hardware_id_generator/documentation/html/bc_sd.png +0 -0
- package/dist/hwid/hardware_id_generator/documentation/html/classLicenseSpring_1_1HardwareIdProvider-members.html +114 -0
- package/dist/hwid/hardware_id_generator/documentation/html/classLicenseSpring_1_1HardwareIdProvider.html +338 -0
- package/dist/hwid/hardware_id_generator/documentation/html/classLicenseSpring_1_1HardwareIdProvider.js +5 -0
- package/dist/hwid/hardware_id_generator/documentation/html/classLicenseSpring_1_1HardwareIdProvider.png +0 -0
- package/dist/hwid/hardware_id_generator/documentation/html/classLicenseSpring_1_1HardwareIdProviderCloud-members.html +114 -0
- package/dist/hwid/hardware_id_generator/documentation/html/classLicenseSpring_1_1HardwareIdProviderCloud.html +184 -0
- package/dist/hwid/hardware_id_generator/documentation/html/classLicenseSpring_1_1HardwareIdProviderCloud.js +4 -0
- package/dist/hwid/hardware_id_generator/documentation/html/classLicenseSpring_1_1HardwareIdProviderCloud.png +0 -0
- package/dist/hwid/hardware_id_generator/documentation/html/classLicenseSpring_1_1HardwareIdProviderLinux-members.html +114 -0
- package/dist/hwid/hardware_id_generator/documentation/html/classLicenseSpring_1_1HardwareIdProviderLinux.html +184 -0
- package/dist/hwid/hardware_id_generator/documentation/html/classLicenseSpring_1_1HardwareIdProviderLinux.js +4 -0
- package/dist/hwid/hardware_id_generator/documentation/html/classLicenseSpring_1_1HardwareIdProviderLinux.png +0 -0
- package/dist/hwid/hardware_id_generator/documentation/html/classLicenseSpring_1_1HardwareIdProviderMacos-members.html +114 -0
- package/dist/hwid/hardware_id_generator/documentation/html/classLicenseSpring_1_1HardwareIdProviderMacos.html +184 -0
- package/dist/hwid/hardware_id_generator/documentation/html/classLicenseSpring_1_1HardwareIdProviderMacos.js +4 -0
- package/dist/hwid/hardware_id_generator/documentation/html/classLicenseSpring_1_1HardwareIdProviderMacos.png +0 -0
- package/dist/hwid/hardware_id_generator/documentation/html/classLicenseSpring_1_1HardwareIdProviderWindows-members.html +114 -0
- package/dist/hwid/hardware_id_generator/documentation/html/classLicenseSpring_1_1HardwareIdProviderWindows.html +192 -0
- package/dist/hwid/hardware_id_generator/documentation/html/classLicenseSpring_1_1HardwareIdProviderWindows.js +4 -0
- package/dist/hwid/hardware_id_generator/documentation/html/classLicenseSpring_1_1HardwareIdProviderWindows.png +0 -0
- package/dist/hwid/hardware_id_generator/documentation/html/classes.html +111 -0
- package/dist/hwid/hardware_id_generator/documentation/html/closed.png +0 -0
- package/dist/hwid/hardware_id_generator/documentation/html/dir_a49c68042076af89c9be520540c36a5a.html +106 -0
- package/dist/hwid/hardware_id_generator/documentation/html/dir_d44c64559bbebec7f509842c48db8b23.html +122 -0
- package/dist/hwid/hardware_id_generator/documentation/html/dir_d44c64559bbebec7f509842c48db8b23.js +9 -0
- package/dist/hwid/hardware_id_generator/documentation/html/doc.svg +12 -0
- package/dist/hwid/hardware_id_generator/documentation/html/docd.svg +12 -0
- package/dist/hwid/hardware_id_generator/documentation/html/doxygen.css +2045 -0
- package/dist/hwid/hardware_id_generator/documentation/html/doxygen.svg +28 -0
- package/dist/hwid/hardware_id_generator/documentation/html/dynsections.js +192 -0
- package/dist/hwid/hardware_id_generator/documentation/html/exports_8h_source.html +137 -0
- package/dist/hwid/hardware_id_generator/documentation/html/files.html +116 -0
- package/dist/hwid/hardware_id_generator/documentation/html/files_dup.js +4 -0
- package/dist/hwid/hardware_id_generator/documentation/html/folderclosed.svg +11 -0
- package/dist/hwid/hardware_id_generator/documentation/html/folderclosedd.svg +11 -0
- package/dist/hwid/hardware_id_generator/documentation/html/folderopen.svg +17 -0
- package/dist/hwid/hardware_id_generator/documentation/html/folderopend.svg +12 -0
- package/dist/hwid/hardware_id_generator/documentation/html/functions.html +110 -0
- package/dist/hwid/hardware_id_generator/documentation/html/functions_func.html +110 -0
- package/dist/hwid/hardware_id_generator/documentation/html/hardware__id__provider_8h_source.html +161 -0
- package/dist/hwid/hardware_id_generator/documentation/html/hardware__id__provider__cloud_8h_source.html +142 -0
- package/dist/hwid/hardware_id_generator/documentation/html/hardware__id__provider__linux_8h_source.html +131 -0
- package/dist/hwid/hardware_id_generator/documentation/html/hardware__id__provider__macos_8h_source.html +131 -0
- package/dist/hwid/hardware_id_generator/documentation/html/hardware__id__provider__windows_8h_source.html +149 -0
- package/dist/hwid/hardware_id_generator/documentation/html/hierarchy.html +114 -0
- package/dist/hwid/hardware_id_generator/documentation/html/hierarchy.js +9 -0
- package/dist/hwid/hardware_id_generator/documentation/html/index.html +132 -0
- package/dist/hwid/hardware_id_generator/documentation/html/index.js +4 -0
- package/dist/hwid/hardware_id_generator/documentation/html/jquery.js +34 -0
- package/dist/hwid/hardware_id_generator/documentation/html/logo_small.png +0 -0
- package/dist/hwid/hardware_id_generator/documentation/html/menu.js +136 -0
- package/dist/hwid/hardware_id_generator/documentation/html/menudata.js +35 -0
- package/dist/hwid/hardware_id_generator/documentation/html/minus.svg +8 -0
- package/dist/hwid/hardware_id_generator/documentation/html/minusd.svg +8 -0
- package/dist/hwid/hardware_id_generator/documentation/html/nav_f.png +0 -0
- package/dist/hwid/hardware_id_generator/documentation/html/nav_fd.png +0 -0
- package/dist/hwid/hardware_id_generator/documentation/html/nav_g.png +0 -0
- package/dist/hwid/hardware_id_generator/documentation/html/nav_h.png +0 -0
- package/dist/hwid/hardware_id_generator/documentation/html/nav_hd.png +0 -0
- package/dist/hwid/hardware_id_generator/documentation/html/navtree.css +149 -0
- package/dist/hwid/hardware_id_generator/documentation/html/navtree.js +559 -0
- package/dist/hwid/hardware_id_generator/documentation/html/navtreedata.js +50 -0
- package/dist/hwid/hardware_id_generator/documentation/html/navtreeindex0.js +31 -0
- package/dist/hwid/hardware_id_generator/documentation/html/open.png +0 -0
- package/dist/hwid/hardware_id_generator/documentation/html/plus.svg +9 -0
- package/dist/hwid/hardware_id_generator/documentation/html/plusd.svg +9 -0
- package/dist/hwid/hardware_id_generator/documentation/html/resize.js +155 -0
- package/dist/hwid/hardware_id_generator/documentation/html/search/all_0.js +4 -0
- package/dist/hwid/hardware_id_generator/documentation/html/search/all_1.js +4 -0
- package/dist/hwid/hardware_id_generator/documentation/html/search/all_2.js +6 -0
- package/dist/hwid/hardware_id_generator/documentation/html/search/all_3.js +9 -0
- package/dist/hwid/hardware_id_generator/documentation/html/search/all_4.js +4 -0
- package/dist/hwid/hardware_id_generator/documentation/html/search/all_5.js +5 -0
- package/dist/hwid/hardware_id_generator/documentation/html/search/all_6.js +4 -0
- package/dist/hwid/hardware_id_generator/documentation/html/search/all_7.js +4 -0
- package/dist/hwid/hardware_id_generator/documentation/html/search/all_8.js +4 -0
- package/dist/hwid/hardware_id_generator/documentation/html/search/all_9.js +4 -0
- package/dist/hwid/hardware_id_generator/documentation/html/search/classes_0.js +8 -0
- package/dist/hwid/hardware_id_generator/documentation/html/search/close.svg +18 -0
- package/dist/hwid/hardware_id_generator/documentation/html/search/functions_0.js +4 -0
- package/dist/hwid/hardware_id_generator/documentation/html/search/functions_1.js +4 -0
- package/dist/hwid/hardware_id_generator/documentation/html/search/functions_2.js +6 -0
- package/dist/hwid/hardware_id_generator/documentation/html/search/functions_3.js +4 -0
- package/dist/hwid/hardware_id_generator/documentation/html/search/mag.svg +24 -0
- package/dist/hwid/hardware_id_generator/documentation/html/search/mag_d.svg +24 -0
- package/dist/hwid/hardware_id_generator/documentation/html/search/mag_sel.svg +31 -0
- package/dist/hwid/hardware_id_generator/documentation/html/search/mag_seld.svg +31 -0
- package/dist/hwid/hardware_id_generator/documentation/html/search/pages_0.js +4 -0
- package/dist/hwid/hardware_id_generator/documentation/html/search/pages_1.js +4 -0
- package/dist/hwid/hardware_id_generator/documentation/html/search/pages_2.js +4 -0
- package/dist/hwid/hardware_id_generator/documentation/html/search/pages_3.js +4 -0
- package/dist/hwid/hardware_id_generator/documentation/html/search/search.css +291 -0
- package/dist/hwid/hardware_id_generator/documentation/html/search/search.js +840 -0
- package/dist/hwid/hardware_id_generator/documentation/html/search/searchdata.js +24 -0
- package/dist/hwid/hardware_id_generator/documentation/html/splitbar.png +0 -0
- package/dist/hwid/hardware_id_generator/documentation/html/splitbard.png +0 -0
- package/dist/hwid/hardware_id_generator/documentation/html/sync_off.png +0 -0
- package/dist/hwid/hardware_id_generator/documentation/html/sync_on.png +0 -0
- package/dist/hwid/hardware_id_generator/documentation/html/tab_a.png +0 -0
- package/dist/hwid/hardware_id_generator/documentation/html/tab_ad.png +0 -0
- package/dist/hwid/hardware_id_generator/documentation/html/tab_b.png +0 -0
- package/dist/hwid/hardware_id_generator/documentation/html/tab_bd.png +0 -0
- package/dist/hwid/hardware_id_generator/documentation/html/tab_h.png +0 -0
- package/dist/hwid/hardware_id_generator/documentation/html/tab_hd.png +0 -0
- package/dist/hwid/hardware_id_generator/documentation/html/tab_s.png +0 -0
- package/dist/hwid/hardware_id_generator/documentation/html/tab_sd.png +0 -0
- package/dist/hwid/hardware_id_generator/documentation/html/tabs.css +1 -0
- package/dist/hwid/hardware_id_generator/documentation/licenses/curl/LICENSE.txt +11 -0
- package/dist/hwid/hardware_id_generator/documentation/licenses/openssl/LICENSE.txt +177 -0
- package/dist/hwid/index.d.ts +12 -0
- package/dist/hwid/index.js +82 -0
- package/dist/hwid/index.js.map +1 -0
- package/dist/hwid/install.d.ts +1 -0
- package/dist/hwid/install.js +49 -0
- package/dist/hwid/install.js.map +1 -0
- package/dist/src/abstract-manager.d.ts +21 -0
- package/dist/src/abstract-manager.js +170 -0
- package/dist/src/abstract-manager.js.map +1 -0
- package/dist/src/api.d.ts +2765 -0
- package/dist/src/api.js +2533 -0
- package/dist/src/api.js.map +1 -0
- package/dist/src/common.d.ts +11 -0
- package/dist/src/common.js +87 -0
- package/dist/src/common.js.map +1 -0
- package/dist/src/floating.d.ts +46 -0
- package/dist/src/floating.js +273 -0
- package/dist/src/floating.js.map +1 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.js +13 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/license-data.d.ts +52 -0
- package/dist/src/license-data.js +214 -0
- package/dist/src/license-data.js.map +1 -0
- package/dist/src/license-file.d.ts +23 -0
- package/dist/src/license-file.js +238 -0
- package/dist/src/license-file.js.map +1 -0
- package/dist/src/license-manager.d.ts +34 -0
- package/dist/src/license-manager.js +1010 -0
- package/dist/src/license-manager.js.map +1 -0
- package/dist/src/license.d.ts +644 -0
- package/dist/src/license.js +630 -0
- package/dist/src/license.js.map +1 -0
- package/dist/src/offline-activation.d.ts +6 -0
- package/dist/src/offline-activation.js +10 -0
- package/dist/src/offline-activation.js.map +1 -0
- package/dist/src/service.d.ts +21 -0
- package/dist/src/service.js +100 -0
- package/dist/src/service.js.map +1 -0
- package/dist/src/types.d.ts +513 -0
- package/dist/src/types.js +14 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/version.d.ts +2 -0
- package/dist/src/version.js +5 -0
- package/dist/src/version.js.map +1 -0
- package/dist/src/watchdog.d.ts +18 -0
- package/dist/src/watchdog.js +80 -0
- package/dist/src/watchdog.js.map +1 -0
- package/package.json +45 -0
|
@@ -0,0 +1,513 @@
|
|
|
1
|
+
export type JSON = {
|
|
2
|
+
[key: string]: JSON | Array<JSON> | string | number | boolean;
|
|
3
|
+
};
|
|
4
|
+
export type Dictionary<T = string> = {
|
|
5
|
+
[key: string]: T;
|
|
6
|
+
};
|
|
7
|
+
export type DateInputString = string;
|
|
8
|
+
export type DateISO8601UTC = string;
|
|
9
|
+
export type DateRFC7231 = string;
|
|
10
|
+
export type LicensespringConfig = {
|
|
11
|
+
apiKey: string;
|
|
12
|
+
sharedKey: string;
|
|
13
|
+
apiPath: string;
|
|
14
|
+
publicKey: string;
|
|
15
|
+
productCode: string;
|
|
16
|
+
appName: string;
|
|
17
|
+
appVersion: string;
|
|
18
|
+
filePath: string;
|
|
19
|
+
filename: string;
|
|
20
|
+
gracePeriod: number;
|
|
21
|
+
fileKey: string;
|
|
22
|
+
airGapKey?: string;
|
|
23
|
+
isGuardFileEnabled: boolean;
|
|
24
|
+
hardwareIDMethod: number;
|
|
25
|
+
sdkVersion: string;
|
|
26
|
+
};
|
|
27
|
+
export type LicensespringAPIConfig = Omit<LicensespringConfig, 'productCode'>;
|
|
28
|
+
export type LicensespringConfigDef = Omit<LicensespringConfig, 'apiPath' | 'publicKey' | 'filename' | 'filePath' | 'gracePeriod' | 'fileKey' | 'isGuardFileEnabled' | 'hardwareIDMethod' | 'sdkVersion'> & {
|
|
29
|
+
apiPath?: string;
|
|
30
|
+
publicKey?: string;
|
|
31
|
+
filename?: string;
|
|
32
|
+
filePath?: string;
|
|
33
|
+
gracePeriod?: number;
|
|
34
|
+
fileKey?: string;
|
|
35
|
+
isGuardFileEnabled?: boolean;
|
|
36
|
+
hardwareIDMethod?: number;
|
|
37
|
+
};
|
|
38
|
+
export type LicensespringAPIConfigDef = Omit<LicensespringAPIConfig, 'apiPath' | 'publicKey' | 'filename' | 'filePath' | 'gracePeriod' | 'fileKey' | 'isGuardFileEnabled' | 'hardwareIDMethod' | 'sdkVersion'> & {
|
|
39
|
+
apiPath?: string;
|
|
40
|
+
publicKey?: string;
|
|
41
|
+
filename?: string;
|
|
42
|
+
filePath?: string;
|
|
43
|
+
gracePeriod?: number;
|
|
44
|
+
fileKey?: string;
|
|
45
|
+
isGuardFileEnabled?: boolean;
|
|
46
|
+
hardwareIDMethod?: number;
|
|
47
|
+
};
|
|
48
|
+
export type LicensespringFloatingConfig = {
|
|
49
|
+
apiPath: string;
|
|
50
|
+
appVersion: string;
|
|
51
|
+
hardwareIDMethod: number;
|
|
52
|
+
sdkVersion: string;
|
|
53
|
+
};
|
|
54
|
+
export type LicensespringFloatingConfigDef = Omit<LicensespringFloatingConfig, 'hardwareIDMethod' | 'sdkVersion'> & {
|
|
55
|
+
hardwareIDMethod?: number;
|
|
56
|
+
};
|
|
57
|
+
type LicenseIdentificatorKeyBased = {
|
|
58
|
+
license_key: string;
|
|
59
|
+
};
|
|
60
|
+
type LicenseIdentificatorUserBased = {
|
|
61
|
+
username: string;
|
|
62
|
+
};
|
|
63
|
+
type LicenseActivationIdentificatorUserBased = {
|
|
64
|
+
username: string;
|
|
65
|
+
password: string;
|
|
66
|
+
};
|
|
67
|
+
type LicenseIdentificatorUserSSOBased = ({
|
|
68
|
+
id_token: string;
|
|
69
|
+
} | {
|
|
70
|
+
code: string;
|
|
71
|
+
}) & {
|
|
72
|
+
customer_account_code: string;
|
|
73
|
+
};
|
|
74
|
+
export type SSOURLParams = {
|
|
75
|
+
product: string;
|
|
76
|
+
type: 'token' | 'code';
|
|
77
|
+
};
|
|
78
|
+
type LicenseIdentificatiorRequired = {
|
|
79
|
+
hardware_id: string;
|
|
80
|
+
product: string;
|
|
81
|
+
bundle_code?: string;
|
|
82
|
+
license_id?: number;
|
|
83
|
+
};
|
|
84
|
+
export type LicenseActivationIdentificatorWithVariables = LicenseActivationIdentificator & {
|
|
85
|
+
variables?: Dictionary<string>;
|
|
86
|
+
};
|
|
87
|
+
export type LicenseActivationIdentificatorOfflineWithVariables = LicenseActivationIdentificator & OfflineActivationRequest & {
|
|
88
|
+
variables?: Dictionary<string>;
|
|
89
|
+
};
|
|
90
|
+
export type LicenseIdentificatorWithVariables = LicenseIdentificator & {
|
|
91
|
+
variables?: Dictionary<string>;
|
|
92
|
+
};
|
|
93
|
+
export type LicenseIdentificatorOfflineWithVariables = LicenseIdentificator & OfflineActivationRequest & {
|
|
94
|
+
variables?: Dictionary<string>;
|
|
95
|
+
};
|
|
96
|
+
export type TrialKeyPayload = {
|
|
97
|
+
email: string;
|
|
98
|
+
product: string;
|
|
99
|
+
hardware_id: string;
|
|
100
|
+
};
|
|
101
|
+
export type GetUserLicensesPayload = {
|
|
102
|
+
username: string;
|
|
103
|
+
password: string;
|
|
104
|
+
product: string;
|
|
105
|
+
};
|
|
106
|
+
export type GetCustomerLicensesPayload = {
|
|
107
|
+
customer: string;
|
|
108
|
+
product: string;
|
|
109
|
+
};
|
|
110
|
+
export type LicenseIdentificatorAndFeature = LicenseIdentificator & {
|
|
111
|
+
feature: string;
|
|
112
|
+
};
|
|
113
|
+
export type LicenseIdentificatorAddConsumptions = LicenseIdentificator & {
|
|
114
|
+
consumptions: number;
|
|
115
|
+
};
|
|
116
|
+
export type LicenseIdentificatorAddFeatureConsumptions = LicenseIdentificator & {
|
|
117
|
+
feature: string;
|
|
118
|
+
consumptions: number;
|
|
119
|
+
};
|
|
120
|
+
export type ProductDetailsPayload = {
|
|
121
|
+
product: string;
|
|
122
|
+
include_expired_features?: boolean;
|
|
123
|
+
include_latest_version?: boolean;
|
|
124
|
+
include_custom_fields?: boolean;
|
|
125
|
+
};
|
|
126
|
+
export type LicenseIdentificatorWithBorrowedUntil = LicenseIdentificator & {
|
|
127
|
+
borrowed_until: DateInputString;
|
|
128
|
+
};
|
|
129
|
+
export type PasswordChangePayload = {
|
|
130
|
+
username: string;
|
|
131
|
+
password: string;
|
|
132
|
+
new_password: string;
|
|
133
|
+
};
|
|
134
|
+
export type LicenseIdentificatorWithInstallation = LicenseIdentificator & {
|
|
135
|
+
env: string;
|
|
136
|
+
channel: string;
|
|
137
|
+
version: string;
|
|
138
|
+
};
|
|
139
|
+
export type Managed<T> = Omit<T, 'product' | 'hardware_id'>;
|
|
140
|
+
type ListProps<T> = {
|
|
141
|
+
[K in keyof T]: T[K];
|
|
142
|
+
} & {};
|
|
143
|
+
type Without<T, U> = {
|
|
144
|
+
[P in Exclude<keyof T, keyof U>]?: never;
|
|
145
|
+
};
|
|
146
|
+
type EvalIfIs<T, U> = unknown extends T ? never : U;
|
|
147
|
+
type XOR<A, B, C = unknown, D = unknown, E = unknown, F = unknown, G = unknown, H = unknown> = ListProps<(Without<B & C & D & E & F & G & H, A> & A) | (Without<A & C & D & E & F & G & H, B> & B) | EvalIfIs<C, Without<A & B & D & E & F & G & H, C> & C> | EvalIfIs<D, Without<A & B & C & E & F & G & H, D> & D> | EvalIfIs<E, Without<A & B & C & D & F & G & H, E> & E> | EvalIfIs<F, Without<A & B & C & D & E & G & H, F> & F> | EvalIfIs<G, Without<A & B & C & D & E & F & H, G> & G> | EvalIfIs<H, Without<A & B & C & D & E & F & G, H> & H>>;
|
|
148
|
+
export type LicenseIdentificator = (XOR<LicenseIdentificatorKeyBased, LicenseIdentificatorUserBased>) & LicenseIdentificatiorRequired;
|
|
149
|
+
export type LicenseActivationIdentificator = (XOR<LicenseIdentificatorKeyBased, LicenseActivationIdentificatorUserBased, LicenseIdentificatorUserSSOBased>) & LicenseIdentificatiorRequired;
|
|
150
|
+
export type LicenseUser = {
|
|
151
|
+
id: number;
|
|
152
|
+
email: string;
|
|
153
|
+
first_name: string;
|
|
154
|
+
last_name: string;
|
|
155
|
+
phone_number: string;
|
|
156
|
+
is_initial_password: boolean;
|
|
157
|
+
allow_unlimited_activations: boolean;
|
|
158
|
+
max_activations: number;
|
|
159
|
+
total_activations: number;
|
|
160
|
+
};
|
|
161
|
+
export type ProductDetails = {
|
|
162
|
+
product_id: number;
|
|
163
|
+
product_name: string;
|
|
164
|
+
short_code: string;
|
|
165
|
+
authorization_method: 'license-key' | 'user';
|
|
166
|
+
metadata: JSON;
|
|
167
|
+
};
|
|
168
|
+
export type Customer = {
|
|
169
|
+
email: string;
|
|
170
|
+
company_name: string;
|
|
171
|
+
reference: string;
|
|
172
|
+
phone: string;
|
|
173
|
+
first_name: string;
|
|
174
|
+
last_name: string;
|
|
175
|
+
city: string;
|
|
176
|
+
postcode: string;
|
|
177
|
+
state: string;
|
|
178
|
+
country: string;
|
|
179
|
+
address: string;
|
|
180
|
+
customer_account: string | null;
|
|
181
|
+
metadata: JSON;
|
|
182
|
+
};
|
|
183
|
+
export type CustomField = {
|
|
184
|
+
name: string;
|
|
185
|
+
data_type: 'numer' | 'text' | 'date/time';
|
|
186
|
+
value: string;
|
|
187
|
+
};
|
|
188
|
+
export type ProductFeature = {
|
|
189
|
+
id: number;
|
|
190
|
+
code: string;
|
|
191
|
+
name: string;
|
|
192
|
+
expiry_date: string;
|
|
193
|
+
metadata: JSON;
|
|
194
|
+
is_floating_cloud: boolean;
|
|
195
|
+
} & XOR<{
|
|
196
|
+
feature_type: 'activation';
|
|
197
|
+
}, {
|
|
198
|
+
feature_type: 'consumption';
|
|
199
|
+
max_consumption: number;
|
|
200
|
+
allow_unlimited_consumptions: boolean;
|
|
201
|
+
total_consumptions: number;
|
|
202
|
+
allow_overages: number;
|
|
203
|
+
max_overages: number;
|
|
204
|
+
reset_consumption: boolean;
|
|
205
|
+
consumption_period: string | null;
|
|
206
|
+
}> & XOR<{
|
|
207
|
+
is_floating: false;
|
|
208
|
+
}, {
|
|
209
|
+
is_floating: true;
|
|
210
|
+
floating_users: number;
|
|
211
|
+
floating_timeout?: number;
|
|
212
|
+
}>;
|
|
213
|
+
export type LicenseType = 'perpetual' | 'time-limited' | 'consumption' | 'subscription';
|
|
214
|
+
export type LicenseResponse = {
|
|
215
|
+
id: number;
|
|
216
|
+
allow_grace_period: boolean;
|
|
217
|
+
allow_overages: boolean;
|
|
218
|
+
allow_unlimited_activations: boolean;
|
|
219
|
+
borrowed_until: string | null;
|
|
220
|
+
can_borrow: boolean;
|
|
221
|
+
channel: string;
|
|
222
|
+
device_id: number;
|
|
223
|
+
enable_maintenance_period: boolean;
|
|
224
|
+
environment: string;
|
|
225
|
+
eula_link: string;
|
|
226
|
+
floating_timeout: number;
|
|
227
|
+
grace_period: number;
|
|
228
|
+
hash_md5: string;
|
|
229
|
+
installation_file: string;
|
|
230
|
+
is_air_gapped: boolean;
|
|
231
|
+
is_borrowed: boolean;
|
|
232
|
+
is_expired: boolean;
|
|
233
|
+
is_hardware_key_auth: boolean;
|
|
234
|
+
license_active: boolean;
|
|
235
|
+
license_enabled: boolean;
|
|
236
|
+
license_signature: string;
|
|
237
|
+
license_type: LicenseType;
|
|
238
|
+
maintenance_period: string | null;
|
|
239
|
+
max_activations: number;
|
|
240
|
+
max_borrow_time: number;
|
|
241
|
+
max_license_users: number;
|
|
242
|
+
max_overages: number;
|
|
243
|
+
max_transfers: number;
|
|
244
|
+
order_store_id: string;
|
|
245
|
+
prevent_vm: boolean;
|
|
246
|
+
release_date: string;
|
|
247
|
+
release_notes_link: string;
|
|
248
|
+
requires_version: string;
|
|
249
|
+
size: string;
|
|
250
|
+
start_date: string | null;
|
|
251
|
+
times_activated: number;
|
|
252
|
+
transfer_count: number;
|
|
253
|
+
validity_period: DateISO8601UTC | null;
|
|
254
|
+
version: string;
|
|
255
|
+
product_features: ProductFeature[];
|
|
256
|
+
custom_fields: CustomField[];
|
|
257
|
+
customer: Customer;
|
|
258
|
+
product_details: ProductDetails;
|
|
259
|
+
metadata: JSON;
|
|
260
|
+
} & XOR<{
|
|
261
|
+
license_key: string;
|
|
262
|
+
}, {
|
|
263
|
+
user: LicenseUser;
|
|
264
|
+
}> & XOR<({
|
|
265
|
+
is_floating: true;
|
|
266
|
+
is_floating_cloud: boolean;
|
|
267
|
+
floating_in_use_devices: number;
|
|
268
|
+
} | {
|
|
269
|
+
is_floating: boolean;
|
|
270
|
+
is_floating_cloud: true;
|
|
271
|
+
floating_in_use_devices: number;
|
|
272
|
+
}) & {
|
|
273
|
+
floating_users: number;
|
|
274
|
+
floating_timeout: number;
|
|
275
|
+
}, {
|
|
276
|
+
is_floating_cloud: false;
|
|
277
|
+
is_floating: false;
|
|
278
|
+
}> & XOR<{
|
|
279
|
+
is_trial: false;
|
|
280
|
+
}, {
|
|
281
|
+
is_trial: true;
|
|
282
|
+
trial_days: number;
|
|
283
|
+
}> & XOR<{
|
|
284
|
+
license_type: 'consumption';
|
|
285
|
+
max_consumptions: number;
|
|
286
|
+
total_consumptions: number;
|
|
287
|
+
allow_unlimited_consumptions: boolean;
|
|
288
|
+
allow_overages: boolean;
|
|
289
|
+
max_overages: number;
|
|
290
|
+
reset_consumption: boolean;
|
|
291
|
+
consumption_period: DateISO8601UTC | null;
|
|
292
|
+
}, {}>;
|
|
293
|
+
export type LicenseResponseOffline = LicenseResponse & {
|
|
294
|
+
license_signature_v2: string;
|
|
295
|
+
};
|
|
296
|
+
export type LicenseFilePayload = LicenseResponseOffline & {
|
|
297
|
+
offline_signature: string;
|
|
298
|
+
};
|
|
299
|
+
export type OfflineActivationRequest = {
|
|
300
|
+
prefix?: string;
|
|
301
|
+
os_ver?: string;
|
|
302
|
+
sdk_build_version?: string;
|
|
303
|
+
hostname?: string;
|
|
304
|
+
ip?: string;
|
|
305
|
+
external_ip?: string;
|
|
306
|
+
app_ver?: string;
|
|
307
|
+
mac_address?: string;
|
|
308
|
+
};
|
|
309
|
+
export type DeviceVariable = {
|
|
310
|
+
id: number;
|
|
311
|
+
device_id: number;
|
|
312
|
+
created_at: DateISO8601UTC;
|
|
313
|
+
variable: string;
|
|
314
|
+
value: string;
|
|
315
|
+
};
|
|
316
|
+
type LicenseTrialExisting = {};
|
|
317
|
+
type LicenseTrialNewCommon = {
|
|
318
|
+
license_key: string;
|
|
319
|
+
id: number;
|
|
320
|
+
order_id: number;
|
|
321
|
+
product_id: number;
|
|
322
|
+
max_license_users: number;
|
|
323
|
+
max_activations: number;
|
|
324
|
+
times_activated: number;
|
|
325
|
+
is_trial: true;
|
|
326
|
+
active: boolean;
|
|
327
|
+
enabled: boolean;
|
|
328
|
+
max_transfers: number;
|
|
329
|
+
trial_days: number;
|
|
330
|
+
maintenance_duration: DateISO8601UTC | null;
|
|
331
|
+
validity_period: DateISO8601UTC | null;
|
|
332
|
+
enable_maintenance_period: boolean;
|
|
333
|
+
prevent_vm: boolean;
|
|
334
|
+
is_hardware_key_auth: boolean;
|
|
335
|
+
license_user: string;
|
|
336
|
+
initial_password: string;
|
|
337
|
+
metadata: JSON;
|
|
338
|
+
created_at: number;
|
|
339
|
+
updated_at: number;
|
|
340
|
+
LicenseProductFeatures: LicenseProductFeature[];
|
|
341
|
+
LicenseCustomFields: {
|
|
342
|
+
product_custom_field_id: number;
|
|
343
|
+
value: string;
|
|
344
|
+
}[];
|
|
345
|
+
};
|
|
346
|
+
type LicenseTrialNew = LicenseTrialNewCommon & (XOR<{
|
|
347
|
+
is_floating_cloud: true;
|
|
348
|
+
floating_users: number;
|
|
349
|
+
floating_timeout: number;
|
|
350
|
+
}, {}>) & (XOR<{
|
|
351
|
+
license_type: 'consumption';
|
|
352
|
+
allow_overages: boolean;
|
|
353
|
+
max_overages: number;
|
|
354
|
+
max_consumptions: number;
|
|
355
|
+
valid_duration: null;
|
|
356
|
+
consumption_period: string | null;
|
|
357
|
+
reset_consumption: boolean;
|
|
358
|
+
}, XOR<{
|
|
359
|
+
license_type: 'subscription';
|
|
360
|
+
grace_period: number;
|
|
361
|
+
allow_grace_period: boolean;
|
|
362
|
+
}, {
|
|
363
|
+
license_type: 'perpetual' | 'time-limited';
|
|
364
|
+
}>>);
|
|
365
|
+
export type LicenseTrialResponse = (LicenseTrialNew | LicenseTrialExisting) & {
|
|
366
|
+
license_type: LicenseType;
|
|
367
|
+
is_trial: boolean;
|
|
368
|
+
license_user: string;
|
|
369
|
+
};
|
|
370
|
+
type CustomerLicenseUser = {
|
|
371
|
+
email: string;
|
|
372
|
+
is_active: boolean;
|
|
373
|
+
first_name: string;
|
|
374
|
+
last_name: string;
|
|
375
|
+
phone_number: string;
|
|
376
|
+
is_initial_password: boolean;
|
|
377
|
+
initial_password: string;
|
|
378
|
+
max_activations: number;
|
|
379
|
+
total_activations: number;
|
|
380
|
+
license_id: number;
|
|
381
|
+
order_id: number;
|
|
382
|
+
order_store_id: string;
|
|
383
|
+
};
|
|
384
|
+
export type CustomerLicenseUsersResponse = {
|
|
385
|
+
customer: {
|
|
386
|
+
email: string | null;
|
|
387
|
+
first_name: string | null;
|
|
388
|
+
last_name: string | null;
|
|
389
|
+
company_name: string | null;
|
|
390
|
+
phone: string | null;
|
|
391
|
+
reference: string | null;
|
|
392
|
+
address: string | null;
|
|
393
|
+
postcode: string | null;
|
|
394
|
+
city: string | null;
|
|
395
|
+
country: string | null;
|
|
396
|
+
state: string | null;
|
|
397
|
+
customer_account: null | {
|
|
398
|
+
id: string;
|
|
399
|
+
name: string;
|
|
400
|
+
code: string;
|
|
401
|
+
};
|
|
402
|
+
metadata: JSON;
|
|
403
|
+
};
|
|
404
|
+
users: CustomerLicenseUser[];
|
|
405
|
+
};
|
|
406
|
+
export type LicenseFeatureResponse = {
|
|
407
|
+
id: number;
|
|
408
|
+
code: string;
|
|
409
|
+
name: string;
|
|
410
|
+
floating_timeout: number | null;
|
|
411
|
+
floating_users: number | null;
|
|
412
|
+
feature_type: 'activation' | 'consumption';
|
|
413
|
+
expiry_date: DateISO8601UTC | null;
|
|
414
|
+
metadata: JSON;
|
|
415
|
+
is_floating: boolean;
|
|
416
|
+
is_floating_cloud: boolean;
|
|
417
|
+
floating_in_use_devices: number;
|
|
418
|
+
license_id: number;
|
|
419
|
+
};
|
|
420
|
+
export type LicenseProductFeature = {
|
|
421
|
+
id: number;
|
|
422
|
+
product_feature_id: number;
|
|
423
|
+
max_consumption: number;
|
|
424
|
+
allow_overages: boolean;
|
|
425
|
+
max_overages: number;
|
|
426
|
+
reset_consumption: number;
|
|
427
|
+
consumption_period: string | null;
|
|
428
|
+
expiry_date: DateISO8601UTC | null;
|
|
429
|
+
is_floating: boolean;
|
|
430
|
+
is_floating_cloud: boolean;
|
|
431
|
+
metadata: JSON;
|
|
432
|
+
} & XOR<({
|
|
433
|
+
is_floating: true;
|
|
434
|
+
} | {
|
|
435
|
+
is_floating_cloud: true;
|
|
436
|
+
}) & {
|
|
437
|
+
floating_timeout: number;
|
|
438
|
+
floating_users: number;
|
|
439
|
+
}, {}>;
|
|
440
|
+
export type LicenseConsumptionsResponse = {
|
|
441
|
+
id: number;
|
|
442
|
+
max_consumptions: number;
|
|
443
|
+
total_consumptions: number;
|
|
444
|
+
allow_unlimited_consumptions: boolean;
|
|
445
|
+
allow_negative_consumptions: boolean;
|
|
446
|
+
allow_overages: boolean;
|
|
447
|
+
max_overages: number;
|
|
448
|
+
reset_consumption: boolean;
|
|
449
|
+
consumption_period: string | null;
|
|
450
|
+
};
|
|
451
|
+
export type LicenseFeatureConsumptionResponse = {
|
|
452
|
+
total_consumptions: number;
|
|
453
|
+
is_floating: boolean;
|
|
454
|
+
is_floating_cloud: boolean;
|
|
455
|
+
floating_timeout: number;
|
|
456
|
+
floating_users: number;
|
|
457
|
+
};
|
|
458
|
+
export type ProductDetailsResponse = ProductDetails & {
|
|
459
|
+
floating_timeout: number;
|
|
460
|
+
max_overages: number;
|
|
461
|
+
trial_days: number;
|
|
462
|
+
allow_overages: boolean;
|
|
463
|
+
allow_trial: boolean;
|
|
464
|
+
prevent_vm: boolean;
|
|
465
|
+
custom_fields: {
|
|
466
|
+
id: number;
|
|
467
|
+
name: string;
|
|
468
|
+
default_value: string;
|
|
469
|
+
}[];
|
|
470
|
+
latest_version: null | (InstallationFileBase & {
|
|
471
|
+
id: number;
|
|
472
|
+
product_id: number;
|
|
473
|
+
enabled: boolean;
|
|
474
|
+
created_at: DateISO8601UTC;
|
|
475
|
+
updated_at: DateISO8601UTC;
|
|
476
|
+
full_link: string | null;
|
|
477
|
+
filename: string | null;
|
|
478
|
+
});
|
|
479
|
+
};
|
|
480
|
+
export type LicenseBorrowResponse = {
|
|
481
|
+
license_id: number;
|
|
482
|
+
device_id: number;
|
|
483
|
+
borrowed_until: DateInputString;
|
|
484
|
+
max_borrow_time: number;
|
|
485
|
+
};
|
|
486
|
+
type InstallationFileBase = {
|
|
487
|
+
version: string | null;
|
|
488
|
+
environment: string | null;
|
|
489
|
+
hash_md5: string | null;
|
|
490
|
+
eula_link: string | null;
|
|
491
|
+
release_notes_link: string | null;
|
|
492
|
+
size: string | null;
|
|
493
|
+
requires_version: string | null;
|
|
494
|
+
channel: string | null;
|
|
495
|
+
release_date: DateISO8601UTC | null;
|
|
496
|
+
};
|
|
497
|
+
export type InstallationFileResponse = InstallationFileBase & {
|
|
498
|
+
installation_file: string | null;
|
|
499
|
+
};
|
|
500
|
+
export type VersionsResponse = {
|
|
501
|
+
version: string;
|
|
502
|
+
release_date: DateISO8601UTC;
|
|
503
|
+
}[];
|
|
504
|
+
export type LicenseDataMethod = 'check_license' | 'activate_license' | 'activate_license_offline' | 'activate_air_gap' | 'update_license_offline' | 'product_details' | 'device_variables' | 'normal' | 'license_consumption' | 'feature_consumption' | 'register_feature' | 'floating_server_register';
|
|
505
|
+
export declare enum HardwareIdAlgorithm {
|
|
506
|
+
Default = 0,
|
|
507
|
+
WindowsHardwareFingerprintId = 1,
|
|
508
|
+
WindowsComputerSystemProductId = 2,
|
|
509
|
+
WindowsCryptographyId = 3,
|
|
510
|
+
LinuxMachineId = 4,
|
|
511
|
+
CloudPlatformsId = 5
|
|
512
|
+
}
|
|
513
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HardwareIdAlgorithm = void 0;
|
|
4
|
+
var HardwareIdAlgorithm;
|
|
5
|
+
(function (HardwareIdAlgorithm) {
|
|
6
|
+
HardwareIdAlgorithm[HardwareIdAlgorithm["Default"] = 0] = "Default";
|
|
7
|
+
HardwareIdAlgorithm[HardwareIdAlgorithm["WindowsHardwareFingerprintId"] = 1] = "WindowsHardwareFingerprintId";
|
|
8
|
+
HardwareIdAlgorithm[HardwareIdAlgorithm["WindowsComputerSystemProductId"] = 2] = "WindowsComputerSystemProductId";
|
|
9
|
+
HardwareIdAlgorithm[HardwareIdAlgorithm["WindowsCryptographyId"] = 3] = "WindowsCryptographyId";
|
|
10
|
+
HardwareIdAlgorithm[HardwareIdAlgorithm["LinuxMachineId"] = 4] = "LinuxMachineId";
|
|
11
|
+
HardwareIdAlgorithm[HardwareIdAlgorithm["CloudPlatformsId"] = 5] = "CloudPlatformsId";
|
|
12
|
+
})(HardwareIdAlgorithm || (exports.HardwareIdAlgorithm = HardwareIdAlgorithm = {}));
|
|
13
|
+
;
|
|
14
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";;;AA4pBA,IAAY,mBAOX;AAPD,WAAY,mBAAmB;IAC7B,mEAAW,CAAA;IACX,6GAAgC,CAAA;IAChC,iHAAkC,CAAA;IAClC,+FAAyB,CAAA;IACzB,iFAAkB,CAAA;IAClB,qFAAoB,CAAA;AACtB,CAAC,EAPW,mBAAmB,mCAAnB,mBAAmB,QAO9B;AAAA,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";;AAAA,MAAM,WAAW,GAAG,OAAO,CAAC;AAC5B,kBAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import License from './license';
|
|
2
|
+
export declare class Watchdog {
|
|
3
|
+
private license;
|
|
4
|
+
private intervalPointer?;
|
|
5
|
+
private runningForLicense;
|
|
6
|
+
private runningForFeatures;
|
|
7
|
+
private callbackLicense?;
|
|
8
|
+
private callbackFeatures?;
|
|
9
|
+
private interval;
|
|
10
|
+
constructor(license: License);
|
|
11
|
+
setupForLicense(callback: () => any): void;
|
|
12
|
+
setupForLicenseFeatures(callback: (featureCode: string) => any): void;
|
|
13
|
+
stopForLicense(): void;
|
|
14
|
+
stopForFeatures(): void;
|
|
15
|
+
private runner;
|
|
16
|
+
private startCheck;
|
|
17
|
+
private cleanupCheck;
|
|
18
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Watchdog = void 0;
|
|
13
|
+
class Watchdog {
|
|
14
|
+
constructor(license) {
|
|
15
|
+
this.license = license;
|
|
16
|
+
this.runningForLicense = false;
|
|
17
|
+
this.runningForFeatures = false;
|
|
18
|
+
this.interval = 60 * 60 * 1000;
|
|
19
|
+
}
|
|
20
|
+
setupForLicense(callback) {
|
|
21
|
+
this.runningForLicense = true;
|
|
22
|
+
this.callbackLicense = callback;
|
|
23
|
+
this.startCheck();
|
|
24
|
+
}
|
|
25
|
+
setupForLicenseFeatures(callback) {
|
|
26
|
+
this.runningForFeatures = true;
|
|
27
|
+
this.callbackFeatures = callback;
|
|
28
|
+
this.startCheck();
|
|
29
|
+
}
|
|
30
|
+
stopForLicense() {
|
|
31
|
+
this.runningForLicense = false;
|
|
32
|
+
this.callbackLicense = undefined;
|
|
33
|
+
this.cleanupCheck();
|
|
34
|
+
}
|
|
35
|
+
stopForFeatures() {
|
|
36
|
+
this.runningForFeatures = false;
|
|
37
|
+
this.callbackFeatures = undefined;
|
|
38
|
+
this.cleanupCheck();
|
|
39
|
+
}
|
|
40
|
+
runner() {
|
|
41
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
var _a;
|
|
43
|
+
if (this.runningForLicense) {
|
|
44
|
+
try {
|
|
45
|
+
yield this.license.check();
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
this.callbackLicense();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (this.runningForFeatures) {
|
|
52
|
+
const features = ((_a = this.license.features) === null || _a === void 0 ? void 0 : _a.map(feature => feature.code)) || [];
|
|
53
|
+
for (const featureCode in features) {
|
|
54
|
+
try {
|
|
55
|
+
yield this.license.checkFeature(featureCode);
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
this.callbackFeatures(featureCode);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
startCheck() {
|
|
65
|
+
if (this.runningForLicense || this.runningForFeatures) {
|
|
66
|
+
if (this.intervalPointer == undefined) {
|
|
67
|
+
clearInterval(this.intervalPointer);
|
|
68
|
+
this.intervalPointer = setInterval(this.runner.bind(this), this.interval);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
cleanupCheck() {
|
|
73
|
+
if (!this.runningForLicense && !this.runningForFeatures) {
|
|
74
|
+
clearInterval(this.intervalPointer);
|
|
75
|
+
this.intervalPointer = undefined;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
exports.Watchdog = Watchdog;
|
|
80
|
+
//# sourceMappingURL=watchdog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watchdog.js","sourceRoot":"","sources":["../../src/watchdog.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,QAAQ;IASnB,YAAoB,OAAgB;QAAhB,YAAO,GAAP,OAAO,CAAS;QAN5B,sBAAiB,GAAY,KAAK,CAAC;QACnC,uBAAkB,GAAY,KAAK,CAAC;QAGpC,aAAQ,GAAW,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IAI1C,CAAC;IAED,eAAe,CAAC,QAAmB;QACjC,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;QAC9B,IAAI,CAAC,eAAe,GAAG,QAAQ,CAAC;QAChC,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;IAED,uBAAuB,CAAC,QAAsC;QAC5D,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC;QAC/B,IAAI,CAAC,gBAAgB,GAAG,QAAQ,CAAC;QACjC,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;IAED,cAAc;QACZ,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;QAC/B,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC;QACjC,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAED,eAAe;QACb,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;QAChC,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAC;QAClC,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAEa,MAAM;;;YAElB,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;gBAC3B,IAAI,CAAC;oBACH,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;gBAE7B,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,IAAI,CAAC,eAAgB,EAAE,CAAC;gBAC1B,CAAC;YACH,CAAC;YAED,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAAC;gBAC5B,MAAM,QAAQ,GAAG,CAAA,MAAA,IAAI,CAAC,OAAO,CAAC,QAAQ,0CAAE,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,KAAI,EAAE,CAAC;gBAC3E,KAAK,MAAM,WAAW,IAAI,QAAQ,EAAE,CAAC;oBACnC,IAAI,CAAC;wBACH,MAAM,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;oBAE/C,CAAC;oBAAC,OAAO,KAAK,EAAE,CAAC;wBACf,IAAI,CAAC,gBAAiB,CAAC,WAAW,CAAC,CAAC;oBACtC,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;KAAA;IAEO,UAAU;QAChB,IAAI,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAAC;YACtD,IAAI,IAAI,CAAC,eAAe,IAAI,SAAS,EAAE,CAAC;gBACtC,aAAa,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;gBACpC,IAAI,CAAC,eAAe,GAAG,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC5E,CAAC;QACH,CAAC;IACH,CAAC;IAEO,YAAY;QAClB,IAAI,CAAC,IAAI,CAAC,iBAAiB,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC;YACxD,aAAa,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;YACpC,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC;QACnC,CAAC;IACH,CAAC;CACF;AA5ED,4BA4EC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@licensespring/node-sdk",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"main": "dist/src/index.js",
|
|
5
|
+
"modules": "dist/src/index.js",
|
|
6
|
+
"types": "dist/src/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"postinstall": "node ./hwid/install.js",
|
|
9
|
+
"build": "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",
|
|
10
|
+
"test": "NODE_ENV=dev npx jest",
|
|
11
|
+
"prepare": "ts-patch install && typia patch",
|
|
12
|
+
"dev-test": "NODE_ENV=dev npx ts-node index.ts"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist/**/*"
|
|
16
|
+
],
|
|
17
|
+
"author": "",
|
|
18
|
+
"license": "ISC",
|
|
19
|
+
"description": "",
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@eslint/js": "^9.11.1",
|
|
22
|
+
"@types/elliptic": "^6.4.18",
|
|
23
|
+
"@types/eslint__js": "^8.42.3",
|
|
24
|
+
"@types/jest": "^29.5.13",
|
|
25
|
+
"cpx": "^1.5.0",
|
|
26
|
+
"dotenv": "^16.4.5",
|
|
27
|
+
"dotenv-run-script": "^0.4.1",
|
|
28
|
+
"eslint": "^9.11.1",
|
|
29
|
+
"jest": "^29.7.0",
|
|
30
|
+
"ts-jest": "^29.2.5",
|
|
31
|
+
"ts-patch": "^3.2.1",
|
|
32
|
+
"typedoc": "^0.27.2",
|
|
33
|
+
"typescript": "^5.6.2",
|
|
34
|
+
"typescript-eslint": "^8.7.0"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"axios": "^1.7.7",
|
|
38
|
+
"dayjs": "^1.11.13",
|
|
39
|
+
"elliptic": "^6.6.1",
|
|
40
|
+
"hash.js": "^1.1.7",
|
|
41
|
+
"koffi": "^2.9.1",
|
|
42
|
+
"typia": "^6.11.1",
|
|
43
|
+
"unzipper": "^0.12.3"
|
|
44
|
+
}
|
|
45
|
+
}
|