@bisondesk/core-sdk 1.0.597 → 1.0.599
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.
- package/lib/constants.d.ts +0 -1
- package/lib/constants.d.ts.map +1 -1
- package/lib/constants.js +0 -1
- package/lib/constants.js.map +1 -1
- package/lib/types/crm.d.ts +3 -1
- package/lib/types/crm.d.ts.map +1 -1
- package/lib/types/crm.js +1 -0
- package/lib/types/crm.js.map +1 -1
- package/lib/types/leasing.d.ts +5 -0
- package/lib/types/leasing.d.ts.map +1 -1
- package/lib/types/leasing.js.map +1 -1
- package/lib/types/marketing.d.ts +1 -0
- package/lib/types/marketing.d.ts.map +1 -1
- package/lib/types/marketing.js.map +1 -1
- package/lib/types/opportunities.d.ts +1 -0
- package/lib/types/opportunities.d.ts.map +1 -1
- package/lib/types/opportunities.js +1 -0
- package/lib/types/opportunities.js.map +1 -1
- package/lib/types/vehicles.d.ts +1 -0
- package/lib/types/vehicles.d.ts.map +1 -1
- package/lib/types/vehicles.js.map +1 -1
- package/lib/utils/contacts.d.ts +6 -0
- package/lib/utils/contacts.d.ts.map +1 -0
- package/lib/utils/contacts.js +8 -0
- package/lib/utils/contacts.js.map +1 -0
- package/package.json +3 -3
- package/src/constants.ts +1 -1
- package/src/types/crm.ts +3 -0
- package/src/types/leasing.ts +10 -0
- package/src/types/marketing.ts +12 -0
- package/src/types/opportunities.ts +1 -0
- package/src/types/vehicles.ts +7 -0
- package/src/utils/contacts.ts +16 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/src/types/activities.js +0 -13
- package/src/types/activities.js.map +0 -1
- package/src/types/comparables.js +0 -2
- package/src/types/comparables.js.map +0 -1
- package/src/types/crm.js +0 -58
- package/src/types/crm.js.map +0 -1
- package/src/types/dashboard.js +0 -2
- package/src/types/dashboard.js.map +0 -1
- package/src/types/definitions.js +0 -2
- package/src/types/definitions.js.map +0 -1
- package/src/types/fields.js +0 -2
- package/src/types/fields.js.map +0 -1
- package/src/types/insights.js +0 -2
- package/src/types/insights.js.map +0 -1
- package/src/types/interests.js +0 -6
- package/src/types/interests.js.map +0 -1
- package/src/types/internal-events.js +0 -18
- package/src/types/internal-events.js.map +0 -1
- package/src/types/internet-opportunities.js +0 -2
- package/src/types/internet-opportunities.js.map +0 -1
- package/src/types/internet-vehicles.js +0 -2
- package/src/types/internet-vehicles.js.map +0 -1
- package/src/types/leasing-administration.js +0 -2
- package/src/types/leasing-administration.js.map +0 -1
- package/src/types/leasing-debtors.js +0 -2
- package/src/types/leasing-debtors.js.map +0 -1
- package/src/types/leasing-search.js +0 -2
- package/src/types/leasing-search.js.map +0 -1
- package/src/types/leasing-settings.js +0 -7
- package/src/types/leasing-settings.js.map +0 -1
- package/src/types/leasing.js +0 -38
- package/src/types/leasing.js.map +0 -1
- package/src/types/marketing.js +0 -35
- package/src/types/marketing.js.map +0 -1
- package/src/types/offers.js +0 -56
- package/src/types/opportunities.js +0 -107
- package/src/types/opportunities.js.map +0 -1
- package/src/types/payments.js +0 -7
- package/src/types/picklists.js +0 -2
- package/src/types/picklists.js.map +0 -1
- package/src/types/quotes.js +0 -42
- package/src/types/recently-viewed.js +0 -2
- package/src/types/recently-viewed.js.map +0 -1
- package/src/types/reservations.js +0 -5
- package/src/types/reservations.js.map +0 -1
- package/src/types/roi-ratings.js +0 -5
- package/src/types/roi-ratings.js.map +0 -1
- package/src/types/saved-filters.js +0 -9
- package/src/types/saved-filters.js.map +0 -1
- package/src/types/search.js +0 -2
- package/src/types/search.js.map +0 -1
- package/src/types/settings.js +0 -2
- package/src/types/settings.js.map +0 -1
- package/src/types/templates.js +0 -2
- package/src/types/templates.js.map +0 -1
- package/src/types/tenants.js +0 -21
- package/src/types/tenants.js.map +0 -1
- package/src/types/user-performance.js +0 -7
- package/src/types/user-performance.js.map +0 -1
- package/src/types/utils.js +0 -2
- package/src/types/validation.js +0 -2
- package/src/types/validation.js.map +0 -1
- package/src/types/vehicle-sales.js +0 -6
- package/src/types/vehicle-sales.js.map +0 -1
- package/src/types/vehicles.js +0 -98
- package/src/types/vehicles.js.map +0 -1
- package/src/utils/leasing.js +0 -6
- package/src/utils/leasing.js.map +0 -1
- package/src/utils/opportunities.js +0 -48
- package/src/utils/opportunities.js.map +0 -1
package/src/types/marketing.ts
CHANGED
|
@@ -21,6 +21,18 @@ export type VehicleMarketingTargetTenant = {
|
|
|
21
21
|
tenantId: string;
|
|
22
22
|
branchId?: string;
|
|
23
23
|
allowWebsiteList?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* `true` when the entry was added by a human ticking the checkbox in the marketing form.
|
|
26
|
+
* Human-added entries are user-pinned: they persist until the user unchecks them, and
|
|
27
|
+
* they anchor the target copy alive (the copy is downgraded to UNKNOWN role rather than
|
|
28
|
+
* deleted when the filter no longer matches).
|
|
29
|
+
*
|
|
30
|
+
* Undefined or `false` means the entry was created by cross-tenant sync because the
|
|
31
|
+
* source vehicle matched the target's filter. Such entries are safe to remove
|
|
32
|
+
* automatically when the filter no longer matches and nothing else anchors the target
|
|
33
|
+
* copy. This is the default for legacy entries that predate this flag.
|
|
34
|
+
*/
|
|
35
|
+
humanAdded?: boolean;
|
|
24
36
|
};
|
|
25
37
|
|
|
26
38
|
export type VehicleMarketing = {
|
|
@@ -343,6 +343,7 @@ export const QUOTE_NEEDS_VALIDATION_NOTIFICATION_ORIGIN = 'quote-validation';
|
|
|
343
343
|
export const QUOTE_NOT_CREATED_BY_ACCOUNT_MANAGER = 'quote-not-created-by-account-manager';
|
|
344
344
|
export const QUOTE_VALIDATOR_FEEDBACK_NOTIFICATION_ORIGIN = 'quote-validation-feedback';
|
|
345
345
|
|
|
346
|
+
export const OPPORTUNITY_ASSIGNED_NOTIFICATION_ORIGIN = 'opportunity-assigned';
|
|
346
347
|
export const OPPORTUNITY_VEHICLE_AVAILABLE_NOTIFICATION_ORIGIN = 'opportunity-vehicle-available';
|
|
347
348
|
export const OPPORTUNITY_VEHICLE_DELIVERY_NOTIFICATION_ORIGIN = 'opportunity-vehicle-delivery';
|
|
348
349
|
export const OPPORTUNITY_VEHICLE_RESERVATION_ABOUT_TO_EXPIRE_NOTIFICATION_ORIGIN =
|
package/src/types/vehicles.ts
CHANGED
|
@@ -379,6 +379,13 @@ export type VehicleOriginalInfo = {
|
|
|
379
379
|
remarks?: string;
|
|
380
380
|
available?: boolean;
|
|
381
381
|
};
|
|
382
|
+
/**
|
|
383
|
+
* The immediate source's sellability at the last sync hop: true when the source was not
|
|
384
|
+
* sellable — not in `SALE` role, had an active reservation or external sale, or was itself
|
|
385
|
+
* unavailable. Derived (never set by a human) and refreshed on every cross-tenant update so
|
|
386
|
+
* it cascades down the whole chain.
|
|
387
|
+
*/
|
|
388
|
+
unavailable?: boolean;
|
|
382
389
|
};
|
|
383
390
|
/**
|
|
384
391
|
* Deepest-origin tenant/branch in a multi-hop sync chain. Carries forward
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const JOB_CATEGORY_OTHER_ID = 'job_category_other';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Resolves a contact's job to the value that downstream systems should see.
|
|
5
|
+
* When the picklist selection is "Other", the custom `jobOther` text takes precedence;
|
|
6
|
+
* otherwise the picklist id in `job` is returned as-is.
|
|
7
|
+
*/
|
|
8
|
+
export const resolveContactJob = (contact: {
|
|
9
|
+
job?: string;
|
|
10
|
+
jobOther?: string;
|
|
11
|
+
}): string | undefined => {
|
|
12
|
+
if (contact.job === JOB_CATEGORY_OTHER_ID && contact.jobOther) {
|
|
13
|
+
return contact.jobOther;
|
|
14
|
+
}
|
|
15
|
+
return contact.job;
|
|
16
|
+
};
|