@riocrypto/common-server 1.0.1838 → 1.0.1840
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 +1 -1
- package/build/index.js +1 -1
- package/build/models/mismatched-bank-payment.d.ts +32 -0
- package/build/models/mismatched-bank-payment.js +62 -0
- package/package.json +2 -2
- package/build/models/accepted-user-bank-account-owner.d.ts +0 -17
- package/build/models/accepted-user-bank-account-owner.js +0 -36
package/build/index.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ export * from "./models/bridge-liquidation-address";
|
|
|
37
37
|
export * from "./models/admin-task";
|
|
38
38
|
export * from "./models/master-order-record";
|
|
39
39
|
export * from "./models/invoice";
|
|
40
|
-
export * from "./models/
|
|
40
|
+
export * from "./models/mismatched-bank-payment";
|
|
41
41
|
export * from "./models/bank-transfer";
|
|
42
42
|
export * from "./models/webhook-registration";
|
|
43
43
|
export * from "./models/chained-quote";
|
package/build/index.js
CHANGED
|
@@ -53,7 +53,7 @@ __exportStar(require("./models/bridge-liquidation-address"), exports);
|
|
|
53
53
|
__exportStar(require("./models/admin-task"), exports);
|
|
54
54
|
__exportStar(require("./models/master-order-record"), exports);
|
|
55
55
|
__exportStar(require("./models/invoice"), exports);
|
|
56
|
-
__exportStar(require("./models/
|
|
56
|
+
__exportStar(require("./models/mismatched-bank-payment"), exports);
|
|
57
57
|
__exportStar(require("./models/bank-transfer"), exports);
|
|
58
58
|
__exportStar(require("./models/webhook-registration"), exports);
|
|
59
59
|
__exportStar(require("./models/chained-quote"), exports);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Fiat } from "@riocrypto/common";
|
|
2
|
+
import { Mongoose, Model, Document } from "mongoose";
|
|
3
|
+
interface MismatchedBankPaymentAttrs {
|
|
4
|
+
createdAt: Date;
|
|
5
|
+
status: "notAccepted" | "accepted";
|
|
6
|
+
userId: string;
|
|
7
|
+
amountFiat: number;
|
|
8
|
+
fiat: Fiat;
|
|
9
|
+
originAccountHolderName: string;
|
|
10
|
+
originAccountNumber?: string;
|
|
11
|
+
originCLABE?: string;
|
|
12
|
+
originBank?: string;
|
|
13
|
+
originCCI?: string;
|
|
14
|
+
}
|
|
15
|
+
interface MismatchedBankPaymentModel extends Model<MismatchedBankPaymentDoc> {
|
|
16
|
+
build(attrs: MismatchedBankPaymentAttrs): MismatchedBankPaymentDoc;
|
|
17
|
+
}
|
|
18
|
+
interface MismatchedBankPaymentDoc extends Document {
|
|
19
|
+
_id: string;
|
|
20
|
+
createdAt: Date;
|
|
21
|
+
status: "notAccepted" | "accepted";
|
|
22
|
+
userId: string;
|
|
23
|
+
amountFiat: number;
|
|
24
|
+
fiat: Fiat;
|
|
25
|
+
originAccountHolderName: string;
|
|
26
|
+
originAccountNumber?: string;
|
|
27
|
+
originCLABE?: string;
|
|
28
|
+
originBank?: string;
|
|
29
|
+
originCCI?: string;
|
|
30
|
+
}
|
|
31
|
+
declare const buildMismatchedBankPayment: (mongoose: Mongoose) => MismatchedBankPaymentModel;
|
|
32
|
+
export { buildMismatchedBankPayment, MismatchedBankPaymentDoc, MismatchedBankPaymentAttrs, };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildMismatchedBankPayment = void 0;
|
|
4
|
+
const common_1 = require("@riocrypto/common");
|
|
5
|
+
const buildMismatchedBankPayment = (mongoose) => {
|
|
6
|
+
if (mongoose.models.MismatchedBankPayment) {
|
|
7
|
+
return mongoose.model("MismatchedBankPayment");
|
|
8
|
+
}
|
|
9
|
+
const MismatchedBankPaymentSchema = new mongoose.Schema({
|
|
10
|
+
createdAt: {
|
|
11
|
+
type: Date,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
status: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: true,
|
|
17
|
+
},
|
|
18
|
+
userId: {
|
|
19
|
+
type: String,
|
|
20
|
+
required: true,
|
|
21
|
+
},
|
|
22
|
+
amountFiat: {
|
|
23
|
+
type: Number,
|
|
24
|
+
required: true,
|
|
25
|
+
},
|
|
26
|
+
fiat: {
|
|
27
|
+
type: String,
|
|
28
|
+
required: true,
|
|
29
|
+
enum: Object.values(common_1.Fiat),
|
|
30
|
+
},
|
|
31
|
+
originAccountHolderName: {
|
|
32
|
+
type: String,
|
|
33
|
+
required: true,
|
|
34
|
+
},
|
|
35
|
+
originAccountNumber: {
|
|
36
|
+
type: String,
|
|
37
|
+
},
|
|
38
|
+
originCLABE: {
|
|
39
|
+
type: String,
|
|
40
|
+
},
|
|
41
|
+
originBank: {
|
|
42
|
+
type: String,
|
|
43
|
+
},
|
|
44
|
+
originCCI: {
|
|
45
|
+
type: String,
|
|
46
|
+
},
|
|
47
|
+
}, {
|
|
48
|
+
toJSON: {
|
|
49
|
+
transform(doc, ret) {
|
|
50
|
+
ret.id = ret._id.valueOf();
|
|
51
|
+
delete ret._id;
|
|
52
|
+
delete ret.__v;
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
MismatchedBankPaymentSchema.statics.build = (attrs) => {
|
|
57
|
+
return new MismatchedBankPayment(attrs);
|
|
58
|
+
};
|
|
59
|
+
const MismatchedBankPayment = mongoose.model("MismatchedBankPayment", MismatchedBankPaymentSchema);
|
|
60
|
+
return MismatchedBankPayment;
|
|
61
|
+
};
|
|
62
|
+
exports.buildMismatchedBankPayment = buildMismatchedBankPayment;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1840",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@google-cloud/secret-manager": "^5.3.0",
|
|
27
27
|
"@google-cloud/storage": "^6.9.5",
|
|
28
28
|
"@hyperdx/node-opentelemetry": "^0.4.2",
|
|
29
|
-
"@riocrypto/common": "^1.0.
|
|
29
|
+
"@riocrypto/common": "^1.0.1654",
|
|
30
30
|
"@types/express": "^4.17.13",
|
|
31
31
|
"axios": "^1.6.0",
|
|
32
32
|
"crypto-js": "^4.2.0",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Mongoose, Model, Document } from "mongoose";
|
|
2
|
-
interface AcceptedUserBankAccountOwnerAttrs {
|
|
3
|
-
createdAt: Date;
|
|
4
|
-
userId: string;
|
|
5
|
-
owner: string;
|
|
6
|
-
}
|
|
7
|
-
interface AcceptedUserBankAccountOwnerModel extends Model<AcceptedUserBankAccountOwnerDoc> {
|
|
8
|
-
build(attrs: AcceptedUserBankAccountOwnerAttrs): AcceptedUserBankAccountOwnerDoc;
|
|
9
|
-
}
|
|
10
|
-
interface AcceptedUserBankAccountOwnerDoc extends Document {
|
|
11
|
-
_id: string;
|
|
12
|
-
createdAt: Date;
|
|
13
|
-
userId: string;
|
|
14
|
-
owner: string;
|
|
15
|
-
}
|
|
16
|
-
declare const buildAcceptedUserBankAccountOwner: (mongoose: Mongoose) => AcceptedUserBankAccountOwnerModel;
|
|
17
|
-
export { buildAcceptedUserBankAccountOwner, AcceptedUserBankAccountOwnerDoc, AcceptedUserBankAccountOwnerAttrs, };
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildAcceptedUserBankAccountOwner = void 0;
|
|
4
|
-
const buildAcceptedUserBankAccountOwner = (mongoose) => {
|
|
5
|
-
if (mongoose.models.AcceptedUserBankAccountOwner) {
|
|
6
|
-
return mongoose.model("AcceptedUserBankAccountOwner");
|
|
7
|
-
}
|
|
8
|
-
const AcceptedUserBankAccountOwnerSchema = new mongoose.Schema({
|
|
9
|
-
createdAt: {
|
|
10
|
-
type: Date,
|
|
11
|
-
required: true,
|
|
12
|
-
},
|
|
13
|
-
userId: {
|
|
14
|
-
type: String,
|
|
15
|
-
required: true,
|
|
16
|
-
},
|
|
17
|
-
owner: {
|
|
18
|
-
type: String,
|
|
19
|
-
required: true,
|
|
20
|
-
},
|
|
21
|
-
}, {
|
|
22
|
-
toJSON: {
|
|
23
|
-
transform(doc, ret) {
|
|
24
|
-
ret.id = ret._id.valueOf();
|
|
25
|
-
delete ret._id;
|
|
26
|
-
delete ret.__v;
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
});
|
|
30
|
-
AcceptedUserBankAccountOwnerSchema.statics.build = (attrs) => {
|
|
31
|
-
return new AcceptedUserBankAccountOwner(attrs);
|
|
32
|
-
};
|
|
33
|
-
const AcceptedUserBankAccountOwner = mongoose.model("AcceptedUserBankAccountOwner", AcceptedUserBankAccountOwnerSchema);
|
|
34
|
-
return AcceptedUserBankAccountOwner;
|
|
35
|
-
};
|
|
36
|
-
exports.buildAcceptedUserBankAccountOwner = buildAcceptedUserBankAccountOwner;
|