ce-storefront 0.15.3 → 0.15.6
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 +15 -2
- package/docs/sdks/auth/README.md +10 -0
- package/docs/sdks/carts/README.md +12 -0
- package/docs/sdks/catalog/README.md +11 -0
- package/docs/sdks/common/README.md +1 -0
- package/docs/sdks/customers/README.md +7 -0
- package/docs/sdks/orders/README.md +7 -0
- package/docs/sdks/pos/README.md +397 -0
- package/docs/sdks/shipping/README.md +1 -0
- package/esm/funcs/posCreatePosCart.d.ts +17 -0
- package/esm/funcs/posCreatePosCart.d.ts.map +1 -0
- package/esm/funcs/posCreatePosCart.js +80 -0
- package/esm/funcs/posCreatePosCart.js.map +1 -0
- package/esm/funcs/posLoginToPosDevice.d.ts +17 -0
- package/esm/funcs/posLoginToPosDevice.d.ts.map +1 -0
- package/esm/funcs/posLoginToPosDevice.js +84 -0
- package/esm/funcs/posLoginToPosDevice.js.map +1 -0
- package/esm/funcs/posPairPosDevice.d.ts +17 -0
- package/esm/funcs/posPairPosDevice.d.ts.map +1 -0
- package/esm/funcs/posPairPosDevice.js +84 -0
- package/esm/funcs/posPairPosDevice.js.map +1 -0
- package/esm/funcs/posRefreshPosAccessToken.d.ts +17 -0
- package/esm/funcs/posRefreshPosAccessToken.d.ts.map +1 -0
- package/esm/funcs/posRefreshPosAccessToken.js +81 -0
- package/esm/funcs/posRefreshPosAccessToken.js.map +1 -0
- package/esm/funcs/posUpdatePosCart.d.ts +17 -0
- package/esm/funcs/posUpdatePosCart.d.ts.map +1 -0
- package/esm/funcs/posUpdatePosCart.js +84 -0
- package/esm/funcs/posUpdatePosCart.js.map +1 -0
- package/esm/lib/base64.d.ts +2 -2
- package/esm/lib/base64.d.ts.map +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/encodings.d.ts.map +1 -1
- package/esm/models/components/index.d.ts +1 -0
- package/esm/models/components/index.d.ts.map +1 -1
- package/esm/models/components/index.js +1 -0
- package/esm/models/components/index.js.map +1 -1
- package/esm/models/components/posuser.d.ts +124 -0
- package/esm/models/components/posuser.d.ts.map +1 -0
- package/esm/models/components/posuser.js +139 -0
- package/esm/models/components/posuser.js.map +1 -0
- package/esm/models/operations/createposcart.d.ts +90 -0
- package/esm/models/operations/createposcart.d.ts.map +1 -0
- package/esm/models/operations/createposcart.js +86 -0
- package/esm/models/operations/createposcart.js.map +1 -0
- package/esm/models/operations/index.d.ts +5 -0
- package/esm/models/operations/index.d.ts.map +1 -1
- package/esm/models/operations/index.js +5 -0
- package/esm/models/operations/index.js.map +1 -1
- package/esm/models/operations/logintoposdevice.d.ts +118 -0
- package/esm/models/operations/logintoposdevice.d.ts.map +1 -0
- package/esm/models/operations/logintoposdevice.js +146 -0
- package/esm/models/operations/logintoposdevice.js.map +1 -0
- package/esm/models/operations/pairposdevice.d.ts +115 -0
- package/esm/models/operations/pairposdevice.d.ts.map +1 -0
- package/esm/models/operations/pairposdevice.js +141 -0
- package/esm/models/operations/pairposdevice.js.map +1 -0
- package/esm/models/operations/refreshposaccesstoken.d.ts +88 -0
- package/esm/models/operations/refreshposaccesstoken.d.ts.map +1 -0
- package/esm/models/operations/refreshposaccesstoken.js +106 -0
- package/esm/models/operations/refreshposaccesstoken.js.map +1 -0
- package/esm/models/operations/updateposcart.d.ts +120 -0
- package/esm/models/operations/updateposcart.d.ts.map +1 -0
- package/esm/models/operations/updateposcart.js +122 -0
- package/esm/models/operations/updateposcart.js.map +1 -0
- package/esm/sdk/pos.d.ts +40 -0
- package/esm/sdk/pos.d.ts.map +1 -0
- package/esm/sdk/pos.js +58 -0
- package/esm/sdk/pos.js.map +1 -0
- package/esm/sdk/sdk.d.ts +3 -0
- package/esm/sdk/sdk.d.ts.map +1 -1
- package/esm/sdk/sdk.js +4 -0
- package/esm/sdk/sdk.js.map +1 -1
- package/examples/README.md +5 -0
- package/examples/catalogListProducts.example.ts +2 -0
- package/examples/package-lock.json +6 -7
- package/jsr.json +1 -1
- package/package.json +5 -6
- package/src/funcs/posCreatePosCart.ts +165 -0
- package/src/funcs/posLoginToPosDevice.ts +174 -0
- package/src/funcs/posPairPosDevice.ts +174 -0
- package/src/funcs/posRefreshPosAccessToken.ts +164 -0
- package/src/funcs/posUpdatePosCart.ts +167 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/index.ts +1 -0
- package/src/models/components/posuser.ts +263 -0
- package/src/models/operations/createposcart.ts +197 -0
- package/src/models/operations/index.ts +5 -0
- package/src/models/operations/logintoposdevice.ts +297 -0
- package/src/models/operations/pairposdevice.ts +286 -0
- package/src/models/operations/refreshposaccesstoken.ts +223 -0
- package/src/models/operations/updateposcart.ts +271 -0
- package/src/sdk/pos.ts +103 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -0,0 +1,297 @@
|
|
|
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 LoginToPosDeviceSecurity = {
|
|
13
|
+
xApiKey: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type LoginToPosDeviceRequestBody = {
|
|
17
|
+
userPin: number;
|
|
18
|
+
deviceToken: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export type LoginToPosDeviceContent = {
|
|
22
|
+
user?: components.PosUser | undefined;
|
|
23
|
+
accessToken?: string | undefined;
|
|
24
|
+
refreshToken?: string | undefined;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* OK
|
|
29
|
+
*/
|
|
30
|
+
export type LoginToPosDeviceResponseBody = {
|
|
31
|
+
message?: string | undefined;
|
|
32
|
+
success?: string | undefined;
|
|
33
|
+
content?: LoginToPosDeviceContent | undefined;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const LoginToPosDeviceSecurity$inboundSchema: z.ZodType<
|
|
38
|
+
LoginToPosDeviceSecurity,
|
|
39
|
+
z.ZodTypeDef,
|
|
40
|
+
unknown
|
|
41
|
+
> = z.object({
|
|
42
|
+
"X-Api-Key": z.string(),
|
|
43
|
+
}).transform((v) => {
|
|
44
|
+
return remap$(v, {
|
|
45
|
+
"X-Api-Key": "xApiKey",
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export type LoginToPosDeviceSecurity$Outbound = {
|
|
51
|
+
"X-Api-Key": string;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export const LoginToPosDeviceSecurity$outboundSchema: z.ZodType<
|
|
56
|
+
LoginToPosDeviceSecurity$Outbound,
|
|
57
|
+
z.ZodTypeDef,
|
|
58
|
+
LoginToPosDeviceSecurity
|
|
59
|
+
> = z.object({
|
|
60
|
+
xApiKey: z.string(),
|
|
61
|
+
}).transform((v) => {
|
|
62
|
+
return remap$(v, {
|
|
63
|
+
xApiKey: "X-Api-Key",
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @internal
|
|
69
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
70
|
+
*/
|
|
71
|
+
export namespace LoginToPosDeviceSecurity$ {
|
|
72
|
+
/** @deprecated use `LoginToPosDeviceSecurity$inboundSchema` instead. */
|
|
73
|
+
export const inboundSchema = LoginToPosDeviceSecurity$inboundSchema;
|
|
74
|
+
/** @deprecated use `LoginToPosDeviceSecurity$outboundSchema` instead. */
|
|
75
|
+
export const outboundSchema = LoginToPosDeviceSecurity$outboundSchema;
|
|
76
|
+
/** @deprecated use `LoginToPosDeviceSecurity$Outbound` instead. */
|
|
77
|
+
export type Outbound = LoginToPosDeviceSecurity$Outbound;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function loginToPosDeviceSecurityToJSON(
|
|
81
|
+
loginToPosDeviceSecurity: LoginToPosDeviceSecurity,
|
|
82
|
+
): string {
|
|
83
|
+
return JSON.stringify(
|
|
84
|
+
LoginToPosDeviceSecurity$outboundSchema.parse(loginToPosDeviceSecurity),
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function loginToPosDeviceSecurityFromJSON(
|
|
89
|
+
jsonString: string,
|
|
90
|
+
): SafeParseResult<LoginToPosDeviceSecurity, SDKValidationError> {
|
|
91
|
+
return safeParse(
|
|
92
|
+
jsonString,
|
|
93
|
+
(x) => LoginToPosDeviceSecurity$inboundSchema.parse(JSON.parse(x)),
|
|
94
|
+
`Failed to parse 'LoginToPosDeviceSecurity' from JSON`,
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** @internal */
|
|
99
|
+
export const LoginToPosDeviceRequestBody$inboundSchema: z.ZodType<
|
|
100
|
+
LoginToPosDeviceRequestBody,
|
|
101
|
+
z.ZodTypeDef,
|
|
102
|
+
unknown
|
|
103
|
+
> = z.object({
|
|
104
|
+
user_pin: z.number().int(),
|
|
105
|
+
device_token: z.string(),
|
|
106
|
+
}).transform((v) => {
|
|
107
|
+
return remap$(v, {
|
|
108
|
+
"user_pin": "userPin",
|
|
109
|
+
"device_token": "deviceToken",
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
/** @internal */
|
|
114
|
+
export type LoginToPosDeviceRequestBody$Outbound = {
|
|
115
|
+
user_pin: number;
|
|
116
|
+
device_token: string;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
/** @internal */
|
|
120
|
+
export const LoginToPosDeviceRequestBody$outboundSchema: z.ZodType<
|
|
121
|
+
LoginToPosDeviceRequestBody$Outbound,
|
|
122
|
+
z.ZodTypeDef,
|
|
123
|
+
LoginToPosDeviceRequestBody
|
|
124
|
+
> = z.object({
|
|
125
|
+
userPin: z.number().int(),
|
|
126
|
+
deviceToken: z.string(),
|
|
127
|
+
}).transform((v) => {
|
|
128
|
+
return remap$(v, {
|
|
129
|
+
userPin: "user_pin",
|
|
130
|
+
deviceToken: "device_token",
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* @internal
|
|
136
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
137
|
+
*/
|
|
138
|
+
export namespace LoginToPosDeviceRequestBody$ {
|
|
139
|
+
/** @deprecated use `LoginToPosDeviceRequestBody$inboundSchema` instead. */
|
|
140
|
+
export const inboundSchema = LoginToPosDeviceRequestBody$inboundSchema;
|
|
141
|
+
/** @deprecated use `LoginToPosDeviceRequestBody$outboundSchema` instead. */
|
|
142
|
+
export const outboundSchema = LoginToPosDeviceRequestBody$outboundSchema;
|
|
143
|
+
/** @deprecated use `LoginToPosDeviceRequestBody$Outbound` instead. */
|
|
144
|
+
export type Outbound = LoginToPosDeviceRequestBody$Outbound;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export function loginToPosDeviceRequestBodyToJSON(
|
|
148
|
+
loginToPosDeviceRequestBody: LoginToPosDeviceRequestBody,
|
|
149
|
+
): string {
|
|
150
|
+
return JSON.stringify(
|
|
151
|
+
LoginToPosDeviceRequestBody$outboundSchema.parse(
|
|
152
|
+
loginToPosDeviceRequestBody,
|
|
153
|
+
),
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export function loginToPosDeviceRequestBodyFromJSON(
|
|
158
|
+
jsonString: string,
|
|
159
|
+
): SafeParseResult<LoginToPosDeviceRequestBody, SDKValidationError> {
|
|
160
|
+
return safeParse(
|
|
161
|
+
jsonString,
|
|
162
|
+
(x) => LoginToPosDeviceRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
163
|
+
`Failed to parse 'LoginToPosDeviceRequestBody' from JSON`,
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/** @internal */
|
|
168
|
+
export const LoginToPosDeviceContent$inboundSchema: z.ZodType<
|
|
169
|
+
LoginToPosDeviceContent,
|
|
170
|
+
z.ZodTypeDef,
|
|
171
|
+
unknown
|
|
172
|
+
> = z.object({
|
|
173
|
+
user: components.PosUser$inboundSchema.optional(),
|
|
174
|
+
access_token: z.string().optional(),
|
|
175
|
+
refresh_token: z.string().optional(),
|
|
176
|
+
}).transform((v) => {
|
|
177
|
+
return remap$(v, {
|
|
178
|
+
"access_token": "accessToken",
|
|
179
|
+
"refresh_token": "refreshToken",
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
/** @internal */
|
|
184
|
+
export type LoginToPosDeviceContent$Outbound = {
|
|
185
|
+
user?: components.PosUser$Outbound | undefined;
|
|
186
|
+
access_token?: string | undefined;
|
|
187
|
+
refresh_token?: string | undefined;
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
/** @internal */
|
|
191
|
+
export const LoginToPosDeviceContent$outboundSchema: z.ZodType<
|
|
192
|
+
LoginToPosDeviceContent$Outbound,
|
|
193
|
+
z.ZodTypeDef,
|
|
194
|
+
LoginToPosDeviceContent
|
|
195
|
+
> = z.object({
|
|
196
|
+
user: components.PosUser$outboundSchema.optional(),
|
|
197
|
+
accessToken: z.string().optional(),
|
|
198
|
+
refreshToken: z.string().optional(),
|
|
199
|
+
}).transform((v) => {
|
|
200
|
+
return remap$(v, {
|
|
201
|
+
accessToken: "access_token",
|
|
202
|
+
refreshToken: "refresh_token",
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* @internal
|
|
208
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
209
|
+
*/
|
|
210
|
+
export namespace LoginToPosDeviceContent$ {
|
|
211
|
+
/** @deprecated use `LoginToPosDeviceContent$inboundSchema` instead. */
|
|
212
|
+
export const inboundSchema = LoginToPosDeviceContent$inboundSchema;
|
|
213
|
+
/** @deprecated use `LoginToPosDeviceContent$outboundSchema` instead. */
|
|
214
|
+
export const outboundSchema = LoginToPosDeviceContent$outboundSchema;
|
|
215
|
+
/** @deprecated use `LoginToPosDeviceContent$Outbound` instead. */
|
|
216
|
+
export type Outbound = LoginToPosDeviceContent$Outbound;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export function loginToPosDeviceContentToJSON(
|
|
220
|
+
loginToPosDeviceContent: LoginToPosDeviceContent,
|
|
221
|
+
): string {
|
|
222
|
+
return JSON.stringify(
|
|
223
|
+
LoginToPosDeviceContent$outboundSchema.parse(loginToPosDeviceContent),
|
|
224
|
+
);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export function loginToPosDeviceContentFromJSON(
|
|
228
|
+
jsonString: string,
|
|
229
|
+
): SafeParseResult<LoginToPosDeviceContent, SDKValidationError> {
|
|
230
|
+
return safeParse(
|
|
231
|
+
jsonString,
|
|
232
|
+
(x) => LoginToPosDeviceContent$inboundSchema.parse(JSON.parse(x)),
|
|
233
|
+
`Failed to parse 'LoginToPosDeviceContent' from JSON`,
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/** @internal */
|
|
238
|
+
export const LoginToPosDeviceResponseBody$inboundSchema: z.ZodType<
|
|
239
|
+
LoginToPosDeviceResponseBody,
|
|
240
|
+
z.ZodTypeDef,
|
|
241
|
+
unknown
|
|
242
|
+
> = z.object({
|
|
243
|
+
message: z.string().optional(),
|
|
244
|
+
success: z.string().optional(),
|
|
245
|
+
content: z.lazy(() => LoginToPosDeviceContent$inboundSchema).optional(),
|
|
246
|
+
});
|
|
247
|
+
|
|
248
|
+
/** @internal */
|
|
249
|
+
export type LoginToPosDeviceResponseBody$Outbound = {
|
|
250
|
+
message?: string | undefined;
|
|
251
|
+
success?: string | undefined;
|
|
252
|
+
content?: LoginToPosDeviceContent$Outbound | undefined;
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
/** @internal */
|
|
256
|
+
export const LoginToPosDeviceResponseBody$outboundSchema: z.ZodType<
|
|
257
|
+
LoginToPosDeviceResponseBody$Outbound,
|
|
258
|
+
z.ZodTypeDef,
|
|
259
|
+
LoginToPosDeviceResponseBody
|
|
260
|
+
> = z.object({
|
|
261
|
+
message: z.string().optional(),
|
|
262
|
+
success: z.string().optional(),
|
|
263
|
+
content: z.lazy(() => LoginToPosDeviceContent$outboundSchema).optional(),
|
|
264
|
+
});
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* @internal
|
|
268
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
269
|
+
*/
|
|
270
|
+
export namespace LoginToPosDeviceResponseBody$ {
|
|
271
|
+
/** @deprecated use `LoginToPosDeviceResponseBody$inboundSchema` instead. */
|
|
272
|
+
export const inboundSchema = LoginToPosDeviceResponseBody$inboundSchema;
|
|
273
|
+
/** @deprecated use `LoginToPosDeviceResponseBody$outboundSchema` instead. */
|
|
274
|
+
export const outboundSchema = LoginToPosDeviceResponseBody$outboundSchema;
|
|
275
|
+
/** @deprecated use `LoginToPosDeviceResponseBody$Outbound` instead. */
|
|
276
|
+
export type Outbound = LoginToPosDeviceResponseBody$Outbound;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
export function loginToPosDeviceResponseBodyToJSON(
|
|
280
|
+
loginToPosDeviceResponseBody: LoginToPosDeviceResponseBody,
|
|
281
|
+
): string {
|
|
282
|
+
return JSON.stringify(
|
|
283
|
+
LoginToPosDeviceResponseBody$outboundSchema.parse(
|
|
284
|
+
loginToPosDeviceResponseBody,
|
|
285
|
+
),
|
|
286
|
+
);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
export function loginToPosDeviceResponseBodyFromJSON(
|
|
290
|
+
jsonString: string,
|
|
291
|
+
): SafeParseResult<LoginToPosDeviceResponseBody, SDKValidationError> {
|
|
292
|
+
return safeParse(
|
|
293
|
+
jsonString,
|
|
294
|
+
(x) => LoginToPosDeviceResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
295
|
+
`Failed to parse 'LoginToPosDeviceResponseBody' from JSON`,
|
|
296
|
+
);
|
|
297
|
+
}
|
|
@@ -0,0 +1,286 @@
|
|
|
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 { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type PairPosDeviceSecurity = {
|
|
12
|
+
xApiKey: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export type PairPosDeviceRequestBody = {
|
|
16
|
+
deviceId: string;
|
|
17
|
+
pin: number;
|
|
18
|
+
externalDeviceId: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export type PairPosDeviceContent = {
|
|
22
|
+
deviceToken?: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* OK
|
|
27
|
+
*/
|
|
28
|
+
export type PairPosDeviceResponseBody = {
|
|
29
|
+
message?: string | undefined;
|
|
30
|
+
success?: string | undefined;
|
|
31
|
+
content?: PairPosDeviceContent | undefined;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const PairPosDeviceSecurity$inboundSchema: z.ZodType<
|
|
36
|
+
PairPosDeviceSecurity,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
unknown
|
|
39
|
+
> = z.object({
|
|
40
|
+
"X-Api-Key": z.string(),
|
|
41
|
+
}).transform((v) => {
|
|
42
|
+
return remap$(v, {
|
|
43
|
+
"X-Api-Key": "xApiKey",
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export type PairPosDeviceSecurity$Outbound = {
|
|
49
|
+
"X-Api-Key": string;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
export const PairPosDeviceSecurity$outboundSchema: z.ZodType<
|
|
54
|
+
PairPosDeviceSecurity$Outbound,
|
|
55
|
+
z.ZodTypeDef,
|
|
56
|
+
PairPosDeviceSecurity
|
|
57
|
+
> = z.object({
|
|
58
|
+
xApiKey: z.string(),
|
|
59
|
+
}).transform((v) => {
|
|
60
|
+
return remap$(v, {
|
|
61
|
+
xApiKey: "X-Api-Key",
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @internal
|
|
67
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
68
|
+
*/
|
|
69
|
+
export namespace PairPosDeviceSecurity$ {
|
|
70
|
+
/** @deprecated use `PairPosDeviceSecurity$inboundSchema` instead. */
|
|
71
|
+
export const inboundSchema = PairPosDeviceSecurity$inboundSchema;
|
|
72
|
+
/** @deprecated use `PairPosDeviceSecurity$outboundSchema` instead. */
|
|
73
|
+
export const outboundSchema = PairPosDeviceSecurity$outboundSchema;
|
|
74
|
+
/** @deprecated use `PairPosDeviceSecurity$Outbound` instead. */
|
|
75
|
+
export type Outbound = PairPosDeviceSecurity$Outbound;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function pairPosDeviceSecurityToJSON(
|
|
79
|
+
pairPosDeviceSecurity: PairPosDeviceSecurity,
|
|
80
|
+
): string {
|
|
81
|
+
return JSON.stringify(
|
|
82
|
+
PairPosDeviceSecurity$outboundSchema.parse(pairPosDeviceSecurity),
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function pairPosDeviceSecurityFromJSON(
|
|
87
|
+
jsonString: string,
|
|
88
|
+
): SafeParseResult<PairPosDeviceSecurity, SDKValidationError> {
|
|
89
|
+
return safeParse(
|
|
90
|
+
jsonString,
|
|
91
|
+
(x) => PairPosDeviceSecurity$inboundSchema.parse(JSON.parse(x)),
|
|
92
|
+
`Failed to parse 'PairPosDeviceSecurity' from JSON`,
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** @internal */
|
|
97
|
+
export const PairPosDeviceRequestBody$inboundSchema: z.ZodType<
|
|
98
|
+
PairPosDeviceRequestBody,
|
|
99
|
+
z.ZodTypeDef,
|
|
100
|
+
unknown
|
|
101
|
+
> = z.object({
|
|
102
|
+
device_id: z.string(),
|
|
103
|
+
pin: z.number().int(),
|
|
104
|
+
external_device_id: z.string(),
|
|
105
|
+
}).transform((v) => {
|
|
106
|
+
return remap$(v, {
|
|
107
|
+
"device_id": "deviceId",
|
|
108
|
+
"external_device_id": "externalDeviceId",
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
/** @internal */
|
|
113
|
+
export type PairPosDeviceRequestBody$Outbound = {
|
|
114
|
+
device_id: string;
|
|
115
|
+
pin: number;
|
|
116
|
+
external_device_id: string;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
/** @internal */
|
|
120
|
+
export const PairPosDeviceRequestBody$outboundSchema: z.ZodType<
|
|
121
|
+
PairPosDeviceRequestBody$Outbound,
|
|
122
|
+
z.ZodTypeDef,
|
|
123
|
+
PairPosDeviceRequestBody
|
|
124
|
+
> = z.object({
|
|
125
|
+
deviceId: z.string(),
|
|
126
|
+
pin: z.number().int(),
|
|
127
|
+
externalDeviceId: z.string(),
|
|
128
|
+
}).transform((v) => {
|
|
129
|
+
return remap$(v, {
|
|
130
|
+
deviceId: "device_id",
|
|
131
|
+
externalDeviceId: "external_device_id",
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* @internal
|
|
137
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
138
|
+
*/
|
|
139
|
+
export namespace PairPosDeviceRequestBody$ {
|
|
140
|
+
/** @deprecated use `PairPosDeviceRequestBody$inboundSchema` instead. */
|
|
141
|
+
export const inboundSchema = PairPosDeviceRequestBody$inboundSchema;
|
|
142
|
+
/** @deprecated use `PairPosDeviceRequestBody$outboundSchema` instead. */
|
|
143
|
+
export const outboundSchema = PairPosDeviceRequestBody$outboundSchema;
|
|
144
|
+
/** @deprecated use `PairPosDeviceRequestBody$Outbound` instead. */
|
|
145
|
+
export type Outbound = PairPosDeviceRequestBody$Outbound;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export function pairPosDeviceRequestBodyToJSON(
|
|
149
|
+
pairPosDeviceRequestBody: PairPosDeviceRequestBody,
|
|
150
|
+
): string {
|
|
151
|
+
return JSON.stringify(
|
|
152
|
+
PairPosDeviceRequestBody$outboundSchema.parse(pairPosDeviceRequestBody),
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export function pairPosDeviceRequestBodyFromJSON(
|
|
157
|
+
jsonString: string,
|
|
158
|
+
): SafeParseResult<PairPosDeviceRequestBody, SDKValidationError> {
|
|
159
|
+
return safeParse(
|
|
160
|
+
jsonString,
|
|
161
|
+
(x) => PairPosDeviceRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
162
|
+
`Failed to parse 'PairPosDeviceRequestBody' from JSON`,
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/** @internal */
|
|
167
|
+
export const PairPosDeviceContent$inboundSchema: z.ZodType<
|
|
168
|
+
PairPosDeviceContent,
|
|
169
|
+
z.ZodTypeDef,
|
|
170
|
+
unknown
|
|
171
|
+
> = z.object({
|
|
172
|
+
device_token: z.string().optional(),
|
|
173
|
+
}).transform((v) => {
|
|
174
|
+
return remap$(v, {
|
|
175
|
+
"device_token": "deviceToken",
|
|
176
|
+
});
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
/** @internal */
|
|
180
|
+
export type PairPosDeviceContent$Outbound = {
|
|
181
|
+
device_token?: string | undefined;
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
/** @internal */
|
|
185
|
+
export const PairPosDeviceContent$outboundSchema: z.ZodType<
|
|
186
|
+
PairPosDeviceContent$Outbound,
|
|
187
|
+
z.ZodTypeDef,
|
|
188
|
+
PairPosDeviceContent
|
|
189
|
+
> = z.object({
|
|
190
|
+
deviceToken: z.string().optional(),
|
|
191
|
+
}).transform((v) => {
|
|
192
|
+
return remap$(v, {
|
|
193
|
+
deviceToken: "device_token",
|
|
194
|
+
});
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* @internal
|
|
199
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
200
|
+
*/
|
|
201
|
+
export namespace PairPosDeviceContent$ {
|
|
202
|
+
/** @deprecated use `PairPosDeviceContent$inboundSchema` instead. */
|
|
203
|
+
export const inboundSchema = PairPosDeviceContent$inboundSchema;
|
|
204
|
+
/** @deprecated use `PairPosDeviceContent$outboundSchema` instead. */
|
|
205
|
+
export const outboundSchema = PairPosDeviceContent$outboundSchema;
|
|
206
|
+
/** @deprecated use `PairPosDeviceContent$Outbound` instead. */
|
|
207
|
+
export type Outbound = PairPosDeviceContent$Outbound;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export function pairPosDeviceContentToJSON(
|
|
211
|
+
pairPosDeviceContent: PairPosDeviceContent,
|
|
212
|
+
): string {
|
|
213
|
+
return JSON.stringify(
|
|
214
|
+
PairPosDeviceContent$outboundSchema.parse(pairPosDeviceContent),
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export function pairPosDeviceContentFromJSON(
|
|
219
|
+
jsonString: string,
|
|
220
|
+
): SafeParseResult<PairPosDeviceContent, SDKValidationError> {
|
|
221
|
+
return safeParse(
|
|
222
|
+
jsonString,
|
|
223
|
+
(x) => PairPosDeviceContent$inboundSchema.parse(JSON.parse(x)),
|
|
224
|
+
`Failed to parse 'PairPosDeviceContent' from JSON`,
|
|
225
|
+
);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/** @internal */
|
|
229
|
+
export const PairPosDeviceResponseBody$inboundSchema: z.ZodType<
|
|
230
|
+
PairPosDeviceResponseBody,
|
|
231
|
+
z.ZodTypeDef,
|
|
232
|
+
unknown
|
|
233
|
+
> = z.object({
|
|
234
|
+
message: z.string().optional(),
|
|
235
|
+
success: z.string().optional(),
|
|
236
|
+
content: z.lazy(() => PairPosDeviceContent$inboundSchema).optional(),
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
/** @internal */
|
|
240
|
+
export type PairPosDeviceResponseBody$Outbound = {
|
|
241
|
+
message?: string | undefined;
|
|
242
|
+
success?: string | undefined;
|
|
243
|
+
content?: PairPosDeviceContent$Outbound | undefined;
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
/** @internal */
|
|
247
|
+
export const PairPosDeviceResponseBody$outboundSchema: z.ZodType<
|
|
248
|
+
PairPosDeviceResponseBody$Outbound,
|
|
249
|
+
z.ZodTypeDef,
|
|
250
|
+
PairPosDeviceResponseBody
|
|
251
|
+
> = z.object({
|
|
252
|
+
message: z.string().optional(),
|
|
253
|
+
success: z.string().optional(),
|
|
254
|
+
content: z.lazy(() => PairPosDeviceContent$outboundSchema).optional(),
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* @internal
|
|
259
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
260
|
+
*/
|
|
261
|
+
export namespace PairPosDeviceResponseBody$ {
|
|
262
|
+
/** @deprecated use `PairPosDeviceResponseBody$inboundSchema` instead. */
|
|
263
|
+
export const inboundSchema = PairPosDeviceResponseBody$inboundSchema;
|
|
264
|
+
/** @deprecated use `PairPosDeviceResponseBody$outboundSchema` instead. */
|
|
265
|
+
export const outboundSchema = PairPosDeviceResponseBody$outboundSchema;
|
|
266
|
+
/** @deprecated use `PairPosDeviceResponseBody$Outbound` instead. */
|
|
267
|
+
export type Outbound = PairPosDeviceResponseBody$Outbound;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export function pairPosDeviceResponseBodyToJSON(
|
|
271
|
+
pairPosDeviceResponseBody: PairPosDeviceResponseBody,
|
|
272
|
+
): string {
|
|
273
|
+
return JSON.stringify(
|
|
274
|
+
PairPosDeviceResponseBody$outboundSchema.parse(pairPosDeviceResponseBody),
|
|
275
|
+
);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export function pairPosDeviceResponseBodyFromJSON(
|
|
279
|
+
jsonString: string,
|
|
280
|
+
): SafeParseResult<PairPosDeviceResponseBody, SDKValidationError> {
|
|
281
|
+
return safeParse(
|
|
282
|
+
jsonString,
|
|
283
|
+
(x) => PairPosDeviceResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
284
|
+
`Failed to parse 'PairPosDeviceResponseBody' from JSON`,
|
|
285
|
+
);
|
|
286
|
+
}
|