@riocrypto/common-server 1.0.2592 → 1.0.2594
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 +2 -0
- package/build/index.js +2 -0
- package/build/models/unrecognized-bank-payment.d.ts +34 -0
- package/build/models/unrecognized-bank-payment.js +65 -0
- package/build/models/unrecognized-crypto-payment.d.ts +32 -0
- package/build/models/unrecognized-crypto-payment.js +66 -0
- package/package.json +2 -2
package/build/index.d.ts
CHANGED
|
@@ -101,6 +101,8 @@ export * from "./models/bulk-bank-payout";
|
|
|
101
101
|
export * from "./models/bulk-crypto-payout";
|
|
102
102
|
export * from "./models/twap-settlement";
|
|
103
103
|
export * from "./models/transnetwork-fx-trade";
|
|
104
|
+
export * from "./models/unrecognized-bank-payment";
|
|
105
|
+
export * from "./models/unrecognized-crypto-payment";
|
|
104
106
|
export * from "./clients/axios-with-logging";
|
|
105
107
|
export * from "./clients/slack-client";
|
|
106
108
|
export * from "./clients/fireblocks-client";
|
package/build/index.js
CHANGED
|
@@ -117,6 +117,8 @@ __exportStar(require("./models/bulk-bank-payout"), exports);
|
|
|
117
117
|
__exportStar(require("./models/bulk-crypto-payout"), exports);
|
|
118
118
|
__exportStar(require("./models/twap-settlement"), exports);
|
|
119
119
|
__exportStar(require("./models/transnetwork-fx-trade"), exports);
|
|
120
|
+
__exportStar(require("./models/unrecognized-bank-payment"), exports);
|
|
121
|
+
__exportStar(require("./models/unrecognized-crypto-payment"), exports);
|
|
120
122
|
__exportStar(require("./clients/axios-with-logging"), exports);
|
|
121
123
|
__exportStar(require("./clients/slack-client"), exports);
|
|
122
124
|
__exportStar(require("./clients/fireblocks-client"), exports);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { TreasuryProvider, Fiat } from "@riocrypto/common";
|
|
2
|
+
import { Mongoose, Model, Document } from "mongoose";
|
|
3
|
+
interface UnrecognizedBankPaymentAttrs {
|
|
4
|
+
createdAt: Date;
|
|
5
|
+
amount: number;
|
|
6
|
+
fiat: Fiat;
|
|
7
|
+
originAccountHolderName: string;
|
|
8
|
+
originAccountNumber?: string;
|
|
9
|
+
originCLABE?: string;
|
|
10
|
+
originBank?: string;
|
|
11
|
+
originCCI?: string;
|
|
12
|
+
reference?: string;
|
|
13
|
+
destinationTreasuryProvider?: TreasuryProvider;
|
|
14
|
+
destinationProviderId?: string;
|
|
15
|
+
}
|
|
16
|
+
interface UnrecognizedBankPaymentDoc extends Document {
|
|
17
|
+
id: string;
|
|
18
|
+
createdAt: Date;
|
|
19
|
+
amount: number;
|
|
20
|
+
fiat: Fiat;
|
|
21
|
+
originAccountHolderName: string;
|
|
22
|
+
originAccountNumber?: string;
|
|
23
|
+
originCLABE?: string;
|
|
24
|
+
originBank?: string;
|
|
25
|
+
originCCI?: string;
|
|
26
|
+
reference?: string;
|
|
27
|
+
destinationTreasuryProvider?: TreasuryProvider;
|
|
28
|
+
destinationProviderId?: string;
|
|
29
|
+
}
|
|
30
|
+
interface UnrecognizedBankPaymentModel extends Model<UnrecognizedBankPaymentDoc> {
|
|
31
|
+
build(attrs: UnrecognizedBankPaymentAttrs): UnrecognizedBankPaymentDoc;
|
|
32
|
+
}
|
|
33
|
+
declare const buildUnrecognizedBankPayment: (mongoose: Mongoose) => UnrecognizedBankPaymentModel;
|
|
34
|
+
export { buildUnrecognizedBankPayment, UnrecognizedBankPaymentDoc, UnrecognizedBankPaymentAttrs, };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildUnrecognizedBankPayment = void 0;
|
|
4
|
+
const common_1 = require("@riocrypto/common");
|
|
5
|
+
const buildUnrecognizedBankPayment = (mongoose) => {
|
|
6
|
+
// if model is already defined, return it
|
|
7
|
+
if (mongoose.models.UnrecognizedCryptoPayment) {
|
|
8
|
+
return mongoose.model("UnrecognizedBankPayment");
|
|
9
|
+
}
|
|
10
|
+
const UnrecognizedBankPaymentSchema = new mongoose.Schema({
|
|
11
|
+
createdAt: {
|
|
12
|
+
type: Date,
|
|
13
|
+
required: true,
|
|
14
|
+
},
|
|
15
|
+
amount: {
|
|
16
|
+
type: Number,
|
|
17
|
+
required: true,
|
|
18
|
+
},
|
|
19
|
+
fiat: {
|
|
20
|
+
type: String,
|
|
21
|
+
required: true,
|
|
22
|
+
enum: Object.values(common_1.Crypto),
|
|
23
|
+
},
|
|
24
|
+
originAccountHolderName: {
|
|
25
|
+
type: String,
|
|
26
|
+
required: true,
|
|
27
|
+
},
|
|
28
|
+
originAccountNumber: {
|
|
29
|
+
type: String,
|
|
30
|
+
},
|
|
31
|
+
originCLABE: {
|
|
32
|
+
type: String,
|
|
33
|
+
},
|
|
34
|
+
originBank: {
|
|
35
|
+
type: String,
|
|
36
|
+
},
|
|
37
|
+
originCCI: {
|
|
38
|
+
type: String,
|
|
39
|
+
},
|
|
40
|
+
reference: {
|
|
41
|
+
type: String,
|
|
42
|
+
},
|
|
43
|
+
destinationTreasuryProvider: {
|
|
44
|
+
type: String,
|
|
45
|
+
enum: Object.values(common_1.TreasuryProvider),
|
|
46
|
+
},
|
|
47
|
+
destinationProviderId: {
|
|
48
|
+
type: String,
|
|
49
|
+
},
|
|
50
|
+
}, {
|
|
51
|
+
toJSON: {
|
|
52
|
+
transform(doc, ret) {
|
|
53
|
+
ret.id = ret._id.valueOf();
|
|
54
|
+
delete ret._id;
|
|
55
|
+
delete ret.__v;
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
UnrecognizedBankPaymentSchema.statics.build = (attrs) => {
|
|
60
|
+
return new UnrecognizedBankPayment(attrs);
|
|
61
|
+
};
|
|
62
|
+
const UnrecognizedBankPayment = mongoose.model("UnrecognizedBankPayment", UnrecognizedBankPaymentSchema);
|
|
63
|
+
return UnrecognizedBankPayment;
|
|
64
|
+
};
|
|
65
|
+
exports.buildUnrecognizedBankPayment = buildUnrecognizedBankPayment;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { TreasuryProvider, Crypto, UnrecognizedCryptoPaymentDestinationType } from "@riocrypto/common";
|
|
2
|
+
import { Mongoose, Model, Document } from "mongoose";
|
|
3
|
+
interface UnrecognizedCryptoPaymentAttrs {
|
|
4
|
+
createdAt: Date;
|
|
5
|
+
amount: number;
|
|
6
|
+
crypto: Crypto;
|
|
7
|
+
originBlockchainAddress: string;
|
|
8
|
+
destinationBlockchainAddress: string;
|
|
9
|
+
blockchainTxId: string;
|
|
10
|
+
destinationType: UnrecognizedCryptoPaymentDestinationType;
|
|
11
|
+
destinationTreasuryProvider?: TreasuryProvider;
|
|
12
|
+
destinationTransactionalFireblocksVaultId?: string;
|
|
13
|
+
destinationProviderId?: string;
|
|
14
|
+
}
|
|
15
|
+
interface UnrecognizedCryptoPaymentDoc extends Document {
|
|
16
|
+
id: string;
|
|
17
|
+
createdAt: Date;
|
|
18
|
+
amount: number;
|
|
19
|
+
crypto: Crypto;
|
|
20
|
+
originBlockchainAddress: string;
|
|
21
|
+
destinationBlockchainAddress: string;
|
|
22
|
+
blockchainTxId: string;
|
|
23
|
+
destinationType: UnrecognizedCryptoPaymentDestinationType;
|
|
24
|
+
destinationTreasuryProvider?: TreasuryProvider;
|
|
25
|
+
destinationTransactionalFireblocksVaultId?: string;
|
|
26
|
+
destinationProviderId?: string;
|
|
27
|
+
}
|
|
28
|
+
interface UnrecognizedCryptoPaymentModel extends Model<UnrecognizedCryptoPaymentDoc> {
|
|
29
|
+
build(attrs: UnrecognizedCryptoPaymentAttrs): UnrecognizedCryptoPaymentDoc;
|
|
30
|
+
}
|
|
31
|
+
declare const buildUnrecognizedCryptoPayment: (mongoose: Mongoose) => UnrecognizedCryptoPaymentModel;
|
|
32
|
+
export { buildUnrecognizedCryptoPayment, UnrecognizedCryptoPaymentDoc, UnrecognizedCryptoPaymentAttrs, };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildUnrecognizedCryptoPayment = void 0;
|
|
4
|
+
const common_1 = require("@riocrypto/common");
|
|
5
|
+
const buildUnrecognizedCryptoPayment = (mongoose) => {
|
|
6
|
+
// if model is already defined, return it
|
|
7
|
+
if (mongoose.models.UnrecognizedCryptoPayment) {
|
|
8
|
+
return mongoose.model("UnrecognizedCryptoPayment");
|
|
9
|
+
}
|
|
10
|
+
const UnrecognizedCryptoPaymentSchema = new mongoose.Schema({
|
|
11
|
+
createdAt: {
|
|
12
|
+
type: Date,
|
|
13
|
+
required: true,
|
|
14
|
+
},
|
|
15
|
+
amount: {
|
|
16
|
+
type: Number,
|
|
17
|
+
required: true,
|
|
18
|
+
},
|
|
19
|
+
crypto: {
|
|
20
|
+
type: String,
|
|
21
|
+
required: true,
|
|
22
|
+
enum: Object.values(common_1.Crypto),
|
|
23
|
+
},
|
|
24
|
+
originBlockchainAddress: {
|
|
25
|
+
type: String,
|
|
26
|
+
required: true,
|
|
27
|
+
},
|
|
28
|
+
destinationBlockchainAddress: {
|
|
29
|
+
type: String,
|
|
30
|
+
required: true,
|
|
31
|
+
},
|
|
32
|
+
blockchainTxId: {
|
|
33
|
+
type: String,
|
|
34
|
+
required: true,
|
|
35
|
+
},
|
|
36
|
+
destinationType: {
|
|
37
|
+
type: String,
|
|
38
|
+
required: true,
|
|
39
|
+
enum: Object.values(common_1.UnrecognizedCryptoPaymentDestinationType),
|
|
40
|
+
},
|
|
41
|
+
destinationTreasuryProvider: {
|
|
42
|
+
type: String,
|
|
43
|
+
enum: Object.values(common_1.TreasuryProvider),
|
|
44
|
+
},
|
|
45
|
+
destinationTransactionalFireblocksVaultId: {
|
|
46
|
+
type: String,
|
|
47
|
+
},
|
|
48
|
+
destinationProviderId: {
|
|
49
|
+
type: String,
|
|
50
|
+
},
|
|
51
|
+
}, {
|
|
52
|
+
toJSON: {
|
|
53
|
+
transform(doc, ret) {
|
|
54
|
+
ret.id = ret._id.valueOf();
|
|
55
|
+
delete ret._id;
|
|
56
|
+
delete ret.__v;
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
UnrecognizedCryptoPaymentSchema.statics.build = (attrs) => {
|
|
61
|
+
return new UnrecognizedCryptoPayment(attrs);
|
|
62
|
+
};
|
|
63
|
+
const UnrecognizedCryptoPayment = mongoose.model("UnrecognizedCryptoPayment", UnrecognizedCryptoPaymentSchema);
|
|
64
|
+
return UnrecognizedCryptoPayment;
|
|
65
|
+
};
|
|
66
|
+
exports.buildUnrecognizedCryptoPayment = buildUnrecognizedCryptoPayment;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2594",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@google-cloud/secret-manager": "^5.3.0",
|
|
29
29
|
"@google-cloud/storage": "^6.9.5",
|
|
30
30
|
"@hyperdx/node-opentelemetry": "^0.7.0",
|
|
31
|
-
"@riocrypto/common": "^1.0.
|
|
31
|
+
"@riocrypto/common": "^1.0.2389",
|
|
32
32
|
"@types/express": "^4.17.13",
|
|
33
33
|
"axios": "^1.7.4",
|
|
34
34
|
"crypto-js": "^4.2.0",
|