UNPKG

@m-ld/gateway

Version:

m-ld gateway for services

20 lines (19 loc) 838 B
import { EndPoint, HasContext } from './EndPoint.js'; import { ApiEndPoint } from './ApiEndPoint.js'; import { Notifier } from '../server/index.js'; import { Request, Response } from 'restify'; export type UserRequest = Request & HasContext<'user', string>; export declare class UserEndPoint extends EndPoint<ApiEndPoint> { private notifier; constructor(outer: ApiEndPoint, notifier: Notifier); get gateway(): import("../server/Gateway.js").Gateway; bindUser(req: UserRequest): void; /** * Root can create an account with a key. * User can get a new key for themselves. */ getKey(req: UserRequest, res: Response): Promise<void>; getActivation(req: UserRequest, res: Response): Promise<void>; updateDetails(req: UserRequest, res: Response): Promise<void>; private getAuthorisedAccount; }