@sp-api-sdk/orders-api-v0 5.0.0 → 5.1.1
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/orders-api.js +48 -64
- 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/association-type.js +0 -2
- package/dist/cjs/api-model/models/constraint-type.js +0 -2
- package/dist/cjs/api-model/models/easy-ship-shipment-status.js +0 -2
- package/dist/cjs/api-model/models/electronic-invoice-status.js +0 -2
- package/dist/cjs/api-model/models/index.js +0 -1
- package/dist/cjs/api-model/models/other-delivery-attributes.js +0 -2
- package/dist/cjs/api-model/models/shipment-status.js +0 -2
- package/dist/cjs/api-model/models/verification-status.js +0 -2
- package/dist/es/api-model/api/orders-api.js +48 -64
- 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/association-type.js +0 -2
- package/dist/es/api-model/models/constraint-type.js +0 -2
- package/dist/es/api-model/models/easy-ship-shipment-status.js +0 -2
- package/dist/es/api-model/models/electronic-invoice-status.js +0 -2
- package/dist/es/api-model/models/index.js +0 -1
- package/dist/es/api-model/models/other-delivery-attributes.js +0 -2
- package/dist/es/api-model/models/shipment-status.js +0 -2
- package/dist/es/api-model/models/verification-status.js +0 -2
- package/dist/types/api-model/api/orders-api.d.ts +52 -160
- 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/address-extended-fields.d.ts +0 -10
- package/dist/types/api-model/models/address.d.ts +0 -35
- package/dist/types/api-model/models/amazon-programs.d.ts +2 -6
- package/dist/types/api-model/models/associated-item.d.ts +0 -11
- package/dist/types/api-model/models/association-type.d.ts +0 -2
- package/dist/types/api-model/models/automated-shipping-settings.d.ts +0 -8
- package/dist/types/api-model/models/business-hours.d.ts +0 -6
- package/dist/types/api-model/models/buyer-customized-info-detail.d.ts +0 -4
- package/dist/types/api-model/models/buyer-info.d.ts +0 -15
- package/dist/types/api-model/models/buyer-requested-cancel.d.ts +0 -6
- package/dist/types/api-model/models/buyer-tax-info.d.ts +0 -8
- package/dist/types/api-model/models/buyer-tax-information.d.ts +0 -10
- package/dist/types/api-model/models/confirm-shipment-error-response.d.ts +0 -4
- package/dist/types/api-model/models/confirm-shipment-order-item.d.ts +0 -8
- package/dist/types/api-model/models/confirm-shipment-request.d.ts +0 -11
- package/dist/types/api-model/models/constraint-type.d.ts +0 -2
- package/dist/types/api-model/models/delivery-preferences.d.ts +0 -13
- package/dist/types/api-model/models/easy-ship-shipment-status.d.ts +0 -2
- package/dist/types/api-model/models/electronic-invoice-status.d.ts +0 -2
- package/dist/types/api-model/models/exception-dates.d.ts +0 -8
- package/dist/types/api-model/models/fulfillment-instruction.d.ts +0 -4
- package/dist/types/api-model/models/get-order-address-response.d.ts +0 -9
- package/dist/types/api-model/models/get-order-buyer-info-response.d.ts +0 -9
- package/dist/types/api-model/models/get-order-items-buyer-info-response.d.ts +0 -9
- package/dist/types/api-model/models/get-order-items-response.d.ts +0 -9
- package/dist/types/api-model/models/get-order-regulated-info-response.d.ts +0 -9
- package/dist/types/api-model/models/get-order-response.d.ts +0 -9
- package/dist/types/api-model/models/get-orders-response.d.ts +0 -9
- package/dist/types/api-model/models/index.d.ts +0 -1
- package/dist/types/api-model/models/item-buyer-info.d.ts +0 -21
- package/dist/types/api-model/models/marketplace-tax-info.d.ts +0 -4
- package/dist/types/api-model/models/measurement.d.ts +0 -6
- package/dist/types/api-model/models/model-error.d.ts +0 -8
- package/dist/types/api-model/models/money.d.ts +0 -6
- package/dist/types/api-model/models/open-interval.d.ts +0 -12
- package/dist/types/api-model/models/open-time-interval.d.ts +0 -6
- package/dist/types/api-model/models/order-address.d.ts +0 -16
- package/dist/types/api-model/models/order-buyer-info.d.ts +0 -17
- package/dist/types/api-model/models/order-item-buyer-info.d.ts +0 -23
- package/dist/types/api-model/models/order-item.d.ts +0 -146
- package/dist/types/api-model/models/order-items-buyer-info-list.d.ts +0 -8
- package/dist/types/api-model/models/order-items-inner.d.ts +0 -9
- package/dist/types/api-model/models/order-items-list.d.ts +0 -8
- package/dist/types/api-model/models/order-regulated-info.d.ts +0 -16
- package/dist/types/api-model/models/order.d.ts +0 -126
- package/dist/types/api-model/models/orders-list.d.ts +1 -11
- package/dist/types/api-model/models/other-delivery-attributes.d.ts +0 -2
- package/dist/types/api-model/models/package-detail.d.ts +1 -19
- package/dist/types/api-model/models/payment-execution-detail-item.d.ts +0 -9
- package/dist/types/api-model/models/points-granted-detail.d.ts +0 -9
- package/dist/types/api-model/models/preferred-delivery-time.d.ts +0 -6
- package/dist/types/api-model/models/prescription-detail.d.ts +0 -16
- package/dist/types/api-model/models/product-info-detail.d.ts +0 -4
- package/dist/types/api-model/models/regulated-information-field.d.ts +0 -10
- package/dist/types/api-model/models/regulated-information.d.ts +0 -4
- package/dist/types/api-model/models/regulated-order-verification-status.d.ts +0 -22
- package/dist/types/api-model/models/rejection-reason.d.ts +0 -6
- package/dist/types/api-model/models/shipment-status.d.ts +0 -2
- package/dist/types/api-model/models/shipping-constraints.d.ts +0 -22
- package/dist/types/api-model/models/substitution-option.d.ts +0 -15
- package/dist/types/api-model/models/substitution-preferences.d.ts +0 -6
- package/dist/types/api-model/models/tax-classification.d.ts +0 -6
- package/dist/types/api-model/models/tax-collection.d.ts +0 -6
- package/dist/types/api-model/models/update-shipment-status-error-response.d.ts +0 -4
- package/dist/types/api-model/models/update-shipment-status-request.d.ts +0 -11
- package/dist/types/api-model/models/update-verification-status-error-response.d.ts +0 -4
- package/dist/types/api-model/models/update-verification-status-request-body.d.ts +0 -16
- package/dist/types/api-model/models/update-verification-status-request.d.ts +0 -7
- package/dist/types/api-model/models/valid-verification-detail.d.ts +0 -6
- package/dist/types/api-model/models/verification-details.d.ts +0 -7
- package/dist/types/api-model/models/verification-status.d.ts +0 -2
- package/package.json +25 -4
- package/dist/cjs/api-model/models/export-info.js +0 -15
- package/dist/es/api-model/models/export-info.js +0 -14
- package/dist/types/api-model/models/export-info.d.ts +0 -31
|
@@ -15,15 +15,10 @@
|
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
|
|
17
17
|
const base_1 = require("./base");
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
* @export
|
|
21
|
-
*/
|
|
22
18
|
exports.DUMMY_BASE_URL = 'https://example.com';
|
|
23
19
|
/**
|
|
24
20
|
*
|
|
25
21
|
* @throws {RequiredError}
|
|
26
|
-
* @export
|
|
27
22
|
*/
|
|
28
23
|
const assertParamExists = function (functionName, paramName, paramValue) {
|
|
29
24
|
if (paramValue === null || paramValue === undefined) {
|
|
@@ -31,10 +26,6 @@ const assertParamExists = function (functionName, paramName, paramValue) {
|
|
|
31
26
|
}
|
|
32
27
|
};
|
|
33
28
|
exports.assertParamExists = assertParamExists;
|
|
34
|
-
/**
|
|
35
|
-
*
|
|
36
|
-
* @export
|
|
37
|
-
*/
|
|
38
29
|
const setApiKeyToObject = async function (object, keyParamName, configuration) {
|
|
39
30
|
if (configuration && configuration.apiKey) {
|
|
40
31
|
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
@@ -44,20 +35,12 @@ const setApiKeyToObject = async function (object, keyParamName, configuration) {
|
|
|
44
35
|
}
|
|
45
36
|
};
|
|
46
37
|
exports.setApiKeyToObject = setApiKeyToObject;
|
|
47
|
-
/**
|
|
48
|
-
*
|
|
49
|
-
* @export
|
|
50
|
-
*/
|
|
51
38
|
const setBasicAuthToObject = function (object, configuration) {
|
|
52
39
|
if (configuration && (configuration.username || configuration.password)) {
|
|
53
40
|
object["auth"] = { username: configuration.username, password: configuration.password };
|
|
54
41
|
}
|
|
55
42
|
};
|
|
56
43
|
exports.setBasicAuthToObject = setBasicAuthToObject;
|
|
57
|
-
/**
|
|
58
|
-
*
|
|
59
|
-
* @export
|
|
60
|
-
*/
|
|
61
44
|
const setBearerAuthToObject = async function (object, configuration) {
|
|
62
45
|
if (configuration && configuration.accessToken) {
|
|
63
46
|
const accessToken = typeof configuration.accessToken === 'function'
|
|
@@ -67,10 +50,6 @@ const setBearerAuthToObject = async function (object, configuration) {
|
|
|
67
50
|
}
|
|
68
51
|
};
|
|
69
52
|
exports.setBearerAuthToObject = setBearerAuthToObject;
|
|
70
|
-
/**
|
|
71
|
-
*
|
|
72
|
-
* @export
|
|
73
|
-
*/
|
|
74
53
|
const setOAuthToObject = async function (object, name, scopes, configuration) {
|
|
75
54
|
if (configuration && configuration.accessToken) {
|
|
76
55
|
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
@@ -100,20 +79,12 @@ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
|
100
79
|
}
|
|
101
80
|
}
|
|
102
81
|
}
|
|
103
|
-
/**
|
|
104
|
-
*
|
|
105
|
-
* @export
|
|
106
|
-
*/
|
|
107
82
|
const setSearchParams = function (url, ...objects) {
|
|
108
83
|
const searchParams = new URLSearchParams(url.search);
|
|
109
84
|
setFlattenedQueryParams(searchParams, objects);
|
|
110
85
|
url.search = searchParams.toString();
|
|
111
86
|
};
|
|
112
87
|
exports.setSearchParams = setSearchParams;
|
|
113
|
-
/**
|
|
114
|
-
*
|
|
115
|
-
* @export
|
|
116
|
-
*/
|
|
117
88
|
const serializeDataIfNeeded = function (value, requestOptions, configuration) {
|
|
118
89
|
const nonString = typeof value !== 'string';
|
|
119
90
|
const needsSerialization = nonString && configuration && configuration.isJsonMime
|
|
@@ -124,18 +95,10 @@ const serializeDataIfNeeded = function (value, requestOptions, configuration) {
|
|
|
124
95
|
: (value || "");
|
|
125
96
|
};
|
|
126
97
|
exports.serializeDataIfNeeded = serializeDataIfNeeded;
|
|
127
|
-
/**
|
|
128
|
-
*
|
|
129
|
-
* @export
|
|
130
|
-
*/
|
|
131
98
|
const toPathString = function (url) {
|
|
132
99
|
return url.pathname + url.search + url.hash;
|
|
133
100
|
};
|
|
134
101
|
exports.toPathString = toPathString;
|
|
135
|
-
/**
|
|
136
|
-
*
|
|
137
|
-
* @export
|
|
138
|
-
*/
|
|
139
102
|
const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
140
103
|
return (axios = globalAxios, basePath = BASE_PATH) => {
|
|
141
104
|
const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
|
|
@@ -18,49 +18,32 @@ class Configuration {
|
|
|
18
18
|
/**
|
|
19
19
|
* parameter for apiKey security
|
|
20
20
|
* @param name security name
|
|
21
|
-
* @memberof Configuration
|
|
22
21
|
*/
|
|
23
22
|
apiKey;
|
|
24
23
|
/**
|
|
25
24
|
* parameter for basic security
|
|
26
|
-
*
|
|
27
|
-
* @type {string}
|
|
28
|
-
* @memberof Configuration
|
|
29
25
|
*/
|
|
30
26
|
username;
|
|
31
27
|
/**
|
|
32
28
|
* parameter for basic security
|
|
33
|
-
*
|
|
34
|
-
* @type {string}
|
|
35
|
-
* @memberof Configuration
|
|
36
29
|
*/
|
|
37
30
|
password;
|
|
38
31
|
/**
|
|
39
32
|
* parameter for oauth2 security
|
|
40
33
|
* @param name security name
|
|
41
34
|
* @param scopes oauth2 scope
|
|
42
|
-
* @memberof Configuration
|
|
43
35
|
*/
|
|
44
36
|
accessToken;
|
|
45
37
|
/**
|
|
46
38
|
* override base path
|
|
47
|
-
*
|
|
48
|
-
* @type {string}
|
|
49
|
-
* @memberof Configuration
|
|
50
39
|
*/
|
|
51
40
|
basePath;
|
|
52
41
|
/**
|
|
53
42
|
* override server index
|
|
54
|
-
*
|
|
55
|
-
* @type {number}
|
|
56
|
-
* @memberof Configuration
|
|
57
43
|
*/
|
|
58
44
|
serverIndex;
|
|
59
45
|
/**
|
|
60
46
|
* base options for axios calls
|
|
61
|
-
*
|
|
62
|
-
* @type {any}
|
|
63
|
-
* @memberof Configuration
|
|
64
47
|
*/
|
|
65
48
|
baseOptions;
|
|
66
49
|
/**
|
|
@@ -16,8 +16,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
16
16
|
exports.AssociationType = void 0;
|
|
17
17
|
/**
|
|
18
18
|
* The type of association an item has with an order item.
|
|
19
|
-
* @export
|
|
20
|
-
* @enum {string}
|
|
21
19
|
*/
|
|
22
20
|
exports.AssociationType = {
|
|
23
21
|
ValueAddService: 'VALUE_ADD_SERVICE'
|
|
@@ -16,8 +16,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
16
16
|
exports.ConstraintType = void 0;
|
|
17
17
|
/**
|
|
18
18
|
* Details the importance of the constraint present on the item
|
|
19
|
-
* @export
|
|
20
|
-
* @enum {string}
|
|
21
19
|
*/
|
|
22
20
|
exports.ConstraintType = {
|
|
23
21
|
Mandatory: 'MANDATORY'
|
|
@@ -16,8 +16,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
16
16
|
exports.EasyShipShipmentStatus = void 0;
|
|
17
17
|
/**
|
|
18
18
|
* The status of the Amazon Easy Ship order. This property is only included for Amazon Easy Ship orders.
|
|
19
|
-
* @export
|
|
20
|
-
* @enum {string}
|
|
21
19
|
*/
|
|
22
20
|
exports.EasyShipShipmentStatus = {
|
|
23
21
|
PendingSchedule: 'PendingSchedule',
|
|
@@ -16,8 +16,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
16
16
|
exports.ElectronicInvoiceStatus = void 0;
|
|
17
17
|
/**
|
|
18
18
|
* The status of the electronic invoice. Only available for Easy Ship orders and orders in the BR marketplace.
|
|
19
|
-
* @export
|
|
20
|
-
* @enum {string}
|
|
21
19
|
*/
|
|
22
20
|
exports.ElectronicInvoiceStatus = {
|
|
23
21
|
NotRequired: 'NotRequired',
|
|
@@ -34,7 +34,6 @@ __exportStar(require("./delivery-preferences"), exports);
|
|
|
34
34
|
__exportStar(require("./easy-ship-shipment-status"), exports);
|
|
35
35
|
__exportStar(require("./electronic-invoice-status"), exports);
|
|
36
36
|
__exportStar(require("./exception-dates"), exports);
|
|
37
|
-
__exportStar(require("./export-info"), exports);
|
|
38
37
|
__exportStar(require("./fulfillment-instruction"), exports);
|
|
39
38
|
__exportStar(require("./get-order-address-response"), exports);
|
|
40
39
|
__exportStar(require("./get-order-buyer-info-response"), exports);
|
|
@@ -16,8 +16,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
16
16
|
exports.OtherDeliveryAttributes = void 0;
|
|
17
17
|
/**
|
|
18
18
|
* Miscellaneous delivery attributes associated with the shipping address.
|
|
19
|
-
* @export
|
|
20
|
-
* @enum {string}
|
|
21
19
|
*/
|
|
22
20
|
exports.OtherDeliveryAttributes = {
|
|
23
21
|
HasAccessPoint: 'HAS_ACCESS_POINT',
|