@riocrypto/common 1.0.378 → 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.
@@ -1,8 +1,16 @@
1
- import { Mongoose, Document } from "mongoose";
1
+ import { Mongoose, Model, Document } from "mongoose";
2
+ interface AdminAuthAttrs {
3
+ email: string;
4
+ password: string;
5
+ previousPasswords?: string[];
6
+ }
2
7
  interface AdminAuthDoc extends Document {
3
8
  email: string;
4
9
  password: string;
5
10
  previousPasswords?: string[];
6
11
  }
7
- declare const buildAdminAuth: (mongoose: Mongoose) => void;
12
+ interface AdminAuthModel extends Model<AdminAuthDoc> {
13
+ build(attrs: AdminAuthAttrs): AdminAuthDoc;
14
+ }
15
+ declare const buildAdminAuth: (mongoose: Mongoose) => AdminAuthModel;
8
16
  export { buildAdminAuth, AdminAuthDoc };
@@ -50,5 +50,6 @@ const buildAdminAuth = (mongoose) => {
50
50
  return new AdminAuth(attrs);
51
51
  };
52
52
  const AdminAuth = mongoose.model("Admin", AdminSchema);
53
+ return AdminAuth;
53
54
  };
54
55
  exports.buildAdminAuth = buildAdminAuth;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.378",
3
+ "version": "1.0.379",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",