@wix/himalaya-cli 0.1099.0 → 0.1101.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/comments-v1/src/extensions.d.ts +13 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/_shared/runtime.generated.d.ts +27 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/_shared/types.generated.d.ts +829 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/comments/categories.generated.d.ts +113 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/comments/commentContexts.generated.d.ts +43 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/comments/comments.generated.d.ts +553 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/comments/contentRevisions.generated.d.ts +100 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/comments/index.generated.d.ts +7 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/comments/ratings.generated.d.ts +72 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk-auto/comments/widgets.generated.d.ts +138 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-comments.mjs +280 -7
- package/dist/authoring-runtime/node_modules/@wix/himalaya/package.json +1 -1
- package/dist/cli.mjs +16 -1
- package/guides/release-notes.md +9 -0
- package/guides/sdk-reference.json +291 -1
- package/guides/wix-api-usage.md +34 -1
- package/package.json +2 -2
- package/templates/beauty-salon/dev/index.ts +394 -514
- package/templates/beauty-salon/tier5-src/_shared/collection-contract.ts +8 -1
- package/templates/beauty-salon/tier5-src/himi-blog-post/index.ts +14 -4
- package/templates/beauty-salon-owner/tier5-src/_shared/collection-contract.ts +8 -1
- package/templates/branded-lite/dev/index.ts +394 -514
- package/templates/branded-lite/tier5-src/_shared/collection-contract.ts +8 -1
- package/templates/branded-lite/tier5-src/himi-blog-post/index.ts +14 -4
- package/templates/community-club/tier5-src/_shared/collection-contract.ts +8 -1
- package/templates/community-club/tier5-src/himi-blog-post/index.ts +14 -4
- package/templates/community-club-owner/tier5-src/_shared/collection-contract.ts +8 -1
- package/templates/events-meetups/tier5-src/_shared/collection-contract.ts +8 -1
- package/templates/events-meetups/tier5-src/himi-blog-post/index.ts +14 -4
- package/templates/events-meetups-owner/tier5-src/_shared/collection-contract.ts +8 -1
- package/templates/gym-fitness/dev/index.ts +394 -514
- package/templates/gym-fitness/tier5-src/_shared/collection-contract.ts +8 -1
- package/templates/gym-fitness/tier5-src/himi-blog-post/index.ts +14 -4
- package/templates/gym-fitness-owner/tier5-src/_shared/collection-contract.ts +8 -1
- package/templates/nonprofit-cause/tier5-src/_shared/collection-contract.ts +8 -1
- package/templates/nonprofit-cause/tier5-src/himi-blog-post/index.ts +14 -4
- package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-contract.ts +8 -1
- package/templates/owner-lite/tier5-src/_shared/collection-contract.ts +8 -1
- package/templates/podcast-creator/tier5-src/_shared/collection-contract.ts +8 -1
- package/templates/podcast-creator/tier5-src/himi-blog-post/index.ts +14 -4
- package/templates/podcast-creator-owner/tier5-src/_shared/collection-contract.ts +8 -1
- package/templates/portfolio-creative/dev/index.ts +396 -516
- package/templates/portfolio-creative/tier5-src/_shared/collection-contract.ts +8 -1
- package/templates/portfolio-creative/tier5-src/himi-blog-post/index.ts +14 -4
- package/templates/portfolio-creative-owner/tier5-src/_shared/collection-contract.ts +8 -1
- package/templates/restaurant/tier5-src/_shared/collection-contract.ts +8 -1
- package/templates/restaurant/tier5-src/himi-blog-post/index.ts +14 -4
- package/templates/restaurant-owner/tier5-src/_shared/collection-contract.ts +8 -1
- package/templates/retail-store/dev/index.ts +396 -516
- package/templates/retail-store/tier5-src/_shared/collection-contract.ts +8 -1
- package/templates/retail-store/tier5-src/himi-blog-post/index.ts +14 -4
- package/templates/retail-store-owner/tier5-src/_shared/collection-contract.ts +8 -1
- package/templates/yoga-studio/tier5-src/_shared/collection-contract.ts +8 -1
- package/templates/yoga-studio/tier5-src/himi-blog-post/index.ts +14 -4
- package/templates/yoga-studio-owner/tier5-src/_shared/collection-contract.ts +8 -1
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { type WixCallOptions } from "../_shared/runtime.generated.js";
|
|
2
|
+
import type { Animation, AppEmbedData, AudioData, BlockquoteData, BulletedListData, ButtonData, CaptionData, CardData, CheckboxListData, CodeBlockData, CollapsibleListData, CursorPaging, CursorPagingMetadata, DividerData, DocumentStyle, EmbedData, FileData, GIFData, GalleryOptions, HTMLData, HeadingData, ImageData, LayoutCellData, LayoutData, Link, LinkPreviewData, ListItemNodeData, MapData, Media, Metadata, NodeStyle, OrderedListData, ParagraphData, PluginContainerData, PollData, ShapeData, SlotData, SmartBlockCellData, SmartBlockData, Sorting, TableCellData, TableData, TextData, TocData, Video, VideoData } from "../_shared/types.generated.js";
|
|
3
|
+
export type { AddressLocation, AnchorData, Animation, AppEmbedData, AudioData, Backdrop, Background, BackgroundGradient, BackgroundImage, Banner, BlockquoteData, BookingData, Border, BorderColors, BorderWidths, BulletedListData, ButtonData, ButtonStyles, CaptionData, CardData, CardDataBackground, CardStyles, CellStyle, CheckboxListData, CodeBlockData, CollapsibleListData, ColorData, ColorDataBackground, Colors, CursorPaging, CursorPagingMetadata, Cursors, Decoration, Design, Dimensions, DividerData, DividerDataStyles, DocumentStyle, EmbedData, EntranceAnimation, EntranceEffect, EventData, FileData, FileSource, FontFamilyData, FontSizeData, GIF, GIFData, GalleryOptions, GalleryOptionsLayout, Gradient, HTMLData, HeadingData, Height, ImageData, ImageDataCrop, ImageDataStyles, ImageStyles, ItemStyle, Layers, LayoutCellData, LayoutData, LayoutDataBackground, LayoutDataBackgroundImage, Link, LinkData, LinkPreviewData, LinkPreviewDataStyles, ListItemNodeData, LoopAnimation, LoopEffect, MapData, MapSettings, Media, MentionData, Metadata, NodeStyle, Oembed, Option, OptionDesign, OptionLayout, OrderedListData, PDFSettings, ParagraphData, Permissions, PlaybackOptions, PluginContainerData, PluginContainerDataWidth, PointerEffect, Poll, PollData, PollDataLayout, PollDesign, PollDesignBackground, PollLayout, PricingData, Rel, RibbonStyles, SectionDivider, Settings, ShapeData, ShapeDataStyles, SketchData, SlotData, SlotDesign, SmartBlockCellData, SmartBlockData, Sorting, Spoiler, SpoilerData, Stop, Styles, StylesBorder, TableCellData, TableData, TextData, TextNodeStyle, TextStyle, Thumbnails, TocData, Video, VideoData } from "../_shared/types.generated.js";
|
|
4
|
+
export type { WixCallOptions } from "../_shared/runtime.generated.js";
|
|
5
|
+
export interface CommentContentRevision {
|
|
6
|
+
id?: string;
|
|
7
|
+
commentId?: string;
|
|
8
|
+
createdDate?: string;
|
|
9
|
+
content?: RichContent;
|
|
10
|
+
author?: RevisionAuthor;
|
|
11
|
+
}
|
|
12
|
+
export interface GalleryData {
|
|
13
|
+
containerData?: PluginContainerData;
|
|
14
|
+
items?: Item[];
|
|
15
|
+
options?: GalleryOptions;
|
|
16
|
+
disableExpand?: boolean;
|
|
17
|
+
disableDownload?: boolean;
|
|
18
|
+
animation?: Animation;
|
|
19
|
+
}
|
|
20
|
+
export interface Image {
|
|
21
|
+
media?: Media;
|
|
22
|
+
link?: Link;
|
|
23
|
+
}
|
|
24
|
+
export interface Item {
|
|
25
|
+
image?: Image;
|
|
26
|
+
video?: Video;
|
|
27
|
+
title?: string;
|
|
28
|
+
altText?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface ListCommentContentRevisionsRequest {
|
|
31
|
+
commentId?: string;
|
|
32
|
+
cursorPaging?: CursorPaging;
|
|
33
|
+
sort?: Sorting;
|
|
34
|
+
}
|
|
35
|
+
export interface ListCommentContentRevisionsResponse {
|
|
36
|
+
commentContentRevisions?: CommentContentRevision[];
|
|
37
|
+
pagingMetadata?: CursorPagingMetadata;
|
|
38
|
+
}
|
|
39
|
+
export interface Node {
|
|
40
|
+
buttonData?: ButtonData;
|
|
41
|
+
codeBlockData?: CodeBlockData;
|
|
42
|
+
dividerData?: DividerData;
|
|
43
|
+
fileData?: FileData;
|
|
44
|
+
galleryData?: GalleryData;
|
|
45
|
+
gifData?: GIFData;
|
|
46
|
+
headingData?: HeadingData;
|
|
47
|
+
htmlData?: HTMLData;
|
|
48
|
+
imageData?: ImageData;
|
|
49
|
+
linkPreviewData?: LinkPreviewData;
|
|
50
|
+
mapData?: MapData;
|
|
51
|
+
paragraphData?: ParagraphData;
|
|
52
|
+
pollData?: PollData;
|
|
53
|
+
textData?: TextData;
|
|
54
|
+
appEmbedData?: AppEmbedData;
|
|
55
|
+
videoData?: VideoData;
|
|
56
|
+
embedData?: EmbedData;
|
|
57
|
+
collapsibleListData?: CollapsibleListData;
|
|
58
|
+
tableData?: TableData;
|
|
59
|
+
tableCellData?: TableCellData;
|
|
60
|
+
externalData?: Record<string, unknown>;
|
|
61
|
+
audioData?: AudioData;
|
|
62
|
+
orderedListData?: OrderedListData;
|
|
63
|
+
bulletedListData?: BulletedListData;
|
|
64
|
+
blockquoteData?: BlockquoteData;
|
|
65
|
+
captionData?: CaptionData;
|
|
66
|
+
layoutData?: LayoutData;
|
|
67
|
+
layoutCellData?: LayoutCellData;
|
|
68
|
+
shapeData?: ShapeData;
|
|
69
|
+
cardData?: CardData;
|
|
70
|
+
tocData?: TocData;
|
|
71
|
+
smartBlockData?: SmartBlockData;
|
|
72
|
+
smartBlockCellData?: SmartBlockCellData;
|
|
73
|
+
checkboxListData?: CheckboxListData;
|
|
74
|
+
listItemData?: ListItemNodeData;
|
|
75
|
+
slotData?: SlotData;
|
|
76
|
+
type?: string;
|
|
77
|
+
id?: string;
|
|
78
|
+
nodes?: Node[];
|
|
79
|
+
style?: NodeStyle;
|
|
80
|
+
}
|
|
81
|
+
export interface RevisionAuthor {
|
|
82
|
+
memberId?: string;
|
|
83
|
+
visitorId?: string;
|
|
84
|
+
userId?: string;
|
|
85
|
+
appId?: string;
|
|
86
|
+
}
|
|
87
|
+
export interface RichContent {
|
|
88
|
+
nodes?: Node[];
|
|
89
|
+
metadata?: Metadata;
|
|
90
|
+
documentStyle?: DocumentStyle;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Retrieves saved previous content versions for a comment.
|
|
94
|
+
*
|
|
95
|
+
* @permissionId WIX_COMMENTS_CONTENT_REVISIONS.LIST_REVISIONS
|
|
96
|
+
* @fqn wix.comments.revisions.v1.CommentContentRevisions.ListCommentContentRevisions
|
|
97
|
+
*
|
|
98
|
+
* GET /comments/v1/content-revisions/{commentId}
|
|
99
|
+
*/
|
|
100
|
+
export declare function listCommentContentRevisions(req: ListCommentContentRevisionsRequest, opts?: WixCallOptions): Promise<ListCommentContentRevisionsResponse>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from "../../wix-sdk/comments-v1/src/index.js";
|
|
2
|
+
export * as categories from "./categories.generated.js";
|
|
3
|
+
export * as commentContexts from "./commentContexts.generated.js";
|
|
4
|
+
export * as comments from "./comments.generated.js";
|
|
5
|
+
export * as contentRevisions from "./contentRevisions.generated.js";
|
|
6
|
+
export * as ratings from "./ratings.generated.js";
|
|
7
|
+
export * as widgets from "./widgets.generated.js";
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { type WixCallOptions } from "../_shared/runtime.generated.js";
|
|
2
|
+
export type { WixCallOptions } from "../_shared/runtime.generated.js";
|
|
3
|
+
export interface GetResourceSummaryRequest {
|
|
4
|
+
ratingContext?: RatingContext;
|
|
5
|
+
resourceId?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface GetResourceSummaryResponse {
|
|
8
|
+
average?: number;
|
|
9
|
+
total?: number;
|
|
10
|
+
breakdown?: Record<string, unknown>;
|
|
11
|
+
}
|
|
12
|
+
export interface RatingContext {
|
|
13
|
+
appDefId?: string;
|
|
14
|
+
contextId?: string;
|
|
15
|
+
contextType?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface RemoveMyRatingRequest {
|
|
18
|
+
ratingContext?: RatingContext;
|
|
19
|
+
resourceId?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface RemoveMyRatingResponse {
|
|
22
|
+
}
|
|
23
|
+
export interface V1CommentResourceRating {
|
|
24
|
+
visitorId?: string;
|
|
25
|
+
memberId?: string;
|
|
26
|
+
id?: string;
|
|
27
|
+
ratingContext?: RatingContext;
|
|
28
|
+
resourceId?: string;
|
|
29
|
+
rating?: number;
|
|
30
|
+
publishedCommentCount?: number;
|
|
31
|
+
}
|
|
32
|
+
export interface V1CreateRatingRequest {
|
|
33
|
+
resourceRating?: V1CommentResourceRating;
|
|
34
|
+
}
|
|
35
|
+
export interface V1CreateRatingResponse {
|
|
36
|
+
resourceRating?: V1CommentResourceRating;
|
|
37
|
+
}
|
|
38
|
+
export interface V1GetMyRatingRequest {
|
|
39
|
+
ratingContext?: RatingContext;
|
|
40
|
+
resourceId?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface V1GetMyRatingResponse {
|
|
43
|
+
resourceRating?: V1CommentResourceRating;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Creates resource rating, if member/visitor has already created an rating it will be updated with provided value
|
|
47
|
+
*
|
|
48
|
+
* @fqn wix.comments.ratings.v1.CommentsRatings.CreateRating
|
|
49
|
+
*
|
|
50
|
+
* POST /comments/v1/comment/resource/{resourceRatingResourceId}/rating
|
|
51
|
+
*/
|
|
52
|
+
export declare function createRating(req: V1CreateRatingRequest, opts?: WixCallOptions): Promise<V1CreateRatingResponse>;
|
|
53
|
+
/**
|
|
54
|
+
* Returns rating for current caller
|
|
55
|
+
*
|
|
56
|
+
* @fqn wix.comments.ratings.v1.CommentsRatings.GetMyRating
|
|
57
|
+
*
|
|
58
|
+
* GET /comments/v1/comment/resource/{resourceId}/rating/my
|
|
59
|
+
*/
|
|
60
|
+
export declare function getMyRating(req: V1GetMyRatingRequest, opts?: WixCallOptions): Promise<V1GetMyRatingResponse>;
|
|
61
|
+
/**
|
|
62
|
+
* @fqn wix.comments.ratings.v1.CommentsRatings.GetResourceSummary
|
|
63
|
+
*/
|
|
64
|
+
export declare function getResourceSummary(req: GetResourceSummaryRequest, opts?: WixCallOptions): Promise<GetResourceSummaryResponse>;
|
|
65
|
+
/**
|
|
66
|
+
* Removes rating for current caller
|
|
67
|
+
*
|
|
68
|
+
* @fqn wix.comments.ratings.v1.CommentsRatings.RemoveMyRating
|
|
69
|
+
*
|
|
70
|
+
* DELETE /comments/v1/comment/resource/{resourceId}/rating/my
|
|
71
|
+
*/
|
|
72
|
+
export declare function removeMyRating(req: RemoveMyRatingRequest, opts?: WixCallOptions): Promise<RemoveMyRatingResponse>;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { type WixCallOptions } from "../_shared/runtime.generated.js";
|
|
2
|
+
import type { CursorPagingMetadata, CursorQuery, Cursors, QueryV2 } from "../_shared/types.generated.js";
|
|
3
|
+
export type { AddressLocation, CursorPaging, CursorPagingMetadata, CursorQuery, Cursors, Paging, QueryV2, Sorting } from "../_shared/types.generated.js";
|
|
4
|
+
export type { WixCallOptions } from "../_shared/runtime.generated.js";
|
|
5
|
+
export interface CommentsWidget {
|
|
6
|
+
id?: string;
|
|
7
|
+
categoryId?: string;
|
|
8
|
+
resourceId?: string;
|
|
9
|
+
urlPath?: PageUrlV2;
|
|
10
|
+
revision?: string;
|
|
11
|
+
createdDate?: string;
|
|
12
|
+
updatedDate?: string;
|
|
13
|
+
componentId?: string;
|
|
14
|
+
commentCount?: number;
|
|
15
|
+
}
|
|
16
|
+
export interface CreateCommentsWidgetRequest {
|
|
17
|
+
commentsWidget?: CommentsWidget;
|
|
18
|
+
}
|
|
19
|
+
export interface CreateCommentsWidgetResponse {
|
|
20
|
+
commentsWidget?: CommentsWidget;
|
|
21
|
+
}
|
|
22
|
+
export interface DeleteCommentsWidgetRequest {
|
|
23
|
+
commentsWidgetId?: string;
|
|
24
|
+
revision?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface DeleteCommentsWidgetResponse {
|
|
27
|
+
}
|
|
28
|
+
export interface GetCommentsWidgetRequest {
|
|
29
|
+
commentsWidgetId?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface GetCommentsWidgetResponse {
|
|
32
|
+
commentsWidget?: CommentsWidget;
|
|
33
|
+
}
|
|
34
|
+
export interface PageUrlV2 {
|
|
35
|
+
relativePath?: string;
|
|
36
|
+
url?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface PagingMetadataV2 {
|
|
39
|
+
count?: number;
|
|
40
|
+
offset?: number;
|
|
41
|
+
total?: number;
|
|
42
|
+
tooManyToCount?: boolean;
|
|
43
|
+
cursors?: Cursors;
|
|
44
|
+
}
|
|
45
|
+
export interface QueryCommentsWidgetRequest {
|
|
46
|
+
query?: QueryV2;
|
|
47
|
+
}
|
|
48
|
+
export interface QueryCommentsWidgetResourcesRequest {
|
|
49
|
+
query?: CursorQuery;
|
|
50
|
+
}
|
|
51
|
+
export interface QueryCommentsWidgetResourcesResponse {
|
|
52
|
+
resourceIds?: string[];
|
|
53
|
+
pagingMetadata?: CursorPagingMetadata;
|
|
54
|
+
}
|
|
55
|
+
export interface QueryCommentsWidgetResponse {
|
|
56
|
+
commentsWidgets?: CommentsWidget[];
|
|
57
|
+
metadata?: PagingMetadataV2;
|
|
58
|
+
}
|
|
59
|
+
export interface RegisterCommentsWidgetRequest {
|
|
60
|
+
categoryId?: string;
|
|
61
|
+
resourceId?: string;
|
|
62
|
+
componentId?: string;
|
|
63
|
+
dynamicPageTitle?: string;
|
|
64
|
+
pageId?: string;
|
|
65
|
+
urlPath?: string;
|
|
66
|
+
}
|
|
67
|
+
export interface RegisterCommentsWidgetResponse {
|
|
68
|
+
commentsWidget?: CommentsWidget;
|
|
69
|
+
}
|
|
70
|
+
export interface UpdateCommentsWidgetRequest {
|
|
71
|
+
commentsWidget?: CommentsWidget;
|
|
72
|
+
}
|
|
73
|
+
export interface UpdateCommentsWidgetResponse {
|
|
74
|
+
commentsWidget?: CommentsWidget;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Creates a new CommentsWidget
|
|
78
|
+
*
|
|
79
|
+
* @permissionId WIX_COMMENTS.COMMENTS_WIDGET_CREATE
|
|
80
|
+
* @fqn wix.comments.categories.v1.CommentsWidgetRegistry.CreateCommentsWidget
|
|
81
|
+
*
|
|
82
|
+
* POST /api/v1/comments/widgets
|
|
83
|
+
*/
|
|
84
|
+
export declare function createCommentsWidget(req?: CreateCommentsWidgetRequest, opts?: WixCallOptions): Promise<CreateCommentsWidgetResponse>;
|
|
85
|
+
/**
|
|
86
|
+
* Delete a CommentsWidget
|
|
87
|
+
*
|
|
88
|
+
* @permissionId WIX_COMMENTS.COMMENTS_WIDGET_DELETE
|
|
89
|
+
* @fqn wix.comments.categories.v1.CommentsWidgetRegistry.DeleteCommentsWidget
|
|
90
|
+
*
|
|
91
|
+
* DELETE /api/v1/comments/widgets/{commentsWidgetId}
|
|
92
|
+
*/
|
|
93
|
+
export declare function deleteCommentsWidget(req: DeleteCommentsWidgetRequest, opts?: WixCallOptions): Promise<DeleteCommentsWidgetResponse>;
|
|
94
|
+
/**
|
|
95
|
+
* Get a CommentsWidget by id
|
|
96
|
+
*
|
|
97
|
+
* @permissionId WIX_COMMENTS.COMMENTS_WIDGET_READ
|
|
98
|
+
* @fqn wix.comments.categories.v1.CommentsWidgetRegistry.GetCommentsWidget
|
|
99
|
+
*
|
|
100
|
+
* GET /api/v1/comments/widgets/{commentsWidgetId}
|
|
101
|
+
*/
|
|
102
|
+
export declare function getCommentsWidget(req: GetCommentsWidgetRequest, opts?: WixCallOptions): Promise<GetCommentsWidgetResponse>;
|
|
103
|
+
/**
|
|
104
|
+
* Query CommentsWidgets using [WQL - Wix Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)
|
|
105
|
+
*
|
|
106
|
+
* @permissionId WIX_COMMENTS.COMMENTS_WIDGET_QUERY
|
|
107
|
+
* @fqn wix.comments.categories.v1.CommentsWidgetRegistry.QueryCommentsWidget
|
|
108
|
+
*
|
|
109
|
+
* POST /api/v1/comments/widgets/query
|
|
110
|
+
*/
|
|
111
|
+
export declare function queryCommentsWidget(req?: QueryCommentsWidgetRequest, opts?: WixCallOptions): Promise<QueryCommentsWidgetResponse>;
|
|
112
|
+
/**
|
|
113
|
+
* Returns all registered widget resource ids contained in metaSite
|
|
114
|
+
*
|
|
115
|
+
* @permissionId WIX_COMMENTS.COMMENTS_WIDGET_RESOURCES_QUERY
|
|
116
|
+
* @fqn wix.comments.categories.v1.CommentsWidgetRegistry.QueryCommentsWidgetResources
|
|
117
|
+
*
|
|
118
|
+
* POST /api/v1/comments/widgets/resources/query
|
|
119
|
+
*/
|
|
120
|
+
export declare function queryCommentsWidgetResources(req?: QueryCommentsWidgetResourcesRequest, opts?: WixCallOptions): Promise<QueryCommentsWidgetResourcesResponse>;
|
|
121
|
+
/**
|
|
122
|
+
* Registers CommentsWidget. Whenever a widget is loaded for the first time or its resourceId changes, it saves the new resource information about the widget
|
|
123
|
+
*
|
|
124
|
+
* @permissionId WIX_COMMENTS.COMMENTS_WIDGET_REGISTER
|
|
125
|
+
* @fqn wix.comments.categories.v1.CommentsWidgetRegistry.RegisterCommentsWidget
|
|
126
|
+
*
|
|
127
|
+
* POST /api/v1/comments/widgets/register
|
|
128
|
+
*/
|
|
129
|
+
export declare function registerCommentsWidget(req?: RegisterCommentsWidgetRequest, opts?: WixCallOptions): Promise<RegisterCommentsWidgetResponse>;
|
|
130
|
+
/**
|
|
131
|
+
* Update CommentsWidget, supports partial update Pass the latest `revision` for a successful update
|
|
132
|
+
*
|
|
133
|
+
* @permissionId WIX_COMMENTS.COMMENTS_WIDGET_EDIT
|
|
134
|
+
* @fqn wix.comments.categories.v1.CommentsWidgetRegistry.UpdateCommentsWidget
|
|
135
|
+
*
|
|
136
|
+
* PATCH /api/v1/comments/widgets/{commentsWidgetId}
|
|
137
|
+
*/
|
|
138
|
+
export declare function updateCommentsWidget(req: UpdateCommentsWidgetRequest, opts?: WixCallOptions): Promise<UpdateCommentsWidgetResponse>;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __export = (target, all) => {
|
|
3
|
+
for (var name in all)
|
|
4
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
5
|
+
};
|
|
6
|
+
|
|
1
7
|
// ../../stdlib/wix-sdk/comments-v1/src/extensions.ts
|
|
2
8
|
var BLOG_COMMENTS_APP_ID = "14bcded7-0066-7c35-14d7-466cb3f09103";
|
|
3
9
|
var ricosText = (text) => ({
|
|
@@ -31,6 +37,15 @@ var commentAuthor = (comment) => {
|
|
|
31
37
|
const author = comment.author;
|
|
32
38
|
return author?.name ?? author?.nickname ?? "Member";
|
|
33
39
|
};
|
|
40
|
+
function blogCommentRow(comment) {
|
|
41
|
+
const c = comment ?? {};
|
|
42
|
+
return {
|
|
43
|
+
id: c.id ?? "comment",
|
|
44
|
+
authorName: commentAuthor(c),
|
|
45
|
+
text: commentText(c),
|
|
46
|
+
createdDate: c.createdDate ?? (/* @__PURE__ */ new Date()).toISOString()
|
|
47
|
+
};
|
|
48
|
+
}
|
|
34
49
|
async function createBlogComment(postId, text) {
|
|
35
50
|
const trimmed = text.trim();
|
|
36
51
|
if (!postId) {
|
|
@@ -48,13 +63,7 @@ async function createBlogComment(postId, text) {
|
|
|
48
63
|
}
|
|
49
64
|
};
|
|
50
65
|
const response = await createComment(request);
|
|
51
|
-
|
|
52
|
-
return {
|
|
53
|
-
id: comment.id ?? "comment",
|
|
54
|
-
authorName: commentAuthor(comment),
|
|
55
|
-
text: commentText(comment),
|
|
56
|
-
createdDate: comment.createdDate ?? (/* @__PURE__ */ new Date()).toISOString()
|
|
57
|
-
};
|
|
66
|
+
return blogCommentRow(response.comment ?? response);
|
|
58
67
|
}
|
|
59
68
|
async function listBlogComments(postId) {
|
|
60
69
|
if (!postId) {
|
|
@@ -318,14 +327,276 @@ function bulkGetCommentReactions(req = {}, opts) {
|
|
|
318
327
|
opts
|
|
319
328
|
);
|
|
320
329
|
}
|
|
330
|
+
|
|
331
|
+
// ../../stdlib/wix-sdk-auto/comments/categories.generated.ts
|
|
332
|
+
var categories_generated_exports = {};
|
|
333
|
+
__export(categories_generated_exports, {
|
|
334
|
+
createCategory: () => createCategory,
|
|
335
|
+
deleteCategory: () => deleteCategory,
|
|
336
|
+
getCategory: () => getCategory,
|
|
337
|
+
queryCategory: () => queryCategory,
|
|
338
|
+
updateCategory: () => updateCategory
|
|
339
|
+
});
|
|
340
|
+
|
|
341
|
+
// ../../stdlib/wix-sdk-auto/_shared/runtime.generated.ts
|
|
342
|
+
function wixQueryPath2(path, req) {
|
|
343
|
+
const parts = [];
|
|
344
|
+
const pair = (key, value) => {
|
|
345
|
+
parts.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);
|
|
346
|
+
};
|
|
347
|
+
const add = (key, value) => {
|
|
348
|
+
if (value === void 0 || value === null) return;
|
|
349
|
+
if (Array.isArray(value)) {
|
|
350
|
+
for (const item of value) {
|
|
351
|
+
if (item === void 0 || item === null || typeof item === "object") continue;
|
|
352
|
+
pair(key, item);
|
|
353
|
+
}
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
if (typeof value === "object") {
|
|
357
|
+
for (const [k, v] of Object.entries(value)) add(`${key}.${k}`, v);
|
|
358
|
+
return;
|
|
359
|
+
}
|
|
360
|
+
pair(key, value);
|
|
361
|
+
};
|
|
362
|
+
for (const [key, value] of Object.entries(req ?? {})) add(key, value);
|
|
363
|
+
return parts.length > 0 ? `${path}?${parts.join("&")}` : path;
|
|
364
|
+
}
|
|
365
|
+
function readField(req, field) {
|
|
366
|
+
let value = req;
|
|
367
|
+
for (const key of field.split(".")) {
|
|
368
|
+
if (value === null || typeof value !== "object") return void 0;
|
|
369
|
+
value = value[key];
|
|
370
|
+
}
|
|
371
|
+
return value;
|
|
372
|
+
}
|
|
373
|
+
function withoutFields(req, fields) {
|
|
374
|
+
if (fields.length === 0 || req === null || typeof req !== "object") return req;
|
|
375
|
+
const out = { ...req };
|
|
376
|
+
for (const field of fields) {
|
|
377
|
+
const dot = field.indexOf(".");
|
|
378
|
+
const head = dot < 0 ? field : field.slice(0, dot);
|
|
379
|
+
if (!(head in out)) continue;
|
|
380
|
+
if (dot < 0) delete out[head];
|
|
381
|
+
else out[head] = withoutFields(out[head], [field.slice(dot + 1)]);
|
|
382
|
+
}
|
|
383
|
+
return out;
|
|
384
|
+
}
|
|
385
|
+
function wixCall2(verb, template, req, opts, route = {}) {
|
|
386
|
+
const api = globalThis.himalaya?.wixApi;
|
|
387
|
+
if (!api) return Promise.reject(new Error("@himalaya/wix-*: host did not install the wixApi bridge"));
|
|
388
|
+
const fields = route.pathFields ?? [];
|
|
389
|
+
let path;
|
|
390
|
+
try {
|
|
391
|
+
let i = 0;
|
|
392
|
+
path = template.replace(/\{[^}]+\}/g, () => {
|
|
393
|
+
const field = fields[i++];
|
|
394
|
+
const value = field === void 0 ? void 0 : readField(req, field);
|
|
395
|
+
if (value === void 0 || value === null || value === "") {
|
|
396
|
+
throw new Error(`${verb} ${template}: request field ${field ?? "(unmapped)"} is required`);
|
|
397
|
+
}
|
|
398
|
+
return encodeURIComponent(String(value));
|
|
399
|
+
});
|
|
400
|
+
} catch (err) {
|
|
401
|
+
return Promise.reject(err);
|
|
402
|
+
}
|
|
403
|
+
const site = opts?.site?.trim();
|
|
404
|
+
const headers = site ? { "wix-site-id": site } : void 0;
|
|
405
|
+
if (route.query) return api.call(verb, wixQueryPath2(path, withoutFields(req, fields)), void 0, headers);
|
|
406
|
+
return api.call(verb, path, req, headers);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
// ../../stdlib/wix-sdk-auto/comments/categories.generated.ts
|
|
410
|
+
function createCategory(req = {}, opts) {
|
|
411
|
+
return wixCall2("POST", "/comments/v1/categories", req, opts);
|
|
412
|
+
}
|
|
413
|
+
function deleteCategory(req, opts) {
|
|
414
|
+
return wixCall2("DELETE", "/comments/v1/categories/{categoryId}", req, opts, { pathFields: ["categoryId"], query: true });
|
|
415
|
+
}
|
|
416
|
+
function getCategory(req, opts) {
|
|
417
|
+
return wixCall2("GET", "/comments/v1/categories/{categoryId}", req, opts, { pathFields: ["categoryId"], query: true });
|
|
418
|
+
}
|
|
419
|
+
function queryCategory(req = {}, opts) {
|
|
420
|
+
return wixCall2("POST", "/comments/v1/categories/query", req, opts);
|
|
421
|
+
}
|
|
422
|
+
function updateCategory(req, opts) {
|
|
423
|
+
return wixCall2("PATCH", "/comments/v1/categories/{categoryId}", req, opts, { pathFields: ["category.id"] });
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
// ../../stdlib/wix-sdk-auto/comments/commentContexts.generated.ts
|
|
427
|
+
var commentContexts_generated_exports = {};
|
|
428
|
+
__export(commentContexts_generated_exports, {
|
|
429
|
+
getCommentContext: () => getCommentContext
|
|
430
|
+
});
|
|
431
|
+
function getCommentContext(req, opts) {
|
|
432
|
+
return wixCall2("GET", "/comments/v1/contexts/{appId}", req, opts, { pathFields: ["appId"], query: true });
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
// ../../stdlib/wix-sdk-auto/comments/comments.generated.ts
|
|
436
|
+
var comments_generated_exports = {};
|
|
437
|
+
__export(comments_generated_exports, {
|
|
438
|
+
addCommentReaction: () => addCommentReaction2,
|
|
439
|
+
bulkDeleteComment: () => bulkDeleteComment2,
|
|
440
|
+
bulkGetCommentReactions: () => bulkGetCommentReactions2,
|
|
441
|
+
bulkHideComment: () => bulkHideComment2,
|
|
442
|
+
bulkModerateDraftContent: () => bulkModerateDraftContent2,
|
|
443
|
+
bulkMoveCommentByFilter: () => bulkMoveCommentByFilter2,
|
|
444
|
+
bulkPublishComment: () => bulkPublishComment2,
|
|
445
|
+
countComments: () => countComments2,
|
|
446
|
+
createComment: () => createComment2,
|
|
447
|
+
deleteComment: () => deleteComment2,
|
|
448
|
+
getComment: () => getComment2,
|
|
449
|
+
getCommentThread: () => getCommentThread2,
|
|
450
|
+
hideComment: () => hideComment2,
|
|
451
|
+
listCommentsByResource: () => listCommentsByResource2,
|
|
452
|
+
markComment: () => markComment2,
|
|
453
|
+
moderateDraftContent: () => moderateDraftContent2,
|
|
454
|
+
publishComment: () => publishComment2,
|
|
455
|
+
queryComments: () => queryComments2,
|
|
456
|
+
removeCommentReaction: () => removeCommentReaction2,
|
|
457
|
+
unmarkComment: () => unmarkComment2,
|
|
458
|
+
updateComment: () => updateComment2
|
|
459
|
+
});
|
|
460
|
+
function addCommentReaction2(req, opts) {
|
|
461
|
+
return wixCall2("POST", "/comments/v1/comments/{commentId}/reactions", req, opts, { pathFields: ["commentId"] });
|
|
462
|
+
}
|
|
463
|
+
function bulkDeleteComment2(req = {}, opts) {
|
|
464
|
+
return wixCall2("PUT", "/comments/v1/bulk/comments/delete-by-filter", req, opts);
|
|
465
|
+
}
|
|
466
|
+
function bulkGetCommentReactions2(req = {}, opts) {
|
|
467
|
+
return wixCall2("POST", "/comments/v1/bulk/comments/reactions/get", req, opts);
|
|
468
|
+
}
|
|
469
|
+
function bulkHideComment2(req = {}, opts) {
|
|
470
|
+
return wixCall2("PUT", "/comments/v1/bulk/comments/hide-by-filter", req, opts);
|
|
471
|
+
}
|
|
472
|
+
function bulkModerateDraftContent2(req = {}, opts) {
|
|
473
|
+
return wixCall2("POST", "/comments/v1/bulk/comments/moderate-by-filter", req, opts);
|
|
474
|
+
}
|
|
475
|
+
function bulkMoveCommentByFilter2(req = {}, opts) {
|
|
476
|
+
return wixCall2("PUT", "/comments/v1/bulk/comments/move-by-filter", req, opts);
|
|
477
|
+
}
|
|
478
|
+
function bulkPublishComment2(req = {}, opts) {
|
|
479
|
+
return wixCall2("POST", "/comments/v1/bulk/comments/publish-by-filter", req, opts);
|
|
480
|
+
}
|
|
481
|
+
function countComments2(req = {}, opts) {
|
|
482
|
+
return wixCall2("POST", "/comments/v1/comments/count", req, opts);
|
|
483
|
+
}
|
|
484
|
+
function createComment2(req = {}, opts) {
|
|
485
|
+
return wixCall2("POST", "/comments/v1/comments", req, opts);
|
|
486
|
+
}
|
|
487
|
+
function deleteComment2(req, opts) {
|
|
488
|
+
return wixCall2("DELETE", "/comments/v1/comments/{commentId}", req, opts, { pathFields: ["commentId"], query: true });
|
|
489
|
+
}
|
|
490
|
+
function getComment2(req, opts) {
|
|
491
|
+
return wixCall2("GET", "/comments/v1/comments/{commentId}", req, opts, { pathFields: ["commentId"], query: true });
|
|
492
|
+
}
|
|
493
|
+
function getCommentThread2(req, opts) {
|
|
494
|
+
return wixCall2("GET", "/comments/v1/comments/{commentId}/thread", req, opts, { pathFields: ["commentId"], query: true });
|
|
495
|
+
}
|
|
496
|
+
function hideComment2(req, opts) {
|
|
497
|
+
return wixCall2("PUT", "/comments/v1/comments/{commentId}/hide", req, opts, { pathFields: ["commentId"] });
|
|
498
|
+
}
|
|
499
|
+
function listCommentsByResource2(req = {}, opts) {
|
|
500
|
+
return wixCall2("GET", "/comments/v1/comments/list-by-resource", req, opts, { query: true });
|
|
501
|
+
}
|
|
502
|
+
function markComment2(req, opts) {
|
|
503
|
+
return wixCall2("PUT", "/comments/v1/comments/{commentId}/mark", req, opts, { pathFields: ["commentId"] });
|
|
504
|
+
}
|
|
505
|
+
function moderateDraftContent2(req, opts) {
|
|
506
|
+
return wixCall2("POST", "/comments/v1/comments/{commentId}/moderate", req, opts, { pathFields: ["commentId"] });
|
|
507
|
+
}
|
|
508
|
+
function publishComment2(req, opts) {
|
|
509
|
+
return wixCall2("PUT", "/comments/v1/comments/{commentId}/publish", req, opts, { pathFields: ["commentId"] });
|
|
510
|
+
}
|
|
511
|
+
function queryComments2(req = {}, opts) {
|
|
512
|
+
return wixCall2("POST", "/comments/v1/comments/query-cursor", req, opts);
|
|
513
|
+
}
|
|
514
|
+
function removeCommentReaction2(req, opts) {
|
|
515
|
+
return wixCall2("POST", "/comments/v1/comments/{commentId}/reactions/remove", req, opts, { pathFields: ["commentId"] });
|
|
516
|
+
}
|
|
517
|
+
function unmarkComment2(req, opts) {
|
|
518
|
+
return wixCall2("PUT", "/comments/v1/comments/{commentId}/unmark", req, opts, { pathFields: ["commentId"] });
|
|
519
|
+
}
|
|
520
|
+
function updateComment2(req, opts) {
|
|
521
|
+
return wixCall2("PATCH", "/comments/v1/comments/{commentId}", req, opts, { pathFields: ["comment.id"] });
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
// ../../stdlib/wix-sdk-auto/comments/contentRevisions.generated.ts
|
|
525
|
+
var contentRevisions_generated_exports = {};
|
|
526
|
+
__export(contentRevisions_generated_exports, {
|
|
527
|
+
listCommentContentRevisions: () => listCommentContentRevisions
|
|
528
|
+
});
|
|
529
|
+
function listCommentContentRevisions(req, opts) {
|
|
530
|
+
return wixCall2("GET", "/comments/v1/content-revisions/{commentId}", req, opts, { pathFields: ["commentId"], query: true });
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
// ../../stdlib/wix-sdk-auto/comments/ratings.generated.ts
|
|
534
|
+
var ratings_generated_exports = {};
|
|
535
|
+
__export(ratings_generated_exports, {
|
|
536
|
+
createRating: () => createRating,
|
|
537
|
+
getMyRating: () => getMyRating,
|
|
538
|
+
getResourceSummary: () => getResourceSummary,
|
|
539
|
+
removeMyRating: () => removeMyRating
|
|
540
|
+
});
|
|
541
|
+
function createRating(req, opts) {
|
|
542
|
+
return wixCall2("POST", "/comments/v1/comment/resource/{resourceRatingResourceId}/rating", req, opts, { pathFields: ["resourceRating.resourceId"] });
|
|
543
|
+
}
|
|
544
|
+
function getMyRating(req, opts) {
|
|
545
|
+
return wixCall2("GET", "/comments/v1/comment/resource/{resourceId}/rating/my", req, opts, { pathFields: ["resourceId"], query: true });
|
|
546
|
+
}
|
|
547
|
+
function getResourceSummary(req, opts) {
|
|
548
|
+
return wixCall2("GET", "/comments/v1/comment/resource/{resourceId}/summary", req, opts, { pathFields: ["resourceId"], query: true });
|
|
549
|
+
}
|
|
550
|
+
function removeMyRating(req, opts) {
|
|
551
|
+
return wixCall2("DELETE", "/comments/v1/comment/resource/{resourceId}/rating/my", req, opts, { pathFields: ["resourceId"], query: true });
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
// ../../stdlib/wix-sdk-auto/comments/widgets.generated.ts
|
|
555
|
+
var widgets_generated_exports = {};
|
|
556
|
+
__export(widgets_generated_exports, {
|
|
557
|
+
createCommentsWidget: () => createCommentsWidget,
|
|
558
|
+
deleteCommentsWidget: () => deleteCommentsWidget,
|
|
559
|
+
getCommentsWidget: () => getCommentsWidget,
|
|
560
|
+
queryCommentsWidget: () => queryCommentsWidget,
|
|
561
|
+
queryCommentsWidgetResources: () => queryCommentsWidgetResources,
|
|
562
|
+
registerCommentsWidget: () => registerCommentsWidget,
|
|
563
|
+
updateCommentsWidget: () => updateCommentsWidget
|
|
564
|
+
});
|
|
565
|
+
function createCommentsWidget(req = {}, opts) {
|
|
566
|
+
return wixCall2("POST", "/api/v1/comments/widgets", req, opts);
|
|
567
|
+
}
|
|
568
|
+
function deleteCommentsWidget(req, opts) {
|
|
569
|
+
return wixCall2("DELETE", "/api/v1/comments/widgets/{commentsWidgetId}", req, opts, { pathFields: ["commentsWidgetId"], query: true });
|
|
570
|
+
}
|
|
571
|
+
function getCommentsWidget(req, opts) {
|
|
572
|
+
return wixCall2("GET", "/api/v1/comments/widgets/{commentsWidgetId}", req, opts, { pathFields: ["commentsWidgetId"], query: true });
|
|
573
|
+
}
|
|
574
|
+
function queryCommentsWidget(req = {}, opts) {
|
|
575
|
+
return wixCall2("POST", "/api/v1/comments/widgets/query", req, opts);
|
|
576
|
+
}
|
|
577
|
+
function queryCommentsWidgetResources(req = {}, opts) {
|
|
578
|
+
return wixCall2("POST", "/api/v1/comments/widgets/resources/query", req, opts);
|
|
579
|
+
}
|
|
580
|
+
function registerCommentsWidget(req = {}, opts) {
|
|
581
|
+
return wixCall2("POST", "/api/v1/comments/widgets/register", req, opts);
|
|
582
|
+
}
|
|
583
|
+
function updateCommentsWidget(req, opts) {
|
|
584
|
+
return wixCall2("PATCH", "/api/v1/comments/widgets/{commentsWidgetId}", req, opts, { pathFields: ["commentsWidget.id"] });
|
|
585
|
+
}
|
|
321
586
|
export {
|
|
587
|
+
BLOG_COMMENTS_APP_ID,
|
|
322
588
|
addCommentReaction,
|
|
589
|
+
blogCommentRow,
|
|
323
590
|
bulkDeleteComment,
|
|
324
591
|
bulkGetCommentReactions,
|
|
325
592
|
bulkHideComment,
|
|
326
593
|
bulkModerateDraftContent,
|
|
327
594
|
bulkMoveCommentByFilter,
|
|
328
595
|
bulkPublishComment,
|
|
596
|
+
categories_generated_exports as categories,
|
|
597
|
+
commentContexts_generated_exports as commentContexts,
|
|
598
|
+
comments_generated_exports as comments,
|
|
599
|
+
contentRevisions_generated_exports as contentRevisions,
|
|
329
600
|
countComments,
|
|
330
601
|
createBlogComment,
|
|
331
602
|
createComment,
|
|
@@ -339,9 +610,11 @@ export {
|
|
|
339
610
|
moderateDraftContent,
|
|
340
611
|
publishComment,
|
|
341
612
|
queryComments,
|
|
613
|
+
ratings_generated_exports as ratings,
|
|
342
614
|
removeCommentReaction,
|
|
343
615
|
unmarkComment,
|
|
344
616
|
updateComment,
|
|
617
|
+
widgets_generated_exports as widgets,
|
|
345
618
|
wixCall,
|
|
346
619
|
wixQueryPath
|
|
347
620
|
};
|
|
@@ -295,7 +295,7 @@
|
|
|
295
295
|
"import": "./dist/wix-chat-web.mjs"
|
|
296
296
|
},
|
|
297
297
|
"./wix-comments": {
|
|
298
|
-
"types": "./dist/_types/stdlib/wix-sdk/comments
|
|
298
|
+
"types": "./dist/_types/stdlib/wix-sdk-auto/comments/index.generated.d.ts",
|
|
299
299
|
"import": "./dist/wix-comments.mjs"
|
|
300
300
|
},
|
|
301
301
|
"./wix-contacts": {
|