@mydoormot/app-types 1.1.2 → 1.1.4

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,13 +1,11 @@
1
- yarn run v1.22.19
2
1
  $ tsup src/index.ts --format cjs --dts
3
2
  CLI Building entry: src/index.ts
4
3
  CLI Using tsconfig: tsconfig.json
5
4
  CLI tsup v7.2.0
6
5
  CLI Target: node16
7
6
  CJS Build start
8
- CJS dist/index.js 4.42 KB
9
- CJS ⚡️ Build success in 81ms
7
+ CJS dist/index.js 4.72 KB
8
+ CJS ⚡️ Build success in 83ms
10
9
  DTS Build start
11
- DTS ⚡️ Build success in 3187ms
12
- DTS dist/index.d.ts 7.72 KB
13
- Done in 4.76s.
10
+ DTS ⚡️ Build success in 1977ms
11
+ DTS dist/index.d.ts 8.43 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @mydoormot/app-types
2
2
 
3
+ ## 1.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Added notification type
8
+
9
+ ## 1.1.3
10
+
11
+ ### Patch Changes
12
+
13
+ - Added rating to errand
14
+
3
15
  ## 1.1.2
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -219,8 +219,17 @@ interface Rider {
219
219
  currLocation?: {
220
220
  coordinates: number[];
221
221
  };
222
- active: boolean;
223
222
  name?: string;
223
+ vehicle: string;
224
+ vehicleNumber: string;
225
+ verified: boolean;
226
+ active: boolean;
227
+ updatedAt: Date;
228
+ createdAt: Date;
229
+ rating?: number;
230
+ hasBeenRated: boolean;
231
+ enterprise: string;
232
+ isTracking: boolean;
224
233
  }
225
234
  interface ActiveRider {
226
235
  _id: string;
@@ -325,6 +334,28 @@ type State = {
325
334
  };
326
335
  type LatLng = `${number},${number}`;
327
336
 
337
+ declare enum NotificationType {
338
+ Errand = "errand",
339
+ ErrandTimeline = "errand-timeline"
340
+ }
341
+ interface NotificationData {
342
+ notificationType: NotificationType;
343
+ id: string;
344
+ }
345
+ type Notification = {
346
+ id: string;
347
+ title: string;
348
+ user: string;
349
+ description: string;
350
+ isRead: boolean;
351
+ notificationData: {
352
+ notificationType: NotificationType | `${NotificationType}`;
353
+ id: string;
354
+ };
355
+ createdAt: string;
356
+ updatedAt: string;
357
+ };
358
+
328
359
  interface PaginateResult<T> {
329
360
  docs: T[];
330
361
  totalDocs: number;
@@ -341,4 +372,4 @@ interface PaginateResult<T> {
341
372
  [customLabel: string]: T[] | number | boolean | null | undefined;
342
373
  }
343
374
 
344
- export { ActiveRider, AddressDetails, AddressTypes, AggragatedErrand, AuthType, City, DeliveryStatus, Errand, ErrandRating, ErrandStatus, ErrandTimeline, Invoice, InvoiceStatus, LatLng, PaginateResult, ParcelSize, PaymentOptions, PendingErrand, Rider, RoleType, State, User, UserAddress, errandTimeline };
375
+ export { ActiveRider, AddressDetails, AddressTypes, AggragatedErrand, AuthType, City, DeliveryStatus, Errand, ErrandRating, ErrandStatus, ErrandTimeline, Invoice, InvoiceStatus, LatLng, Notification, NotificationData, NotificationType, PaginateResult, ParcelSize, PaymentOptions, PendingErrand, Rider, RoleType, State, User, UserAddress, errandTimeline };
package/dist/index.js CHANGED
@@ -25,6 +25,7 @@ __export(src_exports, {
25
25
  DeliveryStatus: () => DeliveryStatus,
26
26
  ErrandStatus: () => ErrandStatus,
27
27
  InvoiceStatus: () => InvoiceStatus,
28
+ NotificationType: () => NotificationType,
28
29
  ParcelSize: () => ParcelSize,
29
30
  PaymentOptions: () => PaymentOptions,
30
31
  RoleType: () => RoleType,
@@ -119,6 +120,13 @@ var PaymentOptions = /* @__PURE__ */ ((PaymentOptions2) => {
119
120
  PaymentOptions2["Card"] = "card";
120
121
  return PaymentOptions2;
121
122
  })(PaymentOptions || {});
123
+
124
+ // src/notification.ts
125
+ var NotificationType = /* @__PURE__ */ ((NotificationType2) => {
126
+ NotificationType2["Errand"] = "errand";
127
+ NotificationType2["ErrandTimeline"] = "errand-timeline";
128
+ return NotificationType2;
129
+ })(NotificationType || {});
122
130
  // Annotate the CommonJS export names for ESM import in node:
123
131
  0 && (module.exports = {
124
132
  AddressTypes,
@@ -126,6 +134,7 @@ var PaymentOptions = /* @__PURE__ */ ((PaymentOptions2) => {
126
134
  DeliveryStatus,
127
135
  ErrandStatus,
128
136
  InvoiceStatus,
137
+ NotificationType,
129
138
  ParcelSize,
130
139
  PaymentOptions,
131
140
  RoleType,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mydoormot/app-types",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
package/src/errand.ts CHANGED
@@ -189,8 +189,17 @@ export interface Rider {
189
189
  currLocation?: {
190
190
  coordinates: number[];
191
191
  };
192
- active: boolean;
193
192
  name?: string;
193
+ vehicle: string;
194
+ vehicleNumber: string;
195
+ verified: boolean;
196
+ active: boolean;
197
+ updatedAt: Date;
198
+ createdAt: Date;
199
+ rating?: number;
200
+ hasBeenRated: boolean; // NOTE: This tells app if the rider has an existing rating
201
+ enterprise: string;
202
+ isTracking: boolean;
194
203
  }
195
204
 
196
205
  export interface ActiveRider {
package/src/index.ts CHANGED
@@ -18,3 +18,4 @@ export * from './user';
18
18
  export * from './errand';
19
19
  export * from './location';
20
20
  export * from './invoice';
21
+ export * from './notification';
@@ -7,3 +7,18 @@ export interface NotificationData {
7
7
  notificationType: NotificationType;
8
8
  id: string;
9
9
  }
10
+
11
+ export type Notification = {
12
+ id: string;
13
+
14
+ title: string;
15
+ user: string;
16
+ description: string;
17
+ isRead: boolean;
18
+ notificationData: {
19
+ notificationType: NotificationType | `${NotificationType}`;
20
+ id: string;
21
+ };
22
+ createdAt: string;
23
+ updatedAt: string;
24
+ };