@commercengine/storefront-sdk 0.3.2 → 0.3.3
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/lib/shipping.d.ts +8 -1
- package/dist/lib/shipping.js +13 -0
- package/package.json +1 -1
package/dist/lib/shipping.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ApiResult, ShippingMethodsBody, ShippingMethodsContent } from "../types/storefront-api-types";
|
|
1
|
+
import type { ApiResult, CheckDeliveryAvailabilityPathParams, CheckDeliveryAvailabilityResponse, ShippingMethodsBody, ShippingMethodsContent } from "../types/storefront-api-types";
|
|
2
2
|
import { StorefrontAPIClient } from "./client";
|
|
3
3
|
/**
|
|
4
4
|
* Client for interacting with shipping endpoints
|
|
@@ -11,4 +11,11 @@ export declare class ShippingClient extends StorefrontAPIClient {
|
|
|
11
11
|
* @returns Promise with shipping options
|
|
12
12
|
*/
|
|
13
13
|
getShippingMethods(body: ShippingMethodsBody): Promise<ApiResult<ShippingMethodsContent>>;
|
|
14
|
+
/**
|
|
15
|
+
* Check pincode deliverability
|
|
16
|
+
*
|
|
17
|
+
* @param pathParams - Path parameters
|
|
18
|
+
* @returns Promise with pincode deliverability result
|
|
19
|
+
*/
|
|
20
|
+
checkPincodeDeliverability(pathParams: CheckDeliveryAvailabilityPathParams): Promise<ApiResult<CheckDeliveryAvailabilityResponse>>;
|
|
14
21
|
}
|
package/dist/lib/shipping.js
CHANGED
|
@@ -14,4 +14,17 @@ export class ShippingClient extends StorefrontAPIClient {
|
|
|
14
14
|
body: body,
|
|
15
15
|
}));
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Check pincode deliverability
|
|
19
|
+
*
|
|
20
|
+
* @param pathParams - Path parameters
|
|
21
|
+
* @returns Promise with pincode deliverability result
|
|
22
|
+
*/
|
|
23
|
+
async checkPincodeDeliverability(pathParams) {
|
|
24
|
+
return this.executeRequest(() => this.client.GET("/shipment/pincode-serviceability/{pincode}", {
|
|
25
|
+
params: {
|
|
26
|
+
path: pathParams,
|
|
27
|
+
},
|
|
28
|
+
}));
|
|
29
|
+
}
|
|
17
30
|
}
|