@ledgerhq/revault-api 1.86.0 → 1.87.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,4 +1,4 @@
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 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";
2
2
  import z from "zod";
3
3
  import { Account, AllowedAction, Prisma, PrismaClient, ReviewConfig, VaultRequestReview, Workspace } from "@/generated/prisma/client";
4
4
  import "trpc-to-openapi";
@@ -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;
@@ -835,7 +945,7 @@ declare const createInternalCapabilities: (prisma: ExtendedPrismaClient) => {
835
945
  sortOrder: SortOrder;
836
946
  }) & {
837
947
  workspaceName?: string | string[];
838
- type?: AuditLogType;
948
+ type?: AuditLogType$1;
839
949
  fromDate?: Date;
840
950
  toDate?: Date;
841
951
  sortBy: "createdAt" | "type";
@@ -848,15 +958,16 @@ declare const createInternalCapabilities: (prisma: ExtendedPrismaClient) => {
848
958
  results: {
849
959
  id: string;
850
960
  workspaceName: string | null;
851
- type: AuditLogType;
961
+ type: AuditLogType$1;
852
962
  payload: import("@prisma/client/runtime/client").JsonValue;
853
963
  createdAt: Date;
854
964
  }[];
855
965
  }>;
966
+ insert: (input: BackofficeAuditLogInput) => Promise<void>;
856
967
  find: (id: string) => import("@/generated/prisma/models").Prisma__AuditLogClient<{
857
968
  id: string;
858
969
  workspaceName: string | null;
859
- type: AuditLogType;
970
+ type: AuditLogType$1;
860
971
  payload: import("@prisma/client/runtime/client").JsonValue;
861
972
  createdAt: Date;
862
973
  } | null, null, import("@prisma/client/runtime/client").DefaultArgs, {
@@ -1266,6 +1377,67 @@ declare const createInternalCapabilities: (prisma: ExtendedPrismaClient) => {
1266
1377
  restart: (actor: BackofficeClaims, requiredPermission: "request:restart", id: string) => Promise<void>;
1267
1378
  expire: (actor: BackofficeClaims, requiredPermission: "request:expire", id: string) => Promise<void>;
1268
1379
  };
1380
+ outgoingTransactions: {
1381
+ list: (input: ({
1382
+ page: number;
1383
+ pageSize: number;
1384
+ } & {
1385
+ sortOrder: SortOrder;
1386
+ }) & {
1387
+ workspaceName?: string | string[];
1388
+ accountId?: string;
1389
+ hash?: string;
1390
+ id?: string;
1391
+ currency?: string;
1392
+ sortBy: "createdAt" | "updatedAt";
1393
+ }) => Promise<{
1394
+ page: number;
1395
+ next: number | null;
1396
+ prev: number | null;
1397
+ pageSize: number;
1398
+ total: number;
1399
+ results: {
1400
+ id: string;
1401
+ workspaceName: string;
1402
+ accountId: string;
1403
+ intent: import("@prisma/client/runtime/client").JsonValue;
1404
+ note: import("@prisma/client/runtime/client").JsonValue;
1405
+ hash: string | null;
1406
+ replacementHash: string | null;
1407
+ status: OutgoingTransactionStatus;
1408
+ lesWalletTaskId: string;
1409
+ createdById: string;
1410
+ createdAt: Date;
1411
+ updatedAt: Date;
1412
+ }[];
1413
+ }>;
1414
+ find: (id: string) => import("@/generated/prisma/models").Prisma__OutgoingTransactionClient<({
1415
+ statusTransitions: {
1416
+ id: string;
1417
+ sequence: number;
1418
+ outgoingTransactionId: string;
1419
+ status: OutgoingTransactionStatus;
1420
+ recordedAt: Date;
1421
+ failureReasonCode: string | null;
1422
+ failureReason: string | null;
1423
+ }[];
1424
+ } & {
1425
+ id: string;
1426
+ workspaceName: string;
1427
+ accountId: string;
1428
+ intent: import("@prisma/client/runtime/client").JsonValue;
1429
+ note: import("@prisma/client/runtime/client").JsonValue;
1430
+ hash: string | null;
1431
+ replacementHash: string | null;
1432
+ status: OutgoingTransactionStatus;
1433
+ lesWalletTaskId: string;
1434
+ createdById: string;
1435
+ createdAt: Date;
1436
+ updatedAt: Date;
1437
+ }) | null, null, import("@prisma/client/runtime/client").DefaultArgs, {
1438
+ omit: import("@/generated/prisma/internal/prismaNamespace").GlobalOmitConfig | undefined;
1439
+ }>;
1440
+ };
1269
1441
  webhooks: {
1270
1442
  list: (input: ({
1271
1443
  page: number;
@@ -1372,6 +1544,7 @@ declare const createInternalCapabilities: (prisma: ExtendedPrismaClient) => {
1372
1544
  sampleLimit: number;
1373
1545
  }) => Promise<RelationshipDriftCheck>;
1374
1546
  };
1547
+ featureFlagPromotions: FeatureFlagPromotions;
1375
1548
  };
1376
1549
  interface RuntimeInternalCapabilities extends ReturnType<typeof createInternalCapabilities> {}
1377
1550
  /**
@@ -1494,7 +1667,7 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
1494
1667
  output: {
1495
1668
  sub: string;
1496
1669
  groups: string[];
1497
- permissions: ("backoffice:read" | "impersonation:list" | "impersonation:request" | "impersonation:revoke" | "onboarding:create" | "request:expire" | "request:restart" | "workspace:edit")[];
1670
+ permissions: ("backoffice:read" | "feature-flag:promote" | "impersonation:list" | "impersonation:request" | "impersonation:revoke" | "onboarding:create" | "request:expire" | "request:restart" | "workspace:edit")[];
1498
1671
  };
1499
1672
  meta: TrpcMeta;
1500
1673
  }>;
@@ -1576,7 +1749,7 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
1576
1749
  } & {
1577
1750
  status: ActivationStatus$1;
1578
1751
  maintenanceMode: MaintenanceMode;
1579
- oidcConfig: import("zod").output<typeof zOidcConfig> | null;
1752
+ oidcConfig: import("zod").infer<typeof zOidcConfig> | null;
1580
1753
  })[];
1581
1754
  };
1582
1755
  meta: TrpcMeta;
@@ -2533,7 +2706,7 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
2533
2706
  }[];
2534
2707
  };
2535
2708
  } & {
2536
- workspaceName: import("zod").output<typeof zWorkspaceName>;
2709
+ workspaceName: import("zod").infer<typeof zWorkspaceName>;
2537
2710
  lesWalletId: string | null;
2538
2711
  hsmId: string;
2539
2712
  })[];
@@ -2739,7 +2912,7 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
2739
2912
  createdAt: Date;
2740
2913
  updatedAt: Date;
2741
2914
  } & {
2742
- workspaceName: import("zod").output<typeof zWorkspaceName>;
2915
+ workspaceName: import("zod").infer<typeof zWorkspaceName>;
2743
2916
  hsmId: string;
2744
2917
  })[];
2745
2918
  };
@@ -2865,7 +3038,7 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
2865
3038
  updatedAt: Date;
2866
3039
  description: string | null;
2867
3040
  } & {
2868
- workspaceName: import("zod").output<typeof zWorkspaceName>;
3041
+ workspaceName: import("zod").infer<typeof zWorkspaceName>;
2869
3042
  hsmId: string;
2870
3043
  })[];
2871
3044
  };
@@ -3214,8 +3387,8 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
3214
3387
  createdAt: Date;
3215
3388
  updatedAt: Date;
3216
3389
  }, "rules"> & {
3217
- workspaceName: import("zod").output<typeof zWorkspaceName>;
3218
- rules: Array<import("zod").output<import("zod").ZodObject<{
3390
+ workspaceName: import("zod").infer<typeof zWorkspaceName>;
3391
+ rules: Array<import("zod").infer<import("zod").ZodObject<{
3219
3392
  reviewSteps: import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodObject<{
3220
3393
  quorum: import("zod").ZodNumber;
3221
3394
  userIds: import("zod").ZodArray<import("zod").ZodString>;
@@ -3398,7 +3571,7 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
3398
3571
  userIds: string[];
3399
3572
  }[];
3400
3573
  } & {
3401
- workspaceName: import("zod").output<typeof zWorkspaceName>;
3574
+ workspaceName: import("zod").infer<typeof zWorkspaceName>;
3402
3575
  })[];
3403
3576
  };
3404
3577
  meta: TrpcMeta;
@@ -3504,7 +3677,7 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
3504
3677
  transactionStatuses?: ("FAILED" | "PENDING" | "SUCCESSFUL" | "UNKNOWN")[] | undefined;
3505
3678
  };
3506
3679
  })) & {
3507
- workspaceName: import("zod").output<typeof zWorkspaceName>;
3680
+ workspaceName: import("zod").infer<typeof zWorkspaceName>;
3508
3681
  })[];
3509
3682
  };
3510
3683
  meta: TrpcMeta;
@@ -3625,7 +3798,7 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
3625
3798
  pageSize: number;
3626
3799
  total: number;
3627
3800
  results: (VaultRequestResponse & {
3628
- workspaceName: import("zod").output<typeof zWorkspaceName>;
3801
+ workspaceName: import("zod").infer<typeof zWorkspaceName>;
3629
3802
  })[];
3630
3803
  };
3631
3804
  meta: TrpcMeta;
@@ -5236,6 +5409,119 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
5236
5409
  meta: TrpcMeta;
5237
5410
  }>;
5238
5411
  }>>;
5412
+ outgoingTransactions: import("@trpc/server").TRPCBuiltRouter<{
5413
+ ctx: {
5414
+ 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;
5415
+ 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;
5416
+ info?: import("@trpc/server/unstable-core-do-not-import").TRPCRequestInfo | undefined;
5417
+ debugAuthToken?: string;
5418
+ rootAuthToken?: string;
5419
+ backofficeRequiredPermission?: BackofficePermission;
5420
+ io: import("socket.io").Server<import("socket.io").DefaultEventsMap, import("socket.io").DefaultEventsMap, import("socket.io").DefaultEventsMap, any> | null;
5421
+ user: {
5422
+ id: string;
5423
+ workspaceName: string;
5424
+ name: string;
5425
+ authUserId: string | null;
5426
+ pubKey: string;
5427
+ deviceType: UserDeviceType;
5428
+ deviceUserId: string | null;
5429
+ hsmId: string | null;
5430
+ u2fKeyHandle: string | null;
5431
+ u2fPubKey: string | null;
5432
+ legacyViewAll: boolean;
5433
+ role: UserRole;
5434
+ status: ActivationStatus$1;
5435
+ isSuspended: boolean;
5436
+ gateType: GateUserType | null;
5437
+ gateId: number;
5438
+ syncId: string;
5439
+ createdAt: Date;
5440
+ updatedAt: Date;
5441
+ } | null;
5442
+ authorization: string | null;
5443
+ readOnly: boolean;
5444
+ activityTracer: ActivityTracer;
5445
+ core: RuntimeInternalApiCapabilityProvider;
5446
+ };
5447
+ meta: TrpcMeta;
5448
+ errorShape: {
5449
+ message: string;
5450
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
5451
+ data: {
5452
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
5453
+ httpStatus: number;
5454
+ path?: string;
5455
+ stack?: string;
5456
+ maintenanceMode?: "FULL" | "READ_ONLY" | undefined;
5457
+ maintenance?: boolean | undefined;
5458
+ };
5459
+ };
5460
+ transformer: true;
5461
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
5462
+ list: import("@trpc/server").TRPCQueryProcedure<{
5463
+ input: {
5464
+ page?: number | undefined;
5465
+ pageSize?: number | undefined;
5466
+ workspaceName?: string | string[] | undefined;
5467
+ accountId?: string | undefined;
5468
+ hash?: string | undefined;
5469
+ id?: string | undefined;
5470
+ currency?: string | undefined;
5471
+ sortBy?: "createdAt" | "updatedAt" | undefined;
5472
+ sortOrder?: "asc" | "desc" | undefined;
5473
+ };
5474
+ output: {
5475
+ page: number;
5476
+ next: number | null;
5477
+ prev: number | null;
5478
+ pageSize: number;
5479
+ total: number;
5480
+ results: {
5481
+ id: string;
5482
+ workspaceName: string;
5483
+ accountId: string;
5484
+ status: "CONFIRMED" | "DROPPED" | "FAILED" | "ON_CHAIN" | "SCHEDULED" | "SUBMITTED";
5485
+ hash: string | null;
5486
+ replacementHash: string | null;
5487
+ intent: unknown;
5488
+ note: unknown;
5489
+ lesWalletTaskId: string;
5490
+ createdById: string;
5491
+ createdAt: Date;
5492
+ updatedAt: Date;
5493
+ }[];
5494
+ };
5495
+ meta: TrpcMeta;
5496
+ }>;
5497
+ findById: import("@trpc/server").TRPCQueryProcedure<{
5498
+ input: {
5499
+ id: string;
5500
+ };
5501
+ output: {
5502
+ id: string;
5503
+ workspaceName: string;
5504
+ accountId: string;
5505
+ status: "CONFIRMED" | "DROPPED" | "FAILED" | "ON_CHAIN" | "SCHEDULED" | "SUBMITTED";
5506
+ hash: string | null;
5507
+ replacementHash: string | null;
5508
+ intent: unknown;
5509
+ note: unknown;
5510
+ lesWalletTaskId: string;
5511
+ createdById: string;
5512
+ createdAt: Date;
5513
+ updatedAt: Date;
5514
+ statusTransitions: {
5515
+ sequence: number;
5516
+ status: "CONFIRMED" | "DROPPED" | "FAILED" | "ON_CHAIN" | "SCHEDULED" | "SUBMITTED";
5517
+ recordedAt: Date;
5518
+ failureReasonCode: string | null;
5519
+ failureReason: string | null;
5520
+ }[];
5521
+ };
5522
+ meta: TrpcMeta;
5523
+ }>;
5524
+ }>>;
5239
5525
  relationships: import("@trpc/server").TRPCBuiltRouter<{
5240
5526
  ctx: {
5241
5527
  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 +5996,131 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
5710
5996
  meta: TrpcMeta;
5711
5997
  }>;
5712
5998
  }>>;
5999
+ configCatPromotions: import("@trpc/server").TRPCBuiltRouter<{
6000
+ ctx: {
6001
+ 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;
6002
+ 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;
6003
+ info?: import("@trpc/server/unstable-core-do-not-import").TRPCRequestInfo | undefined;
6004
+ debugAuthToken?: string;
6005
+ rootAuthToken?: string;
6006
+ backofficeRequiredPermission?: BackofficePermission;
6007
+ io: import("socket.io").Server<import("socket.io").DefaultEventsMap, import("socket.io").DefaultEventsMap, import("socket.io").DefaultEventsMap, any> | null;
6008
+ user: {
6009
+ id: string;
6010
+ workspaceName: string;
6011
+ name: string;
6012
+ authUserId: string | null;
6013
+ pubKey: string;
6014
+ deviceType: UserDeviceType;
6015
+ deviceUserId: string | null;
6016
+ hsmId: string | null;
6017
+ u2fKeyHandle: string | null;
6018
+ u2fPubKey: string | null;
6019
+ legacyViewAll: boolean;
6020
+ role: UserRole;
6021
+ status: ActivationStatus$1;
6022
+ isSuspended: boolean;
6023
+ gateType: GateUserType | null;
6024
+ gateId: number;
6025
+ syncId: string;
6026
+ createdAt: Date;
6027
+ updatedAt: Date;
6028
+ } | null;
6029
+ authorization: string | null;
6030
+ readOnly: boolean;
6031
+ activityTracer: ActivityTracer;
6032
+ core: RuntimeInternalApiCapabilityProvider;
6033
+ };
6034
+ meta: TrpcMeta;
6035
+ errorShape: {
6036
+ message: string;
6037
+ code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
6038
+ data: {
6039
+ code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
6040
+ httpStatus: number;
6041
+ path?: string;
6042
+ stack?: string;
6043
+ maintenanceMode?: "FULL" | "READ_ONLY" | undefined;
6044
+ maintenance?: boolean | undefined;
6045
+ };
6046
+ };
6047
+ transformer: true;
6048
+ }, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
6049
+ matrix: import("@trpc/server").TRPCQueryProcedure<{
6050
+ input: {
6051
+ sourceEnv?: string | undefined;
6052
+ };
6053
+ output: {
6054
+ environments: {
6055
+ slug: string;
6056
+ displayName: string;
6057
+ order: number;
6058
+ }[];
6059
+ sourceEnv: string;
6060
+ rows: {
6061
+ flagKey: string;
6062
+ flagName: string;
6063
+ valueType: "boolean" | "json" | "number" | "string";
6064
+ cells: Record<string, {
6065
+ state: "blocked" | "missing" | "notAllowed" | "present" | "source";
6066
+ summary: string;
6067
+ blockers: {
6068
+ 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";
6069
+ severity: "blocking";
6070
+ sourceEnv: string;
6071
+ targetEnv?: string | undefined;
6072
+ flagKey?: string | undefined;
6073
+ message: string;
6074
+ }[];
6075
+ }>;
6076
+ }[];
6077
+ summary: {
6078
+ promotableCells: number;
6079
+ blockedCells: number;
6080
+ alignedFlags: number;
6081
+ };
6082
+ fetchedAt: string;
6083
+ };
6084
+ meta: TrpcMeta;
6085
+ }>;
6086
+ promote: import("@trpc/server").TRPCMutationProcedure<{
6087
+ input: {
6088
+ sourceEnv: string;
6089
+ selections: {
6090
+ flagKey: string;
6091
+ targetEnv: string;
6092
+ }[];
6093
+ operatorReason?: string | undefined;
6094
+ };
6095
+ output: {
6096
+ attemptId: string;
6097
+ status: "applied" | "blocked" | "failed" | "partiallyApplied";
6098
+ created: {
6099
+ sourceEnv: string;
6100
+ targetEnv: string;
6101
+ flagKey: string;
6102
+ flagName: string;
6103
+ valueType: "boolean" | "json" | "number" | "string";
6104
+ }[];
6105
+ notAttempted: {
6106
+ sourceEnv: string;
6107
+ targetEnv: string;
6108
+ flagKey: string;
6109
+ flagName: string;
6110
+ valueType: "boolean" | "json" | "number" | "string";
6111
+ }[];
6112
+ blockers: {
6113
+ 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";
6114
+ severity: "blocking";
6115
+ sourceEnv: string;
6116
+ targetEnv?: string | undefined;
6117
+ flagKey?: string | undefined;
6118
+ message: string;
6119
+ }[];
6120
+ };
6121
+ meta: TrpcMeta;
6122
+ }>;
6123
+ }>>;
5713
6124
  }>>;
5714
6125
  reports: import("@trpc/server").TRPCBuiltRouter<{
5715
6126
  ctx: {
@@ -7383,6 +7794,25 @@ declare const internalAppRouter: import("@trpc/server").TRPCBuiltRouter<{
7383
7794
  };
7384
7795
  meta: TrpcMeta;
7385
7796
  }>;
7797
+ resolveAccounts: import("@trpc/server").TRPCMutationProcedure<{
7798
+ input: {
7799
+ workspaceName: string;
7800
+ accounts: {
7801
+ network: string;
7802
+ index: number;
7803
+ contractAddress?: string | null | undefined;
7804
+ }[];
7805
+ };
7806
+ output: {
7807
+ network: string;
7808
+ index: number;
7809
+ contractAddress: string | null;
7810
+ name: string;
7811
+ revaultId: string;
7812
+ address: string | null;
7813
+ }[];
7814
+ meta: TrpcMeta;
7815
+ }>;
7386
7816
  }>>;
7387
7817
  workspaces: import("@trpc/server").TRPCBuiltRouter<{
7388
7818
  ctx: {
package/lib/fakes.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as RequestDataOf, Er as TransactionDataOf, Mo as MessageType, g as UserResponse, l as WhitelistResponse, mo as AccountType, nt as VaultRequestCreateInput, rt as VaultRequestResponse, ur as WebhookResponse, wn as GroupResponse, xr as AccountStakingFields, zn as AccountResponse } from "./app-lib-CdmEGeOS.mjs";
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";
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;