From 7fe7129a58c906c25fba11531dcd11e2f1b469c6 Mon Sep 17 00:00:00 2001 From: Gregory Fox Date: Thu, 4 Apr 2024 06:00:27 +0800 Subject: [PATCH 1/2] fix: add missing lead attributes --- src/api/activeRecords/Lead.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/api/activeRecords/Lead.ts b/src/api/activeRecords/Lead.ts index a2a7e982..c6ad7d4b 100644 --- a/src/api/activeRecords/Lead.ts +++ b/src/api/activeRecords/Lead.ts @@ -129,6 +129,9 @@ export class BaseLead extends ResourceEntity { this.pipeline_id = attributes.pipeline_id; this.loss_reason_id = attributes.loss_reason_id; this.source_id = attributes.source_id; + this.created_at = attributes.created_at; + this.closed_at = attributes.closed_at; + this.updated_at = attributes.updated_at; this.created_by = attributes.created_by; this.updated_by = attributes.updated_by; this.closed_task_at = attributes.closed_task_at; From c977815cadb29c3b8c5ec9a4a3dfa2e223cb788a Mon Sep 17 00:00:00 2001 From: Gregory Fox Date: Thu, 4 Apr 2024 06:21:02 +0800 Subject: [PATCH 2/2] fix: add labor_cost to Lead and reorder attribustes --- src/api/activeRecords/Lead.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/api/activeRecords/Lead.ts b/src/api/activeRecords/Lead.ts index c6ad7d4b..48db59db 100644 --- a/src/api/activeRecords/Lead.ts +++ b/src/api/activeRecords/Lead.ts @@ -47,6 +47,7 @@ export interface LeadAttributes extends IEntityAttributes { custom_fields_values?: JSONObject[] | null; score?: number | null; account_id?: number; + labor_cost?: number; is_price_modified_by_robot?: boolean; _embedded?: ILeadEmbedded; } @@ -93,6 +94,7 @@ export class BaseLead extends ResourceEntity { custom_fields_values?: JSONObject[] | null; score?: number | null; account_id?: number; + labor_cost?: number; is_price_modified_by_robot?: boolean; _embedded?: ILeadEmbedded; @@ -114,6 +116,7 @@ export class BaseLead extends ResourceEntity { custom_fields_values: this.custom_fields_values, score: this.score, account_id: this.account_id, + labor_cost: this.labor_cost, is_price_modified_by_robot: this.is_price_modified_by_robot, _embedded: this._embedded }; @@ -129,16 +132,17 @@ export class BaseLead extends ResourceEntity { this.pipeline_id = attributes.pipeline_id; this.loss_reason_id = attributes.loss_reason_id; this.source_id = attributes.source_id; - this.created_at = attributes.created_at; - this.closed_at = attributes.closed_at; - this.updated_at = attributes.updated_at; this.created_by = attributes.created_by; this.updated_by = attributes.updated_by; + this.closed_at = attributes.closed_at; + this.created_at = attributes.created_at; + this.updated_at = attributes.updated_at; this.closed_task_at = attributes.closed_task_at; this.is_deleted = attributes.is_deleted; this.custom_fields_values = attributes.custom_fields_values; this.score = attributes.score; this.account_id = attributes.account_id; + this.labor_cost = attributes.labor_cost; this.is_price_modified_by_robot = attributes.is_price_modified_by_robot; this._embedded = attributes._embedded; }