@wix/auto_sdk_multilingual_translation-published-contents 1.0.39 → 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 +122 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +117 -3
- package/build/cjs/index.typings.js +88 -2
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +110 -3
- package/build/cjs/meta.js +43 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +9 -31
- package/build/es/index.mjs +118 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +117 -3
- package/build/es/index.typings.mjs +82 -1
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +110 -3
- package/build/es/meta.mjs +39 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +9 -31
- package/build/internal/cjs/index.js +122 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +117 -3
- package/build/internal/cjs/index.typings.js +88 -2
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +110 -3
- package/build/internal/cjs/meta.js +43 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +9 -31
- package/build/internal/es/index.mjs +118 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +117 -3
- package/build/internal/es/index.typings.mjs +82 -1
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +110 -3
- package/build/internal/es/meta.mjs +39 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -1,38 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export { ActionEvent, Alignment, AlignmentWithLiterals, AnchorData, AppEmbedData, AppEmbedDataAppDataOneOf, AppType, AppTypeWithLiterals, ApplicationError, AspectRatio, AspectRatioWithLiterals, AudioData, Background, BackgroundBackgroundOneOf, 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 };
|
|
@@ -147,6 +147,12 @@ function queryPublishedContent(payload) {
|
|
|
147
147
|
{
|
|
148
148
|
path: "publishedContent.fields.richContent.nodes.audioData.coverImage.duration"
|
|
149
149
|
},
|
|
150
|
+
{
|
|
151
|
+
path: "publishedContent.fields.richContent.nodes.layoutData.backgroundImage.media.duration"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
path: "publishedContent.fields.richContent.nodes.layoutData.backdropImage.media.duration"
|
|
155
|
+
},
|
|
150
156
|
{ path: "publishedContent.fields.image.focalPoint.x" },
|
|
151
157
|
{ path: "publishedContent.fields.image.focalPoint.y" },
|
|
152
158
|
{
|
|
@@ -480,6 +486,35 @@ var NullValue = /* @__PURE__ */ ((NullValue2) => {
|
|
|
480
486
|
NullValue2["NULL_VALUE"] = "NULL_VALUE";
|
|
481
487
|
return NullValue2;
|
|
482
488
|
})(NullValue || {});
|
|
489
|
+
var Scaling = /* @__PURE__ */ ((Scaling2) => {
|
|
490
|
+
Scaling2["AUTO"] = "AUTO";
|
|
491
|
+
Scaling2["CONTAIN"] = "CONTAIN";
|
|
492
|
+
Scaling2["COVER"] = "COVER";
|
|
493
|
+
return Scaling2;
|
|
494
|
+
})(Scaling || {});
|
|
495
|
+
var ImagePosition = /* @__PURE__ */ ((ImagePosition2) => {
|
|
496
|
+
ImagePosition2["CENTER"] = "CENTER";
|
|
497
|
+
ImagePosition2["CENTER_LEFT"] = "CENTER_LEFT";
|
|
498
|
+
ImagePosition2["CENTER_RIGHT"] = "CENTER_RIGHT";
|
|
499
|
+
ImagePosition2["TOP"] = "TOP";
|
|
500
|
+
ImagePosition2["TOP_LEFT"] = "TOP_LEFT";
|
|
501
|
+
ImagePosition2["TOP_RIGHT"] = "TOP_RIGHT";
|
|
502
|
+
ImagePosition2["BOTTOM"] = "BOTTOM";
|
|
503
|
+
ImagePosition2["BOTTOM_LEFT"] = "BOTTOM_LEFT";
|
|
504
|
+
ImagePosition2["BOTTOM_RIGHT"] = "BOTTOM_RIGHT";
|
|
505
|
+
return ImagePosition2;
|
|
506
|
+
})(ImagePosition || {});
|
|
507
|
+
var VerticalAlignmentAlignment = /* @__PURE__ */ ((VerticalAlignmentAlignment2) => {
|
|
508
|
+
VerticalAlignmentAlignment2["TOP"] = "TOP";
|
|
509
|
+
VerticalAlignmentAlignment2["MIDDLE"] = "MIDDLE";
|
|
510
|
+
VerticalAlignmentAlignment2["BOTTOM"] = "BOTTOM";
|
|
511
|
+
return VerticalAlignmentAlignment2;
|
|
512
|
+
})(VerticalAlignmentAlignment || {});
|
|
513
|
+
var ResponsivenessBehaviour = /* @__PURE__ */ ((ResponsivenessBehaviour2) => {
|
|
514
|
+
ResponsivenessBehaviour2["STACK"] = "STACK";
|
|
515
|
+
ResponsivenessBehaviour2["WRAP"] = "WRAP";
|
|
516
|
+
return ResponsivenessBehaviour2;
|
|
517
|
+
})(ResponsivenessBehaviour || {});
|
|
483
518
|
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
484
519
|
SortOrder2["ASC"] = "ASC";
|
|
485
520
|
SortOrder2["DESC"] = "DESC";
|
|
@@ -554,6 +589,47 @@ function queryPublishedContent2() {
|
|
|
554
589
|
transformationPaths: {}
|
|
555
590
|
});
|
|
556
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
|
+
}
|
|
557
633
|
|
|
558
634
|
// src/multilingual-localization-public-v3-published-content-translation-published-contents.public.ts
|
|
559
635
|
function queryPublishedContent3(httpClient) {
|
|
@@ -562,6 +638,13 @@ function queryPublishedContent3(httpClient) {
|
|
|
562
638
|
{ httpClient }
|
|
563
639
|
);
|
|
564
640
|
}
|
|
641
|
+
function typedQueryPublishedContent2(httpClient) {
|
|
642
|
+
return (query) => typedQueryPublishedContent(
|
|
643
|
+
query,
|
|
644
|
+
// @ts-ignore
|
|
645
|
+
{ httpClient }
|
|
646
|
+
);
|
|
647
|
+
}
|
|
565
648
|
var onPublishedContentCreated = EventDefinition(
|
|
566
649
|
"wix.multilingual.localization_public.v3.published_content_created",
|
|
567
650
|
true,
|
|
@@ -622,6 +705,12 @@ var onPublishedContentCreated = EventDefinition(
|
|
|
622
705
|
},
|
|
623
706
|
{
|
|
624
707
|
path: "entity.fields.richContent.nodes.audioData.coverImage.duration"
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
path: "entity.fields.richContent.nodes.layoutData.backgroundImage.media.duration"
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
path: "entity.fields.richContent.nodes.layoutData.backdropImage.media.duration"
|
|
625
714
|
}
|
|
626
715
|
]
|
|
627
716
|
},
|
|
@@ -696,6 +785,12 @@ var onPublishedContentDeleted = EventDefinition(
|
|
|
696
785
|
},
|
|
697
786
|
{
|
|
698
787
|
path: "entity.fields.richContent.nodes.audioData.coverImage.duration"
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
path: "entity.fields.richContent.nodes.layoutData.backgroundImage.media.duration"
|
|
791
|
+
},
|
|
792
|
+
{
|
|
793
|
+
path: "entity.fields.richContent.nodes.layoutData.backdropImage.media.duration"
|
|
699
794
|
}
|
|
700
795
|
]
|
|
701
796
|
},
|
|
@@ -770,6 +865,12 @@ var onPublishedContentUpdated = EventDefinition(
|
|
|
770
865
|
},
|
|
771
866
|
{
|
|
772
867
|
path: "entity.fields.richContent.nodes.audioData.coverImage.duration"
|
|
868
|
+
},
|
|
869
|
+
{
|
|
870
|
+
path: "entity.fields.richContent.nodes.layoutData.backgroundImage.media.duration"
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
path: "entity.fields.richContent.nodes.layoutData.backdropImage.media.duration"
|
|
773
874
|
}
|
|
774
875
|
]
|
|
775
876
|
},
|
|
@@ -788,7 +889,19 @@ var onPublishedContentUpdated = EventDefinition(
|
|
|
788
889
|
// src/multilingual-localization-public-v3-published-content-translation-published-contents.context.ts
|
|
789
890
|
import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
|
|
790
891
|
import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
|
|
791
|
-
|
|
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);
|
|
792
905
|
var onPublishedContentCreated2 = createEventModule(
|
|
793
906
|
onPublishedContentCreated
|
|
794
907
|
);
|
|
@@ -810,6 +923,7 @@ export {
|
|
|
810
923
|
DividerDataAlignment,
|
|
811
924
|
FontType,
|
|
812
925
|
GIFType,
|
|
926
|
+
ImagePosition,
|
|
813
927
|
InitialExpandedItems,
|
|
814
928
|
Layout,
|
|
815
929
|
LayoutType,
|
|
@@ -824,6 +938,8 @@ export {
|
|
|
824
938
|
PollLayoutType,
|
|
825
939
|
Position,
|
|
826
940
|
Resizing,
|
|
941
|
+
ResponsivenessBehaviour,
|
|
942
|
+
Scaling,
|
|
827
943
|
SchemaScope,
|
|
828
944
|
SortOrder,
|
|
829
945
|
Source,
|
|
@@ -833,6 +949,7 @@ export {
|
|
|
833
949
|
ThumbnailsAlignment,
|
|
834
950
|
Type,
|
|
835
951
|
VerticalAlignment,
|
|
952
|
+
VerticalAlignmentAlignment,
|
|
836
953
|
ViewMode,
|
|
837
954
|
ViewRole,
|
|
838
955
|
VoteRole,
|