refactor: callbacks and progress on actions

This commit is contained in:
Zack Spear
2023-06-19 17:45:02 -05:00
committed by Zack Spear
parent 6c88299566
commit ab795b2346
18 changed files with 349 additions and 215 deletions

View File

@@ -16,32 +16,16 @@ export interface UserInfo {
sub?: string;
username?: string;
}
export interface AuthUser extends CognitoUser {
attributes: UserInfo;
username?: string;
preferredMFA: ChallengeName;
signInUserSession: {
accessToken: {
jwtToken: string;
};
idToken: {
jwtToken: string;
};
refreshToken: {
token: string;
};
};
}
export interface CallbackSendPayload extends ServerAccountCallbackSendPayload, ServerPurchaseCallbackSendPayload {
export interface CallbackSendPayload {
server: ServerAccountCallbackSendPayload|ServerPurchaseCallbackSendPayload;
type: ServerStateDataActionType;
}
export interface CallbackAction {
apiKey?: string;
keyUrl?: string;
type: ServerStateDataActionType;
user?: AuthUser;
user?: UserInfo;
}
export interface CallbackReceivePayload {

View File

@@ -59,6 +59,7 @@ export interface ServerAccountCallbackSendPayload {
keyfile?: string;
locale?: string;
name?: string;
registered: boolean;
regGen?: number;
regGuid?: string;
state: string;