@wix/auto_sdk_blog_draft-posts 1.0.52 → 1.0.54

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.
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
- import { DraftPost, CreateDraftPostOptions, CreateDraftPostResponse, BulkCreateDraftPostsOptions, BulkCreateDraftPostsResponse, BulkUpdateDraftPostsOptions, BulkUpdateDraftPostsResponse, ListDeletedDraftPostsOptions, ListDeletedDraftPostsResponse, GetDraftPostOptions, GetDraftPostResponse, UpdateDraftPost, UpdateDraftPostOptions, UpdateDraftPostResponse, DeleteDraftPostOptions, BulkDeleteDraftPostsOptions, BulkDeleteDraftPostsResponse, ListDraftPostsOptions, ListDraftPostsResponse, GetDeletedDraftPostResponse, RestoreFromTrashBinResponse, QueryDraftPostsOptions, DraftPostsQueryBuilder, PublishDraftPostResponse, DraftCreatedEnvelope, DraftDeletedEnvelope, DraftUpdatedEnvelope } from './index.typings.js';
3
- export { Action, ActionEvent, ActionWithLiterals, Alignment, AlignmentWithLiterals, AnchorData, AppEmbedData, AppEmbedDataAppDataOneOf, AppType, AppTypeWithLiterals, ApplicationError, ApproveDraftPostRequest, ApproveDraftPostResponse, AspectRatio, AspectRatioWithLiterals, AudioData, Background, BackgroundBackgroundOneOf, BackgroundImage, BackgroundType, BackgroundTypeWithLiterals, BaseEventMetadata, BlockquoteData, BlogPaging, BookingData, Border, BorderColors, BulkActionMetadata, BulkCreateDraftPostsRequest, BulkDeleteDraftPostsRequest, BulkDraftPostResult, BulkRejectDraftPostRequest, BulkRejectDraftPostResponse, BulkRevertToUnpublishedRequest, BulkRevertToUnpublishedResponse, BulkUpdateDraftPostsRequest, BulletedListData, ButtonData, ButtonDataType, ButtonDataTypeWithLiterals, ButtonStyles, CaptionData, CardStyles, CardStylesType, CardStylesTypeWithLiterals, CellStyle, CodeBlockData, CollapsibleListData, ColorData, Colors, CreateDraftPostRequest, Crop, CropWithLiterals, CursorPaging, Cursors, Decoration, DecorationDataOneOf, DecorationType, DecorationTypeWithLiterals, DeleteDraftPostRequest, DeleteDraftPostResponse, Design, Dimensions, Direction, DirectionWithLiterals, DividerData, DividerDataAlignment, DividerDataAlignmentWithLiterals, DocumentStyle, DomainEvent, DomainEventBodyOneOf, DraftCategoriesUpdated, DraftPostOwnerChanged, DraftPostTranslation, DraftPostsQueryResult, DraftTagsUpdated, EmbedData, EmbedMedia, EmbedThumbnail, EmbedVideo, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventData, EventMetadata, Field, FieldWithLiterals, FileData, FileSource, FileSourceDataOneOf, FocalPoint, FontSizeData, FontType, FontTypeWithLiterals, GIF, GIFData, GIFType, GIFTypeWithLiterals, GalleryData, GalleryOptions, GalleryOptionsLayout, GetDeletedDraftPostRequest, GetDraftPostRequest, GetDraftPostTotalsRequest, GetDraftPostTotalsResponse, GetDraftPostsSort, GetDraftPostsSortWithLiterals, Gradient, HTMLData, HTMLDataDataOneOf, HeadingData, Height, IdentificationData, IdentificationDataIdOneOf, Image, ImageData, ImageDataStyles, ImagePosition, ImagePositionWithLiterals, ImageStyles, InitialDraftPostsCopied, InitialExpandedItems, InitialExpandedItemsWithLiterals, IsDraftPostAutoTranslatableRequest, IsDraftPostAutoTranslatableResponse, Item, ItemDataOneOf, ItemMetadata, ItemStyle, Keyword, Layout, LayoutCellData, LayoutData, LayoutType, LayoutTypeWithLiterals, LayoutWithLiterals, LineStyle, LineStyleWithLiterals, Link, LinkData, LinkDataOneOf, LinkPreviewData, LinkPreviewDataStyles, ListDeletedDraftPostsRequest, ListDraftPostsRequest, ListValue, MapData, MapSettings, MapType, MapTypeWithLiterals, MarkPostAsInModerationRequest, MarkPostAsInModerationResponse, MaskedDraftPosts, Media, MediaMediaOneOf, MentionData, MessageEnvelope, MetaData, Metadata, ModerationDetails, ModerationStatusStatus, ModerationStatusStatusWithLiterals, Node, NodeDataOneOf, NodeStyle, NodeType, NodeTypeWithLiterals, NullValue, NullValueWithLiterals, Oembed, Option, OptionDesign, OptionLayout, OrderedListData, Orientation, OrientationWithLiterals, Origin, OriginWithLiterals, PDFSettings, Paging, PagingMetadataV2, ParagraphData, Permissions, Placement, PlacementWithLiterals, PlatformQuery, PlatformQueryPagingMethodOneOf, PlaybackOptions, PluginContainerData, PluginContainerDataAlignment, PluginContainerDataAlignmentWithLiterals, PluginContainerDataWidth, PluginContainerDataWidthDataOneOf, Poll, PollData, PollDataLayout, PollDesign, PollLayout, PollLayoutDirection, PollLayoutDirectionWithLiterals, PollLayoutType, PollLayoutTypeWithLiterals, PollSettings, Position, PositionWithLiterals, PricingData, PublishDraftPostRequest, QueryDraftPostsRequest, QueryDraftPostsResponse, RejectDraftPostRequest, RejectDraftPostResponse, Rel, RemoveFromTrashBinRequest, RemoveFromTrashBinResponse, Resizing, ResizingWithLiterals, ResponsivenessBehaviour, ResponsivenessBehaviourWithLiterals, RestoreFromTrashBinRequest, RestoreInfo, RevertToUnpublishedRequest, RevertToUnpublishedResponse, RibbonStyles, RichContent, Scaling, ScalingWithLiterals, SeoSchema, Settings, SortOrder, SortOrderWithLiterals, Sorting, Source, SourceWithLiterals, Spoiler, SpoilerData, Status, StatusWithLiterals, Styles, StylesBorder, StylesPosition, StylesPositionWithLiterals, TableCellData, TableData, Tag, Target, TargetWithLiterals, TextAlignment, TextAlignmentWithLiterals, TextData, TextNodeStyle, TextStyle, Thumbnails, ThumbnailsAlignment, ThumbnailsAlignmentWithLiterals, TotalDraftPosts, TotalDraftPostsGroupingField, TotalDraftPostsGroupingFieldWithLiterals, TranslateDraftRequest, TranslateDraftResponse, Type, TypeWithLiterals, UnpublishPostRequest, UnpublishPostResponse, UpdateDraftPostContentRequest, UpdateDraftPostContentResponse, UpdateDraftPostLanguageRequest, UpdateDraftPostLanguageResponse, UpdateDraftPostRequest, V1Media, VerticalAlignment, VerticalAlignmentAlignment, VerticalAlignmentAlignmentWithLiterals, VerticalAlignmentWithLiterals, Video, VideoData, VideoResolution, ViewMode, ViewModeWithLiterals, ViewRole, ViewRoleWithLiterals, VoteRole, VoteRoleWithLiterals, WebhookIdentityType, WebhookIdentityTypeWithLiterals, Width, WidthType, WidthTypeWithLiterals, WidthWithLiterals, WixMedia } from './index.typings.js';
2
+ import { DraftPost, CreateDraftPostOptions, CreateDraftPostResponse, BulkCreateDraftPostsOptions, BulkCreateDraftPostsResponse, BulkUpdateDraftPostsOptions, BulkUpdateDraftPostsResponse, ListDeletedDraftPostsOptions, ListDeletedDraftPostsResponse, GetDraftPostOptions, GetDraftPostResponse, UpdateDraftPost, UpdateDraftPostOptions, UpdateDraftPostResponse, DeleteDraftPostOptions, BulkDeleteDraftPostsOptions, BulkDeleteDraftPostsResponse, ListDraftPostsOptions, ListDraftPostsResponse, GetDeletedDraftPostResponse, RestoreFromTrashBinResponse, PublishDraftPostResponse, DraftCreatedEnvelope, DraftDeletedEnvelope, DraftUpdatedEnvelope, PlatformQuery, typedQueryDraftPosts, QueryDraftPostsOptions, DraftPostsQueryBuilder } from './index.typings.js';
3
+ export { Action, ActionEvent, ActionWithLiterals, Alignment, AlignmentWithLiterals, AnchorData, AppEmbedData, AppEmbedDataAppDataOneOf, AppType, AppTypeWithLiterals, ApplicationError, ApproveDraftPostRequest, ApproveDraftPostResponse, AspectRatio, AspectRatioWithLiterals, AudioData, Background, BackgroundBackgroundOneOf, BackgroundImage, BackgroundType, BackgroundTypeWithLiterals, BaseEventMetadata, BlockquoteData, BlogPaging, BookingData, Border, BorderColors, BulkActionMetadata, BulkCreateDraftPostsRequest, BulkDeleteDraftPostsRequest, BulkDraftPostResult, BulkRejectDraftPostRequest, BulkRejectDraftPostResponse, BulkRevertToUnpublishedRequest, BulkRevertToUnpublishedResponse, BulkUpdateDraftPostsRequest, BulletedListData, ButtonData, ButtonDataType, ButtonDataTypeWithLiterals, ButtonStyles, CaptionData, CardStyles, CardStylesType, CardStylesTypeWithLiterals, CellStyle, CodeBlockData, CollapsibleListData, ColorData, Colors, CreateDraftPostRequest, Crop, CropWithLiterals, CursorPaging, Cursors, Decoration, DecorationDataOneOf, DecorationType, DecorationTypeWithLiterals, DeleteDraftPostRequest, DeleteDraftPostResponse, Design, Dimensions, Direction, DirectionWithLiterals, DividerData, DividerDataAlignment, DividerDataAlignmentWithLiterals, DocumentStyle, DomainEvent, DomainEventBodyOneOf, DraftCategoriesUpdated, DraftPostOwnerChanged, DraftPostTranslation, DraftPostsQueryResult, DraftTagsUpdated, EmbedData, EmbedMedia, EmbedThumbnail, EmbedVideo, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventData, EventMetadata, Field, FieldWithLiterals, FileData, FileSource, FileSourceDataOneOf, FocalPoint, FontSizeData, FontType, FontTypeWithLiterals, GIF, GIFData, GIFType, GIFTypeWithLiterals, GalleryData, GalleryOptions, GalleryOptionsLayout, GetDeletedDraftPostRequest, GetDraftPostRequest, GetDraftPostTotalsRequest, GetDraftPostTotalsResponse, GetDraftPostsSort, GetDraftPostsSortWithLiterals, Gradient, HTMLData, HTMLDataDataOneOf, HeadingData, Height, IdentificationData, IdentificationDataIdOneOf, Image, ImageData, ImageDataStyles, ImagePosition, ImagePositionWithLiterals, ImageStyles, InitialDraftPostsCopied, InitialExpandedItems, InitialExpandedItemsWithLiterals, IsDraftPostAutoTranslatableRequest, IsDraftPostAutoTranslatableResponse, Item, ItemDataOneOf, ItemMetadata, ItemStyle, Keyword, Layout, LayoutCellData, LayoutData, LayoutType, LayoutTypeWithLiterals, LayoutWithLiterals, LineStyle, LineStyleWithLiterals, Link, LinkData, LinkDataOneOf, LinkPreviewData, LinkPreviewDataStyles, ListDeletedDraftPostsRequest, ListDraftPostsRequest, ListValue, MapData, MapSettings, MapType, MapTypeWithLiterals, MarkPostAsInModerationRequest, MarkPostAsInModerationResponse, MaskedDraftPosts, Media, MediaMediaOneOf, MentionData, MessageEnvelope, MetaData, Metadata, ModerationDetails, ModerationStatusStatus, ModerationStatusStatusWithLiterals, Node, NodeDataOneOf, NodeStyle, NodeType, NodeTypeWithLiterals, NullValue, NullValueWithLiterals, Oembed, Option, OptionDesign, OptionLayout, OrderedListData, Orientation, OrientationWithLiterals, Origin, OriginWithLiterals, PDFSettings, Paging, PagingMetadataV2, ParagraphData, Permissions, Placement, PlacementWithLiterals, PlatformQueryPagingMethodOneOf, PlaybackOptions, PluginContainerData, PluginContainerDataAlignment, PluginContainerDataAlignmentWithLiterals, PluginContainerDataWidth, PluginContainerDataWidthDataOneOf, Poll, PollData, PollDataLayout, PollDesign, PollLayout, PollLayoutDirection, PollLayoutDirectionWithLiterals, PollLayoutType, PollLayoutTypeWithLiterals, PollSettings, Position, PositionWithLiterals, PricingData, PublishDraftPostRequest, QueryDraftPostsRequest, QueryDraftPostsResponse, RejectDraftPostRequest, RejectDraftPostResponse, Rel, RemoveFromTrashBinRequest, RemoveFromTrashBinResponse, Resizing, ResizingWithLiterals, ResponsivenessBehaviour, ResponsivenessBehaviourWithLiterals, RestoreFromTrashBinRequest, RestoreInfo, RevertToUnpublishedRequest, RevertToUnpublishedResponse, RibbonStyles, RichContent, Scaling, ScalingWithLiterals, SeoSchema, Settings, SortOrder, SortOrderWithLiterals, Sorting, Source, SourceWithLiterals, Spoiler, SpoilerData, Status, StatusWithLiterals, Styles, StylesBorder, StylesPosition, StylesPositionWithLiterals, TableCellData, TableData, Tag, Target, TargetWithLiterals, TextAlignment, TextAlignmentWithLiterals, TextData, TextNodeStyle, TextStyle, Thumbnails, ThumbnailsAlignment, ThumbnailsAlignmentWithLiterals, TotalDraftPosts, TotalDraftPostsGroupingField, TotalDraftPostsGroupingFieldWithLiterals, TranslateDraftRequest, TranslateDraftResponse, Type, TypeWithLiterals, UnpublishPostRequest, UnpublishPostResponse, UpdateDraftPostContentRequest, UpdateDraftPostContentResponse, UpdateDraftPostLanguageRequest, UpdateDraftPostLanguageResponse, UpdateDraftPostRequest, V1Media, VerticalAlignment, VerticalAlignmentAlignment, VerticalAlignmentAlignmentWithLiterals, VerticalAlignmentWithLiterals, Video, VideoData, VideoResolution, ViewMode, ViewModeWithLiterals, ViewRole, ViewRoleWithLiterals, VoteRole, VoteRoleWithLiterals, WebhookIdentityType, WebhookIdentityTypeWithLiterals, Width, WidthType, WidthTypeWithLiterals, WidthWithLiterals, WixMedia } from './index.typings.js';
4
4
 
5
5
  declare function createDraftPost$1(httpClient: HttpClient): CreateDraftPostSignature;
6
6
  interface CreateDraftPostSignature {
@@ -13,7 +13,7 @@ interface CreateDraftPostSignature {
13
13
  * `categoryIds` that do not exist will not return an error, but they will not be added to the `categoryIds` array.
14
14
  * If some of the categories exist, those will be added while those that do not exist will not be added to `categoryIds`.
15
15
  * You can check which categories are available with
16
- * List Categories ([SDK](https://dev.wix.com/docs/sdk/backend-modules/blog/categories/list-categories) | [REST](https://dev.wix.com/docs/rest/business-solutions/blog/category/list-categories)).
16
+ * [List Categories](https://dev.wix.com/docs/rest/business-solutions/blog/category/list-categories).
17
17
  * @param - Draft post to create.
18
18
  * @param - Options for creating a draft post.
19
19
  */
@@ -72,7 +72,7 @@ declare function deleteDraftPost$1(httpClient: HttpClient): DeleteDraftPostSigna
72
72
  interface DeleteDraftPostSignature {
73
73
  /**
74
74
  * Moves a draft post to the trash bin.
75
- * A published post can also be deleted by the `post.id`. See the Posts API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/blog/posts/) | [REST](https://dev.wix.com/docs/rest/business-solutions/blog/posts-stats/post-object)) for more information about posts.
75
+ * A published post can also be deleted by the `post.id`. See the [Posts API](https://dev.wix.com/docs/rest/business-solutions/blog/posts-stats/post-object) for more information about posts.
76
76
  *
77
77
  * To permanently delete a post bypassing the trash bin, set the `permanent` field value to `true`. The post can't be restored after this.
78
78
  * @param - Draft post ID.
@@ -128,31 +128,10 @@ interface RestoreFromTrashBinSignature {
128
128
  */
129
129
  (draftPostId: string): Promise<NonNullablePaths<RestoreFromTrashBinResponse, `draftPost._id` | `draftPost.title` | `draftPost.categoryIds` | `draftPost.hashtags` | `draftPost.minutesToRead` | `draftPost.tagIds` | `draftPost.relatedPostIds` | `draftPost.pricingPlanIds` | `draftPost.status` | `draftPost.moderationDetails.submittedBy` | `draftPost.moderationDetails.status` | `draftPost.hasUnpublishedChanges` | `draftPost.seoData.tags` | `draftPost.seoData.tags.${number}.type` | `draftPost.seoData.tags.${number}.children` | `draftPost.seoData.tags.${number}.custom` | `draftPost.seoData.tags.${number}.disabled` | `draftPost.seoData.settings.preventAutoRedirect` | `draftPost.seoData.settings.keywords` | `draftPost.seoData.settings.keywords.${number}.term` | `draftPost.seoData.settings.keywords.${number}.isMain` | `draftPost.media.embedMedia.thumbnail.url` | `draftPost.media.embedMedia.thumbnail.width` | `draftPost.media.embedMedia.thumbnail.height` | `draftPost.media.embedMedia.video.url` | `draftPost.media.embedMedia.video.width` | `draftPost.media.embedMedia.video.height` | `draftPost.media.displayed` | `draftPost.media.custom`, 7>>;
130
130
  }
131
- declare function queryDraftPosts$1(httpClient: HttpClient): QueryDraftPostsSignature;
132
- interface QueryDraftPostsSignature {
133
- /**
134
- * Creates a query to retrieve a list of up to 100 draft posts.
135
- *
136
- *
137
- * The `queryDraftPosts()` function builds a query to retrieve a list of up to 100 draft posts, and returns a `DraftPostsQueryBuilder` object.
138
- *
139
- * The returned object contains the query definition, which is typically used to run the query using the `find()` function.
140
- *
141
- * You can refine the query by chaining `DraftPostsQueryBuilder` functions onto the query. `DraftPostsQueryBuilder` functions enable you to sort, filter, and control the results that `queryDraftPosts()` returns.
142
- *
143
- * `queryDraftPosts()` runs with these `DraftPostsQueryBuilder` defaults that can be overridden:
144
- * - `limit(50)`
145
- * - `ascending('_id')`
146
- *
147
- * The following `DraftPostsQueryBuilder` functions are supported for `queryDraftPosts()`. For a full description of the Draft Posts object, see the object returned for the `items` property in `DraftPostsQueryResult`.
148
- * @param - Options for querying draft posts.
149
- */
150
- (options?: QueryDraftPostsOptions): DraftPostsQueryBuilder;
151
- }
152
131
  declare function publishDraftPost$1(httpClient: HttpClient): PublishDraftPostSignature;
153
132
  interface PublishDraftPostSignature {
154
133
  /**
155
- * Publishes a draft post by ID. This creates a new post ([SDK](https://dev.wix.com/docs/sdk/backend-modules/blog/posts/) | [REST](https://dev.wix.com/docs/rest/business-solutions/blog/posts-stats/post-object))
134
+ * Publishes a draft post by ID. This creates a new [post](https://dev.wix.com/docs/rest/business-solutions/blog/posts-stats/post-object)
156
135
  * with the data from the draft post.
157
136
  *
158
137
  * If the draft post was already published, the published post will be updated with the latest values
@@ -165,6 +144,12 @@ declare const onDraftCreated$1: EventDefinition<DraftCreatedEnvelope, "wix.blog.
165
144
  declare const onDraftDeleted$1: EventDefinition<DraftDeletedEnvelope, "wix.blog.v3.draft_deleted">;
166
145
  declare const onDraftUpdated$1: EventDefinition<DraftUpdatedEnvelope, "wix.blog.v3.draft_updated">;
167
146
 
147
+ declare function customQueryDraftPosts(httpClient: HttpClient): {
148
+ (query: PlatformQuery): ReturnType<typeof typedQueryDraftPosts>;
149
+ (query: PlatformQuery, options: QueryDraftPostsOptions): ReturnType<typeof typedQueryDraftPosts>;
150
+ (): DraftPostsQueryBuilder;
151
+ (options: QueryDraftPostsOptions): DraftPostsQueryBuilder;
152
+ };
168
153
  declare const createDraftPost: MaybeContext<BuildRESTFunction<typeof createDraftPost$1> & typeof createDraftPost$1>;
169
154
  declare const bulkCreateDraftPosts: MaybeContext<BuildRESTFunction<typeof bulkCreateDraftPosts$1> & typeof bulkCreateDraftPosts$1>;
170
155
  declare const bulkUpdateDraftPosts: MaybeContext<BuildRESTFunction<typeof bulkUpdateDraftPosts$1> & typeof bulkUpdateDraftPosts$1>;
@@ -177,8 +162,8 @@ declare const bulkDeleteDraftPosts: MaybeContext<BuildRESTFunction<typeof bulkDe
177
162
  declare const listDraftPosts: MaybeContext<BuildRESTFunction<typeof listDraftPosts$1> & typeof listDraftPosts$1>;
178
163
  declare const getDeletedDraftPost: MaybeContext<BuildRESTFunction<typeof getDeletedDraftPost$1> & typeof getDeletedDraftPost$1>;
179
164
  declare const restoreFromTrashBin: MaybeContext<BuildRESTFunction<typeof restoreFromTrashBin$1> & typeof restoreFromTrashBin$1>;
180
- declare const queryDraftPosts: MaybeContext<BuildRESTFunction<typeof queryDraftPosts$1> & typeof queryDraftPosts$1>;
181
165
  declare const publishDraftPost: MaybeContext<BuildRESTFunction<typeof publishDraftPost$1> & typeof publishDraftPost$1>;
166
+ declare const queryDraftPosts: MaybeContext<BuildRESTFunction<typeof customQueryDraftPosts> & typeof customQueryDraftPosts>;
182
167
  /**
183
168
  * Triggered when a draft post is created.
184
169
  */
@@ -192,4 +177,4 @@ declare const onDraftDeleted: BuildEventDefinition<typeof onDraftDeleted$1> & ty
192
177
  */
193
178
  declare const onDraftUpdated: BuildEventDefinition<typeof onDraftUpdated$1> & typeof onDraftUpdated$1;
194
179
 
195
- export { BulkCreateDraftPostsOptions, BulkCreateDraftPostsResponse, BulkDeleteDraftPostsOptions, BulkDeleteDraftPostsResponse, BulkUpdateDraftPostsOptions, BulkUpdateDraftPostsResponse, CreateDraftPostOptions, CreateDraftPostResponse, DeleteDraftPostOptions, DraftCreatedEnvelope, DraftDeletedEnvelope, DraftPost, DraftPostsQueryBuilder, DraftUpdatedEnvelope, GetDeletedDraftPostResponse, GetDraftPostOptions, GetDraftPostResponse, ListDeletedDraftPostsOptions, ListDeletedDraftPostsResponse, ListDraftPostsOptions, ListDraftPostsResponse, PublishDraftPostResponse, QueryDraftPostsOptions, RestoreFromTrashBinResponse, UpdateDraftPost, UpdateDraftPostOptions, UpdateDraftPostResponse, bulkCreateDraftPosts, bulkDeleteDraftPosts, bulkUpdateDraftPosts, createDraftPost, deleteDraftPost, getDeletedDraftPost, getDraftPost, listDeletedDraftPosts, listDraftPosts, onDraftCreated, onDraftDeleted, onDraftUpdated, publishDraftPost, queryDraftPosts, removeFromTrashBin, restoreFromTrashBin, updateDraftPost };
180
+ export { BulkCreateDraftPostsOptions, BulkCreateDraftPostsResponse, BulkDeleteDraftPostsOptions, BulkDeleteDraftPostsResponse, BulkUpdateDraftPostsOptions, BulkUpdateDraftPostsResponse, CreateDraftPostOptions, CreateDraftPostResponse, DeleteDraftPostOptions, DraftCreatedEnvelope, DraftDeletedEnvelope, DraftPost, DraftPostsQueryBuilder, DraftUpdatedEnvelope, GetDeletedDraftPostResponse, GetDraftPostOptions, GetDraftPostResponse, ListDeletedDraftPostsOptions, ListDeletedDraftPostsResponse, ListDraftPostsOptions, ListDraftPostsResponse, PlatformQuery, PublishDraftPostResponse, QueryDraftPostsOptions, RestoreFromTrashBinResponse, UpdateDraftPost, UpdateDraftPostOptions, UpdateDraftPostResponse, bulkCreateDraftPosts, bulkDeleteDraftPosts, bulkUpdateDraftPosts, createDraftPost, deleteDraftPost, getDeletedDraftPost, getDraftPost, listDeletedDraftPosts, listDraftPosts, onDraftCreated, onDraftDeleted, onDraftUpdated, publishDraftPost, queryDraftPosts, removeFromTrashBin, restoreFromTrashBin, updateDraftPost };
@@ -3035,6 +3035,54 @@ function queryDraftPosts2(options) {
3035
3035
  transformationPaths: {}
3036
3036
  });
3037
3037
  }
3038
+ async function typedQueryDraftPosts(query, options) {
3039
+ const { httpClient, sideEffects } = arguments[2];
3040
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)(
3041
+ { query, ...options },
3042
+ []
3043
+ );
3044
+ const reqOpts = queryDraftPosts(payload);
3045
+ sideEffects?.onSiteCall?.();
3046
+ try {
3047
+ const result = await httpClient.request(reqOpts);
3048
+ sideEffects?.onSuccess?.(result);
3049
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
3050
+ (0, import_transform_paths2.transformPaths)(result.data, [
3051
+ {
3052
+ transformFn: import_image2.transformRESTImageToSDKImage,
3053
+ paths: [
3054
+ { path: "draftPosts.heroImage" },
3055
+ { path: "draftPosts.media.wixMedia.image" }
3056
+ ]
3057
+ },
3058
+ {
3059
+ transformFn: import_page_url2.transformRESTPageURLToSDKPageURL,
3060
+ paths: [
3061
+ { path: "draftPosts.url" },
3062
+ { path: "draftPosts.translations.url" }
3063
+ ]
3064
+ },
3065
+ {
3066
+ transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
3067
+ paths: [{ path: "draftPosts.media.wixMedia.videoV2" }]
3068
+ }
3069
+ ]),
3070
+ ["draftPosts.richContent"]
3071
+ );
3072
+ } catch (err) {
3073
+ const transformedError = (0, import_transform_error.transformError)(
3074
+ err,
3075
+ {
3076
+ spreadPathsToArguments: {},
3077
+ explicitPathsToArguments: { query: "$[0]" },
3078
+ singleArgumentUnchanged: false
3079
+ },
3080
+ ["query", "options"]
3081
+ );
3082
+ sideEffects?.onError?.(err);
3083
+ throw transformedError;
3084
+ }
3085
+ }
3038
3086
  async function publishDraftPost2(draftPostId) {
3039
3087
  const { httpClient, sideEffects } = arguments[1];
3040
3088
  const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)(
@@ -3161,6 +3209,14 @@ function queryDraftPosts3(httpClient) {
3161
3209
  { httpClient }
3162
3210
  );
3163
3211
  }
3212
+ function typedQueryDraftPosts2(httpClient) {
3213
+ return (query, options) => typedQueryDraftPosts(
3214
+ query,
3215
+ options,
3216
+ // @ts-ignore
3217
+ { httpClient }
3218
+ );
3219
+ }
3164
3220
  function publishDraftPost3(httpClient) {
3165
3221
  return (draftPostId) => publishDraftPost2(
3166
3222
  draftPostId,
@@ -3391,6 +3447,18 @@ var onDraftUpdated = (0, import_sdk_types.EventDefinition)(
3391
3447
  // src/blog-v3-draft-draft-posts.context.ts
3392
3448
  var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
3393
3449
  var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
3450
+ var import_query_method_router = require("@wix/sdk-runtime/query-method-router");
3451
+ function customQueryDraftPosts(httpClient) {
3452
+ const router = (0, import_query_method_router.createQueryOverloadRouter)({
3453
+ builderQueryFunction: (options) => queryDraftPosts3(httpClient)(options),
3454
+ typedQueryFunction: (query, options) => typedQueryDraftPosts2(httpClient)(query, options),
3455
+ hasOptionsParameter: true
3456
+ });
3457
+ function overloadedQuery(queryOrOptions, options) {
3458
+ return router(...arguments);
3459
+ }
3460
+ return overloadedQuery;
3461
+ }
3394
3462
  var createDraftPost4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createDraftPost3);
3395
3463
  var bulkCreateDraftPosts4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkCreateDraftPosts3);
3396
3464
  var bulkUpdateDraftPosts4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(bulkUpdateDraftPosts3);
@@ -3403,8 +3471,8 @@ var bulkDeleteDraftPosts4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTM
3403
3471
  var listDraftPosts4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listDraftPosts3);
3404
3472
  var getDeletedDraftPost4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getDeletedDraftPost3);
3405
3473
  var restoreFromTrashBin4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(restoreFromTrashBin3);
3406
- var queryDraftPosts4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(queryDraftPosts3);
3407
3474
  var publishDraftPost4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(publishDraftPost3);
3475
+ var queryDraftPosts4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(customQueryDraftPosts);
3408
3476
  var onDraftCreated2 = (0, import_event_definition_modules.createEventModule)(onDraftCreated);
3409
3477
  var onDraftDeleted2 = (0, import_event_definition_modules.createEventModule)(onDraftDeleted);
3410
3478
  var onDraftUpdated2 = (0, import_event_definition_modules.createEventModule)(onDraftUpdated);