@sp-api-sdk/shipping-api-v2 2.1.4 → 2.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/api-model/api/shipping-api.js +0 -89
- package/dist/cjs/api-model/base.js +0 -19
- package/dist/cjs/api-model/common.js +0 -37
- package/dist/cjs/api-model/configuration.js +0 -17
- package/dist/cjs/api-model/models/access-point-type.js +0 -2
- package/dist/cjs/api-model/models/account-status.js +0 -2
- package/dist/cjs/api-model/models/account-type.js +0 -2
- package/dist/cjs/api-model/models/channel-type.js +0 -2
- package/dist/cjs/api-model/models/claim-reason.js +0 -2
- package/dist/cjs/api-model/models/detail-codes.js +0 -2
- package/dist/cjs/api-model/models/document-format.js +0 -2
- package/dist/cjs/api-model/models/document-type.js +0 -2
- package/dist/cjs/api-model/models/event-code.js +0 -2
- package/dist/cjs/api-model/models/generation-status.js +0 -2
- package/dist/cjs/api-model/models/ineligibility-reason-code.js +0 -2
- package/dist/cjs/api-model/models/input-type.js +0 -2
- package/dist/cjs/api-model/models/label-attribute.js +0 -2
- package/dist/cjs/api-model/models/ndr-action.js +0 -2
- package/dist/cjs/api-model/models/payment-type.js +0 -2
- package/dist/cjs/api-model/models/rate-item-id.js +0 -2
- package/dist/cjs/api-model/models/rate-item-type.js +0 -2
- package/dist/cjs/api-model/models/settlement-type.js +0 -2
- package/dist/cjs/api-model/models/shipment-type.js +0 -2
- package/dist/cjs/api-model/models/status.js +0 -2
- package/dist/cjs/api-model/models/tax-type.js +0 -2
- package/dist/es/api-model/api/shipping-api.js +0 -89
- package/dist/es/api-model/base.js +0 -19
- package/dist/es/api-model/common.js +0 -37
- package/dist/es/api-model/configuration.js +0 -17
- package/dist/es/api-model/models/access-point-type.js +0 -2
- package/dist/es/api-model/models/account-status.js +0 -2
- package/dist/es/api-model/models/account-type.js +0 -2
- package/dist/es/api-model/models/channel-type.js +0 -2
- package/dist/es/api-model/models/claim-reason.js +0 -2
- package/dist/es/api-model/models/detail-codes.js +0 -2
- package/dist/es/api-model/models/document-format.js +0 -2
- package/dist/es/api-model/models/document-type.js +0 -2
- package/dist/es/api-model/models/event-code.js +0 -2
- package/dist/es/api-model/models/generation-status.js +0 -2
- package/dist/es/api-model/models/ineligibility-reason-code.js +0 -2
- package/dist/es/api-model/models/input-type.js +0 -2
- package/dist/es/api-model/models/label-attribute.js +0 -2
- package/dist/es/api-model/models/ndr-action.js +0 -2
- package/dist/es/api-model/models/payment-type.js +0 -2
- package/dist/es/api-model/models/rate-item-id.js +0 -2
- package/dist/es/api-model/models/rate-item-type.js +0 -2
- package/dist/es/api-model/models/settlement-type.js +0 -2
- package/dist/es/api-model/models/shipment-type.js +0 -2
- package/dist/es/api-model/models/status.js +0 -2
- package/dist/es/api-model/models/tax-type.js +0 -2
- package/dist/types/api-model/api/shipping-api.d.ts +0 -235
- package/dist/types/api-model/base.d.ts +0 -24
- package/dist/types/api-model/common.d.ts +0 -37
- package/dist/types/api-model/configuration.d.ts +0 -17
- package/dist/types/api-model/models/access-point-details.d.ts +0 -4
- package/dist/types/api-model/models/access-point-type.d.ts +0 -2
- package/dist/types/api-model/models/access-point.d.ts +0 -31
- package/dist/types/api-model/models/accessibility-attributes.d.ts +0 -6
- package/dist/types/api-model/models/account-status.d.ts +0 -2
- package/dist/types/api-model/models/account-type.d.ts +0 -2
- package/dist/types/api-model/models/active-account.d.ts +0 -6
- package/dist/types/api-model/models/address.d.ts +0 -29
- package/dist/types/api-model/models/amazon-order-details.d.ts +0 -4
- package/dist/types/api-model/models/amazon-shipment-details.d.ts +0 -4
- package/dist/types/api-model/models/available-value-added-service-group.d.ts +0 -10
- package/dist/types/api-model/models/benefits.d.ts +0 -6
- package/dist/types/api-model/models/cancel-shipment-response.d.ts +0 -4
- package/dist/types/api-model/models/carrier-account-attribute.d.ts +0 -8
- package/dist/types/api-model/models/carrier-account-input.d.ts +0 -21
- package/dist/types/api-model/models/carrier-account.d.ts +0 -6
- package/dist/types/api-model/models/carrier.d.ts +0 -6
- package/dist/types/api-model/models/channel-details.d.ts +0 -17
- package/dist/types/api-model/models/channel-type.d.ts +0 -2
- package/dist/types/api-model/models/charge-component.d.ts +0 -9
- package/dist/types/api-model/models/claim-reason.d.ts +0 -2
- package/dist/types/api-model/models/client-reference-detail.d.ts +0 -6
- package/dist/types/api-model/models/collect-on-delivery.d.ts +0 -7
- package/dist/types/api-model/models/collection-forms-history-record.d.ts +0 -18
- package/dist/types/api-model/models/collections-form-document.d.ts +0 -6
- package/dist/types/api-model/models/create-claim-request.d.ts +0 -23
- package/dist/types/api-model/models/create-claim-response.d.ts +0 -4
- package/dist/types/api-model/models/currency.d.ts +0 -6
- package/dist/types/api-model/models/dangerous-goods-details.d.ts +0 -10
- package/dist/types/api-model/models/date-range.d.ts +0 -6
- package/dist/types/api-model/models/detail-codes.d.ts +0 -2
- package/dist/types/api-model/models/dimensions.d.ts +0 -10
- package/dist/types/api-model/models/direct-fulfillment-item-identifiers.d.ts +0 -6
- package/dist/types/api-model/models/direct-purchase-request.d.ts +0 -29
- package/dist/types/api-model/models/direct-purchase-response.d.ts +0 -7
- package/dist/types/api-model/models/direct-purchase-result.d.ts +0 -6
- package/dist/types/api-model/models/document-format.d.ts +0 -2
- package/dist/types/api-model/models/document-size.d.ts +0 -8
- package/dist/types/api-model/models/document-type.d.ts +0 -2
- package/dist/types/api-model/models/error-list.d.ts +0 -4
- package/dist/types/api-model/models/event-code.d.ts +0 -2
- package/dist/types/api-model/models/event.d.ts +0 -19
- package/dist/types/api-model/models/exception-operating-hours.d.ts +0 -12
- package/dist/types/api-model/models/excluded-benefit.d.ts +0 -6
- package/dist/types/api-model/models/generate-collection-form-request.d.ts +0 -11
- package/dist/types/api-model/models/generate-collection-form-response.d.ts +0 -7
- package/dist/types/api-model/models/generation-status.d.ts +0 -2
- package/dist/types/api-model/models/geocode.d.ts +0 -6
- package/dist/types/api-model/models/get-access-points-response.d.ts +0 -7
- package/dist/types/api-model/models/get-access-points-result.d.ts +0 -4
- package/dist/types/api-model/models/get-additional-inputs-response.d.ts +0 -4
- package/dist/types/api-model/models/get-carrier-account-form-inputs-response.d.ts +0 -4
- package/dist/types/api-model/models/get-carrier-accounts-request.d.ts +0 -4
- package/dist/types/api-model/models/get-carrier-accounts-response.d.ts +0 -4
- package/dist/types/api-model/models/get-collection-form-history-request.d.ts +0 -18
- package/dist/types/api-model/models/get-collection-form-history-response.d.ts +0 -6
- package/dist/types/api-model/models/get-collection-form-response.d.ts +0 -7
- package/dist/types/api-model/models/get-rates-request.d.ts +0 -52
- package/dist/types/api-model/models/get-rates-response.d.ts +0 -7
- package/dist/types/api-model/models/get-rates-result.d.ts +0 -8
- package/dist/types/api-model/models/get-shipment-documents-response.d.ts +0 -7
- package/dist/types/api-model/models/get-shipment-documents-result.d.ts +0 -14
- package/dist/types/api-model/models/get-tracking-response.d.ts +0 -7
- package/dist/types/api-model/models/get-tracking-result.d.ts +0 -15
- package/dist/types/api-model/models/get-unmanifested-shipments-request.d.ts +0 -4
- package/dist/types/api-model/models/get-unmanifested-shipments-response.d.ts +0 -4
- package/dist/types/api-model/models/goods-owner.d.ts +0 -4
- package/dist/types/api-model/models/ineligibility-reason-code.d.ts +0 -2
- package/dist/types/api-model/models/ineligibility-reason.d.ts +0 -9
- package/dist/types/api-model/models/ineligible-rate.d.ts +0 -12
- package/dist/types/api-model/models/input-type.d.ts +0 -2
- package/dist/types/api-model/models/invoice-details.d.ts +0 -6
- package/dist/types/api-model/models/item.d.ts +0 -44
- package/dist/types/api-model/models/label-attribute.d.ts +0 -2
- package/dist/types/api-model/models/link-carrier-account-request.d.ts +0 -10
- package/dist/types/api-model/models/link-carrier-account-response.d.ts +0 -9
- package/dist/types/api-model/models/linkable-account-type.d.ts +0 -9
- package/dist/types/api-model/models/linkable-carrier.d.ts +0 -6
- package/dist/types/api-model/models/liquid-volume.d.ts +0 -6
- package/dist/types/api-model/models/location.d.ts +0 -10
- package/dist/types/api-model/models/model-error.d.ts +0 -8
- package/dist/types/api-model/models/ndr-action.d.ts +0 -2
- package/dist/types/api-model/models/ndr-request-data.d.ts +0 -6
- package/dist/types/api-model/models/one-click-shipment-request.d.ts +0 -55
- package/dist/types/api-model/models/one-click-shipment-response.d.ts +0 -7
- package/dist/types/api-model/models/one-click-shipment-result.d.ts +0 -26
- package/dist/types/api-model/models/one-click-shipment-value-added-service.d.ts +0 -9
- package/dist/types/api-model/models/operating-hours.d.ts +0 -14
- package/dist/types/api-model/models/package-document-detail.d.ts +0 -8
- package/dist/types/api-model/models/package-document.d.ts +0 -14
- package/dist/types/api-model/models/package.d.ts +0 -27
- package/dist/types/api-model/models/payment-type.d.ts +0 -2
- package/dist/types/api-model/models/print-option.d.ts +0 -10
- package/dist/types/api-model/models/promise.d.ts +0 -12
- package/dist/types/api-model/models/purchase-shipment-request.d.ts +0 -15
- package/dist/types/api-model/models/purchase-shipment-response.d.ts +0 -7
- package/dist/types/api-model/models/purchase-shipment-result.d.ts +0 -16
- package/dist/types/api-model/models/rate-item-id.d.ts +0 -2
- package/dist/types/api-model/models/rate-item-type.d.ts +0 -2
- package/dist/types/api-model/models/rate-item.d.ts +0 -19
- package/dist/types/api-model/models/rate.d.ts +0 -45
- package/dist/types/api-model/models/requested-document-specification.d.ts +0 -25
- package/dist/types/api-model/models/requested-label-customization.d.ts +0 -4
- package/dist/types/api-model/models/requested-value-added-service.d.ts +0 -4
- package/dist/types/api-model/models/service-selection.d.ts +0 -4
- package/dist/types/api-model/models/service.d.ts +0 -6
- package/dist/types/api-model/models/settlement-type.d.ts +0 -2
- package/dist/types/api-model/models/shipment-type.d.ts +0 -2
- package/dist/types/api-model/models/shipper-instruction.d.ts +0 -4
- package/dist/types/api-model/models/status.d.ts +0 -2
- package/dist/types/api-model/models/submit-ndr-feedback-request.d.ts +0 -14
- package/dist/types/api-model/models/supported-document-detail.d.ts +0 -9
- package/dist/types/api-model/models/supported-document-specification.d.ts +0 -14
- package/dist/types/api-model/models/tax-detail.d.ts +0 -9
- package/dist/types/api-model/models/tax-type.d.ts +0 -2
- package/dist/types/api-model/models/time-of-day.d.ts +0 -8
- package/dist/types/api-model/models/time-window.d.ts +0 -6
- package/dist/types/api-model/models/tracking-detail-codes.d.ts +0 -6
- package/dist/types/api-model/models/tracking-summary.d.ts +0 -12
- package/dist/types/api-model/models/unlink-carrier-account-request.d.ts +0 -6
- package/dist/types/api-model/models/unlink-carrier-account-response.d.ts +0 -4
- package/dist/types/api-model/models/unmanifested-carrier-information.d.ts +0 -8
- package/dist/types/api-model/models/unmanifested-shipment-location.d.ts +0 -9
- package/dist/types/api-model/models/validation-metadata.d.ts +0 -8
- package/dist/types/api-model/models/value-added-service-details.d.ts +0 -7
- package/dist/types/api-model/models/value-added-service.d.ts +0 -11
- package/dist/types/api-model/models/weight.d.ts +0 -6
- package/package.json +25 -4
|
@@ -16,8 +16,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
16
16
|
exports.IneligibilityReasonCode = void 0;
|
|
17
17
|
/**
|
|
18
18
|
* Reasons that make a shipment service offering ineligible.
|
|
19
|
-
* @export
|
|
20
|
-
* @enum {string}
|
|
21
19
|
*/
|
|
22
20
|
exports.IneligibilityReasonCode = {
|
|
23
21
|
NoCoverage: 'NO_COVERAGE',
|
|
@@ -16,8 +16,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
16
16
|
exports.LabelAttribute = void 0;
|
|
17
17
|
/**
|
|
18
18
|
* Enumerates the attributes supported to be printed on a shipping label. The values for these attributes are retrieved from GetRates/OneClickShipment request
|
|
19
|
-
* @export
|
|
20
|
-
* @enum {string}
|
|
21
19
|
*/
|
|
22
20
|
exports.LabelAttribute = {
|
|
23
21
|
PackageClientReferenceId: 'PACKAGE_CLIENT_REFERENCE_ID',
|
|
@@ -16,8 +16,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
16
16
|
exports.NdrAction = void 0;
|
|
17
17
|
/**
|
|
18
18
|
* The type of NDR action shipper wants to take for a particular shipment.
|
|
19
|
-
* @export
|
|
20
|
-
* @enum {string}
|
|
21
19
|
*/
|
|
22
20
|
exports.NdrAction = {
|
|
23
21
|
Reschedule: 'RESCHEDULE',
|
|
@@ -16,8 +16,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
16
16
|
exports.SettlementType = void 0;
|
|
17
17
|
/**
|
|
18
18
|
* Type of settlement the shipper wants to receive for a particular shipment.
|
|
19
|
-
* @export
|
|
20
|
-
* @enum {string}
|
|
21
19
|
*/
|
|
22
20
|
exports.SettlementType = {
|
|
23
21
|
Refund: 'REFUND',
|
|
@@ -19,7 +19,6 @@ import { DUMMY_BASE_URL, assertParamExists, setSearchParams, serializeDataIfNeed
|
|
|
19
19
|
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, operationServerMap } from '../base';
|
|
20
20
|
/**
|
|
21
21
|
* ShippingApi - axios parameter creator
|
|
22
|
-
* @export
|
|
23
22
|
*/
|
|
24
23
|
export const ShippingApiAxiosParamCreator = function (configuration) {
|
|
25
24
|
return {
|
|
@@ -748,7 +747,6 @@ export const ShippingApiAxiosParamCreator = function (configuration) {
|
|
|
748
747
|
};
|
|
749
748
|
/**
|
|
750
749
|
* ShippingApi - functional programming interface
|
|
751
|
-
* @export
|
|
752
750
|
*/
|
|
753
751
|
export const ShippingApiFp = function (configuration) {
|
|
754
752
|
const localVarAxiosParamCreator = ShippingApiAxiosParamCreator(configuration);
|
|
@@ -1030,7 +1028,6 @@ export const ShippingApiFp = function (configuration) {
|
|
|
1030
1028
|
};
|
|
1031
1029
|
/**
|
|
1032
1030
|
* ShippingApi - factory interface
|
|
1033
|
-
* @export
|
|
1034
1031
|
*/
|
|
1035
1032
|
export const ShippingApiFactory = function (configuration, basePath, axios) {
|
|
1036
1033
|
const localVarFp = ShippingApiFp(configuration);
|
|
@@ -1219,9 +1216,6 @@ export const ShippingApiFactory = function (configuration, basePath, axios) {
|
|
|
1219
1216
|
};
|
|
1220
1217
|
/**
|
|
1221
1218
|
* ShippingApi - object-oriented interface
|
|
1222
|
-
* @export
|
|
1223
|
-
* @class ShippingApi
|
|
1224
|
-
* @extends {BaseAPI}
|
|
1225
1219
|
*/
|
|
1226
1220
|
export class ShippingApi extends BaseAPI {
|
|
1227
1221
|
/**
|
|
@@ -1229,7 +1223,6 @@ export class ShippingApi extends BaseAPI {
|
|
|
1229
1223
|
* @param {ShippingApiCancelShipmentRequest} requestParameters Request parameters.
|
|
1230
1224
|
* @param {*} [options] Override http request option.
|
|
1231
1225
|
* @throws {RequiredError}
|
|
1232
|
-
* @memberof ShippingApi
|
|
1233
1226
|
*/
|
|
1234
1227
|
cancelShipment(requestParameters, options) {
|
|
1235
1228
|
return ShippingApiFp(this.configuration).cancelShipment(requestParameters.shipmentId, requestParameters.xAmznShippingBusinessId, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -1239,7 +1232,6 @@ export class ShippingApi extends BaseAPI {
|
|
|
1239
1232
|
* @param {ShippingApiCreateClaimRequest} requestParameters Request parameters.
|
|
1240
1233
|
* @param {*} [options] Override http request option.
|
|
1241
1234
|
* @throws {RequiredError}
|
|
1242
|
-
* @memberof ShippingApi
|
|
1243
1235
|
*/
|
|
1244
1236
|
createClaim(requestParameters, options) {
|
|
1245
1237
|
return ShippingApiFp(this.configuration).createClaim(requestParameters.body, requestParameters.xAmznShippingBusinessId, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -1249,7 +1241,6 @@ export class ShippingApi extends BaseAPI {
|
|
|
1249
1241
|
* @param {ShippingApiDirectPurchaseShipmentRequest} requestParameters Request parameters.
|
|
1250
1242
|
* @param {*} [options] Override http request option.
|
|
1251
1243
|
* @throws {RequiredError}
|
|
1252
|
-
* @memberof ShippingApi
|
|
1253
1244
|
*/
|
|
1254
1245
|
directPurchaseShipment(requestParameters, options) {
|
|
1255
1246
|
return ShippingApiFp(this.configuration).directPurchaseShipment(requestParameters.body, requestParameters.xAmznIdempotencyKey, requestParameters.locale, requestParameters.xAmznShippingBusinessId, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -1259,7 +1250,6 @@ export class ShippingApi extends BaseAPI {
|
|
|
1259
1250
|
* @param {ShippingApiGenerateCollectionFormRequest} requestParameters Request parameters.
|
|
1260
1251
|
* @param {*} [options] Override http request option.
|
|
1261
1252
|
* @throws {RequiredError}
|
|
1262
|
-
* @memberof ShippingApi
|
|
1263
1253
|
*/
|
|
1264
1254
|
generateCollectionForm(requestParameters, options) {
|
|
1265
1255
|
return ShippingApiFp(this.configuration).generateCollectionForm(requestParameters.body, requestParameters.xAmznIdempotencyKey, requestParameters.xAmznShippingBusinessId, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -1269,7 +1259,6 @@ export class ShippingApi extends BaseAPI {
|
|
|
1269
1259
|
* @param {ShippingApiGetAccessPointsRequest} requestParameters Request parameters.
|
|
1270
1260
|
* @param {*} [options] Override http request option.
|
|
1271
1261
|
* @throws {RequiredError}
|
|
1272
|
-
* @memberof ShippingApi
|
|
1273
1262
|
*/
|
|
1274
1263
|
getAccessPoints(requestParameters, options) {
|
|
1275
1264
|
return ShippingApiFp(this.configuration).getAccessPoints(requestParameters.accessPointTypes, requestParameters.countryCode, requestParameters.postalCode, requestParameters.xAmznShippingBusinessId, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -1279,7 +1268,6 @@ export class ShippingApi extends BaseAPI {
|
|
|
1279
1268
|
* @param {ShippingApiGetAdditionalInputsRequest} requestParameters Request parameters.
|
|
1280
1269
|
* @param {*} [options] Override http request option.
|
|
1281
1270
|
* @throws {RequiredError}
|
|
1282
|
-
* @memberof ShippingApi
|
|
1283
1271
|
*/
|
|
1284
1272
|
getAdditionalInputs(requestParameters, options) {
|
|
1285
1273
|
return ShippingApiFp(this.configuration).getAdditionalInputs(requestParameters.requestToken, requestParameters.rateId, requestParameters.xAmznShippingBusinessId, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -1289,7 +1277,6 @@ export class ShippingApi extends BaseAPI {
|
|
|
1289
1277
|
* @param {ShippingApiGetCarrierAccountFormInputsRequest} requestParameters Request parameters.
|
|
1290
1278
|
* @param {*} [options] Override http request option.
|
|
1291
1279
|
* @throws {RequiredError}
|
|
1292
|
-
* @memberof ShippingApi
|
|
1293
1280
|
*/
|
|
1294
1281
|
getCarrierAccountFormInputs(requestParameters = {}, options) {
|
|
1295
1282
|
return ShippingApiFp(this.configuration).getCarrierAccountFormInputs(requestParameters.xAmznShippingBusinessId, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -1299,7 +1286,6 @@ export class ShippingApi extends BaseAPI {
|
|
|
1299
1286
|
* @param {ShippingApiGetCarrierAccountsRequest} requestParameters Request parameters.
|
|
1300
1287
|
* @param {*} [options] Override http request option.
|
|
1301
1288
|
* @throws {RequiredError}
|
|
1302
|
-
* @memberof ShippingApi
|
|
1303
1289
|
*/
|
|
1304
1290
|
getCarrierAccounts(requestParameters, options) {
|
|
1305
1291
|
return ShippingApiFp(this.configuration).getCarrierAccounts(requestParameters.body, requestParameters.xAmznShippingBusinessId, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -1309,7 +1295,6 @@ export class ShippingApi extends BaseAPI {
|
|
|
1309
1295
|
* @param {ShippingApiGetCollectionFormRequest} requestParameters Request parameters.
|
|
1310
1296
|
* @param {*} [options] Override http request option.
|
|
1311
1297
|
* @throws {RequiredError}
|
|
1312
|
-
* @memberof ShippingApi
|
|
1313
1298
|
*/
|
|
1314
1299
|
getCollectionForm(requestParameters, options) {
|
|
1315
1300
|
return ShippingApiFp(this.configuration).getCollectionForm(requestParameters.collectionFormId, requestParameters.xAmznShippingBusinessId, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -1319,7 +1304,6 @@ export class ShippingApi extends BaseAPI {
|
|
|
1319
1304
|
* @param {ShippingApiGetCollectionFormHistoryRequest} requestParameters Request parameters.
|
|
1320
1305
|
* @param {*} [options] Override http request option.
|
|
1321
1306
|
* @throws {RequiredError}
|
|
1322
|
-
* @memberof ShippingApi
|
|
1323
1307
|
*/
|
|
1324
1308
|
getCollectionFormHistory(requestParameters, options) {
|
|
1325
1309
|
return ShippingApiFp(this.configuration).getCollectionFormHistory(requestParameters.body, requestParameters.xAmznShippingBusinessId, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -1329,7 +1313,6 @@ export class ShippingApi extends BaseAPI {
|
|
|
1329
1313
|
* @param {ShippingApiGetRatesRequest} requestParameters Request parameters.
|
|
1330
1314
|
* @param {*} [options] Override http request option.
|
|
1331
1315
|
* @throws {RequiredError}
|
|
1332
|
-
* @memberof ShippingApi
|
|
1333
1316
|
*/
|
|
1334
1317
|
getRates(requestParameters, options) {
|
|
1335
1318
|
return ShippingApiFp(this.configuration).getRates(requestParameters.body, requestParameters.xAmznShippingBusinessId, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -1339,7 +1322,6 @@ export class ShippingApi extends BaseAPI {
|
|
|
1339
1322
|
* @param {ShippingApiGetShipmentDocumentsRequest} requestParameters Request parameters.
|
|
1340
1323
|
* @param {*} [options] Override http request option.
|
|
1341
1324
|
* @throws {RequiredError}
|
|
1342
|
-
* @memberof ShippingApi
|
|
1343
1325
|
*/
|
|
1344
1326
|
getShipmentDocuments(requestParameters, options) {
|
|
1345
1327
|
return ShippingApiFp(this.configuration).getShipmentDocuments(requestParameters.shipmentId, requestParameters.packageClientReferenceId, requestParameters.format, requestParameters.dpi, requestParameters.xAmznShippingBusinessId, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -1349,7 +1331,6 @@ export class ShippingApi extends BaseAPI {
|
|
|
1349
1331
|
* @param {ShippingApiGetTrackingRequest} requestParameters Request parameters.
|
|
1350
1332
|
* @param {*} [options] Override http request option.
|
|
1351
1333
|
* @throws {RequiredError}
|
|
1352
|
-
* @memberof ShippingApi
|
|
1353
1334
|
*/
|
|
1354
1335
|
getTracking(requestParameters, options) {
|
|
1355
1336
|
return ShippingApiFp(this.configuration).getTracking(requestParameters.trackingId, requestParameters.carrierId, requestParameters.xAmznShippingBusinessId, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -1359,7 +1340,6 @@ export class ShippingApi extends BaseAPI {
|
|
|
1359
1340
|
* @param {ShippingApiGetUnmanifestedShipmentsRequest} requestParameters Request parameters.
|
|
1360
1341
|
* @param {*} [options] Override http request option.
|
|
1361
1342
|
* @throws {RequiredError}
|
|
1362
|
-
* @memberof ShippingApi
|
|
1363
1343
|
*/
|
|
1364
1344
|
getUnmanifestedShipments(requestParameters, options) {
|
|
1365
1345
|
return ShippingApiFp(this.configuration).getUnmanifestedShipments(requestParameters.body, requestParameters.xAmznShippingBusinessId, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -1369,7 +1349,6 @@ export class ShippingApi extends BaseAPI {
|
|
|
1369
1349
|
* @param {ShippingApiLinkCarrierAccountRequest} requestParameters Request parameters.
|
|
1370
1350
|
* @param {*} [options] Override http request option.
|
|
1371
1351
|
* @throws {RequiredError}
|
|
1372
|
-
* @memberof ShippingApi
|
|
1373
1352
|
*/
|
|
1374
1353
|
linkCarrierAccount(requestParameters, options) {
|
|
1375
1354
|
return ShippingApiFp(this.configuration).linkCarrierAccount(requestParameters.carrierId, requestParameters.body, requestParameters.xAmznShippingBusinessId, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -1379,7 +1358,6 @@ export class ShippingApi extends BaseAPI {
|
|
|
1379
1358
|
* @param {ShippingApiLinkCarrierAccount0Request} requestParameters Request parameters.
|
|
1380
1359
|
* @param {*} [options] Override http request option.
|
|
1381
1360
|
* @throws {RequiredError}
|
|
1382
|
-
* @memberof ShippingApi
|
|
1383
1361
|
*/
|
|
1384
1362
|
linkCarrierAccount_1(requestParameters, options) {
|
|
1385
1363
|
return ShippingApiFp(this.configuration).linkCarrierAccount_1(requestParameters.carrierId, requestParameters.body, requestParameters.xAmznShippingBusinessId, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -1389,7 +1367,6 @@ export class ShippingApi extends BaseAPI {
|
|
|
1389
1367
|
* @param {ShippingApiOneClickShipmentRequest} requestParameters Request parameters.
|
|
1390
1368
|
* @param {*} [options] Override http request option.
|
|
1391
1369
|
* @throws {RequiredError}
|
|
1392
|
-
* @memberof ShippingApi
|
|
1393
1370
|
*/
|
|
1394
1371
|
oneClickShipment(requestParameters, options) {
|
|
1395
1372
|
return ShippingApiFp(this.configuration).oneClickShipment(requestParameters.body, requestParameters.xAmznShippingBusinessId, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -1399,7 +1376,6 @@ export class ShippingApi extends BaseAPI {
|
|
|
1399
1376
|
* @param {ShippingApiPurchaseShipmentRequest} requestParameters Request parameters.
|
|
1400
1377
|
* @param {*} [options] Override http request option.
|
|
1401
1378
|
* @throws {RequiredError}
|
|
1402
|
-
* @memberof ShippingApi
|
|
1403
1379
|
*/
|
|
1404
1380
|
purchaseShipment(requestParameters, options) {
|
|
1405
1381
|
return ShippingApiFp(this.configuration).purchaseShipment(requestParameters.body, requestParameters.xAmznIdempotencyKey, requestParameters.xAmznShippingBusinessId, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -1409,7 +1385,6 @@ export class ShippingApi extends BaseAPI {
|
|
|
1409
1385
|
* @param {ShippingApiSubmitNdrFeedbackRequest} requestParameters Request parameters.
|
|
1410
1386
|
* @param {*} [options] Override http request option.
|
|
1411
1387
|
* @throws {RequiredError}
|
|
1412
|
-
* @memberof ShippingApi
|
|
1413
1388
|
*/
|
|
1414
1389
|
submitNdrFeedback(requestParameters, options) {
|
|
1415
1390
|
return ShippingApiFp(this.configuration).submitNdrFeedback(requestParameters.body, requestParameters.xAmznShippingBusinessId, options).then((request) => request(this.axios, this.basePath));
|
|
@@ -1419,15 +1394,11 @@ export class ShippingApi extends BaseAPI {
|
|
|
1419
1394
|
* @param {ShippingApiUnlinkCarrierAccountRequest} requestParameters Request parameters.
|
|
1420
1395
|
* @param {*} [options] Override http request option.
|
|
1421
1396
|
* @throws {RequiredError}
|
|
1422
|
-
* @memberof ShippingApi
|
|
1423
1397
|
*/
|
|
1424
1398
|
unlinkCarrierAccount(requestParameters, options) {
|
|
1425
1399
|
return ShippingApiFp(this.configuration).unlinkCarrierAccount(requestParameters.carrierId, requestParameters.body, requestParameters.xAmznShippingBusinessId, options).then((request) => request(this.axios, this.basePath));
|
|
1426
1400
|
}
|
|
1427
1401
|
}
|
|
1428
|
-
/**
|
|
1429
|
-
* @export
|
|
1430
|
-
*/
|
|
1431
1402
|
export const CancelShipmentXAmznShippingBusinessIdEnum = {
|
|
1432
1403
|
AmazonShippingUs: 'AmazonShipping_US',
|
|
1433
1404
|
AmazonShippingIn: 'AmazonShipping_IN',
|
|
@@ -1440,9 +1411,6 @@ export const CancelShipmentXAmznShippingBusinessIdEnum = {
|
|
|
1440
1411
|
AmazonShippingFr: 'AmazonShipping_FR',
|
|
1441
1412
|
AmazonShippingJp: 'AmazonShipping_JP'
|
|
1442
1413
|
};
|
|
1443
|
-
/**
|
|
1444
|
-
* @export
|
|
1445
|
-
*/
|
|
1446
1414
|
export const CreateClaimXAmznShippingBusinessIdEnum = {
|
|
1447
1415
|
AmazonShippingUs: 'AmazonShipping_US',
|
|
1448
1416
|
AmazonShippingIn: 'AmazonShipping_IN',
|
|
@@ -1455,9 +1423,6 @@ export const CreateClaimXAmznShippingBusinessIdEnum = {
|
|
|
1455
1423
|
AmazonShippingFr: 'AmazonShipping_FR',
|
|
1456
1424
|
AmazonShippingJp: 'AmazonShipping_JP'
|
|
1457
1425
|
};
|
|
1458
|
-
/**
|
|
1459
|
-
* @export
|
|
1460
|
-
*/
|
|
1461
1426
|
export const DirectPurchaseShipmentXAmznShippingBusinessIdEnum = {
|
|
1462
1427
|
AmazonShippingUs: 'AmazonShipping_US',
|
|
1463
1428
|
AmazonShippingIn: 'AmazonShipping_IN',
|
|
@@ -1470,9 +1435,6 @@ export const DirectPurchaseShipmentXAmznShippingBusinessIdEnum = {
|
|
|
1470
1435
|
AmazonShippingFr: 'AmazonShipping_FR',
|
|
1471
1436
|
AmazonShippingJp: 'AmazonShipping_JP'
|
|
1472
1437
|
};
|
|
1473
|
-
/**
|
|
1474
|
-
* @export
|
|
1475
|
-
*/
|
|
1476
1438
|
export const GenerateCollectionFormXAmznShippingBusinessIdEnum = {
|
|
1477
1439
|
AmazonShippingUs: 'AmazonShipping_US',
|
|
1478
1440
|
AmazonShippingIn: 'AmazonShipping_IN',
|
|
@@ -1485,9 +1447,6 @@ export const GenerateCollectionFormXAmznShippingBusinessIdEnum = {
|
|
|
1485
1447
|
AmazonShippingFr: 'AmazonShipping_FR',
|
|
1486
1448
|
AmazonShippingJp: 'AmazonShipping_JP'
|
|
1487
1449
|
};
|
|
1488
|
-
/**
|
|
1489
|
-
* @export
|
|
1490
|
-
*/
|
|
1491
1450
|
export const GetAccessPointsAccessPointTypesEnum = {
|
|
1492
1451
|
Helix: 'HELIX',
|
|
1493
1452
|
CampusLocker: 'CAMPUS_LOCKER',
|
|
@@ -1498,9 +1457,6 @@ export const GetAccessPointsAccessPointTypesEnum = {
|
|
|
1498
1457
|
_3P: '3P',
|
|
1499
1458
|
CampusRoom: 'CAMPUS_ROOM'
|
|
1500
1459
|
};
|
|
1501
|
-
/**
|
|
1502
|
-
* @export
|
|
1503
|
-
*/
|
|
1504
1460
|
export const GetAccessPointsXAmznShippingBusinessIdEnum = {
|
|
1505
1461
|
AmazonShippingUs: 'AmazonShipping_US',
|
|
1506
1462
|
AmazonShippingIn: 'AmazonShipping_IN',
|
|
@@ -1513,9 +1469,6 @@ export const GetAccessPointsXAmznShippingBusinessIdEnum = {
|
|
|
1513
1469
|
AmazonShippingFr: 'AmazonShipping_FR',
|
|
1514
1470
|
AmazonShippingJp: 'AmazonShipping_JP'
|
|
1515
1471
|
};
|
|
1516
|
-
/**
|
|
1517
|
-
* @export
|
|
1518
|
-
*/
|
|
1519
1472
|
export const GetAdditionalInputsXAmznShippingBusinessIdEnum = {
|
|
1520
1473
|
AmazonShippingUs: 'AmazonShipping_US',
|
|
1521
1474
|
AmazonShippingIn: 'AmazonShipping_IN',
|
|
@@ -1528,9 +1481,6 @@ export const GetAdditionalInputsXAmznShippingBusinessIdEnum = {
|
|
|
1528
1481
|
AmazonShippingFr: 'AmazonShipping_FR',
|
|
1529
1482
|
AmazonShippingJp: 'AmazonShipping_JP'
|
|
1530
1483
|
};
|
|
1531
|
-
/**
|
|
1532
|
-
* @export
|
|
1533
|
-
*/
|
|
1534
1484
|
export const GetCarrierAccountFormInputsXAmznShippingBusinessIdEnum = {
|
|
1535
1485
|
AmazonShippingUs: 'AmazonShipping_US',
|
|
1536
1486
|
AmazonShippingIn: 'AmazonShipping_IN',
|
|
@@ -1543,9 +1493,6 @@ export const GetCarrierAccountFormInputsXAmznShippingBusinessIdEnum = {
|
|
|
1543
1493
|
AmazonShippingFr: 'AmazonShipping_FR',
|
|
1544
1494
|
AmazonShippingJp: 'AmazonShipping_JP'
|
|
1545
1495
|
};
|
|
1546
|
-
/**
|
|
1547
|
-
* @export
|
|
1548
|
-
*/
|
|
1549
1496
|
export const GetCarrierAccountsXAmznShippingBusinessIdEnum = {
|
|
1550
1497
|
AmazonShippingUs: 'AmazonShipping_US',
|
|
1551
1498
|
AmazonShippingIn: 'AmazonShipping_IN',
|
|
@@ -1558,9 +1505,6 @@ export const GetCarrierAccountsXAmznShippingBusinessIdEnum = {
|
|
|
1558
1505
|
AmazonShippingFr: 'AmazonShipping_FR',
|
|
1559
1506
|
AmazonShippingJp: 'AmazonShipping_JP'
|
|
1560
1507
|
};
|
|
1561
|
-
/**
|
|
1562
|
-
* @export
|
|
1563
|
-
*/
|
|
1564
1508
|
export const GetCollectionFormXAmznShippingBusinessIdEnum = {
|
|
1565
1509
|
AmazonShippingUs: 'AmazonShipping_US',
|
|
1566
1510
|
AmazonShippingIn: 'AmazonShipping_IN',
|
|
@@ -1573,9 +1517,6 @@ export const GetCollectionFormXAmznShippingBusinessIdEnum = {
|
|
|
1573
1517
|
AmazonShippingFr: 'AmazonShipping_FR',
|
|
1574
1518
|
AmazonShippingJp: 'AmazonShipping_JP'
|
|
1575
1519
|
};
|
|
1576
|
-
/**
|
|
1577
|
-
* @export
|
|
1578
|
-
*/
|
|
1579
1520
|
export const GetCollectionFormHistoryXAmznShippingBusinessIdEnum = {
|
|
1580
1521
|
AmazonShippingUs: 'AmazonShipping_US',
|
|
1581
1522
|
AmazonShippingIn: 'AmazonShipping_IN',
|
|
@@ -1588,9 +1529,6 @@ export const GetCollectionFormHistoryXAmznShippingBusinessIdEnum = {
|
|
|
1588
1529
|
AmazonShippingFr: 'AmazonShipping_FR',
|
|
1589
1530
|
AmazonShippingJp: 'AmazonShipping_JP'
|
|
1590
1531
|
};
|
|
1591
|
-
/**
|
|
1592
|
-
* @export
|
|
1593
|
-
*/
|
|
1594
1532
|
export const GetRatesXAmznShippingBusinessIdEnum = {
|
|
1595
1533
|
AmazonShippingUs: 'AmazonShipping_US',
|
|
1596
1534
|
AmazonShippingIn: 'AmazonShipping_IN',
|
|
@@ -1603,9 +1541,6 @@ export const GetRatesXAmznShippingBusinessIdEnum = {
|
|
|
1603
1541
|
AmazonShippingFr: 'AmazonShipping_FR',
|
|
1604
1542
|
AmazonShippingJp: 'AmazonShipping_JP'
|
|
1605
1543
|
};
|
|
1606
|
-
/**
|
|
1607
|
-
* @export
|
|
1608
|
-
*/
|
|
1609
1544
|
export const GetShipmentDocumentsXAmznShippingBusinessIdEnum = {
|
|
1610
1545
|
AmazonShippingUs: 'AmazonShipping_US',
|
|
1611
1546
|
AmazonShippingIn: 'AmazonShipping_IN',
|
|
@@ -1618,9 +1553,6 @@ export const GetShipmentDocumentsXAmznShippingBusinessIdEnum = {
|
|
|
1618
1553
|
AmazonShippingFr: 'AmazonShipping_FR',
|
|
1619
1554
|
AmazonShippingJp: 'AmazonShipping_JP'
|
|
1620
1555
|
};
|
|
1621
|
-
/**
|
|
1622
|
-
* @export
|
|
1623
|
-
*/
|
|
1624
1556
|
export const GetTrackingXAmznShippingBusinessIdEnum = {
|
|
1625
1557
|
AmazonShippingUs: 'AmazonShipping_US',
|
|
1626
1558
|
AmazonShippingIn: 'AmazonShipping_IN',
|
|
@@ -1633,9 +1565,6 @@ export const GetTrackingXAmznShippingBusinessIdEnum = {
|
|
|
1633
1565
|
AmazonShippingFr: 'AmazonShipping_FR',
|
|
1634
1566
|
AmazonShippingJp: 'AmazonShipping_JP'
|
|
1635
1567
|
};
|
|
1636
|
-
/**
|
|
1637
|
-
* @export
|
|
1638
|
-
*/
|
|
1639
1568
|
export const GetUnmanifestedShipmentsXAmznShippingBusinessIdEnum = {
|
|
1640
1569
|
AmazonShippingUs: 'AmazonShipping_US',
|
|
1641
1570
|
AmazonShippingIn: 'AmazonShipping_IN',
|
|
@@ -1648,9 +1577,6 @@ export const GetUnmanifestedShipmentsXAmznShippingBusinessIdEnum = {
|
|
|
1648
1577
|
AmazonShippingFr: 'AmazonShipping_FR',
|
|
1649
1578
|
AmazonShippingJp: 'AmazonShipping_JP'
|
|
1650
1579
|
};
|
|
1651
|
-
/**
|
|
1652
|
-
* @export
|
|
1653
|
-
*/
|
|
1654
1580
|
export const LinkCarrierAccountXAmznShippingBusinessIdEnum = {
|
|
1655
1581
|
AmazonShippingUs: 'AmazonShipping_US',
|
|
1656
1582
|
AmazonShippingIn: 'AmazonShipping_IN',
|
|
@@ -1663,9 +1589,6 @@ export const LinkCarrierAccountXAmznShippingBusinessIdEnum = {
|
|
|
1663
1589
|
AmazonShippingFr: 'AmazonShipping_FR',
|
|
1664
1590
|
AmazonShippingJp: 'AmazonShipping_JP'
|
|
1665
1591
|
};
|
|
1666
|
-
/**
|
|
1667
|
-
* @export
|
|
1668
|
-
*/
|
|
1669
1592
|
export const LinkCarrierAccount0XAmznShippingBusinessIdEnum = {
|
|
1670
1593
|
AmazonShippingUs: 'AmazonShipping_US',
|
|
1671
1594
|
AmazonShippingIn: 'AmazonShipping_IN',
|
|
@@ -1678,9 +1601,6 @@ export const LinkCarrierAccount0XAmznShippingBusinessIdEnum = {
|
|
|
1678
1601
|
AmazonShippingFr: 'AmazonShipping_FR',
|
|
1679
1602
|
AmazonShippingJp: 'AmazonShipping_JP'
|
|
1680
1603
|
};
|
|
1681
|
-
/**
|
|
1682
|
-
* @export
|
|
1683
|
-
*/
|
|
1684
1604
|
export const OneClickShipmentXAmznShippingBusinessIdEnum = {
|
|
1685
1605
|
AmazonShippingUs: 'AmazonShipping_US',
|
|
1686
1606
|
AmazonShippingIn: 'AmazonShipping_IN',
|
|
@@ -1693,9 +1613,6 @@ export const OneClickShipmentXAmznShippingBusinessIdEnum = {
|
|
|
1693
1613
|
AmazonShippingFr: 'AmazonShipping_FR',
|
|
1694
1614
|
AmazonShippingJp: 'AmazonShipping_JP'
|
|
1695
1615
|
};
|
|
1696
|
-
/**
|
|
1697
|
-
* @export
|
|
1698
|
-
*/
|
|
1699
1616
|
export const PurchaseShipmentXAmznShippingBusinessIdEnum = {
|
|
1700
1617
|
AmazonShippingUs: 'AmazonShipping_US',
|
|
1701
1618
|
AmazonShippingIn: 'AmazonShipping_IN',
|
|
@@ -1708,9 +1625,6 @@ export const PurchaseShipmentXAmznShippingBusinessIdEnum = {
|
|
|
1708
1625
|
AmazonShippingFr: 'AmazonShipping_FR',
|
|
1709
1626
|
AmazonShippingJp: 'AmazonShipping_JP'
|
|
1710
1627
|
};
|
|
1711
|
-
/**
|
|
1712
|
-
* @export
|
|
1713
|
-
*/
|
|
1714
1628
|
export const SubmitNdrFeedbackXAmznShippingBusinessIdEnum = {
|
|
1715
1629
|
AmazonShippingUs: 'AmazonShipping_US',
|
|
1716
1630
|
AmazonShippingIn: 'AmazonShipping_IN',
|
|
@@ -1723,9 +1637,6 @@ export const SubmitNdrFeedbackXAmznShippingBusinessIdEnum = {
|
|
|
1723
1637
|
AmazonShippingFr: 'AmazonShipping_FR',
|
|
1724
1638
|
AmazonShippingJp: 'AmazonShipping_JP'
|
|
1725
1639
|
};
|
|
1726
|
-
/**
|
|
1727
|
-
* @export
|
|
1728
|
-
*/
|
|
1729
1640
|
export const UnlinkCarrierAccountXAmznShippingBusinessIdEnum = {
|
|
1730
1641
|
AmazonShippingUs: 'AmazonShipping_US',
|
|
1731
1642
|
AmazonShippingIn: 'AmazonShipping_IN',
|
|
@@ -13,21 +13,12 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import globalAxios from 'axios';
|
|
15
15
|
export const BASE_PATH = "https://sellingpartnerapi-eu.amazon.com".replace(/\/+$/, "");
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* @export
|
|
19
|
-
*/
|
|
20
16
|
export const COLLECTION_FORMATS = {
|
|
21
17
|
csv: ",",
|
|
22
18
|
ssv: " ",
|
|
23
19
|
tsv: "\t",
|
|
24
20
|
pipes: "|",
|
|
25
21
|
};
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
28
|
-
* @export
|
|
29
|
-
* @class BaseAPI
|
|
30
|
-
*/
|
|
31
22
|
export class BaseAPI {
|
|
32
23
|
basePath;
|
|
33
24
|
axios;
|
|
@@ -42,12 +33,6 @@ export class BaseAPI {
|
|
|
42
33
|
}
|
|
43
34
|
}
|
|
44
35
|
;
|
|
45
|
-
/**
|
|
46
|
-
*
|
|
47
|
-
* @export
|
|
48
|
-
* @class RequiredError
|
|
49
|
-
* @extends {Error}
|
|
50
|
-
*/
|
|
51
36
|
export class RequiredError extends Error {
|
|
52
37
|
field;
|
|
53
38
|
constructor(field, msg) {
|
|
@@ -56,8 +41,4 @@ export class RequiredError extends Error {
|
|
|
56
41
|
this.name = "RequiredError";
|
|
57
42
|
}
|
|
58
43
|
}
|
|
59
|
-
/**
|
|
60
|
-
*
|
|
61
|
-
* @export
|
|
62
|
-
*/
|
|
63
44
|
export const operationServerMap = {};
|
|
@@ -12,25 +12,16 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
import { RequiredError } from "./base";
|
|
15
|
-
/**
|
|
16
|
-
*
|
|
17
|
-
* @export
|
|
18
|
-
*/
|
|
19
15
|
export const DUMMY_BASE_URL = 'https://example.com';
|
|
20
16
|
/**
|
|
21
17
|
*
|
|
22
18
|
* @throws {RequiredError}
|
|
23
|
-
* @export
|
|
24
19
|
*/
|
|
25
20
|
export const assertParamExists = function (functionName, paramName, paramValue) {
|
|
26
21
|
if (paramValue === null || paramValue === undefined) {
|
|
27
22
|
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
28
23
|
}
|
|
29
24
|
};
|
|
30
|
-
/**
|
|
31
|
-
*
|
|
32
|
-
* @export
|
|
33
|
-
*/
|
|
34
25
|
export const setApiKeyToObject = async function (object, keyParamName, configuration) {
|
|
35
26
|
if (configuration && configuration.apiKey) {
|
|
36
27
|
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
@@ -39,19 +30,11 @@ export const setApiKeyToObject = async function (object, keyParamName, configura
|
|
|
39
30
|
object[keyParamName] = localVarApiKeyValue;
|
|
40
31
|
}
|
|
41
32
|
};
|
|
42
|
-
/**
|
|
43
|
-
*
|
|
44
|
-
* @export
|
|
45
|
-
*/
|
|
46
33
|
export const setBasicAuthToObject = function (object, configuration) {
|
|
47
34
|
if (configuration && (configuration.username || configuration.password)) {
|
|
48
35
|
object["auth"] = { username: configuration.username, password: configuration.password };
|
|
49
36
|
}
|
|
50
37
|
};
|
|
51
|
-
/**
|
|
52
|
-
*
|
|
53
|
-
* @export
|
|
54
|
-
*/
|
|
55
38
|
export const setBearerAuthToObject = async function (object, configuration) {
|
|
56
39
|
if (configuration && configuration.accessToken) {
|
|
57
40
|
const accessToken = typeof configuration.accessToken === 'function'
|
|
@@ -60,10 +43,6 @@ export const setBearerAuthToObject = async function (object, configuration) {
|
|
|
60
43
|
object["Authorization"] = "Bearer " + accessToken;
|
|
61
44
|
}
|
|
62
45
|
};
|
|
63
|
-
/**
|
|
64
|
-
*
|
|
65
|
-
* @export
|
|
66
|
-
*/
|
|
67
46
|
export const setOAuthToObject = async function (object, name, scopes, configuration) {
|
|
68
47
|
if (configuration && configuration.accessToken) {
|
|
69
48
|
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
@@ -92,19 +71,11 @@ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
|
92
71
|
}
|
|
93
72
|
}
|
|
94
73
|
}
|
|
95
|
-
/**
|
|
96
|
-
*
|
|
97
|
-
* @export
|
|
98
|
-
*/
|
|
99
74
|
export const setSearchParams = function (url, ...objects) {
|
|
100
75
|
const searchParams = new URLSearchParams(url.search);
|
|
101
76
|
setFlattenedQueryParams(searchParams, objects);
|
|
102
77
|
url.search = searchParams.toString();
|
|
103
78
|
};
|
|
104
|
-
/**
|
|
105
|
-
*
|
|
106
|
-
* @export
|
|
107
|
-
*/
|
|
108
79
|
export const serializeDataIfNeeded = function (value, requestOptions, configuration) {
|
|
109
80
|
const nonString = typeof value !== 'string';
|
|
110
81
|
const needsSerialization = nonString && configuration && configuration.isJsonMime
|
|
@@ -114,17 +85,9 @@ export const serializeDataIfNeeded = function (value, requestOptions, configurat
|
|
|
114
85
|
? JSON.stringify(value !== undefined ? value : {})
|
|
115
86
|
: (value || "");
|
|
116
87
|
};
|
|
117
|
-
/**
|
|
118
|
-
*
|
|
119
|
-
* @export
|
|
120
|
-
*/
|
|
121
88
|
export const toPathString = function (url) {
|
|
122
89
|
return url.pathname + url.search + url.hash;
|
|
123
90
|
};
|
|
124
|
-
/**
|
|
125
|
-
*
|
|
126
|
-
* @export
|
|
127
|
-
*/
|
|
128
91
|
export const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
129
92
|
return (axios = globalAxios, basePath = BASE_PATH) => {
|
|
130
93
|
const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
|