@mydoormot/app-types 1.1.7 → 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.6 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
@@ -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.41 KB
11
- CJS ⚡️ Build success in 61ms
10
+ CJS dist/index.js 5.51 KB
11
+ CJS ⚡️ Build success in 57ms
12
12
  DTS Build start
13
- DTS ⚡️ Build success in 721ms
14
- DTS dist/index.d.ts 8.90 KB
13
+ DTS ⚡️ Build success in 737ms
14
+ DTS dist/index.d.ts 10.04 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
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
+
9
+ ## 1.1.8
10
+
11
+ ### Patch Changes
12
+
13
+ - Modified coupon types
14
+
3
15
  ## 1.1.7
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -31,8 +31,10 @@ type LatLng = `${number},${number}`;
31
31
  declare enum RoleType {
32
32
  Rider = "rider",
33
33
  User = "user",
34
- RootAdmin = "root-admin",
35
- Admin = "admin"
34
+ EnterpriseAdmin = "enterprise-admin",
35
+ EnterpriseUser = "enterprise-user",
36
+ Admin = "admin",
37
+ RootAdmin = "root-admin"
36
38
  }
37
39
  declare enum AuthType {
38
40
  Email = "email",
@@ -60,6 +62,8 @@ type User = {
60
62
  city?: string;
61
63
  googleUserId?: string;
62
64
  appleUserId?: string;
65
+ accountType?: 'business' | 'personal';
66
+ hasOnboarded?: boolean;
63
67
  };
64
68
  type UserAddress = {
65
69
  id: string;
@@ -76,6 +80,21 @@ type UserAddress = {
76
80
  direction?: string;
77
81
  };
78
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
+
79
98
  declare enum EnterpriseType {
80
99
  Restaurant = "restaurant",
81
100
  Dispatch = "dispatch",
@@ -102,7 +121,33 @@ type Enterprise = {
102
121
  image?: string;
103
122
  coverImage?: string;
104
123
  activationDate?: string;
124
+ category: EnterpriseCategoryDoc[] | string[];
125
+ subCategory: EnterpriseSubCategoryDoc[] | string[];
126
+ socialLinks: {
127
+ name: string;
128
+ url: string;
129
+ active: boolean;
130
+ }[];
105
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
+ }
106
151
 
107
152
  declare enum InvoiceStatus {
108
153
  Pending = "pending",
@@ -255,7 +300,9 @@ interface Errand {
255
300
  additionalData?: string;
256
301
  deliveryDate?: Date;
257
302
  city?: City;
258
- price?: number;
303
+ couponPrice?: number;
304
+ price: number;
305
+ coupon?: string | Coupon;
259
306
  }
260
307
  interface AggragatedErrand extends Errand {
261
308
  parcelSize: `${ParcelSize}`;
@@ -388,4 +435,4 @@ declare enum LinkDestination {
388
435
  RiderApp = "mydoormot:rider"
389
436
  }
390
437
 
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 };
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/dist/index.js CHANGED
@@ -39,8 +39,10 @@ module.exports = __toCommonJS(src_exports);
39
39
  var RoleType = /* @__PURE__ */ ((RoleType2) => {
40
40
  RoleType2["Rider"] = "rider";
41
41
  RoleType2["User"] = "user";
42
- RoleType2["RootAdmin"] = "root-admin";
42
+ RoleType2["EnterpriseAdmin"] = "enterprise-admin";
43
+ RoleType2["EnterpriseUser"] = "enterprise-user";
43
44
  RoleType2["Admin"] = "admin";
45
+ RoleType2["RootAdmin"] = "root-admin";
44
46
  return RoleType2;
45
47
  })(RoleType || {});
46
48
  var AuthType = /* @__PURE__ */ ((AuthType2) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mydoormot/app-types",
3
- "version": "1.1.7",
3
+ "version": "1.1.9",
4
4
  "description": "",
5
5
  "mains": "./dist/index.js",
6
6
  "typess": "./dist/index.d.ts",
package/src/coupon.ts ADDED
@@ -0,0 +1,14 @@
1
+ export interface Coupon {
2
+ id: string;
3
+ phoneNumber: string;
4
+ couponType: 'errand';
5
+ isUsed: boolean;
6
+ expiresAt: Date;
7
+ couponCode: string;
8
+ updatedAt: Date;
9
+ createdAt: Date;
10
+ hasExpired: boolean;
11
+ couponValue: number;
12
+ ref?: string;
13
+ fullName?: string;
14
+ }
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';
@@ -126,7 +127,9 @@ export interface Errand {
126
127
  additionalData?: string;
127
128
  deliveryDate?: Date;
128
129
  city?: City;
129
- price?: number;
130
+ couponPrice?: number;
131
+ price: number;
132
+ coupon?: string | Coupon;
130
133
  }
131
134
 
132
135
  export interface AggragatedErrand extends Errand {
package/src/index.ts CHANGED
@@ -27,3 +27,4 @@ export * from './invoice';
27
27
  export * from './notification';
28
28
  export * from './rider';
29
29
  export * from './enterprise';
30
+ export * from './coupon';
package/src/user.ts CHANGED
@@ -3,8 +3,10 @@ import { City, State } from './location';
3
3
  export enum RoleType {
4
4
  Rider = 'rider',
5
5
  User = 'user',
6
- RootAdmin = 'root-admin',
6
+ EnterpriseAdmin = 'enterprise-admin',
7
+ EnterpriseUser = 'enterprise-user',
7
8
  Admin = 'admin',
9
+ RootAdmin = 'root-admin',
8
10
  }
9
11
 
10
12
  export enum AuthType {
@@ -34,6 +36,8 @@ export type User = {
34
36
  city?: string;
35
37
  googleUserId?: string;
36
38
  appleUserId?: string;
39
+ accountType?: 'business' | 'personal';
40
+ hasOnboarded?: boolean;
37
41
  };
38
42
 
39
43
  export type UserAddress = {
package/tsconfig.json CHANGED
@@ -33,7 +33,9 @@
33
33
  // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
34
34
  // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
35
35
  // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
36
- // "types": [], /* Specify type package names to be included without being referenced in a source file. */
36
+ "types": [
37
+ "node"
38
+ ] /* Specify type package names to be included without being referenced in a source file. */,
37
39
  // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
38
40
  // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
39
41
  // "resolveJsonModule": true, /* Enable importing .json files. */