@argent/x-shared 1.32.4 → 1.32.6

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.
@@ -1,5 +1,14 @@
1
1
  import { z } from 'zod';
2
2
 
3
+ export declare enum RecoveryStatusEnum {
4
+ NOT_STARTED = "NOT_STARTED",
5
+ ONGOING = "ONGOING",
6
+ AWAITING_FUNDS = "AWAITING_FUNDS",
7
+ AWAITING_COMPLETION = "AWAITING_COMPLETION",
8
+ COMPLETED = "COMPLETED",
9
+ CANCELLED = "CANCELLED",
10
+ ERROR = "ERROR"
11
+ }
3
12
  export declare const startOnchainRecoverySchema: z.ZodObject<{
4
13
  recoveryId: z.ZodNumber;
5
14
  }, "strip", z.ZodTypeAny, {
@@ -60,45 +69,45 @@ export declare const recoveryBodySchema: z.ZodObject<{
60
69
  };
61
70
  };
62
71
  }>;
63
- export declare const recoveryStatusSchema: z.ZodEnum<["NOT_STARTED", "ONGOING", "AWAITING_FUNDS", "AWAITING_COMPLETION", "COMPLETED", "CANCELLED", "ERROR"]>;
72
+ export declare const recoveryStatusSchema: z.ZodNativeEnum<typeof RecoveryStatusEnum>;
64
73
  export declare const recoveryBaseSchema: z.ZodObject<{
65
74
  recoveryId: z.ZodNumber;
66
- status: z.ZodEnum<["NOT_STARTED", "ONGOING", "AWAITING_FUNDS", "AWAITING_COMPLETION", "COMPLETED", "CANCELLED", "ERROR"]>;
75
+ status: z.ZodNativeEnum<typeof RecoveryStatusEnum>;
67
76
  completionTime: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
68
77
  }, "strip", z.ZodTypeAny, {
69
- status: "NOT_STARTED" | "ONGOING" | "AWAITING_FUNDS" | "AWAITING_COMPLETION" | "COMPLETED" | "CANCELLED" | "ERROR";
78
+ status: RecoveryStatusEnum;
70
79
  recoveryId: number;
71
80
  completionTime?: number[] | undefined;
72
81
  }, {
73
- status: "NOT_STARTED" | "ONGOING" | "AWAITING_FUNDS" | "AWAITING_COMPLETION" | "COMPLETED" | "CANCELLED" | "ERROR";
82
+ status: RecoveryStatusEnum;
74
83
  recoveryId: number;
75
84
  completionTime?: number[] | undefined;
76
85
  }>;
77
86
  export declare const activeOnchainRecoverySchema: z.ZodObject<{
78
87
  activeRecovery: z.ZodOptional<z.ZodUnion<[z.ZodOptional<z.ZodObject<{
79
88
  recoveryId: z.ZodNumber;
80
- status: z.ZodEnum<["NOT_STARTED", "ONGOING", "AWAITING_FUNDS", "AWAITING_COMPLETION", "COMPLETED", "CANCELLED", "ERROR"]>;
89
+ status: z.ZodNativeEnum<typeof RecoveryStatusEnum>;
81
90
  completionTime: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
82
91
  }, "strip", z.ZodTypeAny, {
83
- status: "NOT_STARTED" | "ONGOING" | "AWAITING_FUNDS" | "AWAITING_COMPLETION" | "COMPLETED" | "CANCELLED" | "ERROR";
92
+ status: RecoveryStatusEnum;
84
93
  recoveryId: number;
85
94
  completionTime?: number[] | undefined;
86
95
  }, {
87
- status: "NOT_STARTED" | "ONGOING" | "AWAITING_FUNDS" | "AWAITING_COMPLETION" | "COMPLETED" | "CANCELLED" | "ERROR";
96
+ status: RecoveryStatusEnum;
88
97
  recoveryId: number;
89
98
  completionTime?: number[] | undefined;
90
99
  }>>, z.ZodNull]>>;
91
100
  minFees: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
92
101
  }, "strip", z.ZodTypeAny, {
93
102
  activeRecovery?: {
94
- status: "NOT_STARTED" | "ONGOING" | "AWAITING_FUNDS" | "AWAITING_COMPLETION" | "COMPLETED" | "CANCELLED" | "ERROR";
103
+ status: RecoveryStatusEnum;
95
104
  recoveryId: number;
96
105
  completionTime?: number[] | undefined;
97
106
  } | null | undefined;
98
107
  minFees?: Record<string, number> | undefined;
99
108
  }, {
100
109
  activeRecovery?: {
101
- status: "NOT_STARTED" | "ONGOING" | "AWAITING_FUNDS" | "AWAITING_COMPLETION" | "COMPLETED" | "CANCELLED" | "ERROR";
110
+ status: RecoveryStatusEnum;
102
111
  recoveryId: number;
103
112
  completionTime?: number[] | undefined;
104
113
  } | null | undefined;
@@ -107,14 +116,14 @@ export declare const activeOnchainRecoverySchema: z.ZodObject<{
107
116
  export declare const onchainRecoverySchema: z.ZodObject<{
108
117
  recovery: z.ZodOptional<z.ZodUnion<[z.ZodOptional<z.ZodObject<{
109
118
  recoveryId: z.ZodNumber;
110
- status: z.ZodEnum<["NOT_STARTED", "ONGOING", "AWAITING_FUNDS", "AWAITING_COMPLETION", "COMPLETED", "CANCELLED", "ERROR"]>;
119
+ status: z.ZodNativeEnum<typeof RecoveryStatusEnum>;
111
120
  completionTime: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
112
121
  }, "strip", z.ZodTypeAny, {
113
- status: "NOT_STARTED" | "ONGOING" | "AWAITING_FUNDS" | "AWAITING_COMPLETION" | "COMPLETED" | "CANCELLED" | "ERROR";
122
+ status: RecoveryStatusEnum;
114
123
  recoveryId: number;
115
124
  completionTime?: number[] | undefined;
116
125
  }, {
117
- status: "NOT_STARTED" | "ONGOING" | "AWAITING_FUNDS" | "AWAITING_COMPLETION" | "COMPLETED" | "CANCELLED" | "ERROR";
126
+ status: RecoveryStatusEnum;
118
127
  recoveryId: number;
119
128
  completionTime?: number[] | undefined;
120
129
  }>>, z.ZodNull]>>;
@@ -122,25 +131,30 @@ export declare const onchainRecoverySchema: z.ZodObject<{
122
131
  }, "strip", z.ZodTypeAny, {
123
132
  minFees?: Record<string, number> | undefined;
124
133
  recovery?: {
125
- status: "NOT_STARTED" | "ONGOING" | "AWAITING_FUNDS" | "AWAITING_COMPLETION" | "COMPLETED" | "CANCELLED" | "ERROR";
134
+ status: RecoveryStatusEnum;
126
135
  recoveryId: number;
127
136
  completionTime?: number[] | undefined;
128
137
  } | null | undefined;
129
138
  }, {
130
139
  minFees?: Record<string, number> | undefined;
131
140
  recovery?: {
132
- status: "NOT_STARTED" | "ONGOING" | "AWAITING_FUNDS" | "AWAITING_COMPLETION" | "COMPLETED" | "CANCELLED" | "ERROR";
141
+ status: RecoveryStatusEnum;
133
142
  recoveryId: number;
134
143
  completionTime?: number[] | undefined;
135
144
  } | null | undefined;
136
145
  }>;
137
- export declare const startOnchainRecoveryErrorStatusSchema: z.ZodEnum<["undeployedAccount", "notEnoughToPayFees"]>;
146
+ export declare enum StartOnchainRecoveryErrorStatusEnum {
147
+ UNDEPLOYED_ACCOUNT = "undeployedAccount",
148
+ NOT_ENOUGH_TO_PAY_FEES = "notEnoughToPayFees",
149
+ RECOVERY_ALREADY_EXISTS = "recoveryAlreadyExists"
150
+ }
151
+ export declare const startOnchainRecoveryErrorStatusSchema: z.ZodNativeEnum<typeof StartOnchainRecoveryErrorStatusEnum>;
138
152
  export declare const startOnchainRecoveryErrorSchema: z.ZodObject<{
139
- status: z.ZodEnum<["undeployedAccount", "notEnoughToPayFees"]>;
153
+ status: z.ZodNativeEnum<typeof StartOnchainRecoveryErrorStatusEnum>;
140
154
  }, "strip", z.ZodTypeAny, {
141
- status: "undeployedAccount" | "notEnoughToPayFees";
155
+ status: StartOnchainRecoveryErrorStatusEnum;
142
156
  }, {
143
- status: "undeployedAccount" | "notEnoughToPayFees";
157
+ status: StartOnchainRecoveryErrorStatusEnum;
144
158
  }>;
145
159
  export type StartOnchainRecovery = z.infer<typeof startOnchainRecoverySchema>;
146
160
  export type OnchainRecovery = z.infer<typeof onchainRecoverySchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@argent/x-shared",
3
- "version": "1.32.4",
3
+ "version": "1.32.6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/argentlabs/x-shared.git"