@env-hopper/backend-core 2.0.1-alpha.1 → 2.0.1-alpha.10

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.
Files changed (37) hide show
  1. package/dist/index.d.ts +797 -242
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +872 -262
  4. package/dist/index.js.map +1 -1
  5. package/package.json +3 -3
  6. package/prisma/schema.prisma +25 -6
  7. package/src/db/client.ts +8 -0
  8. package/src/db/index.ts +8 -4
  9. package/src/db/syncAppCatalog.ts +46 -38
  10. package/src/index.ts +69 -54
  11. package/src/middleware/backendResolver.ts +49 -0
  12. package/src/middleware/createEhMiddleware.ts +134 -0
  13. package/src/middleware/database.ts +62 -0
  14. package/src/middleware/featureRegistry.ts +173 -0
  15. package/src/middleware/index.ts +43 -0
  16. package/src/middleware/types.ts +200 -0
  17. package/src/modules/appCatalog/service.ts +3 -9
  18. package/src/modules/appCatalogAdmin/appCatalogAdminRouter.ts +118 -31
  19. package/src/modules/appCatalogAdmin/catalogBackupController.ts +213 -0
  20. package/src/modules/approvalMethod/approvalMethodRouter.ts +146 -0
  21. package/src/modules/approvalMethod/syncApprovalMethods.ts +45 -0
  22. package/src/modules/assets/screenshotRouter.ts +4 -8
  23. package/src/modules/auth/authProviders.ts +34 -102
  24. package/src/modules/auth/authRouter.ts +3 -5
  25. package/src/modules/auth/authorizationUtils.ts +37 -19
  26. package/src/modules/auth/devMockUserUtils.ts +49 -0
  27. package/src/modules/icons/iconRestController.ts +27 -46
  28. package/src/modules/icons/iconRouter.ts +160 -137
  29. package/src/modules/icons/iconService.ts +1 -1
  30. package/src/modules/icons/iconUtils.ts +46 -0
  31. package/src/prisma-json-types.d.ts +37 -0
  32. package/src/server/controller.ts +24 -38
  33. package/src/server/ehTrpcContext.ts +9 -0
  34. package/src/server/trpcSetup.ts +89 -0
  35. package/src/types/common/appCatalogTypes.ts +39 -34
  36. package/src/types/common/approvalMethodTypes.ts +127 -0
  37. package/src/types/index.ts +1 -0
package/dist/index.d.ts CHANGED
@@ -1,13 +1,14 @@
1
- import * as _trpc_server0 from "@trpc/server";
2
- import { TRPCRootObject } from "@trpc/server";
3
1
  import * as _prisma_client0 from "@prisma/client";
4
2
  import { Prisma, PrismaClient } from "@prisma/client";
3
+ import * as _trpc_server0 from "@trpc/server";
4
+ import { TRPCRootObject } from "@trpc/server";
5
5
  import * as better_auth0 from "better-auth";
6
6
  import { BetterAuthOptions, BetterAuthPlugin } from "better-auth";
7
7
  import { LanguageModel, Tool, tool } from "ai";
8
- import * as _prisma_client_runtime_library0 from "@prisma/client/runtime/library";
9
- import { DefaultWithOverridesAndTemplate } from "@env-hopper/shared-core";
10
8
  import { Express, Request, Response, Router } from "express";
9
+ import { DefaultWithOverridesAndTemplate } from "@env-hopper/shared-core";
10
+ import { User as User$1 } from "better-auth/types";
11
+ import * as _prisma_client_runtime_library0 from "@prisma/client/runtime/library";
11
12
 
12
13
  //#region src/types/common/sharedTypes.d.ts
13
14
  interface EhMetaDictionary {
@@ -223,35 +224,139 @@ interface User {
223
224
  displayName: string;
224
225
  }
225
226
  //#endregion
226
- //#region src/types/common/appCatalogTypes.d.ts
227
+ //#region src/types/common/approvalMethodTypes.d.ts
227
228
  /**
228
- * App Catalog Types - Universal Software Access Request Catalog
229
+ * Approval Method Types
229
230
  *
230
- * These types define a standardized catalog of software applications and their
231
- * access methods. The typing system is designed to be universal across companies,
232
- * abstracting away specific tools (Jira, Slack, etc.) into generic categories.
231
+ * Global approval method templates that apps can link to.
232
+ * Each method has a type (service, personTeam, custom) with type-specific config.
233
233
  */
234
+ type ApprovalMethodType = 'service' | 'personTeam' | 'custom';
234
235
  /**
235
- * Bot provider configuration - for chat/AI bots that handle access requests
236
+ * Contact for reaching out (not necessarily the approver)
236
237
  */
237
- interface BotProvider {
238
- id: string;
239
- name: string;
240
- platform?: 'slack' | 'teams' | 'web' | 'other';
238
+ interface ReachOutContact {
239
+ displayName: string;
240
+ contact: string;
241
+ }
242
+ /**
243
+ * Service type config - for bots, ticketing systems, self-service portals
244
+ */
245
+ interface ServiceConfig {
241
246
  url?: string;
242
247
  icon?: string;
243
- instructions?: string;
244
248
  }
245
249
  /**
246
- * Ticketing system provider configuration
250
+ * Person/Team type config - for human approvers
251
+ */
252
+ interface PersonTeamConfig {
253
+ reachOutContacts?: Array<ReachOutContact>;
254
+ }
255
+ /**
256
+ * Custom type config - generic, no additional fields
257
+ */
258
+ interface CustomConfig {}
259
+ /**
260
+ * Union of all config types
247
261
  */
248
- interface TicketingProvider {
262
+ type ApprovalMethodConfig = ServiceConfig | PersonTeamConfig | CustomConfig;
263
+ /**
264
+ * Approval Method - stored in DbApprovalMethod
265
+ */
266
+ interface ApprovalMethod {
249
267
  id: string;
268
+ type: ApprovalMethodType;
269
+ displayName: string;
270
+ config?: ApprovalMethodConfig;
271
+ createdAt?: Date;
272
+ updatedAt?: Date;
273
+ }
274
+ /**
275
+ * Role that can be requested for an app
276
+ */
277
+ interface AppRole {
250
278
  name: string;
251
- system: 'jira' | 'servicenow' | 'zendesk' | 'freshdesk' | 'other';
252
- baseUrl: string;
253
- icon?: string;
279
+ description?: string;
254
280
  }
281
+ /**
282
+ * Approver contact (person who approves, may differ from reach-out contact)
283
+ */
284
+ interface ApproverContact {
285
+ displayName: string;
286
+ contact?: string;
287
+ }
288
+ /**
289
+ * URL link with optional label
290
+ */
291
+ interface ApprovalUrl {
292
+ label?: string;
293
+ url: string;
294
+ }
295
+ /**
296
+ * Per-app approval details - stored as JSON in DbAppForCatalog
297
+ */
298
+ interface AppApprovalDetails {
299
+ approvalMethodId: string;
300
+ comments?: string;
301
+ requestPrompt?: string;
302
+ postApprovalInstructions?: string;
303
+ roles?: Array<AppRole>;
304
+ approvers?: Array<ApproverContact>;
305
+ urls?: Array<ApprovalUrl>;
306
+ whoToReachOut?: string;
307
+ }
308
+ interface CreateApprovalMethodInput {
309
+ type: ApprovalMethodType;
310
+ displayName: string;
311
+ config?: ApprovalMethodConfig;
312
+ }
313
+ interface UpdateApprovalMethodInput {
314
+ id: string;
315
+ type?: ApprovalMethodType;
316
+ displayName?: string;
317
+ config?: ApprovalMethodConfig;
318
+ }
319
+ //#endregion
320
+ //#region src/types/common/appCatalogTypes.d.ts
321
+ /**
322
+ * Common fields for all approver types
323
+ */
324
+ interface BaseApprover {
325
+ comment?: string;
326
+ roles?: Array<AppRole>;
327
+ approvalPolicy?: string;
328
+ postApprovalInstructions?: string;
329
+ seeMoreUrls?: Array<string>;
330
+ }
331
+ /**
332
+ * Bot approver configuration for an app
333
+ */
334
+ interface BotApprover extends BaseApprover {
335
+ type: 'bot';
336
+ url?: string;
337
+ prompt?: string;
338
+ }
339
+ /**
340
+ * Ticket approver configuration for an app
341
+ */
342
+ interface TicketApprover extends BaseApprover {
343
+ type: 'ticket';
344
+ url?: string;
345
+ requestFormTemplate?: string;
346
+ }
347
+ /**
348
+ * Person/Group approver configuration for an app
349
+ */
350
+ interface PersonApprover extends BaseApprover {
351
+ type: 'person';
352
+ email?: string;
353
+ url?: string;
354
+ description?: string;
355
+ }
356
+ /**
357
+ * Union of all approver types
358
+ */
359
+ type Approver = BotApprover | TicketApprover | PersonApprover;
255
360
  /**
256
361
  * Bot-based access - request access through a chat bot
257
362
  */
@@ -311,21 +416,6 @@ interface ManualAccess {
311
416
  * Union type for all access methods
312
417
  */
313
418
  type AccessMethod = BotAccess | TicketingAccess | EmailAccess | SelfServiceAccess | DocumentationAccess | ManualAccess;
314
- /**
315
- * Approver information for apps that require specific approval
316
- */
317
- interface Approver {
318
- name: string;
319
- email: string;
320
- }
321
- /**
322
- * Available roles for an application
323
- */
324
- interface AppRole {
325
- id: string;
326
- name: string;
327
- description?: string;
328
- }
329
419
  /**
330
420
  * Application entry in the catalog
331
421
  */
@@ -336,8 +426,7 @@ interface AppForCatalog {
336
426
  description?: string;
337
427
  access?: AccessMethod;
338
428
  teams?: Array<string>;
339
- roles?: Array<AppRole>;
340
- approver?: Approver;
429
+ approvalDetails?: AppApprovalDetails;
341
430
  notes?: string;
342
431
  tags?: Array<string>;
343
432
  appUrl?: string;
@@ -418,6 +507,23 @@ interface EhBackendDeployment {
418
507
  version: EhBackendDataVersion;
419
508
  }
420
509
  //#endregion
510
+ //#region src/server/ehTrpcContext.d.ts
511
+ interface EhTrpcContext {
512
+ companySpecificBackend: EhBackendCompanySpecificBackend;
513
+ user: User$1 | null;
514
+ adminGroups: Array<string>;
515
+ }
516
+ interface EhTrpcContextOptions {
517
+ companySpecificBackend: EhBackendCompanySpecificBackend;
518
+ user?: User$1 | null;
519
+ adminGroups: Array<string>;
520
+ }
521
+ declare function createEhTrpcContext({
522
+ companySpecificBackend,
523
+ user,
524
+ adminGroups
525
+ }: EhTrpcContextOptions): EhTrpcContext;
526
+ //#endregion
421
527
  //#region src/modules/auth/auth.d.ts
422
528
  interface AuthConfig {
423
529
  appName?: string;
@@ -455,17 +561,6 @@ declare function createAuth(config: AuthConfig): better_auth0.Auth<{
455
561
  }>;
456
562
  type BetterAuth = ReturnType<typeof createAuth>;
457
563
  //#endregion
458
- //#region src/server/ehTrpcContext.d.ts
459
- interface EhTrpcContext {
460
- companySpecificBackend: EhBackendCompanySpecificBackend;
461
- }
462
- interface EhTrpcContextOptions {
463
- companySpecificBackend: EhBackendCompanySpecificBackend;
464
- }
465
- declare function createEhTrpcContext({
466
- companySpecificBackend
467
- }: EhTrpcContextOptions): EhTrpcContext;
468
- //#endregion
469
564
  //#region src/server/controller.d.ts
470
565
  /**
471
566
  * Create the main tRPC router with optional auth instance
@@ -473,19 +568,26 @@ declare function createEhTrpcContext({
473
568
  */
474
569
  declare function createTrpcRouter(auth?: BetterAuth): _trpc_server0.TRPCBuiltRouter<{
475
570
  ctx: EhTrpcContext;
476
- meta: {};
571
+ meta: object;
477
572
  errorShape: _trpc_server0.TRPCDefaultErrorShape;
478
573
  transformer: false;
479
574
  }, _trpc_server0.TRPCDecorateCreateRouterOptions<{
480
575
  bootstrap: _trpc_server0.TRPCQueryProcedure<{
481
576
  input: void;
482
577
  output: BootstrapConfigData;
483
- meta: {};
578
+ meta: object;
579
+ }>;
580
+ authConfig: _trpc_server0.TRPCQueryProcedure<{
581
+ input: void;
582
+ output: {
583
+ adminGroups: string[];
584
+ };
585
+ meta: object;
484
586
  }>;
485
587
  availabilityMatrix: _trpc_server0.TRPCQueryProcedure<{
486
588
  input: void;
487
589
  output: AvailabilityMatrixData;
488
- meta: {};
590
+ meta: object;
489
591
  }>;
490
592
  tryFindRenameRule: _trpc_server0.TRPCQueryProcedure<{
491
593
  input: {
@@ -493,17 +595,17 @@ declare function createTrpcRouter(auth?: BetterAuth): _trpc_server0.TRPCBuiltRou
493
595
  resourceSlug?: string | undefined;
494
596
  };
495
597
  output: false | RenameRule;
496
- meta: {};
598
+ meta: object;
497
599
  }>;
498
600
  resourceJumps: _trpc_server0.TRPCQueryProcedure<{
499
601
  input: void;
500
602
  output: ResourceJumpsData;
501
- meta: {};
603
+ meta: object;
502
604
  }>;
503
605
  resourceJumpsExtended: _trpc_server0.TRPCQueryProcedure<{
504
606
  input: void;
505
607
  output: ResourceJumpsExtendedData;
506
- meta: {};
608
+ meta: object;
507
609
  }>;
508
610
  resourceJumpBySlugAndEnv: _trpc_server0.TRPCQueryProcedure<{
509
611
  input: {
@@ -511,16 +613,16 @@ declare function createTrpcRouter(auth?: BetterAuth): _trpc_server0.TRPCBuiltRou
511
613
  envSlug: string;
512
614
  };
513
615
  output: ResourceJumpsData;
514
- meta: {};
616
+ meta: object;
515
617
  }>;
516
618
  appCatalog: _trpc_server0.TRPCQueryProcedure<{
517
619
  input: void;
518
620
  output: AppCatalogData;
519
- meta: {};
621
+ meta: object;
520
622
  }>;
521
623
  icon: _trpc_server0.TRPCBuiltRouter<{
522
624
  ctx: EhTrpcContext;
523
- meta: {};
625
+ meta: object;
524
626
  errorShape: _trpc_server0.TRPCDefaultErrorShape;
525
627
  transformer: false;
526
628
  }, _trpc_server0.TRPCDecorateCreateRouterOptions<{
@@ -528,13 +630,13 @@ declare function createTrpcRouter(auth?: BetterAuth): _trpc_server0.TRPCBuiltRou
528
630
  input: void;
529
631
  output: {
530
632
  id: string;
633
+ createdAt: Date;
634
+ updatedAt: Date;
531
635
  name: string;
532
636
  mimeType: string;
533
637
  fileSize: number;
534
- createdAt: Date;
535
- updatedAt: Date;
536
638
  }[];
537
- meta: {};
639
+ meta: object;
538
640
  }>;
539
641
  getOne: _trpc_server0.TRPCQueryProcedure<{
540
642
  input: {
@@ -542,18 +644,13 @@ declare function createTrpcRouter(auth?: BetterAuth): _trpc_server0.TRPCBuiltRou
542
644
  };
543
645
  output: {
544
646
  id: string;
647
+ createdAt: Date;
648
+ updatedAt: Date;
545
649
  name: string;
546
- content: _prisma_client_runtime_library0.Bytes;
547
650
  mimeType: string;
548
651
  fileSize: number;
549
- assetType: _prisma_client0.$Enums.AssetType;
550
- checksum: string;
551
- width: number | null;
552
- height: number | null;
553
- createdAt: Date;
554
- updatedAt: Date;
555
652
  } | null;
556
- meta: {};
653
+ meta: object;
557
654
  }>;
558
655
  create: _trpc_server0.TRPCMutationProcedure<{
559
656
  input: {
@@ -564,6 +661,8 @@ declare function createTrpcRouter(auth?: BetterAuth): _trpc_server0.TRPCBuiltRou
564
661
  };
565
662
  output: {
566
663
  id: string;
664
+ createdAt: Date;
665
+ updatedAt: Date;
567
666
  name: string;
568
667
  content: _prisma_client_runtime_library0.Bytes;
569
668
  mimeType: string;
@@ -572,10 +671,8 @@ declare function createTrpcRouter(auth?: BetterAuth): _trpc_server0.TRPCBuiltRou
572
671
  checksum: string;
573
672
  width: number | null;
574
673
  height: number | null;
575
- createdAt: Date;
576
- updatedAt: Date;
577
674
  };
578
- meta: {};
675
+ meta: object;
579
676
  }>;
580
677
  update: _trpc_server0.TRPCMutationProcedure<{
581
678
  input: {
@@ -587,6 +684,8 @@ declare function createTrpcRouter(auth?: BetterAuth): _trpc_server0.TRPCBuiltRou
587
684
  };
588
685
  output: {
589
686
  id: string;
687
+ createdAt: Date;
688
+ updatedAt: Date;
590
689
  name: string;
591
690
  content: _prisma_client_runtime_library0.Bytes;
592
691
  mimeType: string;
@@ -595,10 +694,8 @@ declare function createTrpcRouter(auth?: BetterAuth): _trpc_server0.TRPCBuiltRou
595
694
  checksum: string;
596
695
  width: number | null;
597
696
  height: number | null;
598
- createdAt: Date;
599
- updatedAt: Date;
600
697
  };
601
- meta: {};
698
+ meta: object;
602
699
  }>;
603
700
  delete: _trpc_server0.TRPCMutationProcedure<{
604
701
  input: {
@@ -606,6 +703,8 @@ declare function createTrpcRouter(auth?: BetterAuth): _trpc_server0.TRPCBuiltRou
606
703
  };
607
704
  output: {
608
705
  id: string;
706
+ createdAt: Date;
707
+ updatedAt: Date;
609
708
  name: string;
610
709
  content: _prisma_client_runtime_library0.Bytes;
611
710
  mimeType: string;
@@ -614,17 +713,15 @@ declare function createTrpcRouter(auth?: BetterAuth): _trpc_server0.TRPCBuiltRou
614
713
  checksum: string;
615
714
  width: number | null;
616
715
  height: number | null;
617
- createdAt: Date;
618
- updatedAt: Date;
619
716
  };
620
- meta: {};
717
+ meta: object;
621
718
  }>;
622
719
  deleteMany: _trpc_server0.TRPCMutationProcedure<{
623
720
  input: {
624
721
  ids: string[];
625
722
  };
626
723
  output: _prisma_client0.Prisma.BatchPayload;
627
- meta: {};
724
+ meta: object;
628
725
  }>;
629
726
  getContent: _trpc_server0.TRPCQueryProcedure<{
630
727
  input: {
@@ -633,13 +730,14 @@ declare function createTrpcRouter(auth?: BetterAuth): _trpc_server0.TRPCBuiltRou
633
730
  output: {
634
731
  content: string;
635
732
  mimeType: string;
733
+ name: string;
636
734
  };
637
- meta: {};
735
+ meta: object;
638
736
  }>;
639
737
  }>>;
640
738
  screenshot: _trpc_server0.TRPCBuiltRouter<{
641
739
  ctx: EhTrpcContext;
642
- meta: {};
740
+ meta: object;
643
741
  errorShape: _trpc_server0.TRPCDefaultErrorShape;
644
742
  transformer: false;
645
743
  }, _trpc_server0.TRPCDecorateCreateRouterOptions<{
@@ -647,15 +745,15 @@ declare function createTrpcRouter(auth?: BetterAuth): _trpc_server0.TRPCBuiltRou
647
745
  input: void;
648
746
  output: {
649
747
  id: string;
748
+ createdAt: Date;
749
+ updatedAt: Date;
650
750
  name: string;
651
751
  mimeType: string;
652
752
  fileSize: number;
653
753
  width: number | null;
654
754
  height: number | null;
655
- createdAt: Date;
656
- updatedAt: Date;
657
755
  }[];
658
- meta: {};
756
+ meta: object;
659
757
  }>;
660
758
  getOne: _trpc_server0.TRPCQueryProcedure<{
661
759
  input: {
@@ -663,15 +761,15 @@ declare function createTrpcRouter(auth?: BetterAuth): _trpc_server0.TRPCBuiltRou
663
761
  };
664
762
  output: {
665
763
  id: string;
764
+ createdAt: Date;
765
+ updatedAt: Date;
666
766
  name: string;
667
767
  mimeType: string;
668
768
  fileSize: number;
669
769
  width: number | null;
670
770
  height: number | null;
671
- createdAt: Date;
672
- updatedAt: Date;
673
771
  } | null;
674
- meta: {};
772
+ meta: object;
675
773
  }>;
676
774
  getByAppSlug: _trpc_server0.TRPCQueryProcedure<{
677
775
  input: {
@@ -679,15 +777,15 @@ declare function createTrpcRouter(auth?: BetterAuth): _trpc_server0.TRPCBuiltRou
679
777
  };
680
778
  output: {
681
779
  id: string;
780
+ createdAt: Date;
781
+ updatedAt: Date;
682
782
  name: string;
683
783
  mimeType: string;
684
784
  fileSize: number;
685
785
  width: number | null;
686
786
  height: number | null;
687
- createdAt: Date;
688
- updatedAt: Date;
689
787
  }[];
690
- meta: {};
788
+ meta: object;
691
789
  }>;
692
790
  getFirstByAppSlug: _trpc_server0.TRPCQueryProcedure<{
693
791
  input: {
@@ -695,20 +793,20 @@ declare function createTrpcRouter(auth?: BetterAuth): _trpc_server0.TRPCBuiltRou
695
793
  };
696
794
  output: {
697
795
  id: string;
796
+ createdAt: Date;
797
+ updatedAt: Date;
698
798
  name: string;
699
799
  mimeType: string;
700
800
  fileSize: number;
701
801
  width: number | null;
702
802
  height: number | null;
703
- createdAt: Date;
704
- updatedAt: Date;
705
803
  } | null;
706
- meta: {};
804
+ meta: object;
707
805
  }>;
708
806
  }>>;
709
807
  appCatalogAdmin: _trpc_server0.TRPCBuiltRouter<{
710
808
  ctx: EhTrpcContext;
711
- meta: {};
809
+ meta: object;
712
810
  errorShape: _trpc_server0.TRPCDefaultErrorShape;
713
811
  transformer: false;
714
812
  }, _trpc_server0.TRPCDecorateCreateRouterOptions<{
@@ -721,11 +819,9 @@ declare function createTrpcRouter(auth?: BetterAuth): _trpc_server0.TRPCBuiltRou
721
819
  description: string;
722
820
  slug: string;
723
821
  displayName: string;
724
- access: PrismaJson.AccessMethod;
822
+ access: PrismaJson.AccessMethod | null;
725
823
  teams: string[];
726
- roles: PrismaJson.AppRole | null;
727
- approverName: string | null;
728
- approverEmail: string | null;
824
+ approvalDetails: PrismaJson.AppApprovalDetails | null;
729
825
  notes: string | null;
730
826
  tags: string[];
731
827
  appUrl: string | null;
@@ -733,7 +829,7 @@ declare function createTrpcRouter(auth?: BetterAuth): _trpc_server0.TRPCBuiltRou
733
829
  iconName: string | null;
734
830
  screenshotIds: string[];
735
831
  }[];
736
- meta: {};
832
+ meta: object;
737
833
  }>;
738
834
  getById: _trpc_server0.TRPCQueryProcedure<{
739
835
  input: {
@@ -746,11 +842,9 @@ declare function createTrpcRouter(auth?: BetterAuth): _trpc_server0.TRPCBuiltRou
746
842
  description: string;
747
843
  slug: string;
748
844
  displayName: string;
749
- access: PrismaJson.AccessMethod;
845
+ access: PrismaJson.AccessMethod | null;
750
846
  teams: string[];
751
- roles: PrismaJson.AppRole | null;
752
- approverName: string | null;
753
- approverEmail: string | null;
847
+ approvalDetails: PrismaJson.AppApprovalDetails | null;
754
848
  notes: string | null;
755
849
  tags: string[];
756
850
  appUrl: string | null;
@@ -758,26 +852,59 @@ declare function createTrpcRouter(auth?: BetterAuth): _trpc_server0.TRPCBuiltRou
758
852
  iconName: string | null;
759
853
  screenshotIds: string[];
760
854
  } | null;
761
- meta: {};
855
+ meta: object;
856
+ }>;
857
+ getBySlug: _trpc_server0.TRPCQueryProcedure<{
858
+ input: {
859
+ slug: string;
860
+ };
861
+ output: {
862
+ id: string;
863
+ createdAt: Date;
864
+ updatedAt: Date;
865
+ description: string;
866
+ slug: string;
867
+ displayName: string;
868
+ access: PrismaJson.AccessMethod | null;
869
+ teams: string[];
870
+ approvalDetails: PrismaJson.AppApprovalDetails | null;
871
+ notes: string | null;
872
+ tags: string[];
873
+ appUrl: string | null;
874
+ links: PrismaJson.AppLink[] | null;
875
+ iconName: string | null;
876
+ screenshotIds: string[];
877
+ } | null;
878
+ meta: object;
762
879
  }>;
763
880
  create: _trpc_server0.TRPCMutationProcedure<{
764
881
  input: {
765
882
  slug: string;
766
883
  displayName: string;
767
884
  description: string;
768
- access: {
885
+ access?: {
769
886
  [x: string]: unknown;
770
- type: "bot" | "ticketing" | "email" | "self-service" | "documentation" | "manual";
771
- };
887
+ type: "email" | "bot" | "ticketing" | "self-service" | "documentation" | "manual";
888
+ } | undefined;
772
889
  teams?: string[] | undefined;
773
- roles?: {
774
- id: string;
775
- name: string;
776
- description?: string | undefined;
777
- }[] | undefined;
778
- approver?: {
779
- name: string;
780
- email: string;
890
+ approvalDetails?: {
891
+ approvalMethodId: string;
892
+ comments?: string | undefined;
893
+ requestPrompt?: string | undefined;
894
+ postApprovalInstructions?: string | undefined;
895
+ roles?: {
896
+ name: string;
897
+ description?: string | undefined;
898
+ }[] | undefined;
899
+ approvers?: {
900
+ displayName: string;
901
+ contact?: string | undefined;
902
+ }[] | undefined;
903
+ urls?: {
904
+ url: string;
905
+ label?: string | undefined;
906
+ }[] | undefined;
907
+ whoToReachOut?: string | undefined;
781
908
  } | undefined;
782
909
  notes?: string | undefined;
783
910
  tags?: string[] | undefined;
@@ -796,11 +923,9 @@ declare function createTrpcRouter(auth?: BetterAuth): _trpc_server0.TRPCBuiltRou
796
923
  description: string;
797
924
  slug: string;
798
925
  displayName: string;
799
- access: PrismaJson.AccessMethod;
926
+ access: PrismaJson.AccessMethod | null;
800
927
  teams: string[];
801
- roles: PrismaJson.AppRole | null;
802
- approverName: string | null;
803
- approverEmail: string | null;
928
+ approvalDetails: PrismaJson.AppApprovalDetails | null;
804
929
  notes: string | null;
805
930
  tags: string[];
806
931
  appUrl: string | null;
@@ -808,7 +933,7 @@ declare function createTrpcRouter(auth?: BetterAuth): _trpc_server0.TRPCBuiltRou
808
933
  iconName: string | null;
809
934
  screenshotIds: string[];
810
935
  };
811
- meta: {};
936
+ meta: object;
812
937
  }>;
813
938
  update: _trpc_server0.TRPCMutationProcedure<{
814
939
  input: {
@@ -818,17 +943,27 @@ declare function createTrpcRouter(auth?: BetterAuth): _trpc_server0.TRPCBuiltRou
818
943
  description?: string | undefined;
819
944
  access?: {
820
945
  [x: string]: unknown;
821
- type: "bot" | "ticketing" | "email" | "self-service" | "documentation" | "manual";
946
+ type: "email" | "bot" | "ticketing" | "self-service" | "documentation" | "manual";
822
947
  } | undefined;
823
948
  teams?: string[] | undefined;
824
- roles?: {
825
- id: string;
826
- name: string;
827
- description?: string | undefined;
828
- }[] | undefined;
829
- approver?: {
830
- name: string;
831
- email: string;
949
+ approvalDetails?: {
950
+ approvalMethodId: string;
951
+ comments?: string | undefined;
952
+ requestPrompt?: string | undefined;
953
+ postApprovalInstructions?: string | undefined;
954
+ roles?: {
955
+ name: string;
956
+ description?: string | undefined;
957
+ }[] | undefined;
958
+ approvers?: {
959
+ displayName: string;
960
+ contact?: string | undefined;
961
+ }[] | undefined;
962
+ urls?: {
963
+ url: string;
964
+ label?: string | undefined;
965
+ }[] | undefined;
966
+ whoToReachOut?: string | undefined;
832
967
  } | undefined;
833
968
  notes?: string | undefined;
834
969
  tags?: string[] | undefined;
@@ -847,11 +982,9 @@ declare function createTrpcRouter(auth?: BetterAuth): _trpc_server0.TRPCBuiltRou
847
982
  description: string;
848
983
  slug: string;
849
984
  displayName: string;
850
- access: PrismaJson.AccessMethod;
985
+ access: PrismaJson.AccessMethod | null;
851
986
  teams: string[];
852
- roles: PrismaJson.AppRole | null;
853
- approverName: string | null;
854
- approverEmail: string | null;
987
+ approvalDetails: PrismaJson.AppApprovalDetails | null;
855
988
  notes: string | null;
856
989
  tags: string[];
857
990
  appUrl: string | null;
@@ -859,7 +992,31 @@ declare function createTrpcRouter(auth?: BetterAuth): _trpc_server0.TRPCBuiltRou
859
992
  iconName: string | null;
860
993
  screenshotIds: string[];
861
994
  };
862
- meta: {};
995
+ meta: object;
996
+ }>;
997
+ updateScreenshots: _trpc_server0.TRPCMutationProcedure<{
998
+ input: {
999
+ id: string;
1000
+ screenshotIds: string[];
1001
+ };
1002
+ output: {
1003
+ id: string;
1004
+ createdAt: Date;
1005
+ updatedAt: Date;
1006
+ description: string;
1007
+ slug: string;
1008
+ displayName: string;
1009
+ access: PrismaJson.AccessMethod | null;
1010
+ teams: string[];
1011
+ approvalDetails: PrismaJson.AppApprovalDetails | null;
1012
+ notes: string | null;
1013
+ tags: string[];
1014
+ appUrl: string | null;
1015
+ links: PrismaJson.AppLink[] | null;
1016
+ iconName: string | null;
1017
+ screenshotIds: string[];
1018
+ };
1019
+ meta: object;
863
1020
  }>;
864
1021
  delete: _trpc_server0.TRPCMutationProcedure<{
865
1022
  input: {
@@ -872,11 +1029,9 @@ declare function createTrpcRouter(auth?: BetterAuth): _trpc_server0.TRPCBuiltRou
872
1029
  description: string;
873
1030
  slug: string;
874
1031
  displayName: string;
875
- access: PrismaJson.AccessMethod;
1032
+ access: PrismaJson.AccessMethod | null;
876
1033
  teams: string[];
877
- roles: PrismaJson.AppRole | null;
878
- approverName: string | null;
879
- approverEmail: string | null;
1034
+ approvalDetails: PrismaJson.AppApprovalDetails | null;
880
1035
  notes: string | null;
881
1036
  tags: string[];
882
1037
  appUrl: string | null;
@@ -884,7 +1039,75 @@ declare function createTrpcRouter(auth?: BetterAuth): _trpc_server0.TRPCBuiltRou
884
1039
  iconName: string | null;
885
1040
  screenshotIds: string[];
886
1041
  };
887
- meta: {};
1042
+ meta: object;
1043
+ }>;
1044
+ }>>;
1045
+ approvalMethod: _trpc_server0.TRPCBuiltRouter<{
1046
+ ctx: EhTrpcContext;
1047
+ meta: object;
1048
+ errorShape: _trpc_server0.TRPCDefaultErrorShape;
1049
+ transformer: false;
1050
+ }, _trpc_server0.TRPCDecorateCreateRouterOptions<{
1051
+ list: _trpc_server0.TRPCQueryProcedure<{
1052
+ input: void;
1053
+ output: ApprovalMethod[];
1054
+ meta: object;
1055
+ }>;
1056
+ getById: _trpc_server0.TRPCQueryProcedure<{
1057
+ input: {
1058
+ id: string;
1059
+ };
1060
+ output: ApprovalMethod | null;
1061
+ meta: object;
1062
+ }>;
1063
+ create: _trpc_server0.TRPCMutationProcedure<{
1064
+ input: {
1065
+ type: "custom" | "service" | "personTeam";
1066
+ displayName: string;
1067
+ config?: Record<string, never> | {
1068
+ url?: string | undefined;
1069
+ icon?: string | undefined;
1070
+ } | {
1071
+ reachOutContacts?: {
1072
+ displayName: string;
1073
+ contact: string;
1074
+ }[] | undefined;
1075
+ } | undefined;
1076
+ };
1077
+ output: ApprovalMethod;
1078
+ meta: object;
1079
+ }>;
1080
+ update: _trpc_server0.TRPCMutationProcedure<{
1081
+ input: {
1082
+ id: string;
1083
+ type?: "custom" | "service" | "personTeam" | undefined;
1084
+ displayName?: string | undefined;
1085
+ config?: Record<string, never> | {
1086
+ url?: string | undefined;
1087
+ icon?: string | undefined;
1088
+ } | {
1089
+ reachOutContacts?: {
1090
+ displayName: string;
1091
+ contact: string;
1092
+ }[] | undefined;
1093
+ } | undefined;
1094
+ };
1095
+ output: ApprovalMethod;
1096
+ meta: object;
1097
+ }>;
1098
+ delete: _trpc_server0.TRPCMutationProcedure<{
1099
+ input: {
1100
+ id: string;
1101
+ };
1102
+ output: ApprovalMethod;
1103
+ meta: object;
1104
+ }>;
1105
+ listByType: _trpc_server0.TRPCQueryProcedure<{
1106
+ input: {
1107
+ type: "custom" | "service" | "personTeam";
1108
+ };
1109
+ output: ApprovalMethod[];
1110
+ meta: object;
888
1111
  }>;
889
1112
  }>>;
890
1113
  auth: _trpc_server0.TRPCBuiltRouter<{
@@ -896,7 +1119,15 @@ declare function createTrpcRouter(auth?: BetterAuth): _trpc_server0.TRPCBuiltRou
896
1119
  getSession: _trpc_server0.TRPCQueryProcedure<{
897
1120
  input: void;
898
1121
  output: {
899
- user: {} | null;
1122
+ user: {
1123
+ id: string;
1124
+ createdAt: Date;
1125
+ updatedAt: Date;
1126
+ email: string;
1127
+ emailVerified: boolean;
1128
+ name: string;
1129
+ image?: string | null | undefined;
1130
+ } | null;
900
1131
  isAuthenticated: boolean;
901
1132
  };
902
1133
  meta: {};
@@ -951,7 +1182,15 @@ declare function createAuthRouter(t: TRPCRootObject<EhTrpcContext, {}, {}>, auth
951
1182
  getSession: _trpc_server0.TRPCQueryProcedure<{
952
1183
  input: void;
953
1184
  output: {
954
- user: {} | null;
1185
+ user: {
1186
+ id: string;
1187
+ createdAt: Date;
1188
+ updatedAt: Date;
1189
+ email: string;
1190
+ emailVerified: boolean;
1191
+ name: string;
1192
+ image?: string | null | undefined;
1193
+ } | null;
955
1194
  isAuthenticated: boolean;
956
1195
  };
957
1196
  meta: {};
@@ -966,35 +1205,6 @@ declare function createAuthRouter(t: TRPCRootObject<EhTrpcContext, {}, {}>, auth
966
1205
  }>>;
967
1206
  type AuthRouter = ReturnType<typeof createAuthRouter>;
968
1207
  //#endregion
969
- //#region src/modules/auth/authProviders.d.ts
970
- declare function getAuthProvidersFromEnv(): BetterAuthOptions['socialProviders'];
971
- /**
972
- * Get auth plugins from environment variables
973
- * Currently supports: Okta
974
- *
975
- * Example .env:
976
- * AUTH_OKTA_CLIENT_ID=your_okta_client_id
977
- * AUTH_OKTA_CLIENT_SECRET=your_okta_client_secret
978
- * AUTH_OKTA_ISSUER=https://your-org.okta.com/oauth2/ausxb83g4wY1x09ec0h7
979
- *
980
- * Note: If you get "User is not assigned to the client application" errors,
981
- * you need to configure your Okta application to allow all users:
982
- * 1. In Okta Admin Console, go to Applications → Your App
983
- * 2. Assignments tab → Assign to Groups → Add "Everyone" group
984
- * OR
985
- * 3. Edit the application → In "User consent" section, enable appropriate settings
986
- *
987
- * For group-based authorization:
988
- * 1. Add "groups" scope to your auth server policy rule
989
- * 2. Create a groups claim in your auth server
990
- * 3. Groups will be available in the user object after authentication
991
- */
992
- declare function getAuthPluginsFromEnv(): Array<BetterAuthPlugin>;
993
- /**
994
- * Validate required auth environment variables
995
- */
996
- declare function validateAuthConfig(): void;
997
- //#endregion
998
1208
  //#region src/modules/auth/authorizationUtils.d.ts
999
1209
  /**
1000
1210
  * Authorization utilities for checking user permissions based on groups
@@ -1032,19 +1242,18 @@ declare function isMemberOfAnyGroup(user: UserWithGroups | null | undefined, all
1032
1242
  * Check if user is a member of all specified groups
1033
1243
  */
1034
1244
  declare function isMemberOfAllGroups(user: UserWithGroups | null | undefined, requiredGroups: Array<string>): boolean;
1035
- /**
1036
- * Get admin group names from environment variables
1037
- * Default: env_hopper_ui_super_admins
1038
- */
1039
- declare function getAdminGroupsFromEnv(): Array<string>;
1040
1245
  /**
1041
1246
  * Check if user has admin permissions
1247
+ * @param user User object with groups
1248
+ * @param adminGroups List of admin group names (default: ['env_hopper_ui_super_admins'])
1042
1249
  */
1043
- declare function isAdmin(user: UserWithGroups | null | undefined): boolean;
1250
+ declare function isAdmin(user: UserWithGroups | null | undefined, adminGroups?: Array<string>): boolean;
1044
1251
  /**
1045
1252
  * Require admin permissions - throws error if not admin
1253
+ * @param user User object with groups
1254
+ * @param adminGroups List of admin group names (default: ['env_hopper_ui_super_admins'])
1046
1255
  */
1047
- declare function requireAdmin(user: UserWithGroups | null | undefined): void;
1256
+ declare function requireAdmin(user: UserWithGroups | null | undefined, adminGroups?: Array<string>): void;
1048
1257
  /**
1049
1258
  * Require membership in specific groups - throws error if not member
1050
1259
  */
@@ -1164,6 +1373,8 @@ interface UpsertIconInput {
1164
1373
  */
1165
1374
  declare function upsertIcon(input: UpsertIconInput): Promise<{
1166
1375
  id: string;
1376
+ createdAt: Date;
1377
+ updatedAt: Date;
1167
1378
  name: string;
1168
1379
  content: _prisma_client_runtime_library0.Bytes;
1169
1380
  mimeType: string;
@@ -1172,8 +1383,6 @@ declare function upsertIcon(input: UpsertIconInput): Promise<{
1172
1383
  checksum: string;
1173
1384
  width: number | null;
1174
1385
  height: number | null;
1175
- createdAt: Date;
1176
- updatedAt: Date;
1177
1386
  }>;
1178
1387
  /**
1179
1388
  * Upsert multiple icons to the database.
@@ -1181,6 +1390,8 @@ declare function upsertIcon(input: UpsertIconInput): Promise<{
1181
1390
  */
1182
1391
  declare function upsertIcons(icons: Array<UpsertIconInput>): Promise<{
1183
1392
  id: string;
1393
+ createdAt: Date;
1394
+ updatedAt: Date;
1184
1395
  name: string;
1185
1396
  content: _prisma_client_runtime_library0.Bytes;
1186
1397
  mimeType: string;
@@ -1189,8 +1400,6 @@ declare function upsertIcons(icons: Array<UpsertIconInput>): Promise<{
1189
1400
  checksum: string;
1190
1401
  width: number | null;
1191
1402
  height: number | null;
1192
- createdAt: Date;
1193
- updatedAt: Date;
1194
1403
  }[]>;
1195
1404
  /**
1196
1405
  * Get an asset (icon or screenshot) by name from the database.
@@ -1238,9 +1447,9 @@ interface ScreenshotRestControllerConfig {
1238
1447
  declare function registerScreenshotRestController(router: Router, config: ScreenshotRestControllerConfig): void;
1239
1448
  //#endregion
1240
1449
  //#region src/modules/assets/screenshotRouter.d.ts
1241
- declare function createScreenshotRouter(t: TRPCRootObject<EhTrpcContext, {}, {}>): _trpc_server0.TRPCBuiltRouter<{
1450
+ declare function createScreenshotRouter(): _trpc_server0.TRPCBuiltRouter<{
1242
1451
  ctx: EhTrpcContext;
1243
- meta: {};
1452
+ meta: object;
1244
1453
  errorShape: _trpc_server0.TRPCDefaultErrorShape;
1245
1454
  transformer: false;
1246
1455
  }, _trpc_server0.TRPCDecorateCreateRouterOptions<{
@@ -1248,15 +1457,15 @@ declare function createScreenshotRouter(t: TRPCRootObject<EhTrpcContext, {}, {}>
1248
1457
  input: void;
1249
1458
  output: {
1250
1459
  id: string;
1460
+ createdAt: Date;
1461
+ updatedAt: Date;
1251
1462
  name: string;
1252
1463
  mimeType: string;
1253
1464
  fileSize: number;
1254
1465
  width: number | null;
1255
1466
  height: number | null;
1256
- createdAt: Date;
1257
- updatedAt: Date;
1258
1467
  }[];
1259
- meta: {};
1468
+ meta: object;
1260
1469
  }>;
1261
1470
  getOne: _trpc_server0.TRPCQueryProcedure<{
1262
1471
  input: {
@@ -1264,15 +1473,15 @@ declare function createScreenshotRouter(t: TRPCRootObject<EhTrpcContext, {}, {}>
1264
1473
  };
1265
1474
  output: {
1266
1475
  id: string;
1476
+ createdAt: Date;
1477
+ updatedAt: Date;
1267
1478
  name: string;
1268
1479
  mimeType: string;
1269
1480
  fileSize: number;
1270
1481
  width: number | null;
1271
1482
  height: number | null;
1272
- createdAt: Date;
1273
- updatedAt: Date;
1274
1483
  } | null;
1275
- meta: {};
1484
+ meta: object;
1276
1485
  }>;
1277
1486
  getByAppSlug: _trpc_server0.TRPCQueryProcedure<{
1278
1487
  input: {
@@ -1280,15 +1489,15 @@ declare function createScreenshotRouter(t: TRPCRootObject<EhTrpcContext, {}, {}>
1280
1489
  };
1281
1490
  output: {
1282
1491
  id: string;
1492
+ createdAt: Date;
1493
+ updatedAt: Date;
1283
1494
  name: string;
1284
1495
  mimeType: string;
1285
1496
  fileSize: number;
1286
1497
  width: number | null;
1287
1498
  height: number | null;
1288
- createdAt: Date;
1289
- updatedAt: Date;
1290
1499
  }[];
1291
- meta: {};
1500
+ meta: object;
1292
1501
  }>;
1293
1502
  getFirstByAppSlug: _trpc_server0.TRPCQueryProcedure<{
1294
1503
  input: {
@@ -1296,15 +1505,15 @@ declare function createScreenshotRouter(t: TRPCRootObject<EhTrpcContext, {}, {}>
1296
1505
  };
1297
1506
  output: {
1298
1507
  id: string;
1508
+ createdAt: Date;
1509
+ updatedAt: Date;
1299
1510
  name: string;
1300
1511
  mimeType: string;
1301
1512
  fileSize: number;
1302
1513
  width: number | null;
1303
1514
  height: number | null;
1304
- createdAt: Date;
1305
- updatedAt: Date;
1306
1515
  } | null;
1307
- meta: {};
1516
+ meta: object;
1308
1517
  }>;
1309
1518
  }>>;
1310
1519
  //#endregion
@@ -1335,9 +1544,9 @@ declare function syncAssets(config: SyncAssetsConfig): Promise<{
1335
1544
  }>;
1336
1545
  //#endregion
1337
1546
  //#region src/modules/appCatalogAdmin/appCatalogAdminRouter.d.ts
1338
- declare function createAppCatalogAdminRouter(t: TRPCRootObject<EhTrpcContext, {}, {}>): _trpc_server0.TRPCBuiltRouter<{
1547
+ declare function createAppCatalogAdminRouter(): _trpc_server0.TRPCBuiltRouter<{
1339
1548
  ctx: EhTrpcContext;
1340
- meta: {};
1549
+ meta: object;
1341
1550
  errorShape: _trpc_server0.TRPCDefaultErrorShape;
1342
1551
  transformer: false;
1343
1552
  }, _trpc_server0.TRPCDecorateCreateRouterOptions<{
@@ -1350,11 +1559,9 @@ declare function createAppCatalogAdminRouter(t: TRPCRootObject<EhTrpcContext, {}
1350
1559
  description: string;
1351
1560
  slug: string;
1352
1561
  displayName: string;
1353
- access: PrismaJson.AccessMethod;
1562
+ access: PrismaJson.AccessMethod | null;
1354
1563
  teams: string[];
1355
- roles: PrismaJson.AppRole | null;
1356
- approverName: string | null;
1357
- approverEmail: string | null;
1564
+ approvalDetails: PrismaJson.AppApprovalDetails | null;
1358
1565
  notes: string | null;
1359
1566
  tags: string[];
1360
1567
  appUrl: string | null;
@@ -1362,7 +1569,7 @@ declare function createAppCatalogAdminRouter(t: TRPCRootObject<EhTrpcContext, {}
1362
1569
  iconName: string | null;
1363
1570
  screenshotIds: string[];
1364
1571
  }[];
1365
- meta: {};
1572
+ meta: object;
1366
1573
  }>;
1367
1574
  getById: _trpc_server0.TRPCQueryProcedure<{
1368
1575
  input: {
@@ -1375,11 +1582,9 @@ declare function createAppCatalogAdminRouter(t: TRPCRootObject<EhTrpcContext, {}
1375
1582
  description: string;
1376
1583
  slug: string;
1377
1584
  displayName: string;
1378
- access: PrismaJson.AccessMethod;
1585
+ access: PrismaJson.AccessMethod | null;
1379
1586
  teams: string[];
1380
- roles: PrismaJson.AppRole | null;
1381
- approverName: string | null;
1382
- approverEmail: string | null;
1587
+ approvalDetails: PrismaJson.AppApprovalDetails | null;
1383
1588
  notes: string | null;
1384
1589
  tags: string[];
1385
1590
  appUrl: string | null;
@@ -1387,26 +1592,59 @@ declare function createAppCatalogAdminRouter(t: TRPCRootObject<EhTrpcContext, {}
1387
1592
  iconName: string | null;
1388
1593
  screenshotIds: string[];
1389
1594
  } | null;
1390
- meta: {};
1595
+ meta: object;
1596
+ }>;
1597
+ getBySlug: _trpc_server0.TRPCQueryProcedure<{
1598
+ input: {
1599
+ slug: string;
1600
+ };
1601
+ output: {
1602
+ id: string;
1603
+ createdAt: Date;
1604
+ updatedAt: Date;
1605
+ description: string;
1606
+ slug: string;
1607
+ displayName: string;
1608
+ access: PrismaJson.AccessMethod | null;
1609
+ teams: string[];
1610
+ approvalDetails: PrismaJson.AppApprovalDetails | null;
1611
+ notes: string | null;
1612
+ tags: string[];
1613
+ appUrl: string | null;
1614
+ links: PrismaJson.AppLink[] | null;
1615
+ iconName: string | null;
1616
+ screenshotIds: string[];
1617
+ } | null;
1618
+ meta: object;
1391
1619
  }>;
1392
1620
  create: _trpc_server0.TRPCMutationProcedure<{
1393
1621
  input: {
1394
1622
  slug: string;
1395
1623
  displayName: string;
1396
1624
  description: string;
1397
- access: {
1625
+ access?: {
1398
1626
  [x: string]: unknown;
1399
- type: "bot" | "ticketing" | "email" | "self-service" | "documentation" | "manual";
1400
- };
1627
+ type: "email" | "bot" | "ticketing" | "self-service" | "documentation" | "manual";
1628
+ } | undefined;
1401
1629
  teams?: string[] | undefined;
1402
- roles?: {
1403
- id: string;
1404
- name: string;
1405
- description?: string | undefined;
1406
- }[] | undefined;
1407
- approver?: {
1408
- name: string;
1409
- email: string;
1630
+ approvalDetails?: {
1631
+ approvalMethodId: string;
1632
+ comments?: string | undefined;
1633
+ requestPrompt?: string | undefined;
1634
+ postApprovalInstructions?: string | undefined;
1635
+ roles?: {
1636
+ name: string;
1637
+ description?: string | undefined;
1638
+ }[] | undefined;
1639
+ approvers?: {
1640
+ displayName: string;
1641
+ contact?: string | undefined;
1642
+ }[] | undefined;
1643
+ urls?: {
1644
+ url: string;
1645
+ label?: string | undefined;
1646
+ }[] | undefined;
1647
+ whoToReachOut?: string | undefined;
1410
1648
  } | undefined;
1411
1649
  notes?: string | undefined;
1412
1650
  tags?: string[] | undefined;
@@ -1425,11 +1663,9 @@ declare function createAppCatalogAdminRouter(t: TRPCRootObject<EhTrpcContext, {}
1425
1663
  description: string;
1426
1664
  slug: string;
1427
1665
  displayName: string;
1428
- access: PrismaJson.AccessMethod;
1666
+ access: PrismaJson.AccessMethod | null;
1429
1667
  teams: string[];
1430
- roles: PrismaJson.AppRole | null;
1431
- approverName: string | null;
1432
- approverEmail: string | null;
1668
+ approvalDetails: PrismaJson.AppApprovalDetails | null;
1433
1669
  notes: string | null;
1434
1670
  tags: string[];
1435
1671
  appUrl: string | null;
@@ -1437,7 +1673,7 @@ declare function createAppCatalogAdminRouter(t: TRPCRootObject<EhTrpcContext, {}
1437
1673
  iconName: string | null;
1438
1674
  screenshotIds: string[];
1439
1675
  };
1440
- meta: {};
1676
+ meta: object;
1441
1677
  }>;
1442
1678
  update: _trpc_server0.TRPCMutationProcedure<{
1443
1679
  input: {
@@ -1447,17 +1683,27 @@ declare function createAppCatalogAdminRouter(t: TRPCRootObject<EhTrpcContext, {}
1447
1683
  description?: string | undefined;
1448
1684
  access?: {
1449
1685
  [x: string]: unknown;
1450
- type: "bot" | "ticketing" | "email" | "self-service" | "documentation" | "manual";
1686
+ type: "email" | "bot" | "ticketing" | "self-service" | "documentation" | "manual";
1451
1687
  } | undefined;
1452
1688
  teams?: string[] | undefined;
1453
- roles?: {
1454
- id: string;
1455
- name: string;
1456
- description?: string | undefined;
1457
- }[] | undefined;
1458
- approver?: {
1459
- name: string;
1460
- email: string;
1689
+ approvalDetails?: {
1690
+ approvalMethodId: string;
1691
+ comments?: string | undefined;
1692
+ requestPrompt?: string | undefined;
1693
+ postApprovalInstructions?: string | undefined;
1694
+ roles?: {
1695
+ name: string;
1696
+ description?: string | undefined;
1697
+ }[] | undefined;
1698
+ approvers?: {
1699
+ displayName: string;
1700
+ contact?: string | undefined;
1701
+ }[] | undefined;
1702
+ urls?: {
1703
+ url: string;
1704
+ label?: string | undefined;
1705
+ }[] | undefined;
1706
+ whoToReachOut?: string | undefined;
1461
1707
  } | undefined;
1462
1708
  notes?: string | undefined;
1463
1709
  tags?: string[] | undefined;
@@ -1476,11 +1722,9 @@ declare function createAppCatalogAdminRouter(t: TRPCRootObject<EhTrpcContext, {}
1476
1722
  description: string;
1477
1723
  slug: string;
1478
1724
  displayName: string;
1479
- access: PrismaJson.AccessMethod;
1725
+ access: PrismaJson.AccessMethod | null;
1480
1726
  teams: string[];
1481
- roles: PrismaJson.AppRole | null;
1482
- approverName: string | null;
1483
- approverEmail: string | null;
1727
+ approvalDetails: PrismaJson.AppApprovalDetails | null;
1484
1728
  notes: string | null;
1485
1729
  tags: string[];
1486
1730
  appUrl: string | null;
@@ -1488,7 +1732,31 @@ declare function createAppCatalogAdminRouter(t: TRPCRootObject<EhTrpcContext, {}
1488
1732
  iconName: string | null;
1489
1733
  screenshotIds: string[];
1490
1734
  };
1491
- meta: {};
1735
+ meta: object;
1736
+ }>;
1737
+ updateScreenshots: _trpc_server0.TRPCMutationProcedure<{
1738
+ input: {
1739
+ id: string;
1740
+ screenshotIds: string[];
1741
+ };
1742
+ output: {
1743
+ id: string;
1744
+ createdAt: Date;
1745
+ updatedAt: Date;
1746
+ description: string;
1747
+ slug: string;
1748
+ displayName: string;
1749
+ access: PrismaJson.AccessMethod | null;
1750
+ teams: string[];
1751
+ approvalDetails: PrismaJson.AppApprovalDetails | null;
1752
+ notes: string | null;
1753
+ tags: string[];
1754
+ appUrl: string | null;
1755
+ links: PrismaJson.AppLink[] | null;
1756
+ iconName: string | null;
1757
+ screenshotIds: string[];
1758
+ };
1759
+ meta: object;
1492
1760
  }>;
1493
1761
  delete: _trpc_server0.TRPCMutationProcedure<{
1494
1762
  input: {
@@ -1501,11 +1769,9 @@ declare function createAppCatalogAdminRouter(t: TRPCRootObject<EhTrpcContext, {}
1501
1769
  description: string;
1502
1770
  slug: string;
1503
1771
  displayName: string;
1504
- access: PrismaJson.AccessMethod;
1772
+ access: PrismaJson.AccessMethod | null;
1505
1773
  teams: string[];
1506
- roles: PrismaJson.AppRole | null;
1507
- approverName: string | null;
1508
- approverEmail: string | null;
1774
+ approvalDetails: PrismaJson.AppApprovalDetails | null;
1509
1775
  notes: string | null;
1510
1776
  tags: string[];
1511
1777
  appUrl: string | null;
@@ -1513,16 +1779,105 @@ declare function createAppCatalogAdminRouter(t: TRPCRootObject<EhTrpcContext, {}
1513
1779
  iconName: string | null;
1514
1780
  screenshotIds: string[];
1515
1781
  };
1516
- meta: {};
1782
+ meta: object;
1783
+ }>;
1784
+ }>>;
1785
+ //#endregion
1786
+ //#region src/modules/approvalMethod/approvalMethodRouter.d.ts
1787
+ declare function createApprovalMethodRouter(): _trpc_server0.TRPCBuiltRouter<{
1788
+ ctx: EhTrpcContext;
1789
+ meta: object;
1790
+ errorShape: _trpc_server0.TRPCDefaultErrorShape;
1791
+ transformer: false;
1792
+ }, _trpc_server0.TRPCDecorateCreateRouterOptions<{
1793
+ list: _trpc_server0.TRPCQueryProcedure<{
1794
+ input: void;
1795
+ output: ApprovalMethod[];
1796
+ meta: object;
1797
+ }>;
1798
+ getById: _trpc_server0.TRPCQueryProcedure<{
1799
+ input: {
1800
+ id: string;
1801
+ };
1802
+ output: ApprovalMethod | null;
1803
+ meta: object;
1804
+ }>;
1805
+ create: _trpc_server0.TRPCMutationProcedure<{
1806
+ input: {
1807
+ type: "custom" | "service" | "personTeam";
1808
+ displayName: string;
1809
+ config?: Record<string, never> | {
1810
+ url?: string | undefined;
1811
+ icon?: string | undefined;
1812
+ } | {
1813
+ reachOutContacts?: {
1814
+ displayName: string;
1815
+ contact: string;
1816
+ }[] | undefined;
1817
+ } | undefined;
1818
+ };
1819
+ output: ApprovalMethod;
1820
+ meta: object;
1821
+ }>;
1822
+ update: _trpc_server0.TRPCMutationProcedure<{
1823
+ input: {
1824
+ id: string;
1825
+ type?: "custom" | "service" | "personTeam" | undefined;
1826
+ displayName?: string | undefined;
1827
+ config?: Record<string, never> | {
1828
+ url?: string | undefined;
1829
+ icon?: string | undefined;
1830
+ } | {
1831
+ reachOutContacts?: {
1832
+ displayName: string;
1833
+ contact: string;
1834
+ }[] | undefined;
1835
+ } | undefined;
1836
+ };
1837
+ output: ApprovalMethod;
1838
+ meta: object;
1839
+ }>;
1840
+ delete: _trpc_server0.TRPCMutationProcedure<{
1841
+ input: {
1842
+ id: string;
1843
+ };
1844
+ output: ApprovalMethod;
1845
+ meta: object;
1846
+ }>;
1847
+ listByType: _trpc_server0.TRPCQueryProcedure<{
1848
+ input: {
1849
+ type: "custom" | "service" | "personTeam";
1850
+ };
1851
+ output: ApprovalMethod[];
1852
+ meta: object;
1517
1853
  }>;
1518
1854
  }>>;
1519
1855
  //#endregion
1856
+ //#region src/modules/approvalMethod/syncApprovalMethods.d.ts
1857
+ interface ApprovalMethodSyncInput {
1858
+ type: 'service' | 'personTeam' | 'custom';
1859
+ displayName: string;
1860
+ config?: Record<string, unknown>;
1861
+ }
1862
+ /**
1863
+ * Syncs approval methods to the database using upsert logic based on type + displayName.
1864
+ *
1865
+ * @param prisma - The PrismaClient instance from the backend-core database
1866
+ * @param methods - Array of approval methods to sync
1867
+ */
1868
+ declare function syncApprovalMethods(prisma: PrismaClient, methods: Array<ApprovalMethodSyncInput>): Promise<void>;
1869
+ //#endregion
1520
1870
  //#region src/db/client.d.ts
1521
1871
  /**
1522
1872
  * Gets the internal Prisma client instance.
1523
1873
  * Creates one if it doesn't exist.
1524
1874
  */
1525
1875
  declare function getDbClient(): PrismaClient;
1876
+ /**
1877
+ * Sets the internal Prisma client instance.
1878
+ * Used by middleware to bridge with existing getDbClient() usage.
1879
+ */
1880
+ declare function setDbClient(client: PrismaClient): void;
1526
1881
  /**
1527
1882
  * Connects to the database.
1528
1883
  * Call this before performing database operations.
@@ -1580,5 +1935,205 @@ interface SyncAppCatalogResult {
1580
1935
  */
1581
1936
  declare function syncAppCatalog(apps: Array<AppForCatalog>): Promise<SyncAppCatalogResult>;
1582
1937
  //#endregion
1583
- export { AccessMethod, type AdminChatHandlerOptions, AppCatalogData, AppCategory, type AppForCatalog, AppRole, Approver, type AssetRestControllerConfig, type AuthConfig, type AuthRouter, AvailabilityMatrixData, AvailabilityVariant, type BetterAuth, BootstrapConfigData, BotAccess, BotProvider, DEFAULT_ADMIN_SYSTEM_PROMPT, type DatabaseClient, DisplayNamable, DocumentationAccess, EhAppCatalogData, EhAppCatalogDto, EhAppCatalogGroupDto, EhAppCatalogPageDto, EhAppIndexed, EhAppPageIndexed, EhAppUiIndexed, EhAppsMeta, EhBackendAppDto, EhBackendAppInput, EhBackendAppUIBaseInput, EhBackendAppUIInput, EhBackendCompanySpecificBackend, EhBackendCredentialInput, EhBackendDataFreshness, EhBackendDataSourceInput, EhBackendDataSourceInputCommon, EhBackendDataSourceInputDb, EhBackendDataSourceInputKafka, EhBackendDataVersion, EhBackendDeployableInput, EhBackendDeployment, EhBackendDeploymentInput, EhBackendEnvironmentInput, EhBackendPageInput, EhBackendTagDescriptionDataIndexed, EhBackendTagFixedTagValue, EhBackendTagsDescriptionDataIndexed, EhBackendUiDefaultsInput, EhBackendVersionsRequestParams, EhBackendVersionsReturn, EhContextIndexed, EhEnvIndexed, EhMetaDictionary, EhResourceIndexed, type EhStaticControllerContract, type EhTrpcContext, type EhTrpcContextOptions, EmailAccess, EnvBaseInfo, EnvInfoExtended, EnvSlug, type IconRestControllerConfig, JumpResourceSlug, LateResolvableParam, type MakeTFromPrismaModel, ManualAccess, type ObjectKeys, RenameRule, RenameRuleParams, ResourceJump, ResourceJumpGroup, ResourceJumpMetaInfo, ResourceJumpsData, ResourceJumpsExtendedData, type ScalarFilter, type ScalarKeys, type ScreenshotRestControllerConfig, SelfServiceAccess, SlugAndDisplayable, Sluggable, type SyncAppCatalogResult, type SyncAssetsConfig, TABLE_SYNC_MAGAZINE, type TRPCRouter, type TableSyncMagazine, type TableSyncMagazineModelNameKey, type TableSyncParamsPrisma, Tag, TicketingAccess, TicketingProvider, type UpsertIconInput, User, type UserWithGroups, connectDb, createAdminChatHandler, createAppCatalogAdminRouter, createAuth, createAuthRouter, createDatabaseTools, createEhTrpcContext, createPrismaDatabaseClient, createScreenshotRouter, createTrpcRouter, disconnectDb, getAdminGroupsFromEnv, getAssetByName, getAuthPluginsFromEnv, getAuthProvidersFromEnv, getDbClient, getUserGroups, isAdmin, isMemberOfAllGroups, isMemberOfAnyGroup, registerAssetRestController, registerAuthRoutes, registerIconRestController, registerScreenshotRestController, requireAdmin, requireGroups, staticControllerContract, syncAppCatalog, syncAssets, tableSyncPrisma, tool, upsertIcon, upsertIcons, validateAuthConfig };
1938
+ //#region src/middleware/types.d.ts
1939
+ /**
1940
+ * Database connection configuration.
1941
+ * Supports both connection URL and structured config.
1942
+ */
1943
+ type EhDatabaseConfig = {
1944
+ url: string;
1945
+ } | {
1946
+ host: string;
1947
+ port: number;
1948
+ database: string;
1949
+ username: string;
1950
+ password: string;
1951
+ schema?: string;
1952
+ };
1953
+ /**
1954
+ * Mock user configuration for development/testing.
1955
+ * When provided, bypasses authentication and injects this user into all requests.
1956
+ */
1957
+ interface EhDevMockUser {
1958
+ /** User ID */
1959
+ id: string;
1960
+ /** User email */
1961
+ email: string;
1962
+ /** User display name */
1963
+ name: string;
1964
+ /** User groups (for authorization) */
1965
+ groups: Array<string>;
1966
+ }
1967
+ /**
1968
+ * Auth configuration for Better Auth integration.
1969
+ */
1970
+ interface EhAuthConfig {
1971
+ /** Base URL for auth callbacks (e.g., 'http://localhost:4000') */
1972
+ baseURL: string;
1973
+ /** Secret for signing sessions (min 32 chars in production) */
1974
+ secret: string;
1975
+ /** OAuth providers configuration */
1976
+ providers?: BetterAuthOptions['socialProviders'];
1977
+ /** Additional Better Auth plugins (e.g., Okta) */
1978
+ plugins?: Array<BetterAuthPlugin>;
1979
+ /** Session expiration in seconds (default: 30 days) */
1980
+ sessionExpiresIn?: number;
1981
+ /** Session refresh threshold in seconds (default: 1 day) */
1982
+ sessionUpdateAge?: number;
1983
+ /** Application name shown in auth UI */
1984
+ appName?: string;
1985
+ /** Development mock user - bypasses auth when provided */
1986
+ devMockUser?: EhDevMockUser;
1987
+ /** Admin group names for authorization (default: ['env_hopper_ui_super_admins']) */
1988
+ adminGroups?: Array<string>;
1989
+ }
1990
+ /**
1991
+ * Admin chat (AI) configuration.
1992
+ * When provided, enables the admin/chat endpoint.
1993
+ */
1994
+ interface EhAdminChatConfig {
1995
+ /** AI model instance from @ai-sdk/* packages */
1996
+ model: LanguageModel;
1997
+ /** System prompt for the AI assistant */
1998
+ systemPrompt?: string;
1999
+ /** Custom tools available to the AI */
2000
+ tools?: Record<string, Tool>;
2001
+ /** Validation function called before each request */
2002
+ validateConfig?: () => void;
2003
+ }
2004
+ /**
2005
+ * Feature toggles for enabling/disabling specific functionality.
2006
+ *
2007
+ * Note: Icons, assets, screenshots, and catalog backup are always enabled.
2008
+ * Only these optional features can be toggled:
2009
+ */
2010
+ interface EhFeatureToggles {
2011
+ /** Enable tRPC endpoints (default: true) */
2012
+ trpc?: boolean;
2013
+ /** Enable auth endpoints (default: true) */
2014
+ auth?: boolean;
2015
+ /** Enable admin chat endpoint (default: true if adminChat config provided) */
2016
+ adminChat?: boolean;
2017
+ /** Enable legacy icon endpoint at /static/icon/:icon (default: false) */
2018
+ legacyIconEndpoint?: boolean;
2019
+ }
2020
+ /**
2021
+ * Company-specific backend can be provided as:
2022
+ * 1. Direct object implementing the interface
2023
+ * 2. Factory function called per-request (for DI integration)
2024
+ * 3. Async factory function
2025
+ */
2026
+ type EhBackendProvider = EhBackendCompanySpecificBackend | (() => EhBackendCompanySpecificBackend) | (() => Promise<EhBackendCompanySpecificBackend>);
2027
+ /**
2028
+ * Lifecycle hooks for database and middleware events.
2029
+ */
2030
+ interface EhLifecycleHooks {
2031
+ /** Called after database connection is established */
2032
+ onDatabaseConnected?: () => void | Promise<void>;
2033
+ /** Called before database disconnection (for cleanup) */
2034
+ onDatabaseDisconnecting?: () => void | Promise<void>;
2035
+ /** Called after all routes are registered - use to add custom routes */
2036
+ onRoutesRegistered?: (router: Router) => void | Promise<void>;
2037
+ /** Custom error handler for middleware errors */
2038
+ onError?: (error: Error, context: {
2039
+ path: string;
2040
+ }) => void;
2041
+ }
2042
+ /**
2043
+ * Main configuration options for the env-hopper middleware.
2044
+ */
2045
+ interface EhMiddlewareOptions {
2046
+ /**
2047
+ * Base path prefix for all routes (default: '/api')
2048
+ * - tRPC: {basePath}/trpc
2049
+ * - Auth: {basePath}/auth (note: auth basePath is hardcoded, this affects where router mounts)
2050
+ * - Icons: {basePath}/icons
2051
+ * - Assets: {basePath}/assets
2052
+ * - Screenshots: {basePath}/screenshots
2053
+ * - Admin Chat: {basePath}/admin/chat
2054
+ */
2055
+ basePath?: string;
2056
+ /**
2057
+ * Database connection configuration (required).
2058
+ * Backend-core manages the database for all features.
2059
+ */
2060
+ database: EhDatabaseConfig;
2061
+ /** Auth configuration (required) */
2062
+ auth: EhAuthConfig;
2063
+ /** Company-specific backend implementation (required) */
2064
+ backend: EhBackendProvider;
2065
+ /** AI admin chat configuration (optional) */
2066
+ adminChat?: EhAdminChatConfig;
2067
+ /** Feature toggles (all enabled by default) */
2068
+ features?: EhFeatureToggles;
2069
+ /** Lifecycle hooks */
2070
+ hooks?: EhLifecycleHooks;
2071
+ }
2072
+ /**
2073
+ * Result of middleware initialization.
2074
+ *
2075
+ * @example
2076
+ * ```typescript
2077
+ * const eh = await createEhMiddleware({ ... })
2078
+ *
2079
+ * // Mount routes
2080
+ * app.use(eh.router)
2081
+ *
2082
+ * // Connect to database
2083
+ * await eh.connect()
2084
+ *
2085
+ * // Cleanup on shutdown
2086
+ * process.on('SIGTERM', async () => {
2087
+ * await eh.disconnect()
2088
+ * })
2089
+ * ```
2090
+ */
2091
+ interface EhMiddlewareResult {
2092
+ /** Express router with all env-hopper routes */
2093
+ router: Router;
2094
+ /** Better Auth instance (for extending auth functionality) */
2095
+ auth: BetterAuth;
2096
+ /** tRPC router (for extending with custom procedures) */
2097
+ trpcRouter: TRPCRouter;
2098
+ /** Connect to database (call during app startup) */
2099
+ connect: () => Promise<void>;
2100
+ /** Disconnect from database (call during app shutdown) */
2101
+ disconnect: () => Promise<void>;
2102
+ /** Add custom routes to the middleware router */
2103
+ addRoutes: (callback: (router: Router) => void) => void;
2104
+ }
2105
+ /**
2106
+ * Internal context passed to feature registration functions.
2107
+ */
2108
+ interface MiddlewareContext {
2109
+ auth: BetterAuth;
2110
+ trpcRouter: TRPCRouter;
2111
+ createContext: () => Promise<{
2112
+ companySpecificBackend: EhBackendCompanySpecificBackend;
2113
+ }>;
2114
+ authConfig: EhAuthConfig;
2115
+ }
2116
+ //#endregion
2117
+ //#region src/middleware/createEhMiddleware.d.ts
2118
+ declare function createEhMiddleware(options: EhMiddlewareOptions): Promise<EhMiddlewareResult>;
2119
+ //#endregion
2120
+ //#region src/middleware/database.d.ts
2121
+ /**
2122
+ * Internal database manager used by the middleware.
2123
+ * Handles connection URL formatting and lifecycle.
2124
+ */
2125
+ declare class EhDatabaseManager {
2126
+ private client;
2127
+ private config;
2128
+ constructor(config: EhDatabaseConfig);
2129
+ /**
2130
+ * Get or create the Prisma client instance.
2131
+ * Uses lazy initialization for flexibility.
2132
+ */
2133
+ getClient(): PrismaClient;
2134
+ connect(): Promise<void>;
2135
+ disconnect(): Promise<void>;
2136
+ }
2137
+ //#endregion
2138
+ export { AccessMethod, type AdminChatHandlerOptions, AppApprovalDetails, AppCatalogData, AppCategory, type AppForCatalog, AppRole, ApprovalMethod, ApprovalMethodConfig, type ApprovalMethodSyncInput, ApprovalMethodType, ApprovalUrl, Approver, ApproverContact, type AssetRestControllerConfig, type AuthConfig, type AuthRouter, AvailabilityMatrixData, AvailabilityVariant, BaseApprover, type BetterAuth, BootstrapConfigData, BotAccess, BotApprover, CreateApprovalMethodInput, CustomConfig, DEFAULT_ADMIN_SYSTEM_PROMPT, type DatabaseClient, DisplayNamable, DocumentationAccess, type EhAdminChatConfig, EhAppCatalogData, EhAppCatalogDto, EhAppCatalogGroupDto, EhAppCatalogPageDto, EhAppIndexed, EhAppPageIndexed, EhAppUiIndexed, EhAppsMeta, type EhAuthConfig, EhBackendAppDto, EhBackendAppInput, EhBackendAppUIBaseInput, EhBackendAppUIInput, EhBackendCompanySpecificBackend, EhBackendCredentialInput, EhBackendDataFreshness, EhBackendDataSourceInput, EhBackendDataSourceInputCommon, EhBackendDataSourceInputDb, EhBackendDataSourceInputKafka, EhBackendDataVersion, EhBackendDeployableInput, EhBackendDeployment, EhBackendDeploymentInput, EhBackendEnvironmentInput, EhBackendPageInput, type EhBackendProvider, EhBackendTagDescriptionDataIndexed, EhBackendTagFixedTagValue, EhBackendTagsDescriptionDataIndexed, EhBackendUiDefaultsInput, EhBackendVersionsRequestParams, EhBackendVersionsReturn, EhContextIndexed, type EhDatabaseConfig, EhDatabaseManager, EhEnvIndexed, type EhFeatureToggles, type EhLifecycleHooks, EhMetaDictionary, type EhMiddlewareOptions, type EhMiddlewareResult, EhResourceIndexed, type EhStaticControllerContract, type EhTrpcContext, type EhTrpcContextOptions, EmailAccess, EnvBaseInfo, EnvInfoExtended, EnvSlug, type IconRestControllerConfig, JumpResourceSlug, LateResolvableParam, type MakeTFromPrismaModel, ManualAccess, type MiddlewareContext, type ObjectKeys, PersonApprover, PersonTeamConfig, ReachOutContact, RenameRule, RenameRuleParams, ResourceJump, ResourceJumpGroup, ResourceJumpMetaInfo, ResourceJumpsData, ResourceJumpsExtendedData, type ScalarFilter, type ScalarKeys, type ScreenshotRestControllerConfig, SelfServiceAccess, ServiceConfig, SlugAndDisplayable, Sluggable, type SyncAppCatalogResult, type SyncAssetsConfig, TABLE_SYNC_MAGAZINE, type TRPCRouter, type TableSyncMagazine, type TableSyncMagazineModelNameKey, type TableSyncParamsPrisma, Tag, TicketApprover, TicketingAccess, UpdateApprovalMethodInput, type UpsertIconInput, User, type UserWithGroups, connectDb, createAdminChatHandler, createAppCatalogAdminRouter, createApprovalMethodRouter, createAuth, createAuthRouter, createDatabaseTools, createEhMiddleware, createEhTrpcContext, createPrismaDatabaseClient, createScreenshotRouter, createTrpcRouter, disconnectDb, getAssetByName, getDbClient, getUserGroups, isAdmin, isMemberOfAllGroups, isMemberOfAnyGroup, registerAssetRestController, registerAuthRoutes, registerIconRestController, registerScreenshotRestController, requireAdmin, requireGroups, setDbClient, staticControllerContract, syncAppCatalog, syncApprovalMethods, syncAssets, tableSyncPrisma, tool, upsertIcon, upsertIcons };
1584
2139
  //# sourceMappingURL=index.d.ts.map