@mydoormot/app-types 2.0.1 → 2.0.3

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,18 +1,18 @@
1
-
2
- > @mydoormot/app-types@2.0.0 build /Users/chuksben/Desktop/projects/microservices/mydoormot/packages/app-types
3
- > tsup src/index.ts --format esm,cjs --dts
4
-
5
- CLI Building entry: src/index.ts
6
- CLI Using tsconfig: tsconfig.json
7
- CLI tsup v7.3.0
8
- CLI Target: es2021
9
- ESM Build start
10
- CJS Build start
11
- ESM dist/index.js 14.62 KB
12
- ESM ⚡️ Build success in 63ms
13
- CJS dist/index.cjs 17.59 KB
14
- CJS ⚡️ Build success in 64ms
15
- DTS Build start
16
- DTS ⚡️ Build success in 685ms
17
- DTS dist/index.d.ts 49.44 KB
18
- DTS dist/index.d.cts 49.44 KB
1
+
2
+ > @mydoormot/app-types@2.0.2 build /Users/chuksben/Desktop/projects/microservices/mydoormot/packages/app-types
3
+ > tsup src/index.ts --format esm,cjs --dts
4
+
5
+ CLI Building entry: src/index.ts
6
+ CLI Using tsconfig: tsconfig.json
7
+ CLI tsup v7.3.0
8
+ CLI Target: es2021
9
+ ESM Build start
10
+ CJS Build start
11
+ CJS dist/index.cjs 17.59 KB
12
+ CJS ⚡️ Build success in 50ms
13
+ ESM dist/index.js 14.62 KB
14
+ ESM ⚡️ Build success in 50ms
15
+ DTS Build start
16
+ DTS ⚡️ Build success in 661ms
17
+ DTS dist/index.d.ts 49.84 KB
18
+ DTS dist/index.d.cts 49.84 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @mydoormot/app-types
2
2
 
3
+ ## 2.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated rider schema
8
+
9
+ ## 2.0.2
10
+
11
+ ### Patch Changes
12
+
13
+ - Added payout percentage
14
+
3
15
  ## 2.0.1
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.cts CHANGED
@@ -708,6 +708,16 @@ type Rider = {
708
708
  id: string;
709
709
  userId: string;
710
710
  vehicleId?: string;
711
+ /**
712
+ * Denormalized from the User behind `userId`, so a rider can be displayed
713
+ * without a second fetch. Kept in sync server-side on every user update.
714
+ * Stored lowercase, as `User` names are — capitalize at render.
715
+ */
716
+ firstName?: string;
717
+ lastName?: string;
718
+ fullName?: string;
719
+ mobileNumber?: string;
720
+ avatarUrl?: string;
711
721
  currLocation: {
712
722
  coordinates: number[];
713
723
  };
@@ -719,6 +729,7 @@ type Rider = {
719
729
  rating: number;
720
730
  version: number;
721
731
  hasBeenRated: boolean;
732
+ payoutPercentage?: number | null;
722
733
  state?: string | State;
723
734
  currentErrand?: Errand;
724
735
  lastDeliveredErrand?: Errand;
package/dist/index.d.ts CHANGED
@@ -708,6 +708,16 @@ type Rider = {
708
708
  id: string;
709
709
  userId: string;
710
710
  vehicleId?: string;
711
+ /**
712
+ * Denormalized from the User behind `userId`, so a rider can be displayed
713
+ * without a second fetch. Kept in sync server-side on every user update.
714
+ * Stored lowercase, as `User` names are — capitalize at render.
715
+ */
716
+ firstName?: string;
717
+ lastName?: string;
718
+ fullName?: string;
719
+ mobileNumber?: string;
720
+ avatarUrl?: string;
711
721
  currLocation: {
712
722
  coordinates: number[];
713
723
  };
@@ -719,6 +729,7 @@ type Rider = {
719
729
  rating: number;
720
730
  version: number;
721
731
  hasBeenRated: boolean;
732
+ payoutPercentage?: number | null;
722
733
  state?: string | State;
723
734
  currentErrand?: Errand;
724
735
  lastDeliveredErrand?: Errand;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mydoormot/app-types",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
package/src/rider.ts CHANGED
@@ -6,7 +6,12 @@ import { User } from './user';
6
6
  import type { Vehicle } from './vehicle';
7
7
 
8
8
  // Re-export vehicle types for backwards compatibility
9
- export type { Vehicle, VehicleWithRider, VehicleLog, VehicleLogWithErrands } from './vehicle';
9
+ export type {
10
+ Vehicle,
11
+ VehicleWithRider,
12
+ VehicleLog,
13
+ VehicleLogWithErrands,
14
+ } from './vehicle';
10
15
  export { VehicleType, VehicleLogType } from './vehicle';
11
16
 
12
17
  export type Rider = {
@@ -14,6 +19,17 @@ export type Rider = {
14
19
  userId: string;
15
20
  vehicleId?: string;
16
21
 
22
+ /**
23
+ * Denormalized from the User behind `userId`, so a rider can be displayed
24
+ * without a second fetch. Kept in sync server-side on every user update.
25
+ * Stored lowercase, as `User` names are — capitalize at render.
26
+ */
27
+ firstName?: string;
28
+ lastName?: string;
29
+ fullName?: string;
30
+ mobileNumber?: string;
31
+ avatarUrl?: string;
32
+
17
33
  // city: string | City;
18
34
  currLocation: {
19
35
  coordinates: number[];
@@ -27,6 +43,7 @@ export type Rider = {
27
43
  rating: number;
28
44
  version: number;
29
45
  hasBeenRated: boolean;
46
+ payoutPercentage?: number | null;
30
47
  // enterprise: string | Enterprise;
31
48
  // isTracking: boolean;
32
49
 
@@ -105,7 +122,6 @@ export interface RiderPerformanceStats {
105
122
  timeSeries?: RiderPerformanceTimeSeries[];
106
123
  }
107
124
 
108
-
109
125
  // Rider Payout Types
110
126
  //
111
127
  // Rider pay is a percentage of the errand fees a rider earned over a pay