@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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @mydoormot/app-types@1.7.0 build /Users/chuksben/Desktop/projects/microservices/mydoormot/packages/app-types
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
  CLI Building entry: src/index.ts
@@ -8,11 +8,11 @@
8
8
  CLI Target: es2021
9
9
  ESM Build start
10
10
  CJS Build start
11
- ESM dist/index.js 5.37 KB
12
- ESM ⚡️ Build success in 196ms
13
- CJS dist/index.cjs 6.93 KB
14
- CJS ⚡️ Build success in 196ms
11
+ CJS dist/index.cjs 7.51 KB
12
+ CJS ⚡️ Build success in 70ms
13
+ ESM dist/index.js 5.88 KB
14
+ ESM ⚡️ Build success in 70ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 977ms
17
- DTS dist/index.d.ts 16.87 KB
18
- DTS dist/index.d.cts 16.87 KB
16
+ DTS ⚡️ Build success in 1077ms
17
+ DTS dist/index.d.ts 17.32 KB
18
+ DTS dist/index.d.cts 17.32 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @mydoormot/app-types
2
2
 
3
+ ## 1.7.3
4
+
5
+ ### Patch Changes
6
+
7
+ - removed role from user type
8
+
9
+ ## 1.7.2
10
+
11
+ ### Patch Changes
12
+
13
+ - Added business members
14
+
3
15
  ## 1.7.1
4
16
 
5
17
  ### Patch Changes
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mydoormot/app-types",
3
- "version": "1.7.1",
3
+ "version": "1.7.3",
4
4
  "description": "",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
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 = {