@mydoormot/app-types 1.1.10 → 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.9 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.55 KB
11
- CJS ⚡️ Build success in 64ms
12
10
  DTS Build start
13
- DTS ⚡️ Build success in 536ms
14
- DTS dist/index.d.ts 10.09 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,17 @@
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
+
3
15
  ## 1.1.10
4
16
 
5
17
  ### 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;
@@ -276,11 +278,12 @@ interface PendingErrand {
276
278
  };
277
279
  errandTimeline: string;
278
280
  id: string;
281
+ ownerMobileNumber?: string;
279
282
  }
280
283
  interface Errand {
281
284
  id: string;
282
285
  rider: string | Rider;
283
- customerId: string | User;
286
+ customerId?: string | User;
284
287
  nameOfItem: string;
285
288
  pickupDetails: AddressDetails;
286
289
  deliveryDetails: AddressDetails;
@@ -294,7 +297,6 @@ interface Errand {
294
297
  invoiceId?: string | Invoice;
295
298
  };
296
299
  aliasId: string;
297
- errandTimeline: string | ErrandTimeline;
298
300
  updatedAt: Date;
299
301
  createdAt: Date;
300
302
  errandRating?: string | ErrandRating;
@@ -305,6 +307,8 @@ interface Errand {
305
307
  couponPrice?: number;
306
308
  price: number;
307
309
  coupon?: string | Coupon;
310
+ ownerMobileNumber?: string;
311
+ errandTimeline?: string | ErrandTimeline;
308
312
  }
309
313
  interface AggragatedErrand extends Errand {
310
314
  parcelSize: `${ParcelSize}`;
@@ -396,10 +400,12 @@ type AddressDetails = {
396
400
 
397
401
  declare enum NotificationType {
398
402
  Errand = "errand",
399
- ErrandTimeline = "errand-timeline"
403
+ ErrandTimeline = "errand-timeline",
404
+ Coupon = "coupon",
405
+ Campaign = "campaign"
400
406
  }
401
407
  interface NotificationData {
402
- notificationType: NotificationType;
408
+ notificationType: NotificationType | `${NotificationType}`;
403
409
  id: string;
404
410
  }
405
411
  type Notification = {
@@ -408,14 +414,41 @@ type Notification = {
408
414
  user: string;
409
415
  description: string;
410
416
  isRead: boolean;
411
- notificationData: {
412
- notificationType: NotificationType | `${NotificationType}`;
413
- id: string;
414
- };
417
+ notificationData: NotificationData;
415
418
  createdAt: string;
416
419
  updatedAt: string;
417
420
  };
418
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
+
419
452
  interface PaginateResult<T> {
420
453
  docs: T[];
421
454
  totalDocs: number;
@@ -436,5 +469,6 @@ declare enum LinkDestination {
436
469
  MainApp = "mydoormot:app",
437
470
  RiderApp = "mydoormot:rider"
438
471
  }
472
+ type NullOrUndefined = null | undefined;
439
473
 
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 };
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
@@ -130,6 +130,8 @@ var PaymentOptions = /* @__PURE__ */ ((PaymentOptions2) => {
130
130
  var NotificationType = /* @__PURE__ */ ((NotificationType2) => {
131
131
  NotificationType2["Errand"] = "errand";
132
132
  NotificationType2["ErrandTimeline"] = "errand-timeline";
133
+ NotificationType2["Coupon"] = "coupon";
134
+ NotificationType2["Campaign"] = "campaign";
133
135
  return NotificationType2;
134
136
  })(NotificationType || {});
135
137
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mydoormot/app-types",
3
- "version": "1.1.10",
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/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/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 = {