@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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +9 -31
  2. package/build/cjs/index.js +62 -1
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +45 -3
  5. package/build/cjs/index.typings.js +46 -2
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +38 -3
  8. package/build/cjs/meta.js +1 -0
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +9 -31
  11. package/build/es/index.mjs +62 -1
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +45 -3
  14. package/build/es/index.typings.mjs +44 -1
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +38 -3
  17. package/build/es/meta.mjs +1 -0
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +9 -31
  20. package/build/internal/cjs/index.js +62 -1
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +45 -3
  23. package/build/internal/cjs/index.typings.js +46 -2
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +38 -3
  26. package/build/internal/cjs/meta.js +1 -0
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +9 -31
  29. package/build/internal/es/index.mjs +62 -1
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +45 -3
  32. package/build/internal/es/index.typings.mjs +44 -1
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +38 -3
  35. package/build/internal/es/meta.mjs +1 -0
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +3 -3
@@ -1,38 +1,16 @@
1
- import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
- import { PublishedContentQueryBuilder, PublishedContentCreatedEnvelope, PublishedContentDeletedEnvelope, PublishedContentUpdatedEnvelope } 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, CursorQuery, 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';
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, 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.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 const queryPublishedContent: MaybeContext<BuildRESTFunction<typeof queryPublishedContent$1> & typeof queryPublishedContent$1>;
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 };
@@ -415,6 +415,7 @@ var DecorationType = /* @__PURE__ */ ((DecorationType2) => {
415
415
  DecorationType2["STRIKETHROUGH"] = "STRIKETHROUGH";
416
416
  DecorationType2["SUPERSCRIPT"] = "SUPERSCRIPT";
417
417
  DecorationType2["SUBSCRIPT"] = "SUBSCRIPT";
418
+ DecorationType2["FONT_FAMILY"] = "FONT_FAMILY";
418
419
  return DecorationType2;
419
420
  })(DecorationType || {});
420
421
  var FontType = /* @__PURE__ */ ((FontType2) => {
@@ -589,6 +590,47 @@ function queryPublishedContent2() {
589
590
  transformationPaths: {}
590
591
  });
591
592
  }
593
+ async function typedQueryPublishedContent(query) {
594
+ const { httpClient, sideEffects } = arguments[1];
595
+ const payload = renameKeysFromSDKRequestToRESTRequest({ query }, []);
596
+ const reqOpts = queryPublishedContent(
597
+ payload
598
+ );
599
+ sideEffects?.onSiteCall?.();
600
+ try {
601
+ const result = await httpClient.request(reqOpts);
602
+ sideEffects?.onSuccess?.(result);
603
+ return renameKeysFromRESTResponseToSDKResponse(
604
+ transformPaths2(result.data, [
605
+ {
606
+ transformFn: transformRESTImageToSDKImage,
607
+ paths: [{ path: "publishedContent.fields.image" }]
608
+ },
609
+ {
610
+ transformFn: transformRESTVideoV2ToSDKVideoV2,
611
+ paths: [{ path: "publishedContent.fields.video" }]
612
+ },
613
+ {
614
+ transformFn: transformRESTDocumentToSDKDocument,
615
+ paths: [{ path: "publishedContent.fields.document" }]
616
+ }
617
+ ]),
618
+ ["publishedContent.fields.richContent"]
619
+ );
620
+ } catch (err) {
621
+ const transformedError = sdkTransformError(
622
+ err,
623
+ {
624
+ spreadPathsToArguments: {},
625
+ explicitPathsToArguments: { query: "$[0]" },
626
+ singleArgumentUnchanged: false
627
+ },
628
+ ["query"]
629
+ );
630
+ sideEffects?.onError?.(err);
631
+ throw transformedError;
632
+ }
633
+ }
592
634
 
593
635
  // src/multilingual-localization-public-v3-published-content-translation-published-contents.public.ts
594
636
  function queryPublishedContent3(httpClient) {
@@ -597,6 +639,13 @@ function queryPublishedContent3(httpClient) {
597
639
  { httpClient }
598
640
  );
599
641
  }
642
+ function typedQueryPublishedContent2(httpClient) {
643
+ return (query) => typedQueryPublishedContent(
644
+ query,
645
+ // @ts-ignore
646
+ { httpClient }
647
+ );
648
+ }
600
649
  var onPublishedContentCreated = EventDefinition(
601
650
  "wix.multilingual.localization_public.v3.published_content_created",
602
651
  true,
@@ -841,7 +890,19 @@ var onPublishedContentUpdated = EventDefinition(
841
890
  // src/multilingual-localization-public-v3-published-content-translation-published-contents.context.ts
842
891
  import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
843
892
  import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
844
- var queryPublishedContent4 = /* @__PURE__ */ createRESTModule(queryPublishedContent3);
893
+ import { createQueryOverloadRouter } from "@wix/sdk-runtime/query-method-router";
894
+ function customQueryPublishedContent(httpClient) {
895
+ const router = createQueryOverloadRouter({
896
+ builderQueryFunction: () => queryPublishedContent3(httpClient)(),
897
+ typedQueryFunction: (query) => typedQueryPublishedContent2(httpClient)(query),
898
+ hasOptionsParameter: false
899
+ });
900
+ function overloadedQuery(query) {
901
+ return router(...arguments);
902
+ }
903
+ return overloadedQuery;
904
+ }
905
+ var queryPublishedContent4 = /* @__PURE__ */ createRESTModule(customQueryPublishedContent);
845
906
  var onPublishedContentCreated2 = createEventModule(
846
907
  onPublishedContentCreated
847
908
  );