@andrewcaires/api 5.3.5 → 5.4.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
@@ -1,48 +1,37 @@
1
1
  /*!
2
- * @andrewcaires/api v5.3.5
2
+ * @andrewcaires/api v5.4.0
3
3
  * Simple api for small applications using express, jsonwebtoken, sequelize and websocket
4
4
  * (c) 2026 Andrew Caires
5
5
  * @license: MIT
6
6
  */
7
- import { Context, Application as Application$1, ExpressOptions, IStore, ResponseError } from '@andrewcaires/express';
8
- import { Encryptor, Env as Env$1 } from '@andrewcaires/node';
7
+ import { Context, Application as Application$1, ExpressOptions, ResponseError } from '@andrewcaires/express';
9
8
  import { ModelFindOptions, ModelUpdateOptions, Model as Model$1, Sequelize } from '@andrewcaires/sequelize';
10
9
  import { TypeAnyObject, TypeObjectString, TypeAnyFunction, TypeAnyConstructor, EventEmitter, TypeObject, ValidationBase, ValidationShape } from '@andrewcaires/utils.js';
11
10
  import { WebSocketServer } from 'ws';
12
11
  import { Model, CreateOptions, Attributes, FindOptions, IncludeOptions, FindAttributeOptions, ModelStatic } from 'sequelize';
12
+ import { Env as Env$1 } from '@andrewcaires/node';
13
13
  import { Store, SessionData } from 'express-session';
14
14
 
15
- interface IAuthParameters {
16
- auth?: UserAuthModel;
17
- decode?: TypeAnyObject;
18
- forgot?: ForgotModel;
19
- token?: string;
20
- user?: UserModel;
15
+ interface AuthResult {
16
+ access: UserAuthModel | UserKeyModel;
17
+ user: UserModel;
21
18
  }
22
19
 
23
20
  interface AuthEvents {
24
21
  "auth.activation": {
25
22
  ctx: Context;
26
- register: RegisterModel;
27
- user: UserModel;
28
23
  };
29
24
  "auth.failure": {
30
25
  ctx: Context;
31
- user?: UserModel;
32
26
  };
33
27
  "auth.login": {
34
28
  ctx: Context;
35
- auth: UserAuthModel;
36
- user: UserModel;
37
29
  };
38
30
  "auth.logout": {
39
31
  ctx: Context;
40
- auth: UserAuthModel;
41
- user: UserModel;
42
32
  };
43
33
  "auth.renew": {
44
34
  ctx: Context;
45
- auth: UserAuthModel;
46
35
  };
47
36
  }
48
37
 
@@ -81,7 +70,7 @@ interface ApplicationEvents extends AuthEvents, ForgotEvents, RegisterEvents {
81
70
 
82
71
  declare module "express-serve-static-core" {
83
72
  interface Request {
84
- auth?: UserAuthModel;
73
+ access?: UserAuthModel | UserKeyModel;
85
74
  }
86
75
  }
87
76
 
@@ -97,12 +86,6 @@ declare module "express-serve-static-core" {
97
86
  }
98
87
  }
99
88
 
100
- declare module "express-serve-static-core" {
101
- interface Request {
102
- profile?: TypeObjectString;
103
- }
104
- }
105
-
106
89
  declare module "express-serve-static-core" {
107
90
  interface Request {
108
91
  tenants?: Array<{
@@ -209,7 +192,7 @@ declare enum UserStatus {
209
192
 
210
193
  declare class RegisterModel extends Model$1 {
211
194
  readonly id: string;
212
- secret: string;
195
+ hash: string;
213
196
  expired_at: number;
214
197
  active: boolean;
215
198
  readonly created_at: Date;
@@ -221,7 +204,7 @@ declare class RegisterModel extends Model$1 {
221
204
 
222
205
  declare class UserAuthModel extends Model$1 {
223
206
  readonly id: string;
224
- secret: string;
207
+ hash: string;
225
208
  ip_address: string;
226
209
  user_agent: string;
227
210
  revoked_at: Date | null;
@@ -385,6 +368,14 @@ declare class MigrationModel extends Model$1 {
385
368
  readonly updated_at: Date;
386
369
  }
387
370
 
371
+ declare class SecretModel extends Model$1 {
372
+ readonly id: string;
373
+ key: string;
374
+ hash: string;
375
+ readonly created_at: Date;
376
+ readonly updated_at: Date;
377
+ }
378
+
388
379
  declare class SessionModel extends Model$1 {
389
380
  readonly id: string;
390
381
  data: TypeAnyObject;
@@ -393,6 +384,21 @@ declare class SessionModel extends Model$1 {
393
384
  readonly updated_at: Date;
394
385
  }
395
386
 
387
+ declare class UserKeyModel extends Model$1 {
388
+ readonly id: string;
389
+ name: string;
390
+ prefix: string;
391
+ hash: string;
392
+ last_used_at: Date | null;
393
+ expires_at: Date | null;
394
+ revoked_at: Date | null;
395
+ readonly created_at: Date;
396
+ readonly updated_at: Date;
397
+ readonly deleted_at: Date | null;
398
+ user_id: string;
399
+ user: UserModel;
400
+ }
401
+
396
402
  declare class Loggable {
397
403
  get log(): (message: string) => void;
398
404
  static get log(): (message: string) => void;
@@ -418,6 +424,15 @@ declare class Log {
418
424
  private static writeRaw;
419
425
  }
420
426
 
427
+ declare class Secret extends Loggable {
428
+ private static encryptor;
429
+ static all(keys?: Array<string>): Promise<Array<string>>;
430
+ static del(key: string): Promise<boolean>;
431
+ static get(key: string, value?: string): Promise<string>;
432
+ static set(key: string, value: string): Promise<void>;
433
+ private static init;
434
+ }
435
+
421
436
  declare class SessionStore extends Store {
422
437
  constructor();
423
438
  all: (callback: TypeAnyFunction) => Promise<void>;
@@ -435,14 +450,23 @@ declare abstract class Service {
435
450
  }
436
451
 
437
452
  declare class AuthService extends Service {
453
+ private readonly options;
438
454
  private readonly userAttributes;
439
- create(user: UserModel): Promise<IAuthParameters>;
440
- destroy(auth?: UserAuthModel): Promise<boolean>;
441
- renew(token: string): Promise<IAuthParameters>;
442
- user(token: string): Promise<IAuthParameters>;
443
- private options;
444
- private verify;
445
- key(value: string): Promise<IAuthParameters>;
455
+ private readonly userService;
456
+ constructor();
457
+ createApiKey(ctx: Context, name: string, expires_at: Date, user: UserModel): Promise<string>;
458
+ createApiToken(ctx: Context, user: UserModel): Promise<{
459
+ token: string;
460
+ }>;
461
+ renewApiToken(token: string): Promise<{
462
+ token: string;
463
+ }>;
464
+ apiAuth(ctx: Context): Promise<AuthResult>;
465
+ apiKeyAuth(key: string): Promise<AuthResult>;
466
+ apiTokenAuth(token: string): Promise<AuthResult>;
467
+ private attachAuthContext;
468
+ private safeEqual;
469
+ private verifyJwt;
446
470
  }
447
471
 
448
472
  declare class ModelService<M extends Model<any>> extends Service {
@@ -481,7 +505,6 @@ declare class UserService extends Service {
481
505
  }
482
506
 
483
507
  declare class Application<T extends ApplicationEvents = ApplicationEvents> extends Application$1<T> {
484
- readonly encryptor: Encryptor;
485
508
  authService: AuthService;
486
509
  userService: UserService;
487
510
  private _webSocket?;
@@ -498,14 +521,13 @@ interface BaseController extends Loggable {
498
521
  declare abstract class BaseController<T extends TypeAnyObject = TypeAnyObject> extends EventEmitter<T> {
499
522
  protected readonly permissions: Array<string>;
500
523
  name(): string;
501
- session(ctx: Context, user_agent: string, store: IStore): Promise<void>;
502
524
  sync(): Promise<void>;
503
525
  }
504
526
 
505
527
  declare abstract class ModelController<M extends Model<any>, T extends TypeAnyObject = TypeAnyObject> extends BaseController<T> {
506
528
  protected readonly attributes: Array<string>;
507
529
  protected abstract readonly model: ModelStatic<M>;
508
- protected readonly permissions: Array<string>;
530
+ protected readonly permissions: string[];
509
531
  protected readonly search: Array<string>;
510
532
  private service;
511
533
  protected countAll(options: ModelArgumentsCount<M>): Promise<number>;
@@ -528,10 +550,10 @@ declare class AuditsController extends ModelController<AuditModel> {
528
550
 
529
551
  declare class AuthController extends BaseController<AuthEvents> {
530
552
  protected readonly authService: AuthService;
531
- protected login(ctx: Context, user_agent: string, username: string, password: string, remember: boolean, app: Application): Promise<void>;
532
- protected logout(ctx: Context, auth: UserAuthModel, user: UserModel, app: Application): Promise<void>;
533
- protected renew(ctx: Context, user_agent: string, old: string, app: Application): Promise<void>;
534
- protected user(ctx: Context, user: UserModel): Promise<void>;
553
+ protected login(ctx: Context, username: string, password: string, remember: boolean, app: Application): Promise<void>;
554
+ protected logout(ctx: Context, access: UserAuthModel | UserKeyModel, app: Application): Promise<void>;
555
+ protected user(ctx: Context): Promise<void>;
556
+ protected renew(ctx: Context, old: string, app: Application): Promise<void>;
535
557
  }
536
558
 
537
559
  declare abstract class CrudController<M extends Model<any>, T extends TypeAnyObject = TypeAnyObject> extends ModelController<M, T> {
@@ -592,6 +614,7 @@ declare class GroupsPermissionsController extends ModelController<PermissionMode
592
614
  protected set(ctx: Context, group_id: string, permissions: Array<string>): Promise<void>;
593
615
  private addPermissions;
594
616
  private checkGroup;
617
+ private checkPermissions;
595
618
  }
596
619
 
597
620
  declare class HealthController {
@@ -611,16 +634,14 @@ declare class McpController extends BaseController {
611
634
  sync(app?: Application): Promise<void>;
612
635
  protected get(ctx: Context): Promise<void>;
613
636
  protected options(ctx: Context): Promise<void>;
614
- protected post(ctx: Context): Promise<void>;
615
- protected delete(ctx: Context): Promise<void>;
616
- private getMcpToolMetadata;
617
- private discoverMcpTools;
618
- private createMcpToolFromMetadata;
637
+ protected post(ctx: Context<any, Application>): Promise<void>;
638
+ protected delete(ctx: Context<any, Application>): Promise<void>;
619
639
  private isJsonParseError;
620
640
  private isMcpEndpoint;
621
641
  private jsonParseErrorResponse;
622
642
  private respond;
623
- private setHeader;
643
+ private setResponseHeaders;
644
+ private getAllowedOrigin;
624
645
  }
625
646
 
626
647
  declare class PermissionsController extends CrudController<PermissionModel> {
@@ -732,6 +753,15 @@ interface McpSession {
732
753
  expiresAt: number;
733
754
  protocolVersion: McpProtocolVersion;
734
755
  initialized: boolean;
756
+ access?: unknown;
757
+ groups?: Array<string>;
758
+ permissions?: Array<string>;
759
+ tenants?: Array<{
760
+ id: string;
761
+ name: string;
762
+ }>;
763
+ user?: unknown;
764
+ userId?: string;
735
765
  }
736
766
  interface McpToolDefinition {
737
767
  name: string;
@@ -749,6 +779,15 @@ interface McpToolDeclaration {
749
779
  }
750
780
  interface McpToolContext {
751
781
  session: McpSession;
782
+ access?: unknown;
783
+ groups?: Array<string>;
784
+ permissions?: Array<string>;
785
+ tenants?: Array<{
786
+ id: string;
787
+ name: string;
788
+ }>;
789
+ user?: unknown;
790
+ userId?: string;
752
791
  }
753
792
  type McpToolInput = Record<string, unknown>;
754
793
  type McpToolOutput = unknown;
@@ -807,6 +846,7 @@ declare class McpToolRegistry {
807
846
  call(name: string, argumentsValue: unknown, session: McpSession): Promise<McpCallToolResult>;
808
847
  private isCallToolResult;
809
848
  private normalizeMcpValidation;
849
+ private normalizeSchema;
810
850
  private outputValidationError;
811
851
  private toolInputValidationError;
812
852
  private validateAdditionalProperties;
@@ -818,9 +858,12 @@ interface McpHttpHandlerOptions {
818
858
  logger?: McpLogger;
819
859
  serverName?: string;
820
860
  serverVersion?: string;
861
+ allowedHeaders?: Array<string>;
862
+ allowedOrigins?: Array<string>;
821
863
  }
822
864
  declare const MCP_HTTP_ALLOWED_METHODS: readonly ["POST", "DELETE", "OPTIONS"];
823
865
  declare const MCP_HTTP_ALLOW: string;
866
+ declare const MCP_HTTP_DEFAULT_ALLOWED_HEADERS: readonly ["Content-Type", "Accept", "MCP-Session-Id", "MCP-Protocol-Version"];
824
867
  declare const isJsonParseError: (error: unknown) => error is Error & {
825
868
  status?: number;
826
869
  statusCode?: number;
@@ -833,9 +876,13 @@ declare class McpHttpHandler {
833
876
  private readonly logger?;
834
877
  private readonly serverName;
835
878
  private readonly serverVersion;
879
+ private readonly allowedHeaders;
880
+ private readonly allowedOrigins;
836
881
  constructor(options: McpHttpHandlerOptions);
837
882
  post(ctx: Context): Promise<McpHttpResponse>;
838
883
  delete(ctx: Context): McpHttpResponse;
884
+ get(ctx?: Context): McpHttpResponse;
885
+ options(ctx?: Context): McpHttpResponse;
839
886
  private initialize;
840
887
  private initialized;
841
888
  private callTool;
@@ -848,6 +895,14 @@ declare class McpHttpHandler {
848
895
  private validateObjectParams;
849
896
  private withTransportHeaders;
850
897
  private errorResponse;
898
+ private getBody;
899
+ private getHeader;
900
+ private getHeaderFromRequest;
901
+ private getHeaderFromRecord;
902
+ private normalizeHeaderValue;
903
+ private normalizeAllowedHeaders;
904
+ private getAllowedOrigin;
905
+ private getAuthContext;
851
906
  }
852
907
 
853
908
  declare const isJsonRpcId: (value: unknown) => value is McpJsonRpcId;
@@ -863,6 +918,9 @@ interface McpToolMetadata extends McpToolDeclaration {
863
918
  type McpDecoratedToolHandler = (_argumentsValue: Record<string, unknown>, _context: McpToolContext) => ReturnType<McpRegisteredTool["run"]>;
864
919
  declare const assertValidMcpToolDefinition: (definition: McpToolDeclaration) => void;
865
920
 
921
+ declare const getMcpToolMetadata: (target: object | TypeAnyConstructor<object>) => Array<McpToolMetadata>;
922
+ declare const discoverMcpTools: (controllers: Array<object>) => Array<McpRegisteredTool>;
923
+
866
924
  declare class TestController extends BaseController {
867
925
  protected json(ctx: Context): Promise<void>;
868
926
  protected sum(args: TypeAnyObject, _context: McpToolContext): Promise<{
@@ -922,10 +980,11 @@ declare class TestController extends BaseController {
922
980
 
923
981
  declare class UsersController extends ModelController<UserModel> {
924
982
  protected readonly model: typeof UserModel;
983
+ protected readonly permissions: string[];
925
984
  path: string;
926
985
  constructor();
927
986
  protected avatar(ctx: Context, user: UserModel): Promise<void>;
928
- private token_new;
987
+ protected avatar_del(ctx: Context, user: UserModel): Promise<void>;
929
988
  protected add(ctx: Context): Promise<void>;
930
989
  protected all(ctx: Context): Promise<void>;
931
990
  protected rows(ctx: Context): Promise<void>;
@@ -942,6 +1001,17 @@ declare class UsersGroupsController extends ModelController<GroupModel> {
942
1001
  protected del(ctx: Context, user_id: string, groups: Array<string>): Promise<void>;
943
1002
  protected set(ctx: Context, user_id: string, groups: Array<string>): Promise<void>;
944
1003
  private addGroups;
1004
+ private checkGroups;
1005
+ private checkUser;
1006
+ }
1007
+
1008
+ declare class UsersKeysController extends ModelController<UserKeyModel> {
1009
+ protected readonly model: typeof UserKeyModel;
1010
+ protected readonly permissions: string[];
1011
+ protected add(ctx: Context, user: UserModel, body: TypeAnyObject, app: Application): Promise<void>;
1012
+ protected add_admin(ctx: Context, id: string, body: TypeAnyObject, app: Application): Promise<void>;
1013
+ protected all(ctx: Context, user: UserModel): Promise<void>;
1014
+ protected all_admin(ctx: Context, id: string): Promise<void>;
945
1015
  private checkUser;
946
1016
  }
947
1017
 
@@ -953,6 +1023,7 @@ declare class UsersTenantsController extends ModelController<TenantModel> {
953
1023
  protected del(ctx: Context, user_id: string, tenants: Array<string>): Promise<void>;
954
1024
  protected set(ctx: Context, user_id: string, tenants: Array<string>): Promise<void>;
955
1025
  private addTenants;
1026
+ private checkTenants;
956
1027
  private checkUser;
957
1028
  }
958
1029
 
@@ -972,9 +1043,11 @@ declare const HasGroups: (...groups: Array<string>) => MethodDecorator;
972
1043
 
973
1044
  declare const HasPermissions: (...permissions: Array<string>) => MethodDecorator;
974
1045
 
1046
+ declare const HasScope: (scope?: string) => MethodDecorator;
1047
+
975
1048
  declare const IsAuthenticated: () => MethodDecorator;
976
1049
 
977
- declare const ReqAuth: (key?: string) => ParameterDecorator;
1050
+ declare const ReqAccess: (key?: string) => ParameterDecorator;
978
1051
 
979
1052
  declare const ReqGroup: (key?: string) => ParameterDecorator;
980
1053
 
@@ -984,6 +1057,10 @@ declare const ReqPermission: (key?: string) => ParameterDecorator;
984
1057
 
985
1058
  declare const ReqPermissions: (key?: string) => ParameterDecorator;
986
1059
 
1060
+ declare const ReqTenant: (key?: string) => ParameterDecorator;
1061
+
1062
+ declare const ReqTenants: (key?: string) => ParameterDecorator;
1063
+
987
1064
  declare const ReqUser: (key?: string) => ParameterDecorator;
988
1065
 
989
1066
  type McpToolOptions = Omit<McpToolMetadata, "propertyKey">;
@@ -992,6 +1069,7 @@ declare const McpTool: (options: McpToolOptions) => MethodDecorator;
992
1069
  declare const Audit: (active?: boolean) => ClassDecorator;
993
1070
 
994
1071
  declare class Env extends Env$1 {
1072
+ static readonly AUDIT_IGNORE: string[];
995
1073
  static readonly BASE_NAME: string;
996
1074
  static readonly CONSOLE_ERROR: boolean;
997
1075
  static readonly DATABASE_URI: string;
@@ -1001,12 +1079,15 @@ declare class Env extends Env$1 {
1001
1079
  static readonly DATABASE_TIMEZONE: string;
1002
1080
  static readonly ENCRYPTION_SECRET: string;
1003
1081
  static readonly HTTP_CROSS: string;
1082
+ static readonly HTTP_HYBRID: boolean;
1083
+ static readonly HTTP_NOTFOUND: string;
1084
+ static readonly HTTP_PATH: string;
1004
1085
  static readonly HTTP_PORT: number;
1005
1086
  static readonly HTTP_PUBLIC: string;
1087
+ static readonly HTTP_REDIRECT: string;
1006
1088
  static readonly HTTP_TLS_CA: Buffer<ArrayBufferLike> | null;
1007
1089
  static readonly HTTP_TLS_CRT: Buffer<ArrayBufferLike> | null;
1008
1090
  static readonly HTTP_TLS_KEY: Buffer<ArrayBufferLike> | null;
1009
- static readonly KEY_HEADER: string;
1010
1091
  static readonly MODEL_LIMIT: number;
1011
1092
  static readonly MODEL_LIMIT_MAX: number;
1012
1093
  static readonly MCP_SESSION_TTL: number;
@@ -1019,9 +1100,12 @@ declare class Env extends Env$1 {
1019
1100
  static readonly SLEEP_FORGOT: number;
1020
1101
  static readonly SLEEP_REGISTRY: number;
1021
1102
  static readonly TENANT_HEADER: string;
1022
- static readonly TOKEN_CRT: Buffer<ArrayBufferLike> | null;
1103
+ static readonly TOKEN_COOKIE: string;
1104
+ static readonly TOKEN_COOKIE_SET: boolean;
1023
1105
  static readonly TOKEN_HEADER: string;
1024
- static readonly TOKEN_KEY: Buffer<ArrayBufferLike> | null;
1106
+ static readonly TOKEN_PEPPER: string;
1107
+ static readonly TOKEN_PREFIX: string;
1108
+ static readonly TOKEN_SECRET: string;
1025
1109
  static readonly TOKEN_TTL: number;
1026
1110
  static readonly TOKEN_TTL_FORGOT: number;
1027
1111
  static readonly TOKEN_TTL_RENEW: number;
@@ -1030,18 +1114,12 @@ declare class Env extends Env$1 {
1030
1114
  static readonly API_BODYPARSER_INFLATE: boolean;
1031
1115
  static readonly API_BODYPARSER_LIMIT: string;
1032
1116
  static readonly API_BODYPARSER_TYPE: string;
1033
- static readonly API_HTTP_HYBRID: boolean;
1034
- static readonly API_HTTP_NOTFOUND: string;
1035
- static readonly API_HTTP_PATH: string;
1036
- static readonly API_HTTP_REDIRECT: string;
1037
1117
  static readonly API_SESSION_NAME: string;
1038
1118
  static readonly API_SESSION_LIFETIME: number;
1039
1119
  static readonly API_SESSION_SECRET: string;
1040
- static readonly API_TOKEN_COOKIE: string;
1041
- static readonly API_TOKEN_COOKIE_SET: boolean;
1042
1120
  static readonly API_USER_HISTORY: boolean;
1043
1121
  static readonly API_WEBSOCKET_START: boolean;
1044
1122
  }
1045
1123
 
1046
- export { Application, Audit, AuditModel, AuditTypes, AuditsController, AuthController, AuthService, BaseController, CanCreate, CanDelete, CanRead, CanUpdate, Config, ConfigModel, CrudController, Env, FilesController, ForgotController, ForgotModel, GroupModel, GroupPermissionModel, GroupTypes, GroupsController, GroupsPermissionsController, HasGroups, HasPermissions, HealthController, IsAuthenticated, Log, LogLevels, LogModel, Loggable, LogsController, MCP_DEFAULT_PROTOCOL_VERSION, MCP_HTTP_ALLOW, MCP_HTTP_ALLOWED_METHODS, MCP_PROTOCOL_VERSION_HEADER, MCP_SESSION_ID_HEADER, MCP_SUPPORTED_PROTOCOL_VERSIONS, MCP_TOOL_METADATA, McpController, McpError, McpErrorCode, McpHttpHandler, McpInternalError, McpInvalidParamsError, McpInvalidRequestError, McpInvalidSessionError, McpMethodNotFoundError, McpParseError, McpServerError, McpSessionStore, McpTool, McpToolNotFoundError, McpToolRegistry, MigrationModel, ModelController, ModelService, PermissionModel, PermissionsController, RegisterController, RegisterModel, ReqAuth, ReqGroup, ReqGroups, ReqPermission, ReqPermissions, ReqUser, Service, SessionModel, SessionStore, SetupController, TenantModel, TenantStatus, TenantsController, TestController, UserAuthModel, UserGroupModel, UserModel, UserPasswordModel, UserService, UserStatus, UserTenantModel, UsersController, UsersGroupsController, UsersTenantsController, assertValidMcpToolDefinition, canFactory, isJsonParseError, isJsonRpcId, jsonParseErrorResponse, jsonRpcError, jsonRpcErrorFromCode, jsonRpcResult, parseJsonRpcRequest, sequelize };
1047
- export type { ApplicationEvents, AuthEvents, ForgotEvents, IAuthParameters, McpCallToolResult, McpDecoratedToolHandler, McpHttpHandlerOptions, McpHttpResponse, McpJsonRpcErrorBody, McpJsonRpcErrorResult, McpJsonRpcId, McpJsonRpcRequest, McpJsonRpcResult, McpLogger, McpNormalizedValidation, McpProtocolVersion, McpRegisteredTool, McpSession, McpToolCallLog, McpToolContext, McpToolDeclaration, McpToolDefinition, McpToolHandlerResult, McpToolInput, McpToolMetadata, McpToolOptions, McpToolOutput, ModelArgumentsBase, ModelArgumentsCount, ModelArgumentsCreate, ModelArgumentsDelete, ModelArgumentsFindAll, ModelArgumentsFindOne, ModelArgumentsInclude, ModelArgumentsUpdate, ModelCallbackFindAll, ModelCallbackFindOne, ModelOptions, ModelResultFindAll, RegisterEvents };
1124
+ export { Application, Audit, AuditModel, AuditTypes, AuditsController, AuthController, AuthService, BaseController, CanCreate, CanDelete, CanRead, CanUpdate, Config, ConfigModel, CrudController, Env, FilesController, ForgotController, ForgotModel, GroupModel, GroupPermissionModel, GroupTypes, GroupsController, GroupsPermissionsController, HasGroups, HasPermissions, HasScope, HealthController, IsAuthenticated, Log, LogLevels, LogModel, Loggable, LogsController, MCP_DEFAULT_PROTOCOL_VERSION, MCP_HTTP_ALLOW, MCP_HTTP_ALLOWED_METHODS, MCP_HTTP_DEFAULT_ALLOWED_HEADERS, MCP_PROTOCOL_VERSION_HEADER, MCP_SESSION_ID_HEADER, MCP_SUPPORTED_PROTOCOL_VERSIONS, MCP_TOOL_METADATA, McpController, McpError, McpErrorCode, McpHttpHandler, McpInternalError, McpInvalidParamsError, McpInvalidRequestError, McpInvalidSessionError, McpMethodNotFoundError, McpParseError, McpServerError, McpSessionStore, McpTool, McpToolNotFoundError, McpToolRegistry, MigrationModel, ModelController, ModelService, PermissionModel, PermissionsController, RegisterController, RegisterModel, ReqAccess, ReqGroup, ReqGroups, ReqPermission, ReqPermissions, ReqTenant, ReqTenants, ReqUser, Secret, SecretModel, Service, SessionModel, SessionStore, SetupController, TenantModel, TenantStatus, TenantsController, TestController, UserAuthModel, UserGroupModel, UserKeyModel, UserModel, UserPasswordModel, UserService, UserStatus, UserTenantModel, UsersController, UsersGroupsController, UsersKeysController, UsersTenantsController, assertValidMcpToolDefinition, canFactory, discoverMcpTools, getMcpToolMetadata, isJsonParseError, isJsonRpcId, jsonParseErrorResponse, jsonRpcError, jsonRpcErrorFromCode, jsonRpcResult, parseJsonRpcRequest, sequelize };
1125
+ export type { ApplicationEvents, AuthEvents, AuthResult, ForgotEvents, McpCallToolResult, McpDecoratedToolHandler, McpHttpHandlerOptions, McpHttpResponse, McpJsonRpcErrorBody, McpJsonRpcErrorResult, McpJsonRpcId, McpJsonRpcRequest, McpJsonRpcResult, McpLogger, McpNormalizedValidation, McpProtocolVersion, McpRegisteredTool, McpSession, McpToolCallLog, McpToolContext, McpToolDeclaration, McpToolDefinition, McpToolHandlerResult, McpToolInput, McpToolMetadata, McpToolOptions, McpToolOutput, ModelArgumentsBase, ModelArgumentsCount, ModelArgumentsCreate, ModelArgumentsDelete, ModelArgumentsFindAll, ModelArgumentsFindOne, ModelArgumentsInclude, ModelArgumentsUpdate, ModelCallbackFindAll, ModelCallbackFindOne, ModelOptions, ModelResultFindAll, RegisterEvents };