@juanito_boop/w-sdk 0.1.0

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.
@@ -0,0 +1,1428 @@
1
+ import * as zod_v4_core from 'zod/v4/core';
2
+ import * as zod from 'zod';
3
+ import { z } from 'zod';
4
+
5
+ declare const ClientOptionsDef: {
6
+ schema: z.ZodObject<{
7
+ baseUrl: z.ZodURL;
8
+ apiKey: z.ZodOptional<z.ZodString>;
9
+ }, z.core.$strip>;
10
+ type: {
11
+ baseUrl: string;
12
+ apiKey?: string | undefined;
13
+ };
14
+ };
15
+ type ClientOptions = typeof ClientOptionsDef.type;
16
+ type Result<T, E = ApiError> = {
17
+ success: true;
18
+ data: T;
19
+ } | {
20
+ success: false;
21
+ error: E;
22
+ };
23
+ declare const ApiErrorDef: {
24
+ schema: z.ZodObject<{
25
+ message: z.ZodString;
26
+ code: z.ZodOptional<z.ZodString>;
27
+ statusCode: z.ZodOptional<z.ZodNumber>;
28
+ details: z.ZodOptional<z.ZodUnknown>;
29
+ }, z.core.$strip>;
30
+ type: {
31
+ message: string;
32
+ code?: string | undefined;
33
+ statusCode?: number | undefined;
34
+ details?: unknown;
35
+ };
36
+ };
37
+ type ApiError = typeof ApiErrorDef.type;
38
+ declare const LoginDataDef: {
39
+ schema: z.ZodObject<{
40
+ email: z.ZodEmail;
41
+ password: z.ZodString;
42
+ }, z.core.$strip>;
43
+ type: {
44
+ email: string;
45
+ password: string;
46
+ };
47
+ };
48
+ type LoginData = typeof LoginDataDef.type;
49
+ declare const RegisterDataDef: {
50
+ schema: z.ZodObject<{
51
+ email: z.ZodEmail;
52
+ password: z.ZodString;
53
+ fullName: z.ZodOptional<z.ZodString>;
54
+ }, z.core.$strip>;
55
+ type: {
56
+ email: string;
57
+ password: string;
58
+ fullName?: string | undefined;
59
+ };
60
+ };
61
+ type RegisterData = typeof RegisterDataDef.type;
62
+ declare const LogoutDataDef: {
63
+ schema: z.ZodObject<{
64
+ token: z.ZodString;
65
+ logoutAll: z.ZodOptional<z.ZodBoolean>;
66
+ }, z.core.$strip>;
67
+ type: {
68
+ token: string;
69
+ logoutAll?: boolean | undefined;
70
+ };
71
+ };
72
+ type LogoutData = typeof LogoutDataDef.type;
73
+ declare const MagicLinkRequestDataDef: {
74
+ schema: z.ZodObject<{
75
+ email: z.ZodEmail;
76
+ redirectUrl: z.ZodOptional<z.ZodURL>;
77
+ }, z.core.$strip>;
78
+ type: {
79
+ email: string;
80
+ redirectUrl?: string | undefined;
81
+ };
82
+ };
83
+ type MagicLinkRequestData = typeof MagicLinkRequestDataDef.type;
84
+ declare const AuthResponseDef: {
85
+ schema: z.ZodObject<{
86
+ token: z.ZodString;
87
+ user: z.ZodObject<{
88
+ id: z.ZodUUID;
89
+ email: z.ZodEmail;
90
+ fullName: z.ZodOptional<z.ZodString>;
91
+ }, z.core.$strip>;
92
+ apiKey: z.ZodOptional<z.ZodObject<{
93
+ id: z.ZodUUID;
94
+ key: z.ZodString;
95
+ name: z.ZodString;
96
+ expiresAt: z.ZodISODateTime;
97
+ }, z.core.$strip>>;
98
+ }, z.core.$strip>;
99
+ type: {
100
+ token: string;
101
+ user: {
102
+ id: string;
103
+ email: string;
104
+ fullName?: string | undefined;
105
+ };
106
+ apiKey?: {
107
+ id: string;
108
+ key: string;
109
+ name: string;
110
+ expiresAt: string;
111
+ } | undefined;
112
+ };
113
+ };
114
+ type AuthResponse = typeof AuthResponseDef.type;
115
+ declare const ApiKeyDef: {
116
+ schema: z.ZodObject<{
117
+ id: z.ZodUUID;
118
+ key: z.ZodString;
119
+ name: z.ZodString;
120
+ expiresAt: z.ZodOptional<z.ZodISODateTime>;
121
+ createdAt: z.ZodISODateTime;
122
+ }, z.core.$strip>;
123
+ type: {
124
+ id: string;
125
+ key: string;
126
+ name: string;
127
+ createdAt: string;
128
+ expiresAt?: string | undefined;
129
+ };
130
+ };
131
+ type ApiKey = typeof ApiKeyDef.type;
132
+ declare const MagicLinkResponseDef: {
133
+ schema: z.ZodObject<{
134
+ success: z.ZodBoolean;
135
+ message: z.ZodString;
136
+ email: z.ZodEmail;
137
+ }, z.core.$strip>;
138
+ type: {
139
+ success: boolean;
140
+ message: string;
141
+ email: string;
142
+ };
143
+ };
144
+ type MagicLinkResponse = typeof MagicLinkResponseDef.type;
145
+ declare const CreateApiKeyDef: z.ZodObject<{
146
+ userId: z.ZodUUID;
147
+ name: z.ZodString;
148
+ expiresAt: z.ZodOptional<z.ZodISODateTime>;
149
+ expiresIn: z.ZodOptional<z.ZodNumber>;
150
+ }, z.core.$strip>;
151
+ type CreateApiKey = z.infer<typeof CreateApiKeyDef>;
152
+ declare const RollbackApiKeyDataDef: z.ZodObject<{
153
+ keyId: z.ZodUUID;
154
+ fromActivityId: z.ZodOptional<z.ZodUUID>;
155
+ fromTimestamp: z.ZodOptional<z.ZodISODateTime>;
156
+ initiatedBy: z.ZodOptional<z.ZodString>;
157
+ }, z.core.$strip>;
158
+ type RollbackApiKeyData = z.infer<typeof RollbackApiKeyDataDef>;
159
+ declare const SessionDataDef: {
160
+ schema: z.ZodObject<{
161
+ id: z.ZodUUID;
162
+ userId: z.ZodUUID;
163
+ token: z.ZodString;
164
+ ipAddress: z.ZodNullable<z.ZodString>;
165
+ userAgent: z.ZodNullable<z.ZodString>;
166
+ isActive: z.ZodBoolean;
167
+ lastActivityAt: z.ZodISODateTime;
168
+ createdAt: z.ZodISODateTime;
169
+ expiresAt: z.ZodNullable<z.ZodISODateTime>;
170
+ }, z.core.$strip>;
171
+ type: {
172
+ id: string;
173
+ userId: string;
174
+ token: string;
175
+ ipAddress: string | null;
176
+ userAgent: string | null;
177
+ isActive: boolean;
178
+ lastActivityAt: string;
179
+ createdAt: string;
180
+ expiresAt: string | null;
181
+ };
182
+ };
183
+ type SessionData = typeof SessionDataDef.type;
184
+ declare const ValidateSessionResponseDef: {
185
+ schema: z.ZodObject<{
186
+ valid: z.ZodBoolean;
187
+ userId: z.ZodOptional<z.ZodUUID>;
188
+ sessionId: z.ZodOptional<z.ZodUUID>;
189
+ }, z.core.$strip>;
190
+ type: {
191
+ valid: boolean;
192
+ userId?: string | undefined;
193
+ sessionId?: string | undefined;
194
+ };
195
+ };
196
+ type ValidateSessionResponse = typeof ValidateSessionResponseDef.type;
197
+ declare const ActivityLogDef: {
198
+ schema: z.ZodObject<{
199
+ id: z.ZodUUID;
200
+ userId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
201
+ apiKeyId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
202
+ action: z.ZodString;
203
+ ipAddress: z.ZodNullable<z.ZodString>;
204
+ userAgent: z.ZodNullable<z.ZodString>;
205
+ location: z.ZodNullable<z.ZodString>;
206
+ metadata: z.ZodNullable<z.ZodString>;
207
+ beforeState: z.ZodNullable<z.ZodString>;
208
+ afterState: z.ZodNullable<z.ZodString>;
209
+ tableName: z.ZodNullable<z.ZodString>;
210
+ recordId: z.ZodNullable<z.ZodUUID>;
211
+ timestamp: z.ZodISODateTime;
212
+ }, z.core.$strip>;
213
+ type: {
214
+ id: string;
215
+ action: string;
216
+ ipAddress: string | null;
217
+ userAgent: string | null;
218
+ location: string | null;
219
+ metadata: string | null;
220
+ beforeState: string | null;
221
+ afterState: string | null;
222
+ tableName: string | null;
223
+ recordId: string | null;
224
+ timestamp: string;
225
+ userId?: string | null | undefined;
226
+ apiKeyId?: string | null | undefined;
227
+ };
228
+ };
229
+ type ActivityLog = typeof ActivityLogDef.type;
230
+ declare const RollbackLogDef: {
231
+ schema: z.ZodObject<{
232
+ id: z.ZodUUID;
233
+ apiKeyId: z.ZodUUID;
234
+ initiatedBy: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
235
+ status: z.ZodString;
236
+ changesReverted: z.ZodString;
237
+ errorMessage: z.ZodNullable<z.ZodString>;
238
+ createdAt: z.ZodISODateTime;
239
+ completedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
240
+ }, z.core.$strip>;
241
+ type: {
242
+ id: string;
243
+ apiKeyId: string;
244
+ status: string;
245
+ changesReverted: string;
246
+ errorMessage: string | null;
247
+ createdAt: string;
248
+ initiatedBy?: string | null | undefined;
249
+ completedAt?: string | null | undefined;
250
+ };
251
+ };
252
+ type RollbackLog = typeof RollbackLogDef.type;
253
+ declare const RealtimeOptionsDef: {
254
+ schema: z.ZodObject<{
255
+ baseUrl: z.ZodURL;
256
+ apiKey: z.ZodOptional<z.ZodString>;
257
+ }, z.core.$strip>;
258
+ type: {
259
+ baseUrl: string;
260
+ apiKey?: string | undefined;
261
+ };
262
+ };
263
+ type RealtimeOptions = typeof RealtimeOptionsDef.type;
264
+ declare const WineDataDef: {
265
+ schema: z.ZodObject<{
266
+ id: z.ZodOptional<z.ZodUUID>;
267
+ }, z.core.$strict>;
268
+ type: {
269
+ id?: string | undefined;
270
+ };
271
+ };
272
+ type WineData = typeof WineDataDef.type;
273
+ declare const WineDetailsDef: {
274
+ schema: z.ZodObject<{
275
+ id_detalle: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
276
+ id_vino: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
277
+ notas_cata: z.ZodOptional<z.ZodNullable<z.ZodString>>;
278
+ tipo_crianza: z.ZodOptional<z.ZodNullable<z.ZodString>>;
279
+ bodega: z.ZodOptional<z.ZodNullable<z.ZodString>>;
280
+ }, z.core.$strip>;
281
+ type: {
282
+ id_detalle?: string | null | undefined;
283
+ id_vino?: string | null | undefined;
284
+ notas_cata?: string | null | undefined;
285
+ tipo_crianza?: string | null | undefined;
286
+ bodega?: string | null | undefined;
287
+ };
288
+ };
289
+ type WineDetails = typeof WineDetailsDef.type;
290
+ declare const WineDef: {
291
+ schema: z.ZodObject<{
292
+ id_vino: z.ZodUUID;
293
+ nombre: z.ZodString;
294
+ precio: z.ZodNumber;
295
+ url_imagen: z.ZodString;
296
+ imgbb_delete_url: z.ZodOptional<z.ZodString>;
297
+ image_hash: z.ZodOptional<z.ZodString>;
298
+ descripcion: z.ZodString;
299
+ nivel_alcohol: z.ZodNumber;
300
+ variedades: z.ZodArray<z.ZodString>;
301
+ pais_importacion: z.ZodString;
302
+ color_vino: z.ZodString;
303
+ stock: z.ZodNumber;
304
+ capacidad: z.ZodNumber;
305
+ wine_details: z.ZodOptional<z.ZodNullable<z.ZodObject<{
306
+ id_detalle: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
307
+ id_vino: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
308
+ notas_cata: z.ZodOptional<z.ZodNullable<z.ZodString>>;
309
+ tipo_crianza: z.ZodOptional<z.ZodNullable<z.ZodString>>;
310
+ bodega: z.ZodOptional<z.ZodNullable<z.ZodString>>;
311
+ }, z.core.$strip>>>;
312
+ }, z.core.$strip>;
313
+ type: {
314
+ id_vino: string;
315
+ nombre: string;
316
+ precio: number;
317
+ url_imagen: string;
318
+ descripcion: string;
319
+ nivel_alcohol: number;
320
+ variedades: string[];
321
+ pais_importacion: string;
322
+ color_vino: string;
323
+ stock: number;
324
+ capacidad: number;
325
+ imgbb_delete_url?: string | undefined;
326
+ image_hash?: string | undefined;
327
+ wine_details?: {
328
+ id_detalle?: string | null | undefined;
329
+ id_vino?: string | null | undefined;
330
+ notas_cata?: string | null | undefined;
331
+ tipo_crianza?: string | null | undefined;
332
+ bodega?: string | null | undefined;
333
+ } | null | undefined;
334
+ };
335
+ };
336
+ type Wine = typeof WineDef.type;
337
+ declare const EditWineDef: {
338
+ schema: z.ZodObject<{
339
+ nombre: z.ZodOptional<z.ZodString>;
340
+ precio: z.ZodOptional<z.ZodNumber>;
341
+ url_imagen: z.ZodOptional<z.ZodString>;
342
+ imgbb_delete_url: z.ZodOptional<z.ZodOptional<z.ZodString>>;
343
+ image_hash: z.ZodOptional<z.ZodOptional<z.ZodString>>;
344
+ descripcion: z.ZodOptional<z.ZodString>;
345
+ nivel_alcohol: z.ZodOptional<z.ZodNumber>;
346
+ variedades: z.ZodOptional<z.ZodArray<z.ZodString>>;
347
+ pais_importacion: z.ZodOptional<z.ZodString>;
348
+ color_vino: z.ZodOptional<z.ZodString>;
349
+ stock: z.ZodOptional<z.ZodNumber>;
350
+ capacidad: z.ZodOptional<z.ZodNumber>;
351
+ id_vino: z.ZodUUID;
352
+ wine_details: z.ZodOptional<z.ZodObject<{
353
+ id_detalle: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodUUID>>>;
354
+ id_vino: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodUUID>>>;
355
+ notas_cata: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
356
+ tipo_crianza: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
357
+ bodega: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
358
+ }, z.core.$strip>>;
359
+ image_file: z.ZodOptional<z.ZodObject<{
360
+ filename: z.ZodString;
361
+ mime: z.ZodString;
362
+ buffer: z.ZodUnion<readonly [z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodArray<z.ZodNumber>, z.ZodObject<{
363
+ type: z.ZodLiteral<"Buffer">;
364
+ data: z.ZodArray<z.ZodNumber>;
365
+ }, z.core.$strip>]>;
366
+ name: z.ZodOptional<z.ZodString>;
367
+ expiration: z.ZodOptional<z.ZodNumber>;
368
+ }, z.core.$strip>>;
369
+ }, z.core.$strict>;
370
+ type: {
371
+ id_vino: string;
372
+ nombre?: string | undefined;
373
+ precio?: number | undefined;
374
+ url_imagen?: string | undefined;
375
+ imgbb_delete_url?: string | undefined;
376
+ image_hash?: string | undefined;
377
+ descripcion?: string | undefined;
378
+ nivel_alcohol?: number | undefined;
379
+ variedades?: string[] | undefined;
380
+ pais_importacion?: string | undefined;
381
+ color_vino?: string | undefined;
382
+ stock?: number | undefined;
383
+ capacidad?: number | undefined;
384
+ wine_details?: {
385
+ id_detalle?: string | null | undefined;
386
+ id_vino?: string | null | undefined;
387
+ notas_cata?: string | null | undefined;
388
+ tipo_crianza?: string | null | undefined;
389
+ bodega?: string | null | undefined;
390
+ } | undefined;
391
+ image_file?: {
392
+ filename: string;
393
+ mime: string;
394
+ buffer: Uint8Array<ArrayBuffer> | number[] | {
395
+ type: "Buffer";
396
+ data: number[];
397
+ };
398
+ name?: string | undefined;
399
+ expiration?: number | undefined;
400
+ } | undefined;
401
+ };
402
+ };
403
+ type EditWine = typeof EditWineDef.type;
404
+ declare const CreateWineDef: {
405
+ schema: z.ZodObject<{
406
+ nombre: z.ZodString;
407
+ precio: z.ZodNumber;
408
+ url_imagen: z.ZodOptional<z.ZodString>;
409
+ imgbb_delete_url: z.ZodOptional<z.ZodString>;
410
+ image_hash: z.ZodOptional<z.ZodString>;
411
+ descripcion: z.ZodOptional<z.ZodString>;
412
+ nivel_alcohol: z.ZodDefault<z.ZodNumber>;
413
+ variedades: z.ZodOptional<z.ZodArray<z.ZodString>>;
414
+ pais_importacion: z.ZodOptional<z.ZodString>;
415
+ color_vino: z.ZodOptional<z.ZodString>;
416
+ stock: z.ZodDefault<z.ZodNumber>;
417
+ capacidad: z.ZodDefault<z.ZodNumber>;
418
+ notas_cata: z.ZodOptional<z.ZodString>;
419
+ tipo_crianza: z.ZodOptional<z.ZodString>;
420
+ bodega: z.ZodOptional<z.ZodString>;
421
+ image_file: z.ZodOptional<z.ZodObject<{
422
+ filename: z.ZodString;
423
+ mime: z.ZodString;
424
+ buffer: z.ZodUnion<readonly [z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodArray<z.ZodNumber>, z.ZodObject<{
425
+ type: z.ZodLiteral<"Buffer">;
426
+ data: z.ZodArray<z.ZodNumber>;
427
+ }, z.core.$strip>]>;
428
+ name: z.ZodOptional<z.ZodString>;
429
+ expiration: z.ZodOptional<z.ZodNumber>;
430
+ }, z.core.$strip>>;
431
+ }, z.core.$strip>;
432
+ type: {
433
+ nombre: string;
434
+ precio: number;
435
+ nivel_alcohol: number;
436
+ stock: number;
437
+ capacidad: number;
438
+ url_imagen?: string | undefined;
439
+ imgbb_delete_url?: string | undefined;
440
+ image_hash?: string | undefined;
441
+ descripcion?: string | undefined;
442
+ variedades?: string[] | undefined;
443
+ pais_importacion?: string | undefined;
444
+ color_vino?: string | undefined;
445
+ notas_cata?: string | undefined;
446
+ tipo_crianza?: string | undefined;
447
+ bodega?: string | undefined;
448
+ image_file?: {
449
+ filename: string;
450
+ mime: string;
451
+ buffer: Uint8Array<ArrayBuffer> | number[] | {
452
+ type: "Buffer";
453
+ data: number[];
454
+ };
455
+ name?: string | undefined;
456
+ expiration?: number | undefined;
457
+ } | undefined;
458
+ };
459
+ };
460
+ type CreateWine = typeof CreateWineDef.type;
461
+ declare const BulkInsertWinesDef: {
462
+ schema: z.ZodArray<z.ZodObject<{
463
+ nombre: z.ZodString;
464
+ precio: z.ZodNumber;
465
+ url_imagen: z.ZodOptional<z.ZodString>;
466
+ imgbb_delete_url: z.ZodOptional<z.ZodString>;
467
+ image_hash: z.ZodOptional<z.ZodString>;
468
+ descripcion: z.ZodOptional<z.ZodString>;
469
+ nivel_alcohol: z.ZodDefault<z.ZodNumber>;
470
+ variedades: z.ZodOptional<z.ZodArray<z.ZodString>>;
471
+ pais_importacion: z.ZodOptional<z.ZodString>;
472
+ color_vino: z.ZodOptional<z.ZodString>;
473
+ stock: z.ZodDefault<z.ZodNumber>;
474
+ capacidad: z.ZodDefault<z.ZodNumber>;
475
+ notas_cata: z.ZodOptional<z.ZodString>;
476
+ tipo_crianza: z.ZodOptional<z.ZodString>;
477
+ bodega: z.ZodOptional<z.ZodString>;
478
+ image_file: z.ZodOptional<z.ZodObject<{
479
+ filename: z.ZodString;
480
+ mime: z.ZodString;
481
+ buffer: z.ZodUnion<readonly [z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodArray<z.ZodNumber>, z.ZodObject<{
482
+ type: z.ZodLiteral<"Buffer">;
483
+ data: z.ZodArray<z.ZodNumber>;
484
+ }, z.core.$strip>]>;
485
+ name: z.ZodOptional<z.ZodString>;
486
+ expiration: z.ZodOptional<z.ZodNumber>;
487
+ }, z.core.$strip>>;
488
+ }, z.core.$strip>>;
489
+ type: {
490
+ nombre: string;
491
+ precio: number;
492
+ nivel_alcohol: number;
493
+ stock: number;
494
+ capacidad: number;
495
+ url_imagen?: string | undefined;
496
+ imgbb_delete_url?: string | undefined;
497
+ image_hash?: string | undefined;
498
+ descripcion?: string | undefined;
499
+ variedades?: string[] | undefined;
500
+ pais_importacion?: string | undefined;
501
+ color_vino?: string | undefined;
502
+ notas_cata?: string | undefined;
503
+ tipo_crianza?: string | undefined;
504
+ bodega?: string | undefined;
505
+ image_file?: {
506
+ filename: string;
507
+ mime: string;
508
+ buffer: Uint8Array<ArrayBuffer> | number[] | {
509
+ type: "Buffer";
510
+ data: number[];
511
+ };
512
+ name?: string | undefined;
513
+ expiration?: number | undefined;
514
+ } | undefined;
515
+ }[];
516
+ };
517
+ type BulkInsertWines = typeof BulkInsertWinesDef.type;
518
+ declare const BulkInsertWinesResultDef: {
519
+ schema: z.ZodObject<{
520
+ total: z.ZodNumber;
521
+ successful: z.ZodNumber;
522
+ failed: z.ZodNumber;
523
+ results: z.ZodArray<z.ZodObject<{
524
+ insertado_id: z.ZodNullable<z.ZodString>;
525
+ error: z.ZodNullable<z.ZodString>;
526
+ }, z.core.$strip>>;
527
+ }, z.core.$strip>;
528
+ type: {
529
+ total: number;
530
+ successful: number;
531
+ failed: number;
532
+ results: {
533
+ insertado_id: string | null;
534
+ error: string | null;
535
+ }[];
536
+ };
537
+ };
538
+ type BulkInsertWinesResult = typeof BulkInsertWinesResultDef.type;
539
+ declare const ReusedWineImageDef: {
540
+ schema: z.ZodObject<{
541
+ url: z.ZodString;
542
+ delete_url: z.ZodString;
543
+ }, z.core.$strip>;
544
+ type: {
545
+ url: string;
546
+ delete_url: string;
547
+ };
548
+ };
549
+ type ReusedWineImage = typeof ReusedWineImageDef.type;
550
+ declare const ImgbbAssetDef: {
551
+ schema: z.ZodObject<{
552
+ filename: z.ZodString;
553
+ name: z.ZodString;
554
+ mime: z.ZodString;
555
+ extension: z.ZodString;
556
+ url: z.ZodString;
557
+ }, z.core.$strip>;
558
+ type: {
559
+ filename: string;
560
+ name: string;
561
+ mime: string;
562
+ extension: string;
563
+ url: string;
564
+ };
565
+ };
566
+ type ImgbbAsset = typeof ImgbbAssetDef.type;
567
+ declare const ImgbbUploadDataDef: {
568
+ schema: z.ZodObject<{
569
+ id: z.ZodString;
570
+ title: z.ZodString;
571
+ url_viewer: z.ZodString;
572
+ url: z.ZodString;
573
+ display_url: z.ZodString;
574
+ width: z.ZodString;
575
+ height: z.ZodString;
576
+ size: z.ZodString;
577
+ time: z.ZodString;
578
+ expiration: z.ZodString;
579
+ image: z.ZodObject<{
580
+ filename: z.ZodString;
581
+ name: z.ZodString;
582
+ mime: z.ZodString;
583
+ extension: z.ZodString;
584
+ url: z.ZodString;
585
+ }, z.core.$strip>;
586
+ thumb: z.ZodObject<{
587
+ filename: z.ZodString;
588
+ name: z.ZodString;
589
+ mime: z.ZodString;
590
+ extension: z.ZodString;
591
+ url: z.ZodString;
592
+ }, z.core.$strip>;
593
+ medium: z.ZodObject<{
594
+ filename: z.ZodString;
595
+ name: z.ZodString;
596
+ mime: z.ZodString;
597
+ extension: z.ZodString;
598
+ url: z.ZodString;
599
+ }, z.core.$strip>;
600
+ delete_url: z.ZodString;
601
+ }, z.core.$strip>;
602
+ type: {
603
+ id: string;
604
+ title: string;
605
+ url_viewer: string;
606
+ url: string;
607
+ display_url: string;
608
+ width: string;
609
+ height: string;
610
+ size: string;
611
+ time: string;
612
+ expiration: string;
613
+ image: {
614
+ filename: string;
615
+ name: string;
616
+ mime: string;
617
+ extension: string;
618
+ url: string;
619
+ };
620
+ thumb: {
621
+ filename: string;
622
+ name: string;
623
+ mime: string;
624
+ extension: string;
625
+ url: string;
626
+ };
627
+ medium: {
628
+ filename: string;
629
+ name: string;
630
+ mime: string;
631
+ extension: string;
632
+ url: string;
633
+ };
634
+ delete_url: string;
635
+ };
636
+ };
637
+ type ImgbbUploadData = typeof ImgbbUploadDataDef.type;
638
+ declare const InsertWineResultDef: {
639
+ schema: z.ZodObject<{
640
+ insertado_id: z.ZodNullable<z.ZodString>;
641
+ error: z.ZodNullable<z.ZodString>;
642
+ image: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
643
+ id: z.ZodString;
644
+ title: z.ZodString;
645
+ url_viewer: z.ZodString;
646
+ url: z.ZodString;
647
+ display_url: z.ZodString;
648
+ width: z.ZodString;
649
+ height: z.ZodString;
650
+ size: z.ZodString;
651
+ time: z.ZodString;
652
+ expiration: z.ZodString;
653
+ image: z.ZodObject<{
654
+ filename: z.ZodString;
655
+ name: z.ZodString;
656
+ mime: z.ZodString;
657
+ extension: z.ZodString;
658
+ url: z.ZodString;
659
+ }, z.core.$strip>;
660
+ thumb: z.ZodObject<{
661
+ filename: z.ZodString;
662
+ name: z.ZodString;
663
+ mime: z.ZodString;
664
+ extension: z.ZodString;
665
+ url: z.ZodString;
666
+ }, z.core.$strip>;
667
+ medium: z.ZodObject<{
668
+ filename: z.ZodString;
669
+ name: z.ZodString;
670
+ mime: z.ZodString;
671
+ extension: z.ZodString;
672
+ url: z.ZodString;
673
+ }, z.core.$strip>;
674
+ delete_url: z.ZodString;
675
+ }, z.core.$strip>, z.ZodObject<{
676
+ url: z.ZodString;
677
+ delete_url: z.ZodString;
678
+ }, z.core.$strip>]>>;
679
+ deduplicated: z.ZodOptional<z.ZodBoolean>;
680
+ }, z.core.$strip>;
681
+ type: {
682
+ insertado_id: string | null;
683
+ error: string | null;
684
+ image?: {
685
+ url: string;
686
+ delete_url: string;
687
+ } | {
688
+ id: string;
689
+ title: string;
690
+ url_viewer: string;
691
+ url: string;
692
+ display_url: string;
693
+ width: string;
694
+ height: string;
695
+ size: string;
696
+ time: string;
697
+ expiration: string;
698
+ image: {
699
+ filename: string;
700
+ name: string;
701
+ mime: string;
702
+ extension: string;
703
+ url: string;
704
+ };
705
+ thumb: {
706
+ filename: string;
707
+ name: string;
708
+ mime: string;
709
+ extension: string;
710
+ url: string;
711
+ };
712
+ medium: {
713
+ filename: string;
714
+ name: string;
715
+ mime: string;
716
+ extension: string;
717
+ url: string;
718
+ };
719
+ delete_url: string;
720
+ } | undefined;
721
+ deduplicated?: boolean | undefined;
722
+ };
723
+ };
724
+ type InsertWineResult = typeof InsertWineResultDef.type;
725
+
726
+ declare class WineClient {
727
+ readonly auth: {
728
+ register: (data: RegisterData) => Promise<Result<{
729
+ token: string;
730
+ user: {
731
+ id: string;
732
+ email: string;
733
+ fullName?: string | undefined;
734
+ };
735
+ apiKey?: {
736
+ id: string;
737
+ key: string;
738
+ name: string;
739
+ expiresAt: string;
740
+ } | undefined;
741
+ }>>;
742
+ login: (data: LoginData) => Promise<Result<{
743
+ token: string;
744
+ user: {
745
+ id: string;
746
+ email: string;
747
+ fullName?: string | undefined;
748
+ };
749
+ apiKey?: {
750
+ id: string;
751
+ key: string;
752
+ name: string;
753
+ expiresAt: string;
754
+ } | undefined;
755
+ }>>;
756
+ logout: (data: LogoutData) => Promise<Result<unknown>>;
757
+ requestMagicLink: (data: MagicLinkRequestData) => Promise<Result<{
758
+ success: boolean;
759
+ message: string;
760
+ email: string;
761
+ }>>;
762
+ verifyMagicLink: (token: string) => Promise<Result<{
763
+ token: string;
764
+ user: {
765
+ id: string;
766
+ email: string;
767
+ fullName?: string | undefined;
768
+ };
769
+ apiKey?: {
770
+ id: string;
771
+ key: string;
772
+ name: string;
773
+ expiresAt: string;
774
+ } | undefined;
775
+ }>>;
776
+ createApiKey: (data: CreateApiKey) => Promise<Result<{
777
+ id: string;
778
+ key: string;
779
+ name: string;
780
+ createdAt: string;
781
+ expiresAt?: string | undefined;
782
+ }>>;
783
+ listApiKeys: (userId: string) => Promise<Result<{
784
+ id: string;
785
+ key: string;
786
+ name: string;
787
+ createdAt: string;
788
+ expiresAt?: string | undefined;
789
+ }[]>>;
790
+ revokeApiKey: (userId: string, keyId: string) => Promise<Result<{
791
+ success: boolean;
792
+ }>>;
793
+ validateSession: (token: string) => Promise<Result<{
794
+ valid: boolean;
795
+ userId?: string | undefined;
796
+ sessionId?: string | undefined;
797
+ }>>;
798
+ rollbackApiKey: (data: RollbackApiKeyData) => Promise<Result<{
799
+ success: boolean;
800
+ message: string;
801
+ changesReverted: number;
802
+ errors: string[];
803
+ rollbackSince?: string | undefined;
804
+ }>>;
805
+ verifyMagicLinkWithQuery: (token: string) => Promise<Result<{
806
+ token: string;
807
+ user: {
808
+ id: string;
809
+ email: string;
810
+ fullName?: string | undefined;
811
+ };
812
+ apiKey?: {
813
+ id: string;
814
+ key: string;
815
+ name: string;
816
+ expiresAt: string;
817
+ } | undefined;
818
+ }>>;
819
+ getSessions: (userId: string) => Promise<Result<{
820
+ id: string;
821
+ userId: string;
822
+ token: string;
823
+ ipAddress: string | null;
824
+ userAgent: string | null;
825
+ isActive: boolean;
826
+ lastActivityAt: string;
827
+ createdAt: string;
828
+ expiresAt: string | null;
829
+ }[]>>;
830
+ getLogs: () => Promise<Result<{
831
+ id: string;
832
+ action: string;
833
+ ipAddress: string | null;
834
+ userAgent: string | null;
835
+ location: string | null;
836
+ metadata: string | null;
837
+ beforeState: string | null;
838
+ afterState: string | null;
839
+ tableName: string | null;
840
+ recordId: string | null;
841
+ timestamp: string;
842
+ userId?: string | null | undefined;
843
+ apiKeyId?: string | null | undefined;
844
+ }[]>>;
845
+ getUserLogs: (userId: string) => Promise<Result<{
846
+ id: string;
847
+ action: string;
848
+ ipAddress: string | null;
849
+ userAgent: string | null;
850
+ location: string | null;
851
+ metadata: string | null;
852
+ beforeState: string | null;
853
+ afterState: string | null;
854
+ tableName: string | null;
855
+ recordId: string | null;
856
+ timestamp: string;
857
+ userId?: string | null | undefined;
858
+ apiKeyId?: string | null | undefined;
859
+ }[]>>;
860
+ getRollbackHistory: (keyId?: string, limit?: number) => Promise<Result<{
861
+ id: string;
862
+ apiKeyId: string;
863
+ status: string;
864
+ changesReverted: string;
865
+ errorMessage: string | null;
866
+ createdAt: string;
867
+ initiatedBy?: string | null | undefined;
868
+ completedAt?: string | null | undefined;
869
+ }[]>>;
870
+ };
871
+ readonly realtime: {
872
+ connect: () => Promise<void>;
873
+ disconnect: () => void;
874
+ setApiKey: (key?: string) => void;
875
+ getWines: () => Promise<Result<{
876
+ id_vino: string;
877
+ nombre: string;
878
+ precio: number;
879
+ url_imagen: string;
880
+ descripcion: string;
881
+ nivel_alcohol: number;
882
+ variedades: string[];
883
+ pais_importacion: string;
884
+ color_vino: string;
885
+ stock: number;
886
+ capacidad: number;
887
+ imgbb_delete_url?: string | undefined;
888
+ image_hash?: string | undefined;
889
+ wine_details?: {
890
+ id_detalle?: string | null | undefined;
891
+ id_vino?: string | null | undefined;
892
+ notas_cata?: string | null | undefined;
893
+ tipo_crianza?: string | null | undefined;
894
+ bodega?: string | null | undefined;
895
+ } | null | undefined;
896
+ }[]>>;
897
+ getWinesPage: (page?: number, perPage?: number) => Promise<Result<{
898
+ data?: Wine[];
899
+ items?: Wine[];
900
+ rows?: Wine[];
901
+ page?: number;
902
+ perPage?: number;
903
+ total?: number;
904
+ totalItems?: number;
905
+ totalPages?: number;
906
+ hasNextPage?: boolean;
907
+ hasPrevPage?: boolean;
908
+ hasPreviousPage?: boolean;
909
+ meta?: Record<string, unknown>;
910
+ pagination?: Record<string, unknown>;
911
+ }>>;
912
+ insertWine: (data: CreateWine) => Promise<Result<{
913
+ insertado_id: string | null;
914
+ error: string | null;
915
+ image?: {
916
+ url: string;
917
+ delete_url: string;
918
+ } | {
919
+ id: string;
920
+ title: string;
921
+ url_viewer: string;
922
+ url: string;
923
+ display_url: string;
924
+ width: string;
925
+ height: string;
926
+ size: string;
927
+ time: string;
928
+ expiration: string;
929
+ image: {
930
+ filename: string;
931
+ name: string;
932
+ mime: string;
933
+ extension: string;
934
+ url: string;
935
+ };
936
+ thumb: {
937
+ filename: string;
938
+ name: string;
939
+ mime: string;
940
+ extension: string;
941
+ url: string;
942
+ };
943
+ medium: {
944
+ filename: string;
945
+ name: string;
946
+ mime: string;
947
+ extension: string;
948
+ url: string;
949
+ };
950
+ delete_url: string;
951
+ } | undefined;
952
+ deduplicated?: boolean | undefined;
953
+ }>>;
954
+ insertBulkWines: (data: CreateWine[]) => Promise<Result<{
955
+ total: number;
956
+ successful: number;
957
+ failed: number;
958
+ results: {
959
+ insertado_id: string | null;
960
+ error: string | null;
961
+ }[];
962
+ }>>;
963
+ editWine: (data: EditWine) => Promise<Result<{
964
+ id_vino: string;
965
+ nombre: string;
966
+ precio: number;
967
+ url_imagen: string;
968
+ descripcion: string;
969
+ nivel_alcohol: number;
970
+ variedades: string[];
971
+ pais_importacion: string;
972
+ color_vino: string;
973
+ stock: number;
974
+ capacidad: number;
975
+ imgbb_delete_url?: string | undefined;
976
+ image_hash?: string | undefined;
977
+ wine_details?: {
978
+ id_detalle?: string | null | undefined;
979
+ id_vino?: string | null | undefined;
980
+ notas_cata?: string | null | undefined;
981
+ tipo_crianza?: string | null | undefined;
982
+ bodega?: string | null | undefined;
983
+ } | null | undefined;
984
+ }>>;
985
+ };
986
+ private apiKey?;
987
+ private readonly baseUrl;
988
+ constructor(options: ClientOptions);
989
+ setApiKey(apiKey?: string): void;
990
+ connectRealtime(): Promise<{
991
+ connect: () => Promise<void>;
992
+ disconnect: () => void;
993
+ setApiKey: (key?: string) => void;
994
+ getWines: () => Promise<Result<{
995
+ id_vino: string;
996
+ nombre: string;
997
+ precio: number;
998
+ url_imagen: string;
999
+ descripcion: string;
1000
+ nivel_alcohol: number;
1001
+ variedades: string[];
1002
+ pais_importacion: string;
1003
+ color_vino: string;
1004
+ stock: number;
1005
+ capacidad: number;
1006
+ imgbb_delete_url?: string | undefined;
1007
+ image_hash?: string | undefined;
1008
+ wine_details?: {
1009
+ id_detalle?: string | null | undefined;
1010
+ id_vino?: string | null | undefined;
1011
+ notas_cata?: string | null | undefined;
1012
+ tipo_crianza?: string | null | undefined;
1013
+ bodega?: string | null | undefined;
1014
+ } | null | undefined;
1015
+ }[]>>;
1016
+ getWinesPage: (page?: number, perPage?: number) => Promise<Result<{
1017
+ data?: Wine[];
1018
+ items?: Wine[];
1019
+ rows?: Wine[];
1020
+ page?: number;
1021
+ perPage?: number;
1022
+ total?: number;
1023
+ totalItems?: number;
1024
+ totalPages?: number;
1025
+ hasNextPage?: boolean;
1026
+ hasPrevPage?: boolean;
1027
+ hasPreviousPage?: boolean;
1028
+ meta?: Record<string, unknown>;
1029
+ pagination?: Record<string, unknown>;
1030
+ }>>;
1031
+ insertWine: (data: CreateWine) => Promise<Result<{
1032
+ insertado_id: string | null;
1033
+ error: string | null;
1034
+ image?: {
1035
+ url: string;
1036
+ delete_url: string;
1037
+ } | {
1038
+ id: string;
1039
+ title: string;
1040
+ url_viewer: string;
1041
+ url: string;
1042
+ display_url: string;
1043
+ width: string;
1044
+ height: string;
1045
+ size: string;
1046
+ time: string;
1047
+ expiration: string;
1048
+ image: {
1049
+ filename: string;
1050
+ name: string;
1051
+ mime: string;
1052
+ extension: string;
1053
+ url: string;
1054
+ };
1055
+ thumb: {
1056
+ filename: string;
1057
+ name: string;
1058
+ mime: string;
1059
+ extension: string;
1060
+ url: string;
1061
+ };
1062
+ medium: {
1063
+ filename: string;
1064
+ name: string;
1065
+ mime: string;
1066
+ extension: string;
1067
+ url: string;
1068
+ };
1069
+ delete_url: string;
1070
+ } | undefined;
1071
+ deduplicated?: boolean | undefined;
1072
+ }>>;
1073
+ insertBulkWines: (data: CreateWine[]) => Promise<Result<{
1074
+ total: number;
1075
+ successful: number;
1076
+ failed: number;
1077
+ results: {
1078
+ insertado_id: string | null;
1079
+ error: string | null;
1080
+ }[];
1081
+ }>>;
1082
+ editWine: (data: EditWine) => Promise<Result<{
1083
+ id_vino: string;
1084
+ nombre: string;
1085
+ precio: number;
1086
+ url_imagen: string;
1087
+ descripcion: string;
1088
+ nivel_alcohol: number;
1089
+ variedades: string[];
1090
+ pais_importacion: string;
1091
+ color_vino: string;
1092
+ stock: number;
1093
+ capacidad: number;
1094
+ imgbb_delete_url?: string | undefined;
1095
+ image_hash?: string | undefined;
1096
+ wine_details?: {
1097
+ id_detalle?: string | null | undefined;
1098
+ id_vino?: string | null | undefined;
1099
+ notas_cata?: string | null | undefined;
1100
+ tipo_crianza?: string | null | undefined;
1101
+ bodega?: string | null | undefined;
1102
+ } | null | undefined;
1103
+ }>>;
1104
+ }>;
1105
+ disconnectRealtime(): void;
1106
+ }
1107
+ declare function createClient(options: ClientOptions): WineClient;
1108
+
1109
+ type FileLike = Blob & {
1110
+ name?: string;
1111
+ };
1112
+ declare function createWsImageFile(file: FileLike | ArrayBuffer | Uint8Array, opts?: {
1113
+ filename?: string;
1114
+ mime?: string;
1115
+ name?: string;
1116
+ expiration?: number;
1117
+ }): Promise<NonNullable<CreateWine["image_file"]>>;
1118
+
1119
+ declare const ClientOptionsSchema: zod.ZodObject<{
1120
+ baseUrl: zod.ZodURL;
1121
+ apiKey: zod.ZodOptional<zod.ZodString>;
1122
+ }, zod_v4_core.$strip>;
1123
+ declare const ApiErrorSchema: zod.ZodObject<{
1124
+ message: zod.ZodString;
1125
+ code: zod.ZodOptional<zod.ZodString>;
1126
+ statusCode: zod.ZodOptional<zod.ZodNumber>;
1127
+ details: zod.ZodOptional<zod.ZodUnknown>;
1128
+ }, zod_v4_core.$strip>;
1129
+ declare const LoginDataSchema: zod.ZodObject<{
1130
+ email: zod.ZodEmail;
1131
+ password: zod.ZodString;
1132
+ }, zod_v4_core.$strip>;
1133
+ declare const RegisterDataSchema: zod.ZodObject<{
1134
+ email: zod.ZodEmail;
1135
+ password: zod.ZodString;
1136
+ fullName: zod.ZodOptional<zod.ZodString>;
1137
+ }, zod_v4_core.$strip>;
1138
+ declare const MagicLinkRequestDataSchema: zod.ZodObject<{
1139
+ email: zod.ZodEmail;
1140
+ redirectUrl: zod.ZodOptional<zod.ZodURL>;
1141
+ }, zod_v4_core.$strip>;
1142
+ declare const AuthResponseSchema: zod.ZodObject<{
1143
+ token: zod.ZodString;
1144
+ user: zod.ZodObject<{
1145
+ id: zod.ZodUUID;
1146
+ email: zod.ZodEmail;
1147
+ fullName: zod.ZodOptional<zod.ZodString>;
1148
+ }, zod_v4_core.$strip>;
1149
+ apiKey: zod.ZodOptional<zod.ZodObject<{
1150
+ id: zod.ZodUUID;
1151
+ key: zod.ZodString;
1152
+ name: zod.ZodString;
1153
+ expiresAt: zod.ZodISODateTime;
1154
+ }, zod_v4_core.$strip>>;
1155
+ }, zod_v4_core.$strip>;
1156
+ declare const ApiKeySchema: zod.ZodObject<{
1157
+ id: zod.ZodUUID;
1158
+ key: zod.ZodString;
1159
+ name: zod.ZodString;
1160
+ expiresAt: zod.ZodOptional<zod.ZodISODateTime>;
1161
+ createdAt: zod.ZodISODateTime;
1162
+ }, zod_v4_core.$strip>;
1163
+ declare const MagicLinkResponseSchema: zod.ZodObject<{
1164
+ success: zod.ZodBoolean;
1165
+ message: zod.ZodString;
1166
+ email: zod.ZodEmail;
1167
+ }, zod_v4_core.$strip>;
1168
+ declare const ValidateSessionResponseSchema: zod.ZodObject<{
1169
+ valid: zod.ZodBoolean;
1170
+ userId: zod.ZodOptional<zod.ZodUUID>;
1171
+ sessionId: zod.ZodOptional<zod.ZodUUID>;
1172
+ }, zod_v4_core.$strip>;
1173
+ declare const SessionDataSchema: zod.ZodObject<{
1174
+ id: zod.ZodUUID;
1175
+ userId: zod.ZodUUID;
1176
+ token: zod.ZodString;
1177
+ ipAddress: zod.ZodNullable<zod.ZodString>;
1178
+ userAgent: zod.ZodNullable<zod.ZodString>;
1179
+ isActive: zod.ZodBoolean;
1180
+ lastActivityAt: zod.ZodISODateTime;
1181
+ createdAt: zod.ZodISODateTime;
1182
+ expiresAt: zod.ZodNullable<zod.ZodISODateTime>;
1183
+ }, zod_v4_core.$strip>;
1184
+ declare const ActivityLogSchema: zod.ZodObject<{
1185
+ id: zod.ZodUUID;
1186
+ userId: zod.ZodOptional<zod.ZodNullable<zod.ZodUUID>>;
1187
+ apiKeyId: zod.ZodOptional<zod.ZodNullable<zod.ZodUUID>>;
1188
+ action: zod.ZodString;
1189
+ ipAddress: zod.ZodNullable<zod.ZodString>;
1190
+ userAgent: zod.ZodNullable<zod.ZodString>;
1191
+ location: zod.ZodNullable<zod.ZodString>;
1192
+ metadata: zod.ZodNullable<zod.ZodString>;
1193
+ beforeState: zod.ZodNullable<zod.ZodString>;
1194
+ afterState: zod.ZodNullable<zod.ZodString>;
1195
+ tableName: zod.ZodNullable<zod.ZodString>;
1196
+ recordId: zod.ZodNullable<zod.ZodUUID>;
1197
+ timestamp: zod.ZodISODateTime;
1198
+ }, zod_v4_core.$strip>;
1199
+ declare const RollbackLogSchema: zod.ZodObject<{
1200
+ id: zod.ZodUUID;
1201
+ apiKeyId: zod.ZodUUID;
1202
+ initiatedBy: zod.ZodOptional<zod.ZodNullable<zod.ZodUUID>>;
1203
+ status: zod.ZodString;
1204
+ changesReverted: zod.ZodString;
1205
+ errorMessage: zod.ZodNullable<zod.ZodString>;
1206
+ createdAt: zod.ZodISODateTime;
1207
+ completedAt: zod.ZodOptional<zod.ZodNullable<zod.ZodISODateTime>>;
1208
+ }, zod_v4_core.$strip>;
1209
+ declare const RealtimeOptionsSchema: zod.ZodObject<{
1210
+ baseUrl: zod.ZodURL;
1211
+ apiKey: zod.ZodOptional<zod.ZodString>;
1212
+ }, zod_v4_core.$strip>;
1213
+ declare const WineSchema: zod.ZodObject<{
1214
+ id_vino: zod.ZodUUID;
1215
+ nombre: zod.ZodString;
1216
+ precio: zod.ZodNumber;
1217
+ url_imagen: zod.ZodString;
1218
+ imgbb_delete_url: zod.ZodOptional<zod.ZodString>;
1219
+ image_hash: zod.ZodOptional<zod.ZodString>;
1220
+ descripcion: zod.ZodString;
1221
+ nivel_alcohol: zod.ZodNumber;
1222
+ variedades: zod.ZodArray<zod.ZodString>;
1223
+ pais_importacion: zod.ZodString;
1224
+ color_vino: zod.ZodString;
1225
+ stock: zod.ZodNumber;
1226
+ capacidad: zod.ZodNumber;
1227
+ wine_details: zod.ZodOptional<zod.ZodNullable<zod.ZodObject<{
1228
+ id_detalle: zod.ZodOptional<zod.ZodNullable<zod.ZodUUID>>;
1229
+ id_vino: zod.ZodOptional<zod.ZodNullable<zod.ZodUUID>>;
1230
+ notas_cata: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
1231
+ tipo_crianza: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
1232
+ bodega: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
1233
+ }, zod_v4_core.$strip>>>;
1234
+ }, zod_v4_core.$strip>;
1235
+ declare const WineDetailsSchema: zod.ZodObject<{
1236
+ id_detalle: zod.ZodOptional<zod.ZodNullable<zod.ZodUUID>>;
1237
+ id_vino: zod.ZodOptional<zod.ZodNullable<zod.ZodUUID>>;
1238
+ notas_cata: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
1239
+ tipo_crianza: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
1240
+ bodega: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
1241
+ }, zod_v4_core.$strip>;
1242
+ declare const WineDataSchema: zod.ZodObject<{
1243
+ id: zod.ZodOptional<zod.ZodUUID>;
1244
+ }, zod_v4_core.$strict>;
1245
+ declare const CreateWineSchema: zod.ZodObject<{
1246
+ nombre: zod.ZodString;
1247
+ precio: zod.ZodNumber;
1248
+ url_imagen: zod.ZodOptional<zod.ZodString>;
1249
+ imgbb_delete_url: zod.ZodOptional<zod.ZodString>;
1250
+ image_hash: zod.ZodOptional<zod.ZodString>;
1251
+ descripcion: zod.ZodOptional<zod.ZodString>;
1252
+ nivel_alcohol: zod.ZodDefault<zod.ZodNumber>;
1253
+ variedades: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
1254
+ pais_importacion: zod.ZodOptional<zod.ZodString>;
1255
+ color_vino: zod.ZodOptional<zod.ZodString>;
1256
+ stock: zod.ZodDefault<zod.ZodNumber>;
1257
+ capacidad: zod.ZodDefault<zod.ZodNumber>;
1258
+ notas_cata: zod.ZodOptional<zod.ZodString>;
1259
+ tipo_crianza: zod.ZodOptional<zod.ZodString>;
1260
+ bodega: zod.ZodOptional<zod.ZodString>;
1261
+ image_file: zod.ZodOptional<zod.ZodObject<{
1262
+ filename: zod.ZodString;
1263
+ mime: zod.ZodString;
1264
+ buffer: zod.ZodUnion<readonly [zod.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, zod.ZodArray<zod.ZodNumber>, zod.ZodObject<{
1265
+ type: zod.ZodLiteral<"Buffer">;
1266
+ data: zod.ZodArray<zod.ZodNumber>;
1267
+ }, zod_v4_core.$strip>]>;
1268
+ name: zod.ZodOptional<zod.ZodString>;
1269
+ expiration: zod.ZodOptional<zod.ZodNumber>;
1270
+ }, zod_v4_core.$strip>>;
1271
+ }, zod_v4_core.$strip>;
1272
+ declare const EditWineSchema: zod.ZodObject<{
1273
+ nombre: zod.ZodOptional<zod.ZodString>;
1274
+ precio: zod.ZodOptional<zod.ZodNumber>;
1275
+ url_imagen: zod.ZodOptional<zod.ZodString>;
1276
+ imgbb_delete_url: zod.ZodOptional<zod.ZodOptional<zod.ZodString>>;
1277
+ image_hash: zod.ZodOptional<zod.ZodOptional<zod.ZodString>>;
1278
+ descripcion: zod.ZodOptional<zod.ZodString>;
1279
+ nivel_alcohol: zod.ZodOptional<zod.ZodNumber>;
1280
+ variedades: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
1281
+ pais_importacion: zod.ZodOptional<zod.ZodString>;
1282
+ color_vino: zod.ZodOptional<zod.ZodString>;
1283
+ stock: zod.ZodOptional<zod.ZodNumber>;
1284
+ capacidad: zod.ZodOptional<zod.ZodNumber>;
1285
+ id_vino: zod.ZodUUID;
1286
+ wine_details: zod.ZodOptional<zod.ZodObject<{
1287
+ id_detalle: zod.ZodOptional<zod.ZodOptional<zod.ZodNullable<zod.ZodUUID>>>;
1288
+ id_vino: zod.ZodOptional<zod.ZodOptional<zod.ZodNullable<zod.ZodUUID>>>;
1289
+ notas_cata: zod.ZodOptional<zod.ZodOptional<zod.ZodNullable<zod.ZodString>>>;
1290
+ tipo_crianza: zod.ZodOptional<zod.ZodOptional<zod.ZodNullable<zod.ZodString>>>;
1291
+ bodega: zod.ZodOptional<zod.ZodOptional<zod.ZodNullable<zod.ZodString>>>;
1292
+ }, zod_v4_core.$strip>>;
1293
+ image_file: zod.ZodOptional<zod.ZodObject<{
1294
+ filename: zod.ZodString;
1295
+ mime: zod.ZodString;
1296
+ buffer: zod.ZodUnion<readonly [zod.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, zod.ZodArray<zod.ZodNumber>, zod.ZodObject<{
1297
+ type: zod.ZodLiteral<"Buffer">;
1298
+ data: zod.ZodArray<zod.ZodNumber>;
1299
+ }, zod_v4_core.$strip>]>;
1300
+ name: zod.ZodOptional<zod.ZodString>;
1301
+ expiration: zod.ZodOptional<zod.ZodNumber>;
1302
+ }, zod_v4_core.$strip>>;
1303
+ }, zod_v4_core.$strict>;
1304
+ declare const BulkInsertWinesSchema: zod.ZodArray<zod.ZodObject<{
1305
+ nombre: zod.ZodString;
1306
+ precio: zod.ZodNumber;
1307
+ url_imagen: zod.ZodOptional<zod.ZodString>;
1308
+ imgbb_delete_url: zod.ZodOptional<zod.ZodString>;
1309
+ image_hash: zod.ZodOptional<zod.ZodString>;
1310
+ descripcion: zod.ZodOptional<zod.ZodString>;
1311
+ nivel_alcohol: zod.ZodDefault<zod.ZodNumber>;
1312
+ variedades: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
1313
+ pais_importacion: zod.ZodOptional<zod.ZodString>;
1314
+ color_vino: zod.ZodOptional<zod.ZodString>;
1315
+ stock: zod.ZodDefault<zod.ZodNumber>;
1316
+ capacidad: zod.ZodDefault<zod.ZodNumber>;
1317
+ notas_cata: zod.ZodOptional<zod.ZodString>;
1318
+ tipo_crianza: zod.ZodOptional<zod.ZodString>;
1319
+ bodega: zod.ZodOptional<zod.ZodString>;
1320
+ image_file: zod.ZodOptional<zod.ZodObject<{
1321
+ filename: zod.ZodString;
1322
+ mime: zod.ZodString;
1323
+ buffer: zod.ZodUnion<readonly [zod.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, zod.ZodArray<zod.ZodNumber>, zod.ZodObject<{
1324
+ type: zod.ZodLiteral<"Buffer">;
1325
+ data: zod.ZodArray<zod.ZodNumber>;
1326
+ }, zod_v4_core.$strip>]>;
1327
+ name: zod.ZodOptional<zod.ZodString>;
1328
+ expiration: zod.ZodOptional<zod.ZodNumber>;
1329
+ }, zod_v4_core.$strip>>;
1330
+ }, zod_v4_core.$strip>>;
1331
+ declare const BulkInsertWinesResultSchema: zod.ZodObject<{
1332
+ total: zod.ZodNumber;
1333
+ successful: zod.ZodNumber;
1334
+ failed: zod.ZodNumber;
1335
+ results: zod.ZodArray<zod.ZodObject<{
1336
+ insertado_id: zod.ZodNullable<zod.ZodString>;
1337
+ error: zod.ZodNullable<zod.ZodString>;
1338
+ }, zod_v4_core.$strip>>;
1339
+ }, zod_v4_core.$strip>;
1340
+ declare const ReusedWineImageSchema: zod.ZodObject<{
1341
+ url: zod.ZodString;
1342
+ delete_url: zod.ZodString;
1343
+ }, zod_v4_core.$strip>;
1344
+ declare const ImgbbAssetSchema: zod.ZodObject<{
1345
+ filename: zod.ZodString;
1346
+ name: zod.ZodString;
1347
+ mime: zod.ZodString;
1348
+ extension: zod.ZodString;
1349
+ url: zod.ZodString;
1350
+ }, zod_v4_core.$strip>;
1351
+ declare const ImgbbUploadDataSchema: zod.ZodObject<{
1352
+ id: zod.ZodString;
1353
+ title: zod.ZodString;
1354
+ url_viewer: zod.ZodString;
1355
+ url: zod.ZodString;
1356
+ display_url: zod.ZodString;
1357
+ width: zod.ZodString;
1358
+ height: zod.ZodString;
1359
+ size: zod.ZodString;
1360
+ time: zod.ZodString;
1361
+ expiration: zod.ZodString;
1362
+ image: zod.ZodObject<{
1363
+ filename: zod.ZodString;
1364
+ name: zod.ZodString;
1365
+ mime: zod.ZodString;
1366
+ extension: zod.ZodString;
1367
+ url: zod.ZodString;
1368
+ }, zod_v4_core.$strip>;
1369
+ thumb: zod.ZodObject<{
1370
+ filename: zod.ZodString;
1371
+ name: zod.ZodString;
1372
+ mime: zod.ZodString;
1373
+ extension: zod.ZodString;
1374
+ url: zod.ZodString;
1375
+ }, zod_v4_core.$strip>;
1376
+ medium: zod.ZodObject<{
1377
+ filename: zod.ZodString;
1378
+ name: zod.ZodString;
1379
+ mime: zod.ZodString;
1380
+ extension: zod.ZodString;
1381
+ url: zod.ZodString;
1382
+ }, zod_v4_core.$strip>;
1383
+ delete_url: zod.ZodString;
1384
+ }, zod_v4_core.$strip>;
1385
+ declare const InsertWineResultSchema: zod.ZodObject<{
1386
+ insertado_id: zod.ZodNullable<zod.ZodString>;
1387
+ error: zod.ZodNullable<zod.ZodString>;
1388
+ image: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodObject<{
1389
+ id: zod.ZodString;
1390
+ title: zod.ZodString;
1391
+ url_viewer: zod.ZodString;
1392
+ url: zod.ZodString;
1393
+ display_url: zod.ZodString;
1394
+ width: zod.ZodString;
1395
+ height: zod.ZodString;
1396
+ size: zod.ZodString;
1397
+ time: zod.ZodString;
1398
+ expiration: zod.ZodString;
1399
+ image: zod.ZodObject<{
1400
+ filename: zod.ZodString;
1401
+ name: zod.ZodString;
1402
+ mime: zod.ZodString;
1403
+ extension: zod.ZodString;
1404
+ url: zod.ZodString;
1405
+ }, zod_v4_core.$strip>;
1406
+ thumb: zod.ZodObject<{
1407
+ filename: zod.ZodString;
1408
+ name: zod.ZodString;
1409
+ mime: zod.ZodString;
1410
+ extension: zod.ZodString;
1411
+ url: zod.ZodString;
1412
+ }, zod_v4_core.$strip>;
1413
+ medium: zod.ZodObject<{
1414
+ filename: zod.ZodString;
1415
+ name: zod.ZodString;
1416
+ mime: zod.ZodString;
1417
+ extension: zod.ZodString;
1418
+ url: zod.ZodString;
1419
+ }, zod_v4_core.$strip>;
1420
+ delete_url: zod.ZodString;
1421
+ }, zod_v4_core.$strip>, zod.ZodObject<{
1422
+ url: zod.ZodString;
1423
+ delete_url: zod.ZodString;
1424
+ }, zod_v4_core.$strip>]>>;
1425
+ deduplicated: zod.ZodOptional<zod.ZodBoolean>;
1426
+ }, zod_v4_core.$strip>;
1427
+
1428
+ export { type ActivityLog, ActivityLogSchema, type ApiError, ApiErrorSchema, type ApiKey, ApiKeySchema, type AuthResponse, AuthResponseSchema, type BulkInsertWines, type BulkInsertWinesResult, BulkInsertWinesResultSchema, BulkInsertWinesSchema, type ClientOptions, ClientOptionsSchema, type CreateWine, CreateWineSchema, type EditWine, EditWineSchema, type ImgbbAsset, ImgbbAssetSchema, type ImgbbUploadData, ImgbbUploadDataSchema, type InsertWineResult, InsertWineResultSchema, type LoginData, LoginDataSchema, type MagicLinkRequestData, MagicLinkRequestDataSchema, type MagicLinkResponse, MagicLinkResponseSchema, type RealtimeOptions, RealtimeOptionsSchema, type RegisterData, RegisterDataSchema, type Result, type ReusedWineImage, ReusedWineImageSchema, type RollbackLog, RollbackLogSchema, type SessionData, SessionDataSchema, type ValidateSessionResponse, ValidateSessionResponseSchema, type Wine, WineClient, type WineData, WineDataSchema, type WineDetails, WineDetailsSchema, WineSchema, createClient, createWsImageFile };