ce-storefront 0.3.4 → 0.3.5
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 +26 -37
- package/docs/sdks/{cestorefrontpayments → cestorefrontorderspayments}/README.md +1 -1
- package/docs/sdks/customers/README.md +236 -0
- package/docs/sdks/{paymentsapijuspay → juspay}/README.md +12 -12
- package/docs/sdks/orders/README.md +80 -1
- package/docs/sdks/payments/README.md +242 -2
- package/docs/sdks/products/README.md +1 -1
- package/esm/funcs/catalogProductsGet.d.ts +1 -1
- package/esm/funcs/catalogProductsGet.js +1 -1
- package/esm/funcs/{customersAPIGetCustomersId.d.ts → customersGetCustomersId.d.ts} +2 -2
- package/esm/funcs/customersGetCustomersId.d.ts.map +1 -0
- package/esm/funcs/{customersAPIGetCustomersId.js → customersGetCustomersId.js} +2 -2
- package/esm/funcs/customersGetCustomersId.js.map +1 -0
- package/esm/funcs/{customersAPIPostCustomers.d.ts → customersPostCustomers.d.ts} +2 -2
- package/esm/funcs/customersPostCustomers.d.ts.map +1 -0
- package/esm/funcs/{customersAPIPostCustomers.js → customersPostCustomers.js} +2 -2
- package/esm/funcs/customersPostCustomers.js.map +1 -0
- package/esm/funcs/{customersAPIPutCustomersId.d.ts → customersPutCustomersId.d.ts} +2 -2
- package/esm/funcs/customersPutCustomersId.d.ts.map +1 -0
- package/esm/funcs/{customersAPIPutCustomersId.js → customersPutCustomersId.js} +2 -2
- package/esm/funcs/{customersAPIPostCustomers.js.map → customersPutCustomersId.js.map} +1 -1
- package/esm/funcs/{paymentsAPIJuspayGetPaymentsJuspayCustomer.d.ts → juspayGetPaymentsJuspayCustomer.d.ts} +2 -2
- package/esm/funcs/juspayGetPaymentsJuspayCustomer.d.ts.map +1 -0
- package/esm/funcs/{paymentsAPIJuspayGetPaymentsJuspayCustomer.js → juspayGetPaymentsJuspayCustomer.js} +2 -2
- package/esm/funcs/juspayGetPaymentsJuspayCustomer.js.map +1 -0
- package/esm/funcs/{paymentsAPIJuspayPostPaymentsJuspayCreateCustomer.d.ts → juspayPostPaymentsJuspayCreateCustomer.d.ts} +2 -2
- package/esm/funcs/juspayPostPaymentsJuspayCreateCustomer.d.ts.map +1 -0
- package/esm/funcs/{paymentsAPIJuspayPostPaymentsJuspayCreateCustomer.js → juspayPostPaymentsJuspayCreateCustomer.js} +2 -2
- package/esm/funcs/juspayPostPaymentsJuspayCreateCustomer.js.map +1 -0
- package/esm/funcs/{paymentsAPIJuspayPostPaymentsJuspayCreateOrder.d.ts → juspayPostPaymentsJuspayCreateOrder.d.ts} +2 -2
- package/esm/funcs/juspayPostPaymentsJuspayCreateOrder.d.ts.map +1 -0
- package/esm/funcs/{paymentsAPIJuspayPostPaymentsJuspayCreateOrder.js → juspayPostPaymentsJuspayCreateOrder.js} +2 -2
- package/esm/funcs/juspayPostPaymentsJuspayCreateOrder.js.map +1 -0
- package/esm/funcs/{ordersAPIGetOrdersIdPaymentStatus.d.ts → ordersGetOrdersIdPaymentStatus.d.ts} +2 -2
- package/esm/funcs/ordersGetOrdersIdPaymentStatus.d.ts.map +1 -0
- package/esm/funcs/{ordersAPIGetOrdersIdPaymentStatus.js → ordersGetOrdersIdPaymentStatus.js} +2 -2
- package/esm/funcs/ordersGetOrdersIdPaymentStatus.js.map +1 -0
- package/esm/funcs/paymentsGetMethods.d.ts +1 -1
- package/esm/funcs/paymentsGetMethods.d.ts.map +1 -1
- package/esm/funcs/paymentsGetMethods.js +3 -3
- package/esm/funcs/paymentsGetMethods.js.map +1 -1
- package/esm/funcs/{paymentsAPIGetPaymentsCards.d.ts → paymentsGetPaymentsCards.d.ts} +2 -2
- package/esm/funcs/paymentsGetPaymentsCards.d.ts.map +1 -0
- package/esm/funcs/{paymentsAPIGetPaymentsCards.js → paymentsGetPaymentsCards.js} +2 -2
- package/esm/funcs/paymentsGetPaymentsCards.js.map +1 -0
- package/esm/funcs/{paymentsAPIGetPaymentsVerifyVpa.d.ts → paymentsGetPaymentsVerifyVpa.d.ts} +2 -2
- package/esm/funcs/paymentsGetPaymentsVerifyVpa.d.ts.map +1 -0
- package/esm/funcs/{paymentsAPIGetPaymentsVerifyVpa.js → paymentsGetPaymentsVerifyVpa.js} +2 -2
- package/esm/funcs/paymentsGetPaymentsVerifyVpa.js.map +1 -0
- package/esm/funcs/{paymentsAPIPostPaymentsCards.d.ts → paymentsPostPaymentsCards.d.ts} +2 -2
- package/esm/funcs/paymentsPostPaymentsCards.d.ts.map +1 -0
- package/esm/funcs/{paymentsAPIPostPaymentsCards.js → paymentsPostPaymentsCards.js} +2 -2
- package/esm/funcs/paymentsPostPaymentsCards.js.map +1 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/components/cart.d.ts +1 -1
- package/esm/models/components/cart.d.ts.map +1 -1
- package/esm/models/components/cart.js +1 -1
- package/esm/models/components/cart.js.map +1 -1
- package/esm/models/components/createcustomer.d.ts +1 -1
- package/esm/models/components/createcustomer.d.ts.map +1 -1
- package/esm/models/components/createcustomer.js +1 -1
- package/esm/models/components/createcustomer.js.map +1 -1
- package/esm/models/components/{customeraddressinput.d.ts → customeraddress.d.ts} +33 -33
- package/esm/models/components/customeraddress.d.ts.map +1 -0
- package/esm/models/components/{customeraddressinput.js → customeraddress.js} +37 -37
- package/esm/models/components/customeraddress.js.map +1 -0
- package/esm/models/components/freegoodspromotion.d.ts +2 -2
- package/esm/models/components/freegoodspromotion.d.ts.map +1 -1
- package/esm/models/components/freegoodspromotion.js +2 -2
- package/esm/models/components/freegoodspromotion.js.map +1 -1
- package/esm/models/components/index.d.ts +2 -3
- package/esm/models/components/index.d.ts.map +1 -1
- package/esm/models/components/index.js +2 -3
- package/esm/models/components/index.js.map +1 -1
- package/esm/models/components/orderdetail.d.ts +1 -1
- package/esm/models/components/orderdetail.d.ts.map +1 -1
- package/esm/models/components/orderdetail.js +1 -1
- package/esm/models/components/orderdetail.js.map +1 -1
- package/esm/models/components/{productlist.d.ts → product.d.ts} +14 -16
- package/esm/models/components/product.d.ts.map +1 -0
- package/esm/models/components/{productlist.js → product.js} +16 -20
- package/esm/models/components/product.js.map +1 -0
- package/esm/models/components/productdetail.d.ts +4 -4
- package/esm/models/components/productdetail.d.ts.map +1 -1
- package/esm/models/components/productdetail.js +4 -4
- package/esm/models/components/productdetail.js.map +1 -1
- package/esm/models/components/productlistresponse.d.ts +3 -3
- package/esm/models/components/productlistresponse.d.ts.map +1 -1
- package/esm/models/components/productlistresponse.js +3 -3
- package/esm/models/components/productlistresponse.js.map +1 -1
- package/esm/models/components/productpromotion.d.ts +11 -5
- package/esm/models/components/productpromotion.d.ts.map +1 -1
- package/esm/models/operations/getpaymentmethods.d.ts +143 -0
- package/esm/models/operations/getpaymentmethods.d.ts.map +1 -0
- package/esm/models/operations/{getpaymentspaymentmethods.js → getpaymentmethods.js} +42 -44
- package/esm/models/operations/getpaymentmethods.js.map +1 -0
- package/esm/models/operations/getsimilar.d.ts +2 -27
- package/esm/models/operations/getsimilar.d.ts.map +1 -1
- package/esm/models/operations/getsimilar.js +2 -27
- package/esm/models/operations/getsimilar.js.map +1 -1
- package/esm/models/operations/index.d.ts +1 -2
- package/esm/models/operations/index.d.ts.map +1 -1
- package/esm/models/operations/index.js +1 -2
- package/esm/models/operations/index.js.map +1 -1
- package/esm/models/operations/postcartitemid.d.ts +15 -15
- package/esm/models/operations/postcartitemid.d.ts.map +1 -1
- package/esm/models/operations/postcartitemid.js +15 -15
- package/esm/models/operations/postcartitemid.js.map +1 -1
- package/esm/sdk/{cestorefrontpayments.d.ts → cestorefrontorderspayments.d.ts} +2 -2
- package/esm/sdk/cestorefrontorderspayments.d.ts.map +1 -0
- package/esm/sdk/{cestorefrontpayments.js → cestorefrontorderspayments.js} +2 -2
- package/esm/sdk/cestorefrontorderspayments.js.map +1 -0
- package/esm/sdk/customers.d.ts +24 -1
- package/esm/sdk/customers.d.ts.map +1 -1
- package/esm/sdk/customers.js +31 -0
- package/esm/sdk/customers.js.map +1 -1
- package/esm/sdk/{paymentsapijuspay.d.ts → juspay.d.ts} +2 -2
- package/esm/sdk/juspay.d.ts.map +1 -0
- package/esm/sdk/{paymentsapijuspay.js → juspay.js} +8 -8
- package/esm/sdk/juspay.js.map +1 -0
- package/esm/sdk/orders.d.ts +9 -2
- package/esm/sdk/orders.d.ts.map +1 -1
- package/esm/sdk/orders.js +12 -2
- package/esm/sdk/orders.js.map +1 -1
- package/esm/sdk/payments.d.ts +23 -1
- package/esm/sdk/payments.d.ts.map +1 -1
- package/esm/sdk/payments.js +31 -0
- package/esm/sdk/payments.js.map +1 -1
- package/esm/sdk/products.d.ts +1 -1
- package/esm/sdk/products.js +1 -1
- package/esm/sdk/sdk.d.ts +3 -12
- package/esm/sdk/sdk.d.ts.map +1 -1
- package/esm/sdk/sdk.js +3 -15
- package/esm/sdk/sdk.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/catalogProductsGet.ts +1 -1
- package/src/funcs/{customersAPIGetCustomersId.ts → customersGetCustomersId.ts} +1 -1
- package/src/funcs/{customersAPIPostCustomers.ts → customersPostCustomers.ts} +1 -1
- package/src/funcs/{customersAPIPutCustomersId.ts → customersPutCustomersId.ts} +1 -1
- package/src/funcs/{paymentsAPIJuspayGetPaymentsJuspayCustomer.ts → juspayGetPaymentsJuspayCustomer.ts} +1 -1
- package/src/funcs/{paymentsAPIJuspayPostPaymentsJuspayCreateCustomer.ts → juspayPostPaymentsJuspayCreateCustomer.ts} +1 -1
- package/src/funcs/{paymentsAPIJuspayPostPaymentsJuspayCreateOrder.ts → juspayPostPaymentsJuspayCreateOrder.ts} +1 -1
- package/src/funcs/{ordersAPIGetOrdersIdPaymentStatus.ts → ordersGetOrdersIdPaymentStatus.ts} +1 -1
- package/src/funcs/paymentsGetMethods.ts +6 -7
- package/src/funcs/{paymentsAPIGetPaymentsCards.ts → paymentsGetPaymentsCards.ts} +1 -1
- package/src/funcs/{paymentsAPIGetPaymentsVerifyVpa.ts → paymentsGetPaymentsVerifyVpa.ts} +1 -1
- package/src/funcs/{paymentsAPIPostPaymentsCards.ts → paymentsPostPaymentsCards.ts} +1 -1
- package/src/lib/config.ts +2 -2
- package/src/models/components/cart.ts +1 -1
- package/src/models/components/createcustomer.ts +1 -1
- package/src/models/components/freegoodspromotion.ts +4 -4
- package/src/models/components/index.ts +2 -3
- package/src/models/components/orderdetail.ts +1 -1
- package/src/models/components/{productlist.ts → product.ts} +73 -78
- package/src/models/components/productdetail.ts +8 -8
- package/src/models/components/productlistresponse.ts +9 -9
- package/src/models/operations/{getpaymentspaymentmethods.ts → getpaymentmethods.ts} +68 -77
- package/src/models/operations/getsimilar.ts +4 -62
- package/src/models/operations/index.ts +1 -2
- package/src/models/operations/postcartitemid.ts +27 -25
- package/src/sdk/{cestorefrontpayments.ts → cestorefrontorderspayments.ts} +1 -1
- package/src/sdk/customers.ts +58 -1
- package/src/sdk/{paymentsapijuspay.ts → juspay.ts} +7 -7
- package/src/sdk/orders.ts +22 -4
- package/src/sdk/payments.ts +57 -2
- package/src/sdk/products.ts +1 -1
- package/src/sdk/sdk.ts +4 -22
- package/docs/sdks/customersapi/README.md +0 -321
- package/docs/sdks/ordersapi/README.md +0 -86
- package/docs/sdks/paymentsapi/README.md +0 -247
- package/esm/funcs/customersAPIGetCustomersId.d.ts.map +0 -1
- package/esm/funcs/customersAPIGetCustomersId.js.map +0 -1
- package/esm/funcs/customersAPIGetRecommendedProducts.d.ts +0 -16
- package/esm/funcs/customersAPIGetRecommendedProducts.d.ts.map +0 -1
- package/esm/funcs/customersAPIGetRecommendedProducts.js +0 -80
- package/esm/funcs/customersAPIGetRecommendedProducts.js.map +0 -1
- package/esm/funcs/customersAPIPostCustomers.d.ts.map +0 -1
- package/esm/funcs/customersAPIPutCustomersId.d.ts.map +0 -1
- package/esm/funcs/customersAPIPutCustomersId.js.map +0 -1
- package/esm/funcs/ordersAPIGetOrdersIdPaymentStatus.d.ts.map +0 -1
- package/esm/funcs/ordersAPIGetOrdersIdPaymentStatus.js.map +0 -1
- package/esm/funcs/paymentsAPIGetPaymentsCards.d.ts.map +0 -1
- package/esm/funcs/paymentsAPIGetPaymentsCards.js.map +0 -1
- package/esm/funcs/paymentsAPIGetPaymentsVerifyVpa.d.ts.map +0 -1
- package/esm/funcs/paymentsAPIGetPaymentsVerifyVpa.js.map +0 -1
- package/esm/funcs/paymentsAPIJuspayGetPaymentsJuspayCustomer.d.ts.map +0 -1
- package/esm/funcs/paymentsAPIJuspayGetPaymentsJuspayCustomer.js.map +0 -1
- package/esm/funcs/paymentsAPIJuspayPostPaymentsJuspayCreateCustomer.d.ts.map +0 -1
- package/esm/funcs/paymentsAPIJuspayPostPaymentsJuspayCreateCustomer.js.map +0 -1
- package/esm/funcs/paymentsAPIJuspayPostPaymentsJuspayCreateOrder.d.ts.map +0 -1
- package/esm/funcs/paymentsAPIJuspayPostPaymentsJuspayCreateOrder.js.map +0 -1
- package/esm/funcs/paymentsAPIPostPaymentsCards.d.ts.map +0 -1
- package/esm/funcs/paymentsAPIPostPaymentsCards.js.map +0 -1
- package/esm/models/components/customeraddressinput.d.ts.map +0 -1
- package/esm/models/components/customeraddressinput.js.map +0 -1
- package/esm/models/components/productlist.d.ts.map +0 -1
- package/esm/models/components/productlist.js.map +0 -1
- package/esm/models/components/recommendedproduct.d.ts +0 -155
- package/esm/models/components/recommendedproduct.d.ts.map +0 -1
- package/esm/models/components/recommendedproduct.js +0 -193
- package/esm/models/components/recommendedproduct.js.map +0 -1
- package/esm/models/operations/getpaymentspaymentmethods.d.ts +0 -143
- package/esm/models/operations/getpaymentspaymentmethods.d.ts.map +0 -1
- package/esm/models/operations/getpaymentspaymentmethods.js.map +0 -1
- package/esm/models/operations/getrecommendedproducts.d.ts +0 -90
- package/esm/models/operations/getrecommendedproducts.d.ts.map +0 -1
- package/esm/models/operations/getrecommendedproducts.js +0 -87
- package/esm/models/operations/getrecommendedproducts.js.map +0 -1
- package/esm/sdk/cestorefrontpayments.d.ts.map +0 -1
- package/esm/sdk/cestorefrontpayments.js.map +0 -1
- package/esm/sdk/customersapi.d.ts +0 -34
- package/esm/sdk/customersapi.d.ts.map +0 -1
- package/esm/sdk/customersapi.js +0 -48
- package/esm/sdk/customersapi.js.map +0 -1
- package/esm/sdk/ordersapi.d.ts +0 -12
- package/esm/sdk/ordersapi.d.ts.map +0 -1
- package/esm/sdk/ordersapi.js +0 -18
- package/esm/sdk/ordersapi.js.map +0 -1
- package/esm/sdk/paymentsapi.d.ts +0 -27
- package/esm/sdk/paymentsapi.d.ts.map +0 -1
- package/esm/sdk/paymentsapi.js +0 -39
- package/esm/sdk/paymentsapi.js.map +0 -1
- package/esm/sdk/paymentsapijuspay.d.ts.map +0 -1
- package/esm/sdk/paymentsapijuspay.js.map +0 -1
- package/src/funcs/customersAPIGetRecommendedProducts.ts +0 -144
- package/src/models/components/recommendedproduct.ts +0 -385
- package/src/models/operations/getrecommendedproducts.ts +0 -206
- package/src/sdk/customersapi.ts +0 -82
- package/src/sdk/ordersapi.ts +0 -27
- package/src/sdk/paymentsapi.ts +0 -64
- package/src/models/components/{customeraddressinput.ts → customeraddress.ts} +60 -60
|
@@ -1,385 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
6
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
-
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
-
import {
|
|
12
|
-
ProductAttribute,
|
|
13
|
-
ProductAttribute$inboundSchema,
|
|
14
|
-
ProductAttribute$Outbound,
|
|
15
|
-
ProductAttribute$outboundSchema,
|
|
16
|
-
} from "./productattribute.js";
|
|
17
|
-
import {
|
|
18
|
-
ProductBundleItem,
|
|
19
|
-
ProductBundleItem$inboundSchema,
|
|
20
|
-
ProductBundleItem$Outbound,
|
|
21
|
-
ProductBundleItem$outboundSchema,
|
|
22
|
-
} from "./productbundleitem.js";
|
|
23
|
-
import {
|
|
24
|
-
ProductImage,
|
|
25
|
-
ProductImage$inboundSchema,
|
|
26
|
-
ProductImage$Outbound,
|
|
27
|
-
ProductImage$outboundSchema,
|
|
28
|
-
} from "./productimage.js";
|
|
29
|
-
import {
|
|
30
|
-
ProductPricing,
|
|
31
|
-
ProductPricing$inboundSchema,
|
|
32
|
-
ProductPricing$Outbound,
|
|
33
|
-
ProductPricing$outboundSchema,
|
|
34
|
-
} from "./productpricing.js";
|
|
35
|
-
import {
|
|
36
|
-
ProductPromotion,
|
|
37
|
-
ProductPromotion$inboundSchema,
|
|
38
|
-
ProductPromotion$Outbound,
|
|
39
|
-
ProductPromotion$outboundSchema,
|
|
40
|
-
} from "./productpromotion.js";
|
|
41
|
-
import {
|
|
42
|
-
ProductShipping,
|
|
43
|
-
ProductShipping$inboundSchema,
|
|
44
|
-
ProductShipping$Outbound,
|
|
45
|
-
ProductShipping$outboundSchema,
|
|
46
|
-
} from "./productshipping.js";
|
|
47
|
-
import {
|
|
48
|
-
ProductSubscription,
|
|
49
|
-
ProductSubscription$inboundSchema,
|
|
50
|
-
ProductSubscription$Outbound,
|
|
51
|
-
ProductSubscription$outboundSchema,
|
|
52
|
-
} from "./productsubscription.js";
|
|
53
|
-
import {
|
|
54
|
-
Variant,
|
|
55
|
-
Variant$inboundSchema,
|
|
56
|
-
Variant$Outbound,
|
|
57
|
-
Variant$outboundSchema,
|
|
58
|
-
} from "./variant.js";
|
|
59
|
-
|
|
60
|
-
export const RecommendedProductProductType = {
|
|
61
|
-
Physical: "physical",
|
|
62
|
-
Digital: "digital",
|
|
63
|
-
Bundle: "bundle",
|
|
64
|
-
} as const;
|
|
65
|
-
export type RecommendedProductProductType = ClosedEnum<
|
|
66
|
-
typeof RecommendedProductProductType
|
|
67
|
-
>;
|
|
68
|
-
|
|
69
|
-
export type RecommendedProductVariantOptions = {
|
|
70
|
-
optionName?: string | undefined;
|
|
71
|
-
optionValue?: Array<string> | undefined;
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
export type RecommendedProduct = {
|
|
75
|
-
/**
|
|
76
|
-
* The ULID of the product
|
|
77
|
-
*/
|
|
78
|
-
id?: string | undefined;
|
|
79
|
-
name?: string | undefined;
|
|
80
|
-
description?: string | undefined;
|
|
81
|
-
shortDescription?: string | undefined;
|
|
82
|
-
productType?: RecommendedProductProductType | undefined;
|
|
83
|
-
active?: boolean | undefined;
|
|
84
|
-
sku?: string | undefined;
|
|
85
|
-
stockAvailable?: boolean | undefined;
|
|
86
|
-
isFeatured?: boolean | undefined;
|
|
87
|
-
onOffer?: boolean | undefined;
|
|
88
|
-
onSubscription?: boolean | undefined;
|
|
89
|
-
onPromotion?: boolean | undefined;
|
|
90
|
-
hasVariant?: boolean | undefined;
|
|
91
|
-
/**
|
|
92
|
-
* this will be used if has_variant is true, to auto set default values.
|
|
93
|
-
*/
|
|
94
|
-
variantOptions?: Array<RecommendedProductVariantOptions> | null | undefined;
|
|
95
|
-
attributes?: Array<ProductAttribute> | undefined;
|
|
96
|
-
images?: Array<ProductImage> | undefined;
|
|
97
|
-
pricing?: ProductPricing | undefined;
|
|
98
|
-
shipping?: ProductShipping | undefined;
|
|
99
|
-
tags?: Array<string> | null | undefined;
|
|
100
|
-
categoryIds?: Array<string> | undefined;
|
|
101
|
-
reviewsRatingSum?: number | undefined;
|
|
102
|
-
reviewsCount?: number | undefined;
|
|
103
|
-
hsnCode?: string | undefined;
|
|
104
|
-
createdAt?: Date | undefined;
|
|
105
|
-
modifiedAt?: Date | undefined;
|
|
106
|
-
promotion?: Array<ProductPromotion> | undefined;
|
|
107
|
-
subscription?: Array<ProductSubscription> | undefined;
|
|
108
|
-
bundleItems?: Array<ProductBundleItem> | undefined;
|
|
109
|
-
variants?: Array<Variant> | undefined;
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
/** @internal */
|
|
113
|
-
export const RecommendedProductProductType$inboundSchema: z.ZodNativeEnum<
|
|
114
|
-
typeof RecommendedProductProductType
|
|
115
|
-
> = z.nativeEnum(RecommendedProductProductType);
|
|
116
|
-
|
|
117
|
-
/** @internal */
|
|
118
|
-
export const RecommendedProductProductType$outboundSchema: z.ZodNativeEnum<
|
|
119
|
-
typeof RecommendedProductProductType
|
|
120
|
-
> = RecommendedProductProductType$inboundSchema;
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* @internal
|
|
124
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
125
|
-
*/
|
|
126
|
-
export namespace RecommendedProductProductType$ {
|
|
127
|
-
/** @deprecated use `RecommendedProductProductType$inboundSchema` instead. */
|
|
128
|
-
export const inboundSchema = RecommendedProductProductType$inboundSchema;
|
|
129
|
-
/** @deprecated use `RecommendedProductProductType$outboundSchema` instead. */
|
|
130
|
-
export const outboundSchema = RecommendedProductProductType$outboundSchema;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
/** @internal */
|
|
134
|
-
export const RecommendedProductVariantOptions$inboundSchema: z.ZodType<
|
|
135
|
-
RecommendedProductVariantOptions,
|
|
136
|
-
z.ZodTypeDef,
|
|
137
|
-
unknown
|
|
138
|
-
> = z.object({
|
|
139
|
-
option_name: z.string().optional(),
|
|
140
|
-
option_value: z.array(z.string()).optional(),
|
|
141
|
-
}).transform((v) => {
|
|
142
|
-
return remap$(v, {
|
|
143
|
-
"option_name": "optionName",
|
|
144
|
-
"option_value": "optionValue",
|
|
145
|
-
});
|
|
146
|
-
});
|
|
147
|
-
|
|
148
|
-
/** @internal */
|
|
149
|
-
export type RecommendedProductVariantOptions$Outbound = {
|
|
150
|
-
option_name?: string | undefined;
|
|
151
|
-
option_value?: Array<string> | undefined;
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
/** @internal */
|
|
155
|
-
export const RecommendedProductVariantOptions$outboundSchema: z.ZodType<
|
|
156
|
-
RecommendedProductVariantOptions$Outbound,
|
|
157
|
-
z.ZodTypeDef,
|
|
158
|
-
RecommendedProductVariantOptions
|
|
159
|
-
> = z.object({
|
|
160
|
-
optionName: z.string().optional(),
|
|
161
|
-
optionValue: z.array(z.string()).optional(),
|
|
162
|
-
}).transform((v) => {
|
|
163
|
-
return remap$(v, {
|
|
164
|
-
optionName: "option_name",
|
|
165
|
-
optionValue: "option_value",
|
|
166
|
-
});
|
|
167
|
-
});
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* @internal
|
|
171
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
172
|
-
*/
|
|
173
|
-
export namespace RecommendedProductVariantOptions$ {
|
|
174
|
-
/** @deprecated use `RecommendedProductVariantOptions$inboundSchema` instead. */
|
|
175
|
-
export const inboundSchema = RecommendedProductVariantOptions$inboundSchema;
|
|
176
|
-
/** @deprecated use `RecommendedProductVariantOptions$outboundSchema` instead. */
|
|
177
|
-
export const outboundSchema = RecommendedProductVariantOptions$outboundSchema;
|
|
178
|
-
/** @deprecated use `RecommendedProductVariantOptions$Outbound` instead. */
|
|
179
|
-
export type Outbound = RecommendedProductVariantOptions$Outbound;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
export function recommendedProductVariantOptionsToJSON(
|
|
183
|
-
recommendedProductVariantOptions: RecommendedProductVariantOptions,
|
|
184
|
-
): string {
|
|
185
|
-
return JSON.stringify(
|
|
186
|
-
RecommendedProductVariantOptions$outboundSchema.parse(
|
|
187
|
-
recommendedProductVariantOptions,
|
|
188
|
-
),
|
|
189
|
-
);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
export function recommendedProductVariantOptionsFromJSON(
|
|
193
|
-
jsonString: string,
|
|
194
|
-
): SafeParseResult<RecommendedProductVariantOptions, SDKValidationError> {
|
|
195
|
-
return safeParse(
|
|
196
|
-
jsonString,
|
|
197
|
-
(x) => RecommendedProductVariantOptions$inboundSchema.parse(JSON.parse(x)),
|
|
198
|
-
`Failed to parse 'RecommendedProductVariantOptions' from JSON`,
|
|
199
|
-
);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
/** @internal */
|
|
203
|
-
export const RecommendedProduct$inboundSchema: z.ZodType<
|
|
204
|
-
RecommendedProduct,
|
|
205
|
-
z.ZodTypeDef,
|
|
206
|
-
unknown
|
|
207
|
-
> = z.object({
|
|
208
|
-
id: z.string().optional(),
|
|
209
|
-
name: z.string().optional(),
|
|
210
|
-
description: z.string().optional(),
|
|
211
|
-
short_description: z.string().optional(),
|
|
212
|
-
product_type: RecommendedProductProductType$inboundSchema.optional(),
|
|
213
|
-
active: z.boolean().default(true),
|
|
214
|
-
sku: z.string().optional(),
|
|
215
|
-
stock_available: z.boolean().default(true),
|
|
216
|
-
is_featured: z.boolean().default(false),
|
|
217
|
-
on_offer: z.boolean().default(false),
|
|
218
|
-
on_subscription: z.boolean().default(false),
|
|
219
|
-
on_promotion: z.boolean().default(false),
|
|
220
|
-
has_variant: z.boolean().default(false),
|
|
221
|
-
variant_options: z.nullable(
|
|
222
|
-
z.array(z.lazy(() => RecommendedProductVariantOptions$inboundSchema)),
|
|
223
|
-
).optional(),
|
|
224
|
-
attributes: z.array(ProductAttribute$inboundSchema).optional(),
|
|
225
|
-
images: z.array(ProductImage$inboundSchema).optional(),
|
|
226
|
-
pricing: ProductPricing$inboundSchema.optional(),
|
|
227
|
-
shipping: ProductShipping$inboundSchema.optional(),
|
|
228
|
-
tags: z.nullable(z.array(z.string())).optional(),
|
|
229
|
-
category_ids: z.array(z.string()).optional(),
|
|
230
|
-
reviews_rating_sum: z.number().optional(),
|
|
231
|
-
reviews_count: z.number().int().optional(),
|
|
232
|
-
hsn_code: z.string().optional(),
|
|
233
|
-
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
234
|
-
.optional(),
|
|
235
|
-
modified_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
236
|
-
.optional(),
|
|
237
|
-
promotion: z.array(ProductPromotion$inboundSchema).optional(),
|
|
238
|
-
subscription: z.array(ProductSubscription$inboundSchema).optional(),
|
|
239
|
-
bundle_items: z.array(ProductBundleItem$inboundSchema).optional(),
|
|
240
|
-
variants: z.array(Variant$inboundSchema).optional(),
|
|
241
|
-
}).transform((v) => {
|
|
242
|
-
return remap$(v, {
|
|
243
|
-
"short_description": "shortDescription",
|
|
244
|
-
"product_type": "productType",
|
|
245
|
-
"stock_available": "stockAvailable",
|
|
246
|
-
"is_featured": "isFeatured",
|
|
247
|
-
"on_offer": "onOffer",
|
|
248
|
-
"on_subscription": "onSubscription",
|
|
249
|
-
"on_promotion": "onPromotion",
|
|
250
|
-
"has_variant": "hasVariant",
|
|
251
|
-
"variant_options": "variantOptions",
|
|
252
|
-
"category_ids": "categoryIds",
|
|
253
|
-
"reviews_rating_sum": "reviewsRatingSum",
|
|
254
|
-
"reviews_count": "reviewsCount",
|
|
255
|
-
"hsn_code": "hsnCode",
|
|
256
|
-
"created_at": "createdAt",
|
|
257
|
-
"modified_at": "modifiedAt",
|
|
258
|
-
"bundle_items": "bundleItems",
|
|
259
|
-
});
|
|
260
|
-
});
|
|
261
|
-
|
|
262
|
-
/** @internal */
|
|
263
|
-
export type RecommendedProduct$Outbound = {
|
|
264
|
-
id?: string | undefined;
|
|
265
|
-
name?: string | undefined;
|
|
266
|
-
description?: string | undefined;
|
|
267
|
-
short_description?: string | undefined;
|
|
268
|
-
product_type?: string | undefined;
|
|
269
|
-
active: boolean;
|
|
270
|
-
sku?: string | undefined;
|
|
271
|
-
stock_available: boolean;
|
|
272
|
-
is_featured: boolean;
|
|
273
|
-
on_offer: boolean;
|
|
274
|
-
on_subscription: boolean;
|
|
275
|
-
on_promotion: boolean;
|
|
276
|
-
has_variant: boolean;
|
|
277
|
-
variant_options?:
|
|
278
|
-
| Array<RecommendedProductVariantOptions$Outbound>
|
|
279
|
-
| null
|
|
280
|
-
| undefined;
|
|
281
|
-
attributes?: Array<ProductAttribute$Outbound> | undefined;
|
|
282
|
-
images?: Array<ProductImage$Outbound> | undefined;
|
|
283
|
-
pricing?: ProductPricing$Outbound | undefined;
|
|
284
|
-
shipping?: ProductShipping$Outbound | undefined;
|
|
285
|
-
tags?: Array<string> | null | undefined;
|
|
286
|
-
category_ids?: Array<string> | undefined;
|
|
287
|
-
reviews_rating_sum?: number | undefined;
|
|
288
|
-
reviews_count?: number | undefined;
|
|
289
|
-
hsn_code?: string | undefined;
|
|
290
|
-
created_at?: string | undefined;
|
|
291
|
-
modified_at?: string | undefined;
|
|
292
|
-
promotion?: Array<ProductPromotion$Outbound> | undefined;
|
|
293
|
-
subscription?: Array<ProductSubscription$Outbound> | undefined;
|
|
294
|
-
bundle_items?: Array<ProductBundleItem$Outbound> | undefined;
|
|
295
|
-
variants?: Array<Variant$Outbound> | undefined;
|
|
296
|
-
};
|
|
297
|
-
|
|
298
|
-
/** @internal */
|
|
299
|
-
export const RecommendedProduct$outboundSchema: z.ZodType<
|
|
300
|
-
RecommendedProduct$Outbound,
|
|
301
|
-
z.ZodTypeDef,
|
|
302
|
-
RecommendedProduct
|
|
303
|
-
> = z.object({
|
|
304
|
-
id: z.string().optional(),
|
|
305
|
-
name: z.string().optional(),
|
|
306
|
-
description: z.string().optional(),
|
|
307
|
-
shortDescription: z.string().optional(),
|
|
308
|
-
productType: RecommendedProductProductType$outboundSchema.optional(),
|
|
309
|
-
active: z.boolean().default(true),
|
|
310
|
-
sku: z.string().optional(),
|
|
311
|
-
stockAvailable: z.boolean().default(true),
|
|
312
|
-
isFeatured: z.boolean().default(false),
|
|
313
|
-
onOffer: z.boolean().default(false),
|
|
314
|
-
onSubscription: z.boolean().default(false),
|
|
315
|
-
onPromotion: z.boolean().default(false),
|
|
316
|
-
hasVariant: z.boolean().default(false),
|
|
317
|
-
variantOptions: z.nullable(
|
|
318
|
-
z.array(z.lazy(() => RecommendedProductVariantOptions$outboundSchema)),
|
|
319
|
-
).optional(),
|
|
320
|
-
attributes: z.array(ProductAttribute$outboundSchema).optional(),
|
|
321
|
-
images: z.array(ProductImage$outboundSchema).optional(),
|
|
322
|
-
pricing: ProductPricing$outboundSchema.optional(),
|
|
323
|
-
shipping: ProductShipping$outboundSchema.optional(),
|
|
324
|
-
tags: z.nullable(z.array(z.string())).optional(),
|
|
325
|
-
categoryIds: z.array(z.string()).optional(),
|
|
326
|
-
reviewsRatingSum: z.number().optional(),
|
|
327
|
-
reviewsCount: z.number().int().optional(),
|
|
328
|
-
hsnCode: z.string().optional(),
|
|
329
|
-
createdAt: z.date().transform(v => v.toISOString()).optional(),
|
|
330
|
-
modifiedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
331
|
-
promotion: z.array(ProductPromotion$outboundSchema).optional(),
|
|
332
|
-
subscription: z.array(ProductSubscription$outboundSchema).optional(),
|
|
333
|
-
bundleItems: z.array(ProductBundleItem$outboundSchema).optional(),
|
|
334
|
-
variants: z.array(Variant$outboundSchema).optional(),
|
|
335
|
-
}).transform((v) => {
|
|
336
|
-
return remap$(v, {
|
|
337
|
-
shortDescription: "short_description",
|
|
338
|
-
productType: "product_type",
|
|
339
|
-
stockAvailable: "stock_available",
|
|
340
|
-
isFeatured: "is_featured",
|
|
341
|
-
onOffer: "on_offer",
|
|
342
|
-
onSubscription: "on_subscription",
|
|
343
|
-
onPromotion: "on_promotion",
|
|
344
|
-
hasVariant: "has_variant",
|
|
345
|
-
variantOptions: "variant_options",
|
|
346
|
-
categoryIds: "category_ids",
|
|
347
|
-
reviewsRatingSum: "reviews_rating_sum",
|
|
348
|
-
reviewsCount: "reviews_count",
|
|
349
|
-
hsnCode: "hsn_code",
|
|
350
|
-
createdAt: "created_at",
|
|
351
|
-
modifiedAt: "modified_at",
|
|
352
|
-
bundleItems: "bundle_items",
|
|
353
|
-
});
|
|
354
|
-
});
|
|
355
|
-
|
|
356
|
-
/**
|
|
357
|
-
* @internal
|
|
358
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
359
|
-
*/
|
|
360
|
-
export namespace RecommendedProduct$ {
|
|
361
|
-
/** @deprecated use `RecommendedProduct$inboundSchema` instead. */
|
|
362
|
-
export const inboundSchema = RecommendedProduct$inboundSchema;
|
|
363
|
-
/** @deprecated use `RecommendedProduct$outboundSchema` instead. */
|
|
364
|
-
export const outboundSchema = RecommendedProduct$outboundSchema;
|
|
365
|
-
/** @deprecated use `RecommendedProduct$Outbound` instead. */
|
|
366
|
-
export type Outbound = RecommendedProduct$Outbound;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
export function recommendedProductToJSON(
|
|
370
|
-
recommendedProduct: RecommendedProduct,
|
|
371
|
-
): string {
|
|
372
|
-
return JSON.stringify(
|
|
373
|
-
RecommendedProduct$outboundSchema.parse(recommendedProduct),
|
|
374
|
-
);
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
export function recommendedProductFromJSON(
|
|
378
|
-
jsonString: string,
|
|
379
|
-
): SafeParseResult<RecommendedProduct, SDKValidationError> {
|
|
380
|
-
return safeParse(
|
|
381
|
-
jsonString,
|
|
382
|
-
(x) => RecommendedProduct$inboundSchema.parse(JSON.parse(x)),
|
|
383
|
-
`Failed to parse 'RecommendedProduct' from JSON`,
|
|
384
|
-
);
|
|
385
|
-
}
|
|
@@ -1,206 +0,0 @@
|
|
|
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 * as components from "../components/index.js";
|
|
9
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
-
|
|
11
|
-
export type GetRecommendedProductsRequest = {
|
|
12
|
-
/**
|
|
13
|
-
* customer id
|
|
14
|
-
*/
|
|
15
|
-
id: string;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export type GetRecommendedProductsContent = {
|
|
19
|
-
products?: Array<components.RecommendedProduct> | undefined;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Success response
|
|
24
|
-
*/
|
|
25
|
-
export type GetRecommendedProductsResponseBody = {
|
|
26
|
-
message?: string | undefined;
|
|
27
|
-
success?: boolean | undefined;
|
|
28
|
-
content?: GetRecommendedProductsContent | undefined;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
/** @internal */
|
|
32
|
-
export const GetRecommendedProductsRequest$inboundSchema: z.ZodType<
|
|
33
|
-
GetRecommendedProductsRequest,
|
|
34
|
-
z.ZodTypeDef,
|
|
35
|
-
unknown
|
|
36
|
-
> = z.object({
|
|
37
|
-
id: z.string(),
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
/** @internal */
|
|
41
|
-
export type GetRecommendedProductsRequest$Outbound = {
|
|
42
|
-
id: string;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
/** @internal */
|
|
46
|
-
export const GetRecommendedProductsRequest$outboundSchema: z.ZodType<
|
|
47
|
-
GetRecommendedProductsRequest$Outbound,
|
|
48
|
-
z.ZodTypeDef,
|
|
49
|
-
GetRecommendedProductsRequest
|
|
50
|
-
> = z.object({
|
|
51
|
-
id: z.string(),
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* @internal
|
|
56
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
57
|
-
*/
|
|
58
|
-
export namespace GetRecommendedProductsRequest$ {
|
|
59
|
-
/** @deprecated use `GetRecommendedProductsRequest$inboundSchema` instead. */
|
|
60
|
-
export const inboundSchema = GetRecommendedProductsRequest$inboundSchema;
|
|
61
|
-
/** @deprecated use `GetRecommendedProductsRequest$outboundSchema` instead. */
|
|
62
|
-
export const outboundSchema = GetRecommendedProductsRequest$outboundSchema;
|
|
63
|
-
/** @deprecated use `GetRecommendedProductsRequest$Outbound` instead. */
|
|
64
|
-
export type Outbound = GetRecommendedProductsRequest$Outbound;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export function getRecommendedProductsRequestToJSON(
|
|
68
|
-
getRecommendedProductsRequest: GetRecommendedProductsRequest,
|
|
69
|
-
): string {
|
|
70
|
-
return JSON.stringify(
|
|
71
|
-
GetRecommendedProductsRequest$outboundSchema.parse(
|
|
72
|
-
getRecommendedProductsRequest,
|
|
73
|
-
),
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export function getRecommendedProductsRequestFromJSON(
|
|
78
|
-
jsonString: string,
|
|
79
|
-
): SafeParseResult<GetRecommendedProductsRequest, SDKValidationError> {
|
|
80
|
-
return safeParse(
|
|
81
|
-
jsonString,
|
|
82
|
-
(x) => GetRecommendedProductsRequest$inboundSchema.parse(JSON.parse(x)),
|
|
83
|
-
`Failed to parse 'GetRecommendedProductsRequest' from JSON`,
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/** @internal */
|
|
88
|
-
export const GetRecommendedProductsContent$inboundSchema: z.ZodType<
|
|
89
|
-
GetRecommendedProductsContent,
|
|
90
|
-
z.ZodTypeDef,
|
|
91
|
-
unknown
|
|
92
|
-
> = z.object({
|
|
93
|
-
products: z.array(components.RecommendedProduct$inboundSchema).optional(),
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
/** @internal */
|
|
97
|
-
export type GetRecommendedProductsContent$Outbound = {
|
|
98
|
-
products?: Array<components.RecommendedProduct$Outbound> | undefined;
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
/** @internal */
|
|
102
|
-
export const GetRecommendedProductsContent$outboundSchema: z.ZodType<
|
|
103
|
-
GetRecommendedProductsContent$Outbound,
|
|
104
|
-
z.ZodTypeDef,
|
|
105
|
-
GetRecommendedProductsContent
|
|
106
|
-
> = z.object({
|
|
107
|
-
products: z.array(components.RecommendedProduct$outboundSchema).optional(),
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* @internal
|
|
112
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
113
|
-
*/
|
|
114
|
-
export namespace GetRecommendedProductsContent$ {
|
|
115
|
-
/** @deprecated use `GetRecommendedProductsContent$inboundSchema` instead. */
|
|
116
|
-
export const inboundSchema = GetRecommendedProductsContent$inboundSchema;
|
|
117
|
-
/** @deprecated use `GetRecommendedProductsContent$outboundSchema` instead. */
|
|
118
|
-
export const outboundSchema = GetRecommendedProductsContent$outboundSchema;
|
|
119
|
-
/** @deprecated use `GetRecommendedProductsContent$Outbound` instead. */
|
|
120
|
-
export type Outbound = GetRecommendedProductsContent$Outbound;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
export function getRecommendedProductsContentToJSON(
|
|
124
|
-
getRecommendedProductsContent: GetRecommendedProductsContent,
|
|
125
|
-
): string {
|
|
126
|
-
return JSON.stringify(
|
|
127
|
-
GetRecommendedProductsContent$outboundSchema.parse(
|
|
128
|
-
getRecommendedProductsContent,
|
|
129
|
-
),
|
|
130
|
-
);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export function getRecommendedProductsContentFromJSON(
|
|
134
|
-
jsonString: string,
|
|
135
|
-
): SafeParseResult<GetRecommendedProductsContent, SDKValidationError> {
|
|
136
|
-
return safeParse(
|
|
137
|
-
jsonString,
|
|
138
|
-
(x) => GetRecommendedProductsContent$inboundSchema.parse(JSON.parse(x)),
|
|
139
|
-
`Failed to parse 'GetRecommendedProductsContent' from JSON`,
|
|
140
|
-
);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
/** @internal */
|
|
144
|
-
export const GetRecommendedProductsResponseBody$inboundSchema: z.ZodType<
|
|
145
|
-
GetRecommendedProductsResponseBody,
|
|
146
|
-
z.ZodTypeDef,
|
|
147
|
-
unknown
|
|
148
|
-
> = z.object({
|
|
149
|
-
message: z.string().optional(),
|
|
150
|
-
success: z.boolean().optional(),
|
|
151
|
-
content: z.lazy(() => GetRecommendedProductsContent$inboundSchema).optional(),
|
|
152
|
-
});
|
|
153
|
-
|
|
154
|
-
/** @internal */
|
|
155
|
-
export type GetRecommendedProductsResponseBody$Outbound = {
|
|
156
|
-
message?: string | undefined;
|
|
157
|
-
success?: boolean | undefined;
|
|
158
|
-
content?: GetRecommendedProductsContent$Outbound | undefined;
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
/** @internal */
|
|
162
|
-
export const GetRecommendedProductsResponseBody$outboundSchema: z.ZodType<
|
|
163
|
-
GetRecommendedProductsResponseBody$Outbound,
|
|
164
|
-
z.ZodTypeDef,
|
|
165
|
-
GetRecommendedProductsResponseBody
|
|
166
|
-
> = z.object({
|
|
167
|
-
message: z.string().optional(),
|
|
168
|
-
success: z.boolean().optional(),
|
|
169
|
-
content: z.lazy(() => GetRecommendedProductsContent$outboundSchema)
|
|
170
|
-
.optional(),
|
|
171
|
-
});
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* @internal
|
|
175
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
176
|
-
*/
|
|
177
|
-
export namespace GetRecommendedProductsResponseBody$ {
|
|
178
|
-
/** @deprecated use `GetRecommendedProductsResponseBody$inboundSchema` instead. */
|
|
179
|
-
export const inboundSchema = GetRecommendedProductsResponseBody$inboundSchema;
|
|
180
|
-
/** @deprecated use `GetRecommendedProductsResponseBody$outboundSchema` instead. */
|
|
181
|
-
export const outboundSchema =
|
|
182
|
-
GetRecommendedProductsResponseBody$outboundSchema;
|
|
183
|
-
/** @deprecated use `GetRecommendedProductsResponseBody$Outbound` instead. */
|
|
184
|
-
export type Outbound = GetRecommendedProductsResponseBody$Outbound;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
export function getRecommendedProductsResponseBodyToJSON(
|
|
188
|
-
getRecommendedProductsResponseBody: GetRecommendedProductsResponseBody,
|
|
189
|
-
): string {
|
|
190
|
-
return JSON.stringify(
|
|
191
|
-
GetRecommendedProductsResponseBody$outboundSchema.parse(
|
|
192
|
-
getRecommendedProductsResponseBody,
|
|
193
|
-
),
|
|
194
|
-
);
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
export function getRecommendedProductsResponseBodyFromJSON(
|
|
198
|
-
jsonString: string,
|
|
199
|
-
): SafeParseResult<GetRecommendedProductsResponseBody, SDKValidationError> {
|
|
200
|
-
return safeParse(
|
|
201
|
-
jsonString,
|
|
202
|
-
(x) =>
|
|
203
|
-
GetRecommendedProductsResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
204
|
-
`Failed to parse 'GetRecommendedProductsResponseBody' from JSON`,
|
|
205
|
-
);
|
|
206
|
-
}
|
package/src/sdk/customersapi.ts
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { customersAPIGetCustomersId } from "../funcs/customersAPIGetCustomersId.js";
|
|
6
|
-
import { customersAPIGetRecommendedProducts } from "../funcs/customersAPIGetRecommendedProducts.js";
|
|
7
|
-
import { customersAPIPostCustomers } from "../funcs/customersAPIPostCustomers.js";
|
|
8
|
-
import { customersAPIPutCustomersId } from "../funcs/customersAPIPutCustomersId.js";
|
|
9
|
-
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
10
|
-
import * as components from "../models/components/index.js";
|
|
11
|
-
import * as operations from "../models/operations/index.js";
|
|
12
|
-
import { unwrapAsync } from "../types/fp.js";
|
|
13
|
-
|
|
14
|
-
export class CustomersAPI extends ClientSDK {
|
|
15
|
-
/**
|
|
16
|
-
* List all recommended products
|
|
17
|
-
*
|
|
18
|
-
* @remarks
|
|
19
|
-
* Retrieves a list of recommended products for a specified user based on their browsing history, past purchases, and indicated preferences. The recommended products are returned sorted by relevance, providing a personalized shopping experience for each user.
|
|
20
|
-
*/
|
|
21
|
-
async getRecommendedProducts(
|
|
22
|
-
request: operations.GetRecommendedProductsRequest,
|
|
23
|
-
options?: RequestOptions,
|
|
24
|
-
): Promise<operations.GetRecommendedProductsResponseBody> {
|
|
25
|
-
return unwrapAsync(customersAPIGetRecommendedProducts(
|
|
26
|
-
this,
|
|
27
|
-
request,
|
|
28
|
-
options,
|
|
29
|
-
));
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Create customer
|
|
34
|
-
*
|
|
35
|
-
* @remarks
|
|
36
|
-
* Create customer
|
|
37
|
-
*/
|
|
38
|
-
async postCustomers(
|
|
39
|
-
request: components.CreateCustomer,
|
|
40
|
-
options?: RequestOptions,
|
|
41
|
-
): Promise<operations.PostCustomersResponseBody> {
|
|
42
|
-
return unwrapAsync(customersAPIPostCustomers(
|
|
43
|
-
this,
|
|
44
|
-
request,
|
|
45
|
-
options,
|
|
46
|
-
));
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Retrieve customer detail
|
|
51
|
-
*
|
|
52
|
-
* @remarks
|
|
53
|
-
* Retrieve customer detail.
|
|
54
|
-
*/
|
|
55
|
-
async getCustomersId(
|
|
56
|
-
request: operations.GetCustomersIdRequest,
|
|
57
|
-
options?: RequestOptions,
|
|
58
|
-
): Promise<operations.GetCustomersIdResponseBody> {
|
|
59
|
-
return unwrapAsync(customersAPIGetCustomersId(
|
|
60
|
-
this,
|
|
61
|
-
request,
|
|
62
|
-
options,
|
|
63
|
-
));
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Update customer detail
|
|
68
|
-
*
|
|
69
|
-
* @remarks
|
|
70
|
-
* Update customer detail
|
|
71
|
-
*/
|
|
72
|
-
async putCustomersId(
|
|
73
|
-
request: operations.PutCustomersIdRequest,
|
|
74
|
-
options?: RequestOptions,
|
|
75
|
-
): Promise<operations.PutCustomersIdResponseBody> {
|
|
76
|
-
return unwrapAsync(customersAPIPutCustomersId(
|
|
77
|
-
this,
|
|
78
|
-
request,
|
|
79
|
-
options,
|
|
80
|
-
));
|
|
81
|
-
}
|
|
82
|
-
}
|
package/src/sdk/ordersapi.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { ordersAPIGetOrdersIdPaymentStatus } from "../funcs/ordersAPIGetOrdersIdPaymentStatus.js";
|
|
6
|
-
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
|
-
import * as operations from "../models/operations/index.js";
|
|
8
|
-
import { unwrapAsync } from "../types/fp.js";
|
|
9
|
-
|
|
10
|
-
export class OrdersAPI extends ClientSDK {
|
|
11
|
-
/**
|
|
12
|
-
* Retrieve payment status
|
|
13
|
-
*
|
|
14
|
-
* @remarks
|
|
15
|
-
* Retrieve payment status of a paricular order.
|
|
16
|
-
*/
|
|
17
|
-
async getOrdersIdPaymentStatus(
|
|
18
|
-
request: operations.GetOrdersIdPaymentStatusRequest,
|
|
19
|
-
options?: RequestOptions,
|
|
20
|
-
): Promise<operations.GetOrdersIdPaymentStatusResponseBody> {
|
|
21
|
-
return unwrapAsync(ordersAPIGetOrdersIdPaymentStatus(
|
|
22
|
-
this,
|
|
23
|
-
request,
|
|
24
|
-
options,
|
|
25
|
-
));
|
|
26
|
-
}
|
|
27
|
-
}
|