@bisondesk/core-sdk 1.0.581 → 1.0.582
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/apis/country-pricing.d.ts +3 -0
- package/lib/apis/country-pricing.d.ts.map +1 -0
- package/lib/apis/country-pricing.js +20 -0
- package/lib/apis/country-pricing.js.map +1 -0
- package/lib/types/country-pricing.d.ts +9 -0
- package/lib/types/country-pricing.d.ts.map +1 -0
- package/lib/types/country-pricing.js +2 -0
- package/lib/types/country-pricing.js.map +1 -0
- package/lib/types/internal-events.d.ts +2 -1
- package/lib/types/internal-events.d.ts.map +1 -1
- package/lib/types/internal-events.js +1 -0
- package/lib/types/internal-events.js.map +1 -1
- package/lib/types/leasing-debtors.d.ts +1 -0
- package/lib/types/leasing-debtors.d.ts.map +1 -1
- package/lib/types/leasing-debtors.js.map +1 -1
- package/lib/types/prospects.d.ts +135 -0
- package/lib/types/prospects.d.ts.map +1 -0
- package/lib/types/prospects.js +40 -0
- package/lib/types/prospects.js.map +1 -0
- package/package.json +1 -1
- package/src/apis/country-pricing.ts +23 -0
- package/src/types/country-pricing.ts +8 -0
- package/src/types/internal-events.ts +1 -0
- package/src/types/leasing-debtors.ts +1 -0
- package/src/types/prospects.ts +181 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"country-pricing.d.ts","sourceRoot":"/","sources":["apis/country-pricing.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEjE,eAAO,MAAM,uBAAuB,GAAU,UAAU,MAAM,KAAG,OAAO,CAAC,kBAAkB,EAAE,CAgB5F,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TENANT_ID_ADMIN_HEADER } from '@bisondesk/commons-sdk/constants';
|
|
2
|
+
import { XError } from '@bisondesk/commons-sdk/errors';
|
|
3
|
+
import { getAdminAuth } from '@bisondesk/commons-sdk/fetch';
|
|
4
|
+
import fetch from 'node-fetch';
|
|
5
|
+
export const listCountryPricingRules = async (tenantId) => {
|
|
6
|
+
const auth = await getAdminAuth();
|
|
7
|
+
const url = `${process.env.CORE_API_ORIGIN}/api/settings/country-pricing`;
|
|
8
|
+
const response = await fetch(url, {
|
|
9
|
+
headers: {
|
|
10
|
+
Authorization: auth,
|
|
11
|
+
[TENANT_ID_ADMIN_HEADER]: tenantId,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
if (response.ok) {
|
|
15
|
+
return response.json();
|
|
16
|
+
}
|
|
17
|
+
const body = await response.text();
|
|
18
|
+
throw new XError(response.statusText, { url, body });
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=country-pricing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"country-pricing.js","sourceRoot":"/","sources":["apis/country-pricing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,KAAmB,MAAM,YAAY,CAAC;AAG7C,MAAM,CAAC,MAAM,uBAAuB,GAAG,KAAK,EAAE,QAAgB,EAAiC,EAAE;IAC/F,MAAM,IAAI,GAAG,MAAM,YAAY,EAAE,CAAC;IAClC,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,+BAA+B,CAAC;IAC1E,MAAM,QAAQ,GAAa,MAAM,KAAK,CAAC,GAAG,EAAE;QAC1C,OAAO,EAAE;YACP,aAAa,EAAE,IAAI;YACnB,CAAC,sBAAsB,CAAC,EAAE,QAAQ;SACnC;KACF,CAAC,CAAC;IAEH,IAAI,QAAQ,CAAC,EAAE,EAAE,CAAC;QAChB,OAAO,QAAQ,CAAC,IAAI,EAAS,CAAC;IAChC,CAAC;IAED,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;IACnC,MAAM,IAAI,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;AACvD,CAAC,CAAC","sourcesContent":["import { TENANT_ID_ADMIN_HEADER } from '@bisondesk/commons-sdk/constants';\nimport { XError } from '@bisondesk/commons-sdk/errors';\nimport { getAdminAuth } from '@bisondesk/commons-sdk/fetch';\nimport fetch, { Response } from 'node-fetch';\nimport { CountryPricingRule } from '../types/country-pricing.js';\n\nexport const listCountryPricingRules = async (tenantId: string): Promise<CountryPricingRule[]> => {\n const auth = await getAdminAuth();\n const url = `${process.env.CORE_API_ORIGIN}/api/settings/country-pricing`;\n const response: Response = await fetch(url, {\n headers: {\n Authorization: auth,\n [TENANT_ID_ADMIN_HEADER]: tenantId,\n },\n });\n\n if (response.ok) {\n return response.json() as any;\n }\n\n const body = await response.text();\n throw new XError(response.statusText, { url, body });\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"country-pricing.d.ts","sourceRoot":"/","sources":["types/country-pricing.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"country-pricing.js","sourceRoot":"/","sources":["types/country-pricing.ts"],"names":[],"mappings":"","sourcesContent":["export type CountryPricingRule = {\n countryCode: string; // lower-cased ISO 3166-1 alpha-2 (e.g., \"cl\")\n currency: string; // ISO 4217 (e.g., \"USD\")\n rate: number; // Fixed EUR→currency rate (e.g., 1.08)\n deliveryCost?: number; // Optional flat cost in target currency, added after conversion\n deliveryLocation?: string; // Human-readable, e.g., \"Iquique (Chile)\". Required when deliveryCost is set.\n leasing?: boolean; // Override for leasing visibility\n};\n"]}
|
|
@@ -13,7 +13,8 @@ export declare enum EventTypes {
|
|
|
13
13
|
EXTERNAL_VEHICLE_SALE = "external-vehicle-sales",
|
|
14
14
|
AMORTIZATION_DOC = "amortization-docs",
|
|
15
15
|
DEBTOR_DOSSIER = "debtor-dossiers",
|
|
16
|
-
VEHICLE_BUSINESS_OVERVIEW = "vehicle-business-overview"
|
|
16
|
+
VEHICLE_BUSINESS_OVERVIEW = "vehicle-business-overview",
|
|
17
|
+
PROSPECT = "prospects"
|
|
17
18
|
}
|
|
18
19
|
export declare enum InternalNotificationChannels {
|
|
19
20
|
APP = "app",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-events.d.ts","sourceRoot":"/","sources":["types/internal-events.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IACpB,gBAAgB,sBAAsB;IACtC,YAAY,kBAAkB;IAC9B,OAAO,aAAa;IACpB,gBAAgB,sBAAsB;IACtC,WAAW,kBAAkB;IAC7B,OAAO,aAAa;IACpB,YAAY,kBAAkB;IAC9B,gBAAgB,8BAA8B;IAC9C,KAAK,WAAW;IAChB,YAAY,kBAAkB;IAC9B,QAAQ,eAAe;IACvB,qBAAqB,2BAA2B;IAChD,gBAAgB,sBAAsB;IACtC,cAAc,oBAAoB;IAClC,yBAAyB,8BAA8B;
|
|
1
|
+
{"version":3,"file":"internal-events.d.ts","sourceRoot":"/","sources":["types/internal-events.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IACpB,gBAAgB,sBAAsB;IACtC,YAAY,kBAAkB;IAC9B,OAAO,aAAa;IACpB,gBAAgB,sBAAsB;IACtC,WAAW,kBAAkB;IAC7B,OAAO,aAAa;IACpB,YAAY,kBAAkB;IAC9B,gBAAgB,8BAA8B;IAC9C,KAAK,WAAW;IAChB,YAAY,kBAAkB;IAC9B,QAAQ,eAAe;IACvB,qBAAqB,2BAA2B;IAChD,gBAAgB,sBAAsB;IACtC,cAAc,oBAAoB;IAClC,yBAAyB,8BAA8B;IACvD,QAAQ,cAAc;CACvB;AAED,oBAAY,4BAA4B;IACtC,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,QAAQ,aAAa;CACtB;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,SAAS,EAAE,UAAU,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,4BAA4B,EAAE,CAAC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC"}
|
|
@@ -15,6 +15,7 @@ export var EventTypes;
|
|
|
15
15
|
EventTypes["AMORTIZATION_DOC"] = "amortization-docs";
|
|
16
16
|
EventTypes["DEBTOR_DOSSIER"] = "debtor-dossiers";
|
|
17
17
|
EventTypes["VEHICLE_BUSINESS_OVERVIEW"] = "vehicle-business-overview";
|
|
18
|
+
EventTypes["PROSPECT"] = "prospects";
|
|
18
19
|
})(EventTypes || (EventTypes = {}));
|
|
19
20
|
export var InternalNotificationChannels;
|
|
20
21
|
(function (InternalNotificationChannels) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-events.js","sourceRoot":"/","sources":["types/internal-events.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"internal-events.js","sourceRoot":"/","sources":["types/internal-events.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,UAiBX;AAjBD,WAAY,UAAU;IACpB,oDAAsC,CAAA;IACtC,4CAA8B,CAAA;IAC9B,kCAAoB,CAAA;IACpB,oDAAsC,CAAA;IACtC,2CAA6B,CAAA;IAC7B,kCAAoB,CAAA;IACpB,4CAA8B,CAAA;IAC9B,4DAA8C,CAAA;IAC9C,8BAAgB,CAAA;IAChB,4CAA8B,CAAA;IAC9B,qCAAuB,CAAA;IACvB,8DAAgD,CAAA;IAChD,oDAAsC,CAAA;IACtC,gDAAkC,CAAA;IAClC,qEAAuD,CAAA;IACvD,oCAAsB,CAAA;AACxB,CAAC,EAjBW,UAAU,KAAV,UAAU,QAiBrB;AAED,MAAM,CAAN,IAAY,4BAIX;AAJD,WAAY,4BAA4B;IACtC,2CAAW,CAAA;IACX,+CAAe,CAAA;IACf,qDAAqB,CAAA;AACvB,CAAC,EAJW,4BAA4B,KAA5B,4BAA4B,QAIvC","sourcesContent":["export enum EventTypes {\n VEHICLE_PURCHASE = 'vehicle-purchases',\n ORGANIZATION = 'organizations',\n CONTACT = 'contacts',\n FINANCE_DOCUMENT = 'finance-documents',\n OPPORTUNITY = 'opportunities',\n VEHICLE = 'vehicles',\n SALE_PAYMENT = 'sale-payments',\n PURCHASE_PAYMENT = 'vehicle-purchase-payments',\n OFFER = 'offers',\n PRICE_CHANGE = 'price-changes',\n ACTIVITY = 'activities',\n EXTERNAL_VEHICLE_SALE = 'external-vehicle-sales',\n AMORTIZATION_DOC = 'amortization-docs',\n DEBTOR_DOSSIER = 'debtor-dossiers',\n VEHICLE_BUSINESS_OVERVIEW = 'vehicle-business-overview',\n PROSPECT = 'prospects',\n}\n\nexport enum InternalNotificationChannels {\n APP = 'app',\n EMAIL = 'email',\n WHATSAPP = 'whatsapp',\n}\n\nexport type BaseEvent = {\n eventType: EventTypes;\n};\n\nexport type InternalNotificationDestination = {\n userId?: string;\n channels: InternalNotificationChannels[];\n email?: string;\n phone?: string; // mobile phone for WhatsApp channel (e164 format)\n};\n\nexport type InternalNotificationEmailBaseData = {\n mainPicture?: string;\n body: string;\n url: string;\n emailHeader: string;\n};\n"]}
|
|
@@ -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,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;CAC/B,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,SAAS,EAAE,CAAC;IAGpB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,uBAAuB,EAAE,MAAM,CAAC;IAChC,sBAAsB,EAAE,MAAM,CAAC;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,qBAAqB,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,gBAAgB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BAAoB,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE;CACzE,CAAC;AA+BF,MAAM,CAAN,IAAY,qBAQX;AARD,WAAY,qBAAqB;IAC/B,sDAA6B,CAAA;IAC7B,sDAA6B,CAAA;IAC7B,0CAAiB,CAAA;IACjB,wDAA+B,CAAA;IAC/B,8DAAqC,CAAA;IACrC,gEAAuC,CAAA;IACvC,0CAAiB,CAAA;AACnB,CAAC,EARW,qBAAqB,KAArB,qBAAqB,QAQhC;AAyHD,MAAM,CAAN,IAAY,kBAYX;AAZD,WAAY,kBAAkB;IAC5B,+CAAyB,CAAA;IACzB,2DAAqC,CAAA;IACrC,uDAAiC,CAAA;IACjC,qCAAe,CAAA;IACf,2CAAqB,CAAA;IACrB,2CAAqB,CAAA;IACrB,iDAA2B,CAAA;IAC3B,+CAAyB,CAAA;IACzB,2DAAqC,CAAA;IACrC,mEAA6C,CAAA;IAC7C,yCAAmB,CAAA;AACrB,CAAC,EAZW,kBAAkB,KAAlB,kBAAkB,QAY7B;AA2GD,MAAM,CAAC,MAAM,yBAAyB,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 { 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};\n\nexport type DebtorInfo = {\n clientId: 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 DebtorAutoFollowUp = {\n id: string;\n organizationId: string;\n organizationName: string;\n status: 'ONGOING' | 'ERROR' | 'SUCCESS' | 'EXPIRED' | 'DISCARDED';\n discardReason?: string;\n emails: EmailMessage[];\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 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<Pick<LegalDossier, 'caseNumber' | 'status' | 'notes'>>;\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 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};\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":"AAkDA,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,MA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C;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 { 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};\n\nexport type DebtorInfo = {\n clientId: 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 DebtorAutoFollowUp = {\n id: string;\n organizationId: string;\n organizationName: string;\n status: 'ONGOING' | 'ERROR' | 'SUCCESS' | 'EXPIRED' | 'DISCARDED';\n discardReason?: string;\n emails: EmailMessage[];\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 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<Pick<LegalDossier, 'caseNumber' | 'status' | 'notes'>>;\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 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};\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"]}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { MultiLangValue } from '@bisondesk/commons-sdk/types';
|
|
2
|
+
import { BaseEvent } from './internal-events.js';
|
|
3
|
+
import { BaseSearchRequest } from './search.js';
|
|
4
|
+
import { Contact, Organization } from './crm.js';
|
|
5
|
+
import { DataRecord, ReferenceData } from './utils.js';
|
|
6
|
+
import { NextList } from '@bisondesk/commons-sdk/types';
|
|
7
|
+
import { Task } from '@bisondesk/commons-sdk/tasks';
|
|
8
|
+
export declare enum ProspectActions {
|
|
9
|
+
CLOSE = "close",
|
|
10
|
+
REOPEN = "reopen",
|
|
11
|
+
ENGAGE = "engage",
|
|
12
|
+
SET_METADATA = "set_metadata",
|
|
13
|
+
SET_OBJECTIVES = "set_objectives",
|
|
14
|
+
SET_CUSTOMER = "set_customer",
|
|
15
|
+
ADD_ACTIVITY = "add_activity",
|
|
16
|
+
DELETE = "delete"
|
|
17
|
+
}
|
|
18
|
+
export declare enum ProspectStatus {
|
|
19
|
+
NURTURE = "nurture",
|
|
20
|
+
ATTEMPTING = "attempting",
|
|
21
|
+
ENGAGED = "engaged",
|
|
22
|
+
CLOSED = "closed"
|
|
23
|
+
}
|
|
24
|
+
export declare const ProspectStatusOrder: ProspectStatus[];
|
|
25
|
+
export declare const ProspectKanbanColumns: ProspectStatus[];
|
|
26
|
+
export declare const ProspectKanbanEndColumns: string[];
|
|
27
|
+
export declare enum ProspectClosedReason {
|
|
28
|
+
CONVERTED = "converted",
|
|
29
|
+
DEFERRED = "deferred",
|
|
30
|
+
NO_REPLY = "no_reply",
|
|
31
|
+
NOT_INTERESTED = "not_interested",
|
|
32
|
+
AUTOMATIC = "automatic"
|
|
33
|
+
}
|
|
34
|
+
export declare enum ProspectPriority {
|
|
35
|
+
LOW = "low",
|
|
36
|
+
NORMAL = "normal",
|
|
37
|
+
HIGH = "high"
|
|
38
|
+
}
|
|
39
|
+
export type ProspectObjective = {
|
|
40
|
+
id: string;
|
|
41
|
+
title: MultiLangValue;
|
|
42
|
+
};
|
|
43
|
+
type BaseProspect = {
|
|
44
|
+
contactId?: string;
|
|
45
|
+
organizationId?: string;
|
|
46
|
+
branchId: string;
|
|
47
|
+
accountManager?: string;
|
|
48
|
+
priority: ProspectPriority;
|
|
49
|
+
score?: number;
|
|
50
|
+
objectives: ProspectObjective[];
|
|
51
|
+
};
|
|
52
|
+
export type NewProspect = BaseProspect & {
|
|
53
|
+
id?: undefined;
|
|
54
|
+
createdAt?: undefined;
|
|
55
|
+
createdBy?: undefined;
|
|
56
|
+
modifiedAt?: undefined;
|
|
57
|
+
modifiedBy?: undefined;
|
|
58
|
+
};
|
|
59
|
+
export type Prospect = BaseProspect & {
|
|
60
|
+
id: string;
|
|
61
|
+
status: ProspectStatus;
|
|
62
|
+
attemptingAt?: string;
|
|
63
|
+
attemptingBy?: string;
|
|
64
|
+
engagedAt?: string;
|
|
65
|
+
engagedBy?: string;
|
|
66
|
+
closedAt?: string;
|
|
67
|
+
closedBy?: string;
|
|
68
|
+
closedReason?: ProspectClosedReason;
|
|
69
|
+
createdAt: string;
|
|
70
|
+
createdBy: string;
|
|
71
|
+
modifiedAt: string;
|
|
72
|
+
modifiedBy: string;
|
|
73
|
+
};
|
|
74
|
+
export type ProspectUpdate = {
|
|
75
|
+
contactId?: string | null;
|
|
76
|
+
organizationId?: string | null;
|
|
77
|
+
branchId?: string;
|
|
78
|
+
accountManager?: string | null;
|
|
79
|
+
priority?: ProspectPriority;
|
|
80
|
+
score?: number | null;
|
|
81
|
+
objectives?: ProspectObjective[];
|
|
82
|
+
close?: boolean;
|
|
83
|
+
closedReason?: ProspectClosedReason;
|
|
84
|
+
reopen?: boolean;
|
|
85
|
+
engage?: boolean;
|
|
86
|
+
};
|
|
87
|
+
export type ProspectBff = {
|
|
88
|
+
prospect: DataRecord<Prospect>;
|
|
89
|
+
contact?: DataRecord<Contact>;
|
|
90
|
+
org?: DataRecord<Organization>;
|
|
91
|
+
tasks: DataRecord<Task>[];
|
|
92
|
+
};
|
|
93
|
+
export type SearchProspect = {
|
|
94
|
+
contact?: Contact;
|
|
95
|
+
prospect: Prospect;
|
|
96
|
+
org?: Organization;
|
|
97
|
+
custom: {
|
|
98
|
+
closed: boolean;
|
|
99
|
+
unassigned: boolean;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
export type ProspectsKanbanColumn = {
|
|
103
|
+
status: string;
|
|
104
|
+
results: SearchProspect[];
|
|
105
|
+
totalCount: number;
|
|
106
|
+
};
|
|
107
|
+
export type MSearchProspectsKanbanColumn = {
|
|
108
|
+
column: ProspectsKanbanColumn;
|
|
109
|
+
nextToken?: string;
|
|
110
|
+
};
|
|
111
|
+
export type KanbanProspectsSearchRequest = BaseSearchRequest & {
|
|
112
|
+
nextTokens?: Record<string, string | undefined>;
|
|
113
|
+
};
|
|
114
|
+
export type KanbanProspectsNextList = Omit<NextList<ProspectsKanbanColumn, ReferenceData>, 'nextToken'> & {
|
|
115
|
+
nextTokens?: Record<string, string | undefined>;
|
|
116
|
+
};
|
|
117
|
+
type BaseProspectEvent = BaseEvent & {
|
|
118
|
+
id: string;
|
|
119
|
+
actionAt: string;
|
|
120
|
+
tenantId: string;
|
|
121
|
+
userId: string;
|
|
122
|
+
};
|
|
123
|
+
export type ProspectCreatedEvent = BaseProspectEvent & {
|
|
124
|
+
action: 'create';
|
|
125
|
+
prospect: Prospect;
|
|
126
|
+
previousProspect?: undefined;
|
|
127
|
+
};
|
|
128
|
+
export type ProspectUpdatedEvent = BaseProspectEvent & {
|
|
129
|
+
action: 'update';
|
|
130
|
+
prospect: Prospect;
|
|
131
|
+
previousProspect: Prospect;
|
|
132
|
+
};
|
|
133
|
+
export type ProspectEvent = ProspectCreatedEvent | ProspectUpdatedEvent;
|
|
134
|
+
export {};
|
|
135
|
+
//# sourceMappingURL=prospects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prospects.d.ts","sourceRoot":"/","sources":["types/prospects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,UAAU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AAG;IACrD,MAAM,EAAE,QAAQ,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,gBAAgB,CAAC,EAAE,SAAS,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,GAAG;IACrD,MAAM,EAAE,QAAQ,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,gBAAgB,EAAE,QAAQ,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,oBAAoB,GAAG,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export var ProspectActions;
|
|
2
|
+
(function (ProspectActions) {
|
|
3
|
+
ProspectActions["CLOSE"] = "close";
|
|
4
|
+
ProspectActions["REOPEN"] = "reopen";
|
|
5
|
+
ProspectActions["ENGAGE"] = "engage";
|
|
6
|
+
ProspectActions["SET_METADATA"] = "set_metadata";
|
|
7
|
+
ProspectActions["SET_OBJECTIVES"] = "set_objectives";
|
|
8
|
+
ProspectActions["SET_CUSTOMER"] = "set_customer";
|
|
9
|
+
ProspectActions["ADD_ACTIVITY"] = "add_activity";
|
|
10
|
+
ProspectActions["DELETE"] = "delete";
|
|
11
|
+
})(ProspectActions || (ProspectActions = {}));
|
|
12
|
+
export var ProspectStatus;
|
|
13
|
+
(function (ProspectStatus) {
|
|
14
|
+
ProspectStatus["NURTURE"] = "nurture";
|
|
15
|
+
ProspectStatus["ATTEMPTING"] = "attempting";
|
|
16
|
+
ProspectStatus["ENGAGED"] = "engaged";
|
|
17
|
+
ProspectStatus["CLOSED"] = "closed";
|
|
18
|
+
})(ProspectStatus || (ProspectStatus = {}));
|
|
19
|
+
export const ProspectStatusOrder = [
|
|
20
|
+
ProspectStatus.NURTURE,
|
|
21
|
+
ProspectStatus.ATTEMPTING,
|
|
22
|
+
ProspectStatus.ENGAGED,
|
|
23
|
+
];
|
|
24
|
+
export const ProspectKanbanColumns = [...ProspectStatusOrder, ProspectStatus.CLOSED];
|
|
25
|
+
export const ProspectKanbanEndColumns = [ProspectStatus.CLOSED];
|
|
26
|
+
export var ProspectClosedReason;
|
|
27
|
+
(function (ProspectClosedReason) {
|
|
28
|
+
ProspectClosedReason["CONVERTED"] = "converted";
|
|
29
|
+
ProspectClosedReason["DEFERRED"] = "deferred";
|
|
30
|
+
ProspectClosedReason["NO_REPLY"] = "no_reply";
|
|
31
|
+
ProspectClosedReason["NOT_INTERESTED"] = "not_interested";
|
|
32
|
+
ProspectClosedReason["AUTOMATIC"] = "automatic";
|
|
33
|
+
})(ProspectClosedReason || (ProspectClosedReason = {}));
|
|
34
|
+
export var ProspectPriority;
|
|
35
|
+
(function (ProspectPriority) {
|
|
36
|
+
ProspectPriority["LOW"] = "low";
|
|
37
|
+
ProspectPriority["NORMAL"] = "normal";
|
|
38
|
+
ProspectPriority["HIGH"] = "high";
|
|
39
|
+
})(ProspectPriority || (ProspectPriority = {}));
|
|
40
|
+
//# sourceMappingURL=prospects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prospects.js","sourceRoot":"/","sources":["types/prospects.ts"],"names":[],"mappings":"AAQA,MAAM,CAAN,IAAY,eASX;AATD,WAAY,eAAe;IACzB,kCAAe,CAAA;IACf,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;IACjB,gDAA6B,CAAA;IAC7B,oDAAiC,CAAA;IACjC,gDAA6B,CAAA;IAC7B,gDAA6B,CAAA;IAC7B,oCAAiB,CAAA;AACnB,CAAC,EATW,eAAe,KAAf,eAAe,QAS1B;AAED,MAAM,CAAN,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,qCAAmB,CAAA;IACnB,2CAAyB,CAAA;IACzB,qCAAmB,CAAA;IACnB,mCAAiB,CAAA;AACnB,CAAC,EALW,cAAc,KAAd,cAAc,QAKzB;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAqB;IACnD,cAAc,CAAC,OAAO;IACtB,cAAc,CAAC,UAAU;IACzB,cAAc,CAAC,OAAO;CACvB,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,GAAG,mBAAmB,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;AAErF,MAAM,CAAC,MAAM,wBAAwB,GAAa,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;AAE1E,MAAM,CAAN,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC9B,+CAAuB,CAAA;IACvB,6CAAqB,CAAA;IACrB,6CAAqB,CAAA;IACrB,yDAAiC,CAAA;IACjC,+CAAuB,CAAA;AACzB,CAAC,EANW,oBAAoB,KAApB,oBAAoB,QAM/B;AAED,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,+BAAW,CAAA;IACX,qCAAiB,CAAA;IACjB,iCAAa,CAAA;AACf,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B","sourcesContent":["import { MultiLangValue } from '@bisondesk/commons-sdk/types';\nimport { BaseEvent } from './internal-events.js';\nimport { BaseSearchRequest } from './search.js';\nimport { Contact, Organization } from './crm.js';\nimport { DataRecord, ReferenceData } from './utils.js';\nimport { NextList } from '@bisondesk/commons-sdk/types';\nimport { Task } from '@bisondesk/commons-sdk/tasks';\n\nexport enum ProspectActions {\n CLOSE = 'close',\n REOPEN = 'reopen',\n ENGAGE = 'engage',\n SET_METADATA = 'set_metadata',\n SET_OBJECTIVES = 'set_objectives',\n SET_CUSTOMER = 'set_customer',\n ADD_ACTIVITY = 'add_activity',\n DELETE = 'delete',\n}\n\nexport enum ProspectStatus {\n NURTURE = 'nurture',\n ATTEMPTING = 'attempting',\n ENGAGED = 'engaged',\n CLOSED = 'closed',\n}\n\nexport const ProspectStatusOrder: ProspectStatus[] = [\n ProspectStatus.NURTURE,\n ProspectStatus.ATTEMPTING,\n ProspectStatus.ENGAGED,\n];\n\nexport const ProspectKanbanColumns = [...ProspectStatusOrder, ProspectStatus.CLOSED];\n\nexport const ProspectKanbanEndColumns: string[] = [ProspectStatus.CLOSED];\n\nexport enum ProspectClosedReason {\n CONVERTED = 'converted',\n DEFERRED = 'deferred',\n NO_REPLY = 'no_reply',\n NOT_INTERESTED = 'not_interested',\n AUTOMATIC = 'automatic',\n}\n\nexport enum ProspectPriority {\n LOW = 'low',\n NORMAL = 'normal',\n HIGH = 'high',\n}\n\nexport type ProspectObjective = {\n id: string;\n title: MultiLangValue;\n};\n\ntype BaseProspect = {\n contactId?: string;\n organizationId?: string;\n branchId: string;\n accountManager?: string;\n priority: ProspectPriority;\n score?: number;\n objectives: ProspectObjective[];\n};\n\nexport type NewProspect = BaseProspect & {\n id?: undefined;\n createdAt?: undefined;\n createdBy?: undefined;\n modifiedAt?: undefined;\n modifiedBy?: undefined;\n};\n\nexport type Prospect = BaseProspect & {\n id: string;\n\n status: ProspectStatus;\n\n attemptingAt?: string;\n attemptingBy?: string;\n engagedAt?: string;\n engagedBy?: string;\n closedAt?: string;\n closedBy?: string;\n closedReason?: ProspectClosedReason;\n\n createdAt: string;\n createdBy: string;\n modifiedAt: string;\n modifiedBy: string;\n};\n\nexport type ProspectUpdate = {\n contactId?: string | null;\n organizationId?: string | null;\n branchId?: string;\n accountManager?: string | null;\n priority?: ProspectPriority;\n score?: number | null;\n objectives?: ProspectObjective[];\n\n close?: boolean;\n closedReason?: ProspectClosedReason;\n reopen?: boolean;\n engage?: boolean;\n};\n\nexport type ProspectBff = {\n prospect: DataRecord<Prospect>;\n contact?: DataRecord<Contact>;\n org?: DataRecord<Organization>;\n tasks: DataRecord<Task>[];\n};\n\n/************\n *\n * Search\n */\n\nexport type SearchProspect = {\n contact?: Contact;\n prospect: Prospect;\n org?: Organization;\n custom: {\n closed: boolean;\n unassigned: boolean;\n };\n};\n\n/************\n *\n * Kanban\n */\n\nexport type ProspectsKanbanColumn = {\n status: string;\n results: SearchProspect[];\n totalCount: number;\n};\n\nexport type MSearchProspectsKanbanColumn = {\n column: ProspectsKanbanColumn;\n nextToken?: string;\n};\n\nexport type KanbanProspectsSearchRequest = BaseSearchRequest & {\n nextTokens?: Record<string, string | undefined>;\n};\n\nexport type KanbanProspectsNextList = Omit<\n NextList<ProspectsKanbanColumn, ReferenceData>,\n 'nextToken'\n> & {\n nextTokens?: Record<string, string | undefined>;\n};\n\n/************\n *\n * Events\n */\n\ntype BaseProspectEvent = BaseEvent & {\n id: string;\n actionAt: string;\n tenantId: string;\n userId: string;\n};\n\nexport type ProspectCreatedEvent = BaseProspectEvent & {\n action: 'create';\n prospect: Prospect;\n previousProspect?: undefined;\n};\n\nexport type ProspectUpdatedEvent = BaseProspectEvent & {\n action: 'update';\n prospect: Prospect;\n previousProspect: Prospect;\n};\n\nexport type ProspectEvent = ProspectCreatedEvent | ProspectUpdatedEvent;\n"]}
|
package/package.json
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { TENANT_ID_ADMIN_HEADER } from '@bisondesk/commons-sdk/constants';
|
|
2
|
+
import { XError } from '@bisondesk/commons-sdk/errors';
|
|
3
|
+
import { getAdminAuth } from '@bisondesk/commons-sdk/fetch';
|
|
4
|
+
import fetch, { Response } from 'node-fetch';
|
|
5
|
+
import { CountryPricingRule } from '../types/country-pricing.js';
|
|
6
|
+
|
|
7
|
+
export const listCountryPricingRules = async (tenantId: string): Promise<CountryPricingRule[]> => {
|
|
8
|
+
const auth = await getAdminAuth();
|
|
9
|
+
const url = `${process.env.CORE_API_ORIGIN}/api/settings/country-pricing`;
|
|
10
|
+
const response: Response = await fetch(url, {
|
|
11
|
+
headers: {
|
|
12
|
+
Authorization: auth,
|
|
13
|
+
[TENANT_ID_ADMIN_HEADER]: tenantId,
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
if (response.ok) {
|
|
18
|
+
return response.json() as any;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const body = await response.text();
|
|
22
|
+
throw new XError(response.statusText, { url, body });
|
|
23
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type CountryPricingRule = {
|
|
2
|
+
countryCode: string; // lower-cased ISO 3166-1 alpha-2 (e.g., "cl")
|
|
3
|
+
currency: string; // ISO 4217 (e.g., "USD")
|
|
4
|
+
rate: number; // Fixed EUR→currency rate (e.g., 1.08)
|
|
5
|
+
deliveryCost?: number; // Optional flat cost in target currency, added after conversion
|
|
6
|
+
deliveryLocation?: string; // Human-readable, e.g., "Iquique (Chile)". Required when deliveryCost is set.
|
|
7
|
+
leasing?: boolean; // Override for leasing visibility
|
|
8
|
+
};
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { MultiLangValue } from '@bisondesk/commons-sdk/types';
|
|
2
|
+
import { BaseEvent } from './internal-events.js';
|
|
3
|
+
import { BaseSearchRequest } from './search.js';
|
|
4
|
+
import { Contact, Organization } from './crm.js';
|
|
5
|
+
import { DataRecord, ReferenceData } from './utils.js';
|
|
6
|
+
import { NextList } from '@bisondesk/commons-sdk/types';
|
|
7
|
+
import { Task } from '@bisondesk/commons-sdk/tasks';
|
|
8
|
+
|
|
9
|
+
export enum ProspectActions {
|
|
10
|
+
CLOSE = 'close',
|
|
11
|
+
REOPEN = 'reopen',
|
|
12
|
+
ENGAGE = 'engage',
|
|
13
|
+
SET_METADATA = 'set_metadata',
|
|
14
|
+
SET_OBJECTIVES = 'set_objectives',
|
|
15
|
+
SET_CUSTOMER = 'set_customer',
|
|
16
|
+
ADD_ACTIVITY = 'add_activity',
|
|
17
|
+
DELETE = 'delete',
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export enum ProspectStatus {
|
|
21
|
+
NURTURE = 'nurture',
|
|
22
|
+
ATTEMPTING = 'attempting',
|
|
23
|
+
ENGAGED = 'engaged',
|
|
24
|
+
CLOSED = 'closed',
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const ProspectStatusOrder: ProspectStatus[] = [
|
|
28
|
+
ProspectStatus.NURTURE,
|
|
29
|
+
ProspectStatus.ATTEMPTING,
|
|
30
|
+
ProspectStatus.ENGAGED,
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
export const ProspectKanbanColumns = [...ProspectStatusOrder, ProspectStatus.CLOSED];
|
|
34
|
+
|
|
35
|
+
export const ProspectKanbanEndColumns: string[] = [ProspectStatus.CLOSED];
|
|
36
|
+
|
|
37
|
+
export enum ProspectClosedReason {
|
|
38
|
+
CONVERTED = 'converted',
|
|
39
|
+
DEFERRED = 'deferred',
|
|
40
|
+
NO_REPLY = 'no_reply',
|
|
41
|
+
NOT_INTERESTED = 'not_interested',
|
|
42
|
+
AUTOMATIC = 'automatic',
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export enum ProspectPriority {
|
|
46
|
+
LOW = 'low',
|
|
47
|
+
NORMAL = 'normal',
|
|
48
|
+
HIGH = 'high',
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export type ProspectObjective = {
|
|
52
|
+
id: string;
|
|
53
|
+
title: MultiLangValue;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
type BaseProspect = {
|
|
57
|
+
contactId?: string;
|
|
58
|
+
organizationId?: string;
|
|
59
|
+
branchId: string;
|
|
60
|
+
accountManager?: string;
|
|
61
|
+
priority: ProspectPriority;
|
|
62
|
+
score?: number;
|
|
63
|
+
objectives: ProspectObjective[];
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export type NewProspect = BaseProspect & {
|
|
67
|
+
id?: undefined;
|
|
68
|
+
createdAt?: undefined;
|
|
69
|
+
createdBy?: undefined;
|
|
70
|
+
modifiedAt?: undefined;
|
|
71
|
+
modifiedBy?: undefined;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export type Prospect = BaseProspect & {
|
|
75
|
+
id: string;
|
|
76
|
+
|
|
77
|
+
status: ProspectStatus;
|
|
78
|
+
|
|
79
|
+
attemptingAt?: string;
|
|
80
|
+
attemptingBy?: string;
|
|
81
|
+
engagedAt?: string;
|
|
82
|
+
engagedBy?: string;
|
|
83
|
+
closedAt?: string;
|
|
84
|
+
closedBy?: string;
|
|
85
|
+
closedReason?: ProspectClosedReason;
|
|
86
|
+
|
|
87
|
+
createdAt: string;
|
|
88
|
+
createdBy: string;
|
|
89
|
+
modifiedAt: string;
|
|
90
|
+
modifiedBy: string;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export type ProspectUpdate = {
|
|
94
|
+
contactId?: string | null;
|
|
95
|
+
organizationId?: string | null;
|
|
96
|
+
branchId?: string;
|
|
97
|
+
accountManager?: string | null;
|
|
98
|
+
priority?: ProspectPriority;
|
|
99
|
+
score?: number | null;
|
|
100
|
+
objectives?: ProspectObjective[];
|
|
101
|
+
|
|
102
|
+
close?: boolean;
|
|
103
|
+
closedReason?: ProspectClosedReason;
|
|
104
|
+
reopen?: boolean;
|
|
105
|
+
engage?: boolean;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export type ProspectBff = {
|
|
109
|
+
prospect: DataRecord<Prospect>;
|
|
110
|
+
contact?: DataRecord<Contact>;
|
|
111
|
+
org?: DataRecord<Organization>;
|
|
112
|
+
tasks: DataRecord<Task>[];
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
/************
|
|
116
|
+
*
|
|
117
|
+
* Search
|
|
118
|
+
*/
|
|
119
|
+
|
|
120
|
+
export type SearchProspect = {
|
|
121
|
+
contact?: Contact;
|
|
122
|
+
prospect: Prospect;
|
|
123
|
+
org?: Organization;
|
|
124
|
+
custom: {
|
|
125
|
+
closed: boolean;
|
|
126
|
+
unassigned: boolean;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
/************
|
|
131
|
+
*
|
|
132
|
+
* Kanban
|
|
133
|
+
*/
|
|
134
|
+
|
|
135
|
+
export type ProspectsKanbanColumn = {
|
|
136
|
+
status: string;
|
|
137
|
+
results: SearchProspect[];
|
|
138
|
+
totalCount: number;
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
export type MSearchProspectsKanbanColumn = {
|
|
142
|
+
column: ProspectsKanbanColumn;
|
|
143
|
+
nextToken?: string;
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
export type KanbanProspectsSearchRequest = BaseSearchRequest & {
|
|
147
|
+
nextTokens?: Record<string, string | undefined>;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
export type KanbanProspectsNextList = Omit<
|
|
151
|
+
NextList<ProspectsKanbanColumn, ReferenceData>,
|
|
152
|
+
'nextToken'
|
|
153
|
+
> & {
|
|
154
|
+
nextTokens?: Record<string, string | undefined>;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
/************
|
|
158
|
+
*
|
|
159
|
+
* Events
|
|
160
|
+
*/
|
|
161
|
+
|
|
162
|
+
type BaseProspectEvent = BaseEvent & {
|
|
163
|
+
id: string;
|
|
164
|
+
actionAt: string;
|
|
165
|
+
tenantId: string;
|
|
166
|
+
userId: string;
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
export type ProspectCreatedEvent = BaseProspectEvent & {
|
|
170
|
+
action: 'create';
|
|
171
|
+
prospect: Prospect;
|
|
172
|
+
previousProspect?: undefined;
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
export type ProspectUpdatedEvent = BaseProspectEvent & {
|
|
176
|
+
action: 'update';
|
|
177
|
+
prospect: Prospect;
|
|
178
|
+
previousProspect: Prospect;
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
export type ProspectEvent = ProspectCreatedEvent | ProspectUpdatedEvent;
|