@riocrypto/common-server 1.0.2074 → 1.0.2075

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,4 +1,4 @@
1
- import { Fiat, Crypto } from "@riocrypto/common";
1
+ import { Fiat, Crypto, Country } from "@riocrypto/common";
2
2
  import { PreSettlementTransactionType } from "@riocrypto/common";
3
3
  import mongoose from "mongoose";
4
4
  interface PreSettlementTransactionAttrs {
@@ -6,6 +6,7 @@ interface PreSettlementTransactionAttrs {
6
6
  type: PreSettlementTransactionType;
7
7
  amount: number;
8
8
  currency: Fiat | Crypto;
9
+ country: Country;
9
10
  orderId?: string;
10
11
  }
11
12
  interface PreSettlementTransactionDoc extends mongoose.Document {
@@ -13,6 +14,7 @@ interface PreSettlementTransactionDoc extends mongoose.Document {
13
14
  type: PreSettlementTransactionType;
14
15
  amount: number;
15
16
  currency: Fiat | Crypto;
17
+ country: Country;
16
18
  orderId?: string;
17
19
  }
18
20
  interface PreSettlementTransactionModel extends mongoose.Model<PreSettlementTransactionDoc> {
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.buildPreSettlementTransaction = void 0;
4
4
  const common_1 = require("@riocrypto/common");
5
+ const common_2 = require("@riocrypto/common");
5
6
  const buildPreSettlementTransaction = (mongoose) => {
6
7
  // if model is already defined, return it
7
8
  if (mongoose.models.PreSettlementTransaction) {
@@ -13,7 +14,7 @@ const buildPreSettlementTransaction = (mongoose) => {
13
14
  },
14
15
  type: {
15
16
  type: String,
16
- enum: Object.values(common_1.PreSettlementTransactionType),
17
+ enum: Object.values(common_2.PreSettlementTransactionType),
17
18
  },
18
19
  amount: {
19
20
  type: Number,
@@ -21,6 +22,10 @@ const buildPreSettlementTransaction = (mongoose) => {
21
22
  currency: {
22
23
  type: String,
23
24
  },
25
+ country: {
26
+ type: String,
27
+ enum: Object.values(common_1.Country),
28
+ },
24
29
  orderId: {
25
30
  type: String,
26
31
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.2074",
3
+ "version": "1.0.2075",
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.1812",
31
+ "@riocrypto/common": "^1.0.1816",
32
32
  "@types/express": "^4.17.13",
33
33
  "axios": "^1.7.4",
34
34
  "crypto-js": "^4.2.0",