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:
161
ts_interfaces/requests/organizations.ts
Normal file
161
ts_interfaces/requests/organizations.ts
Normal file
@@ -0,0 +1,161 @@
|
||||
import * as plugins from '../plugins.ts';
|
||||
import * as data from '../data/index.ts';
|
||||
|
||||
// ============================================================================
|
||||
// Organization Requests
|
||||
// ============================================================================
|
||||
|
||||
export interface IReq_GetOrganizations extends
|
||||
plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_GetOrganizations
|
||||
> {
|
||||
method: 'getOrganizations';
|
||||
request: {
|
||||
identity: data.IIdentity;
|
||||
};
|
||||
response: {
|
||||
organizations: data.IOrganization[];
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_GetOrganization extends
|
||||
plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_GetOrganization
|
||||
> {
|
||||
method: 'getOrganization';
|
||||
request: {
|
||||
identity: data.IIdentity;
|
||||
organizationId: string;
|
||||
};
|
||||
response: {
|
||||
organization: data.IOrganizationDetail;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_CreateOrganization extends
|
||||
plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_CreateOrganization
|
||||
> {
|
||||
method: 'createOrganization';
|
||||
request: {
|
||||
identity: data.IIdentity;
|
||||
name: string;
|
||||
displayName?: string;
|
||||
description?: string;
|
||||
isPublic?: boolean;
|
||||
};
|
||||
response: {
|
||||
organization: data.IOrganization;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_UpdateOrganization extends
|
||||
plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_UpdateOrganization
|
||||
> {
|
||||
method: 'updateOrganization';
|
||||
request: {
|
||||
identity: data.IIdentity;
|
||||
organizationId: string;
|
||||
displayName?: string;
|
||||
description?: string;
|
||||
avatarUrl?: string;
|
||||
website?: string;
|
||||
isPublic?: boolean;
|
||||
settings?: Partial<data.IOrganizationSettings>;
|
||||
};
|
||||
response: {
|
||||
organization: data.IOrganization;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_DeleteOrganization extends
|
||||
plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_DeleteOrganization
|
||||
> {
|
||||
method: 'deleteOrganization';
|
||||
request: {
|
||||
identity: data.IIdentity;
|
||||
organizationId: string;
|
||||
};
|
||||
response: {
|
||||
message: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_GetOrganizationMembers extends
|
||||
plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_GetOrganizationMembers
|
||||
> {
|
||||
method: 'getOrganizationMembers';
|
||||
request: {
|
||||
identity: data.IIdentity;
|
||||
organizationId: string;
|
||||
};
|
||||
response: {
|
||||
members: data.IOrganizationMember[];
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_AddOrganizationMember extends
|
||||
plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_AddOrganizationMember
|
||||
> {
|
||||
method: 'addOrganizationMember';
|
||||
request: {
|
||||
identity: data.IIdentity;
|
||||
organizationId: string;
|
||||
userId: string;
|
||||
role: data.TOrganizationRole;
|
||||
};
|
||||
response: {
|
||||
member: {
|
||||
userId: string;
|
||||
role: data.TOrganizationRole;
|
||||
addedAt: string;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_UpdateOrganizationMember extends
|
||||
plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_UpdateOrganizationMember
|
||||
> {
|
||||
method: 'updateOrganizationMember';
|
||||
request: {
|
||||
identity: data.IIdentity;
|
||||
organizationId: string;
|
||||
userId: string;
|
||||
role: data.TOrganizationRole;
|
||||
};
|
||||
response: {
|
||||
member: {
|
||||
userId: string;
|
||||
role: data.TOrganizationRole;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_RemoveOrganizationMember extends
|
||||
plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_RemoveOrganizationMember
|
||||
> {
|
||||
method: 'removeOrganizationMember';
|
||||
request: {
|
||||
identity: data.IIdentity;
|
||||
organizationId: string;
|
||||
userId: string;
|
||||
};
|
||||
response: {
|
||||
message: string;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user