aboutsummaryrefslogtreecommitdiff
path: root/packages/anastasis-core/src/reducer-types.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-10-21 13:11:17 +0200
committerFlorian Dold <florian@dold.me>2021-10-21 13:11:33 +0200
commit0ee669f52341a8331394a1e9892264c0ef0bb7d7 (patch)
tree5a4d1a02ad6acd0dd04edde2dc032160c299700f /packages/anastasis-core/src/reducer-types.ts
parentcf25f5698e9f3a3b36930e545f7cce9829fb08f6 (diff)
downloadwallet-core-0ee669f52341a8331394a1e9892264c0ef0bb7d7.tar.xz
reducer WIP, user error boundaries in UI
Diffstat (limited to 'packages/anastasis-core/src/reducer-types.ts')
-rw-r--r--packages/anastasis-core/src/reducer-types.ts51
1 files changed, 32 insertions, 19 deletions
diff --git a/packages/anastasis-core/src/reducer-types.ts b/packages/anastasis-core/src/reducer-types.ts
index 44761ea0a..4c73dfa66 100644
--- a/packages/anastasis-core/src/reducer-types.ts
+++ b/packages/anastasis-core/src/reducer-types.ts
@@ -93,6 +93,22 @@ export interface UserAttributeSpec {
widget: string;
}
+export interface RecoveryInternalData {
+ secret_name: string;
+ provider_url: string;
+ version: number;
+}
+
+export interface RecoveryInformation {
+ challenges: ChallengeInfo[];
+ policies: {
+ /**
+ * UUID of the associated challenge.
+ */
+ uuid: string;
+ }[][];
+}
+
export interface ReducerStateRecovery {
backup_state?: undefined;
recovery_state: RecoveryStates;
@@ -102,23 +118,20 @@ export interface ReducerStateRecovery {
continents?: any;
countries?: any;
+
+ selected_continent?: string;
+ selected_country?: string;
+ currencies?: string[];
+
required_attributes?: any;
- recovery_information?: {
- challenges: ChallengeInfo[];
- policies: {
- /**
- * UUID of the associated challenge.
- */
- uuid: string;
- }[][];
- };
+ /**
+ * Recovery information, used by the UI.
+ */
+ recovery_information?: RecoveryInformation;
- recovery_document?: {
- secret_name: string;
- provider_url: string;
- version: number;
- };
+ // FIXME: This should really be renamed to recovery_internal_data
+ recovery_document?: RecoveryInternalData;
selected_challenge_uuid?: string;
@@ -129,11 +142,7 @@ export interface ReducerStateRecovery {
value: string;
};
- authentication_providers?: {
- [url: string]: {
- business_name: string;
- };
- };
+ authentication_providers?: { [url: string]: AuthenticationProviderStatus };
recovery_error?: any;
}
@@ -244,3 +253,7 @@ export interface ActionArgEnterSecret {
};
expiration: Duration;
}
+
+export interface ActionArgSelectChallenge {
+ uuid: string;
+}