netlicensing-client 1.2.40 → 2.0.1

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,1783 @@
1
+ import { AxiosResponse, AxiosInstance, Method, AxiosError, InternalAxiosRequestConfig } from 'axios';
2
+
3
+ declare const _default$g: {
4
+ LicenseeSecretMode: Readonly<{
5
+ DISABLED: "DISABLED";
6
+ PREDEFINED: "PREDEFINED";
7
+ CLIENT: "CLIENT";
8
+ }>;
9
+ LicenseType: Readonly<{
10
+ FEATURE: "FEATURE";
11
+ TIMEVOLUME: "TIMEVOLUME";
12
+ FLOATING: "FLOATING";
13
+ QUANTITY: "QUANTITY";
14
+ }>;
15
+ NotificationEvent: Readonly<{
16
+ LICENSEE_CREATED: "LICENSEE_CREATED";
17
+ LICENSE_CREATED: "LICENSE_CREATED";
18
+ WARNING_LEVEL_CHANGED: "WARNING_LEVEL_CHANGED";
19
+ PAYMENT_TRANSACTION_PROCESSED: "PAYMENT_TRANSACTION_PROCESSED";
20
+ }>;
21
+ NotificationProtocol: Readonly<{
22
+ WEBHOOK: "WEBHOOK";
23
+ }>;
24
+ SecurityMode: Readonly<{
25
+ BASIC_AUTHENTICATION: "BASIC_AUTH";
26
+ APIKEY_IDENTIFICATION: "APIKEY";
27
+ ANONYMOUS_IDENTIFICATION: "ANONYMOUS";
28
+ }>;
29
+ TimeVolumePeriod: Readonly<{
30
+ DAY: "DAY";
31
+ WEEK: "WEEK";
32
+ MONTH: "MONTH";
33
+ YEAR: "YEAR";
34
+ }>;
35
+ TokenType: Readonly<{
36
+ DEFAULT: "DEFAULT";
37
+ SHOP: "SHOP";
38
+ APIKEY: "APIKEY";
39
+ ACTION: "ACTION";
40
+ }>;
41
+ TransactionSource: Readonly<{
42
+ SHOP: "SHOP";
43
+ AUTO_LICENSE_CREATE: "AUTO_LICENSE_CREATE";
44
+ AUTO_LICENSE_UPDATE: "AUTO_LICENSE_UPDATE";
45
+ AUTO_LICENSE_DELETE: "AUTO_LICENSE_DELETE";
46
+ AUTO_LICENSEE_CREATE: "AUTO_LICENSEE_CREATE";
47
+ AUTO_LICENSEE_DELETE: "AUTO_LICENSEE_DELETE";
48
+ AUTO_LICENSEE_VALIDATE: "AUTO_LICENSEE_VALIDATE";
49
+ AUTO_LICENSETEMPLATE_DELETE: "AUTO_LICENSETEMPLATE_DELETE";
50
+ AUTO_PRODUCTMODULE_DELETE: "AUTO_PRODUCTMODULE_DELETE";
51
+ AUTO_PRODUCT_DELETE: "AUTO_PRODUCT_DELETE";
52
+ AUTO_LICENSES_TRANSFER: "AUTO_LICENSES_TRANSFER";
53
+ SUBSCRIPTION_UPDATE: "SUBSCRIPTION_UPDATE";
54
+ RECURRING_PAYMENT: "RECURRING_PAYMENT";
55
+ CANCEL_RECURRING_PAYMENT: "CANCEL_RECURRING_PAYMENT";
56
+ OBTAIN_BUNDLE: "OBTAIN_BUNDLE";
57
+ }>;
58
+ TransactionStatus: Readonly<{
59
+ PENDING: "PENDING";
60
+ CLOSED: "CLOSED";
61
+ CANCELLED: "CANCELLED";
62
+ }>;
63
+ BASIC_AUTHENTICATION: string;
64
+ APIKEY_IDENTIFICATION: string;
65
+ ANONYMOUS_IDENTIFICATION: string;
66
+ FILTER: string;
67
+ Product: {
68
+ TYPE: string;
69
+ ENDPOINT_PATH: string;
70
+ };
71
+ ProductModule: {
72
+ TYPE: string;
73
+ ENDPOINT_PATH: string;
74
+ PRODUCT_MODULE_NUMBER: string;
75
+ };
76
+ Licensee: {
77
+ TYPE: string;
78
+ ENDPOINT_PATH: string;
79
+ ENDPOINT_PATH_VALIDATE: string;
80
+ ENDPOINT_PATH_TRANSFER: string;
81
+ LICENSEE_NUMBER: string;
82
+ };
83
+ LicenseTemplate: {
84
+ TYPE: string;
85
+ ENDPOINT_PATH: string;
86
+ LicenseType: Readonly<{
87
+ FEATURE: "FEATURE";
88
+ TIMEVOLUME: "TIMEVOLUME";
89
+ FLOATING: "FLOATING";
90
+ QUANTITY: "QUANTITY";
91
+ }>;
92
+ };
93
+ License: {
94
+ TYPE: string;
95
+ ENDPOINT_PATH: string;
96
+ };
97
+ Validation: {
98
+ TYPE: string;
99
+ };
100
+ Token: {
101
+ TYPE: string;
102
+ ENDPOINT_PATH: string;
103
+ Type: Readonly<{
104
+ DEFAULT: "DEFAULT";
105
+ SHOP: "SHOP";
106
+ APIKEY: "APIKEY";
107
+ ACTION: "ACTION";
108
+ }>;
109
+ };
110
+ PaymentMethod: {
111
+ TYPE: string;
112
+ ENDPOINT_PATH: string;
113
+ };
114
+ Bundle: {
115
+ TYPE: string;
116
+ ENDPOINT_PATH: string;
117
+ ENDPOINT_OBTAIN_PATH: string;
118
+ };
119
+ Notification: {
120
+ TYPE: string;
121
+ ENDPOINT_PATH: string;
122
+ Protocol: Readonly<{
123
+ WEBHOOK: "WEBHOOK";
124
+ }>;
125
+ Event: Readonly<{
126
+ LICENSEE_CREATED: "LICENSEE_CREATED";
127
+ LICENSE_CREATED: "LICENSE_CREATED";
128
+ WARNING_LEVEL_CHANGED: "WARNING_LEVEL_CHANGED";
129
+ PAYMENT_TRANSACTION_PROCESSED: "PAYMENT_TRANSACTION_PROCESSED";
130
+ }>;
131
+ };
132
+ Transaction: {
133
+ TYPE: string;
134
+ ENDPOINT_PATH: string;
135
+ Status: Readonly<{
136
+ PENDING: "PENDING";
137
+ CLOSED: "CLOSED";
138
+ CANCELLED: "CANCELLED";
139
+ }>;
140
+ };
141
+ Utility: {
142
+ ENDPOINT_PATH: string;
143
+ ENDPOINT_PATH_LICENSE_TYPES: string;
144
+ ENDPOINT_PATH_LICENSING_MODELS: string;
145
+ ENDPOINT_PATH_COUNTRIES: string;
146
+ LICENSING_MODEL_TYPE: string;
147
+ LICENSE_TYPE: string;
148
+ COUNTRY_TYPE: string;
149
+ };
150
+ };
151
+
152
+ /**
153
+ * @author Labs64 <netlicensing@labs64.com>
154
+ * @license Apache-2.0
155
+ * @link https://netlicensing.io
156
+ * @copyright 2017 Labs64 NetLicensing
157
+ */
158
+ declare const ApiKeyRole: Readonly<{
159
+ ROLE_APIKEY_LICENSEE: "ROLE_APIKEY_LICENSEE";
160
+ ROLE_APIKEY_ANALYTICS: "ROLE_APIKEY_ANALYTICS";
161
+ ROLE_APIKEY_OPERATION: "ROLE_APIKEY_OPERATION";
162
+ ROLE_APIKEY_MAINTENANCE: "ROLE_APIKEY_MAINTENANCE";
163
+ ROLE_APIKEY_ADMIN: "ROLE_APIKEY_ADMIN";
164
+ }>;
165
+
166
+ /**
167
+ * @author Labs64 <netlicensing@labs64.com>
168
+ * @license Apache-2.0
169
+ * @link https://netlicensing.io
170
+ * @copyright 2017 Labs64 NetLicensing
171
+ */
172
+ declare const LicenseeSecretMode: Readonly<{
173
+ DISABLED: "DISABLED";
174
+ PREDEFINED: "PREDEFINED";
175
+ CLIENT: "CLIENT";
176
+ }>;
177
+
178
+ /**
179
+ * @author Labs64 <netlicensing@labs64.com>
180
+ * @license Apache-2.0
181
+ * @link https://netlicensing.io
182
+ * @copyright 2017 Labs64 NetLicensing
183
+ */
184
+ declare const LicenseType: Readonly<{
185
+ FEATURE: "FEATURE";
186
+ TIMEVOLUME: "TIMEVOLUME";
187
+ FLOATING: "FLOATING";
188
+ QUANTITY: "QUANTITY";
189
+ }>;
190
+
191
+ /**
192
+ * @author Labs64 <netlicensing@labs64.com>
193
+ * @license Apache-2.0
194
+ * @link https://netlicensing.io
195
+ * @copyright 2017 Labs64 NetLicensing
196
+ */
197
+ declare const LicensingModel: Readonly<{
198
+ TRY_AND_BUY: "TryAndBuy";
199
+ SUBSCRIPTION: "Subscription";
200
+ RENTAL: "Rental";
201
+ FLOATING: "Floating";
202
+ MULTI_FEATURE: "MultiFeature";
203
+ PAY_PER_USE: "PayPerUse";
204
+ PRICING_TABLE: "PricingTable";
205
+ QUOTA: "Quota";
206
+ NODE_LOCKED: "NodeLocked";
207
+ DISCOUNT: "Discount";
208
+ }>;
209
+
210
+ /**
211
+ * @author Labs64 <netlicensing@labs64.com>
212
+ * @license Apache-2.0
213
+ * @link https://netlicensing.io
214
+ * @copyright 2017 Labs64 NetLicensing
215
+ */
216
+ declare const NodeSecretMode: Readonly<{
217
+ PREDEFINED: "PREDEFINED";
218
+ CLIENT: "CLIENT";
219
+ }>;
220
+
221
+ /**
222
+ * @author Labs64 <netlicensing@labs64.com>
223
+ * @license Apache-2.0
224
+ * @link https://netlicensing.io
225
+ * @copyright 2017 Labs64 NetLicensing
226
+ */
227
+ declare const NotificationEvent: Readonly<{
228
+ LICENSEE_CREATED: "LICENSEE_CREATED";
229
+ LICENSE_CREATED: "LICENSE_CREATED";
230
+ WARNING_LEVEL_CHANGED: "WARNING_LEVEL_CHANGED";
231
+ PAYMENT_TRANSACTION_PROCESSED: "PAYMENT_TRANSACTION_PROCESSED";
232
+ }>;
233
+
234
+ /**
235
+ * @author Labs64 <netlicensing@labs64.com>
236
+ * @license Apache-2.0
237
+ * @link https://netlicensing.io
238
+ * @copyright 2017 Labs64 NetLicensing
239
+ */
240
+ declare const NotificationProtocol: Readonly<{
241
+ WEBHOOK: "WEBHOOK";
242
+ }>;
243
+
244
+ /**
245
+ * @author Labs64 <netlicensing@labs64.com>
246
+ * @license Apache-2.0
247
+ * @link https://netlicensing.io
248
+ * @copyright 2017 Labs64 NetLicensing
249
+ */
250
+ declare const PaymentMethodEnum: Readonly<{
251
+ NULL: "NULL";
252
+ PAYPAL: "PAYPAL";
253
+ PAYPAL_SANDBOX: "PAYPAL_SANDBOX";
254
+ STRIPE: "STRIPE";
255
+ STRIPE_TESTING: "STRIPE_TESTING";
256
+ }>;
257
+
258
+ /**
259
+ * @author Labs64 <netlicensing@labs64.com>
260
+ * @license Apache-2.0
261
+ * @link https://netlicensing.io
262
+ * @copyright 2017 Labs64 NetLicensing
263
+ */
264
+ declare const SecurityMode: Readonly<{
265
+ BASIC_AUTHENTICATION: "BASIC_AUTH";
266
+ APIKEY_IDENTIFICATION: "APIKEY";
267
+ ANONYMOUS_IDENTIFICATION: "ANONYMOUS";
268
+ }>;
269
+
270
+ /**
271
+ * @author Labs64 <netlicensing@labs64.com>
272
+ * @license Apache-2.0
273
+ * @link https://netlicensing.io
274
+ * @copyright 2017 Labs64 NetLicensing
275
+ */
276
+ declare const TimeVolumePeriod: Readonly<{
277
+ DAY: "DAY";
278
+ WEEK: "WEEK";
279
+ MONTH: "MONTH";
280
+ YEAR: "YEAR";
281
+ }>;
282
+
283
+ /**
284
+ * @author Labs64 <netlicensing@labs64.com>
285
+ * @license Apache-2.0
286
+ * @link https://netlicensing.io
287
+ * @copyright 2017 Labs64 NetLicensing
288
+ */
289
+ declare const TokenType: Readonly<{
290
+ DEFAULT: "DEFAULT";
291
+ SHOP: "SHOP";
292
+ APIKEY: "APIKEY";
293
+ ACTION: "ACTION";
294
+ }>;
295
+
296
+ /**
297
+ * @author Labs64 <netlicensing@labs64.com>
298
+ * @license Apache-2.0
299
+ * @link https://netlicensing.io
300
+ * @copyright 2017 Labs64 NetLicensing
301
+ */
302
+ declare const TransactionSource: Readonly<{
303
+ SHOP: "SHOP";
304
+ AUTO_LICENSE_CREATE: "AUTO_LICENSE_CREATE";
305
+ AUTO_LICENSE_UPDATE: "AUTO_LICENSE_UPDATE";
306
+ AUTO_LICENSE_DELETE: "AUTO_LICENSE_DELETE";
307
+ AUTO_LICENSEE_CREATE: "AUTO_LICENSEE_CREATE";
308
+ AUTO_LICENSEE_DELETE: "AUTO_LICENSEE_DELETE";
309
+ AUTO_LICENSEE_VALIDATE: "AUTO_LICENSEE_VALIDATE";
310
+ AUTO_LICENSETEMPLATE_DELETE: "AUTO_LICENSETEMPLATE_DELETE";
311
+ AUTO_PRODUCTMODULE_DELETE: "AUTO_PRODUCTMODULE_DELETE";
312
+ AUTO_PRODUCT_DELETE: "AUTO_PRODUCT_DELETE";
313
+ AUTO_LICENSES_TRANSFER: "AUTO_LICENSES_TRANSFER";
314
+ SUBSCRIPTION_UPDATE: "SUBSCRIPTION_UPDATE";
315
+ RECURRING_PAYMENT: "RECURRING_PAYMENT";
316
+ CANCEL_RECURRING_PAYMENT: "CANCEL_RECURRING_PAYMENT";
317
+ OBTAIN_BUNDLE: "OBTAIN_BUNDLE";
318
+ }>;
319
+
320
+ /**
321
+ * @author Labs64 <netlicensing@labs64.com>
322
+ * @license Apache-2.0
323
+ * @link https://netlicensing.io
324
+ * @copyright 2017 Labs64 NetLicensing
325
+ */
326
+ declare const TransactionStatus: Readonly<{
327
+ PENDING: "PENDING";
328
+ CLOSED: "CLOSED";
329
+ CANCELLED: "CANCELLED";
330
+ }>;
331
+
332
+ interface Info {
333
+ id: string;
334
+ type: 'ERROR' | 'WARNING' | 'INFO';
335
+ value: string;
336
+ }
337
+ interface List {
338
+ property: {
339
+ value: string;
340
+ name: string;
341
+ }[];
342
+ list: List[];
343
+ name: string;
344
+ }
345
+ interface Item {
346
+ property: {
347
+ value: string;
348
+ name: string;
349
+ }[];
350
+ list: List[];
351
+ type: string;
352
+ }
353
+ interface ItemPagination {
354
+ pagenumber: string | null;
355
+ itemsnumber: string | null;
356
+ totalpages: string | null;
357
+ totalitems: string | null;
358
+ hasnext: string | null;
359
+ }
360
+ type Items = {
361
+ item: Item[];
362
+ } & ItemPagination;
363
+ interface NlicResponse {
364
+ signature: null | string;
365
+ infos: {
366
+ info: Info[];
367
+ };
368
+ items: Items | null;
369
+ ttl: string | null;
370
+ }
371
+
372
+ /**
373
+ * @author Labs64 <netlicensing@labs64.com>
374
+ * @license Apache-2.0
375
+ * @link https://netlicensing.io
376
+ * @copyright 2017 Labs64 NetLicensing
377
+ */
378
+
379
+ type ApiKeyRoleKeys = keyof typeof ApiKeyRole;
380
+ type ApiKeyRoleValues = (typeof ApiKeyRole)[ApiKeyRoleKeys];
381
+
382
+ type LicenseeSecretModeKeys = keyof typeof LicenseeSecretMode;
383
+ type LicenseeSecretModeValues = (typeof LicenseeSecretMode)[LicenseeSecretModeKeys];
384
+
385
+ type NodeSecretModeKeys = keyof typeof NodeSecretMode;
386
+ type NodeSecretModeValues = (typeof NodeSecretMode)[NodeSecretModeKeys];
387
+
388
+ /**
389
+ * @author Labs64 <netlicensing@labs64.com>
390
+ * @license Apache-2.0
391
+ * @link https://netlicensing.io
392
+ * @copyright 2017 Labs64 NetLicensing
393
+ */
394
+
395
+ type LicenseTypeKeys = keyof typeof LicenseType;
396
+ type LicenseTypeValues = (typeof LicenseType)[LicenseTypeKeys];
397
+
398
+ /**
399
+ * @author Labs64 <netlicensing@labs64.com>
400
+ * @license Apache-2.0
401
+ * @link https://netlicensing.io
402
+ * @copyright 2017 Labs64 NetLicensing
403
+ */
404
+
405
+ type LicensingModelKeys = keyof typeof LicensingModel;
406
+ type LicensingModelValues = (typeof LicensingModel)[LicensingModelKeys];
407
+
408
+ /**
409
+ * @author Labs64 <netlicensing@labs64.com>
410
+ * @license Apache-2.0
411
+ * @link https://netlicensing.io
412
+ * @copyright 2017 Labs64 NetLicensing
413
+ */
414
+
415
+ type NotificationEventKeys = keyof typeof NotificationEvent;
416
+ type NotificationEventValues = (typeof NotificationEvent)[NotificationEventKeys];
417
+
418
+ /**
419
+ * @author Labs64 <netlicensing@labs64.com>
420
+ * @license Apache-2.0
421
+ * @link https://netlicensing.io
422
+ * @copyright 2017 Labs64 NetLicensing
423
+ */
424
+
425
+ type NotificationProtocolKeys = keyof typeof NotificationProtocol;
426
+ type NotificationProtocolValues = (typeof NotificationProtocol)[NotificationProtocolKeys];
427
+
428
+ type PaymentMethodKeys = keyof typeof PaymentMethodEnum;
429
+ type PaymentMethodValues = (typeof PaymentMethodEnum)[PaymentMethodKeys];
430
+
431
+ type SecurityModeKeys = keyof typeof SecurityMode;
432
+ type SecurityModeValues = (typeof SecurityMode)[SecurityModeKeys];
433
+
434
+ type TimeVolumePeriodKeys = keyof typeof TimeVolumePeriod;
435
+ type TimeVolumePeriodValues = (typeof TimeVolumePeriod)[TimeVolumePeriodKeys];
436
+
437
+ /**
438
+ * @author Labs64 <netlicensing@labs64.com>
439
+ * @license Apache-2.0
440
+ * @link https://netlicensing.io
441
+ * @copyright 2017 Labs64 NetLicensing
442
+ */
443
+
444
+ type TokenTypeKeys = keyof typeof TokenType;
445
+ type TokenTypeValues = (typeof TokenType)[TokenTypeKeys];
446
+
447
+ type TransactionSourceKeys = keyof typeof TransactionSource;
448
+ type TransactionSourceValues = (typeof TransactionSource)[TransactionSourceKeys];
449
+
450
+ type TransactionStatusKeys = keyof typeof TransactionStatus;
451
+ type TransactionStatusValues = (typeof TransactionStatus)[TransactionStatusKeys];
452
+
453
+ type RequiredProps<Base, Keys extends keyof Base> = Required<Pick<Base, Keys>>;
454
+ type DateField = Date | 'now';
455
+
456
+ /**
457
+ * @author Labs64 <netlicensing@labs64.com>
458
+ * @license Apache-2.0
459
+ * @link https://netlicensing.io
460
+ * @copyright 2017 Labs64 NetLicensing
461
+ */
462
+ interface EntityMethods<T extends object> {
463
+ set<K extends keyof T>(key: K, value: T[K]): void;
464
+ get<K extends keyof T, D = undefined>(key: K, def?: D): T[K] | D;
465
+ has<K extends keyof T>(key: K): boolean;
466
+ setProperty<K extends keyof T>(key: K, value: T[K]): void;
467
+ addProperty<K extends keyof T>(key: K, value: T[K]): void;
468
+ getProperty<K extends keyof T, D = undefined>(key: K, def?: D): T[K] | D;
469
+ hasProperty<K extends keyof T>(key: K): boolean;
470
+ setProperties(properties: Partial<T>): void;
471
+ serialize(): Record<string, string>;
472
+ }
473
+ interface Proto {
474
+ prototype: object;
475
+ }
476
+ type PropGetEventListener<T> = (obj: T, prop: string | symbol, receiver: unknown) => void;
477
+ type PropSetEventListener<T> = (obj: T, prop: string | symbol, value: unknown, receiver: unknown) => void;
478
+ type Entity<T extends object, M extends object> = T & M & EntityMethods<T>;
479
+
480
+ /**
481
+ * @author Labs64 <netlicensing@labs64.com>
482
+ * @license Apache-2.0
483
+ * @link https://netlicensing.io
484
+ * @copyright 2017 Labs64 NetLicensing
485
+ */
486
+ interface CountryProps {
487
+ readonly code: string;
488
+ readonly name: string;
489
+ readonly vatPercent?: number;
490
+ readonly isEu: boolean;
491
+ }
492
+ interface CountryMethods {
493
+ getCode(): string;
494
+ getName(): string;
495
+ getVatPercent(): number;
496
+ getIsEu(): boolean;
497
+ }
498
+ type CountryEntity = Entity<CountryProps, CountryMethods>;
499
+
500
+ /**
501
+ * @author Labs64 <netlicensing@labs64.com>
502
+ * @license Apache-2.0
503
+ * @link https://netlicensing.io
504
+ * @copyright 2017 Labs64 NetLicensing
505
+ */
506
+
507
+ type LicenseProps<T extends object = object> = {
508
+ active?: boolean;
509
+ number?: string;
510
+ name?: string;
511
+ price?: number;
512
+ currency?: string;
513
+ hidden?: boolean;
514
+ licenseeNumber?: string;
515
+ licenseTemplateNumber?: string;
516
+ productModuleNumber?: string;
517
+ readonly inUse?: boolean;
518
+ } & T;
519
+ type SavedLicenseProps<T extends object = object> = RequiredProps<LicenseProps, 'active' | 'number'> & LicenseProps<T>;
520
+ interface LicenseMethods {
521
+ setActive(active: boolean): void;
522
+ getActive<D = undefined>(def?: D): boolean | D;
523
+ setNumber(number: string): void;
524
+ getNumber<D = undefined>(def?: D): string | D;
525
+ setName(name: string): void;
526
+ getName<D = undefined>(def?: D): string | D;
527
+ setPrice(price: number): void;
528
+ getPrice<D = undefined>(def?: D): number | D;
529
+ setCurrency(currency: string): void;
530
+ getCurrency<D = undefined>(def?: D): string | D;
531
+ setHidden(hidden: boolean): void;
532
+ getHidden<D = undefined>(def?: D): boolean | D;
533
+ setLicenseeNumber(number: string): void;
534
+ getLicenseeNumber<D = undefined>(def?: D): string | D;
535
+ setLicenseTemplateNumber(number: string): void;
536
+ getLicenseTemplateNumber<D = undefined>(def?: D): string | D;
537
+ setProductModuleNumber(number: string): void;
538
+ getProductModuleNumber<D = undefined>(def?: D): string | D;
539
+ serialize(): Record<string, string>;
540
+ }
541
+ type LicenseEntity<T extends object = object> = Entity<LicenseProps<T>, LicenseMethods>;
542
+
543
+ /**
544
+ * @author Labs64 <netlicensing@labs64.com>
545
+ * @license Apache-2.0
546
+ * @link https://netlicensing.io
547
+ * @copyright 2017 Labs64 NetLicensing
548
+ */
549
+
550
+ interface WarningLevelSummary {
551
+ RED: string[];
552
+ YELLOW: string[];
553
+ GREEN: string[];
554
+ }
555
+ type LicenseeProps<T extends object = object> = {
556
+ active?: boolean;
557
+ number?: string;
558
+ name?: string;
559
+ markedForTransfer?: boolean;
560
+ productNumber?: string;
561
+ aliases?: string[];
562
+ readonly inUse?: boolean;
563
+ readonly warningLevelSummary?: WarningLevelSummary;
564
+ } & T;
565
+ type SavedLicenseeProps<T extends object = object> = RequiredProps<LicenseeProps, 'active' | 'number' | 'productNumber' | 'inUse' | 'warningLevelSummary'> & LicenseeProps<T>;
566
+ interface LicenseeMethods {
567
+ setActive(active: boolean): void;
568
+ getActive<D = undefined>(def?: D): boolean | D;
569
+ setNumber(number: string): void;
570
+ getNumber<D = undefined>(def?: D): string | D;
571
+ setName(name: string): void;
572
+ getName<D = undefined>(def?: D): string | D;
573
+ setProductNumber(number: string): void;
574
+ getProductNumber<D = undefined>(def?: D): string | D;
575
+ setMarkedForTransfer(mark: boolean): void;
576
+ getMarkedForTransfer<D = undefined>(def?: D): boolean | D;
577
+ serialize(): Record<string, string>;
578
+ }
579
+ type LicenseeEntity<T extends object = object> = Entity<LicenseeProps<T>, LicenseeMethods>;
580
+
581
+ /**
582
+ * @author Labs64 <netlicensing@labs64.com>
583
+ * @license Apache-2.0
584
+ * @link https://netlicensing.io
585
+ * @copyright 2017 Labs64 NetLicensing
586
+ */
587
+
588
+ type LicenseTemplateProps<T extends object = object> = {
589
+ active?: boolean;
590
+ number?: string;
591
+ name?: string;
592
+ licenseType?: LicenseTypeValues;
593
+ price?: number;
594
+ currency?: string;
595
+ automatic?: boolean;
596
+ hidden?: boolean;
597
+ hideLicenses?: boolean;
598
+ productModuleNumber?: string;
599
+ readonly inUse?: boolean;
600
+ } & T;
601
+ type SavedLicenseTemplateProps<T extends object = object> = RequiredProps<LicenseTemplateProps, 'active' | 'number' | 'licenseType'> & LicenseTemplateProps<T>;
602
+ interface LicenseTemplateMethods {
603
+ setActive(active: boolean): void;
604
+ getActive<D = undefined>(def?: D): boolean | D;
605
+ setNumber(number: string): void;
606
+ getNumber<D = undefined>(def?: D): string | D;
607
+ setName(name: string): void;
608
+ getName<D = undefined>(def?: D): string | D;
609
+ setLicenseType(type: LicenseTypeValues): void;
610
+ getLicenseType<D = undefined>(def?: D): LicenseTypeValues | D;
611
+ setPrice(price: number): void;
612
+ getPrice<D = undefined>(def?: D): number | D;
613
+ setCurrency(currency: string): void;
614
+ getCurrency<D = undefined>(def?: D): string | D;
615
+ setAutomatic(automatic: boolean): void;
616
+ getAutomatic<D = undefined>(def?: D): boolean | D;
617
+ setHidden(hidden: boolean): void;
618
+ getHidden<D = undefined>(def?: D): boolean | D;
619
+ setHideLicenses(hideLicenses: boolean): void;
620
+ getHideLicenses<D = undefined>(def?: D): boolean | D;
621
+ setProductModuleNumber(productModuleNumber: string): void;
622
+ getProductModuleNumber<D = undefined>(def?: D): string | D;
623
+ serialize(): Record<string, string>;
624
+ }
625
+ type LicenseTemplateEntity<T extends object = object> = Entity<LicenseTemplateProps<T>, LicenseTemplateMethods>;
626
+
627
+ /**
628
+ * @author Labs64 <netlicensing@labs64.com>
629
+ * @license Apache-2.0
630
+ * @link https://netlicensing.io
631
+ * @copyright 2017 Labs64 NetLicensing
632
+ */
633
+
634
+ type TransactionProps<T extends object = object> = {
635
+ active?: boolean;
636
+ number?: string;
637
+ status?: TransactionStatusValues;
638
+ source?: TransactionSourceValues;
639
+ grandTotal?: number;
640
+ discount?: number;
641
+ currency?: string;
642
+ dateCreated?: Date;
643
+ dateClosed?: Date;
644
+ paymentMethod?: PaymentMethodValues;
645
+ licenseTransactionJoins?: LicenseTransactionJoinEntity[];
646
+ readonly inUse?: boolean;
647
+ } & T;
648
+ type SavedTransactionProps<T extends object = object> = RequiredProps<TransactionProps, 'active' | 'number' | 'status' | 'dateCreated'> & TransactionProps<T>;
649
+ interface TransactionMethods {
650
+ setActive(active: boolean): void;
651
+ getActive<D = undefined>(def?: D): boolean | D;
652
+ setNumber(number: string): void;
653
+ getNumber<D = undefined>(def?: D): string | D;
654
+ setStatus(status: TransactionStatusValues): void;
655
+ getStatus<D = undefined>(def?: D): TransactionStatusValues | D;
656
+ setSource(source: TransactionSourceValues): void;
657
+ getSource<D = undefined>(def?: D): TransactionSourceValues | D;
658
+ setGrandTotal(grandTotal: number): void;
659
+ getGrandTotal<D = undefined>(def?: D): number | D;
660
+ setDiscount(discount: number): void;
661
+ getDiscount<D = undefined>(def?: D): number | D;
662
+ setCurrency(currency: string): void;
663
+ getCurrency<D = undefined>(def?: D): string | D;
664
+ setDateCreated(dateCreated: Date): void;
665
+ getDateCreated<D = undefined>(def?: D): Date | D;
666
+ setDateClosed(dateCreated: Date): void;
667
+ getDateClosed<D = undefined>(def?: D): Date | D;
668
+ setPaymentMethod(paymentMethod: PaymentMethodValues): void;
669
+ getPaymentMethod<D = undefined>(def?: D): PaymentMethodValues | D;
670
+ setLicenseTransactionJoins(joins: LicenseTransactionJoinEntity[]): void;
671
+ getLicenseTransactionJoins<D = undefined>(def?: D): LicenseTransactionJoinEntity[] | D;
672
+ serialize(): Record<string, string>;
673
+ }
674
+ type TransactionEntity<T extends object = object> = Entity<TransactionProps<T>, TransactionMethods>;
675
+
676
+ /**
677
+ * @author Labs64 <netlicensing@labs64.com>
678
+ * @license Apache-2.0
679
+ * @link https://netlicensing.io
680
+ * @copyright 2017 Labs64 NetLicensing
681
+ */
682
+
683
+ interface LicenseTransactionJoinProps {
684
+ transaction: TransactionEntity;
685
+ license: LicenseEntity;
686
+ }
687
+ interface LicenseTransactionJoinMethods {
688
+ setTransaction(t: TransactionEntity): void;
689
+ getTransaction(): TransactionEntity;
690
+ setLicense(l: LicenseEntity): void;
691
+ getLicense(): LicenseEntity;
692
+ }
693
+ type LicenseTransactionJoinEntity = LicenseTransactionJoinProps & LicenseTransactionJoinMethods;
694
+
695
+ /**
696
+ * @author Labs64 <netlicensing@labs64.com>
697
+ * @license Apache-2.0
698
+ * @link https://netlicensing.io
699
+ * @copyright 2017 Labs64 NetLicensing
700
+ */
701
+
702
+ type NotificationProps<T extends object = object> = {
703
+ active?: boolean;
704
+ number?: string;
705
+ name?: string;
706
+ protocol?: NotificationProtocolValues;
707
+ events?: NotificationEventValues[];
708
+ payload?: string;
709
+ endpoint?: string;
710
+ } & T;
711
+ type SavedNotificationProps<T extends object = object> = RequiredProps<NotificationProps, 'active' | 'number' | 'name' | 'protocol' | 'events' | 'endpoint'> & NotificationProps<T>;
712
+ interface NotificationMethods {
713
+ setActive(active: boolean): void;
714
+ getActive<D = undefined>(def?: D): boolean | D;
715
+ setNumber(number: string): void;
716
+ getNumber<D = undefined>(def?: D): string | D;
717
+ setName(name: string): void;
718
+ getName<D = undefined>(def?: D): string | D;
719
+ setProtocol(protocol: NotificationProtocolValues): void;
720
+ getProtocol<D = undefined>(def?: D): NotificationProtocolValues | D;
721
+ setEvents(events: NotificationEventValues[]): void;
722
+ getEvents<D = undefined>(def?: D): NotificationEventValues[] | D;
723
+ addEvent(event: NotificationEventValues): void;
724
+ setPayload(payload: string): void;
725
+ getPayload<D = undefined>(def?: D): string | D;
726
+ setEndpoint(endpoint: string): void;
727
+ getEndpoint<D = undefined>(def?: D): string | D;
728
+ serialize(): Record<string, string>;
729
+ }
730
+ type NotificationEntity<T extends object = object> = Entity<NotificationProps<T>, NotificationMethods>;
731
+
732
+ /**
733
+ * @author Labs64 <netlicensing@labs64.com>
734
+ * @license Apache-2.0
735
+ * @link https://netlicensing.io
736
+ * @copyright 2017 Labs64 NetLicensing
737
+ */
738
+
739
+ type PaymentMethodProps<T = object> = T & {
740
+ active?: boolean;
741
+ number?: string;
742
+ };
743
+ type SavedPaymentMethodProps<T extends object = object> = RequiredProps<PaymentMethodProps, 'active' | 'number'> & PaymentMethodProps<T>;
744
+ interface PaymentMethodMethods {
745
+ setActive(active: boolean): void;
746
+ getActive<D = undefined>(def?: D): boolean | D;
747
+ setNumber(number: string): void;
748
+ getNumber<D = undefined>(def?: D): string | D;
749
+ }
750
+ type PaymentMethodEntity<T = object> = Entity<PaymentMethodProps<T>, PaymentMethodMethods>;
751
+
752
+ /**
753
+ * @author Labs64 <netlicensing@labs64.com>
754
+ * @license Apache-2.0
755
+ * @link https://netlicensing.io
756
+ * @copyright 2017 Labs64 NetLicensing
757
+ */
758
+
759
+ interface ProductDiscountProps {
760
+ totalPrice?: number;
761
+ currency?: string;
762
+ amountFix?: number;
763
+ amountPercent?: number;
764
+ }
765
+ interface ProductDiscountMethods {
766
+ setTotalPrice(totalPrice: number): void;
767
+ getTotalPrice<D = undefined>(def?: D): number | D;
768
+ setCurrency(currency: string): void;
769
+ getCurrency<D = undefined>(def?: D): string | D;
770
+ setAmountFix(amountFix: number): void;
771
+ getAmountFix<D = undefined>(def?: D): number | D;
772
+ setAmountPercent(amountPercent: number): void;
773
+ getAmountPercent<D = undefined>(def?: D): number | D;
774
+ toString(): string;
775
+ }
776
+ type ProductDiscountEntity = Entity<ProductDiscountProps, ProductDiscountMethods>;
777
+
778
+ /**
779
+ * @author Labs64 <netlicensing@labs64.com>
780
+ * @license Apache-2.0
781
+ * @link https://netlicensing.io
782
+ * @copyright 2017 Labs64 NetLicensing
783
+ */
784
+
785
+ type ProductProps<T extends object = object> = {
786
+ active?: boolean;
787
+ number?: string;
788
+ name?: string;
789
+ version?: string | number;
790
+ description?: string;
791
+ licensingInfo?: string;
792
+ licenseeAutoCreate?: boolean;
793
+ discounts?: ProductDiscountEntity[];
794
+ readonly inUse?: boolean;
795
+ } & T;
796
+ type SavedProductProps<T extends object = object> = RequiredProps<ProductProps, 'active' | 'number' | 'inUse'> & ProductProps<T>;
797
+ interface ProductMethods {
798
+ setActive(active: boolean): void;
799
+ getActive<D = undefined>(def?: D): boolean | D;
800
+ setNumber(number: string): void;
801
+ getNumber<D = undefined>(def?: D): string | D;
802
+ setName(name: string): void;
803
+ getName<D = undefined>(def?: D): string | D;
804
+ setVersion(version: string): void;
805
+ getVersion<D = undefined>(def?: D): string | number | D;
806
+ setDescription(description: string): void;
807
+ getDescription<D = undefined>(def?: D): string | D;
808
+ setLicensingInfo(licensingInfo: string): void;
809
+ getLicensingInfo<D = undefined>(def?: D): string | D;
810
+ setLicenseeAutoCreate(licenseeAutoCreate: boolean): void;
811
+ getLicenseeAutoCreate<D = undefined>(def?: D): boolean | D;
812
+ setDiscounts(discounts: ProductDiscountEntity[]): void;
813
+ getDiscounts<D = undefined>(def?: D): ProductDiscountEntity[] | D;
814
+ addDiscount(discount: ProductDiscountEntity): void;
815
+ removeDiscount(discount: ProductDiscountEntity): void;
816
+ setProductDiscounts(productDiscounts: ProductDiscountEntity[]): void;
817
+ getProductDiscounts<D = undefined>(def?: D): ProductDiscountEntity[] | D;
818
+ serialize(): Record<string, string | string[]>;
819
+ }
820
+ type ProductEntity<T extends object = object> = Entity<ProductProps<T>, ProductMethods>;
821
+
822
+ /**
823
+ * @author Labs64 <netlicensing@labs64.com>
824
+ * @license Apache-2.0
825
+ * @link https://netlicensing.io
826
+ * @copyright 2017 Labs64 NetLicensing
827
+ */
828
+
829
+ type ProductModuleProps<T extends object = object> = {
830
+ active?: boolean;
831
+ number?: string;
832
+ name?: string;
833
+ licensingModel?: LicensingModelValues;
834
+ productNumber?: string;
835
+ readonly inUse?: boolean;
836
+ } & T;
837
+ type SavedProductModuleProps<T extends object = object> = RequiredProps<ProductModuleProps, 'active' | 'number' | 'licensingModel' | 'productNumber' | 'inUse'> & ProductModuleProps<T>;
838
+ interface ProductModuleMethods {
839
+ setActive(active: boolean): void;
840
+ getActive<D = undefined>(def?: D): boolean | D;
841
+ setNumber(number: string): void;
842
+ getNumber<D = undefined>(def?: D): string | D;
843
+ setName(name: string): void;
844
+ getName<D = undefined>(def?: D): string | D;
845
+ setLicensingModel(licensingModel: LicensingModelValues): void;
846
+ getLicensingModel<D = undefined>(def?: D): LicensingModelValues | D;
847
+ setProductNumber(productNumber: string): void;
848
+ getProductNumber<D = undefined>(def?: D): string | D;
849
+ serialize(): Record<string, string>;
850
+ }
851
+ type ProductModuleEntity<T extends object = object> = Entity<ProductModuleProps<T>, ProductModuleMethods>;
852
+
853
+ /**
854
+ * @author Labs64 <netlicensing@labs64.com>
855
+ * @license Apache-2.0
856
+ * @link https://netlicensing.io
857
+ * @copyright 2017 Labs64 NetLicensing
858
+ */
859
+
860
+ type TokenProps<T extends object = object> = {
861
+ active?: boolean;
862
+ number?: string;
863
+ expirationTime?: Date;
864
+ tokenType?: TokenTypeValues;
865
+ licenseeNumber?: string;
866
+ action?: string;
867
+ apiKeyRole?: ApiKeyRoleValues;
868
+ bundleNumber?: string;
869
+ bundlePrice?: number;
870
+ productNumber?: string;
871
+ predefinedShoppingItem?: string;
872
+ successURL?: string;
873
+ successURLTitle?: string;
874
+ cancelURL?: string;
875
+ cancelURLTitle?: string;
876
+ readonly shopURL?: string;
877
+ } & T;
878
+ type SavedTokenProps<T extends object = object> = RequiredProps<TokenProps, 'active' | 'number' | 'tokenType'> & TokenProps<T>;
879
+ interface TokenMethods {
880
+ setActive(active: boolean): void;
881
+ getActive<D = undefined>(def?: D): boolean | D;
882
+ setNumber(number: string): void;
883
+ getNumber<D = undefined>(def?: D): string | D;
884
+ setExpirationTime(expirationTime: Date): void;
885
+ getExpirationTime<D = undefined>(def?: D): Date | D;
886
+ setTokenType(tokenType: TokenTypeValues): void;
887
+ getTokenType<D = undefined>(def?: D): TokenTypeValues | D;
888
+ setLicenseeNumber(licenseeNumber: string): void;
889
+ getLicenseeNumber<D = undefined>(def?: D): string | D;
890
+ setAction(action: string): void;
891
+ getAction<D = undefined>(def?: D): string | D;
892
+ setApiKeyRole(apiKeyRole: ApiKeyRoleValues): void;
893
+ getApiKeyRole<D = undefined>(def?: D): ApiKeyRoleValues | D;
894
+ setBundleNumber(bundleNumber: string): void;
895
+ getBundleNumber<D = undefined>(def?: D): string | D;
896
+ setBundlePrice(bundlePrice: number): void;
897
+ getBundlePrice<D = undefined>(def?: D): number | D;
898
+ setProductNumber(productNumber: string): void;
899
+ getProductNumber<D = undefined>(def?: D): string | D;
900
+ setPredefinedShoppingItem(predefinedShoppingItem: string): void;
901
+ getPredefinedShoppingItem<D = undefined>(def?: D): string | D;
902
+ setSuccessURL(successURL: string): void;
903
+ getSuccessURL<D = undefined>(def?: D): string | D;
904
+ setSuccessURLTitle(successURLTitle: string): void;
905
+ getSuccessURLTitle<D = undefined>(def?: D): string | D;
906
+ setCancelURL(cancelURL: string): void;
907
+ getCancelURL<D = undefined>(def?: D): string | D;
908
+ setCancelURLTitle(cancelURLTitle: string): void;
909
+ getCancelURLTitle<D = undefined>(def?: D): string | D;
910
+ getShopURL<D = undefined>(def?: D): string | D;
911
+ serialize(): Record<string, string>;
912
+ }
913
+ type TokenEntity<T extends object = object> = Entity<TokenProps<T>, TokenMethods>;
914
+
915
+ /**
916
+ * @author Labs64 <netlicensing@labs64.com>
917
+ * @license Apache-2.0
918
+ * @link https://netlicensing.io
919
+ * @copyright 2017 Labs64 NetLicensing
920
+ */
921
+
922
+ interface ContextConfig {
923
+ baseUrl?: string;
924
+ securityMode?: SecurityModeValues;
925
+ username?: string;
926
+ password?: string;
927
+ apiKey?: string;
928
+ publicKey?: string;
929
+ }
930
+ interface ContextInstance extends ContextConfig {
931
+ baseUrl: string;
932
+ securityMode: SecurityModeValues;
933
+ setBaseUrl(baseUrl: string): this;
934
+ getBaseUrl(): string;
935
+ setSecurityMode(securityMode: SecurityModeValues): this;
936
+ getSecurityMode(): SecurityModeValues;
937
+ setUsername(username: string): this;
938
+ getUsername<D = undefined>(def?: D): string | D;
939
+ setPassword(password: string): this;
940
+ getPassword<D = undefined>(def?: D): string | D;
941
+ setApiKey(apiKey: string): this;
942
+ getApiKey<D = undefined>(def?: D): string | D;
943
+ setPublicKey(publicKey: string): this;
944
+ getPublicKey<D = undefined>(def?: D): string | D;
945
+ }
946
+
947
+ /**
948
+ * @author Labs64 <netlicensing@labs64.com>
949
+ * @license Apache-2.0
950
+ * @link https://netlicensing.io
951
+ * @copyright 2017 Labs64 NetLicensing
952
+ */
953
+
954
+ interface RequestConfig {
955
+ onInfo?: (info: Info[]) => void;
956
+ onResponse?: (response: AxiosResponse) => void;
957
+ axiosInstance?: AxiosInstance;
958
+ }
959
+ interface IService {
960
+ setAxiosInstance(this: void, instance: AxiosInstance): void;
961
+ getAxiosInstance(this: void): AxiosInstance;
962
+ getLastHttpRequestInfo(this: void): AxiosResponse | null;
963
+ getInfo(this: void): Info[];
964
+ /**
965
+ * this: void
966
+ * @param context
967
+ * @param endpoint
968
+ * @param data
969
+ * @param config
970
+ */
971
+ get(this: void, context: ContextInstance, endpoint: string, data?: Record<string, unknown>, config?: RequestConfig): Promise<AxiosResponse<NlicResponse>>;
972
+ post(this: void, context: ContextInstance, endpoint: string, data?: Record<string, unknown>, config?: RequestConfig): Promise<AxiosResponse<NlicResponse>>;
973
+ delete(this: void, context: ContextInstance, endpoint: string, data?: Record<string, unknown>, config?: RequestConfig): Promise<AxiosResponse<NlicResponse>>;
974
+ request(this: void, context: ContextInstance, method: Method, endpoint: string, data?: Record<string, unknown>, config?: RequestConfig): Promise<AxiosResponse<NlicResponse>>;
975
+ toQueryString<T extends Record<string, unknown>>(data: T): string;
976
+ }
977
+
978
+ /**
979
+ * @author Labs64 <netlicensing@labs64.com>
980
+ * @license Apache-2.0
981
+ * @link https://netlicensing.io
982
+ * @copyright 2017 Labs64 NetLicensing
983
+ */
984
+ interface Pagination {
985
+ pageNumber: number;
986
+ itemsNumber: number;
987
+ totalPages: number;
988
+ totalItems: number;
989
+ hasNext: boolean;
990
+ }
991
+ interface PaginationMethods<T extends object> {
992
+ getContent(): T;
993
+ getPagination(): Pagination;
994
+ getPageNumber(): number;
995
+ getItemsNumber(): number;
996
+ getTotalPages(): number;
997
+ getTotalItems(): number;
998
+ hasNext(): boolean;
999
+ }
1000
+ type PageInstance<T extends object> = PaginationMethods<T> & T;
1001
+
1002
+ /**
1003
+ * @author Labs64 <netlicensing@labs64.com>
1004
+ * @license Apache-2.0
1005
+ * @link https://netlicensing.io
1006
+ * @copyright 2017 Labs64 NetLicensing
1007
+ */
1008
+
1009
+ interface IBundleService {
1010
+ get<T extends object = BundleProps>(context: ContextInstance, number: string, config?: RequestConfig): Promise<BundleEntity<SavedBundleProps<T>>>;
1011
+ list<T extends object = BundleProps>(context: ContextInstance, filter?: Record<string, string | boolean | number> | string | null, config?: RequestConfig): Promise<PageInstance<BundleEntity<SavedBundleProps<T>>[]>>;
1012
+ create<T extends object = BundleProps>(context: ContextInstance, bundle: BundleEntity<T>, config?: RequestConfig): Promise<BundleEntity<SavedBundleProps<T>>>;
1013
+ update<T extends object = BundleProps>(context: ContextInstance, number: string, bundle: BundleEntity<T>, config?: RequestConfig): Promise<BundleEntity<SavedBundleProps<T>>>;
1014
+ delete(context: ContextInstance, number: string, forceCascade?: boolean, config?: RequestConfig): Promise<AxiosResponse<NlicResponse>>;
1015
+ obtain<T extends object = LicenseProps>(context: ContextInstance, number: string, licenseeNumber: string, config?: RequestConfig): Promise<LicenseEntity<SavedLicenseProps<T>>[]>;
1016
+ }
1017
+
1018
+ /**
1019
+ * @author Labs64 <netlicensing@labs64.com>
1020
+ * @license Apache-2.0
1021
+ * @link https://netlicensing.io
1022
+ * @copyright 2017 Labs64 NetLicensing
1023
+ */
1024
+ type Parameter = Record<string, string>;
1025
+ type Parameters = Record<string, Parameter>;
1026
+ interface LicenseeProperties {
1027
+ licenseeName?: string;
1028
+ licenseeSecret?: string;
1029
+ [key: string]: string | undefined;
1030
+ }
1031
+ interface ValidationParametersInstance {
1032
+ productNumber?: string;
1033
+ dryRun?: boolean;
1034
+ forOfflineUse?: boolean;
1035
+ licenseeProperties: LicenseeProperties;
1036
+ parameters: Parameters;
1037
+ setProductNumber(productNumber: string): this;
1038
+ getProductNumber(): string | undefined;
1039
+ setLicenseeName(name: string): this;
1040
+ getLicenseeName(): string | undefined;
1041
+ setLicenseeSecret(secret: string): this;
1042
+ getLicenseeSecret(): string | undefined;
1043
+ getLicenseeProperties(): LicenseeProperties;
1044
+ setLicenseeProperty(key: string, value: string): this;
1045
+ getLicenseeProperty<D = undefined>(key: string, def?: D): string | D;
1046
+ setForOfflineUse(forOfflineUse: boolean): this;
1047
+ isForOfflineUse(): boolean;
1048
+ setDryRun(dryRun: boolean): this;
1049
+ isDryRun(): boolean;
1050
+ setParameter(productModuleNumber: string, parameter: Parameter): this;
1051
+ getParameters(): Parameters;
1052
+ getParameter(productModuleNumber: string): Parameter | undefined;
1053
+ setProductModuleValidationParameters(productModuleNumber: string, productModuleParameters: Parameter): this;
1054
+ getProductModuleValidationParameters(productModuleNumber: string): Parameter | undefined;
1055
+ }
1056
+
1057
+ /**
1058
+ * @author Labs64 <netlicensing@labs64.com>
1059
+ * @license Apache-2.0
1060
+ * @link https://netlicensing.io
1061
+ * @copyright 2017 Labs64 NetLicensing
1062
+ */
1063
+ interface ProductModuleValidation {
1064
+ productModuleNumber: string;
1065
+ [key: string]: string;
1066
+ }
1067
+ interface ValidationResultsInstance {
1068
+ readonly validations: Record<string, ProductModuleValidation>;
1069
+ ttl?: Date;
1070
+ getValidators(): Record<string, ProductModuleValidation>;
1071
+ setValidation(validation: ProductModuleValidation): this;
1072
+ getValidation<D = undefined>(productModuleNumber: string, def?: D): ProductModuleValidation | D;
1073
+ setProductModuleValidation(validation: ProductModuleValidation): this;
1074
+ getProductModuleValidation<D = undefined>(productModuleNumber: string, def?: D): ProductModuleValidation | D;
1075
+ setTtl(ttl: Date | string): this;
1076
+ getTtl(): Date | undefined;
1077
+ toString(): string;
1078
+ }
1079
+
1080
+ /**
1081
+ * @author Labs64 <netlicensing@labs64.com>
1082
+ * @license Apache-2.0
1083
+ * @link https://netlicensing.io
1084
+ * @copyright 2017 Labs64 NetLicensing
1085
+ */
1086
+
1087
+ interface ILicenseeService {
1088
+ get<T extends object = LicenseeProps>(context: ContextInstance, number: string, config?: RequestConfig): Promise<LicenseeEntity<SavedLicenseeProps<T>>>;
1089
+ list<T extends object = LicenseeProps>(context: ContextInstance, filter?: Record<string, string | boolean | number> | string | null, config?: RequestConfig): Promise<PageInstance<LicenseeEntity<SavedLicenseeProps<T>>[]>>;
1090
+ create<T extends object = LicenseeProps>(context: ContextInstance, productNumber: string, licensee: LicenseeEntity<T>, config?: RequestConfig): Promise<LicenseeEntity<SavedLicenseeProps<T>>>;
1091
+ update<T extends object = LicenseeProps>(context: ContextInstance, number: string, licensee: LicenseeEntity<T>, config?: RequestConfig): Promise<LicenseeEntity<SavedLicenseeProps<T>>>;
1092
+ delete(context: ContextInstance, number: string, forceCascade?: boolean, config?: RequestConfig): Promise<AxiosResponse<NlicResponse>>;
1093
+ validate(context: ContextInstance, number: string, parameters?: ValidationParametersInstance, config?: RequestConfig): Promise<ValidationResultsInstance>;
1094
+ transfer(context: ContextInstance, number: string, sourceLicenseeNumber: string, config?: RequestConfig): Promise<AxiosResponse<NlicResponse>>;
1095
+ }
1096
+
1097
+ /**
1098
+ * @author Labs64 <netlicensing@labs64.com>
1099
+ * @license Apache-2.0
1100
+ * @link https://netlicensing.io
1101
+ * @copyright 2017 Labs64 NetLicensing
1102
+ */
1103
+
1104
+ interface ILicenseService {
1105
+ get<T extends object = LicenseProps>(context: ContextInstance, number: string, config?: RequestConfig): Promise<LicenseEntity<SavedLicenseProps<T>>>;
1106
+ list<T extends object = LicenseProps>(context: ContextInstance, filter?: Record<string, string | boolean | number> | string | null, config?: RequestConfig): Promise<PageInstance<LicenseEntity<SavedLicenseProps<T>>[]>>;
1107
+ create<T extends object = LicenseProps>(context: ContextInstance, licenseeNumber: string | null, licenseTemplateNumber: string | null, transactionNumber: string | null, license: LicenseEntity<T>, config?: RequestConfig): Promise<LicenseEntity<SavedLicenseProps<T>>>;
1108
+ update<T extends object = LicenseProps>(context: ContextInstance, number: string, transactionNumber: string | null, license: LicenseEntity<T>, config?: RequestConfig): Promise<LicenseEntity<SavedLicenseProps<T>>>;
1109
+ delete(context: ContextInstance, number: string, forceCascade?: boolean, config?: RequestConfig): Promise<AxiosResponse<NlicResponse>>;
1110
+ }
1111
+
1112
+ /**
1113
+ * @author Labs64 <netlicensing@labs64.com>
1114
+ * @license Apache-2.0
1115
+ * @link https://netlicensing.io
1116
+ * @copyright 2017 Labs64 NetLicensing
1117
+ */
1118
+
1119
+ interface ILicenseTemplateService {
1120
+ get<T extends object = LicenseTemplateProps>(context: ContextInstance, number: string, config?: RequestConfig): Promise<LicenseTemplateEntity<SavedLicenseTemplateProps<T>>>;
1121
+ list<T extends object = LicenseTemplateProps>(context: ContextInstance, filter?: Record<string, string | boolean | number> | string | null, config?: RequestConfig): Promise<PageInstance<LicenseTemplateEntity<SavedLicenseTemplateProps<T>>[]>>;
1122
+ create<T extends object = LicenseTemplateProps>(context: ContextInstance, productModuleNumber: string | null, licenseTemplate: LicenseTemplateEntity<T>, config?: RequestConfig): Promise<LicenseTemplateEntity<SavedLicenseTemplateProps<T>>>;
1123
+ update<T extends object = LicenseTemplateProps>(context: ContextInstance, number: string, licenseTemplate: LicenseTemplateEntity<T>, config?: RequestConfig): Promise<LicenseTemplateEntity<SavedLicenseTemplateProps<T>>>;
1124
+ delete(context: ContextInstance, number: string, forceCascade?: boolean, config?: RequestConfig): Promise<AxiosResponse<NlicResponse>>;
1125
+ }
1126
+
1127
+ /**
1128
+ * @author Labs64 <netlicensing@labs64.com>
1129
+ * @license Apache-2.0
1130
+ * @link https://netlicensing.io
1131
+ * @copyright 2017 Labs64 NetLicensing
1132
+ */
1133
+
1134
+ interface INotificationService {
1135
+ get<T extends object = NotificationProps>(context: ContextInstance, number: string, config?: RequestConfig): Promise<NotificationEntity<SavedNotificationProps<T>>>;
1136
+ list<T extends object = NotificationProps>(context: ContextInstance, filter?: Record<string, string | boolean | number> | string | null, config?: RequestConfig): Promise<PageInstance<NotificationEntity<SavedNotificationProps<T>>[]>>;
1137
+ create<T extends object = NotificationProps>(context: ContextInstance, notification: NotificationEntity<T>, config?: RequestConfig): Promise<NotificationEntity<SavedNotificationProps<T>>>;
1138
+ update<T extends object = NotificationProps>(context: ContextInstance, number: string, notification: NotificationEntity<T>, config?: RequestConfig): Promise<NotificationEntity<SavedNotificationProps<T>>>;
1139
+ delete(context: ContextInstance, number: string, forceCascade?: boolean, config?: RequestConfig): Promise<AxiosResponse<NlicResponse>>;
1140
+ }
1141
+
1142
+ /**
1143
+ * @author Labs64 <netlicensing@labs64.com>
1144
+ * @license Apache-2.0
1145
+ * @link https://netlicensing.io
1146
+ * @copyright 2017 Labs64 NetLicensing
1147
+ */
1148
+
1149
+ interface IPaymentMethodService {
1150
+ get<T extends object = PaymentMethodProps>(context: ContextInstance, number: string, config?: RequestConfig): Promise<PaymentMethodEntity<SavedPaymentMethodProps<T>>>;
1151
+ list<T extends object = PaymentMethodProps>(context: ContextInstance, filter?: Record<string, string | boolean | number> | string | null, config?: RequestConfig): Promise<PageInstance<PaymentMethodEntity<SavedPaymentMethodProps<T>>[]>>;
1152
+ update<T extends object = PaymentMethodProps>(context: ContextInstance, number: string, paymentMethod: PaymentMethodEntity<T>, config?: RequestConfig): Promise<PaymentMethodEntity<SavedPaymentMethodProps<T>>>;
1153
+ }
1154
+
1155
+ /**
1156
+ * @author Labs64 <netlicensing@labs64.com>
1157
+ * @license Apache-2.0
1158
+ * @link https://netlicensing.io
1159
+ * @copyright 2017 Labs64 NetLicensing
1160
+ */
1161
+
1162
+ interface IProductModuleService {
1163
+ get<T extends object = ProductModuleProps>(context: ContextInstance, number: string, config?: RequestConfig): Promise<ProductModuleEntity<SavedProductModuleProps<T>>>;
1164
+ list<T extends object = ProductModuleProps>(context: ContextInstance, filter?: Record<string, string | boolean | number> | string | null, config?: RequestConfig): Promise<PageInstance<ProductModuleEntity<SavedProductModuleProps<T>>[]>>;
1165
+ create<T extends object = ProductModuleProps>(context: ContextInstance, productNumber: string | null, productModule: ProductModuleEntity<T>, config?: RequestConfig): Promise<ProductModuleEntity<SavedProductModuleProps<T>>>;
1166
+ update<T extends object = ProductModuleProps>(context: ContextInstance, number: string, productModule: ProductModuleEntity<T>, config?: RequestConfig): Promise<ProductModuleEntity<SavedProductModuleProps<T>>>;
1167
+ delete(context: ContextInstance, number: string, forceCascade?: boolean, config?: RequestConfig): Promise<AxiosResponse<NlicResponse>>;
1168
+ }
1169
+
1170
+ /**
1171
+ * @author Labs64 <netlicensing@labs64.com>
1172
+ * @license Apache-2.0
1173
+ * @link https://netlicensing.io
1174
+ * @copyright 2017 Labs64 NetLicensing
1175
+ */
1176
+
1177
+ interface IProductService {
1178
+ get<T extends object = ProductProps>(context: ContextInstance, number: string, config?: RequestConfig): Promise<ProductEntity<SavedProductProps<T>>>;
1179
+ list<T extends object = ProductProps>(context: ContextInstance, filter?: Record<string, string | boolean | number> | string | null, config?: RequestConfig): Promise<PageInstance<ProductEntity<SavedProductProps<T>>[]>>;
1180
+ create<T extends object = ProductProps>(context: ContextInstance, product: ProductEntity<T>, config?: RequestConfig): Promise<ProductEntity<SavedProductProps<T>>>;
1181
+ update<T extends object = ProductProps>(context: ContextInstance, number: string, product: ProductEntity<T>, config?: RequestConfig): Promise<ProductEntity<SavedProductProps<T>>>;
1182
+ delete(context: ContextInstance, number: string, forceCascade?: boolean, config?: RequestConfig): Promise<AxiosResponse<NlicResponse>>;
1183
+ }
1184
+
1185
+ /**
1186
+ * @author Labs64 <netlicensing@labs64.com>
1187
+ * @license Apache-2.0
1188
+ * @link https://netlicensing.io
1189
+ * @copyright 2017 Labs64 NetLicensing
1190
+ */
1191
+
1192
+ interface ITokenService {
1193
+ get<T extends object = TokenProps>(context: ContextInstance, number: string, config?: RequestConfig): Promise<TokenEntity<SavedTokenProps<T>>>;
1194
+ list<T extends object = TokenProps>(context: ContextInstance, filter?: Record<string, string | boolean | number> | string | null, config?: RequestConfig): Promise<PageInstance<TokenEntity<SavedTokenProps<T>>[]>>;
1195
+ create<T extends object = TokenProps>(context: ContextInstance, token: TokenEntity<T>, config?: RequestConfig): Promise<TokenEntity<SavedTokenProps<T>>>;
1196
+ delete(context: ContextInstance, number: string, forceCascade?: boolean, config?: RequestConfig): Promise<AxiosResponse<NlicResponse>>;
1197
+ }
1198
+
1199
+ /**
1200
+ * @author Labs64 <netlicensing@labs64.com>
1201
+ * @license Apache-2.0
1202
+ * @link https://netlicensing.io
1203
+ * @copyright 2017 Labs64 NetLicensing
1204
+ */
1205
+
1206
+ interface ITransactionService {
1207
+ get<T extends object = TransactionProps>(context: ContextInstance, number: string, config?: RequestConfig): Promise<TransactionEntity<SavedTransactionProps<T>>>;
1208
+ list<T extends object = TransactionProps>(context: ContextInstance, filter?: Record<string, string | boolean | number> | string | null, config?: RequestConfig): Promise<PageInstance<TransactionEntity<SavedTransactionProps<T>>[]>>;
1209
+ create<T extends object = TransactionProps>(context: ContextInstance, transaction: TransactionEntity<T>, config?: RequestConfig): Promise<TransactionEntity<SavedTransactionProps<T>>>;
1210
+ update<T extends object = TransactionProps>(context: ContextInstance, number: string, transaction: TransactionEntity<T>, config?: RequestConfig): Promise<TransactionEntity<SavedTransactionProps<T>>>;
1211
+ }
1212
+
1213
+ /**
1214
+ * @author Labs64 <netlicensing@labs64.com>
1215
+ * @license Apache-2.0
1216
+ * @link https://netlicensing.io
1217
+ * @copyright 2017 Labs64 NetLicensing
1218
+ */
1219
+
1220
+ interface IUtilityService {
1221
+ listLicenseTypes(context: ContextInstance, config?: RequestConfig): Promise<PageInstance<LicenseTypeValues[]>>;
1222
+ listLicensingModels(context: ContextInstance, config?: RequestConfig): Promise<PageInstance<LicensingModelValues[]>>;
1223
+ listCountries(context: ContextInstance, filter?: Record<string, string | boolean | number> | string | null, config?: RequestConfig): Promise<PageInstance<CountryEntity[]>>;
1224
+ }
1225
+
1226
+ /**
1227
+ * @author Labs64 <netlicensing@labs64.com>
1228
+ * @license Apache-2.0
1229
+ * @link https://netlicensing.io
1230
+ * @copyright 2017 Labs64 NetLicensing
1231
+ */
1232
+
1233
+ type BundleProps<T extends object = object> = T & {
1234
+ active?: boolean;
1235
+ number?: string;
1236
+ name?: string;
1237
+ price?: number;
1238
+ currency?: string;
1239
+ productNumber?: string;
1240
+ licenseTemplateNumbers?: string[];
1241
+ readonly staleLicenseTemplateNumbers?: string[];
1242
+ };
1243
+ type SavedBundleProps<T extends object = object> = RequiredProps<BundleProps, 'active' | 'number' | 'name'> & BundleProps<T>;
1244
+ interface BundleMethods {
1245
+ setActive(active: boolean): void;
1246
+ getActive<D = undefined>(def?: D): boolean | D;
1247
+ setNumber(number: string): void;
1248
+ getNumber<D = undefined>(def?: D): string | D;
1249
+ setName(name: string): void;
1250
+ getName<D = undefined>(def?: D): string | D;
1251
+ setPrice(price: number): void;
1252
+ getPrice<D = undefined>(def?: D): number | D;
1253
+ setCurrency(currency: string): void;
1254
+ getCurrency<D = undefined>(def?: D): string | D;
1255
+ setProductNumber(number: string): void;
1256
+ getProductNumber<D = undefined>(def?: D): string | D;
1257
+ setLicenseTemplateNumbers(numbers: string[]): void;
1258
+ getLicenseTemplateNumbers<D = undefined>(def?: D): string[] | D;
1259
+ addLicenseTemplateNumber(number: string): void;
1260
+ removeLicenseTemplateNumber(number: string): void;
1261
+ getStaleLicenseTemplateNumbers<D = undefined>(def?: D): string[] | D;
1262
+ serialize(): Record<string, string>;
1263
+ }
1264
+ type BundleEntity<T extends object = object> = Entity<BundleProps<T>, BundleMethods>;
1265
+
1266
+ declare const _default$f: <T extends object = BundleProps>(item?: Item) => BundleEntity<T>;
1267
+
1268
+ declare const _default$e: (item?: Item) => CountryEntity;
1269
+
1270
+ declare const _default$d: <T extends object = LicenseProps>(item?: Item) => LicenseEntity<T>;
1271
+
1272
+ declare const _default$c: <T extends object = LicenseeProps>(item?: Item) => LicenseeEntity<T>;
1273
+
1274
+ declare const _default$b: <T extends object = LicenseTemplateProps>(item?: Item) => LicenseTemplateEntity<T>;
1275
+
1276
+ declare const _default$a: <T extends object = NotificationProps>(item?: Item) => NotificationEntity<T>;
1277
+
1278
+ declare const itemToObject: <T extends object = Record<string, unknown>>(item?: Item | List) => T;
1279
+
1280
+ declare const _default$9: <T extends object = PaymentMethodProps>(item?: Item) => PaymentMethodEntity<T>;
1281
+
1282
+ declare const _default$8: <T extends object = ProductProps>(item?: Item) => ProductEntity<T>;
1283
+
1284
+ declare const _default$7: <T extends object = ProductModuleProps>(item?: Item) => ProductModuleEntity<T>;
1285
+
1286
+ declare const _default$6: <T extends object = TokenProps>(item?: Item) => TokenEntity<T>;
1287
+
1288
+ declare const _default$5: <T extends object = TransactionProps>(item?: Item) => TransactionEntity<T>;
1289
+
1290
+ /**
1291
+ * @author Labs64 <netlicensing@labs64.com>
1292
+ * @license Apache-2.0
1293
+ * @link https://netlicensing.io
1294
+ * @copyright 2017 Labs64 NetLicensing
1295
+ */
1296
+
1297
+ /**
1298
+ * NetLicensing Bundle entity.
1299
+ *
1300
+ * Properties visible via NetLicensing API:
1301
+ *
1302
+ * Unique number that identifies the bundle. Vendor can assign this number when creating a bundle or
1303
+ * let NetLicensing generate one.
1304
+ * @property string number
1305
+ *
1306
+ * If set to false, the bundle is disabled.
1307
+ * @property boolean active
1308
+ *
1309
+ * Bundle name.
1310
+ * @property string name
1311
+ *
1312
+ * Price for the bundle. If >0, it must always be accompanied by the currency specification.
1313
+ * @property number price
1314
+ *
1315
+ * Specifies currency for the bundle price. Check data types to discover which currencies are
1316
+ * supported.
1317
+ * @property string currency
1318
+ *
1319
+ * The bundle includes a set of templates, each identified by a unique template number.
1320
+ * @property string[] licenseTemplateNumbers
1321
+ *
1322
+ * Arbitrary additional user properties of string type may be associated with each bundle. The name of user property
1323
+ * must not be equal to any of the fixed property names listed above and must be none of id, deleted.
1324
+ */
1325
+ declare const Bundle: <T extends object>(properties?: BundleProps<T>) => BundleEntity<T>;
1326
+
1327
+ /**
1328
+ * @author Labs64 <netlicensing@labs64.com>
1329
+ * @license Apache-2.0
1330
+ * @link https://netlicensing.io
1331
+ * @copyright 2017 Labs64 NetLicensing
1332
+ */
1333
+
1334
+ /**
1335
+ * Country entity used internally by NetLicensing.
1336
+ *
1337
+ * Properties visible via NetLicensing API:
1338
+ *
1339
+ * @property code - Unique code of country.
1340
+ * @property name - Unique name of country
1341
+ * @property vatPercent - Country vat.
1342
+ * @property isEu - is country in EU.
1343
+ */
1344
+ declare const Country: (properties?: CountryProps) => CountryEntity;
1345
+
1346
+ /**
1347
+ * @author Labs64 <netlicensing@labs64.com>
1348
+ * @license Apache-2.0
1349
+ * @link https://netlicensing.io
1350
+ * @copyright 2017 Labs64 NetLicensing
1351
+ */
1352
+
1353
+ declare const defineEntity: <P extends Proto, T extends object, M extends object>(props: T, methods: M, proto?: P, options?: {
1354
+ set?: PropSetEventListener<T>;
1355
+ get?: PropGetEventListener<T>;
1356
+ }) => Entity<T, M>;
1357
+
1358
+ /**
1359
+ * @author Labs64 <netlicensing@labs64.com>
1360
+ * @license Apache-2.0
1361
+ * @link https://netlicensing.io
1362
+ * @copyright 2017 Labs64 NetLicensing
1363
+ */
1364
+
1365
+ /**
1366
+ * License entity used internally by NetLicensing.
1367
+ *
1368
+ * Properties visible via NetLicensing API:
1369
+ *
1370
+ * Unique number (across all products/licensees of a vendor) that identifies the license. Vendor can
1371
+ * assign this number when creating a license or let NetLicensing generate one. Read-only after corresponding creation
1372
+ * transaction status is set to closed.
1373
+ * @property string number
1374
+ *
1375
+ * Name for the licensed item. Set from license template on creation, if not specified explicitly.
1376
+ * @property string name
1377
+ *
1378
+ * If set to false, the license is disabled. License can be re-enabled, but as long as it is disabled,
1379
+ * the license is excluded from the validation process.
1380
+ * @property boolean active
1381
+ *
1382
+ * price for the license. If >0, it must always be accompanied by the currency specification. Read-only,
1383
+ * set from license template on creation.
1384
+ * @property number price
1385
+ *
1386
+ * specifies currency for the license price. Check data types to discover which currencies are
1387
+ * supported. Read-only, set from license template on creation.
1388
+ * @property string currency
1389
+ *
1390
+ * If set to true, this license is not shown in NetLicensing Shop as purchased license. Set from license
1391
+ * template on creation, if not specified explicitly.
1392
+ * @property boolean hidden
1393
+ *
1394
+ * The unique identifier assigned to the licensee (the entity to whom the license is issued). This number is typically
1395
+ * associated with a specific customer or organization. It is used internally to reference the licensee and cannot be
1396
+ * changed after the license is created.
1397
+ * @property string licenseeNumber
1398
+ *
1399
+ * The unique identifier for the license template from which this license was created.
1400
+ * @property string licenseTemplateNumber
1401
+ *
1402
+ * A boolean flag indicating whether the license is actively being used. If true, it means the license is currently in
1403
+ * use. If false, the license is not currently assigned or in use.
1404
+ * @property boolean inUse
1405
+ *
1406
+ * This parameter is specific to TimeVolume licenses and indicates the total volume of time (e.g., in hours, days, etc.)
1407
+ * associated with the license. This value defines the amount of time the license covers, which may affect the usage
1408
+ * period and limits associated with the license.
1409
+ * @property number timeVolume
1410
+ *
1411
+ * Also, specific to TimeVolume licenses, this field defines the period of time for the timeVolume
1412
+ * (e.g., "DAY", "WEEK", "MONTH", "YEAR"). It provides the time unit for the timeVolume value, clarifying whether the
1413
+ * time is measured in days, weeks, or any other defined period.
1414
+ * @property string timeVolumePeriod
1415
+ *
1416
+ * For TimeVolume licenses, this field indicates the start date of the license’s validity period. This date marks when
1417
+ * the license becomes active and the associated time volume starts being consumed.
1418
+ * It can be represented as a string "now" or a Date object.
1419
+ * @property string|Date Date startDate
1420
+ *
1421
+ * Parent(Feature) license number
1422
+ * @property string parentfeature
1423
+ *
1424
+ * Arbitrary additional user properties of string type may be associated with each license. The name of user property
1425
+ * must not be equal to any of the fixed property names listed above and must be none of id, deleted, licenseeNumber,
1426
+ * licenseTemplateNumber.
1427
+ */
1428
+ declare const License: <T extends object>(properties?: LicenseProps<T>) => LicenseEntity<T>;
1429
+
1430
+ /**
1431
+ * @author Labs64 <netlicensing@labs64.com>
1432
+ * @license Apache-2.0
1433
+ * @link https://netlicensing.io
1434
+ * @copyright 2017 Labs64 NetLicensing
1435
+ */
1436
+
1437
+ /**
1438
+ * Licensee entity used internally by NetLicensing.
1439
+ *
1440
+ * Properties visible via NetLicensing API:
1441
+ *
1442
+ * Unique number (across all products of a vendor) that identifies the licensee. Vendor can assign this
1443
+ * number when creating a licensee or let NetLicensing generate one. Read-only after creation of the first license for
1444
+ * the licensee.
1445
+ * @property string number
1446
+ *
1447
+ * Licensee name.
1448
+ * @property string name
1449
+ *
1450
+ * If set to false, the licensee is disabled. Licensee can not obtain new licenses, and validation is
1451
+ * disabled (tbd).
1452
+ * @property boolean active
1453
+ *
1454
+ * Licensee Secret for licensee deprecated use Node-Locked Licensing Model instead
1455
+ * @property string licenseeSecret
1456
+ *
1457
+ * Mark licensee for transfer.
1458
+ * @property boolean markedForTransfer
1459
+ *
1460
+ * Arbitrary additional user properties of string type may be associated with each licensee. The name of user property
1461
+ * must not be equal to any of the fixed property names listed above and must be none of id, deleted, productNumber
1462
+ */
1463
+ declare const Licensee: <T extends object>(properties?: LicenseeProps<T>) => LicenseeEntity<T>;
1464
+
1465
+ /**
1466
+ * License template entity used internally by NetLicensing.
1467
+ *
1468
+ * Properties visible via NetLicensing API:
1469
+ *
1470
+ * Unique number (across all products of a vendor) that identifies the license template. Vendor can
1471
+ * assign this number when creating a license template or let NetLicensing generate one.
1472
+ * Read-only after creation of the first license from this license template.
1473
+ * @property string number
1474
+ *
1475
+ * If set to false, the license template is disabled. Licensee can not obtain any new licenses off this
1476
+ * license template.
1477
+ * @property boolean active
1478
+ *
1479
+ * Name for the licensed item.
1480
+ * @property string name
1481
+ *
1482
+ * Type of licenses created from this license template. Supported types: "FEATURE", "TIMEVOLUME",
1483
+ * "FLOATING", "QUANTITY"
1484
+ * @property string licenseType
1485
+ *
1486
+ * Price for the license. If >0, it must always be accompanied by the currency specification.
1487
+ * @property number price
1488
+ *
1489
+ * Specifies currency for the license price. Check data types to discover which currencies are
1490
+ * supported.
1491
+ * @property string currency
1492
+ *
1493
+ * If set to true, every new licensee automatically gets one license out of this license template on
1494
+ * creation. Automatic licenses must have their price set to 0.
1495
+ * @property boolean automatic
1496
+ *
1497
+ * If set to true, this license template is not shown in NetLicensing Shop as offered for purchase.
1498
+ * @property boolean hidden
1499
+ *
1500
+ * If set to true, licenses from this license template are not visible to the end customer, but
1501
+ * participate in validation.
1502
+ * @property boolean hideLicenses
1503
+ *
1504
+ * If set to true, this license template defines grace period of validity granted after subscription expiration.
1505
+ * @property boolean gracePeriod
1506
+ *
1507
+ * Mandatory for 'TIMEVOLUME' license type.
1508
+ * @property number timeVolume
1509
+ *
1510
+ * Time volume period for 'TIMEVOLUME' license type. Supported types: "DAY", "WEEK", "MONTH", "YEAR"
1511
+ * @property string timeVolumePeriod
1512
+ *
1513
+ * Mandatory for 'FLOATING' license type.
1514
+ * @property number maxSessions
1515
+ *
1516
+ * Mandatory for 'QUANTITY' license type.
1517
+ * @property number quantity
1518
+ */
1519
+ declare const LicenseTemplate: <T extends object>(properties?: LicenseTemplateProps<T>) => LicenseTemplateEntity<T>;
1520
+
1521
+ /**
1522
+ * @author Labs64 <netlicensing@labs64.com>
1523
+ * @license Apache-2.0
1524
+ * @link https://netlicensing.io
1525
+ * @copyright 2017 Labs64 NetLicensing
1526
+ */
1527
+ declare class LicenseTransactionJoin implements LicenseTransactionJoinEntity {
1528
+ transaction: TransactionEntity;
1529
+ license: LicenseEntity;
1530
+ constructor(transaction: TransactionEntity, license: LicenseEntity);
1531
+ setTransaction(transaction: TransactionEntity): void;
1532
+ getTransaction(): TransactionEntity;
1533
+ setLicense(license: LicenseEntity): void;
1534
+ getLicense(): LicenseEntity;
1535
+ }
1536
+ declare const _default$4: (transaction: TransactionEntity, license: LicenseEntity) => LicenseTransactionJoin;
1537
+
1538
+ /**
1539
+ * NetLicensing Notification entity.
1540
+ *
1541
+ * Properties visible via NetLicensing API:
1542
+ *
1543
+ * Unique number that identifies the notification. Vendor can assign this number when creating a notification or
1544
+ * let NetLicensing generate one.
1545
+ * @property string number
1546
+ *
1547
+ * If set to false, the notification is disabled. The notification will not be fired when the event triggered.
1548
+ * @property boolean active
1549
+ *
1550
+ * Notification name.
1551
+ * @property string name
1552
+ *
1553
+ * Notification type. Indicate the method of transmitting notification, ex: EMAIL, WEBHOOK.
1554
+ * @property float type
1555
+ *
1556
+ * Comma separated string of events that fire the notification when emitted.
1557
+ * @property string events
1558
+ *
1559
+ * Notification response payload.
1560
+ * @property string payload
1561
+ *
1562
+ * Notification response url. Optional. Uses only for WEBHOOK type notification.
1563
+ * @property string url
1564
+ *
1565
+ * Arbitrary additional user properties of string type may be associated with each notification.
1566
+ * The name of user property must not be equal to any of the fixed property names listed above and must be none of id,
1567
+ * deleted.
1568
+ */
1569
+ declare const Notification: <T extends object>(properties?: NotificationProps<T>) => NotificationEntity<T>;
1570
+
1571
+ /**
1572
+ * PaymentMethod entity used internally by NetLicensing.
1573
+ *
1574
+ * @property string number
1575
+ * @property boolean active
1576
+ * @property string paypal.subject
1577
+ */
1578
+ declare const PaymentMethod: <T extends object>(properties?: PaymentMethodProps<T>) => PaymentMethodEntity<T>;
1579
+
1580
+ /**
1581
+ * NetLicensing Product entity.
1582
+ *
1583
+ * Properties visible via NetLicensing API:
1584
+ *
1585
+ * Unique number that identifies the product. Vendor can assign this number when creating a product or
1586
+ * let NetLicensing generate one. Read-only after creation of the first licensee for the product.
1587
+ * @property string number
1588
+ *
1589
+ * If set to false, the product is disabled. No new licensees can be registered for the product,
1590
+ * existing licensees can not obtain new licenses.
1591
+ * @property boolean active
1592
+ *
1593
+ * Product name. Together with the version identifies the product for the end customer.
1594
+ * @property string name
1595
+ *
1596
+ * Product version. Convenience parameter, additional to the product name.
1597
+ * @property string version
1598
+ *
1599
+ * If set to 'true', non-existing licensees will be created at first validation attempt.
1600
+ * @property boolean licenseeAutoCreate
1601
+ *
1602
+ * Licensee secret mode for product.Supported types: "DISABLED", "PREDEFINED", "CLIENT"
1603
+ * @property boolean licenseeSecretMode
1604
+ *
1605
+ * Product description. Optional.
1606
+ * @property string description
1607
+ *
1608
+ * Licensing information. Optional.
1609
+ * @property string licensingInfo
1610
+ *
1611
+ * @property boolean inUse
1612
+ *
1613
+ * Arbitrary additional user properties of string type may be associated with each product. The name of user property
1614
+ * must not be equal to any of the fixed property names listed above and must be none of id, deleted.
1615
+ */
1616
+ declare const Product: <T extends object = object>(properties?: ProductProps<T>) => ProductEntity<T>;
1617
+
1618
+ declare const ProductDiscount: (properties?: ProductDiscountProps) => ProductDiscountEntity;
1619
+
1620
+ /**
1621
+ * Product module entity used internally by NetLicensing.
1622
+ *
1623
+ * Properties visible via NetLicensing API:
1624
+ *
1625
+ * Unique number (across all products of a vendor) that identifies the product module. Vendor can assign
1626
+ * this number when creating a product module or let NetLicensing generate one. Read-only after creation of the first
1627
+ * licensee for the product.
1628
+ * @property string number
1629
+ *
1630
+ * If set to false, the product module is disabled. Licensees can not obtain any new licenses for this
1631
+ * product module.
1632
+ * @property boolean active
1633
+ *
1634
+ * Product module name that is visible to the end customers in NetLicensing Shop.
1635
+ * @property string name
1636
+ *
1637
+ * Licensing model applied to this product module. Defines what license templates can be
1638
+ * configured for the product module and how licenses for this product module are processed during validation.
1639
+ * @property string licensingModel
1640
+ *
1641
+ * Maximum checkout validity (days). Mandatory for 'Floating' licensing model.
1642
+ * @property number maxCheckoutValidity
1643
+ *
1644
+ * Remaining time volume for yellow level. Mandatory for 'Rental' licensing model.
1645
+ * @property number yellowThreshold
1646
+ *
1647
+ * Remaining time volume for red level. Mandatory for 'Rental' licensing model.
1648
+ * @property number redThreshold
1649
+ */
1650
+ declare const ProductModule: <T extends object = object>(properties?: ProductModuleProps<T>) => ProductModuleEntity<T>;
1651
+
1652
+ declare const Token: <T extends object = object>(properties?: TokenProps<T>) => TokenEntity<T>;
1653
+
1654
+ /**
1655
+ * Transaction entity used internally by NetLicensing.
1656
+ *
1657
+ * Properties visible via NetLicensing API:
1658
+ *
1659
+ * Unique number (across all products of a vendor) that identifies the transaction. This number is
1660
+ * always generated by NetLicensing.
1661
+ * @property string number
1662
+ *
1663
+ * always true for transactions
1664
+ * @property boolean active
1665
+ *
1666
+ * Status of transaction. "CANCELLED", "CLOSED", "PENDING".
1667
+ * @property string status
1668
+ *
1669
+ * "SHOP". AUTO transaction for internal use only.
1670
+ * @property string source
1671
+ *
1672
+ * grand total for SHOP transaction (see source).
1673
+ * @property number grandTotal
1674
+ *
1675
+ * discount for SHOP transaction (see source).
1676
+ * @property number discount
1677
+ *
1678
+ * specifies currency for money fields (grandTotal and discount). Check data types to discover which
1679
+ * @property string currency
1680
+ *
1681
+ * Date created. Optional.
1682
+ * @property string dateCreated
1683
+ *
1684
+ * Date closed. Optional.
1685
+ * @property string dateClosed
1686
+ */
1687
+ declare const Transaction: <T extends object>(properties?: TransactionProps<T>) => TransactionEntity<T>;
1688
+
1689
+ declare class NlicError<T = unknown, D = unknown> extends AxiosError<T, D> {
1690
+ isNlicError: boolean;
1691
+ constructor(message?: string, code?: string, config?: InternalAxiosRequestConfig<D>, request?: unknown, response?: AxiosResponse<T, D>, stack?: string);
1692
+ }
1693
+
1694
+ declare const bundleService: IBundleService;
1695
+
1696
+ declare const licenseeService: ILicenseeService;
1697
+
1698
+ declare const licenseService: ILicenseService;
1699
+
1700
+ declare const licenseTemplateService: ILicenseTemplateService;
1701
+
1702
+ declare const notificationService: INotificationService;
1703
+
1704
+ declare const paymentMethodService: IPaymentMethodService;
1705
+
1706
+ declare const productModuleService: IProductModuleService;
1707
+
1708
+ declare const productService: IProductService;
1709
+
1710
+ declare const service: IService;
1711
+
1712
+ declare const tokenService: ITokenService;
1713
+
1714
+ declare const transactionService: ITransactionService;
1715
+
1716
+ declare const utilityService: IUtilityService;
1717
+
1718
+ declare const encode: (filter: Record<string, string | boolean | number>) => string;
1719
+ declare const decode: (filter: string) => Record<string, string>;
1720
+
1721
+ /**
1722
+ * Converts an object into a map of type Record<string, string>, where the value of each object property is converted
1723
+ * to a string.
1724
+ * If the property's value is `undefined`, it will be replaced with an empty string.
1725
+ * If the value is already a string, it will remain unchanged.
1726
+ * If the value is Date instance, it wll be replaced with an ISO format date string.
1727
+ * For complex types (objects, arrays, etc.), the value will be serialized into a JSON string.
1728
+ * If serialization fails, the value will be converted to a string using `String()`.
1729
+ *
1730
+ * @author Labs64 <netlicensing@labs64.com>
1731
+ * @license Apache-2.0
1732
+ * @link https://netlicensing.io
1733
+ * @copyright 2017 Labs64 NetLicensing
1734
+ *
1735
+ * @param obj - The object to be converted into a map.
1736
+ * @param options
1737
+ * @returns A map (Record<string, string>) with converted property values from the object.
1738
+ */
1739
+ declare const _default$3: <T extends object>(obj: T, options?: {
1740
+ ignore?: string[];
1741
+ }) => Record<string, string>;
1742
+
1743
+ /**
1744
+ * @author Labs64 <netlicensing@labs64.com>
1745
+ * @license Apache-2.0
1746
+ * @link https://netlicensing.io
1747
+ * @copyright 2017 Labs64 NetLicensing
1748
+ */
1749
+ declare const isDefined: (value: unknown) => boolean;
1750
+ declare const isValid: (value: unknown) => boolean;
1751
+ declare const ensureNotNull: (value: unknown, name: string) => void;
1752
+ declare const ensureNotEmpty: (value: unknown, name: string) => void;
1753
+
1754
+ declare const _default$2: (props?: ContextConfig) => ContextInstance;
1755
+
1756
+ /**
1757
+ * @author Labs64 <netlicensing@labs64.com>
1758
+ * @license Apache-2.0
1759
+ * @link https://netlicensing.io
1760
+ * @copyright 2017 Labs64 NetLicensing
1761
+ */
1762
+
1763
+ declare const Page: <T extends object>(content: T, pagination?: Partial<ItemPagination>) => PageInstance<T>;
1764
+
1765
+ /**
1766
+ * @author Labs64 <netlicensing@labs64.com>
1767
+ * @license Apache-2.0
1768
+ * @link https://netlicensing.io
1769
+ * @copyright 2017 Labs64 NetLicensing
1770
+ */
1771
+
1772
+ declare const _default$1: () => ValidationParametersInstance;
1773
+
1774
+ /**
1775
+ * @author Labs64 <netlicensing@labs64.com>
1776
+ * @license Apache-2.0
1777
+ * @link https://netlicensing.io
1778
+ * @copyright 2017 Labs64 NetLicensing
1779
+ */
1780
+
1781
+ declare const _default: () => ValidationResultsInstance;
1782
+
1783
+ export { ApiKeyRole, type ApiKeyRoleKeys, type ApiKeyRoleValues, Bundle, type BundleEntity, type BundleMethods, type BundleProps, bundleService as BundleService, _default$g as Constants, _default$2 as Context, type ContextConfig, type ContextInstance, Country, type CountryEntity, type CountryMethods, type CountryProps, type DateField, type Entity, type EntityMethods, type IBundleService, type ILicenseService, type ILicenseTemplateService, type ILicenseeService, type INotificationService, type IPaymentMethodService, type IProductModuleService, type IProductService, type IService, type ITokenService, type ITransactionService, type IUtilityService, type Info, type Item, type ItemPagination, type Items, License, type LicenseEntity, type LicenseMethods, type LicenseProps, licenseService as LicenseService, LicenseTemplate, type LicenseTemplateEntity, type LicenseTemplateMethods, type LicenseTemplateProps, licenseTemplateService as LicenseTemplateService, _default$4 as LicenseTransactionJoin, type LicenseTransactionJoinEntity, type LicenseTransactionJoinMethods, type LicenseTransactionJoinProps, LicenseType, type LicenseTypeKeys, type LicenseTypeValues, Licensee, type LicenseeEntity, type LicenseeMethods, type LicenseeProperties, type LicenseeProps, LicenseeSecretMode, type LicenseeSecretModeKeys, type LicenseeSecretModeValues, licenseeService as LicenseeService, LicensingModel, type LicensingModelKeys, type LicensingModelValues, type List, NlicError, type NlicResponse, NodeSecretMode, type NodeSecretModeKeys, type NodeSecretModeValues, Notification, type NotificationEntity, NotificationEvent, type NotificationEventKeys, type NotificationEventValues, type NotificationMethods, type NotificationProps, NotificationProtocol, type NotificationProtocolKeys, type NotificationProtocolValues, notificationService as NotificationService, Page, type PageInstance, type Pagination, type PaginationMethods, type Parameter, type Parameters, PaymentMethod, type PaymentMethodEntity, PaymentMethodEnum, type PaymentMethodKeys, type PaymentMethodMethods, type PaymentMethodProps, paymentMethodService as PaymentMethodService, type PaymentMethodValues, Product, ProductDiscount, type ProductDiscountEntity, type ProductDiscountMethods, type ProductDiscountProps, type ProductEntity, type ProductMethods, ProductModule, type ProductModuleEntity, type ProductModuleMethods, type ProductModuleProps, productModuleService as ProductModuleService, type ProductModuleValidation, type ProductProps, productService as ProductService, type PropGetEventListener, type PropSetEventListener, type Proto, type RequestConfig, type RequiredProps, type SavedBundleProps, type SavedLicenseProps, type SavedLicenseTemplateProps, type SavedLicenseeProps, type SavedNotificationProps, type SavedPaymentMethodProps, type SavedProductModuleProps, type SavedProductProps, type SavedTokenProps, type SavedTransactionProps, SecurityMode, type SecurityModeKeys, type SecurityModeValues, service as Service, TimeVolumePeriod, type TimeVolumePeriodKeys, type TimeVolumePeriodValues, Token, type TokenEntity, type TokenMethods, type TokenProps, tokenService as TokenService, TokenType, type TokenTypeKeys, type TokenTypeValues, Transaction, type TransactionEntity, type TransactionMethods, type TransactionProps, transactionService as TransactionService, TransactionSource, type TransactionSourceKeys, type TransactionSourceValues, TransactionStatus, type TransactionStatusKeys, type TransactionStatusValues, utilityService as UtilityService, _default$1 as ValidationParameters, type ValidationParametersInstance, _default as ValidationResults, type ValidationResultsInstance, type WarningLevelSummary, defineEntity, ensureNotEmpty, ensureNotNull, decode as filterDecode, encode as filterEncode, isDefined, isValid, _default$f as itemToBundle, _default$e as itemToCountry, _default$d as itemToLicense, _default$b as itemToLicenseTemplate, _default$c as itemToLicensee, _default$a as itemToNotification, itemToObject, _default$9 as itemToPaymentMethod, _default$8 as itemToProduct, _default$7 as itemToProductModule, _default$6 as itemToToken, _default$5 as itemToTransaction, _default$3 as serialize };