@wix/auto_sdk_blog_draft-posts 1.0.77 → 1.0.79

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.
Files changed (50) hide show
  1. package/build/cjs/index.d.ts +1 -1
  2. package/build/cjs/index.js +76 -17
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +60 -5
  5. package/build/cjs/index.typings.js +67 -14
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +60 -5
  8. package/build/cjs/meta.js +67 -14
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/cjs/schemas.d.ts +1771 -0
  11. package/build/cjs/schemas.js +2886 -0
  12. package/build/cjs/schemas.js.map +1 -0
  13. package/build/es/index.d.mts +1 -1
  14. package/build/es/index.mjs +74 -17
  15. package/build/es/index.mjs.map +1 -1
  16. package/build/es/index.typings.d.mts +60 -5
  17. package/build/es/index.typings.mjs +65 -14
  18. package/build/es/index.typings.mjs.map +1 -1
  19. package/build/es/meta.d.mts +60 -5
  20. package/build/es/meta.mjs +65 -14
  21. package/build/es/meta.mjs.map +1 -1
  22. package/build/es/schemas.d.mts +1771 -0
  23. package/build/es/schemas.mjs +2822 -0
  24. package/build/es/schemas.mjs.map +1 -0
  25. package/build/internal/cjs/index.d.ts +1 -1
  26. package/build/internal/cjs/index.js +76 -17
  27. package/build/internal/cjs/index.js.map +1 -1
  28. package/build/internal/cjs/index.typings.d.ts +60 -5
  29. package/build/internal/cjs/index.typings.js +67 -14
  30. package/build/internal/cjs/index.typings.js.map +1 -1
  31. package/build/internal/cjs/meta.d.ts +60 -5
  32. package/build/internal/cjs/meta.js +67 -14
  33. package/build/internal/cjs/meta.js.map +1 -1
  34. package/build/internal/cjs/schemas.d.ts +1771 -0
  35. package/build/internal/cjs/schemas.js +2886 -0
  36. package/build/internal/cjs/schemas.js.map +1 -0
  37. package/build/internal/es/index.d.mts +1 -1
  38. package/build/internal/es/index.mjs +74 -17
  39. package/build/internal/es/index.mjs.map +1 -1
  40. package/build/internal/es/index.typings.d.mts +60 -5
  41. package/build/internal/es/index.typings.mjs +65 -14
  42. package/build/internal/es/index.typings.mjs.map +1 -1
  43. package/build/internal/es/meta.d.mts +60 -5
  44. package/build/internal/es/meta.mjs +65 -14
  45. package/build/internal/es/meta.mjs.map +1 -1
  46. package/build/internal/es/schemas.d.mts +1771 -0
  47. package/build/internal/es/schemas.mjs +2822 -0
  48. package/build/internal/es/schemas.mjs.map +1 -0
  49. package/package.json +12 -5
  50. package/schemas/package.json +3 -0
@@ -0,0 +1,2886 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // schemas.ts
31
+ var schemas_exports = {};
32
+ __export(schemas_exports, {
33
+ BulkCreateDraftPostsRequest: () => BulkCreateDraftPostsRequest,
34
+ BulkCreateDraftPostsResponse: () => BulkCreateDraftPostsResponse,
35
+ BulkDeleteDraftPostsRequest: () => BulkDeleteDraftPostsRequest,
36
+ BulkDeleteDraftPostsResponse: () => BulkDeleteDraftPostsResponse,
37
+ BulkUpdateDraftPostsRequest: () => BulkUpdateDraftPostsRequest,
38
+ BulkUpdateDraftPostsResponse: () => BulkUpdateDraftPostsResponse,
39
+ CreateDraftPostRequest: () => CreateDraftPostRequest,
40
+ CreateDraftPostResponse: () => CreateDraftPostResponse,
41
+ DeleteDraftPostRequest: () => DeleteDraftPostRequest,
42
+ DeleteDraftPostResponse: () => DeleteDraftPostResponse,
43
+ GetDeletedDraftPostRequest: () => GetDeletedDraftPostRequest,
44
+ GetDeletedDraftPostResponse: () => GetDeletedDraftPostResponse,
45
+ GetDraftPostRequest: () => GetDraftPostRequest,
46
+ GetDraftPostResponse: () => GetDraftPostResponse,
47
+ ListDeletedDraftPostsRequest: () => ListDeletedDraftPostsRequest,
48
+ ListDeletedDraftPostsResponse: () => ListDeletedDraftPostsResponse,
49
+ ListDraftPostsRequest: () => ListDraftPostsRequest,
50
+ ListDraftPostsResponse: () => ListDraftPostsResponse,
51
+ PublishDraftPostRequest: () => PublishDraftPostRequest,
52
+ PublishDraftPostResponse: () => PublishDraftPostResponse,
53
+ QueryDraftPostsRequest: () => QueryDraftPostsRequest,
54
+ QueryDraftPostsResponse: () => QueryDraftPostsResponse,
55
+ RemoveFromTrashBinRequest: () => RemoveFromTrashBinRequest,
56
+ RemoveFromTrashBinResponse: () => RemoveFromTrashBinResponse,
57
+ RestoreFromTrashBinRequest: () => RestoreFromTrashBinRequest,
58
+ RestoreFromTrashBinResponse: () => RestoreFromTrashBinResponse,
59
+ UpdateDraftPostRequest: () => UpdateDraftPostRequest,
60
+ UpdateDraftPostResponse: () => UpdateDraftPostResponse
61
+ });
62
+ module.exports = __toCommonJS(schemas_exports);
63
+
64
+ // src/blog-v3-draft-draft-posts.schemas.ts
65
+ var z = __toESM(require("zod"));
66
+ var CreateDraftPostRequest = z.object({
67
+ draftPost: z.object({
68
+ _id: z.string().describe("Draft post ID.").max(38).optional(),
69
+ title: z.string().describe("Draft post title.").max(200),
70
+ excerpt: z.string().describe(
71
+ "Draft post excerpt.\n\nIf no excerpt has been manually set, an excerpt is automatically generated from the post's text.\nThis can be retrieved using the `GENERATED_EXCERPT` fieldset."
72
+ ).max(500).optional().nullable(),
73
+ featured: z.boolean().describe("Whether the draft post is marked as featured.").optional().nullable(),
74
+ categoryIds: z.array(z.string()).max(10).optional(),
75
+ memberId: z.string().describe("Draft post owner's member ID.").regex(
76
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
77
+ "Must be a valid GUID"
78
+ ).optional().nullable(),
79
+ hashtags: z.array(z.string()).max(100).optional(),
80
+ commentingEnabled: z.boolean().describe("Whether commenting on the draft post is enabled.").optional().nullable(),
81
+ minutesToRead: z.number().int().describe(
82
+ "Estimated reading time of the draft post (calculated automatically)."
83
+ ).optional(),
84
+ heroImage: z.string().describe("Image placed at the top of the blog page.").optional(),
85
+ tagIds: z.array(z.string()).max(30).optional(),
86
+ relatedPostIds: z.array(z.string()).max(3).optional(),
87
+ pricingPlanIds: z.array(z.string()).max(100).optional(),
88
+ translationId: z.string().describe(
89
+ "ID of the draft post's translations.\n\nAll translations of a single post share the same `translationId`.\nAvailable only if the [Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) app is installed."
90
+ ).regex(
91
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
92
+ "Must be a valid GUID"
93
+ ).optional().nullable(),
94
+ language: z.string().describe(
95
+ "Language the draft post is written in.\n\n2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format."
96
+ ).optional().nullable(),
97
+ richContent: z.any().describe(
98
+ 'Draft Post rich content.\n\n<widget src="https://apps.wix.com/_serverless/ricos-playground-services/goto/api-component" plugins="image.gallery.video.audio.divider.linkButton.html.giphy.codeBlock.file.hashtag.lineSpacing.indent.link.textColor.textHighlight.heading.verticalEmbed.table.collapsibleList.poll" exampleid="72c23a25-524f-4f70-a260-4a2777b6f5d5">\n<a href="https://dev.wix.com/docs/ricos/api-reference/ricos-document">See Ricos document reference</a>\n</widget>'
99
+ ).optional(),
100
+ status: z.enum([
101
+ "UNKNOWN",
102
+ "PUBLISHED",
103
+ "UNPUBLISHED",
104
+ "SCHEDULED",
105
+ "DELETED",
106
+ "IN_REVIEW"
107
+ ]).optional(),
108
+ moderationDetails: z.object({
109
+ submittedBy: z.string().describe(
110
+ "Member ID of the person submitting the draft post for review."
111
+ ).regex(
112
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
113
+ "Must be a valid GUID"
114
+ ).optional(),
115
+ submittedDate: z.date().describe("Date the post was submitted for review.").optional().nullable(),
116
+ status: z.enum(["UNKNOWN", "APPROVED", "REJECTED"]).optional(),
117
+ moderatedBy: z.string().describe(
118
+ "Member ID of the person who approved or rejected the post."
119
+ ).regex(
120
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
121
+ "Must be a valid GUID"
122
+ ).optional().nullable(),
123
+ moderationDate: z.date().describe("Date the post was approved or rejected.").optional().nullable()
124
+ }).describe(
125
+ "Details of the draft post in review. Only relevant to posts submitted by guest writers."
126
+ ).optional(),
127
+ hasUnpublishedChanges: z.boolean().describe(
128
+ "Indicates if there are changes made to the draft post that have not yet been published."
129
+ ).optional(),
130
+ editedDate: z.date().describe("Date the draft post was last edited.").optional().nullable(),
131
+ scheduledPublishDate: z.date().describe("Date the draft post is scheduled to be published.").optional().nullable(),
132
+ firstPublishedDate: z.date().describe("Date the post was first published.").optional().nullable(),
133
+ seoData: z.object({
134
+ tags: z.array(
135
+ z.object({
136
+ type: z.string().describe(
137
+ "SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
138
+ ).optional(),
139
+ props: z.record(z.string(), z.any()).describe(
140
+ 'A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.\nFor example: `{"name": "description", "content": "the description itself"}`.'
141
+ ).optional().nullable(),
142
+ meta: z.record(z.string(), z.any()).describe(
143
+ 'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
144
+ ).optional().nullable(),
145
+ children: z.string().describe(
146
+ "SEO tag inner content. For example, `<title> inner content </title>`."
147
+ ).optional(),
148
+ custom: z.boolean().describe(
149
+ "Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
150
+ ).optional(),
151
+ disabled: z.boolean().describe(
152
+ "Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
153
+ ).optional()
154
+ })
155
+ ).optional(),
156
+ settings: z.object({
157
+ preventAutoRedirect: z.boolean().describe(
158
+ "Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled.\n\n\nDefault: `false` (automatical redirect is enabled)."
159
+ ).optional(),
160
+ keywords: z.array(
161
+ z.object({
162
+ term: z.string().describe("Keyword value.").optional(),
163
+ isMain: z.boolean().describe(
164
+ "Whether the keyword is the main focus keyword."
165
+ ).optional(),
166
+ origin: z.string().describe(
167
+ "The source that added the keyword terms to the SEO settings."
168
+ ).max(1e3).optional().nullable()
169
+ })
170
+ ).max(5).optional()
171
+ }).describe("SEO general settings.").optional()
172
+ }).describe("SEO data.").optional(),
173
+ url: z.string().describe(
174
+ "Draft post URL preview. What the URL will look like once the post is published."
175
+ ).optional(),
176
+ _createdDate: z.date().describe("Date the draft post was first created.").optional().nullable(),
177
+ seoSlug: z.string().describe("SEO slug.").max(100).optional().nullable(),
178
+ media: z.intersection(
179
+ z.object({
180
+ displayed: z.boolean().describe("Whether cover media is displayed.").optional(),
181
+ custom: z.boolean().describe(
182
+ "Whether custom cover media has been specified. If `false`, the first media item in the post's content serves as cover media."
183
+ ).optional(),
184
+ altText: z.string().describe("Media alternative text.").min(1).max(1e3).optional().nullable()
185
+ }),
186
+ z.xor([
187
+ z.object({
188
+ wixMedia: z.never().optional(),
189
+ embedMedia: z.never().optional()
190
+ }),
191
+ z.object({
192
+ embedMedia: z.never().optional(),
193
+ wixMedia: z.object({
194
+ image: z.string().describe("Image details.").optional(),
195
+ videoV2: z.string().describe("Video details.").optional()
196
+ }).describe("Wix Media details.")
197
+ }),
198
+ z.object({
199
+ wixMedia: z.never().optional(),
200
+ embedMedia: z.object({
201
+ thumbnail: z.object({
202
+ url: z.string().describe("Thumbnail url.").max(2e3).optional(),
203
+ width: z.number().int().describe("Thumbnail width.").min(0).optional(),
204
+ height: z.number().int().describe("Thumbnail height.").min(0).optional()
205
+ }).describe("Thumbnail details.").optional(),
206
+ video: z.object({
207
+ url: z.string().describe("Video url.").max(2e3).optional(),
208
+ width: z.number().int().describe("Video width.").min(0).optional(),
209
+ height: z.number().int().describe("Video height.").min(0).optional()
210
+ }).describe("Video details.").optional()
211
+ }).describe("Embed media details.")
212
+ })
213
+ ])
214
+ ).describe("Post cover media.").optional(),
215
+ previewTextParagraph: z.number().int().describe(
216
+ "Number of paragraphs to display in a paid content preview for non-paying users."
217
+ ).min(0).optional().nullable()
218
+ }).describe("Draft post to create."),
219
+ options: z.object({
220
+ publish: z.boolean().describe(
221
+ "Whether the draft post should be published on creation.\n\nDefault: `false`"
222
+ ).optional(),
223
+ fieldsets: z.array(
224
+ z.enum([
225
+ "UNKNOWN",
226
+ "URL",
227
+ "CONTENT",
228
+ "RICH_CONTENT",
229
+ "GENERATED_EXCERPT"
230
+ ])
231
+ ).max(10).optional()
232
+ }).describe("Options for creating a draft post.").optional()
233
+ });
234
+ var CreateDraftPostResponse = z.object({
235
+ draftPost: z.object({
236
+ _id: z.string().describe("Draft post ID.").max(38).optional(),
237
+ title: z.string().describe("Draft post title.").max(200).optional(),
238
+ excerpt: z.string().describe(
239
+ "Draft post excerpt.\n\nIf no excerpt has been manually set, an excerpt is automatically generated from the post's text.\nThis can be retrieved using the `GENERATED_EXCERPT` fieldset."
240
+ ).max(500).optional().nullable(),
241
+ featured: z.boolean().describe("Whether the draft post is marked as featured.").optional().nullable(),
242
+ categoryIds: z.array(z.string()).max(10).optional(),
243
+ memberId: z.string().describe("Draft post owner's member ID.").regex(
244
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
245
+ "Must be a valid GUID"
246
+ ).optional().nullable(),
247
+ hashtags: z.array(z.string()).max(100).optional(),
248
+ commentingEnabled: z.boolean().describe("Whether commenting on the draft post is enabled.").optional().nullable(),
249
+ minutesToRead: z.number().int().describe(
250
+ "Estimated reading time of the draft post (calculated automatically)."
251
+ ).optional(),
252
+ heroImage: z.string().describe("Image placed at the top of the blog page.").optional(),
253
+ tagIds: z.array(z.string()).max(30).optional(),
254
+ relatedPostIds: z.array(z.string()).max(3).optional(),
255
+ pricingPlanIds: z.array(z.string()).max(100).optional(),
256
+ translationId: z.string().describe(
257
+ "ID of the draft post's translations.\n\nAll translations of a single post share the same `translationId`.\nAvailable only if the [Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) app is installed."
258
+ ).regex(
259
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
260
+ "Must be a valid GUID"
261
+ ).optional().nullable(),
262
+ language: z.string().describe(
263
+ "Language the draft post is written in.\n\n2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format."
264
+ ).optional().nullable(),
265
+ richContent: z.any().describe(
266
+ 'Draft Post rich content.\n\n<widget src="https://apps.wix.com/_serverless/ricos-playground-services/goto/api-component" plugins="image.gallery.video.audio.divider.linkButton.html.giphy.codeBlock.file.hashtag.lineSpacing.indent.link.textColor.textHighlight.heading.verticalEmbed.table.collapsibleList.poll" exampleid="72c23a25-524f-4f70-a260-4a2777b6f5d5">\n<a href="https://dev.wix.com/docs/ricos/api-reference/ricos-document">See Ricos document reference</a>\n</widget>'
267
+ ).optional(),
268
+ status: z.enum([
269
+ "UNKNOWN",
270
+ "PUBLISHED",
271
+ "UNPUBLISHED",
272
+ "SCHEDULED",
273
+ "DELETED",
274
+ "IN_REVIEW"
275
+ ]).describe("Status of the draft post.").optional(),
276
+ moderationDetails: z.object({
277
+ submittedBy: z.string().describe(
278
+ "Member ID of the person submitting the draft post for review."
279
+ ).regex(
280
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
281
+ "Must be a valid GUID"
282
+ ).optional(),
283
+ submittedDate: z.date().describe("Date the post was submitted for review.").optional().nullable(),
284
+ status: z.enum(["UNKNOWN", "APPROVED", "REJECTED"]).describe(
285
+ "Status indicating whether the submission was approved or rejected by the moderator."
286
+ ).optional(),
287
+ moderatedBy: z.string().describe(
288
+ "Member ID of the person who approved or rejected the post."
289
+ ).regex(
290
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
291
+ "Must be a valid GUID"
292
+ ).optional().nullable(),
293
+ moderationDate: z.date().describe("Date the post was approved or rejected.").optional().nullable()
294
+ }).describe(
295
+ "Details of the draft post in review. Only relevant to posts submitted by guest writers."
296
+ ).optional(),
297
+ hasUnpublishedChanges: z.boolean().describe(
298
+ "Indicates if there are changes made to the draft post that have not yet been published."
299
+ ).optional(),
300
+ editedDate: z.date().describe("Date the draft post was last edited.").optional().nullable(),
301
+ scheduledPublishDate: z.date().describe("Date the draft post is scheduled to be published.").optional().nullable(),
302
+ firstPublishedDate: z.date().describe("Date the post was first published.").optional().nullable(),
303
+ seoData: z.object({
304
+ tags: z.array(
305
+ z.object({
306
+ type: z.string().describe(
307
+ "SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
308
+ ).optional(),
309
+ props: z.record(z.string(), z.any()).describe(
310
+ 'A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.\nFor example: `{"name": "description", "content": "the description itself"}`.'
311
+ ).optional().nullable(),
312
+ meta: z.record(z.string(), z.any()).describe(
313
+ 'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
314
+ ).optional().nullable(),
315
+ children: z.string().describe(
316
+ "SEO tag inner content. For example, `<title> inner content </title>`."
317
+ ).optional(),
318
+ custom: z.boolean().describe(
319
+ "Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
320
+ ).optional(),
321
+ disabled: z.boolean().describe(
322
+ "Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
323
+ ).optional()
324
+ })
325
+ ).optional(),
326
+ settings: z.object({
327
+ preventAutoRedirect: z.boolean().describe(
328
+ "Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled.\n\n\nDefault: `false` (automatical redirect is enabled)."
329
+ ).optional(),
330
+ keywords: z.array(
331
+ z.object({
332
+ term: z.string().describe("Keyword value.").optional(),
333
+ isMain: z.boolean().describe(
334
+ "Whether the keyword is the main focus keyword."
335
+ ).optional(),
336
+ origin: z.string().describe(
337
+ "The source that added the keyword terms to the SEO settings."
338
+ ).max(1e3).optional().nullable()
339
+ })
340
+ ).max(5).optional()
341
+ }).describe("SEO general settings.").optional()
342
+ }).describe("SEO data.").optional(),
343
+ url: z.string().describe(
344
+ "Draft post URL preview. What the URL will look like once the post is published."
345
+ ).optional(),
346
+ _createdDate: z.date().describe("Date the draft post was first created.").optional().nullable(),
347
+ seoSlug: z.string().describe("SEO slug.").max(100).optional().nullable(),
348
+ media: z.intersection(
349
+ z.object({
350
+ displayed: z.boolean().describe("Whether cover media is displayed.").optional(),
351
+ custom: z.boolean().describe(
352
+ "Whether custom cover media has been specified. If `false`, the first media item in the post's content serves as cover media."
353
+ ).optional(),
354
+ altText: z.string().describe("Media alternative text.").min(1).max(1e3).optional().nullable()
355
+ }),
356
+ z.xor([
357
+ z.object({
358
+ wixMedia: z.never().optional(),
359
+ embedMedia: z.never().optional()
360
+ }),
361
+ z.object({
362
+ embedMedia: z.never().optional(),
363
+ wixMedia: z.object({
364
+ image: z.string().describe("Image details.").optional(),
365
+ videoV2: z.string().describe("Video details.").optional()
366
+ }).describe("Wix Media details.")
367
+ }),
368
+ z.object({
369
+ wixMedia: z.never().optional(),
370
+ embedMedia: z.object({
371
+ thumbnail: z.object({
372
+ url: z.string().describe("Thumbnail url.").max(2e3).optional(),
373
+ width: z.number().int().describe("Thumbnail width.").min(0).optional(),
374
+ height: z.number().int().describe("Thumbnail height.").min(0).optional()
375
+ }).describe("Thumbnail details.").optional(),
376
+ video: z.object({
377
+ url: z.string().describe("Video url.").max(2e3).optional(),
378
+ width: z.number().int().describe("Video width.").min(0).optional(),
379
+ height: z.number().int().describe("Video height.").min(0).optional()
380
+ }).describe("Video details.").optional()
381
+ }).describe("Embed media details.")
382
+ })
383
+ ])
384
+ ).describe("Post cover media.").optional(),
385
+ previewTextParagraph: z.number().int().describe(
386
+ "Number of paragraphs to display in a paid content preview for non-paying users."
387
+ ).min(0).optional().nullable()
388
+ }).describe("Created draft post info.").optional()
389
+ });
390
+ var BulkCreateDraftPostsRequest = z.object({
391
+ draftPosts: z.array(
392
+ z.object({
393
+ _id: z.string().describe("Draft post ID.").max(38).optional(),
394
+ title: z.string().describe("Draft post title.").max(200),
395
+ excerpt: z.string().describe(
396
+ "Draft post excerpt.\n\nIf no excerpt has been manually set, an excerpt is automatically generated from the post's text.\nThis can be retrieved using the `GENERATED_EXCERPT` fieldset."
397
+ ).max(500).optional().nullable(),
398
+ featured: z.boolean().describe("Whether the draft post is marked as featured.").optional().nullable(),
399
+ categoryIds: z.array(z.string()).max(10).optional(),
400
+ memberId: z.string().describe("Draft post owner's member ID.").regex(
401
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
402
+ "Must be a valid GUID"
403
+ ).optional().nullable(),
404
+ hashtags: z.array(z.string()).max(100).optional(),
405
+ commentingEnabled: z.boolean().describe("Whether commenting on the draft post is enabled.").optional().nullable(),
406
+ minutesToRead: z.number().int().describe(
407
+ "Estimated reading time of the draft post (calculated automatically)."
408
+ ).optional(),
409
+ heroImage: z.string().describe("Image placed at the top of the blog page.").optional(),
410
+ tagIds: z.array(z.string()).max(30).optional(),
411
+ relatedPostIds: z.array(z.string()).max(3).optional(),
412
+ pricingPlanIds: z.array(z.string()).max(100).optional(),
413
+ translationId: z.string().describe(
414
+ "ID of the draft post's translations.\n\nAll translations of a single post share the same `translationId`.\nAvailable only if the [Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) app is installed."
415
+ ).regex(
416
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
417
+ "Must be a valid GUID"
418
+ ).optional().nullable(),
419
+ language: z.string().describe(
420
+ "Language the draft post is written in.\n\n2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format."
421
+ ).optional().nullable(),
422
+ richContent: z.any().describe(
423
+ 'Draft Post rich content.\n\n<widget src="https://apps.wix.com/_serverless/ricos-playground-services/goto/api-component" plugins="image.gallery.video.audio.divider.linkButton.html.giphy.codeBlock.file.hashtag.lineSpacing.indent.link.textColor.textHighlight.heading.verticalEmbed.table.collapsibleList.poll" exampleid="72c23a25-524f-4f70-a260-4a2777b6f5d5">\n<a href="https://dev.wix.com/docs/ricos/api-reference/ricos-document">See Ricos document reference</a>\n</widget>'
424
+ ).optional(),
425
+ status: z.enum([
426
+ "UNKNOWN",
427
+ "PUBLISHED",
428
+ "UNPUBLISHED",
429
+ "SCHEDULED",
430
+ "DELETED",
431
+ "IN_REVIEW"
432
+ ]).optional(),
433
+ moderationDetails: z.object({
434
+ submittedBy: z.string().describe(
435
+ "Member ID of the person submitting the draft post for review."
436
+ ).regex(
437
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
438
+ "Must be a valid GUID"
439
+ ).optional(),
440
+ submittedDate: z.date().describe("Date the post was submitted for review.").optional().nullable(),
441
+ status: z.enum(["UNKNOWN", "APPROVED", "REJECTED"]).optional(),
442
+ moderatedBy: z.string().describe(
443
+ "Member ID of the person who approved or rejected the post."
444
+ ).regex(
445
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
446
+ "Must be a valid GUID"
447
+ ).optional().nullable(),
448
+ moderationDate: z.date().describe("Date the post was approved or rejected.").optional().nullable()
449
+ }).describe(
450
+ "Details of the draft post in review. Only relevant to posts submitted by guest writers."
451
+ ).optional(),
452
+ hasUnpublishedChanges: z.boolean().describe(
453
+ "Indicates if there are changes made to the draft post that have not yet been published."
454
+ ).optional(),
455
+ editedDate: z.date().describe("Date the draft post was last edited.").optional().nullable(),
456
+ scheduledPublishDate: z.date().describe("Date the draft post is scheduled to be published.").optional().nullable(),
457
+ firstPublishedDate: z.date().describe("Date the post was first published.").optional().nullable(),
458
+ seoData: z.object({
459
+ tags: z.array(
460
+ z.object({
461
+ type: z.string().describe(
462
+ "SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
463
+ ).optional(),
464
+ props: z.record(z.string(), z.any()).describe(
465
+ 'A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.\nFor example: `{"name": "description", "content": "the description itself"}`.'
466
+ ).optional().nullable(),
467
+ meta: z.record(z.string(), z.any()).describe(
468
+ 'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
469
+ ).optional().nullable(),
470
+ children: z.string().describe(
471
+ "SEO tag inner content. For example, `<title> inner content </title>`."
472
+ ).optional(),
473
+ custom: z.boolean().describe(
474
+ "Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
475
+ ).optional(),
476
+ disabled: z.boolean().describe(
477
+ "Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
478
+ ).optional()
479
+ })
480
+ ).optional(),
481
+ settings: z.object({
482
+ preventAutoRedirect: z.boolean().describe(
483
+ "Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled.\n\n\nDefault: `false` (automatical redirect is enabled)."
484
+ ).optional(),
485
+ keywords: z.array(
486
+ z.object({
487
+ term: z.string().describe("Keyword value.").optional(),
488
+ isMain: z.boolean().describe(
489
+ "Whether the keyword is the main focus keyword."
490
+ ).optional(),
491
+ origin: z.string().describe(
492
+ "The source that added the keyword terms to the SEO settings."
493
+ ).max(1e3).optional().nullable()
494
+ })
495
+ ).max(5).optional()
496
+ }).describe("SEO general settings.").optional()
497
+ }).describe("SEO data.").optional(),
498
+ url: z.string().describe(
499
+ "Draft post URL preview. What the URL will look like once the post is published."
500
+ ).optional(),
501
+ _createdDate: z.date().describe("Date the draft post was first created.").optional().nullable(),
502
+ seoSlug: z.string().describe("SEO slug.").max(100).optional().nullable(),
503
+ media: z.intersection(
504
+ z.object({
505
+ displayed: z.boolean().describe("Whether cover media is displayed.").optional(),
506
+ custom: z.boolean().describe(
507
+ "Whether custom cover media has been specified. If `false`, the first media item in the post's content serves as cover media."
508
+ ).optional(),
509
+ altText: z.string().describe("Media alternative text.").min(1).max(1e3).optional().nullable()
510
+ }),
511
+ z.xor([
512
+ z.object({
513
+ wixMedia: z.never().optional(),
514
+ embedMedia: z.never().optional()
515
+ }),
516
+ z.object({
517
+ embedMedia: z.never().optional(),
518
+ wixMedia: z.object({
519
+ image: z.string().describe("Image details.").optional(),
520
+ videoV2: z.string().describe("Video details.").optional()
521
+ }).describe("Wix Media details.")
522
+ }),
523
+ z.object({
524
+ wixMedia: z.never().optional(),
525
+ embedMedia: z.object({
526
+ thumbnail: z.object({
527
+ url: z.string().describe("Thumbnail url.").max(2e3).optional(),
528
+ width: z.number().int().describe("Thumbnail width.").min(0).optional(),
529
+ height: z.number().int().describe("Thumbnail height.").min(0).optional()
530
+ }).describe("Thumbnail details.").optional(),
531
+ video: z.object({
532
+ url: z.string().describe("Video url.").max(2e3).optional(),
533
+ width: z.number().int().describe("Video width.").min(0).optional(),
534
+ height: z.number().int().describe("Video height.").min(0).optional()
535
+ }).describe("Video details.").optional()
536
+ }).describe("Embed media details.")
537
+ })
538
+ ])
539
+ ).describe("Post cover media.").optional(),
540
+ previewTextParagraph: z.number().int().describe(
541
+ "Number of paragraphs to display in a paid content preview for non-paying users."
542
+ ).min(0).optional().nullable()
543
+ })
544
+ ).min(1).max(20),
545
+ options: z.object({
546
+ publish: z.boolean().describe("Whether the draft post should be published after creation.").optional(),
547
+ returnFullEntity: z.boolean().describe(
548
+ "Whether to return the full created draft post entities in the response."
549
+ ).optional(),
550
+ fieldsets: z.array(
551
+ z.enum([
552
+ "UNKNOWN",
553
+ "URL",
554
+ "CONTENT",
555
+ "RICH_CONTENT",
556
+ "GENERATED_EXCERPT"
557
+ ])
558
+ ).max(10).optional()
559
+ }).describe("Options for creating multiple draft posts.").optional()
560
+ });
561
+ var BulkCreateDraftPostsResponse = z.object({
562
+ results: z.array(
563
+ z.object({
564
+ itemMetadata: z.object({
565
+ _id: z.string().describe(
566
+ "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
567
+ ).optional().nullable(),
568
+ originalIndex: z.number().int().describe(
569
+ "Index of the item within the request array. Allows for correlation between request and response items."
570
+ ).optional(),
571
+ success: z.boolean().describe(
572
+ "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
573
+ ).optional(),
574
+ error: z.object({
575
+ code: z.string().describe("Error code.").optional(),
576
+ description: z.string().describe("Description of the error.").optional(),
577
+ data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
578
+ }).describe("Details about the error in case of failure.").optional()
579
+ }).describe("Bulk actions metadata for draft post.").optional(),
580
+ item: z.object({
581
+ _id: z.string().describe("Draft post ID.").max(38).optional(),
582
+ title: z.string().describe("Draft post title.").max(200).optional(),
583
+ excerpt: z.string().describe(
584
+ "Draft post excerpt.\n\nIf no excerpt has been manually set, an excerpt is automatically generated from the post's text.\nThis can be retrieved using the `GENERATED_EXCERPT` fieldset."
585
+ ).max(500).optional().nullable(),
586
+ featured: z.boolean().describe("Whether the draft post is marked as featured.").optional().nullable(),
587
+ categoryIds: z.array(z.string()).max(10).optional(),
588
+ memberId: z.string().describe("Draft post owner's member ID.").regex(
589
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
590
+ "Must be a valid GUID"
591
+ ).optional().nullable(),
592
+ hashtags: z.array(z.string()).max(100).optional(),
593
+ commentingEnabled: z.boolean().describe("Whether commenting on the draft post is enabled.").optional().nullable(),
594
+ minutesToRead: z.number().int().describe(
595
+ "Estimated reading time of the draft post (calculated automatically)."
596
+ ).optional(),
597
+ heroImage: z.string().describe("Image placed at the top of the blog page.").optional(),
598
+ tagIds: z.array(z.string()).max(30).optional(),
599
+ relatedPostIds: z.array(z.string()).max(3).optional(),
600
+ pricingPlanIds: z.array(z.string()).max(100).optional(),
601
+ translationId: z.string().describe(
602
+ "ID of the draft post's translations.\n\nAll translations of a single post share the same `translationId`.\nAvailable only if the [Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) app is installed."
603
+ ).regex(
604
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
605
+ "Must be a valid GUID"
606
+ ).optional().nullable(),
607
+ language: z.string().describe(
608
+ "Language the draft post is written in.\n\n2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format."
609
+ ).optional().nullable(),
610
+ richContent: z.any().describe(
611
+ 'Draft Post rich content.\n\n<widget src="https://apps.wix.com/_serverless/ricos-playground-services/goto/api-component" plugins="image.gallery.video.audio.divider.linkButton.html.giphy.codeBlock.file.hashtag.lineSpacing.indent.link.textColor.textHighlight.heading.verticalEmbed.table.collapsibleList.poll" exampleid="72c23a25-524f-4f70-a260-4a2777b6f5d5">\n<a href="https://dev.wix.com/docs/ricos/api-reference/ricos-document">See Ricos document reference</a>\n</widget>'
612
+ ).optional(),
613
+ status: z.enum([
614
+ "UNKNOWN",
615
+ "PUBLISHED",
616
+ "UNPUBLISHED",
617
+ "SCHEDULED",
618
+ "DELETED",
619
+ "IN_REVIEW"
620
+ ]).describe("Status of the draft post.").optional(),
621
+ moderationDetails: z.object({
622
+ submittedBy: z.string().describe(
623
+ "Member ID of the person submitting the draft post for review."
624
+ ).regex(
625
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
626
+ "Must be a valid GUID"
627
+ ).optional(),
628
+ submittedDate: z.date().describe("Date the post was submitted for review.").optional().nullable(),
629
+ status: z.enum(["UNKNOWN", "APPROVED", "REJECTED"]).describe(
630
+ "Status indicating whether the submission was approved or rejected by the moderator."
631
+ ).optional(),
632
+ moderatedBy: z.string().describe(
633
+ "Member ID of the person who approved or rejected the post."
634
+ ).regex(
635
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
636
+ "Must be a valid GUID"
637
+ ).optional().nullable(),
638
+ moderationDate: z.date().describe("Date the post was approved or rejected.").optional().nullable()
639
+ }).describe(
640
+ "Details of the draft post in review. Only relevant to posts submitted by guest writers."
641
+ ).optional(),
642
+ hasUnpublishedChanges: z.boolean().describe(
643
+ "Indicates if there are changes made to the draft post that have not yet been published."
644
+ ).optional(),
645
+ editedDate: z.date().describe("Date the draft post was last edited.").optional().nullable(),
646
+ scheduledPublishDate: z.date().describe("Date the draft post is scheduled to be published.").optional().nullable(),
647
+ firstPublishedDate: z.date().describe("Date the post was first published.").optional().nullable(),
648
+ seoData: z.object({
649
+ tags: z.array(
650
+ z.object({
651
+ type: z.string().describe(
652
+ "SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
653
+ ).optional(),
654
+ props: z.record(z.string(), z.any()).describe(
655
+ 'A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.\nFor example: `{"name": "description", "content": "the description itself"}`.'
656
+ ).optional().nullable(),
657
+ meta: z.record(z.string(), z.any()).describe(
658
+ 'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
659
+ ).optional().nullable(),
660
+ children: z.string().describe(
661
+ "SEO tag inner content. For example, `<title> inner content </title>`."
662
+ ).optional(),
663
+ custom: z.boolean().describe(
664
+ "Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
665
+ ).optional(),
666
+ disabled: z.boolean().describe(
667
+ "Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
668
+ ).optional()
669
+ })
670
+ ).optional(),
671
+ settings: z.object({
672
+ preventAutoRedirect: z.boolean().describe(
673
+ "Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled.\n\n\nDefault: `false` (automatical redirect is enabled)."
674
+ ).optional(),
675
+ keywords: z.array(
676
+ z.object({
677
+ term: z.string().describe("Keyword value.").optional(),
678
+ isMain: z.boolean().describe(
679
+ "Whether the keyword is the main focus keyword."
680
+ ).optional(),
681
+ origin: z.string().describe(
682
+ "The source that added the keyword terms to the SEO settings."
683
+ ).max(1e3).optional().nullable()
684
+ })
685
+ ).max(5).optional()
686
+ }).describe("SEO general settings.").optional()
687
+ }).describe("SEO data.").optional(),
688
+ url: z.string().describe(
689
+ "Draft post URL preview. What the URL will look like once the post is published."
690
+ ).optional(),
691
+ _createdDate: z.date().describe("Date the draft post was first created.").optional().nullable(),
692
+ seoSlug: z.string().describe("SEO slug.").max(100).optional().nullable(),
693
+ media: z.intersection(
694
+ z.object({
695
+ displayed: z.boolean().describe("Whether cover media is displayed.").optional(),
696
+ custom: z.boolean().describe(
697
+ "Whether custom cover media has been specified. If `false`, the first media item in the post's content serves as cover media."
698
+ ).optional(),
699
+ altText: z.string().describe("Media alternative text.").min(1).max(1e3).optional().nullable()
700
+ }),
701
+ z.xor([
702
+ z.object({
703
+ wixMedia: z.never().optional(),
704
+ embedMedia: z.never().optional()
705
+ }),
706
+ z.object({
707
+ embedMedia: z.never().optional(),
708
+ wixMedia: z.object({
709
+ image: z.string().describe("Image details.").optional(),
710
+ videoV2: z.string().describe("Video details.").optional()
711
+ }).describe("Wix Media details.")
712
+ }),
713
+ z.object({
714
+ wixMedia: z.never().optional(),
715
+ embedMedia: z.object({
716
+ thumbnail: z.object({
717
+ url: z.string().describe("Thumbnail url.").max(2e3).optional(),
718
+ width: z.number().int().describe("Thumbnail width.").min(0).optional(),
719
+ height: z.number().int().describe("Thumbnail height.").min(0).optional()
720
+ }).describe("Thumbnail details.").optional(),
721
+ video: z.object({
722
+ url: z.string().describe("Video url.").max(2e3).optional(),
723
+ width: z.number().int().describe("Video width.").min(0).optional(),
724
+ height: z.number().int().describe("Video height.").min(0).optional()
725
+ }).describe("Video details.").optional()
726
+ }).describe("Embed media details.")
727
+ })
728
+ ])
729
+ ).describe("Post cover media.").optional(),
730
+ previewTextParagraph: z.number().int().describe(
731
+ "Number of paragraphs to display in a paid content preview for non-paying users."
732
+ ).min(0).optional().nullable()
733
+ }).describe("Optional full draft post.").optional()
734
+ })
735
+ ).optional(),
736
+ bulkActionMetadata: z.object({
737
+ totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
738
+ totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
739
+ undetailedFailures: z.number().int().describe(
740
+ "Number of failures without details because detailed failure threshold was exceeded."
741
+ ).optional()
742
+ }).describe("Bulk action metadata.").optional()
743
+ });
744
+ var BulkUpdateDraftPostsRequest = z.object({
745
+ options: z.object({
746
+ draftPosts: z.array(
747
+ z.object({
748
+ draftPost: z.object({
749
+ _id: z.string().describe("Draft post ID.").max(38),
750
+ title: z.string().describe("Draft post title.").max(200).optional(),
751
+ excerpt: z.string().describe(
752
+ "Draft post excerpt.\n\nIf no excerpt has been manually set, an excerpt is automatically generated from the post's text.\nThis can be retrieved using the `GENERATED_EXCERPT` fieldset."
753
+ ).max(500).optional().nullable(),
754
+ featured: z.boolean().describe("Whether the draft post is marked as featured.").optional().nullable(),
755
+ categoryIds: z.array(z.string()).max(10).optional(),
756
+ memberId: z.string().describe("Draft post owner's member ID.").regex(
757
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
758
+ "Must be a valid GUID"
759
+ ).optional().nullable(),
760
+ hashtags: z.array(z.string()).max(100).optional(),
761
+ commentingEnabled: z.boolean().describe("Whether commenting on the draft post is enabled.").optional().nullable(),
762
+ minutesToRead: z.number().int().describe(
763
+ "Estimated reading time of the draft post (calculated automatically)."
764
+ ).optional(),
765
+ heroImage: z.string().describe("Image placed at the top of the blog page.").optional(),
766
+ tagIds: z.array(z.string()).max(30).optional(),
767
+ relatedPostIds: z.array(z.string()).max(3).optional(),
768
+ pricingPlanIds: z.array(z.string()).max(100).optional(),
769
+ translationId: z.string().describe(
770
+ "ID of the draft post's translations.\n\nAll translations of a single post share the same `translationId`.\nAvailable only if the [Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) app is installed."
771
+ ).regex(
772
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
773
+ "Must be a valid GUID"
774
+ ).optional().nullable(),
775
+ language: z.string().describe(
776
+ "Language the draft post is written in.\n\n2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format."
777
+ ).optional().nullable(),
778
+ richContent: z.any().describe(
779
+ 'Draft Post rich content.\n\n<widget src="https://apps.wix.com/_serverless/ricos-playground-services/goto/api-component" plugins="image.gallery.video.audio.divider.linkButton.html.giphy.codeBlock.file.hashtag.lineSpacing.indent.link.textColor.textHighlight.heading.verticalEmbed.table.collapsibleList.poll" exampleid="72c23a25-524f-4f70-a260-4a2777b6f5d5">\n<a href="https://dev.wix.com/docs/ricos/api-reference/ricos-document">See Ricos document reference</a>\n</widget>'
780
+ ).optional(),
781
+ status: z.enum([
782
+ "UNKNOWN",
783
+ "PUBLISHED",
784
+ "UNPUBLISHED",
785
+ "SCHEDULED",
786
+ "DELETED",
787
+ "IN_REVIEW"
788
+ ]).optional(),
789
+ moderationDetails: z.object({
790
+ submittedBy: z.string().describe(
791
+ "Member ID of the person submitting the draft post for review."
792
+ ).regex(
793
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
794
+ "Must be a valid GUID"
795
+ ).optional(),
796
+ submittedDate: z.date().describe("Date the post was submitted for review.").optional().nullable(),
797
+ status: z.enum(["UNKNOWN", "APPROVED", "REJECTED"]).optional(),
798
+ moderatedBy: z.string().describe(
799
+ "Member ID of the person who approved or rejected the post."
800
+ ).regex(
801
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
802
+ "Must be a valid GUID"
803
+ ).optional().nullable(),
804
+ moderationDate: z.date().describe("Date the post was approved or rejected.").optional().nullable()
805
+ }).describe(
806
+ "Details of the draft post in review. Only relevant to posts submitted by guest writers."
807
+ ).optional(),
808
+ hasUnpublishedChanges: z.boolean().describe(
809
+ "Indicates if there are changes made to the draft post that have not yet been published."
810
+ ).optional(),
811
+ editedDate: z.date().describe("Date the draft post was last edited.").optional().nullable(),
812
+ scheduledPublishDate: z.date().describe("Date the draft post is scheduled to be published.").optional().nullable(),
813
+ firstPublishedDate: z.date().describe("Date the post was first published.").optional().nullable(),
814
+ seoData: z.object({
815
+ tags: z.array(
816
+ z.object({
817
+ type: z.string().describe(
818
+ "SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
819
+ ).optional(),
820
+ props: z.record(z.string(), z.any()).describe(
821
+ 'A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.\nFor example: `{"name": "description", "content": "the description itself"}`.'
822
+ ).optional().nullable(),
823
+ meta: z.record(z.string(), z.any()).describe(
824
+ 'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
825
+ ).optional().nullable(),
826
+ children: z.string().describe(
827
+ "SEO tag inner content. For example, `<title> inner content </title>`."
828
+ ).optional(),
829
+ custom: z.boolean().describe(
830
+ "Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
831
+ ).optional(),
832
+ disabled: z.boolean().describe(
833
+ "Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
834
+ ).optional()
835
+ })
836
+ ).optional(),
837
+ settings: z.object({
838
+ preventAutoRedirect: z.boolean().describe(
839
+ "Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled.\n\n\nDefault: `false` (automatical redirect is enabled)."
840
+ ).optional(),
841
+ keywords: z.array(
842
+ z.object({
843
+ term: z.string().describe("Keyword value.").optional(),
844
+ isMain: z.boolean().describe(
845
+ "Whether the keyword is the main focus keyword."
846
+ ).optional(),
847
+ origin: z.string().describe(
848
+ "The source that added the keyword terms to the SEO settings."
849
+ ).max(1e3).optional().nullable()
850
+ })
851
+ ).max(5).optional()
852
+ }).describe("SEO general settings.").optional()
853
+ }).describe("SEO data.").optional(),
854
+ url: z.string().describe(
855
+ "Draft post URL preview. What the URL will look like once the post is published."
856
+ ).optional(),
857
+ _createdDate: z.date().describe("Date the draft post was first created.").optional().nullable(),
858
+ seoSlug: z.string().describe("SEO slug.").max(100).optional().nullable(),
859
+ media: z.intersection(
860
+ z.object({
861
+ displayed: z.boolean().describe("Whether cover media is displayed.").optional(),
862
+ custom: z.boolean().describe(
863
+ "Whether custom cover media has been specified. If `false`, the first media item in the post's content serves as cover media."
864
+ ).optional(),
865
+ altText: z.string().describe("Media alternative text.").min(1).max(1e3).optional().nullable()
866
+ }),
867
+ z.xor([
868
+ z.object({
869
+ wixMedia: z.never().optional(),
870
+ embedMedia: z.never().optional()
871
+ }),
872
+ z.object({
873
+ embedMedia: z.never().optional(),
874
+ wixMedia: z.object({
875
+ image: z.string().describe("Image details.").optional(),
876
+ videoV2: z.string().describe("Video details.").optional()
877
+ }).describe("Wix Media details.")
878
+ }),
879
+ z.object({
880
+ wixMedia: z.never().optional(),
881
+ embedMedia: z.object({
882
+ thumbnail: z.object({
883
+ url: z.string().describe("Thumbnail url.").max(2e3).optional(),
884
+ width: z.number().int().describe("Thumbnail width.").min(0).optional(),
885
+ height: z.number().int().describe("Thumbnail height.").min(0).optional()
886
+ }).describe("Thumbnail details.").optional(),
887
+ video: z.object({
888
+ url: z.string().describe("Video url.").max(2e3).optional(),
889
+ width: z.number().int().describe("Video width.").min(0).optional(),
890
+ height: z.number().int().describe("Video height.").min(0).optional()
891
+ }).describe("Video details.").optional()
892
+ }).describe("Embed media details.")
893
+ })
894
+ ])
895
+ ).describe("Post cover media.").optional(),
896
+ previewTextParagraph: z.number().int().describe(
897
+ "Number of paragraphs to display in a paid content preview for non-paying users."
898
+ ).min(0).optional().nullable()
899
+ }).describe("Draft post"),
900
+ fieldMask: z.array(z.string()).optional()
901
+ })
902
+ ).min(1).max(20).optional(),
903
+ action: z.enum([
904
+ "UPDATE",
905
+ "UPDATE_PUBLISH",
906
+ "UPDATE_SCHEDULE",
907
+ "UPDATE_REVERT_TO_DRAFT",
908
+ "UPDATE_CANCEL_SCHEDULE",
909
+ "UPDATE_REJECT",
910
+ "UPDATE_PUBLICATION"
911
+ ]).optional(),
912
+ scheduledPublishDate: z.date().describe(
913
+ "Posts' scheduled publish date when `action` is set to `UPDATE_SCHEDULE`."
914
+ ).optional().nullable(),
915
+ returnFullEntity: z.boolean().describe(
916
+ "Whether to return the full updated draft post entities in the response."
917
+ ).optional(),
918
+ fieldsets: z.array(
919
+ z.enum([
920
+ "UNKNOWN",
921
+ "URL",
922
+ "CONTENT",
923
+ "RICH_CONTENT",
924
+ "GENERATED_EXCERPT"
925
+ ])
926
+ ).max(10).optional()
927
+ }).describe("Options for updating multiple draft posts.").optional()
928
+ });
929
+ var BulkUpdateDraftPostsResponse = z.object({
930
+ results: z.array(
931
+ z.object({
932
+ itemMetadata: z.object({
933
+ _id: z.string().describe(
934
+ "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
935
+ ).optional().nullable(),
936
+ originalIndex: z.number().int().describe(
937
+ "Index of the item within the request array. Allows for correlation between request and response items."
938
+ ).optional(),
939
+ success: z.boolean().describe(
940
+ "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
941
+ ).optional(),
942
+ error: z.object({
943
+ code: z.string().describe("Error code.").optional(),
944
+ description: z.string().describe("Description of the error.").optional(),
945
+ data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
946
+ }).describe("Details about the error in case of failure.").optional()
947
+ }).describe("Bulk actions metadata for draft post.").optional(),
948
+ item: z.object({
949
+ _id: z.string().describe("Draft post ID.").max(38).optional(),
950
+ title: z.string().describe("Draft post title.").max(200).optional(),
951
+ excerpt: z.string().describe(
952
+ "Draft post excerpt.\n\nIf no excerpt has been manually set, an excerpt is automatically generated from the post's text.\nThis can be retrieved using the `GENERATED_EXCERPT` fieldset."
953
+ ).max(500).optional().nullable(),
954
+ featured: z.boolean().describe("Whether the draft post is marked as featured.").optional().nullable(),
955
+ categoryIds: z.array(z.string()).max(10).optional(),
956
+ memberId: z.string().describe("Draft post owner's member ID.").regex(
957
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
958
+ "Must be a valid GUID"
959
+ ).optional().nullable(),
960
+ hashtags: z.array(z.string()).max(100).optional(),
961
+ commentingEnabled: z.boolean().describe("Whether commenting on the draft post is enabled.").optional().nullable(),
962
+ minutesToRead: z.number().int().describe(
963
+ "Estimated reading time of the draft post (calculated automatically)."
964
+ ).optional(),
965
+ heroImage: z.string().describe("Image placed at the top of the blog page.").optional(),
966
+ tagIds: z.array(z.string()).max(30).optional(),
967
+ relatedPostIds: z.array(z.string()).max(3).optional(),
968
+ pricingPlanIds: z.array(z.string()).max(100).optional(),
969
+ translationId: z.string().describe(
970
+ "ID of the draft post's translations.\n\nAll translations of a single post share the same `translationId`.\nAvailable only if the [Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) app is installed."
971
+ ).regex(
972
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
973
+ "Must be a valid GUID"
974
+ ).optional().nullable(),
975
+ language: z.string().describe(
976
+ "Language the draft post is written in.\n\n2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format."
977
+ ).optional().nullable(),
978
+ richContent: z.any().describe(
979
+ 'Draft Post rich content.\n\n<widget src="https://apps.wix.com/_serverless/ricos-playground-services/goto/api-component" plugins="image.gallery.video.audio.divider.linkButton.html.giphy.codeBlock.file.hashtag.lineSpacing.indent.link.textColor.textHighlight.heading.verticalEmbed.table.collapsibleList.poll" exampleid="72c23a25-524f-4f70-a260-4a2777b6f5d5">\n<a href="https://dev.wix.com/docs/ricos/api-reference/ricos-document">See Ricos document reference</a>\n</widget>'
980
+ ).optional(),
981
+ status: z.enum([
982
+ "UNKNOWN",
983
+ "PUBLISHED",
984
+ "UNPUBLISHED",
985
+ "SCHEDULED",
986
+ "DELETED",
987
+ "IN_REVIEW"
988
+ ]).describe("Status of the draft post.").optional(),
989
+ moderationDetails: z.object({
990
+ submittedBy: z.string().describe(
991
+ "Member ID of the person submitting the draft post for review."
992
+ ).regex(
993
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
994
+ "Must be a valid GUID"
995
+ ).optional(),
996
+ submittedDate: z.date().describe("Date the post was submitted for review.").optional().nullable(),
997
+ status: z.enum(["UNKNOWN", "APPROVED", "REJECTED"]).describe(
998
+ "Status indicating whether the submission was approved or rejected by the moderator."
999
+ ).optional(),
1000
+ moderatedBy: z.string().describe(
1001
+ "Member ID of the person who approved or rejected the post."
1002
+ ).regex(
1003
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1004
+ "Must be a valid GUID"
1005
+ ).optional().nullable(),
1006
+ moderationDate: z.date().describe("Date the post was approved or rejected.").optional().nullable()
1007
+ }).describe(
1008
+ "Details of the draft post in review. Only relevant to posts submitted by guest writers."
1009
+ ).optional(),
1010
+ hasUnpublishedChanges: z.boolean().describe(
1011
+ "Indicates if there are changes made to the draft post that have not yet been published."
1012
+ ).optional(),
1013
+ editedDate: z.date().describe("Date the draft post was last edited.").optional().nullable(),
1014
+ scheduledPublishDate: z.date().describe("Date the draft post is scheduled to be published.").optional().nullable(),
1015
+ firstPublishedDate: z.date().describe("Date the post was first published.").optional().nullable(),
1016
+ seoData: z.object({
1017
+ tags: z.array(
1018
+ z.object({
1019
+ type: z.string().describe(
1020
+ "SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
1021
+ ).optional(),
1022
+ props: z.record(z.string(), z.any()).describe(
1023
+ 'A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.\nFor example: `{"name": "description", "content": "the description itself"}`.'
1024
+ ).optional().nullable(),
1025
+ meta: z.record(z.string(), z.any()).describe(
1026
+ 'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
1027
+ ).optional().nullable(),
1028
+ children: z.string().describe(
1029
+ "SEO tag inner content. For example, `<title> inner content </title>`."
1030
+ ).optional(),
1031
+ custom: z.boolean().describe(
1032
+ "Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
1033
+ ).optional(),
1034
+ disabled: z.boolean().describe(
1035
+ "Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
1036
+ ).optional()
1037
+ })
1038
+ ).optional(),
1039
+ settings: z.object({
1040
+ preventAutoRedirect: z.boolean().describe(
1041
+ "Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled.\n\n\nDefault: `false` (automatical redirect is enabled)."
1042
+ ).optional(),
1043
+ keywords: z.array(
1044
+ z.object({
1045
+ term: z.string().describe("Keyword value.").optional(),
1046
+ isMain: z.boolean().describe(
1047
+ "Whether the keyword is the main focus keyword."
1048
+ ).optional(),
1049
+ origin: z.string().describe(
1050
+ "The source that added the keyword terms to the SEO settings."
1051
+ ).max(1e3).optional().nullable()
1052
+ })
1053
+ ).max(5).optional()
1054
+ }).describe("SEO general settings.").optional()
1055
+ }).describe("SEO data.").optional(),
1056
+ url: z.string().describe(
1057
+ "Draft post URL preview. What the URL will look like once the post is published."
1058
+ ).optional(),
1059
+ _createdDate: z.date().describe("Date the draft post was first created.").optional().nullable(),
1060
+ seoSlug: z.string().describe("SEO slug.").max(100).optional().nullable(),
1061
+ media: z.intersection(
1062
+ z.object({
1063
+ displayed: z.boolean().describe("Whether cover media is displayed.").optional(),
1064
+ custom: z.boolean().describe(
1065
+ "Whether custom cover media has been specified. If `false`, the first media item in the post's content serves as cover media."
1066
+ ).optional(),
1067
+ altText: z.string().describe("Media alternative text.").min(1).max(1e3).optional().nullable()
1068
+ }),
1069
+ z.xor([
1070
+ z.object({
1071
+ wixMedia: z.never().optional(),
1072
+ embedMedia: z.never().optional()
1073
+ }),
1074
+ z.object({
1075
+ embedMedia: z.never().optional(),
1076
+ wixMedia: z.object({
1077
+ image: z.string().describe("Image details.").optional(),
1078
+ videoV2: z.string().describe("Video details.").optional()
1079
+ }).describe("Wix Media details.")
1080
+ }),
1081
+ z.object({
1082
+ wixMedia: z.never().optional(),
1083
+ embedMedia: z.object({
1084
+ thumbnail: z.object({
1085
+ url: z.string().describe("Thumbnail url.").max(2e3).optional(),
1086
+ width: z.number().int().describe("Thumbnail width.").min(0).optional(),
1087
+ height: z.number().int().describe("Thumbnail height.").min(0).optional()
1088
+ }).describe("Thumbnail details.").optional(),
1089
+ video: z.object({
1090
+ url: z.string().describe("Video url.").max(2e3).optional(),
1091
+ width: z.number().int().describe("Video width.").min(0).optional(),
1092
+ height: z.number().int().describe("Video height.").min(0).optional()
1093
+ }).describe("Video details.").optional()
1094
+ }).describe("Embed media details.")
1095
+ })
1096
+ ])
1097
+ ).describe("Post cover media.").optional(),
1098
+ previewTextParagraph: z.number().int().describe(
1099
+ "Number of paragraphs to display in a paid content preview for non-paying users."
1100
+ ).min(0).optional().nullable()
1101
+ }).describe("Optional full draft post.").optional()
1102
+ })
1103
+ ).optional(),
1104
+ bulkActionMetadata: z.object({
1105
+ totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
1106
+ totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
1107
+ undetailedFailures: z.number().int().describe(
1108
+ "Number of failures without details because detailed failure threshold was exceeded."
1109
+ ).optional()
1110
+ }).describe("Bulk action metadata.").optional()
1111
+ });
1112
+ var ListDeletedDraftPostsRequest = z.object({
1113
+ options: z.object({
1114
+ language: z.string().describe(
1115
+ "Language filter.\n\n2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\nIf omitted, deleted draft posts in all languages are returned."
1116
+ ).optional().nullable(),
1117
+ sort: z.enum(["EDITING_DATE_DESC", "EDITING_DATE_ASC"]).optional(),
1118
+ paging: z.object({
1119
+ offset: z.number().int().describe(
1120
+ "Number of items to skip in the current sort order.\n\n\nDefault: `0`"
1121
+ ).min(0).optional(),
1122
+ limit: z.number().int().describe("Number of items to return.\n\n\nDefault:`50`").min(1).max(100).optional(),
1123
+ cursor: z.string().describe(
1124
+ "Pointer to the next or previous page in the list of results."
1125
+ ).max(2e3).optional().nullable()
1126
+ }).describe("Pagination options.").optional(),
1127
+ fieldsets: z.array(
1128
+ z.enum([
1129
+ "UNKNOWN",
1130
+ "URL",
1131
+ "CONTENT",
1132
+ "RICH_CONTENT",
1133
+ "GENERATED_EXCERPT"
1134
+ ])
1135
+ ).max(10).optional(),
1136
+ draftPostIds: z.array(z.string()).max(100).optional()
1137
+ }).describe("Options for listing deleted draft posts.").optional()
1138
+ });
1139
+ var ListDeletedDraftPostsResponse = z.object({
1140
+ draftPosts: z.array(
1141
+ z.object({
1142
+ _id: z.string().describe("Draft post ID.").max(38).optional(),
1143
+ title: z.string().describe("Draft post title.").max(200).optional(),
1144
+ excerpt: z.string().describe(
1145
+ "Draft post excerpt.\n\nIf no excerpt has been manually set, an excerpt is automatically generated from the post's text.\nThis can be retrieved using the `GENERATED_EXCERPT` fieldset."
1146
+ ).max(500).optional().nullable(),
1147
+ featured: z.boolean().describe("Whether the draft post is marked as featured.").optional().nullable(),
1148
+ categoryIds: z.array(z.string()).max(10).optional(),
1149
+ memberId: z.string().describe("Draft post owner's member ID.").regex(
1150
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1151
+ "Must be a valid GUID"
1152
+ ).optional().nullable(),
1153
+ hashtags: z.array(z.string()).max(100).optional(),
1154
+ commentingEnabled: z.boolean().describe("Whether commenting on the draft post is enabled.").optional().nullable(),
1155
+ minutesToRead: z.number().int().describe(
1156
+ "Estimated reading time of the draft post (calculated automatically)."
1157
+ ).optional(),
1158
+ heroImage: z.string().describe("Image placed at the top of the blog page.").optional(),
1159
+ tagIds: z.array(z.string()).max(30).optional(),
1160
+ relatedPostIds: z.array(z.string()).max(3).optional(),
1161
+ pricingPlanIds: z.array(z.string()).max(100).optional(),
1162
+ translationId: z.string().describe(
1163
+ "ID of the draft post's translations.\n\nAll translations of a single post share the same `translationId`.\nAvailable only if the [Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) app is installed."
1164
+ ).regex(
1165
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1166
+ "Must be a valid GUID"
1167
+ ).optional().nullable(),
1168
+ language: z.string().describe(
1169
+ "Language the draft post is written in.\n\n2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format."
1170
+ ).optional().nullable(),
1171
+ richContent: z.any().describe(
1172
+ 'Draft Post rich content.\n\n<widget src="https://apps.wix.com/_serverless/ricos-playground-services/goto/api-component" plugins="image.gallery.video.audio.divider.linkButton.html.giphy.codeBlock.file.hashtag.lineSpacing.indent.link.textColor.textHighlight.heading.verticalEmbed.table.collapsibleList.poll" exampleid="72c23a25-524f-4f70-a260-4a2777b6f5d5">\n<a href="https://dev.wix.com/docs/ricos/api-reference/ricos-document">See Ricos document reference</a>\n</widget>'
1173
+ ).optional(),
1174
+ status: z.enum([
1175
+ "UNKNOWN",
1176
+ "PUBLISHED",
1177
+ "UNPUBLISHED",
1178
+ "SCHEDULED",
1179
+ "DELETED",
1180
+ "IN_REVIEW"
1181
+ ]).describe("Status of the draft post.").optional(),
1182
+ moderationDetails: z.object({
1183
+ submittedBy: z.string().describe(
1184
+ "Member ID of the person submitting the draft post for review."
1185
+ ).regex(
1186
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1187
+ "Must be a valid GUID"
1188
+ ).optional(),
1189
+ submittedDate: z.date().describe("Date the post was submitted for review.").optional().nullable(),
1190
+ status: z.enum(["UNKNOWN", "APPROVED", "REJECTED"]).describe(
1191
+ "Status indicating whether the submission was approved or rejected by the moderator."
1192
+ ).optional(),
1193
+ moderatedBy: z.string().describe(
1194
+ "Member ID of the person who approved or rejected the post."
1195
+ ).regex(
1196
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1197
+ "Must be a valid GUID"
1198
+ ).optional().nullable(),
1199
+ moderationDate: z.date().describe("Date the post was approved or rejected.").optional().nullable()
1200
+ }).describe(
1201
+ "Details of the draft post in review. Only relevant to posts submitted by guest writers."
1202
+ ).optional(),
1203
+ hasUnpublishedChanges: z.boolean().describe(
1204
+ "Indicates if there are changes made to the draft post that have not yet been published."
1205
+ ).optional(),
1206
+ editedDate: z.date().describe("Date the draft post was last edited.").optional().nullable(),
1207
+ scheduledPublishDate: z.date().describe("Date the draft post is scheduled to be published.").optional().nullable(),
1208
+ firstPublishedDate: z.date().describe("Date the post was first published.").optional().nullable(),
1209
+ seoData: z.object({
1210
+ tags: z.array(
1211
+ z.object({
1212
+ type: z.string().describe(
1213
+ "SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
1214
+ ).optional(),
1215
+ props: z.record(z.string(), z.any()).describe(
1216
+ 'A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.\nFor example: `{"name": "description", "content": "the description itself"}`.'
1217
+ ).optional().nullable(),
1218
+ meta: z.record(z.string(), z.any()).describe(
1219
+ 'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
1220
+ ).optional().nullable(),
1221
+ children: z.string().describe(
1222
+ "SEO tag inner content. For example, `<title> inner content </title>`."
1223
+ ).optional(),
1224
+ custom: z.boolean().describe(
1225
+ "Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
1226
+ ).optional(),
1227
+ disabled: z.boolean().describe(
1228
+ "Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
1229
+ ).optional()
1230
+ })
1231
+ ).optional(),
1232
+ settings: z.object({
1233
+ preventAutoRedirect: z.boolean().describe(
1234
+ "Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled.\n\n\nDefault: `false` (automatical redirect is enabled)."
1235
+ ).optional(),
1236
+ keywords: z.array(
1237
+ z.object({
1238
+ term: z.string().describe("Keyword value.").optional(),
1239
+ isMain: z.boolean().describe(
1240
+ "Whether the keyword is the main focus keyword."
1241
+ ).optional(),
1242
+ origin: z.string().describe(
1243
+ "The source that added the keyword terms to the SEO settings."
1244
+ ).max(1e3).optional().nullable()
1245
+ })
1246
+ ).max(5).optional()
1247
+ }).describe("SEO general settings.").optional()
1248
+ }).describe("SEO data.").optional(),
1249
+ url: z.string().describe(
1250
+ "Draft post URL preview. What the URL will look like once the post is published."
1251
+ ).optional(),
1252
+ _createdDate: z.date().describe("Date the draft post was first created.").optional().nullable(),
1253
+ seoSlug: z.string().describe("SEO slug.").max(100).optional().nullable(),
1254
+ media: z.intersection(
1255
+ z.object({
1256
+ displayed: z.boolean().describe("Whether cover media is displayed.").optional(),
1257
+ custom: z.boolean().describe(
1258
+ "Whether custom cover media has been specified. If `false`, the first media item in the post's content serves as cover media."
1259
+ ).optional(),
1260
+ altText: z.string().describe("Media alternative text.").min(1).max(1e3).optional().nullable()
1261
+ }),
1262
+ z.xor([
1263
+ z.object({
1264
+ wixMedia: z.never().optional(),
1265
+ embedMedia: z.never().optional()
1266
+ }),
1267
+ z.object({
1268
+ embedMedia: z.never().optional(),
1269
+ wixMedia: z.object({
1270
+ image: z.string().describe("Image details.").optional(),
1271
+ videoV2: z.string().describe("Video details.").optional()
1272
+ }).describe("Wix Media details.")
1273
+ }),
1274
+ z.object({
1275
+ wixMedia: z.never().optional(),
1276
+ embedMedia: z.object({
1277
+ thumbnail: z.object({
1278
+ url: z.string().describe("Thumbnail url.").max(2e3).optional(),
1279
+ width: z.number().int().describe("Thumbnail width.").min(0).optional(),
1280
+ height: z.number().int().describe("Thumbnail height.").min(0).optional()
1281
+ }).describe("Thumbnail details.").optional(),
1282
+ video: z.object({
1283
+ url: z.string().describe("Video url.").max(2e3).optional(),
1284
+ width: z.number().int().describe("Video width.").min(0).optional(),
1285
+ height: z.number().int().describe("Video height.").min(0).optional()
1286
+ }).describe("Video details.").optional()
1287
+ }).describe("Embed media details.")
1288
+ })
1289
+ ])
1290
+ ).describe("Post cover media.").optional(),
1291
+ previewTextParagraph: z.number().int().describe(
1292
+ "Number of paragraphs to display in a paid content preview for non-paying users."
1293
+ ).min(0).optional().nullable()
1294
+ })
1295
+ ).optional(),
1296
+ pagingMetadata: z.object({
1297
+ count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
1298
+ offset: z.number().int().describe("Offset that was requested.").optional().nullable(),
1299
+ total: z.number().int().describe(
1300
+ "Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set."
1301
+ ).optional().nullable(),
1302
+ tooManyToCount: z.boolean().describe(
1303
+ "Flag that indicates the server failed to calculate the `total` field."
1304
+ ).optional().nullable(),
1305
+ cursors: z.object({
1306
+ next: z.string().describe("Cursor pointing to next page in the list of results.").max(2e3).optional().nullable(),
1307
+ prev: z.string().describe(
1308
+ "Cursor pointing to previous page in the list of results."
1309
+ ).max(2e3).optional().nullable()
1310
+ }).describe(
1311
+ "Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used."
1312
+ ).optional()
1313
+ }).describe("Details on the paged set of results returned.").optional()
1314
+ });
1315
+ var GetDraftPostRequest = z.object({
1316
+ draftPostId: z.string().describe("Draft post ID.").max(38),
1317
+ options: z.object({
1318
+ fieldsets: z.array(
1319
+ z.enum([
1320
+ "UNKNOWN",
1321
+ "URL",
1322
+ "CONTENT",
1323
+ "RICH_CONTENT",
1324
+ "GENERATED_EXCERPT"
1325
+ ])
1326
+ ).max(10).optional()
1327
+ }).describe("Options for getting a draft post.").optional()
1328
+ });
1329
+ var GetDraftPostResponse = z.object({
1330
+ draftPost: z.object({
1331
+ _id: z.string().describe("Draft post ID.").max(38).optional(),
1332
+ title: z.string().describe("Draft post title.").max(200).optional(),
1333
+ excerpt: z.string().describe(
1334
+ "Draft post excerpt.\n\nIf no excerpt has been manually set, an excerpt is automatically generated from the post's text.\nThis can be retrieved using the `GENERATED_EXCERPT` fieldset."
1335
+ ).max(500).optional().nullable(),
1336
+ featured: z.boolean().describe("Whether the draft post is marked as featured.").optional().nullable(),
1337
+ categoryIds: z.array(z.string()).max(10).optional(),
1338
+ memberId: z.string().describe("Draft post owner's member ID.").regex(
1339
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1340
+ "Must be a valid GUID"
1341
+ ).optional().nullable(),
1342
+ hashtags: z.array(z.string()).max(100).optional(),
1343
+ commentingEnabled: z.boolean().describe("Whether commenting on the draft post is enabled.").optional().nullable(),
1344
+ minutesToRead: z.number().int().describe(
1345
+ "Estimated reading time of the draft post (calculated automatically)."
1346
+ ).optional(),
1347
+ heroImage: z.string().describe("Image placed at the top of the blog page.").optional(),
1348
+ tagIds: z.array(z.string()).max(30).optional(),
1349
+ relatedPostIds: z.array(z.string()).max(3).optional(),
1350
+ pricingPlanIds: z.array(z.string()).max(100).optional(),
1351
+ translationId: z.string().describe(
1352
+ "ID of the draft post's translations.\n\nAll translations of a single post share the same `translationId`.\nAvailable only if the [Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) app is installed."
1353
+ ).regex(
1354
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1355
+ "Must be a valid GUID"
1356
+ ).optional().nullable(),
1357
+ language: z.string().describe(
1358
+ "Language the draft post is written in.\n\n2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format."
1359
+ ).optional().nullable(),
1360
+ richContent: z.any().describe(
1361
+ 'Draft Post rich content.\n\n<widget src="https://apps.wix.com/_serverless/ricos-playground-services/goto/api-component" plugins="image.gallery.video.audio.divider.linkButton.html.giphy.codeBlock.file.hashtag.lineSpacing.indent.link.textColor.textHighlight.heading.verticalEmbed.table.collapsibleList.poll" exampleid="72c23a25-524f-4f70-a260-4a2777b6f5d5">\n<a href="https://dev.wix.com/docs/ricos/api-reference/ricos-document">See Ricos document reference</a>\n</widget>'
1362
+ ).optional(),
1363
+ status: z.enum([
1364
+ "UNKNOWN",
1365
+ "PUBLISHED",
1366
+ "UNPUBLISHED",
1367
+ "SCHEDULED",
1368
+ "DELETED",
1369
+ "IN_REVIEW"
1370
+ ]).describe("Status of the draft post.").optional(),
1371
+ moderationDetails: z.object({
1372
+ submittedBy: z.string().describe(
1373
+ "Member ID of the person submitting the draft post for review."
1374
+ ).regex(
1375
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1376
+ "Must be a valid GUID"
1377
+ ).optional(),
1378
+ submittedDate: z.date().describe("Date the post was submitted for review.").optional().nullable(),
1379
+ status: z.enum(["UNKNOWN", "APPROVED", "REJECTED"]).describe(
1380
+ "Status indicating whether the submission was approved or rejected by the moderator."
1381
+ ).optional(),
1382
+ moderatedBy: z.string().describe(
1383
+ "Member ID of the person who approved or rejected the post."
1384
+ ).regex(
1385
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1386
+ "Must be a valid GUID"
1387
+ ).optional().nullable(),
1388
+ moderationDate: z.date().describe("Date the post was approved or rejected.").optional().nullable()
1389
+ }).describe(
1390
+ "Details of the draft post in review. Only relevant to posts submitted by guest writers."
1391
+ ).optional(),
1392
+ hasUnpublishedChanges: z.boolean().describe(
1393
+ "Indicates if there are changes made to the draft post that have not yet been published."
1394
+ ).optional(),
1395
+ editedDate: z.date().describe("Date the draft post was last edited.").optional().nullable(),
1396
+ scheduledPublishDate: z.date().describe("Date the draft post is scheduled to be published.").optional().nullable(),
1397
+ firstPublishedDate: z.date().describe("Date the post was first published.").optional().nullable(),
1398
+ seoData: z.object({
1399
+ tags: z.array(
1400
+ z.object({
1401
+ type: z.string().describe(
1402
+ "SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
1403
+ ).optional(),
1404
+ props: z.record(z.string(), z.any()).describe(
1405
+ 'A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.\nFor example: `{"name": "description", "content": "the description itself"}`.'
1406
+ ).optional().nullable(),
1407
+ meta: z.record(z.string(), z.any()).describe(
1408
+ 'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
1409
+ ).optional().nullable(),
1410
+ children: z.string().describe(
1411
+ "SEO tag inner content. For example, `<title> inner content </title>`."
1412
+ ).optional(),
1413
+ custom: z.boolean().describe(
1414
+ "Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
1415
+ ).optional(),
1416
+ disabled: z.boolean().describe(
1417
+ "Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
1418
+ ).optional()
1419
+ })
1420
+ ).optional(),
1421
+ settings: z.object({
1422
+ preventAutoRedirect: z.boolean().describe(
1423
+ "Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled.\n\n\nDefault: `false` (automatical redirect is enabled)."
1424
+ ).optional(),
1425
+ keywords: z.array(
1426
+ z.object({
1427
+ term: z.string().describe("Keyword value.").optional(),
1428
+ isMain: z.boolean().describe(
1429
+ "Whether the keyword is the main focus keyword."
1430
+ ).optional(),
1431
+ origin: z.string().describe(
1432
+ "The source that added the keyword terms to the SEO settings."
1433
+ ).max(1e3).optional().nullable()
1434
+ })
1435
+ ).max(5).optional()
1436
+ }).describe("SEO general settings.").optional()
1437
+ }).describe("SEO data.").optional(),
1438
+ url: z.string().describe(
1439
+ "Draft post URL preview. What the URL will look like once the post is published."
1440
+ ).optional(),
1441
+ _createdDate: z.date().describe("Date the draft post was first created.").optional().nullable(),
1442
+ seoSlug: z.string().describe("SEO slug.").max(100).optional().nullable(),
1443
+ media: z.intersection(
1444
+ z.object({
1445
+ displayed: z.boolean().describe("Whether cover media is displayed.").optional(),
1446
+ custom: z.boolean().describe(
1447
+ "Whether custom cover media has been specified. If `false`, the first media item in the post's content serves as cover media."
1448
+ ).optional(),
1449
+ altText: z.string().describe("Media alternative text.").min(1).max(1e3).optional().nullable()
1450
+ }),
1451
+ z.xor([
1452
+ z.object({
1453
+ wixMedia: z.never().optional(),
1454
+ embedMedia: z.never().optional()
1455
+ }),
1456
+ z.object({
1457
+ embedMedia: z.never().optional(),
1458
+ wixMedia: z.object({
1459
+ image: z.string().describe("Image details.").optional(),
1460
+ videoV2: z.string().describe("Video details.").optional()
1461
+ }).describe("Wix Media details.")
1462
+ }),
1463
+ z.object({
1464
+ wixMedia: z.never().optional(),
1465
+ embedMedia: z.object({
1466
+ thumbnail: z.object({
1467
+ url: z.string().describe("Thumbnail url.").max(2e3).optional(),
1468
+ width: z.number().int().describe("Thumbnail width.").min(0).optional(),
1469
+ height: z.number().int().describe("Thumbnail height.").min(0).optional()
1470
+ }).describe("Thumbnail details.").optional(),
1471
+ video: z.object({
1472
+ url: z.string().describe("Video url.").max(2e3).optional(),
1473
+ width: z.number().int().describe("Video width.").min(0).optional(),
1474
+ height: z.number().int().describe("Video height.").min(0).optional()
1475
+ }).describe("Video details.").optional()
1476
+ }).describe("Embed media details.")
1477
+ })
1478
+ ])
1479
+ ).describe("Post cover media.").optional(),
1480
+ previewTextParagraph: z.number().int().describe(
1481
+ "Number of paragraphs to display in a paid content preview for non-paying users."
1482
+ ).min(0).optional().nullable()
1483
+ }).describe("Draft post info.").optional()
1484
+ });
1485
+ var UpdateDraftPostRequest = z.object({
1486
+ _id: z.string().describe("Draft post ID.").max(38),
1487
+ draftPost: z.object({
1488
+ _id: z.string().describe("Draft post ID.").max(38).optional(),
1489
+ title: z.string().describe("Draft post title.").max(200).optional(),
1490
+ excerpt: z.string().describe(
1491
+ "Draft post excerpt.\n\nIf no excerpt has been manually set, an excerpt is automatically generated from the post's text.\nThis can be retrieved using the `GENERATED_EXCERPT` fieldset."
1492
+ ).max(500).optional().nullable(),
1493
+ featured: z.boolean().describe("Whether the draft post is marked as featured.").optional().nullable(),
1494
+ categoryIds: z.array(z.string()).max(10).optional(),
1495
+ memberId: z.string().describe("Draft post owner's member ID.").regex(
1496
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1497
+ "Must be a valid GUID"
1498
+ ).optional().nullable(),
1499
+ hashtags: z.array(z.string()).max(100).optional(),
1500
+ commentingEnabled: z.boolean().describe("Whether commenting on the draft post is enabled.").optional().nullable(),
1501
+ minutesToRead: z.number().int().describe(
1502
+ "Estimated reading time of the draft post (calculated automatically)."
1503
+ ).optional(),
1504
+ heroImage: z.string().describe("Image placed at the top of the blog page.").optional(),
1505
+ tagIds: z.array(z.string()).max(30).optional(),
1506
+ relatedPostIds: z.array(z.string()).max(3).optional(),
1507
+ pricingPlanIds: z.array(z.string()).max(100).optional(),
1508
+ translationId: z.string().describe(
1509
+ "ID of the draft post's translations.\n\nAll translations of a single post share the same `translationId`.\nAvailable only if the [Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) app is installed."
1510
+ ).regex(
1511
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1512
+ "Must be a valid GUID"
1513
+ ).optional().nullable(),
1514
+ language: z.string().describe(
1515
+ "Language the draft post is written in.\n\n2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format."
1516
+ ).optional().nullable(),
1517
+ richContent: z.any().describe(
1518
+ 'Draft Post rich content.\n\n<widget src="https://apps.wix.com/_serverless/ricos-playground-services/goto/api-component" plugins="image.gallery.video.audio.divider.linkButton.html.giphy.codeBlock.file.hashtag.lineSpacing.indent.link.textColor.textHighlight.heading.verticalEmbed.table.collapsibleList.poll" exampleid="72c23a25-524f-4f70-a260-4a2777b6f5d5">\n<a href="https://dev.wix.com/docs/ricos/api-reference/ricos-document">See Ricos document reference</a>\n</widget>'
1519
+ ).optional(),
1520
+ status: z.enum([
1521
+ "UNKNOWN",
1522
+ "PUBLISHED",
1523
+ "UNPUBLISHED",
1524
+ "SCHEDULED",
1525
+ "DELETED",
1526
+ "IN_REVIEW"
1527
+ ]).optional(),
1528
+ moderationDetails: z.object({
1529
+ submittedBy: z.string().describe(
1530
+ "Member ID of the person submitting the draft post for review."
1531
+ ).regex(
1532
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1533
+ "Must be a valid GUID"
1534
+ ).optional(),
1535
+ submittedDate: z.date().describe("Date the post was submitted for review.").optional().nullable(),
1536
+ status: z.enum(["UNKNOWN", "APPROVED", "REJECTED"]).optional(),
1537
+ moderatedBy: z.string().describe(
1538
+ "Member ID of the person who approved or rejected the post."
1539
+ ).regex(
1540
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1541
+ "Must be a valid GUID"
1542
+ ).optional().nullable(),
1543
+ moderationDate: z.date().describe("Date the post was approved or rejected.").optional().nullable()
1544
+ }).describe(
1545
+ "Details of the draft post in review. Only relevant to posts submitted by guest writers."
1546
+ ).optional(),
1547
+ hasUnpublishedChanges: z.boolean().describe(
1548
+ "Indicates if there are changes made to the draft post that have not yet been published."
1549
+ ).optional(),
1550
+ editedDate: z.date().describe("Date the draft post was last edited.").optional().nullable(),
1551
+ scheduledPublishDate: z.date().describe("Date the draft post is scheduled to be published.").optional().nullable(),
1552
+ firstPublishedDate: z.date().describe("Date the post was first published.").optional().nullable(),
1553
+ seoData: z.object({
1554
+ tags: z.array(
1555
+ z.object({
1556
+ type: z.string().describe(
1557
+ "SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
1558
+ ).optional(),
1559
+ props: z.record(z.string(), z.any()).describe(
1560
+ 'A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.\nFor example: `{"name": "description", "content": "the description itself"}`.'
1561
+ ).optional().nullable(),
1562
+ meta: z.record(z.string(), z.any()).describe(
1563
+ 'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
1564
+ ).optional().nullable(),
1565
+ children: z.string().describe(
1566
+ "SEO tag inner content. For example, `<title> inner content </title>`."
1567
+ ).optional(),
1568
+ custom: z.boolean().describe(
1569
+ "Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
1570
+ ).optional(),
1571
+ disabled: z.boolean().describe(
1572
+ "Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
1573
+ ).optional()
1574
+ })
1575
+ ).optional(),
1576
+ settings: z.object({
1577
+ preventAutoRedirect: z.boolean().describe(
1578
+ "Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled.\n\n\nDefault: `false` (automatical redirect is enabled)."
1579
+ ).optional(),
1580
+ keywords: z.array(
1581
+ z.object({
1582
+ term: z.string().describe("Keyword value.").optional(),
1583
+ isMain: z.boolean().describe(
1584
+ "Whether the keyword is the main focus keyword."
1585
+ ).optional(),
1586
+ origin: z.string().describe(
1587
+ "The source that added the keyword terms to the SEO settings."
1588
+ ).max(1e3).optional().nullable()
1589
+ })
1590
+ ).max(5).optional()
1591
+ }).describe("SEO general settings.").optional()
1592
+ }).describe("SEO data.").optional(),
1593
+ url: z.string().describe(
1594
+ "Draft post URL preview. What the URL will look like once the post is published."
1595
+ ).optional(),
1596
+ _createdDate: z.date().describe("Date the draft post was first created.").optional().nullable(),
1597
+ seoSlug: z.string().describe("SEO slug.").max(100).optional().nullable(),
1598
+ media: z.intersection(
1599
+ z.object({
1600
+ displayed: z.boolean().describe("Whether cover media is displayed.").optional(),
1601
+ custom: z.boolean().describe(
1602
+ "Whether custom cover media has been specified. If `false`, the first media item in the post's content serves as cover media."
1603
+ ).optional(),
1604
+ altText: z.string().describe("Media alternative text.").min(1).max(1e3).optional().nullable()
1605
+ }),
1606
+ z.xor([
1607
+ z.object({
1608
+ wixMedia: z.never().optional(),
1609
+ embedMedia: z.never().optional()
1610
+ }),
1611
+ z.object({
1612
+ embedMedia: z.never().optional(),
1613
+ wixMedia: z.object({
1614
+ image: z.string().describe("Image details.").optional(),
1615
+ videoV2: z.string().describe("Video details.").optional()
1616
+ }).describe("Wix Media details.")
1617
+ }),
1618
+ z.object({
1619
+ wixMedia: z.never().optional(),
1620
+ embedMedia: z.object({
1621
+ thumbnail: z.object({
1622
+ url: z.string().describe("Thumbnail url.").max(2e3).optional(),
1623
+ width: z.number().int().describe("Thumbnail width.").min(0).optional(),
1624
+ height: z.number().int().describe("Thumbnail height.").min(0).optional()
1625
+ }).describe("Thumbnail details.").optional(),
1626
+ video: z.object({
1627
+ url: z.string().describe("Video url.").max(2e3).optional(),
1628
+ width: z.number().int().describe("Video width.").min(0).optional(),
1629
+ height: z.number().int().describe("Video height.").min(0).optional()
1630
+ }).describe("Video details.").optional()
1631
+ }).describe("Embed media details.")
1632
+ })
1633
+ ])
1634
+ ).describe("Post cover media.").optional(),
1635
+ previewTextParagraph: z.number().int().describe(
1636
+ "Number of paragraphs to display in a paid content preview for non-paying users."
1637
+ ).min(0).optional().nullable()
1638
+ }).describe("Draft Post info."),
1639
+ options: z.object({
1640
+ action: z.enum([
1641
+ "UPDATE",
1642
+ "UPDATE_PUBLISH",
1643
+ "UPDATE_SCHEDULE",
1644
+ "UPDATE_REVERT_TO_DRAFT",
1645
+ "UPDATE_CANCEL_SCHEDULE",
1646
+ "UPDATE_REJECT",
1647
+ "UPDATE_PUBLICATION"
1648
+ ]).optional(),
1649
+ scheduledPublishDate: z.date().describe(
1650
+ "Post publish schedule date if `action` is set to `UPDATE_SCHEDULE`."
1651
+ ).optional().nullable(),
1652
+ fieldsets: z.array(
1653
+ z.enum([
1654
+ "UNKNOWN",
1655
+ "URL",
1656
+ "CONTENT",
1657
+ "RICH_CONTENT",
1658
+ "GENERATED_EXCERPT"
1659
+ ])
1660
+ ).max(10).optional()
1661
+ }).describe("Options for updating a draft post.").optional()
1662
+ });
1663
+ var UpdateDraftPostResponse = z.object({
1664
+ draftPost: z.object({
1665
+ _id: z.string().describe("Draft post ID.").max(38).optional(),
1666
+ title: z.string().describe("Draft post title.").max(200).optional(),
1667
+ excerpt: z.string().describe(
1668
+ "Draft post excerpt.\n\nIf no excerpt has been manually set, an excerpt is automatically generated from the post's text.\nThis can be retrieved using the `GENERATED_EXCERPT` fieldset."
1669
+ ).max(500).optional().nullable(),
1670
+ featured: z.boolean().describe("Whether the draft post is marked as featured.").optional().nullable(),
1671
+ categoryIds: z.array(z.string()).max(10).optional(),
1672
+ memberId: z.string().describe("Draft post owner's member ID.").regex(
1673
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1674
+ "Must be a valid GUID"
1675
+ ).optional().nullable(),
1676
+ hashtags: z.array(z.string()).max(100).optional(),
1677
+ commentingEnabled: z.boolean().describe("Whether commenting on the draft post is enabled.").optional().nullable(),
1678
+ minutesToRead: z.number().int().describe(
1679
+ "Estimated reading time of the draft post (calculated automatically)."
1680
+ ).optional(),
1681
+ heroImage: z.string().describe("Image placed at the top of the blog page.").optional(),
1682
+ tagIds: z.array(z.string()).max(30).optional(),
1683
+ relatedPostIds: z.array(z.string()).max(3).optional(),
1684
+ pricingPlanIds: z.array(z.string()).max(100).optional(),
1685
+ translationId: z.string().describe(
1686
+ "ID of the draft post's translations.\n\nAll translations of a single post share the same `translationId`.\nAvailable only if the [Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) app is installed."
1687
+ ).regex(
1688
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1689
+ "Must be a valid GUID"
1690
+ ).optional().nullable(),
1691
+ language: z.string().describe(
1692
+ "Language the draft post is written in.\n\n2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format."
1693
+ ).optional().nullable(),
1694
+ richContent: z.any().describe(
1695
+ 'Draft Post rich content.\n\n<widget src="https://apps.wix.com/_serverless/ricos-playground-services/goto/api-component" plugins="image.gallery.video.audio.divider.linkButton.html.giphy.codeBlock.file.hashtag.lineSpacing.indent.link.textColor.textHighlight.heading.verticalEmbed.table.collapsibleList.poll" exampleid="72c23a25-524f-4f70-a260-4a2777b6f5d5">\n<a href="https://dev.wix.com/docs/ricos/api-reference/ricos-document">See Ricos document reference</a>\n</widget>'
1696
+ ).optional(),
1697
+ status: z.enum([
1698
+ "UNKNOWN",
1699
+ "PUBLISHED",
1700
+ "UNPUBLISHED",
1701
+ "SCHEDULED",
1702
+ "DELETED",
1703
+ "IN_REVIEW"
1704
+ ]).describe("Status of the draft post.").optional(),
1705
+ moderationDetails: z.object({
1706
+ submittedBy: z.string().describe(
1707
+ "Member ID of the person submitting the draft post for review."
1708
+ ).regex(
1709
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1710
+ "Must be a valid GUID"
1711
+ ).optional(),
1712
+ submittedDate: z.date().describe("Date the post was submitted for review.").optional().nullable(),
1713
+ status: z.enum(["UNKNOWN", "APPROVED", "REJECTED"]).describe(
1714
+ "Status indicating whether the submission was approved or rejected by the moderator."
1715
+ ).optional(),
1716
+ moderatedBy: z.string().describe(
1717
+ "Member ID of the person who approved or rejected the post."
1718
+ ).regex(
1719
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1720
+ "Must be a valid GUID"
1721
+ ).optional().nullable(),
1722
+ moderationDate: z.date().describe("Date the post was approved or rejected.").optional().nullable()
1723
+ }).describe(
1724
+ "Details of the draft post in review. Only relevant to posts submitted by guest writers."
1725
+ ).optional(),
1726
+ hasUnpublishedChanges: z.boolean().describe(
1727
+ "Indicates if there are changes made to the draft post that have not yet been published."
1728
+ ).optional(),
1729
+ editedDate: z.date().describe("Date the draft post was last edited.").optional().nullable(),
1730
+ scheduledPublishDate: z.date().describe("Date the draft post is scheduled to be published.").optional().nullable(),
1731
+ firstPublishedDate: z.date().describe("Date the post was first published.").optional().nullable(),
1732
+ seoData: z.object({
1733
+ tags: z.array(
1734
+ z.object({
1735
+ type: z.string().describe(
1736
+ "SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
1737
+ ).optional(),
1738
+ props: z.record(z.string(), z.any()).describe(
1739
+ 'A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.\nFor example: `{"name": "description", "content": "the description itself"}`.'
1740
+ ).optional().nullable(),
1741
+ meta: z.record(z.string(), z.any()).describe(
1742
+ 'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
1743
+ ).optional().nullable(),
1744
+ children: z.string().describe(
1745
+ "SEO tag inner content. For example, `<title> inner content </title>`."
1746
+ ).optional(),
1747
+ custom: z.boolean().describe(
1748
+ "Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
1749
+ ).optional(),
1750
+ disabled: z.boolean().describe(
1751
+ "Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
1752
+ ).optional()
1753
+ })
1754
+ ).optional(),
1755
+ settings: z.object({
1756
+ preventAutoRedirect: z.boolean().describe(
1757
+ "Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled.\n\n\nDefault: `false` (automatical redirect is enabled)."
1758
+ ).optional(),
1759
+ keywords: z.array(
1760
+ z.object({
1761
+ term: z.string().describe("Keyword value.").optional(),
1762
+ isMain: z.boolean().describe(
1763
+ "Whether the keyword is the main focus keyword."
1764
+ ).optional(),
1765
+ origin: z.string().describe(
1766
+ "The source that added the keyword terms to the SEO settings."
1767
+ ).max(1e3).optional().nullable()
1768
+ })
1769
+ ).max(5).optional()
1770
+ }).describe("SEO general settings.").optional()
1771
+ }).describe("SEO data.").optional(),
1772
+ url: z.string().describe(
1773
+ "Draft post URL preview. What the URL will look like once the post is published."
1774
+ ).optional(),
1775
+ _createdDate: z.date().describe("Date the draft post was first created.").optional().nullable(),
1776
+ seoSlug: z.string().describe("SEO slug.").max(100).optional().nullable(),
1777
+ media: z.intersection(
1778
+ z.object({
1779
+ displayed: z.boolean().describe("Whether cover media is displayed.").optional(),
1780
+ custom: z.boolean().describe(
1781
+ "Whether custom cover media has been specified. If `false`, the first media item in the post's content serves as cover media."
1782
+ ).optional(),
1783
+ altText: z.string().describe("Media alternative text.").min(1).max(1e3).optional().nullable()
1784
+ }),
1785
+ z.xor([
1786
+ z.object({
1787
+ wixMedia: z.never().optional(),
1788
+ embedMedia: z.never().optional()
1789
+ }),
1790
+ z.object({
1791
+ embedMedia: z.never().optional(),
1792
+ wixMedia: z.object({
1793
+ image: z.string().describe("Image details.").optional(),
1794
+ videoV2: z.string().describe("Video details.").optional()
1795
+ }).describe("Wix Media details.")
1796
+ }),
1797
+ z.object({
1798
+ wixMedia: z.never().optional(),
1799
+ embedMedia: z.object({
1800
+ thumbnail: z.object({
1801
+ url: z.string().describe("Thumbnail url.").max(2e3).optional(),
1802
+ width: z.number().int().describe("Thumbnail width.").min(0).optional(),
1803
+ height: z.number().int().describe("Thumbnail height.").min(0).optional()
1804
+ }).describe("Thumbnail details.").optional(),
1805
+ video: z.object({
1806
+ url: z.string().describe("Video url.").max(2e3).optional(),
1807
+ width: z.number().int().describe("Video width.").min(0).optional(),
1808
+ height: z.number().int().describe("Video height.").min(0).optional()
1809
+ }).describe("Video details.").optional()
1810
+ }).describe("Embed media details.")
1811
+ })
1812
+ ])
1813
+ ).describe("Post cover media.").optional(),
1814
+ previewTextParagraph: z.number().int().describe(
1815
+ "Number of paragraphs to display in a paid content preview for non-paying users."
1816
+ ).min(0).optional().nullable()
1817
+ }).describe("Updated draft post info.").optional()
1818
+ });
1819
+ var DeleteDraftPostRequest = z.object({
1820
+ draftPostId: z.string().describe("Draft post ID.").max(38),
1821
+ options: z.object({
1822
+ permanent: z.boolean().describe(
1823
+ "Whether to bypass the trash bin and delete the post permanently.\n\nDefault: `false`"
1824
+ ).optional()
1825
+ }).describe("Options for deleting a draft post.").optional()
1826
+ });
1827
+ var DeleteDraftPostResponse = z.object({});
1828
+ var RemoveFromTrashBinRequest = z.object({
1829
+ draftPostId: z.string().describe("Draft post ID.").max(38)
1830
+ });
1831
+ var RemoveFromTrashBinResponse = z.object({});
1832
+ var BulkDeleteDraftPostsRequest = z.object({
1833
+ postIds: z.array(z.string()).min(1).max(100),
1834
+ options: z.object({
1835
+ permanent: z.boolean().describe("Should delete bypassing the trash-bin.").optional()
1836
+ }).describe("Options for deleting multiple draft posts.").optional()
1837
+ });
1838
+ var BulkDeleteDraftPostsResponse = z.object({
1839
+ results: z.array(
1840
+ z.object({
1841
+ itemMetadata: z.object({
1842
+ _id: z.string().describe(
1843
+ "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)."
1844
+ ).optional().nullable(),
1845
+ originalIndex: z.number().int().describe(
1846
+ "Index of the item within the request array. Allows for correlation between request and response items."
1847
+ ).optional(),
1848
+ success: z.boolean().describe(
1849
+ "Whether the requested action was successful for this item. When `false`, the `error` field is populated."
1850
+ ).optional(),
1851
+ error: z.object({
1852
+ code: z.string().describe("Error code.").optional(),
1853
+ description: z.string().describe("Description of the error.").optional(),
1854
+ data: z.record(z.string(), z.any()).describe("Data related to the error.").optional().nullable()
1855
+ }).describe("Details about the error in case of failure.").optional()
1856
+ }).describe("Bulk actions metadata for draft post.").optional(),
1857
+ item: z.object({
1858
+ _id: z.string().describe("Draft post ID.").max(38).optional(),
1859
+ title: z.string().describe("Draft post title.").max(200).optional(),
1860
+ excerpt: z.string().describe(
1861
+ "Draft post excerpt.\n\nIf no excerpt has been manually set, an excerpt is automatically generated from the post's text.\nThis can be retrieved using the `GENERATED_EXCERPT` fieldset."
1862
+ ).max(500).optional().nullable(),
1863
+ featured: z.boolean().describe("Whether the draft post is marked as featured.").optional().nullable(),
1864
+ categoryIds: z.array(z.string()).max(10).optional(),
1865
+ memberId: z.string().describe("Draft post owner's member ID.").regex(
1866
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1867
+ "Must be a valid GUID"
1868
+ ).optional().nullable(),
1869
+ hashtags: z.array(z.string()).max(100).optional(),
1870
+ commentingEnabled: z.boolean().describe("Whether commenting on the draft post is enabled.").optional().nullable(),
1871
+ minutesToRead: z.number().int().describe(
1872
+ "Estimated reading time of the draft post (calculated automatically)."
1873
+ ).optional(),
1874
+ heroImage: z.string().describe("Image placed at the top of the blog page.").optional(),
1875
+ tagIds: z.array(z.string()).max(30).optional(),
1876
+ relatedPostIds: z.array(z.string()).max(3).optional(),
1877
+ pricingPlanIds: z.array(z.string()).max(100).optional(),
1878
+ translationId: z.string().describe(
1879
+ "ID of the draft post's translations.\n\nAll translations of a single post share the same `translationId`.\nAvailable only if the [Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) app is installed."
1880
+ ).regex(
1881
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1882
+ "Must be a valid GUID"
1883
+ ).optional().nullable(),
1884
+ language: z.string().describe(
1885
+ "Language the draft post is written in.\n\n2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format."
1886
+ ).optional().nullable(),
1887
+ richContent: z.any().describe(
1888
+ 'Draft Post rich content.\n\n<widget src="https://apps.wix.com/_serverless/ricos-playground-services/goto/api-component" plugins="image.gallery.video.audio.divider.linkButton.html.giphy.codeBlock.file.hashtag.lineSpacing.indent.link.textColor.textHighlight.heading.verticalEmbed.table.collapsibleList.poll" exampleid="72c23a25-524f-4f70-a260-4a2777b6f5d5">\n<a href="https://dev.wix.com/docs/ricos/api-reference/ricos-document">See Ricos document reference</a>\n</widget>'
1889
+ ).optional(),
1890
+ status: z.enum([
1891
+ "UNKNOWN",
1892
+ "PUBLISHED",
1893
+ "UNPUBLISHED",
1894
+ "SCHEDULED",
1895
+ "DELETED",
1896
+ "IN_REVIEW"
1897
+ ]).describe("Status of the draft post.").optional(),
1898
+ moderationDetails: z.object({
1899
+ submittedBy: z.string().describe(
1900
+ "Member ID of the person submitting the draft post for review."
1901
+ ).regex(
1902
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1903
+ "Must be a valid GUID"
1904
+ ).optional(),
1905
+ submittedDate: z.date().describe("Date the post was submitted for review.").optional().nullable(),
1906
+ status: z.enum(["UNKNOWN", "APPROVED", "REJECTED"]).describe(
1907
+ "Status indicating whether the submission was approved or rejected by the moderator."
1908
+ ).optional(),
1909
+ moderatedBy: z.string().describe(
1910
+ "Member ID of the person who approved or rejected the post."
1911
+ ).regex(
1912
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
1913
+ "Must be a valid GUID"
1914
+ ).optional().nullable(),
1915
+ moderationDate: z.date().describe("Date the post was approved or rejected.").optional().nullable()
1916
+ }).describe(
1917
+ "Details of the draft post in review. Only relevant to posts submitted by guest writers."
1918
+ ).optional(),
1919
+ hasUnpublishedChanges: z.boolean().describe(
1920
+ "Indicates if there are changes made to the draft post that have not yet been published."
1921
+ ).optional(),
1922
+ editedDate: z.date().describe("Date the draft post was last edited.").optional().nullable(),
1923
+ scheduledPublishDate: z.date().describe("Date the draft post is scheduled to be published.").optional().nullable(),
1924
+ firstPublishedDate: z.date().describe("Date the post was first published.").optional().nullable(),
1925
+ seoData: z.object({
1926
+ tags: z.array(
1927
+ z.object({
1928
+ type: z.string().describe(
1929
+ "SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
1930
+ ).optional(),
1931
+ props: z.record(z.string(), z.any()).describe(
1932
+ 'A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.\nFor example: `{"name": "description", "content": "the description itself"}`.'
1933
+ ).optional().nullable(),
1934
+ meta: z.record(z.string(), z.any()).describe(
1935
+ 'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
1936
+ ).optional().nullable(),
1937
+ children: z.string().describe(
1938
+ "SEO tag inner content. For example, `<title> inner content </title>`."
1939
+ ).optional(),
1940
+ custom: z.boolean().describe(
1941
+ "Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
1942
+ ).optional(),
1943
+ disabled: z.boolean().describe(
1944
+ "Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
1945
+ ).optional()
1946
+ })
1947
+ ).optional(),
1948
+ settings: z.object({
1949
+ preventAutoRedirect: z.boolean().describe(
1950
+ "Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled.\n\n\nDefault: `false` (automatical redirect is enabled)."
1951
+ ).optional(),
1952
+ keywords: z.array(
1953
+ z.object({
1954
+ term: z.string().describe("Keyword value.").optional(),
1955
+ isMain: z.boolean().describe(
1956
+ "Whether the keyword is the main focus keyword."
1957
+ ).optional(),
1958
+ origin: z.string().describe(
1959
+ "The source that added the keyword terms to the SEO settings."
1960
+ ).max(1e3).optional().nullable()
1961
+ })
1962
+ ).max(5).optional()
1963
+ }).describe("SEO general settings.").optional()
1964
+ }).describe("SEO data.").optional(),
1965
+ url: z.string().describe(
1966
+ "Draft post URL preview. What the URL will look like once the post is published."
1967
+ ).optional(),
1968
+ _createdDate: z.date().describe("Date the draft post was first created.").optional().nullable(),
1969
+ seoSlug: z.string().describe("SEO slug.").max(100).optional().nullable(),
1970
+ media: z.intersection(
1971
+ z.object({
1972
+ displayed: z.boolean().describe("Whether cover media is displayed.").optional(),
1973
+ custom: z.boolean().describe(
1974
+ "Whether custom cover media has been specified. If `false`, the first media item in the post's content serves as cover media."
1975
+ ).optional(),
1976
+ altText: z.string().describe("Media alternative text.").min(1).max(1e3).optional().nullable()
1977
+ }),
1978
+ z.xor([
1979
+ z.object({
1980
+ wixMedia: z.never().optional(),
1981
+ embedMedia: z.never().optional()
1982
+ }),
1983
+ z.object({
1984
+ embedMedia: z.never().optional(),
1985
+ wixMedia: z.object({
1986
+ image: z.string().describe("Image details.").optional(),
1987
+ videoV2: z.string().describe("Video details.").optional()
1988
+ }).describe("Wix Media details.")
1989
+ }),
1990
+ z.object({
1991
+ wixMedia: z.never().optional(),
1992
+ embedMedia: z.object({
1993
+ thumbnail: z.object({
1994
+ url: z.string().describe("Thumbnail url.").max(2e3).optional(),
1995
+ width: z.number().int().describe("Thumbnail width.").min(0).optional(),
1996
+ height: z.number().int().describe("Thumbnail height.").min(0).optional()
1997
+ }).describe("Thumbnail details.").optional(),
1998
+ video: z.object({
1999
+ url: z.string().describe("Video url.").max(2e3).optional(),
2000
+ width: z.number().int().describe("Video width.").min(0).optional(),
2001
+ height: z.number().int().describe("Video height.").min(0).optional()
2002
+ }).describe("Video details.").optional()
2003
+ }).describe("Embed media details.")
2004
+ })
2005
+ ])
2006
+ ).describe("Post cover media.").optional(),
2007
+ previewTextParagraph: z.number().int().describe(
2008
+ "Number of paragraphs to display in a paid content preview for non-paying users."
2009
+ ).min(0).optional().nullable()
2010
+ }).describe("Optional full draft post.").optional()
2011
+ })
2012
+ ).optional(),
2013
+ bulkActionMetadata: z.object({
2014
+ totalSuccesses: z.number().int().describe("Number of items that were successfully processed.").optional(),
2015
+ totalFailures: z.number().int().describe("Number of items that couldn't be processed.").optional(),
2016
+ undetailedFailures: z.number().int().describe(
2017
+ "Number of failures without details because detailed failure threshold was exceeded."
2018
+ ).optional()
2019
+ }).describe("Bulk action metadata.").optional()
2020
+ });
2021
+ var ListDraftPostsRequest = z.object({
2022
+ options: z.object({
2023
+ status: z.enum([
2024
+ "UNKNOWN",
2025
+ "PUBLISHED",
2026
+ "UNPUBLISHED",
2027
+ "SCHEDULED",
2028
+ "DELETED",
2029
+ "IN_REVIEW"
2030
+ ]).optional(),
2031
+ language: z.string().describe(
2032
+ "Language filter.\n\n2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\nIf omitted, draft posts in all languages are returned."
2033
+ ).optional().nullable(),
2034
+ sort: z.enum(["EDITING_DATE_DESC", "EDITING_DATE_ASC"]).optional(),
2035
+ paging: z.object({
2036
+ offset: z.number().int().describe(
2037
+ "Number of items to skip in the current sort order.\n\n\nDefault: `0`"
2038
+ ).min(0).optional(),
2039
+ limit: z.number().int().describe("Number of items to return.\n\n\nDefault:`50`").min(1).max(100).optional(),
2040
+ cursor: z.string().describe(
2041
+ "Pointer to the next or previous page in the list of results."
2042
+ ).max(2e3).optional().nullable()
2043
+ }).describe("Pagination options.").optional(),
2044
+ fieldsets: z.array(
2045
+ z.enum([
2046
+ "UNKNOWN",
2047
+ "URL",
2048
+ "CONTENT",
2049
+ "RICH_CONTENT",
2050
+ "GENERATED_EXCERPT"
2051
+ ])
2052
+ ).max(10).optional()
2053
+ }).describe("Options for listing multiple draft posts.").optional()
2054
+ });
2055
+ var ListDraftPostsResponse = z.object({
2056
+ draftPosts: z.array(
2057
+ z.object({
2058
+ _id: z.string().describe("Draft post ID.").max(38).optional(),
2059
+ title: z.string().describe("Draft post title.").max(200).optional(),
2060
+ excerpt: z.string().describe(
2061
+ "Draft post excerpt.\n\nIf no excerpt has been manually set, an excerpt is automatically generated from the post's text.\nThis can be retrieved using the `GENERATED_EXCERPT` fieldset."
2062
+ ).max(500).optional().nullable(),
2063
+ featured: z.boolean().describe("Whether the draft post is marked as featured.").optional().nullable(),
2064
+ categoryIds: z.array(z.string()).max(10).optional(),
2065
+ memberId: z.string().describe("Draft post owner's member ID.").regex(
2066
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2067
+ "Must be a valid GUID"
2068
+ ).optional().nullable(),
2069
+ hashtags: z.array(z.string()).max(100).optional(),
2070
+ commentingEnabled: z.boolean().describe("Whether commenting on the draft post is enabled.").optional().nullable(),
2071
+ minutesToRead: z.number().int().describe(
2072
+ "Estimated reading time of the draft post (calculated automatically)."
2073
+ ).optional(),
2074
+ heroImage: z.string().describe("Image placed at the top of the blog page.").optional(),
2075
+ tagIds: z.array(z.string()).max(30).optional(),
2076
+ relatedPostIds: z.array(z.string()).max(3).optional(),
2077
+ pricingPlanIds: z.array(z.string()).max(100).optional(),
2078
+ translationId: z.string().describe(
2079
+ "ID of the draft post's translations.\n\nAll translations of a single post share the same `translationId`.\nAvailable only if the [Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) app is installed."
2080
+ ).regex(
2081
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2082
+ "Must be a valid GUID"
2083
+ ).optional().nullable(),
2084
+ language: z.string().describe(
2085
+ "Language the draft post is written in.\n\n2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format."
2086
+ ).optional().nullable(),
2087
+ richContent: z.any().describe(
2088
+ 'Draft Post rich content.\n\n<widget src="https://apps.wix.com/_serverless/ricos-playground-services/goto/api-component" plugins="image.gallery.video.audio.divider.linkButton.html.giphy.codeBlock.file.hashtag.lineSpacing.indent.link.textColor.textHighlight.heading.verticalEmbed.table.collapsibleList.poll" exampleid="72c23a25-524f-4f70-a260-4a2777b6f5d5">\n<a href="https://dev.wix.com/docs/ricos/api-reference/ricos-document">See Ricos document reference</a>\n</widget>'
2089
+ ).optional(),
2090
+ status: z.enum([
2091
+ "UNKNOWN",
2092
+ "PUBLISHED",
2093
+ "UNPUBLISHED",
2094
+ "SCHEDULED",
2095
+ "DELETED",
2096
+ "IN_REVIEW"
2097
+ ]).describe("Status of the draft post.").optional(),
2098
+ moderationDetails: z.object({
2099
+ submittedBy: z.string().describe(
2100
+ "Member ID of the person submitting the draft post for review."
2101
+ ).regex(
2102
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2103
+ "Must be a valid GUID"
2104
+ ).optional(),
2105
+ submittedDate: z.date().describe("Date the post was submitted for review.").optional().nullable(),
2106
+ status: z.enum(["UNKNOWN", "APPROVED", "REJECTED"]).describe(
2107
+ "Status indicating whether the submission was approved or rejected by the moderator."
2108
+ ).optional(),
2109
+ moderatedBy: z.string().describe(
2110
+ "Member ID of the person who approved or rejected the post."
2111
+ ).regex(
2112
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2113
+ "Must be a valid GUID"
2114
+ ).optional().nullable(),
2115
+ moderationDate: z.date().describe("Date the post was approved or rejected.").optional().nullable()
2116
+ }).describe(
2117
+ "Details of the draft post in review. Only relevant to posts submitted by guest writers."
2118
+ ).optional(),
2119
+ hasUnpublishedChanges: z.boolean().describe(
2120
+ "Indicates if there are changes made to the draft post that have not yet been published."
2121
+ ).optional(),
2122
+ editedDate: z.date().describe("Date the draft post was last edited.").optional().nullable(),
2123
+ scheduledPublishDate: z.date().describe("Date the draft post is scheduled to be published.").optional().nullable(),
2124
+ firstPublishedDate: z.date().describe("Date the post was first published.").optional().nullable(),
2125
+ seoData: z.object({
2126
+ tags: z.array(
2127
+ z.object({
2128
+ type: z.string().describe(
2129
+ "SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
2130
+ ).optional(),
2131
+ props: z.record(z.string(), z.any()).describe(
2132
+ 'A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.\nFor example: `{"name": "description", "content": "the description itself"}`.'
2133
+ ).optional().nullable(),
2134
+ meta: z.record(z.string(), z.any()).describe(
2135
+ 'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
2136
+ ).optional().nullable(),
2137
+ children: z.string().describe(
2138
+ "SEO tag inner content. For example, `<title> inner content </title>`."
2139
+ ).optional(),
2140
+ custom: z.boolean().describe(
2141
+ "Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
2142
+ ).optional(),
2143
+ disabled: z.boolean().describe(
2144
+ "Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
2145
+ ).optional()
2146
+ })
2147
+ ).optional(),
2148
+ settings: z.object({
2149
+ preventAutoRedirect: z.boolean().describe(
2150
+ "Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled.\n\n\nDefault: `false` (automatical redirect is enabled)."
2151
+ ).optional(),
2152
+ keywords: z.array(
2153
+ z.object({
2154
+ term: z.string().describe("Keyword value.").optional(),
2155
+ isMain: z.boolean().describe(
2156
+ "Whether the keyword is the main focus keyword."
2157
+ ).optional(),
2158
+ origin: z.string().describe(
2159
+ "The source that added the keyword terms to the SEO settings."
2160
+ ).max(1e3).optional().nullable()
2161
+ })
2162
+ ).max(5).optional()
2163
+ }).describe("SEO general settings.").optional()
2164
+ }).describe("SEO data.").optional(),
2165
+ url: z.string().describe(
2166
+ "Draft post URL preview. What the URL will look like once the post is published."
2167
+ ).optional(),
2168
+ _createdDate: z.date().describe("Date the draft post was first created.").optional().nullable(),
2169
+ seoSlug: z.string().describe("SEO slug.").max(100).optional().nullable(),
2170
+ media: z.intersection(
2171
+ z.object({
2172
+ displayed: z.boolean().describe("Whether cover media is displayed.").optional(),
2173
+ custom: z.boolean().describe(
2174
+ "Whether custom cover media has been specified. If `false`, the first media item in the post's content serves as cover media."
2175
+ ).optional(),
2176
+ altText: z.string().describe("Media alternative text.").min(1).max(1e3).optional().nullable()
2177
+ }),
2178
+ z.xor([
2179
+ z.object({
2180
+ wixMedia: z.never().optional(),
2181
+ embedMedia: z.never().optional()
2182
+ }),
2183
+ z.object({
2184
+ embedMedia: z.never().optional(),
2185
+ wixMedia: z.object({
2186
+ image: z.string().describe("Image details.").optional(),
2187
+ videoV2: z.string().describe("Video details.").optional()
2188
+ }).describe("Wix Media details.")
2189
+ }),
2190
+ z.object({
2191
+ wixMedia: z.never().optional(),
2192
+ embedMedia: z.object({
2193
+ thumbnail: z.object({
2194
+ url: z.string().describe("Thumbnail url.").max(2e3).optional(),
2195
+ width: z.number().int().describe("Thumbnail width.").min(0).optional(),
2196
+ height: z.number().int().describe("Thumbnail height.").min(0).optional()
2197
+ }).describe("Thumbnail details.").optional(),
2198
+ video: z.object({
2199
+ url: z.string().describe("Video url.").max(2e3).optional(),
2200
+ width: z.number().int().describe("Video width.").min(0).optional(),
2201
+ height: z.number().int().describe("Video height.").min(0).optional()
2202
+ }).describe("Video details.").optional()
2203
+ }).describe("Embed media details.")
2204
+ })
2205
+ ])
2206
+ ).describe("Post cover media.").optional(),
2207
+ previewTextParagraph: z.number().int().describe(
2208
+ "Number of paragraphs to display in a paid content preview for non-paying users."
2209
+ ).min(0).optional().nullable()
2210
+ })
2211
+ ).optional(),
2212
+ metaData: z.object({
2213
+ count: z.number().int().describe("Number of items returned in this response.").optional(),
2214
+ offset: z.number().int().describe("Requested offset.").optional(),
2215
+ total: z.number().int().describe("Total number of items that match the query.").optional(),
2216
+ cursor: z.string().describe(
2217
+ "Pointer to the next or previous page in the list of results."
2218
+ ).max(2e3).optional().nullable()
2219
+ }).describe("Details on the paged set of results returned.").optional()
2220
+ });
2221
+ var GetDeletedDraftPostRequest = z.object({
2222
+ draftPostId: z.string().describe("Draft post ID.").max(38)
2223
+ });
2224
+ var GetDeletedDraftPostResponse = z.object({
2225
+ draftPost: z.object({
2226
+ _id: z.string().describe("Draft post ID.").max(38).optional(),
2227
+ title: z.string().describe("Draft post title.").max(200).optional(),
2228
+ excerpt: z.string().describe(
2229
+ "Draft post excerpt.\n\nIf no excerpt has been manually set, an excerpt is automatically generated from the post's text.\nThis can be retrieved using the `GENERATED_EXCERPT` fieldset."
2230
+ ).max(500).optional().nullable(),
2231
+ featured: z.boolean().describe("Whether the draft post is marked as featured.").optional().nullable(),
2232
+ categoryIds: z.array(z.string()).max(10).optional(),
2233
+ memberId: z.string().describe("Draft post owner's member ID.").regex(
2234
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2235
+ "Must be a valid GUID"
2236
+ ).optional().nullable(),
2237
+ hashtags: z.array(z.string()).max(100).optional(),
2238
+ commentingEnabled: z.boolean().describe("Whether commenting on the draft post is enabled.").optional().nullable(),
2239
+ minutesToRead: z.number().int().describe(
2240
+ "Estimated reading time of the draft post (calculated automatically)."
2241
+ ).optional(),
2242
+ heroImage: z.string().describe("Image placed at the top of the blog page.").optional(),
2243
+ tagIds: z.array(z.string()).max(30).optional(),
2244
+ relatedPostIds: z.array(z.string()).max(3).optional(),
2245
+ pricingPlanIds: z.array(z.string()).max(100).optional(),
2246
+ translationId: z.string().describe(
2247
+ "ID of the draft post's translations.\n\nAll translations of a single post share the same `translationId`.\nAvailable only if the [Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) app is installed."
2248
+ ).regex(
2249
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2250
+ "Must be a valid GUID"
2251
+ ).optional().nullable(),
2252
+ language: z.string().describe(
2253
+ "Language the draft post is written in.\n\n2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format."
2254
+ ).optional().nullable(),
2255
+ richContent: z.any().describe(
2256
+ 'Draft Post rich content.\n\n<widget src="https://apps.wix.com/_serverless/ricos-playground-services/goto/api-component" plugins="image.gallery.video.audio.divider.linkButton.html.giphy.codeBlock.file.hashtag.lineSpacing.indent.link.textColor.textHighlight.heading.verticalEmbed.table.collapsibleList.poll" exampleid="72c23a25-524f-4f70-a260-4a2777b6f5d5">\n<a href="https://dev.wix.com/docs/ricos/api-reference/ricos-document">See Ricos document reference</a>\n</widget>'
2257
+ ).optional(),
2258
+ status: z.enum([
2259
+ "UNKNOWN",
2260
+ "PUBLISHED",
2261
+ "UNPUBLISHED",
2262
+ "SCHEDULED",
2263
+ "DELETED",
2264
+ "IN_REVIEW"
2265
+ ]).describe("Status of the draft post.").optional(),
2266
+ moderationDetails: z.object({
2267
+ submittedBy: z.string().describe(
2268
+ "Member ID of the person submitting the draft post for review."
2269
+ ).regex(
2270
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2271
+ "Must be a valid GUID"
2272
+ ).optional(),
2273
+ submittedDate: z.date().describe("Date the post was submitted for review.").optional().nullable(),
2274
+ status: z.enum(["UNKNOWN", "APPROVED", "REJECTED"]).describe(
2275
+ "Status indicating whether the submission was approved or rejected by the moderator."
2276
+ ).optional(),
2277
+ moderatedBy: z.string().describe(
2278
+ "Member ID of the person who approved or rejected the post."
2279
+ ).regex(
2280
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2281
+ "Must be a valid GUID"
2282
+ ).optional().nullable(),
2283
+ moderationDate: z.date().describe("Date the post was approved or rejected.").optional().nullable()
2284
+ }).describe(
2285
+ "Details of the draft post in review. Only relevant to posts submitted by guest writers."
2286
+ ).optional(),
2287
+ hasUnpublishedChanges: z.boolean().describe(
2288
+ "Indicates if there are changes made to the draft post that have not yet been published."
2289
+ ).optional(),
2290
+ editedDate: z.date().describe("Date the draft post was last edited.").optional().nullable(),
2291
+ scheduledPublishDate: z.date().describe("Date the draft post is scheduled to be published.").optional().nullable(),
2292
+ firstPublishedDate: z.date().describe("Date the post was first published.").optional().nullable(),
2293
+ seoData: z.object({
2294
+ tags: z.array(
2295
+ z.object({
2296
+ type: z.string().describe(
2297
+ "SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
2298
+ ).optional(),
2299
+ props: z.record(z.string(), z.any()).describe(
2300
+ 'A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.\nFor example: `{"name": "description", "content": "the description itself"}`.'
2301
+ ).optional().nullable(),
2302
+ meta: z.record(z.string(), z.any()).describe(
2303
+ 'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
2304
+ ).optional().nullable(),
2305
+ children: z.string().describe(
2306
+ "SEO tag inner content. For example, `<title> inner content </title>`."
2307
+ ).optional(),
2308
+ custom: z.boolean().describe(
2309
+ "Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
2310
+ ).optional(),
2311
+ disabled: z.boolean().describe(
2312
+ "Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
2313
+ ).optional()
2314
+ })
2315
+ ).optional(),
2316
+ settings: z.object({
2317
+ preventAutoRedirect: z.boolean().describe(
2318
+ "Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled.\n\n\nDefault: `false` (automatical redirect is enabled)."
2319
+ ).optional(),
2320
+ keywords: z.array(
2321
+ z.object({
2322
+ term: z.string().describe("Keyword value.").optional(),
2323
+ isMain: z.boolean().describe(
2324
+ "Whether the keyword is the main focus keyword."
2325
+ ).optional(),
2326
+ origin: z.string().describe(
2327
+ "The source that added the keyword terms to the SEO settings."
2328
+ ).max(1e3).optional().nullable()
2329
+ })
2330
+ ).max(5).optional()
2331
+ }).describe("SEO general settings.").optional()
2332
+ }).describe("SEO data.").optional(),
2333
+ url: z.string().describe(
2334
+ "Draft post URL preview. What the URL will look like once the post is published."
2335
+ ).optional(),
2336
+ _createdDate: z.date().describe("Date the draft post was first created.").optional().nullable(),
2337
+ seoSlug: z.string().describe("SEO slug.").max(100).optional().nullable(),
2338
+ media: z.intersection(
2339
+ z.object({
2340
+ displayed: z.boolean().describe("Whether cover media is displayed.").optional(),
2341
+ custom: z.boolean().describe(
2342
+ "Whether custom cover media has been specified. If `false`, the first media item in the post's content serves as cover media."
2343
+ ).optional(),
2344
+ altText: z.string().describe("Media alternative text.").min(1).max(1e3).optional().nullable()
2345
+ }),
2346
+ z.xor([
2347
+ z.object({
2348
+ wixMedia: z.never().optional(),
2349
+ embedMedia: z.never().optional()
2350
+ }),
2351
+ z.object({
2352
+ embedMedia: z.never().optional(),
2353
+ wixMedia: z.object({
2354
+ image: z.string().describe("Image details.").optional(),
2355
+ videoV2: z.string().describe("Video details.").optional()
2356
+ }).describe("Wix Media details.")
2357
+ }),
2358
+ z.object({
2359
+ wixMedia: z.never().optional(),
2360
+ embedMedia: z.object({
2361
+ thumbnail: z.object({
2362
+ url: z.string().describe("Thumbnail url.").max(2e3).optional(),
2363
+ width: z.number().int().describe("Thumbnail width.").min(0).optional(),
2364
+ height: z.number().int().describe("Thumbnail height.").min(0).optional()
2365
+ }).describe("Thumbnail details.").optional(),
2366
+ video: z.object({
2367
+ url: z.string().describe("Video url.").max(2e3).optional(),
2368
+ width: z.number().int().describe("Video width.").min(0).optional(),
2369
+ height: z.number().int().describe("Video height.").min(0).optional()
2370
+ }).describe("Video details.").optional()
2371
+ }).describe("Embed media details.")
2372
+ })
2373
+ ])
2374
+ ).describe("Post cover media.").optional(),
2375
+ previewTextParagraph: z.number().int().describe(
2376
+ "Number of paragraphs to display in a paid content preview for non-paying users."
2377
+ ).min(0).optional().nullable()
2378
+ }).describe("Draft post info.").optional()
2379
+ });
2380
+ var RestoreFromTrashBinRequest = z.object({
2381
+ draftPostId: z.string().describe("Draft post ID.").max(38)
2382
+ });
2383
+ var RestoreFromTrashBinResponse = z.object({
2384
+ draftPost: z.object({
2385
+ _id: z.string().describe("Draft post ID.").max(38).optional(),
2386
+ title: z.string().describe("Draft post title.").max(200).optional(),
2387
+ excerpt: z.string().describe(
2388
+ "Draft post excerpt.\n\nIf no excerpt has been manually set, an excerpt is automatically generated from the post's text.\nThis can be retrieved using the `GENERATED_EXCERPT` fieldset."
2389
+ ).max(500).optional().nullable(),
2390
+ featured: z.boolean().describe("Whether the draft post is marked as featured.").optional().nullable(),
2391
+ categoryIds: z.array(z.string()).max(10).optional(),
2392
+ memberId: z.string().describe("Draft post owner's member ID.").regex(
2393
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2394
+ "Must be a valid GUID"
2395
+ ).optional().nullable(),
2396
+ hashtags: z.array(z.string()).max(100).optional(),
2397
+ commentingEnabled: z.boolean().describe("Whether commenting on the draft post is enabled.").optional().nullable(),
2398
+ minutesToRead: z.number().int().describe(
2399
+ "Estimated reading time of the draft post (calculated automatically)."
2400
+ ).optional(),
2401
+ heroImage: z.string().describe("Image placed at the top of the blog page.").optional(),
2402
+ tagIds: z.array(z.string()).max(30).optional(),
2403
+ relatedPostIds: z.array(z.string()).max(3).optional(),
2404
+ pricingPlanIds: z.array(z.string()).max(100).optional(),
2405
+ translationId: z.string().describe(
2406
+ "ID of the draft post's translations.\n\nAll translations of a single post share the same `translationId`.\nAvailable only if the [Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) app is installed."
2407
+ ).regex(
2408
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2409
+ "Must be a valid GUID"
2410
+ ).optional().nullable(),
2411
+ language: z.string().describe(
2412
+ "Language the draft post is written in.\n\n2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format."
2413
+ ).optional().nullable(),
2414
+ richContent: z.any().describe(
2415
+ 'Draft Post rich content.\n\n<widget src="https://apps.wix.com/_serverless/ricos-playground-services/goto/api-component" plugins="image.gallery.video.audio.divider.linkButton.html.giphy.codeBlock.file.hashtag.lineSpacing.indent.link.textColor.textHighlight.heading.verticalEmbed.table.collapsibleList.poll" exampleid="72c23a25-524f-4f70-a260-4a2777b6f5d5">\n<a href="https://dev.wix.com/docs/ricos/api-reference/ricos-document">See Ricos document reference</a>\n</widget>'
2416
+ ).optional(),
2417
+ status: z.enum([
2418
+ "UNKNOWN",
2419
+ "PUBLISHED",
2420
+ "UNPUBLISHED",
2421
+ "SCHEDULED",
2422
+ "DELETED",
2423
+ "IN_REVIEW"
2424
+ ]).describe("Status of the draft post.").optional(),
2425
+ moderationDetails: z.object({
2426
+ submittedBy: z.string().describe(
2427
+ "Member ID of the person submitting the draft post for review."
2428
+ ).regex(
2429
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2430
+ "Must be a valid GUID"
2431
+ ).optional(),
2432
+ submittedDate: z.date().describe("Date the post was submitted for review.").optional().nullable(),
2433
+ status: z.enum(["UNKNOWN", "APPROVED", "REJECTED"]).describe(
2434
+ "Status indicating whether the submission was approved or rejected by the moderator."
2435
+ ).optional(),
2436
+ moderatedBy: z.string().describe(
2437
+ "Member ID of the person who approved or rejected the post."
2438
+ ).regex(
2439
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2440
+ "Must be a valid GUID"
2441
+ ).optional().nullable(),
2442
+ moderationDate: z.date().describe("Date the post was approved or rejected.").optional().nullable()
2443
+ }).describe(
2444
+ "Details of the draft post in review. Only relevant to posts submitted by guest writers."
2445
+ ).optional(),
2446
+ hasUnpublishedChanges: z.boolean().describe(
2447
+ "Indicates if there are changes made to the draft post that have not yet been published."
2448
+ ).optional(),
2449
+ editedDate: z.date().describe("Date the draft post was last edited.").optional().nullable(),
2450
+ scheduledPublishDate: z.date().describe("Date the draft post is scheduled to be published.").optional().nullable(),
2451
+ firstPublishedDate: z.date().describe("Date the post was first published.").optional().nullable(),
2452
+ seoData: z.object({
2453
+ tags: z.array(
2454
+ z.object({
2455
+ type: z.string().describe(
2456
+ "SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
2457
+ ).optional(),
2458
+ props: z.record(z.string(), z.any()).describe(
2459
+ 'A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.\nFor example: `{"name": "description", "content": "the description itself"}`.'
2460
+ ).optional().nullable(),
2461
+ meta: z.record(z.string(), z.any()).describe(
2462
+ 'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
2463
+ ).optional().nullable(),
2464
+ children: z.string().describe(
2465
+ "SEO tag inner content. For example, `<title> inner content </title>`."
2466
+ ).optional(),
2467
+ custom: z.boolean().describe(
2468
+ "Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
2469
+ ).optional(),
2470
+ disabled: z.boolean().describe(
2471
+ "Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
2472
+ ).optional()
2473
+ })
2474
+ ).optional(),
2475
+ settings: z.object({
2476
+ preventAutoRedirect: z.boolean().describe(
2477
+ "Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled.\n\n\nDefault: `false` (automatical redirect is enabled)."
2478
+ ).optional(),
2479
+ keywords: z.array(
2480
+ z.object({
2481
+ term: z.string().describe("Keyword value.").optional(),
2482
+ isMain: z.boolean().describe(
2483
+ "Whether the keyword is the main focus keyword."
2484
+ ).optional(),
2485
+ origin: z.string().describe(
2486
+ "The source that added the keyword terms to the SEO settings."
2487
+ ).max(1e3).optional().nullable()
2488
+ })
2489
+ ).max(5).optional()
2490
+ }).describe("SEO general settings.").optional()
2491
+ }).describe("SEO data.").optional(),
2492
+ url: z.string().describe(
2493
+ "Draft post URL preview. What the URL will look like once the post is published."
2494
+ ).optional(),
2495
+ _createdDate: z.date().describe("Date the draft post was first created.").optional().nullable(),
2496
+ seoSlug: z.string().describe("SEO slug.").max(100).optional().nullable(),
2497
+ media: z.intersection(
2498
+ z.object({
2499
+ displayed: z.boolean().describe("Whether cover media is displayed.").optional(),
2500
+ custom: z.boolean().describe(
2501
+ "Whether custom cover media has been specified. If `false`, the first media item in the post's content serves as cover media."
2502
+ ).optional(),
2503
+ altText: z.string().describe("Media alternative text.").min(1).max(1e3).optional().nullable()
2504
+ }),
2505
+ z.xor([
2506
+ z.object({
2507
+ wixMedia: z.never().optional(),
2508
+ embedMedia: z.never().optional()
2509
+ }),
2510
+ z.object({
2511
+ embedMedia: z.never().optional(),
2512
+ wixMedia: z.object({
2513
+ image: z.string().describe("Image details.").optional(),
2514
+ videoV2: z.string().describe("Video details.").optional()
2515
+ }).describe("Wix Media details.")
2516
+ }),
2517
+ z.object({
2518
+ wixMedia: z.never().optional(),
2519
+ embedMedia: z.object({
2520
+ thumbnail: z.object({
2521
+ url: z.string().describe("Thumbnail url.").max(2e3).optional(),
2522
+ width: z.number().int().describe("Thumbnail width.").min(0).optional(),
2523
+ height: z.number().int().describe("Thumbnail height.").min(0).optional()
2524
+ }).describe("Thumbnail details.").optional(),
2525
+ video: z.object({
2526
+ url: z.string().describe("Video url.").max(2e3).optional(),
2527
+ width: z.number().int().describe("Video width.").min(0).optional(),
2528
+ height: z.number().int().describe("Video height.").min(0).optional()
2529
+ }).describe("Video details.").optional()
2530
+ }).describe("Embed media details.")
2531
+ })
2532
+ ])
2533
+ ).describe("Post cover media.").optional(),
2534
+ previewTextParagraph: z.number().int().describe(
2535
+ "Number of paragraphs to display in a paid content preview for non-paying users."
2536
+ ).min(0).optional().nullable()
2537
+ }).describe("Restored draft post info.").optional()
2538
+ });
2539
+ var QueryDraftPostsRequest = z.object({
2540
+ query: z.object({
2541
+ filter: z.object({
2542
+ _id: z.object({
2543
+ $eq: z.string(),
2544
+ $in: z.array(z.string()),
2545
+ $ne: z.string(),
2546
+ $nin: z.array(z.string())
2547
+ }).partial().strict().optional(),
2548
+ title: z.object({
2549
+ $eq: z.string(),
2550
+ $exists: z.boolean(),
2551
+ $gt: z.string(),
2552
+ $gte: z.string(),
2553
+ $in: z.array(z.string()),
2554
+ $lt: z.string(),
2555
+ $lte: z.string(),
2556
+ $ne: z.string(),
2557
+ $startsWith: z.string()
2558
+ }).partial().strict().optional(),
2559
+ excerpt: z.object({
2560
+ $eq: z.string(),
2561
+ $exists: z.boolean(),
2562
+ $gt: z.string(),
2563
+ $gte: z.string(),
2564
+ $in: z.array(z.string()),
2565
+ $lt: z.string(),
2566
+ $lte: z.string(),
2567
+ $ne: z.string(),
2568
+ $startsWith: z.string()
2569
+ }).partial().strict().optional(),
2570
+ status: z.object({
2571
+ $eq: z.string(),
2572
+ $in: z.array(z.string()),
2573
+ $ne: z.string(),
2574
+ $nin: z.array(z.string())
2575
+ }).partial().strict().optional(),
2576
+ scheduledPublishDate: z.object({
2577
+ $eq: z.string(),
2578
+ $gt: z.string(),
2579
+ $gte: z.string(),
2580
+ $in: z.array(z.string()),
2581
+ $lt: z.string(),
2582
+ $lte: z.string(),
2583
+ $ne: z.string()
2584
+ }).partial().strict().optional(),
2585
+ editedDate: z.object({
2586
+ $eq: z.string(),
2587
+ $gt: z.string(),
2588
+ $gte: z.string(),
2589
+ $in: z.array(z.string()),
2590
+ $lt: z.string(),
2591
+ $lte: z.string(),
2592
+ $ne: z.string()
2593
+ }).partial().strict().optional(),
2594
+ categoryIds: z.object({
2595
+ $hasAll: z.array(z.string()),
2596
+ $hasSome: z.array(z.string())
2597
+ }).partial().strict().optional(),
2598
+ hashtags: z.object({
2599
+ $hasAll: z.array(z.string()),
2600
+ $hasSome: z.array(z.string())
2601
+ }).partial().strict().optional(),
2602
+ tagIds: z.object({
2603
+ $hasAll: z.array(z.string()),
2604
+ $hasSome: z.array(z.string())
2605
+ }).partial().strict().optional(),
2606
+ pricingPlanIds: z.object({
2607
+ $hasAll: z.array(z.string()),
2608
+ $hasSome: z.array(z.string())
2609
+ }).partial().strict().optional(),
2610
+ memberId: z.object({}).partial().strict().optional(),
2611
+ featured: z.object({ $eq: z.boolean(), $ne: z.boolean() }).partial().strict().optional(),
2612
+ commentingEnabled: z.object({ $eq: z.boolean(), $ne: z.boolean() }).partial().strict().optional(),
2613
+ hasUnpublishedChanges: z.object({ $eq: z.boolean(), $ne: z.boolean() }).partial().strict().optional(),
2614
+ minutesToRead: z.object({
2615
+ $eq: z.number(),
2616
+ $gt: z.number(),
2617
+ $gte: z.number(),
2618
+ $in: z.array(z.number()),
2619
+ $lt: z.number(),
2620
+ $lte: z.number(),
2621
+ $ne: z.number()
2622
+ }).partial().strict().optional(),
2623
+ language: z.object({
2624
+ $eq: z.string(),
2625
+ $exists: z.boolean(),
2626
+ $in: z.array(z.string()),
2627
+ $ne: z.string(),
2628
+ $nin: z.array(z.string())
2629
+ }).partial().strict().optional(),
2630
+ translationId: z.object({
2631
+ $eq: z.string(),
2632
+ $exists: z.boolean(),
2633
+ $in: z.array(z.string()),
2634
+ $ne: z.string(),
2635
+ $nin: z.array(z.string())
2636
+ }).partial().strict().optional(),
2637
+ $and: z.array(z.any()).optional(),
2638
+ $or: z.array(z.any()).optional(),
2639
+ $not: z.any().optional()
2640
+ }).strict().optional(),
2641
+ sort: z.array(
2642
+ z.object({
2643
+ fieldName: z.enum([
2644
+ "_id",
2645
+ "title",
2646
+ "excerpt",
2647
+ "status",
2648
+ "scheduledPublishDate",
2649
+ "editedDate",
2650
+ "featured",
2651
+ "commentingEnabled",
2652
+ "hasUnpublishedChanges"
2653
+ ]).optional(),
2654
+ order: z.enum(["ASC", "DESC"]).optional()
2655
+ })
2656
+ ).optional()
2657
+ }).catchall(z.any()).describe("Query options."),
2658
+ options: z.object({
2659
+ fieldsets: z.array(
2660
+ z.enum([
2661
+ "UNKNOWN",
2662
+ "URL",
2663
+ "CONTENT",
2664
+ "RICH_CONTENT",
2665
+ "GENERATED_EXCERPT"
2666
+ ])
2667
+ ).max(10).optional()
2668
+ }).describe("Options for querying draft posts.").optional()
2669
+ });
2670
+ var QueryDraftPostsResponse = z.object({
2671
+ draftPosts: z.array(
2672
+ z.object({
2673
+ _id: z.string().describe("Draft post ID.").max(38).optional(),
2674
+ title: z.string().describe("Draft post title.").max(200).optional(),
2675
+ excerpt: z.string().describe(
2676
+ "Draft post excerpt.\n\nIf no excerpt has been manually set, an excerpt is automatically generated from the post's text.\nThis can be retrieved using the `GENERATED_EXCERPT` fieldset."
2677
+ ).max(500).optional().nullable(),
2678
+ featured: z.boolean().describe("Whether the draft post is marked as featured.").optional().nullable(),
2679
+ categoryIds: z.array(z.string()).max(10).optional(),
2680
+ memberId: z.string().describe("Draft post owner's member ID.").regex(
2681
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2682
+ "Must be a valid GUID"
2683
+ ).optional().nullable(),
2684
+ hashtags: z.array(z.string()).max(100).optional(),
2685
+ commentingEnabled: z.boolean().describe("Whether commenting on the draft post is enabled.").optional().nullable(),
2686
+ minutesToRead: z.number().int().describe(
2687
+ "Estimated reading time of the draft post (calculated automatically)."
2688
+ ).optional(),
2689
+ heroImage: z.string().describe("Image placed at the top of the blog page.").optional(),
2690
+ tagIds: z.array(z.string()).max(30).optional(),
2691
+ relatedPostIds: z.array(z.string()).max(3).optional(),
2692
+ pricingPlanIds: z.array(z.string()).max(100).optional(),
2693
+ translationId: z.string().describe(
2694
+ "ID of the draft post's translations.\n\nAll translations of a single post share the same `translationId`.\nAvailable only if the [Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview) app is installed."
2695
+ ).regex(
2696
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2697
+ "Must be a valid GUID"
2698
+ ).optional().nullable(),
2699
+ language: z.string().describe(
2700
+ "Language the draft post is written in.\n\n2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format."
2701
+ ).optional().nullable(),
2702
+ richContent: z.any().describe(
2703
+ 'Draft Post rich content.\n\n<widget src="https://apps.wix.com/_serverless/ricos-playground-services/goto/api-component" plugins="image.gallery.video.audio.divider.linkButton.html.giphy.codeBlock.file.hashtag.lineSpacing.indent.link.textColor.textHighlight.heading.verticalEmbed.table.collapsibleList.poll" exampleid="72c23a25-524f-4f70-a260-4a2777b6f5d5">\n<a href="https://dev.wix.com/docs/ricos/api-reference/ricos-document">See Ricos document reference</a>\n</widget>'
2704
+ ).optional(),
2705
+ status: z.enum([
2706
+ "UNKNOWN",
2707
+ "PUBLISHED",
2708
+ "UNPUBLISHED",
2709
+ "SCHEDULED",
2710
+ "DELETED",
2711
+ "IN_REVIEW"
2712
+ ]).describe("Status of the draft post.").optional(),
2713
+ moderationDetails: z.object({
2714
+ submittedBy: z.string().describe(
2715
+ "Member ID of the person submitting the draft post for review."
2716
+ ).regex(
2717
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2718
+ "Must be a valid GUID"
2719
+ ).optional(),
2720
+ submittedDate: z.date().describe("Date the post was submitted for review.").optional().nullable(),
2721
+ status: z.enum(["UNKNOWN", "APPROVED", "REJECTED"]).describe(
2722
+ "Status indicating whether the submission was approved or rejected by the moderator."
2723
+ ).optional(),
2724
+ moderatedBy: z.string().describe(
2725
+ "Member ID of the person who approved or rejected the post."
2726
+ ).regex(
2727
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2728
+ "Must be a valid GUID"
2729
+ ).optional().nullable(),
2730
+ moderationDate: z.date().describe("Date the post was approved or rejected.").optional().nullable()
2731
+ }).describe(
2732
+ "Details of the draft post in review. Only relevant to posts submitted by guest writers."
2733
+ ).optional(),
2734
+ hasUnpublishedChanges: z.boolean().describe(
2735
+ "Indicates if there are changes made to the draft post that have not yet been published."
2736
+ ).optional(),
2737
+ editedDate: z.date().describe("Date the draft post was last edited.").optional().nullable(),
2738
+ scheduledPublishDate: z.date().describe("Date the draft post is scheduled to be published.").optional().nullable(),
2739
+ firstPublishedDate: z.date().describe("Date the post was first published.").optional().nullable(),
2740
+ seoData: z.object({
2741
+ tags: z.array(
2742
+ z.object({
2743
+ type: z.string().describe(
2744
+ "SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
2745
+ ).optional(),
2746
+ props: z.record(z.string(), z.any()).describe(
2747
+ 'A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.\nFor example: `{"name": "description", "content": "the description itself"}`.'
2748
+ ).optional().nullable(),
2749
+ meta: z.record(z.string(), z.any()).describe(
2750
+ 'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
2751
+ ).optional().nullable(),
2752
+ children: z.string().describe(
2753
+ "SEO tag inner content. For example, `<title> inner content </title>`."
2754
+ ).optional(),
2755
+ custom: z.boolean().describe(
2756
+ "Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
2757
+ ).optional(),
2758
+ disabled: z.boolean().describe(
2759
+ "Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
2760
+ ).optional()
2761
+ })
2762
+ ).optional(),
2763
+ settings: z.object({
2764
+ preventAutoRedirect: z.boolean().describe(
2765
+ "Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled.\n\n\nDefault: `false` (automatical redirect is enabled)."
2766
+ ).optional(),
2767
+ keywords: z.array(
2768
+ z.object({
2769
+ term: z.string().describe("Keyword value.").optional(),
2770
+ isMain: z.boolean().describe(
2771
+ "Whether the keyword is the main focus keyword."
2772
+ ).optional(),
2773
+ origin: z.string().describe(
2774
+ "The source that added the keyword terms to the SEO settings."
2775
+ ).max(1e3).optional().nullable()
2776
+ })
2777
+ ).max(5).optional()
2778
+ }).describe("SEO general settings.").optional()
2779
+ }).describe("SEO data.").optional(),
2780
+ url: z.string().describe(
2781
+ "Draft post URL preview. What the URL will look like once the post is published."
2782
+ ).optional(),
2783
+ _createdDate: z.date().describe("Date the draft post was first created.").optional().nullable(),
2784
+ seoSlug: z.string().describe("SEO slug.").max(100).optional().nullable(),
2785
+ media: z.intersection(
2786
+ z.object({
2787
+ displayed: z.boolean().describe("Whether cover media is displayed.").optional(),
2788
+ custom: z.boolean().describe(
2789
+ "Whether custom cover media has been specified. If `false`, the first media item in the post's content serves as cover media."
2790
+ ).optional(),
2791
+ altText: z.string().describe("Media alternative text.").min(1).max(1e3).optional().nullable()
2792
+ }),
2793
+ z.xor([
2794
+ z.object({
2795
+ wixMedia: z.never().optional(),
2796
+ embedMedia: z.never().optional()
2797
+ }),
2798
+ z.object({
2799
+ embedMedia: z.never().optional(),
2800
+ wixMedia: z.object({
2801
+ image: z.string().describe("Image details.").optional(),
2802
+ videoV2: z.string().describe("Video details.").optional()
2803
+ }).describe("Wix Media details.")
2804
+ }),
2805
+ z.object({
2806
+ wixMedia: z.never().optional(),
2807
+ embedMedia: z.object({
2808
+ thumbnail: z.object({
2809
+ url: z.string().describe("Thumbnail url.").max(2e3).optional(),
2810
+ width: z.number().int().describe("Thumbnail width.").min(0).optional(),
2811
+ height: z.number().int().describe("Thumbnail height.").min(0).optional()
2812
+ }).describe("Thumbnail details.").optional(),
2813
+ video: z.object({
2814
+ url: z.string().describe("Video url.").max(2e3).optional(),
2815
+ width: z.number().int().describe("Video width.").min(0).optional(),
2816
+ height: z.number().int().describe("Video height.").min(0).optional()
2817
+ }).describe("Video details.").optional()
2818
+ }).describe("Embed media details.")
2819
+ })
2820
+ ])
2821
+ ).describe("Post cover media.").optional(),
2822
+ previewTextParagraph: z.number().int().describe(
2823
+ "Number of paragraphs to display in a paid content preview for non-paying users."
2824
+ ).min(0).optional().nullable()
2825
+ })
2826
+ ).optional(),
2827
+ pagingMetadata: z.object({
2828
+ count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
2829
+ offset: z.number().int().describe("Offset that was requested.").optional().nullable(),
2830
+ total: z.number().int().describe(
2831
+ "Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set."
2832
+ ).optional().nullable(),
2833
+ tooManyToCount: z.boolean().describe(
2834
+ "Flag that indicates the server failed to calculate the `total` field."
2835
+ ).optional().nullable(),
2836
+ cursors: z.object({
2837
+ next: z.string().describe("Cursor pointing to next page in the list of results.").max(2e3).optional().nullable(),
2838
+ prev: z.string().describe(
2839
+ "Cursor pointing to previous page in the list of results."
2840
+ ).max(2e3).optional().nullable()
2841
+ }).describe(
2842
+ "Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used."
2843
+ ).optional()
2844
+ }).describe("Details on the paged set of results returned.").optional()
2845
+ });
2846
+ var PublishDraftPostRequest = z.object({
2847
+ draftPostId: z.string().describe("Draft post ID.").max(38)
2848
+ });
2849
+ var PublishDraftPostResponse = z.object({
2850
+ postId: z.string().describe("Published post ID.").regex(
2851
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2852
+ "Must be a valid GUID"
2853
+ ).optional()
2854
+ });
2855
+ // Annotate the CommonJS export names for ESM import in node:
2856
+ 0 && (module.exports = {
2857
+ BulkCreateDraftPostsRequest,
2858
+ BulkCreateDraftPostsResponse,
2859
+ BulkDeleteDraftPostsRequest,
2860
+ BulkDeleteDraftPostsResponse,
2861
+ BulkUpdateDraftPostsRequest,
2862
+ BulkUpdateDraftPostsResponse,
2863
+ CreateDraftPostRequest,
2864
+ CreateDraftPostResponse,
2865
+ DeleteDraftPostRequest,
2866
+ DeleteDraftPostResponse,
2867
+ GetDeletedDraftPostRequest,
2868
+ GetDeletedDraftPostResponse,
2869
+ GetDraftPostRequest,
2870
+ GetDraftPostResponse,
2871
+ ListDeletedDraftPostsRequest,
2872
+ ListDeletedDraftPostsResponse,
2873
+ ListDraftPostsRequest,
2874
+ ListDraftPostsResponse,
2875
+ PublishDraftPostRequest,
2876
+ PublishDraftPostResponse,
2877
+ QueryDraftPostsRequest,
2878
+ QueryDraftPostsResponse,
2879
+ RemoveFromTrashBinRequest,
2880
+ RemoveFromTrashBinResponse,
2881
+ RestoreFromTrashBinRequest,
2882
+ RestoreFromTrashBinResponse,
2883
+ UpdateDraftPostRequest,
2884
+ UpdateDraftPostResponse
2885
+ });
2886
+ //# sourceMappingURL=schemas.js.map