@amazon-sp-api-release/amazon-sp-api-sdk-js 1.1.0 → 1.3.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/README.md +2 -3
- package/helper/DefaultRateLimitMap.mjs +14 -1
- package/index.js +2 -0
- package/package.json +1 -1
- package/src/apluscontent_v2020_11_01/ApiClient.js +5 -1
- package/src/appintegrations_v2024_04_01/ApiClient.js +5 -1
- package/src/applications_v2023_11_30/ApiClient.js +5 -1
- package/src/awd_v2024_05_09/ApiClient.js +5 -1
- package/src/catalogitems_v2022_04_01/ApiClient.js +5 -1
- package/src/datakiosk_v2023_11_15/ApiClient.js +5 -1
- package/src/easyship_v2022_03_23/ApiClient.js +5 -1
- package/src/fbaeligibility_v1/ApiClient.js +5 -1
- package/src/fbainventory_v1/ApiClient.js +5 -1
- package/src/feeds_v2021_06_30/ApiClient.js +5 -1
- package/src/finances_2024_06_19/ApiClient.js +827 -0
- package/src/finances_2024_06_19/api/DefaultApi.js +125 -0
- package/src/finances_2024_06_19/index.js +168 -0
- package/src/finances_2024_06_19/model/AmazonPayContext.js +76 -0
- package/src/finances_2024_06_19/model/Breakdown.js +76 -0
- package/src/finances_2024_06_19/model/BusinessContext.js +76 -0
- package/src/finances_2024_06_19/model/Context.js +308 -0
- package/src/finances_2024_06_19/model/Currency.js +69 -0
- package/src/finances_2024_06_19/model/DeferredContext.js +69 -0
- package/src/finances_2024_06_19/model/Error.js +80 -0
- package/src/finances_2024_06_19/model/ErrorList.js +65 -0
- package/src/finances_2024_06_19/model/Item.js +93 -0
- package/src/finances_2024_06_19/model/ItemRelatedIdentifier.js +101 -0
- package/src/finances_2024_06_19/model/ListTransactionsResponse.js +62 -0
- package/src/finances_2024_06_19/model/MarketplaceDetails.js +69 -0
- package/src/finances_2024_06_19/model/PaymentsContext.js +83 -0
- package/src/finances_2024_06_19/model/ProductContext.js +83 -0
- package/src/finances_2024_06_19/model/RelatedIdentifier.js +137 -0
- package/src/finances_2024_06_19/model/SellingPartnerMetadata.js +76 -0
- package/src/finances_2024_06_19/model/TimeRangeContext.js +69 -0
- package/src/finances_2024_06_19/model/Transaction.js +143 -0
- package/src/finances_2024_06_19/model/TransactionsPayload.js +70 -0
- package/src/finances_v0/ApiClient.js +5 -1
- package/src/fulfillmentinbound_v0/ApiClient.js +5 -1
- package/src/fulfillmentinbound_v2024_03_20/ApiClient.js +5 -1
- package/src/fulfillmentoutbound_v2020_07_01/ApiClient.js +5 -1
- package/src/invoices_v2024_06_19/ApiClient.js +5 -1
- package/src/invoicing_v0/ApiClient.js +5 -1
- package/src/listingsitems_v2021_08_01/ApiClient.js +5 -1
- package/src/listingsitems_v2021_08_01/api/ListingsApi.js +6 -6
- package/src/listingsitems_v2021_08_01/model/FulfillmentAvailability.js +2 -2
- package/src/listingsitems_v2021_08_01/model/Issue.js +2 -2
- package/src/listingsitems_v2021_08_01/model/IssueExemption.js +1 -1
- package/src/listingsitems_v2021_08_01/model/ItemRelationship.js +1 -1
- package/src/listingsitems_v2021_08_01/model/ItemSearchResults.js +2 -2
- package/src/listingsitems_v2021_08_01/model/Pagination.js +1 -1
- package/src/listingsitems_v2021_08_01/model/PatchOperation.js +9 -3
- package/src/listingsrestrictions_v2021_08_01/ApiClient.js +5 -1
- package/src/merchantfulfillment_v0/ApiClient.js +5 -1
- package/src/messaging_v1/ApiClient.js +5 -1
- package/src/notifications_v1/ApiClient.js +5 -1
- package/src/orders_v0/ApiClient.js +5 -1
- package/src/orders_v0/api/OrdersV0Api.js +26 -26
- package/src/orders_v0/api/ShipmentApi.js +2 -2
- package/src/orders_v0/index.js +0 -7
- package/src/orders_v0/model/AmazonPrograms.js +3 -3
- package/src/orders_v0/model/OrderItem.js +0 -7
- package/src/orders_v0/model/OrdersList.js +1 -1
- package/src/orders_v0/model/PackageDetail.js +1 -1
- package/src/pricing_v0/ApiClient.js +5 -1
- package/src/pricing_v2022_05_01/ApiClient.js +5 -1
- package/src/pricing_v2022_05_01/model/CompetitiveSummaryRequest.js +2 -2
- package/src/pricing_v2022_05_01/model/CompetitiveSummaryResponseBody.js +2 -2
- package/src/pricing_v2022_05_01/model/FeaturedOfferExpectedPriceRequest.js +3 -3
- package/src/pricing_v2022_05_01/model/FeaturedOfferExpectedPriceRequestParams.js +2 -2
- package/src/pricing_v2022_05_01/model/FeaturedOfferSegment.js +7 -1
- package/src/pricing_v2022_05_01/model/LowestPricedOffersInput.js +2 -2
- package/src/pricing_v2022_05_01/model/OfferIdentifier.js +2 -2
- package/src/pricing_v2022_05_01/model/ReferencePrice.js +2 -2
- package/src/productfees_v0/ApiClient.js +5 -1
- package/src/producttypedefinitions_v2020_09_01/ApiClient.js +5 -1
- package/src/replenishment_v2022_11_07/ApiClient.js +5 -1
- package/src/reports_v2021_06_30/ApiClient.js +5 -1
- package/src/sales_v1/ApiClient.js +5 -1
- package/src/sales_v1/api/SalesApi.js +4 -1
- package/src/sellerWallet_2024_03_01/ApiClient.js +827 -0
- package/src/sellerWallet_2024_03_01/api/AccountsApi.js +212 -0
- package/src/sellerWallet_2024_03_01/api/TransactionsApi.js +233 -0
- package/src/sellerWallet_2024_03_01/api/TransferPreviewApi.js +144 -0
- package/src/sellerWallet_2024_03_01/api/TransferScheduleApi.js +347 -0
- package/src/sellerWallet_2024_03_01/index.js +322 -0
- package/src/sellerWallet_2024_03_01/model/AccountHolderAddress.js +114 -0
- package/src/sellerWallet_2024_03_01/model/Balance.js +98 -0
- package/src/sellerWallet_2024_03_01/model/BalanceListing.js +63 -0
- package/src/sellerWallet_2024_03_01/model/BalanceType.js +54 -0
- package/src/sellerWallet_2024_03_01/model/BankAccount.js +148 -0
- package/src/sellerWallet_2024_03_01/model/BankAccountHolderStatus.js +54 -0
- package/src/sellerWallet_2024_03_01/model/BankAccountListing.js +65 -0
- package/src/sellerWallet_2024_03_01/model/BankAccountNumberFormat.js +42 -0
- package/src/sellerWallet_2024_03_01/model/BankAccountOwnershipType.js +48 -0
- package/src/sellerWallet_2024_03_01/model/BankNumberFormat.js +42 -0
- package/src/sellerWallet_2024_03_01/model/Currency.js +69 -0
- package/src/sellerWallet_2024_03_01/model/DeleteTransferSchedule.js +80 -0
- package/src/sellerWallet_2024_03_01/model/Error.js +80 -0
- package/src/sellerWallet_2024_03_01/model/ErrorList.js +65 -0
- package/src/sellerWallet_2024_03_01/model/Fee.js +91 -0
- package/src/sellerWallet_2024_03_01/model/FeeType.js +48 -0
- package/src/sellerWallet_2024_03_01/model/FxRateDetails.js +91 -0
- package/src/sellerWallet_2024_03_01/model/PaymentPreference.js +73 -0
- package/src/sellerWallet_2024_03_01/model/PaymentPreferencePaymentType.js +42 -0
- package/src/sellerWallet_2024_03_01/model/RateDirection.js +42 -0
- package/src/sellerWallet_2024_03_01/model/RecurringFrequency.js +54 -0
- package/src/sellerWallet_2024_03_01/model/ScheduleExpression.js +71 -0
- package/src/sellerWallet_2024_03_01/model/ScheduleExpressionType.js +42 -0
- package/src/sellerWallet_2024_03_01/model/ScheduleTransferType.js +36 -0
- package/src/sellerWallet_2024_03_01/model/Transaction.js +187 -0
- package/src/sellerWallet_2024_03_01/model/TransactionAccount.js +112 -0
- package/src/sellerWallet_2024_03_01/model/TransactionInitiationRequest.js +121 -0
- package/src/sellerWallet_2024_03_01/model/TransactionInstrumentDetails.js +73 -0
- package/src/sellerWallet_2024_03_01/model/TransactionListing.js +72 -0
- package/src/sellerWallet_2024_03_01/model/TransactionStatus.js +66 -0
- package/src/sellerWallet_2024_03_01/model/TransactionType.js +42 -0
- package/src/sellerWallet_2024_03_01/model/TransferRatePreview.js +91 -0
- package/src/sellerWallet_2024_03_01/model/TransferSchedule.js +123 -0
- package/src/sellerWallet_2024_03_01/model/TransferScheduleFailures.js +73 -0
- package/src/sellerWallet_2024_03_01/model/TransferScheduleInformation.js +83 -0
- package/src/sellerWallet_2024_03_01/model/TransferScheduleListing.js +72 -0
- package/src/sellerWallet_2024_03_01/model/TransferScheduleRequest.js +125 -0
- package/src/sellerWallet_2024_03_01/model/TransferScheduleStatus.js +54 -0
- package/src/sellers_v1/ApiClient.js +5 -1
- package/src/services_v1/ApiClient.js +5 -1
- package/src/shipping_v2/ApiClient.js +5 -1
- package/src/solicitations_v1/ApiClient.js +5 -1
- package/src/supplysources_v2020_07_01/ApiClient.js +5 -1
- package/src/tokens_v2021_03_01/ApiClient.js +5 -1
- package/src/transfers_v2024_06_01/ApiClient.js +5 -1
- package/src/uploads_v2020_11_01/ApiClient.js +5 -1
- package/src/vehicles_v2024_11_01/ApiClient.js +5 -1
- package/src/vendordfinventory_v1/ApiClient.js +5 -1
- package/src/vendordforders_v2021_12_28/ApiClient.js +5 -1
- package/src/vendordfpayments_v1/ApiClient.js +5 -1
- package/src/vendordfshipping_v2021_12_28/ApiClient.js +5 -1
- package/src/vendordftransactions_v2021_12_28/ApiClient.js +5 -1
- package/src/vendorinvoices_v1/ApiClient.js +5 -1
- package/src/vendororders_v1/ApiClient.js +5 -1
- package/src/vendorshipments_v1/ApiClient.js +5 -1
- package/src/vendorshipments_v1/api/VendorShippingApi.js +2 -2
- package/src/vendorshipments_v1/model/Shipment.js +3 -3
- package/src/vendortransactionstatus_v1/ApiClient.js +5 -1
- package/src/orders_v0/model/ExportInfo.js +0 -69
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Selling Partner API for Finances
|
|
3
|
+
* The Selling Partner API for Finances helps you obtain financial information relevant to a seller's business. You can obtain financial events for a given order or date range without having to wait until a statement period closes.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2024-06-19
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { ApiClient } from '../ApiClient.js'
|
|
15
|
+
import { Breakdown } from './Breakdown.js'
|
|
16
|
+
import { Context } from './Context.js'
|
|
17
|
+
import { Currency } from './Currency.js'
|
|
18
|
+
import { Item } from './Item.js'
|
|
19
|
+
import { MarketplaceDetails } from './MarketplaceDetails.js'
|
|
20
|
+
import { RelatedIdentifier } from './RelatedIdentifier.js'
|
|
21
|
+
import { SellingPartnerMetadata } from './SellingPartnerMetadata.js'
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The Transaction model module.
|
|
25
|
+
* @module finances_2024_06_19/model/Transaction
|
|
26
|
+
* @version 2024-06-19
|
|
27
|
+
*/
|
|
28
|
+
export class Transaction {
|
|
29
|
+
/**
|
|
30
|
+
* Constructs a new <code>Transaction</code>.
|
|
31
|
+
* Contains all information related to the transaction.
|
|
32
|
+
* @alias module:finances_2024_06_19/model/Transaction
|
|
33
|
+
* @class
|
|
34
|
+
*/
|
|
35
|
+
constructor () {
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Constructs a <code>Transaction</code> from a plain JavaScript object, optionally creating a new instance.
|
|
40
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
41
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
42
|
+
* @param {module:finances_2024_06_19/model/Transaction} obj Optional instance to populate.
|
|
43
|
+
* @return {module:finances_2024_06_19/model/Transaction} The populated <code>Transaction</code> instance.
|
|
44
|
+
*/
|
|
45
|
+
static constructFromObject (data, obj) {
|
|
46
|
+
if (data) {
|
|
47
|
+
switch (typeof data) {
|
|
48
|
+
case 'string':
|
|
49
|
+
obj = String(data)
|
|
50
|
+
break
|
|
51
|
+
case 'number':
|
|
52
|
+
obj = Number(data)
|
|
53
|
+
break
|
|
54
|
+
case 'boolean':
|
|
55
|
+
obj = Boolean(data)
|
|
56
|
+
break
|
|
57
|
+
}
|
|
58
|
+
obj = obj || new Transaction()
|
|
59
|
+
if (data.hasOwnProperty('sellingPartnerMetadata')) { obj.sellingPartnerMetadata = SellingPartnerMetadata.constructFromObject(data.sellingPartnerMetadata) }
|
|
60
|
+
if (data.hasOwnProperty('relatedIdentifiers')) { obj.relatedIdentifiers = ApiClient.convertToType(data.relatedIdentifiers, [RelatedIdentifier]) }
|
|
61
|
+
if (data.hasOwnProperty('transactionType')) { obj.transactionType = ApiClient.convertToType(data.transactionType, 'String') }
|
|
62
|
+
if (data.hasOwnProperty('transactionId')) { obj.transactionId = ApiClient.convertToType(data.transactionId, 'String') }
|
|
63
|
+
if (data.hasOwnProperty('transactionStatus')) { obj.transactionStatus = ApiClient.convertToType(data.transactionStatus, 'String') }
|
|
64
|
+
if (data.hasOwnProperty('description')) { obj.description = ApiClient.convertToType(data.description, 'String') }
|
|
65
|
+
if (data.hasOwnProperty('postedDate')) { obj.postedDate = ApiClient.convertToType(data.postedDate, 'Date') }
|
|
66
|
+
if (data.hasOwnProperty('totalAmount')) { obj.totalAmount = Currency.constructFromObject(data.totalAmount) }
|
|
67
|
+
if (data.hasOwnProperty('marketplaceDetails')) { obj.marketplaceDetails = MarketplaceDetails.constructFromObject(data.marketplaceDetails) }
|
|
68
|
+
if (data.hasOwnProperty('items')) { obj.items = ApiClient.convertToType(data.items, [Item]) }
|
|
69
|
+
if (data.hasOwnProperty('contexts')) { obj.contexts = ApiClient.convertToType(data.contexts, [Context]) }
|
|
70
|
+
if (data.hasOwnProperty('breakdowns')) { obj.breakdowns = ApiClient.convertToType(data.breakdowns, [Breakdown]) }
|
|
71
|
+
}
|
|
72
|
+
return obj
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* @member {module:finances_2024_06_19/model/SellingPartnerMetadata} sellingPartnerMetadata
|
|
78
|
+
*/
|
|
79
|
+
Transaction.prototype.sellingPartnerMetadata = undefined
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Related business identifiers of the transaction.
|
|
83
|
+
* @member {Array.<module:finances_2024_06_19/model/RelatedIdentifier>} relatedIdentifiers
|
|
84
|
+
*/
|
|
85
|
+
Transaction.prototype.relatedIdentifiers = undefined
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* The type of transaction. Possible values: * Shipment
|
|
89
|
+
* @member {String} transactionType
|
|
90
|
+
*/
|
|
91
|
+
Transaction.prototype.transactionType = undefined
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* The unique identifier for the transaction.
|
|
95
|
+
* @member {String} transactionId
|
|
96
|
+
*/
|
|
97
|
+
Transaction.prototype.transactionId = undefined
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* The status of the transaction. **Possible values:** * `DEFERRED`: the transaction is currently deferred. * `RELEASED`: the transaction is currently released. * `DEFERRED_RELEASED`: the transaction was deferred in the past, but is now released. The status of a deferred transaction is updated to `DEFERRED_RELEASED` when the transaction is released.
|
|
101
|
+
* @member {String} transactionStatus
|
|
102
|
+
*/
|
|
103
|
+
Transaction.prototype.transactionStatus = undefined
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Describes the reasons for the transaction. Example: 'Order Payment','Refund Order'
|
|
107
|
+
* @member {String} description
|
|
108
|
+
*/
|
|
109
|
+
Transaction.prototype.description = undefined
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Fields with a schema type of date are in ISO 8601 date time format (for example GroupBeginDate).
|
|
113
|
+
* @member {Date} postedDate
|
|
114
|
+
*/
|
|
115
|
+
Transaction.prototype.postedDate = undefined
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* @member {module:finances_2024_06_19/model/Currency} totalAmount
|
|
119
|
+
*/
|
|
120
|
+
Transaction.prototype.totalAmount = undefined
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @member {module:finances_2024_06_19/model/MarketplaceDetails} marketplaceDetails
|
|
124
|
+
*/
|
|
125
|
+
Transaction.prototype.marketplaceDetails = undefined
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* List of items in the transaction
|
|
129
|
+
* @member {Array.<module:finances_2024_06_19/model/Item>} items
|
|
130
|
+
*/
|
|
131
|
+
Transaction.prototype.items = undefined
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* List of additional Information about the item.
|
|
135
|
+
* @member {Array.<module:finances_2024_06_19/model/Context>} contexts
|
|
136
|
+
*/
|
|
137
|
+
Transaction.prototype.contexts = undefined
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* A list of breakdowns that detail how the total amount is calculated for the transaction.
|
|
141
|
+
* @member {Array.<module:finances_2024_06_19/model/Breakdown>} breakdowns
|
|
142
|
+
*/
|
|
143
|
+
Transaction.prototype.breakdowns = undefined
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Selling Partner API for Finances
|
|
3
|
+
* The Selling Partner API for Finances helps you obtain financial information relevant to a seller's business. You can obtain financial events for a given order or date range without having to wait until a statement period closes.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2024-06-19
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { ApiClient } from '../ApiClient.js'
|
|
15
|
+
import { Transaction } from './Transaction.js'
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The TransactionsPayload model module.
|
|
19
|
+
* @module finances_2024_06_19/model/TransactionsPayload
|
|
20
|
+
* @version 2024-06-19
|
|
21
|
+
*/
|
|
22
|
+
export class TransactionsPayload {
|
|
23
|
+
/**
|
|
24
|
+
* Constructs a new <code>TransactionsPayload</code>.
|
|
25
|
+
* The payload for the `listTransactions` operation.
|
|
26
|
+
* @alias module:finances_2024_06_19/model/TransactionsPayload
|
|
27
|
+
* @class
|
|
28
|
+
*/
|
|
29
|
+
constructor () {
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a <code>TransactionsPayload</code> from a plain JavaScript object, optionally creating a new instance.
|
|
34
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
35
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
36
|
+
* @param {module:finances_2024_06_19/model/TransactionsPayload} obj Optional instance to populate.
|
|
37
|
+
* @return {module:finances_2024_06_19/model/TransactionsPayload} The populated <code>TransactionsPayload</code> instance.
|
|
38
|
+
*/
|
|
39
|
+
static constructFromObject (data, obj) {
|
|
40
|
+
if (data) {
|
|
41
|
+
switch (typeof data) {
|
|
42
|
+
case 'string':
|
|
43
|
+
obj = String(data)
|
|
44
|
+
break
|
|
45
|
+
case 'number':
|
|
46
|
+
obj = Number(data)
|
|
47
|
+
break
|
|
48
|
+
case 'boolean':
|
|
49
|
+
obj = Boolean(data)
|
|
50
|
+
break
|
|
51
|
+
}
|
|
52
|
+
obj = obj || new TransactionsPayload()
|
|
53
|
+
if (data.hasOwnProperty('nextToken')) { obj.nextToken = ApiClient.convertToType(data.nextToken, 'String') }
|
|
54
|
+
if (data.hasOwnProperty('transactions')) { obj.transactions = ApiClient.convertToType(data.transactions, [Transaction]) }
|
|
55
|
+
}
|
|
56
|
+
return obj
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* When present and not empty, pass this string token in the next request to return the next response page.
|
|
62
|
+
* @member {String} nextToken
|
|
63
|
+
*/
|
|
64
|
+
TransactionsPayload.prototype.nextToken = undefined
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Contains transactions within a given time period.
|
|
68
|
+
* @member {Array.<module:finances_2024_06_19/model/Transaction>} transactions
|
|
69
|
+
*/
|
|
70
|
+
TransactionsPayload.prototype.transactions = undefined
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
import superagent from 'superagent'
|
|
15
15
|
import querystring from 'querystring'
|
|
16
|
+
import { readFileSync } from 'node:fs'
|
|
16
17
|
import { URL } from 'node:url'
|
|
17
18
|
import { RateLimitConfiguration } from '../../helper/RateLimitConfiguration.mjs'
|
|
18
19
|
import { SuperagentRateLimiter } from '../../helper/SuperagentRateLimiter.mjs'
|
|
@@ -214,13 +215,16 @@ export class ApiClient {
|
|
|
214
215
|
this.authentications = {
|
|
215
216
|
}
|
|
216
217
|
|
|
218
|
+
const pkg = JSON.parse(readFileSync(new URL('../../package.json', import.meta.url)))
|
|
219
|
+
const version = pkg.version ? pkg.version : 'undefined'
|
|
220
|
+
|
|
217
221
|
/**
|
|
218
222
|
* The default HTTP headers to be included for all API calls.
|
|
219
223
|
* @type {Array<String>}
|
|
220
224
|
* @default {}
|
|
221
225
|
*/
|
|
222
226
|
this.defaultHeaders = {
|
|
223
|
-
'User-Agent':
|
|
227
|
+
'User-Agent': `amazon-selling-partner-api-sdk/${version}/JavaScript`
|
|
224
228
|
}
|
|
225
229
|
|
|
226
230
|
/**
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
import superagent from 'superagent'
|
|
15
15
|
import querystring from 'querystring'
|
|
16
|
+
import { readFileSync } from 'node:fs'
|
|
16
17
|
import { URL } from 'node:url'
|
|
17
18
|
import { RateLimitConfiguration } from '../../helper/RateLimitConfiguration.mjs'
|
|
18
19
|
import { SuperagentRateLimiter } from '../../helper/SuperagentRateLimiter.mjs'
|
|
@@ -214,13 +215,16 @@ export class ApiClient {
|
|
|
214
215
|
this.authentications = {
|
|
215
216
|
}
|
|
216
217
|
|
|
218
|
+
const pkg = JSON.parse(readFileSync(new URL('../../package.json', import.meta.url)))
|
|
219
|
+
const version = pkg.version ? pkg.version : 'undefined'
|
|
220
|
+
|
|
217
221
|
/**
|
|
218
222
|
* The default HTTP headers to be included for all API calls.
|
|
219
223
|
* @type {Array<String>}
|
|
220
224
|
* @default {}
|
|
221
225
|
*/
|
|
222
226
|
this.defaultHeaders = {
|
|
223
|
-
'User-Agent':
|
|
227
|
+
'User-Agent': `amazon-selling-partner-api-sdk/${version}/JavaScript`
|
|
224
228
|
}
|
|
225
229
|
|
|
226
230
|
/**
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
import superagent from 'superagent'
|
|
15
15
|
import querystring from 'querystring'
|
|
16
|
+
import { readFileSync } from 'node:fs'
|
|
16
17
|
import { URL } from 'node:url'
|
|
17
18
|
import { RateLimitConfiguration } from '../../helper/RateLimitConfiguration.mjs'
|
|
18
19
|
import { SuperagentRateLimiter } from '../../helper/SuperagentRateLimiter.mjs'
|
|
@@ -214,13 +215,16 @@ export class ApiClient {
|
|
|
214
215
|
this.authentications = {
|
|
215
216
|
}
|
|
216
217
|
|
|
218
|
+
const pkg = JSON.parse(readFileSync(new URL('../../package.json', import.meta.url)))
|
|
219
|
+
const version = pkg.version ? pkg.version : 'undefined'
|
|
220
|
+
|
|
217
221
|
/**
|
|
218
222
|
* The default HTTP headers to be included for all API calls.
|
|
219
223
|
* @type {Array<String>}
|
|
220
224
|
* @default {}
|
|
221
225
|
*/
|
|
222
226
|
this.defaultHeaders = {
|
|
223
|
-
'User-Agent':
|
|
227
|
+
'User-Agent': `amazon-selling-partner-api-sdk/${version}/JavaScript`
|
|
224
228
|
}
|
|
225
229
|
|
|
226
230
|
/**
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
import superagent from 'superagent'
|
|
15
15
|
import querystring from 'querystring'
|
|
16
|
+
import { readFileSync } from 'node:fs'
|
|
16
17
|
import { URL } from 'node:url'
|
|
17
18
|
import { RateLimitConfiguration } from '../../helper/RateLimitConfiguration.mjs'
|
|
18
19
|
import { SuperagentRateLimiter } from '../../helper/SuperagentRateLimiter.mjs'
|
|
@@ -214,13 +215,16 @@ export class ApiClient {
|
|
|
214
215
|
this.authentications = {
|
|
215
216
|
}
|
|
216
217
|
|
|
218
|
+
const pkg = JSON.parse(readFileSync(new URL('../../package.json', import.meta.url)))
|
|
219
|
+
const version = pkg.version ? pkg.version : 'undefined'
|
|
220
|
+
|
|
217
221
|
/**
|
|
218
222
|
* The default HTTP headers to be included for all API calls.
|
|
219
223
|
* @type {Array<String>}
|
|
220
224
|
* @default {}
|
|
221
225
|
*/
|
|
222
226
|
this.defaultHeaders = {
|
|
223
|
-
'User-Agent':
|
|
227
|
+
'User-Agent': `amazon-selling-partner-api-sdk/${version}/JavaScript`
|
|
224
228
|
}
|
|
225
229
|
|
|
226
230
|
/**
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
import superagent from 'superagent'
|
|
15
15
|
import querystring from 'querystring'
|
|
16
|
+
import { readFileSync } from 'node:fs'
|
|
16
17
|
import { URL } from 'node:url'
|
|
17
18
|
import { RateLimitConfiguration } from '../../helper/RateLimitConfiguration.mjs'
|
|
18
19
|
import { SuperagentRateLimiter } from '../../helper/SuperagentRateLimiter.mjs'
|
|
@@ -214,13 +215,16 @@ export class ApiClient {
|
|
|
214
215
|
this.authentications = {
|
|
215
216
|
}
|
|
216
217
|
|
|
218
|
+
const pkg = JSON.parse(readFileSync(new URL('../../package.json', import.meta.url)))
|
|
219
|
+
const version = pkg.version ? pkg.version : 'undefined'
|
|
220
|
+
|
|
217
221
|
/**
|
|
218
222
|
* The default HTTP headers to be included for all API calls.
|
|
219
223
|
* @type {Array<String>}
|
|
220
224
|
* @default {}
|
|
221
225
|
*/
|
|
222
226
|
this.defaultHeaders = {
|
|
223
|
-
'User-Agent':
|
|
227
|
+
'User-Agent': `amazon-selling-partner-api-sdk/${version}/JavaScript`
|
|
224
228
|
}
|
|
225
229
|
|
|
226
230
|
/**
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
import superagent from 'superagent'
|
|
15
15
|
import querystring from 'querystring'
|
|
16
|
+
import { readFileSync } from 'node:fs'
|
|
16
17
|
import { URL } from 'node:url'
|
|
17
18
|
import { RateLimitConfiguration } from '../../helper/RateLimitConfiguration.mjs'
|
|
18
19
|
import { SuperagentRateLimiter } from '../../helper/SuperagentRateLimiter.mjs'
|
|
@@ -214,13 +215,16 @@ export class ApiClient {
|
|
|
214
215
|
this.authentications = {
|
|
215
216
|
}
|
|
216
217
|
|
|
218
|
+
const pkg = JSON.parse(readFileSync(new URL('../../package.json', import.meta.url)))
|
|
219
|
+
const version = pkg.version ? pkg.version : 'undefined'
|
|
220
|
+
|
|
217
221
|
/**
|
|
218
222
|
* The default HTTP headers to be included for all API calls.
|
|
219
223
|
* @type {Array<String>}
|
|
220
224
|
* @default {}
|
|
221
225
|
*/
|
|
222
226
|
this.defaultHeaders = {
|
|
223
|
-
'User-Agent':
|
|
227
|
+
'User-Agent': `amazon-selling-partner-api-sdk/${version}/JavaScript`
|
|
224
228
|
}
|
|
225
229
|
|
|
226
230
|
/**
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
import superagent from 'superagent'
|
|
15
15
|
import querystring from 'querystring'
|
|
16
|
+
import { readFileSync } from 'node:fs'
|
|
16
17
|
import { URL } from 'node:url'
|
|
17
18
|
import { RateLimitConfiguration } from '../../helper/RateLimitConfiguration.mjs'
|
|
18
19
|
import { SuperagentRateLimiter } from '../../helper/SuperagentRateLimiter.mjs'
|
|
@@ -214,13 +215,16 @@ export class ApiClient {
|
|
|
214
215
|
this.authentications = {
|
|
215
216
|
}
|
|
216
217
|
|
|
218
|
+
const pkg = JSON.parse(readFileSync(new URL('../../package.json', import.meta.url)))
|
|
219
|
+
const version = pkg.version ? pkg.version : 'undefined'
|
|
220
|
+
|
|
217
221
|
/**
|
|
218
222
|
* The default HTTP headers to be included for all API calls.
|
|
219
223
|
* @type {Array<String>}
|
|
220
224
|
* @default {}
|
|
221
225
|
*/
|
|
222
226
|
this.defaultHeaders = {
|
|
223
|
-
'User-Agent':
|
|
227
|
+
'User-Agent': `amazon-selling-partner-api-sdk/${version}/JavaScript`
|
|
224
228
|
}
|
|
225
229
|
|
|
226
230
|
/**
|
|
@@ -139,7 +139,7 @@ export class ListingsApi {
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
/**
|
|
142
|
-
* Returns details about a listings item for a selling partner. **
|
|
142
|
+
* Returns details about a listings item for a selling partner. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput can receive higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api) in the Selling Partner API documentation.
|
|
143
143
|
* @param {String} sellerId A selling partner identifier, such as a merchant account or vendor code.
|
|
144
144
|
* @param {String} sku A selling partner provided identifier for an Amazon listing.
|
|
145
145
|
* @param {Array.<String>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
@@ -193,7 +193,7 @@ export class ListingsApi {
|
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
/**
|
|
196
|
-
* Returns details about a listings item for a selling partner. **
|
|
196
|
+
* Returns details about a listings item for a selling partner. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput can receive higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api) in the Selling Partner API documentation.
|
|
197
197
|
* @param {String} sellerId A selling partner identifier, such as a merchant account or vendor code.
|
|
198
198
|
* @param {String} sku A selling partner provided identifier for an Amazon listing.
|
|
199
199
|
* @param {Array.<String>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
@@ -210,7 +210,7 @@ export class ListingsApi {
|
|
|
210
210
|
}
|
|
211
211
|
|
|
212
212
|
/**
|
|
213
|
-
* Partially update (patch) a listings item for a selling partner. Only top-level listings item attributes can be patched. Patching nested attributes is not supported. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput can receive higher rate and burst values
|
|
213
|
+
* Partially update (patch) a listings item for a selling partner. Only top-level listings item attributes can be patched. Patching nested attributes is not supported. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput can receive higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api) in the Selling Partner API documentation.
|
|
214
214
|
* @param {String} sellerId A selling partner identifier, such as a merchant account or vendor code.
|
|
215
215
|
* @param {String} sku A selling partner provided identifier for an Amazon listing.
|
|
216
216
|
* @param {Array.<String>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
@@ -272,7 +272,7 @@ export class ListingsApi {
|
|
|
272
272
|
}
|
|
273
273
|
|
|
274
274
|
/**
|
|
275
|
-
* Partially update (patch) a listings item for a selling partner. Only top-level listings item attributes can be patched. Patching nested attributes is not supported. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput can receive higher rate and burst values
|
|
275
|
+
* Partially update (patch) a listings item for a selling partner. Only top-level listings item attributes can be patched. Patching nested attributes is not supported. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput can receive higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api) in the Selling Partner API documentation.
|
|
276
276
|
* @param {String} sellerId A selling partner identifier, such as a merchant account or vendor code.
|
|
277
277
|
* @param {String} sku A selling partner provided identifier for an Amazon listing.
|
|
278
278
|
* @param {Array.<String>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
@@ -291,7 +291,7 @@ export class ListingsApi {
|
|
|
291
291
|
}
|
|
292
292
|
|
|
293
293
|
/**
|
|
294
|
-
* Creates or fully
|
|
294
|
+
* Creates a new or fully-updates an existing listings item for a selling partner. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput can receive higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api) in the Selling Partner API documentation.
|
|
295
295
|
* @param {String} sellerId A selling partner identifier, such as a merchant account or vendor code.
|
|
296
296
|
* @param {String} sku A selling partner provided identifier for an Amazon listing.
|
|
297
297
|
* @param {Array.<String>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
@@ -353,7 +353,7 @@ export class ListingsApi {
|
|
|
353
353
|
}
|
|
354
354
|
|
|
355
355
|
/**
|
|
356
|
-
* Creates or fully
|
|
356
|
+
* Creates a new or fully-updates an existing listings item for a selling partner. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput can receive higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api) in the Selling Partner API documentation.
|
|
357
357
|
* @param {String} sellerId A selling partner identifier, such as a merchant account or vendor code.
|
|
358
358
|
* @param {String} sku A selling partner provided identifier for an Amazon listing.
|
|
359
359
|
* @param {Array.<String>} marketplaceIds A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
@@ -24,7 +24,7 @@ export class FulfillmentAvailability {
|
|
|
24
24
|
* The fulfillment availability details for the listings item.
|
|
25
25
|
* @alias module:listingsitems_v2021_08_01/model/FulfillmentAvailability
|
|
26
26
|
* @class
|
|
27
|
-
* @param fulfillmentChannelCode {String}
|
|
27
|
+
* @param fulfillmentChannelCode {String} Designates which fulfillment network is used.
|
|
28
28
|
*/
|
|
29
29
|
constructor (fulfillmentChannelCode) {
|
|
30
30
|
this.fulfillmentChannelCode = fulfillmentChannelCode
|
|
@@ -59,7 +59,7 @@ export class FulfillmentAvailability {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
|
-
*
|
|
62
|
+
* Designates which fulfillment network is used.
|
|
63
63
|
* @member {String} fulfillmentChannelCode
|
|
64
64
|
*/
|
|
65
65
|
FulfillmentAvailability.prototype.fulfillmentChannelCode = undefined
|
|
@@ -28,7 +28,7 @@ export class Issue {
|
|
|
28
28
|
* @param code {String} An issue code that identifies the type of issue.
|
|
29
29
|
* @param message {String} A message that describes the issue.
|
|
30
30
|
* @param severity {module:listingsitems_v2021_08_01/model/Issue.SeverityEnum} The severity of the issue.
|
|
31
|
-
* @param categories {Array.<String>} List of issue categories. Possible
|
|
31
|
+
* @param categories {Array.<String>} List of issue categories. Possible values: * 'INVALID_ATTRIBUTE' - Indicating an invalid attribute in the listing. * 'MISSING_ATTRIBUTE' - Highlighting a missing attribute in the listing. * 'INVALID_IMAGE' - Signifying an invalid image in the listing. * 'MISSING_IMAGE' - Noting the absence of an image in the listing. * 'INVALID_PRICE' - Pertaining to issues with the listing's price-related attributes. * 'MISSING_PRICE' - Pointing out the absence of a price attribute in the listing. * 'DUPLICATE' - Identifying listings with potential duplicate problems, such as this ASIN potentially being a duplicate of another ASIN. * 'QUALIFICATION_REQUIRED' - Indicating that the listing requires qualification-related approval.
|
|
32
32
|
*/
|
|
33
33
|
constructor (code, message, severity, categories) {
|
|
34
34
|
this.code = code
|
|
@@ -120,7 +120,7 @@ Issue.prototype.severity = undefined
|
|
|
120
120
|
Issue.prototype.attributeNames = undefined
|
|
121
121
|
|
|
122
122
|
/**
|
|
123
|
-
* List of issue categories. Possible
|
|
123
|
+
* List of issue categories. Possible values: * 'INVALID_ATTRIBUTE' - Indicating an invalid attribute in the listing. * 'MISSING_ATTRIBUTE' - Highlighting a missing attribute in the listing. * 'INVALID_IMAGE' - Signifying an invalid image in the listing. * 'MISSING_IMAGE' - Noting the absence of an image in the listing. * 'INVALID_PRICE' - Pertaining to issues with the listing's price-related attributes. * 'MISSING_PRICE' - Pointing out the absence of a price attribute in the listing. * 'DUPLICATE' - Identifying listings with potential duplicate problems, such as this ASIN potentially being a duplicate of another ASIN. * 'QUALIFICATION_REQUIRED' - Indicating that the listing requires qualification-related approval.
|
|
124
124
|
* @member {Array.<String>} categories
|
|
125
125
|
*/
|
|
126
126
|
Issue.prototype.categories = undefined
|
|
@@ -91,7 +91,7 @@ IssueExemption.StatusEnum = {
|
|
|
91
91
|
IssueExemption.prototype.status = undefined
|
|
92
92
|
|
|
93
93
|
/**
|
|
94
|
-
*
|
|
94
|
+
* Represents the timestamp, in ISO 8601 format, that specifies the date when the temporary exemptions expires, and Amazon begins enforcing the listed actions.
|
|
95
95
|
* @member {Date} expiryDate
|
|
96
96
|
*/
|
|
97
97
|
IssueExemption.prototype.expiryDate = undefined
|
|
@@ -22,7 +22,7 @@ import { ItemVariationTheme } from './ItemVariationTheme.js'
|
|
|
22
22
|
export class ItemRelationship {
|
|
23
23
|
/**
|
|
24
24
|
* Constructs a new <code>ItemRelationship</code>.
|
|
25
|
-
*
|
|
25
|
+
* The relationship details for a listing item.
|
|
26
26
|
* @alias module:listingsitems_v2021_08_01/model/ItemRelationship
|
|
27
27
|
* @class
|
|
28
28
|
* @param type {module:listingsitems_v2021_08_01/model/ItemRelationship.TypeEnum} The type of relationship.
|
|
@@ -26,7 +26,7 @@ export class ItemSearchResults {
|
|
|
26
26
|
* Selling partner listings items and search related metadata.
|
|
27
27
|
* @alias module:listingsitems_v2021_08_01/model/ItemSearchResults
|
|
28
28
|
* @class
|
|
29
|
-
* @param numberOfResults {Number} The total number of selling partner listings items found for the search criteria (only results up to the page count limit
|
|
29
|
+
* @param numberOfResults {Number} The total number of selling partner listings items found for the search criteria (only results up to the page count limit is returned per request regardless of the number found). Note: The maximum number of items (SKUs) that can be returned and paged through is 1000.
|
|
30
30
|
* @param items {Array.<module:listingsitems_v2021_08_01/model/Item>} A list of listings items.
|
|
31
31
|
*/
|
|
32
32
|
constructor (numberOfResults, items) {
|
|
@@ -64,7 +64,7 @@ export class ItemSearchResults {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
|
-
* The total number of selling partner listings items found for the search criteria (only results up to the page count limit
|
|
67
|
+
* The total number of selling partner listings items found for the search criteria (only results up to the page count limit is returned per request regardless of the number found). Note: The maximum number of items (SKUs) that can be returned and paged through is 1000.
|
|
68
68
|
* @member {Number} numberOfResults
|
|
69
69
|
*/
|
|
70
70
|
ItemSearchResults.prototype.numberOfResults = undefined
|
|
@@ -21,7 +21,7 @@ import { ApiClient } from '../ApiClient.js'
|
|
|
21
21
|
export class Pagination {
|
|
22
22
|
/**
|
|
23
23
|
* Constructs a new <code>Pagination</code>.
|
|
24
|
-
* When a request produces a response that exceeds the `pageSize`, pagination occurs. This means the response is divided into individual pages. To retrieve the next page or the previous page, you must pass the `nextToken` value or the `previousToken` value as the `pageToken` parameter in the next request. When you receive the last page, there
|
|
24
|
+
* When a request produces a response that exceeds the `pageSize`, pagination occurs. This means the response is divided into individual pages. To retrieve the next page or the previous page, you must pass the `nextToken` value or the `previousToken` value as the `pageToken` parameter in the next request. When you receive the last page, there is no `nextToken` key in the pagination object.
|
|
25
25
|
* @alias module:listingsitems_v2021_08_01/model/Pagination
|
|
26
26
|
* @class
|
|
27
27
|
*/
|
|
@@ -24,7 +24,7 @@ export class PatchOperation {
|
|
|
24
24
|
* Individual JSON Patch operation for an HTTP PATCH request.
|
|
25
25
|
* @alias module:listingsitems_v2021_08_01/model/PatchOperation
|
|
26
26
|
* @class
|
|
27
|
-
* @param op {module:listingsitems_v2021_08_01/model/PatchOperation.OpEnum} Type of JSON Patch operation. Supported JSON Patch operations include add
|
|
27
|
+
* @param op {module:listingsitems_v2021_08_01/model/PatchOperation.OpEnum} Type of JSON Patch operation. Supported JSON Patch operations include `add`, `replace`, `merge` and `delete`. Refer to <https://tools.ietf.org/html/rfc6902>.
|
|
28
28
|
* @param path {String} JSON Pointer path of the element to patch. Refer to [JavaScript Object Notation (JSON) Patch](https://tools.ietf.org/html/rfc6902) for more information.
|
|
29
29
|
*/
|
|
30
30
|
constructor (op, path) {
|
|
@@ -80,6 +80,12 @@ PatchOperation.OpEnum = {
|
|
|
80
80
|
*/
|
|
81
81
|
replace: 'replace',
|
|
82
82
|
|
|
83
|
+
/**
|
|
84
|
+
* value: "merge"
|
|
85
|
+
* @const
|
|
86
|
+
*/
|
|
87
|
+
merge: 'merge',
|
|
88
|
+
|
|
83
89
|
/**
|
|
84
90
|
* value: "delete"
|
|
85
91
|
* @const
|
|
@@ -88,7 +94,7 @@ PatchOperation.OpEnum = {
|
|
|
88
94
|
}
|
|
89
95
|
|
|
90
96
|
/**
|
|
91
|
-
* Type of JSON Patch operation. Supported JSON Patch operations include add
|
|
97
|
+
* Type of JSON Patch operation. Supported JSON Patch operations include `add`, `replace`, `merge` and `delete`. Refer to <https://tools.ietf.org/html/rfc6902>.
|
|
92
98
|
* @member {module:listingsitems_v2021_08_01/model/PatchOperation.OpEnum} op
|
|
93
99
|
*/
|
|
94
100
|
PatchOperation.prototype.op = undefined
|
|
@@ -100,7 +106,7 @@ PatchOperation.prototype.op = undefined
|
|
|
100
106
|
PatchOperation.prototype.path = undefined
|
|
101
107
|
|
|
102
108
|
/**
|
|
103
|
-
* JSON value to add
|
|
109
|
+
* JSON value to `add`, `replace`, `merge` or `delete`.
|
|
104
110
|
* @member {Array.<Object.<String, Object>>} value
|
|
105
111
|
*/
|
|
106
112
|
PatchOperation.prototype.value = undefined
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
import superagent from 'superagent'
|
|
15
15
|
import querystring from 'querystring'
|
|
16
|
+
import { readFileSync } from 'node:fs'
|
|
16
17
|
import { URL } from 'node:url'
|
|
17
18
|
import { RateLimitConfiguration } from '../../helper/RateLimitConfiguration.mjs'
|
|
18
19
|
import { SuperagentRateLimiter } from '../../helper/SuperagentRateLimiter.mjs'
|
|
@@ -214,13 +215,16 @@ export class ApiClient {
|
|
|
214
215
|
this.authentications = {
|
|
215
216
|
}
|
|
216
217
|
|
|
218
|
+
const pkg = JSON.parse(readFileSync(new URL('../../package.json', import.meta.url)))
|
|
219
|
+
const version = pkg.version ? pkg.version : 'undefined'
|
|
220
|
+
|
|
217
221
|
/**
|
|
218
222
|
* The default HTTP headers to be included for all API calls.
|
|
219
223
|
* @type {Array<String>}
|
|
220
224
|
* @default {}
|
|
221
225
|
*/
|
|
222
226
|
this.defaultHeaders = {
|
|
223
|
-
'User-Agent':
|
|
227
|
+
'User-Agent': `amazon-selling-partner-api-sdk/${version}/JavaScript`
|
|
224
228
|
}
|
|
225
229
|
|
|
226
230
|
/**
|