@revenexx/sdk 0.0.2 → 0.0.4

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