@shipengine/js-api 2.0.0 → 2.1.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 +4 -4
- package/index.js +16 -10
- package/index.mjs +16 -10
- package/package.json +1 -1
- package/sellers/api.d.ts +2 -1
package/connections/api.d.ts
CHANGED
|
@@ -26,12 +26,12 @@ export declare class ConnectionsAPI {
|
|
|
26
26
|
getCarrierConnectionsServicesList: (carrierCode: string) => Promise<import("axios").AxiosResponse<CarrierServicesListResponse, any>>;
|
|
27
27
|
/**
|
|
28
28
|
* The `getCarrierSettings` method retrieves the settings for a given carrier,
|
|
29
|
-
* identified by the `carrierName` and `
|
|
29
|
+
* identified by the `carrierName` and `carrierId`.
|
|
30
30
|
*/
|
|
31
|
-
getCarrierSettings: <T extends ConnectionsCarrierName>(carrierName: T,
|
|
31
|
+
getCarrierSettings: <T extends ConnectionsCarrierName>(carrierName: T, carrierId: string) => Promise<import("axios").AxiosResponse<ConnectionsCarrierSettingsResponse<T>, any>>;
|
|
32
32
|
/**
|
|
33
33
|
* The `updateCarrierSettings` method updates the settings for a given carrier,
|
|
34
|
-
* identified by the `carrierName` and `
|
|
34
|
+
* identified by the `carrierName` and `carrierId`.
|
|
35
35
|
*/
|
|
36
|
-
updateCarrierSettings: <T extends ConnectionsCarrierName>(carrierName: T,
|
|
36
|
+
updateCarrierSettings: <T extends ConnectionsCarrierName>(carrierName: T, carrierId: string, formData: ConnectionsCarrierSettingsData<T>) => Promise<import("axios").AxiosResponse<void, any>>;
|
|
37
37
|
}
|
package/index.js
CHANGED
|
@@ -1225,20 +1225,20 @@ class ConnectionsAPI {
|
|
|
1225
1225
|
};
|
|
1226
1226
|
/**
|
|
1227
1227
|
* The `getCarrierSettings` method retrieves the settings for a given carrier,
|
|
1228
|
-
* identified by the `carrierName` and `
|
|
1228
|
+
* identified by the `carrierName` and `carrierId`.
|
|
1229
1229
|
*/
|
|
1230
|
-
this.getCarrierSettings = (carrierName,
|
|
1230
|
+
this.getCarrierSettings = (carrierName, carrierId) => {
|
|
1231
1231
|
return this.client.get(
|
|
1232
|
-
`/v1/connections/carriers/${carrierName}/${
|
|
1232
|
+
`/v1/connections/carriers/${carrierName}/${carrierId}/settings`
|
|
1233
1233
|
);
|
|
1234
1234
|
};
|
|
1235
1235
|
/**
|
|
1236
1236
|
* The `updateCarrierSettings` method updates the settings for a given carrier,
|
|
1237
|
-
* identified by the `carrierName` and `
|
|
1237
|
+
* identified by the `carrierName` and `carrierId`.
|
|
1238
1238
|
*/
|
|
1239
|
-
this.updateCarrierSettings = (carrierName,
|
|
1239
|
+
this.updateCarrierSettings = (carrierName, carrierId, formData) => {
|
|
1240
1240
|
return this.client.put(
|
|
1241
|
-
`/v1/connections/carriers/${carrierName}/${
|
|
1241
|
+
`/v1/connections/carriers/${carrierName}/${carrierId}/settings`,
|
|
1242
1242
|
formData
|
|
1243
1243
|
);
|
|
1244
1244
|
};
|
|
@@ -3875,10 +3875,16 @@ class SellersAPI {
|
|
|
3875
3875
|
/**
|
|
3876
3876
|
* Adds sandbox carriers to a seller, you can pass in a flag to try to reuse the carrier connection.
|
|
3877
3877
|
*/
|
|
3878
|
-
this.addSandboxCarriers = (
|
|
3879
|
-
return this.client.post(
|
|
3880
|
-
|
|
3881
|
-
|
|
3878
|
+
this.addSandboxCarriers = (props) => {
|
|
3879
|
+
return this.client.post(
|
|
3880
|
+
`/v1/sellers/add_sandbox_carriers/${props.sellerId}`,
|
|
3881
|
+
{
|
|
3882
|
+
tryReuseCarrierConnection: props.tryReuseCarrierConnection
|
|
3883
|
+
},
|
|
3884
|
+
{
|
|
3885
|
+
isSandbox: props.isSandbox
|
|
3886
|
+
}
|
|
3887
|
+
);
|
|
3882
3888
|
};
|
|
3883
3889
|
this.client = client;
|
|
3884
3890
|
}
|
package/index.mjs
CHANGED
|
@@ -1221,20 +1221,20 @@ class ConnectionsAPI {
|
|
|
1221
1221
|
};
|
|
1222
1222
|
/**
|
|
1223
1223
|
* The `getCarrierSettings` method retrieves the settings for a given carrier,
|
|
1224
|
-
* identified by the `carrierName` and `
|
|
1224
|
+
* identified by the `carrierName` and `carrierId`.
|
|
1225
1225
|
*/
|
|
1226
|
-
this.getCarrierSettings = (carrierName,
|
|
1226
|
+
this.getCarrierSettings = (carrierName, carrierId) => {
|
|
1227
1227
|
return this.client.get(
|
|
1228
|
-
`/v1/connections/carriers/${carrierName}/${
|
|
1228
|
+
`/v1/connections/carriers/${carrierName}/${carrierId}/settings`
|
|
1229
1229
|
);
|
|
1230
1230
|
};
|
|
1231
1231
|
/**
|
|
1232
1232
|
* The `updateCarrierSettings` method updates the settings for a given carrier,
|
|
1233
|
-
* identified by the `carrierName` and `
|
|
1233
|
+
* identified by the `carrierName` and `carrierId`.
|
|
1234
1234
|
*/
|
|
1235
|
-
this.updateCarrierSettings = (carrierName,
|
|
1235
|
+
this.updateCarrierSettings = (carrierName, carrierId, formData) => {
|
|
1236
1236
|
return this.client.put(
|
|
1237
|
-
`/v1/connections/carriers/${carrierName}/${
|
|
1237
|
+
`/v1/connections/carriers/${carrierName}/${carrierId}/settings`,
|
|
1238
1238
|
formData
|
|
1239
1239
|
);
|
|
1240
1240
|
};
|
|
@@ -3871,10 +3871,16 @@ class SellersAPI {
|
|
|
3871
3871
|
/**
|
|
3872
3872
|
* Adds sandbox carriers to a seller, you can pass in a flag to try to reuse the carrier connection.
|
|
3873
3873
|
*/
|
|
3874
|
-
this.addSandboxCarriers = (
|
|
3875
|
-
return this.client.post(
|
|
3876
|
-
|
|
3877
|
-
|
|
3874
|
+
this.addSandboxCarriers = (props) => {
|
|
3875
|
+
return this.client.post(
|
|
3876
|
+
`/v1/sellers/add_sandbox_carriers/${props.sellerId}`,
|
|
3877
|
+
{
|
|
3878
|
+
tryReuseCarrierConnection: props.tryReuseCarrierConnection
|
|
3879
|
+
},
|
|
3880
|
+
{
|
|
3881
|
+
isSandbox: props.isSandbox
|
|
3882
|
+
}
|
|
3883
|
+
);
|
|
3878
3884
|
};
|
|
3879
3885
|
this.client = client;
|
|
3880
3886
|
}
|
package/package.json
CHANGED
package/sellers/api.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
|
+
import { SandboxableMutation } from "../resources";
|
|
2
3
|
import type { ListSandboxSellersParams, SandboxMethodParams } from "./types";
|
|
3
4
|
/**
|
|
4
5
|
* Sellers API endpoints
|
|
@@ -18,5 +19,5 @@ export declare class SellersAPI {
|
|
|
18
19
|
/**
|
|
19
20
|
* Adds sandbox carriers to a seller, you can pass in a flag to try to reuse the carrier connection.
|
|
20
21
|
*/
|
|
21
|
-
addSandboxCarriers: (
|
|
22
|
+
addSandboxCarriers: (props: SandboxableMutation<SandboxMethodParams>) => Promise<import("axios").AxiosResponse<void, any>>;
|
|
22
23
|
}
|