@mydoormot/app-types 1.1.7 → 1.1.8

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.6 build /Users/chuksben/Desktop/projects/microservices/mydoormot/packages/app-types
2
+ > @mydoormot/app-types@1.1.7 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.41 KB
11
- CJS ⚡️ Build success in 61ms
10
+ CJS dist/index.js 5.51 KB
11
+ CJS ⚡️ Build success in 28ms
12
12
  DTS Build start
13
- DTS ⚡️ Build success in 721ms
14
- DTS dist/index.d.ts 8.90 KB
13
+ DTS ⚡️ Build success in 879ms
14
+ DTS dist/index.d.ts 9.31 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @mydoormot/app-types
2
2
 
3
+ ## 1.1.8
4
+
5
+ ### Patch Changes
6
+
7
+ - Modified coupon types
8
+
3
9
  ## 1.1.7
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -31,8 +31,10 @@ type LatLng = `${number},${number}`;
31
31
  declare enum RoleType {
32
32
  Rider = "rider",
33
33
  User = "user",
34
- RootAdmin = "root-admin",
35
- Admin = "admin"
34
+ EnterpriseAdmin = "enterprise-admin",
35
+ EnterpriseUser = "enterprise-user",
36
+ Admin = "admin",
37
+ RootAdmin = "root-admin"
36
38
  }
37
39
  declare enum AuthType {
38
40
  Email = "email",
@@ -255,7 +257,9 @@ interface Errand {
255
257
  additionalData?: string;
256
258
  deliveryDate?: Date;
257
259
  city?: City;
258
- price?: number;
260
+ couponPrice?: number;
261
+ price: number;
262
+ coupon?: string;
259
263
  }
260
264
  interface AggragatedErrand extends Errand {
261
265
  parcelSize: `${ParcelSize}`;
@@ -367,6 +371,21 @@ type Notification = {
367
371
  updatedAt: string;
368
372
  };
369
373
 
374
+ interface Coupon {
375
+ id: string;
376
+ phoneNumber: string;
377
+ couponType: 'errand';
378
+ isUsed: boolean;
379
+ expiresAt: Date;
380
+ couponCode: string;
381
+ updatedAt: Date;
382
+ createdAt: Date;
383
+ hasExpired: boolean;
384
+ couponValue: number;
385
+ ref?: string;
386
+ fullName?: string;
387
+ }
388
+
370
389
  interface PaginateResult<T> {
371
390
  docs: T[];
372
391
  totalDocs: number;
@@ -388,4 +407,4 @@ declare enum LinkDestination {
388
407
  RiderApp = "mydoormot:rider"
389
408
  }
390
409
 
391
- export { AddressDetails, AddressTypes, AggragatedErrand, AuthType, City, DeliveryStatus, Enterprise, EnterpriseType, Errand, ErrandRating, ErrandStatus, ErrandTimeline, Invoice, InvoiceStatus, LatLng, LinkDestination, Notification, NotificationData, NotificationType, PaginateResult, ParcelSize, PaymentOptions, PendingErrand, Rider, RoleType, State, User, UserAddress, Vehicle, errandTimeline };
410
+ export { AddressDetails, AddressTypes, AggragatedErrand, AuthType, City, Coupon, DeliveryStatus, Enterprise, EnterpriseType, Errand, ErrandRating, ErrandStatus, ErrandTimeline, Invoice, InvoiceStatus, LatLng, LinkDestination, Notification, NotificationData, NotificationType, PaginateResult, ParcelSize, PaymentOptions, PendingErrand, Rider, RoleType, State, User, UserAddress, Vehicle, errandTimeline };
package/dist/index.js CHANGED
@@ -39,8 +39,10 @@ module.exports = __toCommonJS(src_exports);
39
39
  var RoleType = /* @__PURE__ */ ((RoleType2) => {
40
40
  RoleType2["Rider"] = "rider";
41
41
  RoleType2["User"] = "user";
42
- RoleType2["RootAdmin"] = "root-admin";
42
+ RoleType2["EnterpriseAdmin"] = "enterprise-admin";
43
+ RoleType2["EnterpriseUser"] = "enterprise-user";
43
44
  RoleType2["Admin"] = "admin";
45
+ RoleType2["RootAdmin"] = "root-admin";
44
46
  return RoleType2;
45
47
  })(RoleType || {});
46
48
  var AuthType = /* @__PURE__ */ ((AuthType2) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mydoormot/app-types",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "description": "",
5
5
  "mains": "./dist/index.js",
6
6
  "typess": "./dist/index.d.ts",
package/src/coupon.ts ADDED
@@ -0,0 +1,14 @@
1
+ export interface Coupon {
2
+ id: string;
3
+ phoneNumber: string;
4
+ couponType: 'errand';
5
+ isUsed: boolean;
6
+ expiresAt: Date;
7
+ couponCode: string;
8
+ updatedAt: Date;
9
+ createdAt: Date;
10
+ hasExpired: boolean;
11
+ couponValue: number;
12
+ ref?: string;
13
+ fullName?: string;
14
+ }
package/src/errand.ts CHANGED
@@ -126,7 +126,9 @@ export interface Errand {
126
126
  additionalData?: string;
127
127
  deliveryDate?: Date;
128
128
  city?: City;
129
- price?: number;
129
+ couponPrice?: number;
130
+ price: number;
131
+ coupon?: string;
130
132
  }
131
133
 
132
134
  export interface AggragatedErrand extends Errand {
package/src/index.ts CHANGED
@@ -27,3 +27,4 @@ export * from './invoice';
27
27
  export * from './notification';
28
28
  export * from './rider';
29
29
  export * from './enterprise';
30
+ export * from './coupon';
package/src/user.ts CHANGED
@@ -3,8 +3,10 @@ import { City, State } from './location';
3
3
  export enum RoleType {
4
4
  Rider = 'rider',
5
5
  User = 'user',
6
- RootAdmin = 'root-admin',
6
+ EnterpriseAdmin = 'enterprise-admin',
7
+ EnterpriseUser = 'enterprise-user',
7
8
  Admin = 'admin',
9
+ RootAdmin = 'root-admin',
8
10
  }
9
11
 
10
12
  export enum AuthType {
package/tsconfig.json CHANGED
@@ -33,7 +33,9 @@
33
33
  // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
34
34
  // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
35
35
  // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
36
- // "types": [], /* Specify type package names to be included without being referenced in a source file. */
36
+ "types": [
37
+ "node"
38
+ ] /* Specify type package names to be included without being referenced in a source file. */,
37
39
  // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
38
40
  // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
39
41
  // "resolveJsonModule": true, /* Enable importing .json files. */