121 lines
2.6 KiB
TypeScript
Executable File
121 lines
2.6 KiB
TypeScript
Executable File
export interface IProcess {
|
|
id: number;
|
|
name: string;
|
|
description: string;
|
|
icon?: string;
|
|
zoneList: IZone[];
|
|
}
|
|
|
|
export interface IZone {
|
|
id: number;
|
|
name: string;
|
|
path: string;
|
|
// Est-ce que la zone a besoin d'une icone ?
|
|
icon?: string;
|
|
}
|
|
|
|
export interface INotification {
|
|
id: number;
|
|
title: string;
|
|
description: string;
|
|
sendToNotificationPage?: boolean;
|
|
path?: string;
|
|
}
|
|
|
|
export enum MessageType {
|
|
LISTENING = 'LISTENING',
|
|
GET_PAIRING_ID = 'GET_PAIRING_ID',
|
|
REQUEST_LINK = 'REQUEST_LINK',
|
|
LINK_ACCEPTED = 'LINK_ACCEPTED',
|
|
CREATE_PROCESS = 'CREATE_PROCESS',
|
|
CREATE_PROFILE = 'CREATE_PROFILE',
|
|
PROFILE_CREATED = 'PROFILE_CREATED',
|
|
GET_PROCESSES = 'GET_PROCESSES',
|
|
GET_MY_PROCESSES = 'GET_MY_PROCESSES',
|
|
PROCESSES_RETRIEVED = 'PROCESSES_RETRIEVED',
|
|
CREATE_FOLDER = 'CREATE_FOLDER',
|
|
FOLDER_CREATED = 'FOLDER_CREATED',
|
|
RETRIEVE_DATA = 'RETRIEVE_DATA',
|
|
DATA_RETRIEVED = 'DATA_RETRIEVED',
|
|
ERROR = 'ERROR',
|
|
VALIDATE_TOKEN = 'VALIDATE_TOKEN',
|
|
RENEW_TOKEN = 'RENEW_TOKEN',
|
|
}
|
|
|
|
export interface ProfileData {
|
|
name: string;
|
|
surname: string;
|
|
email: string;
|
|
phone: string;
|
|
address: string;
|
|
postalCode: string;
|
|
city: string;
|
|
country: string;
|
|
idDocument?: string;
|
|
}
|
|
|
|
export interface RequestLinkMessage {
|
|
type: MessageType.REQUEST_LINK;
|
|
}
|
|
|
|
export interface LinkAcceptedMessage {
|
|
type: MessageType.LINK_ACCEPTED;
|
|
accessToken: string;
|
|
refreshToken: string;
|
|
}
|
|
|
|
export interface ProcessRetrievedMessage {
|
|
type: MessageType.PROCESSES_RETRIEVED;
|
|
processes: string; // Serialization of Record<string, Process>
|
|
token: string;
|
|
}
|
|
|
|
export interface ProfileMessage {
|
|
type: MessageType.CREATE_PROFILE;
|
|
data: ProfileData;
|
|
accessToken: string;
|
|
refreshToken: string;
|
|
}
|
|
|
|
export interface FolderData {
|
|
folderNumber: string;
|
|
name: string;
|
|
deedType: string;
|
|
description: string;
|
|
archived_description: string;
|
|
status: string;
|
|
created_at: string;
|
|
updated_at: string;
|
|
customers: string[];
|
|
documents: string[];
|
|
motes: string[];
|
|
stakeholders: string[];
|
|
}
|
|
|
|
export interface FolderMessage {
|
|
type: MessageType.CREATE_FOLDER;
|
|
data: FolderData;
|
|
token: string;
|
|
}
|
|
|
|
export interface RetrieveMessage {
|
|
type: MessageType.RETRIEVE_DATA;
|
|
processId: string,
|
|
stateId: string,
|
|
token: string;
|
|
}
|
|
|
|
export interface DecryptedDataMessage {
|
|
type: MessageType.DATA_RETRIEVED;
|
|
data: string,
|
|
token: string;
|
|
}
|
|
|
|
export interface TokenData {
|
|
token: string;
|
|
origin: string;
|
|
expiration: number;
|
|
createdAt: number;
|
|
}
|
|
|