opensea-js 7.3.3 → 8.0.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.
Files changed (155) hide show
  1. package/README.md +1 -0
  2. package/lib/api/accounts.d.ts +18 -0
  3. package/lib/api/accounts.js +30 -0
  4. package/lib/api/accounts.js.map +1 -0
  5. package/lib/api/api.d.ts +92 -41
  6. package/lib/api/api.js +162 -189
  7. package/lib/api/api.js.map +1 -1
  8. package/lib/api/apiPaths.d.ts +7 -0
  9. package/lib/api/apiPaths.js +29 -1
  10. package/lib/api/apiPaths.js.map +1 -1
  11. package/lib/api/collections.d.ts +26 -0
  12. package/lib/api/collections.js +57 -0
  13. package/lib/api/collections.js.map +1 -0
  14. package/lib/api/events.d.ts +26 -0
  15. package/lib/api/events.js +42 -0
  16. package/lib/api/events.js.map +1 -0
  17. package/lib/api/fetcher.d.ts +21 -0
  18. package/lib/api/fetcher.js +3 -0
  19. package/lib/api/fetcher.js.map +1 -0
  20. package/lib/api/index.d.ts +1 -0
  21. package/lib/api/index.js +1 -0
  22. package/lib/api/index.js.map +1 -1
  23. package/lib/api/listings.d.ts +27 -0
  24. package/lib/api/listings.js +56 -0
  25. package/lib/api/listings.js.map +1 -0
  26. package/lib/api/nfts.d.ts +35 -0
  27. package/lib/api/nfts.js +66 -0
  28. package/lib/api/nfts.js.map +1 -0
  29. package/lib/api/offers.d.ts +40 -0
  30. package/lib/api/offers.js +86 -0
  31. package/lib/api/offers.js.map +1 -0
  32. package/lib/api/orders.d.ts +38 -0
  33. package/lib/api/orders.js +121 -0
  34. package/lib/api/orders.js.map +1 -0
  35. package/lib/api/types.d.ts +216 -0
  36. package/lib/api/types.js +24 -1
  37. package/lib/api/types.js.map +1 -1
  38. package/lib/constants.d.ts +2 -1
  39. package/lib/constants.js +3 -4
  40. package/lib/constants.js.map +1 -1
  41. package/lib/index.d.ts +1 -0
  42. package/lib/index.js +1 -0
  43. package/lib/index.js.map +1 -1
  44. package/lib/orders/utils.js +1 -1
  45. package/lib/orders/utils.js.map +1 -1
  46. package/lib/sdk/assets.d.ts +104 -0
  47. package/lib/sdk/assets.js +398 -0
  48. package/lib/sdk/assets.js.map +1 -0
  49. package/lib/sdk/cancellation.d.ts +97 -0
  50. package/lib/sdk/cancellation.js +219 -0
  51. package/lib/sdk/cancellation.js.map +1 -0
  52. package/lib/sdk/context.d.ts +28 -0
  53. package/lib/sdk/context.js +3 -0
  54. package/lib/sdk/context.js.map +1 -0
  55. package/lib/sdk/fulfillment.d.ts +129 -0
  56. package/lib/sdk/fulfillment.js +256 -0
  57. package/lib/sdk/fulfillment.js.map +1 -0
  58. package/lib/sdk/orders.d.ts +254 -0
  59. package/lib/sdk/orders.js +693 -0
  60. package/lib/sdk/orders.js.map +1 -0
  61. package/lib/sdk/tokens.d.ts +31 -0
  62. package/lib/sdk/tokens.js +64 -0
  63. package/lib/sdk/tokens.js.map +1 -0
  64. package/lib/sdk.d.ts +193 -92
  65. package/lib/sdk.js +258 -584
  66. package/lib/sdk.js.map +1 -1
  67. package/lib/typechain/contracts/Multicall3.d.ts +57 -0
  68. package/lib/typechain/contracts/Multicall3.js +3 -0
  69. package/lib/typechain/contracts/Multicall3.js.map +1 -0
  70. package/lib/typechain/contracts/TransferHelper.d.ts +55 -0
  71. package/lib/typechain/contracts/TransferHelper.js +3 -0
  72. package/lib/typechain/contracts/TransferHelper.js.map +1 -0
  73. package/lib/typechain/contracts/factories/Multicall3__factory.d.ts +43 -0
  74. package/lib/typechain/contracts/factories/Multicall3__factory.js +68 -0
  75. package/lib/typechain/contracts/factories/Multicall3__factory.js.map +1 -0
  76. package/lib/typechain/contracts/factories/TransferHelper__factory.d.ts +46 -0
  77. package/lib/typechain/contracts/factories/TransferHelper__factory.js +71 -0
  78. package/lib/typechain/contracts/factories/TransferHelper__factory.js.map +1 -0
  79. package/lib/typechain/contracts/factories/index.d.ts +2 -0
  80. package/lib/typechain/contracts/factories/index.js +5 -1
  81. package/lib/typechain/contracts/factories/index.js.map +1 -1
  82. package/lib/typechain/contracts/index.d.ts +4 -0
  83. package/lib/typechain/contracts/index.js +5 -1
  84. package/lib/typechain/contracts/index.js.map +1 -1
  85. package/lib/types.d.ts +15 -1
  86. package/lib/types.js +4 -0
  87. package/lib/types.js.map +1 -1
  88. package/lib/utils/chain.d.ts +53 -0
  89. package/lib/utils/chain.js +232 -0
  90. package/lib/utils/chain.js.map +1 -0
  91. package/lib/utils/converters.d.ts +31 -0
  92. package/lib/utils/converters.js +118 -0
  93. package/lib/utils/converters.js.map +1 -0
  94. package/lib/utils/dateHelper.d.ts +33 -0
  95. package/lib/utils/dateHelper.js +44 -0
  96. package/lib/utils/dateHelper.js.map +1 -0
  97. package/lib/utils/fees.d.ts +13 -0
  98. package/lib/utils/fees.js +29 -0
  99. package/lib/utils/fees.js.map +1 -0
  100. package/lib/utils/index.d.ts +1 -0
  101. package/lib/utils/index.js +1 -0
  102. package/lib/utils/index.js.map +1 -1
  103. package/lib/utils/protocol.d.ts +70 -0
  104. package/lib/utils/protocol.js +181 -0
  105. package/lib/utils/protocol.js.map +1 -0
  106. package/lib/utils/rateLimit.d.ts +34 -0
  107. package/lib/utils/rateLimit.js +97 -0
  108. package/lib/utils/rateLimit.js.map +1 -0
  109. package/lib/utils/stringHelper.d.ts +18 -0
  110. package/lib/utils/stringHelper.js +25 -0
  111. package/lib/utils/stringHelper.js.map +1 -0
  112. package/lib/utils/utils.d.ts +9 -95
  113. package/lib/utils/utils.js +36 -409
  114. package/lib/utils/utils.js.map +1 -1
  115. package/package.json +1 -1
  116. package/src/abi/Multicall3.json +50 -0
  117. package/src/abi/TransferHelper.json +53 -0
  118. package/src/api/accounts.ts +37 -0
  119. package/src/api/api.ts +269 -322
  120. package/src/api/apiPaths.ts +36 -0
  121. package/src/api/collections.ts +77 -0
  122. package/src/api/events.ts +71 -0
  123. package/src/api/fetcher.ts +22 -0
  124. package/src/api/index.ts +1 -0
  125. package/src/api/listings.ts +91 -0
  126. package/src/api/nfts.ts +121 -0
  127. package/src/api/offers.ts +178 -0
  128. package/src/api/orders.ts +223 -0
  129. package/src/api/types.ts +232 -0
  130. package/src/constants.ts +5 -5
  131. package/src/index.ts +1 -0
  132. package/src/orders/utils.ts +1 -1
  133. package/src/sdk/assets.ts +595 -0
  134. package/src/sdk/cancellation.ts +329 -0
  135. package/src/sdk/context.ts +33 -0
  136. package/src/sdk/fulfillment.ts +432 -0
  137. package/src/sdk/orders.ts +1228 -0
  138. package/src/sdk/tokens.ts +95 -0
  139. package/src/sdk.ts +352 -1023
  140. package/src/typechain/contracts/Multicall3.ts +117 -0
  141. package/src/typechain/contracts/TransferHelper.ts +122 -0
  142. package/src/typechain/contracts/factories/Multicall3__factory.ts +67 -0
  143. package/src/typechain/contracts/factories/TransferHelper__factory.ts +76 -0
  144. package/src/typechain/contracts/factories/index.ts +2 -0
  145. package/src/typechain/contracts/index.ts +4 -0
  146. package/src/types.ts +14 -0
  147. package/src/utils/chain.ts +243 -0
  148. package/src/utils/converters.ts +124 -0
  149. package/src/utils/dateHelper.ts +40 -0
  150. package/src/utils/fees.ts +31 -0
  151. package/src/utils/index.ts +1 -0
  152. package/src/utils/protocol.ts +206 -0
  153. package/src/utils/rateLimit.ts +147 -0
  154. package/src/utils/stringHelper.ts +25 -0
  155. package/src/utils/utils.ts +21 -449
package/README.md CHANGED
@@ -24,6 +24,7 @@ Happy seafaring! ⛵️
24
24
 
25
25
  - [Quick Start Guide](developerDocs/quick-start.md)
26
26
  - [Getting Started Guide](developerDocs/getting-started.md)
27
+ - [API Reference](developerDocs/api-reference.md)
27
28
  - [Advanced Use Cases](developerDocs/advanced-use-cases.md)
28
29
  - [SDK Reference](https://projectopensea.github.io/opensea-js/)
29
30
  - [Frequently Asked Questions](developerDocs/faq.md)
@@ -0,0 +1,18 @@
1
+ import { Fetcher } from "./fetcher";
2
+ import { Chain, OpenSeaAccount, OpenSeaPaymentToken } from "../types";
3
+ /**
4
+ * Account and payment token related API operations
5
+ */
6
+ export declare class AccountsAPI {
7
+ private fetcher;
8
+ private chain;
9
+ constructor(fetcher: Fetcher, chain: Chain);
10
+ /**
11
+ * Fetch a payment token.
12
+ */
13
+ getPaymentToken(address: string, chain?: Chain): Promise<OpenSeaPaymentToken>;
14
+ /**
15
+ * Fetch account for an address.
16
+ */
17
+ getAccount(address: string): Promise<OpenSeaAccount>;
18
+ }
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AccountsAPI = void 0;
4
+ const apiPaths_1 = require("./apiPaths");
5
+ const converters_1 = require("../utils/converters");
6
+ /**
7
+ * Account and payment token related API operations
8
+ */
9
+ class AccountsAPI {
10
+ constructor(fetcher, chain) {
11
+ this.fetcher = fetcher;
12
+ this.chain = chain;
13
+ }
14
+ /**
15
+ * Fetch a payment token.
16
+ */
17
+ async getPaymentToken(address, chain = this.chain) {
18
+ const json = await this.fetcher.get((0, apiPaths_1.getPaymentTokenPath)(chain, address));
19
+ return (0, converters_1.paymentTokenFromJSON)(json);
20
+ }
21
+ /**
22
+ * Fetch account for an address.
23
+ */
24
+ async getAccount(address) {
25
+ const json = await this.fetcher.get((0, apiPaths_1.getAccountPath)(address));
26
+ return (0, converters_1.accountFromJSON)(json);
27
+ }
28
+ }
29
+ exports.AccountsAPI = AccountsAPI;
30
+ //# sourceMappingURL=accounts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accounts.js","sourceRoot":"","sources":["../../src/api/accounts.ts"],"names":[],"mappings":";;;AAAA,yCAAiE;AAGjE,oDAA4E;AAE5E;;GAEG;AACH,MAAa,WAAW;IACtB,YACU,OAAgB,EAChB,KAAY;QADZ,YAAO,GAAP,OAAO,CAAS;QAChB,UAAK,GAAL,KAAK,CAAO;IACnB,CAAC;IAEJ;;OAEG;IACH,KAAK,CAAC,eAAe,CACnB,OAAe,EACf,KAAK,GAAG,IAAI,CAAC,KAAK;QAElB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,CACjC,IAAA,8BAAmB,EAAC,KAAK,EAAE,OAAO,CAAC,CACpC,CAAC;QACF,OAAO,IAAA,iCAAoB,EAAC,IAAI,CAAC,CAAC;IACpC,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,UAAU,CAAC,OAAe;QAC9B,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,CACjC,IAAA,yBAAc,EAAC,OAAO,CAAC,CACxB,CAAC;QACF,OAAO,IAAA,4BAAe,EAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;CACF;AA5BD,kCA4BC"}
package/lib/api/api.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { BuildOfferResponse, GetCollectionsResponse, ListNFTsResponse, GetNFTResponse, ListCollectionOffersResponse, GetOrdersResponse, GetBestOfferResponse, GetBestListingResponse, GetOffersResponse, GetListingsResponse, CollectionOffer, CollectionOrderByOption, CancelOrderResponse } from "./types";
2
1
  import { FulfillmentDataResponse, OrderAPIOptions, OrdersQueryOptions, OrderV2, ProtocolData } from "../orders/types";
3
2
  import { Chain, OpenSeaAPIConfig, OpenSeaAccount, OpenSeaCollection, OpenSeaCollectionStats, OpenSeaPaymentToken, OrderSide } from "../types";
3
+ import { BuildOfferResponse, GetCollectionsResponse, ListNFTsResponse, GetNFTResponse, ListCollectionOffersResponse, GetOrdersResponse, GetBestOfferResponse, GetBestListingResponse, GetOffersResponse, GetListingsResponse, CollectionOffer, CollectionOrderByOption, CancelOrderResponse, GetEventsArgs, GetEventsResponse, GetContractResponse, GetTraitsResponse } from "./types";
4
4
  /**
5
5
  * The API class for the OpenSea SDK.
6
6
  * @category Main Classes
@@ -20,6 +20,13 @@ export declare class OpenSeaAPI {
20
20
  logger: (arg: string) => void;
21
21
  private apiKey;
22
22
  private chain;
23
+ private ordersAPI;
24
+ private offersAPI;
25
+ private listingsAPI;
26
+ private collectionsAPI;
27
+ private nftsAPI;
28
+ private accountsAPI;
29
+ private eventsAPI;
23
30
  /**
24
31
  * Create an instance of the OpenSeaAPI
25
32
  * @param config OpenSeaAPIConfig for setting up the API, including an optional API key, Chain name, and base URL
@@ -28,40 +35,27 @@ export declare class OpenSeaAPI {
28
35
  constructor(config: OpenSeaAPIConfig, logger?: (arg: string) => void);
29
36
  /**
30
37
  * Gets an order from API based on query options.
31
- * @param options
32
- * @param options.side The side of the order (listing or offer)
33
- * @param options.protocol The protocol, typically seaport, to query orders for
34
- * @param options.orderDirection The direction to sort the orders
35
- * @param options.orderBy The field to sort the orders by
36
- * @param options.limit The number of orders to retrieve
37
- * @param options.maker Filter by the wallet address of the order maker
38
- * @param options.taker Filter by wallet address of the order taker
39
- * @param options.asset_contract_address Address of the NFT's contract
40
- * @param options.token_ids String array of token IDs to filter by.
41
- * @param options.listed_after Filter by orders listed after the Unix epoch timestamp in seconds
42
- * @param options.listed_before Filter by orders listed before the Unix epoch timestamp in seconds
38
+ * @param options Query options for fetching an order
43
39
  * @returns The first {@link OrderV2} returned by the API
44
40
  *
45
41
  * @throws An error if there are no matching orders.
46
42
  */
47
- getOrder({ side, protocol, orderDirection, orderBy, ...restOptions }: Omit<OrdersQueryOptions, "limit">): Promise<OrderV2>;
43
+ getOrder(options: Omit<OrdersQueryOptions, "limit">): Promise<OrderV2>;
44
+ /**
45
+ * Gets a single order by its order hash.
46
+ * @param orderHash The hash of the order to fetch
47
+ * @param protocolAddress The address of the seaport contract
48
+ * @param chain The chain where the order is located. Defaults to the chain set in the constructor.
49
+ * @returns The {@link OrderV2} returned by the API
50
+ * @throws An error if the order is not found
51
+ */
52
+ getOrderByHash(orderHash: string, protocolAddress: string, chain?: Chain): Promise<OrderV2>;
48
53
  /**
49
54
  * Gets a list of orders from API based on query options.
50
- * @param options
51
- * @param options.side The side of the order (buy or sell)
52
- * @param options.protocol The protocol, typically seaport, to query orders for
53
- * @param options.orderDirection The direction to sort the orders
54
- * @param options.orderBy The field to sort the orders by
55
- * @param options.limit The number of orders to retrieve
56
- * @param options.maker Filter by the wallet address of the order maker
57
- * @param options.taker Filter by wallet address of the order taker
58
- * @param options.asset_contract_address Address of the NFT's contract
59
- * @param options.token_ids String array of token IDs to filter by.
60
- * @param options.listed_after Filter by orders listed after the Unix epoch timestamp in seconds
61
- * @param options.listed_before Filter by orders listed before the Unix epoch timestamp in seconds
55
+ * @param options Query options for fetching orders
62
56
  * @returns The {@link GetOrdersResponse} returned by the API.
63
57
  */
64
- getOrders({ side, protocol, orderDirection, orderBy, ...restOptions }: Omit<OrdersQueryOptions, "limit">): Promise<GetOrdersResponse>;
58
+ getOrders(options: Omit<OrdersQueryOptions, "limit">): Promise<GetOrdersResponse>;
65
59
  /**
66
60
  * Gets all offers for a given collection.
67
61
  * @param collectionSlug The slug of the collection.
@@ -126,11 +120,7 @@ export declare class OpenSeaAPI {
126
120
  /**
127
121
  * Post an order to OpenSea.
128
122
  * @param order The order to post
129
- * @param apiOptions
130
- * @param apiOptions.protocol The protocol, typically seaport, to post the order to.
131
- * @param apiOptions.side The side of the order (buy or sell).
132
- * @param apiOptions.protocolAddress The address of the seaport contract.
133
- * @param options
123
+ * @param apiOptions API options for the order
134
124
  * @returns The {@link OrderV2} posted to the API.
135
125
  */
136
126
  postOrder(order: ProtocolData, apiOptions: OrderAPIOptions): Promise<OrderV2>;
@@ -219,16 +209,15 @@ export declare class OpenSeaAPI {
219
209
  getCollectionStats(slug: string): Promise<OpenSeaCollectionStats>;
220
210
  /**
221
211
  * Fetch a payment token.
222
- * @param query Query to use for getting tokens. See {@link OpenSeaPaymentTokenQuery}.
223
- * @param next The cursor for the next page of results. This is returned from a previous request.
212
+ * @param address The address of the payment token
213
+ * @param chain The chain of the payment token
224
214
  * @returns The {@link OpenSeaPaymentToken} returned by the API.
225
215
  */
226
216
  getPaymentToken(address: string, chain?: Chain): Promise<OpenSeaPaymentToken>;
227
217
  /**
228
218
  * Fetch account for an address.
229
- * @param query Query to use for getting tokens. See {@link OpenSeaPaymentTokenQuery}.
230
- * @param next The cursor for the next page of results. This is returned from a previous request.
231
- * @returns The {@link GetAccountResponse} returned by the API.
219
+ * @param address The address to fetch the account for
220
+ * @returns The {@link OpenSeaAccount} returned by the API.
232
221
  */
233
222
  getAccount(address: string): Promise<OpenSeaAccount>;
234
223
  /**
@@ -255,14 +244,76 @@ export declare class OpenSeaAPI {
255
244
  */
256
245
  offchainCancelOrder(protocolAddress: string, orderHash: string, chain?: Chain, offererSignature?: string): Promise<CancelOrderResponse>;
257
246
  /**
258
- * Generic fetch method for any API endpoint
247
+ * Gets a list of events based on query parameters.
248
+ * @param args Query parameters for filtering events.
249
+ * @returns The {@link GetEventsResponse} returned by the API.
250
+ */
251
+ getEvents(args?: GetEventsArgs): Promise<GetEventsResponse>;
252
+ /**
253
+ * Gets a list of events for a specific account.
254
+ * @param address The account address.
255
+ * @param args Query parameters for filtering events.
256
+ * @returns The {@link GetEventsResponse} returned by the API.
257
+ */
258
+ getEventsByAccount(address: string, args?: GetEventsArgs): Promise<GetEventsResponse>;
259
+ /**
260
+ * Gets a list of events for a specific collection.
261
+ * @param collectionSlug The slug (identifier) of the collection.
262
+ * @param args Query parameters for filtering events.
263
+ * @returns The {@link GetEventsResponse} returned by the API.
264
+ */
265
+ getEventsByCollection(collectionSlug: string, args?: GetEventsArgs): Promise<GetEventsResponse>;
266
+ /**
267
+ * Gets a list of events for a specific NFT.
268
+ * @param chain The chain where the NFT is located.
269
+ * @param address The contract address of the NFT.
270
+ * @param identifier The token identifier.
271
+ * @param args Query parameters for filtering events.
272
+ * @returns The {@link GetEventsResponse} returned by the API.
273
+ */
274
+ getEventsByNFT(chain: Chain, address: string, identifier: string, args?: GetEventsArgs): Promise<GetEventsResponse>;
275
+ /**
276
+ * Fetch smart contract information for a given chain and address.
277
+ * @param address The contract address.
278
+ * @param chain The chain where the contract is deployed. Defaults to the chain set in the constructor.
279
+ * @returns The {@link GetContractResponse} returned by the API.
280
+ */
281
+ getContract(address: string, chain?: Chain): Promise<GetContractResponse>;
282
+ /**
283
+ * Fetch all traits for a collection with their possible values and counts.
284
+ * @param collectionSlug The slug (identifier) of the collection.
285
+ * @returns The {@link GetTraitsResponse} returned by the API.
286
+ */
287
+ getTraits(collectionSlug: string): Promise<GetTraitsResponse>;
288
+ /**
289
+ * Gets all active offers for a specific NFT (not just the best offer).
290
+ * @param assetContractAddress The NFT contract address.
291
+ * @param tokenId The token identifier.
292
+ * @param limit The number of offers to return. Must be between 1 and 100.
293
+ * @param next The cursor for the next page of results. This is returned from a previous request.
294
+ * @param chain The chain where the NFT is located. Defaults to the chain set in the constructor.
295
+ * @returns The {@link GetOffersResponse} returned by the API.
296
+ */
297
+ getNFTOffers(assetContractAddress: string, tokenId: string, limit?: number, next?: string, chain?: Chain): Promise<GetOffersResponse>;
298
+ /**
299
+ * Gets all active listings for a specific NFT (not just the best listing).
300
+ * @param assetContractAddress The NFT contract address.
301
+ * @param tokenId The token identifier.
302
+ * @param limit The number of listings to return. Must be between 1 and 100.
303
+ * @param next The cursor for the next page of results. This is returned from a previous request.
304
+ * @param chain The chain where the NFT is located. Defaults to the chain set in the constructor.
305
+ * @returns The {@link GetListingsResponse} returned by the API.
306
+ */
307
+ getNFTListings(assetContractAddress: string, tokenId: string, limit?: number, next?: string, chain?: Chain): Promise<GetListingsResponse>;
308
+ /**
309
+ * Generic fetch method for any API endpoint with automatic rate limit retry
259
310
  * @param apiPath Path to URL endpoint under API
260
311
  * @param query URL query params. Will be used to create a URLSearchParams object.
261
312
  * @returns @typeParam T The response from the API.
262
313
  */
263
314
  get<T>(apiPath: string, query?: object): Promise<T>;
264
315
  /**
265
- * Generic post method for any API endpoint.
316
+ * Generic post method for any API endpoint with automatic rate limit retry
266
317
  * @param apiPath Path to URL endpoint under API
267
318
  * @param body Data to send.
268
319
  * @param opts ethers ConnectionInfo, similar to Fetch API.
@@ -283,9 +334,9 @@ export declare class OpenSeaAPI {
283
334
  */
284
335
  private _parseRetryAfter;
285
336
  /**
286
- * Creates a rate limit error with retry-after information for backwards compatibility.
337
+ * Creates a rate limit error with status code and retry-after information.
287
338
  * @param response The HTTP response object from the API
288
- * @returns An enhanced Error object with retryAfter and responseBody properties
339
+ * @returns An enhanced Error object with statusCode, retryAfter and responseBody properties
289
340
  */
290
341
  private _createRateLimitError;
291
342
  }