♻️ refacto index interfaces extends of Client interfaces

This commit is contained in:
Hugo Lextrait 2023-03-23 16:45:41 +01:00
parent e199733ec6
commit de86dc49c4
65 changed files with 202 additions and 1527 deletions

View File

@ -15,5 +15,12 @@ export declare namespace Document {
files?: File.IFile[];
document_history?: DocumentHistory.IDocumentHistory[];
}
type EDocumentStatus = "ASKED" | "DEPOSITED" | "VALIDATED" | "ANCHORED" | "REFUSED";
enum EDocumentStatus {
ASKED = "ASKED",
DEPOSITED = "DEPOSITED",
VALIDATED = "VALIDATED",
ANCHORED = "ANCHORED",
REFUSED = "REFUSED"
}
type TDocumentStatus = EDocumentStatus.ASKED | EDocumentStatus.DEPOSITED | EDocumentStatus.VALIDATED | EDocumentStatus.ANCHORED | EDocumentStatus.REFUSED;
}

View File

@ -59,4 +59,12 @@ var Document;
__metadata("design:type", Array)
], IDocument.prototype, "document_history", void 0);
Document.IDocument = IDocument;
let EDocumentStatus;
(function (EDocumentStatus) {
EDocumentStatus["ASKED"] = "ASKED";
EDocumentStatus["DEPOSITED"] = "DEPOSITED";
EDocumentStatus["VALIDATED"] = "VALIDATED";
EDocumentStatus["ANCHORED"] = "ANCHORED";
EDocumentStatus["REFUSED"] = "REFUSED";
})(EDocumentStatus = Document.EDocumentStatus || (Document.EDocumentStatus = {}));
})(Document = exports.Document || (exports.Document = {}));

View File

@ -15,6 +15,7 @@ export declare namespace Office {
deed_types?: DeedType.IDeedType[];
users?: User.IUser[];
office_folders?: OfficeFolder.IOfficeFolder[];
balbala: string;
}
enum EOfficeStatus {
ACTIVATED = "ACTIVATED",

View File

@ -1,5 +1,6 @@
import { AddressNotary } from "../..";
import { AddressClient } from "../..";
export namespace Address {
export class IAddress extends AddressNotary.IAddress {}
export class IAddress extends AddressClient.IAddress {}
}

View File

@ -1,45 +1,6 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Address } from "./Address";
import { Customer } from "./Customer";
import { User } from "./User";
import { ContactNotary } from "../..";
import { ContactClient } from "../..";
export namespace Contact {
export class IContact {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public first_name!: string;
@IsNotEmpty({ groups: ["create"] })
public last_name!: string;
@IsNotEmpty({ groups: ["create"] })
public email!: string;
@IsOptional()
public phone_number!: string;
@IsOptional()
public cell_phone_number!: string;
@IsNotEmpty({ groups: ["create"] })
public civility!: ContactNotary.ECivility;
@IsNotEmpty({ groups: ["create"] })
public address!: Address.IAddress;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public users?: User.IUser;
@IsOptional()
public customers?: Customer.ICustomer;
}
export class IContact extends ContactClient.IContact {}
}

View File

@ -1,30 +1,5 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Contact } from "./Contact";
import { Document } from "./Document";
import { OfficeFolderHasCustomer } from "./OfficeFolderHasCustomer";
import { CustomerNotary } from "../..";
import { CustomerClient, CustomerNotary } from "../..";
export namespace Customer {
export class ICustomer {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public status!: CustomerNotary.ECustomerStatus;
@IsNotEmpty({ groups: ["create"] })
public contact!: Contact.IContact;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
office_folder_has_customers?: OfficeFolderHasCustomer.IOfficeFolderHasCustomer[];
@IsOptional()
documents?: Document.IDocument[];
}
export class ICustomer extends CustomerClient.ICustomer {}
}

View File

@ -1,25 +1,4 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { DeedType } from "./DeedType";
import { DeedHasDocumentType } from "./DeedHasDocumentType";
import { OfficeFolder } from "./OfficeFolder";
import { DeedClient } from "../..";
export namespace Deed {
export class IDeed {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public deed_type!: DeedType.IDeedType;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public deed_has_document_types?: DeedHasDocumentType.IDeedHasDocumentType[];
@IsOptional()
public office_folder?: OfficeFolder.IOfficeFolder;
}
export class IDeed extends DeedClient.IDeed {}
}

View File

@ -1,21 +1,4 @@
import { IsNotEmpty, IsDate } from "class-validator";
import { Deed } from "./Deed";
import { DocumentType } from "./DocumentType";
import { DeedHasDocumentTypeClient } from "../..";
export namespace DeedHasDocumentType {
export class IDeedHasDocumentType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_type!: DocumentType.IDocumentType;
@IsNotEmpty({ groups: ["create"] })
public deed!: Deed.IDeed;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
export class IDeedHasDocumentType extends DeedHasDocumentTypeClient.IDeedHasDocumentType {}
}

View File

@ -1,36 +1,5 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Deed } from "./Deed";
import { DeedTypeHasDocumentType } from "./DeedTypeHasDocumentType";
import { Office } from "./Office";
import { DeedTypeClient } from "../..";
export namespace DeedType {
export class IDeedType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsNotEmpty({ groups: ["create"] })
public description!: string;
@IsDate()
public archived_at: Date | null = null;
@IsNotEmpty({ groups: ["create"] })
public office!: Office.IOffice;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public deed?: Deed.IDeed[];
@IsOptional()
public deed_type_has_document_types?: DeedTypeHasDocumentType.IDeedTypeHasDocumentType[];
}
export class IDeedType extends DeedTypeClient.IDeedType {}
}

View File

@ -1,22 +1,5 @@
import { IsNotEmpty, IsDate } from "class-validator";
import { DeedType } from "./DeedType";
import { DocumentType } from "./DocumentType";
import { DeedTypeHasDocumentTypeClient } from "../..";
export namespace DeedTypeHasDocumentType {
export class IDeedTypeHasDocumentType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_type!: DocumentType.IDocumentType;
@IsNotEmpty({ groups: ["create"] })
public deed_type!: DeedType.IDeedType;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
export class IDeedTypeHasDocumentType extends DeedTypeHasDocumentTypeClient.IDeedTypeHasDocumentType {}
}

View File

@ -1,38 +1,5 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Customer } from "./Customer";
import { DocumentHistory } from "./DocumentHistory";
import { DocumentType } from "./DocumentType";
import { File } from "./File";
import { OfficeFolder } from "./OfficeFolder";
import { DocumentNotary } from "../..";
import { DocumentClient } from "../..";
export namespace Document {
export class IDocument {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_status!: DocumentNotary.EDocumentStatus;
@IsNotEmpty({ groups: ["create"] })
public document_type!: DocumentType.IDocumentType;
@IsNotEmpty({ groups: ["create"] })
public folder!: OfficeFolder.IOfficeFolder;
@IsNotEmpty({ groups: ["create"] })
public depositor!: Customer.ICustomer;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public files?: File.IFile[];
@IsOptional()
public document_history?: DocumentHistory.IDocumentHistory[];
}
export class IDocument extends DocumentClient.IDocument {}
}

View File

@ -1,24 +1,5 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Document } from "../Notary/Document";
import { DocumentHistoryClient } from "../..";
export namespace DocumentHistory {
export class IDocumentHistory {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_status!: Document.EDocumentStatus;
@IsNotEmpty({ groups: ["create"] })
public document!: Document.IDocument;
@IsOptional()
public refused_reason: string | null = null;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
export class IDocumentHistory extends DocumentHistoryClient.IDocumentHistory {}
}

View File

@ -1,38 +1,5 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { DeedHasDocumentType } from "./DeedHasDocumentType";
import { Document } from "./Document";
import { DeedTypeHasDocumentType } from "./DeedTypeHasDocumentType";
import { DocumentTypeClient } from "../..";
export namespace DocumentType {
export class IDocumentType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsNotEmpty({ groups: ["create"] })
public public_description!: string;
@IsOptional()
public private_description: string | null = null;
@IsDate()
public archived_at: Date | null = null;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public documents?: Document.IDocument[];
@IsOptional()
public deed_has_document_types?: DeedHasDocumentType.IDeedHasDocumentType[];
@IsOptional()
public deed_type_has_document_types?: DeedTypeHasDocumentType.IDeedTypeHasDocumentType[];
}
export class IDocumentType extends DocumentTypeClient.IDocumentType {}
}

View File

@ -1,21 +1,5 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Document } from "./Document";
import { FileClient } from "../..";
export namespace File {
export class IFile {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document!: Document.IDocument;
@IsOptional()
public file_path: string | null = null;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
export class IFile extends FileClient.IFile {}
}

View File

@ -1,25 +1,5 @@
import { IsNotEmpty, IsDate, IsUrl, IsOptional } from "class-validator";
import { UserHasNotification } from "./UserHasNotification";
import { NotificationClient } from "../..";
export namespace Notification {
export class INotification {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public message!: string;
@IsNotEmpty({ groups: ["create"] })
@IsUrl()
public redirection_url!: string;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
user_has_notifications?: UserHasNotification.IUserHasNotification[];
}
export class INotification extends NotificationClient.INotification {}
}

View File

@ -1,43 +1,5 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Address } from "./Address";
import { DeedType } from "./DeedType";
import { OfficeFolder } from "./OfficeFolder";
import { User } from "./User";
import { OfficeNotary } from "../..";
import { OfficeClient } from "../..";
export namespace Office {
export class IOffice {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public idNot!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsNotEmpty({ groups: ["create"] })
public crpcen!: string;
@IsNotEmpty({ groups: ["create"] })
public address!: Address.IAddress;
@IsNotEmpty({ groups: ["create"] })
public office_status!: OfficeNotary.EOfficeStatus;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
deed_types?: DeedType.IDeedType[];
@IsOptional()
users?: User.IUser[];
@IsOptional()
office_folders?: OfficeFolder.IOfficeFolder[];
}
export class IOffice extends OfficeClient.IOffice {}
}

View File

@ -1,50 +1,5 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Deed } from "./Deed";
import { Document } from "./Document";
import { Office } from "./Office";
import { OfficeFolderHasCustomer } from "./OfficeFolderHasCustomer";
import { OfficeFolderHasStakeholder } from "./OfficeFolderHasStakeholder";
import { OfficeFolderNotary } from "../..";
import { OfficeFolderClient } from "../..";
export namespace OfficeFolder {
export class IOfficeFolder {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public folder_number!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsOptional()
public description: string | null = null;
@IsOptional()
public archived_description: string | null = null;
@IsNotEmpty({ groups: ["create"] })
public status!: OfficeFolderNotary.EFolderStatus;
@IsNotEmpty({ groups: ["create"] })
public deed!: Deed.IDeed;
@IsNotEmpty({ groups: ["create"] })
public office!: Office.IOffice;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
office_folder_has_customers?: OfficeFolderHasCustomer.IOfficeFolderHasCustomer[];
@IsOptional()
office_folder_has_stakeholder?: OfficeFolderHasStakeholder.IOfficeFolderHasStakeholder[];
@IsOptional()
documents?: Document.IDocument[];
}
export class IOfficeFolder extends OfficeFolderClient.IOfficeFolder {}
}

View File

@ -1,21 +1,4 @@
import { IsNotEmpty, IsDate } from "class-validator";
import { Customer } from "./Customer";
import { OfficeFolder } from "./OfficeFolder";
import { OfficeFolderHasCustomerClient } from "../..";
export namespace OfficeFolderHasCustomer {
export class IOfficeFolderHasCustomer {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public customer!: Customer.ICustomer;
@IsNotEmpty({ groups: ["create"] })
public office_folder!: OfficeFolder.IOfficeFolder;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
export class IOfficeFolderHasCustomer extends OfficeFolderHasCustomerClient.IOfficeFolderHasCustomer {}
}

View File

@ -1,22 +1,5 @@
import { IsNotEmpty, IsDate } from "class-validator";
import { OfficeFolder } from "./OfficeFolder";
import { User } from "./User";
import { OfficeFolderHasStakeholderClient } from "../..";
export namespace OfficeFolderHasStakeholder {
export class IOfficeFolderHasStakeholder {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public user_stakeholder!: User.IUser;
@IsNotEmpty({ groups: ["create"] })
public office_folder!: OfficeFolder.IOfficeFolder;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
export class IOfficeFolderHasStakeholder extends OfficeFolderHasStakeholderClient.IOfficeFolderHasStakeholder {}
}

View File

@ -1,33 +1,5 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Contact } from "./Contact";
import { Document } from "./Document";
import { Office } from "./Office";
import { OfficeFolderHasStakeholder } from "./OfficeFolderHasStakeholder";
import { UserClient } from "../..";
export namespace User {
export class IUser {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public idNot!: string;
@IsNotEmpty({ groups: ["create"] })
public contact!: Contact.IContact;
@IsNotEmpty({ groups: ["create"] })
public office_membership!: Office.IOffice;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
office_folder_has_stakeholders?: OfficeFolderHasStakeholder.IOfficeFolderHasStakeholder[];
@IsOptional()
documents?: Document.IDocument;
}
export class IUser extends UserClient.IUser {}
}

View File

@ -1,23 +1,6 @@
import { IsNotEmpty, IsDate } from "class-validator";
import { Notification } from "./Notification";
import { User } from "./User";
import { UserHasNotificationClient } from "../..";
export namespace UserHasNotification {
export class IUserHasNotification {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public user!: User.IUser;
@IsNotEmpty({ groups: ["create"] })
public notification!: Notification.INotification;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
export class IUserHasNotification extends UserHasNotificationClient.IUserHasNotification {
}
export type ENotificationStatus = "READ" | "UNREAD";
}

View File

@ -2,7 +2,6 @@ import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Address } from "./Address";
import { Customer } from "./Customer";
import { User } from "./User";
import { ContactNotary } from "../..";
export namespace Contact {
export class IContact {
@ -25,7 +24,7 @@ export namespace Contact {
public cell_phone_number!: string;
@IsNotEmpty({ groups: ["create"] })
public civility!: ContactNotary.ECivility;
public civility!: ECivility;
@IsNotEmpty({ groups: ["create"] })
public address!: Address.IAddress;
@ -42,4 +41,10 @@ export namespace Contact {
@IsOptional()
public customers?: Customer.ICustomer;
}
export enum ECivility {
MALE = "MALE",
FEMALE = "FEMALE",
OTHERS = "OTHERS",
}
export type TCivility = ECivility.MALE | ECivility.FEMALE | ECivility.OTHERS;
}

View File

@ -2,7 +2,6 @@ import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Contact } from "./Contact";
import { Document } from "./Document";
import { OfficeFolderHasCustomer } from "./OfficeFolderHasCustomer";
import { CustomerNotary } from "../..";
export namespace Customer {
export class ICustomer {
@ -10,7 +9,7 @@ export namespace Customer {
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public status!: CustomerNotary.ECustomerStatus;
public status!: ECustomerStatus;
@IsNotEmpty({ groups: ["create"] })
public contact!: Contact.IContact;
@ -27,4 +26,10 @@ export namespace Customer {
@IsOptional()
documents?: Document.IDocument[];
}
export enum ECustomerStatus {
VALIDATED = "VALIDATED",
PENDING = "PENDING",
ERRONED = "ERRONED",
}
export type TCustomerStatus = ECustomerStatus.VALIDATED | ECustomerStatus.PENDING | ECustomerStatus.ERRONED;
}

View File

@ -4,7 +4,6 @@ import { DocumentHistory } from "./DocumentHistory";
import { DocumentType } from "./DocumentType";
import { File } from "./File";
import { OfficeFolder } from "./OfficeFolder";
import { DocumentNotary } from "../..";
export namespace Document {
export class IDocument {
@ -12,7 +11,7 @@ export namespace Document {
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_status!: DocumentNotary.EDocumentStatus;
public document_status!: EDocumentStatus;
@IsNotEmpty({ groups: ["create"] })
public document_type!: DocumentType.IDocumentType;
@ -35,4 +34,18 @@ export namespace Document {
@IsOptional()
public document_history?: DocumentHistory.IDocumentHistory[];
}
export enum EDocumentStatus {
ASKED = "ASKED",
DEPOSITED ="DEPOSITED",
VALIDATED = "VALIDATED",
ANCHORED = "ANCHORED",
REFUSED = "REFUSED",
}
export type TDocumentStatus =
| EDocumentStatus.ASKED
| EDocumentStatus.DEPOSITED
| EDocumentStatus.VALIDATED
| EDocumentStatus.ANCHORED
| EDocumentStatus.REFUSED;
}

View File

@ -1,5 +1,5 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Document } from "../Notary/Document";
import { Document } from "../Client/Document";
export namespace DocumentHistory {
export class IDocumentHistory {

View File

@ -3,7 +3,6 @@ import { Address } from "./Address";
import { DeedType } from "./DeedType";
import { OfficeFolder } from "./OfficeFolder";
import { User } from "./User";
import { OfficeNotary } from "../..";
export namespace Office {
export class IOffice {
@ -23,7 +22,7 @@ export namespace Office {
public address!: Address.IAddress;
@IsNotEmpty({ groups: ["create"] })
public office_status!: OfficeNotary.EOfficeStatus;
public office_status!: EOfficeStatus;
@IsDate()
public created_at: Date | null = null;
@ -40,4 +39,13 @@ export namespace Office {
@IsOptional()
office_folders?: OfficeFolder.IOfficeFolder[];
}
export enum EOfficeStatus {
ACTIVATED = "ACTIVATED",
DESACTIVATED = "DESACTIVATED",
}
export type TOfficeStatus =
| EOfficeStatus.ACTIVATED
| EOfficeStatus.DESACTIVATED;
}

View File

@ -4,7 +4,6 @@ import { Document } from "./Document";
import { Office } from "./Office";
import { OfficeFolderHasCustomer } from "./OfficeFolderHasCustomer";
import { OfficeFolderHasStakeholder } from "./OfficeFolderHasStakeholder";
import { OfficeFolderNotary } from "../..";
export namespace OfficeFolder {
export class IOfficeFolder {
@ -24,7 +23,7 @@ export namespace OfficeFolder {
public archived_description: string | null = null;
@IsNotEmpty({ groups: ["create"] })
public status!: OfficeFolderNotary.EFolderStatus;
public status!: EFolderStatus;
@IsNotEmpty({ groups: ["create"] })
public deed!: Deed.IDeed;
@ -47,4 +46,10 @@ export namespace OfficeFolder {
@IsOptional()
documents?: Document.IDocument[];
}
export enum EFolderStatus {
LIVE = "LIVE",
ARCHIVED = "ARCHIVED",
}
export type TFolderStatus = EFolderStatus.LIVE | EFolderStatus.ARCHIVED;
}

View File

@ -1,31 +1,6 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Contact } from "./Contact";
import { Office } from "./Office";
import { AddressClient } from "../..";
export namespace Address {
export class IAddress {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public address!: string;
@IsNotEmpty({ groups: ["create"] })
public city!: string;
@IsNotEmpty({ groups: ["create"] })
public zip_code!: number;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public office?: Office.IOffice;
@IsOptional()
public contacts?: Contact.IContact;
}
export class IAddress extends AddressClient.IAddress {}
}

View File

@ -1,46 +1,6 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Address } from "./Address";
import { Customer } from "./Customer";
import { User } from "./User";
import { ContactClient } from "../..";
export namespace Contact {
export class IContact {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public first_name!: string;
@IsNotEmpty({ groups: ["create"] })
public last_name!: string;
@IsNotEmpty({ groups: ["create"] })
public email!: string;
@IsOptional()
public phone_number!: string;
@IsOptional()
public cell_phone_number!: string;
@IsNotEmpty({ groups: ["create"] })
public civility!: ECivility;
@IsNotEmpty({ groups: ["create"] })
public address!: Address.IAddress;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public users?: User.IUser;
@IsOptional()
public customers?: Customer.ICustomer;
}
export type ECivility = "MALE" | "FEMALE" | "OTHERS";
export class IContact extends ContactClient.IContact {}
}

View File

@ -1,30 +1,5 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Contact } from "./Contact";
import { Document } from "./Document";
import { OfficeFolderHasCustomer } from "./OfficeFolderHasCustomer";
import { CustomerClient, CustomerNotary } from "../..";
export namespace Customer {
export class ICustomer {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public status!: ECustomerStatus;
@IsNotEmpty({ groups: ["create"] })
public contact!: Contact.IContact;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
office_folder_has_customers?: OfficeFolderHasCustomer.IOfficeFolderHasCustomer[];
@IsOptional()
documents?: Document.IDocument[];
}
export type ECustomerStatus = "VALIDATED" | "PENDING" | "ERRONED";
export class ICustomer extends CustomerClient.ICustomer {}
}

View File

@ -1,25 +1,4 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { DeedType } from "./DeedType";
import { DeedHasDocumentType } from "./DeedHasDocumentType";
import { OfficeFolder } from "./OfficeFolder";
import { DeedClient } from "../..";
export namespace Deed {
export class IDeed {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public deed_type!: DeedType.IDeedType;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public deed_has_document_types?: DeedHasDocumentType.IDeedHasDocumentType[];
@IsOptional()
public office_folder?: OfficeFolder.IOfficeFolder;
}
export class IDeed extends DeedClient.IDeed {}
}

View File

@ -1,21 +1,4 @@
import { IsNotEmpty, IsDate } from "class-validator";
import { Deed } from "./Deed";
import { DocumentType } from "./DocumentType";
import { DeedHasDocumentTypeClient } from "../..";
export namespace DeedHasDocumentType {
export class IDeedHasDocumentType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_type!: DocumentType.IDocumentType;
@IsNotEmpty({ groups: ["create"] })
public deed!: Deed.IDeed;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
export class IDeedHasDocumentType extends DeedHasDocumentTypeClient.IDeedHasDocumentType {}
}

View File

@ -1,36 +1,5 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Deed } from "./Deed";
import { DeedTypeHasDocumentType } from "./DeedTypeHasDocumentType";
import { Office } from "./Office";
import { DeedTypeClient } from "../..";
export namespace DeedType {
export class IDeedType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsNotEmpty({ groups: ["create"] })
public description!: string;
@IsDate()
public archived_at: Date | null = null;
@IsNotEmpty({ groups: ["create"] })
public office!: Office.IOffice;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public deed?: Deed.IDeed[];
@IsOptional()
public deed_type_has_document_types?: DeedTypeHasDocumentType.IDeedTypeHasDocumentType[];
}
export class IDeedType extends DeedTypeClient.IDeedType {}
}

View File

@ -1,22 +1,5 @@
import { IsNotEmpty, IsDate } from "class-validator";
import { DeedType } from "./DeedType";
import { DocumentType } from "./DocumentType";
import { DeedTypeHasDocumentTypeClient } from "../..";
export namespace DeedTypeHasDocumentType {
export class IDeedTypeHasDocumentType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_type!: DocumentType.IDocumentType;
@IsNotEmpty({ groups: ["create"] })
public deed_type!: DeedType.IDeedType;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
export class IDeedTypeHasDocumentType extends DeedTypeHasDocumentTypeClient.IDeedTypeHasDocumentType {}
}

View File

@ -1,43 +1,5 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Customer } from "./Customer";
import { DocumentHistory } from "./DocumentHistory";
import { DocumentType } from "./DocumentType";
import { File } from "./File";
import { OfficeFolder } from "./OfficeFolder";
import { DocumentClient } from "../..";
export namespace Document {
export class IDocument {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_status!: EDocumentStatus;
@IsNotEmpty({ groups: ["create"] })
public document_type!: DocumentType.IDocumentType;
@IsNotEmpty({ groups: ["create"] })
public folder!: OfficeFolder.IOfficeFolder;
@IsNotEmpty({ groups: ["create"] })
public depositor!: Customer.ICustomer;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public files?: File.IFile[];
@IsOptional()
public document_history?: DocumentHistory.IDocumentHistory[];
}
export type EDocumentStatus =
| "ASKED"
| "DEPOSITED"
| "VALIDATED"
| "ANCHORED"
| "REFUSED";
export class IDocument extends DocumentClient.IDocument {}
}

View File

@ -1,24 +1,5 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Document } from "./Document";
import { DocumentHistoryClient } from "../..";
export namespace DocumentHistory {
export class IDocumentHistory {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_status!: Document.EDocumentStatus;
@IsNotEmpty({ groups: ["create"] })
public document!: Document.IDocument;
@IsOptional()
public refused_reason: string | null = null;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
export class IDocumentHistory extends DocumentHistoryClient.IDocumentHistory {}
}

View File

@ -1,38 +1,5 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { DeedHasDocumentType } from "./DeedHasDocumentType";
import { Document } from "./Document";
import { DeedTypeHasDocumentType } from "./DeedTypeHasDocumentType";
import { DocumentTypeClient } from "../..";
export namespace DocumentType {
export class IDocumentType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsNotEmpty({ groups: ["create"] })
public public_description!: string;
@IsOptional()
public private_description: string | null = null;
@IsDate()
public archived_at: Date | null = null;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public documents?: Document.IDocument[];
@IsOptional()
public deed_has_document_types?: DeedHasDocumentType.IDeedHasDocumentType[];
@IsOptional()
public deed_type_has_document_types?: DeedTypeHasDocumentType.IDeedTypeHasDocumentType[];
}
export class IDocumentType extends DocumentTypeClient.IDocumentType {}
}

View File

@ -1,21 +1,5 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Document } from "./Document";
import { FileClient } from "../..";
export namespace File {
export class IFile {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document!: Document.IDocument;
@IsOptional()
public file_path: string | null = null;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
export class IFile extends FileClient.IFile {}
}

View File

@ -1,25 +1,5 @@
import { IsNotEmpty, IsDate, IsUrl, IsOptional } from "class-validator";
import { UserHasNotification } from "./UserHasNotification";
import { NotificationClient } from "../..";
export namespace Notification {
export class INotification {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public message!: string;
@IsNotEmpty({ groups: ["create"] })
@IsUrl()
public redirection_url!: string;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
user_has_notifications?: UserHasNotification.IUserHasNotification[];
}
export class INotification extends NotificationClient.INotification {}
}

View File

@ -1,49 +1,5 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Address } from "./Address";
import { DeedType } from "./DeedType";
import { OfficeFolder } from "./OfficeFolder";
import { User } from "./User";
import { OfficeClient } from "../..";
export namespace Office {
export class IOffice {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public idNot!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsNotEmpty({ groups: ["create"] })
public crpcen!: string;
@IsNotEmpty({ groups: ["create"] })
public address!: Address.IAddress;
@IsNotEmpty({ groups: ["create"] })
public office_status!: EOfficeStatus;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
deed_types?: DeedType.IDeedType[];
@IsOptional()
users?: User.IUser[];
@IsOptional()
office_folders?: OfficeFolder.IOfficeFolder[];
}
export enum EOfficeStatus {
ACTIVATED = "ACTIVATED",
DESACTIVATED = "DESACTIVATED",
}
export type TOfficeStatus =
| EOfficeStatus.ACTIVATED
| EOfficeStatus.DESACTIVATED;
export class IOffice extends OfficeClient.IOffice {}
}

View File

@ -1,50 +1,5 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Deed } from "./Deed";
import { Document } from "./Document";
import { Office } from "./Office";
import { OfficeFolderHasCustomer } from "./OfficeFolderHasCustomer";
import { OfficeFolderHasStakeholder } from "./OfficeFolderHasStakeholder";
import { OfficeFolderClient } from "../..";
export namespace OfficeFolder {
export class IOfficeFolder {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public folder_number!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsOptional()
public description: string | null = null;
@IsOptional()
public archived_description: string | null = null;
@IsNotEmpty({ groups: ["create"] })
public status!: EFolderStatus;
@IsNotEmpty({ groups: ["create"] })
public deed!: Deed.IDeed;
@IsNotEmpty({ groups: ["create"] })
public office!: Office.IOffice;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
office_folder_has_customers?: OfficeFolderHasCustomer.IOfficeFolderHasCustomer[];
@IsOptional()
office_folder_has_stakeholder?: OfficeFolderHasStakeholder.IOfficeFolderHasStakeholder[];
@IsOptional()
documents?: Document.IDocument[];
}
export type EFolderStatus = "LIVE" | "ARCHIVED";
export class IOfficeFolder extends OfficeFolderClient.IOfficeFolder {}
}

View File

@ -1,21 +1,4 @@
import { IsNotEmpty, IsDate } from "class-validator";
import { Customer } from "./Customer";
import { OfficeFolder } from "./OfficeFolder";
import { OfficeFolderHasCustomerClient } from "../..";
export namespace OfficeFolderHasCustomer {
export class IOfficeFolderHasCustomer {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public customer!: Customer.ICustomer;
@IsNotEmpty({ groups: ["create"] })
public office_folder!: OfficeFolder.IOfficeFolder;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
export class IOfficeFolderHasCustomer extends OfficeFolderHasCustomerClient.IOfficeFolderHasCustomer {}
}

View File

@ -1,22 +1,5 @@
import { IsNotEmpty, IsDate } from "class-validator";
import { OfficeFolder } from "./OfficeFolder";
import { User } from "./User";
import { OfficeFolderHasStakeholderClient } from "../..";
export namespace OfficeFolderHasStakeholder {
export class IOfficeFolderHasStakeholder {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public user_stakeholder!: User.IUser;
@IsNotEmpty({ groups: ["create"] })
public office_folder!: OfficeFolder.IOfficeFolder;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
export class IOfficeFolderHasStakeholder extends OfficeFolderHasStakeholderClient.IOfficeFolderHasStakeholder {}
}

View File

@ -1,33 +1,5 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Contact } from "./Contact";
import { Document } from "./Document";
import { Office } from "./Office";
import { OfficeFolderHasStakeholder } from "./OfficeFolderHasStakeholder";
import { UserClient } from "../..";
export namespace User {
export class IUser {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public idNot!: string;
@IsNotEmpty({ groups: ["create"] })
public contact!: Contact.IContact;
@IsNotEmpty({ groups: ["create"] })
public office_membership!: Office.IOffice;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
office_folder_has_stakeholders?: OfficeFolderHasStakeholder.IOfficeFolderHasStakeholder[];
@IsOptional()
documents?: Document.IDocument;
}
export class IUser extends UserClient.IUser {}
}

View File

@ -1,22 +1,6 @@
import { IsNotEmpty, IsDate } from "class-validator";
import { Notification } from "./Notification";
import { User } from "./User";
import { UserHasNotificationClient } from "../..";
export namespace UserHasNotification {
export class IUserHasNotification {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public user!: User.IUser;
@IsNotEmpty({ groups: ["create"] })
public notification!: Notification.INotification;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
export class IUserHasNotification extends UserHasNotificationClient.IUserHasNotification {
}
}

View File

@ -1,31 +1,6 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Contact } from "./Contact";
import { Office } from "./Office";
import { AddressClient } from "../..";
export namespace Address {
export class IAddress {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public address!: string;
@IsNotEmpty({ groups: ["create"] })
public city!: string;
@IsNotEmpty({ groups: ["create"] })
public zip_code!: number;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public office?: Office.IOffice;
@IsOptional()
public contacts?: Contact.IContact;
}
export class IAddress extends AddressClient.IAddress {}
}

View File

@ -1,45 +1,6 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Address } from "./Address";
import { Customer } from "./Customer";
import { User } from "./User";
import { ContactNotary } from "../..";
import { ContactClient } from "../..";
export namespace Contact {
export class IContact {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public first_name!: string;
@IsNotEmpty({ groups: ["create"] })
public last_name!: string;
@IsNotEmpty({ groups: ["create"] })
public email!: string;
@IsOptional()
public phone_number!: string;
@IsOptional()
public cell_phone_number!: string;
@IsNotEmpty({ groups: ["create"] })
public civility!: ContactNotary.ECivility;
@IsNotEmpty({ groups: ["create"] })
public address!: Address.IAddress;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public users?: User.IUser;
@IsOptional()
public customers?: Customer.ICustomer;
}
export class IContact extends ContactClient.IContact {}
}

View File

@ -1,30 +1,5 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Contact } from "./Contact";
import { Document } from "./Document";
import { OfficeFolderHasCustomer } from "./OfficeFolderHasCustomer";
import { CustomerNotary } from "../..";
import { CustomerClient, CustomerNotary } from "../..";
export namespace Customer {
export class ICustomer {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public status!: CustomerNotary.ECustomerStatus;
@IsNotEmpty({ groups: ["create"] })
public contact!: Contact.IContact;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
office_folder_has_customers?: OfficeFolderHasCustomer.IOfficeFolderHasCustomer[];
@IsOptional()
documents?: Document.IDocument[];
}
export class ICustomer extends CustomerClient.ICustomer {}
}

View File

@ -1,25 +1,4 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { DeedType } from "./DeedType";
import { DeedHasDocumentType } from "./DeedHasDocumentType";
import { OfficeFolder } from "./OfficeFolder";
import { DeedClient } from "../..";
export namespace Deed {
export class IDeed {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public deed_type!: DeedType.IDeedType;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public deed_has_document_types?: DeedHasDocumentType.IDeedHasDocumentType[];
@IsOptional()
public office_folder?: OfficeFolder.IOfficeFolder;
}
export class IDeed extends DeedClient.IDeed {}
}

View File

@ -1,21 +1,4 @@
import { IsNotEmpty, IsDate } from "class-validator";
import { Deed } from "./Deed";
import { DocumentType } from "./DocumentType";
import { DeedHasDocumentTypeClient } from "../..";
export namespace DeedHasDocumentType {
export class IDeedHasDocumentType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_type!: DocumentType.IDocumentType;
@IsNotEmpty({ groups: ["create"] })
public deed!: Deed.IDeed;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
export class IDeedHasDocumentType extends DeedHasDocumentTypeClient.IDeedHasDocumentType {}
}

View File

@ -1,36 +1,5 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Deed } from "./Deed";
import { DeedTypeHasDocumentType } from "./DeedTypeHasDocumentType";
import { Office } from "./Office";
import { DeedTypeClient } from "../..";
export namespace DeedType {
export class IDeedType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsNotEmpty({ groups: ["create"] })
public description!: string;
@IsDate()
public archived_at: Date | null = null;
@IsNotEmpty({ groups: ["create"] })
public office!: Office.IOffice;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public deed?: Deed.IDeed[];
@IsOptional()
public deed_type_has_document_types?: DeedTypeHasDocumentType.IDeedTypeHasDocumentType[];
}
export class IDeedType extends DeedTypeClient.IDeedType {}
}

View File

@ -1,22 +1,5 @@
import { IsNotEmpty, IsDate } from "class-validator";
import { DeedType } from "./DeedType";
import { DocumentType } from "./DocumentType";
import { DeedTypeHasDocumentTypeClient } from "../..";
export namespace DeedTypeHasDocumentType {
export class IDeedTypeHasDocumentType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_type!: DocumentType.IDocumentType;
@IsNotEmpty({ groups: ["create"] })
public deed_type!: DeedType.IDeedType;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
export class IDeedTypeHasDocumentType extends DeedTypeHasDocumentTypeClient.IDeedTypeHasDocumentType {}
}

View File

@ -1,38 +1,5 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Customer } from "./Customer";
import { DocumentHistory } from "./DocumentHistory";
import { DocumentType } from "./DocumentType";
import { File } from "./File";
import { OfficeFolder } from "./OfficeFolder";
import { DocumentNotary } from "../..";
import { DocumentClient } from "../..";
export namespace Document {
export class IDocument {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_status!: DocumentNotary.EDocumentStatus;
@IsNotEmpty({ groups: ["create"] })
public document_type!: DocumentType.IDocumentType;
@IsNotEmpty({ groups: ["create"] })
public folder!: OfficeFolder.IOfficeFolder;
@IsNotEmpty({ groups: ["create"] })
public depositor!: Customer.ICustomer;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public files?: File.IFile[];
@IsOptional()
public document_history?: DocumentHistory.IDocumentHistory[];
}
export class IDocument extends DocumentClient.IDocument {}
}

View File

@ -1,24 +1,5 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Document } from "../Notary/Document";
import { DocumentHistoryClient } from "../..";
export namespace DocumentHistory {
export class IDocumentHistory {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_status!: Document.EDocumentStatus;
@IsNotEmpty({ groups: ["create"] })
public document!: Document.IDocument;
@IsOptional()
public refused_reason: string | null = null;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
export class IDocumentHistory extends DocumentHistoryClient.IDocumentHistory {}
}

View File

@ -1,38 +1,5 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { DeedHasDocumentType } from "./DeedHasDocumentType";
import { Document } from "./Document";
import { DeedTypeHasDocumentType } from "./DeedTypeHasDocumentType";
import { DocumentTypeClient } from "../..";
export namespace DocumentType {
export class IDocumentType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsNotEmpty({ groups: ["create"] })
public public_description!: string;
@IsOptional()
public private_description: string | null = null;
@IsDate()
public archived_at: Date | null = null;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public documents?: Document.IDocument[];
@IsOptional()
public deed_has_document_types?: DeedHasDocumentType.IDeedHasDocumentType[];
@IsOptional()
public deed_type_has_document_types?: DeedTypeHasDocumentType.IDeedTypeHasDocumentType[];
}
export class IDocumentType extends DocumentTypeClient.IDocumentType {}
}

View File

@ -1,21 +1,5 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Document } from "./Document";
import { FileClient } from "../..";
export namespace File {
export class IFile {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document!: Document.IDocument;
@IsOptional()
public file_path: string | null = null;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
export class IFile extends FileClient.IFile {}
}

View File

@ -1,19 +0,0 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Document } from "./Document";
export default class IBlockchainAnchor {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public smartSigJobId!: string;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public documents?: Document.IDocument[];
}

View File

@ -1,25 +1,5 @@
import { IsNotEmpty, IsDate, IsUrl, IsOptional } from "class-validator";
import { UserHasNotification } from "./UserHasNotification";
import { NotificationClient } from "../..";
export namespace Notification {
export class INotification {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public message!: string;
@IsNotEmpty({ groups: ["create"] })
@IsUrl()
public redirection_url!: string;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
user_has_notifications?: UserHasNotification.IUserHasNotification[];
}
export class INotification extends NotificationClient.INotification {}
}

View File

@ -1,43 +1,5 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Address } from "./Address";
import { DeedType } from "./DeedType";
import { OfficeFolder } from "./OfficeFolder";
import { User } from "./User";
import { OfficeNotary } from "../..";
import { OfficeClient } from "../..";
export namespace Office {
export class IOffice {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public idNot!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsNotEmpty({ groups: ["create"] })
public crpcen!: string;
@IsNotEmpty({ groups: ["create"] })
public address!: Address.IAddress;
@IsNotEmpty({ groups: ["create"] })
public office_status!: OfficeNotary.EOfficeStatus;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
deed_types?: DeedType.IDeedType[];
@IsOptional()
users?: User.IUser[];
@IsOptional()
office_folders?: OfficeFolder.IOfficeFolder[];
}
export class IOffice extends OfficeClient.IOffice {}
}

View File

@ -1,50 +1,5 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Deed } from "./Deed";
import { Document } from "./Document";
import { Office } from "./Office";
import { OfficeFolderHasCustomer } from "./OfficeFolderHasCustomer";
import { OfficeFolderHasStakeholder } from "./OfficeFolderHasStakeholder";
import { OfficeFolderNotary } from "../..";
import { OfficeFolderClient } from "../..";
export namespace OfficeFolder {
export class IOfficeFolder {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public folder_number!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsOptional()
public description: string | null = null;
@IsOptional()
public archived_description: string | null = null;
@IsNotEmpty({ groups: ["create"] })
public status!: OfficeFolderNotary.EFolderStatus;
@IsNotEmpty({ groups: ["create"] })
public deed!: Deed.IDeed;
@IsNotEmpty({ groups: ["create"] })
public office!: Office.IOffice;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
office_folder_has_customers?: OfficeFolderHasCustomer.IOfficeFolderHasCustomer[];
@IsOptional()
office_folder_has_stakeholder?: OfficeFolderHasStakeholder.IOfficeFolderHasStakeholder[];
@IsOptional()
documents?: Document.IDocument[];
}
export class IOfficeFolder extends OfficeFolderClient.IOfficeFolder {}
}

View File

@ -1,21 +1,4 @@
import { IsNotEmpty, IsDate } from "class-validator";
import { Customer } from "./Customer";
import { OfficeFolder } from "./OfficeFolder";
import { OfficeFolderHasCustomerClient } from "../..";
export namespace OfficeFolderHasCustomer {
export class IOfficeFolderHasCustomer {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public customer!: Customer.ICustomer;
@IsNotEmpty({ groups: ["create"] })
public office_folder!: OfficeFolder.IOfficeFolder;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
export class IOfficeFolderHasCustomer extends OfficeFolderHasCustomerClient.IOfficeFolderHasCustomer {}
}

View File

@ -1,22 +1,5 @@
import { IsNotEmpty, IsDate } from "class-validator";
import { OfficeFolder } from "./OfficeFolder";
import { User } from "./User";
import { OfficeFolderHasStakeholderClient } from "../..";
export namespace OfficeFolderHasStakeholder {
export class IOfficeFolderHasStakeholder {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public user_stakeholder!: User.IUser;
@IsNotEmpty({ groups: ["create"] })
public office_folder!: OfficeFolder.IOfficeFolder;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
export class IOfficeFolderHasStakeholder extends OfficeFolderHasStakeholderClient.IOfficeFolderHasStakeholder {}
}

View File

@ -1,33 +1,5 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Contact } from "./Contact";
import { Document } from "./Document";
import { Office } from "./Office";
import { OfficeFolderHasStakeholder } from "./OfficeFolderHasStakeholder";
import { UserClient } from "../..";
export namespace User {
export class IUser {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public idNot!: string;
@IsNotEmpty({ groups: ["create"] })
public contact!: Contact.IContact;
@IsNotEmpty({ groups: ["create"] })
public office_membership!: Office.IOffice;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
office_folder_has_stakeholders?: OfficeFolderHasStakeholder.IOfficeFolderHasStakeholder[];
@IsOptional()
documents?: Document.IDocument;
}
export class IUser extends UserClient.IUser {}
}

View File

@ -1,23 +1,6 @@
import { IsNotEmpty, IsDate } from "class-validator";
import { Notification } from "./Notification";
import { User } from "./User";
import { UserHasNotificationClient } from "../..";
export namespace UserHasNotification {
export class IUserHasNotification {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public user!: User.IUser;
@IsNotEmpty({ groups: ["create"] })
public notification!: Notification.INotification;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
export class IUserHasNotification extends UserHasNotificationClient.IUserHasNotification {
}
export type ENotificationStatus = "READ" | "UNREAD";
}

View File

@ -1,3 +1,26 @@
/**
* @description Namespace Client
* It contains all the interfaces and namespaces for the Client
*/
export { Address as AddressClient } from "./Interfaces/Client/Address";
export { Contact as ContactClient } from "./Interfaces/Client/Contact";
export { Customer as CustomerClient } from "./Interfaces/Client/Customer";
export { Deed as DeedClient } from "./Interfaces/Client/Deed";
export { DeedHasDocumentType as DeedHasDocumentTypeClient } from "./Interfaces/Client/DeedHasDocumentType";
export { DeedType as DeedTypeClient } from "./Interfaces/Client/DeedType";
export { DeedTypeHasDocumentType as DeedTypeHasDocumentTypeClient } from "./Interfaces/Client/DeedTypeHasDocumentType";
export { Document as DocumentClient } from "./Interfaces/Client/Document";
export { DocumentHistory as DocumentHistoryClient } from "./Interfaces/Client/DocumentHistory";
export { DocumentType as DocumentTypeClient } from "./Interfaces/Client/DocumentType";
export { File as FileClient } from "./Interfaces/Client/File";
export { Notification as NotificationClient } from "./Interfaces/Client/Notification";
export { Office as OfficeClient } from "./Interfaces/Client/Office";
export { OfficeFolder as OfficeFolderClient } from "./Interfaces/Client/OfficeFolder";
export { OfficeFolderHasCustomer as OfficeFolderHasCustomerClient } from "./Interfaces/Client/OfficeFolderHasCustomer";
export { OfficeFolderHasStakeholder as OfficeFolderHasStakeholderClient } from "./Interfaces/Client/OfficeFolderHasStakeholder";
export { User as UserClient } from "./Interfaces/Client/User";
export { UserHasNotification as UserHasNotificationClient } from "./Interfaces/Client/UserHasNotification";
/**
* @description Namespace Notary
* It contains all the interfaces and enums for the user
@ -44,28 +67,6 @@ export { OfficeFolderHasStakeholder as OfficeFolderHasStakeholderAdmin } from ".
export { User as UserAdmin } from "./Interfaces/Admin/User";
export { UserHasNotification as UserHasNotificationAdmin } from "./Interfaces/Admin/UserHasNotification";
/**
* @description Namespace Client
* It contains all the interfaces and namespaces for the Client
*/
export { Address as AddressClient } from "./Interfaces/Client/Address";
export { Contact as ContactClient } from "./Interfaces/Client/Contact";
export { Customer as ClientClient } from "./Interfaces/Client/Customer";
export { Deed as DeedClient } from "./Interfaces/Client/Deed";
export { DeedHasDocumentType as DeedHasDocumentTypeClient } from "./Interfaces/Client/DeedHasDocumentType";
export { DeedType as DeedTypeClient } from "./Interfaces/Client/DeedType";
export { DeedTypeHasDocumentType as DeedTypeHasDocumentTypeClient } from "./Interfaces/Client/DeedTypeHasDocumentType";
export { Document as DocumentClient } from "./Interfaces/Client/Document";
export { DocumentHistory as DocumentHistoryClient } from "./Interfaces/Client/DocumentHistory";
export { DocumentType as DocumentTypeClient } from "./Interfaces/Client/DocumentType";
export { File as FileClient } from "./Interfaces/Client/File";
export { Notification as NotificationClient } from "./Interfaces/Client/Notification";
export { Office as OfficeClient } from "./Interfaces/Client/Office";
export { OfficeFolder as OfficeFolderClient } from "./Interfaces/Client/OfficeFolder";
export { OfficeFolderHasCustomer as OfficeFolderHasClientClient } from "./Interfaces/Client/OfficeFolderHasCustomer";
export { OfficeFolderHasStakeholder as OfficeFolderHasStakeholderClient } from "./Interfaces/Client/OfficeFolderHasStakeholder";
export { User as UserClient } from "./Interfaces/Client/User";
export { UserHasNotification as UserHasNotificationClient } from "./Interfaces/Client/UserHasNotification";
/**
* @description Namespace SuperAdmin