@wix/auto_sdk_comments_comments 1.0.32 → 1.0.34
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.
- package/build/cjs/index.d.ts +8 -25
- package/build/cjs/index.js +90 -8
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +52 -6
- package/build/cjs/index.typings.js +69 -5
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +37 -3
- package/build/cjs/meta.js +1 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +8 -25
- package/build/es/index.mjs +90 -8
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +52 -6
- package/build/es/index.typings.mjs +68 -5
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +37 -3
- package/build/es/meta.mjs +1 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +8 -25
- package/build/internal/cjs/index.js +90 -8
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +52 -6
- package/build/internal/cjs/index.typings.js +69 -5
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +37 -3
- package/build/internal/cjs/meta.js +1 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +8 -25
- package/build/internal/es/index.mjs +90 -8
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +52 -6
- package/build/internal/es/index.typings.mjs +68 -5
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +37 -3
- package/build/internal/es/meta.mjs +1 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +3 -3
package/build/es/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import { Comment, CreateCommentApplicationErrors, UpdateComment, UpdateCommentApplicationErrors, ModerateDraftContentOptions, ModerateDraftContentResponse,
|
|
3
|
-
export { Action, ActionEvent, ActionWithLiterals, Alignment, AlignmentWithLiterals, AnchorData, AppEmbedData, AppEmbedDataAppDataOneOf, AppType, AppTypeWithLiterals, AspectRatio, AspectRatioWithLiterals, Attachment, AttachmentMediaOneOf, AudioData, Background, BackgroundBackgroundOneOf, BackgroundImage, BackgroundType, BackgroundTypeWithLiterals, BaseEventMetadata, BlockquoteData, BookingData, Border, BorderColors, BulkDeleteCommentRequest, BulkHideCommentRequest, BulkModerateDraftContentRequest, BulkMoveCommentByFilterRequest, BulkPublishCommentRequest, BulletedListData, ButtonData, ButtonDataType, ButtonDataTypeWithLiterals, ButtonStyles, CaptionData, CardStyles, CellStyle, CodeBlockData, CollapsibleListData, ColorData, Colors, CommentAuthor, CommentAuthorIdentityOneOf, CommentContent, CommentContentChanged, CommentDeleted, CommentHidden, CommentMarked, CommentModerated, CommentMoved, CommentPublished, CommentReactionSummary, CommentSort, CommentUnmarked, CommentsQueryResult, ContactDetails, ContentAuthor, ContentAuthorAuthorOneOf, CountCommentsRequest, CreateCommentRequest, CreateCommentResponse, Crop, CropWithLiterals, CursorPaging, CursorPagingMetadata,
|
|
2
|
+
import { Comment, CreateCommentApplicationErrors, UpdateComment, UpdateCommentApplicationErrors, ModerateDraftContentOptions, ModerateDraftContentResponse, MarkCommentResponse, UnmarkCommentResponse, HideCommentResponse, PublishCommentResponse, CountCommentsOptions, CountCommentsResponse, CountCommentsApplicationErrors, ListCommentsByResourceOptions, ListCommentsByResourceResponse, GetCommentThreadOptions, GetCommentThreadResponse, BulkPublishCommentOptions, BulkPublishCommentResponse, BulkHideCommentOptions, BulkHideCommentResponse, BulkDeleteCommentOptions, BulkDeleteCommentResponse, BulkModerateDraftContentOptions, BulkModerateDraftContentResponse, BulkMoveCommentByFilterOptions, BulkMoveCommentByFilterResponse, CommentContentChangedEnvelope, CommentHiddenEnvelope, CommentMarkedEnvelope, CommentMovedEnvelope, CommentPublishedEnvelope, CommentUnmarkedEnvelope, CommentCreatedEnvelope, CommentDeletedEnvelope, CommentResourceCommentCountChangedEnvelope, CommentUpdatedEnvelope, CursorQuery, QueryCommentsOptions, typedQueryComments, CommentsQueryBuilder } from './index.typings.mjs';
|
|
3
|
+
export { Action, ActionEvent, ActionWithLiterals, Alignment, AlignmentWithLiterals, AnchorData, AppEmbedData, AppEmbedDataAppDataOneOf, AppType, AppTypeWithLiterals, AspectRatio, AspectRatioWithLiterals, Attachment, AttachmentMediaOneOf, AudioData, Background, BackgroundBackgroundOneOf, BackgroundImage, BackgroundType, BackgroundTypeWithLiterals, BaseEventMetadata, BlockquoteData, BookingData, Border, BorderColors, BorderWidths, BulkDeleteCommentRequest, BulkHideCommentRequest, BulkModerateDraftContentRequest, BulkMoveCommentByFilterRequest, BulkPublishCommentRequest, BulletedListData, ButtonData, ButtonDataType, ButtonDataTypeWithLiterals, ButtonStyles, CaptionData, CardStyles, CellStyle, CodeBlockData, CollapsibleListData, ColorData, Colors, CommentAuthor, CommentAuthorIdentityOneOf, CommentContent, CommentContentChanged, CommentDeleted, CommentHidden, CommentMarked, CommentModerated, CommentMoved, CommentPublished, CommentReactionSummary, CommentSort, CommentUnmarked, CommentsQueryResult, ContactDetails, ContentAuthor, ContentAuthorAuthorOneOf, CountCommentsRequest, CreateCommentRequest, CreateCommentResponse, Crop, CropWithLiterals, CursorPaging, CursorPagingMetadata, CursorQueryPagingMethodOneOf, Cursors, Decoration, DecorationDataOneOf, DecorationType, DecorationTypeWithLiterals, DeleteByFilterOperation, DeleteByIdsOperation, DeleteCommentRequest, DeleteCommentResponse, Design, Destination, Dimensions, Direction, DirectionWithLiterals, DividerData, DividerDataAlignment, DividerDataAlignmentWithLiterals, DocumentStyle, DomainEvent, DomainEventBodyOneOf, EmbedData, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventData, EventMetadata, FileData, FileSource, FileSourceDataOneOf, FontFamilyData, FontSizeData, FontType, FontTypeWithLiterals, GIF, GIFData, GIFType, GIFTypeWithLiterals, GalleryData, GalleryOptions, GalleryOptionsLayout, GetCommentRequest, GetCommentResponse, GetCommentThreadRequest, Gradient, HTMLData, HTMLDataDataOneOf, HeadingData, Height, HideCommentRequest, IdentificationData, IdentificationDataIdOneOf, Image, ImageData, ImageDataStyles, ImagePosition, ImagePositionWithLiterals, ImageStyles, InitialExpandedItems, InitialExpandedItemsWithLiterals, InternalDocument, InternalDocumentUpdateByFilterOperation, InternalDocumentUpdateOperation, InternalUpdateExistingOperation, Item, ItemDataOneOf, ItemStyle, Layout, LayoutCellData, LayoutData, LayoutType, LayoutTypeWithLiterals, LayoutWithLiterals, LineStyle, LineStyleWithLiterals, Link, LinkData, LinkDataOneOf, LinkPreviewData, LinkPreviewDataStyles, ListCommentsByResourceCursorPaging, ListCommentsByResourceRequest, ListValue, MapData, MapSettings, MapType, MapTypeWithLiterals, MarkCommentRequest, Media, Mention, MentionData, MentionIdentityOneOf, MessageEnvelope, Metadata, ModerateDraftContentRequest, Node, NodeDataOneOf, NodeStyle, NodeType, NodeTypeWithLiterals, NullValue, NullValueWithLiterals, Oembed, Option, OptionDesign, OptionLayout, Order, OrderWithLiterals, OrderedListData, Orientation, OrientationWithLiterals, PDFSettings, ParagraphData, ParentComment, Permissions, Placement, PlacementWithLiterals, PlaybackOptions, PluginContainerData, PluginContainerDataAlignment, PluginContainerDataAlignmentWithLiterals, PluginContainerDataWidth, PluginContainerDataWidthDataOneOf, Poll, PollData, PollDataLayout, PollDesign, PollLayout, PollLayoutDirection, PollLayoutDirectionWithLiterals, PollLayoutType, PollLayoutTypeWithLiterals, Position, PositionWithLiterals, PricingData, PublishCommentRequest, QueryCommentsRequest, QueryCommentsResponse, Rel, RepliesListResponse, ReplySort, ReplySortOrder, ReplySortOrderWithLiterals, Resizing, ResizingWithLiterals, ResourceCommentCountChanged, ResponsivenessBehaviour, ResponsivenessBehaviourWithLiterals, RestoreInfo, RibbonStyles, RichContent, Scaling, ScalingWithLiterals, Settings, SortOrder, SortOrderWithLiterals, Sorting, Source, SourceWithLiterals, Spoiler, SpoilerData, Status, StatusWithLiterals, Styles, StylesBorder, StylesPosition, StylesPositionWithLiterals, TableCellData, TableData, Target, TargetWithLiterals, TextAlignment, TextAlignmentWithLiterals, TextData, TextNodeStyle, TextStyle, Thumbnails, ThumbnailsAlignment, ThumbnailsAlignmentWithLiterals, Type, TypeWithLiterals, UnmarkCommentRequest, UpdateCommentRequest, UpdateCommentResponse, UpdateInternalDocumentsEvent, UpdateInternalDocumentsEventOperationOneOf, VersionedDeleteByIdsOperation, VersionedDocumentId, VersionedDocumentUpdateOperation, VersioningMode, VersioningModeWithLiterals, VerticalAlignment, VerticalAlignmentAlignment, VerticalAlignmentAlignmentWithLiterals, VerticalAlignmentWithLiterals, Video, VideoData, VideoResolution, ViewMode, ViewModeWithLiterals, ViewRole, ViewRoleWithLiterals, VoteRole, VoteRoleWithLiterals, VoteSummary, WebhookIdentityType, WebhookIdentityTypeWithLiterals, Width, WidthType, WidthTypeWithLiterals, WidthWithLiterals } from './index.typings.mjs';
|
|
4
4
|
|
|
5
5
|
declare function createComment$1(httpClient: HttpClient): CreateCommentSignature;
|
|
6
6
|
interface CreateCommentSignature {
|
|
@@ -72,27 +72,6 @@ interface ModerateDraftContentSignature {
|
|
|
72
72
|
*/
|
|
73
73
|
(commentId: string, revision: string, options?: ModerateDraftContentOptions): Promise<NonNullablePaths<ModerateDraftContentResponse, `comment.content.mentions` | `comment.content.attachments` | `comment.parentComment.status` | `comment.replyCount` | `comment.voteSummary.netVoteCount` | `comment.voteSummary.upvoteCount` | `comment.voteSummary.downvoteCount` | `comment.status` | `comment.reactionSummary.total` | `comment.marked`, 4>>;
|
|
74
74
|
}
|
|
75
|
-
declare function queryComments$1(httpClient: HttpClient): QueryCommentsSignature;
|
|
76
|
-
interface QueryCommentsSignature {
|
|
77
|
-
/**
|
|
78
|
-
* Creates a query to retrieve a list of comments.
|
|
79
|
-
*
|
|
80
|
-
* The `queryComments()` function builds a query to retrieve a list of comments and returns a [`CommentsQueryBuilder`](#commentsquerybuilder) object.
|
|
81
|
-
*
|
|
82
|
-
* The returned object contains the query definition, which is typically used to run the query using the [`find()`](#commentsquerybuilder/find) function.
|
|
83
|
-
*
|
|
84
|
-
* You can refine the query by chaining `CommentsQueryBuilder` functions onto the query. `CommentsQueryBuilder` functions enable you to sort, filter, and control the results that `queryComments()` returns.
|
|
85
|
-
*
|
|
86
|
-
* `queryComments()` runs with the following `CommentsQueryBuilder` default that you can override:
|
|
87
|
-
* + `ascending("_id")`
|
|
88
|
-
*
|
|
89
|
-
* The functions that are chained to `queryComments()` are applied in the order they are called. For example, if you apply `ascending("voteSummary.netVoteCount")` and then `ascending("replyCount")`, the results are sorted first by the `"voteSummary.netVoteCount"`, and then, if there are multiple results with the same `"voteSummary.netVoteCount"`, the items are sorted by `"replyCount"`.
|
|
90
|
-
*
|
|
91
|
-
* The following `CommentsQueryBuilder` functions are supported for the `queryComments()` function. For a full description of the comment object, see the object returned for the [`items`](#commentsqueryresult/items) property in [`CommentsQueryResult`](#commentsqueryresult).
|
|
92
|
-
* @param - App ID to query comments for.
|
|
93
|
-
*/
|
|
94
|
-
(appId: string): CommentsQueryBuilder;
|
|
95
|
-
}
|
|
96
75
|
declare function markComment$1(httpClient: HttpClient): MarkCommentSignature;
|
|
97
76
|
interface MarkCommentSignature {
|
|
98
77
|
/**
|
|
@@ -220,12 +199,15 @@ declare const onCommentDeleted$1: EventDefinition<CommentDeletedEnvelope, "wix.c
|
|
|
220
199
|
declare const onCommentResourceCommentCountChanged$1: EventDefinition<CommentResourceCommentCountChangedEnvelope, "wix.comments.v2.comment_resource_comment_count_changed">;
|
|
221
200
|
declare const onCommentUpdated$1: EventDefinition<CommentUpdatedEnvelope, "wix.comments.v2.comment_updated">;
|
|
222
201
|
|
|
202
|
+
declare function customQueryComments(httpClient: HttpClient): {
|
|
203
|
+
(query: CursorQuery, options: QueryCommentsOptions): ReturnType<typeof typedQueryComments>;
|
|
204
|
+
(options: QueryCommentsOptions): CommentsQueryBuilder;
|
|
205
|
+
};
|
|
223
206
|
declare const createComment: MaybeContext<BuildRESTFunction<typeof createComment$1> & typeof createComment$1>;
|
|
224
207
|
declare const getComment: MaybeContext<BuildRESTFunction<typeof getComment$1> & typeof getComment$1>;
|
|
225
208
|
declare const updateComment: MaybeContext<BuildRESTFunction<typeof updateComment$1> & typeof updateComment$1>;
|
|
226
209
|
declare const deleteComment: MaybeContext<BuildRESTFunction<typeof deleteComment$1> & typeof deleteComment$1>;
|
|
227
210
|
declare const moderateDraftContent: MaybeContext<BuildRESTFunction<typeof moderateDraftContent$1> & typeof moderateDraftContent$1>;
|
|
228
|
-
declare const queryComments: MaybeContext<BuildRESTFunction<typeof queryComments$1> & typeof queryComments$1>;
|
|
229
211
|
declare const markComment: MaybeContext<BuildRESTFunction<typeof markComment$1> & typeof markComment$1>;
|
|
230
212
|
declare const unmarkComment: MaybeContext<BuildRESTFunction<typeof unmarkComment$1> & typeof unmarkComment$1>;
|
|
231
213
|
declare const hideComment: MaybeContext<BuildRESTFunction<typeof hideComment$1> & typeof hideComment$1>;
|
|
@@ -238,6 +220,7 @@ declare const bulkHideComment: MaybeContext<BuildRESTFunction<typeof bulkHideCom
|
|
|
238
220
|
declare const bulkDeleteComment: MaybeContext<BuildRESTFunction<typeof bulkDeleteComment$1> & typeof bulkDeleteComment$1>;
|
|
239
221
|
declare const bulkModerateDraftContent: MaybeContext<BuildRESTFunction<typeof bulkModerateDraftContent$1> & typeof bulkModerateDraftContent$1>;
|
|
240
222
|
declare const bulkMoveCommentByFilter: MaybeContext<BuildRESTFunction<typeof bulkMoveCommentByFilter$1> & typeof bulkMoveCommentByFilter$1>;
|
|
223
|
+
declare const queryComments: MaybeContext<BuildRESTFunction<typeof customQueryComments> & typeof customQueryComments>;
|
|
241
224
|
/**
|
|
242
225
|
* Triggered when comment content is updated.
|
|
243
226
|
*/
|
|
@@ -277,4 +260,4 @@ declare const onCommentResourceCommentCountChanged: BuildEventDefinition<typeof
|
|
|
277
260
|
*/
|
|
278
261
|
declare const onCommentUpdated: BuildEventDefinition<typeof onCommentUpdated$1> & typeof onCommentUpdated$1;
|
|
279
262
|
|
|
280
|
-
export { BulkDeleteCommentOptions, BulkDeleteCommentResponse, BulkHideCommentOptions, BulkHideCommentResponse, BulkModerateDraftContentOptions, BulkModerateDraftContentResponse, BulkMoveCommentByFilterOptions, BulkMoveCommentByFilterResponse, BulkPublishCommentOptions, BulkPublishCommentResponse, Comment, CommentContentChangedEnvelope, CommentCreatedEnvelope, CommentDeletedEnvelope, CommentHiddenEnvelope, CommentMarkedEnvelope, CommentMovedEnvelope, CommentPublishedEnvelope, CommentResourceCommentCountChangedEnvelope, CommentUnmarkedEnvelope, CommentUpdatedEnvelope, CommentsQueryBuilder, CountCommentsApplicationErrors, CountCommentsOptions, CountCommentsResponse, CreateCommentApplicationErrors, GetCommentThreadOptions, GetCommentThreadResponse, HideCommentResponse, ListCommentsByResourceOptions, ListCommentsByResourceResponse, MarkCommentResponse, ModerateDraftContentOptions, ModerateDraftContentResponse, PublishCommentResponse, UnmarkCommentResponse, UpdateComment, UpdateCommentApplicationErrors, bulkDeleteComment, bulkHideComment, bulkModerateDraftContent, bulkMoveCommentByFilter, bulkPublishComment, countComments, createComment, deleteComment, getComment, getCommentThread, hideComment, listCommentsByResource, markComment, moderateDraftContent, onCommentContentChanged, onCommentCreated, onCommentDeleted, onCommentHidden, onCommentMarked, onCommentMoved, onCommentPublished, onCommentResourceCommentCountChanged, onCommentUnmarked, onCommentUpdated, publishComment, queryComments, unmarkComment, updateComment };
|
|
263
|
+
export { BulkDeleteCommentOptions, BulkDeleteCommentResponse, BulkHideCommentOptions, BulkHideCommentResponse, BulkModerateDraftContentOptions, BulkModerateDraftContentResponse, BulkMoveCommentByFilterOptions, BulkMoveCommentByFilterResponse, BulkPublishCommentOptions, BulkPublishCommentResponse, Comment, CommentContentChangedEnvelope, CommentCreatedEnvelope, CommentDeletedEnvelope, CommentHiddenEnvelope, CommentMarkedEnvelope, CommentMovedEnvelope, CommentPublishedEnvelope, CommentResourceCommentCountChangedEnvelope, CommentUnmarkedEnvelope, CommentUpdatedEnvelope, CommentsQueryBuilder, CountCommentsApplicationErrors, CountCommentsOptions, CountCommentsResponse, CreateCommentApplicationErrors, CursorQuery, GetCommentThreadOptions, GetCommentThreadResponse, HideCommentResponse, ListCommentsByResourceOptions, ListCommentsByResourceResponse, MarkCommentResponse, ModerateDraftContentOptions, ModerateDraftContentResponse, PublishCommentResponse, QueryCommentsOptions, UnmarkCommentResponse, UpdateComment, UpdateCommentApplicationErrors, bulkDeleteComment, bulkHideComment, bulkModerateDraftContent, bulkMoveCommentByFilter, bulkPublishComment, countComments, createComment, deleteComment, getComment, getCommentThread, hideComment, listCommentsByResource, markComment, moderateDraftContent, onCommentContentChanged, onCommentCreated, onCommentDeleted, onCommentHidden, onCommentMarked, onCommentMoved, onCommentPublished, onCommentResourceCommentCountChanged, onCommentUnmarked, onCommentUpdated, publishComment, queryComments, unmarkComment, updateComment };
|
package/build/es/index.mjs
CHANGED
|
@@ -2894,6 +2894,7 @@ var DecorationType = /* @__PURE__ */ ((DecorationType2) => {
|
|
|
2894
2894
|
DecorationType2["STRIKETHROUGH"] = "STRIKETHROUGH";
|
|
2895
2895
|
DecorationType2["SUPERSCRIPT"] = "SUPERSCRIPT";
|
|
2896
2896
|
DecorationType2["SUBSCRIPT"] = "SUBSCRIPT";
|
|
2897
|
+
DecorationType2["FONT_FAMILY"] = "FONT_FAMILY";
|
|
2897
2898
|
return DecorationType2;
|
|
2898
2899
|
})(DecorationType || {});
|
|
2899
2900
|
var FontType = /* @__PURE__ */ ((FontType2) => {
|
|
@@ -3374,11 +3375,14 @@ async function moderateDraftContent2(commentId, revision, options) {
|
|
|
3374
3375
|
throw transformedError;
|
|
3375
3376
|
}
|
|
3376
3377
|
}
|
|
3377
|
-
function queryComments2(
|
|
3378
|
+
function queryComments2(options) {
|
|
3378
3379
|
const { httpClient, sideEffects } = arguments[1];
|
|
3379
3380
|
return queryBuilder({
|
|
3380
3381
|
func: async (payload) => {
|
|
3381
|
-
const reqOpts = queryComments(
|
|
3382
|
+
const reqOpts = queryComments({
|
|
3383
|
+
...payload,
|
|
3384
|
+
...options
|
|
3385
|
+
});
|
|
3382
3386
|
sideEffects?.onSiteCall?.();
|
|
3383
3387
|
try {
|
|
3384
3388
|
const result = await httpClient.request(reqOpts);
|
|
@@ -3390,9 +3394,9 @@ function queryComments2(appId) {
|
|
|
3390
3394
|
}
|
|
3391
3395
|
},
|
|
3392
3396
|
requestTransformer: (query) => {
|
|
3393
|
-
const args = [query,
|
|
3397
|
+
const args = [query, options];
|
|
3394
3398
|
return renameKeysFromSDKRequestToRESTRequest(
|
|
3395
|
-
{
|
|
3399
|
+
{ ...args?.[1], query: args?.[0] },
|
|
3396
3400
|
[]
|
|
3397
3401
|
);
|
|
3398
3402
|
},
|
|
@@ -3438,7 +3442,7 @@ function queryComments2(appId) {
|
|
|
3438
3442
|
errorTransformer: (err) => {
|
|
3439
3443
|
const transformedError = sdkTransformError(err, {
|
|
3440
3444
|
spreadPathsToArguments: {},
|
|
3441
|
-
explicitPathsToArguments: {
|
|
3445
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
3442
3446
|
singleArgumentUnchanged: false
|
|
3443
3447
|
});
|
|
3444
3448
|
throw transformedError;
|
|
@@ -3447,6 +3451,64 @@ function queryComments2(appId) {
|
|
|
3447
3451
|
transformationPaths: {}
|
|
3448
3452
|
});
|
|
3449
3453
|
}
|
|
3454
|
+
async function typedQueryComments(query, options) {
|
|
3455
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
3456
|
+
const payload = renameKeysFromSDKRequestToRESTRequest(
|
|
3457
|
+
{ query, ...options },
|
|
3458
|
+
[]
|
|
3459
|
+
);
|
|
3460
|
+
const reqOpts = queryComments(payload);
|
|
3461
|
+
sideEffects?.onSiteCall?.();
|
|
3462
|
+
try {
|
|
3463
|
+
const result = await httpClient.request(reqOpts);
|
|
3464
|
+
sideEffects?.onSuccess?.(result);
|
|
3465
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
3466
|
+
transformPaths2(result.data, [
|
|
3467
|
+
{
|
|
3468
|
+
transformFn: transformRESTImageToSDKImage,
|
|
3469
|
+
paths: [
|
|
3470
|
+
{ path: "comments.content.attachments.image" },
|
|
3471
|
+
{ path: "comments.draftContent.attachments.image" }
|
|
3472
|
+
]
|
|
3473
|
+
},
|
|
3474
|
+
{
|
|
3475
|
+
transformFn: transformRESTVideoV2ToSDKVideoV2,
|
|
3476
|
+
paths: [
|
|
3477
|
+
{ path: "comments.content.attachments.video" },
|
|
3478
|
+
{ path: "comments.draftContent.attachments.video" }
|
|
3479
|
+
]
|
|
3480
|
+
},
|
|
3481
|
+
{
|
|
3482
|
+
transformFn: transformRESTAudioToSDKAudio,
|
|
3483
|
+
paths: [
|
|
3484
|
+
{ path: "comments.content.attachments.audio" },
|
|
3485
|
+
{ path: "comments.draftContent.attachments.audio" }
|
|
3486
|
+
]
|
|
3487
|
+
},
|
|
3488
|
+
{
|
|
3489
|
+
transformFn: transformRESTDocumentToSDKDocument,
|
|
3490
|
+
paths: [
|
|
3491
|
+
{ path: "comments.content.attachments.document" },
|
|
3492
|
+
{ path: "comments.draftContent.attachments.document" }
|
|
3493
|
+
]
|
|
3494
|
+
}
|
|
3495
|
+
]),
|
|
3496
|
+
["comments.content.richContent", "comments.draftContent.richContent"]
|
|
3497
|
+
);
|
|
3498
|
+
} catch (err) {
|
|
3499
|
+
const transformedError = sdkTransformError(
|
|
3500
|
+
err,
|
|
3501
|
+
{
|
|
3502
|
+
spreadPathsToArguments: {},
|
|
3503
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
3504
|
+
singleArgumentUnchanged: false
|
|
3505
|
+
},
|
|
3506
|
+
["query", "options"]
|
|
3507
|
+
);
|
|
3508
|
+
sideEffects?.onError?.(err);
|
|
3509
|
+
throw transformedError;
|
|
3510
|
+
}
|
|
3511
|
+
}
|
|
3450
3512
|
async function markComment2(commentId) {
|
|
3451
3513
|
const { httpClient, sideEffects } = arguments[1];
|
|
3452
3514
|
const payload = renameKeysFromSDKRequestToRESTRequest(
|
|
@@ -4054,8 +4116,16 @@ function moderateDraftContent3(httpClient) {
|
|
|
4054
4116
|
);
|
|
4055
4117
|
}
|
|
4056
4118
|
function queryComments3(httpClient) {
|
|
4057
|
-
return (
|
|
4058
|
-
|
|
4119
|
+
return (options) => queryComments2(
|
|
4120
|
+
options,
|
|
4121
|
+
// @ts-ignore
|
|
4122
|
+
{ httpClient }
|
|
4123
|
+
);
|
|
4124
|
+
}
|
|
4125
|
+
function typedQueryComments2(httpClient) {
|
|
4126
|
+
return (query, options) => typedQueryComments(
|
|
4127
|
+
query,
|
|
4128
|
+
options,
|
|
4059
4129
|
// @ts-ignore
|
|
4060
4130
|
{ httpClient }
|
|
4061
4131
|
);
|
|
@@ -5647,12 +5717,23 @@ var onCommentUpdated = EventDefinition(
|
|
|
5647
5717
|
// src/comments-v2-comment-comments.context.ts
|
|
5648
5718
|
import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
|
|
5649
5719
|
import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
|
|
5720
|
+
import { createQueryOverloadRouter } from "@wix/sdk-runtime/query-method-router";
|
|
5721
|
+
function customQueryComments(httpClient) {
|
|
5722
|
+
const router = createQueryOverloadRouter({
|
|
5723
|
+
builderQueryFunction: (options) => queryComments3(httpClient)(options),
|
|
5724
|
+
typedQueryFunction: (query, options) => typedQueryComments2(httpClient)(query, options),
|
|
5725
|
+
hasOptionsParameter: true
|
|
5726
|
+
});
|
|
5727
|
+
function overloadedQuery(queryOrOptions, options) {
|
|
5728
|
+
return router(...arguments);
|
|
5729
|
+
}
|
|
5730
|
+
return overloadedQuery;
|
|
5731
|
+
}
|
|
5650
5732
|
var createComment4 = /* @__PURE__ */ createRESTModule(createComment3);
|
|
5651
5733
|
var getComment4 = /* @__PURE__ */ createRESTModule(getComment3);
|
|
5652
5734
|
var updateComment4 = /* @__PURE__ */ createRESTModule(updateComment3);
|
|
5653
5735
|
var deleteComment4 = /* @__PURE__ */ createRESTModule(deleteComment3);
|
|
5654
5736
|
var moderateDraftContent4 = /* @__PURE__ */ createRESTModule(moderateDraftContent3);
|
|
5655
|
-
var queryComments4 = /* @__PURE__ */ createRESTModule(queryComments3);
|
|
5656
5737
|
var markComment4 = /* @__PURE__ */ createRESTModule(markComment3);
|
|
5657
5738
|
var unmarkComment4 = /* @__PURE__ */ createRESTModule(unmarkComment3);
|
|
5658
5739
|
var hideComment4 = /* @__PURE__ */ createRESTModule(hideComment3);
|
|
@@ -5665,6 +5746,7 @@ var bulkHideComment4 = /* @__PURE__ */ createRESTModule(bulkHideComment3);
|
|
|
5665
5746
|
var bulkDeleteComment4 = /* @__PURE__ */ createRESTModule(bulkDeleteComment3);
|
|
5666
5747
|
var bulkModerateDraftContent4 = /* @__PURE__ */ createRESTModule(bulkModerateDraftContent3);
|
|
5667
5748
|
var bulkMoveCommentByFilter4 = /* @__PURE__ */ createRESTModule(bulkMoveCommentByFilter3);
|
|
5749
|
+
var queryComments4 = /* @__PURE__ */ createRESTModule(customQueryComments);
|
|
5668
5750
|
var onCommentContentChanged2 = createEventModule(
|
|
5669
5751
|
onCommentContentChanged
|
|
5670
5752
|
);
|