@mydoormot/app-types 1.7.21 → 1.7.23
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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +12 -0
- package/dist/index.cjs +7 -19
- package/dist/index.d.cts +9 -29
- package/dist/index.d.ts +9 -29
- package/dist/index.js +6 -17
- package/package.json +1 -1
- package/src/rider.ts +16 -36
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @mydoormot/app-types@1.7.
|
|
2
|
+
> @mydoormot/app-types@1.7.22 build /Users/chuksben/Desktop/projects/microservices/mydoormot/packages/app-types
|
|
3
3
|
> tsup src/index.ts --format esm,cjs --dts
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
[34mESM[39m Build start
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
11
|
[34mDTS[39m Build start
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
17
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m22.
|
|
18
|
-
[32mDTS[39m [1mdist/index.d.cts [22m[32m22.
|
|
12
|
+
[32mESM[39m [1mdist/index.js [22m[32m6.97 KB[39m
|
|
13
|
+
[32mESM[39m ⚡️ Build success in 412ms
|
|
14
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m8.78 KB[39m
|
|
15
|
+
[32mCJS[39m ⚡️ Build success in 413ms
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 907ms
|
|
17
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m22.43 KB[39m
|
|
18
|
+
[32mDTS[39m [1mdist/index.d.cts [22m[32m22.43 KB[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -34,11 +34,10 @@ __export(src_exports, {
|
|
|
34
34
|
MembershipStatus: () => MembershipStatus,
|
|
35
35
|
NotificationType: () => NotificationType,
|
|
36
36
|
ParcelSize: () => ParcelSize,
|
|
37
|
-
PaymentMethod: () => PaymentMethod,
|
|
38
37
|
PaymentOptions: () => PaymentOptions,
|
|
39
|
-
RemittanceMethod: () => RemittanceMethod,
|
|
40
38
|
RemittanceStatus: () => RemittanceStatus,
|
|
41
39
|
RoleType: () => RoleType,
|
|
40
|
+
SettlementType: () => SettlementType,
|
|
42
41
|
TraccarDeviceStatus: () => TraccarDeviceStatus,
|
|
43
42
|
VehicleLogType: () => VehicleLogType,
|
|
44
43
|
VehicleType: () => VehicleType,
|
|
@@ -181,24 +180,14 @@ var VehicleLogType = /* @__PURE__ */ ((VehicleLogType2) => {
|
|
|
181
180
|
var RemittanceStatus = /* @__PURE__ */ ((RemittanceStatus2) => {
|
|
182
181
|
RemittanceStatus2["Pending"] = "pending";
|
|
183
182
|
RemittanceStatus2["Remitted"] = "remitted";
|
|
184
|
-
RemittanceStatus2["Waived"] = "waived";
|
|
185
183
|
RemittanceStatus2["Cancelled"] = "cancelled";
|
|
186
184
|
return RemittanceStatus2;
|
|
187
185
|
})(RemittanceStatus || {});
|
|
188
|
-
var
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
return RemittanceMethod2;
|
|
194
|
-
})(RemittanceMethod || {});
|
|
195
|
-
var PaymentMethod = /* @__PURE__ */ ((PaymentMethod2) => {
|
|
196
|
-
PaymentMethod2["CashOnDelivery"] = "cash_on_delivery";
|
|
197
|
-
PaymentMethod2["PrepaidOnline"] = "prepaid_online";
|
|
198
|
-
PaymentMethod2["PrepaidTransfer"] = "prepaid_transfer";
|
|
199
|
-
PaymentMethod2["BusinessInvoice"] = "business_invoice";
|
|
200
|
-
return PaymentMethod2;
|
|
201
|
-
})(PaymentMethod || {});
|
|
186
|
+
var SettlementType = /* @__PURE__ */ ((SettlementType2) => {
|
|
187
|
+
SettlementType2["DeliveryFee"] = "delivery_fee";
|
|
188
|
+
SettlementType2["Additional"] = "additional";
|
|
189
|
+
return SettlementType2;
|
|
190
|
+
})(SettlementType || {});
|
|
202
191
|
|
|
203
192
|
// src/enterprise.ts
|
|
204
193
|
var EnterpriseType = /* @__PURE__ */ ((EnterpriseType2) => {
|
|
@@ -255,11 +244,10 @@ var LinkDestination = /* @__PURE__ */ ((LinkDestination2) => {
|
|
|
255
244
|
MembershipStatus,
|
|
256
245
|
NotificationType,
|
|
257
246
|
ParcelSize,
|
|
258
|
-
PaymentMethod,
|
|
259
247
|
PaymentOptions,
|
|
260
|
-
RemittanceMethod,
|
|
261
248
|
RemittanceStatus,
|
|
262
249
|
RoleType,
|
|
250
|
+
SettlementType,
|
|
263
251
|
TraccarDeviceStatus,
|
|
264
252
|
VehicleLogType,
|
|
265
253
|
VehicleType,
|
package/dist/index.d.cts
CHANGED
|
@@ -246,45 +246,21 @@ type VehicleLogWithErrands = VehicleLog & {
|
|
|
246
246
|
declare enum RemittanceStatus {
|
|
247
247
|
Pending = "pending",
|
|
248
248
|
Remitted = "remitted",
|
|
249
|
-
Waived = "waived",
|
|
250
249
|
Cancelled = "cancelled"
|
|
251
250
|
}
|
|
252
|
-
declare enum RemittanceMethod {
|
|
253
|
-
Cash = "cash",
|
|
254
|
-
Transfer = "transfer",
|
|
255
|
-
Deduction = "deduction",
|
|
256
|
-
Other = "other"
|
|
257
|
-
}
|
|
258
|
-
declare enum PaymentMethod {
|
|
259
|
-
CashOnDelivery = "cash_on_delivery",
|
|
260
|
-
PrepaidOnline = "prepaid_online",
|
|
261
|
-
PrepaidTransfer = "prepaid_transfer",
|
|
262
|
-
BusinessInvoice = "business_invoice"
|
|
263
|
-
}
|
|
264
|
-
interface AdditionalFee {
|
|
265
|
-
description: string;
|
|
266
|
-
amount: number;
|
|
267
|
-
createdAt?: Date;
|
|
268
|
-
createdBy?: string;
|
|
269
|
-
}
|
|
270
251
|
interface RiderSettlement {
|
|
271
252
|
id: string;
|
|
272
253
|
errandId: string;
|
|
273
254
|
riderId: string;
|
|
274
255
|
businessId: string;
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
additionalFees: AdditionalFee[];
|
|
256
|
+
deliveryFee: number;
|
|
257
|
+
additionalAmount: number;
|
|
278
258
|
totalCollectionAmount: number;
|
|
279
|
-
collectionRequired: boolean;
|
|
280
|
-
remittanceStatus: RemittanceStatus;
|
|
281
259
|
remittedAmount: number;
|
|
260
|
+
remittanceStatus: RemittanceStatus | `${RemittanceStatus}`;
|
|
282
261
|
remittedAt?: Date;
|
|
283
262
|
remittedBy?: string;
|
|
284
|
-
|
|
285
|
-
remittanceReference?: string;
|
|
286
|
-
paymentMethod?: PaymentMethod;
|
|
287
|
-
isPrePaid: boolean;
|
|
263
|
+
description?: string;
|
|
288
264
|
notes?: string;
|
|
289
265
|
createdAt: Date;
|
|
290
266
|
updatedAt: Date;
|
|
@@ -311,6 +287,10 @@ interface RiderPerformanceStats {
|
|
|
311
287
|
riders: RiderPerformanceItem[];
|
|
312
288
|
timeSeries?: RiderPerformanceTimeSeries[];
|
|
313
289
|
}
|
|
290
|
+
declare enum SettlementType {
|
|
291
|
+
DeliveryFee = "delivery_fee",
|
|
292
|
+
Additional = "additional"
|
|
293
|
+
}
|
|
314
294
|
|
|
315
295
|
declare enum ErrandStatus {
|
|
316
296
|
Pending = "pending",
|
|
@@ -910,4 +890,4 @@ declare enum LinkDestination {
|
|
|
910
890
|
}
|
|
911
891
|
type NullOrUndefined = null | undefined;
|
|
912
892
|
|
|
913
|
-
export { type
|
|
893
|
+
export { type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, type BusinessCategory, type BusinessMember, type BusinessPg, BusinessRole, type City, type Coupon, type Customer, type CustomerTransactionStats, DeliveryStatus, type Enterprise, type EnterpriseCategoryDoc, type EnterpriseSubCategoryDoc, EnterpriseType, type Errand, type ErrandDeliveryTiming, type ErrandPackagingQuality, type ErrandRating, type ErrandReview, type ErrandReviewLink, type ErrandRiderBehavior, ErrandStatus, type ErrandTimeline, GlobalRoles, type Invoice, InvoiceGenerationType, type InvoiceItem, InvoiceItemType, InvoiceStatus, type LatLng, LinkDestination, type MaintenanceItem, type MaintenancePartUsage, type MaintenanceRecord, type MaintenanceStats, type MaintenanceStatsSummary, type MaintenanceTopItem, MembershipStatus, type Notification, type NotificationData, NotificationType, type NullOrUndefined, type PaginateResult, ParcelSize, PaymentOptions, type PendingErrand, RemittanceStatus, type Rider, type RiderPerformanceItem, type RiderPerformanceStats, type RiderPerformanceSummary, type RiderPerformanceTimeSeries, type RiderSettlement, RoleType, SettlementType, type State, type TraccarDevice, TraccarDeviceStatus, type TraccarPosition, type TrackerDevice, type Transaction, type TransactionCategory, type TransactionItem, type TransactionType, type TransactionWithCategory, type TransactionWithJoin, type User, type UserAddress, type Vehicle, type VehicleLog, type VehicleLogStatsSummary, VehicleLogType, type VehicleLogWithErrands, VehicleType, type VehicleWithRider, type Vendor, errandTimeline };
|
package/dist/index.d.ts
CHANGED
|
@@ -246,45 +246,21 @@ type VehicleLogWithErrands = VehicleLog & {
|
|
|
246
246
|
declare enum RemittanceStatus {
|
|
247
247
|
Pending = "pending",
|
|
248
248
|
Remitted = "remitted",
|
|
249
|
-
Waived = "waived",
|
|
250
249
|
Cancelled = "cancelled"
|
|
251
250
|
}
|
|
252
|
-
declare enum RemittanceMethod {
|
|
253
|
-
Cash = "cash",
|
|
254
|
-
Transfer = "transfer",
|
|
255
|
-
Deduction = "deduction",
|
|
256
|
-
Other = "other"
|
|
257
|
-
}
|
|
258
|
-
declare enum PaymentMethod {
|
|
259
|
-
CashOnDelivery = "cash_on_delivery",
|
|
260
|
-
PrepaidOnline = "prepaid_online",
|
|
261
|
-
PrepaidTransfer = "prepaid_transfer",
|
|
262
|
-
BusinessInvoice = "business_invoice"
|
|
263
|
-
}
|
|
264
|
-
interface AdditionalFee {
|
|
265
|
-
description: string;
|
|
266
|
-
amount: number;
|
|
267
|
-
createdAt?: Date;
|
|
268
|
-
createdBy?: string;
|
|
269
|
-
}
|
|
270
251
|
interface RiderSettlement {
|
|
271
252
|
id: string;
|
|
272
253
|
errandId: string;
|
|
273
254
|
riderId: string;
|
|
274
255
|
businessId: string;
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
additionalFees: AdditionalFee[];
|
|
256
|
+
deliveryFee: number;
|
|
257
|
+
additionalAmount: number;
|
|
278
258
|
totalCollectionAmount: number;
|
|
279
|
-
collectionRequired: boolean;
|
|
280
|
-
remittanceStatus: RemittanceStatus;
|
|
281
259
|
remittedAmount: number;
|
|
260
|
+
remittanceStatus: RemittanceStatus | `${RemittanceStatus}`;
|
|
282
261
|
remittedAt?: Date;
|
|
283
262
|
remittedBy?: string;
|
|
284
|
-
|
|
285
|
-
remittanceReference?: string;
|
|
286
|
-
paymentMethod?: PaymentMethod;
|
|
287
|
-
isPrePaid: boolean;
|
|
263
|
+
description?: string;
|
|
288
264
|
notes?: string;
|
|
289
265
|
createdAt: Date;
|
|
290
266
|
updatedAt: Date;
|
|
@@ -311,6 +287,10 @@ interface RiderPerformanceStats {
|
|
|
311
287
|
riders: RiderPerformanceItem[];
|
|
312
288
|
timeSeries?: RiderPerformanceTimeSeries[];
|
|
313
289
|
}
|
|
290
|
+
declare enum SettlementType {
|
|
291
|
+
DeliveryFee = "delivery_fee",
|
|
292
|
+
Additional = "additional"
|
|
293
|
+
}
|
|
314
294
|
|
|
315
295
|
declare enum ErrandStatus {
|
|
316
296
|
Pending = "pending",
|
|
@@ -910,4 +890,4 @@ declare enum LinkDestination {
|
|
|
910
890
|
}
|
|
911
891
|
type NullOrUndefined = null | undefined;
|
|
912
892
|
|
|
913
|
-
export { type
|
|
893
|
+
export { type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, type BusinessCategory, type BusinessMember, type BusinessPg, BusinessRole, type City, type Coupon, type Customer, type CustomerTransactionStats, DeliveryStatus, type Enterprise, type EnterpriseCategoryDoc, type EnterpriseSubCategoryDoc, EnterpriseType, type Errand, type ErrandDeliveryTiming, type ErrandPackagingQuality, type ErrandRating, type ErrandReview, type ErrandReviewLink, type ErrandRiderBehavior, ErrandStatus, type ErrandTimeline, GlobalRoles, type Invoice, InvoiceGenerationType, type InvoiceItem, InvoiceItemType, InvoiceStatus, type LatLng, LinkDestination, type MaintenanceItem, type MaintenancePartUsage, type MaintenanceRecord, type MaintenanceStats, type MaintenanceStatsSummary, type MaintenanceTopItem, MembershipStatus, type Notification, type NotificationData, NotificationType, type NullOrUndefined, type PaginateResult, ParcelSize, PaymentOptions, type PendingErrand, RemittanceStatus, type Rider, type RiderPerformanceItem, type RiderPerformanceStats, type RiderPerformanceSummary, type RiderPerformanceTimeSeries, type RiderSettlement, RoleType, SettlementType, type State, type TraccarDevice, TraccarDeviceStatus, type TraccarPosition, type TrackerDevice, type Transaction, type TransactionCategory, type TransactionItem, type TransactionType, type TransactionWithCategory, type TransactionWithJoin, type User, type UserAddress, type Vehicle, type VehicleLog, type VehicleLogStatsSummary, VehicleLogType, type VehicleLogWithErrands, VehicleType, type VehicleWithRider, type Vendor, errandTimeline };
|
package/dist/index.js
CHANGED
|
@@ -133,24 +133,14 @@ var VehicleLogType = /* @__PURE__ */ ((VehicleLogType2) => {
|
|
|
133
133
|
var RemittanceStatus = /* @__PURE__ */ ((RemittanceStatus2) => {
|
|
134
134
|
RemittanceStatus2["Pending"] = "pending";
|
|
135
135
|
RemittanceStatus2["Remitted"] = "remitted";
|
|
136
|
-
RemittanceStatus2["Waived"] = "waived";
|
|
137
136
|
RemittanceStatus2["Cancelled"] = "cancelled";
|
|
138
137
|
return RemittanceStatus2;
|
|
139
138
|
})(RemittanceStatus || {});
|
|
140
|
-
var
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
return RemittanceMethod2;
|
|
146
|
-
})(RemittanceMethod || {});
|
|
147
|
-
var PaymentMethod = /* @__PURE__ */ ((PaymentMethod2) => {
|
|
148
|
-
PaymentMethod2["CashOnDelivery"] = "cash_on_delivery";
|
|
149
|
-
PaymentMethod2["PrepaidOnline"] = "prepaid_online";
|
|
150
|
-
PaymentMethod2["PrepaidTransfer"] = "prepaid_transfer";
|
|
151
|
-
PaymentMethod2["BusinessInvoice"] = "business_invoice";
|
|
152
|
-
return PaymentMethod2;
|
|
153
|
-
})(PaymentMethod || {});
|
|
139
|
+
var SettlementType = /* @__PURE__ */ ((SettlementType2) => {
|
|
140
|
+
SettlementType2["DeliveryFee"] = "delivery_fee";
|
|
141
|
+
SettlementType2["Additional"] = "additional";
|
|
142
|
+
return SettlementType2;
|
|
143
|
+
})(SettlementType || {});
|
|
154
144
|
|
|
155
145
|
// src/enterprise.ts
|
|
156
146
|
var EnterpriseType = /* @__PURE__ */ ((EnterpriseType2) => {
|
|
@@ -206,11 +196,10 @@ export {
|
|
|
206
196
|
MembershipStatus,
|
|
207
197
|
NotificationType,
|
|
208
198
|
ParcelSize,
|
|
209
|
-
PaymentMethod,
|
|
210
199
|
PaymentOptions,
|
|
211
|
-
RemittanceMethod,
|
|
212
200
|
RemittanceStatus,
|
|
213
201
|
RoleType,
|
|
202
|
+
SettlementType,
|
|
214
203
|
TraccarDeviceStatus,
|
|
215
204
|
VehicleLogType,
|
|
216
205
|
VehicleType,
|
package/package.json
CHANGED
package/src/rider.ts
CHANGED
|
@@ -80,59 +80,34 @@ export type VehicleLogWithErrands = VehicleLog & {
|
|
|
80
80
|
totalErrandsRevenue?: number;
|
|
81
81
|
};
|
|
82
82
|
|
|
83
|
-
// export type VehicleLogWithRiderAndErrands = VehicleLogWithErrands & {
|
|
84
|
-
// riderDetails: Rider | null;
|
|
85
|
-
// riderUserDetails: User | null;
|
|
86
|
-
// };
|
|
87
|
-
|
|
88
83
|
// Rider Settlement Types
|
|
89
84
|
export enum RemittanceStatus {
|
|
90
85
|
Pending = 'pending',
|
|
91
86
|
Remitted = 'remitted',
|
|
92
|
-
Waived = 'waived',
|
|
93
87
|
Cancelled = 'cancelled',
|
|
94
88
|
}
|
|
95
89
|
|
|
96
|
-
export enum RemittanceMethod {
|
|
97
|
-
Cash = 'cash',
|
|
98
|
-
Transfer = 'transfer',
|
|
99
|
-
Deduction = 'deduction',
|
|
100
|
-
Other = 'other',
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export enum PaymentMethod {
|
|
104
|
-
CashOnDelivery = 'cash_on_delivery',
|
|
105
|
-
PrepaidOnline = 'prepaid_online',
|
|
106
|
-
PrepaidTransfer = 'prepaid_transfer',
|
|
107
|
-
BusinessInvoice = 'business_invoice',
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export interface AdditionalFee {
|
|
111
|
-
description: string;
|
|
112
|
-
amount: number;
|
|
113
|
-
createdAt?: Date;
|
|
114
|
-
createdBy?: string;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
90
|
export interface RiderSettlement {
|
|
118
91
|
id: string;
|
|
119
92
|
errandId: string;
|
|
120
93
|
riderId: string;
|
|
121
94
|
businessId: string;
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
95
|
+
|
|
96
|
+
// Money breakdown
|
|
97
|
+
deliveryFee: number;
|
|
98
|
+
additionalAmount: number;
|
|
125
99
|
totalCollectionAmount: number;
|
|
126
|
-
collectionRequired: boolean;
|
|
127
|
-
remittanceStatus: RemittanceStatus;
|
|
128
100
|
remittedAmount: number;
|
|
101
|
+
|
|
102
|
+
// Status
|
|
103
|
+
remittanceStatus: RemittanceStatus | `${RemittanceStatus}`;
|
|
129
104
|
remittedAt?: Date;
|
|
130
105
|
remittedBy?: string;
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
isPrePaid: boolean;
|
|
106
|
+
|
|
107
|
+
// Optional
|
|
108
|
+
description?: string;
|
|
135
109
|
notes?: string;
|
|
110
|
+
|
|
136
111
|
createdAt: Date;
|
|
137
112
|
updatedAt: Date;
|
|
138
113
|
version: number;
|
|
@@ -163,3 +138,8 @@ export interface RiderPerformanceStats {
|
|
|
163
138
|
riders: RiderPerformanceItem[];
|
|
164
139
|
timeSeries?: RiderPerformanceTimeSeries[];
|
|
165
140
|
}
|
|
141
|
+
|
|
142
|
+
export enum SettlementType {
|
|
143
|
+
DeliveryFee = 'delivery_fee',
|
|
144
|
+
Additional = 'additional',
|
|
145
|
+
}
|