@riocrypto/common-server 1.0.2645 → 1.0.2647
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 -0
- package/build/index.js +1 -0
- package/build/models/order-log.d.ts +27 -0
- package/build/models/order-log.js +23 -0
- package/package.json +2 -2
package/build/index.d.ts
CHANGED
|
@@ -103,6 +103,7 @@ export * from "./models/twap-settlement";
|
|
|
103
103
|
export * from "./models/transnetwork-fx-trade";
|
|
104
104
|
export * from "./models/inbound-bank-deposit";
|
|
105
105
|
export * from "./models/inbound-crypto-deposit";
|
|
106
|
+
export * from "./models/order-log";
|
|
106
107
|
export * from "./clients/axios-with-logging";
|
|
107
108
|
export * from "./clients/slack-client";
|
|
108
109
|
export * from "./clients/fireblocks-client";
|
package/build/index.js
CHANGED
|
@@ -119,6 +119,7 @@ __exportStar(require("./models/twap-settlement"), exports);
|
|
|
119
119
|
__exportStar(require("./models/transnetwork-fx-trade"), exports);
|
|
120
120
|
__exportStar(require("./models/inbound-bank-deposit"), exports);
|
|
121
121
|
__exportStar(require("./models/inbound-crypto-deposit"), exports);
|
|
122
|
+
__exportStar(require("./models/order-log"), exports);
|
|
122
123
|
__exportStar(require("./clients/axios-with-logging"), exports);
|
|
123
124
|
__exportStar(require("./clients/slack-client"), exports);
|
|
124
125
|
__exportStar(require("./clients/fireblocks-client"), exports);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Mongoose, Model, Document } from "mongoose";
|
|
2
|
+
interface OrderLog {
|
|
3
|
+
createdAt: Date;
|
|
4
|
+
orderId: string;
|
|
5
|
+
status: string;
|
|
6
|
+
message?: string;
|
|
7
|
+
isReset: boolean;
|
|
8
|
+
}
|
|
9
|
+
interface OrderLogAttrs {
|
|
10
|
+
createdAt: Date;
|
|
11
|
+
orderId: string;
|
|
12
|
+
status: string;
|
|
13
|
+
message?: string;
|
|
14
|
+
isReset: boolean;
|
|
15
|
+
}
|
|
16
|
+
interface OrderLogDoc extends Document {
|
|
17
|
+
createdAt: Date;
|
|
18
|
+
orderId: string;
|
|
19
|
+
status: string;
|
|
20
|
+
message?: string;
|
|
21
|
+
isReset: boolean;
|
|
22
|
+
}
|
|
23
|
+
interface OrderLogModel extends Model<OrderLogDoc> {
|
|
24
|
+
build(attrs: OrderLog): OrderLogDoc;
|
|
25
|
+
}
|
|
26
|
+
declare const buildOrderLog: (mongoose: Mongoose) => OrderLogModel;
|
|
27
|
+
export { buildOrderLog, OrderLogDoc, OrderLogAttrs };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildOrderLog = void 0;
|
|
4
|
+
const buildOrderLog = (mongoose) => {
|
|
5
|
+
if (mongoose.models.OrderLog) {
|
|
6
|
+
return mongoose.model("OrderLog");
|
|
7
|
+
}
|
|
8
|
+
var schema = new mongoose.Schema({
|
|
9
|
+
createdAt: { type: Date, required: true },
|
|
10
|
+
orderId: { type: String, required: true },
|
|
11
|
+
status: { type: String, required: true },
|
|
12
|
+
message: { type: String, required: false },
|
|
13
|
+
isReset: { type: Boolean, required: true },
|
|
14
|
+
});
|
|
15
|
+
schema.index({ createdAt: -1 });
|
|
16
|
+
schema.index({ orderId: 1, createdAt: -1 });
|
|
17
|
+
schema.statics.build = (attrs) => {
|
|
18
|
+
return new OrderLog(attrs);
|
|
19
|
+
};
|
|
20
|
+
const OrderLog = mongoose.model("OrderLog", schema);
|
|
21
|
+
return OrderLog;
|
|
22
|
+
};
|
|
23
|
+
exports.buildOrderLog = buildOrderLog;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2647",
|
|
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.2451",
|
|
32
32
|
"@types/express": "^4.17.13",
|
|
33
33
|
"axios": "^1.7.4",
|
|
34
34
|
"crypto-js": "^4.2.0",
|