@licensespring/node-sdk 1.0.6 → 1.0.7
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 +36 -42
- package/dist/src/api.d.ts +1530 -226
- package/dist/src/license.d.ts +1 -1
- package/dist/src/service.js.map +1 -1
- package/dist/src/types.d.ts +12 -10
- 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/LICENSE.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
## LicenseSpring SDK Source Code License (LSSCL)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
Preamble:
|
|
5
|
+
|
|
6
|
+
This LicenseSpring SDK Source Code License (LSSCL) governs the use, distribution, and modification of the source code for this LicenseSpring SDKs. This SDK is designed to facilitate the integration of LicenseSpring's license management service into your applications. By accessing, using, or modifying the SDK, you agree to the terms and conditions set forth in this license.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
1. Permissions:
|
|
10
|
+
|
|
11
|
+
* You are permitted to access, read, and modify the source code of this LicenseSpring SDK.
|
|
12
|
+
|
|
13
|
+
* You may create derivative works that include this SDK, provided all derivative works are used solely as part of the LicenseSpring service.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
2. Distribution:
|
|
17
|
+
|
|
18
|
+
* You may distribute the original or modified versions of software that incorporates the SDK, provided that all distributed versions retain this LSSCL license.
|
|
19
|
+
|
|
20
|
+
* Distributed versions, including modifications, must be used to facilitate the integration of LicenseSpring’s service and may not be:
|
|
21
|
+
|
|
22
|
+
* Provided as part of a hosted or cloud-based service that allows others to access the SDK’s functionality without interacting directly with the LicenseSpring service.
|
|
23
|
+
|
|
24
|
+
* Integrated into other services which compete with or do not use the LicenseSpring service.
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
3. Usage Restrictions:
|
|
28
|
+
|
|
29
|
+
* The SDK, in its original or modified form, may only be used as part of the LicenseSpring service, whether on a free or paid plan.
|
|
30
|
+
|
|
31
|
+
* You are prohibited from using the SDK independently or as part of any service that does not interact with the LicenseSpring service.
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
4. Prohibited Actions:
|
|
35
|
+
|
|
36
|
+
* You may not circumvent or disable any technical measures that control access to the SDK.
|
|
37
|
+
|
|
38
|
+
* You must not remove, alter, or obscure any license notices, copyright notices, or other proprietary notices from the SDK.
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
5. Termination:
|
|
42
|
+
|
|
43
|
+
* Any violation of these terms will result in the automatic termination of your rights under this license.
|
|
44
|
+
|
|
45
|
+
* Upon termination, you must cease all use and distribution of the SDK and destroy all copies in your possession.
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
6. Disclaimer of Warranty and Liability:
|
|
49
|
+
|
|
50
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND LICENSESPRING DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. LICENSESPRING SHALL NOT BE LIABLE FOR ANY DAMAGES ARISING OUT OF OR RELATED TO THE USE OR PERFORMANCE OF THE SOFTWARE.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
Copyright 2024 Cense Data Inc DBA LicenseSpring
|
|
55
|
+
|
|
56
|
+
Contact: support@licensespring.com
|
package/README.md
CHANGED
|
@@ -804,6 +804,30 @@ const licenseAPI = new LicenseAPI({
|
|
|
804
804
|
The following are typescript definitions for all the types used in the SDK:
|
|
805
805
|
|
|
806
806
|
```typescript
|
|
807
|
+
/** Date string in ISO 8601 format (always in UTC timezone) with optional separators and optional time component, e.g.:
|
|
808
|
+
*
|
|
809
|
+
* "2024-09-27T23:30:48.016Z"
|
|
810
|
+
*
|
|
811
|
+
* "2024-09-27 23:30:48.016"
|
|
812
|
+
*
|
|
813
|
+
* "2024-09-27 23:30:48"
|
|
814
|
+
*
|
|
815
|
+
* "2024-09-27 23:30"
|
|
816
|
+
*
|
|
817
|
+
* "2024-09-27"
|
|
818
|
+
*
|
|
819
|
+
*/
|
|
820
|
+
export type DateInputString = string;
|
|
821
|
+
|
|
822
|
+
/** Date string in full ISO 8601 format, e.g. "2024-09-27T23:30:48.016Z". Note: this is always in UTC timezone */
|
|
823
|
+
export type DateISO8601UTC = string;
|
|
824
|
+
|
|
825
|
+
/** Date string in RFC 7231 format, e.g. "Fri, 27 Sep 2024 23:30:48 GMT". Note: this is always in GMT timezone */
|
|
826
|
+
export type DateRFC7231 = string;
|
|
827
|
+
|
|
828
|
+
/** Length of time expressed in days, months or years, e.g. 5d, 2m, 3y */
|
|
829
|
+
export type TimeLength = string;
|
|
830
|
+
|
|
807
831
|
export type LicensespringConfig = {
|
|
808
832
|
apiKey: string,
|
|
809
833
|
sharedKey: string,
|
|
@@ -925,6 +949,8 @@ export type PasswordChangePayload = { username: string, password: string, new_pa
|
|
|
925
949
|
|
|
926
950
|
export type LicenseIdentificatorWithInstallation = LicenseIdentificator & { env: string, channel: string, version: string };
|
|
927
951
|
|
|
952
|
+
export type Managed<T> = Omit<T, 'product' | 'hardware_id'>;
|
|
953
|
+
|
|
928
954
|
/**
|
|
929
955
|
* @type {LicenseIdentificator}
|
|
930
956
|
*
|
|
@@ -1023,7 +1049,7 @@ export type ProductFeature = {
|
|
|
1023
1049
|
allow_overages: number,
|
|
1024
1050
|
max_overages: number,
|
|
1025
1051
|
reset_consumption: boolean,
|
|
1026
|
-
consumption_period:
|
|
1052
|
+
consumption_period: 'daily' | 'weekly' | 'monthly' | 'annualy' | null,
|
|
1027
1053
|
}> & XOR<{
|
|
1028
1054
|
is_floating: false
|
|
1029
1055
|
}, {
|
|
@@ -1117,7 +1143,6 @@ export type LicenseResponse = {
|
|
|
1117
1143
|
floating_in_use_devices: number,
|
|
1118
1144
|
}) & {
|
|
1119
1145
|
floating_users: number,
|
|
1120
|
-
floating_timeout: number,
|
|
1121
1146
|
},
|
|
1122
1147
|
{
|
|
1123
1148
|
is_floating_cloud: false,
|
|
@@ -1137,7 +1162,7 @@ export type LicenseResponse = {
|
|
|
1137
1162
|
allow_overages: boolean,
|
|
1138
1163
|
max_overages: number,
|
|
1139
1164
|
reset_consumption: boolean,
|
|
1140
|
-
consumption_period:
|
|
1165
|
+
consumption_period: 'daily' | 'weekly' | 'monthly' | 'annually' | null,
|
|
1141
1166
|
},
|
|
1142
1167
|
{}
|
|
1143
1168
|
>;
|
|
@@ -1191,7 +1216,7 @@ type LicenseTrialNewCommon = {
|
|
|
1191
1216
|
enabled: boolean,
|
|
1192
1217
|
max_transfers: number,
|
|
1193
1218
|
trial_days: number,
|
|
1194
|
-
maintenance_duration:
|
|
1219
|
+
maintenance_duration: TimeLength | null,
|
|
1195
1220
|
validity_period: DateISO8601UTC | null,
|
|
1196
1221
|
enable_maintenance_period: boolean,
|
|
1197
1222
|
prevent_vm: boolean,
|
|
@@ -1224,7 +1249,7 @@ type LicenseTrialNew = LicenseTrialNewCommon
|
|
|
1224
1249
|
max_overages: number,
|
|
1225
1250
|
max_consumptions: number,
|
|
1226
1251
|
valid_duration: null,
|
|
1227
|
-
consumption_period:
|
|
1252
|
+
consumption_period: 'daily' | 'weekly' | 'monthly' | 'annually' | null,
|
|
1228
1253
|
reset_consumption: boolean,
|
|
1229
1254
|
},
|
|
1230
1255
|
XOR<
|
|
@@ -1307,7 +1332,7 @@ export type LicenseProductFeature = {
|
|
|
1307
1332
|
allow_overages: boolean,
|
|
1308
1333
|
max_overages: number,
|
|
1309
1334
|
reset_consumption: number,
|
|
1310
|
-
consumption_period:
|
|
1335
|
+
consumption_period: 'daily' | 'weekly' | 'monthly' | 'annually' | null,
|
|
1311
1336
|
expiry_date: DateISO8601UTC | null,
|
|
1312
1337
|
is_floating: boolean,
|
|
1313
1338
|
is_floating_cloud: boolean,
|
|
@@ -1327,7 +1352,7 @@ export type LicenseConsumptionsResponse = {
|
|
|
1327
1352
|
allow_overages: boolean,
|
|
1328
1353
|
max_overages: number,
|
|
1329
1354
|
reset_consumption: boolean,
|
|
1330
|
-
consumption_period:
|
|
1355
|
+
consumption_period: 'daily' | 'weekly' | 'monthly' | 'annually' | null,
|
|
1331
1356
|
};
|
|
1332
1357
|
|
|
1333
1358
|
export type LicenseFeatureConsumptionResponse = {
|
|
@@ -1412,41 +1437,10 @@ export enum HardwareIdAlgorithm {
|
|
|
1412
1437
|
CloudPlatformsId = 5,
|
|
1413
1438
|
};
|
|
1414
1439
|
|
|
1415
|
-
|
|
1416
|
-
*
|
|
1417
|
-
* "2024-09-27T23:30:48.016Z"
|
|
1418
|
-
*
|
|
1419
|
-
* "2024-09-27 23:30:48.016"
|
|
1420
|
-
*
|
|
1421
|
-
* "2024-09-27 23:30:48"
|
|
1422
|
-
*
|
|
1423
|
-
* "2024-09-27 23:30"
|
|
1424
|
-
*
|
|
1425
|
-
* "2024-09-27"
|
|
1426
|
-
*
|
|
1427
|
-
*/
|
|
1428
|
-
export type DateInputString = string;
|
|
1429
|
-
|
|
1430
|
-
/** Date string in full ISO 8601 format, e.g. "2024-09-27T23:30:48.016Z". Note: this is always in UTC timezone */
|
|
1431
|
-
export type DateISO8601UTC = string;
|
|
1440
|
+
```
|
|
1432
1441
|
|
|
1433
|
-
|
|
1434
|
-
export type DateRFC7231 = string;
|
|
1442
|
+
## License
|
|
1435
1443
|
|
|
1436
|
-
|
|
1444
|
+
* node.js SDK license: [LicenseSpring SDK Source Code License](LICENSE.md)
|
|
1437
1445
|
|
|
1438
|
-
|
|
1439
|
-
type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
|
|
1440
|
-
type EvalIfIs<T, U> = unknown extends T ? never : U;
|
|
1441
|
-
type XOR<A, B, C = unknown, D = unknown, E = unknown, F = unknown, G = unknown, H = unknown> =
|
|
1442
|
-
ListProps<
|
|
1443
|
-
(Without<B & C & D & E & F & G & H, A> & A)
|
|
1444
|
-
| (Without<A & C & D & E & F & G & H, B> & B)
|
|
1445
|
-
| EvalIfIs<C, Without<A & B & D & E & F & G & H, C> & C>
|
|
1446
|
-
| EvalIfIs<D, Without<A & B & C & E & F & G & H, D> & D>
|
|
1447
|
-
| EvalIfIs<E, Without<A & B & C & D & F & G & H, E> & E>
|
|
1448
|
-
| EvalIfIs<F, Without<A & B & C & D & E & G & H, F> & F>
|
|
1449
|
-
| EvalIfIs<G, Without<A & B & C & D & E & F & H, G> & G>
|
|
1450
|
-
| EvalIfIs<H, Without<A & B & C & D & E & F & G, H> & H>
|
|
1451
|
-
>;
|
|
1452
|
-
```
|
|
1446
|
+
* Included 3rd-part library licenses: [https://docs.licensespring.com/sdk-licensing](https://docs.licensespring.com/sdk-licensing)
|