@bisondesk/core-sdk 1.0.622 → 1.0.624

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"prospects.d.ts","sourceRoot":"/","sources":["types/prospects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACvF,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEvD,oBAAY,eAAe;IACzB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,MAAM,WAAW;IAGjB,KAAK,UAAU;IACf,YAAY,iBAAiB;IAC7B,cAAc,mBAAmB;IACjC,YAAY,iBAAiB;IAC7B,YAAY,iBAAiB;IAC7B,MAAM,WAAW;CAClB;AAED,oBAAY,cAAc;IACxB,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,OAAO,YAAY;IACnB,MAAM,WAAW;CAClB;AAED,eAAO,MAAM,mBAAmB,EAAE,cAAc,EAI/C,CAAC;AAEF,eAAO,MAAM,qBAAqB,kBAAkD,CAAC;AAErF,eAAO,MAAM,wBAAwB,EAAE,MAAM,EAA4B,CAAC;AAE1E,oBAAY,o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AC1B,+BAAW,CAAA;IACX,qCAAiB,CAAA;IACjB,iCAAa,CAAA;IAGb,qCAAiB,CAAA;AACnB,CAAC,EAPW,gBAAgB,KAAhB,gBAAgB,QAO3B;AAMD,MAAM,CAAC,MAAM,aAAa,GAAqC;IAC7D,CAAC,gBAAgB,CAAC,GAAG,CAAC,EAAE,CAAC;IACzB,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAAE,CAAC;IAC5B,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC;IAC1B,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAAE,CAAC;CAC7B,CAAC;AASF,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,+BAAa,CAAA;IACb,mCAAiB,CAAA;AACnB,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB;AAOD,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,kCAAa,CAAA;IACb,0CAAqB,CAAA;IACrB,kCAAa,CAAA;IACb,gCAAW,CAAA;AACb,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B;AAMD,MAAM,CAAC,MAAM,eAAe,GAAsC;IAChE,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC;IAC3B,CAAC,iBAAiB,CAAC,QAAQ,CAAC,EAAE,CAAC;IAC/B,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC;IAC3B,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,CAAC;CAC3B,CAAC;AAOF,MAAM,CAAC,MAAM,8BAA8B,GAAG,qBAAqB,CAAC","sourcesContent":["import { Task } from '@bisondesk/commons-sdk/tasks';\nimport { MultiLangValue, NextList, PaginatedList } from '@bisondesk/commons-sdk/types';\nimport { Activity } from './activities.js';\nimport { Contact, Organization } from './crm.js';\nimport { Interest } from './interests.js';\nimport { BaseEvent } from './internal-events.js';\nimport { Offer } from './offers.js';\nimport { Opportunity } from './opportunities.js';\nimport { BaseSearchRequest, SearchRequest, SortFilter } from './search.js';\nimport { DataRecord, ReferenceData } from './utils.js';\n\nexport enum ProspectActions {\n CLOSE = 'close',\n REOPEN = 'reopen',\n ENGAGE = 'engage',\n // Claiming an unassigned prospect is open to any active sales rep — a deliberate widening of\n // ADR-0013's permission matrix (ADR-0021 §7).\n CLAIM = 'claim',\n SET_METADATA = 'set_metadata',\n SET_OBJECTIVES = 'set_objectives',\n SET_CUSTOMER = 'set_customer',\n ADD_ACTIVITY = 'add_activity',\n DELETE = 'delete',\n}\n\nexport enum ProspectStatus {\n NURTURE = 'nurture',\n ATTEMPTING = 'attempting',\n ENGAGED = 'engaged',\n CLOSED = 'closed',\n}\n\nexport const ProspectStatusOrder: ProspectStatus[] = [\n ProspectStatus.NURTURE,\n ProspectStatus.ATTEMPTING,\n ProspectStatus.ENGAGED,\n];\n\nexport const ProspectKanbanColumns = [...ProspectStatusOrder, ProspectStatus.CLOSED];\n\nexport const ProspectKanbanEndColumns: string[] = [ProspectStatus.CLOSED];\n\nexport enum ProspectClosedReason {\n CONVERTED = 'converted',\n DEFERRED = 'deferred',\n NO_REPLY = 'no_reply',\n NOT_INTERESTED = 'not_interested',\n AUTOMATIC = 'automatic',\n}\n\nexport enum ProspectPriority {\n LOW = 'low',\n NORMAL = 'normal',\n HIGH = 'high',\n // \"Call me\" fast lane (ADR-0021 §8): a manual URGENT prospect sorts ahead of every\n // engine-ranked card. Above NORMAL, priority dominates scoreTier in the \"next\" cursor.\n URGENT = 'urgent',\n}\n\n/**\n * Numeric rank for priority, computed at index time into `custom.priorityRank` so OpenSearch\n * can sort ordinally rather than alphabetically. Higher = more urgent.\n */\nexport const PRIORITY_RANK: Record<ProspectPriority, number> = {\n [ProspectPriority.LOW]: 1,\n [ProspectPriority.NORMAL]: 2,\n [ProspectPriority.HIGH]: 3,\n [ProspectPriority.URGENT]: 4,\n};\n\n/**\n * How a prospect entered the system (ADR-0021 §3). The engine's truncate-and-regenerate\n * delete predicate only ever touches `AUTO` cards, so `MANUAL`/`IMPORT` cards survive\n * regardless of status. `IMPORT` is reserved for the v2 import pipeline — nothing produces\n * it in v1, but it stays in the enum because the discriminator is part of the delete-predicate\n * safety contract.\n */\nexport enum ProspectSource {\n MANUAL = 'manual',\n AUTO = 'auto',\n IMPORT = 'import',\n}\n\n/**\n * Discrete ranking band for an auto prospect (ADR-0021 §4). Each generator maps its own raw\n * score into these bands via its own thresholds; the tier — not a raw number — is what the\n * engine persists and the \"next\" cursor sorts on.\n */\nexport enum ProspectScoreTier {\n COLD = 'cold',\n LUKEWARM = 'lukewarm',\n WARM = 'warm',\n HOT = 'hot',\n}\n\n/**\n * Numeric rank for a score tier, computed at index time into `custom.scoreTierRank`\n * (0 = unscored/no tier). Higher = warmer.\n */\nexport const SCORE_TIER_RANK: Record<ProspectScoreTier, number> = {\n [ProspectScoreTier.COLD]: 1,\n [ProspectScoreTier.LUKEWARM]: 2,\n [ProspectScoreTier.WARM]: 3,\n [ProspectScoreTier.HOT]: 4,\n};\n\n/**\n * Virtual sort field for search requests: \"importance\" is the compound priority → tier\n * ranking (ADR-0021 §5). The backend expands it server-side, so clients never spell out\n * the underlying fields.\n */\nexport const PROSPECT_IMPORTANCE_SORT_FIELD = 'prospect.importance';\n\n/** One line of the score breakdown recorded for explanation (raw score, thresholds, dampening). */\nexport type ProspectScoreDetail = {\n name: string;\n value: number | string;\n};\n\n/**\n * Denormalized vehicle display data carried on each candidate vehicle, so the UI can render the\n * anchor and runner-ups without a second fetch. Mirrors `InterestLead.vehicleData` (and extends it\n * with make/model/category/vin), keeping the two card surfaces consistent.\n */\nexport type ProspectVehicleData = {\n title: string;\n mainPictureUrl?: string;\n stockNumber?: string;\n\n category: string;\n bodywork?: string;\n makeName: string;\n modelName?: string;\n typeName?: string;\n\n used?: boolean; // Vehicle.condition.used — false/absent means new.\n damaged?: boolean;\n\n advertisingYear?: number;\n km?: number;\n emissionsClass?: string;\n emissionsSubClass?: string;\n cabinModel?: string;\n configuration?: string;\n vin?: string;\n\n // Notable boolean equipment, mirroring Vehicle.accessories (and superstructure.crane).\n features?: {\n adr?: boolean;\n jumbo?: boolean;\n crane?: boolean;\n hydraulicTipperKit?: boolean;\n lowDeck?: boolean;\n retarderIntarder?: boolean;\n };\n};\n\n/** A candidate anchor/runner-up vehicle, scored by the lead-engine matcher. */\nexport type ProspectVehicleCandidate = {\n vehicleId: string;\n /** Branch that holds this stock. The anchor's branch decides the card's branch (ADR-0021 §2). */\n branchId: string;\n score: number;\n vehicleData: ProspectVehicleData;\n};\n\n/** A recommended account manager with an affinity score and the reasons behind it. */\nexport type ProspectRecommendedAm = {\n userId: string;\n score: number;\n reasons: string[];\n};\n\nexport type ProspectObjective = {\n id: string;\n title: MultiLangValue;\n};\n\n/**\n * Inline identity for a card whose person/company matches no CRM record yet — the \"draft party\"\n * of ADR-0021 §9. Carries enough structure to materialise a Contact (first/last name, phone,\n * email) and/or an Organization (orgName, VAT, country) when the draft is converted\n * (`SET_CUSTOMER`, grown). Drafts enter through import or manual entry only — the engine never\n * produces them — and the nightly truncate never touches them.\n */\nexport type ProspectPartyDraft = {\n // contact identity\n firstName?: string;\n lastName?: string;\n phone?: string;\n email?: string;\n // organization identity\n orgName?: string;\n vatNumber?: string;\n countryCode?: string;\n /**\n * Client sector (Tier 1) and sub-industry (Tier 2), captured on the draft so they survive\n * promotion to an Organization. Same picklists and semantics as the Organization fields of the\n * same name (`ORG_INDUSTRY_PICKLIST_ID` / `SUB_INDUSTRY_PICKLIST_ID`).\n */\n industry?: string;\n subIndustry?: string;\n /**\n * The draft party's interests, embedded on the card — a draft has no CRM record to hang\n * interests on, so they ride the card until conversion copies them onto the linked\n * Contact/Organization (where the lead engine picks them up; embedded ones never feed it).\n */\n interests?: Interest[];\n};\n\ntype BaseProspect = {\n contactId?: string;\n organizationId?: string;\n /** Draft-party identity when the card is linked to no Contact/Organization yet (ADR §9). */\n partyDraft?: ProspectPartyDraft;\n branchId: string;\n accountManager?: string;\n priority: ProspectPriority;\n objectives: ProspectObjective[];\n};\n\nexport type NewProspect = BaseProspect & {\n id?: undefined;\n createdAt?: undefined;\n createdBy?: undefined;\n modifiedAt?: undefined;\n modifiedBy?: undefined;\n};\n\nexport type Prospect = BaseProspect & {\n id: string;\n\n status: ProspectStatus;\n\n // ── Engine-owned fields (ADR-0021). The manual write path treats these as read-only\n // (Joi.forbidden in the user schemas) so a human edit is never silently overwritten by the\n // next nightly run. `source` is always present on a persisted card; the rest exist only on\n // scored auto cards.\n source: ProspectSource;\n scoreTier?: ProspectScoreTier;\n scoreDetails?: ProspectScoreDetail[];\n /** Ordered by score desc; `vehicles[0]` is the anchor the rep opens the call with. */\n vehicles?: ProspectVehicleCandidate[];\n recommendedAccountManagers?: ProspectRecommendedAm[];\n\n attemptingAt?: string;\n attemptingBy?: string;\n engagedAt?: string;\n engagedBy?: string;\n closedAt?: string;\n closedBy?: string;\n closedReason?: ProspectClosedReason;\n\n createdAt: string;\n createdBy: string;\n modifiedAt: string;\n modifiedBy: string;\n};\n\nexport type ProspectUpdate = {\n contactId?: string | null;\n organizationId?: string | null;\n partyDraft?: ProspectPartyDraft | null;\n branchId?: string;\n accountManager?: string | null;\n priority?: ProspectPriority;\n objectives?: ProspectObjective[];\n\n close?: boolean;\n closedReason?: ProspectClosedReason;\n reopen?: boolean;\n engage?: boolean;\n};\n\nexport type ProspectBff = {\n prospect: DataRecord<Prospect>;\n contact?: DataRecord<Contact>;\n org?: DataRecord<Organization>;\n tasks: DataRecord<Task>[];\n\n /** All interests in scope: the linked contact/org's, or the draft party's embedded ones. */\n interests: Interest[];\n /** Opportunities for the linked contact/org, deduped by id. */\n opportunities: Opportunity[];\n /** Offers for the linked contact/org, deduped by id, newest first. */\n offers: Offer[];\n /** The other prospect lines on the same contact/org (this one excluded), newest first. */\n relatedProspects: Prospect[];\n /** Most-recent interaction history (first page): the card's own + linked contact/org activities. */\n activities: DataRecord<Activity>[];\n /** Cursor for the next page of the merged activity history; absent when fully loaded. */\n activitiesNextToken?: string;\n};\n\n/************\n *\n * Search\n */\n\nexport type SearchProspect = {\n contact?: Contact;\n prospect: Prospect;\n org?: Organization;\n /**\n * Interests denormalized from the prospect's lead:\n * - Org-linked prospects: union of the org's own interests and every contact's interests for that org.\n * - Contact-only prospects: just the contact's interests.\n */\n interests?: Interest[];\n custom: {\n closed: boolean;\n unassigned: boolean;\n /**\n * Country of the lead, preferring contact country over org country when both are set.\n */\n country?: string;\n /**\n * Numeric ranks computed at index time so OpenSearch sorts ordinally, not alphabetically\n * (ADR-0021 §4, §5). The \"next\" cursor sorts priorityRank desc → scoreTierRank desc → id asc.\n */\n priorityRank: number;\n /** 0 = unscored (no tier yet). */\n scoreTierRank: number;\n /** User ids from `recommendedAccountManagers`, for the \"suitable for me\" filter (ADR §6). */\n recommendedAmIds?: string[];\n /**\n * Collapse key for grouping by main vehicle (minimizing context switch): the anchor's\n * vehicleId when the card carries vehicles, else the prospect id (a singleton group).\n * Mirrors the opportunities kanban's `custom.groupKey` (group-by-client) convention.\n */\n groupKey: string;\n };\n /** Task counters denormalized at index time, for kanban/list badges. */\n tasks?: {\n totalTasks: number;\n openTasks: number;\n /** Soonest due date among open tasks. */\n nextDueAt?: string;\n };\n};\n\n/************\n *\n * Claim\n */\n\n/**\n * Returned with HTTP 409 when a guarded claim finds the prospect already owned (a lost race). On\n * success the endpoint returns the claimed `DataRecord<Prospect>` with 200 instead (ADR-0021 §7).\n */\nexport type ProspectClaimConflict = {\n claimed: false;\n accountManager?: string;\n};\n\n/************\n *\n * Next cursor / play mode\n */\n\n/**\n * The \"next prospect\" cursor (ADR-0021 §5). Accepts the same filter body as the list search, so\n * \"next\" walks the rep's current view. Only the filter-defining fields are honored — sort, paging\n * size and `nextToken` are owned by the endpoint (fixed priority→tier sort, `cursor` below). `cursor`\n * is an opaque token embedding the sort position and a hash of the filters — it is rejected if the\n * filter set changed. `claim: true` is play mode: the next matching unassigned card is served and\n * claimed atomically (ADR §7).\n */\nexport type ProspectNextRequest = Pick<SearchRequest, 'fullText' | 'query' | 'geoFilters'> & {\n cursor?: string;\n claim?: boolean;\n /**\n * Serve cards grouped by main vehicle (minimizing context switch): all matching cards anchored\n * on the same vehicle come consecutively before \"next\" moves to the following vehicle group.\n */\n groupByVehicle?: boolean;\n};\n\nexport type ProspectNextResponse = {\n result?: SearchProspect;\n cursor?: string;\n meta: ReferenceData;\n};\n\n/** A main-vehicle group (ES collapse on `custom.groupKey`), shared by kanban and list. */\nexport type ProspectVehicleGroup = {\n representative: SearchProspect;\n items: SearchProspect[];\n};\n\n/** Flat list search, optionally collapsed by the card's main vehicle. */\nexport type ProspectsSearchRequest = SearchRequest & {\n /** Collapse on `custom.groupKey`: the page then streams GROUPS (offset-paged), not rows. */\n groupByVehicle?: boolean;\n};\n\nexport type ProspectsSearchResponse = PaginatedList<SearchProspect, ReferenceData> & {\n /**\n * Populated only when `groupByVehicle` is requested; `results` is then empty and\n * `totalCount` counts groups (collapse cardinality), not rows.\n */\n groups?: ProspectVehicleGroup[];\n};\n\n/************\n *\n * Kanban\n */\n\n/** A main-vehicle group inside a kanban column when `groupByVehicle` is on. */\nexport type KanbanProspectGroup = ProspectVehicleGroup;\n\nexport type ProspectsKanbanColumn = {\n status: string;\n results: SearchProspect[];\n /** Populated only when `groupByVehicle` is requested; `results` is then empty. */\n groups?: KanbanProspectGroup[];\n totalCount: number;\n};\n\nexport type MSearchProspectsKanbanColumn = {\n column: ProspectsKanbanColumn;\n nextToken?: string;\n};\n\nexport type KanbanProspectsSearchRequest = BaseSearchRequest & {\n nextTokens?: Record<string, string | undefined>;\n /** Collapse each column by the card's main vehicle (mirrors opportunities' group-by-client). */\n groupByVehicle?: boolean;\n /**\n * Per-column sort overrides, keyed by prospect status. Unlisted columns keep their defaults:\n * the nurture column sorts by the priority→tier \"next\" order, the rest newest-first.\n */\n statusSortBy?: Partial<Record<ProspectStatus, SortFilter[]>>;\n};\n\nexport type KanbanProspectsNextList = Omit<\n NextList<ProspectsKanbanColumn, ReferenceData>,\n 'nextToken'\n> & {\n nextTokens?: Record<string, string | undefined>;\n};\n\n/************\n *\n * Events\n */\n\ntype BaseProspectEvent = BaseEvent & {\n id: string;\n actionAt: string;\n tenantId: string;\n userId: string;\n};\n\nexport type ProspectCreatedEvent = BaseProspectEvent & {\n action: 'create';\n prospect: Prospect;\n previousProspect?: undefined;\n};\n\nexport type ProspectUpdatedEvent = BaseProspectEvent & {\n action: 'update';\n prospect: Prospect;\n previousProspect: Prospect;\n};\n\nexport type ProspectEvent = ProspectCreatedEvent | ProspectUpdatedEvent;\n"]}
1
+ {"version":3,"file":"prospects.js","sourceRoot":"/","sources":["types/prospects.ts"],"names":[],"mappings":"AAWA,MAAM,CAAN,IAAY,eAYX;AAZD,WAAY,eAAe;IACzB,kCAAe,CAAA;IACf,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;IAGjB,kCAAe,CAAA;IACf,gDAA6B,CAAA;IAC7B,oDAAiC,CAAA;IACjC,gDAA6B,CAAA;IAC7B,gDAA6B,CAAA;IAC7B,oCAAiB,CAAA;AACnB,CAAC,EAZW,eAAe,KAAf,eAAe,QAY1B;AAED,MAAM,CAAN,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,qCAAmB,CAAA;IACnB,2CAAyB,CAAA;IACzB,qCAAmB,CAAA;IACnB,mCAAiB,CAAA;AACnB,CAAC,EALW,cAAc,KAAd,cAAc,QAKzB;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAqB;IACnD,cAAc,CAAC,OAAO;IACtB,cAAc,CAAC,UAAU;IACzB,cAAc,CAAC,OAAO;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,GAAG,mBAAmB,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;AAErF,MAAM,CAAC,MAAM,wBAAwB,GAAa,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;AAE1E,MAAM,CAAN,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC9B,+CAAuB,CAA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dk/tasks';\nimport { MultiLangValue, NextList, PaginatedList } from '@bisondesk/commons-sdk/types';\nimport { Activity } from './activities.js';\nimport { Contact, Organization } from './crm.js';\nimport { Interest } from './interests.js';\nimport { BaseEvent } from './internal-events.js';\nimport { Offer } from './offers.js';\nimport { Opportunity } from './opportunities.js';\nimport { BaseSearchRequest, SearchRequest, SortFilter } from './search.js';\nimport { DataRecord, ReferenceData } from './utils.js';\n\nexport enum ProspectActions {\n CLOSE = 'close',\n REOPEN = 'reopen',\n ENGAGE = 'engage',\n // Claiming an unassigned prospect is open to any active sales rep — a deliberate widening of\n // ADR-0013's permission matrix (ADR-0021 §7).\n CLAIM = 'claim',\n SET_METADATA = 'set_metadata',\n SET_OBJECTIVES = 'set_objectives',\n SET_CUSTOMER = 'set_customer',\n ADD_ACTIVITY = 'add_activity',\n DELETE = 'delete',\n}\n\nexport enum ProspectStatus {\n NURTURE = 'nurture',\n ATTEMPTING = 'attempting',\n ENGAGED = 'engaged',\n CLOSED = 'closed',\n}\n\nexport const ProspectStatusOrder: ProspectStatus[] = [\n ProspectStatus.NURTURE,\n ProspectStatus.ATTEMPTING,\n ProspectStatus.ENGAGED,\n];\n\nexport const ProspectKanbanColumns = [...ProspectStatusOrder, ProspectStatus.CLOSED];\n\nexport const ProspectKanbanEndColumns: string[] = [ProspectStatus.CLOSED];\n\nexport enum ProspectClosedReason {\n CONVERTED = 'converted',\n DEFERRED = 'deferred',\n NO_REPLY = 'no_reply',\n NOT_INTERESTED = 'not_interested',\n AUTOMATIC = 'automatic',\n}\n\nexport enum ProspectPriority {\n LOW = 'low',\n NORMAL = 'normal',\n HIGH = 'high',\n // \"Call me\" fast lane (ADR-0021 §8): a manual URGENT prospect sorts ahead of every\n // engine-ranked card. Above NORMAL, priority dominates scoreTier in the \"next\" cursor.\n URGENT = 'urgent',\n}\n\n/**\n * Numeric rank for priority, computed at index time into `custom.priorityRank` so OpenSearch\n * can sort ordinally rather than alphabetically. Higher = more urgent.\n */\nexport const PRIORITY_RANK: Record<ProspectPriority, number> = {\n [ProspectPriority.LOW]: 1,\n [ProspectPriority.NORMAL]: 2,\n [ProspectPriority.HIGH]: 3,\n [ProspectPriority.URGENT]: 4,\n};\n\n/**\n * How a prospect entered the system (ADR-0021 §3). The engine's truncate-and-regenerate\n * delete predicate only ever touches `AUTO` cards, so `MANUAL`/`IMPORT` cards survive\n * regardless of status. `IMPORT` is reserved for the v2 import pipeline — nothing produces\n * it in v1, but it stays in the enum because the discriminator is part of the delete-predicate\n * safety contract.\n */\nexport enum ProspectSource {\n MANUAL = 'manual',\n AUTO = 'auto',\n IMPORT = 'import',\n}\n\n/**\n * Discrete ranking band for an auto prospect (ADR-0021 §4). Each generator maps its own raw\n * score into these bands via its own thresholds; the tier — not a raw number — is what the\n * engine persists and the \"next\" cursor sorts on.\n */\nexport enum ProspectScoreTier {\n COLD = 'cold',\n LUKEWARM = 'lukewarm',\n WARM = 'warm',\n HOT = 'hot',\n}\n\n/**\n * Numeric rank for a score tier, computed at index time into `custom.scoreTierRank`\n * (0 = unscored/no tier). Higher = warmer.\n */\nexport const SCORE_TIER_RANK: Record<ProspectScoreTier, number> = {\n [ProspectScoreTier.COLD]: 1,\n [ProspectScoreTier.LUKEWARM]: 2,\n [ProspectScoreTier.WARM]: 3,\n [ProspectScoreTier.HOT]: 4,\n};\n\n/**\n * Virtual sort field for search requests: \"importance\" is the compound priority → tier\n * ranking (ADR-0021 §5). The backend expands it server-side, so clients never spell out\n * the underlying fields.\n */\nexport const PROSPECT_IMPORTANCE_SORT_FIELD = 'prospect.importance';\n\n/** One line of the score breakdown recorded for explanation (raw score, thresholds, dampening). */\nexport type ProspectScoreDetail = {\n name: string;\n value: number | string;\n};\n\n/**\n * Denormalized vehicle display data carried on each candidate vehicle, so the UI can render the\n * anchor and runner-ups without a second fetch. Mirrors `InterestLead.vehicleData` (and extends it\n * with make/model/category/vin), keeping the two card surfaces consistent.\n */\nexport type ProspectVehicleData = {\n title: string;\n mainPictureUrl?: string;\n stockNumber?: string;\n\n category: string;\n bodywork?: string;\n makeName: string;\n modelName?: string;\n typeName?: string;\n\n used?: boolean; // Vehicle.condition.used — false/absent means new.\n damaged?: boolean;\n\n advertisingYear?: number;\n km?: number;\n emissionsClass?: string;\n emissionsSubClass?: string;\n cabinModel?: string;\n configuration?: string;\n vin?: string;\n\n // Notable boolean equipment, mirroring Vehicle.accessories (and superstructure.crane).\n features?: {\n adr?: boolean;\n jumbo?: boolean;\n crane?: boolean;\n hydraulicTipperKit?: boolean;\n lowDeck?: boolean;\n retarderIntarder?: boolean;\n };\n};\n\n/** A candidate anchor/runner-up vehicle, scored by the lead-engine matcher. */\nexport type ProspectVehicleCandidate = {\n vehicleId: string;\n /** Branch that holds this stock. The anchor's branch decides the card's branch (ADR-0021 §2). */\n branchId: string;\n score: number;\n vehicleData: ProspectVehicleData;\n};\n\n/** A recommended account manager with an affinity score and the reasons behind it. */\nexport type ProspectRecommendedAm = {\n userId: string;\n score: number;\n reasons: string[];\n};\n\nexport type ProspectObjective = {\n id: string;\n title: MultiLangValue;\n};\n\n/**\n * Inline identity for a card whose person/company matches no CRM record yet — the \"draft party\"\n * of ADR-0021 §9. Carries enough structure to materialise a Contact (first/last name, phone,\n * email) and/or an Organization (orgName, VAT, country) when the draft is converted\n * (`SET_CUSTOMER`, grown). Drafts enter through import or manual entry only — the engine never\n * produces them — and the nightly truncate never touches them.\n */\nexport type ProspectPartyDraft = {\n // contact identity\n firstName?: string;\n lastName?: string;\n phone?: string;\n email?: string;\n // organization identity\n orgName?: string;\n vatNumber?: string;\n countryCode?: string;\n /**\n * Client sector (Tier 1) and sub-industry (Tier 2), captured on the draft so they survive\n * promotion to an Organization. Same picklists and semantics as the Organization fields of the\n * same name (`ORG_INDUSTRY_PICKLIST_ID` / `SUB_INDUSTRY_PICKLIST_ID`).\n */\n industry?: string;\n subIndustry?: string;\n /**\n * The draft party's interests, embedded on the card — a draft has no CRM record to hang\n * interests on, so they ride the card until conversion copies them onto the linked\n * Contact/Organization (where the lead engine picks them up; embedded ones never feed it).\n */\n interests?: Interest[];\n};\n\ntype BaseProspect = {\n contactId?: string;\n organizationId?: string;\n /** Draft-party identity when the card is linked to no Contact/Organization yet (ADR §9). */\n partyDraft?: ProspectPartyDraft;\n branchId: string;\n accountManager?: string;\n priority: ProspectPriority;\n objectives: ProspectObjective[];\n};\n\nexport type NewProspect = BaseProspect & {\n id?: undefined;\n createdAt?: undefined;\n createdBy?: undefined;\n modifiedAt?: undefined;\n modifiedBy?: undefined;\n};\n\nexport type Prospect = BaseProspect & {\n id: string;\n\n status: ProspectStatus;\n\n // ── Engine-owned fields (ADR-0021). The manual write path treats these as read-only\n // (Joi.forbidden in the user schemas) so a human edit is never silently overwritten by the\n // next nightly run. `source` is always present on a persisted card; the rest exist only on\n // scored auto cards.\n source: ProspectSource;\n scoreTier?: ProspectScoreTier;\n scoreDetails?: ProspectScoreDetail[];\n /** Ordered by score desc; `vehicles[0]` is the anchor the rep opens the call with. */\n vehicles?: ProspectVehicleCandidate[];\n recommendedAccountManagers?: ProspectRecommendedAm[];\n\n attemptingAt?: string;\n attemptingBy?: string;\n engagedAt?: string;\n engagedBy?: string;\n closedAt?: string;\n closedBy?: string;\n closedReason?: ProspectClosedReason;\n\n createdAt: string;\n createdBy: string;\n modifiedAt: string;\n modifiedBy: string;\n};\n\nexport type ProspectUpdate = {\n contactId?: string | null;\n organizationId?: string | null;\n partyDraft?: ProspectPartyDraft | null;\n branchId?: string;\n accountManager?: string | null;\n priority?: ProspectPriority;\n objectives?: ProspectObjective[];\n\n close?: boolean;\n closedReason?: ProspectClosedReason;\n reopen?: boolean;\n engage?: boolean;\n};\n\nexport type ProspectBff = {\n prospect: DataRecord<Prospect>;\n contact?: DataRecord<Contact>;\n org?: DataRecord<Organization>;\n tasks: DataRecord<Task>[];\n\n /** All interests in scope: the linked contact/org's, or the draft party's embedded ones. */\n interests: Interest[];\n /** Opportunities for the linked contact/org, deduped by id. */\n opportunities: Opportunity[];\n /** Offers for the linked contact/org, deduped by id, newest first. */\n offers: Offer[];\n /** The other prospect lines on the same contact/org (this one excluded), newest first. */\n relatedProspects: Prospect[];\n /** Most-recent interaction history (first page): the card's own + linked contact/org activities. */\n activities: DataRecord<Activity>[];\n /** Cursor for the next page of the merged activity history; absent when fully loaded. */\n activitiesNextToken?: string;\n};\n\n/************\n *\n * Search\n */\n\nexport type SearchProspect = {\n contact?: Contact;\n prospect: Prospect;\n org?: Organization;\n /**\n * Interests denormalized from the prospect's lead:\n * - Org-linked prospects: union of the org's own interests and every contact's interests for that org.\n * - Contact-only prospects: just the contact's interests.\n */\n interests?: Interest[];\n custom: {\n closed: boolean;\n unassigned: boolean;\n /**\n * Country of the lead, preferring contact country over org country when both are set.\n */\n country?: string;\n /**\n * Numeric ranks computed at index time so OpenSearch sorts ordinally, not alphabetically\n * (ADR-0021 §4, §5). The \"next\" cursor sorts priorityRank desc → scoreTierRank desc → id asc.\n */\n priorityRank: number;\n /** 0 = unscored (no tier yet). */\n scoreTierRank: number;\n /** User ids from `recommendedAccountManagers`, for the \"suitable for me\" filter (ADR §6). */\n recommendedAmIds?: string[];\n /**\n * Collapse key for grouping by main vehicle (minimizing context switch): the anchor's\n * vehicleId when the card carries vehicles, else the prospect id (a singleton group).\n * Mirrors the opportunities kanban's `custom.groupKey` (group-by-client) convention.\n */\n groupKey: string;\n };\n /** Task counters denormalized at index time, for kanban/list badges. */\n tasks?: {\n totalTasks: number;\n openTasks: number;\n /** Soonest due date among open tasks. */\n nextDueAt?: string;\n };\n};\n\n/************\n *\n * Claim\n */\n\n/**\n * Returned with HTTP 409 when a guarded claim finds the prospect already owned (a lost race). On\n * success the endpoint returns the claimed `DataRecord<Prospect>` with 200 instead (ADR-0021 §7).\n */\nexport type ProspectClaimConflict = {\n claimed: false;\n accountManager?: string;\n};\n\n/************\n *\n * Next cursor / play mode\n */\n\n/**\n * The \"next prospect\" cursor (ADR-0021 §5). Accepts the same filter body as the list search, so\n * \"next\" walks the rep's current view. Only the filter-defining fields are honored — sort, paging\n * size and `nextToken` are owned by the endpoint (fixed priority→tier sort, `cursor` below). `cursor`\n * is an opaque token embedding the sort position and a hash of the filters — it is rejected if the\n * filter set changed. `claim: true` is play mode: the next matching unassigned card is served and\n * claimed atomically (ADR §7).\n */\nexport type ProspectNextRequest = Pick<SearchRequest, 'fullText' | 'query' | 'geoFilters'> & {\n cursor?: string;\n claim?: boolean;\n /**\n * Serve cards grouped by main vehicle (minimizing context switch): all matching cards anchored\n * on the same vehicle come consecutively before \"next\" moves to the following vehicle group.\n */\n groupByVehicle?: boolean;\n};\n\nexport type ProspectNextResponse = {\n result?: SearchProspect;\n cursor?: string;\n meta: ReferenceData;\n};\n\n/** A main-vehicle group (ES collapse on `custom.groupKey`), shared by kanban and list. */\nexport type ProspectVehicleGroup = {\n representative: SearchProspect;\n items: SearchProspect[];\n};\n\n/** Flat list search, optionally collapsed by the card's main vehicle. */\nexport type ProspectsSearchRequest = SearchRequest & {\n /** Collapse on `custom.groupKey`: the page then streams GROUPS (offset-paged), not rows. */\n groupByVehicle?: boolean;\n};\n\nexport type ProspectsSearchResponse = PaginatedList<SearchProspect, ReferenceData> & {\n /**\n * Populated only when `groupByVehicle` is requested; `results` is then empty and\n * `totalCount` counts groups (collapse cardinality), not rows.\n */\n groups?: ProspectVehicleGroup[];\n};\n\n/************\n *\n * Kanban\n */\n\n/** A main-vehicle group inside a kanban column when `groupByVehicle` is on. */\nexport type KanbanProspectGroup = ProspectVehicleGroup;\n\nexport type ProspectsKanbanColumn = {\n status: string;\n results: SearchProspect[];\n /** Populated only when `groupByVehicle` is requested; `results` is then empty. */\n groups?: KanbanProspectGroup[];\n totalCount: number;\n};\n\nexport type MSearchProspectsKanbanColumn = {\n column: ProspectsKanbanColumn;\n nextToken?: string;\n};\n\nexport type KanbanProspectsSearchRequest = BaseSearchRequest & {\n nextTokens?: Record<string, string | undefined>;\n /** Collapse each column by the card's main vehicle (mirrors opportunities' group-by-client). */\n groupByVehicle?: boolean;\n /**\n * Per-column sort overrides, keyed by prospect status. Unlisted columns keep their defaults:\n * the nurture column sorts by the priority→tier \"next\" order, the rest newest-first.\n */\n statusSortBy?: Partial<Record<ProspectStatus, SortFilter[]>>;\n};\n\nexport type KanbanProspectsNextList = Omit<\n NextList<ProspectsKanbanColumn, ReferenceData>,\n 'nextToken'\n> & {\n nextTokens?: Record<string, string | undefined>;\n};\n\n/************\n *\n * Events\n */\n\ntype BaseProspectEvent = BaseEvent & {\n id: string;\n actionAt: string;\n tenantId: string;\n userId: string;\n};\n\nexport type ProspectCreatedEvent = BaseProspectEvent & {\n action: 'create';\n prospect: Prospect;\n previousProspect?: undefined;\n};\n\nexport type ProspectUpdatedEvent = BaseProspectEvent & {\n action: 'update';\n prospect: Prospect;\n previousProspect: Prospect;\n};\n\nexport type ProspectDeletedEvent = BaseProspectEvent & {\n action: 'delete';\n prospect?: undefined;\n /** Snapshot of the prospect as it was at the moment of deletion. */\n previousProspect: Prospect;\n};\n\nexport type ProspectEvent = ProspectCreatedEvent | ProspectUpdatedEvent | ProspectDeletedEvent;\n"]}
@@ -86,6 +86,7 @@ export type LeasingCalculatorInput = BaseQuoteCalculatorInput & {
86
86
  startupFee: string;
87
87
  startupFeeMode: PricePercentageMode;
88
88
  startupFeePercentage: string;
89
+ guaranteeDeposit?: string;
89
90
  interestRate: string;
90
91
  duration: number;
91
92
  contractStartDate: string;
@@ -198,6 +199,7 @@ export type LeasingCalculatorOutput = {
198
199
  monthlyTaxesInsurance: string;
199
200
  beforeDeliveryExclVat: string;
200
201
  beforeDelivery: string;
202
+ guaranteeDeposit?: string;
201
203
  financingAmount: string;
202
204
  settingId: string;
203
205
  totalRetailAmountExclVat: string;
@@ -1 +1 @@
1
- {"version":3,"file":"quotes.d.ts","sourceRoot":"/","sources":["types/quotes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAi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Y,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,wCAAkB,CAAA;IAClB,6CAAuB,CAAA;AACzB,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B;AAED,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,oDAA+B,CAAA;IAC/B,0DAAqC,CAAA;AACvC,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B","sourcesContent":["import { AttachmentValue, LocationValue } from '@bisondesk/commons-sdk/types';\nimport { OpportunityType } from '../constants.js';\nimport {\n CustomLeasingQuoteExtraInput,\n CustomSalesQuoteExtraInput,\n LeasingDeliveryPackageInput,\n LeasingQuoteExtraInput,\n SalesQuoteExtraInput,\n} from './leasing-settings.js';\nimport { MatchingRuleValue } from './roi-ratings.js';\nimport { PricePercentageMode } from './utils.js';\n\nexport enum QuoteActions {\n ACCEPT = 'accept',\n VALIDATE = 'validate',\n DONWLOAD_PDFS = 'download-pdfs',\n CANCEL = 'cancel',\n}\n\nexport enum QuoteStatus {\n CREATED = 'created',\n VALIDATED = 'validated',\n INVALIDATED = 'invalidated',\n ACCEPTED = 'accepted',\n REJECTED = 'rejected',\n CANCELLED = 'cancelled',\n MANAGER_REJECTED = 'managerRejected',\n MANAGER_ACCEPTED = 'managerAccepted',\n}\n\nexport enum QuoteMetricsScore {\n DANGER = 'danger',\n NEUTRAL = 'neutral',\n GOOD = 'good',\n}\nexport enum DeliveryTypes {\n PICK_UP = 'pickUp',\n ADDRESS = 'address',\n PORT = 'port',\n PORT_AND_SHIP = 'portAndShip',\n}\n\nexport enum SpoilerInfo {\n MOUNT = 'mount',\n UNMOUNT = 'unmount',\n NO_ACTION = 'noAction',\n}\n\nexport enum TransportationMode {\n BY_ROAD = 'byRoad',\n ON_LOW_BED = 'onLowBed',\n}\n\nexport enum SelfFinancingType {\n OWN_FINANCING = 'own_financing',\n ALREADY_FINANCED = 'already_financed',\n}\n\ntype BaseQuoteCalculatorInput = {\n branchId: string;\n branchCountry: string;\n customerCountry: string;\n customerVatNumber?: string;\n currency: string;\n alternativeCurrency?: string;\n exchangeRate?: string;\n vehicle: {\n id: string;\n category: string;\n bodywork?: string;\n agreedPriceExclVat: string;\n technicalNotes?: string;\n vatRate: string;\n };\n\n allRisksCost?: string;\n};\n\n// Sent by the Frontend to bootstrap the calculator\nexport type LeasingCalculatorDefaultInput = Omit<BaseQuoteCalculatorInput, 'vehicle'> & {\n vehicle: Omit<BaseQuoteCalculatorInput['vehicle'], 'vatRate'>;\n deliveryPackage?: LeasingQuoteExtraInput;\n settingsId: string;\n};\n\nexport type LeasingCalculatorInput = BaseQuoteCalculatorInput & {\n localLicensePlate: boolean;\n externalDelivery: boolean;\n settingsId: string;\n isRefinancingDebt?: boolean; // if true, the insurance amounts might not be the same as the leasing amount + and other costs like track and trace\n vehicle: BaseQuoteCalculatorInput['vehicle'] & {\n purchasePriceExclVat: string;\n agreedPrice: string;\n purchasePrice: string;\n };\n leasing: {\n deposit: string;\n depositMode: PricePercentageMode;\n depositPercentage: string;\n residual: string;\n residualMode: PricePercentageMode;\n residualPercentage: string;\n startupFee: string;\n startupFeeMode: PricePercentageMode;\n startupFeePercentage: string;\n interestRate: string;\n duration: number;\n contractStartDate: string;\n };\n bank: {\n interestRate: string;\n deposit: string;\n depositMode: PricePercentageMode;\n depositPercentage: string;\n residual: string;\n residualMode: PricePercentageMode;\n residualPercentage: string;\n duration: number;\n salesPrice: string;\n internalDealBranchId?: string;\n } & (\n | { selfFinancing: true; selfFinancingType?: SelfFinancingType; financing?: undefined }\n | {\n selfFinancing: false;\n selfFinancingType?: undefined;\n financing?: { bankAccountOrganizationId: string; amount: string };\n }\n );\n taxes: {\n yearlyRoadTax: boolean;\n yearlyRoadTaxCustomAmount: string;\n oneTimeRoadTax: boolean;\n margin: string; //Non Editable, copies the value insurance > margin\n };\n insurance: {\n margin: string;\n civilLiabilities: boolean;\n allRisks: boolean;\n specialTechnicalInsurance: boolean;\n roadAssistance: boolean;\n initialFractionPercentage: string;\n insuredAmount?: string;\n };\n deliveryPackage?: LeasingDeliveryPackageInput;\n extras: LeasingQuoteExtraInput[];\n customRequests: CustomLeasingQuoteExtraInput[];\n};\n\ntype BaseDeliveryType = {\n agreedPrice: string;\n spoiler?: SpoilerInfo;\n stackingVehicleNeeded?: boolean;\n detailsStacking?: string;\n};\n\nexport type PickUpDeliveryType = BaseDeliveryType & {\n type: DeliveryTypes.PICK_UP;\n urgent: boolean;\n transportationMode?: TransportationMode;\n detailsBorderCrossing?: string;\n technicalControlNeeded: boolean;\n insuranceNeeded: boolean;\n transitPlateBelgiumNeeded: boolean;\n transitPlateAustriaNeeded: boolean;\n licensePlateNeeded: boolean;\n dateOfPickUpByCustomer?: string;\n};\n\nexport type AddressDeliveryType = BaseDeliveryType & {\n type: DeliveryTypes.ADDRESS;\n address: LocationValue;\n distanceKm: string;\n technicalControlNeeded: boolean;\n};\n\nexport type PortDeliverytype = BaseDeliveryType & {\n type: DeliveryTypes.PORT | DeliveryTypes.PORT_AND_SHIP;\n portOriginId: string;\n portDestination?: string;\n shippingCompany?: string;\n portToPortCostPrice: string;\n portToPortMargin: string;\n};\n\n// Sent by the Frontend to bootstrap the calculator\nexport type SalesCalculatorDefaultInput = Omit<BaseQuoteCalculatorInput, 'vehicle'> & {\n vehicle: Omit<BaseQuoteCalculatorInput['vehicle'], 'vatRate'>;\n extras: SalesQuoteExtraInput[];\n customRequests: CustomSalesQuoteExtraInput[];\n};\n\nexport type SalesCalculatorInput = BaseQuoteCalculatorInput & {\n vehicle: BaseQuoteCalculatorInput['vehicle'] & {\n purchasePriceExclVat: string;\n premiumPrice?: string;\n minimumPrice: string;\n internetPrice?: string;\n comissionCost: string;\n };\n delivery?: PickUpDeliveryType | AddressDeliveryType | PortDeliverytype;\n extras: SalesQuoteExtraInput[];\n customRequests: CustomSalesQuoteExtraInput[];\n financing?: {\n organizationId: string;\n };\n};\n\nexport type SalesQuoteRuleInput = {\n minimumPrice?: number;\n internetPrice?: number;\n premiumPrice?: number;\n agreedPrice: number;\n stockAge: number;\n};\n\nexport type LeasingCalculatorOutput = {\n installment: string;\n installmentPrintable: string;\n totalMonthlyAmount: string;\n monthlyTaxesInsurance: string;\n beforeDeliveryExclVat: string;\n beforeDelivery: string;\n financingAmount: string;\n settingId: string;\n totalRetailAmountExclVat: string;\n totalRetailAmount: string;\n totalRetailAmountAlternativeCurrency?: string;\n totalRetailAmountExclVatAlternativeCurrency?: string;\n finalSalesPrice: string;\n roi: {\n value: string;\n target: string;\n perYear: string;\n difference: string;\n score?: QuoteMetricsScore;\n };\n cashflow: {\n deficit: string;\n balanced: boolean;\n score: QuoteMetricsScore;\n };\n profitability: {\n leasing: string;\n vehicle: string;\n total: string;\n score: QuoteMetricsScore;\n };\n taxes: {\n yearlyRetailPrice: string;\n monthlyRetailPrice: string;\n yearlyRoadTax: string;\n oneTimeRoadTax: string;\n profit: string;\n };\n insurance: {\n beforeDelivery: string;\n yearlyRetailPrice: string;\n monthlyRetailPrice: string;\n civilLiabilities: string;\n allRisks: string;\n specialTechnicalInsurance: string;\n roadAssistance: string;\n profit: string;\n };\n trackAndTrace: {\n beforeDelivery: string;\n monthlyCost: string;\n installationCost: string; // currently this cost is being included as part of monthlyCost. In future, this will be a separate cost\n deviceCost: string; // same as above\n profit: string;\n };\n costs: {\n financingAmount: string;\n finalCostPrice: string;\n monhtly: string;\n };\n};\n\nexport type SalesCalculatorOutput = {\n totalRetailAmount: string;\n totalRetailAmountExclVat: string;\n totalRetailAmountAlternativeCurrency?: string;\n totalRetailAmountExclVatAlternativeCurrency?: string;\n retailAmounts: {\n vehicle: string;\n delivery: string;\n extras: string;\n };\n vehicle: {\n purchasePrice: string; //incl vat\n agreedPrice: string; // incl vat\n };\n roi: { value: string; score?: QuoteMetricsScore };\n profit: {\n value: string;\n percentage: string;\n score: QuoteMetricsScore;\n };\n profitOverMin?: {\n // deprecated\n value: string;\n percentage: string;\n score: QuoteMetricsScore;\n };\n delivery?: {\n retailPrice?: string;\n costPrice?: string;\n cleaningNeeded: boolean;\n cleaningNeededRetailPrice: string;\n transportationToPortRetailPrice?: string;\n };\n costs: {\n finalCostPrice: string;\n extras: string;\n delivery: string;\n };\n};\n\ntype BaseQuote = {\n opportunityId: string;\n preferredLanguage: string;\n clientNotes?: string;\n publicNotes?: string;\n} & (\n | {\n type: OpportunityType.LEASING;\n calculatorInput: LeasingCalculatorInput;\n calculatorOutput: LeasingCalculatorOutput;\n rating?: MatchingRuleValue;\n }\n | {\n type: OpportunityType.SALES;\n calculatorInput: SalesCalculatorInput;\n calculatorOutput: SalesCalculatorOutput;\n rating?: MatchingRuleValue;\n }\n | {\n type: OpportunityType.NEW_TRAILER | OpportunityType.NEW_TRAILER_NEW_PRODUCTION;\n calculatorInput: SalesCalculatorInput;\n calculatorOutput: SalesCalculatorOutput;\n rating?: MatchingRuleValue;\n }\n | {\n type:\n | OpportunityType.CUSTOMMADE_CONSTRUCTION_OUTSOURCING\n | OpportunityType.CUSTOMMADE_CONSTRUCTION_INSOURCING;\n calculatorInput: SalesCalculatorInput;\n calculatorOutput: SalesCalculatorOutput;\n rating?: MatchingRuleValue;\n }\n);\n\nexport type NewQuote = BaseQuote & {\n id?: undefined;\n createdAt?: undefined;\n createdBy?: undefined;\n modifiedAt?: undefined;\n modifiedBy?: undefined;\n active: true;\n};\n\nexport type Quote = BaseQuote & {\n id: string;\n createdAt: string;\n createdBy: string;\n modifiedAt: string;\n modifiedBy: string;\n validationBy?: string;\n validationAt?: string;\n cancelledBy?: string;\n cancelledAt?: string;\n customerFeedbackAt?: string;\n customerFeedbackBy?: string;\n managerFeedbackAt?: string;\n managerFeedbackBy?: string;\n version: number;\n status: QuoteStatus;\n proformaPdf?: AttachmentValue;\n quotePdf?: AttachmentValue;\n salesAgreementPdf?: AttachmentValue;\n active: boolean;\n contactId: string;\n vehicleId: string;\n organizationId: string;\n technicalNotesUpdated: boolean;\n technicalNotesValidated: boolean;\n technicalNotesValidatedAt?: string;\n technicalNotesValidatedBy?: string;\n externalQuote?: boolean;\n};\n\nexport type QuoteUpdate = {\n status?: QuoteStatus;\n active?: boolean;\n technicalNotesValidated?: boolean;\n};\n\nexport type CalculatorLeasingIO = {\n output: LeasingCalculatorOutput;\n input: LeasingCalculatorInput;\n rating?: MatchingRuleValue;\n};\nexport type CalculatorSalesIO = {\n output: SalesCalculatorOutput;\n input: SalesCalculatorInput;\n rating?: MatchingRuleValue;\n};\nexport type CalculatorQuoteIO = CalculatorLeasingIO | CalculatorSalesIO;\n\nexport type DeliveryLocationValue = Omit<LocationValue, 'addressLine1' | 'city'> & {\n addressLine1: string;\n city: string;\n};\n\nexport type DeliveryRoutesRequest = {\n origin: DeliveryLocationValue;\n destination: DeliveryLocationValue;\n};\n\nexport type NewQuoteValidator = {\n userId: string;\n countryCode: string;\n type: OpportunityType;\n canValidateOwn?: boolean;\n};\n\nexport type QuoteValidator = NewQuoteValidator & {\n createdAt: string;\n};\n\nexport type QuoteValidatorUpdate = {\n canValidateOwn: boolean;\n};\n"]}
1
+ {"version":3,"file":"quotes.js","sourceRoot":"/","sources":["types/quotes.ts"],"names":[],"mappings":"AAYA,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,+CAA+B,CAAA;IAC/B,iCAAiB,CAAA;AACnB,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB;AAED,MAAM,CAAN,IAAY,WASX;AATD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,sCAAuB,CAAA;IACvB,0CAA2B,CAAA;IAC3B,oCAAqB,CAAA;IACrB,oCAAqB,CAAA;IACrB,sCAAuB,CAAA;IACvB,mDAAoC,CAAA;IACpC,mDAAoC,CAAA;AACtC,CAAC,EATW,WAAW,KAAX,WAAW,QAStB;AAED,MAAM,CAAN,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,wCAAmB,CAAA;IACnB,kCAAa,CAAA;AACf,CAAC,EAJW,iBAAiB,KAAjB,iBAAiB,QAI5B;AACD,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,mCAAkB,CAAA;IAClB,oCAAmB,CAAA;IACnB,8BAAa,CAAA;IACb,8CAA6B,CAAA;AAC/B,CAAC,EALW,aAAa,KAAb,aAAa,QAKxB;AAED,MAAM,CAAN,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,8BAAe,CAAA;IACf,kCAAmB,CAAA;IACnB,qCAAsB,CAAA;AACxB,CAAC,EAJW,WAAW,KAAX,WAAW,QAItB;AAED,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,wCAAkB,CAAA;IAClB,6CAAuB,CAAA;AACzB,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B;AAED,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,oDAA+B,CAAA;IAC/B,0DAAqC,CAAA;AACvC,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B","sourcesContent":["import { AttachmentValue, LocationValue } from '@bisondesk/commons-sdk/types';\nimport { OpportunityType } from '../constants.js';\nimport {\n CustomLeasingQuoteExtraInput,\n CustomSalesQuoteExtraInput,\n LeasingDeliveryPackageInput,\n LeasingQuoteExtraInput,\n SalesQuoteExtraInput,\n} from './leasing-settings.js';\nimport { MatchingRuleValue } from './roi-ratings.js';\nimport { PricePercentageMode } from './utils.js';\n\nexport enum QuoteActions {\n ACCEPT = 'accept',\n VALIDATE = 'validate',\n DONWLOAD_PDFS = 'download-pdfs',\n CANCEL = 'cancel',\n}\n\nexport enum QuoteStatus {\n CREATED = 'created',\n VALIDATED = 'validated',\n INVALIDATED = 'invalidated',\n ACCEPTED = 'accepted',\n REJECTED = 'rejected',\n CANCELLED = 'cancelled',\n MANAGER_REJECTED = 'managerRejected',\n MANAGER_ACCEPTED = 'managerAccepted',\n}\n\nexport enum QuoteMetricsScore {\n DANGER = 'danger',\n NEUTRAL = 'neutral',\n GOOD = 'good',\n}\nexport enum DeliveryTypes {\n PICK_UP = 'pickUp',\n ADDRESS = 'address',\n PORT = 'port',\n PORT_AND_SHIP = 'portAndShip',\n}\n\nexport enum SpoilerInfo {\n MOUNT = 'mount',\n UNMOUNT = 'unmount',\n NO_ACTION = 'noAction',\n}\n\nexport enum TransportationMode {\n BY_ROAD = 'byRoad',\n ON_LOW_BED = 'onLowBed',\n}\n\nexport enum SelfFinancingType {\n OWN_FINANCING = 'own_financing',\n ALREADY_FINANCED = 'already_financed',\n}\n\ntype BaseQuoteCalculatorInput = {\n branchId: string;\n branchCountry: string;\n customerCountry: string;\n customerVatNumber?: string;\n currency: string;\n alternativeCurrency?: string;\n exchangeRate?: string;\n vehicle: {\n id: string;\n category: string;\n bodywork?: string;\n agreedPriceExclVat: string;\n technicalNotes?: string;\n vatRate: string;\n };\n\n allRisksCost?: string;\n};\n\n// Sent by the Frontend to bootstrap the calculator\nexport type LeasingCalculatorDefaultInput = Omit<BaseQuoteCalculatorInput, 'vehicle'> & {\n vehicle: Omit<BaseQuoteCalculatorInput['vehicle'], 'vatRate'>;\n deliveryPackage?: LeasingQuoteExtraInput;\n settingsId: string;\n};\n\nexport type LeasingCalculatorInput = BaseQuoteCalculatorInput & {\n localLicensePlate: boolean;\n externalDelivery: boolean;\n settingsId: string;\n isRefinancingDebt?: boolean; // if true, the insurance amounts might not be the same as the leasing amount + and other costs like track and trace\n vehicle: BaseQuoteCalculatorInput['vehicle'] & {\n purchasePriceExclVat: string;\n agreedPrice: string;\n purchasePrice: string;\n };\n leasing: {\n deposit: string;\n depositMode: PricePercentageMode;\n depositPercentage: string;\n residual: string;\n residualMode: PricePercentageMode;\n residualPercentage: string;\n startupFee: string;\n startupFeeMode: PricePercentageMode;\n startupFeePercentage: string;\n /** Returnable security deposit (dépôt de garantie): VAT-free, never financed. Not the advance (`deposit`). */\n guaranteeDeposit?: string;\n interestRate: string;\n duration: number;\n contractStartDate: string;\n };\n bank: {\n interestRate: string;\n deposit: string;\n depositMode: PricePercentageMode;\n depositPercentage: string;\n residual: string;\n residualMode: PricePercentageMode;\n residualPercentage: string;\n duration: number;\n salesPrice: string;\n internalDealBranchId?: string;\n } & (\n | { selfFinancing: true; selfFinancingType?: SelfFinancingType; financing?: undefined }\n | {\n selfFinancing: false;\n selfFinancingType?: undefined;\n financing?: { bankAccountOrganizationId: string; amount: string };\n }\n );\n taxes: {\n yearlyRoadTax: boolean;\n yearlyRoadTaxCustomAmount: string;\n oneTimeRoadTax: boolean;\n margin: string; //Non Editable, copies the value insurance > margin\n };\n insurance: {\n margin: string;\n civilLiabilities: boolean;\n allRisks: boolean;\n specialTechnicalInsurance: boolean;\n roadAssistance: boolean;\n initialFractionPercentage: string;\n insuredAmount?: string;\n };\n deliveryPackage?: LeasingDeliveryPackageInput;\n extras: LeasingQuoteExtraInput[];\n customRequests: CustomLeasingQuoteExtraInput[];\n};\n\ntype BaseDeliveryType = {\n agreedPrice: string;\n spoiler?: SpoilerInfo;\n stackingVehicleNeeded?: boolean;\n detailsStacking?: string;\n};\n\nexport type PickUpDeliveryType = BaseDeliveryType & {\n type: DeliveryTypes.PICK_UP;\n urgent: boolean;\n transportationMode?: TransportationMode;\n detailsBorderCrossing?: string;\n technicalControlNeeded: boolean;\n insuranceNeeded: boolean;\n transitPlateBelgiumNeeded: boolean;\n transitPlateAustriaNeeded: boolean;\n licensePlateNeeded: boolean;\n dateOfPickUpByCustomer?: string;\n};\n\nexport type AddressDeliveryType = BaseDeliveryType & {\n type: DeliveryTypes.ADDRESS;\n address: LocationValue;\n distanceKm: string;\n technicalControlNeeded: boolean;\n};\n\nexport type PortDeliverytype = BaseDeliveryType & {\n type: DeliveryTypes.PORT | DeliveryTypes.PORT_AND_SHIP;\n portOriginId: string;\n portDestination?: string;\n shippingCompany?: string;\n portToPortCostPrice: string;\n portToPortMargin: string;\n};\n\n// Sent by the Frontend to bootstrap the calculator\nexport type SalesCalculatorDefaultInput = Omit<BaseQuoteCalculatorInput, 'vehicle'> & {\n vehicle: Omit<BaseQuoteCalculatorInput['vehicle'], 'vatRate'>;\n extras: SalesQuoteExtraInput[];\n customRequests: CustomSalesQuoteExtraInput[];\n};\n\nexport type SalesCalculatorInput = BaseQuoteCalculatorInput & {\n vehicle: BaseQuoteCalculatorInput['vehicle'] & {\n purchasePriceExclVat: string;\n premiumPrice?: string;\n minimumPrice: string;\n internetPrice?: string;\n comissionCost: string;\n };\n delivery?: PickUpDeliveryType | AddressDeliveryType | PortDeliverytype;\n extras: SalesQuoteExtraInput[];\n customRequests: CustomSalesQuoteExtraInput[];\n financing?: {\n organizationId: string;\n };\n};\n\nexport type SalesQuoteRuleInput = {\n minimumPrice?: number;\n internetPrice?: number;\n premiumPrice?: number;\n agreedPrice: number;\n stockAge: number;\n};\n\nexport type LeasingCalculatorOutput = {\n installment: string;\n installmentPrintable: string;\n totalMonthlyAmount: string;\n monthlyTaxesInsurance: string;\n beforeDeliveryExclVat: string;\n beforeDelivery: string;\n /** Portion of beforeDelivery that is the returnable guarantee deposit (VAT-free, not financed). */\n guaranteeDeposit?: string;\n financingAmount: string;\n settingId: string;\n totalRetailAmountExclVat: string;\n totalRetailAmount: string;\n totalRetailAmountAlternativeCurrency?: string;\n totalRetailAmountExclVatAlternativeCurrency?: string;\n finalSalesPrice: string;\n roi: {\n value: string;\n target: string;\n perYear: string;\n difference: string;\n score?: QuoteMetricsScore;\n };\n cashflow: {\n deficit: string;\n balanced: boolean;\n score: QuoteMetricsScore;\n };\n profitability: {\n leasing: string;\n vehicle: string;\n total: string;\n score: QuoteMetricsScore;\n };\n taxes: {\n yearlyRetailPrice: string;\n monthlyRetailPrice: string;\n yearlyRoadTax: string;\n oneTimeRoadTax: string;\n profit: string;\n };\n insurance: {\n beforeDelivery: string;\n yearlyRetailPrice: string;\n monthlyRetailPrice: string;\n civilLiabilities: string;\n allRisks: string;\n specialTechnicalInsurance: string;\n roadAssistance: string;\n profit: string;\n };\n trackAndTrace: {\n beforeDelivery: string;\n monthlyCost: string;\n installationCost: string; // currently this cost is being included as part of monthlyCost. In future, this will be a separate cost\n deviceCost: string; // same as above\n profit: string;\n };\n costs: {\n financingAmount: string;\n finalCostPrice: string;\n monhtly: string;\n };\n};\n\nexport type SalesCalculatorOutput = {\n totalRetailAmount: string;\n totalRetailAmountExclVat: string;\n totalRetailAmountAlternativeCurrency?: string;\n totalRetailAmountExclVatAlternativeCurrency?: string;\n retailAmounts: {\n vehicle: string;\n delivery: string;\n extras: string;\n };\n vehicle: {\n purchasePrice: string; //incl vat\n agreedPrice: string; // incl vat\n };\n roi: { value: string; score?: QuoteMetricsScore };\n profit: {\n value: string;\n percentage: string;\n score: QuoteMetricsScore;\n };\n profitOverMin?: {\n // deprecated\n value: string;\n percentage: string;\n score: QuoteMetricsScore;\n };\n delivery?: {\n retailPrice?: string;\n costPrice?: string;\n cleaningNeeded: boolean;\n cleaningNeededRetailPrice: string;\n transportationToPortRetailPrice?: string;\n };\n costs: {\n finalCostPrice: string;\n extras: string;\n delivery: string;\n };\n};\n\ntype BaseQuote = {\n opportunityId: string;\n preferredLanguage: string;\n clientNotes?: string;\n publicNotes?: string;\n} & (\n | {\n type: OpportunityType.LEASING;\n calculatorInput: LeasingCalculatorInput;\n calculatorOutput: LeasingCalculatorOutput;\n rating?: MatchingRuleValue;\n }\n | {\n type: OpportunityType.SALES;\n calculatorInput: SalesCalculatorInput;\n calculatorOutput: SalesCalculatorOutput;\n rating?: MatchingRuleValue;\n }\n | {\n type: OpportunityType.NEW_TRAILER | OpportunityType.NEW_TRAILER_NEW_PRODUCTION;\n calculatorInput: SalesCalculatorInput;\n calculatorOutput: SalesCalculatorOutput;\n rating?: MatchingRuleValue;\n }\n | {\n type:\n | OpportunityType.CUSTOMMADE_CONSTRUCTION_OUTSOURCING\n | OpportunityType.CUSTOMMADE_CONSTRUCTION_INSOURCING;\n calculatorInput: SalesCalculatorInput;\n calculatorOutput: SalesCalculatorOutput;\n rating?: MatchingRuleValue;\n }\n);\n\nexport type NewQuote = BaseQuote & {\n id?: undefined;\n createdAt?: undefined;\n createdBy?: undefined;\n modifiedAt?: undefined;\n modifiedBy?: undefined;\n active: true;\n};\n\nexport type Quote = BaseQuote & {\n id: string;\n createdAt: string;\n createdBy: string;\n modifiedAt: string;\n modifiedBy: string;\n validationBy?: string;\n validationAt?: string;\n cancelledBy?: string;\n cancelledAt?: string;\n customerFeedbackAt?: string;\n customerFeedbackBy?: string;\n managerFeedbackAt?: string;\n managerFeedbackBy?: string;\n version: number;\n status: QuoteStatus;\n proformaPdf?: AttachmentValue;\n quotePdf?: AttachmentValue;\n salesAgreementPdf?: AttachmentValue;\n active: boolean;\n contactId: string;\n vehicleId: string;\n organizationId: string;\n technicalNotesUpdated: boolean;\n technicalNotesValidated: boolean;\n technicalNotesValidatedAt?: string;\n technicalNotesValidatedBy?: string;\n externalQuote?: boolean;\n};\n\nexport type QuoteUpdate = {\n status?: QuoteStatus;\n active?: boolean;\n technicalNotesValidated?: boolean;\n};\n\nexport type CalculatorLeasingIO = {\n output: LeasingCalculatorOutput;\n input: LeasingCalculatorInput;\n rating?: MatchingRuleValue;\n};\nexport type CalculatorSalesIO = {\n output: SalesCalculatorOutput;\n input: SalesCalculatorInput;\n rating?: MatchingRuleValue;\n};\nexport type CalculatorQuoteIO = CalculatorLeasingIO | CalculatorSalesIO;\n\nexport type DeliveryLocationValue = Omit<LocationValue, 'addressLine1' | 'city'> & {\n addressLine1: string;\n city: string;\n};\n\nexport type DeliveryRoutesRequest = {\n origin: DeliveryLocationValue;\n destination: DeliveryLocationValue;\n};\n\nexport type NewQuoteValidator = {\n userId: string;\n countryCode: string;\n type: OpportunityType;\n canValidateOwn?: boolean;\n};\n\nexport type QuoteValidator = NewQuoteValidator & {\n createdAt: string;\n};\n\nexport type QuoteValidatorUpdate = {\n canValidateOwn: boolean;\n};\n"]}
@@ -12,5 +12,7 @@ export declare const isBeforeReferenceOpportunityStatus: (input: CompareInput) =
12
12
  export declare const isOpportunityLost: (input: Opportunity) => boolean;
13
13
  export declare const getOpportunityReservedStatus: () => OpportunityStatus[];
14
14
  export declare const isOpportunityReserved: (input: Opportunity) => boolean;
15
+ export declare const isOpportunityReservingVehicle: (input: Opportunity) => boolean;
16
+ export declare const getOpportunityReservedVehicleId: (input: Opportunity | undefined) => string | undefined;
15
17
  export {};
16
18
  //# sourceMappingURL=opportunities.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"opportunities.d.ts","sourceRoot":"/","sources":["utils/opportunities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAA0B,MAAM,2BAA2B,CAAC;AAEnG,KAAK,YAAY,GAAG;IAClB,aAAa,EAAE,iBAAiB,CAAC;IACjC,eAAe,EAAE,iBAAiB,CAAC;CACpC,CAAC;AAcF,eAAO,MAAM,iBAAiB,GAC5B,eAAe,iBAAiB,KAC/B,iBAAiB,GAAG,SAMtB,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,QAAQ,iBAAiB,KAAG,iBAAiB,GAAG,SAM7E,CAAC;AAEF,eAAO,MAAM,uCAAuC,GAAI,OAAO,YAAY,KAAG,OAI7E,CAAC;AAEF,eAAO,MAAM,iCAAiC,GAAI,OAAO,YAAY,KAAG,OAIvE,CAAC;AAEF,eAAO,MAAM,wCAAwC,GAAI,OAAO,YAAY,KAAG,OAI9E,CAAC;AAEF,eAAO,MAAM,kCAAkC,GAAI,OAAO,YAAY,KAAG,OAIxE,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,OAAO,WAAW,KAAG,OAA+B,CAAC;AAEvF,eAAO,MAAM,4BAA4B,QAAO,iBAAiB,EAIhE,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,OAAO,WAAW,KAAG,OACJ,CAAC"}
1
+ {"version":3,"file":"opportunities.d.ts","sourceRoot":"/","sources":["utils/opportunities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAA0B,MAAM,2BAA2B,CAAC;AAEnG,KAAK,YAAY,GAAG;IAClB,aAAa,EAAE,iBAAiB,CAAC;IACjC,eAAe,EAAE,iBAAiB,CAAC;CACpC,CAAC;AAcF,eAAO,MAAM,iBAAiB,GAC5B,eAAe,iBAAiB,KAC/B,iBAAiB,GAAG,SAMtB,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,QAAQ,iBAAiB,KAAG,iBAAiB,GAAG,SAM7E,CAAC;AAEF,eAAO,MAAM,uCAAuC,GAAI,OAAO,YAAY,KAAG,OAI7E,CAAC;AAEF,eAAO,MAAM,iCAAiC,GAAI,OAAO,YAAY,KAAG,OAIvE,CAAC;AAEF,eAAO,MAAM,wCAAwC,GAAI,OAAO,YAAY,KAAG,OAI9E,CAAC;AAEF,eAAO,MAAM,kCAAkC,GAAI,OAAO,YAAY,KAAG,OAIxE,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,OAAO,WAAW,KAAG,OAA+B,CAAC;AAEvF,eAAO,MAAM,4BAA4B,QAAO,iBAAiB,EAIhE,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,OAAO,WAAW,KAAG,OACJ,CAAC;AASxD,eAAO,MAAM,6BAA6B,GAAI,OAAO,WAAW,KAAG,OACR,CAAC;AAO5D,eAAO,MAAM,+BAA+B,GAC1C,OAAO,WAAW,GAAG,SAAS,KAC7B,MAAM,GAAG,SACyE,CAAC"}
@@ -45,4 +45,6 @@ export const getOpportunityReservedStatus = () => [
45
45
  OpportunityStatus.DELIVERY,
46
46
  ];
47
47
  export const isOpportunityReserved = (input) => getOpportunityReservedStatus().includes(input.status);
48
+ export const isOpportunityReservingVehicle = (input) => isOpportunityReserved(input) && !isOpportunityLost(input);
49
+ export const getOpportunityReservedVehicleId = (input) => input != null && isOpportunityReservingVehicle(input) ? input.vehicleId : undefined;
48
50
  //# sourceMappingURL=opportunities.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"opportunities.js","sourceRoot":"/","sources":["utils/opportunities.ts"],"names":[],"mappings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EAAE;IAChF,MAAM,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;IAEjF,OAAO,gBAAgB,GAAG,kBAAkB,CAAC;AAC/C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,wCAAwC,GAAG,CAAC,KAAmB,EAAW,EAAE;IACvF,MAAM,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;IAEjF,OAAO,gBAAgB,IAAI,kBAAkB,CAAC;AAChD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,KAAmB,EAAW,EAAE;IACjF,MAAM,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;IAEjF,OAAO,gBAAgB,GAAG,kBAAkB,CAAC;AAC/C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAkB,EAAW,EAAE,CAAC,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC;AAEvF,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAwB,EAAE,CAAC;IACrE,iBAAiB,CAAC,MAAM;IACxB,iBAAiB,CAAC,WAAW;IAC7B,iBAAiB,CAAC,QAAQ;CAC3B,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAAkB,EAAW,EAAE,CACnE,4BAA4B,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC","sourcesContent":["import { Opportunity, OpportunityStatus, OpportunityStatusOrder } from '../types/opportunities.js';\n\ntype CompareInput = {\n currentStatus: OpportunityStatus;\n referenceStatus: OpportunityStatus;\n};\n\nconst compareOpportunityStatus = (input: CompareInput) => {\n const { currentStatus, referenceStatus } = input;\n\n const currentStatusIdx = OpportunityStatusOrder.indexOf(currentStatus);\n const referenceStatusIdx = OpportunityStatusOrder.indexOf(referenceStatus);\n\n return {\n currentStatusIdx,\n referenceStatusIdx,\n };\n};\n\nexport const getPreviousStatus = (\n currentStatus: OpportunityStatus,\n): OpportunityStatus | undefined => {\n const currentIndex = OpportunityStatusOrder.indexOf(currentStatus);\n if (currentIndex === 0) {\n return;\n }\n return OpportunityStatusOrder[currentIndex - 1];\n};\n\nexport const getNextStatus = (status: OpportunityStatus): OpportunityStatus | undefined => {\n const statusIndex = OpportunityStatusOrder.indexOf(status);\n if (statusIndex >= OpportunityStatusOrder.length - 1) {\n return;\n }\n return OpportunityStatusOrder[statusIndex + 1];\n};\n\nexport const isSameOrAfterReferenceOpportunityStatus = (input: CompareInput): boolean => {\n const { currentStatusIdx, referenceStatusIdx } = compareOpportunityStatus(input);\n\n return currentStatusIdx >= referenceStatusIdx;\n};\n\nexport const isAfterReferenceOpportunityStatus = (input: CompareInput): boolean => {\n const { currentStatusIdx, referenceStatusIdx } = compareOpportunityStatus(input);\n\n return currentStatusIdx > referenceStatusIdx;\n};\n\nexport const isSameOrBeforeReferenceOpportunityStatus = (input: CompareInput): boolean => {\n const { currentStatusIdx, referenceStatusIdx } = compareOpportunityStatus(input);\n\n return currentStatusIdx <= referenceStatusIdx;\n};\n\nexport const isBeforeReferenceOpportunityStatus = (input: CompareInput): boolean => {\n const { currentStatusIdx, referenceStatusIdx } = compareOpportunityStatus(input);\n\n return currentStatusIdx < referenceStatusIdx;\n};\n\nexport const isOpportunityLost = (input: Opportunity): boolean => input.lostAt != null;\n\nexport const getOpportunityReservedStatus = (): OpportunityStatus[] => [\n OpportunityStatus.REVIEW,\n OpportunityStatus.PREPARATION,\n OpportunityStatus.DELIVERY,\n];\n\nexport const isOpportunityReserved = (input: Opportunity): boolean =>\n getOpportunityReservedStatus().includes(input.status);\n"]}
1
+ {"version":3,"file":"opportunities.js","sourceRoot":"/","sources":["utils/opportunities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAOnG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Opportunity, OpportunityStatus, OpportunityStatusOrder } from '../types/opportunities.js';\n\ntype CompareInput = {\n currentStatus: OpportunityStatus;\n referenceStatus: OpportunityStatus;\n};\n\nconst compareOpportunityStatus = (input: CompareInput) => {\n const { currentStatus, referenceStatus } = input;\n\n const currentStatusIdx = OpportunityStatusOrder.indexOf(currentStatus);\n const referenceStatusIdx = OpportunityStatusOrder.indexOf(referenceStatus);\n\n return {\n currentStatusIdx,\n referenceStatusIdx,\n };\n};\n\nexport const getPreviousStatus = (\n currentStatus: OpportunityStatus,\n): OpportunityStatus | undefined => {\n const currentIndex = OpportunityStatusOrder.indexOf(currentStatus);\n if (currentIndex === 0) {\n return;\n }\n return OpportunityStatusOrder[currentIndex - 1];\n};\n\nexport const getNextStatus = (status: OpportunityStatus): OpportunityStatus | undefined => {\n const statusIndex = OpportunityStatusOrder.indexOf(status);\n if (statusIndex >= OpportunityStatusOrder.length - 1) {\n return;\n }\n return OpportunityStatusOrder[statusIndex + 1];\n};\n\nexport const isSameOrAfterReferenceOpportunityStatus = (input: CompareInput): boolean => {\n const { currentStatusIdx, referenceStatusIdx } = compareOpportunityStatus(input);\n\n return currentStatusIdx >= referenceStatusIdx;\n};\n\nexport const isAfterReferenceOpportunityStatus = (input: CompareInput): boolean => {\n const { currentStatusIdx, referenceStatusIdx } = compareOpportunityStatus(input);\n\n return currentStatusIdx > referenceStatusIdx;\n};\n\nexport const isSameOrBeforeReferenceOpportunityStatus = (input: CompareInput): boolean => {\n const { currentStatusIdx, referenceStatusIdx } = compareOpportunityStatus(input);\n\n return currentStatusIdx <= referenceStatusIdx;\n};\n\nexport const isBeforeReferenceOpportunityStatus = (input: CompareInput): boolean => {\n const { currentStatusIdx, referenceStatusIdx } = compareOpportunityStatus(input);\n\n return currentStatusIdx < referenceStatusIdx;\n};\n\nexport const isOpportunityLost = (input: Opportunity): boolean => input.lostAt != null;\n\nexport const getOpportunityReservedStatus = (): OpportunityStatus[] => [\n OpportunityStatus.REVIEW,\n OpportunityStatus.PREPARATION,\n OpportunityStatus.DELIVERY,\n];\n\nexport const isOpportunityReserved = (input: Opportunity): boolean =>\n getOpportunityReservedStatus().includes(input.status);\n\n/**\n * Whether the opportunity currently reserves the vehicle attached to it: reserved-stage\n * (REVIEW onwards) and not lost — independent of whether a reservation row exists. Query-side\n * twin: `getOpportunityReservingVehicle` in core's opportunities/read.ts. Availability\n * propagation, warnings and guards must share this one definition rather than re-composing\n * the two primitives.\n */\nexport const isOpportunityReservingVehicle = (input: Opportunity): boolean =>\n isOpportunityReserved(input) && !isOpportunityLost(input);\n\n/**\n * The vehicle the opportunity currently reserves, if any — undefined outside the reserved\n * range, when lost, without a vehicle, or for a missing opportunity. Compare this value\n * before/after an update to detect a vehicle being taken or freed.\n */\nexport const getOpportunityReservedVehicleId = (\n input: Opportunity | undefined,\n): string | undefined =>\n input != null && isOpportunityReservingVehicle(input) ? input.vehicleId : undefined;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bisondesk/core-sdk",
3
- "version": "1.0.622",
3
+ "version": "1.0.624",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "author": "TheTruckCompany",
@@ -0,0 +1,41 @@
1
+ import { OpportunityType } from '../constants.js';
2
+ import { OpportunityStatus } from './opportunities.js';
3
+
4
+ /**
5
+ * One downstream tenant on the cross-tenant copy chain of an opportunity's vehicle,
6
+ * with the aggregate state of that tenant's own sale payments. Only hops whose copy
7
+ * has an active (not lost, reserved-stage) sale opportunity are returned; individual
8
+ * payment entries never leave their tenant (ADR-0024).
9
+ */
10
+ export type IntercompanyPaymentHop = {
11
+ tenantId: string;
12
+ tenantName: string;
13
+ /** Deep link to the hop opportunity on the target tenant's own subdomain. */
14
+ opportunityUrl: string;
15
+ /**
16
+ * Currency of the amounts: the hop opportunity's quote currency. A reserved-stage
17
+ * opportunity always carries a quote; hops missing one (malformed) are skipped.
18
+ */
19
+ currency: string;
20
+ vehicle: {
21
+ id: string;
22
+ stockNumber: string;
23
+ };
24
+ sale: {
25
+ opportunityId: string;
26
+ status: OpportunityStatus;
27
+ /** Lets the client mirror the hop's own label (total payment vs total before delivery). */
28
+ type: OpportunityType;
29
+ };
30
+ /**
31
+ * Exactly the figure the hop's own payments section shows (the accepted quote's
32
+ * total payment before delivery). Absent until that hop's quote is manager-accepted.
33
+ */
34
+ expectedTotal?: string;
35
+ /** Sum of the hop opportunity's non-deleted payment amounts. */
36
+ paid: string;
37
+ };
38
+
39
+ export type IntercompanyPaymentsResponse = {
40
+ hops: IntercompanyPaymentHop[];
41
+ };
@@ -171,6 +171,8 @@ export type NextLeasingRentRowResponse = {
171
171
  type BaseRef = {
172
172
  id: string;
173
173
  depositAmount: string;
174
+ /** Returnable guarantee deposit (dépôt de garantie) collected before delivery; VAT-free, restituted at contract end. */
175
+ guaranteeDepositAmount?: string;
174
176
  durationInMonths: number;
175
177
  taxesAmount?: string;
176
178
  insuranceAmount?: string;
@@ -389,6 +391,8 @@ export type AmortizationTableTemplateData = {
389
391
  deposit: string;
390
392
  depositExclVat: string;
391
393
  depositVat: string;
394
+ /** Returnable guarantee deposit; VAT-free, so incl and excl VAT are the same amount. */
395
+ guaranteeDeposit?: string;
392
396
  installment: string;
393
397
  installmentVat: string;
394
398
  installmentExclVat: string;
@@ -92,6 +92,7 @@ export enum OpportunityWarningsCode {
92
92
  VEHICLE_TECHNICAL_DETAILS_CHANGED = 'vehicle_technical_details_changed',
93
93
  QUOTE_MISSING_FINANCING_DETAILS = 'quote_missing_financing_details',
94
94
  VEHICLE_BRANCH_MISMATCH = 'vehicle_branch_mismatch',
95
+ VEHICLE_UNAVAILABLE_AT_SOURCE = 'vehicle_unavailable_at_source',
95
96
  }
96
97
 
97
98
  export const OpportunityWonColumnId = 'closed_won';
@@ -426,6 +427,8 @@ export type LeasingQuoteTemplateData = {
426
427
  depositExclVat: string;
427
428
  startupFee: string;
428
429
  startupFeeExclVat: string;
430
+ /** Returnable guarantee deposit; VAT-free, so incl and excl VAT are the same amount. */
431
+ guaranteeDeposit?: string;
429
432
  totalExtras: string;
430
433
  totalExtrasExclVat: string;
431
434
  totalBeforeDeliveryExclVat: string;
@@ -485,6 +488,8 @@ export type LeasingProformaTemplateData = {
485
488
  vatAmount: string;
486
489
  displayVatMessage: boolean;
487
490
  total: string;
491
+ /** Returnable guarantee deposit included in the totals; VAT-free. */
492
+ guaranteeDeposit?: string;
488
493
  monthly: string;
489
494
  monthlyExclVat: string;
490
495
  residual: string;
@@ -590,64 +595,84 @@ export type MSearchOpportunitiesKanbanColumn = {
590
595
  nextToken?: string;
591
596
  };
592
597
 
598
+ type HpLeasingDealRunDataBase = {
599
+ bisondeskTenantId: string;
600
+ entityOwner: string;
601
+ opportunityId: string;
602
+ };
603
+
604
+ // Field ids match the hpaci (Mr Lease CI) leasing-deal process definition: the LD is the only
605
+ // Hyperportal process for that tenant (no C flow) and the contract document lives in BisonDesk.
606
+ export type HpLeasingDealRunDataCi = HpLeasingDealRunDataBase & {
607
+ client?: string;
608
+ vendeur?: string;
609
+ vehicule?: string;
610
+ plaqueDimmatriculation?: string;
611
+ numeroDeContratLeasing: string;
612
+ prixDeVenteHorsTvaXof: string;
613
+ montantDavanceTtcXof: string;
614
+ dueeDuLeasingEnMois: number;
615
+ travauxHorsNormesNecessaire: boolean;
616
+ descriptionDesTravauxHorsNormes: string;
617
+ };
618
+
593
619
  export type HpLeasingDealRequest = {
594
620
  tenantId: string;
595
621
  initiatedBy: 'bisondesk';
596
622
  processMetaId: string;
597
- processRunData: {
598
- bisondeskTenantId: string;
599
- entityOwner: string;
600
- leasingContractOwner?: string;
601
- foreseenDeliveryDate?: string;
602
- deliveryAddressLeasing?: string;
603
- nameSalesPerson: string;
604
- durationLeasingInMonths: number;
605
- vanCourier: boolean;
606
- newVehicle?: boolean;
607
- newTrailer?: boolean;
608
- registrationOnTtcoBe?: boolean;
609
- externalDelivery?: boolean;
610
- civilLiabilities?: boolean;
611
- specialTechnicalInsurance?: boolean;
612
- allRisks?: boolean;
613
- roadAssistance?: boolean;
614
- vabAssistanceVan?: boolean;
615
- yearOfConstruction?: number;
616
- chassisnumber?: string;
617
- vehicleModel?: string;
618
- vehicleCategory2?: string;
619
- licencePlate?: string;
620
- vatPercentage?: number;
621
-
622
- opportunityContractId: string;
623
- opportunityId: string;
624
-
625
- company?: string;
626
- customerNumber?: number; //bisondesk external id
627
- slbPartner?: string;
628
- //MrLease fields
629
- vehicle?: string;
630
- vehicleNewReferenceMl?: string;
631
- referencePurchaserTtcoKleyn?: string;
632
- salesPriceEur: string;
633
- depositFullAmountExclVat: string;
634
- depositToBePrepaidExclVat: string;
635
- vehicleMake3?: string;
636
-
637
- //TTC fields
638
- vehicleOriginalReference?: string;
639
- salesPrice: string;
640
- depositFullAmount: string;
641
- depositAmountToBePrepaid: string;
642
- make?: string;
643
-
644
- //Extras
645
- garageExtrasCodes: string[];
646
- allExtrasDescriptions: string[];
647
- administrationExtrasCodes: string[];
648
- logisticExtrasCodes: string[];
649
- customRequestDescriptions: string[];
650
- };
623
+ processRunData: HpLeasingDealRunDataDefault | HpLeasingDealRunDataCi;
624
+ };
625
+
626
+ export type HpLeasingDealRunDataDefault = HpLeasingDealRunDataBase & {
627
+ leasingContractOwner?: string;
628
+ foreseenDeliveryDate?: string;
629
+ deliveryAddressLeasing?: string;
630
+ nameSalesPerson: string;
631
+ durationLeasingInMonths: number;
632
+ vanCourier: boolean;
633
+ newVehicle?: boolean;
634
+ newTrailer?: boolean;
635
+ registrationOnTtcoBe?: boolean;
636
+ externalDelivery?: boolean;
637
+ civilLiabilities?: boolean;
638
+ specialTechnicalInsurance?: boolean;
639
+ allRisks?: boolean;
640
+ roadAssistance?: boolean;
641
+ vabAssistanceVan?: boolean;
642
+ yearOfConstruction?: number;
643
+ chassisnumber?: string;
644
+ vehicleModel?: string;
645
+ vehicleCategory2?: string;
646
+ licencePlate?: string;
647
+ vatPercentage?: number;
648
+
649
+ opportunityContractId: string;
650
+
651
+ company?: string;
652
+ customerNumber?: number; //bisondesk external id
653
+ slbPartner?: string;
654
+ //MrLease fields
655
+ vehicle?: string;
656
+ vehicleNewReferenceMl?: string;
657
+ referencePurchaserTtcoKleyn?: string;
658
+ salesPriceEur: string;
659
+ depositFullAmountExclVat: string;
660
+ depositToBePrepaidExclVat: string;
661
+ vehicleMake3?: string;
662
+
663
+ //TTC fields
664
+ vehicleOriginalReference?: string;
665
+ salesPrice: string;
666
+ depositFullAmount: string;
667
+ depositAmountToBePrepaid: string;
668
+ make?: string;
669
+
670
+ //Extras
671
+ garageExtrasCodes: string[];
672
+ allExtrasDescriptions: string[];
673
+ administrationExtrasCodes: string[];
674
+ logisticExtrasCodes: string[];
675
+ customRequestDescriptions: string[];
651
676
  };
652
677
 
653
678
  export type HpLeasingDealResponse = {
@@ -465,4 +465,11 @@ export type ProspectUpdatedEvent = BaseProspectEvent & {
465
465
  previousProspect: Prospect;
466
466
  };
467
467
 
468
- export type ProspectEvent = ProspectCreatedEvent | ProspectUpdatedEvent;
468
+ export type ProspectDeletedEvent = BaseProspectEvent & {
469
+ action: 'delete';
470
+ prospect?: undefined;
471
+ /** Snapshot of the prospect as it was at the moment of deletion. */
472
+ previousProspect: Prospect;
473
+ };
474
+
475
+ export type ProspectEvent = ProspectCreatedEvent | ProspectUpdatedEvent | ProspectDeletedEvent;
@@ -103,6 +103,8 @@ export type LeasingCalculatorInput = BaseQuoteCalculatorInput & {
103
103
  startupFee: string;
104
104
  startupFeeMode: PricePercentageMode;
105
105
  startupFeePercentage: string;
106
+ /** Returnable security deposit (dépôt de garantie): VAT-free, never financed. Not the advance (`deposit`). */
107
+ guaranteeDeposit?: string;
106
108
  interestRate: string;
107
109
  duration: number;
108
110
  contractStartDate: string;
@@ -220,6 +222,8 @@ export type LeasingCalculatorOutput = {
220
222
  monthlyTaxesInsurance: string;
221
223
  beforeDeliveryExclVat: string;
222
224
  beforeDelivery: string;
225
+ /** Portion of beforeDelivery that is the returnable guarantee deposit (VAT-free, not financed). */
226
+ guaranteeDeposit?: string;
223
227
  financingAmount: string;
224
228
  settingId: string;
225
229
  totalRetailAmountExclVat: string;
@@ -69,3 +69,23 @@ export const getOpportunityReservedStatus = (): OpportunityStatus[] => [
69
69
 
70
70
  export const isOpportunityReserved = (input: Opportunity): boolean =>
71
71
  getOpportunityReservedStatus().includes(input.status);
72
+
73
+ /**
74
+ * Whether the opportunity currently reserves the vehicle attached to it: reserved-stage
75
+ * (REVIEW onwards) and not lost — independent of whether a reservation row exists. Query-side
76
+ * twin: `getOpportunityReservingVehicle` in core's opportunities/read.ts. Availability
77
+ * propagation, warnings and guards must share this one definition rather than re-composing
78
+ * the two primitives.
79
+ */
80
+ export const isOpportunityReservingVehicle = (input: Opportunity): boolean =>
81
+ isOpportunityReserved(input) && !isOpportunityLost(input);
82
+
83
+ /**
84
+ * The vehicle the opportunity currently reserves, if any — undefined outside the reserved
85
+ * range, when lost, without a vehicle, or for a missing opportunity. Compare this value
86
+ * before/after an update to detect a vehicle being taken or freed.
87
+ */
88
+ export const getOpportunityReservedVehicleId = (
89
+ input: Opportunity | undefined,
90
+ ): string | undefined =>
91
+ input != null && isOpportunityReservingVehicle(input) ? input.vehicleId : undefined;