initialize interfaces package
This commit is contained in:
@@ -0,0 +1,131 @@
|
||||
import * as data from '../data/index.js';
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
export interface IReq_GetOrganizationById
|
||||
extends plugins.typedRequestInterfaces.implementsTR<
|
||||
plugins.typedRequestInterfaces.ITypedRequest,
|
||||
IReq_GetOrganizationById
|
||||
> {
|
||||
method: 'getOrganizationById';
|
||||
request: {
|
||||
jwt: string;
|
||||
id: string;
|
||||
};
|
||||
response: {
|
||||
organization: data.IOrganization;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_CreateOrganization
|
||||
extends plugins.typedRequestInterfaces.implementsTR<
|
||||
plugins.typedRequestInterfaces.ITypedRequest,
|
||||
IReq_CreateOrganization
|
||||
> {
|
||||
method: 'createOrganization';
|
||||
request: {
|
||||
jwt: string;
|
||||
userId: string;
|
||||
organizationName: string;
|
||||
organizationSlug: string;
|
||||
action: 'checkAvailability' | 'manifest';
|
||||
};
|
||||
response: {
|
||||
nameAvailable: boolean;
|
||||
resultingOrganization?: data.IOrganization;
|
||||
role?: data.IRole;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_UpdateOrganization
|
||||
extends plugins.typedRequestInterfaces.implementsTR<
|
||||
plugins.typedRequestInterfaces.ITypedRequest,
|
||||
IReq_UpdateOrganization
|
||||
> {
|
||||
method: 'updateOrganization';
|
||||
request: {
|
||||
jwt: string;
|
||||
organizationId: string;
|
||||
name?: string;
|
||||
slug?: string;
|
||||
confirmationText: string;
|
||||
};
|
||||
response: {
|
||||
success: boolean;
|
||||
organization: data.IOrganization;
|
||||
message?: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_DeleteOrganization
|
||||
extends plugins.typedRequestInterfaces.implementsTR<
|
||||
plugins.typedRequestInterfaces.ITypedRequest,
|
||||
IReq_DeleteOrganization
|
||||
> {
|
||||
method: 'deleteOrganization';
|
||||
request: {
|
||||
jwt: string;
|
||||
organizationId: string;
|
||||
confirmationText: string;
|
||||
};
|
||||
response: {
|
||||
success: boolean;
|
||||
deletedOrganizationId: string;
|
||||
message?: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_GetOrgRoleDefinitions
|
||||
extends plugins.typedRequestInterfaces.implementsTR<
|
||||
plugins.typedRequestInterfaces.ITypedRequest,
|
||||
IReq_GetOrgRoleDefinitions
|
||||
> {
|
||||
method: 'getOrgRoleDefinitions';
|
||||
request: {
|
||||
jwt: string;
|
||||
organizationId: string;
|
||||
};
|
||||
response: {
|
||||
roleDefinitions: data.IOrgRoleDefinition[];
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_UpsertOrgRoleDefinition
|
||||
extends plugins.typedRequestInterfaces.implementsTR<
|
||||
plugins.typedRequestInterfaces.ITypedRequest,
|
||||
IReq_UpsertOrgRoleDefinition
|
||||
> {
|
||||
method: 'upsertOrgRoleDefinition';
|
||||
request: {
|
||||
jwt: string;
|
||||
organizationId: string;
|
||||
roleDefinition: {
|
||||
key: string;
|
||||
name: string;
|
||||
description?: string;
|
||||
};
|
||||
};
|
||||
response: {
|
||||
success: boolean;
|
||||
roleDefinitions: data.IOrgRoleDefinition[];
|
||||
message?: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_DeleteOrgRoleDefinition
|
||||
extends plugins.typedRequestInterfaces.implementsTR<
|
||||
plugins.typedRequestInterfaces.ITypedRequest,
|
||||
IReq_DeleteOrgRoleDefinition
|
||||
> {
|
||||
method: 'deleteOrgRoleDefinition';
|
||||
request: {
|
||||
jwt: string;
|
||||
organizationId: string;
|
||||
roleKey: string;
|
||||
confirmationText: string;
|
||||
};
|
||||
response: {
|
||||
success: boolean;
|
||||
roleDefinitions: data.IOrgRoleDefinition[];
|
||||
message?: string;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user