@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/es/index.d.mts
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.mjs';
|
|
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.mjs';
|
|
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/es/index.mjs
CHANGED
|
@@ -1708,6 +1708,34 @@ function queryInfoSections2(options) {
|
|
|
1708
1708
|
transformationPaths: {}
|
|
1709
1709
|
});
|
|
1710
1710
|
}
|
|
1711
|
+
async function typedQueryInfoSections(query, options) {
|
|
1712
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1713
|
+
const payload = renameKeysFromSDKRequestToRESTRequest(
|
|
1714
|
+
{ query, ...options },
|
|
1715
|
+
[]
|
|
1716
|
+
);
|
|
1717
|
+
const reqOpts = queryInfoSections(payload);
|
|
1718
|
+
sideEffects?.onSiteCall?.();
|
|
1719
|
+
try {
|
|
1720
|
+
const result = await httpClient.request(reqOpts);
|
|
1721
|
+
sideEffects?.onSuccess?.(result);
|
|
1722
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data, [
|
|
1723
|
+
"infoSections.description"
|
|
1724
|
+
]);
|
|
1725
|
+
} catch (err) {
|
|
1726
|
+
const transformedError = sdkTransformError(
|
|
1727
|
+
err,
|
|
1728
|
+
{
|
|
1729
|
+
spreadPathsToArguments: {},
|
|
1730
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
1731
|
+
singleArgumentUnchanged: false
|
|
1732
|
+
},
|
|
1733
|
+
["query", "options"]
|
|
1734
|
+
);
|
|
1735
|
+
sideEffects?.onError?.(err);
|
|
1736
|
+
throw transformedError;
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1711
1739
|
async function bulkCreateInfoSections2(infoSections, options) {
|
|
1712
1740
|
const { httpClient, sideEffects } = arguments[2];
|
|
1713
1741
|
const payload = renameKeysFromSDKRequestToRESTRequest(
|
|
@@ -1855,6 +1883,14 @@ function queryInfoSections3(httpClient) {
|
|
|
1855
1883
|
{ httpClient }
|
|
1856
1884
|
);
|
|
1857
1885
|
}
|
|
1886
|
+
function typedQueryInfoSections2(httpClient) {
|
|
1887
|
+
return (query, options) => typedQueryInfoSections(
|
|
1888
|
+
query,
|
|
1889
|
+
options,
|
|
1890
|
+
// @ts-ignore
|
|
1891
|
+
{ httpClient }
|
|
1892
|
+
);
|
|
1893
|
+
}
|
|
1858
1894
|
function bulkCreateInfoSections3(httpClient) {
|
|
1859
1895
|
return (infoSections, options) => bulkCreateInfoSections2(
|
|
1860
1896
|
infoSections,
|
|
@@ -2052,16 +2088,28 @@ var onInfoSectionUpdated = EventDefinition(
|
|
|
2052
2088
|
// src/stores-catalog-v3-info-section-info-sections-v-3.context.ts
|
|
2053
2089
|
import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
|
|
2054
2090
|
import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
|
|
2091
|
+
import { createQueryOverloadRouter } from "@wix/sdk-runtime/query-method-router";
|
|
2092
|
+
function customQueryInfoSections(httpClient) {
|
|
2093
|
+
const router = createQueryOverloadRouter({
|
|
2094
|
+
builderQueryFunction: (options) => queryInfoSections3(httpClient)(options),
|
|
2095
|
+
typedQueryFunction: (query, options) => typedQueryInfoSections2(httpClient)(query, options),
|
|
2096
|
+
hasOptionsParameter: true
|
|
2097
|
+
});
|
|
2098
|
+
function overloadedQuery(queryOrOptions, options) {
|
|
2099
|
+
return router(...arguments);
|
|
2100
|
+
}
|
|
2101
|
+
return overloadedQuery;
|
|
2102
|
+
}
|
|
2055
2103
|
var createInfoSection4 = /* @__PURE__ */ createRESTModule(createInfoSection3);
|
|
2056
2104
|
var getInfoSection4 = /* @__PURE__ */ createRESTModule(getInfoSection3);
|
|
2057
2105
|
var getOrCreateInfoSection4 = /* @__PURE__ */ createRESTModule(getOrCreateInfoSection3);
|
|
2058
2106
|
var bulkGetOrCreateInfoSections4 = /* @__PURE__ */ createRESTModule(bulkGetOrCreateInfoSections3);
|
|
2059
2107
|
var updateInfoSection4 = /* @__PURE__ */ createRESTModule(updateInfoSection3);
|
|
2060
2108
|
var deleteInfoSection4 = /* @__PURE__ */ createRESTModule(deleteInfoSection3);
|
|
2061
|
-
var queryInfoSections4 = /* @__PURE__ */ createRESTModule(queryInfoSections3);
|
|
2062
2109
|
var bulkCreateInfoSections4 = /* @__PURE__ */ createRESTModule(bulkCreateInfoSections3);
|
|
2063
2110
|
var bulkUpdateInfoSections4 = /* @__PURE__ */ createRESTModule(bulkUpdateInfoSections3);
|
|
2064
2111
|
var bulkDeleteInfoSections4 = /* @__PURE__ */ createRESTModule(bulkDeleteInfoSections3);
|
|
2112
|
+
var queryInfoSections4 = /* @__PURE__ */ createRESTModule(customQueryInfoSections);
|
|
2065
2113
|
var onInfoSectionCreated2 = createEventModule(
|
|
2066
2114
|
onInfoSectionCreated
|
|
2067
2115
|
);
|