@imtbl/sdk 0.27.10 → 0.27.12

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.
@@ -714,30 +714,42 @@ type CancelOrdersRequestBody = {
714
714
  signature: string;
715
715
  };
716
716
 
717
+ type FailedOrderCancellation = {
718
+ /**
719
+ * ID of the order which failed to be cancelled
720
+ */
721
+ order: string;
722
+ /**
723
+ * Reason code indicating why the order failed to be cancelled
724
+ */
725
+ reason_code: FailedOrderCancellation.reason_code;
726
+ };
727
+ declare namespace FailedOrderCancellation {
728
+ /**
729
+ * Reason code indicating why the order failed to be cancelled
730
+ */
731
+ enum reason_code {
732
+ ALREADY_FILLED = "ALREADY_FILLED"
733
+ }
734
+ }
735
+
736
+ type CancelOrdersResultData = {
737
+ /**
738
+ * Orders which were successfully cancelled
739
+ */
740
+ successful_cancellations: Array<string>;
741
+ /**
742
+ * Orders which are marked for cancellation but the cancellation cannot be guaranteed
743
+ */
744
+ pending_cancellations: Array<string>;
745
+ /**
746
+ * Orders which failed to be cancelled
747
+ */
748
+ failed_cancellations: Array<FailedOrderCancellation>;
749
+ };
750
+
717
751
  type CancelOrdersResult = {
718
- result: {
719
- /**
720
- * Orders which were successfully cancelled
721
- */
722
- successful_cancellations: Array<string>;
723
- /**
724
- * Orders which are marked for cancellation but the cancellation cannot be guaranteed
725
- */
726
- pending_cancellations: Array<string>;
727
- /**
728
- * Orders which failed to be cancelled
729
- */
730
- failed_cancellations: Array<{
731
- /**
732
- * ID of the order which failed to be cancelled
733
- */
734
- order: string;
735
- /**
736
- * Reason code indicating why the order failed to be cancelled
737
- */
738
- reason_code: 'ALREADY_FILLED';
739
- }>;
740
- };
752
+ result: CancelOrdersResultData;
741
753
  };
742
754
 
743
755
  /**
@@ -1132,7 +1144,7 @@ declare class OrdersService {
1132
1144
  * @returns ListListingsResult OK response.
1133
1145
  * @throws ApiError
1134
1146
  */
1135
- listListings({ chainName, status, sellItemContractAddress, buyItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, }: {
1147
+ listListings({ chainName, status, sellItemContractAddress, buyItemContractAddress, sellItemTokenId, fromUpdatedAt, pageSize, sortBy, sortDirection, pageCursor, }: {
1136
1148
  chainName: ChainName;
1137
1149
  /**
1138
1150
  * Order status to filter by
@@ -1150,6 +1162,10 @@ declare class OrdersService {
1150
1162
  * Sell item token identifier to filter by
1151
1163
  */
1152
1164
  sellItemTokenId?: string;
1165
+ /**
1166
+ * From updated at including given date
1167
+ */
1168
+ fromUpdatedAt?: string;
1153
1169
  /**
1154
1170
  * Maximum number of orders to return per page
1155
1171
  */
@@ -1211,9 +1227,13 @@ declare class OrdersService {
1211
1227
  * @returns ListTradeResult OK response.
1212
1228
  * @throws ApiError
1213
1229
  */
1214
- listTrades({ chainName, accountAddress, pageSize, sortBy, sortDirection, pageCursor, }: {
1230
+ listTrades({ chainName, accountAddress, fromIndexedAt, pageSize, sortBy, sortDirection, pageCursor, }: {
1215
1231
  chainName: ChainName;
1216
1232
  accountAddress?: string;
1233
+ /**
1234
+ * From indexed at including given date
1235
+ */
1236
+ fromIndexedAt?: string;
1217
1237
  /**
1218
1238
  * Maximum number of trades to return per page
1219
1239
  */
package/dist/orderbook.js CHANGED
@@ -429,7 +429,7 @@ class OrdersService {
429
429
  * @returns ListListingsResult OK response.
430
430
  * @throws ApiError
431
431
  */
432
- listListings({ chainName, status, sellItemContractAddress, buyItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, }) {
432
+ listListings({ chainName, status, sellItemContractAddress, buyItemContractAddress, sellItemTokenId, fromUpdatedAt, pageSize, sortBy, sortDirection, pageCursor, }) {
433
433
  return this.httpRequest.request({
434
434
  method: 'GET',
435
435
  url: '/v1/chains/{chain_name}/orders/listings',
@@ -441,6 +441,7 @@ class OrdersService {
441
441
  'sell_item_contract_address': sellItemContractAddress,
442
442
  'buy_item_contract_address': buyItemContractAddress,
443
443
  'sell_item_token_id': sellItemTokenId,
444
+ 'from_updated_at': fromUpdatedAt,
444
445
  'page_size': pageSize,
445
446
  'sort_by': sortBy,
446
447
  'sort_direction': sortDirection,
@@ -524,7 +525,7 @@ class OrdersService {
524
525
  * @returns ListTradeResult OK response.
525
526
  * @throws ApiError
526
527
  */
527
- listTrades({ chainName, accountAddress, pageSize, sortBy, sortDirection, pageCursor, }) {
528
+ listTrades({ chainName, accountAddress, fromIndexedAt, pageSize, sortBy, sortDirection, pageCursor, }) {
528
529
  return this.httpRequest.request({
529
530
  method: 'GET',
530
531
  url: '/v1/chains/{chain_name}/trades',
@@ -533,6 +534,7 @@ class OrdersService {
533
534
  },
534
535
  query: {
535
536
  'account_address': accountAddress,
537
+ 'from_indexed_at': fromIndexedAt,
536
538
  'page_size': pageSize,
537
539
  'sort_by': sortBy,
538
540
  'sort_direction': sortDirection,
@@ -598,6 +600,16 @@ var CancelledOrderStatus;
598
600
  })(CancelledOrderStatus.cancellation_type || (CancelledOrderStatus.cancellation_type = {}));
599
601
  })(CancelledOrderStatus || (CancelledOrderStatus = {}));
600
602
 
603
+ /* istanbul ignore file */
604
+ /* tslint:disable */
605
+ /* eslint-disable */
606
+ var FailedOrderCancellation;
607
+ (function (FailedOrderCancellation) {
608
+ (function (reason_code) {
609
+ reason_code["ALREADY_FILLED"] = "ALREADY_FILLED";
610
+ })(FailedOrderCancellation.reason_code || (FailedOrderCancellation.reason_code = {}));
611
+ })(FailedOrderCancellation || (FailedOrderCancellation = {}));
612
+
601
613
  /* istanbul ignore file */
602
614
  /* tslint:disable */
603
615
  /* eslint-disable */
package/dist/passport.js CHANGED
@@ -2072,7 +2072,7 @@ class MultiRollupApiClients {
2072
2072
  }
2073
2073
 
2074
2074
  // eslint-disable-next-line @typescript-eslint/naming-convention
2075
- const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.27.10' };
2075
+ const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.27.12' };
2076
2076
  const createConfig = ({ basePath, headers, }) => {
2077
2077
  if (!basePath.trim()) {
2078
2078
  throw Error('basePath can not be empty');
@@ -2128,7 +2128,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
2128
2128
  chainID,
2129
2129
  coreContractAddress,
2130
2130
  registrationContractAddress,
2131
- sdkVersion: 'ts-immutable-sdk-0.27.10',
2131
+ sdkVersion: 'ts-immutable-sdk-0.27.12',
2132
2132
  });
2133
2133
  /**
2134
2134
  * Sets `sdkVersion` at the time of build
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@imtbl/sdk",
3
3
  "description": "Immutable Unified SDK",
4
- "version": "0.27.10",
4
+ "version": "0.27.12",
5
5
  "author": "Immutable",
6
6
  "browser": "./dist/index.browser.js",
7
7
  "bugs": "https://github.com/immutable/ts-immutable-sdk/issues",