@wix/auto_sdk_stores_info-sections-v-3 1.0.41 → 1.0.43
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 +10 -25
- package/build/cjs/index.js +49 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +7 -1
- package/build/cjs/index.typings.js +30 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.d.mts +10 -25
- package/build/es/index.mjs +49 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +7 -1
- package/build/es/index.typings.mjs +29 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +10 -25
- package/build/internal/cjs/index.js +49 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +7 -1
- package/build/internal/cjs/index.typings.js +30 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/es/index.d.mts +10 -25
- package/build/internal/es/index.mjs +49 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +7 -1
- package/build/internal/es/index.typings.mjs +29 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/package.json +3 -3
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import { InfoSection, CreateInfoSectionValidationErrors, GetInfoSectionOptions, GetOrCreateInfoSectionOptions, GetOrCreateInfoSectionResponse, GetOrCreateInfoSectionValidationErrors, BulkGetOrCreateInfoSectionsOptions, BulkGetOrCreateInfoSectionsResponse, BulkGetOrCreateInfoSectionsValidationErrors, UpdateInfoSection, UpdateInfoSectionOptions,
|
|
3
|
-
export { ActionEvent, Alignment, AlignmentWithLiterals, AnchorData, App, AppEmbedData, AppEmbedDataAppDataOneOf, AppType, AppTypeWithLiterals, ApplicationError, AspectRatio, AspectRatioWithLiterals, AudioData, Background, BackgroundBackgroundOneOf, BackgroundImage, BackgroundType, BackgroundTypeWithLiterals, BaseEventMetadata, BlockquoteData, BookingData, Border, BorderColors, BulkActionMetadata, BulkCreateInfoSectionsRequest, BulkDeleteInfoSectionsRequest, BulkGetOrCreateInfoSectionsRequest, BulkInfoSectionItemResult, BulkInfoSectionResult, BulkUpdateInfoSectionsRequest, BulletedListData, ButtonData, ButtonDataType, ButtonDataTypeWithLiterals, ButtonStyles, CaptionData, CardStyles, CellStyle, CodeBlockData, CollapsibleListData, ColorData, Colors, CreateInfoSectionRequest, CreateInfoSectionResponse, Crop, CropWithLiterals, CursorPaging, CursorPagingMetadata,
|
|
2
|
+
import { InfoSection, CreateInfoSectionValidationErrors, GetInfoSectionOptions, GetOrCreateInfoSectionOptions, GetOrCreateInfoSectionResponse, GetOrCreateInfoSectionValidationErrors, BulkGetOrCreateInfoSectionsOptions, BulkGetOrCreateInfoSectionsResponse, BulkGetOrCreateInfoSectionsValidationErrors, UpdateInfoSection, UpdateInfoSectionOptions, BulkCreateInfoSectionsOptions, BulkCreateInfoSectionsResponse, BulkCreateInfoSectionsValidationErrors, MaskedInfoSection, BulkUpdateInfoSectionsOptions, BulkUpdateInfoSectionsResponse, BulkDeleteInfoSectionsResponse, InfoSectionCreatedEnvelope, InfoSectionDeletedEnvelope, InfoSectionUpdatedEnvelope, CursorQuery, typedQueryInfoSections, QueryInfoSectionsOptions, InfoSectionsQueryBuilder } from './index.typings.js';
|
|
3
|
+
export { ActionEvent, Alignment, AlignmentWithLiterals, AnchorData, App, AppEmbedData, AppEmbedDataAppDataOneOf, AppType, AppTypeWithLiterals, ApplicationError, AspectRatio, AspectRatioWithLiterals, AudioData, Background, BackgroundBackgroundOneOf, BackgroundImage, BackgroundType, BackgroundTypeWithLiterals, BaseEventMetadata, BlockquoteData, BookingData, Border, BorderColors, BulkActionMetadata, BulkCreateInfoSectionsRequest, BulkDeleteInfoSectionsRequest, BulkGetOrCreateInfoSectionsRequest, BulkInfoSectionItemResult, BulkInfoSectionResult, BulkUpdateInfoSectionsRequest, BulletedListData, ButtonData, ButtonDataType, ButtonDataTypeWithLiterals, ButtonStyles, CaptionData, CardStyles, CellStyle, CodeBlockData, CollapsibleListData, ColorData, Colors, CreateInfoSectionRequest, CreateInfoSectionResponse, Crop, CropWithLiterals, CursorPaging, CursorPagingMetadata, CursorQueryPagingMethodOneOf, Cursors, CustomTag, Decoration, DecorationDataOneOf, DecorationType, DecorationTypeWithLiterals, DeleteInfoSectionRequest, DeleteInfoSectionResponse, Design, Dimensions, Direction, DirectionWithLiterals, DividerData, DividerDataAlignment, DividerDataAlignmentWithLiterals, DocumentStyle, DomainEvent, DomainEventBodyOneOf, EmbedData, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventData, EventMetadata, File, FileData, FileSource, FileSourceDataOneOf, FontSizeData, FontType, FontTypeWithLiterals, GIF, GIFData, GIFType, GIFTypeWithLiterals, GalleryData, GalleryOptions, GalleryOptionsLayout, GetInfoSectionRequest, GetInfoSectionResponse, GetOrCreateInfoSectionRequest, Gradient, HTMLData, HTMLDataDataOneOf, HeadingData, Height, IdentificationData, IdentificationDataIdOneOf, Image, ImageData, ImageDataStyles, ImagePosition, ImagePositionWithLiterals, ImageStyles, InfoSectionForGetOrCreate, InfoSectionsQueryResult, InitialExpandedItems, InitialExpandedItemsWithLiterals, InvalidateCache, InvalidateCacheGetByOneOf, Item, ItemDataOneOf, ItemMetadata, ItemStyle, Layout, LayoutCellData, LayoutData, LayoutType, LayoutTypeWithLiterals, LayoutWithLiterals, LineStyle, LineStyleWithLiterals, Link, LinkData, LinkDataOneOf, LinkPreviewData, LinkPreviewDataStyles, ListValue, MapData, MapSettings, MapType, MapTypeWithLiterals, Media, MentionData, MessageEnvelope, Metadata, Node, NodeDataOneOf, NodeStyle, NodeType, NodeTypeWithLiterals, NullValue, NullValueWithLiterals, Oembed, Option, OptionDesign, OptionLayout, OrderedListData, Orientation, OrientationWithLiterals, PDFSettings, Page, ParagraphData, Permissions, Placement, PlacementWithLiterals, PlaybackOptions, PluginContainerData, PluginContainerDataAlignment, PluginContainerDataAlignmentWithLiterals, PluginContainerDataWidth, PluginContainerDataWidthDataOneOf, Poll, PollData, PollDataLayout, PollDesign, PollLayout, PollLayoutDirection, PollLayoutDirectionWithLiterals, PollLayoutType, PollLayoutTypeWithLiterals, Position, PositionWithLiterals, PricingData, QueryInfoSectionsRequest, QueryInfoSectionsResponse, Rel, RequestedFields, RequestedFieldsWithLiterals, Resizing, ResizingWithLiterals, ResponsivenessBehaviour, ResponsivenessBehaviourWithLiterals, RestoreInfo, RibbonStyles, RichContent, Scaling, ScalingWithLiterals, 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, URI, UpdateInfoSectionRequest, UpdateInfoSectionResponse, 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 createInfoSection$1(httpClient: HttpClient): CreateInfoSectionSignature;
|
|
6
6
|
interface CreateInfoSectionSignature {
|
|
@@ -72,27 +72,6 @@ interface DeleteInfoSectionSignature {
|
|
|
72
72
|
*/
|
|
73
73
|
(infoSectionId: string): Promise<void>;
|
|
74
74
|
}
|
|
75
|
-
declare function queryInfoSections$1(httpClient: HttpClient): QueryInfoSectionsSignature;
|
|
76
|
-
interface QueryInfoSectionsSignature {
|
|
77
|
-
/**
|
|
78
|
-
* Retrieves a list of up to 100 info sections, given the provided filtering, sorting, and cursor paging.
|
|
79
|
-
* Pass supported values to the `fields` array in the request to include those fields in the response.
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
* Query Info Sections runs with these defaults, which you can override:
|
|
83
|
-
*
|
|
84
|
-
* - `createdDate` is sorted in `DESC` order
|
|
85
|
-
* - `cursorPaging.limit` is `100`
|
|
86
|
-
*
|
|
87
|
-
* For field support for filters and sorting,
|
|
88
|
-
* see [Info Sections: Supported Filters and Sorting](https://dev.wix.com/docs/rest/business-solutions/stores/catalog-v3/info-sections-v3/supported-filters-and-sorting).
|
|
89
|
-
*
|
|
90
|
-
* To learn about working with _Query_ endpoints, see
|
|
91
|
-
* [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language),
|
|
92
|
-
* and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging).
|
|
93
|
-
*/
|
|
94
|
-
(options?: QueryInfoSectionsOptions): InfoSectionsQueryBuilder;
|
|
95
|
-
}
|
|
96
75
|
declare function bulkCreateInfoSections$1(httpClient: HttpClient): BulkCreateInfoSectionsSignature;
|
|
97
76
|
interface BulkCreateInfoSectionsSignature {
|
|
98
77
|
/**
|
|
@@ -127,16 +106,22 @@ declare const onInfoSectionCreated$1: EventDefinition<InfoSectionCreatedEnvelope
|
|
|
127
106
|
declare const onInfoSectionDeleted$1: EventDefinition<InfoSectionDeletedEnvelope, "wix.stores.catalog.v3.info_section_deleted">;
|
|
128
107
|
declare const onInfoSectionUpdated$1: EventDefinition<InfoSectionUpdatedEnvelope, "wix.stores.catalog.v3.info_section_updated">;
|
|
129
108
|
|
|
109
|
+
declare function customQueryInfoSections(httpClient: HttpClient): {
|
|
110
|
+
(query: CursorQuery): ReturnType<typeof typedQueryInfoSections>;
|
|
111
|
+
(query: CursorQuery, options: QueryInfoSectionsOptions): ReturnType<typeof typedQueryInfoSections>;
|
|
112
|
+
(): InfoSectionsQueryBuilder;
|
|
113
|
+
(options: QueryInfoSectionsOptions): InfoSectionsQueryBuilder;
|
|
114
|
+
};
|
|
130
115
|
declare const createInfoSection: MaybeContext<BuildRESTFunction<typeof createInfoSection$1> & typeof createInfoSection$1>;
|
|
131
116
|
declare const getInfoSection: MaybeContext<BuildRESTFunction<typeof getInfoSection$1> & typeof getInfoSection$1>;
|
|
132
117
|
declare const getOrCreateInfoSection: MaybeContext<BuildRESTFunction<typeof getOrCreateInfoSection$1> & typeof getOrCreateInfoSection$1>;
|
|
133
118
|
declare const bulkGetOrCreateInfoSections: MaybeContext<BuildRESTFunction<typeof bulkGetOrCreateInfoSections$1> & typeof bulkGetOrCreateInfoSections$1>;
|
|
134
119
|
declare const updateInfoSection: MaybeContext<BuildRESTFunction<typeof updateInfoSection$1> & typeof updateInfoSection$1>;
|
|
135
120
|
declare const deleteInfoSection: MaybeContext<BuildRESTFunction<typeof deleteInfoSection$1> & typeof deleteInfoSection$1>;
|
|
136
|
-
declare const queryInfoSections: MaybeContext<BuildRESTFunction<typeof queryInfoSections$1> & typeof queryInfoSections$1>;
|
|
137
121
|
declare const bulkCreateInfoSections: MaybeContext<BuildRESTFunction<typeof bulkCreateInfoSections$1> & typeof bulkCreateInfoSections$1>;
|
|
138
122
|
declare const bulkUpdateInfoSections: MaybeContext<BuildRESTFunction<typeof bulkUpdateInfoSections$1> & typeof bulkUpdateInfoSections$1>;
|
|
139
123
|
declare const bulkDeleteInfoSections: MaybeContext<BuildRESTFunction<typeof bulkDeleteInfoSections$1> & typeof bulkDeleteInfoSections$1>;
|
|
124
|
+
declare const queryInfoSections: MaybeContext<BuildRESTFunction<typeof customQueryInfoSections> & typeof customQueryInfoSections>;
|
|
140
125
|
/**
|
|
141
126
|
* Triggered when an info section is created.
|
|
142
127
|
*/
|
|
@@ -150,4 +135,4 @@ declare const onInfoSectionDeleted: BuildEventDefinition<typeof onInfoSectionDel
|
|
|
150
135
|
*/
|
|
151
136
|
declare const onInfoSectionUpdated: BuildEventDefinition<typeof onInfoSectionUpdated$1> & typeof onInfoSectionUpdated$1;
|
|
152
137
|
|
|
153
|
-
export { BulkCreateInfoSectionsOptions, BulkCreateInfoSectionsResponse, BulkCreateInfoSectionsValidationErrors, BulkDeleteInfoSectionsResponse, BulkGetOrCreateInfoSectionsOptions, BulkGetOrCreateInfoSectionsResponse, BulkGetOrCreateInfoSectionsValidationErrors, BulkUpdateInfoSectionsOptions, BulkUpdateInfoSectionsResponse, CreateInfoSectionValidationErrors, GetInfoSectionOptions, GetOrCreateInfoSectionOptions, GetOrCreateInfoSectionResponse, GetOrCreateInfoSectionValidationErrors, InfoSection, InfoSectionCreatedEnvelope, InfoSectionDeletedEnvelope, InfoSectionUpdatedEnvelope, InfoSectionsQueryBuilder, MaskedInfoSection, QueryInfoSectionsOptions, UpdateInfoSection, UpdateInfoSectionOptions, bulkCreateInfoSections, bulkDeleteInfoSections, bulkGetOrCreateInfoSections, bulkUpdateInfoSections, createInfoSection, deleteInfoSection, getInfoSection, getOrCreateInfoSection, onInfoSectionCreated, onInfoSectionDeleted, onInfoSectionUpdated, queryInfoSections, updateInfoSection };
|
|
138
|
+
export { BulkCreateInfoSectionsOptions, BulkCreateInfoSectionsResponse, BulkCreateInfoSectionsValidationErrors, BulkDeleteInfoSectionsResponse, BulkGetOrCreateInfoSectionsOptions, BulkGetOrCreateInfoSectionsResponse, BulkGetOrCreateInfoSectionsValidationErrors, BulkUpdateInfoSectionsOptions, BulkUpdateInfoSectionsResponse, CreateInfoSectionValidationErrors, CursorQuery, GetInfoSectionOptions, GetOrCreateInfoSectionOptions, GetOrCreateInfoSectionResponse, GetOrCreateInfoSectionValidationErrors, InfoSection, InfoSectionCreatedEnvelope, InfoSectionDeletedEnvelope, InfoSectionUpdatedEnvelope, InfoSectionsQueryBuilder, MaskedInfoSection, QueryInfoSectionsOptions, UpdateInfoSection, UpdateInfoSectionOptions, bulkCreateInfoSections, bulkDeleteInfoSections, bulkGetOrCreateInfoSections, bulkUpdateInfoSections, createInfoSection, deleteInfoSection, getInfoSection, getOrCreateInfoSection, onInfoSectionCreated, onInfoSectionDeleted, onInfoSectionUpdated, queryInfoSections, updateInfoSection };
|
package/build/cjs/index.js
CHANGED
|
@@ -1787,6 +1787,34 @@ function queryInfoSections2(options) {
|
|
|
1787
1787
|
transformationPaths: {}
|
|
1788
1788
|
});
|
|
1789
1789
|
}
|
|
1790
|
+
async function typedQueryInfoSections(query, options) {
|
|
1791
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1792
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)(
|
|
1793
|
+
{ query, ...options },
|
|
1794
|
+
[]
|
|
1795
|
+
);
|
|
1796
|
+
const reqOpts = queryInfoSections(payload);
|
|
1797
|
+
sideEffects?.onSiteCall?.();
|
|
1798
|
+
try {
|
|
1799
|
+
const result = await httpClient.request(reqOpts);
|
|
1800
|
+
sideEffects?.onSuccess?.(result);
|
|
1801
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data, [
|
|
1802
|
+
"infoSections.description"
|
|
1803
|
+
]);
|
|
1804
|
+
} catch (err) {
|
|
1805
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1806
|
+
err,
|
|
1807
|
+
{
|
|
1808
|
+
spreadPathsToArguments: {},
|
|
1809
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
1810
|
+
singleArgumentUnchanged: false
|
|
1811
|
+
},
|
|
1812
|
+
["query", "options"]
|
|
1813
|
+
);
|
|
1814
|
+
sideEffects?.onError?.(err);
|
|
1815
|
+
throw transformedError;
|
|
1816
|
+
}
|
|
1817
|
+
}
|
|
1790
1818
|
async function bulkCreateInfoSections2(infoSections, options) {
|
|
1791
1819
|
const { httpClient, sideEffects } = arguments[2];
|
|
1792
1820
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)(
|
|
@@ -1934,6 +1962,14 @@ function queryInfoSections3(httpClient) {
|
|
|
1934
1962
|
{ httpClient }
|
|
1935
1963
|
);
|
|
1936
1964
|
}
|
|
1965
|
+
function typedQueryInfoSections2(httpClient) {
|
|
1966
|
+
return (query, options) => typedQueryInfoSections(
|
|
1967
|
+
query,
|
|
1968
|
+
options,
|
|
1969
|
+
// @ts-ignore
|
|
1970
|
+
{ httpClient }
|
|
1971
|
+
);
|
|
1972
|
+
}
|
|
1937
1973
|
function bulkCreateInfoSections3(httpClient) {
|
|
1938
1974
|
return (infoSections, options) => bulkCreateInfoSections2(
|
|
1939
1975
|
infoSections,
|
|
@@ -2131,16 +2167,28 @@ var onInfoSectionUpdated = (0, import_sdk_types.EventDefinition)(
|
|
|
2131
2167
|
// src/stores-catalog-v3-info-section-info-sections-v-3.context.ts
|
|
2132
2168
|
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
2133
2169
|
var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
|
|
2170
|
+
var import_query_method_router = require("@wix/sdk-runtime/query-method-router");
|
|
2171
|
+
function customQueryInfoSections(httpClient) {
|
|
2172
|
+
const router = (0, import_query_method_router.createQueryOverloadRouter)({
|
|
2173
|
+
builderQueryFunction: (options) => queryInfoSections3(httpClient)(options),
|
|
2174
|
+
typedQueryFunction: (query, options) => typedQueryInfoSections2(httpClient)(query, options),
|
|
2175
|
+
hasOptionsParameter: true
|
|
2176
|
+
});
|
|
2177
|
+
function overloadedQuery(queryOrOptions, options) {
|
|
2178
|
+
return router(...arguments);
|
|
2179
|
+
}
|
|
2180
|
+
return overloadedQuery;
|
|
2181
|
+
}
|
|
2134
2182
|
var createInfoSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createInfoSection3);
|
|
2135
2183
|
var getInfoSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getInfoSection3);
|
|
2136
2184
|
var getOrCreateInfoSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getOrCreateInfoSection3);
|
|
2137
2185
|
var bulkGetOrCreateInfoSections4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkGetOrCreateInfoSections3);
|
|
2138
2186
|
var updateInfoSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(updateInfoSection3);
|
|
2139
2187
|
var deleteInfoSection4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(deleteInfoSection3);
|
|
2140
|
-
var queryInfoSections4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(queryInfoSections3);
|
|
2141
2188
|
var bulkCreateInfoSections4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkCreateInfoSections3);
|
|
2142
2189
|
var bulkUpdateInfoSections4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkUpdateInfoSections3);
|
|
2143
2190
|
var bulkDeleteInfoSections4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkDeleteInfoSections3);
|
|
2191
|
+
var queryInfoSections4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryInfoSections);
|
|
2144
2192
|
var onInfoSectionCreated2 = (0, import_event_definition_modules.createEventModule)(
|
|
2145
2193
|
onInfoSectionCreated
|
|
2146
2194
|
);
|