@wix/blog 1.0.113

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 (79) hide show
  1. package/build/cjs/index.d.ts +3 -0
  2. package/build/cjs/index.js +26 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/src/blog-v3-category.http.d.ts +50 -0
  5. package/build/cjs/src/blog-v3-category.http.js +421 -0
  6. package/build/cjs/src/blog-v3-category.http.js.map +1 -0
  7. package/build/cjs/src/blog-v3-category.public.d.ts +11 -0
  8. package/build/cjs/src/blog-v3-category.public.js +50 -0
  9. package/build/cjs/src/blog-v3-category.public.js.map +1 -0
  10. package/build/cjs/src/blog-v3-category.types.d.ts +391 -0
  11. package/build/cjs/src/blog-v3-category.types.js +22 -0
  12. package/build/cjs/src/blog-v3-category.types.js.map +1 -0
  13. package/build/cjs/src/blog-v3-category.universal.d.ts +582 -0
  14. package/build/cjs/src/blog-v3-category.universal.js +460 -0
  15. package/build/cjs/src/blog-v3-category.universal.js.map +1 -0
  16. package/build/cjs/src/blog-v3-post.http.d.ts +81 -0
  17. package/build/cjs/src/blog-v3-post.http.js +844 -0
  18. package/build/cjs/src/blog-v3-post.http.js.map +1 -0
  19. package/build/cjs/src/blog-v3-post.public.d.ts +11 -0
  20. package/build/cjs/src/blog-v3-post.public.js +86 -0
  21. package/build/cjs/src/blog-v3-post.public.js.map +1 -0
  22. package/build/cjs/src/blog-v3-post.types.d.ts +2227 -0
  23. package/build/cjs/src/blog-v3-post.types.js +464 -0
  24. package/build/cjs/src/blog-v3-post.types.js.map +1 -0
  25. package/build/cjs/src/blog-v3-post.universal.d.ts +2488 -0
  26. package/build/cjs/src/blog-v3-post.universal.js +935 -0
  27. package/build/cjs/src/blog-v3-post.universal.js.map +1 -0
  28. package/build/cjs/src/blog-v3-tag.http.d.ts +45 -0
  29. package/build/cjs/src/blog-v3-tag.http.js +385 -0
  30. package/build/cjs/src/blog-v3-tag.http.js.map +1 -0
  31. package/build/cjs/src/blog-v3-tag.public.d.ts +10 -0
  32. package/build/cjs/src/blog-v3-tag.public.js +44 -0
  33. package/build/cjs/src/blog-v3-tag.public.js.map +1 -0
  34. package/build/cjs/src/blog-v3-tag.types.d.ts +345 -0
  35. package/build/cjs/src/blog-v3-tag.types.js +15 -0
  36. package/build/cjs/src/blog-v3-tag.types.js.map +1 -0
  37. package/build/cjs/src/blog-v3-tag.universal.d.ts +512 -0
  38. package/build/cjs/src/blog-v3-tag.universal.js +390 -0
  39. package/build/cjs/src/blog-v3-tag.universal.js.map +1 -0
  40. package/build/es/index.d.ts +3 -0
  41. package/build/es/index.js +4 -0
  42. package/build/es/index.js.map +1 -0
  43. package/build/es/src/blog-v3-category.http.d.ts +50 -0
  44. package/build/es/src/blog-v3-category.http.js +411 -0
  45. package/build/es/src/blog-v3-category.http.js.map +1 -0
  46. package/build/es/src/blog-v3-category.public.d.ts +11 -0
  47. package/build/es/src/blog-v3-category.public.js +38 -0
  48. package/build/es/src/blog-v3-category.public.js.map +1 -0
  49. package/build/es/src/blog-v3-category.types.d.ts +391 -0
  50. package/build/es/src/blog-v3-category.types.js +19 -0
  51. package/build/es/src/blog-v3-category.types.js.map +1 -0
  52. package/build/es/src/blog-v3-category.universal.d.ts +582 -0
  53. package/build/es/src/blog-v3-category.universal.js +431 -0
  54. package/build/es/src/blog-v3-category.universal.js.map +1 -0
  55. package/build/es/src/blog-v3-post.http.d.ts +81 -0
  56. package/build/es/src/blog-v3-post.http.js +834 -0
  57. package/build/es/src/blog-v3-post.http.js.map +1 -0
  58. package/build/es/src/blog-v3-post.public.d.ts +11 -0
  59. package/build/es/src/blog-v3-post.public.js +38 -0
  60. package/build/es/src/blog-v3-post.public.js.map +1 -0
  61. package/build/es/src/blog-v3-post.types.d.ts +2227 -0
  62. package/build/es/src/blog-v3-post.types.js +461 -0
  63. package/build/es/src/blog-v3-post.types.js.map +1 -0
  64. package/build/es/src/blog-v3-post.universal.d.ts +2488 -0
  65. package/build/es/src/blog-v3-post.universal.js +906 -0
  66. package/build/es/src/blog-v3-post.universal.js.map +1 -0
  67. package/build/es/src/blog-v3-tag.http.d.ts +45 -0
  68. package/build/es/src/blog-v3-tag.http.js +376 -0
  69. package/build/es/src/blog-v3-tag.http.js.map +1 -0
  70. package/build/es/src/blog-v3-tag.public.d.ts +10 -0
  71. package/build/es/src/blog-v3-tag.public.js +33 -0
  72. package/build/es/src/blog-v3-tag.public.js.map +1 -0
  73. package/build/es/src/blog-v3-tag.types.d.ts +345 -0
  74. package/build/es/src/blog-v3-tag.types.js +12 -0
  75. package/build/es/src/blog-v3-tag.types.js.map +1 -0
  76. package/build/es/src/blog-v3-tag.universal.d.ts +512 -0
  77. package/build/es/src/blog-v3-tag.universal.js +362 -0
  78. package/build/es/src/blog-v3-tag.universal.js.map +1 -0
  79. package/package.json +37 -0
@@ -0,0 +1,935 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
22
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
23
+ return new (P || (P = Promise))(function (resolve, reject) {
24
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
25
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
26
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
27
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
28
+ });
29
+ };
30
+ Object.defineProperty(exports, "__esModule", { value: true });
31
+ exports.getTotalPosts = exports.queryPostCountStats = exports.getPostMetrics = exports.queryPosts = exports.listPosts = exports.getPostBySlug = exports.getPost = exports.Order = exports.QueryPublicationsCountStatsRequestOrder = exports.SortOrder = exports.GetPostsSort = exports.PostFieldField = exports.Field = exports.Status = exports.Origin = exports.GetPostTemplatesSort = exports.ModerationStatusStatus = exports.NullValue = exports.VerticalAlignment = exports.Direction = exports.InitialExpandedItems = exports.AppType = exports.FontType = exports.DecorationType = exports.BackgroundType = exports.PollLayoutDirection = exports.PollLayoutType = exports.VoteRole = exports.ViewRole = exports.MapType = exports.Source = exports.ThumbnailsAlignment = exports.Crop = exports.Orientation = exports.LayoutType = exports.ViewMode = exports.Alignment = exports.Width = exports.LineStyle = exports.TextAlignment = exports.Target = exports.Type = exports.PluginContainerDataAlignment = exports.WidthType = exports.NodeType = exports.__debug = void 0;
32
+ const velo_1 = require("@wix/metro-runtime/velo");
33
+ const ambassadorWixBlogV3Post = __importStar(require("./blog-v3-post.http"));
34
+ // @ts-ignore
35
+ const motion_edm_autogen_query_wrapper_1 = require("@wix/motion-edm-autogen-query-wrapper");
36
+ let __verbose = false;
37
+ function __log(...args) {
38
+ __verbose && console.log(...args);
39
+ }
40
+ function __inspect(obj) {
41
+ return obj;
42
+ }
43
+ exports.__debug = {
44
+ verboseLogging: {
45
+ on: () => (__verbose = true),
46
+ off: () => (__verbose = false),
47
+ },
48
+ };
49
+ const _toVeloEntity = '$';
50
+ const _fromVeloEntity = '$';
51
+ var NodeType;
52
+ (function (NodeType) {
53
+ NodeType["PARAGRAPH"] = "PARAGRAPH";
54
+ NodeType["TEXT"] = "TEXT";
55
+ NodeType["HEADING"] = "HEADING";
56
+ NodeType["BULLETED_LIST"] = "BULLETED_LIST";
57
+ NodeType["ORDERED_LIST"] = "ORDERED_LIST";
58
+ NodeType["LIST_ITEM"] = "LIST_ITEM";
59
+ NodeType["BLOCKQUOTE"] = "BLOCKQUOTE";
60
+ NodeType["CODE_BLOCK"] = "CODE_BLOCK";
61
+ NodeType["VIDEO"] = "VIDEO";
62
+ NodeType["DIVIDER"] = "DIVIDER";
63
+ NodeType["FILE"] = "FILE";
64
+ NodeType["GALLERY"] = "GALLERY";
65
+ NodeType["GIF"] = "GIF";
66
+ NodeType["HTML"] = "HTML";
67
+ NodeType["IMAGE"] = "IMAGE";
68
+ NodeType["LINK_PREVIEW"] = "LINK_PREVIEW";
69
+ NodeType["MAP"] = "MAP";
70
+ NodeType["POLL"] = "POLL";
71
+ NodeType["APP_EMBED"] = "APP_EMBED";
72
+ NodeType["BUTTON"] = "BUTTON";
73
+ NodeType["COLLAPSIBLE_LIST"] = "COLLAPSIBLE_LIST";
74
+ NodeType["TABLE"] = "TABLE";
75
+ NodeType["EMBED"] = "EMBED";
76
+ NodeType["COLLAPSIBLE_ITEM"] = "COLLAPSIBLE_ITEM";
77
+ NodeType["COLLAPSIBLE_ITEM_TITLE"] = "COLLAPSIBLE_ITEM_TITLE";
78
+ NodeType["COLLAPSIBLE_ITEM_BODY"] = "COLLAPSIBLE_ITEM_BODY";
79
+ NodeType["TABLE_CELL"] = "TABLE_CELL";
80
+ NodeType["TABLE_ROW"] = "TABLE_ROW";
81
+ NodeType["EXTERNAL"] = "EXTERNAL";
82
+ NodeType["AUDIO"] = "AUDIO";
83
+ })(NodeType = exports.NodeType || (exports.NodeType = {}));
84
+ var WidthType;
85
+ (function (WidthType) {
86
+ /** Width matches the content width */
87
+ WidthType["CONTENT"] = "CONTENT";
88
+ /** Small Width */
89
+ WidthType["SMALL"] = "SMALL";
90
+ /** Width will match the original asset width */
91
+ WidthType["ORIGINAL"] = "ORIGINAL";
92
+ /** coast-to-coast display */
93
+ WidthType["FULL_WIDTH"] = "FULL_WIDTH";
94
+ })(WidthType = exports.WidthType || (exports.WidthType = {}));
95
+ var PluginContainerDataAlignment;
96
+ (function (PluginContainerDataAlignment) {
97
+ /** Center Alignment */
98
+ PluginContainerDataAlignment["CENTER"] = "CENTER";
99
+ /** Left Alignment */
100
+ PluginContainerDataAlignment["LEFT"] = "LEFT";
101
+ /** Right Alignment */
102
+ PluginContainerDataAlignment["RIGHT"] = "RIGHT";
103
+ })(PluginContainerDataAlignment = exports.PluginContainerDataAlignment || (exports.PluginContainerDataAlignment = {}));
104
+ var Type;
105
+ (function (Type) {
106
+ /** Regular link button */
107
+ Type["LINK"] = "LINK";
108
+ /** Triggers custom action that is defined in plugin configuration by the consumer */
109
+ Type["ACTION"] = "ACTION";
110
+ })(Type = exports.Type || (exports.Type = {}));
111
+ var Target;
112
+ (function (Target) {
113
+ /** Opens the linked document in the same frame as it was clicked (this is default) */
114
+ Target["SELF"] = "SELF";
115
+ /** Opens the linked document in a new window or tab */
116
+ Target["BLANK"] = "BLANK";
117
+ /** Opens the linked document in the parent frame */
118
+ Target["PARENT"] = "PARENT";
119
+ /** Opens the linked document in the full body of the window */
120
+ Target["TOP"] = "TOP";
121
+ })(Target = exports.Target || (exports.Target = {}));
122
+ var TextAlignment;
123
+ (function (TextAlignment) {
124
+ /** browser default, eqivalent to `initial` */
125
+ TextAlignment["AUTO"] = "AUTO";
126
+ /** Left align */
127
+ TextAlignment["LEFT"] = "LEFT";
128
+ /** Right align */
129
+ TextAlignment["RIGHT"] = "RIGHT";
130
+ /** Center align */
131
+ TextAlignment["CENTER"] = "CENTER";
132
+ /** Text is spaced to line up its left and right edges to the left and right edges of the line box, except for the last line */
133
+ TextAlignment["JUSTIFY"] = "JUSTIFY";
134
+ })(TextAlignment = exports.TextAlignment || (exports.TextAlignment = {}));
135
+ var LineStyle;
136
+ (function (LineStyle) {
137
+ /** Single Line */
138
+ LineStyle["SINGLE"] = "SINGLE";
139
+ /** Double Line */
140
+ LineStyle["DOUBLE"] = "DOUBLE";
141
+ /** Dashed Line */
142
+ LineStyle["DASHED"] = "DASHED";
143
+ /** Dotted Line */
144
+ LineStyle["DOTTED"] = "DOTTED";
145
+ })(LineStyle = exports.LineStyle || (exports.LineStyle = {}));
146
+ var Width;
147
+ (function (Width) {
148
+ /** Large line */
149
+ Width["LARGE"] = "LARGE";
150
+ /** Medium line */
151
+ Width["MEDIUM"] = "MEDIUM";
152
+ /** Small line */
153
+ Width["SMALL"] = "SMALL";
154
+ })(Width = exports.Width || (exports.Width = {}));
155
+ var Alignment;
156
+ (function (Alignment) {
157
+ /** Center alignment */
158
+ Alignment["CENTER"] = "CENTER";
159
+ /** Left alignment */
160
+ Alignment["LEFT"] = "LEFT";
161
+ /** Right alignment */
162
+ Alignment["RIGHT"] = "RIGHT";
163
+ })(Alignment = exports.Alignment || (exports.Alignment = {}));
164
+ var ViewMode;
165
+ (function (ViewMode) {
166
+ /** No PDF view */
167
+ ViewMode["NONE"] = "NONE";
168
+ /** Full PDF view */
169
+ ViewMode["FULL"] = "FULL";
170
+ /** Mini PDF view */
171
+ ViewMode["MINI"] = "MINI";
172
+ })(ViewMode = exports.ViewMode || (exports.ViewMode = {}));
173
+ var LayoutType;
174
+ (function (LayoutType) {
175
+ /** Collage type */
176
+ LayoutType["COLLAGE"] = "COLLAGE";
177
+ /** Masonry type */
178
+ LayoutType["MASONRY"] = "MASONRY";
179
+ /** Grid type */
180
+ LayoutType["GRID"] = "GRID";
181
+ /** Thumbnail type */
182
+ LayoutType["THUMBNAIL"] = "THUMBNAIL";
183
+ /** Slider type */
184
+ LayoutType["SLIDER"] = "SLIDER";
185
+ /** Slideshow type */
186
+ LayoutType["SLIDESHOW"] = "SLIDESHOW";
187
+ /** Panorama type */
188
+ LayoutType["PANORAMA"] = "PANORAMA";
189
+ /** Column type */
190
+ LayoutType["COLUMN"] = "COLUMN";
191
+ /** Magic type */
192
+ LayoutType["MAGIC"] = "MAGIC";
193
+ /** Fullsize images type */
194
+ LayoutType["FULLSIZE"] = "FULLSIZE";
195
+ })(LayoutType = exports.LayoutType || (exports.LayoutType = {}));
196
+ var Orientation;
197
+ (function (Orientation) {
198
+ /** Rows Orientation */
199
+ Orientation["ROWS"] = "ROWS";
200
+ /** Columns Orientation */
201
+ Orientation["COLUMNS"] = "COLUMNS";
202
+ })(Orientation = exports.Orientation || (exports.Orientation = {}));
203
+ var Crop;
204
+ (function (Crop) {
205
+ /** Crop to fill */
206
+ Crop["FILL"] = "FILL";
207
+ /** Crop to fit */
208
+ Crop["FIT"] = "FIT";
209
+ })(Crop = exports.Crop || (exports.Crop = {}));
210
+ var ThumbnailsAlignment;
211
+ (function (ThumbnailsAlignment) {
212
+ /** Top alignment */
213
+ ThumbnailsAlignment["TOP"] = "TOP";
214
+ /** Right alignment */
215
+ ThumbnailsAlignment["RIGHT"] = "RIGHT";
216
+ /** Bottom alignment */
217
+ ThumbnailsAlignment["BOTTOM"] = "BOTTOM";
218
+ /** Left alignment */
219
+ ThumbnailsAlignment["LEFT"] = "LEFT";
220
+ /** No thumbnail */
221
+ ThumbnailsAlignment["NONE"] = "NONE";
222
+ })(ThumbnailsAlignment = exports.ThumbnailsAlignment || (exports.ThumbnailsAlignment = {}));
223
+ var Source;
224
+ (function (Source) {
225
+ Source["HTML"] = "HTML";
226
+ Source["ADSENSE"] = "ADSENSE";
227
+ })(Source = exports.Source || (exports.Source = {}));
228
+ var MapType;
229
+ (function (MapType) {
230
+ /** Roadmap map type */
231
+ MapType["ROADMAP"] = "ROADMAP";
232
+ /** Satellite map type */
233
+ MapType["SATELITE"] = "SATELITE";
234
+ /** Hybrid map type */
235
+ MapType["HYBRID"] = "HYBRID";
236
+ /** Terrain map type */
237
+ MapType["TERRAIN"] = "TERRAIN";
238
+ })(MapType = exports.MapType || (exports.MapType = {}));
239
+ var ViewRole;
240
+ (function (ViewRole) {
241
+ /** Only Poll creator can view the results */
242
+ ViewRole["CREATOR"] = "CREATOR";
243
+ /** Anyone who voted can see the results */
244
+ ViewRole["VOTERS"] = "VOTERS";
245
+ /** Anyone can see the results, even if one didn't vote */
246
+ ViewRole["EVERYONE"] = "EVERYONE";
247
+ })(ViewRole = exports.ViewRole || (exports.ViewRole = {}));
248
+ var VoteRole;
249
+ (function (VoteRole) {
250
+ /** Logged in member */
251
+ VoteRole["SITE_MEMBERS"] = "SITE_MEMBERS";
252
+ /** Anyone */
253
+ VoteRole["ALL"] = "ALL";
254
+ })(VoteRole = exports.VoteRole || (exports.VoteRole = {}));
255
+ var PollLayoutType;
256
+ (function (PollLayoutType) {
257
+ /** List */
258
+ PollLayoutType["LIST"] = "LIST";
259
+ /** Grid */
260
+ PollLayoutType["GRID"] = "GRID";
261
+ })(PollLayoutType = exports.PollLayoutType || (exports.PollLayoutType = {}));
262
+ var PollLayoutDirection;
263
+ (function (PollLayoutDirection) {
264
+ /** Left-to-right */
265
+ PollLayoutDirection["LTR"] = "LTR";
266
+ /** Right-to-left */
267
+ PollLayoutDirection["RTL"] = "RTL";
268
+ })(PollLayoutDirection = exports.PollLayoutDirection || (exports.PollLayoutDirection = {}));
269
+ var BackgroundType;
270
+ (function (BackgroundType) {
271
+ /** Color background type */
272
+ BackgroundType["COLOR"] = "COLOR";
273
+ /** Image background type */
274
+ BackgroundType["IMAGE"] = "IMAGE";
275
+ /** Gradiant background type */
276
+ BackgroundType["GRADIENT"] = "GRADIENT";
277
+ })(BackgroundType = exports.BackgroundType || (exports.BackgroundType = {}));
278
+ var DecorationType;
279
+ (function (DecorationType) {
280
+ DecorationType["BOLD"] = "BOLD";
281
+ DecorationType["ITALIC"] = "ITALIC";
282
+ DecorationType["UNDERLINE"] = "UNDERLINE";
283
+ DecorationType["SPOILER"] = "SPOILER";
284
+ DecorationType["ANCHOR"] = "ANCHOR";
285
+ DecorationType["MENTION"] = "MENTION";
286
+ DecorationType["LINK"] = "LINK";
287
+ DecorationType["COLOR"] = "COLOR";
288
+ DecorationType["FONT_SIZE"] = "FONT_SIZE";
289
+ DecorationType["EXTERNAL"] = "EXTERNAL";
290
+ })(DecorationType = exports.DecorationType || (exports.DecorationType = {}));
291
+ var FontType;
292
+ (function (FontType) {
293
+ FontType["PX"] = "PX";
294
+ FontType["EM"] = "EM";
295
+ })(FontType = exports.FontType || (exports.FontType = {}));
296
+ var AppType;
297
+ (function (AppType) {
298
+ AppType["PRODUCT"] = "PRODUCT";
299
+ AppType["EVENT"] = "EVENT";
300
+ AppType["BOOKING"] = "BOOKING";
301
+ })(AppType = exports.AppType || (exports.AppType = {}));
302
+ var InitialExpandedItems;
303
+ (function (InitialExpandedItems) {
304
+ /** First item will be expended initally */
305
+ InitialExpandedItems["FIRST"] = "FIRST";
306
+ /** All items will expended initally */
307
+ InitialExpandedItems["ALL"] = "ALL";
308
+ /** All items collapsed initally */
309
+ InitialExpandedItems["NONE"] = "NONE";
310
+ })(InitialExpandedItems = exports.InitialExpandedItems || (exports.InitialExpandedItems = {}));
311
+ var Direction;
312
+ (function (Direction) {
313
+ /** Left-to-right */
314
+ Direction["LTR"] = "LTR";
315
+ /** Right-to-left */
316
+ Direction["RTL"] = "RTL";
317
+ })(Direction = exports.Direction || (exports.Direction = {}));
318
+ var VerticalAlignment;
319
+ (function (VerticalAlignment) {
320
+ /** Top alignment */
321
+ VerticalAlignment["TOP"] = "TOP";
322
+ /** Middle alignment */
323
+ VerticalAlignment["MIDDLE"] = "MIDDLE";
324
+ /** Bottom alignment */
325
+ VerticalAlignment["BOTTOM"] = "BOTTOM";
326
+ })(VerticalAlignment = exports.VerticalAlignment || (exports.VerticalAlignment = {}));
327
+ /**
328
+ * `NullValue` is a singleton enumeration to represent the null value for the
329
+ * `Value` type union.
330
+ *
331
+ * The JSON representation for `NullValue` is JSON `null`.
332
+ */
333
+ var NullValue;
334
+ (function (NullValue) {
335
+ /** Null value. */
336
+ NullValue["NULL_VALUE"] = "NULL_VALUE";
337
+ })(NullValue = exports.NullValue || (exports.NullValue = {}));
338
+ var ModerationStatusStatus;
339
+ (function (ModerationStatusStatus) {
340
+ ModerationStatusStatus["UNKNOWN"] = "UNKNOWN";
341
+ ModerationStatusStatus["APPROVED"] = "APPROVED";
342
+ ModerationStatusStatus["REJECTED"] = "REJECTED";
343
+ })(ModerationStatusStatus = exports.ModerationStatusStatus || (exports.ModerationStatusStatus = {}));
344
+ var GetPostTemplatesSort;
345
+ (function (GetPostTemplatesSort) {
346
+ /** Sorting by publishing date ascending */
347
+ GetPostTemplatesSort["PUBLISHED_DATE_ASC"] = "PUBLISHED_DATE_ASC";
348
+ /** Sorting by publishing date descending */
349
+ GetPostTemplatesSort["PUBLISHED_DATE_DESC"] = "PUBLISHED_DATE_DESC";
350
+ })(GetPostTemplatesSort = exports.GetPostTemplatesSort || (exports.GetPostTemplatesSort = {}));
351
+ var Origin;
352
+ (function (Origin) {
353
+ Origin["UNKNOWN"] = "UNKNOWN";
354
+ /** Changed by admin */
355
+ Origin["ADMIN"] = "ADMIN";
356
+ /** Categories were changed */
357
+ Origin["ADD_CATEGORIES"] = "ADD_CATEGORIES";
358
+ /** Saved automatically */
359
+ Origin["AUTO_SAVE"] = "AUTO_SAVE";
360
+ /** Copied from template */
361
+ Origin["COPY_TEMPLATE"] = "COPY_TEMPLATE";
362
+ /** Imported */
363
+ Origin["IMPORT"] = "IMPORT";
364
+ /** Imported in bulk */
365
+ Origin["IMPORT_BULK"] = "IMPORT_BULK";
366
+ /** Imported with html import */
367
+ Origin["IMPORT_HTML"] = "IMPORT_HTML";
368
+ /** Patch import */
369
+ Origin["IMPORT_PATCH"] = "IMPORT_PATCH";
370
+ /** Changed language */
371
+ Origin["LANGUAGE_CHANGE"] = "LANGUAGE_CHANGE";
372
+ /** Saved manually */
373
+ Origin["MANUAL_SAVE"] = "MANUAL_SAVE";
374
+ /** Affected by migration */
375
+ Origin["MIGRATION"] = "MIGRATION";
376
+ /** Affected by moderation */
377
+ Origin["MODERATION"] = "MODERATION";
378
+ /** Moved to trash */
379
+ Origin["MOVE_TO_TRASH"] = "MOVE_TO_TRASH";
380
+ /** Pricing plans were changed */
381
+ Origin["PRICING_PLANS_CHANGE"] = "PRICING_PLANS_CHANGE";
382
+ /** Was provisioned */
383
+ Origin["PROVISION"] = "PROVISION";
384
+ /** Was published */
385
+ Origin["PUBLISH"] = "PUBLISH";
386
+ /** Owner was reassigned */
387
+ Origin["REASSIGN_OWNER"] = "REASSIGN_OWNER";
388
+ /** Was reblogged */
389
+ Origin["REBLOG"] = "REBLOG";
390
+ /** Was restored */
391
+ Origin["RESTORE"] = "RESTORE";
392
+ /** Reverted to draft */
393
+ Origin["REVERT_TO_DRAFT"] = "REVERT_TO_DRAFT";
394
+ /** Was translated */
395
+ Origin["TRANSLATION"] = "TRANSLATION";
396
+ /** Was unpublished */
397
+ Origin["UNPUBLISH"] = "UNPUBLISH";
398
+ /** Was unscheduled */
399
+ Origin["UNSCHEDULE"] = "UNSCHEDULE";
400
+ /** New edit session started which updated editing_session_id id */
401
+ Origin["NEW_EDIT_SESSION"] = "NEW_EDIT_SESSION";
402
+ /** Was scheduled by Later */
403
+ Origin["SCHEDULING_SERVICE_SCHEDULE"] = "SCHEDULING_SERVICE_SCHEDULE";
404
+ /** Was unscheduled by Later */
405
+ Origin["SCHEDULING_SERVICE_UNSCHEDULE"] = "SCHEDULING_SERVICE_UNSCHEDULE";
406
+ /** Was published by Later */
407
+ Origin["SCHEDULING_SERVICE_PUBLISH"] = "SCHEDULING_SERVICE_PUBLISH";
408
+ /** Was scheduled */
409
+ Origin["SCHEDULE"] = "SCHEDULE";
410
+ /** Was removed from moderation */
411
+ Origin["REMOVE_FROM_MODERATION"] = "REMOVE_FROM_MODERATION";
412
+ /** Was rejected from moderation */
413
+ Origin["REJECT_FROM_MODERATION"] = "REJECT_FROM_MODERATION";
414
+ /** Was approved in moderation */
415
+ Origin["APPROVE_IN_MODERATION"] = "APPROVE_IN_MODERATION";
416
+ /** Tag was deleted */
417
+ Origin["DELETE_TAG"] = "DELETE_TAG";
418
+ })(Origin = exports.Origin || (exports.Origin = {}));
419
+ var Status;
420
+ (function (Status) {
421
+ Status["UNKNOWN"] = "UNKNOWN";
422
+ /** Status indicating the draft post is published. */
423
+ Status["PUBLISHED"] = "PUBLISHED";
424
+ /** Status indicating the draft post is unpublished. */
425
+ Status["UNPUBLISHED"] = "UNPUBLISHED";
426
+ /** Status indicating the draft post is scheduled for publication. */
427
+ Status["SCHEDULED"] = "SCHEDULED";
428
+ /** Status indicating the draft post is deleted. */
429
+ Status["DELETED"] = "DELETED";
430
+ /** Deprecated. Use `IN_REVIEW` instead. Status indicating the draft post is in review. */
431
+ Status["IN_MODERATION"] = "IN_MODERATION";
432
+ /** Status indicating the draft post is in review. */
433
+ Status["IN_REVIEW"] = "IN_REVIEW";
434
+ })(Status = exports.Status || (exports.Status = {}));
435
+ var Field;
436
+ (function (Field) {
437
+ Field["UNKNOWN"] = "UNKNOWN";
438
+ /** Total comments field. */
439
+ Field["TOTAL_COMMENTS"] = "TOTAL_COMMENTS";
440
+ /** Like count field. */
441
+ Field["LIKE_COUNT"] = "LIKE_COUNT";
442
+ /** View count field. */
443
+ Field["VIEW_COUNT"] = "VIEW_COUNT";
444
+ /** Rating count field */
445
+ Field["RATING_COUNT"] = "RATING_COUNT";
446
+ })(Field = exports.Field || (exports.Field = {}));
447
+ var PostFieldField;
448
+ (function (PostFieldField) {
449
+ PostFieldField["UNKNOWN"] = "UNKNOWN";
450
+ /** Deprecated use `METRICS` instead */
451
+ PostFieldField["COUNTERS"] = "COUNTERS";
452
+ /** Includes Post url when present */
453
+ PostFieldField["URL"] = "URL";
454
+ /** Includes Post content text string when present */
455
+ PostFieldField["CONTENT_TEXT"] = "CONTENT_TEXT";
456
+ /** Includes Post metrics when present */
457
+ PostFieldField["METRICS"] = "METRICS";
458
+ /** Includes SEO data */
459
+ PostFieldField["SEO"] = "SEO";
460
+ /**
461
+ * Includes Post content as a stringified DraftJS document
462
+ * Reserved for internal use
463
+ */
464
+ PostFieldField["CONTENT"] = "CONTENT";
465
+ /**
466
+ * Includes internal id field
467
+ * Reserved for internal use
468
+ */
469
+ PostFieldField["INTERNAL_ID"] = "INTERNAL_ID";
470
+ /** Includes post owners Contact Id */
471
+ PostFieldField["CONTACT_ID"] = "CONTACT_ID";
472
+ /** Includes post rich content */
473
+ PostFieldField["RICH_CONTENT"] = "RICH_CONTENT";
474
+ })(PostFieldField = exports.PostFieldField || (exports.PostFieldField = {}));
475
+ var GetPostsSort;
476
+ (function (GetPostsSort) {
477
+ /** Sorting by publishing date descending with pinned posts first. The default value */
478
+ GetPostsSort["FEED"] = "FEED";
479
+ /** Sorting by publishing date ascending */
480
+ GetPostsSort["PUBLISHED_DATE_ASC"] = "PUBLISHED_DATE_ASC";
481
+ /** Sorting by publishing date descending */
482
+ GetPostsSort["PUBLISHED_DATE_DESC"] = "PUBLISHED_DATE_DESC";
483
+ /** Sorting by view count descending */
484
+ GetPostsSort["VIEW_COUNT"] = "VIEW_COUNT";
485
+ /** Sorting by like count descending */
486
+ GetPostsSort["LIKE_COUNT"] = "LIKE_COUNT";
487
+ /** Sorting by title ascending */
488
+ GetPostsSort["TITLE_ASC"] = "TITLE_ASC";
489
+ /** Sorting by title descending */
490
+ GetPostsSort["TITLE_DESC"] = "TITLE_DESC";
491
+ /** Sorting by post rating descending. */
492
+ GetPostsSort["RATING"] = "RATING";
493
+ })(GetPostsSort = exports.GetPostsSort || (exports.GetPostsSort = {}));
494
+ var SortOrder;
495
+ (function (SortOrder) {
496
+ SortOrder["ASC"] = "ASC";
497
+ SortOrder["DESC"] = "DESC";
498
+ })(SortOrder = exports.SortOrder || (exports.SortOrder = {}));
499
+ var QueryPublicationsCountStatsRequestOrder;
500
+ (function (QueryPublicationsCountStatsRequestOrder) {
501
+ QueryPublicationsCountStatsRequestOrder["UNKNOWN"] = "UNKNOWN";
502
+ QueryPublicationsCountStatsRequestOrder["OLDEST"] = "OLDEST";
503
+ QueryPublicationsCountStatsRequestOrder["NEWEST"] = "NEWEST";
504
+ })(QueryPublicationsCountStatsRequestOrder = exports.QueryPublicationsCountStatsRequestOrder || (exports.QueryPublicationsCountStatsRequestOrder = {}));
505
+ var Order;
506
+ (function (Order) {
507
+ Order["UNKNOWN"] = "UNKNOWN";
508
+ Order["OLDEST"] = "OLDEST";
509
+ Order["NEWEST"] = "NEWEST";
510
+ })(Order = exports.Order || (exports.Order = {}));
511
+ const _coverMedia = { image: 'wix.common.Image', video: 'wix.common.Video' };
512
+ const _getPostBySlugRequest = {};
513
+ const _getPostBySlugResponse = { post: '_post' };
514
+ const _getPostMetricsRequest = {};
515
+ const _getPostMetricsResponse = {};
516
+ const _getPostRequest = {};
517
+ const _getPostResponse = { post: '_post' };
518
+ const _getTotalPostsRequest = {};
519
+ const _getTotalPostsResponse = {};
520
+ const _listPostsRequest = {};
521
+ const _listPostsResponse = { posts: '_post' };
522
+ const _media = { wixMedia: '_wixMedia' };
523
+ const _node = { nodes: '_node' };
524
+ const _post = {
525
+ url: 'wix.common.PageUrl',
526
+ heroImage: 'wix.common.Image',
527
+ coverMedia: '_coverMedia',
528
+ richContent: '_richContent',
529
+ media: '_media',
530
+ };
531
+ const _queryPostCountStatsRequest = {};
532
+ const _queryPostCountStatsResponse = {};
533
+ const _queryPostsRequest = {};
534
+ const _queryPostsResponse = { posts: '_post' };
535
+ const _richContent = { nodes: '_node' };
536
+ const _wixMedia = { image: 'wix.common.Image', videoV2: 'wix.common.VideoV2' };
537
+ /**
538
+ * Gets a post by the specified ID.
539
+ *
540
+ *
541
+ * The `getPost()` function returns a Promise that resolves to a post whose ID matches the given ID.
542
+ *
543
+ * @param postId - Post ID.
544
+ * @public
545
+ * @requiredField postId
546
+ * @param options - Options specifying which fields to return.
547
+ * @returns Fulfilled - The requested post.
548
+ */
549
+ function getPost(postId, options) {
550
+ return __awaiter(this, arguments, void 0, function* () {
551
+ const requestTransformation = { postId: '$[0]', fieldsets: '$[1].fieldsets' };
552
+ const responseTransformation = '$';
553
+ // @ts-ignore
554
+ const httpClient = arguments[2].httpClient;
555
+ const { toAmbassadorRequest } = velo_1.serializer({
556
+ rootSchema: _getPostRequest,
557
+ depSchemas: {},
558
+ fqdnTransformation: {
559
+ paths: [],
560
+ transformation: _fromVeloEntity,
561
+ },
562
+ customTransformation: requestTransformation,
563
+ });
564
+ const { fromJSON } = velo_1.serializer({
565
+ rootSchema: _getPostResponse,
566
+ depSchemas: { _coverMedia, _media, _node, _post, _richContent, _wixMedia },
567
+ fqdnTransformation: {
568
+ paths: [...['post']],
569
+ transformation: _toVeloEntity,
570
+ },
571
+ customTransformation: responseTransformation,
572
+ });
573
+ const payload = toAmbassadorRequest([postId, options]);
574
+ const reqOpts = ambassadorWixBlogV3Post.getPost(payload);
575
+ __log(`"GetPost" sending request with: ${__inspect(reqOpts)}`);
576
+ try {
577
+ const { data } = yield httpClient.request(reqOpts);
578
+ return fromJSON(data);
579
+ }
580
+ catch (err) {
581
+ const transformedError = velo_1.transformError(err, requestTransformation, [
582
+ 'postId',
583
+ 'options',
584
+ ]);
585
+ throw transformedError;
586
+ }
587
+ });
588
+ }
589
+ exports.getPost = getPost;
590
+ /**
591
+ * Gets a post by the provided slug.
592
+ *
593
+ *
594
+ * The `getPostBySlug()` function returns a Promise that resolves to a post whose slug matches the given slug.
595
+ *
596
+ * The `slug` is the end of a post's URL that refers to a specific post. For example, if a post's URL is `https:/example.com/blog/post/my-post-slug`, the slug is `my-post-slug`. The slug is case-sensitive, and is generally derived from the post title, unless specified otherwise.
597
+ * @public
598
+ * @requiredField GetPostBySlugRequest
599
+ * @requiredField slug
600
+ * @param options - Options specifying which fields to return.
601
+ * @param slug - Slug of the post to retrieve.
602
+ *
603
+ * The end of a post's URL, for example, `https:/example.com/blog/post/my-post-slug`. Case sensitive and generally based on the post title if not specified.
604
+ * @returns Fulfilled - The requested post.
605
+ */
606
+ function getPostBySlug(slug, options) {
607
+ return __awaiter(this, arguments, void 0, function* () {
608
+ const requestTransformation = { slug: '$[0]', fieldsets: '$[1].fieldsets' };
609
+ const responseTransformation = '$';
610
+ // @ts-ignore
611
+ const httpClient = arguments[2].httpClient;
612
+ const { toAmbassadorRequest } = velo_1.serializer({
613
+ rootSchema: _getPostBySlugRequest,
614
+ depSchemas: {},
615
+ fqdnTransformation: {
616
+ paths: [],
617
+ transformation: _fromVeloEntity,
618
+ },
619
+ customTransformation: requestTransformation,
620
+ });
621
+ const { fromJSON } = velo_1.serializer({
622
+ rootSchema: _getPostBySlugResponse,
623
+ depSchemas: { _coverMedia, _media, _node, _post, _richContent, _wixMedia },
624
+ fqdnTransformation: {
625
+ paths: [...['post']],
626
+ transformation: _toVeloEntity,
627
+ },
628
+ customTransformation: responseTransformation,
629
+ });
630
+ const payload = toAmbassadorRequest([slug, options]);
631
+ const reqOpts = ambassadorWixBlogV3Post.getPostBySlug(payload);
632
+ __log(`"GetPostBySlug" sending request with: ${__inspect(reqOpts)}`);
633
+ try {
634
+ const { data } = yield httpClient.request(reqOpts);
635
+ return fromJSON(data);
636
+ }
637
+ catch (err) {
638
+ const transformedError = velo_1.transformError(err, requestTransformation, [
639
+ 'slug',
640
+ 'options',
641
+ ]);
642
+ throw transformedError;
643
+ }
644
+ });
645
+ }
646
+ exports.getPostBySlug = getPostBySlug;
647
+ /**
648
+ * Retrieves a list of published posts.
649
+ *
650
+ *
651
+ * The `listPosts()` function returns a Promise that resolves to a list of up to 100 published posts.
652
+ *
653
+ * Using the `options` parameter, you can filter your list of posts, set the amount of posts to be returned, and sort your list in a specified order.
654
+ *
655
+ * By default, the list is sorted by `firstPublishedDate` in descending order, and the amount of posts returned is 50.
656
+ * @public
657
+ * @param options - Sort, filter, and paging options.
658
+ * @returns Fulfilled - List of retrieved posts.
659
+ */
660
+ function listPosts(options) {
661
+ return __awaiter(this, arguments, void 0, function* () {
662
+ const requestTransformation = {
663
+ featured: '$[0].featured',
664
+ hashtags: '$[0].hashtags',
665
+ categoryIds: '$[0].categoryIds',
666
+ tagIds: '$[0].tagIds',
667
+ sort: '$[0].sort',
668
+ paging: '$[0].paging',
669
+ language: '$[0].language',
670
+ memberId: '$[0].memberId',
671
+ fieldsets: '$[0].fieldsets',
672
+ };
673
+ const responseTransformation = '$';
674
+ // @ts-ignore
675
+ const httpClient = arguments[1].httpClient;
676
+ const { toAmbassadorRequest } = velo_1.serializer({
677
+ rootSchema: _listPostsRequest,
678
+ depSchemas: {},
679
+ fqdnTransformation: {
680
+ paths: [],
681
+ transformation: _fromVeloEntity,
682
+ },
683
+ customTransformation: requestTransformation,
684
+ });
685
+ const { fromJSON } = velo_1.serializer({
686
+ rootSchema: _listPostsResponse,
687
+ depSchemas: { _coverMedia, _media, _node, _post, _richContent, _wixMedia },
688
+ fqdnTransformation: {
689
+ paths: [...['Array#posts']],
690
+ transformation: _toVeloEntity,
691
+ },
692
+ customTransformation: responseTransformation,
693
+ });
694
+ const payload = toAmbassadorRequest([options]);
695
+ const reqOpts = ambassadorWixBlogV3Post.listPosts(payload);
696
+ __log(`"ListPosts" sending request with: ${__inspect(reqOpts)}`);
697
+ try {
698
+ const { data } = yield httpClient.request(reqOpts);
699
+ return fromJSON(data);
700
+ }
701
+ catch (err) {
702
+ const transformedError = velo_1.transformError(err, requestTransformation, [
703
+ 'options',
704
+ ]);
705
+ throw transformedError;
706
+ }
707
+ });
708
+ }
709
+ exports.listPosts = listPosts;
710
+ /**
711
+ * Creates a query to retrieve a list of posts.
712
+ *
713
+ *
714
+ * The `queryPosts()` function builds a query to retrieve a list of up to 100 posts, and returns a [`PostsQueryBuilder`](https://www.wix.com/velo/reference/wix-blog-backend/post/postsquerybuilder) object.
715
+ *
716
+ * The returned object contains the query definition which is typically used to run the query using the [`find()`](https://www.wix.com/velo/reference/wix-blog-backend/post/postsquerybuilder/find) function.
717
+ *
718
+ * You can refine the query by chaining `PostsQueryBuilder` functions onto the query. `PostsQueryBuilder` functions enable you to sort, filter, and control the results that `queryPosts()` returns.
719
+ *
720
+ * `queryPosts()` runs with these `PostsQueryBuilder` defaults that can be overridden:
721
+ * + `limit(50)`
722
+ * + `descending('firstPublishedDate')`
723
+ *
724
+ * Note that the default limit is `'50'`, but the max limit is `'100'`.
725
+ *
726
+ * To learn how to query posts, refer to the table below.
727
+ *
728
+ * The following `PostsQueryBuilder` functions are supported for the `queryPosts()` function. For a full description of the Posts object, see the object returned for the `items` property in `PostsQueryResult`.
729
+ * @public */
730
+ function queryPosts() {
731
+ const requestTransformation = { '*': '$[1]', query: '$[0]' };
732
+ const responseTransformation = {
733
+ items: '$.posts',
734
+ pagingMetadata: '$.pagingMetadata',
735
+ };
736
+ // @ts-ignore
737
+ const httpClient = arguments[0].httpClient;
738
+ const { toAmbassadorRequest } = velo_1.serializer({
739
+ rootSchema: _queryPostsRequest,
740
+ depSchemas: {},
741
+ fqdnTransformation: {
742
+ paths: [],
743
+ transformation: _fromVeloEntity,
744
+ },
745
+ customTransformation: requestTransformation,
746
+ });
747
+ const { fromJSON } = velo_1.serializer({
748
+ rootSchema: _queryPostsResponse,
749
+ depSchemas: { _coverMedia, _media, _node, _post, _richContent, _wixMedia },
750
+ fqdnTransformation: {
751
+ paths: [...['Array#posts']],
752
+ transformation: _toVeloEntity,
753
+ },
754
+ customTransformation: responseTransformation,
755
+ });
756
+ return motion_edm_autogen_query_wrapper_1.wrapWithQueryBuilder({
757
+ func: (payload) => {
758
+ const reqOpts = ambassadorWixBlogV3Post.queryPosts(payload);
759
+ return httpClient.request(reqOpts);
760
+ },
761
+ requestTransformer: (...args) => toAmbassadorRequest(args),
762
+ responseTransformer: ({ data }) => fromJSON(data),
763
+ errorTransformer: (err) => {
764
+ const transformedError = velo_1.transformError(err, requestTransformation);
765
+ throw transformedError;
766
+ },
767
+ pagingMethod: 'OFFSET',
768
+ transformationPaths: velo_1.resolveQueryFieldsTransformationPaths(_toVeloEntity),
769
+ })({ cursorWithEmptyFilterAndSort: true });
770
+ }
771
+ exports.queryPosts = queryPosts;
772
+ /**
773
+ * Gets a specified post's metrics.
774
+ *
775
+ *
776
+ * The `getPostMetrics()` function returns a Promise that resolves to the specified post's metrics.
777
+ *
778
+ * A post's metrics include the comments, likes, and views the post receives.
779
+ * @param postId - Post ID.
780
+ * @public
781
+ * @requiredField postId
782
+ * @returns Fulfilled - Post metrics.
783
+ */
784
+ function getPostMetrics(postId) {
785
+ return __awaiter(this, arguments, void 0, function* () {
786
+ const requestTransformation = { postId: '$[0]' };
787
+ const responseTransformation = '$';
788
+ // @ts-ignore
789
+ const httpClient = arguments[1].httpClient;
790
+ const { toAmbassadorRequest } = velo_1.serializer({
791
+ rootSchema: _getPostMetricsRequest,
792
+ depSchemas: {},
793
+ fqdnTransformation: {
794
+ paths: [],
795
+ transformation: _fromVeloEntity,
796
+ },
797
+ customTransformation: requestTransformation,
798
+ });
799
+ const { fromJSON } = velo_1.serializer({
800
+ rootSchema: _getPostMetricsResponse,
801
+ depSchemas: {},
802
+ fqdnTransformation: {
803
+ paths: [],
804
+ transformation: _toVeloEntity,
805
+ },
806
+ customTransformation: responseTransformation,
807
+ });
808
+ const payload = toAmbassadorRequest([postId]);
809
+ const reqOpts = ambassadorWixBlogV3Post.getPostMetrics(payload);
810
+ __log(`"GetPostMetrics" sending request with: ${__inspect(reqOpts)}`);
811
+ try {
812
+ const { data } = yield httpClient.request(reqOpts);
813
+ return fromJSON(data);
814
+ }
815
+ catch (err) {
816
+ const transformedError = velo_1.transformError(err, requestTransformation, [
817
+ 'postId',
818
+ ]);
819
+ throw transformedError;
820
+ }
821
+ });
822
+ }
823
+ exports.getPostMetrics = getPostMetrics;
824
+ /**
825
+ * Retrieves the number of published posts per month within a specified time range.
826
+ *
827
+ *
828
+ * The `queryPostCountStats()` function returns a Promise that resolves to the number of posts per month within the specified time range.
829
+ *
830
+ * You can set the time range using the `rangeStart` and `months` properties. The time range always starts on the 1st of the month set in `rangeStart`. It includes the number of `months` following `rangeStart`. For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`, the time range will be from `'2022-03-01'` until `'2022-06-30'`. Notice that the time range ends on the last of the month.
831
+ *
832
+ * >**Note:** If there are no published posts in a specific month, that month is not included in the response. For example, let's say a blog has `0` posts dated in February 2022. `months` and `rangeStart` are set to `3` and `'2022-01-01'` respectively. Your result will only include the `postCount` from January and March.
833
+ * @public
834
+ * @param options - Options specifying time frame, sort, and filter.
835
+ * @returns Fulfilled - Post count stats.
836
+ */
837
+ function queryPostCountStats(options) {
838
+ return __awaiter(this, arguments, void 0, function* () {
839
+ const requestTransformation = {
840
+ rangeStart: '$[0].rangeStart',
841
+ order: '$[0].order',
842
+ months: '$[0].months',
843
+ language: '$[0].language',
844
+ timeZone: '$[0].timeZone',
845
+ };
846
+ const responseTransformation = '$';
847
+ // @ts-ignore
848
+ const httpClient = arguments[1].httpClient;
849
+ const { toAmbassadorRequest } = velo_1.serializer({
850
+ rootSchema: _queryPostCountStatsRequest,
851
+ depSchemas: {},
852
+ fqdnTransformation: {
853
+ paths: [],
854
+ transformation: _fromVeloEntity,
855
+ },
856
+ customTransformation: requestTransformation,
857
+ });
858
+ const { fromJSON } = velo_1.serializer({
859
+ rootSchema: _queryPostCountStatsResponse,
860
+ depSchemas: {},
861
+ fqdnTransformation: {
862
+ paths: [],
863
+ transformation: _toVeloEntity,
864
+ },
865
+ customTransformation: responseTransformation,
866
+ });
867
+ const payload = toAmbassadorRequest([options]);
868
+ const reqOpts = ambassadorWixBlogV3Post.queryPostCountStats(payload);
869
+ __log(`"QueryPostCountStats" sending request with: ${__inspect(reqOpts)}`);
870
+ try {
871
+ const { data } = yield httpClient.request(reqOpts);
872
+ return fromJSON(data);
873
+ }
874
+ catch (err) {
875
+ const transformedError = velo_1.transformError(err, requestTransformation, [
876
+ 'options',
877
+ ]);
878
+ throw transformedError;
879
+ }
880
+ });
881
+ }
882
+ exports.queryPostCountStats = queryPostCountStats;
883
+ /**
884
+ * Gets the total amount of published posts on the blog.
885
+ *
886
+ *
887
+ * The `getTotalPosts()` function returns a Promise that resolves to the total amount of published posts on your blog's site.
888
+ *
889
+ *
890
+ * You can use the `language` option to filter posts for a specified language.
891
+ * @public
892
+ * @param options - Language Options.
893
+ * @returns Fulfilled - Total number of posts.
894
+ */
895
+ function getTotalPosts(options) {
896
+ return __awaiter(this, arguments, void 0, function* () {
897
+ const requestTransformation = { language: '$[0].language' };
898
+ const responseTransformation = '$';
899
+ // @ts-ignore
900
+ const httpClient = arguments[1].httpClient;
901
+ const { toAmbassadorRequest } = velo_1.serializer({
902
+ rootSchema: _getTotalPostsRequest,
903
+ depSchemas: {},
904
+ fqdnTransformation: {
905
+ paths: [],
906
+ transformation: _fromVeloEntity,
907
+ },
908
+ customTransformation: requestTransformation,
909
+ });
910
+ const { fromJSON } = velo_1.serializer({
911
+ rootSchema: _getTotalPostsResponse,
912
+ depSchemas: {},
913
+ fqdnTransformation: {
914
+ paths: [],
915
+ transformation: _toVeloEntity,
916
+ },
917
+ customTransformation: responseTransformation,
918
+ });
919
+ const payload = toAmbassadorRequest([options]);
920
+ const reqOpts = ambassadorWixBlogV3Post.getTotalPosts(payload);
921
+ __log(`"GetTotalPosts" sending request with: ${__inspect(reqOpts)}`);
922
+ try {
923
+ const { data } = yield httpClient.request(reqOpts);
924
+ return fromJSON(data);
925
+ }
926
+ catch (err) {
927
+ const transformedError = velo_1.transformError(err, requestTransformation, [
928
+ 'options',
929
+ ]);
930
+ throw transformedError;
931
+ }
932
+ });
933
+ }
934
+ exports.getTotalPosts = getTotalPosts;
935
+ //# sourceMappingURL=blog-v3-post.universal.js.map