@bisondesk/core-sdk 1.0.417 → 1.0.418
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/vehicles.d.ts +2 -1
- package/lib/apis/vehicles.d.ts.map +1 -1
- package/lib/apis/vehicles.js.map +1 -1
- package/lib/types/marketing.d.ts +66 -0
- package/lib/types/marketing.d.ts.map +1 -1
- package/lib/types/marketing.js +14 -0
- package/lib/types/marketing.js.map +1 -1
- package/lib/types/tenants.d.ts +2 -1
- package/lib/types/tenants.d.ts.map +1 -1
- package/lib/types/tenants.js +1 -0
- package/lib/types/tenants.js.map +1 -1
- package/lib/types/vehicles.d.ts +5 -23
- package/lib/types/vehicles.d.ts.map +1 -1
- package/lib/types/vehicles.js +0 -2
- package/lib/types/vehicles.js.map +1 -1
- package/package.json +1 -1
- package/src/apis/vehicles.ts +2 -1
- package/src/types/marketing.ts +74 -0
- package/src/types/tenants.ts +1 -0
- package/src/types/vehicles.ts +3 -24
- package/tsconfig.tsbuildinfo +1 -1
package/src/types/marketing.ts
CHANGED
|
@@ -1,5 +1,79 @@
|
|
|
1
|
+
import { AttachmentValue, MultiLangValue, NextRequest } from '@bisondesk/commons-sdk/types';
|
|
1
2
|
import { PartnerLevel } from './crm.js';
|
|
2
3
|
|
|
4
|
+
export enum MarketingPlatform {
|
|
5
|
+
autoscout24 = 'autoscout24',
|
|
6
|
+
autoline = 'autoline',
|
|
7
|
+
daftrucklocator = 'daftrucklocator',
|
|
8
|
+
mobile = 'mobile',
|
|
9
|
+
otomoto = 'otomoto',
|
|
10
|
+
truck1st = 'truck1st',
|
|
11
|
+
trucks = 'trucks',
|
|
12
|
+
truckscout = 'truckscout24',
|
|
13
|
+
tweedehandsbe = '2dehandsbe',
|
|
14
|
+
viamobilis = 'viamobilis',
|
|
15
|
+
youtube = 'youtube',
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type VehicleMarketing = {
|
|
19
|
+
titles: MultiLangValue;
|
|
20
|
+
remarks?: MultiLangValue;
|
|
21
|
+
marketingPlatforms: string[];
|
|
22
|
+
videos: AttachmentValue[];
|
|
23
|
+
publishedOnWebsiteAt?: string;
|
|
24
|
+
|
|
25
|
+
edited?: {
|
|
26
|
+
marketingPlatforms?: boolean;
|
|
27
|
+
remarks?: boolean;
|
|
28
|
+
titles?: boolean;
|
|
29
|
+
videos?: boolean;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export type VehicleMarketingDataEvent = {
|
|
34
|
+
actionAt: string;
|
|
35
|
+
data: VehicleMarketing;
|
|
36
|
+
previousData?: VehicleMarketing;
|
|
37
|
+
tenantId: string;
|
|
38
|
+
userId: string;
|
|
39
|
+
vehicleId: string;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export type NewVehicleAd = {
|
|
43
|
+
vehicleId: string;
|
|
44
|
+
platform: MarketingPlatform;
|
|
45
|
+
stockNumber: string;
|
|
46
|
+
|
|
47
|
+
scheduledStart: string; // when its supposed to start
|
|
48
|
+
scheduledEnd?: string; // when its supposed to end
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export type VehicleAd = NewVehicleAd & {
|
|
52
|
+
id: string;
|
|
53
|
+
|
|
54
|
+
createdAt: string;
|
|
55
|
+
createdBy: string;
|
|
56
|
+
status: 'enabled' | 'suspended';
|
|
57
|
+
|
|
58
|
+
modifiedAt?: string;
|
|
59
|
+
modifiedBy?: string;
|
|
60
|
+
|
|
61
|
+
startedAt?: string; // when it actually started
|
|
62
|
+
endedAt?: string; // when it actually ended
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export type VehicleAdListRequest = NextRequest & {
|
|
66
|
+
listEnded?: boolean;
|
|
67
|
+
userModified?: boolean;
|
|
68
|
+
platform?: MarketingPlatform;
|
|
69
|
+
vehicleId?: string;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export type VehicleMarketingStats = {
|
|
73
|
+
active: { [platform in MarketingPlatform]?: number };
|
|
74
|
+
manual: { [platform in MarketingPlatform]?: number };
|
|
75
|
+
};
|
|
76
|
+
|
|
3
77
|
export enum MarketingEventStatus {
|
|
4
78
|
Scheduled = 'scheduled',
|
|
5
79
|
Processing = 'processing',
|
package/src/types/tenants.ts
CHANGED
package/src/types/vehicles.ts
CHANGED
|
@@ -2,7 +2,6 @@ import {
|
|
|
2
2
|
AttachmentValue,
|
|
3
3
|
Document,
|
|
4
4
|
LocationValue,
|
|
5
|
-
MultiLangValue,
|
|
6
5
|
SearchPermissions,
|
|
7
6
|
ShareEmailRequest,
|
|
8
7
|
ShareWhatsappRequest,
|
|
@@ -17,8 +16,6 @@ export enum VehicleRoles {
|
|
|
17
16
|
RENTAL = 'RENTAL',
|
|
18
17
|
BUILD = 'BUILD',
|
|
19
18
|
UNKNOWN = 'UNKNOWN',
|
|
20
|
-
MARKETING = 'MARKETING',
|
|
21
|
-
PURCHASE_EVALUATION = 'PURCHASE_EVALUATION',
|
|
22
19
|
}
|
|
23
20
|
|
|
24
21
|
export enum VehicleFuelType {
|
|
@@ -55,6 +52,7 @@ type BaseVehicleEvent = {
|
|
|
55
52
|
actionAt: string;
|
|
56
53
|
userId: string;
|
|
57
54
|
tenantId: string;
|
|
55
|
+
sold?: boolean;
|
|
58
56
|
};
|
|
59
57
|
|
|
60
58
|
type VehicleSuperstructure = {
|
|
@@ -173,6 +171,7 @@ export type VehicleUpdateEvent = BaseVehicleEvent & {
|
|
|
173
171
|
action: 'update';
|
|
174
172
|
vehicle: Vehicle;
|
|
175
173
|
previousVehicle: Vehicle;
|
|
174
|
+
sold?: boolean;
|
|
176
175
|
};
|
|
177
176
|
|
|
178
177
|
export type VehicleDeleteEvent = BaseVehicleEvent & {
|
|
@@ -183,14 +182,6 @@ export type VehicleDeleteEvent = BaseVehicleEvent & {
|
|
|
183
182
|
|
|
184
183
|
export type VehicleEvent = VehicleCreateEvent | VehicleUpdateEvent | VehicleDeleteEvent;
|
|
185
184
|
|
|
186
|
-
export type VehicleMarketingEvent = {
|
|
187
|
-
actionAt: string;
|
|
188
|
-
data: VehicleMarketing;
|
|
189
|
-
tenantId: string;
|
|
190
|
-
userId: string;
|
|
191
|
-
vehicleId: string;
|
|
192
|
-
};
|
|
193
|
-
|
|
194
185
|
type BaseVehiclePurchaseEvent = {
|
|
195
186
|
actionAt: string;
|
|
196
187
|
userId: string;
|
|
@@ -240,6 +231,7 @@ export type SearchVehicle = {
|
|
|
240
231
|
isReserved: boolean;
|
|
241
232
|
hasPayments: boolean;
|
|
242
233
|
isTrending: boolean;
|
|
234
|
+
publishedOnWebsiteAt?: string;
|
|
243
235
|
};
|
|
244
236
|
customSortableFields: {
|
|
245
237
|
priceChangedAt?: string;
|
|
@@ -560,19 +552,6 @@ export type VehicleAxle = {
|
|
|
560
552
|
tyreSize?: string;
|
|
561
553
|
};
|
|
562
554
|
|
|
563
|
-
export type VehicleMarketing = {
|
|
564
|
-
titles: MultiLangValue;
|
|
565
|
-
remarks?: MultiLangValue;
|
|
566
|
-
marketingPlatforms: string[];
|
|
567
|
-
videos: AttachmentValue[];
|
|
568
|
-
overrides?: {
|
|
569
|
-
marketingPlatforms?: boolean;
|
|
570
|
-
remarks?: boolean;
|
|
571
|
-
titles?: boolean;
|
|
572
|
-
videos?: boolean;
|
|
573
|
-
};
|
|
574
|
-
};
|
|
575
|
-
|
|
576
555
|
export enum VehiclePurchaseDealStatus {
|
|
577
556
|
PurchaseEvaluation = 'PURCHASE_EVALUATION', // used for vehicle consignation
|
|
578
557
|
PurchaseAgreed = 'PURCHASE_AGREED',
|