@riocrypto/common-server 1.0.1994 → 1.0.1995

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.
@@ -2,6 +2,7 @@ import { Processor } from "@riocrypto/common";
2
2
  import { Mongoose, Model, Document } from "mongoose";
3
3
  interface BankPayoutAttrs {
4
4
  orderId: string;
5
+ orderVersion: number;
5
6
  bankAccountId: string;
6
7
  originBank: Processor;
7
8
  status: "initialized" | "processing" | "complete" | "failed" | "cancelled";
@@ -14,6 +15,7 @@ interface BankPayoutAttrs {
14
15
  }
15
16
  interface BankPayoutDoc extends Document {
16
17
  orderId: string;
18
+ orderVersion: number;
17
19
  bankAccountId: string;
18
20
  originBank: Processor;
19
21
  status: "initialized" | "processing" | "complete" | "failed" | "cancelled";
@@ -1,6 +1,7 @@
1
1
  import { Mongoose, Model, Document } from "mongoose";
2
2
  interface CoincoverTransactionAttrs {
3
3
  coincoverTransactionId: string;
4
+ orderVersion?: number;
4
5
  status: "GREEN" | "RED";
5
6
  rejectionCode?: string;
6
7
  orderId?: string;
@@ -16,6 +17,7 @@ interface CoincoverTransactionDoc extends Document {
16
17
  rejectionCode?: string;
17
18
  orderId?: string;
18
19
  orderPart?: number;
20
+ orderVersion?: number;
19
21
  }
20
22
  declare const buildCoincoverTransaction: (mongoose: Mongoose) => CoincoverTransactionModel;
21
23
  export { buildCoincoverTransaction, CoincoverTransactionDoc, CoincoverTransactionAttrs, };
@@ -24,6 +24,9 @@ const buildCoincoverTransaction = (mongoose) => {
24
24
  orderPart: {
25
25
  type: Number,
26
26
  },
27
+ orderVersion: {
28
+ type: Number,
29
+ },
27
30
  }, {
28
31
  toJSON: {
29
32
  transform(doc, ret) {
@@ -3,6 +3,7 @@ interface FireblocksTransferAttrs {
3
3
  userId?: string;
4
4
  type: "transaction" | "addressVerification" | "liquidityOrder";
5
5
  orderId?: string;
6
+ orderVersion?: number;
6
7
  multipartLiquidityOrderId?: string;
7
8
  addressVerificationId?: string;
8
9
  fireblocksTransferId?: string;
@@ -18,6 +19,7 @@ interface FireblocksTransferDoc extends mongoose.Document {
18
19
  userId?: string;
19
20
  type: "transaction" | "addressVerification" | "liquidityOrder";
20
21
  orderId?: string;
22
+ orderVersion?: number;
21
23
  multipartLiquidityOrderId?: string;
22
24
  addressVerificationId?: string;
23
25
  fireblocksTransferId?: string;
@@ -17,6 +17,9 @@ const buildFireblocksTransfer = (mongoose) => {
17
17
  orderId: {
18
18
  type: String,
19
19
  },
20
+ orderVersion: {
21
+ type: Number,
22
+ },
20
23
  addressVerificationId: {
21
24
  type: String,
22
25
  },
@@ -5,6 +5,7 @@ interface InvoiceAttrs {
5
5
  status: "created" | "completed" | "failed";
6
6
  userId: string;
7
7
  orderId: string;
8
+ orderVersion: number;
8
9
  country: Country;
9
10
  provider: string;
10
11
  providerId: string;
@@ -16,6 +17,7 @@ interface InvoiceDoc extends mongoose.Document {
16
17
  status: "created" | "completed" | "failed";
17
18
  userId: string;
18
19
  orderId: string;
20
+ orderVersion: number;
19
21
  country: Country;
20
22
  provider: string;
21
23
  providerId: string;
@@ -23,6 +23,9 @@ const buildInvoice = (mongoose) => {
23
23
  type: String,
24
24
  required: true,
25
25
  },
26
+ orderVersion: {
27
+ type: Number,
28
+ },
26
29
  country: {
27
30
  type: String,
28
31
  required: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1994",
3
+ "version": "1.0.1995",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",