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