@shipengine/js-api 2.7.0 → 3.0.0
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/account-settings/types.d.ts +7 -1
- package/index.js +60 -38
- package/index.mjs +60 -38
- package/order-sources/api.d.ts +5 -1
- package/order-sources/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { DimensionUnit } from "../dimensions";
|
|
2
2
|
import { LabelLayout } from "../labels";
|
|
3
3
|
import { PageableResult } from "../resources";
|
|
4
|
+
import { TaxableIdentifierType } from "../shipments";
|
|
4
5
|
import { WeightUnit } from "../weight";
|
|
6
|
+
export type AccountSettingsTaxIdentifier = {
|
|
7
|
+
identifierType: TaxableIdentifierType;
|
|
8
|
+
issuingAuthority: string;
|
|
9
|
+
value: string;
|
|
10
|
+
};
|
|
5
11
|
export interface ShipEngineAccountSettings {
|
|
6
12
|
defaultLabelLayout: LabelLayout;
|
|
7
13
|
dimensionsUnit: DimensionUnit;
|
|
8
|
-
|
|
14
|
+
taxIdentifiers?: AccountSettingsTaxIdentifier[];
|
|
9
15
|
weightUnit: WeightUnit;
|
|
10
16
|
}
|
|
11
17
|
export type AccountImage = {
|
package/index.js
CHANGED
|
@@ -10,17 +10,17 @@ var AccountBillingPlanChangeType = /* @__PURE__ */ ((AccountBillingPlanChangeTyp
|
|
|
10
10
|
return AccountBillingPlanChangeType2;
|
|
11
11
|
})(AccountBillingPlanChangeType || {});
|
|
12
12
|
|
|
13
|
-
var __getOwnPropSymbols$
|
|
14
|
-
var __hasOwnProp$
|
|
15
|
-
var __propIsEnum$
|
|
16
|
-
var __objRest$
|
|
13
|
+
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
14
|
+
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
15
|
+
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
16
|
+
var __objRest$3 = (source, exclude) => {
|
|
17
17
|
var target = {};
|
|
18
18
|
for (var prop in source)
|
|
19
|
-
if (__hasOwnProp$
|
|
19
|
+
if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
20
20
|
target[prop] = source[prop];
|
|
21
|
-
if (source != null && __getOwnPropSymbols$
|
|
22
|
-
for (var prop of __getOwnPropSymbols$
|
|
23
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
21
|
+
if (source != null && __getOwnPropSymbols$7)
|
|
22
|
+
for (var prop of __getOwnPropSymbols$7(source)) {
|
|
23
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
|
|
24
24
|
target[prop] = source[prop];
|
|
25
25
|
}
|
|
26
26
|
return target;
|
|
@@ -34,7 +34,7 @@ class CodedError {
|
|
|
34
34
|
this.message = message;
|
|
35
35
|
}
|
|
36
36
|
static fromObject(_a) {
|
|
37
|
-
var _b = _a, { message } = _b, options = __objRest$
|
|
37
|
+
var _b = _a, { message } = _b, options = __objRest$3(_b, ["message"]);
|
|
38
38
|
return new CodedError(message, options);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -153,17 +153,17 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
153
153
|
RateCardStatus
|
|
154
154
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
155
155
|
|
|
156
|
-
var __getOwnPropSymbols$
|
|
157
|
-
var __hasOwnProp$
|
|
158
|
-
var __propIsEnum$
|
|
159
|
-
var __objRest$
|
|
156
|
+
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
157
|
+
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
158
|
+
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
159
|
+
var __objRest$2 = (source, exclude) => {
|
|
160
160
|
var target = {};
|
|
161
161
|
for (var prop in source)
|
|
162
|
-
if (__hasOwnProp$
|
|
162
|
+
if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
163
163
|
target[prop] = source[prop];
|
|
164
|
-
if (source != null && __getOwnPropSymbols$
|
|
165
|
-
for (var prop of __getOwnPropSymbols$
|
|
166
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
164
|
+
if (source != null && __getOwnPropSymbols$6)
|
|
165
|
+
for (var prop of __getOwnPropSymbols$6(source)) {
|
|
166
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
|
|
167
167
|
target[prop] = source[prop];
|
|
168
168
|
}
|
|
169
169
|
return target;
|
|
@@ -195,7 +195,7 @@ class AccountSettingsAPI {
|
|
|
195
195
|
* The `updateImage` method updates specific image data for a given image id.
|
|
196
196
|
*/
|
|
197
197
|
this.updateImage = (_a) => {
|
|
198
|
-
var _b = _a, { labelImageId } = _b, data = __objRest$
|
|
198
|
+
var _b = _a, { labelImageId } = _b, data = __objRest$2(_b, ["labelImageId"]);
|
|
199
199
|
return this.client.put(`/v1/account/settings/images/${labelImageId}`, data);
|
|
200
200
|
};
|
|
201
201
|
/**
|
|
@@ -1010,30 +1010,30 @@ const getEndUserIpAddress = () => __async$6(void 0, null, function* () {
|
|
|
1010
1010
|
var __defProp$4 = Object.defineProperty;
|
|
1011
1011
|
var __defProps$1 = Object.defineProperties;
|
|
1012
1012
|
var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
|
|
1013
|
-
var __getOwnPropSymbols$
|
|
1014
|
-
var __hasOwnProp$
|
|
1015
|
-
var __propIsEnum$
|
|
1013
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
1014
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
1015
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
1016
1016
|
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1017
1017
|
var __spreadValues$4 = (a, b) => {
|
|
1018
1018
|
for (var prop in b || (b = {}))
|
|
1019
|
-
if (__hasOwnProp$
|
|
1019
|
+
if (__hasOwnProp$5.call(b, prop))
|
|
1020
1020
|
__defNormalProp$4(a, prop, b[prop]);
|
|
1021
|
-
if (__getOwnPropSymbols$
|
|
1022
|
-
for (var prop of __getOwnPropSymbols$
|
|
1023
|
-
if (__propIsEnum$
|
|
1021
|
+
if (__getOwnPropSymbols$5)
|
|
1022
|
+
for (var prop of __getOwnPropSymbols$5(b)) {
|
|
1023
|
+
if (__propIsEnum$5.call(b, prop))
|
|
1024
1024
|
__defNormalProp$4(a, prop, b[prop]);
|
|
1025
1025
|
}
|
|
1026
1026
|
return a;
|
|
1027
1027
|
};
|
|
1028
1028
|
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
1029
|
-
var __objRest = (source, exclude) => {
|
|
1029
|
+
var __objRest$1 = (source, exclude) => {
|
|
1030
1030
|
var target = {};
|
|
1031
1031
|
for (var prop in source)
|
|
1032
|
-
if (__hasOwnProp$
|
|
1032
|
+
if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1033
1033
|
target[prop] = source[prop];
|
|
1034
|
-
if (source != null && __getOwnPropSymbols$
|
|
1035
|
-
for (var prop of __getOwnPropSymbols$
|
|
1036
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1034
|
+
if (source != null && __getOwnPropSymbols$5)
|
|
1035
|
+
for (var prop of __getOwnPropSymbols$5(source)) {
|
|
1036
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
|
|
1037
1037
|
target[prop] = source[prop];
|
|
1038
1038
|
}
|
|
1039
1039
|
return target;
|
|
@@ -1079,7 +1079,7 @@ class CarriersAPI {
|
|
|
1079
1079
|
* The `connect` method connects a carrier account to a user's ShipEngine account.
|
|
1080
1080
|
*/
|
|
1081
1081
|
this.connect = (_a) => __async$5(this, null, function* () {
|
|
1082
|
-
var _b = _a, { carrierCode } = _b, connection = __objRest(_b, ["carrierCode"]);
|
|
1082
|
+
var _b = _a, { carrierCode } = _b, connection = __objRest$1(_b, ["carrierCode"]);
|
|
1083
1083
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
1084
1084
|
if (!endUserIpAddress)
|
|
1085
1085
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
@@ -3525,17 +3525,17 @@ class CustomPackagesAPI {
|
|
|
3525
3525
|
}
|
|
3526
3526
|
|
|
3527
3527
|
var __defProp$3 = Object.defineProperty;
|
|
3528
|
-
var __getOwnPropSymbols$
|
|
3529
|
-
var __hasOwnProp$
|
|
3530
|
-
var __propIsEnum$
|
|
3528
|
+
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
3529
|
+
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
3530
|
+
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
3531
3531
|
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3532
3532
|
var __spreadValues$3 = (a, b) => {
|
|
3533
3533
|
for (var prop in b || (b = {}))
|
|
3534
|
-
if (__hasOwnProp$
|
|
3534
|
+
if (__hasOwnProp$4.call(b, prop))
|
|
3535
3535
|
__defNormalProp$3(a, prop, b[prop]);
|
|
3536
|
-
if (__getOwnPropSymbols$
|
|
3537
|
-
for (var prop of __getOwnPropSymbols$
|
|
3538
|
-
if (__propIsEnum$
|
|
3536
|
+
if (__getOwnPropSymbols$4)
|
|
3537
|
+
for (var prop of __getOwnPropSymbols$4(b)) {
|
|
3538
|
+
if (__propIsEnum$4.call(b, prop))
|
|
3539
3539
|
__defNormalProp$3(a, prop, b[prop]);
|
|
3540
3540
|
}
|
|
3541
3541
|
return a;
|
|
@@ -3720,6 +3720,21 @@ class LabelsAPI {
|
|
|
3720
3720
|
}
|
|
3721
3721
|
}
|
|
3722
3722
|
|
|
3723
|
+
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
3724
|
+
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
3725
|
+
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
3726
|
+
var __objRest = (source, exclude) => {
|
|
3727
|
+
var target = {};
|
|
3728
|
+
for (var prop in source)
|
|
3729
|
+
if (__hasOwnProp$3.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
3730
|
+
target[prop] = source[prop];
|
|
3731
|
+
if (source != null && __getOwnPropSymbols$3)
|
|
3732
|
+
for (var prop of __getOwnPropSymbols$3(source)) {
|
|
3733
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$3.call(source, prop))
|
|
3734
|
+
target[prop] = source[prop];
|
|
3735
|
+
}
|
|
3736
|
+
return target;
|
|
3737
|
+
};
|
|
3723
3738
|
class OrderSourcesAPI {
|
|
3724
3739
|
constructor(client) {
|
|
3725
3740
|
this.client = client;
|
|
@@ -3743,6 +3758,13 @@ class OrderSourcesAPI {
|
|
|
3743
3758
|
this.get = (orderSourceId) => {
|
|
3744
3759
|
return this.client.get(`/v-beta/order_sources/${orderSourceId}`);
|
|
3745
3760
|
};
|
|
3761
|
+
/**
|
|
3762
|
+
* The `update` method will allow the user to update a connected Order Source
|
|
3763
|
+
*/
|
|
3764
|
+
this.update = (_a) => {
|
|
3765
|
+
var _b = _a, { orderSourceId } = _b, rest = __objRest(_b, ["orderSourceId"]);
|
|
3766
|
+
return this.client.put(`/v-beta/order_sources/${orderSourceId}`, rest);
|
|
3767
|
+
};
|
|
3746
3768
|
/**
|
|
3747
3769
|
* The `refresh` method refreshes a specific order source by `orderSourceId`.
|
|
3748
3770
|
* This will pull in any `new orders` since the last order import.
|
package/index.mjs
CHANGED
|
@@ -6,17 +6,17 @@ var AccountBillingPlanChangeType = /* @__PURE__ */ ((AccountBillingPlanChangeTyp
|
|
|
6
6
|
return AccountBillingPlanChangeType2;
|
|
7
7
|
})(AccountBillingPlanChangeType || {});
|
|
8
8
|
|
|
9
|
-
var __getOwnPropSymbols$
|
|
10
|
-
var __hasOwnProp$
|
|
11
|
-
var __propIsEnum$
|
|
12
|
-
var __objRest$
|
|
9
|
+
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
10
|
+
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
12
|
+
var __objRest$3 = (source, exclude) => {
|
|
13
13
|
var target = {};
|
|
14
14
|
for (var prop in source)
|
|
15
|
-
if (__hasOwnProp$
|
|
15
|
+
if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
16
16
|
target[prop] = source[prop];
|
|
17
|
-
if (source != null && __getOwnPropSymbols$
|
|
18
|
-
for (var prop of __getOwnPropSymbols$
|
|
19
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
17
|
+
if (source != null && __getOwnPropSymbols$7)
|
|
18
|
+
for (var prop of __getOwnPropSymbols$7(source)) {
|
|
19
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
|
|
20
20
|
target[prop] = source[prop];
|
|
21
21
|
}
|
|
22
22
|
return target;
|
|
@@ -30,7 +30,7 @@ class CodedError {
|
|
|
30
30
|
this.message = message;
|
|
31
31
|
}
|
|
32
32
|
static fromObject(_a) {
|
|
33
|
-
var _b = _a, { message } = _b, options = __objRest$
|
|
33
|
+
var _b = _a, { message } = _b, options = __objRest$3(_b, ["message"]);
|
|
34
34
|
return new CodedError(message, options);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
@@ -149,17 +149,17 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
149
149
|
RateCardStatus
|
|
150
150
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
151
151
|
|
|
152
|
-
var __getOwnPropSymbols$
|
|
153
|
-
var __hasOwnProp$
|
|
154
|
-
var __propIsEnum$
|
|
155
|
-
var __objRest$
|
|
152
|
+
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
153
|
+
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
154
|
+
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
155
|
+
var __objRest$2 = (source, exclude) => {
|
|
156
156
|
var target = {};
|
|
157
157
|
for (var prop in source)
|
|
158
|
-
if (__hasOwnProp$
|
|
158
|
+
if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
159
159
|
target[prop] = source[prop];
|
|
160
|
-
if (source != null && __getOwnPropSymbols$
|
|
161
|
-
for (var prop of __getOwnPropSymbols$
|
|
162
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
160
|
+
if (source != null && __getOwnPropSymbols$6)
|
|
161
|
+
for (var prop of __getOwnPropSymbols$6(source)) {
|
|
162
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
|
|
163
163
|
target[prop] = source[prop];
|
|
164
164
|
}
|
|
165
165
|
return target;
|
|
@@ -191,7 +191,7 @@ class AccountSettingsAPI {
|
|
|
191
191
|
* The `updateImage` method updates specific image data for a given image id.
|
|
192
192
|
*/
|
|
193
193
|
this.updateImage = (_a) => {
|
|
194
|
-
var _b = _a, { labelImageId } = _b, data = __objRest$
|
|
194
|
+
var _b = _a, { labelImageId } = _b, data = __objRest$2(_b, ["labelImageId"]);
|
|
195
195
|
return this.client.put(`/v1/account/settings/images/${labelImageId}`, data);
|
|
196
196
|
};
|
|
197
197
|
/**
|
|
@@ -1006,30 +1006,30 @@ const getEndUserIpAddress = () => __async$6(void 0, null, function* () {
|
|
|
1006
1006
|
var __defProp$4 = Object.defineProperty;
|
|
1007
1007
|
var __defProps$1 = Object.defineProperties;
|
|
1008
1008
|
var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
|
|
1009
|
-
var __getOwnPropSymbols$
|
|
1010
|
-
var __hasOwnProp$
|
|
1011
|
-
var __propIsEnum$
|
|
1009
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
1010
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
1011
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
1012
1012
|
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1013
1013
|
var __spreadValues$4 = (a, b) => {
|
|
1014
1014
|
for (var prop in b || (b = {}))
|
|
1015
|
-
if (__hasOwnProp$
|
|
1015
|
+
if (__hasOwnProp$5.call(b, prop))
|
|
1016
1016
|
__defNormalProp$4(a, prop, b[prop]);
|
|
1017
|
-
if (__getOwnPropSymbols$
|
|
1018
|
-
for (var prop of __getOwnPropSymbols$
|
|
1019
|
-
if (__propIsEnum$
|
|
1017
|
+
if (__getOwnPropSymbols$5)
|
|
1018
|
+
for (var prop of __getOwnPropSymbols$5(b)) {
|
|
1019
|
+
if (__propIsEnum$5.call(b, prop))
|
|
1020
1020
|
__defNormalProp$4(a, prop, b[prop]);
|
|
1021
1021
|
}
|
|
1022
1022
|
return a;
|
|
1023
1023
|
};
|
|
1024
1024
|
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
1025
|
-
var __objRest = (source, exclude) => {
|
|
1025
|
+
var __objRest$1 = (source, exclude) => {
|
|
1026
1026
|
var target = {};
|
|
1027
1027
|
for (var prop in source)
|
|
1028
|
-
if (__hasOwnProp$
|
|
1028
|
+
if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1029
1029
|
target[prop] = source[prop];
|
|
1030
|
-
if (source != null && __getOwnPropSymbols$
|
|
1031
|
-
for (var prop of __getOwnPropSymbols$
|
|
1032
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1030
|
+
if (source != null && __getOwnPropSymbols$5)
|
|
1031
|
+
for (var prop of __getOwnPropSymbols$5(source)) {
|
|
1032
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
|
|
1033
1033
|
target[prop] = source[prop];
|
|
1034
1034
|
}
|
|
1035
1035
|
return target;
|
|
@@ -1075,7 +1075,7 @@ class CarriersAPI {
|
|
|
1075
1075
|
* The `connect` method connects a carrier account to a user's ShipEngine account.
|
|
1076
1076
|
*/
|
|
1077
1077
|
this.connect = (_a) => __async$5(this, null, function* () {
|
|
1078
|
-
var _b = _a, { carrierCode } = _b, connection = __objRest(_b, ["carrierCode"]);
|
|
1078
|
+
var _b = _a, { carrierCode } = _b, connection = __objRest$1(_b, ["carrierCode"]);
|
|
1079
1079
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
1080
1080
|
if (!endUserIpAddress)
|
|
1081
1081
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
@@ -3521,17 +3521,17 @@ class CustomPackagesAPI {
|
|
|
3521
3521
|
}
|
|
3522
3522
|
|
|
3523
3523
|
var __defProp$3 = Object.defineProperty;
|
|
3524
|
-
var __getOwnPropSymbols$
|
|
3525
|
-
var __hasOwnProp$
|
|
3526
|
-
var __propIsEnum$
|
|
3524
|
+
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
3525
|
+
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
3526
|
+
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
3527
3527
|
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3528
3528
|
var __spreadValues$3 = (a, b) => {
|
|
3529
3529
|
for (var prop in b || (b = {}))
|
|
3530
|
-
if (__hasOwnProp$
|
|
3530
|
+
if (__hasOwnProp$4.call(b, prop))
|
|
3531
3531
|
__defNormalProp$3(a, prop, b[prop]);
|
|
3532
|
-
if (__getOwnPropSymbols$
|
|
3533
|
-
for (var prop of __getOwnPropSymbols$
|
|
3534
|
-
if (__propIsEnum$
|
|
3532
|
+
if (__getOwnPropSymbols$4)
|
|
3533
|
+
for (var prop of __getOwnPropSymbols$4(b)) {
|
|
3534
|
+
if (__propIsEnum$4.call(b, prop))
|
|
3535
3535
|
__defNormalProp$3(a, prop, b[prop]);
|
|
3536
3536
|
}
|
|
3537
3537
|
return a;
|
|
@@ -3716,6 +3716,21 @@ class LabelsAPI {
|
|
|
3716
3716
|
}
|
|
3717
3717
|
}
|
|
3718
3718
|
|
|
3719
|
+
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
3720
|
+
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
3721
|
+
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
3722
|
+
var __objRest = (source, exclude) => {
|
|
3723
|
+
var target = {};
|
|
3724
|
+
for (var prop in source)
|
|
3725
|
+
if (__hasOwnProp$3.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
3726
|
+
target[prop] = source[prop];
|
|
3727
|
+
if (source != null && __getOwnPropSymbols$3)
|
|
3728
|
+
for (var prop of __getOwnPropSymbols$3(source)) {
|
|
3729
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$3.call(source, prop))
|
|
3730
|
+
target[prop] = source[prop];
|
|
3731
|
+
}
|
|
3732
|
+
return target;
|
|
3733
|
+
};
|
|
3719
3734
|
class OrderSourcesAPI {
|
|
3720
3735
|
constructor(client) {
|
|
3721
3736
|
this.client = client;
|
|
@@ -3739,6 +3754,13 @@ class OrderSourcesAPI {
|
|
|
3739
3754
|
this.get = (orderSourceId) => {
|
|
3740
3755
|
return this.client.get(`/v-beta/order_sources/${orderSourceId}`);
|
|
3741
3756
|
};
|
|
3757
|
+
/**
|
|
3758
|
+
* The `update` method will allow the user to update a connected Order Source
|
|
3759
|
+
*/
|
|
3760
|
+
this.update = (_a) => {
|
|
3761
|
+
var _b = _a, { orderSourceId } = _b, rest = __objRest(_b, ["orderSourceId"]);
|
|
3762
|
+
return this.client.put(`/v-beta/order_sources/${orderSourceId}`, rest);
|
|
3763
|
+
};
|
|
3742
3764
|
/**
|
|
3743
3765
|
* The `refresh` method refreshes a specific order source by `orderSourceId`.
|
|
3744
3766
|
* This will pull in any `new orders` since the last order import.
|
package/order-sources/api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
|
-
import { OrderSource, OrderSourceConnection } from "./types";
|
|
2
|
+
import { OrderSource, OrderSourceConnection, OrderSourceEditParams } from "./types";
|
|
3
3
|
/**
|
|
4
4
|
* # Order Sources API module - /v-beta/order_sources
|
|
5
5
|
*/
|
|
@@ -22,6 +22,10 @@ export declare class OrderSourcesAPI {
|
|
|
22
22
|
* The `get` method retrieves a specific order source by `orderSourceId`.
|
|
23
23
|
*/
|
|
24
24
|
get: (orderSourceId: string) => Promise<import("axios").AxiosResponse<OrderSource, any>>;
|
|
25
|
+
/**
|
|
26
|
+
* The `update` method will allow the user to update a connected Order Source
|
|
27
|
+
*/
|
|
28
|
+
update: ({ orderSourceId, ...rest }: OrderSourceEditParams) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
25
29
|
/**
|
|
26
30
|
* The `refresh` method refreshes a specific order source by `orderSourceId`.
|
|
27
31
|
* This will pull in any `new orders` since the last order import.
|
package/order-sources/types.d.ts
CHANGED