@shoppingapp.org/common 1.0.27 → 1.0.31

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.
@@ -0,0 +1,12 @@
1
+ import mongoose from "mongoose";
2
+ import { UserDoc } from "../auth/user.interfaces";
3
+ export interface ProductDoc extends mongoose.Document {
4
+ user: UserDoc | string;
5
+ title: string;
6
+ price: number;
7
+ images: {
8
+ src: string;
9
+ }[];
10
+ }
11
+ export interface ProductModel extends mongoose.Model<ProductDoc> {
12
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ ;
4
+ ;
package/build/index.d.ts CHANGED
@@ -7,5 +7,6 @@ export * from './errors/not-authorized-error';
7
7
  export * from './errors/not-found-error';
8
8
  export * from './errors/request-validation-error';
9
9
  export * from './constants/auth/user.interfaces';
10
- export * from './services/authentication.service';
11
10
  export * from './constants/globals';
11
+ export * from './constants/seller/product.interface';
12
+ export * from './services/authentication.service';
package/build/index.js CHANGED
@@ -24,5 +24,6 @@ __exportStar(require("./errors/not-authorized-error"), exports); // 🔹 Fixed
24
24
  __exportStar(require("./errors/not-found-error"), exports); // 🔹 Fixed
25
25
  __exportStar(require("./errors/request-validation-error"), exports);
26
26
  __exportStar(require("./constants/auth/user.interfaces"), exports);
27
- __exportStar(require("./services/authentication.service"), exports);
28
27
  __exportStar(require("./constants/globals"), exports);
28
+ __exportStar(require("./constants/seller/product.interface"), exports);
29
+ __exportStar(require("./services/authentication.service"), exports);
@@ -2,7 +2,7 @@ import { Response, Request, NextFunction } from 'express';
2
2
  declare global {
3
3
  interface Req extends Request {
4
4
  session?: any;
5
- currentUser: any;
5
+ currentUser?: any;
6
6
  }
7
7
  }
8
8
  export declare const currentUser: (jwt_key: string) => (req: Req, res: Response, next: NextFunction) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shoppingapp.org/common",
3
- "version": "1.0.27",
3
+ "version": "1.0.31",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -16,6 +16,7 @@
16
16
  "author": "",
17
17
  "license": "ISC",
18
18
  "dependencies": {
19
+ "@shoppingapp.org/common": "^1.0.28",
19
20
  "express": "^4.18.1",
20
21
  "express-validator": "^6.14.2",
21
22
  "jsonwebtoken": "^8.5.1",