ce-storefront 0.7.1 → 0.7.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/esm/funcs/authCheckVerificationStatus.d.ts.map +1 -1
- package/esm/funcs/authCheckVerificationStatus.js +1 -0
- package/esm/funcs/authCheckVerificationStatus.js.map +1 -1
- package/esm/funcs/authCreateNotificationPreferences.d.ts.map +1 -1
- package/esm/funcs/authCreateNotificationPreferences.js +1 -0
- package/esm/funcs/authCreateNotificationPreferences.js.map +1 -1
- package/esm/funcs/authGenerateOtp.d.ts.map +1 -1
- package/esm/funcs/authGenerateOtp.js +1 -0
- package/esm/funcs/authGenerateOtp.js.map +1 -1
- package/esm/funcs/authGetAnonymousToken.d.ts.map +1 -1
- package/esm/funcs/authGetAnonymousToken.js +1 -0
- package/esm/funcs/authGetAnonymousToken.js.map +1 -1
- package/esm/funcs/authGetNotificationPreferences.d.ts.map +1 -1
- package/esm/funcs/authGetNotificationPreferences.js +1 -0
- package/esm/funcs/authGetNotificationPreferences.js.map +1 -1
- package/esm/funcs/authGetUserDetail.d.ts.map +1 -1
- package/esm/funcs/authGetUserDetail.js +1 -0
- package/esm/funcs/authGetUserDetail.js.map +1 -1
- package/esm/funcs/authLoginWithEmail.d.ts.map +1 -1
- package/esm/funcs/authLoginWithEmail.js +1 -0
- package/esm/funcs/authLoginWithEmail.js.map +1 -1
- package/esm/funcs/authLoginWithPhone.d.ts.map +1 -1
- package/esm/funcs/authLoginWithPhone.js +1 -0
- package/esm/funcs/authLoginWithPhone.js.map +1 -1
- package/esm/funcs/authLoginWithWhatsapp.d.ts.map +1 -1
- package/esm/funcs/authLoginWithWhatsapp.js +1 -0
- package/esm/funcs/authLoginWithWhatsapp.js.map +1 -1
- package/esm/funcs/authLogout.d.ts.map +1 -1
- package/esm/funcs/authLogout.js +1 -0
- package/esm/funcs/authLogout.js.map +1 -1
- package/esm/funcs/authRefreshToken.d.ts.map +1 -1
- package/esm/funcs/authRefreshToken.js +1 -0
- package/esm/funcs/authRefreshToken.js.map +1 -1
- package/esm/funcs/authUpdateNotificationPreferences.d.ts.map +1 -1
- package/esm/funcs/authUpdateNotificationPreferences.js +1 -0
- package/esm/funcs/authUpdateNotificationPreferences.js.map +1 -1
- package/esm/funcs/authUpdateUser.d.ts.map +1 -1
- package/esm/funcs/authUpdateUser.js +1 -0
- package/esm/funcs/authUpdateUser.js.map +1 -1
- package/esm/funcs/authVerifyOtp.d.ts.map +1 -1
- package/esm/funcs/authVerifyOtp.js +1 -0
- package/esm/funcs/authVerifyOtp.js.map +1 -1
- package/esm/funcs/campaignsSubscribeNewsletter.d.ts.map +1 -1
- package/esm/funcs/campaignsSubscribeNewsletter.js +1 -0
- package/esm/funcs/campaignsSubscribeNewsletter.js.map +1 -1
- package/esm/funcs/cartsApplyCoupon.d.ts.map +1 -1
- package/esm/funcs/cartsApplyCoupon.js +1 -0
- package/esm/funcs/cartsApplyCoupon.js.map +1 -1
- package/esm/funcs/cartsCreateCart.d.ts.map +1 -1
- package/esm/funcs/cartsCreateCart.js +1 -0
- package/esm/funcs/cartsCreateCart.js.map +1 -1
- package/esm/funcs/cartsCreateCartAddress.d.ts.map +1 -1
- package/esm/funcs/cartsCreateCartAddress.js +1 -0
- package/esm/funcs/cartsCreateCartAddress.js.map +1 -1
- package/esm/funcs/cartsDeleteCart.d.ts.map +1 -1
- package/esm/funcs/cartsDeleteCart.js +1 -0
- package/esm/funcs/cartsDeleteCart.js.map +1 -1
- package/esm/funcs/cartsGetCart.d.ts.map +1 -1
- package/esm/funcs/cartsGetCart.js +1 -0
- package/esm/funcs/cartsGetCart.js.map +1 -1
- package/esm/funcs/cartsGetUserCart.d.ts.map +1 -1
- package/esm/funcs/cartsGetUserCart.js +1 -0
- package/esm/funcs/cartsGetUserCart.js.map +1 -1
- package/esm/funcs/cartsRemoveCoupon.d.ts.map +1 -1
- package/esm/funcs/cartsRemoveCoupon.js +1 -0
- package/esm/funcs/cartsRemoveCoupon.js.map +1 -1
- package/esm/funcs/cartsRemoveUserCart.d.ts.map +1 -1
- package/esm/funcs/cartsRemoveUserCart.js +1 -0
- package/esm/funcs/cartsRemoveUserCart.js.map +1 -1
- package/esm/funcs/cartsUpdateCart.d.ts.map +1 -1
- package/esm/funcs/cartsUpdateCart.js +1 -0
- package/esm/funcs/cartsUpdateCart.js.map +1 -1
- package/esm/funcs/catalogCreateProductReview.d.ts.map +1 -1
- package/esm/funcs/catalogCreateProductReview.js +1 -0
- package/esm/funcs/catalogCreateProductReview.js.map +1 -1
- package/esm/funcs/catalogGetProductDetail.d.ts.map +1 -1
- package/esm/funcs/catalogGetProductDetail.js +1 -0
- package/esm/funcs/catalogGetProductDetail.js.map +1 -1
- package/esm/funcs/catalogGetVariantDetail.d.ts.map +1 -1
- package/esm/funcs/catalogGetVariantDetail.js +1 -0
- package/esm/funcs/catalogGetVariantDetail.js.map +1 -1
- package/esm/funcs/catalogListCategories.d.ts.map +1 -1
- package/esm/funcs/catalogListCategories.js +1 -0
- package/esm/funcs/catalogListCategories.js.map +1 -1
- package/esm/funcs/catalogListCrosssellProducts.d.ts.map +1 -1
- package/esm/funcs/catalogListCrosssellProducts.js +1 -0
- package/esm/funcs/catalogListCrosssellProducts.js.map +1 -1
- package/esm/funcs/catalogListProductReviews.d.ts.map +1 -1
- package/esm/funcs/catalogListProductReviews.js +1 -0
- package/esm/funcs/catalogListProductReviews.js.map +1 -1
- package/esm/funcs/catalogListProductVariants.d.ts.map +1 -1
- package/esm/funcs/catalogListProductVariants.js +1 -0
- package/esm/funcs/catalogListProductVariants.js.map +1 -1
- package/esm/funcs/catalogListProducts.d.ts.map +1 -1
- package/esm/funcs/catalogListProducts.js +1 -0
- package/esm/funcs/catalogListProducts.js.map +1 -1
- package/esm/funcs/catalogListSimilarProducts.d.ts.map +1 -1
- package/esm/funcs/catalogListSimilarProducts.js +1 -0
- package/esm/funcs/catalogListSimilarProducts.js.map +1 -1
- package/esm/funcs/catalogListSkus.d.ts.map +1 -1
- package/esm/funcs/catalogListSkus.js +1 -0
- package/esm/funcs/catalogListSkus.js.map +1 -1
- package/esm/funcs/catalogListUpsellProducts.d.ts.map +1 -1
- package/esm/funcs/catalogListUpsellProducts.js +1 -0
- package/esm/funcs/catalogListUpsellProducts.js.map +1 -1
- package/esm/funcs/catalogSearchProducts.d.ts.map +1 -1
- package/esm/funcs/catalogSearchProducts.js +1 -0
- package/esm/funcs/catalogSearchProducts.js.map +1 -1
- package/esm/funcs/commonListCountryPincodes.d.ts.map +1 -1
- package/esm/funcs/commonListCountryPincodes.js +1 -0
- package/esm/funcs/commonListCountryPincodes.js.map +1 -1
- package/esm/funcs/customersCreateAddress.d.ts.map +1 -1
- package/esm/funcs/customersCreateAddress.js +1 -0
- package/esm/funcs/customersCreateAddress.js.map +1 -1
- package/esm/funcs/customersDeleteAddress.d.ts.map +1 -1
- package/esm/funcs/customersDeleteAddress.js +1 -0
- package/esm/funcs/customersDeleteAddress.js.map +1 -1
- package/esm/funcs/customersGetAddressDetail.d.ts.map +1 -1
- package/esm/funcs/customersGetAddressDetail.js +1 -0
- package/esm/funcs/customersGetAddressDetail.js.map +1 -1
- package/esm/funcs/customersListAddresses.d.ts.map +1 -1
- package/esm/funcs/customersListAddresses.js +1 -0
- package/esm/funcs/customersListAddresses.js.map +1 -1
- package/esm/funcs/customersListUserReviews.d.ts.map +1 -1
- package/esm/funcs/customersListUserReviews.js +1 -0
- package/esm/funcs/customersListUserReviews.js.map +1 -1
- package/esm/funcs/customersUpdateAddressDetail.d.ts.map +1 -1
- package/esm/funcs/customersUpdateAddressDetail.js +1 -0
- package/esm/funcs/customersUpdateAddressDetail.js.map +1 -1
- package/esm/funcs/ordersCancelOrder.d.ts.map +1 -1
- package/esm/funcs/ordersCancelOrder.js +1 -0
- package/esm/funcs/ordersCancelOrder.js.map +1 -1
- package/esm/funcs/ordersCreateOrder.d.ts.map +1 -1
- package/esm/funcs/ordersCreateOrder.js +1 -0
- package/esm/funcs/ordersCreateOrder.js.map +1 -1
- package/esm/funcs/ordersGetOrderDetail.d.ts.map +1 -1
- package/esm/funcs/ordersGetOrderDetail.js +1 -0
- package/esm/funcs/ordersGetOrderDetail.js.map +1 -1
- package/esm/funcs/ordersGetPaymentStatus.d.ts.map +1 -1
- package/esm/funcs/ordersGetPaymentStatus.js +1 -0
- package/esm/funcs/ordersGetPaymentStatus.js.map +1 -1
- package/esm/funcs/ordersListOrderShipments.d.ts.map +1 -1
- package/esm/funcs/ordersListOrderShipments.js +1 -0
- package/esm/funcs/ordersListOrderShipments.js.map +1 -1
- package/esm/funcs/ordersListOrders.d.ts.map +1 -1
- package/esm/funcs/ordersListOrders.js +1 -0
- package/esm/funcs/ordersListOrders.js.map +1 -1
- package/esm/funcs/ordersRetryOrderPayment.d.ts.map +1 -1
- package/esm/funcs/ordersRetryOrderPayment.js +1 -0
- package/esm/funcs/ordersRetryOrderPayment.js.map +1 -1
- package/esm/funcs/shippingCheckDeliveryAvailability.d.ts.map +1 -1
- package/esm/funcs/shippingCheckDeliveryAvailability.js +1 -0
- package/esm/funcs/shippingCheckDeliveryAvailability.js.map +1 -1
- package/esm/hooks/types.d.ts +1 -0
- package/esm/hooks/types.d.ts.map +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/security.d.ts.map +1 -1
- package/esm/lib/security.js.map +1 -1
- package/esm/models/components/booleanattribute.d.ts +46 -0
- package/esm/models/components/booleanattribute.d.ts.map +1 -0
- package/esm/models/components/booleanattribute.js +39 -0
- package/esm/models/components/booleanattribute.js.map +1 -0
- package/esm/models/components/colorattribute.d.ts +73 -0
- package/esm/models/components/colorattribute.d.ts.map +1 -0
- package/esm/models/components/colorattribute.js +67 -0
- package/esm/models/components/colorattribute.js.map +1 -0
- package/esm/models/components/dateattribute.d.ts +46 -0
- package/esm/models/components/dateattribute.d.ts.map +1 -0
- package/esm/models/components/dateattribute.js +39 -0
- package/esm/models/components/dateattribute.js.map +1 -0
- package/esm/models/components/index.d.ts +7 -0
- package/esm/models/components/index.d.ts.map +1 -1
- package/esm/models/components/index.js +7 -0
- package/esm/models/components/index.js.map +1 -1
- package/esm/models/components/juspaypaymentgatewayparams.d.ts +24 -0
- package/esm/models/components/juspaypaymentgatewayparams.d.ts.map +1 -1
- package/esm/models/components/juspaypaymentgatewayparams.js +6 -0
- package/esm/models/components/juspaypaymentgatewayparams.js.map +1 -1
- package/esm/models/components/multiselectattribute.d.ts +46 -0
- package/esm/models/components/multiselectattribute.d.ts.map +1 -0
- package/esm/models/components/multiselectattribute.js +39 -0
- package/esm/models/components/multiselectattribute.js.map +1 -0
- package/esm/models/components/numberattribute.d.ts +46 -0
- package/esm/models/components/numberattribute.d.ts.map +1 -0
- package/esm/models/components/numberattribute.js +39 -0
- package/esm/models/components/numberattribute.js.map +1 -0
- package/esm/models/components/productattribute.d.ts +9 -401
- package/esm/models/components/productattribute.d.ts.map +1 -1
- package/esm/models/components/productattribute.js +21 -272
- package/esm/models/components/productattribute.js.map +1 -1
- package/esm/models/components/singleselectattribute.d.ts +46 -0
- package/esm/models/components/singleselectattribute.d.ts.map +1 -0
- package/esm/models/components/singleselectattribute.js +39 -0
- package/esm/models/components/singleselectattribute.js.map +1 -0
- package/esm/models/components/textattribute.d.ts +46 -0
- package/esm/models/components/textattribute.d.ts.map +1 -0
- package/esm/models/components/textattribute.js +39 -0
- package/esm/models/components/textattribute.js.map +1 -0
- package/esm/models/components/variantoption.d.ts +13 -13
- package/esm/models/components/variantoption.d.ts.map +1 -1
- package/esm/models/components/variantoption.js +13 -14
- package/esm/models/components/variantoption.js.map +1 -1
- package/esm/models/operations/getpaymentstatus.d.ts +12 -10
- package/esm/models/operations/getpaymentstatus.d.ts.map +1 -1
- package/esm/models/operations/getpaymentstatus.js +14 -10
- package/esm/models/operations/getpaymentstatus.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/authCheckVerificationStatus.ts +1 -0
- package/src/funcs/authCreateNotificationPreferences.ts +1 -0
- package/src/funcs/authGenerateOtp.ts +1 -0
- package/src/funcs/authGetAnonymousToken.ts +1 -0
- package/src/funcs/authGetNotificationPreferences.ts +1 -0
- package/src/funcs/authGetUserDetail.ts +1 -0
- package/src/funcs/authLoginWithEmail.ts +1 -0
- package/src/funcs/authLoginWithPhone.ts +1 -0
- package/src/funcs/authLoginWithWhatsapp.ts +1 -0
- package/src/funcs/authLogout.ts +1 -0
- package/src/funcs/authRefreshToken.ts +1 -0
- package/src/funcs/authUpdateNotificationPreferences.ts +1 -0
- package/src/funcs/authUpdateUser.ts +1 -0
- package/src/funcs/authVerifyOtp.ts +1 -0
- package/src/funcs/campaignsSubscribeNewsletter.ts +1 -0
- package/src/funcs/cartsApplyCoupon.ts +1 -0
- package/src/funcs/cartsCreateCart.ts +1 -0
- package/src/funcs/cartsCreateCartAddress.ts +1 -0
- package/src/funcs/cartsDeleteCart.ts +1 -0
- package/src/funcs/cartsGetCart.ts +1 -0
- package/src/funcs/cartsGetUserCart.ts +1 -0
- package/src/funcs/cartsRemoveCoupon.ts +1 -0
- package/src/funcs/cartsRemoveUserCart.ts +1 -0
- package/src/funcs/cartsUpdateCart.ts +1 -0
- package/src/funcs/catalogCreateProductReview.ts +1 -0
- package/src/funcs/catalogGetProductDetail.ts +1 -0
- package/src/funcs/catalogGetVariantDetail.ts +1 -0
- package/src/funcs/catalogListCategories.ts +1 -0
- package/src/funcs/catalogListCrosssellProducts.ts +1 -0
- package/src/funcs/catalogListProductReviews.ts +1 -0
- package/src/funcs/catalogListProductVariants.ts +1 -0
- package/src/funcs/catalogListProducts.ts +1 -0
- package/src/funcs/catalogListSimilarProducts.ts +1 -0
- package/src/funcs/catalogListSkus.ts +1 -0
- package/src/funcs/catalogListUpsellProducts.ts +1 -0
- package/src/funcs/catalogSearchProducts.ts +1 -0
- package/src/funcs/commonListCountryPincodes.ts +1 -0
- package/src/funcs/customersCreateAddress.ts +1 -0
- package/src/funcs/customersDeleteAddress.ts +1 -0
- package/src/funcs/customersGetAddressDetail.ts +1 -0
- package/src/funcs/customersListAddresses.ts +1 -0
- package/src/funcs/customersListUserReviews.ts +1 -0
- package/src/funcs/customersUpdateAddressDetail.ts +1 -0
- package/src/funcs/ordersCancelOrder.ts +1 -0
- package/src/funcs/ordersCreateOrder.ts +1 -0
- package/src/funcs/ordersGetOrderDetail.ts +1 -0
- package/src/funcs/ordersGetPaymentStatus.ts +1 -0
- package/src/funcs/ordersListOrderShipments.ts +1 -0
- package/src/funcs/ordersListOrders.ts +1 -0
- package/src/funcs/ordersRetryOrderPayment.ts +1 -0
- package/src/funcs/shippingCheckDeliveryAvailability.ts +1 -0
- package/src/hooks/types.ts +1 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/security.ts +0 -1
- package/src/models/components/booleanattribute.ts +91 -0
- package/src/models/components/colorattribute.ts +142 -0
- package/src/models/components/dateattribute.ts +87 -0
- package/src/models/components/index.ts +7 -0
- package/src/models/components/juspaypaymentgatewayparams.ts +24 -0
- package/src/models/components/multiselectattribute.ts +91 -0
- package/src/models/components/numberattribute.ts +89 -0
- package/src/models/components/productattribute.ts +56 -685
- package/src/models/components/singleselectattribute.ts +91 -0
- package/src/models/components/textattribute.ts +87 -0
- package/src/models/components/variantoption.ts +27 -20
- package/src/models/operations/getpaymentstatus.ts +26 -20
package/src/hooks/types.ts
CHANGED
package/src/lib/config.ts
CHANGED
|
@@ -76,7 +76,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
76
76
|
export const SDK_METADATA = {
|
|
77
77
|
language: "typescript",
|
|
78
78
|
openapiDocVersion: "1.0",
|
|
79
|
-
sdkVersion: "0.7.
|
|
80
|
-
genVersion: "2.
|
|
81
|
-
userAgent: "speakeasy-sdk/typescript 0.7.
|
|
79
|
+
sdkVersion: "0.7.3",
|
|
80
|
+
genVersion: "2.512.4",
|
|
81
|
+
userAgent: "speakeasy-sdk/typescript 0.7.3 2.512.4 1.0 ce-storefront",
|
|
82
82
|
} as const;
|
package/src/lib/security.ts
CHANGED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Attribute for boolean values
|
|
12
|
+
*/
|
|
13
|
+
export type BooleanAttribute = {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
/**
|
|
17
|
+
* A lookup safe version of the name that is lowercased and spaces are replaced with underscores. For instance, if name is `Product Type`, key will be `product_type`
|
|
18
|
+
*/
|
|
19
|
+
key: string;
|
|
20
|
+
type: string;
|
|
21
|
+
/**
|
|
22
|
+
* For boolean attributes
|
|
23
|
+
*/
|
|
24
|
+
value: boolean;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const BooleanAttribute$inboundSchema: z.ZodType<
|
|
29
|
+
BooleanAttribute,
|
|
30
|
+
z.ZodTypeDef,
|
|
31
|
+
unknown
|
|
32
|
+
> = z.object({
|
|
33
|
+
id: z.string(),
|
|
34
|
+
name: z.string(),
|
|
35
|
+
key: z.string(),
|
|
36
|
+
type: z.string(),
|
|
37
|
+
value: z.boolean(),
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export type BooleanAttribute$Outbound = {
|
|
42
|
+
id: string;
|
|
43
|
+
name: string;
|
|
44
|
+
key: string;
|
|
45
|
+
type: string;
|
|
46
|
+
value: boolean;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const BooleanAttribute$outboundSchema: z.ZodType<
|
|
51
|
+
BooleanAttribute$Outbound,
|
|
52
|
+
z.ZodTypeDef,
|
|
53
|
+
BooleanAttribute
|
|
54
|
+
> = z.object({
|
|
55
|
+
id: z.string(),
|
|
56
|
+
name: z.string(),
|
|
57
|
+
key: z.string(),
|
|
58
|
+
type: z.string(),
|
|
59
|
+
value: z.boolean(),
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* @internal
|
|
64
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
65
|
+
*/
|
|
66
|
+
export namespace BooleanAttribute$ {
|
|
67
|
+
/** @deprecated use `BooleanAttribute$inboundSchema` instead. */
|
|
68
|
+
export const inboundSchema = BooleanAttribute$inboundSchema;
|
|
69
|
+
/** @deprecated use `BooleanAttribute$outboundSchema` instead. */
|
|
70
|
+
export const outboundSchema = BooleanAttribute$outboundSchema;
|
|
71
|
+
/** @deprecated use `BooleanAttribute$Outbound` instead. */
|
|
72
|
+
export type Outbound = BooleanAttribute$Outbound;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function booleanAttributeToJSON(
|
|
76
|
+
booleanAttribute: BooleanAttribute,
|
|
77
|
+
): string {
|
|
78
|
+
return JSON.stringify(
|
|
79
|
+
BooleanAttribute$outboundSchema.parse(booleanAttribute),
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function booleanAttributeFromJSON(
|
|
84
|
+
jsonString: string,
|
|
85
|
+
): SafeParseResult<BooleanAttribute, SDKValidationError> {
|
|
86
|
+
return safeParse(
|
|
87
|
+
jsonString,
|
|
88
|
+
(x) => BooleanAttribute$inboundSchema.parse(JSON.parse(x)),
|
|
89
|
+
`Failed to parse 'BooleanAttribute' from JSON`,
|
|
90
|
+
);
|
|
91
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type Value = {
|
|
11
|
+
name: string;
|
|
12
|
+
/**
|
|
13
|
+
* The hex code of the color (e.g., #000000).
|
|
14
|
+
*/
|
|
15
|
+
hexcode: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Attribute for colors
|
|
20
|
+
*/
|
|
21
|
+
export type ColorAttribute = {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
/**
|
|
25
|
+
* A lookup safe version of the name that is lowercased and spaces are replaced with underscores. For instance, if name is `Product Type`, key will be `product_type`
|
|
26
|
+
*/
|
|
27
|
+
key: string;
|
|
28
|
+
type: string;
|
|
29
|
+
value: Array<Value>;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const Value$inboundSchema: z.ZodType<Value, z.ZodTypeDef, unknown> = z
|
|
34
|
+
.object({
|
|
35
|
+
name: z.string(),
|
|
36
|
+
hexcode: z.string(),
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export type Value$Outbound = {
|
|
41
|
+
name: string;
|
|
42
|
+
hexcode: string;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const Value$outboundSchema: z.ZodType<
|
|
47
|
+
Value$Outbound,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
Value
|
|
50
|
+
> = z.object({
|
|
51
|
+
name: z.string(),
|
|
52
|
+
hexcode: z.string(),
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @internal
|
|
57
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
58
|
+
*/
|
|
59
|
+
export namespace Value$ {
|
|
60
|
+
/** @deprecated use `Value$inboundSchema` instead. */
|
|
61
|
+
export const inboundSchema = Value$inboundSchema;
|
|
62
|
+
/** @deprecated use `Value$outboundSchema` instead. */
|
|
63
|
+
export const outboundSchema = Value$outboundSchema;
|
|
64
|
+
/** @deprecated use `Value$Outbound` instead. */
|
|
65
|
+
export type Outbound = Value$Outbound;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function valueToJSON(value: Value): string {
|
|
69
|
+
return JSON.stringify(Value$outboundSchema.parse(value));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function valueFromJSON(
|
|
73
|
+
jsonString: string,
|
|
74
|
+
): SafeParseResult<Value, SDKValidationError> {
|
|
75
|
+
return safeParse(
|
|
76
|
+
jsonString,
|
|
77
|
+
(x) => Value$inboundSchema.parse(JSON.parse(x)),
|
|
78
|
+
`Failed to parse 'Value' from JSON`,
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** @internal */
|
|
83
|
+
export const ColorAttribute$inboundSchema: z.ZodType<
|
|
84
|
+
ColorAttribute,
|
|
85
|
+
z.ZodTypeDef,
|
|
86
|
+
unknown
|
|
87
|
+
> = z.object({
|
|
88
|
+
id: z.string(),
|
|
89
|
+
name: z.string(),
|
|
90
|
+
key: z.string(),
|
|
91
|
+
type: z.string(),
|
|
92
|
+
value: z.array(z.lazy(() => Value$inboundSchema)),
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
/** @internal */
|
|
96
|
+
export type ColorAttribute$Outbound = {
|
|
97
|
+
id: string;
|
|
98
|
+
name: string;
|
|
99
|
+
key: string;
|
|
100
|
+
type: string;
|
|
101
|
+
value: Array<Value$Outbound>;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
/** @internal */
|
|
105
|
+
export const ColorAttribute$outboundSchema: z.ZodType<
|
|
106
|
+
ColorAttribute$Outbound,
|
|
107
|
+
z.ZodTypeDef,
|
|
108
|
+
ColorAttribute
|
|
109
|
+
> = z.object({
|
|
110
|
+
id: z.string(),
|
|
111
|
+
name: z.string(),
|
|
112
|
+
key: z.string(),
|
|
113
|
+
type: z.string(),
|
|
114
|
+
value: z.array(z.lazy(() => Value$outboundSchema)),
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* @internal
|
|
119
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
120
|
+
*/
|
|
121
|
+
export namespace ColorAttribute$ {
|
|
122
|
+
/** @deprecated use `ColorAttribute$inboundSchema` instead. */
|
|
123
|
+
export const inboundSchema = ColorAttribute$inboundSchema;
|
|
124
|
+
/** @deprecated use `ColorAttribute$outboundSchema` instead. */
|
|
125
|
+
export const outboundSchema = ColorAttribute$outboundSchema;
|
|
126
|
+
/** @deprecated use `ColorAttribute$Outbound` instead. */
|
|
127
|
+
export type Outbound = ColorAttribute$Outbound;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export function colorAttributeToJSON(colorAttribute: ColorAttribute): string {
|
|
131
|
+
return JSON.stringify(ColorAttribute$outboundSchema.parse(colorAttribute));
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export function colorAttributeFromJSON(
|
|
135
|
+
jsonString: string,
|
|
136
|
+
): SafeParseResult<ColorAttribute, SDKValidationError> {
|
|
137
|
+
return safeParse(
|
|
138
|
+
jsonString,
|
|
139
|
+
(x) => ColorAttribute$inboundSchema.parse(JSON.parse(x)),
|
|
140
|
+
`Failed to parse 'ColorAttribute' from JSON`,
|
|
141
|
+
);
|
|
142
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Attribute for date values
|
|
12
|
+
*/
|
|
13
|
+
export type DateAttribute = {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
/**
|
|
17
|
+
* A lookup safe version of the name that is lowercased and spaces are replaced with underscores. For instance, if name is `Product Type`, key will be `product_type`
|
|
18
|
+
*/
|
|
19
|
+
key: string;
|
|
20
|
+
type: string;
|
|
21
|
+
/**
|
|
22
|
+
* For date attributes
|
|
23
|
+
*/
|
|
24
|
+
value: Date;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const DateAttribute$inboundSchema: z.ZodType<
|
|
29
|
+
DateAttribute,
|
|
30
|
+
z.ZodTypeDef,
|
|
31
|
+
unknown
|
|
32
|
+
> = z.object({
|
|
33
|
+
id: z.string(),
|
|
34
|
+
name: z.string(),
|
|
35
|
+
key: z.string(),
|
|
36
|
+
type: z.string(),
|
|
37
|
+
value: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export type DateAttribute$Outbound = {
|
|
42
|
+
id: string;
|
|
43
|
+
name: string;
|
|
44
|
+
key: string;
|
|
45
|
+
type: string;
|
|
46
|
+
value: string;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const DateAttribute$outboundSchema: z.ZodType<
|
|
51
|
+
DateAttribute$Outbound,
|
|
52
|
+
z.ZodTypeDef,
|
|
53
|
+
DateAttribute
|
|
54
|
+
> = z.object({
|
|
55
|
+
id: z.string(),
|
|
56
|
+
name: z.string(),
|
|
57
|
+
key: z.string(),
|
|
58
|
+
type: z.string(),
|
|
59
|
+
value: z.date().transform(v => v.toISOString()),
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* @internal
|
|
64
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
65
|
+
*/
|
|
66
|
+
export namespace DateAttribute$ {
|
|
67
|
+
/** @deprecated use `DateAttribute$inboundSchema` instead. */
|
|
68
|
+
export const inboundSchema = DateAttribute$inboundSchema;
|
|
69
|
+
/** @deprecated use `DateAttribute$outboundSchema` instead. */
|
|
70
|
+
export const outboundSchema = DateAttribute$outboundSchema;
|
|
71
|
+
/** @deprecated use `DateAttribute$Outbound` instead. */
|
|
72
|
+
export type Outbound = DateAttribute$Outbound;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function dateAttributeToJSON(dateAttribute: DateAttribute): string {
|
|
76
|
+
return JSON.stringify(DateAttribute$outboundSchema.parse(dateAttribute));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function dateAttributeFromJSON(
|
|
80
|
+
jsonString: string,
|
|
81
|
+
): SafeParseResult<DateAttribute, SDKValidationError> {
|
|
82
|
+
return safeParse(
|
|
83
|
+
jsonString,
|
|
84
|
+
(x) => DateAttribute$inboundSchema.parse(JSON.parse(x)),
|
|
85
|
+
`Failed to parse 'DateAttribute' from JSON`,
|
|
86
|
+
);
|
|
87
|
+
}
|
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
export * from "./anonymoususer.js";
|
|
6
6
|
export * from "./associatedoption.js";
|
|
7
7
|
export * from "./banktransfer.js";
|
|
8
|
+
export * from "./booleanattribute.js";
|
|
8
9
|
export * from "./cardpayment.js";
|
|
9
10
|
export * from "./cart.js";
|
|
10
11
|
export * from "./cartitem.js";
|
|
11
12
|
export * from "./category.js";
|
|
13
|
+
export * from "./colorattribute.js";
|
|
12
14
|
export * from "./coloroption.js";
|
|
13
15
|
export * from "./createreview.js";
|
|
14
16
|
export * from "./currency.js";
|
|
@@ -16,14 +18,17 @@ export * from "./customeraddress.js";
|
|
|
16
18
|
export * from "./customeraddressinput.js";
|
|
17
19
|
export * from "./customerreadyforreview.js";
|
|
18
20
|
export * from "./customerreview.js";
|
|
21
|
+
export * from "./dateattribute.js";
|
|
19
22
|
export * from "./discountbasedpromotion.js";
|
|
20
23
|
export * from "./fixedpricepromotion.js";
|
|
21
24
|
export * from "./freegoodspromotion.js";
|
|
22
25
|
export * from "./juspaypaymentgatewayparams.js";
|
|
23
26
|
export * from "./juspaypaymentinfo.js";
|
|
27
|
+
export * from "./multiselectattribute.js";
|
|
24
28
|
export * from "./netbankingpayment.js";
|
|
25
29
|
export * from "./notificationchannelpreferences.js";
|
|
26
30
|
export * from "./notificationpreferences.js";
|
|
31
|
+
export * from "./numberattribute.js";
|
|
27
32
|
export * from "./orderdetail.js";
|
|
28
33
|
export * from "./orderitem.js";
|
|
29
34
|
export * from "./orderlist.js";
|
|
@@ -49,8 +54,10 @@ export * from "./searchproduct.js";
|
|
|
49
54
|
export * from "./security.js";
|
|
50
55
|
export * from "./seo.js";
|
|
51
56
|
export * from "./shipmentitem.js";
|
|
57
|
+
export * from "./singleselectattribute.js";
|
|
52
58
|
export * from "./singleselectoption.js";
|
|
53
59
|
export * from "./sku.js";
|
|
60
|
+
export * from "./textattribute.js";
|
|
54
61
|
export * from "./updatecartitem.js";
|
|
55
62
|
export * from "./upipayment.js";
|
|
56
63
|
export * from "./user.js";
|
|
@@ -9,23 +9,47 @@ import { ClosedEnum } from "../../types/enums.js";
|
|
|
9
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* `paymentPage` is the default option that you should select when using hyper-checkout
|
|
14
|
+
*/
|
|
12
15
|
export const Action = {
|
|
13
16
|
PaymentPage: "paymentPage",
|
|
14
17
|
PaymentManagement: "paymentManagement",
|
|
15
18
|
} as const;
|
|
19
|
+
/**
|
|
20
|
+
* `paymentPage` is the default option that you should select when using hyper-checkout
|
|
21
|
+
*/
|
|
16
22
|
export type Action = ClosedEnum<typeof Action>;
|
|
17
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Use `hyper-checkout` for Juspay hosted checkout
|
|
26
|
+
*/
|
|
18
27
|
export const IntegrationType = {
|
|
19
28
|
HyperCheckout: "hyper-checkout",
|
|
20
29
|
ExpressCheckout: "express-checkout",
|
|
21
30
|
} as const;
|
|
31
|
+
/**
|
|
32
|
+
* Use `hyper-checkout` for Juspay hosted checkout
|
|
33
|
+
*/
|
|
22
34
|
export type IntegrationType = ClosedEnum<typeof IntegrationType>;
|
|
23
35
|
|
|
24
36
|
export type JuspayPaymentGatewayParams = {
|
|
25
37
|
paymentGateway?: "JUSPAY" | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* `paymentPage` is the default option that you should select when using hyper-checkout
|
|
40
|
+
*/
|
|
26
41
|
action: Action;
|
|
42
|
+
/**
|
|
43
|
+
* Use `hyper-checkout` for Juspay hosted checkout
|
|
44
|
+
*/
|
|
27
45
|
integrationType: IntegrationType;
|
|
46
|
+
/**
|
|
47
|
+
* This is the URL that the gateway will redirect to once payment processing is complete. This will be a GET request by default
|
|
48
|
+
*/
|
|
28
49
|
returnUrl: string;
|
|
50
|
+
/**
|
|
51
|
+
* The exact gateway reference ID that was set up in the integration
|
|
52
|
+
*/
|
|
29
53
|
gatewayReferenceId: string;
|
|
30
54
|
};
|
|
31
55
|
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Attribute for multi-select values
|
|
12
|
+
*/
|
|
13
|
+
export type MultiSelectAttribute = {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
/**
|
|
17
|
+
* A lookup safe version of the name that is lowercased and spaces are replaced with underscores. For instance, if name is `Product Type`, key will be `product_type`
|
|
18
|
+
*/
|
|
19
|
+
key: string;
|
|
20
|
+
type: string;
|
|
21
|
+
/**
|
|
22
|
+
* For multi-select attributes
|
|
23
|
+
*/
|
|
24
|
+
value: Array<string>;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const MultiSelectAttribute$inboundSchema: z.ZodType<
|
|
29
|
+
MultiSelectAttribute,
|
|
30
|
+
z.ZodTypeDef,
|
|
31
|
+
unknown
|
|
32
|
+
> = z.object({
|
|
33
|
+
id: z.string(),
|
|
34
|
+
name: z.string(),
|
|
35
|
+
key: z.string(),
|
|
36
|
+
type: z.string(),
|
|
37
|
+
value: z.array(z.string()),
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export type MultiSelectAttribute$Outbound = {
|
|
42
|
+
id: string;
|
|
43
|
+
name: string;
|
|
44
|
+
key: string;
|
|
45
|
+
type: string;
|
|
46
|
+
value: Array<string>;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const MultiSelectAttribute$outboundSchema: z.ZodType<
|
|
51
|
+
MultiSelectAttribute$Outbound,
|
|
52
|
+
z.ZodTypeDef,
|
|
53
|
+
MultiSelectAttribute
|
|
54
|
+
> = z.object({
|
|
55
|
+
id: z.string(),
|
|
56
|
+
name: z.string(),
|
|
57
|
+
key: z.string(),
|
|
58
|
+
type: z.string(),
|
|
59
|
+
value: z.array(z.string()),
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* @internal
|
|
64
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
65
|
+
*/
|
|
66
|
+
export namespace MultiSelectAttribute$ {
|
|
67
|
+
/** @deprecated use `MultiSelectAttribute$inboundSchema` instead. */
|
|
68
|
+
export const inboundSchema = MultiSelectAttribute$inboundSchema;
|
|
69
|
+
/** @deprecated use `MultiSelectAttribute$outboundSchema` instead. */
|
|
70
|
+
export const outboundSchema = MultiSelectAttribute$outboundSchema;
|
|
71
|
+
/** @deprecated use `MultiSelectAttribute$Outbound` instead. */
|
|
72
|
+
export type Outbound = MultiSelectAttribute$Outbound;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function multiSelectAttributeToJSON(
|
|
76
|
+
multiSelectAttribute: MultiSelectAttribute,
|
|
77
|
+
): string {
|
|
78
|
+
return JSON.stringify(
|
|
79
|
+
MultiSelectAttribute$outboundSchema.parse(multiSelectAttribute),
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function multiSelectAttributeFromJSON(
|
|
84
|
+
jsonString: string,
|
|
85
|
+
): SafeParseResult<MultiSelectAttribute, SDKValidationError> {
|
|
86
|
+
return safeParse(
|
|
87
|
+
jsonString,
|
|
88
|
+
(x) => MultiSelectAttribute$inboundSchema.parse(JSON.parse(x)),
|
|
89
|
+
`Failed to parse 'MultiSelectAttribute' from JSON`,
|
|
90
|
+
);
|
|
91
|
+
}
|