@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.
- package/.turbo/turbo-build.log +5 -5
- package/CHANGELOG.md +12 -0
- package/dist/index.d.ts +47 -17
- package/dist/index.js +1 -0
- package/package.json +1 -1
- package/src/enterprise.ts +29 -0
- package/src/errand.ts +2 -1
- package/src/invoice.ts +1 -0
- package/src/user.ts +2 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @mydoormot/app-types@1.1.
|
|
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.
|
|
11
|
-
CJS ⚡️ Build success in
|
|
10
|
+
CJS dist/index.js 5.55 KB
|
|
11
|
+
CJS ⚡️ Build success in 64ms
|
|
12
12
|
DTS Build start
|
|
13
|
-
DTS ⚡️ Build success in
|
|
14
|
-
DTS dist/index.d.ts
|
|
13
|
+
DTS ⚡️ Build success in 536ms
|
|
14
|
+
DTS dist/index.d.ts 10.09 KB
|
package/CHANGELOG.md
CHANGED
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
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