@dfns/sdk 0.1.0-beta.3 → 0.1.0-beta.4
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/codegen/Auth/AuthClient.d.ts +1 -0
- package/codegen/Auth/AuthClient.js +12 -0
- package/codegen/Auth/DelegatedAuthClient.d.ts +2 -0
- package/codegen/Auth/DelegatedAuthClient.js +27 -0
- package/codegen/Auth/types.d.ts +4 -0
- package/codegen/datamodel/Auth/responses.d.ts +5 -0
- package/codegen/datamodel/Auth/types.d.ts +4 -0
- package/codegen/datamodel/Wallets/types.d.ts +3 -0
- package/codegen/datamodel/Wallets/types.js +6 -0
- package/package.json +1 -1
|
@@ -46,4 +46,5 @@ export declare class AuthClient {
|
|
|
46
46
|
deactivateApplication(request: T.DeactivateApplicationRequest): Promise<T.DeactivateApplicationResponse>;
|
|
47
47
|
createUserRecovery(request: T.CreateUserRecoveryRequest): Promise<T.CreateUserRecoveryResponse>;
|
|
48
48
|
restartDelegatedUserRegistration(request: T.RestartDelegatedUserRegistrationRequest): Promise<T.RestartDelegatedUserRegistrationResponse>;
|
|
49
|
+
createDelegatedUserRecovery(request: T.CreateDelegatedUserRecoveryRequest): Promise<T.CreateDelegatedUserRecoveryResponse>;
|
|
49
50
|
}
|
|
@@ -502,5 +502,17 @@ class AuthClient {
|
|
|
502
502
|
});
|
|
503
503
|
return response.json();
|
|
504
504
|
}
|
|
505
|
+
async createDelegatedUserRecovery(request) {
|
|
506
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/recover/user/delegated', {
|
|
507
|
+
path: {},
|
|
508
|
+
query: {},
|
|
509
|
+
});
|
|
510
|
+
const response = await (0, fetch_1.userActionFetch)(path, {
|
|
511
|
+
method: 'POST',
|
|
512
|
+
body: request.body,
|
|
513
|
+
apiOptions: this.apiOptions,
|
|
514
|
+
});
|
|
515
|
+
return response.json();
|
|
516
|
+
}
|
|
505
517
|
}
|
|
506
518
|
exports.AuthClient = AuthClient;
|
|
@@ -73,4 +73,6 @@ export declare class DelegatedAuthClient {
|
|
|
73
73
|
createUserRecovery(request: T.CreateUserRecoveryRequest): Promise<T.CreateUserRecoveryResponse>;
|
|
74
74
|
restartDelegatedUserRegistrationInit(request: T.RestartDelegatedUserRegistrationRequest): Promise<UserActionChallengeResponse>;
|
|
75
75
|
restartDelegatedUserRegistrationComplete(request: T.RestartDelegatedUserRegistrationRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.RestartDelegatedUserRegistrationResponse>;
|
|
76
|
+
createDelegatedUserRecoveryInit(request: T.CreateDelegatedUserRecoveryRequest): Promise<UserActionChallengeResponse>;
|
|
77
|
+
createDelegatedUserRecoveryComplete(request: T.CreateDelegatedUserRecoveryRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreateDelegatedUserRecoveryResponse>;
|
|
76
78
|
}
|
|
@@ -905,5 +905,32 @@ class DelegatedAuthClient {
|
|
|
905
905
|
});
|
|
906
906
|
return response.json();
|
|
907
907
|
}
|
|
908
|
+
async createDelegatedUserRecoveryInit(request) {
|
|
909
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/recover/user/delegated', {
|
|
910
|
+
path: {},
|
|
911
|
+
query: {},
|
|
912
|
+
});
|
|
913
|
+
const challenge = await baseAuthApi_1.BaseAuthApi.createUserActionChallenge({
|
|
914
|
+
userActionHttpMethod: 'POST',
|
|
915
|
+
userActionHttpPath: path,
|
|
916
|
+
userActionPayload: JSON.stringify(request.body),
|
|
917
|
+
userActionServerKind: 'Api',
|
|
918
|
+
}, this.apiOptions);
|
|
919
|
+
return challenge;
|
|
920
|
+
}
|
|
921
|
+
async createDelegatedUserRecoveryComplete(request, signedChallenge) {
|
|
922
|
+
const path = (0, url_1.buildPathAndQuery)('/auth/recover/user/delegated', {
|
|
923
|
+
path: {},
|
|
924
|
+
query: {},
|
|
925
|
+
});
|
|
926
|
+
const { userAction } = await baseAuthApi_1.BaseAuthApi.signUserActionChallenge(signedChallenge, this.apiOptions);
|
|
927
|
+
const response = await (0, fetch_1.simpleFetch)(path, {
|
|
928
|
+
method: 'POST',
|
|
929
|
+
body: request.body,
|
|
930
|
+
headers: { 'x-dfns-useraction': userAction },
|
|
931
|
+
apiOptions: this.apiOptions,
|
|
932
|
+
});
|
|
933
|
+
return response.json();
|
|
934
|
+
}
|
|
908
935
|
}
|
|
909
936
|
exports.DelegatedAuthClient = DelegatedAuthClient;
|
package/codegen/Auth/types.d.ts
CHANGED
|
@@ -171,3 +171,7 @@ export type RestartDelegatedUserRegistrationRequest = {
|
|
|
171
171
|
body: Auth.CreateUserInput;
|
|
172
172
|
};
|
|
173
173
|
export type RestartDelegatedUserRegistrationResponse = Auth.UserRegistrationChallenge;
|
|
174
|
+
export type CreateDelegatedUserRecoveryRequest = {
|
|
175
|
+
body: Auth.CreateDelegatedUserRecoveryInput;
|
|
176
|
+
};
|
|
177
|
+
export type CreateDelegatedUserRecoveryResponse = Auth.UserRecoveryChallenge;
|
|
@@ -351,3 +351,8 @@ export type RestartDelegatedUserRegistrationError = {
|
|
|
351
351
|
error: UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
352
352
|
};
|
|
353
353
|
export type RestartDelegatedUserRegistrationResponse = RestartDelegatedUserRegistrationSuccess | RestartDelegatedUserRegistrationError;
|
|
354
|
+
export type CreateDelegatedUserRecoverySuccess = UserRecoveryChallenge;
|
|
355
|
+
export type CreateDelegatedUserRecoveryError = {
|
|
356
|
+
error: UnauthorizedError | ForbiddenError | BadRequestError | EntityNotFoundError;
|
|
357
|
+
};
|
|
358
|
+
export type CreateDelegatedUserRecoveryResponse = CreateDelegatedUserRecoverySuccess | CreateDelegatedUserRecoveryError;
|
|
@@ -539,6 +539,10 @@ export type CreateUserRecoveryChallengeInput = {
|
|
|
539
539
|
orgId: EntityId;
|
|
540
540
|
credentialId: string;
|
|
541
541
|
};
|
|
542
|
+
export type CreateDelegatedUserRecoveryInput = {
|
|
543
|
+
username: string;
|
|
544
|
+
credentialId: string;
|
|
545
|
+
};
|
|
542
546
|
export type CreateUserCredentialInput = CreateUserCredentialTotpInput | CreateUserCredentialPasswordInput | CreateUserCredentialPublicKeyInput | CreateUserCredentialFido2Input | CreateUserCredentialRecoveryKeyInput;
|
|
543
547
|
export type UserCredentialChallenge = Fido2Options | PublicKeyOptions | TotpCredential | PasswordCredential;
|
|
544
548
|
export type SignedAuthAttestation = LegacyAuthAttestation | AuthV2SignedAuthAttestation;
|
|
@@ -286,6 +286,7 @@ export declare enum TransferDirection {
|
|
|
286
286
|
}
|
|
287
287
|
export declare enum TransferStatus {
|
|
288
288
|
Pending = "Pending",
|
|
289
|
+
Executing = "Executing",
|
|
289
290
|
Broadcasted = "Broadcasted",
|
|
290
291
|
Confirmed = "Confirmed",
|
|
291
292
|
Failed = "Failed",
|
|
@@ -293,6 +294,7 @@ export declare enum TransferStatus {
|
|
|
293
294
|
}
|
|
294
295
|
export declare enum TransactionStatus {
|
|
295
296
|
Pending = "Pending",
|
|
297
|
+
Executing = "Executing",
|
|
296
298
|
Broadcasted = "Broadcasted",
|
|
297
299
|
Confirmed = "Confirmed",
|
|
298
300
|
Failed = "Failed",
|
|
@@ -300,6 +302,7 @@ export declare enum TransactionStatus {
|
|
|
300
302
|
}
|
|
301
303
|
export declare enum SignatureStatus {
|
|
302
304
|
Pending = "Pending",
|
|
305
|
+
Executing = "Executing",
|
|
303
306
|
Signed = "Signed",
|
|
304
307
|
Confirmed = "Confirmed",
|
|
305
308
|
Failed = "Failed",
|
|
@@ -80,6 +80,8 @@ var TransferStatus;
|
|
|
80
80
|
(function (TransferStatus) {
|
|
81
81
|
// FIXME: Missing documentation for Pending
|
|
82
82
|
TransferStatus["Pending"] = "Pending";
|
|
83
|
+
// FIXME: Missing documentation for Executing
|
|
84
|
+
TransferStatus["Executing"] = "Executing";
|
|
83
85
|
// FIXME: Missing documentation for Broadcasted
|
|
84
86
|
TransferStatus["Broadcasted"] = "Broadcasted";
|
|
85
87
|
// FIXME: Missing documentation for Confirmed
|
|
@@ -94,6 +96,8 @@ var TransactionStatus;
|
|
|
94
96
|
(function (TransactionStatus) {
|
|
95
97
|
// FIXME: Missing documentation for Pending
|
|
96
98
|
TransactionStatus["Pending"] = "Pending";
|
|
99
|
+
// FIXME: Missing documentation for Executing
|
|
100
|
+
TransactionStatus["Executing"] = "Executing";
|
|
97
101
|
// FIXME: Missing documentation for Broadcasted
|
|
98
102
|
TransactionStatus["Broadcasted"] = "Broadcasted";
|
|
99
103
|
// FIXME: Missing documentation for Confirmed
|
|
@@ -108,6 +112,8 @@ var SignatureStatus;
|
|
|
108
112
|
(function (SignatureStatus) {
|
|
109
113
|
// FIXME: Missing documentation for Pending
|
|
110
114
|
SignatureStatus["Pending"] = "Pending";
|
|
115
|
+
// FIXME: Missing documentation for Executing
|
|
116
|
+
SignatureStatus["Executing"] = "Executing";
|
|
111
117
|
// FIXME: Missing documentation for Signed
|
|
112
118
|
SignatureStatus["Signed"] = "Signed";
|
|
113
119
|
// FIXME: Missing documentation for Confirmed
|