@mydoormot/app-types 1.1.5 → 1.1.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,13 +1,14 @@
1
- yarn run v1.22.19
2
- $ tsup src/index.ts --format cjs --dts
1
+
2
+ > @mydoormot/app-types@1.1.6 build /Users/chuksben/Desktop/projects/microservices/mydoormot/packages/app-types
3
+ > tsup src/index.ts --format cjs --dts
4
+
3
5
  CLI Building entry: src/index.ts
4
6
  CLI Using tsconfig: tsconfig.json
5
7
  CLI tsup v7.2.0
6
8
  CLI Target: node16
7
9
  CJS Build start
8
- CJS dist/index.js 5.07 KB
9
- CJS ⚡️ Build success in 38ms
10
+ CJS dist/index.js 5.41 KB
11
+ CJS ⚡️ Build success in 61ms
10
12
  DTS Build start
11
- DTS ⚡️ Build success in 1061ms
12
- DTS dist/index.d.ts 9.12 KB
13
- Done in 1.73s.
13
+ DTS ⚡️ Build success in 721ms
14
+ DTS dist/index.d.ts 8.90 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @mydoormot/app-types
2
2
 
3
+ ## 1.1.7
4
+
5
+ ### Patch Changes
6
+
7
+ - Modified app types for user address
8
+
9
+ ## 1.1.6
10
+
11
+ ### Patch Changes
12
+
13
+ - Modified types
14
+
3
15
  ## 1.1.5
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -1,3 +1,33 @@
1
+ type City = {
2
+ id: string;
3
+ state: string | State;
4
+ name: string;
5
+ slug: string;
6
+ location: {
7
+ coordinates: number[];
8
+ };
9
+ population: string;
10
+ populationProper: string;
11
+ updatedAt: Date;
12
+ createdAt: Date;
13
+ version: number;
14
+ isRiderActive: boolean;
15
+ isPropertyActive: boolean;
16
+ errandPrice?: number;
17
+ };
18
+ type State = {
19
+ id: string;
20
+ name: string;
21
+ slug: string;
22
+ location: {
23
+ coordinates: number[];
24
+ };
25
+ alias: string;
26
+ updatedAt: Date;
27
+ createdAt: Date;
28
+ };
29
+ type LatLng = `${number},${number}`;
30
+
1
31
  declare enum RoleType {
2
32
  Rider = "rider",
3
33
  User = "user",
@@ -22,31 +52,21 @@ type User = {
22
52
  updatedAt: string;
23
53
  createdAt: string;
24
54
  enterprise: string[];
55
+ authType: AuthType | `${AuthType}`;
56
+ version: number;
25
57
  pushTokens?: string[];
26
58
  avatarUrl?: string;
27
59
  state?: string;
28
60
  city?: string;
29
- homeAddress?: {
30
- coordinates?: number[];
31
- address?: string;
32
- placeId?: string;
33
- };
34
- workAddress?: {
35
- coordinates?: number[];
36
- address?: string;
37
- placeId?: string;
38
- };
39
- googleToken?: string;
40
- appleToken?: string;
41
- authType?: AuthType | `${AuthType}`;
42
- passwordChangedAt?: string;
43
- passwordResetToken?: string;
44
- passwordResetExpires?: string;
61
+ googleUserId?: string;
62
+ appleUserId?: string;
45
63
  };
46
64
  type UserAddress = {
65
+ id: string;
47
66
  user: string;
48
67
  name: string;
49
- city: string;
68
+ city: string | City;
69
+ state: string | State;
50
70
  address: string;
51
71
  landmark?: string;
52
72
  location?: {
@@ -108,36 +128,6 @@ interface Invoice {
108
128
  accessCode?: string;
109
129
  }
110
130
 
111
- type City = {
112
- id: string;
113
- state: string | State;
114
- name: string;
115
- slug: string;
116
- location: {
117
- coordinates: number[];
118
- };
119
- population: string;
120
- populationProper: string;
121
- updatedAt: Date;
122
- createdAt: Date;
123
- version: number;
124
- isRiderActive: boolean;
125
- isPropertyActive: boolean;
126
- errandPrice?: number;
127
- };
128
- type State = {
129
- id: string;
130
- name: string;
131
- slug: string;
132
- location: {
133
- coordinates: number[];
134
- };
135
- alias: string;
136
- updatedAt: Date;
137
- createdAt: Date;
138
- };
139
- type LatLng = `${number},${number}`;
140
-
141
131
  type Rider = {
142
132
  id: string;
143
133
  user: string | User;
@@ -260,11 +250,12 @@ interface Errand {
260
250
  errandTimeline: string | ErrandTimeline;
261
251
  updatedAt: Date;
262
252
  createdAt: Date;
263
- errandRating?: string;
253
+ errandRating?: string | ErrandRating;
264
254
  payOnDeliveryAmount?: string;
265
255
  additionalData?: string;
266
256
  deliveryDate?: Date;
267
257
  city?: City;
258
+ price?: number;
268
259
  }
269
260
  interface AggragatedErrand extends Errand {
270
261
  parcelSize: `${ParcelSize}`;
@@ -286,7 +277,6 @@ interface AggragatedErrand extends Errand {
286
277
  stateCoords: number[];
287
278
  };
288
279
  riderUserDetails: User;
289
- errandRatingDetails?: ErrandRating;
290
280
  }
291
281
  interface ErrandRating {
292
282
  createdAt: string;
@@ -398,4 +388,4 @@ declare enum LinkDestination {
398
388
  RiderApp = "mydoormot:rider"
399
389
  }
400
390
 
401
- export { AddressDetails, AddressTypes, AggragatedErrand, AuthType, City, DeliveryStatus, Errand, ErrandRating, ErrandStatus, ErrandTimeline, Invoice, InvoiceStatus, LatLng, LinkDestination, Notification, NotificationData, NotificationType, PaginateResult, ParcelSize, PaymentOptions, PendingErrand, Rider, RoleType, State, User, UserAddress, Vehicle, errandTimeline };
391
+ export { AddressDetails, AddressTypes, AggragatedErrand, AuthType, City, DeliveryStatus, Enterprise, EnterpriseType, Errand, ErrandRating, ErrandStatus, ErrandTimeline, Invoice, InvoiceStatus, LatLng, LinkDestination, Notification, NotificationData, NotificationType, PaginateResult, ParcelSize, PaymentOptions, PendingErrand, Rider, RoleType, State, User, UserAddress, Vehicle, errandTimeline };
package/dist/index.js CHANGED
@@ -23,6 +23,7 @@ __export(src_exports, {
23
23
  AddressTypes: () => AddressTypes,
24
24
  AuthType: () => AuthType,
25
25
  DeliveryStatus: () => DeliveryStatus,
26
+ EnterpriseType: () => EnterpriseType,
26
27
  ErrandStatus: () => ErrandStatus,
27
28
  InvoiceStatus: () => InvoiceStatus,
28
29
  LinkDestination: () => LinkDestination,
@@ -61,7 +62,6 @@ var ErrandStatus = /* @__PURE__ */ ((ErrandStatus2) => {
61
62
  ErrandStatus2["Cancelled"] = "cancelled";
62
63
  return ErrandStatus2;
63
64
  })(ErrandStatus || {});
64
- console.log("hello");
65
65
  var errandTimeline = [
66
66
  {
67
67
  status: "pending" /* Pending */,
@@ -130,6 +130,15 @@ var NotificationType = /* @__PURE__ */ ((NotificationType2) => {
130
130
  return NotificationType2;
131
131
  })(NotificationType || {});
132
132
 
133
+ // src/enterprise.ts
134
+ var EnterpriseType = /* @__PURE__ */ ((EnterpriseType2) => {
135
+ EnterpriseType2["Restaurant"] = "restaurant";
136
+ EnterpriseType2["Dispatch"] = "dispatch";
137
+ EnterpriseType2["Property"] = "property";
138
+ EnterpriseType2["Store"] = "store";
139
+ return EnterpriseType2;
140
+ })(EnterpriseType || {});
141
+
133
142
  // src/index.ts
134
143
  var LinkDestination = /* @__PURE__ */ ((LinkDestination2) => {
135
144
  LinkDestination2["Website"] = "web";
@@ -142,6 +151,7 @@ var LinkDestination = /* @__PURE__ */ ((LinkDestination2) => {
142
151
  AddressTypes,
143
152
  AuthType,
144
153
  DeliveryStatus,
154
+ EnterpriseType,
145
155
  ErrandStatus,
146
156
  InvoiceStatus,
147
157
  LinkDestination,
package/package.json CHANGED
@@ -1,14 +1,10 @@
1
1
  {
2
2
  "name": "@mydoormot/app-types",
3
- "version": "1.1.5",
3
+ "version": "1.1.7",
4
4
  "description": "",
5
5
  "mains": "./dist/index.js",
6
6
  "typess": "./dist/index.d.ts",
7
7
  "main": "./src/index.ts",
8
- "scripts": {
9
- "clean": "del ./build/*",
10
- "build": "tsup src/index.ts --format cjs --dts"
11
- },
12
8
  "keywords": [],
13
9
  "author": "",
14
10
  "license": "ISC",
@@ -18,5 +14,9 @@
18
14
  },
19
15
  "devDependencies": {
20
16
  "tsup": "^7.2.0"
17
+ },
18
+ "scripts": {
19
+ "clean": "del ./build/*",
20
+ "build": "tsup src/index.ts --format cjs --dts"
21
21
  }
22
- }
22
+ }
package/src/errand.ts CHANGED
@@ -14,7 +14,6 @@ export enum ErrandStatus {
14
14
  Cancelled = 'cancelled',
15
15
  }
16
16
 
17
- console.log('hello');
18
17
  export const errandTimeline = [
19
18
  {
20
19
  status: ErrandStatus.Pending,
@@ -122,11 +121,12 @@ export interface Errand {
122
121
  errandTimeline: string | ErrandTimeline;
123
122
  updatedAt: Date;
124
123
  createdAt: Date;
125
- errandRating?: string;
124
+ errandRating?: string | ErrandRating;
126
125
  payOnDeliveryAmount?: string;
127
126
  additionalData?: string;
128
127
  deliveryDate?: Date;
129
128
  city?: City;
129
+ price?: number;
130
130
  }
131
131
 
132
132
  export interface AggragatedErrand extends Errand {
@@ -149,7 +149,6 @@ export interface AggragatedErrand extends Errand {
149
149
  stateCoords: number[];
150
150
  };
151
151
  riderUserDetails: User;
152
- errandRatingDetails?: ErrandRating;
153
152
  }
154
153
 
155
154
  export interface ErrandTimeline {
package/src/index.ts CHANGED
@@ -26,3 +26,4 @@ export * from './location';
26
26
  export * from './invoice';
27
27
  export * from './notification';
28
28
  export * from './rider';
29
+ export * from './enterprise';
package/src/user.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { City, State } from './location';
2
+
1
3
  export enum RoleType {
2
4
  Rider = 'rider',
3
5
  User = 'user',
@@ -24,32 +26,22 @@ export type User = {
24
26
  updatedAt: string;
25
27
  createdAt: string;
26
28
  enterprise: string[];
29
+ authType: AuthType | `${AuthType}`;
30
+ version: number;
27
31
  pushTokens?: string[];
28
32
  avatarUrl?: string;
29
33
  state?: string;
30
34
  city?: string;
31
- homeAddress?: {
32
- coordinates?: number[];
33
- address?: string;
34
- placeId?: string;
35
- };
36
- workAddress?: {
37
- coordinates?: number[];
38
- address?: string;
39
- placeId?: string;
40
- };
41
- googleToken?: string;
42
- appleToken?: string;
43
- authType?: AuthType | `${AuthType}`;
44
- passwordChangedAt?: string;
45
- passwordResetToken?: string;
46
- passwordResetExpires?: string;
35
+ googleUserId?: string;
36
+ appleUserId?: string;
47
37
  };
48
38
 
49
39
  export type UserAddress = {
40
+ id: string;
50
41
  user: string;
51
42
  name: string;
52
- city: string;
43
+ city: string | City;
44
+ state: string | State;
53
45
  address: string;
54
46
  landmark?: string;
55
47
  location?: {