@mydoormot/app-types 1.1.8 → 1.1.10

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.9 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
@@ -7,8 +7,8 @@ CLI Using tsconfig: tsconfig.json
7
7
  CLI tsup v7.2.0
8
8
  CLI Target: node16
9
9
  CJS Build start
10
- CJS dist/index.js 5.51 KB
11
- CJS ⚡️ Build success in 28ms
10
+ CJS dist/index.js 5.55 KB
11
+ CJS ⚡️ Build success in 64ms
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 536ms
14
+ DTS dist/index.d.ts 10.09 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @mydoormot/app-types
2
2
 
3
+ ## 1.1.10
4
+
5
+ ### Patch Changes
6
+
7
+ - Modified app types
8
+
9
+ ## 1.1.9
10
+
11
+ ### Patch Changes
12
+
13
+ - added user types for 'hasOnboarded' and 'accountType'
14
+
3
15
  ## 1.1.8
4
16
 
5
17
  ### 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",
@@ -90,6 +107,7 @@ type Enterprise = {
90
107
  name: string;
91
108
  city: string;
92
109
  verified: boolean;
110
+ mobileNumber?: string;
93
111
  enterpriseType: EnterpriseType | `${EnterpriseType}`;
94
112
  deleted: boolean;
95
113
  updatedAt: Date;
@@ -104,10 +122,37 @@ type Enterprise = {
104
122
  image?: string;
105
123
  coverImage?: string;
106
124
  activationDate?: string;
125
+ category: EnterpriseCategoryDoc[] | string[];
126
+ subCategory: EnterpriseSubCategoryDoc[] | string[];
127
+ socialLinks: {
128
+ name: string;
129
+ url: string;
130
+ active: boolean;
131
+ }[];
107
132
  };
133
+ interface EnterpriseCategoryDoc {
134
+ id: string;
135
+ name: string;
136
+ slug: string;
137
+ subCategories: EnterpriseSubCategoryDoc[];
138
+ updatedAt: string;
139
+ createdAt: string;
140
+ image?: string;
141
+ }
142
+ interface EnterpriseSubCategoryDoc {
143
+ id: string;
144
+ name: string;
145
+ category: string;
146
+ slug: string;
147
+ image?: string;
148
+ serviceItems: string[];
149
+ updatedAt: string;
150
+ createdAt: string;
151
+ }
108
152
 
109
153
  declare enum InvoiceStatus {
110
154
  Pending = "pending",
155
+ Processing = "processing",
111
156
  Paid = "paid",
112
157
  Cancelled = "cancelled",
113
158
  Failed = "failed"
@@ -259,7 +304,7 @@ interface Errand {
259
304
  city?: City;
260
305
  couponPrice?: number;
261
306
  price: number;
262
- coupon?: string;
307
+ coupon?: string | Coupon;
263
308
  }
264
309
  interface AggragatedErrand extends Errand {
265
310
  parcelSize: `${ParcelSize}`;
@@ -371,21 +416,6 @@ type Notification = {
371
416
  updatedAt: string;
372
417
  };
373
418
 
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
419
  interface PaginateResult<T> {
390
420
  docs: T[];
391
421
  totalDocs: number;
@@ -407,4 +437,4 @@ declare enum LinkDestination {
407
437
  RiderApp = "mydoormot:rider"
408
438
  }
409
439
 
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 };
440
+ 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/dist/index.js CHANGED
@@ -114,6 +114,7 @@ var ParcelSize = /* @__PURE__ */ ((ParcelSize2) => {
114
114
  // src/invoice.ts
115
115
  var InvoiceStatus = /* @__PURE__ */ ((InvoiceStatus2) => {
116
116
  InvoiceStatus2["Pending"] = "pending";
117
+ InvoiceStatus2["Processing"] = "processing";
117
118
  InvoiceStatus2["Paid"] = "paid";
118
119
  InvoiceStatus2["Cancelled"] = "cancelled";
119
120
  InvoiceStatus2["Failed"] = "failed";
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.10",
4
4
  "description": "",
5
5
  "mains": "./dist/index.js",
6
6
  "typess": "./dist/index.d.ts",
package/src/enterprise.ts CHANGED
@@ -13,6 +13,7 @@ export type Enterprise = {
13
13
  name: string;
14
14
  city: string;
15
15
  verified: boolean;
16
+ mobileNumber?: string;
16
17
  enterpriseType: EnterpriseType | `${EnterpriseType}`;
17
18
  deleted: boolean;
18
19
  updatedAt: Date;
@@ -27,4 +28,32 @@ export type Enterprise = {
27
28
  image?: string;
28
29
  coverImage?: string;
29
30
  activationDate?: string;
31
+ category: EnterpriseCategoryDoc[] | string[];
32
+ subCategory: EnterpriseSubCategoryDoc[] | string[];
33
+ socialLinks: {
34
+ name: string;
35
+ url: string;
36
+ active: boolean;
37
+ }[];
30
38
  };
39
+
40
+ export interface EnterpriseCategoryDoc {
41
+ id: string;
42
+ name: string;
43
+ slug: string;
44
+ subCategories: EnterpriseSubCategoryDoc[];
45
+ updatedAt: string;
46
+ createdAt: string;
47
+ image?: string;
48
+ }
49
+
50
+ export interface EnterpriseSubCategoryDoc {
51
+ id: string;
52
+ name: string;
53
+ category: string;
54
+ slug: string;
55
+ image?: string;
56
+ serviceItems: string[];
57
+ updatedAt: string;
58
+ createdAt: string;
59
+ }
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/invoice.ts CHANGED
@@ -2,6 +2,7 @@ import { EnterpriseType } from './enterprise';
2
2
 
3
3
  export enum InvoiceStatus {
4
4
  Pending = 'pending',
5
+ Processing = 'processing',
5
6
  Paid = 'paid',
6
7
  Cancelled = 'cancelled',
7
8
  Failed = 'failed',
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 = {