@riocrypto/common-server 1.0.2497 → 1.0.2499

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.
@@ -31,7 +31,7 @@ declare class ClusterClient {
31
31
  timeInForceEndsAt?: Date;
32
32
  }): Promise<Quote>;
33
33
  getCryptoAddresses(userId: string, crypto: Crypto): Promise<CryptoAddress[]>;
34
- createOrder({ quoteId, userAddressId, payoutBankAccountId, parentOrderId, notes, isAxeTaker, bulkCryptoPaymentId, bulkBankPaymentId, bulkCryptoPayoutId, bulkBankPayoutId, }: {
34
+ createOrder({ quoteId, userAddressId, payoutBankAccountId, parentOrderId, notes, isAxeTaker, bulkCryptoPaymentId, bulkBankPaymentId, bulkCryptoPayoutId, bulkBankPayoutId, TWAPSessionId, }: {
35
35
  quoteId: string;
36
36
  userAddressId?: string;
37
37
  payoutBankAccountId?: string;
@@ -42,6 +42,7 @@ declare class ClusterClient {
42
42
  bulkBankPaymentId?: string;
43
43
  bulkCryptoPayoutId?: string;
44
44
  bulkBankPayoutId?: string;
45
+ TWAPSessionId?: string;
45
46
  }): Promise<Order>;
46
47
  takeAxe({ axeId, userId, amount, crypto, userAddressId, payoutBankAccountId, deferredPaymentType, twoWaySettlementType, twoWaySettlementDateOffset, }: {
47
48
  axeId: string;
@@ -113,7 +113,7 @@ class ClusterClient {
113
113
  return response.data;
114
114
  });
115
115
  }
116
- createOrder({ quoteId, userAddressId, payoutBankAccountId, parentOrderId, notes, isAxeTaker, bulkCryptoPaymentId, bulkBankPaymentId, bulkCryptoPayoutId, bulkBankPayoutId, }) {
116
+ createOrder({ quoteId, userAddressId, payoutBankAccountId, parentOrderId, notes, isAxeTaker, bulkCryptoPaymentId, bulkBankPaymentId, bulkCryptoPayoutId, bulkBankPayoutId, TWAPSessionId, }) {
117
117
  return __awaiter(this, void 0, void 0, function* () {
118
118
  const response = yield this.axios.post(`${this.baseUrl}/api/orders`, {
119
119
  quoteId,
@@ -130,6 +130,7 @@ class ClusterClient {
130
130
  ? bulkCryptoPaymentId
131
131
  : undefined,
132
132
  bulkBankPaymentId: bulkBankPaymentId ? bulkBankPaymentId : undefined,
133
+ twapSessionId: TWAPSessionId ? TWAPSessionId : undefined,
133
134
  }, {
134
135
  headers: {
135
136
  "x-cluster-api-key": this.clusterApiKey,
@@ -130,6 +130,7 @@ interface OrderAttrs {
130
130
  serviceFeeFiatTax?: number;
131
131
  };
132
132
  previousActiveStatus?: OrderStatus;
133
+ TWAPSessionId?: string;
133
134
  }
134
135
  interface OrderDoc extends Document {
135
136
  quoteId: string;
@@ -260,6 +261,7 @@ interface OrderDoc extends Document {
260
261
  serviceFeeFiatTax?: number;
261
262
  };
262
263
  previousActiveStatus?: OrderStatus;
264
+ TWAPSessionId?: string;
263
265
  }
264
266
  interface OrderModel extends Model<OrderDoc> {
265
267
  build(attrs: OrderAttrs): OrderDoc;
@@ -339,6 +339,9 @@ const buildOrder = (mongoose) => {
339
339
  previousActiveStatus: {
340
340
  type: String,
341
341
  },
342
+ TWAPSessionId: {
343
+ type: String,
344
+ },
342
345
  }, {
343
346
  toJSON: {
344
347
  transform(doc, ret) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.2497",
3
+ "version": "1.0.2499",
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.2265",
31
+ "@riocrypto/common": "^1.0.2266",
32
32
  "@types/express": "^4.17.13",
33
33
  "axios": "^1.7.4",
34
34
  "crypto-js": "^4.2.0",