@licensespring/node-sdk 1.0.6 → 1.0.9
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/LICENSE.md +56 -0
- package/README.md +92 -46
- package/dist/src/abstract-manager.d.ts +2 -0
- package/dist/src/abstract-manager.js +43 -2
- package/dist/src/abstract-manager.js.map +1 -1
- package/dist/src/api.d.ts +1572 -266
- package/dist/src/api.js +79 -3
- package/dist/src/api.js.map +1 -1
- package/dist/src/floating.d.ts +2 -0
- package/dist/src/floating.js +43 -2
- package/dist/src/floating.js.map +1 -1
- package/dist/src/license-file.js +37 -1
- package/dist/src/license-file.js.map +1 -1
- package/dist/src/license.d.ts +1 -1
- package/dist/src/service.d.ts +3 -1
- package/dist/src/service.js +12 -2
- package/dist/src/service.js.map +1 -1
- package/dist/src/types.d.ts +30 -16
- package/dist/src/types.js.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +1 -1
package/dist/src/types.d.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { AxiosProxyConfig } from 'axios';
|
|
2
|
+
export type JSON = string | number | boolean | null | JSONObject | JSONArray;
|
|
3
|
+
interface JSONObject {
|
|
4
|
+
[key: string]: JSON;
|
|
5
|
+
}
|
|
6
|
+
type JSONArray = JSON[];
|
|
4
7
|
export type Dictionary<T = string> = {
|
|
5
8
|
[key: string]: T;
|
|
6
9
|
};
|
|
7
10
|
export type DateInputString = string;
|
|
8
11
|
export type DateISO8601UTC = string;
|
|
9
12
|
export type DateRFC7231 = string;
|
|
13
|
+
export type TimeLength = string;
|
|
10
14
|
export type LicensespringConfig = {
|
|
11
15
|
apiKey: string;
|
|
12
16
|
sharedKey: string;
|
|
@@ -23,10 +27,12 @@ export type LicensespringConfig = {
|
|
|
23
27
|
isGuardFileEnabled: boolean;
|
|
24
28
|
hardwareIDMethod: number;
|
|
25
29
|
sdkVersion: string;
|
|
30
|
+
proxy?: AxiosProxyConfig;
|
|
26
31
|
};
|
|
27
32
|
export type LicensespringAPIConfig = Omit<LicensespringConfig, 'productCode'>;
|
|
28
33
|
export type LicensespringConfigDef = Omit<LicensespringConfig, 'apiPath' | 'publicKey' | 'filename' | 'filePath' | 'gracePeriod' | 'fileKey' | 'isGuardFileEnabled' | 'hardwareIDMethod' | 'sdkVersion'> & {
|
|
29
34
|
apiPath?: string;
|
|
35
|
+
proxy?: AxiosProxyConfig;
|
|
30
36
|
publicKey?: string;
|
|
31
37
|
filename?: string;
|
|
32
38
|
filePath?: string;
|
|
@@ -37,6 +43,7 @@ export type LicensespringConfigDef = Omit<LicensespringConfig, 'apiPath' | 'publ
|
|
|
37
43
|
};
|
|
38
44
|
export type LicensespringAPIConfigDef = Omit<LicensespringAPIConfig, 'apiPath' | 'publicKey' | 'filename' | 'filePath' | 'gracePeriod' | 'fileKey' | 'isGuardFileEnabled' | 'hardwareIDMethod' | 'sdkVersion'> & {
|
|
39
45
|
apiPath?: string;
|
|
46
|
+
proxy?: AxiosProxyConfig;
|
|
40
47
|
publicKey?: string;
|
|
41
48
|
filename?: string;
|
|
42
49
|
filePath?: string;
|
|
@@ -50,6 +57,7 @@ export type LicensespringFloatingConfig = {
|
|
|
50
57
|
appVersion: string;
|
|
51
58
|
hardwareIDMethod: number;
|
|
52
59
|
sdkVersion: string;
|
|
60
|
+
proxy?: AxiosProxyConfig;
|
|
53
61
|
};
|
|
54
62
|
export type LicensespringFloatingConfigDef = Omit<LicensespringFloatingConfig, 'hardwareIDMethod' | 'sdkVersion'> & {
|
|
55
63
|
hardwareIDMethod?: number;
|
|
@@ -160,7 +168,7 @@ export type LicenseUser = {
|
|
|
160
168
|
};
|
|
161
169
|
export type ProductDetails = {
|
|
162
170
|
product_id: number;
|
|
163
|
-
product_name
|
|
171
|
+
product_name?: string;
|
|
164
172
|
short_code: string;
|
|
165
173
|
authorization_method: 'license-key' | 'user';
|
|
166
174
|
metadata: JSON;
|
|
@@ -202,7 +210,7 @@ export type ProductFeature = {
|
|
|
202
210
|
allow_overages: number;
|
|
203
211
|
max_overages: number;
|
|
204
212
|
reset_consumption: boolean;
|
|
205
|
-
consumption_period:
|
|
213
|
+
consumption_period: 'daily' | 'weekly' | 'monthly' | 'annualy' | null;
|
|
206
214
|
}> & XOR<{
|
|
207
215
|
is_floating: false;
|
|
208
216
|
}, {
|
|
@@ -240,7 +248,7 @@ export type LicenseResponse = {
|
|
|
240
248
|
max_borrow_time: number;
|
|
241
249
|
max_license_users: number;
|
|
242
250
|
max_overages: number;
|
|
243
|
-
max_transfers
|
|
251
|
+
max_transfers?: number;
|
|
244
252
|
order_store_id: string;
|
|
245
253
|
prevent_vm: boolean;
|
|
246
254
|
release_date: string;
|
|
@@ -271,7 +279,6 @@ export type LicenseResponse = {
|
|
|
271
279
|
floating_in_use_devices: number;
|
|
272
280
|
}) & {
|
|
273
281
|
floating_users: number;
|
|
274
|
-
floating_timeout: number;
|
|
275
282
|
}, {
|
|
276
283
|
is_floating_cloud: false;
|
|
277
284
|
is_floating: false;
|
|
@@ -288,7 +295,7 @@ export type LicenseResponse = {
|
|
|
288
295
|
allow_overages: boolean;
|
|
289
296
|
max_overages: number;
|
|
290
297
|
reset_consumption: boolean;
|
|
291
|
-
consumption_period:
|
|
298
|
+
consumption_period: 'daily' | 'weekly' | 'monthly' | 'annually' | null;
|
|
292
299
|
}, {}>;
|
|
293
300
|
export type LicenseResponseOffline = LicenseResponse & {
|
|
294
301
|
license_signature_v2: string;
|
|
@@ -327,7 +334,7 @@ type LicenseTrialNewCommon = {
|
|
|
327
334
|
enabled: boolean;
|
|
328
335
|
max_transfers: number;
|
|
329
336
|
trial_days: number;
|
|
330
|
-
maintenance_duration:
|
|
337
|
+
maintenance_duration: TimeLength | null;
|
|
331
338
|
validity_period: DateISO8601UTC | null;
|
|
332
339
|
enable_maintenance_period: boolean;
|
|
333
340
|
prevent_vm: boolean;
|
|
@@ -353,7 +360,7 @@ type LicenseTrialNew = LicenseTrialNewCommon & (XOR<{
|
|
|
353
360
|
max_overages: number;
|
|
354
361
|
max_consumptions: number;
|
|
355
362
|
valid_duration: null;
|
|
356
|
-
consumption_period:
|
|
363
|
+
consumption_period: 'daily' | 'weekly' | 'monthly' | 'annually' | null;
|
|
357
364
|
reset_consumption: boolean;
|
|
358
365
|
}, XOR<{
|
|
359
366
|
license_type: 'subscription';
|
|
@@ -424,7 +431,7 @@ export type LicenseProductFeature = {
|
|
|
424
431
|
allow_overages: boolean;
|
|
425
432
|
max_overages: number;
|
|
426
433
|
reset_consumption: number;
|
|
427
|
-
consumption_period:
|
|
434
|
+
consumption_period: 'daily' | 'weekly' | 'monthly' | 'annually' | null;
|
|
428
435
|
expiry_date: DateISO8601UTC | null;
|
|
429
436
|
is_floating: boolean;
|
|
430
437
|
is_floating_cloud: boolean;
|
|
@@ -446,14 +453,21 @@ export type LicenseConsumptionsResponse = {
|
|
|
446
453
|
allow_overages: boolean;
|
|
447
454
|
max_overages: number;
|
|
448
455
|
reset_consumption: boolean;
|
|
449
|
-
consumption_period:
|
|
456
|
+
consumption_period: 'daily' | 'weekly' | 'monthly' | 'annually' | null;
|
|
450
457
|
};
|
|
451
458
|
export type LicenseFeatureConsumptionResponse = {
|
|
452
|
-
|
|
453
|
-
|
|
459
|
+
allow_negative_consumptions: boolean;
|
|
460
|
+
allow_overages: boolean;
|
|
461
|
+
allow_unlimited_consumptions: boolean;
|
|
462
|
+
consumption_period: 'daily' | 'weekly' | 'monthly' | 'annually' | null;
|
|
454
463
|
is_floating_cloud: boolean;
|
|
455
|
-
|
|
456
|
-
|
|
464
|
+
is_floating: boolean;
|
|
465
|
+
max_consumptions: number;
|
|
466
|
+
max_overages: number;
|
|
467
|
+
reset_consumption: boolean;
|
|
468
|
+
total_consumptions: number;
|
|
469
|
+
floating_timeout?: number | null;
|
|
470
|
+
floating_users?: number;
|
|
457
471
|
};
|
|
458
472
|
export type ProductDetailsResponse = ProductDetails & {
|
|
459
473
|
floating_timeout: number;
|
package/dist/src/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";;;AA+qBA,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"}
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const SDK_VERSION = "1.0.
|
|
1
|
+
declare const SDK_VERSION = "1.0.8";
|
|
2
2
|
export default SDK_VERSION;
|
package/dist/src/version.js
CHANGED