@mydoormot/app-types 1.1.3 → 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 92ms
7
+ CJS dist/index.js 4.72 KB
8
+ CJS ⚡️ Build success in 83ms
10
9
  DTS Build start
11
- DTS ⚡️ Build success in 1800ms
12
- DTS dist/index.d.ts 7.92 KB
13
- Done in 3.55s.
10
+ DTS ⚡️ Build success in 1977ms
11
+ DTS dist/index.d.ts 8.43 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @mydoormot/app-types
2
2
 
3
+ ## 1.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Added notification type
8
+
3
9
  ## 1.1.3
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -334,6 +334,28 @@ type State = {
334
334
  };
335
335
  type LatLng = `${number},${number}`;
336
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
+
337
359
  interface PaginateResult<T> {
338
360
  docs: T[];
339
361
  totalDocs: number;
@@ -350,4 +372,4 @@ interface PaginateResult<T> {
350
372
  [customLabel: string]: T[] | number | boolean | null | undefined;
351
373
  }
352
374
 
353
- 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.3",
3
+ "version": "1.1.4",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
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
+ };