@riocrypto/common-server 1.0.1807 → 1.0.1809
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.
|
@@ -8,6 +8,7 @@ interface BankPayoutAttrs {
|
|
|
8
8
|
transferDetails?: {
|
|
9
9
|
speiTrackingNumber?: string;
|
|
10
10
|
spidTrackingNumber?: string;
|
|
11
|
+
cepLink?: string;
|
|
11
12
|
reference?: string;
|
|
12
13
|
};
|
|
13
14
|
}
|
|
@@ -19,6 +20,7 @@ interface BankPayoutDoc extends Document {
|
|
|
19
20
|
transferDetails?: {
|
|
20
21
|
speiTrackingNumber?: string;
|
|
21
22
|
spidTrackingNumber?: string;
|
|
23
|
+
cepLink?: string;
|
|
22
24
|
reference?: string;
|
|
23
25
|
};
|
|
24
26
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
interface EmailReceiptAttrs {
|
|
3
|
+
orderId: string;
|
|
4
|
+
}
|
|
5
|
+
interface EmailReceiptDoc extends mongoose.Document {
|
|
6
|
+
orderId: string;
|
|
7
|
+
}
|
|
8
|
+
interface EmailReceiptModel extends mongoose.Model<EmailReceiptDoc> {
|
|
9
|
+
build(attrs: EmailReceiptAttrs): EmailReceiptDoc;
|
|
10
|
+
}
|
|
11
|
+
declare const buildEmailReceipt: (mongoose: typeof mongoose) => EmailReceiptModel;
|
|
12
|
+
export { buildEmailReceipt, EmailReceiptDoc, EmailReceiptAttrs };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildEmailReceipt = void 0;
|
|
4
|
+
const buildEmailReceipt = (mongoose) => {
|
|
5
|
+
// if model is already defined, return it
|
|
6
|
+
if (mongoose.models.EmailReceipt) {
|
|
7
|
+
return mongoose.model("EmailReceipt");
|
|
8
|
+
}
|
|
9
|
+
const EmailReceiptSchema = new mongoose.Schema({
|
|
10
|
+
orderId: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
}, {
|
|
15
|
+
toJSON: {
|
|
16
|
+
transform(doc, ret) {
|
|
17
|
+
ret.id = ret._id;
|
|
18
|
+
delete ret._id;
|
|
19
|
+
delete ret.__v;
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
EmailReceiptSchema.statics.build = (attrs) => {
|
|
24
|
+
return new EmailReceipt(attrs);
|
|
25
|
+
};
|
|
26
|
+
const EmailReceipt = mongoose.model("EmailReceipt", EmailReceiptSchema);
|
|
27
|
+
return EmailReceipt;
|
|
28
|
+
};
|
|
29
|
+
exports.buildEmailReceipt = buildEmailReceipt;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1809",
|
|
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.1611",
|
|
30
30
|
"@types/express": "^4.17.13",
|
|
31
31
|
"axios": "^1.6.0",
|
|
32
32
|
"crypto-js": "^4.2.0",
|