@bisondesk/core-sdk 1.0.683 → 1.0.685

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 (89) hide show
  1. package/lib/types/crm.d.ts +1 -0
  2. package/lib/types/crm.d.ts.map +1 -1
  3. package/lib/types/crm.js.map +1 -1
  4. package/lib/types/leasing-debtors.d.ts +2 -0
  5. package/lib/types/leasing-debtors.d.ts.map +1 -1
  6. package/lib/types/leasing-debtors.js.map +1 -1
  7. package/lib/types/leasing-search.d.ts +1 -0
  8. package/lib/types/leasing-search.d.ts.map +1 -1
  9. package/lib/types/leasing-search.js.map +1 -1
  10. package/lib/types/vehicle-purchase-payments.d.ts +25 -0
  11. package/lib/types/vehicle-purchase-payments.d.ts.map +1 -1
  12. package/lib/types/vehicle-purchase-payments.js +13 -0
  13. package/lib/types/vehicle-purchase-payments.js.map +1 -1
  14. package/package.json +1 -1
  15. package/src/types/activities.js +13 -0
  16. package/src/types/activities.js.map +1 -0
  17. package/src/types/comparables.js +2 -0
  18. package/src/types/comparables.js.map +1 -0
  19. package/src/types/crm.js +58 -0
  20. package/src/types/crm.js.map +1 -0
  21. package/src/types/crm.ts +1 -0
  22. package/src/types/dashboard.js +2 -0
  23. package/src/types/dashboard.js.map +1 -0
  24. package/src/types/definitions.js +2 -0
  25. package/src/types/definitions.js.map +1 -0
  26. package/src/types/fields.js +2 -0
  27. package/src/types/fields.js.map +1 -0
  28. package/src/types/insights.js +2 -0
  29. package/src/types/insights.js.map +1 -0
  30. package/src/types/interests.js +6 -0
  31. package/src/types/interests.js.map +1 -0
  32. package/src/types/internal-events.js +18 -0
  33. package/src/types/internal-events.js.map +1 -0
  34. package/src/types/internet-opportunities.js +2 -0
  35. package/src/types/internet-opportunities.js.map +1 -0
  36. package/src/types/internet-vehicles.js +2 -0
  37. package/src/types/internet-vehicles.js.map +1 -0
  38. package/src/types/leasing-administration.js +2 -0
  39. package/src/types/leasing-administration.js.map +1 -0
  40. package/src/types/leasing-debtors.js +2 -0
  41. package/src/types/leasing-debtors.js.map +1 -0
  42. package/src/types/leasing-debtors.ts +3 -0
  43. package/src/types/leasing-search.js +2 -0
  44. package/src/types/leasing-search.js.map +1 -0
  45. package/src/types/leasing-search.ts +2 -0
  46. package/src/types/leasing-settings.js +7 -0
  47. package/src/types/leasing-settings.js.map +1 -0
  48. package/src/types/leasing.js +38 -0
  49. package/src/types/leasing.js.map +1 -0
  50. package/src/types/marketing.js +35 -0
  51. package/src/types/marketing.js.map +1 -0
  52. package/src/types/offers.js +56 -0
  53. package/src/types/opportunities.js +107 -0
  54. package/src/types/opportunities.js.map +1 -0
  55. package/src/types/payments.js +7 -0
  56. package/src/types/picklists.js +2 -0
  57. package/src/types/picklists.js.map +1 -0
  58. package/src/types/quotes.js +42 -0
  59. package/src/types/recently-viewed.js +2 -0
  60. package/src/types/recently-viewed.js.map +1 -0
  61. package/src/types/reservations.js +5 -0
  62. package/src/types/reservations.js.map +1 -0
  63. package/src/types/roi-ratings.js +5 -0
  64. package/src/types/roi-ratings.js.map +1 -0
  65. package/src/types/saved-filters.js +9 -0
  66. package/src/types/saved-filters.js.map +1 -0
  67. package/src/types/search.js +2 -0
  68. package/src/types/search.js.map +1 -0
  69. package/src/types/settings.js +2 -0
  70. package/src/types/settings.js.map +1 -0
  71. package/src/types/templates.js +2 -0
  72. package/src/types/templates.js.map +1 -0
  73. package/src/types/tenants.js +21 -0
  74. package/src/types/tenants.js.map +1 -0
  75. package/src/types/user-performance.js +7 -0
  76. package/src/types/user-performance.js.map +1 -0
  77. package/src/types/utils.js +2 -0
  78. package/src/types/validation.js +2 -0
  79. package/src/types/validation.js.map +1 -0
  80. package/src/types/vehicle-purchase-payments.ts +60 -6
  81. package/src/types/vehicle-sales.js +6 -0
  82. package/src/types/vehicle-sales.js.map +1 -0
  83. package/src/types/vehicles.js +98 -0
  84. package/src/types/vehicles.js.map +1 -0
  85. package/src/utils/leasing.js +6 -0
  86. package/src/utils/leasing.js.map +1 -0
  87. package/src/utils/opportunities.js +48 -0
  88. package/src/utils/opportunities.js.map +1 -0
  89. package/tsconfig.tsbuildinfo +1 -1
@@ -148,6 +148,7 @@ export type SearchOrganization = {
148
148
  inUse: boolean;
149
149
  lastActivityAt: string | undefined;
150
150
  lastActivityBy: string | undefined;
151
+ contactedBy: string[];
151
152
  engagementTypes: OrgEngagementType[] | undefined;
152
153
  accountManagers: string[];
153
154
  };
@@ -1 +1 @@
1
- {"version":3,"file":"crm.d.ts","sourceRoot":"/","sources":["types/crm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,oBAAY,mBAAmB;IAC7B,kBAAkB,uBAAuB;IACzC,SAAS,cAAc;IACvB,kBAAkB,uBAAuB;IACzC,QAAQ,aAAa;IACrB,eAAe,oBAAoB;IACnC,YAAY,iBAAiB;IAC7B,oBAAoB,yBAAyB;IAC7C,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,2BAA2B,gCAAgC;IAC3D,kBAAkB,uBAAuB;CAC1C;AAED,oBAAY,cAAc;IACxB,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED,oBAAY,mBAAmB;IAC7B,YAAY,iBAAiB;IAC7B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,oBAAoB,yBAAyB;CAC9C;AAED,MAAM,MAAM,QAAQ,GAAG,oBAAoB,GAAG,eAAe,CAAC;AAE9D,KAAK,gBAAgB,GAAG,SAAS,GAAG;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,M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A;IAC/B,oCAAe,CAAA;AACjB,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B","sourcesContent":["import {\n LocationValue,\n PhoneNumberRawValue,\n PhoneNumberValue,\n SearchPermissions,\n} from '@bisondesk/commons-sdk/types';\nimport { PublicSearchDefinition } from './definitions.js';\nimport { Interest } from './interests.js';\nimport { BaseEvent } from './internal-events.js';\nimport { ReferenceData } from './utils.js';\n\nexport enum OrganizatioRiskTags {\n BAD_FINANCIAL_INFO = 'BAD_FINANCIAL_INFO',\n WRITE_OFF = 'WRITE_OFF',\n VAT_NUMBER_INVALID = 'VAT_NUMBER_INVALID',\n INSTINCT = 'INSTINCT',\n INVALID_ADDRESS = 'INVALID_ADDRESS',\n NEW_CUSTOMER = 'NEW_CUSTOMER',\n BANK_ACCOUNT_BLOCKED = 'BANK_ACCOUNT_BLOCKED',\n NO_GPS = 'NO_GPS',\n BANKRUPTCY = 'BANKRUPTCY',\n JUDICIAL_REORGANISATION_WCO = 'JUDICIAL_REORGANISATION_WCO',\n NO_DRIVING_LICENSE = 'NO_DRIVING_LICENSE',\n}\n\nexport enum ContactActions {\n UPSERT = 'upsert',\n DELETE = 'delete',\n}\n\nexport enum OrganizationActions {\n ADD_ACTIVITY = 'add_activity',\n UPSERT = 'upsert',\n DELETE = 'delete',\n SELL_TO_ORGANIZATION = 'sell_to_organization',\n}\n\nexport type CrmEvent = CrmOrganizationEvent | CrmContactEvent;\n\ntype BaseContactEvent = BaseEvent & {\n contactId: string;\n organizationId?: string;\n actionAt: string;\n userId: string;\n tenantId: string;\n};\n\nexport type ContactCreateEvent = BaseContactEvent & {\n action: 'create';\n contact: Contact;\n previousContact?: undefined;\n};\n\nexport type ContactUpdateEvent = BaseContactEvent & {\n action: 'update';\n contact: Contact;\n previousContact: Contact;\n};\n\nexport type ContactDeleteEvent = BaseContactEvent & {\n action: 'delete';\n contact?: undefined;\n previousContact: Contact;\n};\n\nexport type CrmContactEvent = ContactCreateEvent | ContactUpdateEvent | ContactDeleteEvent;\n\ntype BaseOrgEvent = BaseEvent & {\n organizationId: string;\n actionAt: string;\n userId: string;\n tenantId: string;\n};\n\nexport type OrgCreateEvent = BaseOrgEvent & {\n action: 'create';\n org: Organization;\n previousOrg?: undefined;\n};\n\nexport type OrgUpdateEvent = BaseOrgEvent & {\n action: 'update';\n org: Organization;\n previousOrg: Organization;\n};\n\nexport type OrgDeleteEvent = BaseOrgEvent & {\n action: 'delete';\n org?: undefined;\n previousOrg: Organization;\n};\n\nexport type CrmOrganizationEvent = OrgCreateEvent | OrgUpdateEvent | OrgDeleteEvent;\n\ntype BaseOrganization = {\n usages: {\n [tenantId: string]: string[]; // branchIds that are using this organization\n };\n countryCode: string;\n name: string;\n segment?: string;\n /**\n * Client sector — Tier 1 of the industry taxonomy (what business the client is in).\n * Free string validated against the `ORG_INDUSTRY_PICKLIST_ID` picklist. Orthogonal to\n * `segment`, which records the client's ROLE (end customer, trader, dealer, …).\n */\n industry?: string;\n /**\n * Sub-industry — Tier 2 of the industry taxonomy: a finer classification within the chosen\n * `industry`. Generic and reusable across industries; each picklist value\n * (`SUB_INDUSTRY_PICKLIST_ID`) declares which parent `industry` it belongs to. Today only\n * `transport-logistics` has sub-values (the cargo type: reefer, tanker, tipper, …).\n */\n subIndustry?: string;\n type?: 'COMPANY' | 'INDIVIDUAL' | 'GOVERNMENT';\n vatNumber?: string;\n /**\n * Registered share capital (capital social), in the currency it was registered in. Registry\n * data like `vatNumber`, kept because the legal documents print it — the Ivory Coast\n * cautionnement names the customer by capital alongside its trade-register number.\n */\n shareCapital?: string;\n /**\n * National business registration number. For FR orgs this is a SIREN (9 digits) or a SIRET\n * (14 digits = SIREN + 5-digit NIC) — whichever is available; needed for annuaire routing of\n * FR B2B e-invoices. A SIREN is derivable from a valid FR VAT (digits 3–11).\n */\n registrationNumber?: string;\n addresses?: {\n legal?: LocationValue;\n transport?: LocationValue;\n };\n conglomerate?: boolean;\n riskTags?: string[];\n\n // general contact — main switchboard / info address, distinct from billing\n generalEmail?: string;\n\n // billing\n billingEmails?: string[];\n skipPaymentReminders?: boolean;\n skipInvoiceEmails?: boolean;\n trustworthy?: boolean;\n // meta\n slbPartner?: boolean;\n\n tags?: string[]; // custom tags for the organization\n};\n\nexport type NewOrganization = BaseOrganization & {\n id?: undefined;\n externalId?: undefined;\n createdAt?: undefined;\n createdBy?: undefined;\n billingPhone?: PhoneNumberValue | PhoneNumberRawValue;\n generalPhone?: PhoneNumberValue | PhoneNumberRawValue;\n};\n\nexport type ValidatedNewOrganization = Omit<NewOrganization, 'billingPhone' | 'generalPhone'> & {\n billingPhone?: PhoneNumberValue;\n generalPhone?: PhoneNumberValue;\n};\n\nexport type Organization = BaseOrganization & {\n createdAt: string;\n externalId: number;\n createdBy: string;\n id: string;\n\n debt?: OrganizationDebtInfo;\n\n billingPhone?: PhoneNumberValue;\n generalPhone?: PhoneNumberValue;\n\n disabled?: boolean;\n disabledAt?: string;\n disabledBy?: string;\n disabledReason?: string;\n};\n\nexport type OrganizationDebtInfo = {\n overdueSince?: string;\n overdueInvoices: number;\n overdueAmount: string;\n unpaidInvoices: number;\n unpaidAmount: string;\n};\n\nexport type OrgLeasingContract = {\n id: string;\n contractNumber?: string;\n vehicle: {\n id: string;\n stockNumber: string;\n administrativeNumber?: string;\n };\n};\n\nexport type SearchOrganization = {\n org: Organization;\n contract: OrgLeasingContract[]; // important for the logic regarding leasing overdue reminders\n interests?: Interest[];\n custom: {\n inUse: boolean; // is this organization in use by any of the branches of this tenant, or is it an organization from another tenant.\n lastActivityAt: string | undefined; // last activity at this organization\n lastActivityBy: string | undefined; // user that did the last activity at this organization\n engagementTypes: OrgEngagementType[] | undefined; // types of engagements this organization has in the tenant\n\n accountManagers: string[]; // dynamically determined account managers for this organization\n };\n};\n\nexport type PotentialDuplicatesReferenceData = ReferenceData & { blockIgnore?: boolean };\n\nexport type InputSearchOrganization = SearchOrganization & {\n permissions: SearchPermissions | undefined;\n};\n\nexport type SearchContact = {\n contact: Contact;\n org?: Organization;\n interests?: Interest[];\n custom: {\n accountManagers: string[]; // dynamically determined account managers for this contact\n classification: 'prospect' | 'customer';\n hasOrganization: boolean;\n lastActivityAt: string | undefined;\n lastActivityBy: string | undefined;\n };\n};\n\nexport type InputSearchContact = SearchContact & {\n permissions: SearchPermissions | undefined;\n};\n\nexport type CrmPublicSearchDefinitions = {\n searchOrg: PublicSearchDefinition;\n searchContact: PublicSearchDefinition;\n};\n\nexport enum MarketingChannel {\n Email = 'email',\n /** Calls, WhatsApp and SMS to a phone number. */\n Phone = 'phone',\n}\n\n/** Why an address stopped receiving marketing. */\nexport enum MarketingOptOutReason {\n /** A user switched the address off in the CRM. */\n Human = 'human',\n /** The recipient used the unsubscribe link in a campaign email. */\n Unsubscribe = 'unsubscribe',\n /** The recipient reported a campaign email as spam. */\n Complaint = 'complaint',\n /** SES Auto Validation dropped the address before sending because it expected a bounce. */\n AutoValidation = 'auto-validation',\n /** The recipient asked WhatsApp marketing to stop. */\n WhatsappStop = 'whatsapp-stop',\n}\n\n/**\n * An opted-out address in a tenant: an email address, or a phone number in E.164. The row exists\n * only while the address is opted out; switching it back on deletes it.\n */\nexport type MarketingOptOut = {\n channel: MarketingChannel;\n address: string;\n reason: MarketingOptOutReason;\n updatedAt: string;\n /**\n * The user who switched it off, or `system` for the automatic reasons. Absent on opt-outs\n * carried over from the old per-contact switches, which never recorded who set them.\n */\n updatedBy?: string;\n /** The campaign whose email led to it, for `unsubscribe`, `complaint` and `auto-validation`. */\n campaignId?: string;\n};\n\nexport enum PartnerLevel {\n Internal = '05-internal',\n Gold = '10-gold',\n Silver = '20-silver',\n Bronze = '30-bronze',\n}\n\ntype BaseContact = {\n accountManager?: string;\n countryCode?: string; // TODO review if this should be required (UI says it is)\n language?: string;\n emails: string[];\n job?: string;\n /** free-text job title; only meaningful when `job === JOB_CATEGORY_OTHER_ID` */\n jobOther?: string;\n /** either firstName or lastName should be filled in */\n firstName?: string;\n lastName?: string;\n /** yyyy-mm-dd */\n birthDate?: string;\n /** National identity document number (e.g. CNI in Côte d'Ivoire). */\n nationalId?: string;\n organizationId?: string;\n /** will not be filled if organizationId is present */\n orgName?: string;\n clientLevel?: PartnerLevel;\n\n disabledAt?: string;\n disabledBy?: string;\n disabledReason?: string;\n\n tags?: string[]; // custom tags for the contact\n\n channels?: {\n telegram?: MessagingChannelEntry;\n whatsapp?: MessagingChannelEntry;\n };\n};\n\nexport type MessagingChannelEntry = {\n id: string;\n sessionId?: string;\n};\n\nexport type NewContact = BaseContact & {\n id?: undefined;\n createdAt?: undefined;\n createdBy?: undefined;\n phones: Array<PhoneNumberValue | PhoneNumberRawValue>;\n organizationId?: string;\n};\n\nexport type NewContactValidated = BaseContact & {\n id?: undefined;\n createdAt?: undefined;\n createdBy?: undefined;\n organizationId?: string;\n phones: PhoneNumberValue[];\n};\n\nexport type Contact = BaseContact & {\n id: string;\n createdAt: string;\n createdBy: string;\n phones: PhoneNumberValue[];\n};\n\nexport enum SaveContactResolution {\n IgnoreDuplicates = 'IGNORE_DUPLICATES',\n BlockDuplicates = 'BLOCK_DUPLICATES',\n}\n\nexport enum SaveOrgResolution {\n IgnoreDuplicates = 'IGNORE_DUPLICATES',\n BlockDuplicates = 'BLOCK_DUPLICATES',\n}\n\nexport enum CrmSearchScope {\n Tenant = 'tenant',\n Conglomerate = 'conglomerate',\n}\n\nexport enum OrgEngagementType {\n offers = 'offers',\n purchases = 'purchases',\n opportunities = 'opportunities',\n sales = 'sales',\n}\n"]}
1
+ {"version":3,"file":"crm.js","sourceRoot":"/","sources":["types/crm.ts"],"names":[],"mappings":"AAWA,MAAM,CAAN,IAAY,mBAYX;AAZD,WAAY,mBAAmB;IAC7B,gEAAyC,CAAA;IACzC,8CAAuB,CAAA;IACvB,gEAAyC,CAAA;IACzC,4CAAqB,CAAA;IACrB,0DAAmC,CAAA;IACnC,oDAA6B,CAAA;IAC7B,oEAA6C,CAAA;IAC7C,wCAAiB,CAAA;IACjB,gDAAyB,CAAA;IACzB,kFAA2D,C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AAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,+CAA6B,CAAA;AAC/B,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAED,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,4CAAuB,CAAA;IACvB,oDAA+B,CAAA;IAC/B,oCAAe,CAAA;AACjB,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B","sourcesContent":["import {\n LocationValue,\n PhoneNumberRawValue,\n PhoneNumberValue,\n SearchPermissions,\n} from '@bisondesk/commons-sdk/types';\nimport { PublicSearchDefinition } from './definitions.js';\nimport { Interest } from './interests.js';\nimport { BaseEvent } from './internal-events.js';\nimport { ReferenceData } from './utils.js';\n\nexport enum OrganizatioRiskTags {\n BAD_FINANCIAL_INFO = 'BAD_FINANCIAL_INFO',\n WRITE_OFF = 'WRITE_OFF',\n VAT_NUMBER_INVALID = 'VAT_NUMBER_INVALID',\n INSTINCT = 'INSTINCT',\n INVALID_ADDRESS = 'INVALID_ADDRESS',\n NEW_CUSTOMER = 'NEW_CUSTOMER',\n BANK_ACCOUNT_BLOCKED = 'BANK_ACCOUNT_BLOCKED',\n NO_GPS = 'NO_GPS',\n BANKRUPTCY = 'BANKRUPTCY',\n JUDICIAL_REORGANISATION_WCO = 'JUDICIAL_REORGANISATION_WCO',\n NO_DRIVING_LICENSE = 'NO_DRIVING_LICENSE',\n}\n\nexport enum ContactActions {\n UPSERT = 'upsert',\n DELETE = 'delete',\n}\n\nexport enum OrganizationActions {\n ADD_ACTIVITY = 'add_activity',\n UPSERT = 'upsert',\n DELETE = 'delete',\n SELL_TO_ORGANIZATION = 'sell_to_organization',\n}\n\nexport type CrmEvent = CrmOrganizationEvent | CrmContactEvent;\n\ntype BaseContactEvent = BaseEvent & {\n contactId: string;\n organizationId?: string;\n actionAt: string;\n userId: string;\n tenantId: string;\n};\n\nexport type ContactCreateEvent = BaseContactEvent & {\n action: 'create';\n contact: Contact;\n previousContact?: undefined;\n};\n\nexport type ContactUpdateEvent = BaseContactEvent & {\n action: 'update';\n contact: Contact;\n previousContact: Contact;\n};\n\nexport type ContactDeleteEvent = BaseContactEvent & {\n action: 'delete';\n contact?: undefined;\n previousContact: Contact;\n};\n\nexport type CrmContactEvent = ContactCreateEvent | ContactUpdateEvent | ContactDeleteEvent;\n\ntype BaseOrgEvent = BaseEvent & {\n organizationId: string;\n actionAt: string;\n userId: string;\n tenantId: string;\n};\n\nexport type OrgCreateEvent = BaseOrgEvent & {\n action: 'create';\n org: Organization;\n previousOrg?: undefined;\n};\n\nexport type OrgUpdateEvent = BaseOrgEvent & {\n action: 'update';\n org: Organization;\n previousOrg: Organization;\n};\n\nexport type OrgDeleteEvent = BaseOrgEvent & {\n action: 'delete';\n org?: undefined;\n previousOrg: Organization;\n};\n\nexport type CrmOrganizationEvent = OrgCreateEvent | OrgUpdateEvent | OrgDeleteEvent;\n\ntype BaseOrganization = {\n usages: {\n [tenantId: string]: string[]; // branchIds that are using this organization\n };\n countryCode: string;\n name: string;\n segment?: string;\n /**\n * Client sector — Tier 1 of the industry taxonomy (what business the client is in).\n * Free string validated against the `ORG_INDUSTRY_PICKLIST_ID` picklist. Orthogonal to\n * `segment`, which records the client's ROLE (end customer, trader, dealer, …).\n */\n industry?: string;\n /**\n * Sub-industry — Tier 2 of the industry taxonomy: a finer classification within the chosen\n * `industry`. Generic and reusable across industries; each picklist value\n * (`SUB_INDUSTRY_PICKLIST_ID`) declares which parent `industry` it belongs to. Today only\n * `transport-logistics` has sub-values (the cargo type: reefer, tanker, tipper, …).\n */\n subIndustry?: string;\n type?: 'COMPANY' | 'INDIVIDUAL' | 'GOVERNMENT';\n vatNumber?: string;\n /**\n * Registered share capital (capital social), in the currency it was registered in. Registry\n * data like `vatNumber`, kept because the legal documents print it — the Ivory Coast\n * cautionnement names the customer by capital alongside its trade-register number.\n */\n shareCapital?: string;\n /**\n * National business registration number. For FR orgs this is a SIREN (9 digits) or a SIRET\n * (14 digits = SIREN + 5-digit NIC) — whichever is available; needed for annuaire routing of\n * FR B2B e-invoices. A SIREN is derivable from a valid FR VAT (digits 3–11).\n */\n registrationNumber?: string;\n addresses?: {\n legal?: LocationValue;\n transport?: LocationValue;\n };\n conglomerate?: boolean;\n riskTags?: string[];\n\n // general contact — main switchboard / info address, distinct from billing\n generalEmail?: string;\n\n // billing\n billingEmails?: string[];\n skipPaymentReminders?: boolean;\n skipInvoiceEmails?: boolean;\n trustworthy?: boolean;\n // meta\n slbPartner?: boolean;\n\n tags?: string[]; // custom tags for the organization\n};\n\nexport type NewOrganization = BaseOrganization & {\n id?: undefined;\n externalId?: undefined;\n createdAt?: undefined;\n createdBy?: undefined;\n billingPhone?: PhoneNumberValue | PhoneNumberRawValue;\n generalPhone?: PhoneNumberValue | PhoneNumberRawValue;\n};\n\nexport type ValidatedNewOrganization = Omit<NewOrganization, 'billingPhone' | 'generalPhone'> & {\n billingPhone?: PhoneNumberValue;\n generalPhone?: PhoneNumberValue;\n};\n\nexport type Organization = BaseOrganization & {\n createdAt: string;\n externalId: number;\n createdBy: string;\n id: string;\n\n debt?: OrganizationDebtInfo;\n\n billingPhone?: PhoneNumberValue;\n generalPhone?: PhoneNumberValue;\n\n disabled?: boolean;\n disabledAt?: string;\n disabledBy?: string;\n disabledReason?: string;\n};\n\nexport type OrganizationDebtInfo = {\n overdueSince?: string;\n overdueInvoices: number;\n overdueAmount: string;\n unpaidInvoices: number;\n unpaidAmount: string;\n};\n\nexport type OrgLeasingContract = {\n id: string;\n contractNumber?: string;\n vehicle: {\n id: string;\n stockNumber: string;\n administrativeNumber?: string;\n };\n};\n\nexport type SearchOrganization = {\n org: Organization;\n contract: OrgLeasingContract[]; // important for the logic regarding leasing overdue reminders\n interests?: Interest[];\n custom: {\n inUse: boolean; // is this organization in use by any of the branches of this tenant, or is it an organization from another tenant.\n lastActivityAt: string | undefined; // last activity at this organization\n lastActivityBy: string | undefined; // user that did the last activity at this organization\n contactedBy: string[]; // users who logged any activity tagged with this organization\n engagementTypes: OrgEngagementType[] | undefined; // types of engagements this organization has in the tenant\n\n accountManagers: string[]; // dynamically determined account managers for this organization\n };\n};\n\nexport type PotentialDuplicatesReferenceData = ReferenceData & { blockIgnore?: boolean };\n\nexport type InputSearchOrganization = SearchOrganization & {\n permissions: SearchPermissions | undefined;\n};\n\nexport type SearchContact = {\n contact: Contact;\n org?: Organization;\n interests?: Interest[];\n custom: {\n accountManagers: string[]; // dynamically determined account managers for this contact\n classification: 'prospect' | 'customer';\n hasOrganization: boolean;\n lastActivityAt: string | undefined;\n lastActivityBy: string | undefined;\n };\n};\n\nexport type InputSearchContact = SearchContact & {\n permissions: SearchPermissions | undefined;\n};\n\nexport type CrmPublicSearchDefinitions = {\n searchOrg: PublicSearchDefinition;\n searchContact: PublicSearchDefinition;\n};\n\nexport enum MarketingChannel {\n Email = 'email',\n /** Calls, WhatsApp and SMS to a phone number. */\n Phone = 'phone',\n}\n\n/** Why an address stopped receiving marketing. */\nexport enum MarketingOptOutReason {\n /** A user switched the address off in the CRM. */\n Human = 'human',\n /** The recipient used the unsubscribe link in a campaign email. */\n Unsubscribe = 'unsubscribe',\n /** The recipient reported a campaign email as spam. */\n Complaint = 'complaint',\n /** SES Auto Validation dropped the address before sending because it expected a bounce. */\n AutoValidation = 'auto-validation',\n /** The recipient asked WhatsApp marketing to stop. */\n WhatsappStop = 'whatsapp-stop',\n}\n\n/**\n * An opted-out address in a tenant: an email address, or a phone number in E.164. The row exists\n * only while the address is opted out; switching it back on deletes it.\n */\nexport type MarketingOptOut = {\n channel: MarketingChannel;\n address: string;\n reason: MarketingOptOutReason;\n updatedAt: string;\n /**\n * The user who switched it off, or `system` for the automatic reasons. Absent on opt-outs\n * carried over from the old per-contact switches, which never recorded who set them.\n */\n updatedBy?: string;\n /** The campaign whose email led to it, for `unsubscribe`, `complaint` and `auto-validation`. */\n campaignId?: string;\n};\n\nexport enum PartnerLevel {\n Internal = '05-internal',\n Gold = '10-gold',\n Silver = '20-silver',\n Bronze = '30-bronze',\n}\n\ntype BaseContact = {\n accountManager?: string;\n countryCode?: string; // TODO review if this should be required (UI says it is)\n language?: string;\n emails: string[];\n job?: string;\n /** free-text job title; only meaningful when `job === JOB_CATEGORY_OTHER_ID` */\n jobOther?: string;\n /** either firstName or lastName should be filled in */\n firstName?: string;\n lastName?: string;\n /** yyyy-mm-dd */\n birthDate?: string;\n /** National identity document number (e.g. CNI in Côte d'Ivoire). */\n nationalId?: string;\n organizationId?: string;\n /** will not be filled if organizationId is present */\n orgName?: string;\n clientLevel?: PartnerLevel;\n\n disabledAt?: string;\n disabledBy?: string;\n disabledReason?: string;\n\n tags?: string[]; // custom tags for the contact\n\n channels?: {\n telegram?: MessagingChannelEntry;\n whatsapp?: MessagingChannelEntry;\n };\n};\n\nexport type MessagingChannelEntry = {\n id: string;\n sessionId?: string;\n};\n\nexport type NewContact = BaseContact & {\n id?: undefined;\n createdAt?: undefined;\n createdBy?: undefined;\n phones: Array<PhoneNumberValue | PhoneNumberRawValue>;\n organizationId?: string;\n};\n\nexport type NewContactValidated = BaseContact & {\n id?: undefined;\n createdAt?: undefined;\n createdBy?: undefined;\n organizationId?: string;\n phones: PhoneNumberValue[];\n};\n\nexport type Contact = BaseContact & {\n id: string;\n createdAt: string;\n createdBy: string;\n phones: PhoneNumberValue[];\n};\n\nexport enum SaveContactResolution {\n IgnoreDuplicates = 'IGNORE_DUPLICATES',\n BlockDuplicates = 'BLOCK_DUPLICATES',\n}\n\nexport enum SaveOrgResolution {\n IgnoreDuplicates = 'IGNORE_DUPLICATES',\n BlockDuplicates = 'BLOCK_DUPLICATES',\n}\n\nexport enum CrmSearchScope {\n Tenant = 'tenant',\n Conglomerate = 'conglomerate',\n}\n\nexport enum OrgEngagementType {\n offers = 'offers',\n purchases = 'purchases',\n opportunities = 'opportunities',\n sales = 'sales',\n}\n"]}
@@ -45,6 +45,8 @@ export type SearchDebtorInfo = {
45
45
  riskLevelLabel: string;
46
46
  hasActiveContracts: boolean;
47
47
  };
48
+ mileage?: ContractMileage[];
49
+ mileageSummary?: MileageSummary;
48
50
  };
49
51
  export declare enum DebtorsDossierStatus {
50
52
  AUTO_REMINDER = "auto_reminder",
@@ -1 +1 @@
1
- {"version":3,"file":"leasing-debtors.d.ts","sourceRoot":"/","sources":["types/leasing-debtors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEvD,MAAM,MAAM,SAAS,GAAG;IACtB,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,qBAAqB,EAAE,MAAM,CAAC;IAE9B,uBAAuB,EAAE,MAAM,CAAC;IAChC,sBAAsB,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,EAAE,SAAS,EAAE,CAAC;IAGpB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,uBAAuB,EAAE,MA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AyB,GAA2B;IAC/D,oBAAoB,CAAC,aAAa;IAClC,oBAAoB,CAAC,OAAO;IAC5B,oBAAoB,CAAC,iBAAiB;IACtC,oBAAoB,CAAC,QAAQ;IAC7B,oBAAoB,CAAC,cAAc;IACnC,oBAAoB,CAAC,OAAO;CAC7B,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAG,oBAAoB,CAAC,QAAQ,CAAC;AAEvE,MAAM,CAAC,MAAM,8BAA8B,GAA2B;IACpE,oBAAoB,CAAC,QAAQ;CAC9B,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,GAAG,yBAAyB;IAC5B,GAAG,8BAA8B;CAClC,CAAC","sourcesContent":["import { EmailMessage } from '@bisondesk/commons-sdk/messages';\nimport { NextList, PaginatedList } from '@bisondesk/commons-sdk/types';\nimport { Contact, Organization } from './crm.js';\nimport { LeasingContract } from './leasing.js';\nimport { ContractMileage, MileageSummary } from './mileage.js';\nimport { BaseSearchRequest, SortFilter, SortOrder } from './search.js';\nimport { DataRecord, ReferenceData } from './utils.js';\n\nexport type MonthData = {\n activeContractIds: string[];\n date: string; // YYYY-MM\n overdueAmount: string;\n unpaidAmount: string;\n overdueContractIds: string[];\n overdueInvoiceIds: string[];\n riskLevel: number;\n monthlyInvoicedAmount: string;\n // Non-leasing (\"extra\") debt for this month, computed as-of month-end.\n nonLeasingOverdueAmount: string;\n nonLeasingUnpaidAmount: string;\n};\n\nexport type DebtorInfo = {\n clientId: string;\n branchIds: string[];\n months: MonthData[];\n\n // properties related to the current month\n activeContracts: number;\n overdueAmount: string;\n nonLeasingOverdueAmount: string;\n nonLeasingUnpaidAmount: string;\n unpaidAmount: string;\n overdueContracts: number;\n riskLevel: number;\n monthlyInvoicedAmount: string;\n};\n\nexport type SearchDebtorInfo = {\n org: Organization;\n contact?: Contact;\n debtor: DebtorInfo;\n activeDebtorDossier?: {\n dossier: DebtorsDossier;\n hasDossier: boolean;\n lastActivityAt?: string;\n lastActivityBy?: string;\n hasActivitiesLogged: boolean;\n };\n custom: {\n riskLevelLabel: string;\n hasActiveContracts: boolean;\n };\n};\n\nexport enum DebtorsDossierStatus {\n AUTO_REMINDER = 'auto_reminder',\n OVERDUE = 'overdue',\n CONTACT_ATTEMPTED = 'contact_attempted',\n DIALOGUE = 'dialogue',\n PROMISE_TO_PAY = 'promise_to_pay',\n FAILURE = 'failure',\n RESOLVED = 'resolved',\n}\n\nexport const debtorsDossierStatusToDateFieldMap: Record<\n DebtorsDossierStatus,\n { date: keyof DossierStatusLogFields; author: keyof DossierStatusLogFields } | null\n> = {\n [DebtorsDossierStatus.AUTO_REMINDER]: null,\n [DebtorsDossierStatus.OVERDUE]: { date: 'overdueAt', author: 'overdueBy' },\n [DebtorsDossierStatus.CONTACT_ATTEMPTED]: { date: 'contactedAt', author: 'contactedBy' },\n [DebtorsDossierStatus.DIALOGUE]: { date: 'dialogueAt', author: 'dialogueBy' },\n [DebtorsDossierStatus.PROMISE_TO_PAY]: { date: 'promiseToPayAt', author: 'promiseToPayBy' },\n [DebtorsDossierStatus.RESOLVED]: { date: 'resolvedAt', author: 'resolvedBy' },\n [DebtorsDossierStatus.FAILURE]: { date: 'failedAt', author: 'failedBy' },\n};\n\n/******\n * Auto Follow-Up Types\n ******/\n\nexport type ReminderWhatsappAttemptStatus = 'SENT' | 'DELIVERED' | 'FAILED' | 'SKIPPED';\n\n// see docs/adr/0026-whatsapp-leasing-notifications-alongside-email.md\nexport type ReminderWhatsappAttempt = {\n dedupId: string;\n templateId: string;\n phone: string;\n riskLevel: number;\n sentAt: string;\n status: ReminderWhatsappAttemptStatus;\n failureReason?: string;\n};\n\nexport type DebtorAutoFollowUp = {\n id: string;\n organizationId: string;\n organizationName: string;\n status: 'ONGOING' | 'ERROR' | 'SUCCESS' | 'EXPIRED' | 'DISCARDED';\n discardReason?: string;\n emails: EmailMessage[];\n whatsapps?: ReminderWhatsappAttempt[];\n createdAt: string;\n modifiedAt: string;\n completedAt?: string;\n nextActionAt: string;\n riskLevel: number;\n};\n\nexport type ListOverdueRemindersResponse = PaginatedList<DebtorAutoFollowUp, ReferenceData>;\nexport type ListOverdueRemindersRequest = {\n offset: number;\n limit: number;\n sortBy: SortFilter;\n};\n\n/******\n * Debtor Dossier Types\n ******/\n\nexport enum DebtorsDossierActions {\n SET_METADATA = 'set_metadata',\n ADD_ACTIVITY = 'add_activity',\n FINISH = 'finish',\n SET_DOCUMENTS = 'set_documents',\n SET_PAYMENT_PLAN = 'set_payment_plan',\n SET_LEGAL_DOSSIER = 'set_legal_dossier',\n REOPEN = 'reopen',\n}\n\nexport type DossierStatusLogFields = {\n failedAt?: string;\n failedBy?: string;\n resolvedAt?: string;\n contactedAt?: string;\n contactedBy?: string;\n overdueAt?: string;\n overdueBy?: string;\n resolvedBy?: string;\n dialogueAt?: string;\n dialogueBy?: string;\n promiseToPayAt?: string;\n promiseToPayBy?: string;\n};\n\nexport type BaseDebtorsDossier = {\n organizationId: string;\n tags: string[];\n origin: 'manual' | 'auto';\n autoFollowUpId?: string;\n administrativeUserId?: string;\n branchId: string;\n tenantId: string;\n};\nexport type DebtorsDossierStatusAudit = {\n from: DebtorsDossierStatus;\n to: DebtorsDossierStatus;\n changedAt: string;\n changedBy: string;\n};\n\nexport type DebtorsDossier = BaseDebtorsDossier &\n DossierStatusLogFields & {\n id: string;\n createdAt: string;\n createdBy: string;\n updatedAt: string;\n updatedBy: string;\n status: DebtorsDossierStatus;\n statusAudit: DebtorsDossierStatusAudit[];\n };\n\nexport type NewDebtorsDossier = BaseDebtorsDossier & {\n id?: undefined;\n createdBy?: undefined;\n createdAt?: undefined;\n updatedBy?: undefined;\n updatedAt?: undefined;\n};\n\nexport type DebtorsDossierBff = {\n dossier: DataRecord<DebtorsDossier>;\n organization?: Organization;\n leasingContracts: LeasingContract[];\n debt?: DebtorInfo;\n paymentPlan?: DebtorsPaymentPlan;\n legalDossier?: LegalDossier;\n trackAndTraceDevices: {\n /* odometer: TrackAndTraceOdometerData;\n device: TrackAndTraceDevice; */\n }[];\n};\n\nexport type UpdateDebtorsDossier = Partial<\n Pick<DebtorsDossier, 'status' | 'tags' | 'branchId' | 'organizationId'>\n> & {\n overdue?: boolean;\n resolve?: boolean;\n administrativeUserId?: string | null;\n};\n\n/******\n * Payment Plan Types\n ******/\n\nexport type DebtorsPaymentPlan = {\n id: string;\n debtorDossierId: string;\n\n notes: {\n content: string;\n createdAt: string;\n createdBy: string;\n }[];\n\n reminders?: {\n startDate: string; // ISO date string\n frequency: {\n every: number;\n period: 'days' | 'weeks' | 'months';\n };\n endCondition:\n | {\n endDate: string; // ISO date string\n }\n | {\n occurrences: number; // Number of reminders to send\n };\n };\n\n createdAt: string;\n createdBy: string;\n updatedAt: string;\n updatedBy: string;\n};\n\nexport type NewPaymentPlan = Omit<\n DebtorsPaymentPlan,\n 'id' | 'createdAt' | 'updatedAt' | 'createdBy' | 'updatedBy' | 'notes'\n> & { notes?: string };\n\nexport type UpdatePaymentPlan = Partial<Pick<DebtorsPaymentPlan, 'reminders'>> & {\n newNote?: string;\n};\n\n/******\n * Legal Dossier Types\n ******/\n\nexport enum LegalDossierStatus {\n ASSESSMENT = 'assessment',\n PRE_LEGAL_NOTICE = 'pre_legal_notice',\n SENT_TO_LAWYER = 'sent_to_lawyer',\n FILED = 'filed',\n IN_COURT = 'in_court',\n JUDGMENT = 'judgment',\n ENFORCEMENT = 'enforcement',\n SETTLEMENT = 'settlement',\n CLOSED_RECOVERED = 'closed_recovered',\n CLOSED_UNRECOVERABLE = 'closed_unrecoverable',\n ON_HOLD = 'on_hold',\n}\n\nexport type LegalDossier = {\n id: string;\n debtorDossierId: string;\n caseNumber?: string;\n courtDate?: string; // ISO date string (YYYY-MM-DD)\n vehicleReportedToPolice?: boolean;\n vehicleReportedToPoliceAt?: string; // ISO timestamp, stamped server-side\n notes?: string;\n createdAt: string;\n createdBy: string;\n updatedAt: string;\n updatedBy: string;\n status: LegalDossierStatus;\n};\n\nexport type NewLegalDossier = Omit<\n LegalDossier,\n 'id' | 'createdAt' | 'updatedAt' | 'createdBy' | 'updatedBy'\n>;\n\nexport type UpdateLegalDossier = Partial<\n Pick<LegalDossier, 'caseNumber' | 'courtDate' | 'status' | 'notes' | 'vehicleReportedToPolice'>\n>;\n\n/******\n * Debtor Dossier Events\n ******/\n\nexport type DebtorsDossierCreateEvent = {\n action: 'created';\n data: DebtorsDossier;\n previousData?: undefined;\n tenantId: string;\n userId: string;\n};\n\nexport type DebtorsDossierUpdateEvent = {\n action: 'updated';\n data: DebtorsDossier;\n previousData: DebtorsDossier;\n tenantId: string;\n userId: string;\n};\n\nexport type DebtorsDossierDeleteEvent = {\n action: 'deleted';\n data?: undefined;\n previousData: DebtorsDossier;\n tenantId: string;\n userId: string;\n};\n\nexport type DebtorsDossierEvent =\n | DebtorsDossierCreateEvent\n | DebtorsDossierUpdateEvent\n | DebtorsDossierDeleteEvent;\n\n/************\n *\n * Search\n */\n\nexport type SearchDebtorsDossier = {\n contact?: Contact;\n debtorsDossier: DebtorsDossier;\n org?: Organization;\n legalDossier?: LegalDossier;\n paymentPlan?: DebtorsPaymentPlan;\n hasPaymentPlan?: boolean;\n branchIds?: string[];\n tasks: {\n totalTasks: number;\n openTasks: number;\n nextDueAt?: string;\n };\n overdue: {\n riskLevel: number;\n riskLevelLabel?: string;\n remindersSent: number;\n hasActiveLdrs?: boolean;\n };\n /** One entry per tracked contract of the organization, copied from the contracts index. */\n mileage?: ContractMileage[];\n mileageSummary?: MileageSummary;\n};\n\n/************\n *\n * Kanban\n */\n\nexport type DebtorsDossierKanbanColumn = {\n status: DebtorsDossierStatus;\n results: SearchDebtorsDossier[];\n totalCount: number;\n totalValue: string;\n};\n\nexport type MSearchDebtorsDossierKanbanColumn = {\n column: DebtorsDossierKanbanColumn;\n nextToken?: string;\n};\n\nexport type KanbanDebtorsDossierSearchRequest = BaseSearchRequest & {\n nextTokens?: Record<string, string | undefined>;\n statusSortBy?: Record<DebtorsDossierStatus, { fieldId: string; order: SortOrder }[]>;\n};\n\nexport type KanbanDebtorsDossierNextList = Omit<\n NextList<DebtorsDossierKanbanColumn, ReferenceData>,\n 'nextToken'\n> & {\n nextTokens?: Record<string, string | undefined>;\n};\n\nexport const DebtorsDossierStatusOrder: DebtorsDossierStatus[] = [\n DebtorsDossierStatus.AUTO_REMINDER,\n DebtorsDossierStatus.OVERDUE,\n DebtorsDossierStatus.CONTACT_ATTEMPTED,\n DebtorsDossierStatus.DIALOGUE,\n DebtorsDossierStatus.PROMISE_TO_PAY,\n DebtorsDossierStatus.FAILURE,\n];\n\nexport const DebtorsDossierWonColumnId = DebtorsDossierStatus.RESOLVED;\n\nexport const DebtorsDossierKanbanEndColumns: DebtorsDossierStatus[] = [\n DebtorsDossierStatus.RESOLVED,\n];\n\nexport const DebtorsDossierKanbanColumns = [\n ...DebtorsDossierStatusOrder,\n ...DebtorsDossierKanbanEndColumns,\n];\n"]}
1
+ {"version":3,"file":"leasing-debtors.js","sourceRoot":"/","sources":["types/leasing-debtors.ts"],"names":[],"mappings":"AA0DA,MAAM,CAAN,IAAY,oBAQX;AARD,WAAY,oBAAoB;IAC9B,uDAA+B,CAAA;IAC/B,2CAAmB,CAAA;IACnB,+DAAuC,CAAA;IACvC,6CAAqB,CAAA;IACrB,yDAAiC,CAAA;IACjC,2CAAmB,CAAA;IACnB,6CAAqB,CAAA;AACvB,CAAC,EARW,oBAAoB,KAApB,oBAAoB,QAQ/B;AAED,MAAM,CAAC,MAAM,kCAAkC,GAG3C;IACF,CAAC,oBAAoB,CAAC,aAAa,CAAC,EAAE,IAAI;IAC1C,CAAC,oBAAoB,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE;IAC1E,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,aAAa,EAAE;IACxF,CAAC,oBAAoB,CAAC,QAAQ,CAAC,EAAE,EAAE,IAAI,EAAE,Y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,MAAM,8BAA8B,GAA2B;IACpE,oBAAoB,CAAC,QAAQ;CAC9B,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,GAAG,yBAAyB;IAC5B,GAAG,8BAA8B;CAClC,CAAC","sourcesContent":["import { EmailMessage } from '@bisondesk/commons-sdk/messages';\nimport { NextList, PaginatedList } from '@bisondesk/commons-sdk/types';\nimport { Contact, Organization } from './crm.js';\nimport { LeasingContract } from './leasing.js';\nimport { ContractMileage, MileageSummary } from './mileage.js';\nimport { BaseSearchRequest, SortFilter, SortOrder } from './search.js';\nimport { DataRecord, ReferenceData } from './utils.js';\n\nexport type MonthData = {\n activeContractIds: string[];\n date: string; // YYYY-MM\n overdueAmount: string;\n unpaidAmount: string;\n overdueContractIds: string[];\n overdueInvoiceIds: string[];\n riskLevel: number;\n monthlyInvoicedAmount: string;\n // Non-leasing (\"extra\") debt for this month, computed as-of month-end.\n nonLeasingOverdueAmount: string;\n nonLeasingUnpaidAmount: string;\n};\n\nexport type DebtorInfo = {\n clientId: string;\n branchIds: string[];\n months: MonthData[];\n\n // properties related to the current month\n activeContracts: number;\n overdueAmount: string;\n nonLeasingOverdueAmount: string;\n nonLeasingUnpaidAmount: string;\n unpaidAmount: string;\n overdueContracts: number;\n riskLevel: number;\n monthlyInvoicedAmount: string;\n};\n\nexport type SearchDebtorInfo = {\n org: Organization;\n contact?: Contact;\n debtor: DebtorInfo;\n activeDebtorDossier?: {\n dossier: DebtorsDossier;\n hasDossier: boolean;\n lastActivityAt?: string;\n lastActivityBy?: string;\n hasActivitiesLogged: boolean;\n };\n custom: {\n riskLevelLabel: string;\n hasActiveContracts: boolean;\n };\n /** One entry per tracked contract of the organization, copied from the contracts index. */\n mileage?: ContractMileage[];\n mileageSummary?: MileageSummary;\n};\n\nexport enum DebtorsDossierStatus {\n AUTO_REMINDER = 'auto_reminder',\n OVERDUE = 'overdue',\n CONTACT_ATTEMPTED = 'contact_attempted',\n DIALOGUE = 'dialogue',\n PROMISE_TO_PAY = 'promise_to_pay',\n FAILURE = 'failure',\n RESOLVED = 'resolved',\n}\n\nexport const debtorsDossierStatusToDateFieldMap: Record<\n DebtorsDossierStatus,\n { date: keyof DossierStatusLogFields; author: keyof DossierStatusLogFields } | null\n> = {\n [DebtorsDossierStatus.AUTO_REMINDER]: null,\n [DebtorsDossierStatus.OVERDUE]: { date: 'overdueAt', author: 'overdueBy' },\n [DebtorsDossierStatus.CONTACT_ATTEMPTED]: { date: 'contactedAt', author: 'contactedBy' },\n [DebtorsDossierStatus.DIALOGUE]: { date: 'dialogueAt', author: 'dialogueBy' },\n [DebtorsDossierStatus.PROMISE_TO_PAY]: { date: 'promiseToPayAt', author: 'promiseToPayBy' },\n [DebtorsDossierStatus.RESOLVED]: { date: 'resolvedAt', author: 'resolvedBy' },\n [DebtorsDossierStatus.FAILURE]: { date: 'failedAt', author: 'failedBy' },\n};\n\n/******\n * Auto Follow-Up Types\n ******/\n\nexport type ReminderWhatsappAttemptStatus = 'SENT' | 'DELIVERED' | 'FAILED' | 'SKIPPED';\n\n// see docs/adr/0026-whatsapp-leasing-notifications-alongside-email.md\nexport type ReminderWhatsappAttempt = {\n dedupId: string;\n templateId: string;\n phone: string;\n riskLevel: number;\n sentAt: string;\n status: ReminderWhatsappAttemptStatus;\n failureReason?: string;\n};\n\nexport type DebtorAutoFollowUp = {\n id: string;\n organizationId: string;\n organizationName: string;\n status: 'ONGOING' | 'ERROR' | 'SUCCESS' | 'EXPIRED' | 'DISCARDED';\n discardReason?: string;\n emails: EmailMessage[];\n whatsapps?: ReminderWhatsappAttempt[];\n createdAt: string;\n modifiedAt: string;\n completedAt?: string;\n nextActionAt: string;\n riskLevel: number;\n};\n\nexport type ListOverdueRemindersResponse = PaginatedList<DebtorAutoFollowUp, ReferenceData>;\nexport type ListOverdueRemindersRequest = {\n offset: number;\n limit: number;\n sortBy: SortFilter;\n};\n\n/******\n * Debtor Dossier Types\n ******/\n\nexport enum DebtorsDossierActions {\n SET_METADATA = 'set_metadata',\n ADD_ACTIVITY = 'add_activity',\n FINISH = 'finish',\n SET_DOCUMENTS = 'set_documents',\n SET_PAYMENT_PLAN = 'set_payment_plan',\n SET_LEGAL_DOSSIER = 'set_legal_dossier',\n REOPEN = 'reopen',\n}\n\nexport type DossierStatusLogFields = {\n failedAt?: string;\n failedBy?: string;\n resolvedAt?: string;\n contactedAt?: string;\n contactedBy?: string;\n overdueAt?: string;\n overdueBy?: string;\n resolvedBy?: string;\n dialogueAt?: string;\n dialogueBy?: string;\n promiseToPayAt?: string;\n promiseToPayBy?: string;\n};\n\nexport type BaseDebtorsDossier = {\n organizationId: string;\n tags: string[];\n origin: 'manual' | 'auto';\n autoFollowUpId?: string;\n administrativeUserId?: string;\n branchId: string;\n tenantId: string;\n};\nexport type DebtorsDossierStatusAudit = {\n from: DebtorsDossierStatus;\n to: DebtorsDossierStatus;\n changedAt: string;\n changedBy: string;\n};\n\nexport type DebtorsDossier = BaseDebtorsDossier &\n DossierStatusLogFields & {\n id: string;\n createdAt: string;\n createdBy: string;\n updatedAt: string;\n updatedBy: string;\n status: DebtorsDossierStatus;\n statusAudit: DebtorsDossierStatusAudit[];\n };\n\nexport type NewDebtorsDossier = BaseDebtorsDossier & {\n id?: undefined;\n createdBy?: undefined;\n createdAt?: undefined;\n updatedBy?: undefined;\n updatedAt?: undefined;\n};\n\nexport type DebtorsDossierBff = {\n dossier: DataRecord<DebtorsDossier>;\n organization?: Organization;\n leasingContracts: LeasingContract[];\n debt?: DebtorInfo;\n paymentPlan?: DebtorsPaymentPlan;\n legalDossier?: LegalDossier;\n trackAndTraceDevices: {\n /* odometer: TrackAndTraceOdometerData;\n device: TrackAndTraceDevice; */\n }[];\n};\n\nexport type UpdateDebtorsDossier = Partial<\n Pick<DebtorsDossier, 'status' | 'tags' | 'branchId' | 'organizationId'>\n> & {\n overdue?: boolean;\n resolve?: boolean;\n administrativeUserId?: string | null;\n};\n\n/******\n * Payment Plan Types\n ******/\n\nexport type DebtorsPaymentPlan = {\n id: string;\n debtorDossierId: string;\n\n notes: {\n content: string;\n createdAt: string;\n createdBy: string;\n }[];\n\n reminders?: {\n startDate: string; // ISO date string\n frequency: {\n every: number;\n period: 'days' | 'weeks' | 'months';\n };\n endCondition:\n | {\n endDate: string; // ISO date string\n }\n | {\n occurrences: number; // Number of reminders to send\n };\n };\n\n createdAt: string;\n createdBy: string;\n updatedAt: string;\n updatedBy: string;\n};\n\nexport type NewPaymentPlan = Omit<\n DebtorsPaymentPlan,\n 'id' | 'createdAt' | 'updatedAt' | 'createdBy' | 'updatedBy' | 'notes'\n> & { notes?: string };\n\nexport type UpdatePaymentPlan = Partial<Pick<DebtorsPaymentPlan, 'reminders'>> & {\n newNote?: string;\n};\n\n/******\n * Legal Dossier Types\n ******/\n\nexport enum LegalDossierStatus {\n ASSESSMENT = 'assessment',\n PRE_LEGAL_NOTICE = 'pre_legal_notice',\n SENT_TO_LAWYER = 'sent_to_lawyer',\n FILED = 'filed',\n IN_COURT = 'in_court',\n JUDGMENT = 'judgment',\n ENFORCEMENT = 'enforcement',\n SETTLEMENT = 'settlement',\n CLOSED_RECOVERED = 'closed_recovered',\n CLOSED_UNRECOVERABLE = 'closed_unrecoverable',\n ON_HOLD = 'on_hold',\n}\n\nexport type LegalDossier = {\n id: string;\n debtorDossierId: string;\n caseNumber?: string;\n courtDate?: string; // ISO date string (YYYY-MM-DD)\n vehicleReportedToPolice?: boolean;\n vehicleReportedToPoliceAt?: string; // ISO timestamp, stamped server-side\n notes?: string;\n createdAt: string;\n createdBy: string;\n updatedAt: string;\n updatedBy: string;\n status: LegalDossierStatus;\n};\n\nexport type NewLegalDossier = Omit<\n LegalDossier,\n 'id' | 'createdAt' | 'updatedAt' | 'createdBy' | 'updatedBy'\n>;\n\nexport type UpdateLegalDossier = Partial<\n Pick<LegalDossier, 'caseNumber' | 'courtDate' | 'status' | 'notes' | 'vehicleReportedToPolice'>\n>;\n\n/******\n * Debtor Dossier Events\n ******/\n\nexport type DebtorsDossierCreateEvent = {\n action: 'created';\n data: DebtorsDossier;\n previousData?: undefined;\n tenantId: string;\n userId: string;\n};\n\nexport type DebtorsDossierUpdateEvent = {\n action: 'updated';\n data: DebtorsDossier;\n previousData: DebtorsDossier;\n tenantId: string;\n userId: string;\n};\n\nexport type DebtorsDossierDeleteEvent = {\n action: 'deleted';\n data?: undefined;\n previousData: DebtorsDossier;\n tenantId: string;\n userId: string;\n};\n\nexport type DebtorsDossierEvent =\n | DebtorsDossierCreateEvent\n | DebtorsDossierUpdateEvent\n | DebtorsDossierDeleteEvent;\n\n/************\n *\n * Search\n */\n\nexport type SearchDebtorsDossier = {\n contact?: Contact;\n debtorsDossier: DebtorsDossier;\n org?: Organization;\n legalDossier?: LegalDossier;\n paymentPlan?: DebtorsPaymentPlan;\n hasPaymentPlan?: boolean;\n branchIds?: string[];\n tasks: {\n totalTasks: number;\n openTasks: number;\n nextDueAt?: string;\n };\n overdue: {\n riskLevel: number;\n riskLevelLabel?: string;\n remindersSent: number;\n hasActiveLdrs?: boolean;\n };\n /** One entry per tracked contract of the organization, copied from the contracts index. */\n mileage?: ContractMileage[];\n mileageSummary?: MileageSummary;\n};\n\n/************\n *\n * Kanban\n */\n\nexport type DebtorsDossierKanbanColumn = {\n status: DebtorsDossierStatus;\n results: SearchDebtorsDossier[];\n totalCount: number;\n totalValue: string;\n};\n\nexport type MSearchDebtorsDossierKanbanColumn = {\n column: DebtorsDossierKanbanColumn;\n nextToken?: string;\n};\n\nexport type KanbanDebtorsDossierSearchRequest = BaseSearchRequest & {\n nextTokens?: Record<string, string | undefined>;\n statusSortBy?: Record<DebtorsDossierStatus, { fieldId: string; order: SortOrder }[]>;\n};\n\nexport type KanbanDebtorsDossierNextList = Omit<\n NextList<DebtorsDossierKanbanColumn, ReferenceData>,\n 'nextToken'\n> & {\n nextTokens?: Record<string, string | undefined>;\n};\n\nexport const DebtorsDossierStatusOrder: DebtorsDossierStatus[] = [\n DebtorsDossierStatus.AUTO_REMINDER,\n DebtorsDossierStatus.OVERDUE,\n DebtorsDossierStatus.CONTACT_ATTEMPTED,\n DebtorsDossierStatus.DIALOGUE,\n DebtorsDossierStatus.PROMISE_TO_PAY,\n DebtorsDossierStatus.FAILURE,\n];\n\nexport const DebtorsDossierWonColumnId = DebtorsDossierStatus.RESOLVED;\n\nexport const DebtorsDossierKanbanEndColumns: DebtorsDossierStatus[] = [\n DebtorsDossierStatus.RESOLVED,\n];\n\nexport const DebtorsDossierKanbanColumns = [\n ...DebtorsDossierStatusOrder,\n ...DebtorsDossierKanbanEndColumns,\n];\n"]}
@@ -26,6 +26,7 @@ export type SearchLeasingContract = {
26
26
  hasActiveRecurrence?: boolean;
27
27
  lastRecurrenceRunAt?: string;
28
28
  mileage?: ContractMileage;
29
+ mileageSortKm?: number;
29
30
  };
30
31
  };
31
32
  export type InputSearchLeasingContract = SearchLeasingContract;
@@ -1 +1 @@
1
- {"version":3,"file":"leasing-search.d.ts","sourceRoot":"/","sources":["types/leasing-search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,MAAM,MAAM,8BAA8B,GAAG;IAC3C,qBAAqB,EAAE,sBAAsB,CAAC;CAC/C,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C,OAAO,EAAE,sBAAsB,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE,eAAe,CAAC;IAC1B,GAAG,EAAE,YAAY,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,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,CAAC;QAChB,SAAS,CAAC,EAAE,cAAc,CAAC;QAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,qBAAqB,CAAC,EAAE,MAAM,CAAC;QAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,mBAAmB,CAAC,EAAE,OAAO,CAAC;QAC9B,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,OAAO,CAAC,EAAE,eAAe,CAAC;QAE1B,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,qBAAqB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"leasing-search.js","sourceRoot":"/","sources":["types/leasing-search.ts"],"names":[],"mappings":"","sourcesContent":["import { InsuranceEntry } from '@bisondesk/commons-sdk/insurance';\nimport { Contact, Organization } from './crm.js';\nimport { PublicSearchDefinition } from './definitions.js';\nimport { LeasingContract } from './leasing.js';\nimport { ContractMileage } from './mileage.js';\nimport { Vehicle } from './vehicles.js';\n\nexport type LeasingPublicSearchDefinitions = {\n searchLeasingContract: PublicSearchDefinition;\n};\n\nexport type LeasingDebtorsSearchDefinitions = {\n debtors: PublicSearchDefinition;\n};\n\nexport type SearchLeasingContract = {\n contract: LeasingContract;\n org: Organization;\n contact?: Contact;\n vehicle: Vehicle;\n custom: {\n active: boolean;\n insurance?: InsuranceEntry;\n externalTracking?: boolean;\n accountManager?: string;\n lastIssuedInvoiceDate?: string;\n dealRating?: number;\n supplierName?: string;\n hasActiveRecurrence?: boolean;\n lastRecurrenceRunAt?: string;\n mileage?: ContractMileage;\n };\n};\n\nexport type InputSearchLeasingContract = SearchLeasingContract;\n"]}
1
+ {"version":3,"file":"leasing-search.js","sourceRoot":"/","sources":["types/leasing-search.ts"],"names":[],"mappings":"","sourcesContent":["import { InsuranceEntry } from '@bisondesk/commons-sdk/insurance';\nimport { Contact, Organization } from './crm.js';\nimport { PublicSearchDefinition } from './definitions.js';\nimport { LeasingContract } from './leasing.js';\nimport { ContractMileage } from './mileage.js';\nimport { Vehicle } from './vehicles.js';\n\nexport type LeasingPublicSearchDefinitions = {\n searchLeasingContract: PublicSearchDefinition;\n};\n\nexport type LeasingDebtorsSearchDefinitions = {\n debtors: PublicSearchDefinition;\n};\n\nexport type SearchLeasingContract = {\n contract: LeasingContract;\n org: Organization;\n contact?: Contact;\n vehicle: Vehicle;\n custom: {\n active: boolean;\n insurance?: InsuranceEntry;\n externalTracking?: boolean;\n accountManager?: string;\n lastIssuedInvoiceDate?: string;\n dealRating?: number;\n supplierName?: string;\n hasActiveRecurrence?: boolean;\n lastRecurrenceRunAt?: string;\n mileage?: ContractMileage;\n /** The km column's sort value: -2 without km figures, -1 without signal, else the km. */\n mileageSortKm?: number;\n };\n};\n\nexport type InputSearchLeasingContract = SearchLeasingContract;\n"]}
@@ -49,12 +49,35 @@ export type VehiclePurchasePaymentBff = {
49
49
  vehicle: SearchVehicle;
50
50
  supplierName?: string;
51
51
  exportChecks?: PaymentExportChecks;
52
+ documents?: UnpaidPurchaseDocument[];
53
+ invoiceDueDate?: string;
52
54
  };
53
55
  export declare enum UnpaidPurchaseGroup {
54
56
  Sold = "sold",
55
57
  Arrived = "arrived",
56
58
  Expected = "expected"
57
59
  }
60
+ export declare enum UnpaidPurchaseLogisticStatus {
61
+ Delivered = "delivered",
62
+ Arrived = "arrived",
63
+ DirectDelivery = "directDelivery",
64
+ Expected = "expected"
65
+ }
66
+ export declare enum UnpaidPurchaseDocument {
67
+ PurchaseInvoice = "purchase_invoice",
68
+ Registration = "registration",
69
+ RegistrationCopy = "registration_copy"
70
+ }
71
+ export type UnpaidPurchasesFilters = {
72
+ q?: string;
73
+ sold?: boolean;
74
+ logisticStatus?: UnpaidPurchaseLogisticStatus;
75
+ purchasedBy?: string[];
76
+ branchId?: string;
77
+ used?: boolean;
78
+ documents?: UnpaidPurchaseDocument[];
79
+ group?: UnpaidPurchaseGroup;
80
+ };
58
81
  export type UnpaidPurchase = {
59
82
  group: UnpaidPurchaseGroup;
60
83
  vehicle: SearchVehicle;
@@ -63,10 +86,12 @@ export type UnpaidPurchase = {
63
86
  paidAmount: string;
64
87
  remainingAmount: string;
65
88
  invoiceDueDate?: string;
89
+ documents: UnpaidPurchaseDocument[];
66
90
  supplierName?: string;
67
91
  };
68
92
  export type UnpaidPurchasesMeta = {
69
93
  canAllowPayment: boolean;
94
+ purchasers: string[];
70
95
  counts: Record<UnpaidPurchaseGroup, number>;
71
96
  };
72
97
  export type ExportPaymentsRequest = {
@@ -1 +1 @@
1
- {"version":3,"file":"vehicle-purchase-payments.d.ts","sourceRoot":"/","sources":["types/vehicle-purchase-payments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,eAAO,MAAM,oDAAoD,kDAChB,CAAC;AASlD,oBAAY,YAAY;IACtB,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,QAAQ,aAAa;CACtB;AAMD,MAAM,MAAM,6BAA6B,GAAG;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IAErB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,EAAE,MAAM,CAAC;IAElB,MAAM,EAAE,MAAM,CAAC;IAEf,OAAO,CAAC,EAAE,IAAI,CAAC,6BAA6B,EAAE,QAAQ,GAAG,cAAc,CAAC,CAAC;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,sBAAsB,G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AM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG;IAC9C,OAAO,EAAE,sBAAsB,CAAC;IAChC,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,MAAM,EAAE,QAAQ,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG;IAC9C,OAAO,EAAE,sBAAsB,CAAC;IAChC,eAAe,EAAE,sBAAsB,CAAC;IACxC,MAAM,EAAE,QAAQ,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG;IAC9C,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,eAAe,EAAE,sBAAsB,CAAC;IACxC,MAAM,EAAE,QAAQ,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,SAAS,GACjD,CACI,iCAAiC,GACjC,iCAAiC,GACjC,iCAAiC,CACpC,CAAC"}
@@ -11,4 +11,17 @@ export var UnpaidPurchaseGroup;
11
11
  UnpaidPurchaseGroup["Arrived"] = "arrived";
12
12
  UnpaidPurchaseGroup["Expected"] = "expected";
13
13
  })(UnpaidPurchaseGroup || (UnpaidPurchaseGroup = {}));
14
+ export var UnpaidPurchaseLogisticStatus;
15
+ (function (UnpaidPurchaseLogisticStatus) {
16
+ UnpaidPurchaseLogisticStatus["Delivered"] = "delivered";
17
+ UnpaidPurchaseLogisticStatus["Arrived"] = "arrived";
18
+ UnpaidPurchaseLogisticStatus["DirectDelivery"] = "directDelivery";
19
+ UnpaidPurchaseLogisticStatus["Expected"] = "expected";
20
+ })(UnpaidPurchaseLogisticStatus || (UnpaidPurchaseLogisticStatus = {}));
21
+ export var UnpaidPurchaseDocument;
22
+ (function (UnpaidPurchaseDocument) {
23
+ UnpaidPurchaseDocument["PurchaseInvoice"] = "purchase_invoice";
24
+ UnpaidPurchaseDocument["Registration"] = "registration";
25
+ UnpaidPurchaseDocument["RegistrationCopy"] = "registration_copy";
26
+ })(UnpaidPurchaseDocument || (UnpaidPurchaseDocument = {}));
14
27
  //# sourceMappingURL=vehicle-purchase-payments.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"vehicle-purchase-payments.js","sourceRoot":"/","sources":["types/vehicle-purchase-payments.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,oDAAoD,GAC/D,+CAA+C,CAAC;AASlD,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,yCAAyB,CAAA;IACzB,qCAAqB,CAAA;AACvB,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB;AA6FD,MAAM,CAAN,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,oCAAa,CAAA;IACb,0CAAmB,CAAA;IACnB,4CAAqB,CAAA;AACvB,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,QAI9B","sourcesContent":["import { BaseEvent } from './internal-events.js';\nimport { OrganizationBankAccountActions } from './organization-bank-accounts.js';\nimport { SearchVehicle } from './vehicles.js';\n\nexport const VEHICLE_PURCHASE_PAYMENT_ALLOWED_NOTIFICATION_ORIGIN =\n 'vehicle-purchase-payment-allowed-notification';\n\n/**\n * The stage a supplier payment sits at, driving the Unpaid/Allowed/Processing/Executed tabs.\n * A payment only ever moves forward: an authorised payment is `allowed`; sending it to processing\n * groups it into a payment batch and hands it to accounting (`processing`), which exports it\n * to the Isabel bank file; marking it paid moves it to `executed`.\n * (`unpaid` is not a stage — it is an agreed purchase with an amount still to authorise.)\n */\nexport enum PaymentStage {\n Allowed = 'allowed',\n Processing = 'processing',\n Executed = 'executed',\n}\n\n/**\n * A payment on a purchase priced in another currency is authorized and paid in that currency.\n * `amount` then holds its value in branch currency: `foreign.amount × foreign.exchangeRate`.\n */\nexport type VehiclePurchasePaymentForeign = {\n amount: string;\n currencyCode: string;\n /** Branch currency units per 1 unit of `currencyCode`, the purchase's rate. */\n exchangeRate: string;\n};\n\nexport type NewVehiclePurchasePayment = {\n vehicleId: string;\n /** Branch currency. Derived from `foreign` when the purchase is priced in another currency. */\n amount: string;\n /** The backend takes the rate from the purchase. */\n foreign?: Pick<VehiclePurchasePaymentForeign, 'amount' | 'currencyCode'>;\n description?: string;\n paidAt?: string;\n paidBy?: string;\n};\n\nexport type VehiclePurchasePayment = Omit<NewVehiclePurchasePayment, 'foreign'> & {\n id: string;\n createdBy: string;\n createdAt: string;\n foreign?: VehiclePurchasePaymentForeign;\n stage: PaymentStage;\n /** Manual settlement priority within the Allowed tab; lower is paid first. */\n priority: number;\n /** Set once the payment has been exported; links it to its payment export. */\n exportId?: string;\n /** The payment batch this payment was sent to processing in; unset while Allowed, and on payments\n * marked paid straight from Allowed. */\n paymentBatchId?: string;\n /**\n * Supplier-facing communication that becomes the SEPA transfer's remittance information (`RmtInf`),\n * so the supplier can reconcile the payment to an invoice. Editable while Processing and not yet\n * exported; prefilled from the latest purchase invoice. This is not the file's per-line\n * `EndToEndId`.\n */\n transferReference?: string;\n /** Who sent the payment to processing, and when — set at the Allowed → Processing step. */\n sentToProcessingBy?: string;\n sentToProcessingAt?: string;\n};\n\n/**\n * One send to processing: the Allowed payments an accountant moved to Processing together, and who\n * sent them. The Processing tab groups its rows by batch. A batch holds no amount of its own; its\n * total is the sum of the payments still in it.\n */\nexport type PaymentBatch = {\n id: string;\n createdAt: string;\n createdBy: string;\n};\n\n/**\n * Whether a payment's supplier can be paid in an export. Mirrors the export gate: a transfer needs a\n * supplier bank account that carries an IBAN and holder name and has been verified. Shown as an\n * export-blocked marker on the Processing rows, where the accountant clears it before exporting.\n * (The invoice / pro-forma document half of the gate is not reflected here — its source is a Q3\n * residual the backend export gate also defers.)\n *\n * The bank account is the supplier's default one, `bankAccountId`, which is the account an export\n * pays. `bankAccountActions` lists what the current user may do on it, so a row can point out the\n * accounts they can verify themselves. Once the account number or holder name changed, verify is\n * left out for accountants, and for whichever Senior Accountant made the change (four-eyes).\n */\nexport type PaymentExportChecks = {\n bankAccountId?: string;\n hasBankAccount: boolean;\n bankAccountVerified: boolean;\n bankAccountActions: OrganizationBankAccountActions[];\n};\n\nexport type VehiclePurchasePaymentBff = {\n payment: VehiclePurchasePayment;\n vehicle: SearchVehicle;\n /** Name of the supplier organisation (`vehicle.purchase.organizationId`), resolved for display. */\n supplierName?: string;\n /** Export checks on the supplier bank account; filled for the Processing list only. */\n exportChecks?: PaymentExportChecks;\n};\n\n/**\n * The group an unpaid purchase is listed under, in the order the Unpaid list shows them: sold to a\n * client (whether or not it has arrived), arrived on our park and not sold, or still expected —\n * neither sold nor arrived.\n */\nexport enum UnpaidPurchaseGroup {\n Sold = 'sold',\n Arrived = 'arrived',\n Expected = 'expected',\n}\n\n/**\n * A row on the Unpaid tab: an agreed purchase that still has an amount to authorise for payment.\n * Derived from the purchase deal and the payments already authorised, not a payment record.\n */\nexport type UnpaidPurchase = {\n group: UnpaidPurchaseGroup;\n vehicle: SearchVehicle;\n /** The agreed purchase price including VAT (`deal.purchase` grossed up by `deal.purchaseVatRate`),\n * so it matches the VAT-inclusive cost the vehicle purchase tab authorises against. */\n purchaseAmount: string;\n /** Sum of amounts already authorised (payments in any stage) for this vehicle. */\n allowedAmount: string;\n /** Sum of the authorised amounts already settled (payments in Executed) for this vehicle. */\n paidAmount: string;\n /** `purchaseAmount − allowedAmount`; always greater than zero for rows shown here. */\n remainingAmount: string;\n /** Due date of the purchase invoice. */\n invoiceDueDate?: string;\n /** Name of the supplier organisation (`vehicle.purchase.organizationId`), resolved for display. */\n supplierName?: string;\n};\n\n/** What a page of one Unpaid group carries besides its rows. */\nexport type UnpaidPurchasesMeta = {\n /** Whether the requester may authorise a payment, as on the vehicle purchase tab. */\n canAllowPayment: boolean;\n /** How many purchases each group holds, for the group headers. */\n counts: Record<UnpaidPurchaseGroup, number>;\n};\n\n/** Body of the export request: the Processing payments to put in one file, the paying account, and the execution date. */\nexport type ExportPaymentsRequest = {\n paymentIds: string[];\n /** The bank account (from documents settings) to pay the file from — the file's debtor. */\n debtorBankAccountId: string;\n /** Single execution date (`yyyy-MM-dd`) written to `ReqdExctnDt`; defaults to today. */\n executionDate?: string;\n};\n\n/** Body of the mark-paid request: the payments (Allowed or Processing) to settle in one call. */\nexport type MarkPaymentsPaidRequest = {\n paymentIds: string[];\n};\n\n/** Body of the send-to-processing request: the Allowed payments to send together as one batch. */\nexport type SendPaymentsToProcessingRequest = {\n paymentIds: string[];\n};\n\n/**\n * How many rows sit behind each payment tab, for the tab counters. Executed is unbounded and has no\n * counter, so it is left out.\n */\nexport type PurchasePaymentCounts = {\n unpaid: number;\n allowed: number;\n processing: number;\n};\n\nexport type VehiclePurchasePaymentCreateEvent = {\n payment: VehiclePurchasePayment;\n previousPayment?: undefined;\n action: 'create';\n actionAt: string;\n userId: string;\n tenantId: string;\n};\n\nexport type VehiclePurchasePaymentUpdateEvent = {\n payment: VehiclePurchasePayment;\n previousPayment: VehiclePurchasePayment;\n action: 'update';\n actionAt: string;\n userId: string;\n tenantId: string;\n};\n\nexport type VehiclePurchasePaymentDeleteEvent = {\n payment?: undefined;\n previousPayment: VehiclePurchasePayment;\n action: 'delete';\n actionAt: string;\n userId: string;\n tenantId: string;\n};\n\nexport type VehiclePurchasePaymentEvent = BaseEvent &\n (\n | VehiclePurchasePaymentCreateEvent\n | VehiclePurchasePaymentUpdateEvent\n | VehiclePurchasePaymentDeleteEvent\n );\n"]}
1
+ {"version":3,"file":"vehicle-purchase-payments.js","sourceRoot":"/","sources":["types/vehicle-purchase-payments.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,oDAAoD,GAC/D,+CAA+C,CAAC;AASlD,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,yCAAyB,CAAA;IACzB,qCAAqB,CAAA;AACvB,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB;AAkGD,MAAM,CAAN,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,oCAAa,CAAA;IACb,0CAAmB,CAAA;IACnB,4CAAqB,CAAA;AACvB,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,QAI9B;AAQD,MAAM,CAAN,IAAY,4BAKX;AALD,WAAY,4BAA4B;IACtC,uDAAuB,CAAA;IACvB,mDAAmB,CAAA;IACnB,iEAAiC,CAAA;IACjC,qDAAqB,CAAA;AACvB,CAAC,EALW,4BAA4B,KAA5B,4BAA4B,QAKvC;AASD,MAAM,CAAN,IAAY,sBAIX;AAJD,WAAY,sBAAsB;IAChC,8DAAoC,CAAA;IACpC,uDAA6B,CAAA;IAC7B,gEAAsC,CAAA;AACxC,CAAC,EAJW,sBAAsB,KAAtB,sBAAsB,QAIjC","sourcesContent":["import { BaseEvent } from './internal-events.js';\nimport { OrganizationBankAccountActions } from './organization-bank-accounts.js';\nimport { SearchVehicle } from './vehicles.js';\n\nexport const VEHICLE_PURCHASE_PAYMENT_ALLOWED_NOTIFICATION_ORIGIN =\n 'vehicle-purchase-payment-allowed-notification';\n\n/**\n * The stage a supplier payment sits at, driving the Unpaid/Allowed/Processing/Executed tabs.\n * A payment only ever moves forward: an authorised payment is `allowed`; sending it to processing\n * groups it into a payment batch and hands it to accounting (`processing`), which exports it\n * to the Isabel bank file; marking it paid moves it to `executed`.\n * (`unpaid` is not a stage — it is an agreed purchase with an amount still to authorise.)\n */\nexport enum PaymentStage {\n Allowed = 'allowed',\n Processing = 'processing',\n Executed = 'executed',\n}\n\n/**\n * A payment on a purchase priced in another currency is authorized and paid in that currency.\n * `amount` then holds its value in branch currency: `foreign.amount × foreign.exchangeRate`.\n */\nexport type VehiclePurchasePaymentForeign = {\n amount: string;\n currencyCode: string;\n /** Branch currency units per 1 unit of `currencyCode`, the purchase's rate. */\n exchangeRate: string;\n};\n\nexport type NewVehiclePurchasePayment = {\n vehicleId: string;\n /** Branch currency. Derived from `foreign` when the purchase is priced in another currency. */\n amount: string;\n /** The backend takes the rate from the purchase. */\n foreign?: Pick<VehiclePurchasePaymentForeign, 'amount' | 'currencyCode'>;\n description?: string;\n paidAt?: string;\n paidBy?: string;\n};\n\nexport type VehiclePurchasePayment = Omit<NewVehiclePurchasePayment, 'foreign'> & {\n id: string;\n createdBy: string;\n createdAt: string;\n foreign?: VehiclePurchasePaymentForeign;\n stage: PaymentStage;\n /** Manual settlement priority within the Allowed tab; lower is paid first. */\n priority: number;\n /** Set once the payment has been exported; links it to its payment export. */\n exportId?: string;\n /** The payment batch this payment was sent to processing in; unset while Allowed, and on payments\n * marked paid straight from Allowed. */\n paymentBatchId?: string;\n /**\n * Supplier-facing communication that becomes the SEPA transfer's remittance information (`RmtInf`),\n * so the supplier can reconcile the payment to an invoice. Editable while Processing and not yet\n * exported; prefilled from the latest purchase invoice. This is not the file's per-line\n * `EndToEndId`.\n */\n transferReference?: string;\n /** Who sent the payment to processing, and when — set at the Allowed → Processing step. */\n sentToProcessingBy?: string;\n sentToProcessingAt?: string;\n};\n\n/**\n * One send to processing: the Allowed payments an accountant moved to Processing together, and who\n * sent them. The Processing tab groups its rows by batch. A batch holds no amount of its own; its\n * total is the sum of the payments still in it.\n */\nexport type PaymentBatch = {\n id: string;\n createdAt: string;\n createdBy: string;\n};\n\n/**\n * Whether a payment's supplier can be paid in an export. Mirrors the export gate: a transfer needs a\n * supplier bank account that carries an IBAN and holder name and has been verified. Shown as an\n * export-blocked marker on the Processing rows, where the accountant clears it before exporting.\n * (The invoice / pro-forma document half of the gate is not reflected here — its source is a Q3\n * residual the backend export gate also defers.)\n *\n * The bank account is the supplier's default one, `bankAccountId`, which is the account an export\n * pays. `bankAccountActions` lists what the current user may do on it, so a row can point out the\n * accounts they can verify themselves. Once the account number or holder name changed, verify is\n * left out for accountants, and for whichever Senior Accountant made the change (four-eyes).\n */\nexport type PaymentExportChecks = {\n bankAccountId?: string;\n hasBankAccount: boolean;\n bankAccountVerified: boolean;\n bankAccountActions: OrganizationBankAccountActions[];\n};\n\nexport type VehiclePurchasePaymentBff = {\n payment: VehiclePurchasePayment;\n vehicle: SearchVehicle;\n /** Name of the supplier organisation (`vehicle.purchase.organizationId`), resolved for display. */\n supplierName?: string;\n /** Export checks on the supplier bank account; filled for the Processing list only. */\n exportChecks?: PaymentExportChecks;\n /** The documents the vehicle already has, as on the Unpaid list; filled for the Allowed list only. */\n documents?: UnpaidPurchaseDocument[];\n /** Due date of the vehicle's latest main purchase invoice; filled for the Allowed list only. */\n invoiceDueDate?: string;\n};\n\n/**\n * The group an unpaid purchase falls in, in the order the Unpaid list ranks them: sold to a client\n * (whether or not it has arrived), arrived on our park and not sold, or still expected — neither\n * sold nor arrived. The single Unpaid list filters by `sold` and `logisticStatus` instead; the\n * `group` filter and `meta.counts` serve the client that paged each group on its own.\n */\nexport enum UnpaidPurchaseGroup {\n Sold = 'sold',\n Arrived = 'arrived',\n Expected = 'expected',\n}\n\n/**\n * Where the vehicle behind an unpaid purchase stands, in the order the Unpaid list ranks them:\n * delivered to the client, arrived on our park, going straight from the supplier to the client\n * (`deal.readyToDeliver`), or still expected from the supplier. Delivered comes from the sale side,\n * so only a sold vehicle is delivered, whether or not it passed our park.\n */\nexport enum UnpaidPurchaseLogisticStatus {\n Delivered = 'delivered',\n Arrived = 'arrived',\n DirectDelivery = 'directDelivery',\n Expected = 'expected',\n}\n\n/**\n * A document the payments page tracks for the vehicle behind a purchase: the main purchase invoice (a\n * purchase invoice with a vehicle line, the Purchase Invoice of the vehicle's Document Checks; invoices\n * for transport or repairs do not count), and the vehicle's registration, the original or a copy. The\n * registration values are the administrative document types, and only documents filed on the vehicle\n * count.\n */\nexport enum UnpaidPurchaseDocument {\n PurchaseInvoice = 'purchase_invoice',\n Registration = 'registration',\n RegistrationCopy = 'registration_copy',\n}\n\n/** The filters on the Unpaid list. A filter left out keeps every purchase. */\nexport type UnpaidPurchasesFilters = {\n /**\n * Free text, case-insensitive: every word must appear in the stock number, VIN, vehicle title or\n * supplier name.\n */\n q?: string;\n sold?: boolean;\n logisticStatus?: UnpaidPurchaseLogisticStatus;\n /** Purchasers (`purchase.purchasedBy`); a purchase matches any of them. */\n purchasedBy?: string[];\n branchId?: string;\n /** The vehicle's condition (`external.condition.used`); a vehicle without one matches neither. */\n used?: boolean;\n /** Documents the vehicle must have, every one of them. */\n documents?: UnpaidPurchaseDocument[];\n group?: UnpaidPurchaseGroup;\n};\n\n/**\n * A row on the Unpaid tab: an agreed purchase that still has an amount to authorise for payment.\n * Derived from the purchase deal and the payments already authorised, not a payment record.\n */\nexport type UnpaidPurchase = {\n group: UnpaidPurchaseGroup;\n vehicle: SearchVehicle;\n /** The agreed purchase price including VAT (`deal.purchase` grossed up by `deal.purchaseVatRate`),\n * so it matches the VAT-inclusive cost the vehicle purchase tab authorises against. */\n purchaseAmount: string;\n /** Sum of amounts already authorised (payments in any stage) for this vehicle. */\n allowedAmount: string;\n /** Sum of the authorised amounts already settled (payments in Executed) for this vehicle. */\n paidAmount: string;\n /** `purchaseAmount − allowedAmount`; always greater than zero for rows shown here. */\n remainingAmount: string;\n /** Due date of the vehicle's latest main purchase invoice, latest by issue date. */\n invoiceDueDate?: string;\n /** The documents the vehicle already has. */\n documents: UnpaidPurchaseDocument[];\n /** Name of the supplier organisation (`vehicle.purchase.organizationId`), resolved for display. */\n supplierName?: string;\n};\n\n/** What a page of the Unpaid list carries besides its rows. */\nexport type UnpaidPurchasesMeta = {\n /** Whether the requester may authorise a payment, as on the vehicle purchase tab. */\n canAllowPayment: boolean;\n /** Everyone who purchased an unpaid purchase, unfiltered, for the purchaser filter. */\n purchasers: string[];\n /** How many purchases each group holds, unfiltered. */\n counts: Record<UnpaidPurchaseGroup, number>;\n};\n\n/** Body of the export request: the Processing payments to put in one file, the paying account, and the execution date. */\nexport type ExportPaymentsRequest = {\n paymentIds: string[];\n /** The bank account (from documents settings) to pay the file from — the file's debtor. */\n debtorBankAccountId: string;\n /** Single execution date (`yyyy-MM-dd`) written to `ReqdExctnDt`; defaults to today. */\n executionDate?: string;\n};\n\n/** Body of the mark-paid request: the payments (Allowed or Processing) to settle in one call. */\nexport type MarkPaymentsPaidRequest = {\n paymentIds: string[];\n};\n\n/** Body of the send-to-processing request: the Allowed payments to send together as one batch. */\nexport type SendPaymentsToProcessingRequest = {\n paymentIds: string[];\n};\n\n/**\n * How many rows sit behind each payment tab, for the tab counters. Executed is unbounded and has no\n * counter, so it is left out.\n */\nexport type PurchasePaymentCounts = {\n unpaid: number;\n allowed: number;\n processing: number;\n};\n\nexport type VehiclePurchasePaymentCreateEvent = {\n payment: VehiclePurchasePayment;\n previousPayment?: undefined;\n action: 'create';\n actionAt: string;\n userId: string;\n tenantId: string;\n};\n\nexport type VehiclePurchasePaymentUpdateEvent = {\n payment: VehiclePurchasePayment;\n previousPayment: VehiclePurchasePayment;\n action: 'update';\n actionAt: string;\n userId: string;\n tenantId: string;\n};\n\nexport type VehiclePurchasePaymentDeleteEvent = {\n payment?: undefined;\n previousPayment: VehiclePurchasePayment;\n action: 'delete';\n actionAt: string;\n userId: string;\n tenantId: string;\n};\n\nexport type VehiclePurchasePaymentEvent = BaseEvent &\n (\n | VehiclePurchasePaymentCreateEvent\n | VehiclePurchasePaymentUpdateEvent\n | VehiclePurchasePaymentDeleteEvent\n );\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bisondesk/core-sdk",
3
- "version": "1.0.683",
3
+ "version": "1.0.685",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "author": "TheTruckCompany",
@@ -0,0 +1,13 @@
1
+ export var ActivityType;
2
+ (function (ActivityType) {
3
+ ActivityType["CALL"] = "call";
4
+ ActivityType["MEETING"] = "meeting";
5
+ ActivityType["EMAIL"] = "email";
6
+ ActivityType["CHAT"] = "chat";
7
+ })(ActivityType || (ActivityType = {}));
8
+ export var ActivityActions;
9
+ (function (ActivityActions) {
10
+ ActivityActions["DELETE"] = "delete";
11
+ ActivityActions["EDIT"] = "edit";
12
+ })(ActivityActions || (ActivityActions = {}));
13
+ //# sourceMappingURL=activities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activities.js","sourceRoot":"","sources":["activities.ts"],"names":[],"mappings":"AAGA,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,mCAAmB,CAAA;IACnB,+BAAe,CAAA;IACf,6BAAa,CAAA;AACf,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB;AAED,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,gCAAa,CAAA;AACf,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=comparables.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comparables.js","sourceRoot":"","sources":["comparables.ts"],"names":[],"mappings":""}
@@ -0,0 +1,58 @@
1
+ export var OrganizatioRiskTags;
2
+ (function (OrganizatioRiskTags) {
3
+ OrganizatioRiskTags["BAD_FINANCIAL_INFO"] = "BAD_FINANCIAL_INFO";
4
+ OrganizatioRiskTags["VAT_NUMBER_INVALID"] = "VAT_NUMBER_INVALID";
5
+ OrganizatioRiskTags["INSTINCT"] = "INSTINCT";
6
+ OrganizatioRiskTags["NEW_CUSTOMER"] = "NEW_CUSTOMER";
7
+ OrganizatioRiskTags["BANK_ACCOUNT_BLOCKED"] = "BANK_ACCOUNT_BLOCKED";
8
+ OrganizatioRiskTags["NO_GPS"] = "NO_GPS";
9
+ })(OrganizatioRiskTags || (OrganizatioRiskTags = {}));
10
+ export var ContactActions;
11
+ (function (ContactActions) {
12
+ ContactActions["UPSERT"] = "upsert";
13
+ ContactActions["DELETE"] = "delete";
14
+ })(ContactActions || (ContactActions = {}));
15
+ export var OrganizationActions;
16
+ (function (OrganizationActions) {
17
+ OrganizationActions["ADD_ACTIVITY"] = "add_activity";
18
+ OrganizationActions["UPSERT"] = "upsert";
19
+ OrganizationActions["DELETE"] = "delete";
20
+ OrganizationActions["SELL_TO_ORGANIZATION"] = "sell_to_organization";
21
+ })(OrganizationActions || (OrganizationActions = {}));
22
+ export var MarketingChannel;
23
+ (function (MarketingChannel) {
24
+ MarketingChannel["Email"] = "email";
25
+ MarketingChannel["Whatsapp"] = "whatsapp";
26
+ MarketingChannel["Sms"] = "sms";
27
+ MarketingChannel["Phone"] = "phone";
28
+ })(MarketingChannel || (MarketingChannel = {}));
29
+ export var PartnerLevel;
30
+ (function (PartnerLevel) {
31
+ PartnerLevel["Internal"] = "05-internal";
32
+ PartnerLevel["Gold"] = "10-gold";
33
+ PartnerLevel["Silver"] = "20-silver";
34
+ PartnerLevel["Bronze"] = "30-bronze";
35
+ })(PartnerLevel || (PartnerLevel = {}));
36
+ export var SaveContactResolution;
37
+ (function (SaveContactResolution) {
38
+ SaveContactResolution["IgnoreDuplicates"] = "IGNORE_DUPLICATES";
39
+ SaveContactResolution["BlockDuplicates"] = "BLOCK_DUPLICATES";
40
+ })(SaveContactResolution || (SaveContactResolution = {}));
41
+ export var SaveOrgResolution;
42
+ (function (SaveOrgResolution) {
43
+ SaveOrgResolution["IgnoreDuplicates"] = "IGNORE_DUPLICATES";
44
+ SaveOrgResolution["BlockDuplicates"] = "BLOCK_DUPLICATES";
45
+ })(SaveOrgResolution || (SaveOrgResolution = {}));
46
+ export var CrmSearchScope;
47
+ (function (CrmSearchScope) {
48
+ CrmSearchScope["Tenant"] = "tenant";
49
+ CrmSearchScope["Conglomerate"] = "conglomerate";
50
+ })(CrmSearchScope || (CrmSearchScope = {}));
51
+ export var OrgEngagementType;
52
+ (function (OrgEngagementType) {
53
+ OrgEngagementType["offers"] = "offers";
54
+ OrgEngagementType["purchases"] = "purchases";
55
+ OrgEngagementType["opportunities"] = "opportunities";
56
+ OrgEngagementType["sales"] = "sales";
57
+ })(OrgEngagementType || (OrgEngagementType = {}));
58
+ //# sourceMappingURL=crm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crm.js","sourceRoot":"","sources":["crm.ts"],"names":[],"mappings":"AAUA,MAAM,CAAN,IAAY,mBAOX;AAPD,WAAY,mBAAmB;IAC7B,gEAAyC,CAAA;IACzC,gEAAyC,CAAA;IACzC,4CAAqB,CAAA;IACrB,oDAA6B,CAAA;IAC7B,oEAA6C,CAAA;IAC7C,wCAAiB,CAAA;AACnB,CAAC,EAPW,mBAAmB,KAAnB,mBAAmB,QAO9B;AAED,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,mCAAiB,CAAA;AACnB,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAED,MAAM,CAAN,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,oDAA6B,CAAA;IAC7B,wCAAiB,CAAA;IACjB,wCAAiB,CAAA;IACjB,oEAA6C,CAAA;AAC/C,CAAC,EALW,mBAAmB,KAAnB,mBAAmB,QAK9B;AAgKD,MAAM,CAAN,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,mCAAe,CAAA;IACf,yCAAqB,CAAA;IACrB,+BAAW,CAAA;IACX,mCAAe,CAAA;AACjB,CAAC,EALW,gBAAgB,KAAhB,gBAAgB,QAK3B;AAWD,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,wCAAwB,CAAA;IACxB,gCAAgB,CAAA;IAChB,oCAAoB,CAAA;IACpB,oCAAoB,CAAA;AACtB,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB;AA6CD,MAAM,CAAN,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,+DAAsC,CAAA;IACtC,6DAAoC,CAAA;AACtC,CAAC,EAHW,qBAAqB,KAArB,qBAAqB,QAGhC;AAED,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,2DAAsC,CAAA;IACtC,yDAAoC,CAAA;AACtC,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B;AAED,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,+CAA6B,CAAA;AAC/B,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAED,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,4CAAuB,CAAA;IACvB,oDAA+B,CAAA;IAC/B,oCAAe,CAAA;AACjB,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B"}
package/src/types/crm.ts CHANGED
@@ -204,6 +204,7 @@ export type SearchOrganization = {
204
204
  inUse: boolean; // is this organization in use by any of the branches of this tenant, or is it an organization from another tenant.
205
205
  lastActivityAt: string | undefined; // last activity at this organization
206
206
  lastActivityBy: string | undefined; // user that did the last activity at this organization
207
+ contactedBy: string[]; // users who logged any activity tagged with this organization
207
208
  engagementTypes: OrgEngagementType[] | undefined; // types of engagements this organization has in the tenant
208
209
 
209
210
  accountManagers: string[]; // dynamically determined account managers for this organization
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=dashboard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboard.js","sourceRoot":"","sources":["dashboard.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from '@bisondesk/commons-sdk/definitions';
2
+ //# sourceMappingURL=definitions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["definitions.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from '@bisondesk/commons-sdk/fields';
2
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["fields.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=insights.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"insights.js","sourceRoot":"","sources":["insights.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export var InterestActions;
2
+ (function (InterestActions) {
3
+ InterestActions["SET_INTEREST"] = "set_interest";
4
+ })(InterestActions || (InterestActions = {}));
5
+ export const isOpportunityInterest = (interest) => 'opportunityId' in interest;
6
+ //# sourceMappingURL=interests.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interests.js","sourceRoot":"","sources":["interests.ts"],"names":[],"mappings":"AAGA,MAAM,CAAN,IAAY,eAEX;AAFD,WAAY,eAAe;IACzB,gDAA6B,CAAA;AAC/B,CAAC,EAFW,eAAe,KAAf,eAAe,QAE1B;AAwBD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,QAAkB,EAAmC,EAAE,CAC3F,eAAe,IAAI,QAAQ,CAAC"}
@@ -0,0 +1,18 @@
1
+ export var InternalEventTypes;
2
+ (function (InternalEventTypes) {
3
+ InternalEventTypes["VEHICLE_PURCHASE"] = "vehicle-purchases";
4
+ InternalEventTypes["ORGANIZATION"] = "organizations";
5
+ InternalEventTypes["CONTACT"] = "contacts";
6
+ InternalEventTypes["FINANCE_DOCUMENT"] = "finance-documents";
7
+ InternalEventTypes["OPPORTUNITY"] = "opportunities";
8
+ InternalEventTypes["VEHICLE"] = "vehicles";
9
+ InternalEventTypes["SALE_PAYMENT"] = "sale-payments";
10
+ InternalEventTypes["PURCHASE_PAYMENT"] = "vehicle-purchase-payments";
11
+ InternalEventTypes["OFFER"] = "offers";
12
+ })(InternalEventTypes || (InternalEventTypes = {}));
13
+ export var InternalNotificationChannels;
14
+ (function (InternalNotificationChannels) {
15
+ InternalNotificationChannels["APP"] = "app";
16
+ InternalNotificationChannels["EMAIL"] = "email";
17
+ })(InternalNotificationChannels || (InternalNotificationChannels = {}));
18
+ //# sourceMappingURL=internal-events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal-events.js","sourceRoot":"","sources":["internal-events.ts"],"names":[],"mappings":"AASA,MAAM,CAAN,IAAY,kBAUX;AAVD,WAAY,kBAAkB;IAC5B,4DAAsC,CAAA;IACtC,oDAA8B,CAAA;IAC9B,0CAAoB,CAAA;IACpB,4DAAsC,CAAA;IACtC,mDAA6B,CAAA;IAC7B,0CAAoB,CAAA;IACpB,oDAA8B,CAAA;IAC9B,oEAA8C,CAAA;IAC9C,sCAAgB,CAAA;AAClB,CAAC,EAVW,kBAAkB,KAAlB,kBAAkB,QAU7B;AAED,MAAM,CAAN,IAAY,4BAGX;AAHD,WAAY,4BAA4B;IACtC,2CAAW,CAAA;IACX,+CAAe,CAAA;AACjB,CAAC,EAHW,4BAA4B,KAA5B,4BAA4B,QAGvC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=internet-opportunities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internet-opportunities.js","sourceRoot":"","sources":["internet-opportunities.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=internet-vehicles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internet-vehicles.js","sourceRoot":"","sources":["internet-vehicles.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=leasing-administration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"leasing-administration.js","sourceRoot":"","sources":["leasing-administration.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=leasing-debtors.js.map