@shipengine/js-api 4.5.0 → 4.6.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/connections/api.d.ts +7 -1
- package/connections/types.d.ts +11 -0
- package/index.js +65 -34
- package/index.mjs +65 -34
- package/package.json +1 -1
- package/utilities/casing.d.ts +1 -1
package/connections/api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
|
-
import { CarrierServicesListResponse, ConnectCarrierAccount, ConnectCarrierAccountResponse, ConnectionsCarrierName, ConnectionsCarrierSettingsData, ConnectionsCarrierSettingsResponse, GetCarrierConnectionFormParams, GetCarrierConnectionFormResponse, ListCarrierConnectionsParams, ListCarrierConnectionsResponse } from "./types";
|
|
2
|
+
import { CarrierServicesListResponse, ConnectCarrierAccount, ConnectCarrierAccountResponse, ConnectionsCarrierName, ConnectionsCarrierSettingsData, ConnectionsCarrierSettingsResponse, GetCarrierConnectionFormParams, GetCarrierConnectionFormResponse, ListCarrierConnectionsParams, ListCarrierConnectionsResponse, RequestStampsAccountUrlParams, RequestStampsAccountUrlResponse } from "./types";
|
|
3
3
|
/**
|
|
4
4
|
* # Connections API module - /v1/connections
|
|
5
5
|
*/
|
|
@@ -34,4 +34,10 @@ export declare class ConnectionsAPI {
|
|
|
34
34
|
* identified by the `carrierName` and `carrierId`.
|
|
35
35
|
*/
|
|
36
36
|
updateCarrierSettings: <T extends ConnectionsCarrierName>(carrierName: T, carrierId: string, formData: ConnectionsCarrierSettingsData<T>) => Promise<import("axios").AxiosResponse<void, any>>;
|
|
37
|
+
/**
|
|
38
|
+
* The `requestStampsAccountUrls` method request the Web Client Home URL from Stamps for a given
|
|
39
|
+
* Stamps SE Carrier ID
|
|
40
|
+
* @docs https://auctane.atlassian.net/wiki/spaces/SEEU/pages/6228738069/ENGINE-9471+Endicia+web+client+communication
|
|
41
|
+
*/
|
|
42
|
+
requestStampsAccountUrls: ({ carrierId, ...rest }: RequestStampsAccountUrlParams) => Promise<import("axios").AxiosResponse<RequestStampsAccountUrlResponse, any>>;
|
|
37
43
|
}
|
package/connections/types.d.ts
CHANGED
|
@@ -16,14 +16,25 @@ export type CarrierMetadata = {
|
|
|
16
16
|
name: string;
|
|
17
17
|
searchTerms?: string[] | null;
|
|
18
18
|
};
|
|
19
|
+
export type StampsAccountUrlTypes = "account_settings" | "report_balances" | "manifest_form" | "payment_methods" | "web_client_home";
|
|
19
20
|
export type ListCarrierConnectionsParams = LocaleBasedQuery;
|
|
20
21
|
export type GetCarrierConnectionFormParams = LocaleBasedQuery;
|
|
22
|
+
export type RequestStampsAccountUrlParams = {
|
|
23
|
+
carrierId: string;
|
|
24
|
+
urlTypes: StampsAccountUrlTypes[];
|
|
25
|
+
};
|
|
21
26
|
export type ConnectCarrierAccount = {
|
|
22
27
|
nickname: string;
|
|
23
28
|
} & GenericObject;
|
|
24
29
|
/**
|
|
25
30
|
* @category Responses
|
|
26
31
|
*/
|
|
32
|
+
export type RequestStampsAccountUrlResponse = {
|
|
33
|
+
urls: Array<{
|
|
34
|
+
url: string;
|
|
35
|
+
urlType: string;
|
|
36
|
+
}>;
|
|
37
|
+
};
|
|
27
38
|
export type GetCarrierConnectionFormResponse = {
|
|
28
39
|
formMetadata: {
|
|
29
40
|
connectionNames?: string[] | null;
|
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$8 = Object.getOwnPropertySymbols;
|
|
14
|
+
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
15
|
+
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
16
|
+
var __objRest$5 = (source, exclude) => {
|
|
17
17
|
var target = {};
|
|
18
18
|
for (var prop in source)
|
|
19
|
-
if (__hasOwnProp$
|
|
19
|
+
if (__hasOwnProp$8.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$8)
|
|
22
|
+
for (var prop of __getOwnPropSymbols$8(source)) {
|
|
23
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$8.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$5(_b, ["message"]);
|
|
38
38
|
return new CodedError(message, options);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -155,17 +155,17 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
155
155
|
RateCardStatus
|
|
156
156
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
157
157
|
|
|
158
|
-
var __getOwnPropSymbols$
|
|
159
|
-
var __hasOwnProp$
|
|
160
|
-
var __propIsEnum$
|
|
161
|
-
var __objRest$
|
|
158
|
+
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
159
|
+
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
160
|
+
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
161
|
+
var __objRest$4 = (source, exclude) => {
|
|
162
162
|
var target = {};
|
|
163
163
|
for (var prop in source)
|
|
164
|
-
if (__hasOwnProp$
|
|
164
|
+
if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
165
165
|
target[prop] = source[prop];
|
|
166
|
-
if (source != null && __getOwnPropSymbols$
|
|
167
|
-
for (var prop of __getOwnPropSymbols$
|
|
168
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
166
|
+
if (source != null && __getOwnPropSymbols$7)
|
|
167
|
+
for (var prop of __getOwnPropSymbols$7(source)) {
|
|
168
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
|
|
169
169
|
target[prop] = source[prop];
|
|
170
170
|
}
|
|
171
171
|
return target;
|
|
@@ -197,7 +197,7 @@ class AccountSettingsAPI {
|
|
|
197
197
|
* The `updateImage` method updates specific image data for a given image id.
|
|
198
198
|
*/
|
|
199
199
|
this.updateImage = (_a) => {
|
|
200
|
-
var _b = _a, { labelImageId } = _b, data = __objRest$
|
|
200
|
+
var _b = _a, { labelImageId } = _b, data = __objRest$4(_b, ["labelImageId"]);
|
|
201
201
|
return this.client.put(`/v1/account/settings/images/${labelImageId}`, data);
|
|
202
202
|
};
|
|
203
203
|
/**
|
|
@@ -1071,9 +1071,9 @@ const getEndUserIpAddress = () => __async$7(void 0, null, function* () {
|
|
|
1071
1071
|
}
|
|
1072
1072
|
});
|
|
1073
1073
|
|
|
1074
|
-
const camelizeKeys = (obj) => {
|
|
1074
|
+
const camelizeKeys = (obj, parentKey) => {
|
|
1075
1075
|
if (Array.isArray(obj)) {
|
|
1076
|
-
return obj.map(camelizeKeys);
|
|
1076
|
+
return obj.map((item) => camelizeKeys(item, parentKey));
|
|
1077
1077
|
} else if (obj !== null && typeof obj === "object") {
|
|
1078
1078
|
const newObj = {};
|
|
1079
1079
|
for (const key in obj) {
|
|
@@ -1093,7 +1093,11 @@ const camelizeKeys = (obj) => {
|
|
|
1093
1093
|
newKey += char;
|
|
1094
1094
|
}
|
|
1095
1095
|
}
|
|
1096
|
-
|
|
1096
|
+
if (parentKey === "formSchema" && ["jsonSchema", "uiSchema", "brandedContent"].includes(newKey)) {
|
|
1097
|
+
newObj[newKey] = obj[key];
|
|
1098
|
+
} else {
|
|
1099
|
+
newObj[newKey] = camelizeKeys(obj[key], newKey);
|
|
1100
|
+
}
|
|
1097
1101
|
}
|
|
1098
1102
|
}
|
|
1099
1103
|
return newObj;
|
|
@@ -1119,30 +1123,30 @@ const decamelizeKeys = (obj, separator = "_") => {
|
|
|
1119
1123
|
var __defProp$4 = Object.defineProperty;
|
|
1120
1124
|
var __defProps$1 = Object.defineProperties;
|
|
1121
1125
|
var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
|
|
1122
|
-
var __getOwnPropSymbols$
|
|
1123
|
-
var __hasOwnProp$
|
|
1124
|
-
var __propIsEnum$
|
|
1126
|
+
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
1127
|
+
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
1128
|
+
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
1125
1129
|
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1126
1130
|
var __spreadValues$4 = (a, b) => {
|
|
1127
1131
|
for (var prop in b || (b = {}))
|
|
1128
|
-
if (__hasOwnProp$
|
|
1132
|
+
if (__hasOwnProp$6.call(b, prop))
|
|
1129
1133
|
__defNormalProp$4(a, prop, b[prop]);
|
|
1130
|
-
if (__getOwnPropSymbols$
|
|
1131
|
-
for (var prop of __getOwnPropSymbols$
|
|
1132
|
-
if (__propIsEnum$
|
|
1134
|
+
if (__getOwnPropSymbols$6)
|
|
1135
|
+
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
1136
|
+
if (__propIsEnum$6.call(b, prop))
|
|
1133
1137
|
__defNormalProp$4(a, prop, b[prop]);
|
|
1134
1138
|
}
|
|
1135
1139
|
return a;
|
|
1136
1140
|
};
|
|
1137
1141
|
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
1138
|
-
var __objRest$
|
|
1142
|
+
var __objRest$3 = (source, exclude) => {
|
|
1139
1143
|
var target = {};
|
|
1140
1144
|
for (var prop in source)
|
|
1141
|
-
if (__hasOwnProp$
|
|
1145
|
+
if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1142
1146
|
target[prop] = source[prop];
|
|
1143
|
-
if (source != null && __getOwnPropSymbols$
|
|
1144
|
-
for (var prop of __getOwnPropSymbols$
|
|
1145
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1147
|
+
if (source != null && __getOwnPropSymbols$6)
|
|
1148
|
+
for (var prop of __getOwnPropSymbols$6(source)) {
|
|
1149
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
|
|
1146
1150
|
target[prop] = source[prop];
|
|
1147
1151
|
}
|
|
1148
1152
|
return target;
|
|
@@ -1188,7 +1192,7 @@ class CarriersAPI {
|
|
|
1188
1192
|
* The `connect` method connects a carrier account to a user's ShipEngine account.
|
|
1189
1193
|
*/
|
|
1190
1194
|
this.connect = (_a) => __async$6(this, null, function* () {
|
|
1191
|
-
var _b = _a, { carrierCode } = _b, connection = __objRest$
|
|
1195
|
+
var _b = _a, { carrierCode } = _b, connection = __objRest$3(_b, ["carrierCode"]);
|
|
1192
1196
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
1193
1197
|
if (!endUserIpAddress)
|
|
1194
1198
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
@@ -1278,6 +1282,21 @@ class CarriersAPI {
|
|
|
1278
1282
|
}
|
|
1279
1283
|
}
|
|
1280
1284
|
|
|
1285
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
1286
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
1287
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
1288
|
+
var __objRest$2 = (source, exclude) => {
|
|
1289
|
+
var target = {};
|
|
1290
|
+
for (var prop in source)
|
|
1291
|
+
if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1292
|
+
target[prop] = source[prop];
|
|
1293
|
+
if (source != null && __getOwnPropSymbols$5)
|
|
1294
|
+
for (var prop of __getOwnPropSymbols$5(source)) {
|
|
1295
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
|
|
1296
|
+
target[prop] = source[prop];
|
|
1297
|
+
}
|
|
1298
|
+
return target;
|
|
1299
|
+
};
|
|
1281
1300
|
var __async$5 = (__this, __arguments, generator) => {
|
|
1282
1301
|
return new Promise((resolve, reject) => {
|
|
1283
1302
|
var fulfilled = (value) => {
|
|
@@ -1362,6 +1381,18 @@ class ConnectionsAPI {
|
|
|
1362
1381
|
formData
|
|
1363
1382
|
);
|
|
1364
1383
|
};
|
|
1384
|
+
/**
|
|
1385
|
+
* The `requestStampsAccountUrls` method request the Web Client Home URL from Stamps for a given
|
|
1386
|
+
* Stamps SE Carrier ID
|
|
1387
|
+
* @docs https://auctane.atlassian.net/wiki/spaces/SEEU/pages/6228738069/ENGINE-9471+Endicia+web+client+communication
|
|
1388
|
+
*/
|
|
1389
|
+
this.requestStampsAccountUrls = (_a) => {
|
|
1390
|
+
var _b = _a, { carrierId } = _b, rest = __objRest$2(_b, ["carrierId"]);
|
|
1391
|
+
return this.client.put(
|
|
1392
|
+
`v1/connections/carriers/stamps_com/${carrierId}/request_account_url`,
|
|
1393
|
+
rest
|
|
1394
|
+
);
|
|
1395
|
+
};
|
|
1365
1396
|
this.client = client;
|
|
1366
1397
|
}
|
|
1367
1398
|
}
|
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$8 = Object.getOwnPropertySymbols;
|
|
10
|
+
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
12
|
+
var __objRest$5 = (source, exclude) => {
|
|
13
13
|
var target = {};
|
|
14
14
|
for (var prop in source)
|
|
15
|
-
if (__hasOwnProp$
|
|
15
|
+
if (__hasOwnProp$8.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$8)
|
|
18
|
+
for (var prop of __getOwnPropSymbols$8(source)) {
|
|
19
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$8.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$5(_b, ["message"]);
|
|
34
34
|
return new CodedError(message, options);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
@@ -151,17 +151,17 @@ const types = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
151
151
|
RateCardStatus
|
|
152
152
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
153
153
|
|
|
154
|
-
var __getOwnPropSymbols$
|
|
155
|
-
var __hasOwnProp$
|
|
156
|
-
var __propIsEnum$
|
|
157
|
-
var __objRest$
|
|
154
|
+
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
155
|
+
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
156
|
+
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
157
|
+
var __objRest$4 = (source, exclude) => {
|
|
158
158
|
var target = {};
|
|
159
159
|
for (var prop in source)
|
|
160
|
-
if (__hasOwnProp$
|
|
160
|
+
if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
161
161
|
target[prop] = source[prop];
|
|
162
|
-
if (source != null && __getOwnPropSymbols$
|
|
163
|
-
for (var prop of __getOwnPropSymbols$
|
|
164
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
162
|
+
if (source != null && __getOwnPropSymbols$7)
|
|
163
|
+
for (var prop of __getOwnPropSymbols$7(source)) {
|
|
164
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
|
|
165
165
|
target[prop] = source[prop];
|
|
166
166
|
}
|
|
167
167
|
return target;
|
|
@@ -193,7 +193,7 @@ class AccountSettingsAPI {
|
|
|
193
193
|
* The `updateImage` method updates specific image data for a given image id.
|
|
194
194
|
*/
|
|
195
195
|
this.updateImage = (_a) => {
|
|
196
|
-
var _b = _a, { labelImageId } = _b, data = __objRest$
|
|
196
|
+
var _b = _a, { labelImageId } = _b, data = __objRest$4(_b, ["labelImageId"]);
|
|
197
197
|
return this.client.put(`/v1/account/settings/images/${labelImageId}`, data);
|
|
198
198
|
};
|
|
199
199
|
/**
|
|
@@ -1067,9 +1067,9 @@ const getEndUserIpAddress = () => __async$7(void 0, null, function* () {
|
|
|
1067
1067
|
}
|
|
1068
1068
|
});
|
|
1069
1069
|
|
|
1070
|
-
const camelizeKeys = (obj) => {
|
|
1070
|
+
const camelizeKeys = (obj, parentKey) => {
|
|
1071
1071
|
if (Array.isArray(obj)) {
|
|
1072
|
-
return obj.map(camelizeKeys);
|
|
1072
|
+
return obj.map((item) => camelizeKeys(item, parentKey));
|
|
1073
1073
|
} else if (obj !== null && typeof obj === "object") {
|
|
1074
1074
|
const newObj = {};
|
|
1075
1075
|
for (const key in obj) {
|
|
@@ -1089,7 +1089,11 @@ const camelizeKeys = (obj) => {
|
|
|
1089
1089
|
newKey += char;
|
|
1090
1090
|
}
|
|
1091
1091
|
}
|
|
1092
|
-
|
|
1092
|
+
if (parentKey === "formSchema" && ["jsonSchema", "uiSchema", "brandedContent"].includes(newKey)) {
|
|
1093
|
+
newObj[newKey] = obj[key];
|
|
1094
|
+
} else {
|
|
1095
|
+
newObj[newKey] = camelizeKeys(obj[key], newKey);
|
|
1096
|
+
}
|
|
1093
1097
|
}
|
|
1094
1098
|
}
|
|
1095
1099
|
return newObj;
|
|
@@ -1115,30 +1119,30 @@ const decamelizeKeys = (obj, separator = "_") => {
|
|
|
1115
1119
|
var __defProp$4 = Object.defineProperty;
|
|
1116
1120
|
var __defProps$1 = Object.defineProperties;
|
|
1117
1121
|
var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
|
|
1118
|
-
var __getOwnPropSymbols$
|
|
1119
|
-
var __hasOwnProp$
|
|
1120
|
-
var __propIsEnum$
|
|
1122
|
+
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
1123
|
+
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
1124
|
+
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
1121
1125
|
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1122
1126
|
var __spreadValues$4 = (a, b) => {
|
|
1123
1127
|
for (var prop in b || (b = {}))
|
|
1124
|
-
if (__hasOwnProp$
|
|
1128
|
+
if (__hasOwnProp$6.call(b, prop))
|
|
1125
1129
|
__defNormalProp$4(a, prop, b[prop]);
|
|
1126
|
-
if (__getOwnPropSymbols$
|
|
1127
|
-
for (var prop of __getOwnPropSymbols$
|
|
1128
|
-
if (__propIsEnum$
|
|
1130
|
+
if (__getOwnPropSymbols$6)
|
|
1131
|
+
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
1132
|
+
if (__propIsEnum$6.call(b, prop))
|
|
1129
1133
|
__defNormalProp$4(a, prop, b[prop]);
|
|
1130
1134
|
}
|
|
1131
1135
|
return a;
|
|
1132
1136
|
};
|
|
1133
1137
|
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
1134
|
-
var __objRest$
|
|
1138
|
+
var __objRest$3 = (source, exclude) => {
|
|
1135
1139
|
var target = {};
|
|
1136
1140
|
for (var prop in source)
|
|
1137
|
-
if (__hasOwnProp$
|
|
1141
|
+
if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1138
1142
|
target[prop] = source[prop];
|
|
1139
|
-
if (source != null && __getOwnPropSymbols$
|
|
1140
|
-
for (var prop of __getOwnPropSymbols$
|
|
1141
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
1143
|
+
if (source != null && __getOwnPropSymbols$6)
|
|
1144
|
+
for (var prop of __getOwnPropSymbols$6(source)) {
|
|
1145
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
|
|
1142
1146
|
target[prop] = source[prop];
|
|
1143
1147
|
}
|
|
1144
1148
|
return target;
|
|
@@ -1184,7 +1188,7 @@ class CarriersAPI {
|
|
|
1184
1188
|
* The `connect` method connects a carrier account to a user's ShipEngine account.
|
|
1185
1189
|
*/
|
|
1186
1190
|
this.connect = (_a) => __async$6(this, null, function* () {
|
|
1187
|
-
var _b = _a, { carrierCode } = _b, connection = __objRest$
|
|
1191
|
+
var _b = _a, { carrierCode } = _b, connection = __objRest$3(_b, ["carrierCode"]);
|
|
1188
1192
|
const endUserIpAddress = yield getEndUserIpAddress();
|
|
1189
1193
|
if (!endUserIpAddress)
|
|
1190
1194
|
return Promise.reject([new CodedError("Unable to get IP address")]);
|
|
@@ -1274,6 +1278,21 @@ class CarriersAPI {
|
|
|
1274
1278
|
}
|
|
1275
1279
|
}
|
|
1276
1280
|
|
|
1281
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
1282
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
1283
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
1284
|
+
var __objRest$2 = (source, exclude) => {
|
|
1285
|
+
var target = {};
|
|
1286
|
+
for (var prop in source)
|
|
1287
|
+
if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1288
|
+
target[prop] = source[prop];
|
|
1289
|
+
if (source != null && __getOwnPropSymbols$5)
|
|
1290
|
+
for (var prop of __getOwnPropSymbols$5(source)) {
|
|
1291
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
|
|
1292
|
+
target[prop] = source[prop];
|
|
1293
|
+
}
|
|
1294
|
+
return target;
|
|
1295
|
+
};
|
|
1277
1296
|
var __async$5 = (__this, __arguments, generator) => {
|
|
1278
1297
|
return new Promise((resolve, reject) => {
|
|
1279
1298
|
var fulfilled = (value) => {
|
|
@@ -1358,6 +1377,18 @@ class ConnectionsAPI {
|
|
|
1358
1377
|
formData
|
|
1359
1378
|
);
|
|
1360
1379
|
};
|
|
1380
|
+
/**
|
|
1381
|
+
* The `requestStampsAccountUrls` method request the Web Client Home URL from Stamps for a given
|
|
1382
|
+
* Stamps SE Carrier ID
|
|
1383
|
+
* @docs https://auctane.atlassian.net/wiki/spaces/SEEU/pages/6228738069/ENGINE-9471+Endicia+web+client+communication
|
|
1384
|
+
*/
|
|
1385
|
+
this.requestStampsAccountUrls = (_a) => {
|
|
1386
|
+
var _b = _a, { carrierId } = _b, rest = __objRest$2(_b, ["carrierId"]);
|
|
1387
|
+
return this.client.put(
|
|
1388
|
+
`v1/connections/carriers/stamps_com/${carrierId}/request_account_url`,
|
|
1389
|
+
rest
|
|
1390
|
+
);
|
|
1391
|
+
};
|
|
1361
1392
|
this.client = client;
|
|
1362
1393
|
}
|
|
1363
1394
|
}
|
package/package.json
CHANGED
package/utilities/casing.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const camelizeKeys: (obj: any) => any;
|
|
1
|
+
export declare const camelizeKeys: (obj: any, parentKey?: string) => any;
|
|
2
2
|
export declare const decamelizeKeys: (obj: any, separator?: string) => any;
|