@wix/auto_sdk_comments_comments 1.0.0

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 (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/comments-v2-comment-comments.context.d.ts +68 -0
  11. package/build/cjs/src/comments-v2-comment-comments.context.js +108 -0
  12. package/build/cjs/src/comments-v2-comment-comments.context.js.map +1 -0
  13. package/build/cjs/src/comments-v2-comment-comments.http.d.ts +90 -0
  14. package/build/cjs/src/comments-v2-comment-comments.http.js +2527 -0
  15. package/build/cjs/src/comments-v2-comment-comments.http.js.map +1 -0
  16. package/build/cjs/src/comments-v2-comment-comments.meta.d.ts +48 -0
  17. package/build/cjs/src/comments-v2-comment-comments.meta.js +370 -0
  18. package/build/cjs/src/comments-v2-comment-comments.meta.js.map +1 -0
  19. package/build/cjs/src/comments-v2-comment-comments.public.d.ts +202 -0
  20. package/build/cjs/src/comments-v2-comment-comments.public.js +1340 -0
  21. package/build/cjs/src/comments-v2-comment-comments.public.js.map +1 -0
  22. package/build/cjs/src/comments-v2-comment-comments.types.d.ts +2679 -0
  23. package/build/cjs/src/comments-v2-comment-comments.types.js +374 -0
  24. package/build/cjs/src/comments-v2-comment-comments.types.js.map +1 -0
  25. package/build/cjs/src/comments-v2-comment-comments.universal.d.ts +3180 -0
  26. package/build/cjs/src/comments-v2-comment-comments.universal.js +1563 -0
  27. package/build/cjs/src/comments-v2-comment-comments.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/comments-v2-comment-comments.context.d.ts +68 -0
  39. package/build/es/src/comments-v2-comment-comments.context.js +68 -0
  40. package/build/es/src/comments-v2-comment-comments.context.js.map +1 -0
  41. package/build/es/src/comments-v2-comment-comments.http.d.ts +90 -0
  42. package/build/es/src/comments-v2-comment-comments.http.js +2506 -0
  43. package/build/es/src/comments-v2-comment-comments.http.js.map +1 -0
  44. package/build/es/src/comments-v2-comment-comments.meta.d.ts +48 -0
  45. package/build/es/src/comments-v2-comment-comments.meta.js +326 -0
  46. package/build/es/src/comments-v2-comment-comments.meta.js.map +1 -0
  47. package/build/es/src/comments-v2-comment-comments.public.d.ts +202 -0
  48. package/build/es/src/comments-v2-comment-comments.public.js +1282 -0
  49. package/build/es/src/comments-v2-comment-comments.public.js.map +1 -0
  50. package/build/es/src/comments-v2-comment-comments.types.d.ts +2679 -0
  51. package/build/es/src/comments-v2-comment-comments.types.js +371 -0
  52. package/build/es/src/comments-v2-comment-comments.types.js.map +1 -0
  53. package/build/es/src/comments-v2-comment-comments.universal.d.ts +3180 -0
  54. package/build/es/src/comments-v2-comment-comments.universal.js +1518 -0
  55. package/build/es/src/comments-v2-comment-comments.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/comments-v2-comment-comments.context.d.ts +68 -0
  66. package/build/internal/cjs/src/comments-v2-comment-comments.context.js +108 -0
  67. package/build/internal/cjs/src/comments-v2-comment-comments.context.js.map +1 -0
  68. package/build/internal/cjs/src/comments-v2-comment-comments.http.d.ts +90 -0
  69. package/build/internal/cjs/src/comments-v2-comment-comments.http.js +2527 -0
  70. package/build/internal/cjs/src/comments-v2-comment-comments.http.js.map +1 -0
  71. package/build/internal/cjs/src/comments-v2-comment-comments.meta.d.ts +48 -0
  72. package/build/internal/cjs/src/comments-v2-comment-comments.meta.js +370 -0
  73. package/build/internal/cjs/src/comments-v2-comment-comments.meta.js.map +1 -0
  74. package/build/internal/cjs/src/comments-v2-comment-comments.public.d.ts +202 -0
  75. package/build/internal/cjs/src/comments-v2-comment-comments.public.js +1340 -0
  76. package/build/internal/cjs/src/comments-v2-comment-comments.public.js.map +1 -0
  77. package/build/internal/cjs/src/comments-v2-comment-comments.types.d.ts +2679 -0
  78. package/build/internal/cjs/src/comments-v2-comment-comments.types.js +374 -0
  79. package/build/internal/cjs/src/comments-v2-comment-comments.types.js.map +1 -0
  80. package/build/internal/cjs/src/comments-v2-comment-comments.universal.d.ts +3180 -0
  81. package/build/internal/cjs/src/comments-v2-comment-comments.universal.js +1563 -0
  82. package/build/internal/cjs/src/comments-v2-comment-comments.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/comments-v2-comment-comments.context.d.ts +68 -0
  93. package/build/internal/es/src/comments-v2-comment-comments.context.js +68 -0
  94. package/build/internal/es/src/comments-v2-comment-comments.context.js.map +1 -0
  95. package/build/internal/es/src/comments-v2-comment-comments.http.d.ts +90 -0
  96. package/build/internal/es/src/comments-v2-comment-comments.http.js +2506 -0
  97. package/build/internal/es/src/comments-v2-comment-comments.http.js.map +1 -0
  98. package/build/internal/es/src/comments-v2-comment-comments.meta.d.ts +48 -0
  99. package/build/internal/es/src/comments-v2-comment-comments.meta.js +326 -0
  100. package/build/internal/es/src/comments-v2-comment-comments.meta.js.map +1 -0
  101. package/build/internal/es/src/comments-v2-comment-comments.public.d.ts +202 -0
  102. package/build/internal/es/src/comments-v2-comment-comments.public.js +1282 -0
  103. package/build/internal/es/src/comments-v2-comment-comments.public.js.map +1 -0
  104. package/build/internal/es/src/comments-v2-comment-comments.types.d.ts +2679 -0
  105. package/build/internal/es/src/comments-v2-comment-comments.types.js +371 -0
  106. package/build/internal/es/src/comments-v2-comment-comments.types.js.map +1 -0
  107. package/build/internal/es/src/comments-v2-comment-comments.universal.d.ts +3180 -0
  108. package/build/internal/es/src/comments-v2-comment-comments.universal.js +1518 -0
  109. package/build/internal/es/src/comments-v2-comment-comments.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,2506 @@
1
+ import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';
2
+ import { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';
3
+ import { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';
4
+ import { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';
5
+ import { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';
6
+ import { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';
7
+ import { resolveUrl } from '@wix/sdk-runtime/rest-modules';
8
+ function resolveWixCommentsNgV1CommentsNgUrl(opts) {
9
+ const domainToMappings = {
10
+ 'www.wixapis.com': [
11
+ {
12
+ srcPath: '/comments/v1/comments',
13
+ destPath: '/v1/comments',
14
+ },
15
+ {
16
+ srcPath: '/comments/v1/bulk/comments',
17
+ destPath: '/v1/bulk/comments',
18
+ },
19
+ ],
20
+ _: [
21
+ {
22
+ srcPath: '/_api/comments-ng/v1',
23
+ destPath: '/v1',
24
+ },
25
+ ],
26
+ 'manage._base_domain_': [
27
+ {
28
+ srcPath: '/_api/comments-ng/v1',
29
+ destPath: '/v1',
30
+ },
31
+ ],
32
+ 'www._base_domain_': [
33
+ {
34
+ srcPath: '/_api/comments-ng/v1',
35
+ destPath: '/v1',
36
+ },
37
+ ],
38
+ };
39
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
40
+ }
41
+ const PACKAGE_NAME = '@wix/auto_sdk_comments_comments';
42
+ /**
43
+ * Creates a new comment and publishes it.
44
+ *
45
+ * The `appId`, `contextId`, and `resourceId` are all required and associate the created comment with the specific
46
+ * resource it responds to. See **Integrations** in the Comments introduction for a list of integrated scopes for these fields.
47
+ *
48
+ * If the created comment is a direct response to another comment, the `commentId` of the parent comment should be passed
49
+ * as `parentComment.id` in this comment's request. See **Terminology** in the Comments introduction for additional information on parent comments and replies.
50
+ */
51
+ export function createComment(payload) {
52
+ function __createComment({ host }) {
53
+ const serializedData = transformPaths(payload, [
54
+ {
55
+ transformFn: transformSDKTimestampToRESTTimestamp,
56
+ paths: [
57
+ { path: 'comment.createdDate' },
58
+ { path: 'comment.updatedDate' },
59
+ { path: 'comment.commentDate' },
60
+ { path: 'comment.content.commentDate' },
61
+ { path: 'comment.content.richContent.metadata.createdTimestamp' },
62
+ { path: 'comment.content.richContent.metadata.updatedTimestamp' },
63
+ { path: 'comment.content.attachments.image.urlExpirationDate' },
64
+ { path: 'comment.content.attachments.video.urlExpirationDate' },
65
+ {
66
+ path: 'comment.content.attachments.video.posters.urlExpirationDate',
67
+ },
68
+ { path: 'comment.content.attachments.audio.urlExpirationDate' },
69
+ { path: 'comment.content.attachments.document.urlExpirationDate' },
70
+ { path: 'comment.draftContent.commentDate' },
71
+ {
72
+ path: 'comment.draftContent.richContent.metadata.createdTimestamp',
73
+ },
74
+ {
75
+ path: 'comment.draftContent.richContent.metadata.updatedTimestamp',
76
+ },
77
+ { path: 'comment.draftContent.attachments.image.urlExpirationDate' },
78
+ { path: 'comment.draftContent.attachments.video.urlExpirationDate' },
79
+ {
80
+ path: 'comment.draftContent.attachments.video.posters.urlExpirationDate',
81
+ },
82
+ { path: 'comment.draftContent.attachments.audio.urlExpirationDate' },
83
+ {
84
+ path: 'comment.draftContent.attachments.document.urlExpirationDate',
85
+ },
86
+ ],
87
+ },
88
+ {
89
+ transformFn: transformSDKFloatToRESTFloat,
90
+ paths: [
91
+ {
92
+ path: 'comment.content.richContent.nodes.galleryData.items.image.media.duration',
93
+ },
94
+ {
95
+ path: 'comment.content.richContent.nodes.galleryData.items.video.media.duration',
96
+ },
97
+ {
98
+ path: 'comment.content.richContent.nodes.galleryData.items.video.thumbnail.duration',
99
+ },
100
+ {
101
+ path: 'comment.content.richContent.nodes.galleryData.options.item.ratio',
102
+ },
103
+ {
104
+ path: 'comment.content.richContent.nodes.imageData.image.duration',
105
+ },
106
+ { path: 'comment.content.richContent.nodes.mapData.mapSettings.lat' },
107
+ { path: 'comment.content.richContent.nodes.mapData.mapSettings.lng' },
108
+ {
109
+ path: 'comment.content.richContent.nodes.pollData.poll.image.duration',
110
+ },
111
+ {
112
+ path: 'comment.content.richContent.nodes.pollData.poll.options.image.duration',
113
+ },
114
+ {
115
+ path: 'comment.content.richContent.nodes.pollData.design.poll.background.image.duration',
116
+ },
117
+ {
118
+ path: 'comment.content.richContent.nodes.appEmbedData.image.duration',
119
+ },
120
+ {
121
+ path: 'comment.content.richContent.nodes.videoData.video.duration',
122
+ },
123
+ {
124
+ path: 'comment.content.richContent.nodes.videoData.thumbnail.duration',
125
+ },
126
+ {
127
+ path: 'comment.content.richContent.nodes.audioData.audio.duration',
128
+ },
129
+ {
130
+ path: 'comment.content.richContent.nodes.audioData.coverImage.duration',
131
+ },
132
+ {
133
+ path: 'comment.draftContent.richContent.nodes.galleryData.items.image.media.duration',
134
+ },
135
+ {
136
+ path: 'comment.draftContent.richContent.nodes.galleryData.items.video.media.duration',
137
+ },
138
+ {
139
+ path: 'comment.draftContent.richContent.nodes.galleryData.items.video.thumbnail.duration',
140
+ },
141
+ {
142
+ path: 'comment.draftContent.richContent.nodes.galleryData.options.item.ratio',
143
+ },
144
+ {
145
+ path: 'comment.draftContent.richContent.nodes.imageData.image.duration',
146
+ },
147
+ {
148
+ path: 'comment.draftContent.richContent.nodes.mapData.mapSettings.lat',
149
+ },
150
+ {
151
+ path: 'comment.draftContent.richContent.nodes.mapData.mapSettings.lng',
152
+ },
153
+ {
154
+ path: 'comment.draftContent.richContent.nodes.pollData.poll.image.duration',
155
+ },
156
+ {
157
+ path: 'comment.draftContent.richContent.nodes.pollData.poll.options.image.duration',
158
+ },
159
+ {
160
+ path: 'comment.draftContent.richContent.nodes.pollData.design.poll.background.image.duration',
161
+ },
162
+ {
163
+ path: 'comment.draftContent.richContent.nodes.appEmbedData.image.duration',
164
+ },
165
+ {
166
+ path: 'comment.draftContent.richContent.nodes.videoData.video.duration',
167
+ },
168
+ {
169
+ path: 'comment.draftContent.richContent.nodes.videoData.thumbnail.duration',
170
+ },
171
+ {
172
+ path: 'comment.draftContent.richContent.nodes.audioData.audio.duration',
173
+ },
174
+ {
175
+ path: 'comment.draftContent.richContent.nodes.audioData.coverImage.duration',
176
+ },
177
+ ],
178
+ },
179
+ ]);
180
+ const metadata = {
181
+ entityFqdn: 'wix.comments.v2.comment',
182
+ method: 'POST',
183
+ methodFqn: 'wix.comments.ng.v1.CommentsNg.CreateComment',
184
+ packageName: PACKAGE_NAME,
185
+ url: resolveWixCommentsNgV1CommentsNgUrl({
186
+ protoPath: '/v1/comments',
187
+ data: serializedData,
188
+ host,
189
+ }),
190
+ data: serializedData,
191
+ transformResponse: (payload) => transformPaths(payload, [
192
+ {
193
+ transformFn: transformRESTTimestampToSDKTimestamp,
194
+ paths: [
195
+ { path: 'comment.createdDate' },
196
+ { path: 'comment.updatedDate' },
197
+ { path: 'comment.commentDate' },
198
+ { path: 'comment.content.commentDate' },
199
+ { path: 'comment.content.richContent.metadata.createdTimestamp' },
200
+ { path: 'comment.content.richContent.metadata.updatedTimestamp' },
201
+ { path: 'comment.content.attachments.image.urlExpirationDate' },
202
+ { path: 'comment.content.attachments.video.urlExpirationDate' },
203
+ {
204
+ path: 'comment.content.attachments.video.posters.urlExpirationDate',
205
+ },
206
+ { path: 'comment.content.attachments.audio.urlExpirationDate' },
207
+ {
208
+ path: 'comment.content.attachments.document.urlExpirationDate',
209
+ },
210
+ { path: 'comment.draftContent.commentDate' },
211
+ {
212
+ path: 'comment.draftContent.richContent.metadata.createdTimestamp',
213
+ },
214
+ {
215
+ path: 'comment.draftContent.richContent.metadata.updatedTimestamp',
216
+ },
217
+ {
218
+ path: 'comment.draftContent.attachments.image.urlExpirationDate',
219
+ },
220
+ {
221
+ path: 'comment.draftContent.attachments.video.urlExpirationDate',
222
+ },
223
+ {
224
+ path: 'comment.draftContent.attachments.video.posters.urlExpirationDate',
225
+ },
226
+ {
227
+ path: 'comment.draftContent.attachments.audio.urlExpirationDate',
228
+ },
229
+ {
230
+ path: 'comment.draftContent.attachments.document.urlExpirationDate',
231
+ },
232
+ ],
233
+ },
234
+ {
235
+ transformFn: transformRESTFloatToSDKFloat,
236
+ paths: [
237
+ {
238
+ path: 'comment.content.richContent.nodes.galleryData.items.image.media.duration',
239
+ },
240
+ {
241
+ path: 'comment.content.richContent.nodes.galleryData.items.video.media.duration',
242
+ },
243
+ {
244
+ path: 'comment.content.richContent.nodes.galleryData.items.video.thumbnail.duration',
245
+ },
246
+ {
247
+ path: 'comment.content.richContent.nodes.galleryData.options.item.ratio',
248
+ },
249
+ {
250
+ path: 'comment.content.richContent.nodes.imageData.image.duration',
251
+ },
252
+ {
253
+ path: 'comment.content.richContent.nodes.mapData.mapSettings.lat',
254
+ },
255
+ {
256
+ path: 'comment.content.richContent.nodes.mapData.mapSettings.lng',
257
+ },
258
+ {
259
+ path: 'comment.content.richContent.nodes.pollData.poll.image.duration',
260
+ },
261
+ {
262
+ path: 'comment.content.richContent.nodes.pollData.poll.options.image.duration',
263
+ },
264
+ {
265
+ path: 'comment.content.richContent.nodes.pollData.design.poll.background.image.duration',
266
+ },
267
+ {
268
+ path: 'comment.content.richContent.nodes.appEmbedData.image.duration',
269
+ },
270
+ {
271
+ path: 'comment.content.richContent.nodes.videoData.video.duration',
272
+ },
273
+ {
274
+ path: 'comment.content.richContent.nodes.videoData.thumbnail.duration',
275
+ },
276
+ {
277
+ path: 'comment.content.richContent.nodes.audioData.audio.duration',
278
+ },
279
+ {
280
+ path: 'comment.content.richContent.nodes.audioData.coverImage.duration',
281
+ },
282
+ {
283
+ path: 'comment.draftContent.richContent.nodes.galleryData.items.image.media.duration',
284
+ },
285
+ {
286
+ path: 'comment.draftContent.richContent.nodes.galleryData.items.video.media.duration',
287
+ },
288
+ {
289
+ path: 'comment.draftContent.richContent.nodes.galleryData.items.video.thumbnail.duration',
290
+ },
291
+ {
292
+ path: 'comment.draftContent.richContent.nodes.galleryData.options.item.ratio',
293
+ },
294
+ {
295
+ path: 'comment.draftContent.richContent.nodes.imageData.image.duration',
296
+ },
297
+ {
298
+ path: 'comment.draftContent.richContent.nodes.mapData.mapSettings.lat',
299
+ },
300
+ {
301
+ path: 'comment.draftContent.richContent.nodes.mapData.mapSettings.lng',
302
+ },
303
+ {
304
+ path: 'comment.draftContent.richContent.nodes.pollData.poll.image.duration',
305
+ },
306
+ {
307
+ path: 'comment.draftContent.richContent.nodes.pollData.poll.options.image.duration',
308
+ },
309
+ {
310
+ path: 'comment.draftContent.richContent.nodes.pollData.design.poll.background.image.duration',
311
+ },
312
+ {
313
+ path: 'comment.draftContent.richContent.nodes.appEmbedData.image.duration',
314
+ },
315
+ {
316
+ path: 'comment.draftContent.richContent.nodes.videoData.video.duration',
317
+ },
318
+ {
319
+ path: 'comment.draftContent.richContent.nodes.videoData.thumbnail.duration',
320
+ },
321
+ {
322
+ path: 'comment.draftContent.richContent.nodes.audioData.audio.duration',
323
+ },
324
+ {
325
+ path: 'comment.draftContent.richContent.nodes.audioData.coverImage.duration',
326
+ },
327
+ ],
328
+ },
329
+ ]),
330
+ };
331
+ return metadata;
332
+ }
333
+ return __createComment;
334
+ }
335
+ /** Retrieves a comment. */
336
+ export function getComment(payload) {
337
+ function __getComment({ host }) {
338
+ const metadata = {
339
+ entityFqdn: 'wix.comments.v2.comment',
340
+ method: 'GET',
341
+ methodFqn: 'wix.comments.ng.v1.CommentsNg.GetComment',
342
+ packageName: PACKAGE_NAME,
343
+ url: resolveWixCommentsNgV1CommentsNgUrl({
344
+ protoPath: '/v1/comments/{commentId}',
345
+ data: payload,
346
+ host,
347
+ }),
348
+ params: toURLSearchParams(payload),
349
+ transformResponse: (payload) => transformPaths(payload, [
350
+ {
351
+ transformFn: transformRESTTimestampToSDKTimestamp,
352
+ paths: [
353
+ { path: 'comment.createdDate' },
354
+ { path: 'comment.updatedDate' },
355
+ { path: 'comment.commentDate' },
356
+ { path: 'comment.content.commentDate' },
357
+ { path: 'comment.content.richContent.metadata.createdTimestamp' },
358
+ { path: 'comment.content.richContent.metadata.updatedTimestamp' },
359
+ { path: 'comment.content.attachments.image.urlExpirationDate' },
360
+ { path: 'comment.content.attachments.video.urlExpirationDate' },
361
+ {
362
+ path: 'comment.content.attachments.video.posters.urlExpirationDate',
363
+ },
364
+ { path: 'comment.content.attachments.audio.urlExpirationDate' },
365
+ {
366
+ path: 'comment.content.attachments.document.urlExpirationDate',
367
+ },
368
+ { path: 'comment.draftContent.commentDate' },
369
+ {
370
+ path: 'comment.draftContent.richContent.metadata.createdTimestamp',
371
+ },
372
+ {
373
+ path: 'comment.draftContent.richContent.metadata.updatedTimestamp',
374
+ },
375
+ {
376
+ path: 'comment.draftContent.attachments.image.urlExpirationDate',
377
+ },
378
+ {
379
+ path: 'comment.draftContent.attachments.video.urlExpirationDate',
380
+ },
381
+ {
382
+ path: 'comment.draftContent.attachments.video.posters.urlExpirationDate',
383
+ },
384
+ {
385
+ path: 'comment.draftContent.attachments.audio.urlExpirationDate',
386
+ },
387
+ {
388
+ path: 'comment.draftContent.attachments.document.urlExpirationDate',
389
+ },
390
+ ],
391
+ },
392
+ {
393
+ transformFn: transformRESTFloatToSDKFloat,
394
+ paths: [
395
+ {
396
+ path: 'comment.content.richContent.nodes.galleryData.items.image.media.duration',
397
+ },
398
+ {
399
+ path: 'comment.content.richContent.nodes.galleryData.items.video.media.duration',
400
+ },
401
+ {
402
+ path: 'comment.content.richContent.nodes.galleryData.items.video.thumbnail.duration',
403
+ },
404
+ {
405
+ path: 'comment.content.richContent.nodes.galleryData.options.item.ratio',
406
+ },
407
+ {
408
+ path: 'comment.content.richContent.nodes.imageData.image.duration',
409
+ },
410
+ {
411
+ path: 'comment.content.richContent.nodes.mapData.mapSettings.lat',
412
+ },
413
+ {
414
+ path: 'comment.content.richContent.nodes.mapData.mapSettings.lng',
415
+ },
416
+ {
417
+ path: 'comment.content.richContent.nodes.pollData.poll.image.duration',
418
+ },
419
+ {
420
+ path: 'comment.content.richContent.nodes.pollData.poll.options.image.duration',
421
+ },
422
+ {
423
+ path: 'comment.content.richContent.nodes.pollData.design.poll.background.image.duration',
424
+ },
425
+ {
426
+ path: 'comment.content.richContent.nodes.appEmbedData.image.duration',
427
+ },
428
+ {
429
+ path: 'comment.content.richContent.nodes.videoData.video.duration',
430
+ },
431
+ {
432
+ path: 'comment.content.richContent.nodes.videoData.thumbnail.duration',
433
+ },
434
+ {
435
+ path: 'comment.content.richContent.nodes.audioData.audio.duration',
436
+ },
437
+ {
438
+ path: 'comment.content.richContent.nodes.audioData.coverImage.duration',
439
+ },
440
+ {
441
+ path: 'comment.draftContent.richContent.nodes.galleryData.items.image.media.duration',
442
+ },
443
+ {
444
+ path: 'comment.draftContent.richContent.nodes.galleryData.items.video.media.duration',
445
+ },
446
+ {
447
+ path: 'comment.draftContent.richContent.nodes.galleryData.items.video.thumbnail.duration',
448
+ },
449
+ {
450
+ path: 'comment.draftContent.richContent.nodes.galleryData.options.item.ratio',
451
+ },
452
+ {
453
+ path: 'comment.draftContent.richContent.nodes.imageData.image.duration',
454
+ },
455
+ {
456
+ path: 'comment.draftContent.richContent.nodes.mapData.mapSettings.lat',
457
+ },
458
+ {
459
+ path: 'comment.draftContent.richContent.nodes.mapData.mapSettings.lng',
460
+ },
461
+ {
462
+ path: 'comment.draftContent.richContent.nodes.pollData.poll.image.duration',
463
+ },
464
+ {
465
+ path: 'comment.draftContent.richContent.nodes.pollData.poll.options.image.duration',
466
+ },
467
+ {
468
+ path: 'comment.draftContent.richContent.nodes.pollData.design.poll.background.image.duration',
469
+ },
470
+ {
471
+ path: 'comment.draftContent.richContent.nodes.appEmbedData.image.duration',
472
+ },
473
+ {
474
+ path: 'comment.draftContent.richContent.nodes.videoData.video.duration',
475
+ },
476
+ {
477
+ path: 'comment.draftContent.richContent.nodes.videoData.thumbnail.duration',
478
+ },
479
+ {
480
+ path: 'comment.draftContent.richContent.nodes.audioData.audio.duration',
481
+ },
482
+ {
483
+ path: 'comment.draftContent.richContent.nodes.audioData.coverImage.duration',
484
+ },
485
+ ],
486
+ },
487
+ ]),
488
+ };
489
+ return metadata;
490
+ }
491
+ return __getComment;
492
+ }
493
+ /**
494
+ * Updates a comment.
495
+ *
496
+ * Each time the comment is updated, `revision` increments by 1. The current `revision` must be
497
+ * passed when updating the comment. This ensures you're working with the latest comment and
498
+ * prevents unintended overwrites.
499
+ */
500
+ export function updateComment(payload) {
501
+ function __updateComment({ host }) {
502
+ const serializedData = transformPaths(payload, [
503
+ {
504
+ transformFn: transformSDKTimestampToRESTTimestamp,
505
+ paths: [
506
+ { path: 'comment.createdDate' },
507
+ { path: 'comment.updatedDate' },
508
+ { path: 'comment.commentDate' },
509
+ { path: 'comment.content.commentDate' },
510
+ { path: 'comment.content.richContent.metadata.createdTimestamp' },
511
+ { path: 'comment.content.richContent.metadata.updatedTimestamp' },
512
+ { path: 'comment.content.attachments.image.urlExpirationDate' },
513
+ { path: 'comment.content.attachments.video.urlExpirationDate' },
514
+ {
515
+ path: 'comment.content.attachments.video.posters.urlExpirationDate',
516
+ },
517
+ { path: 'comment.content.attachments.audio.urlExpirationDate' },
518
+ { path: 'comment.content.attachments.document.urlExpirationDate' },
519
+ { path: 'comment.draftContent.commentDate' },
520
+ {
521
+ path: 'comment.draftContent.richContent.metadata.createdTimestamp',
522
+ },
523
+ {
524
+ path: 'comment.draftContent.richContent.metadata.updatedTimestamp',
525
+ },
526
+ { path: 'comment.draftContent.attachments.image.urlExpirationDate' },
527
+ { path: 'comment.draftContent.attachments.video.urlExpirationDate' },
528
+ {
529
+ path: 'comment.draftContent.attachments.video.posters.urlExpirationDate',
530
+ },
531
+ { path: 'comment.draftContent.attachments.audio.urlExpirationDate' },
532
+ {
533
+ path: 'comment.draftContent.attachments.document.urlExpirationDate',
534
+ },
535
+ ],
536
+ },
537
+ {
538
+ transformFn: transformSDKFloatToRESTFloat,
539
+ paths: [
540
+ {
541
+ path: 'comment.content.richContent.nodes.galleryData.items.image.media.duration',
542
+ },
543
+ {
544
+ path: 'comment.content.richContent.nodes.galleryData.items.video.media.duration',
545
+ },
546
+ {
547
+ path: 'comment.content.richContent.nodes.galleryData.items.video.thumbnail.duration',
548
+ },
549
+ {
550
+ path: 'comment.content.richContent.nodes.galleryData.options.item.ratio',
551
+ },
552
+ {
553
+ path: 'comment.content.richContent.nodes.imageData.image.duration',
554
+ },
555
+ { path: 'comment.content.richContent.nodes.mapData.mapSettings.lat' },
556
+ { path: 'comment.content.richContent.nodes.mapData.mapSettings.lng' },
557
+ {
558
+ path: 'comment.content.richContent.nodes.pollData.poll.image.duration',
559
+ },
560
+ {
561
+ path: 'comment.content.richContent.nodes.pollData.poll.options.image.duration',
562
+ },
563
+ {
564
+ path: 'comment.content.richContent.nodes.pollData.design.poll.background.image.duration',
565
+ },
566
+ {
567
+ path: 'comment.content.richContent.nodes.appEmbedData.image.duration',
568
+ },
569
+ {
570
+ path: 'comment.content.richContent.nodes.videoData.video.duration',
571
+ },
572
+ {
573
+ path: 'comment.content.richContent.nodes.videoData.thumbnail.duration',
574
+ },
575
+ {
576
+ path: 'comment.content.richContent.nodes.audioData.audio.duration',
577
+ },
578
+ {
579
+ path: 'comment.content.richContent.nodes.audioData.coverImage.duration',
580
+ },
581
+ {
582
+ path: 'comment.draftContent.richContent.nodes.galleryData.items.image.media.duration',
583
+ },
584
+ {
585
+ path: 'comment.draftContent.richContent.nodes.galleryData.items.video.media.duration',
586
+ },
587
+ {
588
+ path: 'comment.draftContent.richContent.nodes.galleryData.items.video.thumbnail.duration',
589
+ },
590
+ {
591
+ path: 'comment.draftContent.richContent.nodes.galleryData.options.item.ratio',
592
+ },
593
+ {
594
+ path: 'comment.draftContent.richContent.nodes.imageData.image.duration',
595
+ },
596
+ {
597
+ path: 'comment.draftContent.richContent.nodes.mapData.mapSettings.lat',
598
+ },
599
+ {
600
+ path: 'comment.draftContent.richContent.nodes.mapData.mapSettings.lng',
601
+ },
602
+ {
603
+ path: 'comment.draftContent.richContent.nodes.pollData.poll.image.duration',
604
+ },
605
+ {
606
+ path: 'comment.draftContent.richContent.nodes.pollData.poll.options.image.duration',
607
+ },
608
+ {
609
+ path: 'comment.draftContent.richContent.nodes.pollData.design.poll.background.image.duration',
610
+ },
611
+ {
612
+ path: 'comment.draftContent.richContent.nodes.appEmbedData.image.duration',
613
+ },
614
+ {
615
+ path: 'comment.draftContent.richContent.nodes.videoData.video.duration',
616
+ },
617
+ {
618
+ path: 'comment.draftContent.richContent.nodes.videoData.thumbnail.duration',
619
+ },
620
+ {
621
+ path: 'comment.draftContent.richContent.nodes.audioData.audio.duration',
622
+ },
623
+ {
624
+ path: 'comment.draftContent.richContent.nodes.audioData.coverImage.duration',
625
+ },
626
+ ],
627
+ },
628
+ ]);
629
+ const metadata = {
630
+ entityFqdn: 'wix.comments.v2.comment',
631
+ method: 'PATCH',
632
+ methodFqn: 'wix.comments.ng.v1.CommentsNg.UpdateComment',
633
+ packageName: PACKAGE_NAME,
634
+ url: resolveWixCommentsNgV1CommentsNgUrl({
635
+ protoPath: '/v1/comments/{comment.id}',
636
+ data: serializedData,
637
+ host,
638
+ }),
639
+ data: serializedData,
640
+ transformResponse: (payload) => transformPaths(payload, [
641
+ {
642
+ transformFn: transformRESTTimestampToSDKTimestamp,
643
+ paths: [
644
+ { path: 'comment.createdDate' },
645
+ { path: 'comment.updatedDate' },
646
+ { path: 'comment.commentDate' },
647
+ { path: 'comment.content.commentDate' },
648
+ { path: 'comment.content.richContent.metadata.createdTimestamp' },
649
+ { path: 'comment.content.richContent.metadata.updatedTimestamp' },
650
+ { path: 'comment.content.attachments.image.urlExpirationDate' },
651
+ { path: 'comment.content.attachments.video.urlExpirationDate' },
652
+ {
653
+ path: 'comment.content.attachments.video.posters.urlExpirationDate',
654
+ },
655
+ { path: 'comment.content.attachments.audio.urlExpirationDate' },
656
+ {
657
+ path: 'comment.content.attachments.document.urlExpirationDate',
658
+ },
659
+ { path: 'comment.draftContent.commentDate' },
660
+ {
661
+ path: 'comment.draftContent.richContent.metadata.createdTimestamp',
662
+ },
663
+ {
664
+ path: 'comment.draftContent.richContent.metadata.updatedTimestamp',
665
+ },
666
+ {
667
+ path: 'comment.draftContent.attachments.image.urlExpirationDate',
668
+ },
669
+ {
670
+ path: 'comment.draftContent.attachments.video.urlExpirationDate',
671
+ },
672
+ {
673
+ path: 'comment.draftContent.attachments.video.posters.urlExpirationDate',
674
+ },
675
+ {
676
+ path: 'comment.draftContent.attachments.audio.urlExpirationDate',
677
+ },
678
+ {
679
+ path: 'comment.draftContent.attachments.document.urlExpirationDate',
680
+ },
681
+ ],
682
+ },
683
+ {
684
+ transformFn: transformRESTFloatToSDKFloat,
685
+ paths: [
686
+ {
687
+ path: 'comment.content.richContent.nodes.galleryData.items.image.media.duration',
688
+ },
689
+ {
690
+ path: 'comment.content.richContent.nodes.galleryData.items.video.media.duration',
691
+ },
692
+ {
693
+ path: 'comment.content.richContent.nodes.galleryData.items.video.thumbnail.duration',
694
+ },
695
+ {
696
+ path: 'comment.content.richContent.nodes.galleryData.options.item.ratio',
697
+ },
698
+ {
699
+ path: 'comment.content.richContent.nodes.imageData.image.duration',
700
+ },
701
+ {
702
+ path: 'comment.content.richContent.nodes.mapData.mapSettings.lat',
703
+ },
704
+ {
705
+ path: 'comment.content.richContent.nodes.mapData.mapSettings.lng',
706
+ },
707
+ {
708
+ path: 'comment.content.richContent.nodes.pollData.poll.image.duration',
709
+ },
710
+ {
711
+ path: 'comment.content.richContent.nodes.pollData.poll.options.image.duration',
712
+ },
713
+ {
714
+ path: 'comment.content.richContent.nodes.pollData.design.poll.background.image.duration',
715
+ },
716
+ {
717
+ path: 'comment.content.richContent.nodes.appEmbedData.image.duration',
718
+ },
719
+ {
720
+ path: 'comment.content.richContent.nodes.videoData.video.duration',
721
+ },
722
+ {
723
+ path: 'comment.content.richContent.nodes.videoData.thumbnail.duration',
724
+ },
725
+ {
726
+ path: 'comment.content.richContent.nodes.audioData.audio.duration',
727
+ },
728
+ {
729
+ path: 'comment.content.richContent.nodes.audioData.coverImage.duration',
730
+ },
731
+ {
732
+ path: 'comment.draftContent.richContent.nodes.galleryData.items.image.media.duration',
733
+ },
734
+ {
735
+ path: 'comment.draftContent.richContent.nodes.galleryData.items.video.media.duration',
736
+ },
737
+ {
738
+ path: 'comment.draftContent.richContent.nodes.galleryData.items.video.thumbnail.duration',
739
+ },
740
+ {
741
+ path: 'comment.draftContent.richContent.nodes.galleryData.options.item.ratio',
742
+ },
743
+ {
744
+ path: 'comment.draftContent.richContent.nodes.imageData.image.duration',
745
+ },
746
+ {
747
+ path: 'comment.draftContent.richContent.nodes.mapData.mapSettings.lat',
748
+ },
749
+ {
750
+ path: 'comment.draftContent.richContent.nodes.mapData.mapSettings.lng',
751
+ },
752
+ {
753
+ path: 'comment.draftContent.richContent.nodes.pollData.poll.image.duration',
754
+ },
755
+ {
756
+ path: 'comment.draftContent.richContent.nodes.pollData.poll.options.image.duration',
757
+ },
758
+ {
759
+ path: 'comment.draftContent.richContent.nodes.pollData.design.poll.background.image.duration',
760
+ },
761
+ {
762
+ path: 'comment.draftContent.richContent.nodes.appEmbedData.image.duration',
763
+ },
764
+ {
765
+ path: 'comment.draftContent.richContent.nodes.videoData.video.duration',
766
+ },
767
+ {
768
+ path: 'comment.draftContent.richContent.nodes.videoData.thumbnail.duration',
769
+ },
770
+ {
771
+ path: 'comment.draftContent.richContent.nodes.audioData.audio.duration',
772
+ },
773
+ {
774
+ path: 'comment.draftContent.richContent.nodes.audioData.coverImage.duration',
775
+ },
776
+ ],
777
+ },
778
+ ]),
779
+ };
780
+ return metadata;
781
+ }
782
+ return __updateComment;
783
+ }
784
+ /**
785
+ * Deletes a comment.
786
+ *
787
+ * This method deletes the `content` of the comment and sets its `status` to `DELETED`.
788
+ */
789
+ export function deleteComment(payload) {
790
+ function __deleteComment({ host }) {
791
+ const metadata = {
792
+ entityFqdn: 'wix.comments.v2.comment',
793
+ method: 'DELETE',
794
+ methodFqn: 'wix.comments.ng.v1.CommentsNg.DeleteComment',
795
+ packageName: PACKAGE_NAME,
796
+ url: resolveWixCommentsNgV1CommentsNgUrl({
797
+ protoPath: '/v1/comments/{commentId}',
798
+ data: payload,
799
+ host,
800
+ }),
801
+ params: toURLSearchParams(payload),
802
+ };
803
+ return metadata;
804
+ }
805
+ return __deleteComment;
806
+ }
807
+ /**
808
+ * Moderates the draft content of a comment.
809
+ *
810
+ * - `APPROVE`: Moves `draftContent` to `content` and updates the comment `status` to `PUBLISHED`.
811
+ * - `REJECT`: Clears `draftContent` if comment `status` is `PUBLISHED` or, if comment `status` is `PENDING` it will keep `draftContent` the same and change `status` to `HIDDEN`.
812
+ */
813
+ export function moderateDraftContent(payload) {
814
+ function __moderateDraftContent({ host }) {
815
+ const metadata = {
816
+ entityFqdn: 'wix.comments.v2.comment',
817
+ method: 'POST',
818
+ methodFqn: 'wix.comments.ng.v1.CommentsNg.ModerateDraftContent',
819
+ packageName: PACKAGE_NAME,
820
+ url: resolveWixCommentsNgV1CommentsNgUrl({
821
+ protoPath: '/v1/comments/{commentId}/moderate',
822
+ data: payload,
823
+ host,
824
+ }),
825
+ data: payload,
826
+ transformResponse: (payload) => transformPaths(payload, [
827
+ {
828
+ transformFn: transformRESTTimestampToSDKTimestamp,
829
+ paths: [
830
+ { path: 'comment.createdDate' },
831
+ { path: 'comment.updatedDate' },
832
+ { path: 'comment.commentDate' },
833
+ { path: 'comment.content.commentDate' },
834
+ { path: 'comment.content.richContent.metadata.createdTimestamp' },
835
+ { path: 'comment.content.richContent.metadata.updatedTimestamp' },
836
+ { path: 'comment.content.attachments.image.urlExpirationDate' },
837
+ { path: 'comment.content.attachments.video.urlExpirationDate' },
838
+ {
839
+ path: 'comment.content.attachments.video.posters.urlExpirationDate',
840
+ },
841
+ { path: 'comment.content.attachments.audio.urlExpirationDate' },
842
+ {
843
+ path: 'comment.content.attachments.document.urlExpirationDate',
844
+ },
845
+ { path: 'comment.draftContent.commentDate' },
846
+ {
847
+ path: 'comment.draftContent.richContent.metadata.createdTimestamp',
848
+ },
849
+ {
850
+ path: 'comment.draftContent.richContent.metadata.updatedTimestamp',
851
+ },
852
+ {
853
+ path: 'comment.draftContent.attachments.image.urlExpirationDate',
854
+ },
855
+ {
856
+ path: 'comment.draftContent.attachments.video.urlExpirationDate',
857
+ },
858
+ {
859
+ path: 'comment.draftContent.attachments.video.posters.urlExpirationDate',
860
+ },
861
+ {
862
+ path: 'comment.draftContent.attachments.audio.urlExpirationDate',
863
+ },
864
+ {
865
+ path: 'comment.draftContent.attachments.document.urlExpirationDate',
866
+ },
867
+ ],
868
+ },
869
+ {
870
+ transformFn: transformRESTFloatToSDKFloat,
871
+ paths: [
872
+ {
873
+ path: 'comment.content.richContent.nodes.galleryData.items.image.media.duration',
874
+ },
875
+ {
876
+ path: 'comment.content.richContent.nodes.galleryData.items.video.media.duration',
877
+ },
878
+ {
879
+ path: 'comment.content.richContent.nodes.galleryData.items.video.thumbnail.duration',
880
+ },
881
+ {
882
+ path: 'comment.content.richContent.nodes.galleryData.options.item.ratio',
883
+ },
884
+ {
885
+ path: 'comment.content.richContent.nodes.imageData.image.duration',
886
+ },
887
+ {
888
+ path: 'comment.content.richContent.nodes.mapData.mapSettings.lat',
889
+ },
890
+ {
891
+ path: 'comment.content.richContent.nodes.mapData.mapSettings.lng',
892
+ },
893
+ {
894
+ path: 'comment.content.richContent.nodes.pollData.poll.image.duration',
895
+ },
896
+ {
897
+ path: 'comment.content.richContent.nodes.pollData.poll.options.image.duration',
898
+ },
899
+ {
900
+ path: 'comment.content.richContent.nodes.pollData.design.poll.background.image.duration',
901
+ },
902
+ {
903
+ path: 'comment.content.richContent.nodes.appEmbedData.image.duration',
904
+ },
905
+ {
906
+ path: 'comment.content.richContent.nodes.videoData.video.duration',
907
+ },
908
+ {
909
+ path: 'comment.content.richContent.nodes.videoData.thumbnail.duration',
910
+ },
911
+ {
912
+ path: 'comment.content.richContent.nodes.audioData.audio.duration',
913
+ },
914
+ {
915
+ path: 'comment.content.richContent.nodes.audioData.coverImage.duration',
916
+ },
917
+ {
918
+ path: 'comment.draftContent.richContent.nodes.galleryData.items.image.media.duration',
919
+ },
920
+ {
921
+ path: 'comment.draftContent.richContent.nodes.galleryData.items.video.media.duration',
922
+ },
923
+ {
924
+ path: 'comment.draftContent.richContent.nodes.galleryData.items.video.thumbnail.duration',
925
+ },
926
+ {
927
+ path: 'comment.draftContent.richContent.nodes.galleryData.options.item.ratio',
928
+ },
929
+ {
930
+ path: 'comment.draftContent.richContent.nodes.imageData.image.duration',
931
+ },
932
+ {
933
+ path: 'comment.draftContent.richContent.nodes.mapData.mapSettings.lat',
934
+ },
935
+ {
936
+ path: 'comment.draftContent.richContent.nodes.mapData.mapSettings.lng',
937
+ },
938
+ {
939
+ path: 'comment.draftContent.richContent.nodes.pollData.poll.image.duration',
940
+ },
941
+ {
942
+ path: 'comment.draftContent.richContent.nodes.pollData.poll.options.image.duration',
943
+ },
944
+ {
945
+ path: 'comment.draftContent.richContent.nodes.pollData.design.poll.background.image.duration',
946
+ },
947
+ {
948
+ path: 'comment.draftContent.richContent.nodes.appEmbedData.image.duration',
949
+ },
950
+ {
951
+ path: 'comment.draftContent.richContent.nodes.videoData.video.duration',
952
+ },
953
+ {
954
+ path: 'comment.draftContent.richContent.nodes.videoData.thumbnail.duration',
955
+ },
956
+ {
957
+ path: 'comment.draftContent.richContent.nodes.audioData.audio.duration',
958
+ },
959
+ {
960
+ path: 'comment.draftContent.richContent.nodes.audioData.coverImage.duration',
961
+ },
962
+ ],
963
+ },
964
+ ]),
965
+ };
966
+ return metadata;
967
+ }
968
+ return __moderateDraftContent;
969
+ }
970
+ /**
971
+ * Creates a query to retrieve a list of comments.
972
+ *
973
+ * The `queryComments()` function builds a query to retrieve a list of comments and returns a [`CommentsQueryBuilder`](#commentsquerybuilder) object.
974
+ *
975
+ * The returned object contains the query definition, which is typically used to run the query using the [`find()`](#commentsquerybuilder/find) function.
976
+ *
977
+ * You can refine the query by chaining `CommentsQueryBuilder` functions onto the query. `CommentsQueryBuilder` functions enable you to sort, filter, and control the results that `queryComments()` returns.
978
+ *
979
+ * `queryComments()` runs with the following `CommentsQueryBuilder` default that you can override:
980
+ * + `ascending("_id")`
981
+ *
982
+ * The functions that are chained to `queryComments()` are applied in the order they are called. For example, if you apply `ascending("voteSummary.netVoteCount")` and then `ascending("replyCount")`, the results are sorted first by the `"voteSummary.netVoteCount"`, and then, if there are multiple results with the same `"voteSummary.netVoteCount"`, the items are sorted by `"replyCount"`.
983
+ *
984
+ * The following `CommentsQueryBuilder` functions are supported for the `queryComments()` function. For a full description of the comment object, see the object returned for the [`items`](#commentsqueryresult/items) property in [`CommentsQueryResult`](#commentsqueryresult).
985
+ */
986
+ export function queryComments(payload) {
987
+ function __queryComments({ host }) {
988
+ const metadata = {
989
+ entityFqdn: 'wix.comments.v2.comment',
990
+ method: 'POST',
991
+ methodFqn: 'wix.comments.ng.v1.CommentsNg.QueryComments',
992
+ packageName: PACKAGE_NAME,
993
+ url: resolveWixCommentsNgV1CommentsNgUrl({
994
+ protoPath: '/v1/comments/query-cursor',
995
+ data: payload,
996
+ host,
997
+ }),
998
+ data: payload,
999
+ transformResponse: (payload) => transformPaths(payload, [
1000
+ {
1001
+ transformFn: transformRESTTimestampToSDKTimestamp,
1002
+ paths: [
1003
+ { path: 'comments.createdDate' },
1004
+ { path: 'comments.updatedDate' },
1005
+ { path: 'comments.commentDate' },
1006
+ { path: 'comments.content.commentDate' },
1007
+ {
1008
+ path: 'comments.content.richContent.metadata.createdTimestamp',
1009
+ },
1010
+ {
1011
+ path: 'comments.content.richContent.metadata.updatedTimestamp',
1012
+ },
1013
+ { path: 'comments.content.attachments.image.urlExpirationDate' },
1014
+ { path: 'comments.content.attachments.video.urlExpirationDate' },
1015
+ {
1016
+ path: 'comments.content.attachments.video.posters.urlExpirationDate',
1017
+ },
1018
+ { path: 'comments.content.attachments.audio.urlExpirationDate' },
1019
+ {
1020
+ path: 'comments.content.attachments.document.urlExpirationDate',
1021
+ },
1022
+ { path: 'comments.draftContent.commentDate' },
1023
+ {
1024
+ path: 'comments.draftContent.richContent.metadata.createdTimestamp',
1025
+ },
1026
+ {
1027
+ path: 'comments.draftContent.richContent.metadata.updatedTimestamp',
1028
+ },
1029
+ {
1030
+ path: 'comments.draftContent.attachments.image.urlExpirationDate',
1031
+ },
1032
+ {
1033
+ path: 'comments.draftContent.attachments.video.urlExpirationDate',
1034
+ },
1035
+ {
1036
+ path: 'comments.draftContent.attachments.video.posters.urlExpirationDate',
1037
+ },
1038
+ {
1039
+ path: 'comments.draftContent.attachments.audio.urlExpirationDate',
1040
+ },
1041
+ {
1042
+ path: 'comments.draftContent.attachments.document.urlExpirationDate',
1043
+ },
1044
+ ],
1045
+ },
1046
+ {
1047
+ transformFn: transformRESTFloatToSDKFloat,
1048
+ paths: [
1049
+ {
1050
+ path: 'comments.content.richContent.nodes.galleryData.items.image.media.duration',
1051
+ },
1052
+ {
1053
+ path: 'comments.content.richContent.nodes.galleryData.items.video.media.duration',
1054
+ },
1055
+ {
1056
+ path: 'comments.content.richContent.nodes.galleryData.items.video.thumbnail.duration',
1057
+ },
1058
+ {
1059
+ path: 'comments.content.richContent.nodes.galleryData.options.item.ratio',
1060
+ },
1061
+ {
1062
+ path: 'comments.content.richContent.nodes.imageData.image.duration',
1063
+ },
1064
+ {
1065
+ path: 'comments.content.richContent.nodes.mapData.mapSettings.lat',
1066
+ },
1067
+ {
1068
+ path: 'comments.content.richContent.nodes.mapData.mapSettings.lng',
1069
+ },
1070
+ {
1071
+ path: 'comments.content.richContent.nodes.pollData.poll.image.duration',
1072
+ },
1073
+ {
1074
+ path: 'comments.content.richContent.nodes.pollData.poll.options.image.duration',
1075
+ },
1076
+ {
1077
+ path: 'comments.content.richContent.nodes.pollData.design.poll.background.image.duration',
1078
+ },
1079
+ {
1080
+ path: 'comments.content.richContent.nodes.appEmbedData.image.duration',
1081
+ },
1082
+ {
1083
+ path: 'comments.content.richContent.nodes.videoData.video.duration',
1084
+ },
1085
+ {
1086
+ path: 'comments.content.richContent.nodes.videoData.thumbnail.duration',
1087
+ },
1088
+ {
1089
+ path: 'comments.content.richContent.nodes.audioData.audio.duration',
1090
+ },
1091
+ {
1092
+ path: 'comments.content.richContent.nodes.audioData.coverImage.duration',
1093
+ },
1094
+ {
1095
+ path: 'comments.draftContent.richContent.nodes.galleryData.items.image.media.duration',
1096
+ },
1097
+ {
1098
+ path: 'comments.draftContent.richContent.nodes.galleryData.items.video.media.duration',
1099
+ },
1100
+ {
1101
+ path: 'comments.draftContent.richContent.nodes.galleryData.items.video.thumbnail.duration',
1102
+ },
1103
+ {
1104
+ path: 'comments.draftContent.richContent.nodes.galleryData.options.item.ratio',
1105
+ },
1106
+ {
1107
+ path: 'comments.draftContent.richContent.nodes.imageData.image.duration',
1108
+ },
1109
+ {
1110
+ path: 'comments.draftContent.richContent.nodes.mapData.mapSettings.lat',
1111
+ },
1112
+ {
1113
+ path: 'comments.draftContent.richContent.nodes.mapData.mapSettings.lng',
1114
+ },
1115
+ {
1116
+ path: 'comments.draftContent.richContent.nodes.pollData.poll.image.duration',
1117
+ },
1118
+ {
1119
+ path: 'comments.draftContent.richContent.nodes.pollData.poll.options.image.duration',
1120
+ },
1121
+ {
1122
+ path: 'comments.draftContent.richContent.nodes.pollData.design.poll.background.image.duration',
1123
+ },
1124
+ {
1125
+ path: 'comments.draftContent.richContent.nodes.appEmbedData.image.duration',
1126
+ },
1127
+ {
1128
+ path: 'comments.draftContent.richContent.nodes.videoData.video.duration',
1129
+ },
1130
+ {
1131
+ path: 'comments.draftContent.richContent.nodes.videoData.thumbnail.duration',
1132
+ },
1133
+ {
1134
+ path: 'comments.draftContent.richContent.nodes.audioData.audio.duration',
1135
+ },
1136
+ {
1137
+ path: 'comments.draftContent.richContent.nodes.audioData.coverImage.duration',
1138
+ },
1139
+ ],
1140
+ },
1141
+ ]),
1142
+ };
1143
+ return metadata;
1144
+ }
1145
+ return __queryComments;
1146
+ }
1147
+ /**
1148
+ * Sets `marked` to `TRUE` to mark a comment.
1149
+ *
1150
+ * Call Query Comments to filter for marked comments to then apply customization to.
1151
+ * See Sample Flows for an example.
1152
+ */
1153
+ export function markComment(payload) {
1154
+ function __markComment({ host }) {
1155
+ const metadata = {
1156
+ entityFqdn: 'wix.comments.v2.comment',
1157
+ method: 'PUT',
1158
+ methodFqn: 'wix.comments.ng.v1.CommentsNg.MarkComment',
1159
+ packageName: PACKAGE_NAME,
1160
+ url: resolveWixCommentsNgV1CommentsNgUrl({
1161
+ protoPath: '/v1/comments/{commentId}/mark',
1162
+ data: payload,
1163
+ host,
1164
+ }),
1165
+ data: payload,
1166
+ transformResponse: (payload) => transformPaths(payload, [
1167
+ {
1168
+ transformFn: transformRESTTimestampToSDKTimestamp,
1169
+ paths: [
1170
+ { path: 'comment.createdDate' },
1171
+ { path: 'comment.updatedDate' },
1172
+ { path: 'comment.commentDate' },
1173
+ { path: 'comment.content.commentDate' },
1174
+ { path: 'comment.content.richContent.metadata.createdTimestamp' },
1175
+ { path: 'comment.content.richContent.metadata.updatedTimestamp' },
1176
+ { path: 'comment.content.attachments.image.urlExpirationDate' },
1177
+ { path: 'comment.content.attachments.video.urlExpirationDate' },
1178
+ {
1179
+ path: 'comment.content.attachments.video.posters.urlExpirationDate',
1180
+ },
1181
+ { path: 'comment.content.attachments.audio.urlExpirationDate' },
1182
+ {
1183
+ path: 'comment.content.attachments.document.urlExpirationDate',
1184
+ },
1185
+ { path: 'comment.draftContent.commentDate' },
1186
+ {
1187
+ path: 'comment.draftContent.richContent.metadata.createdTimestamp',
1188
+ },
1189
+ {
1190
+ path: 'comment.draftContent.richContent.metadata.updatedTimestamp',
1191
+ },
1192
+ {
1193
+ path: 'comment.draftContent.attachments.image.urlExpirationDate',
1194
+ },
1195
+ {
1196
+ path: 'comment.draftContent.attachments.video.urlExpirationDate',
1197
+ },
1198
+ {
1199
+ path: 'comment.draftContent.attachments.video.posters.urlExpirationDate',
1200
+ },
1201
+ {
1202
+ path: 'comment.draftContent.attachments.audio.urlExpirationDate',
1203
+ },
1204
+ {
1205
+ path: 'comment.draftContent.attachments.document.urlExpirationDate',
1206
+ },
1207
+ ],
1208
+ },
1209
+ {
1210
+ transformFn: transformRESTFloatToSDKFloat,
1211
+ paths: [
1212
+ {
1213
+ path: 'comment.content.richContent.nodes.galleryData.items.image.media.duration',
1214
+ },
1215
+ {
1216
+ path: 'comment.content.richContent.nodes.galleryData.items.video.media.duration',
1217
+ },
1218
+ {
1219
+ path: 'comment.content.richContent.nodes.galleryData.items.video.thumbnail.duration',
1220
+ },
1221
+ {
1222
+ path: 'comment.content.richContent.nodes.galleryData.options.item.ratio',
1223
+ },
1224
+ {
1225
+ path: 'comment.content.richContent.nodes.imageData.image.duration',
1226
+ },
1227
+ {
1228
+ path: 'comment.content.richContent.nodes.mapData.mapSettings.lat',
1229
+ },
1230
+ {
1231
+ path: 'comment.content.richContent.nodes.mapData.mapSettings.lng',
1232
+ },
1233
+ {
1234
+ path: 'comment.content.richContent.nodes.pollData.poll.image.duration',
1235
+ },
1236
+ {
1237
+ path: 'comment.content.richContent.nodes.pollData.poll.options.image.duration',
1238
+ },
1239
+ {
1240
+ path: 'comment.content.richContent.nodes.pollData.design.poll.background.image.duration',
1241
+ },
1242
+ {
1243
+ path: 'comment.content.richContent.nodes.appEmbedData.image.duration',
1244
+ },
1245
+ {
1246
+ path: 'comment.content.richContent.nodes.videoData.video.duration',
1247
+ },
1248
+ {
1249
+ path: 'comment.content.richContent.nodes.videoData.thumbnail.duration',
1250
+ },
1251
+ {
1252
+ path: 'comment.content.richContent.nodes.audioData.audio.duration',
1253
+ },
1254
+ {
1255
+ path: 'comment.content.richContent.nodes.audioData.coverImage.duration',
1256
+ },
1257
+ {
1258
+ path: 'comment.draftContent.richContent.nodes.galleryData.items.image.media.duration',
1259
+ },
1260
+ {
1261
+ path: 'comment.draftContent.richContent.nodes.galleryData.items.video.media.duration',
1262
+ },
1263
+ {
1264
+ path: 'comment.draftContent.richContent.nodes.galleryData.items.video.thumbnail.duration',
1265
+ },
1266
+ {
1267
+ path: 'comment.draftContent.richContent.nodes.galleryData.options.item.ratio',
1268
+ },
1269
+ {
1270
+ path: 'comment.draftContent.richContent.nodes.imageData.image.duration',
1271
+ },
1272
+ {
1273
+ path: 'comment.draftContent.richContent.nodes.mapData.mapSettings.lat',
1274
+ },
1275
+ {
1276
+ path: 'comment.draftContent.richContent.nodes.mapData.mapSettings.lng',
1277
+ },
1278
+ {
1279
+ path: 'comment.draftContent.richContent.nodes.pollData.poll.image.duration',
1280
+ },
1281
+ {
1282
+ path: 'comment.draftContent.richContent.nodes.pollData.poll.options.image.duration',
1283
+ },
1284
+ {
1285
+ path: 'comment.draftContent.richContent.nodes.pollData.design.poll.background.image.duration',
1286
+ },
1287
+ {
1288
+ path: 'comment.draftContent.richContent.nodes.appEmbedData.image.duration',
1289
+ },
1290
+ {
1291
+ path: 'comment.draftContent.richContent.nodes.videoData.video.duration',
1292
+ },
1293
+ {
1294
+ path: 'comment.draftContent.richContent.nodes.videoData.thumbnail.duration',
1295
+ },
1296
+ {
1297
+ path: 'comment.draftContent.richContent.nodes.audioData.audio.duration',
1298
+ },
1299
+ {
1300
+ path: 'comment.draftContent.richContent.nodes.audioData.coverImage.duration',
1301
+ },
1302
+ ],
1303
+ },
1304
+ ]),
1305
+ };
1306
+ return metadata;
1307
+ }
1308
+ return __markComment;
1309
+ }
1310
+ /** Sets `marked` to `FALSE` to unmark a comment. */
1311
+ export function unmarkComment(payload) {
1312
+ function __unmarkComment({ host }) {
1313
+ const metadata = {
1314
+ entityFqdn: 'wix.comments.v2.comment',
1315
+ method: 'PUT',
1316
+ methodFqn: 'wix.comments.ng.v1.CommentsNg.UnmarkComment',
1317
+ packageName: PACKAGE_NAME,
1318
+ url: resolveWixCommentsNgV1CommentsNgUrl({
1319
+ protoPath: '/v1/comments/{commentId}/unmark',
1320
+ data: payload,
1321
+ host,
1322
+ }),
1323
+ data: payload,
1324
+ transformResponse: (payload) => transformPaths(payload, [
1325
+ {
1326
+ transformFn: transformRESTTimestampToSDKTimestamp,
1327
+ paths: [
1328
+ { path: 'comment.createdDate' },
1329
+ { path: 'comment.updatedDate' },
1330
+ { path: 'comment.commentDate' },
1331
+ { path: 'comment.content.commentDate' },
1332
+ { path: 'comment.content.richContent.metadata.createdTimestamp' },
1333
+ { path: 'comment.content.richContent.metadata.updatedTimestamp' },
1334
+ { path: 'comment.content.attachments.image.urlExpirationDate' },
1335
+ { path: 'comment.content.attachments.video.urlExpirationDate' },
1336
+ {
1337
+ path: 'comment.content.attachments.video.posters.urlExpirationDate',
1338
+ },
1339
+ { path: 'comment.content.attachments.audio.urlExpirationDate' },
1340
+ {
1341
+ path: 'comment.content.attachments.document.urlExpirationDate',
1342
+ },
1343
+ { path: 'comment.draftContent.commentDate' },
1344
+ {
1345
+ path: 'comment.draftContent.richContent.metadata.createdTimestamp',
1346
+ },
1347
+ {
1348
+ path: 'comment.draftContent.richContent.metadata.updatedTimestamp',
1349
+ },
1350
+ {
1351
+ path: 'comment.draftContent.attachments.image.urlExpirationDate',
1352
+ },
1353
+ {
1354
+ path: 'comment.draftContent.attachments.video.urlExpirationDate',
1355
+ },
1356
+ {
1357
+ path: 'comment.draftContent.attachments.video.posters.urlExpirationDate',
1358
+ },
1359
+ {
1360
+ path: 'comment.draftContent.attachments.audio.urlExpirationDate',
1361
+ },
1362
+ {
1363
+ path: 'comment.draftContent.attachments.document.urlExpirationDate',
1364
+ },
1365
+ ],
1366
+ },
1367
+ {
1368
+ transformFn: transformRESTFloatToSDKFloat,
1369
+ paths: [
1370
+ {
1371
+ path: 'comment.content.richContent.nodes.galleryData.items.image.media.duration',
1372
+ },
1373
+ {
1374
+ path: 'comment.content.richContent.nodes.galleryData.items.video.media.duration',
1375
+ },
1376
+ {
1377
+ path: 'comment.content.richContent.nodes.galleryData.items.video.thumbnail.duration',
1378
+ },
1379
+ {
1380
+ path: 'comment.content.richContent.nodes.galleryData.options.item.ratio',
1381
+ },
1382
+ {
1383
+ path: 'comment.content.richContent.nodes.imageData.image.duration',
1384
+ },
1385
+ {
1386
+ path: 'comment.content.richContent.nodes.mapData.mapSettings.lat',
1387
+ },
1388
+ {
1389
+ path: 'comment.content.richContent.nodes.mapData.mapSettings.lng',
1390
+ },
1391
+ {
1392
+ path: 'comment.content.richContent.nodes.pollData.poll.image.duration',
1393
+ },
1394
+ {
1395
+ path: 'comment.content.richContent.nodes.pollData.poll.options.image.duration',
1396
+ },
1397
+ {
1398
+ path: 'comment.content.richContent.nodes.pollData.design.poll.background.image.duration',
1399
+ },
1400
+ {
1401
+ path: 'comment.content.richContent.nodes.appEmbedData.image.duration',
1402
+ },
1403
+ {
1404
+ path: 'comment.content.richContent.nodes.videoData.video.duration',
1405
+ },
1406
+ {
1407
+ path: 'comment.content.richContent.nodes.videoData.thumbnail.duration',
1408
+ },
1409
+ {
1410
+ path: 'comment.content.richContent.nodes.audioData.audio.duration',
1411
+ },
1412
+ {
1413
+ path: 'comment.content.richContent.nodes.audioData.coverImage.duration',
1414
+ },
1415
+ {
1416
+ path: 'comment.draftContent.richContent.nodes.galleryData.items.image.media.duration',
1417
+ },
1418
+ {
1419
+ path: 'comment.draftContent.richContent.nodes.galleryData.items.video.media.duration',
1420
+ },
1421
+ {
1422
+ path: 'comment.draftContent.richContent.nodes.galleryData.items.video.thumbnail.duration',
1423
+ },
1424
+ {
1425
+ path: 'comment.draftContent.richContent.nodes.galleryData.options.item.ratio',
1426
+ },
1427
+ {
1428
+ path: 'comment.draftContent.richContent.nodes.imageData.image.duration',
1429
+ },
1430
+ {
1431
+ path: 'comment.draftContent.richContent.nodes.mapData.mapSettings.lat',
1432
+ },
1433
+ {
1434
+ path: 'comment.draftContent.richContent.nodes.mapData.mapSettings.lng',
1435
+ },
1436
+ {
1437
+ path: 'comment.draftContent.richContent.nodes.pollData.poll.image.duration',
1438
+ },
1439
+ {
1440
+ path: 'comment.draftContent.richContent.nodes.pollData.poll.options.image.duration',
1441
+ },
1442
+ {
1443
+ path: 'comment.draftContent.richContent.nodes.pollData.design.poll.background.image.duration',
1444
+ },
1445
+ {
1446
+ path: 'comment.draftContent.richContent.nodes.appEmbedData.image.duration',
1447
+ },
1448
+ {
1449
+ path: 'comment.draftContent.richContent.nodes.videoData.video.duration',
1450
+ },
1451
+ {
1452
+ path: 'comment.draftContent.richContent.nodes.videoData.thumbnail.duration',
1453
+ },
1454
+ {
1455
+ path: 'comment.draftContent.richContent.nodes.audioData.audio.duration',
1456
+ },
1457
+ {
1458
+ path: 'comment.draftContent.richContent.nodes.audioData.coverImage.duration',
1459
+ },
1460
+ ],
1461
+ },
1462
+ ]),
1463
+ };
1464
+ return metadata;
1465
+ }
1466
+ return __unmarkComment;
1467
+ }
1468
+ /** Hides a comment in a widget. The comment status becomes `HIDDEN`. */
1469
+ export function hideComment(payload) {
1470
+ function __hideComment({ host }) {
1471
+ const metadata = {
1472
+ entityFqdn: 'wix.comments.v2.comment',
1473
+ method: 'PUT',
1474
+ methodFqn: 'wix.comments.ng.v1.CommentsNg.HideComment',
1475
+ packageName: PACKAGE_NAME,
1476
+ url: resolveWixCommentsNgV1CommentsNgUrl({
1477
+ protoPath: '/v1/comments/{commentId}/hide',
1478
+ data: payload,
1479
+ host,
1480
+ }),
1481
+ data: payload,
1482
+ transformResponse: (payload) => transformPaths(payload, [
1483
+ {
1484
+ transformFn: transformRESTTimestampToSDKTimestamp,
1485
+ paths: [
1486
+ { path: 'comment.createdDate' },
1487
+ { path: 'comment.updatedDate' },
1488
+ { path: 'comment.commentDate' },
1489
+ { path: 'comment.content.commentDate' },
1490
+ { path: 'comment.content.richContent.metadata.createdTimestamp' },
1491
+ { path: 'comment.content.richContent.metadata.updatedTimestamp' },
1492
+ { path: 'comment.content.attachments.image.urlExpirationDate' },
1493
+ { path: 'comment.content.attachments.video.urlExpirationDate' },
1494
+ {
1495
+ path: 'comment.content.attachments.video.posters.urlExpirationDate',
1496
+ },
1497
+ { path: 'comment.content.attachments.audio.urlExpirationDate' },
1498
+ {
1499
+ path: 'comment.content.attachments.document.urlExpirationDate',
1500
+ },
1501
+ { path: 'comment.draftContent.commentDate' },
1502
+ {
1503
+ path: 'comment.draftContent.richContent.metadata.createdTimestamp',
1504
+ },
1505
+ {
1506
+ path: 'comment.draftContent.richContent.metadata.updatedTimestamp',
1507
+ },
1508
+ {
1509
+ path: 'comment.draftContent.attachments.image.urlExpirationDate',
1510
+ },
1511
+ {
1512
+ path: 'comment.draftContent.attachments.video.urlExpirationDate',
1513
+ },
1514
+ {
1515
+ path: 'comment.draftContent.attachments.video.posters.urlExpirationDate',
1516
+ },
1517
+ {
1518
+ path: 'comment.draftContent.attachments.audio.urlExpirationDate',
1519
+ },
1520
+ {
1521
+ path: 'comment.draftContent.attachments.document.urlExpirationDate',
1522
+ },
1523
+ ],
1524
+ },
1525
+ {
1526
+ transformFn: transformRESTFloatToSDKFloat,
1527
+ paths: [
1528
+ {
1529
+ path: 'comment.content.richContent.nodes.galleryData.items.image.media.duration',
1530
+ },
1531
+ {
1532
+ path: 'comment.content.richContent.nodes.galleryData.items.video.media.duration',
1533
+ },
1534
+ {
1535
+ path: 'comment.content.richContent.nodes.galleryData.items.video.thumbnail.duration',
1536
+ },
1537
+ {
1538
+ path: 'comment.content.richContent.nodes.galleryData.options.item.ratio',
1539
+ },
1540
+ {
1541
+ path: 'comment.content.richContent.nodes.imageData.image.duration',
1542
+ },
1543
+ {
1544
+ path: 'comment.content.richContent.nodes.mapData.mapSettings.lat',
1545
+ },
1546
+ {
1547
+ path: 'comment.content.richContent.nodes.mapData.mapSettings.lng',
1548
+ },
1549
+ {
1550
+ path: 'comment.content.richContent.nodes.pollData.poll.image.duration',
1551
+ },
1552
+ {
1553
+ path: 'comment.content.richContent.nodes.pollData.poll.options.image.duration',
1554
+ },
1555
+ {
1556
+ path: 'comment.content.richContent.nodes.pollData.design.poll.background.image.duration',
1557
+ },
1558
+ {
1559
+ path: 'comment.content.richContent.nodes.appEmbedData.image.duration',
1560
+ },
1561
+ {
1562
+ path: 'comment.content.richContent.nodes.videoData.video.duration',
1563
+ },
1564
+ {
1565
+ path: 'comment.content.richContent.nodes.videoData.thumbnail.duration',
1566
+ },
1567
+ {
1568
+ path: 'comment.content.richContent.nodes.audioData.audio.duration',
1569
+ },
1570
+ {
1571
+ path: 'comment.content.richContent.nodes.audioData.coverImage.duration',
1572
+ },
1573
+ {
1574
+ path: 'comment.draftContent.richContent.nodes.galleryData.items.image.media.duration',
1575
+ },
1576
+ {
1577
+ path: 'comment.draftContent.richContent.nodes.galleryData.items.video.media.duration',
1578
+ },
1579
+ {
1580
+ path: 'comment.draftContent.richContent.nodes.galleryData.items.video.thumbnail.duration',
1581
+ },
1582
+ {
1583
+ path: 'comment.draftContent.richContent.nodes.galleryData.options.item.ratio',
1584
+ },
1585
+ {
1586
+ path: 'comment.draftContent.richContent.nodes.imageData.image.duration',
1587
+ },
1588
+ {
1589
+ path: 'comment.draftContent.richContent.nodes.mapData.mapSettings.lat',
1590
+ },
1591
+ {
1592
+ path: 'comment.draftContent.richContent.nodes.mapData.mapSettings.lng',
1593
+ },
1594
+ {
1595
+ path: 'comment.draftContent.richContent.nodes.pollData.poll.image.duration',
1596
+ },
1597
+ {
1598
+ path: 'comment.draftContent.richContent.nodes.pollData.poll.options.image.duration',
1599
+ },
1600
+ {
1601
+ path: 'comment.draftContent.richContent.nodes.pollData.design.poll.background.image.duration',
1602
+ },
1603
+ {
1604
+ path: 'comment.draftContent.richContent.nodes.appEmbedData.image.duration',
1605
+ },
1606
+ {
1607
+ path: 'comment.draftContent.richContent.nodes.videoData.video.duration',
1608
+ },
1609
+ {
1610
+ path: 'comment.draftContent.richContent.nodes.videoData.thumbnail.duration',
1611
+ },
1612
+ {
1613
+ path: 'comment.draftContent.richContent.nodes.audioData.audio.duration',
1614
+ },
1615
+ {
1616
+ path: 'comment.draftContent.richContent.nodes.audioData.coverImage.duration',
1617
+ },
1618
+ ],
1619
+ },
1620
+ ]),
1621
+ };
1622
+ return metadata;
1623
+ }
1624
+ return __hideComment;
1625
+ }
1626
+ /**
1627
+ * Publishes a comment with the `HIDDEN` status. The comment status becomes `PUBLISHED`.
1628
+ *
1629
+ * To publish a new comment, call Create Comment.
1630
+ */
1631
+ export function publishComment(payload) {
1632
+ function __publishComment({ host }) {
1633
+ const metadata = {
1634
+ entityFqdn: 'wix.comments.v2.comment',
1635
+ method: 'PUT',
1636
+ methodFqn: 'wix.comments.ng.v1.CommentsNg.PublishComment',
1637
+ packageName: PACKAGE_NAME,
1638
+ url: resolveWixCommentsNgV1CommentsNgUrl({
1639
+ protoPath: '/v1/comments/{commentId}/publish',
1640
+ data: payload,
1641
+ host,
1642
+ }),
1643
+ data: payload,
1644
+ transformResponse: (payload) => transformPaths(payload, [
1645
+ {
1646
+ transformFn: transformRESTTimestampToSDKTimestamp,
1647
+ paths: [
1648
+ { path: 'comment.createdDate' },
1649
+ { path: 'comment.updatedDate' },
1650
+ { path: 'comment.commentDate' },
1651
+ { path: 'comment.content.commentDate' },
1652
+ { path: 'comment.content.richContent.metadata.createdTimestamp' },
1653
+ { path: 'comment.content.richContent.metadata.updatedTimestamp' },
1654
+ { path: 'comment.content.attachments.image.urlExpirationDate' },
1655
+ { path: 'comment.content.attachments.video.urlExpirationDate' },
1656
+ {
1657
+ path: 'comment.content.attachments.video.posters.urlExpirationDate',
1658
+ },
1659
+ { path: 'comment.content.attachments.audio.urlExpirationDate' },
1660
+ {
1661
+ path: 'comment.content.attachments.document.urlExpirationDate',
1662
+ },
1663
+ { path: 'comment.draftContent.commentDate' },
1664
+ {
1665
+ path: 'comment.draftContent.richContent.metadata.createdTimestamp',
1666
+ },
1667
+ {
1668
+ path: 'comment.draftContent.richContent.metadata.updatedTimestamp',
1669
+ },
1670
+ {
1671
+ path: 'comment.draftContent.attachments.image.urlExpirationDate',
1672
+ },
1673
+ {
1674
+ path: 'comment.draftContent.attachments.video.urlExpirationDate',
1675
+ },
1676
+ {
1677
+ path: 'comment.draftContent.attachments.video.posters.urlExpirationDate',
1678
+ },
1679
+ {
1680
+ path: 'comment.draftContent.attachments.audio.urlExpirationDate',
1681
+ },
1682
+ {
1683
+ path: 'comment.draftContent.attachments.document.urlExpirationDate',
1684
+ },
1685
+ ],
1686
+ },
1687
+ {
1688
+ transformFn: transformRESTFloatToSDKFloat,
1689
+ paths: [
1690
+ {
1691
+ path: 'comment.content.richContent.nodes.galleryData.items.image.media.duration',
1692
+ },
1693
+ {
1694
+ path: 'comment.content.richContent.nodes.galleryData.items.video.media.duration',
1695
+ },
1696
+ {
1697
+ path: 'comment.content.richContent.nodes.galleryData.items.video.thumbnail.duration',
1698
+ },
1699
+ {
1700
+ path: 'comment.content.richContent.nodes.galleryData.options.item.ratio',
1701
+ },
1702
+ {
1703
+ path: 'comment.content.richContent.nodes.imageData.image.duration',
1704
+ },
1705
+ {
1706
+ path: 'comment.content.richContent.nodes.mapData.mapSettings.lat',
1707
+ },
1708
+ {
1709
+ path: 'comment.content.richContent.nodes.mapData.mapSettings.lng',
1710
+ },
1711
+ {
1712
+ path: 'comment.content.richContent.nodes.pollData.poll.image.duration',
1713
+ },
1714
+ {
1715
+ path: 'comment.content.richContent.nodes.pollData.poll.options.image.duration',
1716
+ },
1717
+ {
1718
+ path: 'comment.content.richContent.nodes.pollData.design.poll.background.image.duration',
1719
+ },
1720
+ {
1721
+ path: 'comment.content.richContent.nodes.appEmbedData.image.duration',
1722
+ },
1723
+ {
1724
+ path: 'comment.content.richContent.nodes.videoData.video.duration',
1725
+ },
1726
+ {
1727
+ path: 'comment.content.richContent.nodes.videoData.thumbnail.duration',
1728
+ },
1729
+ {
1730
+ path: 'comment.content.richContent.nodes.audioData.audio.duration',
1731
+ },
1732
+ {
1733
+ path: 'comment.content.richContent.nodes.audioData.coverImage.duration',
1734
+ },
1735
+ {
1736
+ path: 'comment.draftContent.richContent.nodes.galleryData.items.image.media.duration',
1737
+ },
1738
+ {
1739
+ path: 'comment.draftContent.richContent.nodes.galleryData.items.video.media.duration',
1740
+ },
1741
+ {
1742
+ path: 'comment.draftContent.richContent.nodes.galleryData.items.video.thumbnail.duration',
1743
+ },
1744
+ {
1745
+ path: 'comment.draftContent.richContent.nodes.galleryData.options.item.ratio',
1746
+ },
1747
+ {
1748
+ path: 'comment.draftContent.richContent.nodes.imageData.image.duration',
1749
+ },
1750
+ {
1751
+ path: 'comment.draftContent.richContent.nodes.mapData.mapSettings.lat',
1752
+ },
1753
+ {
1754
+ path: 'comment.draftContent.richContent.nodes.mapData.mapSettings.lng',
1755
+ },
1756
+ {
1757
+ path: 'comment.draftContent.richContent.nodes.pollData.poll.image.duration',
1758
+ },
1759
+ {
1760
+ path: 'comment.draftContent.richContent.nodes.pollData.poll.options.image.duration',
1761
+ },
1762
+ {
1763
+ path: 'comment.draftContent.richContent.nodes.pollData.design.poll.background.image.duration',
1764
+ },
1765
+ {
1766
+ path: 'comment.draftContent.richContent.nodes.appEmbedData.image.duration',
1767
+ },
1768
+ {
1769
+ path: 'comment.draftContent.richContent.nodes.videoData.video.duration',
1770
+ },
1771
+ {
1772
+ path: 'comment.draftContent.richContent.nodes.videoData.thumbnail.duration',
1773
+ },
1774
+ {
1775
+ path: 'comment.draftContent.richContent.nodes.audioData.audio.duration',
1776
+ },
1777
+ {
1778
+ path: 'comment.draftContent.richContent.nodes.audioData.coverImage.duration',
1779
+ },
1780
+ ],
1781
+ },
1782
+ ]),
1783
+ };
1784
+ return metadata;
1785
+ }
1786
+ return __publishComment;
1787
+ }
1788
+ /** Counts comments, given the specified filtering. Comments with the `HIDDEN` status are not included in the response. */
1789
+ export function countComments(payload) {
1790
+ function __countComments({ host }) {
1791
+ const metadata = {
1792
+ entityFqdn: 'wix.comments.v2.comment',
1793
+ method: 'POST',
1794
+ methodFqn: 'wix.comments.ng.v1.CommentsNg.CountComments',
1795
+ packageName: PACKAGE_NAME,
1796
+ url: resolveWixCommentsNgV1CommentsNgUrl({
1797
+ protoPath: '/v1/comments/count',
1798
+ data: payload,
1799
+ host,
1800
+ }),
1801
+ data: payload,
1802
+ };
1803
+ return metadata;
1804
+ }
1805
+ return __countComments;
1806
+ }
1807
+ /** Lists published comments and replies from a specified resource, such as a blog post. */
1808
+ export function listCommentsByResource(payload) {
1809
+ function __listCommentsByResource({ host }) {
1810
+ const metadata = {
1811
+ entityFqdn: 'wix.comments.v2.comment',
1812
+ method: 'GET',
1813
+ methodFqn: 'wix.comments.ng.v1.CommentsNg.ListCommentsByResource',
1814
+ packageName: PACKAGE_NAME,
1815
+ url: resolveWixCommentsNgV1CommentsNgUrl({
1816
+ protoPath: '/v1/comments/list-by-resource',
1817
+ data: payload,
1818
+ host,
1819
+ }),
1820
+ params: toURLSearchParams(payload),
1821
+ transformResponse: (payload) => transformPaths(payload, [
1822
+ {
1823
+ transformFn: transformRESTTimestampToSDKTimestamp,
1824
+ paths: [
1825
+ { path: 'comments.createdDate' },
1826
+ { path: 'comments.updatedDate' },
1827
+ { path: 'comments.commentDate' },
1828
+ { path: 'comments.content.commentDate' },
1829
+ {
1830
+ path: 'comments.content.richContent.metadata.createdTimestamp',
1831
+ },
1832
+ {
1833
+ path: 'comments.content.richContent.metadata.updatedTimestamp',
1834
+ },
1835
+ { path: 'comments.content.attachments.image.urlExpirationDate' },
1836
+ { path: 'comments.content.attachments.video.urlExpirationDate' },
1837
+ {
1838
+ path: 'comments.content.attachments.video.posters.urlExpirationDate',
1839
+ },
1840
+ { path: 'comments.content.attachments.audio.urlExpirationDate' },
1841
+ {
1842
+ path: 'comments.content.attachments.document.urlExpirationDate',
1843
+ },
1844
+ { path: 'comments.draftContent.commentDate' },
1845
+ {
1846
+ path: 'comments.draftContent.richContent.metadata.createdTimestamp',
1847
+ },
1848
+ {
1849
+ path: 'comments.draftContent.richContent.metadata.updatedTimestamp',
1850
+ },
1851
+ {
1852
+ path: 'comments.draftContent.attachments.image.urlExpirationDate',
1853
+ },
1854
+ {
1855
+ path: 'comments.draftContent.attachments.video.urlExpirationDate',
1856
+ },
1857
+ {
1858
+ path: 'comments.draftContent.attachments.video.posters.urlExpirationDate',
1859
+ },
1860
+ {
1861
+ path: 'comments.draftContent.attachments.audio.urlExpirationDate',
1862
+ },
1863
+ {
1864
+ path: 'comments.draftContent.attachments.document.urlExpirationDate',
1865
+ },
1866
+ { path: 'commentReplies.replies.createdDate' },
1867
+ { path: 'commentReplies.replies.updatedDate' },
1868
+ { path: 'commentReplies.replies.commentDate' },
1869
+ { path: 'commentReplies.replies.content.commentDate' },
1870
+ {
1871
+ path: 'commentReplies.replies.content.richContent.metadata.createdTimestamp',
1872
+ },
1873
+ {
1874
+ path: 'commentReplies.replies.content.richContent.metadata.updatedTimestamp',
1875
+ },
1876
+ {
1877
+ path: 'commentReplies.replies.content.attachments.image.urlExpirationDate',
1878
+ },
1879
+ {
1880
+ path: 'commentReplies.replies.content.attachments.video.urlExpirationDate',
1881
+ },
1882
+ {
1883
+ path: 'commentReplies.replies.content.attachments.video.posters.urlExpirationDate',
1884
+ },
1885
+ {
1886
+ path: 'commentReplies.replies.content.attachments.audio.urlExpirationDate',
1887
+ },
1888
+ {
1889
+ path: 'commentReplies.replies.content.attachments.document.urlExpirationDate',
1890
+ },
1891
+ { path: 'commentReplies.replies.draftContent.commentDate' },
1892
+ {
1893
+ path: 'commentReplies.replies.draftContent.richContent.metadata.createdTimestamp',
1894
+ },
1895
+ {
1896
+ path: 'commentReplies.replies.draftContent.richContent.metadata.updatedTimestamp',
1897
+ },
1898
+ {
1899
+ path: 'commentReplies.replies.draftContent.attachments.image.urlExpirationDate',
1900
+ },
1901
+ {
1902
+ path: 'commentReplies.replies.draftContent.attachments.video.urlExpirationDate',
1903
+ },
1904
+ {
1905
+ path: 'commentReplies.replies.draftContent.attachments.video.posters.urlExpirationDate',
1906
+ },
1907
+ {
1908
+ path: 'commentReplies.replies.draftContent.attachments.audio.urlExpirationDate',
1909
+ },
1910
+ {
1911
+ path: 'commentReplies.replies.draftContent.attachments.document.urlExpirationDate',
1912
+ },
1913
+ ],
1914
+ },
1915
+ {
1916
+ transformFn: transformRESTFloatToSDKFloat,
1917
+ paths: [
1918
+ {
1919
+ path: 'comments.content.richContent.nodes.galleryData.items.image.media.duration',
1920
+ },
1921
+ {
1922
+ path: 'comments.content.richContent.nodes.galleryData.items.video.media.duration',
1923
+ },
1924
+ {
1925
+ path: 'comments.content.richContent.nodes.galleryData.items.video.thumbnail.duration',
1926
+ },
1927
+ {
1928
+ path: 'comments.content.richContent.nodes.galleryData.options.item.ratio',
1929
+ },
1930
+ {
1931
+ path: 'comments.content.richContent.nodes.imageData.image.duration',
1932
+ },
1933
+ {
1934
+ path: 'comments.content.richContent.nodes.mapData.mapSettings.lat',
1935
+ },
1936
+ {
1937
+ path: 'comments.content.richContent.nodes.mapData.mapSettings.lng',
1938
+ },
1939
+ {
1940
+ path: 'comments.content.richContent.nodes.pollData.poll.image.duration',
1941
+ },
1942
+ {
1943
+ path: 'comments.content.richContent.nodes.pollData.poll.options.image.duration',
1944
+ },
1945
+ {
1946
+ path: 'comments.content.richContent.nodes.pollData.design.poll.background.image.duration',
1947
+ },
1948
+ {
1949
+ path: 'comments.content.richContent.nodes.appEmbedData.image.duration',
1950
+ },
1951
+ {
1952
+ path: 'comments.content.richContent.nodes.videoData.video.duration',
1953
+ },
1954
+ {
1955
+ path: 'comments.content.richContent.nodes.videoData.thumbnail.duration',
1956
+ },
1957
+ {
1958
+ path: 'comments.content.richContent.nodes.audioData.audio.duration',
1959
+ },
1960
+ {
1961
+ path: 'comments.content.richContent.nodes.audioData.coverImage.duration',
1962
+ },
1963
+ {
1964
+ path: 'comments.draftContent.richContent.nodes.galleryData.items.image.media.duration',
1965
+ },
1966
+ {
1967
+ path: 'comments.draftContent.richContent.nodes.galleryData.items.video.media.duration',
1968
+ },
1969
+ {
1970
+ path: 'comments.draftContent.richContent.nodes.galleryData.items.video.thumbnail.duration',
1971
+ },
1972
+ {
1973
+ path: 'comments.draftContent.richContent.nodes.galleryData.options.item.ratio',
1974
+ },
1975
+ {
1976
+ path: 'comments.draftContent.richContent.nodes.imageData.image.duration',
1977
+ },
1978
+ {
1979
+ path: 'comments.draftContent.richContent.nodes.mapData.mapSettings.lat',
1980
+ },
1981
+ {
1982
+ path: 'comments.draftContent.richContent.nodes.mapData.mapSettings.lng',
1983
+ },
1984
+ {
1985
+ path: 'comments.draftContent.richContent.nodes.pollData.poll.image.duration',
1986
+ },
1987
+ {
1988
+ path: 'comments.draftContent.richContent.nodes.pollData.poll.options.image.duration',
1989
+ },
1990
+ {
1991
+ path: 'comments.draftContent.richContent.nodes.pollData.design.poll.background.image.duration',
1992
+ },
1993
+ {
1994
+ path: 'comments.draftContent.richContent.nodes.appEmbedData.image.duration',
1995
+ },
1996
+ {
1997
+ path: 'comments.draftContent.richContent.nodes.videoData.video.duration',
1998
+ },
1999
+ {
2000
+ path: 'comments.draftContent.richContent.nodes.videoData.thumbnail.duration',
2001
+ },
2002
+ {
2003
+ path: 'comments.draftContent.richContent.nodes.audioData.audio.duration',
2004
+ },
2005
+ {
2006
+ path: 'comments.draftContent.richContent.nodes.audioData.coverImage.duration',
2007
+ },
2008
+ {
2009
+ path: 'commentReplies.replies.content.richContent.nodes.galleryData.items.image.media.duration',
2010
+ },
2011
+ {
2012
+ path: 'commentReplies.replies.content.richContent.nodes.galleryData.items.video.media.duration',
2013
+ },
2014
+ {
2015
+ path: 'commentReplies.replies.content.richContent.nodes.galleryData.items.video.thumbnail.duration',
2016
+ },
2017
+ {
2018
+ path: 'commentReplies.replies.content.richContent.nodes.galleryData.options.item.ratio',
2019
+ },
2020
+ {
2021
+ path: 'commentReplies.replies.content.richContent.nodes.imageData.image.duration',
2022
+ },
2023
+ {
2024
+ path: 'commentReplies.replies.content.richContent.nodes.mapData.mapSettings.lat',
2025
+ },
2026
+ {
2027
+ path: 'commentReplies.replies.content.richContent.nodes.mapData.mapSettings.lng',
2028
+ },
2029
+ {
2030
+ path: 'commentReplies.replies.content.richContent.nodes.pollData.poll.image.duration',
2031
+ },
2032
+ {
2033
+ path: 'commentReplies.replies.content.richContent.nodes.pollData.poll.options.image.duration',
2034
+ },
2035
+ {
2036
+ path: 'commentReplies.replies.content.richContent.nodes.pollData.design.poll.background.image.duration',
2037
+ },
2038
+ {
2039
+ path: 'commentReplies.replies.content.richContent.nodes.appEmbedData.image.duration',
2040
+ },
2041
+ {
2042
+ path: 'commentReplies.replies.content.richContent.nodes.videoData.video.duration',
2043
+ },
2044
+ {
2045
+ path: 'commentReplies.replies.content.richContent.nodes.videoData.thumbnail.duration',
2046
+ },
2047
+ {
2048
+ path: 'commentReplies.replies.content.richContent.nodes.audioData.audio.duration',
2049
+ },
2050
+ {
2051
+ path: 'commentReplies.replies.content.richContent.nodes.audioData.coverImage.duration',
2052
+ },
2053
+ {
2054
+ path: 'commentReplies.replies.draftContent.richContent.nodes.galleryData.items.image.media.duration',
2055
+ },
2056
+ {
2057
+ path: 'commentReplies.replies.draftContent.richContent.nodes.galleryData.items.video.media.duration',
2058
+ },
2059
+ {
2060
+ path: 'commentReplies.replies.draftContent.richContent.nodes.galleryData.items.video.thumbnail.duration',
2061
+ },
2062
+ {
2063
+ path: 'commentReplies.replies.draftContent.richContent.nodes.galleryData.options.item.ratio',
2064
+ },
2065
+ {
2066
+ path: 'commentReplies.replies.draftContent.richContent.nodes.imageData.image.duration',
2067
+ },
2068
+ {
2069
+ path: 'commentReplies.replies.draftContent.richContent.nodes.mapData.mapSettings.lat',
2070
+ },
2071
+ {
2072
+ path: 'commentReplies.replies.draftContent.richContent.nodes.mapData.mapSettings.lng',
2073
+ },
2074
+ {
2075
+ path: 'commentReplies.replies.draftContent.richContent.nodes.pollData.poll.image.duration',
2076
+ },
2077
+ {
2078
+ path: 'commentReplies.replies.draftContent.richContent.nodes.pollData.poll.options.image.duration',
2079
+ },
2080
+ {
2081
+ path: 'commentReplies.replies.draftContent.richContent.nodes.pollData.design.poll.background.image.duration',
2082
+ },
2083
+ {
2084
+ path: 'commentReplies.replies.draftContent.richContent.nodes.appEmbedData.image.duration',
2085
+ },
2086
+ {
2087
+ path: 'commentReplies.replies.draftContent.richContent.nodes.videoData.video.duration',
2088
+ },
2089
+ {
2090
+ path: 'commentReplies.replies.draftContent.richContent.nodes.videoData.thumbnail.duration',
2091
+ },
2092
+ {
2093
+ path: 'commentReplies.replies.draftContent.richContent.nodes.audioData.audio.duration',
2094
+ },
2095
+ {
2096
+ path: 'commentReplies.replies.draftContent.richContent.nodes.audioData.coverImage.duration',
2097
+ },
2098
+ ],
2099
+ },
2100
+ ]),
2101
+ };
2102
+ return metadata;
2103
+ }
2104
+ return __listCommentsByResource;
2105
+ }
2106
+ /**
2107
+ * Returns a thread of a comment or a reply.
2108
+ *
2109
+ * If you request a comment thread, the method returns a single comment with cursors. With cursors (`pagingMetadata.cursors.next` or `pagingMetadata.cursors.prev`) you can load replies by calling the List Comments by Resource method.
2110
+ *
2111
+ * If you request a reply thread, the method returns a reply with its parent comment. With cursors (`pagingMetadata.cursors.next` or `pagingMetadata.cursors.prev`) you can load replies by calling the List Comments by Resource method.
2112
+ */
2113
+ export function getCommentThread(payload) {
2114
+ function __getCommentThread({ host }) {
2115
+ const metadata = {
2116
+ entityFqdn: 'wix.comments.v2.comment',
2117
+ method: 'GET',
2118
+ methodFqn: 'wix.comments.ng.v1.CommentsNg.GetCommentThread',
2119
+ packageName: PACKAGE_NAME,
2120
+ url: resolveWixCommentsNgV1CommentsNgUrl({
2121
+ protoPath: '/v1/comments/{commentId}/thread',
2122
+ data: payload,
2123
+ host,
2124
+ }),
2125
+ params: toURLSearchParams(payload),
2126
+ transformResponse: (payload) => transformPaths(payload, [
2127
+ {
2128
+ transformFn: transformRESTTimestampToSDKTimestamp,
2129
+ paths: [
2130
+ { path: 'comments.createdDate' },
2131
+ { path: 'comments.updatedDate' },
2132
+ { path: 'comments.commentDate' },
2133
+ { path: 'comments.content.commentDate' },
2134
+ {
2135
+ path: 'comments.content.richContent.metadata.createdTimestamp',
2136
+ },
2137
+ {
2138
+ path: 'comments.content.richContent.metadata.updatedTimestamp',
2139
+ },
2140
+ { path: 'comments.content.attachments.image.urlExpirationDate' },
2141
+ { path: 'comments.content.attachments.video.urlExpirationDate' },
2142
+ {
2143
+ path: 'comments.content.attachments.video.posters.urlExpirationDate',
2144
+ },
2145
+ { path: 'comments.content.attachments.audio.urlExpirationDate' },
2146
+ {
2147
+ path: 'comments.content.attachments.document.urlExpirationDate',
2148
+ },
2149
+ { path: 'comments.draftContent.commentDate' },
2150
+ {
2151
+ path: 'comments.draftContent.richContent.metadata.createdTimestamp',
2152
+ },
2153
+ {
2154
+ path: 'comments.draftContent.richContent.metadata.updatedTimestamp',
2155
+ },
2156
+ {
2157
+ path: 'comments.draftContent.attachments.image.urlExpirationDate',
2158
+ },
2159
+ {
2160
+ path: 'comments.draftContent.attachments.video.urlExpirationDate',
2161
+ },
2162
+ {
2163
+ path: 'comments.draftContent.attachments.video.posters.urlExpirationDate',
2164
+ },
2165
+ {
2166
+ path: 'comments.draftContent.attachments.audio.urlExpirationDate',
2167
+ },
2168
+ {
2169
+ path: 'comments.draftContent.attachments.document.urlExpirationDate',
2170
+ },
2171
+ { path: 'commentReplies.replies.createdDate' },
2172
+ { path: 'commentReplies.replies.updatedDate' },
2173
+ { path: 'commentReplies.replies.commentDate' },
2174
+ { path: 'commentReplies.replies.content.commentDate' },
2175
+ {
2176
+ path: 'commentReplies.replies.content.richContent.metadata.createdTimestamp',
2177
+ },
2178
+ {
2179
+ path: 'commentReplies.replies.content.richContent.metadata.updatedTimestamp',
2180
+ },
2181
+ {
2182
+ path: 'commentReplies.replies.content.attachments.image.urlExpirationDate',
2183
+ },
2184
+ {
2185
+ path: 'commentReplies.replies.content.attachments.video.urlExpirationDate',
2186
+ },
2187
+ {
2188
+ path: 'commentReplies.replies.content.attachments.video.posters.urlExpirationDate',
2189
+ },
2190
+ {
2191
+ path: 'commentReplies.replies.content.attachments.audio.urlExpirationDate',
2192
+ },
2193
+ {
2194
+ path: 'commentReplies.replies.content.attachments.document.urlExpirationDate',
2195
+ },
2196
+ { path: 'commentReplies.replies.draftContent.commentDate' },
2197
+ {
2198
+ path: 'commentReplies.replies.draftContent.richContent.metadata.createdTimestamp',
2199
+ },
2200
+ {
2201
+ path: 'commentReplies.replies.draftContent.richContent.metadata.updatedTimestamp',
2202
+ },
2203
+ {
2204
+ path: 'commentReplies.replies.draftContent.attachments.image.urlExpirationDate',
2205
+ },
2206
+ {
2207
+ path: 'commentReplies.replies.draftContent.attachments.video.urlExpirationDate',
2208
+ },
2209
+ {
2210
+ path: 'commentReplies.replies.draftContent.attachments.video.posters.urlExpirationDate',
2211
+ },
2212
+ {
2213
+ path: 'commentReplies.replies.draftContent.attachments.audio.urlExpirationDate',
2214
+ },
2215
+ {
2216
+ path: 'commentReplies.replies.draftContent.attachments.document.urlExpirationDate',
2217
+ },
2218
+ ],
2219
+ },
2220
+ {
2221
+ transformFn: transformRESTFloatToSDKFloat,
2222
+ paths: [
2223
+ {
2224
+ path: 'comments.content.richContent.nodes.galleryData.items.image.media.duration',
2225
+ },
2226
+ {
2227
+ path: 'comments.content.richContent.nodes.galleryData.items.video.media.duration',
2228
+ },
2229
+ {
2230
+ path: 'comments.content.richContent.nodes.galleryData.items.video.thumbnail.duration',
2231
+ },
2232
+ {
2233
+ path: 'comments.content.richContent.nodes.galleryData.options.item.ratio',
2234
+ },
2235
+ {
2236
+ path: 'comments.content.richContent.nodes.imageData.image.duration',
2237
+ },
2238
+ {
2239
+ path: 'comments.content.richContent.nodes.mapData.mapSettings.lat',
2240
+ },
2241
+ {
2242
+ path: 'comments.content.richContent.nodes.mapData.mapSettings.lng',
2243
+ },
2244
+ {
2245
+ path: 'comments.content.richContent.nodes.pollData.poll.image.duration',
2246
+ },
2247
+ {
2248
+ path: 'comments.content.richContent.nodes.pollData.poll.options.image.duration',
2249
+ },
2250
+ {
2251
+ path: 'comments.content.richContent.nodes.pollData.design.poll.background.image.duration',
2252
+ },
2253
+ {
2254
+ path: 'comments.content.richContent.nodes.appEmbedData.image.duration',
2255
+ },
2256
+ {
2257
+ path: 'comments.content.richContent.nodes.videoData.video.duration',
2258
+ },
2259
+ {
2260
+ path: 'comments.content.richContent.nodes.videoData.thumbnail.duration',
2261
+ },
2262
+ {
2263
+ path: 'comments.content.richContent.nodes.audioData.audio.duration',
2264
+ },
2265
+ {
2266
+ path: 'comments.content.richContent.nodes.audioData.coverImage.duration',
2267
+ },
2268
+ {
2269
+ path: 'comments.draftContent.richContent.nodes.galleryData.items.image.media.duration',
2270
+ },
2271
+ {
2272
+ path: 'comments.draftContent.richContent.nodes.galleryData.items.video.media.duration',
2273
+ },
2274
+ {
2275
+ path: 'comments.draftContent.richContent.nodes.galleryData.items.video.thumbnail.duration',
2276
+ },
2277
+ {
2278
+ path: 'comments.draftContent.richContent.nodes.galleryData.options.item.ratio',
2279
+ },
2280
+ {
2281
+ path: 'comments.draftContent.richContent.nodes.imageData.image.duration',
2282
+ },
2283
+ {
2284
+ path: 'comments.draftContent.richContent.nodes.mapData.mapSettings.lat',
2285
+ },
2286
+ {
2287
+ path: 'comments.draftContent.richContent.nodes.mapData.mapSettings.lng',
2288
+ },
2289
+ {
2290
+ path: 'comments.draftContent.richContent.nodes.pollData.poll.image.duration',
2291
+ },
2292
+ {
2293
+ path: 'comments.draftContent.richContent.nodes.pollData.poll.options.image.duration',
2294
+ },
2295
+ {
2296
+ path: 'comments.draftContent.richContent.nodes.pollData.design.poll.background.image.duration',
2297
+ },
2298
+ {
2299
+ path: 'comments.draftContent.richContent.nodes.appEmbedData.image.duration',
2300
+ },
2301
+ {
2302
+ path: 'comments.draftContent.richContent.nodes.videoData.video.duration',
2303
+ },
2304
+ {
2305
+ path: 'comments.draftContent.richContent.nodes.videoData.thumbnail.duration',
2306
+ },
2307
+ {
2308
+ path: 'comments.draftContent.richContent.nodes.audioData.audio.duration',
2309
+ },
2310
+ {
2311
+ path: 'comments.draftContent.richContent.nodes.audioData.coverImage.duration',
2312
+ },
2313
+ {
2314
+ path: 'commentReplies.replies.content.richContent.nodes.galleryData.items.image.media.duration',
2315
+ },
2316
+ {
2317
+ path: 'commentReplies.replies.content.richContent.nodes.galleryData.items.video.media.duration',
2318
+ },
2319
+ {
2320
+ path: 'commentReplies.replies.content.richContent.nodes.galleryData.items.video.thumbnail.duration',
2321
+ },
2322
+ {
2323
+ path: 'commentReplies.replies.content.richContent.nodes.galleryData.options.item.ratio',
2324
+ },
2325
+ {
2326
+ path: 'commentReplies.replies.content.richContent.nodes.imageData.image.duration',
2327
+ },
2328
+ {
2329
+ path: 'commentReplies.replies.content.richContent.nodes.mapData.mapSettings.lat',
2330
+ },
2331
+ {
2332
+ path: 'commentReplies.replies.content.richContent.nodes.mapData.mapSettings.lng',
2333
+ },
2334
+ {
2335
+ path: 'commentReplies.replies.content.richContent.nodes.pollData.poll.image.duration',
2336
+ },
2337
+ {
2338
+ path: 'commentReplies.replies.content.richContent.nodes.pollData.poll.options.image.duration',
2339
+ },
2340
+ {
2341
+ path: 'commentReplies.replies.content.richContent.nodes.pollData.design.poll.background.image.duration',
2342
+ },
2343
+ {
2344
+ path: 'commentReplies.replies.content.richContent.nodes.appEmbedData.image.duration',
2345
+ },
2346
+ {
2347
+ path: 'commentReplies.replies.content.richContent.nodes.videoData.video.duration',
2348
+ },
2349
+ {
2350
+ path: 'commentReplies.replies.content.richContent.nodes.videoData.thumbnail.duration',
2351
+ },
2352
+ {
2353
+ path: 'commentReplies.replies.content.richContent.nodes.audioData.audio.duration',
2354
+ },
2355
+ {
2356
+ path: 'commentReplies.replies.content.richContent.nodes.audioData.coverImage.duration',
2357
+ },
2358
+ {
2359
+ path: 'commentReplies.replies.draftContent.richContent.nodes.galleryData.items.image.media.duration',
2360
+ },
2361
+ {
2362
+ path: 'commentReplies.replies.draftContent.richContent.nodes.galleryData.items.video.media.duration',
2363
+ },
2364
+ {
2365
+ path: 'commentReplies.replies.draftContent.richContent.nodes.galleryData.items.video.thumbnail.duration',
2366
+ },
2367
+ {
2368
+ path: 'commentReplies.replies.draftContent.richContent.nodes.galleryData.options.item.ratio',
2369
+ },
2370
+ {
2371
+ path: 'commentReplies.replies.draftContent.richContent.nodes.imageData.image.duration',
2372
+ },
2373
+ {
2374
+ path: 'commentReplies.replies.draftContent.richContent.nodes.mapData.mapSettings.lat',
2375
+ },
2376
+ {
2377
+ path: 'commentReplies.replies.draftContent.richContent.nodes.mapData.mapSettings.lng',
2378
+ },
2379
+ {
2380
+ path: 'commentReplies.replies.draftContent.richContent.nodes.pollData.poll.image.duration',
2381
+ },
2382
+ {
2383
+ path: 'commentReplies.replies.draftContent.richContent.nodes.pollData.poll.options.image.duration',
2384
+ },
2385
+ {
2386
+ path: 'commentReplies.replies.draftContent.richContent.nodes.pollData.design.poll.background.image.duration',
2387
+ },
2388
+ {
2389
+ path: 'commentReplies.replies.draftContent.richContent.nodes.appEmbedData.image.duration',
2390
+ },
2391
+ {
2392
+ path: 'commentReplies.replies.draftContent.richContent.nodes.videoData.video.duration',
2393
+ },
2394
+ {
2395
+ path: 'commentReplies.replies.draftContent.richContent.nodes.videoData.thumbnail.duration',
2396
+ },
2397
+ {
2398
+ path: 'commentReplies.replies.draftContent.richContent.nodes.audioData.audio.duration',
2399
+ },
2400
+ {
2401
+ path: 'commentReplies.replies.draftContent.richContent.nodes.audioData.coverImage.duration',
2402
+ },
2403
+ ],
2404
+ },
2405
+ ]),
2406
+ };
2407
+ return metadata;
2408
+ }
2409
+ return __getCommentThread;
2410
+ }
2411
+ /** Publishes multiple comments with the `HIDDEN` status. The comment status becomes `PUBLISHED`. */
2412
+ export function bulkPublishComment(payload) {
2413
+ function __bulkPublishComment({ host }) {
2414
+ const metadata = {
2415
+ entityFqdn: 'wix.comments.v2.comment',
2416
+ method: 'POST',
2417
+ methodFqn: 'wix.comments.ng.v1.CommentsNg.BulkPublishComment',
2418
+ packageName: PACKAGE_NAME,
2419
+ url: resolveWixCommentsNgV1CommentsNgUrl({
2420
+ protoPath: '/v1/bulk/comments/publish-by-filter',
2421
+ data: payload,
2422
+ host,
2423
+ }),
2424
+ data: payload,
2425
+ };
2426
+ return metadata;
2427
+ }
2428
+ return __bulkPublishComment;
2429
+ }
2430
+ /** Hides multiple comments. The comment status becomes `HIDDEN`. */
2431
+ export function bulkHideComment(payload) {
2432
+ function __bulkHideComment({ host }) {
2433
+ const metadata = {
2434
+ entityFqdn: 'wix.comments.v2.comment',
2435
+ method: 'PUT',
2436
+ methodFqn: 'wix.comments.ng.v1.CommentsNg.BulkHideComment',
2437
+ packageName: PACKAGE_NAME,
2438
+ url: resolveWixCommentsNgV1CommentsNgUrl({
2439
+ protoPath: '/v1/bulk/comments/hide-by-filter',
2440
+ data: payload,
2441
+ host,
2442
+ }),
2443
+ data: payload,
2444
+ };
2445
+ return metadata;
2446
+ }
2447
+ return __bulkHideComment;
2448
+ }
2449
+ /** Deletes multiple comments. */
2450
+ export function bulkDeleteComment(payload) {
2451
+ function __bulkDeleteComment({ host }) {
2452
+ const metadata = {
2453
+ entityFqdn: 'wix.comments.v2.comment',
2454
+ method: 'PUT',
2455
+ methodFqn: 'wix.comments.ng.v1.CommentsNg.BulkDeleteComment',
2456
+ packageName: PACKAGE_NAME,
2457
+ url: resolveWixCommentsNgV1CommentsNgUrl({
2458
+ protoPath: '/v1/bulk/comments/delete-by-filter',
2459
+ data: payload,
2460
+ host,
2461
+ }),
2462
+ data: payload,
2463
+ };
2464
+ return metadata;
2465
+ }
2466
+ return __bulkDeleteComment;
2467
+ }
2468
+ /** Moderates the draft content of multiple comments. */
2469
+ export function bulkModerateDraftContent(payload) {
2470
+ function __bulkModerateDraftContent({ host }) {
2471
+ const metadata = {
2472
+ entityFqdn: 'wix.comments.v2.comment',
2473
+ method: 'POST',
2474
+ methodFqn: 'wix.comments.ng.v1.CommentsNg.BulkModerateDraftContent',
2475
+ packageName: PACKAGE_NAME,
2476
+ url: resolveWixCommentsNgV1CommentsNgUrl({
2477
+ protoPath: '/v1/bulk/comments/moderate-by-filter',
2478
+ data: payload,
2479
+ host,
2480
+ }),
2481
+ data: payload,
2482
+ };
2483
+ return metadata;
2484
+ }
2485
+ return __bulkModerateDraftContent;
2486
+ }
2487
+ /** Moves multiple comments to another resource. */
2488
+ export function bulkMoveCommentByFilter(payload) {
2489
+ function __bulkMoveCommentByFilter({ host }) {
2490
+ const metadata = {
2491
+ entityFqdn: 'wix.comments.v2.comment',
2492
+ method: 'PUT',
2493
+ methodFqn: 'wix.comments.ng.v1.CommentsNg.BulkMoveCommentByFilter',
2494
+ packageName: PACKAGE_NAME,
2495
+ url: resolveWixCommentsNgV1CommentsNgUrl({
2496
+ protoPath: '/v1/bulk/comments/move-by-filter',
2497
+ data: payload,
2498
+ host,
2499
+ }),
2500
+ data: payload,
2501
+ };
2502
+ return metadata;
2503
+ }
2504
+ return __bulkMoveCommentByFilter;
2505
+ }
2506
+ //# sourceMappingURL=comments-v2-comment-comments.http.js.map