@licensespring/node-sdk 1.0.10 → 1.1.0-alpha
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 +83 -566
- package/dist/package.json +47 -0
- package/dist/src/api.d.ts +1013 -82
- package/dist/src/api.js +6041 -1511
- package/dist/src/api.js.map +1 -1
- package/dist/src/common.d.ts +19 -4
- package/dist/src/common.js.map +1 -1
- package/dist/src/license-manager.d.ts +28 -22
- package/dist/src/license-manager.js +286 -506
- package/dist/src/license-manager.js.map +1 -1
- package/dist/src/license.d.ts +1 -1
- package/dist/src/license.js.map +1 -1
- package/dist/src/schema.d.ts +1561 -0
- package/dist/src/schema.js +647 -0
- package/dist/src/schema.js.map +1 -0
- package/dist/src/service.d.ts +2 -3
- package/dist/src/service.js.map +1 -1
- package/dist/src/types.d.ts +38 -73
- package/dist/src/types.js.map +1 -1
- package/dist/src/version.d.ts +2 -2
- package/dist/src/version.js +5 -2
- package/dist/src/version.js.map +1 -1
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -105,20 +105,59 @@ deactivateLicense(payload: LicenseIdentificator): Promise<boolean>
|
|
|
105
105
|
|
|
106
106
|
#### Activate License Offline
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
```typescript
|
|
109
|
+
createOfflineActivationPayload(payload: CreateOfflineActivationRequestPayload): string
|
|
110
|
+
|
|
111
|
+
checkOfflineActivationResponse(payload: string): LicenseResponseOffline
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
First create an offline request payload, which can be stored in a file:
|
|
115
|
+
|
|
116
|
+
```typescript
|
|
117
|
+
const offlineActivationPayload = licenseAPI.createOfflineActivationPayload({
|
|
118
|
+
'license_key': 'AAAA-0000-1111-2222',
|
|
119
|
+
'product': 'productcode',
|
|
120
|
+
'hardware_id': 'a0b1c2d3',
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
nodeFs.writeFileSync('activate_offline.req', offlineActivationPayload);
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
This file is then uploaded to the [https://docs.licensespring.com/portals/offline](Offline Portal). If the file is valid, the system will activate the license. This will also generate an `ls_activation.lic` file, which you can forward to your offline application and verify it locally.
|
|
127
|
+
|
|
128
|
+
The contents of this file are verified using `checkOfflineActivationResponse`, for example:
|
|
109
129
|
|
|
110
130
|
```typescript
|
|
111
|
-
|
|
131
|
+
const activationResponse = nodeFs.readFileSync('ls_activation.lic');
|
|
132
|
+
|
|
133
|
+
try {
|
|
134
|
+
return licenseAPI.checkOfflineActivationResponse(activationResponse);
|
|
135
|
+
} catch (error) {
|
|
136
|
+
return false;
|
|
137
|
+
}
|
|
112
138
|
```
|
|
113
139
|
|
|
114
140
|
#### Deactivate License Offline
|
|
115
141
|
|
|
116
|
-
[https://docs.licensespring.com/license-api/activation-deactivation/offline-deactivation](https://docs.licensespring.com/license-api/activation-deactivation/offline-deactivation)
|
|
117
142
|
|
|
118
143
|
```typescript
|
|
119
|
-
|
|
144
|
+
createOfflineDectivationPayload(payload: CreateOfflineActivationRequestPayload): string
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
First create an offline request payload, which can be stored in a file:
|
|
148
|
+
|
|
149
|
+
```typescript
|
|
150
|
+
const offlineDectivationPayload = licenseAPI.createOfflineDectivationPayload({
|
|
151
|
+
'license_key': 'AAAA-0000-1111-2222',
|
|
152
|
+
'product': 'productcode',
|
|
153
|
+
'hardware_id': 'a0b1c2d3',
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
nodeFs.writeFileSync('deactivate_offline.req', offlineDectivationPayload);
|
|
120
157
|
```
|
|
121
158
|
|
|
159
|
+
This file is then uploaded to the [https://docs.licensespring.com/portals/offline](Offline Portal). If the file is valid, the system will deactivate the license.
|
|
160
|
+
|
|
122
161
|
#### Get Trial License Key
|
|
123
162
|
|
|
124
163
|
[https://docs.licensespring.com/license-api/trial-key](https://docs.licensespring.com/license-api/trial-key)
|
|
@@ -356,20 +395,54 @@ deactivateLicense(payload: Managed<LicenseIdentificator>): Promise<boolean>
|
|
|
356
395
|
|
|
357
396
|
#### Activate License Offline
|
|
358
397
|
|
|
359
|
-
|
|
398
|
+
```typescript
|
|
399
|
+
createOfflineActivationPayload(payload: Managed<CreateOfflineActivationRequestPayload>): string
|
|
360
400
|
|
|
361
|
-
|
|
362
|
-
|
|
401
|
+
activateOffline(payload: string): LicenseResponseOffline
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
First create an offline request payload, which can be stored in a file:
|
|
405
|
+
|
|
406
|
+
```typescript
|
|
407
|
+
const offlineActivationPayload = licenseManager.createOfflineActivationPayload({
|
|
408
|
+
'license_key': 'AAAA-0000-1111-2222'
|
|
409
|
+
});
|
|
410
|
+
|
|
411
|
+
nodeFs.writeFileSync('activate_offline.req', offlineActivationPayload);
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
This file is then uploaded to the [https://docs.licensespring.com/portals/offline](Offline Portal). If the file is valid, the system will activate the license. This will also generate an `ls_activation.lic` file, which you can forward to your offline application.
|
|
415
|
+
|
|
416
|
+
You can then pass the contents of this `ls_activation.lic` file to `activateOffline` which will verify the file response and (if valid) apply the activation locally. For example:
|
|
417
|
+
|
|
418
|
+
```typescript
|
|
419
|
+
const activationResponse = nodeFs.readFileSync('ls_activation.lic');
|
|
420
|
+
activateOffline(activationResponse);
|
|
363
421
|
```
|
|
364
422
|
|
|
365
423
|
#### Deactivate License Offline
|
|
366
424
|
|
|
367
|
-
[https://docs.licensespring.com/license-api/activation-deactivation/offline-deactivation](https://docs.licensespring.com/license-api/activation-deactivation/offline-deactivation)
|
|
368
425
|
|
|
369
|
-
```
|
|
370
|
-
|
|
426
|
+
```typescript
|
|
427
|
+
createOfflineDectivationPayload(payload: Managed<CreateOfflineActivationRequestPayload>): string
|
|
428
|
+
|
|
429
|
+
deactivateOffline(): void
|
|
371
430
|
```
|
|
372
431
|
|
|
432
|
+
First create an offline request payload, which can be stored in a file:
|
|
433
|
+
|
|
434
|
+
```typescript
|
|
435
|
+
const offlineDectivationPayload = licenseManager.createOfflineDectivationPayload({
|
|
436
|
+
'license_key': 'AAAA-0000-1111-2222'
|
|
437
|
+
});
|
|
438
|
+
|
|
439
|
+
nodeFs.writeFileSync('deactivate_offline.req', offlineDectivationPayload);
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
This file is then uploaded to the [https://docs.licensespring.com/portals/offline](Offline Portal). If the file is valid, the system will deactivate the license.
|
|
443
|
+
|
|
444
|
+
To apply the license deactivation locally, you can call `licenseManager.deactivateOffline()`.
|
|
445
|
+
|
|
373
446
|
#### Get Trial License Key
|
|
374
447
|
|
|
375
448
|
[https://docs.licensespring.com/license-api/trial-key](https://docs.licensespring.com/license-api/trial-key)
|
|
@@ -924,562 +997,6 @@ export type LicensespringFloatingConfigDef = Omit<LicensespringFloatingConfig, '
|
|
|
924
997
|
hardwareIDMethod?: number,
|
|
925
998
|
};
|
|
926
999
|
|
|
927
|
-
type LicenseIdentificatorKeyBased = {
|
|
928
|
-
license_key: string,
|
|
929
|
-
};
|
|
930
|
-
|
|
931
|
-
type LicenseIdentificatorUserBased = {
|
|
932
|
-
username: string,
|
|
933
|
-
};
|
|
934
|
-
|
|
935
|
-
type LicenseActivationIdentificatorUserBased = {
|
|
936
|
-
username: string,
|
|
937
|
-
password: string,
|
|
938
|
-
};
|
|
939
|
-
|
|
940
|
-
type LicenseIdentificatorUserSSOBased = ({
|
|
941
|
-
id_token: string,
|
|
942
|
-
} | {
|
|
943
|
-
code: string,
|
|
944
|
-
}) & {
|
|
945
|
-
customer_account_code: string,
|
|
946
|
-
};
|
|
947
|
-
|
|
948
|
-
export type SSOURLParams = {
|
|
949
|
-
product: string,
|
|
950
|
-
type: 'token'|'code',
|
|
951
|
-
};
|
|
952
|
-
|
|
953
|
-
type LicenseIdentificatiorRequired = {
|
|
954
|
-
hardware_id: string,
|
|
955
|
-
product: string,
|
|
956
|
-
bundle_code?: string,
|
|
957
|
-
license_id?: number,
|
|
958
|
-
};
|
|
959
|
-
|
|
960
|
-
export type LicenseActivationIdentificatorWithVariables = LicenseActivationIdentificator & { variables?: Dictionary<string> };
|
|
961
|
-
export type LicenseActivationIdentificatorOfflineWithVariables = LicenseActivationIdentificator & OfflineActivationRequest & { variables?: Dictionary<string> };
|
|
962
|
-
|
|
963
|
-
export type LicenseIdentificatorWithVariables = LicenseIdentificator & { variables?: Dictionary<string> };
|
|
964
|
-
|
|
965
|
-
export type LicenseIdentificatorOfflineWithVariables = LicenseIdentificator & OfflineActivationRequest & { variables?: Dictionary<string> };
|
|
966
|
-
|
|
967
|
-
export type TrialKeyPayload = { email: string, product: string, hardware_id: string };
|
|
968
|
-
|
|
969
|
-
export type GetUserLicensesPayload = { username: string, password: string, product: string };
|
|
970
|
-
|
|
971
|
-
export type GetCustomerLicensesPayload = { customer: string, product: string };
|
|
972
|
-
|
|
973
|
-
export type LicenseIdentificatorAndFeature = LicenseIdentificator & { feature: string };
|
|
974
|
-
|
|
975
|
-
export type LicenseIdentificatorAddConsumptions = LicenseIdentificator & { consumptions: number };
|
|
976
|
-
|
|
977
|
-
export type LicenseIdentificatorAddFeatureConsumptions = LicenseIdentificator & { feature: string, consumptions: number };
|
|
978
|
-
|
|
979
|
-
export type ProductDetailsPayload = {
|
|
980
|
-
product: string,
|
|
981
|
-
/** @defaultValue false */
|
|
982
|
-
include_expired_features?: boolean,
|
|
983
|
-
/** @defaultValue false */
|
|
984
|
-
include_latest_version?: boolean,
|
|
985
|
-
/** @defaultValue false */
|
|
986
|
-
include_custom_fields?: boolean,
|
|
987
|
-
}
|
|
988
|
-
|
|
989
|
-
export type LicenseIdentificatorWithBorrowedUntil = LicenseIdentificator & { borrowed_until: DateInputString };
|
|
990
|
-
|
|
991
|
-
export type PasswordChangePayload = { username: string, password: string, new_password: string };
|
|
992
|
-
|
|
993
|
-
export type LicenseIdentificatorWithInstallation = LicenseIdentificator & { env: string, channel: string, version: string };
|
|
994
|
-
|
|
995
|
-
export type Managed<T> = Omit<T, 'product' | 'hardware_id'>;
|
|
996
|
-
|
|
997
|
-
/**
|
|
998
|
-
* @type {LicenseIdentificator}
|
|
999
|
-
*
|
|
1000
|
-
* An object that identifies a License using either a license-key, user credentials or single sign-on credentials.
|
|
1001
|
-
* Optionally can include a `license_id` property to force a specific license is being selected.
|
|
1002
|
-
*/
|
|
1003
|
-
export type LicenseIdentificator = (
|
|
1004
|
-
XOR<LicenseIdentificatorKeyBased, LicenseIdentificatorUserBased>
|
|
1005
|
-
) & LicenseIdentificatiorRequired;
|
|
1006
|
-
|
|
1007
|
-
export type LicenseActivationIdentificator = (
|
|
1008
|
-
XOR<LicenseIdentificatorKeyBased, LicenseActivationIdentificatorUserBased, LicenseIdentificatorUserSSOBased>
|
|
1009
|
-
) & LicenseIdentificatiorRequired;
|
|
1010
|
-
|
|
1011
|
-
/**
|
|
1012
|
-
* @type {LicenseUser}
|
|
1013
|
-
*
|
|
1014
|
-
* An object describing a User associated to a specific license
|
|
1015
|
-
*/
|
|
1016
|
-
export type LicenseUser = {
|
|
1017
|
-
id: number,
|
|
1018
|
-
email: string,
|
|
1019
|
-
first_name: string,
|
|
1020
|
-
last_name: string,
|
|
1021
|
-
phone_number: string,
|
|
1022
|
-
is_initial_password: boolean,
|
|
1023
|
-
allow_unlimited_activations: boolean,
|
|
1024
|
-
max_activations: number,
|
|
1025
|
-
total_activations: number,
|
|
1026
|
-
};
|
|
1027
|
-
|
|
1028
|
-
/**
|
|
1029
|
-
* @type {ProductDetails}
|
|
1030
|
-
*
|
|
1031
|
-
* An object describing the basic properties of a Product
|
|
1032
|
-
*/
|
|
1033
|
-
export type ProductDetails = {
|
|
1034
|
-
product_id: number,
|
|
1035
|
-
product_name: string,
|
|
1036
|
-
short_code: string,
|
|
1037
|
-
authorization_method: 'license-key' | 'user',
|
|
1038
|
-
metadata: JSON,
|
|
1039
|
-
};
|
|
1040
|
-
|
|
1041
|
-
/**
|
|
1042
|
-
* @type {Customer}
|
|
1043
|
-
*
|
|
1044
|
-
* An object describing a Customer
|
|
1045
|
-
*/
|
|
1046
|
-
export type Customer = {
|
|
1047
|
-
email: string,
|
|
1048
|
-
company_name: string,
|
|
1049
|
-
reference: string,
|
|
1050
|
-
phone: string,
|
|
1051
|
-
first_name: string,
|
|
1052
|
-
last_name: string,
|
|
1053
|
-
city: string,
|
|
1054
|
-
postcode: string,
|
|
1055
|
-
state: string,
|
|
1056
|
-
country: string,
|
|
1057
|
-
address: string,
|
|
1058
|
-
customer_account: string|null,
|
|
1059
|
-
metadata: JSON,
|
|
1060
|
-
};
|
|
1061
|
-
|
|
1062
|
-
/**
|
|
1063
|
-
* @type {CustomField}
|
|
1064
|
-
*
|
|
1065
|
-
* An object describing a Custom Field. These are key-value pairs assigned to a Product and inherited by that product's Licenses. They can be overriden on the License level
|
|
1066
|
-
*/
|
|
1067
|
-
export type CustomField = {
|
|
1068
|
-
name: string,
|
|
1069
|
-
data_type: 'numer' | 'text' | 'date/time',
|
|
1070
|
-
value: string,
|
|
1071
|
-
};
|
|
1072
|
-
|
|
1073
|
-
/**
|
|
1074
|
-
* @type {ProductFeature}
|
|
1075
|
-
*
|
|
1076
|
-
* An object describing a Product Feature. These are custom attributes assigned to a Product and inherited by that product's Licenses
|
|
1077
|
-
*/
|
|
1078
|
-
export type ProductFeature = {
|
|
1079
|
-
id: number,
|
|
1080
|
-
code: string,
|
|
1081
|
-
name: string,
|
|
1082
|
-
expiry_date: string,
|
|
1083
|
-
metadata: JSON,
|
|
1084
|
-
is_floating_cloud: boolean,
|
|
1085
|
-
} & XOR<{
|
|
1086
|
-
feature_type: 'activation',
|
|
1087
|
-
}, {
|
|
1088
|
-
feature_type: 'consumption',
|
|
1089
|
-
max_consumption: number,
|
|
1090
|
-
allow_unlimited_consumptions: boolean,
|
|
1091
|
-
total_consumptions: number,
|
|
1092
|
-
allow_overages: number,
|
|
1093
|
-
max_overages: number,
|
|
1094
|
-
reset_consumption: boolean,
|
|
1095
|
-
consumption_period: 'daily' | 'weekly' | 'monthly' | 'annualy' | null,
|
|
1096
|
-
}> & XOR<{
|
|
1097
|
-
is_floating: false
|
|
1098
|
-
}, {
|
|
1099
|
-
is_floating: true,
|
|
1100
|
-
floating_users: number,
|
|
1101
|
-
floating_timeout?: number,
|
|
1102
|
-
}>;
|
|
1103
|
-
|
|
1104
|
-
/**
|
|
1105
|
-
* @type {LicenseType}
|
|
1106
|
-
*
|
|
1107
|
-
* Declares the type of License which is always one of the following:
|
|
1108
|
-
*
|
|
1109
|
-
* - *perpetual*: A perpetual license does not expire. The `is_expired` field on such a license will always be `false`.
|
|
1110
|
-
* Note that a perpetual *trial* license (`is_trial` flag is set to `true`) does have an `validity_period`, which refers to the end of the trial period.
|
|
1111
|
-
*
|
|
1112
|
-
* - *time-limited*: Has a `validity_period` set as a calendar date. After the date has passed, the `is_expired` flag will be set to `true`.
|
|
1113
|
-
*
|
|
1114
|
-
* - *subscription*: Uses an external source of truth such as a 3rd party service to determine the state of the License.
|
|
1115
|
-
*
|
|
1116
|
-
* - *consumption*: Permits usage metering. These licenses set a value the vendor wishes to meter, and then record the times that resource has been used.
|
|
1117
|
-
* Includes the following properties: `max_consumptions`, `total_consumptions`, `allow_unlimited_consumptions`, `allow_overages`, `max_overages`, `reset_consumption` and `consumption_period`.
|
|
1118
|
-
*
|
|
1119
|
-
*/
|
|
1120
|
-
export type LicenseType = 'perpetual' | 'time-limited' | 'consumption' | 'subscription';
|
|
1121
|
-
|
|
1122
|
-
/**
|
|
1123
|
-
* @type {LicenseResponse}
|
|
1124
|
-
*
|
|
1125
|
-
* The License object received as a response when checking or activating a License. Includes a set of common properties and additional ones which may or may not appear depending on `license_type`, `is_trial`, `is_floating`/`is_floating_cloud` and Product `authorization_method` (key-based vs. user based).
|
|
1126
|
-
*/
|
|
1127
|
-
export type LicenseResponse = {
|
|
1128
|
-
id: number;
|
|
1129
|
-
allow_grace_period: boolean,
|
|
1130
|
-
allow_overages: boolean,
|
|
1131
|
-
allow_unlimited_activations: boolean,
|
|
1132
|
-
borrowed_until: string | null,
|
|
1133
|
-
can_borrow: boolean,
|
|
1134
|
-
channel: string,
|
|
1135
|
-
device_id: number,
|
|
1136
|
-
enable_maintenance_period: boolean
|
|
1137
|
-
environment: string,
|
|
1138
|
-
eula_link: string,
|
|
1139
|
-
floating_timeout: number,
|
|
1140
|
-
grace_period: number,
|
|
1141
|
-
hash_md5: string,
|
|
1142
|
-
installation_file: string,
|
|
1143
|
-
is_air_gapped: boolean,
|
|
1144
|
-
is_borrowed: boolean,
|
|
1145
|
-
is_expired: boolean,
|
|
1146
|
-
is_hardware_key_auth: boolean,
|
|
1147
|
-
license_active: boolean,
|
|
1148
|
-
license_enabled: boolean,
|
|
1149
|
-
license_signature: string,
|
|
1150
|
-
license_type: LicenseType,
|
|
1151
|
-
maintenance_period: string | null,
|
|
1152
|
-
max_activations: number,
|
|
1153
|
-
max_borrow_time: number,
|
|
1154
|
-
max_license_users: number,
|
|
1155
|
-
max_overages: number,
|
|
1156
|
-
max_transfers: number,
|
|
1157
|
-
order_store_id: string,
|
|
1158
|
-
prevent_vm: boolean,
|
|
1159
|
-
release_date: string,
|
|
1160
|
-
release_notes_link: string,
|
|
1161
|
-
requires_version: string,
|
|
1162
|
-
size: string,
|
|
1163
|
-
start_date: string | null,
|
|
1164
|
-
times_activated: number,
|
|
1165
|
-
transfer_count: number,
|
|
1166
|
-
validity_period: DateISO8601UTC | null,
|
|
1167
|
-
version: string,
|
|
1168
|
-
product_features: ProductFeature[],
|
|
1169
|
-
custom_fields: CustomField[],
|
|
1170
|
-
customer: Customer,
|
|
1171
|
-
product_details: ProductDetails,
|
|
1172
|
-
metadata: JSON,
|
|
1173
|
-
}
|
|
1174
|
-
& XOR<{
|
|
1175
|
-
license_key: string,
|
|
1176
|
-
}, {
|
|
1177
|
-
user: LicenseUser,
|
|
1178
|
-
}>
|
|
1179
|
-
& XOR<({
|
|
1180
|
-
is_floating: true,
|
|
1181
|
-
is_floating_cloud: boolean,
|
|
1182
|
-
floating_in_use_devices: number,
|
|
1183
|
-
} | {
|
|
1184
|
-
is_floating: boolean,
|
|
1185
|
-
is_floating_cloud: true,
|
|
1186
|
-
floating_in_use_devices: number,
|
|
1187
|
-
}) & {
|
|
1188
|
-
floating_users: number,
|
|
1189
|
-
},
|
|
1190
|
-
{
|
|
1191
|
-
is_floating_cloud: false,
|
|
1192
|
-
is_floating: false,
|
|
1193
|
-
}>
|
|
1194
|
-
& XOR<{
|
|
1195
|
-
is_trial: false,
|
|
1196
|
-
}, {
|
|
1197
|
-
is_trial: true,
|
|
1198
|
-
trial_days: number,
|
|
1199
|
-
}>
|
|
1200
|
-
& XOR<{
|
|
1201
|
-
license_type: 'consumption',
|
|
1202
|
-
max_consumptions: number,
|
|
1203
|
-
total_consumptions: number,
|
|
1204
|
-
allow_unlimited_consumptions: boolean,
|
|
1205
|
-
allow_overages: boolean,
|
|
1206
|
-
max_overages: number,
|
|
1207
|
-
reset_consumption: boolean,
|
|
1208
|
-
consumption_period: 'daily' | 'weekly' | 'monthly' | 'annually' | null,
|
|
1209
|
-
},
|
|
1210
|
-
{}
|
|
1211
|
-
>;
|
|
1212
|
-
|
|
1213
|
-
/**
|
|
1214
|
-
* @type {LicenseResponseOffline}
|
|
1215
|
-
*
|
|
1216
|
-
* The License object received as a response when activating a License using the Offline method.
|
|
1217
|
-
* This type is equal to LicenseResponse with the addition of the `license_signature_v2` property.
|
|
1218
|
-
*/
|
|
1219
|
-
export type LicenseResponseOffline = LicenseResponse & {
|
|
1220
|
-
license_signature_v2: string,
|
|
1221
|
-
};
|
|
1222
|
-
|
|
1223
|
-
export type LicenseFilePayload = LicenseResponseOffline & {
|
|
1224
|
-
offline_signature: string,
|
|
1225
|
-
};
|
|
1226
|
-
|
|
1227
|
-
export type OfflineActivationRequest = {
|
|
1228
|
-
prefix?: string;
|
|
1229
|
-
os_ver?: string;
|
|
1230
|
-
sdk_build_version?: string;
|
|
1231
|
-
hostname?: string;
|
|
1232
|
-
ip?: string;
|
|
1233
|
-
external_ip?: string;
|
|
1234
|
-
app_ver?: string;
|
|
1235
|
-
mac_address?: string;
|
|
1236
|
-
};
|
|
1237
|
-
|
|
1238
|
-
export type DeviceVariable = {
|
|
1239
|
-
id: number,
|
|
1240
|
-
device_id: number,
|
|
1241
|
-
created_at: DateISO8601UTC,
|
|
1242
|
-
variable: string,
|
|
1243
|
-
value: string,
|
|
1244
|
-
};
|
|
1245
|
-
|
|
1246
|
-
type LicenseTrialExisting = {
|
|
1247
|
-
};
|
|
1248
|
-
|
|
1249
|
-
type LicenseTrialNewCommon = {
|
|
1250
|
-
license_key: string,
|
|
1251
|
-
id: number,
|
|
1252
|
-
order_id: number,
|
|
1253
|
-
product_id: number,
|
|
1254
|
-
max_license_users: number,
|
|
1255
|
-
max_activations: number,
|
|
1256
|
-
times_activated: number,
|
|
1257
|
-
is_trial: true,
|
|
1258
|
-
active: boolean,
|
|
1259
|
-
enabled: boolean,
|
|
1260
|
-
max_transfers: number,
|
|
1261
|
-
trial_days: number,
|
|
1262
|
-
maintenance_duration: TimeLength | null,
|
|
1263
|
-
validity_period: DateISO8601UTC | null,
|
|
1264
|
-
enable_maintenance_period: boolean,
|
|
1265
|
-
prevent_vm: boolean,
|
|
1266
|
-
is_hardware_key_auth: boolean,
|
|
1267
|
-
license_user: string,
|
|
1268
|
-
initial_password: string,
|
|
1269
|
-
metadata: JSON,
|
|
1270
|
-
created_at: number,
|
|
1271
|
-
updated_at: number,
|
|
1272
|
-
LicenseProductFeatures: LicenseProductFeature[],
|
|
1273
|
-
LicenseCustomFields: {
|
|
1274
|
-
product_custom_field_id: number,
|
|
1275
|
-
value: string
|
|
1276
|
-
}[],
|
|
1277
|
-
};
|
|
1278
|
-
|
|
1279
|
-
type LicenseTrialNew = LicenseTrialNewCommon
|
|
1280
|
-
& (XOR<
|
|
1281
|
-
{
|
|
1282
|
-
is_floating_cloud: true,
|
|
1283
|
-
floating_users: number,
|
|
1284
|
-
floating_timeout: number,
|
|
1285
|
-
},
|
|
1286
|
-
{}
|
|
1287
|
-
>)
|
|
1288
|
-
& (XOR<
|
|
1289
|
-
{
|
|
1290
|
-
license_type: 'consumption',
|
|
1291
|
-
allow_overages: boolean,
|
|
1292
|
-
max_overages: number,
|
|
1293
|
-
max_consumptions: number,
|
|
1294
|
-
valid_duration: null,
|
|
1295
|
-
consumption_period: 'daily' | 'weekly' | 'monthly' | 'annually' | null,
|
|
1296
|
-
reset_consumption: boolean,
|
|
1297
|
-
},
|
|
1298
|
-
XOR<
|
|
1299
|
-
{
|
|
1300
|
-
license_type: 'subscription',
|
|
1301
|
-
grace_period: number,
|
|
1302
|
-
allow_grace_period: boolean,
|
|
1303
|
-
},
|
|
1304
|
-
{
|
|
1305
|
-
license_type: 'perpetual' | 'time-limited',
|
|
1306
|
-
}
|
|
1307
|
-
>
|
|
1308
|
-
>
|
|
1309
|
-
);
|
|
1310
|
-
|
|
1311
|
-
export type LicenseTrialResponse = (LicenseTrialNew | LicenseTrialExisting) & {
|
|
1312
|
-
license_type: LicenseType,
|
|
1313
|
-
is_trial: boolean,
|
|
1314
|
-
/** Username */
|
|
1315
|
-
license_user: string,
|
|
1316
|
-
};
|
|
1317
|
-
|
|
1318
|
-
type CustomerLicenseUser = {
|
|
1319
|
-
email: string,
|
|
1320
|
-
is_active: boolean,
|
|
1321
|
-
first_name: string,
|
|
1322
|
-
last_name: string,
|
|
1323
|
-
phone_number: string,
|
|
1324
|
-
is_initial_password: boolean,
|
|
1325
|
-
initial_password: string,
|
|
1326
|
-
max_activations: number,
|
|
1327
|
-
total_activations: number,
|
|
1328
|
-
license_id: number,
|
|
1329
|
-
order_id: number,
|
|
1330
|
-
order_store_id: string,
|
|
1331
|
-
};
|
|
1332
|
-
|
|
1333
|
-
export type CustomerLicenseUsersResponse = {
|
|
1334
|
-
customer: {
|
|
1335
|
-
email: string | null,
|
|
1336
|
-
first_name: string | null,
|
|
1337
|
-
last_name: string | null,
|
|
1338
|
-
company_name: string | null,
|
|
1339
|
-
phone: string | null,
|
|
1340
|
-
reference: string | null,
|
|
1341
|
-
address: string | null,
|
|
1342
|
-
postcode: string | null,
|
|
1343
|
-
city: string | null,
|
|
1344
|
-
country: string | null,
|
|
1345
|
-
state: string | null,
|
|
1346
|
-
customer_account: null | {
|
|
1347
|
-
id: string,
|
|
1348
|
-
name: string,
|
|
1349
|
-
code: string,
|
|
1350
|
-
},
|
|
1351
|
-
metadata: JSON,
|
|
1352
|
-
},
|
|
1353
|
-
users: CustomerLicenseUser[]
|
|
1354
|
-
};
|
|
1355
|
-
|
|
1356
|
-
export type LicenseFeatureResponse = {
|
|
1357
|
-
id: number,
|
|
1358
|
-
code: string,
|
|
1359
|
-
name: string,
|
|
1360
|
-
floating_timeout: number | null,
|
|
1361
|
-
floating_users: number | null,
|
|
1362
|
-
feature_type: 'activation' | 'consumption'
|
|
1363
|
-
expiry_date: DateISO8601UTC | null,
|
|
1364
|
-
metadata: JSON,
|
|
1365
|
-
is_floating: boolean,
|
|
1366
|
-
is_floating_cloud: boolean,
|
|
1367
|
-
floating_in_use_devices: number,
|
|
1368
|
-
license_id: number,
|
|
1369
|
-
};
|
|
1370
|
-
|
|
1371
|
-
export type LicenseProductFeature = {
|
|
1372
|
-
id: number,
|
|
1373
|
-
product_feature_id: number,
|
|
1374
|
-
max_consumption: number,
|
|
1375
|
-
allow_overages: boolean,
|
|
1376
|
-
max_overages: number,
|
|
1377
|
-
reset_consumption: number,
|
|
1378
|
-
consumption_period: 'daily' | 'weekly' | 'monthly' | 'annually' | null,
|
|
1379
|
-
expiry_date: DateISO8601UTC | null,
|
|
1380
|
-
is_floating: boolean,
|
|
1381
|
-
is_floating_cloud: boolean,
|
|
1382
|
-
metadata: JSON,
|
|
1383
|
-
} & XOR<({ is_floating: true } | { is_floating_cloud: true }) & {
|
|
1384
|
-
floating_timeout: number,
|
|
1385
|
-
floating_users: number,
|
|
1386
|
-
},
|
|
1387
|
-
{}>;
|
|
1388
|
-
|
|
1389
|
-
export type LicenseConsumptionsResponse = {
|
|
1390
|
-
id: number,
|
|
1391
|
-
max_consumptions: number,
|
|
1392
|
-
total_consumptions: number,
|
|
1393
|
-
allow_unlimited_consumptions: boolean,
|
|
1394
|
-
allow_negative_consumptions: boolean,
|
|
1395
|
-
allow_overages: boolean,
|
|
1396
|
-
max_overages: number,
|
|
1397
|
-
reset_consumption: boolean,
|
|
1398
|
-
consumption_period: 'daily' | 'weekly' | 'monthly' | 'annually' | null,
|
|
1399
|
-
};
|
|
1400
|
-
|
|
1401
|
-
export type LicenseFeatureConsumptionResponse = {
|
|
1402
|
-
allow_negative_consumptions: boolean,
|
|
1403
|
-
allow_overages: boolean,
|
|
1404
|
-
allow_unlimited_consumptions: boolean,
|
|
1405
|
-
consumption_period: 'daily' | 'weekly' | 'monthly' | 'annually' | null,
|
|
1406
|
-
is_floating_cloud: boolean,
|
|
1407
|
-
is_floating: boolean,
|
|
1408
|
-
max_consumptions: number,
|
|
1409
|
-
max_overages: number,
|
|
1410
|
-
reset_consumption: boolean,
|
|
1411
|
-
total_consumptions: number,
|
|
1412
|
-
|
|
1413
|
-
// the following properties are only present on floating and floating cloud features:
|
|
1414
|
-
floating_timeout?: number | null,
|
|
1415
|
-
floating_users?: number,
|
|
1416
|
-
};
|
|
1417
|
-
|
|
1418
|
-
export type ProductDetailsResponse = ProductDetails & {
|
|
1419
|
-
floating_timeout: number,
|
|
1420
|
-
max_overages: number,
|
|
1421
|
-
trial_days: number,
|
|
1422
|
-
allow_overages: boolean,
|
|
1423
|
-
allow_trial: boolean,
|
|
1424
|
-
prevent_vm: boolean,
|
|
1425
|
-
custom_fields: {
|
|
1426
|
-
id: number,
|
|
1427
|
-
name: string,
|
|
1428
|
-
default_value: string,
|
|
1429
|
-
}[],
|
|
1430
|
-
latest_version: null | (InstallationFileBase & {
|
|
1431
|
-
id: number,
|
|
1432
|
-
product_id: number,
|
|
1433
|
-
enabled: boolean,
|
|
1434
|
-
created_at: DateISO8601UTC,
|
|
1435
|
-
updated_at: DateISO8601UTC,
|
|
1436
|
-
full_link: string | null,
|
|
1437
|
-
filename: string | null,
|
|
1438
|
-
})
|
|
1439
|
-
};
|
|
1440
|
-
|
|
1441
|
-
export type LicenseBorrowResponse = {
|
|
1442
|
-
license_id: number,
|
|
1443
|
-
device_id: number,
|
|
1444
|
-
borrowed_until: DateInputString,
|
|
1445
|
-
max_borrow_time: number,
|
|
1446
|
-
};
|
|
1447
|
-
|
|
1448
|
-
type InstallationFileBase = {
|
|
1449
|
-
version: string | null,
|
|
1450
|
-
environment: string | null,
|
|
1451
|
-
hash_md5: string | null,
|
|
1452
|
-
eula_link: string | null,
|
|
1453
|
-
release_notes_link: string | null,
|
|
1454
|
-
size: string | null,
|
|
1455
|
-
requires_version: string | null,
|
|
1456
|
-
channel: string | null,
|
|
1457
|
-
release_date: DateISO8601UTC | null,
|
|
1458
|
-
};
|
|
1459
|
-
|
|
1460
|
-
export type InstallationFileResponse = InstallationFileBase & {
|
|
1461
|
-
installation_file: string | null
|
|
1462
|
-
};
|
|
1463
|
-
|
|
1464
|
-
export type VersionsResponse = {
|
|
1465
|
-
version: string,
|
|
1466
|
-
release_date: DateISO8601UTC,
|
|
1467
|
-
}[];
|
|
1468
|
-
|
|
1469
|
-
export type LicenseDataMethod = 'check_license'
|
|
1470
|
-
|'activate_license'
|
|
1471
|
-
|'activate_license_offline'
|
|
1472
|
-
|'activate_air_gap'
|
|
1473
|
-
|'update_license_offline'
|
|
1474
|
-
|'product_details'
|
|
1475
|
-
|'device_variables'
|
|
1476
|
-
|'normal'
|
|
1477
|
-
|'license_consumption'
|
|
1478
|
-
|'feature_consumption'
|
|
1479
|
-
|'register_feature'
|
|
1480
|
-
|'floating_server_register'
|
|
1481
|
-
;
|
|
1482
|
-
|
|
1483
1000
|
export enum HardwareIdAlgorithm {
|
|
1484
1001
|
Default = 0,
|
|
1485
1002
|
WindowsHardwareFingerprintId = 1,
|