@mydoormot/app-types 1.7.1 → 1.7.3
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 +8 -8
- package/CHANGELOG.md +12 -0
- package/dist/index.cjs +19 -0
- package/dist/index.d.cts +21 -2
- package/dist/index.d.ts +21 -2
- package/dist/index.js +17 -0
- package/package.json +1 -1
- package/src/business.ts +17 -0
- package/src/user.ts +8 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @mydoormot/app-types@1.7.
|
|
2
|
+
> @mydoormot/app-types@1.7.2 build /Users/chuksben/Desktop/projects/microservices/mydoormot/packages/app-types
|
|
3
3
|
> tsup src/index.ts --format esm,cjs --dts
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
[34mCLI[39m Target: es2021
|
|
9
9
|
[34mESM[39m Build start
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
|
-
[
|
|
12
|
-
[
|
|
13
|
-
[
|
|
14
|
-
[
|
|
11
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m7.51 KB[39m
|
|
12
|
+
[32mCJS[39m ⚡️ Build success in 70ms
|
|
13
|
+
[32mESM[39m [1mdist/index.js [22m[32m5.88 KB[39m
|
|
14
|
+
[32mESM[39m ⚡️ Build success in 70ms
|
|
15
15
|
[34mDTS[39m Build start
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
17
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[
|
|
18
|
-
[32mDTS[39m [1mdist/index.d.cts [22m[
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 1077ms
|
|
17
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m17.32 KB[39m
|
|
18
|
+
[32mDTS[39m [1mdist/index.d.cts [22m[32m17.32 KB[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -22,9 +22,11 @@ var src_exports = {};
|
|
|
22
22
|
__export(src_exports, {
|
|
23
23
|
AddressTypes: () => AddressTypes,
|
|
24
24
|
AuthType: () => AuthType,
|
|
25
|
+
BusinessRole: () => BusinessRole,
|
|
25
26
|
DeliveryStatus: () => DeliveryStatus,
|
|
26
27
|
EnterpriseType: () => EnterpriseType,
|
|
27
28
|
ErrandStatus: () => ErrandStatus,
|
|
29
|
+
GlobalRoles: () => GlobalRoles,
|
|
28
30
|
InvoiceGenerationType: () => InvoiceGenerationType,
|
|
29
31
|
InvoiceItemType: () => InvoiceItemType,
|
|
30
32
|
InvoiceStatus: () => InvoiceStatus,
|
|
@@ -49,6 +51,12 @@ var RoleType = /* @__PURE__ */ ((RoleType2) => {
|
|
|
49
51
|
RoleType2["RootAdmin"] = "root-admin";
|
|
50
52
|
return RoleType2;
|
|
51
53
|
})(RoleType || {});
|
|
54
|
+
var GlobalRoles = /* @__PURE__ */ ((GlobalRoles2) => {
|
|
55
|
+
GlobalRoles2["SUPER_ADMIN"] = "SUPER_ADMIN";
|
|
56
|
+
GlobalRoles2["ADMIN"] = "ADMIN";
|
|
57
|
+
GlobalRoles2["USER"] = "USER";
|
|
58
|
+
return GlobalRoles2;
|
|
59
|
+
})(GlobalRoles || {});
|
|
52
60
|
var AuthType = /* @__PURE__ */ ((AuthType2) => {
|
|
53
61
|
AuthType2["Email"] = "email";
|
|
54
62
|
AuthType2["Google"] = "google";
|
|
@@ -175,6 +183,15 @@ var EnterpriseType = /* @__PURE__ */ ((EnterpriseType2) => {
|
|
|
175
183
|
return EnterpriseType2;
|
|
176
184
|
})(EnterpriseType || {});
|
|
177
185
|
|
|
186
|
+
// src/business.ts
|
|
187
|
+
var BusinessRole = /* @__PURE__ */ ((BusinessRole2) => {
|
|
188
|
+
BusinessRole2["OWNER"] = "OWNER";
|
|
189
|
+
BusinessRole2["MANAGER"] = "MANAGER";
|
|
190
|
+
BusinessRole2["RIDER"] = "RIDER";
|
|
191
|
+
BusinessRole2["STAFF"] = "STAFF";
|
|
192
|
+
return BusinessRole2;
|
|
193
|
+
})(BusinessRole || {});
|
|
194
|
+
|
|
178
195
|
// src/index.ts
|
|
179
196
|
var LinkDestination = /* @__PURE__ */ ((LinkDestination2) => {
|
|
180
197
|
LinkDestination2["Website"] = "web";
|
|
@@ -186,9 +203,11 @@ var LinkDestination = /* @__PURE__ */ ((LinkDestination2) => {
|
|
|
186
203
|
0 && (module.exports = {
|
|
187
204
|
AddressTypes,
|
|
188
205
|
AuthType,
|
|
206
|
+
BusinessRole,
|
|
189
207
|
DeliveryStatus,
|
|
190
208
|
EnterpriseType,
|
|
191
209
|
ErrandStatus,
|
|
210
|
+
GlobalRoles,
|
|
192
211
|
InvoiceGenerationType,
|
|
193
212
|
InvoiceItemType,
|
|
194
213
|
InvoiceStatus,
|
package/dist/index.d.cts
CHANGED
|
@@ -37,6 +37,11 @@ declare enum RoleType {
|
|
|
37
37
|
Admin = "admin",
|
|
38
38
|
RootAdmin = "root-admin"
|
|
39
39
|
}
|
|
40
|
+
declare enum GlobalRoles {
|
|
41
|
+
SUPER_ADMIN = "SUPER_ADMIN",
|
|
42
|
+
ADMIN = "ADMIN",
|
|
43
|
+
USER = "USER"
|
|
44
|
+
}
|
|
40
45
|
declare enum AuthType {
|
|
41
46
|
Email = "email",
|
|
42
47
|
Google = "google",
|
|
@@ -50,7 +55,6 @@ type User = {
|
|
|
50
55
|
lastName: string;
|
|
51
56
|
emailVerified: boolean;
|
|
52
57
|
mobileVerified: boolean;
|
|
53
|
-
role: RoleType | `${RoleType}`;
|
|
54
58
|
mobileNumber: string;
|
|
55
59
|
updatedAt: string;
|
|
56
60
|
createdAt: string;
|
|
@@ -67,6 +71,8 @@ type User = {
|
|
|
67
71
|
hasOnboarded?: boolean;
|
|
68
72
|
lastActivity?: string;
|
|
69
73
|
isManaged?: boolean;
|
|
74
|
+
lastLoggedInBusinessId?: string;
|
|
75
|
+
globalRole: GlobalRoles | `${GlobalRoles}`;
|
|
70
76
|
};
|
|
71
77
|
type UserAddress = {
|
|
72
78
|
id: string;
|
|
@@ -585,6 +591,19 @@ interface Vendor {
|
|
|
585
591
|
businessId: string;
|
|
586
592
|
logo?: string;
|
|
587
593
|
}
|
|
594
|
+
declare enum BusinessRole {
|
|
595
|
+
OWNER = "OWNER",
|
|
596
|
+
MANAGER = "MANAGER",
|
|
597
|
+
RIDER = "RIDER",
|
|
598
|
+
STAFF = "STAFF"
|
|
599
|
+
}
|
|
600
|
+
interface BusinessMember {
|
|
601
|
+
id: string;
|
|
602
|
+
userId: string;
|
|
603
|
+
businessId: string;
|
|
604
|
+
pgId: string;
|
|
605
|
+
role: BusinessRole | `${BusinessRole}`;
|
|
606
|
+
}
|
|
588
607
|
|
|
589
608
|
interface Customer {
|
|
590
609
|
id: string;
|
|
@@ -675,4 +694,4 @@ declare enum LinkDestination {
|
|
|
675
694
|
}
|
|
676
695
|
type NullOrUndefined = null | undefined;
|
|
677
696
|
|
|
678
|
-
export { type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, type BusinessCategory, type BusinessPg, type City, type Coupon, type Customer, DeliveryStatus, type Enterprise, type EnterpriseCategoryDoc, type EnterpriseSubCategoryDoc, EnterpriseType, type Errand, type ErrandDeliveryTiming, type ErrandPackagingQuality, type ErrandRating, type ErrandReview, type ErrandReviewLink, type ErrandRiderBehavior, ErrandStatus, type ErrandTimeline, type Invoice, InvoiceGenerationType, type InvoiceItem, InvoiceItemType, InvoiceStatus, type LatLng, LinkDestination, type Notification, type NotificationData, NotificationType, type NullOrUndefined, type PaginateResult, ParcelSize, PaymentOptions, type PendingErrand, type Rider, RoleType, type State, type Transaction, type TransactionCategory, type TransactionType, type TransactionWithCategory, type TransactionWithJoin, type User, type UserAddress, type Vehicle, type VehicleLog, type VehicleLogStatsSummary, VehicleLogType, type VehicleLogWithErrands, type VehicleLogWithRiderAndErrands, VehicleType, type VehicleWithRider, type Vendor, errandTimeline };
|
|
697
|
+
export { type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, type BusinessCategory, type BusinessMember, type BusinessPg, BusinessRole, type City, type Coupon, type Customer, DeliveryStatus, type Enterprise, type EnterpriseCategoryDoc, type EnterpriseSubCategoryDoc, EnterpriseType, type Errand, type ErrandDeliveryTiming, type ErrandPackagingQuality, type ErrandRating, type ErrandReview, type ErrandReviewLink, type ErrandRiderBehavior, ErrandStatus, type ErrandTimeline, GlobalRoles, type Invoice, InvoiceGenerationType, type InvoiceItem, InvoiceItemType, InvoiceStatus, type LatLng, LinkDestination, type Notification, type NotificationData, NotificationType, type NullOrUndefined, type PaginateResult, ParcelSize, PaymentOptions, type PendingErrand, type Rider, RoleType, type State, type Transaction, type TransactionCategory, type TransactionType, type TransactionWithCategory, type TransactionWithJoin, type User, type UserAddress, type Vehicle, type VehicleLog, type VehicleLogStatsSummary, VehicleLogType, type VehicleLogWithErrands, type VehicleLogWithRiderAndErrands, VehicleType, type VehicleWithRider, type Vendor, errandTimeline };
|
package/dist/index.d.ts
CHANGED
|
@@ -37,6 +37,11 @@ declare enum RoleType {
|
|
|
37
37
|
Admin = "admin",
|
|
38
38
|
RootAdmin = "root-admin"
|
|
39
39
|
}
|
|
40
|
+
declare enum GlobalRoles {
|
|
41
|
+
SUPER_ADMIN = "SUPER_ADMIN",
|
|
42
|
+
ADMIN = "ADMIN",
|
|
43
|
+
USER = "USER"
|
|
44
|
+
}
|
|
40
45
|
declare enum AuthType {
|
|
41
46
|
Email = "email",
|
|
42
47
|
Google = "google",
|
|
@@ -50,7 +55,6 @@ type User = {
|
|
|
50
55
|
lastName: string;
|
|
51
56
|
emailVerified: boolean;
|
|
52
57
|
mobileVerified: boolean;
|
|
53
|
-
role: RoleType | `${RoleType}`;
|
|
54
58
|
mobileNumber: string;
|
|
55
59
|
updatedAt: string;
|
|
56
60
|
createdAt: string;
|
|
@@ -67,6 +71,8 @@ type User = {
|
|
|
67
71
|
hasOnboarded?: boolean;
|
|
68
72
|
lastActivity?: string;
|
|
69
73
|
isManaged?: boolean;
|
|
74
|
+
lastLoggedInBusinessId?: string;
|
|
75
|
+
globalRole: GlobalRoles | `${GlobalRoles}`;
|
|
70
76
|
};
|
|
71
77
|
type UserAddress = {
|
|
72
78
|
id: string;
|
|
@@ -585,6 +591,19 @@ interface Vendor {
|
|
|
585
591
|
businessId: string;
|
|
586
592
|
logo?: string;
|
|
587
593
|
}
|
|
594
|
+
declare enum BusinessRole {
|
|
595
|
+
OWNER = "OWNER",
|
|
596
|
+
MANAGER = "MANAGER",
|
|
597
|
+
RIDER = "RIDER",
|
|
598
|
+
STAFF = "STAFF"
|
|
599
|
+
}
|
|
600
|
+
interface BusinessMember {
|
|
601
|
+
id: string;
|
|
602
|
+
userId: string;
|
|
603
|
+
businessId: string;
|
|
604
|
+
pgId: string;
|
|
605
|
+
role: BusinessRole | `${BusinessRole}`;
|
|
606
|
+
}
|
|
588
607
|
|
|
589
608
|
interface Customer {
|
|
590
609
|
id: string;
|
|
@@ -675,4 +694,4 @@ declare enum LinkDestination {
|
|
|
675
694
|
}
|
|
676
695
|
type NullOrUndefined = null | undefined;
|
|
677
696
|
|
|
678
|
-
export { type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, type BusinessCategory, type BusinessPg, type City, type Coupon, type Customer, DeliveryStatus, type Enterprise, type EnterpriseCategoryDoc, type EnterpriseSubCategoryDoc, EnterpriseType, type Errand, type ErrandDeliveryTiming, type ErrandPackagingQuality, type ErrandRating, type ErrandReview, type ErrandReviewLink, type ErrandRiderBehavior, ErrandStatus, type ErrandTimeline, type Invoice, InvoiceGenerationType, type InvoiceItem, InvoiceItemType, InvoiceStatus, type LatLng, LinkDestination, type Notification, type NotificationData, NotificationType, type NullOrUndefined, type PaginateResult, ParcelSize, PaymentOptions, type PendingErrand, type Rider, RoleType, type State, type Transaction, type TransactionCategory, type TransactionType, type TransactionWithCategory, type TransactionWithJoin, type User, type UserAddress, type Vehicle, type VehicleLog, type VehicleLogStatsSummary, VehicleLogType, type VehicleLogWithErrands, type VehicleLogWithRiderAndErrands, VehicleType, type VehicleWithRider, type Vendor, errandTimeline };
|
|
697
|
+
export { type AddressDetails, AddressTypes, type AggregatedErrand, AuthType, type Business, type BusinessCategory, type BusinessMember, type BusinessPg, BusinessRole, type City, type Coupon, type Customer, DeliveryStatus, type Enterprise, type EnterpriseCategoryDoc, type EnterpriseSubCategoryDoc, EnterpriseType, type Errand, type ErrandDeliveryTiming, type ErrandPackagingQuality, type ErrandRating, type ErrandReview, type ErrandReviewLink, type ErrandRiderBehavior, ErrandStatus, type ErrandTimeline, GlobalRoles, type Invoice, InvoiceGenerationType, type InvoiceItem, InvoiceItemType, InvoiceStatus, type LatLng, LinkDestination, type Notification, type NotificationData, NotificationType, type NullOrUndefined, type PaginateResult, ParcelSize, PaymentOptions, type PendingErrand, type Rider, RoleType, type State, type Transaction, type TransactionCategory, type TransactionType, type TransactionWithCategory, type TransactionWithJoin, type User, type UserAddress, type Vehicle, type VehicleLog, type VehicleLogStatsSummary, VehicleLogType, type VehicleLogWithErrands, type VehicleLogWithRiderAndErrands, VehicleType, type VehicleWithRider, type Vendor, errandTimeline };
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,12 @@ var RoleType = /* @__PURE__ */ ((RoleType2) => {
|
|
|
8
8
|
RoleType2["RootAdmin"] = "root-admin";
|
|
9
9
|
return RoleType2;
|
|
10
10
|
})(RoleType || {});
|
|
11
|
+
var GlobalRoles = /* @__PURE__ */ ((GlobalRoles2) => {
|
|
12
|
+
GlobalRoles2["SUPER_ADMIN"] = "SUPER_ADMIN";
|
|
13
|
+
GlobalRoles2["ADMIN"] = "ADMIN";
|
|
14
|
+
GlobalRoles2["USER"] = "USER";
|
|
15
|
+
return GlobalRoles2;
|
|
16
|
+
})(GlobalRoles || {});
|
|
11
17
|
var AuthType = /* @__PURE__ */ ((AuthType2) => {
|
|
12
18
|
AuthType2["Email"] = "email";
|
|
13
19
|
AuthType2["Google"] = "google";
|
|
@@ -134,6 +140,15 @@ var EnterpriseType = /* @__PURE__ */ ((EnterpriseType2) => {
|
|
|
134
140
|
return EnterpriseType2;
|
|
135
141
|
})(EnterpriseType || {});
|
|
136
142
|
|
|
143
|
+
// src/business.ts
|
|
144
|
+
var BusinessRole = /* @__PURE__ */ ((BusinessRole2) => {
|
|
145
|
+
BusinessRole2["OWNER"] = "OWNER";
|
|
146
|
+
BusinessRole2["MANAGER"] = "MANAGER";
|
|
147
|
+
BusinessRole2["RIDER"] = "RIDER";
|
|
148
|
+
BusinessRole2["STAFF"] = "STAFF";
|
|
149
|
+
return BusinessRole2;
|
|
150
|
+
})(BusinessRole || {});
|
|
151
|
+
|
|
137
152
|
// src/index.ts
|
|
138
153
|
var LinkDestination = /* @__PURE__ */ ((LinkDestination2) => {
|
|
139
154
|
LinkDestination2["Website"] = "web";
|
|
@@ -144,9 +159,11 @@ var LinkDestination = /* @__PURE__ */ ((LinkDestination2) => {
|
|
|
144
159
|
export {
|
|
145
160
|
AddressTypes,
|
|
146
161
|
AuthType,
|
|
162
|
+
BusinessRole,
|
|
147
163
|
DeliveryStatus,
|
|
148
164
|
EnterpriseType,
|
|
149
165
|
ErrandStatus,
|
|
166
|
+
GlobalRoles,
|
|
150
167
|
InvoiceGenerationType,
|
|
151
168
|
InvoiceItemType,
|
|
152
169
|
InvoiceStatus,
|
package/package.json
CHANGED
package/src/business.ts
CHANGED
|
@@ -64,3 +64,20 @@ export interface Vendor {
|
|
|
64
64
|
businessId: string;
|
|
65
65
|
logo?: string;
|
|
66
66
|
}
|
|
67
|
+
|
|
68
|
+
export enum BusinessRole {
|
|
69
|
+
OWNER = 'OWNER',
|
|
70
|
+
// ADMIN = 'ADMIN', // Reserved for future use
|
|
71
|
+
MANAGER = 'MANAGER',
|
|
72
|
+
RIDER = 'RIDER',
|
|
73
|
+
STAFF = 'STAFF',
|
|
74
|
+
// MEMBER = 'MEMBER', // Reserved for future use
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface BusinessMember {
|
|
78
|
+
id: string;
|
|
79
|
+
userId: string;
|
|
80
|
+
businessId: string;
|
|
81
|
+
pgId: string;
|
|
82
|
+
role: BusinessRole | `${BusinessRole}`;
|
|
83
|
+
}
|
package/src/user.ts
CHANGED
|
@@ -9,6 +9,12 @@ export enum RoleType {
|
|
|
9
9
|
RootAdmin = 'root-admin',
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
export enum GlobalRoles {
|
|
13
|
+
SUPER_ADMIN = 'SUPER_ADMIN',
|
|
14
|
+
ADMIN = 'ADMIN',
|
|
15
|
+
USER = 'USER',
|
|
16
|
+
}
|
|
17
|
+
|
|
12
18
|
export enum AuthType {
|
|
13
19
|
Email = 'email',
|
|
14
20
|
Google = 'google',
|
|
@@ -23,7 +29,6 @@ export type User = {
|
|
|
23
29
|
lastName: string;
|
|
24
30
|
emailVerified: boolean;
|
|
25
31
|
mobileVerified: boolean;
|
|
26
|
-
role: RoleType | `${RoleType}`;
|
|
27
32
|
mobileNumber: string;
|
|
28
33
|
updatedAt: string;
|
|
29
34
|
createdAt: string;
|
|
@@ -40,6 +45,8 @@ export type User = {
|
|
|
40
45
|
hasOnboarded?: boolean;
|
|
41
46
|
lastActivity?: string;
|
|
42
47
|
isManaged?: boolean;
|
|
48
|
+
lastLoggedInBusinessId?: string;
|
|
49
|
+
globalRole: GlobalRoles | `${GlobalRoles}`;
|
|
43
50
|
};
|
|
44
51
|
|
|
45
52
|
export type UserAddress = {
|