PSA/shared/interfaces/client.interfaces.ts
Hermes 284313f908
Some checks are pending
Bidi Control Character Guard / bidi-control-guard (push) Waiting to run
Circular Dependency Check / Check for new circular dependencies (push) Waiting to run
Citus Migration Smoke / Combined migrations on single-node Citus (push) Waiting to run
E2E Fresh Install Tests / fresh-install-e2e (push) Waiting to run
ext-v2 guardrails / Run ext-v2 guard and ESLint (push) Waiting to run
Integration Tests / Check for relevant changes (push) Waiting to run
Integration Tests / ${{ (github.event_name == 'schedule' || github.event.inputs.suite == 'full') && 'Full integration suite' || 'Tier-1 integration subset' }} (push) Blocked by required conditions
Mobile checks / Mobile lint + typecheck (push) Waiting to run
Mobile checks / Mobile unit tests (push) Waiting to run
Mobile checks / Mobile dependency audit (report) (push) Waiting to run
Mobile checks / Mobile reproducibility checks (push) Waiting to run
Secrets guard (env backups) / Ensure no tracked env backup files (push) Waiting to run
Temporal Readiness / fast-readiness (push) Waiting to run
Temporal Readiness / docker-parity (push) Waiting to run
TypeScript Type Check / Nx affected typecheck (push) Waiting to run
Unit Tests / Skipped-test budget (push) Waiting to run
Unit Tests / Nx affected unit tests (push) Waiting to run
Unit Tests / Server unit coverage (informational) (push) Waiting to run
Validate Tenant Management Schema / Check for relevant changes (push) Waiting to run
Validate Tenant Management Schema / Validate Tenant Management Schema (push) Blocked by required conditions
EE Workflows Build Guard / ee-workflows-build-guard (push) Waiting to run
Initial import of AlgaPSA codebase from PSA server
Excluded: .git, node_modules, secrets/, compose.env, assemblyscript tgz

Source: /opt/alga-psa on psa.joliet.tech
2026-06-22 16:12:17 -05:00

88 lines
2.1 KiB
TypeScript

/**
* Canonical Client Interfaces
* These are the canonical definitions for client-related types used across the codebase.
* All references should use these definitions unless there's a specific reason not to.
*/
/**
* Core client entity interface
*/
export interface IClient {
client_id: string;
client_name: string;
client_type?: 'company' | 'individual' | null;
tenant?: string;
url?: string | null;
phone_no?: string | null;
email?: string | null;
address?: string | null;
address_2?: string | null;
city?: string | null;
state?: string | null;
zip?: string | null;
country?: string | null;
default_currency_code?: string | null;
notes?: string | null;
is_inactive?: boolean | null;
created_at: string;
updated_at: string;
properties?: Record<string, any> | null;
parent_client_id?: string | null;
contract_line_id?: string | null;
is_default?: boolean | null;
[key: string]: any; // Allow additional properties for database fields
}
/**
* Input type for creating a new client
*/
export interface CreateClientInput {
client_name: string;
client_type?: 'company' | 'individual';
url?: string;
phone_no?: string;
email?: string;
address?: string;
address_2?: string;
city?: string;
state?: string;
zip?: string;
country?: string;
default_currency_code?: string;
notes?: string;
properties?: Record<string, any>;
parent_client_id?: string;
contract_line_id?: string;
is_default?: boolean;
}
/**
* Input type for updating an existing client
*/
export interface UpdateClientInput {
client_name?: string;
client_type?: 'company' | 'individual';
url?: string;
phone_no?: string;
email?: string;
address?: string;
address_2?: string;
city?: string;
state?: string;
zip?: string;
country?: string;
default_currency_code?: string;
notes?: string;
is_inactive?: boolean;
properties?: Record<string, any>;
parent_client_id?: string;
contract_line_id?: string;
}
/**
* Options for client creation process
*/
export interface ClientCreationOptions {
skipTaxSettings?: boolean;
skipEmailSuffix?: boolean;
}