diff --git a/dist/Interfaces/Notary/Document.d.ts b/dist/Interfaces/Notary/Document.d.ts index 783f227..4696b65 100644 --- a/dist/Interfaces/Notary/Document.d.ts +++ b/dist/Interfaces/Notary/Document.d.ts @@ -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; } diff --git a/dist/Interfaces/Notary/Document.js b/dist/Interfaces/Notary/Document.js index 849a0f5..5835ea1 100644 --- a/dist/Interfaces/Notary/Document.js +++ b/dist/Interfaces/Notary/Document.js @@ -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 = {})); diff --git a/dist/Interfaces/Notary/Office.d.ts b/dist/Interfaces/Notary/Office.d.ts index b2d90a1..0ce9946 100644 --- a/dist/Interfaces/Notary/Office.d.ts +++ b/dist/Interfaces/Notary/Office.d.ts @@ -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", diff --git a/src/Interfaces/Admin/Address.ts b/src/Interfaces/Admin/Address.ts index 317c6a3..4c7913a 100644 --- a/src/Interfaces/Admin/Address.ts +++ b/src/Interfaces/Admin/Address.ts @@ -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 {} } diff --git a/src/Interfaces/Admin/Contact.ts b/src/Interfaces/Admin/Contact.ts index c6e022a..aa19c21 100644 --- a/src/Interfaces/Admin/Contact.ts +++ b/src/Interfaces/Admin/Contact.ts @@ -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 {} } diff --git a/src/Interfaces/Admin/Customer.ts b/src/Interfaces/Admin/Customer.ts index 8503f54..5cc1729 100644 --- a/src/Interfaces/Admin/Customer.ts +++ b/src/Interfaces/Admin/Customer.ts @@ -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 {} } diff --git a/src/Interfaces/Admin/Deed.ts b/src/Interfaces/Admin/Deed.ts index c1a3bf5..848a8ca 100644 --- a/src/Interfaces/Admin/Deed.ts +++ b/src/Interfaces/Admin/Deed.ts @@ -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 {} } diff --git a/src/Interfaces/Admin/DeedHasDocumentType.ts b/src/Interfaces/Admin/DeedHasDocumentType.ts index ed47935..53e3a87 100644 --- a/src/Interfaces/Admin/DeedHasDocumentType.ts +++ b/src/Interfaces/Admin/DeedHasDocumentType.ts @@ -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 {} } diff --git a/src/Interfaces/Admin/DeedType.ts b/src/Interfaces/Admin/DeedType.ts index 0e3adba..b6f668e 100644 --- a/src/Interfaces/Admin/DeedType.ts +++ b/src/Interfaces/Admin/DeedType.ts @@ -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 {} } diff --git a/src/Interfaces/Admin/DeedTypeHasDocumentType.ts b/src/Interfaces/Admin/DeedTypeHasDocumentType.ts index 9a4ae3d..b84d24d 100644 --- a/src/Interfaces/Admin/DeedTypeHasDocumentType.ts +++ b/src/Interfaces/Admin/DeedTypeHasDocumentType.ts @@ -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 {} } diff --git a/src/Interfaces/Admin/Document.ts b/src/Interfaces/Admin/Document.ts index 2647b8b..e6a8e90 100644 --- a/src/Interfaces/Admin/Document.ts +++ b/src/Interfaces/Admin/Document.ts @@ -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 {} } diff --git a/src/Interfaces/Admin/DocumentHistory.ts b/src/Interfaces/Admin/DocumentHistory.ts index 1873a91..53d1924 100644 --- a/src/Interfaces/Admin/DocumentHistory.ts +++ b/src/Interfaces/Admin/DocumentHistory.ts @@ -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 {} } diff --git a/src/Interfaces/Admin/DocumentType.ts b/src/Interfaces/Admin/DocumentType.ts index 51cf965..174b878 100644 --- a/src/Interfaces/Admin/DocumentType.ts +++ b/src/Interfaces/Admin/DocumentType.ts @@ -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 {} } diff --git a/src/Interfaces/Admin/File.ts b/src/Interfaces/Admin/File.ts index bfe7ff2..29f3ccb 100644 --- a/src/Interfaces/Admin/File.ts +++ b/src/Interfaces/Admin/File.ts @@ -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 {} } diff --git a/src/Interfaces/Admin/Notification.ts b/src/Interfaces/Admin/Notification.ts index e694f68..45d9e74 100644 --- a/src/Interfaces/Admin/Notification.ts +++ b/src/Interfaces/Admin/Notification.ts @@ -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 {} } diff --git a/src/Interfaces/Admin/Office.ts b/src/Interfaces/Admin/Office.ts index 5dc3d05..9d73b13 100644 --- a/src/Interfaces/Admin/Office.ts +++ b/src/Interfaces/Admin/Office.ts @@ -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 {} } diff --git a/src/Interfaces/Admin/OfficeFolder.ts b/src/Interfaces/Admin/OfficeFolder.ts index f54a09a..6161403 100644 --- a/src/Interfaces/Admin/OfficeFolder.ts +++ b/src/Interfaces/Admin/OfficeFolder.ts @@ -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 {} } diff --git a/src/Interfaces/Admin/OfficeFolderHasCustomer.ts b/src/Interfaces/Admin/OfficeFolderHasCustomer.ts index 7609423..b9bf03d 100644 --- a/src/Interfaces/Admin/OfficeFolderHasCustomer.ts +++ b/src/Interfaces/Admin/OfficeFolderHasCustomer.ts @@ -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 {} } diff --git a/src/Interfaces/Admin/OfficeFolderHasStakeholder.ts b/src/Interfaces/Admin/OfficeFolderHasStakeholder.ts index 6099824..da563fd 100644 --- a/src/Interfaces/Admin/OfficeFolderHasStakeholder.ts +++ b/src/Interfaces/Admin/OfficeFolderHasStakeholder.ts @@ -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 {} } diff --git a/src/Interfaces/Admin/User.ts b/src/Interfaces/Admin/User.ts index c882b02..e019b91 100644 --- a/src/Interfaces/Admin/User.ts +++ b/src/Interfaces/Admin/User.ts @@ -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 {} } diff --git a/src/Interfaces/Admin/UserHasNotification.ts b/src/Interfaces/Admin/UserHasNotification.ts index 8c30dee..7bf0e15 100644 --- a/src/Interfaces/Admin/UserHasNotification.ts +++ b/src/Interfaces/Admin/UserHasNotification.ts @@ -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"; } diff --git a/src/Interfaces/Client/Contact.ts b/src/Interfaces/Client/Contact.ts index c6e022a..3ae4578 100644 --- a/src/Interfaces/Client/Contact.ts +++ b/src/Interfaces/Client/Contact.ts @@ -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; } diff --git a/src/Interfaces/Client/Customer.ts b/src/Interfaces/Client/Customer.ts index 8503f54..3583e72 100644 --- a/src/Interfaces/Client/Customer.ts +++ b/src/Interfaces/Client/Customer.ts @@ -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; } diff --git a/src/Interfaces/Client/Document.ts b/src/Interfaces/Client/Document.ts index 2647b8b..07978b4 100644 --- a/src/Interfaces/Client/Document.ts +++ b/src/Interfaces/Client/Document.ts @@ -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; } diff --git a/src/Interfaces/Client/DocumentHistory.ts b/src/Interfaces/Client/DocumentHistory.ts index 1873a91..a4cd333 100644 --- a/src/Interfaces/Client/DocumentHistory.ts +++ b/src/Interfaces/Client/DocumentHistory.ts @@ -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 { diff --git a/src/Interfaces/Client/Office.ts b/src/Interfaces/Client/Office.ts index 5dc3d05..632b0a9 100644 --- a/src/Interfaces/Client/Office.ts +++ b/src/Interfaces/Client/Office.ts @@ -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; } diff --git a/src/Interfaces/Client/OfficeFolder.ts b/src/Interfaces/Client/OfficeFolder.ts index f54a09a..888b877 100644 --- a/src/Interfaces/Client/OfficeFolder.ts +++ b/src/Interfaces/Client/OfficeFolder.ts @@ -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; + } diff --git a/src/Interfaces/Notary/Address.ts b/src/Interfaces/Notary/Address.ts index 4120634..4c7913a 100644 --- a/src/Interfaces/Notary/Address.ts +++ b/src/Interfaces/Notary/Address.ts @@ -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 {} } diff --git a/src/Interfaces/Notary/Contact.ts b/src/Interfaces/Notary/Contact.ts index d0df80b..aa19c21 100644 --- a/src/Interfaces/Notary/Contact.ts +++ b/src/Interfaces/Notary/Contact.ts @@ -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 {} } diff --git a/src/Interfaces/Notary/Customer.ts b/src/Interfaces/Notary/Customer.ts index cd01250..5cc1729 100644 --- a/src/Interfaces/Notary/Customer.ts +++ b/src/Interfaces/Notary/Customer.ts @@ -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 {} } diff --git a/src/Interfaces/Notary/Deed.ts b/src/Interfaces/Notary/Deed.ts index c1a3bf5..848a8ca 100644 --- a/src/Interfaces/Notary/Deed.ts +++ b/src/Interfaces/Notary/Deed.ts @@ -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 {} } diff --git a/src/Interfaces/Notary/DeedHasDocumentType.ts b/src/Interfaces/Notary/DeedHasDocumentType.ts index ed47935..53e3a87 100644 --- a/src/Interfaces/Notary/DeedHasDocumentType.ts +++ b/src/Interfaces/Notary/DeedHasDocumentType.ts @@ -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 {} } diff --git a/src/Interfaces/Notary/DeedType.ts b/src/Interfaces/Notary/DeedType.ts index 0e3adba..b6f668e 100644 --- a/src/Interfaces/Notary/DeedType.ts +++ b/src/Interfaces/Notary/DeedType.ts @@ -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 {} } diff --git a/src/Interfaces/Notary/DeedTypeHasDocumentType.ts b/src/Interfaces/Notary/DeedTypeHasDocumentType.ts index 9a4ae3d..b84d24d 100644 --- a/src/Interfaces/Notary/DeedTypeHasDocumentType.ts +++ b/src/Interfaces/Notary/DeedTypeHasDocumentType.ts @@ -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 {} } diff --git a/src/Interfaces/Notary/Document.ts b/src/Interfaces/Notary/Document.ts index 2f21c59..e6a8e90 100644 --- a/src/Interfaces/Notary/Document.ts +++ b/src/Interfaces/Notary/Document.ts @@ -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 {} } diff --git a/src/Interfaces/Notary/DocumentHistory.ts b/src/Interfaces/Notary/DocumentHistory.ts index f13d53a..53d1924 100644 --- a/src/Interfaces/Notary/DocumentHistory.ts +++ b/src/Interfaces/Notary/DocumentHistory.ts @@ -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 {} } diff --git a/src/Interfaces/Notary/DocumentType.ts b/src/Interfaces/Notary/DocumentType.ts index 51cf965..174b878 100644 --- a/src/Interfaces/Notary/DocumentType.ts +++ b/src/Interfaces/Notary/DocumentType.ts @@ -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 {} } diff --git a/src/Interfaces/Notary/File.ts b/src/Interfaces/Notary/File.ts index bfe7ff2..29f3ccb 100644 --- a/src/Interfaces/Notary/File.ts +++ b/src/Interfaces/Notary/File.ts @@ -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 {} } diff --git a/src/Interfaces/Notary/Notification.ts b/src/Interfaces/Notary/Notification.ts index e694f68..45d9e74 100644 --- a/src/Interfaces/Notary/Notification.ts +++ b/src/Interfaces/Notary/Notification.ts @@ -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 {} } diff --git a/src/Interfaces/Notary/Office.ts b/src/Interfaces/Notary/Office.ts index b27f06b..9d73b13 100644 --- a/src/Interfaces/Notary/Office.ts +++ b/src/Interfaces/Notary/Office.ts @@ -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 {} } diff --git a/src/Interfaces/Notary/OfficeFolder.ts b/src/Interfaces/Notary/OfficeFolder.ts index 9e38247..6161403 100644 --- a/src/Interfaces/Notary/OfficeFolder.ts +++ b/src/Interfaces/Notary/OfficeFolder.ts @@ -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 {} } diff --git a/src/Interfaces/Notary/OfficeFolderHasCustomer.ts b/src/Interfaces/Notary/OfficeFolderHasCustomer.ts index 7609423..b9bf03d 100644 --- a/src/Interfaces/Notary/OfficeFolderHasCustomer.ts +++ b/src/Interfaces/Notary/OfficeFolderHasCustomer.ts @@ -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 {} } diff --git a/src/Interfaces/Notary/OfficeFolderHasStakeholder.ts b/src/Interfaces/Notary/OfficeFolderHasStakeholder.ts index 6099824..da563fd 100644 --- a/src/Interfaces/Notary/OfficeFolderHasStakeholder.ts +++ b/src/Interfaces/Notary/OfficeFolderHasStakeholder.ts @@ -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 {} } diff --git a/src/Interfaces/Notary/User.ts b/src/Interfaces/Notary/User.ts index c882b02..e019b91 100644 --- a/src/Interfaces/Notary/User.ts +++ b/src/Interfaces/Notary/User.ts @@ -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 {} } diff --git a/src/Interfaces/Notary/UserHasNotification.ts b/src/Interfaces/Notary/UserHasNotification.ts index 62d0374..7bf0e15 100644 --- a/src/Interfaces/Notary/UserHasNotification.ts +++ b/src/Interfaces/Notary/UserHasNotification.ts @@ -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 { } } diff --git a/src/Interfaces/SuperAdmin/Address.ts b/src/Interfaces/SuperAdmin/Address.ts index 4120634..4c7913a 100644 --- a/src/Interfaces/SuperAdmin/Address.ts +++ b/src/Interfaces/SuperAdmin/Address.ts @@ -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 {} } diff --git a/src/Interfaces/SuperAdmin/Contact.ts b/src/Interfaces/SuperAdmin/Contact.ts index c6e022a..aa19c21 100644 --- a/src/Interfaces/SuperAdmin/Contact.ts +++ b/src/Interfaces/SuperAdmin/Contact.ts @@ -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 {} } diff --git a/src/Interfaces/SuperAdmin/Customer.ts b/src/Interfaces/SuperAdmin/Customer.ts index 8503f54..5cc1729 100644 --- a/src/Interfaces/SuperAdmin/Customer.ts +++ b/src/Interfaces/SuperAdmin/Customer.ts @@ -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 {} } diff --git a/src/Interfaces/SuperAdmin/Deed.ts b/src/Interfaces/SuperAdmin/Deed.ts index c1a3bf5..848a8ca 100644 --- a/src/Interfaces/SuperAdmin/Deed.ts +++ b/src/Interfaces/SuperAdmin/Deed.ts @@ -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 {} } diff --git a/src/Interfaces/SuperAdmin/DeedHasDocumentType.ts b/src/Interfaces/SuperAdmin/DeedHasDocumentType.ts index ed47935..53e3a87 100644 --- a/src/Interfaces/SuperAdmin/DeedHasDocumentType.ts +++ b/src/Interfaces/SuperAdmin/DeedHasDocumentType.ts @@ -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 {} } diff --git a/src/Interfaces/SuperAdmin/DeedType.ts b/src/Interfaces/SuperAdmin/DeedType.ts index 0e3adba..b6f668e 100644 --- a/src/Interfaces/SuperAdmin/DeedType.ts +++ b/src/Interfaces/SuperAdmin/DeedType.ts @@ -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 {} } diff --git a/src/Interfaces/SuperAdmin/DeedTypeHasDocumentType.ts b/src/Interfaces/SuperAdmin/DeedTypeHasDocumentType.ts index 9a4ae3d..b84d24d 100644 --- a/src/Interfaces/SuperAdmin/DeedTypeHasDocumentType.ts +++ b/src/Interfaces/SuperAdmin/DeedTypeHasDocumentType.ts @@ -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 {} } diff --git a/src/Interfaces/SuperAdmin/Document.ts b/src/Interfaces/SuperAdmin/Document.ts index 2647b8b..e6a8e90 100644 --- a/src/Interfaces/SuperAdmin/Document.ts +++ b/src/Interfaces/SuperAdmin/Document.ts @@ -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 {} } diff --git a/src/Interfaces/SuperAdmin/DocumentHistory.ts b/src/Interfaces/SuperAdmin/DocumentHistory.ts index 1873a91..53d1924 100644 --- a/src/Interfaces/SuperAdmin/DocumentHistory.ts +++ b/src/Interfaces/SuperAdmin/DocumentHistory.ts @@ -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 {} } diff --git a/src/Interfaces/SuperAdmin/DocumentType.ts b/src/Interfaces/SuperAdmin/DocumentType.ts index 51cf965..174b878 100644 --- a/src/Interfaces/SuperAdmin/DocumentType.ts +++ b/src/Interfaces/SuperAdmin/DocumentType.ts @@ -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 {} } diff --git a/src/Interfaces/SuperAdmin/File.ts b/src/Interfaces/SuperAdmin/File.ts index bfe7ff2..29f3ccb 100644 --- a/src/Interfaces/SuperAdmin/File.ts +++ b/src/Interfaces/SuperAdmin/File.ts @@ -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 {} } diff --git a/src/Interfaces/SuperAdmin/IBlockchainAnchors.ts b/src/Interfaces/SuperAdmin/IBlockchainAnchors.ts deleted file mode 100644 index a9ccf86..0000000 --- a/src/Interfaces/SuperAdmin/IBlockchainAnchors.ts +++ /dev/null @@ -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[]; -} diff --git a/src/Interfaces/SuperAdmin/Notification.ts b/src/Interfaces/SuperAdmin/Notification.ts index e694f68..45d9e74 100644 --- a/src/Interfaces/SuperAdmin/Notification.ts +++ b/src/Interfaces/SuperAdmin/Notification.ts @@ -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 {} } diff --git a/src/Interfaces/SuperAdmin/Office.ts b/src/Interfaces/SuperAdmin/Office.ts index 5dc3d05..9d73b13 100644 --- a/src/Interfaces/SuperAdmin/Office.ts +++ b/src/Interfaces/SuperAdmin/Office.ts @@ -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 {} } diff --git a/src/Interfaces/SuperAdmin/OfficeFolder.ts b/src/Interfaces/SuperAdmin/OfficeFolder.ts index f54a09a..6161403 100644 --- a/src/Interfaces/SuperAdmin/OfficeFolder.ts +++ b/src/Interfaces/SuperAdmin/OfficeFolder.ts @@ -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 {} } diff --git a/src/Interfaces/SuperAdmin/OfficeFolderHasCustomer.ts b/src/Interfaces/SuperAdmin/OfficeFolderHasCustomer.ts index 7609423..b9bf03d 100644 --- a/src/Interfaces/SuperAdmin/OfficeFolderHasCustomer.ts +++ b/src/Interfaces/SuperAdmin/OfficeFolderHasCustomer.ts @@ -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 {} } diff --git a/src/Interfaces/SuperAdmin/OfficeFolderHasStakeholder.ts b/src/Interfaces/SuperAdmin/OfficeFolderHasStakeholder.ts index 6099824..da563fd 100644 --- a/src/Interfaces/SuperAdmin/OfficeFolderHasStakeholder.ts +++ b/src/Interfaces/SuperAdmin/OfficeFolderHasStakeholder.ts @@ -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 {} } diff --git a/src/Interfaces/SuperAdmin/User.ts b/src/Interfaces/SuperAdmin/User.ts index c882b02..e019b91 100644 --- a/src/Interfaces/SuperAdmin/User.ts +++ b/src/Interfaces/SuperAdmin/User.ts @@ -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 {} } diff --git a/src/Interfaces/SuperAdmin/UserHasNotification.ts b/src/Interfaces/SuperAdmin/UserHasNotification.ts index 8c30dee..7bf0e15 100644 --- a/src/Interfaces/SuperAdmin/UserHasNotification.ts +++ b/src/Interfaces/SuperAdmin/UserHasNotification.ts @@ -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"; } diff --git a/src/index.ts b/src/index.ts index 1e1627b..1f1e709 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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