@wix/auto_sdk_faq_question-entry 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/faq-question-entry-v2-question-entry-question-entry.context.d.ts +24 -0
- package/build/cjs/src/faq-question-entry-v2-question-entry-question-entry.context.js +63 -0
- package/build/cjs/src/faq-question-entry-v2-question-entry-question-entry.context.js.map +1 -0
- package/build/cjs/src/faq-question-entry-v2-question-entry-question-entry.http.d.ts +42 -0
- package/build/cjs/src/faq-question-entry-v2-question-entry-question-entry.http.js +1054 -0
- package/build/cjs/src/faq-question-entry-v2-question-entry-question-entry.http.js.map +1 -0
- package/build/cjs/src/faq-question-entry-v2-question-entry-question-entry.meta.d.ts +32 -0
- package/build/cjs/src/faq-question-entry-v2-question-entry-question-entry.meta.js +218 -0
- package/build/cjs/src/faq-question-entry-v2-question-entry-question-entry.meta.js.map +1 -0
- package/build/cjs/src/faq-question-entry-v2-question-entry-question-entry.public.d.ts +101 -0
- package/build/cjs/src/faq-question-entry-v2-question-entry-question-entry.public.js +248 -0
- package/build/cjs/src/faq-question-entry-v2-question-entry-question-entry.public.js.map +1 -0
- package/build/cjs/src/faq-question-entry-v2-question-entry-question-entry.types.d.ts +2012 -0
- package/build/cjs/src/faq-question-entry-v2-question-entry-question-entry.types.js +343 -0
- package/build/cjs/src/faq-question-entry-v2-question-entry-question-entry.types.js.map +1 -0
- package/build/cjs/src/faq-question-entry-v2-question-entry-question-entry.universal.d.ts +2372 -0
- package/build/cjs/src/faq-question-entry-v2-question-entry-question-entry.universal.js +795 -0
- package/build/cjs/src/faq-question-entry-v2-question-entry-question-entry.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/faq-question-entry-v2-question-entry-question-entry.context.d.ts +24 -0
- package/build/es/src/faq-question-entry-v2-question-entry-question-entry.context.js +24 -0
- package/build/es/src/faq-question-entry-v2-question-entry-question-entry.context.js.map +1 -0
- package/build/es/src/faq-question-entry-v2-question-entry-question-entry.http.d.ts +42 -0
- package/build/es/src/faq-question-entry-v2-question-entry-question-entry.http.js +1041 -0
- package/build/es/src/faq-question-entry-v2-question-entry-question-entry.http.js.map +1 -0
- package/build/es/src/faq-question-entry-v2-question-entry-question-entry.meta.d.ts +32 -0
- package/build/es/src/faq-question-entry-v2-question-entry-question-entry.meta.js +182 -0
- package/build/es/src/faq-question-entry-v2-question-entry-question-entry.meta.js.map +1 -0
- package/build/es/src/faq-question-entry-v2-question-entry-question-entry.public.d.ts +101 -0
- package/build/es/src/faq-question-entry-v2-question-entry-question-entry.public.js +199 -0
- package/build/es/src/faq-question-entry-v2-question-entry-question-entry.public.js.map +1 -0
- package/build/es/src/faq-question-entry-v2-question-entry-question-entry.types.d.ts +2012 -0
- package/build/es/src/faq-question-entry-v2-question-entry-question-entry.types.js +340 -0
- package/build/es/src/faq-question-entry-v2-question-entry-question-entry.types.js.map +1 -0
- package/build/es/src/faq-question-entry-v2-question-entry-question-entry.universal.d.ts +2372 -0
- package/build/es/src/faq-question-entry-v2-question-entry-question-entry.universal.js +759 -0
- package/build/es/src/faq-question-entry-v2-question-entry-question-entry.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/faq-question-entry-v2-question-entry-question-entry.context.d.ts +24 -0
- package/build/internal/cjs/src/faq-question-entry-v2-question-entry-question-entry.context.js +63 -0
- package/build/internal/cjs/src/faq-question-entry-v2-question-entry-question-entry.context.js.map +1 -0
- package/build/internal/cjs/src/faq-question-entry-v2-question-entry-question-entry.http.d.ts +42 -0
- package/build/internal/cjs/src/faq-question-entry-v2-question-entry-question-entry.http.js +1054 -0
- package/build/internal/cjs/src/faq-question-entry-v2-question-entry-question-entry.http.js.map +1 -0
- package/build/internal/cjs/src/faq-question-entry-v2-question-entry-question-entry.meta.d.ts +32 -0
- package/build/internal/cjs/src/faq-question-entry-v2-question-entry-question-entry.meta.js +218 -0
- package/build/internal/cjs/src/faq-question-entry-v2-question-entry-question-entry.meta.js.map +1 -0
- package/build/internal/cjs/src/faq-question-entry-v2-question-entry-question-entry.public.d.ts +101 -0
- package/build/internal/cjs/src/faq-question-entry-v2-question-entry-question-entry.public.js +248 -0
- package/build/internal/cjs/src/faq-question-entry-v2-question-entry-question-entry.public.js.map +1 -0
- package/build/internal/cjs/src/faq-question-entry-v2-question-entry-question-entry.types.d.ts +2012 -0
- package/build/internal/cjs/src/faq-question-entry-v2-question-entry-question-entry.types.js +343 -0
- package/build/internal/cjs/src/faq-question-entry-v2-question-entry-question-entry.types.js.map +1 -0
- package/build/internal/cjs/src/faq-question-entry-v2-question-entry-question-entry.universal.d.ts +2372 -0
- package/build/internal/cjs/src/faq-question-entry-v2-question-entry-question-entry.universal.js +795 -0
- package/build/internal/cjs/src/faq-question-entry-v2-question-entry-question-entry.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/faq-question-entry-v2-question-entry-question-entry.context.d.ts +24 -0
- package/build/internal/es/src/faq-question-entry-v2-question-entry-question-entry.context.js +24 -0
- package/build/internal/es/src/faq-question-entry-v2-question-entry-question-entry.context.js.map +1 -0
- package/build/internal/es/src/faq-question-entry-v2-question-entry-question-entry.http.d.ts +42 -0
- package/build/internal/es/src/faq-question-entry-v2-question-entry-question-entry.http.js +1041 -0
- package/build/internal/es/src/faq-question-entry-v2-question-entry-question-entry.http.js.map +1 -0
- package/build/internal/es/src/faq-question-entry-v2-question-entry-question-entry.meta.d.ts +32 -0
- package/build/internal/es/src/faq-question-entry-v2-question-entry-question-entry.meta.js +182 -0
- package/build/internal/es/src/faq-question-entry-v2-question-entry-question-entry.meta.js.map +1 -0
- package/build/internal/es/src/faq-question-entry-v2-question-entry-question-entry.public.d.ts +101 -0
- package/build/internal/es/src/faq-question-entry-v2-question-entry-question-entry.public.js +199 -0
- package/build/internal/es/src/faq-question-entry-v2-question-entry-question-entry.public.js.map +1 -0
- package/build/internal/es/src/faq-question-entry-v2-question-entry-question-entry.types.d.ts +2012 -0
- package/build/internal/es/src/faq-question-entry-v2-question-entry-question-entry.types.js +340 -0
- package/build/internal/es/src/faq-question-entry-v2-question-entry-question-entry.types.js.map +1 -0
- package/build/internal/es/src/faq-question-entry-v2-question-entry-question-entry.universal.d.ts +2372 -0
- package/build/internal/es/src/faq-question-entry-v2-question-entry-question-entry.universal.js +759 -0
- package/build/internal/es/src/faq-question-entry-v2-question-entry-question-entry.universal.js.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +52 -0
|
@@ -0,0 +1,759 @@
|
|
|
1
|
+
import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';
|
|
2
|
+
import { queryBuilder } from '@wix/sdk-runtime/query-builder';
|
|
3
|
+
import { renameKeysFromSDKRequestToRESTRequest, renameKeysFromRESTResponseToSDKResponse, } from '@wix/sdk-runtime/rename-all-nested-keys';
|
|
4
|
+
import * as ambassadorWixFaqQuestionEntryV2QuestionEntry from './faq-question-entry-v2-question-entry-question-entry.http.js';
|
|
5
|
+
export var NodeType;
|
|
6
|
+
(function (NodeType) {
|
|
7
|
+
NodeType["PARAGRAPH"] = "PARAGRAPH";
|
|
8
|
+
NodeType["TEXT"] = "TEXT";
|
|
9
|
+
NodeType["HEADING"] = "HEADING";
|
|
10
|
+
NodeType["BULLETED_LIST"] = "BULLETED_LIST";
|
|
11
|
+
NodeType["ORDERED_LIST"] = "ORDERED_LIST";
|
|
12
|
+
NodeType["LIST_ITEM"] = "LIST_ITEM";
|
|
13
|
+
NodeType["BLOCKQUOTE"] = "BLOCKQUOTE";
|
|
14
|
+
NodeType["CODE_BLOCK"] = "CODE_BLOCK";
|
|
15
|
+
NodeType["VIDEO"] = "VIDEO";
|
|
16
|
+
NodeType["DIVIDER"] = "DIVIDER";
|
|
17
|
+
NodeType["FILE"] = "FILE";
|
|
18
|
+
NodeType["GALLERY"] = "GALLERY";
|
|
19
|
+
NodeType["GIF"] = "GIF";
|
|
20
|
+
NodeType["HTML"] = "HTML";
|
|
21
|
+
NodeType["IMAGE"] = "IMAGE";
|
|
22
|
+
NodeType["LINK_PREVIEW"] = "LINK_PREVIEW";
|
|
23
|
+
/** @deprecated */
|
|
24
|
+
NodeType["MAP"] = "MAP";
|
|
25
|
+
NodeType["POLL"] = "POLL";
|
|
26
|
+
NodeType["APP_EMBED"] = "APP_EMBED";
|
|
27
|
+
NodeType["BUTTON"] = "BUTTON";
|
|
28
|
+
NodeType["COLLAPSIBLE_LIST"] = "COLLAPSIBLE_LIST";
|
|
29
|
+
NodeType["TABLE"] = "TABLE";
|
|
30
|
+
NodeType["EMBED"] = "EMBED";
|
|
31
|
+
NodeType["COLLAPSIBLE_ITEM"] = "COLLAPSIBLE_ITEM";
|
|
32
|
+
NodeType["COLLAPSIBLE_ITEM_TITLE"] = "COLLAPSIBLE_ITEM_TITLE";
|
|
33
|
+
NodeType["COLLAPSIBLE_ITEM_BODY"] = "COLLAPSIBLE_ITEM_BODY";
|
|
34
|
+
NodeType["TABLE_CELL"] = "TABLE_CELL";
|
|
35
|
+
NodeType["TABLE_ROW"] = "TABLE_ROW";
|
|
36
|
+
NodeType["EXTERNAL"] = "EXTERNAL";
|
|
37
|
+
NodeType["AUDIO"] = "AUDIO";
|
|
38
|
+
NodeType["CAPTION"] = "CAPTION";
|
|
39
|
+
NodeType["LAYOUT"] = "LAYOUT";
|
|
40
|
+
NodeType["LAYOUT_CELL"] = "LAYOUT_CELL";
|
|
41
|
+
})(NodeType || (NodeType = {}));
|
|
42
|
+
export var WidthType;
|
|
43
|
+
(function (WidthType) {
|
|
44
|
+
/** Width matches the content width */
|
|
45
|
+
WidthType["CONTENT"] = "CONTENT";
|
|
46
|
+
/** Small Width */
|
|
47
|
+
WidthType["SMALL"] = "SMALL";
|
|
48
|
+
/** Width will match the original asset width */
|
|
49
|
+
WidthType["ORIGINAL"] = "ORIGINAL";
|
|
50
|
+
/** coast-to-coast display */
|
|
51
|
+
WidthType["FULL_WIDTH"] = "FULL_WIDTH";
|
|
52
|
+
})(WidthType || (WidthType = {}));
|
|
53
|
+
export var PluginContainerDataAlignment;
|
|
54
|
+
(function (PluginContainerDataAlignment) {
|
|
55
|
+
/** Center Alignment */
|
|
56
|
+
PluginContainerDataAlignment["CENTER"] = "CENTER";
|
|
57
|
+
/** Left Alignment */
|
|
58
|
+
PluginContainerDataAlignment["LEFT"] = "LEFT";
|
|
59
|
+
/** Right Alignment */
|
|
60
|
+
PluginContainerDataAlignment["RIGHT"] = "RIGHT";
|
|
61
|
+
})(PluginContainerDataAlignment || (PluginContainerDataAlignment = {}));
|
|
62
|
+
export var Type;
|
|
63
|
+
(function (Type) {
|
|
64
|
+
/** Regular link button */
|
|
65
|
+
Type["LINK"] = "LINK";
|
|
66
|
+
/** Triggers custom action that is defined in plugin configuration by the consumer */
|
|
67
|
+
Type["ACTION"] = "ACTION";
|
|
68
|
+
})(Type || (Type = {}));
|
|
69
|
+
export var Target;
|
|
70
|
+
(function (Target) {
|
|
71
|
+
/** Opens the linked document in the same frame as it was clicked (this is default) */
|
|
72
|
+
Target["SELF"] = "SELF";
|
|
73
|
+
/** Opens the linked document in a new window or tab */
|
|
74
|
+
Target["BLANK"] = "BLANK";
|
|
75
|
+
/** Opens the linked document in the parent frame */
|
|
76
|
+
Target["PARENT"] = "PARENT";
|
|
77
|
+
/** Opens the linked document in the full body of the window */
|
|
78
|
+
Target["TOP"] = "TOP";
|
|
79
|
+
})(Target || (Target = {}));
|
|
80
|
+
export var TextAlignment;
|
|
81
|
+
(function (TextAlignment) {
|
|
82
|
+
/** browser default, eqivalent to `initial` */
|
|
83
|
+
TextAlignment["AUTO"] = "AUTO";
|
|
84
|
+
/** Left align */
|
|
85
|
+
TextAlignment["LEFT"] = "LEFT";
|
|
86
|
+
/** Right align */
|
|
87
|
+
TextAlignment["RIGHT"] = "RIGHT";
|
|
88
|
+
/** Center align */
|
|
89
|
+
TextAlignment["CENTER"] = "CENTER";
|
|
90
|
+
/** Text is spaced to line up its left and right edges to the left and right edges of the line box, except for the last line */
|
|
91
|
+
TextAlignment["JUSTIFY"] = "JUSTIFY";
|
|
92
|
+
})(TextAlignment || (TextAlignment = {}));
|
|
93
|
+
export var LineStyle;
|
|
94
|
+
(function (LineStyle) {
|
|
95
|
+
/** Single Line */
|
|
96
|
+
LineStyle["SINGLE"] = "SINGLE";
|
|
97
|
+
/** Double Line */
|
|
98
|
+
LineStyle["DOUBLE"] = "DOUBLE";
|
|
99
|
+
/** Dashed Line */
|
|
100
|
+
LineStyle["DASHED"] = "DASHED";
|
|
101
|
+
/** Dotted Line */
|
|
102
|
+
LineStyle["DOTTED"] = "DOTTED";
|
|
103
|
+
})(LineStyle || (LineStyle = {}));
|
|
104
|
+
export var Width;
|
|
105
|
+
(function (Width) {
|
|
106
|
+
/** Large line */
|
|
107
|
+
Width["LARGE"] = "LARGE";
|
|
108
|
+
/** Medium line */
|
|
109
|
+
Width["MEDIUM"] = "MEDIUM";
|
|
110
|
+
/** Small line */
|
|
111
|
+
Width["SMALL"] = "SMALL";
|
|
112
|
+
})(Width || (Width = {}));
|
|
113
|
+
export var Alignment;
|
|
114
|
+
(function (Alignment) {
|
|
115
|
+
/** Center alignment */
|
|
116
|
+
Alignment["CENTER"] = "CENTER";
|
|
117
|
+
/** Left alignment */
|
|
118
|
+
Alignment["LEFT"] = "LEFT";
|
|
119
|
+
/** Right alignment */
|
|
120
|
+
Alignment["RIGHT"] = "RIGHT";
|
|
121
|
+
})(Alignment || (Alignment = {}));
|
|
122
|
+
export var ViewMode;
|
|
123
|
+
(function (ViewMode) {
|
|
124
|
+
/** No PDF view */
|
|
125
|
+
ViewMode["NONE"] = "NONE";
|
|
126
|
+
/** Full PDF view */
|
|
127
|
+
ViewMode["FULL"] = "FULL";
|
|
128
|
+
/** Mini PDF view */
|
|
129
|
+
ViewMode["MINI"] = "MINI";
|
|
130
|
+
})(ViewMode || (ViewMode = {}));
|
|
131
|
+
export var LayoutType;
|
|
132
|
+
(function (LayoutType) {
|
|
133
|
+
/** Collage type */
|
|
134
|
+
LayoutType["COLLAGE"] = "COLLAGE";
|
|
135
|
+
/** Masonry type */
|
|
136
|
+
LayoutType["MASONRY"] = "MASONRY";
|
|
137
|
+
/** Grid type */
|
|
138
|
+
LayoutType["GRID"] = "GRID";
|
|
139
|
+
/** Thumbnail type */
|
|
140
|
+
LayoutType["THUMBNAIL"] = "THUMBNAIL";
|
|
141
|
+
/** Slider type */
|
|
142
|
+
LayoutType["SLIDER"] = "SLIDER";
|
|
143
|
+
/** Slideshow type */
|
|
144
|
+
LayoutType["SLIDESHOW"] = "SLIDESHOW";
|
|
145
|
+
/** Panorama type */
|
|
146
|
+
LayoutType["PANORAMA"] = "PANORAMA";
|
|
147
|
+
/** Column type */
|
|
148
|
+
LayoutType["COLUMN"] = "COLUMN";
|
|
149
|
+
/** Magic type */
|
|
150
|
+
LayoutType["MAGIC"] = "MAGIC";
|
|
151
|
+
/** Fullsize images type */
|
|
152
|
+
LayoutType["FULLSIZE"] = "FULLSIZE";
|
|
153
|
+
})(LayoutType || (LayoutType = {}));
|
|
154
|
+
export var Orientation;
|
|
155
|
+
(function (Orientation) {
|
|
156
|
+
/** Rows Orientation */
|
|
157
|
+
Orientation["ROWS"] = "ROWS";
|
|
158
|
+
/** Columns Orientation */
|
|
159
|
+
Orientation["COLUMNS"] = "COLUMNS";
|
|
160
|
+
})(Orientation || (Orientation = {}));
|
|
161
|
+
export var Crop;
|
|
162
|
+
(function (Crop) {
|
|
163
|
+
/** Crop to fill */
|
|
164
|
+
Crop["FILL"] = "FILL";
|
|
165
|
+
/** Crop to fit */
|
|
166
|
+
Crop["FIT"] = "FIT";
|
|
167
|
+
})(Crop || (Crop = {}));
|
|
168
|
+
export var ThumbnailsAlignment;
|
|
169
|
+
(function (ThumbnailsAlignment) {
|
|
170
|
+
/** Top alignment */
|
|
171
|
+
ThumbnailsAlignment["TOP"] = "TOP";
|
|
172
|
+
/** Right alignment */
|
|
173
|
+
ThumbnailsAlignment["RIGHT"] = "RIGHT";
|
|
174
|
+
/** Bottom alignment */
|
|
175
|
+
ThumbnailsAlignment["BOTTOM"] = "BOTTOM";
|
|
176
|
+
/** Left alignment */
|
|
177
|
+
ThumbnailsAlignment["LEFT"] = "LEFT";
|
|
178
|
+
/** No thumbnail */
|
|
179
|
+
ThumbnailsAlignment["NONE"] = "NONE";
|
|
180
|
+
})(ThumbnailsAlignment || (ThumbnailsAlignment = {}));
|
|
181
|
+
export var GIFType;
|
|
182
|
+
(function (GIFType) {
|
|
183
|
+
GIFType["NORMAL"] = "NORMAL";
|
|
184
|
+
GIFType["STICKER"] = "STICKER";
|
|
185
|
+
})(GIFType || (GIFType = {}));
|
|
186
|
+
export var Source;
|
|
187
|
+
(function (Source) {
|
|
188
|
+
Source["HTML"] = "HTML";
|
|
189
|
+
Source["ADSENSE"] = "ADSENSE";
|
|
190
|
+
})(Source || (Source = {}));
|
|
191
|
+
export var MapType;
|
|
192
|
+
(function (MapType) {
|
|
193
|
+
/** Roadmap map type */
|
|
194
|
+
MapType["ROADMAP"] = "ROADMAP";
|
|
195
|
+
/** Satellite map type */
|
|
196
|
+
MapType["SATELITE"] = "SATELITE";
|
|
197
|
+
/** Hybrid map type */
|
|
198
|
+
MapType["HYBRID"] = "HYBRID";
|
|
199
|
+
/** Terrain map type */
|
|
200
|
+
MapType["TERRAIN"] = "TERRAIN";
|
|
201
|
+
})(MapType || (MapType = {}));
|
|
202
|
+
export var ViewRole;
|
|
203
|
+
(function (ViewRole) {
|
|
204
|
+
/** Only Poll creator can view the results */
|
|
205
|
+
ViewRole["CREATOR"] = "CREATOR";
|
|
206
|
+
/** Anyone who voted can see the results */
|
|
207
|
+
ViewRole["VOTERS"] = "VOTERS";
|
|
208
|
+
/** Anyone can see the results, even if one didn't vote */
|
|
209
|
+
ViewRole["EVERYONE"] = "EVERYONE";
|
|
210
|
+
})(ViewRole || (ViewRole = {}));
|
|
211
|
+
export var VoteRole;
|
|
212
|
+
(function (VoteRole) {
|
|
213
|
+
/** Logged in member */
|
|
214
|
+
VoteRole["SITE_MEMBERS"] = "SITE_MEMBERS";
|
|
215
|
+
/** Anyone */
|
|
216
|
+
VoteRole["ALL"] = "ALL";
|
|
217
|
+
})(VoteRole || (VoteRole = {}));
|
|
218
|
+
export var PollLayoutType;
|
|
219
|
+
(function (PollLayoutType) {
|
|
220
|
+
/** List */
|
|
221
|
+
PollLayoutType["LIST"] = "LIST";
|
|
222
|
+
/** Grid */
|
|
223
|
+
PollLayoutType["GRID"] = "GRID";
|
|
224
|
+
})(PollLayoutType || (PollLayoutType = {}));
|
|
225
|
+
export var PollLayoutDirection;
|
|
226
|
+
(function (PollLayoutDirection) {
|
|
227
|
+
/** Left-to-right */
|
|
228
|
+
PollLayoutDirection["LTR"] = "LTR";
|
|
229
|
+
/** Right-to-left */
|
|
230
|
+
PollLayoutDirection["RTL"] = "RTL";
|
|
231
|
+
})(PollLayoutDirection || (PollLayoutDirection = {}));
|
|
232
|
+
export var BackgroundType;
|
|
233
|
+
(function (BackgroundType) {
|
|
234
|
+
/** Color background type */
|
|
235
|
+
BackgroundType["COLOR"] = "COLOR";
|
|
236
|
+
/** Image background type */
|
|
237
|
+
BackgroundType["IMAGE"] = "IMAGE";
|
|
238
|
+
/** Gradiant background type */
|
|
239
|
+
BackgroundType["GRADIENT"] = "GRADIENT";
|
|
240
|
+
})(BackgroundType || (BackgroundType = {}));
|
|
241
|
+
export var DecorationType;
|
|
242
|
+
(function (DecorationType) {
|
|
243
|
+
DecorationType["BOLD"] = "BOLD";
|
|
244
|
+
DecorationType["ITALIC"] = "ITALIC";
|
|
245
|
+
DecorationType["UNDERLINE"] = "UNDERLINE";
|
|
246
|
+
DecorationType["SPOILER"] = "SPOILER";
|
|
247
|
+
DecorationType["ANCHOR"] = "ANCHOR";
|
|
248
|
+
DecorationType["MENTION"] = "MENTION";
|
|
249
|
+
DecorationType["LINK"] = "LINK";
|
|
250
|
+
DecorationType["COLOR"] = "COLOR";
|
|
251
|
+
DecorationType["FONT_SIZE"] = "FONT_SIZE";
|
|
252
|
+
DecorationType["EXTERNAL"] = "EXTERNAL";
|
|
253
|
+
})(DecorationType || (DecorationType = {}));
|
|
254
|
+
export var FontType;
|
|
255
|
+
(function (FontType) {
|
|
256
|
+
FontType["PX"] = "PX";
|
|
257
|
+
FontType["EM"] = "EM";
|
|
258
|
+
})(FontType || (FontType = {}));
|
|
259
|
+
export var AppType;
|
|
260
|
+
(function (AppType) {
|
|
261
|
+
AppType["PRODUCT"] = "PRODUCT";
|
|
262
|
+
AppType["EVENT"] = "EVENT";
|
|
263
|
+
AppType["BOOKING"] = "BOOKING";
|
|
264
|
+
})(AppType || (AppType = {}));
|
|
265
|
+
export var InitialExpandedItems;
|
|
266
|
+
(function (InitialExpandedItems) {
|
|
267
|
+
/** First item will be expended initally */
|
|
268
|
+
InitialExpandedItems["FIRST"] = "FIRST";
|
|
269
|
+
/** All items will expended initally */
|
|
270
|
+
InitialExpandedItems["ALL"] = "ALL";
|
|
271
|
+
/** All items collapsed initally */
|
|
272
|
+
InitialExpandedItems["NONE"] = "NONE";
|
|
273
|
+
})(InitialExpandedItems || (InitialExpandedItems = {}));
|
|
274
|
+
export var Direction;
|
|
275
|
+
(function (Direction) {
|
|
276
|
+
/** Left-to-right */
|
|
277
|
+
Direction["LTR"] = "LTR";
|
|
278
|
+
/** Right-to-left */
|
|
279
|
+
Direction["RTL"] = "RTL";
|
|
280
|
+
})(Direction || (Direction = {}));
|
|
281
|
+
export var VerticalAlignment;
|
|
282
|
+
(function (VerticalAlignment) {
|
|
283
|
+
/** Top alignment */
|
|
284
|
+
VerticalAlignment["TOP"] = "TOP";
|
|
285
|
+
/** Middle alignment */
|
|
286
|
+
VerticalAlignment["MIDDLE"] = "MIDDLE";
|
|
287
|
+
/** Bottom alignment */
|
|
288
|
+
VerticalAlignment["BOTTOM"] = "BOTTOM";
|
|
289
|
+
})(VerticalAlignment || (VerticalAlignment = {}));
|
|
290
|
+
/**
|
|
291
|
+
* `NullValue` is a singleton enumeration to represent the null value for the
|
|
292
|
+
* `Value` type union.
|
|
293
|
+
*
|
|
294
|
+
* The JSON representation for `NullValue` is JSON `null`.
|
|
295
|
+
*/
|
|
296
|
+
export var NullValue;
|
|
297
|
+
(function (NullValue) {
|
|
298
|
+
/** Null value. */
|
|
299
|
+
NullValue["NULL_VALUE"] = "NULL_VALUE";
|
|
300
|
+
})(NullValue || (NullValue = {}));
|
|
301
|
+
export var QuestionStatus;
|
|
302
|
+
(function (QuestionStatus) {
|
|
303
|
+
QuestionStatus["UNKNOWN"] = "UNKNOWN";
|
|
304
|
+
QuestionStatus["VISIBLE"] = "VISIBLE";
|
|
305
|
+
QuestionStatus["HIDDEN"] = "HIDDEN";
|
|
306
|
+
})(QuestionStatus || (QuestionStatus = {}));
|
|
307
|
+
export var ContentFormat;
|
|
308
|
+
(function (ContentFormat) {
|
|
309
|
+
ContentFormat["DRAFTJS"] = "DRAFTJS";
|
|
310
|
+
ContentFormat["PLAIN_TEXT"] = "PLAIN_TEXT";
|
|
311
|
+
ContentFormat["RICH_CONTENT"] = "RICH_CONTENT";
|
|
312
|
+
})(ContentFormat || (ContentFormat = {}));
|
|
313
|
+
export var FieldSet;
|
|
314
|
+
(function (FieldSet) {
|
|
315
|
+
FieldSet["UNKNOWN"] = "UNKNOWN";
|
|
316
|
+
/** Include `share_link` fields inside question entries. */
|
|
317
|
+
FieldSet["SHARE_LINKS"] = "SHARE_LINKS";
|
|
318
|
+
})(FieldSet || (FieldSet = {}));
|
|
319
|
+
export var SortOrder;
|
|
320
|
+
(function (SortOrder) {
|
|
321
|
+
SortOrder["ASC"] = "ASC";
|
|
322
|
+
SortOrder["DESC"] = "DESC";
|
|
323
|
+
})(SortOrder || (SortOrder = {}));
|
|
324
|
+
export var QueryQuestionEntriesRequestContentFormat;
|
|
325
|
+
(function (QueryQuestionEntriesRequestContentFormat) {
|
|
326
|
+
QueryQuestionEntriesRequestContentFormat["DRAFTJS"] = "DRAFTJS";
|
|
327
|
+
QueryQuestionEntriesRequestContentFormat["PLAIN_TEXT"] = "PLAIN_TEXT";
|
|
328
|
+
QueryQuestionEntriesRequestContentFormat["RICH_CONTENT"] = "RICH_CONTENT";
|
|
329
|
+
})(QueryQuestionEntriesRequestContentFormat || (QueryQuestionEntriesRequestContentFormat = {}));
|
|
330
|
+
export var QueryQuestionEntriesRequestFieldSet;
|
|
331
|
+
(function (QueryQuestionEntriesRequestFieldSet) {
|
|
332
|
+
QueryQuestionEntriesRequestFieldSet["UNKNOWN"] = "UNKNOWN";
|
|
333
|
+
/** Include `share_link` fields inside question entries. */
|
|
334
|
+
QueryQuestionEntriesRequestFieldSet["SHARE_LINKS"] = "SHARE_LINKS";
|
|
335
|
+
})(QueryQuestionEntriesRequestFieldSet || (QueryQuestionEntriesRequestFieldSet = {}));
|
|
336
|
+
export var WebhookIdentityType;
|
|
337
|
+
(function (WebhookIdentityType) {
|
|
338
|
+
WebhookIdentityType["UNKNOWN"] = "UNKNOWN";
|
|
339
|
+
WebhookIdentityType["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
340
|
+
WebhookIdentityType["MEMBER"] = "MEMBER";
|
|
341
|
+
WebhookIdentityType["WIX_USER"] = "WIX_USER";
|
|
342
|
+
WebhookIdentityType["APP"] = "APP";
|
|
343
|
+
})(WebhookIdentityType || (WebhookIdentityType = {}));
|
|
344
|
+
/**
|
|
345
|
+
* Creates a new QuestionEntry.
|
|
346
|
+
* @param questionEntry - QuestionEntry to be created.
|
|
347
|
+
* @public
|
|
348
|
+
* @requiredField questionEntry
|
|
349
|
+
* @requiredField questionEntry.question
|
|
350
|
+
* @permissionId FAQ.CREATE_QUESTION
|
|
351
|
+
* @permissionScope Manage FAQ
|
|
352
|
+
* @permissionScopeId SCOPE.DC-LABS.MANAGE-FAQ
|
|
353
|
+
* @applicableIdentity APP
|
|
354
|
+
* @returns The created QuestionEntry.
|
|
355
|
+
* @fqn wix.faq.questionentry.v2.QuestionEntryService.CreateQuestionEntry
|
|
356
|
+
*/
|
|
357
|
+
export async function createQuestionEntry(questionEntry) {
|
|
358
|
+
// @ts-ignore
|
|
359
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
360
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
361
|
+
questionEntry: questionEntry,
|
|
362
|
+
});
|
|
363
|
+
const reqOpts = ambassadorWixFaqQuestionEntryV2QuestionEntry.createQuestionEntry(payload);
|
|
364
|
+
sideEffects?.onSiteCall?.();
|
|
365
|
+
try {
|
|
366
|
+
const result = await httpClient.request(reqOpts);
|
|
367
|
+
sideEffects?.onSuccess?.(result);
|
|
368
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data)?.questionEntry;
|
|
369
|
+
}
|
|
370
|
+
catch (err) {
|
|
371
|
+
const transformedError = sdkTransformError(err, {
|
|
372
|
+
spreadPathsToArguments: {},
|
|
373
|
+
explicitPathsToArguments: { questionEntry: '$[0]' },
|
|
374
|
+
singleArgumentUnchanged: false,
|
|
375
|
+
}, ['questionEntry']);
|
|
376
|
+
sideEffects?.onError?.(err);
|
|
377
|
+
throw transformedError;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* Retrieves a single QuestionEntry by id.
|
|
382
|
+
* @param questionEntryId - ID of the QuestionEntry to retrieve.
|
|
383
|
+
* @public
|
|
384
|
+
* @requiredField questionEntryId
|
|
385
|
+
* @permissionId FAQ.READ_QUESTIONS
|
|
386
|
+
* @permissionScope Manage FAQ
|
|
387
|
+
* @permissionScopeId SCOPE.DC-LABS.MANAGE-FAQ
|
|
388
|
+
* @permissionScope Read FAQ
|
|
389
|
+
* @permissionScopeId SCOPE.DC-LABS.READ-FAQ
|
|
390
|
+
* @applicableIdentity APP
|
|
391
|
+
* @applicableIdentity VISITOR
|
|
392
|
+
* @returns The requested QuestionEntry.
|
|
393
|
+
* @fqn wix.faq.questionentry.v2.QuestionEntryService.GetQuestionEntry
|
|
394
|
+
*/
|
|
395
|
+
export async function getQuestionEntry(questionEntryId) {
|
|
396
|
+
// @ts-ignore
|
|
397
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
398
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
399
|
+
questionEntryId: questionEntryId,
|
|
400
|
+
});
|
|
401
|
+
const reqOpts = ambassadorWixFaqQuestionEntryV2QuestionEntry.getQuestionEntry(payload);
|
|
402
|
+
sideEffects?.onSiteCall?.();
|
|
403
|
+
try {
|
|
404
|
+
const result = await httpClient.request(reqOpts);
|
|
405
|
+
sideEffects?.onSuccess?.(result);
|
|
406
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data)?.questionEntry;
|
|
407
|
+
}
|
|
408
|
+
catch (err) {
|
|
409
|
+
const transformedError = sdkTransformError(err, {
|
|
410
|
+
spreadPathsToArguments: {},
|
|
411
|
+
explicitPathsToArguments: { questionEntryId: '$[0]' },
|
|
412
|
+
singleArgumentUnchanged: false,
|
|
413
|
+
}, ['questionEntryId']);
|
|
414
|
+
sideEffects?.onError?.(err);
|
|
415
|
+
throw transformedError;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* Updates a QuestionEntry, replaces the previous version.
|
|
420
|
+
*
|
|
421
|
+
* Each time the QuestionEntry is updated `revision` increments by 1.
|
|
422
|
+
* The current `revision` must be passed when updating the QuestionEntry.
|
|
423
|
+
* This ensures you're working with the latest QuestionEntry and prevents unintended overwrites.
|
|
424
|
+
* @param _id - QuestionEntry ID.
|
|
425
|
+
* @public
|
|
426
|
+
* @requiredField _id
|
|
427
|
+
* @requiredField questionEntry
|
|
428
|
+
* @requiredField questionEntry.revision
|
|
429
|
+
* @permissionId FAQ.UPDATE_QUESTION
|
|
430
|
+
* @permissionScope Manage FAQ
|
|
431
|
+
* @permissionScopeId SCOPE.DC-LABS.MANAGE-FAQ
|
|
432
|
+
* @applicableIdentity APP
|
|
433
|
+
* @returns Updated QuestionEntry.
|
|
434
|
+
* @fqn wix.faq.questionentry.v2.QuestionEntryService.UpdateQuestionEntry
|
|
435
|
+
*/
|
|
436
|
+
export async function updateQuestionEntry(_id, questionEntry) {
|
|
437
|
+
// @ts-ignore
|
|
438
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
439
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
440
|
+
questionEntry: { ...questionEntry, id: _id },
|
|
441
|
+
});
|
|
442
|
+
const reqOpts = ambassadorWixFaqQuestionEntryV2QuestionEntry.updateQuestionEntry(payload);
|
|
443
|
+
sideEffects?.onSiteCall?.();
|
|
444
|
+
try {
|
|
445
|
+
const result = await httpClient.request(reqOpts);
|
|
446
|
+
sideEffects?.onSuccess?.(result);
|
|
447
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data)?.questionEntry;
|
|
448
|
+
}
|
|
449
|
+
catch (err) {
|
|
450
|
+
const transformedError = sdkTransformError(err, {
|
|
451
|
+
spreadPathsToArguments: { questionEntry: '$[1]' },
|
|
452
|
+
explicitPathsToArguments: { 'questionEntry.id': '$[0]' },
|
|
453
|
+
singleArgumentUnchanged: false,
|
|
454
|
+
}, ['_id', 'questionEntry']);
|
|
455
|
+
sideEffects?.onError?.(err);
|
|
456
|
+
throw transformedError;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* Deletes a QuestionEntry.
|
|
461
|
+
* Deleting a QuestionEntry permanently removes them from the QuestionEntry List.
|
|
462
|
+
* @param questionEntryId - Id of the QuestionEntry to delete.
|
|
463
|
+
* @public
|
|
464
|
+
* @requiredField questionEntryId
|
|
465
|
+
* @permissionId FAQ.DELETE_QUESTION
|
|
466
|
+
* @permissionScope Manage FAQ
|
|
467
|
+
* @permissionScopeId SCOPE.DC-LABS.MANAGE-FAQ
|
|
468
|
+
* @applicableIdentity APP
|
|
469
|
+
* @fqn wix.faq.questionentry.v2.QuestionEntryService.DeleteQuestionEntry
|
|
470
|
+
*/
|
|
471
|
+
export async function deleteQuestionEntry(questionEntryId) {
|
|
472
|
+
// @ts-ignore
|
|
473
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
474
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
475
|
+
questionEntryId: questionEntryId,
|
|
476
|
+
});
|
|
477
|
+
const reqOpts = ambassadorWixFaqQuestionEntryV2QuestionEntry.deleteQuestionEntry(payload);
|
|
478
|
+
sideEffects?.onSiteCall?.();
|
|
479
|
+
try {
|
|
480
|
+
const result = await httpClient.request(reqOpts);
|
|
481
|
+
sideEffects?.onSuccess?.(result);
|
|
482
|
+
}
|
|
483
|
+
catch (err) {
|
|
484
|
+
const transformedError = sdkTransformError(err, {
|
|
485
|
+
spreadPathsToArguments: {},
|
|
486
|
+
explicitPathsToArguments: { questionEntryId: '$[0]' },
|
|
487
|
+
singleArgumentUnchanged: false,
|
|
488
|
+
}, ['questionEntryId']);
|
|
489
|
+
sideEffects?.onError?.(err);
|
|
490
|
+
throw transformedError;
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
/**
|
|
494
|
+
* Retrieves up to 100 question entries, given the provided filtering, paging, and sorting.
|
|
495
|
+
* Use the `fieldSet` parameter to set whether sharing links are included in the response.
|
|
496
|
+
* @public
|
|
497
|
+
* @permissionId FAQ.READ_QUESTIONS
|
|
498
|
+
* @permissionScope Manage FAQ
|
|
499
|
+
* @permissionScopeId SCOPE.DC-LABS.MANAGE-FAQ
|
|
500
|
+
* @permissionScope Read FAQ
|
|
501
|
+
* @permissionScopeId SCOPE.DC-LABS.READ-FAQ
|
|
502
|
+
* @applicableIdentity APP
|
|
503
|
+
* @applicableIdentity VISITOR
|
|
504
|
+
* @fqn wix.faq.questionentry.v2.QuestionEntryService.ListQuestionEntries
|
|
505
|
+
*/
|
|
506
|
+
export async function listQuestionEntries(options) {
|
|
507
|
+
// @ts-ignore
|
|
508
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
509
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
510
|
+
categoryId: options?.categoryId,
|
|
511
|
+
questionEntryIds: options?.questionEntryIds,
|
|
512
|
+
questionEntryLabel: options?.questionEntryLabel,
|
|
513
|
+
paging: options?.paging,
|
|
514
|
+
contentFormat: options?.contentFormat,
|
|
515
|
+
fieldSet: options?.fieldSet,
|
|
516
|
+
});
|
|
517
|
+
const reqOpts = ambassadorWixFaqQuestionEntryV2QuestionEntry.listQuestionEntries(payload);
|
|
518
|
+
sideEffects?.onSiteCall?.();
|
|
519
|
+
try {
|
|
520
|
+
const result = await httpClient.request(reqOpts);
|
|
521
|
+
sideEffects?.onSuccess?.(result);
|
|
522
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
523
|
+
}
|
|
524
|
+
catch (err) {
|
|
525
|
+
const transformedError = sdkTransformError(err, {
|
|
526
|
+
spreadPathsToArguments: {},
|
|
527
|
+
explicitPathsToArguments: {
|
|
528
|
+
categoryId: '$[0].categoryId',
|
|
529
|
+
questionEntryIds: '$[0].questionEntryIds',
|
|
530
|
+
questionEntryLabel: '$[0].questionEntryLabel',
|
|
531
|
+
paging: '$[0].paging',
|
|
532
|
+
contentFormat: '$[0].contentFormat',
|
|
533
|
+
fieldSet: '$[0].fieldSet',
|
|
534
|
+
},
|
|
535
|
+
singleArgumentUnchanged: false,
|
|
536
|
+
}, ['options']);
|
|
537
|
+
sideEffects?.onError?.(err);
|
|
538
|
+
throw transformedError;
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
/**
|
|
542
|
+
* Retrieves a list of QuestionEntries, given the provided [paging, filtering, and sorting].
|
|
543
|
+
* @public
|
|
544
|
+
* @permissionScope Manage FAQ
|
|
545
|
+
* @permissionScopeId SCOPE.DC-LABS.MANAGE-FAQ
|
|
546
|
+
* @permissionScope Read FAQ
|
|
547
|
+
* @permissionScopeId SCOPE.DC-LABS.READ-FAQ
|
|
548
|
+
* @permissionId FAQ.READ_QUESTIONS
|
|
549
|
+
* @applicableIdentity APP
|
|
550
|
+
* @applicableIdentity VISITOR
|
|
551
|
+
* @fqn wix.faq.questionentry.v2.QuestionEntryService.QueryQuestionEntries
|
|
552
|
+
*/
|
|
553
|
+
export function queryQuestionEntries(options) {
|
|
554
|
+
// @ts-ignore
|
|
555
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
556
|
+
return queryBuilder({
|
|
557
|
+
func: async (payload) => {
|
|
558
|
+
const reqOpts = ambassadorWixFaqQuestionEntryV2QuestionEntry.queryQuestionEntries({
|
|
559
|
+
...payload,
|
|
560
|
+
...(options ?? {}),
|
|
561
|
+
});
|
|
562
|
+
sideEffects?.onSiteCall?.();
|
|
563
|
+
try {
|
|
564
|
+
const result = await httpClient.request(reqOpts);
|
|
565
|
+
sideEffects?.onSuccess?.(result);
|
|
566
|
+
return result;
|
|
567
|
+
}
|
|
568
|
+
catch (err) {
|
|
569
|
+
sideEffects?.onError?.(err);
|
|
570
|
+
throw err;
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
requestTransformer: (query) => {
|
|
574
|
+
const args = [query, options];
|
|
575
|
+
return renameKeysFromSDKRequestToRESTRequest({
|
|
576
|
+
...args?.[1],
|
|
577
|
+
query: args?.[0],
|
|
578
|
+
});
|
|
579
|
+
},
|
|
580
|
+
responseTransformer: ({ data, }) => {
|
|
581
|
+
const transformedData = renameKeysFromRESTResponseToSDKResponse(data);
|
|
582
|
+
return {
|
|
583
|
+
items: transformedData?.questionEntries,
|
|
584
|
+
pagingMetadata: transformedData?.pagingMetadata,
|
|
585
|
+
};
|
|
586
|
+
},
|
|
587
|
+
errorTransformer: (err) => {
|
|
588
|
+
const transformedError = sdkTransformError(err, {
|
|
589
|
+
spreadPathsToArguments: {},
|
|
590
|
+
explicitPathsToArguments: { query: '$[0]' },
|
|
591
|
+
singleArgumentUnchanged: false,
|
|
592
|
+
});
|
|
593
|
+
throw transformedError;
|
|
594
|
+
},
|
|
595
|
+
pagingMethod: 'CURSOR',
|
|
596
|
+
transformationPaths: {},
|
|
597
|
+
});
|
|
598
|
+
}
|
|
599
|
+
/**
|
|
600
|
+
* Deletes multiple QuestionEntries in a single request. Works synchronously.
|
|
601
|
+
* @param questionEntryIds - QuestionEntry ids to be deleted.
|
|
602
|
+
* @public
|
|
603
|
+
* @requiredField questionEntryIds
|
|
604
|
+
* @permissionId FAQ.DELETE_QUESTION
|
|
605
|
+
* @permissionScope Manage FAQ
|
|
606
|
+
* @permissionScopeId SCOPE.DC-LABS.MANAGE-FAQ
|
|
607
|
+
* @applicableIdentity APP
|
|
608
|
+
* @fqn wix.faq.questionentry.v2.QuestionEntryService.BulkDeleteQuestionEntry
|
|
609
|
+
*/
|
|
610
|
+
export async function bulkDeleteQuestionEntry(questionEntryIds) {
|
|
611
|
+
// @ts-ignore
|
|
612
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
613
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
614
|
+
questionEntryIds: questionEntryIds,
|
|
615
|
+
});
|
|
616
|
+
const reqOpts = ambassadorWixFaqQuestionEntryV2QuestionEntry.bulkDeleteQuestionEntry(payload);
|
|
617
|
+
sideEffects?.onSiteCall?.();
|
|
618
|
+
try {
|
|
619
|
+
const result = await httpClient.request(reqOpts);
|
|
620
|
+
sideEffects?.onSuccess?.(result);
|
|
621
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
622
|
+
}
|
|
623
|
+
catch (err) {
|
|
624
|
+
const transformedError = sdkTransformError(err, {
|
|
625
|
+
spreadPathsToArguments: {},
|
|
626
|
+
explicitPathsToArguments: { questionEntryIds: '$[0]' },
|
|
627
|
+
singleArgumentUnchanged: false,
|
|
628
|
+
}, ['questionEntryIds']);
|
|
629
|
+
sideEffects?.onError?.(err);
|
|
630
|
+
throw transformedError;
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
/**
|
|
634
|
+
* Updates extended fields of a QuestionEntry without incrementing revision
|
|
635
|
+
* @param _id - ID of the entity to update.
|
|
636
|
+
* @param namespace - Identifier for the app whose extended fields are being updated.
|
|
637
|
+
* @public
|
|
638
|
+
* @requiredField _id
|
|
639
|
+
* @requiredField namespace
|
|
640
|
+
* @requiredField options
|
|
641
|
+
* @requiredField options.namespaceData
|
|
642
|
+
* @permissionId FAQ.UPDATE_QUESTION
|
|
643
|
+
* @permissionScope Manage FAQ
|
|
644
|
+
* @permissionScopeId SCOPE.DC-LABS.MANAGE-FAQ
|
|
645
|
+
* @applicableIdentity APP
|
|
646
|
+
* @fqn wix.faq.questionentry.v2.QuestionEntryService.UpdateExtendedFields
|
|
647
|
+
*/
|
|
648
|
+
export async function updateExtendedFields(_id, namespace, options) {
|
|
649
|
+
// @ts-ignore
|
|
650
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
651
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
652
|
+
id: _id,
|
|
653
|
+
namespace: namespace,
|
|
654
|
+
namespaceData: options?.namespaceData,
|
|
655
|
+
});
|
|
656
|
+
const reqOpts = ambassadorWixFaqQuestionEntryV2QuestionEntry.updateExtendedFields(payload);
|
|
657
|
+
sideEffects?.onSiteCall?.();
|
|
658
|
+
try {
|
|
659
|
+
const result = await httpClient.request(reqOpts);
|
|
660
|
+
sideEffects?.onSuccess?.(result);
|
|
661
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
662
|
+
}
|
|
663
|
+
catch (err) {
|
|
664
|
+
const transformedError = sdkTransformError(err, {
|
|
665
|
+
spreadPathsToArguments: {},
|
|
666
|
+
explicitPathsToArguments: {
|
|
667
|
+
id: '$[0]',
|
|
668
|
+
namespace: '$[1]',
|
|
669
|
+
namespaceData: '$[2].namespaceData',
|
|
670
|
+
},
|
|
671
|
+
singleArgumentUnchanged: false,
|
|
672
|
+
}, ['_id', 'namespace', 'options']);
|
|
673
|
+
sideEffects?.onError?.(err);
|
|
674
|
+
throw transformedError;
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
/**
|
|
678
|
+
* Adds or updates a question entry's labels. Replaces existing labels.
|
|
679
|
+
* Note: If 'labels' field is empty in the request, it will clear all existing labels for the question entry.
|
|
680
|
+
* @param questionEntryId - ID of question entry to add labels to.
|
|
681
|
+
* @public
|
|
682
|
+
* @requiredField questionEntryId
|
|
683
|
+
* @permissionId FAQ.SET_QUESTION_LABEL
|
|
684
|
+
* @permissionScope Manage FAQ
|
|
685
|
+
* @permissionScopeId SCOPE.DC-LABS.MANAGE-FAQ
|
|
686
|
+
* @applicableIdentity APP
|
|
687
|
+
* @fqn wix.faq.questionentry.v2.QuestionEntryService.SetQuestionEntryLabels
|
|
688
|
+
*/
|
|
689
|
+
export async function setQuestionEntryLabels(questionEntryId, options) {
|
|
690
|
+
// @ts-ignore
|
|
691
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
692
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
693
|
+
questionEntryId: questionEntryId,
|
|
694
|
+
labels: options?.labels,
|
|
695
|
+
});
|
|
696
|
+
const reqOpts = ambassadorWixFaqQuestionEntryV2QuestionEntry.setQuestionEntryLabels(payload);
|
|
697
|
+
sideEffects?.onSiteCall?.();
|
|
698
|
+
try {
|
|
699
|
+
const result = await httpClient.request(reqOpts);
|
|
700
|
+
sideEffects?.onSuccess?.(result);
|
|
701
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
702
|
+
}
|
|
703
|
+
catch (err) {
|
|
704
|
+
const transformedError = sdkTransformError(err, {
|
|
705
|
+
spreadPathsToArguments: {},
|
|
706
|
+
explicitPathsToArguments: {
|
|
707
|
+
questionEntryId: '$[0]',
|
|
708
|
+
labels: '$[1].labels',
|
|
709
|
+
},
|
|
710
|
+
singleArgumentUnchanged: false,
|
|
711
|
+
}, ['questionEntryId', 'options']);
|
|
712
|
+
sideEffects?.onError?.(err);
|
|
713
|
+
throw transformedError;
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
/**
|
|
717
|
+
* Updates multiple question entries'.
|
|
718
|
+
* This method replace the following bulk methods from the previous service:
|
|
719
|
+
* 1. updateQuestionsVisibility - Updates multiple question entries' visibility within their categories
|
|
720
|
+
* 2. bulkSetQuestionStatus - Updates multiple question entries' statuses.
|
|
721
|
+
* 3. bulkUpdateLabelOrder - Updates a question entry's labels order.
|
|
722
|
+
* @public
|
|
723
|
+
* @requiredField options.questionEntries.questionEntry
|
|
724
|
+
* @requiredField options.questionEntries.questionEntry._id
|
|
725
|
+
* @requiredField options.questionEntries.questionEntry.revision
|
|
726
|
+
* @permissionId FAQ.UPDATE_QUESTION
|
|
727
|
+
* @permissionScope Manage FAQ
|
|
728
|
+
* @permissionScopeId SCOPE.DC-LABS.MANAGE-FAQ
|
|
729
|
+
* @applicableIdentity APP
|
|
730
|
+
* @fqn wix.faq.questionentry.v2.QuestionEntryService.BulkUpdateQuestionEntry
|
|
731
|
+
*/
|
|
732
|
+
export async function bulkUpdateQuestionEntry(options) {
|
|
733
|
+
// @ts-ignore
|
|
734
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
735
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
736
|
+
questionEntries: options?.questionEntries,
|
|
737
|
+
returnFullEntity: options?.returnFullEntity,
|
|
738
|
+
});
|
|
739
|
+
const reqOpts = ambassadorWixFaqQuestionEntryV2QuestionEntry.bulkUpdateQuestionEntry(payload);
|
|
740
|
+
sideEffects?.onSiteCall?.();
|
|
741
|
+
try {
|
|
742
|
+
const result = await httpClient.request(reqOpts);
|
|
743
|
+
sideEffects?.onSuccess?.(result);
|
|
744
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
745
|
+
}
|
|
746
|
+
catch (err) {
|
|
747
|
+
const transformedError = sdkTransformError(err, {
|
|
748
|
+
spreadPathsToArguments: {},
|
|
749
|
+
explicitPathsToArguments: {
|
|
750
|
+
questionEntries: '$[0].questionEntries',
|
|
751
|
+
returnFullEntity: '$[0].returnFullEntity',
|
|
752
|
+
},
|
|
753
|
+
singleArgumentUnchanged: false,
|
|
754
|
+
}, ['options']);
|
|
755
|
+
sideEffects?.onError?.(err);
|
|
756
|
+
throw transformedError;
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
//# sourceMappingURL=faq-question-entry-v2-question-entry-question-entry.universal.js.map
|