@mydoormot/app-types 1.7.0 → 1.7.2

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.6.5 build /Users/chuksben/Desktop/projects/microservices/mydoormot/packages/app-types
2
+ > @mydoormot/app-types@1.7.1 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
- CJS dist/index.cjs 6.93 KB
12
- CJS ⚡️ Build success in 445ms
13
- ESM dist/index.js 5.37 KB
14
- ESM ⚡️ Build success in 446ms
11
+ CJS dist/index.cjs 7.51 KB
12
+ CJS ⚡️ Build success in 176ms
13
+ ESM dist/index.js 5.88 KB
14
+ ESM ⚡️ Build success in 176ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 2040ms
17
- DTS dist/index.d.ts 16.71 KB
18
- DTS dist/index.d.cts 16.71 KB
16
+ DTS ⚡️ Build success in 1002ms
17
+ DTS dist/index.d.ts 17.36 KB
18
+ DTS dist/index.d.cts 17.36 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @mydoormot/app-types
2
2
 
3
+ ## 1.7.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Added business members
8
+
9
+ ## 1.7.1
10
+
11
+ ### Patch Changes
12
+
13
+ - Added vendor to response
14
+
3
15
  ## 1.7.0
4
16
 
5
17
  ### Minor 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",
@@ -67,6 +72,8 @@ type User = {
67
72
  hasOnboarded?: boolean;
68
73
  lastActivity?: string;
69
74
  isManaged?: boolean;
75
+ lastLoggedInBusinessId?: string;
76
+ globalRole: GlobalRoles | `${GlobalRoles}`;
70
77
  };
71
78
  type UserAddress = {
72
79
  id: string;
@@ -478,6 +485,7 @@ type AddressDetails = {
478
485
  coordinates: number[];
479
486
  };
480
487
  mobileNumber?: string;
488
+ alternateMobileNumber?: string;
481
489
  landmark?: string;
482
490
  addressId?: string;
483
491
  };
@@ -577,6 +585,26 @@ interface BusinessCategory {
577
585
  createdAt: string;
578
586
  updatedAt: string;
579
587
  }
588
+ interface Vendor {
589
+ id: string;
590
+ name: string;
591
+ handle: string;
592
+ businessId: string;
593
+ logo?: string;
594
+ }
595
+ declare enum BusinessRole {
596
+ OWNER = "OWNER",
597
+ MANAGER = "MANAGER",
598
+ RIDER = "RIDER",
599
+ STAFF = "STAFF"
600
+ }
601
+ interface BusinessMember {
602
+ id: string;
603
+ userId: string;
604
+ businessId: string;
605
+ pgId: string;
606
+ role: BusinessRole | `${BusinessRole}`;
607
+ }
580
608
 
581
609
  interface Customer {
582
610
  id: string;
@@ -667,4 +695,4 @@ declare enum LinkDestination {
667
695
  }
668
696
  type NullOrUndefined = null | undefined;
669
697
 
670
- 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, errandTimeline };
698
+ 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",
@@ -67,6 +72,8 @@ type User = {
67
72
  hasOnboarded?: boolean;
68
73
  lastActivity?: string;
69
74
  isManaged?: boolean;
75
+ lastLoggedInBusinessId?: string;
76
+ globalRole: GlobalRoles | `${GlobalRoles}`;
70
77
  };
71
78
  type UserAddress = {
72
79
  id: string;
@@ -478,6 +485,7 @@ type AddressDetails = {
478
485
  coordinates: number[];
479
486
  };
480
487
  mobileNumber?: string;
488
+ alternateMobileNumber?: string;
481
489
  landmark?: string;
482
490
  addressId?: string;
483
491
  };
@@ -577,6 +585,26 @@ interface BusinessCategory {
577
585
  createdAt: string;
578
586
  updatedAt: string;
579
587
  }
588
+ interface Vendor {
589
+ id: string;
590
+ name: string;
591
+ handle: string;
592
+ businessId: string;
593
+ logo?: string;
594
+ }
595
+ declare enum BusinessRole {
596
+ OWNER = "OWNER",
597
+ MANAGER = "MANAGER",
598
+ RIDER = "RIDER",
599
+ STAFF = "STAFF"
600
+ }
601
+ interface BusinessMember {
602
+ id: string;
603
+ userId: string;
604
+ businessId: string;
605
+ pgId: string;
606
+ role: BusinessRole | `${BusinessRole}`;
607
+ }
580
608
 
581
609
  interface Customer {
582
610
  id: string;
@@ -667,4 +695,4 @@ declare enum LinkDestination {
667
695
  }
668
696
  type NullOrUndefined = null | undefined;
669
697
 
670
- 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, errandTimeline };
698
+ 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.0",
3
+ "version": "1.7.2",
4
4
  "description": "",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
package/src/business.ts CHANGED
@@ -56,3 +56,28 @@ export interface BusinessCategory {
56
56
  createdAt: string;
57
57
  updatedAt: string;
58
58
  }
59
+
60
+ export interface Vendor {
61
+ id: string;
62
+ name: string;
63
+ handle: string;
64
+ businessId: string;
65
+ logo?: string;
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/errand.ts CHANGED
@@ -244,6 +244,7 @@ export type AddressDetails = {
244
244
  coordinates: number[];
245
245
  };
246
246
  mobileNumber?: string;
247
+ alternateMobileNumber?: string;
247
248
  landmark?: string;
248
249
  addressId?: string;
249
250
  };
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',
@@ -40,6 +46,8 @@ export type User = {
40
46
  hasOnboarded?: boolean;
41
47
  lastActivity?: string;
42
48
  isManaged?: boolean;
49
+ lastLoggedInBusinessId?: string;
50
+ globalRole: GlobalRoles | `${GlobalRoles}`;
43
51
  };
44
52
 
45
53
  export type UserAddress = {