@revenexx/sdk 0.0.4 → 0.0.6

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.
Files changed (99) hide show
  1. package/dist/cjs/sdk.js +13491 -6163
  2. package/dist/cjs/sdk.js.map +1 -1
  3. package/dist/esm/sdk.js +13464 -6162
  4. package/dist/esm/sdk.js.map +1 -1
  5. package/dist/iife/sdk.js +13491 -6163
  6. package/package.json +1 -1
  7. package/src/client.ts +1 -1
  8. package/src/enums/address-type.ts +4 -0
  9. package/src/enums/cart-export-format.ts +4 -0
  10. package/src/enums/cart-io-apply-mode.ts +5 -0
  11. package/src/enums/cart-io-direction.ts +4 -0
  12. package/src/enums/cart-io-entity.ts +4 -0
  13. package/src/enums/cart-io-format.ts +4 -0
  14. package/src/enums/cart-item-type.ts +5 -0
  15. package/src/enums/channel-status.ts +4 -0
  16. package/src/enums/channel-type.ts +7 -0
  17. package/src/enums/contact-role.ts +6 -0
  18. package/src/enums/contact-status.ts +5 -0
  19. package/src/enums/location-type.ts +6 -0
  20. package/src/enums/market-status.ts +4 -0
  21. package/src/enums/order-comment-visibility.ts +4 -0
  22. package/src/enums/order-item-type.ts +5 -0
  23. package/src/enums/order-list-kind.ts +4 -0
  24. package/src/enums/order-payment-status.ts +9 -0
  25. package/src/enums/organization-status.ts +4 -0
  26. package/src/enums/page-status.ts +5 -0
  27. package/src/enums/payment-fee-type.ts +5 -0
  28. package/src/enums/payment-method-kind.ts +4 -0
  29. package/src/enums/price-entry-type.ts +4 -0
  30. package/src/enums/price-list-status.ts +4 -0
  31. package/src/enums/shipping-method-matrix-basis.ts +6 -0
  32. package/src/enums/shipping-method-pricing-type.ts +5 -0
  33. package/src/enums/store-asset-request-visibility.ts +4 -0
  34. package/src/enums/visibility.ts +4 -0
  35. package/src/index.ts +28 -2
  36. package/src/models.ts +5309 -1009
  37. package/src/services/apps.ts +154 -154
  38. package/src/services/avatars.ts +57 -57
  39. package/src/services/carts.ts +739 -104
  40. package/src/services/channels.ts +147 -19
  41. package/src/services/customers.ts +809 -69
  42. package/src/services/greetings.ts +18 -18
  43. package/src/services/inventories.ts +620 -65
  44. package/src/services/locale.ts +16 -16
  45. package/src/services/markets.ts +690 -75
  46. package/src/services/messaging.ts +273 -273
  47. package/src/services/orderlists.ts +889 -0
  48. package/src/services/orders.ts +692 -137
  49. package/src/services/pages.ts +661 -155
  50. package/src/services/payments.ts +591 -64
  51. package/src/services/prices.ts +585 -59
  52. package/src/services/products.ts +1908 -272
  53. package/src/services/search.ts +24 -24
  54. package/src/services/shipping.ts +451 -59
  55. package/src/services/sites.ts +116 -116
  56. package/src/services/storage.ts +933 -599
  57. package/src/services/tokens.ts +14 -14
  58. package/types/enums/address-type.d.ts +4 -0
  59. package/types/enums/cart-export-format.d.ts +4 -0
  60. package/types/enums/cart-io-apply-mode.d.ts +5 -0
  61. package/types/enums/cart-io-direction.d.ts +4 -0
  62. package/types/enums/cart-io-entity.d.ts +4 -0
  63. package/types/enums/cart-io-format.d.ts +4 -0
  64. package/types/enums/cart-item-type.d.ts +5 -0
  65. package/types/enums/channel-status.d.ts +4 -0
  66. package/types/enums/channel-type.d.ts +7 -0
  67. package/types/enums/contact-role.d.ts +6 -0
  68. package/types/enums/contact-status.d.ts +5 -0
  69. package/types/enums/location-type.d.ts +6 -0
  70. package/types/enums/market-status.d.ts +4 -0
  71. package/types/enums/order-comment-visibility.d.ts +4 -0
  72. package/types/enums/order-item-type.d.ts +5 -0
  73. package/types/enums/order-list-kind.d.ts +4 -0
  74. package/types/enums/order-payment-status.d.ts +9 -0
  75. package/types/enums/organization-status.d.ts +4 -0
  76. package/types/enums/page-status.d.ts +5 -0
  77. package/types/enums/payment-fee-type.d.ts +5 -0
  78. package/types/enums/payment-method-kind.d.ts +4 -0
  79. package/types/enums/price-entry-type.d.ts +4 -0
  80. package/types/enums/price-list-status.d.ts +4 -0
  81. package/types/enums/shipping-method-matrix-basis.d.ts +6 -0
  82. package/types/enums/shipping-method-pricing-type.d.ts +5 -0
  83. package/types/enums/store-asset-request-visibility.d.ts +4 -0
  84. package/types/enums/visibility.d.ts +4 -0
  85. package/types/index.d.ts +28 -2
  86. package/types/models.d.ts +5170 -1010
  87. package/types/services/carts.d.ts +271 -12
  88. package/types/services/channels.d.ts +54 -2
  89. package/types/services/customers.d.ts +298 -12
  90. package/types/services/inventories.d.ts +225 -11
  91. package/types/services/markets.d.ts +235 -6
  92. package/types/services/orderlists.d.ts +324 -0
  93. package/types/services/orders.d.ts +238 -16
  94. package/types/services/pages.d.ts +190 -6
  95. package/types/services/payments.d.ts +221 -7
  96. package/types/services/prices.d.ts +218 -6
  97. package/types/services/products.d.ts +672 -32
  98. package/types/services/shipping.d.ts +168 -6
  99. package/types/services/storage.d.ts +353 -285
@@ -2,6 +2,7 @@ import { Service } from '../service';
2
2
  import { RevenexxException, Client, type Payload, UploadProgress } from '../client';
3
3
  import type { Models } from '../models';
4
4
 
5
+ import { PageStatus } from '../enums/page-status';
5
6
 
6
7
  export class Pages {
7
8
  client: Client;
@@ -10,6 +11,28 @@ export class Pages {
10
11
  this.client = client;
11
12
  }
12
13
 
14
+ /**
15
+ *
16
+ * @throws {RevenexxException}
17
+ * @returns {Promise<{}>}
18
+ */
19
+ pagesDeliveryMenus(): Promise<{}> {
20
+
21
+ const apiPath = '/v1/pages/delivery/menus';
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
+
13
36
  /**
14
37
  *
15
38
  * @throws {RevenexxException}
@@ -18,7 +41,7 @@ export class Pages {
18
41
  pagesDeliveryPage(): Promise<Models.DeliveryPage> {
19
42
 
20
43
  const apiPath = '/v1/pages/delivery/page';
21
- const payload: Payload = {};
44
+ const apiPayload: Payload = {};
22
45
  const uri = new URL(this.client.config.endpoint + apiPath);
23
46
 
24
47
  const apiHeaders: { [header: string]: string } = {
@@ -28,7 +51,7 @@ export class Pages {
28
51
  'get',
29
52
  uri,
30
53
  apiHeaders,
31
- payload
54
+ apiPayload
32
55
  );
33
56
  }
34
57
 
@@ -40,7 +63,7 @@ export class Pages {
40
63
  pagesDeliveryPages(): Promise<{}> {
41
64
 
42
65
  const apiPath = '/v1/pages/delivery/pages';
43
- const payload: Payload = {};
66
+ const apiPayload: Payload = {};
44
67
  const uri = new URL(this.client.config.endpoint + apiPath);
45
68
 
46
69
  const apiHeaders: { [header: string]: string } = {
@@ -50,7 +73,7 @@ export class Pages {
50
73
  'get',
51
74
  uri,
52
75
  apiHeaders,
53
- payload
76
+ apiPayload
54
77
  );
55
78
  }
56
79
 
@@ -89,7 +112,7 @@ export class Pages {
89
112
  }
90
113
 
91
114
  const apiPath = '/v1/pages/delivery/preview/{token}'.replace('{token}', token);
92
- const payload: Payload = {};
115
+ const apiPayload: Payload = {};
93
116
  const uri = new URL(this.client.config.endpoint + apiPath);
94
117
 
95
118
  const apiHeaders: { [header: string]: string } = {
@@ -99,7 +122,7 @@ export class Pages {
99
122
  'get',
100
123
  uri,
101
124
  apiHeaders,
102
- payload
125
+ apiPayload
103
126
  );
104
127
  }
105
128
 
@@ -111,7 +134,7 @@ export class Pages {
111
134
  pagesEditorEditStates(): Promise<{}> {
112
135
 
113
136
  const apiPath = '/v1/pages/editor/edit-states';
114
- const payload: Payload = {};
137
+ const apiPayload: Payload = {};
115
138
  const uri = new URL(this.client.config.endpoint + apiPath);
116
139
 
117
140
  const apiHeaders: { [header: string]: string } = {
@@ -121,7 +144,7 @@ export class Pages {
121
144
  'get',
122
145
  uri,
123
146
  apiHeaders,
124
- payload
147
+ apiPayload
125
148
  );
126
149
  }
127
150
 
@@ -133,7 +156,7 @@ export class Pages {
133
156
  pagesEditorNotificationsList(): Promise<{}> {
134
157
 
135
158
  const apiPath = '/v1/pages/editor/notifications';
136
- const payload: Payload = {};
159
+ const apiPayload: Payload = {};
137
160
  const uri = new URL(this.client.config.endpoint + apiPath);
138
161
 
139
162
  const apiHeaders: { [header: string]: string } = {
@@ -143,7 +166,7 @@ export class Pages {
143
166
  'get',
144
167
  uri,
145
168
  apiHeaders,
146
- payload
169
+ apiPayload
147
170
  );
148
171
  }
149
172
 
@@ -155,7 +178,7 @@ export class Pages {
155
178
  pagesEditorNotificationsMarkAllRead(): Promise<{}> {
156
179
 
157
180
  const apiPath = '/v1/pages/editor/notifications/mark-all-read';
158
- const payload: Payload = {};
181
+ const apiPayload: Payload = {};
159
182
  const uri = new URL(this.client.config.endpoint + apiPath);
160
183
 
161
184
  const apiHeaders: { [header: string]: string } = {
@@ -165,7 +188,7 @@ export class Pages {
165
188
  'post',
166
189
  uri,
167
190
  apiHeaders,
168
- payload
191
+ apiPayload
169
192
  );
170
193
  }
171
194
 
@@ -177,7 +200,7 @@ export class Pages {
177
200
  pagesEditorNotificationsUnreadCount(): Promise<{}> {
178
201
 
179
202
  const apiPath = '/v1/pages/editor/notifications/unread-count';
180
- const payload: Payload = {};
203
+ const apiPayload: Payload = {};
181
204
  const uri = new URL(this.client.config.endpoint + apiPath);
182
205
 
183
206
  const apiHeaders: { [header: string]: string } = {
@@ -187,7 +210,7 @@ export class Pages {
187
210
  'get',
188
211
  uri,
189
212
  apiHeaders,
190
- payload
213
+ apiPayload
191
214
  );
192
215
  }
193
216
 
@@ -223,9 +246,9 @@ export class Pages {
223
246
 
224
247
 
225
248
  const apiPath = '/v1/pages/editor/translate';
226
- const payload: Payload = {};
249
+ const apiPayload: Payload = {};
227
250
  if (typeof items !== 'undefined') {
228
- payload['items'] = items;
251
+ apiPayload['items'] = items;
229
252
  }
230
253
  const uri = new URL(this.client.config.endpoint + apiPath);
231
254
 
@@ -237,7 +260,7 @@ export class Pages {
237
260
  'post',
238
261
  uri,
239
262
  apiHeaders,
240
- payload
263
+ apiPayload
241
264
  );
242
265
  }
243
266
 
@@ -249,7 +272,7 @@ export class Pages {
249
272
  pagesEditorUserSettingsGet(): Promise<{}> {
250
273
 
251
274
  const apiPath = '/v1/pages/editor/user-settings';
252
- const payload: Payload = {};
275
+ const apiPayload: Payload = {};
253
276
  const uri = new URL(this.client.config.endpoint + apiPath);
254
277
 
255
278
  const apiHeaders: { [header: string]: string } = {
@@ -259,7 +282,7 @@ export class Pages {
259
282
  'get',
260
283
  uri,
261
284
  apiHeaders,
262
- payload
285
+ apiPayload
263
286
  );
264
287
  }
265
288
 
@@ -295,9 +318,9 @@ export class Pages {
295
318
 
296
319
 
297
320
  const apiPath = '/v1/pages/editor/user-settings';
298
- const payload: Payload = {};
321
+ const apiPayload: Payload = {};
299
322
  if (typeof settings !== 'undefined') {
300
- payload['settings'] = settings;
323
+ apiPayload['settings'] = settings;
301
324
  }
302
325
  const uri = new URL(this.client.config.endpoint + apiPath);
303
326
 
@@ -309,7 +332,7 @@ export class Pages {
309
332
  'put',
310
333
  uri,
311
334
  apiHeaders,
312
- payload
335
+ apiPayload
313
336
  );
314
337
  }
315
338
 
@@ -321,7 +344,7 @@ export class Pages {
321
344
  pagesEditorUsers(): Promise<{}> {
322
345
 
323
346
  const apiPath = '/v1/pages/editor/users';
324
- const payload: Payload = {};
347
+ const apiPayload: Payload = {};
325
348
  const uri = new URL(this.client.config.endpoint + apiPath);
326
349
 
327
350
  const apiHeaders: { [header: string]: string } = {
@@ -331,7 +354,7 @@ export class Pages {
331
354
  'get',
332
355
  uri,
333
356
  apiHeaders,
334
- payload
357
+ apiPayload
335
358
  );
336
359
  }
337
360
 
@@ -369,8 +392,8 @@ export class Pages {
369
392
  throw new RevenexxException('Missing required parameter: "pageId"');
370
393
  }
371
394
 
372
- const apiPath = '/v1/pages/editor/{page_id}/comments'.replace('{pageId}', pageId);
373
- const payload: Payload = {};
395
+ const apiPath = '/v1/pages/editor/{page_id}/comments'.replace('{page_id}', pageId);
396
+ const apiPayload: Payload = {};
374
397
  const uri = new URL(this.client.config.endpoint + apiPath);
375
398
 
376
399
  const apiHeaders: { [header: string]: string } = {
@@ -380,7 +403,7 @@ export class Pages {
380
403
  'get',
381
404
  uri,
382
405
  apiHeaders,
383
- payload
406
+ apiPayload
384
407
  );
385
408
  }
386
409
 
@@ -434,16 +457,16 @@ export class Pages {
434
457
  throw new RevenexxException('Missing required parameter: "body"');
435
458
  }
436
459
 
437
- const apiPath = '/v1/pages/editor/{page_id}/comments'.replace('{pageId}', pageId);
438
- const payload: Payload = {};
460
+ const apiPath = '/v1/pages/editor/{page_id}/comments'.replace('{page_id}', pageId);
461
+ const apiPayload: Payload = {};
439
462
  if (typeof blockUuids !== 'undefined') {
440
- payload['blockUuids'] = blockUuids;
463
+ apiPayload['blockUuids'] = blockUuids;
441
464
  }
442
465
  if (typeof body !== 'undefined') {
443
- payload['body'] = body;
466
+ apiPayload['body'] = body;
444
467
  }
445
468
  if (typeof parentUuid !== 'undefined') {
446
- payload['parentUuid'] = parentUuid;
469
+ apiPayload['parentUuid'] = parentUuid;
447
470
  }
448
471
  const uri = new URL(this.client.config.endpoint + apiPath);
449
472
 
@@ -455,7 +478,7 @@ export class Pages {
455
478
  'post',
456
479
  uri,
457
480
  apiHeaders,
458
- payload
481
+ apiPayload
459
482
  );
460
483
  }
461
484
 
@@ -501,8 +524,8 @@ export class Pages {
501
524
  throw new RevenexxException('Missing required parameter: "uuid"');
502
525
  }
503
526
 
504
- const apiPath = '/v1/pages/editor/{page_id}/comments/{uuid}'.replace('{pageId}', pageId).replace('{uuid}', uuid);
505
- const payload: Payload = {};
527
+ const apiPath = '/v1/pages/editor/{page_id}/comments/{uuid}'.replace('{page_id}', pageId).replace('{uuid}', uuid);
528
+ const apiPayload: Payload = {};
506
529
  const uri = new URL(this.client.config.endpoint + apiPath);
507
530
 
508
531
  const apiHeaders: { [header: string]: string } = {
@@ -512,7 +535,7 @@ export class Pages {
512
535
  'delete',
513
536
  uri,
514
537
  apiHeaders,
515
- payload
538
+ apiPayload
516
539
  );
517
540
  }
518
541
 
@@ -565,10 +588,10 @@ export class Pages {
565
588
  throw new RevenexxException('Missing required parameter: "body"');
566
589
  }
567
590
 
568
- const apiPath = '/v1/pages/editor/{page_id}/comments/{uuid}'.replace('{pageId}', pageId).replace('{uuid}', uuid);
569
- const payload: Payload = {};
591
+ const apiPath = '/v1/pages/editor/{page_id}/comments/{uuid}'.replace('{page_id}', pageId).replace('{uuid}', uuid);
592
+ const apiPayload: Payload = {};
570
593
  if (typeof body !== 'undefined') {
571
- payload['body'] = body;
594
+ apiPayload['body'] = body;
572
595
  }
573
596
  const uri = new URL(this.client.config.endpoint + apiPath);
574
597
 
@@ -580,7 +603,7 @@ export class Pages {
580
603
  'put',
581
604
  uri,
582
605
  apiHeaders,
583
- payload
606
+ apiPayload
584
607
  );
585
608
  }
586
609
 
@@ -626,8 +649,8 @@ export class Pages {
626
649
  throw new RevenexxException('Missing required parameter: "uuid"');
627
650
  }
628
651
 
629
- const apiPath = '/v1/pages/editor/{page_id}/comments/{uuid}/resolve'.replace('{pageId}', pageId).replace('{uuid}', uuid);
630
- const payload: Payload = {};
652
+ const apiPath = '/v1/pages/editor/{page_id}/comments/{uuid}/resolve'.replace('{page_id}', pageId).replace('{uuid}', uuid);
653
+ const apiPayload: Payload = {};
631
654
  const uri = new URL(this.client.config.endpoint + apiPath);
632
655
 
633
656
  const apiHeaders: { [header: string]: string } = {
@@ -637,7 +660,7 @@ export class Pages {
637
660
  'post',
638
661
  uri,
639
662
  apiHeaders,
640
- payload
663
+ apiPayload
641
664
  );
642
665
  }
643
666
 
@@ -690,10 +713,10 @@ export class Pages {
690
713
  throw new RevenexxException('Missing required parameter: "taskIndex"');
691
714
  }
692
715
 
693
- const apiPath = '/v1/pages/editor/{page_id}/comments/{uuid}/toggle-task'.replace('{pageId}', pageId).replace('{uuid}', uuid);
694
- const payload: Payload = {};
716
+ const apiPath = '/v1/pages/editor/{page_id}/comments/{uuid}/toggle-task'.replace('{page_id}', pageId).replace('{uuid}', uuid);
717
+ const apiPayload: Payload = {};
695
718
  if (typeof taskIndex !== 'undefined') {
696
- payload['taskIndex'] = taskIndex;
719
+ apiPayload['taskIndex'] = taskIndex;
697
720
  }
698
721
  const uri = new URL(this.client.config.endpoint + apiPath);
699
722
 
@@ -705,7 +728,7 @@ export class Pages {
705
728
  'post',
706
729
  uri,
707
730
  apiHeaders,
708
- payload
731
+ apiPayload
709
732
  );
710
733
  }
711
734
 
@@ -751,8 +774,8 @@ export class Pages {
751
774
  throw new RevenexxException('Missing required parameter: "uuid"');
752
775
  }
753
776
 
754
- const apiPath = '/v1/pages/editor/{page_id}/comments/{uuid}/unresolve'.replace('{pageId}', pageId).replace('{uuid}', uuid);
755
- const payload: Payload = {};
777
+ const apiPath = '/v1/pages/editor/{page_id}/comments/{uuid}/unresolve'.replace('{page_id}', pageId).replace('{uuid}', uuid);
778
+ const apiPayload: Payload = {};
756
779
  const uri = new URL(this.client.config.endpoint + apiPath);
757
780
 
758
781
  const apiHeaders: { [header: string]: string } = {
@@ -762,7 +785,7 @@ export class Pages {
762
785
  'post',
763
786
  uri,
764
787
  apiHeaders,
765
- payload
788
+ apiPayload
766
789
  );
767
790
  }
768
791
 
@@ -812,13 +835,13 @@ export class Pages {
812
835
  throw new RevenexxException('Missing required parameter: "index"');
813
836
  }
814
837
 
815
- const apiPath = '/v1/pages/editor/{page_id}/history'.replace('{pageId}', pageId);
816
- const payload: Payload = {};
838
+ const apiPath = '/v1/pages/editor/{page_id}/history'.replace('{page_id}', pageId);
839
+ const apiPayload: Payload = {};
817
840
  if (typeof index !== 'undefined') {
818
- payload['index'] = index;
841
+ apiPayload['index'] = index;
819
842
  }
820
843
  if (typeof langcode !== 'undefined') {
821
- payload['langcode'] = langcode;
844
+ apiPayload['langcode'] = langcode;
822
845
  }
823
846
  const uri = new URL(this.client.config.endpoint + apiPath);
824
847
 
@@ -830,7 +853,7 @@ export class Pages {
830
853
  'post',
831
854
  uri,
832
855
  apiHeaders,
833
- payload
856
+ apiPayload
834
857
  );
835
858
  }
836
859
 
@@ -868,8 +891,8 @@ export class Pages {
868
891
  throw new RevenexxException('Missing required parameter: "pageId"');
869
892
  }
870
893
 
871
- const apiPath = '/v1/pages/editor/{page_id}/last-changed'.replace('{pageId}', pageId);
872
- const payload: Payload = {};
894
+ const apiPath = '/v1/pages/editor/{page_id}/last-changed'.replace('{page_id}', pageId);
895
+ const apiPayload: Payload = {};
873
896
  const uri = new URL(this.client.config.endpoint + apiPath);
874
897
 
875
898
  const apiHeaders: { [header: string]: string } = {
@@ -879,7 +902,7 @@ export class Pages {
879
902
  'get',
880
903
  uri,
881
904
  apiHeaders,
882
- payload
905
+ apiPayload
883
906
  );
884
907
  }
885
908
 
@@ -936,16 +959,16 @@ export class Pages {
936
959
  throw new RevenexxException('Missing required parameter: "index"');
937
960
  }
938
961
 
939
- const apiPath = '/v1/pages/editor/{page_id}/mutation-status'.replace('{pageId}', pageId);
940
- const payload: Payload = {};
962
+ const apiPath = '/v1/pages/editor/{page_id}/mutation-status'.replace('{page_id}', pageId);
963
+ const apiPayload: Payload = {};
941
964
  if (typeof enabled !== 'undefined') {
942
- payload['enabled'] = enabled;
965
+ apiPayload['enabled'] = enabled;
943
966
  }
944
967
  if (typeof index !== 'undefined') {
945
- payload['index'] = index;
968
+ apiPayload['index'] = index;
946
969
  }
947
970
  if (typeof langcode !== 'undefined') {
948
- payload['langcode'] = langcode;
971
+ apiPayload['langcode'] = langcode;
949
972
  }
950
973
  const uri = new URL(this.client.config.endpoint + apiPath);
951
974
 
@@ -957,46 +980,71 @@ export class Pages {
957
980
  'post',
958
981
  uri,
959
982
  apiHeaders,
960
- payload
983
+ apiPayload
961
984
  );
962
985
  }
963
986
 
964
987
  /**
965
988
  *
966
989
  * @param {string} params.pageId -
990
+ * @param {string} params.plugin - Mutation plugin id (add, move, delete, duplicate, update_field_value, ...).
991
+ * @param {string} params.langcode -
992
+ * @param {object} params.payload -
967
993
  * @throws {RevenexxException}
968
994
  * @returns {Promise<Models.MutationResponse>}
969
995
  */
970
- pagesEditorMutate(params: { pageId: string }): Promise<Models.MutationResponse>;
996
+ pagesEditorMutate(params: { pageId: string, plugin: string, langcode?: string, payload?: object }): Promise<Models.MutationResponse>;
971
997
  /**
972
998
  *
973
999
  * @param {string} pageId -
1000
+ * @param {string} plugin - Mutation plugin id (add, move, delete, duplicate, update_field_value, ...).
1001
+ * @param {string} langcode -
1002
+ * @param {object} payload -
974
1003
  * @throws {RevenexxException}
975
1004
  * @returns {Promise<Models.MutationResponse>}
976
1005
  * @deprecated Use the object parameter style method for a better developer experience.
977
1006
  */
978
- pagesEditorMutate(pageId: string): Promise<Models.MutationResponse>;
1007
+ pagesEditorMutate(pageId: string, plugin: string, langcode?: string, payload?: object): Promise<Models.MutationResponse>;
979
1008
  pagesEditorMutate(
980
- paramsOrFirst: { pageId: string } | string
1009
+ paramsOrFirst: { pageId: string, plugin: string, langcode?: string, payload?: object } | string,
1010
+ ...rest: [(string)?, (string)?, (object)?]
981
1011
  ): Promise<Models.MutationResponse> {
982
- let params: { pageId: string };
1012
+ let params: { pageId: string, plugin: string, langcode?: string, payload?: object };
983
1013
 
984
1014
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
985
- params = (paramsOrFirst || {}) as { pageId: string };
1015
+ params = (paramsOrFirst || {}) as { pageId: string, plugin: string, langcode?: string, payload?: object };
986
1016
  } else {
987
1017
  params = {
988
- pageId: paramsOrFirst as string
1018
+ pageId: paramsOrFirst as string,
1019
+ plugin: rest[0] as string,
1020
+ langcode: rest[1] as string,
1021
+ payload: rest[2] as object
989
1022
  };
990
1023
  }
991
1024
 
992
1025
  const pageId = params.pageId;
1026
+ const plugin = params.plugin;
1027
+ const langcode = params.langcode;
1028
+ const payload = params.payload;
993
1029
 
994
1030
  if (typeof pageId === 'undefined') {
995
1031
  throw new RevenexxException('Missing required parameter: "pageId"');
996
1032
  }
1033
+ if (typeof plugin === 'undefined') {
1034
+ throw new RevenexxException('Missing required parameter: "plugin"');
1035
+ }
997
1036
 
998
- const apiPath = '/v1/pages/editor/{page_id}/mutations'.replace('{pageId}', pageId);
999
- const payload: Payload = {};
1037
+ const apiPath = '/v1/pages/editor/{page_id}/mutations'.replace('{page_id}', pageId);
1038
+ const apiPayload: Payload = {};
1039
+ if (typeof langcode !== 'undefined') {
1040
+ apiPayload['langcode'] = langcode;
1041
+ }
1042
+ if (typeof payload !== 'undefined') {
1043
+ apiPayload['payload'] = payload;
1044
+ }
1045
+ if (typeof plugin !== 'undefined') {
1046
+ apiPayload['plugin'] = plugin;
1047
+ }
1000
1048
  const uri = new URL(this.client.config.endpoint + apiPath);
1001
1049
 
1002
1050
  const apiHeaders: { [header: string]: string } = {
@@ -1007,7 +1055,7 @@ export class Pages {
1007
1055
  'post',
1008
1056
  uri,
1009
1057
  apiHeaders,
1010
- payload
1058
+ apiPayload
1011
1059
  );
1012
1060
  }
1013
1061
 
@@ -1050,10 +1098,10 @@ export class Pages {
1050
1098
  throw new RevenexxException('Missing required parameter: "pageId"');
1051
1099
  }
1052
1100
 
1053
- const apiPath = '/v1/pages/editor/{page_id}/preview-grant'.replace('{pageId}', pageId);
1054
- const payload: Payload = {};
1101
+ const apiPath = '/v1/pages/editor/{page_id}/preview-grant'.replace('{page_id}', pageId);
1102
+ const apiPayload: Payload = {};
1055
1103
  if (typeof ttlHours !== 'undefined') {
1056
- payload['ttlHours'] = ttlHours;
1104
+ apiPayload['ttlHours'] = ttlHours;
1057
1105
  }
1058
1106
  const uri = new URL(this.client.config.endpoint + apiPath);
1059
1107
 
@@ -1065,7 +1113,7 @@ export class Pages {
1065
1113
  'post',
1066
1114
  uri,
1067
1115
  apiHeaders,
1068
- payload
1116
+ apiPayload
1069
1117
  );
1070
1118
  }
1071
1119
 
@@ -1112,13 +1160,13 @@ export class Pages {
1112
1160
  throw new RevenexxException('Missing required parameter: "pageId"');
1113
1161
  }
1114
1162
 
1115
- const apiPath = '/v1/pages/editor/{page_id}/publish'.replace('{pageId}', pageId);
1116
- const payload: Payload = {};
1163
+ const apiPath = '/v1/pages/editor/{page_id}/publish'.replace('{page_id}', pageId);
1164
+ const apiPayload: Payload = {};
1117
1165
  if (typeof force !== 'undefined') {
1118
- payload['force'] = force;
1166
+ apiPayload['force'] = force;
1119
1167
  }
1120
1168
  if (typeof label !== 'undefined') {
1121
- payload['label'] = label;
1169
+ apiPayload['label'] = label;
1122
1170
  }
1123
1171
  const uri = new URL(this.client.config.endpoint + apiPath);
1124
1172
 
@@ -1130,7 +1178,7 @@ export class Pages {
1130
1178
  'post',
1131
1179
  uri,
1132
1180
  apiHeaders,
1133
- payload
1181
+ apiPayload
1134
1182
  );
1135
1183
  }
1136
1184
 
@@ -1168,8 +1216,8 @@ export class Pages {
1168
1216
  throw new RevenexxException('Missing required parameter: "pageId"');
1169
1217
  }
1170
1218
 
1171
- const apiPath = '/v1/pages/editor/{page_id}/revert'.replace('{pageId}', pageId);
1172
- const payload: Payload = {};
1219
+ const apiPath = '/v1/pages/editor/{page_id}/revert'.replace('{page_id}', pageId);
1220
+ const apiPayload: Payload = {};
1173
1221
  const uri = new URL(this.client.config.endpoint + apiPath);
1174
1222
 
1175
1223
  const apiHeaders: { [header: string]: string } = {
@@ -1179,7 +1227,7 @@ export class Pages {
1179
1227
  'post',
1180
1228
  uri,
1181
1229
  apiHeaders,
1182
- payload
1230
+ apiPayload
1183
1231
  );
1184
1232
  }
1185
1233
 
@@ -1225,10 +1273,10 @@ export class Pages {
1225
1273
  throw new RevenexxException('Missing required parameter: "scheduledAt"');
1226
1274
  }
1227
1275
 
1228
- const apiPath = '/v1/pages/editor/{page_id}/schedule'.replace('{pageId}', pageId);
1229
- const payload: Payload = {};
1276
+ const apiPath = '/v1/pages/editor/{page_id}/schedule'.replace('{page_id}', pageId);
1277
+ const apiPayload: Payload = {};
1230
1278
  if (typeof scheduledAt !== 'undefined') {
1231
- payload['scheduledAt'] = scheduledAt;
1279
+ apiPayload['scheduledAt'] = scheduledAt;
1232
1280
  }
1233
1281
  const uri = new URL(this.client.config.endpoint + apiPath);
1234
1282
 
@@ -1240,7 +1288,7 @@ export class Pages {
1240
1288
  'post',
1241
1289
  uri,
1242
1290
  apiHeaders,
1243
- payload
1291
+ apiPayload
1244
1292
  );
1245
1293
  }
1246
1294
 
@@ -1278,8 +1326,8 @@ export class Pages {
1278
1326
  throw new RevenexxException('Missing required parameter: "pageId"');
1279
1327
  }
1280
1328
 
1281
- const apiPath = '/v1/pages/editor/{page_id}/state'.replace('{pageId}', pageId);
1282
- const payload: Payload = {};
1329
+ const apiPath = '/v1/pages/editor/{page_id}/state'.replace('{page_id}', pageId);
1330
+ const apiPayload: Payload = {};
1283
1331
  const uri = new URL(this.client.config.endpoint + apiPath);
1284
1332
 
1285
1333
  const apiHeaders: { [header: string]: string } = {
@@ -1289,7 +1337,7 @@ export class Pages {
1289
1337
  'get',
1290
1338
  uri,
1291
1339
  apiHeaders,
1292
- payload
1340
+ apiPayload
1293
1341
  );
1294
1342
  }
1295
1343
 
@@ -1327,8 +1375,8 @@ export class Pages {
1327
1375
  throw new RevenexxException('Missing required parameter: "pageId"');
1328
1376
  }
1329
1377
 
1330
- const apiPath = '/v1/pages/editor/{page_id}/take-ownership'.replace('{pageId}', pageId);
1331
- const payload: Payload = {};
1378
+ const apiPath = '/v1/pages/editor/{page_id}/take-ownership'.replace('{page_id}', pageId);
1379
+ const apiPayload: Payload = {};
1332
1380
  const uri = new URL(this.client.config.endpoint + apiPath);
1333
1381
 
1334
1382
  const apiHeaders: { [header: string]: string } = {
@@ -1338,7 +1386,7 @@ export class Pages {
1338
1386
  'post',
1339
1387
  uri,
1340
1388
  apiHeaders,
1341
- payload
1389
+ apiPayload
1342
1390
  );
1343
1391
  }
1344
1392
 
@@ -1407,25 +1455,25 @@ export class Pages {
1407
1455
  throw new RevenexxException('Missing required parameter: "uuids"');
1408
1456
  }
1409
1457
 
1410
- const apiPath = '/v1/pages/editor/{page_id}/templates'.replace('{pageId}', pageId);
1411
- const payload: Payload = {};
1458
+ const apiPath = '/v1/pages/editor/{page_id}/templates'.replace('{page_id}', pageId);
1459
+ const apiPayload: Payload = {};
1412
1460
  if (typeof description !== 'undefined') {
1413
- payload['description'] = description;
1461
+ apiPayload['description'] = description;
1414
1462
  }
1415
1463
  if (typeof fieldName !== 'undefined') {
1416
- payload['fieldName'] = fieldName;
1464
+ apiPayload['fieldName'] = fieldName;
1417
1465
  }
1418
1466
  if (typeof isDefault !== 'undefined') {
1419
- payload['isDefault'] = isDefault;
1467
+ apiPayload['isDefault'] = isDefault;
1420
1468
  }
1421
1469
  if (typeof label !== 'undefined') {
1422
- payload['label'] = label;
1470
+ apiPayload['label'] = label;
1423
1471
  }
1424
1472
  if (typeof pageBundle !== 'undefined') {
1425
- payload['pageBundle'] = pageBundle;
1473
+ apiPayload['pageBundle'] = pageBundle;
1426
1474
  }
1427
1475
  if (typeof uuids !== 'undefined') {
1428
- payload['uuids'] = uuids;
1476
+ apiPayload['uuids'] = uuids;
1429
1477
  }
1430
1478
  const uri = new URL(this.client.config.endpoint + apiPath);
1431
1479
 
@@ -1437,7 +1485,7 @@ export class Pages {
1437
1485
  'post',
1438
1486
  uri,
1439
1487
  apiHeaders,
1440
- payload
1488
+ apiPayload
1441
1489
  );
1442
1490
  }
1443
1491
 
@@ -1475,8 +1523,8 @@ export class Pages {
1475
1523
  throw new RevenexxException('Missing required parameter: "pageId"');
1476
1524
  }
1477
1525
 
1478
- const apiPath = '/v1/pages/editor/{page_id}/unschedule'.replace('{pageId}', pageId);
1479
- const payload: Payload = {};
1526
+ const apiPath = '/v1/pages/editor/{page_id}/unschedule'.replace('{page_id}', pageId);
1527
+ const apiPayload: Payload = {};
1480
1528
  const uri = new URL(this.client.config.endpoint + apiPath);
1481
1529
 
1482
1530
  const apiHeaders: { [header: string]: string } = {
@@ -1486,7 +1534,7 @@ export class Pages {
1486
1534
  'post',
1487
1535
  uri,
1488
1536
  apiHeaders,
1489
- payload
1537
+ apiPayload
1490
1538
  );
1491
1539
  }
1492
1540
 
@@ -1498,7 +1546,7 @@ export class Pages {
1498
1546
  pagesLibraryList(): Promise<{}> {
1499
1547
 
1500
1548
  const apiPath = '/v1/pages/library';
1501
- const payload: Payload = {};
1549
+ const apiPayload: Payload = {};
1502
1550
  const uri = new URL(this.client.config.endpoint + apiPath);
1503
1551
 
1504
1552
  const apiHeaders: { [header: string]: string } = {
@@ -1508,7 +1556,7 @@ export class Pages {
1508
1556
  'get',
1509
1557
  uri,
1510
1558
  apiHeaders,
1511
- payload
1559
+ apiPayload
1512
1560
  );
1513
1561
  }
1514
1562
 
@@ -1547,7 +1595,7 @@ export class Pages {
1547
1595
  }
1548
1596
 
1549
1597
  const apiPath = '/v1/pages/library/{id}'.replace('{id}', id);
1550
- const payload: Payload = {};
1598
+ const apiPayload: Payload = {};
1551
1599
  const uri = new URL(this.client.config.endpoint + apiPath);
1552
1600
 
1553
1601
  const apiHeaders: { [header: string]: string } = {
@@ -1557,7 +1605,7 @@ export class Pages {
1557
1605
  'delete',
1558
1606
  uri,
1559
1607
  apiHeaders,
1560
- payload
1608
+ apiPayload
1561
1609
  );
1562
1610
  }
1563
1611
 
@@ -1596,7 +1644,7 @@ export class Pages {
1596
1644
  }
1597
1645
 
1598
1646
  const apiPath = '/v1/pages/library/{id}'.replace('{id}', id);
1599
- const payload: Payload = {};
1647
+ const apiPayload: Payload = {};
1600
1648
  const uri = new URL(this.client.config.endpoint + apiPath);
1601
1649
 
1602
1650
  const apiHeaders: { [header: string]: string } = {
@@ -1606,28 +1654,193 @@ export class Pages {
1606
1654
  'get',
1607
1655
  uri,
1608
1656
  apiHeaders,
1609
- payload
1657
+ apiPayload
1610
1658
  );
1611
1659
  }
1612
1660
 
1613
1661
  /**
1614
1662
  *
1615
1663
  * @param {string} params.id -
1664
+ * @param {string} params.bundle -
1665
+ * @param {string} params.label -
1666
+ * @param {object} params.tree - Serialized block tree ({ bundle, props, props_i18n, options, children }).
1616
1667
  * @throws {RevenexxException}
1617
1668
  * @returns {Promise<Models.LibraryItem>}
1618
1669
  */
1619
- pagesLibraryUpdate(params: { id: string }): Promise<Models.LibraryItem>;
1670
+ pagesLibraryUpdate(params: { id: string, bundle?: string, label?: string, tree?: object }): Promise<Models.LibraryItem>;
1620
1671
  /**
1621
1672
  *
1622
1673
  * @param {string} id -
1674
+ * @param {string} bundle -
1675
+ * @param {string} label -
1676
+ * @param {object} tree - Serialized block tree ({ bundle, props, props_i18n, options, children }).
1623
1677
  * @throws {RevenexxException}
1624
1678
  * @returns {Promise<Models.LibraryItem>}
1625
1679
  * @deprecated Use the object parameter style method for a better developer experience.
1626
1680
  */
1627
- pagesLibraryUpdate(id: string): Promise<Models.LibraryItem>;
1681
+ pagesLibraryUpdate(id: string, bundle?: string, label?: string, tree?: object): Promise<Models.LibraryItem>;
1628
1682
  pagesLibraryUpdate(
1629
- paramsOrFirst: { id: string } | string
1683
+ paramsOrFirst: { id: string, bundle?: string, label?: string, tree?: object } | string,
1684
+ ...rest: [(string)?, (string)?, (object)?]
1630
1685
  ): Promise<Models.LibraryItem> {
1686
+ let params: { id: string, bundle?: string, label?: string, tree?: object };
1687
+
1688
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1689
+ params = (paramsOrFirst || {}) as { id: string, bundle?: string, label?: string, tree?: object };
1690
+ } else {
1691
+ params = {
1692
+ id: paramsOrFirst as string,
1693
+ bundle: rest[0] as string,
1694
+ label: rest[1] as string,
1695
+ tree: rest[2] as object
1696
+ };
1697
+ }
1698
+
1699
+ const id = params.id;
1700
+ const bundle = params.bundle;
1701
+ const label = params.label;
1702
+ const tree = params.tree;
1703
+
1704
+ if (typeof id === 'undefined') {
1705
+ throw new RevenexxException('Missing required parameter: "id"');
1706
+ }
1707
+
1708
+ const apiPath = '/v1/pages/library/{id}'.replace('{id}', id);
1709
+ const apiPayload: Payload = {};
1710
+ if (typeof bundle !== 'undefined') {
1711
+ apiPayload['bundle'] = bundle;
1712
+ }
1713
+ if (typeof label !== 'undefined') {
1714
+ apiPayload['label'] = label;
1715
+ }
1716
+ if (typeof tree !== 'undefined') {
1717
+ apiPayload['tree'] = tree;
1718
+ }
1719
+ const uri = new URL(this.client.config.endpoint + apiPath);
1720
+
1721
+ const apiHeaders: { [header: string]: string } = {
1722
+ 'content-type': 'application/json',
1723
+ }
1724
+
1725
+ return this.client.call(
1726
+ 'put',
1727
+ uri,
1728
+ apiHeaders,
1729
+ apiPayload
1730
+ );
1731
+ }
1732
+
1733
+ /**
1734
+ *
1735
+ * @throws {RevenexxException}
1736
+ * @returns {Promise<{}>}
1737
+ */
1738
+ pagesMenusList(): Promise<{}> {
1739
+
1740
+ const apiPath = '/v1/pages/menus';
1741
+ const apiPayload: Payload = {};
1742
+ const uri = new URL(this.client.config.endpoint + apiPath);
1743
+
1744
+ const apiHeaders: { [header: string]: string } = {
1745
+ }
1746
+
1747
+ return this.client.call(
1748
+ 'get',
1749
+ uri,
1750
+ apiHeaders,
1751
+ apiPayload
1752
+ );
1753
+ }
1754
+
1755
+ /**
1756
+ *
1757
+ * @param {string} params.label -
1758
+ * @param {string} params.menuKey - Stable menu identifier, e.g. "main", "footer", "account".
1759
+ * @param {object[]} params.items - Ordered menu entries ({ label, to?, items? }).
1760
+ * @throws {RevenexxException}
1761
+ * @returns {Promise<Models.Menu>}
1762
+ */
1763
+ pagesMenusUpsert(params: { label: string, menuKey: string, items?: object[] }): Promise<Models.Menu>;
1764
+ /**
1765
+ *
1766
+ * @param {string} label -
1767
+ * @param {string} menuKey - Stable menu identifier, e.g. "main", "footer", "account".
1768
+ * @param {object[]} items - Ordered menu entries ({ label, to?, items? }).
1769
+ * @throws {RevenexxException}
1770
+ * @returns {Promise<Models.Menu>}
1771
+ * @deprecated Use the object parameter style method for a better developer experience.
1772
+ */
1773
+ pagesMenusUpsert(label: string, menuKey: string, items?: object[]): Promise<Models.Menu>;
1774
+ pagesMenusUpsert(
1775
+ paramsOrFirst: { label: string, menuKey: string, items?: object[] } | string,
1776
+ ...rest: [(string)?, (object[])?]
1777
+ ): Promise<Models.Menu> {
1778
+ let params: { label: string, menuKey: string, items?: object[] };
1779
+
1780
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1781
+ params = (paramsOrFirst || {}) as { label: string, menuKey: string, items?: object[] };
1782
+ } else {
1783
+ params = {
1784
+ label: paramsOrFirst as string,
1785
+ menuKey: rest[0] as string,
1786
+ items: rest[1] as object[]
1787
+ };
1788
+ }
1789
+
1790
+ const label = params.label;
1791
+ const menuKey = params.menuKey;
1792
+ const items = params.items;
1793
+
1794
+ if (typeof label === 'undefined') {
1795
+ throw new RevenexxException('Missing required parameter: "label"');
1796
+ }
1797
+ if (typeof menuKey === 'undefined') {
1798
+ throw new RevenexxException('Missing required parameter: "menuKey"');
1799
+ }
1800
+
1801
+ const apiPath = '/v1/pages/menus';
1802
+ const apiPayload: Payload = {};
1803
+ if (typeof items !== 'undefined') {
1804
+ apiPayload['items'] = items;
1805
+ }
1806
+ if (typeof label !== 'undefined') {
1807
+ apiPayload['label'] = label;
1808
+ }
1809
+ if (typeof menuKey !== 'undefined') {
1810
+ apiPayload['menuKey'] = menuKey;
1811
+ }
1812
+ const uri = new URL(this.client.config.endpoint + apiPath);
1813
+
1814
+ const apiHeaders: { [header: string]: string } = {
1815
+ 'content-type': 'application/json',
1816
+ }
1817
+
1818
+ return this.client.call(
1819
+ 'post',
1820
+ uri,
1821
+ apiHeaders,
1822
+ apiPayload
1823
+ );
1824
+ }
1825
+
1826
+ /**
1827
+ *
1828
+ * @param {string} params.id -
1829
+ * @throws {RevenexxException}
1830
+ * @returns {Promise<{}>}
1831
+ */
1832
+ pagesMenusDelete(params: { id: string }): Promise<{}>;
1833
+ /**
1834
+ *
1835
+ * @param {string} id -
1836
+ * @throws {RevenexxException}
1837
+ * @returns {Promise<{}>}
1838
+ * @deprecated Use the object parameter style method for a better developer experience.
1839
+ */
1840
+ pagesMenusDelete(id: string): Promise<{}>;
1841
+ pagesMenusDelete(
1842
+ paramsOrFirst: { id: string } | string
1843
+ ): Promise<{}> {
1631
1844
  let params: { id: string };
1632
1845
 
1633
1846
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -1644,8 +1857,121 @@ export class Pages {
1644
1857
  throw new RevenexxException('Missing required parameter: "id"');
1645
1858
  }
1646
1859
 
1647
- const apiPath = '/v1/pages/library/{id}'.replace('{id}', id);
1648
- const payload: Payload = {};
1860
+ const apiPath = '/v1/pages/menus/{id}'.replace('{id}', id);
1861
+ const apiPayload: Payload = {};
1862
+ const uri = new URL(this.client.config.endpoint + apiPath);
1863
+
1864
+ const apiHeaders: { [header: string]: string } = {
1865
+ }
1866
+
1867
+ return this.client.call(
1868
+ 'delete',
1869
+ uri,
1870
+ apiHeaders,
1871
+ apiPayload
1872
+ );
1873
+ }
1874
+
1875
+ /**
1876
+ *
1877
+ * @param {string} params.id -
1878
+ * @throws {RevenexxException}
1879
+ * @returns {Promise<Models.Menu>}
1880
+ */
1881
+ pagesMenusGet(params: { id: string }): Promise<Models.Menu>;
1882
+ /**
1883
+ *
1884
+ * @param {string} id -
1885
+ * @throws {RevenexxException}
1886
+ * @returns {Promise<Models.Menu>}
1887
+ * @deprecated Use the object parameter style method for a better developer experience.
1888
+ */
1889
+ pagesMenusGet(id: string): Promise<Models.Menu>;
1890
+ pagesMenusGet(
1891
+ paramsOrFirst: { id: string } | string
1892
+ ): Promise<Models.Menu> {
1893
+ let params: { id: string };
1894
+
1895
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1896
+ params = (paramsOrFirst || {}) as { id: string };
1897
+ } else {
1898
+ params = {
1899
+ id: paramsOrFirst as string
1900
+ };
1901
+ }
1902
+
1903
+ const id = params.id;
1904
+
1905
+ if (typeof id === 'undefined') {
1906
+ throw new RevenexxException('Missing required parameter: "id"');
1907
+ }
1908
+
1909
+ const apiPath = '/v1/pages/menus/{id}'.replace('{id}', id);
1910
+ const apiPayload: Payload = {};
1911
+ const uri = new URL(this.client.config.endpoint + apiPath);
1912
+
1913
+ const apiHeaders: { [header: string]: string } = {
1914
+ }
1915
+
1916
+ return this.client.call(
1917
+ 'get',
1918
+ uri,
1919
+ apiHeaders,
1920
+ apiPayload
1921
+ );
1922
+ }
1923
+
1924
+ /**
1925
+ *
1926
+ * @param {string} params.id -
1927
+ * @param {object[]} params.items -
1928
+ * @param {string} params.label -
1929
+ * @throws {RevenexxException}
1930
+ * @returns {Promise<Models.Menu>}
1931
+ */
1932
+ pagesMenusUpdate(params: { id: string, items?: object[], label?: string }): Promise<Models.Menu>;
1933
+ /**
1934
+ *
1935
+ * @param {string} id -
1936
+ * @param {object[]} items -
1937
+ * @param {string} label -
1938
+ * @throws {RevenexxException}
1939
+ * @returns {Promise<Models.Menu>}
1940
+ * @deprecated Use the object parameter style method for a better developer experience.
1941
+ */
1942
+ pagesMenusUpdate(id: string, items?: object[], label?: string): Promise<Models.Menu>;
1943
+ pagesMenusUpdate(
1944
+ paramsOrFirst: { id: string, items?: object[], label?: string } | string,
1945
+ ...rest: [(object[])?, (string)?]
1946
+ ): Promise<Models.Menu> {
1947
+ let params: { id: string, items?: object[], label?: string };
1948
+
1949
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1950
+ params = (paramsOrFirst || {}) as { id: string, items?: object[], label?: string };
1951
+ } else {
1952
+ params = {
1953
+ id: paramsOrFirst as string,
1954
+ items: rest[0] as object[],
1955
+ label: rest[1] as string
1956
+ };
1957
+ }
1958
+
1959
+ const id = params.id;
1960
+ const items = params.items;
1961
+ const label = params.label;
1962
+
1963
+ if (typeof id === 'undefined') {
1964
+ throw new RevenexxException('Missing required parameter: "id"');
1965
+ }
1966
+
1967
+ const apiPath = '/v1/pages/menus/{id}'.replace('{id}', id);
1968
+ const apiPayload: Payload = {};
1969
+ if (typeof items !== 'undefined') {
1970
+ apiPayload['items'] = items;
1971
+ }
1972
+ if (typeof label !== 'undefined') {
1973
+ apiPayload['label'] = label;
1974
+ }
1649
1975
  const uri = new URL(this.client.config.endpoint + apiPath);
1650
1976
 
1651
1977
  const apiHeaders: { [header: string]: string } = {
@@ -1656,7 +1982,7 @@ export class Pages {
1656
1982
  'put',
1657
1983
  uri,
1658
1984
  apiHeaders,
1659
- payload
1985
+ apiPayload
1660
1986
  );
1661
1987
  }
1662
1988
 
@@ -1668,7 +1994,7 @@ export class Pages {
1668
1994
  pagesPagesList(): Promise<{}> {
1669
1995
 
1670
1996
  const apiPath = '/v1/pages/pages';
1671
- const payload: Payload = {};
1997
+ const apiPayload: Payload = {};
1672
1998
  const uri = new URL(this.client.config.endpoint + apiPath);
1673
1999
 
1674
2000
  const apiHeaders: { [header: string]: string } = {
@@ -1678,19 +2004,85 @@ export class Pages {
1678
2004
  'get',
1679
2005
  uri,
1680
2006
  apiHeaders,
1681
- payload
2007
+ apiPayload
1682
2008
  );
1683
2009
  }
1684
2010
 
1685
2011
  /**
1686
2012
  *
2013
+ * @param {string} params.title -
2014
+ * @param {string} params.bundle -
2015
+ * @param {object} params.hostOptions -
2016
+ * @param {object} params.meta -
2017
+ * @param {string} params.slug -
2018
+ * @param {string} params.sourceLanguage -
1687
2019
  * @throws {RevenexxException}
1688
2020
  * @returns {Promise<Models.Page>}
1689
2021
  */
1690
- pagesPagesCreate(): Promise<Models.Page> {
2022
+ pagesPagesCreate(params: { title: string, bundle?: string, hostOptions?: object, meta?: object, slug?: string, sourceLanguage?: string }): Promise<Models.Page>;
2023
+ /**
2024
+ *
2025
+ * @param {string} title -
2026
+ * @param {string} bundle -
2027
+ * @param {object} hostOptions -
2028
+ * @param {object} meta -
2029
+ * @param {string} slug -
2030
+ * @param {string} sourceLanguage -
2031
+ * @throws {RevenexxException}
2032
+ * @returns {Promise<Models.Page>}
2033
+ * @deprecated Use the object parameter style method for a better developer experience.
2034
+ */
2035
+ pagesPagesCreate(title: string, bundle?: string, hostOptions?: object, meta?: object, slug?: string, sourceLanguage?: string): Promise<Models.Page>;
2036
+ pagesPagesCreate(
2037
+ paramsOrFirst: { title: string, bundle?: string, hostOptions?: object, meta?: object, slug?: string, sourceLanguage?: string } | string,
2038
+ ...rest: [(string)?, (object)?, (object)?, (string)?, (string)?]
2039
+ ): Promise<Models.Page> {
2040
+ let params: { title: string, bundle?: string, hostOptions?: object, meta?: object, slug?: string, sourceLanguage?: string };
2041
+
2042
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2043
+ params = (paramsOrFirst || {}) as { title: string, bundle?: string, hostOptions?: object, meta?: object, slug?: string, sourceLanguage?: string };
2044
+ } else {
2045
+ params = {
2046
+ title: paramsOrFirst as string,
2047
+ bundle: rest[0] as string,
2048
+ hostOptions: rest[1] as object,
2049
+ meta: rest[2] as object,
2050
+ slug: rest[3] as string,
2051
+ sourceLanguage: rest[4] as string
2052
+ };
2053
+ }
2054
+
2055
+ const title = params.title;
2056
+ const bundle = params.bundle;
2057
+ const hostOptions = params.hostOptions;
2058
+ const meta = params.meta;
2059
+ const slug = params.slug;
2060
+ const sourceLanguage = params.sourceLanguage;
2061
+
2062
+ if (typeof title === 'undefined') {
2063
+ throw new RevenexxException('Missing required parameter: "title"');
2064
+ }
1691
2065
 
1692
2066
  const apiPath = '/v1/pages/pages';
1693
- const payload: Payload = {};
2067
+ const apiPayload: Payload = {};
2068
+ if (typeof bundle !== 'undefined') {
2069
+ apiPayload['bundle'] = bundle;
2070
+ }
2071
+ if (typeof hostOptions !== 'undefined') {
2072
+ apiPayload['hostOptions'] = hostOptions;
2073
+ }
2074
+ if (typeof meta !== 'undefined') {
2075
+ apiPayload['meta'] = meta;
2076
+ }
2077
+ if (typeof slug !== 'undefined') {
2078
+ apiPayload['slug'] = slug;
2079
+ }
2080
+ if (typeof sourceLanguage !== 'undefined') {
2081
+ apiPayload['sourceLanguage'] = sourceLanguage;
2082
+ }
2083
+ if (typeof title !== 'undefined') {
2084
+ apiPayload['title'] = title;
2085
+ }
1694
2086
  const uri = new URL(this.client.config.endpoint + apiPath);
1695
2087
 
1696
2088
  const apiHeaders: { [header: string]: string } = {
@@ -1701,7 +2093,7 @@ export class Pages {
1701
2093
  'post',
1702
2094
  uri,
1703
2095
  apiHeaders,
1704
- payload
2096
+ apiPayload
1705
2097
  );
1706
2098
  }
1707
2099
 
@@ -1740,7 +2132,7 @@ export class Pages {
1740
2132
  }
1741
2133
 
1742
2134
  const apiPath = '/v1/pages/pages/{id}'.replace('{id}', id);
1743
- const payload: Payload = {};
2135
+ const apiPayload: Payload = {};
1744
2136
  const uri = new URL(this.client.config.endpoint + apiPath);
1745
2137
 
1746
2138
  const apiHeaders: { [header: string]: string } = {
@@ -1750,7 +2142,7 @@ export class Pages {
1750
2142
  'delete',
1751
2143
  uri,
1752
2144
  apiHeaders,
1753
- payload
2145
+ apiPayload
1754
2146
  );
1755
2147
  }
1756
2148
 
@@ -1789,7 +2181,7 @@ export class Pages {
1789
2181
  }
1790
2182
 
1791
2183
  const apiPath = '/v1/pages/pages/{id}'.replace('{id}', id);
1792
- const payload: Payload = {};
2184
+ const apiPayload: Payload = {};
1793
2185
  const uri = new URL(this.client.config.endpoint + apiPath);
1794
2186
 
1795
2187
  const apiHeaders: { [header: string]: string } = {
@@ -1799,46 +2191,82 @@ export class Pages {
1799
2191
  'get',
1800
2192
  uri,
1801
2193
  apiHeaders,
1802
- payload
2194
+ apiPayload
1803
2195
  );
1804
2196
  }
1805
2197
 
1806
2198
  /**
1807
2199
  *
1808
2200
  * @param {string} params.id -
2201
+ * @param {string} params.bundle -
2202
+ * @param {object} params.meta -
2203
+ * @param {string} params.slug -
2204
+ * @param {PageStatus} params.status -
2205
+ * @param {string} params.title -
1809
2206
  * @throws {RevenexxException}
1810
2207
  * @returns {Promise<Models.Page>}
1811
2208
  */
1812
- pagesPagesUpdate(params: { id: string }): Promise<Models.Page>;
2209
+ pagesPagesUpdate(params: { id: string, bundle?: string, meta?: object, slug?: string, status?: PageStatus, title?: string }): Promise<Models.Page>;
1813
2210
  /**
1814
2211
  *
1815
2212
  * @param {string} id -
2213
+ * @param {string} bundle -
2214
+ * @param {object} meta -
2215
+ * @param {string} slug -
2216
+ * @param {PageStatus} status -
2217
+ * @param {string} title -
1816
2218
  * @throws {RevenexxException}
1817
2219
  * @returns {Promise<Models.Page>}
1818
2220
  * @deprecated Use the object parameter style method for a better developer experience.
1819
2221
  */
1820
- pagesPagesUpdate(id: string): Promise<Models.Page>;
2222
+ pagesPagesUpdate(id: string, bundle?: string, meta?: object, slug?: string, status?: PageStatus, title?: string): Promise<Models.Page>;
1821
2223
  pagesPagesUpdate(
1822
- paramsOrFirst: { id: string } | string
2224
+ paramsOrFirst: { id: string, bundle?: string, meta?: object, slug?: string, status?: PageStatus, title?: string } | string,
2225
+ ...rest: [(string)?, (object)?, (string)?, (PageStatus)?, (string)?]
1823
2226
  ): Promise<Models.Page> {
1824
- let params: { id: string };
2227
+ let params: { id: string, bundle?: string, meta?: object, slug?: string, status?: PageStatus, title?: string };
1825
2228
 
1826
2229
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1827
- params = (paramsOrFirst || {}) as { id: string };
2230
+ params = (paramsOrFirst || {}) as { id: string, bundle?: string, meta?: object, slug?: string, status?: PageStatus, title?: string };
1828
2231
  } else {
1829
2232
  params = {
1830
- id: paramsOrFirst as string
2233
+ id: paramsOrFirst as string,
2234
+ bundle: rest[0] as string,
2235
+ meta: rest[1] as object,
2236
+ slug: rest[2] as string,
2237
+ status: rest[3] as PageStatus,
2238
+ title: rest[4] as string
1831
2239
  };
1832
2240
  }
1833
2241
 
1834
2242
  const id = params.id;
2243
+ const bundle = params.bundle;
2244
+ const meta = params.meta;
2245
+ const slug = params.slug;
2246
+ const status = params.status;
2247
+ const title = params.title;
1835
2248
 
1836
2249
  if (typeof id === 'undefined') {
1837
2250
  throw new RevenexxException('Missing required parameter: "id"');
1838
2251
  }
1839
2252
 
1840
2253
  const apiPath = '/v1/pages/pages/{id}'.replace('{id}', id);
1841
- const payload: Payload = {};
2254
+ const apiPayload: Payload = {};
2255
+ if (typeof bundle !== 'undefined') {
2256
+ apiPayload['bundle'] = bundle;
2257
+ }
2258
+ if (typeof meta !== 'undefined') {
2259
+ apiPayload['meta'] = meta;
2260
+ }
2261
+ if (typeof slug !== 'undefined') {
2262
+ apiPayload['slug'] = slug;
2263
+ }
2264
+ if (typeof status !== 'undefined') {
2265
+ apiPayload['status'] = status;
2266
+ }
2267
+ if (typeof title !== 'undefined') {
2268
+ apiPayload['title'] = title;
2269
+ }
1842
2270
  const uri = new URL(this.client.config.endpoint + apiPath);
1843
2271
 
1844
2272
  const apiHeaders: { [header: string]: string } = {
@@ -1849,7 +2277,7 @@ export class Pages {
1849
2277
  'put',
1850
2278
  uri,
1851
2279
  apiHeaders,
1852
- payload
2280
+ apiPayload
1853
2281
  );
1854
2282
  }
1855
2283
 
@@ -1888,7 +2316,7 @@ export class Pages {
1888
2316
  }
1889
2317
 
1890
2318
  const apiPath = '/v1/pages/pages/{id}/revisions'.replace('{id}', id);
1891
- const payload: Payload = {};
2319
+ const apiPayload: Payload = {};
1892
2320
  const uri = new URL(this.client.config.endpoint + apiPath);
1893
2321
 
1894
2322
  const apiHeaders: { [header: string]: string } = {
@@ -1898,19 +2326,54 @@ export class Pages {
1898
2326
  'get',
1899
2327
  uri,
1900
2328
  apiHeaders,
1901
- payload
2329
+ apiPayload
1902
2330
  );
1903
2331
  }
1904
2332
 
1905
2333
  /**
1906
2334
  *
2335
+ * @param {object[]} params.menus -
2336
+ * @param {object[]} params.pages -
1907
2337
  * @throws {RevenexxException}
1908
2338
  * @returns {Promise<{}>}
1909
2339
  */
1910
- pagesSeed(): Promise<{}> {
2340
+ pagesSeed(params?: { menus?: object[], pages?: object[] }): Promise<{}>;
2341
+ /**
2342
+ *
2343
+ * @param {object[]} menus -
2344
+ * @param {object[]} pages -
2345
+ * @throws {RevenexxException}
2346
+ * @returns {Promise<{}>}
2347
+ * @deprecated Use the object parameter style method for a better developer experience.
2348
+ */
2349
+ pagesSeed(menus?: object[], pages?: object[]): Promise<{}>;
2350
+ pagesSeed(
2351
+ paramsOrFirst?: { menus?: object[], pages?: object[] } | object[],
2352
+ ...rest: [(object[])?]
2353
+ ): Promise<{}> {
2354
+ let params: { menus?: object[], pages?: object[] };
2355
+
2356
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('menus' in paramsOrFirst || 'pages' in paramsOrFirst))) {
2357
+ params = (paramsOrFirst || {}) as { menus?: object[], pages?: object[] };
2358
+ } else {
2359
+ params = {
2360
+ menus: paramsOrFirst as object[],
2361
+ pages: rest[0] as object[]
2362
+ };
2363
+ }
2364
+
2365
+ const menus = params.menus;
2366
+ const pages = params.pages;
2367
+
1911
2368
 
1912
2369
  const apiPath = '/v1/pages/seed';
1913
- const payload: Payload = {};
2370
+ const apiPayload: Payload = {};
2371
+ if (typeof menus !== 'undefined') {
2372
+ apiPayload['menus'] = menus;
2373
+ }
2374
+ if (typeof pages !== 'undefined') {
2375
+ apiPayload['pages'] = pages;
2376
+ }
1914
2377
  const uri = new URL(this.client.config.endpoint + apiPath);
1915
2378
 
1916
2379
  const apiHeaders: { [header: string]: string } = {
@@ -1921,7 +2384,7 @@ export class Pages {
1921
2384
  'post',
1922
2385
  uri,
1923
2386
  apiHeaders,
1924
- payload
2387
+ apiPayload
1925
2388
  );
1926
2389
  }
1927
2390
 
@@ -1933,7 +2396,7 @@ export class Pages {
1933
2396
  pagesTemplatesList(): Promise<{}> {
1934
2397
 
1935
2398
  const apiPath = '/v1/pages/templates';
1936
- const payload: Payload = {};
2399
+ const apiPayload: Payload = {};
1937
2400
  const uri = new URL(this.client.config.endpoint + apiPath);
1938
2401
 
1939
2402
  const apiHeaders: { [header: string]: string } = {
@@ -1943,7 +2406,7 @@ export class Pages {
1943
2406
  'get',
1944
2407
  uri,
1945
2408
  apiHeaders,
1946
- payload
2409
+ apiPayload
1947
2410
  );
1948
2411
  }
1949
2412
 
@@ -1982,7 +2445,7 @@ export class Pages {
1982
2445
  }
1983
2446
 
1984
2447
  const apiPath = '/v1/pages/templates/{id}'.replace('{id}', id);
1985
- const payload: Payload = {};
2448
+ const apiPayload: Payload = {};
1986
2449
  const uri = new URL(this.client.config.endpoint + apiPath);
1987
2450
 
1988
2451
  const apiHeaders: { [header: string]: string } = {
@@ -1992,7 +2455,7 @@ export class Pages {
1992
2455
  'delete',
1993
2456
  uri,
1994
2457
  apiHeaders,
1995
- payload
2458
+ apiPayload
1996
2459
  );
1997
2460
  }
1998
2461
 
@@ -2031,7 +2494,7 @@ export class Pages {
2031
2494
  }
2032
2495
 
2033
2496
  const apiPath = '/v1/pages/templates/{id}'.replace('{id}', id);
2034
- const payload: Payload = {};
2497
+ const apiPayload: Payload = {};
2035
2498
  const uri = new URL(this.client.config.endpoint + apiPath);
2036
2499
 
2037
2500
  const apiHeaders: { [header: string]: string } = {
@@ -2041,46 +2504,89 @@ export class Pages {
2041
2504
  'get',
2042
2505
  uri,
2043
2506
  apiHeaders,
2044
- payload
2507
+ apiPayload
2045
2508
  );
2046
2509
  }
2047
2510
 
2048
2511
  /**
2049
2512
  *
2050
2513
  * @param {string} params.id -
2514
+ * @param {string} params.description -
2515
+ * @param {string} params.fieldName -
2516
+ * @param {boolean} params.isDefault -
2517
+ * @param {string} params.label -
2518
+ * @param {string} params.pageBundle -
2519
+ * @param {object[]} params.tree - Serialized block trees ({ bundle, props, props_i18n, options, children }).
2051
2520
  * @throws {RevenexxException}
2052
2521
  * @returns {Promise<Models.Template>}
2053
2522
  */
2054
- pagesTemplatesUpdate(params: { id: string }): Promise<Models.Template>;
2523
+ pagesTemplatesUpdate(params: { id: string, description?: string, fieldName?: string, isDefault?: boolean, label?: string, pageBundle?: string, tree?: object[] }): Promise<Models.Template>;
2055
2524
  /**
2056
2525
  *
2057
2526
  * @param {string} id -
2527
+ * @param {string} description -
2528
+ * @param {string} fieldName -
2529
+ * @param {boolean} isDefault -
2530
+ * @param {string} label -
2531
+ * @param {string} pageBundle -
2532
+ * @param {object[]} tree - Serialized block trees ({ bundle, props, props_i18n, options, children }).
2058
2533
  * @throws {RevenexxException}
2059
2534
  * @returns {Promise<Models.Template>}
2060
2535
  * @deprecated Use the object parameter style method for a better developer experience.
2061
2536
  */
2062
- pagesTemplatesUpdate(id: string): Promise<Models.Template>;
2537
+ pagesTemplatesUpdate(id: string, description?: string, fieldName?: string, isDefault?: boolean, label?: string, pageBundle?: string, tree?: object[]): Promise<Models.Template>;
2063
2538
  pagesTemplatesUpdate(
2064
- paramsOrFirst: { id: string } | string
2539
+ paramsOrFirst: { id: string, description?: string, fieldName?: string, isDefault?: boolean, label?: string, pageBundle?: string, tree?: object[] } | string,
2540
+ ...rest: [(string)?, (string)?, (boolean)?, (string)?, (string)?, (object[])?]
2065
2541
  ): Promise<Models.Template> {
2066
- let params: { id: string };
2542
+ let params: { id: string, description?: string, fieldName?: string, isDefault?: boolean, label?: string, pageBundle?: string, tree?: object[] };
2067
2543
 
2068
2544
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2069
- params = (paramsOrFirst || {}) as { id: string };
2545
+ params = (paramsOrFirst || {}) as { id: string, description?: string, fieldName?: string, isDefault?: boolean, label?: string, pageBundle?: string, tree?: object[] };
2070
2546
  } else {
2071
2547
  params = {
2072
- id: paramsOrFirst as string
2548
+ id: paramsOrFirst as string,
2549
+ description: rest[0] as string,
2550
+ fieldName: rest[1] as string,
2551
+ isDefault: rest[2] as boolean,
2552
+ label: rest[3] as string,
2553
+ pageBundle: rest[4] as string,
2554
+ tree: rest[5] as object[]
2073
2555
  };
2074
2556
  }
2075
2557
 
2076
2558
  const id = params.id;
2559
+ const description = params.description;
2560
+ const fieldName = params.fieldName;
2561
+ const isDefault = params.isDefault;
2562
+ const label = params.label;
2563
+ const pageBundle = params.pageBundle;
2564
+ const tree = params.tree;
2077
2565
 
2078
2566
  if (typeof id === 'undefined') {
2079
2567
  throw new RevenexxException('Missing required parameter: "id"');
2080
2568
  }
2081
2569
 
2082
2570
  const apiPath = '/v1/pages/templates/{id}'.replace('{id}', id);
2083
- const payload: Payload = {};
2571
+ const apiPayload: Payload = {};
2572
+ if (typeof description !== 'undefined') {
2573
+ apiPayload['description'] = description;
2574
+ }
2575
+ if (typeof fieldName !== 'undefined') {
2576
+ apiPayload['field_name'] = fieldName;
2577
+ }
2578
+ if (typeof isDefault !== 'undefined') {
2579
+ apiPayload['is_default'] = isDefault;
2580
+ }
2581
+ if (typeof label !== 'undefined') {
2582
+ apiPayload['label'] = label;
2583
+ }
2584
+ if (typeof pageBundle !== 'undefined') {
2585
+ apiPayload['page_bundle'] = pageBundle;
2586
+ }
2587
+ if (typeof tree !== 'undefined') {
2588
+ apiPayload['tree'] = tree;
2589
+ }
2084
2590
  const uri = new URL(this.client.config.endpoint + apiPath);
2085
2591
 
2086
2592
  const apiHeaders: { [header: string]: string } = {
@@ -2091,7 +2597,7 @@ export class Pages {
2091
2597
  'put',
2092
2598
  uri,
2093
2599
  apiHeaders,
2094
- payload
2600
+ apiPayload
2095
2601
  );
2096
2602
  }
2097
2603
  }