@sp-api-sdk/sales-api-v1
Advanced tools
Comparing version 0.2.1 to 1.0.0
@@ -211,11 +211,3 @@ import globalAxios from 'axios'; | ||
* Returns aggregated order metrics for given interval, broken down by granularity, for given buyer type. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | .5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. | ||
* @param {Array<string>} marketplaceIds A list of marketplace identifiers. Example: ATVPDKIKX0DER indicates the US marketplace. | ||
* @param {string} interval A time interval used for selecting order metrics. This takes the form of two dates separated by two hyphens (first date is inclusive; second date is exclusive). Dates are in ISO8601 format and must represent absolute time (either Z notation or offset notation). Example: 2018-09-01T00:00:00-07:00--2018-09-04T00:00:00-07:00 requests order metrics for Sept 1st, 2nd and 3rd in the -07:00 zone. | ||
* @param {'Hour' | 'Day' | 'Week' | 'Month' | 'Year' | 'Total'} granularity The granularity of the grouping of order metrics, based on a unit of time. Specifying granularity=Hour results in a successful request only if the interval specified is less than or equal to 30 days from now. For all other granularities, the interval specified must be less or equal to 2 years from now. Specifying granularity=Total results in order metrics that are aggregated over the entire interval that you specify. If the interval start and end date don’t align with the specified granularity, the head and tail end of the response interval will contain partial data. Example: Day to get a daily breakdown of the request interval, where the day boundary is defined by the granularityTimeZone. | ||
* @param {string} [granularityTimeZone] An IANA-compatible time zone for determining the day boundary. Required when specifying a granularity value greater than Hour. The granularityTimeZone value must align with the offset of the specified interval value. For example, if the interval value uses Z notation, then granularityTimeZone must be UTC. If the interval value uses an offset, then granularityTimeZone must be an IANA-compatible time zone that matches the offset. Example: US/Pacific to compute day boundaries, accounting for daylight time savings, for US/Pacific zone. | ||
* @param {'B2B' | 'B2C' | 'All'} [buyerType] Filters the results by the buyer type that you specify, B2B (business to business) or B2C (business to customer). Example: B2B, if you want the response to include order metrics for only B2B buyers. | ||
* @param {string} [fulfillmentNetwork] Filters the results by the fulfillment network that you specify, MFN (merchant fulfillment network) or AFN (Amazon fulfillment network). Do not include this filter if you want the response to include order metrics for all fulfillment networks. Example: AFN, if you want the response to include order metrics for only Amazon fulfillment network. | ||
* @param {'Monday' | 'Sunday'} [firstDayOfWeek] Specifies the day that the week starts on when granularity=Week, either Monday or Sunday. Default: Monday. Example: Sunday, if you want the week to start on a Sunday. | ||
* @param {string} [asin] Filters the results by the ASIN that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all ASINs. Example: B0792R1RSN, if you want the response to include order metrics for only ASIN B0792R1RSN. | ||
* @param {string} [sku] Filters the results by the SKU that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all SKUs. Example: TestSKU, if you want the response to include order metrics for only SKU TestSKU. | ||
* @param {SalesApiGetOrderMetricsRequest} requestParameters Request parameters. | ||
* @param {*} [options] Override http request option. | ||
@@ -225,4 +217,4 @@ * @throws {RequiredError} | ||
*/ | ||
getOrderMetrics(marketplaceIds, interval, granularity, granularityTimeZone, buyerType, fulfillmentNetwork, firstDayOfWeek, asin, sku, options) { | ||
return SalesApiFp(this.configuration).getOrderMetrics(marketplaceIds, interval, granularity, granularityTimeZone, buyerType, fulfillmentNetwork, firstDayOfWeek, asin, sku, options).then((request) => request(this.axios, this.basePath)); | ||
getOrderMetrics(requestParameters, options) { | ||
return SalesApiFp(this.configuration).getOrderMetrics(requestParameters.marketplaceIds, requestParameters.interval, requestParameters.granularity, requestParameters.granularityTimeZone, requestParameters.buyerType, requestParameters.fulfillmentNetwork, requestParameters.firstDayOfWeek, requestParameters.asin, requestParameters.sku, options).then((request) => request(this.axios, this.basePath)); | ||
} | ||
@@ -229,0 +221,0 @@ } |
@@ -219,11 +219,3 @@ 'use strict'; | ||
* Returns aggregated order metrics for given interval, broken down by granularity, for given buyer type. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | .5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. | ||
* @param {Array<string>} marketplaceIds A list of marketplace identifiers. Example: ATVPDKIKX0DER indicates the US marketplace. | ||
* @param {string} interval A time interval used for selecting order metrics. This takes the form of two dates separated by two hyphens (first date is inclusive; second date is exclusive). Dates are in ISO8601 format and must represent absolute time (either Z notation or offset notation). Example: 2018-09-01T00:00:00-07:00--2018-09-04T00:00:00-07:00 requests order metrics for Sept 1st, 2nd and 3rd in the -07:00 zone. | ||
* @param {'Hour' | 'Day' | 'Week' | 'Month' | 'Year' | 'Total'} granularity The granularity of the grouping of order metrics, based on a unit of time. Specifying granularity=Hour results in a successful request only if the interval specified is less than or equal to 30 days from now. For all other granularities, the interval specified must be less or equal to 2 years from now. Specifying granularity=Total results in order metrics that are aggregated over the entire interval that you specify. If the interval start and end date don’t align with the specified granularity, the head and tail end of the response interval will contain partial data. Example: Day to get a daily breakdown of the request interval, where the day boundary is defined by the granularityTimeZone. | ||
* @param {string} [granularityTimeZone] An IANA-compatible time zone for determining the day boundary. Required when specifying a granularity value greater than Hour. The granularityTimeZone value must align with the offset of the specified interval value. For example, if the interval value uses Z notation, then granularityTimeZone must be UTC. If the interval value uses an offset, then granularityTimeZone must be an IANA-compatible time zone that matches the offset. Example: US/Pacific to compute day boundaries, accounting for daylight time savings, for US/Pacific zone. | ||
* @param {'B2B' | 'B2C' | 'All'} [buyerType] Filters the results by the buyer type that you specify, B2B (business to business) or B2C (business to customer). Example: B2B, if you want the response to include order metrics for only B2B buyers. | ||
* @param {string} [fulfillmentNetwork] Filters the results by the fulfillment network that you specify, MFN (merchant fulfillment network) or AFN (Amazon fulfillment network). Do not include this filter if you want the response to include order metrics for all fulfillment networks. Example: AFN, if you want the response to include order metrics for only Amazon fulfillment network. | ||
* @param {'Monday' | 'Sunday'} [firstDayOfWeek] Specifies the day that the week starts on when granularity=Week, either Monday or Sunday. Default: Monday. Example: Sunday, if you want the week to start on a Sunday. | ||
* @param {string} [asin] Filters the results by the ASIN that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all ASINs. Example: B0792R1RSN, if you want the response to include order metrics for only ASIN B0792R1RSN. | ||
* @param {string} [sku] Filters the results by the SKU that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all SKUs. Example: TestSKU, if you want the response to include order metrics for only SKU TestSKU. | ||
* @param {SalesApiGetOrderMetricsRequest} requestParameters Request parameters. | ||
* @param {*} [options] Override http request option. | ||
@@ -233,4 +225,4 @@ * @throws {RequiredError} | ||
*/ | ||
getOrderMetrics(marketplaceIds, interval, granularity, granularityTimeZone, buyerType, fulfillmentNetwork, firstDayOfWeek, asin, sku, options) { | ||
return SalesApiFp(this.configuration).getOrderMetrics(marketplaceIds, interval, granularity, granularityTimeZone, buyerType, fulfillmentNetwork, firstDayOfWeek, asin, sku, options).then((request) => request(this.axios, this.basePath)); | ||
getOrderMetrics(requestParameters, options) { | ||
return SalesApiFp(this.configuration).getOrderMetrics(requestParameters.marketplaceIds, requestParameters.interval, requestParameters.granularity, requestParameters.granularityTimeZone, requestParameters.buyerType, requestParameters.fulfillmentNetwork, requestParameters.firstDayOfWeek, requestParameters.asin, requestParameters.sku, options).then((request) => request(this.axios, this.basePath)); | ||
} | ||
@@ -237,0 +229,0 @@ } |
@@ -185,2 +185,63 @@ /** | ||
/** | ||
* Request parameters for getOrderMetrics operation in SalesApi. | ||
* @export | ||
* @interface SalesApiGetOrderMetricsRequest | ||
*/ | ||
export interface SalesApiGetOrderMetricsRequest { | ||
/** | ||
* A list of marketplace identifiers. Example: ATVPDKIKX0DER indicates the US marketplace. | ||
* @type {Array<string>} | ||
* @memberof SalesApiGetOrderMetrics | ||
*/ | ||
readonly marketplaceIds: Array<string>; | ||
/** | ||
* A time interval used for selecting order metrics. This takes the form of two dates separated by two hyphens (first date is inclusive; second date is exclusive). Dates are in ISO8601 format and must represent absolute time (either Z notation or offset notation). Example: 2018-09-01T00:00:00-07:00--2018-09-04T00:00:00-07:00 requests order metrics for Sept 1st, 2nd and 3rd in the -07:00 zone. | ||
* @type {string} | ||
* @memberof SalesApiGetOrderMetrics | ||
*/ | ||
readonly interval: string; | ||
/** | ||
* The granularity of the grouping of order metrics, based on a unit of time. Specifying granularity=Hour results in a successful request only if the interval specified is less than or equal to 30 days from now. For all other granularities, the interval specified must be less or equal to 2 years from now. Specifying granularity=Total results in order metrics that are aggregated over the entire interval that you specify. If the interval start and end date don’t align with the specified granularity, the head and tail end of the response interval will contain partial data. Example: Day to get a daily breakdown of the request interval, where the day boundary is defined by the granularityTimeZone. | ||
* @type {'Hour' | 'Day' | 'Week' | 'Month' | 'Year' | 'Total'} | ||
* @memberof SalesApiGetOrderMetrics | ||
*/ | ||
readonly granularity: 'Hour' | 'Day' | 'Week' | 'Month' | 'Year' | 'Total'; | ||
/** | ||
* An IANA-compatible time zone for determining the day boundary. Required when specifying a granularity value greater than Hour. The granularityTimeZone value must align with the offset of the specified interval value. For example, if the interval value uses Z notation, then granularityTimeZone must be UTC. If the interval value uses an offset, then granularityTimeZone must be an IANA-compatible time zone that matches the offset. Example: US/Pacific to compute day boundaries, accounting for daylight time savings, for US/Pacific zone. | ||
* @type {string} | ||
* @memberof SalesApiGetOrderMetrics | ||
*/ | ||
readonly granularityTimeZone?: string; | ||
/** | ||
* Filters the results by the buyer type that you specify, B2B (business to business) or B2C (business to customer). Example: B2B, if you want the response to include order metrics for only B2B buyers. | ||
* @type {'B2B' | 'B2C' | 'All'} | ||
* @memberof SalesApiGetOrderMetrics | ||
*/ | ||
readonly buyerType?: 'B2B' | 'B2C' | 'All'; | ||
/** | ||
* Filters the results by the fulfillment network that you specify, MFN (merchant fulfillment network) or AFN (Amazon fulfillment network). Do not include this filter if you want the response to include order metrics for all fulfillment networks. Example: AFN, if you want the response to include order metrics for only Amazon fulfillment network. | ||
* @type {string} | ||
* @memberof SalesApiGetOrderMetrics | ||
*/ | ||
readonly fulfillmentNetwork?: string; | ||
/** | ||
* Specifies the day that the week starts on when granularity=Week, either Monday or Sunday. Default: Monday. Example: Sunday, if you want the week to start on a Sunday. | ||
* @type {'Monday' | 'Sunday'} | ||
* @memberof SalesApiGetOrderMetrics | ||
*/ | ||
readonly firstDayOfWeek?: 'Monday' | 'Sunday'; | ||
/** | ||
* Filters the results by the ASIN that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all ASINs. Example: B0792R1RSN, if you want the response to include order metrics for only ASIN B0792R1RSN. | ||
* @type {string} | ||
* @memberof SalesApiGetOrderMetrics | ||
*/ | ||
readonly asin?: string; | ||
/** | ||
* Filters the results by the SKU that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all SKUs. Example: TestSKU, if you want the response to include order metrics for only SKU TestSKU. | ||
* @type {string} | ||
* @memberof SalesApiGetOrderMetrics | ||
*/ | ||
readonly sku?: string; | ||
} | ||
/** | ||
* SalesApi - object-oriented interface | ||
@@ -194,11 +255,3 @@ * @export | ||
* Returns aggregated order metrics for given interval, broken down by granularity, for given buyer type. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | .5 | 15 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation. | ||
* @param {Array<string>} marketplaceIds A list of marketplace identifiers. Example: ATVPDKIKX0DER indicates the US marketplace. | ||
* @param {string} interval A time interval used for selecting order metrics. This takes the form of two dates separated by two hyphens (first date is inclusive; second date is exclusive). Dates are in ISO8601 format and must represent absolute time (either Z notation or offset notation). Example: 2018-09-01T00:00:00-07:00--2018-09-04T00:00:00-07:00 requests order metrics for Sept 1st, 2nd and 3rd in the -07:00 zone. | ||
* @param {'Hour' | 'Day' | 'Week' | 'Month' | 'Year' | 'Total'} granularity The granularity of the grouping of order metrics, based on a unit of time. Specifying granularity=Hour results in a successful request only if the interval specified is less than or equal to 30 days from now. For all other granularities, the interval specified must be less or equal to 2 years from now. Specifying granularity=Total results in order metrics that are aggregated over the entire interval that you specify. If the interval start and end date don’t align with the specified granularity, the head and tail end of the response interval will contain partial data. Example: Day to get a daily breakdown of the request interval, where the day boundary is defined by the granularityTimeZone. | ||
* @param {string} [granularityTimeZone] An IANA-compatible time zone for determining the day boundary. Required when specifying a granularity value greater than Hour. The granularityTimeZone value must align with the offset of the specified interval value. For example, if the interval value uses Z notation, then granularityTimeZone must be UTC. If the interval value uses an offset, then granularityTimeZone must be an IANA-compatible time zone that matches the offset. Example: US/Pacific to compute day boundaries, accounting for daylight time savings, for US/Pacific zone. | ||
* @param {'B2B' | 'B2C' | 'All'} [buyerType] Filters the results by the buyer type that you specify, B2B (business to business) or B2C (business to customer). Example: B2B, if you want the response to include order metrics for only B2B buyers. | ||
* @param {string} [fulfillmentNetwork] Filters the results by the fulfillment network that you specify, MFN (merchant fulfillment network) or AFN (Amazon fulfillment network). Do not include this filter if you want the response to include order metrics for all fulfillment networks. Example: AFN, if you want the response to include order metrics for only Amazon fulfillment network. | ||
* @param {'Monday' | 'Sunday'} [firstDayOfWeek] Specifies the day that the week starts on when granularity=Week, either Monday or Sunday. Default: Monday. Example: Sunday, if you want the week to start on a Sunday. | ||
* @param {string} [asin] Filters the results by the ASIN that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all ASINs. Example: B0792R1RSN, if you want the response to include order metrics for only ASIN B0792R1RSN. | ||
* @param {string} [sku] Filters the results by the SKU that you specify. Specifying both ASIN and SKU returns an error. Do not include this filter if you want the response to include order metrics for all SKUs. Example: TestSKU, if you want the response to include order metrics for only SKU TestSKU. | ||
* @param {SalesApiGetOrderMetricsRequest} requestParameters Request parameters. | ||
* @param {*} [options] Override http request option. | ||
@@ -208,3 +261,3 @@ * @throws {RequiredError} | ||
*/ | ||
getOrderMetrics(marketplaceIds: Array<string>, interval: string, granularity: 'Hour' | 'Day' | 'Week' | 'Month' | 'Year' | 'Total', granularityTimeZone?: string, buyerType?: 'B2B' | 'B2C' | 'All', fulfillmentNetwork?: string, firstDayOfWeek?: 'Monday' | 'Sunday', asin?: string, sku?: string, options?: any): Promise<import("axios").AxiosResponse<GetOrderMetricsResponse>>; | ||
getOrderMetrics(requestParameters: SalesApiGetOrderMetricsRequest, options?: any): Promise<import("axios").AxiosResponse<GetOrderMetricsResponse>>; | ||
} |
@@ -5,3 +5,3 @@ { | ||
"description": "The Selling Partner API for Sales provides APIs related to sales performance.", | ||
"version": "0.2.1", | ||
"version": "1.0.0", | ||
"main": "dist/index.js", | ||
@@ -47,3 +47,3 @@ "module": "dist/index.es.js", | ||
"homepage": "https://github.com/bizon/selling-partner-api-sdk/tree/master/clients/sales-api-v1", | ||
"gitHead": "be777a70e0faca3ab2d3176b59d2dab16bb61f73" | ||
"gitHead": "2d5e1bd5ed0c947b314776b0cc9a5a3316c92f43" | ||
} |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1090
0
65656