@imtbl/sdk 0.27.2-alpha → 0.27.3

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/dist/index.js CHANGED
@@ -146,6 +146,8 @@ let Configuration$1 = class Configuration {
146
146
  * https://openapi-generator.tech
147
147
  * Do not edit the class manually.
148
148
  */
149
+ // Some imports not used depending on template conditions
150
+ // @ts-ignore
149
151
  const BASE_PATH$1 = "https://api.sandbox.immutable.com".replace(/\/+$/, "");
150
152
  /**
151
153
  *
@@ -173,10 +175,10 @@ let BaseAPI$1 = class BaseAPI {
173
175
  */
174
176
  let RequiredError$1 = class RequiredError extends Error {
175
177
  field;
178
+ name = "RequiredError";
176
179
  constructor(field, msg) {
177
180
  super(msg);
178
181
  this.field = field;
179
- this.name = "RequiredError";
180
182
  }
181
183
  };
182
184
 
@@ -233,8 +235,6 @@ const setBearerAuthToObject$1 = async function (object, configuration) {
233
235
  }
234
236
  };
235
237
  function setFlattenedQueryParams$1(urlSearchParams, parameter, key = "") {
236
- if (parameter == null)
237
- return;
238
238
  if (typeof parameter === "object") {
239
239
  if (Array.isArray(parameter)) {
240
240
  parameter.forEach(item => setFlattenedQueryParams$1(urlSearchParams, item, key));
@@ -287,7 +287,7 @@ const toPathString$1 = function (url) {
287
287
  */
288
288
  const createRequestFunction$1 = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
289
289
  return (axios = globalAxios, basePath = BASE_PATH) => {
290
- const axiosRequestArgs = { ...axiosArgs.options, url: (configuration?.basePath || axios.defaults.baseURL || basePath) + axiosArgs.url };
290
+ const axiosRequestArgs = { ...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url };
291
291
  return axios.request(axiosRequestArgs);
292
292
  };
293
293
  };
@@ -466,22 +466,32 @@ const ActivitiesApiFactory = function (configuration, basePath, axios) {
466
466
  /**
467
467
  * Get a single activity by ID
468
468
  * @summary Get a single activity by ID
469
- * @param {ActivitiesApiGetActivityRequest} requestParameters Request parameters.
469
+ * @param {string} chainName The name of chain
470
+ * @param {string} activityId The id of activity
470
471
  * @param {*} [options] Override http request option.
471
472
  * @throws {RequiredError}
472
473
  */
473
- getActivity(requestParameters, options) {
474
- return localVarFp.getActivity(requestParameters.chainName, requestParameters.activityId, options).then((request) => request(axios, basePath));
474
+ getActivity(chainName, activityId, options) {
475
+ return localVarFp.getActivity(chainName, activityId, options).then((request) => request(axios, basePath));
475
476
  },
476
477
  /**
477
478
  * List all activities
478
479
  * @summary List all activities
479
- * @param {ActivitiesApiListActivitiesRequest} requestParameters Request parameters.
480
+ * @param {string} chainName The name of chain
481
+ * @param {string} [contractAddress] The contract address of NFT or ERC20 Token
482
+ * @param {string} [tokenId] An `uint256` token id as string
483
+ * @param {string} [accountAddress] The account address activity contains
484
+ * @param {ActivityType} [activityType] The activity type
485
+ * @param {string} [fromIndexedAt] From indexed at including given date
486
+ * @param {string} [toIndexedAt] To indexed at including given date
487
+ * @param {string} [transactionHash] The transaction hash of activity
488
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
489
+ * @param {number} [pageSize] Maximum number of items to return
480
490
  * @param {*} [options] Override http request option.
481
491
  * @throws {RequiredError}
482
492
  */
483
- listActivities(requestParameters, options) {
484
- return localVarFp.listActivities(requestParameters.chainName, requestParameters.contractAddress, requestParameters.tokenId, requestParameters.accountAddress, requestParameters.activityType, requestParameters.fromIndexedAt, requestParameters.toIndexedAt, requestParameters.transactionHash, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(axios, basePath));
493
+ listActivities(chainName, contractAddress, tokenId, accountAddress, activityType, fromIndexedAt, toIndexedAt, transactionHash, pageCursor, pageSize, options) {
494
+ return localVarFp.listActivities(chainName, contractAddress, tokenId, accountAddress, activityType, fromIndexedAt, toIndexedAt, transactionHash, pageCursor, pageSize, options).then((request) => request(axios, basePath));
485
495
  },
486
496
  };
487
497
  };
@@ -601,12 +611,13 @@ const ChainsApiFactory = function (configuration, basePath, axios) {
601
611
  /**
602
612
  * List supported chains
603
613
  * @summary List supported chains
604
- * @param {ChainsApiListChainsRequest} requestParameters Request parameters.
614
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
615
+ * @param {number} [pageSize] Maximum number of items to return
605
616
  * @param {*} [options] Override http request option.
606
617
  * @throws {RequiredError}
607
618
  */
608
- listChains(requestParameters = {}, options) {
609
- return localVarFp.listChains(requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(axios, basePath));
619
+ listChains(pageCursor, pageSize, options) {
620
+ return localVarFp.listChains(pageCursor, pageSize, options).then((request) => request(axios, basePath));
610
621
  },
611
622
  };
612
623
  };
@@ -885,42 +896,52 @@ const CollectionsApiFactory = function (configuration, basePath, axios) {
885
896
  /**
886
897
  * Get collection by contract address
887
898
  * @summary Get collection by contract address
888
- * @param {CollectionsApiGetCollectionRequest} requestParameters Request parameters.
899
+ * @param {string} contractAddress The address contract
900
+ * @param {string} chainName The name of chain
889
901
  * @param {*} [options] Override http request option.
890
902
  * @throws {RequiredError}
891
903
  */
892
- getCollection(requestParameters, options) {
893
- return localVarFp.getCollection(requestParameters.contractAddress, requestParameters.chainName, options).then((request) => request(axios, basePath));
904
+ getCollection(contractAddress, chainName, options) {
905
+ return localVarFp.getCollection(contractAddress, chainName, options).then((request) => request(axios, basePath));
894
906
  },
895
907
  /**
896
908
  * List all collections
897
909
  * @summary List all collections
898
- * @param {CollectionsApiListCollectionsRequest} requestParameters Request parameters.
910
+ * @param {string} chainName The name of chain
911
+ * @param {Array<string>} [contractAddress] List of contract addresses to filter by
912
+ * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
913
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
914
+ * @param {number} [pageSize] Maximum number of items to return
899
915
  * @param {*} [options] Override http request option.
900
916
  * @throws {RequiredError}
901
917
  */
902
- listCollections(requestParameters, options) {
903
- return localVarFp.listCollections(requestParameters.chainName, requestParameters.contractAddress, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(axios, basePath));
918
+ listCollections(chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options) {
919
+ return localVarFp.listCollections(chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options).then((request) => request(axios, basePath));
904
920
  },
905
921
  /**
906
922
  * List collections by NFT owner account address
907
923
  * @summary List collections by NFT owner
908
- * @param {CollectionsApiListCollectionsByNFTOwnerRequest} requestParameters Request parameters.
924
+ * @param {string} accountAddress Account address
925
+ * @param {string} chainName The name of chain
926
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
927
+ * @param {number} [pageSize] Maximum number of items to return
909
928
  * @param {*} [options] Override http request option.
910
929
  * @throws {RequiredError}
911
930
  */
912
- listCollectionsByNFTOwner(requestParameters, options) {
913
- return localVarFp.listCollectionsByNFTOwner(requestParameters.accountAddress, requestParameters.chainName, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(axios, basePath));
931
+ listCollectionsByNFTOwner(accountAddress, chainName, pageCursor, pageSize, options) {
932
+ return localVarFp.listCollectionsByNFTOwner(accountAddress, chainName, pageCursor, pageSize, options).then((request) => request(axios, basePath));
914
933
  },
915
934
  /**
916
935
  * Refresh collection metadata
917
936
  * @summary Refresh collection metadata
918
- * @param {CollectionsApiRefreshCollectionMetadataRequest} requestParameters Request parameters.
937
+ * @param {string} contractAddress The address contract
938
+ * @param {string} chainName The name of chain
939
+ * @param {RefreshCollectionMetadataRequest} refreshCollectionMetadataRequest The request body
919
940
  * @param {*} [options] Override http request option.
920
941
  * @throws {RequiredError}
921
942
  */
922
- refreshCollectionMetadata(requestParameters, options) {
923
- return localVarFp.refreshCollectionMetadata(requestParameters.contractAddress, requestParameters.chainName, requestParameters.refreshCollectionMetadataRequest, options).then((request) => request(axios, basePath));
943
+ refreshCollectionMetadata(contractAddress, chainName, refreshCollectionMetadataRequest, options) {
944
+ return localVarFp.refreshCollectionMetadata(contractAddress, chainName, refreshCollectionMetadataRequest, options).then((request) => request(axios, basePath));
924
945
  },
925
946
  };
926
947
  };
@@ -1235,42 +1256,52 @@ const MetadataApiFactory = function (configuration, basePath, axios) {
1235
1256
  /**
1236
1257
  * Get metadata by ID
1237
1258
  * @summary Get metadata by ID
1238
- * @param {MetadataApiGetMetadataRequest} requestParameters Request parameters.
1259
+ * @param {string} chainName The name of chain
1260
+ * @param {string} contractAddress The address of metadata contract
1261
+ * @param {string} metadataId The id of the metadata
1239
1262
  * @param {*} [options] Override http request option.
1240
1263
  * @throws {RequiredError}
1241
1264
  */
1242
- getMetadata(requestParameters, options) {
1243
- return localVarFp.getMetadata(requestParameters.chainName, requestParameters.contractAddress, requestParameters.metadataId, options).then((request) => request(axios, basePath));
1265
+ getMetadata(chainName, contractAddress, metadataId, options) {
1266
+ return localVarFp.getMetadata(chainName, contractAddress, metadataId, options).then((request) => request(axios, basePath));
1244
1267
  },
1245
1268
  /**
1246
1269
  * Get a list of metadata by from the a given contract
1247
1270
  * @summary Get a list of metadata by from the a given contract
1248
- * @param {MetadataApiListMetadataRequest} requestParameters Request parameters.
1271
+ * @param {string} chainName The name of chain
1272
+ * @param {string} contractAddress The address of metadata contract
1273
+ * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
1274
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1275
+ * @param {number} [pageSize] Maximum number of items to return
1249
1276
  * @param {*} [options] Override http request option.
1250
1277
  * @throws {RequiredError}
1251
1278
  */
1252
- listMetadata(requestParameters, options) {
1253
- return localVarFp.listMetadata(requestParameters.chainName, requestParameters.contractAddress, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(axios, basePath));
1279
+ listMetadata(chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options) {
1280
+ return localVarFp.listMetadata(chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options).then((request) => request(axios, basePath));
1254
1281
  },
1255
1282
  /**
1256
1283
  * Refresh stacked metadata
1257
1284
  * @summary Refresh stacked metadata
1258
- * @param {MetadataApiRefreshMetadataByIDRequest} requestParameters Request parameters.
1285
+ * @param {string} chainName The name of chain
1286
+ * @param {string} contractAddress Contract address
1287
+ * @param {RefreshMetadataByIDRequest} refreshMetadataByIDRequest NFT Metadata Refresh Request
1259
1288
  * @param {*} [options] Override http request option.
1260
1289
  * @throws {RequiredError}
1261
1290
  */
1262
- refreshMetadataByID(requestParameters, options) {
1263
- return localVarFp.refreshMetadataByID(requestParameters.chainName, requestParameters.contractAddress, requestParameters.refreshMetadataByIDRequest, options).then((request) => request(axios, basePath));
1291
+ refreshMetadataByID(chainName, contractAddress, refreshMetadataByIDRequest, options) {
1292
+ return localVarFp.refreshMetadataByID(chainName, contractAddress, refreshMetadataByIDRequest, options).then((request) => request(axios, basePath));
1264
1293
  },
1265
1294
  /**
1266
1295
  * Refresh NFT metadata
1267
1296
  * @summary Refresh NFT metadata
1268
- * @param {MetadataApiRefreshNFTMetadataByTokenIDRequest} requestParameters Request parameters.
1297
+ * @param {string} contractAddress The address of contract
1298
+ * @param {string} chainName The name of chain
1299
+ * @param {RefreshNFTMetadataByTokenIDRequest} refreshNFTMetadataByTokenIDRequest the request body
1269
1300
  * @param {*} [options] Override http request option.
1270
1301
  * @throws {RequiredError}
1271
1302
  */
1272
- refreshNFTMetadataByTokenID(requestParameters, options) {
1273
- return localVarFp.refreshNFTMetadataByTokenID(requestParameters.contractAddress, requestParameters.chainName, requestParameters.refreshNFTMetadataByTokenIDRequest, options).then((request) => request(axios, basePath));
1303
+ refreshNFTMetadataByTokenID(contractAddress, chainName, refreshNFTMetadataByTokenIDRequest, options) {
1304
+ return localVarFp.refreshNFTMetadataByTokenID(contractAddress, chainName, refreshNFTMetadataByTokenIDRequest, options).then((request) => request(axios, basePath));
1274
1305
  },
1275
1306
  };
1276
1307
  };
@@ -1489,22 +1520,30 @@ const NftOwnersApiFactory = function (configuration, basePath, axios) {
1489
1520
  /**
1490
1521
  * List NFT owners by token ID
1491
1522
  * @summary List NFT owners by token ID
1492
- * @param {NftOwnersApiListNFTOwnersRequest} requestParameters Request parameters.
1523
+ * @param {string} contractAddress The address of contract
1524
+ * @param {string} tokenId An &#x60;uint256&#x60; token id as string
1525
+ * @param {string} chainName The name of chain
1526
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1527
+ * @param {number} [pageSize] Maximum number of items to return
1493
1528
  * @param {*} [options] Override http request option.
1494
1529
  * @throws {RequiredError}
1495
1530
  */
1496
- listNFTOwners(requestParameters, options) {
1497
- return localVarFp.listNFTOwners(requestParameters.contractAddress, requestParameters.tokenId, requestParameters.chainName, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(axios, basePath));
1531
+ listNFTOwners(contractAddress, tokenId, chainName, pageCursor, pageSize, options) {
1532
+ return localVarFp.listNFTOwners(contractAddress, tokenId, chainName, pageCursor, pageSize, options).then((request) => request(axios, basePath));
1498
1533
  },
1499
1534
  /**
1500
1535
  * List owners by contract address
1501
1536
  * @summary List owners by contract address
1502
- * @param {NftOwnersApiListOwnersByContractAddressRequest} requestParameters Request parameters.
1537
+ * @param {string} contractAddress The address of contract
1538
+ * @param {string} chainName The name of chain
1539
+ * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
1540
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1541
+ * @param {number} [pageSize] Maximum number of items to return
1503
1542
  * @param {*} [options] Override http request option.
1504
1543
  * @throws {RequiredError}
1505
1544
  */
1506
- listOwnersByContractAddress(requestParameters, options) {
1507
- return localVarFp.listOwnersByContractAddress(requestParameters.contractAddress, requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(axios, basePath));
1545
+ listOwnersByContractAddress(contractAddress, chainName, fromUpdatedAt, pageCursor, pageSize, options) {
1546
+ return localVarFp.listOwnersByContractAddress(contractAddress, chainName, fromUpdatedAt, pageCursor, pageSize, options).then((request) => request(axios, basePath));
1508
1547
  },
1509
1548
  };
1510
1549
  };
@@ -1867,52 +1906,68 @@ const NftsApiFactory = function (configuration, basePath, axios) {
1867
1906
  /**
1868
1907
  * Get NFT by token ID
1869
1908
  * @summary Get NFT by token ID
1870
- * @param {NftsApiGetNFTRequest} requestParameters Request parameters.
1909
+ * @param {string} contractAddress The address of NFT contract
1910
+ * @param {string} tokenId An &#x60;uint256&#x60; token id as string
1911
+ * @param {string} chainName The name of chain
1871
1912
  * @param {*} [options] Override http request option.
1872
1913
  * @throws {RequiredError}
1873
1914
  */
1874
- getNFT(requestParameters, options) {
1875
- return localVarFp.getNFT(requestParameters.contractAddress, requestParameters.tokenId, requestParameters.chainName, options).then((request) => request(axios, basePath));
1915
+ getNFT(contractAddress, tokenId, chainName, options) {
1916
+ return localVarFp.getNFT(contractAddress, tokenId, chainName, options).then((request) => request(axios, basePath));
1876
1917
  },
1877
1918
  /**
1878
1919
  * List all NFT owners on a chain
1879
1920
  * @summary List all NFT owners
1880
- * @param {NftsApiListAllNFTOwnersRequest} requestParameters Request parameters.
1921
+ * @param {string} chainName The name of chain
1922
+ * @param {string} fromUpdatedAt Datetime to use as the oldest updated timestamp
1923
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1924
+ * @param {number} [pageSize] Maximum number of items to return
1881
1925
  * @param {*} [options] Override http request option.
1882
1926
  * @throws {RequiredError}
1883
1927
  */
1884
- listAllNFTOwners(requestParameters, options) {
1885
- return localVarFp.listAllNFTOwners(requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(axios, basePath));
1928
+ listAllNFTOwners(chainName, fromUpdatedAt, pageCursor, pageSize, options) {
1929
+ return localVarFp.listAllNFTOwners(chainName, fromUpdatedAt, pageCursor, pageSize, options).then((request) => request(axios, basePath));
1886
1930
  },
1887
1931
  /**
1888
1932
  * List all NFTs on a chain
1889
1933
  * @summary List all NFTs
1890
- * @param {NftsApiListAllNFTsRequest} requestParameters Request parameters.
1934
+ * @param {string} chainName The name of chain
1935
+ * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
1936
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1937
+ * @param {number} [pageSize] Maximum number of items to return
1891
1938
  * @param {*} [options] Override http request option.
1892
1939
  * @throws {RequiredError}
1893
1940
  */
1894
- listAllNFTs(requestParameters, options) {
1895
- return localVarFp.listAllNFTs(requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(axios, basePath));
1941
+ listAllNFTs(chainName, fromUpdatedAt, pageCursor, pageSize, options) {
1942
+ return localVarFp.listAllNFTs(chainName, fromUpdatedAt, pageCursor, pageSize, options).then((request) => request(axios, basePath));
1896
1943
  },
1897
1944
  /**
1898
1945
  * List NFTs by contract address
1899
1946
  * @summary List NFTs by contract address
1900
- * @param {NftsApiListNFTsRequest} requestParameters Request parameters.
1947
+ * @param {string} contractAddress Contract address
1948
+ * @param {string} chainName The name of chain
1949
+ * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
1950
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1951
+ * @param {number} [pageSize] Maximum number of items to return
1901
1952
  * @param {*} [options] Override http request option.
1902
1953
  * @throws {RequiredError}
1903
1954
  */
1904
- listNFTs(requestParameters, options) {
1905
- return localVarFp.listNFTs(requestParameters.contractAddress, requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(axios, basePath));
1955
+ listNFTs(contractAddress, chainName, fromUpdatedAt, pageCursor, pageSize, options) {
1956
+ return localVarFp.listNFTs(contractAddress, chainName, fromUpdatedAt, pageCursor, pageSize, options).then((request) => request(axios, basePath));
1906
1957
  },
1907
1958
  /**
1908
1959
  * List NFTs by account address
1909
1960
  * @summary List NFTs by account address
1910
- * @param {NftsApiListNFTsByAccountAddressRequest} requestParameters Request parameters.
1961
+ * @param {string} accountAddress Account address
1962
+ * @param {string} chainName The name of chain
1963
+ * @param {string} [contractAddress] The address of contract
1964
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1965
+ * @param {number} [pageSize] Maximum number of items to return
1911
1966
  * @param {*} [options] Override http request option.
1912
1967
  * @throws {RequiredError}
1913
1968
  */
1914
- listNFTsByAccountAddress(requestParameters, options) {
1915
- return localVarFp.listNFTsByAccountAddress(requestParameters.accountAddress, requestParameters.chainName, requestParameters.contractAddress, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(axios, basePath));
1969
+ listNFTsByAccountAddress(accountAddress, chainName, contractAddress, pageCursor, pageSize, options) {
1970
+ return localVarFp.listNFTsByAccountAddress(accountAddress, chainName, contractAddress, pageCursor, pageSize, options).then((request) => request(axios, basePath));
1916
1971
  },
1917
1972
  };
1918
1973
  };
@@ -2176,8 +2231,8 @@ const OrdersApiAxiosParamCreator = function (configuration) {
2176
2231
  * @param {string} [buyItemContractAddress] Buy item contract address to filter by
2177
2232
  * @param {string} [sellItemTokenId] Sell item token identifier to filter by
2178
2233
  * @param {number} [pageSize] Maximum number of orders to return per page
2179
- * @param {ListListingsSortByEnum} [sortBy] Order field to sort by
2180
- * @param {ListListingsSortDirectionEnum} [sortDirection] Ascending or descending direction for sort
2234
+ * @param {'created_at' | 'updated_at' | 'buy_item_amount'} [sortBy] Order field to sort by
2235
+ * @param {'asc' | 'desc'} [sortDirection] Ascending or descending direction for sort
2181
2236
  * @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response.
2182
2237
  * @param {*} [options] Override http request option.
2183
2238
  * @throws {RequiredError}
@@ -2234,8 +2289,8 @@ const OrdersApiAxiosParamCreator = function (configuration) {
2234
2289
  * @param {string} chainName
2235
2290
  * @param {string} [accountAddress]
2236
2291
  * @param {number} [pageSize] Maximum number of trades to return per page
2237
- * @param {ListTradesSortByEnum} [sortBy] Trade field to sort by
2238
- * @param {ListTradesSortDirectionEnum} [sortDirection] Ascending or descending direction for sort
2292
+ * @param {'indexed_at'} [sortBy] Trade field to sort by
2293
+ * @param {'asc' | 'desc'} [sortDirection] Ascending or descending direction for sort
2239
2294
  * @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response.
2240
2295
  * @param {*} [options] Override http request option.
2241
2296
  * @throws {RequiredError}
@@ -2355,8 +2410,8 @@ const OrdersApiFp = function (configuration) {
2355
2410
  * @param {string} [buyItemContractAddress] Buy item contract address to filter by
2356
2411
  * @param {string} [sellItemTokenId] Sell item token identifier to filter by
2357
2412
  * @param {number} [pageSize] Maximum number of orders to return per page
2358
- * @param {ListListingsSortByEnum} [sortBy] Order field to sort by
2359
- * @param {ListListingsSortDirectionEnum} [sortDirection] Ascending or descending direction for sort
2413
+ * @param {'created_at' | 'updated_at' | 'buy_item_amount'} [sortBy] Order field to sort by
2414
+ * @param {'asc' | 'desc'} [sortDirection] Ascending or descending direction for sort
2360
2415
  * @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response.
2361
2416
  * @param {*} [options] Override http request option.
2362
2417
  * @throws {RequiredError}
@@ -2371,8 +2426,8 @@ const OrdersApiFp = function (configuration) {
2371
2426
  * @param {string} chainName
2372
2427
  * @param {string} [accountAddress]
2373
2428
  * @param {number} [pageSize] Maximum number of trades to return per page
2374
- * @param {ListTradesSortByEnum} [sortBy] Trade field to sort by
2375
- * @param {ListTradesSortDirectionEnum} [sortDirection] Ascending or descending direction for sort
2429
+ * @param {'indexed_at'} [sortBy] Trade field to sort by
2430
+ * @param {'asc' | 'desc'} [sortDirection] Ascending or descending direction for sort
2376
2431
  * @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response.
2377
2432
  * @param {*} [options] Override http request option.
2378
2433
  * @throws {RequiredError}
@@ -2393,72 +2448,90 @@ const OrdersApiFactory = function (configuration, basePath, axios) {
2393
2448
  /**
2394
2449
  * Cancel one or more orders
2395
2450
  * @summary Cancel one or more orders
2396
- * @param {OrdersApiCancelOrdersRequest} requestParameters Request parameters.
2451
+ * @param {string} chainName
2452
+ * @param {CancelOrdersRequestBody} cancelOrdersRequestBody
2397
2453
  * @param {*} [options] Override http request option.
2398
2454
  * @throws {RequiredError}
2399
2455
  */
2400
- cancelOrders(requestParameters, options) {
2401
- return localVarFp.cancelOrders(requestParameters.chainName, requestParameters.cancelOrdersRequestBody, options).then((request) => request(axios, basePath));
2456
+ cancelOrders(chainName, cancelOrdersRequestBody, options) {
2457
+ return localVarFp.cancelOrders(chainName, cancelOrdersRequestBody, options).then((request) => request(axios, basePath));
2402
2458
  },
2403
2459
  /**
2404
2460
  * Create a listing
2405
2461
  * @summary Create a listing
2406
- * @param {OrdersApiCreateListingRequest} requestParameters Request parameters.
2462
+ * @param {string} chainName
2463
+ * @param {CreateListingRequestBody} createListingRequestBody
2407
2464
  * @param {*} [options] Override http request option.
2408
2465
  * @throws {RequiredError}
2409
2466
  */
2410
- createListing(requestParameters, options) {
2411
- return localVarFp.createListing(requestParameters.chainName, requestParameters.createListingRequestBody, options).then((request) => request(axios, basePath));
2467
+ createListing(chainName, createListingRequestBody, options) {
2468
+ return localVarFp.createListing(chainName, createListingRequestBody, options).then((request) => request(axios, basePath));
2412
2469
  },
2413
2470
  /**
2414
2471
  * Retrieve signed fulfillment data based on the list of order IDs and corresponding fees.
2415
2472
  * @summary Retrieve fulfillment data for orders
2416
- * @param {OrdersApiFulfillmentDataRequest} requestParameters Request parameters.
2473
+ * @param {string} chainName
2474
+ * @param {Array<FulfillmentDataRequest>} fulfillmentDataRequest
2417
2475
  * @param {*} [options] Override http request option.
2418
2476
  * @throws {RequiredError}
2419
2477
  */
2420
- fulfillmentData(requestParameters, options) {
2421
- return localVarFp.fulfillmentData(requestParameters.chainName, requestParameters.fulfillmentDataRequest, options).then((request) => request(axios, basePath));
2478
+ fulfillmentData(chainName, fulfillmentDataRequest, options) {
2479
+ return localVarFp.fulfillmentData(chainName, fulfillmentDataRequest, options).then((request) => request(axios, basePath));
2422
2480
  },
2423
2481
  /**
2424
2482
  * Get a single listing by ID
2425
2483
  * @summary Get a single listing by ID
2426
- * @param {OrdersApiGetListingRequest} requestParameters Request parameters.
2484
+ * @param {string} chainName
2485
+ * @param {string} listingId Global Order identifier
2427
2486
  * @param {*} [options] Override http request option.
2428
2487
  * @throws {RequiredError}
2429
2488
  */
2430
- getListing(requestParameters, options) {
2431
- return localVarFp.getListing(requestParameters.chainName, requestParameters.listingId, options).then((request) => request(axios, basePath));
2489
+ getListing(chainName, listingId, options) {
2490
+ return localVarFp.getListing(chainName, listingId, options).then((request) => request(axios, basePath));
2432
2491
  },
2433
2492
  /**
2434
2493
  * Get a single trade by ID
2435
2494
  * @summary Get a single trade by ID
2436
- * @param {OrdersApiGetTradeRequest} requestParameters Request parameters.
2495
+ * @param {string} chainName
2496
+ * @param {string} tradeId Global Trade identifier
2437
2497
  * @param {*} [options] Override http request option.
2438
2498
  * @throws {RequiredError}
2439
2499
  */
2440
- getTrade(requestParameters, options) {
2441
- return localVarFp.getTrade(requestParameters.chainName, requestParameters.tradeId, options).then((request) => request(axios, basePath));
2500
+ getTrade(chainName, tradeId, options) {
2501
+ return localVarFp.getTrade(chainName, tradeId, options).then((request) => request(axios, basePath));
2442
2502
  },
2443
2503
  /**
2444
2504
  * List all listings
2445
2505
  * @summary List all listings
2446
- * @param {OrdersApiListListingsRequest} requestParameters Request parameters.
2506
+ * @param {string} chainName
2507
+ * @param {OrderStatusName} [status] Order status to filter by
2508
+ * @param {string} [sellItemContractAddress] Sell item contract address to filter by
2509
+ * @param {string} [buyItemContractAddress] Buy item contract address to filter by
2510
+ * @param {string} [sellItemTokenId] Sell item token identifier to filter by
2511
+ * @param {number} [pageSize] Maximum number of orders to return per page
2512
+ * @param {'created_at' | 'updated_at' | 'buy_item_amount'} [sortBy] Order field to sort by
2513
+ * @param {'asc' | 'desc'} [sortDirection] Ascending or descending direction for sort
2514
+ * @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response.
2447
2515
  * @param {*} [options] Override http request option.
2448
2516
  * @throws {RequiredError}
2449
2517
  */
2450
- listListings(requestParameters, options) {
2451
- return localVarFp.listListings(requestParameters.chainName, requestParameters.status, requestParameters.sellItemContractAddress, requestParameters.buyItemContractAddress, requestParameters.sellItemTokenId, requestParameters.pageSize, requestParameters.sortBy, requestParameters.sortDirection, requestParameters.pageCursor, options).then((request) => request(axios, basePath));
2518
+ listListings(chainName, status, sellItemContractAddress, buyItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options) {
2519
+ return localVarFp.listListings(chainName, status, sellItemContractAddress, buyItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options).then((request) => request(axios, basePath));
2452
2520
  },
2453
2521
  /**
2454
2522
  * List all trades
2455
2523
  * @summary List all trades
2456
- * @param {OrdersApiListTradesRequest} requestParameters Request parameters.
2524
+ * @param {string} chainName
2525
+ * @param {string} [accountAddress]
2526
+ * @param {number} [pageSize] Maximum number of trades to return per page
2527
+ * @param {'indexed_at'} [sortBy] Trade field to sort by
2528
+ * @param {'asc' | 'desc'} [sortDirection] Ascending or descending direction for sort
2529
+ * @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response.
2457
2530
  * @param {*} [options] Override http request option.
2458
2531
  * @throws {RequiredError}
2459
2532
  */
2460
- listTrades(requestParameters, options) {
2461
- return localVarFp.listTrades(requestParameters.chainName, requestParameters.accountAddress, requestParameters.pageSize, requestParameters.sortBy, requestParameters.sortDirection, requestParameters.pageCursor, options).then((request) => request(axios, basePath));
2533
+ listTrades(chainName, accountAddress, pageSize, sortBy, sortDirection, pageCursor, options) {
2534
+ return localVarFp.listTrades(chainName, accountAddress, pageSize, sortBy, sortDirection, pageCursor, options).then((request) => request(axios, basePath));
2462
2535
  },
2463
2536
  };
2464
2537
  };
@@ -2547,34 +2620,6 @@ class OrdersApi extends BaseAPI$1 {
2547
2620
  return OrdersApiFp(this.configuration).listTrades(requestParameters.chainName, requestParameters.accountAddress, requestParameters.pageSize, requestParameters.sortBy, requestParameters.sortDirection, requestParameters.pageCursor, options).then((request) => request(this.axios, this.basePath));
2548
2621
  }
2549
2622
  }
2550
- /**
2551
- * @export
2552
- */
2553
- const ListListingsSortByEnum$1 = {
2554
- CreatedAt: 'created_at',
2555
- UpdatedAt: 'updated_at',
2556
- BuyItemAmount: 'buy_item_amount'
2557
- };
2558
- /**
2559
- * @export
2560
- */
2561
- const ListListingsSortDirectionEnum$1 = {
2562
- Asc: 'asc',
2563
- Desc: 'desc'
2564
- };
2565
- /**
2566
- * @export
2567
- */
2568
- const ListTradesSortByEnum$1 = {
2569
- IndexedAt: 'indexed_at'
2570
- };
2571
- /**
2572
- * @export
2573
- */
2574
- const ListTradesSortDirectionEnum$1 = {
2575
- Asc: 'asc',
2576
- Desc: 'desc'
2577
- };
2578
2623
 
2579
2624
  /* tslint:disable */
2580
2625
  /* eslint-disable */
@@ -2703,22 +2748,22 @@ const PassportApiFactory = function (configuration, basePath, axios) {
2703
2748
  /**
2704
2749
  * Create a counterfactual address for a user based on their Ethereum address
2705
2750
  * @summary Create a counterfactual address
2706
- * @param {PassportApiCreateCounterfactualAddressRequest} requestParameters Request parameters.
2751
+ * @param {CreateCounterfactualAddressRequest} createCounterfactualAddressRequest
2707
2752
  * @param {*} [options] Override http request option.
2708
2753
  * @throws {RequiredError}
2709
2754
  */
2710
- createCounterfactualAddress(requestParameters, options) {
2711
- return localVarFp.createCounterfactualAddress(requestParameters.createCounterfactualAddressRequest, options).then((request) => request(axios, basePath));
2755
+ createCounterfactualAddress(createCounterfactualAddressRequest, options) {
2756
+ return localVarFp.createCounterfactualAddress(createCounterfactualAddressRequest, options).then((request) => request(axios, basePath));
2712
2757
  },
2713
2758
  /**
2714
2759
  * Get all the Ethereum linked addresses for a user based on its userId
2715
2760
  * @summary Get Ethereum linked addresses for a user
2716
- * @param {PassportApiGetLinkedAddressesRequest} requestParameters Request parameters.
2761
+ * @param {string} userId The user\&#39;s userId
2717
2762
  * @param {*} [options] Override http request option.
2718
2763
  * @throws {RequiredError}
2719
2764
  */
2720
- getLinkedAddresses(requestParameters, options) {
2721
- return localVarFp.getLinkedAddresses(requestParameters.userId, options).then((request) => request(axios, basePath));
2765
+ getLinkedAddresses(userId, options) {
2766
+ return localVarFp.getLinkedAddresses(userId, options).then((request) => request(axios, basePath));
2722
2767
  },
2723
2768
  };
2724
2769
  };
@@ -2895,22 +2940,26 @@ const TokensApiFactory = function (configuration, basePath, axios) {
2895
2940
  /**
2896
2941
  * Get single ERC20 token
2897
2942
  * @summary Get single ERC20 token
2898
- * @param {TokensApiGetERC20TokenRequest} requestParameters Request parameters.
2943
+ * @param {string} contractAddress The address of contract
2944
+ * @param {string} chainName The name of chain
2899
2945
  * @param {*} [options] Override http request option.
2900
2946
  * @throws {RequiredError}
2901
2947
  */
2902
- getERC20Token(requestParameters, options) {
2903
- return localVarFp.getERC20Token(requestParameters.contractAddress, requestParameters.chainName, options).then((request) => request(axios, basePath));
2948
+ getERC20Token(contractAddress, chainName, options) {
2949
+ return localVarFp.getERC20Token(contractAddress, chainName, options).then((request) => request(axios, basePath));
2904
2950
  },
2905
2951
  /**
2906
2952
  * List ERC20 tokens
2907
2953
  * @summary List ERC20 tokens
2908
- * @param {TokensApiListERC20TokensRequest} requestParameters Request parameters.
2954
+ * @param {string} chainName The name of chain
2955
+ * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
2956
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
2957
+ * @param {number} [pageSize] Maximum number of items to return
2909
2958
  * @param {*} [options] Override http request option.
2910
2959
  * @throws {RequiredError}
2911
2960
  */
2912
- listERC20Tokens(requestParameters, options) {
2913
- return localVarFp.listERC20Tokens(requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(axios, basePath));
2961
+ listERC20Tokens(chainName, fromUpdatedAt, pageCursor, pageSize, options) {
2962
+ return localVarFp.listERC20Tokens(chainName, fromUpdatedAt, pageCursor, pageSize, options).then((request) => request(axios, basePath));
2914
2963
  },
2915
2964
  };
2916
2965
  };
@@ -3033,6 +3082,125 @@ let Configuration$2 = class Configuration {
3033
3082
  }
3034
3083
  };
3035
3084
 
3085
+ /* tslint:disable */
3086
+ /* eslint-disable */
3087
+ /**
3088
+ * Immutable zkEVM API
3089
+ * Immutable Multi Rollup API
3090
+ *
3091
+ * The version of the OpenAPI document: 1.0.0
3092
+ * Contact: support@immutable.com
3093
+ *
3094
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3095
+ * https://openapi-generator.tech
3096
+ * Do not edit the class manually.
3097
+ */
3098
+ const APIError400AllOfCodeEnum = {
3099
+ ValidationError: 'VALIDATION_ERROR'
3100
+ };
3101
+
3102
+ /* tslint:disable */
3103
+ /* eslint-disable */
3104
+ /**
3105
+ * Immutable zkEVM API
3106
+ * Immutable Multi Rollup API
3107
+ *
3108
+ * The version of the OpenAPI document: 1.0.0
3109
+ * Contact: support@immutable.com
3110
+ *
3111
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3112
+ * https://openapi-generator.tech
3113
+ * Do not edit the class manually.
3114
+ */
3115
+ const APIError401AllOfCodeEnum = {
3116
+ UnauthorisedRequest: 'UNAUTHORISED_REQUEST'
3117
+ };
3118
+
3119
+ /* tslint:disable */
3120
+ /* eslint-disable */
3121
+ /**
3122
+ * Immutable zkEVM API
3123
+ * Immutable Multi Rollup API
3124
+ *
3125
+ * The version of the OpenAPI document: 1.0.0
3126
+ * Contact: support@immutable.com
3127
+ *
3128
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3129
+ * https://openapi-generator.tech
3130
+ * Do not edit the class manually.
3131
+ */
3132
+ const APIError403AllOfCodeEnum = {
3133
+ AuthenticationError: 'AUTHENTICATION_ERROR'
3134
+ };
3135
+
3136
+ /* tslint:disable */
3137
+ /* eslint-disable */
3138
+ /**
3139
+ * Immutable zkEVM API
3140
+ * Immutable Multi Rollup API
3141
+ *
3142
+ * The version of the OpenAPI document: 1.0.0
3143
+ * Contact: support@immutable.com
3144
+ *
3145
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3146
+ * https://openapi-generator.tech
3147
+ * Do not edit the class manually.
3148
+ */
3149
+ const APIError404AllOfCodeEnum = {
3150
+ ResourceNotFound: 'RESOURCE_NOT_FOUND'
3151
+ };
3152
+
3153
+ /* tslint:disable */
3154
+ /* eslint-disable */
3155
+ /**
3156
+ * Immutable zkEVM API
3157
+ * Immutable Multi Rollup API
3158
+ *
3159
+ * The version of the OpenAPI document: 1.0.0
3160
+ * Contact: support@immutable.com
3161
+ *
3162
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3163
+ * https://openapi-generator.tech
3164
+ * Do not edit the class manually.
3165
+ */
3166
+ const APIError429AllOfCodeEnum = {
3167
+ TooManyRequestsError: 'TOO_MANY_REQUESTS_ERROR'
3168
+ };
3169
+
3170
+ /* tslint:disable */
3171
+ /* eslint-disable */
3172
+ /**
3173
+ * Immutable zkEVM API
3174
+ * Immutable Multi Rollup API
3175
+ *
3176
+ * The version of the OpenAPI document: 1.0.0
3177
+ * Contact: support@immutable.com
3178
+ *
3179
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3180
+ * https://openapi-generator.tech
3181
+ * Do not edit the class manually.
3182
+ */
3183
+ const APIError500AllOfCodeEnum = {
3184
+ InternalServerError: 'INTERNAL_SERVER_ERROR'
3185
+ };
3186
+
3187
+ /* tslint:disable */
3188
+ /* eslint-disable */
3189
+ /**
3190
+ * Immutable zkEVM API
3191
+ * Immutable Multi Rollup API
3192
+ *
3193
+ * The version of the OpenAPI document: 1.0.0
3194
+ * Contact: support@immutable.com
3195
+ *
3196
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3197
+ * https://openapi-generator.tech
3198
+ * Do not edit the class manually.
3199
+ */
3200
+ const APIError501AllOfCodeEnum = {
3201
+ NotImplementedError: 'NOT_IMPLEMENTED_ERROR'
3202
+ };
3203
+
3036
3204
  /* tslint:disable */
3037
3205
  /* eslint-disable */
3038
3206
  /**
@@ -3397,6 +3565,13 @@ const TokenContractType = {
3397
3565
 
3398
3566
  var index = /*#__PURE__*/Object.freeze({
3399
3567
  __proto__: null,
3568
+ APIError400AllOfCodeEnum: APIError400AllOfCodeEnum,
3569
+ APIError401AllOfCodeEnum: APIError401AllOfCodeEnum,
3570
+ APIError403AllOfCodeEnum: APIError403AllOfCodeEnum,
3571
+ APIError404AllOfCodeEnum: APIError404AllOfCodeEnum,
3572
+ APIError429AllOfCodeEnum: APIError429AllOfCodeEnum,
3573
+ APIError500AllOfCodeEnum: APIError500AllOfCodeEnum,
3574
+ APIError501AllOfCodeEnum: APIError501AllOfCodeEnum,
3400
3575
  ActiveOrderStatusNameEnum: ActiveOrderStatusNameEnum,
3401
3576
  ActivitiesApi: ActivitiesApi,
3402
3577
  ActivitiesApiAxiosParamCreator: ActivitiesApiAxiosParamCreator,
@@ -3422,10 +3597,6 @@ var index = /*#__PURE__*/Object.freeze({
3422
3597
  FeeFeeTypeEnum: FeeFeeTypeEnum,
3423
3598
  FilledOrderStatusNameEnum: FilledOrderStatusNameEnum,
3424
3599
  InactiveOrderStatusNameEnum: InactiveOrderStatusNameEnum,
3425
- ListListingsSortByEnum: ListListingsSortByEnum$1,
3426
- ListListingsSortDirectionEnum: ListListingsSortDirectionEnum$1,
3427
- ListTradesSortByEnum: ListTradesSortByEnum$1,
3428
- ListTradesSortDirectionEnum: ListTradesSortDirectionEnum$1,
3429
3600
  MetadataApi: MetadataApi,
3430
3601
  MetadataApiAxiosParamCreator: MetadataApiAxiosParamCreator,
3431
3602
  MetadataApiFactory: MetadataApiFactory,
@@ -3459,134 +3630,6 @@ var index = /*#__PURE__*/Object.freeze({
3459
3630
  TokensApiFp: TokensApiFp
3460
3631
  });
3461
3632
 
3462
- /* tslint:disable */
3463
- /* eslint-disable */
3464
- /**
3465
- * Immutable zkEVM API
3466
- * Immutable Multi Rollup API
3467
- *
3468
- * The version of the OpenAPI document: 1.0.0
3469
- * Contact: support@immutable.com
3470
- *
3471
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3472
- * https://openapi-generator.tech
3473
- * Do not edit the class manually.
3474
- */
3475
- // @ts-ignore
3476
-
3477
- var activitiesApiTypes = /*#__PURE__*/Object.freeze({
3478
- __proto__: null,
3479
- ActivityType: ActivityType
3480
- });
3481
-
3482
- /* tslint:disable */
3483
- /* eslint-disable */
3484
- /**
3485
- * Immutable zkEVM API
3486
- * Immutable Multi Rollup API
3487
- *
3488
- * The version of the OpenAPI document: 1.0.0
3489
- * Contact: support@immutable.com
3490
- *
3491
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3492
- * https://openapi-generator.tech
3493
- * Do not edit the class manually.
3494
- */
3495
-
3496
- var chainsApiTypes = /*#__PURE__*/Object.freeze({
3497
- __proto__: null
3498
- });
3499
-
3500
- /* tslint:disable */
3501
- /* eslint-disable */
3502
- /**
3503
- * Immutable zkEVM API
3504
- * Immutable Multi Rollup API
3505
- *
3506
- * The version of the OpenAPI document: 1.0.0
3507
- * Contact: support@immutable.com
3508
- *
3509
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3510
- * https://openapi-generator.tech
3511
- * Do not edit the class manually.
3512
- */
3513
-
3514
- var collectionsApiTypes = /*#__PURE__*/Object.freeze({
3515
- __proto__: null
3516
- });
3517
-
3518
- /* tslint:disable */
3519
- /* eslint-disable */
3520
- /**
3521
- * Immutable zkEVM API
3522
- * Immutable Multi Rollup API
3523
- *
3524
- * The version of the OpenAPI document: 1.0.0
3525
- * Contact: support@immutable.com
3526
- *
3527
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3528
- * https://openapi-generator.tech
3529
- * Do not edit the class manually.
3530
- */
3531
-
3532
- var metadataApiTypes = /*#__PURE__*/Object.freeze({
3533
- __proto__: null
3534
- });
3535
-
3536
- /* tslint:disable */
3537
- /* eslint-disable */
3538
- /**
3539
- * Immutable zkEVM API
3540
- * Immutable Multi Rollup API
3541
- *
3542
- * The version of the OpenAPI document: 1.0.0
3543
- * Contact: support@immutable.com
3544
- *
3545
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3546
- * https://openapi-generator.tech
3547
- * Do not edit the class manually.
3548
- */
3549
-
3550
- var nftOwnersApiTypes = /*#__PURE__*/Object.freeze({
3551
- __proto__: null
3552
- });
3553
-
3554
- /* tslint:disable */
3555
- /* eslint-disable */
3556
- /**
3557
- * Immutable zkEVM API
3558
- * Immutable Multi Rollup API
3559
- *
3560
- * The version of the OpenAPI document: 1.0.0
3561
- * Contact: support@immutable.com
3562
- *
3563
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3564
- * https://openapi-generator.tech
3565
- * Do not edit the class manually.
3566
- */
3567
-
3568
- var nftsApiTypes = /*#__PURE__*/Object.freeze({
3569
- __proto__: null
3570
- });
3571
-
3572
- /* tslint:disable */
3573
- /* eslint-disable */
3574
- /**
3575
- * Immutable zkEVM API
3576
- * Immutable Multi Rollup API
3577
- *
3578
- * The version of the OpenAPI document: 1.0.0
3579
- * Contact: support@immutable.com
3580
- *
3581
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3582
- * https://openapi-generator.tech
3583
- * Do not edit the class manually.
3584
- */
3585
-
3586
- var tokensApiTypes = /*#__PURE__*/Object.freeze({
3587
- __proto__: null
3588
- });
3589
-
3590
3633
  class MultiRollupApiClients {
3591
3634
  config;
3592
3635
  activitiesApi;
@@ -3609,7 +3652,7 @@ class MultiRollupApiClients {
3609
3652
  }
3610
3653
 
3611
3654
  // eslint-disable-next-line @typescript-eslint/naming-convention
3612
- const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.27.2-alpha' };
3655
+ const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.27.3' };
3613
3656
  const createConfig = ({ basePath, headers, }) => {
3614
3657
  if (!basePath.trim()) {
3615
3658
  throw Error('basePath can not be empty');
@@ -3669,7 +3712,7 @@ class APIError extends Error {
3669
3712
 
3670
3713
  /* eslint-disable implicit-arrow-linebreak */
3671
3714
  const defaultHeaders = {
3672
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.27.2-alpha',
3715
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.27.3',
3673
3716
  };
3674
3717
  /**
3675
3718
  * createAPIConfiguration to create a custom Configuration
@@ -4061,14 +4104,7 @@ class BlockchainData {
4061
4104
  var blockchain_data = /*#__PURE__*/Object.freeze({
4062
4105
  __proto__: null,
4063
4106
  APIError: APIError,
4064
- ActivitiesApi: activitiesApiTypes,
4065
- BlockchainData: BlockchainData,
4066
- ChainsApi: chainsApiTypes,
4067
- CollectionsApi: collectionsApiTypes,
4068
- MetadataApi: metadataApiTypes,
4069
- NFTOwnersApi: nftOwnersApiTypes,
4070
- NFTsApi: nftsApiTypes,
4071
- TokensApi: tokensApiTypes
4107
+ BlockchainData: BlockchainData
4072
4108
  });
4073
4109
 
4074
4110
  /**
@@ -4080,7 +4116,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
4080
4116
  chainID,
4081
4117
  coreContractAddress,
4082
4118
  registrationContractAddress,
4083
- sdkVersion: 'ts-immutable-sdk-0.27.2-alpha',
4119
+ sdkVersion: 'ts-immutable-sdk-0.27.3',
4084
4120
  });
4085
4121
  /**
4086
4122
  * Sets `sdkVersion` at the time of build
@@ -12372,7 +12408,6 @@ async function createOrder({ signers, request, config, }) {
12372
12408
  asset_id_buy: resp.asset_id_buy,
12373
12409
  asset_id_sell: resp.asset_id_sell,
12374
12410
  expiration_timestamp: resp.expiration_timestamp,
12375
- include_fees: true,
12376
12411
  fees: request.fees,
12377
12412
  nonce: resp.nonce,
12378
12413
  stark_key: resp.stark_key,
@@ -12383,14 +12418,14 @@ async function createOrder({ signers, request, config, }) {
12383
12418
  xImxEthAddress: ethAddress,
12384
12419
  xImxEthSignature: ethSignature,
12385
12420
  };
12386
- const createOrderResponse = await ordersApi.createOrder(orderParams);
12421
+ const createOrderResponse = await ordersApi.createOrderV3(orderParams);
12387
12422
  return {
12388
12423
  ...createOrderResponse.data,
12389
12424
  };
12390
12425
  }
12391
12426
  async function cancelOrder({ signers, request, config, }) {
12392
12427
  const ordersApi = new OrdersApi$1(config.immutableXConfig.apiConfiguration);
12393
- const getSignableCancelOrderResponse = await ordersApi.getSignableCancelOrder({
12428
+ const getSignableCancelOrderResponse = await ordersApi.getSignableCancelOrderV3({
12394
12429
  getSignableCancelOrderRequest: {
12395
12430
  order_id: request.order_id,
12396
12431
  },
@@ -12399,7 +12434,7 @@ async function cancelOrder({ signers, request, config, }) {
12399
12434
  const ethSignature = await signRaw(signableMessage, signers.ethSigner);
12400
12435
  const starkSignature = await signers.starkSigner.signMessage(payloadHash);
12401
12436
  const ethAddress = await signers.ethSigner.getAddress();
12402
- const cancelOrderResponse = await ordersApi.cancelOrder({
12437
+ const cancelOrderResponse = await ordersApi.cancelOrderV3({
12403
12438
  id: request.order_id.toString(),
12404
12439
  cancelOrderRequest: {
12405
12440
  order_id: request.order_id,
@@ -12700,7 +12735,7 @@ async function createTrade({ signers: { ethSigner, starkSigner }, request, confi
12700
12735
  const { signable_message: signableMessage, payload_hash: payloadHash } = signableResult.data;
12701
12736
  const ethSignature = await signRaw(signableMessage, ethSigner);
12702
12737
  const starkSignature = await starkSigner.signMessage(payloadHash);
12703
- const createTradeResponse = await tradesApi.createTrade({
12738
+ const createTradeResponse = await tradesApi.createTradeV3({
12704
12739
  createTradeRequest: {
12705
12740
  amount_buy: signableResult.data.amount_buy,
12706
12741
  amount_sell: signableResult.data.amount_sell,
@@ -29001,11 +29036,11 @@ const $d85ad1457a3f1a83$var$ZKEVM_NATIVE_TOKEN = {
29001
29036
  decimals: $d85ad1457a3f1a83$export$903389470ba9433c,
29002
29037
  address: $d85ad1457a3f1a83$export$b80040cb173ba6e9
29003
29038
  };
29004
- ({
29039
+ const $d85ad1457a3f1a83$export$89133ca13c5ee30 = {
29005
29040
  [$d85ad1457a3f1a83$export$7d3a9eeba384fa59]: "https://api.dev.immutable.com",
29006
29041
  [(Environment$1).SANDBOX]: "https://api.sandbox.immutable.com",
29007
29042
  [(Environment$1).PRODUCTION]: "https://api.immutable.com"
29008
- });
29043
+ };
29009
29044
  const $d85ad1457a3f1a83$export$161d4a74df65fc08 = {
29010
29045
  [$d85ad1457a3f1a83$export$7d3a9eeba384fa59]: "https://checkout-api.dev.immutable.com",
29011
29046
  [(Environment$1).SANDBOX]: "https://checkout-api.sandbox.immutable.com",
@@ -32733,6 +32768,35 @@ async function $d35036efee31c5d1$export$dc8635800ef20f4b(provider, requirements)
32733
32768
 
32734
32769
 
32735
32770
 
32771
+
32772
+
32773
+
32774
+
32775
+ const $5e9bcae98dc8ff19$export$1165ca270f090a66 = (isDevelopment, isProduction)=>{
32776
+ const postEndpoint = ()=>{
32777
+ if (isDevelopment) return ($d85ad1457a3f1a83$export$89133ca13c5ee30)[$d85ad1457a3f1a83$export$7d3a9eeba384fa59];
32778
+ if (isProduction) return ($d85ad1457a3f1a83$export$89133ca13c5ee30)[(Environment$1).PRODUCTION];
32779
+ return ($d85ad1457a3f1a83$export$89133ca13c5ee30)[(Environment$1).SANDBOX];
32780
+ };
32781
+ const checkDexAvailability = async ()=>{
32782
+ let response;
32783
+ try {
32784
+ response = await (0, globalAxios$1).post(`${postEndpoint()}/v1/availability/checkout/swap`);
32785
+ } catch (error) {
32786
+ throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(`Error fetching from api: ${error.message}`, ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).API_ERROR);
32787
+ }
32788
+ if (response.status === 403) return false;
32789
+ if (response.status === 204) return true;
32790
+ throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(`Error fetching from api: ${response.status} ${response.statusText}`, ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).API_ERROR);
32791
+ };
32792
+ return {
32793
+ checkDexAvailability: checkDexAvailability
32794
+ };
32795
+ };
32796
+
32797
+
32798
+
32799
+
32736
32800
  const $a8cb37a3fc8eb863$var$SANDBOX_CONFIGURATION = {
32737
32801
  baseConfig: {
32738
32802
  environment: (Environment$1).SANDBOX
@@ -32742,6 +32806,7 @@ class $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 {
32742
32806
  config;
32743
32807
  fiatRampService;
32744
32808
  readOnlyProviders;
32809
+ availability;
32745
32810
  /**
32746
32811
  * Constructs a new instance of the CheckoutModule class.
32747
32812
  * @param {CheckoutModuleConfiguration} [config=SANDBOX_CONFIGURATION] - The configuration object for the CheckoutModule.
@@ -32749,6 +32814,7 @@ class $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 {
32749
32814
  this.config = new ($4013c5c91bb535f6$export$4823433c4a67bbc6)(config);
32750
32815
  this.fiatRampService = new ($a77d203f701a3b72$export$1453e9b801542ef4)(this.config);
32751
32816
  this.readOnlyProviders = new Map();
32817
+ this.availability = ($5e9bcae98dc8ff19$export$1165ca270f090a66)(this.config.isDevelopment, this.config.isProduction);
32752
32818
  }
32753
32819
  /**
32754
32820
  * Creates a provider using the given parameters.
@@ -32958,6 +33024,12 @@ class $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 {
32958
33024
  */ async getExchangeFeeEstimate() {
32959
33025
  return await this.fiatRampService.feeEstimate();
32960
33026
  }
33027
+ /**
33028
+ * Fetches Swap widget availability.
33029
+ * @returns {Promise<boolean>} - A promise that resolves to a boolean.
33030
+ */ async isSwapAvailable() {
33031
+ return this.availability.checkDexAvailability();
33032
+ }
32961
33033
  }
32962
33034
 
32963
33035
  var checkout_sdk = /*#__PURE__*/Object.freeze({
@@ -33005,7 +33077,7 @@ var $045213b18e9f1f94$export$75be0f6af9650f2c;
33005
33077
  })($045213b18e9f1f94$export$75be0f6af9650f2c || ($045213b18e9f1f94$export$75be0f6af9650f2c = {}));
33006
33078
 
33007
33079
 
33008
- const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.27.2-alpha";
33080
+ const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.27.3";
33009
33081
  const $d663162fd5a0853f$export$83bf90b30cdfd29f = ()=>false;
33010
33082
  const $d663162fd5a0853f$export$1169f5475725171b = ()=>$d663162fd5a0853f$export$38a083d9fb5551ca;
33011
33083