@sp-api-sdk/fulfillment-outbound-api-2020-07-01 1.10.4 → 1.10.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/src/api-model/common.js +19 -13
- package/dist/es/src/api-model/common.js +19 -13
- package/dist/types/src/api-model/models/additional-location-info.d.ts +1 -1
- package/dist/types/src/api-model/models/current-status.d.ts +1 -1
- package/dist/types/src/api-model/models/event-code.d.ts +1 -1
- package/dist/types/src/api-model/models/feature-settings.d.ts +1 -1
- package/dist/types/src/api-model/models/fee.d.ts +1 -1
- package/dist/types/src/api-model/models/fulfillment-action.d.ts +1 -1
- package/dist/types/src/api-model/models/fulfillment-order-status.d.ts +1 -1
- package/dist/types/src/api-model/models/fulfillment-policy.d.ts +1 -1
- package/dist/types/src/api-model/models/fulfillment-preview-item.d.ts +1 -1
- package/dist/types/src/api-model/models/fulfillment-return-item-status.d.ts +1 -1
- package/dist/types/src/api-model/models/fulfillment-shipment.d.ts +1 -1
- package/dist/types/src/api-model/models/invalid-item-reason-code.d.ts +1 -1
- package/dist/types/src/api-model/models/return-item-disposition.d.ts +1 -1
- package/dist/types/src/api-model/models/shipping-speed-category.d.ts +1 -1
- package/dist/types/src/api-model/models/weight.d.ts +1 -1
- package/package.json +3 -3
|
@@ -80,25 +80,31 @@ const setOAuthToObject = async function (object, name, scopes, configuration) {
|
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
82
|
exports.setOAuthToObject = setOAuthToObject;
|
|
83
|
+
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
84
|
+
if (typeof parameter === "object") {
|
|
85
|
+
if (Array.isArray(parameter)) {
|
|
86
|
+
parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
if (urlSearchParams.has(key)) {
|
|
94
|
+
urlSearchParams.append(key, parameter);
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
urlSearchParams.set(key, parameter);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
83
101
|
/**
|
|
84
102
|
*
|
|
85
103
|
* @export
|
|
86
104
|
*/
|
|
87
105
|
const setSearchParams = function (url, ...objects) {
|
|
88
106
|
const searchParams = new URLSearchParams(url.search);
|
|
89
|
-
|
|
90
|
-
for (const key in object) {
|
|
91
|
-
if (Array.isArray(object[key])) {
|
|
92
|
-
searchParams.delete(key);
|
|
93
|
-
for (const item of object[key]) {
|
|
94
|
-
searchParams.append(key, item);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
searchParams.set(key, object[key]);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
107
|
+
setFlattenedQueryParams(searchParams, objects);
|
|
102
108
|
url.search = searchParams.toString();
|
|
103
109
|
};
|
|
104
110
|
exports.setSearchParams = setSearchParams;
|
|
@@ -72,25 +72,31 @@ export const setOAuthToObject = async function (object, name, scopes, configurat
|
|
|
72
72
|
object["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
|
+
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
76
|
+
if (typeof parameter === "object") {
|
|
77
|
+
if (Array.isArray(parameter)) {
|
|
78
|
+
parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
if (urlSearchParams.has(key)) {
|
|
86
|
+
urlSearchParams.append(key, parameter);
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
urlSearchParams.set(key, parameter);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
75
93
|
/**
|
|
76
94
|
*
|
|
77
95
|
* @export
|
|
78
96
|
*/
|
|
79
97
|
export const setSearchParams = function (url, ...objects) {
|
|
80
98
|
const searchParams = new URLSearchParams(url.search);
|
|
81
|
-
|
|
82
|
-
for (const key in object) {
|
|
83
|
-
if (Array.isArray(object[key])) {
|
|
84
|
-
searchParams.delete(key);
|
|
85
|
-
for (const item of object[key]) {
|
|
86
|
-
searchParams.append(key, item);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
searchParams.set(key, object[key]);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
99
|
+
setFlattenedQueryParams(searchParams, objects);
|
|
94
100
|
url.search = searchParams.toString();
|
|
95
101
|
};
|
|
96
102
|
/**
|
|
@@ -42,4 +42,4 @@ export declare const AdditionalLocationInfo: {
|
|
|
42
42
|
readonly SecureLocation: "SECURE_LOCATION";
|
|
43
43
|
readonly SideDoor: "SIDE_DOOR";
|
|
44
44
|
};
|
|
45
|
-
export
|
|
45
|
+
export type AdditionalLocationInfo = typeof AdditionalLocationInfo[keyof typeof AdditionalLocationInfo];
|
|
@@ -34,4 +34,4 @@ export declare const CurrentStatus: {
|
|
|
34
34
|
readonly RefundIssued: "REFUND_ISSUED";
|
|
35
35
|
readonly ReturnReceivedInFc: "RETURN_RECEIVED_IN_FC";
|
|
36
36
|
};
|
|
37
|
-
export
|
|
37
|
+
export type CurrentStatus = typeof CurrentStatus[keyof typeof CurrentStatus];
|
|
@@ -32,4 +32,4 @@ export declare const FeatureSettingsFeatureFulfillmentPolicyEnum: {
|
|
|
32
32
|
readonly Required: "Required";
|
|
33
33
|
readonly NotRequired: "NotRequired";
|
|
34
34
|
};
|
|
35
|
-
export
|
|
35
|
+
export type FeatureSettingsFeatureFulfillmentPolicyEnum = typeof FeatureSettingsFeatureFulfillmentPolicyEnum[keyof typeof FeatureSettingsFeatureFulfillmentPolicyEnum];
|
|
@@ -35,4 +35,4 @@ export declare const FeeNameEnum: {
|
|
|
35
35
|
readonly FbaTransportationFee: "FBATransportationFee";
|
|
36
36
|
readonly FbaFulfillmentCodFee: "FBAFulfillmentCODFee";
|
|
37
37
|
};
|
|
38
|
-
export
|
|
38
|
+
export type FeeNameEnum = typeof FeeNameEnum[keyof typeof FeeNameEnum];
|
|
@@ -18,4 +18,4 @@ export declare const FulfillmentAction: {
|
|
|
18
18
|
readonly Ship: "Ship";
|
|
19
19
|
readonly Hold: "Hold";
|
|
20
20
|
};
|
|
21
|
-
export
|
|
21
|
+
export type FulfillmentAction = typeof FulfillmentAction[keyof typeof FulfillmentAction];
|
|
@@ -25,4 +25,4 @@ export declare const FulfillmentOrderStatus: {
|
|
|
25
25
|
readonly Unfulfillable: "Unfulfillable";
|
|
26
26
|
readonly Invalid: "Invalid";
|
|
27
27
|
};
|
|
28
|
-
export
|
|
28
|
+
export type FulfillmentOrderStatus = typeof FulfillmentOrderStatus[keyof typeof FulfillmentOrderStatus];
|
|
@@ -19,4 +19,4 @@ export declare const FulfillmentPolicy: {
|
|
|
19
19
|
readonly FillAll: "FillAll";
|
|
20
20
|
readonly FillAllAvailable: "FillAllAvailable";
|
|
21
21
|
};
|
|
22
|
-
export
|
|
22
|
+
export type FulfillmentPolicy = typeof FulfillmentPolicy[keyof typeof FulfillmentPolicy];
|
|
@@ -51,4 +51,4 @@ export declare const FulfillmentPreviewItemShippingWeightCalculationMethodEnum:
|
|
|
51
51
|
readonly Package: "Package";
|
|
52
52
|
readonly Dimensional: "Dimensional";
|
|
53
53
|
};
|
|
54
|
-
export
|
|
54
|
+
export type FulfillmentPreviewItemShippingWeightCalculationMethodEnum = typeof FulfillmentPreviewItemShippingWeightCalculationMethodEnum[keyof typeof FulfillmentPreviewItemShippingWeightCalculationMethodEnum];
|
|
@@ -18,4 +18,4 @@ export declare const FulfillmentReturnItemStatus: {
|
|
|
18
18
|
readonly New: "New";
|
|
19
19
|
readonly Processed: "Processed";
|
|
20
20
|
};
|
|
21
|
-
export
|
|
21
|
+
export type FulfillmentReturnItemStatus = typeof FulfillmentReturnItemStatus[keyof typeof FulfillmentReturnItemStatus];
|
|
@@ -72,4 +72,4 @@ export declare const FulfillmentShipmentFulfillmentShipmentStatusEnum: {
|
|
|
72
72
|
readonly CancelledByFulfiller: "CANCELLED_BY_FULFILLER";
|
|
73
73
|
readonly CancelledBySeller: "CANCELLED_BY_SELLER";
|
|
74
74
|
};
|
|
75
|
-
export
|
|
75
|
+
export type FulfillmentShipmentFulfillmentShipmentStatusEnum = typeof FulfillmentShipmentFulfillmentShipmentStatusEnum[keyof typeof FulfillmentShipmentFulfillmentShipmentStatusEnum];
|
|
@@ -20,4 +20,4 @@ export declare const InvalidItemReasonCode: {
|
|
|
20
20
|
readonly NoCompletedShipItems: "NoCompletedShipItems";
|
|
21
21
|
readonly NoReturnableQuantity: "NoReturnableQuantity";
|
|
22
22
|
};
|
|
23
|
-
export
|
|
23
|
+
export type InvalidItemReasonCode = typeof InvalidItemReasonCode[keyof typeof InvalidItemReasonCode];
|
|
@@ -21,4 +21,4 @@ export declare const ReturnItemDisposition: {
|
|
|
21
21
|
readonly CarrierDamaged: "CarrierDamaged";
|
|
22
22
|
readonly FulfillerDamaged: "FulfillerDamaged";
|
|
23
23
|
};
|
|
24
|
-
export
|
|
24
|
+
export type ReturnItemDisposition = typeof ReturnItemDisposition[keyof typeof ReturnItemDisposition];
|
|
@@ -20,4 +20,4 @@ export declare const ShippingSpeedCategory: {
|
|
|
20
20
|
readonly Priority: "Priority";
|
|
21
21
|
readonly ScheduledDelivery: "ScheduledDelivery";
|
|
22
22
|
};
|
|
23
|
-
export
|
|
23
|
+
export type ShippingSpeedCategory = typeof ShippingSpeedCategory[keyof typeof ShippingSpeedCategory];
|
|
@@ -34,4 +34,4 @@ export declare const WeightUnitEnum: {
|
|
|
34
34
|
readonly Lb: "LB";
|
|
35
35
|
readonly Pounds: "POUNDS";
|
|
36
36
|
};
|
|
37
|
-
export
|
|
37
|
+
export type WeightUnitEnum = typeof WeightUnitEnum[keyof typeof WeightUnitEnum];
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@sp-api-sdk/fulfillment-outbound-api-2020-07-01",
|
|
3
3
|
"author": "Vincent Mesquita <vincent.mesquita@bizon.solutions>",
|
|
4
4
|
"description": "The Selling Partner API for Fulfillment Outbound lets you create applications that help a seller fulfill Multi-Channel Fulfillment orders using their inventory in Amazon's fulfillment network. You can get information on both potential and existing fulfillment orders.",
|
|
5
|
-
"version": "1.10.
|
|
5
|
+
"version": "1.10.6",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
7
7
|
"module": "dist/es/index.js",
|
|
8
8
|
"types": "dist/types/index.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"test": "jest"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@sp-api-sdk/common": "^1.9.
|
|
29
|
+
"@sp-api-sdk/common": "^1.9.18",
|
|
30
30
|
"axios": "^0.27.2"
|
|
31
31
|
},
|
|
32
32
|
"repository": {
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"typedoc": {
|
|
52
52
|
"entryPoint": "./index.ts"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "59d4ae523f7261bbee380ef3bd43a368266a55a6"
|
|
55
55
|
}
|