@atomic-solutions/wordpress-react 0.1.0 → 0.2.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.
@@ -1,1815 +1,5 @@
1
- import { WordPressClient, PostParams, PaginatedResponse, Post, CategoryParams, Category, Media, CurrentUser, User, JwtTokenResponse, JwtLoginInput } from '@atomic-solutions/wordpress-api-client';
2
- import { Q as QueryKeys } from '../queryKeys-ByTaglNR.cjs';
3
- export { c as createQueryKeys } from '../queryKeys-ByTaglNR.cjs';
4
- import * as _tanstack_react_query from '@tanstack/react-query';
5
- import { UseQueryOptions, UseMutationOptions } from '@tanstack/react-query';
6
- import * as zod from 'zod';
7
-
8
- /**
9
- * Hook for accessing WordPress client and query keys from context
10
- */
11
-
12
- /**
13
- * Hook to access the WordPress client from context
14
- *
15
- * Must be used within a WordPressProvider
16
- *
17
- * @returns WordPress client instance
18
- * @throws Error if used outside WordPressProvider
19
- *
20
- * @example
21
- * ```tsx
22
- * const MyComponent = () => {
23
- * const client = useWordPressClient();
24
- *
25
- * const handleFetchPosts = async () => {
26
- * const posts = await client.posts.list({ per_page: 10 });
27
- * console.log(posts);
28
- * };
29
- *
30
- * return <button onClick={handleFetchPosts}>Fetch Posts</button>;
31
- * };
32
- * ```
33
- */
34
- declare const useWordPressClient: () => WordPressClient;
35
- /**
36
- * Hook to access WordPress query keys from context
37
- *
38
- * Must be used within a WordPressProvider
39
- *
40
- * @returns Query keys instance
41
- * @throws Error if used outside WordPressProvider
42
- *
43
- * @example
44
- * ```tsx
45
- * function MyComponent() {
46
- * const queryKeys = useWordPressQueryKeys();
47
- * const queryClient = useQueryClient();
48
- *
49
- * const handleInvalidate = () => {
50
- * queryClient.invalidateQueries({ queryKey: queryKeys.posts.all });
51
- * };
52
- *
53
- * return <button onClick={handleInvalidate}>Refresh Posts</button>;
54
- * }
55
- * ```
56
- */
57
- declare const useWordPressQueryKeys: () => QueryKeys;
58
-
59
- type UsePostsOptions = Omit<UseQueryOptions<PaginatedResponse<Post>, Error>, 'queryKey' | 'queryFn'>;
60
- type UsePostOptions = Omit<UseQueryOptions<Post, Error>, 'queryKey' | 'queryFn'>;
61
- /**
62
- * Hook for fetching paginated posts
63
- *
64
- * @param params - Post query parameters
65
- * @param options - React Query options
66
- */
67
- declare const usePosts: (params?: PostParams, options?: UsePostsOptions) => _tanstack_react_query.UseQueryResult<PaginatedResponse<{
68
- type: string;
69
- status: string;
70
- date: string;
71
- author: number;
72
- id: number;
73
- date_gmt: string;
74
- modified: string;
75
- modified_gmt: string;
76
- slug: string;
77
- link: string;
78
- title: {
79
- rendered: string;
80
- protected?: boolean | undefined;
81
- };
82
- guid: {
83
- rendered: string;
84
- };
85
- comment_status: string;
86
- ping_status: string;
87
- template: string;
88
- content: {
89
- rendered: string;
90
- protected?: boolean | undefined;
91
- };
92
- excerpt: {
93
- rendered: string;
94
- protected?: boolean | undefined;
95
- };
96
- featured_media: number;
97
- sticky: boolean;
98
- format: string;
99
- categories: number[];
100
- _links?: zod.objectOutputType<{
101
- self: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
102
- href: zod.ZodString;
103
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
104
- templated: zod.ZodOptional<zod.ZodBoolean>;
105
- }, "strip", zod.ZodTypeAny, {
106
- href: string;
107
- embeddable?: boolean | undefined;
108
- templated?: boolean | undefined;
109
- }, {
110
- href: string;
111
- embeddable?: boolean | undefined;
112
- templated?: boolean | undefined;
113
- }>, "many">>;
114
- collection: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
115
- href: zod.ZodString;
116
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
117
- templated: zod.ZodOptional<zod.ZodBoolean>;
118
- }, "strip", zod.ZodTypeAny, {
119
- href: string;
120
- embeddable?: boolean | undefined;
121
- templated?: boolean | undefined;
122
- }, {
123
- href: string;
124
- embeddable?: boolean | undefined;
125
- templated?: boolean | undefined;
126
- }>, "many">>;
127
- about: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
128
- href: zod.ZodString;
129
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
130
- templated: zod.ZodOptional<zod.ZodBoolean>;
131
- }, "strip", zod.ZodTypeAny, {
132
- href: string;
133
- embeddable?: boolean | undefined;
134
- templated?: boolean | undefined;
135
- }, {
136
- href: string;
137
- embeddable?: boolean | undefined;
138
- templated?: boolean | undefined;
139
- }>, "many">>;
140
- author: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
141
- href: zod.ZodString;
142
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
143
- templated: zod.ZodOptional<zod.ZodBoolean>;
144
- }, "strip", zod.ZodTypeAny, {
145
- href: string;
146
- embeddable?: boolean | undefined;
147
- templated?: boolean | undefined;
148
- }, {
149
- href: string;
150
- embeddable?: boolean | undefined;
151
- templated?: boolean | undefined;
152
- }>, "many">>;
153
- replies: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
154
- href: zod.ZodString;
155
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
156
- templated: zod.ZodOptional<zod.ZodBoolean>;
157
- }, "strip", zod.ZodTypeAny, {
158
- href: string;
159
- embeddable?: boolean | undefined;
160
- templated?: boolean | undefined;
161
- }, {
162
- href: string;
163
- embeddable?: boolean | undefined;
164
- templated?: boolean | undefined;
165
- }>, "many">>;
166
- "wp:featuredmedia": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
167
- href: zod.ZodString;
168
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
169
- templated: zod.ZodOptional<zod.ZodBoolean>;
170
- }, "strip", zod.ZodTypeAny, {
171
- href: string;
172
- embeddable?: boolean | undefined;
173
- templated?: boolean | undefined;
174
- }, {
175
- href: string;
176
- embeddable?: boolean | undefined;
177
- templated?: boolean | undefined;
178
- }>, "many">>;
179
- "wp:attachment": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
180
- href: zod.ZodString;
181
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
182
- templated: zod.ZodOptional<zod.ZodBoolean>;
183
- }, "strip", zod.ZodTypeAny, {
184
- href: string;
185
- embeddable?: boolean | undefined;
186
- templated?: boolean | undefined;
187
- }, {
188
- href: string;
189
- embeddable?: boolean | undefined;
190
- templated?: boolean | undefined;
191
- }>, "many">>;
192
- "wp:term": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
193
- href: zod.ZodString;
194
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
195
- templated: zod.ZodOptional<zod.ZodBoolean>;
196
- }, "strip", zod.ZodTypeAny, {
197
- href: string;
198
- embeddable?: boolean | undefined;
199
- templated?: boolean | undefined;
200
- }, {
201
- href: string;
202
- embeddable?: boolean | undefined;
203
- templated?: boolean | undefined;
204
- }>, "many">>;
205
- "wp:post_type": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
206
- href: zod.ZodString;
207
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
208
- templated: zod.ZodOptional<zod.ZodBoolean>;
209
- }, "strip", zod.ZodTypeAny, {
210
- href: string;
211
- embeddable?: boolean | undefined;
212
- templated?: boolean | undefined;
213
- }, {
214
- href: string;
215
- embeddable?: boolean | undefined;
216
- templated?: boolean | undefined;
217
- }>, "many">>;
218
- curies: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
219
- name: zod.ZodString;
220
- href: zod.ZodString;
221
- templated: zod.ZodBoolean;
222
- }, "strip", zod.ZodTypeAny, {
223
- href: string;
224
- templated: boolean;
225
- name: string;
226
- }, {
227
- href: string;
228
- templated: boolean;
229
- name: string;
230
- }>, "many">>;
231
- }, zod.ZodTypeAny, "passthrough"> | undefined;
232
- meta?: any;
233
- tags?: number[] | undefined;
234
- }>, Error>;
235
- /**
236
- * Hook for infinite scrolling posts
237
- *
238
- * @param params - Base post query parameters (page will be managed automatically)
239
- */
240
- declare const useInfinitePosts: (params?: Omit<PostParams, "page">) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<PaginatedResponse<{
241
- type: string;
242
- status: string;
243
- date: string;
244
- author: number;
245
- id: number;
246
- date_gmt: string;
247
- modified: string;
248
- modified_gmt: string;
249
- slug: string;
250
- link: string;
251
- title: {
252
- rendered: string;
253
- protected?: boolean | undefined;
254
- };
255
- guid: {
256
- rendered: string;
257
- };
258
- comment_status: string;
259
- ping_status: string;
260
- template: string;
261
- content: {
262
- rendered: string;
263
- protected?: boolean | undefined;
264
- };
265
- excerpt: {
266
- rendered: string;
267
- protected?: boolean | undefined;
268
- };
269
- featured_media: number;
270
- sticky: boolean;
271
- format: string;
272
- categories: number[];
273
- _links?: zod.objectOutputType<{
274
- self: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
275
- href: zod.ZodString;
276
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
277
- templated: zod.ZodOptional<zod.ZodBoolean>;
278
- }, "strip", zod.ZodTypeAny, {
279
- href: string;
280
- embeddable?: boolean | undefined;
281
- templated?: boolean | undefined;
282
- }, {
283
- href: string;
284
- embeddable?: boolean | undefined;
285
- templated?: boolean | undefined;
286
- }>, "many">>;
287
- collection: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
288
- href: zod.ZodString;
289
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
290
- templated: zod.ZodOptional<zod.ZodBoolean>;
291
- }, "strip", zod.ZodTypeAny, {
292
- href: string;
293
- embeddable?: boolean | undefined;
294
- templated?: boolean | undefined;
295
- }, {
296
- href: string;
297
- embeddable?: boolean | undefined;
298
- templated?: boolean | undefined;
299
- }>, "many">>;
300
- about: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
301
- href: zod.ZodString;
302
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
303
- templated: zod.ZodOptional<zod.ZodBoolean>;
304
- }, "strip", zod.ZodTypeAny, {
305
- href: string;
306
- embeddable?: boolean | undefined;
307
- templated?: boolean | undefined;
308
- }, {
309
- href: string;
310
- embeddable?: boolean | undefined;
311
- templated?: boolean | undefined;
312
- }>, "many">>;
313
- author: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
314
- href: zod.ZodString;
315
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
316
- templated: zod.ZodOptional<zod.ZodBoolean>;
317
- }, "strip", zod.ZodTypeAny, {
318
- href: string;
319
- embeddable?: boolean | undefined;
320
- templated?: boolean | undefined;
321
- }, {
322
- href: string;
323
- embeddable?: boolean | undefined;
324
- templated?: boolean | undefined;
325
- }>, "many">>;
326
- replies: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
327
- href: zod.ZodString;
328
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
329
- templated: zod.ZodOptional<zod.ZodBoolean>;
330
- }, "strip", zod.ZodTypeAny, {
331
- href: string;
332
- embeddable?: boolean | undefined;
333
- templated?: boolean | undefined;
334
- }, {
335
- href: string;
336
- embeddable?: boolean | undefined;
337
- templated?: boolean | undefined;
338
- }>, "many">>;
339
- "wp:featuredmedia": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
340
- href: zod.ZodString;
341
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
342
- templated: zod.ZodOptional<zod.ZodBoolean>;
343
- }, "strip", zod.ZodTypeAny, {
344
- href: string;
345
- embeddable?: boolean | undefined;
346
- templated?: boolean | undefined;
347
- }, {
348
- href: string;
349
- embeddable?: boolean | undefined;
350
- templated?: boolean | undefined;
351
- }>, "many">>;
352
- "wp:attachment": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
353
- href: zod.ZodString;
354
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
355
- templated: zod.ZodOptional<zod.ZodBoolean>;
356
- }, "strip", zod.ZodTypeAny, {
357
- href: string;
358
- embeddable?: boolean | undefined;
359
- templated?: boolean | undefined;
360
- }, {
361
- href: string;
362
- embeddable?: boolean | undefined;
363
- templated?: boolean | undefined;
364
- }>, "many">>;
365
- "wp:term": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
366
- href: zod.ZodString;
367
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
368
- templated: zod.ZodOptional<zod.ZodBoolean>;
369
- }, "strip", zod.ZodTypeAny, {
370
- href: string;
371
- embeddable?: boolean | undefined;
372
- templated?: boolean | undefined;
373
- }, {
374
- href: string;
375
- embeddable?: boolean | undefined;
376
- templated?: boolean | undefined;
377
- }>, "many">>;
378
- "wp:post_type": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
379
- href: zod.ZodString;
380
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
381
- templated: zod.ZodOptional<zod.ZodBoolean>;
382
- }, "strip", zod.ZodTypeAny, {
383
- href: string;
384
- embeddable?: boolean | undefined;
385
- templated?: boolean | undefined;
386
- }, {
387
- href: string;
388
- embeddable?: boolean | undefined;
389
- templated?: boolean | undefined;
390
- }>, "many">>;
391
- curies: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
392
- name: zod.ZodString;
393
- href: zod.ZodString;
394
- templated: zod.ZodBoolean;
395
- }, "strip", zod.ZodTypeAny, {
396
- href: string;
397
- templated: boolean;
398
- name: string;
399
- }, {
400
- href: string;
401
- templated: boolean;
402
- name: string;
403
- }>, "many">>;
404
- }, zod.ZodTypeAny, "passthrough"> | undefined;
405
- meta?: any;
406
- tags?: number[] | undefined;
407
- }>, unknown>, Error>;
408
- /**
409
- * Hook for fetching a single post by ID
410
- *
411
- * @param id - Post ID
412
- * @param options - React Query options
413
- */
414
- declare const usePost: (id: number, options?: UsePostOptions) => _tanstack_react_query.UseQueryResult<{
415
- type: string;
416
- status: string;
417
- date: string;
418
- author: number;
419
- id: number;
420
- date_gmt: string;
421
- modified: string;
422
- modified_gmt: string;
423
- slug: string;
424
- link: string;
425
- title: {
426
- rendered: string;
427
- protected?: boolean | undefined;
428
- };
429
- guid: {
430
- rendered: string;
431
- };
432
- comment_status: string;
433
- ping_status: string;
434
- template: string;
435
- content: {
436
- rendered: string;
437
- protected?: boolean | undefined;
438
- };
439
- excerpt: {
440
- rendered: string;
441
- protected?: boolean | undefined;
442
- };
443
- featured_media: number;
444
- sticky: boolean;
445
- format: string;
446
- categories: number[];
447
- _links?: zod.objectOutputType<{
448
- self: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
449
- href: zod.ZodString;
450
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
451
- templated: zod.ZodOptional<zod.ZodBoolean>;
452
- }, "strip", zod.ZodTypeAny, {
453
- href: string;
454
- embeddable?: boolean | undefined;
455
- templated?: boolean | undefined;
456
- }, {
457
- href: string;
458
- embeddable?: boolean | undefined;
459
- templated?: boolean | undefined;
460
- }>, "many">>;
461
- collection: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
462
- href: zod.ZodString;
463
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
464
- templated: zod.ZodOptional<zod.ZodBoolean>;
465
- }, "strip", zod.ZodTypeAny, {
466
- href: string;
467
- embeddable?: boolean | undefined;
468
- templated?: boolean | undefined;
469
- }, {
470
- href: string;
471
- embeddable?: boolean | undefined;
472
- templated?: boolean | undefined;
473
- }>, "many">>;
474
- about: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
475
- href: zod.ZodString;
476
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
477
- templated: zod.ZodOptional<zod.ZodBoolean>;
478
- }, "strip", zod.ZodTypeAny, {
479
- href: string;
480
- embeddable?: boolean | undefined;
481
- templated?: boolean | undefined;
482
- }, {
483
- href: string;
484
- embeddable?: boolean | undefined;
485
- templated?: boolean | undefined;
486
- }>, "many">>;
487
- author: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
488
- href: zod.ZodString;
489
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
490
- templated: zod.ZodOptional<zod.ZodBoolean>;
491
- }, "strip", zod.ZodTypeAny, {
492
- href: string;
493
- embeddable?: boolean | undefined;
494
- templated?: boolean | undefined;
495
- }, {
496
- href: string;
497
- embeddable?: boolean | undefined;
498
- templated?: boolean | undefined;
499
- }>, "many">>;
500
- replies: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
501
- href: zod.ZodString;
502
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
503
- templated: zod.ZodOptional<zod.ZodBoolean>;
504
- }, "strip", zod.ZodTypeAny, {
505
- href: string;
506
- embeddable?: boolean | undefined;
507
- templated?: boolean | undefined;
508
- }, {
509
- href: string;
510
- embeddable?: boolean | undefined;
511
- templated?: boolean | undefined;
512
- }>, "many">>;
513
- "wp:featuredmedia": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
514
- href: zod.ZodString;
515
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
516
- templated: zod.ZodOptional<zod.ZodBoolean>;
517
- }, "strip", zod.ZodTypeAny, {
518
- href: string;
519
- embeddable?: boolean | undefined;
520
- templated?: boolean | undefined;
521
- }, {
522
- href: string;
523
- embeddable?: boolean | undefined;
524
- templated?: boolean | undefined;
525
- }>, "many">>;
526
- "wp:attachment": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
527
- href: zod.ZodString;
528
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
529
- templated: zod.ZodOptional<zod.ZodBoolean>;
530
- }, "strip", zod.ZodTypeAny, {
531
- href: string;
532
- embeddable?: boolean | undefined;
533
- templated?: boolean | undefined;
534
- }, {
535
- href: string;
536
- embeddable?: boolean | undefined;
537
- templated?: boolean | undefined;
538
- }>, "many">>;
539
- "wp:term": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
540
- href: zod.ZodString;
541
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
542
- templated: zod.ZodOptional<zod.ZodBoolean>;
543
- }, "strip", zod.ZodTypeAny, {
544
- href: string;
545
- embeddable?: boolean | undefined;
546
- templated?: boolean | undefined;
547
- }, {
548
- href: string;
549
- embeddable?: boolean | undefined;
550
- templated?: boolean | undefined;
551
- }>, "many">>;
552
- "wp:post_type": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
553
- href: zod.ZodString;
554
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
555
- templated: zod.ZodOptional<zod.ZodBoolean>;
556
- }, "strip", zod.ZodTypeAny, {
557
- href: string;
558
- embeddable?: boolean | undefined;
559
- templated?: boolean | undefined;
560
- }, {
561
- href: string;
562
- embeddable?: boolean | undefined;
563
- templated?: boolean | undefined;
564
- }>, "many">>;
565
- curies: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
566
- name: zod.ZodString;
567
- href: zod.ZodString;
568
- templated: zod.ZodBoolean;
569
- }, "strip", zod.ZodTypeAny, {
570
- href: string;
571
- templated: boolean;
572
- name: string;
573
- }, {
574
- href: string;
575
- templated: boolean;
576
- name: string;
577
- }>, "many">>;
578
- }, zod.ZodTypeAny, "passthrough"> | undefined;
579
- meta?: any;
580
- tags?: number[] | undefined;
581
- }, Error>;
582
- type UsePostBySlugOptions = Omit<UseQueryOptions<Post | null, Error>, 'queryKey' | 'queryFn' | 'enabled'>;
583
- /**
584
- * Hook for fetching a single post by slug
585
- *
586
- * @param slug - Post slug
587
- * @param options - React Query options
588
- */
589
- declare const usePostBySlug: (slug: string, options?: UsePostBySlugOptions) => _tanstack_react_query.UseQueryResult<{
590
- type: string;
591
- status: string;
592
- date: string;
593
- author: number;
594
- id: number;
595
- date_gmt: string;
596
- modified: string;
597
- modified_gmt: string;
598
- slug: string;
599
- link: string;
600
- title: {
601
- rendered: string;
602
- protected?: boolean | undefined;
603
- };
604
- guid: {
605
- rendered: string;
606
- };
607
- comment_status: string;
608
- ping_status: string;
609
- template: string;
610
- content: {
611
- rendered: string;
612
- protected?: boolean | undefined;
613
- };
614
- excerpt: {
615
- rendered: string;
616
- protected?: boolean | undefined;
617
- };
618
- featured_media: number;
619
- sticky: boolean;
620
- format: string;
621
- categories: number[];
622
- _links?: zod.objectOutputType<{
623
- self: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
624
- href: zod.ZodString;
625
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
626
- templated: zod.ZodOptional<zod.ZodBoolean>;
627
- }, "strip", zod.ZodTypeAny, {
628
- href: string;
629
- embeddable?: boolean | undefined;
630
- templated?: boolean | undefined;
631
- }, {
632
- href: string;
633
- embeddable?: boolean | undefined;
634
- templated?: boolean | undefined;
635
- }>, "many">>;
636
- collection: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
637
- href: zod.ZodString;
638
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
639
- templated: zod.ZodOptional<zod.ZodBoolean>;
640
- }, "strip", zod.ZodTypeAny, {
641
- href: string;
642
- embeddable?: boolean | undefined;
643
- templated?: boolean | undefined;
644
- }, {
645
- href: string;
646
- embeddable?: boolean | undefined;
647
- templated?: boolean | undefined;
648
- }>, "many">>;
649
- about: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
650
- href: zod.ZodString;
651
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
652
- templated: zod.ZodOptional<zod.ZodBoolean>;
653
- }, "strip", zod.ZodTypeAny, {
654
- href: string;
655
- embeddable?: boolean | undefined;
656
- templated?: boolean | undefined;
657
- }, {
658
- href: string;
659
- embeddable?: boolean | undefined;
660
- templated?: boolean | undefined;
661
- }>, "many">>;
662
- author: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
663
- href: zod.ZodString;
664
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
665
- templated: zod.ZodOptional<zod.ZodBoolean>;
666
- }, "strip", zod.ZodTypeAny, {
667
- href: string;
668
- embeddable?: boolean | undefined;
669
- templated?: boolean | undefined;
670
- }, {
671
- href: string;
672
- embeddable?: boolean | undefined;
673
- templated?: boolean | undefined;
674
- }>, "many">>;
675
- replies: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
676
- href: zod.ZodString;
677
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
678
- templated: zod.ZodOptional<zod.ZodBoolean>;
679
- }, "strip", zod.ZodTypeAny, {
680
- href: string;
681
- embeddable?: boolean | undefined;
682
- templated?: boolean | undefined;
683
- }, {
684
- href: string;
685
- embeddable?: boolean | undefined;
686
- templated?: boolean | undefined;
687
- }>, "many">>;
688
- "wp:featuredmedia": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
689
- href: zod.ZodString;
690
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
691
- templated: zod.ZodOptional<zod.ZodBoolean>;
692
- }, "strip", zod.ZodTypeAny, {
693
- href: string;
694
- embeddable?: boolean | undefined;
695
- templated?: boolean | undefined;
696
- }, {
697
- href: string;
698
- embeddable?: boolean | undefined;
699
- templated?: boolean | undefined;
700
- }>, "many">>;
701
- "wp:attachment": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
702
- href: zod.ZodString;
703
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
704
- templated: zod.ZodOptional<zod.ZodBoolean>;
705
- }, "strip", zod.ZodTypeAny, {
706
- href: string;
707
- embeddable?: boolean | undefined;
708
- templated?: boolean | undefined;
709
- }, {
710
- href: string;
711
- embeddable?: boolean | undefined;
712
- templated?: boolean | undefined;
713
- }>, "many">>;
714
- "wp:term": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
715
- href: zod.ZodString;
716
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
717
- templated: zod.ZodOptional<zod.ZodBoolean>;
718
- }, "strip", zod.ZodTypeAny, {
719
- href: string;
720
- embeddable?: boolean | undefined;
721
- templated?: boolean | undefined;
722
- }, {
723
- href: string;
724
- embeddable?: boolean | undefined;
725
- templated?: boolean | undefined;
726
- }>, "many">>;
727
- "wp:post_type": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
728
- href: zod.ZodString;
729
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
730
- templated: zod.ZodOptional<zod.ZodBoolean>;
731
- }, "strip", zod.ZodTypeAny, {
732
- href: string;
733
- embeddable?: boolean | undefined;
734
- templated?: boolean | undefined;
735
- }, {
736
- href: string;
737
- embeddable?: boolean | undefined;
738
- templated?: boolean | undefined;
739
- }>, "many">>;
740
- curies: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
741
- name: zod.ZodString;
742
- href: zod.ZodString;
743
- templated: zod.ZodBoolean;
744
- }, "strip", zod.ZodTypeAny, {
745
- href: string;
746
- templated: boolean;
747
- name: string;
748
- }, {
749
- href: string;
750
- templated: boolean;
751
- name: string;
752
- }>, "many">>;
753
- }, zod.ZodTypeAny, "passthrough"> | undefined;
754
- meta?: any;
755
- tags?: number[] | undefined;
756
- } | null, Error>;
757
-
758
- type UseCategoriesOptions = Omit<UseQueryOptions<PaginatedResponse<Category>, Error>, 'queryKey' | 'queryFn'>;
759
- type UseCategoryOptions = Omit<UseQueryOptions<Category, Error>, 'queryKey' | 'queryFn'>;
760
- /**
761
- * Hook for fetching paginated categories
762
- *
763
- * @param params - Category query parameters
764
- * @param options - React Query options
765
- */
766
- declare const useCategories: (params?: CategoryParams, options?: UseCategoriesOptions) => _tanstack_react_query.UseQueryResult<PaginatedResponse<{
767
- name: string;
768
- id: number;
769
- slug: string;
770
- link: string;
771
- count: number;
772
- taxonomy: string;
773
- parent: number;
774
- _links?: zod.objectOutputType<{
775
- self: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
776
- href: zod.ZodString;
777
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
778
- templated: zod.ZodOptional<zod.ZodBoolean>;
779
- }, "strip", zod.ZodTypeAny, {
780
- href: string;
781
- embeddable?: boolean | undefined;
782
- templated?: boolean | undefined;
783
- }, {
784
- href: string;
785
- embeddable?: boolean | undefined;
786
- templated?: boolean | undefined;
787
- }>, "many">>;
788
- collection: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
789
- href: zod.ZodString;
790
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
791
- templated: zod.ZodOptional<zod.ZodBoolean>;
792
- }, "strip", zod.ZodTypeAny, {
793
- href: string;
794
- embeddable?: boolean | undefined;
795
- templated?: boolean | undefined;
796
- }, {
797
- href: string;
798
- embeddable?: boolean | undefined;
799
- templated?: boolean | undefined;
800
- }>, "many">>;
801
- about: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
802
- href: zod.ZodString;
803
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
804
- templated: zod.ZodOptional<zod.ZodBoolean>;
805
- }, "strip", zod.ZodTypeAny, {
806
- href: string;
807
- embeddable?: boolean | undefined;
808
- templated?: boolean | undefined;
809
- }, {
810
- href: string;
811
- embeddable?: boolean | undefined;
812
- templated?: boolean | undefined;
813
- }>, "many">>;
814
- author: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
815
- href: zod.ZodString;
816
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
817
- templated: zod.ZodOptional<zod.ZodBoolean>;
818
- }, "strip", zod.ZodTypeAny, {
819
- href: string;
820
- embeddable?: boolean | undefined;
821
- templated?: boolean | undefined;
822
- }, {
823
- href: string;
824
- embeddable?: boolean | undefined;
825
- templated?: boolean | undefined;
826
- }>, "many">>;
827
- replies: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
828
- href: zod.ZodString;
829
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
830
- templated: zod.ZodOptional<zod.ZodBoolean>;
831
- }, "strip", zod.ZodTypeAny, {
832
- href: string;
833
- embeddable?: boolean | undefined;
834
- templated?: boolean | undefined;
835
- }, {
836
- href: string;
837
- embeddable?: boolean | undefined;
838
- templated?: boolean | undefined;
839
- }>, "many">>;
840
- "wp:featuredmedia": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
841
- href: zod.ZodString;
842
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
843
- templated: zod.ZodOptional<zod.ZodBoolean>;
844
- }, "strip", zod.ZodTypeAny, {
845
- href: string;
846
- embeddable?: boolean | undefined;
847
- templated?: boolean | undefined;
848
- }, {
849
- href: string;
850
- embeddable?: boolean | undefined;
851
- templated?: boolean | undefined;
852
- }>, "many">>;
853
- "wp:attachment": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
854
- href: zod.ZodString;
855
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
856
- templated: zod.ZodOptional<zod.ZodBoolean>;
857
- }, "strip", zod.ZodTypeAny, {
858
- href: string;
859
- embeddable?: boolean | undefined;
860
- templated?: boolean | undefined;
861
- }, {
862
- href: string;
863
- embeddable?: boolean | undefined;
864
- templated?: boolean | undefined;
865
- }>, "many">>;
866
- "wp:term": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
867
- href: zod.ZodString;
868
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
869
- templated: zod.ZodOptional<zod.ZodBoolean>;
870
- }, "strip", zod.ZodTypeAny, {
871
- href: string;
872
- embeddable?: boolean | undefined;
873
- templated?: boolean | undefined;
874
- }, {
875
- href: string;
876
- embeddable?: boolean | undefined;
877
- templated?: boolean | undefined;
878
- }>, "many">>;
879
- "wp:post_type": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
880
- href: zod.ZodString;
881
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
882
- templated: zod.ZodOptional<zod.ZodBoolean>;
883
- }, "strip", zod.ZodTypeAny, {
884
- href: string;
885
- embeddable?: boolean | undefined;
886
- templated?: boolean | undefined;
887
- }, {
888
- href: string;
889
- embeddable?: boolean | undefined;
890
- templated?: boolean | undefined;
891
- }>, "many">>;
892
- curies: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
893
- name: zod.ZodString;
894
- href: zod.ZodString;
895
- templated: zod.ZodBoolean;
896
- }, "strip", zod.ZodTypeAny, {
897
- href: string;
898
- templated: boolean;
899
- name: string;
900
- }, {
901
- href: string;
902
- templated: boolean;
903
- name: string;
904
- }>, "many">>;
905
- }, zod.ZodTypeAny, "passthrough"> | undefined;
906
- description?: string | undefined;
907
- meta?: any;
908
- }>, Error>;
909
- /**
910
- * Hook for infinite scrolling categories
911
- *
912
- * @param params - Base category query parameters
913
- */
914
- declare const useInfiniteCategories: (params?: Omit<CategoryParams, "page">) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<PaginatedResponse<{
915
- name: string;
916
- id: number;
917
- slug: string;
918
- link: string;
919
- count: number;
920
- taxonomy: string;
921
- parent: number;
922
- _links?: zod.objectOutputType<{
923
- self: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
924
- href: zod.ZodString;
925
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
926
- templated: zod.ZodOptional<zod.ZodBoolean>;
927
- }, "strip", zod.ZodTypeAny, {
928
- href: string;
929
- embeddable?: boolean | undefined;
930
- templated?: boolean | undefined;
931
- }, {
932
- href: string;
933
- embeddable?: boolean | undefined;
934
- templated?: boolean | undefined;
935
- }>, "many">>;
936
- collection: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
937
- href: zod.ZodString;
938
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
939
- templated: zod.ZodOptional<zod.ZodBoolean>;
940
- }, "strip", zod.ZodTypeAny, {
941
- href: string;
942
- embeddable?: boolean | undefined;
943
- templated?: boolean | undefined;
944
- }, {
945
- href: string;
946
- embeddable?: boolean | undefined;
947
- templated?: boolean | undefined;
948
- }>, "many">>;
949
- about: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
950
- href: zod.ZodString;
951
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
952
- templated: zod.ZodOptional<zod.ZodBoolean>;
953
- }, "strip", zod.ZodTypeAny, {
954
- href: string;
955
- embeddable?: boolean | undefined;
956
- templated?: boolean | undefined;
957
- }, {
958
- href: string;
959
- embeddable?: boolean | undefined;
960
- templated?: boolean | undefined;
961
- }>, "many">>;
962
- author: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
963
- href: zod.ZodString;
964
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
965
- templated: zod.ZodOptional<zod.ZodBoolean>;
966
- }, "strip", zod.ZodTypeAny, {
967
- href: string;
968
- embeddable?: boolean | undefined;
969
- templated?: boolean | undefined;
970
- }, {
971
- href: string;
972
- embeddable?: boolean | undefined;
973
- templated?: boolean | undefined;
974
- }>, "many">>;
975
- replies: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
976
- href: zod.ZodString;
977
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
978
- templated: zod.ZodOptional<zod.ZodBoolean>;
979
- }, "strip", zod.ZodTypeAny, {
980
- href: string;
981
- embeddable?: boolean | undefined;
982
- templated?: boolean | undefined;
983
- }, {
984
- href: string;
985
- embeddable?: boolean | undefined;
986
- templated?: boolean | undefined;
987
- }>, "many">>;
988
- "wp:featuredmedia": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
989
- href: zod.ZodString;
990
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
991
- templated: zod.ZodOptional<zod.ZodBoolean>;
992
- }, "strip", zod.ZodTypeAny, {
993
- href: string;
994
- embeddable?: boolean | undefined;
995
- templated?: boolean | undefined;
996
- }, {
997
- href: string;
998
- embeddable?: boolean | undefined;
999
- templated?: boolean | undefined;
1000
- }>, "many">>;
1001
- "wp:attachment": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1002
- href: zod.ZodString;
1003
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1004
- templated: zod.ZodOptional<zod.ZodBoolean>;
1005
- }, "strip", zod.ZodTypeAny, {
1006
- href: string;
1007
- embeddable?: boolean | undefined;
1008
- templated?: boolean | undefined;
1009
- }, {
1010
- href: string;
1011
- embeddable?: boolean | undefined;
1012
- templated?: boolean | undefined;
1013
- }>, "many">>;
1014
- "wp:term": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1015
- href: zod.ZodString;
1016
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1017
- templated: zod.ZodOptional<zod.ZodBoolean>;
1018
- }, "strip", zod.ZodTypeAny, {
1019
- href: string;
1020
- embeddable?: boolean | undefined;
1021
- templated?: boolean | undefined;
1022
- }, {
1023
- href: string;
1024
- embeddable?: boolean | undefined;
1025
- templated?: boolean | undefined;
1026
- }>, "many">>;
1027
- "wp:post_type": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1028
- href: zod.ZodString;
1029
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1030
- templated: zod.ZodOptional<zod.ZodBoolean>;
1031
- }, "strip", zod.ZodTypeAny, {
1032
- href: string;
1033
- embeddable?: boolean | undefined;
1034
- templated?: boolean | undefined;
1035
- }, {
1036
- href: string;
1037
- embeddable?: boolean | undefined;
1038
- templated?: boolean | undefined;
1039
- }>, "many">>;
1040
- curies: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1041
- name: zod.ZodString;
1042
- href: zod.ZodString;
1043
- templated: zod.ZodBoolean;
1044
- }, "strip", zod.ZodTypeAny, {
1045
- href: string;
1046
- templated: boolean;
1047
- name: string;
1048
- }, {
1049
- href: string;
1050
- templated: boolean;
1051
- name: string;
1052
- }>, "many">>;
1053
- }, zod.ZodTypeAny, "passthrough"> | undefined;
1054
- description?: string | undefined;
1055
- meta?: any;
1056
- }>, unknown>, Error>;
1057
- /**
1058
- * Hook for fetching a single category by ID
1059
- *
1060
- * @param id - Category ID
1061
- * @param options - React Query options
1062
- */
1063
- declare const useCategory: (id: number, options?: UseCategoryOptions) => _tanstack_react_query.UseQueryResult<{
1064
- name: string;
1065
- id: number;
1066
- slug: string;
1067
- link: string;
1068
- count: number;
1069
- taxonomy: string;
1070
- parent: number;
1071
- _links?: zod.objectOutputType<{
1072
- self: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1073
- href: zod.ZodString;
1074
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1075
- templated: zod.ZodOptional<zod.ZodBoolean>;
1076
- }, "strip", zod.ZodTypeAny, {
1077
- href: string;
1078
- embeddable?: boolean | undefined;
1079
- templated?: boolean | undefined;
1080
- }, {
1081
- href: string;
1082
- embeddable?: boolean | undefined;
1083
- templated?: boolean | undefined;
1084
- }>, "many">>;
1085
- collection: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1086
- href: zod.ZodString;
1087
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1088
- templated: zod.ZodOptional<zod.ZodBoolean>;
1089
- }, "strip", zod.ZodTypeAny, {
1090
- href: string;
1091
- embeddable?: boolean | undefined;
1092
- templated?: boolean | undefined;
1093
- }, {
1094
- href: string;
1095
- embeddable?: boolean | undefined;
1096
- templated?: boolean | undefined;
1097
- }>, "many">>;
1098
- about: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1099
- href: zod.ZodString;
1100
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1101
- templated: zod.ZodOptional<zod.ZodBoolean>;
1102
- }, "strip", zod.ZodTypeAny, {
1103
- href: string;
1104
- embeddable?: boolean | undefined;
1105
- templated?: boolean | undefined;
1106
- }, {
1107
- href: string;
1108
- embeddable?: boolean | undefined;
1109
- templated?: boolean | undefined;
1110
- }>, "many">>;
1111
- author: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1112
- href: zod.ZodString;
1113
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1114
- templated: zod.ZodOptional<zod.ZodBoolean>;
1115
- }, "strip", zod.ZodTypeAny, {
1116
- href: string;
1117
- embeddable?: boolean | undefined;
1118
- templated?: boolean | undefined;
1119
- }, {
1120
- href: string;
1121
- embeddable?: boolean | undefined;
1122
- templated?: boolean | undefined;
1123
- }>, "many">>;
1124
- replies: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1125
- href: zod.ZodString;
1126
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1127
- templated: zod.ZodOptional<zod.ZodBoolean>;
1128
- }, "strip", zod.ZodTypeAny, {
1129
- href: string;
1130
- embeddable?: boolean | undefined;
1131
- templated?: boolean | undefined;
1132
- }, {
1133
- href: string;
1134
- embeddable?: boolean | undefined;
1135
- templated?: boolean | undefined;
1136
- }>, "many">>;
1137
- "wp:featuredmedia": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1138
- href: zod.ZodString;
1139
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1140
- templated: zod.ZodOptional<zod.ZodBoolean>;
1141
- }, "strip", zod.ZodTypeAny, {
1142
- href: string;
1143
- embeddable?: boolean | undefined;
1144
- templated?: boolean | undefined;
1145
- }, {
1146
- href: string;
1147
- embeddable?: boolean | undefined;
1148
- templated?: boolean | undefined;
1149
- }>, "many">>;
1150
- "wp:attachment": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1151
- href: zod.ZodString;
1152
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1153
- templated: zod.ZodOptional<zod.ZodBoolean>;
1154
- }, "strip", zod.ZodTypeAny, {
1155
- href: string;
1156
- embeddable?: boolean | undefined;
1157
- templated?: boolean | undefined;
1158
- }, {
1159
- href: string;
1160
- embeddable?: boolean | undefined;
1161
- templated?: boolean | undefined;
1162
- }>, "many">>;
1163
- "wp:term": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1164
- href: zod.ZodString;
1165
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1166
- templated: zod.ZodOptional<zod.ZodBoolean>;
1167
- }, "strip", zod.ZodTypeAny, {
1168
- href: string;
1169
- embeddable?: boolean | undefined;
1170
- templated?: boolean | undefined;
1171
- }, {
1172
- href: string;
1173
- embeddable?: boolean | undefined;
1174
- templated?: boolean | undefined;
1175
- }>, "many">>;
1176
- "wp:post_type": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1177
- href: zod.ZodString;
1178
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1179
- templated: zod.ZodOptional<zod.ZodBoolean>;
1180
- }, "strip", zod.ZodTypeAny, {
1181
- href: string;
1182
- embeddable?: boolean | undefined;
1183
- templated?: boolean | undefined;
1184
- }, {
1185
- href: string;
1186
- embeddable?: boolean | undefined;
1187
- templated?: boolean | undefined;
1188
- }>, "many">>;
1189
- curies: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1190
- name: zod.ZodString;
1191
- href: zod.ZodString;
1192
- templated: zod.ZodBoolean;
1193
- }, "strip", zod.ZodTypeAny, {
1194
- href: string;
1195
- templated: boolean;
1196
- name: string;
1197
- }, {
1198
- href: string;
1199
- templated: boolean;
1200
- name: string;
1201
- }>, "many">>;
1202
- }, zod.ZodTypeAny, "passthrough"> | undefined;
1203
- description?: string | undefined;
1204
- meta?: any;
1205
- }, Error>;
1206
-
1207
- type UseMediaItemOptions = Omit<UseQueryOptions<Media, Error>, 'queryKey' | 'queryFn'>;
1208
- /**
1209
- * Hook for fetching a single media item by ID
1210
- *
1211
- * @param id - Media item ID
1212
- * @param options - React Query options
1213
- */
1214
- declare const useMediaItem: (id: number | undefined, options?: UseMediaItemOptions) => _tanstack_react_query.UseQueryResult<{
1215
- type: string;
1216
- status: string;
1217
- date: string;
1218
- author: number;
1219
- id: number;
1220
- date_gmt: string;
1221
- modified: string;
1222
- modified_gmt: string;
1223
- slug: string;
1224
- link: string;
1225
- description: {
1226
- rendered: string;
1227
- protected?: boolean | undefined;
1228
- };
1229
- post: number | null;
1230
- mime_type: string;
1231
- source_url: string;
1232
- caption: {
1233
- rendered: string;
1234
- protected?: boolean | undefined;
1235
- };
1236
- title: {
1237
- rendered: string;
1238
- protected?: boolean | undefined;
1239
- };
1240
- guid: {
1241
- rendered: string;
1242
- };
1243
- comment_status: string;
1244
- ping_status: string;
1245
- alt_text: string;
1246
- media_type: string;
1247
- media_details: {
1248
- file: string;
1249
- width: number;
1250
- height: number;
1251
- sizes: {
1252
- thumbnail?: {
1253
- file: string;
1254
- width: number;
1255
- height: number;
1256
- mime_type: string;
1257
- source_url: string;
1258
- filesize?: number | undefined;
1259
- } | undefined;
1260
- medium?: {
1261
- file: string;
1262
- width: number;
1263
- height: number;
1264
- mime_type: string;
1265
- source_url: string;
1266
- filesize?: number | undefined;
1267
- } | undefined;
1268
- medium_large?: {
1269
- file: string;
1270
- width: number;
1271
- height: number;
1272
- mime_type: string;
1273
- source_url: string;
1274
- filesize?: number | undefined;
1275
- } | undefined;
1276
- large?: {
1277
- file: string;
1278
- width: number;
1279
- height: number;
1280
- mime_type: string;
1281
- source_url: string;
1282
- filesize?: number | undefined;
1283
- } | undefined;
1284
- full?: {
1285
- file: string;
1286
- width: number;
1287
- height: number;
1288
- mime_type: string;
1289
- source_url: string;
1290
- filesize?: number | undefined;
1291
- } | undefined;
1292
- } & {
1293
- [k: string]: unknown;
1294
- };
1295
- filesize?: number | undefined;
1296
- image_meta?: {
1297
- aperture?: string | undefined;
1298
- credit?: string | undefined;
1299
- camera?: string | undefined;
1300
- caption?: string | undefined;
1301
- created_timestamp?: string | undefined;
1302
- copyright?: string | undefined;
1303
- focal_length?: string | undefined;
1304
- iso?: string | undefined;
1305
- shutter_speed?: string | undefined;
1306
- title?: string | undefined;
1307
- orientation?: string | undefined;
1308
- keywords?: string[] | undefined;
1309
- } | undefined;
1310
- };
1311
- _links?: zod.objectOutputType<{
1312
- self: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1313
- href: zod.ZodString;
1314
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1315
- templated: zod.ZodOptional<zod.ZodBoolean>;
1316
- }, "strip", zod.ZodTypeAny, {
1317
- href: string;
1318
- embeddable?: boolean | undefined;
1319
- templated?: boolean | undefined;
1320
- }, {
1321
- href: string;
1322
- embeddable?: boolean | undefined;
1323
- templated?: boolean | undefined;
1324
- }>, "many">>;
1325
- collection: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1326
- href: zod.ZodString;
1327
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1328
- templated: zod.ZodOptional<zod.ZodBoolean>;
1329
- }, "strip", zod.ZodTypeAny, {
1330
- href: string;
1331
- embeddable?: boolean | undefined;
1332
- templated?: boolean | undefined;
1333
- }, {
1334
- href: string;
1335
- embeddable?: boolean | undefined;
1336
- templated?: boolean | undefined;
1337
- }>, "many">>;
1338
- about: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1339
- href: zod.ZodString;
1340
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1341
- templated: zod.ZodOptional<zod.ZodBoolean>;
1342
- }, "strip", zod.ZodTypeAny, {
1343
- href: string;
1344
- embeddable?: boolean | undefined;
1345
- templated?: boolean | undefined;
1346
- }, {
1347
- href: string;
1348
- embeddable?: boolean | undefined;
1349
- templated?: boolean | undefined;
1350
- }>, "many">>;
1351
- author: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1352
- href: zod.ZodString;
1353
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1354
- templated: zod.ZodOptional<zod.ZodBoolean>;
1355
- }, "strip", zod.ZodTypeAny, {
1356
- href: string;
1357
- embeddable?: boolean | undefined;
1358
- templated?: boolean | undefined;
1359
- }, {
1360
- href: string;
1361
- embeddable?: boolean | undefined;
1362
- templated?: boolean | undefined;
1363
- }>, "many">>;
1364
- replies: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1365
- href: zod.ZodString;
1366
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1367
- templated: zod.ZodOptional<zod.ZodBoolean>;
1368
- }, "strip", zod.ZodTypeAny, {
1369
- href: string;
1370
- embeddable?: boolean | undefined;
1371
- templated?: boolean | undefined;
1372
- }, {
1373
- href: string;
1374
- embeddable?: boolean | undefined;
1375
- templated?: boolean | undefined;
1376
- }>, "many">>;
1377
- "wp:featuredmedia": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1378
- href: zod.ZodString;
1379
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1380
- templated: zod.ZodOptional<zod.ZodBoolean>;
1381
- }, "strip", zod.ZodTypeAny, {
1382
- href: string;
1383
- embeddable?: boolean | undefined;
1384
- templated?: boolean | undefined;
1385
- }, {
1386
- href: string;
1387
- embeddable?: boolean | undefined;
1388
- templated?: boolean | undefined;
1389
- }>, "many">>;
1390
- "wp:attachment": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1391
- href: zod.ZodString;
1392
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1393
- templated: zod.ZodOptional<zod.ZodBoolean>;
1394
- }, "strip", zod.ZodTypeAny, {
1395
- href: string;
1396
- embeddable?: boolean | undefined;
1397
- templated?: boolean | undefined;
1398
- }, {
1399
- href: string;
1400
- embeddable?: boolean | undefined;
1401
- templated?: boolean | undefined;
1402
- }>, "many">>;
1403
- "wp:term": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1404
- href: zod.ZodString;
1405
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1406
- templated: zod.ZodOptional<zod.ZodBoolean>;
1407
- }, "strip", zod.ZodTypeAny, {
1408
- href: string;
1409
- embeddable?: boolean | undefined;
1410
- templated?: boolean | undefined;
1411
- }, {
1412
- href: string;
1413
- embeddable?: boolean | undefined;
1414
- templated?: boolean | undefined;
1415
- }>, "many">>;
1416
- "wp:post_type": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1417
- href: zod.ZodString;
1418
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1419
- templated: zod.ZodOptional<zod.ZodBoolean>;
1420
- }, "strip", zod.ZodTypeAny, {
1421
- href: string;
1422
- embeddable?: boolean | undefined;
1423
- templated?: boolean | undefined;
1424
- }, {
1425
- href: string;
1426
- embeddable?: boolean | undefined;
1427
- templated?: boolean | undefined;
1428
- }>, "many">>;
1429
- curies: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1430
- name: zod.ZodString;
1431
- href: zod.ZodString;
1432
- templated: zod.ZodBoolean;
1433
- }, "strip", zod.ZodTypeAny, {
1434
- href: string;
1435
- templated: boolean;
1436
- name: string;
1437
- }, {
1438
- href: string;
1439
- templated: boolean;
1440
- name: string;
1441
- }>, "many">>;
1442
- }, zod.ZodTypeAny, "passthrough"> | undefined;
1443
- meta?: any;
1444
- template?: string | undefined;
1445
- }, Error>;
1446
-
1447
- type UseCurrentUserOptions = Omit<UseQueryOptions<CurrentUser, Error>, 'queryKey' | 'queryFn'>;
1448
- type UseUserOptions = Omit<UseQueryOptions<User, Error>, 'queryKey' | 'queryFn'>;
1449
- /**
1450
- * Hook for fetching current authenticated user
1451
- *
1452
- * Requires JWT token to be configured
1453
- *
1454
- * @param options - React Query options
1455
- */
1456
- declare const useCurrentUser: (options?: UseCurrentUserOptions) => _tanstack_react_query.UseQueryResult<{
1457
- email: string;
1458
- username: string;
1459
- name: string;
1460
- id: number;
1461
- slug: string;
1462
- link: string;
1463
- description: string;
1464
- url: string;
1465
- locale: string;
1466
- nickname: string;
1467
- registered_date: string;
1468
- roles: string[];
1469
- first_name?: string | undefined;
1470
- last_name?: string | undefined;
1471
- _links?: zod.objectOutputType<{
1472
- self: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1473
- href: zod.ZodString;
1474
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1475
- templated: zod.ZodOptional<zod.ZodBoolean>;
1476
- }, "strip", zod.ZodTypeAny, {
1477
- href: string;
1478
- embeddable?: boolean | undefined;
1479
- templated?: boolean | undefined;
1480
- }, {
1481
- href: string;
1482
- embeddable?: boolean | undefined;
1483
- templated?: boolean | undefined;
1484
- }>, "many">>;
1485
- collection: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1486
- href: zod.ZodString;
1487
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1488
- templated: zod.ZodOptional<zod.ZodBoolean>;
1489
- }, "strip", zod.ZodTypeAny, {
1490
- href: string;
1491
- embeddable?: boolean | undefined;
1492
- templated?: boolean | undefined;
1493
- }, {
1494
- href: string;
1495
- embeddable?: boolean | undefined;
1496
- templated?: boolean | undefined;
1497
- }>, "many">>;
1498
- about: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1499
- href: zod.ZodString;
1500
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1501
- templated: zod.ZodOptional<zod.ZodBoolean>;
1502
- }, "strip", zod.ZodTypeAny, {
1503
- href: string;
1504
- embeddable?: boolean | undefined;
1505
- templated?: boolean | undefined;
1506
- }, {
1507
- href: string;
1508
- embeddable?: boolean | undefined;
1509
- templated?: boolean | undefined;
1510
- }>, "many">>;
1511
- author: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1512
- href: zod.ZodString;
1513
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1514
- templated: zod.ZodOptional<zod.ZodBoolean>;
1515
- }, "strip", zod.ZodTypeAny, {
1516
- href: string;
1517
- embeddable?: boolean | undefined;
1518
- templated?: boolean | undefined;
1519
- }, {
1520
- href: string;
1521
- embeddable?: boolean | undefined;
1522
- templated?: boolean | undefined;
1523
- }>, "many">>;
1524
- replies: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1525
- href: zod.ZodString;
1526
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1527
- templated: zod.ZodOptional<zod.ZodBoolean>;
1528
- }, "strip", zod.ZodTypeAny, {
1529
- href: string;
1530
- embeddable?: boolean | undefined;
1531
- templated?: boolean | undefined;
1532
- }, {
1533
- href: string;
1534
- embeddable?: boolean | undefined;
1535
- templated?: boolean | undefined;
1536
- }>, "many">>;
1537
- "wp:featuredmedia": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1538
- href: zod.ZodString;
1539
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1540
- templated: zod.ZodOptional<zod.ZodBoolean>;
1541
- }, "strip", zod.ZodTypeAny, {
1542
- href: string;
1543
- embeddable?: boolean | undefined;
1544
- templated?: boolean | undefined;
1545
- }, {
1546
- href: string;
1547
- embeddable?: boolean | undefined;
1548
- templated?: boolean | undefined;
1549
- }>, "many">>;
1550
- "wp:attachment": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1551
- href: zod.ZodString;
1552
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1553
- templated: zod.ZodOptional<zod.ZodBoolean>;
1554
- }, "strip", zod.ZodTypeAny, {
1555
- href: string;
1556
- embeddable?: boolean | undefined;
1557
- templated?: boolean | undefined;
1558
- }, {
1559
- href: string;
1560
- embeddable?: boolean | undefined;
1561
- templated?: boolean | undefined;
1562
- }>, "many">>;
1563
- "wp:term": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1564
- href: zod.ZodString;
1565
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1566
- templated: zod.ZodOptional<zod.ZodBoolean>;
1567
- }, "strip", zod.ZodTypeAny, {
1568
- href: string;
1569
- embeddable?: boolean | undefined;
1570
- templated?: boolean | undefined;
1571
- }, {
1572
- href: string;
1573
- embeddable?: boolean | undefined;
1574
- templated?: boolean | undefined;
1575
- }>, "many">>;
1576
- "wp:post_type": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1577
- href: zod.ZodString;
1578
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1579
- templated: zod.ZodOptional<zod.ZodBoolean>;
1580
- }, "strip", zod.ZodTypeAny, {
1581
- href: string;
1582
- embeddable?: boolean | undefined;
1583
- templated?: boolean | undefined;
1584
- }, {
1585
- href: string;
1586
- embeddable?: boolean | undefined;
1587
- templated?: boolean | undefined;
1588
- }>, "many">>;
1589
- curies: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1590
- name: zod.ZodString;
1591
- href: zod.ZodString;
1592
- templated: zod.ZodBoolean;
1593
- }, "strip", zod.ZodTypeAny, {
1594
- href: string;
1595
- templated: boolean;
1596
- name: string;
1597
- }, {
1598
- href: string;
1599
- templated: boolean;
1600
- name: string;
1601
- }>, "many">>;
1602
- }, zod.ZodTypeAny, "passthrough"> | undefined;
1603
- meta?: any;
1604
- capabilities?: Record<string, boolean> | undefined;
1605
- extra_capabilities?: Record<string, boolean> | undefined;
1606
- avatar_urls?: {
1607
- "24"?: string | undefined;
1608
- "48"?: string | undefined;
1609
- "96"?: string | undefined;
1610
- } | undefined;
1611
- }, Error>;
1612
- /**
1613
- * Hook for fetching a user by ID
1614
- *
1615
- * @param id - User ID
1616
- * @param options - React Query options
1617
- */
1618
- declare const useUser: (id: number, options?: UseUserOptions) => _tanstack_react_query.UseQueryResult<{
1619
- name: string;
1620
- id: number;
1621
- slug: string;
1622
- link: string;
1623
- description: string;
1624
- url: string;
1625
- first_name?: string | undefined;
1626
- last_name?: string | undefined;
1627
- email?: string | undefined;
1628
- username?: string | undefined;
1629
- _links?: zod.objectOutputType<{
1630
- self: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1631
- href: zod.ZodString;
1632
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1633
- templated: zod.ZodOptional<zod.ZodBoolean>;
1634
- }, "strip", zod.ZodTypeAny, {
1635
- href: string;
1636
- embeddable?: boolean | undefined;
1637
- templated?: boolean | undefined;
1638
- }, {
1639
- href: string;
1640
- embeddable?: boolean | undefined;
1641
- templated?: boolean | undefined;
1642
- }>, "many">>;
1643
- collection: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1644
- href: zod.ZodString;
1645
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1646
- templated: zod.ZodOptional<zod.ZodBoolean>;
1647
- }, "strip", zod.ZodTypeAny, {
1648
- href: string;
1649
- embeddable?: boolean | undefined;
1650
- templated?: boolean | undefined;
1651
- }, {
1652
- href: string;
1653
- embeddable?: boolean | undefined;
1654
- templated?: boolean | undefined;
1655
- }>, "many">>;
1656
- about: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1657
- href: zod.ZodString;
1658
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1659
- templated: zod.ZodOptional<zod.ZodBoolean>;
1660
- }, "strip", zod.ZodTypeAny, {
1661
- href: string;
1662
- embeddable?: boolean | undefined;
1663
- templated?: boolean | undefined;
1664
- }, {
1665
- href: string;
1666
- embeddable?: boolean | undefined;
1667
- templated?: boolean | undefined;
1668
- }>, "many">>;
1669
- author: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1670
- href: zod.ZodString;
1671
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1672
- templated: zod.ZodOptional<zod.ZodBoolean>;
1673
- }, "strip", zod.ZodTypeAny, {
1674
- href: string;
1675
- embeddable?: boolean | undefined;
1676
- templated?: boolean | undefined;
1677
- }, {
1678
- href: string;
1679
- embeddable?: boolean | undefined;
1680
- templated?: boolean | undefined;
1681
- }>, "many">>;
1682
- replies: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1683
- href: zod.ZodString;
1684
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1685
- templated: zod.ZodOptional<zod.ZodBoolean>;
1686
- }, "strip", zod.ZodTypeAny, {
1687
- href: string;
1688
- embeddable?: boolean | undefined;
1689
- templated?: boolean | undefined;
1690
- }, {
1691
- href: string;
1692
- embeddable?: boolean | undefined;
1693
- templated?: boolean | undefined;
1694
- }>, "many">>;
1695
- "wp:featuredmedia": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1696
- href: zod.ZodString;
1697
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1698
- templated: zod.ZodOptional<zod.ZodBoolean>;
1699
- }, "strip", zod.ZodTypeAny, {
1700
- href: string;
1701
- embeddable?: boolean | undefined;
1702
- templated?: boolean | undefined;
1703
- }, {
1704
- href: string;
1705
- embeddable?: boolean | undefined;
1706
- templated?: boolean | undefined;
1707
- }>, "many">>;
1708
- "wp:attachment": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1709
- href: zod.ZodString;
1710
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1711
- templated: zod.ZodOptional<zod.ZodBoolean>;
1712
- }, "strip", zod.ZodTypeAny, {
1713
- href: string;
1714
- embeddable?: boolean | undefined;
1715
- templated?: boolean | undefined;
1716
- }, {
1717
- href: string;
1718
- embeddable?: boolean | undefined;
1719
- templated?: boolean | undefined;
1720
- }>, "many">>;
1721
- "wp:term": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1722
- href: zod.ZodString;
1723
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1724
- templated: zod.ZodOptional<zod.ZodBoolean>;
1725
- }, "strip", zod.ZodTypeAny, {
1726
- href: string;
1727
- embeddable?: boolean | undefined;
1728
- templated?: boolean | undefined;
1729
- }, {
1730
- href: string;
1731
- embeddable?: boolean | undefined;
1732
- templated?: boolean | undefined;
1733
- }>, "many">>;
1734
- "wp:post_type": zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1735
- href: zod.ZodString;
1736
- embeddable: zod.ZodOptional<zod.ZodBoolean>;
1737
- templated: zod.ZodOptional<zod.ZodBoolean>;
1738
- }, "strip", zod.ZodTypeAny, {
1739
- href: string;
1740
- embeddable?: boolean | undefined;
1741
- templated?: boolean | undefined;
1742
- }, {
1743
- href: string;
1744
- embeddable?: boolean | undefined;
1745
- templated?: boolean | undefined;
1746
- }>, "many">>;
1747
- curies: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1748
- name: zod.ZodString;
1749
- href: zod.ZodString;
1750
- templated: zod.ZodBoolean;
1751
- }, "strip", zod.ZodTypeAny, {
1752
- href: string;
1753
- templated: boolean;
1754
- name: string;
1755
- }, {
1756
- href: string;
1757
- templated: boolean;
1758
- name: string;
1759
- }>, "many">>;
1760
- }, zod.ZodTypeAny, "passthrough"> | undefined;
1761
- meta?: any;
1762
- locale?: string | undefined;
1763
- nickname?: string | undefined;
1764
- registered_date?: string | undefined;
1765
- roles?: string[] | undefined;
1766
- capabilities?: Record<string, boolean> | undefined;
1767
- extra_capabilities?: Record<string, boolean> | undefined;
1768
- avatar_urls?: {
1769
- "24"?: string | undefined;
1770
- "48"?: string | undefined;
1771
- "96"?: string | undefined;
1772
- } | undefined;
1773
- }, Error>;
1774
-
1775
- type UseLoginOptions = Omit<UseMutationOptions<JwtTokenResponse, Error, JwtLoginInput>, 'mutationFn'>;
1776
- /**
1777
- * Hook for logging in with username/password
1778
- *
1779
- * Returns JWT token on success
1780
- *
1781
- * @param options - React Query mutation options
1782
- *
1783
- * @example
1784
- * ```tsx
1785
- * const { mutate: login, isPending } = useLogin({
1786
- * onSuccess: (data) => {
1787
- * // Save token to storage
1788
- * AsyncStorage.setItem('wp_jwt_token', data.token);
1789
- * },
1790
- * onError: (error) => {
1791
- * // Handle login error
1792
- * Alert.alert('Error', error.message);
1793
- * },
1794
- * });
1795
- *
1796
- * login({ username: 'user', password: 'pass' });
1797
- * ```
1798
- */
1799
- declare const useLogin: (options?: UseLoginOptions) => _tanstack_react_query.UseMutationResult<{
1800
- token: string;
1801
- user_email: string;
1802
- user_nicename: string;
1803
- user_display_name: string;
1804
- }, Error, {
1805
- username: string;
1806
- password: string;
1807
- }, unknown>;
1808
- /**
1809
- * Hook for validating current JWT token
1810
- *
1811
- * @param options - React Query mutation options
1812
- */
1813
- declare const useValidateToken: (options?: Omit<UseMutationOptions<boolean, Error, void>, "mutationFn">) => _tanstack_react_query.UseMutationResult<boolean, Error, void, unknown>;
1814
-
1815
- export { QueryKeys, useCategories, useCategory, useCurrentUser, useInfiniteCategories, useInfinitePosts, useLogin, useMediaItem, usePost, usePostBySlug, usePosts, useUser, useValidateToken, useWordPressClient, useWordPressQueryKeys };
1
+ export { u as useCategories, a as useCategory, b as useCurrentUser, c as useInfiniteCategories, d as useInfinitePosts, e as useLogin, f as useMediaItem, g as usePost, h as usePostBySlug, i as usePosts, j as useUser, k as useValidateToken, l as useWordPressClient, m as useWordPressQueryKeys } from '../index-Cc8n-JUw.cjs';
2
+ export { Q as QueryKeys, c as createQueryKeys } from '../queryKeys-ByTaglNR.cjs';
3
+ import '@atomic-solutions/wordpress-api-client';
4
+ import '@tanstack/react-query';
5
+ import 'zod';