@wix/auto_sdk_multilingual_translation-published-contents 1.0.40 → 1.0.42
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 +62 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +45 -3
- package/build/cjs/index.typings.js +46 -2
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +38 -3
- package/build/cjs/meta.js +1 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +9 -31
- package/build/es/index.mjs +62 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +45 -3
- package/build/es/index.typings.mjs +44 -1
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +38 -3
- package/build/es/meta.mjs +1 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +9 -31
- package/build/internal/cjs/index.js +62 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +45 -3
- package/build/internal/cjs/index.typings.js +46 -2
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +38 -3
- package/build/internal/cjs/meta.js +1 -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 +62 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +45 -3
- package/build/internal/es/index.typings.mjs +44 -1
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +38 -3
- package/build/internal/es/meta.mjs +1 -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, 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.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, BorderWidths, 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, FontFamilyData, 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.js';
|
|
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 };
|
|
@@ -485,6 +485,7 @@ var DecorationType = /* @__PURE__ */ ((DecorationType2) => {
|
|
|
485
485
|
DecorationType2["STRIKETHROUGH"] = "STRIKETHROUGH";
|
|
486
486
|
DecorationType2["SUPERSCRIPT"] = "SUPERSCRIPT";
|
|
487
487
|
DecorationType2["SUBSCRIPT"] = "SUBSCRIPT";
|
|
488
|
+
DecorationType2["FONT_FAMILY"] = "FONT_FAMILY";
|
|
488
489
|
return DecorationType2;
|
|
489
490
|
})(DecorationType || {});
|
|
490
491
|
var FontType = /* @__PURE__ */ ((FontType2) => {
|
|
@@ -659,6 +660,47 @@ function queryPublishedContent2() {
|
|
|
659
660
|
transformationPaths: {}
|
|
660
661
|
});
|
|
661
662
|
}
|
|
663
|
+
async function typedQueryPublishedContent(query) {
|
|
664
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
665
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ query }, []);
|
|
666
|
+
const reqOpts = queryPublishedContent(
|
|
667
|
+
payload
|
|
668
|
+
);
|
|
669
|
+
sideEffects?.onSiteCall?.();
|
|
670
|
+
try {
|
|
671
|
+
const result = await httpClient.request(reqOpts);
|
|
672
|
+
sideEffects?.onSuccess?.(result);
|
|
673
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
|
|
674
|
+
(0, import_transform_paths2.transformPaths)(result.data, [
|
|
675
|
+
{
|
|
676
|
+
transformFn: import_image.transformRESTImageToSDKImage,
|
|
677
|
+
paths: [{ path: "publishedContent.fields.image" }]
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
transformFn: import_video_v2.transformRESTVideoV2ToSDKVideoV2,
|
|
681
|
+
paths: [{ path: "publishedContent.fields.video" }]
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
transformFn: import_document.transformRESTDocumentToSDKDocument,
|
|
685
|
+
paths: [{ path: "publishedContent.fields.document" }]
|
|
686
|
+
}
|
|
687
|
+
]),
|
|
688
|
+
["publishedContent.fields.richContent"]
|
|
689
|
+
);
|
|
690
|
+
} catch (err) {
|
|
691
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
692
|
+
err,
|
|
693
|
+
{
|
|
694
|
+
spreadPathsToArguments: {},
|
|
695
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
696
|
+
singleArgumentUnchanged: false
|
|
697
|
+
},
|
|
698
|
+
["query"]
|
|
699
|
+
);
|
|
700
|
+
sideEffects?.onError?.(err);
|
|
701
|
+
throw transformedError;
|
|
702
|
+
}
|
|
703
|
+
}
|
|
662
704
|
|
|
663
705
|
// src/multilingual-localization-public-v3-published-content-translation-published-contents.public.ts
|
|
664
706
|
function queryPublishedContent3(httpClient) {
|
|
@@ -667,6 +709,13 @@ function queryPublishedContent3(httpClient) {
|
|
|
667
709
|
{ httpClient }
|
|
668
710
|
);
|
|
669
711
|
}
|
|
712
|
+
function typedQueryPublishedContent2(httpClient) {
|
|
713
|
+
return (query) => typedQueryPublishedContent(
|
|
714
|
+
query,
|
|
715
|
+
// @ts-ignore
|
|
716
|
+
{ httpClient }
|
|
717
|
+
);
|
|
718
|
+
}
|
|
670
719
|
var onPublishedContentCreated = (0, import_sdk_types.EventDefinition)(
|
|
671
720
|
"wix.multilingual.localization_public.v3.published_content_created",
|
|
672
721
|
true,
|
|
@@ -911,7 +960,19 @@ var onPublishedContentUpdated = (0, import_sdk_types.EventDefinition)(
|
|
|
911
960
|
// src/multilingual-localization-public-v3-published-content-translation-published-contents.context.ts
|
|
912
961
|
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
913
962
|
var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
|
|
914
|
-
var
|
|
963
|
+
var import_query_method_router = require("@wix/sdk-runtime/query-method-router");
|
|
964
|
+
function customQueryPublishedContent(httpClient) {
|
|
965
|
+
const router = (0, import_query_method_router.createQueryOverloadRouter)({
|
|
966
|
+
builderQueryFunction: () => queryPublishedContent3(httpClient)(),
|
|
967
|
+
typedQueryFunction: (query) => typedQueryPublishedContent2(httpClient)(query),
|
|
968
|
+
hasOptionsParameter: false
|
|
969
|
+
});
|
|
970
|
+
function overloadedQuery(query) {
|
|
971
|
+
return router(...arguments);
|
|
972
|
+
}
|
|
973
|
+
return overloadedQuery;
|
|
974
|
+
}
|
|
975
|
+
var queryPublishedContent4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryPublishedContent);
|
|
915
976
|
var onPublishedContentCreated2 = (0, import_event_definition_modules.createEventModule)(
|
|
916
977
|
onPublishedContentCreated
|
|
917
978
|
);
|