@wix/blog 1.0.238 → 1.0.240
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/context.d.ts +4 -4
- package/build/cjs/context.js +4 -4
- package/build/cjs/context.js.map +1 -1
- package/build/cjs/index.d.ts +4 -4
- package/build/cjs/index.js +4 -4
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/meta.d.ts +4 -4
- package/build/cjs/meta.js +4 -4
- package/build/cjs/meta.js.map +1 -1
- package/build/es/context.d.ts +4 -4
- package/build/es/context.js +4 -4
- package/build/es/context.js.map +1 -1
- package/build/es/index.d.ts +4 -4
- package/build/es/index.js +4 -4
- package/build/es/index.js.map +1 -1
- package/build/es/meta.d.ts +4 -4
- package/build/es/meta.js +4 -4
- package/build/es/meta.js.map +1 -1
- package/package.json +14 -9
- package/build/cjs/index.typings.d.ts +0 -4
- package/build/cjs/index.typings.js +0 -31
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/src/blog-v3-category.context.d.ts +0 -6
- package/build/cjs/src/blog-v3-category.context.js +0 -53
- package/build/cjs/src/blog-v3-category.context.js.map +0 -1
- package/build/cjs/src/blog-v3-category.http.d.ts +0 -43
- package/build/cjs/src/blog-v3-category.http.js +0 -355
- package/build/cjs/src/blog-v3-category.http.js.map +0 -1
- package/build/cjs/src/blog-v3-category.meta.d.ts +0 -20
- package/build/cjs/src/blog-v3-category.meta.js +0 -104
- package/build/cjs/src/blog-v3-category.meta.js.map +0 -1
- package/build/cjs/src/blog-v3-category.public.d.ts +0 -43
- package/build/cjs/src/blog-v3-category.public.js +0 -37
- package/build/cjs/src/blog-v3-category.public.js.map +0 -1
- package/build/cjs/src/blog-v3-category.types.d.ts +0 -910
- package/build/cjs/src/blog-v3-category.types.js +0 -24
- package/build/cjs/src/blog-v3-category.types.js.map +0 -1
- package/build/cjs/src/blog-v3-category.universal.d.ts +0 -956
- package/build/cjs/src/blog-v3-category.universal.js +0 -383
- package/build/cjs/src/blog-v3-category.universal.js.map +0 -1
- package/build/cjs/src/blog-v3-draft.context.d.ts +0 -16
- package/build/cjs/src/blog-v3-draft.context.js +0 -173
- package/build/cjs/src/blog-v3-draft.context.js.map +0 -1
- package/build/cjs/src/blog-v3-draft.http.d.ts +0 -79
- package/build/cjs/src/blog-v3-draft.http.js +0 -1498
- package/build/cjs/src/blog-v3-draft.http.js.map +0 -1
- package/build/cjs/src/blog-v3-draft.meta.d.ts +0 -40
- package/build/cjs/src/blog-v3-draft.meta.js +0 -294
- package/build/cjs/src/blog-v3-draft.meta.js.map +0 -1
- package/build/cjs/src/blog-v3-draft.public.d.ts +0 -22
- package/build/cjs/src/blog-v3-draft.public.js +0 -133
- package/build/cjs/src/blog-v3-draft.public.js.map +0 -1
- package/build/cjs/src/blog-v3-draft.types.d.ts +0 -9171
- package/build/cjs/src/blog-v3-draft.types.js +0 -456
- package/build/cjs/src/blog-v3-draft.types.js.map +0 -1
- package/build/cjs/src/blog-v3-draft.universal.d.ts +0 -8816
- package/build/cjs/src/blog-v3-draft.universal.js +0 -1585
- package/build/cjs/src/blog-v3-draft.universal.js.map +0 -1
- package/build/cjs/src/blog-v3-post.context.d.ts +0 -9
- package/build/cjs/src/blog-v3-post.context.js +0 -89
- package/build/cjs/src/blog-v3-post.context.js.map +0 -1
- package/build/cjs/src/blog-v3-post.http.d.ts +0 -80
- package/build/cjs/src/blog-v3-post.http.js +0 -893
- package/build/cjs/src/blog-v3-post.http.js.map +0 -1
- package/build/cjs/src/blog-v3-post.meta.d.ts +0 -25
- package/build/cjs/src/blog-v3-post.meta.js +0 -161
- package/build/cjs/src/blog-v3-post.meta.js.map +0 -1
- package/build/cjs/src/blog-v3-post.public.d.ts +0 -548
- package/build/cjs/src/blog-v3-post.public.js +0 -94
- package/build/cjs/src/blog-v3-post.public.js.map +0 -1
- package/build/cjs/src/blog-v3-post.types.d.ts +0 -5238
- package/build/cjs/src/blog-v3-post.types.js +0 -478
- package/build/cjs/src/blog-v3-post.types.js.map +0 -1
- package/build/cjs/src/blog-v3-post.universal.d.ts +0 -5216
- package/build/cjs/src/blog-v3-post.universal.js +0 -1112
- package/build/cjs/src/blog-v3-post.universal.js.map +0 -1
- package/build/cjs/src/blog-v3-tag.context.d.ts +0 -6
- package/build/cjs/src/blog-v3-tag.context.js +0 -53
- package/build/cjs/src/blog-v3-tag.context.js.map +0 -1
- package/build/cjs/src/blog-v3-tag.http.d.ts +0 -40
- package/build/cjs/src/blog-v3-tag.http.js +0 -348
- package/build/cjs/src/blog-v3-tag.http.js.map +0 -1
- package/build/cjs/src/blog-v3-tag.meta.d.ts +0 -22
- package/build/cjs/src/blog-v3-tag.meta.js +0 -104
- package/build/cjs/src/blog-v3-tag.meta.js.map +0 -1
- package/build/cjs/src/blog-v3-tag.public.d.ts +0 -20
- package/build/cjs/src/blog-v3-tag.public.js +0 -37
- package/build/cjs/src/blog-v3-tag.public.js.map +0 -1
- package/build/cjs/src/blog-v3-tag.types.d.ts +0 -675
- package/build/cjs/src/blog-v3-tag.types.js +0 -17
- package/build/cjs/src/blog-v3-tag.types.js.map +0 -1
- package/build/cjs/src/blog-v3-tag.universal.d.ts +0 -819
- package/build/cjs/src/blog-v3-tag.universal.js +0 -364
- package/build/cjs/src/blog-v3-tag.universal.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -4
- package/build/es/index.typings.js +0 -5
- package/build/es/index.typings.js.map +0 -1
- package/build/es/src/blog-v3-category.context.d.ts +0 -6
- package/build/es/src/blog-v3-category.context.js +0 -46
- package/build/es/src/blog-v3-category.context.js.map +0 -1
- package/build/es/src/blog-v3-category.http.d.ts +0 -43
- package/build/es/src/blog-v3-category.http.js +0 -348
- package/build/es/src/blog-v3-category.http.js.map +0 -1
- package/build/es/src/blog-v3-category.meta.d.ts +0 -20
- package/build/es/src/blog-v3-category.meta.js +0 -74
- package/build/es/src/blog-v3-category.meta.js.map +0 -1
- package/build/es/src/blog-v3-category.public.d.ts +0 -43
- package/build/es/src/blog-v3-category.public.js +0 -25
- package/build/es/src/blog-v3-category.public.js.map +0 -1
- package/build/es/src/blog-v3-category.types.d.ts +0 -910
- package/build/es/src/blog-v3-category.types.js +0 -21
- package/build/es/src/blog-v3-category.types.js.map +0 -1
- package/build/es/src/blog-v3-category.universal.d.ts +0 -956
- package/build/es/src/blog-v3-category.universal.js +0 -353
- package/build/es/src/blog-v3-category.universal.js.map +0 -1
- package/build/es/src/blog-v3-draft.context.d.ts +0 -16
- package/build/es/src/blog-v3-draft.context.js +0 -156
- package/build/es/src/blog-v3-draft.context.js.map +0 -1
- package/build/es/src/blog-v3-draft.http.d.ts +0 -79
- package/build/es/src/blog-v3-draft.http.js +0 -1481
- package/build/es/src/blog-v3-draft.http.js.map +0 -1
- package/build/es/src/blog-v3-draft.meta.d.ts +0 -40
- package/build/es/src/blog-v3-draft.meta.js +0 -254
- package/build/es/src/blog-v3-draft.meta.js.map +0 -1
- package/build/es/src/blog-v3-draft.public.d.ts +0 -22
- package/build/es/src/blog-v3-draft.public.js +0 -75
- package/build/es/src/blog-v3-draft.public.js.map +0 -1
- package/build/es/src/blog-v3-draft.types.d.ts +0 -9171
- package/build/es/src/blog-v3-draft.types.js +0 -453
- package/build/es/src/blog-v3-draft.types.js.map +0 -1
- package/build/es/src/blog-v3-draft.universal.d.ts +0 -8816
- package/build/es/src/blog-v3-draft.universal.js +0 -1544
- package/build/es/src/blog-v3-draft.universal.js.map +0 -1
- package/build/es/src/blog-v3-post.context.d.ts +0 -9
- package/build/es/src/blog-v3-post.context.js +0 -79
- package/build/es/src/blog-v3-post.context.js.map +0 -1
- package/build/es/src/blog-v3-post.http.d.ts +0 -80
- package/build/es/src/blog-v3-post.http.js +0 -883
- package/build/es/src/blog-v3-post.http.js.map +0 -1
- package/build/es/src/blog-v3-post.meta.d.ts +0 -25
- package/build/es/src/blog-v3-post.meta.js +0 -128
- package/build/es/src/blog-v3-post.meta.js.map +0 -1
- package/build/es/src/blog-v3-post.public.d.ts +0 -548
- package/build/es/src/blog-v3-post.public.js +0 -40
- package/build/es/src/blog-v3-post.public.js.map +0 -1
- package/build/es/src/blog-v3-post.types.d.ts +0 -5238
- package/build/es/src/blog-v3-post.types.js +0 -475
- package/build/es/src/blog-v3-post.types.js.map +0 -1
- package/build/es/src/blog-v3-post.universal.d.ts +0 -5216
- package/build/es/src/blog-v3-post.universal.js +0 -1079
- package/build/es/src/blog-v3-post.universal.js.map +0 -1
- package/build/es/src/blog-v3-tag.context.d.ts +0 -6
- package/build/es/src/blog-v3-tag.context.js +0 -46
- package/build/es/src/blog-v3-tag.context.js.map +0 -1
- package/build/es/src/blog-v3-tag.http.d.ts +0 -40
- package/build/es/src/blog-v3-tag.http.js +0 -341
- package/build/es/src/blog-v3-tag.http.js.map +0 -1
- package/build/es/src/blog-v3-tag.meta.d.ts +0 -22
- package/build/es/src/blog-v3-tag.meta.js +0 -74
- package/build/es/src/blog-v3-tag.meta.js.map +0 -1
- package/build/es/src/blog-v3-tag.public.d.ts +0 -20
- package/build/es/src/blog-v3-tag.public.js +0 -25
- package/build/es/src/blog-v3-tag.public.js.map +0 -1
- package/build/es/src/blog-v3-tag.types.d.ts +0 -675
- package/build/es/src/blog-v3-tag.types.js +0 -14
- package/build/es/src/blog-v3-tag.types.js.map +0 -1
- package/build/es/src/blog-v3-tag.universal.d.ts +0 -819
- package/build/es/src/blog-v3-tag.universal.js +0 -334
- package/build/es/src/blog-v3-tag.universal.js.map +0 -1
|
@@ -1,1544 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { serializer, transformError, resolveQueryFieldsTransformationPaths, } from '@wix/metro-runtime/velo';
|
|
11
|
-
import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';
|
|
12
|
-
import { EventDefinition } from '@wix/sdk-types';
|
|
13
|
-
import * as ambassadorWixBlogV3Draft from './blog-v3-draft.http';
|
|
14
|
-
// @ts-ignore
|
|
15
|
-
import { wrapWithQueryBuilder } from '@wix/motion-edm-autogen-query-wrapper';
|
|
16
|
-
const _toVeloEntity = '$';
|
|
17
|
-
const _fromVeloEntity = '$';
|
|
18
|
-
export var Origin;
|
|
19
|
-
(function (Origin) {
|
|
20
|
-
Origin["UNKNOWN"] = "UNKNOWN";
|
|
21
|
-
/** Changed by admin */
|
|
22
|
-
Origin["ADMIN"] = "ADMIN";
|
|
23
|
-
/** Categories were changed */
|
|
24
|
-
Origin["ADD_CATEGORIES"] = "ADD_CATEGORIES";
|
|
25
|
-
/** Saved automatically */
|
|
26
|
-
Origin["AUTO_SAVE"] = "AUTO_SAVE";
|
|
27
|
-
/** Copied from template */
|
|
28
|
-
Origin["COPY_TEMPLATE"] = "COPY_TEMPLATE";
|
|
29
|
-
/** Imported */
|
|
30
|
-
Origin["IMPORT"] = "IMPORT";
|
|
31
|
-
/** Imported in bulk */
|
|
32
|
-
Origin["IMPORT_BULK"] = "IMPORT_BULK";
|
|
33
|
-
/** Imported with html import */
|
|
34
|
-
Origin["IMPORT_HTML"] = "IMPORT_HTML";
|
|
35
|
-
/** Patch import */
|
|
36
|
-
Origin["IMPORT_PATCH"] = "IMPORT_PATCH";
|
|
37
|
-
/** Changed language */
|
|
38
|
-
Origin["LANGUAGE_CHANGE"] = "LANGUAGE_CHANGE";
|
|
39
|
-
/** Saved manually */
|
|
40
|
-
Origin["MANUAL_SAVE"] = "MANUAL_SAVE";
|
|
41
|
-
/** Affected by migration */
|
|
42
|
-
Origin["MIGRATION"] = "MIGRATION";
|
|
43
|
-
/** Affected by moderation */
|
|
44
|
-
Origin["MODERATION"] = "MODERATION";
|
|
45
|
-
/** Moved to trash */
|
|
46
|
-
Origin["MOVE_TO_TRASH"] = "MOVE_TO_TRASH";
|
|
47
|
-
/** Pricing plans were changed */
|
|
48
|
-
Origin["PRICING_PLANS_CHANGE"] = "PRICING_PLANS_CHANGE";
|
|
49
|
-
/** Was provisioned */
|
|
50
|
-
Origin["PROVISION"] = "PROVISION";
|
|
51
|
-
/** Was published */
|
|
52
|
-
Origin["PUBLISH"] = "PUBLISH";
|
|
53
|
-
/** Owner was reassigned */
|
|
54
|
-
Origin["REASSIGN_OWNER"] = "REASSIGN_OWNER";
|
|
55
|
-
/** Was reblogged */
|
|
56
|
-
Origin["REBLOG"] = "REBLOG";
|
|
57
|
-
/** Was restored */
|
|
58
|
-
Origin["RESTORE"] = "RESTORE";
|
|
59
|
-
/** Reverted to draft */
|
|
60
|
-
Origin["REVERT_TO_DRAFT"] = "REVERT_TO_DRAFT";
|
|
61
|
-
/** Was translated */
|
|
62
|
-
Origin["TRANSLATION"] = "TRANSLATION";
|
|
63
|
-
/** Was unpublished */
|
|
64
|
-
Origin["UNPUBLISH"] = "UNPUBLISH";
|
|
65
|
-
/** Was unscheduled */
|
|
66
|
-
Origin["UNSCHEDULE"] = "UNSCHEDULE";
|
|
67
|
-
/** New edit session started which updated editing_session_id id */
|
|
68
|
-
Origin["NEW_EDIT_SESSION"] = "NEW_EDIT_SESSION";
|
|
69
|
-
/** Was scheduled by Later */
|
|
70
|
-
Origin["SCHEDULING_SERVICE_SCHEDULE"] = "SCHEDULING_SERVICE_SCHEDULE";
|
|
71
|
-
/** Was unscheduled by Later */
|
|
72
|
-
Origin["SCHEDULING_SERVICE_UNSCHEDULE"] = "SCHEDULING_SERVICE_UNSCHEDULE";
|
|
73
|
-
/** Was published by Later */
|
|
74
|
-
Origin["SCHEDULING_SERVICE_PUBLISH"] = "SCHEDULING_SERVICE_PUBLISH";
|
|
75
|
-
/** Was scheduled */
|
|
76
|
-
Origin["SCHEDULE"] = "SCHEDULE";
|
|
77
|
-
/** Was removed from moderation */
|
|
78
|
-
Origin["REMOVE_FROM_MODERATION"] = "REMOVE_FROM_MODERATION";
|
|
79
|
-
/** Was rejected from moderation */
|
|
80
|
-
Origin["REJECT_FROM_MODERATION"] = "REJECT_FROM_MODERATION";
|
|
81
|
-
/** Was approved in moderation */
|
|
82
|
-
Origin["APPROVE_IN_MODERATION"] = "APPROVE_IN_MODERATION";
|
|
83
|
-
/** Tag was deleted */
|
|
84
|
-
Origin["DELETE_TAG"] = "DELETE_TAG";
|
|
85
|
-
/** Post was pinned */
|
|
86
|
-
Origin["PIN"] = "PIN";
|
|
87
|
-
/** Post was unpinned */
|
|
88
|
-
Origin["UNPIN"] = "UNPIN";
|
|
89
|
-
})(Origin || (Origin = {}));
|
|
90
|
-
export var NodeType;
|
|
91
|
-
(function (NodeType) {
|
|
92
|
-
NodeType["PARAGRAPH"] = "PARAGRAPH";
|
|
93
|
-
NodeType["TEXT"] = "TEXT";
|
|
94
|
-
NodeType["HEADING"] = "HEADING";
|
|
95
|
-
NodeType["BULLETED_LIST"] = "BULLETED_LIST";
|
|
96
|
-
NodeType["ORDERED_LIST"] = "ORDERED_LIST";
|
|
97
|
-
NodeType["LIST_ITEM"] = "LIST_ITEM";
|
|
98
|
-
NodeType["BLOCKQUOTE"] = "BLOCKQUOTE";
|
|
99
|
-
NodeType["CODE_BLOCK"] = "CODE_BLOCK";
|
|
100
|
-
NodeType["VIDEO"] = "VIDEO";
|
|
101
|
-
NodeType["DIVIDER"] = "DIVIDER";
|
|
102
|
-
NodeType["FILE"] = "FILE";
|
|
103
|
-
NodeType["GALLERY"] = "GALLERY";
|
|
104
|
-
NodeType["GIF"] = "GIF";
|
|
105
|
-
NodeType["HTML"] = "HTML";
|
|
106
|
-
NodeType["IMAGE"] = "IMAGE";
|
|
107
|
-
NodeType["LINK_PREVIEW"] = "LINK_PREVIEW";
|
|
108
|
-
NodeType["MAP"] = "MAP";
|
|
109
|
-
NodeType["POLL"] = "POLL";
|
|
110
|
-
NodeType["APP_EMBED"] = "APP_EMBED";
|
|
111
|
-
NodeType["BUTTON"] = "BUTTON";
|
|
112
|
-
NodeType["COLLAPSIBLE_LIST"] = "COLLAPSIBLE_LIST";
|
|
113
|
-
NodeType["TABLE"] = "TABLE";
|
|
114
|
-
NodeType["EMBED"] = "EMBED";
|
|
115
|
-
NodeType["COLLAPSIBLE_ITEM"] = "COLLAPSIBLE_ITEM";
|
|
116
|
-
NodeType["COLLAPSIBLE_ITEM_TITLE"] = "COLLAPSIBLE_ITEM_TITLE";
|
|
117
|
-
NodeType["COLLAPSIBLE_ITEM_BODY"] = "COLLAPSIBLE_ITEM_BODY";
|
|
118
|
-
NodeType["TABLE_CELL"] = "TABLE_CELL";
|
|
119
|
-
NodeType["TABLE_ROW"] = "TABLE_ROW";
|
|
120
|
-
NodeType["EXTERNAL"] = "EXTERNAL";
|
|
121
|
-
NodeType["AUDIO"] = "AUDIO";
|
|
122
|
-
})(NodeType || (NodeType = {}));
|
|
123
|
-
export var WidthType;
|
|
124
|
-
(function (WidthType) {
|
|
125
|
-
/** Width matches the content width */
|
|
126
|
-
WidthType["CONTENT"] = "CONTENT";
|
|
127
|
-
/** Small Width */
|
|
128
|
-
WidthType["SMALL"] = "SMALL";
|
|
129
|
-
/** Width will match the original asset width */
|
|
130
|
-
WidthType["ORIGINAL"] = "ORIGINAL";
|
|
131
|
-
/** coast-to-coast display */
|
|
132
|
-
WidthType["FULL_WIDTH"] = "FULL_WIDTH";
|
|
133
|
-
})(WidthType || (WidthType = {}));
|
|
134
|
-
export var PluginContainerDataAlignment;
|
|
135
|
-
(function (PluginContainerDataAlignment) {
|
|
136
|
-
/** Center Alignment */
|
|
137
|
-
PluginContainerDataAlignment["CENTER"] = "CENTER";
|
|
138
|
-
/** Left Alignment */
|
|
139
|
-
PluginContainerDataAlignment["LEFT"] = "LEFT";
|
|
140
|
-
/** Right Alignment */
|
|
141
|
-
PluginContainerDataAlignment["RIGHT"] = "RIGHT";
|
|
142
|
-
})(PluginContainerDataAlignment || (PluginContainerDataAlignment = {}));
|
|
143
|
-
export var ButtonDataType;
|
|
144
|
-
(function (ButtonDataType) {
|
|
145
|
-
/** Regular link button */
|
|
146
|
-
ButtonDataType["LINK"] = "LINK";
|
|
147
|
-
/** Triggers custom action that is defined in plugin configuration by the consumer */
|
|
148
|
-
ButtonDataType["ACTION"] = "ACTION";
|
|
149
|
-
})(ButtonDataType || (ButtonDataType = {}));
|
|
150
|
-
export var Target;
|
|
151
|
-
(function (Target) {
|
|
152
|
-
/** Opens the linked document in the same frame as it was clicked (this is default) */
|
|
153
|
-
Target["SELF"] = "SELF";
|
|
154
|
-
/** Opens the linked document in a new window or tab */
|
|
155
|
-
Target["BLANK"] = "BLANK";
|
|
156
|
-
/** Opens the linked document in the parent frame */
|
|
157
|
-
Target["PARENT"] = "PARENT";
|
|
158
|
-
/** Opens the linked document in the full body of the window */
|
|
159
|
-
Target["TOP"] = "TOP";
|
|
160
|
-
})(Target || (Target = {}));
|
|
161
|
-
export var TextAlignment;
|
|
162
|
-
(function (TextAlignment) {
|
|
163
|
-
/** browser default, eqivalent to `initial` */
|
|
164
|
-
TextAlignment["AUTO"] = "AUTO";
|
|
165
|
-
/** Left align */
|
|
166
|
-
TextAlignment["LEFT"] = "LEFT";
|
|
167
|
-
/** Right align */
|
|
168
|
-
TextAlignment["RIGHT"] = "RIGHT";
|
|
169
|
-
/** Center align */
|
|
170
|
-
TextAlignment["CENTER"] = "CENTER";
|
|
171
|
-
/** Text is spaced to line up its left and right edges to the left and right edges of the line box, except for the last line. */
|
|
172
|
-
TextAlignment["JUSTIFY"] = "JUSTIFY";
|
|
173
|
-
})(TextAlignment || (TextAlignment = {}));
|
|
174
|
-
export var LineStyle;
|
|
175
|
-
(function (LineStyle) {
|
|
176
|
-
/** Single Line */
|
|
177
|
-
LineStyle["SINGLE"] = "SINGLE";
|
|
178
|
-
/** Double Line */
|
|
179
|
-
LineStyle["DOUBLE"] = "DOUBLE";
|
|
180
|
-
/** Dashed Line */
|
|
181
|
-
LineStyle["DASHED"] = "DASHED";
|
|
182
|
-
/** Dotted Line */
|
|
183
|
-
LineStyle["DOTTED"] = "DOTTED";
|
|
184
|
-
})(LineStyle || (LineStyle = {}));
|
|
185
|
-
export var Width;
|
|
186
|
-
(function (Width) {
|
|
187
|
-
/** Large line */
|
|
188
|
-
Width["LARGE"] = "LARGE";
|
|
189
|
-
/** Medium line */
|
|
190
|
-
Width["MEDIUM"] = "MEDIUM";
|
|
191
|
-
/** Small line */
|
|
192
|
-
Width["SMALL"] = "SMALL";
|
|
193
|
-
})(Width || (Width = {}));
|
|
194
|
-
export var Alignment;
|
|
195
|
-
(function (Alignment) {
|
|
196
|
-
/** Center alignment */
|
|
197
|
-
Alignment["CENTER"] = "CENTER";
|
|
198
|
-
/** Left alignment */
|
|
199
|
-
Alignment["LEFT"] = "LEFT";
|
|
200
|
-
/** Right alignment */
|
|
201
|
-
Alignment["RIGHT"] = "RIGHT";
|
|
202
|
-
})(Alignment || (Alignment = {}));
|
|
203
|
-
export var ViewMode;
|
|
204
|
-
(function (ViewMode) {
|
|
205
|
-
/** No PDF view */
|
|
206
|
-
ViewMode["NONE"] = "NONE";
|
|
207
|
-
/** Full PDF view */
|
|
208
|
-
ViewMode["FULL"] = "FULL";
|
|
209
|
-
/** Mini PDF view */
|
|
210
|
-
ViewMode["MINI"] = "MINI";
|
|
211
|
-
})(ViewMode || (ViewMode = {}));
|
|
212
|
-
export var LayoutType;
|
|
213
|
-
(function (LayoutType) {
|
|
214
|
-
/** Collage type */
|
|
215
|
-
LayoutType["COLLAGE"] = "COLLAGE";
|
|
216
|
-
/** Masonry type */
|
|
217
|
-
LayoutType["MASONRY"] = "MASONRY";
|
|
218
|
-
/** Grid type */
|
|
219
|
-
LayoutType["GRID"] = "GRID";
|
|
220
|
-
/** Thumbnail type */
|
|
221
|
-
LayoutType["THUMBNAIL"] = "THUMBNAIL";
|
|
222
|
-
/** Slider type */
|
|
223
|
-
LayoutType["SLIDER"] = "SLIDER";
|
|
224
|
-
/** Slideshow type */
|
|
225
|
-
LayoutType["SLIDESHOW"] = "SLIDESHOW";
|
|
226
|
-
/** Panorama type */
|
|
227
|
-
LayoutType["PANORAMA"] = "PANORAMA";
|
|
228
|
-
/** Column type */
|
|
229
|
-
LayoutType["COLUMN"] = "COLUMN";
|
|
230
|
-
/** Magic type */
|
|
231
|
-
LayoutType["MAGIC"] = "MAGIC";
|
|
232
|
-
/** Fullsize images type */
|
|
233
|
-
LayoutType["FULLSIZE"] = "FULLSIZE";
|
|
234
|
-
})(LayoutType || (LayoutType = {}));
|
|
235
|
-
export var Orientation;
|
|
236
|
-
(function (Orientation) {
|
|
237
|
-
/** Rows Orientation */
|
|
238
|
-
Orientation["ROWS"] = "ROWS";
|
|
239
|
-
/** Columns Orientation */
|
|
240
|
-
Orientation["COLUMNS"] = "COLUMNS";
|
|
241
|
-
})(Orientation || (Orientation = {}));
|
|
242
|
-
export var Crop;
|
|
243
|
-
(function (Crop) {
|
|
244
|
-
/** Crop to fill */
|
|
245
|
-
Crop["FILL"] = "FILL";
|
|
246
|
-
/** Crop to fit */
|
|
247
|
-
Crop["FIT"] = "FIT";
|
|
248
|
-
})(Crop || (Crop = {}));
|
|
249
|
-
export var ThumbnailsAlignment;
|
|
250
|
-
(function (ThumbnailsAlignment) {
|
|
251
|
-
/** Top alignment */
|
|
252
|
-
ThumbnailsAlignment["TOP"] = "TOP";
|
|
253
|
-
/** Right alignment */
|
|
254
|
-
ThumbnailsAlignment["RIGHT"] = "RIGHT";
|
|
255
|
-
/** Bottom alignment */
|
|
256
|
-
ThumbnailsAlignment["BOTTOM"] = "BOTTOM";
|
|
257
|
-
/** Left alignment */
|
|
258
|
-
ThumbnailsAlignment["LEFT"] = "LEFT";
|
|
259
|
-
/** No thumbnail */
|
|
260
|
-
ThumbnailsAlignment["NONE"] = "NONE";
|
|
261
|
-
})(ThumbnailsAlignment || (ThumbnailsAlignment = {}));
|
|
262
|
-
export var Source;
|
|
263
|
-
(function (Source) {
|
|
264
|
-
Source["HTML"] = "HTML";
|
|
265
|
-
Source["ADSENSE"] = "ADSENSE";
|
|
266
|
-
})(Source || (Source = {}));
|
|
267
|
-
export var MapType;
|
|
268
|
-
(function (MapType) {
|
|
269
|
-
/** Roadmap map type */
|
|
270
|
-
MapType["ROADMAP"] = "ROADMAP";
|
|
271
|
-
/** Satellite map type */
|
|
272
|
-
MapType["SATELITE"] = "SATELITE";
|
|
273
|
-
/** Hybrid map type */
|
|
274
|
-
MapType["HYBRID"] = "HYBRID";
|
|
275
|
-
/** Terrain map type */
|
|
276
|
-
MapType["TERRAIN"] = "TERRAIN";
|
|
277
|
-
})(MapType || (MapType = {}));
|
|
278
|
-
export var ViewRole;
|
|
279
|
-
(function (ViewRole) {
|
|
280
|
-
/** Only Poll creator can view the results */
|
|
281
|
-
ViewRole["CREATOR"] = "CREATOR";
|
|
282
|
-
/** Anyone who voted can see the results */
|
|
283
|
-
ViewRole["VOTERS"] = "VOTERS";
|
|
284
|
-
/** Anyone can see the results, even if one didn't vote */
|
|
285
|
-
ViewRole["EVERYONE"] = "EVERYONE";
|
|
286
|
-
})(ViewRole || (ViewRole = {}));
|
|
287
|
-
export var VoteRole;
|
|
288
|
-
(function (VoteRole) {
|
|
289
|
-
/** Logged in member */
|
|
290
|
-
VoteRole["SITE_MEMBERS"] = "SITE_MEMBERS";
|
|
291
|
-
/** Anyone */
|
|
292
|
-
VoteRole["ALL"] = "ALL";
|
|
293
|
-
})(VoteRole || (VoteRole = {}));
|
|
294
|
-
export var PollLayoutType;
|
|
295
|
-
(function (PollLayoutType) {
|
|
296
|
-
/** List */
|
|
297
|
-
PollLayoutType["LIST"] = "LIST";
|
|
298
|
-
/** Grid */
|
|
299
|
-
PollLayoutType["GRID"] = "GRID";
|
|
300
|
-
})(PollLayoutType || (PollLayoutType = {}));
|
|
301
|
-
export var PollLayoutDirection;
|
|
302
|
-
(function (PollLayoutDirection) {
|
|
303
|
-
/** Left-to-right */
|
|
304
|
-
PollLayoutDirection["LTR"] = "LTR";
|
|
305
|
-
/** Right-to-left */
|
|
306
|
-
PollLayoutDirection["RTL"] = "RTL";
|
|
307
|
-
})(PollLayoutDirection || (PollLayoutDirection = {}));
|
|
308
|
-
export var BackgroundType;
|
|
309
|
-
(function (BackgroundType) {
|
|
310
|
-
/** Color background type */
|
|
311
|
-
BackgroundType["COLOR"] = "COLOR";
|
|
312
|
-
/** Image background type */
|
|
313
|
-
BackgroundType["IMAGE"] = "IMAGE";
|
|
314
|
-
/** Gradiant background type */
|
|
315
|
-
BackgroundType["GRADIENT"] = "GRADIENT";
|
|
316
|
-
})(BackgroundType || (BackgroundType = {}));
|
|
317
|
-
export var DecorationType;
|
|
318
|
-
(function (DecorationType) {
|
|
319
|
-
DecorationType["BOLD"] = "BOLD";
|
|
320
|
-
DecorationType["ITALIC"] = "ITALIC";
|
|
321
|
-
DecorationType["UNDERLINE"] = "UNDERLINE";
|
|
322
|
-
DecorationType["SPOILER"] = "SPOILER";
|
|
323
|
-
DecorationType["ANCHOR"] = "ANCHOR";
|
|
324
|
-
DecorationType["MENTION"] = "MENTION";
|
|
325
|
-
DecorationType["LINK"] = "LINK";
|
|
326
|
-
DecorationType["COLOR"] = "COLOR";
|
|
327
|
-
DecorationType["FONT_SIZE"] = "FONT_SIZE";
|
|
328
|
-
DecorationType["EXTERNAL"] = "EXTERNAL";
|
|
329
|
-
})(DecorationType || (DecorationType = {}));
|
|
330
|
-
export var FontType;
|
|
331
|
-
(function (FontType) {
|
|
332
|
-
FontType["PX"] = "PX";
|
|
333
|
-
FontType["EM"] = "EM";
|
|
334
|
-
})(FontType || (FontType = {}));
|
|
335
|
-
export var AppType;
|
|
336
|
-
(function (AppType) {
|
|
337
|
-
AppType["PRODUCT"] = "PRODUCT";
|
|
338
|
-
AppType["EVENT"] = "EVENT";
|
|
339
|
-
AppType["BOOKING"] = "BOOKING";
|
|
340
|
-
})(AppType || (AppType = {}));
|
|
341
|
-
export var InitialExpandedItems;
|
|
342
|
-
(function (InitialExpandedItems) {
|
|
343
|
-
/** First item will be expended initally */
|
|
344
|
-
InitialExpandedItems["FIRST"] = "FIRST";
|
|
345
|
-
/** All items will expended initally */
|
|
346
|
-
InitialExpandedItems["ALL"] = "ALL";
|
|
347
|
-
/** All items collapsed initally */
|
|
348
|
-
InitialExpandedItems["NONE"] = "NONE";
|
|
349
|
-
})(InitialExpandedItems || (InitialExpandedItems = {}));
|
|
350
|
-
export var Direction;
|
|
351
|
-
(function (Direction) {
|
|
352
|
-
/** Left-to-right */
|
|
353
|
-
Direction["LTR"] = "LTR";
|
|
354
|
-
/** Right-to-left */
|
|
355
|
-
Direction["RTL"] = "RTL";
|
|
356
|
-
})(Direction || (Direction = {}));
|
|
357
|
-
export var VerticalAlignment;
|
|
358
|
-
(function (VerticalAlignment) {
|
|
359
|
-
/** Top alignment */
|
|
360
|
-
VerticalAlignment["TOP"] = "TOP";
|
|
361
|
-
/** Middle alignment */
|
|
362
|
-
VerticalAlignment["MIDDLE"] = "MIDDLE";
|
|
363
|
-
/** Bottom alignment */
|
|
364
|
-
VerticalAlignment["BOTTOM"] = "BOTTOM";
|
|
365
|
-
})(VerticalAlignment || (VerticalAlignment = {}));
|
|
366
|
-
/**
|
|
367
|
-
* `NullValue` is a singleton enumeration to represent the null value for the
|
|
368
|
-
* `Value` type union.
|
|
369
|
-
*
|
|
370
|
-
* The JSON representation for `NullValue` is JSON `null`.
|
|
371
|
-
*/
|
|
372
|
-
export var NullValue;
|
|
373
|
-
(function (NullValue) {
|
|
374
|
-
/** Null value. */
|
|
375
|
-
NullValue["NULL_VALUE"] = "NULL_VALUE";
|
|
376
|
-
})(NullValue || (NullValue = {}));
|
|
377
|
-
export var Status;
|
|
378
|
-
(function (Status) {
|
|
379
|
-
Status["UNKNOWN"] = "UNKNOWN";
|
|
380
|
-
/** Status indicating the draft post is published. */
|
|
381
|
-
Status["PUBLISHED"] = "PUBLISHED";
|
|
382
|
-
/** Status indicating the draft post is unpublished. */
|
|
383
|
-
Status["UNPUBLISHED"] = "UNPUBLISHED";
|
|
384
|
-
/** Status indicating the draft post is scheduled for publication. */
|
|
385
|
-
Status["SCHEDULED"] = "SCHEDULED";
|
|
386
|
-
/** Status indicating the draft post is deleted. */
|
|
387
|
-
Status["DELETED"] = "DELETED";
|
|
388
|
-
/**
|
|
389
|
-
* Deprecated. Use `IN_REVIEW` instead. Status indicating the draft post is in review.
|
|
390
|
-
* Target removal date 2024-06-30
|
|
391
|
-
* Reserved for internal use.
|
|
392
|
-
*/
|
|
393
|
-
Status["IN_MODERATION"] = "IN_MODERATION";
|
|
394
|
-
/** Status indicating the draft post is in review. */
|
|
395
|
-
Status["IN_REVIEW"] = "IN_REVIEW";
|
|
396
|
-
})(Status || (Status = {}));
|
|
397
|
-
export var ModerationStatusStatus;
|
|
398
|
-
(function (ModerationStatusStatus) {
|
|
399
|
-
ModerationStatusStatus["UNKNOWN"] = "UNKNOWN";
|
|
400
|
-
ModerationStatusStatus["APPROVED"] = "APPROVED";
|
|
401
|
-
ModerationStatusStatus["REJECTED"] = "REJECTED";
|
|
402
|
-
})(ModerationStatusStatus || (ModerationStatusStatus = {}));
|
|
403
|
-
export var Type;
|
|
404
|
-
(function (Type) {
|
|
405
|
-
Type["UNKNOWN"] = "UNKNOWN";
|
|
406
|
-
/** Manually saved. */
|
|
407
|
-
Type["MANUAL"] = "MANUAL";
|
|
408
|
-
/** Triggered by autosave. */
|
|
409
|
-
Type["AUTO_SAVE"] = "AUTO_SAVE";
|
|
410
|
-
/** Copied from template during provisioning flow. */
|
|
411
|
-
Type["PROVISIONING"] = "PROVISIONING";
|
|
412
|
-
/** Imported from another blog. */
|
|
413
|
-
Type["IMPORT"] = "IMPORT";
|
|
414
|
-
})(Type || (Type = {}));
|
|
415
|
-
export var Field;
|
|
416
|
-
(function (Field) {
|
|
417
|
-
Field["UNKNOWN"] = "UNKNOWN";
|
|
418
|
-
/** Includes draft post preview URL. */
|
|
419
|
-
Field["URL"] = "URL";
|
|
420
|
-
/**
|
|
421
|
-
* Includes internal id field.
|
|
422
|
-
* Reserved for internal use.
|
|
423
|
-
*/
|
|
424
|
-
Field["INTERNAL_ID"] = "INTERNAL_ID";
|
|
425
|
-
/** Includes content field. */
|
|
426
|
-
Field["CONTENT"] = "CONTENT";
|
|
427
|
-
/** Includes rich content field. */
|
|
428
|
-
Field["RICH_CONTENT"] = "RICH_CONTENT";
|
|
429
|
-
/** Includes draft post translations when present. */
|
|
430
|
-
Field["TRANSLATIONS"] = "TRANSLATIONS";
|
|
431
|
-
/** If the user has not set excerpt, returns the one autogenerated from content. */
|
|
432
|
-
Field["GENERATED_EXCERPT"] = "GENERATED_EXCERPT";
|
|
433
|
-
})(Field || (Field = {}));
|
|
434
|
-
export var Action;
|
|
435
|
-
(function (Action) {
|
|
436
|
-
/** Update draft post properties. */
|
|
437
|
-
Action["UPDATE"] = "UPDATE";
|
|
438
|
-
/** Update and publish draft post. */
|
|
439
|
-
Action["UPDATE_PUBLISH"] = "UPDATE_PUBLISH";
|
|
440
|
-
/** Update and schedule draft post. */
|
|
441
|
-
Action["UPDATE_SCHEDULE"] = "UPDATE_SCHEDULE";
|
|
442
|
-
/** Update and revert to draft a published post. */
|
|
443
|
-
Action["UPDATE_REVERT_TO_DRAFT"] = "UPDATE_REVERT_TO_DRAFT";
|
|
444
|
-
/** Update draft and cancel post scheduling. */
|
|
445
|
-
Action["UPDATE_CANCEL_SCHEDULE"] = "UPDATE_CANCEL_SCHEDULE";
|
|
446
|
-
/** Update and reject draft post in moderation. */
|
|
447
|
-
Action["UPDATE_REJECT"] = "UPDATE_REJECT";
|
|
448
|
-
/** Update published draft post. */
|
|
449
|
-
Action["UPDATE_PUBLICATION"] = "UPDATE_PUBLICATION";
|
|
450
|
-
})(Action || (Action = {}));
|
|
451
|
-
export var GetDraftPostsSort;
|
|
452
|
-
(function (GetDraftPostsSort) {
|
|
453
|
-
/** Sorting by editing date descending. */
|
|
454
|
-
GetDraftPostsSort["EDITING_DATE_DESC"] = "EDITING_DATE_DESC";
|
|
455
|
-
/** Sorting by editing date ascending. */
|
|
456
|
-
GetDraftPostsSort["EDITING_DATE_ASC"] = "EDITING_DATE_ASC";
|
|
457
|
-
})(GetDraftPostsSort || (GetDraftPostsSort = {}));
|
|
458
|
-
export var SortOrder;
|
|
459
|
-
(function (SortOrder) {
|
|
460
|
-
SortOrder["ASC"] = "ASC";
|
|
461
|
-
SortOrder["DESC"] = "DESC";
|
|
462
|
-
})(SortOrder || (SortOrder = {}));
|
|
463
|
-
export var TotalDraftPostsGroupingField;
|
|
464
|
-
(function (TotalDraftPostsGroupingField) {
|
|
465
|
-
/** Groups results by status. */
|
|
466
|
-
TotalDraftPostsGroupingField["STATUS"] = "STATUS";
|
|
467
|
-
/** Groups results by language. */
|
|
468
|
-
TotalDraftPostsGroupingField["LANGUAGE"] = "LANGUAGE";
|
|
469
|
-
})(TotalDraftPostsGroupingField || (TotalDraftPostsGroupingField = {}));
|
|
470
|
-
const _bulkCreateDraftPostsRequest = { draftPosts: '_draftPost' };
|
|
471
|
-
const _bulkCreateDraftPostsResponse = { results: '_bulkDraftPostResult' };
|
|
472
|
-
const _bulkDeleteDraftPostsRequest = {};
|
|
473
|
-
const _bulkDeleteDraftPostsResponse = { results: '_bulkDraftPostResult' };
|
|
474
|
-
const _bulkDraftPostResult = { item: '_draftPost' };
|
|
475
|
-
const _bulkUpdateDraftPostsRequest = { draftPosts: '_maskedDraftPosts' };
|
|
476
|
-
const _bulkUpdateDraftPostsResponse = { results: '_bulkDraftPostResult' };
|
|
477
|
-
const _coverMedia = { image: 'wix.common.Image', video: 'wix.common.Video' };
|
|
478
|
-
const _createDraftPostRequest = { draftPost: '_draftPost' };
|
|
479
|
-
const _createDraftPostResponse = { draftPost: '_draftPost' };
|
|
480
|
-
const _deleteDraftPostRequest = {};
|
|
481
|
-
const _deleteDraftPostResponse = {};
|
|
482
|
-
const _draftPost = {
|
|
483
|
-
heroImage: 'wix.common.Image',
|
|
484
|
-
url: 'wix.common.PageUrl',
|
|
485
|
-
coverMedia: '_coverMedia',
|
|
486
|
-
richContent: '_richContent',
|
|
487
|
-
media: '_media',
|
|
488
|
-
translations: '_draftPostTranslation',
|
|
489
|
-
};
|
|
490
|
-
const _draftPostTranslation = { url: 'wix.common.PageUrl' };
|
|
491
|
-
const _getDeletedDraftPostRequest = {};
|
|
492
|
-
const _getDeletedDraftPostResponse = { draftPost: '_draftPost' };
|
|
493
|
-
const _getDraftPostRequest = {};
|
|
494
|
-
const _getDraftPostResponse = { draftPost: '_draftPost' };
|
|
495
|
-
const _listDeletedDraftPostsRequest = {};
|
|
496
|
-
const _listDeletedDraftPostsResponse = { draftPosts: '_draftPost' };
|
|
497
|
-
const _listDraftPostsRequest = {};
|
|
498
|
-
const _listDraftPostsResponse = { draftPosts: '_draftPost' };
|
|
499
|
-
const _maskedDraftPosts = { draftPost: '_draftPost' };
|
|
500
|
-
const _media = { wixMedia: '_wixMedia' };
|
|
501
|
-
const _node = { nodes: '_node' };
|
|
502
|
-
const _publishDraftPostRequest = {};
|
|
503
|
-
const _publishDraftPostResponse = {};
|
|
504
|
-
const _queryDraftPostsRequest = {};
|
|
505
|
-
const _queryDraftPostsResponse = { draftPosts: '_draftPost' };
|
|
506
|
-
const _removeFromTrashBinRequest = {};
|
|
507
|
-
const _removeFromTrashBinResponse = {};
|
|
508
|
-
const _restoreFromTrashBinRequest = {};
|
|
509
|
-
const _restoreFromTrashBinResponse = { draftPost: '_draftPost' };
|
|
510
|
-
const _richContent = { nodes: '_node' };
|
|
511
|
-
const _updateDraftPostRequest = { draftPost: '_draftPost' };
|
|
512
|
-
const _updateDraftPostResponse = { draftPost: '_draftPost' };
|
|
513
|
-
const _wixMedia = { image: 'wix.common.Image', videoV2: 'wix.common.VideoV2' };
|
|
514
|
-
export const onDraftCreated = EventDefinition('wix.blog.v3.draft_created')();
|
|
515
|
-
export const onDraftUpdated = EventDefinition('wix.blog.v3.draft_updated')();
|
|
516
|
-
export const onDraftDeleted = EventDefinition('wix.blog.v3.draft_deleted')();
|
|
517
|
-
/**
|
|
518
|
-
* Creates a draft post.
|
|
519
|
-
*
|
|
520
|
-
* The draft post's `memberId` is required for third-party apps.
|
|
521
|
-
* @param draftPost - Draft post to create.
|
|
522
|
-
* @public
|
|
523
|
-
* @requiredField draftPost
|
|
524
|
-
* @requiredField draftPost.title
|
|
525
|
-
* @param options - Options for creating a draft post.
|
|
526
|
-
* @permissionScope Manage Blog
|
|
527
|
-
* @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
|
|
528
|
-
* @applicableIdentity APP
|
|
529
|
-
*/
|
|
530
|
-
export function createDraftPost(draftPost, options) {
|
|
531
|
-
var _a, _b, _c;
|
|
532
|
-
return __awaiter(this, arguments, void 0, function* () {
|
|
533
|
-
const requestTransformation = {
|
|
534
|
-
draftPost: '$[0]',
|
|
535
|
-
publish: '$[1].publish',
|
|
536
|
-
fieldsets: '$[1].fieldsets',
|
|
537
|
-
};
|
|
538
|
-
const responseTransformation = '$';
|
|
539
|
-
// @ts-ignore
|
|
540
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
541
|
-
const { toAmbassadorRequest } = serializer({
|
|
542
|
-
rootSchema: _createDraftPostRequest,
|
|
543
|
-
depSchemas: {
|
|
544
|
-
_coverMedia,
|
|
545
|
-
_draftPost,
|
|
546
|
-
_draftPostTranslation,
|
|
547
|
-
_media,
|
|
548
|
-
_node,
|
|
549
|
-
_richContent,
|
|
550
|
-
_wixMedia,
|
|
551
|
-
},
|
|
552
|
-
fqdnTransformation: {
|
|
553
|
-
paths: [...['draftPost']],
|
|
554
|
-
transformation: _fromVeloEntity,
|
|
555
|
-
},
|
|
556
|
-
customTransformation: requestTransformation,
|
|
557
|
-
});
|
|
558
|
-
const { fromJSON } = serializer({
|
|
559
|
-
rootSchema: _createDraftPostResponse,
|
|
560
|
-
depSchemas: {
|
|
561
|
-
_coverMedia,
|
|
562
|
-
_draftPost,
|
|
563
|
-
_draftPostTranslation,
|
|
564
|
-
_media,
|
|
565
|
-
_node,
|
|
566
|
-
_richContent,
|
|
567
|
-
_wixMedia,
|
|
568
|
-
},
|
|
569
|
-
fqdnTransformation: {
|
|
570
|
-
paths: [...['draftPost']],
|
|
571
|
-
transformation: _toVeloEntity,
|
|
572
|
-
},
|
|
573
|
-
customTransformation: responseTransformation,
|
|
574
|
-
});
|
|
575
|
-
const payload = toAmbassadorRequest([draftPost, options]);
|
|
576
|
-
const reqOpts = ambassadorWixBlogV3Draft.createDraftPost(payload);
|
|
577
|
-
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
578
|
-
try {
|
|
579
|
-
const result = yield httpClient.request(reqOpts);
|
|
580
|
-
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
581
|
-
return fromJSON(result.data);
|
|
582
|
-
}
|
|
583
|
-
catch (err) {
|
|
584
|
-
const transformedError = sdkTransformError(err, {
|
|
585
|
-
spreadPathsToArguments: {},
|
|
586
|
-
explicitPathsToArguments: {
|
|
587
|
-
draftPost: '$[0]',
|
|
588
|
-
publish: '$[1].publish',
|
|
589
|
-
fieldsets: '$[1].fieldsets',
|
|
590
|
-
},
|
|
591
|
-
singleArgumentUnchanged: false,
|
|
592
|
-
}, ['draftPost', 'options']);
|
|
593
|
-
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
594
|
-
throw transformedError;
|
|
595
|
-
}
|
|
596
|
-
});
|
|
597
|
-
}
|
|
598
|
-
/**
|
|
599
|
-
* Creates multiple draft posts.
|
|
600
|
-
* @param draftPosts - Draft posts to create.
|
|
601
|
-
* @public
|
|
602
|
-
* @documentationMaturity preview
|
|
603
|
-
* @requiredField draftPosts
|
|
604
|
-
* @requiredField draftPosts.title
|
|
605
|
-
* @permissionScope Manage Blog
|
|
606
|
-
* @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
|
|
607
|
-
* @permissionScope Manage Members
|
|
608
|
-
* @permissionScopeId SCOPE.DC-MEMBERS.MANAGE-MEMBERS
|
|
609
|
-
* @permissionScope Manage Bookings Services and Settings
|
|
610
|
-
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
611
|
-
* @permissionScope Read Members and Contacts - all read permissions
|
|
612
|
-
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS
|
|
613
|
-
* @permissionScope Read Members
|
|
614
|
-
* @permissionScopeId SCOPE.DC-MEMBERS.READ-MEMBERS
|
|
615
|
-
* @permissionScope Manage Members and Contacts - all permissions
|
|
616
|
-
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
|
|
617
|
-
* @applicableIdentity APP
|
|
618
|
-
* @applicableIdentity MEMBER
|
|
619
|
-
* @applicableIdentity VISITOR
|
|
620
|
-
*/
|
|
621
|
-
export function bulkCreateDraftPosts(draftPosts, options) {
|
|
622
|
-
var _a, _b, _c;
|
|
623
|
-
return __awaiter(this, arguments, void 0, function* () {
|
|
624
|
-
const requestTransformation = {
|
|
625
|
-
draftPosts: '$[0]',
|
|
626
|
-
publish: '$[1].publish',
|
|
627
|
-
returnFullEntity: '$[1].returnFullEntity',
|
|
628
|
-
fieldsets: '$[1].fieldsets',
|
|
629
|
-
};
|
|
630
|
-
const responseTransformation = '$';
|
|
631
|
-
// @ts-ignore
|
|
632
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
633
|
-
const { toAmbassadorRequest } = serializer({
|
|
634
|
-
rootSchema: _bulkCreateDraftPostsRequest,
|
|
635
|
-
depSchemas: {
|
|
636
|
-
_coverMedia,
|
|
637
|
-
_draftPost,
|
|
638
|
-
_draftPostTranslation,
|
|
639
|
-
_media,
|
|
640
|
-
_node,
|
|
641
|
-
_richContent,
|
|
642
|
-
_wixMedia,
|
|
643
|
-
},
|
|
644
|
-
fqdnTransformation: {
|
|
645
|
-
paths: [...['Array#draftPosts']],
|
|
646
|
-
transformation: _fromVeloEntity,
|
|
647
|
-
},
|
|
648
|
-
customTransformation: requestTransformation,
|
|
649
|
-
});
|
|
650
|
-
const { fromJSON } = serializer({
|
|
651
|
-
rootSchema: _bulkCreateDraftPostsResponse,
|
|
652
|
-
depSchemas: {
|
|
653
|
-
_bulkDraftPostResult,
|
|
654
|
-
_coverMedia,
|
|
655
|
-
_draftPost,
|
|
656
|
-
_draftPostTranslation,
|
|
657
|
-
_media,
|
|
658
|
-
_node,
|
|
659
|
-
_richContent,
|
|
660
|
-
_wixMedia,
|
|
661
|
-
},
|
|
662
|
-
fqdnTransformation: {
|
|
663
|
-
paths: [...['Array#results.item']],
|
|
664
|
-
transformation: _toVeloEntity,
|
|
665
|
-
},
|
|
666
|
-
customTransformation: responseTransformation,
|
|
667
|
-
});
|
|
668
|
-
const payload = toAmbassadorRequest([draftPosts, options]);
|
|
669
|
-
const reqOpts = ambassadorWixBlogV3Draft.bulkCreateDraftPosts(payload);
|
|
670
|
-
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
671
|
-
try {
|
|
672
|
-
const result = yield httpClient.request(reqOpts);
|
|
673
|
-
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
674
|
-
return fromJSON(result.data);
|
|
675
|
-
}
|
|
676
|
-
catch (err) {
|
|
677
|
-
const transformedError = sdkTransformError(err, {
|
|
678
|
-
spreadPathsToArguments: {},
|
|
679
|
-
explicitPathsToArguments: {
|
|
680
|
-
draftPosts: '$[0]',
|
|
681
|
-
publish: '$[1].publish',
|
|
682
|
-
returnFullEntity: '$[1].returnFullEntity',
|
|
683
|
-
fieldsets: '$[1].fieldsets',
|
|
684
|
-
},
|
|
685
|
-
singleArgumentUnchanged: false,
|
|
686
|
-
}, ['draftPosts', 'options']);
|
|
687
|
-
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
688
|
-
throw transformedError;
|
|
689
|
-
}
|
|
690
|
-
});
|
|
691
|
-
}
|
|
692
|
-
/**
|
|
693
|
-
* Updates multiple draft posts.
|
|
694
|
-
* @public
|
|
695
|
-
* @requiredField options.draftPosts.draftPost
|
|
696
|
-
* @requiredField options.draftPosts.draftPost._id
|
|
697
|
-
* @param options - Options for updating multiple draft posts.
|
|
698
|
-
* @permissionScope Manage Blog
|
|
699
|
-
* @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
|
|
700
|
-
* @permissionScope Manage Members
|
|
701
|
-
* @permissionScopeId SCOPE.DC-MEMBERS.MANAGE-MEMBERS
|
|
702
|
-
* @permissionScope Manage Bookings Services and Settings
|
|
703
|
-
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
704
|
-
* @permissionScope Read Members and Contacts - all read permissions
|
|
705
|
-
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS
|
|
706
|
-
* @permissionScope Read Members
|
|
707
|
-
* @permissionScopeId SCOPE.DC-MEMBERS.READ-MEMBERS
|
|
708
|
-
* @permissionScope Manage Members and Contacts - all permissions
|
|
709
|
-
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
|
|
710
|
-
* @applicableIdentity APP
|
|
711
|
-
* @applicableIdentity MEMBER
|
|
712
|
-
* @applicableIdentity VISITOR
|
|
713
|
-
*/
|
|
714
|
-
export function bulkUpdateDraftPosts(options) {
|
|
715
|
-
var _a, _b, _c;
|
|
716
|
-
return __awaiter(this, arguments, void 0, function* () {
|
|
717
|
-
const requestTransformation = {
|
|
718
|
-
draftPosts: '$[0].draftPosts',
|
|
719
|
-
action: '$[0].action',
|
|
720
|
-
scheduledPublishDate: '$[0].scheduledPublishDate',
|
|
721
|
-
returnFullEntity: '$[0].returnFullEntity',
|
|
722
|
-
fieldsets: '$[0].fieldsets',
|
|
723
|
-
};
|
|
724
|
-
const responseTransformation = '$';
|
|
725
|
-
// @ts-ignore
|
|
726
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
727
|
-
const { toAmbassadorRequest } = serializer({
|
|
728
|
-
rootSchema: _bulkUpdateDraftPostsRequest,
|
|
729
|
-
depSchemas: {
|
|
730
|
-
_coverMedia,
|
|
731
|
-
_draftPost,
|
|
732
|
-
_draftPostTranslation,
|
|
733
|
-
_maskedDraftPosts,
|
|
734
|
-
_media,
|
|
735
|
-
_node,
|
|
736
|
-
_richContent,
|
|
737
|
-
_wixMedia,
|
|
738
|
-
},
|
|
739
|
-
fqdnTransformation: {
|
|
740
|
-
paths: [...['Array#draftPosts.draftPost']],
|
|
741
|
-
transformation: _fromVeloEntity,
|
|
742
|
-
},
|
|
743
|
-
customTransformation: requestTransformation,
|
|
744
|
-
});
|
|
745
|
-
const { fromJSON } = serializer({
|
|
746
|
-
rootSchema: _bulkUpdateDraftPostsResponse,
|
|
747
|
-
depSchemas: {
|
|
748
|
-
_bulkDraftPostResult,
|
|
749
|
-
_coverMedia,
|
|
750
|
-
_draftPost,
|
|
751
|
-
_draftPostTranslation,
|
|
752
|
-
_media,
|
|
753
|
-
_node,
|
|
754
|
-
_richContent,
|
|
755
|
-
_wixMedia,
|
|
756
|
-
},
|
|
757
|
-
fqdnTransformation: {
|
|
758
|
-
paths: [...['Array#results.item']],
|
|
759
|
-
transformation: _toVeloEntity,
|
|
760
|
-
},
|
|
761
|
-
customTransformation: responseTransformation,
|
|
762
|
-
});
|
|
763
|
-
const payload = toAmbassadorRequest([options]);
|
|
764
|
-
const reqOpts = ambassadorWixBlogV3Draft.bulkUpdateDraftPosts(payload);
|
|
765
|
-
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
766
|
-
try {
|
|
767
|
-
const result = yield httpClient.request(reqOpts);
|
|
768
|
-
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
769
|
-
return fromJSON(result.data);
|
|
770
|
-
}
|
|
771
|
-
catch (err) {
|
|
772
|
-
const transformedError = sdkTransformError(err, {
|
|
773
|
-
spreadPathsToArguments: {},
|
|
774
|
-
explicitPathsToArguments: {
|
|
775
|
-
draftPosts: '$[0].draftPosts',
|
|
776
|
-
action: '$[0].action',
|
|
777
|
-
scheduledPublishDate: '$[0].scheduledPublishDate',
|
|
778
|
-
returnFullEntity: '$[0].returnFullEntity',
|
|
779
|
-
fieldsets: '$[0].fieldsets',
|
|
780
|
-
},
|
|
781
|
-
singleArgumentUnchanged: false,
|
|
782
|
-
}, ['options']);
|
|
783
|
-
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
784
|
-
throw transformedError;
|
|
785
|
-
}
|
|
786
|
-
});
|
|
787
|
-
}
|
|
788
|
-
/**
|
|
789
|
-
* Retrieves a list of up to 100 deleted draft posts.
|
|
790
|
-
*
|
|
791
|
-
* List Deleted Draft Posts runs with these defaults, which you can override:
|
|
792
|
-
* - `editedDate` is sorted in descending order. In this case,`editedDate` implies the date the post was deleted.
|
|
793
|
-
* - `paging.limit` is `50`.
|
|
794
|
-
* - `paging.offset` is `0`.
|
|
795
|
-
* @public
|
|
796
|
-
* @param options - Options for listing deleted draft posts.
|
|
797
|
-
* @permissionScope Manage Blog
|
|
798
|
-
* @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
|
|
799
|
-
* @applicableIdentity APP
|
|
800
|
-
*/
|
|
801
|
-
export function listDeletedDraftPosts(options) {
|
|
802
|
-
var _a, _b, _c;
|
|
803
|
-
return __awaiter(this, arguments, void 0, function* () {
|
|
804
|
-
const requestTransformation = {
|
|
805
|
-
language: '$[0].language',
|
|
806
|
-
sort: '$[0].sort',
|
|
807
|
-
paging: '$[0].paging',
|
|
808
|
-
fieldsets: '$[0].fieldsets',
|
|
809
|
-
draftPostIds: '$[0].draftPostIds',
|
|
810
|
-
};
|
|
811
|
-
const responseTransformation = '$';
|
|
812
|
-
// @ts-ignore
|
|
813
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
814
|
-
const { toAmbassadorRequest } = serializer({
|
|
815
|
-
rootSchema: _listDeletedDraftPostsRequest,
|
|
816
|
-
depSchemas: {},
|
|
817
|
-
fqdnTransformation: {
|
|
818
|
-
paths: [],
|
|
819
|
-
transformation: _fromVeloEntity,
|
|
820
|
-
},
|
|
821
|
-
customTransformation: requestTransformation,
|
|
822
|
-
});
|
|
823
|
-
const { fromJSON } = serializer({
|
|
824
|
-
rootSchema: _listDeletedDraftPostsResponse,
|
|
825
|
-
depSchemas: {
|
|
826
|
-
_coverMedia,
|
|
827
|
-
_draftPost,
|
|
828
|
-
_draftPostTranslation,
|
|
829
|
-
_media,
|
|
830
|
-
_node,
|
|
831
|
-
_richContent,
|
|
832
|
-
_wixMedia,
|
|
833
|
-
},
|
|
834
|
-
fqdnTransformation: {
|
|
835
|
-
paths: [...['Array#draftPosts']],
|
|
836
|
-
transformation: _toVeloEntity,
|
|
837
|
-
},
|
|
838
|
-
customTransformation: responseTransformation,
|
|
839
|
-
});
|
|
840
|
-
const payload = toAmbassadorRequest([options]);
|
|
841
|
-
const reqOpts = ambassadorWixBlogV3Draft.listDeletedDraftPosts(payload);
|
|
842
|
-
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
843
|
-
try {
|
|
844
|
-
const result = yield httpClient.request(reqOpts);
|
|
845
|
-
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
846
|
-
return fromJSON(result.data);
|
|
847
|
-
}
|
|
848
|
-
catch (err) {
|
|
849
|
-
const transformedError = sdkTransformError(err, {
|
|
850
|
-
spreadPathsToArguments: {},
|
|
851
|
-
explicitPathsToArguments: {
|
|
852
|
-
language: '$[0].language',
|
|
853
|
-
sort: '$[0].sort',
|
|
854
|
-
paging: '$[0].paging',
|
|
855
|
-
fieldsets: '$[0].fieldsets',
|
|
856
|
-
draftPostIds: '$[0].draftPostIds',
|
|
857
|
-
},
|
|
858
|
-
singleArgumentUnchanged: false,
|
|
859
|
-
}, ['options']);
|
|
860
|
-
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
861
|
-
throw transformedError;
|
|
862
|
-
}
|
|
863
|
-
});
|
|
864
|
-
}
|
|
865
|
-
/**
|
|
866
|
-
* Gets a draft post by the provided ID.
|
|
867
|
-
*
|
|
868
|
-
* Uses the provided `draftPostId` to retrieve a draft post.
|
|
869
|
-
* @param draftPostId - Draft post ID.
|
|
870
|
-
* @public
|
|
871
|
-
* @requiredField draftPostId
|
|
872
|
-
* @param options - Options for getting a draft post.
|
|
873
|
-
* @permissionScope Manage Blog
|
|
874
|
-
* @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
|
|
875
|
-
* @applicableIdentity APP
|
|
876
|
-
*/
|
|
877
|
-
export function getDraftPost(draftPostId, options) {
|
|
878
|
-
var _a, _b, _c;
|
|
879
|
-
return __awaiter(this, arguments, void 0, function* () {
|
|
880
|
-
const requestTransformation = {
|
|
881
|
-
draftPostId: '$[0]',
|
|
882
|
-
fieldsets: '$[1].fieldsets',
|
|
883
|
-
};
|
|
884
|
-
const responseTransformation = '$';
|
|
885
|
-
// @ts-ignore
|
|
886
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
887
|
-
const { toAmbassadorRequest } = serializer({
|
|
888
|
-
rootSchema: _getDraftPostRequest,
|
|
889
|
-
depSchemas: {},
|
|
890
|
-
fqdnTransformation: {
|
|
891
|
-
paths: [],
|
|
892
|
-
transformation: _fromVeloEntity,
|
|
893
|
-
},
|
|
894
|
-
customTransformation: requestTransformation,
|
|
895
|
-
});
|
|
896
|
-
const { fromJSON } = serializer({
|
|
897
|
-
rootSchema: _getDraftPostResponse,
|
|
898
|
-
depSchemas: {
|
|
899
|
-
_coverMedia,
|
|
900
|
-
_draftPost,
|
|
901
|
-
_draftPostTranslation,
|
|
902
|
-
_media,
|
|
903
|
-
_node,
|
|
904
|
-
_richContent,
|
|
905
|
-
_wixMedia,
|
|
906
|
-
},
|
|
907
|
-
fqdnTransformation: {
|
|
908
|
-
paths: [...['draftPost']],
|
|
909
|
-
transformation: _toVeloEntity,
|
|
910
|
-
},
|
|
911
|
-
customTransformation: responseTransformation,
|
|
912
|
-
});
|
|
913
|
-
const payload = toAmbassadorRequest([draftPostId, options]);
|
|
914
|
-
const reqOpts = ambassadorWixBlogV3Draft.getDraftPost(payload);
|
|
915
|
-
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
916
|
-
try {
|
|
917
|
-
const result = yield httpClient.request(reqOpts);
|
|
918
|
-
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
919
|
-
return fromJSON(result.data);
|
|
920
|
-
}
|
|
921
|
-
catch (err) {
|
|
922
|
-
const transformedError = sdkTransformError(err, {
|
|
923
|
-
spreadPathsToArguments: {},
|
|
924
|
-
explicitPathsToArguments: {
|
|
925
|
-
draftPostId: '$[0]',
|
|
926
|
-
fieldsets: '$[1].fieldsets',
|
|
927
|
-
},
|
|
928
|
-
singleArgumentUnchanged: false,
|
|
929
|
-
}, ['draftPostId', 'options']);
|
|
930
|
-
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
931
|
-
throw transformedError;
|
|
932
|
-
}
|
|
933
|
-
});
|
|
934
|
-
}
|
|
935
|
-
/**
|
|
936
|
-
* Updates a specified draft post.
|
|
937
|
-
* @param _id - Draft post ID.
|
|
938
|
-
* @public
|
|
939
|
-
* @requiredField _id
|
|
940
|
-
* @requiredField draftPost
|
|
941
|
-
* @param options - Options for updating a draft post.
|
|
942
|
-
* @param draftPost - Draft Post info.
|
|
943
|
-
* @permissionScope Manage Blog
|
|
944
|
-
* @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
|
|
945
|
-
* @permissionScope Manage Members
|
|
946
|
-
* @permissionScopeId SCOPE.DC-MEMBERS.MANAGE-MEMBERS
|
|
947
|
-
* @permissionScope Manage Bookings Services and Settings
|
|
948
|
-
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
949
|
-
* @permissionScope Read Members and Contacts - all read permissions
|
|
950
|
-
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.READ-MEMBERS-CONTACTS
|
|
951
|
-
* @permissionScope Read Members
|
|
952
|
-
* @permissionScopeId SCOPE.DC-MEMBERS.READ-MEMBERS
|
|
953
|
-
* @permissionScope Manage Members and Contacts - all permissions
|
|
954
|
-
* @permissionScopeId SCOPE.DC-CONTACTS-MEGA.MANAGE-MEMBERS-CONTACTS
|
|
955
|
-
* @applicableIdentity APP
|
|
956
|
-
* @applicableIdentity MEMBER
|
|
957
|
-
* @applicableIdentity VISITOR
|
|
958
|
-
*/
|
|
959
|
-
export function updateDraftPost(_id, draftPost, options) {
|
|
960
|
-
var _a, _b, _c;
|
|
961
|
-
return __awaiter(this, arguments, void 0, function* () {
|
|
962
|
-
const requestTransformation = {
|
|
963
|
-
draftPost: { '*': '$[1]', id: '$[0]' },
|
|
964
|
-
action: '$[2].action',
|
|
965
|
-
scheduledPublishDate: '$[2].scheduledPublishDate',
|
|
966
|
-
fieldsets: '$[2].fieldsets',
|
|
967
|
-
};
|
|
968
|
-
const responseTransformation = '$';
|
|
969
|
-
// @ts-ignore
|
|
970
|
-
const { httpClient, sideEffects } = arguments[3];
|
|
971
|
-
const { toAmbassadorRequest } = serializer({
|
|
972
|
-
rootSchema: _updateDraftPostRequest,
|
|
973
|
-
depSchemas: {
|
|
974
|
-
_coverMedia,
|
|
975
|
-
_draftPost,
|
|
976
|
-
_draftPostTranslation,
|
|
977
|
-
_media,
|
|
978
|
-
_node,
|
|
979
|
-
_richContent,
|
|
980
|
-
_wixMedia,
|
|
981
|
-
},
|
|
982
|
-
fqdnTransformation: {
|
|
983
|
-
paths: [...['draftPost']],
|
|
984
|
-
transformation: _fromVeloEntity,
|
|
985
|
-
},
|
|
986
|
-
customTransformation: requestTransformation,
|
|
987
|
-
});
|
|
988
|
-
const { fromJSON } = serializer({
|
|
989
|
-
rootSchema: _updateDraftPostResponse,
|
|
990
|
-
depSchemas: {
|
|
991
|
-
_coverMedia,
|
|
992
|
-
_draftPost,
|
|
993
|
-
_draftPostTranslation,
|
|
994
|
-
_media,
|
|
995
|
-
_node,
|
|
996
|
-
_richContent,
|
|
997
|
-
_wixMedia,
|
|
998
|
-
},
|
|
999
|
-
fqdnTransformation: {
|
|
1000
|
-
paths: [...['draftPost']],
|
|
1001
|
-
transformation: _toVeloEntity,
|
|
1002
|
-
},
|
|
1003
|
-
customTransformation: responseTransformation,
|
|
1004
|
-
});
|
|
1005
|
-
const payload = toAmbassadorRequest([_id, draftPost, options]);
|
|
1006
|
-
const reqOpts = ambassadorWixBlogV3Draft.updateDraftPost(payload);
|
|
1007
|
-
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
1008
|
-
try {
|
|
1009
|
-
const result = yield httpClient.request(reqOpts);
|
|
1010
|
-
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
1011
|
-
return fromJSON(result.data);
|
|
1012
|
-
}
|
|
1013
|
-
catch (err) {
|
|
1014
|
-
const transformedError = sdkTransformError(err, {
|
|
1015
|
-
spreadPathsToArguments: { draftPost: '$[1]' },
|
|
1016
|
-
explicitPathsToArguments: {
|
|
1017
|
-
'draftPost.id': '$[0]',
|
|
1018
|
-
action: '$[2].action',
|
|
1019
|
-
scheduledPublishDate: '$[2].scheduledPublishDate',
|
|
1020
|
-
fieldsets: '$[2].fieldsets',
|
|
1021
|
-
},
|
|
1022
|
-
singleArgumentUnchanged: false,
|
|
1023
|
-
}, ['_id', 'draftPost', 'options']);
|
|
1024
|
-
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
1025
|
-
throw transformedError;
|
|
1026
|
-
}
|
|
1027
|
-
});
|
|
1028
|
-
}
|
|
1029
|
-
/**
|
|
1030
|
-
* Moves a draft post with the provided ID to the trash bin.
|
|
1031
|
-
* A published post can also be deleted by its provided `draftPostId`.
|
|
1032
|
-
*
|
|
1033
|
-
* The optional `permanent` field enables you to delete a post permanently, bypassing the trash bin. When a draft post is deleted this way, it can't be restored.
|
|
1034
|
-
* @param draftPostId - Draft post ID.
|
|
1035
|
-
* @public
|
|
1036
|
-
* @requiredField draftPostId
|
|
1037
|
-
* @param options - Options for deleting a draft post.
|
|
1038
|
-
* @permissionScope Manage Blog
|
|
1039
|
-
* @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
|
|
1040
|
-
* @applicableIdentity APP
|
|
1041
|
-
*/
|
|
1042
|
-
export function deleteDraftPost(draftPostId, options) {
|
|
1043
|
-
var _a, _b, _c;
|
|
1044
|
-
return __awaiter(this, arguments, void 0, function* () {
|
|
1045
|
-
const requestTransformation = {
|
|
1046
|
-
draftPostId: '$[0]',
|
|
1047
|
-
permanent: '$[1].permanent',
|
|
1048
|
-
};
|
|
1049
|
-
const responseTransformation = '$';
|
|
1050
|
-
// @ts-ignore
|
|
1051
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
1052
|
-
const { toAmbassadorRequest } = serializer({
|
|
1053
|
-
rootSchema: _deleteDraftPostRequest,
|
|
1054
|
-
depSchemas: {},
|
|
1055
|
-
fqdnTransformation: {
|
|
1056
|
-
paths: [],
|
|
1057
|
-
transformation: _fromVeloEntity,
|
|
1058
|
-
},
|
|
1059
|
-
customTransformation: requestTransformation,
|
|
1060
|
-
});
|
|
1061
|
-
const { fromJSON } = serializer({
|
|
1062
|
-
rootSchema: _deleteDraftPostResponse,
|
|
1063
|
-
depSchemas: {},
|
|
1064
|
-
fqdnTransformation: {
|
|
1065
|
-
paths: [],
|
|
1066
|
-
transformation: _toVeloEntity,
|
|
1067
|
-
},
|
|
1068
|
-
customTransformation: responseTransformation,
|
|
1069
|
-
});
|
|
1070
|
-
const payload = toAmbassadorRequest([draftPostId, options]);
|
|
1071
|
-
const reqOpts = ambassadorWixBlogV3Draft.deleteDraftPost(payload);
|
|
1072
|
-
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
1073
|
-
try {
|
|
1074
|
-
const result = yield httpClient.request(reqOpts);
|
|
1075
|
-
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
1076
|
-
}
|
|
1077
|
-
catch (err) {
|
|
1078
|
-
const transformedError = sdkTransformError(err, {
|
|
1079
|
-
spreadPathsToArguments: {},
|
|
1080
|
-
explicitPathsToArguments: {
|
|
1081
|
-
draftPostId: '$[0]',
|
|
1082
|
-
permanent: '$[1].permanent',
|
|
1083
|
-
},
|
|
1084
|
-
singleArgumentUnchanged: false,
|
|
1085
|
-
}, ['draftPostId', 'options']);
|
|
1086
|
-
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
1087
|
-
throw transformedError;
|
|
1088
|
-
}
|
|
1089
|
-
});
|
|
1090
|
-
}
|
|
1091
|
-
/**
|
|
1092
|
-
* Permanently deletes a draft post by the provided ID from the trash bin.
|
|
1093
|
-
*
|
|
1094
|
-
* Uses the provided `draftPostId` to permanently delete a draft post from the trash bin. This action is permanent and cannot be reversed.
|
|
1095
|
-
* @param draftPostId - Draft post ID.
|
|
1096
|
-
* @public
|
|
1097
|
-
* @requiredField draftPostId
|
|
1098
|
-
* @permissionScope Manage Blog
|
|
1099
|
-
* @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
|
|
1100
|
-
* @applicableIdentity APP
|
|
1101
|
-
*/
|
|
1102
|
-
export function removeFromTrashBin(draftPostId) {
|
|
1103
|
-
var _a, _b, _c;
|
|
1104
|
-
return __awaiter(this, arguments, void 0, function* () {
|
|
1105
|
-
const requestTransformation = { draftPostId: '$[0]' };
|
|
1106
|
-
const responseTransformation = '$';
|
|
1107
|
-
// @ts-ignore
|
|
1108
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
1109
|
-
const { toAmbassadorRequest } = serializer({
|
|
1110
|
-
rootSchema: _removeFromTrashBinRequest,
|
|
1111
|
-
depSchemas: {},
|
|
1112
|
-
fqdnTransformation: {
|
|
1113
|
-
paths: [],
|
|
1114
|
-
transformation: _fromVeloEntity,
|
|
1115
|
-
},
|
|
1116
|
-
customTransformation: requestTransformation,
|
|
1117
|
-
});
|
|
1118
|
-
const { fromJSON } = serializer({
|
|
1119
|
-
rootSchema: _removeFromTrashBinResponse,
|
|
1120
|
-
depSchemas: {},
|
|
1121
|
-
fqdnTransformation: {
|
|
1122
|
-
paths: [],
|
|
1123
|
-
transformation: _toVeloEntity,
|
|
1124
|
-
},
|
|
1125
|
-
customTransformation: responseTransformation,
|
|
1126
|
-
});
|
|
1127
|
-
const payload = toAmbassadorRequest([draftPostId]);
|
|
1128
|
-
const reqOpts = ambassadorWixBlogV3Draft.removeFromTrashBin(payload);
|
|
1129
|
-
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
1130
|
-
try {
|
|
1131
|
-
const result = yield httpClient.request(reqOpts);
|
|
1132
|
-
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
1133
|
-
}
|
|
1134
|
-
catch (err) {
|
|
1135
|
-
const transformedError = sdkTransformError(err, {
|
|
1136
|
-
spreadPathsToArguments: {},
|
|
1137
|
-
explicitPathsToArguments: { draftPostId: '$[0]' },
|
|
1138
|
-
singleArgumentUnchanged: false,
|
|
1139
|
-
}, ['draftPostId']);
|
|
1140
|
-
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
1141
|
-
throw transformedError;
|
|
1142
|
-
}
|
|
1143
|
-
});
|
|
1144
|
-
}
|
|
1145
|
-
/**
|
|
1146
|
-
* Bulk Deletes draft posts with the provided IDs.
|
|
1147
|
-
* @param postIds - Post IDs.
|
|
1148
|
-
* @public
|
|
1149
|
-
* @documentationMaturity preview
|
|
1150
|
-
* @requiredField postIds
|
|
1151
|
-
* @permissionScope Manage Blog
|
|
1152
|
-
* @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
|
|
1153
|
-
* @applicableIdentity APP
|
|
1154
|
-
*/
|
|
1155
|
-
export function bulkDeleteDraftPosts(postIds, options) {
|
|
1156
|
-
var _a, _b, _c;
|
|
1157
|
-
return __awaiter(this, arguments, void 0, function* () {
|
|
1158
|
-
const requestTransformation = {
|
|
1159
|
-
postIds: '$[0]',
|
|
1160
|
-
permanent: '$[1].permanent',
|
|
1161
|
-
};
|
|
1162
|
-
const responseTransformation = '$';
|
|
1163
|
-
// @ts-ignore
|
|
1164
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
1165
|
-
const { toAmbassadorRequest } = serializer({
|
|
1166
|
-
rootSchema: _bulkDeleteDraftPostsRequest,
|
|
1167
|
-
depSchemas: {},
|
|
1168
|
-
fqdnTransformation: {
|
|
1169
|
-
paths: [],
|
|
1170
|
-
transformation: _fromVeloEntity,
|
|
1171
|
-
},
|
|
1172
|
-
customTransformation: requestTransformation,
|
|
1173
|
-
});
|
|
1174
|
-
const { fromJSON } = serializer({
|
|
1175
|
-
rootSchema: _bulkDeleteDraftPostsResponse,
|
|
1176
|
-
depSchemas: {
|
|
1177
|
-
_bulkDraftPostResult,
|
|
1178
|
-
_coverMedia,
|
|
1179
|
-
_draftPost,
|
|
1180
|
-
_draftPostTranslation,
|
|
1181
|
-
_media,
|
|
1182
|
-
_node,
|
|
1183
|
-
_richContent,
|
|
1184
|
-
_wixMedia,
|
|
1185
|
-
},
|
|
1186
|
-
fqdnTransformation: {
|
|
1187
|
-
paths: [...['Array#results.item']],
|
|
1188
|
-
transformation: _toVeloEntity,
|
|
1189
|
-
},
|
|
1190
|
-
customTransformation: responseTransformation,
|
|
1191
|
-
});
|
|
1192
|
-
const payload = toAmbassadorRequest([postIds, options]);
|
|
1193
|
-
const reqOpts = ambassadorWixBlogV3Draft.bulkDeleteDraftPosts(payload);
|
|
1194
|
-
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
1195
|
-
try {
|
|
1196
|
-
const result = yield httpClient.request(reqOpts);
|
|
1197
|
-
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
1198
|
-
return fromJSON(result.data);
|
|
1199
|
-
}
|
|
1200
|
-
catch (err) {
|
|
1201
|
-
const transformedError = sdkTransformError(err, {
|
|
1202
|
-
spreadPathsToArguments: {},
|
|
1203
|
-
explicitPathsToArguments: {
|
|
1204
|
-
postIds: '$[0]',
|
|
1205
|
-
permanent: '$[1].permanent',
|
|
1206
|
-
},
|
|
1207
|
-
singleArgumentUnchanged: false,
|
|
1208
|
-
}, ['postIds', 'options']);
|
|
1209
|
-
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
1210
|
-
throw transformedError;
|
|
1211
|
-
}
|
|
1212
|
-
});
|
|
1213
|
-
}
|
|
1214
|
-
/**
|
|
1215
|
-
* Retrieves a list of up to 100 draft posts per request.
|
|
1216
|
-
*
|
|
1217
|
-
* List Draft Posts runs with these defaults, which you can override:
|
|
1218
|
-
* - `editedDate` is sorted in descending order.
|
|
1219
|
-
* - `paging.limit` is `50`.
|
|
1220
|
-
* - `paging.offset` is `0`.
|
|
1221
|
-
* @public
|
|
1222
|
-
* @param options - Options for listing multiple draft posts.
|
|
1223
|
-
* @permissionScope Manage Blog
|
|
1224
|
-
* @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
|
|
1225
|
-
* @applicableIdentity APP
|
|
1226
|
-
*/
|
|
1227
|
-
export function listDraftPosts(options) {
|
|
1228
|
-
var _a, _b, _c;
|
|
1229
|
-
return __awaiter(this, arguments, void 0, function* () {
|
|
1230
|
-
const requestTransformation = {
|
|
1231
|
-
status: '$[0].status',
|
|
1232
|
-
language: '$[0].language',
|
|
1233
|
-
sort: '$[0].sort',
|
|
1234
|
-
paging: '$[0].paging',
|
|
1235
|
-
fieldsets: '$[0].fieldsets',
|
|
1236
|
-
};
|
|
1237
|
-
const responseTransformation = '$';
|
|
1238
|
-
// @ts-ignore
|
|
1239
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
1240
|
-
const { toAmbassadorRequest } = serializer({
|
|
1241
|
-
rootSchema: _listDraftPostsRequest,
|
|
1242
|
-
depSchemas: {},
|
|
1243
|
-
fqdnTransformation: {
|
|
1244
|
-
paths: [],
|
|
1245
|
-
transformation: _fromVeloEntity,
|
|
1246
|
-
},
|
|
1247
|
-
customTransformation: requestTransformation,
|
|
1248
|
-
});
|
|
1249
|
-
const { fromJSON } = serializer({
|
|
1250
|
-
rootSchema: _listDraftPostsResponse,
|
|
1251
|
-
depSchemas: {
|
|
1252
|
-
_coverMedia,
|
|
1253
|
-
_draftPost,
|
|
1254
|
-
_draftPostTranslation,
|
|
1255
|
-
_media,
|
|
1256
|
-
_node,
|
|
1257
|
-
_richContent,
|
|
1258
|
-
_wixMedia,
|
|
1259
|
-
},
|
|
1260
|
-
fqdnTransformation: {
|
|
1261
|
-
paths: [...['Array#draftPosts']],
|
|
1262
|
-
transformation: _toVeloEntity,
|
|
1263
|
-
},
|
|
1264
|
-
customTransformation: responseTransformation,
|
|
1265
|
-
});
|
|
1266
|
-
const payload = toAmbassadorRequest([options]);
|
|
1267
|
-
const reqOpts = ambassadorWixBlogV3Draft.listDraftPosts(payload);
|
|
1268
|
-
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
1269
|
-
try {
|
|
1270
|
-
const result = yield httpClient.request(reqOpts);
|
|
1271
|
-
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
1272
|
-
return fromJSON(result.data);
|
|
1273
|
-
}
|
|
1274
|
-
catch (err) {
|
|
1275
|
-
const transformedError = sdkTransformError(err, {
|
|
1276
|
-
spreadPathsToArguments: {},
|
|
1277
|
-
explicitPathsToArguments: {
|
|
1278
|
-
status: '$[0].status',
|
|
1279
|
-
language: '$[0].language',
|
|
1280
|
-
sort: '$[0].sort',
|
|
1281
|
-
paging: '$[0].paging',
|
|
1282
|
-
fieldsets: '$[0].fieldsets',
|
|
1283
|
-
},
|
|
1284
|
-
singleArgumentUnchanged: false,
|
|
1285
|
-
}, ['options']);
|
|
1286
|
-
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
1287
|
-
throw transformedError;
|
|
1288
|
-
}
|
|
1289
|
-
});
|
|
1290
|
-
}
|
|
1291
|
-
/**
|
|
1292
|
-
* Gets a deleted draft post from the trash bin by the provided ID.
|
|
1293
|
-
*
|
|
1294
|
-
* Uses the provided `draftPostId` to retrieve a previously deleted draft post from the trash bin.
|
|
1295
|
-
* @param draftPostId - Draft post ID.
|
|
1296
|
-
* @public
|
|
1297
|
-
* @requiredField draftPostId
|
|
1298
|
-
* @permissionScope Manage Blog
|
|
1299
|
-
* @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
|
|
1300
|
-
* @applicableIdentity APP
|
|
1301
|
-
*/
|
|
1302
|
-
export function getDeletedDraftPost(draftPostId) {
|
|
1303
|
-
var _a, _b, _c;
|
|
1304
|
-
return __awaiter(this, arguments, void 0, function* () {
|
|
1305
|
-
const requestTransformation = { draftPostId: '$[0]' };
|
|
1306
|
-
const responseTransformation = '$';
|
|
1307
|
-
// @ts-ignore
|
|
1308
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
1309
|
-
const { toAmbassadorRequest } = serializer({
|
|
1310
|
-
rootSchema: _getDeletedDraftPostRequest,
|
|
1311
|
-
depSchemas: {},
|
|
1312
|
-
fqdnTransformation: {
|
|
1313
|
-
paths: [],
|
|
1314
|
-
transformation: _fromVeloEntity,
|
|
1315
|
-
},
|
|
1316
|
-
customTransformation: requestTransformation,
|
|
1317
|
-
});
|
|
1318
|
-
const { fromJSON } = serializer({
|
|
1319
|
-
rootSchema: _getDeletedDraftPostResponse,
|
|
1320
|
-
depSchemas: {
|
|
1321
|
-
_coverMedia,
|
|
1322
|
-
_draftPost,
|
|
1323
|
-
_draftPostTranslation,
|
|
1324
|
-
_media,
|
|
1325
|
-
_node,
|
|
1326
|
-
_richContent,
|
|
1327
|
-
_wixMedia,
|
|
1328
|
-
},
|
|
1329
|
-
fqdnTransformation: {
|
|
1330
|
-
paths: [...['draftPost']],
|
|
1331
|
-
transformation: _toVeloEntity,
|
|
1332
|
-
},
|
|
1333
|
-
customTransformation: responseTransformation,
|
|
1334
|
-
});
|
|
1335
|
-
const payload = toAmbassadorRequest([draftPostId]);
|
|
1336
|
-
const reqOpts = ambassadorWixBlogV3Draft.getDeletedDraftPost(payload);
|
|
1337
|
-
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
1338
|
-
try {
|
|
1339
|
-
const result = yield httpClient.request(reqOpts);
|
|
1340
|
-
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
1341
|
-
return fromJSON(result.data);
|
|
1342
|
-
}
|
|
1343
|
-
catch (err) {
|
|
1344
|
-
const transformedError = sdkTransformError(err, {
|
|
1345
|
-
spreadPathsToArguments: {},
|
|
1346
|
-
explicitPathsToArguments: { draftPostId: '$[0]' },
|
|
1347
|
-
singleArgumentUnchanged: false,
|
|
1348
|
-
}, ['draftPostId']);
|
|
1349
|
-
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
1350
|
-
throw transformedError;
|
|
1351
|
-
}
|
|
1352
|
-
});
|
|
1353
|
-
}
|
|
1354
|
-
/**
|
|
1355
|
-
* Restores a deleted draft post from the trash bin by the provided ID.
|
|
1356
|
-
*
|
|
1357
|
-
* Uses the `draftPostId` to restore a deleted draft post from the trash bin.
|
|
1358
|
-
* @param draftPostId - Draft post ID.
|
|
1359
|
-
* @public
|
|
1360
|
-
* @requiredField draftPostId
|
|
1361
|
-
* @permissionScope Manage Blog
|
|
1362
|
-
* @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
|
|
1363
|
-
* @applicableIdentity APP
|
|
1364
|
-
*/
|
|
1365
|
-
export function restoreFromTrashBin(draftPostId) {
|
|
1366
|
-
var _a, _b, _c;
|
|
1367
|
-
return __awaiter(this, arguments, void 0, function* () {
|
|
1368
|
-
const requestTransformation = { draftPostId: '$[0]' };
|
|
1369
|
-
const responseTransformation = '$';
|
|
1370
|
-
// @ts-ignore
|
|
1371
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
1372
|
-
const { toAmbassadorRequest } = serializer({
|
|
1373
|
-
rootSchema: _restoreFromTrashBinRequest,
|
|
1374
|
-
depSchemas: {},
|
|
1375
|
-
fqdnTransformation: {
|
|
1376
|
-
paths: [],
|
|
1377
|
-
transformation: _fromVeloEntity,
|
|
1378
|
-
},
|
|
1379
|
-
customTransformation: requestTransformation,
|
|
1380
|
-
});
|
|
1381
|
-
const { fromJSON } = serializer({
|
|
1382
|
-
rootSchema: _restoreFromTrashBinResponse,
|
|
1383
|
-
depSchemas: {
|
|
1384
|
-
_coverMedia,
|
|
1385
|
-
_draftPost,
|
|
1386
|
-
_draftPostTranslation,
|
|
1387
|
-
_media,
|
|
1388
|
-
_node,
|
|
1389
|
-
_richContent,
|
|
1390
|
-
_wixMedia,
|
|
1391
|
-
},
|
|
1392
|
-
fqdnTransformation: {
|
|
1393
|
-
paths: [...['draftPost']],
|
|
1394
|
-
transformation: _toVeloEntity,
|
|
1395
|
-
},
|
|
1396
|
-
customTransformation: responseTransformation,
|
|
1397
|
-
});
|
|
1398
|
-
const payload = toAmbassadorRequest([draftPostId]);
|
|
1399
|
-
const reqOpts = ambassadorWixBlogV3Draft.restoreFromTrashBin(payload);
|
|
1400
|
-
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
1401
|
-
try {
|
|
1402
|
-
const result = yield httpClient.request(reqOpts);
|
|
1403
|
-
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
1404
|
-
return fromJSON(result.data);
|
|
1405
|
-
}
|
|
1406
|
-
catch (err) {
|
|
1407
|
-
const transformedError = sdkTransformError(err, {
|
|
1408
|
-
spreadPathsToArguments: {},
|
|
1409
|
-
explicitPathsToArguments: { draftPostId: '$[0]' },
|
|
1410
|
-
singleArgumentUnchanged: false,
|
|
1411
|
-
}, ['draftPostId']);
|
|
1412
|
-
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
1413
|
-
throw transformedError;
|
|
1414
|
-
}
|
|
1415
|
-
});
|
|
1416
|
-
}
|
|
1417
|
-
/**
|
|
1418
|
-
* Retrieves a list of up to 100 draft posts, given the provided paging, filtering, and sorting.
|
|
1419
|
-
*
|
|
1420
|
-
* Query Draft Posts runs with these defaults, which you can override:
|
|
1421
|
-
* - `editedDate` is sorted in `DESC` order.
|
|
1422
|
-
* - `paging.limit` is `50`.
|
|
1423
|
-
* - `paging.offset` is `0`.
|
|
1424
|
-
* @public
|
|
1425
|
-
* @param options - Options for querying draft posts.
|
|
1426
|
-
* @permissionScope Manage Blog
|
|
1427
|
-
* @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
|
|
1428
|
-
* @applicableIdentity APP
|
|
1429
|
-
*/
|
|
1430
|
-
export function queryDraftPosts(options) {
|
|
1431
|
-
const requestTransformation = { '*': '$[1]', query: '$[0]' };
|
|
1432
|
-
const responseTransformation = {
|
|
1433
|
-
items: '$.draftPosts',
|
|
1434
|
-
pagingMetadata: '$.pagingMetadata',
|
|
1435
|
-
};
|
|
1436
|
-
// @ts-ignore
|
|
1437
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
1438
|
-
const { toAmbassadorRequest } = serializer({
|
|
1439
|
-
rootSchema: _queryDraftPostsRequest,
|
|
1440
|
-
depSchemas: {},
|
|
1441
|
-
fqdnTransformation: {
|
|
1442
|
-
paths: [],
|
|
1443
|
-
transformation: _fromVeloEntity,
|
|
1444
|
-
},
|
|
1445
|
-
customTransformation: requestTransformation,
|
|
1446
|
-
});
|
|
1447
|
-
const { fromJSON } = serializer({
|
|
1448
|
-
rootSchema: _queryDraftPostsResponse,
|
|
1449
|
-
depSchemas: {
|
|
1450
|
-
_coverMedia,
|
|
1451
|
-
_draftPost,
|
|
1452
|
-
_draftPostTranslation,
|
|
1453
|
-
_media,
|
|
1454
|
-
_node,
|
|
1455
|
-
_richContent,
|
|
1456
|
-
_wixMedia,
|
|
1457
|
-
},
|
|
1458
|
-
fqdnTransformation: {
|
|
1459
|
-
paths: [...['Array#draftPosts']],
|
|
1460
|
-
transformation: _toVeloEntity,
|
|
1461
|
-
},
|
|
1462
|
-
customTransformation: responseTransformation,
|
|
1463
|
-
});
|
|
1464
|
-
return wrapWithQueryBuilder({
|
|
1465
|
-
func: (payload) => __awaiter(this, void 0, void 0, function* () {
|
|
1466
|
-
var _a, _b, _c;
|
|
1467
|
-
const reqOpts = ambassadorWixBlogV3Draft.queryDraftPosts(Object.assign(Object.assign({}, payload), (options !== null && options !== void 0 ? options : {})));
|
|
1468
|
-
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
1469
|
-
try {
|
|
1470
|
-
const result = yield httpClient.request(reqOpts);
|
|
1471
|
-
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
1472
|
-
return result;
|
|
1473
|
-
}
|
|
1474
|
-
catch (err) {
|
|
1475
|
-
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
1476
|
-
throw err;
|
|
1477
|
-
}
|
|
1478
|
-
}),
|
|
1479
|
-
requestTransformer: (...args) => toAmbassadorRequest(args),
|
|
1480
|
-
responseTransformer: ({ data }) => fromJSON(data),
|
|
1481
|
-
errorTransformer: (err) => {
|
|
1482
|
-
const transformedError = transformError(err, requestTransformation);
|
|
1483
|
-
throw transformedError;
|
|
1484
|
-
},
|
|
1485
|
-
pagingMethod: 'CURSOR',
|
|
1486
|
-
transformationPaths: resolveQueryFieldsTransformationPaths(_toVeloEntity),
|
|
1487
|
-
})({ cursorWithEmptyFilterAndSort: true });
|
|
1488
|
-
}
|
|
1489
|
-
/**
|
|
1490
|
-
* Publishes a specified draft post by ID. This creates a new post entity with the data from the draft post.
|
|
1491
|
-
*
|
|
1492
|
-
* If the specified draft post was already published, the published post will be updated with the latest values from the draft post entity.
|
|
1493
|
-
* @param draftPostId - Draft post ID.
|
|
1494
|
-
* @public
|
|
1495
|
-
* @requiredField draftPostId
|
|
1496
|
-
* @permissionScope Manage Blog
|
|
1497
|
-
* @permissionScopeId SCOPE.DC-BLOG.MANAGE-BLOG
|
|
1498
|
-
* @applicableIdentity APP
|
|
1499
|
-
*/
|
|
1500
|
-
export function publishDraftPost(draftPostId) {
|
|
1501
|
-
var _a, _b, _c;
|
|
1502
|
-
return __awaiter(this, arguments, void 0, function* () {
|
|
1503
|
-
const requestTransformation = { draftPostId: '$[0]' };
|
|
1504
|
-
const responseTransformation = '$';
|
|
1505
|
-
// @ts-ignore
|
|
1506
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
1507
|
-
const { toAmbassadorRequest } = serializer({
|
|
1508
|
-
rootSchema: _publishDraftPostRequest,
|
|
1509
|
-
depSchemas: {},
|
|
1510
|
-
fqdnTransformation: {
|
|
1511
|
-
paths: [],
|
|
1512
|
-
transformation: _fromVeloEntity,
|
|
1513
|
-
},
|
|
1514
|
-
customTransformation: requestTransformation,
|
|
1515
|
-
});
|
|
1516
|
-
const { fromJSON } = serializer({
|
|
1517
|
-
rootSchema: _publishDraftPostResponse,
|
|
1518
|
-
depSchemas: {},
|
|
1519
|
-
fqdnTransformation: {
|
|
1520
|
-
paths: [],
|
|
1521
|
-
transformation: _toVeloEntity,
|
|
1522
|
-
},
|
|
1523
|
-
customTransformation: responseTransformation,
|
|
1524
|
-
});
|
|
1525
|
-
const payload = toAmbassadorRequest([draftPostId]);
|
|
1526
|
-
const reqOpts = ambassadorWixBlogV3Draft.publishDraftPost(payload);
|
|
1527
|
-
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
1528
|
-
try {
|
|
1529
|
-
const result = yield httpClient.request(reqOpts);
|
|
1530
|
-
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
1531
|
-
return fromJSON(result.data);
|
|
1532
|
-
}
|
|
1533
|
-
catch (err) {
|
|
1534
|
-
const transformedError = sdkTransformError(err, {
|
|
1535
|
-
spreadPathsToArguments: {},
|
|
1536
|
-
explicitPathsToArguments: { draftPostId: '$[0]' },
|
|
1537
|
-
singleArgumentUnchanged: false,
|
|
1538
|
-
}, ['draftPostId']);
|
|
1539
|
-
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
1540
|
-
throw transformedError;
|
|
1541
|
-
}
|
|
1542
|
-
});
|
|
1543
|
-
}
|
|
1544
|
-
//# sourceMappingURL=blog-v3-draft.universal.js.map
|