@riocrypto/common 1.0.376 → 1.0.379

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.
package/build/index.d.ts CHANGED
@@ -32,7 +32,6 @@ export * from "./middlewares/get-partner";
32
32
  export * from "./middlewares/get-user";
33
33
  export * from "./middlewares/require-priveleges";
34
34
  export * from "./middlewares/validate-kyc";
35
- export * from "./middlewares/validate-order";
36
35
  export * from "./events/base-listener";
37
36
  export * from "./events/base-publisher";
38
37
  export * from "./events/subjects";
@@ -142,3 +141,10 @@ export * from "./classes/USStateAsset";
142
141
  export * from "./classes/WyrePaymentMethodAsset";
143
142
  export * from "./services/apiKey";
144
143
  export * from "./services/password";
144
+ export * from "./models/admin-auth";
145
+ export * from "./models/auth";
146
+ export * from "./models/business-user";
147
+ export * from "./models/bank-payout";
148
+ export * from "./models/order";
149
+ export * from "./models/partner";
150
+ export * from "./models/user";
package/build/index.js CHANGED
@@ -48,7 +48,7 @@ __exportStar(require("./middlewares/get-partner"), exports);
48
48
  __exportStar(require("./middlewares/get-user"), exports);
49
49
  __exportStar(require("./middlewares/require-priveleges"), exports);
50
50
  __exportStar(require("./middlewares/validate-kyc"), exports);
51
- __exportStar(require("./middlewares/validate-order"), exports);
51
+ // export * from "./middlewares/validate-order";
52
52
  __exportStar(require("./events/base-listener"), exports);
53
53
  __exportStar(require("./events/base-publisher"), exports);
54
54
  __exportStar(require("./events/subjects"), exports);
@@ -158,3 +158,10 @@ __exportStar(require("./classes/USStateAsset"), exports);
158
158
  __exportStar(require("./classes/WyrePaymentMethodAsset"), exports);
159
159
  __exportStar(require("./services/apiKey"), exports);
160
160
  __exportStar(require("./services/password"), exports);
161
+ __exportStar(require("./models/admin-auth"), exports);
162
+ __exportStar(require("./models/auth"), exports);
163
+ __exportStar(require("./models/business-user"), exports);
164
+ __exportStar(require("./models/bank-payout"), exports);
165
+ __exportStar(require("./models/order"), exports);
166
+ __exportStar(require("./models/partner"), exports);
167
+ __exportStar(require("./models/user"), exports);
@@ -1,4 +1,5 @@
1
1
  import { Request, Response, NextFunction } from "express";
2
+ import { Mongoose } from "mongoose";
2
3
  import { OrderDoc } from "../models/order";
3
4
  declare global {
4
5
  namespace Express {
@@ -7,4 +8,4 @@ declare global {
7
8
  }
8
9
  }
9
10
  }
10
- export declare const getOrder: (req: Request, res: Response, next: NextFunction) => Promise<void>;
11
+ export declare const getOrder: (req: Request, res: Response, next: NextFunction, mongoose: Mongoose) => Promise<void>;
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.getOrder = void 0;
13
13
  const not_found_error_1 = require("../errors/not-found-error");
14
14
  const order_1 = require("../models/order");
15
- const getOrder = (req, res, next) => __awaiter(void 0, void 0, void 0, function* () {
15
+ const getOrder = (req, res, next, mongoose) => __awaiter(void 0, void 0, void 0, function* () {
16
16
  let orderId = "";
17
17
  if (req.body.orderId) {
18
18
  orderId = req.body.orderId;
@@ -27,7 +27,8 @@ const getOrder = (req, res, next) => __awaiter(void 0, void 0, void 0, function*
27
27
  throw new Error("Failed to provide orderId");
28
28
  }
29
29
  try {
30
- const order = yield order_1.Order.findById(orderId);
30
+ const Order = yield (0, order_1.buildOrder)(mongoose);
31
+ const order = yield Order.findById(orderId);
31
32
  if (!order) {
32
33
  throw new Error();
33
34
  }
@@ -1,4 +1,5 @@
1
1
  import { Request, Response, NextFunction } from "express";
2
+ import { Mongoose } from "mongoose";
2
3
  declare global {
3
4
  namespace Express {
4
5
  interface Request {
@@ -6,4 +7,4 @@ declare global {
6
7
  }
7
8
  }
8
9
  }
9
- export declare const getPartner: (req: Request, res: Response, next: NextFunction) => Promise<void>;
10
+ export declare const getPartner: (req: Request, res: Response, next: NextFunction, mongoose: Mongoose) => Promise<void>;
@@ -16,7 +16,7 @@ exports.getPartner = void 0;
16
16
  const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
17
17
  const partner_1 = require("../models/partner");
18
18
  const apiKey_1 = require("../services/apiKey");
19
- const getPartner = (req, res, next) => __awaiter(void 0, void 0, void 0, function* () {
19
+ const getPartner = (req, res, next, mongoose) => __awaiter(void 0, void 0, void 0, function* () {
20
20
  try {
21
21
  if (!req.headers["x-api-key"]) {
22
22
  const payload = jsonwebtoken_1.default.verify(req.cookies.partnerAuthJwt, process.env.JWT_KEY_PARTNER);
@@ -24,7 +24,8 @@ const getPartner = (req, res, next) => __awaiter(void 0, void 0, void 0, functio
24
24
  }
25
25
  else {
26
26
  const hashedApiKey = yield apiKey_1.ApiKey.toHash(req.headers["x-api-key"]);
27
- const partner = yield partner_1.Partner.findOne({
27
+ const Partner = yield (0, partner_1.buildPartner)(mongoose);
28
+ const partner = yield Partner.findOne({
28
29
  apiKeys: { $elemMatch: { value: hashedApiKey } },
29
30
  });
30
31
  if (partner) {
@@ -1,6 +1,7 @@
1
1
  import { Request, Response, NextFunction } from "express";
2
2
  import { BusinessUserDoc } from "../models/business-user";
3
3
  import { UserDoc } from "../models/user";
4
+ import { Mongoose } from "mongoose";
4
5
  declare global {
5
6
  namespace Express {
6
7
  interface Request {
@@ -8,4 +9,4 @@ declare global {
8
9
  }
9
10
  }
10
11
  }
11
- export declare const getUser: (req: Request, res: Response, next: NextFunction) => Promise<void>;
12
+ export declare const getUser: (req: Request, res: Response, next: NextFunction, mongoose: Mongoose) => Promise<void>;
@@ -13,11 +13,12 @@ exports.getUser = void 0;
13
13
  const business_user_1 = require("../models/business-user");
14
14
  const user_1 = require("../models/user");
15
15
  const user_attribute_1 = require("../types/user-attribute");
16
- const getUser = (req, res, next) => __awaiter(void 0, void 0, void 0, function* () {
16
+ const getUser = (req, res, next, mongoose) => __awaiter(void 0, void 0, void 0, function* () {
17
17
  let individualUser;
18
18
  let businessUser;
19
19
  try {
20
- individualUser = yield user_1.User.findOne({
20
+ const User = yield (0, user_1.buildUser)(mongoose);
21
+ individualUser = yield User.findOne({
21
22
  phoneNumber: req.currentAuth.phoneNumber,
22
23
  attributes: { $ne: user_attribute_1.UserAttribute.deleted },
23
24
  });
@@ -26,7 +27,8 @@ const getUser = (req, res, next) => __awaiter(void 0, void 0, void 0, function*
26
27
  individualUser = null;
27
28
  }
28
29
  try {
29
- businessUser = yield business_user_1.BusinessUser.findOne({
30
+ const BusinessUser = yield (0, business_user_1.buildBusinessUser)(mongoose);
31
+ businessUser = yield BusinessUser.findOne({
30
32
  phoneNumber: req.currentAuth.phoneNumber,
31
33
  attributes: { $ne: user_attribute_1.UserAttribute.deleted },
32
34
  });
@@ -1,2 +0,0 @@
1
- import { Request, Response, NextFunction } from "express";
2
- export declare const validateOrder: (req: Request, res: Response, next: NextFunction) => Promise<void>;
@@ -1,27 +1,20 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.validateOrder = void 0;
13
- const not_authorized_error_1 = require("../errors/not-authorized-error");
14
- const validateOrder = (req, res, next) => __awaiter(void 0, void 0, void 0, function* () {
15
- const order = req.order;
16
- if (!order) {
17
- throw new not_authorized_error_1.NotAuthorizedError();
18
- }
19
- if (req.partnerId && req.partnerId !== order.partnerId) {
20
- throw new not_authorized_error_1.NotAuthorizedError();
21
- }
22
- if (req.user && req.user._id.valueOf() !== order.userId) {
23
- throw new not_authorized_error_1.NotAuthorizedError();
24
- }
25
- next();
26
- });
27
- exports.validateOrder = validateOrder;
2
+ // import { Request, Response, NextFunction } from "express";
3
+ // import { NotAuthorizedError } from "../errors/not-authorized-error";
4
+ // export const validateOrder = async (
5
+ // req: Request,
6
+ // res: Response,
7
+ // next: NextFunction
8
+ // ) => {
9
+ // const order = req.order;
10
+ // if (!order) {
11
+ // throw new NotAuthorizedError();
12
+ // }
13
+ // if (req.partnerId && req.partnerId !== order.partnerId) {
14
+ // throw new NotAuthorizedError();
15
+ // }
16
+ // if (req.user && req.user._id.valueOf() !== order.userId) {
17
+ // throw new NotAuthorizedError();
18
+ // }
19
+ // next();
20
+ // };
@@ -1,16 +1,16 @@
1
- import mongoose from "mongoose";
1
+ import { Mongoose, Model, Document } from "mongoose";
2
2
  interface AdminAuthAttrs {
3
3
  email: string;
4
4
  password: string;
5
5
  previousPasswords?: string[];
6
6
  }
7
- interface AdminAuthDoc extends mongoose.Document {
7
+ interface AdminAuthDoc extends Document {
8
8
  email: string;
9
9
  password: string;
10
10
  previousPasswords?: string[];
11
11
  }
12
- interface AdminAuthModel extends mongoose.Model<AdminAuthDoc> {
12
+ interface AdminAuthModel extends Model<AdminAuthDoc> {
13
13
  build(attrs: AdminAuthAttrs): AdminAuthDoc;
14
14
  }
15
- declare const AdminAuth: AdminAuthModel;
16
- export { AdminAuth, AdminAuthDoc };
15
+ declare const buildAdminAuth: (mongoose: Mongoose) => AdminAuthModel;
16
+ export { buildAdminAuth, AdminAuthDoc };
@@ -8,49 +8,48 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
11
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.AdminAuth = void 0;
16
- const mongoose_1 = __importDefault(require("mongoose"));
12
+ exports.buildAdminAuth = void 0;
17
13
  const password_1 = require("../services/password");
18
- const AdminSchema = new mongoose_1.default.Schema({
19
- email: {
20
- type: String,
21
- required: true,
22
- },
23
- password: {
24
- type: String,
25
- required: true,
26
- },
27
- previousPasswords: [
28
- {
14
+ const buildAdminAuth = (mongoose) => {
15
+ const AdminSchema = new mongoose.Schema({
16
+ email: {
17
+ type: String,
18
+ required: true,
19
+ },
20
+ password: {
29
21
  type: String,
30
- required: false,
22
+ required: true,
31
23
  },
32
- ],
33
- }, {
34
- toJSON: {
35
- transform(doc, ret) {
36
- ret.id = ret._id.valueOf();
37
- delete ret._id;
38
- delete ret.__v;
39
- delete ret.password;
24
+ previousPasswords: [
25
+ {
26
+ type: String,
27
+ required: false,
28
+ },
29
+ ],
30
+ }, {
31
+ toJSON: {
32
+ transform(doc, ret) {
33
+ ret.id = ret._id.valueOf();
34
+ delete ret._id;
35
+ delete ret.__v;
36
+ delete ret.password;
37
+ },
40
38
  },
41
- },
42
- });
43
- AdminSchema.pre("save", function (done) {
44
- return __awaiter(this, void 0, void 0, function* () {
45
- if (this.isModified("password")) {
46
- const hashed = yield password_1.Password.toHash(this.get("password"));
47
- this.set("password", hashed);
48
- }
49
- done();
50
39
  });
51
- });
52
- AdminSchema.statics.build = (attrs) => {
53
- return new AdminAuth(attrs);
40
+ AdminSchema.pre("save", function (done) {
41
+ return __awaiter(this, void 0, void 0, function* () {
42
+ if (this.isModified("password")) {
43
+ const hashed = yield password_1.Password.toHash(this.get("password"));
44
+ this.set("password", hashed);
45
+ }
46
+ done();
47
+ });
48
+ });
49
+ AdminSchema.statics.build = (attrs) => {
50
+ return new AdminAuth(attrs);
51
+ };
52
+ const AdminAuth = mongoose.model("Admin", AdminSchema);
53
+ return AdminAuth;
54
54
  };
55
- const AdminAuth = mongoose_1.default.model("Admin", AdminSchema);
56
- exports.AdminAuth = AdminAuth;
55
+ exports.buildAdminAuth = buildAdminAuth;
@@ -1,6 +1,6 @@
1
- import mongoose from "mongoose";
2
1
  import { APIKey } from "../types/api-key";
3
2
  import { SecurityQuestion } from "../types/security-question";
3
+ import { Mongoose, Model, Document } from "mongoose";
4
4
  interface AuthAttrs {
5
5
  phoneNumber: string;
6
6
  password?: string;
@@ -9,7 +9,7 @@ interface AuthAttrs {
9
9
  previousPasswords?: string[];
10
10
  apiKeys?: APIKey[];
11
11
  }
12
- interface AuthDoc extends mongoose.Document {
12
+ interface AuthDoc extends Document {
13
13
  phoneNumber: string;
14
14
  password?: string;
15
15
  securityQuestion?: SecurityQuestion;
@@ -17,8 +17,8 @@ interface AuthDoc extends mongoose.Document {
17
17
  previousPasswords?: string[];
18
18
  apiKeys?: APIKey[];
19
19
  }
20
- interface AuthModel extends mongoose.Model<AuthDoc> {
20
+ interface AuthModel extends Model<AuthDoc> {
21
21
  build(attrs: AuthAttrs): AuthDoc;
22
22
  }
23
- declare const Auth: AuthModel;
24
- export { Auth, AuthDoc };
23
+ declare const buildAuth: (mongoose: Mongoose) => AuthModel;
24
+ export { buildAuth, AuthDoc };
@@ -8,73 +8,72 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
11
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.Auth = void 0;
16
- const mongoose_1 = __importDefault(require("mongoose"));
12
+ exports.buildAuth = void 0;
17
13
  const password_1 = require("../services/password");
18
- const AuthSchema = new mongoose_1.default.Schema({
19
- phoneNumber: {
20
- type: String,
21
- required: true,
22
- },
23
- password: {
24
- type: String,
25
- },
26
- securityQuestion: {
27
- type: String,
28
- },
29
- securityAnswer: {
30
- type: String,
31
- },
32
- previousPasswords: [
33
- {
14
+ const buildAuth = (mongoose) => {
15
+ const AuthSchema = new mongoose.Schema({
16
+ phoneNumber: {
17
+ type: String,
18
+ required: true,
19
+ },
20
+ password: {
34
21
  type: String,
35
22
  },
36
- ],
37
- apiKeys: [
38
- {
39
- value: {
23
+ securityQuestion: {
24
+ type: String,
25
+ },
26
+ securityAnswer: {
27
+ type: String,
28
+ },
29
+ previousPasswords: [
30
+ {
40
31
  type: String,
41
- required: true,
42
32
  },
43
- label: {
44
- type: String,
33
+ ],
34
+ apiKeys: [
35
+ {
36
+ value: {
37
+ type: String,
38
+ required: true,
39
+ },
40
+ label: {
41
+ type: String,
42
+ },
43
+ id: {
44
+ type: String,
45
+ required: true,
46
+ },
45
47
  },
46
- id: {
47
- type: String,
48
- required: true,
48
+ ],
49
+ }, {
50
+ toJSON: {
51
+ transform(doc, ret) {
52
+ ret.id = ret._id.valueOf();
53
+ delete ret._id;
54
+ delete ret.__v;
55
+ delete ret.password;
56
+ delete ret.securityAnswer;
57
+ delete ret.previousPasswords;
58
+ for (let apiKey of ret.apiKeys) {
59
+ delete apiKey.value;
60
+ }
49
61
  },
50
62
  },
51
- ],
52
- }, {
53
- toJSON: {
54
- transform(doc, ret) {
55
- ret.id = ret._id.valueOf();
56
- delete ret._id;
57
- delete ret.__v;
58
- delete ret.password;
59
- delete ret.securityAnswer;
60
- delete ret.previousPasswords;
61
- for (let apiKey of ret.apiKeys) {
62
- delete apiKey.value;
63
+ });
64
+ AuthSchema.pre("save", function (done) {
65
+ return __awaiter(this, void 0, void 0, function* () {
66
+ if (this.isModified("password")) {
67
+ const hashed = yield password_1.Password.toHash(this.get("password"));
68
+ this.set("password", hashed);
63
69
  }
64
- },
65
- },
66
- });
67
- AuthSchema.pre("save", function (done) {
68
- return __awaiter(this, void 0, void 0, function* () {
69
- if (this.isModified("password")) {
70
- const hashed = yield password_1.Password.toHash(this.get("password"));
71
- this.set("password", hashed);
72
- }
73
- done();
70
+ done();
71
+ });
74
72
  });
75
- });
76
- AuthSchema.statics.build = (attrs) => {
77
- return new Auth(attrs);
73
+ AuthSchema.statics.build = (attrs) => {
74
+ return new Auth(attrs);
75
+ };
76
+ const Auth = mongoose.model("Auth", AuthSchema);
77
+ return Auth;
78
78
  };
79
- const Auth = mongoose_1.default.model("Auth", AuthSchema);
80
- exports.Auth = Auth;
79
+ exports.buildAuth = buildAuth;
@@ -1,4 +1,4 @@
1
- import mongoose from "mongoose";
1
+ import { Mongoose, Model, Document } from "mongoose";
2
2
  interface BankPayoutAttrs {
3
3
  orderId: string;
4
4
  originBank: string;
@@ -6,15 +6,15 @@ interface BankPayoutAttrs {
6
6
  accountNumber: string;
7
7
  status: string;
8
8
  }
9
- interface BankPayoutDoc extends mongoose.Document {
9
+ interface BankPayoutDoc extends Document {
10
10
  orderId: string;
11
11
  originBank: string;
12
12
  destinationBank?: string;
13
13
  accountNumber: string;
14
14
  status: string;
15
15
  }
16
- interface BankPayoutModel extends mongoose.Model<BankPayoutDoc> {
16
+ interface BankPayoutModel extends Model<BankPayoutDoc> {
17
17
  build(attrs: BankPayoutAttrs): BankPayoutDoc;
18
18
  }
19
- declare const BankPayout: BankPayoutModel;
20
- export { BankPayout, BankPayoutDoc };
19
+ declare const buildBankPayout: (mongoose: Mongoose) => BankPayoutModel;
20
+ export { buildBankPayout, BankPayoutDoc };
@@ -1,41 +1,40 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.BankPayout = void 0;
7
- const mongoose_1 = __importDefault(require("mongoose"));
8
- const BankPayoutSchema = new mongoose_1.default.Schema({
9
- orderId: {
10
- type: String,
11
- required: true,
12
- },
13
- originBank: {
14
- type: String,
15
- required: true,
16
- },
17
- accountNumber: {
18
- type: String,
19
- required: true,
20
- },
21
- status: {
22
- type: String,
23
- required: true,
24
- },
25
- destinationBank: {
26
- type: String,
27
- },
28
- }, {
29
- toJSON: {
30
- transform(doc, ret) {
31
- ret.id = ret._id;
32
- delete ret._id;
33
- delete ret.__v;
3
+ exports.buildBankPayout = void 0;
4
+ const buildBankPayout = (mongoose) => {
5
+ const BankPayoutSchema = new mongoose.Schema({
6
+ orderId: {
7
+ type: String,
8
+ required: true,
9
+ },
10
+ originBank: {
11
+ type: String,
12
+ required: true,
13
+ },
14
+ accountNumber: {
15
+ type: String,
16
+ required: true,
17
+ },
18
+ status: {
19
+ type: String,
20
+ required: true,
21
+ },
22
+ destinationBank: {
23
+ type: String,
24
+ },
25
+ }, {
26
+ toJSON: {
27
+ transform(doc, ret) {
28
+ ret.id = ret._id;
29
+ delete ret._id;
30
+ delete ret.__v;
31
+ },
34
32
  },
35
- },
36
- });
37
- BankPayoutSchema.statics.build = (attrs) => {
38
- return new BankPayout(attrs);
33
+ });
34
+ BankPayoutSchema.statics.build = (attrs) => {
35
+ return new BankPayout(attrs);
36
+ };
37
+ const BankPayout = mongoose.model("BankPayout", BankPayoutSchema);
38
+ return BankPayout;
39
39
  };
40
- const BankPayout = mongoose_1.default.model("BankPayout", BankPayoutSchema);
41
- exports.BankPayout = BankPayout;
40
+ exports.buildBankPayout = buildBankPayout;
@@ -1,4 +1,3 @@
1
- import mongoose from "mongoose";
2
1
  import { Country } from "../types/country";
3
2
  import { KYCStatus } from "../types/kyc-status";
4
3
  import { Language } from "../types/language";
@@ -6,6 +5,7 @@ import { PlatformFeeRange } from "../types/platform-fee-range";
6
5
  import { USState } from "../types/us-state";
7
6
  import { UserAttribute } from "../types/user-attribute";
8
7
  import { UserType } from "../types/user-type";
8
+ import { Mongoose, Model, Document } from "mongoose";
9
9
  interface BusinessUserAttrs {
10
10
  type: UserType;
11
11
  companyName: string;
@@ -27,10 +27,10 @@ interface BusinessUserAttrs {
27
27
  brokerId?: string;
28
28
  platformFeeRanges?: PlatformFeeRange[];
29
29
  }
30
- interface BusinessUserModel extends mongoose.Model<BusinessUserDoc> {
30
+ interface BusinessUserModel extends Model<BusinessUserDoc> {
31
31
  build(attrs: BusinessUserAttrs): BusinessUserDoc;
32
32
  }
33
- interface BusinessUserDoc extends mongoose.Document {
33
+ interface BusinessUserDoc extends Document {
34
34
  type: UserType;
35
35
  companyName: string;
36
36
  legalRepresentative: string;
@@ -51,5 +51,5 @@ interface BusinessUserDoc extends mongoose.Document {
51
51
  brokerId?: string;
52
52
  platformFeeRanges?: PlatformFeeRange[];
53
53
  }
54
- declare const BusinessUser: BusinessUserModel;
55
- export { BusinessUser, BusinessUserDoc };
54
+ declare const buildBusinessUser: (mongoose: Mongoose) => BusinessUserModel;
55
+ export { buildBusinessUser, BusinessUserDoc };