@mydoormot/app-types 1.7.14 → 1.7.16

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @mydoormot/app-types@1.7.13 build /Users/chuksben/Desktop/projects/microservices/mydoormot/packages/app-types
2
+ > @mydoormot/app-types@1.7.15 build /Users/chuksben/Desktop/projects/microservices/mydoormot/packages/app-types
3
3
  > tsup src/index.ts --format esm,cjs --dts
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -8,11 +8,11 @@
8
8
  CLI Target: es2021
9
9
  ESM Build start
10
10
  CJS Build start
11
- ESM dist/index.js 6.17 KB
12
- ESM ⚡️ Build success in 71ms
13
11
  CJS dist/index.cjs 7.84 KB
14
- CJS ⚡️ Build success in 70ms
12
+ CJS ⚡️ Build success in 61ms
13
+ ESM dist/index.js 6.17 KB
14
+ ESM ⚡️ Build success in 61ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 1097ms
17
- DTS dist/index.d.ts 17.80 KB
18
- DTS dist/index.d.cts 17.80 KB
16
+ DTS ⚡️ Build success in 686ms
17
+ DTS dist/index.d.ts 17.71 KB
18
+ DTS dist/index.d.cts 17.71 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @mydoormot/app-types
2
2
 
3
+ ## 1.7.16
4
+
5
+ ### Patch Changes
6
+
7
+ - Modified invoice stypes
8
+
9
+ ## 1.7.15
10
+
11
+ ### Patch Changes
12
+
13
+ - 4cf55ae: Modified transactions test
14
+
3
15
  ## 1.7.14
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.cts CHANGED
@@ -107,59 +107,26 @@ interface Coupon {
107
107
  fullName?: string;
108
108
  }
109
109
 
110
- declare enum EnterpriseType {
111
- Restaurant = "restaurant",
112
- Dispatch = "dispatch",
113
- Property = "property",
114
- Store = "store"
115
- }
116
- type Enterprise = {
117
- id: string;
118
- user: string | User;
119
- name: string;
120
- city: string;
121
- verified: boolean;
122
- mobileNumber?: string;
123
- enterpriseType: EnterpriseType | `${EnterpriseType}`;
124
- deleted: boolean;
125
- updatedAt: Date;
126
- createdAt: Date;
127
- isActive: boolean;
128
- version: number;
129
- officeNumber?: string;
130
- address?: {
131
- coordinates?: number[];
132
- address?: string;
133
- };
134
- image?: string;
135
- coverImage?: string;
136
- activationDate?: string;
137
- category: EnterpriseCategoryDoc[] | string[];
138
- subCategory: EnterpriseSubCategoryDoc[] | string[];
139
- socialLinks: {
140
- name: string;
141
- url: string;
142
- active: boolean;
143
- }[];
144
- };
145
- interface EnterpriseCategoryDoc {
146
- id: string;
147
- name: string;
148
- slug: string;
149
- subCategories: EnterpriseSubCategoryDoc[];
110
+ interface CustomerTransactionStats {
111
+ totalSaleCount: number;
112
+ totalSaleAmount: number;
113
+ totalExpenseCount: number;
114
+ totalExpenseAmount: number;
115
+ lastTransactionDate: string | null;
150
116
  updatedAt: string;
151
- createdAt: string;
152
- image?: string;
153
117
  }
154
- interface EnterpriseSubCategoryDoc {
118
+ interface Customer {
155
119
  id: string;
156
- name: string;
157
- category: string;
158
- slug: string;
159
- image?: string;
160
- serviceItems: string[];
161
- updatedAt: string;
120
+ businessId: string;
121
+ phoneNumber: string;
122
+ fullName: string;
123
+ cityId: string;
124
+ address: string;
125
+ landmark?: string;
162
126
  createdAt: string;
127
+ updatedAt: string;
128
+ customerBusinessId?: string;
129
+ transactionStats?: CustomerTransactionStats;
163
130
  }
164
131
 
165
132
  declare enum InvoiceStatus {
@@ -183,26 +150,20 @@ declare enum PaymentOptions {
183
150
  }
184
151
  interface Invoice {
185
152
  id: string;
186
- user: string;
187
- invoiceType: EnterpriseType | `${EnterpriseType}`;
188
- amount: number;
189
- paymentType: PaymentOptions | `${PaymentOptions}`;
153
+ businessId: string;
154
+ userId: string;
155
+ invoiceNumber: string;
156
+ startDate: string;
157
+ endDate: string;
158
+ totalAmount: number;
159
+ paidAmount: number;
160
+ unpaidAmount: number;
190
161
  status: InvoiceStatus | `${InvoiceStatus}`;
191
- version: number;
192
- referenceId?: string;
193
- errandId?: string;
194
- authorizationUrl?: string;
195
- accessCode?: string;
196
- generationType?: InvoiceGenerationType | `${InvoiceGenerationType}`;
197
- startDate?: string;
198
- endDate?: string;
199
- dueDate?: string;
200
- invoiceNumber?: string;
201
- isErrandsPaid?: boolean;
162
+ customerId: string;
202
163
  items: InvoiceItem[];
203
- businessId?: string;
204
164
  createdAt: string;
205
165
  updatedAt: string;
166
+ customerDetails?: Customer;
206
167
  }
207
168
  interface InvoiceItem {
208
169
  id: string;
@@ -274,6 +235,7 @@ type VehicleLog = {
274
235
  errandIdsSinceLastRefuel?: string[];
275
236
  maintenanceType?: string;
276
237
  maintenanceCost?: number;
238
+ vehicleDetails?: Vehicle;
277
239
  };
278
240
  type VehicleLogWithErrands = VehicleLog & {
279
241
  errandsCount?: number;
@@ -359,13 +321,7 @@ interface Errand {
359
321
  parcelSize: `${ParcelSize}`;
360
322
  deliveryStatus: ErrandStatus | `${ErrandStatus}`;
361
323
  paymentStatus: `${InvoiceStatus}`;
362
- invoice: {
363
- invoiceStatus: InvoiceStatus | `${InvoiceStatus}`;
364
- refId: string;
365
- authorizationUrl: string;
366
- accessCode: string;
367
- invoiceId?: string | Invoice;
368
- };
324
+ invoiceId?: string;
369
325
  aliasId: string;
370
326
  updatedAt: Date;
371
327
  createdAt: Date;
@@ -537,6 +493,61 @@ type Notification = {
537
493
  updatedAt: string;
538
494
  };
539
495
 
496
+ declare enum EnterpriseType {
497
+ Restaurant = "restaurant",
498
+ Dispatch = "dispatch",
499
+ Property = "property",
500
+ Store = "store"
501
+ }
502
+ type Enterprise = {
503
+ id: string;
504
+ user: string | User;
505
+ name: string;
506
+ city: string;
507
+ verified: boolean;
508
+ mobileNumber?: string;
509
+ enterpriseType: EnterpriseType | `${EnterpriseType}`;
510
+ deleted: boolean;
511
+ updatedAt: Date;
512
+ createdAt: Date;
513
+ isActive: boolean;
514
+ version: number;
515
+ officeNumber?: string;
516
+ address?: {
517
+ coordinates?: number[];
518
+ address?: string;
519
+ };
520
+ image?: string;
521
+ coverImage?: string;
522
+ activationDate?: string;
523
+ category: EnterpriseCategoryDoc[] | string[];
524
+ subCategory: EnterpriseSubCategoryDoc[] | string[];
525
+ socialLinks: {
526
+ name: string;
527
+ url: string;
528
+ active: boolean;
529
+ }[];
530
+ };
531
+ interface EnterpriseCategoryDoc {
532
+ id: string;
533
+ name: string;
534
+ slug: string;
535
+ subCategories: EnterpriseSubCategoryDoc[];
536
+ updatedAt: string;
537
+ createdAt: string;
538
+ image?: string;
539
+ }
540
+ interface EnterpriseSubCategoryDoc {
541
+ id: string;
542
+ name: string;
543
+ category: string;
544
+ slug: string;
545
+ image?: string;
546
+ serviceItems: string[];
547
+ updatedAt: string;
548
+ createdAt: string;
549
+ }
550
+
540
551
  interface Business {
541
552
  id: string;
542
553
  userId: string;
@@ -612,19 +623,6 @@ interface BusinessMember {
612
623
  updatedAt: string | NullOrUndefined;
613
624
  }
614
625
 
615
- interface Customer {
616
- id: string;
617
- businessId: string;
618
- phoneNumber: string;
619
- fullName: string;
620
- cityId: string;
621
- address: string;
622
- landmark?: string;
623
- createdAt: string;
624
- updatedAt: string;
625
- customerBusinessId?: string;
626
- }
627
-
628
626
  type TransactionType = 'sale' | 'expense';
629
627
  interface TransactionItem {
630
628
  name: string;
@@ -710,4 +708,4 @@ declare enum LinkDestination {
710
708
  }
711
709
  type NullOrUndefined = null | undefined;
712
710
 
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 };
711
+ 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, 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
@@ -107,59 +107,26 @@ interface Coupon {
107
107
  fullName?: string;
108
108
  }
109
109
 
110
- declare enum EnterpriseType {
111
- Restaurant = "restaurant",
112
- Dispatch = "dispatch",
113
- Property = "property",
114
- Store = "store"
115
- }
116
- type Enterprise = {
117
- id: string;
118
- user: string | User;
119
- name: string;
120
- city: string;
121
- verified: boolean;
122
- mobileNumber?: string;
123
- enterpriseType: EnterpriseType | `${EnterpriseType}`;
124
- deleted: boolean;
125
- updatedAt: Date;
126
- createdAt: Date;
127
- isActive: boolean;
128
- version: number;
129
- officeNumber?: string;
130
- address?: {
131
- coordinates?: number[];
132
- address?: string;
133
- };
134
- image?: string;
135
- coverImage?: string;
136
- activationDate?: string;
137
- category: EnterpriseCategoryDoc[] | string[];
138
- subCategory: EnterpriseSubCategoryDoc[] | string[];
139
- socialLinks: {
140
- name: string;
141
- url: string;
142
- active: boolean;
143
- }[];
144
- };
145
- interface EnterpriseCategoryDoc {
146
- id: string;
147
- name: string;
148
- slug: string;
149
- subCategories: EnterpriseSubCategoryDoc[];
110
+ interface CustomerTransactionStats {
111
+ totalSaleCount: number;
112
+ totalSaleAmount: number;
113
+ totalExpenseCount: number;
114
+ totalExpenseAmount: number;
115
+ lastTransactionDate: string | null;
150
116
  updatedAt: string;
151
- createdAt: string;
152
- image?: string;
153
117
  }
154
- interface EnterpriseSubCategoryDoc {
118
+ interface Customer {
155
119
  id: string;
156
- name: string;
157
- category: string;
158
- slug: string;
159
- image?: string;
160
- serviceItems: string[];
161
- updatedAt: string;
120
+ businessId: string;
121
+ phoneNumber: string;
122
+ fullName: string;
123
+ cityId: string;
124
+ address: string;
125
+ landmark?: string;
162
126
  createdAt: string;
127
+ updatedAt: string;
128
+ customerBusinessId?: string;
129
+ transactionStats?: CustomerTransactionStats;
163
130
  }
164
131
 
165
132
  declare enum InvoiceStatus {
@@ -183,26 +150,20 @@ declare enum PaymentOptions {
183
150
  }
184
151
  interface Invoice {
185
152
  id: string;
186
- user: string;
187
- invoiceType: EnterpriseType | `${EnterpriseType}`;
188
- amount: number;
189
- paymentType: PaymentOptions | `${PaymentOptions}`;
153
+ businessId: string;
154
+ userId: string;
155
+ invoiceNumber: string;
156
+ startDate: string;
157
+ endDate: string;
158
+ totalAmount: number;
159
+ paidAmount: number;
160
+ unpaidAmount: number;
190
161
  status: InvoiceStatus | `${InvoiceStatus}`;
191
- version: number;
192
- referenceId?: string;
193
- errandId?: string;
194
- authorizationUrl?: string;
195
- accessCode?: string;
196
- generationType?: InvoiceGenerationType | `${InvoiceGenerationType}`;
197
- startDate?: string;
198
- endDate?: string;
199
- dueDate?: string;
200
- invoiceNumber?: string;
201
- isErrandsPaid?: boolean;
162
+ customerId: string;
202
163
  items: InvoiceItem[];
203
- businessId?: string;
204
164
  createdAt: string;
205
165
  updatedAt: string;
166
+ customerDetails?: Customer;
206
167
  }
207
168
  interface InvoiceItem {
208
169
  id: string;
@@ -274,6 +235,7 @@ type VehicleLog = {
274
235
  errandIdsSinceLastRefuel?: string[];
275
236
  maintenanceType?: string;
276
237
  maintenanceCost?: number;
238
+ vehicleDetails?: Vehicle;
277
239
  };
278
240
  type VehicleLogWithErrands = VehicleLog & {
279
241
  errandsCount?: number;
@@ -359,13 +321,7 @@ interface Errand {
359
321
  parcelSize: `${ParcelSize}`;
360
322
  deliveryStatus: ErrandStatus | `${ErrandStatus}`;
361
323
  paymentStatus: `${InvoiceStatus}`;
362
- invoice: {
363
- invoiceStatus: InvoiceStatus | `${InvoiceStatus}`;
364
- refId: string;
365
- authorizationUrl: string;
366
- accessCode: string;
367
- invoiceId?: string | Invoice;
368
- };
324
+ invoiceId?: string;
369
325
  aliasId: string;
370
326
  updatedAt: Date;
371
327
  createdAt: Date;
@@ -537,6 +493,61 @@ type Notification = {
537
493
  updatedAt: string;
538
494
  };
539
495
 
496
+ declare enum EnterpriseType {
497
+ Restaurant = "restaurant",
498
+ Dispatch = "dispatch",
499
+ Property = "property",
500
+ Store = "store"
501
+ }
502
+ type Enterprise = {
503
+ id: string;
504
+ user: string | User;
505
+ name: string;
506
+ city: string;
507
+ verified: boolean;
508
+ mobileNumber?: string;
509
+ enterpriseType: EnterpriseType | `${EnterpriseType}`;
510
+ deleted: boolean;
511
+ updatedAt: Date;
512
+ createdAt: Date;
513
+ isActive: boolean;
514
+ version: number;
515
+ officeNumber?: string;
516
+ address?: {
517
+ coordinates?: number[];
518
+ address?: string;
519
+ };
520
+ image?: string;
521
+ coverImage?: string;
522
+ activationDate?: string;
523
+ category: EnterpriseCategoryDoc[] | string[];
524
+ subCategory: EnterpriseSubCategoryDoc[] | string[];
525
+ socialLinks: {
526
+ name: string;
527
+ url: string;
528
+ active: boolean;
529
+ }[];
530
+ };
531
+ interface EnterpriseCategoryDoc {
532
+ id: string;
533
+ name: string;
534
+ slug: string;
535
+ subCategories: EnterpriseSubCategoryDoc[];
536
+ updatedAt: string;
537
+ createdAt: string;
538
+ image?: string;
539
+ }
540
+ interface EnterpriseSubCategoryDoc {
541
+ id: string;
542
+ name: string;
543
+ category: string;
544
+ slug: string;
545
+ image?: string;
546
+ serviceItems: string[];
547
+ updatedAt: string;
548
+ createdAt: string;
549
+ }
550
+
540
551
  interface Business {
541
552
  id: string;
542
553
  userId: string;
@@ -612,19 +623,6 @@ interface BusinessMember {
612
623
  updatedAt: string | NullOrUndefined;
613
624
  }
614
625
 
615
- interface Customer {
616
- id: string;
617
- businessId: string;
618
- phoneNumber: string;
619
- fullName: string;
620
- cityId: string;
621
- address: string;
622
- landmark?: string;
623
- createdAt: string;
624
- updatedAt: string;
625
- customerBusinessId?: string;
626
- }
627
-
628
626
  type TransactionType = 'sale' | 'expense';
629
627
  interface TransactionItem {
630
628
  name: string;
@@ -710,4 +708,4 @@ declare enum LinkDestination {
710
708
  }
711
709
  type NullOrUndefined = null | undefined;
712
710
 
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 };
711
+ 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, 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mydoormot/app-types",
3
- "version": "1.7.14",
3
+ "version": "1.7.16",
4
4
  "description": "",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
package/src/customer.ts CHANGED
@@ -1,5 +1,14 @@
1
1
  // import { Business, City, State } from '.';
2
2
 
3
+ export interface CustomerTransactionStats {
4
+ totalSaleCount: number;
5
+ totalSaleAmount: number;
6
+ totalExpenseCount: number;
7
+ totalExpenseAmount: number;
8
+ lastTransactionDate: string | null;
9
+ updatedAt: string;
10
+ }
11
+
3
12
  export interface Customer {
4
13
  id: string;
5
14
  businessId: string;
@@ -13,6 +22,8 @@ export interface Customer {
13
22
 
14
23
  customerBusinessId?: string;
15
24
 
25
+ transactionStats?: CustomerTransactionStats;
26
+
16
27
  // From aggregation
17
28
  // errandsCount?: number;
18
29
  // city?: City;
package/src/errand.ts CHANGED
@@ -129,13 +129,15 @@ export interface Errand {
129
129
  parcelSize: `${ParcelSize}`;
130
130
  deliveryStatus: ErrandStatus | `${ErrandStatus}`;
131
131
  paymentStatus: `${InvoiceStatus}`;
132
- invoice: {
133
- invoiceStatus: InvoiceStatus | `${InvoiceStatus}`;
134
- refId: string;
135
- authorizationUrl: string;
136
- accessCode: string;
137
- invoiceId?: string | Invoice;
138
- };
132
+ invoiceId?: string;
133
+
134
+ // invoice: {
135
+ // invoiceStatus: InvoiceStatus | `${InvoiceStatus}`;
136
+ // refId: string;
137
+ // authorizationUrl: string;
138
+ // accessCode: string;
139
+ // invoiceId?: string | Invoice;
140
+ // };
139
141
  aliasId: string;
140
142
  updatedAt: Date;
141
143
  createdAt: Date;
package/src/invoice.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { EnterpriseType } from './enterprise';
1
+ import { Customer } from './customer';
2
2
  import { Errand } from './errand';
3
3
 
4
4
  export enum InvoiceStatus {
@@ -27,26 +27,21 @@ export enum PaymentOptions {
27
27
 
28
28
  export interface Invoice {
29
29
  id: string;
30
- user: string;
31
- invoiceType: EnterpriseType | `${EnterpriseType}`;
32
- amount: number;
33
- paymentType: PaymentOptions | `${PaymentOptions}`;
30
+ businessId: string;
31
+ userId: string;
32
+ invoiceNumber: string;
33
+ startDate: string;
34
+ endDate: string;
35
+ totalAmount: number;
36
+ paidAmount: number;
37
+ unpaidAmount: number;
34
38
  status: InvoiceStatus | `${InvoiceStatus}`;
35
- version: number;
36
- referenceId?: string;
37
- errandId?: string;
38
- authorizationUrl?: string;
39
- accessCode?: string;
40
- generationType?: InvoiceGenerationType | `${InvoiceGenerationType}`;
41
- startDate?: string;
42
- endDate?: string;
43
- dueDate?: string;
44
- invoiceNumber?: string;
45
- isErrandsPaid?: boolean;
39
+ customerId: string;
46
40
  items: InvoiceItem[];
47
- businessId?: string;
48
41
  createdAt: string;
49
42
  updatedAt: string;
43
+
44
+ customerDetails?: Customer;
50
45
  }
51
46
 
52
47
  export interface InvoiceItem {
package/src/rider.ts CHANGED
@@ -72,6 +72,7 @@ export type VehicleLog = {
72
72
  errandIdsSinceLastRefuel?: string[];
73
73
  maintenanceType?: string;
74
74
  maintenanceCost?: number;
75
+ vehicleDetails?: Vehicle;
75
76
  };
76
77
 
77
78
  export type VehicleLogWithErrands = VehicleLog & {