@mydoormot/app-types 1.1.8 → 1.1.9

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.1.7 build /Users/chuksben/Desktop/projects/microservices/mydoormot/packages/app-types
2
+ > @mydoormot/app-types@1.1.8 build /Users/chuksben/Desktop/projects/microservices/mydoormot/packages/app-types
3
3
  > tsup src/index.ts --format cjs --dts
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -8,7 +8,7 @@ CLI tsup v7.2.0
8
8
  CLI Target: node16
9
9
  CJS Build start
10
10
  CJS dist/index.js 5.51 KB
11
- CJS ⚡️ Build success in 28ms
11
+ CJS ⚡️ Build success in 57ms
12
12
  DTS Build start
13
- DTS ⚡️ Build success in 879ms
14
- DTS dist/index.d.ts 9.31 KB
13
+ DTS ⚡️ Build success in 737ms
14
+ DTS dist/index.d.ts 10.04 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @mydoormot/app-types
2
2
 
3
+ ## 1.1.9
4
+
5
+ ### Patch Changes
6
+
7
+ - added user types for 'hasOnboarded' and 'accountType'
8
+
3
9
  ## 1.1.8
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -62,6 +62,8 @@ type User = {
62
62
  city?: string;
63
63
  googleUserId?: string;
64
64
  appleUserId?: string;
65
+ accountType?: 'business' | 'personal';
66
+ hasOnboarded?: boolean;
65
67
  };
66
68
  type UserAddress = {
67
69
  id: string;
@@ -78,6 +80,21 @@ type UserAddress = {
78
80
  direction?: string;
79
81
  };
80
82
 
83
+ interface Coupon {
84
+ id: string;
85
+ phoneNumber: string;
86
+ couponType: 'errand';
87
+ isUsed: boolean;
88
+ expiresAt: Date;
89
+ couponCode: string;
90
+ updatedAt: Date;
91
+ createdAt: Date;
92
+ hasExpired: boolean;
93
+ couponValue: number;
94
+ ref?: string;
95
+ fullName?: string;
96
+ }
97
+
81
98
  declare enum EnterpriseType {
82
99
  Restaurant = "restaurant",
83
100
  Dispatch = "dispatch",
@@ -104,7 +121,33 @@ type Enterprise = {
104
121
  image?: string;
105
122
  coverImage?: string;
106
123
  activationDate?: string;
124
+ category: EnterpriseCategoryDoc[] | string[];
125
+ subCategory: EnterpriseSubCategoryDoc[] | string[];
126
+ socialLinks: {
127
+ name: string;
128
+ url: string;
129
+ active: boolean;
130
+ }[];
107
131
  };
132
+ interface EnterpriseCategoryDoc {
133
+ id: string;
134
+ name: string;
135
+ slug: string;
136
+ subCategories: EnterpriseSubCategoryDoc[];
137
+ updatedAt: string;
138
+ createdAt: string;
139
+ image?: string;
140
+ }
141
+ interface EnterpriseSubCategoryDoc {
142
+ id: string;
143
+ name: string;
144
+ category: string;
145
+ slug: string;
146
+ image?: string;
147
+ serviceItems: string[];
148
+ updatedAt: string;
149
+ createdAt: string;
150
+ }
108
151
 
109
152
  declare enum InvoiceStatus {
110
153
  Pending = "pending",
@@ -259,7 +302,7 @@ interface Errand {
259
302
  city?: City;
260
303
  couponPrice?: number;
261
304
  price: number;
262
- coupon?: string;
305
+ coupon?: string | Coupon;
263
306
  }
264
307
  interface AggragatedErrand extends Errand {
265
308
  parcelSize: `${ParcelSize}`;
@@ -371,21 +414,6 @@ type Notification = {
371
414
  updatedAt: string;
372
415
  };
373
416
 
374
- interface Coupon {
375
- id: string;
376
- phoneNumber: string;
377
- couponType: 'errand';
378
- isUsed: boolean;
379
- expiresAt: Date;
380
- couponCode: string;
381
- updatedAt: Date;
382
- createdAt: Date;
383
- hasExpired: boolean;
384
- couponValue: number;
385
- ref?: string;
386
- fullName?: string;
387
- }
388
-
389
417
  interface PaginateResult<T> {
390
418
  docs: T[];
391
419
  totalDocs: number;
@@ -407,4 +435,4 @@ declare enum LinkDestination {
407
435
  RiderApp = "mydoormot:rider"
408
436
  }
409
437
 
410
- export { AddressDetails, AddressTypes, AggragatedErrand, AuthType, City, Coupon, 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 };
438
+ export { AddressDetails, AddressTypes, AggragatedErrand, AuthType, City, Coupon, DeliveryStatus, Enterprise, EnterpriseCategoryDoc, EnterpriseSubCategoryDoc, EnterpriseType, Errand, ErrandRating, ErrandStatus, ErrandTimeline, Invoice, InvoiceStatus, LatLng, LinkDestination, Notification, NotificationData, NotificationType, PaginateResult, ParcelSize, PaymentOptions, PendingErrand, Rider, RoleType, State, User, UserAddress, Vehicle, errandTimeline };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mydoormot/app-types",
3
- "version": "1.1.8",
3
+ "version": "1.1.9",
4
4
  "description": "",
5
5
  "mains": "./dist/index.js",
6
6
  "typess": "./dist/index.d.ts",
package/src/enterprise.ts CHANGED
@@ -27,4 +27,32 @@ export type Enterprise = {
27
27
  image?: string;
28
28
  coverImage?: string;
29
29
  activationDate?: string;
30
+ category: EnterpriseCategoryDoc[] | string[];
31
+ subCategory: EnterpriseSubCategoryDoc[] | string[];
32
+ socialLinks: {
33
+ name: string;
34
+ url: string;
35
+ active: boolean;
36
+ }[];
30
37
  };
38
+
39
+ export interface EnterpriseCategoryDoc {
40
+ id: string;
41
+ name: string;
42
+ slug: string;
43
+ subCategories: EnterpriseSubCategoryDoc[];
44
+ updatedAt: string;
45
+ createdAt: string;
46
+ image?: string;
47
+ }
48
+
49
+ export interface EnterpriseSubCategoryDoc {
50
+ id: string;
51
+ name: string;
52
+ category: string;
53
+ slug: string;
54
+ image?: string;
55
+ serviceItems: string[];
56
+ updatedAt: string;
57
+ createdAt: string;
58
+ }
package/src/errand.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { Coupon } from './coupon';
1
2
  import { Invoice, InvoiceStatus } from './invoice';
2
3
  import { City } from './location';
3
4
  import { Rider } from './rider';
@@ -128,7 +129,7 @@ export interface Errand {
128
129
  city?: City;
129
130
  couponPrice?: number;
130
131
  price: number;
131
- coupon?: string;
132
+ coupon?: string | Coupon;
132
133
  }
133
134
 
134
135
  export interface AggragatedErrand extends Errand {
package/src/user.ts CHANGED
@@ -36,6 +36,8 @@ export type User = {
36
36
  city?: string;
37
37
  googleUserId?: string;
38
38
  appleUserId?: string;
39
+ accountType?: 'business' | 'personal';
40
+ hasOnboarded?: boolean;
39
41
  };
40
42
 
41
43
  export type UserAddress = {