@mydoormot/app-types 1.5.5 → 1.5.7

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.5.4 build /Users/chuksben/Desktop/projects/microservices/mydoormot/packages/app-types
2
+ > @mydoormot/app-types@1.5.6 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 5.15 KB
12
- ESM ⚡️ Build success in 566ms
13
- CJS dist/index.cjs 6.68 KB
14
- CJS ⚡️ Build success in 567ms
11
+ ESM dist/index.js 5.37 KB
12
+ ESM ⚡️ Build success in 246ms
13
+ CJS dist/index.cjs 6.93 KB
14
+ CJS ⚡️ Build success in 246ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 2184ms
17
- DTS dist/index.d.ts 13.92 KB
18
- DTS dist/index.d.cts 13.92 KB
16
+ DTS ⚡️ Build success in 1641ms
17
+ DTS dist/index.d.ts 14.59 KB
18
+ DTS dist/index.d.cts 14.59 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @mydoormot/app-types
2
2
 
3
+ ## 1.5.7
4
+
5
+ ### Patch Changes
6
+
7
+ - Added business to errand details
8
+
9
+ ## 1.5.6
10
+
11
+ ### Patch Changes
12
+
13
+ - Added vehicle logs
14
+
3
15
  ## 1.5.5
4
16
 
5
17
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -33,6 +33,7 @@ __export(src_exports, {
33
33
  ParcelSize: () => ParcelSize,
34
34
  PaymentOptions: () => PaymentOptions,
35
35
  RoleType: () => RoleType,
36
+ VehicleLogType: () => VehicleLogType,
36
37
  VehicleType: () => VehicleType,
37
38
  errandTimeline: () => errandTimeline
38
39
  });
@@ -159,6 +160,11 @@ var VehicleType = /* @__PURE__ */ ((VehicleType2) => {
159
160
  VehicleType2["Shuttle"] = "shuttle";
160
161
  return VehicleType2;
161
162
  })(VehicleType || {});
163
+ var VehicleLogType = /* @__PURE__ */ ((VehicleLogType2) => {
164
+ VehicleLogType2["REFUEL"] = "REFUEL";
165
+ VehicleLogType2["MAINTENANCE"] = "MAINTENANCE";
166
+ return VehicleLogType2;
167
+ })(VehicleLogType || {});
162
168
 
163
169
  // src/enterprise.ts
164
170
  var EnterpriseType = /* @__PURE__ */ ((EnterpriseType2) => {
@@ -191,6 +197,7 @@ var LinkDestination = /* @__PURE__ */ ((LinkDestination2) => {
191
197
  ParcelSize,
192
198
  PaymentOptions,
193
199
  RoleType,
200
+ VehicleLogType,
194
201
  VehicleType,
195
202
  errandTimeline
196
203
  });
package/dist/index.d.cts CHANGED
@@ -247,6 +247,29 @@ type VehicleWithRider = Vehicle & {
247
247
  rider: Rider | null;
248
248
  riderUserDetails: User | null;
249
249
  };
250
+ declare enum VehicleLogType {
251
+ REFUEL = "REFUEL",
252
+ MAINTENANCE = "MAINTENANCE"
253
+ }
254
+ type VehicleLog = {
255
+ id: string;
256
+ previousLogId?: string;
257
+ errandIdsSinceLastRefuel?: string[];
258
+ vehicle: string | Vehicle;
259
+ maintenanceType?: string;
260
+ maintenanceCost?: number;
261
+ type: VehicleLogType | `${VehicleLogType}`;
262
+ fuelLiters?: number;
263
+ fuelCost?: number;
264
+ note?: string;
265
+ createdAt: string;
266
+ updatedAt: string;
267
+ };
268
+ type VehicleLogWithErrands = VehicleLog & {
269
+ errands: Errand[];
270
+ errandsCount: number;
271
+ totalErrandsRevenue: number;
272
+ };
250
273
 
251
274
  declare enum ErrandStatus {
252
275
  Pending = "pending",
@@ -346,6 +369,7 @@ interface Errand {
346
369
  queuePosition?: number;
347
370
  isTest?: boolean;
348
371
  isInBusinessInvoice?: boolean;
372
+ businessId?: string;
349
373
  }
350
374
  interface AggregatedErrand extends Errand {
351
375
  parcelSize: `${ParcelSize}`;
@@ -367,6 +391,7 @@ interface AggregatedErrand extends Errand {
367
391
  stateCoords: number[];
368
392
  };
369
393
  riderUserDetails?: User;
394
+ business?: Business;
370
395
  }
371
396
  interface ErrandRating {
372
397
  createdAt: string;
@@ -570,4 +595,4 @@ declare enum LinkDestination {
570
595
  }
571
596
  type NullOrUndefined = null | undefined;
572
597
 
573
- export { type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, type BusinessCategory, type BusinessPg, type City, type Coupon, type Customer, DeliveryStatus, type Enterprise, type EnterpriseCategoryDoc, type EnterpriseSubCategoryDoc, EnterpriseType, type Errand, type ErrandRating, ErrandStatus, type ErrandTimeline, type Invoice, InvoiceGenerationType, type InvoiceItem, InvoiceItemType, InvoiceStatus, type LatLng, LinkDestination, type Notification, type NotificationData, NotificationType, type NullOrUndefined, type PaginateResult, ParcelSize, PaymentOptions, type PendingErrand, type Rider, RoleType, type State, type Transaction, type TransactionCategory, type TransactionType, type TransactionWithCategory, type TransactionWithJoin, type User, type UserAddress, type Vehicle, VehicleType, type VehicleWithRider, errandTimeline };
598
+ export { type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, type BusinessCategory, type BusinessPg, type City, type Coupon, type Customer, DeliveryStatus, type Enterprise, type EnterpriseCategoryDoc, type EnterpriseSubCategoryDoc, EnterpriseType, type Errand, type ErrandRating, ErrandStatus, type ErrandTimeline, type Invoice, InvoiceGenerationType, type InvoiceItem, InvoiceItemType, InvoiceStatus, type LatLng, LinkDestination, type Notification, type NotificationData, NotificationType, type NullOrUndefined, type PaginateResult, ParcelSize, PaymentOptions, type PendingErrand, type Rider, RoleType, type State, type Transaction, type TransactionCategory, type TransactionType, type TransactionWithCategory, type TransactionWithJoin, type User, type UserAddress, type Vehicle, type VehicleLog, VehicleLogType, type VehicleLogWithErrands, VehicleType, type VehicleWithRider, errandTimeline };
package/dist/index.d.ts CHANGED
@@ -247,6 +247,29 @@ type VehicleWithRider = Vehicle & {
247
247
  rider: Rider | null;
248
248
  riderUserDetails: User | null;
249
249
  };
250
+ declare enum VehicleLogType {
251
+ REFUEL = "REFUEL",
252
+ MAINTENANCE = "MAINTENANCE"
253
+ }
254
+ type VehicleLog = {
255
+ id: string;
256
+ previousLogId?: string;
257
+ errandIdsSinceLastRefuel?: string[];
258
+ vehicle: string | Vehicle;
259
+ maintenanceType?: string;
260
+ maintenanceCost?: number;
261
+ type: VehicleLogType | `${VehicleLogType}`;
262
+ fuelLiters?: number;
263
+ fuelCost?: number;
264
+ note?: string;
265
+ createdAt: string;
266
+ updatedAt: string;
267
+ };
268
+ type VehicleLogWithErrands = VehicleLog & {
269
+ errands: Errand[];
270
+ errandsCount: number;
271
+ totalErrandsRevenue: number;
272
+ };
250
273
 
251
274
  declare enum ErrandStatus {
252
275
  Pending = "pending",
@@ -346,6 +369,7 @@ interface Errand {
346
369
  queuePosition?: number;
347
370
  isTest?: boolean;
348
371
  isInBusinessInvoice?: boolean;
372
+ businessId?: string;
349
373
  }
350
374
  interface AggregatedErrand extends Errand {
351
375
  parcelSize: `${ParcelSize}`;
@@ -367,6 +391,7 @@ interface AggregatedErrand extends Errand {
367
391
  stateCoords: number[];
368
392
  };
369
393
  riderUserDetails?: User;
394
+ business?: Business;
370
395
  }
371
396
  interface ErrandRating {
372
397
  createdAt: string;
@@ -570,4 +595,4 @@ declare enum LinkDestination {
570
595
  }
571
596
  type NullOrUndefined = null | undefined;
572
597
 
573
- export { type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, type BusinessCategory, type BusinessPg, type City, type Coupon, type Customer, DeliveryStatus, type Enterprise, type EnterpriseCategoryDoc, type EnterpriseSubCategoryDoc, EnterpriseType, type Errand, type ErrandRating, ErrandStatus, type ErrandTimeline, type Invoice, InvoiceGenerationType, type InvoiceItem, InvoiceItemType, InvoiceStatus, type LatLng, LinkDestination, type Notification, type NotificationData, NotificationType, type NullOrUndefined, type PaginateResult, ParcelSize, PaymentOptions, type PendingErrand, type Rider, RoleType, type State, type Transaction, type TransactionCategory, type TransactionType, type TransactionWithCategory, type TransactionWithJoin, type User, type UserAddress, type Vehicle, VehicleType, type VehicleWithRider, errandTimeline };
598
+ export { type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, type BusinessCategory, type BusinessPg, type City, type Coupon, type Customer, DeliveryStatus, type Enterprise, type EnterpriseCategoryDoc, type EnterpriseSubCategoryDoc, EnterpriseType, type Errand, type ErrandRating, ErrandStatus, type ErrandTimeline, type Invoice, InvoiceGenerationType, type InvoiceItem, InvoiceItemType, InvoiceStatus, type LatLng, LinkDestination, type Notification, type NotificationData, NotificationType, type NullOrUndefined, type PaginateResult, ParcelSize, PaymentOptions, type PendingErrand, type Rider, RoleType, type State, type Transaction, type TransactionCategory, type TransactionType, type TransactionWithCategory, type TransactionWithJoin, type User, type UserAddress, type Vehicle, type VehicleLog, VehicleLogType, type VehicleLogWithErrands, VehicleType, type VehicleWithRider, errandTimeline };
package/dist/index.js CHANGED
@@ -119,6 +119,11 @@ var VehicleType = /* @__PURE__ */ ((VehicleType2) => {
119
119
  VehicleType2["Shuttle"] = "shuttle";
120
120
  return VehicleType2;
121
121
  })(VehicleType || {});
122
+ var VehicleLogType = /* @__PURE__ */ ((VehicleLogType2) => {
123
+ VehicleLogType2["REFUEL"] = "REFUEL";
124
+ VehicleLogType2["MAINTENANCE"] = "MAINTENANCE";
125
+ return VehicleLogType2;
126
+ })(VehicleLogType || {});
122
127
 
123
128
  // src/enterprise.ts
124
129
  var EnterpriseType = /* @__PURE__ */ ((EnterpriseType2) => {
@@ -150,6 +155,7 @@ export {
150
155
  ParcelSize,
151
156
  PaymentOptions,
152
157
  RoleType,
158
+ VehicleLogType,
153
159
  VehicleType,
154
160
  errandTimeline
155
161
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mydoormot/app-types",
3
- "version": "1.5.5",
3
+ "version": "1.5.7",
4
4
  "description": "",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
package/src/errand.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { Business } from '.';
1
2
  import { Coupon } from './coupon';
2
3
  import { Invoice, InvoiceStatus } from './invoice';
3
4
  import { City } from './location';
@@ -142,6 +143,7 @@ export interface Errand {
142
143
  queuePosition?: number;
143
144
  isTest?: boolean;
144
145
  isInBusinessInvoice?: boolean;
146
+ businessId?: string;
145
147
  }
146
148
 
147
149
  export interface AggregatedErrand extends Errand {
@@ -164,6 +166,7 @@ export interface AggregatedErrand extends Errand {
164
166
  stateCoords: number[];
165
167
  };
166
168
  riderUserDetails?: User;
169
+ business?: Business;
167
170
  }
168
171
 
169
172
  export interface ErrandTimeline {
package/src/rider.ts CHANGED
@@ -47,3 +47,29 @@ export type VehicleWithRider = Vehicle & {
47
47
  rider: Rider | null;
48
48
  riderUserDetails: User | null;
49
49
  };
50
+
51
+ export enum VehicleLogType {
52
+ REFUEL = 'REFUEL',
53
+ MAINTENANCE = 'MAINTENANCE',
54
+ }
55
+
56
+ export type VehicleLog = {
57
+ id: string;
58
+ previousLogId?: string;
59
+ errandIdsSinceLastRefuel?: string[];
60
+ vehicle: string | Vehicle;
61
+ maintenanceType?: string;
62
+ maintenanceCost?: number;
63
+ type: VehicleLogType | `${VehicleLogType}`;
64
+ fuelLiters?: number;
65
+ fuelCost?: number;
66
+ note?: string;
67
+ createdAt: string;
68
+ updatedAt: string;
69
+ };
70
+
71
+ export type VehicleLogWithErrands = VehicleLog & {
72
+ errands: Errand[];
73
+ errandsCount: number;
74
+ totalErrandsRevenue: number;
75
+ };