kizlo 0.17.0 → 0.18.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,268 @@
1
+ import { WP_CustomFields } from "../wordpress/types.js";
2
+ import "../wordpress/index.js";
3
+ import * as _kizlo_shared7 from "@kizlo/shared";
4
+ import z from "zod/v4";
5
+
6
+ //#region src/post/schema.d.ts
7
+
8
+ type PostCustomFields = WP_CustomFields<"postTypes.post">;
9
+ declare const PostCustomFieldsSchema: z.ZodType<PostCustomFields, PostCustomFields>;
10
+ declare const Post: z.ZodObject<{
11
+ id: z.ZodNumber;
12
+ slug: z.ZodString;
13
+ url: z.ZodNullable<z.ZodString>;
14
+ parent: z.ZodNullable<z.ZodNumber>;
15
+ title: z.ZodNullable<z.ZodString>;
16
+ content: z.ZodNullable<z.ZodString>;
17
+ excerpt: z.ZodNullable<z.ZodString>;
18
+ commentsEnabled: z.ZodBoolean;
19
+ protected: z.ZodBoolean;
20
+ preview: z.ZodBoolean;
21
+ status: z.ZodEnum<{
22
+ publish: "publish";
23
+ future: "future";
24
+ draft: "draft";
25
+ pending: "pending";
26
+ private: "private";
27
+ }>;
28
+ format: z.ZodEnum<{
29
+ status: "status";
30
+ standard: "standard";
31
+ aside: "aside";
32
+ chat: "chat";
33
+ gallery: "gallery";
34
+ link: "link";
35
+ image: "image";
36
+ quote: "quote";
37
+ video: "video";
38
+ audio: "audio";
39
+ }>;
40
+ sticky: z.ZodBoolean;
41
+ author: z.ZodNullable<z.ZodObject<{
42
+ id: z.ZodNumber;
43
+ name: z.ZodString;
44
+ slug: z.ZodString;
45
+ avatarUrl: z.ZodNullable<z.ZodString>;
46
+ }, z.core.$strip>>;
47
+ featuredMedia: z.ZodNullable<z.ZodObject<{
48
+ id: z.ZodNumber;
49
+ name: z.ZodString;
50
+ src: z.ZodString;
51
+ mime: z.ZodOptional<z.ZodString>;
52
+ type: z.ZodLiteral<"image">;
53
+ alt: z.ZodString;
54
+ width: z.ZodOptional<z.ZodNumber>;
55
+ height: z.ZodOptional<z.ZodNumber>;
56
+ variants: z.ZodOptional<z.ZodArray<z.ZodObject<{
57
+ src: z.ZodString;
58
+ width: z.ZodNumber;
59
+ height: z.ZodNumber;
60
+ }, z.core.$strict>>>;
61
+ srcset: z.ZodOptional<z.ZodString>;
62
+ }, z.core.$strict>>;
63
+ categories: z.ZodArray<z.ZodObject<{
64
+ id: z.ZodNumber;
65
+ name: z.ZodString;
66
+ slug: z.ZodString;
67
+ }, z.core.$strip>>;
68
+ tags: z.ZodArray<z.ZodObject<{
69
+ id: z.ZodNumber;
70
+ name: z.ZodString;
71
+ slug: z.ZodString;
72
+ }, z.core.$strip>>;
73
+ seo: z.ZodNullable<z.ZodObject<{
74
+ head: z.ZodObject<{
75
+ title: z.ZodString;
76
+ canonical: z.ZodString;
77
+ robots: z.ZodObject<{
78
+ index: z.ZodString;
79
+ follow: z.ZodString;
80
+ maxSnippet: z.ZodString;
81
+ maxImagePreview: z.ZodString;
82
+ maxVideoPreview: z.ZodString;
83
+ }, z.core.$strip>;
84
+ og: z.ZodObject<{
85
+ locale: z.ZodString;
86
+ type: z.ZodString;
87
+ title: z.ZodString;
88
+ url: z.ZodString;
89
+ siteName: z.ZodString;
90
+ description: z.ZodString;
91
+ image: z.ZodNullable<z.ZodObject<{
92
+ url: z.ZodString;
93
+ width: z.ZodNullable<z.ZodNumber>;
94
+ height: z.ZodNullable<z.ZodNumber>;
95
+ type: z.ZodNullable<z.ZodString>;
96
+ alt: z.ZodNullable<z.ZodString>;
97
+ }, z.core.$strip>>;
98
+ }, z.core.$strip>;
99
+ twitter: z.ZodObject<{
100
+ card: z.ZodEnum<{
101
+ summary: "summary";
102
+ summary_large_image: "summary_large_image";
103
+ }>;
104
+ title: z.ZodString;
105
+ site: z.ZodNullable<z.ZodString>;
106
+ creator: z.ZodNullable<z.ZodString>;
107
+ description: z.ZodString;
108
+ image: z.ZodNullable<z.ZodString>;
109
+ imageAlt: z.ZodNullable<z.ZodString>;
110
+ }, z.core.$strip>;
111
+ article: z.ZodNullable<z.ZodObject<{
112
+ publishedTime: z.ZodString;
113
+ modifiedTime: z.ZodString;
114
+ author: z.ZodString;
115
+ authorUrl: z.ZodString;
116
+ section: z.ZodString;
117
+ tags: z.ZodArray<z.ZodString>;
118
+ }, z.core.$strip>>;
119
+ }, z.core.$strip>;
120
+ schema: z.ZodObject<{
121
+ "@context": z.ZodLiteral<"https://schema.org">;
122
+ "@graph": z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
123
+ }, z.core.$strip>;
124
+ }, z.core.$strip>>;
125
+ custom: z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>;
126
+ createdAt: z.ZodNumber;
127
+ updatedAt: z.ZodNumber;
128
+ meta: z.ZodRecord<z.ZodString, z.ZodType<_kizlo_shared7.JSONValue, unknown, z.core.$ZodTypeInternals<_kizlo_shared7.JSONValue, unknown>>>;
129
+ }, z.core.$strip>;
130
+ type Post = Omit<z.output<typeof Post>, "custom"> & {
131
+ custom: PostCustomFields;
132
+ };
133
+ declare const PostList: z.ZodObject<{
134
+ items: z.ZodArray<z.ZodObject<{
135
+ id: z.ZodNumber;
136
+ slug: z.ZodString;
137
+ url: z.ZodNullable<z.ZodString>;
138
+ parent: z.ZodNullable<z.ZodNumber>;
139
+ title: z.ZodNullable<z.ZodString>;
140
+ content: z.ZodNullable<z.ZodString>;
141
+ excerpt: z.ZodNullable<z.ZodString>;
142
+ commentsEnabled: z.ZodBoolean;
143
+ protected: z.ZodBoolean;
144
+ preview: z.ZodBoolean;
145
+ status: z.ZodEnum<{
146
+ publish: "publish";
147
+ future: "future";
148
+ draft: "draft";
149
+ pending: "pending";
150
+ private: "private";
151
+ }>;
152
+ format: z.ZodEnum<{
153
+ status: "status";
154
+ standard: "standard";
155
+ aside: "aside";
156
+ chat: "chat";
157
+ gallery: "gallery";
158
+ link: "link";
159
+ image: "image";
160
+ quote: "quote";
161
+ video: "video";
162
+ audio: "audio";
163
+ }>;
164
+ sticky: z.ZodBoolean;
165
+ author: z.ZodNullable<z.ZodObject<{
166
+ id: z.ZodNumber;
167
+ name: z.ZodString;
168
+ slug: z.ZodString;
169
+ avatarUrl: z.ZodNullable<z.ZodString>;
170
+ }, z.core.$strip>>;
171
+ featuredMedia: z.ZodNullable<z.ZodObject<{
172
+ id: z.ZodNumber;
173
+ name: z.ZodString;
174
+ src: z.ZodString;
175
+ mime: z.ZodOptional<z.ZodString>;
176
+ type: z.ZodLiteral<"image">;
177
+ alt: z.ZodString;
178
+ width: z.ZodOptional<z.ZodNumber>;
179
+ height: z.ZodOptional<z.ZodNumber>;
180
+ variants: z.ZodOptional<z.ZodArray<z.ZodObject<{
181
+ src: z.ZodString;
182
+ width: z.ZodNumber;
183
+ height: z.ZodNumber;
184
+ }, z.core.$strict>>>;
185
+ srcset: z.ZodOptional<z.ZodString>;
186
+ }, z.core.$strict>>;
187
+ categories: z.ZodArray<z.ZodObject<{
188
+ id: z.ZodNumber;
189
+ name: z.ZodString;
190
+ slug: z.ZodString;
191
+ }, z.core.$strip>>;
192
+ tags: z.ZodArray<z.ZodObject<{
193
+ id: z.ZodNumber;
194
+ name: z.ZodString;
195
+ slug: z.ZodString;
196
+ }, z.core.$strip>>;
197
+ seo: z.ZodNullable<z.ZodObject<{
198
+ head: z.ZodObject<{
199
+ title: z.ZodString;
200
+ canonical: z.ZodString;
201
+ robots: z.ZodObject<{
202
+ index: z.ZodString;
203
+ follow: z.ZodString;
204
+ maxSnippet: z.ZodString;
205
+ maxImagePreview: z.ZodString;
206
+ maxVideoPreview: z.ZodString;
207
+ }, z.core.$strip>;
208
+ og: z.ZodObject<{
209
+ locale: z.ZodString;
210
+ type: z.ZodString;
211
+ title: z.ZodString;
212
+ url: z.ZodString;
213
+ siteName: z.ZodString;
214
+ description: z.ZodString;
215
+ image: z.ZodNullable<z.ZodObject<{
216
+ url: z.ZodString;
217
+ width: z.ZodNullable<z.ZodNumber>;
218
+ height: z.ZodNullable<z.ZodNumber>;
219
+ type: z.ZodNullable<z.ZodString>;
220
+ alt: z.ZodNullable<z.ZodString>;
221
+ }, z.core.$strip>>;
222
+ }, z.core.$strip>;
223
+ twitter: z.ZodObject<{
224
+ card: z.ZodEnum<{
225
+ summary: "summary";
226
+ summary_large_image: "summary_large_image";
227
+ }>;
228
+ title: z.ZodString;
229
+ site: z.ZodNullable<z.ZodString>;
230
+ creator: z.ZodNullable<z.ZodString>;
231
+ description: z.ZodString;
232
+ image: z.ZodNullable<z.ZodString>;
233
+ imageAlt: z.ZodNullable<z.ZodString>;
234
+ }, z.core.$strip>;
235
+ article: z.ZodNullable<z.ZodObject<{
236
+ publishedTime: z.ZodString;
237
+ modifiedTime: z.ZodString;
238
+ author: z.ZodString;
239
+ authorUrl: z.ZodString;
240
+ section: z.ZodString;
241
+ tags: z.ZodArray<z.ZodString>;
242
+ }, z.core.$strip>>;
243
+ }, z.core.$strip>;
244
+ schema: z.ZodObject<{
245
+ "@context": z.ZodLiteral<"https://schema.org">;
246
+ "@graph": z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
247
+ }, z.core.$strip>;
248
+ }, z.core.$strip>>;
249
+ custom: z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>;
250
+ createdAt: z.ZodNumber;
251
+ updatedAt: z.ZodNumber;
252
+ meta: z.ZodRecord<z.ZodString, z.ZodType<_kizlo_shared7.JSONValue, unknown, z.core.$ZodTypeInternals<_kizlo_shared7.JSONValue, unknown>>>;
253
+ }, z.core.$strip>>;
254
+ meta: z.ZodObject<{
255
+ page: z.ZodNumber;
256
+ totalItems: z.ZodNumber;
257
+ totalPages: z.ZodNumber;
258
+ nextPage: z.ZodNullable<z.ZodNumber>;
259
+ prevPage: z.ZodNullable<z.ZodNumber>;
260
+ hasNextPage: z.ZodBoolean;
261
+ hasPrevPage: z.ZodBoolean;
262
+ }, z.core.$strip>;
263
+ }, z.core.$strip>;
264
+ type PostList = Omit<z.output<typeof PostList>, "items"> & {
265
+ items: Post[];
266
+ };
267
+ //#endregion
268
+ export { Post, PostCustomFields, PostCustomFieldsSchema, PostList };
@@ -1,5 +1,5 @@
1
- import { IdentifierInput, ListMetadata, ListOrder, customFieldsSchema } from "../shared/schema.js";
2
1
  import { Seo } from "../seo/schema.js";
2
+ import { IdentifierInput, ListMetadata, ListOrder, customFieldsSchema } from "../shared/schema.js";
3
3
  import { BooleanLike, MediaImage, Metadata, NumberLike, arrayable, lenient } from "@kizlo/shared";
4
4
  import z from "zod/v4";
5
5
 
@@ -55,6 +55,7 @@ const PostTagRef = z.object({
55
55
  name: z.string(),
56
56
  slug: z.string()
57
57
  });
58
+ const PostCustomFieldsSchema = customFieldsSchema();
58
59
  const Post = z.object({
59
60
  id: z.number(),
60
61
  slug: z.string(),
@@ -74,7 +75,7 @@ const Post = z.object({
74
75
  categories: z.array(PostCategoryRef),
75
76
  tags: z.array(PostTagRef),
76
77
  seo: Seo.nullable(),
77
- custom: customFieldsSchema(),
78
+ custom: PostCustomFieldsSchema,
78
79
  createdAt: z.number(),
79
80
  updatedAt: z.number(),
80
81
  meta: Metadata
@@ -121,4 +122,4 @@ const ListPostInput = z.object({
121
122
  });
122
123
 
123
124
  //#endregion
124
- export { ListPostInput, Post, PostList, RetrievePostInput };
125
+ export { ListPostInput, Post, PostCustomFieldsSchema, PostList, RetrievePostInput };