@mydoormot/app-types 1.1.9 → 1.2.1

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.1.8 build /Users/chuksben/Desktop/projects/microservices/mydoormot/packages/app-types
2
+ > @mydoormot/app-types@1.2.0 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.51 KB
11
- CJS ⚡️ Build success in 57ms
12
10
  DTS Build start
13
- DTS ⚡️ Build success in 737ms
14
- DTS dist/index.d.ts 10.04 KB
11
+ CJS dist/index.js 5.64 KB
12
+ CJS ⚡️ Build success in 359ms
13
+ DTS ⚡️ Build success in 761ms
14
+ DTS dist/index.d.ts 11.28 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @mydoormot/app-types
2
2
 
3
+ ## 1.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Added business types
8
+
9
+ ## 1.2.0
10
+
11
+ ### Minor Changes
12
+
13
+ - Added errand patch
14
+
15
+ ## 1.1.10
16
+
17
+ ### Patch Changes
18
+
19
+ - Modified app types
20
+
3
21
  ## 1.1.9
4
22
 
5
23
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -23,6 +23,7 @@ type State = {
23
23
  coordinates: number[];
24
24
  };
25
25
  alias: string;
26
+ version: number;
26
27
  updatedAt: Date;
27
28
  createdAt: Date;
28
29
  };
@@ -64,6 +65,7 @@ type User = {
64
65
  appleUserId?: string;
65
66
  accountType?: 'business' | 'personal';
66
67
  hasOnboarded?: boolean;
68
+ lastActivity?: string;
67
69
  };
68
70
  type UserAddress = {
69
71
  id: string;
@@ -107,6 +109,7 @@ type Enterprise = {
107
109
  name: string;
108
110
  city: string;
109
111
  verified: boolean;
112
+ mobileNumber?: string;
110
113
  enterpriseType: EnterpriseType | `${EnterpriseType}`;
111
114
  deleted: boolean;
112
115
  updatedAt: Date;
@@ -151,6 +154,7 @@ interface EnterpriseSubCategoryDoc {
151
154
 
152
155
  declare enum InvoiceStatus {
153
156
  Pending = "pending",
157
+ Processing = "processing",
154
158
  Paid = "paid",
155
159
  Cancelled = "cancelled",
156
160
  Failed = "failed"
@@ -274,11 +278,12 @@ interface PendingErrand {
274
278
  };
275
279
  errandTimeline: string;
276
280
  id: string;
281
+ ownerMobileNumber?: string;
277
282
  }
278
283
  interface Errand {
279
284
  id: string;
280
285
  rider: string | Rider;
281
- customerId: string | User;
286
+ customerId?: string | User;
282
287
  nameOfItem: string;
283
288
  pickupDetails: AddressDetails;
284
289
  deliveryDetails: AddressDetails;
@@ -292,7 +297,6 @@ interface Errand {
292
297
  invoiceId?: string | Invoice;
293
298
  };
294
299
  aliasId: string;
295
- errandTimeline: string | ErrandTimeline;
296
300
  updatedAt: Date;
297
301
  createdAt: Date;
298
302
  errandRating?: string | ErrandRating;
@@ -303,6 +307,8 @@ interface Errand {
303
307
  couponPrice?: number;
304
308
  price: number;
305
309
  coupon?: string | Coupon;
310
+ ownerMobileNumber?: string;
311
+ errandTimeline?: string | ErrandTimeline;
306
312
  }
307
313
  interface AggragatedErrand extends Errand {
308
314
  parcelSize: `${ParcelSize}`;
@@ -394,10 +400,12 @@ type AddressDetails = {
394
400
 
395
401
  declare enum NotificationType {
396
402
  Errand = "errand",
397
- ErrandTimeline = "errand-timeline"
403
+ ErrandTimeline = "errand-timeline",
404
+ Coupon = "coupon",
405
+ Campaign = "campaign"
398
406
  }
399
407
  interface NotificationData {
400
- notificationType: NotificationType;
408
+ notificationType: NotificationType | `${NotificationType}`;
401
409
  id: string;
402
410
  }
403
411
  type Notification = {
@@ -406,14 +414,41 @@ type Notification = {
406
414
  user: string;
407
415
  description: string;
408
416
  isRead: boolean;
409
- notificationData: {
410
- notificationType: NotificationType | `${NotificationType}`;
411
- id: string;
412
- };
417
+ notificationData: NotificationData;
413
418
  createdAt: string;
414
419
  updatedAt: string;
415
420
  };
416
421
 
422
+ interface Business {
423
+ pgId: string;
424
+ seqId: number;
425
+ userId: string;
426
+ name: string;
427
+ description: string;
428
+ officeNumber: string;
429
+ categoryId: string;
430
+ address: string | NullOrUndefined;
431
+ addressCoordinates: number[] | NullOrUndefined | [number, number];
432
+ loggedIn: boolean | NullOrUndefined;
433
+ slug: string;
434
+ verified: boolean | NullOrUndefined;
435
+ isVirtual: boolean | NullOrUndefined;
436
+ registrationCompleted: boolean | NullOrUndefined;
437
+ stateId: string | NullOrUndefined;
438
+ cityId: string | NullOrUndefined;
439
+ orginalLogoUrl: string | NullOrUndefined;
440
+ logoUrl: string | NullOrUndefined;
441
+ logoBlurHash: string | NullOrUndefined;
442
+ coverImageUrl: string | NullOrUndefined;
443
+ orginalCoverImageUrl: string | NullOrUndefined;
444
+ coverImageBlurHash: string | NullOrUndefined;
445
+ createdAt: string | Date;
446
+ updatedAt: string | NullOrUndefined | Date;
447
+ verifiedAt: string | NullOrUndefined | Date;
448
+ registrationCompletedAt: string | NullOrUndefined | Date;
449
+ version: number;
450
+ }
451
+
417
452
  interface PaginateResult<T> {
418
453
  docs: T[];
419
454
  totalDocs: number;
@@ -434,5 +469,6 @@ declare enum LinkDestination {
434
469
  MainApp = "mydoormot:app",
435
470
  RiderApp = "mydoormot:rider"
436
471
  }
472
+ type NullOrUndefined = null | undefined;
437
473
 
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 };
474
+ export { AddressDetails, AddressTypes, AggragatedErrand, AuthType, Business, City, Coupon, DeliveryStatus, Enterprise, EnterpriseCategoryDoc, EnterpriseSubCategoryDoc, EnterpriseType, Errand, ErrandRating, ErrandStatus, ErrandTimeline, Invoice, InvoiceStatus, LatLng, LinkDestination, Notification, NotificationData, NotificationType, NullOrUndefined, 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";
@@ -129,6 +130,8 @@ var PaymentOptions = /* @__PURE__ */ ((PaymentOptions2) => {
129
130
  var NotificationType = /* @__PURE__ */ ((NotificationType2) => {
130
131
  NotificationType2["Errand"] = "errand";
131
132
  NotificationType2["ErrandTimeline"] = "errand-timeline";
133
+ NotificationType2["Coupon"] = "coupon";
134
+ NotificationType2["Campaign"] = "campaign";
132
135
  return NotificationType2;
133
136
  })(NotificationType || {});
134
137
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mydoormot/app-types",
3
- "version": "1.1.9",
3
+ "version": "1.2.1",
4
4
  "description": "",
5
5
  "mains": "./dist/index.js",
6
6
  "typess": "./dist/index.d.ts",
@@ -0,0 +1,36 @@
1
+ import { NullOrUndefined } from '.';
2
+
3
+ export interface Business {
4
+ pgId: string;
5
+ seqId: number;
6
+ userId: string;
7
+ name: string;
8
+ description: string;
9
+ officeNumber: string;
10
+ categoryId: string;
11
+
12
+ address: string | NullOrUndefined;
13
+ addressCoordinates: number[] | NullOrUndefined | [number, number];
14
+ loggedIn: boolean | NullOrUndefined;
15
+
16
+ slug: string;
17
+ verified: boolean | NullOrUndefined;
18
+ isVirtual: boolean | NullOrUndefined;
19
+ registrationCompleted: boolean | NullOrUndefined;
20
+ stateId: string | NullOrUndefined;
21
+ cityId: string | NullOrUndefined;
22
+
23
+ orginalLogoUrl: string | NullOrUndefined;
24
+ logoUrl: string | NullOrUndefined;
25
+ logoBlurHash: string | NullOrUndefined;
26
+
27
+ coverImageUrl: string | NullOrUndefined;
28
+ orginalCoverImageUrl: string | NullOrUndefined;
29
+ coverImageBlurHash: string | NullOrUndefined;
30
+
31
+ createdAt: string | Date;
32
+ updatedAt: string | NullOrUndefined | Date;
33
+ verifiedAt: string | NullOrUndefined | Date;
34
+ registrationCompletedAt: string | NullOrUndefined | Date;
35
+ version: number;
36
+ }
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;
package/src/errand.ts CHANGED
@@ -100,12 +100,13 @@ export interface PendingErrand {
100
100
  };
101
101
  errandTimeline: string;
102
102
  id: string;
103
+ ownerMobileNumber?: string;
103
104
  }
104
105
 
105
106
  export interface Errand {
106
107
  id: string;
107
108
  rider: string | Rider;
108
- customerId: string | User;
109
+ customerId?: string | User;
109
110
  nameOfItem: string;
110
111
  pickupDetails: AddressDetails;
111
112
  deliveryDetails: AddressDetails;
@@ -119,7 +120,6 @@ export interface Errand {
119
120
  invoiceId?: string | Invoice;
120
121
  };
121
122
  aliasId: string;
122
- errandTimeline: string | ErrandTimeline;
123
123
  updatedAt: Date;
124
124
  createdAt: Date;
125
125
  errandRating?: string | ErrandRating;
@@ -130,6 +130,8 @@ export interface Errand {
130
130
  couponPrice?: number;
131
131
  price: number;
132
132
  coupon?: string | Coupon;
133
+ ownerMobileNumber?: string;
134
+ errandTimeline?: string | ErrandTimeline;
133
135
  }
134
136
 
135
137
  export interface AggragatedErrand extends Errand {
package/src/index.ts CHANGED
@@ -20,6 +20,8 @@ export enum LinkDestination {
20
20
  RiderApp = 'mydoormot:rider',
21
21
  }
22
22
 
23
+ export type NullOrUndefined = null | undefined;
24
+
23
25
  export * from './user';
24
26
  export * from './errand';
25
27
  export * from './location';
@@ -28,3 +30,4 @@ export * from './notification';
28
30
  export * from './rider';
29
31
  export * from './enterprise';
30
32
  export * from './coupon';
33
+ export * from './business';
package/src/invoice.ts CHANGED
@@ -2,6 +2,7 @@ import { EnterpriseType } from './enterprise';
2
2
 
3
3
  export enum InvoiceStatus {
4
4
  Pending = 'pending',
5
+ Processing = 'processing',
5
6
  Paid = 'paid',
6
7
  Cancelled = 'cancelled',
7
8
  Failed = 'failed',
package/src/location.ts CHANGED
@@ -25,6 +25,7 @@ export type State = {
25
25
  coordinates: number[];
26
26
  };
27
27
  alias: string;
28
+ version: number;
28
29
  updatedAt: Date;
29
30
  createdAt: Date;
30
31
  };
@@ -1,10 +1,12 @@
1
1
  export enum NotificationType {
2
2
  Errand = 'errand',
3
3
  ErrandTimeline = 'errand-timeline',
4
+ Coupon = 'coupon',
5
+ Campaign = 'campaign',
4
6
  }
5
7
 
6
8
  export interface NotificationData {
7
- notificationType: NotificationType;
9
+ notificationType: NotificationType | `${NotificationType}`;
8
10
  id: string;
9
11
  }
10
12
 
@@ -15,10 +17,7 @@ export type Notification = {
15
17
  user: string;
16
18
  description: string;
17
19
  isRead: boolean;
18
- notificationData: {
19
- notificationType: NotificationType | `${NotificationType}`;
20
- id: string;
21
- };
20
+ notificationData: NotificationData;
22
21
  createdAt: string;
23
22
  updatedAt: string;
24
23
  };
package/src/user.ts CHANGED
@@ -38,6 +38,7 @@ export type User = {
38
38
  appleUserId?: string;
39
39
  accountType?: 'business' | 'personal';
40
40
  hasOnboarded?: boolean;
41
+ lastActivity?: string;
41
42
  };
42
43
 
43
44
  export type UserAddress = {