@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.
- package/.turbo/turbo-build.log +5 -5
- package/CHANGELOG.md +12 -0
- package/dist/index.d.ts +51 -4
- package/dist/index.js +3 -1
- package/package.json +1 -1
- package/src/coupon.ts +14 -0
- package/src/enterprise.ts +28 -0
- package/src/errand.ts +4 -1
- package/src/index.ts +1 -0
- package/src/user.ts +5 -1
- package/tsconfig.json +3 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @mydoormot/app-types@1.1.
|
|
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.
|
|
11
|
-
CJS ⚡️ Build success in
|
|
10
|
+
CJS dist/index.js 5.51 KB
|
|
11
|
+
CJS ⚡️ Build success in 57ms
|
|
12
12
|
DTS Build start
|
|
13
|
-
DTS ⚡️ Build success in
|
|
14
|
-
DTS dist/index.d.ts
|
|
13
|
+
DTS ⚡️ Build success in 737ms
|
|
14
|
+
DTS dist/index.d.ts 10.04 KB
|
package/CHANGELOG.md
CHANGED
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
|
-
|
|
35
|
-
|
|
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
|
-
|
|
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["
|
|
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
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
|
-
|
|
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
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
|
-
|
|
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
|
-
|
|
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. */
|