@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.
@@ -1,12 +1,16 @@
1
- export type JSON = {
2
- [key: string]: JSON | Array<JSON> | string | number | boolean;
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: string;
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: string | null;
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: number;
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: DateISO8601UTC | null;
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: DateISO8601UTC | null;
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: string | null;
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: string | null;
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: string | null;
456
+ consumption_period: 'daily' | 'weekly' | 'monthly' | 'annually' | null;
450
457
  };
451
458
  export type LicenseFeatureConsumptionResponse = {
452
- total_consumptions: number;
453
- is_floating: boolean;
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
- floating_timeout: number;
456
- floating_users: number;
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;
@@ -1 +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"}
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"}
@@ -1,2 +1,2 @@
1
- declare const SDK_VERSION = "1.0.6";
1
+ declare const SDK_VERSION = "1.0.8";
2
2
  export default SDK_VERSION;
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const SDK_VERSION = '1.0.6';
3
+ const SDK_VERSION = '1.0.8';
4
4
  exports.default = SDK_VERSION;
5
5
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@licensespring/node-sdk",
3
- "version": "1.0.6",
3
+ "version": "1.0.9",
4
4
  "main": "dist/src/index.js",
5
5
  "modules": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",