@dfns/sdk 0.7.12-rc.1 → 0.7.13-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dfnsError.d.ts +2 -2
- package/generated/auth/client.d.ts +1 -0
- package/generated/auth/client.js +12 -0
- package/generated/auth/delegatedClient.d.ts +1 -0
- package/generated/auth/delegatedClient.js +12 -0
- package/generated/auth/types.d.ts +115 -61
- package/generated/exchanges/types.d.ts +188 -36
- package/generated/keys/types.d.ts +300 -0
- package/generated/networks/types.d.ts +44 -21
- package/generated/policies/types.d.ts +903 -51
- package/generated/staking/types.d.ts +136 -0
- package/generated/swaps/types.d.ts +110 -10
- package/generated/wallets/types.d.ts +845 -84
- package/package.json +3 -3
package/dfnsError.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare class DfnsError extends Error {
|
|
2
2
|
httpStatus: number;
|
|
3
|
-
context?: unknown;
|
|
3
|
+
context?: unknown | undefined;
|
|
4
4
|
name: string;
|
|
5
|
-
constructor(httpStatus: number, message: string, context?: unknown);
|
|
5
|
+
constructor(httpStatus: number, message: string, context?: unknown | undefined);
|
|
6
6
|
toString(): string;
|
|
7
7
|
}
|
|
8
8
|
export declare class PolicyPendingError extends DfnsError {
|
|
@@ -70,6 +70,7 @@ export declare class AuthClient {
|
|
|
70
70
|
sendRecoveryCode(request: T.SendRecoveryCodeRequest): Promise<T.SendRecoveryCodeResponse>;
|
|
71
71
|
socialLogin(request: T.SocialLoginRequest): Promise<T.SocialLoginResponse>;
|
|
72
72
|
sSOLogin(request: T.SSOLoginRequest): Promise<T.SSOLoginResponse>;
|
|
73
|
+
sSOLoginInit(request: T.SSOLoginInitRequest): Promise<T.SSOLoginInitResponse>;
|
|
73
74
|
updatePersonalAccessToken(request: T.UpdatePersonalAccessTokenRequest): Promise<T.UpdatePersonalAccessTokenResponse>;
|
|
74
75
|
updateServiceAccount(request: T.UpdateServiceAccountRequest): Promise<T.UpdateServiceAccountResponse>;
|
|
75
76
|
updateUser(request: T.UpdateUserRequest): Promise<T.UpdateUserResponse>;
|
package/generated/auth/client.js
CHANGED
|
@@ -622,6 +622,18 @@ class AuthClient {
|
|
|
622
622
|
});
|
|
623
623
|
return response.json();
|
|
624
624
|
}
|
|
625
|
+
async sSOLoginInit(request) {
|
|
626
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/login/sso/init', {
|
|
627
|
+
path: request ?? {},
|
|
628
|
+
query: {},
|
|
629
|
+
});
|
|
630
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
631
|
+
method: 'POST',
|
|
632
|
+
body: request.body,
|
|
633
|
+
apiOptions: this.apiOptions,
|
|
634
|
+
});
|
|
635
|
+
return response.json();
|
|
636
|
+
}
|
|
625
637
|
async updatePersonalAccessToken(request) {
|
|
626
638
|
const path = (0, url_1.buildPathAndQuery)('/auth/pats/:tokenId', {
|
|
627
639
|
path: request ?? {},
|
|
@@ -82,6 +82,7 @@ export declare class DelegatedAuthClient {
|
|
|
82
82
|
sendRecoveryCode(request: T.SendRecoveryCodeRequest): Promise<T.SendRecoveryCodeResponse>;
|
|
83
83
|
socialLogin(request: T.SocialLoginRequest): Promise<T.SocialLoginResponse>;
|
|
84
84
|
sSOLogin(request: T.SSOLoginRequest): Promise<T.SSOLoginResponse>;
|
|
85
|
+
sSOLoginInit(request: T.SSOLoginInitRequest): Promise<T.SSOLoginInitResponse>;
|
|
85
86
|
updatePersonalAccessTokenInit(request: T.UpdatePersonalAccessTokenRequest): Promise<UserActionChallengeResponse>;
|
|
86
87
|
updatePersonalAccessTokenComplete(request: T.UpdatePersonalAccessTokenRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.UpdatePersonalAccessTokenResponse>;
|
|
87
88
|
updateServiceAccountInit(request: T.UpdateServiceAccountRequest): Promise<UserActionChallengeResponse>;
|
|
@@ -890,6 +890,18 @@ class DelegatedAuthClient {
|
|
|
890
890
|
});
|
|
891
891
|
return response.json();
|
|
892
892
|
}
|
|
893
|
+
async sSOLoginInit(request) {
|
|
894
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/login/sso/init', {
|
|
895
|
+
path: request ?? {},
|
|
896
|
+
query: {},
|
|
897
|
+
});
|
|
898
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
899
|
+
method: 'POST',
|
|
900
|
+
body: request.body,
|
|
901
|
+
apiOptions: this.apiOptions,
|
|
902
|
+
});
|
|
903
|
+
return response.json();
|
|
904
|
+
}
|
|
893
905
|
async updatePersonalAccessTokenInit(request) {
|
|
894
906
|
const path = (0, url_1.buildPathAndQuery)('/auth/pats/:tokenId', {
|
|
895
907
|
path: request ?? {},
|
|
@@ -15,6 +15,7 @@ export type ActivatePersonalAccessTokenResponse = {
|
|
|
15
15
|
dateCreated: string;
|
|
16
16
|
credId: string;
|
|
17
17
|
isActive: boolean;
|
|
18
|
+
/** Access token kind */
|
|
18
19
|
kind: "Pat" | "ServiceAccount" | "Token" | "Code" | "Recovery" | "Temp" | "Application";
|
|
19
20
|
linkedUserId: string;
|
|
20
21
|
linkedAppId: string;
|
|
@@ -57,6 +58,7 @@ export type ActivateServiceAccountResponse = {
|
|
|
57
58
|
dateCreated: string;
|
|
58
59
|
credId: string;
|
|
59
60
|
isActive: boolean;
|
|
61
|
+
/** Access token kind */
|
|
60
62
|
kind: "Pat" | "ServiceAccount" | "Token" | "Code" | "Recovery" | "Temp" | "Application";
|
|
61
63
|
linkedUserId: string;
|
|
62
64
|
linkedAppId: string;
|
|
@@ -104,6 +106,7 @@ export type ArchivePersonalAccessTokenResponse = {
|
|
|
104
106
|
dateCreated: string;
|
|
105
107
|
credId: string;
|
|
106
108
|
isActive: boolean;
|
|
109
|
+
/** Access token kind */
|
|
107
110
|
kind: "Pat" | "ServiceAccount" | "Token" | "Code" | "Recovery" | "Temp" | "Application";
|
|
108
111
|
linkedUserId: string;
|
|
109
112
|
linkedAppId: string;
|
|
@@ -146,6 +149,7 @@ export type ArchiveServiceAccountResponse = {
|
|
|
146
149
|
dateCreated: string;
|
|
147
150
|
credId: string;
|
|
148
151
|
isActive: boolean;
|
|
152
|
+
/** Access token kind */
|
|
149
153
|
kind: "Pat" | "ServiceAccount" | "Token" | "Code" | "Recovery" | "Temp" | "Application";
|
|
150
154
|
linkedUserId: string;
|
|
151
155
|
linkedAppId: string;
|
|
@@ -214,27 +218,27 @@ export type CreateCredentialBody = {
|
|
|
214
218
|
credentialName: string;
|
|
215
219
|
challengeIdentifier: string;
|
|
216
220
|
} | {
|
|
217
|
-
credentialKind: "
|
|
221
|
+
credentialKind: "RecoveryKey";
|
|
218
222
|
credentialInfo: {
|
|
219
|
-
|
|
223
|
+
credId: string;
|
|
224
|
+
clientData: string;
|
|
225
|
+
attestationData: string;
|
|
220
226
|
};
|
|
227
|
+
encryptedPrivateKey?: string | undefined;
|
|
221
228
|
credentialName: string;
|
|
222
229
|
challengeIdentifier: string;
|
|
223
230
|
} | {
|
|
224
|
-
credentialKind: "
|
|
231
|
+
credentialKind: "Password";
|
|
225
232
|
credentialInfo: {
|
|
226
|
-
|
|
233
|
+
password: string;
|
|
227
234
|
};
|
|
228
235
|
credentialName: string;
|
|
229
236
|
challengeIdentifier: string;
|
|
230
237
|
} | {
|
|
231
|
-
credentialKind: "
|
|
238
|
+
credentialKind: "Totp";
|
|
232
239
|
credentialInfo: {
|
|
233
|
-
|
|
234
|
-
clientData: string;
|
|
235
|
-
attestationData: string;
|
|
240
|
+
otpCode: string;
|
|
236
241
|
};
|
|
237
|
-
encryptedPrivateKey?: string | undefined;
|
|
238
242
|
credentialName: string;
|
|
239
243
|
challengeIdentifier: string;
|
|
240
244
|
};
|
|
@@ -256,35 +260,6 @@ export type CreateCredentialChallengeBody = {
|
|
|
256
260
|
kind: "Fido2" | "Key" | "Password" | "Totp" | "RecoveryKey" | "PasswordProtectedKey";
|
|
257
261
|
};
|
|
258
262
|
export type CreateCredentialChallengeResponse = {
|
|
259
|
-
kind: "Password";
|
|
260
|
-
user: {
|
|
261
|
-
id: string;
|
|
262
|
-
displayName: string;
|
|
263
|
-
name: string;
|
|
264
|
-
};
|
|
265
|
-
challengeIdentifier: string;
|
|
266
|
-
rp?: {
|
|
267
|
-
id: string;
|
|
268
|
-
name: string;
|
|
269
|
-
} | undefined;
|
|
270
|
-
/** @deprecated use challengeIdentifier instead */
|
|
271
|
-
temporaryAuthenticationToken: string;
|
|
272
|
-
} | {
|
|
273
|
-
kind: "Totp";
|
|
274
|
-
user: {
|
|
275
|
-
id: string;
|
|
276
|
-
displayName: string;
|
|
277
|
-
name: string;
|
|
278
|
-
};
|
|
279
|
-
challengeIdentifier: string;
|
|
280
|
-
rp?: {
|
|
281
|
-
id: string;
|
|
282
|
-
name: string;
|
|
283
|
-
} | undefined;
|
|
284
|
-
otpUrl: string;
|
|
285
|
-
/** @deprecated use challengeIdentifier instead */
|
|
286
|
-
temporaryAuthenticationToken: string;
|
|
287
|
-
} | {
|
|
288
263
|
kind: "Fido2";
|
|
289
264
|
user: {
|
|
290
265
|
id: string;
|
|
@@ -374,15 +349,7 @@ export type CreateCredentialChallengeResponse = {
|
|
|
374
349
|
}[];
|
|
375
350
|
/** @deprecated use challengeIdentifier instead */
|
|
376
351
|
temporaryAuthenticationToken: string;
|
|
377
|
-
}
|
|
378
|
-
export type CreateCredentialChallengeRequest = {
|
|
379
|
-
body: CreateCredentialChallengeBody;
|
|
380
|
-
};
|
|
381
|
-
export type CreateCredentialChallengeWithCodeBody = {
|
|
382
|
-
credentialKind: "Fido2" | "Key" | "Password" | "Totp" | "RecoveryKey" | "PasswordProtectedKey";
|
|
383
|
-
code: string;
|
|
384
|
-
};
|
|
385
|
-
export type CreateCredentialChallengeWithCodeResponse = {
|
|
352
|
+
} | {
|
|
386
353
|
kind: "Password";
|
|
387
354
|
user: {
|
|
388
355
|
id: string;
|
|
@@ -411,7 +378,15 @@ export type CreateCredentialChallengeWithCodeResponse = {
|
|
|
411
378
|
otpUrl: string;
|
|
412
379
|
/** @deprecated use challengeIdentifier instead */
|
|
413
380
|
temporaryAuthenticationToken: string;
|
|
414
|
-
}
|
|
381
|
+
};
|
|
382
|
+
export type CreateCredentialChallengeRequest = {
|
|
383
|
+
body: CreateCredentialChallengeBody;
|
|
384
|
+
};
|
|
385
|
+
export type CreateCredentialChallengeWithCodeBody = {
|
|
386
|
+
credentialKind: "Fido2" | "Key" | "Password" | "Totp" | "RecoveryKey" | "PasswordProtectedKey";
|
|
387
|
+
code: string;
|
|
388
|
+
};
|
|
389
|
+
export type CreateCredentialChallengeWithCodeResponse = {
|
|
415
390
|
kind: "Fido2";
|
|
416
391
|
user: {
|
|
417
392
|
id: string;
|
|
@@ -501,6 +476,35 @@ export type CreateCredentialChallengeWithCodeResponse = {
|
|
|
501
476
|
}[];
|
|
502
477
|
/** @deprecated use challengeIdentifier instead */
|
|
503
478
|
temporaryAuthenticationToken: string;
|
|
479
|
+
} | {
|
|
480
|
+
kind: "Password";
|
|
481
|
+
user: {
|
|
482
|
+
id: string;
|
|
483
|
+
displayName: string;
|
|
484
|
+
name: string;
|
|
485
|
+
};
|
|
486
|
+
challengeIdentifier: string;
|
|
487
|
+
rp?: {
|
|
488
|
+
id: string;
|
|
489
|
+
name: string;
|
|
490
|
+
} | undefined;
|
|
491
|
+
/** @deprecated use challengeIdentifier instead */
|
|
492
|
+
temporaryAuthenticationToken: string;
|
|
493
|
+
} | {
|
|
494
|
+
kind: "Totp";
|
|
495
|
+
user: {
|
|
496
|
+
id: string;
|
|
497
|
+
displayName: string;
|
|
498
|
+
name: string;
|
|
499
|
+
};
|
|
500
|
+
challengeIdentifier: string;
|
|
501
|
+
rp?: {
|
|
502
|
+
id: string;
|
|
503
|
+
name: string;
|
|
504
|
+
} | undefined;
|
|
505
|
+
otpUrl: string;
|
|
506
|
+
/** @deprecated use challengeIdentifier instead */
|
|
507
|
+
temporaryAuthenticationToken: string;
|
|
504
508
|
};
|
|
505
509
|
export type CreateCredentialChallengeWithCodeRequest = {
|
|
506
510
|
body: CreateCredentialChallengeWithCodeBody;
|
|
@@ -545,27 +549,27 @@ export type CreateCredentialWithCodeBody = {
|
|
|
545
549
|
credentialName: string;
|
|
546
550
|
challengeIdentifier: string;
|
|
547
551
|
} | {
|
|
548
|
-
credentialKind: "
|
|
552
|
+
credentialKind: "RecoveryKey";
|
|
549
553
|
credentialInfo: {
|
|
550
|
-
|
|
554
|
+
credId: string;
|
|
555
|
+
clientData: string;
|
|
556
|
+
attestationData: string;
|
|
551
557
|
};
|
|
558
|
+
encryptedPrivateKey?: string | undefined;
|
|
552
559
|
credentialName: string;
|
|
553
560
|
challengeIdentifier: string;
|
|
554
561
|
} | {
|
|
555
|
-
credentialKind: "
|
|
562
|
+
credentialKind: "Password";
|
|
556
563
|
credentialInfo: {
|
|
557
|
-
|
|
564
|
+
password: string;
|
|
558
565
|
};
|
|
559
566
|
credentialName: string;
|
|
560
567
|
challengeIdentifier: string;
|
|
561
568
|
} | {
|
|
562
|
-
credentialKind: "
|
|
569
|
+
credentialKind: "Totp";
|
|
563
570
|
credentialInfo: {
|
|
564
|
-
|
|
565
|
-
clientData: string;
|
|
566
|
-
attestationData: string;
|
|
571
|
+
otpCode: string;
|
|
567
572
|
};
|
|
568
|
-
encryptedPrivateKey?: string | undefined;
|
|
569
573
|
credentialName: string;
|
|
570
574
|
challengeIdentifier: string;
|
|
571
575
|
};
|
|
@@ -855,6 +859,7 @@ export type CreateServiceAccountResponse = {
|
|
|
855
859
|
dateCreated: string;
|
|
856
860
|
credId: string;
|
|
857
861
|
isActive: boolean;
|
|
862
|
+
/** Access token kind */
|
|
858
863
|
kind: "Pat" | "ServiceAccount" | "Token" | "Code" | "Recovery" | "Temp" | "Application";
|
|
859
864
|
linkedUserId: string;
|
|
860
865
|
linkedAppId: string;
|
|
@@ -915,9 +920,13 @@ export type CreateSocialRegistrationChallengeRequest = {
|
|
|
915
920
|
body: CreateSocialRegistrationChallengeBody;
|
|
916
921
|
};
|
|
917
922
|
export type CreateUserBody = {
|
|
923
|
+
/** The email address of the new user. */
|
|
918
924
|
email: string;
|
|
925
|
+
/** The kind of user being created.
|
|
926
|
+
In this endpoint it can only be "`CustomerEmployee`" (creating an "`EndUser`" is done through the [Delegated Registration](https://docs.dfns.co/api-reference/auth/registration-flows#delegated-users-registration-flow) endpoint) */
|
|
919
927
|
kind: "CustomerEmployee" | "DfnsStaff";
|
|
920
928
|
publicKey?: string | undefined;
|
|
929
|
+
/** Value that can be used to correlate the entity with an external system. */
|
|
921
930
|
externalId?: string | undefined;
|
|
922
931
|
/** If set to true, the user will have to authenticate via SSO */
|
|
923
932
|
isSSORequired?: boolean;
|
|
@@ -985,7 +994,9 @@ export type CreateUserActionChallengeRequest = {
|
|
|
985
994
|
body: CreateUserActionChallengeBody;
|
|
986
995
|
};
|
|
987
996
|
export type CreateUserActionSignatureBody = {
|
|
997
|
+
/** Temporary authentication token returned by the [Create User Action Signature Challenge](https://docs.dfns.co/api-reference/auth/create-user-action-challenge) */
|
|
988
998
|
challengeIdentifier: string;
|
|
999
|
+
/** First factor credential used to sign the user action */
|
|
989
1000
|
firstFactor: {
|
|
990
1001
|
kind: "Fido2";
|
|
991
1002
|
credentialAssertion: {
|
|
@@ -1016,6 +1027,7 @@ export type CreateUserActionSignatureBody = {
|
|
|
1016
1027
|
algorithm?: string | undefined;
|
|
1017
1028
|
};
|
|
1018
1029
|
};
|
|
1030
|
+
/** Second factor credential used to authenticate a user */
|
|
1019
1031
|
secondFactor?: ({
|
|
1020
1032
|
kind: "Fido2";
|
|
1021
1033
|
credentialAssertion: {
|
|
@@ -1070,6 +1082,7 @@ export type DeactivatePersonalAccessTokenResponse = {
|
|
|
1070
1082
|
dateCreated: string;
|
|
1071
1083
|
credId: string;
|
|
1072
1084
|
isActive: boolean;
|
|
1085
|
+
/** Access token kind */
|
|
1073
1086
|
kind: "Pat" | "ServiceAccount" | "Token" | "Code" | "Recovery" | "Temp" | "Application";
|
|
1074
1087
|
linkedUserId: string;
|
|
1075
1088
|
linkedAppId: string;
|
|
@@ -1112,6 +1125,7 @@ export type DeactivateServiceAccountResponse = {
|
|
|
1112
1125
|
dateCreated: string;
|
|
1113
1126
|
credId: string;
|
|
1114
1127
|
isActive: boolean;
|
|
1128
|
+
/** Access token kind */
|
|
1115
1129
|
kind: "Pat" | "ServiceAccount" | "Token" | "Code" | "Recovery" | "Temp" | "Application";
|
|
1116
1130
|
linkedUserId: string;
|
|
1117
1131
|
linkedAppId: string;
|
|
@@ -1182,6 +1196,7 @@ export type GetApplicationResponse = {
|
|
|
1182
1196
|
dateCreated: string;
|
|
1183
1197
|
credId: string;
|
|
1184
1198
|
isActive: boolean;
|
|
1199
|
+
/** Access token kind */
|
|
1185
1200
|
kind: "Pat" | "ServiceAccount" | "Token" | "Code" | "Recovery" | "Temp" | "Application";
|
|
1186
1201
|
linkedUserId: string;
|
|
1187
1202
|
linkedAppId: string;
|
|
@@ -1228,6 +1243,7 @@ export type GetPersonalAccessTokenResponse = {
|
|
|
1228
1243
|
dateCreated: string;
|
|
1229
1244
|
credId: string;
|
|
1230
1245
|
isActive: boolean;
|
|
1246
|
+
/** Access token kind */
|
|
1231
1247
|
kind: "Pat" | "ServiceAccount" | "Token" | "Code" | "Recovery" | "Temp" | "Application";
|
|
1232
1248
|
linkedUserId: string;
|
|
1233
1249
|
linkedAppId: string;
|
|
@@ -1270,6 +1286,7 @@ export type GetServiceAccountResponse = {
|
|
|
1270
1286
|
dateCreated: string;
|
|
1271
1287
|
credId: string;
|
|
1272
1288
|
isActive: boolean;
|
|
1289
|
+
/** Access token kind */
|
|
1273
1290
|
kind: "Pat" | "ServiceAccount" | "Token" | "Code" | "Recovery" | "Temp" | "Application";
|
|
1274
1291
|
linkedUserId: string;
|
|
1275
1292
|
linkedAppId: string;
|
|
@@ -1329,6 +1346,7 @@ export type ListApplicationsResponse = {
|
|
|
1329
1346
|
dateCreated: string;
|
|
1330
1347
|
credId: string;
|
|
1331
1348
|
isActive: boolean;
|
|
1349
|
+
/** Access token kind */
|
|
1332
1350
|
kind: "Pat" | "ServiceAccount" | "Token" | "Code" | "Recovery" | "Temp" | "Application";
|
|
1333
1351
|
linkedUserId: string;
|
|
1334
1352
|
linkedAppId: string;
|
|
@@ -1373,6 +1391,7 @@ export type ListPersonalAccessTokensResponse = {
|
|
|
1373
1391
|
dateCreated: string;
|
|
1374
1392
|
credId: string;
|
|
1375
1393
|
isActive: boolean;
|
|
1394
|
+
/** Access token kind */
|
|
1376
1395
|
kind: "Pat" | "ServiceAccount" | "Token" | "Code" | "Recovery" | "Temp" | "Application";
|
|
1377
1396
|
linkedUserId: string;
|
|
1378
1397
|
linkedAppId: string;
|
|
@@ -1413,6 +1432,7 @@ export type ListServiceAccountsResponse = {
|
|
|
1413
1432
|
dateCreated: string;
|
|
1414
1433
|
credId: string;
|
|
1415
1434
|
isActive: boolean;
|
|
1435
|
+
/** Access token kind */
|
|
1416
1436
|
kind: "Pat" | "ServiceAccount" | "Token" | "Code" | "Recovery" | "Temp" | "Application";
|
|
1417
1437
|
linkedUserId: string;
|
|
1418
1438
|
linkedAppId: string;
|
|
@@ -1460,7 +1480,9 @@ export type ListUsersRequest = {
|
|
|
1460
1480
|
query?: ListUsersQuery;
|
|
1461
1481
|
};
|
|
1462
1482
|
export type LoginBody = {
|
|
1483
|
+
/** Temporary authentication token returned by the [Create User Action Signature Challenge](https://docs.dfns.co/api-reference/auth/create-user-action-challenge) */
|
|
1463
1484
|
challengeIdentifier: string;
|
|
1485
|
+
/** First factor credential used to sign the user action */
|
|
1464
1486
|
firstFactor: {
|
|
1465
1487
|
kind: "Fido2";
|
|
1466
1488
|
credentialAssertion: {
|
|
@@ -1491,6 +1513,7 @@ export type LoginBody = {
|
|
|
1491
1513
|
algorithm?: string | undefined;
|
|
1492
1514
|
};
|
|
1493
1515
|
};
|
|
1516
|
+
/** Second factor credential used to authenticate a user */
|
|
1494
1517
|
secondFactor?: ({
|
|
1495
1518
|
kind: "Fido2";
|
|
1496
1519
|
credentialAssertion: {
|
|
@@ -1525,7 +1548,7 @@ export type LoginBody = {
|
|
|
1525
1548
|
export type LoginResponse = {
|
|
1526
1549
|
token: string;
|
|
1527
1550
|
} | {
|
|
1528
|
-
|
|
1551
|
+
ssoClientId: string;
|
|
1529
1552
|
};
|
|
1530
1553
|
export type LoginRequest = {
|
|
1531
1554
|
body: LoginBody;
|
|
@@ -1614,6 +1637,7 @@ export type RecoverBody = {
|
|
|
1614
1637
|
encryptedPrivateKey: string;
|
|
1615
1638
|
credentialName?: string | undefined;
|
|
1616
1639
|
}) | undefined;
|
|
1640
|
+
/** Register a recovery key. See [Account Recovery](https://docs.dfns.co/api-reference/auth/account-recovery) for more details. */
|
|
1617
1641
|
recoveryCredential?: {
|
|
1618
1642
|
credentialKind: "RecoveryKey";
|
|
1619
1643
|
credentialInfo: {
|
|
@@ -1706,6 +1730,7 @@ export type RegisterBody = {
|
|
|
1706
1730
|
encryptedPrivateKey: string;
|
|
1707
1731
|
credentialName?: string | undefined;
|
|
1708
1732
|
}) | undefined;
|
|
1733
|
+
/** Register a recovery key. See [Account Recovery](https://docs.dfns.co/api-reference/auth/account-recovery) for more details. */
|
|
1709
1734
|
recoveryCredential?: {
|
|
1710
1735
|
credentialKind: "RecoveryKey";
|
|
1711
1736
|
credentialInfo: {
|
|
@@ -1797,6 +1822,7 @@ export type RegisterEndUserBody = {
|
|
|
1797
1822
|
encryptedPrivateKey: string;
|
|
1798
1823
|
credentialName?: string | undefined;
|
|
1799
1824
|
}) | undefined;
|
|
1825
|
+
/** Register a recovery key. See [Account Recovery](https://docs.dfns.co/api-reference/auth/account-recovery) for more details. */
|
|
1800
1826
|
recoveryCredential?: {
|
|
1801
1827
|
credentialKind: "RecoveryKey";
|
|
1802
1828
|
credentialInfo: {
|
|
@@ -1827,21 +1853,34 @@ export type RegisterEndUserResponse = {
|
|
|
1827
1853
|
token: string;
|
|
1828
1854
|
};
|
|
1829
1855
|
wallets: {
|
|
1856
|
+
/** ID of the wallet. */
|
|
1830
1857
|
id: string;
|
|
1858
|
+
/** Network this wallet is bound to. */
|
|
1831
1859
|
network: ("Algorand" | "AlgorandTestnet" | "Aptos" | "AptosTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Adi" | "AdiTestnet" | "BabylonGenesis" | "BabylonTestnet5" | "Base" | "BaseGoerli" | "BaseSepolia" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "BitcoinCash" | "BitcoinCashTestnet" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Canton" | "CantonDevnet" | "CantonTestnet" | "Cardano" | "CardanoPreprod" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "CosmosHub4" | "CosmosIcsTestnet" | "Dogecoin" | "DogecoinTestnet" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "Hedera" | "HederaTestnet" | "Ink" | "InkSepolia" | "InternetComputer" | "Ion" | "IonTestnet" | "Iota" | "IotaTestnet" | "IotaZodianet" | "KadenaTestnet4" | "KadenaTestnet4:1" | "KadenaTestnet4:2" | "KadenaTestnet4:3" | "KadenaTestnet4:4" | "KadenaTestnet4:5" | "KadenaTestnet4:6" | "KadenaTestnet4:7" | "KadenaTestnet4:8" | "KadenaTestnet4:9" | "KadenaTestnet4:10" | "KadenaTestnet4:11" | "KadenaTestnet4:12" | "KadenaTestnet4:13" | "KadenaTestnet4:14" | "KadenaTestnet4:15" | "KadenaTestnet4:16" | "KadenaTestnet4:17" | "KadenaTestnet4:18" | "KadenaTestnet4:19" | "Kadena" | "Kadena:1" | "Kadena:2" | "Kadena:3" | "Kadena:4" | "Kadena:5" | "Kadena:6" | "Kadena:7" | "Kadena:8" | "Kadena:9" | "Kadena:10" | "Kadena:11" | "Kadena:12" | "Kadena:13" | "Kadena:14" | "Kadena:15" | "Kadena:16" | "Kadena:17" | "Kadena:18" | "Kadena:19" | "Kaspa" | "KaspaTestnet11" | "Kusama" | "Litecoin" | "LitecoinTestnet" | "Near" | "NearTestnet" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Origyn" | "Plume" | "PlumeSepolia" | "Polkadot" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Polymesh" | "PolymeshTestnet" | "Race" | "RaceSepolia" | "SeiAtlantic2" | "SeiPacific1" | "Solana" | "SolanaDevnet" | "Sonic" | "SonicTestnet" | "Stellar" | "StellarTestnet" | "Sui" | "SuiTestnet" | "Tsc" | "TscTestnet1" | "Tezos" | "TezosGhostnet" | "Ton" | "TonTestnet" | "Tron" | "TronNile" | "Westend" | "XrpLedger" | "XrpLedgerTestnet") | ("KeyECDSA" | "KeyEdDSA" | "KeyECDSAStark");
|
|
1860
|
+
/** Wallet address on its corresponding network. */
|
|
1832
1861
|
address?: string | undefined;
|
|
1862
|
+
/** Details about the key underlying the wallet. */
|
|
1833
1863
|
signingKey: {
|
|
1834
1864
|
id: string;
|
|
1865
|
+
/** Key scheme. */
|
|
1835
1866
|
scheme: "DH" | "ECDSA" | "EdDSA" | "Schnorr";
|
|
1836
1867
|
curve: "ed25519" | "secp256k1" | "stark";
|
|
1868
|
+
/** Hex-encoded value of the public key. */
|
|
1837
1869
|
publicKey: string;
|
|
1870
|
+
/** The end user ID the key (and wallet) is delegated to. */
|
|
1838
1871
|
delegatedTo?: string | undefined;
|
|
1839
1872
|
};
|
|
1873
|
+
/** Wallet status. */
|
|
1840
1874
|
status: "Active" | "Archived";
|
|
1875
|
+
/** [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date string when wallet was created. */
|
|
1841
1876
|
dateCreated: string;
|
|
1877
|
+
/** Wallet nickname. */
|
|
1842
1878
|
name?: string | undefined;
|
|
1879
|
+
/** Whether the wallet is owned by an end user (non-custodial), or by your organization (custodial). */
|
|
1843
1880
|
custodial: boolean;
|
|
1881
|
+
/** User-defined value that can be used to correlate the entity with an external system. */
|
|
1844
1882
|
externalId?: string | undefined;
|
|
1883
|
+
/** List of tags. */
|
|
1845
1884
|
tags: string[];
|
|
1846
1885
|
/** Id of the validator on which the wallet is created for Canton networks */
|
|
1847
1886
|
validatorId?: string | undefined;
|
|
@@ -1892,11 +1931,10 @@ export type SocialLoginRequest = {
|
|
|
1892
1931
|
body: SocialLoginBody;
|
|
1893
1932
|
};
|
|
1894
1933
|
export type SSOLoginBody = {
|
|
1895
|
-
orgId: string;
|
|
1896
1934
|
/** Authorization code obtained from the IdP */
|
|
1897
1935
|
code: string;
|
|
1898
|
-
/**
|
|
1899
|
-
|
|
1936
|
+
/** State forwarded by the IdP */
|
|
1937
|
+
state: string;
|
|
1900
1938
|
};
|
|
1901
1939
|
export type SSOLoginResponse = {
|
|
1902
1940
|
token: string;
|
|
@@ -1904,6 +1942,20 @@ export type SSOLoginResponse = {
|
|
|
1904
1942
|
export type SSOLoginRequest = {
|
|
1905
1943
|
body: SSOLoginBody;
|
|
1906
1944
|
};
|
|
1945
|
+
export type SSOLoginInitBody = {
|
|
1946
|
+
orgId: string;
|
|
1947
|
+
/** Client Id obtained from the IdP */
|
|
1948
|
+
clientId: string;
|
|
1949
|
+
/** Redirect URI used for the authentication flow */
|
|
1950
|
+
redirectUri: string;
|
|
1951
|
+
};
|
|
1952
|
+
export type SSOLoginInitResponse = {
|
|
1953
|
+
/** The URL to redirect the user to authenticate with the IdP */
|
|
1954
|
+
ssoRedirectUrl: string;
|
|
1955
|
+
};
|
|
1956
|
+
export type SSOLoginInitRequest = {
|
|
1957
|
+
body: SSOLoginInitBody;
|
|
1958
|
+
};
|
|
1907
1959
|
export type UpdatePersonalAccessTokenBody = {
|
|
1908
1960
|
name?: string | undefined;
|
|
1909
1961
|
externalId?: string | undefined;
|
|
@@ -1916,6 +1968,7 @@ export type UpdatePersonalAccessTokenResponse = {
|
|
|
1916
1968
|
dateCreated: string;
|
|
1917
1969
|
credId: string;
|
|
1918
1970
|
isActive: boolean;
|
|
1971
|
+
/** Access token kind */
|
|
1919
1972
|
kind: "Pat" | "ServiceAccount" | "Token" | "Code" | "Recovery" | "Temp" | "Application";
|
|
1920
1973
|
linkedUserId: string;
|
|
1921
1974
|
linkedAppId: string;
|
|
@@ -1964,6 +2017,7 @@ export type UpdateServiceAccountResponse = {
|
|
|
1964
2017
|
dateCreated: string;
|
|
1965
2018
|
credId: string;
|
|
1966
2019
|
isActive: boolean;
|
|
2020
|
+
/** Access token kind */
|
|
1967
2021
|
kind: "Pat" | "ServiceAccount" | "Token" | "Code" | "Recovery" | "Temp" | "Application";
|
|
1968
2022
|
linkedUserId: string;
|
|
1969
2023
|
linkedAppId: string;
|