@dotdev/harmony-sdk 1.18.0 → 1.18.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/HarmonyAPI.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IAxiosRetryConfig } from "axios-retry";
|
|
2
|
-
import { AuthenticationToken, Carrier, CarrierShipment, CreateDiaryQueryParams, Diary, GetCarrierShipmentByTimeQueryParams, GetDiaryQueryParams, ProcessInvoiceQueryParams, ProcessSaleOrderQueryParams, ProcessSaleOrderWithoutPaymentQueryParams, SizeGrid, Stock, StockBarcode, StockCategory, StockClassification, StockClassificationType, StockColor, StockLevel, StockLevelLookupQueryParams, StockLookupRequestParams, Warehouse } from "./modules";
|
|
2
|
+
import { AuthenticationToken, Carrier, CarrierShipment, CreateDiaryQueryParams, Diary, DispatchData, GetCarrierShipmentByTimeQueryParams, GetDiaryQueryParams, GetDispatchDataByTimeQueryParams, ProcessInvoiceQueryParams, ProcessSaleOrderQueryParams, ProcessSaleOrderWithoutPaymentQueryParams, SizeGrid, Stock, StockBarcode, StockCategory, StockClassification, StockClassificationType, StockColor, StockLevel, StockLevelLookupQueryParams, StockLookupRequestParams, Warehouse } from "./modules";
|
|
3
3
|
import { GiftVoucher, GiftVoucherLookupQueryParams, GiftVoucherReservationQueryParams, GiftVoucherUsedQueryParams, GiftVoucherVerificationKeyQueryParams } from "./modules/gift-voucher/types";
|
|
4
4
|
export declare class HarmonyAPI {
|
|
5
5
|
private baseUrl;
|
|
@@ -31,6 +31,8 @@ export declare class HarmonyAPI {
|
|
|
31
31
|
cancelExistingSalesOrder(params: ProcessSaleOrderQueryParams, sessionId: string): Promise<boolean>;
|
|
32
32
|
getCarrier(sessionId: string): Promise<Carrier[]>;
|
|
33
33
|
getCarrierShipmentByOrderNo(orderNo: string, sessionId: string): Promise<CarrierShipment[]>;
|
|
34
|
+
getDispatchDataByTime(params: GetDispatchDataByTimeQueryParams, sessionId: string): Promise<DispatchData[]>;
|
|
35
|
+
getDispatchDataByOrderNo(orderNo: string, sessionId: string): Promise<DispatchData[]>;
|
|
34
36
|
getCarrierBySysTime(params: GetCarrierShipmentByTimeQueryParams, sessionId: string): Promise<CarrierShipment[]>;
|
|
35
37
|
getDiaryBy(params: GetDiaryQueryParams, sessionId: string): Promise<Diary[]>;
|
|
36
38
|
createDiary(params: CreateDiaryQueryParams, sessionId: string): Promise<boolean>;
|
package/dist/HarmonyAPI.js
CHANGED
|
@@ -111,6 +111,12 @@ export class HarmonyAPI {
|
|
|
111
111
|
async getCarrierShipmentByOrderNo(orderNo, sessionId) {
|
|
112
112
|
return await this.carrierModule.getCarrierShipmentByOrderNumber(orderNo, sessionId);
|
|
113
113
|
}
|
|
114
|
+
async getDispatchDataByTime(params, sessionId) {
|
|
115
|
+
return await this.carrierModule.getDispatchDataByTime(params, sessionId);
|
|
116
|
+
}
|
|
117
|
+
async getDispatchDataByOrderNo(orderNo, sessionId) {
|
|
118
|
+
return await this.carrierModule.getDispatchDataByOrderNo(orderNo, sessionId);
|
|
119
|
+
}
|
|
114
120
|
async getCarrierBySysTime(params, sessionId) {
|
|
115
121
|
return await this.carrierModule.getCarrierShipmentBySysTime(params, sessionId);
|
|
116
122
|
}
|
|
@@ -7,6 +7,6 @@ export declare class CarrierModule {
|
|
|
7
7
|
getCarrier(sessionId: string): Promise<Carrier[]>;
|
|
8
8
|
getCarrierShipmentByOrderNumber(orderNo: string, sessionId: string): Promise<CarrierShipment[]>;
|
|
9
9
|
getCarrierShipmentBySysTime(params: GetCarrierShipmentByTimeQueryParams, sessionId: string): Promise<CarrierShipment[]>;
|
|
10
|
-
|
|
10
|
+
getDispatchDataByOrderNo(orderNo: string, sessionId: string): Promise<DispatchData[]>;
|
|
11
11
|
getDispatchDataByTime(params: GetDispatchDataByTimeQueryParams, sessionId: string): Promise<DispatchData[]>;
|
|
12
12
|
}
|
|
@@ -36,7 +36,7 @@ export class CarrierModule {
|
|
|
36
36
|
throw await ApiHelper.parseError(error);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
async
|
|
39
|
+
async getDispatchDataByOrderNo(orderNo, sessionId) {
|
|
40
40
|
const bodyStr = mapGetDispatchDataByOrderNoQueryParams(orderNo);
|
|
41
41
|
try {
|
|
42
42
|
const response = await ApiHelper.sendServiceRequest(this.SERVICE_URL, ["GetDispatchDataByOrderNumber", "Request"], sessionId, ServiceAlias.CARRIER, this.axiosInstance, bodyStr);
|
|
@@ -257,7 +257,7 @@ describe("CarrierModule.getDispatchDataByOrderNo()", () => {
|
|
|
257
257
|
sysModTime: '23-08-2024 16:11:24'
|
|
258
258
|
};
|
|
259
259
|
mAxios.post.mockResolvedValueOnce(mockedResp);
|
|
260
|
-
const response = await carrierModule.
|
|
260
|
+
const response = await carrierModule.getDispatchDataByOrderNo(orderNo, token);
|
|
261
261
|
// Test that expected response is correct
|
|
262
262
|
expect(Array.isArray(response)).toBe(true);
|
|
263
263
|
expect(response.length).toBe(1);
|