/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { DealStatusEnum } from './DealStatusEnum'; /** * Adds a read-only ``tags`` field to a host serializer. * * Emits ``[{id, name, color}]``. Cheap when the host queryset uses * ``prefetch_related("tag_assignments__tag")`` — without that prefetch * every record triggers two extra queries. */ export type PatchedDeal = { /** * Server-assigned id. */ readonly id?: number; /** * Platform this Deal belongs to. Set automatically from your credentials; you cannot pass another Platform's id. */ readonly platform?: number; /** * Short display name (e.g. 'Acme renewal — 2026'). */ title?: string; /** * Free-text notes about scope, requirements, etc. */ description?: string; /** * Estimated deal value in `currency`. */ lead_value?: string; /** * ISO 4217 currency code. */ currency?: string; /** * Read-only. Set by the move-stage/won/lost actions and derived from the destination stage's `is_won`/`is_lost`. Direct writes are rejected with `400`; use `POST /deals/{id}/move-stage/` (or `won/` / `lost/`). * * * `open` - Open * * `won` - Won * * `lost` - Lost */ readonly status?: DealStatusEnum; /** * Set on a `lost` transition (e.g. 'Chose competitor'). */ lost_reason?: string; /** * Forecasted close date — used by revenue projections. */ expected_close_date?: string | null; /** * Read-only. Set automatically when the Deal enters a won/lost stage and cleared when it re-opens. */ readonly closed_at?: string | null; /** * UUID of the primary contact for this Deal. The person must belong to your Platform. */ person?: string; /** * UUID of an organization the Deal is with. Optional; must belong to your Platform. */ organization?: string | null; /** * Pipeline this Deal flows through. Must belong to your Platform. */ pipeline?: number; /** * Current PipelineStage. On create, must belong to `pipeline`. Use `POST /deals/{id}/move-stage/` to change after creation. */ stage?: number; /** * Where the Deal originated. Optional; must belong to your Platform. */ source?: number | null; /** * Id of the platform user responsible for this Deal (sales rep). Defaults to the calling user on create. */ owner?: number | null; readonly tags?: Array<{ id: number; name: string; color: string; }>; /** * Free-form JSON for Platform-defined attributes. */ metadata?: any; /** * Creation timestamp. */ readonly created_at?: string; /** * Last-modified timestamp. */ readonly updated_at?: string; };