@andrewcaires/api 5.4.4 → 5.5.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,5 +1,5 @@
1
1
  /*!
2
- * @andrewcaires/api v5.4.4
2
+ * @andrewcaires/api v5.5.0
3
3
  * Simple api for small applications using express, jsonwebtoken, sequelize and websocket
4
4
  * (c) 2026 Andrew Caires
5
5
  * @license: MIT
@@ -716,6 +716,18 @@ declare class PermissionsController extends CrudController<PermissionModel> {
716
716
  private checkPermission;
717
717
  }
718
718
 
719
+ declare class ProfileController extends ModelController<UserModel> {
720
+ protected readonly model: typeof UserModel;
721
+ protected readonly permissions: string[];
722
+ path: string;
723
+ protected readonly userService: UserService;
724
+ constructor();
725
+ protected user(ctx: Context): Promise<void>;
726
+ protected avatar(ctx: Context, user: UserModel): Promise<void>;
727
+ protected avatar_del(ctx: Context, user: UserModel): Promise<void>;
728
+ protected password(ctx: Context, oldPassword: string, newPassword: string, user: UserModel): Promise<void>;
729
+ }
730
+
719
731
  declare class RegisterController extends BaseController<RegisterEvents> {
720
732
  protected register(ctx: Context, body: TypeAnyObject, app: Application): Promise<void>;
721
733
  protected confirm(ctx: Context, token: string, app: Application): Promise<void>;
@@ -1043,14 +1055,8 @@ declare class TestController extends BaseController {
1043
1055
 
1044
1056
  declare class UsersController extends ModelController<UserModel> {
1045
1057
  protected readonly model: typeof UserModel;
1046
- protected readonly permissions: string[];
1047
- path: string;
1048
1058
  protected readonly userService: UserService;
1049
- constructor();
1050
- protected avatar(ctx: Context, user: UserModel): Promise<void>;
1051
- protected avatar_del(ctx: Context, user: UserModel): Promise<void>;
1052
- protected password(ctx: Context, oldPassword: string, newPassword: string, user: UserModel): Promise<void>;
1053
- protected password_admin(ctx: Context, password: string, user_id: string): Promise<void>;
1059
+ protected password(ctx: Context, password: string, user_id: string): Promise<void>;
1054
1060
  protected add(ctx: Context): Promise<void>;
1055
1061
  protected all(ctx: Context): Promise<void>;
1056
1062
  protected rows(ctx: Context): Promise<void>;
@@ -1196,5 +1202,5 @@ declare class Env extends Env$1 {
1196
1202
  static readonly API_WEBSOCKET_START: boolean;
1197
1203
  }
1198
1204
 
1199
- 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, PageModel, PageTypes, PagesController, 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, WORKER_METADATA, Worker, assertValidMcpToolDefinition, canFactory, discoverMcpTools, discoverWorkers, getMcpToolMetadata, getWorkerMetadata, isJsonParseError, isJsonRpcId, jsonParseErrorResponse, jsonRpcError, jsonRpcErrorFromCode, jsonRpcResult, parseJsonRpcRequest, runWorker, sequelize };
1205
+ 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, PageModel, PageTypes, PagesController, PermissionModel, PermissionsController, ProfileController, 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, WORKER_METADATA, Worker, assertValidMcpToolDefinition, canFactory, discoverMcpTools, discoverWorkers, getMcpToolMetadata, getWorkerMetadata, isJsonParseError, isJsonRpcId, jsonParseErrorResponse, jsonRpcError, jsonRpcErrorFromCode, jsonRpcResult, parseJsonRpcRequest, runWorker, sequelize };
1200
1206
  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, WorkerCliRequest, WorkerDeclaration, WorkerHandler, WorkerHandlerResult, WorkerMetadata, WorkerRegistered };