@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
|
@@ -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 };
|
|
@@ -2935,6 +2935,54 @@ function queryDraftPosts2(options) {
|
|
|
2935
2935
|
transformationPaths: {}
|
|
2936
2936
|
});
|
|
2937
2937
|
}
|
|
2938
|
+
async function typedQueryDraftPosts(query, options) {
|
|
2939
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
2940
|
+
const payload = renameKeysFromSDKRequestToRESTRequest(
|
|
2941
|
+
{ query, ...options },
|
|
2942
|
+
[]
|
|
2943
|
+
);
|
|
2944
|
+
const reqOpts = queryDraftPosts(payload);
|
|
2945
|
+
sideEffects?.onSiteCall?.();
|
|
2946
|
+
try {
|
|
2947
|
+
const result = await httpClient.request(reqOpts);
|
|
2948
|
+
sideEffects?.onSuccess?.(result);
|
|
2949
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
2950
|
+
transformPaths2(result.data, [
|
|
2951
|
+
{
|
|
2952
|
+
transformFn: transformRESTImageToSDKImage,
|
|
2953
|
+
paths: [
|
|
2954
|
+
{ path: "draftPosts.heroImage" },
|
|
2955
|
+
{ path: "draftPosts.media.wixMedia.image" }
|
|
2956
|
+
]
|
|
2957
|
+
},
|
|
2958
|
+
{
|
|
2959
|
+
transformFn: transformRESTPageURLToSDKPageURL,
|
|
2960
|
+
paths: [
|
|
2961
|
+
{ path: "draftPosts.url" },
|
|
2962
|
+
{ path: "draftPosts.translations.url" }
|
|
2963
|
+
]
|
|
2964
|
+
},
|
|
2965
|
+
{
|
|
2966
|
+
transformFn: transformRESTVideoV2ToSDKVideoV2,
|
|
2967
|
+
paths: [{ path: "draftPosts.media.wixMedia.videoV2" }]
|
|
2968
|
+
}
|
|
2969
|
+
]),
|
|
2970
|
+
["draftPosts.richContent"]
|
|
2971
|
+
);
|
|
2972
|
+
} catch (err) {
|
|
2973
|
+
const transformedError = sdkTransformError(
|
|
2974
|
+
err,
|
|
2975
|
+
{
|
|
2976
|
+
spreadPathsToArguments: {},
|
|
2977
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
2978
|
+
singleArgumentUnchanged: false
|
|
2979
|
+
},
|
|
2980
|
+
["query", "options"]
|
|
2981
|
+
);
|
|
2982
|
+
sideEffects?.onError?.(err);
|
|
2983
|
+
throw transformedError;
|
|
2984
|
+
}
|
|
2985
|
+
}
|
|
2938
2986
|
async function publishDraftPost2(draftPostId) {
|
|
2939
2987
|
const { httpClient, sideEffects } = arguments[1];
|
|
2940
2988
|
const payload = renameKeysFromSDKRequestToRESTRequest(
|
|
@@ -3026,6 +3074,7 @@ export {
|
|
|
3026
3074
|
queryDraftPosts2 as queryDraftPosts,
|
|
3027
3075
|
removeFromTrashBin2 as removeFromTrashBin,
|
|
3028
3076
|
restoreFromTrashBin2 as restoreFromTrashBin,
|
|
3077
|
+
typedQueryDraftPosts,
|
|
3029
3078
|
updateDraftPost2 as updateDraftPost
|
|
3030
3079
|
};
|
|
3031
3080
|
//# sourceMappingURL=index.typings.mjs.map
|