@wix/auto_sdk_blog_posts 1.0.31 → 1.0.33

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