@bisondesk/core-sdk 1.0.535 → 1.0.537

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 (64) hide show
  1. package/lib/apis/transports.d.ts +9 -0
  2. package/lib/apis/transports.d.ts.map +1 -0
  3. package/lib/apis/transports.js +47 -0
  4. package/lib/apis/transports.js.map +1 -0
  5. package/lib/constants.d.ts +1 -0
  6. package/lib/constants.d.ts.map +1 -1
  7. package/lib/constants.js +1 -0
  8. package/lib/constants.js.map +1 -1
  9. package/lib/types/crm.d.ts +2 -1
  10. package/lib/types/crm.d.ts.map +1 -1
  11. package/lib/types/crm.js +1 -0
  12. package/lib/types/crm.js.map +1 -1
  13. package/lib/types/opportunities.d.ts +2 -0
  14. package/lib/types/opportunities.d.ts.map +1 -1
  15. package/lib/types/opportunities.js.map +1 -1
  16. package/lib/types/transports.d.ts +154 -0
  17. package/lib/types/transports.d.ts.map +1 -0
  18. package/lib/types/transports.js +40 -0
  19. package/lib/types/transports.js.map +1 -0
  20. package/lib/types/vehicles.d.ts +2 -0
  21. package/lib/types/vehicles.d.ts.map +1 -1
  22. package/lib/types/vehicles.js.map +1 -1
  23. package/package.json +1 -1
  24. package/src/apis/transports.ts +86 -0
  25. package/src/constants.ts +2 -0
  26. package/src/types/comparables.js +2 -0
  27. package/src/types/comparables.js.map +1 -0
  28. package/src/types/crm.js +50 -0
  29. package/src/types/crm.js.map +1 -0
  30. package/src/types/crm.ts +1 -0
  31. package/src/types/fields.js +2 -0
  32. package/src/types/fields.js.map +1 -0
  33. package/src/types/insights.js +2 -0
  34. package/src/types/insights.js.map +1 -0
  35. package/src/types/internet-vehicles.js +2 -0
  36. package/src/types/internet-vehicles.js.map +1 -0
  37. package/src/types/journeys.js +2 -0
  38. package/src/types/journeys.js.map +1 -0
  39. package/src/types/leasing-settings.js +7 -0
  40. package/src/types/leasing-settings.js.map +1 -0
  41. package/src/types/offers.js +56 -0
  42. package/src/types/offers.js.map +1 -0
  43. package/src/types/opportunities.js +106 -0
  44. package/src/types/opportunities.js.map +1 -0
  45. package/src/types/opportunities.ts +2 -0
  46. package/src/types/payments.js +7 -0
  47. package/src/types/payments.js.map +1 -0
  48. package/src/types/quotes.js +42 -0
  49. package/src/types/quotes.js.map +1 -0
  50. package/src/types/reservations.js +5 -0
  51. package/src/types/reservations.js.map +1 -0
  52. package/src/types/search.js +2 -0
  53. package/src/types/search.js.map +1 -0
  54. package/src/types/tenants.js +20 -0
  55. package/src/types/tenants.js.map +1 -0
  56. package/src/types/transports.ts +229 -0
  57. package/src/types/utils.js +2 -0
  58. package/src/types/utils.js.map +1 -0
  59. package/src/types/vehicles.js +94 -0
  60. package/src/types/vehicles.js.map +1 -0
  61. package/src/types/vehicles.ts +2 -0
  62. package/src/utils/opportunities.js +48 -0
  63. package/src/utils/opportunities.js.map +1 -0
  64. package/tsconfig.tsbuildinfo +1 -1
@@ -0,0 +1,86 @@
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 { DataRecord } from '@bisondesk/commons-sdk/utils';
5
+ import {
6
+ InternalTransportRequest,
7
+ NewTransport,
8
+ Transport,
9
+ TransportType,
10
+ UpdateTransport,
11
+ } from '../types/transports.js';
12
+ import { ReferenceData } from '../types/utils.js';
13
+
14
+ const CORE_API = () => process.env.CORE_API_ORIGIN;
15
+
16
+ const makeRequest = async <T>(
17
+ tenantId: string,
18
+ method: string,
19
+ path: string,
20
+ body?: unknown
21
+ ): Promise<T> => {
22
+ const auth = await getAdminAuth();
23
+ const url = `${CORE_API()}${path}`;
24
+ const response: Response = await fetch(url, {
25
+ method,
26
+ headers: {
27
+ Authorization: auth,
28
+ [TENANT_ID_ADMIN_HEADER]: tenantId,
29
+ 'Content-Type': 'application/json',
30
+ },
31
+ body: body ? JSON.stringify(body) : undefined,
32
+ });
33
+
34
+ if (response.status >= 200 && response.status < 300) {
35
+ if (response.status === 204) {
36
+ return undefined as T;
37
+ }
38
+ return response.json() as any;
39
+ }
40
+
41
+ const responseBody = await response.text();
42
+ throw new XError('core-sdk.transports', {
43
+ method,
44
+ url,
45
+ tenantId,
46
+ body: responseBody,
47
+ status: response.status,
48
+ });
49
+ };
50
+
51
+ export const getTransportById = async (
52
+ tenantId: string,
53
+ id: string
54
+ ): Promise<DataRecord<Transport, ReferenceData> | undefined> => {
55
+ return makeRequest(tenantId, 'GET', `/api/transports/${id}`);
56
+ };
57
+
58
+ export const createTransport = async (
59
+ tenantId: string,
60
+ data: NewTransport
61
+ ): Promise<Transport> => {
62
+ return makeRequest(tenantId, 'POST', '/api/transports', data);
63
+ };
64
+
65
+ export const updateTransport = async (
66
+ tenantId: string,
67
+ id: string,
68
+ data: UpdateTransport
69
+ ): Promise<Transport> => {
70
+ return makeRequest(tenantId, 'PATCH', `/api/transports/${id}`, data);
71
+ };
72
+
73
+ export const listTransportsByVehicle = async (
74
+ tenantId: string,
75
+ vehicleId: string
76
+ ): Promise<Transport[]> => {
77
+ return makeRequest(tenantId, 'GET', `/api/transports/vehicle/${vehicleId}`);
78
+ };
79
+
80
+ export const getCancelledITR = async (
81
+ tenantId: string,
82
+ vehicleId: string,
83
+ type: TransportType
84
+ ): Promise<InternalTransportRequest | null> => {
85
+ return makeRequest(tenantId, 'GET', `/api/transports/vehicle/${vehicleId}/cancelled-itr/${type}`);
86
+ };
package/src/constants.ts CHANGED
@@ -50,6 +50,8 @@ export const VEHICLE_FUEL_TYPES_PICKLIST_ID = 'vehicle-fuel-types';
50
50
  export const VEHICLE_TACHOGRAPH_TYPES_PICKLIST_ID = 'vehicle-tachograph-types';
51
51
  export const COOLER_BRAND_PICKLIST_ID = 'cooler_brand';
52
52
 
53
+ export const KINGPIN_SIZE_PICKLIST_ID = 'kingpinSize';
54
+
53
55
  export const PICKLIST_FALLBACK_LOCALE = 'en';
54
56
 
55
57
  //
@@ -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,50 @@
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["UPSERT"] = "upsert";
18
+ OrganizationActions["DELETE"] = "delete";
19
+ OrganizationActions["SELL_TO_ORGANIZATION"] = "sell_to_organization";
20
+ })(OrganizationActions || (OrganizationActions = {}));
21
+ export var MarketingChannel;
22
+ (function (MarketingChannel) {
23
+ MarketingChannel["Email"] = "email";
24
+ MarketingChannel["Whatsapp"] = "whatsapp";
25
+ MarketingChannel["Sms"] = "sms";
26
+ MarketingChannel["Phone"] = "phone";
27
+ })(MarketingChannel || (MarketingChannel = {}));
28
+ export var PartnerLevel;
29
+ (function (PartnerLevel) {
30
+ PartnerLevel["Internal"] = "05-internal";
31
+ PartnerLevel["Gold"] = "10-gold";
32
+ PartnerLevel["Silver"] = "20-silver";
33
+ PartnerLevel["Bronze"] = "30-bronze";
34
+ })(PartnerLevel || (PartnerLevel = {}));
35
+ export var SaveContactResolution;
36
+ (function (SaveContactResolution) {
37
+ SaveContactResolution["IgnoreDuplicates"] = "IGNORE_DUPLICATES";
38
+ SaveContactResolution["BlockDuplicates"] = "BLOCK_DUPLICATES";
39
+ })(SaveContactResolution || (SaveContactResolution = {}));
40
+ export var SaveOrgResolution;
41
+ (function (SaveOrgResolution) {
42
+ SaveOrgResolution["IgnoreDuplicates"] = "IGNORE_DUPLICATES";
43
+ SaveOrgResolution["BlockDuplicates"] = "BLOCK_DUPLICATES";
44
+ })(SaveOrgResolution || (SaveOrgResolution = {}));
45
+ export var CrmSearchScope;
46
+ (function (CrmSearchScope) {
47
+ CrmSearchScope["Tenant"] = "tenant";
48
+ CrmSearchScope["Conglomerate"] = "conglomerate";
49
+ })(CrmSearchScope || (CrmSearchScope = {}));
50
+ //# 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,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,wCAAiB,CAAA;IACjB,wCAAiB,CAAA;IACjB,oEAA6C,CAAA;AAC/C,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,QAI9B;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;AAyCD,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"}
package/src/types/crm.ts CHANGED
@@ -19,6 +19,7 @@ export enum OrganizatioRiskTags {
19
19
  BANK_ACCOUNT_BLOCKED = 'BANK_ACCOUNT_BLOCKED',
20
20
  NO_GPS = 'NO_GPS',
21
21
  BANKRUPTCY = 'BANKRUPTCY',
22
+ JUDICIAL_REORGANISATION_WCO = 'JUDICIAL_REORGANISATION_WCO',
22
23
  }
23
24
 
24
25
  export enum ContactActions {
@@ -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,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=journeys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"journeys.js","sourceRoot":"","sources":["journeys.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ export var LeasingItemsPaymentSplit;
2
+ (function (LeasingItemsPaymentSplit) {
3
+ LeasingItemsPaymentSplit["Customer"] = "customer";
4
+ LeasingItemsPaymentSplit["Split"] = "split";
5
+ LeasingItemsPaymentSplit["Company"] = "company";
6
+ })(LeasingItemsPaymentSplit || (LeasingItemsPaymentSplit = {}));
7
+ //# sourceMappingURL=leasing-settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"leasing-settings.js","sourceRoot":"","sources":["leasing-settings.ts"],"names":[],"mappings":"AAwCA,MAAM,CAAN,IAAY,wBAIX;AAJD,WAAY,wBAAwB;IAClC,iDAAqB,CAAA;IACrB,2CAAe,CAAA;IACf,+CAAmB,CAAA;AACrB,CAAC,EAJW,wBAAwB,KAAxB,wBAAwB,QAInC"}
@@ -0,0 +1,56 @@
1
+ export var OfferActions;
2
+ (function (OfferActions) {
3
+ OfferActions["CREATE_BID"] = "create_bid";
4
+ OfferActions["SET_FINAL_VALUATION"] = "set_final_valuation";
5
+ OfferActions["LOSE"] = "lose";
6
+ OfferActions["REOPEN"] = "reopen";
7
+ OfferActions["SET_DOCUMENTS"] = "set_documents";
8
+ OfferActions["SET_METADATA"] = "set_metadata";
9
+ OfferActions["SEE_SUPPLIER"] = "see_supplier";
10
+ OfferActions["SEE_INSIGHTS"] = "see_insights";
11
+ OfferActions["VIEW_BIDS"] = "view_bids";
12
+ OfferActions["DELETE_FINAL_VALUATION"] = "delete_final_valuation";
13
+ OfferActions["SEE_ASKING_PRICE"] = "see_asking_price";
14
+ OfferActions["ACCEPT_NEGOTIATION"] = "accept_negotiation";
15
+ OfferActions["UNDO_ACCEPT_NEGOTIATION"] = "undo_accept_negotiation";
16
+ OfferActions["SET_SUPPLIER_VEHICLE"] = "set_supplier_vehicle";
17
+ OfferActions["CAN_PURCHASE"] = "can_purchase";
18
+ })(OfferActions || (OfferActions = {}));
19
+ export var OfferBidActions;
20
+ (function (OfferBidActions) {
21
+ OfferBidActions["EDIT_BID"] = "create_bid";
22
+ OfferBidActions["DELETE_BID"] = "delete_bid";
23
+ })(OfferBidActions || (OfferBidActions = {}));
24
+ export var OfferStatus;
25
+ (function (OfferStatus) {
26
+ OfferStatus["PROSPECTION"] = "prospection";
27
+ OfferStatus["VALUATION"] = "valuation";
28
+ OfferStatus["NEGOTIATION"] = "negotiation";
29
+ })(OfferStatus || (OfferStatus = {}));
30
+ export var OfferLostReasonValues;
31
+ (function (OfferLostReasonValues) {
32
+ OfferLostReasonValues["Expensive"] = "expensive";
33
+ OfferLostReasonValues["NoMarket"] = "no_market";
34
+ OfferLostReasonValues["BadExperience"] = "bad_experience";
35
+ OfferLostReasonValues["NoAnswer"] = "supplier_mia";
36
+ OfferLostReasonValues["Other"] = "other";
37
+ OfferLostReasonValues["Automatic"] = "automatic";
38
+ })(OfferLostReasonValues || (OfferLostReasonValues = {}));
39
+ export var OfferBidType;
40
+ (function (OfferBidType) {
41
+ OfferBidType["INTERNAL"] = "internal";
42
+ OfferBidType["EXTERNAL"] = "external";
43
+ })(OfferBidType || (OfferBidType = {}));
44
+ export var OfferWarningsCode;
45
+ (function (OfferWarningsCode) {
46
+ OfferWarningsCode["NO_SUPPLIER"] = "no_supplier";
47
+ })(OfferWarningsCode || (OfferWarningsCode = {}));
48
+ export const OfferStatusOrder = [
49
+ OfferStatus.PROSPECTION,
50
+ OfferStatus.VALUATION,
51
+ OfferStatus.NEGOTIATION,
52
+ ];
53
+ export const OfferWonColumnId = 'closed_won';
54
+ export const OfferKanbanColumns = [...OfferStatusOrder, OfferWonColumnId];
55
+ export const OfferKanbanEndColumns = [OfferWonColumnId];
56
+ //# sourceMappingURL=offers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"offers.js","sourceRoot":"","sources":["offers.ts"],"names":[],"mappings":"AAeA,MAAM,CAAN,IAAY,YAgBX;AAhBD,WAAY,YAAY;IACtB,yCAAyB,CAAA;IACzB,2DAA2C,CAAA;IAC3C,6BAAa,CAAA;IACb,iCAAiB,CAAA;IACjB,+CAA+B,CAAA;IAC/B,6CAA6B,CAAA;IAC7B,6CAA6B,CAAA;IAC7B,6CAA6B,CAAA;IAC7B,uCAAuB,CAAA;IACvB,iEAAiD,CAAA;IACjD,qDAAqC,CAAA;IACrC,yDAAyC,CAAA;IACzC,mEAAmD,CAAA;IACnD,6DAA6C,CAAA;IAC7C,6CAA6B,CAAA;AAC/B,CAAC,EAhBW,YAAY,KAAZ,YAAY,QAgBvB;AAED,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,0CAAuB,CAAA;IACvB,4CAAyB,CAAA;AAC3B,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B;AAED,MAAM,CAAN,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,0CAA2B,CAAA;IAC3B,sCAAuB,CAAA;IACvB,0CAA2B,CAAA;AAC7B,CAAC,EAJW,WAAW,KAAX,WAAW,QAItB;AAED,MAAM,CAAN,IAAY,qBAOX;AAPD,WAAY,qBAAqB;IAC/B,gDAAuB,CAAA;IACvB,+CAAsB,CAAA;IACtB,yDAAgC,CAAA;IAChC,kDAAyB,CAAA;IACzB,wCAAe,CAAA;IACf,gDAAuB,CAAA;AACzB,CAAC,EAPW,qBAAqB,KAArB,qBAAqB,QAOhC;AAED,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,qCAAqB,CAAA;IACrB,qCAAqB,CAAA;AACvB,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB;AAED,MAAM,CAAN,IAAY,iBAEX;AAFD,WAAY,iBAAiB;IAC3B,gDAA2B,CAAA;AAC7B,CAAC,EAFW,iBAAiB,KAAjB,iBAAiB,QAE5B;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAkB;IAC7C,WAAW,CAAC,WAAW;IACvB,WAAW,CAAC,SAAS;IACrB,WAAW,CAAC,WAAW;CACxB,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,YAAY,CAAC;AAE7C,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,GAAG,gBAAgB,EAAE,gBAAgB,CAAC,CAAC;AAE1E,MAAM,CAAC,MAAM,qBAAqB,GAAa,CAAC,gBAAgB,CAAC,CAAC"}
@@ -0,0 +1,106 @@
1
+ export var OpportunityActions;
2
+ (function (OpportunityActions) {
3
+ OpportunityActions["ADD_REMARKS"] = "add_remarks";
4
+ OpportunityActions["CREATE_QUOTE"] = "create_quote";
5
+ OpportunityActions["LOSE"] = "lose";
6
+ OpportunityActions["REOPEN"] = "reopen";
7
+ OpportunityActions["START_PREPARATION"] = "start_preparation";
8
+ OpportunityActions["REVERT_PREPARATION"] = "revert_preparation";
9
+ OpportunityActions["START_DELIVERY"] = "start_delivery";
10
+ OpportunityActions["REVERT_DELIVERY"] = "revert_delivery";
11
+ OpportunityActions["SET_CUSTOMER"] = "set_customer";
12
+ OpportunityActions["SET_DOCUMENTS"] = "set_documents";
13
+ OpportunityActions["SET_INTEREST"] = "set_interest";
14
+ OpportunityActions["SET_METADATA"] = "set_metadata";
15
+ OpportunityActions["SET_VEHICLE"] = "set_vehicle";
16
+ OpportunityActions["ADD_ACTIVITY"] = "add_activity";
17
+ OpportunityActions["ADD_PAYMENT"] = "add_payment";
18
+ OpportunityActions["SWITCH_VEHICLE"] = "switch_vehicle";
19
+ OpportunityActions["DELIVER_VEHICLE"] = "deliver_vehicle";
20
+ OpportunityActions["UNDO_DELIVER_VEHICLE"] = "undo_deliver_vehicle";
21
+ OpportunityActions["SET_DEAL_INFO"] = "update_deal_info";
22
+ OpportunityActions["ISSUE_INVOICE"] = "issue_invoice";
23
+ })(OpportunityActions || (OpportunityActions = {}));
24
+ export var OpportunityPaymentStatus;
25
+ (function (OpportunityPaymentStatus) {
26
+ OpportunityPaymentStatus["PARTIAL_PAYMENT"] = "partial_payment";
27
+ OpportunityPaymentStatus["FULL_PAYMENT"] = "full_payment";
28
+ OpportunityPaymentStatus["NO_PAYMENT"] = "no_payment";
29
+ })(OpportunityPaymentStatus || (OpportunityPaymentStatus = {}));
30
+ export var OpportunityStatus;
31
+ (function (OpportunityStatus) {
32
+ OpportunityStatus["PROSPECTION"] = "prospection";
33
+ OpportunityStatus["DISCOVERY"] = "discovery";
34
+ OpportunityStatus["EVALUATION"] = "evaluation";
35
+ OpportunityStatus["REVIEW"] = "review";
36
+ OpportunityStatus["PREPARATION"] = "preparation";
37
+ OpportunityStatus["DELIVERY"] = "delivery";
38
+ })(OpportunityStatus || (OpportunityStatus = {}));
39
+ export const OpportunityStatusOrder = [
40
+ OpportunityStatus.PROSPECTION,
41
+ OpportunityStatus.DISCOVERY,
42
+ OpportunityStatus.EVALUATION,
43
+ OpportunityStatus.REVIEW,
44
+ OpportunityStatus.PREPARATION,
45
+ OpportunityStatus.DELIVERY,
46
+ ];
47
+ export var OpportunityRequirementsCode;
48
+ (function (OpportunityRequirementsCode) {
49
+ OpportunityRequirementsCode["VEHICLE_AT_ORIGIN"] = "vehicle_at_origin";
50
+ OpportunityRequirementsCode["LEASING_SL_ACTION"] = "sl_action";
51
+ OpportunityRequirementsCode["TECHNICAL_NOTES_CHANGED"] = "technical_notes_changed";
52
+ })(OpportunityRequirementsCode || (OpportunityRequirementsCode = {}));
53
+ export var OpportunityWarningsCode;
54
+ (function (OpportunityWarningsCode) {
55
+ OpportunityWarningsCode["QUOTE_PENDING_VALIDATION"] = "quote_pending_validation";
56
+ OpportunityWarningsCode["QUOTE_PEDING_MANAGER_APPROVAL"] = "quote_pending_manager_approval";
57
+ OpportunityWarningsCode["CONCURRENT_OPPORTUNITIES"] = "concurrent_opportunities";
58
+ OpportunityWarningsCode["VEHICLE_RESERVED"] = "vehicle_reserved";
59
+ OpportunityWarningsCode["OPPORTUNITY_NEEDS_SWITCH_VEHICLE"] = "opportunity_needs_switch_vehicle";
60
+ OpportunityWarningsCode["VEHICLE_RESERVED_DATE_INFO"] = "vehicle_reserved_date_info";
61
+ OpportunityWarningsCode["VEHICLE_RESERVED_INDEFINITELY"] = "vehicle_reserved_indefinitely";
62
+ OpportunityWarningsCode["QUOTE_MISSING_DELIVERY_DETAILS"] = "quote_missing_delivery_details";
63
+ OpportunityWarningsCode["VEHICLE_TECHNICAL_DETAILS_CHANGED"] = "vehicle_technical_details_changed";
64
+ OpportunityWarningsCode["QUOTE_MISSING_FINANCING_DETAILS"] = "quote_missing_financing_details";
65
+ })(OpportunityWarningsCode || (OpportunityWarningsCode = {}));
66
+ export const OpportunityWonColumnId = 'closed_won';
67
+ export const OpportunityKanbanColumns = [...OpportunityStatusOrder, OpportunityWonColumnId];
68
+ export const OpportunityKanbanEndColumns = [OpportunityWonColumnId];
69
+ export var OpportunityLostReasonValues;
70
+ (function (OpportunityLostReasonValues) {
71
+ OpportunityLostReasonValues["Expensive"] = "expensive";
72
+ OpportunityLostReasonValues["AlreadySold"] = "already_sold";
73
+ OpportunityLostReasonValues["BadExperience"] = "bad_experience";
74
+ OpportunityLostReasonValues["IncorrectVehicleCondition"] = "incorrect_vehicle_condition";
75
+ OpportunityLostReasonValues["NoStock"] = "not_enough_stock";
76
+ OpportunityLostReasonValues["SlowDelivery"] = "slow_delivery";
77
+ OpportunityLostReasonValues["HighDeposit"] = "deposit_too_high";
78
+ OpportunityLostReasonValues["NoAnswer"] = "client_not_answered";
79
+ OpportunityLostReasonValues["Automatic"] = "automatic";
80
+ })(OpportunityLostReasonValues || (OpportunityLostReasonValues = {}));
81
+ export var VehicleSaleDealStatus;
82
+ (function (VehicleSaleDealStatus) {
83
+ VehicleSaleDealStatus["SaleAgreed"] = "SALE_AGREED";
84
+ VehicleSaleDealStatus["FirstPaymentReceived"] = "FIRST_PAYMENT_RECEIVED";
85
+ VehicleSaleDealStatus["FullPaymentReceived"] = "FULL_PAYMENT_RECEIVED";
86
+ })(VehicleSaleDealStatus || (VehicleSaleDealStatus = {}));
87
+ export var VehicleSaleLogisticsStatus;
88
+ (function (VehicleSaleLogisticsStatus) {
89
+ VehicleSaleLogisticsStatus["AtOrigin"] = "AT_ORIGIN";
90
+ VehicleSaleLogisticsStatus["Delivered"] = "DELIVERED";
91
+ })(VehicleSaleLogisticsStatus || (VehicleSaleLogisticsStatus = {}));
92
+ export const QUOTE_NEEDS_VALIDATION_NOTIFICATION_ORIGIN = 'quote-validation';
93
+ export const QUOTE_NOT_CREATED_BY_ACCOUNT_MANAGER = 'quote-not-created-by-account-manager';
94
+ export const QUOTE_VALIDATOR_FEEDBACK_NOTIFICATION_ORIGIN = 'quote-validation-feedback';
95
+ export const OPPORTUNITY_VEHICLE_AVAILABLE_NOTIFICATION_ORIGIN = 'opportunity-vehicle-available';
96
+ export const OPPORTUNITY_VEHICLE_DELIVERY_NOTIFICATION_ORIGIN = 'opportunity-vehicle-delivery';
97
+ export const OPPORTUNITY_VEHICLE_RESERVATION_ABOUT_TO_EXPIRE_NOTIFICATION_ORIGIN = 'opportunity-vehicle-reservation-to-expire';
98
+ export const OPPORTUNITY_VEHICLE_RESERVATION_EXPIRED_NOTIFICATION_ORIGIN = 'opportunity-vehicle-reservation-expired';
99
+ export const OFFER_SET_FINAL_VALUATION_ORIGIN = 'offer-set-final-valuation';
100
+ export const VEHICLE_PRICE_DECREASES_NOTIFICATION_ORIGIN = 'vehicle-price-decreased';
101
+ export const VEHICLE_ARRIVED_NOTIFICATION_ORIGIN = 'vehicle-arrived';
102
+ export const VEHICLE_CHECKEDIN_NOTIFICATION_ORIGIN = 'vehicle-checkedin';
103
+ export const VEHICLE_PURCHASED_NOTIFICATION_ORIGIN = 'vehicle-purchased';
104
+ export const VEHICLE_PRICE_CHANGED_NOTIFICATION_ORIGIN = 'vehicle-price-changed';
105
+ export const VEHICLE_SOLD_NOTIFICATION_ORIGIN = 'vehicle-sold';
106
+ //# sourceMappingURL=opportunities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opportunities.js","sourceRoot":"","sources":["opportunities.ts"],"names":[],"mappings":"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"}
@@ -9,6 +9,7 @@ import { Quote, QuoteStatus } from './quotes.js';
9
9
  import { OpportunityReservation } from './reservations.js';
10
10
  import { BaseSearchRequest } from './search.js';
11
11
  import { DataRecord, ReferenceData } from './utils.js';
12
+ import { Transport } from './transports.js';
12
13
  import { Vehicle } from './vehicles.js';
13
14
 
14
15
  export type ListOpportunitiesFilters = {
@@ -270,6 +271,7 @@ export type OpportunityBFF = {
270
271
  contact: DataRecord<Contact, ContactMetdata>;
271
272
  org?: DataRecord<Organization>;
272
273
  };
274
+ transport?: Transport;
273
275
  };
274
276
 
275
277
  type BaseOpportunityEvent = BaseEvent & {
@@ -0,0 +1,7 @@
1
+ export var PaymentActions;
2
+ (function (PaymentActions) {
3
+ PaymentActions["DELETE"] = "delete";
4
+ PaymentActions["EDIT"] = "edit";
5
+ })(PaymentActions || (PaymentActions = {}));
6
+ export const PAYMENT_NOTIFICATION_ORIGIN = 'payment-notification';
7
+ //# sourceMappingURL=payments.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payments.js","sourceRoot":"","sources":["payments.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,+BAAa,CAAA;AACf,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAED,MAAM,CAAC,MAAM,2BAA2B,GAAG,sBAAsB,CAAC"}
@@ -0,0 +1,42 @@
1
+ export var QuoteActions;
2
+ (function (QuoteActions) {
3
+ QuoteActions["ACCEPT"] = "accept";
4
+ QuoteActions["VALIDATE"] = "validate";
5
+ QuoteActions["DONWLOAD_PDFS"] = "download-pdfs";
6
+ QuoteActions["CANCEL"] = "cancel";
7
+ })(QuoteActions || (QuoteActions = {}));
8
+ export var QuoteStatus;
9
+ (function (QuoteStatus) {
10
+ QuoteStatus["CREATED"] = "created";
11
+ QuoteStatus["VALIDATED"] = "validated";
12
+ QuoteStatus["INVALIDATED"] = "invalidated";
13
+ QuoteStatus["ACCEPTED"] = "accepted";
14
+ QuoteStatus["REJECTED"] = "rejected";
15
+ QuoteStatus["CANCELLED"] = "cancelled";
16
+ QuoteStatus["MANAGER_REJECTED"] = "managerRejected";
17
+ QuoteStatus["MANAGER_ACCEPTED"] = "managerAccepted";
18
+ })(QuoteStatus || (QuoteStatus = {}));
19
+ export var QuoteMetricsScore;
20
+ (function (QuoteMetricsScore) {
21
+ QuoteMetricsScore["DANGER"] = "danger";
22
+ QuoteMetricsScore["NEUTRAL"] = "neutral";
23
+ QuoteMetricsScore["GOOD"] = "good";
24
+ })(QuoteMetricsScore || (QuoteMetricsScore = {}));
25
+ export var DeliveryTypes;
26
+ (function (DeliveryTypes) {
27
+ DeliveryTypes["PICK_UP"] = "pickUp";
28
+ DeliveryTypes["ADDRESS"] = "address";
29
+ DeliveryTypes["PORT"] = "port";
30
+ })(DeliveryTypes || (DeliveryTypes = {}));
31
+ export var SpoilerInfo;
32
+ (function (SpoilerInfo) {
33
+ SpoilerInfo["MOUNT"] = "mount";
34
+ SpoilerInfo["UNMOUNT"] = "unmount";
35
+ SpoilerInfo["NO_ACTION"] = "noAction";
36
+ })(SpoilerInfo || (SpoilerInfo = {}));
37
+ export var TransportationMode;
38
+ (function (TransportationMode) {
39
+ TransportationMode["BY_ROAD"] = "byRoad";
40
+ TransportationMode["ON_LOW_BED"] = "onLowBed";
41
+ })(TransportationMode || (TransportationMode = {}));
42
+ //# sourceMappingURL=quotes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quotes.js","sourceRoot":"","sources":["quotes.ts"],"names":[],"mappings":"AAYA,MAAM,CAAN,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,+CAA+B,CAAA;IAC/B,iCAAiB,CAAA;AACnB,CAAC,EALW,YAAY,KAAZ,YAAY,QAKvB;AAED,MAAM,CAAN,IAAY,WASX;AATD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,sCAAuB,CAAA;IACvB,0CAA2B,CAAA;IAC3B,oCAAqB,CAAA;IACrB,oCAAqB,CAAA;IACrB,sCAAuB,CAAA;IACvB,mDAAoC,CAAA;IACpC,mDAAoC,CAAA;AACtC,CAAC,EATW,WAAW,KAAX,WAAW,QAStB;AAED,MAAM,CAAN,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,wCAAmB,CAAA;IACnB,kCAAa,CAAA;AACf,CAAC,EAJW,iBAAiB,KAAjB,iBAAiB,QAI5B;AACD,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,mCAAkB,CAAA;IAClB,oCAAmB,CAAA;IACnB,8BAAa,CAAA;AACf,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB;AAED,MAAM,CAAN,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,8BAAe,CAAA;IACf,kCAAmB,CAAA;IACnB,qCAAsB,CAAA;AACxB,CAAC,EAJW,WAAW,KAAX,WAAW,QAItB;AAED,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,wCAAkB,CAAA;IAClB,6CAAuB,CAAA;AACzB,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B"}
@@ -0,0 +1,5 @@
1
+ export var ReservationActions;
2
+ (function (ReservationActions) {
3
+ ReservationActions["SET_RESERVATION_EXPIRE"] = "update_expires_at";
4
+ })(ReservationActions || (ReservationActions = {}));
5
+ //# sourceMappingURL=reservations.js.map
@@ -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,2 @@
1
+ export * from '@bisondesk/commons-sdk/search';
2
+ //# sourceMappingURL=search.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.js","sourceRoot":"","sources":["search.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
@@ -0,0 +1,20 @@
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["Insights"] = "insights";
10
+ TenantModule["Opportunities"] = "opportunities";
11
+ TenantModule["Offers"] = "offers";
12
+ TenantModule["VehiclesMasterData"] = "vehicles_master_data";
13
+ TenantModule["Vehicles"] = "vehicles";
14
+ TenantModule["Tasks"] = "tasks";
15
+ TenantModule["TrackAndTrace"] = "track_and_trace";
16
+ TenantModule["Bootstrap"] = "bootstrap";
17
+ TenantModule["WhatsappNotifications"] = "whatsapp_notifications";
18
+ TenantModule["Hexon"] = "hexon";
19
+ })(TenantModule || (TenantModule = {}));
20
+ //# sourceMappingURL=tenants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tenants.js","sourceRoot":"","sources":["tenants.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAN,IAAY,YAiBX;AAjBD,WAAY,YAAY;IACtB,iDAAiC,CAAA;IACjC,2BAAW,CAAA;IACX,2BAAW,CAAA;IACX,6BAAa,CAAA;IACb,+BAAe,CAAA;IACf,mCAAmB,CAAA;IACnB,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,EAjBW,YAAY,KAAZ,YAAY,QAiBvB"}