@ledgerhq/revault-api 1.86.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 LesWalletRegistrationReport, Ao as HsmHostingMode, Co as GateAccountType, Cr as SendOnlyTransactionData, Do as GateUserType, Ei as HsmCertificate, Eo as GateReviewConfigType, F as RuntimeApiCapabilities, Go as ReviewConfigType, Ho as RequestType$1, Ia as SortOrder, J as ActivityTracer, Ja as WebhookDeliveryStats, Jo as UserRole, Ko as UserDeviceType, Lo as PsdModel, No as OnboardedUserRole, Oo as GateWhitelistType, P as TrpcMeta, Po as OnboardingStep, Qa as LesWalletRegistrableSummary, Ro as ReportStatus$1, So as EventAction$1, To as GatePolicyType, Tr as TransactionData, Wo as RevaultMode, Xo as WebhookStatus$1, Ya as RequestView, Yo as WebhookRetryStrategy$1, Zo as WhitelistType, _i as RequestListFilters, _o as AdminPermission$1, aa as HsmComparator, co as ExtendedPrismaClient, da as AccountWorkspaceScope, et as RequestReview, gi as WhitelistSortBy, go as AddressDerivationMode, hi as Note, ho as ActivationStatus$1, jo as MaintenanceMode, ko as GateWorkspaceRuleType, la as HsmWorkspaceComparison, lo as BackofficePermission, mo as AccountType$1, no as BackofficeClaims, po as AccountGovernanceType, qo as UserRegistrationState, rt as VaultRequestResponse, so as zOidcConfig, to as LesWalletRegistrationScope, ua as AccountAssetFilter, vi as startOnboarding, wo as GateGroupType, xo as ClaimedRole, yo as AuditLogType, zo as ReportType$1 } from "../../app-lib-CdmEGeOS.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: {
@@ -89,6 +89,112 @@ type RelationshipDriftCheck = {
89
89
  totalDurationMs: number;
90
90
  };
91
91
  //#endregion
92
+ //#region src/services/configcat-management/types.d.ts
93
+ type ConfigCatManagementLocation = {
94
+ productId: string;
95
+ configId: string;
96
+ };
97
+ type ConfigCatSettingType = "boolean" | "string" | "int" | "double";
98
+ type PromotionValueType = "boolean" | "string" | "number" | "json";
99
+ type ConfigCatScalarValue = boolean | string | number;
100
+ type ConfigCatFlag = {
101
+ settingId: number;
102
+ key: string;
103
+ name: string;
104
+ settingType: ConfigCatSettingType;
105
+ valueType: PromotionValueType;
106
+ isJson: boolean;
107
+ hint?: string | null;
108
+ order?: number | null;
109
+ hasTags: boolean;
110
+ hasPredefinedVariations: boolean;
111
+ };
112
+ type ConfigCatManagement = {
113
+ listFlags: (location: ConfigCatManagementLocation) => Promise<ConfigCatFlag[]>;
114
+ listEnvironmentIds: (location: ConfigCatManagementLocation) => Promise<string[]>;
115
+ readSimpleValues: (location: ConfigCatManagementLocation, flags: ConfigCatFlag[]) => Promise<Map<number, ConfigCatScalarValue | null>>;
116
+ createFlag: (opts: {
117
+ target: ConfigCatManagementLocation;
118
+ targetEnvironmentIds: string[];
119
+ sourceFlag: ConfigCatFlag;
120
+ value: ConfigCatScalarValue;
121
+ }) => Promise<void>;
122
+ };
123
+ //#endregion
124
+ //#region src/core/administration/feature-flag-promotions/types.d.ts
125
+ type ConfigCatPromotionEnvironmentConfig = {
126
+ slug: string;
127
+ displayName: string;
128
+ productId: string;
129
+ configId: string;
130
+ };
131
+ type FlagEnvironment = {
132
+ slug: string;
133
+ displayName: string;
134
+ order: number;
135
+ };
136
+ type PromotionTargetSelection = {
137
+ flagKey: string;
138
+ targetEnv: string;
139
+ };
140
+ type PromotionBlockerCode = "ENVIRONMENT_NOT_CONFIGURED" | "TARGET_NOT_AFTER_SOURCE" | "SELECTED_FLAG_ALREADY_EXISTS" | "SOURCE_FLAG_NOT_FOUND" | "UNSUPPORTED_FLAG" | "CONFIGCAT_UNAVAILABLE" | "EXTERNAL_WRITE_FAILED" | "EXTERNAL_WRITE_OUTCOME_UNKNOWN";
141
+ type PromotionBlocker = {
142
+ code: PromotionBlockerCode;
143
+ severity: "blocking";
144
+ sourceEnv: string;
145
+ targetEnv?: string;
146
+ flagKey?: string;
147
+ message: string;
148
+ };
149
+ type PromotionCreate = {
150
+ sourceEnv: string;
151
+ targetEnv: string;
152
+ flagKey: string;
153
+ flagName: string;
154
+ valueType: PromotionValueType;
155
+ };
156
+ type MatrixOutput = {
157
+ environments: FlagEnvironment[];
158
+ sourceEnv: string;
159
+ rows: Array<{
160
+ flagKey: string;
161
+ flagName: string;
162
+ valueType: PromotionValueType;
163
+ cells: Record<string, {
164
+ state: "source" | "present" | "missing" | "blocked" | "notAllowed";
165
+ summary: string;
166
+ blockers: PromotionBlocker[];
167
+ }>;
168
+ }>;
169
+ summary: {
170
+ promotableCells: number;
171
+ blockedCells: number;
172
+ alignedFlags: number;
173
+ };
174
+ fetchedAt: string;
175
+ };
176
+ type ApplyOutput = {
177
+ attemptId: string;
178
+ status: "applied" | "blocked" | "failed" | "partiallyApplied";
179
+ created: PromotionCreate[];
180
+ notAttempted: PromotionCreate[];
181
+ blockers: PromotionBlocker[];
182
+ };
183
+ //#endregion
184
+ //#region src/core/administration/feature-flag-promotions/capability.d.ts
185
+ type PromoteInput = {
186
+ sourceEnv: string;
187
+ selections: PromotionTargetSelection[];
188
+ operatorReason?: string;
189
+ actor: BackofficeClaims;
190
+ };
191
+ type FeatureFlagPromotions = {
192
+ matrix: (input: {
193
+ sourceEnv?: string;
194
+ }) => Promise<MatrixOutput>;
195
+ promote: (input: PromoteInput) => Promise<ApplyOutput>;
196
+ };
197
+ //#endregion
92
198
  //#region src/core/runtime/internal-capabilities.d.ts
93
199
  /**
94
200
  * Least-privilege split (ADR-0022): capabilities that must never be reachable from the *public*
@@ -96,7 +202,11 @@ type RelationshipDriftCheck = {
96
202
  * (backoffice) mounts them, so a public procedure's `ctx.core` cannot see — or type-resolve — the
97
203
  * administration surface. New non-public internal capabilities belong in this bucket too.
98
204
  */
99
- declare const createInternalCapabilities: (prisma: ExtendedPrismaClient) => {
205
+ type InternalCapabilityDependencies = {
206
+ configCatManagement?: ConfigCatManagement;
207
+ configCatPromotionEnvironments?: ConfigCatPromotionEnvironmentConfig[];
208
+ };
209
+ declare const createInternalCapabilities: (prisma: ExtendedPrismaClient, dependencies?: InternalCapabilityDependencies) => {
100
210
  accounts: {
101
211
  list: (input: ({
102
212
  page: number;
@@ -248,7 +358,39 @@ declare const createInternalCapabilities: (prisma: ExtendedPrismaClient) => {
248
358
  registerOnLesWallet: (actor: BackofficeClaims, requiredPermission: "workspace:edit", input: {
249
359
  scope: LesWalletRegistrationScope;
250
360
  limit: number;
251
- }) => 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
+ }>;
252
394
  };
253
395
  users: {
254
396
  list: (input: ({
@@ -835,7 +977,7 @@ declare const createInternalCapabilities: (prisma: ExtendedPrismaClient) => {
835
977
  sortOrder: SortOrder;
836
978
  }) & {
837
979
  workspaceName?: string | string[];
838
- type?: AuditLogType;
980
+ type?: AuditLogType$1;
839
981
  fromDate?: Date;
840
982
  toDate?: Date;
841
983
  sortBy: "createdAt" | "type";
@@ -848,15 +990,16 @@ declare const createInternalCapabilities: (prisma: ExtendedPrismaClient) => {
848
990
  results: {
849
991
  id: string;
850
992
  workspaceName: string | null;
851
- type: AuditLogType;
993
+ type: AuditLogType$1;
852
994
  payload: import("@prisma/client/runtime/client").JsonValue;
853
995
  createdAt: Date;
854
996
  }[];
855
997
  }>;
998
+ insert: (input: BackofficeAuditLogInput) => Promise<void>;
856
999
  find: (id: string) => import("@/generated/prisma/models").Prisma__AuditLogClient<{
857
1000
  id: string;
858
1001
  workspaceName: string | null;
859
- type: AuditLogType;
1002
+ type: AuditLogType$1;
860
1003
  payload: import("@prisma/client/runtime/client").JsonValue;
861
1004
  createdAt: Date;
862
1005
  } | null, null, import("@prisma/client/runtime/client").DefaultArgs, {
@@ -957,6 +1100,7 @@ declare const createInternalCapabilities: (prisma: ExtendedPrismaClient) => {
957
1100
  maintenanceMode?: MaintenanceMode;
958
1101
  oidcConfig?: import("@/generated/prisma/internal/prismaNamespace").InputJsonValue | null;
959
1102
  hsmProxyName?: string;
1103
+ pkiRootCaFetched?: boolean;
960
1104
  }) => Promise<{
961
1105
  id: string;
962
1106
  name: string;
@@ -1266,6 +1410,71 @@ declare const createInternalCapabilities: (prisma: ExtendedPrismaClient) => {
1266
1410
  restart: (actor: BackofficeClaims, requiredPermission: "request:restart", id: string) => Promise<void>;
1267
1411
  expire: (actor: BackofficeClaims, requiredPermission: "request:expire", id: string) => Promise<void>;
1268
1412
  };
1413
+ outgoingTransactions: {
1414
+ list: (input: ({
1415
+ page: number;
1416
+ pageSize: number;
1417
+ } & {
1418
+ sortOrder: SortOrder;
1419
+ }) & {
1420
+ workspaceName?: string | string[];
1421
+ accountId?: string;
1422
+ hash?: string;
1423
+ id?: string;
1424
+ currency?: string;
1425
+ status?: OutgoingTransactionStatus$1;
1426
+ sortBy: "createdAt" | "updatedAt";
1427
+ }) => Promise<{
1428
+ page: number;
1429
+ next: number | null;
1430
+ prev: number | null;
1431
+ pageSize: number;
1432
+ total: number;
1433
+ results: {
1434
+ id: string;
1435
+ workspaceName: string;
1436
+ accountId: string;
1437
+ intent: import("@prisma/client/runtime/client").JsonValue;
1438
+ note: import("@prisma/client/runtime/client").JsonValue;
1439
+ hash: string | null;
1440
+ replacementHash: string | null;
1441
+ status: OutgoingTransactionStatus$1;
1442
+ requestId: string | null;
1443
+ lesWalletTaskId: string;
1444
+ createdById: string;
1445
+ createdAt: Date;
1446
+ updatedAt: Date;
1447
+ }[];
1448
+ }>;
1449
+ find: (id: string) => import("@/generated/prisma/models").Prisma__OutgoingTransactionClient<({
1450
+ statusTransitions: {
1451
+ id: string;
1452
+ sequence: number;
1453
+ outgoingTransactionId: string;
1454
+ status: OutgoingTransactionStatus$1;
1455
+ recordedAt: Date;
1456
+ failureReasonCode: string | null;
1457
+ failureReason: string | null;
1458
+ details: import("@prisma/client/runtime/client").JsonValue | null;
1459
+ }[];
1460
+ } & {
1461
+ id: string;
1462
+ workspaceName: string;
1463
+ accountId: string;
1464
+ intent: import("@prisma/client/runtime/client").JsonValue;
1465
+ note: import("@prisma/client/runtime/client").JsonValue;
1466
+ hash: string | null;
1467
+ replacementHash: string | null;
1468
+ status: OutgoingTransactionStatus$1;
1469
+ requestId: string | null;
1470
+ lesWalletTaskId: string;
1471
+ createdById: string;
1472
+ createdAt: Date;
1473
+ updatedAt: Date;
1474
+ }) | null, null, import("@prisma/client/runtime/client").DefaultArgs, {
1475
+ omit: import("@/generated/prisma/internal/prismaNamespace").GlobalOmitConfig | undefined;
1476
+ }>;
1477
+ };
1269
1478
  webhooks: {
1270
1479
  list: (input: ({
1271
1480
  page: number;
@@ -1372,6 +1581,7 @@ declare const createInternalCapabilities: (prisma: ExtendedPrismaClient) => {
1372
1581
  sampleLimit: number;
1373
1582
  }) => Promise<RelationshipDriftCheck>;
1374
1583
  };
1584
+ featureFlagPromotions: FeatureFlagPromotions;
1375
1585
  };
1376
1586
  interface RuntimeInternalCapabilities extends ReturnType<typeof createInternalCapabilities> {}
1377
1587
  /**
@@ -1494,7 +1704,7 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
1494
1704
  output: {
1495
1705
  sub: string;
1496
1706
  groups: string[];
1497
- permissions: ("backoffice:read" | "impersonation:list" | "impersonation:request" | "impersonation:revoke" | "onboarding:create" | "request:expire" | "request:restart" | "workspace:edit")[];
1707
+ permissions: ("backoffice:read" | "feature-flag:promote" | "impersonation:list" | "impersonation:request" | "impersonation:revoke" | "onboarding:create" | "request:expire" | "request:restart" | "workspace:edit")[];
1498
1708
  };
1499
1709
  meta: TrpcMeta;
1500
1710
  }>;
@@ -1576,7 +1786,7 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
1576
1786
  } & {
1577
1787
  status: ActivationStatus$1;
1578
1788
  maintenanceMode: MaintenanceMode;
1579
- oidcConfig: import("zod").output<typeof zOidcConfig> | null;
1789
+ oidcConfig: import("zod").infer<typeof zOidcConfig> | null;
1580
1790
  })[];
1581
1791
  };
1582
1792
  meta: TrpcMeta;
@@ -1629,6 +1839,7 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
1629
1839
  realm: string;
1630
1840
  } | null | undefined;
1631
1841
  hsmProxyName?: string | undefined;
1842
+ pkiRootCaFetched?: boolean | undefined;
1632
1843
  };
1633
1844
  output: {
1634
1845
  id: string;
@@ -2487,12 +2698,12 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
2487
2698
  } | {
2488
2699
  type: "ETHEREUM_LIKE";
2489
2700
  address: string | null;
2490
- } | {
2491
- type: "GENERIC_LIKE";
2492
2701
  } | {
2493
2702
  type: "HEDERA_LIKE";
2494
2703
  address: string | null;
2495
2704
  isActivated: boolean;
2705
+ } | {
2706
+ type: "GENERIC_LIKE";
2496
2707
  } | {
2497
2708
  type: "POLKADOT_LIKE";
2498
2709
  address: string | null;
@@ -2533,7 +2744,7 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
2533
2744
  }[];
2534
2745
  };
2535
2746
  } & {
2536
- workspaceName: import("zod").output<typeof zWorkspaceName>;
2747
+ workspaceName: import("zod").infer<typeof zWorkspaceName>;
2537
2748
  lesWalletId: string | null;
2538
2749
  hsmId: string;
2539
2750
  })[];
@@ -2570,12 +2781,12 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
2570
2781
  } | {
2571
2782
  type: "ETHEREUM_LIKE";
2572
2783
  address: string | null;
2573
- } | {
2574
- type: "GENERIC_LIKE";
2575
2784
  } | {
2576
2785
  type: "HEDERA_LIKE";
2577
2786
  address: string | null;
2578
2787
  isActivated: boolean;
2788
+ } | {
2789
+ type: "GENERIC_LIKE";
2579
2790
  } | {
2580
2791
  type: "POLKADOT_LIKE";
2581
2792
  address: string | null;
@@ -2644,7 +2855,53 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
2644
2855
  target?: "ADDRESS" | "LES_WALLET_ID" | undefined;
2645
2856
  limit: number;
2646
2857
  };
2647
- 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
+ };
2648
2905
  meta: TrpcMeta;
2649
2906
  }>;
2650
2907
  }>>;
@@ -2739,7 +2996,7 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
2739
2996
  createdAt: Date;
2740
2997
  updatedAt: Date;
2741
2998
  } & {
2742
- workspaceName: import("zod").output<typeof zWorkspaceName>;
2999
+ workspaceName: import("zod").infer<typeof zWorkspaceName>;
2743
3000
  hsmId: string;
2744
3001
  })[];
2745
3002
  };
@@ -2865,7 +3122,7 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
2865
3122
  updatedAt: Date;
2866
3123
  description: string | null;
2867
3124
  } & {
2868
- workspaceName: import("zod").output<typeof zWorkspaceName>;
3125
+ workspaceName: import("zod").infer<typeof zWorkspaceName>;
2869
3126
  hsmId: string;
2870
3127
  })[];
2871
3128
  };
@@ -2972,7 +3229,7 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
2972
3229
  status: "BROKEN" | "DISABLED" | "ENABLED";
2973
3230
  rules: {
2974
3231
  id: string;
2975
- 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")[];
2976
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")[];
2977
3234
  }[];
2978
3235
  scopeUserIds: string[];
@@ -3214,8 +3471,8 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
3214
3471
  createdAt: Date;
3215
3472
  updatedAt: Date;
3216
3473
  }, "rules"> & {
3217
- workspaceName: import("zod").output<typeof zWorkspaceName>;
3218
- rules: Array<import("zod").output<import("zod").ZodObject<{
3474
+ workspaceName: import("zod").infer<typeof zWorkspaceName>;
3475
+ rules: Array<import("zod").infer<import("zod").ZodObject<{
3219
3476
  reviewSteps: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
3220
3477
  quorum: import("zod").ZodNumber;
3221
3478
  userIds: import("zod").ZodArray<import("zod").ZodString>;
@@ -3398,7 +3655,7 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
3398
3655
  userIds: string[];
3399
3656
  }[];
3400
3657
  } & {
3401
- workspaceName: import("zod").output<typeof zWorkspaceName>;
3658
+ workspaceName: import("zod").infer<typeof zWorkspaceName>;
3402
3659
  })[];
3403
3660
  };
3404
3661
  meta: TrpcMeta;
@@ -3504,7 +3761,7 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
3504
3761
  transactionStatuses?: ("FAILED" | "PENDING" | "SUCCESSFUL" | "UNKNOWN")[] | undefined;
3505
3762
  };
3506
3763
  })) & {
3507
- workspaceName: import("zod").output<typeof zWorkspaceName>;
3764
+ workspaceName: import("zod").infer<typeof zWorkspaceName>;
3508
3765
  })[];
3509
3766
  };
3510
3767
  meta: TrpcMeta;
@@ -3625,7 +3882,7 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
3625
3882
  pageSize: number;
3626
3883
  total: number;
3627
3884
  results: (VaultRequestResponse & {
3628
- workspaceName: import("zod").output<typeof zWorkspaceName>;
3885
+ workspaceName: import("zod").infer<typeof zWorkspaceName>;
3629
3886
  })[];
3630
3887
  };
3631
3888
  meta: TrpcMeta;
@@ -5236,6 +5493,121 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
5236
5493
  meta: TrpcMeta;
5237
5494
  }>;
5238
5495
  }>>;
5496
+ outgoingTransactions: import("@trpc/server").TRPCBuiltRouter<{
5497
+ ctx: {
5498
+ req?: import("fastify").FastifyRequest<import("fastify").RouteGenericInterface, import("fastify").RawServerDefault, import("node:http").IncomingMessage, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown, import("fastify").FastifyBaseLogger, import("fastify/types/type-provider").ResolveFastifyRequestType<import("fastify").FastifyTypeProviderDefault, import("fastify").FastifySchema, import("fastify").RouteGenericInterface>> | undefined;
5499
+ res?: import("fastify").FastifyReply<import("fastify").RouteGenericInterface, import("fastify").RawServerDefault, import("node:http").IncomingMessage, import("node:http").ServerResponse<import("node:http").IncomingMessage>, unknown, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown> | undefined;
5500
+ info?: import("@trpc/server/unstable-core-do-not-import").TRPCRequestInfo | undefined;
5501
+ debugAuthToken?: string;
5502
+ rootAuthToken?: string;
5503
+ backofficeRequiredPermission?: BackofficePermission;
5504
+ io: import("socket.io").Server<import("socket.io").DefaultEventsMap, import("socket.io").DefaultEventsMap, import("socket.io").DefaultEventsMap, any> | null;
5505
+ user: {
5506
+ id: string;
5507
+ workspaceName: string;
5508
+ name: string;
5509
+ authUserId: string | null;
5510
+ pubKey: string;
5511
+ deviceType: UserDeviceType;
5512
+ deviceUserId: string | null;
5513
+ hsmId: string | null;
5514
+ u2fKeyHandle: string | null;
5515
+ u2fPubKey: string | null;
5516
+ legacyViewAll: boolean;
5517
+ role: UserRole;
5518
+ status: ActivationStatus$1;
5519
+ isSuspended: boolean;
5520
+ gateType: GateUserType | null;
5521
+ gateId: number;
5522
+ syncId: string;
5523
+ createdAt: Date;
5524
+ updatedAt: Date;
5525
+ } | null;
5526
+ authorization: string | null;
5527
+ readOnly: boolean;
5528
+ activityTracer: ActivityTracer;
5529
+ core: RuntimeInternalApiCapabilityProvider;
5530
+ };
5531
+ meta: TrpcMeta;
5532
+ errorShape: {
5533
+ message: string;
5534
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
5535
+ data: {
5536
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
5537
+ httpStatus: number;
5538
+ path?: string;
5539
+ stack?: string;
5540
+ maintenanceMode?: "FULL" | "READ_ONLY" | undefined;
5541
+ maintenance?: boolean | undefined;
5542
+ };
5543
+ };
5544
+ transformer: true;
5545
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
5546
+ list: import("@trpc/server").TRPCQueryProcedure<{
5547
+ input: {
5548
+ page?: number | undefined;
5549
+ pageSize?: number | undefined;
5550
+ workspaceName?: string | string[] | undefined;
5551
+ accountId?: string | undefined;
5552
+ hash?: string | undefined;
5553
+ id?: string | undefined;
5554
+ currency?: string | undefined;
5555
+ status?: "CONFIRMED" | "DROPPED" | "FAILED" | "FAILED_ON_CHAIN" | "ON_CHAIN" | "SCHEDULED" | "SUBMITTED" | "UNKNOWN" | undefined;
5556
+ sortBy?: "createdAt" | "updatedAt" | undefined;
5557
+ sortOrder?: "asc" | "desc" | undefined;
5558
+ };
5559
+ output: {
5560
+ page: number;
5561
+ next: number | null;
5562
+ prev: number | null;
5563
+ pageSize: number;
5564
+ total: number;
5565
+ results: {
5566
+ id: string;
5567
+ workspaceName: string;
5568
+ accountId: string;
5569
+ status: "CONFIRMED" | "DROPPED" | "FAILED" | "FAILED_ON_CHAIN" | "ON_CHAIN" | "SCHEDULED" | "SUBMITTED" | "UNKNOWN";
5570
+ hash: string | null;
5571
+ replacementHash: string | null;
5572
+ intent: unknown;
5573
+ note: unknown;
5574
+ lesWalletTaskId: string;
5575
+ createdById: string;
5576
+ createdAt: Date;
5577
+ updatedAt: Date;
5578
+ }[];
5579
+ };
5580
+ meta: TrpcMeta;
5581
+ }>;
5582
+ findById: import("@trpc/server").TRPCQueryProcedure<{
5583
+ input: {
5584
+ id: string;
5585
+ };
5586
+ output: {
5587
+ id: string;
5588
+ workspaceName: string;
5589
+ accountId: string;
5590
+ status: "CONFIRMED" | "DROPPED" | "FAILED" | "FAILED_ON_CHAIN" | "ON_CHAIN" | "SCHEDULED" | "SUBMITTED" | "UNKNOWN";
5591
+ hash: string | null;
5592
+ replacementHash: string | null;
5593
+ intent: unknown;
5594
+ note: unknown;
5595
+ lesWalletTaskId: string;
5596
+ createdById: string;
5597
+ createdAt: Date;
5598
+ updatedAt: Date;
5599
+ statusTransitions: {
5600
+ sequence: number;
5601
+ status: "CONFIRMED" | "DROPPED" | "FAILED" | "FAILED_ON_CHAIN" | "ON_CHAIN" | "SCHEDULED" | "SUBMITTED" | "UNKNOWN";
5602
+ recordedAt: Date;
5603
+ failureReasonCode: string | null;
5604
+ failureReason: string | null;
5605
+ details: import("zod").JSONType;
5606
+ }[];
5607
+ };
5608
+ meta: TrpcMeta;
5609
+ }>;
5610
+ }>>;
5239
5611
  relationships: import("@trpc/server").TRPCBuiltRouter<{
5240
5612
  ctx: {
5241
5613
  req?: import("fastify").FastifyRequest<import("fastify").RouteGenericInterface, import("fastify").RawServerDefault, import("node:http").IncomingMessage, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown, import("fastify").FastifyBaseLogger, import("fastify/types/type-provider").ResolveFastifyRequestType<import("fastify").FastifyTypeProviderDefault, import("fastify").FastifySchema, import("fastify").RouteGenericInterface>> | undefined;
@@ -5710,6 +6082,131 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
5710
6082
  meta: TrpcMeta;
5711
6083
  }>;
5712
6084
  }>>;
6085
+ configCatPromotions: import("@trpc/server").TRPCBuiltRouter<{
6086
+ ctx: {
6087
+ req?: import("fastify").FastifyRequest<import("fastify").RouteGenericInterface, import("fastify").RawServerDefault, import("node:http").IncomingMessage, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown, import("fastify").FastifyBaseLogger, import("fastify/types/type-provider").ResolveFastifyRequestType<import("fastify").FastifyTypeProviderDefault, import("fastify").FastifySchema, import("fastify").RouteGenericInterface>> | undefined;
6088
+ res?: import("fastify").FastifyReply<import("fastify").RouteGenericInterface, import("fastify").RawServerDefault, import("node:http").IncomingMessage, import("node:http").ServerResponse<import("node:http").IncomingMessage>, unknown, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown> | undefined;
6089
+ info?: import("@trpc/server/unstable-core-do-not-import").TRPCRequestInfo | undefined;
6090
+ debugAuthToken?: string;
6091
+ rootAuthToken?: string;
6092
+ backofficeRequiredPermission?: BackofficePermission;
6093
+ io: import("socket.io").Server<import("socket.io").DefaultEventsMap, import("socket.io").DefaultEventsMap, import("socket.io").DefaultEventsMap, any> | null;
6094
+ user: {
6095
+ id: string;
6096
+ workspaceName: string;
6097
+ name: string;
6098
+ authUserId: string | null;
6099
+ pubKey: string;
6100
+ deviceType: UserDeviceType;
6101
+ deviceUserId: string | null;
6102
+ hsmId: string | null;
6103
+ u2fKeyHandle: string | null;
6104
+ u2fPubKey: string | null;
6105
+ legacyViewAll: boolean;
6106
+ role: UserRole;
6107
+ status: ActivationStatus$1;
6108
+ isSuspended: boolean;
6109
+ gateType: GateUserType | null;
6110
+ gateId: number;
6111
+ syncId: string;
6112
+ createdAt: Date;
6113
+ updatedAt: Date;
6114
+ } | null;
6115
+ authorization: string | null;
6116
+ readOnly: boolean;
6117
+ activityTracer: ActivityTracer;
6118
+ core: RuntimeInternalApiCapabilityProvider;
6119
+ };
6120
+ meta: TrpcMeta;
6121
+ errorShape: {
6122
+ message: string;
6123
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
6124
+ data: {
6125
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
6126
+ httpStatus: number;
6127
+ path?: string;
6128
+ stack?: string;
6129
+ maintenanceMode?: "FULL" | "READ_ONLY" | undefined;
6130
+ maintenance?: boolean | undefined;
6131
+ };
6132
+ };
6133
+ transformer: true;
6134
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
6135
+ matrix: import("@trpc/server").TRPCQueryProcedure<{
6136
+ input: {
6137
+ sourceEnv?: string | undefined;
6138
+ };
6139
+ output: {
6140
+ environments: {
6141
+ slug: string;
6142
+ displayName: string;
6143
+ order: number;
6144
+ }[];
6145
+ sourceEnv: string;
6146
+ rows: {
6147
+ flagKey: string;
6148
+ flagName: string;
6149
+ valueType: "boolean" | "json" | "number" | "string";
6150
+ cells: Record<string, {
6151
+ state: "blocked" | "missing" | "notAllowed" | "present" | "source";
6152
+ summary: string;
6153
+ blockers: {
6154
+ code: "CONFIGCAT_UNAVAILABLE" | "ENVIRONMENT_NOT_CONFIGURED" | "EXTERNAL_WRITE_FAILED" | "EXTERNAL_WRITE_OUTCOME_UNKNOWN" | "SELECTED_FLAG_ALREADY_EXISTS" | "SOURCE_FLAG_NOT_FOUND" | "TARGET_NOT_AFTER_SOURCE" | "UNSUPPORTED_FLAG";
6155
+ severity: "blocking";
6156
+ sourceEnv: string;
6157
+ targetEnv?: string | undefined;
6158
+ flagKey?: string | undefined;
6159
+ message: string;
6160
+ }[];
6161
+ }>;
6162
+ }[];
6163
+ summary: {
6164
+ promotableCells: number;
6165
+ blockedCells: number;
6166
+ alignedFlags: number;
6167
+ };
6168
+ fetchedAt: string;
6169
+ };
6170
+ meta: TrpcMeta;
6171
+ }>;
6172
+ promote: import("@trpc/server").TRPCMutationProcedure<{
6173
+ input: {
6174
+ sourceEnv: string;
6175
+ selections: {
6176
+ flagKey: string;
6177
+ targetEnv: string;
6178
+ }[];
6179
+ operatorReason?: string | undefined;
6180
+ };
6181
+ output: {
6182
+ attemptId: string;
6183
+ status: "applied" | "blocked" | "failed" | "partiallyApplied";
6184
+ created: {
6185
+ sourceEnv: string;
6186
+ targetEnv: string;
6187
+ flagKey: string;
6188
+ flagName: string;
6189
+ valueType: "boolean" | "json" | "number" | "string";
6190
+ }[];
6191
+ notAttempted: {
6192
+ sourceEnv: string;
6193
+ targetEnv: string;
6194
+ flagKey: string;
6195
+ flagName: string;
6196
+ valueType: "boolean" | "json" | "number" | "string";
6197
+ }[];
6198
+ blockers: {
6199
+ code: "CONFIGCAT_UNAVAILABLE" | "ENVIRONMENT_NOT_CONFIGURED" | "EXTERNAL_WRITE_FAILED" | "EXTERNAL_WRITE_OUTCOME_UNKNOWN" | "SELECTED_FLAG_ALREADY_EXISTS" | "SOURCE_FLAG_NOT_FOUND" | "TARGET_NOT_AFTER_SOURCE" | "UNSUPPORTED_FLAG";
6200
+ severity: "blocking";
6201
+ sourceEnv: string;
6202
+ targetEnv?: string | undefined;
6203
+ flagKey?: string | undefined;
6204
+ message: string;
6205
+ }[];
6206
+ };
6207
+ meta: TrpcMeta;
6208
+ }>;
6209
+ }>>;
5713
6210
  }>>;
5714
6211
  reports: import("@trpc/server").TRPCBuiltRouter<{
5715
6212
  ctx: {
@@ -7383,6 +7880,25 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
7383
7880
  };
7384
7881
  meta: TrpcMeta;
7385
7882
  }>;
7883
+ resolveAccounts: import("@trpc/server").TRPCMutationProcedure<{
7884
+ input: {
7885
+ workspaceName: string;
7886
+ accounts: {
7887
+ network: string;
7888
+ index: number;
7889
+ contractAddress?: string | null | undefined;
7890
+ }[];
7891
+ };
7892
+ output: {
7893
+ network: string;
7894
+ index: number;
7895
+ contractAddress: string | null;
7896
+ name: string;
7897
+ revaultId: string;
7898
+ address: string | null;
7899
+ }[];
7900
+ meta: TrpcMeta;
7901
+ }>;
7386
7902
  }>>;
7387
7903
  workspaces: import("@trpc/server").TRPCBuiltRouter<{
7388
7904
  ctx: {