@imtbl/sdk 0.27.0 → 0.27.2-alpha
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/blockchain_data.d.ts +996 -79
- package/dist/blockchain_data.js +341 -265
- package/dist/browser/checkout.js +2 -2
- package/dist/checkout_sdk.d.ts +1 -1
- package/dist/checkout_sdk.js +218 -270
- package/dist/checkout_widgets.js +1 -1
- package/dist/immutablex_client.js +1 -1
- package/dist/index.browser.js +13 -13
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +351 -268
- package/dist/index.d.ts +1160 -236
- package/dist/index.js +351 -268
- package/dist/passport.js +25 -20
- package/package.json +1 -1
package/dist/passport.js
CHANGED
|
@@ -114,8 +114,6 @@ let Configuration$1 = class Configuration {
|
|
|
114
114
|
* https://openapi-generator.tech
|
|
115
115
|
* Do not edit the class manually.
|
|
116
116
|
*/
|
|
117
|
-
// Some imports not used depending on template conditions
|
|
118
|
-
// @ts-ignore
|
|
119
117
|
const BASE_PATH$1 = "https://api.sandbox.immutable.com".replace(/\/+$/, "");
|
|
120
118
|
/**
|
|
121
119
|
*
|
|
@@ -143,10 +141,10 @@ let BaseAPI$1 = class BaseAPI {
|
|
|
143
141
|
*/
|
|
144
142
|
let RequiredError$1 = class RequiredError extends Error {
|
|
145
143
|
field;
|
|
146
|
-
name = "RequiredError";
|
|
147
144
|
constructor(field, msg) {
|
|
148
145
|
super(msg);
|
|
149
146
|
this.field = field;
|
|
147
|
+
this.name = "RequiredError";
|
|
150
148
|
}
|
|
151
149
|
};
|
|
152
150
|
|
|
@@ -203,6 +201,8 @@ const setBearerAuthToObject$1 = async function (object, configuration) {
|
|
|
203
201
|
}
|
|
204
202
|
};
|
|
205
203
|
function setFlattenedQueryParams$1(urlSearchParams, parameter, key = "") {
|
|
204
|
+
if (parameter == null)
|
|
205
|
+
return;
|
|
206
206
|
if (typeof parameter === "object") {
|
|
207
207
|
if (Array.isArray(parameter)) {
|
|
208
208
|
parameter.forEach(item => setFlattenedQueryParams$1(urlSearchParams, item, key));
|
|
@@ -255,7 +255,7 @@ const toPathString$1 = function (url) {
|
|
|
255
255
|
*/
|
|
256
256
|
const createRequestFunction$1 = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
257
257
|
return (axios = globalAxios, basePath = BASE_PATH) => {
|
|
258
|
-
const axiosRequestArgs = { ...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url };
|
|
258
|
+
const axiosRequestArgs = { ...axiosArgs.options, url: (configuration?.basePath || axios.defaults.baseURL || basePath) + axiosArgs.url };
|
|
259
259
|
return axios.request(axiosRequestArgs);
|
|
260
260
|
};
|
|
261
261
|
};
|
|
@@ -606,13 +606,14 @@ const CollectionsApiAxiosParamCreator = function (configuration) {
|
|
|
606
606
|
* List all collections
|
|
607
607
|
* @summary List all collections
|
|
608
608
|
* @param {string} chainName The name of chain
|
|
609
|
+
* @param {Array<string>} [contractAddress] List of contract addresses to filter by
|
|
609
610
|
* @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
|
|
610
611
|
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
611
612
|
* @param {number} [pageSize] Maximum number of items to return
|
|
612
613
|
* @param {*} [options] Override http request option.
|
|
613
614
|
* @throws {RequiredError}
|
|
614
615
|
*/
|
|
615
|
-
listCollections: async (chainName, fromUpdatedAt, pageCursor, pageSize, options = {}) => {
|
|
616
|
+
listCollections: async (chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options = {}) => {
|
|
616
617
|
// verify required parameter 'chainName' is not null or undefined
|
|
617
618
|
assertParamExists$1('listCollections', 'chainName', chainName);
|
|
618
619
|
const localVarPath = `/v1/chains/{chain_name}/collections`
|
|
@@ -626,6 +627,9 @@ const CollectionsApiAxiosParamCreator = function (configuration) {
|
|
|
626
627
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
627
628
|
const localVarHeaderParameter = {};
|
|
628
629
|
const localVarQueryParameter = {};
|
|
630
|
+
if (contractAddress) {
|
|
631
|
+
localVarQueryParameter['contract_address'] = contractAddress;
|
|
632
|
+
}
|
|
629
633
|
if (fromUpdatedAt !== undefined) {
|
|
630
634
|
localVarQueryParameter['from_updated_at'] = (fromUpdatedAt instanceof Date) ?
|
|
631
635
|
fromUpdatedAt.toISOString() :
|
|
@@ -751,14 +755,15 @@ const CollectionsApiFp = function (configuration) {
|
|
|
751
755
|
* List all collections
|
|
752
756
|
* @summary List all collections
|
|
753
757
|
* @param {string} chainName The name of chain
|
|
758
|
+
* @param {Array<string>} [contractAddress] List of contract addresses to filter by
|
|
754
759
|
* @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
|
|
755
760
|
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
756
761
|
* @param {number} [pageSize] Maximum number of items to return
|
|
757
762
|
* @param {*} [options] Override http request option.
|
|
758
763
|
* @throws {RequiredError}
|
|
759
764
|
*/
|
|
760
|
-
async listCollections(chainName, fromUpdatedAt, pageCursor, pageSize, options) {
|
|
761
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.listCollections(chainName, fromUpdatedAt, pageCursor, pageSize, options);
|
|
765
|
+
async listCollections(chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options) {
|
|
766
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listCollections(chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options);
|
|
762
767
|
return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
|
|
763
768
|
},
|
|
764
769
|
/**
|
|
@@ -817,7 +822,7 @@ class CollectionsApi extends BaseAPI$1 {
|
|
|
817
822
|
* @memberof CollectionsApi
|
|
818
823
|
*/
|
|
819
824
|
listCollections(requestParameters, options) {
|
|
820
|
-
return CollectionsApiFp(this.configuration).listCollections(requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
|
|
825
|
+
return CollectionsApiFp(this.configuration).listCollections(requestParameters.chainName, requestParameters.contractAddress, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
|
|
821
826
|
}
|
|
822
827
|
/**
|
|
823
828
|
* List collections by NFT owner account address
|
|
@@ -1599,13 +1604,13 @@ const OrdersApiAxiosParamCreator = function (configuration) {
|
|
|
1599
1604
|
* List all listings
|
|
1600
1605
|
* @summary List all listings
|
|
1601
1606
|
* @param {string} chainName
|
|
1602
|
-
* @param {
|
|
1607
|
+
* @param {OrderStatusName} [status] Order status to filter by
|
|
1603
1608
|
* @param {string} [sellItemContractAddress] Sell item contract address to filter by
|
|
1604
1609
|
* @param {string} [buyItemContractAddress] Buy item contract address to filter by
|
|
1605
1610
|
* @param {string} [sellItemTokenId] Sell item token identifier to filter by
|
|
1606
1611
|
* @param {number} [pageSize] Maximum number of orders to return per page
|
|
1607
|
-
* @param {
|
|
1608
|
-
* @param {
|
|
1612
|
+
* @param {ListListingsSortByEnum} [sortBy] Order field to sort by
|
|
1613
|
+
* @param {ListListingsSortDirectionEnum} [sortDirection] Ascending or descending direction for sort
|
|
1609
1614
|
* @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
1610
1615
|
* @param {*} [options] Override http request option.
|
|
1611
1616
|
* @throws {RequiredError}
|
|
@@ -1662,8 +1667,8 @@ const OrdersApiAxiosParamCreator = function (configuration) {
|
|
|
1662
1667
|
* @param {string} chainName
|
|
1663
1668
|
* @param {string} [accountAddress]
|
|
1664
1669
|
* @param {number} [pageSize] Maximum number of trades to return per page
|
|
1665
|
-
* @param {
|
|
1666
|
-
* @param {
|
|
1670
|
+
* @param {ListTradesSortByEnum} [sortBy] Trade field to sort by
|
|
1671
|
+
* @param {ListTradesSortDirectionEnum} [sortDirection] Ascending or descending direction for sort
|
|
1667
1672
|
* @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
1668
1673
|
* @param {*} [options] Override http request option.
|
|
1669
1674
|
* @throws {RequiredError}
|
|
@@ -1778,13 +1783,13 @@ const OrdersApiFp = function (configuration) {
|
|
|
1778
1783
|
* List all listings
|
|
1779
1784
|
* @summary List all listings
|
|
1780
1785
|
* @param {string} chainName
|
|
1781
|
-
* @param {
|
|
1786
|
+
* @param {OrderStatusName} [status] Order status to filter by
|
|
1782
1787
|
* @param {string} [sellItemContractAddress] Sell item contract address to filter by
|
|
1783
1788
|
* @param {string} [buyItemContractAddress] Buy item contract address to filter by
|
|
1784
1789
|
* @param {string} [sellItemTokenId] Sell item token identifier to filter by
|
|
1785
1790
|
* @param {number} [pageSize] Maximum number of orders to return per page
|
|
1786
|
-
* @param {
|
|
1787
|
-
* @param {
|
|
1791
|
+
* @param {ListListingsSortByEnum} [sortBy] Order field to sort by
|
|
1792
|
+
* @param {ListListingsSortDirectionEnum} [sortDirection] Ascending or descending direction for sort
|
|
1788
1793
|
* @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
1789
1794
|
* @param {*} [options] Override http request option.
|
|
1790
1795
|
* @throws {RequiredError}
|
|
@@ -1799,8 +1804,8 @@ const OrdersApiFp = function (configuration) {
|
|
|
1799
1804
|
* @param {string} chainName
|
|
1800
1805
|
* @param {string} [accountAddress]
|
|
1801
1806
|
* @param {number} [pageSize] Maximum number of trades to return per page
|
|
1802
|
-
* @param {
|
|
1803
|
-
* @param {
|
|
1807
|
+
* @param {ListTradesSortByEnum} [sortBy] Trade field to sort by
|
|
1808
|
+
* @param {ListTradesSortDirectionEnum} [sortDirection] Ascending or descending direction for sort
|
|
1804
1809
|
* @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
1805
1810
|
* @param {*} [options] Override http request option.
|
|
1806
1811
|
* @throws {RequiredError}
|
|
@@ -2067,7 +2072,7 @@ class MultiRollupApiClients {
|
|
|
2067
2072
|
}
|
|
2068
2073
|
|
|
2069
2074
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
2070
|
-
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.27.
|
|
2075
|
+
const defaultHeaders = { 'x-sdk-version': 'ts-immutable-sdk-0.27.2-alpha' };
|
|
2071
2076
|
const createConfig = ({ basePath, headers, }) => {
|
|
2072
2077
|
if (!basePath.trim()) {
|
|
2073
2078
|
throw Error('basePath can not be empty');
|
|
@@ -2123,7 +2128,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
2123
2128
|
chainID,
|
|
2124
2129
|
coreContractAddress,
|
|
2125
2130
|
registrationContractAddress,
|
|
2126
|
-
sdkVersion: 'ts-immutable-sdk-0.27.
|
|
2131
|
+
sdkVersion: 'ts-immutable-sdk-0.27.2-alpha',
|
|
2127
2132
|
});
|
|
2128
2133
|
/**
|
|
2129
2134
|
* Sets `sdkVersion` at the time of build
|
package/package.json
CHANGED