feat(opsserver,web): replace the Angular UI and REST management layer with a TypedRequest-based ops server and bundled web frontend
This commit is contained in:
115
ts_interfaces/requests/users.ts
Normal file
115
ts_interfaces/requests/users.ts
Normal file
@@ -0,0 +1,115 @@
|
||||
import * as plugins from '../plugins.ts';
|
||||
import * as data from '../data/index.ts';
|
||||
|
||||
// ============================================================================
|
||||
// User Requests
|
||||
// ============================================================================
|
||||
|
||||
export interface IReq_GetUsers extends
|
||||
plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_GetUsers
|
||||
> {
|
||||
method: 'getUsers';
|
||||
request: {
|
||||
identity: data.IIdentity;
|
||||
};
|
||||
response: {
|
||||
users: data.IUser[];
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_GetUser extends
|
||||
plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_GetUser
|
||||
> {
|
||||
method: 'getUser';
|
||||
request: {
|
||||
identity: data.IIdentity;
|
||||
userId: string;
|
||||
};
|
||||
response: {
|
||||
user: data.IUser;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_UpdateUser extends
|
||||
plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_UpdateUser
|
||||
> {
|
||||
method: 'updateUser';
|
||||
request: {
|
||||
identity: data.IIdentity;
|
||||
userId: string;
|
||||
displayName?: string;
|
||||
avatarUrl?: string;
|
||||
password?: string;
|
||||
isActive?: boolean;
|
||||
isSystemAdmin?: boolean;
|
||||
};
|
||||
response: {
|
||||
user: data.IUser;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_GetUserSessions extends
|
||||
plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_GetUserSessions
|
||||
> {
|
||||
method: 'getUserSessions';
|
||||
request: {
|
||||
identity: data.IIdentity;
|
||||
};
|
||||
response: {
|
||||
sessions: data.ISession[];
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_RevokeSession extends
|
||||
plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_RevokeSession
|
||||
> {
|
||||
method: 'revokeSession';
|
||||
request: {
|
||||
identity: data.IIdentity;
|
||||
sessionId: string;
|
||||
};
|
||||
response: {
|
||||
message: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_ChangePassword extends
|
||||
plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_ChangePassword
|
||||
> {
|
||||
method: 'changePassword';
|
||||
request: {
|
||||
identity: data.IIdentity;
|
||||
currentPassword: string;
|
||||
newPassword: string;
|
||||
};
|
||||
response: {
|
||||
message: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_DeleteAccount extends
|
||||
plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_DeleteAccount
|
||||
> {
|
||||
method: 'deleteAccount';
|
||||
request: {
|
||||
identity: data.IIdentity;
|
||||
password: string;
|
||||
};
|
||||
response: {
|
||||
message: string;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user