@wix/auto_sdk_blog_posts 1.0.18 → 1.0.20

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 (129) hide show
  1. package/build/{cjs/src/blog-v3-post-posts.universal.d.ts → blog-v3-post-posts.universal-CEsWp0Fx.d.mts} +256 -485
  2. package/build/{es/src/blog-v3-post-posts.universal.d.ts → blog-v3-post-posts.universal-CEsWp0Fx.d.ts} +256 -485
  3. package/build/index.d.mts +130 -0
  4. package/build/index.d.ts +130 -0
  5. package/build/index.js +1975 -0
  6. package/build/index.js.map +1 -0
  7. package/build/index.mjs +1899 -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-nU7XoyIE.d.mts} +256 -485
  10. package/build/internal/{es/src/blog-v3-post-posts.universal.d.ts → blog-v3-post-posts.universal-nU7XoyIE.d.ts} +256 -485
  11. package/build/internal/index.d.mts +130 -0
  12. package/build/internal/index.d.ts +130 -0
  13. package/build/internal/index.js +1975 -0
  14. package/build/internal/index.js.map +1 -0
  15. package/build/internal/index.mjs +1899 -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} +238 -1375
  18. package/build/internal/{cjs/src/blog-v3-post-posts.types.d.ts → meta.d.ts} +238 -1375
  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} +238 -1375
  24. package/build/{internal/es/src/blog-v3-post-posts.types.d.ts → meta.d.ts} +238 -1375
  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 +13 -12
  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 -966
  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/src/blog-v3-post-posts.context.d.ts +0 -37
  65. package/build/es/src/blog-v3-post-posts.context.js +0 -37
  66. package/build/es/src/blog-v3-post-posts.context.js.map +0 -1
  67. package/build/es/src/blog-v3-post-posts.http.d.ts +0 -59
  68. package/build/es/src/blog-v3-post-posts.http.js +0 -882
  69. package/build/es/src/blog-v3-post-posts.http.js.map +0 -1
  70. package/build/es/src/blog-v3-post-posts.meta.d.ts +0 -25
  71. package/build/es/src/blog-v3-post-posts.meta.js +0 -128
  72. package/build/es/src/blog-v3-post-posts.meta.js.map +0 -1
  73. package/build/es/src/blog-v3-post-posts.public.d.ts +0 -99
  74. package/build/es/src/blog-v3-post-posts.public.js +0 -268
  75. package/build/es/src/blog-v3-post-posts.public.js.map +0 -1
  76. package/build/es/src/blog-v3-post-posts.types.js +0 -482
  77. package/build/es/src/blog-v3-post-posts.types.js.map +0 -1
  78. package/build/es/src/blog-v3-post-posts.universal.js +0 -933
  79. package/build/es/src/blog-v3-post-posts.universal.js.map +0 -1
  80. package/build/internal/cjs/index.d.ts +0 -1
  81. package/build/internal/cjs/index.js +0 -18
  82. package/build/internal/cjs/index.js.map +0 -1
  83. package/build/internal/cjs/index.typings.d.ts +0 -1
  84. package/build/internal/cjs/index.typings.js +0 -18
  85. package/build/internal/cjs/index.typings.js.map +0 -1
  86. package/build/internal/cjs/meta.d.ts +0 -1
  87. package/build/internal/cjs/meta.js +0 -18
  88. package/build/internal/cjs/meta.js.map +0 -1
  89. package/build/internal/cjs/src/blog-v3-post-posts.context.d.ts +0 -37
  90. package/build/internal/cjs/src/blog-v3-post-posts.context.js +0 -82
  91. package/build/internal/cjs/src/blog-v3-post-posts.context.js.map +0 -1
  92. package/build/internal/cjs/src/blog-v3-post-posts.http.d.ts +0 -59
  93. package/build/internal/cjs/src/blog-v3-post-posts.http.js +0 -892
  94. package/build/internal/cjs/src/blog-v3-post-posts.http.js.map +0 -1
  95. package/build/internal/cjs/src/blog-v3-post-posts.meta.d.ts +0 -25
  96. package/build/internal/cjs/src/blog-v3-post-posts.meta.js +0 -161
  97. package/build/internal/cjs/src/blog-v3-post-posts.meta.js.map +0 -1
  98. package/build/internal/cjs/src/blog-v3-post-posts.public.d.ts +0 -99
  99. package/build/internal/cjs/src/blog-v3-post-posts.public.js +0 -320
  100. package/build/internal/cjs/src/blog-v3-post-posts.public.js.map +0 -1
  101. package/build/internal/cjs/src/blog-v3-post-posts.types.js +0 -485
  102. package/build/internal/cjs/src/blog-v3-post-posts.types.js.map +0 -1
  103. package/build/internal/cjs/src/blog-v3-post-posts.universal.js +0 -966
  104. package/build/internal/cjs/src/blog-v3-post-posts.universal.js.map +0 -1
  105. package/build/internal/es/index.d.ts +0 -1
  106. package/build/internal/es/index.js +0 -2
  107. package/build/internal/es/index.js.map +0 -1
  108. package/build/internal/es/index.typings.d.ts +0 -1
  109. package/build/internal/es/index.typings.js +0 -2
  110. package/build/internal/es/index.typings.js.map +0 -1
  111. package/build/internal/es/meta.d.ts +0 -1
  112. package/build/internal/es/meta.js +0 -2
  113. package/build/internal/es/meta.js.map +0 -1
  114. package/build/internal/es/src/blog-v3-post-posts.context.d.ts +0 -37
  115. package/build/internal/es/src/blog-v3-post-posts.context.js +0 -37
  116. package/build/internal/es/src/blog-v3-post-posts.context.js.map +0 -1
  117. package/build/internal/es/src/blog-v3-post-posts.http.d.ts +0 -59
  118. package/build/internal/es/src/blog-v3-post-posts.http.js +0 -882
  119. package/build/internal/es/src/blog-v3-post-posts.http.js.map +0 -1
  120. package/build/internal/es/src/blog-v3-post-posts.meta.d.ts +0 -25
  121. package/build/internal/es/src/blog-v3-post-posts.meta.js +0 -128
  122. package/build/internal/es/src/blog-v3-post-posts.meta.js.map +0 -1
  123. package/build/internal/es/src/blog-v3-post-posts.public.d.ts +0 -99
  124. package/build/internal/es/src/blog-v3-post-posts.public.js +0 -268
  125. package/build/internal/es/src/blog-v3-post-posts.public.js.map +0 -1
  126. package/build/internal/es/src/blog-v3-post-posts.types.js +0 -482
  127. package/build/internal/es/src/blog-v3-post-posts.types.js.map +0 -1
  128. package/build/internal/es/src/blog-v3-post-posts.universal.js +0 -933
  129. package/build/internal/es/src/blog-v3-post-posts.universal.js.map +0 -1
@@ -1,933 +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
- * @documentationMaturity preview
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 Read Draft Blog Posts
509
- * @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
510
- * @applicableIdentity APP
511
- * @applicableIdentity VISITOR
512
- * @returns Get Blog Post Count Stats response
513
- * @fqn com.wixpress.npm.communities.platformized.blog.BlogStatsService.QueryPostCountStats
514
- */
515
- export async function queryPostCountStats(options) {
516
- // @ts-ignore
517
- const { httpClient, sideEffects } = arguments[1];
518
- const payload = renameKeysFromSDKRequestToRESTRequest({
519
- rangeStart: options?.rangeStart,
520
- order: options?.order,
521
- months: options?.months,
522
- language: options?.language,
523
- timeZone: options?.timeZone,
524
- });
525
- const reqOpts = ambassadorWixBlogV3Post.queryPostCountStats(payload);
526
- sideEffects?.onSiteCall?.();
527
- try {
528
- const result = await httpClient.request(reqOpts);
529
- sideEffects?.onSuccess?.(result);
530
- return renameKeysFromRESTResponseToSDKResponse(result.data);
531
- }
532
- catch (err) {
533
- const transformedError = sdkTransformError(err, {
534
- spreadPathsToArguments: {},
535
- explicitPathsToArguments: {
536
- rangeStart: '$[0].rangeStart',
537
- order: '$[0].order',
538
- months: '$[0].months',
539
- language: '$[0].language',
540
- timeZone: '$[0].timeZone',
541
- },
542
- singleArgumentUnchanged: false,
543
- }, ['options']);
544
- sideEffects?.onError?.(err);
545
- throw transformedError;
546
- }
547
- }
548
- /**
549
- * Retrieves the total amount of published posts of the blog.
550
- * @public
551
- * @documentationMaturity preview
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 Read Draft Blog Posts
558
- * @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
559
- * @applicableIdentity APP
560
- * @applicableIdentity VISITOR
561
- * @fqn com.wixpress.npm.communities.platformized.blog.BlogStatsService.GetTotalPosts
562
- */
563
- export async function getTotalPosts(options) {
564
- // @ts-ignore
565
- const { httpClient, sideEffects } = arguments[1];
566
- const payload = renameKeysFromSDKRequestToRESTRequest({
567
- language: options?.language,
568
- });
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 Read Draft Blog Posts
597
- * @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
598
- * @applicableIdentity APP
599
- * @applicableIdentity VISITOR
600
- * @returns Retrieved post info.
601
- * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost
602
- */
603
- export async function getPost(postId, options) {
604
- // @ts-ignore
605
- const { httpClient, sideEffects } = arguments[2];
606
- const payload = renameKeysFromSDKRequestToRESTRequest({
607
- postId: postId,
608
- fieldsets: options?.fieldsets,
609
- });
610
- const reqOpts = ambassadorWixBlogV3Post.getPost(payload);
611
- sideEffects?.onSiteCall?.();
612
- try {
613
- const result = await httpClient.request(reqOpts);
614
- sideEffects?.onSuccess?.(result);
615
- return renameKeysFromRESTResponseToSDKResponse(transformPaths(result.data, [
616
- {
617
- transformFn: transformRESTPageURLToSDKPageURL,
618
- paths: [{ path: 'post.url' }, { path: 'post.translations.url' }],
619
- },
620
- {
621
- transformFn: transformRESTImageToSDKImage,
622
- paths: [
623
- { path: 'post.heroImage' },
624
- { path: 'post.coverMedia.image' },
625
- { path: 'post.media.wixMedia.image' },
626
- ],
627
- },
628
- {
629
- transformFn: transformRESTVideoToSDKVideo,
630
- paths: [{ path: 'post.coverMedia.video' }],
631
- },
632
- {
633
- transformFn: transformRESTVideoV2ToSDKVideoV2,
634
- paths: [{ path: 'post.media.wixMedia.videoV2' }],
635
- },
636
- ]))?.post;
637
- }
638
- catch (err) {
639
- const transformedError = sdkTransformError(err, {
640
- spreadPathsToArguments: {},
641
- explicitPathsToArguments: {
642
- postId: '$[0]',
643
- fieldsets: '$[1].fieldsets',
644
- },
645
- singleArgumentUnchanged: false,
646
- }, ['postId', 'options']);
647
- sideEffects?.onError?.(err);
648
- throw transformedError;
649
- }
650
- }
651
- /**
652
- * Retrieves a post with the provided slug.
653
- *
654
- * The slug is the end of a post's URL that refers to a specific post.
655
- * For example, if a post's URL is `https:/example.com/blog/post/my-post-slug`,
656
- * the slug is `my-post-slug`. The slug is case-sensitive, and is generally derived from the post title,
657
- * unless specified otherwise.
658
- * @param slug - Slug of the post to retrieve.
659
- * @public
660
- * @requiredField slug
661
- * @permissionId BLOG.READ-PUBLICATION
662
- * @permissionScope Read Blog
663
- * @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
664
- * @permissionScope Manage Blog
665
- * @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
666
- * @permissionScope Read Draft Blog Posts
667
- * @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
668
- * @applicableIdentity APP
669
- * @applicableIdentity VISITOR
670
- * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug
671
- */
672
- export async function getPostBySlug(slug, options) {
673
- // @ts-ignore
674
- const { httpClient, sideEffects } = arguments[2];
675
- const payload = renameKeysFromSDKRequestToRESTRequest({
676
- slug: slug,
677
- fieldsets: options?.fieldsets,
678
- });
679
- const reqOpts = ambassadorWixBlogV3Post.getPostBySlug(payload);
680
- sideEffects?.onSiteCall?.();
681
- try {
682
- const result = await httpClient.request(reqOpts);
683
- sideEffects?.onSuccess?.(result);
684
- return renameKeysFromRESTResponseToSDKResponse(transformPaths(result.data, [
685
- {
686
- transformFn: transformRESTPageURLToSDKPageURL,
687
- paths: [{ path: 'post.url' }, { path: 'post.translations.url' }],
688
- },
689
- {
690
- transformFn: transformRESTImageToSDKImage,
691
- paths: [
692
- { path: 'post.heroImage' },
693
- { path: 'post.coverMedia.image' },
694
- { path: 'post.media.wixMedia.image' },
695
- ],
696
- },
697
- {
698
- transformFn: transformRESTVideoToSDKVideo,
699
- paths: [{ path: 'post.coverMedia.video' }],
700
- },
701
- {
702
- transformFn: transformRESTVideoV2ToSDKVideoV2,
703
- paths: [{ path: 'post.media.wixMedia.videoV2' }],
704
- },
705
- ]));
706
- }
707
- catch (err) {
708
- const transformedError = sdkTransformError(err, {
709
- spreadPathsToArguments: {},
710
- explicitPathsToArguments: { slug: '$[0]', fieldsets: '$[1].fieldsets' },
711
- singleArgumentUnchanged: false,
712
- }, ['slug', 'options']);
713
- sideEffects?.onError?.(err);
714
- throw transformedError;
715
- }
716
- }
717
- /**
718
- * Retrieves a list of up to 100 published posts per request.
719
- *
720
- * List Posts runs with these defaults, which you can override:
721
- * - `firstPublishedDate` is sorted in descending order, with pinned posts first.
722
- * - `paging.limit` is `50`.
723
- * - `paging.offset` is `0`.
724
- * @public
725
- * @permissionId BLOG.READ-PUBLICATION
726
- * @permissionScope Read Blog
727
- * @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
728
- * @permissionScope Manage Blog
729
- * @permissionScopeId SCOPE.DC-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
- ]));
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 Read Draft Blog Posts
821
- * @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
822
- * @permissionId BLOG.READ-PUBLICATION
823
- * @applicableIdentity APP
824
- * @applicableIdentity VISITOR
825
- * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts
826
- */
827
- export function queryPosts(options) {
828
- // @ts-ignore
829
- const { httpClient, sideEffects } = arguments[1];
830
- return queryBuilder({
831
- func: async (payload) => {
832
- const reqOpts = ambassadorWixBlogV3Post.queryPosts({
833
- ...payload,
834
- ...(options ?? {}),
835
- });
836
- sideEffects?.onSiteCall?.();
837
- try {
838
- const result = await httpClient.request(reqOpts);
839
- sideEffects?.onSuccess?.(result);
840
- return result;
841
- }
842
- catch (err) {
843
- sideEffects?.onError?.(err);
844
- throw err;
845
- }
846
- },
847
- requestTransformer: (query) => {
848
- const args = [query, options];
849
- return renameKeysFromSDKRequestToRESTRequest({
850
- ...args?.[1],
851
- query: args?.[0],
852
- });
853
- },
854
- responseTransformer: ({ data }) => {
855
- const transformedData = renameKeysFromRESTResponseToSDKResponse(transformPaths(data, [
856
- {
857
- transformFn: transformRESTPageURLToSDKPageURL,
858
- paths: [{ path: 'posts.url' }, { path: 'posts.translations.url' }],
859
- },
860
- {
861
- transformFn: transformRESTImageToSDKImage,
862
- paths: [
863
- { path: 'posts.heroImage' },
864
- { path: 'posts.coverMedia.image' },
865
- { path: 'posts.media.wixMedia.image' },
866
- ],
867
- },
868
- {
869
- transformFn: transformRESTVideoToSDKVideo,
870
- paths: [{ path: 'posts.coverMedia.video' }],
871
- },
872
- {
873
- transformFn: transformRESTVideoV2ToSDKVideoV2,
874
- paths: [{ path: 'posts.media.wixMedia.videoV2' }],
875
- },
876
- ]));
877
- return {
878
- items: transformedData?.posts,
879
- pagingMetadata: transformedData?.pagingMetadata,
880
- };
881
- },
882
- errorTransformer: (err) => {
883
- const transformedError = sdkTransformError(err, {
884
- spreadPathsToArguments: {},
885
- explicitPathsToArguments: { query: '$[0]' },
886
- singleArgumentUnchanged: false,
887
- });
888
- throw transformedError;
889
- },
890
- pagingMethod: 'CURSOR',
891
- transformationPaths: {},
892
- });
893
- }
894
- /**
895
- * Retrieves a post's metrics.
896
- *
897
- * A post's metrics include the comments, likes, and views the post receives.
898
- * @param postId - Post ID to retrieve metrics for.
899
- * @public
900
- * @requiredField postId
901
- * @permissionId BLOG.READ-PUBLICATION
902
- * @permissionScope Read Blog
903
- * @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
904
- * @permissionScope Manage Blog
905
- * @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
906
- * @permissionScope Read Draft Blog Posts
907
- * @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
908
- * @applicableIdentity APP
909
- * @applicableIdentity VISITOR
910
- * @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostMetrics
911
- */
912
- export async function getPostMetrics(postId) {
913
- // @ts-ignore
914
- const { httpClient, sideEffects } = arguments[1];
915
- const payload = renameKeysFromSDKRequestToRESTRequest({ postId: postId });
916
- const reqOpts = ambassadorWixBlogV3Post.getPostMetrics(payload);
917
- sideEffects?.onSiteCall?.();
918
- try {
919
- const result = await httpClient.request(reqOpts);
920
- sideEffects?.onSuccess?.(result);
921
- return renameKeysFromRESTResponseToSDKResponse(result.data);
922
- }
923
- catch (err) {
924
- const transformedError = sdkTransformError(err, {
925
- spreadPathsToArguments: {},
926
- explicitPathsToArguments: { postId: '$[0]' },
927
- singleArgumentUnchanged: false,
928
- }, ['postId']);
929
- sideEffects?.onError?.(err);
930
- throw transformedError;
931
- }
932
- }
933
- //# sourceMappingURL=blog-v3-post-posts.universal.js.map