diff --git a/frontend/modules/directory/services/dto/address.ts b/frontend/modules/directory/services/dto/address.ts new file mode 100644 index 0000000..f66d3a9 --- /dev/null +++ b/frontend/modules/directory/services/dto/address.ts @@ -0,0 +1,23 @@ +export type Address = { + id: number + '@id'?: string + label: string | null + street: string | null + streetComplement: string | null + postalCode: string | null + city: string | null + country: string + client?: string | null + prospect?: string | null +} + +export type AddressWrite = { + label: string | null + street: string | null + streetComplement: string | null + postalCode: string | null + city: string | null + country: string + client?: string | null + prospect?: string | null +} diff --git a/frontend/modules/directory/services/dto/commercial-report.ts b/frontend/modules/directory/services/dto/commercial-report.ts new file mode 100644 index 0000000..bdfaccc --- /dev/null +++ b/frontend/modules/directory/services/dto/commercial-report.ts @@ -0,0 +1,27 @@ +import type { ReportDocument } from './report-document' + +export type ReportType = 'call' | 'meeting' | 'email' | 'note' + +export type CommercialReport = { + id: number + '@id'?: string + subject: string + body: string | null + occurredAt: string + type: ReportType + author?: { id: number, username: string } | null + client?: string | null + prospect?: string | null + documents?: ReportDocument[] + createdAt?: string + updatedAt?: string +} + +export type CommercialReportWrite = { + subject: string + body: string | null + occurredAt: string + type: ReportType + client?: string | null + prospect?: string | null +} diff --git a/frontend/modules/directory/services/dto/contact.ts b/frontend/modules/directory/services/dto/contact.ts new file mode 100644 index 0000000..eead371 --- /dev/null +++ b/frontend/modules/directory/services/dto/contact.ts @@ -0,0 +1,23 @@ +export type Contact = { + id: number + '@id'?: string + firstName: string | null + lastName: string | null + jobTitle: string | null + email: string | null + phonePrimary: string | null + phoneSecondary: string | null + client?: string | null + prospect?: string | null +} + +export type ContactWrite = { + firstName: string | null + lastName: string | null + jobTitle: string | null + email: string | null + phonePrimary: string | null + phoneSecondary: string | null + client?: string | null + prospect?: string | null +} diff --git a/frontend/modules/directory/services/dto/report-document.ts b/frontend/modules/directory/services/dto/report-document.ts new file mode 100644 index 0000000..c97100c --- /dev/null +++ b/frontend/modules/directory/services/dto/report-document.ts @@ -0,0 +1,13 @@ +import type { UserData } from '~/services/dto/user-data' + +export type ReportDocument = { + '@id'?: string + id: number + commercialReport: string + originalName: string + fileName?: string | null + mimeType: string + size: number + createdAt: string + uploadedBy?: UserData | null +}