@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.
Files changed (104) hide show
  1. package/lib/constants.d.ts +0 -1
  2. package/lib/constants.d.ts.map +1 -1
  3. package/lib/constants.js +0 -1
  4. package/lib/constants.js.map +1 -1
  5. package/lib/types/crm.d.ts +3 -1
  6. package/lib/types/crm.d.ts.map +1 -1
  7. package/lib/types/crm.js +1 -0
  8. package/lib/types/crm.js.map +1 -1
  9. package/lib/types/leasing.d.ts +5 -0
  10. package/lib/types/leasing.d.ts.map +1 -1
  11. package/lib/types/leasing.js.map +1 -1
  12. package/lib/types/marketing.d.ts +1 -0
  13. package/lib/types/marketing.d.ts.map +1 -1
  14. package/lib/types/marketing.js.map +1 -1
  15. package/lib/types/opportunities.d.ts +1 -0
  16. package/lib/types/opportunities.d.ts.map +1 -1
  17. package/lib/types/opportunities.js +1 -0
  18. package/lib/types/opportunities.js.map +1 -1
  19. package/lib/types/vehicles.d.ts +1 -0
  20. package/lib/types/vehicles.d.ts.map +1 -1
  21. package/lib/types/vehicles.js.map +1 -1
  22. package/lib/utils/contacts.d.ts +6 -0
  23. package/lib/utils/contacts.d.ts.map +1 -0
  24. package/lib/utils/contacts.js +8 -0
  25. package/lib/utils/contacts.js.map +1 -0
  26. package/package.json +3 -3
  27. package/src/constants.ts +1 -1
  28. package/src/types/crm.ts +3 -0
  29. package/src/types/leasing.ts +10 -0
  30. package/src/types/marketing.ts +12 -0
  31. package/src/types/opportunities.ts +1 -0
  32. package/src/types/vehicles.ts +7 -0
  33. package/src/utils/contacts.ts +16 -0
  34. package/tsconfig.tsbuildinfo +1 -1
  35. package/src/types/activities.js +0 -13
  36. package/src/types/activities.js.map +0 -1
  37. package/src/types/comparables.js +0 -2
  38. package/src/types/comparables.js.map +0 -1
  39. package/src/types/crm.js +0 -58
  40. package/src/types/crm.js.map +0 -1
  41. package/src/types/dashboard.js +0 -2
  42. package/src/types/dashboard.js.map +0 -1
  43. package/src/types/definitions.js +0 -2
  44. package/src/types/definitions.js.map +0 -1
  45. package/src/types/fields.js +0 -2
  46. package/src/types/fields.js.map +0 -1
  47. package/src/types/insights.js +0 -2
  48. package/src/types/insights.js.map +0 -1
  49. package/src/types/interests.js +0 -6
  50. package/src/types/interests.js.map +0 -1
  51. package/src/types/internal-events.js +0 -18
  52. package/src/types/internal-events.js.map +0 -1
  53. package/src/types/internet-opportunities.js +0 -2
  54. package/src/types/internet-opportunities.js.map +0 -1
  55. package/src/types/internet-vehicles.js +0 -2
  56. package/src/types/internet-vehicles.js.map +0 -1
  57. package/src/types/leasing-administration.js +0 -2
  58. package/src/types/leasing-administration.js.map +0 -1
  59. package/src/types/leasing-debtors.js +0 -2
  60. package/src/types/leasing-debtors.js.map +0 -1
  61. package/src/types/leasing-search.js +0 -2
  62. package/src/types/leasing-search.js.map +0 -1
  63. package/src/types/leasing-settings.js +0 -7
  64. package/src/types/leasing-settings.js.map +0 -1
  65. package/src/types/leasing.js +0 -38
  66. package/src/types/leasing.js.map +0 -1
  67. package/src/types/marketing.js +0 -35
  68. package/src/types/marketing.js.map +0 -1
  69. package/src/types/offers.js +0 -56
  70. package/src/types/opportunities.js +0 -107
  71. package/src/types/opportunities.js.map +0 -1
  72. package/src/types/payments.js +0 -7
  73. package/src/types/picklists.js +0 -2
  74. package/src/types/picklists.js.map +0 -1
  75. package/src/types/quotes.js +0 -42
  76. package/src/types/recently-viewed.js +0 -2
  77. package/src/types/recently-viewed.js.map +0 -1
  78. package/src/types/reservations.js +0 -5
  79. package/src/types/reservations.js.map +0 -1
  80. package/src/types/roi-ratings.js +0 -5
  81. package/src/types/roi-ratings.js.map +0 -1
  82. package/src/types/saved-filters.js +0 -9
  83. package/src/types/saved-filters.js.map +0 -1
  84. package/src/types/search.js +0 -2
  85. package/src/types/search.js.map +0 -1
  86. package/src/types/settings.js +0 -2
  87. package/src/types/settings.js.map +0 -1
  88. package/src/types/templates.js +0 -2
  89. package/src/types/templates.js.map +0 -1
  90. package/src/types/tenants.js +0 -21
  91. package/src/types/tenants.js.map +0 -1
  92. package/src/types/user-performance.js +0 -7
  93. package/src/types/user-performance.js.map +0 -1
  94. package/src/types/utils.js +0 -2
  95. package/src/types/validation.js +0 -2
  96. package/src/types/validation.js.map +0 -1
  97. package/src/types/vehicle-sales.js +0 -6
  98. package/src/types/vehicle-sales.js.map +0 -1
  99. package/src/types/vehicles.js +0 -98
  100. package/src/types/vehicles.js.map +0 -1
  101. package/src/utils/leasing.js +0 -6
  102. package/src/utils/leasing.js.map +0 -1
  103. package/src/utils/opportunities.js +0 -48
  104. package/src/utils/opportunities.js.map +0 -1
@@ -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 =
@@ -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
+ };