@ledgerhq/revault-api 1.87.0 → 1.88.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.
@@ -1,6 +1,6 @@
1
- import { $a as AccountGovernanceType, Ao as RevaultMode, Ci as startOnboarding, Co as PsdModel, Dr as SendOnlyTransactionData, Fa as RequestView, Fo as WebhookRetryStrategy$1, Ha as BackofficeClaims, Io as WebhookStatus$1, Ja as ExtendedPrismaClient, Lo as WhitelistType, Mo as UserDeviceType, No as UserRegistrationState, Oo as RequestType$1, Pa as WebhookDeliveryStats, Po as UserRole, Q as ActivityTracer, R as TrpcMeta, Ra as LesWalletRegistrableSummary, Sa as SortOrder, Si as RequestListFilters, To as ReportType$1, Va as LesWalletRegistrationScope, Ya as BackofficePermission, _o as MaintenanceMode, ao as AuditLogType$1, bi as BackofficeAuditLogInput, bo as OnboardingStep, co as EventAction$1, do as GatePolicyType, eo as AccountType$1, fo as GateReviewConfigType, ga as AccountWorkspaceScope, go as HsmHostingMode, ha as AccountAssetFilter, ho as GateWorkspaceRuleType, it as RequestReview, ji as HsmCertificate, jo as ReviewConfigType, kr as TransactionData, lo as GateAccountType, ma as HsmWorkspaceComparison, mo as GateWhitelistType, no as AddressDerivationMode, po as GateUserType, qa as zOidcConfig, ro as AdminPermission$1, so as ClaimedRole, st as VaultRequestResponse, to as ActivationStatus$1, ua as HsmComparator, uo as GateGroupType, wo as ReportStatus$1, xi as WhitelistSortBy, xo as OutgoingTransactionStatus, yi as Note, yo as OnboardedUserRole, z as RuntimeApiCapabilities, za as LesWalletRegistrationReport } from "../../app-lib-3Twpit5H.mjs";
1
+ import { $a as LesWalletRegistrableSummary, $i as RequestView, Bi as SortOrder, Bo as RequestType$1, Br as RequestListFilters, Co as GatePolicyType, Do as GateWorkspaceRuleType, Eo as GateWhitelistType, Fo as PsdModel, G as TrpcMeta, Go as UserRegistrationState, Ho as RevaultMode, Io as ReportStatus$1, Jo as WebhookStatus$1, K as RuntimeApiCapabilities, Ko as UserRole, Lo as ReportType$1, Mi as HsmWorkspaceComparison, Mo as OnboardingStep, Ni as AccountAssetFilter, No as OutgoingTransactionStatus$1, Oi as HsmComparator, Oo as HsmHostingMode, Pi as AccountWorkspaceScope, Qi as WebhookDeliveryStats, Rr as BackofficeAuditLogInput, So as GateGroupType, To as GateUserType, Uo as ReviewConfigType, Vr as startOnboarding, Wo as UserDeviceType, Xa as Note, Yo as WhitelistType, Yr as HsmCertificate, _o as AuditLogType$1, ao as zOidcConfig, bo as EventAction$1, do as AccountGovernanceType, fo as AccountType$1, ho as AdminPermission$1, ht as RequestReview, ia as SendOnlyTransactionData, jo as OnboardedUserRole, ko as MaintenanceMode, mo as AddressDerivationMode, no as BackofficeClaims, oa as TransactionData, oo as ExtendedPrismaClient, po as ActivationStatus$1, qo as WebhookRetryStrategy$1, so as BackofficePermission, to as LesWalletRegistrationScope, ut as ActivityTracer, vt as VaultRequestResponse, wo as GateReviewConfigType, xo as GateAccountType, yo as ClaimedRole, zr as WhitelistSortBy } from "../../app-lib-CXsb87de.mjs";
2
2
  import z from "zod";
3
- import { Account, AllowedAction, Prisma, PrismaClient, ReviewConfig, VaultRequestReview, Workspace } from "@/generated/prisma/client";
3
+ import { AllowedAction, PrismaClient } from "@/generated/prisma/client";
4
4
  import "trpc-to-openapi";
5
5
  //#region src/core/rebac/relationship-tuples.d.ts
6
6
  declare const RELATIONSHIP_OBJECT_TYPES: {
@@ -358,7 +358,39 @@ declare const createInternalCapabilities: (prisma: ExtendedPrismaClient, depende
358
358
  registerOnLesWallet: (actor: BackofficeClaims, requiredPermission: "workspace:edit", input: {
359
359
  scope: LesWalletRegistrationScope;
360
360
  limit: number;
361
- }) => Promise<LesWalletRegistrationReport>;
361
+ }) => Promise<{
362
+ jobId: string;
363
+ }>;
364
+ lesWalletRepairActiveRun: () => Promise<{
365
+ jobId: string;
366
+ scope: LesWalletRegistrationScope;
367
+ } | null>;
368
+ lesWalletRepairRunStatus: (jobId: string) => Promise<{
369
+ state: "PENDING";
370
+ } | {
371
+ state: "RUNNING";
372
+ } | {
373
+ state: "FAILED";
374
+ detail: string;
375
+ } | {
376
+ state: "NOT_FOUND";
377
+ } | {
378
+ state: "COMPLETED";
379
+ result: {
380
+ results: {
381
+ accountId: string;
382
+ name: string;
383
+ workspaceName: string;
384
+ currency: string;
385
+ contractAddress: string | null;
386
+ status: "BACKFILLED" | "FAILED" | "REGISTERED";
387
+ detail?: string | undefined;
388
+ }[];
389
+ numFixed: number;
390
+ numFailed: number;
391
+ numRemaining: number;
392
+ };
393
+ }>;
362
394
  };
363
395
  users: {
364
396
  list: (input: ({
@@ -1068,6 +1100,7 @@ declare const createInternalCapabilities: (prisma: ExtendedPrismaClient, depende
1068
1100
  maintenanceMode?: MaintenanceMode;
1069
1101
  oidcConfig?: import("@/generated/prisma/internal/prismaNamespace").InputJsonValue | null;
1070
1102
  hsmProxyName?: string;
1103
+ pkiRootCaFetched?: boolean;
1071
1104
  }) => Promise<{
1072
1105
  id: string;
1073
1106
  name: string;
@@ -1389,6 +1422,7 @@ declare const createInternalCapabilities: (prisma: ExtendedPrismaClient, depende
1389
1422
  hash?: string;
1390
1423
  id?: string;
1391
1424
  currency?: string;
1425
+ status?: OutgoingTransactionStatus$1;
1392
1426
  sortBy: "createdAt" | "updatedAt";
1393
1427
  }) => Promise<{
1394
1428
  page: number;
@@ -1404,7 +1438,8 @@ declare const createInternalCapabilities: (prisma: ExtendedPrismaClient, depende
1404
1438
  note: import("@prisma/client/runtime/client").JsonValue;
1405
1439
  hash: string | null;
1406
1440
  replacementHash: string | null;
1407
- status: OutgoingTransactionStatus;
1441
+ status: OutgoingTransactionStatus$1;
1442
+ requestId: string | null;
1408
1443
  lesWalletTaskId: string;
1409
1444
  createdById: string;
1410
1445
  createdAt: Date;
@@ -1416,10 +1451,11 @@ declare const createInternalCapabilities: (prisma: ExtendedPrismaClient, depende
1416
1451
  id: string;
1417
1452
  sequence: number;
1418
1453
  outgoingTransactionId: string;
1419
- status: OutgoingTransactionStatus;
1454
+ status: OutgoingTransactionStatus$1;
1420
1455
  recordedAt: Date;
1421
1456
  failureReasonCode: string | null;
1422
1457
  failureReason: string | null;
1458
+ details: import("@prisma/client/runtime/client").JsonValue | null;
1423
1459
  }[];
1424
1460
  } & {
1425
1461
  id: string;
@@ -1429,7 +1465,8 @@ declare const createInternalCapabilities: (prisma: ExtendedPrismaClient, depende
1429
1465
  note: import("@prisma/client/runtime/client").JsonValue;
1430
1466
  hash: string | null;
1431
1467
  replacementHash: string | null;
1432
- status: OutgoingTransactionStatus;
1468
+ status: OutgoingTransactionStatus$1;
1469
+ requestId: string | null;
1433
1470
  lesWalletTaskId: string;
1434
1471
  createdById: string;
1435
1472
  createdAt: Date;
@@ -1802,6 +1839,7 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
1802
1839
  realm: string;
1803
1840
  } | null | undefined;
1804
1841
  hsmProxyName?: string | undefined;
1842
+ pkiRootCaFetched?: boolean | undefined;
1805
1843
  };
1806
1844
  output: {
1807
1845
  id: string;
@@ -2660,12 +2698,12 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
2660
2698
  } | {
2661
2699
  type: "ETHEREUM_LIKE";
2662
2700
  address: string | null;
2663
- } | {
2664
- type: "GENERIC_LIKE";
2665
2701
  } | {
2666
2702
  type: "HEDERA_LIKE";
2667
2703
  address: string | null;
2668
2704
  isActivated: boolean;
2705
+ } | {
2706
+ type: "GENERIC_LIKE";
2669
2707
  } | {
2670
2708
  type: "POLKADOT_LIKE";
2671
2709
  address: string | null;
@@ -2743,12 +2781,12 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
2743
2781
  } | {
2744
2782
  type: "ETHEREUM_LIKE";
2745
2783
  address: string | null;
2746
- } | {
2747
- type: "GENERIC_LIKE";
2748
2784
  } | {
2749
2785
  type: "HEDERA_LIKE";
2750
2786
  address: string | null;
2751
2787
  isActivated: boolean;
2788
+ } | {
2789
+ type: "GENERIC_LIKE";
2752
2790
  } | {
2753
2791
  type: "POLKADOT_LIKE";
2754
2792
  address: string | null;
@@ -2817,7 +2855,53 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
2817
2855
  target?: "ADDRESS" | "LES_WALLET_ID" | undefined;
2818
2856
  limit: number;
2819
2857
  };
2820
- output: LesWalletRegistrationReport;
2858
+ output: {
2859
+ jobId: string;
2860
+ };
2861
+ meta: TrpcMeta;
2862
+ }>;
2863
+ lesWalletRepairActiveRun: import("@trpc/server").TRPCQueryProcedure<{
2864
+ input: void;
2865
+ output: {
2866
+ jobId: string;
2867
+ scope: {
2868
+ workspaceNames: string[];
2869
+ currencies: string[];
2870
+ target: "ADDRESS" | "LES_WALLET_ID";
2871
+ };
2872
+ } | null;
2873
+ meta: TrpcMeta;
2874
+ }>;
2875
+ lesWalletRepairRunStatus: import("@trpc/server").TRPCQueryProcedure<{
2876
+ input: {
2877
+ jobId: string;
2878
+ };
2879
+ output: {
2880
+ state: "PENDING";
2881
+ } | {
2882
+ state: "RUNNING";
2883
+ } | {
2884
+ state: "COMPLETED";
2885
+ result: {
2886
+ results: {
2887
+ accountId: string;
2888
+ name: string;
2889
+ workspaceName: string;
2890
+ currency: string;
2891
+ contractAddress: string | null;
2892
+ status: "BACKFILLED" | "FAILED" | "REGISTERED";
2893
+ detail?: string | undefined;
2894
+ }[];
2895
+ numFixed: number;
2896
+ numFailed: number;
2897
+ numRemaining: number;
2898
+ };
2899
+ } | {
2900
+ state: "FAILED";
2901
+ detail: string;
2902
+ } | {
2903
+ state: "NOT_FOUND";
2904
+ };
2821
2905
  meta: TrpcMeta;
2822
2906
  }>;
2823
2907
  }>>;
@@ -3145,7 +3229,7 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
3145
3229
  status: "BROKEN" | "DISABLED" | "ENABLED";
3146
3230
  rules: {
3147
3231
  id: string;
3148
- actions: ("AccountBalanceUpdated" | "ReportCompleted" | "ReportFailed" | "RequestAborted" | "RequestActivatedReviews" | "RequestApproved" | "RequestCreated" | "RequestExecuted" | "RequestExpired" | "RequestFailed" | "RequestReceivedApproval" | "RequestReceivedRejection" | "TransactionConfirmed" | "TransactionDropped" | "TransactionFailed" | "TransactionOnChain" | "TransactionScheduled" | "TransactionSubmitted" | "UserRegistrationCompleted" | "UserSuspended" | "UserUnsuspended")[];
3232
+ actions: ("AccountBalanceUpdated" | "ReportCompleted" | "ReportFailed" | "RequestAborted" | "RequestActivatedReviews" | "RequestApproved" | "RequestCreated" | "RequestExecuted" | "RequestExpired" | "RequestFailed" | "RequestReceivedApproval" | "RequestReceivedRejection" | "TransactionConfirmed" | "TransactionDropped" | "TransactionFailed" | "TransactionOnChain" | "TransactionScheduled" | "TransactionSubmitted" | "TransactionUnknown" | "UserRegistrationCompleted" | "UserSuspended" | "UserUnsuspended")[];
3149
3233
  requestTypes: ("CREATE_ACCOUNT" | "CREATE_API_KEY" | "CREATE_API_USER" | "CREATE_API_USER_ACCESS" | "CREATE_ENTITY" | "CREATE_GROUP" | "CREATE_POLICY" | "CREATE_PSD_USER" | "CREATE_SCICONFIG" | "CREATE_TRANSACTION" | "CREATE_WHITELIST" | "EDIT_ACCOUNT" | "EDIT_API_KEY" | "EDIT_ENTITY" | "EDIT_EXTERNAL_SIGNER_PUBKEYS" | "EDIT_GROUP" | "EDIT_POLICY" | "EDIT_SCICONFIG" | "EDIT_TOKEN_RULE" | "EDIT_WHITELIST" | "EDIT_WORKSPACE_RULE" | "REVOKE_API_KEY" | "REVOKE_ENTITY" | "REVOKE_GROUP" | "REVOKE_USER" | "SIGN_DIGESTS" | "SIGN_MESSAGE" | "TRADELINK_ACTIVATE_ACCOUNT" | "TRADELINK_ADJUST_PLEDGE" | "TRADELINK_ARBITRATE" | "TRADELINK_CREATE_ASSET_MANAGER" | "TRADELINK_CREATE_CUSTODIAN" | "TRADELINK_CREATE_EXCHANGE" | "TRADELINK_CREATE_SETTLEMENT" | "TRADELINK_EDIT_ASSET_MANAGER" | "TRADELINK_EDIT_CUSTODIAN" | "TRADELINK_EDIT_EXCHANGE" | "TRADELINK_FORCE_UNPLEDGE" | "TRADELINK_REPLEDGE" | "TRADELINK_WITHDRAW" | "UPDATE_QUORUM")[];
3150
3234
  }[];
3151
3235
  scopeUserIds: string[];
@@ -5468,6 +5552,7 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
5468
5552
  hash?: string | undefined;
5469
5553
  id?: string | undefined;
5470
5554
  currency?: string | undefined;
5555
+ status?: "CONFIRMED" | "DROPPED" | "FAILED" | "FAILED_ON_CHAIN" | "ON_CHAIN" | "SCHEDULED" | "SUBMITTED" | "UNKNOWN" | undefined;
5471
5556
  sortBy?: "createdAt" | "updatedAt" | undefined;
5472
5557
  sortOrder?: "asc" | "desc" | undefined;
5473
5558
  };
@@ -5481,7 +5566,7 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
5481
5566
  id: string;
5482
5567
  workspaceName: string;
5483
5568
  accountId: string;
5484
- status: "CONFIRMED" | "DROPPED" | "FAILED" | "ON_CHAIN" | "SCHEDULED" | "SUBMITTED";
5569
+ status: "CONFIRMED" | "DROPPED" | "FAILED" | "FAILED_ON_CHAIN" | "ON_CHAIN" | "SCHEDULED" | "SUBMITTED" | "UNKNOWN";
5485
5570
  hash: string | null;
5486
5571
  replacementHash: string | null;
5487
5572
  intent: unknown;
@@ -5502,7 +5587,7 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
5502
5587
  id: string;
5503
5588
  workspaceName: string;
5504
5589
  accountId: string;
5505
- status: "CONFIRMED" | "DROPPED" | "FAILED" | "ON_CHAIN" | "SCHEDULED" | "SUBMITTED";
5590
+ status: "CONFIRMED" | "DROPPED" | "FAILED" | "FAILED_ON_CHAIN" | "ON_CHAIN" | "SCHEDULED" | "SUBMITTED" | "UNKNOWN";
5506
5591
  hash: string | null;
5507
5592
  replacementHash: string | null;
5508
5593
  intent: unknown;
@@ -5513,10 +5598,11 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
5513
5598
  updatedAt: Date;
5514
5599
  statusTransitions: {
5515
5600
  sequence: number;
5516
- status: "CONFIRMED" | "DROPPED" | "FAILED" | "ON_CHAIN" | "SCHEDULED" | "SUBMITTED";
5601
+ status: "CONFIRMED" | "DROPPED" | "FAILED" | "FAILED_ON_CHAIN" | "ON_CHAIN" | "SCHEDULED" | "SUBMITTED" | "UNKNOWN";
5517
5602
  recordedAt: Date;
5518
5603
  failureReasonCode: string | null;
5519
5604
  failureReason: string | null;
5605
+ details: import("zod").JSONType;
5520
5606
  }[];
5521
5607
  };
5522
5608
  meta: TrpcMeta;
package/lib/fakes.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { Ar as TransactionDataOf, On as GroupResponse, Tr as AccountStakingFields, Un as AccountResponse, eo as AccountType, l as WhitelistResponse, mr as WebhookResponse, ot as VaultRequestCreateInput, rt as RequestDataOf, st as VaultRequestResponse, v as UserResponse, vo as MessageType } from "./app-lib-3Twpit5H.mjs";
1
+ import { Ao as MessageType, Bn as GroupResponse, Or as WebhookResponse, _t as VaultRequestCreateInput, fo as AccountType, l as WhitelistResponse, mt as RequestDataOf, na as AccountStakingFields, rr as AccountResponse, sa as TransactionDataOf, v as UserResponse, vt as VaultRequestResponse } from "./app-lib-CXsb87de.mjs";
2
2
  //#region src/__fakes__/trpc/inputs.d.ts
3
3
  type RequestInputDataOf<T extends VaultRequestCreateInput["request"]["type"]> = Extract<VaultRequestCreateInput["request"], {
4
4
  type: T;
package/lib/fakes.mjs CHANGED
@@ -543,7 +543,11 @@ const genEthereumLikeWithdrawData = () => {
543
543
  const genEthereumLikeConsolidateData = () => {
544
544
  const sendData = genEthereumLikeSendData();
545
545
  return {
546
- ...omit(sendData, ["type", "recipient"]),
546
+ ...omit(sendData, [
547
+ "type",
548
+ "recipient",
549
+ "amount"
550
+ ]),
547
551
  type: "ETHEREUM_LIKE_STAKE_CONSOLIDATE",
548
552
  sourcePubKey: genEthHex(48),
549
553
  targetPubKey: genEthHex(48),
@@ -553,7 +557,11 @@ const genEthereumLikeConsolidateData = () => {
553
557
  const genEthereumLikeUpgradeData = () => {
554
558
  const sendData = genEthereumLikeSendData();
555
559
  return {
556
- ...omit(sendData, ["type", "recipient"]),
560
+ ...omit(sendData, [
561
+ "type",
562
+ "recipient",
563
+ "amount"
564
+ ]),
557
565
  type: "ETHEREUM_LIKE_STAKE_UPGRADE",
558
566
  validatorPubKey: genEthHex(48),
559
567
  maxExecutionFees: faker.number.bigInt({ min: 0 }).toString()