@imtbl/sdk 0.24.1-alpha.1 → 0.25.0

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.d.ts CHANGED
@@ -1159,6 +1159,98 @@ interface NFTMetadataAttribute {
1159
1159
  'value': NFTMetadataAttributeValue;
1160
1160
  }
1161
1161
 
1162
+ /**
1163
+ * Immutable zkEVM API
1164
+ * Immutable Multi Rollup API
1165
+ *
1166
+ * The version of the OpenAPI document: 1.0.0
1167
+ * Contact: support@immutable.com
1168
+ *
1169
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1170
+ * https://openapi-generator.tech
1171
+ * Do not edit the class manually.
1172
+ */
1173
+
1174
+ /**
1175
+ *
1176
+ * @export
1177
+ * @interface Metadata
1178
+ */
1179
+ interface Metadata {
1180
+ /**
1181
+ * Metadata ID in UUIDv4 format
1182
+ * @type {string}
1183
+ * @memberof Metadata
1184
+ */
1185
+ 'id': string;
1186
+ /**
1187
+ *
1188
+ * @type {Chain}
1189
+ * @memberof Metadata
1190
+ */
1191
+ 'chain': Chain$1;
1192
+ /**
1193
+ * The contract address of the metadata
1194
+ * @type {string}
1195
+ * @memberof Metadata
1196
+ */
1197
+ 'contract_address': string;
1198
+ /**
1199
+ * When the metadata was created
1200
+ * @type {string}
1201
+ * @memberof Metadata
1202
+ */
1203
+ 'created_at': string;
1204
+ /**
1205
+ * When the metadata was last updated
1206
+ * @type {string}
1207
+ * @memberof Metadata
1208
+ */
1209
+ 'updated_at': string | null;
1210
+ /**
1211
+ * The name of the NFT
1212
+ * @type {string}
1213
+ * @memberof Metadata
1214
+ */
1215
+ 'name': string | null;
1216
+ /**
1217
+ * The description of the NFT
1218
+ * @type {string}
1219
+ * @memberof Metadata
1220
+ */
1221
+ 'description': string | null;
1222
+ /**
1223
+ * The image url of the NFT
1224
+ * @type {string}
1225
+ * @memberof Metadata
1226
+ */
1227
+ 'image': string | null;
1228
+ /**
1229
+ * The external website link of NFT
1230
+ * @type {string}
1231
+ * @memberof Metadata
1232
+ */
1233
+ 'external_url'?: string | null;
1234
+ /**
1235
+ * The animation url of the NFT
1236
+ * @type {string}
1237
+ * @memberof Metadata
1238
+ */
1239
+ 'animation_url': string | null;
1240
+ /**
1241
+ * The youtube URL of NFT
1242
+ * @type {string}
1243
+ * @memberof Metadata
1244
+ */
1245
+ 'youtube_url': string | null;
1246
+ /**
1247
+ * List of Metadata attributes
1248
+ * @type {Array<NFTMetadataAttribute>}
1249
+ * @memberof Metadata
1250
+ */
1251
+ 'attributes': Array<NFTMetadataAttribute> | null;
1252
+ }
1253
+
1162
1254
  /**
1163
1255
  * Immutable zkEVM API
1164
1256
  * Immutable Multi Rollup API
@@ -1201,6 +1293,12 @@ interface NFT {
1201
1293
  * @memberof NFT
1202
1294
  */
1203
1295
  'indexed_at': string;
1296
+ /**
1297
+ * When the NFT owner was last updated
1298
+ * @type {string}
1299
+ * @memberof NFT
1300
+ */
1301
+ 'updated_at': string;
1204
1302
  /**
1205
1303
  * When NFT metadata was last synced
1206
1304
  * @type {string}
@@ -1388,6 +1486,12 @@ interface Token$1 {
1388
1486
  * @memberof Token
1389
1487
  */
1390
1488
  'name': string | null;
1489
+ /**
1490
+ * When the collection was last updated
1491
+ * @type {string}
1492
+ * @memberof Token
1493
+ */
1494
+ 'updated_at': string;
1391
1495
  }
1392
1496
 
1393
1497
  /**
@@ -1543,6 +1647,38 @@ interface ListCollectionsResult {
1543
1647
  'page': Page$2;
1544
1648
  }
1545
1649
 
1650
+ /**
1651
+ * Immutable zkEVM API
1652
+ * Immutable Multi Rollup API
1653
+ *
1654
+ * The version of the OpenAPI document: 1.0.0
1655
+ * Contact: support@immutable.com
1656
+ *
1657
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1658
+ * https://openapi-generator.tech
1659
+ * Do not edit the class manually.
1660
+ */
1661
+
1662
+ /**
1663
+ *
1664
+ * @export
1665
+ * @interface ListMetadataResult
1666
+ */
1667
+ interface ListMetadataResult {
1668
+ /**
1669
+ * List of metadata
1670
+ * @type {Array<Metadata>}
1671
+ * @memberof ListMetadataResult
1672
+ */
1673
+ 'result': Array<Metadata>;
1674
+ /**
1675
+ *
1676
+ * @type {Page}
1677
+ * @memberof ListMetadataResult
1678
+ */
1679
+ 'page': Page$2;
1680
+ }
1681
+
1546
1682
  /**
1547
1683
  * Immutable zkEVM API
1548
1684
  * Immutable Multi Rollup API
@@ -1591,6 +1727,12 @@ interface NFTOwner {
1591
1727
  * @memberof NFTOwner
1592
1728
  */
1593
1729
  'quantity': string;
1730
+ /**
1731
+ * When the NFT owner was last updated
1732
+ * @type {string}
1733
+ * @memberof NFTOwner
1734
+ */
1735
+ 'updated_at'?: string;
1594
1736
  }
1595
1737
 
1596
1738
  /**
@@ -2134,6 +2276,12 @@ interface CollectionsApiListCollectionsRequest$1 {
2134
2276
  * @memberof CollectionsApiListCollections
2135
2277
  */
2136
2278
  readonly chainName: string;
2279
+ /**
2280
+ * Datetime to use as the oldest updated timestamp
2281
+ * @type {string}
2282
+ * @memberof CollectionsApiListCollections
2283
+ */
2284
+ readonly fromUpdatedAt?: string;
2137
2285
  /**
2138
2286
  * Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
2139
2287
  * @type {string}
@@ -2204,6 +2352,43 @@ interface CollectionsApiRefreshCollectionMetadataRequest {
2204
2352
  readonly refreshCollectionMetadataRequest: RefreshCollectionMetadataRequest;
2205
2353
  }
2206
2354
 
2355
+ /**
2356
+ * Request parameters for listMetadata operation in MetadataApi.
2357
+ * @export
2358
+ * @interface MetadataApiListMetadataRequest
2359
+ */
2360
+ interface MetadataApiListMetadataRequest {
2361
+ /**
2362
+ * The name of chain
2363
+ * @type {string}
2364
+ * @memberof MetadataApiListMetadata
2365
+ */
2366
+ readonly chainName: string;
2367
+ /**
2368
+ * The address of metadata contract
2369
+ * @type {string}
2370
+ * @memberof MetadataApiListMetadata
2371
+ */
2372
+ readonly contractAddress: string;
2373
+ /**
2374
+ * Datetime to use as the oldest updated timestamp
2375
+ * @type {string}
2376
+ * @memberof MetadataApiListMetadata
2377
+ */
2378
+ readonly fromUpdatedAt?: string;
2379
+ /**
2380
+ * Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
2381
+ * @type {string}
2382
+ * @memberof MetadataApiListMetadata
2383
+ */
2384
+ readonly pageCursor?: string;
2385
+ /**
2386
+ * Maximum number of items to return
2387
+ * @type {number}
2388
+ * @memberof MetadataApiListMetadata
2389
+ */
2390
+ readonly pageSize?: number;
2391
+ }
2207
2392
  /**
2208
2393
  * Request parameters for refreshMetadataByID operation in MetadataApi.
2209
2394
  * @export
@@ -2292,6 +2477,43 @@ interface NftOwnersApiListNFTOwnersRequest {
2292
2477
  */
2293
2478
  readonly pageSize?: number;
2294
2479
  }
2480
+ /**
2481
+ * Request parameters for listOwnersByContractAddress operation in NftOwnersApi.
2482
+ * @export
2483
+ * @interface NftOwnersApiListOwnersByContractAddressRequest
2484
+ */
2485
+ interface NftOwnersApiListOwnersByContractAddressRequest {
2486
+ /**
2487
+ * The address of contract
2488
+ * @type {string}
2489
+ * @memberof NftOwnersApiListOwnersByContractAddress
2490
+ */
2491
+ readonly contractAddress: string;
2492
+ /**
2493
+ * The name of chain
2494
+ * @type {string}
2495
+ * @memberof NftOwnersApiListOwnersByContractAddress
2496
+ */
2497
+ readonly chainName: string;
2498
+ /**
2499
+ * Datetime to use as the oldest updated timestamp
2500
+ * @type {string}
2501
+ * @memberof NftOwnersApiListOwnersByContractAddress
2502
+ */
2503
+ readonly fromUpdatedAt?: string;
2504
+ /**
2505
+ * Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
2506
+ * @type {string}
2507
+ * @memberof NftOwnersApiListOwnersByContractAddress
2508
+ */
2509
+ readonly pageCursor?: string;
2510
+ /**
2511
+ * Maximum number of items to return
2512
+ * @type {number}
2513
+ * @memberof NftOwnersApiListOwnersByContractAddress
2514
+ */
2515
+ readonly pageSize?: number;
2516
+ }
2295
2517
 
2296
2518
  /**
2297
2519
  * Request parameters for getNFT operation in NftsApi.
@@ -2318,6 +2540,68 @@ interface NftsApiGetNFTRequest {
2318
2540
  */
2319
2541
  readonly chainName: string;
2320
2542
  }
2543
+ /**
2544
+ * Request parameters for listAllNFTOwners operation in NftsApi.
2545
+ * @export
2546
+ * @interface NftsApiListAllNFTOwnersRequest
2547
+ */
2548
+ interface NftsApiListAllNFTOwnersRequest {
2549
+ /**
2550
+ * The name of chain
2551
+ * @type {string}
2552
+ * @memberof NftsApiListAllNFTOwners
2553
+ */
2554
+ readonly chainName: string;
2555
+ /**
2556
+ * Datetime to use as the oldest updated timestamp
2557
+ * @type {string}
2558
+ * @memberof NftsApiListAllNFTOwners
2559
+ */
2560
+ readonly fromUpdatedAt: string;
2561
+ /**
2562
+ * Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
2563
+ * @type {string}
2564
+ * @memberof NftsApiListAllNFTOwners
2565
+ */
2566
+ readonly pageCursor?: string;
2567
+ /**
2568
+ * Maximum number of items to return
2569
+ * @type {number}
2570
+ * @memberof NftsApiListAllNFTOwners
2571
+ */
2572
+ readonly pageSize?: number;
2573
+ }
2574
+ /**
2575
+ * Request parameters for listAllNFTs operation in NftsApi.
2576
+ * @export
2577
+ * @interface NftsApiListAllNFTsRequest
2578
+ */
2579
+ interface NftsApiListAllNFTsRequest {
2580
+ /**
2581
+ * The name of chain
2582
+ * @type {string}
2583
+ * @memberof NftsApiListAllNFTs
2584
+ */
2585
+ readonly chainName: string;
2586
+ /**
2587
+ * Datetime to use as the oldest updated timestamp
2588
+ * @type {string}
2589
+ * @memberof NftsApiListAllNFTs
2590
+ */
2591
+ readonly fromUpdatedAt?: string;
2592
+ /**
2593
+ * Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
2594
+ * @type {string}
2595
+ * @memberof NftsApiListAllNFTs
2596
+ */
2597
+ readonly pageCursor?: string;
2598
+ /**
2599
+ * Maximum number of items to return
2600
+ * @type {number}
2601
+ * @memberof NftsApiListAllNFTs
2602
+ */
2603
+ readonly pageSize?: number;
2604
+ }
2321
2605
  /**
2322
2606
  * Request parameters for listNFTs operation in NftsApi.
2323
2607
  * @export
@@ -2336,6 +2620,12 @@ interface NftsApiListNFTsRequest {
2336
2620
  * @memberof NftsApiListNFTs
2337
2621
  */
2338
2622
  readonly chainName: string;
2623
+ /**
2624
+ * Datetime to use as the oldest updated timestamp
2625
+ * @type {string}
2626
+ * @memberof NftsApiListNFTs
2627
+ */
2628
+ readonly fromUpdatedAt?: string;
2339
2629
  /**
2340
2630
  * Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
2341
2631
  * @type {string}
@@ -2418,6 +2708,12 @@ interface TokensApiListERC20TokensRequest {
2418
2708
  * @memberof TokensApiListERC20Tokens
2419
2709
  */
2420
2710
  readonly chainName: string;
2711
+ /**
2712
+ * Datetime to use as the oldest updated timestamp
2713
+ * @type {string}
2714
+ * @memberof TokensApiListERC20Tokens
2715
+ */
2716
+ readonly fromUpdatedAt?: string;
2421
2717
  /**
2422
2718
  * Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
2423
2719
  * @type {string}
@@ -2537,6 +2833,13 @@ declare class BlockchainData {
2537
2833
  * @throws {@link index.APIError}
2538
2834
  */
2539
2835
  listNFTsByAccountAddress(request: NftsApiListNFTsByAccountAddressRequest): Promise<ListNFTsResult>;
2836
+ /**
2837
+ * List All NFTs on a chain
2838
+ * @param request - the request object containing the parameters to be provided in the API request
2839
+ * @returns a promise that resolves with a list of NFTs
2840
+ * @throws {@link index.APIError}
2841
+ */
2842
+ listAllNFTs(request: NftsApiListAllNFTsRequest): Promise<ListNFTsResult>;
2540
2843
  /**
2541
2844
  * List NFT owners by token ID
2542
2845
  * @param request - the request object containing the parameters to be provided in the API request
@@ -2544,6 +2847,20 @@ declare class BlockchainData {
2544
2847
  * @throws {@link index.APIError}
2545
2848
  */
2546
2849
  listNFTOwners(request: NftOwnersApiListNFTOwnersRequest): Promise<ListNFTOwnersResult>;
2850
+ /**
2851
+ * List NFT owners by contract address
2852
+ * @param request - the request object containing the parameters to be provided in the API request
2853
+ * @returns a promise that resolves with a list of NFT owners
2854
+ * @throws {@link index.APIError}
2855
+ */
2856
+ listNFTOwnersByContractAddress(request: NftOwnersApiListOwnersByContractAddressRequest): Promise<ListNFTOwnersResult>;
2857
+ /**
2858
+ * List All NFT owners on a chain
2859
+ * @param request - the request object containing the parameters to be provided in the API request
2860
+ * @returns a promise that resolves with a list of NFT owners
2861
+ * @throws {@link index.APIError}
2862
+ */
2863
+ listAllNFTOwners(request: NftsApiListAllNFTOwnersRequest): Promise<ListNFTOwnersResult>;
2547
2864
  /**
2548
2865
  * List ERC20 Token contracts
2549
2866
  * @param request - the request object containing the parameters to be provided in the API request
@@ -2558,6 +2875,13 @@ declare class BlockchainData {
2558
2875
  * @throws {@link index.APIError}
2559
2876
  */
2560
2877
  getToken(request: TokensApiGetERC20TokenRequest): Promise<GetTokenResult>;
2878
+ /**
2879
+ * List NFT Metadata by contract address
2880
+ * @param request - the request object containing the parameters to be provided in the API request
2881
+ * @returns a promise that resolves with a list of Metadata
2882
+ * @throws {@link index.APIError}
2883
+ */
2884
+ listNFTMetadataByContractAddress(request: MetadataApiListMetadataRequest): Promise<ListMetadataResult>;
2561
2885
  /**
2562
2886
  * Refresh collection metadata
2563
2887
  * @param request - the request object containing the parameters to be provided in the API request
@@ -13850,6 +14174,47 @@ declare abstract class BaseHttpRequest {
13850
14174
  abstract request<T>(options: ApiRequestOptions): CancelablePromise<T>;
13851
14175
  }
13852
14176
 
14177
+ type CancelOrdersRequestBody = {
14178
+ /**
14179
+ * Address of the user initiating the cancel request
14180
+ */
14181
+ account_address: string;
14182
+ /**
14183
+ * List of order ids proposed for cancellation
14184
+ */
14185
+ orders: Array<string>;
14186
+ /**
14187
+ * Signature generated by the user for the specific cancellation request
14188
+ */
14189
+ signature: string;
14190
+ };
14191
+
14192
+ type CancelOrdersResult = {
14193
+ result: {
14194
+ /**
14195
+ * Orders which were successfully cancelled
14196
+ */
14197
+ successful_cancellations: Array<string>;
14198
+ /**
14199
+ * Orders which are marked for cancellation but the cancellation cannot be guaranteed
14200
+ */
14201
+ pending_cancellations: Array<string>;
14202
+ /**
14203
+ * Orders which failed to be cancelled
14204
+ */
14205
+ failed_cancellations: Array<{
14206
+ /**
14207
+ * ID of the order which failed to be cancelled
14208
+ */
14209
+ order: string;
14210
+ /**
14211
+ * Reason code indicating why the order failed to be cancelled
14212
+ */
14213
+ reason_code: 'ALREADY_FILLED';
14214
+ }>;
14215
+ };
14216
+ };
14217
+
13853
14218
  /**
13854
14219
  * The name of chain
13855
14220
  */
@@ -14003,17 +14368,69 @@ type Chain = {
14003
14368
  name: string;
14004
14369
  };
14005
14370
 
14371
+ type ActiveOrderStatus = {
14372
+ /**
14373
+ * The order status
14374
+ */
14375
+ name: 'ACTIVE';
14376
+ };
14377
+
14378
+ type CancelledOrderStatus = {
14379
+ /**
14380
+ * The order status
14381
+ */
14382
+ name: 'CANCELLED';
14383
+ /**
14384
+ * Whether the cancellation of the order is pending
14385
+ */
14386
+ is_pending: boolean;
14387
+ /**
14388
+ * Whether the cancellation was done on-chain or off-chain
14389
+ */
14390
+ cancellation_type: CancelledOrderStatus.cancellation_type;
14391
+ };
14392
+ declare namespace CancelledOrderStatus {
14393
+ /**
14394
+ * Whether the cancellation was done on-chain or off-chain
14395
+ */
14396
+ enum cancellation_type {
14397
+ ON_CHAIN = "ON_CHAIN",
14398
+ OFF_CHAIN = "OFF_CHAIN"
14399
+ }
14400
+ }
14401
+
14402
+ type ExpiredOrderStatus = {
14403
+ /**
14404
+ * The order status
14405
+ */
14406
+ name: 'EXPIRED';
14407
+ };
14408
+
14409
+ type FilledOrderStatus = {
14410
+ /**
14411
+ * The order status
14412
+ */
14413
+ name: 'FILLED';
14414
+ };
14415
+
14416
+ type InactiveOrderStatus = {
14417
+ /**
14418
+ * The order status
14419
+ */
14420
+ name: 'INACTIVE';
14421
+ };
14422
+
14423
+ type PendingOrderStatus = {
14424
+ /**
14425
+ * The order status
14426
+ */
14427
+ name: 'PENDING';
14428
+ };
14429
+
14006
14430
  /**
14007
14431
  * The Order status
14008
14432
  */
14009
- declare enum OrderStatus {
14010
- PENDING = "PENDING",
14011
- ACTIVE = "ACTIVE",
14012
- INACTIVE = "INACTIVE",
14013
- FILLED = "FILLED",
14014
- CANCELLED = "CANCELLED",
14015
- EXPIRED = "EXPIRED"
14016
- }
14433
+ type OrderStatus = (CancelledOrderStatus | PendingOrderStatus | ActiveOrderStatus | InactiveOrderStatus | FilledOrderStatus | ExpiredOrderStatus);
14017
14434
 
14018
14435
  type Order$1 = {
14019
14436
  account_address: string;
@@ -14134,6 +14551,18 @@ type ListTradeResult = {
14134
14551
  result: Array<Trade$1>;
14135
14552
  };
14136
14553
 
14554
+ /**
14555
+ * The Order status
14556
+ */
14557
+ declare enum OrderStatusName {
14558
+ PENDING = "PENDING",
14559
+ ACTIVE = "ACTIVE",
14560
+ INACTIVE = "INACTIVE",
14561
+ FILLED = "FILLED",
14562
+ EXPIRED = "EXPIRED",
14563
+ CANCELLED = "CANCELLED"
14564
+ }
14565
+
14137
14566
  /**
14138
14567
  * Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
14139
14568
  */
@@ -14162,6 +14591,16 @@ type UnfulfillableOrder$1 = {
14162
14591
  declare class OrdersService {
14163
14592
  readonly httpRequest: BaseHttpRequest;
14164
14593
  constructor(httpRequest: BaseHttpRequest);
14594
+ /**
14595
+ * Cancel one or more orders
14596
+ * Cancel one or more orders
14597
+ * @returns CancelOrdersResult Orders cancellation response.
14598
+ * @throws ApiError
14599
+ */
14600
+ cancelOrders({ chainName, requestBody, }: {
14601
+ chainName: ChainName$1;
14602
+ requestBody: CancelOrdersRequestBody;
14603
+ }): CancelablePromise<CancelOrdersResult>;
14165
14604
  /**
14166
14605
  * List all listings
14167
14606
  * List all listings
@@ -14173,7 +14612,7 @@ declare class OrdersService {
14173
14612
  /**
14174
14613
  * Order status to filter by
14175
14614
  */
14176
- status?: OrderStatus;
14615
+ status?: OrderStatusName;
14177
14616
  /**
14178
14617
  * Sell item contract address to filter by
14179
14618
  */
@@ -14578,8 +15017,8 @@ type orderbook_d_ListTradesResult = ListTradesResult;
14578
15017
  type orderbook_d_ListingResult = ListingResult;
14579
15018
  type orderbook_d_NativeItem = NativeItem;
14580
15019
  type orderbook_d_Order = Order;
14581
- type orderbook_d_OrderStatus = OrderStatus;
14582
- declare const orderbook_d_OrderStatus: typeof OrderStatus;
15020
+ type orderbook_d_OrderStatusName = OrderStatusName;
15021
+ declare const orderbook_d_OrderStatusName: typeof OrderStatusName;
14583
15022
  type orderbook_d_Orderbook = Orderbook;
14584
15023
  declare const orderbook_d_Orderbook: typeof Orderbook;
14585
15024
  type orderbook_d_Page = Page;
@@ -14618,7 +15057,7 @@ declare namespace orderbook_d {
14618
15057
  orderbook_d_ListingResult as ListingResult,
14619
15058
  orderbook_d_NativeItem as NativeItem,
14620
15059
  orderbook_d_Order as Order,
14621
- orderbook_d_OrderStatus as OrderStatus,
15060
+ orderbook_d_OrderStatusName as OrderStatusName,
14622
15061
  orderbook_d_Orderbook as Orderbook,
14623
15062
  orderbook_d_Page as Page,
14624
15063
  orderbook_d_PrepareListingParams as PrepareListingParams,