@wix/auto_sdk_comments_comments 1.0.21 → 1.0.22

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 (33) hide show
  1. package/build/cjs/index.d.ts +56 -21
  2. package/build/cjs/index.js +69 -18
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/{comments-v2-comment-comments.universal-BVp9019z.d.ts → index.typings.d.ts} +669 -19
  5. package/build/cjs/index.typings.js +3890 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +222 -19
  8. package/build/cjs/meta.js.map +1 -1
  9. package/build/es/index.d.mts +56 -21
  10. package/build/es/index.mjs +62 -18
  11. package/build/es/index.mjs.map +1 -1
  12. package/build/es/{comments-v2-comment-comments.universal-BVp9019z.d.mts → index.typings.d.mts} +669 -19
  13. package/build/es/index.typings.mjs +3805 -0
  14. package/build/es/index.typings.mjs.map +1 -0
  15. package/build/es/meta.d.mts +222 -19
  16. package/build/es/meta.mjs.map +1 -1
  17. package/build/internal/cjs/index.d.ts +56 -21
  18. package/build/internal/cjs/index.js +69 -18
  19. package/build/internal/cjs/index.js.map +1 -1
  20. package/build/internal/cjs/{comments-v2-comment-comments.universal-BVp9019z.d.ts → index.typings.d.ts} +669 -19
  21. package/build/internal/cjs/index.typings.js +3890 -0
  22. package/build/internal/cjs/index.typings.js.map +1 -0
  23. package/build/internal/cjs/meta.d.ts +222 -19
  24. package/build/internal/cjs/meta.js.map +1 -1
  25. package/build/internal/es/index.d.mts +56 -21
  26. package/build/internal/es/index.mjs +62 -18
  27. package/build/internal/es/index.mjs.map +1 -1
  28. package/build/internal/es/{comments-v2-comment-comments.universal-BVp9019z.d.mts → index.typings.d.mts} +669 -19
  29. package/build/internal/es/index.typings.mjs +3805 -0
  30. package/build/internal/es/index.typings.mjs.map +1 -0
  31. package/build/internal/es/meta.d.mts +222 -19
  32. package/build/internal/es/meta.mjs.map +1 -1
  33. package/package.json +4 -3
@@ -0,0 +1,3805 @@
1
+ // src/comments-v2-comment-comments.universal.ts
2
+ import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
3
+ import { queryBuilder } from "@wix/sdk-runtime/query-builder";
4
+ import {
5
+ renameKeysFromSDKRequestToRESTRequest,
6
+ renameKeysFromRESTResponseToSDKResponse
7
+ } from "@wix/sdk-runtime/rename-all-nested-keys";
8
+
9
+ // src/comments-v2-comment-comments.http.ts
10
+ import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
11
+ import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
12
+ import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
13
+ import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
14
+ import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
15
+ import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
16
+ import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
17
+ function resolveWixCommentsNgV1CommentsNgUrl(opts) {
18
+ const domainToMappings = {
19
+ "www.wixapis.com": [
20
+ {
21
+ srcPath: "/comments/v1/comments",
22
+ destPath: "/v1/comments"
23
+ },
24
+ {
25
+ srcPath: "/comments/v1/bulk/comments",
26
+ destPath: "/v1/bulk/comments"
27
+ }
28
+ ],
29
+ _: [
30
+ {
31
+ srcPath: "/_api/comments-ng/v1",
32
+ destPath: "/v1"
33
+ }
34
+ ],
35
+ "manage._base_domain_": [
36
+ {
37
+ srcPath: "/_api/comments-ng/v1",
38
+ destPath: "/v1"
39
+ }
40
+ ],
41
+ "www._base_domain_": [
42
+ {
43
+ srcPath: "/_api/comments-ng/v1",
44
+ destPath: "/v1"
45
+ }
46
+ ],
47
+ "*.dev.wix-code.com": [
48
+ {
49
+ srcPath: "/_api/comments-ng",
50
+ destPath: ""
51
+ }
52
+ ]
53
+ };
54
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
55
+ }
56
+ var PACKAGE_NAME = "@wix/auto_sdk_comments_comments";
57
+ function createComment(payload) {
58
+ function __createComment({ host }) {
59
+ const serializedData = transformPaths(payload, [
60
+ {
61
+ transformFn: transformSDKTimestampToRESTTimestamp,
62
+ paths: [
63
+ { path: "comment.createdDate" },
64
+ { path: "comment.updatedDate" },
65
+ { path: "comment.commentDate" },
66
+ { path: "comment.content.commentDate" },
67
+ { path: "comment.content.richContent.metadata.createdTimestamp" },
68
+ { path: "comment.content.richContent.metadata.updatedTimestamp" },
69
+ { path: "comment.content.attachments.image.urlExpirationDate" },
70
+ { path: "comment.content.attachments.video.urlExpirationDate" },
71
+ {
72
+ path: "comment.content.attachments.video.posters.urlExpirationDate"
73
+ },
74
+ { path: "comment.content.attachments.audio.urlExpirationDate" },
75
+ { path: "comment.content.attachments.document.urlExpirationDate" },
76
+ { path: "comment.draftContent.commentDate" },
77
+ {
78
+ path: "comment.draftContent.richContent.metadata.createdTimestamp"
79
+ },
80
+ {
81
+ path: "comment.draftContent.richContent.metadata.updatedTimestamp"
82
+ },
83
+ { path: "comment.draftContent.attachments.image.urlExpirationDate" },
84
+ { path: "comment.draftContent.attachments.video.urlExpirationDate" },
85
+ {
86
+ path: "comment.draftContent.attachments.video.posters.urlExpirationDate"
87
+ },
88
+ { path: "comment.draftContent.attachments.audio.urlExpirationDate" },
89
+ {
90
+ path: "comment.draftContent.attachments.document.urlExpirationDate"
91
+ }
92
+ ]
93
+ },
94
+ {
95
+ transformFn: transformSDKFloatToRESTFloat,
96
+ paths: [
97
+ {
98
+ path: "comment.content.richContent.nodes.galleryData.items.image.media.duration"
99
+ },
100
+ {
101
+ path: "comment.content.richContent.nodes.galleryData.items.video.media.duration"
102
+ },
103
+ {
104
+ path: "comment.content.richContent.nodes.galleryData.items.video.thumbnail.duration"
105
+ },
106
+ {
107
+ path: "comment.content.richContent.nodes.galleryData.options.item.ratio"
108
+ },
109
+ {
110
+ path: "comment.content.richContent.nodes.imageData.image.duration"
111
+ },
112
+ { path: "comment.content.richContent.nodes.mapData.mapSettings.lat" },
113
+ { path: "comment.content.richContent.nodes.mapData.mapSettings.lng" },
114
+ {
115
+ path: "comment.content.richContent.nodes.pollData.poll.image.duration"
116
+ },
117
+ {
118
+ path: "comment.content.richContent.nodes.pollData.poll.options.image.duration"
119
+ },
120
+ {
121
+ path: "comment.content.richContent.nodes.pollData.design.poll.background.image.duration"
122
+ },
123
+ {
124
+ path: "comment.content.richContent.nodes.appEmbedData.image.duration"
125
+ },
126
+ {
127
+ path: "comment.content.richContent.nodes.videoData.video.duration"
128
+ },
129
+ {
130
+ path: "comment.content.richContent.nodes.videoData.thumbnail.duration"
131
+ },
132
+ {
133
+ path: "comment.content.richContent.nodes.audioData.audio.duration"
134
+ },
135
+ {
136
+ path: "comment.content.richContent.nodes.audioData.coverImage.duration"
137
+ },
138
+ {
139
+ path: "comment.draftContent.richContent.nodes.galleryData.items.image.media.duration"
140
+ },
141
+ {
142
+ path: "comment.draftContent.richContent.nodes.galleryData.items.video.media.duration"
143
+ },
144
+ {
145
+ path: "comment.draftContent.richContent.nodes.galleryData.items.video.thumbnail.duration"
146
+ },
147
+ {
148
+ path: "comment.draftContent.richContent.nodes.galleryData.options.item.ratio"
149
+ },
150
+ {
151
+ path: "comment.draftContent.richContent.nodes.imageData.image.duration"
152
+ },
153
+ {
154
+ path: "comment.draftContent.richContent.nodes.mapData.mapSettings.lat"
155
+ },
156
+ {
157
+ path: "comment.draftContent.richContent.nodes.mapData.mapSettings.lng"
158
+ },
159
+ {
160
+ path: "comment.draftContent.richContent.nodes.pollData.poll.image.duration"
161
+ },
162
+ {
163
+ path: "comment.draftContent.richContent.nodes.pollData.poll.options.image.duration"
164
+ },
165
+ {
166
+ path: "comment.draftContent.richContent.nodes.pollData.design.poll.background.image.duration"
167
+ },
168
+ {
169
+ path: "comment.draftContent.richContent.nodes.appEmbedData.image.duration"
170
+ },
171
+ {
172
+ path: "comment.draftContent.richContent.nodes.videoData.video.duration"
173
+ },
174
+ {
175
+ path: "comment.draftContent.richContent.nodes.videoData.thumbnail.duration"
176
+ },
177
+ {
178
+ path: "comment.draftContent.richContent.nodes.audioData.audio.duration"
179
+ },
180
+ {
181
+ path: "comment.draftContent.richContent.nodes.audioData.coverImage.duration"
182
+ }
183
+ ]
184
+ }
185
+ ]);
186
+ const metadata = {
187
+ entityFqdn: "wix.comments.v2.comment",
188
+ method: "POST",
189
+ methodFqn: "wix.comments.ng.v1.CommentsNg.CreateComment",
190
+ packageName: PACKAGE_NAME,
191
+ url: resolveWixCommentsNgV1CommentsNgUrl({
192
+ protoPath: "/v1/comments",
193
+ data: serializedData,
194
+ host
195
+ }),
196
+ data: serializedData,
197
+ transformResponse: (payload2) => transformPaths(payload2, [
198
+ {
199
+ transformFn: transformRESTTimestampToSDKTimestamp,
200
+ paths: [
201
+ { path: "comment.createdDate" },
202
+ { path: "comment.updatedDate" },
203
+ { path: "comment.commentDate" },
204
+ { path: "comment.content.commentDate" },
205
+ { path: "comment.content.richContent.metadata.createdTimestamp" },
206
+ { path: "comment.content.richContent.metadata.updatedTimestamp" },
207
+ { path: "comment.content.attachments.image.urlExpirationDate" },
208
+ { path: "comment.content.attachments.video.urlExpirationDate" },
209
+ {
210
+ path: "comment.content.attachments.video.posters.urlExpirationDate"
211
+ },
212
+ { path: "comment.content.attachments.audio.urlExpirationDate" },
213
+ {
214
+ path: "comment.content.attachments.document.urlExpirationDate"
215
+ },
216
+ { path: "comment.draftContent.commentDate" },
217
+ {
218
+ path: "comment.draftContent.richContent.metadata.createdTimestamp"
219
+ },
220
+ {
221
+ path: "comment.draftContent.richContent.metadata.updatedTimestamp"
222
+ },
223
+ {
224
+ path: "comment.draftContent.attachments.image.urlExpirationDate"
225
+ },
226
+ {
227
+ path: "comment.draftContent.attachments.video.urlExpirationDate"
228
+ },
229
+ {
230
+ path: "comment.draftContent.attachments.video.posters.urlExpirationDate"
231
+ },
232
+ {
233
+ path: "comment.draftContent.attachments.audio.urlExpirationDate"
234
+ },
235
+ {
236
+ path: "comment.draftContent.attachments.document.urlExpirationDate"
237
+ }
238
+ ]
239
+ },
240
+ {
241
+ transformFn: transformRESTFloatToSDKFloat,
242
+ paths: [
243
+ {
244
+ path: "comment.content.richContent.nodes.galleryData.items.image.media.duration"
245
+ },
246
+ {
247
+ path: "comment.content.richContent.nodes.galleryData.items.video.media.duration"
248
+ },
249
+ {
250
+ path: "comment.content.richContent.nodes.galleryData.items.video.thumbnail.duration"
251
+ },
252
+ {
253
+ path: "comment.content.richContent.nodes.galleryData.options.item.ratio"
254
+ },
255
+ {
256
+ path: "comment.content.richContent.nodes.imageData.image.duration"
257
+ },
258
+ {
259
+ path: "comment.content.richContent.nodes.mapData.mapSettings.lat"
260
+ },
261
+ {
262
+ path: "comment.content.richContent.nodes.mapData.mapSettings.lng"
263
+ },
264
+ {
265
+ path: "comment.content.richContent.nodes.pollData.poll.image.duration"
266
+ },
267
+ {
268
+ path: "comment.content.richContent.nodes.pollData.poll.options.image.duration"
269
+ },
270
+ {
271
+ path: "comment.content.richContent.nodes.pollData.design.poll.background.image.duration"
272
+ },
273
+ {
274
+ path: "comment.content.richContent.nodes.appEmbedData.image.duration"
275
+ },
276
+ {
277
+ path: "comment.content.richContent.nodes.videoData.video.duration"
278
+ },
279
+ {
280
+ path: "comment.content.richContent.nodes.videoData.thumbnail.duration"
281
+ },
282
+ {
283
+ path: "comment.content.richContent.nodes.audioData.audio.duration"
284
+ },
285
+ {
286
+ path: "comment.content.richContent.nodes.audioData.coverImage.duration"
287
+ },
288
+ {
289
+ path: "comment.draftContent.richContent.nodes.galleryData.items.image.media.duration"
290
+ },
291
+ {
292
+ path: "comment.draftContent.richContent.nodes.galleryData.items.video.media.duration"
293
+ },
294
+ {
295
+ path: "comment.draftContent.richContent.nodes.galleryData.items.video.thumbnail.duration"
296
+ },
297
+ {
298
+ path: "comment.draftContent.richContent.nodes.galleryData.options.item.ratio"
299
+ },
300
+ {
301
+ path: "comment.draftContent.richContent.nodes.imageData.image.duration"
302
+ },
303
+ {
304
+ path: "comment.draftContent.richContent.nodes.mapData.mapSettings.lat"
305
+ },
306
+ {
307
+ path: "comment.draftContent.richContent.nodes.mapData.mapSettings.lng"
308
+ },
309
+ {
310
+ path: "comment.draftContent.richContent.nodes.pollData.poll.image.duration"
311
+ },
312
+ {
313
+ path: "comment.draftContent.richContent.nodes.pollData.poll.options.image.duration"
314
+ },
315
+ {
316
+ path: "comment.draftContent.richContent.nodes.pollData.design.poll.background.image.duration"
317
+ },
318
+ {
319
+ path: "comment.draftContent.richContent.nodes.appEmbedData.image.duration"
320
+ },
321
+ {
322
+ path: "comment.draftContent.richContent.nodes.videoData.video.duration"
323
+ },
324
+ {
325
+ path: "comment.draftContent.richContent.nodes.videoData.thumbnail.duration"
326
+ },
327
+ {
328
+ path: "comment.draftContent.richContent.nodes.audioData.audio.duration"
329
+ },
330
+ {
331
+ path: "comment.draftContent.richContent.nodes.audioData.coverImage.duration"
332
+ }
333
+ ]
334
+ }
335
+ ])
336
+ };
337
+ return metadata;
338
+ }
339
+ return __createComment;
340
+ }
341
+ function getComment(payload) {
342
+ function __getComment({ host }) {
343
+ const metadata = {
344
+ entityFqdn: "wix.comments.v2.comment",
345
+ method: "GET",
346
+ methodFqn: "wix.comments.ng.v1.CommentsNg.GetComment",
347
+ packageName: PACKAGE_NAME,
348
+ url: resolveWixCommentsNgV1CommentsNgUrl({
349
+ protoPath: "/v1/comments/{commentId}",
350
+ data: payload,
351
+ host
352
+ }),
353
+ params: toURLSearchParams(payload),
354
+ transformResponse: (payload2) => transformPaths(payload2, [
355
+ {
356
+ transformFn: transformRESTTimestampToSDKTimestamp,
357
+ paths: [
358
+ { path: "comment.createdDate" },
359
+ { path: "comment.updatedDate" },
360
+ { path: "comment.commentDate" },
361
+ { path: "comment.content.commentDate" },
362
+ { path: "comment.content.richContent.metadata.createdTimestamp" },
363
+ { path: "comment.content.richContent.metadata.updatedTimestamp" },
364
+ { path: "comment.content.attachments.image.urlExpirationDate" },
365
+ { path: "comment.content.attachments.video.urlExpirationDate" },
366
+ {
367
+ path: "comment.content.attachments.video.posters.urlExpirationDate"
368
+ },
369
+ { path: "comment.content.attachments.audio.urlExpirationDate" },
370
+ {
371
+ path: "comment.content.attachments.document.urlExpirationDate"
372
+ },
373
+ { path: "comment.draftContent.commentDate" },
374
+ {
375
+ path: "comment.draftContent.richContent.metadata.createdTimestamp"
376
+ },
377
+ {
378
+ path: "comment.draftContent.richContent.metadata.updatedTimestamp"
379
+ },
380
+ {
381
+ path: "comment.draftContent.attachments.image.urlExpirationDate"
382
+ },
383
+ {
384
+ path: "comment.draftContent.attachments.video.urlExpirationDate"
385
+ },
386
+ {
387
+ path: "comment.draftContent.attachments.video.posters.urlExpirationDate"
388
+ },
389
+ {
390
+ path: "comment.draftContent.attachments.audio.urlExpirationDate"
391
+ },
392
+ {
393
+ path: "comment.draftContent.attachments.document.urlExpirationDate"
394
+ }
395
+ ]
396
+ },
397
+ {
398
+ transformFn: transformRESTFloatToSDKFloat,
399
+ paths: [
400
+ {
401
+ path: "comment.content.richContent.nodes.galleryData.items.image.media.duration"
402
+ },
403
+ {
404
+ path: "comment.content.richContent.nodes.galleryData.items.video.media.duration"
405
+ },
406
+ {
407
+ path: "comment.content.richContent.nodes.galleryData.items.video.thumbnail.duration"
408
+ },
409
+ {
410
+ path: "comment.content.richContent.nodes.galleryData.options.item.ratio"
411
+ },
412
+ {
413
+ path: "comment.content.richContent.nodes.imageData.image.duration"
414
+ },
415
+ {
416
+ path: "comment.content.richContent.nodes.mapData.mapSettings.lat"
417
+ },
418
+ {
419
+ path: "comment.content.richContent.nodes.mapData.mapSettings.lng"
420
+ },
421
+ {
422
+ path: "comment.content.richContent.nodes.pollData.poll.image.duration"
423
+ },
424
+ {
425
+ path: "comment.content.richContent.nodes.pollData.poll.options.image.duration"
426
+ },
427
+ {
428
+ path: "comment.content.richContent.nodes.pollData.design.poll.background.image.duration"
429
+ },
430
+ {
431
+ path: "comment.content.richContent.nodes.appEmbedData.image.duration"
432
+ },
433
+ {
434
+ path: "comment.content.richContent.nodes.videoData.video.duration"
435
+ },
436
+ {
437
+ path: "comment.content.richContent.nodes.videoData.thumbnail.duration"
438
+ },
439
+ {
440
+ path: "comment.content.richContent.nodes.audioData.audio.duration"
441
+ },
442
+ {
443
+ path: "comment.content.richContent.nodes.audioData.coverImage.duration"
444
+ },
445
+ {
446
+ path: "comment.draftContent.richContent.nodes.galleryData.items.image.media.duration"
447
+ },
448
+ {
449
+ path: "comment.draftContent.richContent.nodes.galleryData.items.video.media.duration"
450
+ },
451
+ {
452
+ path: "comment.draftContent.richContent.nodes.galleryData.items.video.thumbnail.duration"
453
+ },
454
+ {
455
+ path: "comment.draftContent.richContent.nodes.galleryData.options.item.ratio"
456
+ },
457
+ {
458
+ path: "comment.draftContent.richContent.nodes.imageData.image.duration"
459
+ },
460
+ {
461
+ path: "comment.draftContent.richContent.nodes.mapData.mapSettings.lat"
462
+ },
463
+ {
464
+ path: "comment.draftContent.richContent.nodes.mapData.mapSettings.lng"
465
+ },
466
+ {
467
+ path: "comment.draftContent.richContent.nodes.pollData.poll.image.duration"
468
+ },
469
+ {
470
+ path: "comment.draftContent.richContent.nodes.pollData.poll.options.image.duration"
471
+ },
472
+ {
473
+ path: "comment.draftContent.richContent.nodes.pollData.design.poll.background.image.duration"
474
+ },
475
+ {
476
+ path: "comment.draftContent.richContent.nodes.appEmbedData.image.duration"
477
+ },
478
+ {
479
+ path: "comment.draftContent.richContent.nodes.videoData.video.duration"
480
+ },
481
+ {
482
+ path: "comment.draftContent.richContent.nodes.videoData.thumbnail.duration"
483
+ },
484
+ {
485
+ path: "comment.draftContent.richContent.nodes.audioData.audio.duration"
486
+ },
487
+ {
488
+ path: "comment.draftContent.richContent.nodes.audioData.coverImage.duration"
489
+ }
490
+ ]
491
+ }
492
+ ])
493
+ };
494
+ return metadata;
495
+ }
496
+ return __getComment;
497
+ }
498
+ function updateComment(payload) {
499
+ function __updateComment({ host }) {
500
+ const serializedData = transformPaths(payload, [
501
+ {
502
+ transformFn: transformSDKTimestampToRESTTimestamp,
503
+ paths: [
504
+ { path: "comment.createdDate" },
505
+ { path: "comment.updatedDate" },
506
+ { path: "comment.commentDate" },
507
+ { path: "comment.content.commentDate" },
508
+ { path: "comment.content.richContent.metadata.createdTimestamp" },
509
+ { path: "comment.content.richContent.metadata.updatedTimestamp" },
510
+ { path: "comment.content.attachments.image.urlExpirationDate" },
511
+ { path: "comment.content.attachments.video.urlExpirationDate" },
512
+ {
513
+ path: "comment.content.attachments.video.posters.urlExpirationDate"
514
+ },
515
+ { path: "comment.content.attachments.audio.urlExpirationDate" },
516
+ { path: "comment.content.attachments.document.urlExpirationDate" },
517
+ { path: "comment.draftContent.commentDate" },
518
+ {
519
+ path: "comment.draftContent.richContent.metadata.createdTimestamp"
520
+ },
521
+ {
522
+ path: "comment.draftContent.richContent.metadata.updatedTimestamp"
523
+ },
524
+ { path: "comment.draftContent.attachments.image.urlExpirationDate" },
525
+ { path: "comment.draftContent.attachments.video.urlExpirationDate" },
526
+ {
527
+ path: "comment.draftContent.attachments.video.posters.urlExpirationDate"
528
+ },
529
+ { path: "comment.draftContent.attachments.audio.urlExpirationDate" },
530
+ {
531
+ path: "comment.draftContent.attachments.document.urlExpirationDate"
532
+ }
533
+ ]
534
+ },
535
+ {
536
+ transformFn: transformSDKFloatToRESTFloat,
537
+ paths: [
538
+ {
539
+ path: "comment.content.richContent.nodes.galleryData.items.image.media.duration"
540
+ },
541
+ {
542
+ path: "comment.content.richContent.nodes.galleryData.items.video.media.duration"
543
+ },
544
+ {
545
+ path: "comment.content.richContent.nodes.galleryData.items.video.thumbnail.duration"
546
+ },
547
+ {
548
+ path: "comment.content.richContent.nodes.galleryData.options.item.ratio"
549
+ },
550
+ {
551
+ path: "comment.content.richContent.nodes.imageData.image.duration"
552
+ },
553
+ { path: "comment.content.richContent.nodes.mapData.mapSettings.lat" },
554
+ { path: "comment.content.richContent.nodes.mapData.mapSettings.lng" },
555
+ {
556
+ path: "comment.content.richContent.nodes.pollData.poll.image.duration"
557
+ },
558
+ {
559
+ path: "comment.content.richContent.nodes.pollData.poll.options.image.duration"
560
+ },
561
+ {
562
+ path: "comment.content.richContent.nodes.pollData.design.poll.background.image.duration"
563
+ },
564
+ {
565
+ path: "comment.content.richContent.nodes.appEmbedData.image.duration"
566
+ },
567
+ {
568
+ path: "comment.content.richContent.nodes.videoData.video.duration"
569
+ },
570
+ {
571
+ path: "comment.content.richContent.nodes.videoData.thumbnail.duration"
572
+ },
573
+ {
574
+ path: "comment.content.richContent.nodes.audioData.audio.duration"
575
+ },
576
+ {
577
+ path: "comment.content.richContent.nodes.audioData.coverImage.duration"
578
+ },
579
+ {
580
+ path: "comment.draftContent.richContent.nodes.galleryData.items.image.media.duration"
581
+ },
582
+ {
583
+ path: "comment.draftContent.richContent.nodes.galleryData.items.video.media.duration"
584
+ },
585
+ {
586
+ path: "comment.draftContent.richContent.nodes.galleryData.items.video.thumbnail.duration"
587
+ },
588
+ {
589
+ path: "comment.draftContent.richContent.nodes.galleryData.options.item.ratio"
590
+ },
591
+ {
592
+ path: "comment.draftContent.richContent.nodes.imageData.image.duration"
593
+ },
594
+ {
595
+ path: "comment.draftContent.richContent.nodes.mapData.mapSettings.lat"
596
+ },
597
+ {
598
+ path: "comment.draftContent.richContent.nodes.mapData.mapSettings.lng"
599
+ },
600
+ {
601
+ path: "comment.draftContent.richContent.nodes.pollData.poll.image.duration"
602
+ },
603
+ {
604
+ path: "comment.draftContent.richContent.nodes.pollData.poll.options.image.duration"
605
+ },
606
+ {
607
+ path: "comment.draftContent.richContent.nodes.pollData.design.poll.background.image.duration"
608
+ },
609
+ {
610
+ path: "comment.draftContent.richContent.nodes.appEmbedData.image.duration"
611
+ },
612
+ {
613
+ path: "comment.draftContent.richContent.nodes.videoData.video.duration"
614
+ },
615
+ {
616
+ path: "comment.draftContent.richContent.nodes.videoData.thumbnail.duration"
617
+ },
618
+ {
619
+ path: "comment.draftContent.richContent.nodes.audioData.audio.duration"
620
+ },
621
+ {
622
+ path: "comment.draftContent.richContent.nodes.audioData.coverImage.duration"
623
+ }
624
+ ]
625
+ }
626
+ ]);
627
+ const metadata = {
628
+ entityFqdn: "wix.comments.v2.comment",
629
+ method: "PATCH",
630
+ methodFqn: "wix.comments.ng.v1.CommentsNg.UpdateComment",
631
+ packageName: PACKAGE_NAME,
632
+ url: resolveWixCommentsNgV1CommentsNgUrl({
633
+ protoPath: "/v1/comments/{comment.id}",
634
+ data: serializedData,
635
+ host
636
+ }),
637
+ data: serializedData,
638
+ transformResponse: (payload2) => transformPaths(payload2, [
639
+ {
640
+ transformFn: transformRESTTimestampToSDKTimestamp,
641
+ paths: [
642
+ { path: "comment.createdDate" },
643
+ { path: "comment.updatedDate" },
644
+ { path: "comment.commentDate" },
645
+ { path: "comment.content.commentDate" },
646
+ { path: "comment.content.richContent.metadata.createdTimestamp" },
647
+ { path: "comment.content.richContent.metadata.updatedTimestamp" },
648
+ { path: "comment.content.attachments.image.urlExpirationDate" },
649
+ { path: "comment.content.attachments.video.urlExpirationDate" },
650
+ {
651
+ path: "comment.content.attachments.video.posters.urlExpirationDate"
652
+ },
653
+ { path: "comment.content.attachments.audio.urlExpirationDate" },
654
+ {
655
+ path: "comment.content.attachments.document.urlExpirationDate"
656
+ },
657
+ { path: "comment.draftContent.commentDate" },
658
+ {
659
+ path: "comment.draftContent.richContent.metadata.createdTimestamp"
660
+ },
661
+ {
662
+ path: "comment.draftContent.richContent.metadata.updatedTimestamp"
663
+ },
664
+ {
665
+ path: "comment.draftContent.attachments.image.urlExpirationDate"
666
+ },
667
+ {
668
+ path: "comment.draftContent.attachments.video.urlExpirationDate"
669
+ },
670
+ {
671
+ path: "comment.draftContent.attachments.video.posters.urlExpirationDate"
672
+ },
673
+ {
674
+ path: "comment.draftContent.attachments.audio.urlExpirationDate"
675
+ },
676
+ {
677
+ path: "comment.draftContent.attachments.document.urlExpirationDate"
678
+ }
679
+ ]
680
+ },
681
+ {
682
+ transformFn: transformRESTFloatToSDKFloat,
683
+ paths: [
684
+ {
685
+ path: "comment.content.richContent.nodes.galleryData.items.image.media.duration"
686
+ },
687
+ {
688
+ path: "comment.content.richContent.nodes.galleryData.items.video.media.duration"
689
+ },
690
+ {
691
+ path: "comment.content.richContent.nodes.galleryData.items.video.thumbnail.duration"
692
+ },
693
+ {
694
+ path: "comment.content.richContent.nodes.galleryData.options.item.ratio"
695
+ },
696
+ {
697
+ path: "comment.content.richContent.nodes.imageData.image.duration"
698
+ },
699
+ {
700
+ path: "comment.content.richContent.nodes.mapData.mapSettings.lat"
701
+ },
702
+ {
703
+ path: "comment.content.richContent.nodes.mapData.mapSettings.lng"
704
+ },
705
+ {
706
+ path: "comment.content.richContent.nodes.pollData.poll.image.duration"
707
+ },
708
+ {
709
+ path: "comment.content.richContent.nodes.pollData.poll.options.image.duration"
710
+ },
711
+ {
712
+ path: "comment.content.richContent.nodes.pollData.design.poll.background.image.duration"
713
+ },
714
+ {
715
+ path: "comment.content.richContent.nodes.appEmbedData.image.duration"
716
+ },
717
+ {
718
+ path: "comment.content.richContent.nodes.videoData.video.duration"
719
+ },
720
+ {
721
+ path: "comment.content.richContent.nodes.videoData.thumbnail.duration"
722
+ },
723
+ {
724
+ path: "comment.content.richContent.nodes.audioData.audio.duration"
725
+ },
726
+ {
727
+ path: "comment.content.richContent.nodes.audioData.coverImage.duration"
728
+ },
729
+ {
730
+ path: "comment.draftContent.richContent.nodes.galleryData.items.image.media.duration"
731
+ },
732
+ {
733
+ path: "comment.draftContent.richContent.nodes.galleryData.items.video.media.duration"
734
+ },
735
+ {
736
+ path: "comment.draftContent.richContent.nodes.galleryData.items.video.thumbnail.duration"
737
+ },
738
+ {
739
+ path: "comment.draftContent.richContent.nodes.galleryData.options.item.ratio"
740
+ },
741
+ {
742
+ path: "comment.draftContent.richContent.nodes.imageData.image.duration"
743
+ },
744
+ {
745
+ path: "comment.draftContent.richContent.nodes.mapData.mapSettings.lat"
746
+ },
747
+ {
748
+ path: "comment.draftContent.richContent.nodes.mapData.mapSettings.lng"
749
+ },
750
+ {
751
+ path: "comment.draftContent.richContent.nodes.pollData.poll.image.duration"
752
+ },
753
+ {
754
+ path: "comment.draftContent.richContent.nodes.pollData.poll.options.image.duration"
755
+ },
756
+ {
757
+ path: "comment.draftContent.richContent.nodes.pollData.design.poll.background.image.duration"
758
+ },
759
+ {
760
+ path: "comment.draftContent.richContent.nodes.appEmbedData.image.duration"
761
+ },
762
+ {
763
+ path: "comment.draftContent.richContent.nodes.videoData.video.duration"
764
+ },
765
+ {
766
+ path: "comment.draftContent.richContent.nodes.videoData.thumbnail.duration"
767
+ },
768
+ {
769
+ path: "comment.draftContent.richContent.nodes.audioData.audio.duration"
770
+ },
771
+ {
772
+ path: "comment.draftContent.richContent.nodes.audioData.coverImage.duration"
773
+ }
774
+ ]
775
+ }
776
+ ])
777
+ };
778
+ return metadata;
779
+ }
780
+ return __updateComment;
781
+ }
782
+ function deleteComment(payload) {
783
+ function __deleteComment({ host }) {
784
+ const metadata = {
785
+ entityFqdn: "wix.comments.v2.comment",
786
+ method: "DELETE",
787
+ methodFqn: "wix.comments.ng.v1.CommentsNg.DeleteComment",
788
+ packageName: PACKAGE_NAME,
789
+ url: resolveWixCommentsNgV1CommentsNgUrl({
790
+ protoPath: "/v1/comments/{commentId}",
791
+ data: payload,
792
+ host
793
+ }),
794
+ params: toURLSearchParams(payload)
795
+ };
796
+ return metadata;
797
+ }
798
+ return __deleteComment;
799
+ }
800
+ function moderateDraftContent(payload) {
801
+ function __moderateDraftContent({ host }) {
802
+ const metadata = {
803
+ entityFqdn: "wix.comments.v2.comment",
804
+ method: "POST",
805
+ methodFqn: "wix.comments.ng.v1.CommentsNg.ModerateDraftContent",
806
+ packageName: PACKAGE_NAME,
807
+ url: resolveWixCommentsNgV1CommentsNgUrl({
808
+ protoPath: "/v1/comments/{commentId}/moderate",
809
+ data: payload,
810
+ host
811
+ }),
812
+ data: payload,
813
+ transformResponse: (payload2) => transformPaths(payload2, [
814
+ {
815
+ transformFn: transformRESTTimestampToSDKTimestamp,
816
+ paths: [
817
+ { path: "comment.createdDate" },
818
+ { path: "comment.updatedDate" },
819
+ { path: "comment.commentDate" },
820
+ { path: "comment.content.commentDate" },
821
+ { path: "comment.content.richContent.metadata.createdTimestamp" },
822
+ { path: "comment.content.richContent.metadata.updatedTimestamp" },
823
+ { path: "comment.content.attachments.image.urlExpirationDate" },
824
+ { path: "comment.content.attachments.video.urlExpirationDate" },
825
+ {
826
+ path: "comment.content.attachments.video.posters.urlExpirationDate"
827
+ },
828
+ { path: "comment.content.attachments.audio.urlExpirationDate" },
829
+ {
830
+ path: "comment.content.attachments.document.urlExpirationDate"
831
+ },
832
+ { path: "comment.draftContent.commentDate" },
833
+ {
834
+ path: "comment.draftContent.richContent.metadata.createdTimestamp"
835
+ },
836
+ {
837
+ path: "comment.draftContent.richContent.metadata.updatedTimestamp"
838
+ },
839
+ {
840
+ path: "comment.draftContent.attachments.image.urlExpirationDate"
841
+ },
842
+ {
843
+ path: "comment.draftContent.attachments.video.urlExpirationDate"
844
+ },
845
+ {
846
+ path: "comment.draftContent.attachments.video.posters.urlExpirationDate"
847
+ },
848
+ {
849
+ path: "comment.draftContent.attachments.audio.urlExpirationDate"
850
+ },
851
+ {
852
+ path: "comment.draftContent.attachments.document.urlExpirationDate"
853
+ }
854
+ ]
855
+ },
856
+ {
857
+ transformFn: transformRESTFloatToSDKFloat,
858
+ paths: [
859
+ {
860
+ path: "comment.content.richContent.nodes.galleryData.items.image.media.duration"
861
+ },
862
+ {
863
+ path: "comment.content.richContent.nodes.galleryData.items.video.media.duration"
864
+ },
865
+ {
866
+ path: "comment.content.richContent.nodes.galleryData.items.video.thumbnail.duration"
867
+ },
868
+ {
869
+ path: "comment.content.richContent.nodes.galleryData.options.item.ratio"
870
+ },
871
+ {
872
+ path: "comment.content.richContent.nodes.imageData.image.duration"
873
+ },
874
+ {
875
+ path: "comment.content.richContent.nodes.mapData.mapSettings.lat"
876
+ },
877
+ {
878
+ path: "comment.content.richContent.nodes.mapData.mapSettings.lng"
879
+ },
880
+ {
881
+ path: "comment.content.richContent.nodes.pollData.poll.image.duration"
882
+ },
883
+ {
884
+ path: "comment.content.richContent.nodes.pollData.poll.options.image.duration"
885
+ },
886
+ {
887
+ path: "comment.content.richContent.nodes.pollData.design.poll.background.image.duration"
888
+ },
889
+ {
890
+ path: "comment.content.richContent.nodes.appEmbedData.image.duration"
891
+ },
892
+ {
893
+ path: "comment.content.richContent.nodes.videoData.video.duration"
894
+ },
895
+ {
896
+ path: "comment.content.richContent.nodes.videoData.thumbnail.duration"
897
+ },
898
+ {
899
+ path: "comment.content.richContent.nodes.audioData.audio.duration"
900
+ },
901
+ {
902
+ path: "comment.content.richContent.nodes.audioData.coverImage.duration"
903
+ },
904
+ {
905
+ path: "comment.draftContent.richContent.nodes.galleryData.items.image.media.duration"
906
+ },
907
+ {
908
+ path: "comment.draftContent.richContent.nodes.galleryData.items.video.media.duration"
909
+ },
910
+ {
911
+ path: "comment.draftContent.richContent.nodes.galleryData.items.video.thumbnail.duration"
912
+ },
913
+ {
914
+ path: "comment.draftContent.richContent.nodes.galleryData.options.item.ratio"
915
+ },
916
+ {
917
+ path: "comment.draftContent.richContent.nodes.imageData.image.duration"
918
+ },
919
+ {
920
+ path: "comment.draftContent.richContent.nodes.mapData.mapSettings.lat"
921
+ },
922
+ {
923
+ path: "comment.draftContent.richContent.nodes.mapData.mapSettings.lng"
924
+ },
925
+ {
926
+ path: "comment.draftContent.richContent.nodes.pollData.poll.image.duration"
927
+ },
928
+ {
929
+ path: "comment.draftContent.richContent.nodes.pollData.poll.options.image.duration"
930
+ },
931
+ {
932
+ path: "comment.draftContent.richContent.nodes.pollData.design.poll.background.image.duration"
933
+ },
934
+ {
935
+ path: "comment.draftContent.richContent.nodes.appEmbedData.image.duration"
936
+ },
937
+ {
938
+ path: "comment.draftContent.richContent.nodes.videoData.video.duration"
939
+ },
940
+ {
941
+ path: "comment.draftContent.richContent.nodes.videoData.thumbnail.duration"
942
+ },
943
+ {
944
+ path: "comment.draftContent.richContent.nodes.audioData.audio.duration"
945
+ },
946
+ {
947
+ path: "comment.draftContent.richContent.nodes.audioData.coverImage.duration"
948
+ }
949
+ ]
950
+ }
951
+ ])
952
+ };
953
+ return metadata;
954
+ }
955
+ return __moderateDraftContent;
956
+ }
957
+ function queryComments(payload) {
958
+ function __queryComments({ host }) {
959
+ const metadata = {
960
+ entityFqdn: "wix.comments.v2.comment",
961
+ method: "POST",
962
+ methodFqn: "wix.comments.ng.v1.CommentsNg.QueryComments",
963
+ packageName: PACKAGE_NAME,
964
+ url: resolveWixCommentsNgV1CommentsNgUrl({
965
+ protoPath: "/v1/comments/query-cursor",
966
+ data: payload,
967
+ host
968
+ }),
969
+ data: payload,
970
+ transformResponse: (payload2) => transformPaths(payload2, [
971
+ {
972
+ transformFn: transformRESTTimestampToSDKTimestamp,
973
+ paths: [
974
+ { path: "comments.createdDate" },
975
+ { path: "comments.updatedDate" },
976
+ { path: "comments.commentDate" },
977
+ { path: "comments.content.commentDate" },
978
+ {
979
+ path: "comments.content.richContent.metadata.createdTimestamp"
980
+ },
981
+ {
982
+ path: "comments.content.richContent.metadata.updatedTimestamp"
983
+ },
984
+ { path: "comments.content.attachments.image.urlExpirationDate" },
985
+ { path: "comments.content.attachments.video.urlExpirationDate" },
986
+ {
987
+ path: "comments.content.attachments.video.posters.urlExpirationDate"
988
+ },
989
+ { path: "comments.content.attachments.audio.urlExpirationDate" },
990
+ {
991
+ path: "comments.content.attachments.document.urlExpirationDate"
992
+ },
993
+ { path: "comments.draftContent.commentDate" },
994
+ {
995
+ path: "comments.draftContent.richContent.metadata.createdTimestamp"
996
+ },
997
+ {
998
+ path: "comments.draftContent.richContent.metadata.updatedTimestamp"
999
+ },
1000
+ {
1001
+ path: "comments.draftContent.attachments.image.urlExpirationDate"
1002
+ },
1003
+ {
1004
+ path: "comments.draftContent.attachments.video.urlExpirationDate"
1005
+ },
1006
+ {
1007
+ path: "comments.draftContent.attachments.video.posters.urlExpirationDate"
1008
+ },
1009
+ {
1010
+ path: "comments.draftContent.attachments.audio.urlExpirationDate"
1011
+ },
1012
+ {
1013
+ path: "comments.draftContent.attachments.document.urlExpirationDate"
1014
+ }
1015
+ ]
1016
+ },
1017
+ {
1018
+ transformFn: transformRESTFloatToSDKFloat,
1019
+ paths: [
1020
+ {
1021
+ path: "comments.content.richContent.nodes.galleryData.items.image.media.duration"
1022
+ },
1023
+ {
1024
+ path: "comments.content.richContent.nodes.galleryData.items.video.media.duration"
1025
+ },
1026
+ {
1027
+ path: "comments.content.richContent.nodes.galleryData.items.video.thumbnail.duration"
1028
+ },
1029
+ {
1030
+ path: "comments.content.richContent.nodes.galleryData.options.item.ratio"
1031
+ },
1032
+ {
1033
+ path: "comments.content.richContent.nodes.imageData.image.duration"
1034
+ },
1035
+ {
1036
+ path: "comments.content.richContent.nodes.mapData.mapSettings.lat"
1037
+ },
1038
+ {
1039
+ path: "comments.content.richContent.nodes.mapData.mapSettings.lng"
1040
+ },
1041
+ {
1042
+ path: "comments.content.richContent.nodes.pollData.poll.image.duration"
1043
+ },
1044
+ {
1045
+ path: "comments.content.richContent.nodes.pollData.poll.options.image.duration"
1046
+ },
1047
+ {
1048
+ path: "comments.content.richContent.nodes.pollData.design.poll.background.image.duration"
1049
+ },
1050
+ {
1051
+ path: "comments.content.richContent.nodes.appEmbedData.image.duration"
1052
+ },
1053
+ {
1054
+ path: "comments.content.richContent.nodes.videoData.video.duration"
1055
+ },
1056
+ {
1057
+ path: "comments.content.richContent.nodes.videoData.thumbnail.duration"
1058
+ },
1059
+ {
1060
+ path: "comments.content.richContent.nodes.audioData.audio.duration"
1061
+ },
1062
+ {
1063
+ path: "comments.content.richContent.nodes.audioData.coverImage.duration"
1064
+ },
1065
+ {
1066
+ path: "comments.draftContent.richContent.nodes.galleryData.items.image.media.duration"
1067
+ },
1068
+ {
1069
+ path: "comments.draftContent.richContent.nodes.galleryData.items.video.media.duration"
1070
+ },
1071
+ {
1072
+ path: "comments.draftContent.richContent.nodes.galleryData.items.video.thumbnail.duration"
1073
+ },
1074
+ {
1075
+ path: "comments.draftContent.richContent.nodes.galleryData.options.item.ratio"
1076
+ },
1077
+ {
1078
+ path: "comments.draftContent.richContent.nodes.imageData.image.duration"
1079
+ },
1080
+ {
1081
+ path: "comments.draftContent.richContent.nodes.mapData.mapSettings.lat"
1082
+ },
1083
+ {
1084
+ path: "comments.draftContent.richContent.nodes.mapData.mapSettings.lng"
1085
+ },
1086
+ {
1087
+ path: "comments.draftContent.richContent.nodes.pollData.poll.image.duration"
1088
+ },
1089
+ {
1090
+ path: "comments.draftContent.richContent.nodes.pollData.poll.options.image.duration"
1091
+ },
1092
+ {
1093
+ path: "comments.draftContent.richContent.nodes.pollData.design.poll.background.image.duration"
1094
+ },
1095
+ {
1096
+ path: "comments.draftContent.richContent.nodes.appEmbedData.image.duration"
1097
+ },
1098
+ {
1099
+ path: "comments.draftContent.richContent.nodes.videoData.video.duration"
1100
+ },
1101
+ {
1102
+ path: "comments.draftContent.richContent.nodes.videoData.thumbnail.duration"
1103
+ },
1104
+ {
1105
+ path: "comments.draftContent.richContent.nodes.audioData.audio.duration"
1106
+ },
1107
+ {
1108
+ path: "comments.draftContent.richContent.nodes.audioData.coverImage.duration"
1109
+ }
1110
+ ]
1111
+ }
1112
+ ])
1113
+ };
1114
+ return metadata;
1115
+ }
1116
+ return __queryComments;
1117
+ }
1118
+ function markComment(payload) {
1119
+ function __markComment({ host }) {
1120
+ const metadata = {
1121
+ entityFqdn: "wix.comments.v2.comment",
1122
+ method: "PUT",
1123
+ methodFqn: "wix.comments.ng.v1.CommentsNg.MarkComment",
1124
+ packageName: PACKAGE_NAME,
1125
+ url: resolveWixCommentsNgV1CommentsNgUrl({
1126
+ protoPath: "/v1/comments/{commentId}/mark",
1127
+ data: payload,
1128
+ host
1129
+ }),
1130
+ data: payload,
1131
+ transformResponse: (payload2) => transformPaths(payload2, [
1132
+ {
1133
+ transformFn: transformRESTTimestampToSDKTimestamp,
1134
+ paths: [
1135
+ { path: "comment.createdDate" },
1136
+ { path: "comment.updatedDate" },
1137
+ { path: "comment.commentDate" },
1138
+ { path: "comment.content.commentDate" },
1139
+ { path: "comment.content.richContent.metadata.createdTimestamp" },
1140
+ { path: "comment.content.richContent.metadata.updatedTimestamp" },
1141
+ { path: "comment.content.attachments.image.urlExpirationDate" },
1142
+ { path: "comment.content.attachments.video.urlExpirationDate" },
1143
+ {
1144
+ path: "comment.content.attachments.video.posters.urlExpirationDate"
1145
+ },
1146
+ { path: "comment.content.attachments.audio.urlExpirationDate" },
1147
+ {
1148
+ path: "comment.content.attachments.document.urlExpirationDate"
1149
+ },
1150
+ { path: "comment.draftContent.commentDate" },
1151
+ {
1152
+ path: "comment.draftContent.richContent.metadata.createdTimestamp"
1153
+ },
1154
+ {
1155
+ path: "comment.draftContent.richContent.metadata.updatedTimestamp"
1156
+ },
1157
+ {
1158
+ path: "comment.draftContent.attachments.image.urlExpirationDate"
1159
+ },
1160
+ {
1161
+ path: "comment.draftContent.attachments.video.urlExpirationDate"
1162
+ },
1163
+ {
1164
+ path: "comment.draftContent.attachments.video.posters.urlExpirationDate"
1165
+ },
1166
+ {
1167
+ path: "comment.draftContent.attachments.audio.urlExpirationDate"
1168
+ },
1169
+ {
1170
+ path: "comment.draftContent.attachments.document.urlExpirationDate"
1171
+ }
1172
+ ]
1173
+ },
1174
+ {
1175
+ transformFn: transformRESTFloatToSDKFloat,
1176
+ paths: [
1177
+ {
1178
+ path: "comment.content.richContent.nodes.galleryData.items.image.media.duration"
1179
+ },
1180
+ {
1181
+ path: "comment.content.richContent.nodes.galleryData.items.video.media.duration"
1182
+ },
1183
+ {
1184
+ path: "comment.content.richContent.nodes.galleryData.items.video.thumbnail.duration"
1185
+ },
1186
+ {
1187
+ path: "comment.content.richContent.nodes.galleryData.options.item.ratio"
1188
+ },
1189
+ {
1190
+ path: "comment.content.richContent.nodes.imageData.image.duration"
1191
+ },
1192
+ {
1193
+ path: "comment.content.richContent.nodes.mapData.mapSettings.lat"
1194
+ },
1195
+ {
1196
+ path: "comment.content.richContent.nodes.mapData.mapSettings.lng"
1197
+ },
1198
+ {
1199
+ path: "comment.content.richContent.nodes.pollData.poll.image.duration"
1200
+ },
1201
+ {
1202
+ path: "comment.content.richContent.nodes.pollData.poll.options.image.duration"
1203
+ },
1204
+ {
1205
+ path: "comment.content.richContent.nodes.pollData.design.poll.background.image.duration"
1206
+ },
1207
+ {
1208
+ path: "comment.content.richContent.nodes.appEmbedData.image.duration"
1209
+ },
1210
+ {
1211
+ path: "comment.content.richContent.nodes.videoData.video.duration"
1212
+ },
1213
+ {
1214
+ path: "comment.content.richContent.nodes.videoData.thumbnail.duration"
1215
+ },
1216
+ {
1217
+ path: "comment.content.richContent.nodes.audioData.audio.duration"
1218
+ },
1219
+ {
1220
+ path: "comment.content.richContent.nodes.audioData.coverImage.duration"
1221
+ },
1222
+ {
1223
+ path: "comment.draftContent.richContent.nodes.galleryData.items.image.media.duration"
1224
+ },
1225
+ {
1226
+ path: "comment.draftContent.richContent.nodes.galleryData.items.video.media.duration"
1227
+ },
1228
+ {
1229
+ path: "comment.draftContent.richContent.nodes.galleryData.items.video.thumbnail.duration"
1230
+ },
1231
+ {
1232
+ path: "comment.draftContent.richContent.nodes.galleryData.options.item.ratio"
1233
+ },
1234
+ {
1235
+ path: "comment.draftContent.richContent.nodes.imageData.image.duration"
1236
+ },
1237
+ {
1238
+ path: "comment.draftContent.richContent.nodes.mapData.mapSettings.lat"
1239
+ },
1240
+ {
1241
+ path: "comment.draftContent.richContent.nodes.mapData.mapSettings.lng"
1242
+ },
1243
+ {
1244
+ path: "comment.draftContent.richContent.nodes.pollData.poll.image.duration"
1245
+ },
1246
+ {
1247
+ path: "comment.draftContent.richContent.nodes.pollData.poll.options.image.duration"
1248
+ },
1249
+ {
1250
+ path: "comment.draftContent.richContent.nodes.pollData.design.poll.background.image.duration"
1251
+ },
1252
+ {
1253
+ path: "comment.draftContent.richContent.nodes.appEmbedData.image.duration"
1254
+ },
1255
+ {
1256
+ path: "comment.draftContent.richContent.nodes.videoData.video.duration"
1257
+ },
1258
+ {
1259
+ path: "comment.draftContent.richContent.nodes.videoData.thumbnail.duration"
1260
+ },
1261
+ {
1262
+ path: "comment.draftContent.richContent.nodes.audioData.audio.duration"
1263
+ },
1264
+ {
1265
+ path: "comment.draftContent.richContent.nodes.audioData.coverImage.duration"
1266
+ }
1267
+ ]
1268
+ }
1269
+ ])
1270
+ };
1271
+ return metadata;
1272
+ }
1273
+ return __markComment;
1274
+ }
1275
+ function unmarkComment(payload) {
1276
+ function __unmarkComment({ host }) {
1277
+ const metadata = {
1278
+ entityFqdn: "wix.comments.v2.comment",
1279
+ method: "PUT",
1280
+ methodFqn: "wix.comments.ng.v1.CommentsNg.UnmarkComment",
1281
+ packageName: PACKAGE_NAME,
1282
+ url: resolveWixCommentsNgV1CommentsNgUrl({
1283
+ protoPath: "/v1/comments/{commentId}/unmark",
1284
+ data: payload,
1285
+ host
1286
+ }),
1287
+ data: payload,
1288
+ transformResponse: (payload2) => transformPaths(payload2, [
1289
+ {
1290
+ transformFn: transformRESTTimestampToSDKTimestamp,
1291
+ paths: [
1292
+ { path: "comment.createdDate" },
1293
+ { path: "comment.updatedDate" },
1294
+ { path: "comment.commentDate" },
1295
+ { path: "comment.content.commentDate" },
1296
+ { path: "comment.content.richContent.metadata.createdTimestamp" },
1297
+ { path: "comment.content.richContent.metadata.updatedTimestamp" },
1298
+ { path: "comment.content.attachments.image.urlExpirationDate" },
1299
+ { path: "comment.content.attachments.video.urlExpirationDate" },
1300
+ {
1301
+ path: "comment.content.attachments.video.posters.urlExpirationDate"
1302
+ },
1303
+ { path: "comment.content.attachments.audio.urlExpirationDate" },
1304
+ {
1305
+ path: "comment.content.attachments.document.urlExpirationDate"
1306
+ },
1307
+ { path: "comment.draftContent.commentDate" },
1308
+ {
1309
+ path: "comment.draftContent.richContent.metadata.createdTimestamp"
1310
+ },
1311
+ {
1312
+ path: "comment.draftContent.richContent.metadata.updatedTimestamp"
1313
+ },
1314
+ {
1315
+ path: "comment.draftContent.attachments.image.urlExpirationDate"
1316
+ },
1317
+ {
1318
+ path: "comment.draftContent.attachments.video.urlExpirationDate"
1319
+ },
1320
+ {
1321
+ path: "comment.draftContent.attachments.video.posters.urlExpirationDate"
1322
+ },
1323
+ {
1324
+ path: "comment.draftContent.attachments.audio.urlExpirationDate"
1325
+ },
1326
+ {
1327
+ path: "comment.draftContent.attachments.document.urlExpirationDate"
1328
+ }
1329
+ ]
1330
+ },
1331
+ {
1332
+ transformFn: transformRESTFloatToSDKFloat,
1333
+ paths: [
1334
+ {
1335
+ path: "comment.content.richContent.nodes.galleryData.items.image.media.duration"
1336
+ },
1337
+ {
1338
+ path: "comment.content.richContent.nodes.galleryData.items.video.media.duration"
1339
+ },
1340
+ {
1341
+ path: "comment.content.richContent.nodes.galleryData.items.video.thumbnail.duration"
1342
+ },
1343
+ {
1344
+ path: "comment.content.richContent.nodes.galleryData.options.item.ratio"
1345
+ },
1346
+ {
1347
+ path: "comment.content.richContent.nodes.imageData.image.duration"
1348
+ },
1349
+ {
1350
+ path: "comment.content.richContent.nodes.mapData.mapSettings.lat"
1351
+ },
1352
+ {
1353
+ path: "comment.content.richContent.nodes.mapData.mapSettings.lng"
1354
+ },
1355
+ {
1356
+ path: "comment.content.richContent.nodes.pollData.poll.image.duration"
1357
+ },
1358
+ {
1359
+ path: "comment.content.richContent.nodes.pollData.poll.options.image.duration"
1360
+ },
1361
+ {
1362
+ path: "comment.content.richContent.nodes.pollData.design.poll.background.image.duration"
1363
+ },
1364
+ {
1365
+ path: "comment.content.richContent.nodes.appEmbedData.image.duration"
1366
+ },
1367
+ {
1368
+ path: "comment.content.richContent.nodes.videoData.video.duration"
1369
+ },
1370
+ {
1371
+ path: "comment.content.richContent.nodes.videoData.thumbnail.duration"
1372
+ },
1373
+ {
1374
+ path: "comment.content.richContent.nodes.audioData.audio.duration"
1375
+ },
1376
+ {
1377
+ path: "comment.content.richContent.nodes.audioData.coverImage.duration"
1378
+ },
1379
+ {
1380
+ path: "comment.draftContent.richContent.nodes.galleryData.items.image.media.duration"
1381
+ },
1382
+ {
1383
+ path: "comment.draftContent.richContent.nodes.galleryData.items.video.media.duration"
1384
+ },
1385
+ {
1386
+ path: "comment.draftContent.richContent.nodes.galleryData.items.video.thumbnail.duration"
1387
+ },
1388
+ {
1389
+ path: "comment.draftContent.richContent.nodes.galleryData.options.item.ratio"
1390
+ },
1391
+ {
1392
+ path: "comment.draftContent.richContent.nodes.imageData.image.duration"
1393
+ },
1394
+ {
1395
+ path: "comment.draftContent.richContent.nodes.mapData.mapSettings.lat"
1396
+ },
1397
+ {
1398
+ path: "comment.draftContent.richContent.nodes.mapData.mapSettings.lng"
1399
+ },
1400
+ {
1401
+ path: "comment.draftContent.richContent.nodes.pollData.poll.image.duration"
1402
+ },
1403
+ {
1404
+ path: "comment.draftContent.richContent.nodes.pollData.poll.options.image.duration"
1405
+ },
1406
+ {
1407
+ path: "comment.draftContent.richContent.nodes.pollData.design.poll.background.image.duration"
1408
+ },
1409
+ {
1410
+ path: "comment.draftContent.richContent.nodes.appEmbedData.image.duration"
1411
+ },
1412
+ {
1413
+ path: "comment.draftContent.richContent.nodes.videoData.video.duration"
1414
+ },
1415
+ {
1416
+ path: "comment.draftContent.richContent.nodes.videoData.thumbnail.duration"
1417
+ },
1418
+ {
1419
+ path: "comment.draftContent.richContent.nodes.audioData.audio.duration"
1420
+ },
1421
+ {
1422
+ path: "comment.draftContent.richContent.nodes.audioData.coverImage.duration"
1423
+ }
1424
+ ]
1425
+ }
1426
+ ])
1427
+ };
1428
+ return metadata;
1429
+ }
1430
+ return __unmarkComment;
1431
+ }
1432
+ function hideComment(payload) {
1433
+ function __hideComment({ host }) {
1434
+ const metadata = {
1435
+ entityFqdn: "wix.comments.v2.comment",
1436
+ method: "PUT",
1437
+ methodFqn: "wix.comments.ng.v1.CommentsNg.HideComment",
1438
+ packageName: PACKAGE_NAME,
1439
+ url: resolveWixCommentsNgV1CommentsNgUrl({
1440
+ protoPath: "/v1/comments/{commentId}/hide",
1441
+ data: payload,
1442
+ host
1443
+ }),
1444
+ data: payload,
1445
+ transformResponse: (payload2) => transformPaths(payload2, [
1446
+ {
1447
+ transformFn: transformRESTTimestampToSDKTimestamp,
1448
+ paths: [
1449
+ { path: "comment.createdDate" },
1450
+ { path: "comment.updatedDate" },
1451
+ { path: "comment.commentDate" },
1452
+ { path: "comment.content.commentDate" },
1453
+ { path: "comment.content.richContent.metadata.createdTimestamp" },
1454
+ { path: "comment.content.richContent.metadata.updatedTimestamp" },
1455
+ { path: "comment.content.attachments.image.urlExpirationDate" },
1456
+ { path: "comment.content.attachments.video.urlExpirationDate" },
1457
+ {
1458
+ path: "comment.content.attachments.video.posters.urlExpirationDate"
1459
+ },
1460
+ { path: "comment.content.attachments.audio.urlExpirationDate" },
1461
+ {
1462
+ path: "comment.content.attachments.document.urlExpirationDate"
1463
+ },
1464
+ { path: "comment.draftContent.commentDate" },
1465
+ {
1466
+ path: "comment.draftContent.richContent.metadata.createdTimestamp"
1467
+ },
1468
+ {
1469
+ path: "comment.draftContent.richContent.metadata.updatedTimestamp"
1470
+ },
1471
+ {
1472
+ path: "comment.draftContent.attachments.image.urlExpirationDate"
1473
+ },
1474
+ {
1475
+ path: "comment.draftContent.attachments.video.urlExpirationDate"
1476
+ },
1477
+ {
1478
+ path: "comment.draftContent.attachments.video.posters.urlExpirationDate"
1479
+ },
1480
+ {
1481
+ path: "comment.draftContent.attachments.audio.urlExpirationDate"
1482
+ },
1483
+ {
1484
+ path: "comment.draftContent.attachments.document.urlExpirationDate"
1485
+ }
1486
+ ]
1487
+ },
1488
+ {
1489
+ transformFn: transformRESTFloatToSDKFloat,
1490
+ paths: [
1491
+ {
1492
+ path: "comment.content.richContent.nodes.galleryData.items.image.media.duration"
1493
+ },
1494
+ {
1495
+ path: "comment.content.richContent.nodes.galleryData.items.video.media.duration"
1496
+ },
1497
+ {
1498
+ path: "comment.content.richContent.nodes.galleryData.items.video.thumbnail.duration"
1499
+ },
1500
+ {
1501
+ path: "comment.content.richContent.nodes.galleryData.options.item.ratio"
1502
+ },
1503
+ {
1504
+ path: "comment.content.richContent.nodes.imageData.image.duration"
1505
+ },
1506
+ {
1507
+ path: "comment.content.richContent.nodes.mapData.mapSettings.lat"
1508
+ },
1509
+ {
1510
+ path: "comment.content.richContent.nodes.mapData.mapSettings.lng"
1511
+ },
1512
+ {
1513
+ path: "comment.content.richContent.nodes.pollData.poll.image.duration"
1514
+ },
1515
+ {
1516
+ path: "comment.content.richContent.nodes.pollData.poll.options.image.duration"
1517
+ },
1518
+ {
1519
+ path: "comment.content.richContent.nodes.pollData.design.poll.background.image.duration"
1520
+ },
1521
+ {
1522
+ path: "comment.content.richContent.nodes.appEmbedData.image.duration"
1523
+ },
1524
+ {
1525
+ path: "comment.content.richContent.nodes.videoData.video.duration"
1526
+ },
1527
+ {
1528
+ path: "comment.content.richContent.nodes.videoData.thumbnail.duration"
1529
+ },
1530
+ {
1531
+ path: "comment.content.richContent.nodes.audioData.audio.duration"
1532
+ },
1533
+ {
1534
+ path: "comment.content.richContent.nodes.audioData.coverImage.duration"
1535
+ },
1536
+ {
1537
+ path: "comment.draftContent.richContent.nodes.galleryData.items.image.media.duration"
1538
+ },
1539
+ {
1540
+ path: "comment.draftContent.richContent.nodes.galleryData.items.video.media.duration"
1541
+ },
1542
+ {
1543
+ path: "comment.draftContent.richContent.nodes.galleryData.items.video.thumbnail.duration"
1544
+ },
1545
+ {
1546
+ path: "comment.draftContent.richContent.nodes.galleryData.options.item.ratio"
1547
+ },
1548
+ {
1549
+ path: "comment.draftContent.richContent.nodes.imageData.image.duration"
1550
+ },
1551
+ {
1552
+ path: "comment.draftContent.richContent.nodes.mapData.mapSettings.lat"
1553
+ },
1554
+ {
1555
+ path: "comment.draftContent.richContent.nodes.mapData.mapSettings.lng"
1556
+ },
1557
+ {
1558
+ path: "comment.draftContent.richContent.nodes.pollData.poll.image.duration"
1559
+ },
1560
+ {
1561
+ path: "comment.draftContent.richContent.nodes.pollData.poll.options.image.duration"
1562
+ },
1563
+ {
1564
+ path: "comment.draftContent.richContent.nodes.pollData.design.poll.background.image.duration"
1565
+ },
1566
+ {
1567
+ path: "comment.draftContent.richContent.nodes.appEmbedData.image.duration"
1568
+ },
1569
+ {
1570
+ path: "comment.draftContent.richContent.nodes.videoData.video.duration"
1571
+ },
1572
+ {
1573
+ path: "comment.draftContent.richContent.nodes.videoData.thumbnail.duration"
1574
+ },
1575
+ {
1576
+ path: "comment.draftContent.richContent.nodes.audioData.audio.duration"
1577
+ },
1578
+ {
1579
+ path: "comment.draftContent.richContent.nodes.audioData.coverImage.duration"
1580
+ }
1581
+ ]
1582
+ }
1583
+ ])
1584
+ };
1585
+ return metadata;
1586
+ }
1587
+ return __hideComment;
1588
+ }
1589
+ function publishComment(payload) {
1590
+ function __publishComment({ host }) {
1591
+ const metadata = {
1592
+ entityFqdn: "wix.comments.v2.comment",
1593
+ method: "PUT",
1594
+ methodFqn: "wix.comments.ng.v1.CommentsNg.PublishComment",
1595
+ packageName: PACKAGE_NAME,
1596
+ url: resolveWixCommentsNgV1CommentsNgUrl({
1597
+ protoPath: "/v1/comments/{commentId}/publish",
1598
+ data: payload,
1599
+ host
1600
+ }),
1601
+ data: payload,
1602
+ transformResponse: (payload2) => transformPaths(payload2, [
1603
+ {
1604
+ transformFn: transformRESTTimestampToSDKTimestamp,
1605
+ paths: [
1606
+ { path: "comment.createdDate" },
1607
+ { path: "comment.updatedDate" },
1608
+ { path: "comment.commentDate" },
1609
+ { path: "comment.content.commentDate" },
1610
+ { path: "comment.content.richContent.metadata.createdTimestamp" },
1611
+ { path: "comment.content.richContent.metadata.updatedTimestamp" },
1612
+ { path: "comment.content.attachments.image.urlExpirationDate" },
1613
+ { path: "comment.content.attachments.video.urlExpirationDate" },
1614
+ {
1615
+ path: "comment.content.attachments.video.posters.urlExpirationDate"
1616
+ },
1617
+ { path: "comment.content.attachments.audio.urlExpirationDate" },
1618
+ {
1619
+ path: "comment.content.attachments.document.urlExpirationDate"
1620
+ },
1621
+ { path: "comment.draftContent.commentDate" },
1622
+ {
1623
+ path: "comment.draftContent.richContent.metadata.createdTimestamp"
1624
+ },
1625
+ {
1626
+ path: "comment.draftContent.richContent.metadata.updatedTimestamp"
1627
+ },
1628
+ {
1629
+ path: "comment.draftContent.attachments.image.urlExpirationDate"
1630
+ },
1631
+ {
1632
+ path: "comment.draftContent.attachments.video.urlExpirationDate"
1633
+ },
1634
+ {
1635
+ path: "comment.draftContent.attachments.video.posters.urlExpirationDate"
1636
+ },
1637
+ {
1638
+ path: "comment.draftContent.attachments.audio.urlExpirationDate"
1639
+ },
1640
+ {
1641
+ path: "comment.draftContent.attachments.document.urlExpirationDate"
1642
+ }
1643
+ ]
1644
+ },
1645
+ {
1646
+ transformFn: transformRESTFloatToSDKFloat,
1647
+ paths: [
1648
+ {
1649
+ path: "comment.content.richContent.nodes.galleryData.items.image.media.duration"
1650
+ },
1651
+ {
1652
+ path: "comment.content.richContent.nodes.galleryData.items.video.media.duration"
1653
+ },
1654
+ {
1655
+ path: "comment.content.richContent.nodes.galleryData.items.video.thumbnail.duration"
1656
+ },
1657
+ {
1658
+ path: "comment.content.richContent.nodes.galleryData.options.item.ratio"
1659
+ },
1660
+ {
1661
+ path: "comment.content.richContent.nodes.imageData.image.duration"
1662
+ },
1663
+ {
1664
+ path: "comment.content.richContent.nodes.mapData.mapSettings.lat"
1665
+ },
1666
+ {
1667
+ path: "comment.content.richContent.nodes.mapData.mapSettings.lng"
1668
+ },
1669
+ {
1670
+ path: "comment.content.richContent.nodes.pollData.poll.image.duration"
1671
+ },
1672
+ {
1673
+ path: "comment.content.richContent.nodes.pollData.poll.options.image.duration"
1674
+ },
1675
+ {
1676
+ path: "comment.content.richContent.nodes.pollData.design.poll.background.image.duration"
1677
+ },
1678
+ {
1679
+ path: "comment.content.richContent.nodes.appEmbedData.image.duration"
1680
+ },
1681
+ {
1682
+ path: "comment.content.richContent.nodes.videoData.video.duration"
1683
+ },
1684
+ {
1685
+ path: "comment.content.richContent.nodes.videoData.thumbnail.duration"
1686
+ },
1687
+ {
1688
+ path: "comment.content.richContent.nodes.audioData.audio.duration"
1689
+ },
1690
+ {
1691
+ path: "comment.content.richContent.nodes.audioData.coverImage.duration"
1692
+ },
1693
+ {
1694
+ path: "comment.draftContent.richContent.nodes.galleryData.items.image.media.duration"
1695
+ },
1696
+ {
1697
+ path: "comment.draftContent.richContent.nodes.galleryData.items.video.media.duration"
1698
+ },
1699
+ {
1700
+ path: "comment.draftContent.richContent.nodes.galleryData.items.video.thumbnail.duration"
1701
+ },
1702
+ {
1703
+ path: "comment.draftContent.richContent.nodes.galleryData.options.item.ratio"
1704
+ },
1705
+ {
1706
+ path: "comment.draftContent.richContent.nodes.imageData.image.duration"
1707
+ },
1708
+ {
1709
+ path: "comment.draftContent.richContent.nodes.mapData.mapSettings.lat"
1710
+ },
1711
+ {
1712
+ path: "comment.draftContent.richContent.nodes.mapData.mapSettings.lng"
1713
+ },
1714
+ {
1715
+ path: "comment.draftContent.richContent.nodes.pollData.poll.image.duration"
1716
+ },
1717
+ {
1718
+ path: "comment.draftContent.richContent.nodes.pollData.poll.options.image.duration"
1719
+ },
1720
+ {
1721
+ path: "comment.draftContent.richContent.nodes.pollData.design.poll.background.image.duration"
1722
+ },
1723
+ {
1724
+ path: "comment.draftContent.richContent.nodes.appEmbedData.image.duration"
1725
+ },
1726
+ {
1727
+ path: "comment.draftContent.richContent.nodes.videoData.video.duration"
1728
+ },
1729
+ {
1730
+ path: "comment.draftContent.richContent.nodes.videoData.thumbnail.duration"
1731
+ },
1732
+ {
1733
+ path: "comment.draftContent.richContent.nodes.audioData.audio.duration"
1734
+ },
1735
+ {
1736
+ path: "comment.draftContent.richContent.nodes.audioData.coverImage.duration"
1737
+ }
1738
+ ]
1739
+ }
1740
+ ])
1741
+ };
1742
+ return metadata;
1743
+ }
1744
+ return __publishComment;
1745
+ }
1746
+ function countComments(payload) {
1747
+ function __countComments({ host }) {
1748
+ const metadata = {
1749
+ entityFqdn: "wix.comments.v2.comment",
1750
+ method: "POST",
1751
+ methodFqn: "wix.comments.ng.v1.CommentsNg.CountComments",
1752
+ packageName: PACKAGE_NAME,
1753
+ url: resolveWixCommentsNgV1CommentsNgUrl({
1754
+ protoPath: "/v1/comments/count",
1755
+ data: payload,
1756
+ host
1757
+ }),
1758
+ data: payload
1759
+ };
1760
+ return metadata;
1761
+ }
1762
+ return __countComments;
1763
+ }
1764
+ function listCommentsByResource(payload) {
1765
+ function __listCommentsByResource({ host }) {
1766
+ const metadata = {
1767
+ entityFqdn: "wix.comments.v2.comment",
1768
+ method: "GET",
1769
+ methodFqn: "wix.comments.ng.v1.CommentsNg.ListCommentsByResource",
1770
+ packageName: PACKAGE_NAME,
1771
+ url: resolveWixCommentsNgV1CommentsNgUrl({
1772
+ protoPath: "/v1/comments/list-by-resource",
1773
+ data: payload,
1774
+ host
1775
+ }),
1776
+ params: toURLSearchParams(payload),
1777
+ transformResponse: (payload2) => transformPaths(payload2, [
1778
+ {
1779
+ transformFn: transformRESTTimestampToSDKTimestamp,
1780
+ paths: [
1781
+ { path: "comments.createdDate" },
1782
+ { path: "comments.updatedDate" },
1783
+ { path: "comments.commentDate" },
1784
+ { path: "comments.content.commentDate" },
1785
+ {
1786
+ path: "comments.content.richContent.metadata.createdTimestamp"
1787
+ },
1788
+ {
1789
+ path: "comments.content.richContent.metadata.updatedTimestamp"
1790
+ },
1791
+ { path: "comments.content.attachments.image.urlExpirationDate" },
1792
+ { path: "comments.content.attachments.video.urlExpirationDate" },
1793
+ {
1794
+ path: "comments.content.attachments.video.posters.urlExpirationDate"
1795
+ },
1796
+ { path: "comments.content.attachments.audio.urlExpirationDate" },
1797
+ {
1798
+ path: "comments.content.attachments.document.urlExpirationDate"
1799
+ },
1800
+ { path: "comments.draftContent.commentDate" },
1801
+ {
1802
+ path: "comments.draftContent.richContent.metadata.createdTimestamp"
1803
+ },
1804
+ {
1805
+ path: "comments.draftContent.richContent.metadata.updatedTimestamp"
1806
+ },
1807
+ {
1808
+ path: "comments.draftContent.attachments.image.urlExpirationDate"
1809
+ },
1810
+ {
1811
+ path: "comments.draftContent.attachments.video.urlExpirationDate"
1812
+ },
1813
+ {
1814
+ path: "comments.draftContent.attachments.video.posters.urlExpirationDate"
1815
+ },
1816
+ {
1817
+ path: "comments.draftContent.attachments.audio.urlExpirationDate"
1818
+ },
1819
+ {
1820
+ path: "comments.draftContent.attachments.document.urlExpirationDate"
1821
+ },
1822
+ { path: "commentReplies.*.replies.createdDate" },
1823
+ { path: "commentReplies.*.replies.updatedDate" },
1824
+ { path: "commentReplies.*.replies.commentDate" },
1825
+ { path: "commentReplies.*.replies.content.commentDate" },
1826
+ {
1827
+ path: "commentReplies.*.replies.content.richContent.metadata.createdTimestamp"
1828
+ },
1829
+ {
1830
+ path: "commentReplies.*.replies.content.richContent.metadata.updatedTimestamp"
1831
+ },
1832
+ {
1833
+ path: "commentReplies.*.replies.content.attachments.image.urlExpirationDate"
1834
+ },
1835
+ {
1836
+ path: "commentReplies.*.replies.content.attachments.video.urlExpirationDate"
1837
+ },
1838
+ {
1839
+ path: "commentReplies.*.replies.content.attachments.video.posters.urlExpirationDate"
1840
+ },
1841
+ {
1842
+ path: "commentReplies.*.replies.content.attachments.audio.urlExpirationDate"
1843
+ },
1844
+ {
1845
+ path: "commentReplies.*.replies.content.attachments.document.urlExpirationDate"
1846
+ },
1847
+ { path: "commentReplies.*.replies.draftContent.commentDate" },
1848
+ {
1849
+ path: "commentReplies.*.replies.draftContent.richContent.metadata.createdTimestamp"
1850
+ },
1851
+ {
1852
+ path: "commentReplies.*.replies.draftContent.richContent.metadata.updatedTimestamp"
1853
+ },
1854
+ {
1855
+ path: "commentReplies.*.replies.draftContent.attachments.image.urlExpirationDate"
1856
+ },
1857
+ {
1858
+ path: "commentReplies.*.replies.draftContent.attachments.video.urlExpirationDate"
1859
+ },
1860
+ {
1861
+ path: "commentReplies.*.replies.draftContent.attachments.video.posters.urlExpirationDate"
1862
+ },
1863
+ {
1864
+ path: "commentReplies.*.replies.draftContent.attachments.audio.urlExpirationDate"
1865
+ },
1866
+ {
1867
+ path: "commentReplies.*.replies.draftContent.attachments.document.urlExpirationDate"
1868
+ }
1869
+ ]
1870
+ },
1871
+ {
1872
+ transformFn: transformRESTFloatToSDKFloat,
1873
+ paths: [
1874
+ {
1875
+ path: "comments.content.richContent.nodes.galleryData.items.image.media.duration"
1876
+ },
1877
+ {
1878
+ path: "comments.content.richContent.nodes.galleryData.items.video.media.duration"
1879
+ },
1880
+ {
1881
+ path: "comments.content.richContent.nodes.galleryData.items.video.thumbnail.duration"
1882
+ },
1883
+ {
1884
+ path: "comments.content.richContent.nodes.galleryData.options.item.ratio"
1885
+ },
1886
+ {
1887
+ path: "comments.content.richContent.nodes.imageData.image.duration"
1888
+ },
1889
+ {
1890
+ path: "comments.content.richContent.nodes.mapData.mapSettings.lat"
1891
+ },
1892
+ {
1893
+ path: "comments.content.richContent.nodes.mapData.mapSettings.lng"
1894
+ },
1895
+ {
1896
+ path: "comments.content.richContent.nodes.pollData.poll.image.duration"
1897
+ },
1898
+ {
1899
+ path: "comments.content.richContent.nodes.pollData.poll.options.image.duration"
1900
+ },
1901
+ {
1902
+ path: "comments.content.richContent.nodes.pollData.design.poll.background.image.duration"
1903
+ },
1904
+ {
1905
+ path: "comments.content.richContent.nodes.appEmbedData.image.duration"
1906
+ },
1907
+ {
1908
+ path: "comments.content.richContent.nodes.videoData.video.duration"
1909
+ },
1910
+ {
1911
+ path: "comments.content.richContent.nodes.videoData.thumbnail.duration"
1912
+ },
1913
+ {
1914
+ path: "comments.content.richContent.nodes.audioData.audio.duration"
1915
+ },
1916
+ {
1917
+ path: "comments.content.richContent.nodes.audioData.coverImage.duration"
1918
+ },
1919
+ {
1920
+ path: "comments.draftContent.richContent.nodes.galleryData.items.image.media.duration"
1921
+ },
1922
+ {
1923
+ path: "comments.draftContent.richContent.nodes.galleryData.items.video.media.duration"
1924
+ },
1925
+ {
1926
+ path: "comments.draftContent.richContent.nodes.galleryData.items.video.thumbnail.duration"
1927
+ },
1928
+ {
1929
+ path: "comments.draftContent.richContent.nodes.galleryData.options.item.ratio"
1930
+ },
1931
+ {
1932
+ path: "comments.draftContent.richContent.nodes.imageData.image.duration"
1933
+ },
1934
+ {
1935
+ path: "comments.draftContent.richContent.nodes.mapData.mapSettings.lat"
1936
+ },
1937
+ {
1938
+ path: "comments.draftContent.richContent.nodes.mapData.mapSettings.lng"
1939
+ },
1940
+ {
1941
+ path: "comments.draftContent.richContent.nodes.pollData.poll.image.duration"
1942
+ },
1943
+ {
1944
+ path: "comments.draftContent.richContent.nodes.pollData.poll.options.image.duration"
1945
+ },
1946
+ {
1947
+ path: "comments.draftContent.richContent.nodes.pollData.design.poll.background.image.duration"
1948
+ },
1949
+ {
1950
+ path: "comments.draftContent.richContent.nodes.appEmbedData.image.duration"
1951
+ },
1952
+ {
1953
+ path: "comments.draftContent.richContent.nodes.videoData.video.duration"
1954
+ },
1955
+ {
1956
+ path: "comments.draftContent.richContent.nodes.videoData.thumbnail.duration"
1957
+ },
1958
+ {
1959
+ path: "comments.draftContent.richContent.nodes.audioData.audio.duration"
1960
+ },
1961
+ {
1962
+ path: "comments.draftContent.richContent.nodes.audioData.coverImage.duration"
1963
+ },
1964
+ {
1965
+ path: "commentReplies.*.replies.content.richContent.nodes.galleryData.items.image.media.duration"
1966
+ },
1967
+ {
1968
+ path: "commentReplies.*.replies.content.richContent.nodes.galleryData.items.video.media.duration"
1969
+ },
1970
+ {
1971
+ path: "commentReplies.*.replies.content.richContent.nodes.galleryData.items.video.thumbnail.duration"
1972
+ },
1973
+ {
1974
+ path: "commentReplies.*.replies.content.richContent.nodes.galleryData.options.item.ratio"
1975
+ },
1976
+ {
1977
+ path: "commentReplies.*.replies.content.richContent.nodes.imageData.image.duration"
1978
+ },
1979
+ {
1980
+ path: "commentReplies.*.replies.content.richContent.nodes.mapData.mapSettings.lat"
1981
+ },
1982
+ {
1983
+ path: "commentReplies.*.replies.content.richContent.nodes.mapData.mapSettings.lng"
1984
+ },
1985
+ {
1986
+ path: "commentReplies.*.replies.content.richContent.nodes.pollData.poll.image.duration"
1987
+ },
1988
+ {
1989
+ path: "commentReplies.*.replies.content.richContent.nodes.pollData.poll.options.image.duration"
1990
+ },
1991
+ {
1992
+ path: "commentReplies.*.replies.content.richContent.nodes.pollData.design.poll.background.image.duration"
1993
+ },
1994
+ {
1995
+ path: "commentReplies.*.replies.content.richContent.nodes.appEmbedData.image.duration"
1996
+ },
1997
+ {
1998
+ path: "commentReplies.*.replies.content.richContent.nodes.videoData.video.duration"
1999
+ },
2000
+ {
2001
+ path: "commentReplies.*.replies.content.richContent.nodes.videoData.thumbnail.duration"
2002
+ },
2003
+ {
2004
+ path: "commentReplies.*.replies.content.richContent.nodes.audioData.audio.duration"
2005
+ },
2006
+ {
2007
+ path: "commentReplies.*.replies.content.richContent.nodes.audioData.coverImage.duration"
2008
+ },
2009
+ {
2010
+ path: "commentReplies.*.replies.draftContent.richContent.nodes.galleryData.items.image.media.duration"
2011
+ },
2012
+ {
2013
+ path: "commentReplies.*.replies.draftContent.richContent.nodes.galleryData.items.video.media.duration"
2014
+ },
2015
+ {
2016
+ path: "commentReplies.*.replies.draftContent.richContent.nodes.galleryData.items.video.thumbnail.duration"
2017
+ },
2018
+ {
2019
+ path: "commentReplies.*.replies.draftContent.richContent.nodes.galleryData.options.item.ratio"
2020
+ },
2021
+ {
2022
+ path: "commentReplies.*.replies.draftContent.richContent.nodes.imageData.image.duration"
2023
+ },
2024
+ {
2025
+ path: "commentReplies.*.replies.draftContent.richContent.nodes.mapData.mapSettings.lat"
2026
+ },
2027
+ {
2028
+ path: "commentReplies.*.replies.draftContent.richContent.nodes.mapData.mapSettings.lng"
2029
+ },
2030
+ {
2031
+ path: "commentReplies.*.replies.draftContent.richContent.nodes.pollData.poll.image.duration"
2032
+ },
2033
+ {
2034
+ path: "commentReplies.*.replies.draftContent.richContent.nodes.pollData.poll.options.image.duration"
2035
+ },
2036
+ {
2037
+ path: "commentReplies.*.replies.draftContent.richContent.nodes.pollData.design.poll.background.image.duration"
2038
+ },
2039
+ {
2040
+ path: "commentReplies.*.replies.draftContent.richContent.nodes.appEmbedData.image.duration"
2041
+ },
2042
+ {
2043
+ path: "commentReplies.*.replies.draftContent.richContent.nodes.videoData.video.duration"
2044
+ },
2045
+ {
2046
+ path: "commentReplies.*.replies.draftContent.richContent.nodes.videoData.thumbnail.duration"
2047
+ },
2048
+ {
2049
+ path: "commentReplies.*.replies.draftContent.richContent.nodes.audioData.audio.duration"
2050
+ },
2051
+ {
2052
+ path: "commentReplies.*.replies.draftContent.richContent.nodes.audioData.coverImage.duration"
2053
+ }
2054
+ ]
2055
+ }
2056
+ ])
2057
+ };
2058
+ return metadata;
2059
+ }
2060
+ return __listCommentsByResource;
2061
+ }
2062
+ function getCommentThread(payload) {
2063
+ function __getCommentThread({ host }) {
2064
+ const metadata = {
2065
+ entityFqdn: "wix.comments.v2.comment",
2066
+ method: "GET",
2067
+ methodFqn: "wix.comments.ng.v1.CommentsNg.GetCommentThread",
2068
+ packageName: PACKAGE_NAME,
2069
+ url: resolveWixCommentsNgV1CommentsNgUrl({
2070
+ protoPath: "/v1/comments/{commentId}/thread",
2071
+ data: payload,
2072
+ host
2073
+ }),
2074
+ params: toURLSearchParams(payload),
2075
+ transformResponse: (payload2) => transformPaths(payload2, [
2076
+ {
2077
+ transformFn: transformRESTTimestampToSDKTimestamp,
2078
+ paths: [
2079
+ { path: "comments.createdDate" },
2080
+ { path: "comments.updatedDate" },
2081
+ { path: "comments.commentDate" },
2082
+ { path: "comments.content.commentDate" },
2083
+ {
2084
+ path: "comments.content.richContent.metadata.createdTimestamp"
2085
+ },
2086
+ {
2087
+ path: "comments.content.richContent.metadata.updatedTimestamp"
2088
+ },
2089
+ { path: "comments.content.attachments.image.urlExpirationDate" },
2090
+ { path: "comments.content.attachments.video.urlExpirationDate" },
2091
+ {
2092
+ path: "comments.content.attachments.video.posters.urlExpirationDate"
2093
+ },
2094
+ { path: "comments.content.attachments.audio.urlExpirationDate" },
2095
+ {
2096
+ path: "comments.content.attachments.document.urlExpirationDate"
2097
+ },
2098
+ { path: "comments.draftContent.commentDate" },
2099
+ {
2100
+ path: "comments.draftContent.richContent.metadata.createdTimestamp"
2101
+ },
2102
+ {
2103
+ path: "comments.draftContent.richContent.metadata.updatedTimestamp"
2104
+ },
2105
+ {
2106
+ path: "comments.draftContent.attachments.image.urlExpirationDate"
2107
+ },
2108
+ {
2109
+ path: "comments.draftContent.attachments.video.urlExpirationDate"
2110
+ },
2111
+ {
2112
+ path: "comments.draftContent.attachments.video.posters.urlExpirationDate"
2113
+ },
2114
+ {
2115
+ path: "comments.draftContent.attachments.audio.urlExpirationDate"
2116
+ },
2117
+ {
2118
+ path: "comments.draftContent.attachments.document.urlExpirationDate"
2119
+ },
2120
+ { path: "commentReplies.*.replies.createdDate" },
2121
+ { path: "commentReplies.*.replies.updatedDate" },
2122
+ { path: "commentReplies.*.replies.commentDate" },
2123
+ { path: "commentReplies.*.replies.content.commentDate" },
2124
+ {
2125
+ path: "commentReplies.*.replies.content.richContent.metadata.createdTimestamp"
2126
+ },
2127
+ {
2128
+ path: "commentReplies.*.replies.content.richContent.metadata.updatedTimestamp"
2129
+ },
2130
+ {
2131
+ path: "commentReplies.*.replies.content.attachments.image.urlExpirationDate"
2132
+ },
2133
+ {
2134
+ path: "commentReplies.*.replies.content.attachments.video.urlExpirationDate"
2135
+ },
2136
+ {
2137
+ path: "commentReplies.*.replies.content.attachments.video.posters.urlExpirationDate"
2138
+ },
2139
+ {
2140
+ path: "commentReplies.*.replies.content.attachments.audio.urlExpirationDate"
2141
+ },
2142
+ {
2143
+ path: "commentReplies.*.replies.content.attachments.document.urlExpirationDate"
2144
+ },
2145
+ { path: "commentReplies.*.replies.draftContent.commentDate" },
2146
+ {
2147
+ path: "commentReplies.*.replies.draftContent.richContent.metadata.createdTimestamp"
2148
+ },
2149
+ {
2150
+ path: "commentReplies.*.replies.draftContent.richContent.metadata.updatedTimestamp"
2151
+ },
2152
+ {
2153
+ path: "commentReplies.*.replies.draftContent.attachments.image.urlExpirationDate"
2154
+ },
2155
+ {
2156
+ path: "commentReplies.*.replies.draftContent.attachments.video.urlExpirationDate"
2157
+ },
2158
+ {
2159
+ path: "commentReplies.*.replies.draftContent.attachments.video.posters.urlExpirationDate"
2160
+ },
2161
+ {
2162
+ path: "commentReplies.*.replies.draftContent.attachments.audio.urlExpirationDate"
2163
+ },
2164
+ {
2165
+ path: "commentReplies.*.replies.draftContent.attachments.document.urlExpirationDate"
2166
+ }
2167
+ ]
2168
+ },
2169
+ {
2170
+ transformFn: transformRESTFloatToSDKFloat,
2171
+ paths: [
2172
+ {
2173
+ path: "comments.content.richContent.nodes.galleryData.items.image.media.duration"
2174
+ },
2175
+ {
2176
+ path: "comments.content.richContent.nodes.galleryData.items.video.media.duration"
2177
+ },
2178
+ {
2179
+ path: "comments.content.richContent.nodes.galleryData.items.video.thumbnail.duration"
2180
+ },
2181
+ {
2182
+ path: "comments.content.richContent.nodes.galleryData.options.item.ratio"
2183
+ },
2184
+ {
2185
+ path: "comments.content.richContent.nodes.imageData.image.duration"
2186
+ },
2187
+ {
2188
+ path: "comments.content.richContent.nodes.mapData.mapSettings.lat"
2189
+ },
2190
+ {
2191
+ path: "comments.content.richContent.nodes.mapData.mapSettings.lng"
2192
+ },
2193
+ {
2194
+ path: "comments.content.richContent.nodes.pollData.poll.image.duration"
2195
+ },
2196
+ {
2197
+ path: "comments.content.richContent.nodes.pollData.poll.options.image.duration"
2198
+ },
2199
+ {
2200
+ path: "comments.content.richContent.nodes.pollData.design.poll.background.image.duration"
2201
+ },
2202
+ {
2203
+ path: "comments.content.richContent.nodes.appEmbedData.image.duration"
2204
+ },
2205
+ {
2206
+ path: "comments.content.richContent.nodes.videoData.video.duration"
2207
+ },
2208
+ {
2209
+ path: "comments.content.richContent.nodes.videoData.thumbnail.duration"
2210
+ },
2211
+ {
2212
+ path: "comments.content.richContent.nodes.audioData.audio.duration"
2213
+ },
2214
+ {
2215
+ path: "comments.content.richContent.nodes.audioData.coverImage.duration"
2216
+ },
2217
+ {
2218
+ path: "comments.draftContent.richContent.nodes.galleryData.items.image.media.duration"
2219
+ },
2220
+ {
2221
+ path: "comments.draftContent.richContent.nodes.galleryData.items.video.media.duration"
2222
+ },
2223
+ {
2224
+ path: "comments.draftContent.richContent.nodes.galleryData.items.video.thumbnail.duration"
2225
+ },
2226
+ {
2227
+ path: "comments.draftContent.richContent.nodes.galleryData.options.item.ratio"
2228
+ },
2229
+ {
2230
+ path: "comments.draftContent.richContent.nodes.imageData.image.duration"
2231
+ },
2232
+ {
2233
+ path: "comments.draftContent.richContent.nodes.mapData.mapSettings.lat"
2234
+ },
2235
+ {
2236
+ path: "comments.draftContent.richContent.nodes.mapData.mapSettings.lng"
2237
+ },
2238
+ {
2239
+ path: "comments.draftContent.richContent.nodes.pollData.poll.image.duration"
2240
+ },
2241
+ {
2242
+ path: "comments.draftContent.richContent.nodes.pollData.poll.options.image.duration"
2243
+ },
2244
+ {
2245
+ path: "comments.draftContent.richContent.nodes.pollData.design.poll.background.image.duration"
2246
+ },
2247
+ {
2248
+ path: "comments.draftContent.richContent.nodes.appEmbedData.image.duration"
2249
+ },
2250
+ {
2251
+ path: "comments.draftContent.richContent.nodes.videoData.video.duration"
2252
+ },
2253
+ {
2254
+ path: "comments.draftContent.richContent.nodes.videoData.thumbnail.duration"
2255
+ },
2256
+ {
2257
+ path: "comments.draftContent.richContent.nodes.audioData.audio.duration"
2258
+ },
2259
+ {
2260
+ path: "comments.draftContent.richContent.nodes.audioData.coverImage.duration"
2261
+ },
2262
+ {
2263
+ path: "commentReplies.*.replies.content.richContent.nodes.galleryData.items.image.media.duration"
2264
+ },
2265
+ {
2266
+ path: "commentReplies.*.replies.content.richContent.nodes.galleryData.items.video.media.duration"
2267
+ },
2268
+ {
2269
+ path: "commentReplies.*.replies.content.richContent.nodes.galleryData.items.video.thumbnail.duration"
2270
+ },
2271
+ {
2272
+ path: "commentReplies.*.replies.content.richContent.nodes.galleryData.options.item.ratio"
2273
+ },
2274
+ {
2275
+ path: "commentReplies.*.replies.content.richContent.nodes.imageData.image.duration"
2276
+ },
2277
+ {
2278
+ path: "commentReplies.*.replies.content.richContent.nodes.mapData.mapSettings.lat"
2279
+ },
2280
+ {
2281
+ path: "commentReplies.*.replies.content.richContent.nodes.mapData.mapSettings.lng"
2282
+ },
2283
+ {
2284
+ path: "commentReplies.*.replies.content.richContent.nodes.pollData.poll.image.duration"
2285
+ },
2286
+ {
2287
+ path: "commentReplies.*.replies.content.richContent.nodes.pollData.poll.options.image.duration"
2288
+ },
2289
+ {
2290
+ path: "commentReplies.*.replies.content.richContent.nodes.pollData.design.poll.background.image.duration"
2291
+ },
2292
+ {
2293
+ path: "commentReplies.*.replies.content.richContent.nodes.appEmbedData.image.duration"
2294
+ },
2295
+ {
2296
+ path: "commentReplies.*.replies.content.richContent.nodes.videoData.video.duration"
2297
+ },
2298
+ {
2299
+ path: "commentReplies.*.replies.content.richContent.nodes.videoData.thumbnail.duration"
2300
+ },
2301
+ {
2302
+ path: "commentReplies.*.replies.content.richContent.nodes.audioData.audio.duration"
2303
+ },
2304
+ {
2305
+ path: "commentReplies.*.replies.content.richContent.nodes.audioData.coverImage.duration"
2306
+ },
2307
+ {
2308
+ path: "commentReplies.*.replies.draftContent.richContent.nodes.galleryData.items.image.media.duration"
2309
+ },
2310
+ {
2311
+ path: "commentReplies.*.replies.draftContent.richContent.nodes.galleryData.items.video.media.duration"
2312
+ },
2313
+ {
2314
+ path: "commentReplies.*.replies.draftContent.richContent.nodes.galleryData.items.video.thumbnail.duration"
2315
+ },
2316
+ {
2317
+ path: "commentReplies.*.replies.draftContent.richContent.nodes.galleryData.options.item.ratio"
2318
+ },
2319
+ {
2320
+ path: "commentReplies.*.replies.draftContent.richContent.nodes.imageData.image.duration"
2321
+ },
2322
+ {
2323
+ path: "commentReplies.*.replies.draftContent.richContent.nodes.mapData.mapSettings.lat"
2324
+ },
2325
+ {
2326
+ path: "commentReplies.*.replies.draftContent.richContent.nodes.mapData.mapSettings.lng"
2327
+ },
2328
+ {
2329
+ path: "commentReplies.*.replies.draftContent.richContent.nodes.pollData.poll.image.duration"
2330
+ },
2331
+ {
2332
+ path: "commentReplies.*.replies.draftContent.richContent.nodes.pollData.poll.options.image.duration"
2333
+ },
2334
+ {
2335
+ path: "commentReplies.*.replies.draftContent.richContent.nodes.pollData.design.poll.background.image.duration"
2336
+ },
2337
+ {
2338
+ path: "commentReplies.*.replies.draftContent.richContent.nodes.appEmbedData.image.duration"
2339
+ },
2340
+ {
2341
+ path: "commentReplies.*.replies.draftContent.richContent.nodes.videoData.video.duration"
2342
+ },
2343
+ {
2344
+ path: "commentReplies.*.replies.draftContent.richContent.nodes.videoData.thumbnail.duration"
2345
+ },
2346
+ {
2347
+ path: "commentReplies.*.replies.draftContent.richContent.nodes.audioData.audio.duration"
2348
+ },
2349
+ {
2350
+ path: "commentReplies.*.replies.draftContent.richContent.nodes.audioData.coverImage.duration"
2351
+ }
2352
+ ]
2353
+ }
2354
+ ])
2355
+ };
2356
+ return metadata;
2357
+ }
2358
+ return __getCommentThread;
2359
+ }
2360
+ function bulkPublishComment(payload) {
2361
+ function __bulkPublishComment({ host }) {
2362
+ const metadata = {
2363
+ entityFqdn: "wix.comments.v2.comment",
2364
+ method: "POST",
2365
+ methodFqn: "wix.comments.ng.v1.CommentsNg.BulkPublishComment",
2366
+ packageName: PACKAGE_NAME,
2367
+ url: resolveWixCommentsNgV1CommentsNgUrl({
2368
+ protoPath: "/v1/bulk/comments/publish-by-filter",
2369
+ data: payload,
2370
+ host
2371
+ }),
2372
+ data: payload
2373
+ };
2374
+ return metadata;
2375
+ }
2376
+ return __bulkPublishComment;
2377
+ }
2378
+ function bulkHideComment(payload) {
2379
+ function __bulkHideComment({ host }) {
2380
+ const metadata = {
2381
+ entityFqdn: "wix.comments.v2.comment",
2382
+ method: "PUT",
2383
+ methodFqn: "wix.comments.ng.v1.CommentsNg.BulkHideComment",
2384
+ packageName: PACKAGE_NAME,
2385
+ url: resolveWixCommentsNgV1CommentsNgUrl({
2386
+ protoPath: "/v1/bulk/comments/hide-by-filter",
2387
+ data: payload,
2388
+ host
2389
+ }),
2390
+ data: payload
2391
+ };
2392
+ return metadata;
2393
+ }
2394
+ return __bulkHideComment;
2395
+ }
2396
+ function bulkDeleteComment(payload) {
2397
+ function __bulkDeleteComment({ host }) {
2398
+ const metadata = {
2399
+ entityFqdn: "wix.comments.v2.comment",
2400
+ method: "PUT",
2401
+ methodFqn: "wix.comments.ng.v1.CommentsNg.BulkDeleteComment",
2402
+ packageName: PACKAGE_NAME,
2403
+ url: resolveWixCommentsNgV1CommentsNgUrl({
2404
+ protoPath: "/v1/bulk/comments/delete-by-filter",
2405
+ data: payload,
2406
+ host
2407
+ }),
2408
+ data: payload
2409
+ };
2410
+ return metadata;
2411
+ }
2412
+ return __bulkDeleteComment;
2413
+ }
2414
+ function bulkModerateDraftContent(payload) {
2415
+ function __bulkModerateDraftContent({ host }) {
2416
+ const metadata = {
2417
+ entityFqdn: "wix.comments.v2.comment",
2418
+ method: "POST",
2419
+ methodFqn: "wix.comments.ng.v1.CommentsNg.BulkModerateDraftContent",
2420
+ packageName: PACKAGE_NAME,
2421
+ url: resolveWixCommentsNgV1CommentsNgUrl({
2422
+ protoPath: "/v1/bulk/comments/moderate-by-filter",
2423
+ data: payload,
2424
+ host
2425
+ }),
2426
+ data: payload
2427
+ };
2428
+ return metadata;
2429
+ }
2430
+ return __bulkModerateDraftContent;
2431
+ }
2432
+ function bulkMoveCommentByFilter(payload) {
2433
+ function __bulkMoveCommentByFilter({ host }) {
2434
+ const metadata = {
2435
+ entityFqdn: "wix.comments.v2.comment",
2436
+ method: "PUT",
2437
+ methodFqn: "wix.comments.ng.v1.CommentsNg.BulkMoveCommentByFilter",
2438
+ packageName: PACKAGE_NAME,
2439
+ url: resolveWixCommentsNgV1CommentsNgUrl({
2440
+ protoPath: "/v1/bulk/comments/move-by-filter",
2441
+ data: payload,
2442
+ host
2443
+ }),
2444
+ data: payload
2445
+ };
2446
+ return metadata;
2447
+ }
2448
+ return __bulkMoveCommentByFilter;
2449
+ }
2450
+
2451
+ // src/comments-v2-comment-comments.universal.ts
2452
+ import { transformSDKAudioToRESTAudio } from "@wix/sdk-runtime/transformations/audio";
2453
+ import { transformRESTAudioToSDKAudio } from "@wix/sdk-runtime/transformations/audio";
2454
+ import { transformSDKImageToRESTImage } from "@wix/sdk-runtime/transformations/image";
2455
+ import { transformRESTImageToSDKImage } from "@wix/sdk-runtime/transformations/image";
2456
+ import { transformSDKVideoV2ToRESTVideoV2 } from "@wix/sdk-runtime/transformations/video-v2";
2457
+ import { transformRESTVideoV2ToSDKVideoV2 } from "@wix/sdk-runtime/transformations/video-v2";
2458
+ import { transformSDKDocumentToRESTDocument } from "@wix/sdk-runtime/transformations/document";
2459
+ import { transformRESTDocumentToSDKDocument } from "@wix/sdk-runtime/transformations/document";
2460
+ import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
2461
+ var NodeType = /* @__PURE__ */ ((NodeType2) => {
2462
+ NodeType2["PARAGRAPH"] = "PARAGRAPH";
2463
+ NodeType2["TEXT"] = "TEXT";
2464
+ NodeType2["HEADING"] = "HEADING";
2465
+ NodeType2["BULLETED_LIST"] = "BULLETED_LIST";
2466
+ NodeType2["ORDERED_LIST"] = "ORDERED_LIST";
2467
+ NodeType2["LIST_ITEM"] = "LIST_ITEM";
2468
+ NodeType2["BLOCKQUOTE"] = "BLOCKQUOTE";
2469
+ NodeType2["CODE_BLOCK"] = "CODE_BLOCK";
2470
+ NodeType2["VIDEO"] = "VIDEO";
2471
+ NodeType2["DIVIDER"] = "DIVIDER";
2472
+ NodeType2["FILE"] = "FILE";
2473
+ NodeType2["GALLERY"] = "GALLERY";
2474
+ NodeType2["GIF"] = "GIF";
2475
+ NodeType2["HTML"] = "HTML";
2476
+ NodeType2["IMAGE"] = "IMAGE";
2477
+ NodeType2["LINK_PREVIEW"] = "LINK_PREVIEW";
2478
+ NodeType2["MAP"] = "MAP";
2479
+ NodeType2["POLL"] = "POLL";
2480
+ NodeType2["APP_EMBED"] = "APP_EMBED";
2481
+ NodeType2["BUTTON"] = "BUTTON";
2482
+ NodeType2["COLLAPSIBLE_LIST"] = "COLLAPSIBLE_LIST";
2483
+ NodeType2["TABLE"] = "TABLE";
2484
+ NodeType2["EMBED"] = "EMBED";
2485
+ NodeType2["COLLAPSIBLE_ITEM"] = "COLLAPSIBLE_ITEM";
2486
+ NodeType2["COLLAPSIBLE_ITEM_TITLE"] = "COLLAPSIBLE_ITEM_TITLE";
2487
+ NodeType2["COLLAPSIBLE_ITEM_BODY"] = "COLLAPSIBLE_ITEM_BODY";
2488
+ NodeType2["TABLE_CELL"] = "TABLE_CELL";
2489
+ NodeType2["TABLE_ROW"] = "TABLE_ROW";
2490
+ NodeType2["EXTERNAL"] = "EXTERNAL";
2491
+ NodeType2["AUDIO"] = "AUDIO";
2492
+ NodeType2["CAPTION"] = "CAPTION";
2493
+ NodeType2["LAYOUT"] = "LAYOUT";
2494
+ NodeType2["LAYOUT_CELL"] = "LAYOUT_CELL";
2495
+ return NodeType2;
2496
+ })(NodeType || {});
2497
+ var WidthType = /* @__PURE__ */ ((WidthType2) => {
2498
+ WidthType2["CONTENT"] = "CONTENT";
2499
+ WidthType2["SMALL"] = "SMALL";
2500
+ WidthType2["ORIGINAL"] = "ORIGINAL";
2501
+ WidthType2["FULL_WIDTH"] = "FULL_WIDTH";
2502
+ return WidthType2;
2503
+ })(WidthType || {});
2504
+ var PluginContainerDataAlignment = /* @__PURE__ */ ((PluginContainerDataAlignment2) => {
2505
+ PluginContainerDataAlignment2["CENTER"] = "CENTER";
2506
+ PluginContainerDataAlignment2["LEFT"] = "LEFT";
2507
+ PluginContainerDataAlignment2["RIGHT"] = "RIGHT";
2508
+ return PluginContainerDataAlignment2;
2509
+ })(PluginContainerDataAlignment || {});
2510
+ var ButtonDataType = /* @__PURE__ */ ((ButtonDataType2) => {
2511
+ ButtonDataType2["LINK"] = "LINK";
2512
+ ButtonDataType2["ACTION"] = "ACTION";
2513
+ return ButtonDataType2;
2514
+ })(ButtonDataType || {});
2515
+ var Target = /* @__PURE__ */ ((Target2) => {
2516
+ Target2["SELF"] = "SELF";
2517
+ Target2["BLANK"] = "BLANK";
2518
+ Target2["PARENT"] = "PARENT";
2519
+ Target2["TOP"] = "TOP";
2520
+ return Target2;
2521
+ })(Target || {});
2522
+ var TextAlignment = /* @__PURE__ */ ((TextAlignment2) => {
2523
+ TextAlignment2["AUTO"] = "AUTO";
2524
+ TextAlignment2["LEFT"] = "LEFT";
2525
+ TextAlignment2["RIGHT"] = "RIGHT";
2526
+ TextAlignment2["CENTER"] = "CENTER";
2527
+ TextAlignment2["JUSTIFY"] = "JUSTIFY";
2528
+ return TextAlignment2;
2529
+ })(TextAlignment || {});
2530
+ var LineStyle = /* @__PURE__ */ ((LineStyle2) => {
2531
+ LineStyle2["SINGLE"] = "SINGLE";
2532
+ LineStyle2["DOUBLE"] = "DOUBLE";
2533
+ LineStyle2["DASHED"] = "DASHED";
2534
+ LineStyle2["DOTTED"] = "DOTTED";
2535
+ return LineStyle2;
2536
+ })(LineStyle || {});
2537
+ var Width = /* @__PURE__ */ ((Width2) => {
2538
+ Width2["LARGE"] = "LARGE";
2539
+ Width2["MEDIUM"] = "MEDIUM";
2540
+ Width2["SMALL"] = "SMALL";
2541
+ return Width2;
2542
+ })(Width || {});
2543
+ var DividerDataAlignment = /* @__PURE__ */ ((DividerDataAlignment2) => {
2544
+ DividerDataAlignment2["CENTER"] = "CENTER";
2545
+ DividerDataAlignment2["LEFT"] = "LEFT";
2546
+ DividerDataAlignment2["RIGHT"] = "RIGHT";
2547
+ return DividerDataAlignment2;
2548
+ })(DividerDataAlignment || {});
2549
+ var ViewMode = /* @__PURE__ */ ((ViewMode2) => {
2550
+ ViewMode2["NONE"] = "NONE";
2551
+ ViewMode2["FULL"] = "FULL";
2552
+ ViewMode2["MINI"] = "MINI";
2553
+ return ViewMode2;
2554
+ })(ViewMode || {});
2555
+ var LayoutType = /* @__PURE__ */ ((LayoutType2) => {
2556
+ LayoutType2["COLLAGE"] = "COLLAGE";
2557
+ LayoutType2["MASONRY"] = "MASONRY";
2558
+ LayoutType2["GRID"] = "GRID";
2559
+ LayoutType2["THUMBNAIL"] = "THUMBNAIL";
2560
+ LayoutType2["SLIDER"] = "SLIDER";
2561
+ LayoutType2["SLIDESHOW"] = "SLIDESHOW";
2562
+ LayoutType2["PANORAMA"] = "PANORAMA";
2563
+ LayoutType2["COLUMN"] = "COLUMN";
2564
+ LayoutType2["MAGIC"] = "MAGIC";
2565
+ LayoutType2["FULLSIZE"] = "FULLSIZE";
2566
+ return LayoutType2;
2567
+ })(LayoutType || {});
2568
+ var Orientation = /* @__PURE__ */ ((Orientation2) => {
2569
+ Orientation2["ROWS"] = "ROWS";
2570
+ Orientation2["COLUMNS"] = "COLUMNS";
2571
+ return Orientation2;
2572
+ })(Orientation || {});
2573
+ var Crop = /* @__PURE__ */ ((Crop2) => {
2574
+ Crop2["FILL"] = "FILL";
2575
+ Crop2["FIT"] = "FIT";
2576
+ return Crop2;
2577
+ })(Crop || {});
2578
+ var ThumbnailsAlignment = /* @__PURE__ */ ((ThumbnailsAlignment2) => {
2579
+ ThumbnailsAlignment2["TOP"] = "TOP";
2580
+ ThumbnailsAlignment2["RIGHT"] = "RIGHT";
2581
+ ThumbnailsAlignment2["BOTTOM"] = "BOTTOM";
2582
+ ThumbnailsAlignment2["LEFT"] = "LEFT";
2583
+ ThumbnailsAlignment2["NONE"] = "NONE";
2584
+ return ThumbnailsAlignment2;
2585
+ })(ThumbnailsAlignment || {});
2586
+ var GIFType = /* @__PURE__ */ ((GIFType2) => {
2587
+ GIFType2["NORMAL"] = "NORMAL";
2588
+ GIFType2["STICKER"] = "STICKER";
2589
+ return GIFType2;
2590
+ })(GIFType || {});
2591
+ var Source = /* @__PURE__ */ ((Source2) => {
2592
+ Source2["HTML"] = "HTML";
2593
+ Source2["ADSENSE"] = "ADSENSE";
2594
+ return Source2;
2595
+ })(Source || {});
2596
+ var StylesPosition = /* @__PURE__ */ ((StylesPosition2) => {
2597
+ StylesPosition2["START"] = "START";
2598
+ StylesPosition2["END"] = "END";
2599
+ StylesPosition2["TOP"] = "TOP";
2600
+ StylesPosition2["HIDDEN"] = "HIDDEN";
2601
+ return StylesPosition2;
2602
+ })(StylesPosition || {});
2603
+ var MapType = /* @__PURE__ */ ((MapType2) => {
2604
+ MapType2["ROADMAP"] = "ROADMAP";
2605
+ MapType2["SATELITE"] = "SATELITE";
2606
+ MapType2["HYBRID"] = "HYBRID";
2607
+ MapType2["TERRAIN"] = "TERRAIN";
2608
+ return MapType2;
2609
+ })(MapType || {});
2610
+ var ViewRole = /* @__PURE__ */ ((ViewRole2) => {
2611
+ ViewRole2["CREATOR"] = "CREATOR";
2612
+ ViewRole2["VOTERS"] = "VOTERS";
2613
+ ViewRole2["EVERYONE"] = "EVERYONE";
2614
+ return ViewRole2;
2615
+ })(ViewRole || {});
2616
+ var VoteRole = /* @__PURE__ */ ((VoteRole2) => {
2617
+ VoteRole2["SITE_MEMBERS"] = "SITE_MEMBERS";
2618
+ VoteRole2["ALL"] = "ALL";
2619
+ return VoteRole2;
2620
+ })(VoteRole || {});
2621
+ var PollLayoutType = /* @__PURE__ */ ((PollLayoutType2) => {
2622
+ PollLayoutType2["LIST"] = "LIST";
2623
+ PollLayoutType2["GRID"] = "GRID";
2624
+ return PollLayoutType2;
2625
+ })(PollLayoutType || {});
2626
+ var PollLayoutDirection = /* @__PURE__ */ ((PollLayoutDirection2) => {
2627
+ PollLayoutDirection2["LTR"] = "LTR";
2628
+ PollLayoutDirection2["RTL"] = "RTL";
2629
+ return PollLayoutDirection2;
2630
+ })(PollLayoutDirection || {});
2631
+ var BackgroundType = /* @__PURE__ */ ((BackgroundType2) => {
2632
+ BackgroundType2["COLOR"] = "COLOR";
2633
+ BackgroundType2["IMAGE"] = "IMAGE";
2634
+ BackgroundType2["GRADIENT"] = "GRADIENT";
2635
+ return BackgroundType2;
2636
+ })(BackgroundType || {});
2637
+ var DecorationType = /* @__PURE__ */ ((DecorationType2) => {
2638
+ DecorationType2["BOLD"] = "BOLD";
2639
+ DecorationType2["ITALIC"] = "ITALIC";
2640
+ DecorationType2["UNDERLINE"] = "UNDERLINE";
2641
+ DecorationType2["SPOILER"] = "SPOILER";
2642
+ DecorationType2["ANCHOR"] = "ANCHOR";
2643
+ DecorationType2["MENTION"] = "MENTION";
2644
+ DecorationType2["LINK"] = "LINK";
2645
+ DecorationType2["COLOR"] = "COLOR";
2646
+ DecorationType2["FONT_SIZE"] = "FONT_SIZE";
2647
+ DecorationType2["EXTERNAL"] = "EXTERNAL";
2648
+ DecorationType2["STRIKETHROUGH"] = "STRIKETHROUGH";
2649
+ DecorationType2["SUPERSCRIPT"] = "SUPERSCRIPT";
2650
+ DecorationType2["SUBSCRIPT"] = "SUBSCRIPT";
2651
+ return DecorationType2;
2652
+ })(DecorationType || {});
2653
+ var FontType = /* @__PURE__ */ ((FontType2) => {
2654
+ FontType2["PX"] = "PX";
2655
+ FontType2["EM"] = "EM";
2656
+ return FontType2;
2657
+ })(FontType || {});
2658
+ var Position = /* @__PURE__ */ ((Position2) => {
2659
+ Position2["START"] = "START";
2660
+ Position2["END"] = "END";
2661
+ Position2["TOP"] = "TOP";
2662
+ return Position2;
2663
+ })(Position || {});
2664
+ var AspectRatio = /* @__PURE__ */ ((AspectRatio2) => {
2665
+ AspectRatio2["SQUARE"] = "SQUARE";
2666
+ AspectRatio2["RECTANGLE"] = "RECTANGLE";
2667
+ return AspectRatio2;
2668
+ })(AspectRatio || {});
2669
+ var Resizing = /* @__PURE__ */ ((Resizing2) => {
2670
+ Resizing2["FILL"] = "FILL";
2671
+ Resizing2["FIT"] = "FIT";
2672
+ return Resizing2;
2673
+ })(Resizing || {});
2674
+ var Placement = /* @__PURE__ */ ((Placement2) => {
2675
+ Placement2["IMAGE"] = "IMAGE";
2676
+ Placement2["PRODUCT_INFO"] = "PRODUCT_INFO";
2677
+ return Placement2;
2678
+ })(Placement || {});
2679
+ var Type = /* @__PURE__ */ ((Type2) => {
2680
+ Type2["CONTAINED"] = "CONTAINED";
2681
+ Type2["FRAMELESS"] = "FRAMELESS";
2682
+ return Type2;
2683
+ })(Type || {});
2684
+ var Alignment = /* @__PURE__ */ ((Alignment2) => {
2685
+ Alignment2["START"] = "START";
2686
+ Alignment2["CENTER"] = "CENTER";
2687
+ Alignment2["END"] = "END";
2688
+ return Alignment2;
2689
+ })(Alignment || {});
2690
+ var Layout = /* @__PURE__ */ ((Layout2) => {
2691
+ Layout2["STACKED"] = "STACKED";
2692
+ Layout2["SIDE_BY_SIDE"] = "SIDE_BY_SIDE";
2693
+ return Layout2;
2694
+ })(Layout || {});
2695
+ var AppType = /* @__PURE__ */ ((AppType2) => {
2696
+ AppType2["PRODUCT"] = "PRODUCT";
2697
+ AppType2["EVENT"] = "EVENT";
2698
+ AppType2["BOOKING"] = "BOOKING";
2699
+ return AppType2;
2700
+ })(AppType || {});
2701
+ var InitialExpandedItems = /* @__PURE__ */ ((InitialExpandedItems2) => {
2702
+ InitialExpandedItems2["FIRST"] = "FIRST";
2703
+ InitialExpandedItems2["ALL"] = "ALL";
2704
+ InitialExpandedItems2["NONE"] = "NONE";
2705
+ return InitialExpandedItems2;
2706
+ })(InitialExpandedItems || {});
2707
+ var Direction = /* @__PURE__ */ ((Direction2) => {
2708
+ Direction2["LTR"] = "LTR";
2709
+ Direction2["RTL"] = "RTL";
2710
+ return Direction2;
2711
+ })(Direction || {});
2712
+ var VerticalAlignment = /* @__PURE__ */ ((VerticalAlignment2) => {
2713
+ VerticalAlignment2["TOP"] = "TOP";
2714
+ VerticalAlignment2["MIDDLE"] = "MIDDLE";
2715
+ VerticalAlignment2["BOTTOM"] = "BOTTOM";
2716
+ return VerticalAlignment2;
2717
+ })(VerticalAlignment || {});
2718
+ var NullValue = /* @__PURE__ */ ((NullValue2) => {
2719
+ NullValue2["NULL_VALUE"] = "NULL_VALUE";
2720
+ return NullValue2;
2721
+ })(NullValue || {});
2722
+ var Status = /* @__PURE__ */ ((Status2) => {
2723
+ Status2["UNKNOWN"] = "UNKNOWN";
2724
+ Status2["PUBLISHED"] = "PUBLISHED";
2725
+ Status2["DELETED"] = "DELETED";
2726
+ Status2["PENDING"] = "PENDING";
2727
+ Status2["HIDDEN"] = "HIDDEN";
2728
+ return Status2;
2729
+ })(Status || {});
2730
+ var VersioningMode = /* @__PURE__ */ ((VersioningMode2) => {
2731
+ VersioningMode2["DEFAULT"] = "DEFAULT";
2732
+ VersioningMode2["GREATER_THAN"] = "GREATER_THAN";
2733
+ VersioningMode2["GREATER_OR_EQUAL"] = "GREATER_OR_EQUAL";
2734
+ return VersioningMode2;
2735
+ })(VersioningMode || {});
2736
+ var Action = /* @__PURE__ */ ((Action2) => {
2737
+ Action2["UNKNOWN"] = "UNKNOWN";
2738
+ Action2["APPROVE"] = "APPROVE";
2739
+ Action2["REJECT"] = "REJECT";
2740
+ return Action2;
2741
+ })(Action || {});
2742
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
2743
+ SortOrder2["ASC"] = "ASC";
2744
+ SortOrder2["DESC"] = "DESC";
2745
+ return SortOrder2;
2746
+ })(SortOrder || {});
2747
+ var Order = /* @__PURE__ */ ((Order2) => {
2748
+ Order2["UNKNOWN_ORDER"] = "UNKNOWN_ORDER";
2749
+ Order2["OLDEST_FIRST"] = "OLDEST_FIRST";
2750
+ Order2["NEWEST_FIRST"] = "NEWEST_FIRST";
2751
+ Order2["REACTION_COUNT"] = "REACTION_COUNT";
2752
+ Order2["NET_VOTE_COUNT"] = "NET_VOTE_COUNT";
2753
+ Order2["RATING"] = "RATING";
2754
+ Order2["NET_VOTE_COUNT_ASC"] = "NET_VOTE_COUNT_ASC";
2755
+ Order2["RATING_ASC"] = "RATING_ASC";
2756
+ return Order2;
2757
+ })(Order || {});
2758
+ var ReplySortOrder = /* @__PURE__ */ ((ReplySortOrder2) => {
2759
+ ReplySortOrder2["UNKNOWN_ORDER"] = "UNKNOWN_ORDER";
2760
+ ReplySortOrder2["OLDEST_FIRST"] = "OLDEST_FIRST";
2761
+ ReplySortOrder2["NEWEST_FIRST"] = "NEWEST_FIRST";
2762
+ ReplySortOrder2["REACTION_COUNT"] = "REACTION_COUNT";
2763
+ return ReplySortOrder2;
2764
+ })(ReplySortOrder || {});
2765
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
2766
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
2767
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
2768
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
2769
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
2770
+ WebhookIdentityType2["APP"] = "APP";
2771
+ return WebhookIdentityType2;
2772
+ })(WebhookIdentityType || {});
2773
+ async function createComment2(comment) {
2774
+ const { httpClient, sideEffects } = arguments[1];
2775
+ const payload = transformPaths2(
2776
+ renameKeysFromSDKRequestToRESTRequest({ comment }, [
2777
+ "comment.content.richContent",
2778
+ "comment.draftContent.richContent"
2779
+ ]),
2780
+ [
2781
+ {
2782
+ transformFn: transformSDKImageToRESTImage,
2783
+ paths: [
2784
+ { path: "comment.content.attachments.image" },
2785
+ { path: "comment.draftContent.attachments.image" }
2786
+ ]
2787
+ },
2788
+ {
2789
+ transformFn: transformSDKVideoV2ToRESTVideoV2,
2790
+ paths: [
2791
+ { path: "comment.content.attachments.video" },
2792
+ { path: "comment.draftContent.attachments.video" }
2793
+ ]
2794
+ },
2795
+ {
2796
+ transformFn: transformSDKAudioToRESTAudio,
2797
+ paths: [
2798
+ { path: "comment.content.attachments.audio" },
2799
+ { path: "comment.draftContent.attachments.audio" }
2800
+ ]
2801
+ },
2802
+ {
2803
+ transformFn: transformSDKDocumentToRESTDocument,
2804
+ paths: [
2805
+ { path: "comment.content.attachments.document" },
2806
+ { path: "comment.draftContent.attachments.document" }
2807
+ ]
2808
+ }
2809
+ ]
2810
+ );
2811
+ const reqOpts = createComment(payload);
2812
+ sideEffects?.onSiteCall?.();
2813
+ try {
2814
+ const result = await httpClient.request(reqOpts);
2815
+ sideEffects?.onSuccess?.(result);
2816
+ return renameKeysFromRESTResponseToSDKResponse(
2817
+ transformPaths2(result.data, [
2818
+ {
2819
+ transformFn: transformRESTImageToSDKImage,
2820
+ paths: [
2821
+ { path: "comment.content.attachments.image" },
2822
+ { path: "comment.draftContent.attachments.image" }
2823
+ ]
2824
+ },
2825
+ {
2826
+ transformFn: transformRESTVideoV2ToSDKVideoV2,
2827
+ paths: [
2828
+ { path: "comment.content.attachments.video" },
2829
+ { path: "comment.draftContent.attachments.video" }
2830
+ ]
2831
+ },
2832
+ {
2833
+ transformFn: transformRESTAudioToSDKAudio,
2834
+ paths: [
2835
+ { path: "comment.content.attachments.audio" },
2836
+ { path: "comment.draftContent.attachments.audio" }
2837
+ ]
2838
+ },
2839
+ {
2840
+ transformFn: transformRESTDocumentToSDKDocument,
2841
+ paths: [
2842
+ { path: "comment.content.attachments.document" },
2843
+ { path: "comment.draftContent.attachments.document" }
2844
+ ]
2845
+ }
2846
+ ]),
2847
+ ["comment.content.richContent", "comment.draftContent.richContent"]
2848
+ )?.comment;
2849
+ } catch (err) {
2850
+ const transformedError = sdkTransformError(
2851
+ err,
2852
+ {
2853
+ spreadPathsToArguments: {},
2854
+ explicitPathsToArguments: { comment: "$[0]" },
2855
+ singleArgumentUnchanged: false
2856
+ },
2857
+ ["comment"]
2858
+ );
2859
+ sideEffects?.onError?.(err);
2860
+ throw transformedError;
2861
+ }
2862
+ }
2863
+ async function getComment2(commentId) {
2864
+ const { httpClient, sideEffects } = arguments[1];
2865
+ const payload = renameKeysFromSDKRequestToRESTRequest(
2866
+ { commentId },
2867
+ []
2868
+ );
2869
+ const reqOpts = getComment(payload);
2870
+ sideEffects?.onSiteCall?.();
2871
+ try {
2872
+ const result = await httpClient.request(reqOpts);
2873
+ sideEffects?.onSuccess?.(result);
2874
+ return renameKeysFromRESTResponseToSDKResponse(
2875
+ transformPaths2(result.data, [
2876
+ {
2877
+ transformFn: transformRESTImageToSDKImage,
2878
+ paths: [
2879
+ { path: "comment.content.attachments.image" },
2880
+ { path: "comment.draftContent.attachments.image" }
2881
+ ]
2882
+ },
2883
+ {
2884
+ transformFn: transformRESTVideoV2ToSDKVideoV2,
2885
+ paths: [
2886
+ { path: "comment.content.attachments.video" },
2887
+ { path: "comment.draftContent.attachments.video" }
2888
+ ]
2889
+ },
2890
+ {
2891
+ transformFn: transformRESTAudioToSDKAudio,
2892
+ paths: [
2893
+ { path: "comment.content.attachments.audio" },
2894
+ { path: "comment.draftContent.attachments.audio" }
2895
+ ]
2896
+ },
2897
+ {
2898
+ transformFn: transformRESTDocumentToSDKDocument,
2899
+ paths: [
2900
+ { path: "comment.content.attachments.document" },
2901
+ { path: "comment.draftContent.attachments.document" }
2902
+ ]
2903
+ }
2904
+ ]),
2905
+ ["comment.content.richContent", "comment.draftContent.richContent"]
2906
+ )?.comment;
2907
+ } catch (err) {
2908
+ const transformedError = sdkTransformError(
2909
+ err,
2910
+ {
2911
+ spreadPathsToArguments: {},
2912
+ explicitPathsToArguments: { commentId: "$[0]" },
2913
+ singleArgumentUnchanged: false
2914
+ },
2915
+ ["commentId"]
2916
+ );
2917
+ sideEffects?.onError?.(err);
2918
+ throw transformedError;
2919
+ }
2920
+ }
2921
+ async function updateComment2(_id, comment) {
2922
+ const { httpClient, sideEffects } = arguments[2];
2923
+ const payload = transformPaths2(
2924
+ renameKeysFromSDKRequestToRESTRequest(
2925
+ { comment: { ...comment, id: _id } },
2926
+ ["comment.content.richContent", "comment.draftContent.richContent"]
2927
+ ),
2928
+ [
2929
+ {
2930
+ transformFn: transformSDKImageToRESTImage,
2931
+ paths: [
2932
+ { path: "comment.content.attachments.image" },
2933
+ { path: "comment.draftContent.attachments.image" }
2934
+ ]
2935
+ },
2936
+ {
2937
+ transformFn: transformSDKVideoV2ToRESTVideoV2,
2938
+ paths: [
2939
+ { path: "comment.content.attachments.video" },
2940
+ { path: "comment.draftContent.attachments.video" }
2941
+ ]
2942
+ },
2943
+ {
2944
+ transformFn: transformSDKAudioToRESTAudio,
2945
+ paths: [
2946
+ { path: "comment.content.attachments.audio" },
2947
+ { path: "comment.draftContent.attachments.audio" }
2948
+ ]
2949
+ },
2950
+ {
2951
+ transformFn: transformSDKDocumentToRESTDocument,
2952
+ paths: [
2953
+ { path: "comment.content.attachments.document" },
2954
+ { path: "comment.draftContent.attachments.document" }
2955
+ ]
2956
+ }
2957
+ ]
2958
+ );
2959
+ const reqOpts = updateComment(payload);
2960
+ sideEffects?.onSiteCall?.();
2961
+ try {
2962
+ const result = await httpClient.request(reqOpts);
2963
+ sideEffects?.onSuccess?.(result);
2964
+ return renameKeysFromRESTResponseToSDKResponse(
2965
+ transformPaths2(result.data, [
2966
+ {
2967
+ transformFn: transformRESTImageToSDKImage,
2968
+ paths: [
2969
+ { path: "comment.content.attachments.image" },
2970
+ { path: "comment.draftContent.attachments.image" }
2971
+ ]
2972
+ },
2973
+ {
2974
+ transformFn: transformRESTVideoV2ToSDKVideoV2,
2975
+ paths: [
2976
+ { path: "comment.content.attachments.video" },
2977
+ { path: "comment.draftContent.attachments.video" }
2978
+ ]
2979
+ },
2980
+ {
2981
+ transformFn: transformRESTAudioToSDKAudio,
2982
+ paths: [
2983
+ { path: "comment.content.attachments.audio" },
2984
+ { path: "comment.draftContent.attachments.audio" }
2985
+ ]
2986
+ },
2987
+ {
2988
+ transformFn: transformRESTDocumentToSDKDocument,
2989
+ paths: [
2990
+ { path: "comment.content.attachments.document" },
2991
+ { path: "comment.draftContent.attachments.document" }
2992
+ ]
2993
+ }
2994
+ ]),
2995
+ ["comment.content.richContent", "comment.draftContent.richContent"]
2996
+ )?.comment;
2997
+ } catch (err) {
2998
+ const transformedError = sdkTransformError(
2999
+ err,
3000
+ {
3001
+ spreadPathsToArguments: { comment: "$[1]" },
3002
+ explicitPathsToArguments: { "comment.id": "$[0]" },
3003
+ singleArgumentUnchanged: false
3004
+ },
3005
+ ["_id", "comment"]
3006
+ );
3007
+ sideEffects?.onError?.(err);
3008
+ throw transformedError;
3009
+ }
3010
+ }
3011
+ async function deleteComment2(commentId) {
3012
+ const { httpClient, sideEffects } = arguments[1];
3013
+ const payload = renameKeysFromSDKRequestToRESTRequest(
3014
+ { commentId },
3015
+ []
3016
+ );
3017
+ const reqOpts = deleteComment(payload);
3018
+ sideEffects?.onSiteCall?.();
3019
+ try {
3020
+ const result = await httpClient.request(reqOpts);
3021
+ sideEffects?.onSuccess?.(result);
3022
+ } catch (err) {
3023
+ const transformedError = sdkTransformError(
3024
+ err,
3025
+ {
3026
+ spreadPathsToArguments: {},
3027
+ explicitPathsToArguments: { commentId: "$[0]" },
3028
+ singleArgumentUnchanged: false
3029
+ },
3030
+ ["commentId"]
3031
+ );
3032
+ sideEffects?.onError?.(err);
3033
+ throw transformedError;
3034
+ }
3035
+ }
3036
+ async function moderateDraftContent2(commentId, revision, options) {
3037
+ const { httpClient, sideEffects } = arguments[3];
3038
+ const payload = renameKeysFromSDKRequestToRESTRequest(
3039
+ {
3040
+ commentId,
3041
+ revision,
3042
+ draftContentAction: options?.draftContentAction
3043
+ },
3044
+ []
3045
+ );
3046
+ const reqOpts = moderateDraftContent(payload);
3047
+ sideEffects?.onSiteCall?.();
3048
+ try {
3049
+ const result = await httpClient.request(reqOpts);
3050
+ sideEffects?.onSuccess?.(result);
3051
+ return renameKeysFromRESTResponseToSDKResponse(
3052
+ transformPaths2(result.data, [
3053
+ {
3054
+ transformFn: transformRESTImageToSDKImage,
3055
+ paths: [
3056
+ { path: "comment.content.attachments.image" },
3057
+ { path: "comment.draftContent.attachments.image" }
3058
+ ]
3059
+ },
3060
+ {
3061
+ transformFn: transformRESTVideoV2ToSDKVideoV2,
3062
+ paths: [
3063
+ { path: "comment.content.attachments.video" },
3064
+ { path: "comment.draftContent.attachments.video" }
3065
+ ]
3066
+ },
3067
+ {
3068
+ transformFn: transformRESTAudioToSDKAudio,
3069
+ paths: [
3070
+ { path: "comment.content.attachments.audio" },
3071
+ { path: "comment.draftContent.attachments.audio" }
3072
+ ]
3073
+ },
3074
+ {
3075
+ transformFn: transformRESTDocumentToSDKDocument,
3076
+ paths: [
3077
+ { path: "comment.content.attachments.document" },
3078
+ { path: "comment.draftContent.attachments.document" }
3079
+ ]
3080
+ }
3081
+ ]),
3082
+ ["comment.content.richContent", "comment.draftContent.richContent"]
3083
+ );
3084
+ } catch (err) {
3085
+ const transformedError = sdkTransformError(
3086
+ err,
3087
+ {
3088
+ spreadPathsToArguments: {},
3089
+ explicitPathsToArguments: {
3090
+ commentId: "$[0]",
3091
+ revision: "$[1]",
3092
+ draftContentAction: "$[2].draftContentAction"
3093
+ },
3094
+ singleArgumentUnchanged: false
3095
+ },
3096
+ ["commentId", "revision", "options"]
3097
+ );
3098
+ sideEffects?.onError?.(err);
3099
+ throw transformedError;
3100
+ }
3101
+ }
3102
+ function queryComments2(appId) {
3103
+ const { httpClient, sideEffects } = arguments[1];
3104
+ return queryBuilder({
3105
+ func: async (payload) => {
3106
+ const reqOpts = queryComments(payload);
3107
+ sideEffects?.onSiteCall?.();
3108
+ try {
3109
+ const result = await httpClient.request(reqOpts);
3110
+ sideEffects?.onSuccess?.(result);
3111
+ return result;
3112
+ } catch (err) {
3113
+ sideEffects?.onError?.(err);
3114
+ throw err;
3115
+ }
3116
+ },
3117
+ requestTransformer: (query) => {
3118
+ const args = [query, appId, {}];
3119
+ return renameKeysFromSDKRequestToRESTRequest(
3120
+ { appId: args?.[1], ...args?.[2], query: args?.[0] },
3121
+ []
3122
+ );
3123
+ },
3124
+ responseTransformer: ({ data }) => {
3125
+ const transformedData = renameKeysFromRESTResponseToSDKResponse(
3126
+ transformPaths2(data, [
3127
+ {
3128
+ transformFn: transformRESTImageToSDKImage,
3129
+ paths: [
3130
+ { path: "comments.content.attachments.image" },
3131
+ { path: "comments.draftContent.attachments.image" }
3132
+ ]
3133
+ },
3134
+ {
3135
+ transformFn: transformRESTVideoV2ToSDKVideoV2,
3136
+ paths: [
3137
+ { path: "comments.content.attachments.video" },
3138
+ { path: "comments.draftContent.attachments.video" }
3139
+ ]
3140
+ },
3141
+ {
3142
+ transformFn: transformRESTAudioToSDKAudio,
3143
+ paths: [
3144
+ { path: "comments.content.attachments.audio" },
3145
+ { path: "comments.draftContent.attachments.audio" }
3146
+ ]
3147
+ },
3148
+ {
3149
+ transformFn: transformRESTDocumentToSDKDocument,
3150
+ paths: [
3151
+ { path: "comments.content.attachments.document" },
3152
+ { path: "comments.draftContent.attachments.document" }
3153
+ ]
3154
+ }
3155
+ ]),
3156
+ ["comments.content.richContent", "comments.draftContent.richContent"]
3157
+ );
3158
+ return {
3159
+ items: transformedData?.comments,
3160
+ pagingMetadata: transformedData?.pagingMetadata
3161
+ };
3162
+ },
3163
+ errorTransformer: (err) => {
3164
+ const transformedError = sdkTransformError(err, {
3165
+ spreadPathsToArguments: {},
3166
+ explicitPathsToArguments: { appId: "$[1]", query: "$[0]" },
3167
+ singleArgumentUnchanged: false
3168
+ });
3169
+ throw transformedError;
3170
+ },
3171
+ pagingMethod: "CURSOR",
3172
+ transformationPaths: {}
3173
+ });
3174
+ }
3175
+ async function markComment2(commentId) {
3176
+ const { httpClient, sideEffects } = arguments[1];
3177
+ const payload = renameKeysFromSDKRequestToRESTRequest(
3178
+ { commentId },
3179
+ []
3180
+ );
3181
+ const reqOpts = markComment(payload);
3182
+ sideEffects?.onSiteCall?.();
3183
+ try {
3184
+ const result = await httpClient.request(reqOpts);
3185
+ sideEffects?.onSuccess?.(result);
3186
+ return renameKeysFromRESTResponseToSDKResponse(
3187
+ transformPaths2(result.data, [
3188
+ {
3189
+ transformFn: transformRESTImageToSDKImage,
3190
+ paths: [
3191
+ { path: "comment.content.attachments.image" },
3192
+ { path: "comment.draftContent.attachments.image" }
3193
+ ]
3194
+ },
3195
+ {
3196
+ transformFn: transformRESTVideoV2ToSDKVideoV2,
3197
+ paths: [
3198
+ { path: "comment.content.attachments.video" },
3199
+ { path: "comment.draftContent.attachments.video" }
3200
+ ]
3201
+ },
3202
+ {
3203
+ transformFn: transformRESTAudioToSDKAudio,
3204
+ paths: [
3205
+ { path: "comment.content.attachments.audio" },
3206
+ { path: "comment.draftContent.attachments.audio" }
3207
+ ]
3208
+ },
3209
+ {
3210
+ transformFn: transformRESTDocumentToSDKDocument,
3211
+ paths: [
3212
+ { path: "comment.content.attachments.document" },
3213
+ { path: "comment.draftContent.attachments.document" }
3214
+ ]
3215
+ }
3216
+ ]),
3217
+ ["comment.content.richContent", "comment.draftContent.richContent"]
3218
+ );
3219
+ } catch (err) {
3220
+ const transformedError = sdkTransformError(
3221
+ err,
3222
+ {
3223
+ spreadPathsToArguments: {},
3224
+ explicitPathsToArguments: { commentId: "$[0]" },
3225
+ singleArgumentUnchanged: false
3226
+ },
3227
+ ["commentId"]
3228
+ );
3229
+ sideEffects?.onError?.(err);
3230
+ throw transformedError;
3231
+ }
3232
+ }
3233
+ async function unmarkComment2(commentId) {
3234
+ const { httpClient, sideEffects } = arguments[1];
3235
+ const payload = renameKeysFromSDKRequestToRESTRequest(
3236
+ { commentId },
3237
+ []
3238
+ );
3239
+ const reqOpts = unmarkComment(payload);
3240
+ sideEffects?.onSiteCall?.();
3241
+ try {
3242
+ const result = await httpClient.request(reqOpts);
3243
+ sideEffects?.onSuccess?.(result);
3244
+ return renameKeysFromRESTResponseToSDKResponse(
3245
+ transformPaths2(result.data, [
3246
+ {
3247
+ transformFn: transformRESTImageToSDKImage,
3248
+ paths: [
3249
+ { path: "comment.content.attachments.image" },
3250
+ { path: "comment.draftContent.attachments.image" }
3251
+ ]
3252
+ },
3253
+ {
3254
+ transformFn: transformRESTVideoV2ToSDKVideoV2,
3255
+ paths: [
3256
+ { path: "comment.content.attachments.video" },
3257
+ { path: "comment.draftContent.attachments.video" }
3258
+ ]
3259
+ },
3260
+ {
3261
+ transformFn: transformRESTAudioToSDKAudio,
3262
+ paths: [
3263
+ { path: "comment.content.attachments.audio" },
3264
+ { path: "comment.draftContent.attachments.audio" }
3265
+ ]
3266
+ },
3267
+ {
3268
+ transformFn: transformRESTDocumentToSDKDocument,
3269
+ paths: [
3270
+ { path: "comment.content.attachments.document" },
3271
+ { path: "comment.draftContent.attachments.document" }
3272
+ ]
3273
+ }
3274
+ ]),
3275
+ ["comment.content.richContent", "comment.draftContent.richContent"]
3276
+ );
3277
+ } catch (err) {
3278
+ const transformedError = sdkTransformError(
3279
+ err,
3280
+ {
3281
+ spreadPathsToArguments: {},
3282
+ explicitPathsToArguments: { commentId: "$[0]" },
3283
+ singleArgumentUnchanged: false
3284
+ },
3285
+ ["commentId"]
3286
+ );
3287
+ sideEffects?.onError?.(err);
3288
+ throw transformedError;
3289
+ }
3290
+ }
3291
+ async function hideComment2(commentId) {
3292
+ const { httpClient, sideEffects } = arguments[1];
3293
+ const payload = renameKeysFromSDKRequestToRESTRequest(
3294
+ { commentId },
3295
+ []
3296
+ );
3297
+ const reqOpts = hideComment(payload);
3298
+ sideEffects?.onSiteCall?.();
3299
+ try {
3300
+ const result = await httpClient.request(reqOpts);
3301
+ sideEffects?.onSuccess?.(result);
3302
+ return renameKeysFromRESTResponseToSDKResponse(
3303
+ transformPaths2(result.data, [
3304
+ {
3305
+ transformFn: transformRESTImageToSDKImage,
3306
+ paths: [
3307
+ { path: "comment.content.attachments.image" },
3308
+ { path: "comment.draftContent.attachments.image" }
3309
+ ]
3310
+ },
3311
+ {
3312
+ transformFn: transformRESTVideoV2ToSDKVideoV2,
3313
+ paths: [
3314
+ { path: "comment.content.attachments.video" },
3315
+ { path: "comment.draftContent.attachments.video" }
3316
+ ]
3317
+ },
3318
+ {
3319
+ transformFn: transformRESTAudioToSDKAudio,
3320
+ paths: [
3321
+ { path: "comment.content.attachments.audio" },
3322
+ { path: "comment.draftContent.attachments.audio" }
3323
+ ]
3324
+ },
3325
+ {
3326
+ transformFn: transformRESTDocumentToSDKDocument,
3327
+ paths: [
3328
+ { path: "comment.content.attachments.document" },
3329
+ { path: "comment.draftContent.attachments.document" }
3330
+ ]
3331
+ }
3332
+ ]),
3333
+ ["comment.content.richContent", "comment.draftContent.richContent"]
3334
+ );
3335
+ } catch (err) {
3336
+ const transformedError = sdkTransformError(
3337
+ err,
3338
+ {
3339
+ spreadPathsToArguments: {},
3340
+ explicitPathsToArguments: { commentId: "$[0]" },
3341
+ singleArgumentUnchanged: false
3342
+ },
3343
+ ["commentId"]
3344
+ );
3345
+ sideEffects?.onError?.(err);
3346
+ throw transformedError;
3347
+ }
3348
+ }
3349
+ async function publishComment2(commentId) {
3350
+ const { httpClient, sideEffects } = arguments[1];
3351
+ const payload = renameKeysFromSDKRequestToRESTRequest(
3352
+ { commentId },
3353
+ []
3354
+ );
3355
+ const reqOpts = publishComment(payload);
3356
+ sideEffects?.onSiteCall?.();
3357
+ try {
3358
+ const result = await httpClient.request(reqOpts);
3359
+ sideEffects?.onSuccess?.(result);
3360
+ return renameKeysFromRESTResponseToSDKResponse(
3361
+ transformPaths2(result.data, [
3362
+ {
3363
+ transformFn: transformRESTImageToSDKImage,
3364
+ paths: [
3365
+ { path: "comment.content.attachments.image" },
3366
+ { path: "comment.draftContent.attachments.image" }
3367
+ ]
3368
+ },
3369
+ {
3370
+ transformFn: transformRESTVideoV2ToSDKVideoV2,
3371
+ paths: [
3372
+ { path: "comment.content.attachments.video" },
3373
+ { path: "comment.draftContent.attachments.video" }
3374
+ ]
3375
+ },
3376
+ {
3377
+ transformFn: transformRESTAudioToSDKAudio,
3378
+ paths: [
3379
+ { path: "comment.content.attachments.audio" },
3380
+ { path: "comment.draftContent.attachments.audio" }
3381
+ ]
3382
+ },
3383
+ {
3384
+ transformFn: transformRESTDocumentToSDKDocument,
3385
+ paths: [
3386
+ { path: "comment.content.attachments.document" },
3387
+ { path: "comment.draftContent.attachments.document" }
3388
+ ]
3389
+ }
3390
+ ]),
3391
+ ["comment.content.richContent", "comment.draftContent.richContent"]
3392
+ );
3393
+ } catch (err) {
3394
+ const transformedError = sdkTransformError(
3395
+ err,
3396
+ {
3397
+ spreadPathsToArguments: {},
3398
+ explicitPathsToArguments: { commentId: "$[0]" },
3399
+ singleArgumentUnchanged: false
3400
+ },
3401
+ ["commentId"]
3402
+ );
3403
+ sideEffects?.onError?.(err);
3404
+ throw transformedError;
3405
+ }
3406
+ }
3407
+ async function countComments2(appId, options) {
3408
+ const { httpClient, sideEffects } = arguments[2];
3409
+ const payload = renameKeysFromSDKRequestToRESTRequest(
3410
+ { appId, filter: options?.filter },
3411
+ []
3412
+ );
3413
+ const reqOpts = countComments(payload);
3414
+ sideEffects?.onSiteCall?.();
3415
+ try {
3416
+ const result = await httpClient.request(reqOpts);
3417
+ sideEffects?.onSuccess?.(result);
3418
+ return renameKeysFromRESTResponseToSDKResponse(result.data, []);
3419
+ } catch (err) {
3420
+ const transformedError = sdkTransformError(
3421
+ err,
3422
+ {
3423
+ spreadPathsToArguments: {},
3424
+ explicitPathsToArguments: { appId: "$[0]", filter: "$[1].filter" },
3425
+ singleArgumentUnchanged: false
3426
+ },
3427
+ ["appId", "options"]
3428
+ );
3429
+ sideEffects?.onError?.(err);
3430
+ throw transformedError;
3431
+ }
3432
+ }
3433
+ async function listCommentsByResource2(appId, options) {
3434
+ const { httpClient, sideEffects } = arguments[2];
3435
+ const payload = renameKeysFromSDKRequestToRESTRequest(
3436
+ {
3437
+ appId,
3438
+ contextId: options?.contextId,
3439
+ contextType: options?.contextType,
3440
+ resourceId: options?.resourceId,
3441
+ commentSort: options?.commentSort,
3442
+ replySort: options?.replySort,
3443
+ cursorPaging: options?.cursorPaging
3444
+ },
3445
+ []
3446
+ );
3447
+ const reqOpts = listCommentsByResource(payload);
3448
+ sideEffects?.onSiteCall?.();
3449
+ try {
3450
+ const result = await httpClient.request(reqOpts);
3451
+ sideEffects?.onSuccess?.(result);
3452
+ return renameKeysFromRESTResponseToSDKResponse(
3453
+ transformPaths2(result.data, [
3454
+ {
3455
+ transformFn: transformRESTImageToSDKImage,
3456
+ paths: [
3457
+ { path: "comments.content.attachments.image" },
3458
+ { path: "comments.draftContent.attachments.image" },
3459
+ { path: "commentReplies.*.replies.content.attachments.image" },
3460
+ { path: "commentReplies.*.replies.draftContent.attachments.image" }
3461
+ ]
3462
+ },
3463
+ {
3464
+ transformFn: transformRESTVideoV2ToSDKVideoV2,
3465
+ paths: [
3466
+ { path: "comments.content.attachments.video" },
3467
+ { path: "comments.draftContent.attachments.video" },
3468
+ { path: "commentReplies.*.replies.content.attachments.video" },
3469
+ { path: "commentReplies.*.replies.draftContent.attachments.video" }
3470
+ ]
3471
+ },
3472
+ {
3473
+ transformFn: transformRESTAudioToSDKAudio,
3474
+ paths: [
3475
+ { path: "comments.content.attachments.audio" },
3476
+ { path: "comments.draftContent.attachments.audio" },
3477
+ { path: "commentReplies.*.replies.content.attachments.audio" },
3478
+ { path: "commentReplies.*.replies.draftContent.attachments.audio" }
3479
+ ]
3480
+ },
3481
+ {
3482
+ transformFn: transformRESTDocumentToSDKDocument,
3483
+ paths: [
3484
+ { path: "comments.content.attachments.document" },
3485
+ { path: "comments.draftContent.attachments.document" },
3486
+ { path: "commentReplies.*.replies.content.attachments.document" },
3487
+ {
3488
+ path: "commentReplies.*.replies.draftContent.attachments.document"
3489
+ }
3490
+ ]
3491
+ }
3492
+ ]),
3493
+ ["comments.content.richContent", "comments.draftContent.richContent"]
3494
+ );
3495
+ } catch (err) {
3496
+ const transformedError = sdkTransformError(
3497
+ err,
3498
+ {
3499
+ spreadPathsToArguments: {},
3500
+ explicitPathsToArguments: {
3501
+ appId: "$[0]",
3502
+ contextId: "$[1].contextId",
3503
+ contextType: "$[1].contextType",
3504
+ resourceId: "$[1].resourceId",
3505
+ commentSort: "$[1].commentSort",
3506
+ replySort: "$[1].replySort",
3507
+ cursorPaging: "$[1].cursorPaging"
3508
+ },
3509
+ singleArgumentUnchanged: false
3510
+ },
3511
+ ["appId", "options"]
3512
+ );
3513
+ sideEffects?.onError?.(err);
3514
+ throw transformedError;
3515
+ }
3516
+ }
3517
+ async function getCommentThread2(commentId, options) {
3518
+ const { httpClient, sideEffects } = arguments[2];
3519
+ const payload = renameKeysFromSDKRequestToRESTRequest(
3520
+ {
3521
+ commentId,
3522
+ appId: options?.appId,
3523
+ commentSort: options?.commentSort,
3524
+ replySort: options?.replySort
3525
+ },
3526
+ []
3527
+ );
3528
+ const reqOpts = getCommentThread(payload);
3529
+ sideEffects?.onSiteCall?.();
3530
+ try {
3531
+ const result = await httpClient.request(reqOpts);
3532
+ sideEffects?.onSuccess?.(result);
3533
+ return renameKeysFromRESTResponseToSDKResponse(
3534
+ transformPaths2(result.data, [
3535
+ {
3536
+ transformFn: transformRESTImageToSDKImage,
3537
+ paths: [
3538
+ { path: "comments.content.attachments.image" },
3539
+ { path: "comments.draftContent.attachments.image" },
3540
+ { path: "commentReplies.*.replies.content.attachments.image" },
3541
+ { path: "commentReplies.*.replies.draftContent.attachments.image" }
3542
+ ]
3543
+ },
3544
+ {
3545
+ transformFn: transformRESTVideoV2ToSDKVideoV2,
3546
+ paths: [
3547
+ { path: "comments.content.attachments.video" },
3548
+ { path: "comments.draftContent.attachments.video" },
3549
+ { path: "commentReplies.*.replies.content.attachments.video" },
3550
+ { path: "commentReplies.*.replies.draftContent.attachments.video" }
3551
+ ]
3552
+ },
3553
+ {
3554
+ transformFn: transformRESTAudioToSDKAudio,
3555
+ paths: [
3556
+ { path: "comments.content.attachments.audio" },
3557
+ { path: "comments.draftContent.attachments.audio" },
3558
+ { path: "commentReplies.*.replies.content.attachments.audio" },
3559
+ { path: "commentReplies.*.replies.draftContent.attachments.audio" }
3560
+ ]
3561
+ },
3562
+ {
3563
+ transformFn: transformRESTDocumentToSDKDocument,
3564
+ paths: [
3565
+ { path: "comments.content.attachments.document" },
3566
+ { path: "comments.draftContent.attachments.document" },
3567
+ { path: "commentReplies.*.replies.content.attachments.document" },
3568
+ {
3569
+ path: "commentReplies.*.replies.draftContent.attachments.document"
3570
+ }
3571
+ ]
3572
+ }
3573
+ ]),
3574
+ ["comments.content.richContent", "comments.draftContent.richContent"]
3575
+ );
3576
+ } catch (err) {
3577
+ const transformedError = sdkTransformError(
3578
+ err,
3579
+ {
3580
+ spreadPathsToArguments: {},
3581
+ explicitPathsToArguments: {
3582
+ commentId: "$[0]",
3583
+ appId: "$[1].appId",
3584
+ commentSort: "$[1].commentSort",
3585
+ replySort: "$[1].replySort"
3586
+ },
3587
+ singleArgumentUnchanged: false
3588
+ },
3589
+ ["commentId", "options"]
3590
+ );
3591
+ sideEffects?.onError?.(err);
3592
+ throw transformedError;
3593
+ }
3594
+ }
3595
+ async function bulkPublishComment2(appId, options) {
3596
+ const { httpClient, sideEffects } = arguments[2];
3597
+ const payload = renameKeysFromSDKRequestToRESTRequest(
3598
+ { appId, filter: options?.filter },
3599
+ []
3600
+ );
3601
+ const reqOpts = bulkPublishComment(payload);
3602
+ sideEffects?.onSiteCall?.();
3603
+ try {
3604
+ const result = await httpClient.request(reqOpts);
3605
+ sideEffects?.onSuccess?.(result);
3606
+ return renameKeysFromRESTResponseToSDKResponse(result.data, []);
3607
+ } catch (err) {
3608
+ const transformedError = sdkTransformError(
3609
+ err,
3610
+ {
3611
+ spreadPathsToArguments: {},
3612
+ explicitPathsToArguments: { appId: "$[0]", filter: "$[1].filter" },
3613
+ singleArgumentUnchanged: false
3614
+ },
3615
+ ["appId", "options"]
3616
+ );
3617
+ sideEffects?.onError?.(err);
3618
+ throw transformedError;
3619
+ }
3620
+ }
3621
+ async function bulkHideComment2(appId, options) {
3622
+ const { httpClient, sideEffects } = arguments[2];
3623
+ const payload = renameKeysFromSDKRequestToRESTRequest(
3624
+ { appId, filter: options?.filter },
3625
+ []
3626
+ );
3627
+ const reqOpts = bulkHideComment(payload);
3628
+ sideEffects?.onSiteCall?.();
3629
+ try {
3630
+ const result = await httpClient.request(reqOpts);
3631
+ sideEffects?.onSuccess?.(result);
3632
+ return renameKeysFromRESTResponseToSDKResponse(result.data, []);
3633
+ } catch (err) {
3634
+ const transformedError = sdkTransformError(
3635
+ err,
3636
+ {
3637
+ spreadPathsToArguments: {},
3638
+ explicitPathsToArguments: { appId: "$[0]", filter: "$[1].filter" },
3639
+ singleArgumentUnchanged: false
3640
+ },
3641
+ ["appId", "options"]
3642
+ );
3643
+ sideEffects?.onError?.(err);
3644
+ throw transformedError;
3645
+ }
3646
+ }
3647
+ async function bulkDeleteComment2(appId, options) {
3648
+ const { httpClient, sideEffects } = arguments[2];
3649
+ const payload = renameKeysFromSDKRequestToRESTRequest(
3650
+ { appId, filter: options?.filter },
3651
+ []
3652
+ );
3653
+ const reqOpts = bulkDeleteComment(payload);
3654
+ sideEffects?.onSiteCall?.();
3655
+ try {
3656
+ const result = await httpClient.request(reqOpts);
3657
+ sideEffects?.onSuccess?.(result);
3658
+ return renameKeysFromRESTResponseToSDKResponse(result.data, []);
3659
+ } catch (err) {
3660
+ const transformedError = sdkTransformError(
3661
+ err,
3662
+ {
3663
+ spreadPathsToArguments: {},
3664
+ explicitPathsToArguments: { appId: "$[0]", filter: "$[1].filter" },
3665
+ singleArgumentUnchanged: false
3666
+ },
3667
+ ["appId", "options"]
3668
+ );
3669
+ sideEffects?.onError?.(err);
3670
+ throw transformedError;
3671
+ }
3672
+ }
3673
+ async function bulkModerateDraftContent2(appId, options) {
3674
+ const { httpClient, sideEffects } = arguments[2];
3675
+ const payload = renameKeysFromSDKRequestToRESTRequest(
3676
+ {
3677
+ appId,
3678
+ filter: options?.filter,
3679
+ draftContentAction: options?.draftContentAction
3680
+ },
3681
+ []
3682
+ );
3683
+ const reqOpts = bulkModerateDraftContent(payload);
3684
+ sideEffects?.onSiteCall?.();
3685
+ try {
3686
+ const result = await httpClient.request(reqOpts);
3687
+ sideEffects?.onSuccess?.(result);
3688
+ return renameKeysFromRESTResponseToSDKResponse(result.data, []);
3689
+ } catch (err) {
3690
+ const transformedError = sdkTransformError(
3691
+ err,
3692
+ {
3693
+ spreadPathsToArguments: {},
3694
+ explicitPathsToArguments: {
3695
+ appId: "$[0]",
3696
+ filter: "$[1].filter",
3697
+ draftContentAction: "$[1].draftContentAction"
3698
+ },
3699
+ singleArgumentUnchanged: false
3700
+ },
3701
+ ["appId", "options"]
3702
+ );
3703
+ sideEffects?.onError?.(err);
3704
+ throw transformedError;
3705
+ }
3706
+ }
3707
+ async function bulkMoveCommentByFilter2(appId, options) {
3708
+ const { httpClient, sideEffects } = arguments[2];
3709
+ const payload = renameKeysFromSDKRequestToRESTRequest(
3710
+ {
3711
+ appId,
3712
+ filter: options?.filter,
3713
+ destination: options?.destination
3714
+ },
3715
+ []
3716
+ );
3717
+ const reqOpts = bulkMoveCommentByFilter(payload);
3718
+ sideEffects?.onSiteCall?.();
3719
+ try {
3720
+ const result = await httpClient.request(reqOpts);
3721
+ sideEffects?.onSuccess?.(result);
3722
+ return renameKeysFromRESTResponseToSDKResponse(result.data, []);
3723
+ } catch (err) {
3724
+ const transformedError = sdkTransformError(
3725
+ err,
3726
+ {
3727
+ spreadPathsToArguments: {},
3728
+ explicitPathsToArguments: {
3729
+ appId: "$[0]",
3730
+ filter: "$[1].filter",
3731
+ destination: "$[1].destination"
3732
+ },
3733
+ singleArgumentUnchanged: false
3734
+ },
3735
+ ["appId", "options"]
3736
+ );
3737
+ sideEffects?.onError?.(err);
3738
+ throw transformedError;
3739
+ }
3740
+ }
3741
+ export {
3742
+ Action,
3743
+ Alignment,
3744
+ AppType,
3745
+ AspectRatio,
3746
+ BackgroundType,
3747
+ ButtonDataType,
3748
+ Crop,
3749
+ DecorationType,
3750
+ Direction,
3751
+ DividerDataAlignment,
3752
+ FontType,
3753
+ GIFType,
3754
+ InitialExpandedItems,
3755
+ Layout,
3756
+ LayoutType,
3757
+ LineStyle,
3758
+ MapType,
3759
+ NodeType,
3760
+ NullValue,
3761
+ Order,
3762
+ Orientation,
3763
+ Placement,
3764
+ PluginContainerDataAlignment,
3765
+ PollLayoutDirection,
3766
+ PollLayoutType,
3767
+ Position,
3768
+ ReplySortOrder,
3769
+ Resizing,
3770
+ SortOrder,
3771
+ Source,
3772
+ Status,
3773
+ StylesPosition,
3774
+ Target,
3775
+ TextAlignment,
3776
+ ThumbnailsAlignment,
3777
+ Type,
3778
+ VersioningMode,
3779
+ VerticalAlignment,
3780
+ ViewMode,
3781
+ ViewRole,
3782
+ VoteRole,
3783
+ WebhookIdentityType,
3784
+ Width,
3785
+ WidthType,
3786
+ bulkDeleteComment2 as bulkDeleteComment,
3787
+ bulkHideComment2 as bulkHideComment,
3788
+ bulkModerateDraftContent2 as bulkModerateDraftContent,
3789
+ bulkMoveCommentByFilter2 as bulkMoveCommentByFilter,
3790
+ bulkPublishComment2 as bulkPublishComment,
3791
+ countComments2 as countComments,
3792
+ createComment2 as createComment,
3793
+ deleteComment2 as deleteComment,
3794
+ getComment2 as getComment,
3795
+ getCommentThread2 as getCommentThread,
3796
+ hideComment2 as hideComment,
3797
+ listCommentsByResource2 as listCommentsByResource,
3798
+ markComment2 as markComment,
3799
+ moderateDraftContent2 as moderateDraftContent,
3800
+ publishComment2 as publishComment,
3801
+ queryComments2 as queryComments,
3802
+ unmarkComment2 as unmarkComment,
3803
+ updateComment2 as updateComment
3804
+ };
3805
+ //# sourceMappingURL=index.typings.mjs.map