@revenexx/sdk 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/dist/cjs/sdk.js +7445 -1584
  2. package/dist/cjs/sdk.js.map +1 -1
  3. package/dist/esm/sdk.js +7422 -1585
  4. package/dist/esm/sdk.js.map +1 -1
  5. package/dist/iife/sdk.js +7445 -1584
  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-payment-status.ts +9 -0
  24. package/src/enums/organization-status.ts +4 -0
  25. package/src/enums/page-status.ts +5 -0
  26. package/src/enums/payment-fee-type.ts +5 -0
  27. package/src/enums/payment-method-kind.ts +4 -0
  28. package/src/enums/price-entry-type.ts +4 -0
  29. package/src/enums/price-list-status.ts +4 -0
  30. package/src/enums/shipping-method-matrix-basis.ts +6 -0
  31. package/src/enums/shipping-method-pricing-type.ts +5 -0
  32. package/src/index.ts +24 -0
  33. package/src/models.ts +4303 -941
  34. package/src/services/apps.ts +154 -154
  35. package/src/services/avatars.ts +57 -57
  36. package/src/services/carts.ts +739 -104
  37. package/src/services/channels.ts +147 -19
  38. package/src/services/customers.ts +801 -69
  39. package/src/services/greetings.ts +18 -18
  40. package/src/services/inventories.ts +620 -65
  41. package/src/services/locale.ts +16 -16
  42. package/src/services/markets.ts +373 -75
  43. package/src/services/messaging.ts +273 -273
  44. package/src/services/orders.ts +692 -137
  45. package/src/services/pages.ts +377 -157
  46. package/src/services/payments.ts +591 -64
  47. package/src/services/prices.ts +524 -59
  48. package/src/services/products.ts +1836 -272
  49. package/src/services/search.ts +24 -24
  50. package/src/services/shipping.ts +444 -59
  51. package/src/services/sites.ts +116 -116
  52. package/src/services/storage.ts +72 -72
  53. package/src/services/tokens.ts +14 -14
  54. package/types/enums/address-type.d.ts +4 -0
  55. package/types/enums/cart-export-format.d.ts +4 -0
  56. package/types/enums/cart-io-apply-mode.d.ts +5 -0
  57. package/types/enums/cart-io-direction.d.ts +4 -0
  58. package/types/enums/cart-io-entity.d.ts +4 -0
  59. package/types/enums/cart-io-format.d.ts +4 -0
  60. package/types/enums/cart-item-type.d.ts +5 -0
  61. package/types/enums/channel-status.d.ts +4 -0
  62. package/types/enums/channel-type.d.ts +7 -0
  63. package/types/enums/contact-role.d.ts +6 -0
  64. package/types/enums/contact-status.d.ts +5 -0
  65. package/types/enums/location-type.d.ts +6 -0
  66. package/types/enums/market-status.d.ts +4 -0
  67. package/types/enums/order-comment-visibility.d.ts +4 -0
  68. package/types/enums/order-item-type.d.ts +5 -0
  69. package/types/enums/order-payment-status.d.ts +9 -0
  70. package/types/enums/organization-status.d.ts +4 -0
  71. package/types/enums/page-status.d.ts +5 -0
  72. package/types/enums/payment-fee-type.d.ts +5 -0
  73. package/types/enums/payment-method-kind.d.ts +4 -0
  74. package/types/enums/price-entry-type.d.ts +4 -0
  75. package/types/enums/price-list-status.d.ts +4 -0
  76. package/types/enums/shipping-method-matrix-basis.d.ts +6 -0
  77. package/types/enums/shipping-method-pricing-type.d.ts +5 -0
  78. package/types/index.d.ts +24 -0
  79. package/types/models.d.ts +4214 -970
  80. package/types/services/carts.d.ts +271 -12
  81. package/types/services/channels.d.ts +54 -2
  82. package/types/services/customers.d.ts +295 -12
  83. package/types/services/inventories.d.ts +225 -11
  84. package/types/services/markets.d.ts +123 -6
  85. package/types/services/orders.d.ts +238 -16
  86. package/types/services/pages.d.ts +95 -6
  87. package/types/services/payments.d.ts +221 -7
  88. package/types/services/prices.d.ts +198 -6
  89. package/types/services/products.d.ts +646 -32
  90. package/types/services/shipping.d.ts +165 -6
@@ -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;
@@ -18,7 +19,7 @@ export class Pages {
18
19
  pagesDeliveryPage(): Promise<Models.DeliveryPage> {
19
20
 
20
21
  const apiPath = '/v1/pages/delivery/page';
21
- const payload: Payload = {};
22
+ const apiPayload: Payload = {};
22
23
  const uri = new URL(this.client.config.endpoint + apiPath);
23
24
 
24
25
  const apiHeaders: { [header: string]: string } = {
@@ -28,7 +29,7 @@ export class Pages {
28
29
  'get',
29
30
  uri,
30
31
  apiHeaders,
31
- payload
32
+ apiPayload
32
33
  );
33
34
  }
34
35
 
@@ -40,7 +41,7 @@ export class Pages {
40
41
  pagesDeliveryPages(): Promise<{}> {
41
42
 
42
43
  const apiPath = '/v1/pages/delivery/pages';
43
- const payload: Payload = {};
44
+ const apiPayload: Payload = {};
44
45
  const uri = new URL(this.client.config.endpoint + apiPath);
45
46
 
46
47
  const apiHeaders: { [header: string]: string } = {
@@ -50,7 +51,7 @@ export class Pages {
50
51
  'get',
51
52
  uri,
52
53
  apiHeaders,
53
- payload
54
+ apiPayload
54
55
  );
55
56
  }
56
57
 
@@ -89,7 +90,7 @@ export class Pages {
89
90
  }
90
91
 
91
92
  const apiPath = '/v1/pages/delivery/preview/{token}'.replace('{token}', token);
92
- const payload: Payload = {};
93
+ const apiPayload: Payload = {};
93
94
  const uri = new URL(this.client.config.endpoint + apiPath);
94
95
 
95
96
  const apiHeaders: { [header: string]: string } = {
@@ -99,7 +100,7 @@ export class Pages {
99
100
  'get',
100
101
  uri,
101
102
  apiHeaders,
102
- payload
103
+ apiPayload
103
104
  );
104
105
  }
105
106
 
@@ -111,7 +112,7 @@ export class Pages {
111
112
  pagesEditorEditStates(): Promise<{}> {
112
113
 
113
114
  const apiPath = '/v1/pages/editor/edit-states';
114
- const payload: Payload = {};
115
+ const apiPayload: Payload = {};
115
116
  const uri = new URL(this.client.config.endpoint + apiPath);
116
117
 
117
118
  const apiHeaders: { [header: string]: string } = {
@@ -121,7 +122,7 @@ export class Pages {
121
122
  'get',
122
123
  uri,
123
124
  apiHeaders,
124
- payload
125
+ apiPayload
125
126
  );
126
127
  }
127
128
 
@@ -133,7 +134,7 @@ export class Pages {
133
134
  pagesEditorNotificationsList(): Promise<{}> {
134
135
 
135
136
  const apiPath = '/v1/pages/editor/notifications';
136
- const payload: Payload = {};
137
+ const apiPayload: Payload = {};
137
138
  const uri = new URL(this.client.config.endpoint + apiPath);
138
139
 
139
140
  const apiHeaders: { [header: string]: string } = {
@@ -143,7 +144,7 @@ export class Pages {
143
144
  'get',
144
145
  uri,
145
146
  apiHeaders,
146
- payload
147
+ apiPayload
147
148
  );
148
149
  }
149
150
 
@@ -155,7 +156,7 @@ export class Pages {
155
156
  pagesEditorNotificationsMarkAllRead(): Promise<{}> {
156
157
 
157
158
  const apiPath = '/v1/pages/editor/notifications/mark-all-read';
158
- const payload: Payload = {};
159
+ const apiPayload: Payload = {};
159
160
  const uri = new URL(this.client.config.endpoint + apiPath);
160
161
 
161
162
  const apiHeaders: { [header: string]: string } = {
@@ -165,7 +166,7 @@ export class Pages {
165
166
  'post',
166
167
  uri,
167
168
  apiHeaders,
168
- payload
169
+ apiPayload
169
170
  );
170
171
  }
171
172
 
@@ -177,7 +178,7 @@ export class Pages {
177
178
  pagesEditorNotificationsUnreadCount(): Promise<{}> {
178
179
 
179
180
  const apiPath = '/v1/pages/editor/notifications/unread-count';
180
- const payload: Payload = {};
181
+ const apiPayload: Payload = {};
181
182
  const uri = new URL(this.client.config.endpoint + apiPath);
182
183
 
183
184
  const apiHeaders: { [header: string]: string } = {
@@ -187,7 +188,7 @@ export class Pages {
187
188
  'get',
188
189
  uri,
189
190
  apiHeaders,
190
- payload
191
+ apiPayload
191
192
  );
192
193
  }
193
194
 
@@ -223,9 +224,9 @@ export class Pages {
223
224
 
224
225
 
225
226
  const apiPath = '/v1/pages/editor/translate';
226
- const payload: Payload = {};
227
+ const apiPayload: Payload = {};
227
228
  if (typeof items !== 'undefined') {
228
- payload['items'] = items;
229
+ apiPayload['items'] = items;
229
230
  }
230
231
  const uri = new URL(this.client.config.endpoint + apiPath);
231
232
 
@@ -237,7 +238,7 @@ export class Pages {
237
238
  'post',
238
239
  uri,
239
240
  apiHeaders,
240
- payload
241
+ apiPayload
241
242
  );
242
243
  }
243
244
 
@@ -249,7 +250,7 @@ export class Pages {
249
250
  pagesEditorUserSettingsGet(): Promise<{}> {
250
251
 
251
252
  const apiPath = '/v1/pages/editor/user-settings';
252
- const payload: Payload = {};
253
+ const apiPayload: Payload = {};
253
254
  const uri = new URL(this.client.config.endpoint + apiPath);
254
255
 
255
256
  const apiHeaders: { [header: string]: string } = {
@@ -259,7 +260,7 @@ export class Pages {
259
260
  'get',
260
261
  uri,
261
262
  apiHeaders,
262
- payload
263
+ apiPayload
263
264
  );
264
265
  }
265
266
 
@@ -295,9 +296,9 @@ export class Pages {
295
296
 
296
297
 
297
298
  const apiPath = '/v1/pages/editor/user-settings';
298
- const payload: Payload = {};
299
+ const apiPayload: Payload = {};
299
300
  if (typeof settings !== 'undefined') {
300
- payload['settings'] = settings;
301
+ apiPayload['settings'] = settings;
301
302
  }
302
303
  const uri = new URL(this.client.config.endpoint + apiPath);
303
304
 
@@ -309,7 +310,7 @@ export class Pages {
309
310
  'put',
310
311
  uri,
311
312
  apiHeaders,
312
- payload
313
+ apiPayload
313
314
  );
314
315
  }
315
316
 
@@ -321,7 +322,7 @@ export class Pages {
321
322
  pagesEditorUsers(): Promise<{}> {
322
323
 
323
324
  const apiPath = '/v1/pages/editor/users';
324
- const payload: Payload = {};
325
+ const apiPayload: Payload = {};
325
326
  const uri = new URL(this.client.config.endpoint + apiPath);
326
327
 
327
328
  const apiHeaders: { [header: string]: string } = {
@@ -331,7 +332,7 @@ export class Pages {
331
332
  'get',
332
333
  uri,
333
334
  apiHeaders,
334
- payload
335
+ apiPayload
335
336
  );
336
337
  }
337
338
 
@@ -369,8 +370,8 @@ export class Pages {
369
370
  throw new RevenexxException('Missing required parameter: "pageId"');
370
371
  }
371
372
 
372
- const apiPath = '/v1/pages/editor/{page_id}/comments'.replace('{pageId}', pageId);
373
- const payload: Payload = {};
373
+ const apiPath = '/v1/pages/editor/{page_id}/comments'.replace('{page_id}', pageId);
374
+ const apiPayload: Payload = {};
374
375
  const uri = new URL(this.client.config.endpoint + apiPath);
375
376
 
376
377
  const apiHeaders: { [header: string]: string } = {
@@ -380,7 +381,7 @@ export class Pages {
380
381
  'get',
381
382
  uri,
382
383
  apiHeaders,
383
- payload
384
+ apiPayload
384
385
  );
385
386
  }
386
387
 
@@ -434,16 +435,16 @@ export class Pages {
434
435
  throw new RevenexxException('Missing required parameter: "body"');
435
436
  }
436
437
 
437
- const apiPath = '/v1/pages/editor/{page_id}/comments'.replace('{pageId}', pageId);
438
- const payload: Payload = {};
438
+ const apiPath = '/v1/pages/editor/{page_id}/comments'.replace('{page_id}', pageId);
439
+ const apiPayload: Payload = {};
439
440
  if (typeof blockUuids !== 'undefined') {
440
- payload['blockUuids'] = blockUuids;
441
+ apiPayload['blockUuids'] = blockUuids;
441
442
  }
442
443
  if (typeof body !== 'undefined') {
443
- payload['body'] = body;
444
+ apiPayload['body'] = body;
444
445
  }
445
446
  if (typeof parentUuid !== 'undefined') {
446
- payload['parentUuid'] = parentUuid;
447
+ apiPayload['parentUuid'] = parentUuid;
447
448
  }
448
449
  const uri = new URL(this.client.config.endpoint + apiPath);
449
450
 
@@ -455,7 +456,7 @@ export class Pages {
455
456
  'post',
456
457
  uri,
457
458
  apiHeaders,
458
- payload
459
+ apiPayload
459
460
  );
460
461
  }
461
462
 
@@ -501,8 +502,8 @@ export class Pages {
501
502
  throw new RevenexxException('Missing required parameter: "uuid"');
502
503
  }
503
504
 
504
- const apiPath = '/v1/pages/editor/{page_id}/comments/{uuid}'.replace('{pageId}', pageId).replace('{uuid}', uuid);
505
- const payload: Payload = {};
505
+ const apiPath = '/v1/pages/editor/{page_id}/comments/{uuid}'.replace('{page_id}', pageId).replace('{uuid}', uuid);
506
+ const apiPayload: Payload = {};
506
507
  const uri = new URL(this.client.config.endpoint + apiPath);
507
508
 
508
509
  const apiHeaders: { [header: string]: string } = {
@@ -512,7 +513,7 @@ export class Pages {
512
513
  'delete',
513
514
  uri,
514
515
  apiHeaders,
515
- payload
516
+ apiPayload
516
517
  );
517
518
  }
518
519
 
@@ -565,10 +566,10 @@ export class Pages {
565
566
  throw new RevenexxException('Missing required parameter: "body"');
566
567
  }
567
568
 
568
- const apiPath = '/v1/pages/editor/{page_id}/comments/{uuid}'.replace('{pageId}', pageId).replace('{uuid}', uuid);
569
- const payload: Payload = {};
569
+ const apiPath = '/v1/pages/editor/{page_id}/comments/{uuid}'.replace('{page_id}', pageId).replace('{uuid}', uuid);
570
+ const apiPayload: Payload = {};
570
571
  if (typeof body !== 'undefined') {
571
- payload['body'] = body;
572
+ apiPayload['body'] = body;
572
573
  }
573
574
  const uri = new URL(this.client.config.endpoint + apiPath);
574
575
 
@@ -580,7 +581,7 @@ export class Pages {
580
581
  'put',
581
582
  uri,
582
583
  apiHeaders,
583
- payload
584
+ apiPayload
584
585
  );
585
586
  }
586
587
 
@@ -626,8 +627,8 @@ export class Pages {
626
627
  throw new RevenexxException('Missing required parameter: "uuid"');
627
628
  }
628
629
 
629
- const apiPath = '/v1/pages/editor/{page_id}/comments/{uuid}/resolve'.replace('{pageId}', pageId).replace('{uuid}', uuid);
630
- const payload: Payload = {};
630
+ const apiPath = '/v1/pages/editor/{page_id}/comments/{uuid}/resolve'.replace('{page_id}', pageId).replace('{uuid}', uuid);
631
+ const apiPayload: Payload = {};
631
632
  const uri = new URL(this.client.config.endpoint + apiPath);
632
633
 
633
634
  const apiHeaders: { [header: string]: string } = {
@@ -637,7 +638,7 @@ export class Pages {
637
638
  'post',
638
639
  uri,
639
640
  apiHeaders,
640
- payload
641
+ apiPayload
641
642
  );
642
643
  }
643
644
 
@@ -690,10 +691,10 @@ export class Pages {
690
691
  throw new RevenexxException('Missing required parameter: "taskIndex"');
691
692
  }
692
693
 
693
- const apiPath = '/v1/pages/editor/{page_id}/comments/{uuid}/toggle-task'.replace('{pageId}', pageId).replace('{uuid}', uuid);
694
- const payload: Payload = {};
694
+ const apiPath = '/v1/pages/editor/{page_id}/comments/{uuid}/toggle-task'.replace('{page_id}', pageId).replace('{uuid}', uuid);
695
+ const apiPayload: Payload = {};
695
696
  if (typeof taskIndex !== 'undefined') {
696
- payload['taskIndex'] = taskIndex;
697
+ apiPayload['taskIndex'] = taskIndex;
697
698
  }
698
699
  const uri = new URL(this.client.config.endpoint + apiPath);
699
700
 
@@ -705,7 +706,7 @@ export class Pages {
705
706
  'post',
706
707
  uri,
707
708
  apiHeaders,
708
- payload
709
+ apiPayload
709
710
  );
710
711
  }
711
712
 
@@ -751,8 +752,8 @@ export class Pages {
751
752
  throw new RevenexxException('Missing required parameter: "uuid"');
752
753
  }
753
754
 
754
- const apiPath = '/v1/pages/editor/{page_id}/comments/{uuid}/unresolve'.replace('{pageId}', pageId).replace('{uuid}', uuid);
755
- const payload: Payload = {};
755
+ const apiPath = '/v1/pages/editor/{page_id}/comments/{uuid}/unresolve'.replace('{page_id}', pageId).replace('{uuid}', uuid);
756
+ const apiPayload: Payload = {};
756
757
  const uri = new URL(this.client.config.endpoint + apiPath);
757
758
 
758
759
  const apiHeaders: { [header: string]: string } = {
@@ -762,7 +763,7 @@ export class Pages {
762
763
  'post',
763
764
  uri,
764
765
  apiHeaders,
765
- payload
766
+ apiPayload
766
767
  );
767
768
  }
768
769
 
@@ -812,13 +813,13 @@ export class Pages {
812
813
  throw new RevenexxException('Missing required parameter: "index"');
813
814
  }
814
815
 
815
- const apiPath = '/v1/pages/editor/{page_id}/history'.replace('{pageId}', pageId);
816
- const payload: Payload = {};
816
+ const apiPath = '/v1/pages/editor/{page_id}/history'.replace('{page_id}', pageId);
817
+ const apiPayload: Payload = {};
817
818
  if (typeof index !== 'undefined') {
818
- payload['index'] = index;
819
+ apiPayload['index'] = index;
819
820
  }
820
821
  if (typeof langcode !== 'undefined') {
821
- payload['langcode'] = langcode;
822
+ apiPayload['langcode'] = langcode;
822
823
  }
823
824
  const uri = new URL(this.client.config.endpoint + apiPath);
824
825
 
@@ -830,7 +831,7 @@ export class Pages {
830
831
  'post',
831
832
  uri,
832
833
  apiHeaders,
833
- payload
834
+ apiPayload
834
835
  );
835
836
  }
836
837
 
@@ -868,8 +869,8 @@ export class Pages {
868
869
  throw new RevenexxException('Missing required parameter: "pageId"');
869
870
  }
870
871
 
871
- const apiPath = '/v1/pages/editor/{page_id}/last-changed'.replace('{pageId}', pageId);
872
- const payload: Payload = {};
872
+ const apiPath = '/v1/pages/editor/{page_id}/last-changed'.replace('{page_id}', pageId);
873
+ const apiPayload: Payload = {};
873
874
  const uri = new URL(this.client.config.endpoint + apiPath);
874
875
 
875
876
  const apiHeaders: { [header: string]: string } = {
@@ -879,7 +880,7 @@ export class Pages {
879
880
  'get',
880
881
  uri,
881
882
  apiHeaders,
882
- payload
883
+ apiPayload
883
884
  );
884
885
  }
885
886
 
@@ -936,16 +937,16 @@ export class Pages {
936
937
  throw new RevenexxException('Missing required parameter: "index"');
937
938
  }
938
939
 
939
- const apiPath = '/v1/pages/editor/{page_id}/mutation-status'.replace('{pageId}', pageId);
940
- const payload: Payload = {};
940
+ const apiPath = '/v1/pages/editor/{page_id}/mutation-status'.replace('{page_id}', pageId);
941
+ const apiPayload: Payload = {};
941
942
  if (typeof enabled !== 'undefined') {
942
- payload['enabled'] = enabled;
943
+ apiPayload['enabled'] = enabled;
943
944
  }
944
945
  if (typeof index !== 'undefined') {
945
- payload['index'] = index;
946
+ apiPayload['index'] = index;
946
947
  }
947
948
  if (typeof langcode !== 'undefined') {
948
- payload['langcode'] = langcode;
949
+ apiPayload['langcode'] = langcode;
949
950
  }
950
951
  const uri = new URL(this.client.config.endpoint + apiPath);
951
952
 
@@ -957,46 +958,71 @@ export class Pages {
957
958
  'post',
958
959
  uri,
959
960
  apiHeaders,
960
- payload
961
+ apiPayload
961
962
  );
962
963
  }
963
964
 
964
965
  /**
965
966
  *
966
967
  * @param {string} params.pageId -
968
+ * @param {string} params.plugin - Mutation plugin id (add, move, delete, duplicate, update_field_value, ...).
969
+ * @param {string} params.langcode -
970
+ * @param {object} params.payload -
967
971
  * @throws {RevenexxException}
968
972
  * @returns {Promise<Models.MutationResponse>}
969
973
  */
970
- pagesEditorMutate(params: { pageId: string }): Promise<Models.MutationResponse>;
974
+ pagesEditorMutate(params: { pageId: string, plugin: string, langcode?: string, payload?: object }): Promise<Models.MutationResponse>;
971
975
  /**
972
976
  *
973
977
  * @param {string} pageId -
978
+ * @param {string} plugin - Mutation plugin id (add, move, delete, duplicate, update_field_value, ...).
979
+ * @param {string} langcode -
980
+ * @param {object} payload -
974
981
  * @throws {RevenexxException}
975
982
  * @returns {Promise<Models.MutationResponse>}
976
983
  * @deprecated Use the object parameter style method for a better developer experience.
977
984
  */
978
- pagesEditorMutate(pageId: string): Promise<Models.MutationResponse>;
985
+ pagesEditorMutate(pageId: string, plugin: string, langcode?: string, payload?: object): Promise<Models.MutationResponse>;
979
986
  pagesEditorMutate(
980
- paramsOrFirst: { pageId: string } | string
987
+ paramsOrFirst: { pageId: string, plugin: string, langcode?: string, payload?: object } | string,
988
+ ...rest: [(string)?, (string)?, (object)?]
981
989
  ): Promise<Models.MutationResponse> {
982
- let params: { pageId: string };
990
+ let params: { pageId: string, plugin: string, langcode?: string, payload?: object };
983
991
 
984
992
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
985
- params = (paramsOrFirst || {}) as { pageId: string };
993
+ params = (paramsOrFirst || {}) as { pageId: string, plugin: string, langcode?: string, payload?: object };
986
994
  } else {
987
995
  params = {
988
- pageId: paramsOrFirst as string
996
+ pageId: paramsOrFirst as string,
997
+ plugin: rest[0] as string,
998
+ langcode: rest[1] as string,
999
+ payload: rest[2] as object
989
1000
  };
990
1001
  }
991
1002
 
992
1003
  const pageId = params.pageId;
1004
+ const plugin = params.plugin;
1005
+ const langcode = params.langcode;
1006
+ const payload = params.payload;
993
1007
 
994
1008
  if (typeof pageId === 'undefined') {
995
1009
  throw new RevenexxException('Missing required parameter: "pageId"');
996
1010
  }
1011
+ if (typeof plugin === 'undefined') {
1012
+ throw new RevenexxException('Missing required parameter: "plugin"');
1013
+ }
997
1014
 
998
- const apiPath = '/v1/pages/editor/{page_id}/mutations'.replace('{pageId}', pageId);
999
- const payload: Payload = {};
1015
+ const apiPath = '/v1/pages/editor/{page_id}/mutations'.replace('{page_id}', pageId);
1016
+ const apiPayload: Payload = {};
1017
+ if (typeof langcode !== 'undefined') {
1018
+ apiPayload['langcode'] = langcode;
1019
+ }
1020
+ if (typeof payload !== 'undefined') {
1021
+ apiPayload['payload'] = payload;
1022
+ }
1023
+ if (typeof plugin !== 'undefined') {
1024
+ apiPayload['plugin'] = plugin;
1025
+ }
1000
1026
  const uri = new URL(this.client.config.endpoint + apiPath);
1001
1027
 
1002
1028
  const apiHeaders: { [header: string]: string } = {
@@ -1007,7 +1033,7 @@ export class Pages {
1007
1033
  'post',
1008
1034
  uri,
1009
1035
  apiHeaders,
1010
- payload
1036
+ apiPayload
1011
1037
  );
1012
1038
  }
1013
1039
 
@@ -1050,10 +1076,10 @@ export class Pages {
1050
1076
  throw new RevenexxException('Missing required parameter: "pageId"');
1051
1077
  }
1052
1078
 
1053
- const apiPath = '/v1/pages/editor/{page_id}/preview-grant'.replace('{pageId}', pageId);
1054
- const payload: Payload = {};
1079
+ const apiPath = '/v1/pages/editor/{page_id}/preview-grant'.replace('{page_id}', pageId);
1080
+ const apiPayload: Payload = {};
1055
1081
  if (typeof ttlHours !== 'undefined') {
1056
- payload['ttlHours'] = ttlHours;
1082
+ apiPayload['ttlHours'] = ttlHours;
1057
1083
  }
1058
1084
  const uri = new URL(this.client.config.endpoint + apiPath);
1059
1085
 
@@ -1065,7 +1091,7 @@ export class Pages {
1065
1091
  'post',
1066
1092
  uri,
1067
1093
  apiHeaders,
1068
- payload
1094
+ apiPayload
1069
1095
  );
1070
1096
  }
1071
1097
 
@@ -1112,13 +1138,13 @@ export class Pages {
1112
1138
  throw new RevenexxException('Missing required parameter: "pageId"');
1113
1139
  }
1114
1140
 
1115
- const apiPath = '/v1/pages/editor/{page_id}/publish'.replace('{pageId}', pageId);
1116
- const payload: Payload = {};
1141
+ const apiPath = '/v1/pages/editor/{page_id}/publish'.replace('{page_id}', pageId);
1142
+ const apiPayload: Payload = {};
1117
1143
  if (typeof force !== 'undefined') {
1118
- payload['force'] = force;
1144
+ apiPayload['force'] = force;
1119
1145
  }
1120
1146
  if (typeof label !== 'undefined') {
1121
- payload['label'] = label;
1147
+ apiPayload['label'] = label;
1122
1148
  }
1123
1149
  const uri = new URL(this.client.config.endpoint + apiPath);
1124
1150
 
@@ -1130,7 +1156,7 @@ export class Pages {
1130
1156
  'post',
1131
1157
  uri,
1132
1158
  apiHeaders,
1133
- payload
1159
+ apiPayload
1134
1160
  );
1135
1161
  }
1136
1162
 
@@ -1168,8 +1194,8 @@ export class Pages {
1168
1194
  throw new RevenexxException('Missing required parameter: "pageId"');
1169
1195
  }
1170
1196
 
1171
- const apiPath = '/v1/pages/editor/{page_id}/revert'.replace('{pageId}', pageId);
1172
- const payload: Payload = {};
1197
+ const apiPath = '/v1/pages/editor/{page_id}/revert'.replace('{page_id}', pageId);
1198
+ const apiPayload: Payload = {};
1173
1199
  const uri = new URL(this.client.config.endpoint + apiPath);
1174
1200
 
1175
1201
  const apiHeaders: { [header: string]: string } = {
@@ -1179,7 +1205,7 @@ export class Pages {
1179
1205
  'post',
1180
1206
  uri,
1181
1207
  apiHeaders,
1182
- payload
1208
+ apiPayload
1183
1209
  );
1184
1210
  }
1185
1211
 
@@ -1225,10 +1251,10 @@ export class Pages {
1225
1251
  throw new RevenexxException('Missing required parameter: "scheduledAt"');
1226
1252
  }
1227
1253
 
1228
- const apiPath = '/v1/pages/editor/{page_id}/schedule'.replace('{pageId}', pageId);
1229
- const payload: Payload = {};
1254
+ const apiPath = '/v1/pages/editor/{page_id}/schedule'.replace('{page_id}', pageId);
1255
+ const apiPayload: Payload = {};
1230
1256
  if (typeof scheduledAt !== 'undefined') {
1231
- payload['scheduledAt'] = scheduledAt;
1257
+ apiPayload['scheduledAt'] = scheduledAt;
1232
1258
  }
1233
1259
  const uri = new URL(this.client.config.endpoint + apiPath);
1234
1260
 
@@ -1240,7 +1266,7 @@ export class Pages {
1240
1266
  'post',
1241
1267
  uri,
1242
1268
  apiHeaders,
1243
- payload
1269
+ apiPayload
1244
1270
  );
1245
1271
  }
1246
1272
 
@@ -1278,8 +1304,8 @@ export class Pages {
1278
1304
  throw new RevenexxException('Missing required parameter: "pageId"');
1279
1305
  }
1280
1306
 
1281
- const apiPath = '/v1/pages/editor/{page_id}/state'.replace('{pageId}', pageId);
1282
- const payload: Payload = {};
1307
+ const apiPath = '/v1/pages/editor/{page_id}/state'.replace('{page_id}', pageId);
1308
+ const apiPayload: Payload = {};
1283
1309
  const uri = new URL(this.client.config.endpoint + apiPath);
1284
1310
 
1285
1311
  const apiHeaders: { [header: string]: string } = {
@@ -1289,7 +1315,7 @@ export class Pages {
1289
1315
  'get',
1290
1316
  uri,
1291
1317
  apiHeaders,
1292
- payload
1318
+ apiPayload
1293
1319
  );
1294
1320
  }
1295
1321
 
@@ -1327,8 +1353,8 @@ export class Pages {
1327
1353
  throw new RevenexxException('Missing required parameter: "pageId"');
1328
1354
  }
1329
1355
 
1330
- const apiPath = '/v1/pages/editor/{page_id}/take-ownership'.replace('{pageId}', pageId);
1331
- const payload: Payload = {};
1356
+ const apiPath = '/v1/pages/editor/{page_id}/take-ownership'.replace('{page_id}', pageId);
1357
+ const apiPayload: Payload = {};
1332
1358
  const uri = new URL(this.client.config.endpoint + apiPath);
1333
1359
 
1334
1360
  const apiHeaders: { [header: string]: string } = {
@@ -1338,7 +1364,7 @@ export class Pages {
1338
1364
  'post',
1339
1365
  uri,
1340
1366
  apiHeaders,
1341
- payload
1367
+ apiPayload
1342
1368
  );
1343
1369
  }
1344
1370
 
@@ -1407,25 +1433,25 @@ export class Pages {
1407
1433
  throw new RevenexxException('Missing required parameter: "uuids"');
1408
1434
  }
1409
1435
 
1410
- const apiPath = '/v1/pages/editor/{page_id}/templates'.replace('{pageId}', pageId);
1411
- const payload: Payload = {};
1436
+ const apiPath = '/v1/pages/editor/{page_id}/templates'.replace('{page_id}', pageId);
1437
+ const apiPayload: Payload = {};
1412
1438
  if (typeof description !== 'undefined') {
1413
- payload['description'] = description;
1439
+ apiPayload['description'] = description;
1414
1440
  }
1415
1441
  if (typeof fieldName !== 'undefined') {
1416
- payload['fieldName'] = fieldName;
1442
+ apiPayload['fieldName'] = fieldName;
1417
1443
  }
1418
1444
  if (typeof isDefault !== 'undefined') {
1419
- payload['isDefault'] = isDefault;
1445
+ apiPayload['isDefault'] = isDefault;
1420
1446
  }
1421
1447
  if (typeof label !== 'undefined') {
1422
- payload['label'] = label;
1448
+ apiPayload['label'] = label;
1423
1449
  }
1424
1450
  if (typeof pageBundle !== 'undefined') {
1425
- payload['pageBundle'] = pageBundle;
1451
+ apiPayload['pageBundle'] = pageBundle;
1426
1452
  }
1427
1453
  if (typeof uuids !== 'undefined') {
1428
- payload['uuids'] = uuids;
1454
+ apiPayload['uuids'] = uuids;
1429
1455
  }
1430
1456
  const uri = new URL(this.client.config.endpoint + apiPath);
1431
1457
 
@@ -1437,7 +1463,7 @@ export class Pages {
1437
1463
  'post',
1438
1464
  uri,
1439
1465
  apiHeaders,
1440
- payload
1466
+ apiPayload
1441
1467
  );
1442
1468
  }
1443
1469
 
@@ -1475,8 +1501,8 @@ export class Pages {
1475
1501
  throw new RevenexxException('Missing required parameter: "pageId"');
1476
1502
  }
1477
1503
 
1478
- const apiPath = '/v1/pages/editor/{page_id}/unschedule'.replace('{pageId}', pageId);
1479
- const payload: Payload = {};
1504
+ const apiPath = '/v1/pages/editor/{page_id}/unschedule'.replace('{page_id}', pageId);
1505
+ const apiPayload: Payload = {};
1480
1506
  const uri = new URL(this.client.config.endpoint + apiPath);
1481
1507
 
1482
1508
  const apiHeaders: { [header: string]: string } = {
@@ -1486,7 +1512,7 @@ export class Pages {
1486
1512
  'post',
1487
1513
  uri,
1488
1514
  apiHeaders,
1489
- payload
1515
+ apiPayload
1490
1516
  );
1491
1517
  }
1492
1518
 
@@ -1498,7 +1524,7 @@ export class Pages {
1498
1524
  pagesLibraryList(): Promise<{}> {
1499
1525
 
1500
1526
  const apiPath = '/v1/pages/library';
1501
- const payload: Payload = {};
1527
+ const apiPayload: Payload = {};
1502
1528
  const uri = new URL(this.client.config.endpoint + apiPath);
1503
1529
 
1504
1530
  const apiHeaders: { [header: string]: string } = {
@@ -1508,7 +1534,7 @@ export class Pages {
1508
1534
  'get',
1509
1535
  uri,
1510
1536
  apiHeaders,
1511
- payload
1537
+ apiPayload
1512
1538
  );
1513
1539
  }
1514
1540
 
@@ -1547,7 +1573,7 @@ export class Pages {
1547
1573
  }
1548
1574
 
1549
1575
  const apiPath = '/v1/pages/library/{id}'.replace('{id}', id);
1550
- const payload: Payload = {};
1576
+ const apiPayload: Payload = {};
1551
1577
  const uri = new URL(this.client.config.endpoint + apiPath);
1552
1578
 
1553
1579
  const apiHeaders: { [header: string]: string } = {
@@ -1557,7 +1583,7 @@ export class Pages {
1557
1583
  'delete',
1558
1584
  uri,
1559
1585
  apiHeaders,
1560
- payload
1586
+ apiPayload
1561
1587
  );
1562
1588
  }
1563
1589
 
@@ -1596,7 +1622,7 @@ export class Pages {
1596
1622
  }
1597
1623
 
1598
1624
  const apiPath = '/v1/pages/library/{id}'.replace('{id}', id);
1599
- const payload: Payload = {};
1625
+ const apiPayload: Payload = {};
1600
1626
  const uri = new URL(this.client.config.endpoint + apiPath);
1601
1627
 
1602
1628
  const apiHeaders: { [header: string]: string } = {
@@ -1606,46 +1632,68 @@ export class Pages {
1606
1632
  'get',
1607
1633
  uri,
1608
1634
  apiHeaders,
1609
- payload
1635
+ apiPayload
1610
1636
  );
1611
1637
  }
1612
1638
 
1613
1639
  /**
1614
1640
  *
1615
1641
  * @param {string} params.id -
1642
+ * @param {string} params.bundle -
1643
+ * @param {string} params.label -
1644
+ * @param {object} params.tree - Serialized block tree ({ bundle, props, props_i18n, options, children }).
1616
1645
  * @throws {RevenexxException}
1617
1646
  * @returns {Promise<Models.LibraryItem>}
1618
1647
  */
1619
- pagesLibraryUpdate(params: { id: string }): Promise<Models.LibraryItem>;
1648
+ pagesLibraryUpdate(params: { id: string, bundle?: string, label?: string, tree?: object }): Promise<Models.LibraryItem>;
1620
1649
  /**
1621
1650
  *
1622
1651
  * @param {string} id -
1652
+ * @param {string} bundle -
1653
+ * @param {string} label -
1654
+ * @param {object} tree - Serialized block tree ({ bundle, props, props_i18n, options, children }).
1623
1655
  * @throws {RevenexxException}
1624
1656
  * @returns {Promise<Models.LibraryItem>}
1625
1657
  * @deprecated Use the object parameter style method for a better developer experience.
1626
1658
  */
1627
- pagesLibraryUpdate(id: string): Promise<Models.LibraryItem>;
1659
+ pagesLibraryUpdate(id: string, bundle?: string, label?: string, tree?: object): Promise<Models.LibraryItem>;
1628
1660
  pagesLibraryUpdate(
1629
- paramsOrFirst: { id: string } | string
1661
+ paramsOrFirst: { id: string, bundle?: string, label?: string, tree?: object } | string,
1662
+ ...rest: [(string)?, (string)?, (object)?]
1630
1663
  ): Promise<Models.LibraryItem> {
1631
- let params: { id: string };
1664
+ let params: { id: string, bundle?: string, label?: string, tree?: object };
1632
1665
 
1633
1666
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1634
- params = (paramsOrFirst || {}) as { id: string };
1667
+ params = (paramsOrFirst || {}) as { id: string, bundle?: string, label?: string, tree?: object };
1635
1668
  } else {
1636
1669
  params = {
1637
- id: paramsOrFirst as string
1670
+ id: paramsOrFirst as string,
1671
+ bundle: rest[0] as string,
1672
+ label: rest[1] as string,
1673
+ tree: rest[2] as object
1638
1674
  };
1639
1675
  }
1640
1676
 
1641
1677
  const id = params.id;
1678
+ const bundle = params.bundle;
1679
+ const label = params.label;
1680
+ const tree = params.tree;
1642
1681
 
1643
1682
  if (typeof id === 'undefined') {
1644
1683
  throw new RevenexxException('Missing required parameter: "id"');
1645
1684
  }
1646
1685
 
1647
1686
  const apiPath = '/v1/pages/library/{id}'.replace('{id}', id);
1648
- const payload: Payload = {};
1687
+ const apiPayload: Payload = {};
1688
+ if (typeof bundle !== 'undefined') {
1689
+ apiPayload['bundle'] = bundle;
1690
+ }
1691
+ if (typeof label !== 'undefined') {
1692
+ apiPayload['label'] = label;
1693
+ }
1694
+ if (typeof tree !== 'undefined') {
1695
+ apiPayload['tree'] = tree;
1696
+ }
1649
1697
  const uri = new URL(this.client.config.endpoint + apiPath);
1650
1698
 
1651
1699
  const apiHeaders: { [header: string]: string } = {
@@ -1656,7 +1704,7 @@ export class Pages {
1656
1704
  'put',
1657
1705
  uri,
1658
1706
  apiHeaders,
1659
- payload
1707
+ apiPayload
1660
1708
  );
1661
1709
  }
1662
1710
 
@@ -1668,7 +1716,7 @@ export class Pages {
1668
1716
  pagesPagesList(): Promise<{}> {
1669
1717
 
1670
1718
  const apiPath = '/v1/pages/pages';
1671
- const payload: Payload = {};
1719
+ const apiPayload: Payload = {};
1672
1720
  const uri = new URL(this.client.config.endpoint + apiPath);
1673
1721
 
1674
1722
  const apiHeaders: { [header: string]: string } = {
@@ -1678,19 +1726,85 @@ export class Pages {
1678
1726
  'get',
1679
1727
  uri,
1680
1728
  apiHeaders,
1681
- payload
1729
+ apiPayload
1682
1730
  );
1683
1731
  }
1684
1732
 
1685
1733
  /**
1686
1734
  *
1735
+ * @param {string} params.title -
1736
+ * @param {string} params.bundle -
1737
+ * @param {object} params.hostOptions -
1738
+ * @param {object} params.meta -
1739
+ * @param {string} params.slug -
1740
+ * @param {string} params.sourceLanguage -
1741
+ * @throws {RevenexxException}
1742
+ * @returns {Promise<Models.Page>}
1743
+ */
1744
+ pagesPagesCreate(params: { title: string, bundle?: string, hostOptions?: object, meta?: object, slug?: string, sourceLanguage?: string }): Promise<Models.Page>;
1745
+ /**
1746
+ *
1747
+ * @param {string} title -
1748
+ * @param {string} bundle -
1749
+ * @param {object} hostOptions -
1750
+ * @param {object} meta -
1751
+ * @param {string} slug -
1752
+ * @param {string} sourceLanguage -
1687
1753
  * @throws {RevenexxException}
1688
1754
  * @returns {Promise<Models.Page>}
1755
+ * @deprecated Use the object parameter style method for a better developer experience.
1689
1756
  */
1690
- pagesPagesCreate(): Promise<Models.Page> {
1757
+ pagesPagesCreate(title: string, bundle?: string, hostOptions?: object, meta?: object, slug?: string, sourceLanguage?: string): Promise<Models.Page>;
1758
+ pagesPagesCreate(
1759
+ paramsOrFirst: { title: string, bundle?: string, hostOptions?: object, meta?: object, slug?: string, sourceLanguage?: string } | string,
1760
+ ...rest: [(string)?, (object)?, (object)?, (string)?, (string)?]
1761
+ ): Promise<Models.Page> {
1762
+ let params: { title: string, bundle?: string, hostOptions?: object, meta?: object, slug?: string, sourceLanguage?: string };
1763
+
1764
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1765
+ params = (paramsOrFirst || {}) as { title: string, bundle?: string, hostOptions?: object, meta?: object, slug?: string, sourceLanguage?: string };
1766
+ } else {
1767
+ params = {
1768
+ title: paramsOrFirst as string,
1769
+ bundle: rest[0] as string,
1770
+ hostOptions: rest[1] as object,
1771
+ meta: rest[2] as object,
1772
+ slug: rest[3] as string,
1773
+ sourceLanguage: rest[4] as string
1774
+ };
1775
+ }
1776
+
1777
+ const title = params.title;
1778
+ const bundle = params.bundle;
1779
+ const hostOptions = params.hostOptions;
1780
+ const meta = params.meta;
1781
+ const slug = params.slug;
1782
+ const sourceLanguage = params.sourceLanguage;
1783
+
1784
+ if (typeof title === 'undefined') {
1785
+ throw new RevenexxException('Missing required parameter: "title"');
1786
+ }
1691
1787
 
1692
1788
  const apiPath = '/v1/pages/pages';
1693
- const payload: Payload = {};
1789
+ const apiPayload: Payload = {};
1790
+ if (typeof bundle !== 'undefined') {
1791
+ apiPayload['bundle'] = bundle;
1792
+ }
1793
+ if (typeof hostOptions !== 'undefined') {
1794
+ apiPayload['hostOptions'] = hostOptions;
1795
+ }
1796
+ if (typeof meta !== 'undefined') {
1797
+ apiPayload['meta'] = meta;
1798
+ }
1799
+ if (typeof slug !== 'undefined') {
1800
+ apiPayload['slug'] = slug;
1801
+ }
1802
+ if (typeof sourceLanguage !== 'undefined') {
1803
+ apiPayload['sourceLanguage'] = sourceLanguage;
1804
+ }
1805
+ if (typeof title !== 'undefined') {
1806
+ apiPayload['title'] = title;
1807
+ }
1694
1808
  const uri = new URL(this.client.config.endpoint + apiPath);
1695
1809
 
1696
1810
  const apiHeaders: { [header: string]: string } = {
@@ -1701,7 +1815,7 @@ export class Pages {
1701
1815
  'post',
1702
1816
  uri,
1703
1817
  apiHeaders,
1704
- payload
1818
+ apiPayload
1705
1819
  );
1706
1820
  }
1707
1821
 
@@ -1740,7 +1854,7 @@ export class Pages {
1740
1854
  }
1741
1855
 
1742
1856
  const apiPath = '/v1/pages/pages/{id}'.replace('{id}', id);
1743
- const payload: Payload = {};
1857
+ const apiPayload: Payload = {};
1744
1858
  const uri = new URL(this.client.config.endpoint + apiPath);
1745
1859
 
1746
1860
  const apiHeaders: { [header: string]: string } = {
@@ -1750,7 +1864,7 @@ export class Pages {
1750
1864
  'delete',
1751
1865
  uri,
1752
1866
  apiHeaders,
1753
- payload
1867
+ apiPayload
1754
1868
  );
1755
1869
  }
1756
1870
 
@@ -1789,7 +1903,7 @@ export class Pages {
1789
1903
  }
1790
1904
 
1791
1905
  const apiPath = '/v1/pages/pages/{id}'.replace('{id}', id);
1792
- const payload: Payload = {};
1906
+ const apiPayload: Payload = {};
1793
1907
  const uri = new URL(this.client.config.endpoint + apiPath);
1794
1908
 
1795
1909
  const apiHeaders: { [header: string]: string } = {
@@ -1799,46 +1913,82 @@ export class Pages {
1799
1913
  'get',
1800
1914
  uri,
1801
1915
  apiHeaders,
1802
- payload
1916
+ apiPayload
1803
1917
  );
1804
1918
  }
1805
1919
 
1806
1920
  /**
1807
1921
  *
1808
1922
  * @param {string} params.id -
1923
+ * @param {string} params.bundle -
1924
+ * @param {object} params.meta -
1925
+ * @param {string} params.slug -
1926
+ * @param {PageStatus} params.status -
1927
+ * @param {string} params.title -
1809
1928
  * @throws {RevenexxException}
1810
1929
  * @returns {Promise<Models.Page>}
1811
1930
  */
1812
- pagesPagesUpdate(params: { id: string }): Promise<Models.Page>;
1931
+ pagesPagesUpdate(params: { id: string, bundle?: string, meta?: object, slug?: string, status?: PageStatus, title?: string }): Promise<Models.Page>;
1813
1932
  /**
1814
1933
  *
1815
1934
  * @param {string} id -
1935
+ * @param {string} bundle -
1936
+ * @param {object} meta -
1937
+ * @param {string} slug -
1938
+ * @param {PageStatus} status -
1939
+ * @param {string} title -
1816
1940
  * @throws {RevenexxException}
1817
1941
  * @returns {Promise<Models.Page>}
1818
1942
  * @deprecated Use the object parameter style method for a better developer experience.
1819
1943
  */
1820
- pagesPagesUpdate(id: string): Promise<Models.Page>;
1944
+ pagesPagesUpdate(id: string, bundle?: string, meta?: object, slug?: string, status?: PageStatus, title?: string): Promise<Models.Page>;
1821
1945
  pagesPagesUpdate(
1822
- paramsOrFirst: { id: string } | string
1946
+ paramsOrFirst: { id: string, bundle?: string, meta?: object, slug?: string, status?: PageStatus, title?: string } | string,
1947
+ ...rest: [(string)?, (object)?, (string)?, (PageStatus)?, (string)?]
1823
1948
  ): Promise<Models.Page> {
1824
- let params: { id: string };
1949
+ let params: { id: string, bundle?: string, meta?: object, slug?: string, status?: PageStatus, title?: string };
1825
1950
 
1826
1951
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
1827
- params = (paramsOrFirst || {}) as { id: string };
1952
+ params = (paramsOrFirst || {}) as { id: string, bundle?: string, meta?: object, slug?: string, status?: PageStatus, title?: string };
1828
1953
  } else {
1829
1954
  params = {
1830
- id: paramsOrFirst as string
1955
+ id: paramsOrFirst as string,
1956
+ bundle: rest[0] as string,
1957
+ meta: rest[1] as object,
1958
+ slug: rest[2] as string,
1959
+ status: rest[3] as PageStatus,
1960
+ title: rest[4] as string
1831
1961
  };
1832
1962
  }
1833
1963
 
1834
1964
  const id = params.id;
1965
+ const bundle = params.bundle;
1966
+ const meta = params.meta;
1967
+ const slug = params.slug;
1968
+ const status = params.status;
1969
+ const title = params.title;
1835
1970
 
1836
1971
  if (typeof id === 'undefined') {
1837
1972
  throw new RevenexxException('Missing required parameter: "id"');
1838
1973
  }
1839
1974
 
1840
1975
  const apiPath = '/v1/pages/pages/{id}'.replace('{id}', id);
1841
- const payload: Payload = {};
1976
+ const apiPayload: Payload = {};
1977
+ if (typeof bundle !== 'undefined') {
1978
+ apiPayload['bundle'] = bundle;
1979
+ }
1980
+ if (typeof meta !== 'undefined') {
1981
+ apiPayload['meta'] = meta;
1982
+ }
1983
+ if (typeof slug !== 'undefined') {
1984
+ apiPayload['slug'] = slug;
1985
+ }
1986
+ if (typeof status !== 'undefined') {
1987
+ apiPayload['status'] = status;
1988
+ }
1989
+ if (typeof title !== 'undefined') {
1990
+ apiPayload['title'] = title;
1991
+ }
1842
1992
  const uri = new URL(this.client.config.endpoint + apiPath);
1843
1993
 
1844
1994
  const apiHeaders: { [header: string]: string } = {
@@ -1849,7 +1999,7 @@ export class Pages {
1849
1999
  'put',
1850
2000
  uri,
1851
2001
  apiHeaders,
1852
- payload
2002
+ apiPayload
1853
2003
  );
1854
2004
  }
1855
2005
 
@@ -1888,7 +2038,7 @@ export class Pages {
1888
2038
  }
1889
2039
 
1890
2040
  const apiPath = '/v1/pages/pages/{id}/revisions'.replace('{id}', id);
1891
- const payload: Payload = {};
2041
+ const apiPayload: Payload = {};
1892
2042
  const uri = new URL(this.client.config.endpoint + apiPath);
1893
2043
 
1894
2044
  const apiHeaders: { [header: string]: string } = {
@@ -1898,19 +2048,46 @@ export class Pages {
1898
2048
  'get',
1899
2049
  uri,
1900
2050
  apiHeaders,
1901
- payload
2051
+ apiPayload
1902
2052
  );
1903
2053
  }
1904
2054
 
1905
2055
  /**
1906
2056
  *
2057
+ * @param {object[]} params.pages -
1907
2058
  * @throws {RevenexxException}
1908
2059
  * @returns {Promise<{}>}
1909
2060
  */
1910
- pagesSeed(): Promise<{}> {
2061
+ pagesSeed(params?: { pages?: object[] }): Promise<{}>;
2062
+ /**
2063
+ *
2064
+ * @param {object[]} pages -
2065
+ * @throws {RevenexxException}
2066
+ * @returns {Promise<{}>}
2067
+ * @deprecated Use the object parameter style method for a better developer experience.
2068
+ */
2069
+ pagesSeed(pages?: object[]): Promise<{}>;
2070
+ pagesSeed(
2071
+ paramsOrFirst?: { pages?: object[] } | object[]
2072
+ ): Promise<{}> {
2073
+ let params: { pages?: object[] };
2074
+
2075
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('pages' in paramsOrFirst))) {
2076
+ params = (paramsOrFirst || {}) as { pages?: object[] };
2077
+ } else {
2078
+ params = {
2079
+ pages: paramsOrFirst as object[]
2080
+ };
2081
+ }
2082
+
2083
+ const pages = params.pages;
2084
+
1911
2085
 
1912
2086
  const apiPath = '/v1/pages/seed';
1913
- const payload: Payload = {};
2087
+ const apiPayload: Payload = {};
2088
+ if (typeof pages !== 'undefined') {
2089
+ apiPayload['pages'] = pages;
2090
+ }
1914
2091
  const uri = new URL(this.client.config.endpoint + apiPath);
1915
2092
 
1916
2093
  const apiHeaders: { [header: string]: string } = {
@@ -1921,7 +2098,7 @@ export class Pages {
1921
2098
  'post',
1922
2099
  uri,
1923
2100
  apiHeaders,
1924
- payload
2101
+ apiPayload
1925
2102
  );
1926
2103
  }
1927
2104
 
@@ -1933,7 +2110,7 @@ export class Pages {
1933
2110
  pagesTemplatesList(): Promise<{}> {
1934
2111
 
1935
2112
  const apiPath = '/v1/pages/templates';
1936
- const payload: Payload = {};
2113
+ const apiPayload: Payload = {};
1937
2114
  const uri = new URL(this.client.config.endpoint + apiPath);
1938
2115
 
1939
2116
  const apiHeaders: { [header: string]: string } = {
@@ -1943,7 +2120,7 @@ export class Pages {
1943
2120
  'get',
1944
2121
  uri,
1945
2122
  apiHeaders,
1946
- payload
2123
+ apiPayload
1947
2124
  );
1948
2125
  }
1949
2126
 
@@ -1982,7 +2159,7 @@ export class Pages {
1982
2159
  }
1983
2160
 
1984
2161
  const apiPath = '/v1/pages/templates/{id}'.replace('{id}', id);
1985
- const payload: Payload = {};
2162
+ const apiPayload: Payload = {};
1986
2163
  const uri = new URL(this.client.config.endpoint + apiPath);
1987
2164
 
1988
2165
  const apiHeaders: { [header: string]: string } = {
@@ -1992,7 +2169,7 @@ export class Pages {
1992
2169
  'delete',
1993
2170
  uri,
1994
2171
  apiHeaders,
1995
- payload
2172
+ apiPayload
1996
2173
  );
1997
2174
  }
1998
2175
 
@@ -2031,7 +2208,7 @@ export class Pages {
2031
2208
  }
2032
2209
 
2033
2210
  const apiPath = '/v1/pages/templates/{id}'.replace('{id}', id);
2034
- const payload: Payload = {};
2211
+ const apiPayload: Payload = {};
2035
2212
  const uri = new URL(this.client.config.endpoint + apiPath);
2036
2213
 
2037
2214
  const apiHeaders: { [header: string]: string } = {
@@ -2041,46 +2218,89 @@ export class Pages {
2041
2218
  'get',
2042
2219
  uri,
2043
2220
  apiHeaders,
2044
- payload
2221
+ apiPayload
2045
2222
  );
2046
2223
  }
2047
2224
 
2048
2225
  /**
2049
2226
  *
2050
2227
  * @param {string} params.id -
2228
+ * @param {string} params.description -
2229
+ * @param {string} params.fieldName -
2230
+ * @param {boolean} params.isDefault -
2231
+ * @param {string} params.label -
2232
+ * @param {string} params.pageBundle -
2233
+ * @param {object[]} params.tree - Serialized block trees ({ bundle, props, props_i18n, options, children }).
2051
2234
  * @throws {RevenexxException}
2052
2235
  * @returns {Promise<Models.Template>}
2053
2236
  */
2054
- pagesTemplatesUpdate(params: { id: string }): Promise<Models.Template>;
2237
+ pagesTemplatesUpdate(params: { id: string, description?: string, fieldName?: string, isDefault?: boolean, label?: string, pageBundle?: string, tree?: object[] }): Promise<Models.Template>;
2055
2238
  /**
2056
2239
  *
2057
2240
  * @param {string} id -
2241
+ * @param {string} description -
2242
+ * @param {string} fieldName -
2243
+ * @param {boolean} isDefault -
2244
+ * @param {string} label -
2245
+ * @param {string} pageBundle -
2246
+ * @param {object[]} tree - Serialized block trees ({ bundle, props, props_i18n, options, children }).
2058
2247
  * @throws {RevenexxException}
2059
2248
  * @returns {Promise<Models.Template>}
2060
2249
  * @deprecated Use the object parameter style method for a better developer experience.
2061
2250
  */
2062
- pagesTemplatesUpdate(id: string): Promise<Models.Template>;
2251
+ pagesTemplatesUpdate(id: string, description?: string, fieldName?: string, isDefault?: boolean, label?: string, pageBundle?: string, tree?: object[]): Promise<Models.Template>;
2063
2252
  pagesTemplatesUpdate(
2064
- paramsOrFirst: { id: string } | string
2253
+ paramsOrFirst: { id: string, description?: string, fieldName?: string, isDefault?: boolean, label?: string, pageBundle?: string, tree?: object[] } | string,
2254
+ ...rest: [(string)?, (string)?, (boolean)?, (string)?, (string)?, (object[])?]
2065
2255
  ): Promise<Models.Template> {
2066
- let params: { id: string };
2256
+ let params: { id: string, description?: string, fieldName?: string, isDefault?: boolean, label?: string, pageBundle?: string, tree?: object[] };
2067
2257
 
2068
2258
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
2069
- params = (paramsOrFirst || {}) as { id: string };
2259
+ params = (paramsOrFirst || {}) as { id: string, description?: string, fieldName?: string, isDefault?: boolean, label?: string, pageBundle?: string, tree?: object[] };
2070
2260
  } else {
2071
2261
  params = {
2072
- id: paramsOrFirst as string
2262
+ id: paramsOrFirst as string,
2263
+ description: rest[0] as string,
2264
+ fieldName: rest[1] as string,
2265
+ isDefault: rest[2] as boolean,
2266
+ label: rest[3] as string,
2267
+ pageBundle: rest[4] as string,
2268
+ tree: rest[5] as object[]
2073
2269
  };
2074
2270
  }
2075
2271
 
2076
2272
  const id = params.id;
2273
+ const description = params.description;
2274
+ const fieldName = params.fieldName;
2275
+ const isDefault = params.isDefault;
2276
+ const label = params.label;
2277
+ const pageBundle = params.pageBundle;
2278
+ const tree = params.tree;
2077
2279
 
2078
2280
  if (typeof id === 'undefined') {
2079
2281
  throw new RevenexxException('Missing required parameter: "id"');
2080
2282
  }
2081
2283
 
2082
2284
  const apiPath = '/v1/pages/templates/{id}'.replace('{id}', id);
2083
- const payload: Payload = {};
2285
+ const apiPayload: Payload = {};
2286
+ if (typeof description !== 'undefined') {
2287
+ apiPayload['description'] = description;
2288
+ }
2289
+ if (typeof fieldName !== 'undefined') {
2290
+ apiPayload['field_name'] = fieldName;
2291
+ }
2292
+ if (typeof isDefault !== 'undefined') {
2293
+ apiPayload['is_default'] = isDefault;
2294
+ }
2295
+ if (typeof label !== 'undefined') {
2296
+ apiPayload['label'] = label;
2297
+ }
2298
+ if (typeof pageBundle !== 'undefined') {
2299
+ apiPayload['page_bundle'] = pageBundle;
2300
+ }
2301
+ if (typeof tree !== 'undefined') {
2302
+ apiPayload['tree'] = tree;
2303
+ }
2084
2304
  const uri = new URL(this.client.config.endpoint + apiPath);
2085
2305
 
2086
2306
  const apiHeaders: { [header: string]: string } = {
@@ -2091,7 +2311,7 @@ export class Pages {
2091
2311
  'put',
2092
2312
  uri,
2093
2313
  apiHeaders,
2094
- payload
2314
+ apiPayload
2095
2315
  );
2096
2316
  }
2097
2317
  }