@pear-protocol/types 2.10.0 → 2.11.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/dist/vaults/responses.d.ts +60 -0
- package/dist/vaults/responses.js +17 -1
- package/package.json +1 -1
|
@@ -146,6 +146,66 @@ export declare const SetTraderResponse: z.ZodObject<{
|
|
|
146
146
|
}, z.core.$strip>], "success">;
|
|
147
147
|
}, z.core.$strip>;
|
|
148
148
|
export type SetTraderResponse = z.output<typeof SetTraderResponse>;
|
|
149
|
+
/** Bare update-metadata outcome: completed with the fresh vault, or still running past the route budget. */
|
|
150
|
+
export declare const UpdateVaultMetadataResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
151
|
+
success: z.ZodLiteral<true>;
|
|
152
|
+
vault: z.ZodObject<{
|
|
153
|
+
id: z.ZodString;
|
|
154
|
+
vaultAddress: z.ZodPipe<z.ZodString, z.ZodTransform<EthereumAddress, string>>;
|
|
155
|
+
ownerAddress: z.ZodPipe<z.ZodString, z.ZodTransform<EthereumAddress, string>>;
|
|
156
|
+
traderAddress: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<EthereumAddress, string>>>;
|
|
157
|
+
agentAddress: z.ZodPipe<z.ZodString, z.ZodTransform<EthereumAddress, string>>;
|
|
158
|
+
status: z.ZodEnum<{
|
|
159
|
+
active: "active";
|
|
160
|
+
inactive: "inactive";
|
|
161
|
+
pending_activation: "pending_activation";
|
|
162
|
+
}>;
|
|
163
|
+
isApproved: z.ZodBoolean;
|
|
164
|
+
name: z.ZodNullable<z.ZodString>;
|
|
165
|
+
about: z.ZodNullable<z.ZodString>;
|
|
166
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
167
|
+
transactionHash: z.ZodNullable<z.ZodString>;
|
|
168
|
+
maxWithdrawalPeriodDays: z.ZodNumber;
|
|
169
|
+
createdAt: z.ZodString;
|
|
170
|
+
updatedAt: z.ZodString;
|
|
171
|
+
}, z.core.$strip>;
|
|
172
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
173
|
+
success: z.ZodLiteral<false>;
|
|
174
|
+
status: z.ZodLiteral<"in_progress">;
|
|
175
|
+
activityId: z.ZodString;
|
|
176
|
+
}, z.core.$strip>], "success">;
|
|
177
|
+
export type UpdateVaultMetadataResult = z.output<typeof UpdateVaultMetadataResult>;
|
|
178
|
+
/** Wire envelope: the union sits under `result` so the route can carry a DTO. */
|
|
179
|
+
export declare const UpdateVaultMetadataResponse: z.ZodObject<{
|
|
180
|
+
result: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
181
|
+
success: z.ZodLiteral<true>;
|
|
182
|
+
vault: z.ZodObject<{
|
|
183
|
+
id: z.ZodString;
|
|
184
|
+
vaultAddress: z.ZodPipe<z.ZodString, z.ZodTransform<EthereumAddress, string>>;
|
|
185
|
+
ownerAddress: z.ZodPipe<z.ZodString, z.ZodTransform<EthereumAddress, string>>;
|
|
186
|
+
traderAddress: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<EthereumAddress, string>>>;
|
|
187
|
+
agentAddress: z.ZodPipe<z.ZodString, z.ZodTransform<EthereumAddress, string>>;
|
|
188
|
+
status: z.ZodEnum<{
|
|
189
|
+
active: "active";
|
|
190
|
+
inactive: "inactive";
|
|
191
|
+
pending_activation: "pending_activation";
|
|
192
|
+
}>;
|
|
193
|
+
isApproved: z.ZodBoolean;
|
|
194
|
+
name: z.ZodNullable<z.ZodString>;
|
|
195
|
+
about: z.ZodNullable<z.ZodString>;
|
|
196
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
197
|
+
transactionHash: z.ZodNullable<z.ZodString>;
|
|
198
|
+
maxWithdrawalPeriodDays: z.ZodNumber;
|
|
199
|
+
createdAt: z.ZodString;
|
|
200
|
+
updatedAt: z.ZodString;
|
|
201
|
+
}, z.core.$strip>;
|
|
202
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
203
|
+
success: z.ZodLiteral<false>;
|
|
204
|
+
status: z.ZodLiteral<"in_progress">;
|
|
205
|
+
activityId: z.ZodString;
|
|
206
|
+
}, z.core.$strip>], "success">;
|
|
207
|
+
}, z.core.$strip>;
|
|
208
|
+
export type UpdateVaultMetadataResponse = z.output<typeof UpdateVaultMetadataResponse>;
|
|
149
209
|
export declare const BulkSnapshotsResponse: z.ZodObject<{
|
|
150
210
|
snapshots: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
151
211
|
timestamp: z.ZodNumber;
|
package/dist/vaults/responses.js
CHANGED
|
@@ -48,6 +48,22 @@ const SetTraderResult = z.discriminatedUnion("success", [
|
|
|
48
48
|
const SetTraderResponse = z.object({
|
|
49
49
|
result: SetTraderResult
|
|
50
50
|
});
|
|
51
|
+
const UpdateVaultMetadataCompleted = z.object({
|
|
52
|
+
success: z.literal(true),
|
|
53
|
+
vault: Vault
|
|
54
|
+
});
|
|
55
|
+
const UpdateVaultMetadataInProgress = z.object({
|
|
56
|
+
success: z.literal(false),
|
|
57
|
+
status: z.literal("in_progress"),
|
|
58
|
+
activityId: z.string()
|
|
59
|
+
});
|
|
60
|
+
const UpdateVaultMetadataResult = z.discriminatedUnion("success", [
|
|
61
|
+
UpdateVaultMetadataCompleted,
|
|
62
|
+
UpdateVaultMetadataInProgress
|
|
63
|
+
]);
|
|
64
|
+
const UpdateVaultMetadataResponse = z.object({
|
|
65
|
+
result: UpdateVaultMetadataResult
|
|
66
|
+
});
|
|
51
67
|
const BulkSnapshotsResponse = z.object({
|
|
52
68
|
snapshots: z.record(z.string(), z.array(BulkSnapshotPoint))
|
|
53
69
|
});
|
|
@@ -356,4 +372,4 @@ const VaultServiceError = z.discriminatedUnion("error", [
|
|
|
356
372
|
})
|
|
357
373
|
]);
|
|
358
374
|
|
|
359
|
-
export { ActivityItemResponse, ActivityResponse, AgentApproveResponse, AgentApproveResult, AgentBalancesResponse, BulkSnapshotsResponse, CreatedVaultResponse, CreatedVaultResult, NavRangeResponse, NavSnapshotResponse, NavStatsResponse, SetTraderResponse, SetTraderResult, UnifiedAccountResponse, VaultEventListResponse, VaultInvestmentsResponse, VaultListResponse, VaultOverviewResponse, VaultRequestIssue, VaultResponse, VaultServiceError, VaultStatsResponse, WithdrawToEvmResponse, WithdrawToEvmResult };
|
|
375
|
+
export { ActivityItemResponse, ActivityResponse, AgentApproveResponse, AgentApproveResult, AgentBalancesResponse, BulkSnapshotsResponse, CreatedVaultResponse, CreatedVaultResult, NavRangeResponse, NavSnapshotResponse, NavStatsResponse, SetTraderResponse, SetTraderResult, UnifiedAccountResponse, UpdateVaultMetadataResponse, UpdateVaultMetadataResult, VaultEventListResponse, VaultInvestmentsResponse, VaultListResponse, VaultOverviewResponse, VaultRequestIssue, VaultResponse, VaultServiceError, VaultStatsResponse, WithdrawToEvmResponse, WithdrawToEvmResult };
|