@wix/auto_sdk_blog_draft-posts 1.0.53 → 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.
- package/build/cjs/index.d.ts +10 -25
- package/build/cjs/index.js +69 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +7 -1
- package/build/cjs/index.typings.js +50 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.d.mts +10 -25
- package/build/es/index.mjs +69 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +7 -1
- package/build/es/index.typings.mjs +49 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +10 -25
- package/build/internal/cjs/index.js +69 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +7 -1
- package/build/internal/cjs/index.typings.js +50 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/es/index.d.mts +10 -25
- package/build/internal/es/index.mjs +69 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +7 -1
- package/build/internal/es/index.typings.mjs +49 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -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,
|
|
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,
|
|
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.mjs';
|
|
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.mjs';
|
|
4
4
|
|
|
5
5
|
declare function createDraftPost$1(httpClient: HttpClient): CreateDraftPostSignature;
|
|
6
6
|
interface CreateDraftPostSignature {
|
|
@@ -128,27 +128,6 @@ 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
|
/**
|
|
@@ -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 };
|
|
@@ -2945,6 +2945,54 @@ function queryDraftPosts2(options) {
|
|
|
2945
2945
|
transformationPaths: {}
|
|
2946
2946
|
});
|
|
2947
2947
|
}
|
|
2948
|
+
async function typedQueryDraftPosts(query, options) {
|
|
2949
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2950
|
+
const payload = renameKeysFromSDKRequestToRESTRequest(
|
|
2951
|
+
{ query, ...options },
|
|
2952
|
+
[]
|
|
2953
|
+
);
|
|
2954
|
+
const reqOpts = queryDraftPosts(payload);
|
|
2955
|
+
sideEffects?.onSiteCall?.();
|
|
2956
|
+
try {
|
|
2957
|
+
const result = await httpClient.request(reqOpts);
|
|
2958
|
+
sideEffects?.onSuccess?.(result);
|
|
2959
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
2960
|
+
transformPaths2(result.data, [
|
|
2961
|
+
{
|
|
2962
|
+
transformFn: transformRESTImageToSDKImage,
|
|
2963
|
+
paths: [
|
|
2964
|
+
{ path: "draftPosts.heroImage" },
|
|
2965
|
+
{ path: "draftPosts.media.wixMedia.image" }
|
|
2966
|
+
]
|
|
2967
|
+
},
|
|
2968
|
+
{
|
|
2969
|
+
transformFn: transformRESTPageURLToSDKPageURL,
|
|
2970
|
+
paths: [
|
|
2971
|
+
{ path: "draftPosts.url" },
|
|
2972
|
+
{ path: "draftPosts.translations.url" }
|
|
2973
|
+
]
|
|
2974
|
+
},
|
|
2975
|
+
{
|
|
2976
|
+
transformFn: transformRESTVideoV2ToSDKVideoV2,
|
|
2977
|
+
paths: [{ path: "draftPosts.media.wixMedia.videoV2" }]
|
|
2978
|
+
}
|
|
2979
|
+
]),
|
|
2980
|
+
["draftPosts.richContent"]
|
|
2981
|
+
);
|
|
2982
|
+
} catch (err) {
|
|
2983
|
+
const transformedError = sdkTransformError(
|
|
2984
|
+
err,
|
|
2985
|
+
{
|
|
2986
|
+
spreadPathsToArguments: {},
|
|
2987
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
2988
|
+
singleArgumentUnchanged: false
|
|
2989
|
+
},
|
|
2990
|
+
["query", "options"]
|
|
2991
|
+
);
|
|
2992
|
+
sideEffects?.onError?.(err);
|
|
2993
|
+
throw transformedError;
|
|
2994
|
+
}
|
|
2995
|
+
}
|
|
2948
2996
|
async function publishDraftPost2(draftPostId) {
|
|
2949
2997
|
const { httpClient, sideEffects } = arguments[1];
|
|
2950
2998
|
const payload = renameKeysFromSDKRequestToRESTRequest(
|
|
@@ -3071,6 +3119,14 @@ function queryDraftPosts3(httpClient) {
|
|
|
3071
3119
|
{ httpClient }
|
|
3072
3120
|
);
|
|
3073
3121
|
}
|
|
3122
|
+
function typedQueryDraftPosts2(httpClient) {
|
|
3123
|
+
return (query, options) => typedQueryDraftPosts(
|
|
3124
|
+
query,
|
|
3125
|
+
options,
|
|
3126
|
+
// @ts-ignore
|
|
3127
|
+
{ httpClient }
|
|
3128
|
+
);
|
|
3129
|
+
}
|
|
3074
3130
|
function publishDraftPost3(httpClient) {
|
|
3075
3131
|
return (draftPostId) => publishDraftPost2(
|
|
3076
3132
|
draftPostId,
|
|
@@ -3301,6 +3357,18 @@ var onDraftUpdated = EventDefinition(
|
|
|
3301
3357
|
// src/blog-v3-draft-draft-posts.context.ts
|
|
3302
3358
|
import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
|
|
3303
3359
|
import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
|
|
3360
|
+
import { createQueryOverloadRouter } from "@wix/sdk-runtime/query-method-router";
|
|
3361
|
+
function customQueryDraftPosts(httpClient) {
|
|
3362
|
+
const router = createQueryOverloadRouter({
|
|
3363
|
+
builderQueryFunction: (options) => queryDraftPosts3(httpClient)(options),
|
|
3364
|
+
typedQueryFunction: (query, options) => typedQueryDraftPosts2(httpClient)(query, options),
|
|
3365
|
+
hasOptionsParameter: true
|
|
3366
|
+
});
|
|
3367
|
+
function overloadedQuery(queryOrOptions, options) {
|
|
3368
|
+
return router(...arguments);
|
|
3369
|
+
}
|
|
3370
|
+
return overloadedQuery;
|
|
3371
|
+
}
|
|
3304
3372
|
var createDraftPost4 = /* @__PURE__ */ createRESTModule(createDraftPost3);
|
|
3305
3373
|
var bulkCreateDraftPosts4 = /* @__PURE__ */ createRESTModule(bulkCreateDraftPosts3);
|
|
3306
3374
|
var bulkUpdateDraftPosts4 = /* @__PURE__ */ createRESTModule(bulkUpdateDraftPosts3);
|
|
@@ -3313,8 +3381,8 @@ var bulkDeleteDraftPosts4 = /* @__PURE__ */ createRESTModule(bulkDeleteDraftPost
|
|
|
3313
3381
|
var listDraftPosts4 = /* @__PURE__ */ createRESTModule(listDraftPosts3);
|
|
3314
3382
|
var getDeletedDraftPost4 = /* @__PURE__ */ createRESTModule(getDeletedDraftPost3);
|
|
3315
3383
|
var restoreFromTrashBin4 = /* @__PURE__ */ createRESTModule(restoreFromTrashBin3);
|
|
3316
|
-
var queryDraftPosts4 = /* @__PURE__ */ createRESTModule(queryDraftPosts3);
|
|
3317
3384
|
var publishDraftPost4 = /* @__PURE__ */ createRESTModule(publishDraftPost3);
|
|
3385
|
+
var queryDraftPosts4 = /* @__PURE__ */ createRESTModule(customQueryDraftPosts);
|
|
3318
3386
|
var onDraftCreated2 = createEventModule(onDraftCreated);
|
|
3319
3387
|
var onDraftDeleted2 = createEventModule(onDraftDeleted);
|
|
3320
3388
|
var onDraftUpdated2 = createEventModule(onDraftUpdated);
|