@wix/auto_sdk_multilingual_translation-published-contents 1.0.40 → 1.0.41
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 +9 -31
- package/build/cjs/index.js +61 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +9 -1
- package/build/cjs/index.typings.js +45 -2
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +1 -0
- package/build/es/index.d.mts +9 -31
- package/build/es/index.mjs +61 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +9 -1
- package/build/es/index.typings.mjs +43 -1
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +1 -0
- package/build/internal/cjs/index.d.ts +9 -31
- package/build/internal/cjs/index.js +61 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +9 -1
- package/build/internal/cjs/index.typings.js +45 -2
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/es/index.d.mts +9 -31
- package/build/internal/es/index.mjs +61 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +9 -1
- package/build/internal/es/index.typings.mjs +43 -1
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +1 -0
- package/package.json +3 -3
package/build/es/index.d.mts
CHANGED
|
@@ -1,38 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
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, BulkContentResult, BulkDeletePublishedContentRequest, BulkDeletePublishedContentResponse, BulletedListData, ButtonData, ButtonDataType, ButtonDataTypeWithLiterals, ButtonStyles, CaptionData, CardStyles, CellStyle, CodeBlockData, CollapsibleListData, ColorData, Colors, Crop, CropWithLiterals, CursorPaging, CursorPagingMetadata,
|
|
1
|
+
import { EventDefinition, MaybeContext, BuildRESTFunction, HttpClient, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
+
import { PublishedContentCreatedEnvelope, PublishedContentDeletedEnvelope, PublishedContentUpdatedEnvelope, PublishedContentQueryBuilder, CursorQuery, typedQueryPublishedContent } from './index.typings.mjs';
|
|
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, BulkContentResult, BulkDeletePublishedContentRequest, BulkDeletePublishedContentResponse, BulletedListData, ButtonData, ButtonDataType, ButtonDataTypeWithLiterals, ButtonStyles, CaptionData, CardStyles, CellStyle, CodeBlockData, CollapsibleListData, ColorData, Colors, Crop, CropWithLiterals, CursorPaging, CursorPagingMetadata, CursorQueryPagingMethodOneOf, Cursors, Decoration, DecorationDataOneOf, DecorationType, DecorationTypeWithLiterals, DeletePublishedContentByFilterRequest, DeletePublishedContentByFilterResponse, DeletePublishedContentRequest, DeletePublishedContentResponse, Design, Dimensions, Direction, DirectionWithLiterals, DividerData, DividerDataAlignment, DividerDataAlignmentWithLiterals, DocumentStyle, DomainEvent, DomainEventBodyOneOf, EmbedData, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventData, EventMetadata, ExtendedFields, FileData, FileSource, FileSourceDataOneOf, FocalPoint, FontSizeData, FontType, FontTypeWithLiterals, GIF, GIFData, GIFType, GIFTypeWithLiterals, GalleryData, GalleryOptions, GalleryOptionsLayout, GetPublishedContentRequest, GetPublishedContentResponse, Gradient, HTMLData, HTMLDataDataOneOf, HeadingData, Height, IdentificationData, IdentificationDataIdOneOf, Image, ImageData, ImageDataStyles, ImagePosition, ImagePositionWithLiterals, ImageStyles, InitialExpandedItems, InitialExpandedItemsWithLiterals, 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, ParagraphData, Permissions, Placement, PlacementWithLiterals, PlaybackOptions, PluginContainerData, PluginContainerDataAlignment, PluginContainerDataAlignmentWithLiterals, PluginContainerDataWidth, PluginContainerDataWidthDataOneOf, Poll, PollData, PollDataLayout, PollDesign, PollLayout, PollLayoutDirection, PollLayoutDirectionWithLiterals, PollLayoutType, PollLayoutTypeWithLiterals, Position, PositionWithLiterals, PricingData, PublishedContent, PublishedContentField, PublishedContentFieldValueOneOf, PublishedContentQueryResult, QueryPublishedContentRequest, QueryPublishedContentResponse, Rel, Resizing, ResizingWithLiterals, ResponsivenessBehaviour, ResponsivenessBehaviourWithLiterals, RestoreInfo, RibbonStyles, RichContent, Scaling, ScalingWithLiterals, SchemaKey, SchemaScope, SchemaScopeWithLiterals, 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, VerticalAlignment, VerticalAlignmentAlignment, VerticalAlignmentAlignmentWithLiterals, VerticalAlignmentWithLiterals, Video, VideoData, VideoResolution, ViewMode, ViewModeWithLiterals, ViewRole, ViewRoleWithLiterals, VoteRole, VoteRoleWithLiterals, WebhookIdentityType, WebhookIdentityTypeWithLiterals, Width, WidthType, WidthTypeWithLiterals, WidthWithLiterals } from './index.typings.mjs';
|
|
4
4
|
|
|
5
|
-
declare function queryPublishedContent$1(httpClient: HttpClient): QueryPublishedContentSignature;
|
|
6
|
-
interface QueryPublishedContentSignature {
|
|
7
|
-
/**
|
|
8
|
-
* Creates a query to retrieve a list of translation content items.
|
|
9
|
-
*
|
|
10
|
-
* The `queryPublishedContent()` function builds a query to retrieve a list of translation content items and returns a `PublishedContentQueryBuilder` object.
|
|
11
|
-
*
|
|
12
|
-
* The returned object contains the query definition, which is used to run the query using the [`find()`](https://dev.wix.com/docs/sdk/backend-modules/multilingual/translation/translation-published-content/published-content-query-builder/find) function.
|
|
13
|
-
*
|
|
14
|
-
* You can refine the query by chaining `PublishedContentQueryBuilder` functions onto the query. `PublishedContentQueryBuilder` functions enable you to filter, sort, and control the results that `queryPublishedContent()` returns.
|
|
15
|
-
*
|
|
16
|
-
* `queryPublishedContent()` runs with the following `PublishedContentQueryBuilder` defaults which you can override:
|
|
17
|
-
*
|
|
18
|
-
* + [`limit(100)`](https://dev.wix.com/docs/sdk/backend-modules/multilingual/translation/translation-published-content/published-content-query-builder/limit)
|
|
19
|
-
* + [`ascending('_id')`](https://dev.wix.com/docs/sdk/backend-modules/multilingual/translation/translation-published-content/published-content-query-builder/ascending)
|
|
20
|
-
*
|
|
21
|
-
* The following query filter fields are required:
|
|
22
|
-
*
|
|
23
|
-
* + `schemaKey.appId`
|
|
24
|
-
* + `schemaKey.entityType`
|
|
25
|
-
* + `schemaKey.scope`
|
|
26
|
-
*
|
|
27
|
-
* The following `PublishedContentQueryBuilder` functions are supported for `queryPublishedContent()`. For a full description of the operations object, see the object returned for the [`items`](https://dev.wix.com/docs/sdk/backend-modules/multilingual/translation/translation-published-content/published-content-query-result/items) property in `PublishedContentQueryResult`.
|
|
28
|
-
*/
|
|
29
|
-
(): PublishedContentQueryBuilder;
|
|
30
|
-
}
|
|
31
5
|
declare const onPublishedContentCreated$1: EventDefinition<PublishedContentCreatedEnvelope, "wix.multilingual.localization_public.v3.published_content_created">;
|
|
32
6
|
declare const onPublishedContentDeleted$1: EventDefinition<PublishedContentDeletedEnvelope, "wix.multilingual.localization_public.v3.published_content_deleted">;
|
|
33
7
|
declare const onPublishedContentUpdated$1: EventDefinition<PublishedContentUpdatedEnvelope, "wix.multilingual.localization_public.v3.published_content_updated">;
|
|
34
8
|
|
|
35
|
-
declare
|
|
9
|
+
declare function customQueryPublishedContent(httpClient: HttpClient): {
|
|
10
|
+
(): PublishedContentQueryBuilder;
|
|
11
|
+
(query: CursorQuery): ReturnType<typeof typedQueryPublishedContent>;
|
|
12
|
+
};
|
|
13
|
+
declare const queryPublishedContent: MaybeContext<BuildRESTFunction<typeof customQueryPublishedContent> & typeof customQueryPublishedContent>;
|
|
36
14
|
/**
|
|
37
15
|
* Triggered when published content is created.
|
|
38
16
|
*/
|
|
@@ -46,4 +24,4 @@ declare const onPublishedContentDeleted: BuildEventDefinition<typeof onPublished
|
|
|
46
24
|
*/
|
|
47
25
|
declare const onPublishedContentUpdated: BuildEventDefinition<typeof onPublishedContentUpdated$1> & typeof onPublishedContentUpdated$1;
|
|
48
26
|
|
|
49
|
-
export { PublishedContentCreatedEnvelope, PublishedContentDeletedEnvelope, PublishedContentQueryBuilder, PublishedContentUpdatedEnvelope, onPublishedContentCreated, onPublishedContentDeleted, onPublishedContentUpdated, queryPublishedContent };
|
|
27
|
+
export { CursorQuery, PublishedContentCreatedEnvelope, PublishedContentDeletedEnvelope, PublishedContentQueryBuilder, PublishedContentUpdatedEnvelope, onPublishedContentCreated, onPublishedContentDeleted, onPublishedContentUpdated, queryPublishedContent };
|
package/build/es/index.mjs
CHANGED
|
@@ -589,6 +589,47 @@ function queryPublishedContent2() {
|
|
|
589
589
|
transformationPaths: {}
|
|
590
590
|
});
|
|
591
591
|
}
|
|
592
|
+
async function typedQueryPublishedContent(query) {
|
|
593
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
594
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ query }, []);
|
|
595
|
+
const reqOpts = queryPublishedContent(
|
|
596
|
+
payload
|
|
597
|
+
);
|
|
598
|
+
sideEffects?.onSiteCall?.();
|
|
599
|
+
try {
|
|
600
|
+
const result = await httpClient.request(reqOpts);
|
|
601
|
+
sideEffects?.onSuccess?.(result);
|
|
602
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
603
|
+
transformPaths2(result.data, [
|
|
604
|
+
{
|
|
605
|
+
transformFn: transformRESTImageToSDKImage,
|
|
606
|
+
paths: [{ path: "publishedContent.fields.image" }]
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
transformFn: transformRESTVideoV2ToSDKVideoV2,
|
|
610
|
+
paths: [{ path: "publishedContent.fields.video" }]
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
transformFn: transformRESTDocumentToSDKDocument,
|
|
614
|
+
paths: [{ path: "publishedContent.fields.document" }]
|
|
615
|
+
}
|
|
616
|
+
]),
|
|
617
|
+
["publishedContent.fields.richContent"]
|
|
618
|
+
);
|
|
619
|
+
} catch (err) {
|
|
620
|
+
const transformedError = sdkTransformError(
|
|
621
|
+
err,
|
|
622
|
+
{
|
|
623
|
+
spreadPathsToArguments: {},
|
|
624
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
625
|
+
singleArgumentUnchanged: false
|
|
626
|
+
},
|
|
627
|
+
["query"]
|
|
628
|
+
);
|
|
629
|
+
sideEffects?.onError?.(err);
|
|
630
|
+
throw transformedError;
|
|
631
|
+
}
|
|
632
|
+
}
|
|
592
633
|
|
|
593
634
|
// src/multilingual-localization-public-v3-published-content-translation-published-contents.public.ts
|
|
594
635
|
function queryPublishedContent3(httpClient) {
|
|
@@ -597,6 +638,13 @@ function queryPublishedContent3(httpClient) {
|
|
|
597
638
|
{ httpClient }
|
|
598
639
|
);
|
|
599
640
|
}
|
|
641
|
+
function typedQueryPublishedContent2(httpClient) {
|
|
642
|
+
return (query) => typedQueryPublishedContent(
|
|
643
|
+
query,
|
|
644
|
+
// @ts-ignore
|
|
645
|
+
{ httpClient }
|
|
646
|
+
);
|
|
647
|
+
}
|
|
600
648
|
var onPublishedContentCreated = EventDefinition(
|
|
601
649
|
"wix.multilingual.localization_public.v3.published_content_created",
|
|
602
650
|
true,
|
|
@@ -841,7 +889,19 @@ var onPublishedContentUpdated = EventDefinition(
|
|
|
841
889
|
// src/multilingual-localization-public-v3-published-content-translation-published-contents.context.ts
|
|
842
890
|
import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
|
|
843
891
|
import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
|
|
844
|
-
|
|
892
|
+
import { createQueryOverloadRouter } from "@wix/sdk-runtime/query-method-router";
|
|
893
|
+
function customQueryPublishedContent(httpClient) {
|
|
894
|
+
const router = createQueryOverloadRouter({
|
|
895
|
+
builderQueryFunction: () => queryPublishedContent3(httpClient)(),
|
|
896
|
+
typedQueryFunction: (query) => typedQueryPublishedContent2(httpClient)(query),
|
|
897
|
+
hasOptionsParameter: false
|
|
898
|
+
});
|
|
899
|
+
function overloadedQuery(query) {
|
|
900
|
+
return router(...arguments);
|
|
901
|
+
}
|
|
902
|
+
return overloadedQuery;
|
|
903
|
+
}
|
|
904
|
+
var queryPublishedContent4 = /* @__PURE__ */ createRESTModule(customQueryPublishedContent);
|
|
845
905
|
var onPublishedContentCreated2 = createEventModule(
|
|
846
906
|
onPublishedContentCreated
|
|
847
907
|
);
|