@wix/auto_sdk_comments_comments 1.0.7 → 1.0.9

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