@imtbl/sdk 0.1.7-alpha.3 → 0.1.8-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.
@@ -1,4 +1,41 @@
1
- import { BlockchainDataConfiguration, BlockchainDataModuleConfiguration } from 'config';
1
+ import { BlockchainDataConfiguration, BlockchainDataModuleConfiguration as BlockchainDataModuleConfiguration$1 } from 'config';
2
+
3
+ /**
4
+ * Immutable X API
5
+ * Immutable Multi Rollup API
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@immutable.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface BasicAPIError
18
+ */
19
+ interface BasicAPIError {
20
+ /**
21
+ * Error Message
22
+ * @type {string}
23
+ * @memberof BasicAPIError
24
+ */
25
+ 'message': string;
26
+ /**
27
+ * Link to IMX documentation that can help resolve this error
28
+ * @type {string}
29
+ * @memberof BasicAPIError
30
+ */
31
+ 'link': string;
32
+ /**
33
+ * Trace ID of the initial request
34
+ * @type {string}
35
+ * @memberof BasicAPIError
36
+ */
37
+ 'trace_id': string;
38
+ }
2
39
 
3
40
  /**
4
41
  * Immutable X API
@@ -1442,6 +1479,25 @@ interface NftsApiListNFTsByAccountAddressRequest {
1442
1479
  readonly pageSize?: number;
1443
1480
  }
1444
1481
 
1482
+ interface OpenAPIError extends BasicAPIError {
1483
+ code: string;
1484
+ details: {
1485
+ [key: string]: any;
1486
+ } | null;
1487
+ }
1488
+ /**
1489
+ * Custom Error class that is returned from the API when a request fails
1490
+ */
1491
+ declare class APIError extends Error {
1492
+ readonly code: string;
1493
+ readonly details: {
1494
+ [key: string]: any;
1495
+ } | null;
1496
+ readonly link: string;
1497
+ readonly traceId: string;
1498
+ constructor({ message, code, details, link, trace_id: traceId, }: OpenAPIError);
1499
+ }
1500
+
1445
1501
  declare class BlockchainData {
1446
1502
  readonly config: BlockchainDataConfiguration;
1447
1503
  private readonly activities;
@@ -1449,7 +1505,7 @@ declare class BlockchainData {
1449
1505
  private readonly collections;
1450
1506
  private readonly nfts;
1451
1507
  private readonly nftOwners;
1452
- constructor(moduleConfig: BlockchainDataModuleConfiguration);
1508
+ constructor(moduleConfig: BlockchainDataModuleConfiguration$1);
1453
1509
  /**
1454
1510
  * List all activities
1455
1511
  * @param request - the request object containing the parameters to be provided in the API request
@@ -1515,4 +1571,28 @@ declare class BlockchainData {
1515
1571
  listNFTOwners(request: NftOwnersApiListNFTOwnersRequest): Promise<ListNFTOwnersResult>;
1516
1572
  }
1517
1573
 
1518
- export { BlockchainData };
1574
+ declare enum Environment {
1575
+ PRODUCTION = "production",
1576
+ SANDBOX = "sandbox"
1577
+ }
1578
+ declare class ImmutableConfiguration {
1579
+ readonly environment: Environment;
1580
+ readonly apiKey?: string;
1581
+ constructor(options: {
1582
+ environment: Environment;
1583
+ apiKey?: string;
1584
+ });
1585
+ }
1586
+ interface ModuleConfiguration<T> {
1587
+ baseConfig: ImmutableConfiguration;
1588
+ overrides?: T;
1589
+ }
1590
+
1591
+ interface APIConfigurationParams {
1592
+ basePath: string;
1593
+ headers?: Record<string, string>;
1594
+ }
1595
+ interface BlockchainDataModuleConfiguration extends ModuleConfiguration<APIConfigurationParams> {
1596
+ }
1597
+
1598
+ export { APIError, BlockchainData, BlockchainDataModuleConfiguration };
@@ -1009,9 +1009,26 @@ var Environment;
1009
1009
  Environment["SANDBOX"] = "sandbox";
1010
1010
  })(Environment || (Environment = {}));
1011
1011
 
1012
+ /**
1013
+ * Custom Error class that is returned from the API when a request fails
1014
+ */
1015
+ class APIError extends Error {
1016
+ code;
1017
+ details;
1018
+ link;
1019
+ traceId;
1020
+ constructor({ message, code, details, link, trace_id: traceId, }) {
1021
+ super(message);
1022
+ this.code = code;
1023
+ this.details = details;
1024
+ this.link = link;
1025
+ this.traceId = traceId;
1026
+ }
1027
+ }
1028
+
1012
1029
  /* eslint-disable implicit-arrow-linebreak */
1013
1030
  const defaultHeaders = {
1014
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.1.7-alpha.3',
1031
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.1.8-alpha',
1015
1032
  };
1016
1033
  /**
1017
1034
  * createAPIConfiguration to create a custom APIConfiguration
@@ -1060,23 +1077,6 @@ class BlockchainDataConfiguration {
1060
1077
  }
1061
1078
  }
1062
1079
 
1063
- /**
1064
- * Custom Error class that is returned from the API when a request fails
1065
- */
1066
- class APIError extends Error {
1067
- code;
1068
- details;
1069
- link;
1070
- traceId;
1071
- constructor({ message, code, details, link, trace_id: traceId, }) {
1072
- super(message);
1073
- this.code = code;
1074
- this.details = details;
1075
- this.link = link;
1076
- this.traceId = traceId;
1077
- }
1078
- }
1079
-
1080
1080
  /* eslint-disable @typescript-eslint/naming-convention */
1081
1081
  /**
1082
1082
  * [Formats an error in the APIError shape](https://axios-http.com/docs/handling_errors)
@@ -1255,4 +1255,4 @@ class BlockchainData {
1255
1255
  }
1256
1256
  }
1257
1257
 
1258
- export { BlockchainData };
1258
+ export { APIError, BlockchainData };