@bisondesk/core-sdk 1.0.467 → 1.0.469
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 -1
- package/lib/constants.d.ts.map +1 -1
- package/lib/constants.js +1 -0
- package/lib/constants.js.map +1 -1
- 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 +2 -1
- package/lib/types/internal-events.js.map +1 -1
- package/lib/types/payments.d.ts +42 -0
- package/lib/types/payments.d.ts.map +1 -1
- package/lib/types/payments.js.map +1 -1
- package/lib/types/vehicles.d.ts +0 -16
- package/lib/types/vehicles.d.ts.map +1 -1
- package/lib/types/vehicles.js.map +1 -1
- package/package.json +2 -2
- package/src/constants.ts +1 -0
- package/src/types/internal-events.ts +2 -1
- package/src/types/payments.ts +54 -0
- package/src/types/vehicles.ts +0 -19
- package/tsconfig.tsbuildinfo +1 -1
package/src/constants.ts
CHANGED
|
@@ -14,7 +14,8 @@ export enum InternalEventTypes {
|
|
|
14
14
|
FINANCE_DOCUMENT = 'finance-documents',
|
|
15
15
|
OPPORTUNITY = 'opportunities',
|
|
16
16
|
VEHICLE = 'vehicles',
|
|
17
|
-
|
|
17
|
+
SALE_PAYMENT = 'sale-payments',
|
|
18
|
+
PURCHASE_PAYMENT = 'vehicle-purchase-payments',
|
|
18
19
|
OFFER = 'offers',
|
|
19
20
|
}
|
|
20
21
|
|
package/src/types/payments.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseEvent } from './internal-events.js';
|
|
2
|
+
import { SearchVehicle } from './vehicles.js';
|
|
2
3
|
|
|
3
4
|
export enum PaymentActions {
|
|
4
5
|
DELETE = 'delete',
|
|
@@ -75,3 +76,56 @@ export type PaymentDeleteEvent = {
|
|
|
75
76
|
|
|
76
77
|
export type PaymentEvent = BaseEvent &
|
|
77
78
|
(PaymentCreateEvent | PaymentUpdateEvent | PaymentDeleteEvent);
|
|
79
|
+
|
|
80
|
+
export type NewVehiclePurchasePayment = {
|
|
81
|
+
vehicleId: string;
|
|
82
|
+
amount: string;
|
|
83
|
+
description?: string;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export type VehiclePurchasePayment = NewVehiclePurchasePayment & {
|
|
87
|
+
id: string;
|
|
88
|
+
createdBy: string;
|
|
89
|
+
createdAt: string;
|
|
90
|
+
paidAt?: string;
|
|
91
|
+
paidBy?: string;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export type VehiclePurchasePaymentBff = {
|
|
95
|
+
payment: VehiclePurchasePayment;
|
|
96
|
+
vehicle: SearchVehicle;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export type VehiclePurchasePaymentCreateEvent = {
|
|
100
|
+
payment: VehiclePurchasePayment;
|
|
101
|
+
previousPayment?: undefined;
|
|
102
|
+
action: 'create';
|
|
103
|
+
actionAt: string;
|
|
104
|
+
userId: string;
|
|
105
|
+
tenantId: string;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export type VehiclePurchasePaymentUpdateEvent = {
|
|
109
|
+
payment: VehiclePurchasePayment;
|
|
110
|
+
previousPayment: VehiclePurchasePayment;
|
|
111
|
+
action: 'update';
|
|
112
|
+
actionAt: string;
|
|
113
|
+
userId: string;
|
|
114
|
+
tenantId: string;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
export type VehiclePurchasePaymentDeleteEvent = {
|
|
118
|
+
payment?: undefined;
|
|
119
|
+
previousPayment: VehiclePurchasePayment;
|
|
120
|
+
action: 'delete';
|
|
121
|
+
actionAt: string;
|
|
122
|
+
userId: string;
|
|
123
|
+
tenantId: string;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
export type VehiclePurchasePaymentEvent = BaseEvent &
|
|
127
|
+
(
|
|
128
|
+
| VehiclePurchasePaymentCreateEvent
|
|
129
|
+
| VehiclePurchasePaymentUpdateEvent
|
|
130
|
+
| VehiclePurchasePaymentDeleteEvent
|
|
131
|
+
);
|
package/src/types/vehicles.ts
CHANGED
|
@@ -714,25 +714,6 @@ export type VehiclePurchase = {
|
|
|
714
714
|
};
|
|
715
715
|
};
|
|
716
716
|
|
|
717
|
-
export type NewVehiclePurchasePayment = {
|
|
718
|
-
vehicleId: string;
|
|
719
|
-
amount: string;
|
|
720
|
-
description?: string;
|
|
721
|
-
};
|
|
722
|
-
|
|
723
|
-
export type VehiclePurchasePayment = NewVehiclePurchasePayment & {
|
|
724
|
-
id: string;
|
|
725
|
-
createdBy: string;
|
|
726
|
-
createdAt: string;
|
|
727
|
-
paidAt?: string;
|
|
728
|
-
paidBy?: string;
|
|
729
|
-
};
|
|
730
|
-
|
|
731
|
-
export type VehiclePurchasePaymentBff = {
|
|
732
|
-
payment: VehiclePurchasePayment;
|
|
733
|
-
vehicle: SearchVehicle;
|
|
734
|
-
};
|
|
735
|
-
|
|
736
717
|
export enum VehicleActions {
|
|
737
718
|
EditAdminDocs = 'edit_admin_docs',
|
|
738
719
|
EditEngineeringDocs = 'edit_engineering_docs',
|