@bisondesk/core-sdk 1.0.610 → 1.0.612
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/constants.d.ts +2 -0
- package/lib/constants.d.ts.map +1 -1
- package/lib/constants.js +2 -0
- package/lib/constants.js.map +1 -1
- package/lib/types/activities.d.ts +3 -2
- package/lib/types/activities.d.ts.map +1 -1
- package/lib/types/activities.js.map +1 -1
- package/lib/types/crm.d.ts +7 -1
- package/lib/types/crm.d.ts.map +1 -1
- package/lib/types/crm.js.map +1 -1
- package/lib/types/interests.d.ts +9 -14
- package/lib/types/interests.d.ts.map +1 -1
- package/lib/types/interests.js +2 -3
- package/lib/types/interests.js.map +1 -1
- package/lib/types/opportunities.d.ts +5 -3
- package/lib/types/opportunities.d.ts.map +1 -1
- package/lib/types/opportunities.js +1 -0
- package/lib/types/opportunities.js.map +1 -1
- package/lib/types/prospects.d.ts +126 -5
- package/lib/types/prospects.d.ts.map +1 -1
- package/lib/types/prospects.js +28 -0
- package/lib/types/prospects.js.map +1 -1
- package/lib/types/reports-leasing.d.ts +5 -0
- package/lib/types/reports-leasing.d.ts.map +1 -1
- package/lib/types/reports-leasing.js.map +1 -1
- package/lib/types/reports-sales.d.ts +8 -0
- package/lib/types/reports-sales.d.ts.map +1 -1
- package/lib/types/reports-sales.js +1 -0
- package/lib/types/reports-sales.js.map +1 -1
- package/lib/types/tenants.d.ts +1 -0
- package/lib/types/tenants.d.ts.map +1 -1
- package/lib/types/tenants.js.map +1 -1
- package/lib/types/users.d.ts +19 -20
- package/lib/types/users.d.ts.map +1 -1
- package/lib/types/users.js.map +1 -1
- package/lib/types/vehicle-timeline.d.ts +96 -0
- package/lib/types/vehicle-timeline.d.ts.map +1 -0
- package/lib/types/vehicle-timeline.js +20 -0
- package/lib/types/vehicle-timeline.js.map +1 -0
- package/lib/types/vehicles.d.ts +4 -0
- package/lib/types/vehicles.d.ts.map +1 -1
- package/lib/types/vehicles.js.map +1 -1
- package/package.json +1 -1
- package/src/constants.ts +2 -0
- package/src/types/activities.js +13 -0
- package/src/types/activities.js.map +1 -0
- package/src/types/activities.ts +3 -3
- package/src/types/comparables.js +2 -0
- package/src/types/comparables.js.map +1 -0
- package/src/types/crm.js +58 -0
- package/src/types/crm.js.map +1 -0
- package/src/types/crm.ts +20 -1
- package/src/types/dashboard.js +2 -0
- package/src/types/dashboard.js.map +1 -0
- package/src/types/definitions.js +2 -0
- package/src/types/definitions.js.map +1 -0
- package/src/types/fields.js +2 -0
- package/src/types/fields.js.map +1 -0
- package/src/types/insights.js +2 -0
- package/src/types/insights.js.map +1 -0
- package/src/types/interests.js +6 -0
- package/src/types/interests.js.map +1 -0
- package/src/types/interests.ts +25 -20
- package/src/types/internal-events.js +18 -0
- package/src/types/internal-events.js.map +1 -0
- package/src/types/internet-opportunities.js +2 -0
- package/src/types/internet-opportunities.js.map +1 -0
- package/src/types/internet-vehicles.js +2 -0
- package/src/types/internet-vehicles.js.map +1 -0
- package/src/types/leasing-administration.js +2 -0
- package/src/types/leasing-administration.js.map +1 -0
- package/src/types/leasing-debtors.js +2 -0
- package/src/types/leasing-debtors.js.map +1 -0
- package/src/types/leasing-search.js +2 -0
- package/src/types/leasing-search.js.map +1 -0
- package/src/types/leasing-settings.js +7 -0
- package/src/types/leasing-settings.js.map +1 -0
- package/src/types/leasing.js +38 -0
- package/src/types/leasing.js.map +1 -0
- package/src/types/marketing.js +35 -0
- package/src/types/marketing.js.map +1 -0
- package/src/types/offers.js +56 -0
- package/src/types/opportunities.js +107 -0
- package/src/types/opportunities.js.map +1 -0
- package/src/types/opportunities.ts +6 -2
- package/src/types/payments.js +7 -0
- package/src/types/picklists.js +2 -0
- package/src/types/picklists.js.map +1 -0
- package/src/types/prospects.ts +281 -4
- package/src/types/quotes.js +42 -0
- package/src/types/recently-viewed.js +2 -0
- package/src/types/recently-viewed.js.map +1 -0
- package/src/types/reports-leasing.ts +9 -0
- package/src/types/reports-sales.ts +32 -0
- package/src/types/reservations.js +5 -0
- package/src/types/reservations.js.map +1 -0
- package/src/types/roi-ratings.js +5 -0
- package/src/types/roi-ratings.js.map +1 -0
- package/src/types/saved-filters.js +9 -0
- package/src/types/saved-filters.js.map +1 -0
- package/src/types/search.js +2 -0
- package/src/types/search.js.map +1 -0
- package/src/types/settings.js +2 -0
- package/src/types/settings.js.map +1 -0
- package/src/types/templates.js +2 -0
- package/src/types/templates.js.map +1 -0
- package/src/types/tenants.js +21 -0
- package/src/types/tenants.js.map +1 -0
- package/src/types/tenants.ts +2 -0
- package/src/types/user-performance.js +7 -0
- package/src/types/user-performance.js.map +1 -0
- package/src/types/users.ts +20 -21
- package/src/types/utils.js +2 -0
- package/src/types/validation.js +2 -0
- package/src/types/validation.js.map +1 -0
- package/src/types/vehicle-sales.js +6 -0
- package/src/types/vehicle-sales.js.map +1 -0
- package/src/types/vehicle-timeline.ts +143 -0
- package/src/types/vehicles.js +98 -0
- package/src/types/vehicles.js.map +1 -0
- package/src/types/vehicles.ts +7 -0
- package/src/utils/leasing.js +6 -0
- package/src/utils/leasing.js.map +1 -0
- package/src/utils/opportunities.js +48 -0
- package/src/utils/opportunities.js.map +1 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -108,6 +108,26 @@ export type SalesReportHistogramBucket = {
|
|
|
108
108
|
count: number;
|
|
109
109
|
};
|
|
110
110
|
|
|
111
|
+
/**
|
|
112
|
+
* Age-of-stock bands, in days of capital tied up. Cut points at 30 / 90 / 180 days,
|
|
113
|
+
* upper bound inclusive; the last band is open-ended, so `180+` means "181 and over".
|
|
114
|
+
*/
|
|
115
|
+
export const STOCK_AGE_BANDS = ['0-30', '31-90', '91-180', '180+'] as const;
|
|
116
|
+
|
|
117
|
+
export type StockAgeBand = (typeof STOCK_AGE_BANDS)[number];
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* One day on the stock-age chart, measured by capital tied up in inventory. A vehicle
|
|
121
|
+
* counts on `date` when the supplier was fully paid on or before that day and it had not
|
|
122
|
+
* been sold yet; its age is `date − supplierFullyPaidAt` in days. Used vehicles only.
|
|
123
|
+
*/
|
|
124
|
+
export type StockAgePoint = {
|
|
125
|
+
/** Snapshot day, `YYYY-MM-DD` (UTC). */
|
|
126
|
+
date: string;
|
|
127
|
+
/** In-stock vehicle count per age band on that day. */
|
|
128
|
+
counts: Record<StockAgeBand, number>;
|
|
129
|
+
};
|
|
130
|
+
|
|
111
131
|
export type SalesReportResponse = {
|
|
112
132
|
period: {
|
|
113
133
|
key: SalesPeriodKey;
|
|
@@ -142,4 +162,16 @@ export type SalesReportResponse = {
|
|
|
142
162
|
conglomerate: SalesReportConglomerate;
|
|
143
163
|
/** Fixed last-18-calendar-months histogram of opps into Preparation (period-independent). */
|
|
144
164
|
histogram: SalesReportHistogramBucket[];
|
|
165
|
+
/**
|
|
166
|
+
* Stock-age evolution measured as capital tied up in inventory: one daily snapshot of
|
|
167
|
+
* vehicles by days from supplier-fully-paid to sold (used vehicles). Fixed to the last
|
|
168
|
+
* 6 months, period-independent.
|
|
169
|
+
*/
|
|
170
|
+
stockAge: StockAgePoint[];
|
|
171
|
+
/**
|
|
172
|
+
* Customer concentration: the 10 largest customers' share of units in the window, as a
|
|
173
|
+
* fraction (0–1); null when there are no sales. A risk signal — over-reliance on a few
|
|
174
|
+
* buyers.
|
|
175
|
+
*/
|
|
176
|
+
concentration: number | null;
|
|
145
177
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reservations.js","sourceRoot":"","sources":["reservations.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,kBAEX;AAFD,WAAY,kBAAkB;IAC5B,kEAA4C,CAAA;AAC9C,CAAC,EAFW,kBAAkB,KAAlB,kBAAkB,QAE7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roi-ratings.js","sourceRoot":"","sources":["roi-ratings.ts"],"names":[],"mappings":"AAIA,MAAM,CAAN,IAAY,WAEX;AAFD,WAAY,WAAW;IACrB,2CAA4B,CAAA;AAC9B,CAAC,EAFW,WAAW,KAAX,WAAW,QAEtB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export var SavedFiltersActions;
|
|
2
|
+
(function (SavedFiltersActions) {
|
|
3
|
+
SavedFiltersActions["Share"] = "share";
|
|
4
|
+
SavedFiltersActions["Update"] = "update";
|
|
5
|
+
SavedFiltersActions["Delete"] = "delete";
|
|
6
|
+
SavedFiltersActions["SetPersonalDefault"] = "set_own_default";
|
|
7
|
+
SavedFiltersActions["SetGlobalDefault"] = "set_global_default";
|
|
8
|
+
})(SavedFiltersActions || (SavedFiltersActions = {}));
|
|
9
|
+
//# sourceMappingURL=saved-filters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"saved-filters.js","sourceRoot":"","sources":["saved-filters.ts"],"names":[],"mappings":"AAsBA,MAAM,CAAN,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,sCAAe,CAAA;IACf,wCAAiB,CAAA;IACjB,wCAAiB,CAAA;IACjB,6DAAsC,CAAA;IACtC,8DAAuC,CAAA;AACzC,CAAC,EANW,mBAAmB,KAAnB,mBAAmB,QAM9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["search.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["settings.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.js","sourceRoot":"","sources":["templates.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export var TenantModule;
|
|
2
|
+
(function (TenantModule) {
|
|
3
|
+
TenantModule["Administration"] = "administration";
|
|
4
|
+
TenantModule["App"] = "app";
|
|
5
|
+
TenantModule["CRM"] = "crm";
|
|
6
|
+
TenantModule["Docs"] = "docs";
|
|
7
|
+
TenantModule["Leads"] = "leads";
|
|
8
|
+
TenantModule["Leasing"] = "leasing";
|
|
9
|
+
TenantModule["Marketing"] = "marketing";
|
|
10
|
+
TenantModule["Insights"] = "insights";
|
|
11
|
+
TenantModule["Opportunities"] = "opportunities";
|
|
12
|
+
TenantModule["Offers"] = "offers";
|
|
13
|
+
TenantModule["VehiclesMasterData"] = "vehicles_master_data";
|
|
14
|
+
TenantModule["Vehicles"] = "vehicles";
|
|
15
|
+
TenantModule["Tasks"] = "tasks";
|
|
16
|
+
TenantModule["TrackAndTrace"] = "track_and_trace";
|
|
17
|
+
TenantModule["Bootstrap"] = "bootstrap";
|
|
18
|
+
TenantModule["WhatsappNotifications"] = "whatsapp_notifications";
|
|
19
|
+
TenantModule["Hexon"] = "hexon";
|
|
20
|
+
})(TenantModule || (TenantModule = {}));
|
|
21
|
+
//# sourceMappingURL=tenants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tenants.js","sourceRoot":"","sources":["tenants.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAN,IAAY,YAkBX;AAlBD,WAAY,YAAY;IACtB,iDAAiC,CAAA;IACjC,2BAAW,CAAA;IACX,2BAAW,CAAA;IACX,6BAAa,CAAA;IACb,+BAAe,CAAA;IACf,mCAAmB,CAAA;IACnB,uCAAuB,CAAA;IACvB,qCAAqB,CAAA;IACrB,+CAA+B,CAAA;IAC/B,iCAAiB,CAAA;IACjB,2DAA2C,CAAA;IAC3C,qCAAqB,CAAA;IACrB,+BAAe,CAAA;IACf,iDAAiC,CAAA;IACjC,uCAAuB,CAAA;IACvB,gEAAgD,CAAA;IAChD,+BAAe,CAAA;AACjB,CAAC,EAlBW,YAAY,KAAZ,YAAY,QAkBvB"}
|
package/src/types/tenants.ts
CHANGED
|
@@ -59,6 +59,8 @@ export type Tenant = PublicTenant & {
|
|
|
59
59
|
accounting?: {
|
|
60
60
|
costCenterPerLine?: boolean;
|
|
61
61
|
};
|
|
62
|
+
// E.164 Twilio caller ID used as a fallback when a user has no own number configured
|
|
63
|
+
defaultTwilioPhoneNumber?: string;
|
|
62
64
|
};
|
|
63
65
|
|
|
64
66
|
export type AccountingProvider = 'exact' | 'odoo';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export var CommissionGrade;
|
|
2
|
+
(function (CommissionGrade) {
|
|
3
|
+
CommissionGrade["TooLow"] = "tooLow";
|
|
4
|
+
CommissionGrade["Low"] = "low";
|
|
5
|
+
CommissionGrade["OnTarget"] = "onTarget";
|
|
6
|
+
})(CommissionGrade || (CommissionGrade = {}));
|
|
7
|
+
//# sourceMappingURL=user-performance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-performance.js","sourceRoot":"","sources":["user-performance.ts"],"names":[],"mappings":"AAsCA,MAAM,CAAN,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,8BAAW,CAAA;IACX,wCAAqB,CAAA;AACvB,CAAC,EAJW,eAAe,KAAf,eAAe,QAI1B"}
|
package/src/types/users.ts
CHANGED
|
@@ -6,49 +6,48 @@ import {
|
|
|
6
6
|
} from '@bisondesk/commons-sdk/types';
|
|
7
7
|
import { OpportunityType } from '../constants.js';
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
type BaseUser = {
|
|
10
10
|
email: string;
|
|
11
11
|
firstName: string;
|
|
12
12
|
googleEmail?: string;
|
|
13
13
|
jobTitle?: string;
|
|
14
|
-
landline?: PhoneNumberRawValue; // landline phone number
|
|
15
14
|
language: string;
|
|
16
15
|
lastName: string;
|
|
17
|
-
|
|
16
|
+
nationality?: string;
|
|
18
17
|
picture?: AttachmentValue;
|
|
19
18
|
roles: AppRoles[];
|
|
19
|
+
spokenLanguages?: string[];
|
|
20
20
|
preferredBranchIds?: string[];
|
|
21
21
|
preferredOpportunityTypes?: OpportunityType[];
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
export type
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
export type NewUserRequest = BaseUser & {
|
|
25
|
+
landline?: PhoneNumberRawValue;
|
|
26
|
+
phone: PhoneNumberRawValue;
|
|
27
|
+
twilioPhoneNumber?: PhoneNumberRawValue; // Twilio caller ID used when placing calls
|
|
27
28
|
};
|
|
28
29
|
|
|
29
|
-
export type
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
export type ValidNewUserRequest = BaseUser & {
|
|
31
|
+
landline?: PhoneNumberValue;
|
|
32
|
+
phone: PhoneNumberValue;
|
|
33
|
+
twilioPhoneNumber?: PhoneNumberValue;
|
|
32
34
|
};
|
|
33
35
|
|
|
34
|
-
export type User = {
|
|
36
|
+
export type User = BaseUser & {
|
|
35
37
|
active: boolean;
|
|
36
38
|
createdAt: string;
|
|
37
|
-
email: string;
|
|
38
|
-
firstName: string;
|
|
39
|
-
googleEmail?: string;
|
|
40
39
|
id: string;
|
|
41
|
-
|
|
42
|
-
landline?: PhoneNumberValue; // landline phone number
|
|
43
|
-
language: string;
|
|
44
|
-
lastName: string;
|
|
40
|
+
landline?: PhoneNumberValue;
|
|
45
41
|
phone: PhoneNumberValue;
|
|
46
|
-
picture?: AttachmentValue;
|
|
47
42
|
roleActions?: TopLevelActions[]; // auto-generated based on the roles provided in the request
|
|
48
|
-
roles: AppRoles[];
|
|
49
43
|
updatedAt: string;
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
twilioPhoneNumber?: PhoneNumberValue; // Twilio caller ID used when placing calls
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export type UpdateUserRequest = Omit<User, 'phone' | 'landline' | 'twilioPhoneNumber'> & {
|
|
48
|
+
phone: PhoneNumberRawValue | PhoneNumberValue;
|
|
49
|
+
landline?: PhoneNumberRawValue | PhoneNumberValue;
|
|
50
|
+
twilioPhoneNumber?: PhoneNumberRawValue | PhoneNumberValue;
|
|
52
51
|
};
|
|
53
52
|
|
|
54
53
|
// Short version of the User entity, with only the properties
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["validation.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export var VehicleSaleInfoActions;
|
|
2
|
+
(function (VehicleSaleInfoActions) {
|
|
3
|
+
VehicleSaleInfoActions["VIEW_COSTS"] = "canSeeCosts";
|
|
4
|
+
VehicleSaleInfoActions["VIEW_CUSTOMER"] = "canSeeCustomer";
|
|
5
|
+
})(VehicleSaleInfoActions || (VehicleSaleInfoActions = {}));
|
|
6
|
+
//# sourceMappingURL=vehicle-sales.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vehicle-sales.js","sourceRoot":"","sources":["vehicle-sales.ts"],"names":[],"mappings":"AAOA,MAAM,CAAN,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAChC,oDAA0B,CAAA;IAC1B,0DAAgC,CAAA;AAClC,CAAC,EAHW,sBAAsB,KAAtB,sBAAsB,QAGjC"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { ReferenceData } from './utils.js';
|
|
2
|
+
import { VehicleRoles } from './vehicles.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The kind of milestone a timeline event represents. The frontend maps each
|
|
6
|
+
* type to its own title, icon and tone (translated client-side); the backend
|
|
7
|
+
* only emits the semantic type plus the data backing it.
|
|
8
|
+
*/
|
|
9
|
+
export enum VehicleTimelineEventType {
|
|
10
|
+
Created = 'CREATED',
|
|
11
|
+
Purchased = 'PURCHASED',
|
|
12
|
+
Sold = 'SOLD',
|
|
13
|
+
LeasingStarted = 'LEASING_STARTED',
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export enum VehicleTimelinePartyRole {
|
|
17
|
+
Supplier = 'SUPPLIER',
|
|
18
|
+
Customer = 'CUSTOMER',
|
|
19
|
+
Debtor = 'DEBTOR',
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export enum VehicleTimelineAmountType {
|
|
23
|
+
PurchasePrice = 'PURCHASE_PRICE',
|
|
24
|
+
AskingPrice = 'ASKING_PRICE',
|
|
25
|
+
SalePrice = 'SALE_PRICE',
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type VehicleTimelineParty = {
|
|
29
|
+
role: VehicleTimelinePartyRole;
|
|
30
|
+
organizationId?: string;
|
|
31
|
+
/** Pre-formatted display name, e.g. "807576 · GABIANCA EXPRES SRL". */
|
|
32
|
+
name?: string;
|
|
33
|
+
/** ISO country code used to render the small flag badge. */
|
|
34
|
+
countryCode?: string;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export type VehicleTimelineAmount = {
|
|
38
|
+
type: VehicleTimelineAmountType;
|
|
39
|
+
value: string;
|
|
40
|
+
currency?: string;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Leasing-contract details for a LEASING_STARTED event. The monthly/residual
|
|
45
|
+
* figures come from the contract's current conditions and are absent for
|
|
46
|
+
* contract sources that don't carry inline conditions (e.g. Bisondesk-origin).
|
|
47
|
+
*/
|
|
48
|
+
export type VehicleTimelineLeasing = {
|
|
49
|
+
contractId: string;
|
|
50
|
+
vehicleStockNumber?: string;
|
|
51
|
+
startDate: string;
|
|
52
|
+
endDate?: string;
|
|
53
|
+
/** Headline monthly amount (total, excl. VAT). */
|
|
54
|
+
monthly?: string;
|
|
55
|
+
/** Leasing portion of the monthly amount. */
|
|
56
|
+
monthlyLeasing?: string;
|
|
57
|
+
/** Insurance + taxes + other portion of the monthly amount. */
|
|
58
|
+
monthlyOther?: string;
|
|
59
|
+
residual?: string;
|
|
60
|
+
deposit?: string;
|
|
61
|
+
durationInMonths?: number;
|
|
62
|
+
saleAmount?: string;
|
|
63
|
+
currency?: string;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export type VehicleTimelineDocument<TDoc = unknown> = {
|
|
67
|
+
doc: TDoc;
|
|
68
|
+
paidAt?: string;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export type VehicleTimelineEvent<TDoc = unknown> = {
|
|
72
|
+
id: string;
|
|
73
|
+
type: VehicleTimelineEventType;
|
|
74
|
+
date?: string;
|
|
75
|
+
party?: VehicleTimelineParty;
|
|
76
|
+
/** User id of the person who drove the milestone (bought by / sold by / account manager). */
|
|
77
|
+
personUserId?: string;
|
|
78
|
+
assistedByUserId?: string;
|
|
79
|
+
opportunityId?: string;
|
|
80
|
+
/** Raw deal status of the underlying purchase/sale, rendered as a badge. */
|
|
81
|
+
dealStatus?: string;
|
|
82
|
+
/** Raw logistics status of the underlying purchase/sale, rendered as a badge. */
|
|
83
|
+
logisticStatus?: string;
|
|
84
|
+
amount?: VehicleTimelineAmount;
|
|
85
|
+
leasing?: VehicleTimelineLeasing;
|
|
86
|
+
/** Finance documents that belong to this milestone (nested in its card). */
|
|
87
|
+
documents: VehicleTimelineDocument<TDoc>[];
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Why a non-original stock record exists in the chain. Mirrors the description
|
|
92
|
+
* stored on the clone's `internal.relatedVehicles` entry pointing back to its
|
|
93
|
+
* predecessor (e.g. "Sale & lease-back …", "Retake …").
|
|
94
|
+
*/
|
|
95
|
+
export type VehicleTimelineRelation = {
|
|
96
|
+
description: string;
|
|
97
|
+
fromVehicleId?: string;
|
|
98
|
+
fromStockNumber?: string;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export type VehicleTimelineVehicle = {
|
|
102
|
+
id: string;
|
|
103
|
+
stockNumber: string;
|
|
104
|
+
administrativeNumber?: string;
|
|
105
|
+
title: string;
|
|
106
|
+
branch: string;
|
|
107
|
+
role: VehicleRoles;
|
|
108
|
+
deleted: boolean;
|
|
109
|
+
createdAt: string;
|
|
110
|
+
imageUrl?: string;
|
|
111
|
+
/** Pre-built spec fragments, joined client-side with " · ". */
|
|
112
|
+
specs: string[];
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* One stock record in the related-vehicles chain together with everything that
|
|
117
|
+
* happened to it. Groups are ordered original-first; every group after the
|
|
118
|
+
* first carries a `relation` describing the clone that created it.
|
|
119
|
+
*/
|
|
120
|
+
export type VehicleTimelineGroup<TDoc = unknown> = {
|
|
121
|
+
vehicle: VehicleTimelineVehicle;
|
|
122
|
+
/** True for the vehicle whose id was passed to the endpoint. */
|
|
123
|
+
isRequested: boolean;
|
|
124
|
+
relation?: VehicleTimelineRelation;
|
|
125
|
+
events: VehicleTimelineEvent<TDoc>[];
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
export type VehicleTimelineSummary = {
|
|
129
|
+
stockRecords: number;
|
|
130
|
+
saleCycles: number;
|
|
131
|
+
daysHeld?: number;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* `TDoc` is generic because `core-sdk` cannot depend on `documents-sdk`
|
|
136
|
+
* (it would be circular). The backend resolves it to `FinanceDocument`.
|
|
137
|
+
*/
|
|
138
|
+
export type VehicleTimeline<TDoc = unknown> = {
|
|
139
|
+
requestedVehicleId: string;
|
|
140
|
+
groups: VehicleTimelineGroup<TDoc>[];
|
|
141
|
+
summary: VehicleTimelineSummary;
|
|
142
|
+
meta?: ReferenceData;
|
|
143
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
export var VehicleRoles;
|
|
2
|
+
(function (VehicleRoles) {
|
|
3
|
+
VehicleRoles["SALE"] = "SALE";
|
|
4
|
+
VehicleRoles["OWN_USE"] = "OWN_USE";
|
|
5
|
+
VehicleRoles["RENTAL"] = "RENTAL";
|
|
6
|
+
VehicleRoles["BUILD"] = "BUILD";
|
|
7
|
+
VehicleRoles["UNKNOWN"] = "UNKNOWN";
|
|
8
|
+
VehicleRoles["BANK_FINANCE"] = "BANK_FINANCE";
|
|
9
|
+
})(VehicleRoles || (VehicleRoles = {}));
|
|
10
|
+
export var VehicleFuelType;
|
|
11
|
+
(function (VehicleFuelType) {
|
|
12
|
+
VehicleFuelType["Petrol"] = "PETROL";
|
|
13
|
+
VehicleFuelType["Diesel"] = "DIESEL";
|
|
14
|
+
VehicleFuelType["LPG"] = "LPG";
|
|
15
|
+
VehicleFuelType["LPG_G3"] = "LPG_G3";
|
|
16
|
+
VehicleFuelType["Electric"] = "ELECTRIC";
|
|
17
|
+
VehicleFuelType["CNG"] = "CNG";
|
|
18
|
+
VehicleFuelType["Hydrogen"] = "HYDROGEN";
|
|
19
|
+
VehicleFuelType["BioEthanol"] = "BIO_ETHANOL";
|
|
20
|
+
VehicleFuelType["BioDiesel"] = "BIO_DIESEL";
|
|
21
|
+
VehicleFuelType["E85"] = "E85";
|
|
22
|
+
VehicleFuelType["HCNG"] = "HCNG";
|
|
23
|
+
VehicleFuelType["LPG_Petrol"] = "LPG_PETROL";
|
|
24
|
+
VehicleFuelType["LPG_Diesel"] = "LPG_DIESEL";
|
|
25
|
+
VehicleFuelType["LPG_G3_Petrol"] = "LPG_G3_PETROL";
|
|
26
|
+
VehicleFuelType["LPG_G3_Diesel"] = "LPG_G3_DIESEL";
|
|
27
|
+
VehicleFuelType["Electric_Diesel"] = "ELECTRIC_DIESEL";
|
|
28
|
+
VehicleFuelType["Electric_Petrol"] = "ELECTRIC_PETROL";
|
|
29
|
+
VehicleFuelType["Hybrid"] = "HYBRID";
|
|
30
|
+
VehicleFuelType["Other"] = "OTHER";
|
|
31
|
+
})(VehicleFuelType || (VehicleFuelType = {}));
|
|
32
|
+
export var VehicleTachoTypes;
|
|
33
|
+
(function (VehicleTachoTypes) {
|
|
34
|
+
VehicleTachoTypes["Analog"] = "ANALOG";
|
|
35
|
+
VehicleTachoTypes["Digital"] = "DIGITAL";
|
|
36
|
+
VehicleTachoTypes["SmartTacho1"] = "SMART_TACHO_1";
|
|
37
|
+
VehicleTachoTypes["SmartTacho2"] = "SMART_TACHO_2";
|
|
38
|
+
})(VehicleTachoTypes || (VehicleTachoTypes = {}));
|
|
39
|
+
export var SearchVehicleSaleDealStatus;
|
|
40
|
+
(function (SearchVehicleSaleDealStatus) {
|
|
41
|
+
SearchVehicleSaleDealStatus["NotSold"] = "NOT_SOLD";
|
|
42
|
+
SearchVehicleSaleDealStatus["Reserved"] = "RESERVED";
|
|
43
|
+
SearchVehicleSaleDealStatus["Sold"] = "SOLD";
|
|
44
|
+
})(SearchVehicleSaleDealStatus || (SearchVehicleSaleDealStatus = {}));
|
|
45
|
+
export var VehiclePurchaseDealStatus;
|
|
46
|
+
(function (VehiclePurchaseDealStatus) {
|
|
47
|
+
VehiclePurchaseDealStatus["Marketing"] = "MARKETING";
|
|
48
|
+
VehiclePurchaseDealStatus["PurchaseEvaluation"] = "PURCHASE_EVALUATION";
|
|
49
|
+
VehiclePurchaseDealStatus["PurchaseAgreed"] = "PURCHASE_AGREED";
|
|
50
|
+
VehiclePurchaseDealStatus["FirstPaymentAllowed"] = "FIRST_PAYMENT_ALLOWED";
|
|
51
|
+
VehiclePurchaseDealStatus["FirstPaymentSent"] = "FIRST_PAYMENT_SENT";
|
|
52
|
+
VehiclePurchaseDealStatus["FullPaymentAllowed"] = "FULL_PAYMENT_ALLOWED";
|
|
53
|
+
VehiclePurchaseDealStatus["FullPaymentSent"] = "FULL_PAYMENT_SENT";
|
|
54
|
+
})(VehiclePurchaseDealStatus || (VehiclePurchaseDealStatus = {}));
|
|
55
|
+
export var VehiclePurchaseLogisticsStatus;
|
|
56
|
+
(function (VehiclePurchaseLogisticsStatus) {
|
|
57
|
+
VehiclePurchaseLogisticsStatus["AtOrigin"] = "AT_ORIGIN";
|
|
58
|
+
VehiclePurchaseLogisticsStatus["Arrived"] = "ARRIVED";
|
|
59
|
+
VehiclePurchaseLogisticsStatus["CheckedIn"] = "CHECKED_IN";
|
|
60
|
+
})(VehiclePurchaseLogisticsStatus || (VehiclePurchaseLogisticsStatus = {}));
|
|
61
|
+
export var VehiclePurchaseDeliveryType;
|
|
62
|
+
(function (VehiclePurchaseDeliveryType) {
|
|
63
|
+
VehiclePurchaseDeliveryType["PickUp"] = "PICK_UP";
|
|
64
|
+
VehiclePurchaseDeliveryType["DropOff"] = "DROP_OFF";
|
|
65
|
+
})(VehiclePurchaseDeliveryType || (VehiclePurchaseDeliveryType = {}));
|
|
66
|
+
export var VehicleActions;
|
|
67
|
+
(function (VehicleActions) {
|
|
68
|
+
VehicleActions["EditAdminDocs"] = "edit_admin_docs";
|
|
69
|
+
VehicleActions["EditEngineeringDocs"] = "edit_engineering_docs";
|
|
70
|
+
VehicleActions["EditMarketing"] = "edit_marketing";
|
|
71
|
+
VehicleActions["EditMedia"] = "edit_media";
|
|
72
|
+
VehicleActions["EditPictures"] = "edit_pictures";
|
|
73
|
+
VehicleActions["EditPrices"] = "edit_prices";
|
|
74
|
+
VehicleActions["EditPurchaseDeal"] = "edit_purchase_deal";
|
|
75
|
+
VehicleActions["EditPurchaseLogistics"] = "edit_purchase_logistics";
|
|
76
|
+
VehicleActions["EditSpecs"] = "edit_specs";
|
|
77
|
+
VehicleActions["EditVideos"] = "edit_videos";
|
|
78
|
+
VehicleActions["ViewLeads"] = "view_leads";
|
|
79
|
+
VehicleActions["ViewSimilarOnline"] = "view_similar_online";
|
|
80
|
+
VehicleActions["ViewPurchase"] = "view_purchase";
|
|
81
|
+
VehicleActions["ViewPriceHistory"] = "view_price_history";
|
|
82
|
+
VehicleActions["DeleteVehicle"] = "delete_vehicle";
|
|
83
|
+
})(VehicleActions || (VehicleActions = {}));
|
|
84
|
+
export var PurchaseActions;
|
|
85
|
+
(function (PurchaseActions) {
|
|
86
|
+
PurchaseActions["ViewDeal"] = "view_deal";
|
|
87
|
+
PurchaseActions["ViewSupplierOrganization"] = "view_supplier_organization";
|
|
88
|
+
PurchaseActions["ViewContact"] = "view_contact";
|
|
89
|
+
PurchaseActions["ViewLegalAddress"] = "view_legal_address";
|
|
90
|
+
PurchaseActions["ViewPickupAddress"] = "view_pickup_address";
|
|
91
|
+
PurchaseActions["ViewEstimatedCosts"] = "view_estimated_costs";
|
|
92
|
+
PurchaseActions["ViewFinanceDocuments"] = "view_finance_documents";
|
|
93
|
+
PurchaseActions["AddPayment"] = "add_payment";
|
|
94
|
+
PurchaseActions["EditPayment"] = "edit_payment";
|
|
95
|
+
PurchaseActions["MarkPaymentDone"] = "mark_payment_done";
|
|
96
|
+
PurchaseActions["AddRemarks"] = "add_remarks";
|
|
97
|
+
})(PurchaseActions || (PurchaseActions = {}));
|
|
98
|
+
//# sourceMappingURL=vehicles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vehicles.js","sourceRoot":"","sources":["vehicles.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAN,IAAY,YAOX;AAPD,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,mCAAmB,CAAA;IACnB,iCAAiB,CAAA;IACjB,+BAAe,CAAA;IACf,mCAAmB,CAAA;IACnB,6CAA6B,CAAA;AAC/B,CAAC,EAPW,YAAY,KAAZ,YAAY,QAOvB;AAED,MAAM,CAAN,IAAY,eAoBX;AApBD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;IACjB,8BAAW,CAAA;IACX,oCAAiB,CAAA;IACjB,wCAAqB,CAAA;IACrB,8BAAW,CAAA;IACX,wCAAqB,CAAA;IACrB,6CAA0B,CAAA;IAC1B,2CAAwB,CAAA;IACxB,8BAAW,CAAA;IACX,gCAAa,CAAA;IACb,4CAAyB,CAAA;IACzB,4CAAyB,CAAA;IACzB,kDAA+B,CAAA;IAC/B,kDAA+B,CAAA;IAC/B,sDAAmC,CAAA;IACnC,sDAAmC,CAAA;IACnC,oCAAiB,CAAA;IACjB,kCAAe,CAAA;AACjB,CAAC,EApBW,eAAe,KAAf,eAAe,QAoB1B;AAED,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,wCAAmB,CAAA;IACnB,kDAA6B,CAAA;IAC7B,kDAA6B,CAAA;AAC/B,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B;AAiLD,MAAM,CAAN,IAAY,2BAIX;AAJD,WAAY,2BAA2B;IACrC,mDAAoB,CAAA;IACpB,oDAAqB,CAAA;IACrB,4CAAa,CAAA;AACf,CAAC,EAJW,2BAA2B,KAA3B,2BAA2B,QAItC;AAwWD,MAAM,CAAN,IAAY,yBAQX;AARD,WAAY,yBAAyB;IACnC,oDAAuB,CAAA;IACvB,uEAA0C,CAAA;IAC1C,+DAAkC,CAAA;IAClC,0EAA6C,CAAA;IAC7C,oEAAuC,CAAA;IACvC,wEAA2C,CAAA;IAC3C,kEAAqC,CAAA;AACvC,CAAC,EARW,yBAAyB,KAAzB,yBAAyB,QAQpC;AAED,MAAM,CAAN,IAAY,8BAIX;AAJD,WAAY,8BAA8B;IACxC,wDAAsB,CAAA;IACtB,qDAAmB,CAAA;IACnB,0DAAwB,CAAA;AAC1B,CAAC,EAJW,8BAA8B,KAA9B,8BAA8B,QAIzC;AAED,MAAM,CAAN,IAAY,2BAGX;AAHD,WAAY,2BAA2B;IACrC,iDAAkB,CAAA;IAClB,mDAAoB,CAAA;AACtB,CAAC,EAHW,2BAA2B,KAA3B,2BAA2B,QAGtC;AAwGD,MAAM,CAAN,IAAY,cAgBX;AAhBD,WAAY,cAAc;IACxB,mDAAiC,CAAA;IACjC,+DAA6C,CAAA;IAC7C,kDAAgC,CAAA;IAChC,0CAAwB,CAAA;IACxB,gDAA8B,CAAA;IAC9B,4CAA0B,CAAA;IAC1B,yDAAuC,CAAA;IACvC,mEAAiD,CAAA;IACjD,0CAAwB,CAAA;IACxB,4CAA0B,CAAA;IAC1B,0CAAwB,CAAA;IACxB,2DAAyC,CAAA;IACzC,gDAA8B,CAAA;IAC9B,yDAAuC,CAAA;IACvC,kDAAgC,CAAA;AAClC,CAAC,EAhBW,cAAc,KAAd,cAAc,QAgBzB;AAED,MAAM,CAAN,IAAY,eAYX;AAZD,WAAY,eAAe;IACzB,yCAAsB,CAAA;IACtB,0EAAuD,CAAA;IACvD,+CAA4B,CAAA;IAC5B,0DAAuC,CAAA;IACvC,4DAAyC,CAAA;IACzC,8DAA2C,CAAA;IAC3C,kEAA+C,CAAA;IAC/C,6CAA0B,CAAA;IAC1B,+CAA4B,CAAA;IAC5B,wDAAqC,CAAA;IACrC,6CAA0B,CAAA;AAC5B,CAAC,EAZW,eAAe,KAAf,eAAe,QAY1B"}
|
package/src/types/vehicles.ts
CHANGED
|
@@ -354,6 +354,13 @@ export type VehicleInternalInfo = {
|
|
|
354
354
|
pictures: AttachmentValue[];
|
|
355
355
|
engineeringDocs: Document[];
|
|
356
356
|
pricing: VehiclePricing;
|
|
357
|
+
/**
|
|
358
|
+
* Set when a target-tenant operator edits the retail price on a cross-tenant
|
|
359
|
+
* copy (`original` set) that is still source-mastered. From that moment,
|
|
360
|
+
* cross-tenant sync stops overwriting `external.salesConditions` from the
|
|
361
|
+
* source. ISO timestamp + user id of the first takeover.
|
|
362
|
+
*/
|
|
363
|
+
sourcePriceOverride?: { at: string; by: string };
|
|
357
364
|
role: VehicleRoles;
|
|
358
365
|
status: VehicleStatus;
|
|
359
366
|
updatedAt: string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { UTCDate } from '@date-fns/utc';
|
|
2
|
+
import { format } from 'date-fns';
|
|
3
|
+
import { last, map, sortBy, uniqBy } from 'lodash-es';
|
|
4
|
+
export const sortContractClients = (clients) => sortBy(map(uniqBy(clients, (c) => c.takeoverId), (c) => ({ ...c, since: format(new UTCDate(c.since), 'yyyy-MM-dd') })), (cli) => cli.since, (cli) => (cli.takeoverId ? parseInt(cli.takeoverId.replace(/[^0-9]/g, '')) : 0));
|
|
5
|
+
export const getDealRef = ({ conditions, opportunities, }) => last(conditions) ?? last(opportunities);
|
|
6
|
+
//# sourceMappingURL=leasing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"leasing.js","sourceRoot":"","sources":["leasing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAStD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,OAAgC,EAA2B,EAAE,CAC/F,MAAM,CACJ,GAAG,CACD,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,EACpC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC,EAAE,CAAC,CACrE,EACD,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,EAClB,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAChF,CAAC;AAEJ,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACzB,UAAU,EACV,aAAa,GACyC,EAAkC,EAAE,CAC1F,IAAI,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,aAAa,CAAE,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { OpportunityStatus, OpportunityStatusOrder } from '../types/opportunities.js';
|
|
2
|
+
const compareOpportunityStatus = (input) => {
|
|
3
|
+
const { currentStatus, referenceStatus } = input;
|
|
4
|
+
const currentStatusIdx = OpportunityStatusOrder.indexOf(currentStatus);
|
|
5
|
+
const referenceStatusIdx = OpportunityStatusOrder.indexOf(referenceStatus);
|
|
6
|
+
return {
|
|
7
|
+
currentStatusIdx,
|
|
8
|
+
referenceStatusIdx,
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export const getPreviousStatus = (currentStatus) => {
|
|
12
|
+
const currentIndex = OpportunityStatusOrder.indexOf(currentStatus);
|
|
13
|
+
if (currentIndex === 0) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
return OpportunityStatusOrder[currentIndex - 1];
|
|
17
|
+
};
|
|
18
|
+
export const getNextStatus = (status) => {
|
|
19
|
+
const statusIndex = OpportunityStatusOrder.indexOf(status);
|
|
20
|
+
if (statusIndex >= OpportunityStatusOrder.length - 1) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
return OpportunityStatusOrder[statusIndex + 1];
|
|
24
|
+
};
|
|
25
|
+
export const isSameOrAfterReferenceOpportunityStatus = (input) => {
|
|
26
|
+
const { currentStatusIdx, referenceStatusIdx } = compareOpportunityStatus(input);
|
|
27
|
+
return currentStatusIdx >= referenceStatusIdx;
|
|
28
|
+
};
|
|
29
|
+
export const isAfterReferenceOpportunityStatus = (input) => {
|
|
30
|
+
const { currentStatusIdx, referenceStatusIdx } = compareOpportunityStatus(input);
|
|
31
|
+
return currentStatusIdx > referenceStatusIdx;
|
|
32
|
+
};
|
|
33
|
+
export const isSameOrBeforeReferenceOpportunityStatus = (input) => {
|
|
34
|
+
const { currentStatusIdx, referenceStatusIdx } = compareOpportunityStatus(input);
|
|
35
|
+
return currentStatusIdx <= referenceStatusIdx;
|
|
36
|
+
};
|
|
37
|
+
export const isBeforeReferenceOpportunityStatus = (input) => {
|
|
38
|
+
const { currentStatusIdx, referenceStatusIdx } = compareOpportunityStatus(input);
|
|
39
|
+
return currentStatusIdx < referenceStatusIdx;
|
|
40
|
+
};
|
|
41
|
+
export const isOpportunityLost = (input) => input.lostAt != null;
|
|
42
|
+
export const getOpportunityReservedStatus = () => [
|
|
43
|
+
OpportunityStatus.REVIEW,
|
|
44
|
+
OpportunityStatus.PREPARATION,
|
|
45
|
+
OpportunityStatus.DELIVERY,
|
|
46
|
+
];
|
|
47
|
+
export const isOpportunityReserved = (input) => getOpportunityReservedStatus().includes(input.status);
|
|
48
|
+
//# sourceMappingURL=opportunities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunities.js","sourceRoot":"","sources":["opportunities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAOnG,MAAM,wBAAwB,GAAG,CAAC,KAAmB,EAAE,EAAE;IACvD,MAAM,EAAE,aAAa,EAAE,eAAe,EAAE,GAAG,KAAK,CAAC;IAEjD,MAAM,gBAAgB,GAAG,sBAAsB,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IACvE,MAAM,kBAAkB,GAAG,sBAAsB,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;IAE3E,OAAO;QACL,gBAAgB;QAChB,kBAAkB;KACnB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,aAAgC,EACD,EAAE;IACjC,MAAM,YAAY,GAAG,sBAAsB,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IACnE,IAAI,YAAY,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO;IACT,CAAC;IACD,OAAO,sBAAsB,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC;AAClD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,MAAyB,EAAiC,EAAE;IACxF,MAAM,WAAW,GAAG,sBAAsB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC3D,IAAI,WAAW,IAAI,sBAAsB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrD,OAAO;IACT,CAAC;IACD,OAAO,sBAAsB,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC;AACjD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,uCAAuC,GAAG,CAAC,KAAmB,EAAW,EAAE;IACtF,MAAM,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;IAEjF,OAAO,gBAAgB,IAAI,kBAAkB,CAAC;AAChD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,KAAmB,EAAW,EAAE;IAChF,MAAM,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;IAEjF,OAAO,gBAAgB,GAAG,kBAAkB,CAAC;AAC/C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,wCAAwC,GAAG,CAAC,KAAmB,EAAW,EAAE;IACvF,MAAM,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;IAEjF,OAAO,gBAAgB,IAAI,kBAAkB,CAAC;AAChD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,KAAmB,EAAW,EAAE;IACjF,MAAM,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;IAEjF,OAAO,gBAAgB,GAAG,kBAAkB,CAAC;AAC/C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAkB,EAAW,EAAE,CAAC,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC;AAEvF,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAwB,EAAE,CAAC;IACrE,iBAAiB,CAAC,MAAM;IACxB,iBAAiB,CAAC,WAAW;IAC7B,iBAAiB,CAAC,QAAQ;CAC3B,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAAkB,EAAW,EAAE,CACnE,4BAA4B,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC"}
|