@studiocms/devapps 0.1.0-beta.10

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,57 @@
1
+ import {
2
+ importPagesFromWPAPI,
3
+ importPostsFromWPAPI,
4
+ importSettingsFromWPAPI
5
+ } from "../utils/wp-api/index.js";
6
+ const POST = async ({ request }) => {
7
+ const data = await request.formData();
8
+ const url = data.get("url");
9
+ const type = data.get("type");
10
+ const useBlogPlugin = data.get("useBlogPlugin");
11
+ if (!url || !type) {
12
+ return new Response(null, {
13
+ status: 400,
14
+ statusText: "Bad Request",
15
+ headers: {
16
+ "Content-Type": "application/json",
17
+ "Access-Control-Allow-Headers": "*"
18
+ }
19
+ });
20
+ }
21
+ if (typeof url !== "string" || typeof type !== "string") {
22
+ return new Response(null, {
23
+ status: 400,
24
+ statusText: "Bad Request",
25
+ headers: {
26
+ "Content-Type": "application/json",
27
+ "Access-Control-Allow-Headers": "*"
28
+ }
29
+ });
30
+ }
31
+ console.log("Starting Import:", url, "\n Type:", type, "\n useBlogPlugin:", useBlogPlugin);
32
+ const useBlogPluginValue = useBlogPlugin === "true";
33
+ switch (type) {
34
+ case "pages":
35
+ await importPagesFromWPAPI(url);
36
+ break;
37
+ case "posts":
38
+ await importPostsFromWPAPI(url, useBlogPluginValue);
39
+ break;
40
+ case "settings":
41
+ await importSettingsFromWPAPI(url);
42
+ break;
43
+ default:
44
+ throw new Error("Invalid import type");
45
+ }
46
+ return new Response(null, {
47
+ status: 200,
48
+ statusText: "success",
49
+ headers: {
50
+ "Content-Type": "application/json",
51
+ "Access-Control-Allow-Headers": "*"
52
+ }
53
+ });
54
+ };
55
+ export {
56
+ POST
57
+ };
@@ -0,0 +1,152 @@
1
+ import { z } from 'astro/zod';
2
+ /**
3
+ * Schema for the configuration of StudioCMS development applications.
4
+ *
5
+ * This schema defines the configuration options for the following applications:
6
+ *
7
+ * - **Astro DB LibSQL Viewer App**: Controlled by the `libSQLViewer` property.
8
+ * - **StudioCMS WP API Importer App**: Controlled by the `wpImporter` property.
9
+ *
10
+ * The schema provides default values and transformation logic to ensure the configuration
11
+ * is in the expected format.
12
+ *
13
+ * @property libSQLViewer - Configuration for the Astro DB LibSQL Viewer App.
14
+ * - `boolean` - Indicates whether the app is enabled. Defaults to `true`.
15
+ *
16
+ * @property wpImporter - Configuration for the StudioCMS WP API Importer App.
17
+ * - `boolean` - Indicates whether the app is enabled.
18
+ * - `object` - Contains additional configuration options:
19
+ * - `endpoint` - The API endpoint for the importer. Defaults to `'wp-api-importer'`.
20
+ *
21
+ * @returns An object with the transformed configuration:
22
+ * - `libSQLViewer` - An object with an `enabled` property indicating the app's status.
23
+ * - `wpImporter` - An object with `enabled` and `endpoint` properties for the app's configuration.
24
+ */
25
+ export declare const AppsConfigSchema: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodObject<{
26
+ /**
27
+ * Astro DB LibSQL Viewer App Config
28
+ */
29
+ libSQLViewer: z.ZodDefault<z.ZodBoolean>;
30
+ /**
31
+ * StudioCMS WP API Importer App Config
32
+ */
33
+ wpImporter: z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
34
+ endpoint: z.ZodDefault<z.ZodOptional<z.ZodString>>;
35
+ }, "strip", z.ZodTypeAny, {
36
+ endpoint: string;
37
+ }, {
38
+ endpoint?: string | undefined;
39
+ }>]>;
40
+ }, "strip", z.ZodTypeAny, {
41
+ libSQLViewer: boolean;
42
+ wpImporter: boolean | {
43
+ endpoint: string;
44
+ };
45
+ }, {
46
+ wpImporter: boolean | {
47
+ endpoint?: string | undefined;
48
+ };
49
+ libSQLViewer?: boolean | undefined;
50
+ }>>>, {
51
+ libSQLViewer: {
52
+ enabled: boolean;
53
+ };
54
+ wpImporter: {
55
+ enabled: boolean;
56
+ endpoint: string;
57
+ };
58
+ }, {
59
+ wpImporter: boolean | {
60
+ endpoint?: string | undefined;
61
+ };
62
+ libSQLViewer?: boolean | undefined;
63
+ } | undefined>;
64
+ /**
65
+ * Schema definition for StudioCMS development applications configuration.
66
+ *
67
+ * This schema defines the structure of the configuration object for StudioCMS
68
+ * development applications. It includes the following properties:
69
+ *
70
+ * - `endpoint` (optional): A string representing the endpoint for the dev apps.
71
+ * Defaults to '_studiocms-devapps'.
72
+ * - `verbose` (optional): A boolean indicating whether verbose logging is enabled.
73
+ * Defaults to `false`.
74
+ * - `appsConfig`: The configuration schema for the applications.
75
+ *
76
+ * The entire schema is optional and defaults to an empty object if not provided.
77
+ */
78
+ export declare const StudioCMSDevAppsSchema: z.ZodDefault<z.ZodOptional<z.ZodObject<{
79
+ endpoint: z.ZodDefault<z.ZodOptional<z.ZodString>>;
80
+ verbose: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
81
+ appsConfig: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodObject<{
82
+ /**
83
+ * Astro DB LibSQL Viewer App Config
84
+ */
85
+ libSQLViewer: z.ZodDefault<z.ZodBoolean>;
86
+ /**
87
+ * StudioCMS WP API Importer App Config
88
+ */
89
+ wpImporter: z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
90
+ endpoint: z.ZodDefault<z.ZodOptional<z.ZodString>>;
91
+ }, "strip", z.ZodTypeAny, {
92
+ endpoint: string;
93
+ }, {
94
+ endpoint?: string | undefined;
95
+ }>]>;
96
+ }, "strip", z.ZodTypeAny, {
97
+ libSQLViewer: boolean;
98
+ wpImporter: boolean | {
99
+ endpoint: string;
100
+ };
101
+ }, {
102
+ wpImporter: boolean | {
103
+ endpoint?: string | undefined;
104
+ };
105
+ libSQLViewer?: boolean | undefined;
106
+ }>>>, {
107
+ libSQLViewer: {
108
+ enabled: boolean;
109
+ };
110
+ wpImporter: {
111
+ enabled: boolean;
112
+ endpoint: string;
113
+ };
114
+ }, {
115
+ wpImporter: boolean | {
116
+ endpoint?: string | undefined;
117
+ };
118
+ libSQLViewer?: boolean | undefined;
119
+ } | undefined>;
120
+ }, "strip", z.ZodTypeAny, {
121
+ endpoint: string;
122
+ verbose: boolean;
123
+ appsConfig: {
124
+ libSQLViewer: {
125
+ enabled: boolean;
126
+ };
127
+ wpImporter: {
128
+ enabled: boolean;
129
+ endpoint: string;
130
+ };
131
+ };
132
+ }, {
133
+ endpoint?: string | undefined;
134
+ verbose?: boolean | undefined;
135
+ appsConfig?: {
136
+ wpImporter: boolean | {
137
+ endpoint?: string | undefined;
138
+ };
139
+ libSQLViewer?: boolean | undefined;
140
+ } | undefined;
141
+ }>>>;
142
+ /**
143
+ * Represents the options for StudioCMS development applications.
144
+ *
145
+ * This type is derived from the `_input` property of the `StudioCMSDevAppsSchema` object.
146
+ */
147
+ export type StudioCMSDevAppsOptions = typeof StudioCMSDevAppsSchema._input;
148
+ /**
149
+ * Represents the configuration type for StudioCMS development applications.
150
+ * This type is derived from the output of the `StudioCMSDevAppsSchema`.
151
+ */
152
+ export type StudioCMSDevAppsConfig = z.infer<typeof StudioCMSDevAppsSchema>;
@@ -0,0 +1,45 @@
1
+ import { z } from "astro/zod";
2
+ const AppsConfigSchema = z.object({
3
+ /**
4
+ * Astro DB LibSQL Viewer App Config
5
+ */
6
+ libSQLViewer: z.boolean().default(true),
7
+ /**
8
+ * StudioCMS WP API Importer App Config
9
+ */
10
+ wpImporter: z.union([
11
+ z.boolean(),
12
+ z.object({
13
+ endpoint: z.string().optional().default("wp-api-importer")
14
+ })
15
+ ])
16
+ }).optional().default({
17
+ wpImporter: { endpoint: "wp-api-importer" },
18
+ libSQLViewer: true
19
+ }).transform((val) => {
20
+ let libSQL;
21
+ let wpAPI;
22
+ if (typeof val.libSQLViewer === "boolean") {
23
+ libSQL = { enabled: val.libSQLViewer };
24
+ } else {
25
+ libSQL = { enabled: true };
26
+ }
27
+ if (typeof val.wpImporter === "boolean") {
28
+ wpAPI = { enabled: val.wpImporter, endpoint: "wp-api-importer" };
29
+ } else {
30
+ wpAPI = { enabled: true, endpoint: val.wpImporter.endpoint };
31
+ }
32
+ return {
33
+ libSQLViewer: libSQL,
34
+ wpImporter: wpAPI
35
+ };
36
+ });
37
+ const StudioCMSDevAppsSchema = z.object({
38
+ endpoint: z.string().optional().default("_studiocms-devapps"),
39
+ verbose: z.boolean().optional().default(false),
40
+ appsConfig: AppsConfigSchema
41
+ }).optional().default({});
42
+ export {
43
+ AppsConfigSchema,
44
+ StudioCMSDevAppsSchema
45
+ };
@@ -0,0 +1,439 @@
1
+ import { z } from 'astro/zod';
2
+ /**
3
+ * Schema definition for a WordPress Page object.
4
+ *
5
+ * This schema validates the structure of a WordPress Page object, ensuring that
6
+ * all required fields are present and have the correct types.
7
+ *
8
+ * Properties:
9
+ * - `id`: The unique identifier for the page (number).
10
+ * - `date`: The date the page was created (Date).
11
+ * - `date_gmt`: The date the page was created in GMT (Date).
12
+ * - `guid`: The globally unique identifier for the page, containing a rendered string.
13
+ * - `modified`: The date the page was last modified (Date).
14
+ * - `modified_gmt`: The date the page was last modified in GMT (Date).
15
+ * - `slug`: The URL-friendly slug for the page (string).
16
+ * - `status`: The status of the page, which can be 'publish', 'future', 'draft', 'pending', or 'private'.
17
+ * - `type`: The type of the page (string).
18
+ * - `title`: The title of the page, containing a rendered string.
19
+ * - `content`: The content of the page, containing a rendered string and a boolean indicating if it is protected.
20
+ * - `excerpt`: The excerpt of the page, containing a rendered string and a boolean indicating if it is protected.
21
+ * - `author`: The ID of the author of the page (number).
22
+ * - `featured_media`: The ID of the featured media for the page (number).
23
+ * - `parent`: The ID of the parent page (number).
24
+ * - `menu_order`: The order of the page in the menu (number).
25
+ * - `comment_status`: The comment status of the page, which can be 'open' or 'closed'.
26
+ * - `ping_status`: The ping status of the page, which can be 'open' or 'closed'.
27
+ * - `template`: The template used for the page (string).
28
+ * - `meta`: An array of metadata associated with the page, which can be any type or a record of any type.
29
+ */
30
+ export declare const PageSchema: z.ZodObject<{
31
+ id: z.ZodNumber;
32
+ date: z.ZodDate;
33
+ date_gmt: z.ZodDate;
34
+ guid: z.ZodObject<{
35
+ rendered: z.ZodString;
36
+ }, "strip", z.ZodTypeAny, {
37
+ rendered: string;
38
+ }, {
39
+ rendered: string;
40
+ }>;
41
+ modified: z.ZodDate;
42
+ modified_gmt: z.ZodDate;
43
+ slug: z.ZodString;
44
+ status: z.ZodEnum<["publish", "future", "draft", "pending", "private"]>;
45
+ type: z.ZodString;
46
+ title: z.ZodObject<{
47
+ rendered: z.ZodString;
48
+ }, "strip", z.ZodTypeAny, {
49
+ rendered: string;
50
+ }, {
51
+ rendered: string;
52
+ }>;
53
+ content: z.ZodObject<{
54
+ rendered: z.ZodString;
55
+ protected: z.ZodBoolean;
56
+ }, "strip", z.ZodTypeAny, {
57
+ rendered: string;
58
+ protected: boolean;
59
+ }, {
60
+ rendered: string;
61
+ protected: boolean;
62
+ }>;
63
+ excerpt: z.ZodObject<{
64
+ rendered: z.ZodString;
65
+ protected: z.ZodBoolean;
66
+ }, "strip", z.ZodTypeAny, {
67
+ rendered: string;
68
+ protected: boolean;
69
+ }, {
70
+ rendered: string;
71
+ protected: boolean;
72
+ }>;
73
+ author: z.ZodNumber;
74
+ featured_media: z.ZodNumber;
75
+ parent: z.ZodNumber;
76
+ menu_order: z.ZodNumber;
77
+ comment_status: z.ZodEnum<["open", "closed", ""]>;
78
+ ping_status: z.ZodEnum<["open", "closed", ""]>;
79
+ template: z.ZodString;
80
+ meta: z.ZodArray<z.ZodUnion<[z.ZodAny, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
81
+ }, "strip", z.ZodTypeAny, {
82
+ status: "publish" | "future" | "draft" | "pending" | "private";
83
+ type: string;
84
+ date: Date;
85
+ meta: any[];
86
+ template: string;
87
+ title: {
88
+ rendered: string;
89
+ };
90
+ content: {
91
+ rendered: string;
92
+ protected: boolean;
93
+ };
94
+ id: number;
95
+ date_gmt: Date;
96
+ guid: {
97
+ rendered: string;
98
+ };
99
+ modified: Date;
100
+ modified_gmt: Date;
101
+ slug: string;
102
+ excerpt: {
103
+ rendered: string;
104
+ protected: boolean;
105
+ };
106
+ author: number;
107
+ featured_media: number;
108
+ parent: number;
109
+ menu_order: number;
110
+ comment_status: "" | "open" | "closed";
111
+ ping_status: "" | "open" | "closed";
112
+ }, {
113
+ status: "publish" | "future" | "draft" | "pending" | "private";
114
+ type: string;
115
+ date: Date;
116
+ meta: any[];
117
+ template: string;
118
+ title: {
119
+ rendered: string;
120
+ };
121
+ content: {
122
+ rendered: string;
123
+ protected: boolean;
124
+ };
125
+ id: number;
126
+ date_gmt: Date;
127
+ guid: {
128
+ rendered: string;
129
+ };
130
+ modified: Date;
131
+ modified_gmt: Date;
132
+ slug: string;
133
+ excerpt: {
134
+ rendered: string;
135
+ protected: boolean;
136
+ };
137
+ author: number;
138
+ featured_media: number;
139
+ parent: number;
140
+ menu_order: number;
141
+ comment_status: "" | "open" | "closed";
142
+ ping_status: "" | "open" | "closed";
143
+ }>;
144
+ /**
145
+ * Extends the PageSchema to define the schema for a WordPress Post.
146
+ *
147
+ * Properties:
148
+ * - `format`: Enum representing the format of the post. Possible values are:
149
+ * - 'standard'
150
+ * - 'aside'
151
+ * - 'chat'
152
+ * - 'gallery'
153
+ * - 'link'
154
+ * - 'image'
155
+ * - 'quote'
156
+ * - 'status'
157
+ * - 'video'
158
+ * - 'audio'
159
+ * - ''
160
+ * - `categories`: Array of numbers representing the categories assigned to the post.
161
+ * - `tags`: Array of numbers representing the tags assigned to the post.
162
+ */
163
+ export declare const PostSchema: z.ZodObject<z.objectUtil.extendShape<{
164
+ id: z.ZodNumber;
165
+ date: z.ZodDate;
166
+ date_gmt: z.ZodDate;
167
+ guid: z.ZodObject<{
168
+ rendered: z.ZodString;
169
+ }, "strip", z.ZodTypeAny, {
170
+ rendered: string;
171
+ }, {
172
+ rendered: string;
173
+ }>;
174
+ modified: z.ZodDate;
175
+ modified_gmt: z.ZodDate;
176
+ slug: z.ZodString;
177
+ status: z.ZodEnum<["publish", "future", "draft", "pending", "private"]>;
178
+ type: z.ZodString;
179
+ title: z.ZodObject<{
180
+ rendered: z.ZodString;
181
+ }, "strip", z.ZodTypeAny, {
182
+ rendered: string;
183
+ }, {
184
+ rendered: string;
185
+ }>;
186
+ content: z.ZodObject<{
187
+ rendered: z.ZodString;
188
+ protected: z.ZodBoolean;
189
+ }, "strip", z.ZodTypeAny, {
190
+ rendered: string;
191
+ protected: boolean;
192
+ }, {
193
+ rendered: string;
194
+ protected: boolean;
195
+ }>;
196
+ excerpt: z.ZodObject<{
197
+ rendered: z.ZodString;
198
+ protected: z.ZodBoolean;
199
+ }, "strip", z.ZodTypeAny, {
200
+ rendered: string;
201
+ protected: boolean;
202
+ }, {
203
+ rendered: string;
204
+ protected: boolean;
205
+ }>;
206
+ author: z.ZodNumber;
207
+ featured_media: z.ZodNumber;
208
+ parent: z.ZodNumber;
209
+ menu_order: z.ZodNumber;
210
+ comment_status: z.ZodEnum<["open", "closed", ""]>;
211
+ ping_status: z.ZodEnum<["open", "closed", ""]>;
212
+ template: z.ZodString;
213
+ meta: z.ZodArray<z.ZodUnion<[z.ZodAny, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
214
+ }, {
215
+ format: z.ZodEnum<["standard", "aside", "chat", "gallery", "link", "image", "quote", "status", "video", "audio", ""]>;
216
+ categories: z.ZodArray<z.ZodNumber, "many">;
217
+ tags: z.ZodArray<z.ZodNumber, "many">;
218
+ }>, "strip", z.ZodTypeAny, {
219
+ status: "publish" | "future" | "draft" | "pending" | "private";
220
+ type: string;
221
+ date: Date;
222
+ meta: any[];
223
+ template: string;
224
+ title: {
225
+ rendered: string;
226
+ };
227
+ content: {
228
+ rendered: string;
229
+ protected: boolean;
230
+ };
231
+ id: number;
232
+ date_gmt: Date;
233
+ guid: {
234
+ rendered: string;
235
+ };
236
+ modified: Date;
237
+ modified_gmt: Date;
238
+ slug: string;
239
+ excerpt: {
240
+ rendered: string;
241
+ protected: boolean;
242
+ };
243
+ author: number;
244
+ featured_media: number;
245
+ parent: number;
246
+ menu_order: number;
247
+ comment_status: "" | "open" | "closed";
248
+ ping_status: "" | "open" | "closed";
249
+ format: "" | "status" | "image" | "aside" | "audio" | "link" | "video" | "standard" | "chat" | "gallery" | "quote";
250
+ categories: number[];
251
+ tags: number[];
252
+ }, {
253
+ status: "publish" | "future" | "draft" | "pending" | "private";
254
+ type: string;
255
+ date: Date;
256
+ meta: any[];
257
+ template: string;
258
+ title: {
259
+ rendered: string;
260
+ };
261
+ content: {
262
+ rendered: string;
263
+ protected: boolean;
264
+ };
265
+ id: number;
266
+ date_gmt: Date;
267
+ guid: {
268
+ rendered: string;
269
+ };
270
+ modified: Date;
271
+ modified_gmt: Date;
272
+ slug: string;
273
+ excerpt: {
274
+ rendered: string;
275
+ protected: boolean;
276
+ };
277
+ author: number;
278
+ featured_media: number;
279
+ parent: number;
280
+ menu_order: number;
281
+ comment_status: "" | "open" | "closed";
282
+ ping_status: "" | "open" | "closed";
283
+ format: "" | "status" | "image" | "aside" | "audio" | "link" | "video" | "standard" | "chat" | "gallery" | "quote";
284
+ categories: number[];
285
+ tags: number[];
286
+ }>;
287
+ /**
288
+ * Schema for a WordPress Tag object.
289
+ *
290
+ * This schema validates the structure of a WordPress Tag object, ensuring that
291
+ * it contains the following properties:
292
+ *
293
+ * - `id`: A numeric identifier for the tag.
294
+ * - `count`: A numeric count of the number of posts associated with the tag.
295
+ * - `description`: A string description of the tag.
296
+ * - `link`: A URL string linking to the tag.
297
+ * - `name`: A string name of the tag.
298
+ * - `slug`: A string slug for the tag.
299
+ * - `taxonomy`: A string representing the taxonomy type.
300
+ * - `meta`: An array or record of any additional metadata associated with the tag.
301
+ */
302
+ export declare const TagSchema: z.ZodObject<{
303
+ id: z.ZodNumber;
304
+ count: z.ZodNumber;
305
+ description: z.ZodString;
306
+ link: z.ZodString;
307
+ name: z.ZodString;
308
+ slug: z.ZodString;
309
+ taxonomy: z.ZodString;
310
+ meta: z.ZodUnion<[z.ZodArray<z.ZodAny, "many">, z.ZodRecord<z.ZodString, z.ZodAny>]>;
311
+ }, "strip", z.ZodTypeAny, {
312
+ link: string;
313
+ meta: any[] | Record<string, any>;
314
+ id: number;
315
+ slug: string;
316
+ count: number;
317
+ description: string;
318
+ name: string;
319
+ taxonomy: string;
320
+ }, {
321
+ link: string;
322
+ meta: any[] | Record<string, any>;
323
+ id: number;
324
+ slug: string;
325
+ count: number;
326
+ description: string;
327
+ name: string;
328
+ taxonomy: string;
329
+ }>;
330
+ /**
331
+ * Extends the TagSchema to create a CategorySchema.
332
+ *
333
+ * @property {number} parent - The ID of the parent category.
334
+ */
335
+ export declare const CategorySchema: z.ZodObject<z.objectUtil.extendShape<{
336
+ id: z.ZodNumber;
337
+ count: z.ZodNumber;
338
+ description: z.ZodString;
339
+ link: z.ZodString;
340
+ name: z.ZodString;
341
+ slug: z.ZodString;
342
+ taxonomy: z.ZodString;
343
+ meta: z.ZodUnion<[z.ZodArray<z.ZodAny, "many">, z.ZodRecord<z.ZodString, z.ZodAny>]>;
344
+ }, {
345
+ parent: z.ZodNumber;
346
+ }>, "strip", z.ZodTypeAny, {
347
+ link: string;
348
+ meta: any[] | Record<string, any>;
349
+ id: number;
350
+ slug: string;
351
+ parent: number;
352
+ count: number;
353
+ description: string;
354
+ name: string;
355
+ taxonomy: string;
356
+ }, {
357
+ link: string;
358
+ meta: any[] | Record<string, any>;
359
+ id: number;
360
+ slug: string;
361
+ parent: number;
362
+ count: number;
363
+ description: string;
364
+ name: string;
365
+ taxonomy: string;
366
+ }>;
367
+ /**
368
+ * Schema for site settings in the WordPress API.
369
+ *
370
+ * This schema defines the structure of the site settings object, which includes
371
+ * various properties related to the site's configuration.
372
+ *
373
+ * Properties:
374
+ * - `name`: The name of the site (string).
375
+ * - `description`: A brief description of the site (string).
376
+ * - `url`: The URL of the site (string).
377
+ * - `home`: The home URL of the site (string).
378
+ * - `gmt_offset`: The GMT offset for the site's timezone (number).
379
+ * - `timezone_string`: The timezone string for the site (string).
380
+ * - `site_logo`: The ID of the site's logo (optional number).
381
+ * - `site_icon`: The ID of the site's icon (optional number).
382
+ * - `site_icon_url`: The URL of the site's icon (optional string).
383
+ */
384
+ export declare const SiteSettingsSchema: z.ZodObject<{
385
+ name: z.ZodString;
386
+ description: z.ZodString;
387
+ url: z.ZodString;
388
+ home: z.ZodString;
389
+ gmt_offset: z.ZodNumber;
390
+ timezone_string: z.ZodString;
391
+ site_logo: z.ZodOptional<z.ZodNumber>;
392
+ site_icon: z.ZodOptional<z.ZodNumber>;
393
+ site_icon_url: z.ZodOptional<z.ZodString>;
394
+ }, "strip", z.ZodTypeAny, {
395
+ url: string;
396
+ description: string;
397
+ name: string;
398
+ home: string;
399
+ gmt_offset: number;
400
+ timezone_string: string;
401
+ site_logo?: number | undefined;
402
+ site_icon?: number | undefined;
403
+ site_icon_url?: string | undefined;
404
+ }, {
405
+ url: string;
406
+ description: string;
407
+ name: string;
408
+ home: string;
409
+ gmt_offset: number;
410
+ timezone_string: string;
411
+ site_logo?: number | undefined;
412
+ site_icon?: number | undefined;
413
+ site_icon_url?: string | undefined;
414
+ }>;
415
+ /**
416
+ * Represents the type of a Page object as defined by the PageSchema.
417
+ * This type is derived from the output type of the PageSchema.
418
+ */
419
+ export type Page = z.infer<typeof PageSchema>;
420
+ /**
421
+ * Represents a WordPress post based on the PostSchema.
422
+ *
423
+ * This type is derived from the output type of the PostSchema.
424
+ */
425
+ export type Post = z.infer<typeof PostSchema>;
426
+ /**
427
+ * Represents a Tag type derived from the TagSchema's output type.
428
+ */
429
+ export type Tag = z.infer<typeof TagSchema>;
430
+ /**
431
+ * Represents a Category type derived from the output of the CategorySchema.
432
+ */
433
+ export type Category = z.infer<typeof CategorySchema>;
434
+ /**
435
+ * Represents the settings for a site.
436
+ *
437
+ * This type is derived from the output of the `SiteSettingsSchema`.
438
+ */
439
+ export type SiteSettings = z.infer<typeof SiteSettingsSchema>;