@mydoormot/app-types 1.7.12 → 1.7.14
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 +6 -6
- package/CHANGELOG.md +12 -0
- package/dist/index.d.cts +11 -18
- package/dist/index.d.ts +11 -18
- package/package.json +1 -1
- package/src/rider.ts +15 -18
- package/src/transaction.ts +4 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @mydoormot/app-types@1.7.
|
|
2
|
+
> @mydoormot/app-types@1.7.13 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
|
[32mESM[39m [1mdist/index.js [22m[32m6.17 KB[39m
|
|
12
|
-
[32mESM[39m ⚡️ Build success in
|
|
12
|
+
[32mESM[39m ⚡️ Build success in 71ms
|
|
13
13
|
[32mCJS[39m [1mdist/index.cjs [22m[32m7.84 KB[39m
|
|
14
|
-
[32mCJS[39m ⚡️ Build success in
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 70ms
|
|
15
15
|
[34mDTS[39m Build start
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
17
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[
|
|
18
|
-
[32mDTS[39m [1mdist/index.d.cts [22m[
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 1097ms
|
|
17
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m17.80 KB[39m
|
|
18
|
+
[32mDTS[39m [1mdist/index.d.cts [22m[32m17.80 KB[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.cts
CHANGED
|
@@ -232,8 +232,6 @@ type Rider = {
|
|
|
232
232
|
rating: number;
|
|
233
233
|
version: number;
|
|
234
234
|
hasBeenRated: boolean;
|
|
235
|
-
enterprise: string | Enterprise;
|
|
236
|
-
isTracking: boolean;
|
|
237
235
|
state?: string | State;
|
|
238
236
|
currentErrand?: Errand;
|
|
239
237
|
lastDeliveredErrand?: Errand;
|
|
@@ -264,29 +262,22 @@ declare enum VehicleLogType {
|
|
|
264
262
|
}
|
|
265
263
|
type VehicleLog = {
|
|
266
264
|
id: string;
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
vehicle: string | Vehicle;
|
|
270
|
-
maintenanceType?: string;
|
|
271
|
-
maintenanceCost?: number;
|
|
265
|
+
vehicleId: string;
|
|
266
|
+
businessId: string;
|
|
272
267
|
type: VehicleLogType | `${VehicleLogType}`;
|
|
273
268
|
fuelLiters?: number;
|
|
274
269
|
fuelCost?: number;
|
|
275
270
|
note?: string;
|
|
276
271
|
createdAt: string;
|
|
277
272
|
updatedAt: string;
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
273
|
+
previousLogId?: string;
|
|
274
|
+
errandIdsSinceLastRefuel?: string[];
|
|
275
|
+
maintenanceType?: string;
|
|
276
|
+
maintenanceCost?: number;
|
|
281
277
|
};
|
|
282
278
|
type VehicleLogWithErrands = VehicleLog & {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
totalErrandsRevenue: number;
|
|
286
|
-
};
|
|
287
|
-
type VehicleLogWithRiderAndErrands = VehicleLogWithErrands & {
|
|
288
|
-
riderDetails: Rider | null;
|
|
289
|
-
riderUserDetails: User | null;
|
|
279
|
+
errandsCount?: number;
|
|
280
|
+
totalErrandsRevenue?: number;
|
|
290
281
|
};
|
|
291
282
|
|
|
292
283
|
declare enum ErrandStatus {
|
|
@@ -652,7 +643,9 @@ interface Transaction {
|
|
|
652
643
|
userId: string;
|
|
653
644
|
businessId?: string;
|
|
654
645
|
categoryId?: string;
|
|
646
|
+
customerId?: string;
|
|
655
647
|
items?: TransactionItem[];
|
|
648
|
+
customerDetails?: Customer;
|
|
656
649
|
}
|
|
657
650
|
interface TransactionCategory {
|
|
658
651
|
id: string;
|
|
@@ -717,4 +710,4 @@ declare enum LinkDestination {
|
|
|
717
710
|
}
|
|
718
711
|
type NullOrUndefined = null | undefined;
|
|
719
712
|
|
|
720
|
-
export { type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, type BusinessCategory, type BusinessMember, type BusinessPg, BusinessRole, type City, type Coupon, type Customer, 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, MembershipStatus, type Notification, type NotificationData, NotificationType, type NullOrUndefined, type PaginateResult, ParcelSize, PaymentOptions, type PendingErrand, type Rider, RoleType, type State, 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,
|
|
713
|
+
export { type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, type BusinessCategory, type BusinessMember, type BusinessPg, BusinessRole, type City, type Coupon, type Customer, 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, MembershipStatus, type Notification, type NotificationData, NotificationType, type NullOrUndefined, type PaginateResult, ParcelSize, PaymentOptions, type PendingErrand, type Rider, RoleType, type State, 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
|
@@ -232,8 +232,6 @@ type Rider = {
|
|
|
232
232
|
rating: number;
|
|
233
233
|
version: number;
|
|
234
234
|
hasBeenRated: boolean;
|
|
235
|
-
enterprise: string | Enterprise;
|
|
236
|
-
isTracking: boolean;
|
|
237
235
|
state?: string | State;
|
|
238
236
|
currentErrand?: Errand;
|
|
239
237
|
lastDeliveredErrand?: Errand;
|
|
@@ -264,29 +262,22 @@ declare enum VehicleLogType {
|
|
|
264
262
|
}
|
|
265
263
|
type VehicleLog = {
|
|
266
264
|
id: string;
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
vehicle: string | Vehicle;
|
|
270
|
-
maintenanceType?: string;
|
|
271
|
-
maintenanceCost?: number;
|
|
265
|
+
vehicleId: string;
|
|
266
|
+
businessId: string;
|
|
272
267
|
type: VehicleLogType | `${VehicleLogType}`;
|
|
273
268
|
fuelLiters?: number;
|
|
274
269
|
fuelCost?: number;
|
|
275
270
|
note?: string;
|
|
276
271
|
createdAt: string;
|
|
277
272
|
updatedAt: string;
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
273
|
+
previousLogId?: string;
|
|
274
|
+
errandIdsSinceLastRefuel?: string[];
|
|
275
|
+
maintenanceType?: string;
|
|
276
|
+
maintenanceCost?: number;
|
|
281
277
|
};
|
|
282
278
|
type VehicleLogWithErrands = VehicleLog & {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
totalErrandsRevenue: number;
|
|
286
|
-
};
|
|
287
|
-
type VehicleLogWithRiderAndErrands = VehicleLogWithErrands & {
|
|
288
|
-
riderDetails: Rider | null;
|
|
289
|
-
riderUserDetails: User | null;
|
|
279
|
+
errandsCount?: number;
|
|
280
|
+
totalErrandsRevenue?: number;
|
|
290
281
|
};
|
|
291
282
|
|
|
292
283
|
declare enum ErrandStatus {
|
|
@@ -652,7 +643,9 @@ interface Transaction {
|
|
|
652
643
|
userId: string;
|
|
653
644
|
businessId?: string;
|
|
654
645
|
categoryId?: string;
|
|
646
|
+
customerId?: string;
|
|
655
647
|
items?: TransactionItem[];
|
|
648
|
+
customerDetails?: Customer;
|
|
656
649
|
}
|
|
657
650
|
interface TransactionCategory {
|
|
658
651
|
id: string;
|
|
@@ -717,4 +710,4 @@ declare enum LinkDestination {
|
|
|
717
710
|
}
|
|
718
711
|
type NullOrUndefined = null | undefined;
|
|
719
712
|
|
|
720
|
-
export { type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, type BusinessCategory, type BusinessMember, type BusinessPg, BusinessRole, type City, type Coupon, type Customer, 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, MembershipStatus, type Notification, type NotificationData, NotificationType, type NullOrUndefined, type PaginateResult, ParcelSize, PaymentOptions, type PendingErrand, type Rider, RoleType, type State, 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,
|
|
713
|
+
export { type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, type BusinessCategory, type BusinessMember, type BusinessPg, BusinessRole, type City, type Coupon, type Customer, 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, MembershipStatus, type Notification, type NotificationData, NotificationType, type NullOrUndefined, type PaginateResult, ParcelSize, PaymentOptions, type PendingErrand, type Rider, RoleType, type State, 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/package.json
CHANGED
package/src/rider.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Enterprise } from './enterprise';
|
|
1
|
+
// import { Enterprise } from './enterprise';
|
|
2
2
|
import { Errand } from './errand';
|
|
3
3
|
import { State } from './location';
|
|
4
4
|
import { User } from './user';
|
|
@@ -21,8 +21,8 @@ export type Rider = {
|
|
|
21
21
|
rating: number;
|
|
22
22
|
version: number;
|
|
23
23
|
hasBeenRated: boolean;
|
|
24
|
-
enterprise: string | Enterprise;
|
|
25
|
-
isTracking: boolean;
|
|
24
|
+
// enterprise: string | Enterprise;
|
|
25
|
+
// isTracking: boolean;
|
|
26
26
|
|
|
27
27
|
state?: string | State;
|
|
28
28
|
currentErrand?: Errand;
|
|
@@ -60,29 +60,26 @@ export enum VehicleLogType {
|
|
|
60
60
|
|
|
61
61
|
export type VehicleLog = {
|
|
62
62
|
id: string;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
vehicle: string | Vehicle;
|
|
66
|
-
maintenanceType?: string;
|
|
67
|
-
maintenanceCost?: number;
|
|
63
|
+
vehicleId: string;
|
|
64
|
+
businessId: string;
|
|
68
65
|
type: VehicleLogType | `${VehicleLogType}`;
|
|
69
66
|
fuelLiters?: number;
|
|
70
67
|
fuelCost?: number;
|
|
71
68
|
note?: string;
|
|
72
69
|
createdAt: string;
|
|
73
70
|
updatedAt: string;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
71
|
+
previousLogId?: string;
|
|
72
|
+
errandIdsSinceLastRefuel?: string[];
|
|
73
|
+
maintenanceType?: string;
|
|
74
|
+
maintenanceCost?: number;
|
|
77
75
|
};
|
|
78
76
|
|
|
79
77
|
export type VehicleLogWithErrands = VehicleLog & {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
totalErrandsRevenue: number;
|
|
78
|
+
errandsCount?: number;
|
|
79
|
+
totalErrandsRevenue?: number;
|
|
83
80
|
};
|
|
84
81
|
|
|
85
|
-
export type VehicleLogWithRiderAndErrands = VehicleLogWithErrands & {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
};
|
|
82
|
+
// export type VehicleLogWithRiderAndErrands = VehicleLogWithErrands & {
|
|
83
|
+
// riderDetails: Rider | null;
|
|
84
|
+
// riderUserDetails: User | null;
|
|
85
|
+
// };
|
package/src/transaction.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { Customer } from './customer';
|
|
2
|
+
|
|
1
3
|
export type TransactionType = 'sale' | 'expense';
|
|
2
4
|
|
|
3
5
|
export interface TransactionItem {
|
|
@@ -18,7 +20,9 @@ export interface Transaction {
|
|
|
18
20
|
userId: string;
|
|
19
21
|
businessId?: string;
|
|
20
22
|
categoryId?: string;
|
|
23
|
+
customerId?: string;
|
|
21
24
|
items?: TransactionItem[];
|
|
25
|
+
customerDetails?: Customer;
|
|
22
26
|
}
|
|
23
27
|
|
|
24
28
|
export interface TransactionCategory {
|