@dfns/sdk 0.4.1 → 0.4.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.
@@ -0,0 +1,1983 @@
1
+ export type ActivateApplicationParams = {
2
+ appId: string;
3
+ };
4
+ export type ActivateApplicationResponse = {
5
+ appId: string;
6
+ kind: "ServerSideApplication" | "ClientSideApplication";
7
+ orgId: string;
8
+ expectedRpId: string;
9
+ name: string;
10
+ isActive: boolean;
11
+ expectedOrigin: string;
12
+ permissionAssignments: {
13
+ permissionName: string;
14
+ permissionId: string;
15
+ assignmentId: string;
16
+ operations?: string[] | undefined;
17
+ }[];
18
+ accessTokens: {
19
+ accessToken?: string | undefined;
20
+ dateCreated: string;
21
+ credId: string;
22
+ isActive: boolean;
23
+ kind: "ServiceAccount" | "Pat" | "Application";
24
+ linkedUserId: string;
25
+ linkedAppId: string;
26
+ name: string;
27
+ orgId: string;
28
+ permissionAssignments: {
29
+ permissionName: string;
30
+ permissionId: string;
31
+ assignmentId: string;
32
+ operations?: string[] | undefined;
33
+ }[];
34
+ publicKey: string;
35
+ tokenId: string;
36
+ }[];
37
+ };
38
+ export type ActivateApplicationRequest = ActivateApplicationParams;
39
+ export type ActivateCredentialBody = {
40
+ credentialUuid: string;
41
+ };
42
+ export type ActivateCredentialResponse = {
43
+ message: string;
44
+ };
45
+ export type ActivateCredentialRequest = {
46
+ body: ActivateCredentialBody;
47
+ };
48
+ export type ActivatePersonalAccessTokenParams = {
49
+ tokenId: string;
50
+ };
51
+ export type ActivatePersonalAccessTokenResponse = {
52
+ accessToken?: string | undefined;
53
+ dateCreated: string;
54
+ credId: string;
55
+ isActive: boolean;
56
+ kind: "ServiceAccount" | "Pat" | "Application";
57
+ linkedUserId: string;
58
+ linkedAppId: string;
59
+ name: string;
60
+ orgId: string;
61
+ permissionAssignments: {
62
+ permissionName: string;
63
+ permissionId: string;
64
+ assignmentId: string;
65
+ operations?: string[] | undefined;
66
+ }[];
67
+ publicKey: string;
68
+ tokenId: string;
69
+ };
70
+ export type ActivatePersonalAccessTokenRequest = ActivatePersonalAccessTokenParams;
71
+ export type ActivateServiceAccountParams = {
72
+ serviceAccountId: string;
73
+ };
74
+ export type ActivateServiceAccountResponse = {
75
+ userInfo: {
76
+ username: string;
77
+ userId: string;
78
+ kind: "EndUser" | "CustomerEmployee" | "DfnsStaff";
79
+ credentialUuid: string;
80
+ orgId: string;
81
+ permissions?: string[] | undefined;
82
+ scopes?: string[] | undefined;
83
+ isActive: boolean;
84
+ isServiceAccount: boolean;
85
+ isRegistered: boolean;
86
+ permissionAssignments: {
87
+ permissionName: string;
88
+ permissionId: string;
89
+ assignmentId: string;
90
+ operations?: string[] | undefined;
91
+ }[];
92
+ };
93
+ accessTokens: {
94
+ accessToken?: string | undefined;
95
+ dateCreated: string;
96
+ credId: string;
97
+ isActive: boolean;
98
+ kind: "ServiceAccount" | "Pat" | "Application";
99
+ linkedUserId: string;
100
+ linkedAppId: string;
101
+ name: string;
102
+ orgId: string;
103
+ permissionAssignments: {
104
+ permissionName: string;
105
+ permissionId: string;
106
+ assignmentId: string;
107
+ operations?: string[] | undefined;
108
+ }[];
109
+ publicKey: string;
110
+ tokenId: string;
111
+ }[];
112
+ };
113
+ export type ActivateServiceAccountRequest = ActivateServiceAccountParams;
114
+ export type ActivateUserParams = {
115
+ userId: string;
116
+ };
117
+ export type ActivateUserResponse = {
118
+ username: string;
119
+ userId: string;
120
+ kind: "EndUser" | "CustomerEmployee" | "DfnsStaff";
121
+ credentialUuid: string;
122
+ orgId: string;
123
+ permissions?: string[] | undefined;
124
+ scopes?: string[] | undefined;
125
+ isActive: boolean;
126
+ isServiceAccount: boolean;
127
+ isRegistered: boolean;
128
+ permissionAssignments: {
129
+ permissionName: string;
130
+ permissionId: string;
131
+ assignmentId: string;
132
+ operations?: string[] | undefined;
133
+ }[];
134
+ };
135
+ export type ActivateUserRequest = ActivateUserParams;
136
+ export type ArchiveApplicationParams = {
137
+ appId: string;
138
+ };
139
+ export type ArchiveApplicationResponse = {
140
+ appId: string;
141
+ kind: "ServerSideApplication" | "ClientSideApplication";
142
+ orgId: string;
143
+ expectedRpId: string;
144
+ name: string;
145
+ isActive: boolean;
146
+ expectedOrigin: string;
147
+ permissionAssignments: {
148
+ permissionName: string;
149
+ permissionId: string;
150
+ assignmentId: string;
151
+ operations?: string[] | undefined;
152
+ }[];
153
+ accessTokens: {
154
+ accessToken?: string | undefined;
155
+ dateCreated: string;
156
+ credId: string;
157
+ isActive: boolean;
158
+ kind: "ServiceAccount" | "Pat" | "Application";
159
+ linkedUserId: string;
160
+ linkedAppId: string;
161
+ name: string;
162
+ orgId: string;
163
+ permissionAssignments: {
164
+ permissionName: string;
165
+ permissionId: string;
166
+ assignmentId: string;
167
+ operations?: string[] | undefined;
168
+ }[];
169
+ publicKey: string;
170
+ tokenId: string;
171
+ }[];
172
+ };
173
+ export type ArchiveApplicationRequest = ArchiveApplicationParams;
174
+ export type ArchivePersonalAccessTokenParams = {
175
+ tokenId: string;
176
+ };
177
+ export type ArchivePersonalAccessTokenResponse = {
178
+ accessToken?: string | undefined;
179
+ dateCreated: string;
180
+ credId: string;
181
+ isActive: boolean;
182
+ kind: "ServiceAccount" | "Pat" | "Application";
183
+ linkedUserId: string;
184
+ linkedAppId: string;
185
+ name: string;
186
+ orgId: string;
187
+ permissionAssignments: {
188
+ permissionName: string;
189
+ permissionId: string;
190
+ assignmentId: string;
191
+ operations?: string[] | undefined;
192
+ }[];
193
+ publicKey: string;
194
+ tokenId: string;
195
+ };
196
+ export type ArchivePersonalAccessTokenRequest = ArchivePersonalAccessTokenParams;
197
+ export type ArchiveServiceAccountParams = {
198
+ serviceAccountId: string;
199
+ };
200
+ export type ArchiveServiceAccountResponse = {
201
+ userInfo: {
202
+ username: string;
203
+ userId: string;
204
+ kind: "EndUser" | "CustomerEmployee" | "DfnsStaff";
205
+ credentialUuid: string;
206
+ orgId: string;
207
+ permissions?: string[] | undefined;
208
+ scopes?: string[] | undefined;
209
+ isActive: boolean;
210
+ isServiceAccount: boolean;
211
+ isRegistered: boolean;
212
+ permissionAssignments: {
213
+ permissionName: string;
214
+ permissionId: string;
215
+ assignmentId: string;
216
+ operations?: string[] | undefined;
217
+ }[];
218
+ };
219
+ accessTokens: {
220
+ accessToken?: string | undefined;
221
+ dateCreated: string;
222
+ credId: string;
223
+ isActive: boolean;
224
+ kind: "ServiceAccount" | "Pat" | "Application";
225
+ linkedUserId: string;
226
+ linkedAppId: string;
227
+ name: string;
228
+ orgId: string;
229
+ permissionAssignments: {
230
+ permissionName: string;
231
+ permissionId: string;
232
+ assignmentId: string;
233
+ operations?: string[] | undefined;
234
+ }[];
235
+ publicKey: string;
236
+ tokenId: string;
237
+ }[];
238
+ };
239
+ export type ArchiveServiceAccountRequest = ArchiveServiceAccountParams;
240
+ export type ArchiveUserParams = {
241
+ userId: string;
242
+ };
243
+ export type ArchiveUserResponse = {
244
+ username: string;
245
+ userId: string;
246
+ kind: "EndUser" | "CustomerEmployee" | "DfnsStaff";
247
+ credentialUuid: string;
248
+ orgId: string;
249
+ permissions?: string[] | undefined;
250
+ scopes?: string[] | undefined;
251
+ isActive: boolean;
252
+ isServiceAccount: boolean;
253
+ isRegistered: boolean;
254
+ permissionAssignments: {
255
+ permissionName: string;
256
+ permissionId: string;
257
+ assignmentId: string;
258
+ operations?: string[] | undefined;
259
+ }[];
260
+ };
261
+ export type ArchiveUserRequest = ArchiveUserParams;
262
+ export type CreateApplicationBody = {
263
+ name: string;
264
+ relyingPartyId: string;
265
+ origin: string;
266
+ permissionId?: string | undefined;
267
+ externalId?: string | undefined;
268
+ kind: "ClientSideApplication";
269
+ } | {
270
+ name: string;
271
+ relyingPartyId: string;
272
+ origin: string;
273
+ permissionId?: string | undefined;
274
+ externalId?: string | undefined;
275
+ kind: "ServerSideApplication";
276
+ publicKey: string;
277
+ daysValid?: number | undefined;
278
+ };
279
+ export type CreateApplicationResponse = {
280
+ appId: string;
281
+ kind: "ServerSideApplication" | "ClientSideApplication";
282
+ orgId: string;
283
+ expectedRpId: string;
284
+ name: string;
285
+ isActive: boolean;
286
+ expectedOrigin: string;
287
+ permissionAssignments: {
288
+ permissionName: string;
289
+ permissionId: string;
290
+ assignmentId: string;
291
+ operations?: string[] | undefined;
292
+ }[];
293
+ accessTokens: {
294
+ accessToken?: string | undefined;
295
+ dateCreated: string;
296
+ credId: string;
297
+ isActive: boolean;
298
+ kind: "ServiceAccount" | "Pat" | "Application";
299
+ linkedUserId: string;
300
+ linkedAppId: string;
301
+ name: string;
302
+ orgId: string;
303
+ permissionAssignments: {
304
+ permissionName: string;
305
+ permissionId: string;
306
+ assignmentId: string;
307
+ operations?: string[] | undefined;
308
+ }[];
309
+ publicKey: string;
310
+ tokenId: string;
311
+ }[];
312
+ };
313
+ export type CreateApplicationRequest = {
314
+ body: CreateApplicationBody;
315
+ };
316
+ export type CreateCredentialBody = {
317
+ credentialKind: "Fido2";
318
+ credentialInfo: {
319
+ credId: string;
320
+ clientData: string;
321
+ attestationData: string;
322
+ };
323
+ credentialName: string;
324
+ challengeIdentifier: string;
325
+ } | {
326
+ credentialKind: "Key";
327
+ credentialInfo: {
328
+ credId: string;
329
+ clientData: string;
330
+ attestationData: string;
331
+ };
332
+ credentialName: string;
333
+ challengeIdentifier: string;
334
+ } | {
335
+ credentialKind: "Password";
336
+ credentialInfo: {
337
+ password: string;
338
+ };
339
+ credentialName: string;
340
+ challengeIdentifier: string;
341
+ } | {
342
+ credentialKind: "Totp";
343
+ credentialInfo: {
344
+ otpCode: string;
345
+ };
346
+ credentialName: string;
347
+ challengeIdentifier: string;
348
+ } | {
349
+ credentialKind: "RecoveryKey";
350
+ credentialInfo: {
351
+ credId: string;
352
+ clientData: string;
353
+ attestationData: string;
354
+ };
355
+ encryptedPrivateKey?: string | undefined;
356
+ credentialName: string;
357
+ challengeIdentifier: string;
358
+ };
359
+ export type CreateCredentialResponse = {
360
+ kind: "Fido2" | "Key" | "Password" | "Totp" | "RecoveryKey";
361
+ credentialId: string;
362
+ credentialUuid: string;
363
+ dateCreated: string;
364
+ isActive: boolean;
365
+ name: string;
366
+ publicKey: string;
367
+ relyingPartyId: string;
368
+ origin: string;
369
+ };
370
+ export type CreateCredentialRequest = {
371
+ body: CreateCredentialBody;
372
+ };
373
+ export type CreateCredentialChallengeBody = {
374
+ kind: "Fido2" | "Key" | "Password" | "Totp" | "RecoveryKey";
375
+ };
376
+ export type CreateCredentialChallengeResponse = {
377
+ kind: "Password";
378
+ user: {
379
+ id: string;
380
+ displayName: string;
381
+ name: string;
382
+ };
383
+ challengeIdentifier: string;
384
+ rp: {
385
+ id: string;
386
+ name: string;
387
+ };
388
+ /** @deprecated use challengeIdentifier instead */
389
+ temporaryAuthenticationToken: string;
390
+ } | {
391
+ kind: "Totp";
392
+ user: {
393
+ id: string;
394
+ displayName: string;
395
+ name: string;
396
+ };
397
+ challengeIdentifier: string;
398
+ rp: {
399
+ id: string;
400
+ name: string;
401
+ };
402
+ otpUrl: string;
403
+ /** @deprecated use challengeIdentifier instead */
404
+ temporaryAuthenticationToken: string;
405
+ } | {
406
+ kind: "Fido2";
407
+ user: {
408
+ id: string;
409
+ displayName: string;
410
+ name: string;
411
+ };
412
+ challengeIdentifier: string;
413
+ challenge: string;
414
+ rp: {
415
+ id: string;
416
+ name: string;
417
+ };
418
+ authenticatorSelection: {
419
+ authenticatorAttachment?: ("platform" | "cross-platform") | undefined;
420
+ residentKey: "required" | "preferred" | "discouraged";
421
+ requireResidentKey: boolean;
422
+ userVerification: "required" | "preferred" | "discouraged";
423
+ };
424
+ attestation: "none" | "indirect" | "direct" | "enterprise";
425
+ pubKeyCredParams: {
426
+ type: string;
427
+ alg: number;
428
+ }[];
429
+ excludeCredentials: {
430
+ type: "public-key";
431
+ id: string;
432
+ transports?: ("usb" | "nfc" | "ble" | "smart-card" | "hybrid" | "internal") | undefined;
433
+ }[];
434
+ /** @deprecated use challengeIdentifier instead */
435
+ temporaryAuthenticationToken: string;
436
+ } | {
437
+ kind: "Key";
438
+ user: {
439
+ id: string;
440
+ displayName: string;
441
+ name: string;
442
+ };
443
+ challengeIdentifier: string;
444
+ challenge: string;
445
+ rp: {
446
+ id: string;
447
+ name: string;
448
+ };
449
+ attestation: "none" | "indirect" | "direct" | "enterprise";
450
+ pubKeyCredParams: {
451
+ type: string;
452
+ alg: number;
453
+ }[];
454
+ /** @deprecated use challengeIdentifier instead */
455
+ temporaryAuthenticationToken: string;
456
+ } | {
457
+ kind: "RecoveryKey";
458
+ user: {
459
+ id: string;
460
+ displayName: string;
461
+ name: string;
462
+ };
463
+ challengeIdentifier: string;
464
+ challenge: string;
465
+ rp: {
466
+ id: string;
467
+ name: string;
468
+ };
469
+ attestation: "none" | "indirect" | "direct" | "enterprise";
470
+ pubKeyCredParams: {
471
+ type: string;
472
+ alg: number;
473
+ }[];
474
+ /** @deprecated use challengeIdentifier instead */
475
+ temporaryAuthenticationToken: string;
476
+ };
477
+ export type CreateCredentialChallengeRequest = {
478
+ body: CreateCredentialChallengeBody;
479
+ };
480
+ export type CreateCredentialChallengeWithCodeBody = {
481
+ credentialKind: "Fido2" | "Key" | "Password" | "Totp" | "RecoveryKey";
482
+ code: string;
483
+ };
484
+ export type CreateCredentialChallengeWithCodeResponse = {
485
+ kind: "Password";
486
+ user: {
487
+ id: string;
488
+ displayName: string;
489
+ name: string;
490
+ };
491
+ challengeIdentifier: string;
492
+ rp: {
493
+ id: string;
494
+ name: string;
495
+ };
496
+ /** @deprecated use challengeIdentifier instead */
497
+ temporaryAuthenticationToken: string;
498
+ } | {
499
+ kind: "Totp";
500
+ user: {
501
+ id: string;
502
+ displayName: string;
503
+ name: string;
504
+ };
505
+ challengeIdentifier: string;
506
+ rp: {
507
+ id: string;
508
+ name: string;
509
+ };
510
+ otpUrl: string;
511
+ /** @deprecated use challengeIdentifier instead */
512
+ temporaryAuthenticationToken: string;
513
+ } | {
514
+ kind: "Fido2";
515
+ user: {
516
+ id: string;
517
+ displayName: string;
518
+ name: string;
519
+ };
520
+ challengeIdentifier: string;
521
+ challenge: string;
522
+ rp: {
523
+ id: string;
524
+ name: string;
525
+ };
526
+ authenticatorSelection: {
527
+ authenticatorAttachment?: ("platform" | "cross-platform") | undefined;
528
+ residentKey: "required" | "preferred" | "discouraged";
529
+ requireResidentKey: boolean;
530
+ userVerification: "required" | "preferred" | "discouraged";
531
+ };
532
+ attestation: "none" | "indirect" | "direct" | "enterprise";
533
+ pubKeyCredParams: {
534
+ type: string;
535
+ alg: number;
536
+ }[];
537
+ excludeCredentials: {
538
+ type: "public-key";
539
+ id: string;
540
+ transports?: ("usb" | "nfc" | "ble" | "smart-card" | "hybrid" | "internal") | undefined;
541
+ }[];
542
+ /** @deprecated use challengeIdentifier instead */
543
+ temporaryAuthenticationToken: string;
544
+ } | {
545
+ kind: "Key";
546
+ user: {
547
+ id: string;
548
+ displayName: string;
549
+ name: string;
550
+ };
551
+ challengeIdentifier: string;
552
+ challenge: string;
553
+ rp: {
554
+ id: string;
555
+ name: string;
556
+ };
557
+ attestation: "none" | "indirect" | "direct" | "enterprise";
558
+ pubKeyCredParams: {
559
+ type: string;
560
+ alg: number;
561
+ }[];
562
+ /** @deprecated use challengeIdentifier instead */
563
+ temporaryAuthenticationToken: string;
564
+ } | {
565
+ kind: "RecoveryKey";
566
+ user: {
567
+ id: string;
568
+ displayName: string;
569
+ name: string;
570
+ };
571
+ challengeIdentifier: string;
572
+ challenge: string;
573
+ rp: {
574
+ id: string;
575
+ name: string;
576
+ };
577
+ attestation: "none" | "indirect" | "direct" | "enterprise";
578
+ pubKeyCredParams: {
579
+ type: string;
580
+ alg: number;
581
+ }[];
582
+ /** @deprecated use challengeIdentifier instead */
583
+ temporaryAuthenticationToken: string;
584
+ };
585
+ export type CreateCredentialChallengeWithCodeRequest = {
586
+ body: CreateCredentialChallengeWithCodeBody;
587
+ };
588
+ export type CreateCredentialCodeBody = {
589
+ /** Code expiration, as an ISO-8601 datetime string or a unix timestamp */
590
+ expiration: string | number;
591
+ };
592
+ export type CreateCredentialCodeResponse = {
593
+ code: string;
594
+ expiration: string;
595
+ };
596
+ export type CreateCredentialCodeRequest = {
597
+ body: CreateCredentialCodeBody;
598
+ };
599
+ export type CreateCredentialWithCodeBody = {
600
+ credentialKind: "Fido2";
601
+ credentialInfo: {
602
+ credId: string;
603
+ clientData: string;
604
+ attestationData: string;
605
+ };
606
+ credentialName: string;
607
+ challengeIdentifier: string;
608
+ } | {
609
+ credentialKind: "Key";
610
+ credentialInfo: {
611
+ credId: string;
612
+ clientData: string;
613
+ attestationData: string;
614
+ };
615
+ credentialName: string;
616
+ challengeIdentifier: string;
617
+ } | {
618
+ credentialKind: "Password";
619
+ credentialInfo: {
620
+ password: string;
621
+ };
622
+ credentialName: string;
623
+ challengeIdentifier: string;
624
+ } | {
625
+ credentialKind: "Totp";
626
+ credentialInfo: {
627
+ otpCode: string;
628
+ };
629
+ credentialName: string;
630
+ challengeIdentifier: string;
631
+ } | {
632
+ credentialKind: "RecoveryKey";
633
+ credentialInfo: {
634
+ credId: string;
635
+ clientData: string;
636
+ attestationData: string;
637
+ };
638
+ encryptedPrivateKey?: string | undefined;
639
+ credentialName: string;
640
+ challengeIdentifier: string;
641
+ };
642
+ export type CreateCredentialWithCodeResponse = {
643
+ kind: "Fido2" | "Key" | "Password" | "Totp" | "RecoveryKey";
644
+ credentialId: string;
645
+ credentialUuid: string;
646
+ dateCreated: string;
647
+ isActive: boolean;
648
+ name: string;
649
+ publicKey: string;
650
+ relyingPartyId: string;
651
+ origin: string;
652
+ };
653
+ export type CreateCredentialWithCodeRequest = {
654
+ body: CreateCredentialWithCodeBody;
655
+ };
656
+ export type CreateDelegatedRecoveryChallengeBody = {
657
+ username: string;
658
+ credentialId: string;
659
+ };
660
+ export type CreateDelegatedRecoveryChallengeResponse = {
661
+ user: {
662
+ id: string;
663
+ displayName: string;
664
+ name: string;
665
+ };
666
+ temporaryAuthenticationToken: string;
667
+ challenge: string;
668
+ rp: {
669
+ id: string;
670
+ name: string;
671
+ };
672
+ supportedCredentialKinds: {
673
+ firstFactor: ("Fido2" | "Key" | "Password" | "Totp" | "RecoveryKey")[];
674
+ secondFactor: ("Fido2" | "Key" | "Password" | "Totp" | "RecoveryKey")[];
675
+ };
676
+ authenticatorSelection: {
677
+ authenticatorAttachment?: ("platform" | "cross-platform") | undefined;
678
+ residentKey: "required" | "preferred" | "discouraged";
679
+ requireResidentKey: boolean;
680
+ userVerification: "required" | "preferred" | "discouraged";
681
+ };
682
+ attestation: "none" | "indirect" | "direct" | "enterprise";
683
+ pubKeyCredParams: {
684
+ type: string;
685
+ alg: number;
686
+ }[];
687
+ excludeCredentials: {
688
+ type: "public-key";
689
+ id: string;
690
+ transports?: ("usb" | "nfc" | "ble" | "smart-card" | "hybrid" | "internal") | undefined;
691
+ }[];
692
+ otpUrl: string;
693
+ allowedRecoveryCredentials: {
694
+ id: string;
695
+ encryptedRecoveryKey: string;
696
+ }[];
697
+ };
698
+ export type CreateDelegatedRecoveryChallengeRequest = {
699
+ body: CreateDelegatedRecoveryChallengeBody;
700
+ };
701
+ export type CreateDelegatedRegistrationChallengeBody = {
702
+ email: string;
703
+ kind: "EndUser" | "CustomerEmployee" | "DfnsStaff";
704
+ externalId?: string | undefined;
705
+ };
706
+ export type CreateDelegatedRegistrationChallengeResponse = {
707
+ user: {
708
+ id: string;
709
+ displayName: string;
710
+ name: string;
711
+ };
712
+ temporaryAuthenticationToken: string;
713
+ challenge: string;
714
+ rp: {
715
+ id: string;
716
+ name: string;
717
+ };
718
+ supportedCredentialKinds: {
719
+ firstFactor: ("Fido2" | "Key" | "Password" | "Totp" | "RecoveryKey")[];
720
+ secondFactor: ("Fido2" | "Key" | "Password" | "Totp" | "RecoveryKey")[];
721
+ };
722
+ authenticatorSelection: {
723
+ authenticatorAttachment?: ("platform" | "cross-platform") | undefined;
724
+ residentKey: "required" | "preferred" | "discouraged";
725
+ requireResidentKey: boolean;
726
+ userVerification: "required" | "preferred" | "discouraged";
727
+ };
728
+ attestation: "none" | "indirect" | "direct" | "enterprise";
729
+ pubKeyCredParams: {
730
+ type: string;
731
+ alg: number;
732
+ }[];
733
+ excludeCredentials: {
734
+ type: "public-key";
735
+ id: string;
736
+ transports?: ("usb" | "nfc" | "ble" | "smart-card" | "hybrid" | "internal") | undefined;
737
+ }[];
738
+ otpUrl: string;
739
+ };
740
+ export type CreateDelegatedRegistrationChallengeRequest = {
741
+ body: CreateDelegatedRegistrationChallengeBody;
742
+ };
743
+ export type CreateLoginChallengeBody = {
744
+ username: string;
745
+ orgId: string;
746
+ };
747
+ export type CreateLoginChallengeResponse = {
748
+ challenge: string;
749
+ challengeIdentifier: string;
750
+ rp: {
751
+ id: string;
752
+ name: string;
753
+ };
754
+ supportedCredentialKinds: {
755
+ kind: "Fido2" | "Key" | "Password" | "Totp" | "RecoveryKey";
756
+ factor: "first" | "second" | "either";
757
+ requiresSecondFactor: boolean;
758
+ }[];
759
+ userVerification: "required" | "preferred" | "discouraged";
760
+ attestation: "none" | "indirect" | "direct" | "enterprise";
761
+ allowCredentials: {
762
+ key: {
763
+ type: "public-key";
764
+ id: string;
765
+ transports?: ("usb" | "nfc" | "ble" | "smart-card" | "hybrid" | "internal") | undefined;
766
+ }[];
767
+ webauthn: {
768
+ type: "public-key";
769
+ id: string;
770
+ transports?: ("usb" | "nfc" | "ble" | "smart-card" | "hybrid" | "internal") | undefined;
771
+ }[];
772
+ };
773
+ externalAuthenticationUrl: string;
774
+ };
775
+ export type CreateLoginChallengeRequest = {
776
+ body: CreateLoginChallengeBody;
777
+ };
778
+ export type CreatePersonalAccessTokenBody = {
779
+ name: string;
780
+ publicKey: string;
781
+ permissionId?: string | undefined;
782
+ externalId?: string | undefined;
783
+ daysValid?: number | undefined;
784
+ secondsValid?: number | undefined;
785
+ };
786
+ export type CreatePersonalAccessTokenResponse = {
787
+ accessToken: string;
788
+ dateCreated: string;
789
+ credId: string;
790
+ isActive: boolean;
791
+ kind: "ServiceAccount" | "Pat" | "Application";
792
+ linkedUserId: string;
793
+ linkedAppId: string;
794
+ name: string;
795
+ orgId: string;
796
+ publicKey: string;
797
+ tokenId: string;
798
+ permissionAssignments: {
799
+ permissionName: string;
800
+ permissionId: string;
801
+ assignmentId: string;
802
+ operations?: string[] | undefined;
803
+ }[];
804
+ };
805
+ export type CreatePersonalAccessTokenRequest = {
806
+ body: CreatePersonalAccessTokenBody;
807
+ };
808
+ export type CreateRecoveryChallengeBody = {
809
+ username: string;
810
+ verificationCode: string;
811
+ orgId: string;
812
+ credentialId: string;
813
+ };
814
+ export type CreateRecoveryChallengeResponse = {
815
+ user: {
816
+ id: string;
817
+ displayName: string;
818
+ name: string;
819
+ };
820
+ temporaryAuthenticationToken: string;
821
+ challenge: string;
822
+ rp: {
823
+ id: string;
824
+ name: string;
825
+ };
826
+ supportedCredentialKinds: {
827
+ firstFactor: ("Fido2" | "Key" | "Password" | "Totp" | "RecoveryKey")[];
828
+ secondFactor: ("Fido2" | "Key" | "Password" | "Totp" | "RecoveryKey")[];
829
+ };
830
+ authenticatorSelection: {
831
+ authenticatorAttachment?: ("platform" | "cross-platform") | undefined;
832
+ residentKey: "required" | "preferred" | "discouraged";
833
+ requireResidentKey: boolean;
834
+ userVerification: "required" | "preferred" | "discouraged";
835
+ };
836
+ attestation: "none" | "indirect" | "direct" | "enterprise";
837
+ pubKeyCredParams: {
838
+ type: string;
839
+ alg: number;
840
+ }[];
841
+ excludeCredentials: {
842
+ type: "public-key";
843
+ id: string;
844
+ transports?: ("usb" | "nfc" | "ble" | "smart-card" | "hybrid" | "internal") | undefined;
845
+ }[];
846
+ otpUrl: string;
847
+ allowedRecoveryCredentials: {
848
+ id: string;
849
+ encryptedRecoveryKey: string;
850
+ }[];
851
+ };
852
+ export type CreateRecoveryChallengeRequest = {
853
+ body: CreateRecoveryChallengeBody;
854
+ };
855
+ export type CreateRegistrationChallengeBody = {
856
+ orgId: string;
857
+ username: string;
858
+ registrationCode: string;
859
+ };
860
+ export type CreateRegistrationChallengeResponse = {
861
+ user: {
862
+ id: string;
863
+ displayName: string;
864
+ name: string;
865
+ };
866
+ temporaryAuthenticationToken: string;
867
+ challenge: string;
868
+ rp: {
869
+ id: string;
870
+ name: string;
871
+ };
872
+ supportedCredentialKinds: {
873
+ firstFactor: ("Fido2" | "Key" | "Password" | "Totp" | "RecoveryKey")[];
874
+ secondFactor: ("Fido2" | "Key" | "Password" | "Totp" | "RecoveryKey")[];
875
+ };
876
+ authenticatorSelection: {
877
+ authenticatorAttachment?: ("platform" | "cross-platform") | undefined;
878
+ residentKey: "required" | "preferred" | "discouraged";
879
+ requireResidentKey: boolean;
880
+ userVerification: "required" | "preferred" | "discouraged";
881
+ };
882
+ attestation: "none" | "indirect" | "direct" | "enterprise";
883
+ pubKeyCredParams: {
884
+ type: string;
885
+ alg: number;
886
+ }[];
887
+ excludeCredentials: {
888
+ type: "public-key";
889
+ id: string;
890
+ transports?: ("usb" | "nfc" | "ble" | "smart-card" | "hybrid" | "internal") | undefined;
891
+ }[];
892
+ otpUrl: string;
893
+ };
894
+ export type CreateRegistrationChallengeRequest = {
895
+ body: CreateRegistrationChallengeBody;
896
+ };
897
+ export type CreateServiceAccountBody = {
898
+ name: string;
899
+ publicKey: string;
900
+ permissionId?: string | undefined;
901
+ externalId?: string | undefined;
902
+ daysValid?: number | undefined;
903
+ };
904
+ export type CreateServiceAccountResponse = {
905
+ userInfo: {
906
+ username: string;
907
+ userId: string;
908
+ kind: "EndUser" | "CustomerEmployee" | "DfnsStaff";
909
+ credentialUuid: string;
910
+ orgId: string;
911
+ permissions?: string[] | undefined;
912
+ scopes?: string[] | undefined;
913
+ isActive: boolean;
914
+ isServiceAccount: boolean;
915
+ isRegistered: boolean;
916
+ permissionAssignments: {
917
+ permissionName: string;
918
+ permissionId: string;
919
+ assignmentId: string;
920
+ operations?: string[] | undefined;
921
+ }[];
922
+ };
923
+ accessTokens: {
924
+ accessToken?: string | undefined;
925
+ dateCreated: string;
926
+ credId: string;
927
+ isActive: boolean;
928
+ kind: "ServiceAccount" | "Pat" | "Application";
929
+ linkedUserId: string;
930
+ linkedAppId: string;
931
+ name: string;
932
+ orgId: string;
933
+ permissionAssignments: {
934
+ permissionName: string;
935
+ permissionId: string;
936
+ assignmentId: string;
937
+ operations?: string[] | undefined;
938
+ }[];
939
+ publicKey: string;
940
+ tokenId: string;
941
+ }[];
942
+ };
943
+ export type CreateServiceAccountRequest = {
944
+ body: CreateServiceAccountBody;
945
+ };
946
+ export type CreateUserBody = {
947
+ email: string;
948
+ kind: "CustomerEmployee" | "DfnsStaff";
949
+ publicKey?: string | undefined;
950
+ externalId?: string | undefined;
951
+ };
952
+ export type CreateUserResponse = {
953
+ username: string;
954
+ userId: string;
955
+ kind: "EndUser" | "CustomerEmployee" | "DfnsStaff";
956
+ credentialUuid: string;
957
+ orgId: string;
958
+ permissions?: string[] | undefined;
959
+ scopes?: string[] | undefined;
960
+ isActive: boolean;
961
+ isServiceAccount: boolean;
962
+ isRegistered: boolean;
963
+ permissionAssignments: {
964
+ permissionName: string;
965
+ permissionId: string;
966
+ assignmentId: string;
967
+ operations?: string[] | undefined;
968
+ }[];
969
+ };
970
+ export type CreateUserRequest = {
971
+ body: CreateUserBody;
972
+ };
973
+ export type CreateUserActionChallengeBody = {
974
+ userActionServerKind?: ("Api" | "Staff") | undefined;
975
+ userActionHttpMethod: string;
976
+ userActionHttpPath: string;
977
+ userActionPayload: string;
978
+ };
979
+ export type CreateUserActionChallengeResponse = {
980
+ challenge: string;
981
+ challengeIdentifier: string;
982
+ rp: {
983
+ id: string;
984
+ name: string;
985
+ };
986
+ supportedCredentialKinds: {
987
+ kind: "Fido2" | "Key" | "Password" | "Totp" | "RecoveryKey";
988
+ factor: "first" | "second" | "either";
989
+ requiresSecondFactor: boolean;
990
+ }[];
991
+ userVerification: "required" | "preferred" | "discouraged";
992
+ attestation: "none" | "indirect" | "direct" | "enterprise";
993
+ allowCredentials: {
994
+ key: {
995
+ type: "public-key";
996
+ id: string;
997
+ transports?: ("usb" | "nfc" | "ble" | "smart-card" | "hybrid" | "internal") | undefined;
998
+ }[];
999
+ webauthn: {
1000
+ type: "public-key";
1001
+ id: string;
1002
+ transports?: ("usb" | "nfc" | "ble" | "smart-card" | "hybrid" | "internal") | undefined;
1003
+ }[];
1004
+ };
1005
+ externalAuthenticationUrl: string;
1006
+ };
1007
+ export type CreateUserActionChallengeRequest = {
1008
+ body: CreateUserActionChallengeBody;
1009
+ };
1010
+ export type CreateUserActionSignatureBody = {
1011
+ challengeIdentifier: string;
1012
+ firstFactor: {
1013
+ kind: "Fido2";
1014
+ credentialAssertion: {
1015
+ credId: string;
1016
+ clientData: string;
1017
+ authenticatorData: string;
1018
+ signature: string;
1019
+ userHandle?: string | undefined;
1020
+ };
1021
+ } | {
1022
+ kind: "Key";
1023
+ credentialAssertion: {
1024
+ credId: string;
1025
+ clientData: string;
1026
+ signature: string;
1027
+ algorithm?: string | undefined;
1028
+ };
1029
+ } | {
1030
+ kind: "Password";
1031
+ password: string;
1032
+ };
1033
+ secondFactor?: ({
1034
+ kind: "Fido2";
1035
+ credentialAssertion: {
1036
+ credId: string;
1037
+ clientData: string;
1038
+ authenticatorData: string;
1039
+ signature: string;
1040
+ userHandle?: string | undefined;
1041
+ };
1042
+ } | {
1043
+ kind: "Key";
1044
+ credentialAssertion: {
1045
+ credId: string;
1046
+ clientData: string;
1047
+ signature: string;
1048
+ algorithm?: string | undefined;
1049
+ };
1050
+ } | {
1051
+ kind: "Totp";
1052
+ otpCode: string;
1053
+ }) | undefined;
1054
+ };
1055
+ export type CreateUserActionSignatureResponse = {
1056
+ userAction: string;
1057
+ };
1058
+ export type CreateUserActionSignatureRequest = {
1059
+ body: CreateUserActionSignatureBody;
1060
+ };
1061
+ export type DeactivateApplicationParams = {
1062
+ appId: string;
1063
+ };
1064
+ export type DeactivateApplicationResponse = {
1065
+ appId: string;
1066
+ kind: "ServerSideApplication" | "ClientSideApplication";
1067
+ orgId: string;
1068
+ expectedRpId: string;
1069
+ name: string;
1070
+ isActive: boolean;
1071
+ expectedOrigin: string;
1072
+ permissionAssignments: {
1073
+ permissionName: string;
1074
+ permissionId: string;
1075
+ assignmentId: string;
1076
+ operations?: string[] | undefined;
1077
+ }[];
1078
+ accessTokens: {
1079
+ accessToken?: string | undefined;
1080
+ dateCreated: string;
1081
+ credId: string;
1082
+ isActive: boolean;
1083
+ kind: "ServiceAccount" | "Pat" | "Application";
1084
+ linkedUserId: string;
1085
+ linkedAppId: string;
1086
+ name: string;
1087
+ orgId: string;
1088
+ permissionAssignments: {
1089
+ permissionName: string;
1090
+ permissionId: string;
1091
+ assignmentId: string;
1092
+ operations?: string[] | undefined;
1093
+ }[];
1094
+ publicKey: string;
1095
+ tokenId: string;
1096
+ }[];
1097
+ };
1098
+ export type DeactivateApplicationRequest = DeactivateApplicationParams;
1099
+ export type DeactivateCredentialBody = {
1100
+ credentialUuid: string;
1101
+ };
1102
+ export type DeactivateCredentialResponse = {
1103
+ message: string;
1104
+ };
1105
+ export type DeactivateCredentialRequest = {
1106
+ body: DeactivateCredentialBody;
1107
+ };
1108
+ export type DeactivatePersonalAccessTokenParams = {
1109
+ tokenId: string;
1110
+ };
1111
+ export type DeactivatePersonalAccessTokenResponse = {
1112
+ accessToken?: string | undefined;
1113
+ dateCreated: string;
1114
+ credId: string;
1115
+ isActive: boolean;
1116
+ kind: "ServiceAccount" | "Pat" | "Application";
1117
+ linkedUserId: string;
1118
+ linkedAppId: string;
1119
+ name: string;
1120
+ orgId: string;
1121
+ permissionAssignments: {
1122
+ permissionName: string;
1123
+ permissionId: string;
1124
+ assignmentId: string;
1125
+ operations?: string[] | undefined;
1126
+ }[];
1127
+ publicKey: string;
1128
+ tokenId: string;
1129
+ };
1130
+ export type DeactivatePersonalAccessTokenRequest = DeactivatePersonalAccessTokenParams;
1131
+ export type DeactivateServiceAccountParams = {
1132
+ serviceAccountId: string;
1133
+ };
1134
+ export type DeactivateServiceAccountResponse = {
1135
+ userInfo: {
1136
+ username: string;
1137
+ userId: string;
1138
+ kind: "EndUser" | "CustomerEmployee" | "DfnsStaff";
1139
+ credentialUuid: string;
1140
+ orgId: string;
1141
+ permissions?: string[] | undefined;
1142
+ scopes?: string[] | undefined;
1143
+ isActive: boolean;
1144
+ isServiceAccount: boolean;
1145
+ isRegistered: boolean;
1146
+ permissionAssignments: {
1147
+ permissionName: string;
1148
+ permissionId: string;
1149
+ assignmentId: string;
1150
+ operations?: string[] | undefined;
1151
+ }[];
1152
+ };
1153
+ accessTokens: {
1154
+ accessToken?: string | undefined;
1155
+ dateCreated: string;
1156
+ credId: string;
1157
+ isActive: boolean;
1158
+ kind: "ServiceAccount" | "Pat" | "Application";
1159
+ linkedUserId: string;
1160
+ linkedAppId: string;
1161
+ name: string;
1162
+ orgId: string;
1163
+ permissionAssignments: {
1164
+ permissionName: string;
1165
+ permissionId: string;
1166
+ assignmentId: string;
1167
+ operations?: string[] | undefined;
1168
+ }[];
1169
+ publicKey: string;
1170
+ tokenId: string;
1171
+ }[];
1172
+ };
1173
+ export type DeactivateServiceAccountRequest = DeactivateServiceAccountParams;
1174
+ export type DeactivateUserParams = {
1175
+ userId: string;
1176
+ };
1177
+ export type DeactivateUserResponse = {
1178
+ username: string;
1179
+ userId: string;
1180
+ kind: "EndUser" | "CustomerEmployee" | "DfnsStaff";
1181
+ credentialUuid: string;
1182
+ orgId: string;
1183
+ permissions?: string[] | undefined;
1184
+ scopes?: string[] | undefined;
1185
+ isActive: boolean;
1186
+ isServiceAccount: boolean;
1187
+ isRegistered: boolean;
1188
+ permissionAssignments: {
1189
+ permissionName: string;
1190
+ permissionId: string;
1191
+ assignmentId: string;
1192
+ operations?: string[] | undefined;
1193
+ }[];
1194
+ };
1195
+ export type DeactivateUserRequest = DeactivateUserParams;
1196
+ export type DelegatedLoginBody = {
1197
+ username: string;
1198
+ };
1199
+ export type DelegatedLoginResponse = {
1200
+ token: string;
1201
+ };
1202
+ export type DelegatedLoginRequest = {
1203
+ body: DelegatedLoginBody;
1204
+ };
1205
+ export type GetApplicationParams = {
1206
+ appId: string;
1207
+ };
1208
+ export type GetApplicationResponse = {
1209
+ appId: string;
1210
+ kind: "ServerSideApplication" | "ClientSideApplication";
1211
+ orgId: string;
1212
+ expectedRpId: string;
1213
+ name: string;
1214
+ isActive: boolean;
1215
+ expectedOrigin: string;
1216
+ permissionAssignments: {
1217
+ permissionName: string;
1218
+ permissionId: string;
1219
+ assignmentId: string;
1220
+ operations?: string[] | undefined;
1221
+ }[];
1222
+ accessTokens: {
1223
+ accessToken?: string | undefined;
1224
+ dateCreated: string;
1225
+ credId: string;
1226
+ isActive: boolean;
1227
+ kind: "ServiceAccount" | "Pat" | "Application";
1228
+ linkedUserId: string;
1229
+ linkedAppId: string;
1230
+ name: string;
1231
+ orgId: string;
1232
+ permissionAssignments: {
1233
+ permissionName: string;
1234
+ permissionId: string;
1235
+ assignmentId: string;
1236
+ operations?: string[] | undefined;
1237
+ }[];
1238
+ publicKey: string;
1239
+ tokenId: string;
1240
+ }[];
1241
+ };
1242
+ export type GetApplicationRequest = GetApplicationParams;
1243
+ export type GetPersonalAccessTokenParams = {
1244
+ tokenId: string;
1245
+ };
1246
+ export type GetPersonalAccessTokenResponse = {
1247
+ accessToken?: string | undefined;
1248
+ dateCreated: string;
1249
+ credId: string;
1250
+ isActive: boolean;
1251
+ kind: "ServiceAccount" | "Pat" | "Application";
1252
+ linkedUserId: string;
1253
+ linkedAppId: string;
1254
+ name: string;
1255
+ orgId: string;
1256
+ permissionAssignments: {
1257
+ permissionName: string;
1258
+ permissionId: string;
1259
+ assignmentId: string;
1260
+ operations?: string[] | undefined;
1261
+ }[];
1262
+ publicKey: string;
1263
+ tokenId: string;
1264
+ };
1265
+ export type GetPersonalAccessTokenRequest = GetPersonalAccessTokenParams;
1266
+ export type GetServiceAccountParams = {
1267
+ serviceAccountId: string;
1268
+ };
1269
+ export type GetServiceAccountResponse = {
1270
+ userInfo: {
1271
+ username: string;
1272
+ userId: string;
1273
+ kind: "EndUser" | "CustomerEmployee" | "DfnsStaff";
1274
+ credentialUuid: string;
1275
+ orgId: string;
1276
+ permissions?: string[] | undefined;
1277
+ scopes?: string[] | undefined;
1278
+ isActive: boolean;
1279
+ isServiceAccount: boolean;
1280
+ isRegistered: boolean;
1281
+ permissionAssignments: {
1282
+ permissionName: string;
1283
+ permissionId: string;
1284
+ assignmentId: string;
1285
+ operations?: string[] | undefined;
1286
+ }[];
1287
+ };
1288
+ accessTokens: {
1289
+ accessToken?: string | undefined;
1290
+ dateCreated: string;
1291
+ credId: string;
1292
+ isActive: boolean;
1293
+ kind: "ServiceAccount" | "Pat" | "Application";
1294
+ linkedUserId: string;
1295
+ linkedAppId: string;
1296
+ name: string;
1297
+ orgId: string;
1298
+ permissionAssignments: {
1299
+ permissionName: string;
1300
+ permissionId: string;
1301
+ assignmentId: string;
1302
+ operations?: string[] | undefined;
1303
+ }[];
1304
+ publicKey: string;
1305
+ tokenId: string;
1306
+ }[];
1307
+ };
1308
+ export type GetServiceAccountRequest = GetServiceAccountParams;
1309
+ export type GetUserParams = {
1310
+ userId: string;
1311
+ };
1312
+ export type GetUserResponse = {
1313
+ username: string;
1314
+ userId: string;
1315
+ kind: "EndUser" | "CustomerEmployee" | "DfnsStaff";
1316
+ credentialUuid: string;
1317
+ orgId: string;
1318
+ permissions?: string[] | undefined;
1319
+ scopes?: string[] | undefined;
1320
+ isActive: boolean;
1321
+ isServiceAccount: boolean;
1322
+ isRegistered: boolean;
1323
+ permissionAssignments: {
1324
+ permissionName: string;
1325
+ permissionId: string;
1326
+ assignmentId: string;
1327
+ operations?: string[] | undefined;
1328
+ }[];
1329
+ };
1330
+ export type GetUserRequest = GetUserParams;
1331
+ export type ListApplicationsResponse = {
1332
+ items: {
1333
+ appId: string;
1334
+ kind: "ServerSideApplication" | "ClientSideApplication";
1335
+ orgId: string;
1336
+ expectedRpId: string;
1337
+ name: string;
1338
+ isActive: boolean;
1339
+ expectedOrigin: string;
1340
+ permissionAssignments: {
1341
+ permissionName: string;
1342
+ permissionId: string;
1343
+ assignmentId: string;
1344
+ operations?: string[] | undefined;
1345
+ }[];
1346
+ accessTokens: {
1347
+ accessToken?: string | undefined;
1348
+ dateCreated: string;
1349
+ credId: string;
1350
+ isActive: boolean;
1351
+ kind: "ServiceAccount" | "Pat" | "Application";
1352
+ linkedUserId: string;
1353
+ linkedAppId: string;
1354
+ name: string;
1355
+ orgId: string;
1356
+ permissionAssignments: {
1357
+ permissionName: string;
1358
+ permissionId: string;
1359
+ assignmentId: string;
1360
+ operations?: string[] | undefined;
1361
+ }[];
1362
+ publicKey: string;
1363
+ tokenId: string;
1364
+ }[];
1365
+ }[];
1366
+ };
1367
+ export type ListAvailableOrgsBody = {
1368
+ username: string;
1369
+ orgId?: string | undefined;
1370
+ permissions?: string[] | undefined;
1371
+ origin: string;
1372
+ };
1373
+ export type ListAvailableOrgsResponse = {
1374
+ items: {
1375
+ orgId: string;
1376
+ appId: string;
1377
+ }[];
1378
+ };
1379
+ export type ListAvailableOrgsRequest = {
1380
+ body: ListAvailableOrgsBody;
1381
+ };
1382
+ export type ListCredentialsResponse = {
1383
+ items: {
1384
+ kind: "Fido2" | "Key" | "Password" | "Totp" | "RecoveryKey";
1385
+ credentialId: string;
1386
+ credentialUuid: string;
1387
+ dateCreated: string;
1388
+ isActive: boolean;
1389
+ name: string;
1390
+ publicKey: string;
1391
+ relyingPartyId: string;
1392
+ origin: string;
1393
+ }[];
1394
+ };
1395
+ export type ListPersonalAccessTokensResponse = {
1396
+ items: {
1397
+ accessToken?: string | undefined;
1398
+ dateCreated: string;
1399
+ credId: string;
1400
+ isActive: boolean;
1401
+ kind: "ServiceAccount" | "Pat" | "Application";
1402
+ linkedUserId: string;
1403
+ linkedAppId: string;
1404
+ name: string;
1405
+ orgId: string;
1406
+ permissionAssignments: {
1407
+ permissionName: string;
1408
+ permissionId: string;
1409
+ assignmentId: string;
1410
+ operations?: string[] | undefined;
1411
+ }[];
1412
+ publicKey: string;
1413
+ tokenId: string;
1414
+ }[];
1415
+ };
1416
+ export type ListServiceAccountsResponse = {
1417
+ items: {
1418
+ userInfo: {
1419
+ username: string;
1420
+ userId: string;
1421
+ kind: "EndUser" | "CustomerEmployee" | "DfnsStaff";
1422
+ credentialUuid: string;
1423
+ orgId: string;
1424
+ permissions?: string[] | undefined;
1425
+ scopes?: string[] | undefined;
1426
+ isActive: boolean;
1427
+ isServiceAccount: boolean;
1428
+ isRegistered: boolean;
1429
+ permissionAssignments: {
1430
+ permissionName: string;
1431
+ permissionId: string;
1432
+ assignmentId: string;
1433
+ operations?: string[] | undefined;
1434
+ }[];
1435
+ };
1436
+ accessTokens: {
1437
+ accessToken?: string | undefined;
1438
+ dateCreated: string;
1439
+ credId: string;
1440
+ isActive: boolean;
1441
+ kind: "ServiceAccount" | "Pat" | "Application";
1442
+ linkedUserId: string;
1443
+ linkedAppId: string;
1444
+ name: string;
1445
+ orgId: string;
1446
+ permissionAssignments: {
1447
+ permissionName: string;
1448
+ permissionId: string;
1449
+ assignmentId: string;
1450
+ operations?: string[] | undefined;
1451
+ }[];
1452
+ publicKey: string;
1453
+ tokenId: string;
1454
+ }[];
1455
+ }[];
1456
+ };
1457
+ export type ListUsersQuery = {
1458
+ limit?: number | undefined;
1459
+ paginationToken?: string | undefined;
1460
+ kind?: ("CustomerEmployee" | "EndUser") | undefined;
1461
+ };
1462
+ export type ListUsersResponse = {
1463
+ items: {
1464
+ username: string;
1465
+ userId: string;
1466
+ kind: "EndUser" | "CustomerEmployee" | "DfnsStaff";
1467
+ credentialUuid: string;
1468
+ orgId: string;
1469
+ permissions?: string[] | undefined;
1470
+ scopes?: string[] | undefined;
1471
+ isActive: boolean;
1472
+ isServiceAccount: boolean;
1473
+ isRegistered: boolean;
1474
+ permissionAssignments: {
1475
+ permissionName: string;
1476
+ permissionId: string;
1477
+ assignmentId: string;
1478
+ operations?: string[] | undefined;
1479
+ }[];
1480
+ }[];
1481
+ nextPageToken?: string | undefined;
1482
+ };
1483
+ export type ListUsersRequest = {
1484
+ query?: ListUsersQuery;
1485
+ };
1486
+ export type LoginBody = {
1487
+ challengeIdentifier: string;
1488
+ firstFactor: {
1489
+ kind: "Fido2";
1490
+ credentialAssertion: {
1491
+ credId: string;
1492
+ clientData: string;
1493
+ authenticatorData: string;
1494
+ signature: string;
1495
+ userHandle?: string | undefined;
1496
+ };
1497
+ } | {
1498
+ kind: "Key";
1499
+ credentialAssertion: {
1500
+ credId: string;
1501
+ clientData: string;
1502
+ signature: string;
1503
+ algorithm?: string | undefined;
1504
+ };
1505
+ } | {
1506
+ kind: "Password";
1507
+ password: string;
1508
+ };
1509
+ secondFactor?: ({
1510
+ kind: "Fido2";
1511
+ credentialAssertion: {
1512
+ credId: string;
1513
+ clientData: string;
1514
+ authenticatorData: string;
1515
+ signature: string;
1516
+ userHandle?: string | undefined;
1517
+ };
1518
+ } | {
1519
+ kind: "Key";
1520
+ credentialAssertion: {
1521
+ credId: string;
1522
+ clientData: string;
1523
+ signature: string;
1524
+ algorithm?: string | undefined;
1525
+ };
1526
+ } | {
1527
+ kind: "Totp";
1528
+ otpCode: string;
1529
+ }) | undefined;
1530
+ };
1531
+ export type LoginResponse = {
1532
+ token: string;
1533
+ };
1534
+ export type LoginRequest = {
1535
+ body: LoginBody;
1536
+ };
1537
+ export type LogoutResponse = {
1538
+ message: string;
1539
+ };
1540
+ export type RecoverBody = {
1541
+ recovery: {
1542
+ kind: "RecoveryKey";
1543
+ credentialAssertion: {
1544
+ credId: string;
1545
+ clientData: string;
1546
+ signature: string;
1547
+ algorithm?: string | undefined;
1548
+ };
1549
+ };
1550
+ newCredentials: {
1551
+ firstFactorCredential: {
1552
+ credentialKind: "Fido2";
1553
+ credentialInfo: {
1554
+ credId: string;
1555
+ clientData: string;
1556
+ attestationData: string;
1557
+ };
1558
+ } | {
1559
+ credentialKind: "Key";
1560
+ credentialInfo: {
1561
+ credId: string;
1562
+ clientData: string;
1563
+ attestationData: string;
1564
+ };
1565
+ } | {
1566
+ credentialKind: "Password";
1567
+ credentialInfo: {
1568
+ password: string;
1569
+ };
1570
+ };
1571
+ secondFactorCredential?: ({
1572
+ credentialKind: "Fido2";
1573
+ credentialInfo: {
1574
+ credId: string;
1575
+ clientData: string;
1576
+ attestationData: string;
1577
+ };
1578
+ } | {
1579
+ credentialKind: "Key";
1580
+ credentialInfo: {
1581
+ credId: string;
1582
+ clientData: string;
1583
+ attestationData: string;
1584
+ };
1585
+ } | {
1586
+ credentialKind: "Totp";
1587
+ credentialInfo: {
1588
+ otpCode: string;
1589
+ };
1590
+ }) | undefined;
1591
+ recoveryCredential?: {
1592
+ credentialKind: "RecoveryKey";
1593
+ credentialInfo: {
1594
+ credId: string;
1595
+ clientData: string;
1596
+ attestationData: string;
1597
+ };
1598
+ encryptedPrivateKey?: string | undefined;
1599
+ } | undefined;
1600
+ };
1601
+ };
1602
+ export type RecoverResponse = {
1603
+ credential: {
1604
+ uuid: string;
1605
+ kind: "Fido2" | "Key" | "Password" | "Totp" | "RecoveryKey";
1606
+ name: string;
1607
+ };
1608
+ user: {
1609
+ id: string;
1610
+ username: string;
1611
+ orgId: string;
1612
+ };
1613
+ };
1614
+ export type RecoverRequest = {
1615
+ body: RecoverBody;
1616
+ };
1617
+ export type RecreateDelegatedRegistrationChallengeBody = {
1618
+ email: string;
1619
+ kind: "EndUser" | "CustomerEmployee" | "DfnsStaff";
1620
+ externalId?: string | undefined;
1621
+ };
1622
+ export type RecreateDelegatedRegistrationChallengeResponse = {
1623
+ user: {
1624
+ id: string;
1625
+ displayName: string;
1626
+ name: string;
1627
+ };
1628
+ temporaryAuthenticationToken: string;
1629
+ challenge: string;
1630
+ rp: {
1631
+ id: string;
1632
+ name: string;
1633
+ };
1634
+ supportedCredentialKinds: {
1635
+ firstFactor: ("Fido2" | "Key" | "Password" | "Totp" | "RecoveryKey")[];
1636
+ secondFactor: ("Fido2" | "Key" | "Password" | "Totp" | "RecoveryKey")[];
1637
+ };
1638
+ authenticatorSelection: {
1639
+ authenticatorAttachment?: ("platform" | "cross-platform") | undefined;
1640
+ residentKey: "required" | "preferred" | "discouraged";
1641
+ requireResidentKey: boolean;
1642
+ userVerification: "required" | "preferred" | "discouraged";
1643
+ };
1644
+ attestation: "none" | "indirect" | "direct" | "enterprise";
1645
+ pubKeyCredParams: {
1646
+ type: string;
1647
+ alg: number;
1648
+ }[];
1649
+ excludeCredentials: {
1650
+ type: "public-key";
1651
+ id: string;
1652
+ transports?: ("usb" | "nfc" | "ble" | "smart-card" | "hybrid" | "internal") | undefined;
1653
+ }[];
1654
+ otpUrl: string;
1655
+ };
1656
+ export type RecreateDelegatedRegistrationChallengeRequest = {
1657
+ body: RecreateDelegatedRegistrationChallengeBody;
1658
+ };
1659
+ export type RegisterBody = {
1660
+ firstFactorCredential: {
1661
+ credentialKind: "Fido2";
1662
+ credentialInfo: {
1663
+ credId: string;
1664
+ clientData: string;
1665
+ attestationData: string;
1666
+ };
1667
+ } | {
1668
+ credentialKind: "Key";
1669
+ credentialInfo: {
1670
+ credId: string;
1671
+ clientData: string;
1672
+ attestationData: string;
1673
+ };
1674
+ } | {
1675
+ credentialKind: "Password";
1676
+ credentialInfo: {
1677
+ password: string;
1678
+ };
1679
+ };
1680
+ secondFactorCredential?: ({
1681
+ credentialKind: "Fido2";
1682
+ credentialInfo: {
1683
+ credId: string;
1684
+ clientData: string;
1685
+ attestationData: string;
1686
+ };
1687
+ } | {
1688
+ credentialKind: "Key";
1689
+ credentialInfo: {
1690
+ credId: string;
1691
+ clientData: string;
1692
+ attestationData: string;
1693
+ };
1694
+ } | {
1695
+ credentialKind: "Totp";
1696
+ credentialInfo: {
1697
+ otpCode: string;
1698
+ };
1699
+ }) | undefined;
1700
+ recoveryCredential?: {
1701
+ credentialKind: "RecoveryKey";
1702
+ credentialInfo: {
1703
+ credId: string;
1704
+ clientData: string;
1705
+ attestationData: string;
1706
+ };
1707
+ encryptedPrivateKey?: string | undefined;
1708
+ } | undefined;
1709
+ };
1710
+ export type RegisterResponse = {
1711
+ credential: {
1712
+ uuid: string;
1713
+ kind: "Fido2" | "Key" | "Password" | "Totp" | "RecoveryKey";
1714
+ name: string;
1715
+ };
1716
+ user: {
1717
+ id: string;
1718
+ username: string;
1719
+ orgId: string;
1720
+ };
1721
+ };
1722
+ export type RegisterRequest = {
1723
+ body: RegisterBody;
1724
+ };
1725
+ export type RegisterEndUserBody = {
1726
+ firstFactorCredential: {
1727
+ credentialKind: "Fido2";
1728
+ credentialInfo: {
1729
+ credId: string;
1730
+ clientData: string;
1731
+ attestationData: string;
1732
+ };
1733
+ } | {
1734
+ credentialKind: "Key";
1735
+ credentialInfo: {
1736
+ credId: string;
1737
+ clientData: string;
1738
+ attestationData: string;
1739
+ };
1740
+ } | {
1741
+ credentialKind: "Password";
1742
+ credentialInfo: {
1743
+ password: string;
1744
+ };
1745
+ };
1746
+ secondFactorCredential?: ({
1747
+ credentialKind: "Fido2";
1748
+ credentialInfo: {
1749
+ credId: string;
1750
+ clientData: string;
1751
+ attestationData: string;
1752
+ };
1753
+ } | {
1754
+ credentialKind: "Key";
1755
+ credentialInfo: {
1756
+ credId: string;
1757
+ clientData: string;
1758
+ attestationData: string;
1759
+ };
1760
+ } | {
1761
+ credentialKind: "Totp";
1762
+ credentialInfo: {
1763
+ otpCode: string;
1764
+ };
1765
+ }) | undefined;
1766
+ recoveryCredential?: {
1767
+ credentialKind: "RecoveryKey";
1768
+ credentialInfo: {
1769
+ credId: string;
1770
+ clientData: string;
1771
+ attestationData: string;
1772
+ };
1773
+ encryptedPrivateKey?: string | undefined;
1774
+ } | undefined;
1775
+ wallets: {
1776
+ network: "Algorand" | "AlgorandTestnet" | "ArbitrumOne" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseSepolia" | "Bitcoin" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "FantomOpera" | "FantomTestnet" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismSepolia" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Tron" | "TronNile" | "ArbitrumGoerli" | "BaseGoerli" | "Cardano" | "CardanoPreprod" | "Kusama" | "OptimismGoerli" | "Polkadot" | "Westend" | "Solana" | "SolanaDevnet" | "Tezos" | "TezosGhostnet" | "XrpLedger" | "XrpLedgerTestnet" | "KeyEdDSA" | "KeyECDSA" | "KeyECDSAStark";
1777
+ name?: string | undefined;
1778
+ }[];
1779
+ };
1780
+ export type RegisterEndUserResponse = {
1781
+ credential: {
1782
+ uuid: string;
1783
+ kind: "Fido2" | "Key" | "Password" | "Totp" | "RecoveryKey";
1784
+ name: string;
1785
+ };
1786
+ user: {
1787
+ id: string;
1788
+ username: string;
1789
+ orgId: string;
1790
+ };
1791
+ wallets: {
1792
+ id: string;
1793
+ network: "Algorand" | "AlgorandTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Bitcoin" | "BitcoinTestnet3" | "Bsc" | "BscTestnet" | "Cardano" | "CardanoPreprod" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "FantomOpera" | "FantomTestnet" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Polkadot" | "Westend" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Solana" | "SolanaDevnet" | "Tezos" | "TezosGhostnet" | "Tron" | "TronNile" | "XrpLedger" | "XrpLedgerTestnet" | "KeyECDSA" | "KeyECDSAStark" | "KeyEdDSA";
1794
+ address?: string | undefined;
1795
+ signingKey: {
1796
+ scheme: "ECDSA" | "EdDSA";
1797
+ curve: "ed25519" | "secp256k1" | "stark";
1798
+ publicKey: string;
1799
+ };
1800
+ status: "Active" | "Archived";
1801
+ dateCreated: string;
1802
+ name?: string | undefined;
1803
+ custodial: boolean;
1804
+ imported?: boolean | undefined;
1805
+ exported?: boolean | undefined;
1806
+ dateExported?: string | undefined;
1807
+ externalId?: string | undefined;
1808
+ tags?: string[] | undefined;
1809
+ }[];
1810
+ };
1811
+ export type RegisterEndUserRequest = {
1812
+ body: RegisterEndUserBody;
1813
+ };
1814
+ export type ResendRegistrationCodeBody = {
1815
+ username: string;
1816
+ orgId: string;
1817
+ };
1818
+ export type ResendRegistrationCodeResponse = {
1819
+ message: string;
1820
+ };
1821
+ export type ResendRegistrationCodeRequest = {
1822
+ body: ResendRegistrationCodeBody;
1823
+ };
1824
+ export type SendRecoveryCodeBody = {
1825
+ username: string;
1826
+ orgId: string;
1827
+ };
1828
+ export type SendRecoveryCodeResponse = {
1829
+ message: string;
1830
+ };
1831
+ export type SendRecoveryCodeRequest = {
1832
+ body: SendRecoveryCodeBody;
1833
+ };
1834
+ export type UpdateApplicationBody = {
1835
+ externalId?: string | undefined;
1836
+ name?: string | undefined;
1837
+ };
1838
+ export type UpdateApplicationParams = {
1839
+ appId: string;
1840
+ };
1841
+ export type UpdateApplicationResponse = {
1842
+ appId: string;
1843
+ kind: "ServerSideApplication" | "ClientSideApplication";
1844
+ orgId: string;
1845
+ expectedRpId: string;
1846
+ name: string;
1847
+ isActive: boolean;
1848
+ expectedOrigin: string;
1849
+ permissionAssignments: {
1850
+ permissionName: string;
1851
+ permissionId: string;
1852
+ assignmentId: string;
1853
+ operations?: string[] | undefined;
1854
+ }[];
1855
+ accessTokens: {
1856
+ accessToken?: string | undefined;
1857
+ dateCreated: string;
1858
+ credId: string;
1859
+ isActive: boolean;
1860
+ kind: "ServiceAccount" | "Pat" | "Application";
1861
+ linkedUserId: string;
1862
+ linkedAppId: string;
1863
+ name: string;
1864
+ orgId: string;
1865
+ permissionAssignments: {
1866
+ permissionName: string;
1867
+ permissionId: string;
1868
+ assignmentId: string;
1869
+ operations?: string[] | undefined;
1870
+ }[];
1871
+ publicKey: string;
1872
+ tokenId: string;
1873
+ }[];
1874
+ };
1875
+ export type UpdateApplicationRequest = UpdateApplicationParams & {
1876
+ body: UpdateApplicationBody;
1877
+ };
1878
+ export type UpdatePersonalAccessTokenBody = {
1879
+ name?: string | undefined;
1880
+ externalId?: string | undefined;
1881
+ };
1882
+ export type UpdatePersonalAccessTokenParams = {
1883
+ tokenId: string;
1884
+ };
1885
+ export type UpdatePersonalAccessTokenResponse = {
1886
+ accessToken?: string | undefined;
1887
+ dateCreated: string;
1888
+ credId: string;
1889
+ isActive: boolean;
1890
+ kind: "ServiceAccount" | "Pat" | "Application";
1891
+ linkedUserId: string;
1892
+ linkedAppId: string;
1893
+ name: string;
1894
+ orgId: string;
1895
+ permissionAssignments: {
1896
+ permissionName: string;
1897
+ permissionId: string;
1898
+ assignmentId: string;
1899
+ operations?: string[] | undefined;
1900
+ }[];
1901
+ publicKey: string;
1902
+ tokenId: string;
1903
+ };
1904
+ export type UpdatePersonalAccessTokenRequest = UpdatePersonalAccessTokenParams & {
1905
+ body: UpdatePersonalAccessTokenBody;
1906
+ };
1907
+ export type UpdateServiceAccountBody = {
1908
+ name?: string | undefined;
1909
+ externalId?: string | undefined;
1910
+ };
1911
+ export type UpdateServiceAccountParams = {
1912
+ serviceAccountId: string;
1913
+ };
1914
+ export type UpdateServiceAccountResponse = {
1915
+ userInfo: {
1916
+ username: string;
1917
+ userId: string;
1918
+ kind: "EndUser" | "CustomerEmployee" | "DfnsStaff";
1919
+ credentialUuid: string;
1920
+ orgId: string;
1921
+ permissions?: string[] | undefined;
1922
+ scopes?: string[] | undefined;
1923
+ isActive: boolean;
1924
+ isServiceAccount: boolean;
1925
+ isRegistered: boolean;
1926
+ permissionAssignments: {
1927
+ permissionName: string;
1928
+ permissionId: string;
1929
+ assignmentId: string;
1930
+ operations?: string[] | undefined;
1931
+ }[];
1932
+ };
1933
+ accessTokens: {
1934
+ accessToken?: string | undefined;
1935
+ dateCreated: string;
1936
+ credId: string;
1937
+ isActive: boolean;
1938
+ kind: "ServiceAccount" | "Pat" | "Application";
1939
+ linkedUserId: string;
1940
+ linkedAppId: string;
1941
+ name: string;
1942
+ orgId: string;
1943
+ permissionAssignments: {
1944
+ permissionName: string;
1945
+ permissionId: string;
1946
+ assignmentId: string;
1947
+ operations?: string[] | undefined;
1948
+ }[];
1949
+ publicKey: string;
1950
+ tokenId: string;
1951
+ }[];
1952
+ };
1953
+ export type UpdateServiceAccountRequest = UpdateServiceAccountParams & {
1954
+ body: UpdateServiceAccountBody;
1955
+ };
1956
+ export type UpdateUserBody = {
1957
+ externalId?: string | undefined;
1958
+ publicKey?: string | undefined;
1959
+ };
1960
+ export type UpdateUserParams = {
1961
+ userId: string;
1962
+ };
1963
+ export type UpdateUserResponse = {
1964
+ username: string;
1965
+ userId: string;
1966
+ kind: "EndUser" | "CustomerEmployee" | "DfnsStaff";
1967
+ credentialUuid: string;
1968
+ orgId: string;
1969
+ permissions?: string[] | undefined;
1970
+ scopes?: string[] | undefined;
1971
+ isActive: boolean;
1972
+ isServiceAccount: boolean;
1973
+ isRegistered: boolean;
1974
+ permissionAssignments: {
1975
+ permissionName: string;
1976
+ permissionId: string;
1977
+ assignmentId: string;
1978
+ operations?: string[] | undefined;
1979
+ }[];
1980
+ };
1981
+ export type UpdateUserRequest = UpdateUserParams & {
1982
+ body: UpdateUserBody;
1983
+ };