@wix/auto_sdk_blog_draft-posts 1.0.53 → 1.0.55

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.
@@ -3832,6 +3832,12 @@ interface DraftPostsQueryBuilder {
3832
3832
  skipTo: (cursor: string) => DraftPostsQueryBuilder;
3833
3833
  find: () => Promise<DraftPostsQueryResult>;
3834
3834
  }
3835
+ /**
3836
+ * @hidden
3837
+ * @fqn com.wixpress.npm.communities.platformized.blog.v3.DraftPostService.QueryDraftPosts
3838
+ * @requiredField query
3839
+ */
3840
+ declare function typedQueryDraftPosts(query: PlatformQuery, options?: QueryDraftPostsOptions): Promise<NonNullablePaths<QueryDraftPostsResponse, `draftPosts` | `draftPosts.${number}._id` | `draftPosts.${number}.title` | `draftPosts.${number}.minutesToRead` | `draftPosts.${number}.status` | `draftPosts.${number}.moderationDetails.submittedBy` | `draftPosts.${number}.moderationDetails.status` | `draftPosts.${number}.hasUnpublishedChanges` | `draftPosts.${number}.seoData.settings.preventAutoRedirect` | `draftPosts.${number}.media.displayed` | `draftPosts.${number}.media.custom`, 6>>;
3835
3841
  /**
3836
3842
  * Publishes a draft post by ID. This creates a new [post](https://dev.wix.com/docs/rest/business-solutions/blog/posts-stats/post-object)
3837
3843
  * with the data from the draft post.
@@ -3847,4 +3853,4 @@ interface DraftPostsQueryBuilder {
3847
3853
  */
3848
3854
  declare function publishDraftPost(draftPostId: string): Promise<NonNullablePaths<PublishDraftPostResponse, `postId`, 2>>;
3849
3855
 
3850
- export { Action, type ActionEvent, type ActionWithLiterals, Alignment, type AlignmentWithLiterals, type AnchorData, type AppEmbedData, type AppEmbedDataAppDataOneOf, AppType, type AppTypeWithLiterals, type ApplicationError, type ApproveDraftPostRequest, type ApproveDraftPostResponse, AspectRatio, type AspectRatioWithLiterals, type AudioData, type Background, type BackgroundBackgroundOneOf, type BackgroundImage, BackgroundType, type BackgroundTypeWithLiterals, type BaseEventMetadata, type BlockquoteData, type BlogPaging, type BookingData, type Border, type BorderColors, type BulkActionMetadata, type BulkCreateDraftPostsOptions, type BulkCreateDraftPostsRequest, type BulkCreateDraftPostsResponse, type BulkDeleteDraftPostsOptions, type BulkDeleteDraftPostsRequest, type BulkDeleteDraftPostsResponse, type BulkDraftPostResult, type BulkRejectDraftPostRequest, type BulkRejectDraftPostResponse, type BulkRevertToUnpublishedRequest, type BulkRevertToUnpublishedResponse, type BulkUpdateDraftPostsOptions, type BulkUpdateDraftPostsRequest, type BulkUpdateDraftPostsResponse, type BulletedListData, type ButtonData, ButtonDataType, type ButtonDataTypeWithLiterals, type ButtonStyles, type CaptionData, type CardStyles, CardStylesType, type CardStylesTypeWithLiterals, type CellStyle, type CodeBlockData, type CollapsibleListData, type ColorData, type Colors, type CreateDraftPostOptions, type CreateDraftPostRequest, type CreateDraftPostResponse, Crop, type CropWithLiterals, type CursorPaging, type Cursors, type Decoration, type DecorationDataOneOf, DecorationType, type DecorationTypeWithLiterals, type DeleteDraftPostOptions, type DeleteDraftPostRequest, type DeleteDraftPostResponse, type Design, type Dimensions, Direction, type DirectionWithLiterals, type DividerData, DividerDataAlignment, type DividerDataAlignmentWithLiterals, type DocumentStyle, type DomainEvent, type DomainEventBodyOneOf, type DraftCategoriesUpdated, type DraftCreatedEnvelope, type DraftDeletedEnvelope, type DraftPost, type DraftPostOwnerChanged, type DraftPostTranslation, type DraftPostsQueryBuilder, type DraftPostsQueryResult, type DraftTagsUpdated, type DraftUpdatedEnvelope, type EmbedData, type EmbedMedia, type EmbedThumbnail, type EmbedVideo, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventData, type EventMetadata, Field, type FieldWithLiterals, type FileData, type FileSource, type FileSourceDataOneOf, type FocalPoint, type FontSizeData, FontType, type FontTypeWithLiterals, type GIF, type GIFData, GIFType, type GIFTypeWithLiterals, type GalleryData, type GalleryOptions, type GalleryOptionsLayout, type GetDeletedDraftPostRequest, type GetDeletedDraftPostResponse, type GetDraftPostOptions, type GetDraftPostRequest, type GetDraftPostResponse, type GetDraftPostTotalsRequest, type GetDraftPostTotalsResponse, GetDraftPostsSort, type GetDraftPostsSortWithLiterals, type Gradient, type HTMLData, type HTMLDataDataOneOf, type HeadingData, type Height, type IdentificationData, type IdentificationDataIdOneOf, type Image, type ImageData, type ImageDataStyles, ImagePosition, type ImagePositionWithLiterals, type ImageStyles, type InitialDraftPostsCopied, InitialExpandedItems, type InitialExpandedItemsWithLiterals, type IsDraftPostAutoTranslatableRequest, type IsDraftPostAutoTranslatableResponse, type Item, type ItemDataOneOf, type ItemMetadata, type ItemStyle, type Keyword, Layout, type LayoutCellData, type LayoutData, LayoutType, type LayoutTypeWithLiterals, type LayoutWithLiterals, LineStyle, type LineStyleWithLiterals, type Link, type LinkData, type LinkDataOneOf, type LinkPreviewData, type LinkPreviewDataStyles, type ListDeletedDraftPostsOptions, type ListDeletedDraftPostsRequest, type ListDeletedDraftPostsResponse, type ListDraftPostsOptions, type ListDraftPostsRequest, type ListDraftPostsResponse, type ListValue, type MapData, type MapSettings, MapType, type MapTypeWithLiterals, type MarkPostAsInModerationRequest, type MarkPostAsInModerationResponse, type MaskedDraftPosts, type Media, type MediaMediaOneOf, type MentionData, type MessageEnvelope, type MetaData, type Metadata, type ModerationDetails, ModerationStatusStatus, type ModerationStatusStatusWithLiterals, type Node, type NodeDataOneOf, type NodeStyle, NodeType, type NodeTypeWithLiterals, NullValue, type NullValueWithLiterals, type Oembed, type Option, type OptionDesign, type OptionLayout, type OrderedListData, Orientation, type OrientationWithLiterals, Origin, type OriginWithLiterals, type PDFSettings, type Paging, type PagingMetadataV2, type ParagraphData, type Permissions, Placement, type PlacementWithLiterals, type PlatformQuery, type PlatformQueryPagingMethodOneOf, type PlaybackOptions, type PluginContainerData, PluginContainerDataAlignment, type PluginContainerDataAlignmentWithLiterals, type PluginContainerDataWidth, type PluginContainerDataWidthDataOneOf, type Poll, type PollData, type PollDataLayout, type PollDesign, type PollLayout, PollLayoutDirection, type PollLayoutDirectionWithLiterals, PollLayoutType, type PollLayoutTypeWithLiterals, type PollSettings, Position, type PositionWithLiterals, type PricingData, type PublishDraftPostRequest, type PublishDraftPostResponse, type QueryDraftPostsOptions, type QueryDraftPostsRequest, type QueryDraftPostsResponse, type RejectDraftPostRequest, type RejectDraftPostResponse, type Rel, type RemoveFromTrashBinRequest, type RemoveFromTrashBinResponse, Resizing, type ResizingWithLiterals, ResponsivenessBehaviour, type ResponsivenessBehaviourWithLiterals, type RestoreFromTrashBinRequest, type RestoreFromTrashBinResponse, type RestoreInfo, type RevertToUnpublishedRequest, type RevertToUnpublishedResponse, type RibbonStyles, type RichContent, Scaling, type ScalingWithLiterals, type SeoSchema, type Settings, SortOrder, type SortOrderWithLiterals, type Sorting, Source, type SourceWithLiterals, type Spoiler, type SpoilerData, Status, type StatusWithLiterals, type Styles, type StylesBorder, StylesPosition, type StylesPositionWithLiterals, type TableCellData, type TableData, type Tag, Target, type TargetWithLiterals, TextAlignment, type TextAlignmentWithLiterals, type TextData, type TextNodeStyle, type TextStyle, type Thumbnails, ThumbnailsAlignment, type ThumbnailsAlignmentWithLiterals, type TotalDraftPosts, TotalDraftPostsGroupingField, type TotalDraftPostsGroupingFieldWithLiterals, type TranslateDraftRequest, type TranslateDraftResponse, Type, type TypeWithLiterals, type UnpublishPostRequest, type UnpublishPostResponse, type UpdateDraftPost, type UpdateDraftPostContentRequest, type UpdateDraftPostContentResponse, type UpdateDraftPostLanguageRequest, type UpdateDraftPostLanguageResponse, type UpdateDraftPostOptions, type UpdateDraftPostRequest, type UpdateDraftPostResponse, type V1Media, VerticalAlignment, VerticalAlignmentAlignment, type VerticalAlignmentAlignmentWithLiterals, type VerticalAlignmentWithLiterals, type Video, type VideoData, type VideoResolution, ViewMode, type ViewModeWithLiterals, ViewRole, type ViewRoleWithLiterals, VoteRole, type VoteRoleWithLiterals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, Width, WidthType, type WidthTypeWithLiterals, type WidthWithLiterals, type WixMedia, bulkCreateDraftPosts, bulkDeleteDraftPosts, bulkUpdateDraftPosts, createDraftPost, deleteDraftPost, getDeletedDraftPost, getDraftPost, listDeletedDraftPosts, listDraftPosts, onDraftCreated, onDraftDeleted, onDraftUpdated, publishDraftPost, queryDraftPosts, removeFromTrashBin, restoreFromTrashBin, updateDraftPost };
3856
+ export { Action, type ActionEvent, type ActionWithLiterals, Alignment, type AlignmentWithLiterals, type AnchorData, type AppEmbedData, type AppEmbedDataAppDataOneOf, AppType, type AppTypeWithLiterals, type ApplicationError, type ApproveDraftPostRequest, type ApproveDraftPostResponse, AspectRatio, type AspectRatioWithLiterals, type AudioData, type Background, type BackgroundBackgroundOneOf, type BackgroundImage, BackgroundType, type BackgroundTypeWithLiterals, type BaseEventMetadata, type BlockquoteData, type BlogPaging, type BookingData, type Border, type BorderColors, type BulkActionMetadata, type BulkCreateDraftPostsOptions, type BulkCreateDraftPostsRequest, type BulkCreateDraftPostsResponse, type BulkDeleteDraftPostsOptions, type BulkDeleteDraftPostsRequest, type BulkDeleteDraftPostsResponse, type BulkDraftPostResult, type BulkRejectDraftPostRequest, type BulkRejectDraftPostResponse, type BulkRevertToUnpublishedRequest, type BulkRevertToUnpublishedResponse, type BulkUpdateDraftPostsOptions, type BulkUpdateDraftPostsRequest, type BulkUpdateDraftPostsResponse, type BulletedListData, type ButtonData, ButtonDataType, type ButtonDataTypeWithLiterals, type ButtonStyles, type CaptionData, type CardStyles, CardStylesType, type CardStylesTypeWithLiterals, type CellStyle, type CodeBlockData, type CollapsibleListData, type ColorData, type Colors, type CreateDraftPostOptions, type CreateDraftPostRequest, type CreateDraftPostResponse, Crop, type CropWithLiterals, type CursorPaging, type Cursors, type Decoration, type DecorationDataOneOf, DecorationType, type DecorationTypeWithLiterals, type DeleteDraftPostOptions, type DeleteDraftPostRequest, type DeleteDraftPostResponse, type Design, type Dimensions, Direction, type DirectionWithLiterals, type DividerData, DividerDataAlignment, type DividerDataAlignmentWithLiterals, type DocumentStyle, type DomainEvent, type DomainEventBodyOneOf, type DraftCategoriesUpdated, type DraftCreatedEnvelope, type DraftDeletedEnvelope, type DraftPost, type DraftPostOwnerChanged, type DraftPostTranslation, type DraftPostsQueryBuilder, type DraftPostsQueryResult, type DraftTagsUpdated, type DraftUpdatedEnvelope, type EmbedData, type EmbedMedia, type EmbedThumbnail, type EmbedVideo, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventData, type EventMetadata, Field, type FieldWithLiterals, type FileData, type FileSource, type FileSourceDataOneOf, type FocalPoint, type FontSizeData, FontType, type FontTypeWithLiterals, type GIF, type GIFData, GIFType, type GIFTypeWithLiterals, type GalleryData, type GalleryOptions, type GalleryOptionsLayout, type GetDeletedDraftPostRequest, type GetDeletedDraftPostResponse, type GetDraftPostOptions, type GetDraftPostRequest, type GetDraftPostResponse, type GetDraftPostTotalsRequest, type GetDraftPostTotalsResponse, GetDraftPostsSort, type GetDraftPostsSortWithLiterals, type Gradient, type HTMLData, type HTMLDataDataOneOf, type HeadingData, type Height, type IdentificationData, type IdentificationDataIdOneOf, type Image, type ImageData, type ImageDataStyles, ImagePosition, type ImagePositionWithLiterals, type ImageStyles, type InitialDraftPostsCopied, InitialExpandedItems, type InitialExpandedItemsWithLiterals, type IsDraftPostAutoTranslatableRequest, type IsDraftPostAutoTranslatableResponse, type Item, type ItemDataOneOf, type ItemMetadata, type ItemStyle, type Keyword, Layout, type LayoutCellData, type LayoutData, LayoutType, type LayoutTypeWithLiterals, type LayoutWithLiterals, LineStyle, type LineStyleWithLiterals, type Link, type LinkData, type LinkDataOneOf, type LinkPreviewData, type LinkPreviewDataStyles, type ListDeletedDraftPostsOptions, type ListDeletedDraftPostsRequest, type ListDeletedDraftPostsResponse, type ListDraftPostsOptions, type ListDraftPostsRequest, type ListDraftPostsResponse, type ListValue, type MapData, type MapSettings, MapType, type MapTypeWithLiterals, type MarkPostAsInModerationRequest, type MarkPostAsInModerationResponse, type MaskedDraftPosts, type Media, type MediaMediaOneOf, type MentionData, type MessageEnvelope, type MetaData, type Metadata, type ModerationDetails, ModerationStatusStatus, type ModerationStatusStatusWithLiterals, type Node, type NodeDataOneOf, type NodeStyle, NodeType, type NodeTypeWithLiterals, NullValue, type NullValueWithLiterals, type Oembed, type Option, type OptionDesign, type OptionLayout, type OrderedListData, Orientation, type OrientationWithLiterals, Origin, type OriginWithLiterals, type PDFSettings, type Paging, type PagingMetadataV2, type ParagraphData, type Permissions, Placement, type PlacementWithLiterals, type PlatformQuery, type PlatformQueryPagingMethodOneOf, type PlaybackOptions, type PluginContainerData, PluginContainerDataAlignment, type PluginContainerDataAlignmentWithLiterals, type PluginContainerDataWidth, type PluginContainerDataWidthDataOneOf, type Poll, type PollData, type PollDataLayout, type PollDesign, type PollLayout, PollLayoutDirection, type PollLayoutDirectionWithLiterals, PollLayoutType, type PollLayoutTypeWithLiterals, type PollSettings, Position, type PositionWithLiterals, type PricingData, type PublishDraftPostRequest, type PublishDraftPostResponse, type QueryDraftPostsOptions, type QueryDraftPostsRequest, type QueryDraftPostsResponse, type RejectDraftPostRequest, type RejectDraftPostResponse, type Rel, type RemoveFromTrashBinRequest, type RemoveFromTrashBinResponse, Resizing, type ResizingWithLiterals, ResponsivenessBehaviour, type ResponsivenessBehaviourWithLiterals, type RestoreFromTrashBinRequest, type RestoreFromTrashBinResponse, type RestoreInfo, type RevertToUnpublishedRequest, type RevertToUnpublishedResponse, type RibbonStyles, type RichContent, Scaling, type ScalingWithLiterals, type SeoSchema, type Settings, SortOrder, type SortOrderWithLiterals, type Sorting, Source, type SourceWithLiterals, type Spoiler, type SpoilerData, Status, type StatusWithLiterals, type Styles, type StylesBorder, StylesPosition, type StylesPositionWithLiterals, type TableCellData, type TableData, type Tag, Target, type TargetWithLiterals, TextAlignment, type TextAlignmentWithLiterals, type TextData, type TextNodeStyle, type TextStyle, type Thumbnails, ThumbnailsAlignment, type ThumbnailsAlignmentWithLiterals, type TotalDraftPosts, TotalDraftPostsGroupingField, type TotalDraftPostsGroupingFieldWithLiterals, type TranslateDraftRequest, type TranslateDraftResponse, Type, type TypeWithLiterals, type UnpublishPostRequest, type UnpublishPostResponse, type UpdateDraftPost, type UpdateDraftPostContentRequest, type UpdateDraftPostContentResponse, type UpdateDraftPostLanguageRequest, type UpdateDraftPostLanguageResponse, type UpdateDraftPostOptions, type UpdateDraftPostRequest, type UpdateDraftPostResponse, type V1Media, VerticalAlignment, VerticalAlignmentAlignment, type VerticalAlignmentAlignmentWithLiterals, type VerticalAlignmentWithLiterals, type Video, type VideoData, type VideoResolution, ViewMode, type ViewModeWithLiterals, ViewRole, type ViewRoleWithLiterals, VoteRole, type VoteRoleWithLiterals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, Width, WidthType, type WidthTypeWithLiterals, type WidthWithLiterals, type WixMedia, bulkCreateDraftPosts, bulkDeleteDraftPosts, bulkUpdateDraftPosts, createDraftPost, deleteDraftPost, getDeletedDraftPost, getDraftPost, listDeletedDraftPosts, listDraftPosts, onDraftCreated, onDraftDeleted, onDraftUpdated, publishDraftPost, queryDraftPosts, removeFromTrashBin, restoreFromTrashBin, typedQueryDraftPosts, updateDraftPost };
@@ -84,6 +84,7 @@ __export(index_typings_exports, {
84
84
  queryDraftPosts: () => queryDraftPosts2,
85
85
  removeFromTrashBin: () => removeFromTrashBin2,
86
86
  restoreFromTrashBin: () => restoreFromTrashBin2,
87
+ typedQueryDraftPosts: () => typedQueryDraftPosts,
87
88
  updateDraftPost: () => updateDraftPost2
88
89
  });
89
90
  module.exports = __toCommonJS(index_typings_exports);
@@ -3022,6 +3023,54 @@ function queryDraftPosts2(options) {
3022
3023
  transformationPaths: {}
3023
3024
  });
3024
3025
  }
3026
+ async function typedQueryDraftPosts(query, options) {
3027
+ const { httpClient, sideEffects } = arguments[2];
3028
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)(
3029
+ { query, ...options },
3030
+ []
3031
+ );
3032
+ const reqOpts = queryDraftPosts(payload);
3033
+ sideEffects?.onSiteCall?.();
3034
+ try {
3035
+ const result = await httpClient.request(reqOpts);
3036
+ sideEffects?.onSuccess?.(result);
3037
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
3038
+ (0, import_transform_paths2.transformPaths)(result.data, [
3039
+ {
3040
+ transformFn: import_image2.transformRESTImageToSDKImage,
3041
+ paths: [
3042
+ { path: "draftPosts.heroImage" },
3043
+ { path: "draftPosts.media.wixMedia.image" }
3044
+ ]
3045
+ },
3046
+ {
3047
+ transformFn: import_page_url2.transformRESTPageURLToSDKPageURL,
3048
+ paths: [
3049
+ { path: "draftPosts.url" },
3050
+ { path: "draftPosts.translations.url" }
3051
+ ]
3052
+ },
3053
+ {
3054
+ transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
3055
+ paths: [{ path: "draftPosts.media.wixMedia.videoV2" }]
3056
+ }
3057
+ ]),
3058
+ ["draftPosts.richContent"]
3059
+ );
3060
+ } catch (err) {
3061
+ const transformedError = (0, import_transform_error.transformError)(
3062
+ err,
3063
+ {
3064
+ spreadPathsToArguments: {},
3065
+ explicitPathsToArguments: { query: "$[0]" },
3066
+ singleArgumentUnchanged: false
3067
+ },
3068
+ ["query", "options"]
3069
+ );
3070
+ sideEffects?.onError?.(err);
3071
+ throw transformedError;
3072
+ }
3073
+ }
3025
3074
  async function publishDraftPost2(draftPostId) {
3026
3075
  const { httpClient, sideEffects } = arguments[1];
3027
3076
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)(
@@ -3114,6 +3163,7 @@ async function publishDraftPost2(draftPostId) {
3114
3163
  queryDraftPosts,
3115
3164
  removeFromTrashBin,
3116
3165
  restoreFromTrashBin,
3166
+ typedQueryDraftPosts,
3117
3167
  updateDraftPost
3118
3168
  });
3119
3169
  //# sourceMappingURL=index.typings.js.map