@ledgerhq/revault-api 1.43.1 → 1.43.2
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/lib/{app-types-C5PTn2QL.d.mts → app-types-TiTgl5lF.d.mts} +143 -1
- package/lib/fakes.d.mts +23 -3
- package/lib/fakes.mjs +1064 -26
- package/lib/fakes.mjs.map +1 -1
- package/lib/index.d.mts +22 -157
- package/package.json +1 -2
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import z__default, { z } from 'zod';
|
|
2
2
|
|
|
3
3
|
declare const zEstimatedFees: z__default.ZodDiscriminatedUnion<[z__default.ZodObject<{
|
|
4
|
+
type: z__default.ZodLiteral<"BITCOIN_LIKE">;
|
|
5
|
+
fee: z__default.ZodString;
|
|
6
|
+
}, z__default.core.$strip>, z__default.ZodObject<{
|
|
4
7
|
type: z__default.ZodLiteral<"ETHEREUM_LIKE">;
|
|
5
8
|
baseFees: z__default.ZodString;
|
|
6
9
|
gasLimit: z__default.ZodString;
|
|
@@ -1378,6 +1381,53 @@ declare const zTokenResponse: z__default.ZodObject<{
|
|
|
1378
1381
|
}, z__default.core.$strip>;
|
|
1379
1382
|
type TokenResponse = z__default.infer<typeof zTokenResponse>;
|
|
1380
1383
|
|
|
1384
|
+
declare const zGroupResponse: z__default.ZodObject<{
|
|
1385
|
+
id: z__default.ZodString;
|
|
1386
|
+
legacyId: z__default.ZodNumber;
|
|
1387
|
+
name: z__default.ZodString;
|
|
1388
|
+
description: z__default.ZodNullable<z__default.ZodString>;
|
|
1389
|
+
status: z__default.ZodEnum<{
|
|
1390
|
+
ACTIVE: "ACTIVE";
|
|
1391
|
+
INACTIVE: "INACTIVE";
|
|
1392
|
+
}>;
|
|
1393
|
+
members: z__default.ZodArray<z__default.ZodObject<{
|
|
1394
|
+
id: z__default.ZodString;
|
|
1395
|
+
legacyId: z__default.ZodNumber;
|
|
1396
|
+
legacyViewAll: z__default.ZodBoolean;
|
|
1397
|
+
workspaceName: z__default.ZodString;
|
|
1398
|
+
name: z__default.ZodString;
|
|
1399
|
+
deviceUserId: z__default.ZodNullable<z__default.ZodString>;
|
|
1400
|
+
deviceType: z__default.ZodEnum<{
|
|
1401
|
+
PSD: "PSD";
|
|
1402
|
+
SOFT_PSD: "SOFT_PSD";
|
|
1403
|
+
API: "API";
|
|
1404
|
+
}>;
|
|
1405
|
+
role: z__default.ZodEnum<{
|
|
1406
|
+
ADMIN: "ADMIN";
|
|
1407
|
+
OPERATOR: "OPERATOR";
|
|
1408
|
+
READ_ONLY_API_KEY: "READ_ONLY_API_KEY";
|
|
1409
|
+
}>;
|
|
1410
|
+
pubKey: z__default.ZodString;
|
|
1411
|
+
status: z__default.ZodEnum<{
|
|
1412
|
+
ACTIVE: "ACTIVE";
|
|
1413
|
+
INACTIVE: "INACTIVE";
|
|
1414
|
+
}>;
|
|
1415
|
+
isSuspended: z__default.ZodBoolean;
|
|
1416
|
+
createdAt: z__default.ZodCoercedDate<unknown>;
|
|
1417
|
+
updatedAt: z__default.ZodCoercedDate<unknown>;
|
|
1418
|
+
}, z__default.core.$strip>>;
|
|
1419
|
+
createdAt: z__default.ZodCoercedDate<unknown>;
|
|
1420
|
+
updatedAt: z__default.ZodCoercedDate<unknown>;
|
|
1421
|
+
}, z__default.core.$strip>;
|
|
1422
|
+
type GroupResponse = z__default.infer<typeof zGroupResponse>;
|
|
1423
|
+
declare const zGroupSortBy: z__default.ZodDefault<z__default.ZodEnum<{
|
|
1424
|
+
status: "status";
|
|
1425
|
+
name: "name";
|
|
1426
|
+
createdAt: "createdAt";
|
|
1427
|
+
updatedAt: "updatedAt";
|
|
1428
|
+
}>>;
|
|
1429
|
+
type GroupSortBy = z__default.infer<typeof zGroupSortBy>;
|
|
1430
|
+
|
|
1381
1431
|
declare const zSoftChallenge: z.ZodObject<{
|
|
1382
1432
|
challengeType: z.ZodLiteral<"SOFT">;
|
|
1383
1433
|
}, z.core.$strip>;
|
|
@@ -11713,4 +11763,96 @@ declare const zApproveVaultRequestInput: z__default.ZodObject<{
|
|
|
11713
11763
|
}, z__default.core.$strip>;
|
|
11714
11764
|
type ApproveVaultRequestInput = z__default.infer<typeof zApproveVaultRequestInput>;
|
|
11715
11765
|
|
|
11716
|
-
|
|
11766
|
+
declare const zUserResponse: z__default.ZodObject<{
|
|
11767
|
+
id: z__default.ZodString;
|
|
11768
|
+
legacyId: z__default.ZodNumber;
|
|
11769
|
+
legacyViewAll: z__default.ZodBoolean;
|
|
11770
|
+
workspaceName: z__default.ZodString;
|
|
11771
|
+
name: z__default.ZodString;
|
|
11772
|
+
deviceUserId: z__default.ZodNullable<z__default.ZodString>;
|
|
11773
|
+
deviceType: z__default.ZodEnum<{
|
|
11774
|
+
PSD: "PSD";
|
|
11775
|
+
SOFT_PSD: "SOFT_PSD";
|
|
11776
|
+
API: "API";
|
|
11777
|
+
}>;
|
|
11778
|
+
role: z__default.ZodEnum<{
|
|
11779
|
+
ADMIN: "ADMIN";
|
|
11780
|
+
OPERATOR: "OPERATOR";
|
|
11781
|
+
READ_ONLY_API_KEY: "READ_ONLY_API_KEY";
|
|
11782
|
+
}>;
|
|
11783
|
+
pubKey: z__default.ZodString;
|
|
11784
|
+
status: z__default.ZodEnum<{
|
|
11785
|
+
ACTIVE: "ACTIVE";
|
|
11786
|
+
INACTIVE: "INACTIVE";
|
|
11787
|
+
}>;
|
|
11788
|
+
isSuspended: z__default.ZodBoolean;
|
|
11789
|
+
createdAt: z__default.ZodCoercedDate<unknown>;
|
|
11790
|
+
updatedAt: z__default.ZodCoercedDate<unknown>;
|
|
11791
|
+
}, z__default.core.$strip>;
|
|
11792
|
+
type UserResponse = z__default.infer<typeof zUserResponse>;
|
|
11793
|
+
declare const zAdminResponse: z__default.ZodObject<{
|
|
11794
|
+
id: z__default.ZodString;
|
|
11795
|
+
legacyId: z__default.ZodNumber;
|
|
11796
|
+
legacyViewAll: z__default.ZodBoolean;
|
|
11797
|
+
workspaceName: z__default.ZodString;
|
|
11798
|
+
name: z__default.ZodString;
|
|
11799
|
+
deviceUserId: z__default.ZodNullable<z__default.ZodString>;
|
|
11800
|
+
deviceType: z__default.ZodEnum<{
|
|
11801
|
+
PSD: "PSD";
|
|
11802
|
+
SOFT_PSD: "SOFT_PSD";
|
|
11803
|
+
API: "API";
|
|
11804
|
+
}>;
|
|
11805
|
+
pubKey: z__default.ZodString;
|
|
11806
|
+
status: z__default.ZodEnum<{
|
|
11807
|
+
ACTIVE: "ACTIVE";
|
|
11808
|
+
INACTIVE: "INACTIVE";
|
|
11809
|
+
}>;
|
|
11810
|
+
isSuspended: z__default.ZodBoolean;
|
|
11811
|
+
createdAt: z__default.ZodCoercedDate<unknown>;
|
|
11812
|
+
updatedAt: z__default.ZodCoercedDate<unknown>;
|
|
11813
|
+
role: z__default.ZodLiteral<"ADMIN">;
|
|
11814
|
+
}, z__default.core.$strip>;
|
|
11815
|
+
type AdminResponse = z__default.infer<typeof zAdminResponse>;
|
|
11816
|
+
declare const zUserSortBy: z__default.ZodDefault<z__default.ZodEnum<{
|
|
11817
|
+
status: "status";
|
|
11818
|
+
name: "name";
|
|
11819
|
+
createdAt: "createdAt";
|
|
11820
|
+
updatedAt: "updatedAt";
|
|
11821
|
+
role: "role";
|
|
11822
|
+
}>>;
|
|
11823
|
+
type UserSortBy = z__default.infer<typeof zUserSortBy>;
|
|
11824
|
+
|
|
11825
|
+
declare const zWhitelistAddressResponse: z__default.ZodObject<{
|
|
11826
|
+
name: z__default.ZodString;
|
|
11827
|
+
currency: z__default.ZodString;
|
|
11828
|
+
address: z__default.ZodString;
|
|
11829
|
+
destinationTags: z__default.ZodOptional<z__default.ZodArray<z__default.ZodString>>;
|
|
11830
|
+
}, z__default.core.$strip>;
|
|
11831
|
+
declare const zWhitelistResponse: z__default.ZodObject<{
|
|
11832
|
+
id: z__default.ZodString;
|
|
11833
|
+
legacyId: z__default.ZodNumber;
|
|
11834
|
+
name: z__default.ZodString;
|
|
11835
|
+
status: z__default.ZodEnum<{
|
|
11836
|
+
ACTIVE: "ACTIVE";
|
|
11837
|
+
INACTIVE: "INACTIVE";
|
|
11838
|
+
}>;
|
|
11839
|
+
addresses: z__default.ZodArray<z__default.ZodObject<{
|
|
11840
|
+
name: z__default.ZodString;
|
|
11841
|
+
currency: z__default.ZodString;
|
|
11842
|
+
address: z__default.ZodString;
|
|
11843
|
+
destinationTags: z__default.ZodOptional<z__default.ZodArray<z__default.ZodString>>;
|
|
11844
|
+
}, z__default.core.$strip>>;
|
|
11845
|
+
createdAt: z__default.ZodCoercedDate<unknown>;
|
|
11846
|
+
updatedAt: z__default.ZodCoercedDate<unknown>;
|
|
11847
|
+
description: z__default.ZodNullable<z__default.ZodString>;
|
|
11848
|
+
}, z__default.core.$strip>;
|
|
11849
|
+
type WhitelistResponse = z__default.infer<typeof zWhitelistResponse>;
|
|
11850
|
+
declare const zWhitelistSortBy: z__default.ZodDefault<z__default.ZodEnum<{
|
|
11851
|
+
status: "status";
|
|
11852
|
+
name: "name";
|
|
11853
|
+
createdAt: "createdAt";
|
|
11854
|
+
updatedAt: "updatedAt";
|
|
11855
|
+
}>>;
|
|
11856
|
+
type WhitelistSortBy = z__default.infer<typeof zWhitelistSortBy>;
|
|
11857
|
+
|
|
11858
|
+
export { type AssetResponse as A, zChallengeResponse as B, type CurrencyResponse as C, type ChallengeResponse as D, genTransactionSchemas as E, zApproveVaultRequestInput as F, type GroupResponse as G, type ApproveVaultRequestInput as H, type Challenge as I, zUserResponse as J, zAdminResponse as K, type AdminResponse as L, zUserSortBy as M, type UserSortBy as N, zWhitelistAddressResponse as O, zWhitelistResponse as P, zWhitelistSortBy as Q, type RequestSortBy as R, type SoftChallenge as S, type TransactionResponse as T, type UserResponse as U, type VaultRequestCreateInput as V, type WhitelistResponse as W, type WhitelistSortBy as X, type TransactionData as Y, type AccountFreshAddress as a, type AccountLiveDataResponse as b, type AccountResponse as c, type AccountSortBy as d, zAccountLiveDataResponse as e, zAccountResponse as f, zAccountSortBy as g, zBalance as h, zStake as i, zStakeSortBy as j, zStakingValidator as k, zStakingValidatorSortBy as l, zEstimatedFees as m, type TokenResponse as n, zAssetCapabilitiesResponse as o, zAssetResponse as p, zCurrencyResponse as q, zTokenResponse as r, zGroupResponse as s, zGroupSortBy as t, type GroupSortBy as u, zVaultRequestCreateInput as v, zVaultRequestResponse as w, type VaultRequestResponse as x, zRequestSortBy as y, zAccountFreshAddress as z };
|
package/lib/fakes.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AssetResponse,
|
|
2
|
-
import {
|
|
1
|
+
import { A as AssetResponse, Y as TransactionData, I as Challenge, c as AccountResponse, G as GroupResponse, U as UserResponse, x as VaultRequestResponse, W as WhitelistResponse } from './app-types-TiTgl5lF.mjs';
|
|
2
|
+
import { Group, User, RequestType, VaultRequestReview, VaultRequest, Account, Whitelist } from '@prisma/client';
|
|
3
3
|
import z__default from 'zod';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -647,6 +647,10 @@ declare const zWorkspaceRuleRequestData: z__default.ZodObject<{
|
|
|
647
647
|
}, z__default.core.$strip>;
|
|
648
648
|
type WorkspaceRuleRequestData = z__default.infer<typeof zWorkspaceRuleRequestData>;
|
|
649
649
|
|
|
650
|
+
type GroupWithMembers = Group & {
|
|
651
|
+
members: User[];
|
|
652
|
+
};
|
|
653
|
+
|
|
650
654
|
declare const zCreateGroupRequestData: z__default.ZodObject<{
|
|
651
655
|
name: z__default.ZodString;
|
|
652
656
|
description: z__default.ZodNullable<z__default.ZodString>;
|
|
@@ -1342,6 +1346,18 @@ declare const zTradelinkArbitrationRequestData: z__default.ZodObject<{
|
|
|
1342
1346
|
}, z__default.core.$strip>;
|
|
1343
1347
|
type TradelinkArbitrationRequestData = z__default.infer<typeof zTradelinkArbitrationRequestData>;
|
|
1344
1348
|
|
|
1349
|
+
declare const genCreateTransactionData: <T extends TransactionData["type"]>(opts?: {
|
|
1350
|
+
accountId?: string;
|
|
1351
|
+
transaction?: Partial<TransactionData> & {
|
|
1352
|
+
type: T;
|
|
1353
|
+
};
|
|
1354
|
+
}) => {
|
|
1355
|
+
accountId: string;
|
|
1356
|
+
transaction: Extract<TransactionData, {
|
|
1357
|
+
type: T;
|
|
1358
|
+
}>;
|
|
1359
|
+
};
|
|
1360
|
+
|
|
1345
1361
|
declare const zCreateApiKeyRequestData: z__default.ZodObject<{
|
|
1346
1362
|
name: z__default.ZodString;
|
|
1347
1363
|
entities: z__default.ZodArray<z__default.ZodString>;
|
|
@@ -1513,6 +1529,7 @@ type RequestDataTypes = {
|
|
|
1513
1529
|
type RequestWith<D> = VaultRequest & {
|
|
1514
1530
|
data: D;
|
|
1515
1531
|
};
|
|
1532
|
+
declare const genRequestData: <T extends keyof RequestDataTypes>(type: T, opts?: Partial<RequestDataTypes[T]>) => RequestDataTypes[T];
|
|
1516
1533
|
type VaultRequestOpts<T extends keyof RequestDataTypes> = {
|
|
1517
1534
|
type: T;
|
|
1518
1535
|
data: RequestDataTypes[T];
|
|
@@ -1524,5 +1541,8 @@ declare const genVaultRequestReview: (opts?: Partial<VaultRequestReview & {
|
|
|
1524
1541
|
|
|
1525
1542
|
declare function genVaultRequestResponse<T extends keyof RequestDataTypes>(opts: Parameters<typeof genVaultRequest<T>>[0], reviews?: VaultRequestReview[]): VaultRequestResponse;
|
|
1526
1543
|
declare function genAccountResponse(overrides?: Partial<Account>): AccountResponse;
|
|
1544
|
+
declare function genUserResponse(overrides?: Partial<User>): UserResponse;
|
|
1545
|
+
declare function genGroupResponse(overrides?: Partial<GroupWithMembers>): GroupResponse;
|
|
1546
|
+
declare function genWhitelistResponse(overrides?: Partial<Whitelist>): WhitelistResponse;
|
|
1527
1547
|
|
|
1528
|
-
export { genAccountResponse, genVaultRequestResponse, genVaultRequestReview };
|
|
1548
|
+
export { genAccountResponse, genCreateTransactionData, genGroupResponse, genRequestData, genUserResponse, genVaultRequestResponse, genVaultRequestReview, genWhitelistResponse };
|