ce-storefront 0.15.7 → 0.15.8

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 (118) hide show
  1. package/README.md +2 -21
  2. package/esm/lib/config.d.ts +2 -2
  3. package/esm/lib/config.js +2 -2
  4. package/esm/models/components/index.d.ts +0 -2
  5. package/esm/models/components/index.d.ts.map +1 -1
  6. package/esm/models/components/index.js +0 -2
  7. package/esm/models/components/index.js.map +1 -1
  8. package/esm/models/operations/index.d.ts +0 -8
  9. package/esm/models/operations/index.d.ts.map +1 -1
  10. package/esm/models/operations/index.js +0 -8
  11. package/esm/models/operations/index.js.map +1 -1
  12. package/esm/sdk/sdk.d.ts +0 -3
  13. package/esm/sdk/sdk.d.ts.map +1 -1
  14. package/esm/sdk/sdk.js +0 -4
  15. package/esm/sdk/sdk.js.map +1 -1
  16. package/examples/package-lock.json +1 -1
  17. package/jsr.json +1 -1
  18. package/package.json +1 -1
  19. package/src/lib/config.ts +2 -2
  20. package/src/models/components/index.ts +0 -2
  21. package/src/models/operations/index.ts +0 -8
  22. package/src/sdk/sdk.ts +0 -6
  23. package/docs/sdks/pos/README.md +0 -610
  24. package/esm/funcs/posCreatePosCart.d.ts +0 -17
  25. package/esm/funcs/posCreatePosCart.d.ts.map +0 -1
  26. package/esm/funcs/posCreatePosCart.js +0 -80
  27. package/esm/funcs/posCreatePosCart.js.map +0 -1
  28. package/esm/funcs/posLoginPosDeviceWithEmail.d.ts +0 -17
  29. package/esm/funcs/posLoginPosDeviceWithEmail.d.ts.map +0 -1
  30. package/esm/funcs/posLoginPosDeviceWithEmail.js +0 -85
  31. package/esm/funcs/posLoginPosDeviceWithEmail.js.map +0 -1
  32. package/esm/funcs/posLoginPosDeviceWithPhone.d.ts +0 -17
  33. package/esm/funcs/posLoginPosDeviceWithPhone.d.ts.map +0 -1
  34. package/esm/funcs/posLoginPosDeviceWithPhone.js +0 -85
  35. package/esm/funcs/posLoginPosDeviceWithPhone.js.map +0 -1
  36. package/esm/funcs/posLoginPosDeviceWithWhatsapp.d.ts +0 -17
  37. package/esm/funcs/posLoginPosDeviceWithWhatsapp.d.ts.map +0 -1
  38. package/esm/funcs/posLoginPosDeviceWithWhatsapp.js +0 -85
  39. package/esm/funcs/posLoginPosDeviceWithWhatsapp.js.map +0 -1
  40. package/esm/funcs/posPairPosDevice.d.ts +0 -17
  41. package/esm/funcs/posPairPosDevice.d.ts.map +0 -1
  42. package/esm/funcs/posPairPosDevice.js +0 -84
  43. package/esm/funcs/posPairPosDevice.js.map +0 -1
  44. package/esm/funcs/posRefreshPosAccessToken.d.ts +0 -17
  45. package/esm/funcs/posRefreshPosAccessToken.d.ts.map +0 -1
  46. package/esm/funcs/posRefreshPosAccessToken.js +0 -81
  47. package/esm/funcs/posRefreshPosAccessToken.js.map +0 -1
  48. package/esm/funcs/posUpdatePosCart.d.ts +0 -17
  49. package/esm/funcs/posUpdatePosCart.d.ts.map +0 -1
  50. package/esm/funcs/posUpdatePosCart.js +0 -84
  51. package/esm/funcs/posUpdatePosCart.js.map +0 -1
  52. package/esm/funcs/posVerifyPosLoginOtp.d.ts +0 -17
  53. package/esm/funcs/posVerifyPosLoginOtp.d.ts.map +0 -1
  54. package/esm/funcs/posVerifyPosLoginOtp.js +0 -84
  55. package/esm/funcs/posVerifyPosLoginOtp.js.map +0 -1
  56. package/esm/models/components/posdevice.d.ts +0 -71
  57. package/esm/models/components/posdevice.d.ts.map +0 -1
  58. package/esm/models/components/posdevice.js +0 -85
  59. package/esm/models/components/posdevice.js.map +0 -1
  60. package/esm/models/components/posuser.d.ts +0 -124
  61. package/esm/models/components/posuser.d.ts.map +0 -1
  62. package/esm/models/components/posuser.js +0 -139
  63. package/esm/models/components/posuser.js.map +0 -1
  64. package/esm/models/operations/createposcart.d.ts +0 -90
  65. package/esm/models/operations/createposcart.d.ts.map +0 -1
  66. package/esm/models/operations/createposcart.js +0 -86
  67. package/esm/models/operations/createposcart.js.map +0 -1
  68. package/esm/models/operations/loginposdevicewithemail.d.ts +0 -138
  69. package/esm/models/operations/loginposdevicewithemail.d.ts.map +0 -1
  70. package/esm/models/operations/loginposdevicewithemail.js +0 -159
  71. package/esm/models/operations/loginposdevicewithemail.js.map +0 -1
  72. package/esm/models/operations/loginposdevicewithphone.d.ts +0 -146
  73. package/esm/models/operations/loginposdevicewithphone.d.ts.map +0 -1
  74. package/esm/models/operations/loginposdevicewithphone.js +0 -163
  75. package/esm/models/operations/loginposdevicewithphone.js.map +0 -1
  76. package/esm/models/operations/loginposdevicewithwhatsapp.d.ts +0 -146
  77. package/esm/models/operations/loginposdevicewithwhatsapp.d.ts.map +0 -1
  78. package/esm/models/operations/loginposdevicewithwhatsapp.js +0 -163
  79. package/esm/models/operations/loginposdevicewithwhatsapp.js.map +0 -1
  80. package/esm/models/operations/pairposdevice.d.ts +0 -112
  81. package/esm/models/operations/pairposdevice.d.ts.map +0 -1
  82. package/esm/models/operations/pairposdevice.js +0 -128
  83. package/esm/models/operations/pairposdevice.js.map +0 -1
  84. package/esm/models/operations/refreshposaccesstoken.d.ts +0 -88
  85. package/esm/models/operations/refreshposaccesstoken.d.ts.map +0 -1
  86. package/esm/models/operations/refreshposaccesstoken.js +0 -106
  87. package/esm/models/operations/refreshposaccesstoken.js.map +0 -1
  88. package/esm/models/operations/updateposcart.d.ts +0 -120
  89. package/esm/models/operations/updateposcart.d.ts.map +0 -1
  90. package/esm/models/operations/updateposcart.js +0 -122
  91. package/esm/models/operations/updateposcart.js.map +0 -1
  92. package/esm/models/operations/verifyposloginotp.d.ts +0 -158
  93. package/esm/models/operations/verifyposloginotp.d.ts.map +0 -1
  94. package/esm/models/operations/verifyposloginotp.js +0 -169
  95. package/esm/models/operations/verifyposloginotp.js.map +0 -1
  96. package/esm/sdk/pos.d.ts +0 -61
  97. package/esm/sdk/pos.d.ts.map +0 -1
  98. package/esm/sdk/pos.js +0 -88
  99. package/esm/sdk/pos.js.map +0 -1
  100. package/src/funcs/posCreatePosCart.ts +0 -165
  101. package/src/funcs/posLoginPosDeviceWithEmail.ts +0 -173
  102. package/src/funcs/posLoginPosDeviceWithPhone.ts +0 -173
  103. package/src/funcs/posLoginPosDeviceWithWhatsapp.ts +0 -176
  104. package/src/funcs/posPairPosDevice.ts +0 -174
  105. package/src/funcs/posRefreshPosAccessToken.ts +0 -164
  106. package/src/funcs/posUpdatePosCart.ts +0 -167
  107. package/src/funcs/posVerifyPosLoginOtp.ts +0 -174
  108. package/src/models/components/posdevice.ts +0 -141
  109. package/src/models/components/posuser.ts +0 -263
  110. package/src/models/operations/createposcart.ts +0 -197
  111. package/src/models/operations/loginposdevicewithemail.ts +0 -328
  112. package/src/models/operations/loginposdevicewithphone.ts +0 -340
  113. package/src/models/operations/loginposdevicewithwhatsapp.ts +0 -347
  114. package/src/models/operations/pairposdevice.ts +0 -269
  115. package/src/models/operations/refreshposaccesstoken.ts +0 -223
  116. package/src/models/operations/updateposcart.ts +0 -271
  117. package/src/models/operations/verifyposloginotp.ts +0 -345
  118. package/src/sdk/pos.ts +0 -163
@@ -1,271 +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 { Result as SafeParseResult } from "../../types/fp.js";
9
- import * as components from "../components/index.js";
10
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
-
12
- export type UpdatePosCartRequestBody = {
13
- items?: Array<components.UpdateCartItem> | undefined;
14
- };
15
-
16
- export type UpdatePosCartRequest = {
17
- /**
18
- * cart id
19
- */
20
- id: string;
21
- requestBody?: UpdatePosCartRequestBody | undefined;
22
- };
23
-
24
- export type UpdatePosCartContent = {
25
- /**
26
- * This cart model is structured to capture a wide range of details, facilitating accurate representation and management of user shopping carts in an e-commerce platform.
27
- */
28
- cart?: components.Cart | undefined;
29
- };
30
-
31
- /**
32
- * OK
33
- */
34
- export type UpdatePosCartResponseBody = {
35
- message?: string | undefined;
36
- success?: string | undefined;
37
- content?: UpdatePosCartContent | undefined;
38
- };
39
-
40
- /** @internal */
41
- export const UpdatePosCartRequestBody$inboundSchema: z.ZodType<
42
- UpdatePosCartRequestBody,
43
- z.ZodTypeDef,
44
- unknown
45
- > = z.object({
46
- items: z.array(components.UpdateCartItem$inboundSchema).optional(),
47
- });
48
-
49
- /** @internal */
50
- export type UpdatePosCartRequestBody$Outbound = {
51
- items?: Array<components.UpdateCartItem$Outbound> | undefined;
52
- };
53
-
54
- /** @internal */
55
- export const UpdatePosCartRequestBody$outboundSchema: z.ZodType<
56
- UpdatePosCartRequestBody$Outbound,
57
- z.ZodTypeDef,
58
- UpdatePosCartRequestBody
59
- > = z.object({
60
- items: z.array(components.UpdateCartItem$outboundSchema).optional(),
61
- });
62
-
63
- /**
64
- * @internal
65
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
66
- */
67
- export namespace UpdatePosCartRequestBody$ {
68
- /** @deprecated use `UpdatePosCartRequestBody$inboundSchema` instead. */
69
- export const inboundSchema = UpdatePosCartRequestBody$inboundSchema;
70
- /** @deprecated use `UpdatePosCartRequestBody$outboundSchema` instead. */
71
- export const outboundSchema = UpdatePosCartRequestBody$outboundSchema;
72
- /** @deprecated use `UpdatePosCartRequestBody$Outbound` instead. */
73
- export type Outbound = UpdatePosCartRequestBody$Outbound;
74
- }
75
-
76
- export function updatePosCartRequestBodyToJSON(
77
- updatePosCartRequestBody: UpdatePosCartRequestBody,
78
- ): string {
79
- return JSON.stringify(
80
- UpdatePosCartRequestBody$outboundSchema.parse(updatePosCartRequestBody),
81
- );
82
- }
83
-
84
- export function updatePosCartRequestBodyFromJSON(
85
- jsonString: string,
86
- ): SafeParseResult<UpdatePosCartRequestBody, SDKValidationError> {
87
- return safeParse(
88
- jsonString,
89
- (x) => UpdatePosCartRequestBody$inboundSchema.parse(JSON.parse(x)),
90
- `Failed to parse 'UpdatePosCartRequestBody' from JSON`,
91
- );
92
- }
93
-
94
- /** @internal */
95
- export const UpdatePosCartRequest$inboundSchema: z.ZodType<
96
- UpdatePosCartRequest,
97
- z.ZodTypeDef,
98
- unknown
99
- > = z.object({
100
- id: z.string(),
101
- RequestBody: z.lazy(() => UpdatePosCartRequestBody$inboundSchema).optional(),
102
- }).transform((v) => {
103
- return remap$(v, {
104
- "RequestBody": "requestBody",
105
- });
106
- });
107
-
108
- /** @internal */
109
- export type UpdatePosCartRequest$Outbound = {
110
- id: string;
111
- RequestBody?: UpdatePosCartRequestBody$Outbound | undefined;
112
- };
113
-
114
- /** @internal */
115
- export const UpdatePosCartRequest$outboundSchema: z.ZodType<
116
- UpdatePosCartRequest$Outbound,
117
- z.ZodTypeDef,
118
- UpdatePosCartRequest
119
- > = z.object({
120
- id: z.string(),
121
- requestBody: z.lazy(() => UpdatePosCartRequestBody$outboundSchema).optional(),
122
- }).transform((v) => {
123
- return remap$(v, {
124
- requestBody: "RequestBody",
125
- });
126
- });
127
-
128
- /**
129
- * @internal
130
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
131
- */
132
- export namespace UpdatePosCartRequest$ {
133
- /** @deprecated use `UpdatePosCartRequest$inboundSchema` instead. */
134
- export const inboundSchema = UpdatePosCartRequest$inboundSchema;
135
- /** @deprecated use `UpdatePosCartRequest$outboundSchema` instead. */
136
- export const outboundSchema = UpdatePosCartRequest$outboundSchema;
137
- /** @deprecated use `UpdatePosCartRequest$Outbound` instead. */
138
- export type Outbound = UpdatePosCartRequest$Outbound;
139
- }
140
-
141
- export function updatePosCartRequestToJSON(
142
- updatePosCartRequest: UpdatePosCartRequest,
143
- ): string {
144
- return JSON.stringify(
145
- UpdatePosCartRequest$outboundSchema.parse(updatePosCartRequest),
146
- );
147
- }
148
-
149
- export function updatePosCartRequestFromJSON(
150
- jsonString: string,
151
- ): SafeParseResult<UpdatePosCartRequest, SDKValidationError> {
152
- return safeParse(
153
- jsonString,
154
- (x) => UpdatePosCartRequest$inboundSchema.parse(JSON.parse(x)),
155
- `Failed to parse 'UpdatePosCartRequest' from JSON`,
156
- );
157
- }
158
-
159
- /** @internal */
160
- export const UpdatePosCartContent$inboundSchema: z.ZodType<
161
- UpdatePosCartContent,
162
- z.ZodTypeDef,
163
- unknown
164
- > = z.object({
165
- cart: components.Cart$inboundSchema.optional(),
166
- });
167
-
168
- /** @internal */
169
- export type UpdatePosCartContent$Outbound = {
170
- cart?: components.Cart$Outbound | undefined;
171
- };
172
-
173
- /** @internal */
174
- export const UpdatePosCartContent$outboundSchema: z.ZodType<
175
- UpdatePosCartContent$Outbound,
176
- z.ZodTypeDef,
177
- UpdatePosCartContent
178
- > = z.object({
179
- cart: components.Cart$outboundSchema.optional(),
180
- });
181
-
182
- /**
183
- * @internal
184
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
185
- */
186
- export namespace UpdatePosCartContent$ {
187
- /** @deprecated use `UpdatePosCartContent$inboundSchema` instead. */
188
- export const inboundSchema = UpdatePosCartContent$inboundSchema;
189
- /** @deprecated use `UpdatePosCartContent$outboundSchema` instead. */
190
- export const outboundSchema = UpdatePosCartContent$outboundSchema;
191
- /** @deprecated use `UpdatePosCartContent$Outbound` instead. */
192
- export type Outbound = UpdatePosCartContent$Outbound;
193
- }
194
-
195
- export function updatePosCartContentToJSON(
196
- updatePosCartContent: UpdatePosCartContent,
197
- ): string {
198
- return JSON.stringify(
199
- UpdatePosCartContent$outboundSchema.parse(updatePosCartContent),
200
- );
201
- }
202
-
203
- export function updatePosCartContentFromJSON(
204
- jsonString: string,
205
- ): SafeParseResult<UpdatePosCartContent, SDKValidationError> {
206
- return safeParse(
207
- jsonString,
208
- (x) => UpdatePosCartContent$inboundSchema.parse(JSON.parse(x)),
209
- `Failed to parse 'UpdatePosCartContent' from JSON`,
210
- );
211
- }
212
-
213
- /** @internal */
214
- export const UpdatePosCartResponseBody$inboundSchema: z.ZodType<
215
- UpdatePosCartResponseBody,
216
- z.ZodTypeDef,
217
- unknown
218
- > = z.object({
219
- message: z.string().optional(),
220
- success: z.string().optional(),
221
- content: z.lazy(() => UpdatePosCartContent$inboundSchema).optional(),
222
- });
223
-
224
- /** @internal */
225
- export type UpdatePosCartResponseBody$Outbound = {
226
- message?: string | undefined;
227
- success?: string | undefined;
228
- content?: UpdatePosCartContent$Outbound | undefined;
229
- };
230
-
231
- /** @internal */
232
- export const UpdatePosCartResponseBody$outboundSchema: z.ZodType<
233
- UpdatePosCartResponseBody$Outbound,
234
- z.ZodTypeDef,
235
- UpdatePosCartResponseBody
236
- > = z.object({
237
- message: z.string().optional(),
238
- success: z.string().optional(),
239
- content: z.lazy(() => UpdatePosCartContent$outboundSchema).optional(),
240
- });
241
-
242
- /**
243
- * @internal
244
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
245
- */
246
- export namespace UpdatePosCartResponseBody$ {
247
- /** @deprecated use `UpdatePosCartResponseBody$inboundSchema` instead. */
248
- export const inboundSchema = UpdatePosCartResponseBody$inboundSchema;
249
- /** @deprecated use `UpdatePosCartResponseBody$outboundSchema` instead. */
250
- export const outboundSchema = UpdatePosCartResponseBody$outboundSchema;
251
- /** @deprecated use `UpdatePosCartResponseBody$Outbound` instead. */
252
- export type Outbound = UpdatePosCartResponseBody$Outbound;
253
- }
254
-
255
- export function updatePosCartResponseBodyToJSON(
256
- updatePosCartResponseBody: UpdatePosCartResponseBody,
257
- ): string {
258
- return JSON.stringify(
259
- UpdatePosCartResponseBody$outboundSchema.parse(updatePosCartResponseBody),
260
- );
261
- }
262
-
263
- export function updatePosCartResponseBodyFromJSON(
264
- jsonString: string,
265
- ): SafeParseResult<UpdatePosCartResponseBody, SDKValidationError> {
266
- return safeParse(
267
- jsonString,
268
- (x) => UpdatePosCartResponseBody$inboundSchema.parse(JSON.parse(x)),
269
- `Failed to parse 'UpdatePosCartResponseBody' from JSON`,
270
- );
271
- }
@@ -1,345 +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 * as components from "../components/index.js";
11
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
12
-
13
- export type VerifyPosLoginOtpSecurity = {
14
- xApiKey: string;
15
- };
16
-
17
- /**
18
- * A string indicating the action to be performed.
19
- */
20
- export const VerifyPosLoginOtpOtpAction = {
21
- Login: "login",
22
- } as const;
23
- /**
24
- * A string indicating the action to be performed.
25
- */
26
- export type VerifyPosLoginOtpOtpAction = ClosedEnum<
27
- typeof VerifyPosLoginOtpOtpAction
28
- >;
29
-
30
- export type VerifyPosLoginOtpRequestBody = {
31
- /**
32
- * A string representing the one-time password.
33
- */
34
- otp: string;
35
- /**
36
- * A string representing the OTP token.
37
- */
38
- otpToken: string;
39
- /**
40
- * A string indicating the action to be performed.
41
- */
42
- otpAction: VerifyPosLoginOtpOtpAction;
43
- };
44
-
45
- export type VerifyPosLoginOtpContent = {
46
- user: components.PosUser;
47
- accessToken: string;
48
- refreshToken: string;
49
- };
50
-
51
- /**
52
- * OK
53
- */
54
- export type VerifyPosLoginOtpResponseBody = {
55
- message: string;
56
- success: string;
57
- content: VerifyPosLoginOtpContent;
58
- };
59
-
60
- /** @internal */
61
- export const VerifyPosLoginOtpSecurity$inboundSchema: z.ZodType<
62
- VerifyPosLoginOtpSecurity,
63
- z.ZodTypeDef,
64
- unknown
65
- > = z.object({
66
- "X-Api-Key": z.string(),
67
- }).transform((v) => {
68
- return remap$(v, {
69
- "X-Api-Key": "xApiKey",
70
- });
71
- });
72
-
73
- /** @internal */
74
- export type VerifyPosLoginOtpSecurity$Outbound = {
75
- "X-Api-Key": string;
76
- };
77
-
78
- /** @internal */
79
- export const VerifyPosLoginOtpSecurity$outboundSchema: z.ZodType<
80
- VerifyPosLoginOtpSecurity$Outbound,
81
- z.ZodTypeDef,
82
- VerifyPosLoginOtpSecurity
83
- > = z.object({
84
- xApiKey: z.string(),
85
- }).transform((v) => {
86
- return remap$(v, {
87
- xApiKey: "X-Api-Key",
88
- });
89
- });
90
-
91
- /**
92
- * @internal
93
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
94
- */
95
- export namespace VerifyPosLoginOtpSecurity$ {
96
- /** @deprecated use `VerifyPosLoginOtpSecurity$inboundSchema` instead. */
97
- export const inboundSchema = VerifyPosLoginOtpSecurity$inboundSchema;
98
- /** @deprecated use `VerifyPosLoginOtpSecurity$outboundSchema` instead. */
99
- export const outboundSchema = VerifyPosLoginOtpSecurity$outboundSchema;
100
- /** @deprecated use `VerifyPosLoginOtpSecurity$Outbound` instead. */
101
- export type Outbound = VerifyPosLoginOtpSecurity$Outbound;
102
- }
103
-
104
- export function verifyPosLoginOtpSecurityToJSON(
105
- verifyPosLoginOtpSecurity: VerifyPosLoginOtpSecurity,
106
- ): string {
107
- return JSON.stringify(
108
- VerifyPosLoginOtpSecurity$outboundSchema.parse(verifyPosLoginOtpSecurity),
109
- );
110
- }
111
-
112
- export function verifyPosLoginOtpSecurityFromJSON(
113
- jsonString: string,
114
- ): SafeParseResult<VerifyPosLoginOtpSecurity, SDKValidationError> {
115
- return safeParse(
116
- jsonString,
117
- (x) => VerifyPosLoginOtpSecurity$inboundSchema.parse(JSON.parse(x)),
118
- `Failed to parse 'VerifyPosLoginOtpSecurity' from JSON`,
119
- );
120
- }
121
-
122
- /** @internal */
123
- export const VerifyPosLoginOtpOtpAction$inboundSchema: z.ZodNativeEnum<
124
- typeof VerifyPosLoginOtpOtpAction
125
- > = z.nativeEnum(VerifyPosLoginOtpOtpAction);
126
-
127
- /** @internal */
128
- export const VerifyPosLoginOtpOtpAction$outboundSchema: z.ZodNativeEnum<
129
- typeof VerifyPosLoginOtpOtpAction
130
- > = VerifyPosLoginOtpOtpAction$inboundSchema;
131
-
132
- /**
133
- * @internal
134
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
135
- */
136
- export namespace VerifyPosLoginOtpOtpAction$ {
137
- /** @deprecated use `VerifyPosLoginOtpOtpAction$inboundSchema` instead. */
138
- export const inboundSchema = VerifyPosLoginOtpOtpAction$inboundSchema;
139
- /** @deprecated use `VerifyPosLoginOtpOtpAction$outboundSchema` instead. */
140
- export const outboundSchema = VerifyPosLoginOtpOtpAction$outboundSchema;
141
- }
142
-
143
- /** @internal */
144
- export const VerifyPosLoginOtpRequestBody$inboundSchema: z.ZodType<
145
- VerifyPosLoginOtpRequestBody,
146
- z.ZodTypeDef,
147
- unknown
148
- > = z.object({
149
- otp: z.string(),
150
- otp_token: z.string(),
151
- otp_action: VerifyPosLoginOtpOtpAction$inboundSchema,
152
- }).transform((v) => {
153
- return remap$(v, {
154
- "otp_token": "otpToken",
155
- "otp_action": "otpAction",
156
- });
157
- });
158
-
159
- /** @internal */
160
- export type VerifyPosLoginOtpRequestBody$Outbound = {
161
- otp: string;
162
- otp_token: string;
163
- otp_action: string;
164
- };
165
-
166
- /** @internal */
167
- export const VerifyPosLoginOtpRequestBody$outboundSchema: z.ZodType<
168
- VerifyPosLoginOtpRequestBody$Outbound,
169
- z.ZodTypeDef,
170
- VerifyPosLoginOtpRequestBody
171
- > = z.object({
172
- otp: z.string(),
173
- otpToken: z.string(),
174
- otpAction: VerifyPosLoginOtpOtpAction$outboundSchema,
175
- }).transform((v) => {
176
- return remap$(v, {
177
- otpToken: "otp_token",
178
- otpAction: "otp_action",
179
- });
180
- });
181
-
182
- /**
183
- * @internal
184
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
185
- */
186
- export namespace VerifyPosLoginOtpRequestBody$ {
187
- /** @deprecated use `VerifyPosLoginOtpRequestBody$inboundSchema` instead. */
188
- export const inboundSchema = VerifyPosLoginOtpRequestBody$inboundSchema;
189
- /** @deprecated use `VerifyPosLoginOtpRequestBody$outboundSchema` instead. */
190
- export const outboundSchema = VerifyPosLoginOtpRequestBody$outboundSchema;
191
- /** @deprecated use `VerifyPosLoginOtpRequestBody$Outbound` instead. */
192
- export type Outbound = VerifyPosLoginOtpRequestBody$Outbound;
193
- }
194
-
195
- export function verifyPosLoginOtpRequestBodyToJSON(
196
- verifyPosLoginOtpRequestBody: VerifyPosLoginOtpRequestBody,
197
- ): string {
198
- return JSON.stringify(
199
- VerifyPosLoginOtpRequestBody$outboundSchema.parse(
200
- verifyPosLoginOtpRequestBody,
201
- ),
202
- );
203
- }
204
-
205
- export function verifyPosLoginOtpRequestBodyFromJSON(
206
- jsonString: string,
207
- ): SafeParseResult<VerifyPosLoginOtpRequestBody, SDKValidationError> {
208
- return safeParse(
209
- jsonString,
210
- (x) => VerifyPosLoginOtpRequestBody$inboundSchema.parse(JSON.parse(x)),
211
- `Failed to parse 'VerifyPosLoginOtpRequestBody' from JSON`,
212
- );
213
- }
214
-
215
- /** @internal */
216
- export const VerifyPosLoginOtpContent$inboundSchema: z.ZodType<
217
- VerifyPosLoginOtpContent,
218
- z.ZodTypeDef,
219
- unknown
220
- > = z.object({
221
- user: components.PosUser$inboundSchema,
222
- access_token: z.string(),
223
- refresh_token: z.string(),
224
- }).transform((v) => {
225
- return remap$(v, {
226
- "access_token": "accessToken",
227
- "refresh_token": "refreshToken",
228
- });
229
- });
230
-
231
- /** @internal */
232
- export type VerifyPosLoginOtpContent$Outbound = {
233
- user: components.PosUser$Outbound;
234
- access_token: string;
235
- refresh_token: string;
236
- };
237
-
238
- /** @internal */
239
- export const VerifyPosLoginOtpContent$outboundSchema: z.ZodType<
240
- VerifyPosLoginOtpContent$Outbound,
241
- z.ZodTypeDef,
242
- VerifyPosLoginOtpContent
243
- > = z.object({
244
- user: components.PosUser$outboundSchema,
245
- accessToken: z.string(),
246
- refreshToken: z.string(),
247
- }).transform((v) => {
248
- return remap$(v, {
249
- accessToken: "access_token",
250
- refreshToken: "refresh_token",
251
- });
252
- });
253
-
254
- /**
255
- * @internal
256
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
257
- */
258
- export namespace VerifyPosLoginOtpContent$ {
259
- /** @deprecated use `VerifyPosLoginOtpContent$inboundSchema` instead. */
260
- export const inboundSchema = VerifyPosLoginOtpContent$inboundSchema;
261
- /** @deprecated use `VerifyPosLoginOtpContent$outboundSchema` instead. */
262
- export const outboundSchema = VerifyPosLoginOtpContent$outboundSchema;
263
- /** @deprecated use `VerifyPosLoginOtpContent$Outbound` instead. */
264
- export type Outbound = VerifyPosLoginOtpContent$Outbound;
265
- }
266
-
267
- export function verifyPosLoginOtpContentToJSON(
268
- verifyPosLoginOtpContent: VerifyPosLoginOtpContent,
269
- ): string {
270
- return JSON.stringify(
271
- VerifyPosLoginOtpContent$outboundSchema.parse(verifyPosLoginOtpContent),
272
- );
273
- }
274
-
275
- export function verifyPosLoginOtpContentFromJSON(
276
- jsonString: string,
277
- ): SafeParseResult<VerifyPosLoginOtpContent, SDKValidationError> {
278
- return safeParse(
279
- jsonString,
280
- (x) => VerifyPosLoginOtpContent$inboundSchema.parse(JSON.parse(x)),
281
- `Failed to parse 'VerifyPosLoginOtpContent' from JSON`,
282
- );
283
- }
284
-
285
- /** @internal */
286
- export const VerifyPosLoginOtpResponseBody$inboundSchema: z.ZodType<
287
- VerifyPosLoginOtpResponseBody,
288
- z.ZodTypeDef,
289
- unknown
290
- > = z.object({
291
- message: z.string(),
292
- success: z.string(),
293
- content: z.lazy(() => VerifyPosLoginOtpContent$inboundSchema),
294
- });
295
-
296
- /** @internal */
297
- export type VerifyPosLoginOtpResponseBody$Outbound = {
298
- message: string;
299
- success: string;
300
- content: VerifyPosLoginOtpContent$Outbound;
301
- };
302
-
303
- /** @internal */
304
- export const VerifyPosLoginOtpResponseBody$outboundSchema: z.ZodType<
305
- VerifyPosLoginOtpResponseBody$Outbound,
306
- z.ZodTypeDef,
307
- VerifyPosLoginOtpResponseBody
308
- > = z.object({
309
- message: z.string(),
310
- success: z.string(),
311
- content: z.lazy(() => VerifyPosLoginOtpContent$outboundSchema),
312
- });
313
-
314
- /**
315
- * @internal
316
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
317
- */
318
- export namespace VerifyPosLoginOtpResponseBody$ {
319
- /** @deprecated use `VerifyPosLoginOtpResponseBody$inboundSchema` instead. */
320
- export const inboundSchema = VerifyPosLoginOtpResponseBody$inboundSchema;
321
- /** @deprecated use `VerifyPosLoginOtpResponseBody$outboundSchema` instead. */
322
- export const outboundSchema = VerifyPosLoginOtpResponseBody$outboundSchema;
323
- /** @deprecated use `VerifyPosLoginOtpResponseBody$Outbound` instead. */
324
- export type Outbound = VerifyPosLoginOtpResponseBody$Outbound;
325
- }
326
-
327
- export function verifyPosLoginOtpResponseBodyToJSON(
328
- verifyPosLoginOtpResponseBody: VerifyPosLoginOtpResponseBody,
329
- ): string {
330
- return JSON.stringify(
331
- VerifyPosLoginOtpResponseBody$outboundSchema.parse(
332
- verifyPosLoginOtpResponseBody,
333
- ),
334
- );
335
- }
336
-
337
- export function verifyPosLoginOtpResponseBodyFromJSON(
338
- jsonString: string,
339
- ): SafeParseResult<VerifyPosLoginOtpResponseBody, SDKValidationError> {
340
- return safeParse(
341
- jsonString,
342
- (x) => VerifyPosLoginOtpResponseBody$inboundSchema.parse(JSON.parse(x)),
343
- `Failed to parse 'VerifyPosLoginOtpResponseBody' from JSON`,
344
- );
345
- }