@wix/auto_sdk_blog_posts 1.0.31 → 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 -563
  2. package/build/{es/src/blog-v3-post-posts.universal.d.ts → blog-v3-post-posts.universal-hTPKKRYx.d.ts} +299 -563
  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 -563
  10. package/build/internal/{es/src/blog-v3-post-posts.universal.d.ts → blog-v3-post-posts.universal-D8MomLjA.d.ts} +299 -563
  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 -61
  43. package/build/cjs/src/blog-v3-post-posts.http.js +0 -894
  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 -106
  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 -974
  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 -61
  69. package/build/es/src/blog-v3-post-posts.http.js +0 -884
  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 -106
  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 -941
  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 -61
  94. package/build/internal/cjs/src/blog-v3-post-posts.http.js +0 -894
  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 -106
  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 -974
  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 -61
  119. package/build/internal/es/src/blog-v3-post-posts.http.js +0 -884
  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 -106
  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 -941
  130. package/build/internal/es/src/blog-v3-post-posts.universal.js.map +0 -1
@@ -1,941 +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
- *
496
- * The `queryPostCountStats()` function returns a Promise that resolves to the number of posts per month within the specified time range.
497
- *
498
- * 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.
499
- *
500
- * >**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.
501
- * @public
502
- * @param options - Options specifying time frame, sort, and filter.
503
- * @permissionId BLOG.READ-PUBLICATION
504
- * @permissionScope Read Blog
505
- * @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
506
- * @permissionScope Manage Blog
507
- * @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
508
- * @permissionScope Manage Blog
509
- * @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
510
- * @permissionScope Read Draft Blog Posts
511
- * @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
512
- * @applicableIdentity APP
513
- * @applicableIdentity VISITOR
514
- * @returns Get Blog Post Count Stats response
515
- * @fqn com.wixpress.npm.communities.platformized.blog.BlogStatsService.QueryPostCountStats
516
- */
517
- export async function queryPostCountStats(options) {
518
- // @ts-ignore
519
- const { httpClient, sideEffects } = arguments[1];
520
- const payload = renameKeysFromSDKRequestToRESTRequest({
521
- rangeStart: options?.rangeStart,
522
- order: options?.order,
523
- months: options?.months,
524
- language: options?.language,
525
- timeZone: options?.timeZone,
526
- }, []);
527
- const reqOpts = ambassadorWixBlogV3Post.queryPostCountStats(payload);
528
- sideEffects?.onSiteCall?.();
529
- try {
530
- const result = await httpClient.request(reqOpts);
531
- sideEffects?.onSuccess?.(result);
532
- return renameKeysFromRESTResponseToSDKResponse(result.data, []);
533
- }
534
- catch (err) {
535
- const transformedError = sdkTransformError(err, {
536
- spreadPathsToArguments: {},
537
- explicitPathsToArguments: {
538
- rangeStart: '$[0].rangeStart',
539
- order: '$[0].order',
540
- months: '$[0].months',
541
- language: '$[0].language',
542
- timeZone: '$[0].timeZone',
543
- },
544
- singleArgumentUnchanged: false,
545
- }, ['options']);
546
- sideEffects?.onError?.(err);
547
- throw transformedError;
548
- }
549
- }
550
- /**
551
- * Retrieves the total amount of published posts of the blog.
552
- * @public
553
- * @param options - Language Options.
554
- * @permissionId BLOG.READ-PUBLICATION
555
- * @permissionScope Read Blog
556
- * @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
557
- * @permissionScope Manage Blog
558
- * @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
559
- * @permissionScope Manage Blog
560
- * @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
561
- * @permissionScope Read Draft Blog Posts
562
- * @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
563
- * @applicableIdentity APP
564
- * @applicableIdentity VISITOR
565
- * @fqn com.wixpress.npm.communities.platformized.blog.BlogStatsService.GetTotalPosts
566
- */
567
- export async function getTotalPosts(options) {
568
- // @ts-ignore
569
- const { httpClient, sideEffects } = arguments[1];
570
- const payload = renameKeysFromSDKRequestToRESTRequest({ language: options?.language }, []);
571
- const reqOpts = ambassadorWixBlogV3Post.getTotalPosts(payload);
572
- sideEffects?.onSiteCall?.();
573
- try {
574
- const result = await httpClient.request(reqOpts);
575
- sideEffects?.onSuccess?.(result);
576
- return renameKeysFromRESTResponseToSDKResponse(result.data, []);
577
- }
578
- catch (err) {
579
- const transformedError = sdkTransformError(err, {
580
- spreadPathsToArguments: {},
581
- explicitPathsToArguments: { language: '$[0].language' },
582
- singleArgumentUnchanged: false,
583
- }, ['options']);
584
- sideEffects?.onError?.(err);
585
- throw transformedError;
586
- }
587
- }
588
- /**
589
- * Retrieves a post by the specified ID.
590
- * @param postId - Post ID.
591
- * @public
592
- * @requiredField postId
593
- * @param options - Options specifying which fields to return.
594
- * @permissionId BLOG.READ-PUBLICATION
595
- * @permissionScope Read Blog
596
- * @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
597
- * @permissionScope Manage Blog
598
- * @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
599
- * @permissionScope Manage Blog
600
- * @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
601
- * @permissionScope Read Draft Blog Posts
602
- * @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
603
- * @applicableIdentity APP
604
- * @applicableIdentity VISITOR
605
- * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost
606
- */
607
- export async function getPost(postId, options) {
608
- // @ts-ignore
609
- const { httpClient, sideEffects } = arguments[2];
610
- const payload = renameKeysFromSDKRequestToRESTRequest({ postId: postId, fieldsets: options?.fieldsets }, []);
611
- const reqOpts = ambassadorWixBlogV3Post.getPost(payload);
612
- sideEffects?.onSiteCall?.();
613
- try {
614
- const result = await httpClient.request(reqOpts);
615
- sideEffects?.onSuccess?.(result);
616
- return renameKeysFromRESTResponseToSDKResponse(transformPaths(result.data, [
617
- {
618
- transformFn: transformRESTPageURLToSDKPageURL,
619
- paths: [{ path: 'post.url' }, { path: 'post.translations.url' }],
620
- },
621
- {
622
- transformFn: transformRESTImageToSDKImage,
623
- paths: [
624
- { path: 'post.heroImage' },
625
- { path: 'post.coverMedia.image' },
626
- { path: 'post.media.wixMedia.image' },
627
- ],
628
- },
629
- {
630
- transformFn: transformRESTVideoToSDKVideo,
631
- paths: [{ path: 'post.coverMedia.video' }],
632
- },
633
- {
634
- transformFn: transformRESTVideoV2ToSDKVideoV2,
635
- paths: [{ path: 'post.media.wixMedia.videoV2' }],
636
- },
637
- ]), ['post.richContent', 'post.rich_content']);
638
- }
639
- catch (err) {
640
- const transformedError = sdkTransformError(err, {
641
- spreadPathsToArguments: {},
642
- explicitPathsToArguments: {
643
- postId: '$[0]',
644
- fieldsets: '$[1].fieldsets',
645
- },
646
- singleArgumentUnchanged: false,
647
- }, ['postId', 'options']);
648
- sideEffects?.onError?.(err);
649
- throw transformedError;
650
- }
651
- }
652
- /**
653
- * Retrieves a post with the provided slug.
654
- *
655
- * The slug is the end of a post's URL that refers to a specific post.
656
- * For example, if a post's URL is `https:/example.com/blog/post/my-post-slug`,
657
- * the slug is `my-post-slug`. The slug is case-sensitive, and is generally derived from the post title,
658
- * unless specified otherwise.
659
- * @param slug - Slug of the post to retrieve.
660
- * @public
661
- * @requiredField slug
662
- * @param options - Options specifying which fields to return.
663
- * @permissionId BLOG.READ-PUBLICATION
664
- * @permissionScope Read Blog
665
- * @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
666
- * @permissionScope Manage Blog
667
- * @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
668
- * @permissionScope Manage Blog
669
- * @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
670
- * @permissionScope Read Draft Blog Posts
671
- * @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
672
- * @applicableIdentity APP
673
- * @applicableIdentity VISITOR
674
- * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug
675
- */
676
- export async function getPostBySlug(slug, options) {
677
- // @ts-ignore
678
- const { httpClient, sideEffects } = arguments[2];
679
- const payload = renameKeysFromSDKRequestToRESTRequest({ slug: slug, fieldsets: options?.fieldsets }, []);
680
- const reqOpts = ambassadorWixBlogV3Post.getPostBySlug(payload);
681
- sideEffects?.onSiteCall?.();
682
- try {
683
- const result = await httpClient.request(reqOpts);
684
- sideEffects?.onSuccess?.(result);
685
- return renameKeysFromRESTResponseToSDKResponse(transformPaths(result.data, [
686
- {
687
- transformFn: transformRESTPageURLToSDKPageURL,
688
- paths: [{ path: 'post.url' }, { path: 'post.translations.url' }],
689
- },
690
- {
691
- transformFn: transformRESTImageToSDKImage,
692
- paths: [
693
- { path: 'post.heroImage' },
694
- { path: 'post.coverMedia.image' },
695
- { path: 'post.media.wixMedia.image' },
696
- ],
697
- },
698
- {
699
- transformFn: transformRESTVideoToSDKVideo,
700
- paths: [{ path: 'post.coverMedia.video' }],
701
- },
702
- {
703
- transformFn: transformRESTVideoV2ToSDKVideoV2,
704
- paths: [{ path: 'post.media.wixMedia.videoV2' }],
705
- },
706
- ]), ['post.richContent', 'post.rich_content']);
707
- }
708
- catch (err) {
709
- const transformedError = sdkTransformError(err, {
710
- spreadPathsToArguments: {},
711
- explicitPathsToArguments: { slug: '$[0]', fieldsets: '$[1].fieldsets' },
712
- singleArgumentUnchanged: false,
713
- }, ['slug', 'options']);
714
- sideEffects?.onError?.(err);
715
- throw transformedError;
716
- }
717
- }
718
- /**
719
- * Retrieves a list of up to 100 published posts per request.
720
- *
721
- * List Posts runs with these defaults, which you can override:
722
- * - `firstPublishedDate` is sorted in descending order, with pinned posts first.
723
- * - `paging.limit` is `50`.
724
- * - `paging.offset` is `0`.
725
- * @public
726
- * @param options - Sort, filter, and paging options.
727
- * @permissionId BLOG.READ-PUBLICATION
728
- * @permissionScope Read Blog
729
- * @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
730
- * @permissionScope Manage Blog
731
- * @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
732
- * @permissionScope Manage Blog
733
- * @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
734
- * @permissionScope Read Draft Blog Posts
735
- * @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
736
- * @applicableIdentity APP
737
- * @applicableIdentity VISITOR
738
- * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts
739
- */
740
- export async function listPosts(options) {
741
- // @ts-ignore
742
- const { httpClient, sideEffects } = arguments[1];
743
- const payload = renameKeysFromSDKRequestToRESTRequest({
744
- featured: options?.featured,
745
- hashtags: options?.hashtags,
746
- categoryIds: options?.categoryIds,
747
- tagIds: options?.tagIds,
748
- sort: options?.sort,
749
- paging: options?.paging,
750
- language: options?.language,
751
- memberId: options?.memberId,
752
- fieldsets: options?.fieldsets,
753
- }, []);
754
- const reqOpts = ambassadorWixBlogV3Post.listPosts(payload);
755
- sideEffects?.onSiteCall?.();
756
- try {
757
- const result = await httpClient.request(reqOpts);
758
- sideEffects?.onSuccess?.(result);
759
- return renameKeysFromRESTResponseToSDKResponse(transformPaths(result.data, [
760
- {
761
- transformFn: transformRESTPageURLToSDKPageURL,
762
- paths: [{ path: 'posts.url' }, { path: 'posts.translations.url' }],
763
- },
764
- {
765
- transformFn: transformRESTImageToSDKImage,
766
- paths: [
767
- { path: 'posts.heroImage' },
768
- { path: 'posts.coverMedia.image' },
769
- { path: 'posts.media.wixMedia.image' },
770
- ],
771
- },
772
- {
773
- transformFn: transformRESTVideoToSDKVideo,
774
- paths: [{ path: 'posts.coverMedia.video' }],
775
- },
776
- {
777
- transformFn: transformRESTVideoV2ToSDKVideoV2,
778
- paths: [{ path: 'posts.media.wixMedia.videoV2' }],
779
- },
780
- ]), ['posts.richContent', 'posts.rich_content']);
781
- }
782
- catch (err) {
783
- const transformedError = sdkTransformError(err, {
784
- spreadPathsToArguments: {},
785
- explicitPathsToArguments: {
786
- featured: '$[0].featured',
787
- hashtags: '$[0].hashtags',
788
- categoryIds: '$[0].categoryIds',
789
- tagIds: '$[0].tagIds',
790
- sort: '$[0].sort',
791
- paging: '$[0].paging',
792
- language: '$[0].language',
793
- memberId: '$[0].memberId',
794
- fieldsets: '$[0].fieldsets',
795
- },
796
- singleArgumentUnchanged: false,
797
- }, ['options']);
798
- sideEffects?.onError?.(err);
799
- throw transformedError;
800
- }
801
- }
802
- /**
803
- * Creates a query to retrieve a list of posts.
804
- *
805
- *
806
- * The `queryPosts()` function builds a query to retrieve a list of up to 100 posts, and returns a `PostsQueryBuilder` object.
807
- *
808
- * The returned object contains the query definition which is typically used to run the query using the `find()` function.
809
- *
810
- * 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.
811
- *
812
- * `queryPosts()` runs with these `PostsQueryBuilder` defaults that you can override:
813
- * + `limit(50)`
814
- * + `descending('firstPublishedDate')`
815
- *
816
- * Note that the default limit is `'50'`, but the max limit is `'100'`.
817
- *
818
- * To learn how to query posts, refer to the table below.
819
- *
820
- * 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`.
821
- * @public
822
- * @param options - Options specifying which fields to return.
823
- * @permissionScope Read Blog
824
- * @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
825
- * @permissionScope Manage Blog
826
- * @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
827
- * @permissionScope Manage Blog
828
- * @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
829
- * @permissionScope Read Draft Blog Posts
830
- * @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
831
- * @permissionId BLOG.READ-PUBLICATION
832
- * @applicableIdentity APP
833
- * @applicableIdentity VISITOR
834
- * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts
835
- */
836
- export function queryPosts(options) {
837
- // @ts-ignore
838
- const { httpClient, sideEffects } = arguments[1];
839
- return queryBuilder({
840
- func: async (payload) => {
841
- const reqOpts = ambassadorWixBlogV3Post.queryPosts({
842
- ...payload,
843
- ...(options ?? {}),
844
- });
845
- sideEffects?.onSiteCall?.();
846
- try {
847
- const result = await httpClient.request(reqOpts);
848
- sideEffects?.onSuccess?.(result);
849
- return result;
850
- }
851
- catch (err) {
852
- sideEffects?.onError?.(err);
853
- throw err;
854
- }
855
- },
856
- requestTransformer: (query) => {
857
- const args = [query, options];
858
- return renameKeysFromSDKRequestToRESTRequest({ ...args?.[1], query: args?.[0] }, []);
859
- },
860
- responseTransformer: ({ data }) => {
861
- const transformedData = renameKeysFromRESTResponseToSDKResponse(transformPaths(data, [
862
- {
863
- transformFn: transformRESTPageURLToSDKPageURL,
864
- paths: [{ path: 'posts.url' }, { path: 'posts.translations.url' }],
865
- },
866
- {
867
- transformFn: transformRESTImageToSDKImage,
868
- paths: [
869
- { path: 'posts.heroImage' },
870
- { path: 'posts.coverMedia.image' },
871
- { path: 'posts.media.wixMedia.image' },
872
- ],
873
- },
874
- {
875
- transformFn: transformRESTVideoToSDKVideo,
876
- paths: [{ path: 'posts.coverMedia.video' }],
877
- },
878
- {
879
- transformFn: transformRESTVideoV2ToSDKVideoV2,
880
- paths: [{ path: 'posts.media.wixMedia.videoV2' }],
881
- },
882
- ]), ['posts.richContent', 'posts.rich_content']);
883
- return {
884
- items: transformedData?.posts,
885
- pagingMetadata: transformedData?.pagingMetadata,
886
- };
887
- },
888
- errorTransformer: (err) => {
889
- const transformedError = sdkTransformError(err, {
890
- spreadPathsToArguments: {},
891
- explicitPathsToArguments: { query: '$[0]' },
892
- singleArgumentUnchanged: false,
893
- });
894
- throw transformedError;
895
- },
896
- pagingMethod: 'CURSOR',
897
- transformationPaths: {},
898
- });
899
- }
900
- /**
901
- * Retrieves a post's metrics.
902
- *
903
- * A post's metrics include the comments, likes, and views the post receives.
904
- * @param postId - Post ID to retrieve metrics for.
905
- * @public
906
- * @requiredField postId
907
- * @permissionId BLOG.READ-PUBLICATION
908
- * @permissionScope Read Blog
909
- * @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
910
- * @permissionScope Manage Blog
911
- * @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
912
- * @permissionScope Manage Blog
913
- * @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
914
- * @permissionScope Read Draft Blog Posts
915
- * @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
916
- * @applicableIdentity APP
917
- * @applicableIdentity VISITOR
918
- * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostMetrics
919
- */
920
- export async function getPostMetrics(postId) {
921
- // @ts-ignore
922
- const { httpClient, sideEffects } = arguments[1];
923
- const payload = renameKeysFromSDKRequestToRESTRequest({ postId: postId }, []);
924
- const reqOpts = ambassadorWixBlogV3Post.getPostMetrics(payload);
925
- sideEffects?.onSiteCall?.();
926
- try {
927
- const result = await httpClient.request(reqOpts);
928
- sideEffects?.onSuccess?.(result);
929
- return renameKeysFromRESTResponseToSDKResponse(result.data, []);
930
- }
931
- catch (err) {
932
- const transformedError = sdkTransformError(err, {
933
- spreadPathsToArguments: {},
934
- explicitPathsToArguments: { postId: '$[0]' },
935
- singleArgumentUnchanged: false,
936
- }, ['postId']);
937
- sideEffects?.onError?.(err);
938
- throw transformedError;
939
- }
940
- }
941
- //# sourceMappingURL=blog-v3-post-posts.universal.js.map