@andrewcaires/api 5.3.5 → 5.3.6

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.3.6
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
- import { TypeAnyObject, TypeObjectString, TypeAnyFunction, TypeAnyConstructor, EventEmitter, TypeObject, ValidationBase, ValidationShape } from '@andrewcaires/utils.js';
9
+ import { TypeObjectString, TypeAnyObject, 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
 
@@ -209,7 +198,7 @@ declare enum UserStatus {
209
198
 
210
199
  declare class RegisterModel extends Model$1 {
211
200
  readonly id: string;
212
- secret: string;
201
+ hash: string;
213
202
  expired_at: number;
214
203
  active: boolean;
215
204
  readonly created_at: Date;
@@ -221,7 +210,7 @@ declare class RegisterModel extends Model$1 {
221
210
 
222
211
  declare class UserAuthModel extends Model$1 {
223
212
  readonly id: string;
224
- secret: string;
213
+ hash: string;
225
214
  ip_address: string;
226
215
  user_agent: string;
227
216
  revoked_at: Date | null;
@@ -385,6 +374,14 @@ declare class MigrationModel extends Model$1 {
385
374
  readonly updated_at: Date;
386
375
  }
387
376
 
377
+ declare class SecretModel extends Model$1 {
378
+ readonly id: string;
379
+ key: string;
380
+ hash: string;
381
+ readonly created_at: Date;
382
+ readonly updated_at: Date;
383
+ }
384
+
388
385
  declare class SessionModel extends Model$1 {
389
386
  readonly id: string;
390
387
  data: TypeAnyObject;
@@ -393,6 +390,21 @@ declare class SessionModel extends Model$1 {
393
390
  readonly updated_at: Date;
394
391
  }
395
392
 
393
+ declare class UserKeyModel extends Model$1 {
394
+ readonly id: string;
395
+ name: string;
396
+ prefix: string;
397
+ hash: string;
398
+ last_used_at: Date | null;
399
+ expires_at: Date | null;
400
+ revoked_at: Date | null;
401
+ readonly created_at: Date;
402
+ readonly updated_at: Date;
403
+ readonly deleted_at: Date | null;
404
+ user_id: string;
405
+ user: UserModel;
406
+ }
407
+
396
408
  declare class Loggable {
397
409
  get log(): (message: string) => void;
398
410
  static get log(): (message: string) => void;
@@ -418,6 +430,15 @@ declare class Log {
418
430
  private static writeRaw;
419
431
  }
420
432
 
433
+ declare class Secret extends Loggable {
434
+ private static encryptor;
435
+ static all(keys?: Array<string>): Promise<Array<string>>;
436
+ static del(key: string): Promise<boolean>;
437
+ static get(key: string, value?: string): Promise<string>;
438
+ static set(key: string, value: string): Promise<void>;
439
+ private static init;
440
+ }
441
+
421
442
  declare class SessionStore extends Store {
422
443
  constructor();
423
444
  all: (callback: TypeAnyFunction) => Promise<void>;
@@ -435,14 +456,23 @@ declare abstract class Service {
435
456
  }
436
457
 
437
458
  declare class AuthService extends Service {
459
+ private readonly options;
438
460
  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>;
461
+ private readonly userService;
462
+ constructor();
463
+ createApiKey(ctx: Context, name: string, expires_at: Date, user: UserModel): Promise<string>;
464
+ createApiToken(ctx: Context, user: UserModel): Promise<{
465
+ token: string;
466
+ }>;
467
+ renewApiToken(token: string): Promise<{
468
+ token: string;
469
+ }>;
470
+ apiAuth(ctx: Context): Promise<AuthResult>;
471
+ apiKeyAuth(key: string): Promise<AuthResult>;
472
+ apiTokenAuth(token: string): Promise<AuthResult>;
473
+ private attachAuthContext;
474
+ private safeEqual;
475
+ private verifyJwt;
446
476
  }
447
477
 
448
478
  declare class ModelService<M extends Model<any>> extends Service {
@@ -481,7 +511,6 @@ declare class UserService extends Service {
481
511
  }
482
512
 
483
513
  declare class Application<T extends ApplicationEvents = ApplicationEvents> extends Application$1<T> {
484
- readonly encryptor: Encryptor;
485
514
  authService: AuthService;
486
515
  userService: UserService;
487
516
  private _webSocket?;
@@ -498,14 +527,13 @@ interface BaseController extends Loggable {
498
527
  declare abstract class BaseController<T extends TypeAnyObject = TypeAnyObject> extends EventEmitter<T> {
499
528
  protected readonly permissions: Array<string>;
500
529
  name(): string;
501
- session(ctx: Context, user_agent: string, store: IStore): Promise<void>;
502
530
  sync(): Promise<void>;
503
531
  }
504
532
 
505
533
  declare abstract class ModelController<M extends Model<any>, T extends TypeAnyObject = TypeAnyObject> extends BaseController<T> {
506
534
  protected readonly attributes: Array<string>;
507
535
  protected abstract readonly model: ModelStatic<M>;
508
- protected readonly permissions: Array<string>;
536
+ protected readonly permissions: string[];
509
537
  protected readonly search: Array<string>;
510
538
  private service;
511
539
  protected countAll(options: ModelArgumentsCount<M>): Promise<number>;
@@ -528,10 +556,10 @@ declare class AuditsController extends ModelController<AuditModel> {
528
556
 
529
557
  declare class AuthController extends BaseController<AuthEvents> {
530
558
  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>;
559
+ protected login(ctx: Context, username: string, password: string, remember: boolean, app: Application): Promise<void>;
560
+ protected logout(ctx: Context, access: UserAuthModel | UserKeyModel, app: Application): Promise<void>;
561
+ protected user(ctx: Context): Promise<void>;
562
+ protected renew(ctx: Context, old: string, app: Application): Promise<void>;
535
563
  }
536
564
 
537
565
  declare abstract class CrudController<M extends Model<any>, T extends TypeAnyObject = TypeAnyObject> extends ModelController<M, T> {
@@ -611,16 +639,13 @@ declare class McpController extends BaseController {
611
639
  sync(app?: Application): Promise<void>;
612
640
  protected get(ctx: Context): Promise<void>;
613
641
  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;
642
+ protected post(ctx: Context<any, Application>): Promise<void>;
643
+ protected delete(ctx: Context<any, Application>): Promise<void>;
619
644
  private isJsonParseError;
620
645
  private isMcpEndpoint;
621
646
  private jsonParseErrorResponse;
622
647
  private respond;
623
- private setHeader;
648
+ private setResponseHeaders;
624
649
  }
625
650
 
626
651
  declare class PermissionsController extends CrudController<PermissionModel> {
@@ -732,6 +757,15 @@ interface McpSession {
732
757
  expiresAt: number;
733
758
  protocolVersion: McpProtocolVersion;
734
759
  initialized: boolean;
760
+ access?: unknown;
761
+ groups?: Array<string>;
762
+ permissions?: Array<string>;
763
+ tenants?: Array<{
764
+ id: string;
765
+ name: string;
766
+ }>;
767
+ user?: unknown;
768
+ userId?: string;
735
769
  }
736
770
  interface McpToolDefinition {
737
771
  name: string;
@@ -749,6 +783,15 @@ interface McpToolDeclaration {
749
783
  }
750
784
  interface McpToolContext {
751
785
  session: McpSession;
786
+ access?: unknown;
787
+ groups?: Array<string>;
788
+ permissions?: Array<string>;
789
+ tenants?: Array<{
790
+ id: string;
791
+ name: string;
792
+ }>;
793
+ user?: unknown;
794
+ userId?: string;
752
795
  }
753
796
  type McpToolInput = Record<string, unknown>;
754
797
  type McpToolOutput = unknown;
@@ -807,6 +850,7 @@ declare class McpToolRegistry {
807
850
  call(name: string, argumentsValue: unknown, session: McpSession): Promise<McpCallToolResult>;
808
851
  private isCallToolResult;
809
852
  private normalizeMcpValidation;
853
+ private normalizeSchema;
810
854
  private outputValidationError;
811
855
  private toolInputValidationError;
812
856
  private validateAdditionalProperties;
@@ -818,9 +862,11 @@ interface McpHttpHandlerOptions {
818
862
  logger?: McpLogger;
819
863
  serverName?: string;
820
864
  serverVersion?: string;
865
+ allowedHeaders?: Array<string>;
821
866
  }
822
867
  declare const MCP_HTTP_ALLOWED_METHODS: readonly ["POST", "DELETE", "OPTIONS"];
823
868
  declare const MCP_HTTP_ALLOW: string;
869
+ declare const MCP_HTTP_DEFAULT_ALLOWED_HEADERS: readonly ["Content-Type", "Accept", "MCP-Session-Id", "MCP-Protocol-Version"];
824
870
  declare const isJsonParseError: (error: unknown) => error is Error & {
825
871
  status?: number;
826
872
  statusCode?: number;
@@ -833,9 +879,12 @@ declare class McpHttpHandler {
833
879
  private readonly logger?;
834
880
  private readonly serverName;
835
881
  private readonly serverVersion;
882
+ private readonly allowedHeaders;
836
883
  constructor(options: McpHttpHandlerOptions);
837
884
  post(ctx: Context): Promise<McpHttpResponse>;
838
885
  delete(ctx: Context): McpHttpResponse;
886
+ get(): McpHttpResponse;
887
+ options(): McpHttpResponse;
839
888
  private initialize;
840
889
  private initialized;
841
890
  private callTool;
@@ -848,6 +897,13 @@ declare class McpHttpHandler {
848
897
  private validateObjectParams;
849
898
  private withTransportHeaders;
850
899
  private errorResponse;
900
+ private getBody;
901
+ private getHeader;
902
+ private getHeaderFromRequest;
903
+ private getHeaderFromRecord;
904
+ private normalizeHeaderValue;
905
+ private normalizeAllowedHeaders;
906
+ private getAuthContext;
851
907
  }
852
908
 
853
909
  declare const isJsonRpcId: (value: unknown) => value is McpJsonRpcId;
@@ -863,6 +919,9 @@ interface McpToolMetadata extends McpToolDeclaration {
863
919
  type McpDecoratedToolHandler = (_argumentsValue: Record<string, unknown>, _context: McpToolContext) => ReturnType<McpRegisteredTool["run"]>;
864
920
  declare const assertValidMcpToolDefinition: (definition: McpToolDeclaration) => void;
865
921
 
922
+ declare const getMcpToolMetadata: (target: object | TypeAnyConstructor<object>) => Array<McpToolMetadata>;
923
+ declare const discoverMcpTools: (controllers: Array<object>) => Array<McpRegisteredTool>;
924
+
866
925
  declare class TestController extends BaseController {
867
926
  protected json(ctx: Context): Promise<void>;
868
927
  protected sum(args: TypeAnyObject, _context: McpToolContext): Promise<{
@@ -922,10 +981,11 @@ declare class TestController extends BaseController {
922
981
 
923
982
  declare class UsersController extends ModelController<UserModel> {
924
983
  protected readonly model: typeof UserModel;
984
+ protected readonly permissions: string[];
925
985
  path: string;
926
986
  constructor();
927
987
  protected avatar(ctx: Context, user: UserModel): Promise<void>;
928
- private token_new;
988
+ protected avatar_del(ctx: Context, user: UserModel): Promise<void>;
929
989
  protected add(ctx: Context): Promise<void>;
930
990
  protected all(ctx: Context): Promise<void>;
931
991
  protected rows(ctx: Context): Promise<void>;
@@ -945,6 +1005,16 @@ declare class UsersGroupsController extends ModelController<GroupModel> {
945
1005
  private checkUser;
946
1006
  }
947
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>;
1015
+ private checkUser;
1016
+ }
1017
+
948
1018
  declare class UsersTenantsController extends ModelController<TenantModel> {
949
1019
  protected readonly model: typeof TenantModel;
950
1020
  protected readonly permissions: never[];
@@ -972,9 +1042,11 @@ declare const HasGroups: (...groups: Array<string>) => MethodDecorator;
972
1042
 
973
1043
  declare const HasPermissions: (...permissions: Array<string>) => MethodDecorator;
974
1044
 
1045
+ declare const HasScope: (scope?: string) => MethodDecorator;
1046
+
975
1047
  declare const IsAuthenticated: () => MethodDecorator;
976
1048
 
977
- declare const ReqAuth: (key?: string) => ParameterDecorator;
1049
+ declare const ReqAccess: (key?: string) => ParameterDecorator;
978
1050
 
979
1051
  declare const ReqGroup: (key?: string) => ParameterDecorator;
980
1052
 
@@ -984,6 +1056,10 @@ declare const ReqPermission: (key?: string) => ParameterDecorator;
984
1056
 
985
1057
  declare const ReqPermissions: (key?: string) => ParameterDecorator;
986
1058
 
1059
+ declare const ReqTenant: (key?: string) => ParameterDecorator;
1060
+
1061
+ declare const ReqTenants: (key?: string) => ParameterDecorator;
1062
+
987
1063
  declare const ReqUser: (key?: string) => ParameterDecorator;
988
1064
 
989
1065
  type McpToolOptions = Omit<McpToolMetadata, "propertyKey">;
@@ -992,6 +1068,7 @@ declare const McpTool: (options: McpToolOptions) => MethodDecorator;
992
1068
  declare const Audit: (active?: boolean) => ClassDecorator;
993
1069
 
994
1070
  declare class Env extends Env$1 {
1071
+ static readonly AUDIT_IGNORE: string[];
995
1072
  static readonly BASE_NAME: string;
996
1073
  static readonly CONSOLE_ERROR: boolean;
997
1074
  static readonly DATABASE_URI: string;
@@ -1001,12 +1078,15 @@ declare class Env extends Env$1 {
1001
1078
  static readonly DATABASE_TIMEZONE: string;
1002
1079
  static readonly ENCRYPTION_SECRET: string;
1003
1080
  static readonly HTTP_CROSS: string;
1081
+ static readonly HTTP_HYBRID: boolean;
1082
+ static readonly HTTP_NOTFOUND: string;
1083
+ static readonly HTTP_PATH: string;
1004
1084
  static readonly HTTP_PORT: number;
1005
1085
  static readonly HTTP_PUBLIC: string;
1086
+ static readonly HTTP_REDIRECT: string;
1006
1087
  static readonly HTTP_TLS_CA: Buffer<ArrayBufferLike> | null;
1007
1088
  static readonly HTTP_TLS_CRT: Buffer<ArrayBufferLike> | null;
1008
1089
  static readonly HTTP_TLS_KEY: Buffer<ArrayBufferLike> | null;
1009
- static readonly KEY_HEADER: string;
1010
1090
  static readonly MODEL_LIMIT: number;
1011
1091
  static readonly MODEL_LIMIT_MAX: number;
1012
1092
  static readonly MCP_SESSION_TTL: number;
@@ -1019,9 +1099,12 @@ declare class Env extends Env$1 {
1019
1099
  static readonly SLEEP_FORGOT: number;
1020
1100
  static readonly SLEEP_REGISTRY: number;
1021
1101
  static readonly TENANT_HEADER: string;
1022
- static readonly TOKEN_CRT: Buffer<ArrayBufferLike> | null;
1102
+ static readonly TOKEN_COOKIE: string;
1103
+ static readonly TOKEN_COOKIE_SET: boolean;
1023
1104
  static readonly TOKEN_HEADER: string;
1024
- static readonly TOKEN_KEY: Buffer<ArrayBufferLike> | null;
1105
+ static readonly TOKEN_PEPPER: string;
1106
+ static readonly TOKEN_PREFIX: string;
1107
+ static readonly TOKEN_SECRET: string;
1025
1108
  static readonly TOKEN_TTL: number;
1026
1109
  static readonly TOKEN_TTL_FORGOT: number;
1027
1110
  static readonly TOKEN_TTL_RENEW: number;
@@ -1030,18 +1113,12 @@ declare class Env extends Env$1 {
1030
1113
  static readonly API_BODYPARSER_INFLATE: boolean;
1031
1114
  static readonly API_BODYPARSER_LIMIT: string;
1032
1115
  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
1116
  static readonly API_SESSION_NAME: string;
1038
1117
  static readonly API_SESSION_LIFETIME: number;
1039
1118
  static readonly API_SESSION_SECRET: string;
1040
- static readonly API_TOKEN_COOKIE: string;
1041
- static readonly API_TOKEN_COOKIE_SET: boolean;
1042
1119
  static readonly API_USER_HISTORY: boolean;
1043
1120
  static readonly API_WEBSOCKET_START: boolean;
1044
1121
  }
1045
1122
 
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 };
1123
+ 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 };
1124
+ 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 };