@wix/auto_sdk_blog_posts 1.0.141 → 1.0.142
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.
- package/build/cjs/schemas.d.ts +603 -0
- package/build/cjs/schemas.js +982 -0
- package/build/cjs/schemas.js.map +1 -0
- package/build/es/schemas.d.mts +603 -0
- package/build/es/schemas.mjs +932 -0
- package/build/es/schemas.mjs.map +1 -0
- package/build/internal/cjs/schemas.d.ts +603 -0
- package/build/internal/cjs/schemas.js +982 -0
- package/build/internal/cjs/schemas.js.map +1 -0
- package/build/internal/es/schemas.d.mts +603 -0
- package/build/internal/es/schemas.mjs +932 -0
- package/build/internal/es/schemas.mjs.map +1 -0
- package/package.json +11 -4
- package/schemas/package.json +3 -0
|
@@ -0,0 +1,982 @@
|
|
|
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
|
+
GetPostBySlugRequest: () => GetPostBySlugRequest,
|
|
34
|
+
GetPostBySlugResponse: () => GetPostBySlugResponse,
|
|
35
|
+
GetPostMetricsRequest: () => GetPostMetricsRequest,
|
|
36
|
+
GetPostMetricsResponse: () => GetPostMetricsResponse,
|
|
37
|
+
GetPostRequest: () => GetPostRequest,
|
|
38
|
+
GetPostResponse: () => GetPostResponse,
|
|
39
|
+
GetTotalPostsRequest: () => GetTotalPostsRequest,
|
|
40
|
+
GetTotalPostsResponse: () => GetTotalPostsResponse,
|
|
41
|
+
ListPostsRequest: () => ListPostsRequest,
|
|
42
|
+
ListPostsResponse: () => ListPostsResponse,
|
|
43
|
+
QueryPostCountStatsRequest: () => QueryPostCountStatsRequest,
|
|
44
|
+
QueryPostCountStatsResponse: () => QueryPostCountStatsResponse,
|
|
45
|
+
QueryPostsRequest: () => QueryPostsRequest,
|
|
46
|
+
QueryPostsResponse: () => QueryPostsResponse
|
|
47
|
+
});
|
|
48
|
+
module.exports = __toCommonJS(schemas_exports);
|
|
49
|
+
|
|
50
|
+
// src/blog-v3-post-posts.schemas.ts
|
|
51
|
+
var z = __toESM(require("zod"));
|
|
52
|
+
var QueryPostCountStatsRequest = z.object({
|
|
53
|
+
options: z.object({
|
|
54
|
+
rangeStart: z.date().describe(
|
|
55
|
+
"Start of time range to return, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time format."
|
|
56
|
+
).optional().nullable(),
|
|
57
|
+
order: z.enum(["UNKNOWN", "OLDEST", "NEWEST"]).optional(),
|
|
58
|
+
months: z.number().int().describe("Number of months to include in response.").min(0).optional(),
|
|
59
|
+
language: z.string().describe(
|
|
60
|
+
"Language filter.\n\n2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\nPass a language to only receive the period post count for that specified language."
|
|
61
|
+
).optional().nullable(),
|
|
62
|
+
timeZone: z.string().describe(
|
|
63
|
+
"Time zone to use when calculating the start of the month.\n\n[UTC timezone offset](https://en.wikipedia.org/wiki/List_of_UTC_offsets) format. For example, New York time zone is `-05`."
|
|
64
|
+
).min(3).max(100).optional().nullable()
|
|
65
|
+
}).optional()
|
|
66
|
+
});
|
|
67
|
+
var QueryPostCountStatsResponse = z.object({
|
|
68
|
+
stats: z.array(
|
|
69
|
+
z.object({
|
|
70
|
+
periodStart: z.date().describe(
|
|
71
|
+
"Start of time range in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time format."
|
|
72
|
+
).optional().nullable(),
|
|
73
|
+
postCount: z.number().int().describe("Number of posts published during this month.").min(0).optional()
|
|
74
|
+
})
|
|
75
|
+
).optional()
|
|
76
|
+
});
|
|
77
|
+
var GetTotalPostsRequest = z.object({
|
|
78
|
+
options: z.object({
|
|
79
|
+
language: z.string().describe(
|
|
80
|
+
"Language filter.\n\n2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\nPass a language to receive the total amount of posts in that specified language."
|
|
81
|
+
).optional().nullable()
|
|
82
|
+
}).optional()
|
|
83
|
+
});
|
|
84
|
+
var GetTotalPostsResponse = z.object({
|
|
85
|
+
total: z.number().int().describe("Total amount of published posts.").min(0).optional()
|
|
86
|
+
});
|
|
87
|
+
var GetPostRequest = z.object({
|
|
88
|
+
postId: z.string().describe("Post ID.").min(1).max(38),
|
|
89
|
+
options: z.object({
|
|
90
|
+
fieldsets: z.array(
|
|
91
|
+
z.enum([
|
|
92
|
+
"UNKNOWN",
|
|
93
|
+
"URL",
|
|
94
|
+
"CONTENT_TEXT",
|
|
95
|
+
"METRICS",
|
|
96
|
+
"SEO",
|
|
97
|
+
"CONTACT_ID",
|
|
98
|
+
"RICH_CONTENT",
|
|
99
|
+
"REFERENCE_ID"
|
|
100
|
+
])
|
|
101
|
+
).max(20).optional()
|
|
102
|
+
}).optional()
|
|
103
|
+
});
|
|
104
|
+
var GetPostResponse = z.object({
|
|
105
|
+
_id: z.string().describe("Post ID.").regex(
|
|
106
|
+
/^[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}$/,
|
|
107
|
+
"Must be a valid GUID"
|
|
108
|
+
).optional(),
|
|
109
|
+
title: z.string().describe("Post title.").max(200).optional(),
|
|
110
|
+
excerpt: z.string().describe(
|
|
111
|
+
"Post excerpt.\nCan be selected by a site contributor. By default, it is extracted from the content text's first characters.\n\nMax: 500 characters"
|
|
112
|
+
).max(500).optional(),
|
|
113
|
+
contentText: z.string().describe("The post's content in plain text.").max(4e5).optional().nullable(),
|
|
114
|
+
firstPublishedDate: z.date().describe("Date the post was first published.").optional().nullable(),
|
|
115
|
+
lastPublishedDate: z.date().describe("Date the post was last published.").optional().nullable(),
|
|
116
|
+
url: z.string().describe("Post URL.").optional(),
|
|
117
|
+
slug: z.string().describe("Post slug. For example, `'post-slug'`.").max(100).optional(),
|
|
118
|
+
featured: z.boolean().describe("Whether the post is marked as featured.").optional(),
|
|
119
|
+
pinned: z.boolean().describe(
|
|
120
|
+
"Whether the post is pinned. If `true`, the post is placed at the top of the post list."
|
|
121
|
+
).optional(),
|
|
122
|
+
categoryIds: z.array(z.string()).max(10).optional(),
|
|
123
|
+
memberId: z.string().describe("Member ID of the post's owner.").regex(
|
|
124
|
+
/^[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}$/,
|
|
125
|
+
"Must be a valid GUID"
|
|
126
|
+
).optional(),
|
|
127
|
+
hashtags: z.array(z.string()).max(100).optional(),
|
|
128
|
+
commentingEnabled: z.boolean().describe("Whether commenting on the post is enabled.").optional(),
|
|
129
|
+
minutesToRead: z.number().int().describe("Estimated reading time (calculated automatically).").optional(),
|
|
130
|
+
heroImage: z.string().describe(
|
|
131
|
+
"Image placed at the top of the blog page. Only displays on mobile devices."
|
|
132
|
+
).optional(),
|
|
133
|
+
tagIds: z.array(z.string()).max(30).optional(),
|
|
134
|
+
relatedPostIds: z.array(z.string()).max(3).optional(),
|
|
135
|
+
pricingPlanIds: z.array(z.string()).max(100).optional(),
|
|
136
|
+
translationId: z.string().describe(
|
|
137
|
+
"ID of the translations of this post. All translations of a single post share the same `translationId`."
|
|
138
|
+
).regex(
|
|
139
|
+
/^[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}$/,
|
|
140
|
+
"Must be a valid GUID"
|
|
141
|
+
).optional().nullable(),
|
|
142
|
+
language: z.string().describe(
|
|
143
|
+
"Language the 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."
|
|
144
|
+
).optional().nullable(),
|
|
145
|
+
seoData: z.object({
|
|
146
|
+
tags: z.array(
|
|
147
|
+
z.object({
|
|
148
|
+
type: z.string().describe(
|
|
149
|
+
"SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
|
|
150
|
+
).optional(),
|
|
151
|
+
props: z.record(z.string(), z.any()).describe(
|
|
152
|
+
'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"}`.'
|
|
153
|
+
).optional().nullable(),
|
|
154
|
+
meta: z.record(z.string(), z.any()).describe(
|
|
155
|
+
'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
|
|
156
|
+
).optional().nullable(),
|
|
157
|
+
children: z.string().describe(
|
|
158
|
+
"SEO tag inner content. For example, `<title> inner content </title>`."
|
|
159
|
+
).optional(),
|
|
160
|
+
custom: z.boolean().describe(
|
|
161
|
+
"Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
|
|
162
|
+
).optional(),
|
|
163
|
+
disabled: z.boolean().describe(
|
|
164
|
+
"Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
|
|
165
|
+
).optional()
|
|
166
|
+
})
|
|
167
|
+
).optional(),
|
|
168
|
+
settings: z.object({
|
|
169
|
+
preventAutoRedirect: z.boolean().describe(
|
|
170
|
+
"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)."
|
|
171
|
+
).optional(),
|
|
172
|
+
keywords: z.array(
|
|
173
|
+
z.object({
|
|
174
|
+
term: z.string().describe("Keyword value.").optional(),
|
|
175
|
+
isMain: z.boolean().describe("Whether the keyword is the main focus keyword.").optional(),
|
|
176
|
+
origin: z.string().describe(
|
|
177
|
+
"The source that added the keyword terms to the SEO settings."
|
|
178
|
+
).max(1e3).optional().nullable()
|
|
179
|
+
})
|
|
180
|
+
).max(5).optional()
|
|
181
|
+
}).describe("SEO general settings.").optional()
|
|
182
|
+
}).describe("SEO data.").optional(),
|
|
183
|
+
contactId: z.string().describe(
|
|
184
|
+
"Contact ID of the post's owner. See the Contacts API for more info."
|
|
185
|
+
).regex(
|
|
186
|
+
/^[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}$/,
|
|
187
|
+
"Must be a valid GUID"
|
|
188
|
+
).optional().nullable(),
|
|
189
|
+
richContent: z.any().describe(
|
|
190
|
+
'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>'
|
|
191
|
+
).optional(),
|
|
192
|
+
preview: z.boolean().describe(
|
|
193
|
+
"Whether the returned content is a preview of premium content. Defaults to `false`.\nA preview displays a limited number of paragraphs of paid content to non-subscribed users."
|
|
194
|
+
).optional(),
|
|
195
|
+
moderationDetails: z.object({
|
|
196
|
+
submittedBy: z.string().describe(
|
|
197
|
+
"Member ID of the person submitting the draft post for review."
|
|
198
|
+
).regex(
|
|
199
|
+
/^[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}$/,
|
|
200
|
+
"Must be a valid GUID"
|
|
201
|
+
).optional(),
|
|
202
|
+
submittedDate: z.date().describe("Date the post was submitted for review.").optional().nullable(),
|
|
203
|
+
status: z.enum(["UNKNOWN", "APPROVED", "REJECTED"]).describe(
|
|
204
|
+
"Status indicating whether the submission was approved or rejected by the moderator."
|
|
205
|
+
).optional(),
|
|
206
|
+
moderatedBy: z.string().describe("Member ID of the person who approved or rejected the post.").regex(
|
|
207
|
+
/^[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}$/,
|
|
208
|
+
"Must be a valid GUID"
|
|
209
|
+
).optional().nullable(),
|
|
210
|
+
moderationDate: z.date().describe("Date the post was approved or rejected.").optional().nullable()
|
|
211
|
+
}).describe(
|
|
212
|
+
"Post moderation details. Only relevant to posts submitted by [guest writers](https://support.wix.com/en/article/wix-blog-moderating-blog-posts-from-your-guest-writers).\n\nGuest writers have the ability to write posts but not publish them. These posts can be rejected or approved for publishing by a blog editor or Wix user."
|
|
213
|
+
).optional(),
|
|
214
|
+
media: z.intersection(
|
|
215
|
+
z.object({
|
|
216
|
+
displayed: z.boolean().describe("Whether cover media is displayed.").optional(),
|
|
217
|
+
custom: z.boolean().describe(
|
|
218
|
+
"Whether custom cover media has been specified. If `false`, the first media item in the post's content serves as cover media."
|
|
219
|
+
).optional(),
|
|
220
|
+
altText: z.string().describe("Media alternative text.").min(1).max(1e3).optional().nullable()
|
|
221
|
+
}),
|
|
222
|
+
z.xor([
|
|
223
|
+
z.object({
|
|
224
|
+
wixMedia: z.never().optional(),
|
|
225
|
+
embedMedia: z.never().optional()
|
|
226
|
+
}),
|
|
227
|
+
z.object({
|
|
228
|
+
embedMedia: z.never().optional(),
|
|
229
|
+
wixMedia: z.object({
|
|
230
|
+
image: z.string().describe("Image details.").optional(),
|
|
231
|
+
videoV2: z.string().describe("Video details.").optional()
|
|
232
|
+
}).describe("Wix Media details.")
|
|
233
|
+
}),
|
|
234
|
+
z.object({
|
|
235
|
+
wixMedia: z.never().optional(),
|
|
236
|
+
embedMedia: z.object({
|
|
237
|
+
thumbnail: z.object({
|
|
238
|
+
url: z.string().describe("Thumbnail url.").max(2e3).optional(),
|
|
239
|
+
width: z.number().int().describe("Thumbnail width.").min(0).optional(),
|
|
240
|
+
height: z.number().int().describe("Thumbnail height.").min(0).optional()
|
|
241
|
+
}).describe("Thumbnail details.").optional(),
|
|
242
|
+
video: z.object({
|
|
243
|
+
url: z.string().describe("Video url.").max(2e3).optional(),
|
|
244
|
+
width: z.number().int().describe("Video width.").min(0).optional(),
|
|
245
|
+
height: z.number().int().describe("Video height.").min(0).optional()
|
|
246
|
+
}).describe("Video details.").optional()
|
|
247
|
+
}).describe("Embed media details.")
|
|
248
|
+
})
|
|
249
|
+
])
|
|
250
|
+
).describe("Post cover media.").optional(),
|
|
251
|
+
hasUnpublishedChanges: z.boolean().describe(
|
|
252
|
+
"Indicates if there is a draft post with changes that have not yet been published."
|
|
253
|
+
).optional(),
|
|
254
|
+
referenceId: z.string().describe(
|
|
255
|
+
"Post reference ID. You can reference the post from other entities, for example, comments."
|
|
256
|
+
).max(24).optional().nullable()
|
|
257
|
+
});
|
|
258
|
+
var GetPostBySlugRequest = z.object({
|
|
259
|
+
slug: z.string().describe("Slug of the post to retrieve.").min(1).max(200),
|
|
260
|
+
options: z.object({
|
|
261
|
+
fieldsets: z.array(
|
|
262
|
+
z.enum([
|
|
263
|
+
"UNKNOWN",
|
|
264
|
+
"URL",
|
|
265
|
+
"CONTENT_TEXT",
|
|
266
|
+
"METRICS",
|
|
267
|
+
"SEO",
|
|
268
|
+
"CONTACT_ID",
|
|
269
|
+
"RICH_CONTENT",
|
|
270
|
+
"REFERENCE_ID"
|
|
271
|
+
])
|
|
272
|
+
).max(20).optional(),
|
|
273
|
+
language: z.string().describe("Language of the post.").optional().nullable()
|
|
274
|
+
}).optional()
|
|
275
|
+
});
|
|
276
|
+
var GetPostBySlugResponse = z.object({
|
|
277
|
+
post: z.object({
|
|
278
|
+
_id: z.string().describe("Post ID.").regex(
|
|
279
|
+
/^[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}$/,
|
|
280
|
+
"Must be a valid GUID"
|
|
281
|
+
).optional(),
|
|
282
|
+
title: z.string().describe("Post title.").max(200).optional(),
|
|
283
|
+
excerpt: z.string().describe(
|
|
284
|
+
"Post excerpt.\nCan be selected by a site contributor. By default, it is extracted from the content text's first characters.\n\nMax: 500 characters"
|
|
285
|
+
).max(500).optional(),
|
|
286
|
+
contentText: z.string().describe("The post's content in plain text.").max(4e5).optional().nullable(),
|
|
287
|
+
firstPublishedDate: z.date().describe("Date the post was first published.").optional().nullable(),
|
|
288
|
+
lastPublishedDate: z.date().describe("Date the post was last published.").optional().nullable(),
|
|
289
|
+
url: z.string().describe("Post URL.").optional(),
|
|
290
|
+
slug: z.string().describe("Post slug. For example, `'post-slug'`.").max(100).optional(),
|
|
291
|
+
featured: z.boolean().describe("Whether the post is marked as featured.").optional(),
|
|
292
|
+
pinned: z.boolean().describe(
|
|
293
|
+
"Whether the post is pinned. If `true`, the post is placed at the top of the post list."
|
|
294
|
+
).optional(),
|
|
295
|
+
categoryIds: z.array(z.string()).max(10).optional(),
|
|
296
|
+
memberId: z.string().describe("Member ID of the post's owner.").regex(
|
|
297
|
+
/^[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}$/,
|
|
298
|
+
"Must be a valid GUID"
|
|
299
|
+
).optional(),
|
|
300
|
+
hashtags: z.array(z.string()).max(100).optional(),
|
|
301
|
+
commentingEnabled: z.boolean().describe("Whether commenting on the post is enabled.").optional(),
|
|
302
|
+
minutesToRead: z.number().int().describe("Estimated reading time (calculated automatically).").optional(),
|
|
303
|
+
heroImage: z.string().describe(
|
|
304
|
+
"Image placed at the top of the blog page. Only displays on mobile devices."
|
|
305
|
+
).optional(),
|
|
306
|
+
tagIds: z.array(z.string()).max(30).optional(),
|
|
307
|
+
relatedPostIds: z.array(z.string()).max(3).optional(),
|
|
308
|
+
pricingPlanIds: z.array(z.string()).max(100).optional(),
|
|
309
|
+
translationId: z.string().describe(
|
|
310
|
+
"ID of the translations of this post. All translations of a single post share the same `translationId`."
|
|
311
|
+
).regex(
|
|
312
|
+
/^[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}$/,
|
|
313
|
+
"Must be a valid GUID"
|
|
314
|
+
).optional().nullable(),
|
|
315
|
+
language: z.string().describe(
|
|
316
|
+
"Language the 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."
|
|
317
|
+
).optional().nullable(),
|
|
318
|
+
seoData: z.object({
|
|
319
|
+
tags: z.array(
|
|
320
|
+
z.object({
|
|
321
|
+
type: z.string().describe(
|
|
322
|
+
"SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
|
|
323
|
+
).optional(),
|
|
324
|
+
props: z.record(z.string(), z.any()).describe(
|
|
325
|
+
'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"}`.'
|
|
326
|
+
).optional().nullable(),
|
|
327
|
+
meta: z.record(z.string(), z.any()).describe(
|
|
328
|
+
'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
|
|
329
|
+
).optional().nullable(),
|
|
330
|
+
children: z.string().describe(
|
|
331
|
+
"SEO tag inner content. For example, `<title> inner content </title>`."
|
|
332
|
+
).optional(),
|
|
333
|
+
custom: z.boolean().describe(
|
|
334
|
+
"Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
|
|
335
|
+
).optional(),
|
|
336
|
+
disabled: z.boolean().describe(
|
|
337
|
+
"Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
|
|
338
|
+
).optional()
|
|
339
|
+
})
|
|
340
|
+
).optional(),
|
|
341
|
+
settings: z.object({
|
|
342
|
+
preventAutoRedirect: z.boolean().describe(
|
|
343
|
+
"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)."
|
|
344
|
+
).optional(),
|
|
345
|
+
keywords: z.array(
|
|
346
|
+
z.object({
|
|
347
|
+
term: z.string().describe("Keyword value.").optional(),
|
|
348
|
+
isMain: z.boolean().describe(
|
|
349
|
+
"Whether the keyword is the main focus keyword."
|
|
350
|
+
).optional(),
|
|
351
|
+
origin: z.string().describe(
|
|
352
|
+
"The source that added the keyword terms to the SEO settings."
|
|
353
|
+
).max(1e3).optional().nullable()
|
|
354
|
+
})
|
|
355
|
+
).max(5).optional()
|
|
356
|
+
}).describe("SEO general settings.").optional()
|
|
357
|
+
}).describe("SEO data.").optional(),
|
|
358
|
+
contactId: z.string().describe(
|
|
359
|
+
"Contact ID of the post's owner. See the Contacts API for more info."
|
|
360
|
+
).regex(
|
|
361
|
+
/^[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}$/,
|
|
362
|
+
"Must be a valid GUID"
|
|
363
|
+
).optional().nullable(),
|
|
364
|
+
richContent: z.any().describe(
|
|
365
|
+
'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>'
|
|
366
|
+
).optional(),
|
|
367
|
+
preview: z.boolean().describe(
|
|
368
|
+
"Whether the returned content is a preview of premium content. Defaults to `false`.\nA preview displays a limited number of paragraphs of paid content to non-subscribed users."
|
|
369
|
+
).optional(),
|
|
370
|
+
moderationDetails: z.object({
|
|
371
|
+
submittedBy: z.string().describe(
|
|
372
|
+
"Member ID of the person submitting the draft post for review."
|
|
373
|
+
).regex(
|
|
374
|
+
/^[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}$/,
|
|
375
|
+
"Must be a valid GUID"
|
|
376
|
+
).optional(),
|
|
377
|
+
submittedDate: z.date().describe("Date the post was submitted for review.").optional().nullable(),
|
|
378
|
+
status: z.enum(["UNKNOWN", "APPROVED", "REJECTED"]).describe(
|
|
379
|
+
"Status indicating whether the submission was approved or rejected by the moderator."
|
|
380
|
+
).optional(),
|
|
381
|
+
moderatedBy: z.string().describe(
|
|
382
|
+
"Member ID of the person who approved or rejected the post."
|
|
383
|
+
).regex(
|
|
384
|
+
/^[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}$/,
|
|
385
|
+
"Must be a valid GUID"
|
|
386
|
+
).optional().nullable(),
|
|
387
|
+
moderationDate: z.date().describe("Date the post was approved or rejected.").optional().nullable()
|
|
388
|
+
}).describe(
|
|
389
|
+
"Post moderation details. Only relevant to posts submitted by [guest writers](https://support.wix.com/en/article/wix-blog-moderating-blog-posts-from-your-guest-writers).\n\nGuest writers have the ability to write posts but not publish them. These posts can be rejected or approved for publishing by a blog editor or Wix user."
|
|
390
|
+
).optional(),
|
|
391
|
+
media: z.intersection(
|
|
392
|
+
z.object({
|
|
393
|
+
displayed: z.boolean().describe("Whether cover media is displayed.").optional(),
|
|
394
|
+
custom: z.boolean().describe(
|
|
395
|
+
"Whether custom cover media has been specified. If `false`, the first media item in the post's content serves as cover media."
|
|
396
|
+
).optional(),
|
|
397
|
+
altText: z.string().describe("Media alternative text.").min(1).max(1e3).optional().nullable()
|
|
398
|
+
}),
|
|
399
|
+
z.xor([
|
|
400
|
+
z.object({
|
|
401
|
+
wixMedia: z.never().optional(),
|
|
402
|
+
embedMedia: z.never().optional()
|
|
403
|
+
}),
|
|
404
|
+
z.object({
|
|
405
|
+
embedMedia: z.never().optional(),
|
|
406
|
+
wixMedia: z.object({
|
|
407
|
+
image: z.string().describe("Image details.").optional(),
|
|
408
|
+
videoV2: z.string().describe("Video details.").optional()
|
|
409
|
+
}).describe("Wix Media details.")
|
|
410
|
+
}),
|
|
411
|
+
z.object({
|
|
412
|
+
wixMedia: z.never().optional(),
|
|
413
|
+
embedMedia: z.object({
|
|
414
|
+
thumbnail: z.object({
|
|
415
|
+
url: z.string().describe("Thumbnail url.").max(2e3).optional(),
|
|
416
|
+
width: z.number().int().describe("Thumbnail width.").min(0).optional(),
|
|
417
|
+
height: z.number().int().describe("Thumbnail height.").min(0).optional()
|
|
418
|
+
}).describe("Thumbnail details.").optional(),
|
|
419
|
+
video: z.object({
|
|
420
|
+
url: z.string().describe("Video url.").max(2e3).optional(),
|
|
421
|
+
width: z.number().int().describe("Video width.").min(0).optional(),
|
|
422
|
+
height: z.number().int().describe("Video height.").min(0).optional()
|
|
423
|
+
}).describe("Video details.").optional()
|
|
424
|
+
}).describe("Embed media details.")
|
|
425
|
+
})
|
|
426
|
+
])
|
|
427
|
+
).describe("Post cover media.").optional(),
|
|
428
|
+
hasUnpublishedChanges: z.boolean().describe(
|
|
429
|
+
"Indicates if there is a draft post with changes that have not yet been published."
|
|
430
|
+
).optional(),
|
|
431
|
+
referenceId: z.string().describe(
|
|
432
|
+
"Post reference ID. You can reference the post from other entities, for example, comments."
|
|
433
|
+
).max(24).optional().nullable()
|
|
434
|
+
}).describe("Retrieved post info.").optional()
|
|
435
|
+
});
|
|
436
|
+
var ListPostsRequest = z.object({
|
|
437
|
+
options: z.object({
|
|
438
|
+
featured: z.boolean().describe("Whether to return only featured posts.\n\nDefault: `false`").optional(),
|
|
439
|
+
hashtags: z.array(z.string()).max(100).optional(),
|
|
440
|
+
categoryIds: z.array(z.string()).max(50).optional(),
|
|
441
|
+
tagIds: z.array(z.string()).max(50).optional(),
|
|
442
|
+
sort: z.enum([
|
|
443
|
+
"FEED",
|
|
444
|
+
"PUBLISHED_DATE_ASC",
|
|
445
|
+
"PUBLISHED_DATE_DESC",
|
|
446
|
+
"VIEW_COUNT",
|
|
447
|
+
"LIKE_COUNT",
|
|
448
|
+
"TITLE_ASC",
|
|
449
|
+
"TITLE_DESC"
|
|
450
|
+
]).optional(),
|
|
451
|
+
paging: z.object({
|
|
452
|
+
offset: z.number().int().describe(
|
|
453
|
+
"Number of items to skip in the current sort order.\n\n\nDefault: `0`"
|
|
454
|
+
).min(0).optional(),
|
|
455
|
+
limit: z.number().int().describe("Number of items to return.\n\n\nDefault:`50`").min(1).max(100).optional(),
|
|
456
|
+
cursor: z.string().describe(
|
|
457
|
+
"Pointer to the next or previous page in the list of results."
|
|
458
|
+
).max(2e3).optional().nullable()
|
|
459
|
+
}).describe("Pagination options.").optional(),
|
|
460
|
+
language: z.string().describe(
|
|
461
|
+
"Language filter.\n\n2-or-4-letter language code in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\nPass a language to only receive posts that are in that language.\nIf omitted, posts in all languages are returned."
|
|
462
|
+
).optional().nullable(),
|
|
463
|
+
memberId: z.string().describe("Post owner's member ID.").regex(
|
|
464
|
+
/^[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}$/,
|
|
465
|
+
"Must be a valid GUID"
|
|
466
|
+
).optional().nullable(),
|
|
467
|
+
fieldsets: z.array(
|
|
468
|
+
z.enum([
|
|
469
|
+
"UNKNOWN",
|
|
470
|
+
"URL",
|
|
471
|
+
"CONTENT_TEXT",
|
|
472
|
+
"METRICS",
|
|
473
|
+
"SEO",
|
|
474
|
+
"CONTACT_ID",
|
|
475
|
+
"RICH_CONTENT",
|
|
476
|
+
"REFERENCE_ID"
|
|
477
|
+
])
|
|
478
|
+
).max(20).optional()
|
|
479
|
+
}).optional()
|
|
480
|
+
});
|
|
481
|
+
var ListPostsResponse = z.object({
|
|
482
|
+
posts: z.array(
|
|
483
|
+
z.object({
|
|
484
|
+
_id: z.string().describe("Post ID.").regex(
|
|
485
|
+
/^[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}$/,
|
|
486
|
+
"Must be a valid GUID"
|
|
487
|
+
).optional(),
|
|
488
|
+
title: z.string().describe("Post title.").max(200).optional(),
|
|
489
|
+
excerpt: z.string().describe(
|
|
490
|
+
"Post excerpt.\nCan be selected by a site contributor. By default, it is extracted from the content text's first characters.\n\nMax: 500 characters"
|
|
491
|
+
).max(500).optional(),
|
|
492
|
+
contentText: z.string().describe("The post's content in plain text.").max(4e5).optional().nullable(),
|
|
493
|
+
firstPublishedDate: z.date().describe("Date the post was first published.").optional().nullable(),
|
|
494
|
+
lastPublishedDate: z.date().describe("Date the post was last published.").optional().nullable(),
|
|
495
|
+
url: z.string().describe("Post URL.").optional(),
|
|
496
|
+
slug: z.string().describe("Post slug. For example, `'post-slug'`.").max(100).optional(),
|
|
497
|
+
featured: z.boolean().describe("Whether the post is marked as featured.").optional(),
|
|
498
|
+
pinned: z.boolean().describe(
|
|
499
|
+
"Whether the post is pinned. If `true`, the post is placed at the top of the post list."
|
|
500
|
+
).optional(),
|
|
501
|
+
categoryIds: z.array(z.string()).max(10).optional(),
|
|
502
|
+
memberId: z.string().describe("Member ID of the post's owner.").regex(
|
|
503
|
+
/^[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}$/,
|
|
504
|
+
"Must be a valid GUID"
|
|
505
|
+
).optional(),
|
|
506
|
+
hashtags: z.array(z.string()).max(100).optional(),
|
|
507
|
+
commentingEnabled: z.boolean().describe("Whether commenting on the post is enabled.").optional(),
|
|
508
|
+
minutesToRead: z.number().int().describe("Estimated reading time (calculated automatically).").optional(),
|
|
509
|
+
heroImage: z.string().describe(
|
|
510
|
+
"Image placed at the top of the blog page. Only displays on mobile devices."
|
|
511
|
+
).optional(),
|
|
512
|
+
tagIds: z.array(z.string()).max(30).optional(),
|
|
513
|
+
relatedPostIds: z.array(z.string()).max(3).optional(),
|
|
514
|
+
pricingPlanIds: z.array(z.string()).max(100).optional(),
|
|
515
|
+
translationId: z.string().describe(
|
|
516
|
+
"ID of the translations of this post. All translations of a single post share the same `translationId`."
|
|
517
|
+
).regex(
|
|
518
|
+
/^[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}$/,
|
|
519
|
+
"Must be a valid GUID"
|
|
520
|
+
).optional().nullable(),
|
|
521
|
+
language: z.string().describe(
|
|
522
|
+
"Language the 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."
|
|
523
|
+
).optional().nullable(),
|
|
524
|
+
seoData: z.object({
|
|
525
|
+
tags: z.array(
|
|
526
|
+
z.object({
|
|
527
|
+
type: z.string().describe(
|
|
528
|
+
"SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
|
|
529
|
+
).optional(),
|
|
530
|
+
props: z.record(z.string(), z.any()).describe(
|
|
531
|
+
'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"}`.'
|
|
532
|
+
).optional().nullable(),
|
|
533
|
+
meta: z.record(z.string(), z.any()).describe(
|
|
534
|
+
'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
|
|
535
|
+
).optional().nullable(),
|
|
536
|
+
children: z.string().describe(
|
|
537
|
+
"SEO tag inner content. For example, `<title> inner content </title>`."
|
|
538
|
+
).optional(),
|
|
539
|
+
custom: z.boolean().describe(
|
|
540
|
+
"Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
|
|
541
|
+
).optional(),
|
|
542
|
+
disabled: z.boolean().describe(
|
|
543
|
+
"Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
|
|
544
|
+
).optional()
|
|
545
|
+
})
|
|
546
|
+
).optional(),
|
|
547
|
+
settings: z.object({
|
|
548
|
+
preventAutoRedirect: z.boolean().describe(
|
|
549
|
+
"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)."
|
|
550
|
+
).optional(),
|
|
551
|
+
keywords: z.array(
|
|
552
|
+
z.object({
|
|
553
|
+
term: z.string().describe("Keyword value.").optional(),
|
|
554
|
+
isMain: z.boolean().describe(
|
|
555
|
+
"Whether the keyword is the main focus keyword."
|
|
556
|
+
).optional(),
|
|
557
|
+
origin: z.string().describe(
|
|
558
|
+
"The source that added the keyword terms to the SEO settings."
|
|
559
|
+
).max(1e3).optional().nullable()
|
|
560
|
+
})
|
|
561
|
+
).max(5).optional()
|
|
562
|
+
}).describe("SEO general settings.").optional()
|
|
563
|
+
}).describe("SEO data.").optional(),
|
|
564
|
+
contactId: z.string().describe(
|
|
565
|
+
"Contact ID of the post's owner. See the Contacts API for more info."
|
|
566
|
+
).regex(
|
|
567
|
+
/^[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}$/,
|
|
568
|
+
"Must be a valid GUID"
|
|
569
|
+
).optional().nullable(),
|
|
570
|
+
richContent: z.any().describe(
|
|
571
|
+
'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>'
|
|
572
|
+
).optional(),
|
|
573
|
+
preview: z.boolean().describe(
|
|
574
|
+
"Whether the returned content is a preview of premium content. Defaults to `false`.\nA preview displays a limited number of paragraphs of paid content to non-subscribed users."
|
|
575
|
+
).optional(),
|
|
576
|
+
moderationDetails: z.object({
|
|
577
|
+
submittedBy: z.string().describe(
|
|
578
|
+
"Member ID of the person submitting the draft post for review."
|
|
579
|
+
).regex(
|
|
580
|
+
/^[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}$/,
|
|
581
|
+
"Must be a valid GUID"
|
|
582
|
+
).optional(),
|
|
583
|
+
submittedDate: z.date().describe("Date the post was submitted for review.").optional().nullable(),
|
|
584
|
+
status: z.enum(["UNKNOWN", "APPROVED", "REJECTED"]).describe(
|
|
585
|
+
"Status indicating whether the submission was approved or rejected by the moderator."
|
|
586
|
+
).optional(),
|
|
587
|
+
moderatedBy: z.string().describe(
|
|
588
|
+
"Member ID of the person who approved or rejected the post."
|
|
589
|
+
).regex(
|
|
590
|
+
/^[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}$/,
|
|
591
|
+
"Must be a valid GUID"
|
|
592
|
+
).optional().nullable(),
|
|
593
|
+
moderationDate: z.date().describe("Date the post was approved or rejected.").optional().nullable()
|
|
594
|
+
}).describe(
|
|
595
|
+
"Post moderation details. Only relevant to posts submitted by [guest writers](https://support.wix.com/en/article/wix-blog-moderating-blog-posts-from-your-guest-writers).\n\nGuest writers have the ability to write posts but not publish them. These posts can be rejected or approved for publishing by a blog editor or Wix user."
|
|
596
|
+
).optional(),
|
|
597
|
+
media: z.intersection(
|
|
598
|
+
z.object({
|
|
599
|
+
displayed: z.boolean().describe("Whether cover media is displayed.").optional(),
|
|
600
|
+
custom: z.boolean().describe(
|
|
601
|
+
"Whether custom cover media has been specified. If `false`, the first media item in the post's content serves as cover media."
|
|
602
|
+
).optional(),
|
|
603
|
+
altText: z.string().describe("Media alternative text.").min(1).max(1e3).optional().nullable()
|
|
604
|
+
}),
|
|
605
|
+
z.xor([
|
|
606
|
+
z.object({
|
|
607
|
+
wixMedia: z.never().optional(),
|
|
608
|
+
embedMedia: z.never().optional()
|
|
609
|
+
}),
|
|
610
|
+
z.object({
|
|
611
|
+
embedMedia: z.never().optional(),
|
|
612
|
+
wixMedia: z.object({
|
|
613
|
+
image: z.string().describe("Image details.").optional(),
|
|
614
|
+
videoV2: z.string().describe("Video details.").optional()
|
|
615
|
+
}).describe("Wix Media details.")
|
|
616
|
+
}),
|
|
617
|
+
z.object({
|
|
618
|
+
wixMedia: z.never().optional(),
|
|
619
|
+
embedMedia: z.object({
|
|
620
|
+
thumbnail: z.object({
|
|
621
|
+
url: z.string().describe("Thumbnail url.").max(2e3).optional(),
|
|
622
|
+
width: z.number().int().describe("Thumbnail width.").min(0).optional(),
|
|
623
|
+
height: z.number().int().describe("Thumbnail height.").min(0).optional()
|
|
624
|
+
}).describe("Thumbnail details.").optional(),
|
|
625
|
+
video: z.object({
|
|
626
|
+
url: z.string().describe("Video url.").max(2e3).optional(),
|
|
627
|
+
width: z.number().int().describe("Video width.").min(0).optional(),
|
|
628
|
+
height: z.number().int().describe("Video height.").min(0).optional()
|
|
629
|
+
}).describe("Video details.").optional()
|
|
630
|
+
}).describe("Embed media details.")
|
|
631
|
+
})
|
|
632
|
+
])
|
|
633
|
+
).describe("Post cover media.").optional(),
|
|
634
|
+
hasUnpublishedChanges: z.boolean().describe(
|
|
635
|
+
"Indicates if there is a draft post with changes that have not yet been published."
|
|
636
|
+
).optional(),
|
|
637
|
+
referenceId: z.string().describe(
|
|
638
|
+
"Post reference ID. You can reference the post from other entities, for example, comments."
|
|
639
|
+
).max(24).optional().nullable()
|
|
640
|
+
})
|
|
641
|
+
).optional(),
|
|
642
|
+
metaData: z.object({
|
|
643
|
+
count: z.number().int().describe("Number of items returned in this response.").optional(),
|
|
644
|
+
offset: z.number().int().describe("Requested offset.").optional(),
|
|
645
|
+
total: z.number().int().describe("Total number of items that match the query.").optional(),
|
|
646
|
+
cursor: z.string().describe(
|
|
647
|
+
"Pointer to the next or previous page in the list of results."
|
|
648
|
+
).max(2e3).optional().nullable()
|
|
649
|
+
}).describe("Details on the paged set of results returned.").optional()
|
|
650
|
+
});
|
|
651
|
+
var QueryPostsRequest = z.object({
|
|
652
|
+
query: z.object({
|
|
653
|
+
filter: z.object({
|
|
654
|
+
title: z.object({
|
|
655
|
+
$eq: z.string(),
|
|
656
|
+
$exists: z.boolean(),
|
|
657
|
+
$gt: z.string(),
|
|
658
|
+
$gte: z.string(),
|
|
659
|
+
$hasSome: z.array(z.string()),
|
|
660
|
+
$in: z.array(z.string()),
|
|
661
|
+
$lt: z.string(),
|
|
662
|
+
$lte: z.string(),
|
|
663
|
+
$ne: z.string(),
|
|
664
|
+
$startsWith: z.string()
|
|
665
|
+
}).partial().strict().optional(),
|
|
666
|
+
firstPublishedDate: z.object({
|
|
667
|
+
$eq: z.string(),
|
|
668
|
+
$gt: z.string(),
|
|
669
|
+
$gte: z.string(),
|
|
670
|
+
$in: z.array(z.string()),
|
|
671
|
+
$lt: z.string(),
|
|
672
|
+
$lte: z.string(),
|
|
673
|
+
$ne: z.string()
|
|
674
|
+
}).partial().strict().optional(),
|
|
675
|
+
lastPublishedDate: z.object({
|
|
676
|
+
$eq: z.string(),
|
|
677
|
+
$gt: z.string(),
|
|
678
|
+
$gte: z.string(),
|
|
679
|
+
$in: z.array(z.string()),
|
|
680
|
+
$lt: z.string(),
|
|
681
|
+
$lte: z.string(),
|
|
682
|
+
$ne: z.string()
|
|
683
|
+
}).partial().strict().optional(),
|
|
684
|
+
slug: z.object({
|
|
685
|
+
$eq: z.string(),
|
|
686
|
+
$gt: z.string(),
|
|
687
|
+
$gte: z.string(),
|
|
688
|
+
$hasAll: z.array(z.string()),
|
|
689
|
+
$hasSome: z.array(z.string()),
|
|
690
|
+
$lt: z.string(),
|
|
691
|
+
$lte: z.string(),
|
|
692
|
+
$ne: z.string()
|
|
693
|
+
}).partial().strict().optional(),
|
|
694
|
+
featured: z.object({ $eq: z.boolean(), $ne: z.boolean() }).partial().strict().optional(),
|
|
695
|
+
pinned: z.object({ $eq: z.boolean(), $ne: z.boolean() }).partial().strict().optional(),
|
|
696
|
+
categoryIds: z.object({
|
|
697
|
+
$hasAll: z.array(z.string()),
|
|
698
|
+
$hasSome: z.array(z.string())
|
|
699
|
+
}).partial().strict().optional(),
|
|
700
|
+
memberId: z.object({
|
|
701
|
+
$eq: z.string(),
|
|
702
|
+
$hasSome: z.array(z.string()),
|
|
703
|
+
$ne: z.string()
|
|
704
|
+
}).partial().strict().optional(),
|
|
705
|
+
hashtags: z.object({
|
|
706
|
+
$hasAll: z.array(z.string()),
|
|
707
|
+
$hasSome: z.array(z.string())
|
|
708
|
+
}).partial().strict().optional(),
|
|
709
|
+
commentingEnabled: z.object({ $eq: z.boolean(), $ne: z.boolean() }).partial().strict().optional(),
|
|
710
|
+
minutesToRead: z.object({
|
|
711
|
+
$eq: z.number(),
|
|
712
|
+
$gt: z.number(),
|
|
713
|
+
$gte: z.number(),
|
|
714
|
+
$in: z.array(z.number()),
|
|
715
|
+
$lt: z.number(),
|
|
716
|
+
$lte: z.number(),
|
|
717
|
+
$ne: z.number()
|
|
718
|
+
}).partial().strict().optional(),
|
|
719
|
+
tagIds: z.object({
|
|
720
|
+
$hasAll: z.array(z.string()),
|
|
721
|
+
$hasSome: z.array(z.string())
|
|
722
|
+
}).partial().strict().optional(),
|
|
723
|
+
pricingPlanIds: z.object({
|
|
724
|
+
$hasAll: z.array(z.string()),
|
|
725
|
+
$hasSome: z.array(z.string())
|
|
726
|
+
}).partial().strict().optional(),
|
|
727
|
+
language: z.object({
|
|
728
|
+
$eq: z.string(),
|
|
729
|
+
$exists: z.boolean(),
|
|
730
|
+
$hasSome: z.array(z.string()),
|
|
731
|
+
$in: z.array(z.string()),
|
|
732
|
+
$ne: z.string()
|
|
733
|
+
}).partial().strict().optional(),
|
|
734
|
+
translationId: z.object({
|
|
735
|
+
$eq: z.string(),
|
|
736
|
+
$exists: z.boolean(),
|
|
737
|
+
$in: z.array(z.string()),
|
|
738
|
+
$ne: z.string()
|
|
739
|
+
}).partial().strict().optional(),
|
|
740
|
+
"media.displayed": z.object({ $eq: z.boolean(), $ne: z.boolean() }).partial().strict().optional(),
|
|
741
|
+
$and: z.array(z.any()).optional(),
|
|
742
|
+
$or: z.array(z.any()).optional(),
|
|
743
|
+
$not: z.any().optional()
|
|
744
|
+
}).strict().optional(),
|
|
745
|
+
sort: z.array(
|
|
746
|
+
z.object({
|
|
747
|
+
fieldName: z.enum([
|
|
748
|
+
"title",
|
|
749
|
+
"firstPublishedDate",
|
|
750
|
+
"lastPublishedDate",
|
|
751
|
+
"slug",
|
|
752
|
+
"featured",
|
|
753
|
+
"pinned",
|
|
754
|
+
"commentingEnabled"
|
|
755
|
+
]).optional(),
|
|
756
|
+
order: z.enum(["ASC", "DESC"]).optional()
|
|
757
|
+
})
|
|
758
|
+
).optional()
|
|
759
|
+
}).catchall(z.any()).describe("Query options."),
|
|
760
|
+
options: z.object({
|
|
761
|
+
fieldsets: z.array(
|
|
762
|
+
z.enum([
|
|
763
|
+
"UNKNOWN",
|
|
764
|
+
"URL",
|
|
765
|
+
"CONTENT_TEXT",
|
|
766
|
+
"METRICS",
|
|
767
|
+
"SEO",
|
|
768
|
+
"CONTACT_ID",
|
|
769
|
+
"RICH_CONTENT",
|
|
770
|
+
"REFERENCE_ID"
|
|
771
|
+
])
|
|
772
|
+
).max(20).optional()
|
|
773
|
+
}).optional()
|
|
774
|
+
});
|
|
775
|
+
var QueryPostsResponse = z.object({
|
|
776
|
+
posts: z.array(
|
|
777
|
+
z.object({
|
|
778
|
+
_id: z.string().describe("Post ID.").regex(
|
|
779
|
+
/^[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}$/,
|
|
780
|
+
"Must be a valid GUID"
|
|
781
|
+
).optional(),
|
|
782
|
+
title: z.string().describe("Post title.").max(200).optional(),
|
|
783
|
+
excerpt: z.string().describe(
|
|
784
|
+
"Post excerpt.\nCan be selected by a site contributor. By default, it is extracted from the content text's first characters.\n\nMax: 500 characters"
|
|
785
|
+
).max(500).optional(),
|
|
786
|
+
contentText: z.string().describe("The post's content in plain text.").max(4e5).optional().nullable(),
|
|
787
|
+
firstPublishedDate: z.date().describe("Date the post was first published.").optional().nullable(),
|
|
788
|
+
lastPublishedDate: z.date().describe("Date the post was last published.").optional().nullable(),
|
|
789
|
+
url: z.string().describe("Post URL.").optional(),
|
|
790
|
+
slug: z.string().describe("Post slug. For example, `'post-slug'`.").max(100).optional(),
|
|
791
|
+
featured: z.boolean().describe("Whether the post is marked as featured.").optional(),
|
|
792
|
+
pinned: z.boolean().describe(
|
|
793
|
+
"Whether the post is pinned. If `true`, the post is placed at the top of the post list."
|
|
794
|
+
).optional(),
|
|
795
|
+
categoryIds: z.array(z.string()).max(10).optional(),
|
|
796
|
+
memberId: z.string().describe("Member ID of the post's owner.").regex(
|
|
797
|
+
/^[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}$/,
|
|
798
|
+
"Must be a valid GUID"
|
|
799
|
+
).optional(),
|
|
800
|
+
hashtags: z.array(z.string()).max(100).optional(),
|
|
801
|
+
commentingEnabled: z.boolean().describe("Whether commenting on the post is enabled.").optional(),
|
|
802
|
+
minutesToRead: z.number().int().describe("Estimated reading time (calculated automatically).").optional(),
|
|
803
|
+
heroImage: z.string().describe(
|
|
804
|
+
"Image placed at the top of the blog page. Only displays on mobile devices."
|
|
805
|
+
).optional(),
|
|
806
|
+
tagIds: z.array(z.string()).max(30).optional(),
|
|
807
|
+
relatedPostIds: z.array(z.string()).max(3).optional(),
|
|
808
|
+
pricingPlanIds: z.array(z.string()).max(100).optional(),
|
|
809
|
+
translationId: z.string().describe(
|
|
810
|
+
"ID of the translations of this post. All translations of a single post share the same `translationId`."
|
|
811
|
+
).regex(
|
|
812
|
+
/^[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}$/,
|
|
813
|
+
"Must be a valid GUID"
|
|
814
|
+
).optional().nullable(),
|
|
815
|
+
language: z.string().describe(
|
|
816
|
+
"Language the 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."
|
|
817
|
+
).optional().nullable(),
|
|
818
|
+
seoData: z.object({
|
|
819
|
+
tags: z.array(
|
|
820
|
+
z.object({
|
|
821
|
+
type: z.string().describe(
|
|
822
|
+
"SEO tag type.\n\n\nSupported values: `title`, `meta`, `script`, `link`."
|
|
823
|
+
).optional(),
|
|
824
|
+
props: z.record(z.string(), z.any()).describe(
|
|
825
|
+
'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"}`.'
|
|
826
|
+
).optional().nullable(),
|
|
827
|
+
meta: z.record(z.string(), z.any()).describe(
|
|
828
|
+
'SEO tag metadata. For example, `{"height": 300, "width": 240}`.'
|
|
829
|
+
).optional().nullable(),
|
|
830
|
+
children: z.string().describe(
|
|
831
|
+
"SEO tag inner content. For example, `<title> inner content </title>`."
|
|
832
|
+
).optional(),
|
|
833
|
+
custom: z.boolean().describe(
|
|
834
|
+
"Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages)."
|
|
835
|
+
).optional(),
|
|
836
|
+
disabled: z.boolean().describe(
|
|
837
|
+
"Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines."
|
|
838
|
+
).optional()
|
|
839
|
+
})
|
|
840
|
+
).optional(),
|
|
841
|
+
settings: z.object({
|
|
842
|
+
preventAutoRedirect: z.boolean().describe(
|
|
843
|
+
"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)."
|
|
844
|
+
).optional(),
|
|
845
|
+
keywords: z.array(
|
|
846
|
+
z.object({
|
|
847
|
+
term: z.string().describe("Keyword value.").optional(),
|
|
848
|
+
isMain: z.boolean().describe(
|
|
849
|
+
"Whether the keyword is the main focus keyword."
|
|
850
|
+
).optional(),
|
|
851
|
+
origin: z.string().describe(
|
|
852
|
+
"The source that added the keyword terms to the SEO settings."
|
|
853
|
+
).max(1e3).optional().nullable()
|
|
854
|
+
})
|
|
855
|
+
).max(5).optional()
|
|
856
|
+
}).describe("SEO general settings.").optional()
|
|
857
|
+
}).describe("SEO data.").optional(),
|
|
858
|
+
contactId: z.string().describe(
|
|
859
|
+
"Contact ID of the post's owner. See the Contacts API for more info."
|
|
860
|
+
).regex(
|
|
861
|
+
/^[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}$/,
|
|
862
|
+
"Must be a valid GUID"
|
|
863
|
+
).optional().nullable(),
|
|
864
|
+
richContent: z.any().describe(
|
|
865
|
+
'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>'
|
|
866
|
+
).optional(),
|
|
867
|
+
preview: z.boolean().describe(
|
|
868
|
+
"Whether the returned content is a preview of premium content. Defaults to `false`.\nA preview displays a limited number of paragraphs of paid content to non-subscribed users."
|
|
869
|
+
).optional(),
|
|
870
|
+
moderationDetails: z.object({
|
|
871
|
+
submittedBy: z.string().describe(
|
|
872
|
+
"Member ID of the person submitting the draft post for review."
|
|
873
|
+
).regex(
|
|
874
|
+
/^[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}$/,
|
|
875
|
+
"Must be a valid GUID"
|
|
876
|
+
).optional(),
|
|
877
|
+
submittedDate: z.date().describe("Date the post was submitted for review.").optional().nullable(),
|
|
878
|
+
status: z.enum(["UNKNOWN", "APPROVED", "REJECTED"]).describe(
|
|
879
|
+
"Status indicating whether the submission was approved or rejected by the moderator."
|
|
880
|
+
).optional(),
|
|
881
|
+
moderatedBy: z.string().describe(
|
|
882
|
+
"Member ID of the person who approved or rejected the post."
|
|
883
|
+
).regex(
|
|
884
|
+
/^[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}$/,
|
|
885
|
+
"Must be a valid GUID"
|
|
886
|
+
).optional().nullable(),
|
|
887
|
+
moderationDate: z.date().describe("Date the post was approved or rejected.").optional().nullable()
|
|
888
|
+
}).describe(
|
|
889
|
+
"Post moderation details. Only relevant to posts submitted by [guest writers](https://support.wix.com/en/article/wix-blog-moderating-blog-posts-from-your-guest-writers).\n\nGuest writers have the ability to write posts but not publish them. These posts can be rejected or approved for publishing by a blog editor or Wix user."
|
|
890
|
+
).optional(),
|
|
891
|
+
media: z.intersection(
|
|
892
|
+
z.object({
|
|
893
|
+
displayed: z.boolean().describe("Whether cover media is displayed.").optional(),
|
|
894
|
+
custom: z.boolean().describe(
|
|
895
|
+
"Whether custom cover media has been specified. If `false`, the first media item in the post's content serves as cover media."
|
|
896
|
+
).optional(),
|
|
897
|
+
altText: z.string().describe("Media alternative text.").min(1).max(1e3).optional().nullable()
|
|
898
|
+
}),
|
|
899
|
+
z.xor([
|
|
900
|
+
z.object({
|
|
901
|
+
wixMedia: z.never().optional(),
|
|
902
|
+
embedMedia: z.never().optional()
|
|
903
|
+
}),
|
|
904
|
+
z.object({
|
|
905
|
+
embedMedia: z.never().optional(),
|
|
906
|
+
wixMedia: z.object({
|
|
907
|
+
image: z.string().describe("Image details.").optional(),
|
|
908
|
+
videoV2: z.string().describe("Video details.").optional()
|
|
909
|
+
}).describe("Wix Media details.")
|
|
910
|
+
}),
|
|
911
|
+
z.object({
|
|
912
|
+
wixMedia: z.never().optional(),
|
|
913
|
+
embedMedia: z.object({
|
|
914
|
+
thumbnail: z.object({
|
|
915
|
+
url: z.string().describe("Thumbnail url.").max(2e3).optional(),
|
|
916
|
+
width: z.number().int().describe("Thumbnail width.").min(0).optional(),
|
|
917
|
+
height: z.number().int().describe("Thumbnail height.").min(0).optional()
|
|
918
|
+
}).describe("Thumbnail details.").optional(),
|
|
919
|
+
video: z.object({
|
|
920
|
+
url: z.string().describe("Video url.").max(2e3).optional(),
|
|
921
|
+
width: z.number().int().describe("Video width.").min(0).optional(),
|
|
922
|
+
height: z.number().int().describe("Video height.").min(0).optional()
|
|
923
|
+
}).describe("Video details.").optional()
|
|
924
|
+
}).describe("Embed media details.")
|
|
925
|
+
})
|
|
926
|
+
])
|
|
927
|
+
).describe("Post cover media.").optional(),
|
|
928
|
+
hasUnpublishedChanges: z.boolean().describe(
|
|
929
|
+
"Indicates if there is a draft post with changes that have not yet been published."
|
|
930
|
+
).optional(),
|
|
931
|
+
referenceId: z.string().describe(
|
|
932
|
+
"Post reference ID. You can reference the post from other entities, for example, comments."
|
|
933
|
+
).max(24).optional().nullable()
|
|
934
|
+
})
|
|
935
|
+
).optional(),
|
|
936
|
+
pagingMetadata: z.object({
|
|
937
|
+
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
938
|
+
offset: z.number().int().describe("Offset that was requested.").optional().nullable(),
|
|
939
|
+
total: z.number().int().describe(
|
|
940
|
+
"Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set."
|
|
941
|
+
).optional().nullable(),
|
|
942
|
+
tooManyToCount: z.boolean().describe(
|
|
943
|
+
"Flag that indicates the server failed to calculate the `total` field."
|
|
944
|
+
).optional().nullable(),
|
|
945
|
+
cursors: z.object({
|
|
946
|
+
next: z.string().describe("Cursor pointing to next page in the list of results.").max(2e3).optional().nullable(),
|
|
947
|
+
prev: z.string().describe(
|
|
948
|
+
"Cursor pointing to previous page in the list of results."
|
|
949
|
+
).max(2e3).optional().nullable()
|
|
950
|
+
}).describe(
|
|
951
|
+
"Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used."
|
|
952
|
+
).optional()
|
|
953
|
+
}).describe("Details on the paged set of results returned.").optional()
|
|
954
|
+
});
|
|
955
|
+
var GetPostMetricsRequest = z.object({
|
|
956
|
+
postId: z.string().describe("Post ID to retrieve metrics for.").min(1).max(38)
|
|
957
|
+
});
|
|
958
|
+
var GetPostMetricsResponse = z.object({
|
|
959
|
+
metrics: z.object({
|
|
960
|
+
comments: z.number().int().describe("Total number of post comments.").optional(),
|
|
961
|
+
likes: z.number().int().describe("Total number of post likes.").optional(),
|
|
962
|
+
views: z.number().int().describe("Total number of post views.").optional()
|
|
963
|
+
}).describe("Retrieved post metrics.").optional()
|
|
964
|
+
});
|
|
965
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
966
|
+
0 && (module.exports = {
|
|
967
|
+
GetPostBySlugRequest,
|
|
968
|
+
GetPostBySlugResponse,
|
|
969
|
+
GetPostMetricsRequest,
|
|
970
|
+
GetPostMetricsResponse,
|
|
971
|
+
GetPostRequest,
|
|
972
|
+
GetPostResponse,
|
|
973
|
+
GetTotalPostsRequest,
|
|
974
|
+
GetTotalPostsResponse,
|
|
975
|
+
ListPostsRequest,
|
|
976
|
+
ListPostsResponse,
|
|
977
|
+
QueryPostCountStatsRequest,
|
|
978
|
+
QueryPostCountStatsResponse,
|
|
979
|
+
QueryPostsRequest,
|
|
980
|
+
QueryPostsResponse
|
|
981
|
+
});
|
|
982
|
+
//# sourceMappingURL=schemas.js.map
|