import { AptlyEmailType, AptlyProjectStatus } from '../enums/index.js'; import { AptlyAddress } from './address.js'; import { AptlyAlgorithm, AptlyAlgorithmPipeline, AptlyAlgorithmPipelineSchema, AptlyAlgorithmSchema } from './algorithm.js'; import { AptlyAppSchema } from './app.js'; import { AptlyOrganizationSchema } from './organization.js'; import { AptlyModules, AptlyScopeSchema } from '../core/index.js'; import { AptlyPageSchema } from './page.js'; import { AptlyPeriod, AptlyPeriodSchema } from './period.js'; import { AptlyUserSchema } from './user.js'; import { AptlyBaseSchema, AptlyHistorySchema } from './extends.js'; import { AptlyDocumentSchema } from './document.js'; import { AptlyUnitOptionExtraItemSchema } from './unit.js'; import { AptlyMediaSrc } from './media.js'; export type AptlyProjectContent = AptlyProjectContentSchema; export type AptlyProjectContentSchema = Pick, '_id' | 'name' | 'theme'>; export type AptlyProject = AptlyProjectSchema; export interface AptlyProjectSchema extends AptlyBaseSchema, AptlyHistorySchema { organization: AptlyOrganizationSchema | ID; type?: AptlyProjectType; template?: ID | null; customers: ID[]; periods: AptlyPeriodSchema[]; documents: (ID | AptlyDocumentSchema)[]; pages: (ID | AptlyPageSchema)[]; myPageText?: string; inviteText?: string; notify: AptlyProjectNotifySchema[]; theme: AptlyProjectTheme; integrations: AptlyProjectIntegrationSchema[]; disabledModules?: AptlyModules[]; extraOptions?: AptlyUnitOptionExtraItemSchema[]; gdprActive?: boolean; userFavorites?: ID[]; status?: AptlyProjectStatus; number?: string; developer?: string; field?: string; address?: AptlyAddress; invoiceEmail?: string; algorithms: AptlyAlgorithmSchema[]; algorithm: ID | null; priceAlgorithm: ID | null; paymentApp?: ID | AptlyAppSchema | null; invites?: AptlyProjectInviteSchema[]; signApp?: ID | AptlyAppSchema | null; signMembers: (ID | AptlyUserSchema)[]; scope?: AptlyScopeSchema; created: DATE; } export declare enum AptlyProjectType { Options = 0, Offers = 1 } export type AptlyProjectPeriod = AptlyPeriod; export type AptlyProjectPeriodSchema = AptlyPeriodSchema; export type AptlyProjectAlgorithm = AptlyAlgorithm; export type AptlyProjectAlgorithmSchema = AptlyAlgorithmSchema; export type AptlyProjectAlgorithmPipeline = AptlyAlgorithmPipeline; export type AptlyProjectAlgorithmPipelineSchema = AptlyAlgorithmPipelineSchema; export interface AptlyProjectTheme { palette?: { type?: 'dark' | 'light'; primary?: AptlyProjectThemePalette; secondary?: AptlyProjectThemePalette; error?: AptlyProjectThemePalette; font?: string; background?: string; confirm?: string; green?: string; yellow?: string; red?: string; cardBackground?: string; cardContrast?: string; border?: string; }; fonts?: { primary?: string; secondary?: string; tertiary?: string; links?: [string]; }; images: { logo?: string | null; logoMedia?: AptlyMediaSrc | null; largeLogo?: string | null; hero?: string | null; heroMedia?: AptlyMediaSrc | null; fallback?: string | null; fallbackMedia?: AptlyMediaSrc | null; }; contact: { name?: string; phone?: string; mail?: string; complaintEmail?: string; }; } export interface AptlyProjectThemePalette { dark?: string; main?: string; mainContrast?: string; light?: string; disabled?: string; lightContrast?: string; } export type AptlyProjectIntegration = AptlyProjectIntegrationSchema; export interface AptlyProjectIntegrationSchema { _id: ID; integration: ID; integrationName: string; project: string; failures: { _id: string; error: string; name: string; }[]; } export type AptlyProjectNotify = AptlyProjectNotifySchema; export interface AptlyProjectNotifySchema { _id: ID; user: AptlyUserSchema | ID; types?: AptlyEmailType[]; inquiry: boolean; booking: boolean; complaint: boolean; offer?: boolean; order?: boolean; 'order-created'?: boolean; 'order-signed'?: boolean; 'order-fileReceived'?: boolean; 'unit-note-reminder'?: boolean; } export type AptlyProjectInvite = AptlyProjectInviteSchema; export interface AptlyProjectInviteSchema { _id: ID; unit: ID; code: string; createdAt: DATE; createdBy: ID; }