ce-storefront 0.15.30 → 0.16.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/README.md +6 -8
- package/RUNTIMES.md +6 -6
- package/docs/sdks/auth/README.md +32 -16
- package/esm/funcs/authGenerateOtp.d.ts +1 -1
- package/esm/funcs/authGenerateOtp.d.ts.map +1 -1
- package/esm/funcs/authGenerateOtp.js +8 -4
- package/esm/funcs/authGenerateOtp.js.map +1 -1
- package/esm/funcs/authGetUserDetail.js +1 -1
- package/esm/funcs/authGetUserDetail.js.map +1 -1
- package/esm/funcs/authLoginWithEmail.d.ts +1 -1
- package/esm/funcs/authLoginWithEmail.d.ts.map +1 -1
- package/esm/funcs/authLoginWithEmail.js +8 -4
- package/esm/funcs/authLoginWithEmail.js.map +1 -1
- package/esm/funcs/authLoginWithPhone.d.ts +1 -1
- package/esm/funcs/authLoginWithPhone.d.ts.map +1 -1
- package/esm/funcs/authLoginWithPhone.js +8 -4
- package/esm/funcs/authLoginWithPhone.js.map +1 -1
- package/esm/funcs/authLoginWithWhatsapp.d.ts +1 -1
- package/esm/funcs/authLoginWithWhatsapp.d.ts.map +1 -1
- package/esm/funcs/authLoginWithWhatsapp.js +8 -4
- package/esm/funcs/authLoginWithWhatsapp.js.map +1 -1
- package/esm/funcs/authLogout.js +1 -1
- package/esm/funcs/authLogout.js.map +1 -1
- package/esm/funcs/authRefreshToken.js +1 -1
- package/esm/funcs/authRefreshToken.js.map +1 -1
- package/esm/funcs/authUpdateUser.js +1 -1
- package/esm/funcs/authUpdateUser.js.map +1 -1
- package/esm/funcs/authVerifyOtp.js +1 -1
- package/esm/funcs/authVerifyOtp.js.map +1 -1
- package/esm/funcs/cartsAddShippingMethod.js +1 -1
- package/esm/funcs/cartsAddShippingMethod.js.map +1 -1
- package/esm/funcs/cartsApplyCoupon.js +1 -1
- package/esm/funcs/cartsApplyCoupon.js.map +1 -1
- package/esm/funcs/cartsCreateCart.js +1 -1
- package/esm/funcs/cartsCreateCart.js.map +1 -1
- package/esm/funcs/cartsCreateCartAddress.js +1 -1
- package/esm/funcs/cartsCreateCartAddress.js.map +1 -1
- package/esm/funcs/cartsDeleteCart.js +1 -1
- package/esm/funcs/cartsDeleteCart.js.map +1 -1
- package/esm/funcs/cartsGetCart.js +1 -1
- package/esm/funcs/cartsGetCart.js.map +1 -1
- package/esm/funcs/cartsGetUserCart.js +1 -1
- package/esm/funcs/cartsGetUserCart.js.map +1 -1
- package/esm/funcs/cartsRedeemLoyaltyPoints.js +1 -1
- package/esm/funcs/cartsRedeemLoyaltyPoints.js.map +1 -1
- package/esm/funcs/cartsRemoveCoupon.js +1 -1
- package/esm/funcs/cartsRemoveCoupon.js.map +1 -1
- package/esm/funcs/cartsRemoveLoyaltyPoints.js +1 -1
- package/esm/funcs/cartsRemoveLoyaltyPoints.js.map +1 -1
- package/esm/funcs/cartsRemoveUserCart.js +1 -1
- package/esm/funcs/cartsRemoveUserCart.js.map +1 -1
- package/esm/funcs/cartsUpdateCart.js +1 -1
- package/esm/funcs/cartsUpdateCart.js.map +1 -1
- package/esm/funcs/cartsUpdateFulfillmentPreference.js +1 -1
- package/esm/funcs/cartsUpdateFulfillmentPreference.js.map +1 -1
- package/esm/funcs/catalogGetProductDetail.js +1 -1
- package/esm/funcs/catalogGetProductDetail.js.map +1 -1
- package/esm/funcs/catalogGetVariantDetail.js +1 -1
- package/esm/funcs/catalogGetVariantDetail.js.map +1 -1
- package/esm/funcs/catalogListCategories.js +1 -1
- package/esm/funcs/catalogListCategories.js.map +1 -1
- package/esm/funcs/catalogListCrosssellProducts.js +1 -1
- package/esm/funcs/catalogListCrosssellProducts.js.map +1 -1
- package/esm/funcs/catalogListProductReviews.js +1 -1
- package/esm/funcs/catalogListProductReviews.js.map +1 -1
- package/esm/funcs/catalogListProductVariants.js +1 -1
- package/esm/funcs/catalogListProductVariants.js.map +1 -1
- package/esm/funcs/catalogListProducts.js +1 -1
- package/esm/funcs/catalogListProducts.js.map +1 -1
- package/esm/funcs/catalogListSimilarProducts.js +1 -1
- package/esm/funcs/catalogListSimilarProducts.js.map +1 -1
- package/esm/funcs/catalogListSkus.js +1 -1
- package/esm/funcs/catalogListSkus.js.map +1 -1
- package/esm/funcs/catalogListUpsellProducts.js +1 -1
- package/esm/funcs/catalogListUpsellProducts.js.map +1 -1
- package/esm/funcs/catalogSearchProducts.js +1 -1
- package/esm/funcs/catalogSearchProducts.js.map +1 -1
- package/esm/funcs/commonListCountryPincodes.js +1 -1
- package/esm/funcs/commonListCountryPincodes.js.map +1 -1
- package/esm/funcs/customersCreateAddress.js +1 -1
- package/esm/funcs/customersCreateAddress.js.map +1 -1
- package/esm/funcs/customersDeleteAddress.js +1 -1
- package/esm/funcs/customersDeleteAddress.js.map +1 -1
- package/esm/funcs/customersGetAddressDetail.js +1 -1
- package/esm/funcs/customersGetAddressDetail.js.map +1 -1
- package/esm/funcs/customersGetLoyaltyDetails.js +1 -1
- package/esm/funcs/customersGetLoyaltyDetails.js.map +1 -1
- package/esm/funcs/customersListAddresses.js +1 -1
- package/esm/funcs/customersListAddresses.js.map +1 -1
- package/esm/funcs/customersListUserReviews.js +1 -1
- package/esm/funcs/customersListUserReviews.js.map +1 -1
- package/esm/funcs/customersUpdateAddressDetail.js +1 -1
- package/esm/funcs/customersUpdateAddressDetail.js.map +1 -1
- package/esm/funcs/ordersCancelOrder.js +1 -1
- package/esm/funcs/ordersCancelOrder.js.map +1 -1
- package/esm/funcs/ordersCreateOrder.js +1 -1
- package/esm/funcs/ordersCreateOrder.js.map +1 -1
- package/esm/funcs/ordersGetOrderDetail.js +1 -1
- package/esm/funcs/ordersGetOrderDetail.js.map +1 -1
- package/esm/funcs/ordersGetPaymentStatus.js +1 -1
- package/esm/funcs/ordersGetPaymentStatus.js.map +1 -1
- package/esm/funcs/ordersListOrderShipments.js +1 -1
- package/esm/funcs/ordersListOrderShipments.js.map +1 -1
- package/esm/funcs/ordersListOrders.js +1 -1
- package/esm/funcs/ordersListOrders.js.map +1 -1
- package/esm/funcs/ordersRetryOrderPayment.js +1 -1
- package/esm/funcs/ordersRetryOrderPayment.js.map +1 -1
- package/esm/funcs/shippingCheckServiceability.js +1 -1
- package/esm/funcs/shippingCheckServiceability.js.map +1 -1
- package/esm/funcs/shippingFulfillmentOptions.js +1 -1
- package/esm/funcs/shippingFulfillmentOptions.js.map +1 -1
- package/esm/funcs/shippingShippingMethods.js +1 -1
- package/esm/funcs/shippingShippingMethods.js.map +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/config.js.map +1 -1
- package/esm/lib/url.js +1 -1
- package/esm/lib/url.js.map +1 -1
- package/esm/models/components/cart.d.ts +6 -0
- package/esm/models/components/cart.d.ts.map +1 -1
- package/esm/models/components/cart.js +10 -0
- package/esm/models/components/cart.js.map +1 -1
- package/esm/models/components/cartitem.d.ts +0 -5
- package/esm/models/components/cartitem.d.ts.map +1 -1
- package/esm/models/components/cartitem.js +0 -4
- package/esm/models/components/cartitem.js.map +1 -1
- package/esm/models/components/deliveryfulfillment.d.ts +8 -0
- package/esm/models/components/deliveryfulfillment.d.ts.map +1 -1
- package/esm/models/components/deliveryfulfillment.js +16 -0
- package/esm/models/components/deliveryfulfillment.js.map +1 -1
- package/esm/models/components/fulfillmentpreference.d.ts +16 -19
- package/esm/models/components/fulfillmentpreference.d.ts.map +1 -1
- package/esm/models/components/fulfillmentpreference.js +20 -9
- package/esm/models/components/fulfillmentpreference.js.map +1 -1
- package/esm/models/components/fulfillmenttype.d.ts +37 -0
- package/esm/models/components/fulfillmenttype.d.ts.map +1 -0
- package/esm/models/components/fulfillmenttype.js +28 -0
- package/esm/models/components/fulfillmenttype.js.map +1 -0
- package/esm/models/components/index.d.ts +2 -0
- package/esm/models/components/index.d.ts.map +1 -1
- package/esm/models/components/index.js +2 -0
- package/esm/models/components/index.js.map +1 -1
- package/esm/models/components/item.d.ts +0 -5
- package/esm/models/components/item.d.ts.map +1 -1
- package/esm/models/components/item.js +0 -4
- package/esm/models/components/item.js.map +1 -1
- package/esm/models/components/order.d.ts +6 -0
- package/esm/models/components/order.d.ts.map +1 -1
- package/esm/models/components/order.js +10 -0
- package/esm/models/components/order.js.map +1 -1
- package/esm/models/components/orderdetail.d.ts +6 -0
- package/esm/models/components/orderdetail.d.ts.map +1 -1
- package/esm/models/components/orderdetail.js +10 -0
- package/esm/models/components/orderdetail.js.map +1 -1
- package/esm/models/components/orderitem.d.ts +0 -2
- package/esm/models/components/orderitem.d.ts.map +1 -1
- package/esm/models/components/orderitem.js +0 -4
- package/esm/models/components/orderitem.js.map +1 -1
- package/esm/models/components/partialcollectanddelivery.d.ts +91 -28
- package/esm/models/components/partialcollectanddelivery.d.ts.map +1 -1
- package/esm/models/components/partialcollectanddelivery.js +112 -34
- package/esm/models/components/partialcollectanddelivery.js.map +1 -1
- package/esm/models/components/partialcollectanddeliveryinput.d.ts +173 -0
- package/esm/models/components/partialcollectanddeliveryinput.d.ts.map +1 -0
- package/esm/models/components/partialcollectanddeliveryinput.js +211 -0
- package/esm/models/components/partialcollectanddeliveryinput.js.map +1 -0
- package/esm/models/components/product.d.ts +0 -5
- package/esm/models/components/product.d.ts.map +1 -1
- package/esm/models/components/product.js +0 -4
- package/esm/models/components/product.js.map +1 -1
- package/esm/models/components/productbundleitem.d.ts +0 -5
- package/esm/models/components/productbundleitem.d.ts.map +1 -1
- package/esm/models/components/productbundleitem.js +0 -4
- package/esm/models/components/productbundleitem.js.map +1 -1
- package/esm/models/components/productdetail.d.ts +0 -5
- package/esm/models/components/productdetail.d.ts.map +1 -1
- package/esm/models/components/productdetail.js +0 -4
- package/esm/models/components/productdetail.js.map +1 -1
- package/esm/models/components/variant.d.ts +0 -5
- package/esm/models/components/variant.d.ts.map +1 -1
- package/esm/models/components/variant.js +0 -4
- package/esm/models/components/variant.js.map +1 -1
- package/esm/models/components/variantdetail.d.ts +0 -5
- package/esm/models/components/variantdetail.d.ts.map +1 -1
- package/esm/models/components/variantdetail.js +0 -4
- package/esm/models/components/variantdetail.js.map +1 -1
- package/esm/models/components/variantoption.d.ts +4 -4
- package/esm/models/components/variantoption.d.ts.map +1 -1
- package/esm/models/components/variantoption.js +4 -4
- package/esm/models/components/variantoption.js.map +1 -1
- package/esm/models/operations/generateotp.d.ts +30 -0
- package/esm/models/operations/generateotp.d.ts.map +1 -1
- package/esm/models/operations/generateotp.js +43 -0
- package/esm/models/operations/generateotp.js.map +1 -1
- package/esm/models/operations/getfulfillmentoptions.d.ts +27 -1
- package/esm/models/operations/getfulfillmentoptions.d.ts.map +1 -1
- package/esm/models/operations/getfulfillmentoptions.js +21 -2
- package/esm/models/operations/getfulfillmentoptions.js.map +1 -1
- package/esm/models/operations/loginwithemail.d.ts +30 -0
- package/esm/models/operations/loginwithemail.d.ts.map +1 -1
- package/esm/models/operations/loginwithemail.js +37 -0
- package/esm/models/operations/loginwithemail.js.map +1 -1
- package/esm/models/operations/loginwithphone.d.ts +30 -0
- package/esm/models/operations/loginwithphone.d.ts.map +1 -1
- package/esm/models/operations/loginwithphone.js +37 -0
- package/esm/models/operations/loginwithphone.js.map +1 -1
- package/esm/models/operations/loginwithwhatsapp.d.ts +30 -0
- package/esm/models/operations/loginwithwhatsapp.d.ts.map +1 -1
- package/esm/models/operations/loginwithwhatsapp.js +37 -0
- package/esm/models/operations/loginwithwhatsapp.js.map +1 -1
- package/esm/models/operations/updatefulfillmentpreference.d.ts +4 -4
- package/esm/models/operations/updatefulfillmentpreference.d.ts.map +1 -1
- package/esm/models/operations/updatefulfillmentpreference.js +4 -4
- package/esm/models/operations/updatefulfillmentpreference.js.map +1 -1
- package/esm/sdk/auth.d.ts +4 -4
- package/esm/sdk/auth.d.ts.map +1 -1
- package/esm/sdk/auth.js.map +1 -1
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/authGenerateOtp.ts +10 -6
- package/src/funcs/authGetUserDetail.ts +1 -1
- package/src/funcs/authLoginWithEmail.ts +10 -6
- package/src/funcs/authLoginWithPhone.ts +10 -6
- package/src/funcs/authLoginWithWhatsapp.ts +10 -7
- package/src/funcs/authLogout.ts +1 -1
- package/src/funcs/authRefreshToken.ts +1 -1
- package/src/funcs/authUpdateUser.ts +1 -1
- package/src/funcs/authVerifyOtp.ts +1 -1
- package/src/funcs/cartsAddShippingMethod.ts +1 -1
- package/src/funcs/cartsApplyCoupon.ts +1 -1
- package/src/funcs/cartsCreateCart.ts +1 -1
- package/src/funcs/cartsCreateCartAddress.ts +1 -1
- package/src/funcs/cartsDeleteCart.ts +1 -1
- package/src/funcs/cartsGetCart.ts +1 -1
- package/src/funcs/cartsGetUserCart.ts +1 -1
- package/src/funcs/cartsRedeemLoyaltyPoints.ts +1 -1
- package/src/funcs/cartsRemoveCoupon.ts +1 -1
- package/src/funcs/cartsRemoveLoyaltyPoints.ts +1 -1
- package/src/funcs/cartsRemoveUserCart.ts +1 -1
- package/src/funcs/cartsUpdateCart.ts +1 -1
- package/src/funcs/cartsUpdateFulfillmentPreference.ts +1 -1
- package/src/funcs/catalogGetProductDetail.ts +1 -1
- package/src/funcs/catalogGetVariantDetail.ts +1 -1
- package/src/funcs/catalogListCategories.ts +1 -1
- package/src/funcs/catalogListCrosssellProducts.ts +1 -1
- package/src/funcs/catalogListProductReviews.ts +1 -1
- package/src/funcs/catalogListProductVariants.ts +1 -1
- package/src/funcs/catalogListProducts.ts +1 -1
- package/src/funcs/catalogListSimilarProducts.ts +1 -1
- package/src/funcs/catalogListSkus.ts +1 -1
- package/src/funcs/catalogListUpsellProducts.ts +1 -1
- package/src/funcs/catalogSearchProducts.ts +1 -1
- package/src/funcs/commonListCountryPincodes.ts +1 -1
- package/src/funcs/customersCreateAddress.ts +1 -1
- package/src/funcs/customersDeleteAddress.ts +1 -1
- package/src/funcs/customersGetAddressDetail.ts +1 -1
- package/src/funcs/customersGetLoyaltyDetails.ts +1 -1
- package/src/funcs/customersListAddresses.ts +1 -1
- package/src/funcs/customersListUserReviews.ts +1 -1
- package/src/funcs/customersUpdateAddressDetail.ts +1 -1
- package/src/funcs/ordersCancelOrder.ts +1 -1
- package/src/funcs/ordersCreateOrder.ts +1 -1
- package/src/funcs/ordersGetOrderDetail.ts +1 -1
- package/src/funcs/ordersGetPaymentStatus.ts +1 -1
- package/src/funcs/ordersListOrderShipments.ts +1 -1
- package/src/funcs/ordersListOrders.ts +1 -1
- package/src/funcs/ordersRetryOrderPayment.ts +1 -1
- package/src/funcs/shippingCheckServiceability.ts +1 -1
- package/src/funcs/shippingFulfillmentOptions.ts +1 -1
- package/src/funcs/shippingShippingMethods.ts +1 -1
- package/src/lib/config.ts +3 -3
- package/src/lib/url.ts +1 -1
- package/src/models/components/cart.ts +23 -0
- package/src/models/components/cartitem.ts +0 -9
- package/src/models/components/deliveryfulfillment.ts +24 -0
- package/src/models/components/fulfillmentpreference.ts +69 -15
- package/src/models/components/fulfillmenttype.ts +40 -0
- package/src/models/components/index.ts +2 -0
- package/src/models/components/item.ts +0 -9
- package/src/models/components/order.ts +23 -0
- package/src/models/components/orderdetail.ts +23 -0
- package/src/models/components/orderitem.ts +0 -6
- package/src/models/components/partialcollectanddelivery.ts +210 -63
- package/src/models/components/partialcollectanddeliveryinput.ts +472 -0
- package/src/models/components/product.ts +0 -9
- package/src/models/components/productbundleitem.ts +0 -9
- package/src/models/components/productdetail.ts +0 -9
- package/src/models/components/variant.ts +0 -9
- package/src/models/components/variantdetail.ts +0 -9
- package/src/models/components/variantoption.ts +8 -8
- package/src/models/operations/generateotp.ts +85 -0
- package/src/models/operations/getfulfillmentoptions.ts +33 -4
- package/src/models/operations/loginwithemail.ts +75 -0
- package/src/models/operations/loginwithphone.ts +75 -0
- package/src/models/operations/loginwithwhatsapp.ts +75 -0
- package/src/models/operations/updatefulfillmentpreference.ts +8 -8
- package/src/sdk/auth.ts +4 -4
- package/docs/sdks/cestorefront/README.md +0 -10
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { CeStorefrontCore } from "../core.js";
|
|
6
|
-
import { encodeJSON } from "../lib/encodings.js";
|
|
6
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
7
|
import * as M from "../lib/matchers.js";
|
|
8
8
|
import { compactMap } from "../lib/primitives.js";
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -35,7 +35,7 @@ import { Result } from "../types/fp.js";
|
|
|
35
35
|
*/
|
|
36
36
|
export function authLoginWithPhone(
|
|
37
37
|
client: CeStorefrontCore,
|
|
38
|
-
request: operations.
|
|
38
|
+
request: operations.LoginWithPhoneRequest,
|
|
39
39
|
options?: RequestOptions,
|
|
40
40
|
): APIPromise<
|
|
41
41
|
Result<
|
|
@@ -62,7 +62,7 @@ export function authLoginWithPhone(
|
|
|
62
62
|
|
|
63
63
|
async function $do(
|
|
64
64
|
client: CeStorefrontCore,
|
|
65
|
-
request: operations.
|
|
65
|
+
request: operations.LoginWithPhoneRequest,
|
|
66
66
|
options?: RequestOptions,
|
|
67
67
|
): Promise<
|
|
68
68
|
[
|
|
@@ -85,20 +85,24 @@ async function $do(
|
|
|
85
85
|
> {
|
|
86
86
|
const parsed = safeParse(
|
|
87
87
|
request,
|
|
88
|
-
(value) => operations.
|
|
88
|
+
(value) => operations.LoginWithPhoneRequest$outboundSchema.parse(value),
|
|
89
89
|
"Input validation failed",
|
|
90
90
|
);
|
|
91
91
|
if (!parsed.ok) {
|
|
92
92
|
return [parsed, { status: "invalid" }];
|
|
93
93
|
}
|
|
94
94
|
const payload = parsed.value;
|
|
95
|
-
const body = encodeJSON("body", payload, { explode: true });
|
|
95
|
+
const body = encodeJSON("body", payload.RequestBody, { explode: true });
|
|
96
96
|
|
|
97
97
|
const path = pathToFunc("/auth/login/phone")();
|
|
98
98
|
|
|
99
99
|
const headers = new Headers(compactMap({
|
|
100
100
|
"Content-Type": "application/json",
|
|
101
101
|
Accept: "application/json",
|
|
102
|
+
"x-debug-mode": encodeSimple("x-debug-mode", payload["x-debug-mode"], {
|
|
103
|
+
explode: false,
|
|
104
|
+
charEncoding: "none",
|
|
105
|
+
}),
|
|
102
106
|
}));
|
|
103
107
|
|
|
104
108
|
const secConfig = await extractSecurity(client._options.authorization);
|
|
@@ -109,7 +113,7 @@ async function $do(
|
|
|
109
113
|
options: client._options,
|
|
110
114
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
111
115
|
operationID: "login-with-phone",
|
|
112
|
-
oAuth2Scopes:
|
|
116
|
+
oAuth2Scopes: null,
|
|
113
117
|
|
|
114
118
|
resolvedSecurity: requestSecurity,
|
|
115
119
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { CeStorefrontCore } from "../core.js";
|
|
6
|
-
import { encodeJSON } from "../lib/encodings.js";
|
|
6
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
7
|
import * as M from "../lib/matchers.js";
|
|
8
8
|
import { compactMap } from "../lib/primitives.js";
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -35,7 +35,7 @@ import { Result } from "../types/fp.js";
|
|
|
35
35
|
*/
|
|
36
36
|
export function authLoginWithWhatsapp(
|
|
37
37
|
client: CeStorefrontCore,
|
|
38
|
-
request: operations.
|
|
38
|
+
request: operations.LoginWithWhatsappRequest,
|
|
39
39
|
options?: RequestOptions,
|
|
40
40
|
): APIPromise<
|
|
41
41
|
Result<
|
|
@@ -61,7 +61,7 @@ export function authLoginWithWhatsapp(
|
|
|
61
61
|
|
|
62
62
|
async function $do(
|
|
63
63
|
client: CeStorefrontCore,
|
|
64
|
-
request: operations.
|
|
64
|
+
request: operations.LoginWithWhatsappRequest,
|
|
65
65
|
options?: RequestOptions,
|
|
66
66
|
): Promise<
|
|
67
67
|
[
|
|
@@ -83,21 +83,24 @@ async function $do(
|
|
|
83
83
|
> {
|
|
84
84
|
const parsed = safeParse(
|
|
85
85
|
request,
|
|
86
|
-
(value) =>
|
|
87
|
-
operations.LoginWithWhatsappRequestBody$outboundSchema.parse(value),
|
|
86
|
+
(value) => operations.LoginWithWhatsappRequest$outboundSchema.parse(value),
|
|
88
87
|
"Input validation failed",
|
|
89
88
|
);
|
|
90
89
|
if (!parsed.ok) {
|
|
91
90
|
return [parsed, { status: "invalid" }];
|
|
92
91
|
}
|
|
93
92
|
const payload = parsed.value;
|
|
94
|
-
const body = encodeJSON("body", payload, { explode: true });
|
|
93
|
+
const body = encodeJSON("body", payload.RequestBody, { explode: true });
|
|
95
94
|
|
|
96
95
|
const path = pathToFunc("/auth/login/whatsapp")();
|
|
97
96
|
|
|
98
97
|
const headers = new Headers(compactMap({
|
|
99
98
|
"Content-Type": "application/json",
|
|
100
99
|
Accept: "application/json",
|
|
100
|
+
"x-debug-mode": encodeSimple("x-debug-mode", payload["x-debug-mode"], {
|
|
101
|
+
explode: false,
|
|
102
|
+
charEncoding: "none",
|
|
103
|
+
}),
|
|
101
104
|
}));
|
|
102
105
|
|
|
103
106
|
const secConfig = await extractSecurity(client._options.authorization);
|
|
@@ -108,7 +111,7 @@ async function $do(
|
|
|
108
111
|
options: client._options,
|
|
109
112
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
110
113
|
operationID: "login-with-whatsapp",
|
|
111
|
-
oAuth2Scopes:
|
|
114
|
+
oAuth2Scopes: null,
|
|
112
115
|
|
|
113
116
|
resolvedSecurity: requestSecurity,
|
|
114
117
|
|
package/src/funcs/authLogout.ts
CHANGED
package/src/lib/config.ts
CHANGED
|
@@ -80,7 +80,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
80
80
|
export const SDK_METADATA = {
|
|
81
81
|
language: "typescript",
|
|
82
82
|
openapiDocVersion: "1.0",
|
|
83
|
-
sdkVersion: "0.
|
|
84
|
-
genVersion: "2.
|
|
85
|
-
userAgent: "speakeasy-sdk/typescript 0.
|
|
83
|
+
sdkVersion: "0.16.0",
|
|
84
|
+
genVersion: "2.723.11",
|
|
85
|
+
userAgent: "speakeasy-sdk/typescript 0.16.0 2.723.11 1.0 ce-storefront",
|
|
86
86
|
} as const;
|
package/src/lib/url.ts
CHANGED
|
@@ -10,7 +10,7 @@ export function pathToFunc(
|
|
|
10
10
|
pathPattern: string,
|
|
11
11
|
options?: { charEncoding?: "percent" | "none" },
|
|
12
12
|
): (params?: Params) => string {
|
|
13
|
-
const paramRE = /\{([a-zA-Z0-9_]
|
|
13
|
+
const paramRE = /\{([a-zA-Z0-9_][a-zA-Z0-9_-]*?)\}/g;
|
|
14
14
|
|
|
15
15
|
return function buildURLPath(params: Record<string, unknown> = {}): string {
|
|
16
16
|
return pathPattern.replace(paramRE, function (_, placeholder) {
|