@wix/auto_sdk_blog_posts 1.0.15 → 1.0.16
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/src/blog-v3-post-posts.context.d.ts +1 -1
- package/build/cjs/src/blog-v3-post-posts.http.d.ts +21 -19
- package/build/cjs/src/blog-v3-post-posts.http.js +21 -19
- package/build/cjs/src/blog-v3-post-posts.http.js.map +1 -1
- package/build/cjs/src/blog-v3-post-posts.public.d.ts +30 -23
- package/build/cjs/src/blog-v3-post-posts.public.js +5 -5
- package/build/cjs/src/blog-v3-post-posts.public.js.map +1 -1
- package/build/cjs/src/blog-v3-post-posts.universal.d.ts +29 -22
- package/build/cjs/src/blog-v3-post-posts.universal.js +41 -45
- package/build/cjs/src/blog-v3-post-posts.universal.js.map +1 -1
- package/build/es/src/blog-v3-post-posts.context.d.ts +1 -1
- package/build/es/src/blog-v3-post-posts.http.d.ts +21 -19
- package/build/es/src/blog-v3-post-posts.http.js +21 -19
- package/build/es/src/blog-v3-post-posts.http.js.map +1 -1
- package/build/es/src/blog-v3-post-posts.public.d.ts +30 -23
- package/build/es/src/blog-v3-post-posts.public.js +5 -5
- package/build/es/src/blog-v3-post-posts.public.js.map +1 -1
- package/build/es/src/blog-v3-post-posts.universal.d.ts +29 -22
- package/build/es/src/blog-v3-post-posts.universal.js +41 -45
- package/build/es/src/blog-v3-post-posts.universal.js.map +1 -1
- package/build/internal/cjs/src/blog-v3-post-posts.context.d.ts +1 -1
- package/build/internal/cjs/src/blog-v3-post-posts.http.d.ts +21 -19
- package/build/internal/cjs/src/blog-v3-post-posts.http.js +21 -19
- package/build/internal/cjs/src/blog-v3-post-posts.http.js.map +1 -1
- package/build/internal/cjs/src/blog-v3-post-posts.public.d.ts +30 -23
- package/build/internal/cjs/src/blog-v3-post-posts.public.js +5 -5
- package/build/internal/cjs/src/blog-v3-post-posts.public.js.map +1 -1
- package/build/internal/cjs/src/blog-v3-post-posts.universal.d.ts +29 -22
- package/build/internal/cjs/src/blog-v3-post-posts.universal.js +41 -45
- package/build/internal/cjs/src/blog-v3-post-posts.universal.js.map +1 -1
- package/build/internal/es/src/blog-v3-post-posts.context.d.ts +1 -1
- package/build/internal/es/src/blog-v3-post-posts.http.d.ts +21 -19
- package/build/internal/es/src/blog-v3-post-posts.http.js +21 -19
- package/build/internal/es/src/blog-v3-post-posts.http.js.map +1 -1
- package/build/internal/es/src/blog-v3-post-posts.public.d.ts +30 -23
- package/build/internal/es/src/blog-v3-post-posts.public.js +5 -5
- package/build/internal/es/src/blog-v3-post-posts.public.js.map +1 -1
- package/build/internal/es/src/blog-v3-post-posts.universal.d.ts +29 -22
- package/build/internal/es/src/blog-v3-post-posts.universal.js +41 -45
- package/build/internal/es/src/blog-v3-post-posts.universal.js.map +1 -1
- package/package.json +2 -2
@@ -1,5 +1,5 @@
|
|
1
1
|
import { EventDefinition, HttpClient } from '@wix/sdk-types';
|
2
|
-
import { GetPostBySlugOptions, GetPostBySlugResponse, GetPostBySlugResponseNonNullableFields, GetPostMetricsResponse, GetPostMetricsResponseNonNullableFields, GetPostOptions, GetTotalPostsOptions, GetTotalPostsResponse, GetTotalPostsResponseNonNullableFields, ListPostsOptions, ListPostsResponse, ListPostsResponseNonNullableFields,
|
2
|
+
import { GetPostBySlugOptions, GetPostBySlugResponse, GetPostBySlugResponseNonNullableFields, GetPostMetricsResponse, GetPostMetricsResponseNonNullableFields, GetPostOptions, GetPostResponse, GetPostResponseNonNullableFields, GetTotalPostsOptions, GetTotalPostsResponse, GetTotalPostsResponseNonNullableFields, ListPostsOptions, ListPostsResponse, ListPostsResponseNonNullableFields, PostCreatedEnvelope, PostDeletedEnvelope, PostLikedEnvelope, PostUnlikedEnvelope, PostUpdatedEnvelope, PostsQueryBuilder, QueryPostCountStatsOptions, QueryPostCountStatsResponse, QueryPostCountStatsResponseNonNullableFields, QueryPostsOptions } from './blog-v3-post-posts.universal.js';
|
3
3
|
export declare const __metadata: {
|
4
4
|
PACKAGE_NAME: string;
|
5
5
|
};
|
@@ -8,12 +8,13 @@ interface QueryPostCountStatsSignature {
|
|
8
8
|
/**
|
9
9
|
* Retrieves the number of published posts per month within a specified time range.
|
10
10
|
*
|
11
|
-
*
|
12
|
-
* The
|
13
|
-
*
|
14
|
-
* For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`,
|
15
|
-
*
|
16
|
-
*
|
11
|
+
*
|
12
|
+
* The `queryPostCountStats()` function returns a Promise that resolves to the number of posts per month within the specified time range.
|
13
|
+
*
|
14
|
+
* You can set the time range using the `rangeStart` and `months` properties. The time range always starts on the 1st day of the month set in `rangeStart` and includes the number of `months` following `rangeStart`. For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`, the time range will be from `'2022-03-01'` until `'2022-06-30'`. The time range ends on the last day of the month.
|
15
|
+
*
|
16
|
+
* >**Note:** If there are no published posts in a specific month, that month is not included in the response. For example, let's say a blog has `0` posts dated in February 2022. If `rangeStart` is set to `'2022-01-01'` and `months` is set to `3`, the response includes `postCount` values for January and March, but not February.
|
17
|
+
* @param - Options specifying time frame, sort, and filter.
|
17
18
|
* @returns Get Blog Post Count Stats response
|
18
19
|
*/
|
19
20
|
(options?: QueryPostCountStatsOptions | undefined): Promise<QueryPostCountStatsResponse & QueryPostCountStatsResponseNonNullableFields>;
|
@@ -22,6 +23,7 @@ export declare function getTotalPosts(httpClient: HttpClient): GetTotalPostsSign
|
|
22
23
|
interface GetTotalPostsSignature {
|
23
24
|
/**
|
24
25
|
* Retrieves the total amount of published posts of the blog.
|
26
|
+
* @param - Language Options.
|
25
27
|
*/
|
26
28
|
(options?: GetTotalPostsOptions | undefined): Promise<GetTotalPostsResponse & GetTotalPostsResponseNonNullableFields>;
|
27
29
|
}
|
@@ -30,9 +32,9 @@ interface GetPostSignature {
|
|
30
32
|
/**
|
31
33
|
* Retrieves a post by the specified ID.
|
32
34
|
* @param - Post ID.
|
33
|
-
* @
|
35
|
+
* @param - Options specifying which fields to return.
|
34
36
|
*/
|
35
|
-
(postId: string, options?: GetPostOptions | undefined): Promise<
|
37
|
+
(postId: string, options?: GetPostOptions | undefined): Promise<GetPostResponse & GetPostResponseNonNullableFields>;
|
36
38
|
}
|
37
39
|
export declare function getPostBySlug(httpClient: HttpClient): GetPostBySlugSignature;
|
38
40
|
interface GetPostBySlugSignature {
|
@@ -44,6 +46,7 @@ interface GetPostBySlugSignature {
|
|
44
46
|
* the slug is `my-post-slug`. The slug is case-sensitive, and is generally derived from the post title,
|
45
47
|
* unless specified otherwise.
|
46
48
|
* @param - Slug of the post to retrieve.
|
49
|
+
* @param - Options specifying which fields to return.
|
47
50
|
*/
|
48
51
|
(slug: string, options?: GetPostBySlugOptions | undefined): Promise<GetPostBySlugResponse & GetPostBySlugResponseNonNullableFields>;
|
49
52
|
}
|
@@ -56,28 +59,32 @@ interface ListPostsSignature {
|
|
56
59
|
* - `firstPublishedDate` is sorted in descending order, with pinned posts first.
|
57
60
|
* - `paging.limit` is `50`.
|
58
61
|
* - `paging.offset` is `0`.
|
62
|
+
* @param - Sort, filter, and paging options.
|
59
63
|
*/
|
60
64
|
(options?: ListPostsOptions | undefined): Promise<ListPostsResponse & ListPostsResponseNonNullableFields>;
|
61
65
|
}
|
62
66
|
export declare function queryPosts(httpClient: HttpClient): QueryPostsSignature;
|
63
67
|
interface QueryPostsSignature {
|
64
68
|
/**
|
65
|
-
*
|
69
|
+
* Creates a query to retrieve a list of posts.
|
66
70
|
*
|
67
|
-
* Query Posts runs with these defaults, which you can override:
|
68
|
-
* - `firstPublishedDate` is sorted in descending order, with pinned posts first.
|
69
|
-
* - `paging.limit` is `50`.
|
70
|
-
* - `paging.offset` is `0`.
|
71
71
|
*
|
72
|
-
*
|
73
|
-
*
|
72
|
+
* The `queryPosts()` function builds a query to retrieve a list of up to 100 posts, and returns a `PostsQueryBuilder` object.
|
73
|
+
*
|
74
|
+
* The returned object contains the query definition which is typically used to run the query using the `find()` function.
|
75
|
+
*
|
76
|
+
* You can refine the query by chaining `PostsQueryBuilder` functions onto the query. `PostsQueryBuilder` functions enable you to sort, filter, and control the results that `queryPosts()` returns.
|
77
|
+
*
|
78
|
+
* `queryPosts()` runs with these `PostsQueryBuilder` defaults that you can override:
|
79
|
+
* + `limit(50)`
|
80
|
+
* + `descending('firstPublishedDate')`
|
81
|
+
*
|
82
|
+
* Note that the default limit is `'50'`, but the max limit is `'100'`.
|
83
|
+
*
|
84
|
+
* To learn how to query posts, refer to the table below.
|
74
85
|
*
|
75
|
-
*
|
76
|
-
*
|
77
|
-
* [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging), and
|
78
|
-
* [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
|
79
|
-
* For a detailed list of supported filters and sortable fields, see
|
80
|
-
* [Field Support for Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/blog/posts-stats/filter-and-sort).
|
86
|
+
* The following `PostsQueryBuilder` functions are supported for the `queryPosts()` function. For a full description of the Posts object, see the object returned for the `items` property in `PostsQueryResult`.
|
87
|
+
* @param - Options specifying which fields to return.
|
81
88
|
*/
|
82
89
|
(options?: QueryPostsOptions | undefined): PostsQueryBuilder;
|
83
90
|
}
|
@@ -96,4 +103,4 @@ export declare const onPostDeleted: EventDefinition<PostDeletedEnvelope, "wix.bl
|
|
96
103
|
export declare const onPostLiked: EventDefinition<PostLikedEnvelope, "wix.blog.v3.post_liked">;
|
97
104
|
export declare const onPostUnliked: EventDefinition<PostUnlikedEnvelope, "wix.blog.v3.post_unliked">;
|
98
105
|
export declare const onPostUpdated: EventDefinition<PostUpdatedEnvelope, "wix.blog.v3.post_updated">;
|
99
|
-
export { ActionEvent, Alignment, AnchorData, AppEmbedData, AppEmbedDataAppDataOneOf, AppType, AudioData, Background, BackgroundBackgroundOneOf, BackgroundType, BaseEventMetadata, BlockquoteData, BlogPaging, BookingData, Border, BorderColors, BulkGetPostMetricsRequest, BulkGetPostMetricsResponse, BulkGetPostReactionsRequest, BulkGetPostReactionsResponse, BulletedListData, ButtonData, CaptionData, Category, CategoryTranslation, CellStyle, CodeBlockData, CollapsibleListData, ColorData, Colors, ConvertDraftJsToRichContentRequest, ConvertDraftJsToRichContentResponse, ConvertRichContentToDraftJsRequest, ConvertRichContentToDraftJsResponse, CoverMedia, CoverMediaMediaOneOf, CreateDraftPostFromTemplateRequest, CreateDraftPostFromTemplateResponse, Crop, CursorPaging, Cursors, Decoration, DecorationDataOneOf, DecorationType, Design, Dimensions, Direction, DividerData, DocumentStyle, DomainEvent, DomainEventBodyOneOf, DraftPost, DraftPostTranslation, EmbedData, EmbedMedia, EmbedThumbnail, EmbedVideo, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventData, EventMetadata, Field, FileData, FileSource, FileSourceDataOneOf, FocalPoint, FontSizeData, FontType, GIF, GIFData, GIFType, GalleryData, GalleryOptions, GetPostBySlugOptions, GetPostBySlugRequest, GetPostBySlugResponse, GetPostBySlugResponseNonNullableFields, GetPostMetricsRequest, GetPostMetricsResponse, GetPostMetricsResponseNonNullableFields, GetPostOptions, GetPostRequest, GetPostResponse, GetPostResponseNonNullableFields, GetPostTemplatesSort, GetPostsSort, GetTemplateRequest, GetTemplateResponse, GetTotalLikesPerMemberRequest, GetTotalLikesPerMemberResponse, GetTotalPostsOptions, GetTotalPostsRequest, GetTotalPostsResponse, GetTotalPostsResponseNonNullableFields, GetTotalPublicationsRequest, GetTotalPublicationsResponse, Gradient, HTMLData, HTMLDataDataOneOf, HeadingData, Height, IdentificationData, IdentificationDataIdOneOf, Image, ImageData, ImageDataStyles, InitialExpandedItems, InitialPostsCopied, Item, ItemDataOneOf, ItemStyle, Keyword, Layout, LayoutCellData, LayoutType, LikePostRequest, LikePostResponse, LineStyle, Link, LinkData, LinkDataOneOf, LinkPreviewData, LinkPreviewDataStyles, ListDemoPostsRequest, ListDemoPostsResponse, ListPostsArchiveRequest, ListPostsArchiveResponse, ListPostsOptions, ListPostsRequest, ListPostsResponse, ListPostsResponseNonNullableFields, ListTemplatesRequest, ListTemplatesResponse, ListValue, MapData, MapSettings, MapType, Media, MediaMediaOneOf, MentionData, MessageEnvelope, MetaData, Metadata, Metrics, ModerationDetails, ModerationStatusStatus, Node, NodeDataOneOf, NodeStyle, NodeType, NullValue, Oembed, OldBlogMigratedEvent, Option, OptionDesign, OptionLayout, Order, OrderedListData, Orientation, Origin, PDFSettings, Paging, PagingMetadataV2, ParagraphData, PeriodPostCount, PeriodPublicationsCount, Permissions, PinPostRequest, PinPostResponse, PlatformQuery, PlatformQueryPagingMethodOneOf, PlaybackOptions, PluginContainerData, PluginContainerDataAlignment, PluginContainerDataWidth, PluginContainerDataWidthDataOneOf, Poll, PollData, PollDataLayout, PollDesign, PollLayout, PollLayoutDirection, PollLayoutType, PollSettings, Position, Post, PostCategoriesUpdated, PostCountInfo, PostCountersUpdated, PostCountersUpdatedInitiatorOneOf, PostCreatedEnvelope, PostDeletedEnvelope, PostFieldField, PostLiked, PostLikedEnvelope, PostLikedInitiatorOneOf,
|
106
|
+
export { ActionEvent, Alignment, AnchorData, AppEmbedData, AppEmbedDataAppDataOneOf, AppType, AudioData, Background, BackgroundBackgroundOneOf, BackgroundType, BaseEventMetadata, BlockquoteData, BlogPaging, BookingData, Border, BorderColors, BulkGetPostMetricsRequest, BulkGetPostMetricsResponse, BulkGetPostReactionsRequest, BulkGetPostReactionsResponse, BulletedListData, ButtonData, CaptionData, Category, CategoryTranslation, CellStyle, CodeBlockData, CollapsibleListData, ColorData, Colors, ConvertDraftJsToRichContentRequest, ConvertDraftJsToRichContentResponse, ConvertRichContentToDraftJsRequest, ConvertRichContentToDraftJsResponse, CoverMedia, CoverMediaMediaOneOf, CreateDraftPostFromTemplateRequest, CreateDraftPostFromTemplateResponse, Crop, CursorPaging, Cursors, Decoration, DecorationDataOneOf, DecorationType, Design, Dimensions, Direction, DividerData, DocumentStyle, DomainEvent, DomainEventBodyOneOf, DraftPost, DraftPostTranslation, EmbedData, EmbedMedia, EmbedThumbnail, EmbedVideo, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventData, EventMetadata, Field, FileData, FileSource, FileSourceDataOneOf, FocalPoint, FontSizeData, FontType, GIF, GIFData, GIFType, GalleryData, GalleryOptions, GetPostBySlugOptions, GetPostBySlugRequest, GetPostBySlugResponse, GetPostBySlugResponseNonNullableFields, GetPostMetricsRequest, GetPostMetricsResponse, GetPostMetricsResponseNonNullableFields, GetPostOptions, GetPostRequest, GetPostResponse, GetPostResponseNonNullableFields, GetPostTemplatesSort, GetPostsSort, GetTemplateRequest, GetTemplateResponse, GetTotalLikesPerMemberRequest, GetTotalLikesPerMemberResponse, GetTotalPostsOptions, GetTotalPostsRequest, GetTotalPostsResponse, GetTotalPostsResponseNonNullableFields, GetTotalPublicationsRequest, GetTotalPublicationsResponse, Gradient, HTMLData, HTMLDataDataOneOf, HeadingData, Height, IdentificationData, IdentificationDataIdOneOf, Image, ImageData, ImageDataStyles, InitialExpandedItems, InitialPostsCopied, Item, ItemDataOneOf, ItemStyle, Keyword, Layout, LayoutCellData, LayoutType, LikePostRequest, LikePostResponse, LineStyle, Link, LinkData, LinkDataOneOf, LinkPreviewData, LinkPreviewDataStyles, ListDemoPostsRequest, ListDemoPostsResponse, ListPostsArchiveRequest, ListPostsArchiveResponse, ListPostsOptions, ListPostsRequest, ListPostsResponse, ListPostsResponseNonNullableFields, ListTemplatesRequest, ListTemplatesResponse, ListValue, MapData, MapSettings, MapType, Media, MediaMediaOneOf, MentionData, MessageEnvelope, MetaData, Metadata, Metrics, ModerationDetails, ModerationStatusStatus, Node, NodeDataOneOf, NodeStyle, NodeType, NullValue, Oembed, OldBlogMigratedEvent, Option, OptionDesign, OptionLayout, Order, OrderedListData, Orientation, Origin, PDFSettings, Paging, PagingMetadataV2, ParagraphData, PeriodPostCount, PeriodPublicationsCount, Permissions, PinPostRequest, PinPostResponse, PlatformQuery, PlatformQueryPagingMethodOneOf, PlaybackOptions, PluginContainerData, PluginContainerDataAlignment, PluginContainerDataWidth, PluginContainerDataWidthDataOneOf, Poll, PollData, PollDataLayout, PollDesign, PollLayout, PollLayoutDirection, PollLayoutType, PollSettings, Position, Post, PostCategoriesUpdated, PostCountInfo, PostCountersUpdated, PostCountersUpdatedInitiatorOneOf, PostCreatedEnvelope, PostDeletedEnvelope, PostFieldField, PostLiked, PostLikedEnvelope, PostLikedInitiatorOneOf, PostOwnerChanged, PostTagsUpdated, PostTranslation, PostUnliked, PostUnlikedEnvelope, PostUnlikedInitiatorOneOf, PostUpdatedEnvelope, PostsQueryBuilder, PostsQueryResult, QueryPostCountStatsOptions, QueryPostCountStatsRequest, QueryPostCountStatsResponse, QueryPostCountStatsResponseNonNullableFields, QueryPostsOptions, QueryPostsRequest, QueryPostsResponse, QueryPostsResponseNonNullableFields, QueryPublicationsCountStatsRequest, QueryPublicationsCountStatsRequestOrder, QueryPublicationsCountStatsResponse, Reactions, Rel, RestoreInfo, RichContent, ScheduledPostPublished, SeoSchema, Settings, SortOrder, Sorting, Source, Spoiler, SpoilerData, Status, Styles, StylesBorder, TableCellData, TableData, Tag, Target, TextAlignment, TextData, TextNodeStyle, TextStyle, Thumbnails, ThumbnailsAlignment, Type, UnlikePostRequest, UnlikePostResponse, UnpinPostRequest, UnpinPostResponse, V1Media, VerticalAlignment, Video, VideoData, VideoResolution, ViewMode, ViewPostRequest, ViewPostResponse, ViewRole, VoteRole, WebhookIdentityType, Width, WidthType, WixMedia, } from './blog-v3-post-posts.universal.js';
|
@@ -113,7 +113,7 @@ export const onPostCreated = EventDefinition('wix.blog.v3.post_created', true, (
|
|
113
113
|
transformFn: transformRESTVideoV2ToSDKVideoV2,
|
114
114
|
paths: [{ path: 'entity.media.wixMedia.videoV2' }],
|
115
115
|
},
|
116
|
-
])))();
|
116
|
+
]), ['entity.rich_content']))();
|
117
117
|
export const onPostDeleted = EventDefinition('wix.blog.v3.post_deleted', true, (event) => renameKeysFromRESTResponseToSDKResponse(transformPaths(event, [
|
118
118
|
{
|
119
119
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
@@ -182,19 +182,19 @@ export const onPostDeleted = EventDefinition('wix.blog.v3.post_deleted', true, (
|
|
182
182
|
transformFn: transformRESTVideoV2ToSDKVideoV2,
|
183
183
|
paths: [{ path: 'entity.media.wixMedia.videoV2' }],
|
184
184
|
},
|
185
|
-
])))();
|
185
|
+
]), ['entity.rich_content']))();
|
186
186
|
export const onPostLiked = EventDefinition('wix.blog.v3.post_liked', true, (event) => renameKeysFromRESTResponseToSDKResponse(transformPaths(event, [
|
187
187
|
{
|
188
188
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
189
189
|
paths: [{ path: 'metadata.eventTime' }],
|
190
190
|
},
|
191
|
-
])))();
|
191
|
+
]), ['entity.rich_content']))();
|
192
192
|
export const onPostUnliked = EventDefinition('wix.blog.v3.post_unliked', true, (event) => renameKeysFromRESTResponseToSDKResponse(transformPaths(event, [
|
193
193
|
{
|
194
194
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
195
195
|
paths: [{ path: 'metadata.eventTime' }],
|
196
196
|
},
|
197
|
-
])))();
|
197
|
+
]), ['entity.rich_content']))();
|
198
198
|
export const onPostUpdated = EventDefinition('wix.blog.v3.post_updated', true, (event) => renameKeysFromRESTResponseToSDKResponse(transformPaths(event, [
|
199
199
|
{
|
200
200
|
transformFn: transformRESTTimestampToSDKTimestamp,
|
@@ -263,6 +263,6 @@ export const onPostUpdated = EventDefinition('wix.blog.v3.post_updated', true, (
|
|
263
263
|
transformFn: transformRESTVideoV2ToSDKVideoV2,
|
264
264
|
paths: [{ path: 'entity.media.wixMedia.videoV2' }],
|
265
265
|
},
|
266
|
-
])))();
|
266
|
+
]), ['entity.rich_content']))();
|
267
267
|
export { Alignment, AppType, BackgroundType, Crop, DecorationType, Direction, Field, FontType, GIFType, GetPostTemplatesSort, GetPostsSort, InitialExpandedItems, LayoutType, LineStyle, MapType, ModerationStatusStatus, NodeType, NullValue, Order, Orientation, Origin, PluginContainerDataAlignment, PollLayoutDirection, PollLayoutType, Position, PostFieldField, QueryPublicationsCountStatsRequestOrder, SortOrder, Source, Status, Target, TextAlignment, ThumbnailsAlignment, Type, VerticalAlignment, ViewMode, ViewRole, VoteRole, WebhookIdentityType, Width, WidthType, } from './blog-v3-post-posts.universal.js';
|
268
268
|
//# sourceMappingURL=blog-v3-post-posts.public.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"blog-v3-post-posts.public.js","sourceRoot":"","sources":["../../../src/blog-v3-post-posts.public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uCAAuC,EAAE,MAAM,yCAAyC,CAAC;AAClG,OAAO,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AACtF,OAAO,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AACtF,OAAO,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AACtF,OAAO,EAAE,gCAAgC,EAAE,MAAM,2CAA2C,CAAC;AAC7F,OAAO,EAAE,oCAAoC,EAAE,MAAM,4CAA4C,CAAC;AAClG,OAAO,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAClF,OAAO,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AACtF,OAAO,EAAE,gCAAgC,EAAE,MAAM,2CAA2C,CAAC;AAC7F,OAAO,EAAE,eAAe,EAAc,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAyBL,OAAO,IAAI,gBAAgB,EAC3B,aAAa,IAAI,sBAAsB,EACvC,cAAc,IAAI,uBAAuB,EACzC,aAAa,IAAI,sBAAsB,EACvC,SAAS,IAAI,kBAAkB,EAC/B,mBAAmB,IAAI,4BAA4B,EACnD,UAAU,IAAI,mBAAmB,GAClC,MAAM,mCAAmC,CAAC;AAE3C,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC;AAExD,MAAM,UAAU,mBAAmB,CACjC,UAAsB;IAEtB,OAAO,CAAC,OAAoC,EAAE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EASvC,SAAS,EAET,MAAM,EAGN,MAAM,EAMN,MAAM,EACN,aAAa,EAKb,mBAAmB,EACnB,IAAI,EAMJ,iBAAiB,EAIjB,QAAQ,EAGR,QAAQ,EACR,QAAQ,EACR,mBAAmB,EACnB,KAAK,EACL,SAAS,GAEV,MAAM,mCAAmC,CAAC"}
|
@@ -3491,7 +3491,7 @@ interface PostTranslationNonNullableFields {
|
|
3491
3491
|
seoData?: SeoSchemaNonNullableFields;
|
3492
3492
|
url: string;
|
3493
3493
|
}
|
3494
|
-
|
3494
|
+
interface PostNonNullableFields {
|
3495
3495
|
_id: string;
|
3496
3496
|
title: string;
|
3497
3497
|
excerpt: string;
|
@@ -3694,14 +3694,15 @@ export declare function onPostUpdated(handler: (event: PostUpdatedEnvelope) => v
|
|
3694
3694
|
/**
|
3695
3695
|
* Retrieves the number of published posts per month within a specified time range.
|
3696
3696
|
*
|
3697
|
-
*
|
3698
|
-
* The
|
3699
|
-
*
|
3700
|
-
* For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`,
|
3701
|
-
*
|
3702
|
-
*
|
3697
|
+
*
|
3698
|
+
* The `queryPostCountStats()` function returns a Promise that resolves to the number of posts per month within the specified time range.
|
3699
|
+
*
|
3700
|
+
* You can set the time range using the `rangeStart` and `months` properties. The time range always starts on the 1st day of the month set in `rangeStart` and includes the number of `months` following `rangeStart`. For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`, the time range will be from `'2022-03-01'` until `'2022-06-30'`. The time range ends on the last day of the month.
|
3701
|
+
*
|
3702
|
+
* >**Note:** If there are no published posts in a specific month, that month is not included in the response. For example, let's say a blog has `0` posts dated in February 2022. If `rangeStart` is set to `'2022-01-01'` and `months` is set to `3`, the response includes `postCount` values for January and March, but not February.
|
3703
3703
|
* @public
|
3704
3704
|
* @documentationMaturity preview
|
3705
|
+
* @param options - Options specifying time frame, sort, and filter.
|
3705
3706
|
* @permissionId BLOG.READ-PUBLICATION
|
3706
3707
|
* @permissionScope Read Blog
|
3707
3708
|
* @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
|
@@ -3750,6 +3751,7 @@ export interface QueryPostCountStatsOptions {
|
|
3750
3751
|
* Retrieves the total amount of published posts of the blog.
|
3751
3752
|
* @public
|
3752
3753
|
* @documentationMaturity preview
|
3754
|
+
* @param options - Language Options.
|
3753
3755
|
* @permissionId BLOG.READ-PUBLICATION
|
3754
3756
|
* @permissionScope Read Blog
|
3755
3757
|
* @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
|
@@ -3777,6 +3779,7 @@ export interface GetTotalPostsOptions {
|
|
3777
3779
|
* @param postId - Post ID.
|
3778
3780
|
* @public
|
3779
3781
|
* @requiredField postId
|
3782
|
+
* @param options - Options specifying which fields to return.
|
3780
3783
|
* @permissionId BLOG.READ-PUBLICATION
|
3781
3784
|
* @permissionScope Read Blog
|
3782
3785
|
* @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
|
@@ -3786,10 +3789,9 @@ export interface GetTotalPostsOptions {
|
|
3786
3789
|
* @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
|
3787
3790
|
* @applicableIdentity APP
|
3788
3791
|
* @applicableIdentity VISITOR
|
3789
|
-
* @returns Retrieved post info.
|
3790
3792
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost
|
3791
3793
|
*/
|
3792
|
-
export declare function getPost(postId: string, options?: GetPostOptions): Promise<
|
3794
|
+
export declare function getPost(postId: string, options?: GetPostOptions): Promise<GetPostResponse & GetPostResponseNonNullableFields>;
|
3793
3795
|
export interface GetPostOptions {
|
3794
3796
|
/**
|
3795
3797
|
* List of additional post fields to include in the response. For example, use the `URL` fieldset to retrieve the url field in
|
@@ -3809,6 +3811,7 @@ export interface GetPostOptions {
|
|
3809
3811
|
* @param slug - Slug of the post to retrieve.
|
3810
3812
|
* @public
|
3811
3813
|
* @requiredField slug
|
3814
|
+
* @param options - Options specifying which fields to return.
|
3812
3815
|
* @permissionId BLOG.READ-PUBLICATION
|
3813
3816
|
* @permissionScope Read Blog
|
3814
3817
|
* @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
|
@@ -3838,6 +3841,7 @@ export interface GetPostBySlugOptions {
|
|
3838
3841
|
* - `paging.limit` is `50`.
|
3839
3842
|
* - `paging.offset` is `0`.
|
3840
3843
|
* @public
|
3844
|
+
* @param options - Sort, filter, and paging options.
|
3841
3845
|
* @permissionId BLOG.READ-PUBLICATION
|
3842
3846
|
* @permissionScope Read Blog
|
3843
3847
|
* @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
|
@@ -3915,23 +3919,26 @@ export interface ListPostsOptions {
|
|
3915
3919
|
fieldsets?: PostFieldField[];
|
3916
3920
|
}
|
3917
3921
|
/**
|
3918
|
-
*
|
3922
|
+
* Creates a query to retrieve a list of posts.
|
3919
3923
|
*
|
3920
|
-
* Query Posts runs with these defaults, which you can override:
|
3921
|
-
* - `firstPublishedDate` is sorted in descending order, with pinned posts first.
|
3922
|
-
* - `paging.limit` is `50`.
|
3923
|
-
* - `paging.offset` is `0`.
|
3924
3924
|
*
|
3925
|
-
*
|
3926
|
-
*
|
3925
|
+
* The `queryPosts()` function builds a query to retrieve a list of up to 100 posts, and returns a `PostsQueryBuilder` object.
|
3926
|
+
*
|
3927
|
+
* The returned object contains the query definition which is typically used to run the query using the `find()` function.
|
3928
|
+
*
|
3929
|
+
* You can refine the query by chaining `PostsQueryBuilder` functions onto the query. `PostsQueryBuilder` functions enable you to sort, filter, and control the results that `queryPosts()` returns.
|
3930
|
+
*
|
3931
|
+
* `queryPosts()` runs with these `PostsQueryBuilder` defaults that you can override:
|
3932
|
+
* + `limit(50)`
|
3933
|
+
* + `descending('firstPublishedDate')`
|
3934
|
+
*
|
3935
|
+
* Note that the default limit is `'50'`, but the max limit is `'100'`.
|
3936
|
+
*
|
3937
|
+
* To learn how to query posts, refer to the table below.
|
3927
3938
|
*
|
3928
|
-
*
|
3929
|
-
* [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
|
3930
|
-
* [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging), and
|
3931
|
-
* [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
|
3932
|
-
* For a detailed list of supported filters and sortable fields, see
|
3933
|
-
* [Field Support for Filtering and Sorting](https://dev.wix.com/docs/rest/business-solutions/blog/posts-stats/filter-and-sort).
|
3939
|
+
* The following `PostsQueryBuilder` functions are supported for the `queryPosts()` function. For a full description of the Posts object, see the object returned for the `items` property in `PostsQueryResult`.
|
3934
3940
|
* @public
|
3941
|
+
* @param options - Options specifying which fields to return.
|
3935
3942
|
* @permissionScope Read Blog
|
3936
3943
|
* @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
|
3937
3944
|
* @permissionScope Manage Blog
|
@@ -492,14 +492,15 @@ export var SortOrder;
|
|
492
492
|
/**
|
493
493
|
* Retrieves the number of published posts per month within a specified time range.
|
494
494
|
*
|
495
|
-
*
|
496
|
-
* The
|
497
|
-
*
|
498
|
-
* For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`,
|
499
|
-
*
|
500
|
-
*
|
495
|
+
*
|
496
|
+
* The `queryPostCountStats()` function returns a Promise that resolves to the number of posts per month within the specified time range.
|
497
|
+
*
|
498
|
+
* You can set the time range using the `rangeStart` and `months` properties. The time range always starts on the 1st day of the month set in `rangeStart` and includes the number of `months` following `rangeStart`. For example, if `rangeStart` is set to `'2022-03-13'` and `months` is set to `4`, the time range will be from `'2022-03-01'` until `'2022-06-30'`. The time range ends on the last day of the month.
|
499
|
+
*
|
500
|
+
* >**Note:** If there are no published posts in a specific month, that month is not included in the response. For example, let's say a blog has `0` posts dated in February 2022. If `rangeStart` is set to `'2022-01-01'` and `months` is set to `3`, the response includes `postCount` values for January and March, but not February.
|
501
501
|
* @public
|
502
502
|
* @documentationMaturity preview
|
503
|
+
* @param options - Options specifying time frame, sort, and filter.
|
503
504
|
* @permissionId BLOG.READ-PUBLICATION
|
504
505
|
* @permissionScope Read Blog
|
505
506
|
* @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
|
@@ -521,13 +522,13 @@ export async function queryPostCountStats(options) {
|
|
521
522
|
months: options?.months,
|
522
523
|
language: options?.language,
|
523
524
|
timeZone: options?.timeZone,
|
524
|
-
});
|
525
|
+
}, []);
|
525
526
|
const reqOpts = ambassadorWixBlogV3Post.queryPostCountStats(payload);
|
526
527
|
sideEffects?.onSiteCall?.();
|
527
528
|
try {
|
528
529
|
const result = await httpClient.request(reqOpts);
|
529
530
|
sideEffects?.onSuccess?.(result);
|
530
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
531
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data, []);
|
531
532
|
}
|
532
533
|
catch (err) {
|
533
534
|
const transformedError = sdkTransformError(err, {
|
@@ -549,6 +550,7 @@ export async function queryPostCountStats(options) {
|
|
549
550
|
* Retrieves the total amount of published posts of the blog.
|
550
551
|
* @public
|
551
552
|
* @documentationMaturity preview
|
553
|
+
* @param options - Language Options.
|
552
554
|
* @permissionId BLOG.READ-PUBLICATION
|
553
555
|
* @permissionScope Read Blog
|
554
556
|
* @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
|
@@ -563,15 +565,13 @@ export async function queryPostCountStats(options) {
|
|
563
565
|
export async function getTotalPosts(options) {
|
564
566
|
// @ts-ignore
|
565
567
|
const { httpClient, sideEffects } = arguments[1];
|
566
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
567
|
-
language: options?.language,
|
568
|
-
});
|
568
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ language: options?.language }, []);
|
569
569
|
const reqOpts = ambassadorWixBlogV3Post.getTotalPosts(payload);
|
570
570
|
sideEffects?.onSiteCall?.();
|
571
571
|
try {
|
572
572
|
const result = await httpClient.request(reqOpts);
|
573
573
|
sideEffects?.onSuccess?.(result);
|
574
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
574
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data, []);
|
575
575
|
}
|
576
576
|
catch (err) {
|
577
577
|
const transformedError = sdkTransformError(err, {
|
@@ -588,6 +588,7 @@ export async function getTotalPosts(options) {
|
|
588
588
|
* @param postId - Post ID.
|
589
589
|
* @public
|
590
590
|
* @requiredField postId
|
591
|
+
* @param options - Options specifying which fields to return.
|
591
592
|
* @permissionId BLOG.READ-PUBLICATION
|
592
593
|
* @permissionScope Read Blog
|
593
594
|
* @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
|
@@ -597,16 +598,12 @@ export async function getTotalPosts(options) {
|
|
597
598
|
* @permissionScopeId SCOPE.DC-BLOG.READ-DRAFT-POSTS
|
598
599
|
* @applicableIdentity APP
|
599
600
|
* @applicableIdentity VISITOR
|
600
|
-
* @returns Retrieved post info.
|
601
601
|
* @fqn com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost
|
602
602
|
*/
|
603
603
|
export async function getPost(postId, options) {
|
604
604
|
// @ts-ignore
|
605
605
|
const { httpClient, sideEffects } = arguments[2];
|
606
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
607
|
-
postId: postId,
|
608
|
-
fieldsets: options?.fieldsets,
|
609
|
-
});
|
606
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ postId: postId, fieldsets: options?.fieldsets }, []);
|
610
607
|
const reqOpts = ambassadorWixBlogV3Post.getPost(payload);
|
611
608
|
sideEffects?.onSiteCall?.();
|
612
609
|
try {
|
@@ -633,7 +630,7 @@ export async function getPost(postId, options) {
|
|
633
630
|
transformFn: transformRESTVideoV2ToSDKVideoV2,
|
634
631
|
paths: [{ path: 'post.media.wixMedia.videoV2' }],
|
635
632
|
},
|
636
|
-
]))
|
633
|
+
]), ['post.rich_content']);
|
637
634
|
}
|
638
635
|
catch (err) {
|
639
636
|
const transformedError = sdkTransformError(err, {
|
@@ -658,6 +655,7 @@ export async function getPost(postId, options) {
|
|
658
655
|
* @param slug - Slug of the post to retrieve.
|
659
656
|
* @public
|
660
657
|
* @requiredField slug
|
658
|
+
* @param options - Options specifying which fields to return.
|
661
659
|
* @permissionId BLOG.READ-PUBLICATION
|
662
660
|
* @permissionScope Read Blog
|
663
661
|
* @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
|
@@ -672,10 +670,7 @@ export async function getPost(postId, options) {
|
|
672
670
|
export async function getPostBySlug(slug, options) {
|
673
671
|
// @ts-ignore
|
674
672
|
const { httpClient, sideEffects } = arguments[2];
|
675
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
676
|
-
slug: slug,
|
677
|
-
fieldsets: options?.fieldsets,
|
678
|
-
});
|
673
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ slug: slug, fieldsets: options?.fieldsets }, []);
|
679
674
|
const reqOpts = ambassadorWixBlogV3Post.getPostBySlug(payload);
|
680
675
|
sideEffects?.onSiteCall?.();
|
681
676
|
try {
|
@@ -702,7 +697,7 @@ export async function getPostBySlug(slug, options) {
|
|
702
697
|
transformFn: transformRESTVideoV2ToSDKVideoV2,
|
703
698
|
paths: [{ path: 'post.media.wixMedia.videoV2' }],
|
704
699
|
},
|
705
|
-
]));
|
700
|
+
]), ['post.rich_content']);
|
706
701
|
}
|
707
702
|
catch (err) {
|
708
703
|
const transformedError = sdkTransformError(err, {
|
@@ -722,6 +717,7 @@ export async function getPostBySlug(slug, options) {
|
|
722
717
|
* - `paging.limit` is `50`.
|
723
718
|
* - `paging.offset` is `0`.
|
724
719
|
* @public
|
720
|
+
* @param options - Sort, filter, and paging options.
|
725
721
|
* @permissionId BLOG.READ-PUBLICATION
|
726
722
|
* @permissionScope Read Blog
|
727
723
|
* @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
|
@@ -746,7 +742,7 @@ export async function listPosts(options) {
|
|
746
742
|
language: options?.language,
|
747
743
|
memberId: options?.memberId,
|
748
744
|
fieldsets: options?.fieldsets,
|
749
|
-
});
|
745
|
+
}, []);
|
750
746
|
const reqOpts = ambassadorWixBlogV3Post.listPosts(payload);
|
751
747
|
sideEffects?.onSiteCall?.();
|
752
748
|
try {
|
@@ -773,7 +769,7 @@ export async function listPosts(options) {
|
|
773
769
|
transformFn: transformRESTVideoV2ToSDKVideoV2,
|
774
770
|
paths: [{ path: 'posts.media.wixMedia.videoV2' }],
|
775
771
|
},
|
776
|
-
]));
|
772
|
+
]), ['posts.rich_content']);
|
777
773
|
}
|
778
774
|
catch (err) {
|
779
775
|
const transformedError = sdkTransformError(err, {
|
@@ -796,23 +792,26 @@ export async function listPosts(options) {
|
|
796
792
|
}
|
797
793
|
}
|
798
794
|
/**
|
799
|
-
*
|
795
|
+
* Creates a query to retrieve a list of posts.
|
800
796
|
*
|
801
|
-
* Query Posts runs with these defaults, which you can override:
|
802
|
-
* - `firstPublishedDate` is sorted in descending order, with pinned posts first.
|
803
|
-
* - `paging.limit` is `50`.
|
804
|
-
* - `paging.offset` is `0`.
|
805
797
|
*
|
806
|
-
*
|
807
|
-
*
|
798
|
+
* The `queryPosts()` function builds a query to retrieve a list of up to 100 posts, and returns a `PostsQueryBuilder` object.
|
799
|
+
*
|
800
|
+
* The returned object contains the query definition which is typically used to run the query using the `find()` function.
|
808
801
|
*
|
809
|
-
*
|
810
|
-
*
|
811
|
-
*
|
812
|
-
*
|
813
|
-
*
|
814
|
-
*
|
802
|
+
* You can refine the query by chaining `PostsQueryBuilder` functions onto the query. `PostsQueryBuilder` functions enable you to sort, filter, and control the results that `queryPosts()` returns.
|
803
|
+
*
|
804
|
+
* `queryPosts()` runs with these `PostsQueryBuilder` defaults that you can override:
|
805
|
+
* + `limit(50)`
|
806
|
+
* + `descending('firstPublishedDate')`
|
807
|
+
*
|
808
|
+
* Note that the default limit is `'50'`, but the max limit is `'100'`.
|
809
|
+
*
|
810
|
+
* To learn how to query posts, refer to the table below.
|
811
|
+
*
|
812
|
+
* The following `PostsQueryBuilder` functions are supported for the `queryPosts()` function. For a full description of the Posts object, see the object returned for the `items` property in `PostsQueryResult`.
|
815
813
|
* @public
|
814
|
+
* @param options - Options specifying which fields to return.
|
816
815
|
* @permissionScope Read Blog
|
817
816
|
* @permissionScopeId SCOPE.DC-BLOG.READ-BLOGS
|
818
817
|
* @permissionScope Manage Blog
|
@@ -846,10 +845,7 @@ export function queryPosts(options) {
|
|
846
845
|
},
|
847
846
|
requestTransformer: (query) => {
|
848
847
|
const args = [query, options];
|
849
|
-
return renameKeysFromSDKRequestToRESTRequest({
|
850
|
-
...args?.[1],
|
851
|
-
query: args?.[0],
|
852
|
-
});
|
848
|
+
return renameKeysFromSDKRequestToRESTRequest({ ...args?.[1], query: args?.[0] }, []);
|
853
849
|
},
|
854
850
|
responseTransformer: ({ data }) => {
|
855
851
|
const transformedData = renameKeysFromRESTResponseToSDKResponse(transformPaths(data, [
|
@@ -873,7 +869,7 @@ export function queryPosts(options) {
|
|
873
869
|
transformFn: transformRESTVideoV2ToSDKVideoV2,
|
874
870
|
paths: [{ path: 'posts.media.wixMedia.videoV2' }],
|
875
871
|
},
|
876
|
-
]));
|
872
|
+
]), ['posts.rich_content']);
|
877
873
|
return {
|
878
874
|
items: transformedData?.posts,
|
879
875
|
pagingMetadata: transformedData?.pagingMetadata,
|
@@ -912,13 +908,13 @@ export function queryPosts(options) {
|
|
912
908
|
export async function getPostMetrics(postId) {
|
913
909
|
// @ts-ignore
|
914
910
|
const { httpClient, sideEffects } = arguments[1];
|
915
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({ postId: postId });
|
911
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ postId: postId }, []);
|
916
912
|
const reqOpts = ambassadorWixBlogV3Post.getPostMetrics(payload);
|
917
913
|
sideEffects?.onSiteCall?.();
|
918
914
|
try {
|
919
915
|
const result = await httpClient.request(reqOpts);
|
920
916
|
sideEffects?.onSuccess?.(result);
|
921
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
917
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data, []);
|
922
918
|
}
|
923
919
|
catch (err) {
|
924
920
|
const transformedError = sdkTransformError(err, {
|