@licensespring/node-sdk 1.1.18 → 1.1.19-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.
@@ -0,0 +1,504 @@
1
+ export type ActivateBundleResponse = ActivateLicenseResponse[];
2
+ export type ActivateLicenseResponse = LicenseResponse & {
3
+ request: string;
4
+ active: boolean;
5
+ device_id: number;
6
+ validity_period: string | null;
7
+ is_expired: boolean;
8
+ hardware_id: string;
9
+ username?: string;
10
+ max_license_users?: number;
11
+ user?: {
12
+ id: number;
13
+ allow_unlimited_activations: boolean;
14
+ email: string;
15
+ first_name: string;
16
+ is_initial_password: boolean;
17
+ last_name: string;
18
+ max_activations: number;
19
+ phone_number: string;
20
+ total_activations: number;
21
+ };
22
+ is_floating_cloud: boolean;
23
+ floating_in_use?: boolean;
24
+ license_signature: string;
25
+ variables?: ({
26
+ value: string;
27
+ device_id: number;
28
+ variable: string;
29
+ created_at: string | null;
30
+ })[];
31
+ };
32
+ export type ActivateOfflineBundleResponse = {
33
+ licenses: ActivateOfflineResponseSublicense[];
34
+ bundle_signature_v2: string;
35
+ };
36
+ export type ActivateOfflineResponseSublicense = ActivateLicenseResponse & {
37
+ date: string;
38
+ offline_signature: string;
39
+ };
40
+ export type ActivateOfflineResponse = ActivateOfflineResponseSublicense & {
41
+ date: string;
42
+ offline_signature: string;
43
+ license_signature_v2: string;
44
+ };
45
+ export type AddConsumptionResponse = {
46
+ id: number;
47
+ max_consumptions: number;
48
+ allow_unlimited_consumptions: boolean;
49
+ allow_negative_consumptions: boolean;
50
+ allow_overages: boolean;
51
+ max_overages: number;
52
+ reset_consumption: boolean;
53
+ consumption_period: ConsumptionPeriod | undefined;
54
+ total_consumptions: number;
55
+ company: {
56
+ id: number;
57
+ };
58
+ };
59
+ export type AddFeatureConsumptionResponse = {
60
+ id: number;
61
+ license_id: number;
62
+ company: {
63
+ id: number;
64
+ };
65
+ total_consumptions: number;
66
+ max_consumptions: number;
67
+ allow_negative_consumptions: boolean;
68
+ allow_unlimited_consumptions: boolean;
69
+ allow_overages: boolean;
70
+ max_overages: number;
71
+ reset_consumption: boolean;
72
+ consumption_period: ConsumptionPeriod;
73
+ is_floating: boolean;
74
+ is_floating_cloud: boolean;
75
+ floating_timeout?: number;
76
+ floating_users?: number;
77
+ };
78
+ export type ChangePasswordResponse = 'password_changed';
79
+ export type CheckBundleResponse = LicenseResponse[];
80
+ export type CheckLicenseFeatureResponse = {
81
+ id: number;
82
+ license_id: number;
83
+ code: string;
84
+ name: string;
85
+ metadata: JSONObjectRequired;
86
+ metadata_string?: string;
87
+ is_floating: boolean;
88
+ is_floating_cloud: boolean;
89
+ floating_in_use_devices?: number;
90
+ expiry_date: string | null;
91
+ feature_type: 'activation';
92
+ } | {
93
+ id: number;
94
+ license_id: number;
95
+ code: string;
96
+ name: string;
97
+ metadata: JSONObjectRequired;
98
+ metadata_string?: string;
99
+ is_floating: boolean;
100
+ is_floating_cloud: boolean;
101
+ floating_in_use_devices?: number;
102
+ expiry_date: string | null;
103
+ feature_type: 'consumption';
104
+ consumption_period: ConsumptionPeriod;
105
+ allow_negative_consumptions: boolean;
106
+ allow_overages: boolean;
107
+ allow_unlimited_consumptions: boolean;
108
+ max_consumption: number;
109
+ max_overages: number;
110
+ reset_consumption: boolean;
111
+ total_consumptions: number;
112
+ };
113
+ export type CheckLicenseResponse = LicenseResponse & {
114
+ license_signature: string;
115
+ };
116
+ export type CustomerLicenseUsersResponse = {
117
+ company: {
118
+ id: number;
119
+ };
120
+ customer: CustomerResponse;
121
+ users: ({
122
+ email: string | undefined;
123
+ allow_unlimited_activations: boolean;
124
+ first_name: string;
125
+ initial_password: string;
126
+ is_active: boolean;
127
+ is_initial_password: boolean;
128
+ last_name: string;
129
+ license_id: number;
130
+ max_activations: number;
131
+ order_id: number;
132
+ order_store_id: string;
133
+ phone_number: string;
134
+ total_activations: number;
135
+ })[];
136
+ };
137
+ export type DeactivateBundleResponse = 'license_deactivated';
138
+ export type DeactivateLicenseResponse = 'license_deactivated';
139
+ export type DeactivateOfflineBundleResponse = 'license_deactivated';
140
+ export type DeactivateOfflineResponse = 'license_deactivated';
141
+ export type DeviceLicensesResponse = LicenseResponse & {
142
+ user?: {
143
+ id: number;
144
+ email: string;
145
+ first_name: string;
146
+ last_name: string;
147
+ max_activations: number;
148
+ allow_unlimited_activations: boolean;
149
+ total_activations: number;
150
+ };
151
+ };
152
+ export type FloatingBorrowResponse = {
153
+ borrowed_until: string | null;
154
+ max_borrow_time: number;
155
+ device_id: number;
156
+ license_id: number;
157
+ company: {
158
+ id: number;
159
+ };
160
+ };
161
+ export type GetDeviceVariablesResponse = {
162
+ id: number;
163
+ created_at: string;
164
+ variable?: string;
165
+ value?: string;
166
+ device_id: number;
167
+ }[];
168
+ export type GetUserLicensesResponse = ({
169
+ license: LicenseResponse;
170
+ user: {
171
+ id: number;
172
+ allow_unlimited_activations: boolean | undefined;
173
+ email: string;
174
+ first_name: string;
175
+ is_initial_password: boolean;
176
+ last_name: string;
177
+ max_activations: number | undefined;
178
+ phone_number: string;
179
+ total_activations: number | undefined;
180
+ };
181
+ })[];
182
+ export type InstallationFileResponse = {
183
+ id: number;
184
+ version: string | undefined;
185
+ installation_file: string | undefined;
186
+ release_date: string | null;
187
+ hash_md5: string | undefined;
188
+ environment: string;
189
+ eula_link: string | undefined;
190
+ release_notes_link: string | undefined;
191
+ size: string | undefined;
192
+ requires_version: string | undefined;
193
+ channel: string | undefined;
194
+ company: {
195
+ id: number;
196
+ };
197
+ };
198
+ export type OauthUrlResponse = {
199
+ url: string;
200
+ login_type: string;
201
+ };
202
+ export type GetProductDetailsResponse = {
203
+ product_id: number;
204
+ product_name: string;
205
+ short_code: string;
206
+ allow_trial: boolean;
207
+ trial_days: number;
208
+ authorization_method: AuthorizationMethod;
209
+ floating_timeout: number;
210
+ allow_overages: boolean;
211
+ max_overages: number;
212
+ prevent_vm: boolean;
213
+ metadata: JSONObjectRequired;
214
+ metadata_string?: string;
215
+ company: {
216
+ id: number;
217
+ };
218
+ latest_version?: {
219
+ id: number;
220
+ version: string | undefined;
221
+ full_link: string | undefined;
222
+ filename: string | undefined;
223
+ release_date: string | null;
224
+ hash_md5: string | undefined;
225
+ environment: string;
226
+ eula_link: string | undefined;
227
+ release_notes_link: string | undefined;
228
+ size: string | undefined;
229
+ requires_version: string | undefined;
230
+ channel: string | undefined;
231
+ created_at: string | null;
232
+ updated_at: string | null;
233
+ enabled: boolean;
234
+ product_id: number;
235
+ } | null;
236
+ custom_fields?: {
237
+ id: number;
238
+ name: string;
239
+ default_value: string;
240
+ }[];
241
+ };
242
+ export type ProductsResponse = ({
243
+ id: number;
244
+ created_at: Date;
245
+ product_name: string;
246
+ short_code: string;
247
+ active: boolean;
248
+ valid_duration?: string;
249
+ trial_days: number;
250
+ max_activations?: number;
251
+ hardware_id_required: boolean;
252
+ is_upgrade: boolean;
253
+ company_id: number;
254
+ allow_trial: boolean;
255
+ enable_maintenance_period?: boolean;
256
+ floating_users: number;
257
+ is_floating: boolean;
258
+ is_node_locked: boolean;
259
+ is_user_locked: boolean;
260
+ maintenance_duration?: string;
261
+ subscription_duration?: string;
262
+ default_license_type: LicenseTypes;
263
+ max_consumptions: number;
264
+ authorization_method: AuthorizationMethod;
265
+ prevent_vm: boolean;
266
+ allow_overages: boolean;
267
+ consumption_period?: ConsumptionPeriod;
268
+ max_overages: number;
269
+ reset_consumption: boolean;
270
+ is_archived: boolean;
271
+ is_floating_cloud: boolean;
272
+ floating_timeout: number;
273
+ is_bundle: boolean;
274
+ metadata: JSONObjectRequired;
275
+ features: {
276
+ id: number;
277
+ code: string;
278
+ feature_type: 'activation' | 'consumption';
279
+ max_consumption: number;
280
+ metadata: JSONObjectRequired;
281
+ metadata_string?: string;
282
+ }[];
283
+ })[];
284
+ export type SSOUrlResponse = {
285
+ url: string;
286
+ openid_configuration: {
287
+ [key: string]: string | number | boolean;
288
+ };
289
+ };
290
+ export type TrackDeviceVariablesResponse = {
291
+ variable: string;
292
+ value: string;
293
+ device_id: number;
294
+ created_at: number;
295
+ }[];
296
+ export type TrialExistingResponse = {
297
+ license_type: LicenseTypes;
298
+ is_trial: boolean;
299
+ license: string;
300
+ } | {
301
+ license_type: LicenseTypes;
302
+ is_trial: boolean;
303
+ license_user: string;
304
+ };
305
+ export type TrialNewResponse = {
306
+ id: number;
307
+ order_id: number;
308
+ product_id: number;
309
+ created_at: number;
310
+ updated_at: number;
311
+ active: boolean;
312
+ enable_maintenance_period: boolean;
313
+ enabled: boolean;
314
+ is_floating: boolean;
315
+ is_hardware_key_auth: boolean;
316
+ is_trial: boolean;
317
+ license_type: LicenseTypes;
318
+ maintenance_duration: string | null;
319
+ max_activations: number;
320
+ max_transfers: number;
321
+ metadata_string: string | undefined;
322
+ metadata: JSONObjectRequired;
323
+ prevent_vm: boolean;
324
+ times_activated: number;
325
+ trial_days: number;
326
+ validity_period?: string;
327
+ company: {
328
+ id: number;
329
+ };
330
+ LicenseProductFeatures: ({
331
+ id: number;
332
+ product_feature_id: number;
333
+ max_consumption: number;
334
+ allow_overages: boolean;
335
+ max_overages: number;
336
+ reset_consumption: boolean;
337
+ consumption_period?: ConsumptionPeriod;
338
+ is_floating: boolean;
339
+ is_floating_cloud: boolean;
340
+ metadata: JSONObjectRequired;
341
+ metadata_string?: string;
342
+ floating_timeout?: number;
343
+ floating_users?: number;
344
+ })[];
345
+ LicenseCustomFields: ({
346
+ product_custom_field_id: number;
347
+ value: string | undefined;
348
+ })[];
349
+ is_floating_cloud: boolean;
350
+ floating_users: number;
351
+ floating_timeout: number;
352
+ allow_overages: boolean;
353
+ max_overages: number;
354
+ max_consumptions: number;
355
+ valid_duration: null;
356
+ consumption_period: ConsumptionPeriod | null;
357
+ reset_consumption?: boolean;
358
+ grace_period: number;
359
+ allow_grace_period: boolean;
360
+ } & ({
361
+ license: string;
362
+ license_key: string;
363
+ } | {
364
+ license_user: string;
365
+ initial_password: string;
366
+ license_user_id: number | null;
367
+ max_license_users: number;
368
+ });
369
+ export type TrialResponse = TrialExistingResponse | TrialNewResponse;
370
+ export type VersionsResponse = ({
371
+ version: string | undefined;
372
+ release_date: string | null;
373
+ })[];
374
+ export type LicenseResponse = {
375
+ id: number;
376
+ allow_grace_period: boolean;
377
+ allow_overages: boolean;
378
+ allow_unlimited_activations: boolean;
379
+ allow_offline_activation: boolean;
380
+ can_borrow: boolean;
381
+ custom_fields: CustomField[];
382
+ customer: CustomerResponse;
383
+ enable_maintenance_period: boolean;
384
+ floating_timeout: number;
385
+ floating_users?: number;
386
+ grace_period: number | null;
387
+ is_air_gapped: boolean;
388
+ is_floating: boolean;
389
+ is_floating_cloud: boolean;
390
+ is_hardware_key_auth: boolean;
391
+ license_active: boolean;
392
+ license_enabled: boolean;
393
+ license_key: string | undefined;
394
+ license_template_id?: number;
395
+ maintenance_period: string | null;
396
+ max_activations: number;
397
+ max_borrow_time: number;
398
+ max_license_users: number;
399
+ max_overages: number;
400
+ max_transfers?: number;
401
+ metadata: JSONObjectRequired;
402
+ metadata_string?: string;
403
+ order_store_id: string;
404
+ prevent_vm: boolean;
405
+ company: {
406
+ id: number;
407
+ };
408
+ product_details: ProductDetailsResponse;
409
+ product_features: FeatureResponse[];
410
+ start_date: string | null;
411
+ times_activated: number;
412
+ transfer_count: number;
413
+ validity_period: string | null;
414
+ is_trial: boolean;
415
+ trial_days?: number;
416
+ } & ({
417
+ license_type: 'perpetual' | 'time-limited' | 'subscription';
418
+ allow_negative_consumptions: never;
419
+ allow_unlimited_consumptions: never;
420
+ consumption_period: never;
421
+ max_consumptions: never;
422
+ reset_consumption: never;
423
+ total_consumptions: never;
424
+ } | {
425
+ license_type: 'consumption';
426
+ allow_negative_consumptions: boolean;
427
+ allow_unlimited_consumptions: boolean;
428
+ consumption_period: 'daily' | 'weekly' | 'monthly' | 'annually' | null;
429
+ max_consumptions: number;
430
+ reset_consumption: boolean;
431
+ total_consumptions: number;
432
+ });
433
+ export type FeatureResponse = {
434
+ id: number;
435
+ code: string;
436
+ name?: string;
437
+ expiry_date: string | null;
438
+ is_floating: boolean;
439
+ is_floating_cloud: boolean;
440
+ floating_timeout?: number;
441
+ floating_users?: number;
442
+ metadata: JSONObjectRequired;
443
+ metadata_string?: string;
444
+ } & ({
445
+ feature_type: 'activation';
446
+ } | {
447
+ feature_type: 'consumption';
448
+ allow_negative_consumptions: boolean;
449
+ allow_overages: boolean;
450
+ allow_unlimited_consumptions: boolean;
451
+ consumption_period: 'daily' | 'weekly' | 'monthly' | 'annually';
452
+ max_consumption: number;
453
+ max_overages: number;
454
+ reset_consumption: boolean;
455
+ total_consumptions: number;
456
+ });
457
+ export type CustomerResponse = {
458
+ email: string | undefined;
459
+ company_name: string | undefined;
460
+ reference: string | undefined;
461
+ phone: string | undefined;
462
+ first_name: string | undefined;
463
+ last_name: string | undefined;
464
+ city: string | undefined;
465
+ postcode: string | undefined;
466
+ state: string | undefined;
467
+ country: string | undefined;
468
+ address: string | undefined;
469
+ customer_account: {
470
+ id: number;
471
+ name: string;
472
+ code: string;
473
+ } | null;
474
+ metadata: JSONObjectRequired;
475
+ metadata_string?: string;
476
+ };
477
+ export type CustomField = {
478
+ name: string;
479
+ data_type: 'numer' | 'text' | 'date/time';
480
+ value: string | undefined;
481
+ };
482
+ export type ProductDetailsResponse = {
483
+ product_id: number;
484
+ product_name?: string;
485
+ short_code: string;
486
+ authorization_method: 'license-key' | 'user';
487
+ metadata: JSONObjectRequired;
488
+ metadata_string?: string;
489
+ };
490
+ export type AuthorizationMethod = 'license-key' | 'user';
491
+ export type ConsumptionPeriod = 'daily' | 'weekly' | 'monthly' | 'annually';
492
+ export declare enum LicenseTypes {
493
+ perpetual = "perpetual",
494
+ time_limited = "time-limited",
495
+ consumption = "consumption",
496
+ subscription = "subscription"
497
+ }
498
+ export type JSONObjectRequired = {
499
+ [key: string]: JSONValue;
500
+ } | {};
501
+ type JSONValue = string | number | boolean | null | JSONValue[] | {
502
+ [key: string]: JSONValue;
503
+ };
504
+ export {};
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LicenseTypes = void 0;
4
+ ;
5
+ var LicenseTypes;
6
+ (function (LicenseTypes) {
7
+ LicenseTypes["perpetual"] = "perpetual";
8
+ LicenseTypes["time_limited"] = "time-limited";
9
+ LicenseTypes["consumption"] = "consumption";
10
+ LicenseTypes["subscription"] = "subscription";
11
+ })(LicenseTypes || (exports.LicenseTypes = LicenseTypes = {}));
12
+ ;
13
+ //# sourceMappingURL=response-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response-types.js","sourceRoot":"","sources":["../../src/response-types.ts"],"names":[],"mappings":";;;AA4HE,CAAC;AAgZH,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,uCAAuB,CAAA;IACvB,6CAA6B,CAAA;IAC7B,2CAA2B,CAAA;IAC3B,6CAA6B,CAAA;AAC/B,CAAC,EALW,YAAY,4BAAZ,YAAY,QAKvB;AAAA,CAAC"}