@wix/auto_sdk_faq_question-entry 1.0.24 → 1.0.25

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.
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
- import { QuestionEntry, UpdateQuestionEntry, ListQuestionEntriesOptions, ListQuestionEntriesResponse, QueryQuestionEntriesOptions, QuestionEntriesQueryBuilder, BulkDeleteQuestionEntriesResponse, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, SetQuestionEntryLabelsOptions, SetQuestionEntryLabelsResponse, BulkUpdateQuestionEntryOptions, BulkUpdateQuestionEntryResponse, QuestionEntryCreatedEnvelope, QuestionEntryDeletedEnvelope, QuestionEntryUpdatedEnvelope } from './index.typings.js';
3
- export { ActionEvent, Alignment, AlignmentWithLiterals, AnchorData, AppEmbedData, AppEmbedDataAppDataOneOf, AppType, AppTypeWithLiterals, ApplicationError, AspectRatio, AspectRatioWithLiterals, AudioData, Background, BackgroundBackgroundOneOf, BackgroundImage, BackgroundType, BackgroundTypeWithLiterals, BaseEventMetadata, BlockquoteData, BookingData, Border, BorderColors, BulkActionMetadata, BulkDeleteQuestionEntriesRequest, BulkUpdateQuestionEntryRequest, BulkUpdateQuestionEntryResult, BulletedListData, ButtonData, ButtonDataType, ButtonDataTypeWithLiterals, ButtonStyles, CaptionData, CardStyles, CellStyle, CodeBlockData, CollapsibleListData, ColorData, Colors, ContentFormat, ContentFormatWithLiterals, CreateQuestionEntryRequest, CreateQuestionEntryResponse, Crop, CropWithLiterals, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, Decoration, DecorationDataOneOf, DecorationType, DecorationTypeWithLiterals, DeleteQuestionEntryRequest, DeleteQuestionEntryResponse, Design, Dimensions, Direction, DirectionWithLiterals, DividerData, DividerDataAlignment, DividerDataAlignmentWithLiterals, DocumentStyle, DomainEvent, DomainEventBodyOneOf, EmbedData, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventData, EventMetadata, ExtendedFields, FieldSet, FieldSetWithLiterals, FileData, FileSource, FileSourceDataOneOf, FontSizeData, FontType, FontTypeWithLiterals, GIF, GIFData, GIFType, GIFTypeWithLiterals, GalleryData, GalleryOptions, GalleryOptionsLayout, GetQuestionEntryRequest, GetQuestionEntryResponse, Gradient, HTMLData, HTMLDataDataOneOf, HeadingData, Height, IdentificationData, IdentificationDataIdOneOf, Image, ImageData, ImageDataStyles, ImagePosition, ImagePositionWithLiterals, ImageStyles, InitialExpandedItems, InitialExpandedItemsWithLiterals, Item, ItemDataOneOf, ItemMetadata, ItemStyle, Label, Layout, LayoutCellData, LayoutData, LayoutType, LayoutTypeWithLiterals, LayoutWithLiterals, LineStyle, LineStyleWithLiterals, Link, LinkData, LinkDataOneOf, LinkPreviewData, LinkPreviewDataStyles, ListQuestionEntriesRequest, ListValue, MapData, MapSettings, MapType, MapTypeWithLiterals, MaskedQuestionEntry, Media, MentionData, MessageEnvelope, Metadata, Node, NodeDataOneOf, NodeStyle, NodeType, NodeTypeWithLiterals, NullValue, NullValueWithLiterals, Oembed, Option, OptionDesign, OptionLayout, OrderedListData, Orientation, OrientationWithLiterals, PDFSettings, PagingMetadataV2, ParagraphData, Permissions, Placement, PlacementWithLiterals, PlaybackOptions, PluginContainerData, PluginContainerDataAlignment, PluginContainerDataAlignmentWithLiterals, PluginContainerDataWidth, PluginContainerDataWidthDataOneOf, Poll, PollData, PollDataLayout, PollDesign, PollLayout, PollLayoutDirection, PollLayoutDirectionWithLiterals, PollLayoutType, PollLayoutTypeWithLiterals, Position, PositionWithLiterals, PricingData, QueryQuestionEntriesRequest, QueryQuestionEntriesRequestContentFormat, QueryQuestionEntriesRequestContentFormatWithLiterals, QueryQuestionEntriesRequestFieldSet, QueryQuestionEntriesRequestFieldSetWithLiterals, QueryQuestionEntriesResponse, QuestionEntriesQueryResult, QuestionEntryAnswerOneOf, QuestionStatus, QuestionStatusWithLiterals, Rel, Resizing, ResizingWithLiterals, ResponsivenessBehaviour, ResponsivenessBehaviourWithLiterals, RestoreInfo, RibbonStyles, RichContent, Scaling, ScalingWithLiterals, SetQuestionEntryLabelsRequest, Settings, SortOrder, SortOrderWithLiterals, Sorting, Source, SourceWithLiterals, Spoiler, SpoilerData, Styles, StylesBorder, StylesPosition, StylesPositionWithLiterals, TableCellData, TableData, Target, TargetWithLiterals, TextAlignment, TextAlignmentWithLiterals, TextData, TextNodeStyle, TextStyle, Thumbnails, ThumbnailsAlignment, ThumbnailsAlignmentWithLiterals, Type, TypeWithLiterals, UpdateExtendedFieldsRequest, UpdateQuestionEntryRequest, UpdateQuestionEntryResponse, VerticalAlignment, VerticalAlignmentAlignment, VerticalAlignmentAlignmentWithLiterals, VerticalAlignmentWithLiterals, Video, VideoData, ViewMode, ViewModeWithLiterals, ViewRole, ViewRoleWithLiterals, VoteRole, VoteRoleWithLiterals, WebhookIdentityType, WebhookIdentityTypeWithLiterals, Width, WidthType, WidthTypeWithLiterals, WidthWithLiterals } from './index.typings.js';
2
+ import { QuestionEntry, UpdateQuestionEntry, ListQuestionEntriesOptions, ListQuestionEntriesResponse, BulkDeleteQuestionEntriesResponse, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, SetQuestionEntryLabelsOptions, SetQuestionEntryLabelsResponse, BulkUpdateQuestionEntryOptions, BulkUpdateQuestionEntryResponse, QuestionEntryCreatedEnvelope, QuestionEntryDeletedEnvelope, QuestionEntryUpdatedEnvelope, CursorQuery, typedQueryQuestionEntries, QueryQuestionEntriesOptions, QuestionEntriesQueryBuilder } from './index.typings.js';
3
+ export { ActionEvent, Alignment, AlignmentWithLiterals, AnchorData, AppEmbedData, AppEmbedDataAppDataOneOf, AppType, AppTypeWithLiterals, ApplicationError, AspectRatio, AspectRatioWithLiterals, AudioData, Background, BackgroundBackgroundOneOf, BackgroundImage, BackgroundType, BackgroundTypeWithLiterals, BaseEventMetadata, BlockquoteData, BookingData, Border, BorderColors, BulkActionMetadata, BulkDeleteQuestionEntriesRequest, BulkUpdateQuestionEntryRequest, BulkUpdateQuestionEntryResult, BulletedListData, ButtonData, ButtonDataType, ButtonDataTypeWithLiterals, ButtonStyles, CaptionData, CardStyles, CellStyle, CodeBlockData, CollapsibleListData, ColorData, Colors, ContentFormat, ContentFormatWithLiterals, CreateQuestionEntryRequest, CreateQuestionEntryResponse, Crop, CropWithLiterals, CursorPaging, CursorPagingMetadata, CursorQueryPagingMethodOneOf, Cursors, Decoration, DecorationDataOneOf, DecorationType, DecorationTypeWithLiterals, DeleteQuestionEntryRequest, DeleteQuestionEntryResponse, Design, Dimensions, Direction, DirectionWithLiterals, DividerData, DividerDataAlignment, DividerDataAlignmentWithLiterals, DocumentStyle, DomainEvent, DomainEventBodyOneOf, EmbedData, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventData, EventMetadata, ExtendedFields, FieldSet, FieldSetWithLiterals, FileData, FileSource, FileSourceDataOneOf, FontSizeData, FontType, FontTypeWithLiterals, GIF, GIFData, GIFType, GIFTypeWithLiterals, GalleryData, GalleryOptions, GalleryOptionsLayout, GetQuestionEntryRequest, GetQuestionEntryResponse, Gradient, HTMLData, HTMLDataDataOneOf, HeadingData, Height, IdentificationData, IdentificationDataIdOneOf, Image, ImageData, ImageDataStyles, ImagePosition, ImagePositionWithLiterals, ImageStyles, InitialExpandedItems, InitialExpandedItemsWithLiterals, Item, ItemDataOneOf, ItemMetadata, ItemStyle, Label, Layout, LayoutCellData, LayoutData, LayoutType, LayoutTypeWithLiterals, LayoutWithLiterals, LineStyle, LineStyleWithLiterals, Link, LinkData, LinkDataOneOf, LinkPreviewData, LinkPreviewDataStyles, ListQuestionEntriesRequest, ListValue, MapData, MapSettings, MapType, MapTypeWithLiterals, MaskedQuestionEntry, Media, MentionData, MessageEnvelope, Metadata, Node, NodeDataOneOf, NodeStyle, NodeType, NodeTypeWithLiterals, NullValue, NullValueWithLiterals, Oembed, Option, OptionDesign, OptionLayout, OrderedListData, Orientation, OrientationWithLiterals, PDFSettings, PagingMetadataV2, ParagraphData, Permissions, Placement, PlacementWithLiterals, PlaybackOptions, PluginContainerData, PluginContainerDataAlignment, PluginContainerDataAlignmentWithLiterals, PluginContainerDataWidth, PluginContainerDataWidthDataOneOf, Poll, PollData, PollDataLayout, PollDesign, PollLayout, PollLayoutDirection, PollLayoutDirectionWithLiterals, PollLayoutType, PollLayoutTypeWithLiterals, Position, PositionWithLiterals, PricingData, QueryQuestionEntriesRequest, QueryQuestionEntriesRequestContentFormat, QueryQuestionEntriesRequestContentFormatWithLiterals, QueryQuestionEntriesRequestFieldSet, QueryQuestionEntriesRequestFieldSetWithLiterals, QueryQuestionEntriesResponse, QuestionEntriesQueryResult, QuestionEntryAnswerOneOf, QuestionStatus, QuestionStatusWithLiterals, Rel, Resizing, ResizingWithLiterals, ResponsivenessBehaviour, ResponsivenessBehaviourWithLiterals, RestoreInfo, RibbonStyles, RichContent, Scaling, ScalingWithLiterals, SetQuestionEntryLabelsRequest, Settings, SortOrder, SortOrderWithLiterals, Sorting, Source, SourceWithLiterals, Spoiler, SpoilerData, Styles, StylesBorder, StylesPosition, StylesPositionWithLiterals, TableCellData, TableData, Target, TargetWithLiterals, TextAlignment, TextAlignmentWithLiterals, TextData, TextNodeStyle, TextStyle, Thumbnails, ThumbnailsAlignment, ThumbnailsAlignmentWithLiterals, Type, TypeWithLiterals, UpdateExtendedFieldsRequest, UpdateQuestionEntryRequest, UpdateQuestionEntryResponse, VerticalAlignment, VerticalAlignmentAlignment, VerticalAlignmentAlignmentWithLiterals, VerticalAlignmentWithLiterals, Video, VideoData, ViewMode, ViewModeWithLiterals, ViewRole, ViewRoleWithLiterals, VoteRole, VoteRoleWithLiterals, WebhookIdentityType, WebhookIdentityTypeWithLiterals, Width, WidthType, WidthTypeWithLiterals, WidthWithLiterals } from './index.typings.js';
4
4
 
5
5
  declare function createQuestionEntry$1(httpClient: HttpClient): CreateQuestionEntrySignature;
6
6
  interface CreateQuestionEntrySignature {
@@ -63,15 +63,6 @@ interface ListQuestionEntriesSignature {
63
63
  */
64
64
  (options?: ListQuestionEntriesOptions): Promise<NonNullablePaths<ListQuestionEntriesResponse, `questionEntries` | `questionEntries.${number}.draftjs` | `questionEntries.${number}.plainText`, 4>>;
65
65
  }
66
- declare function queryQuestionEntries$1(httpClient: HttpClient): QueryQuestionEntriesSignature;
67
- interface QueryQuestionEntriesSignature {
68
- /**
69
- * Retrieves question entries, given the provided paging, filtering, and sorting.
70
- *
71
- * For field support for filters and sorting, see [Question Entries V2: Supported Filters and Sorting](https://dev.wix.com/docs/rest/business-management/faq-app/faq/question-entry-v2/supported-filters).
72
- */
73
- (options?: QueryQuestionEntriesOptions): QuestionEntriesQueryBuilder;
74
- }
75
66
  declare function bulkDeleteQuestionEntries$1(httpClient: HttpClient): BulkDeleteQuestionEntriesSignature;
76
67
  interface BulkDeleteQuestionEntriesSignature {
77
68
  /**
@@ -121,16 +112,22 @@ declare const onQuestionEntryCreated$1: EventDefinition<QuestionEntryCreatedEnve
121
112
  declare const onQuestionEntryDeleted$1: EventDefinition<QuestionEntryDeletedEnvelope, "wix.faq.question_entry.v2.question_entry_deleted">;
122
113
  declare const onQuestionEntryUpdated$1: EventDefinition<QuestionEntryUpdatedEnvelope, "wix.faq.question_entry.v2.question_entry_updated">;
123
114
 
115
+ declare function customQueryQuestionEntries(httpClient: HttpClient): {
116
+ (query: CursorQuery): ReturnType<typeof typedQueryQuestionEntries>;
117
+ (query: CursorQuery, options: QueryQuestionEntriesOptions): ReturnType<typeof typedQueryQuestionEntries>;
118
+ (): QuestionEntriesQueryBuilder;
119
+ (options: QueryQuestionEntriesOptions): QuestionEntriesQueryBuilder;
120
+ };
124
121
  declare const createQuestionEntry: MaybeContext<BuildRESTFunction<typeof createQuestionEntry$1> & typeof createQuestionEntry$1>;
125
122
  declare const getQuestionEntry: MaybeContext<BuildRESTFunction<typeof getQuestionEntry$1> & typeof getQuestionEntry$1>;
126
123
  declare const updateQuestionEntry: MaybeContext<BuildRESTFunction<typeof updateQuestionEntry$1> & typeof updateQuestionEntry$1>;
127
124
  declare const deleteQuestionEntry: MaybeContext<BuildRESTFunction<typeof deleteQuestionEntry$1> & typeof deleteQuestionEntry$1>;
128
125
  declare const listQuestionEntries: MaybeContext<BuildRESTFunction<typeof listQuestionEntries$1> & typeof listQuestionEntries$1>;
129
- declare const queryQuestionEntries: MaybeContext<BuildRESTFunction<typeof queryQuestionEntries$1> & typeof queryQuestionEntries$1>;
130
126
  declare const bulkDeleteQuestionEntries: MaybeContext<BuildRESTFunction<typeof bulkDeleteQuestionEntries$1> & typeof bulkDeleteQuestionEntries$1>;
131
127
  declare const updateExtendedFields: MaybeContext<BuildRESTFunction<typeof updateExtendedFields$1> & typeof updateExtendedFields$1>;
132
128
  declare const setQuestionEntryLabels: MaybeContext<BuildRESTFunction<typeof setQuestionEntryLabels$1> & typeof setQuestionEntryLabels$1>;
133
129
  declare const bulkUpdateQuestionEntry: MaybeContext<BuildRESTFunction<typeof bulkUpdateQuestionEntry$1> & typeof bulkUpdateQuestionEntry$1>;
130
+ declare const queryQuestionEntries: MaybeContext<BuildRESTFunction<typeof customQueryQuestionEntries> & typeof customQueryQuestionEntries>;
134
131
  /**
135
132
  * Triggered when a question entry is created.
136
133
  */
@@ -142,4 +139,4 @@ declare const onQuestionEntryDeleted: BuildEventDefinition<typeof onQuestionEntr
142
139
  */
143
140
  declare const onQuestionEntryUpdated: BuildEventDefinition<typeof onQuestionEntryUpdated$1> & typeof onQuestionEntryUpdated$1;
144
141
 
145
- export { BulkDeleteQuestionEntriesResponse, BulkUpdateQuestionEntryOptions, BulkUpdateQuestionEntryResponse, ListQuestionEntriesOptions, ListQuestionEntriesResponse, QueryQuestionEntriesOptions, QuestionEntriesQueryBuilder, QuestionEntry, QuestionEntryCreatedEnvelope, QuestionEntryDeletedEnvelope, QuestionEntryUpdatedEnvelope, SetQuestionEntryLabelsOptions, SetQuestionEntryLabelsResponse, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, UpdateQuestionEntry, bulkDeleteQuestionEntries, bulkUpdateQuestionEntry, createQuestionEntry, deleteQuestionEntry, getQuestionEntry, listQuestionEntries, onQuestionEntryCreated, onQuestionEntryDeleted, onQuestionEntryUpdated, queryQuestionEntries, setQuestionEntryLabels, updateExtendedFields, updateQuestionEntry };
142
+ export { BulkDeleteQuestionEntriesResponse, BulkUpdateQuestionEntryOptions, BulkUpdateQuestionEntryResponse, CursorQuery, ListQuestionEntriesOptions, ListQuestionEntriesResponse, QueryQuestionEntriesOptions, QuestionEntriesQueryBuilder, QuestionEntry, QuestionEntryCreatedEnvelope, QuestionEntryDeletedEnvelope, QuestionEntryUpdatedEnvelope, SetQuestionEntryLabelsOptions, SetQuestionEntryLabelsResponse, UpdateExtendedFieldsOptions, UpdateExtendedFieldsResponse, UpdateQuestionEntry, bulkDeleteQuestionEntries, bulkUpdateQuestionEntry, createQuestionEntry, deleteQuestionEntry, getQuestionEntry, listQuestionEntries, onQuestionEntryCreated, onQuestionEntryDeleted, onQuestionEntryUpdated, queryQuestionEntries, setQuestionEntryLabels, updateExtendedFields, updateQuestionEntry };
@@ -1737,6 +1737,34 @@ function queryQuestionEntries2(options) {
1737
1737
  transformationPaths: {}
1738
1738
  });
1739
1739
  }
1740
+ async function typedQueryQuestionEntries(query, options) {
1741
+ const { httpClient, sideEffects } = arguments[2];
1742
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)(
1743
+ { query, ...options },
1744
+ []
1745
+ );
1746
+ const reqOpts = queryQuestionEntries(payload);
1747
+ sideEffects?.onSiteCall?.();
1748
+ try {
1749
+ const result = await httpClient.request(reqOpts);
1750
+ sideEffects?.onSuccess?.(result);
1751
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data, [
1752
+ "questionEntries.richContent"
1753
+ ]);
1754
+ } catch (err) {
1755
+ const transformedError = (0, import_transform_error.transformError)(
1756
+ err,
1757
+ {
1758
+ spreadPathsToArguments: {},
1759
+ explicitPathsToArguments: { query: "$[0]" },
1760
+ singleArgumentUnchanged: false
1761
+ },
1762
+ ["query", "options"]
1763
+ );
1764
+ sideEffects?.onError?.(err);
1765
+ throw transformedError;
1766
+ }
1767
+ }
1740
1768
  async function bulkDeleteQuestionEntries2(questionEntryIds) {
1741
1769
  const { httpClient, sideEffects } = arguments[1];
1742
1770
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)(
@@ -1911,6 +1939,14 @@ function queryQuestionEntries3(httpClient) {
1911
1939
  { httpClient }
1912
1940
  );
1913
1941
  }
1942
+ function typedQueryQuestionEntries2(httpClient) {
1943
+ return (query, options) => typedQueryQuestionEntries(
1944
+ query,
1945
+ options,
1946
+ // @ts-ignore
1947
+ { httpClient }
1948
+ );
1949
+ }
1914
1950
  function bulkDeleteQuestionEntries3(httpClient) {
1915
1951
  return (questionEntryIds) => bulkDeleteQuestionEntries2(
1916
1952
  questionEntryIds,
@@ -2122,16 +2158,28 @@ var onQuestionEntryUpdated = (0, import_sdk_types.EventDefinition)(
2122
2158
  // src/faq-question-entry-v2-question-entry-question-entry.context.ts
2123
2159
  var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
2124
2160
  var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
2161
+ var import_query_method_router = require("@wix/sdk-runtime/query-method-router");
2162
+ function customQueryQuestionEntries(httpClient) {
2163
+ const router = (0, import_query_method_router.createQueryOverloadRouter)({
2164
+ builderQueryFunction: (options) => queryQuestionEntries3(httpClient)(options),
2165
+ typedQueryFunction: (query, options) => typedQueryQuestionEntries2(httpClient)(query, options),
2166
+ hasOptionsParameter: true
2167
+ });
2168
+ function overloadedQuery(queryOrOptions, options) {
2169
+ return router(...arguments);
2170
+ }
2171
+ return overloadedQuery;
2172
+ }
2125
2173
  var createQuestionEntry4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createQuestionEntry3);
2126
2174
  var getQuestionEntry4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getQuestionEntry3);
2127
2175
  var updateQuestionEntry4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateQuestionEntry3);
2128
2176
  var deleteQuestionEntry4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteQuestionEntry3);
2129
2177
  var listQuestionEntries4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listQuestionEntries3);
2130
- var queryQuestionEntries4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(queryQuestionEntries3);
2131
2178
  var bulkDeleteQuestionEntries4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkDeleteQuestionEntries3);
2132
2179
  var updateExtendedFields4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateExtendedFields3);
2133
2180
  var setQuestionEntryLabels4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(setQuestionEntryLabels3);
2134
2181
  var bulkUpdateQuestionEntry4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkUpdateQuestionEntry3);
2182
+ var queryQuestionEntries4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryQuestionEntries);
2135
2183
  var onQuestionEntryCreated2 = (0, import_event_definition_modules.createEventModule)(
2136
2184
  onQuestionEntryCreated
2137
2185
  );