@licensespring/node-sdk 1.1.18 → 1.2.0

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.
Files changed (66) hide show
  1. package/License.key +1 -0
  2. package/dist/package.json +16 -9
  3. package/dist/src/abstract-manager.d.ts +42 -15
  4. package/dist/src/abstract-manager.js +248 -22
  5. package/dist/src/abstract-manager.js.map +1 -1
  6. package/dist/src/api.d.ts +25 -4978
  7. package/dist/src/api.js +1596 -4511
  8. package/dist/src/api.js.map +1 -1
  9. package/dist/src/bundle-file.d.ts +11 -0
  10. package/dist/src/bundle-file.js +110 -0
  11. package/dist/src/bundle-file.js.map +1 -0
  12. package/dist/src/bundle-manager.d.ts +17 -0
  13. package/dist/src/bundle-manager.js +252 -0
  14. package/dist/src/bundle-manager.js.map +1 -0
  15. package/dist/src/common.d.ts +1 -0
  16. package/dist/src/common.js +5 -1
  17. package/dist/src/common.js.map +1 -1
  18. package/dist/src/index.d.ts +2 -1
  19. package/dist/src/index.js +3 -1
  20. package/dist/src/index.js.map +1 -1
  21. package/dist/src/license-data.d.ts +13 -7
  22. package/dist/src/license-data.js +66 -71
  23. package/dist/src/license-data.js.map +1 -1
  24. package/dist/src/license-file.d.ts +8 -19
  25. package/dist/src/license-file.js +38 -315
  26. package/dist/src/license-file.js.map +1 -1
  27. package/dist/src/license-manager.d.ts +23 -32
  28. package/dist/src/license-manager.js +213 -313
  29. package/dist/src/license-manager.js.map +1 -1
  30. package/dist/src/license.d.ts +16 -15
  31. package/dist/src/license.js +145 -142
  32. package/dist/src/license.js.map +1 -1
  33. package/dist/src/logger.d.ts +1 -0
  34. package/dist/src/logger.js +28 -5
  35. package/dist/src/logger.js.map +1 -1
  36. package/dist/src/offline-activation.d.ts +2 -1
  37. package/dist/src/offline-activation.js.map +1 -1
  38. package/dist/src/response-types.d.ts +489 -0
  39. package/dist/src/response-types.js +12 -0
  40. package/dist/src/response-types.js.map +1 -0
  41. package/dist/src/schema.d.ts +4 -2
  42. package/dist/src/schema.js +6 -2
  43. package/dist/src/schema.js.map +1 -1
  44. package/dist/src/storage-file.d.ts +24 -0
  45. package/dist/src/storage-file.js +354 -0
  46. package/dist/src/storage-file.js.map +1 -0
  47. package/dist/src/test/api-response-mock.d.ts +1435 -0
  48. package/dist/src/test/api-response-mock.js +1966 -0
  49. package/dist/src/test/api-response-mock.js.map +1 -0
  50. package/dist/src/test/api.test.d.ts +1 -0
  51. package/dist/src/test/api.test.js +228 -0
  52. package/dist/src/test/api.test.js.map +1 -0
  53. package/dist/src/test/bundle-manager.test.d.ts +0 -0
  54. package/dist/src/test/bundle-manager.test.js +15 -0
  55. package/dist/src/test/bundle-manager.test.js.map +1 -0
  56. package/dist/src/test/jest.setup.d.ts +1 -0
  57. package/dist/src/test/jest.setup.js +17 -0
  58. package/dist/src/test/jest.setup.js.map +1 -0
  59. package/dist/src/test/license-manager.test.d.ts +1 -0
  60. package/dist/src/test/license-manager.test.js +1011 -0
  61. package/dist/src/test/license-manager.test.js.map +1 -0
  62. package/dist/src/types.d.ts +35 -219
  63. package/dist/src/types.js.map +1 -1
  64. package/dist/src/watchdog.js +1 -1
  65. package/dist/src/watchdog.js.map +1 -1
  66. package/package.json +16 -9
@@ -0,0 +1,1966 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.TEST_SSO_URL = exports.TEST_ERROR_RESPONSE = exports.TEST_FLOATING_BORROW = exports.TEST_PASSWORD_CHANGED = exports.TEST_DEACTIVATED = exports.TEST_CUSTOMER_LICENSE_USERS = exports.TEST_INSTALLATION_FILE = exports.TEST_VERSIONS = exports.TEST_GET_DEVICE_VARIABLES = exports.TEST_TRACK_DEVICE_VARIABLES = exports.TEST_PRODUCT_DETAILS_FULL_INCLUDE = exports.TEST_TRIAL_KEY_KEY_EXISTING = exports.TEST_TRIAL_KEY_KEY_NEW = exports.TEST_TRIAL_KEY_USER_EXISTING = exports.TEST_TRIAL_KEY_USER_NEW = exports.TEST_ADD_FEATURE_CONSUMPTION = exports.TEST_ADD_CONSUMPTION = exports.TEST_DEVICE_LICENSES = exports.TEST_USER_LICENSES = exports.TEST_CHECK_LICENSE_FEATURE = exports.TEST_BUNDLE_KEY_CHECK = exports.TEST_LICENSE_USER_CHECK = exports.TEST_LICENSE_KEY_CHECK = exports.TEST_BUNDLE_KEY_ACTIVATION = exports.TEST_LICENSE_USER_ACTIVATION = exports.TEST_LICENSE_KEY_ACTIVATION = void 0;
16
+ exports.apiResponseMock = apiResponseMock;
17
+ const node_crypto_1 = __importDefault(require("node:crypto"));
18
+ const dayjs_1 = __importDefault(require("dayjs"));
19
+ const utc_js_1 = __importDefault(require("dayjs/plugin/utc.js"));
20
+ const axios_1 = require("axios");
21
+ dayjs_1.default.extend(utc_js_1.default);
22
+ function apiResponseMock(method, ...args) {
23
+ return __awaiter(this, void 0, void 0, function* () {
24
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
25
+ const headers = ((_a = args[2]) === null || _a === void 0 ? void 0 : _a.headers) || ((_b = args[1]) === null || _b === void 0 ? void 0 : _b.headers) || null;
26
+ if (headers && headers['Content-Type'] == 'application/json' && headers['Date'] && headers['Authorization']) {
27
+ if (method == 'GET' && args[0].match(/\/check_license$/)) {
28
+ if (((_c = args[1].params) === null || _c === void 0 ? void 0 : _c.product) == 'product' && ((_d = args[1].params) === null || _d === void 0 ? void 0 : _d.hardware_id) == 'hwid') {
29
+ if (((_e = args[1].params) === null || _e === void 0 ? void 0 : _e.license_key) == 'KEY_MOCK_VALID') {
30
+ return createMockResponse(exports.TEST_LICENSE_KEY_CHECK, true, { hardware_id: (_f = args[1].params) === null || _f === void 0 ? void 0 : _f.hardware_id });
31
+ }
32
+ if (((_g = args[1].params) === null || _g === void 0 ? void 0 : _g.username) == 'USERNAME_VALID') {
33
+ return createMockResponse(exports.TEST_LICENSE_USER_CHECK, true, { hardware_id: (_h = args[1].params) === null || _h === void 0 ? void 0 : _h.hardware_id });
34
+ }
35
+ if (((_j = args[1].params) === null || _j === void 0 ? void 0 : _j.license_key) == 'KEY_MOCK_INVALID' || ((_k = args[1].params) === null || _k === void 0 ? void 0 : _k.username) == 'USERNAME_INVALID') {
36
+ return createMockError('license_not_found');
37
+ }
38
+ }
39
+ }
40
+ if (method == 'GET' && args[0].match(/\/check_bundle$/)) {
41
+ if (((_l = args[1].params) === null || _l === void 0 ? void 0 : _l.product) == 'product' && ((_m = args[1].params) === null || _m === void 0 ? void 0 : _m.hardware_id) == 'hwid') {
42
+ if (((_o = args[1].params) === null || _o === void 0 ? void 0 : _o.license_key) == 'KEY_MOCK_VALID') {
43
+ return createMockResponseList(exports.TEST_BUNDLE_KEY_CHECK, true, { hardware_id: (_p = args[1].params) === null || _p === void 0 ? void 0 : _p.hardware_id });
44
+ }
45
+ }
46
+ }
47
+ if (method == 'GET' && args[0].match(/\/check_license_feature$/)) {
48
+ return createMockResponse(exports.TEST_CHECK_LICENSE_FEATURE);
49
+ }
50
+ if (method == 'POST' && args[0].match(/\/activate_license$/)) {
51
+ return createMockResponse(exports.TEST_LICENSE_KEY_ACTIVATION, true, { hardware_id: (_q = args[1]) === null || _q === void 0 ? void 0 : _q.hardware_id });
52
+ }
53
+ if (method == 'POST' && args[0].match(/\/activate_bundle$/)) {
54
+ return createMockResponseList(exports.TEST_BUNDLE_KEY_ACTIVATION, true, { hardware_id: (_r = args[1]) === null || _r === void 0 ? void 0 : _r.hardware_id });
55
+ }
56
+ if (method == 'POST' && args[0].match(/\/deactivate_license$/)) {
57
+ return createMockResponse(exports.TEST_DEACTIVATED);
58
+ }
59
+ if (method == 'POST' && args[0].match(/\/deactivate_bundle$/)) {
60
+ return createMockResponse(exports.TEST_DEACTIVATED);
61
+ }
62
+ if (method == 'GET' && args[0].match(/\/trial_key$/)) {
63
+ return createMockResponse(exports.TEST_TRIAL_KEY_KEY_NEW);
64
+ }
65
+ if (method == 'GET' && args[0].match(/\/user_licenses$/)) {
66
+ return createMockResponseList(exports.TEST_USER_LICENSES);
67
+ }
68
+ if (method == 'GET' && args[0].match(/\/customer_license_users$/)) {
69
+ return createMockResponse(exports.TEST_CUSTOMER_LICENSE_USERS);
70
+ }
71
+ if (method == 'POST' && args[0].match(/\/add_consumption$/)) {
72
+ return createMockResponse(exports.TEST_ADD_CONSUMPTION);
73
+ }
74
+ if (method == 'POST' && args[0].match(/\/add_feature_consumption$/)) {
75
+ return createMockResponse(exports.TEST_ADD_FEATURE_CONSUMPTION);
76
+ }
77
+ if (method == 'GET' && args[0].match(/\/product_details$/)) {
78
+ return createMockResponse(exports.TEST_PRODUCT_DETAILS_FULL_INCLUDE);
79
+ }
80
+ if (method == 'GET' && args[0].match(/\/get_device_variables$/)) {
81
+ return createMockResponse(exports.TEST_GET_DEVICE_VARIABLES);
82
+ }
83
+ if (method == 'POST' && args[0].match(/\/track_device_variables$/)) {
84
+ return createMockResponse(exports.TEST_TRACK_DEVICE_VARIABLES);
85
+ }
86
+ if (method == 'POST' && args[0].match(/\/floating\/borrow$/)) {
87
+ return createMockResponse(exports.TEST_FLOATING_BORROW);
88
+ }
89
+ if (method == 'POST' && args[0].match(/\/floating\/release$/)) {
90
+ return createMockResponse(undefined);
91
+ }
92
+ if (method == 'POST' && args[0].match(/\/feature_release$/)) {
93
+ return createMockResponse(undefined);
94
+ }
95
+ if (method == 'POST' && args[0].match(/\/change_password$/)) {
96
+ return createMockResponse(exports.TEST_PASSWORD_CHANGED);
97
+ }
98
+ if (method == 'GET' && args[0].match(/\/versions$/)) {
99
+ return createMockResponse(exports.TEST_VERSIONS);
100
+ }
101
+ if (method == 'GET' && args[0].match(/\/installation_file$/)) {
102
+ return createMockResponse(exports.TEST_INSTALLATION_FILE);
103
+ }
104
+ if (method == 'GET' && args[0].match(/\/sso_url$/)) {
105
+ return createMockResponse(exports.TEST_SSO_URL);
106
+ }
107
+ }
108
+ throw new Error('MOCKED_REQUEST_NOT_IMPLEMENTED');
109
+ });
110
+ }
111
+ function createMockResponse(data, addLicenseSignature = false, metadata = {}) {
112
+ const response = {
113
+ headers: new Map(),
114
+ data,
115
+ };
116
+ if (addLicenseSignature) {
117
+ response.data.license_signature = mockSignatureV1(metadata.hardware_id, response.data);
118
+ }
119
+ response.headers.set('Content-Type', 'application/json');
120
+ if (data) {
121
+ response.headers.set('LicenseSignature', mockSignatureV2(data));
122
+ }
123
+ return response;
124
+ }
125
+ function createMockResponseList(data, addLicenseSignature = false, metadata = {}) {
126
+ const response = {
127
+ headers: new Map(),
128
+ data: [],
129
+ };
130
+ for (const entry of data) {
131
+ if (addLicenseSignature) {
132
+ entry.license_signature = mockSignatureV1(metadata.hardware_id, entry);
133
+ }
134
+ response.data.push(entry);
135
+ }
136
+ response.headers.set('Content-Type', 'application/json');
137
+ response.headers.set('LicenseSignature', mockSignatureV2(data));
138
+ return response;
139
+ }
140
+ function mockSignatureV1(hardware_id, payload) {
141
+ const signature = node_crypto_1.default.createSign('RSA-SHA256');
142
+ const signing_string = (hardware_id +
143
+ '#' +
144
+ (payload.user ? payload.user.email.split('|')[0] : payload.license_key) +
145
+ '#' +
146
+ (payload.validity_period ? (0, dayjs_1.default)(payload.validity_period).toISOString() : '')).toLowerCase();
147
+ signature.update(signing_string);
148
+ const licenseSignatureV1 = signature.sign(process.env.TEST_PRIVATE_KEY, 'base64');
149
+ return licenseSignatureV1;
150
+ }
151
+ function mockSignatureV2(payload) {
152
+ const signature_v2 = node_crypto_1.default.createSign('RSA-SHA256');
153
+ signature_v2.update(JSON.stringify(payload));
154
+ const dataSignatureV2 = signature_v2.sign(process.env.TEST_PRIVATE_KEY, 'base64');
155
+ return dataSignatureV2;
156
+ }
157
+ function createMockError(code, status = 400) {
158
+ const errorResponse = JSON.parse(JSON.stringify(exports.TEST_ERROR_RESPONSE));
159
+ errorResponse.response.data = {
160
+ code, status, message: ''
161
+ };
162
+ throw new axios_1.AxiosError(errorResponse.message, errorResponse.code, undefined, undefined, Object.assign({}, errorResponse.response));
163
+ }
164
+ exports.TEST_LICENSE_KEY_ACTIVATION = {
165
+ 'id': 1750853542919019,
166
+ 'active': true,
167
+ 'allow_grace_period': false,
168
+ 'allow_overages': false,
169
+ 'allow_unlimited_activations': false,
170
+ 'allow_offline_activation': false,
171
+ 'can_borrow': false,
172
+ 'custom_fields': [],
173
+ 'customer': {
174
+ 'email': 'test101@mail.com',
175
+ 'company_name': 'Acme Inc.',
176
+ 'reference': 'ref_usr_321',
177
+ 'phone': '+1656123123123',
178
+ 'first_name': '',
179
+ 'last_name': '',
180
+ 'city': 'ci',
181
+ 'postcode': '10000',
182
+ 'state': 'st',
183
+ 'country': 'co',
184
+ 'address': 'ČK12',
185
+ 'customer_account': {
186
+ 'id': 1262,
187
+ 'name': '',
188
+ 'code': 'abc'
189
+ },
190
+ 'metadata': {
191
+ 'b': 1
192
+ }
193
+ },
194
+ 'company': {
195
+ 'id': 276
196
+ },
197
+ 'device_id': 1751361422033009,
198
+ 'enable_maintenance_period': false,
199
+ 'floating_timeout': 120,
200
+ 'grace_period': 0,
201
+ 'is_air_gapped': false,
202
+ 'is_expired': false,
203
+ 'is_floating_cloud': false,
204
+ 'is_floating': false,
205
+ 'is_hardware_key_auth': false,
206
+ 'is_trial': false,
207
+ 'license_key': 'KEY_MOCK_VALID',
208
+ 'license_type': 'perpetual',
209
+ 'license_template_id': null,
210
+ 'maintenance_period': null,
211
+ 'max_activations': 1000,
212
+ 'max_borrow_time': 0,
213
+ 'max_overages': 0,
214
+ 'max_transfers': 0,
215
+ 'metadata': {},
216
+ 'prevent_vm': false,
217
+ 'product_details': {
218
+ 'product_id': 1743668696892505,
219
+ 'product_name': 'myproduct3',
220
+ 'short_code': 'myproduct3',
221
+ 'allow_trial': false,
222
+ 'trial_days': 0,
223
+ 'authorization_method': 'license-key',
224
+ 'allow_overages': false,
225
+ 'max_overages': 0,
226
+ 'prevent_vm': false,
227
+ 'validity_period': null,
228
+ 'floating_timeout': 120,
229
+ 'company_id': 276,
230
+ 'metadata': {}
231
+ },
232
+ 'product_features': [],
233
+ 'start_date': null,
234
+ 'times_activated': 2,
235
+ 'transfer_count': 2,
236
+ 'validity_period': null,
237
+ 'license_signature': '',
238
+ 'request': 'activation',
239
+ 'hardware_id': '9005'
240
+ };
241
+ exports.TEST_LICENSE_USER_ACTIVATION = {
242
+ 'id': 1744810240166049,
243
+ 'active': true,
244
+ 'allow_grace_period': false,
245
+ 'allow_overages': false,
246
+ 'allow_unlimited_activations': false,
247
+ 'allow_offline_activation': true,
248
+ 'can_borrow': false,
249
+ 'custom_fields': [
250
+ {
251
+ 'name': 'field_num',
252
+ 'data_type': null,
253
+ 'value': '100'
254
+ },
255
+ {
256
+ 'name': 'field_string',
257
+ 'data_type': null,
258
+ 'value': 'foo'
259
+ }
260
+ ],
261
+ 'customer': {
262
+ 'email': 'test101@mail.com',
263
+ 'company_name': 'Acme Inc.',
264
+ 'reference': 'ref_usr_321',
265
+ 'phone': '+1656123123123',
266
+ 'first_name': '',
267
+ 'last_name': '',
268
+ 'city': 'ci',
269
+ 'postcode': '10000',
270
+ 'state': 'st',
271
+ 'country': 'co',
272
+ 'address': 'ČK12',
273
+ 'customer_account': {
274
+ 'id': 1262,
275
+ 'name': '',
276
+ 'code': 'abc'
277
+ },
278
+ 'metadata': {
279
+ 'b': 1
280
+ }
281
+ },
282
+ 'company': {
283
+ 'id': 276
284
+ },
285
+ 'device_id': 1744810458472159,
286
+ 'enable_maintenance_period': true,
287
+ 'floating_timeout': 120,
288
+ 'grace_period': 0,
289
+ 'is_air_gapped': false,
290
+ 'is_expired': false,
291
+ 'is_floating_cloud': false,
292
+ 'is_floating': false,
293
+ 'is_hardware_key_auth': false,
294
+ 'is_trial': false,
295
+ 'license_type': 'subscription',
296
+ 'license_template_id': 1125,
297
+ 'maintenance_period': '2025-07-18T00:00:00.000Z',
298
+ 'max_activations': 10,
299
+ 'max_borrow_time': 0,
300
+ 'max_overages': 0,
301
+ 'max_transfers': 10,
302
+ 'metadata': {
303
+ 'a': 1
304
+ },
305
+ 'prevent_vm': false,
306
+ 'product_details': {
307
+ 'product_id': 1743502393341012,
308
+ 'product_name': 'myproduct',
309
+ 'short_code': 'myproduct',
310
+ 'allow_trial': true,
311
+ 'trial_days': 5,
312
+ 'authorization_method': 'user',
313
+ 'allow_overages': false,
314
+ 'max_overages': 0,
315
+ 'prevent_vm': false,
316
+ 'validity_period': null,
317
+ 'floating_timeout': 120,
318
+ 'company_id': 276,
319
+ 'metadata': {}
320
+ },
321
+ 'product_features': [
322
+ {
323
+ 'id': 1744810240094039,
324
+ 'code': 'consumption_feature',
325
+ 'name': 'consumption feature',
326
+ 'feature_type': 'consumption',
327
+ 'expiry_date': null,
328
+ 'metadata': {
329
+ 'b': 2
330
+ },
331
+ 'max_consumption': 10,
332
+ 'allow_unlimited_consumptions': false,
333
+ 'total_consumptions': 0,
334
+ 'allow_overages': false,
335
+ 'max_overages': 0,
336
+ 'reset_consumption': false,
337
+ 'consumption_period': null,
338
+ 'allow_negative_consumptions': true,
339
+ 'is_floating': false,
340
+ 'is_floating_cloud': false
341
+ }
342
+ ],
343
+ 'start_date': null,
344
+ 'times_activated': 2,
345
+ 'transfer_count': 0,
346
+ 'validity_period': '2026-06-18T00:00:00.000Z',
347
+ 'max_license_users': 10,
348
+ 'user': {
349
+ 'id': 3469,
350
+ 'email': 'u@g.com',
351
+ 'first_name': '',
352
+ 'last_name': '',
353
+ 'phone_number': '',
354
+ 'is_initial_password': true,
355
+ 'max_activations': 1,
356
+ 'allow_unlimited_activations': false,
357
+ 'total_activations': 1
358
+ },
359
+ 'license_signature': '',
360
+ 'request': 'activation',
361
+ 'username': 'u@g.com',
362
+ 'hardware_id': '123'
363
+ };
364
+ exports.TEST_BUNDLE_KEY_ACTIVATION = [
365
+ {
366
+ 'id': 1749637884482109,
367
+ 'active': true,
368
+ 'allow_grace_period': false,
369
+ 'allow_overages': false,
370
+ 'allow_unlimited_activations': false,
371
+ 'allow_offline_activation': true,
372
+ 'can_borrow': false,
373
+ 'custom_fields': [],
374
+ 'customer': {
375
+ 'email': '',
376
+ 'company_name': '',
377
+ 'reference': '',
378
+ 'phone': '',
379
+ 'first_name': '',
380
+ 'last_name': '',
381
+ 'city': '',
382
+ 'postcode': '',
383
+ 'state': '',
384
+ 'country': '',
385
+ 'address': '',
386
+ 'customer_account': null,
387
+ 'metadata': {}
388
+ },
389
+ 'company': {
390
+ 'id': 276
391
+ },
392
+ 'device_id': 1751463755668119,
393
+ 'enable_maintenance_period': false,
394
+ 'floating_timeout': 120,
395
+ 'grace_period': 0,
396
+ 'is_air_gapped': false,
397
+ 'is_expired': false,
398
+ 'is_floating_cloud': false,
399
+ 'is_floating': false,
400
+ 'is_hardware_key_auth': false,
401
+ 'is_trial': false,
402
+ 'license_key': 'KEY_MOCK_VALID',
403
+ 'license_type': 'perpetual',
404
+ 'license_template_id': null,
405
+ 'maintenance_period': null,
406
+ 'max_activations': 1,
407
+ 'max_borrow_time': 0,
408
+ 'max_overages': 0,
409
+ 'max_transfers': 0,
410
+ 'metadata': {},
411
+ 'prevent_vm': false,
412
+ 'product_details': {
413
+ 'product_id': 1736253599921332,
414
+ 'product_name': 'test new bundle',
415
+ 'short_code': 'tnb',
416
+ 'allow_trial': true,
417
+ 'trial_days': 15,
418
+ 'authorization_method': 'license-key',
419
+ 'allow_overages': false,
420
+ 'max_overages': 0,
421
+ 'prevent_vm': false,
422
+ 'validity_period': null,
423
+ 'floating_timeout': 120,
424
+ 'company_id': 276,
425
+ 'metadata': {}
426
+ },
427
+ 'product_features': [],
428
+ 'start_date': null,
429
+ 'times_activated': 1,
430
+ 'transfer_count': 0,
431
+ 'validity_period': null,
432
+ 'license_signature': '',
433
+ 'request': 'activation',
434
+ 'hardware_id': '1750063067043.943'
435
+ },
436
+ {
437
+ 'id': 1749637884862179,
438
+ 'active': true,
439
+ 'allow_grace_period': false,
440
+ 'allow_overages': false,
441
+ 'allow_unlimited_activations': false,
442
+ 'allow_offline_activation': true,
443
+ 'can_borrow': false,
444
+ 'custom_fields': [
445
+ {
446
+ 'name': 'a',
447
+ 'data_type': null,
448
+ 'value': 'a'
449
+ },
450
+ {
451
+ 'name': 'b',
452
+ 'data_type': null,
453
+ 'value': 'b'
454
+ },
455
+ {
456
+ 'name': 'c',
457
+ 'data_type': null,
458
+ 'value': 'c'
459
+ },
460
+ {
461
+ 'name': 'd',
462
+ 'data_type': null,
463
+ 'value': 'd'
464
+ },
465
+ {
466
+ 'name': 'a',
467
+ 'data_type': null,
468
+ 'value': 'a'
469
+ },
470
+ {
471
+ 'name': null,
472
+ 'data_type': null,
473
+ 'value': null
474
+ },
475
+ {
476
+ 'name': null,
477
+ 'data_type': null,
478
+ 'value': null
479
+ },
480
+ {
481
+ 'name': null,
482
+ 'data_type': null,
483
+ 'value': null
484
+ },
485
+ {
486
+ 'name': null,
487
+ 'data_type': null,
488
+ 'value': null
489
+ },
490
+ {
491
+ 'name': 'enum',
492
+ 'data_type': null,
493
+ 'value': 'invalid'
494
+ },
495
+ {
496
+ 'name': null,
497
+ 'data_type': null,
498
+ 'value': null
499
+ }
500
+ ],
501
+ 'customer': {
502
+ 'email': '',
503
+ 'company_name': '',
504
+ 'reference': '',
505
+ 'phone': '',
506
+ 'first_name': '',
507
+ 'last_name': '',
508
+ 'city': '',
509
+ 'postcode': '',
510
+ 'state': '',
511
+ 'country': '',
512
+ 'address': '',
513
+ 'customer_account': null,
514
+ 'metadata': {}
515
+ },
516
+ 'company': {
517
+ 'id': 276
518
+ },
519
+ 'device_id': 1751463755967139,
520
+ 'enable_maintenance_period': false,
521
+ 'floating_timeout': 120,
522
+ 'grace_period': 0,
523
+ 'is_air_gapped': false,
524
+ 'is_expired': false,
525
+ 'is_floating_cloud': false,
526
+ 'is_floating': false,
527
+ 'is_hardware_key_auth': false,
528
+ 'is_trial': false,
529
+ 'license_key': 'KEY_MOCK_VALID',
530
+ 'license_type': 'consumption',
531
+ 'license_template_id': null,
532
+ 'maintenance_period': null,
533
+ 'max_activations': 1,
534
+ 'max_borrow_time': 0,
535
+ 'max_overages': 0,
536
+ 'max_transfers': 0,
537
+ 'metadata': {},
538
+ 'prevent_vm': false,
539
+ 'product_details': {
540
+ 'product_id': 1584723961091040,
541
+ 'product_name': 'product1',
542
+ 'short_code': '1337',
543
+ 'allow_trial': true,
544
+ 'trial_days': 365,
545
+ 'authorization_method': 'license-key',
546
+ 'allow_overages': false,
547
+ 'max_overages': 0,
548
+ 'prevent_vm': false,
549
+ 'validity_period': null,
550
+ 'floating_timeout': 120,
551
+ 'company_id': 276,
552
+ 'metadata': {}
553
+ },
554
+ 'product_features': [],
555
+ 'start_date': null,
556
+ 'times_activated': 1,
557
+ 'transfer_count': 0,
558
+ 'validity_period': null,
559
+ 'max_consumptions': 1,
560
+ 'allow_unlimited_consumptions': true,
561
+ 'total_consumptions': 0,
562
+ 'reset_consumption': false,
563
+ 'consumption_period': null,
564
+ 'allow_negative_consumptions': true,
565
+ 'license_signature': '',
566
+ 'request': 'activation',
567
+ 'hardware_id': '1750063067043.943'
568
+ },
569
+ {
570
+ 'id': 1749637884960189,
571
+ 'active': true,
572
+ 'allow_grace_period': false,
573
+ 'allow_overages': false,
574
+ 'allow_unlimited_activations': false,
575
+ 'allow_offline_activation': true,
576
+ 'can_borrow': false,
577
+ 'custom_fields': [],
578
+ 'customer': {
579
+ 'email': '',
580
+ 'company_name': '',
581
+ 'reference': '',
582
+ 'phone': '',
583
+ 'first_name': '',
584
+ 'last_name': '',
585
+ 'city': '',
586
+ 'postcode': '',
587
+ 'state': '',
588
+ 'country': '',
589
+ 'address': '',
590
+ 'customer_account': null,
591
+ 'metadata': {}
592
+ },
593
+ 'company': {
594
+ 'id': 276
595
+ },
596
+ 'device_id': 1751463755968149,
597
+ 'enable_maintenance_period': false,
598
+ 'floating_timeout': 120,
599
+ 'grace_period': 0,
600
+ 'is_air_gapped': false,
601
+ 'is_expired': false,
602
+ 'is_floating_cloud': false,
603
+ 'is_floating': false,
604
+ 'is_hardware_key_auth': false,
605
+ 'is_trial': false,
606
+ 'license_key': 'KEY_MOCK_VALID',
607
+ 'license_type': 'consumption',
608
+ 'license_template_id': null,
609
+ 'maintenance_period': null,
610
+ 'max_activations': 1,
611
+ 'max_borrow_time': 0,
612
+ 'max_overages': 0,
613
+ 'max_transfers': 0,
614
+ 'metadata': {},
615
+ 'prevent_vm': false,
616
+ 'product_details': {
617
+ 'product_id': 1584723961091069,
618
+ 'product_name': 'product-TNSgl',
619
+ 'short_code': 'tnsgl',
620
+ 'allow_trial': true,
621
+ 'trial_days': 30,
622
+ 'authorization_method': 'license-key',
623
+ 'allow_overages': false,
624
+ 'max_overages': 0,
625
+ 'prevent_vm': false,
626
+ 'validity_period': null,
627
+ 'floating_timeout': 120,
628
+ 'company_id': 276,
629
+ 'metadata': {}
630
+ },
631
+ 'product_features': [],
632
+ 'start_date': null,
633
+ 'times_activated': 1,
634
+ 'transfer_count': 0,
635
+ 'validity_period': null,
636
+ 'max_consumptions': 1,
637
+ 'allow_unlimited_consumptions': true,
638
+ 'total_consumptions': 0,
639
+ 'reset_consumption': false,
640
+ 'consumption_period': null,
641
+ 'allow_negative_consumptions': true,
642
+ 'license_signature': '',
643
+ 'request': 'activation',
644
+ 'hardware_id': '1750063067043.943'
645
+ },
646
+ {
647
+ 'id': 1749637885058199,
648
+ 'active': true,
649
+ 'allow_grace_period': false,
650
+ 'allow_overages': false,
651
+ 'allow_unlimited_activations': false,
652
+ 'allow_offline_activation': true,
653
+ 'can_borrow': false,
654
+ 'custom_fields': [],
655
+ 'customer': {
656
+ 'email': '',
657
+ 'company_name': '',
658
+ 'reference': '',
659
+ 'phone': '',
660
+ 'first_name': '',
661
+ 'last_name': '',
662
+ 'city': '',
663
+ 'postcode': '',
664
+ 'state': '',
665
+ 'country': '',
666
+ 'address': '',
667
+ 'customer_account': null,
668
+ 'metadata': {}
669
+ },
670
+ 'company': {
671
+ 'id': 276
672
+ },
673
+ 'device_id': 1751463755966129,
674
+ 'enable_maintenance_period': false,
675
+ 'floating_timeout': 120,
676
+ 'grace_period': 0,
677
+ 'is_air_gapped': false,
678
+ 'is_expired': false,
679
+ 'is_floating_cloud': false,
680
+ 'is_floating': false,
681
+ 'is_hardware_key_auth': false,
682
+ 'is_trial': false,
683
+ 'license_key': 'KEY_MOCK_VALID',
684
+ 'license_type': 'consumption',
685
+ 'license_template_id': null,
686
+ 'maintenance_period': null,
687
+ 'max_activations': 1,
688
+ 'max_borrow_time': 0,
689
+ 'max_overages': 0,
690
+ 'max_transfers': 0,
691
+ 'metadata': {},
692
+ 'prevent_vm': false,
693
+ 'product_details': {
694
+ 'product_id': 1584723961091080,
695
+ 'product_name': 'product-gNYAv',
696
+ 'short_code': 'gnyav',
697
+ 'allow_trial': false,
698
+ 'trial_days': 0,
699
+ 'authorization_method': 'license-key',
700
+ 'allow_overages': false,
701
+ 'max_overages': 0,
702
+ 'prevent_vm': false,
703
+ 'validity_period': null,
704
+ 'floating_timeout': 120,
705
+ 'company_id': 276,
706
+ 'metadata': {}
707
+ },
708
+ 'product_features': [],
709
+ 'start_date': null,
710
+ 'times_activated': 1,
711
+ 'transfer_count': 0,
712
+ 'validity_period': null,
713
+ 'max_consumptions': 1,
714
+ 'allow_unlimited_consumptions': true,
715
+ 'total_consumptions': 0,
716
+ 'reset_consumption': false,
717
+ 'consumption_period': null,
718
+ 'allow_negative_consumptions': true,
719
+ 'license_signature': '',
720
+ 'request': 'activation',
721
+ 'hardware_id': '1750063067043.943'
722
+ }
723
+ ];
724
+ exports.TEST_LICENSE_KEY_CHECK = {
725
+ 'id': 1749538876210079,
726
+ 'allow_grace_period': false,
727
+ 'allow_offline_activation': true,
728
+ 'allow_overages': false,
729
+ 'allow_unlimited_activations': false,
730
+ 'can_borrow': false,
731
+ 'enable_maintenance_period': false,
732
+ 'floating_timeout': 120,
733
+ 'grace_period': 0,
734
+ 'is_air_gapped': false,
735
+ 'is_floating': false,
736
+ 'is_floating_cloud': false,
737
+ 'is_hardware_key_auth': false,
738
+ 'is_trial': false,
739
+ 'license_active': true,
740
+ 'license_enabled': true,
741
+ 'license_template_id': null,
742
+ 'license_type': 'consumption',
743
+ 'maintenance_period': null,
744
+ 'max_activations': 1,
745
+ 'max_borrow_time': 0,
746
+ 'max_license_users': 1,
747
+ 'max_overages': 0,
748
+ 'max_transfers': 0,
749
+ 'order_store_id': 'sfsafsa',
750
+ 'prevent_vm': false,
751
+ 'start_date': null,
752
+ 'times_activated': 1,
753
+ 'transfer_count': 0,
754
+ 'validity_period': null,
755
+ 'metadata': {},
756
+ 'custom_fields': [
757
+ {
758
+ 'name': 'a',
759
+ 'data_type': null,
760
+ 'value': 'a'
761
+ }
762
+ ],
763
+ 'product_features': [
764
+ {
765
+ 'id': 1749538876119069,
766
+ 'code': 'd',
767
+ 'name': 'd',
768
+ 'feature_type': 'consumption',
769
+ 'expiry_date': null,
770
+ 'metadata': {},
771
+ 'max_consumption': 1,
772
+ 'allow_unlimited_consumptions': true,
773
+ 'total_consumptions': 0,
774
+ 'allow_overages': false,
775
+ 'max_overages': 0,
776
+ 'reset_consumption': false,
777
+ 'consumption_period': 'daily',
778
+ 'allow_negative_consumptions': true,
779
+ 'is_floating': false,
780
+ 'is_floating_cloud': false
781
+ },
782
+ {
783
+ 'id': 1749538876113049,
784
+ 'code': 'b',
785
+ 'name': 'b',
786
+ 'feature_type': 'activation',
787
+ 'expiry_date': null,
788
+ 'metadata': {},
789
+ 'is_floating': false,
790
+ 'is_floating_cloud': false
791
+ }
792
+ ],
793
+ 'customer': {
794
+ 'email': 'b@b.com',
795
+ 'company_name': 'This',
796
+ 'reference': '',
797
+ 'phone': '',
798
+ 'first_name': '',
799
+ 'last_name': '',
800
+ 'city': '',
801
+ 'postcode': '',
802
+ 'state': '',
803
+ 'country': '',
804
+ 'address': '',
805
+ 'customer_account': null,
806
+ 'metadata': {}
807
+ },
808
+ 'company': {
809
+ 'id': 276
810
+ },
811
+ 'product_details': {
812
+ 'product_id': 1584723961091040,
813
+ 'product_name': 'product',
814
+ 'short_code': 'product',
815
+ 'authorization_method': 'license-key',
816
+ 'metadata': {}
817
+ },
818
+ 'max_consumptions': 1,
819
+ 'total_consumptions': 0,
820
+ 'allow_unlimited_consumptions': true,
821
+ 'reset_consumption': false,
822
+ 'consumption_period': null,
823
+ 'allow_negative_consumptions': true,
824
+ 'is_expired': false,
825
+ 'device_id': 1749551075232009,
826
+ 'is_borrowed': false,
827
+ 'borrowed_until': null,
828
+ 'version': '2.0',
829
+ 'installation_file': '',
830
+ 'release_date': '2025-10-03T00:00:00.000Z',
831
+ 'hash_md5': '',
832
+ 'requires_version': null,
833
+ 'environment': 'mac',
834
+ 'eula_link': '',
835
+ 'release_notes_link': '',
836
+ 'size': null,
837
+ 'channel': '',
838
+ 'license_signature': '',
839
+ 'license_key': 'KEY_MOCK_VALID',
840
+ };
841
+ exports.TEST_LICENSE_USER_CHECK = {
842
+ 'id': 1744810240166049,
843
+ 'allow_grace_period': false,
844
+ 'allow_offline_activation': true,
845
+ 'allow_overages': false,
846
+ 'allow_unlimited_activations': false,
847
+ 'can_borrow': false,
848
+ 'enable_maintenance_period': true,
849
+ 'floating_timeout': 120,
850
+ 'grace_period': 0,
851
+ 'is_air_gapped': false,
852
+ 'is_floating': false,
853
+ 'is_floating_cloud': false,
854
+ 'is_hardware_key_auth': false,
855
+ 'is_trial': false,
856
+ 'license_active': true,
857
+ 'license_enabled': true,
858
+ 'license_template_id': 1125,
859
+ 'license_type': 'subscription',
860
+ 'maintenance_period': '2025-07-18T00:00:00.000Z',
861
+ 'max_activations': 10,
862
+ 'max_borrow_time': 0,
863
+ 'max_license_users': 10,
864
+ 'max_overages': 0,
865
+ 'max_transfers': 10,
866
+ 'order_store_id': 'test_new_21',
867
+ 'prevent_vm': false,
868
+ 'start_date': null,
869
+ 'times_activated': 2,
870
+ 'transfer_count': 0,
871
+ 'validity_period': '2026-06-18T00:00:00.000Z',
872
+ 'metadata': {
873
+ 'a': 1
874
+ },
875
+ 'custom_fields': [
876
+ {
877
+ 'name': 'field_num',
878
+ 'data_type': null,
879
+ 'value': '100'
880
+ },
881
+ {
882
+ 'name': 'field_string',
883
+ 'data_type': null,
884
+ 'value': 'foo'
885
+ }
886
+ ],
887
+ 'product_features': [
888
+ {
889
+ 'id': 1744810240094039,
890
+ 'code': 'consumption_feature',
891
+ 'name': 'consumption feature',
892
+ 'feature_type': 'consumption',
893
+ 'expiry_date': null,
894
+ 'metadata': {
895
+ 'b': 2
896
+ },
897
+ 'max_consumption': 10,
898
+ 'allow_unlimited_consumptions': false,
899
+ 'total_consumptions': 0,
900
+ 'allow_overages': false,
901
+ 'max_overages': 0,
902
+ 'reset_consumption': false,
903
+ 'consumption_period': null,
904
+ 'allow_negative_consumptions': true,
905
+ 'is_floating': false,
906
+ 'is_floating_cloud': false
907
+ }
908
+ ],
909
+ 'customer': {
910
+ 'email': 'test101@mail.com',
911
+ 'company_name': 'Acme Inc.',
912
+ 'reference': 'ref_usr_321',
913
+ 'phone': '+1656123123123',
914
+ 'first_name': '',
915
+ 'last_name': '',
916
+ 'city': 'ci',
917
+ 'postcode': '10000',
918
+ 'state': 'st',
919
+ 'country': 'co',
920
+ 'address': 'ČK12',
921
+ 'customer_account': {
922
+ 'id': 1262,
923
+ 'name': '',
924
+ 'code': 'abc'
925
+ },
926
+ 'metadata': {
927
+ 'b': 1
928
+ }
929
+ },
930
+ 'company': {
931
+ 'id': 276
932
+ },
933
+ 'product_details': {
934
+ 'product_id': 1743502393341012,
935
+ 'product_name': 'product',
936
+ 'short_code': 'product',
937
+ 'authorization_method': 'user',
938
+ 'metadata': {}
939
+ },
940
+ 'is_expired': false,
941
+ 'device_id': 1744810458472159,
942
+ 'is_borrowed': false,
943
+ 'borrowed_until': null,
944
+ 'version': '1.0.1',
945
+ 'installation_file': '',
946
+ 'release_date': '2025-05-21T00:00:00.000Z',
947
+ 'hash_md5': '',
948
+ 'requires_version': null,
949
+ 'environment': 'win64',
950
+ 'eula_link': '',
951
+ 'release_notes_link': '',
952
+ 'size': null,
953
+ 'channel': '',
954
+ 'user': {
955
+ 'id': 3469,
956
+ 'email': 'USERNAME_VALID',
957
+ 'first_name': '',
958
+ 'last_name': '',
959
+ 'phone_number': '',
960
+ 'is_initial_password': true,
961
+ 'max_activations': 1,
962
+ 'allow_unlimited_activations': false,
963
+ 'total_activations': 1
964
+ },
965
+ 'hardware_id': '123',
966
+ 'username': 'USERNAME_VALID|DSE2',
967
+ 'date': 'Fri Jul 4 2025 10:56:13 GMT+0000',
968
+ 'offline_signature': '',
969
+ 'license_signature': '',
970
+ 'license_signature_v2': ''
971
+ };
972
+ exports.TEST_BUNDLE_KEY_CHECK = [
973
+ {
974
+ 'id': 1749637884482109,
975
+ 'allow_grace_period': false,
976
+ 'allow_offline_activation': true,
977
+ 'allow_overages': false,
978
+ 'allow_unlimited_activations': false,
979
+ 'can_borrow': false,
980
+ 'enable_maintenance_period': false,
981
+ 'floating_timeout': 120,
982
+ 'grace_period': 0,
983
+ 'is_air_gapped': false,
984
+ 'is_floating': false,
985
+ 'is_floating_cloud': false,
986
+ 'is_hardware_key_auth': false,
987
+ 'is_trial': false,
988
+ 'license_active': true,
989
+ 'license_enabled': true,
990
+ 'license_key': 'KEY_MOCK_VALID',
991
+ 'license_template_id': null,
992
+ 'license_type': 'perpetual',
993
+ 'maintenance_period': null,
994
+ 'max_activations': 1,
995
+ 'max_borrow_time': 0,
996
+ 'max_license_users': 1,
997
+ 'max_overages': 0,
998
+ 'max_transfers': 0,
999
+ 'order_store_id': 'new11xxz2.,',
1000
+ 'prevent_vm': false,
1001
+ 'start_date': null,
1002
+ 'times_activated': 1,
1003
+ 'transfer_count': 0,
1004
+ 'validity_period': null,
1005
+ 'metadata': {},
1006
+ 'custom_fields': [],
1007
+ 'product_features': [],
1008
+ 'customer': {
1009
+ 'email': '',
1010
+ 'company_name': '',
1011
+ 'reference': '',
1012
+ 'phone': '',
1013
+ 'first_name': '',
1014
+ 'last_name': '',
1015
+ 'city': '',
1016
+ 'postcode': '',
1017
+ 'state': '',
1018
+ 'country': '',
1019
+ 'address': '',
1020
+ 'customer_account': null,
1021
+ 'metadata': {}
1022
+ },
1023
+ 'company': {
1024
+ 'id': 276
1025
+ },
1026
+ 'product_details': {
1027
+ 'product_id': 1736253599921332,
1028
+ 'product_name': 'test new bundle',
1029
+ 'short_code': 'tnb',
1030
+ 'authorization_method': 'license-key',
1031
+ 'metadata': {}
1032
+ },
1033
+ 'is_expired': false,
1034
+ 'device_id': 1751463755668119,
1035
+ 'is_borrowed': false,
1036
+ 'borrowed_until': null,
1037
+ 'version': '',
1038
+ 'installation_file': '',
1039
+ 'release_date': null,
1040
+ 'hash_md5': '',
1041
+ 'requires_version': null,
1042
+ 'environment': '',
1043
+ 'eula_link': '',
1044
+ 'release_notes_link': '',
1045
+ 'size': null,
1046
+ 'channel': '',
1047
+ 'license_signature': ''
1048
+ },
1049
+ {
1050
+ 'id': 1749637884862179,
1051
+ 'allow_grace_period': false,
1052
+ 'allow_offline_activation': true,
1053
+ 'allow_overages': false,
1054
+ 'allow_unlimited_activations': false,
1055
+ 'can_borrow': false,
1056
+ 'enable_maintenance_period': false,
1057
+ 'floating_timeout': 120,
1058
+ 'grace_period': 0,
1059
+ 'is_air_gapped': false,
1060
+ 'is_floating': false,
1061
+ 'is_floating_cloud': false,
1062
+ 'is_hardware_key_auth': false,
1063
+ 'is_trial': false,
1064
+ 'license_active': true,
1065
+ 'license_enabled': true,
1066
+ 'license_key': 'KEY_MOCK_VALID',
1067
+ 'license_template_id': null,
1068
+ 'license_type': 'consumption',
1069
+ 'maintenance_period': null,
1070
+ 'max_activations': 1,
1071
+ 'max_borrow_time': 0,
1072
+ 'max_license_users': 1,
1073
+ 'max_overages': 0,
1074
+ 'max_transfers': 0,
1075
+ 'order_store_id': 'new11xxz2.,',
1076
+ 'prevent_vm': false,
1077
+ 'start_date': null,
1078
+ 'times_activated': 1,
1079
+ 'transfer_count': 0,
1080
+ 'validity_period': null,
1081
+ 'metadata': {},
1082
+ 'custom_fields': [
1083
+ {
1084
+ 'name': 'a',
1085
+ 'data_type': null,
1086
+ 'value': 'a'
1087
+ },
1088
+ {
1089
+ 'name': 'b',
1090
+ 'data_type': null,
1091
+ 'value': 'b'
1092
+ },
1093
+ {
1094
+ 'name': 'c',
1095
+ 'data_type': null,
1096
+ 'value': 'c'
1097
+ },
1098
+ {
1099
+ 'name': 'd',
1100
+ 'data_type': null,
1101
+ 'value': 'd'
1102
+ },
1103
+ {
1104
+ 'name': 'a',
1105
+ 'data_type': null,
1106
+ 'value': 'a'
1107
+ },
1108
+ {
1109
+ 'name': null,
1110
+ 'data_type': null,
1111
+ 'value': null
1112
+ },
1113
+ {
1114
+ 'name': null,
1115
+ 'data_type': null,
1116
+ 'value': null
1117
+ },
1118
+ {
1119
+ 'name': null,
1120
+ 'data_type': null,
1121
+ 'value': null
1122
+ },
1123
+ {
1124
+ 'name': null,
1125
+ 'data_type': null,
1126
+ 'value': null
1127
+ },
1128
+ {
1129
+ 'name': 'enum',
1130
+ 'data_type': null,
1131
+ 'value': 'invalid'
1132
+ },
1133
+ {
1134
+ 'name': null,
1135
+ 'data_type': null,
1136
+ 'value': null
1137
+ }
1138
+ ],
1139
+ 'product_features': [],
1140
+ 'customer': {
1141
+ 'email': '',
1142
+ 'company_name': '',
1143
+ 'reference': '',
1144
+ 'phone': '',
1145
+ 'first_name': '',
1146
+ 'last_name': '',
1147
+ 'city': '',
1148
+ 'postcode': '',
1149
+ 'state': '',
1150
+ 'country': '',
1151
+ 'address': '',
1152
+ 'customer_account': null,
1153
+ 'metadata': {}
1154
+ },
1155
+ 'company': {
1156
+ 'id': 276
1157
+ },
1158
+ 'product_details': {
1159
+ 'product_id': 1584723961091040,
1160
+ 'product_name': 'product1',
1161
+ 'short_code': '1337',
1162
+ 'authorization_method': 'license-key',
1163
+ 'metadata': {}
1164
+ },
1165
+ 'max_consumptions': 1,
1166
+ 'total_consumptions': 0,
1167
+ 'allow_unlimited_consumptions': true,
1168
+ 'reset_consumption': false,
1169
+ 'consumption_period': null,
1170
+ 'allow_negative_consumptions': true,
1171
+ 'is_expired': false,
1172
+ 'device_id': 1751463755967139,
1173
+ 'is_borrowed': false,
1174
+ 'borrowed_until': null,
1175
+ 'version': '1.1',
1176
+ 'installation_file': '',
1177
+ 'release_date': '2023-02-08T00:00:00.000Z',
1178
+ 'hash_md5': '',
1179
+ 'requires_version': '1.1',
1180
+ 'environment': 'linux',
1181
+ 'eula_link': '',
1182
+ 'release_notes_link': '',
1183
+ 'size': null,
1184
+ 'channel': '',
1185
+ 'license_signature': ''
1186
+ },
1187
+ {
1188
+ 'id': 1749637884960189,
1189
+ 'allow_grace_period': false,
1190
+ 'allow_offline_activation': true,
1191
+ 'allow_overages': false,
1192
+ 'allow_unlimited_activations': false,
1193
+ 'can_borrow': false,
1194
+ 'enable_maintenance_period': false,
1195
+ 'floating_timeout': 120,
1196
+ 'grace_period': 0,
1197
+ 'is_air_gapped': false,
1198
+ 'is_floating': false,
1199
+ 'is_floating_cloud': false,
1200
+ 'is_hardware_key_auth': false,
1201
+ 'is_trial': false,
1202
+ 'license_active': true,
1203
+ 'license_enabled': true,
1204
+ 'license_key': 'KEY_MOCK_VALID',
1205
+ 'license_template_id': null,
1206
+ 'license_type': 'consumption',
1207
+ 'maintenance_period': null,
1208
+ 'max_activations': 1,
1209
+ 'max_borrow_time': 0,
1210
+ 'max_license_users': 1,
1211
+ 'max_overages': 0,
1212
+ 'max_transfers': 0,
1213
+ 'order_store_id': 'new11xxz2.,',
1214
+ 'prevent_vm': false,
1215
+ 'start_date': null,
1216
+ 'times_activated': 1,
1217
+ 'transfer_count': 0,
1218
+ 'validity_period': null,
1219
+ 'metadata': {},
1220
+ 'custom_fields': [],
1221
+ 'product_features': [],
1222
+ 'customer': {
1223
+ 'email': '',
1224
+ 'company_name': '',
1225
+ 'reference': '',
1226
+ 'phone': '',
1227
+ 'first_name': '',
1228
+ 'last_name': '',
1229
+ 'city': '',
1230
+ 'postcode': '',
1231
+ 'state': '',
1232
+ 'country': '',
1233
+ 'address': '',
1234
+ 'customer_account': null,
1235
+ 'metadata': {}
1236
+ },
1237
+ 'company': {
1238
+ 'id': 276
1239
+ },
1240
+ 'product_details': {
1241
+ 'product_id': 1584723961091069,
1242
+ 'product_name': 'product-TNSgl',
1243
+ 'short_code': 'tnsgl',
1244
+ 'authorization_method': 'license-key',
1245
+ 'metadata': {}
1246
+ },
1247
+ 'max_consumptions': 1,
1248
+ 'total_consumptions': 0,
1249
+ 'allow_unlimited_consumptions': true,
1250
+ 'reset_consumption': false,
1251
+ 'consumption_period': null,
1252
+ 'allow_negative_consumptions': true,
1253
+ 'is_expired': false,
1254
+ 'device_id': 1751463755968149,
1255
+ 'is_borrowed': false,
1256
+ 'borrowed_until': null,
1257
+ 'version': '',
1258
+ 'installation_file': '',
1259
+ 'release_date': null,
1260
+ 'hash_md5': '',
1261
+ 'requires_version': null,
1262
+ 'environment': '',
1263
+ 'eula_link': '',
1264
+ 'release_notes_link': '',
1265
+ 'size': null,
1266
+ 'channel': '',
1267
+ 'license_signature': ''
1268
+ }
1269
+ ];
1270
+ exports.TEST_CHECK_LICENSE_FEATURE = {
1271
+ 'id': 1746602015029965,
1272
+ 'license_id': 1746535804817229,
1273
+ 'code': 'm',
1274
+ 'name': 'm',
1275
+ 'feature_type': 'consumption',
1276
+ 'company': {
1277
+ 'id': 276
1278
+ },
1279
+ 'metadata': {},
1280
+ 'is_floating': false,
1281
+ 'is_floating_cloud': false,
1282
+ 'expiry_date': null,
1283
+ 'consumption_period': 'monthly',
1284
+ 'allow_negative_consumptions': true,
1285
+ 'allow_overages': false,
1286
+ 'allow_unlimited_consumptions': false,
1287
+ 'max_consumption': 10,
1288
+ 'max_overages': 0,
1289
+ 'reset_consumption': false,
1290
+ 'total_consumptions': 5
1291
+ };
1292
+ exports.TEST_USER_LICENSES = [
1293
+ {
1294
+ 'license': {
1295
+ 'id': 1743516646791019,
1296
+ 'allow_grace_period': false,
1297
+ 'allow_offline_activation': true,
1298
+ 'allow_overages': false,
1299
+ 'allow_unlimited_activations': false,
1300
+ 'can_borrow': false,
1301
+ 'enable_maintenance_period': true,
1302
+ 'floating_timeout': 120,
1303
+ 'grace_period': 1,
1304
+ 'is_air_gapped': false,
1305
+ 'is_floating': false,
1306
+ 'is_floating_cloud': false,
1307
+ 'is_hardware_key_auth': false,
1308
+ 'is_trial': true,
1309
+ 'license_active': false,
1310
+ 'license_enabled': true,
1311
+ 'license_template_id': null,
1312
+ 'license_type': 'subscription',
1313
+ 'maintenance_period': null,
1314
+ 'max_activations': 10,
1315
+ 'max_borrow_time': 0,
1316
+ 'max_license_users': 5,
1317
+ 'max_overages': 0,
1318
+ 'max_transfers': 10,
1319
+ 'order_store_id': '63d3361b540946a0a3d18ea211c1d557',
1320
+ 'prevent_vm': false,
1321
+ 'start_date': null,
1322
+ 'times_activated': 0,
1323
+ 'transfer_count': 0,
1324
+ 'validity_period': null,
1325
+ 'metadata': {},
1326
+ 'custom_fields': [
1327
+ {
1328
+ 'name': 'field_num',
1329
+ 'data_type': null,
1330
+ 'value': '100'
1331
+ },
1332
+ {
1333
+ 'name': 'field_string',
1334
+ 'data_type': null,
1335
+ 'value': 'foo'
1336
+ }
1337
+ ],
1338
+ 'product_features': [
1339
+ {
1340
+ 'id': 1743521645266264,
1341
+ 'code': 'consumption_feature',
1342
+ 'name': 'consumption feature',
1343
+ 'feature_type': 'consumption',
1344
+ 'expiry_date': null,
1345
+ 'metadata': {
1346
+ 'b': 2
1347
+ },
1348
+ 'max_consumption': 10,
1349
+ 'allow_unlimited_consumptions': false,
1350
+ 'total_consumptions': 5,
1351
+ 'allow_overages': false,
1352
+ 'max_overages': 0,
1353
+ 'reset_consumption': false,
1354
+ 'consumption_period': 'daily',
1355
+ 'allow_negative_consumptions': true,
1356
+ 'is_floating': false,
1357
+ 'is_floating_cloud': false
1358
+ },
1359
+ {
1360
+ 'id': 1743521645299211,
1361
+ 'code': 'activation_feature',
1362
+ 'name': 'activation feature',
1363
+ 'feature_type': 'activation',
1364
+ 'expiry_date': null,
1365
+ 'metadata': {
1366
+ 'a': 1
1367
+ },
1368
+ 'is_floating': false,
1369
+ 'is_floating_cloud': false
1370
+ }
1371
+ ],
1372
+ 'customer': {
1373
+ 'email': '',
1374
+ 'company_name': '',
1375
+ 'reference': '',
1376
+ 'phone': '',
1377
+ 'first_name': '',
1378
+ 'last_name': '',
1379
+ 'city': '',
1380
+ 'postcode': '',
1381
+ 'state': '',
1382
+ 'country': '',
1383
+ 'address': '',
1384
+ 'customer_account': null,
1385
+ 'metadata': {}
1386
+ },
1387
+ 'company': {
1388
+ 'id': 276
1389
+ },
1390
+ 'product_details': {
1391
+ 'product_id': 1743502393341012,
1392
+ 'product_name': 'myproduct',
1393
+ 'short_code': 'myproduct',
1394
+ 'authorization_method': 'user',
1395
+ 'metadata': {}
1396
+ },
1397
+ 'trial_days': 15
1398
+ },
1399
+ 'user': {
1400
+ 'id': 3442,
1401
+ 'email': 'test1@licensespring.com',
1402
+ 'first_name': '',
1403
+ 'last_name': '',
1404
+ 'phone_number': '',
1405
+ 'is_initial_password': true,
1406
+ 'max_activations': 1,
1407
+ 'allow_unlimited_activations': false,
1408
+ 'total_activations': 0
1409
+ }
1410
+ }
1411
+ ];
1412
+ exports.TEST_DEVICE_LICENSES = [
1413
+ {
1414
+ 'id': 1743668740678019,
1415
+ 'allow_grace_period': false,
1416
+ 'allow_offline_activation': true,
1417
+ 'allow_overages': false,
1418
+ 'allow_unlimited_activations': false,
1419
+ 'can_borrow': false,
1420
+ 'enable_maintenance_period': false,
1421
+ 'floating_timeout': 120,
1422
+ 'grace_period': 0,
1423
+ 'is_air_gapped': false,
1424
+ 'is_floating': false,
1425
+ 'is_floating_cloud': false,
1426
+ 'is_hardware_key_auth': false,
1427
+ 'is_trial': false,
1428
+ 'license_active': true,
1429
+ 'license_enabled': true,
1430
+ 'license_key': 'K29F-Y74J-SGRG-WXMY',
1431
+ 'license_template_id': null,
1432
+ 'license_type': 'perpetual',
1433
+ 'maintenance_period': null,
1434
+ 'max_activations': 2,
1435
+ 'max_borrow_time': 0,
1436
+ 'max_license_users': 1,
1437
+ 'max_overages': 0,
1438
+ 'max_transfers': 0,
1439
+ 'order_store_id': 'cf922b51bf6e45048c29d085c04615c5',
1440
+ 'prevent_vm': false,
1441
+ 'start_date': null,
1442
+ 'times_activated': 1,
1443
+ 'transfer_count': 2,
1444
+ 'validity_period': null,
1445
+ 'metadata': {},
1446
+ 'custom_fields': [],
1447
+ 'product_features': [],
1448
+ 'customer': {
1449
+ 'email': '',
1450
+ 'company_name': '',
1451
+ 'reference': '',
1452
+ 'phone': '',
1453
+ 'first_name': '',
1454
+ 'last_name': '',
1455
+ 'city': '',
1456
+ 'postcode': '',
1457
+ 'state': '',
1458
+ 'country': '',
1459
+ 'address': '',
1460
+ 'customer_account': null,
1461
+ 'metadata': {}
1462
+ },
1463
+ 'company': {
1464
+ 'id': 276
1465
+ },
1466
+ 'product_details': {
1467
+ 'product_id': 1743668696892505,
1468
+ 'product_name': 'myproduct3',
1469
+ 'short_code': 'myproduct3',
1470
+ 'authorization_method': 'license-key',
1471
+ 'metadata': {}
1472
+ }
1473
+ },
1474
+ {
1475
+ 'id': 1747305772672019,
1476
+ 'allow_grace_period': false,
1477
+ 'allow_offline_activation': true,
1478
+ 'allow_overages': false,
1479
+ 'allow_unlimited_activations': false,
1480
+ 'can_borrow': false,
1481
+ 'enable_maintenance_period': false,
1482
+ 'floating_timeout': 120,
1483
+ 'grace_period': 0,
1484
+ 'is_air_gapped': false,
1485
+ 'is_floating': false,
1486
+ 'is_floating_cloud': false,
1487
+ 'is_hardware_key_auth': false,
1488
+ 'is_trial': false,
1489
+ 'license_active': true,
1490
+ 'license_enabled': true,
1491
+ 'license_template_id': null,
1492
+ 'license_type': 'time-limited',
1493
+ 'maintenance_period': null,
1494
+ 'max_activations': 10,
1495
+ 'max_borrow_time': 0,
1496
+ 'max_license_users': 1,
1497
+ 'max_overages': 0,
1498
+ 'max_transfers': 0,
1499
+ 'order_store_id': 'bundle-22-test',
1500
+ 'prevent_vm': true,
1501
+ 'start_date': null,
1502
+ 'times_activated': 1,
1503
+ 'transfer_count': 0,
1504
+ 'validity_period': '2026-05-15',
1505
+ 'metadata': {},
1506
+ 'custom_fields': [],
1507
+ 'product_features': [],
1508
+ 'customer': {
1509
+ 'email': '',
1510
+ 'company_name': '',
1511
+ 'reference': '',
1512
+ 'phone': '',
1513
+ 'first_name': '',
1514
+ 'last_name': '',
1515
+ 'city': '',
1516
+ 'postcode': '',
1517
+ 'state': '',
1518
+ 'country': '',
1519
+ 'address': '',
1520
+ 'customer_account': null,
1521
+ 'metadata': {}
1522
+ },
1523
+ 'company': {
1524
+ 'id': 276
1525
+ },
1526
+ 'product_details': {
1527
+ 'product_id': 1584723961091083,
1528
+ 'product_name': 'product-mk2Wn',
1529
+ 'short_code': 'mk2wn',
1530
+ 'authorization_method': 'license-key',
1531
+ 'metadata': {}
1532
+ }
1533
+ }
1534
+ ];
1535
+ exports.TEST_ADD_CONSUMPTION = {
1536
+ 'id': 1746535804817229,
1537
+ 'max_consumptions': 4,
1538
+ 'allow_unlimited_consumptions': true,
1539
+ 'allow_negative_consumptions': true,
1540
+ 'allow_overages': false,
1541
+ 'max_overages': 0,
1542
+ 'reset_consumption': false,
1543
+ 'consumption_period': null,
1544
+ 'total_consumptions': 7,
1545
+ 'company': {
1546
+ 'id': 276
1547
+ }
1548
+ };
1549
+ exports.TEST_ADD_FEATURE_CONSUMPTION = {
1550
+ 'id': 1746602015029965,
1551
+ 'license_id': 1746535804817229,
1552
+ 'company': {
1553
+ 'id': 276
1554
+ },
1555
+ 'total_consumptions': 5,
1556
+ 'max_consumptions': 10,
1557
+ 'allow_negative_consumptions': true,
1558
+ 'allow_unlimited_consumptions': false,
1559
+ 'allow_overages': false,
1560
+ 'max_overages': 0,
1561
+ 'reset_consumption': false,
1562
+ 'consumption_period': 'monthly',
1563
+ 'is_floating': false,
1564
+ 'is_floating_cloud': false
1565
+ };
1566
+ exports.TEST_TRIAL_KEY_USER_NEW = {
1567
+ 'id': 1751626777703029,
1568
+ 'order_id': 1751626777610009,
1569
+ 'product_id': 1743584373129688,
1570
+ 'created_at': 1751626777753,
1571
+ 'updated_at': 1751626777753,
1572
+ 'times_activated': 0,
1573
+ 'is_trial': true,
1574
+ 'active': false,
1575
+ 'enabled': true,
1576
+ 'is_floating': false,
1577
+ 'max_activations': 10,
1578
+ 'trial_days': 7,
1579
+ 'license_type': 'perpetual',
1580
+ 'max_transfers': 1,
1581
+ 'prevent_vm': false,
1582
+ 'enable_maintenance_period': false,
1583
+ 'maintenance_duration': null,
1584
+ 'metadata': {},
1585
+ 'is_hardware_key_auth': false,
1586
+ 'company': {
1587
+ 'id': 276
1588
+ },
1589
+ 'LicenseProductFeatures': [],
1590
+ 'LicenseCustomFields': [],
1591
+ 'license_user_id': 3442,
1592
+ 'max_license_users': 1,
1593
+ 'license_user': 'test1@licensespring.com',
1594
+ 'initial_password': '9cg74y@#'
1595
+ };
1596
+ exports.TEST_TRIAL_KEY_USER_EXISTING = {
1597
+ 'license_type': 'perpetual',
1598
+ 'is_trial': true,
1599
+ 'license_user': 'test1@licensespring.com'
1600
+ };
1601
+ exports.TEST_TRIAL_KEY_KEY_NEW = {
1602
+ 'id': 1751626831289069,
1603
+ 'order_id': 1751626831203049,
1604
+ 'product_id': 1584723961091040,
1605
+ 'created_at': 1751626831667,
1606
+ 'updated_at': 1751626831667,
1607
+ 'times_activated': 0,
1608
+ 'is_trial': true,
1609
+ 'active': false,
1610
+ 'enabled': true,
1611
+ 'is_floating': false,
1612
+ 'max_activations': 1,
1613
+ 'trial_days': 365,
1614
+ 'license_type': 'consumption',
1615
+ 'max_transfers': 0,
1616
+ 'prevent_vm': false,
1617
+ 'enable_maintenance_period': false,
1618
+ 'maintenance_duration': null,
1619
+ 'metadata': {},
1620
+ 'is_hardware_key_auth': false,
1621
+ 'company': {
1622
+ 'id': 276
1623
+ },
1624
+ 'LicenseProductFeatures': [
1625
+ {
1626
+ 'id': 1751626831389079,
1627
+ 'product_feature_id': 424,
1628
+ 'max_consumption': 1,
1629
+ 'allow_overages': false,
1630
+ 'max_overages': 0,
1631
+ 'reset_consumption': false,
1632
+ 'consumption_period': 'daily',
1633
+ 'expiry_date': null,
1634
+ 'is_floating': false,
1635
+ 'is_floating_cloud': false,
1636
+ 'metadata': {
1637
+ 'Value1': 12
1638
+ }
1639
+ },
1640
+ {
1641
+ 'id': 1751626831450089,
1642
+ 'product_feature_id': 692,
1643
+ 'max_consumption': 1,
1644
+ 'allow_overages': false,
1645
+ 'max_overages': 0,
1646
+ 'reset_consumption': false,
1647
+ 'consumption_period': 'daily',
1648
+ 'expiry_date': null,
1649
+ 'is_floating': true,
1650
+ 'is_floating_cloud': false,
1651
+ 'metadata': {},
1652
+ 'floating_timeout': 120,
1653
+ 'floating_users': 5
1654
+ },
1655
+ {
1656
+ 'id': 1751626831495099,
1657
+ 'product_feature_id': 693,
1658
+ 'max_consumption': 1,
1659
+ 'allow_overages': false,
1660
+ 'max_overages': 0,
1661
+ 'reset_consumption': false,
1662
+ 'consumption_period': 'daily',
1663
+ 'expiry_date': null,
1664
+ 'is_floating': true,
1665
+ 'is_floating_cloud': false,
1666
+ 'metadata': {},
1667
+ 'floating_timeout': 120,
1668
+ 'floating_users': 5
1669
+ },
1670
+ {
1671
+ 'id': 1751626831537109,
1672
+ 'product_feature_id': 425,
1673
+ 'max_consumption': 0,
1674
+ 'allow_overages': false,
1675
+ 'max_overages': 0,
1676
+ 'reset_consumption': false,
1677
+ 'consumption_period': null,
1678
+ 'expiry_date': null,
1679
+ 'is_floating': false,
1680
+ 'is_floating_cloud': false,
1681
+ 'metadata': {}
1682
+ },
1683
+ {
1684
+ 'id': 1751626831580119,
1685
+ 'product_feature_id': 426,
1686
+ 'max_consumption': 1,
1687
+ 'allow_overages': false,
1688
+ 'max_overages': 0,
1689
+ 'reset_consumption': false,
1690
+ 'consumption_period': 'daily',
1691
+ 'expiry_date': null,
1692
+ 'is_floating': false,
1693
+ 'is_floating_cloud': false,
1694
+ 'metadata': {}
1695
+ },
1696
+ {
1697
+ 'id': 1751626831623129,
1698
+ 'product_feature_id': 427,
1699
+ 'max_consumption': 1,
1700
+ 'allow_overages': false,
1701
+ 'max_overages': 0,
1702
+ 'reset_consumption': false,
1703
+ 'consumption_period': 'daily',
1704
+ 'expiry_date': null,
1705
+ 'is_floating': false,
1706
+ 'is_floating_cloud': false,
1707
+ 'metadata': {}
1708
+ }
1709
+ ],
1710
+ 'LicenseCustomFields': [
1711
+ {
1712
+ 'product_custom_field_id': 242,
1713
+ 'value': 'a'
1714
+ },
1715
+ {
1716
+ 'product_custom_field_id': 246,
1717
+ 'value': 'b'
1718
+ },
1719
+ {
1720
+ 'product_custom_field_id': 283,
1721
+ 'value': 'c'
1722
+ }
1723
+ ],
1724
+ 'license_key': '6Z29-M5XF-ZEEV-EM13',
1725
+ 'allow_overages': false,
1726
+ 'max_overages': 0,
1727
+ 'max_consumptions': 1,
1728
+ 'valid_duration': null,
1729
+ 'consumption_period': null,
1730
+ 'reset_consumption': false,
1731
+ 'license': '6Z29-M5XF-ZEEV-EM13'
1732
+ };
1733
+ exports.TEST_TRIAL_KEY_KEY_EXISTING = {
1734
+ 'license_type': 'consumption',
1735
+ 'is_trial': true,
1736
+ 'license': '6Z29-M5XF-ZEEV-EM13'
1737
+ };
1738
+ exports.TEST_PRODUCT_DETAILS_FULL_INCLUDE = {
1739
+ 'product_id': 1743502393341012,
1740
+ 'product_name': 'myproduct',
1741
+ 'short_code': 'myproduct',
1742
+ 'allow_trial': true,
1743
+ 'trial_days': 5,
1744
+ 'authorization_method': 'user',
1745
+ 'floating_timeout': 120,
1746
+ 'allow_overages': false,
1747
+ 'max_overages': 0,
1748
+ 'prevent_vm': false,
1749
+ 'metadata': {},
1750
+ 'metadata_string': '{}',
1751
+ 'company': {
1752
+ 'id': 276
1753
+ },
1754
+ 'latest_version': {
1755
+ 'id': 733571,
1756
+ 'created_at': '2025-04-17T07:22:55.000Z',
1757
+ 'updated_at': '2025-04-17T07:23:45.000Z',
1758
+ 'version': '1.0.1',
1759
+ 'full_link': '',
1760
+ 'filename': null,
1761
+ 'release_date': '2025-05-21',
1762
+ 'enabled': true,
1763
+ 'hash_md5': '',
1764
+ 'product_id': 1743502393341012,
1765
+ 'environment': 'win64',
1766
+ 'eula_link': '',
1767
+ 'release_notes_link': '',
1768
+ 'size': null,
1769
+ 'requires_version': null,
1770
+ 'channel': null
1771
+ },
1772
+ 'custom_fields': [
1773
+ {
1774
+ 'name': 'field_num',
1775
+ 'id': 311,
1776
+ 'default_value': '100'
1777
+ },
1778
+ {
1779
+ 'name': 'field_string',
1780
+ 'id': 312,
1781
+ 'default_value': 'foo'
1782
+ }
1783
+ ]
1784
+ };
1785
+ exports.TEST_TRACK_DEVICE_VARIABLES = [
1786
+ {
1787
+ 'variable': 'var1',
1788
+ 'value': 'foo',
1789
+ 'device_id': 1746535806178269,
1790
+ 'created_at': 1751626895123
1791
+ },
1792
+ {
1793
+ 'variable': 'var2',
1794
+ 'value': '1',
1795
+ 'device_id': 1746535806178269,
1796
+ 'created_at': 1751626895123
1797
+ }
1798
+ ];
1799
+ exports.TEST_GET_DEVICE_VARIABLES = [
1800
+ {
1801
+ 'id': 4077,
1802
+ 'created_at': '2025-07-04T11:01:35.000Z',
1803
+ 'variable': 'var1',
1804
+ 'value': 'foo',
1805
+ 'device_id': 1746535806178269
1806
+ },
1807
+ {
1808
+ 'id': 4078,
1809
+ 'created_at': '2025-07-04T11:01:35.000Z',
1810
+ 'variable': 'var2',
1811
+ 'value': '1',
1812
+ 'device_id': 1746535806178269
1813
+ }
1814
+ ];
1815
+ exports.TEST_VERSIONS = [
1816
+ {
1817
+ 'version': '1.0.0',
1818
+ 'release_date': '2025-04-01T00:00:00.000Z'
1819
+ },
1820
+ {
1821
+ 'version': '1.0.0',
1822
+ 'release_date': '2025-04-01T00:00:00.000Z'
1823
+ },
1824
+ {
1825
+ 'version': '1.0.1',
1826
+ 'release_date': '2025-05-21T00:00:00.000Z'
1827
+ }
1828
+ ];
1829
+ exports.TEST_INSTALLATION_FILE = {
1830
+ 'id': 733571,
1831
+ 'version': '1.0.1',
1832
+ 'installation_file': '',
1833
+ 'release_date': '2025-05-21T00:00:00.000Z',
1834
+ 'hash_md5': '',
1835
+ 'environment': 'win64',
1836
+ 'eula_link': '',
1837
+ 'release_notes_link': '',
1838
+ 'size': null,
1839
+ 'requires_version': null,
1840
+ 'channel': null,
1841
+ 'company': {
1842
+ 'id': 276
1843
+ }
1844
+ };
1845
+ exports.TEST_CUSTOMER_LICENSE_USERS = {
1846
+ 'company': {
1847
+ 'id': 276
1848
+ },
1849
+ 'customer': {
1850
+ 'email': 't@t.com',
1851
+ 'first_name': '',
1852
+ 'last_name': '',
1853
+ 'company_name': '',
1854
+ 'phone': '',
1855
+ 'reference': '',
1856
+ 'address': '',
1857
+ 'postcode': '',
1858
+ 'city': '',
1859
+ 'country': '',
1860
+ 'state': '',
1861
+ 'customer_account': null,
1862
+ 'metadata': {
1863
+ 'key1': null
1864
+ }
1865
+ },
1866
+ 'users': [
1867
+ {
1868
+ 'email': 't@t.com',
1869
+ 'is_active': true,
1870
+ 'first_name': 'tt',
1871
+ 'last_name': 'cc',
1872
+ 'phone_number': '',
1873
+ 'is_initial_password': true,
1874
+ 'initial_password': '@7y1!pg3',
1875
+ 'max_activations': 1,
1876
+ 'total_activations': 0,
1877
+ 'allow_unlimited_activations': false,
1878
+ 'license_id': 1748239609275489,
1879
+ 'order_store_id': 'trial_1748239609271469',
1880
+ 'order_id': 1748239609271469
1881
+ },
1882
+ {
1883
+ 'email': 't@t.com',
1884
+ 'is_active': true,
1885
+ 'first_name': 'tt',
1886
+ 'last_name': 'cc',
1887
+ 'phone_number': '',
1888
+ 'is_initial_password': true,
1889
+ 'initial_password': '@7y1!pg3',
1890
+ 'max_activations': 1,
1891
+ 'total_activations': 0,
1892
+ 'allow_unlimited_activations': false,
1893
+ 'license_id': 1748239611815549,
1894
+ 'order_store_id': 'trial_1748239611756529',
1895
+ 'order_id': 1748239611756529
1896
+ },
1897
+ {
1898
+ 'email': 't@t.com',
1899
+ 'is_active': true,
1900
+ 'first_name': 'tt',
1901
+ 'last_name': 'cc',
1902
+ 'phone_number': '',
1903
+ 'is_initial_password': true,
1904
+ 'initial_password': '@7y1!pg3',
1905
+ 'max_activations': 1,
1906
+ 'total_activations': 0,
1907
+ 'allow_unlimited_activations': false,
1908
+ 'license_id': 1748239613607529,
1909
+ 'order_store_id': 'trial_1748239613605509',
1910
+ 'order_id': 1748239613605509
1911
+ },
1912
+ {
1913
+ 'email': 't@t.com',
1914
+ 'is_active': true,
1915
+ 'first_name': 'tt',
1916
+ 'last_name': 'cc',
1917
+ 'phone_number': '',
1918
+ 'is_initial_password': true,
1919
+ 'initial_password': '@7y1!pg3',
1920
+ 'max_activations': 1,
1921
+ 'total_activations': 0,
1922
+ 'allow_unlimited_activations': false,
1923
+ 'license_id': 1748239650612589,
1924
+ 'order_store_id': 'trial_1748239650583569',
1925
+ 'order_id': 1748239650583569
1926
+ }
1927
+ ]
1928
+ };
1929
+ exports.TEST_DEACTIVATED = 'license_deactivated';
1930
+ exports.TEST_PASSWORD_CHANGED = 'password_changed';
1931
+ exports.TEST_FLOATING_BORROW = {
1932
+ borrowed_until: '2019-01-25T02:00:00.000',
1933
+ max_borrow_time: 12,
1934
+ device_id: 23456,
1935
+ license_id: 12345,
1936
+ company: {
1937
+ id: 276,
1938
+ },
1939
+ };
1940
+ exports.TEST_ERROR_RESPONSE = {
1941
+ message: 'Request failed with status code 400',
1942
+ name: 'AxiosError',
1943
+ stack: '',
1944
+ config: {},
1945
+ method: 'MOCKED',
1946
+ url: 'MOCKED',
1947
+ allowAbsoluteUrls: true,
1948
+ code: 'ERR_BAD_REQUEST',
1949
+ status: 400,
1950
+ response: {
1951
+ headers: { 'content-type': 'application/json; charset=utf-8', 'content-length': '102', 'date': 'Thu, 03 Jul 2025 12:14:00 GMT', 'connection': 'close' },
1952
+ data: {},
1953
+ status: 400,
1954
+ statusText: 'Bad Request',
1955
+ }
1956
+ };
1957
+ exports.TEST_SSO_URL = {
1958
+ 'url': 'https://auth.dev.licensespring.com/realms/user-portal/protocol/openid-connect/auth?scope=openid&response_type=id_token token&client_id=license-users&redirect_uri=http://localhost:3333&kc_idp_hint=DSE2-qa&nonce=264577196',
1959
+ 'openid_configuration': {
1960
+ 'issuer': 'https://auth.dev.licensespring.com/realms/user-portal',
1961
+ 'end_session_endpoint': 'https://auth.dev.licensespring.com/realms/user-portal/protocol/openid-connect/logout',
1962
+ 'token_endpoint': 'https://auth.dev.licensespring.com/realms/user-portal/protocol/openid-connect/token',
1963
+ 'introspection_endpoint': 'https://auth.dev.licensespring.com/realms/user-portal/protocol/openid-connect/token/introspect'
1964
+ }
1965
+ };
1966
+ //# sourceMappingURL=api-response-mock.js.map