@igstack/app-catalog-backend-core 0.2.0 → 0.3.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.
package/dist/index.d.ts CHANGED
@@ -3,9 +3,9 @@ import * as _trpc_server0 from "@trpc/server";
3
3
  import { TRPCRootObject } from "@trpc/server";
4
4
  import * as better_auth0 from "better-auth";
5
5
  import { BetterAuthOptions, BetterAuthPlugin } from "better-auth";
6
- import { LanguageModel, Tool, tool } from "ai";
7
- import { Express, Request, Response, Router } from "express";
6
+ import { Express, Router } from "express";
8
7
  import { User } from "better-auth/types";
8
+ import { LanguageModel, Tool } from "ai";
9
9
 
10
10
  //#region src/types/common/sharedTypes.d.ts
11
11
  interface EhMetaDictionary {
@@ -361,6 +361,232 @@ declare function createEhTrpcContext({
361
361
  adminGroups
362
362
  }: EhTrpcContextOptions): EhTrpcContext;
363
363
  //#endregion
364
+ //#region src/modules/auth/auth.d.ts
365
+ interface AuthConfig {
366
+ appName?: string;
367
+ baseURL: string;
368
+ secret: string;
369
+ providers?: BetterAuthOptions['socialProviders'];
370
+ plugins?: Array<BetterAuthPlugin>;
371
+ /** Session expiration in seconds. Default: 7 days (604800) */
372
+ sessionExpiresIn?: number;
373
+ /** Session update age in seconds. Default: 1 day (86400) */
374
+ sessionUpdateAge?: number;
375
+ }
376
+ declare function createAuth(config: AuthConfig): better_auth0.Auth<{
377
+ appName: string;
378
+ baseURL: string;
379
+ basePath: string;
380
+ secret: string;
381
+ database: (options: BetterAuthOptions) => better_auth0.DBAdapter<BetterAuthOptions>;
382
+ socialProviders: better_auth0.SocialProviders;
383
+ plugins: BetterAuthPlugin[];
384
+ emailAndPassword: {
385
+ enabled: true;
386
+ };
387
+ session: {
388
+ expiresIn: number;
389
+ updateAge: number;
390
+ cookieCache: {
391
+ enabled: true;
392
+ maxAge: number;
393
+ };
394
+ };
395
+ advanced: {
396
+ useSecureCookies: boolean;
397
+ };
398
+ }>;
399
+ type BetterAuth = ReturnType<typeof createAuth>;
400
+ //#endregion
401
+ //#region src/server/controller.d.ts
402
+ /**
403
+ * Create the main tRPC router with optional auth instance
404
+ * @param auth - Optional Better Auth instance for auth-related queries
405
+ */
406
+ declare function createTrpcRouter(auth?: BetterAuth): _trpc_server0.TRPCBuiltRouter<{
407
+ ctx: EhTrpcContext;
408
+ meta: object;
409
+ errorShape: _trpc_server0.TRPCDefaultErrorShape;
410
+ transformer: false;
411
+ }, _trpc_server0.TRPCDecorateCreateRouterOptions<{
412
+ authConfig: _trpc_server0.TRPCQueryProcedure<{
413
+ input: void;
414
+ output: {
415
+ adminGroups: string[];
416
+ };
417
+ meta: object;
418
+ }>;
419
+ appCatalog: _trpc_server0.TRPCQueryProcedure<{
420
+ input: void;
421
+ output: AppCatalogData;
422
+ meta: object;
423
+ }>;
424
+ auth: _trpc_server0.TRPCBuiltRouter<{
425
+ ctx: EhTrpcContext;
426
+ meta: {};
427
+ errorShape: _trpc_server0.TRPCDefaultErrorShape;
428
+ transformer: false;
429
+ }, _trpc_server0.TRPCDecorateCreateRouterOptions<{
430
+ getSession: _trpc_server0.TRPCQueryProcedure<{
431
+ input: void;
432
+ output: {
433
+ user: {
434
+ id: string;
435
+ createdAt: Date;
436
+ updatedAt: Date;
437
+ email: string;
438
+ emailVerified: boolean;
439
+ name: string;
440
+ image?: string | null | undefined;
441
+ } | null;
442
+ isAuthenticated: boolean;
443
+ };
444
+ meta: {};
445
+ }>;
446
+ getProviders: _trpc_server0.TRPCQueryProcedure<{
447
+ input: void;
448
+ output: {
449
+ providers: string[];
450
+ };
451
+ meta: {};
452
+ }>;
453
+ }>>;
454
+ }>>;
455
+ type TRPCRouter = ReturnType<typeof createTrpcRouter>;
456
+ //#endregion
457
+ //#region src/server/ehStaticControllerContract.d.ts
458
+ interface EhStaticControllerContract {
459
+ methods: {
460
+ getIcon: {
461
+ method: string;
462
+ url: string;
463
+ };
464
+ getScreenshot: {
465
+ method: string;
466
+ url: string;
467
+ };
468
+ };
469
+ }
470
+ declare const staticControllerContract: EhStaticControllerContract;
471
+ //#endregion
472
+ //#region src/modules/auth/registerAuthRoutes.d.ts
473
+ /**
474
+ * Register Better Auth routes with Express
475
+ * @param app - Express application instance
476
+ * @param auth - Better Auth instance
477
+ */
478
+ declare function registerAuthRoutes(app: Express, auth: BetterAuth): void;
479
+ //#endregion
480
+ //#region src/modules/auth/authRouter.d.ts
481
+ /**
482
+ * Create auth tRPC procedures
483
+ * @param t - tRPC instance
484
+ * @param auth - Better Auth instance (optional, for future extensions)
485
+ * @returns tRPC router with auth procedures
486
+ */
487
+ declare function createAuthRouter(t: TRPCRootObject<EhTrpcContext, {}, {}>, auth?: BetterAuth): _trpc_server0.TRPCBuiltRouter<{
488
+ ctx: EhTrpcContext;
489
+ meta: {};
490
+ errorShape: _trpc_server0.TRPCDefaultErrorShape;
491
+ transformer: false;
492
+ }, _trpc_server0.TRPCDecorateCreateRouterOptions<{
493
+ getSession: _trpc_server0.TRPCQueryProcedure<{
494
+ input: void;
495
+ output: {
496
+ user: {
497
+ id: string;
498
+ createdAt: Date;
499
+ updatedAt: Date;
500
+ email: string;
501
+ emailVerified: boolean;
502
+ name: string;
503
+ image?: string | null | undefined;
504
+ } | null;
505
+ isAuthenticated: boolean;
506
+ };
507
+ meta: {};
508
+ }>;
509
+ getProviders: _trpc_server0.TRPCQueryProcedure<{
510
+ input: void;
511
+ output: {
512
+ providers: string[];
513
+ };
514
+ meta: {};
515
+ }>;
516
+ }>>;
517
+ type AuthRouter = ReturnType<typeof createAuthRouter>;
518
+ //#endregion
519
+ //#region src/modules/auth/authorizationUtils.d.ts
520
+ /**
521
+ * Authorization utilities for checking user permissions based on groups
522
+ *
523
+ * Groups are automatically included in the user session when:
524
+ * 1. Okta auth server has a "groups" claim configured
525
+ * 2. The auth policy rule includes "groups" in scope_whitelist
526
+ *
527
+ * Example usage in tRPC procedures:
528
+ * ```typescript
529
+ * myProcedure: protectedProcedure.query(async ({ ctx }) => {
530
+ * if (requireAdmin(ctx.user)) {
531
+ * // Admin-only logic
532
+ * }
533
+ * // Regular user logic
534
+ * })
535
+ * ```
536
+ */
537
+ interface UserWithGroups {
538
+ id: string;
539
+ email: string;
540
+ name?: string;
541
+ [key: string]: any;
542
+ }
543
+ /**
544
+ * Extract groups from user object
545
+ * Groups can be stored in different locations depending on the OAuth provider
546
+ */
547
+ declare function getUserGroups(user: UserWithGroups | null | undefined): Array<string>;
548
+ /**
549
+ * Check if user is a member of any of the specified groups
550
+ */
551
+ declare function isMemberOfAnyGroup(user: UserWithGroups | null | undefined, allowedGroups: Array<string>): boolean;
552
+ /**
553
+ * Check if user is a member of all specified groups
554
+ */
555
+ declare function isMemberOfAllGroups(user: UserWithGroups | null | undefined, requiredGroups: Array<string>): boolean;
556
+ /**
557
+ * Check if user has admin permissions
558
+ * @param user User object with groups
559
+ * @param adminGroups List of admin group names (default: ['env_hopper_ui_super_admins'])
560
+ */
561
+ declare function isAdmin(user: UserWithGroups | null | undefined, adminGroups?: Array<string>): boolean;
562
+ /**
563
+ * Require admin permissions - throws error if not admin
564
+ * @param user User object with groups
565
+ * @param adminGroups List of admin group names (default: ['env_hopper_ui_super_admins'])
566
+ */
567
+ declare function requireAdmin(user: UserWithGroups | null | undefined, adminGroups?: Array<string>): void;
568
+ /**
569
+ * Require membership in specific groups - throws error if not member
570
+ */
571
+ declare function requireGroups(user: UserWithGroups | null | undefined, groups: Array<string>): void;
572
+ //#endregion
573
+ //#region src/modules/icons/iconRestController.d.ts
574
+ interface IconRestControllerConfig {
575
+ /**
576
+ * Base path for icon endpoints (e.g., '/api/icons')
577
+ */
578
+ basePath: string;
579
+ }
580
+ /**
581
+ * Registers REST endpoints for icon upload and retrieval
582
+ *
583
+ * Endpoints:
584
+ * - POST {basePath}/upload - Upload a new icon (multipart/form-data with 'icon' field and 'name' field)
585
+ * - GET {basePath}/:id - Get icon binary by ID
586
+ * - GET {basePath}/:id/metadata - Get icon metadata only
587
+ */
588
+ declare function registerIconRestController(router: Router, config: IconRestControllerConfig): void;
589
+ //#endregion
364
590
  //#region src/generated/prisma/models/user.d.ts
365
591
  type AggregateUser = {
366
592
  _count: UserCountAggregateOutputType | null;
@@ -11624,825 +11850,12 @@ interface PrismaClient$1<in LogOpts extends LogLevel = never, in out OmitOpts ex
11624
11850
  declare const PrismaClient: PrismaClientConstructor;
11625
11851
  type PrismaClient<LogOpts extends LogLevel = never, OmitOpts extends PrismaClientOptions["omit"] = PrismaClientOptions["omit"], ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = PrismaClient$1<LogOpts, OmitOpts, ExtArgs>;
11626
11852
  //#endregion
11627
- //#region src/modules/auth/auth.d.ts
11628
- interface AuthConfig {
11629
- appName?: string;
11630
- baseURL: string;
11631
- secret: string;
11632
- providers?: BetterAuthOptions['socialProviders'];
11633
- plugins?: Array<BetterAuthPlugin>;
11634
- /** Session expiration in seconds. Default: 7 days (604800) */
11635
- sessionExpiresIn?: number;
11636
- /** Session update age in seconds. Default: 1 day (86400) */
11637
- sessionUpdateAge?: number;
11638
- }
11639
- declare function createAuth(config: AuthConfig): better_auth0.Auth<{
11640
- appName: string;
11641
- baseURL: string;
11642
- basePath: string;
11643
- secret: string;
11644
- database: (options: BetterAuthOptions) => better_auth0.DBAdapter<BetterAuthOptions>;
11645
- socialProviders: better_auth0.SocialProviders;
11646
- plugins: BetterAuthPlugin[];
11647
- emailAndPassword: {
11648
- enabled: true;
11649
- };
11650
- session: {
11651
- expiresIn: number;
11652
- updateAge: number;
11653
- cookieCache: {
11654
- enabled: true;
11655
- maxAge: number;
11656
- };
11657
- };
11658
- advanced: {
11659
- useSecureCookies: boolean;
11660
- };
11661
- }>;
11662
- type BetterAuth = ReturnType<typeof createAuth>;
11663
- //#endregion
11664
- //#region src/server/controller.d.ts
11665
- /**
11666
- * Create the main tRPC router with optional auth instance
11667
- * @param auth - Optional Better Auth instance for auth-related queries
11668
- */
11669
- declare function createTrpcRouter(auth?: BetterAuth): _trpc_server0.TRPCBuiltRouter<{
11670
- ctx: EhTrpcContext;
11671
- meta: object;
11672
- errorShape: _trpc_server0.TRPCDefaultErrorShape;
11673
- transformer: false;
11674
- }, _trpc_server0.TRPCDecorateCreateRouterOptions<{
11675
- authConfig: _trpc_server0.TRPCQueryProcedure<{
11676
- input: void;
11677
- output: {
11678
- adminGroups: string[];
11679
- };
11680
- meta: object;
11681
- }>;
11682
- appCatalog: _trpc_server0.TRPCQueryProcedure<{
11683
- input: void;
11684
- output: AppCatalogData;
11685
- meta: object;
11686
- }>;
11687
- icon: _trpc_server0.TRPCBuiltRouter<{
11688
- ctx: EhTrpcContext;
11689
- meta: object;
11690
- errorShape: _trpc_server0.TRPCDefaultErrorShape;
11691
- transformer: false;
11692
- }, _trpc_server0.TRPCDecorateCreateRouterOptions<{
11693
- list: _trpc_server0.TRPCQueryProcedure<{
11694
- input: void;
11695
- output: {
11696
- id: string;
11697
- createdAt: Date;
11698
- updatedAt: Date;
11699
- name: string;
11700
- mimeType: string;
11701
- fileSize: number;
11702
- }[];
11703
- meta: object;
11704
- }>;
11705
- getOne: _trpc_server0.TRPCQueryProcedure<{
11706
- input: {
11707
- id: string;
11708
- };
11709
- output: {
11710
- id: string;
11711
- createdAt: Date;
11712
- updatedAt: Date;
11713
- name: string;
11714
- mimeType: string;
11715
- fileSize: number;
11716
- } | null;
11717
- meta: object;
11718
- }>;
11719
- create: _trpc_server0.TRPCMutationProcedure<{
11720
- input: {
11721
- name: string;
11722
- content: string;
11723
- mimeType: string;
11724
- fileSize: number;
11725
- };
11726
- output: {
11727
- id: string;
11728
- createdAt: Date;
11729
- updatedAt: Date;
11730
- name: string;
11731
- content: runtime.Bytes;
11732
- mimeType: string;
11733
- fileSize: number;
11734
- assetType: AssetType;
11735
- checksum: string;
11736
- width: number | null;
11737
- height: number | null;
11738
- };
11739
- meta: object;
11740
- }>;
11741
- update: _trpc_server0.TRPCMutationProcedure<{
11742
- input: {
11743
- id: string;
11744
- name?: string | undefined;
11745
- content?: string | undefined;
11746
- mimeType?: string | undefined;
11747
- fileSize?: number | undefined;
11748
- };
11749
- output: {
11750
- id: string;
11751
- createdAt: Date;
11752
- updatedAt: Date;
11753
- name: string;
11754
- content: runtime.Bytes;
11755
- mimeType: string;
11756
- fileSize: number;
11757
- assetType: AssetType;
11758
- checksum: string;
11759
- width: number | null;
11760
- height: number | null;
11761
- };
11762
- meta: object;
11763
- }>;
11764
- delete: _trpc_server0.TRPCMutationProcedure<{
11765
- input: {
11766
- id: string;
11767
- };
11768
- output: {
11769
- id: string;
11770
- createdAt: Date;
11771
- updatedAt: Date;
11772
- name: string;
11773
- content: runtime.Bytes;
11774
- mimeType: string;
11775
- fileSize: number;
11776
- assetType: AssetType;
11777
- checksum: string;
11778
- width: number | null;
11779
- height: number | null;
11780
- };
11781
- meta: object;
11782
- }>;
11783
- deleteMany: _trpc_server0.TRPCMutationProcedure<{
11784
- input: {
11785
- ids: string[];
11786
- };
11787
- output: BatchPayload;
11788
- meta: object;
11789
- }>;
11790
- getContent: _trpc_server0.TRPCQueryProcedure<{
11791
- input: {
11792
- id: string;
11793
- };
11794
- output: {
11795
- content: string;
11796
- mimeType: string;
11797
- name: string;
11798
- };
11799
- meta: object;
11800
- }>;
11801
- }>>;
11802
- screenshot: _trpc_server0.TRPCBuiltRouter<{
11803
- ctx: EhTrpcContext;
11804
- meta: object;
11805
- errorShape: _trpc_server0.TRPCDefaultErrorShape;
11806
- transformer: false;
11807
- }, _trpc_server0.TRPCDecorateCreateRouterOptions<{
11808
- list: _trpc_server0.TRPCQueryProcedure<{
11809
- input: void;
11810
- output: {
11811
- id: string;
11812
- createdAt: Date;
11813
- updatedAt: Date;
11814
- name: string;
11815
- mimeType: string;
11816
- fileSize: number;
11817
- width: number | null;
11818
- height: number | null;
11819
- }[];
11820
- meta: object;
11821
- }>;
11822
- getOne: _trpc_server0.TRPCQueryProcedure<{
11823
- input: {
11824
- id: string;
11825
- };
11826
- output: {
11827
- id: string;
11828
- createdAt: Date;
11829
- updatedAt: Date;
11830
- name: string;
11831
- mimeType: string;
11832
- fileSize: number;
11833
- width: number | null;
11834
- height: number | null;
11835
- } | null;
11836
- meta: object;
11837
- }>;
11838
- getByAppSlug: _trpc_server0.TRPCQueryProcedure<{
11839
- input: {
11840
- appSlug: string;
11841
- };
11842
- output: {
11843
- id: string;
11844
- createdAt: Date;
11845
- updatedAt: Date;
11846
- name: string;
11847
- mimeType: string;
11848
- fileSize: number;
11849
- width: number | null;
11850
- height: number | null;
11851
- }[];
11852
- meta: object;
11853
- }>;
11854
- getFirstByAppSlug: _trpc_server0.TRPCQueryProcedure<{
11855
- input: {
11856
- appSlug: string;
11857
- };
11858
- output: {
11859
- id: string;
11860
- createdAt: Date;
11861
- updatedAt: Date;
11862
- name: string;
11863
- mimeType: string;
11864
- fileSize: number;
11865
- width: number | null;
11866
- height: number | null;
11867
- } | null;
11868
- meta: object;
11869
- }>;
11870
- }>>;
11871
- appCatalogAdmin: _trpc_server0.TRPCBuiltRouter<{
11872
- ctx: EhTrpcContext;
11873
- meta: object;
11874
- errorShape: _trpc_server0.TRPCDefaultErrorShape;
11875
- transformer: false;
11876
- }, _trpc_server0.TRPCDecorateCreateRouterOptions<{
11877
- list: _trpc_server0.TRPCQueryProcedure<{
11878
- input: void;
11879
- output: {
11880
- id: string;
11881
- createdAt: Date;
11882
- updatedAt: Date;
11883
- description: string;
11884
- slug: string;
11885
- displayName: string;
11886
- access: PrismaJson.AccessMethod | null;
11887
- teams: string[];
11888
- accessRequest: PrismaJson.AppAccessRequest | null;
11889
- notes: string | null;
11890
- tags: string[];
11891
- appUrl: string | null;
11892
- links: PrismaJson.AppLink[] | null;
11893
- iconName: string | null;
11894
- screenshotIds: string[];
11895
- deprecated: PrismaJson.AppDeprecation | null;
11896
- sources: string[];
11897
- }[];
11898
- meta: object;
11899
- }>;
11900
- getById: _trpc_server0.TRPCQueryProcedure<{
11901
- input: {
11902
- id: string;
11903
- };
11904
- output: {
11905
- id: string;
11906
- createdAt: Date;
11907
- updatedAt: Date;
11908
- description: string;
11909
- slug: string;
11910
- displayName: string;
11911
- access: PrismaJson.AccessMethod | null;
11912
- teams: string[];
11913
- accessRequest: PrismaJson.AppAccessRequest | null;
11914
- notes: string | null;
11915
- tags: string[];
11916
- appUrl: string | null;
11917
- links: PrismaJson.AppLink[] | null;
11918
- iconName: string | null;
11919
- screenshotIds: string[];
11920
- deprecated: PrismaJson.AppDeprecation | null;
11921
- sources: string[];
11922
- } | null;
11923
- meta: object;
11924
- }>;
11925
- getBySlug: _trpc_server0.TRPCQueryProcedure<{
11926
- input: {
11927
- slug: string;
11928
- };
11929
- output: {
11930
- id: string;
11931
- createdAt: Date;
11932
- updatedAt: Date;
11933
- description: string;
11934
- slug: string;
11935
- displayName: string;
11936
- access: PrismaJson.AccessMethod | null;
11937
- teams: string[];
11938
- accessRequest: PrismaJson.AppAccessRequest | null;
11939
- notes: string | null;
11940
- tags: string[];
11941
- appUrl: string | null;
11942
- links: PrismaJson.AppLink[] | null;
11943
- iconName: string | null;
11944
- screenshotIds: string[];
11945
- deprecated: PrismaJson.AppDeprecation | null;
11946
- sources: string[];
11947
- } | null;
11948
- meta: object;
11949
- }>;
11950
- create: _trpc_server0.TRPCMutationProcedure<{
11951
- input: {
11952
- slug: string;
11953
- displayName: string;
11954
- description: string;
11955
- access?: {
11956
- [x: string]: unknown;
11957
- type: "email" | "bot" | "ticketing" | "self-service" | "documentation" | "manual";
11958
- } | undefined;
11959
- teams?: string[] | undefined;
11960
- accessRequest?: {
11961
- approvalMethodId: string;
11962
- comments?: string | undefined;
11963
- requestPrompt?: string | undefined;
11964
- postApprovalInstructions?: string | undefined;
11965
- roles?: {
11966
- name: string;
11967
- description?: string | undefined;
11968
- }[] | undefined;
11969
- approvers?: {
11970
- displayName: string;
11971
- contact?: string | undefined;
11972
- }[] | undefined;
11973
- urls?: {
11974
- url: string;
11975
- label?: string | undefined;
11976
- }[] | undefined;
11977
- whoToReachOut?: string | undefined;
11978
- } | undefined;
11979
- notes?: string | undefined;
11980
- tags?: string[] | undefined;
11981
- appUrl?: string | undefined;
11982
- links?: {
11983
- url: string;
11984
- displayName?: string | undefined;
11985
- }[] | undefined;
11986
- iconName?: string | undefined;
11987
- screenshotIds?: string[] | undefined;
11988
- };
11989
- output: {
11990
- id: string;
11991
- createdAt: Date;
11992
- updatedAt: Date;
11993
- description: string;
11994
- slug: string;
11995
- displayName: string;
11996
- access: PrismaJson.AccessMethod | null;
11997
- teams: string[];
11998
- accessRequest: PrismaJson.AppAccessRequest | null;
11999
- notes: string | null;
12000
- tags: string[];
12001
- appUrl: string | null;
12002
- links: PrismaJson.AppLink[] | null;
12003
- iconName: string | null;
12004
- screenshotIds: string[];
12005
- deprecated: PrismaJson.AppDeprecation | null;
12006
- sources: string[];
12007
- };
12008
- meta: object;
12009
- }>;
12010
- update: _trpc_server0.TRPCMutationProcedure<{
12011
- input: {
12012
- id: string;
12013
- slug?: string | undefined;
12014
- displayName?: string | undefined;
12015
- description?: string | undefined;
12016
- access?: {
12017
- [x: string]: unknown;
12018
- type: "email" | "bot" | "ticketing" | "self-service" | "documentation" | "manual";
12019
- } | undefined;
12020
- teams?: string[] | undefined;
12021
- accessRequest?: {
12022
- approvalMethodId: string;
12023
- comments?: string | undefined;
12024
- requestPrompt?: string | undefined;
12025
- postApprovalInstructions?: string | undefined;
12026
- roles?: {
12027
- name: string;
12028
- description?: string | undefined;
12029
- }[] | undefined;
12030
- approvers?: {
12031
- displayName: string;
12032
- contact?: string | undefined;
12033
- }[] | undefined;
12034
- urls?: {
12035
- url: string;
12036
- label?: string | undefined;
12037
- }[] | undefined;
12038
- whoToReachOut?: string | undefined;
12039
- } | undefined;
12040
- notes?: string | undefined;
12041
- tags?: string[] | undefined;
12042
- appUrl?: string | undefined;
12043
- links?: {
12044
- url: string;
12045
- displayName?: string | undefined;
12046
- }[] | undefined;
12047
- iconName?: string | undefined;
12048
- screenshotIds?: string[] | undefined;
12049
- };
12050
- output: {
12051
- id: string;
12052
- createdAt: Date;
12053
- updatedAt: Date;
12054
- description: string;
12055
- slug: string;
12056
- displayName: string;
12057
- access: PrismaJson.AccessMethod | null;
12058
- teams: string[];
12059
- accessRequest: PrismaJson.AppAccessRequest | null;
12060
- notes: string | null;
12061
- tags: string[];
12062
- appUrl: string | null;
12063
- links: PrismaJson.AppLink[] | null;
12064
- iconName: string | null;
12065
- screenshotIds: string[];
12066
- deprecated: PrismaJson.AppDeprecation | null;
12067
- sources: string[];
12068
- };
12069
- meta: object;
12070
- }>;
12071
- updateScreenshots: _trpc_server0.TRPCMutationProcedure<{
12072
- input: {
12073
- id: string;
12074
- screenshotIds: string[];
12075
- };
12076
- output: {
12077
- id: string;
12078
- createdAt: Date;
12079
- updatedAt: Date;
12080
- description: string;
12081
- slug: string;
12082
- displayName: string;
12083
- access: PrismaJson.AccessMethod | null;
12084
- teams: string[];
12085
- accessRequest: PrismaJson.AppAccessRequest | null;
12086
- notes: string | null;
12087
- tags: string[];
12088
- appUrl: string | null;
12089
- links: PrismaJson.AppLink[] | null;
12090
- iconName: string | null;
12091
- screenshotIds: string[];
12092
- deprecated: PrismaJson.AppDeprecation | null;
12093
- sources: string[];
12094
- };
12095
- meta: object;
12096
- }>;
12097
- delete: _trpc_server0.TRPCMutationProcedure<{
12098
- input: {
12099
- id: string;
12100
- };
12101
- output: {
12102
- id: string;
12103
- createdAt: Date;
12104
- updatedAt: Date;
12105
- description: string;
12106
- slug: string;
12107
- displayName: string;
12108
- access: PrismaJson.AccessMethod | null;
12109
- teams: string[];
12110
- accessRequest: PrismaJson.AppAccessRequest | null;
12111
- notes: string | null;
12112
- tags: string[];
12113
- appUrl: string | null;
12114
- links: PrismaJson.AppLink[] | null;
12115
- iconName: string | null;
12116
- screenshotIds: string[];
12117
- deprecated: PrismaJson.AppDeprecation | null;
12118
- sources: string[];
12119
- };
12120
- meta: object;
12121
- }>;
12122
- }>>;
12123
- approvalMethod: _trpc_server0.TRPCBuiltRouter<{
12124
- ctx: EhTrpcContext;
12125
- meta: object;
12126
- errorShape: _trpc_server0.TRPCDefaultErrorShape;
12127
- transformer: false;
12128
- }, _trpc_server0.TRPCDecorateCreateRouterOptions<{
12129
- list: _trpc_server0.TRPCQueryProcedure<{
12130
- input: void;
12131
- output: ApprovalMethod[];
12132
- meta: object;
12133
- }>;
12134
- getById: _trpc_server0.TRPCQueryProcedure<{
12135
- input: {
12136
- slug: string;
12137
- };
12138
- output: ApprovalMethod | null;
12139
- meta: object;
12140
- }>;
12141
- create: _trpc_server0.TRPCMutationProcedure<{
12142
- input: {
12143
- type: "custom" | "service" | "personTeam";
12144
- displayName: string;
12145
- config?: Record<string, never> | {
12146
- url?: string | undefined;
12147
- icon?: string | undefined;
12148
- } | {
12149
- reachOutContacts?: {
12150
- displayName: string;
12151
- contact: string;
12152
- }[] | undefined;
12153
- } | undefined;
12154
- };
12155
- output: ApprovalMethod;
12156
- meta: object;
12157
- }>;
12158
- update: _trpc_server0.TRPCMutationProcedure<{
12159
- input: {
12160
- slug: string;
12161
- type?: "custom" | "service" | "personTeam" | undefined;
12162
- displayName?: string | undefined;
12163
- config?: Record<string, never> | {
12164
- url?: string | undefined;
12165
- icon?: string | undefined;
12166
- } | {
12167
- reachOutContacts?: {
12168
- displayName: string;
12169
- contact: string;
12170
- }[] | undefined;
12171
- } | undefined;
12172
- };
12173
- output: ApprovalMethod;
12174
- meta: object;
12175
- }>;
12176
- delete: _trpc_server0.TRPCMutationProcedure<{
12177
- input: {
12178
- slug: string;
12179
- };
12180
- output: ApprovalMethod;
12181
- meta: object;
12182
- }>;
12183
- listByType: _trpc_server0.TRPCQueryProcedure<{
12184
- input: {
12185
- type: "custom" | "service" | "personTeam";
12186
- };
12187
- output: ApprovalMethod[];
12188
- meta: object;
12189
- }>;
12190
- }>>;
12191
- auth: _trpc_server0.TRPCBuiltRouter<{
12192
- ctx: EhTrpcContext;
12193
- meta: {};
12194
- errorShape: _trpc_server0.TRPCDefaultErrorShape;
12195
- transformer: false;
12196
- }, _trpc_server0.TRPCDecorateCreateRouterOptions<{
12197
- getSession: _trpc_server0.TRPCQueryProcedure<{
12198
- input: void;
12199
- output: {
12200
- user: {
12201
- id: string;
12202
- createdAt: Date;
12203
- updatedAt: Date;
12204
- email: string;
12205
- emailVerified: boolean;
12206
- name: string;
12207
- image?: string | null | undefined;
12208
- } | null;
12209
- isAuthenticated: boolean;
12210
- };
12211
- meta: {};
12212
- }>;
12213
- getProviders: _trpc_server0.TRPCQueryProcedure<{
12214
- input: void;
12215
- output: {
12216
- providers: string[];
12217
- };
12218
- meta: {};
12219
- }>;
12220
- }>>;
12221
- }>>;
12222
- type TRPCRouter = ReturnType<typeof createTrpcRouter>;
12223
- //#endregion
12224
- //#region src/server/ehStaticControllerContract.d.ts
12225
- interface EhStaticControllerContract {
12226
- methods: {
12227
- getIcon: {
12228
- method: string;
12229
- url: string;
12230
- };
12231
- getScreenshot: {
12232
- method: string;
12233
- url: string;
12234
- };
12235
- };
12236
- }
12237
- declare const staticControllerContract: EhStaticControllerContract;
12238
- //#endregion
12239
- //#region src/modules/auth/registerAuthRoutes.d.ts
12240
- /**
12241
- * Register Better Auth routes with Express
12242
- * @param app - Express application instance
12243
- * @param auth - Better Auth instance
12244
- */
12245
- declare function registerAuthRoutes(app: Express, auth: BetterAuth): void;
12246
- //#endregion
12247
- //#region src/modules/auth/authRouter.d.ts
12248
- /**
12249
- * Create auth tRPC procedures
12250
- * @param t - tRPC instance
12251
- * @param auth - Better Auth instance (optional, for future extensions)
12252
- * @returns tRPC router with auth procedures
12253
- */
12254
- declare function createAuthRouter(t: TRPCRootObject<EhTrpcContext, {}, {}>, auth?: BetterAuth): _trpc_server0.TRPCBuiltRouter<{
12255
- ctx: EhTrpcContext;
12256
- meta: {};
12257
- errorShape: _trpc_server0.TRPCDefaultErrorShape;
12258
- transformer: false;
12259
- }, _trpc_server0.TRPCDecorateCreateRouterOptions<{
12260
- getSession: _trpc_server0.TRPCQueryProcedure<{
12261
- input: void;
12262
- output: {
12263
- user: {
12264
- id: string;
12265
- createdAt: Date;
12266
- updatedAt: Date;
12267
- email: string;
12268
- emailVerified: boolean;
12269
- name: string;
12270
- image?: string | null | undefined;
12271
- } | null;
12272
- isAuthenticated: boolean;
12273
- };
12274
- meta: {};
12275
- }>;
12276
- getProviders: _trpc_server0.TRPCQueryProcedure<{
12277
- input: void;
12278
- output: {
12279
- providers: string[];
12280
- };
12281
- meta: {};
12282
- }>;
12283
- }>>;
12284
- type AuthRouter = ReturnType<typeof createAuthRouter>;
12285
- //#endregion
12286
- //#region src/modules/auth/authorizationUtils.d.ts
12287
- /**
12288
- * Authorization utilities for checking user permissions based on groups
12289
- *
12290
- * Groups are automatically included in the user session when:
12291
- * 1. Okta auth server has a "groups" claim configured
12292
- * 2. The auth policy rule includes "groups" in scope_whitelist
12293
- *
12294
- * Example usage in tRPC procedures:
12295
- * ```typescript
12296
- * myProcedure: protectedProcedure.query(async ({ ctx }) => {
12297
- * if (requireAdmin(ctx.user)) {
12298
- * // Admin-only logic
12299
- * }
12300
- * // Regular user logic
12301
- * })
12302
- * ```
12303
- */
12304
- interface UserWithGroups {
12305
- id: string;
12306
- email: string;
12307
- name?: string;
12308
- [key: string]: any;
12309
- }
12310
- /**
12311
- * Extract groups from user object
12312
- * Groups can be stored in different locations depending on the OAuth provider
12313
- */
12314
- declare function getUserGroups(user: UserWithGroups | null | undefined): Array<string>;
12315
- /**
12316
- * Check if user is a member of any of the specified groups
12317
- */
12318
- declare function isMemberOfAnyGroup(user: UserWithGroups | null | undefined, allowedGroups: Array<string>): boolean;
12319
- /**
12320
- * Check if user is a member of all specified groups
12321
- */
12322
- declare function isMemberOfAllGroups(user: UserWithGroups | null | undefined, requiredGroups: Array<string>): boolean;
12323
- /**
12324
- * Check if user has admin permissions
12325
- * @param user User object with groups
12326
- * @param adminGroups List of admin group names (default: ['env_hopper_ui_super_admins'])
12327
- */
12328
- declare function isAdmin(user: UserWithGroups | null | undefined, adminGroups?: Array<string>): boolean;
12329
- /**
12330
- * Require admin permissions - throws error if not admin
12331
- * @param user User object with groups
12332
- * @param adminGroups List of admin group names (default: ['env_hopper_ui_super_admins'])
12333
- */
12334
- declare function requireAdmin(user: UserWithGroups | null | undefined, adminGroups?: Array<string>): void;
12335
- /**
12336
- * Require membership in specific groups - throws error if not member
12337
- */
12338
- declare function requireGroups(user: UserWithGroups | null | undefined, groups: Array<string>): void;
12339
- //#endregion
12340
- //#region src/modules/admin/chat/createAdminChatHandler.d.ts
12341
- interface AdminChatHandlerOptions {
12342
- /** The AI model to use (from @ai-sdk/openai, @ai-sdk/anthropic, etc.) */
12343
- model: LanguageModel;
12344
- /** System prompt for the AI assistant */
12345
- systemPrompt?: string;
12346
- /** Tools available to the AI assistant */
12347
- tools?: Record<string, Tool>;
12348
- /**
12349
- * Optional function to validate configuration before processing requests.
12350
- * Should throw an error if configuration is invalid (e.g., missing API key).
12351
- * @example
12352
- * validateConfig: () => {
12353
- * if (!process.env.OPENAI_API_KEY) {
12354
- * throw new Error('OPENAI_API_KEY is not configured')
12355
- * }
12356
- * }
12357
- */
12358
- validateConfig?: () => void;
12359
- }
12360
- /**
12361
- * Creates an Express handler for the admin chat endpoint.
12362
- *
12363
- * Usage in thin wrappers:
12364
- *
12365
- * ```typescript
12366
- * // With OpenAI
12367
- * import { openai } from '@ai-sdk/openai'
12368
- * app.post('/api/admin/chat', createAdminChatHandler({
12369
- * model: openai('gpt-4o-mini'),
12370
- * }))
12371
- *
12372
- * // With Claude
12373
- * import { anthropic } from '@ai-sdk/anthropic'
12374
- * app.post('/api/admin/chat', createAdminChatHandler({
12375
- * model: anthropic('claude-sonnet-4-20250514'),
12376
- * }))
12377
- * ```
12378
- */
12379
- declare function createAdminChatHandler(options: AdminChatHandlerOptions): (req: Request, res: Response) => Promise<void>;
12380
- //#endregion
12381
- //#region src/modules/admin/chat/createDatabaseTools.d.ts
12382
- /**
12383
- * Generic interface for executing raw SQL queries.
12384
- * Can be implemented with Prisma's $queryRawUnsafe or any other SQL client.
12385
- */
12386
- interface DatabaseClient {
12387
- /** Execute a SELECT query and return results */
12388
- query: <T = unknown>(sql: string) => Promise<Array<T>>;
12389
- /** Execute an INSERT/UPDATE/DELETE and return affected row count */
12390
- execute: (sql: string) => Promise<{
12391
- affectedRows: number;
12392
- }>;
12393
- /** Get list of tables in the database */
12394
- getTables: () => Promise<Array<string>>;
12395
- /** Get columns for a specific table */
12396
- getColumns: (tableName: string) => Promise<Array<{
12397
- name: string;
12398
- type: string;
12399
- nullable: boolean;
12400
- }>>;
12401
- }
12402
- /**
12403
- * Creates a DatabaseClient from a Prisma client.
12404
- */
12405
- declare function createPrismaDatabaseClient(prisma: {
12406
- $queryRawUnsafe: <T>(sql: string) => Promise<T>;
12407
- $executeRawUnsafe: (sql: string) => Promise<number>;
12408
- }): DatabaseClient;
12409
- /**
12410
- * Creates AI tools for generic database access.
12411
- *
12412
- * The AI uses these internally - users interact via natural language.
12413
- * Results are formatted as tables by the AI based on the system prompt.
12414
- * Uses the internal backend-core Prisma client automatically.
12415
- */
12416
- declare function createDatabaseTools(): Record<string, Tool>;
12417
- /**
12418
- * Default system prompt for the database admin assistant.
12419
- * Can be customized or extended.
12420
- */
12421
- declare const DEFAULT_ADMIN_SYSTEM_PROMPT = "You are a helpful database admin assistant. You help users view and manage data in the database.\n\nIMPORTANT RULES:\n1. When showing data, ALWAYS format it as a numbered ASCII table so users can reference rows by number\n2. NEVER show raw SQL to users - just describe what you're doing in plain language\n3. When users ask to modify data (update, delete, create), ALWAYS confirm before executing\n4. For updates, show the current value and ask for confirmation before changing\n5. Keep responses concise and focused on the data\n\nFORMATTING EXAMPLE:\nWhen user asks \"show me all apps\", respond like:\n\"Here are all the apps:\n\n| # | ID | Slug | Display Name | Icon |\n|---|----|---------|-----------------| -------|\n| 1 | 1 | portal | Portal | portal |\n| 2 | 2 | admin | Admin Dashboard | admin |\n| 3 | 3 | api | API Service | null |\n\nFound 3 apps total.\"\n\nWhen user says \"update row 2 display name to 'Admin Panel'\":\n1. First confirm: \"I'll update the app 'Admin Dashboard' (ID: 2) to have display name 'Admin Panel'. Proceed?\"\n2. Only after user confirms, execute the update\n3. Then show the updated row\n\nAVAILABLE TABLES:\nUse getDatabaseSchema tool to discover tables and their columns.\n";
12422
- //#endregion
12423
- //#region src/modules/icons/iconRestController.d.ts
12424
- interface IconRestControllerConfig {
12425
- /**
12426
- * Base path for icon endpoints (e.g., '/api/icons')
12427
- */
12428
- basePath: string;
12429
- }
12430
- /**
12431
- * Registers REST endpoints for icon upload and retrieval
12432
- *
12433
- * Endpoints:
12434
- * - POST {basePath}/upload - Upload a new icon (multipart/form-data with 'icon' field and 'name' field)
12435
- * - GET {basePath}/:id - Get icon binary by ID
12436
- * - GET {basePath}/:id/metadata - Get icon metadata only
12437
- */
12438
- declare function registerIconRestController(router: Router, config: IconRestControllerConfig): void;
12439
- //#endregion
12440
- //#region src/modules/icons/iconService.d.ts
12441
- interface UpsertIconInput {
12442
- name: string;
12443
- content: Buffer;
12444
- mimeType: string;
12445
- fileSize: number;
11853
+ //#region src/modules/icons/iconService.d.ts
11854
+ interface UpsertIconInput {
11855
+ name: string;
11856
+ content: Buffer;
11857
+ mimeType: string;
11858
+ fileSize: number;
12446
11859
  }
12447
11860
  /**
12448
11861
  * Upsert an icon to the database.
@@ -12454,11 +11867,11 @@ declare function upsertIcon(input: UpsertIconInput): Promise<{
12454
11867
  createdAt: Date;
12455
11868
  updatedAt: Date;
12456
11869
  name: string;
11870
+ assetType: AssetType;
12457
11871
  content: runtime.Bytes;
11872
+ checksum: string;
12458
11873
  mimeType: string;
12459
11874
  fileSize: number;
12460
- assetType: AssetType;
12461
- checksum: string;
12462
11875
  width: number | null;
12463
11876
  height: number | null;
12464
11877
  }>;
@@ -12471,11 +11884,11 @@ declare function upsertIcons(icons: Array<UpsertIconInput>): Promise<{
12471
11884
  createdAt: Date;
12472
11885
  updatedAt: Date;
12473
11886
  name: string;
11887
+ assetType: AssetType;
12474
11888
  content: runtime.Bytes;
11889
+ checksum: string;
12475
11890
  mimeType: string;
12476
11891
  fileSize: number;
12477
- assetType: AssetType;
12478
- checksum: string;
12479
11892
  width: number | null;
12480
11893
  height: number | null;
12481
11894
  }[]>;
@@ -12524,77 +11937,6 @@ interface ScreenshotRestControllerConfig {
12524
11937
  */
12525
11938
  declare function registerScreenshotRestController(router: Router, config: ScreenshotRestControllerConfig): void;
12526
11939
  //#endregion
12527
- //#region src/modules/assets/screenshotRouter.d.ts
12528
- declare function createScreenshotRouter(): _trpc_server0.TRPCBuiltRouter<{
12529
- ctx: EhTrpcContext;
12530
- meta: object;
12531
- errorShape: _trpc_server0.TRPCDefaultErrorShape;
12532
- transformer: false;
12533
- }, _trpc_server0.TRPCDecorateCreateRouterOptions<{
12534
- list: _trpc_server0.TRPCQueryProcedure<{
12535
- input: void;
12536
- output: {
12537
- id: string;
12538
- createdAt: Date;
12539
- updatedAt: Date;
12540
- name: string;
12541
- mimeType: string;
12542
- fileSize: number;
12543
- width: number | null;
12544
- height: number | null;
12545
- }[];
12546
- meta: object;
12547
- }>;
12548
- getOne: _trpc_server0.TRPCQueryProcedure<{
12549
- input: {
12550
- id: string;
12551
- };
12552
- output: {
12553
- id: string;
12554
- createdAt: Date;
12555
- updatedAt: Date;
12556
- name: string;
12557
- mimeType: string;
12558
- fileSize: number;
12559
- width: number | null;
12560
- height: number | null;
12561
- } | null;
12562
- meta: object;
12563
- }>;
12564
- getByAppSlug: _trpc_server0.TRPCQueryProcedure<{
12565
- input: {
12566
- appSlug: string;
12567
- };
12568
- output: {
12569
- id: string;
12570
- createdAt: Date;
12571
- updatedAt: Date;
12572
- name: string;
12573
- mimeType: string;
12574
- fileSize: number;
12575
- width: number | null;
12576
- height: number | null;
12577
- }[];
12578
- meta: object;
12579
- }>;
12580
- getFirstByAppSlug: _trpc_server0.TRPCQueryProcedure<{
12581
- input: {
12582
- appSlug: string;
12583
- };
12584
- output: {
12585
- id: string;
12586
- createdAt: Date;
12587
- updatedAt: Date;
12588
- name: string;
12589
- mimeType: string;
12590
- fileSize: number;
12591
- width: number | null;
12592
- height: number | null;
12593
- } | null;
12594
- meta: object;
12595
- }>;
12596
- }>>;
12597
- //#endregion
12598
11940
  //#region src/modules/assets/syncAssets.d.ts
12599
11941
  interface SyncAssetsConfig {
12600
11942
  /**
@@ -12621,260 +11963,6 @@ declare function syncAssets(config: SyncAssetsConfig): Promise<{
12621
11963
  screenshotsUpserted: number;
12622
11964
  }>;
12623
11965
  //#endregion
12624
- //#region src/modules/appCatalogAdmin/appCatalogAdminRouter.d.ts
12625
- declare function createAppCatalogAdminRouter(): _trpc_server0.TRPCBuiltRouter<{
12626
- ctx: EhTrpcContext;
12627
- meta: object;
12628
- errorShape: _trpc_server0.TRPCDefaultErrorShape;
12629
- transformer: false;
12630
- }, _trpc_server0.TRPCDecorateCreateRouterOptions<{
12631
- list: _trpc_server0.TRPCQueryProcedure<{
12632
- input: void;
12633
- output: {
12634
- id: string;
12635
- createdAt: Date;
12636
- updatedAt: Date;
12637
- description: string;
12638
- slug: string;
12639
- displayName: string;
12640
- access: PrismaJson.AccessMethod | null;
12641
- teams: string[];
12642
- accessRequest: PrismaJson.AppAccessRequest | null;
12643
- notes: string | null;
12644
- tags: string[];
12645
- appUrl: string | null;
12646
- links: PrismaJson.AppLink[] | null;
12647
- iconName: string | null;
12648
- screenshotIds: string[];
12649
- deprecated: PrismaJson.AppDeprecation | null;
12650
- sources: string[];
12651
- }[];
12652
- meta: object;
12653
- }>;
12654
- getById: _trpc_server0.TRPCQueryProcedure<{
12655
- input: {
12656
- id: string;
12657
- };
12658
- output: {
12659
- id: string;
12660
- createdAt: Date;
12661
- updatedAt: Date;
12662
- description: string;
12663
- slug: string;
12664
- displayName: string;
12665
- access: PrismaJson.AccessMethod | null;
12666
- teams: string[];
12667
- accessRequest: PrismaJson.AppAccessRequest | null;
12668
- notes: string | null;
12669
- tags: string[];
12670
- appUrl: string | null;
12671
- links: PrismaJson.AppLink[] | null;
12672
- iconName: string | null;
12673
- screenshotIds: string[];
12674
- deprecated: PrismaJson.AppDeprecation | null;
12675
- sources: string[];
12676
- } | null;
12677
- meta: object;
12678
- }>;
12679
- getBySlug: _trpc_server0.TRPCQueryProcedure<{
12680
- input: {
12681
- slug: string;
12682
- };
12683
- output: {
12684
- id: string;
12685
- createdAt: Date;
12686
- updatedAt: Date;
12687
- description: string;
12688
- slug: string;
12689
- displayName: string;
12690
- access: PrismaJson.AccessMethod | null;
12691
- teams: string[];
12692
- accessRequest: PrismaJson.AppAccessRequest | null;
12693
- notes: string | null;
12694
- tags: string[];
12695
- appUrl: string | null;
12696
- links: PrismaJson.AppLink[] | null;
12697
- iconName: string | null;
12698
- screenshotIds: string[];
12699
- deprecated: PrismaJson.AppDeprecation | null;
12700
- sources: string[];
12701
- } | null;
12702
- meta: object;
12703
- }>;
12704
- create: _trpc_server0.TRPCMutationProcedure<{
12705
- input: {
12706
- slug: string;
12707
- displayName: string;
12708
- description: string;
12709
- access?: {
12710
- [x: string]: unknown;
12711
- type: "email" | "bot" | "ticketing" | "self-service" | "documentation" | "manual";
12712
- } | undefined;
12713
- teams?: string[] | undefined;
12714
- accessRequest?: {
12715
- approvalMethodId: string;
12716
- comments?: string | undefined;
12717
- requestPrompt?: string | undefined;
12718
- postApprovalInstructions?: string | undefined;
12719
- roles?: {
12720
- name: string;
12721
- description?: string | undefined;
12722
- }[] | undefined;
12723
- approvers?: {
12724
- displayName: string;
12725
- contact?: string | undefined;
12726
- }[] | undefined;
12727
- urls?: {
12728
- url: string;
12729
- label?: string | undefined;
12730
- }[] | undefined;
12731
- whoToReachOut?: string | undefined;
12732
- } | undefined;
12733
- notes?: string | undefined;
12734
- tags?: string[] | undefined;
12735
- appUrl?: string | undefined;
12736
- links?: {
12737
- url: string;
12738
- displayName?: string | undefined;
12739
- }[] | undefined;
12740
- iconName?: string | undefined;
12741
- screenshotIds?: string[] | undefined;
12742
- };
12743
- output: {
12744
- id: string;
12745
- createdAt: Date;
12746
- updatedAt: Date;
12747
- description: string;
12748
- slug: string;
12749
- displayName: string;
12750
- access: PrismaJson.AccessMethod | null;
12751
- teams: string[];
12752
- accessRequest: PrismaJson.AppAccessRequest | null;
12753
- notes: string | null;
12754
- tags: string[];
12755
- appUrl: string | null;
12756
- links: PrismaJson.AppLink[] | null;
12757
- iconName: string | null;
12758
- screenshotIds: string[];
12759
- deprecated: PrismaJson.AppDeprecation | null;
12760
- sources: string[];
12761
- };
12762
- meta: object;
12763
- }>;
12764
- update: _trpc_server0.TRPCMutationProcedure<{
12765
- input: {
12766
- id: string;
12767
- slug?: string | undefined;
12768
- displayName?: string | undefined;
12769
- description?: string | undefined;
12770
- access?: {
12771
- [x: string]: unknown;
12772
- type: "email" | "bot" | "ticketing" | "self-service" | "documentation" | "manual";
12773
- } | undefined;
12774
- teams?: string[] | undefined;
12775
- accessRequest?: {
12776
- approvalMethodId: string;
12777
- comments?: string | undefined;
12778
- requestPrompt?: string | undefined;
12779
- postApprovalInstructions?: string | undefined;
12780
- roles?: {
12781
- name: string;
12782
- description?: string | undefined;
12783
- }[] | undefined;
12784
- approvers?: {
12785
- displayName: string;
12786
- contact?: string | undefined;
12787
- }[] | undefined;
12788
- urls?: {
12789
- url: string;
12790
- label?: string | undefined;
12791
- }[] | undefined;
12792
- whoToReachOut?: string | undefined;
12793
- } | undefined;
12794
- notes?: string | undefined;
12795
- tags?: string[] | undefined;
12796
- appUrl?: string | undefined;
12797
- links?: {
12798
- url: string;
12799
- displayName?: string | undefined;
12800
- }[] | undefined;
12801
- iconName?: string | undefined;
12802
- screenshotIds?: string[] | undefined;
12803
- };
12804
- output: {
12805
- id: string;
12806
- createdAt: Date;
12807
- updatedAt: Date;
12808
- description: string;
12809
- slug: string;
12810
- displayName: string;
12811
- access: PrismaJson.AccessMethod | null;
12812
- teams: string[];
12813
- accessRequest: PrismaJson.AppAccessRequest | null;
12814
- notes: string | null;
12815
- tags: string[];
12816
- appUrl: string | null;
12817
- links: PrismaJson.AppLink[] | null;
12818
- iconName: string | null;
12819
- screenshotIds: string[];
12820
- deprecated: PrismaJson.AppDeprecation | null;
12821
- sources: string[];
12822
- };
12823
- meta: object;
12824
- }>;
12825
- updateScreenshots: _trpc_server0.TRPCMutationProcedure<{
12826
- input: {
12827
- id: string;
12828
- screenshotIds: string[];
12829
- };
12830
- output: {
12831
- id: string;
12832
- createdAt: Date;
12833
- updatedAt: Date;
12834
- description: string;
12835
- slug: string;
12836
- displayName: string;
12837
- access: PrismaJson.AccessMethod | null;
12838
- teams: string[];
12839
- accessRequest: PrismaJson.AppAccessRequest | null;
12840
- notes: string | null;
12841
- tags: string[];
12842
- appUrl: string | null;
12843
- links: PrismaJson.AppLink[] | null;
12844
- iconName: string | null;
12845
- screenshotIds: string[];
12846
- deprecated: PrismaJson.AppDeprecation | null;
12847
- sources: string[];
12848
- };
12849
- meta: object;
12850
- }>;
12851
- delete: _trpc_server0.TRPCMutationProcedure<{
12852
- input: {
12853
- id: string;
12854
- };
12855
- output: {
12856
- id: string;
12857
- createdAt: Date;
12858
- updatedAt: Date;
12859
- description: string;
12860
- slug: string;
12861
- displayName: string;
12862
- access: PrismaJson.AccessMethod | null;
12863
- teams: string[];
12864
- accessRequest: PrismaJson.AppAccessRequest | null;
12865
- notes: string | null;
12866
- tags: string[];
12867
- appUrl: string | null;
12868
- links: PrismaJson.AppLink[] | null;
12869
- iconName: string | null;
12870
- screenshotIds: string[];
12871
- deprecated: PrismaJson.AppDeprecation | null;
12872
- sources: string[];
12873
- };
12874
- meta: object;
12875
- }>;
12876
- }>>;
12877
- //#endregion
12878
11966
  //#region src/modules/appCatalog/checkLinks.d.ts
12879
11967
  interface LinkCheck {
12880
11968
  url: string;
@@ -12910,90 +11998,6 @@ declare function printLinkCheckReport(report: {
12910
11998
  checks: Array<LinkCheck>;
12911
11999
  }): void;
12912
12000
  //#endregion
12913
- //#region src/modules/approvalMethod/approvalMethodRouter.d.ts
12914
- declare function createApprovalMethodRouter(): _trpc_server0.TRPCBuiltRouter<{
12915
- ctx: EhTrpcContext;
12916
- meta: object;
12917
- errorShape: _trpc_server0.TRPCDefaultErrorShape;
12918
- transformer: false;
12919
- }, _trpc_server0.TRPCDecorateCreateRouterOptions<{
12920
- list: _trpc_server0.TRPCQueryProcedure<{
12921
- input: void;
12922
- output: ApprovalMethod[];
12923
- meta: object;
12924
- }>;
12925
- getById: _trpc_server0.TRPCQueryProcedure<{
12926
- input: {
12927
- slug: string;
12928
- };
12929
- output: ApprovalMethod | null;
12930
- meta: object;
12931
- }>;
12932
- create: _trpc_server0.TRPCMutationProcedure<{
12933
- input: {
12934
- type: "custom" | "service" | "personTeam";
12935
- displayName: string;
12936
- config?: Record<string, never> | {
12937
- url?: string | undefined;
12938
- icon?: string | undefined;
12939
- } | {
12940
- reachOutContacts?: {
12941
- displayName: string;
12942
- contact: string;
12943
- }[] | undefined;
12944
- } | undefined;
12945
- };
12946
- output: ApprovalMethod;
12947
- meta: object;
12948
- }>;
12949
- update: _trpc_server0.TRPCMutationProcedure<{
12950
- input: {
12951
- slug: string;
12952
- type?: "custom" | "service" | "personTeam" | undefined;
12953
- displayName?: string | undefined;
12954
- config?: Record<string, never> | {
12955
- url?: string | undefined;
12956
- icon?: string | undefined;
12957
- } | {
12958
- reachOutContacts?: {
12959
- displayName: string;
12960
- contact: string;
12961
- }[] | undefined;
12962
- } | undefined;
12963
- };
12964
- output: ApprovalMethod;
12965
- meta: object;
12966
- }>;
12967
- delete: _trpc_server0.TRPCMutationProcedure<{
12968
- input: {
12969
- slug: string;
12970
- };
12971
- output: ApprovalMethod;
12972
- meta: object;
12973
- }>;
12974
- listByType: _trpc_server0.TRPCQueryProcedure<{
12975
- input: {
12976
- type: "custom" | "service" | "personTeam";
12977
- };
12978
- output: ApprovalMethod[];
12979
- meta: object;
12980
- }>;
12981
- }>>;
12982
- //#endregion
12983
- //#region src/modules/approvalMethod/syncApprovalMethods.d.ts
12984
- interface ApprovalMethodSyncInput {
12985
- slug: string;
12986
- type: 'service' | 'personTeam' | 'custom';
12987
- displayName: string;
12988
- }
12989
- /**
12990
- * Syncs approval methods to the database using upsert logic based on type + displayName.
12991
- *
12992
- * @param prisma - The PrismaClient instance from the backend-core database
12993
- * @param methods - Array of approval methods to sync
12994
- */
12995
- declare function syncApprovalMethods(prisma: PrismaClient, methods: Array<ApprovalMethodSyncInput>): Promise<void>;
12996
- //#endregion
12997
12001
  //#region src/db/client.d.ts
12998
12002
  /**
12999
12003
  * Gets the internal Prisma client instance.
@@ -13296,5 +12300,5 @@ declare class EhDatabaseManager {
13296
12300
  */
13297
12301
  declare function injectCustomScripts(html: string, scriptUrls: Array<string>): string;
13298
12302
  //#endregion
13299
- export { type AdminChatHandlerOptions, AppAccessRequest, AppApprovalMethod, AppCatalogCompanySpecificBackend, AppCatalogData, AppCategory, type AppForCatalog, AppRole, ApprovalMethod, ApprovalMethodConfig, type ApprovalMethodSyncInput, ApprovalMethodType, ApprovalUrl, ApproverContact, type AssetRestControllerConfig, type AuthConfig, type AuthRouter, type BetterAuth, CreateApprovalMethodInput, CustomConfig, DEFAULT_ADMIN_SYSTEM_PROMPT, type DatabaseClient, type EhAdminChatConfig, EhAppIndexed, EhAppPageIndexed, EhAppUiIndexed, EhAppsMeta, type EhAuthConfig, EhBackendAppDto, EhBackendAppInput, EhBackendAppUIBaseInput, EhBackendAppUIInput, 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, GroupingTagDefinition, GroupingTagValue, type IconRestControllerConfig, type MakeTFromPrismaModel, type MiddlewareContext, type ObjectKeys, PersonTeamConfig, ReachOutContact, type ScalarFilter, type ScalarKeys, type ScreenshotRestControllerConfig, ServiceConfig, type SyncAppCatalogResult, type SyncAssetsConfig, TABLE_SYNC_MAGAZINE, type TRPCRouter, type TableSyncMagazine, type TableSyncMagazineModelNameKey, type TableSyncParamsPrisma, Tag, UpdateApprovalMethodInput, type UpsertIconInput, type UserWithGroups, checkAllLinks, connectDb, createAdminChatHandler, createAppCatalogAdminRouter, createApprovalMethodRouter, createAuth, createAuthRouter, createDatabaseTools, createEhMiddleware, createEhTrpcContext, createPrismaDatabaseClient, createScreenshotRouter, createTrpcRouter, disconnectDb, getAssetByName, getDbClient, getUserGroups, injectCustomScripts, isAdmin, isMemberOfAllGroups, isMemberOfAnyGroup, printLinkCheckReport, registerAssetRestController, registerAuthRoutes, registerIconRestController, registerScreenshotRestController, requireAdmin, requireGroups, setDbClient, staticControllerContract, syncAppCatalog, syncApprovalMethods, syncAssets, tableSyncPrisma, tool, upsertIcon, upsertIcons };
12303
+ export { AppAccessRequest, AppApprovalMethod, AppCatalogCompanySpecificBackend, AppCatalogData, AppCategory, type AppForCatalog, AppRole, ApprovalMethod, ApprovalMethodConfig, ApprovalMethodType, ApprovalUrl, ApproverContact, type AssetRestControllerConfig, type AuthConfig, type AuthRouter, type BetterAuth, CreateApprovalMethodInput, CustomConfig, EhAppIndexed, EhAppPageIndexed, EhAppUiIndexed, EhAppsMeta, type EhAuthConfig, EhBackendAppDto, EhBackendAppInput, EhBackendAppUIBaseInput, EhBackendAppUIInput, 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, GroupingTagDefinition, GroupingTagValue, type IconRestControllerConfig, type MakeTFromPrismaModel, type MiddlewareContext, type ObjectKeys, PersonTeamConfig, ReachOutContact, type ScalarFilter, type ScalarKeys, type ScreenshotRestControllerConfig, ServiceConfig, type SyncAppCatalogResult, type SyncAssetsConfig, TABLE_SYNC_MAGAZINE, type TRPCRouter, type TableSyncMagazine, type TableSyncMagazineModelNameKey, type TableSyncParamsPrisma, Tag, UpdateApprovalMethodInput, type UpsertIconInput, type UserWithGroups, checkAllLinks, connectDb, createAuth, createAuthRouter, createEhMiddleware, createEhTrpcContext, createTrpcRouter, disconnectDb, getAssetByName, getDbClient, getUserGroups, injectCustomScripts, isAdmin, isMemberOfAllGroups, isMemberOfAnyGroup, printLinkCheckReport, registerAssetRestController, registerAuthRoutes, registerIconRestController, registerScreenshotRestController, requireAdmin, requireGroups, setDbClient, staticControllerContract, syncAppCatalog, syncAssets, tableSyncPrisma, upsertIcon, upsertIcons };
13300
12304
  //# sourceMappingURL=index.d.ts.map