@revenexx/sdk 0.0.2 → 0.0.5
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/dist/cjs/sdk.js +13496 -3442
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +13467 -3443
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +13496 -3442
- package/package.json +1 -1
- package/src/client.ts +1 -1
- package/src/enums/address-type.ts +4 -0
- package/src/enums/cart-export-format.ts +4 -0
- package/src/enums/cart-io-apply-mode.ts +5 -0
- package/src/enums/cart-io-direction.ts +4 -0
- package/src/enums/cart-io-entity.ts +4 -0
- package/src/enums/cart-io-format.ts +4 -0
- package/src/enums/cart-item-type.ts +5 -0
- package/src/enums/channel-status.ts +4 -0
- package/src/enums/channel-type.ts +7 -0
- package/src/enums/contact-role.ts +6 -0
- package/src/enums/contact-status.ts +5 -0
- package/src/enums/location-type.ts +6 -0
- package/src/enums/market-status.ts +4 -0
- package/src/enums/order-comment-visibility.ts +4 -0
- package/src/enums/order-item-type.ts +5 -0
- package/src/enums/order-payment-status.ts +9 -0
- package/src/enums/organization-status.ts +4 -0
- package/src/enums/page-status.ts +5 -0
- package/src/enums/payment-fee-type.ts +5 -0
- package/src/enums/payment-method-kind.ts +4 -0
- package/src/enums/price-entry-type.ts +4 -0
- package/src/enums/price-list-status.ts +4 -0
- package/src/enums/shipping-method-matrix-basis.ts +6 -0
- package/src/enums/shipping-method-pricing-type.ts +5 -0
- package/src/index.ts +30 -0
- package/src/models.ts +5628 -410
- package/src/services/apps.ts +154 -154
- package/src/services/avatars.ts +57 -57
- package/src/services/carts.ts +739 -104
- package/src/services/channels.ts +147 -19
- package/src/services/customers.ts +801 -69
- package/src/services/greetings.ts +18 -18
- package/src/services/inventories.ts +1278 -0
- package/src/services/locale.ts +16 -16
- package/src/services/markets.ts +373 -75
- package/src/services/messaging.ts +273 -273
- package/src/services/orders.ts +1648 -0
- package/src/services/pages.ts +2317 -0
- package/src/services/payments.ts +1334 -0
- package/src/services/prices.ts +1036 -0
- package/src/services/products.ts +1836 -272
- package/src/services/search.ts +24 -24
- package/src/services/shipping.ts +956 -0
- package/src/services/sites.ts +116 -116
- package/src/services/storage.ts +72 -72
- package/src/services/tokens.ts +14 -14
- package/types/enums/address-type.d.ts +4 -0
- package/types/enums/cart-export-format.d.ts +4 -0
- package/types/enums/cart-io-apply-mode.d.ts +5 -0
- package/types/enums/cart-io-direction.d.ts +4 -0
- package/types/enums/cart-io-entity.d.ts +4 -0
- package/types/enums/cart-io-format.d.ts +4 -0
- package/types/enums/cart-item-type.d.ts +5 -0
- package/types/enums/channel-status.d.ts +4 -0
- package/types/enums/channel-type.d.ts +7 -0
- package/types/enums/contact-role.d.ts +6 -0
- package/types/enums/contact-status.d.ts +5 -0
- package/types/enums/location-type.d.ts +6 -0
- package/types/enums/market-status.d.ts +4 -0
- package/types/enums/order-comment-visibility.d.ts +4 -0
- package/types/enums/order-item-type.d.ts +5 -0
- package/types/enums/order-payment-status.d.ts +9 -0
- package/types/enums/organization-status.d.ts +4 -0
- package/types/enums/page-status.d.ts +5 -0
- package/types/enums/payment-fee-type.d.ts +5 -0
- package/types/enums/payment-method-kind.d.ts +4 -0
- package/types/enums/price-entry-type.d.ts +4 -0
- package/types/enums/price-list-status.d.ts +4 -0
- package/types/enums/shipping-method-matrix-basis.d.ts +6 -0
- package/types/enums/shipping-method-pricing-type.d.ts +5 -0
- package/types/index.d.ts +30 -0
- package/types/models.d.ts +5470 -404
- package/types/services/carts.d.ts +271 -12
- package/types/services/channels.d.ts +54 -2
- package/types/services/customers.d.ts +295 -12
- package/types/services/inventories.d.ts +440 -0
- package/types/services/markets.d.ts +123 -6
- package/types/services/orders.d.ts +590 -0
- package/types/services/pages.d.ts +792 -0
- package/types/services/payments.d.ts +480 -0
- package/types/services/prices.d.ts +384 -0
- package/types/services/products.d.ts +646 -32
- package/types/services/shipping.d.ts +351 -0
|
@@ -0,0 +1,2317 @@
|
|
|
1
|
+
import { Service } from '../service';
|
|
2
|
+
import { RevenexxException, Client, type Payload, UploadProgress } from '../client';
|
|
3
|
+
import type { Models } from '../models';
|
|
4
|
+
|
|
5
|
+
import { PageStatus } from '../enums/page-status';
|
|
6
|
+
|
|
7
|
+
export class Pages {
|
|
8
|
+
client: Client;
|
|
9
|
+
|
|
10
|
+
constructor(client: Client) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @throws {RevenexxException}
|
|
17
|
+
* @returns {Promise<Models.DeliveryPage>}
|
|
18
|
+
*/
|
|
19
|
+
pagesDeliveryPage(): Promise<Models.DeliveryPage> {
|
|
20
|
+
|
|
21
|
+
const apiPath = '/v1/pages/delivery/page';
|
|
22
|
+
const apiPayload: Payload = {};
|
|
23
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
24
|
+
|
|
25
|
+
const apiHeaders: { [header: string]: string } = {
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return this.client.call(
|
|
29
|
+
'get',
|
|
30
|
+
uri,
|
|
31
|
+
apiHeaders,
|
|
32
|
+
apiPayload
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @throws {RevenexxException}
|
|
39
|
+
* @returns {Promise<{}>}
|
|
40
|
+
*/
|
|
41
|
+
pagesDeliveryPages(): Promise<{}> {
|
|
42
|
+
|
|
43
|
+
const apiPath = '/v1/pages/delivery/pages';
|
|
44
|
+
const apiPayload: Payload = {};
|
|
45
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46
|
+
|
|
47
|
+
const apiHeaders: { [header: string]: string } = {
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return this.client.call(
|
|
51
|
+
'get',
|
|
52
|
+
uri,
|
|
53
|
+
apiHeaders,
|
|
54
|
+
apiPayload
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @param {string} params.token -
|
|
61
|
+
* @throws {RevenexxException}
|
|
62
|
+
* @returns {Promise<Models.DeliveryPage>}
|
|
63
|
+
*/
|
|
64
|
+
pagesDeliveryPreview(params: { token: string }): Promise<Models.DeliveryPage>;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @param {string} token -
|
|
68
|
+
* @throws {RevenexxException}
|
|
69
|
+
* @returns {Promise<Models.DeliveryPage>}
|
|
70
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
71
|
+
*/
|
|
72
|
+
pagesDeliveryPreview(token: string): Promise<Models.DeliveryPage>;
|
|
73
|
+
pagesDeliveryPreview(
|
|
74
|
+
paramsOrFirst: { token: string } | string
|
|
75
|
+
): Promise<Models.DeliveryPage> {
|
|
76
|
+
let params: { token: string };
|
|
77
|
+
|
|
78
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
79
|
+
params = (paramsOrFirst || {}) as { token: string };
|
|
80
|
+
} else {
|
|
81
|
+
params = {
|
|
82
|
+
token: paramsOrFirst as string
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const token = params.token;
|
|
87
|
+
|
|
88
|
+
if (typeof token === 'undefined') {
|
|
89
|
+
throw new RevenexxException('Missing required parameter: "token"');
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const apiPath = '/v1/pages/delivery/preview/{token}'.replace('{token}', token);
|
|
93
|
+
const apiPayload: Payload = {};
|
|
94
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
95
|
+
|
|
96
|
+
const apiHeaders: { [header: string]: string } = {
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return this.client.call(
|
|
100
|
+
'get',
|
|
101
|
+
uri,
|
|
102
|
+
apiHeaders,
|
|
103
|
+
apiPayload
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
*
|
|
109
|
+
* @throws {RevenexxException}
|
|
110
|
+
* @returns {Promise<{}>}
|
|
111
|
+
*/
|
|
112
|
+
pagesEditorEditStates(): Promise<{}> {
|
|
113
|
+
|
|
114
|
+
const apiPath = '/v1/pages/editor/edit-states';
|
|
115
|
+
const apiPayload: Payload = {};
|
|
116
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
117
|
+
|
|
118
|
+
const apiHeaders: { [header: string]: string } = {
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
return this.client.call(
|
|
122
|
+
'get',
|
|
123
|
+
uri,
|
|
124
|
+
apiHeaders,
|
|
125
|
+
apiPayload
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
*
|
|
131
|
+
* @throws {RevenexxException}
|
|
132
|
+
* @returns {Promise<{}>}
|
|
133
|
+
*/
|
|
134
|
+
pagesEditorNotificationsList(): Promise<{}> {
|
|
135
|
+
|
|
136
|
+
const apiPath = '/v1/pages/editor/notifications';
|
|
137
|
+
const apiPayload: Payload = {};
|
|
138
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
139
|
+
|
|
140
|
+
const apiHeaders: { [header: string]: string } = {
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
return this.client.call(
|
|
144
|
+
'get',
|
|
145
|
+
uri,
|
|
146
|
+
apiHeaders,
|
|
147
|
+
apiPayload
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
*
|
|
153
|
+
* @throws {RevenexxException}
|
|
154
|
+
* @returns {Promise<{}>}
|
|
155
|
+
*/
|
|
156
|
+
pagesEditorNotificationsMarkAllRead(): Promise<{}> {
|
|
157
|
+
|
|
158
|
+
const apiPath = '/v1/pages/editor/notifications/mark-all-read';
|
|
159
|
+
const apiPayload: Payload = {};
|
|
160
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
161
|
+
|
|
162
|
+
const apiHeaders: { [header: string]: string } = {
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
return this.client.call(
|
|
166
|
+
'post',
|
|
167
|
+
uri,
|
|
168
|
+
apiHeaders,
|
|
169
|
+
apiPayload
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
*
|
|
175
|
+
* @throws {RevenexxException}
|
|
176
|
+
* @returns {Promise<{}>}
|
|
177
|
+
*/
|
|
178
|
+
pagesEditorNotificationsUnreadCount(): Promise<{}> {
|
|
179
|
+
|
|
180
|
+
const apiPath = '/v1/pages/editor/notifications/unread-count';
|
|
181
|
+
const apiPayload: Payload = {};
|
|
182
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
183
|
+
|
|
184
|
+
const apiHeaders: { [header: string]: string } = {
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
return this.client.call(
|
|
188
|
+
'get',
|
|
189
|
+
uri,
|
|
190
|
+
apiHeaders,
|
|
191
|
+
apiPayload
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
*
|
|
197
|
+
* @param {object[]} params.items -
|
|
198
|
+
* @throws {RevenexxException}
|
|
199
|
+
* @returns {Promise<{}>}
|
|
200
|
+
*/
|
|
201
|
+
pagesEditorTranslate(params?: { items?: object[] }): Promise<{}>;
|
|
202
|
+
/**
|
|
203
|
+
*
|
|
204
|
+
* @param {object[]} items -
|
|
205
|
+
* @throws {RevenexxException}
|
|
206
|
+
* @returns {Promise<{}>}
|
|
207
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
208
|
+
*/
|
|
209
|
+
pagesEditorTranslate(items?: object[]): Promise<{}>;
|
|
210
|
+
pagesEditorTranslate(
|
|
211
|
+
paramsOrFirst?: { items?: object[] } | object[]
|
|
212
|
+
): Promise<{}> {
|
|
213
|
+
let params: { items?: object[] };
|
|
214
|
+
|
|
215
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('items' in paramsOrFirst))) {
|
|
216
|
+
params = (paramsOrFirst || {}) as { items?: object[] };
|
|
217
|
+
} else {
|
|
218
|
+
params = {
|
|
219
|
+
items: paramsOrFirst as object[]
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
const items = params.items;
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
const apiPath = '/v1/pages/editor/translate';
|
|
227
|
+
const apiPayload: Payload = {};
|
|
228
|
+
if (typeof items !== 'undefined') {
|
|
229
|
+
apiPayload['items'] = items;
|
|
230
|
+
}
|
|
231
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
232
|
+
|
|
233
|
+
const apiHeaders: { [header: string]: string } = {
|
|
234
|
+
'content-type': 'application/json',
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
return this.client.call(
|
|
238
|
+
'post',
|
|
239
|
+
uri,
|
|
240
|
+
apiHeaders,
|
|
241
|
+
apiPayload
|
|
242
|
+
);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
*
|
|
247
|
+
* @throws {RevenexxException}
|
|
248
|
+
* @returns {Promise<{}>}
|
|
249
|
+
*/
|
|
250
|
+
pagesEditorUserSettingsGet(): Promise<{}> {
|
|
251
|
+
|
|
252
|
+
const apiPath = '/v1/pages/editor/user-settings';
|
|
253
|
+
const apiPayload: Payload = {};
|
|
254
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
255
|
+
|
|
256
|
+
const apiHeaders: { [header: string]: string } = {
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
return this.client.call(
|
|
260
|
+
'get',
|
|
261
|
+
uri,
|
|
262
|
+
apiHeaders,
|
|
263
|
+
apiPayload
|
|
264
|
+
);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
*
|
|
269
|
+
* @param {object} params.settings -
|
|
270
|
+
* @throws {RevenexxException}
|
|
271
|
+
* @returns {Promise<{}>}
|
|
272
|
+
*/
|
|
273
|
+
pagesEditorUserSettingsPut(params?: { settings?: object }): Promise<{}>;
|
|
274
|
+
/**
|
|
275
|
+
*
|
|
276
|
+
* @param {object} settings -
|
|
277
|
+
* @throws {RevenexxException}
|
|
278
|
+
* @returns {Promise<{}>}
|
|
279
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
280
|
+
*/
|
|
281
|
+
pagesEditorUserSettingsPut(settings?: object): Promise<{}>;
|
|
282
|
+
pagesEditorUserSettingsPut(
|
|
283
|
+
paramsOrFirst?: { settings?: object } | object
|
|
284
|
+
): Promise<{}> {
|
|
285
|
+
let params: { settings?: object };
|
|
286
|
+
|
|
287
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('settings' in paramsOrFirst))) {
|
|
288
|
+
params = (paramsOrFirst || {}) as { settings?: object };
|
|
289
|
+
} else {
|
|
290
|
+
params = {
|
|
291
|
+
settings: paramsOrFirst as object
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
const settings = params.settings;
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
const apiPath = '/v1/pages/editor/user-settings';
|
|
299
|
+
const apiPayload: Payload = {};
|
|
300
|
+
if (typeof settings !== 'undefined') {
|
|
301
|
+
apiPayload['settings'] = settings;
|
|
302
|
+
}
|
|
303
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
304
|
+
|
|
305
|
+
const apiHeaders: { [header: string]: string } = {
|
|
306
|
+
'content-type': 'application/json',
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
return this.client.call(
|
|
310
|
+
'put',
|
|
311
|
+
uri,
|
|
312
|
+
apiHeaders,
|
|
313
|
+
apiPayload
|
|
314
|
+
);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
*
|
|
319
|
+
* @throws {RevenexxException}
|
|
320
|
+
* @returns {Promise<{}>}
|
|
321
|
+
*/
|
|
322
|
+
pagesEditorUsers(): Promise<{}> {
|
|
323
|
+
|
|
324
|
+
const apiPath = '/v1/pages/editor/users';
|
|
325
|
+
const apiPayload: Payload = {};
|
|
326
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
327
|
+
|
|
328
|
+
const apiHeaders: { [header: string]: string } = {
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
return this.client.call(
|
|
332
|
+
'get',
|
|
333
|
+
uri,
|
|
334
|
+
apiHeaders,
|
|
335
|
+
apiPayload
|
|
336
|
+
);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
*
|
|
341
|
+
* @param {string} params.pageId -
|
|
342
|
+
* @throws {RevenexxException}
|
|
343
|
+
* @returns {Promise<{}>}
|
|
344
|
+
*/
|
|
345
|
+
pagesEditorCommentsList(params: { pageId: string }): Promise<{}>;
|
|
346
|
+
/**
|
|
347
|
+
*
|
|
348
|
+
* @param {string} pageId -
|
|
349
|
+
* @throws {RevenexxException}
|
|
350
|
+
* @returns {Promise<{}>}
|
|
351
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
352
|
+
*/
|
|
353
|
+
pagesEditorCommentsList(pageId: string): Promise<{}>;
|
|
354
|
+
pagesEditorCommentsList(
|
|
355
|
+
paramsOrFirst: { pageId: string } | string
|
|
356
|
+
): Promise<{}> {
|
|
357
|
+
let params: { pageId: string };
|
|
358
|
+
|
|
359
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
360
|
+
params = (paramsOrFirst || {}) as { pageId: string };
|
|
361
|
+
} else {
|
|
362
|
+
params = {
|
|
363
|
+
pageId: paramsOrFirst as string
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
const pageId = params.pageId;
|
|
368
|
+
|
|
369
|
+
if (typeof pageId === 'undefined') {
|
|
370
|
+
throw new RevenexxException('Missing required parameter: "pageId"');
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
const apiPath = '/v1/pages/editor/{page_id}/comments'.replace('{page_id}', pageId);
|
|
374
|
+
const apiPayload: Payload = {};
|
|
375
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
376
|
+
|
|
377
|
+
const apiHeaders: { [header: string]: string } = {
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
return this.client.call(
|
|
381
|
+
'get',
|
|
382
|
+
uri,
|
|
383
|
+
apiHeaders,
|
|
384
|
+
apiPayload
|
|
385
|
+
);
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
*
|
|
390
|
+
* @param {string} params.pageId -
|
|
391
|
+
* @param {string} params.body -
|
|
392
|
+
* @param {string[]} params.blockUuids -
|
|
393
|
+
* @param {string} params.parentUuid -
|
|
394
|
+
* @throws {RevenexxException}
|
|
395
|
+
* @returns {Promise<{}>}
|
|
396
|
+
*/
|
|
397
|
+
pagesEditorCommentsCreate(params: { pageId: string, body: string, blockUuids?: string[], parentUuid?: string }): Promise<{}>;
|
|
398
|
+
/**
|
|
399
|
+
*
|
|
400
|
+
* @param {string} pageId -
|
|
401
|
+
* @param {string} body -
|
|
402
|
+
* @param {string[]} blockUuids -
|
|
403
|
+
* @param {string} parentUuid -
|
|
404
|
+
* @throws {RevenexxException}
|
|
405
|
+
* @returns {Promise<{}>}
|
|
406
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
407
|
+
*/
|
|
408
|
+
pagesEditorCommentsCreate(pageId: string, body: string, blockUuids?: string[], parentUuid?: string): Promise<{}>;
|
|
409
|
+
pagesEditorCommentsCreate(
|
|
410
|
+
paramsOrFirst: { pageId: string, body: string, blockUuids?: string[], parentUuid?: string } | string,
|
|
411
|
+
...rest: [(string)?, (string[])?, (string)?]
|
|
412
|
+
): Promise<{}> {
|
|
413
|
+
let params: { pageId: string, body: string, blockUuids?: string[], parentUuid?: string };
|
|
414
|
+
|
|
415
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
416
|
+
params = (paramsOrFirst || {}) as { pageId: string, body: string, blockUuids?: string[], parentUuid?: string };
|
|
417
|
+
} else {
|
|
418
|
+
params = {
|
|
419
|
+
pageId: paramsOrFirst as string,
|
|
420
|
+
body: rest[0] as string,
|
|
421
|
+
blockUuids: rest[1] as string[],
|
|
422
|
+
parentUuid: rest[2] as string
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
const pageId = params.pageId;
|
|
427
|
+
const body = params.body;
|
|
428
|
+
const blockUuids = params.blockUuids;
|
|
429
|
+
const parentUuid = params.parentUuid;
|
|
430
|
+
|
|
431
|
+
if (typeof pageId === 'undefined') {
|
|
432
|
+
throw new RevenexxException('Missing required parameter: "pageId"');
|
|
433
|
+
}
|
|
434
|
+
if (typeof body === 'undefined') {
|
|
435
|
+
throw new RevenexxException('Missing required parameter: "body"');
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
const apiPath = '/v1/pages/editor/{page_id}/comments'.replace('{page_id}', pageId);
|
|
439
|
+
const apiPayload: Payload = {};
|
|
440
|
+
if (typeof blockUuids !== 'undefined') {
|
|
441
|
+
apiPayload['blockUuids'] = blockUuids;
|
|
442
|
+
}
|
|
443
|
+
if (typeof body !== 'undefined') {
|
|
444
|
+
apiPayload['body'] = body;
|
|
445
|
+
}
|
|
446
|
+
if (typeof parentUuid !== 'undefined') {
|
|
447
|
+
apiPayload['parentUuid'] = parentUuid;
|
|
448
|
+
}
|
|
449
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
450
|
+
|
|
451
|
+
const apiHeaders: { [header: string]: string } = {
|
|
452
|
+
'content-type': 'application/json',
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
return this.client.call(
|
|
456
|
+
'post',
|
|
457
|
+
uri,
|
|
458
|
+
apiHeaders,
|
|
459
|
+
apiPayload
|
|
460
|
+
);
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
*
|
|
465
|
+
* @param {string} params.pageId -
|
|
466
|
+
* @param {string} params.uuid -
|
|
467
|
+
* @throws {RevenexxException}
|
|
468
|
+
* @returns {Promise<{}>}
|
|
469
|
+
*/
|
|
470
|
+
pagesEditorCommentsDelete(params: { pageId: string, uuid: string }): Promise<{}>;
|
|
471
|
+
/**
|
|
472
|
+
*
|
|
473
|
+
* @param {string} pageId -
|
|
474
|
+
* @param {string} uuid -
|
|
475
|
+
* @throws {RevenexxException}
|
|
476
|
+
* @returns {Promise<{}>}
|
|
477
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
478
|
+
*/
|
|
479
|
+
pagesEditorCommentsDelete(pageId: string, uuid: string): Promise<{}>;
|
|
480
|
+
pagesEditorCommentsDelete(
|
|
481
|
+
paramsOrFirst: { pageId: string, uuid: string } | string,
|
|
482
|
+
...rest: [(string)?]
|
|
483
|
+
): Promise<{}> {
|
|
484
|
+
let params: { pageId: string, uuid: string };
|
|
485
|
+
|
|
486
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
487
|
+
params = (paramsOrFirst || {}) as { pageId: string, uuid: string };
|
|
488
|
+
} else {
|
|
489
|
+
params = {
|
|
490
|
+
pageId: paramsOrFirst as string,
|
|
491
|
+
uuid: rest[0] as string
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
const pageId = params.pageId;
|
|
496
|
+
const uuid = params.uuid;
|
|
497
|
+
|
|
498
|
+
if (typeof pageId === 'undefined') {
|
|
499
|
+
throw new RevenexxException('Missing required parameter: "pageId"');
|
|
500
|
+
}
|
|
501
|
+
if (typeof uuid === 'undefined') {
|
|
502
|
+
throw new RevenexxException('Missing required parameter: "uuid"');
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
const apiPath = '/v1/pages/editor/{page_id}/comments/{uuid}'.replace('{page_id}', pageId).replace('{uuid}', uuid);
|
|
506
|
+
const apiPayload: Payload = {};
|
|
507
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
508
|
+
|
|
509
|
+
const apiHeaders: { [header: string]: string } = {
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
return this.client.call(
|
|
513
|
+
'delete',
|
|
514
|
+
uri,
|
|
515
|
+
apiHeaders,
|
|
516
|
+
apiPayload
|
|
517
|
+
);
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
*
|
|
522
|
+
* @param {string} params.pageId -
|
|
523
|
+
* @param {string} params.uuid -
|
|
524
|
+
* @param {string} params.body -
|
|
525
|
+
* @throws {RevenexxException}
|
|
526
|
+
* @returns {Promise<{}>}
|
|
527
|
+
*/
|
|
528
|
+
pagesEditorCommentsUpdate(params: { pageId: string, uuid: string, body: string }): Promise<{}>;
|
|
529
|
+
/**
|
|
530
|
+
*
|
|
531
|
+
* @param {string} pageId -
|
|
532
|
+
* @param {string} uuid -
|
|
533
|
+
* @param {string} body -
|
|
534
|
+
* @throws {RevenexxException}
|
|
535
|
+
* @returns {Promise<{}>}
|
|
536
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
537
|
+
*/
|
|
538
|
+
pagesEditorCommentsUpdate(pageId: string, uuid: string, body: string): Promise<{}>;
|
|
539
|
+
pagesEditorCommentsUpdate(
|
|
540
|
+
paramsOrFirst: { pageId: string, uuid: string, body: string } | string,
|
|
541
|
+
...rest: [(string)?, (string)?]
|
|
542
|
+
): Promise<{}> {
|
|
543
|
+
let params: { pageId: string, uuid: string, body: string };
|
|
544
|
+
|
|
545
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
546
|
+
params = (paramsOrFirst || {}) as { pageId: string, uuid: string, body: string };
|
|
547
|
+
} else {
|
|
548
|
+
params = {
|
|
549
|
+
pageId: paramsOrFirst as string,
|
|
550
|
+
uuid: rest[0] as string,
|
|
551
|
+
body: rest[1] as string
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
const pageId = params.pageId;
|
|
556
|
+
const uuid = params.uuid;
|
|
557
|
+
const body = params.body;
|
|
558
|
+
|
|
559
|
+
if (typeof pageId === 'undefined') {
|
|
560
|
+
throw new RevenexxException('Missing required parameter: "pageId"');
|
|
561
|
+
}
|
|
562
|
+
if (typeof uuid === 'undefined') {
|
|
563
|
+
throw new RevenexxException('Missing required parameter: "uuid"');
|
|
564
|
+
}
|
|
565
|
+
if (typeof body === 'undefined') {
|
|
566
|
+
throw new RevenexxException('Missing required parameter: "body"');
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
const apiPath = '/v1/pages/editor/{page_id}/comments/{uuid}'.replace('{page_id}', pageId).replace('{uuid}', uuid);
|
|
570
|
+
const apiPayload: Payload = {};
|
|
571
|
+
if (typeof body !== 'undefined') {
|
|
572
|
+
apiPayload['body'] = body;
|
|
573
|
+
}
|
|
574
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
575
|
+
|
|
576
|
+
const apiHeaders: { [header: string]: string } = {
|
|
577
|
+
'content-type': 'application/json',
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
return this.client.call(
|
|
581
|
+
'put',
|
|
582
|
+
uri,
|
|
583
|
+
apiHeaders,
|
|
584
|
+
apiPayload
|
|
585
|
+
);
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
*
|
|
590
|
+
* @param {string} params.pageId -
|
|
591
|
+
* @param {string} params.uuid -
|
|
592
|
+
* @throws {RevenexxException}
|
|
593
|
+
* @returns {Promise<{}>}
|
|
594
|
+
*/
|
|
595
|
+
pagesEditorCommentsResolve(params: { pageId: string, uuid: string }): Promise<{}>;
|
|
596
|
+
/**
|
|
597
|
+
*
|
|
598
|
+
* @param {string} pageId -
|
|
599
|
+
* @param {string} uuid -
|
|
600
|
+
* @throws {RevenexxException}
|
|
601
|
+
* @returns {Promise<{}>}
|
|
602
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
603
|
+
*/
|
|
604
|
+
pagesEditorCommentsResolve(pageId: string, uuid: string): Promise<{}>;
|
|
605
|
+
pagesEditorCommentsResolve(
|
|
606
|
+
paramsOrFirst: { pageId: string, uuid: string } | string,
|
|
607
|
+
...rest: [(string)?]
|
|
608
|
+
): Promise<{}> {
|
|
609
|
+
let params: { pageId: string, uuid: string };
|
|
610
|
+
|
|
611
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
612
|
+
params = (paramsOrFirst || {}) as { pageId: string, uuid: string };
|
|
613
|
+
} else {
|
|
614
|
+
params = {
|
|
615
|
+
pageId: paramsOrFirst as string,
|
|
616
|
+
uuid: rest[0] as string
|
|
617
|
+
};
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
const pageId = params.pageId;
|
|
621
|
+
const uuid = params.uuid;
|
|
622
|
+
|
|
623
|
+
if (typeof pageId === 'undefined') {
|
|
624
|
+
throw new RevenexxException('Missing required parameter: "pageId"');
|
|
625
|
+
}
|
|
626
|
+
if (typeof uuid === 'undefined') {
|
|
627
|
+
throw new RevenexxException('Missing required parameter: "uuid"');
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
const apiPath = '/v1/pages/editor/{page_id}/comments/{uuid}/resolve'.replace('{page_id}', pageId).replace('{uuid}', uuid);
|
|
631
|
+
const apiPayload: Payload = {};
|
|
632
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
633
|
+
|
|
634
|
+
const apiHeaders: { [header: string]: string } = {
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
return this.client.call(
|
|
638
|
+
'post',
|
|
639
|
+
uri,
|
|
640
|
+
apiHeaders,
|
|
641
|
+
apiPayload
|
|
642
|
+
);
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
*
|
|
647
|
+
* @param {string} params.pageId -
|
|
648
|
+
* @param {string} params.uuid -
|
|
649
|
+
* @param {number} params.taskIndex -
|
|
650
|
+
* @throws {RevenexxException}
|
|
651
|
+
* @returns {Promise<Models.Comment>}
|
|
652
|
+
*/
|
|
653
|
+
pagesEditorCommentsToggleTask(params: { pageId: string, uuid: string, taskIndex: number }): Promise<Models.Comment>;
|
|
654
|
+
/**
|
|
655
|
+
*
|
|
656
|
+
* @param {string} pageId -
|
|
657
|
+
* @param {string} uuid -
|
|
658
|
+
* @param {number} taskIndex -
|
|
659
|
+
* @throws {RevenexxException}
|
|
660
|
+
* @returns {Promise<Models.Comment>}
|
|
661
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
662
|
+
*/
|
|
663
|
+
pagesEditorCommentsToggleTask(pageId: string, uuid: string, taskIndex: number): Promise<Models.Comment>;
|
|
664
|
+
pagesEditorCommentsToggleTask(
|
|
665
|
+
paramsOrFirst: { pageId: string, uuid: string, taskIndex: number } | string,
|
|
666
|
+
...rest: [(string)?, (number)?]
|
|
667
|
+
): Promise<Models.Comment> {
|
|
668
|
+
let params: { pageId: string, uuid: string, taskIndex: number };
|
|
669
|
+
|
|
670
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
671
|
+
params = (paramsOrFirst || {}) as { pageId: string, uuid: string, taskIndex: number };
|
|
672
|
+
} else {
|
|
673
|
+
params = {
|
|
674
|
+
pageId: paramsOrFirst as string,
|
|
675
|
+
uuid: rest[0] as string,
|
|
676
|
+
taskIndex: rest[1] as number
|
|
677
|
+
};
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
const pageId = params.pageId;
|
|
681
|
+
const uuid = params.uuid;
|
|
682
|
+
const taskIndex = params.taskIndex;
|
|
683
|
+
|
|
684
|
+
if (typeof pageId === 'undefined') {
|
|
685
|
+
throw new RevenexxException('Missing required parameter: "pageId"');
|
|
686
|
+
}
|
|
687
|
+
if (typeof uuid === 'undefined') {
|
|
688
|
+
throw new RevenexxException('Missing required parameter: "uuid"');
|
|
689
|
+
}
|
|
690
|
+
if (typeof taskIndex === 'undefined') {
|
|
691
|
+
throw new RevenexxException('Missing required parameter: "taskIndex"');
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
const apiPath = '/v1/pages/editor/{page_id}/comments/{uuid}/toggle-task'.replace('{page_id}', pageId).replace('{uuid}', uuid);
|
|
695
|
+
const apiPayload: Payload = {};
|
|
696
|
+
if (typeof taskIndex !== 'undefined') {
|
|
697
|
+
apiPayload['taskIndex'] = taskIndex;
|
|
698
|
+
}
|
|
699
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
700
|
+
|
|
701
|
+
const apiHeaders: { [header: string]: string } = {
|
|
702
|
+
'content-type': 'application/json',
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
return this.client.call(
|
|
706
|
+
'post',
|
|
707
|
+
uri,
|
|
708
|
+
apiHeaders,
|
|
709
|
+
apiPayload
|
|
710
|
+
);
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
/**
|
|
714
|
+
*
|
|
715
|
+
* @param {string} params.pageId -
|
|
716
|
+
* @param {string} params.uuid -
|
|
717
|
+
* @throws {RevenexxException}
|
|
718
|
+
* @returns {Promise<{}>}
|
|
719
|
+
*/
|
|
720
|
+
pagesEditorCommentsUnresolve(params: { pageId: string, uuid: string }): Promise<{}>;
|
|
721
|
+
/**
|
|
722
|
+
*
|
|
723
|
+
* @param {string} pageId -
|
|
724
|
+
* @param {string} uuid -
|
|
725
|
+
* @throws {RevenexxException}
|
|
726
|
+
* @returns {Promise<{}>}
|
|
727
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
728
|
+
*/
|
|
729
|
+
pagesEditorCommentsUnresolve(pageId: string, uuid: string): Promise<{}>;
|
|
730
|
+
pagesEditorCommentsUnresolve(
|
|
731
|
+
paramsOrFirst: { pageId: string, uuid: string } | string,
|
|
732
|
+
...rest: [(string)?]
|
|
733
|
+
): Promise<{}> {
|
|
734
|
+
let params: { pageId: string, uuid: string };
|
|
735
|
+
|
|
736
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
737
|
+
params = (paramsOrFirst || {}) as { pageId: string, uuid: string };
|
|
738
|
+
} else {
|
|
739
|
+
params = {
|
|
740
|
+
pageId: paramsOrFirst as string,
|
|
741
|
+
uuid: rest[0] as string
|
|
742
|
+
};
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
const pageId = params.pageId;
|
|
746
|
+
const uuid = params.uuid;
|
|
747
|
+
|
|
748
|
+
if (typeof pageId === 'undefined') {
|
|
749
|
+
throw new RevenexxException('Missing required parameter: "pageId"');
|
|
750
|
+
}
|
|
751
|
+
if (typeof uuid === 'undefined') {
|
|
752
|
+
throw new RevenexxException('Missing required parameter: "uuid"');
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
const apiPath = '/v1/pages/editor/{page_id}/comments/{uuid}/unresolve'.replace('{page_id}', pageId).replace('{uuid}', uuid);
|
|
756
|
+
const apiPayload: Payload = {};
|
|
757
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
758
|
+
|
|
759
|
+
const apiHeaders: { [header: string]: string } = {
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
return this.client.call(
|
|
763
|
+
'post',
|
|
764
|
+
uri,
|
|
765
|
+
apiHeaders,
|
|
766
|
+
apiPayload
|
|
767
|
+
);
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
/**
|
|
771
|
+
*
|
|
772
|
+
* @param {string} params.pageId -
|
|
773
|
+
* @param {number} params.index -
|
|
774
|
+
* @param {string} params.langcode -
|
|
775
|
+
* @throws {RevenexxException}
|
|
776
|
+
* @returns {Promise<Models.MutationResponse>}
|
|
777
|
+
*/
|
|
778
|
+
pagesEditorHistory(params: { pageId: string, index: number, langcode?: string }): Promise<Models.MutationResponse>;
|
|
779
|
+
/**
|
|
780
|
+
*
|
|
781
|
+
* @param {string} pageId -
|
|
782
|
+
* @param {number} index -
|
|
783
|
+
* @param {string} langcode -
|
|
784
|
+
* @throws {RevenexxException}
|
|
785
|
+
* @returns {Promise<Models.MutationResponse>}
|
|
786
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
787
|
+
*/
|
|
788
|
+
pagesEditorHistory(pageId: string, index: number, langcode?: string): Promise<Models.MutationResponse>;
|
|
789
|
+
pagesEditorHistory(
|
|
790
|
+
paramsOrFirst: { pageId: string, index: number, langcode?: string } | string,
|
|
791
|
+
...rest: [(number)?, (string)?]
|
|
792
|
+
): Promise<Models.MutationResponse> {
|
|
793
|
+
let params: { pageId: string, index: number, langcode?: string };
|
|
794
|
+
|
|
795
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
796
|
+
params = (paramsOrFirst || {}) as { pageId: string, index: number, langcode?: string };
|
|
797
|
+
} else {
|
|
798
|
+
params = {
|
|
799
|
+
pageId: paramsOrFirst as string,
|
|
800
|
+
index: rest[0] as number,
|
|
801
|
+
langcode: rest[1] as string
|
|
802
|
+
};
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
const pageId = params.pageId;
|
|
806
|
+
const index = params.index;
|
|
807
|
+
const langcode = params.langcode;
|
|
808
|
+
|
|
809
|
+
if (typeof pageId === 'undefined') {
|
|
810
|
+
throw new RevenexxException('Missing required parameter: "pageId"');
|
|
811
|
+
}
|
|
812
|
+
if (typeof index === 'undefined') {
|
|
813
|
+
throw new RevenexxException('Missing required parameter: "index"');
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
const apiPath = '/v1/pages/editor/{page_id}/history'.replace('{page_id}', pageId);
|
|
817
|
+
const apiPayload: Payload = {};
|
|
818
|
+
if (typeof index !== 'undefined') {
|
|
819
|
+
apiPayload['index'] = index;
|
|
820
|
+
}
|
|
821
|
+
if (typeof langcode !== 'undefined') {
|
|
822
|
+
apiPayload['langcode'] = langcode;
|
|
823
|
+
}
|
|
824
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
825
|
+
|
|
826
|
+
const apiHeaders: { [header: string]: string } = {
|
|
827
|
+
'content-type': 'application/json',
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
return this.client.call(
|
|
831
|
+
'post',
|
|
832
|
+
uri,
|
|
833
|
+
apiHeaders,
|
|
834
|
+
apiPayload
|
|
835
|
+
);
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
/**
|
|
839
|
+
*
|
|
840
|
+
* @param {string} params.pageId -
|
|
841
|
+
* @throws {RevenexxException}
|
|
842
|
+
* @returns {Promise<{}>}
|
|
843
|
+
*/
|
|
844
|
+
pagesEditorLastChanged(params: { pageId: string }): Promise<{}>;
|
|
845
|
+
/**
|
|
846
|
+
*
|
|
847
|
+
* @param {string} pageId -
|
|
848
|
+
* @throws {RevenexxException}
|
|
849
|
+
* @returns {Promise<{}>}
|
|
850
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
851
|
+
*/
|
|
852
|
+
pagesEditorLastChanged(pageId: string): Promise<{}>;
|
|
853
|
+
pagesEditorLastChanged(
|
|
854
|
+
paramsOrFirst: { pageId: string } | string
|
|
855
|
+
): Promise<{}> {
|
|
856
|
+
let params: { pageId: string };
|
|
857
|
+
|
|
858
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
859
|
+
params = (paramsOrFirst || {}) as { pageId: string };
|
|
860
|
+
} else {
|
|
861
|
+
params = {
|
|
862
|
+
pageId: paramsOrFirst as string
|
|
863
|
+
};
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
const pageId = params.pageId;
|
|
867
|
+
|
|
868
|
+
if (typeof pageId === 'undefined') {
|
|
869
|
+
throw new RevenexxException('Missing required parameter: "pageId"');
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
const apiPath = '/v1/pages/editor/{page_id}/last-changed'.replace('{page_id}', pageId);
|
|
873
|
+
const apiPayload: Payload = {};
|
|
874
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
875
|
+
|
|
876
|
+
const apiHeaders: { [header: string]: string } = {
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
return this.client.call(
|
|
880
|
+
'get',
|
|
881
|
+
uri,
|
|
882
|
+
apiHeaders,
|
|
883
|
+
apiPayload
|
|
884
|
+
);
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
/**
|
|
888
|
+
*
|
|
889
|
+
* @param {string} params.pageId -
|
|
890
|
+
* @param {boolean} params.enabled -
|
|
891
|
+
* @param {number} params.index -
|
|
892
|
+
* @param {string} params.langcode -
|
|
893
|
+
* @throws {RevenexxException}
|
|
894
|
+
* @returns {Promise<Models.MutationResponse>}
|
|
895
|
+
*/
|
|
896
|
+
pagesEditorMutationStatus(params: { pageId: string, enabled: boolean, index: number, langcode?: string }): Promise<Models.MutationResponse>;
|
|
897
|
+
/**
|
|
898
|
+
*
|
|
899
|
+
* @param {string} pageId -
|
|
900
|
+
* @param {boolean} enabled -
|
|
901
|
+
* @param {number} index -
|
|
902
|
+
* @param {string} langcode -
|
|
903
|
+
* @throws {RevenexxException}
|
|
904
|
+
* @returns {Promise<Models.MutationResponse>}
|
|
905
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
906
|
+
*/
|
|
907
|
+
pagesEditorMutationStatus(pageId: string, enabled: boolean, index: number, langcode?: string): Promise<Models.MutationResponse>;
|
|
908
|
+
pagesEditorMutationStatus(
|
|
909
|
+
paramsOrFirst: { pageId: string, enabled: boolean, index: number, langcode?: string } | string,
|
|
910
|
+
...rest: [(boolean)?, (number)?, (string)?]
|
|
911
|
+
): Promise<Models.MutationResponse> {
|
|
912
|
+
let params: { pageId: string, enabled: boolean, index: number, langcode?: string };
|
|
913
|
+
|
|
914
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
915
|
+
params = (paramsOrFirst || {}) as { pageId: string, enabled: boolean, index: number, langcode?: string };
|
|
916
|
+
} else {
|
|
917
|
+
params = {
|
|
918
|
+
pageId: paramsOrFirst as string,
|
|
919
|
+
enabled: rest[0] as boolean,
|
|
920
|
+
index: rest[1] as number,
|
|
921
|
+
langcode: rest[2] as string
|
|
922
|
+
};
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
const pageId = params.pageId;
|
|
926
|
+
const enabled = params.enabled;
|
|
927
|
+
const index = params.index;
|
|
928
|
+
const langcode = params.langcode;
|
|
929
|
+
|
|
930
|
+
if (typeof pageId === 'undefined') {
|
|
931
|
+
throw new RevenexxException('Missing required parameter: "pageId"');
|
|
932
|
+
}
|
|
933
|
+
if (typeof enabled === 'undefined') {
|
|
934
|
+
throw new RevenexxException('Missing required parameter: "enabled"');
|
|
935
|
+
}
|
|
936
|
+
if (typeof index === 'undefined') {
|
|
937
|
+
throw new RevenexxException('Missing required parameter: "index"');
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
const apiPath = '/v1/pages/editor/{page_id}/mutation-status'.replace('{page_id}', pageId);
|
|
941
|
+
const apiPayload: Payload = {};
|
|
942
|
+
if (typeof enabled !== 'undefined') {
|
|
943
|
+
apiPayload['enabled'] = enabled;
|
|
944
|
+
}
|
|
945
|
+
if (typeof index !== 'undefined') {
|
|
946
|
+
apiPayload['index'] = index;
|
|
947
|
+
}
|
|
948
|
+
if (typeof langcode !== 'undefined') {
|
|
949
|
+
apiPayload['langcode'] = langcode;
|
|
950
|
+
}
|
|
951
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
952
|
+
|
|
953
|
+
const apiHeaders: { [header: string]: string } = {
|
|
954
|
+
'content-type': 'application/json',
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
return this.client.call(
|
|
958
|
+
'post',
|
|
959
|
+
uri,
|
|
960
|
+
apiHeaders,
|
|
961
|
+
apiPayload
|
|
962
|
+
);
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
/**
|
|
966
|
+
*
|
|
967
|
+
* @param {string} params.pageId -
|
|
968
|
+
* @param {string} params.plugin - Mutation plugin id (add, move, delete, duplicate, update_field_value, ...).
|
|
969
|
+
* @param {string} params.langcode -
|
|
970
|
+
* @param {object} params.payload -
|
|
971
|
+
* @throws {RevenexxException}
|
|
972
|
+
* @returns {Promise<Models.MutationResponse>}
|
|
973
|
+
*/
|
|
974
|
+
pagesEditorMutate(params: { pageId: string, plugin: string, langcode?: string, payload?: object }): Promise<Models.MutationResponse>;
|
|
975
|
+
/**
|
|
976
|
+
*
|
|
977
|
+
* @param {string} pageId -
|
|
978
|
+
* @param {string} plugin - Mutation plugin id (add, move, delete, duplicate, update_field_value, ...).
|
|
979
|
+
* @param {string} langcode -
|
|
980
|
+
* @param {object} payload -
|
|
981
|
+
* @throws {RevenexxException}
|
|
982
|
+
* @returns {Promise<Models.MutationResponse>}
|
|
983
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
984
|
+
*/
|
|
985
|
+
pagesEditorMutate(pageId: string, plugin: string, langcode?: string, payload?: object): Promise<Models.MutationResponse>;
|
|
986
|
+
pagesEditorMutate(
|
|
987
|
+
paramsOrFirst: { pageId: string, plugin: string, langcode?: string, payload?: object } | string,
|
|
988
|
+
...rest: [(string)?, (string)?, (object)?]
|
|
989
|
+
): Promise<Models.MutationResponse> {
|
|
990
|
+
let params: { pageId: string, plugin: string, langcode?: string, payload?: object };
|
|
991
|
+
|
|
992
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
993
|
+
params = (paramsOrFirst || {}) as { pageId: string, plugin: string, langcode?: string, payload?: object };
|
|
994
|
+
} else {
|
|
995
|
+
params = {
|
|
996
|
+
pageId: paramsOrFirst as string,
|
|
997
|
+
plugin: rest[0] as string,
|
|
998
|
+
langcode: rest[1] as string,
|
|
999
|
+
payload: rest[2] as object
|
|
1000
|
+
};
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
const pageId = params.pageId;
|
|
1004
|
+
const plugin = params.plugin;
|
|
1005
|
+
const langcode = params.langcode;
|
|
1006
|
+
const payload = params.payload;
|
|
1007
|
+
|
|
1008
|
+
if (typeof pageId === 'undefined') {
|
|
1009
|
+
throw new RevenexxException('Missing required parameter: "pageId"');
|
|
1010
|
+
}
|
|
1011
|
+
if (typeof plugin === 'undefined') {
|
|
1012
|
+
throw new RevenexxException('Missing required parameter: "plugin"');
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
const apiPath = '/v1/pages/editor/{page_id}/mutations'.replace('{page_id}', pageId);
|
|
1016
|
+
const apiPayload: Payload = {};
|
|
1017
|
+
if (typeof langcode !== 'undefined') {
|
|
1018
|
+
apiPayload['langcode'] = langcode;
|
|
1019
|
+
}
|
|
1020
|
+
if (typeof payload !== 'undefined') {
|
|
1021
|
+
apiPayload['payload'] = payload;
|
|
1022
|
+
}
|
|
1023
|
+
if (typeof plugin !== 'undefined') {
|
|
1024
|
+
apiPayload['plugin'] = plugin;
|
|
1025
|
+
}
|
|
1026
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1027
|
+
|
|
1028
|
+
const apiHeaders: { [header: string]: string } = {
|
|
1029
|
+
'content-type': 'application/json',
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
return this.client.call(
|
|
1033
|
+
'post',
|
|
1034
|
+
uri,
|
|
1035
|
+
apiHeaders,
|
|
1036
|
+
apiPayload
|
|
1037
|
+
);
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
/**
|
|
1041
|
+
*
|
|
1042
|
+
* @param {string} params.pageId -
|
|
1043
|
+
* @param {number} params.ttlHours -
|
|
1044
|
+
* @throws {RevenexxException}
|
|
1045
|
+
* @returns {Promise<{}>}
|
|
1046
|
+
*/
|
|
1047
|
+
pagesEditorPreviewGrant(params: { pageId: string, ttlHours?: number }): Promise<{}>;
|
|
1048
|
+
/**
|
|
1049
|
+
*
|
|
1050
|
+
* @param {string} pageId -
|
|
1051
|
+
* @param {number} ttlHours -
|
|
1052
|
+
* @throws {RevenexxException}
|
|
1053
|
+
* @returns {Promise<{}>}
|
|
1054
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1055
|
+
*/
|
|
1056
|
+
pagesEditorPreviewGrant(pageId: string, ttlHours?: number): Promise<{}>;
|
|
1057
|
+
pagesEditorPreviewGrant(
|
|
1058
|
+
paramsOrFirst: { pageId: string, ttlHours?: number } | string,
|
|
1059
|
+
...rest: [(number)?]
|
|
1060
|
+
): Promise<{}> {
|
|
1061
|
+
let params: { pageId: string, ttlHours?: number };
|
|
1062
|
+
|
|
1063
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1064
|
+
params = (paramsOrFirst || {}) as { pageId: string, ttlHours?: number };
|
|
1065
|
+
} else {
|
|
1066
|
+
params = {
|
|
1067
|
+
pageId: paramsOrFirst as string,
|
|
1068
|
+
ttlHours: rest[0] as number
|
|
1069
|
+
};
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
const pageId = params.pageId;
|
|
1073
|
+
const ttlHours = params.ttlHours;
|
|
1074
|
+
|
|
1075
|
+
if (typeof pageId === 'undefined') {
|
|
1076
|
+
throw new RevenexxException('Missing required parameter: "pageId"');
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
const apiPath = '/v1/pages/editor/{page_id}/preview-grant'.replace('{page_id}', pageId);
|
|
1080
|
+
const apiPayload: Payload = {};
|
|
1081
|
+
if (typeof ttlHours !== 'undefined') {
|
|
1082
|
+
apiPayload['ttlHours'] = ttlHours;
|
|
1083
|
+
}
|
|
1084
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1085
|
+
|
|
1086
|
+
const apiHeaders: { [header: string]: string } = {
|
|
1087
|
+
'content-type': 'application/json',
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
return this.client.call(
|
|
1091
|
+
'post',
|
|
1092
|
+
uri,
|
|
1093
|
+
apiHeaders,
|
|
1094
|
+
apiPayload
|
|
1095
|
+
);
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
/**
|
|
1099
|
+
*
|
|
1100
|
+
* @param {string} params.pageId -
|
|
1101
|
+
* @param {boolean} params.force - Publish despite violations.
|
|
1102
|
+
* @param {string} params.label -
|
|
1103
|
+
* @throws {RevenexxException}
|
|
1104
|
+
* @returns {Promise<Models.MutationResponse>}
|
|
1105
|
+
*/
|
|
1106
|
+
pagesEditorPublish(params: { pageId: string, force?: boolean, label?: string }): Promise<Models.MutationResponse>;
|
|
1107
|
+
/**
|
|
1108
|
+
*
|
|
1109
|
+
* @param {string} pageId -
|
|
1110
|
+
* @param {boolean} force - Publish despite violations.
|
|
1111
|
+
* @param {string} label -
|
|
1112
|
+
* @throws {RevenexxException}
|
|
1113
|
+
* @returns {Promise<Models.MutationResponse>}
|
|
1114
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1115
|
+
*/
|
|
1116
|
+
pagesEditorPublish(pageId: string, force?: boolean, label?: string): Promise<Models.MutationResponse>;
|
|
1117
|
+
pagesEditorPublish(
|
|
1118
|
+
paramsOrFirst: { pageId: string, force?: boolean, label?: string } | string,
|
|
1119
|
+
...rest: [(boolean)?, (string)?]
|
|
1120
|
+
): Promise<Models.MutationResponse> {
|
|
1121
|
+
let params: { pageId: string, force?: boolean, label?: string };
|
|
1122
|
+
|
|
1123
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1124
|
+
params = (paramsOrFirst || {}) as { pageId: string, force?: boolean, label?: string };
|
|
1125
|
+
} else {
|
|
1126
|
+
params = {
|
|
1127
|
+
pageId: paramsOrFirst as string,
|
|
1128
|
+
force: rest[0] as boolean,
|
|
1129
|
+
label: rest[1] as string
|
|
1130
|
+
};
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
const pageId = params.pageId;
|
|
1134
|
+
const force = params.force;
|
|
1135
|
+
const label = params.label;
|
|
1136
|
+
|
|
1137
|
+
if (typeof pageId === 'undefined') {
|
|
1138
|
+
throw new RevenexxException('Missing required parameter: "pageId"');
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
const apiPath = '/v1/pages/editor/{page_id}/publish'.replace('{page_id}', pageId);
|
|
1142
|
+
const apiPayload: Payload = {};
|
|
1143
|
+
if (typeof force !== 'undefined') {
|
|
1144
|
+
apiPayload['force'] = force;
|
|
1145
|
+
}
|
|
1146
|
+
if (typeof label !== 'undefined') {
|
|
1147
|
+
apiPayload['label'] = label;
|
|
1148
|
+
}
|
|
1149
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1150
|
+
|
|
1151
|
+
const apiHeaders: { [header: string]: string } = {
|
|
1152
|
+
'content-type': 'application/json',
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
return this.client.call(
|
|
1156
|
+
'post',
|
|
1157
|
+
uri,
|
|
1158
|
+
apiHeaders,
|
|
1159
|
+
apiPayload
|
|
1160
|
+
);
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
/**
|
|
1164
|
+
*
|
|
1165
|
+
* @param {string} params.pageId -
|
|
1166
|
+
* @throws {RevenexxException}
|
|
1167
|
+
* @returns {Promise<Models.MutationResponse>}
|
|
1168
|
+
*/
|
|
1169
|
+
pagesEditorRevert(params: { pageId: string }): Promise<Models.MutationResponse>;
|
|
1170
|
+
/**
|
|
1171
|
+
*
|
|
1172
|
+
* @param {string} pageId -
|
|
1173
|
+
* @throws {RevenexxException}
|
|
1174
|
+
* @returns {Promise<Models.MutationResponse>}
|
|
1175
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1176
|
+
*/
|
|
1177
|
+
pagesEditorRevert(pageId: string): Promise<Models.MutationResponse>;
|
|
1178
|
+
pagesEditorRevert(
|
|
1179
|
+
paramsOrFirst: { pageId: string } | string
|
|
1180
|
+
): Promise<Models.MutationResponse> {
|
|
1181
|
+
let params: { pageId: string };
|
|
1182
|
+
|
|
1183
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1184
|
+
params = (paramsOrFirst || {}) as { pageId: string };
|
|
1185
|
+
} else {
|
|
1186
|
+
params = {
|
|
1187
|
+
pageId: paramsOrFirst as string
|
|
1188
|
+
};
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
const pageId = params.pageId;
|
|
1192
|
+
|
|
1193
|
+
if (typeof pageId === 'undefined') {
|
|
1194
|
+
throw new RevenexxException('Missing required parameter: "pageId"');
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
const apiPath = '/v1/pages/editor/{page_id}/revert'.replace('{page_id}', pageId);
|
|
1198
|
+
const apiPayload: Payload = {};
|
|
1199
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1200
|
+
|
|
1201
|
+
const apiHeaders: { [header: string]: string } = {
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
return this.client.call(
|
|
1205
|
+
'post',
|
|
1206
|
+
uri,
|
|
1207
|
+
apiHeaders,
|
|
1208
|
+
apiPayload
|
|
1209
|
+
);
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
/**
|
|
1213
|
+
*
|
|
1214
|
+
* @param {string} params.pageId -
|
|
1215
|
+
* @param {string} params.scheduledAt -
|
|
1216
|
+
* @throws {RevenexxException}
|
|
1217
|
+
* @returns {Promise<{}>}
|
|
1218
|
+
*/
|
|
1219
|
+
pagesEditorSchedule(params: { pageId: string, scheduledAt: string }): Promise<{}>;
|
|
1220
|
+
/**
|
|
1221
|
+
*
|
|
1222
|
+
* @param {string} pageId -
|
|
1223
|
+
* @param {string} scheduledAt -
|
|
1224
|
+
* @throws {RevenexxException}
|
|
1225
|
+
* @returns {Promise<{}>}
|
|
1226
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1227
|
+
*/
|
|
1228
|
+
pagesEditorSchedule(pageId: string, scheduledAt: string): Promise<{}>;
|
|
1229
|
+
pagesEditorSchedule(
|
|
1230
|
+
paramsOrFirst: { pageId: string, scheduledAt: string } | string,
|
|
1231
|
+
...rest: [(string)?]
|
|
1232
|
+
): Promise<{}> {
|
|
1233
|
+
let params: { pageId: string, scheduledAt: string };
|
|
1234
|
+
|
|
1235
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1236
|
+
params = (paramsOrFirst || {}) as { pageId: string, scheduledAt: string };
|
|
1237
|
+
} else {
|
|
1238
|
+
params = {
|
|
1239
|
+
pageId: paramsOrFirst as string,
|
|
1240
|
+
scheduledAt: rest[0] as string
|
|
1241
|
+
};
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
const pageId = params.pageId;
|
|
1245
|
+
const scheduledAt = params.scheduledAt;
|
|
1246
|
+
|
|
1247
|
+
if (typeof pageId === 'undefined') {
|
|
1248
|
+
throw new RevenexxException('Missing required parameter: "pageId"');
|
|
1249
|
+
}
|
|
1250
|
+
if (typeof scheduledAt === 'undefined') {
|
|
1251
|
+
throw new RevenexxException('Missing required parameter: "scheduledAt"');
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
const apiPath = '/v1/pages/editor/{page_id}/schedule'.replace('{page_id}', pageId);
|
|
1255
|
+
const apiPayload: Payload = {};
|
|
1256
|
+
if (typeof scheduledAt !== 'undefined') {
|
|
1257
|
+
apiPayload['scheduledAt'] = scheduledAt;
|
|
1258
|
+
}
|
|
1259
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1260
|
+
|
|
1261
|
+
const apiHeaders: { [header: string]: string } = {
|
|
1262
|
+
'content-type': 'application/json',
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
return this.client.call(
|
|
1266
|
+
'post',
|
|
1267
|
+
uri,
|
|
1268
|
+
apiHeaders,
|
|
1269
|
+
apiPayload
|
|
1270
|
+
);
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
/**
|
|
1274
|
+
*
|
|
1275
|
+
* @param {string} params.pageId -
|
|
1276
|
+
* @throws {RevenexxException}
|
|
1277
|
+
* @returns {Promise<Models.EditorState>}
|
|
1278
|
+
*/
|
|
1279
|
+
pagesEditorState(params: { pageId: string }): Promise<Models.EditorState>;
|
|
1280
|
+
/**
|
|
1281
|
+
*
|
|
1282
|
+
* @param {string} pageId -
|
|
1283
|
+
* @throws {RevenexxException}
|
|
1284
|
+
* @returns {Promise<Models.EditorState>}
|
|
1285
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1286
|
+
*/
|
|
1287
|
+
pagesEditorState(pageId: string): Promise<Models.EditorState>;
|
|
1288
|
+
pagesEditorState(
|
|
1289
|
+
paramsOrFirst: { pageId: string } | string
|
|
1290
|
+
): Promise<Models.EditorState> {
|
|
1291
|
+
let params: { pageId: string };
|
|
1292
|
+
|
|
1293
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1294
|
+
params = (paramsOrFirst || {}) as { pageId: string };
|
|
1295
|
+
} else {
|
|
1296
|
+
params = {
|
|
1297
|
+
pageId: paramsOrFirst as string
|
|
1298
|
+
};
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
const pageId = params.pageId;
|
|
1302
|
+
|
|
1303
|
+
if (typeof pageId === 'undefined') {
|
|
1304
|
+
throw new RevenexxException('Missing required parameter: "pageId"');
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
const apiPath = '/v1/pages/editor/{page_id}/state'.replace('{page_id}', pageId);
|
|
1308
|
+
const apiPayload: Payload = {};
|
|
1309
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1310
|
+
|
|
1311
|
+
const apiHeaders: { [header: string]: string } = {
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
return this.client.call(
|
|
1315
|
+
'get',
|
|
1316
|
+
uri,
|
|
1317
|
+
apiHeaders,
|
|
1318
|
+
apiPayload
|
|
1319
|
+
);
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
/**
|
|
1323
|
+
*
|
|
1324
|
+
* @param {string} params.pageId -
|
|
1325
|
+
* @throws {RevenexxException}
|
|
1326
|
+
* @returns {Promise<Models.MutationResponse>}
|
|
1327
|
+
*/
|
|
1328
|
+
pagesEditorTakeOwnership(params: { pageId: string }): Promise<Models.MutationResponse>;
|
|
1329
|
+
/**
|
|
1330
|
+
*
|
|
1331
|
+
* @param {string} pageId -
|
|
1332
|
+
* @throws {RevenexxException}
|
|
1333
|
+
* @returns {Promise<Models.MutationResponse>}
|
|
1334
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1335
|
+
*/
|
|
1336
|
+
pagesEditorTakeOwnership(pageId: string): Promise<Models.MutationResponse>;
|
|
1337
|
+
pagesEditorTakeOwnership(
|
|
1338
|
+
paramsOrFirst: { pageId: string } | string
|
|
1339
|
+
): Promise<Models.MutationResponse> {
|
|
1340
|
+
let params: { pageId: string };
|
|
1341
|
+
|
|
1342
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1343
|
+
params = (paramsOrFirst || {}) as { pageId: string };
|
|
1344
|
+
} else {
|
|
1345
|
+
params = {
|
|
1346
|
+
pageId: paramsOrFirst as string
|
|
1347
|
+
};
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
const pageId = params.pageId;
|
|
1351
|
+
|
|
1352
|
+
if (typeof pageId === 'undefined') {
|
|
1353
|
+
throw new RevenexxException('Missing required parameter: "pageId"');
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1356
|
+
const apiPath = '/v1/pages/editor/{page_id}/take-ownership'.replace('{page_id}', pageId);
|
|
1357
|
+
const apiPayload: Payload = {};
|
|
1358
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1359
|
+
|
|
1360
|
+
const apiHeaders: { [header: string]: string } = {
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
return this.client.call(
|
|
1364
|
+
'post',
|
|
1365
|
+
uri,
|
|
1366
|
+
apiHeaders,
|
|
1367
|
+
apiPayload
|
|
1368
|
+
);
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
/**
|
|
1372
|
+
*
|
|
1373
|
+
* @param {string} params.pageId -
|
|
1374
|
+
* @param {string} params.label -
|
|
1375
|
+
* @param {string[]} params.uuids -
|
|
1376
|
+
* @param {string} params.description -
|
|
1377
|
+
* @param {string} params.fieldName -
|
|
1378
|
+
* @param {boolean} params.isDefault -
|
|
1379
|
+
* @param {string} params.pageBundle -
|
|
1380
|
+
* @throws {RevenexxException}
|
|
1381
|
+
* @returns {Promise<Models.Template>}
|
|
1382
|
+
*/
|
|
1383
|
+
pagesEditorTemplatesCreate(params: { pageId: string, label: string, uuids: string[], description?: string, fieldName?: string, isDefault?: boolean, pageBundle?: string }): Promise<Models.Template>;
|
|
1384
|
+
/**
|
|
1385
|
+
*
|
|
1386
|
+
* @param {string} pageId -
|
|
1387
|
+
* @param {string} label -
|
|
1388
|
+
* @param {string[]} uuids -
|
|
1389
|
+
* @param {string} description -
|
|
1390
|
+
* @param {string} fieldName -
|
|
1391
|
+
* @param {boolean} isDefault -
|
|
1392
|
+
* @param {string} pageBundle -
|
|
1393
|
+
* @throws {RevenexxException}
|
|
1394
|
+
* @returns {Promise<Models.Template>}
|
|
1395
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1396
|
+
*/
|
|
1397
|
+
pagesEditorTemplatesCreate(pageId: string, label: string, uuids: string[], description?: string, fieldName?: string, isDefault?: boolean, pageBundle?: string): Promise<Models.Template>;
|
|
1398
|
+
pagesEditorTemplatesCreate(
|
|
1399
|
+
paramsOrFirst: { pageId: string, label: string, uuids: string[], description?: string, fieldName?: string, isDefault?: boolean, pageBundle?: string } | string,
|
|
1400
|
+
...rest: [(string)?, (string[])?, (string)?, (string)?, (boolean)?, (string)?]
|
|
1401
|
+
): Promise<Models.Template> {
|
|
1402
|
+
let params: { pageId: string, label: string, uuids: string[], description?: string, fieldName?: string, isDefault?: boolean, pageBundle?: string };
|
|
1403
|
+
|
|
1404
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1405
|
+
params = (paramsOrFirst || {}) as { pageId: string, label: string, uuids: string[], description?: string, fieldName?: string, isDefault?: boolean, pageBundle?: string };
|
|
1406
|
+
} else {
|
|
1407
|
+
params = {
|
|
1408
|
+
pageId: paramsOrFirst as string,
|
|
1409
|
+
label: rest[0] as string,
|
|
1410
|
+
uuids: rest[1] as string[],
|
|
1411
|
+
description: rest[2] as string,
|
|
1412
|
+
fieldName: rest[3] as string,
|
|
1413
|
+
isDefault: rest[4] as boolean,
|
|
1414
|
+
pageBundle: rest[5] as string
|
|
1415
|
+
};
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
const pageId = params.pageId;
|
|
1419
|
+
const label = params.label;
|
|
1420
|
+
const uuids = params.uuids;
|
|
1421
|
+
const description = params.description;
|
|
1422
|
+
const fieldName = params.fieldName;
|
|
1423
|
+
const isDefault = params.isDefault;
|
|
1424
|
+
const pageBundle = params.pageBundle;
|
|
1425
|
+
|
|
1426
|
+
if (typeof pageId === 'undefined') {
|
|
1427
|
+
throw new RevenexxException('Missing required parameter: "pageId"');
|
|
1428
|
+
}
|
|
1429
|
+
if (typeof label === 'undefined') {
|
|
1430
|
+
throw new RevenexxException('Missing required parameter: "label"');
|
|
1431
|
+
}
|
|
1432
|
+
if (typeof uuids === 'undefined') {
|
|
1433
|
+
throw new RevenexxException('Missing required parameter: "uuids"');
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
const apiPath = '/v1/pages/editor/{page_id}/templates'.replace('{page_id}', pageId);
|
|
1437
|
+
const apiPayload: Payload = {};
|
|
1438
|
+
if (typeof description !== 'undefined') {
|
|
1439
|
+
apiPayload['description'] = description;
|
|
1440
|
+
}
|
|
1441
|
+
if (typeof fieldName !== 'undefined') {
|
|
1442
|
+
apiPayload['fieldName'] = fieldName;
|
|
1443
|
+
}
|
|
1444
|
+
if (typeof isDefault !== 'undefined') {
|
|
1445
|
+
apiPayload['isDefault'] = isDefault;
|
|
1446
|
+
}
|
|
1447
|
+
if (typeof label !== 'undefined') {
|
|
1448
|
+
apiPayload['label'] = label;
|
|
1449
|
+
}
|
|
1450
|
+
if (typeof pageBundle !== 'undefined') {
|
|
1451
|
+
apiPayload['pageBundle'] = pageBundle;
|
|
1452
|
+
}
|
|
1453
|
+
if (typeof uuids !== 'undefined') {
|
|
1454
|
+
apiPayload['uuids'] = uuids;
|
|
1455
|
+
}
|
|
1456
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1457
|
+
|
|
1458
|
+
const apiHeaders: { [header: string]: string } = {
|
|
1459
|
+
'content-type': 'application/json',
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
return this.client.call(
|
|
1463
|
+
'post',
|
|
1464
|
+
uri,
|
|
1465
|
+
apiHeaders,
|
|
1466
|
+
apiPayload
|
|
1467
|
+
);
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1470
|
+
/**
|
|
1471
|
+
*
|
|
1472
|
+
* @param {string} params.pageId -
|
|
1473
|
+
* @throws {RevenexxException}
|
|
1474
|
+
* @returns {Promise<{}>}
|
|
1475
|
+
*/
|
|
1476
|
+
pagesEditorUnschedule(params: { pageId: string }): Promise<{}>;
|
|
1477
|
+
/**
|
|
1478
|
+
*
|
|
1479
|
+
* @param {string} pageId -
|
|
1480
|
+
* @throws {RevenexxException}
|
|
1481
|
+
* @returns {Promise<{}>}
|
|
1482
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1483
|
+
*/
|
|
1484
|
+
pagesEditorUnschedule(pageId: string): Promise<{}>;
|
|
1485
|
+
pagesEditorUnschedule(
|
|
1486
|
+
paramsOrFirst: { pageId: string } | string
|
|
1487
|
+
): Promise<{}> {
|
|
1488
|
+
let params: { pageId: string };
|
|
1489
|
+
|
|
1490
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1491
|
+
params = (paramsOrFirst || {}) as { pageId: string };
|
|
1492
|
+
} else {
|
|
1493
|
+
params = {
|
|
1494
|
+
pageId: paramsOrFirst as string
|
|
1495
|
+
};
|
|
1496
|
+
}
|
|
1497
|
+
|
|
1498
|
+
const pageId = params.pageId;
|
|
1499
|
+
|
|
1500
|
+
if (typeof pageId === 'undefined') {
|
|
1501
|
+
throw new RevenexxException('Missing required parameter: "pageId"');
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
const apiPath = '/v1/pages/editor/{page_id}/unschedule'.replace('{page_id}', pageId);
|
|
1505
|
+
const apiPayload: Payload = {};
|
|
1506
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1507
|
+
|
|
1508
|
+
const apiHeaders: { [header: string]: string } = {
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
return this.client.call(
|
|
1512
|
+
'post',
|
|
1513
|
+
uri,
|
|
1514
|
+
apiHeaders,
|
|
1515
|
+
apiPayload
|
|
1516
|
+
);
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
/**
|
|
1520
|
+
*
|
|
1521
|
+
* @throws {RevenexxException}
|
|
1522
|
+
* @returns {Promise<{}>}
|
|
1523
|
+
*/
|
|
1524
|
+
pagesLibraryList(): Promise<{}> {
|
|
1525
|
+
|
|
1526
|
+
const apiPath = '/v1/pages/library';
|
|
1527
|
+
const apiPayload: Payload = {};
|
|
1528
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1529
|
+
|
|
1530
|
+
const apiHeaders: { [header: string]: string } = {
|
|
1531
|
+
}
|
|
1532
|
+
|
|
1533
|
+
return this.client.call(
|
|
1534
|
+
'get',
|
|
1535
|
+
uri,
|
|
1536
|
+
apiHeaders,
|
|
1537
|
+
apiPayload
|
|
1538
|
+
);
|
|
1539
|
+
}
|
|
1540
|
+
|
|
1541
|
+
/**
|
|
1542
|
+
*
|
|
1543
|
+
* @param {string} params.id -
|
|
1544
|
+
* @throws {RevenexxException}
|
|
1545
|
+
* @returns {Promise<{}>}
|
|
1546
|
+
*/
|
|
1547
|
+
pagesLibraryDelete(params: { id: string }): Promise<{}>;
|
|
1548
|
+
/**
|
|
1549
|
+
*
|
|
1550
|
+
* @param {string} id -
|
|
1551
|
+
* @throws {RevenexxException}
|
|
1552
|
+
* @returns {Promise<{}>}
|
|
1553
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1554
|
+
*/
|
|
1555
|
+
pagesLibraryDelete(id: string): Promise<{}>;
|
|
1556
|
+
pagesLibraryDelete(
|
|
1557
|
+
paramsOrFirst: { id: string } | string
|
|
1558
|
+
): Promise<{}> {
|
|
1559
|
+
let params: { id: string };
|
|
1560
|
+
|
|
1561
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1562
|
+
params = (paramsOrFirst || {}) as { id: string };
|
|
1563
|
+
} else {
|
|
1564
|
+
params = {
|
|
1565
|
+
id: paramsOrFirst as string
|
|
1566
|
+
};
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
const id = params.id;
|
|
1570
|
+
|
|
1571
|
+
if (typeof id === 'undefined') {
|
|
1572
|
+
throw new RevenexxException('Missing required parameter: "id"');
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
const apiPath = '/v1/pages/library/{id}'.replace('{id}', id);
|
|
1576
|
+
const apiPayload: Payload = {};
|
|
1577
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1578
|
+
|
|
1579
|
+
const apiHeaders: { [header: string]: string } = {
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
return this.client.call(
|
|
1583
|
+
'delete',
|
|
1584
|
+
uri,
|
|
1585
|
+
apiHeaders,
|
|
1586
|
+
apiPayload
|
|
1587
|
+
);
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
/**
|
|
1591
|
+
*
|
|
1592
|
+
* @param {string} params.id -
|
|
1593
|
+
* @throws {RevenexxException}
|
|
1594
|
+
* @returns {Promise<Models.LibraryItem>}
|
|
1595
|
+
*/
|
|
1596
|
+
pagesLibraryGet(params: { id: string }): Promise<Models.LibraryItem>;
|
|
1597
|
+
/**
|
|
1598
|
+
*
|
|
1599
|
+
* @param {string} id -
|
|
1600
|
+
* @throws {RevenexxException}
|
|
1601
|
+
* @returns {Promise<Models.LibraryItem>}
|
|
1602
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1603
|
+
*/
|
|
1604
|
+
pagesLibraryGet(id: string): Promise<Models.LibraryItem>;
|
|
1605
|
+
pagesLibraryGet(
|
|
1606
|
+
paramsOrFirst: { id: string } | string
|
|
1607
|
+
): Promise<Models.LibraryItem> {
|
|
1608
|
+
let params: { id: string };
|
|
1609
|
+
|
|
1610
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1611
|
+
params = (paramsOrFirst || {}) as { id: string };
|
|
1612
|
+
} else {
|
|
1613
|
+
params = {
|
|
1614
|
+
id: paramsOrFirst as string
|
|
1615
|
+
};
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
const id = params.id;
|
|
1619
|
+
|
|
1620
|
+
if (typeof id === 'undefined') {
|
|
1621
|
+
throw new RevenexxException('Missing required parameter: "id"');
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
const apiPath = '/v1/pages/library/{id}'.replace('{id}', id);
|
|
1625
|
+
const apiPayload: Payload = {};
|
|
1626
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1627
|
+
|
|
1628
|
+
const apiHeaders: { [header: string]: string } = {
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
return this.client.call(
|
|
1632
|
+
'get',
|
|
1633
|
+
uri,
|
|
1634
|
+
apiHeaders,
|
|
1635
|
+
apiPayload
|
|
1636
|
+
);
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
/**
|
|
1640
|
+
*
|
|
1641
|
+
* @param {string} params.id -
|
|
1642
|
+
* @param {string} params.bundle -
|
|
1643
|
+
* @param {string} params.label -
|
|
1644
|
+
* @param {object} params.tree - Serialized block tree ({ bundle, props, props_i18n, options, children }).
|
|
1645
|
+
* @throws {RevenexxException}
|
|
1646
|
+
* @returns {Promise<Models.LibraryItem>}
|
|
1647
|
+
*/
|
|
1648
|
+
pagesLibraryUpdate(params: { id: string, bundle?: string, label?: string, tree?: object }): Promise<Models.LibraryItem>;
|
|
1649
|
+
/**
|
|
1650
|
+
*
|
|
1651
|
+
* @param {string} id -
|
|
1652
|
+
* @param {string} bundle -
|
|
1653
|
+
* @param {string} label -
|
|
1654
|
+
* @param {object} tree - Serialized block tree ({ bundle, props, props_i18n, options, children }).
|
|
1655
|
+
* @throws {RevenexxException}
|
|
1656
|
+
* @returns {Promise<Models.LibraryItem>}
|
|
1657
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1658
|
+
*/
|
|
1659
|
+
pagesLibraryUpdate(id: string, bundle?: string, label?: string, tree?: object): Promise<Models.LibraryItem>;
|
|
1660
|
+
pagesLibraryUpdate(
|
|
1661
|
+
paramsOrFirst: { id: string, bundle?: string, label?: string, tree?: object } | string,
|
|
1662
|
+
...rest: [(string)?, (string)?, (object)?]
|
|
1663
|
+
): Promise<Models.LibraryItem> {
|
|
1664
|
+
let params: { id: string, bundle?: string, label?: string, tree?: object };
|
|
1665
|
+
|
|
1666
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1667
|
+
params = (paramsOrFirst || {}) as { id: string, bundle?: string, label?: string, tree?: object };
|
|
1668
|
+
} else {
|
|
1669
|
+
params = {
|
|
1670
|
+
id: paramsOrFirst as string,
|
|
1671
|
+
bundle: rest[0] as string,
|
|
1672
|
+
label: rest[1] as string,
|
|
1673
|
+
tree: rest[2] as object
|
|
1674
|
+
};
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
const id = params.id;
|
|
1678
|
+
const bundle = params.bundle;
|
|
1679
|
+
const label = params.label;
|
|
1680
|
+
const tree = params.tree;
|
|
1681
|
+
|
|
1682
|
+
if (typeof id === 'undefined') {
|
|
1683
|
+
throw new RevenexxException('Missing required parameter: "id"');
|
|
1684
|
+
}
|
|
1685
|
+
|
|
1686
|
+
const apiPath = '/v1/pages/library/{id}'.replace('{id}', id);
|
|
1687
|
+
const apiPayload: Payload = {};
|
|
1688
|
+
if (typeof bundle !== 'undefined') {
|
|
1689
|
+
apiPayload['bundle'] = bundle;
|
|
1690
|
+
}
|
|
1691
|
+
if (typeof label !== 'undefined') {
|
|
1692
|
+
apiPayload['label'] = label;
|
|
1693
|
+
}
|
|
1694
|
+
if (typeof tree !== 'undefined') {
|
|
1695
|
+
apiPayload['tree'] = tree;
|
|
1696
|
+
}
|
|
1697
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1698
|
+
|
|
1699
|
+
const apiHeaders: { [header: string]: string } = {
|
|
1700
|
+
'content-type': 'application/json',
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1703
|
+
return this.client.call(
|
|
1704
|
+
'put',
|
|
1705
|
+
uri,
|
|
1706
|
+
apiHeaders,
|
|
1707
|
+
apiPayload
|
|
1708
|
+
);
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
/**
|
|
1712
|
+
*
|
|
1713
|
+
* @throws {RevenexxException}
|
|
1714
|
+
* @returns {Promise<{}>}
|
|
1715
|
+
*/
|
|
1716
|
+
pagesPagesList(): Promise<{}> {
|
|
1717
|
+
|
|
1718
|
+
const apiPath = '/v1/pages/pages';
|
|
1719
|
+
const apiPayload: Payload = {};
|
|
1720
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1721
|
+
|
|
1722
|
+
const apiHeaders: { [header: string]: string } = {
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
return this.client.call(
|
|
1726
|
+
'get',
|
|
1727
|
+
uri,
|
|
1728
|
+
apiHeaders,
|
|
1729
|
+
apiPayload
|
|
1730
|
+
);
|
|
1731
|
+
}
|
|
1732
|
+
|
|
1733
|
+
/**
|
|
1734
|
+
*
|
|
1735
|
+
* @param {string} params.title -
|
|
1736
|
+
* @param {string} params.bundle -
|
|
1737
|
+
* @param {object} params.hostOptions -
|
|
1738
|
+
* @param {object} params.meta -
|
|
1739
|
+
* @param {string} params.slug -
|
|
1740
|
+
* @param {string} params.sourceLanguage -
|
|
1741
|
+
* @throws {RevenexxException}
|
|
1742
|
+
* @returns {Promise<Models.Page>}
|
|
1743
|
+
*/
|
|
1744
|
+
pagesPagesCreate(params: { title: string, bundle?: string, hostOptions?: object, meta?: object, slug?: string, sourceLanguage?: string }): Promise<Models.Page>;
|
|
1745
|
+
/**
|
|
1746
|
+
*
|
|
1747
|
+
* @param {string} title -
|
|
1748
|
+
* @param {string} bundle -
|
|
1749
|
+
* @param {object} hostOptions -
|
|
1750
|
+
* @param {object} meta -
|
|
1751
|
+
* @param {string} slug -
|
|
1752
|
+
* @param {string} sourceLanguage -
|
|
1753
|
+
* @throws {RevenexxException}
|
|
1754
|
+
* @returns {Promise<Models.Page>}
|
|
1755
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1756
|
+
*/
|
|
1757
|
+
pagesPagesCreate(title: string, bundle?: string, hostOptions?: object, meta?: object, slug?: string, sourceLanguage?: string): Promise<Models.Page>;
|
|
1758
|
+
pagesPagesCreate(
|
|
1759
|
+
paramsOrFirst: { title: string, bundle?: string, hostOptions?: object, meta?: object, slug?: string, sourceLanguage?: string } | string,
|
|
1760
|
+
...rest: [(string)?, (object)?, (object)?, (string)?, (string)?]
|
|
1761
|
+
): Promise<Models.Page> {
|
|
1762
|
+
let params: { title: string, bundle?: string, hostOptions?: object, meta?: object, slug?: string, sourceLanguage?: string };
|
|
1763
|
+
|
|
1764
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1765
|
+
params = (paramsOrFirst || {}) as { title: string, bundle?: string, hostOptions?: object, meta?: object, slug?: string, sourceLanguage?: string };
|
|
1766
|
+
} else {
|
|
1767
|
+
params = {
|
|
1768
|
+
title: paramsOrFirst as string,
|
|
1769
|
+
bundle: rest[0] as string,
|
|
1770
|
+
hostOptions: rest[1] as object,
|
|
1771
|
+
meta: rest[2] as object,
|
|
1772
|
+
slug: rest[3] as string,
|
|
1773
|
+
sourceLanguage: rest[4] as string
|
|
1774
|
+
};
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1777
|
+
const title = params.title;
|
|
1778
|
+
const bundle = params.bundle;
|
|
1779
|
+
const hostOptions = params.hostOptions;
|
|
1780
|
+
const meta = params.meta;
|
|
1781
|
+
const slug = params.slug;
|
|
1782
|
+
const sourceLanguage = params.sourceLanguage;
|
|
1783
|
+
|
|
1784
|
+
if (typeof title === 'undefined') {
|
|
1785
|
+
throw new RevenexxException('Missing required parameter: "title"');
|
|
1786
|
+
}
|
|
1787
|
+
|
|
1788
|
+
const apiPath = '/v1/pages/pages';
|
|
1789
|
+
const apiPayload: Payload = {};
|
|
1790
|
+
if (typeof bundle !== 'undefined') {
|
|
1791
|
+
apiPayload['bundle'] = bundle;
|
|
1792
|
+
}
|
|
1793
|
+
if (typeof hostOptions !== 'undefined') {
|
|
1794
|
+
apiPayload['hostOptions'] = hostOptions;
|
|
1795
|
+
}
|
|
1796
|
+
if (typeof meta !== 'undefined') {
|
|
1797
|
+
apiPayload['meta'] = meta;
|
|
1798
|
+
}
|
|
1799
|
+
if (typeof slug !== 'undefined') {
|
|
1800
|
+
apiPayload['slug'] = slug;
|
|
1801
|
+
}
|
|
1802
|
+
if (typeof sourceLanguage !== 'undefined') {
|
|
1803
|
+
apiPayload['sourceLanguage'] = sourceLanguage;
|
|
1804
|
+
}
|
|
1805
|
+
if (typeof title !== 'undefined') {
|
|
1806
|
+
apiPayload['title'] = title;
|
|
1807
|
+
}
|
|
1808
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1809
|
+
|
|
1810
|
+
const apiHeaders: { [header: string]: string } = {
|
|
1811
|
+
'content-type': 'application/json',
|
|
1812
|
+
}
|
|
1813
|
+
|
|
1814
|
+
return this.client.call(
|
|
1815
|
+
'post',
|
|
1816
|
+
uri,
|
|
1817
|
+
apiHeaders,
|
|
1818
|
+
apiPayload
|
|
1819
|
+
);
|
|
1820
|
+
}
|
|
1821
|
+
|
|
1822
|
+
/**
|
|
1823
|
+
*
|
|
1824
|
+
* @param {string} params.id -
|
|
1825
|
+
* @throws {RevenexxException}
|
|
1826
|
+
* @returns {Promise<{}>}
|
|
1827
|
+
*/
|
|
1828
|
+
pagesPagesDelete(params: { id: string }): Promise<{}>;
|
|
1829
|
+
/**
|
|
1830
|
+
*
|
|
1831
|
+
* @param {string} id -
|
|
1832
|
+
* @throws {RevenexxException}
|
|
1833
|
+
* @returns {Promise<{}>}
|
|
1834
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1835
|
+
*/
|
|
1836
|
+
pagesPagesDelete(id: string): Promise<{}>;
|
|
1837
|
+
pagesPagesDelete(
|
|
1838
|
+
paramsOrFirst: { id: string } | string
|
|
1839
|
+
): Promise<{}> {
|
|
1840
|
+
let params: { id: string };
|
|
1841
|
+
|
|
1842
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1843
|
+
params = (paramsOrFirst || {}) as { id: string };
|
|
1844
|
+
} else {
|
|
1845
|
+
params = {
|
|
1846
|
+
id: paramsOrFirst as string
|
|
1847
|
+
};
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1850
|
+
const id = params.id;
|
|
1851
|
+
|
|
1852
|
+
if (typeof id === 'undefined') {
|
|
1853
|
+
throw new RevenexxException('Missing required parameter: "id"');
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1856
|
+
const apiPath = '/v1/pages/pages/{id}'.replace('{id}', id);
|
|
1857
|
+
const apiPayload: Payload = {};
|
|
1858
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1859
|
+
|
|
1860
|
+
const apiHeaders: { [header: string]: string } = {
|
|
1861
|
+
}
|
|
1862
|
+
|
|
1863
|
+
return this.client.call(
|
|
1864
|
+
'delete',
|
|
1865
|
+
uri,
|
|
1866
|
+
apiHeaders,
|
|
1867
|
+
apiPayload
|
|
1868
|
+
);
|
|
1869
|
+
}
|
|
1870
|
+
|
|
1871
|
+
/**
|
|
1872
|
+
*
|
|
1873
|
+
* @param {string} params.id -
|
|
1874
|
+
* @throws {RevenexxException}
|
|
1875
|
+
* @returns {Promise<Models.Page>}
|
|
1876
|
+
*/
|
|
1877
|
+
pagesPagesGet(params: { id: string }): Promise<Models.Page>;
|
|
1878
|
+
/**
|
|
1879
|
+
*
|
|
1880
|
+
* @param {string} id -
|
|
1881
|
+
* @throws {RevenexxException}
|
|
1882
|
+
* @returns {Promise<Models.Page>}
|
|
1883
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1884
|
+
*/
|
|
1885
|
+
pagesPagesGet(id: string): Promise<Models.Page>;
|
|
1886
|
+
pagesPagesGet(
|
|
1887
|
+
paramsOrFirst: { id: string } | string
|
|
1888
|
+
): Promise<Models.Page> {
|
|
1889
|
+
let params: { id: string };
|
|
1890
|
+
|
|
1891
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1892
|
+
params = (paramsOrFirst || {}) as { id: string };
|
|
1893
|
+
} else {
|
|
1894
|
+
params = {
|
|
1895
|
+
id: paramsOrFirst as string
|
|
1896
|
+
};
|
|
1897
|
+
}
|
|
1898
|
+
|
|
1899
|
+
const id = params.id;
|
|
1900
|
+
|
|
1901
|
+
if (typeof id === 'undefined') {
|
|
1902
|
+
throw new RevenexxException('Missing required parameter: "id"');
|
|
1903
|
+
}
|
|
1904
|
+
|
|
1905
|
+
const apiPath = '/v1/pages/pages/{id}'.replace('{id}', id);
|
|
1906
|
+
const apiPayload: Payload = {};
|
|
1907
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1908
|
+
|
|
1909
|
+
const apiHeaders: { [header: string]: string } = {
|
|
1910
|
+
}
|
|
1911
|
+
|
|
1912
|
+
return this.client.call(
|
|
1913
|
+
'get',
|
|
1914
|
+
uri,
|
|
1915
|
+
apiHeaders,
|
|
1916
|
+
apiPayload
|
|
1917
|
+
);
|
|
1918
|
+
}
|
|
1919
|
+
|
|
1920
|
+
/**
|
|
1921
|
+
*
|
|
1922
|
+
* @param {string} params.id -
|
|
1923
|
+
* @param {string} params.bundle -
|
|
1924
|
+
* @param {object} params.meta -
|
|
1925
|
+
* @param {string} params.slug -
|
|
1926
|
+
* @param {PageStatus} params.status -
|
|
1927
|
+
* @param {string} params.title -
|
|
1928
|
+
* @throws {RevenexxException}
|
|
1929
|
+
* @returns {Promise<Models.Page>}
|
|
1930
|
+
*/
|
|
1931
|
+
pagesPagesUpdate(params: { id: string, bundle?: string, meta?: object, slug?: string, status?: PageStatus, title?: string }): Promise<Models.Page>;
|
|
1932
|
+
/**
|
|
1933
|
+
*
|
|
1934
|
+
* @param {string} id -
|
|
1935
|
+
* @param {string} bundle -
|
|
1936
|
+
* @param {object} meta -
|
|
1937
|
+
* @param {string} slug -
|
|
1938
|
+
* @param {PageStatus} status -
|
|
1939
|
+
* @param {string} title -
|
|
1940
|
+
* @throws {RevenexxException}
|
|
1941
|
+
* @returns {Promise<Models.Page>}
|
|
1942
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1943
|
+
*/
|
|
1944
|
+
pagesPagesUpdate(id: string, bundle?: string, meta?: object, slug?: string, status?: PageStatus, title?: string): Promise<Models.Page>;
|
|
1945
|
+
pagesPagesUpdate(
|
|
1946
|
+
paramsOrFirst: { id: string, bundle?: string, meta?: object, slug?: string, status?: PageStatus, title?: string } | string,
|
|
1947
|
+
...rest: [(string)?, (object)?, (string)?, (PageStatus)?, (string)?]
|
|
1948
|
+
): Promise<Models.Page> {
|
|
1949
|
+
let params: { id: string, bundle?: string, meta?: object, slug?: string, status?: PageStatus, title?: string };
|
|
1950
|
+
|
|
1951
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1952
|
+
params = (paramsOrFirst || {}) as { id: string, bundle?: string, meta?: object, slug?: string, status?: PageStatus, title?: string };
|
|
1953
|
+
} else {
|
|
1954
|
+
params = {
|
|
1955
|
+
id: paramsOrFirst as string,
|
|
1956
|
+
bundle: rest[0] as string,
|
|
1957
|
+
meta: rest[1] as object,
|
|
1958
|
+
slug: rest[2] as string,
|
|
1959
|
+
status: rest[3] as PageStatus,
|
|
1960
|
+
title: rest[4] as string
|
|
1961
|
+
};
|
|
1962
|
+
}
|
|
1963
|
+
|
|
1964
|
+
const id = params.id;
|
|
1965
|
+
const bundle = params.bundle;
|
|
1966
|
+
const meta = params.meta;
|
|
1967
|
+
const slug = params.slug;
|
|
1968
|
+
const status = params.status;
|
|
1969
|
+
const title = params.title;
|
|
1970
|
+
|
|
1971
|
+
if (typeof id === 'undefined') {
|
|
1972
|
+
throw new RevenexxException('Missing required parameter: "id"');
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1975
|
+
const apiPath = '/v1/pages/pages/{id}'.replace('{id}', id);
|
|
1976
|
+
const apiPayload: Payload = {};
|
|
1977
|
+
if (typeof bundle !== 'undefined') {
|
|
1978
|
+
apiPayload['bundle'] = bundle;
|
|
1979
|
+
}
|
|
1980
|
+
if (typeof meta !== 'undefined') {
|
|
1981
|
+
apiPayload['meta'] = meta;
|
|
1982
|
+
}
|
|
1983
|
+
if (typeof slug !== 'undefined') {
|
|
1984
|
+
apiPayload['slug'] = slug;
|
|
1985
|
+
}
|
|
1986
|
+
if (typeof status !== 'undefined') {
|
|
1987
|
+
apiPayload['status'] = status;
|
|
1988
|
+
}
|
|
1989
|
+
if (typeof title !== 'undefined') {
|
|
1990
|
+
apiPayload['title'] = title;
|
|
1991
|
+
}
|
|
1992
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1993
|
+
|
|
1994
|
+
const apiHeaders: { [header: string]: string } = {
|
|
1995
|
+
'content-type': 'application/json',
|
|
1996
|
+
}
|
|
1997
|
+
|
|
1998
|
+
return this.client.call(
|
|
1999
|
+
'put',
|
|
2000
|
+
uri,
|
|
2001
|
+
apiHeaders,
|
|
2002
|
+
apiPayload
|
|
2003
|
+
);
|
|
2004
|
+
}
|
|
2005
|
+
|
|
2006
|
+
/**
|
|
2007
|
+
*
|
|
2008
|
+
* @param {string} params.id -
|
|
2009
|
+
* @throws {RevenexxException}
|
|
2010
|
+
* @returns {Promise<{}>}
|
|
2011
|
+
*/
|
|
2012
|
+
pagesPagesRevisions(params: { id: string }): Promise<{}>;
|
|
2013
|
+
/**
|
|
2014
|
+
*
|
|
2015
|
+
* @param {string} id -
|
|
2016
|
+
* @throws {RevenexxException}
|
|
2017
|
+
* @returns {Promise<{}>}
|
|
2018
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2019
|
+
*/
|
|
2020
|
+
pagesPagesRevisions(id: string): Promise<{}>;
|
|
2021
|
+
pagesPagesRevisions(
|
|
2022
|
+
paramsOrFirst: { id: string } | string
|
|
2023
|
+
): Promise<{}> {
|
|
2024
|
+
let params: { id: string };
|
|
2025
|
+
|
|
2026
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2027
|
+
params = (paramsOrFirst || {}) as { id: string };
|
|
2028
|
+
} else {
|
|
2029
|
+
params = {
|
|
2030
|
+
id: paramsOrFirst as string
|
|
2031
|
+
};
|
|
2032
|
+
}
|
|
2033
|
+
|
|
2034
|
+
const id = params.id;
|
|
2035
|
+
|
|
2036
|
+
if (typeof id === 'undefined') {
|
|
2037
|
+
throw new RevenexxException('Missing required parameter: "id"');
|
|
2038
|
+
}
|
|
2039
|
+
|
|
2040
|
+
const apiPath = '/v1/pages/pages/{id}/revisions'.replace('{id}', id);
|
|
2041
|
+
const apiPayload: Payload = {};
|
|
2042
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2043
|
+
|
|
2044
|
+
const apiHeaders: { [header: string]: string } = {
|
|
2045
|
+
}
|
|
2046
|
+
|
|
2047
|
+
return this.client.call(
|
|
2048
|
+
'get',
|
|
2049
|
+
uri,
|
|
2050
|
+
apiHeaders,
|
|
2051
|
+
apiPayload
|
|
2052
|
+
);
|
|
2053
|
+
}
|
|
2054
|
+
|
|
2055
|
+
/**
|
|
2056
|
+
*
|
|
2057
|
+
* @param {object[]} params.pages -
|
|
2058
|
+
* @throws {RevenexxException}
|
|
2059
|
+
* @returns {Promise<{}>}
|
|
2060
|
+
*/
|
|
2061
|
+
pagesSeed(params?: { pages?: object[] }): Promise<{}>;
|
|
2062
|
+
/**
|
|
2063
|
+
*
|
|
2064
|
+
* @param {object[]} pages -
|
|
2065
|
+
* @throws {RevenexxException}
|
|
2066
|
+
* @returns {Promise<{}>}
|
|
2067
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2068
|
+
*/
|
|
2069
|
+
pagesSeed(pages?: object[]): Promise<{}>;
|
|
2070
|
+
pagesSeed(
|
|
2071
|
+
paramsOrFirst?: { pages?: object[] } | object[]
|
|
2072
|
+
): Promise<{}> {
|
|
2073
|
+
let params: { pages?: object[] };
|
|
2074
|
+
|
|
2075
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('pages' in paramsOrFirst))) {
|
|
2076
|
+
params = (paramsOrFirst || {}) as { pages?: object[] };
|
|
2077
|
+
} else {
|
|
2078
|
+
params = {
|
|
2079
|
+
pages: paramsOrFirst as object[]
|
|
2080
|
+
};
|
|
2081
|
+
}
|
|
2082
|
+
|
|
2083
|
+
const pages = params.pages;
|
|
2084
|
+
|
|
2085
|
+
|
|
2086
|
+
const apiPath = '/v1/pages/seed';
|
|
2087
|
+
const apiPayload: Payload = {};
|
|
2088
|
+
if (typeof pages !== 'undefined') {
|
|
2089
|
+
apiPayload['pages'] = pages;
|
|
2090
|
+
}
|
|
2091
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2092
|
+
|
|
2093
|
+
const apiHeaders: { [header: string]: string } = {
|
|
2094
|
+
'content-type': 'application/json',
|
|
2095
|
+
}
|
|
2096
|
+
|
|
2097
|
+
return this.client.call(
|
|
2098
|
+
'post',
|
|
2099
|
+
uri,
|
|
2100
|
+
apiHeaders,
|
|
2101
|
+
apiPayload
|
|
2102
|
+
);
|
|
2103
|
+
}
|
|
2104
|
+
|
|
2105
|
+
/**
|
|
2106
|
+
*
|
|
2107
|
+
* @throws {RevenexxException}
|
|
2108
|
+
* @returns {Promise<{}>}
|
|
2109
|
+
*/
|
|
2110
|
+
pagesTemplatesList(): Promise<{}> {
|
|
2111
|
+
|
|
2112
|
+
const apiPath = '/v1/pages/templates';
|
|
2113
|
+
const apiPayload: Payload = {};
|
|
2114
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2115
|
+
|
|
2116
|
+
const apiHeaders: { [header: string]: string } = {
|
|
2117
|
+
}
|
|
2118
|
+
|
|
2119
|
+
return this.client.call(
|
|
2120
|
+
'get',
|
|
2121
|
+
uri,
|
|
2122
|
+
apiHeaders,
|
|
2123
|
+
apiPayload
|
|
2124
|
+
);
|
|
2125
|
+
}
|
|
2126
|
+
|
|
2127
|
+
/**
|
|
2128
|
+
*
|
|
2129
|
+
* @param {string} params.id -
|
|
2130
|
+
* @throws {RevenexxException}
|
|
2131
|
+
* @returns {Promise<{}>}
|
|
2132
|
+
*/
|
|
2133
|
+
pagesTemplatesDelete(params: { id: string }): Promise<{}>;
|
|
2134
|
+
/**
|
|
2135
|
+
*
|
|
2136
|
+
* @param {string} id -
|
|
2137
|
+
* @throws {RevenexxException}
|
|
2138
|
+
* @returns {Promise<{}>}
|
|
2139
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2140
|
+
*/
|
|
2141
|
+
pagesTemplatesDelete(id: string): Promise<{}>;
|
|
2142
|
+
pagesTemplatesDelete(
|
|
2143
|
+
paramsOrFirst: { id: string } | string
|
|
2144
|
+
): Promise<{}> {
|
|
2145
|
+
let params: { id: string };
|
|
2146
|
+
|
|
2147
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2148
|
+
params = (paramsOrFirst || {}) as { id: string };
|
|
2149
|
+
} else {
|
|
2150
|
+
params = {
|
|
2151
|
+
id: paramsOrFirst as string
|
|
2152
|
+
};
|
|
2153
|
+
}
|
|
2154
|
+
|
|
2155
|
+
const id = params.id;
|
|
2156
|
+
|
|
2157
|
+
if (typeof id === 'undefined') {
|
|
2158
|
+
throw new RevenexxException('Missing required parameter: "id"');
|
|
2159
|
+
}
|
|
2160
|
+
|
|
2161
|
+
const apiPath = '/v1/pages/templates/{id}'.replace('{id}', id);
|
|
2162
|
+
const apiPayload: Payload = {};
|
|
2163
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2164
|
+
|
|
2165
|
+
const apiHeaders: { [header: string]: string } = {
|
|
2166
|
+
}
|
|
2167
|
+
|
|
2168
|
+
return this.client.call(
|
|
2169
|
+
'delete',
|
|
2170
|
+
uri,
|
|
2171
|
+
apiHeaders,
|
|
2172
|
+
apiPayload
|
|
2173
|
+
);
|
|
2174
|
+
}
|
|
2175
|
+
|
|
2176
|
+
/**
|
|
2177
|
+
*
|
|
2178
|
+
* @param {string} params.id -
|
|
2179
|
+
* @throws {RevenexxException}
|
|
2180
|
+
* @returns {Promise<Models.Template>}
|
|
2181
|
+
*/
|
|
2182
|
+
pagesTemplatesGet(params: { id: string }): Promise<Models.Template>;
|
|
2183
|
+
/**
|
|
2184
|
+
*
|
|
2185
|
+
* @param {string} id -
|
|
2186
|
+
* @throws {RevenexxException}
|
|
2187
|
+
* @returns {Promise<Models.Template>}
|
|
2188
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2189
|
+
*/
|
|
2190
|
+
pagesTemplatesGet(id: string): Promise<Models.Template>;
|
|
2191
|
+
pagesTemplatesGet(
|
|
2192
|
+
paramsOrFirst: { id: string } | string
|
|
2193
|
+
): Promise<Models.Template> {
|
|
2194
|
+
let params: { id: string };
|
|
2195
|
+
|
|
2196
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2197
|
+
params = (paramsOrFirst || {}) as { id: string };
|
|
2198
|
+
} else {
|
|
2199
|
+
params = {
|
|
2200
|
+
id: paramsOrFirst as string
|
|
2201
|
+
};
|
|
2202
|
+
}
|
|
2203
|
+
|
|
2204
|
+
const id = params.id;
|
|
2205
|
+
|
|
2206
|
+
if (typeof id === 'undefined') {
|
|
2207
|
+
throw new RevenexxException('Missing required parameter: "id"');
|
|
2208
|
+
}
|
|
2209
|
+
|
|
2210
|
+
const apiPath = '/v1/pages/templates/{id}'.replace('{id}', id);
|
|
2211
|
+
const apiPayload: Payload = {};
|
|
2212
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2213
|
+
|
|
2214
|
+
const apiHeaders: { [header: string]: string } = {
|
|
2215
|
+
}
|
|
2216
|
+
|
|
2217
|
+
return this.client.call(
|
|
2218
|
+
'get',
|
|
2219
|
+
uri,
|
|
2220
|
+
apiHeaders,
|
|
2221
|
+
apiPayload
|
|
2222
|
+
);
|
|
2223
|
+
}
|
|
2224
|
+
|
|
2225
|
+
/**
|
|
2226
|
+
*
|
|
2227
|
+
* @param {string} params.id -
|
|
2228
|
+
* @param {string} params.description -
|
|
2229
|
+
* @param {string} params.fieldName -
|
|
2230
|
+
* @param {boolean} params.isDefault -
|
|
2231
|
+
* @param {string} params.label -
|
|
2232
|
+
* @param {string} params.pageBundle -
|
|
2233
|
+
* @param {object[]} params.tree - Serialized block trees ({ bundle, props, props_i18n, options, children }).
|
|
2234
|
+
* @throws {RevenexxException}
|
|
2235
|
+
* @returns {Promise<Models.Template>}
|
|
2236
|
+
*/
|
|
2237
|
+
pagesTemplatesUpdate(params: { id: string, description?: string, fieldName?: string, isDefault?: boolean, label?: string, pageBundle?: string, tree?: object[] }): Promise<Models.Template>;
|
|
2238
|
+
/**
|
|
2239
|
+
*
|
|
2240
|
+
* @param {string} id -
|
|
2241
|
+
* @param {string} description -
|
|
2242
|
+
* @param {string} fieldName -
|
|
2243
|
+
* @param {boolean} isDefault -
|
|
2244
|
+
* @param {string} label -
|
|
2245
|
+
* @param {string} pageBundle -
|
|
2246
|
+
* @param {object[]} tree - Serialized block trees ({ bundle, props, props_i18n, options, children }).
|
|
2247
|
+
* @throws {RevenexxException}
|
|
2248
|
+
* @returns {Promise<Models.Template>}
|
|
2249
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2250
|
+
*/
|
|
2251
|
+
pagesTemplatesUpdate(id: string, description?: string, fieldName?: string, isDefault?: boolean, label?: string, pageBundle?: string, tree?: object[]): Promise<Models.Template>;
|
|
2252
|
+
pagesTemplatesUpdate(
|
|
2253
|
+
paramsOrFirst: { id: string, description?: string, fieldName?: string, isDefault?: boolean, label?: string, pageBundle?: string, tree?: object[] } | string,
|
|
2254
|
+
...rest: [(string)?, (string)?, (boolean)?, (string)?, (string)?, (object[])?]
|
|
2255
|
+
): Promise<Models.Template> {
|
|
2256
|
+
let params: { id: string, description?: string, fieldName?: string, isDefault?: boolean, label?: string, pageBundle?: string, tree?: object[] };
|
|
2257
|
+
|
|
2258
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2259
|
+
params = (paramsOrFirst || {}) as { id: string, description?: string, fieldName?: string, isDefault?: boolean, label?: string, pageBundle?: string, tree?: object[] };
|
|
2260
|
+
} else {
|
|
2261
|
+
params = {
|
|
2262
|
+
id: paramsOrFirst as string,
|
|
2263
|
+
description: rest[0] as string,
|
|
2264
|
+
fieldName: rest[1] as string,
|
|
2265
|
+
isDefault: rest[2] as boolean,
|
|
2266
|
+
label: rest[3] as string,
|
|
2267
|
+
pageBundle: rest[4] as string,
|
|
2268
|
+
tree: rest[5] as object[]
|
|
2269
|
+
};
|
|
2270
|
+
}
|
|
2271
|
+
|
|
2272
|
+
const id = params.id;
|
|
2273
|
+
const description = params.description;
|
|
2274
|
+
const fieldName = params.fieldName;
|
|
2275
|
+
const isDefault = params.isDefault;
|
|
2276
|
+
const label = params.label;
|
|
2277
|
+
const pageBundle = params.pageBundle;
|
|
2278
|
+
const tree = params.tree;
|
|
2279
|
+
|
|
2280
|
+
if (typeof id === 'undefined') {
|
|
2281
|
+
throw new RevenexxException('Missing required parameter: "id"');
|
|
2282
|
+
}
|
|
2283
|
+
|
|
2284
|
+
const apiPath = '/v1/pages/templates/{id}'.replace('{id}', id);
|
|
2285
|
+
const apiPayload: Payload = {};
|
|
2286
|
+
if (typeof description !== 'undefined') {
|
|
2287
|
+
apiPayload['description'] = description;
|
|
2288
|
+
}
|
|
2289
|
+
if (typeof fieldName !== 'undefined') {
|
|
2290
|
+
apiPayload['field_name'] = fieldName;
|
|
2291
|
+
}
|
|
2292
|
+
if (typeof isDefault !== 'undefined') {
|
|
2293
|
+
apiPayload['is_default'] = isDefault;
|
|
2294
|
+
}
|
|
2295
|
+
if (typeof label !== 'undefined') {
|
|
2296
|
+
apiPayload['label'] = label;
|
|
2297
|
+
}
|
|
2298
|
+
if (typeof pageBundle !== 'undefined') {
|
|
2299
|
+
apiPayload['page_bundle'] = pageBundle;
|
|
2300
|
+
}
|
|
2301
|
+
if (typeof tree !== 'undefined') {
|
|
2302
|
+
apiPayload['tree'] = tree;
|
|
2303
|
+
}
|
|
2304
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2305
|
+
|
|
2306
|
+
const apiHeaders: { [header: string]: string } = {
|
|
2307
|
+
'content-type': 'application/json',
|
|
2308
|
+
}
|
|
2309
|
+
|
|
2310
|
+
return this.client.call(
|
|
2311
|
+
'put',
|
|
2312
|
+
uri,
|
|
2313
|
+
apiHeaders,
|
|
2314
|
+
apiPayload
|
|
2315
|
+
);
|
|
2316
|
+
}
|
|
2317
|
+
}
|