@keygen-rs/napi 0.14.0 → 0.14.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.d.ts +1237 -0
  2. package/index.js +720 -0
  3. package/package.json +11 -10
package/index.d.ts ADDED
@@ -0,0 +1,1237 @@
1
+ /* auto-generated by NAPI-RS */
2
+ /* eslint-disable */
3
+ export interface Arch {
4
+ id: string
5
+ name?: string
6
+ key: string
7
+ created: string
8
+ updated: string
9
+ accountId?: string
10
+ }
11
+
12
+ export interface Artifact {
13
+ id: string
14
+ filename: string
15
+ filetype: string
16
+ filesize: number
17
+ platform: string
18
+ arch: string
19
+ signature?: string
20
+ checksum?: string
21
+ status: string
22
+ metadata?: any
23
+ created: string
24
+ updated: string
25
+ yankedAt?: string
26
+ releaseId?: string
27
+ productId?: string
28
+ accountId?: string
29
+ }
30
+
31
+ export declare function attachLicenseEntitlements(id: string, entitlementIds: Array<string>): Promise<void>
32
+
33
+ export declare function attachLicenseUsers(id: string, userIds: Array<string>): Promise<void>
34
+
35
+ export declare function attachPolicyEntitlements(id: string, entitlementIds: Array<string>): Promise<void>
36
+
37
+ export declare function attachReleaseConstraints(id: string, entitlementIds: Array<string>): Promise<Array<Constraint>>
38
+
39
+ export declare function banUser(id: string): Promise<User>
40
+
41
+ export declare function changeLicenseGroup(id: string, groupId: string): Promise<License>
42
+
43
+ export declare function changeLicenseOwner(id: string, ownerId: string): Promise<License>
44
+
45
+ export declare function changeLicensePolicy(id: string, policyId: string): Promise<License>
46
+
47
+ export declare function changeMachineGroup(id: string, groupId: string): Promise<Machine>
48
+
49
+ export declare function changeMachineOwner(id: string, ownerId: string): Promise<Machine>
50
+
51
+ export declare function changeReleasePackage(id: string, packageId: string): Promise<Release>
52
+
53
+ export declare function changeUserGroup(id: string, groupId: string): Promise<User>
54
+
55
+ export interface Channel {
56
+ id: string
57
+ name?: string
58
+ key: string
59
+ created: string
60
+ updated: string
61
+ accountId?: string
62
+ }
63
+
64
+ export declare function checkInLicense(id: string): Promise<License>
65
+
66
+ export declare function checkoutLicense(id: string, opts?: { ttl?: number | null; include?: string[]; encrypt?: boolean; algorithm?: 'aes-256-gcm+ed25519' | 'aes-256-gcm+ecdsa-p256' | 'aes-256-gcm+rsa-pss-sha256' | 'aes-256-gcm+rsa-sha256' | 'base64+ed25519' | 'base64+ecdsa-p256' | 'base64+rsa-pss-sha256' | 'base64+rsa-sha256' }): Promise<LicenseFile>
67
+
68
+ export declare function checkoutLicenseCertificate(id: string, opts?: { ttl?: number | null; include?: string[]; encrypt?: boolean; algorithm?: 'aes-256-gcm+ed25519' | 'aes-256-gcm+ecdsa-p256' | 'aes-256-gcm+rsa-pss-sha256' | 'aes-256-gcm+rsa-sha256' | 'base64+ed25519' | 'base64+ecdsa-p256' | 'base64+rsa-pss-sha256' | 'base64+rsa-sha256' }): Promise<string>
69
+
70
+ export declare function checkoutMachine(id: string, opts?: MachineCheckoutOpts | undefined | null): Promise<MachineFile>
71
+
72
+ export interface Component {
73
+ id: string
74
+ fingerprint: string
75
+ name: string
76
+ metadata?: any
77
+ created: string
78
+ updated: string
79
+ accountId?: string
80
+ environmentId?: string
81
+ productId?: string
82
+ licenseId?: string
83
+ machineId?: string
84
+ }
85
+
86
+ export interface Constraint {
87
+ id: string
88
+ created: string
89
+ updated: string
90
+ accountId?: string
91
+ entitlementId?: string
92
+ releaseId?: string
93
+ }
94
+
95
+ export declare function createArtifact(request: CreateArtifactRequest): Promise<Artifact>
96
+
97
+ export interface CreateArtifactRequest {
98
+ releaseId: string
99
+ filename: string
100
+ filetype: string
101
+ filesize: number
102
+ platform: string
103
+ arch: string
104
+ signature?: string
105
+ checksum?: string
106
+ metadata?: any
107
+ }
108
+
109
+ export declare function createComponent(request: CreateComponentRequest): Promise<Component>
110
+
111
+ export interface CreateComponentRequest {
112
+ fingerprint: string
113
+ name: string
114
+ metadata?: any
115
+ machineId: string
116
+ }
117
+
118
+ export declare function createEntitlement(request: CreateEntitlementRequest): Promise<Entitlement>
119
+
120
+ export interface CreateEntitlementRequest {
121
+ name?: string
122
+ code: string
123
+ metadata?: any
124
+ }
125
+
126
+ export declare function createEnvironment(request: CreateEnvironmentRequest): Promise<Environment>
127
+
128
+ export interface CreateEnvironmentRequest {
129
+ name: string
130
+ code: string
131
+ isolationStrategy?: string
132
+ }
133
+
134
+ export declare function createGroup(request: CreateGroupRequest): Promise<Group>
135
+
136
+ export interface CreateGroupRequest {
137
+ name: string
138
+ maxUsers?: number
139
+ maxLicenses?: number
140
+ maxMachines?: number
141
+ metadata?: any
142
+ }
143
+
144
+ export declare function createLicense(request: LicenseCreateRequest): Promise<License>
145
+
146
+ export declare function createMachine(request: MachineCreateRequest): Promise<Machine>
147
+
148
+ export declare function createPackage(request: CreatePackageRequest): Promise<Package>
149
+
150
+ export interface CreatePackageRequest {
151
+ productId: string
152
+ name: string
153
+ key: string
154
+ engine: string
155
+ metadata?: any
156
+ }
157
+
158
+ export declare function createPolicy(request: CreatePolicyRequest): Promise<Policy>
159
+
160
+ export interface CreatePolicyRequest {
161
+ productId: string
162
+ name: string
163
+ duration?: number
164
+ strict?: boolean
165
+ floating?: boolean
166
+ requireHeartbeat?: boolean
167
+ heartbeatDuration?: number
168
+ heartbeatCullStrategy?: string
169
+ heartbeatResurrectionStrategy?: string
170
+ heartbeatBasis?: string
171
+ machineUniquenessStrategy?: string
172
+ componentUniquenessStrategy?: string
173
+ machineMatchingStrategy?: string
174
+ componentMatchingStrategy?: string
175
+ expirationStrategy?: string
176
+ expirationBasis?: string
177
+ renewalBasis?: string
178
+ authenticationStrategy?: string
179
+ machineLeasingStrategy?: string
180
+ processLeasingStrategy?: string
181
+ overageStrategy?: string
182
+ transferStrategy?: string
183
+ maxMachines?: number
184
+ maxProcesses?: number
185
+ maxCores?: number
186
+ maxUses?: number
187
+ encrypted?: boolean
188
+ protected?: boolean
189
+ requireCheckIn?: boolean
190
+ checkInInterval?: string
191
+ checkInIntervalCount?: number
192
+ usePool?: boolean
193
+ maxLicenses?: number
194
+ maxUsers?: number
195
+ scheme?: string
196
+ metadata?: any
197
+ }
198
+
199
+ export declare function createProduct(request: CreateProductRequest): Promise<Product>
200
+
201
+ export interface CreateProductRequest {
202
+ name: string
203
+ code?: string
204
+ distributionStrategy?: string
205
+ url?: string
206
+ platforms?: Array<string>
207
+ permissions?: Array<string>
208
+ metadata?: any
209
+ }
210
+
211
+ export declare function createRelease(request: CreateReleaseRequest): Promise<Release>
212
+
213
+ export interface CreateReleaseRequest {
214
+ productId: string
215
+ version: string
216
+ name?: string
217
+ description?: string
218
+ channel?: string
219
+ status?: string
220
+ tag?: string
221
+ metadata?: any
222
+ }
223
+
224
+ export interface CreateTokenRequest {
225
+ name?: string
226
+ expiry?: string
227
+ permissions?: Array<string>
228
+ maxActivations?: number
229
+ maxDeactivations?: number
230
+ }
231
+
232
+ export interface CreateTokenRequest {
233
+ name?: string
234
+ expiry?: string
235
+ permissions?: Array<string>
236
+ metadata?: any
237
+ }
238
+
239
+ export interface CreateTokenRequest {
240
+ name?: string
241
+ expiry?: string
242
+ permissions?: Array<string>
243
+ metadata?: any
244
+ }
245
+
246
+ export declare function createUser(request: CreateUserRequest): Promise<User>
247
+
248
+ export interface CreateUserRequest {
249
+ email: string
250
+ firstName?: string
251
+ lastName?: string
252
+ role: string
253
+ permissions?: Array<string>
254
+ metadata?: any
255
+ }
256
+
257
+ export declare function createWebhookEndpoint(request: CreateWebhookEndpointRequest): Promise<WebhookEndpoint>
258
+
259
+ export interface CreateWebhookEndpointRequest {
260
+ url?: string
261
+ subscriptions?: Array<string>
262
+ signatureAlgorithm?: string
263
+ environmentId?: string
264
+ }
265
+
266
+ export interface DateWindowFilter {
267
+ in?: string
268
+ on?: string
269
+ before?: string
270
+ after?: string
271
+ }
272
+
273
+ export declare function deactivateMachine(id: string): Promise<void>
274
+
275
+ export declare function decrementLicenseUsage(id: string, decrement?: number | undefined | null): Promise<License>
276
+
277
+ export declare function decryptLicenseFile(certificate: string, key: string): LicenseFileDataset
278
+
279
+ export declare function decryptMachineFile(certificate: string, key: string): MachineFileDataset
280
+
281
+ export declare function deleteArtifact(id: string): Promise<void>
282
+
283
+ export declare function deleteComponent(id: string): Promise<void>
284
+
285
+ export declare function deleteEntitlement(id: string): Promise<void>
286
+
287
+ export declare function deleteEnvironment(id: string): Promise<void>
288
+
289
+ export declare function deleteGroup(id: string): Promise<void>
290
+
291
+ export declare function deleteLicense(id: string): Promise<void>
292
+
293
+ export declare function deletePackage(id: string): Promise<void>
294
+
295
+ export declare function deletePolicy(id: string): Promise<void>
296
+
297
+ export declare function deleteProduct(id: string): Promise<void>
298
+
299
+ export declare function deleteRelease(id: string): Promise<void>
300
+
301
+ export declare function deleteUser(id: string): Promise<void>
302
+
303
+ export declare function deleteWebhookEndpoint(id: string): Promise<void>
304
+
305
+ export declare function deleteWebhookEvent(id: string): Promise<void>
306
+
307
+ export declare function detachLicenseEntitlements(id: string, entitlementIds: Array<string>): Promise<void>
308
+
309
+ export declare function detachLicenseUsers(id: string, userIds: Array<string>): Promise<void>
310
+
311
+ export declare function detachPolicyEntitlements(id: string, entitlementIds: Array<string>): Promise<void>
312
+
313
+ export declare function detachReleaseConstraints(id: string, constraintIds: Array<string>): Promise<void>
314
+
315
+ export declare function downloadReleaseArtifact(id: string, artifact: string): Promise<ReleaseArtifactDownload>
316
+
317
+ export interface Entitlement {
318
+ id: string
319
+ name?: string
320
+ code: string
321
+ metadata?: any
322
+ created: string
323
+ updated: string
324
+ accountId?: string
325
+ }
326
+
327
+ export interface EntitlementPage {
328
+ data: Array<Entitlement>
329
+ meta?: any
330
+ links?: any
331
+ }
332
+
333
+ export interface Environment {
334
+ id: string
335
+ name: string
336
+ code: string
337
+ isolationStrategy: string
338
+ created: string
339
+ updated: string
340
+ accountId?: string
341
+ }
342
+
343
+ export interface EnvironmentToken {
344
+ id: string
345
+ token: string
346
+ name?: string
347
+ created: string
348
+ updated: string
349
+ accountId?: string
350
+ }
351
+
352
+ export declare function generateEnvironmentToken(id: string, name?: string | undefined | null, expiry?: string | undefined | null, permissions?: Array<string> | undefined | null): Promise<EnvironmentToken>
353
+
354
+ export declare function generateLicenseToken(id: string, request?: CreateTokenRequest | undefined | null): Promise<Token>
355
+
356
+ export declare function generateProductToken(id: string, request?: CreateTokenRequest | undefined | null): Promise<Token>
357
+
358
+ export declare function generateUserToken(id: string, request?: CreateTokenRequest | undefined | null): Promise<Token>
359
+
360
+ export declare function getArch(id: string): Promise<Arch>
361
+
362
+ export declare function getArtifact(id: string): Promise<Artifact>
363
+
364
+ export declare function getChannel(id: string): Promise<Channel>
365
+
366
+ export declare function getComponent(id: string): Promise<Component>
367
+
368
+ export declare function getConfig(): KeygenConfig
369
+
370
+ export declare function getEntitlement(id: string): Promise<Entitlement>
371
+
372
+ export declare function getEnvironment(id: string): Promise<Environment>
373
+
374
+ export declare function getGroup(id: string): Promise<Group>
375
+
376
+ export declare function getLicense(id: string): Promise<License>
377
+
378
+ export declare function getMachine(id: string): Promise<Machine>
379
+
380
+ export declare function getPackage(id: string): Promise<Package>
381
+
382
+ export declare function getPlatform(id: string): Promise<Platform>
383
+
384
+ export declare function getPolicy(id: string): Promise<Policy>
385
+
386
+ export declare function getProduct(id: string): Promise<Product>
387
+
388
+ export declare function getRelease(id: string): Promise<Release>
389
+
390
+ export declare function getServiceInfo(): Promise<ServiceInfo>
391
+
392
+ export declare function getToken(id: string): Promise<Token>
393
+
394
+ export declare function getUser(id: string): Promise<User>
395
+
396
+ export declare function getWebhookEndpoint(id: string): Promise<WebhookEndpoint>
397
+
398
+ export declare function getWebhookEvent(id: string): Promise<WebhookEvent>
399
+
400
+ export interface Group {
401
+ id: string
402
+ name: string
403
+ maxUsers?: number
404
+ maxLicenses?: number
405
+ maxMachines?: number
406
+ metadata?: any
407
+ created: string
408
+ updated: string
409
+ accountId?: string
410
+ ownerId?: string
411
+ }
412
+
413
+ export declare function incrementLicenseUsage(id: string, increment?: number | undefined | null): Promise<License>
414
+
415
+ export interface KeygenConfig {
416
+ account: string
417
+ product: string
418
+ licenseKey?: string
419
+ publicKey?: string
420
+ apiUrl?: string
421
+ apiVersion?: string
422
+ apiPrefix?: string
423
+ environment?: string
424
+ userAgent?: string
425
+ package?: string
426
+ platform?: string
427
+ maxClockDrift?: number
428
+ verifyKeygenSignature?: boolean
429
+ token?: string
430
+ }
431
+
432
+ export interface License {
433
+ id: string
434
+ scheme?: string
435
+ key: string
436
+ name?: string
437
+ expiry?: string
438
+ status?: string
439
+ uses?: number
440
+ version?: string
441
+ floating?: boolean
442
+ encrypted?: boolean
443
+ strict?: boolean
444
+ maxMachines?: number
445
+ maxCores?: number
446
+ maxUses?: number
447
+ maxProcesses?: number
448
+ maxUsers?: number
449
+ maxMemory?: number
450
+ maxDisk?: number
451
+ protected?: boolean
452
+ suspended?: boolean
453
+ requireHeartbeat?: boolean
454
+ requireCheckIn?: boolean
455
+ lastValidated?: string
456
+ lastCheckOut?: string
457
+ lastCheckIn?: string
458
+ nextCheckIn?: string
459
+ permissions?: Array<string>
460
+ policy?: string
461
+ metadata: any
462
+ accountId?: string
463
+ productId?: string
464
+ groupId?: string
465
+ ownerId?: string
466
+ environmentId?: string
467
+ created?: string
468
+ updated?: string
469
+ }
470
+
471
+ export interface LicenseActivityFilter {
472
+ inside?: string
473
+ outside?: string
474
+ before?: string
475
+ after?: string
476
+ }
477
+
478
+ export interface LicenseCreateRequest {
479
+ policyId: string
480
+ name?: string
481
+ key?: string
482
+ expiry?: string
483
+ maxMachines?: number
484
+ maxProcesses?: number
485
+ maxUsers?: number
486
+ maxCores?: number
487
+ maxUses?: number
488
+ maxMemory?: number
489
+ maxDisk?: number
490
+ protected?: boolean
491
+ suspended?: boolean
492
+ permissions?: Array<string>
493
+ metadata?: any
494
+ ownerId?: string
495
+ groupId?: string
496
+ }
497
+
498
+ export interface LicenseFile {
499
+ id: string
500
+ certificate: string
501
+ issued: string
502
+ expiry: string
503
+ ttl: number
504
+ }
505
+
506
+ export interface LicenseFileDataset {
507
+ license: License
508
+ issued: string
509
+ expiry: string
510
+ ttl: number
511
+ }
512
+
513
+ export declare function licenseFileFromCert(key: string, content: string): LicenseFile
514
+
515
+ export interface LicensePage {
516
+ data: Array<License>
517
+ meta?: any
518
+ links?: any
519
+ }
520
+
521
+ export interface LicenseRelationshipListOptions {
522
+ limit?: number
523
+ pageSize?: number
524
+ pageCursor?: string
525
+ }
526
+
527
+ export interface LicenseValidationMeta {
528
+ ts: string
529
+ valid: boolean
530
+ detail: string
531
+ code: string
532
+ scope: LicenseValidationScope
533
+ nonce?: number
534
+ }
535
+
536
+ export interface LicenseValidationRequest {
537
+ nonce?: number
538
+ scope: LicenseValidationScope
539
+ }
540
+
541
+ export interface LicenseValidationResult {
542
+ license?: License
543
+ meta: LicenseValidationMeta
544
+ }
545
+
546
+ export interface LicenseValidationScope {
547
+ product?: string
548
+ policy?: string
549
+ fingerprints?: Array<string>
550
+ fingerprint?: string
551
+ components?: Array<string>
552
+ machine?: string
553
+ user?: string
554
+ entitlements?: Array<string>
555
+ checksum?: string
556
+ version?: string
557
+ }
558
+
559
+ export declare function listArches(options?: ListArchesOptions | undefined | null): Promise<Array<Arch>>
560
+
561
+ export interface ListArchesOptions {
562
+ limit?: number
563
+ pageSize?: number
564
+ pageNumber?: number
565
+ }
566
+
567
+ export declare function listArtifacts(options?: ListArtifactsOptions | undefined | null): Promise<Array<Artifact>>
568
+
569
+ export interface ListArtifactsOptions {
570
+ limit?: number
571
+ pageSize?: number
572
+ pageNumber?: number
573
+ release?: string
574
+ product?: string
575
+ channel?: string
576
+ platform?: string
577
+ arch?: string
578
+ filetype?: string
579
+ status?: string
580
+ }
581
+
582
+ export declare function listChannels(options?: ListChannelsOptions | undefined | null): Promise<Array<Channel>>
583
+
584
+ export interface ListChannelsOptions {
585
+ limit?: number
586
+ pageSize?: number
587
+ pageNumber?: number
588
+ }
589
+
590
+ export declare function listComponents(options?: ListComponentsOptions | undefined | null): Promise<Array<Component>>
591
+
592
+ export interface ListComponentsOptions {
593
+ limit?: number
594
+ pageSize?: number
595
+ pageNumber?: number
596
+ machine?: string
597
+ license?: string
598
+ owner?: string
599
+ user?: string
600
+ product?: string
601
+ }
602
+
603
+ export declare function listEntitlements(options?: ListEntitlementsOptions | undefined | null): Promise<Array<Entitlement>>
604
+
605
+ export interface ListEntitlementsOptions {
606
+ limit?: number
607
+ pageSize?: number
608
+ pageNumber?: number
609
+ }
610
+
611
+ export declare function listEnvironments(options?: ListEnvironmentsOptions | undefined | null): Promise<Array<Environment>>
612
+
613
+ export interface ListEnvironmentsOptions {
614
+ limit?: number
615
+ pageSize?: number
616
+ pageNumber?: number
617
+ }
618
+
619
+ export declare function listGroupLicenses(id: string): Promise<Array<License>>
620
+
621
+ export declare function listGroupMachines(id: string): Promise<Array<Machine>>
622
+
623
+ export declare function listGroupOwners(id: string): Promise<Array<User>>
624
+
625
+ export declare function listGroups(options?: ListGroupsOptions | undefined | null): Promise<Array<Group>>
626
+
627
+ export interface ListGroupsOptions {
628
+ limit?: number
629
+ pageSize?: number
630
+ pageNumber?: number
631
+ }
632
+
633
+ export declare function listGroupUsers(id: string): Promise<Array<User>>
634
+
635
+ export declare function listLicenseEntitlements(id: string, options?: LicenseRelationshipListOptions | undefined | null): Promise<EntitlementPage>
636
+
637
+ export declare function listLicenses(options?: ListLicensesOptions | undefined | null): Promise<LicensePage>
638
+
639
+ export interface ListLicensesOptions {
640
+ limit?: number
641
+ pageSize?: number
642
+ pageCursor?: string
643
+ status?: string
644
+ product?: string
645
+ policy?: string
646
+ owner?: string
647
+ user?: string
648
+ group?: string
649
+ machine?: string
650
+ assigned?: boolean
651
+ unassigned?: boolean
652
+ activated?: boolean
653
+ metadata?: any
654
+ activations?: NumericFilter
655
+ expires?: DateWindowFilter
656
+ expired?: DateWindowFilter
657
+ activity?: LicenseActivityFilter
658
+ }
659
+
660
+ export declare function listLicenseUsers(id: string, options?: LicenseRelationshipListOptions | undefined | null): Promise<UserPage>
661
+
662
+ export declare function listMachines(options?: ListMachinesOptions | undefined | null): Promise<Array<Machine>>
663
+
664
+ export interface ListMachinesOptions {
665
+ limit?: number
666
+ pageSize?: number
667
+ pageNumber?: number
668
+ license?: string
669
+ user?: string
670
+ platform?: string
671
+ name?: string
672
+ fingerprint?: string
673
+ ip?: string
674
+ hostname?: string
675
+ product?: string
676
+ owner?: string
677
+ group?: string
678
+ policy?: string
679
+ key?: string
680
+ metadata?: any
681
+ }
682
+
683
+ export declare function listPackages(options?: ListPackagesOptions | undefined | null): Promise<Array<Package>>
684
+
685
+ export interface ListPackagesOptions {
686
+ limit?: number
687
+ pageSize?: number
688
+ pageNumber?: number
689
+ product?: string
690
+ engine?: string
691
+ }
692
+
693
+ export declare function listPlatforms(options?: ListPlatformsOptions | undefined | null): Promise<Array<Platform>>
694
+
695
+ export interface ListPlatformsOptions {
696
+ limit?: number
697
+ pageSize?: number
698
+ pageNumber?: number
699
+ }
700
+
701
+ export declare function listPolicies(options?: ListPoliciesOptions | undefined | null): Promise<Array<Policy>>
702
+
703
+ export interface ListPoliciesOptions {
704
+ limit?: number
705
+ pageSize?: number
706
+ pageNumber?: number
707
+ product?: string
708
+ }
709
+
710
+ export declare function listPolicyEntitlements(id: string): Promise<Array<Entitlement>>
711
+
712
+ export declare function listProducts(options?: ListProductsOptions | undefined | null): Promise<Array<Product>>
713
+
714
+ export interface ListProductsOptions {
715
+ limit?: number
716
+ pageSize?: number
717
+ pageNumber?: number
718
+ }
719
+
720
+ export declare function listReleases(options?: ListReleasesOptions | undefined | null): Promise<Array<Release>>
721
+
722
+ export interface ListReleasesOptions {
723
+ limit?: number
724
+ pageSize?: number
725
+ pageNumber?: number
726
+ channel?: string
727
+ status?: string
728
+ product?: string
729
+ package?: string
730
+ engine?: string
731
+ entitlements?: Array<string>
732
+ }
733
+
734
+ export declare function listTokens(options?: ListTokensOptions | undefined | null): Promise<Array<Token>>
735
+
736
+ export interface ListTokensOptions {
737
+ limit?: number
738
+ pageSize?: number
739
+ pageNumber?: number
740
+ bearerType?: string
741
+ bearerId?: string
742
+ }
743
+
744
+ export declare function listUsers(options?: ListUsersOptions | undefined | null): Promise<Array<User>>
745
+
746
+ export interface ListUsersOptions {
747
+ limit?: number
748
+ pageSize?: number
749
+ pageNumber?: number
750
+ role?: string
751
+ status?: string
752
+ assigned?: boolean
753
+ product?: string
754
+ group?: string
755
+ metadata?: any
756
+ }
757
+
758
+ export declare function listWebhookEndpoints(options?: ListWebhookEndpointsOptions | undefined | null): Promise<Array<WebhookEndpoint>>
759
+
760
+ export interface ListWebhookEndpointsOptions {
761
+ limit?: number
762
+ pageSize?: number
763
+ pageNumber?: number
764
+ }
765
+
766
+ export declare function listWebhookEvents(options?: ListWebhookEventsOptions | undefined | null): Promise<Array<WebhookEvent>>
767
+
768
+ export interface ListWebhookEventsOptions {
769
+ limit?: number
770
+ pageSize?: number
771
+ pageNumber?: number
772
+ eventType?: string
773
+ status?: string
774
+ }
775
+
776
+ export interface Machine {
777
+ id: string
778
+ fingerprint: string
779
+ name?: string
780
+ platform?: string
781
+ hostname?: string
782
+ ip?: string
783
+ cores?: number
784
+ metadata?: any
785
+ requireHeartbeat: boolean
786
+ heartbeatStatus: string
787
+ heartbeatDuration?: number
788
+ created: string
789
+ updated: string
790
+ accountId?: string
791
+ environmentId?: string
792
+ productId?: string
793
+ licenseId?: string
794
+ ownerId?: string
795
+ groupId?: string
796
+ }
797
+
798
+ export interface MachineCheckoutOpts {
799
+ ttl?: number
800
+ include?: Array<string>
801
+ }
802
+
803
+ export interface MachineCreateRequest {
804
+ fingerprint: string
805
+ licenseId: string
806
+ name?: string
807
+ platform?: string
808
+ hostname?: string
809
+ ip?: string
810
+ cores?: number
811
+ metadata?: any
812
+ }
813
+
814
+ export interface MachineFile {
815
+ id: string
816
+ certificate: string
817
+ issued: string
818
+ expiry: string
819
+ ttl: number
820
+ }
821
+
822
+ export interface MachineFileDataset {
823
+ license: License
824
+ machine: Machine
825
+ issued: string
826
+ expiry: string
827
+ ttl: number
828
+ }
829
+
830
+ export declare function machineFileFromCert(key: string, content: string): MachineFile
831
+
832
+ export interface MachineUpdateRequest {
833
+ name?: string
834
+ platform?: string
835
+ hostname?: string
836
+ ip?: string
837
+ cores?: number
838
+ metadata?: any
839
+ }
840
+
841
+ export interface NumericFilter {
842
+ eq?: number
843
+ gt?: number
844
+ gte?: number
845
+ lt?: number
846
+ lte?: number
847
+ }
848
+
849
+ export interface Package {
850
+ id: string
851
+ name: string
852
+ key: string
853
+ engine: string
854
+ metadata?: any
855
+ created: string
856
+ updated: string
857
+ productId?: string
858
+ accountId?: string
859
+ environmentId?: string
860
+ }
861
+
862
+ export declare function ping(): Promise<PingResponse>
863
+
864
+ export declare function pingMachine(id: string): Promise<Machine>
865
+
866
+ export interface PingResponse {
867
+ message: string
868
+ version?: string
869
+ timestamp?: string
870
+ }
871
+
872
+ export interface Platform {
873
+ id: string
874
+ name?: string
875
+ key: string
876
+ created: string
877
+ updated: string
878
+ accountId?: string
879
+ }
880
+
881
+ export interface Policy {
882
+ id: string
883
+ name: string
884
+ duration?: number
885
+ strict: boolean
886
+ floating: boolean
887
+ requireHeartbeat: boolean
888
+ heartbeatDuration?: number
889
+ heartbeatCullStrategy?: string
890
+ heartbeatResurrectionStrategy?: string
891
+ heartbeatBasis?: string
892
+ machineUniquenessStrategy?: string
893
+ componentUniquenessStrategy?: string
894
+ machineMatchingStrategy?: string
895
+ componentMatchingStrategy?: string
896
+ expirationStrategy?: string
897
+ expirationBasis?: string
898
+ renewalBasis?: string
899
+ authenticationStrategy?: string
900
+ machineLeasingStrategy?: string
901
+ processLeasingStrategy?: string
902
+ overageStrategy?: string
903
+ transferStrategy?: string
904
+ maxMachines?: number
905
+ maxProcesses?: number
906
+ maxCores?: number
907
+ maxUses?: number
908
+ encrypted: boolean
909
+ protected: boolean
910
+ requireCheckIn: boolean
911
+ checkInInterval?: string
912
+ checkInIntervalCount?: number
913
+ usePool: boolean
914
+ maxLicenses?: number
915
+ maxUsers?: number
916
+ scheme?: string
917
+ metadata?: any
918
+ created: string
919
+ updated: string
920
+ accountId?: string
921
+ productId?: string
922
+ }
923
+
924
+ export interface Product {
925
+ id: string
926
+ name: string
927
+ code?: string
928
+ distributionStrategy?: string
929
+ url?: string
930
+ platforms?: Array<string>
931
+ permissions?: Array<string>
932
+ metadata?: any
933
+ created: string
934
+ updated: string
935
+ accountId?: string
936
+ }
937
+
938
+ export declare function publishRelease(id: string): Promise<Release>
939
+
940
+ export declare function regenerateToken(id: string, request: RegenerateTokenRequest): Promise<Token>
941
+
942
+ export interface RegenerateTokenRequest {
943
+ name?: string
944
+ expiry?: string
945
+ permissions?: Array<string>
946
+ metadata?: any
947
+ }
948
+
949
+ export declare function reinstateLicense(id: string): Promise<License>
950
+
951
+ export interface Release {
952
+ id: string
953
+ name?: string
954
+ description?: string
955
+ version: string
956
+ channel?: string
957
+ status: string
958
+ tag?: string
959
+ metadata?: any
960
+ created: string
961
+ updated: string
962
+ yankedAt?: string
963
+ productId?: string
964
+ packageId?: string
965
+ accountId?: string
966
+ }
967
+
968
+ export interface ReleaseArtifactDownload {
969
+ location: string
970
+ }
971
+
972
+ export declare function releaseArtifacts(id: string, options?: ListArtifactsOptions | undefined | null): Promise<Array<Artifact>>
973
+
974
+ export declare function releaseConstraints(id: string): Promise<Array<Constraint>>
975
+
976
+ export interface ReleaseUpgradeRequest {
977
+ product?: string
978
+ constraint?: string
979
+ package?: string
980
+ channel?: string
981
+ }
982
+
983
+ export declare function renewLicense(id: string): Promise<License>
984
+
985
+ export declare function resetConfig(): void
986
+
987
+ export declare function resetLicenseUsage(id: string): Promise<License>
988
+
989
+ export declare function resetMachine(id: string): Promise<Machine>
990
+
991
+ export interface ResetPasswordRequest {
992
+ passwordResetToken: string
993
+ newPassword: string
994
+ }
995
+
996
+ export declare function resetUserPassword(id: string, request: ResetPasswordRequest): Promise<User>
997
+
998
+ export declare function retryWebhookEvent(id: string): Promise<WebhookEvent>
999
+
1000
+ export declare function revokeLicense(id: string): Promise<void>
1001
+
1002
+ export declare function revokeToken(id: string): Promise<void>
1003
+
1004
+ export interface ServiceInfo {
1005
+ timestamp?: string
1006
+ apiVersion?: string
1007
+ message?: string
1008
+ headers: any
1009
+ }
1010
+
1011
+ export declare function setConfig(config: KeygenConfig): void
1012
+
1013
+ export declare function suspendLicense(id: string): Promise<License>
1014
+
1015
+ export interface Token {
1016
+ id: string
1017
+ kind: string
1018
+ token?: string
1019
+ name?: string
1020
+ expiry?: string
1021
+ permissions?: Array<string>
1022
+ maxActivations?: number
1023
+ activations?: number
1024
+ maxDeactivations?: number
1025
+ deactivations?: number
1026
+ created: string
1027
+ updated: string
1028
+ }
1029
+
1030
+ export declare function unbanUser(id: string): Promise<User>
1031
+
1032
+ export declare function updateArtifact(id: string, request: UpdateArtifactRequest): Promise<Artifact>
1033
+
1034
+ export interface UpdateArtifactRequest {
1035
+ filename?: string
1036
+ filetype?: string
1037
+ platform?: string
1038
+ arch?: string
1039
+ signature?: string
1040
+ checksum?: string
1041
+ metadata?: any
1042
+ }
1043
+
1044
+ export declare function updateComponent(id: string, request: UpdateComponentRequest): Promise<Component>
1045
+
1046
+ export interface UpdateComponentRequest {
1047
+ name?: string
1048
+ metadata?: any
1049
+ }
1050
+
1051
+ export declare function updateEntitlement(id: string, request: UpdateEntitlementRequest): Promise<Entitlement>
1052
+
1053
+ export interface UpdateEntitlementRequest {
1054
+ name?: string
1055
+ code?: string
1056
+ metadata?: any
1057
+ }
1058
+
1059
+ export declare function updateEnvironment(id: string, request: UpdateEnvironmentRequest): Promise<Environment>
1060
+
1061
+ export interface UpdateEnvironmentRequest {
1062
+ name?: string
1063
+ code?: string
1064
+ }
1065
+
1066
+ export declare function updateGroup(id: string, request: UpdateGroupRequest): Promise<Group>
1067
+
1068
+ export interface UpdateGroupRequest {
1069
+ name?: string
1070
+ maxUsers?: number
1071
+ maxLicenses?: number
1072
+ maxMachines?: number
1073
+ metadata?: any
1074
+ }
1075
+
1076
+ /**
1077
+ * Update a license. Clearable integer fields accept `number | null`:
1078
+ * - `undefined` / absent → keep unchanged
1079
+ * - `null` → clear (set to null)
1080
+ * - `number` → set to value
1081
+ */
1082
+ export declare function updateLicense(id: string, request: { name?: string | null; expiry?: string | null; maxMachines?: number | null; maxProcesses?: number | null; maxUsers?: number | null; maxCores?: number | null; maxUses?: number | null; maxMemory?: number | null; maxDisk?: number | null; protected?: boolean; suspended?: boolean; permissions?: string[]; metadata?: any }): Promise<License>
1083
+
1084
+ export declare function updateMachine(id: string, request: MachineUpdateRequest): Promise<Machine>
1085
+
1086
+ export declare function updatePackage(id: string, request: UpdatePackageRequest): Promise<Package>
1087
+
1088
+ export interface UpdatePackageRequest {
1089
+ name?: string
1090
+ key?: string
1091
+ metadata?: any
1092
+ }
1093
+
1094
+ export interface UpdatePasswordRequest {
1095
+ oldPassword?: string
1096
+ newPassword: string
1097
+ }
1098
+
1099
+ export declare function updatePolicy(id: string, request: UpdatePolicyRequest): Promise<Policy>
1100
+
1101
+ export interface UpdatePolicyRequest {
1102
+ name?: string
1103
+ duration?: number
1104
+ strict?: boolean
1105
+ floating?: boolean
1106
+ requireHeartbeat?: boolean
1107
+ heartbeatDuration?: number
1108
+ heartbeatCullStrategy?: string
1109
+ heartbeatResurrectionStrategy?: string
1110
+ heartbeatBasis?: string
1111
+ machineUniquenessStrategy?: string
1112
+ componentUniquenessStrategy?: string
1113
+ machineMatchingStrategy?: string
1114
+ componentMatchingStrategy?: string
1115
+ expirationStrategy?: string
1116
+ expirationBasis?: string
1117
+ renewalBasis?: string
1118
+ authenticationStrategy?: string
1119
+ machineLeasingStrategy?: string
1120
+ processLeasingStrategy?: string
1121
+ overageStrategy?: string
1122
+ transferStrategy?: string
1123
+ maxMachines?: number
1124
+ maxProcesses?: number
1125
+ maxCores?: number
1126
+ maxUses?: number
1127
+ protected?: boolean
1128
+ requireCheckIn?: boolean
1129
+ checkInInterval?: string
1130
+ checkInIntervalCount?: number
1131
+ maxUsers?: number
1132
+ scheme?: string
1133
+ metadata?: any
1134
+ }
1135
+
1136
+ export declare function updateProduct(id: string, request: UpdateProductRequest): Promise<Product>
1137
+
1138
+ export interface UpdateProductRequest {
1139
+ name?: string
1140
+ code?: string
1141
+ distributionStrategy?: string
1142
+ url?: string
1143
+ platforms?: Array<string>
1144
+ permissions?: Array<string>
1145
+ metadata?: any
1146
+ }
1147
+
1148
+ export declare function updateRelease(id: string, request: UpdateReleaseRequest): Promise<Release>
1149
+
1150
+ export interface UpdateReleaseRequest {
1151
+ name?: string
1152
+ description?: string
1153
+ channel?: string
1154
+ tag?: string
1155
+ metadata?: any
1156
+ }
1157
+
1158
+ export declare function updateUser(id: string, request: UpdateUserRequest): Promise<User>
1159
+
1160
+ export declare function updateUserPassword(id: string, request: UpdatePasswordRequest): Promise<User>
1161
+
1162
+ export interface UpdateUserRequest {
1163
+ email?: string
1164
+ firstName?: string
1165
+ lastName?: string
1166
+ role?: string
1167
+ metadata?: any
1168
+ }
1169
+
1170
+ export declare function updateWebhookEndpoint(id: string, request: UpdateWebhookEndpointRequest): Promise<WebhookEndpoint>
1171
+
1172
+ export interface UpdateWebhookEndpointRequest {
1173
+ url?: string
1174
+ subscriptions?: Array<string>
1175
+ signatureAlgorithm?: string
1176
+ }
1177
+
1178
+ export declare function upgradeRelease(id: string, request?: ReleaseUpgradeRequest | undefined | null): Promise<Release>
1179
+
1180
+ export interface User {
1181
+ id: string
1182
+ email: string
1183
+ firstName?: string
1184
+ lastName?: string
1185
+ fullName?: string
1186
+ status: string
1187
+ role: string
1188
+ permissions?: Array<string>
1189
+ metadata?: any
1190
+ lastSeenAt?: string
1191
+ banReason?: string
1192
+ created: string
1193
+ updated: string
1194
+ accountId?: string
1195
+ }
1196
+
1197
+ export interface UserPage {
1198
+ data: Array<User>
1199
+ meta?: any
1200
+ links?: any
1201
+ }
1202
+
1203
+ export declare function validate(request: LicenseValidationRequest): Promise<LicenseValidationResult>
1204
+
1205
+ export declare function verify(scheme: string, signedKey: string): Buffer
1206
+
1207
+ export declare function verifyLicenseFile(certificate: string): void
1208
+
1209
+ export declare function verifyMachineFile(certificate: string): void
1210
+
1211
+ export interface WebhookEndpoint {
1212
+ id: string
1213
+ url: string
1214
+ subscriptions: Array<string>
1215
+ signatureAlgorithm: string
1216
+ created: string
1217
+ updated: string
1218
+ accountId?: string
1219
+ environmentId?: string
1220
+ }
1221
+
1222
+ export interface WebhookEvent {
1223
+ id: string
1224
+ endpoint: string
1225
+ payload: any
1226
+ event: string
1227
+ status: string
1228
+ lastResponseCode?: number
1229
+ lastResponseBody?: string
1230
+ created: string
1231
+ updated: string
1232
+ accountId?: string
1233
+ }
1234
+
1235
+ export declare function yankArtifact(id: string): Promise<Artifact>
1236
+
1237
+ export declare function yankRelease(id: string): Promise<Release>