ce-storefront 0.5.2 → 0.5.4
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/docs/sdks/auth/README.md +85 -36
- package/esm/funcs/authGenerateOtp.d.ts +1 -1
- package/esm/funcs/authGenerateOtp.d.ts.map +1 -1
- package/esm/funcs/authGenerateOtp.js +27 -6
- package/esm/funcs/authGenerateOtp.js.map +1 -1
- package/esm/funcs/authLoginWithEmail.d.ts +1 -1
- package/esm/funcs/authLoginWithEmail.d.ts.map +1 -1
- package/esm/funcs/authLoginWithEmail.js +27 -6
- package/esm/funcs/authLoginWithEmail.js.map +1 -1
- package/esm/funcs/authLoginWithPhone.d.ts +1 -1
- package/esm/funcs/authLoginWithPhone.d.ts.map +1 -1
- package/esm/funcs/authLoginWithPhone.js +27 -6
- package/esm/funcs/authLoginWithPhone.js.map +1 -1
- package/esm/funcs/authLoginWithWhatsapp.d.ts +1 -1
- package/esm/funcs/authLoginWithWhatsapp.d.ts.map +1 -1
- package/esm/funcs/authLoginWithWhatsapp.js +27 -6
- package/esm/funcs/authLoginWithWhatsapp.js.map +1 -1
- package/esm/funcs/authVerifyOtp.d.ts +1 -1
- package/esm/funcs/authVerifyOtp.d.ts.map +1 -1
- package/esm/funcs/authVerifyOtp.js +27 -6
- package/esm/funcs/authVerifyOtp.js.map +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/models/components/notificationchannelpreferences.d.ts +3 -3
- package/esm/models/components/notificationchannelpreferences.d.ts.map +1 -1
- package/esm/models/components/notificationchannelpreferences.js +6 -6
- package/esm/models/components/notificationchannelpreferences.js.map +1 -1
- package/esm/models/operations/deleteaddress.d.ts +1 -1
- package/esm/models/operations/deleteaddress.d.ts.map +1 -1
- package/esm/models/operations/deleteaddress.js +2 -2
- package/esm/models/operations/deleteaddress.js.map +1 -1
- package/esm/models/operations/deletecart.d.ts +1 -1
- package/esm/models/operations/deletecart.d.ts.map +1 -1
- package/esm/models/operations/deletecart.js +2 -2
- package/esm/models/operations/deletecart.js.map +1 -1
- package/esm/models/operations/deleteusercart.d.ts +1 -1
- package/esm/models/operations/deleteusercart.d.ts.map +1 -1
- package/esm/models/operations/deleteusercart.js +2 -2
- package/esm/models/operations/deleteusercart.js.map +1 -1
- package/esm/models/operations/generateotp.d.ts +106 -0
- package/esm/models/operations/generateotp.d.ts.map +1 -1
- package/esm/models/operations/generateotp.js +144 -0
- package/esm/models/operations/generateotp.js.map +1 -1
- package/esm/models/operations/getcart.d.ts +1 -1
- package/esm/models/operations/getcart.d.ts.map +1 -1
- package/esm/models/operations/getcart.js +2 -2
- package/esm/models/operations/getcart.js.map +1 -1
- package/esm/models/operations/getproductdetail.d.ts +1 -1
- package/esm/models/operations/getproductdetail.d.ts.map +1 -1
- package/esm/models/operations/getproductdetail.js +2 -2
- package/esm/models/operations/getproductdetail.js.map +1 -1
- package/esm/models/operations/getusercart.d.ts +1 -1
- package/esm/models/operations/getusercart.d.ts.map +1 -1
- package/esm/models/operations/getusercart.js +2 -2
- package/esm/models/operations/getusercart.js.map +1 -1
- package/esm/models/operations/getvariantdetail.d.ts +1 -1
- package/esm/models/operations/getvariantdetail.d.ts.map +1 -1
- package/esm/models/operations/getvariantdetail.js +2 -2
- package/esm/models/operations/getvariantdetail.js.map +1 -1
- package/esm/models/operations/listcategories.d.ts +1 -1
- package/esm/models/operations/listcategories.d.ts.map +1 -1
- package/esm/models/operations/listcategories.js +2 -2
- package/esm/models/operations/listcategories.js.map +1 -1
- package/esm/models/operations/listproducts.d.ts +1 -1
- package/esm/models/operations/listproducts.d.ts.map +1 -1
- package/esm/models/operations/listproducts.js +2 -2
- package/esm/models/operations/listproducts.js.map +1 -1
- package/esm/models/operations/listproductvariants.d.ts +1 -1
- package/esm/models/operations/listproductvariants.d.ts.map +1 -1
- package/esm/models/operations/listproductvariants.js +2 -2
- package/esm/models/operations/listproductvariants.js.map +1 -1
- package/esm/models/operations/listskus.d.ts +1 -1
- package/esm/models/operations/listskus.d.ts.map +1 -1
- package/esm/models/operations/listskus.js +2 -2
- package/esm/models/operations/listskus.js.map +1 -1
- package/esm/models/operations/loginwithemail.d.ts +106 -0
- package/esm/models/operations/loginwithemail.d.ts.map +1 -1
- package/esm/models/operations/loginwithemail.js +147 -0
- package/esm/models/operations/loginwithemail.js.map +1 -1
- package/esm/models/operations/loginwithphone.d.ts +106 -0
- package/esm/models/operations/loginwithphone.d.ts.map +1 -1
- package/esm/models/operations/loginwithphone.js +147 -0
- package/esm/models/operations/loginwithphone.js.map +1 -1
- package/esm/models/operations/loginwithwhatsapp.d.ts +106 -0
- package/esm/models/operations/loginwithwhatsapp.d.ts.map +1 -1
- package/esm/models/operations/loginwithwhatsapp.js +150 -0
- package/esm/models/operations/loginwithwhatsapp.js.map +1 -1
- package/esm/models/operations/updatecart.d.ts +2 -2
- package/esm/models/operations/updatecart.d.ts.map +1 -1
- package/esm/models/operations/updatecart.js +2 -2
- package/esm/models/operations/updatecart.js.map +1 -1
- package/esm/models/operations/verifyotp.d.ts +106 -0
- package/esm/models/operations/verifyotp.d.ts.map +1 -1
- package/esm/models/operations/verifyotp.js +144 -0
- package/esm/models/operations/verifyotp.js.map +1 -1
- package/esm/sdk/auth.d.ts +5 -5
- package/esm/sdk/auth.d.ts.map +1 -1
- package/esm/sdk/auth.js +10 -10
- package/esm/sdk/auth.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/authGenerateOtp.ts +31 -5
- package/src/funcs/authLoginWithEmail.ts +31 -5
- package/src/funcs/authLoginWithPhone.ts +31 -5
- package/src/funcs/authLoginWithWhatsapp.ts +31 -5
- package/src/funcs/authVerifyOtp.ts +31 -5
- package/src/lib/config.ts +3 -3
- package/src/models/components/notificationchannelpreferences.ts +9 -9
- package/src/models/operations/deleteaddress.ts +3 -3
- package/src/models/operations/deletecart.ts +3 -3
- package/src/models/operations/deleteusercart.ts +3 -3
- package/src/models/operations/generateotp.ts +282 -0
- package/src/models/operations/getcart.ts +3 -3
- package/src/models/operations/getproductdetail.ts +3 -3
- package/src/models/operations/getusercart.ts +3 -3
- package/src/models/operations/getvariantdetail.ts +3 -3
- package/src/models/operations/listcategories.ts +3 -3
- package/src/models/operations/listproducts.ts +3 -3
- package/src/models/operations/listproductvariants.ts +3 -3
- package/src/models/operations/listskus.ts +3 -3
- package/src/models/operations/loginwithemail.ts +291 -0
- package/src/models/operations/loginwithphone.ts +291 -0
- package/src/models/operations/loginwithwhatsapp.ts +294 -0
- package/src/models/operations/updatecart.ts +4 -4
- package/src/models/operations/verifyotp.ts +282 -0
- package/src/sdk/auth.ts +10 -0
|
@@ -39,7 +39,7 @@ export type GetUserCartContent = {
|
|
|
39
39
|
*/
|
|
40
40
|
export type GetUserCartResponseBody = {
|
|
41
41
|
message: string;
|
|
42
|
-
success
|
|
42
|
+
success: boolean;
|
|
43
43
|
content: GetUserCartContent;
|
|
44
44
|
};
|
|
45
45
|
|
|
@@ -166,7 +166,7 @@ export const GetUserCartResponseBody$inboundSchema: z.ZodType<
|
|
|
166
166
|
unknown
|
|
167
167
|
> = z.object({
|
|
168
168
|
message: z.string(),
|
|
169
|
-
success: z.boolean()
|
|
169
|
+
success: z.boolean(),
|
|
170
170
|
content: z.lazy(() => GetUserCartContent$inboundSchema),
|
|
171
171
|
});
|
|
172
172
|
|
|
@@ -184,7 +184,7 @@ export const GetUserCartResponseBody$outboundSchema: z.ZodType<
|
|
|
184
184
|
GetUserCartResponseBody
|
|
185
185
|
> = z.object({
|
|
186
186
|
message: z.string(),
|
|
187
|
-
success: z.boolean()
|
|
187
|
+
success: z.boolean(),
|
|
188
188
|
content: z.lazy(() => GetUserCartContent$outboundSchema),
|
|
189
189
|
});
|
|
190
190
|
|
|
@@ -44,7 +44,7 @@ export type GetVariantDetailContent = {
|
|
|
44
44
|
*/
|
|
45
45
|
export type GetVariantDetailResponseBody = {
|
|
46
46
|
message: string;
|
|
47
|
-
success
|
|
47
|
+
success: boolean;
|
|
48
48
|
content: GetVariantDetailContent;
|
|
49
49
|
};
|
|
50
50
|
|
|
@@ -181,7 +181,7 @@ export const GetVariantDetailResponseBody$inboundSchema: z.ZodType<
|
|
|
181
181
|
unknown
|
|
182
182
|
> = z.object({
|
|
183
183
|
message: z.string(),
|
|
184
|
-
success: z.boolean()
|
|
184
|
+
success: z.boolean(),
|
|
185
185
|
content: z.lazy(() => GetVariantDetailContent$inboundSchema),
|
|
186
186
|
});
|
|
187
187
|
|
|
@@ -199,7 +199,7 @@ export const GetVariantDetailResponseBody$outboundSchema: z.ZodType<
|
|
|
199
199
|
GetVariantDetailResponseBody
|
|
200
200
|
> = z.object({
|
|
201
201
|
message: z.string(),
|
|
202
|
-
success: z.boolean()
|
|
202
|
+
success: z.boolean(),
|
|
203
203
|
content: z.lazy(() => GetVariantDetailContent$outboundSchema),
|
|
204
204
|
});
|
|
205
205
|
|
|
@@ -52,7 +52,7 @@ export type ListCategoriesContent = {
|
|
|
52
52
|
*/
|
|
53
53
|
export type ListCategoriesResponseBody = {
|
|
54
54
|
message: string;
|
|
55
|
-
success
|
|
55
|
+
success: boolean;
|
|
56
56
|
content: ListCategoriesContent;
|
|
57
57
|
};
|
|
58
58
|
|
|
@@ -195,7 +195,7 @@ export const ListCategoriesResponseBody$inboundSchema: z.ZodType<
|
|
|
195
195
|
unknown
|
|
196
196
|
> = z.object({
|
|
197
197
|
message: z.string(),
|
|
198
|
-
success: z.boolean()
|
|
198
|
+
success: z.boolean(),
|
|
199
199
|
content: z.lazy(() => ListCategoriesContent$inboundSchema),
|
|
200
200
|
});
|
|
201
201
|
|
|
@@ -213,7 +213,7 @@ export const ListCategoriesResponseBody$outboundSchema: z.ZodType<
|
|
|
213
213
|
ListCategoriesResponseBody
|
|
214
214
|
> = z.object({
|
|
215
215
|
message: z.string(),
|
|
216
|
-
success: z.boolean()
|
|
216
|
+
success: z.boolean(),
|
|
217
217
|
content: z.lazy(() => ListCategoriesContent$outboundSchema),
|
|
218
218
|
});
|
|
219
219
|
|
|
@@ -56,7 +56,7 @@ export type Content = {
|
|
|
56
56
|
*/
|
|
57
57
|
export type ListProductsResponseBody = {
|
|
58
58
|
message: string;
|
|
59
|
-
success
|
|
59
|
+
success: boolean;
|
|
60
60
|
content: Content;
|
|
61
61
|
};
|
|
62
62
|
|
|
@@ -195,7 +195,7 @@ export const ListProductsResponseBody$inboundSchema: z.ZodType<
|
|
|
195
195
|
unknown
|
|
196
196
|
> = z.object({
|
|
197
197
|
message: z.string(),
|
|
198
|
-
success: z.boolean()
|
|
198
|
+
success: z.boolean(),
|
|
199
199
|
content: z.lazy(() => Content$inboundSchema),
|
|
200
200
|
});
|
|
201
201
|
|
|
@@ -213,7 +213,7 @@ export const ListProductsResponseBody$outboundSchema: z.ZodType<
|
|
|
213
213
|
ListProductsResponseBody
|
|
214
214
|
> = z.object({
|
|
215
215
|
message: z.string(),
|
|
216
|
-
success: z.boolean()
|
|
216
|
+
success: z.boolean(),
|
|
217
217
|
content: z.lazy(() => Content$outboundSchema),
|
|
218
218
|
});
|
|
219
219
|
|
|
@@ -40,7 +40,7 @@ export type ListProductVariantsContent = {
|
|
|
40
40
|
*/
|
|
41
41
|
export type ListProductVariantsResponseBody = {
|
|
42
42
|
message: string;
|
|
43
|
-
success
|
|
43
|
+
success: boolean;
|
|
44
44
|
content: ListProductVariantsContent;
|
|
45
45
|
};
|
|
46
46
|
|
|
@@ -172,7 +172,7 @@ export const ListProductVariantsResponseBody$inboundSchema: z.ZodType<
|
|
|
172
172
|
unknown
|
|
173
173
|
> = z.object({
|
|
174
174
|
message: z.string(),
|
|
175
|
-
success: z.boolean()
|
|
175
|
+
success: z.boolean(),
|
|
176
176
|
content: z.lazy(() => ListProductVariantsContent$inboundSchema),
|
|
177
177
|
});
|
|
178
178
|
|
|
@@ -190,7 +190,7 @@ export const ListProductVariantsResponseBody$outboundSchema: z.ZodType<
|
|
|
190
190
|
ListProductVariantsResponseBody
|
|
191
191
|
> = z.object({
|
|
192
192
|
message: z.string(),
|
|
193
|
-
success: z.boolean()
|
|
193
|
+
success: z.boolean(),
|
|
194
194
|
content: z.lazy(() => ListProductVariantsContent$outboundSchema),
|
|
195
195
|
});
|
|
196
196
|
|
|
@@ -60,7 +60,7 @@ export type ListSkusContent = {
|
|
|
60
60
|
*/
|
|
61
61
|
export type ListSkusResponseBody = {
|
|
62
62
|
message: string;
|
|
63
|
-
success
|
|
63
|
+
success: boolean;
|
|
64
64
|
content: ListSkusContent;
|
|
65
65
|
};
|
|
66
66
|
|
|
@@ -205,7 +205,7 @@ export const ListSkusResponseBody$inboundSchema: z.ZodType<
|
|
|
205
205
|
unknown
|
|
206
206
|
> = z.object({
|
|
207
207
|
message: z.string(),
|
|
208
|
-
success: z.boolean()
|
|
208
|
+
success: z.boolean(),
|
|
209
209
|
content: z.lazy(() => ListSkusContent$inboundSchema),
|
|
210
210
|
});
|
|
211
211
|
|
|
@@ -223,7 +223,7 @@ export const ListSkusResponseBody$outboundSchema: z.ZodType<
|
|
|
223
223
|
ListSkusResponseBody
|
|
224
224
|
> = z.object({
|
|
225
225
|
message: z.string(),
|
|
226
|
-
success: z.boolean()
|
|
226
|
+
success: z.boolean(),
|
|
227
227
|
content: z.lazy(() => ListSkusContent$outboundSchema),
|
|
228
228
|
});
|
|
229
229
|
|
|
@@ -19,6 +19,25 @@ export const LoginWithEmailServerList = [
|
|
|
19
19
|
"https://prod.api.commercengine.io/api/v1/{store_id}/storefront",
|
|
20
20
|
] as const;
|
|
21
21
|
|
|
22
|
+
export type LoginWithEmailSecurityOption1 = {
|
|
23
|
+
xApiKey: string;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type LoginWithEmailSecurityOption2 = {
|
|
27
|
+
authorization: string;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export type LoginWithEmailSecurityOption3 = {
|
|
31
|
+
xApiKey: string;
|
|
32
|
+
authorization: string;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export type LoginWithEmailSecurity = {
|
|
36
|
+
option1?: LoginWithEmailSecurityOption1 | undefined;
|
|
37
|
+
option2?: LoginWithEmailSecurityOption2 | undefined;
|
|
38
|
+
option3?: LoginWithEmailSecurityOption3 | undefined;
|
|
39
|
+
};
|
|
40
|
+
|
|
22
41
|
export type LoginWithEmailRequestBody = {
|
|
23
42
|
/**
|
|
24
43
|
* User's email address.
|
|
@@ -66,6 +85,278 @@ export type LoginWithEmailResponseBody = {
|
|
|
66
85
|
content?: LoginWithEmailContent | undefined;
|
|
67
86
|
};
|
|
68
87
|
|
|
88
|
+
/** @internal */
|
|
89
|
+
export const LoginWithEmailSecurityOption1$inboundSchema: z.ZodType<
|
|
90
|
+
LoginWithEmailSecurityOption1,
|
|
91
|
+
z.ZodTypeDef,
|
|
92
|
+
unknown
|
|
93
|
+
> = z.object({
|
|
94
|
+
"X-Api-Key": z.string(),
|
|
95
|
+
}).transform((v) => {
|
|
96
|
+
return remap$(v, {
|
|
97
|
+
"X-Api-Key": "xApiKey",
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
/** @internal */
|
|
102
|
+
export type LoginWithEmailSecurityOption1$Outbound = {
|
|
103
|
+
"X-Api-Key": string;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
/** @internal */
|
|
107
|
+
export const LoginWithEmailSecurityOption1$outboundSchema: z.ZodType<
|
|
108
|
+
LoginWithEmailSecurityOption1$Outbound,
|
|
109
|
+
z.ZodTypeDef,
|
|
110
|
+
LoginWithEmailSecurityOption1
|
|
111
|
+
> = z.object({
|
|
112
|
+
xApiKey: z.string(),
|
|
113
|
+
}).transform((v) => {
|
|
114
|
+
return remap$(v, {
|
|
115
|
+
xApiKey: "X-Api-Key",
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @internal
|
|
121
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
122
|
+
*/
|
|
123
|
+
export namespace LoginWithEmailSecurityOption1$ {
|
|
124
|
+
/** @deprecated use `LoginWithEmailSecurityOption1$inboundSchema` instead. */
|
|
125
|
+
export const inboundSchema = LoginWithEmailSecurityOption1$inboundSchema;
|
|
126
|
+
/** @deprecated use `LoginWithEmailSecurityOption1$outboundSchema` instead. */
|
|
127
|
+
export const outboundSchema = LoginWithEmailSecurityOption1$outboundSchema;
|
|
128
|
+
/** @deprecated use `LoginWithEmailSecurityOption1$Outbound` instead. */
|
|
129
|
+
export type Outbound = LoginWithEmailSecurityOption1$Outbound;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function loginWithEmailSecurityOption1ToJSON(
|
|
133
|
+
loginWithEmailSecurityOption1: LoginWithEmailSecurityOption1,
|
|
134
|
+
): string {
|
|
135
|
+
return JSON.stringify(
|
|
136
|
+
LoginWithEmailSecurityOption1$outboundSchema.parse(
|
|
137
|
+
loginWithEmailSecurityOption1,
|
|
138
|
+
),
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export function loginWithEmailSecurityOption1FromJSON(
|
|
143
|
+
jsonString: string,
|
|
144
|
+
): SafeParseResult<LoginWithEmailSecurityOption1, SDKValidationError> {
|
|
145
|
+
return safeParse(
|
|
146
|
+
jsonString,
|
|
147
|
+
(x) => LoginWithEmailSecurityOption1$inboundSchema.parse(JSON.parse(x)),
|
|
148
|
+
`Failed to parse 'LoginWithEmailSecurityOption1' from JSON`,
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/** @internal */
|
|
153
|
+
export const LoginWithEmailSecurityOption2$inboundSchema: z.ZodType<
|
|
154
|
+
LoginWithEmailSecurityOption2,
|
|
155
|
+
z.ZodTypeDef,
|
|
156
|
+
unknown
|
|
157
|
+
> = z.object({
|
|
158
|
+
Authorization: z.string(),
|
|
159
|
+
}).transform((v) => {
|
|
160
|
+
return remap$(v, {
|
|
161
|
+
"Authorization": "authorization",
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
/** @internal */
|
|
166
|
+
export type LoginWithEmailSecurityOption2$Outbound = {
|
|
167
|
+
Authorization: string;
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
/** @internal */
|
|
171
|
+
export const LoginWithEmailSecurityOption2$outboundSchema: z.ZodType<
|
|
172
|
+
LoginWithEmailSecurityOption2$Outbound,
|
|
173
|
+
z.ZodTypeDef,
|
|
174
|
+
LoginWithEmailSecurityOption2
|
|
175
|
+
> = z.object({
|
|
176
|
+
authorization: z.string(),
|
|
177
|
+
}).transform((v) => {
|
|
178
|
+
return remap$(v, {
|
|
179
|
+
authorization: "Authorization",
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* @internal
|
|
185
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
186
|
+
*/
|
|
187
|
+
export namespace LoginWithEmailSecurityOption2$ {
|
|
188
|
+
/** @deprecated use `LoginWithEmailSecurityOption2$inboundSchema` instead. */
|
|
189
|
+
export const inboundSchema = LoginWithEmailSecurityOption2$inboundSchema;
|
|
190
|
+
/** @deprecated use `LoginWithEmailSecurityOption2$outboundSchema` instead. */
|
|
191
|
+
export const outboundSchema = LoginWithEmailSecurityOption2$outboundSchema;
|
|
192
|
+
/** @deprecated use `LoginWithEmailSecurityOption2$Outbound` instead. */
|
|
193
|
+
export type Outbound = LoginWithEmailSecurityOption2$Outbound;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export function loginWithEmailSecurityOption2ToJSON(
|
|
197
|
+
loginWithEmailSecurityOption2: LoginWithEmailSecurityOption2,
|
|
198
|
+
): string {
|
|
199
|
+
return JSON.stringify(
|
|
200
|
+
LoginWithEmailSecurityOption2$outboundSchema.parse(
|
|
201
|
+
loginWithEmailSecurityOption2,
|
|
202
|
+
),
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export function loginWithEmailSecurityOption2FromJSON(
|
|
207
|
+
jsonString: string,
|
|
208
|
+
): SafeParseResult<LoginWithEmailSecurityOption2, SDKValidationError> {
|
|
209
|
+
return safeParse(
|
|
210
|
+
jsonString,
|
|
211
|
+
(x) => LoginWithEmailSecurityOption2$inboundSchema.parse(JSON.parse(x)),
|
|
212
|
+
`Failed to parse 'LoginWithEmailSecurityOption2' from JSON`,
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/** @internal */
|
|
217
|
+
export const LoginWithEmailSecurityOption3$inboundSchema: z.ZodType<
|
|
218
|
+
LoginWithEmailSecurityOption3,
|
|
219
|
+
z.ZodTypeDef,
|
|
220
|
+
unknown
|
|
221
|
+
> = z.object({
|
|
222
|
+
"X-Api-Key": z.string(),
|
|
223
|
+
Authorization: z.string(),
|
|
224
|
+
}).transform((v) => {
|
|
225
|
+
return remap$(v, {
|
|
226
|
+
"X-Api-Key": "xApiKey",
|
|
227
|
+
"Authorization": "authorization",
|
|
228
|
+
});
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
/** @internal */
|
|
232
|
+
export type LoginWithEmailSecurityOption3$Outbound = {
|
|
233
|
+
"X-Api-Key": string;
|
|
234
|
+
Authorization: string;
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
/** @internal */
|
|
238
|
+
export const LoginWithEmailSecurityOption3$outboundSchema: z.ZodType<
|
|
239
|
+
LoginWithEmailSecurityOption3$Outbound,
|
|
240
|
+
z.ZodTypeDef,
|
|
241
|
+
LoginWithEmailSecurityOption3
|
|
242
|
+
> = z.object({
|
|
243
|
+
xApiKey: z.string(),
|
|
244
|
+
authorization: z.string(),
|
|
245
|
+
}).transform((v) => {
|
|
246
|
+
return remap$(v, {
|
|
247
|
+
xApiKey: "X-Api-Key",
|
|
248
|
+
authorization: "Authorization",
|
|
249
|
+
});
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* @internal
|
|
254
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
255
|
+
*/
|
|
256
|
+
export namespace LoginWithEmailSecurityOption3$ {
|
|
257
|
+
/** @deprecated use `LoginWithEmailSecurityOption3$inboundSchema` instead. */
|
|
258
|
+
export const inboundSchema = LoginWithEmailSecurityOption3$inboundSchema;
|
|
259
|
+
/** @deprecated use `LoginWithEmailSecurityOption3$outboundSchema` instead. */
|
|
260
|
+
export const outboundSchema = LoginWithEmailSecurityOption3$outboundSchema;
|
|
261
|
+
/** @deprecated use `LoginWithEmailSecurityOption3$Outbound` instead. */
|
|
262
|
+
export type Outbound = LoginWithEmailSecurityOption3$Outbound;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export function loginWithEmailSecurityOption3ToJSON(
|
|
266
|
+
loginWithEmailSecurityOption3: LoginWithEmailSecurityOption3,
|
|
267
|
+
): string {
|
|
268
|
+
return JSON.stringify(
|
|
269
|
+
LoginWithEmailSecurityOption3$outboundSchema.parse(
|
|
270
|
+
loginWithEmailSecurityOption3,
|
|
271
|
+
),
|
|
272
|
+
);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
export function loginWithEmailSecurityOption3FromJSON(
|
|
276
|
+
jsonString: string,
|
|
277
|
+
): SafeParseResult<LoginWithEmailSecurityOption3, SDKValidationError> {
|
|
278
|
+
return safeParse(
|
|
279
|
+
jsonString,
|
|
280
|
+
(x) => LoginWithEmailSecurityOption3$inboundSchema.parse(JSON.parse(x)),
|
|
281
|
+
`Failed to parse 'LoginWithEmailSecurityOption3' from JSON`,
|
|
282
|
+
);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/** @internal */
|
|
286
|
+
export const LoginWithEmailSecurity$inboundSchema: z.ZodType<
|
|
287
|
+
LoginWithEmailSecurity,
|
|
288
|
+
z.ZodTypeDef,
|
|
289
|
+
unknown
|
|
290
|
+
> = z.object({
|
|
291
|
+
Option1: z.lazy(() => LoginWithEmailSecurityOption1$inboundSchema).optional(),
|
|
292
|
+
Option2: z.lazy(() => LoginWithEmailSecurityOption2$inboundSchema).optional(),
|
|
293
|
+
Option3: z.lazy(() => LoginWithEmailSecurityOption3$inboundSchema).optional(),
|
|
294
|
+
}).transform((v) => {
|
|
295
|
+
return remap$(v, {
|
|
296
|
+
"Option1": "option1",
|
|
297
|
+
"Option2": "option2",
|
|
298
|
+
"Option3": "option3",
|
|
299
|
+
});
|
|
300
|
+
});
|
|
301
|
+
|
|
302
|
+
/** @internal */
|
|
303
|
+
export type LoginWithEmailSecurity$Outbound = {
|
|
304
|
+
Option1?: LoginWithEmailSecurityOption1$Outbound | undefined;
|
|
305
|
+
Option2?: LoginWithEmailSecurityOption2$Outbound | undefined;
|
|
306
|
+
Option3?: LoginWithEmailSecurityOption3$Outbound | undefined;
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
/** @internal */
|
|
310
|
+
export const LoginWithEmailSecurity$outboundSchema: z.ZodType<
|
|
311
|
+
LoginWithEmailSecurity$Outbound,
|
|
312
|
+
z.ZodTypeDef,
|
|
313
|
+
LoginWithEmailSecurity
|
|
314
|
+
> = z.object({
|
|
315
|
+
option1: z.lazy(() => LoginWithEmailSecurityOption1$outboundSchema)
|
|
316
|
+
.optional(),
|
|
317
|
+
option2: z.lazy(() => LoginWithEmailSecurityOption2$outboundSchema)
|
|
318
|
+
.optional(),
|
|
319
|
+
option3: z.lazy(() => LoginWithEmailSecurityOption3$outboundSchema)
|
|
320
|
+
.optional(),
|
|
321
|
+
}).transform((v) => {
|
|
322
|
+
return remap$(v, {
|
|
323
|
+
option1: "Option1",
|
|
324
|
+
option2: "Option2",
|
|
325
|
+
option3: "Option3",
|
|
326
|
+
});
|
|
327
|
+
});
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* @internal
|
|
331
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
332
|
+
*/
|
|
333
|
+
export namespace LoginWithEmailSecurity$ {
|
|
334
|
+
/** @deprecated use `LoginWithEmailSecurity$inboundSchema` instead. */
|
|
335
|
+
export const inboundSchema = LoginWithEmailSecurity$inboundSchema;
|
|
336
|
+
/** @deprecated use `LoginWithEmailSecurity$outboundSchema` instead. */
|
|
337
|
+
export const outboundSchema = LoginWithEmailSecurity$outboundSchema;
|
|
338
|
+
/** @deprecated use `LoginWithEmailSecurity$Outbound` instead. */
|
|
339
|
+
export type Outbound = LoginWithEmailSecurity$Outbound;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
export function loginWithEmailSecurityToJSON(
|
|
343
|
+
loginWithEmailSecurity: LoginWithEmailSecurity,
|
|
344
|
+
): string {
|
|
345
|
+
return JSON.stringify(
|
|
346
|
+
LoginWithEmailSecurity$outboundSchema.parse(loginWithEmailSecurity),
|
|
347
|
+
);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
export function loginWithEmailSecurityFromJSON(
|
|
351
|
+
jsonString: string,
|
|
352
|
+
): SafeParseResult<LoginWithEmailSecurity, SDKValidationError> {
|
|
353
|
+
return safeParse(
|
|
354
|
+
jsonString,
|
|
355
|
+
(x) => LoginWithEmailSecurity$inboundSchema.parse(JSON.parse(x)),
|
|
356
|
+
`Failed to parse 'LoginWithEmailSecurity' from JSON`,
|
|
357
|
+
);
|
|
358
|
+
}
|
|
359
|
+
|
|
69
360
|
/** @internal */
|
|
70
361
|
export const LoginWithEmailRequestBody$inboundSchema: z.ZodType<
|
|
71
362
|
LoginWithEmailRequestBody,
|