ce-storefront 0.0.2 → 0.0.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.
Files changed (165) hide show
  1. package/README.md +50 -25
  2. package/docs/sdks/auth/README.md +75 -0
  3. package/docs/sdks/customers/README.md +1 -80
  4. package/docs/sdks/customersapi/README.md +322 -0
  5. package/funcs/authLoginAnonymously.d.ts +16 -0
  6. package/funcs/authLoginAnonymously.d.ts.map +1 -0
  7. package/funcs/authLoginAnonymously.js +88 -0
  8. package/funcs/authLoginAnonymously.js.map +1 -0
  9. package/funcs/{ordersReturnsList.d.ts → customersAPIGetCustomersId.d.ts} +4 -4
  10. package/funcs/customersAPIGetCustomersId.d.ts.map +1 -0
  11. package/funcs/{ordersReturnsList.js → customersAPIGetCustomersId.js} +10 -13
  12. package/funcs/customersAPIGetCustomersId.js.map +1 -0
  13. package/funcs/{customersGetRecommendedProducts.d.ts → customersAPIGetRecommendedProducts.d.ts} +3 -3
  14. package/funcs/customersAPIGetRecommendedProducts.d.ts.map +1 -0
  15. package/funcs/{customersGetRecommendedProducts.js → customersAPIGetRecommendedProducts.js} +20 -7
  16. package/funcs/customersAPIGetRecommendedProducts.js.map +1 -0
  17. package/funcs/customersAPIPostCustomers.d.ts +17 -0
  18. package/funcs/customersAPIPostCustomers.d.ts.map +1 -0
  19. package/funcs/customersAPIPostCustomers.js +96 -0
  20. package/funcs/customersAPIPostCustomers.js.map +1 -0
  21. package/funcs/customersAPIPutCustomersId.d.ts +16 -0
  22. package/funcs/customersAPIPutCustomersId.d.ts.map +1 -0
  23. package/funcs/customersAPIPutCustomersId.js +98 -0
  24. package/funcs/customersAPIPutCustomersId.js.map +1 -0
  25. package/lib/config.d.ts +2 -2
  26. package/lib/config.js +2 -2
  27. package/models/components/business.d.ts +31 -0
  28. package/models/components/business.d.ts.map +1 -0
  29. package/models/components/business.js +71 -0
  30. package/models/components/business.js.map +1 -0
  31. package/models/components/cart.d.ts +1 -1
  32. package/models/components/cart.d.ts.map +1 -1
  33. package/models/components/cart.js +5 -5
  34. package/models/components/cart.js.map +1 -1
  35. package/models/components/createcustomer.d.ts +29 -0
  36. package/models/components/createcustomer.d.ts.map +1 -0
  37. package/models/components/createcustomer.js +54 -0
  38. package/models/components/createcustomer.js.map +1 -0
  39. package/models/components/{customeraddress.d.ts → customeraddressinput.d.ts} +29 -29
  40. package/models/components/customeraddressinput.d.ts.map +1 -0
  41. package/models/components/{customeraddress.js → customeraddressinput.js} +30 -30
  42. package/models/components/customeraddressinput.js.map +1 -0
  43. package/models/components/customerdetail.d.ts +51 -0
  44. package/models/components/customerdetail.d.ts.map +1 -0
  45. package/models/components/customerdetail.js +88 -0
  46. package/models/components/customerdetail.js.map +1 -0
  47. package/models/components/index.d.ts +6 -3
  48. package/models/components/index.d.ts.map +1 -1
  49. package/models/components/index.js +6 -3
  50. package/models/components/index.js.map +1 -1
  51. package/models/components/orderdetail.d.ts +1 -1
  52. package/models/components/orderdetail.d.ts.map +1 -1
  53. package/models/components/orderdetail.js +5 -5
  54. package/models/components/orderdetail.js.map +1 -1
  55. package/models/components/recommendedproduct.d.ts +149 -0
  56. package/models/components/recommendedproduct.d.ts.map +1 -0
  57. package/models/components/recommendedproduct.js +230 -0
  58. package/models/components/recommendedproduct.js.map +1 -0
  59. package/models/components/updatecustomer.d.ts +26 -0
  60. package/models/components/updatecustomer.d.ts.map +1 -0
  61. package/models/components/updatecustomer.js +51 -0
  62. package/models/components/updatecustomer.js.map +1 -0
  63. package/models/operations/getcustomersid.d.ts +82 -0
  64. package/models/operations/getcustomersid.d.ts.map +1 -0
  65. package/models/operations/getcustomersid.js +106 -0
  66. package/models/operations/getcustomersid.js.map +1 -0
  67. package/models/operations/getrecommendedproducts.d.ts +82 -0
  68. package/models/operations/getrecommendedproducts.d.ts.map +1 -0
  69. package/models/operations/getrecommendedproducts.js +93 -0
  70. package/models/operations/getrecommendedproducts.js.map +1 -0
  71. package/models/operations/index.d.ts +5 -2
  72. package/models/operations/index.d.ts.map +1 -1
  73. package/models/operations/index.js +5 -2
  74. package/models/operations/index.js.map +1 -1
  75. package/models/operations/postauthanonymous.d.ts +101 -0
  76. package/models/operations/postauthanonymous.d.ts.map +1 -0
  77. package/models/operations/postauthanonymous.js +124 -0
  78. package/models/operations/postauthanonymous.js.map +1 -0
  79. package/models/operations/postcustomers.d.ts +56 -0
  80. package/models/operations/postcustomers.d.ts.map +1 -0
  81. package/models/operations/postcustomers.js +87 -0
  82. package/models/operations/postcustomers.js.map +1 -0
  83. package/models/operations/putcustomersid.d.ts +84 -0
  84. package/models/operations/putcustomersid.d.ts.map +1 -0
  85. package/models/operations/putcustomersid.js +120 -0
  86. package/models/operations/putcustomersid.js.map +1 -0
  87. package/package.json +1 -1
  88. package/sdk/auth.d.ts +8 -0
  89. package/sdk/auth.d.ts.map +1 -1
  90. package/sdk/auth.js +11 -0
  91. package/sdk/auth.js.map +1 -1
  92. package/sdk/customers.d.ts +1 -9
  93. package/sdk/customers.d.ts.map +1 -1
  94. package/sdk/customers.js +0 -11
  95. package/sdk/customers.js.map +1 -1
  96. package/sdk/customersapi.d.ts +34 -0
  97. package/sdk/customersapi.d.ts.map +1 -0
  98. package/sdk/customersapi.js +52 -0
  99. package/sdk/customersapi.js.map +1 -0
  100. package/sdk/orders.d.ts +0 -3
  101. package/sdk/orders.d.ts.map +1 -1
  102. package/sdk/orders.js +0 -5
  103. package/sdk/orders.js.map +1 -1
  104. package/sdk/sdk.d.ts +5 -2
  105. package/sdk/sdk.d.ts.map +1 -1
  106. package/sdk/sdk.js +7 -2
  107. package/sdk/sdk.js.map +1 -1
  108. package/src/funcs/authLoginAnonymously.ts +112 -0
  109. package/src/funcs/{ordersReturnsList.ts → customersAPIGetCustomersId.ts} +11 -14
  110. package/src/funcs/{customersGetRecommendedProducts.ts → customersAPIGetRecommendedProducts.ts} +28 -7
  111. package/src/funcs/customersAPIPostCustomers.ts +133 -0
  112. package/src/funcs/customersAPIPutCustomersId.ts +136 -0
  113. package/src/lib/config.ts +2 -2
  114. package/src/models/components/business.ts +64 -0
  115. package/src/models/components/cart.ts +1 -1
  116. package/src/models/components/createcustomer.ts +58 -0
  117. package/src/models/components/customerdetail.ts +109 -0
  118. package/src/models/components/index.ts +6 -3
  119. package/src/models/components/orderdetail.ts +1 -1
  120. package/src/models/components/recommendedproduct.ts +359 -0
  121. package/src/models/components/updatecustomer.ts +48 -0
  122. package/src/models/operations/getcustomersid.ts +153 -0
  123. package/src/models/operations/getrecommendedproducts.ts +140 -0
  124. package/src/models/operations/index.ts +5 -2
  125. package/src/models/operations/postauthanonymous.ts +190 -0
  126. package/src/models/operations/postcustomers.ts +110 -0
  127. package/src/models/operations/putcustomersid.ts +169 -0
  128. package/src/sdk/auth.ts +15 -0
  129. package/src/sdk/customers.ts +1 -16
  130. package/src/sdk/customersapi.ts +66 -0
  131. package/src/sdk/orders.ts +0 -6
  132. package/src/sdk/sdk.ts +9 -3
  133. package/docs/sdks/returns/README.md +0 -84
  134. package/funcs/customersGetRecommendedProducts.d.ts.map +0 -1
  135. package/funcs/customersGetRecommendedProducts.js.map +0 -1
  136. package/funcs/ordersReturnsList.d.ts.map +0 -1
  137. package/funcs/ordersReturnsList.js.map +0 -1
  138. package/models/components/customeraddress.d.ts.map +0 -1
  139. package/models/components/customeraddress.js.map +0 -1
  140. package/models/components/orderreturn.d.ts +0 -59
  141. package/models/components/orderreturn.d.ts.map +0 -1
  142. package/models/components/orderreturn.js +0 -165
  143. package/models/components/orderreturn.js.map +0 -1
  144. package/models/components/orderreturnitem.d.ts +0 -91
  145. package/models/components/orderreturnitem.d.ts.map +0 -1
  146. package/models/components/orderreturnitem.js +0 -130
  147. package/models/components/orderreturnitem.js.map +0 -1
  148. package/models/operations/getordersordernumberreturn.d.ts +0 -59
  149. package/models/operations/getordersordernumberreturn.d.ts.map +0 -1
  150. package/models/operations/getordersordernumberreturn.js +0 -99
  151. package/models/operations/getordersordernumberreturn.js.map +0 -1
  152. package/models/operations/getrecommended.d.ts +0 -56
  153. package/models/operations/getrecommended.d.ts.map +0 -1
  154. package/models/operations/getrecommended.js +0 -74
  155. package/models/operations/getrecommended.js.map +0 -1
  156. package/sdk/returns.d.ts +0 -12
  157. package/sdk/returns.d.ts.map +0 -1
  158. package/sdk/returns.js +0 -22
  159. package/sdk/returns.js.map +0 -1
  160. package/src/models/components/orderreturn.ts +0 -198
  161. package/src/models/components/orderreturnitem.ts +0 -152
  162. package/src/models/operations/getordersordernumberreturn.ts +0 -125
  163. package/src/models/operations/getrecommended.ts +0 -97
  164. package/src/sdk/returns.ts +0 -23
  165. package/src/models/components/{customeraddress.ts → customeraddressinput.ts} +46 -46
@@ -0,0 +1,109 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { remap as remap$ } from "../../lib/primitives.js";
6
+ import {
7
+ Business,
8
+ Business$inboundSchema,
9
+ Business$Outbound,
10
+ Business$outboundSchema,
11
+ } from "./business.js";
12
+ import * as z from "zod";
13
+
14
+ export type CustomerDetail = {
15
+ id?: string | undefined;
16
+ firstName?: string | undefined;
17
+ lastName?: string | undefined;
18
+ /**
19
+ * Two-letter code begin with a plus sign prefix that identifies different countries. By default it will be +91 if not provided.
20
+ *
21
+ * @remarks
22
+ *
23
+ */
24
+ countryCode?: string | undefined;
25
+ /**
26
+ * 10 digit phone number without country code.
27
+ */
28
+ phone?: string | undefined;
29
+ email?: string | undefined;
30
+ isPhoneVerified?: boolean | undefined;
31
+ isEmailVerified?: boolean | undefined;
32
+ business?: Business | undefined;
33
+ };
34
+
35
+ /** @internal */
36
+ export const CustomerDetail$inboundSchema: z.ZodType<CustomerDetail, z.ZodTypeDef, unknown> = z
37
+ .object({
38
+ id: z.string().optional(),
39
+ first_name: z.string().optional(),
40
+ last_name: z.string().optional(),
41
+ country_code: z.string().optional(),
42
+ phone: z.string().optional(),
43
+ email: z.string().optional(),
44
+ is_phone_verified: z.boolean().optional(),
45
+ is_email_verified: z.boolean().optional(),
46
+ business: Business$inboundSchema.optional(),
47
+ })
48
+ .transform((v) => {
49
+ return remap$(v, {
50
+ first_name: "firstName",
51
+ last_name: "lastName",
52
+ country_code: "countryCode",
53
+ is_phone_verified: "isPhoneVerified",
54
+ is_email_verified: "isEmailVerified",
55
+ });
56
+ });
57
+
58
+ /** @internal */
59
+ export type CustomerDetail$Outbound = {
60
+ id?: string | undefined;
61
+ first_name?: string | undefined;
62
+ last_name?: string | undefined;
63
+ country_code?: string | undefined;
64
+ phone?: string | undefined;
65
+ email?: string | undefined;
66
+ is_phone_verified?: boolean | undefined;
67
+ is_email_verified?: boolean | undefined;
68
+ business?: Business$Outbound | undefined;
69
+ };
70
+
71
+ /** @internal */
72
+ export const CustomerDetail$outboundSchema: z.ZodType<
73
+ CustomerDetail$Outbound,
74
+ z.ZodTypeDef,
75
+ CustomerDetail
76
+ > = z
77
+ .object({
78
+ id: z.string().optional(),
79
+ firstName: z.string().optional(),
80
+ lastName: z.string().optional(),
81
+ countryCode: z.string().optional(),
82
+ phone: z.string().optional(),
83
+ email: z.string().optional(),
84
+ isPhoneVerified: z.boolean().optional(),
85
+ isEmailVerified: z.boolean().optional(),
86
+ business: Business$outboundSchema.optional(),
87
+ })
88
+ .transform((v) => {
89
+ return remap$(v, {
90
+ firstName: "first_name",
91
+ lastName: "last_name",
92
+ countryCode: "country_code",
93
+ isPhoneVerified: "is_phone_verified",
94
+ isEmailVerified: "is_email_verified",
95
+ });
96
+ });
97
+
98
+ /**
99
+ * @internal
100
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
101
+ */
102
+ export namespace CustomerDetail$ {
103
+ /** @deprecated use `CustomerDetail$inboundSchema` instead. */
104
+ export const inboundSchema = CustomerDetail$inboundSchema;
105
+ /** @deprecated use `CustomerDetail$outboundSchema` instead. */
106
+ export const outboundSchema = CustomerDetail$outboundSchema;
107
+ /** @deprecated use `CustomerDetail$Outbound` instead. */
108
+ export type Outbound = CustomerDetail$Outbound;
109
+ }
@@ -4,15 +4,18 @@
4
4
 
5
5
  export * from "./analyticsevent.js";
6
6
  export * from "./banktransfer.js";
7
+ export * from "./business.js";
7
8
  export * from "./cardpayment.js";
8
9
  export * from "./cart.js";
9
10
  export * from "./cartitem.js";
10
11
  export * from "./country.js";
11
12
  export * from "./countrystate.js";
12
13
  export * from "./coupon.js";
14
+ export * from "./createcustomer.js";
13
15
  export * from "./createreview.js";
14
16
  export * from "./currency.js";
15
- export * from "./customeraddress.js";
17
+ export * from "./customeraddressinput.js";
18
+ export * from "./customerdetail.js";
16
19
  export * from "./customerloyalty.js";
17
20
  export * from "./customerreadyforreview.js";
18
21
  export * from "./customerreview.js";
@@ -28,8 +31,6 @@ export * from "./orderitem.js";
28
31
  export * from "./orderlist.js";
29
32
  export * from "./orderpayment.js";
30
33
  export * from "./orderrefund.js";
31
- export * from "./orderreturn.js";
32
- export * from "./orderreturnitem.js";
33
34
  export * from "./ordershipment.js";
34
35
  export * from "./pagination.js";
35
36
  export * from "./pincode.js";
@@ -47,11 +48,13 @@ export * from "./productshipping.js";
47
48
  export * from "./productsubscription.js";
48
49
  export * from "./productvideo.js";
49
50
  export * from "./promotion.js";
51
+ export * from "./recommendedproduct.js";
50
52
  export * from "./saleschannel.js";
51
53
  export * from "./security.js";
52
54
  export * from "./seo.js";
53
55
  export * from "./shipmentitem.js";
54
56
  export * from "./skuinfo.js";
57
+ export * from "./updatecustomer.js";
55
58
  export * from "./upipayment.js";
56
59
  export * from "./user.js";
57
60
  export * from "./userinput.js";
@@ -9,7 +9,7 @@ import {
9
9
  CustomerAddress$inboundSchema,
10
10
  CustomerAddress$Outbound,
11
11
  CustomerAddress$outboundSchema,
12
- } from "./customeraddress.js";
12
+ } from "./customeraddressinput.js";
13
13
  import {
14
14
  OrderItem,
15
15
  OrderItem$inboundSchema,
@@ -0,0 +1,359 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { remap as remap$ } from "../../lib/primitives.js";
6
+ import { ClosedEnum } from "../../types/enums.js";
7
+ import {
8
+ ProductAttribute,
9
+ ProductAttribute$inboundSchema,
10
+ ProductAttribute$Outbound,
11
+ ProductAttribute$outboundSchema,
12
+ } from "./productattribute.js";
13
+ import {
14
+ ProductBundleItem,
15
+ ProductBundleItem$inboundSchema,
16
+ ProductBundleItem$Outbound,
17
+ ProductBundleItem$outboundSchema,
18
+ } from "./productbundleitem.js";
19
+ import {
20
+ ProductImage,
21
+ ProductImage$inboundSchema,
22
+ ProductImage$Outbound,
23
+ ProductImage$outboundSchema,
24
+ } from "./productimage.js";
25
+ import {
26
+ ProductPricing,
27
+ ProductPricing$inboundSchema,
28
+ ProductPricing$Outbound,
29
+ ProductPricing$outboundSchema,
30
+ } from "./productpricing.js";
31
+ import {
32
+ ProductPromotion,
33
+ ProductPromotion$inboundSchema,
34
+ ProductPromotion$Outbound,
35
+ ProductPromotion$outboundSchema,
36
+ } from "./productpromotion.js";
37
+ import {
38
+ ProductShipping,
39
+ ProductShipping$inboundSchema,
40
+ ProductShipping$Outbound,
41
+ ProductShipping$outboundSchema,
42
+ } from "./productshipping.js";
43
+ import {
44
+ ProductSubscription,
45
+ ProductSubscription$inboundSchema,
46
+ ProductSubscription$Outbound,
47
+ ProductSubscription$outboundSchema,
48
+ } from "./productsubscription.js";
49
+ import {
50
+ Variant,
51
+ Variant$inboundSchema,
52
+ Variant$Outbound,
53
+ Variant$outboundSchema,
54
+ } from "./variant.js";
55
+ import * as z from "zod";
56
+
57
+ export const RecommendedProductProductType = {
58
+ Physical: "physical",
59
+ Digital: "digital",
60
+ Bundle: "bundle",
61
+ } as const;
62
+ export type RecommendedProductProductType = ClosedEnum<typeof RecommendedProductProductType>;
63
+
64
+ export type RecommendedProductVariantOptions = {
65
+ optionName?: string | undefined;
66
+ optionValue?: Array<string> | undefined;
67
+ };
68
+
69
+ export type RecommendedProduct = {
70
+ /**
71
+ * The ULID of the product
72
+ */
73
+ id?: string | undefined;
74
+ name?: string | undefined;
75
+ description?: string | undefined;
76
+ shortDescription?: string | undefined;
77
+ productType?: RecommendedProductProductType | undefined;
78
+ active?: boolean | undefined;
79
+ sku?: string | undefined;
80
+ stockAvailable?: boolean | undefined;
81
+ isFeatured?: boolean | undefined;
82
+ onOffer?: boolean | undefined;
83
+ onSubscription?: boolean | undefined;
84
+ onPromotion?: boolean | undefined;
85
+ hasVariant?: boolean | undefined;
86
+ /**
87
+ * this will be used if has_variant is true, to auto set default values.
88
+ */
89
+ variantOptions?: Array<RecommendedProductVariantOptions> | undefined;
90
+ attributes?: Array<ProductAttribute> | undefined;
91
+ images?: Array<ProductImage> | undefined;
92
+ pricing?: ProductPricing | undefined;
93
+ shipping?: ProductShipping | undefined;
94
+ tags?: Array<string> | undefined;
95
+ categoryIds?: Array<string> | undefined;
96
+ reviewsRatingSum?: number | undefined;
97
+ reviewsCount?: number | undefined;
98
+ hsnCode?: string | undefined;
99
+ createdAt?: Date | undefined;
100
+ modifiedAt?: Date | undefined;
101
+ promotion?: Array<ProductPromotion> | undefined;
102
+ subscription?: Array<ProductSubscription> | undefined;
103
+ bundleItems?: Array<ProductBundleItem> | undefined;
104
+ variants?: Array<Variant> | undefined;
105
+ };
106
+
107
+ /** @internal */
108
+ export const RecommendedProductProductType$inboundSchema: z.ZodNativeEnum<
109
+ typeof RecommendedProductProductType
110
+ > = z.nativeEnum(RecommendedProductProductType);
111
+
112
+ /** @internal */
113
+ export const RecommendedProductProductType$outboundSchema: z.ZodNativeEnum<
114
+ typeof RecommendedProductProductType
115
+ > = RecommendedProductProductType$inboundSchema;
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 RecommendedProductProductType$ {
122
+ /** @deprecated use `RecommendedProductProductType$inboundSchema` instead. */
123
+ export const inboundSchema = RecommendedProductProductType$inboundSchema;
124
+ /** @deprecated use `RecommendedProductProductType$outboundSchema` instead. */
125
+ export const outboundSchema = RecommendedProductProductType$outboundSchema;
126
+ }
127
+
128
+ /** @internal */
129
+ export const RecommendedProductVariantOptions$inboundSchema: z.ZodType<
130
+ RecommendedProductVariantOptions,
131
+ z.ZodTypeDef,
132
+ unknown
133
+ > = z
134
+ .object({
135
+ option_name: z.string().optional(),
136
+ option_value: z.array(z.string()).optional(),
137
+ })
138
+ .transform((v) => {
139
+ return remap$(v, {
140
+ option_name: "optionName",
141
+ option_value: "optionValue",
142
+ });
143
+ });
144
+
145
+ /** @internal */
146
+ export type RecommendedProductVariantOptions$Outbound = {
147
+ option_name?: string | undefined;
148
+ option_value?: Array<string> | undefined;
149
+ };
150
+
151
+ /** @internal */
152
+ export const RecommendedProductVariantOptions$outboundSchema: z.ZodType<
153
+ RecommendedProductVariantOptions$Outbound,
154
+ z.ZodTypeDef,
155
+ RecommendedProductVariantOptions
156
+ > = z
157
+ .object({
158
+ optionName: z.string().optional(),
159
+ optionValue: z.array(z.string()).optional(),
160
+ })
161
+ .transform((v) => {
162
+ return remap$(v, {
163
+ optionName: "option_name",
164
+ optionValue: "option_value",
165
+ });
166
+ });
167
+
168
+ /**
169
+ * @internal
170
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
171
+ */
172
+ export namespace RecommendedProductVariantOptions$ {
173
+ /** @deprecated use `RecommendedProductVariantOptions$inboundSchema` instead. */
174
+ export const inboundSchema = RecommendedProductVariantOptions$inboundSchema;
175
+ /** @deprecated use `RecommendedProductVariantOptions$outboundSchema` instead. */
176
+ export const outboundSchema = RecommendedProductVariantOptions$outboundSchema;
177
+ /** @deprecated use `RecommendedProductVariantOptions$Outbound` instead. */
178
+ export type Outbound = RecommendedProductVariantOptions$Outbound;
179
+ }
180
+
181
+ /** @internal */
182
+ export const RecommendedProduct$inboundSchema: z.ZodType<
183
+ RecommendedProduct,
184
+ z.ZodTypeDef,
185
+ unknown
186
+ > = z
187
+ .object({
188
+ id: z.string().optional(),
189
+ name: z.string().optional(),
190
+ description: z.string().optional(),
191
+ short_description: z.string().optional(),
192
+ product_type: RecommendedProductProductType$inboundSchema.optional(),
193
+ active: z.boolean().default(true),
194
+ sku: z.string().optional(),
195
+ stock_available: z.boolean().default(true),
196
+ is_featured: z.boolean().default(false),
197
+ on_offer: z.boolean().default(false),
198
+ on_subscription: z.boolean().default(false),
199
+ on_promotion: z.boolean().default(false),
200
+ has_variant: z.boolean().default(false),
201
+ variant_options: z
202
+ .array(z.lazy(() => RecommendedProductVariantOptions$inboundSchema))
203
+ .optional(),
204
+ attributes: z.array(ProductAttribute$inboundSchema).optional(),
205
+ images: z.array(ProductImage$inboundSchema).optional(),
206
+ pricing: ProductPricing$inboundSchema.optional(),
207
+ shipping: ProductShipping$inboundSchema.optional(),
208
+ tags: z.array(z.string()).optional(),
209
+ category_ids: z.array(z.string()).optional(),
210
+ reviews_rating_sum: z.number().optional(),
211
+ reviews_count: z.number().int().optional(),
212
+ hsn_code: z.string().optional(),
213
+ created_at: z
214
+ .string()
215
+ .datetime({ offset: true })
216
+ .transform((v) => new Date(v))
217
+ .optional(),
218
+ modified_at: z
219
+ .string()
220
+ .datetime({ offset: true })
221
+ .transform((v) => new Date(v))
222
+ .optional(),
223
+ promotion: z.array(ProductPromotion$inboundSchema).optional(),
224
+ subscription: z.array(ProductSubscription$inboundSchema).optional(),
225
+ bundle_items: z.array(ProductBundleItem$inboundSchema).optional(),
226
+ variants: z.array(Variant$inboundSchema).optional(),
227
+ })
228
+ .transform((v) => {
229
+ return remap$(v, {
230
+ short_description: "shortDescription",
231
+ product_type: "productType",
232
+ stock_available: "stockAvailable",
233
+ is_featured: "isFeatured",
234
+ on_offer: "onOffer",
235
+ on_subscription: "onSubscription",
236
+ on_promotion: "onPromotion",
237
+ has_variant: "hasVariant",
238
+ variant_options: "variantOptions",
239
+ category_ids: "categoryIds",
240
+ reviews_rating_sum: "reviewsRatingSum",
241
+ reviews_count: "reviewsCount",
242
+ hsn_code: "hsnCode",
243
+ created_at: "createdAt",
244
+ modified_at: "modifiedAt",
245
+ bundle_items: "bundleItems",
246
+ });
247
+ });
248
+
249
+ /** @internal */
250
+ export type RecommendedProduct$Outbound = {
251
+ id?: string | undefined;
252
+ name?: string | undefined;
253
+ description?: string | undefined;
254
+ short_description?: string | undefined;
255
+ product_type?: string | undefined;
256
+ active: boolean;
257
+ sku?: string | undefined;
258
+ stock_available: boolean;
259
+ is_featured: boolean;
260
+ on_offer: boolean;
261
+ on_subscription: boolean;
262
+ on_promotion: boolean;
263
+ has_variant: boolean;
264
+ variant_options?: Array<RecommendedProductVariantOptions$Outbound> | undefined;
265
+ attributes?: Array<ProductAttribute$Outbound> | undefined;
266
+ images?: Array<ProductImage$Outbound> | undefined;
267
+ pricing?: ProductPricing$Outbound | undefined;
268
+ shipping?: ProductShipping$Outbound | undefined;
269
+ tags?: Array<string> | undefined;
270
+ category_ids?: Array<string> | undefined;
271
+ reviews_rating_sum?: number | undefined;
272
+ reviews_count?: number | undefined;
273
+ hsn_code?: string | undefined;
274
+ created_at?: string | undefined;
275
+ modified_at?: string | undefined;
276
+ promotion?: Array<ProductPromotion$Outbound> | undefined;
277
+ subscription?: Array<ProductSubscription$Outbound> | undefined;
278
+ bundle_items?: Array<ProductBundleItem$Outbound> | undefined;
279
+ variants?: Array<Variant$Outbound> | undefined;
280
+ };
281
+
282
+ /** @internal */
283
+ export const RecommendedProduct$outboundSchema: z.ZodType<
284
+ RecommendedProduct$Outbound,
285
+ z.ZodTypeDef,
286
+ RecommendedProduct
287
+ > = z
288
+ .object({
289
+ id: z.string().optional(),
290
+ name: z.string().optional(),
291
+ description: z.string().optional(),
292
+ shortDescription: z.string().optional(),
293
+ productType: RecommendedProductProductType$outboundSchema.optional(),
294
+ active: z.boolean().default(true),
295
+ sku: z.string().optional(),
296
+ stockAvailable: z.boolean().default(true),
297
+ isFeatured: z.boolean().default(false),
298
+ onOffer: z.boolean().default(false),
299
+ onSubscription: z.boolean().default(false),
300
+ onPromotion: z.boolean().default(false),
301
+ hasVariant: z.boolean().default(false),
302
+ variantOptions: z
303
+ .array(z.lazy(() => RecommendedProductVariantOptions$outboundSchema))
304
+ .optional(),
305
+ attributes: z.array(ProductAttribute$outboundSchema).optional(),
306
+ images: z.array(ProductImage$outboundSchema).optional(),
307
+ pricing: ProductPricing$outboundSchema.optional(),
308
+ shipping: ProductShipping$outboundSchema.optional(),
309
+ tags: z.array(z.string()).optional(),
310
+ categoryIds: z.array(z.string()).optional(),
311
+ reviewsRatingSum: z.number().optional(),
312
+ reviewsCount: z.number().int().optional(),
313
+ hsnCode: z.string().optional(),
314
+ createdAt: z
315
+ .date()
316
+ .transform((v) => v.toISOString())
317
+ .optional(),
318
+ modifiedAt: z
319
+ .date()
320
+ .transform((v) => v.toISOString())
321
+ .optional(),
322
+ promotion: z.array(ProductPromotion$outboundSchema).optional(),
323
+ subscription: z.array(ProductSubscription$outboundSchema).optional(),
324
+ bundleItems: z.array(ProductBundleItem$outboundSchema).optional(),
325
+ variants: z.array(Variant$outboundSchema).optional(),
326
+ })
327
+ .transform((v) => {
328
+ return remap$(v, {
329
+ shortDescription: "short_description",
330
+ productType: "product_type",
331
+ stockAvailable: "stock_available",
332
+ isFeatured: "is_featured",
333
+ onOffer: "on_offer",
334
+ onSubscription: "on_subscription",
335
+ onPromotion: "on_promotion",
336
+ hasVariant: "has_variant",
337
+ variantOptions: "variant_options",
338
+ categoryIds: "category_ids",
339
+ reviewsRatingSum: "reviews_rating_sum",
340
+ reviewsCount: "reviews_count",
341
+ hsnCode: "hsn_code",
342
+ createdAt: "created_at",
343
+ modifiedAt: "modified_at",
344
+ bundleItems: "bundle_items",
345
+ });
346
+ });
347
+
348
+ /**
349
+ * @internal
350
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
351
+ */
352
+ export namespace RecommendedProduct$ {
353
+ /** @deprecated use `RecommendedProduct$inboundSchema` instead. */
354
+ export const inboundSchema = RecommendedProduct$inboundSchema;
355
+ /** @deprecated use `RecommendedProduct$outboundSchema` instead. */
356
+ export const outboundSchema = RecommendedProduct$outboundSchema;
357
+ /** @deprecated use `RecommendedProduct$Outbound` instead. */
358
+ export type Outbound = RecommendedProduct$Outbound;
359
+ }
@@ -0,0 +1,48 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import {
6
+ Business,
7
+ Business$inboundSchema,
8
+ Business$Outbound,
9
+ Business$outboundSchema,
10
+ } from "./business.js";
11
+ import * as z from "zod";
12
+
13
+ export type UpdateCustomer = {
14
+ business?: Business | undefined;
15
+ };
16
+
17
+ /** @internal */
18
+ export const UpdateCustomer$inboundSchema: z.ZodType<UpdateCustomer, z.ZodTypeDef, unknown> =
19
+ z.object({
20
+ business: Business$inboundSchema.optional(),
21
+ });
22
+
23
+ /** @internal */
24
+ export type UpdateCustomer$Outbound = {
25
+ business?: Business$Outbound | undefined;
26
+ };
27
+
28
+ /** @internal */
29
+ export const UpdateCustomer$outboundSchema: z.ZodType<
30
+ UpdateCustomer$Outbound,
31
+ z.ZodTypeDef,
32
+ UpdateCustomer
33
+ > = z.object({
34
+ business: Business$outboundSchema.optional(),
35
+ });
36
+
37
+ /**
38
+ * @internal
39
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
40
+ */
41
+ export namespace UpdateCustomer$ {
42
+ /** @deprecated use `UpdateCustomer$inboundSchema` instead. */
43
+ export const inboundSchema = UpdateCustomer$inboundSchema;
44
+ /** @deprecated use `UpdateCustomer$outboundSchema` instead. */
45
+ export const outboundSchema = UpdateCustomer$outboundSchema;
46
+ /** @deprecated use `UpdateCustomer$Outbound` instead. */
47
+ export type Outbound = UpdateCustomer$Outbound;
48
+ }