@sp-api-sdk/vendor-shipments-api-v1 1.6.15
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/LICENSE +21 -0
- package/README.md +58 -0
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/src/api-model/api/vendor-shipping-api.js +119 -0
- package/dist/cjs/src/api-model/api.js +17 -0
- package/dist/cjs/src/api-model/base.js +62 -0
- package/dist/cjs/src/api-model/common.js +137 -0
- package/dist/cjs/src/api-model/configuration.js +42 -0
- package/dist/cjs/src/api-model/index.js +19 -0
- package/dist/cjs/src/api-model/models/address.js +15 -0
- package/dist/cjs/src/api-model/models/carton-reference-details.js +15 -0
- package/dist/cjs/src/api-model/models/carton.js +15 -0
- package/dist/cjs/src/api-model/models/container-identification.js +28 -0
- package/dist/cjs/src/api-model/models/container-item.js +15 -0
- package/dist/cjs/src/api-model/models/dimensions.js +27 -0
- package/dist/cjs/src/api-model/models/duration.js +25 -0
- package/dist/cjs/src/api-model/models/expiry.js +15 -0
- package/dist/cjs/src/api-model/models/import-details.js +29 -0
- package/dist/cjs/src/api-model/models/index.js +31 -0
- package/dist/cjs/src/api-model/models/item-details.js +27 -0
- package/dist/cjs/src/api-model/models/item-quantity.js +25 -0
- package/dist/cjs/src/api-model/models/item.js +15 -0
- package/dist/cjs/src/api-model/models/location.js +15 -0
- package/dist/cjs/src/api-model/models/model-error.js +15 -0
- package/dist/cjs/src/api-model/models/money.js +15 -0
- package/dist/cjs/src/api-model/models/pallet.js +15 -0
- package/dist/cjs/src/api-model/models/party-identification.js +15 -0
- package/dist/cjs/src/api-model/models/route.js +15 -0
- package/dist/cjs/src/api-model/models/shipment-confirmation.js +49 -0
- package/dist/cjs/src/api-model/models/shipment-measurements.js +15 -0
- package/dist/cjs/src/api-model/models/stop.js +26 -0
- package/dist/cjs/src/api-model/models/submit-shipment-confirmations-request.js +15 -0
- package/dist/cjs/src/api-model/models/submit-shipment-confirmations-response.js +15 -0
- package/dist/cjs/src/api-model/models/tax-registration-details.js +25 -0
- package/dist/cjs/src/api-model/models/transaction-reference.js +15 -0
- package/dist/cjs/src/api-model/models/transportation-details.js +26 -0
- package/dist/cjs/src/api-model/models/volume.js +27 -0
- package/dist/cjs/src/api-model/models/weight.js +27 -0
- package/dist/cjs/src/client.js +35 -0
- package/dist/cjs/src/error.js +10 -0
- package/dist/es/index.js +3 -0
- package/dist/es/src/api-model/api/vendor-shipping-api.js +111 -0
- package/dist/es/src/api-model/api.js +14 -0
- package/dist/es/src/api-model/base.js +56 -0
- package/dist/es/src/api-model/common.js +125 -0
- package/dist/es/src/api-model/configuration.js +38 -0
- package/dist/es/src/api-model/index.js +16 -0
- package/dist/es/src/api-model/models/address.js +14 -0
- package/dist/es/src/api-model/models/carton-reference-details.js +14 -0
- package/dist/es/src/api-model/models/carton.js +14 -0
- package/dist/es/src/api-model/models/container-identification.js +25 -0
- package/dist/es/src/api-model/models/container-item.js +14 -0
- package/dist/es/src/api-model/models/dimensions.js +24 -0
- package/dist/es/src/api-model/models/duration.js +22 -0
- package/dist/es/src/api-model/models/expiry.js +14 -0
- package/dist/es/src/api-model/models/import-details.js +26 -0
- package/dist/es/src/api-model/models/index.js +28 -0
- package/dist/es/src/api-model/models/item-details.js +24 -0
- package/dist/es/src/api-model/models/item-quantity.js +22 -0
- package/dist/es/src/api-model/models/item.js +14 -0
- package/dist/es/src/api-model/models/location.js +14 -0
- package/dist/es/src/api-model/models/model-error.js +14 -0
- package/dist/es/src/api-model/models/money.js +14 -0
- package/dist/es/src/api-model/models/pallet.js +14 -0
- package/dist/es/src/api-model/models/party-identification.js +14 -0
- package/dist/es/src/api-model/models/route.js +14 -0
- package/dist/es/src/api-model/models/shipment-confirmation.js +46 -0
- package/dist/es/src/api-model/models/shipment-measurements.js +14 -0
- package/dist/es/src/api-model/models/stop.js +23 -0
- package/dist/es/src/api-model/models/submit-shipment-confirmations-request.js +14 -0
- package/dist/es/src/api-model/models/submit-shipment-confirmations-response.js +14 -0
- package/dist/es/src/api-model/models/tax-registration-details.js +22 -0
- package/dist/es/src/api-model/models/transaction-reference.js +14 -0
- package/dist/es/src/api-model/models/transportation-details.js +23 -0
- package/dist/es/src/api-model/models/volume.js +24 -0
- package/dist/es/src/api-model/models/weight.js +24 -0
- package/dist/es/src/client.js +31 -0
- package/dist/es/src/error.js +6 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/src/api-model/api/vendor-shipping-api.d.ts +84 -0
- package/dist/types/src/api-model/api.d.ts +12 -0
- package/dist/types/src/api-model/base.d.ts +55 -0
- package/dist/types/src/api-model/common.d.ts +65 -0
- package/dist/types/src/api-model/configuration.d.ts +83 -0
- package/dist/types/src/api-model/index.d.ts +14 -0
- package/dist/types/src/api-model/models/address.d.ts +84 -0
- package/dist/types/src/api-model/models/carton-reference-details.d.ts +30 -0
- package/dist/types/src/api-model/models/carton.d.ts +58 -0
- package/dist/types/src/api-model/models/container-identification.d.ts +41 -0
- package/dist/types/src/api-model/models/container-item.d.ts +38 -0
- package/dist/types/src/api-model/models/dimensions.d.ts +52 -0
- package/dist/types/src/api-model/models/duration.d.ts +38 -0
- package/dist/types/src/api-model/models/expiry.d.ts +37 -0
- package/dist/types/src/api-model/models/import-details.d.ts +68 -0
- package/dist/types/src/api-model/models/index.d.ts +28 -0
- package/dist/types/src/api-model/models/item-details.d.ts +60 -0
- package/dist/types/src/api-model/models/item-quantity.d.ts +44 -0
- package/dist/types/src/api-model/models/item.d.ts +50 -0
- package/dist/types/src/api-model/models/location.d.ts +36 -0
- package/dist/types/src/api-model/models/model-error.d.ts +36 -0
- package/dist/types/src/api-model/models/money.d.ts +30 -0
- package/dist/types/src/api-model/models/pallet.d.ts +65 -0
- package/dist/types/src/api-model/models/party-identification.d.ts +38 -0
- package/dist/types/src/api-model/models/route.d.ts +25 -0
- package/dist/types/src/api-model/models/shipment-confirmation.d.ts +157 -0
- package/dist/types/src/api-model/models/shipment-measurements.d.ts +44 -0
- package/dist/types/src/api-model/models/stop.d.ts +52 -0
- package/dist/types/src/api-model/models/submit-shipment-confirmations-request.d.ts +25 -0
- package/dist/types/src/api-model/models/submit-shipment-confirmations-response.d.ts +31 -0
- package/dist/types/src/api-model/models/tax-registration-details.d.ts +38 -0
- package/dist/types/src/api-model/models/transaction-reference.d.ts +24 -0
- package/dist/types/src/api-model/models/transportation-details.d.ts +51 -0
- package/dist/types/src/api-model/models/volume.d.ts +40 -0
- package/dist/types/src/api-model/models/weight.d.ts +40 -0
- package/dist/types/src/client.d.ts +13 -0
- package/dist/types/src/error.d.ts +3 -0
- package/package.json +53 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Selling Partner API for Retail Procurement Shipments
|
|
6
|
+
* The Selling Partner API for Retail Procurement Shipments provides programmatic access to retail shipping data for vendors.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: v1
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Selling Partner API for Retail Procurement Shipments
|
|
6
|
+
* The Selling Partner API for Retail Procurement Shipments provides programmatic access to retail shipping data for vendors.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: v1
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.StopFunctionCodeEnum = void 0;
|
|
17
|
+
/**
|
|
18
|
+
* @export
|
|
19
|
+
* @enum {string}
|
|
20
|
+
*/
|
|
21
|
+
var StopFunctionCodeEnum;
|
|
22
|
+
(function (StopFunctionCodeEnum) {
|
|
23
|
+
StopFunctionCodeEnum["PortOfDischarge"] = "PortOfDischarge";
|
|
24
|
+
StopFunctionCodeEnum["FreightPayableAt"] = "FreightPayableAt";
|
|
25
|
+
StopFunctionCodeEnum["PortOfLoading"] = "PortOfLoading";
|
|
26
|
+
})(StopFunctionCodeEnum = exports.StopFunctionCodeEnum || (exports.StopFunctionCodeEnum = {}));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Selling Partner API for Retail Procurement Shipments
|
|
6
|
+
* The Selling Partner API for Retail Procurement Shipments provides programmatic access to retail shipping data for vendors.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: v1
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Selling Partner API for Retail Procurement Shipments
|
|
6
|
+
* The Selling Partner API for Retail Procurement Shipments provides programmatic access to retail shipping data for vendors.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: v1
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Selling Partner API for Retail Procurement Shipments
|
|
6
|
+
* The Selling Partner API for Retail Procurement Shipments provides programmatic access to retail shipping data for vendors.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: v1
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.TaxRegistrationDetailsTaxRegistrationTypeEnum = void 0;
|
|
17
|
+
/**
|
|
18
|
+
* @export
|
|
19
|
+
* @enum {string}
|
|
20
|
+
*/
|
|
21
|
+
var TaxRegistrationDetailsTaxRegistrationTypeEnum;
|
|
22
|
+
(function (TaxRegistrationDetailsTaxRegistrationTypeEnum) {
|
|
23
|
+
TaxRegistrationDetailsTaxRegistrationTypeEnum["Vat"] = "VAT";
|
|
24
|
+
TaxRegistrationDetailsTaxRegistrationTypeEnum["Gst"] = "GST";
|
|
25
|
+
})(TaxRegistrationDetailsTaxRegistrationTypeEnum = exports.TaxRegistrationDetailsTaxRegistrationTypeEnum || (exports.TaxRegistrationDetailsTaxRegistrationTypeEnum = {}));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Selling Partner API for Retail Procurement Shipments
|
|
6
|
+
* The Selling Partner API for Retail Procurement Shipments provides programmatic access to retail shipping data for vendors.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: v1
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Selling Partner API for Retail Procurement Shipments
|
|
6
|
+
* The Selling Partner API for Retail Procurement Shipments provides programmatic access to retail shipping data for vendors.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: v1
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.TransportationDetailsTransportationModeEnum = void 0;
|
|
17
|
+
/**
|
|
18
|
+
* @export
|
|
19
|
+
* @enum {string}
|
|
20
|
+
*/
|
|
21
|
+
var TransportationDetailsTransportationModeEnum;
|
|
22
|
+
(function (TransportationDetailsTransportationModeEnum) {
|
|
23
|
+
TransportationDetailsTransportationModeEnum["Road"] = "Road";
|
|
24
|
+
TransportationDetailsTransportationModeEnum["Air"] = "Air";
|
|
25
|
+
TransportationDetailsTransportationModeEnum["Ocean"] = "Ocean";
|
|
26
|
+
})(TransportationDetailsTransportationModeEnum = exports.TransportationDetailsTransportationModeEnum || (exports.TransportationDetailsTransportationModeEnum = {}));
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Selling Partner API for Retail Procurement Shipments
|
|
6
|
+
* The Selling Partner API for Retail Procurement Shipments provides programmatic access to retail shipping data for vendors.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: v1
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.VolumeUnitOfMeasureEnum = void 0;
|
|
17
|
+
/**
|
|
18
|
+
* @export
|
|
19
|
+
* @enum {string}
|
|
20
|
+
*/
|
|
21
|
+
var VolumeUnitOfMeasureEnum;
|
|
22
|
+
(function (VolumeUnitOfMeasureEnum) {
|
|
23
|
+
VolumeUnitOfMeasureEnum["CuFt"] = "CuFt";
|
|
24
|
+
VolumeUnitOfMeasureEnum["CuIn"] = "CuIn";
|
|
25
|
+
VolumeUnitOfMeasureEnum["CuM"] = "CuM";
|
|
26
|
+
VolumeUnitOfMeasureEnum["CuY"] = "CuY";
|
|
27
|
+
})(VolumeUnitOfMeasureEnum = exports.VolumeUnitOfMeasureEnum || (exports.VolumeUnitOfMeasureEnum = {}));
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Selling Partner API for Retail Procurement Shipments
|
|
6
|
+
* The Selling Partner API for Retail Procurement Shipments provides programmatic access to retail shipping data for vendors.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: v1
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.WeightUnitOfMeasureEnum = void 0;
|
|
17
|
+
/**
|
|
18
|
+
* @export
|
|
19
|
+
* @enum {string}
|
|
20
|
+
*/
|
|
21
|
+
var WeightUnitOfMeasureEnum;
|
|
22
|
+
(function (WeightUnitOfMeasureEnum) {
|
|
23
|
+
WeightUnitOfMeasureEnum["G"] = "G";
|
|
24
|
+
WeightUnitOfMeasureEnum["Kg"] = "Kg";
|
|
25
|
+
WeightUnitOfMeasureEnum["Oz"] = "Oz";
|
|
26
|
+
WeightUnitOfMeasureEnum["Lb"] = "Lb";
|
|
27
|
+
})(WeightUnitOfMeasureEnum = exports.WeightUnitOfMeasureEnum || (exports.WeightUnitOfMeasureEnum = {}));
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VendorShipmentsApiClient = exports.RATE_LIMITS = void 0;
|
|
4
|
+
/* eslint-disable prefer-regex-literals */
|
|
5
|
+
const common_1 = require("@sp-api-sdk/common");
|
|
6
|
+
const api_model_1 = require("./api-model");
|
|
7
|
+
const error_1 = require("./error");
|
|
8
|
+
exports.RATE_LIMITS = [
|
|
9
|
+
{
|
|
10
|
+
method: 'post',
|
|
11
|
+
urlRegex: new RegExp('^/vendor/shipping/v1/shipmentConfirmations$'),
|
|
12
|
+
rate: 10,
|
|
13
|
+
burst: 10,
|
|
14
|
+
},
|
|
15
|
+
];
|
|
16
|
+
class VendorShipmentsApiClient extends api_model_1.VendorShippingApi {
|
|
17
|
+
constructor(parameters) {
|
|
18
|
+
const region = common_1.awsRegionByCode[parameters.region] ?? parameters.region;
|
|
19
|
+
const { rateLimiting, ...clientParameters } = parameters;
|
|
20
|
+
const axiosParameters = { ...clientParameters, region };
|
|
21
|
+
if (rateLimiting?.retry) {
|
|
22
|
+
axiosParameters.rateLimits = exports.RATE_LIMITS;
|
|
23
|
+
axiosParameters.onRetry = rateLimiting.onRetry;
|
|
24
|
+
}
|
|
25
|
+
const axiosInstance = (0, common_1.createAxiosInstance)(axiosParameters);
|
|
26
|
+
const configuration = new api_model_1.Configuration();
|
|
27
|
+
const environment = parameters.sandbox ? 'sandbox' : 'production';
|
|
28
|
+
const endpoint = common_1.endpoints[environment][region];
|
|
29
|
+
if (!endpoint) {
|
|
30
|
+
throw new error_1.VendorShipmentsApiError(`Unknown region : ${region}`);
|
|
31
|
+
}
|
|
32
|
+
super(configuration, endpoint, axiosInstance);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.VendorShipmentsApiClient = VendorShipmentsApiClient;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VendorShipmentsApiError = void 0;
|
|
4
|
+
class VendorShipmentsApiError extends Error {
|
|
5
|
+
constructor(message) {
|
|
6
|
+
super(message);
|
|
7
|
+
this.name = 'VendorShipmentsApiError';
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.VendorShipmentsApiError = VendorShipmentsApiError;
|
package/dist/es/index.js
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Selling Partner API for Retail Procurement Shipments
|
|
5
|
+
* The Selling Partner API for Retail Procurement Shipments provides programmatic access to retail shipping data for vendors.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: v1
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import globalAxios from 'axios';
|
|
15
|
+
// Some imports not used depending on template conditions
|
|
16
|
+
// @ts-ignore
|
|
17
|
+
import { DUMMY_BASE_URL, assertParamExists, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
import { BASE_PATH, BaseAPI } from '../base';
|
|
20
|
+
/**
|
|
21
|
+
* VendorShippingApi - axios parameter creator
|
|
22
|
+
* @export
|
|
23
|
+
*/
|
|
24
|
+
export const VendorShippingApiAxiosParamCreator = function (configuration) {
|
|
25
|
+
return {
|
|
26
|
+
/**
|
|
27
|
+
* Submits one or more shipment confirmations for vendor orders. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
28
|
+
* @param {SubmitShipmentConfirmationsRequest} body
|
|
29
|
+
* @param {*} [options] Override http request option.
|
|
30
|
+
* @throws {RequiredError}
|
|
31
|
+
*/
|
|
32
|
+
submitShipmentConfirmations: async (body, options = {}) => {
|
|
33
|
+
// verify required parameter 'body' is not null or undefined
|
|
34
|
+
assertParamExists('submitShipmentConfirmations', 'body', body);
|
|
35
|
+
const localVarPath = `/vendor/shipping/v1/shipmentConfirmations`;
|
|
36
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
37
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
38
|
+
let baseOptions;
|
|
39
|
+
if (configuration) {
|
|
40
|
+
baseOptions = configuration.baseOptions;
|
|
41
|
+
}
|
|
42
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
43
|
+
const localVarHeaderParameter = {};
|
|
44
|
+
const localVarQueryParameter = {};
|
|
45
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
46
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
|
|
47
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
48
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
49
|
+
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
|
|
50
|
+
return {
|
|
51
|
+
url: toPathString(localVarUrlObj),
|
|
52
|
+
options: localVarRequestOptions,
|
|
53
|
+
};
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* VendorShippingApi - functional programming interface
|
|
59
|
+
* @export
|
|
60
|
+
*/
|
|
61
|
+
export const VendorShippingApiFp = function (configuration) {
|
|
62
|
+
const localVarAxiosParamCreator = VendorShippingApiAxiosParamCreator(configuration);
|
|
63
|
+
return {
|
|
64
|
+
/**
|
|
65
|
+
* Submits one or more shipment confirmations for vendor orders. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
66
|
+
* @param {SubmitShipmentConfirmationsRequest} body
|
|
67
|
+
* @param {*} [options] Override http request option.
|
|
68
|
+
* @throws {RequiredError}
|
|
69
|
+
*/
|
|
70
|
+
async submitShipmentConfirmations(body, options) {
|
|
71
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.submitShipmentConfirmations(body, options);
|
|
72
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* VendorShippingApi - factory interface
|
|
78
|
+
* @export
|
|
79
|
+
*/
|
|
80
|
+
export const VendorShippingApiFactory = function (configuration, basePath, axios) {
|
|
81
|
+
const localVarFp = VendorShippingApiFp(configuration);
|
|
82
|
+
return {
|
|
83
|
+
/**
|
|
84
|
+
* Submits one or more shipment confirmations for vendor orders. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
85
|
+
* @param {SubmitShipmentConfirmationsRequest} body
|
|
86
|
+
* @param {*} [options] Override http request option.
|
|
87
|
+
* @throws {RequiredError}
|
|
88
|
+
*/
|
|
89
|
+
submitShipmentConfirmations(body, options) {
|
|
90
|
+
return localVarFp.submitShipmentConfirmations(body, options).then((request) => request(axios, basePath));
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* VendorShippingApi - object-oriented interface
|
|
96
|
+
* @export
|
|
97
|
+
* @class VendorShippingApi
|
|
98
|
+
* @extends {BaseAPI}
|
|
99
|
+
*/
|
|
100
|
+
export class VendorShippingApi extends BaseAPI {
|
|
101
|
+
/**
|
|
102
|
+
* Submits one or more shipment confirmations for vendor orders. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
103
|
+
* @param {VendorShippingApiSubmitShipmentConfirmationsRequest} requestParameters Request parameters.
|
|
104
|
+
* @param {*} [options] Override http request option.
|
|
105
|
+
* @throws {RequiredError}
|
|
106
|
+
* @memberof VendorShippingApi
|
|
107
|
+
*/
|
|
108
|
+
submitShipmentConfirmations(requestParameters, options) {
|
|
109
|
+
return VendorShippingApiFp(this.configuration).submitShipmentConfirmations(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Selling Partner API for Retail Procurement Shipments
|
|
5
|
+
* The Selling Partner API for Retail Procurement Shipments provides programmatic access to retail shipping data for vendors.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: v1
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
export * from './api/vendor-shipping-api';
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Selling Partner API for Retail Procurement Shipments
|
|
5
|
+
* The Selling Partner API for Retail Procurement Shipments provides programmatic access to retail shipping data for vendors.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: v1
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
// Some imports not used depending on template conditions
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
import globalAxios from 'axios';
|
|
17
|
+
export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @export
|
|
21
|
+
*/
|
|
22
|
+
export const COLLECTION_FORMATS = {
|
|
23
|
+
csv: ",",
|
|
24
|
+
ssv: " ",
|
|
25
|
+
tsv: "\t",
|
|
26
|
+
pipes: "|",
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @export
|
|
31
|
+
* @class BaseAPI
|
|
32
|
+
*/
|
|
33
|
+
export class BaseAPI {
|
|
34
|
+
constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
|
|
35
|
+
this.basePath = basePath;
|
|
36
|
+
this.axios = axios;
|
|
37
|
+
if (configuration) {
|
|
38
|
+
this.configuration = configuration;
|
|
39
|
+
this.basePath = configuration.basePath || this.basePath;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @export
|
|
47
|
+
* @class RequiredError
|
|
48
|
+
* @extends {Error}
|
|
49
|
+
*/
|
|
50
|
+
export class RequiredError extends Error {
|
|
51
|
+
constructor(field, msg) {
|
|
52
|
+
super(msg);
|
|
53
|
+
this.field = field;
|
|
54
|
+
this.name = "RequiredError";
|
|
55
|
+
}
|
|
56
|
+
}
|