@wix/auto_sdk_blog_posts 1.0.30 → 1.0.32

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