@agility/content-fetch 2.0.9 → 2.1.0

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 (43) hide show
  1. package/.env +76 -0
  2. package/.github/workflows/ci-cd.yml +96 -0
  3. package/build.js +2 -0
  4. package/dist/api-client.d.ts +2 -2
  5. package/dist/browser.js +623 -564
  6. package/dist/methods/getContentItem.d.ts +12 -3
  7. package/dist/methods/getContentList.d.ts +18 -6
  8. package/dist/methods/getGallery.d.ts +12 -3
  9. package/dist/methods/getPage.d.ts +12 -3
  10. package/dist/methods/getPageByPath.d.ts +12 -3
  11. package/dist/methods/getSitemapFlat.d.ts +12 -3
  12. package/dist/methods/getSitemapNested.d.ts +12 -3
  13. package/dist/methods/getSyncContent.d.ts +12 -3
  14. package/dist/methods/getSyncPages.d.ts +12 -3
  15. package/dist/methods/getUrlRedirections.d.ts +12 -3
  16. package/dist/node.js +125 -67
  17. package/dist/types/Config.d.ts +5 -0
  18. package/dist/types/generated/index.d.ts +53 -0
  19. package/dist/types/generated/v1.d.ts +1336 -0
  20. package/dist/types/generated/v2.d.ts +1052 -0
  21. package/dist/types/index.d.ts +61 -4
  22. package/dist/types/sdk/Client.d.ts +12 -0
  23. package/dist/types/sdk/Config.d.ts +49 -0
  24. package/dist/types/sdk/EnvConfig.d.ts +6 -0
  25. package/dist/types/sdk/Filter.d.ts +14 -0
  26. package/dist/types/sdk/FilterLogicOperator.d.ts +17 -0
  27. package/dist/types/sdk/FilterOperator.d.ts +34 -0
  28. package/dist/types/sdk/SortDirection.d.ts +17 -0
  29. package/dist/types/sdk/errors/Errors.d.ts +22 -0
  30. package/dist/types/sdk/index.d.ts +18 -0
  31. package/dist/types/v2/ContentItem.d.ts +27 -0
  32. package/dist/types/v2/ContentZone.d.ts +14 -0
  33. package/dist/types/v2/MediaItem.d.ts +20 -0
  34. package/dist/types/v2/MediaItemMetaData.d.ts +17 -0
  35. package/dist/types/v2/Page.d.ts +40 -0
  36. package/dist/types/v2/SEO.d.ts +16 -0
  37. package/dist/types/v2/SitemapVisibility.d.ts +11 -0
  38. package/dist/types/v2/SystemProperties.d.ts +15 -0
  39. package/dist/types/v2/index.d.ts +26 -0
  40. package/dist/utils.d.ts +1 -1
  41. package/jest.integration.config.js +19 -0
  42. package/jest.unit.config.js +25 -0
  43. package/package.json +31 -10
@@ -0,0 +1,1336 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+ export interface paths {
6
+ "/{guid}/{apitype}/contentmodels": {
7
+ parameters: {
8
+ query?: never;
9
+ header?: never;
10
+ path?: never;
11
+ cookie?: never;
12
+ };
13
+ /** Returns content models for the Agility instance. */
14
+ get: {
15
+ parameters: {
16
+ query?: {
17
+ /** @description The last modified date/time that the Models list was updated, eg: 2020-09-24T10:00:00.00-04:00. */
18
+ lastModifiedDate?: string | null;
19
+ };
20
+ header?: never;
21
+ path: {
22
+ /** @description The instance GUID, available from the API Keys section. */
23
+ guid: string | null;
24
+ /** @description The API type (preview, fetch). */
25
+ apitype: components["schemas"]["APIType"];
26
+ };
27
+ cookie?: never;
28
+ };
29
+ requestBody?: never;
30
+ responses: {
31
+ /** @description Success */
32
+ 200: {
33
+ headers: {
34
+ [name: string]: unknown;
35
+ };
36
+ content: {
37
+ "application/json": components["schemas"]["AgilityDefinition"][];
38
+ };
39
+ };
40
+ /** @description Unauthorized */
41
+ 401: {
42
+ headers: {
43
+ [name: string]: unknown;
44
+ };
45
+ content: {
46
+ "application/json": components["schemas"]["EmptyResult"];
47
+ };
48
+ };
49
+ /** @description Not Found */
50
+ 404: {
51
+ headers: {
52
+ [name: string]: unknown;
53
+ };
54
+ content: {
55
+ "application/json": components["schemas"]["NotFoundResult"];
56
+ };
57
+ };
58
+ };
59
+ };
60
+ put?: never;
61
+ post?: never;
62
+ delete?: never;
63
+ options?: never;
64
+ head?: never;
65
+ patch?: never;
66
+ trace?: never;
67
+ };
68
+ "/{guid}/{apitype}/gallery/{id}": {
69
+ parameters: {
70
+ query?: never;
71
+ header?: never;
72
+ path?: never;
73
+ cookie?: never;
74
+ };
75
+ /** Gets the gallery by ID. */
76
+ get: {
77
+ parameters: {
78
+ query?: never;
79
+ header?: never;
80
+ path: {
81
+ /** @description The instance GUID, available from the API Keys section. */
82
+ guid: string | null;
83
+ /** @description The Type of API - fetch or preview. */
84
+ apitype: components["schemas"]["APIType"];
85
+ /** @description The galleryID of the requested gallery. */
86
+ id: number;
87
+ };
88
+ cookie?: never;
89
+ };
90
+ requestBody?: never;
91
+ responses: {
92
+ /** @description Returns the gallery. */
93
+ 200: {
94
+ headers: {
95
+ [name: string]: unknown;
96
+ };
97
+ content: {
98
+ "application/json": components["schemas"]["HeadlessGallery"];
99
+ };
100
+ };
101
+ /** @description The request could not be authorized. Invalid or missing apiKey. */
102
+ 401: {
103
+ headers: {
104
+ [name: string]: unknown;
105
+ };
106
+ content: {
107
+ "application/json": components["schemas"]["EmptyResult"];
108
+ };
109
+ };
110
+ /** @description The gallery is not found. */
111
+ 404: {
112
+ headers: {
113
+ [name: string]: unknown;
114
+ };
115
+ content: {
116
+ "application/json": components["schemas"]["NotFoundResult"];
117
+ };
118
+ };
119
+ };
120
+ };
121
+ put?: never;
122
+ post?: never;
123
+ delete?: never;
124
+ options?: never;
125
+ head?: never;
126
+ patch?: never;
127
+ trace?: never;
128
+ };
129
+ "/{guid}/{apitype}/{locale}/item/{id}": {
130
+ parameters: {
131
+ query?: never;
132
+ header?: never;
133
+ path?: never;
134
+ cookie?: never;
135
+ };
136
+ /** Gets the details of a content item by ther Content ID. */
137
+ get: {
138
+ parameters: {
139
+ query?: {
140
+ /** @description The maximum level to expand linked content from this item */
141
+ contentLinkDepth?: number;
142
+ /** @description Whether or not to expand entire linked content references, includings lists and items that are rendered in the CMS as Grid or Link. */
143
+ expandAllContentLinks?: boolean;
144
+ };
145
+ header?: never;
146
+ path: {
147
+ /** @description The instance GUID, available from the API Keys section. */
148
+ guid: string | null;
149
+ /** @description The API type (preview, fetch). */
150
+ apitype: components["schemas"]["APIType"];
151
+ /** @description The locale code you want to retrieve content for. */
152
+ locale: string | null;
153
+ /** @description The contentID of the requested item in this locale. */
154
+ id: number;
155
+ };
156
+ cookie?: never;
157
+ };
158
+ requestBody?: never;
159
+ responses: {
160
+ /** @description Returns the content item. */
161
+ 200: {
162
+ headers: {
163
+ [name: string]: unknown;
164
+ };
165
+ content: {
166
+ "application/json": components["schemas"]["HeadlessContentItem"];
167
+ };
168
+ };
169
+ /** @description The request could not be authorized. Invalid or missing apiKey. */
170
+ 401: {
171
+ headers: {
172
+ [name: string]: unknown;
173
+ };
174
+ content: {
175
+ "application/json": components["schemas"]["EmptyResult"];
176
+ };
177
+ };
178
+ /** @description The content item is not found. If quering production, ensure the item has been published. */
179
+ 404: {
180
+ headers: {
181
+ [name: string]: unknown;
182
+ };
183
+ content: {
184
+ "application/json": components["schemas"]["NotFoundResult"];
185
+ };
186
+ };
187
+ };
188
+ };
189
+ put?: never;
190
+ post?: never;
191
+ delete?: never;
192
+ options?: never;
193
+ head?: never;
194
+ patch?: never;
195
+ trace?: never;
196
+ };
197
+ "/v1/{guid}/{apitype}/{locale}/item/{id}": {
198
+ parameters: {
199
+ query?: never;
200
+ header?: never;
201
+ path?: never;
202
+ cookie?: never;
203
+ };
204
+ /** Gets the details of a content item by ther Content ID. */
205
+ get: {
206
+ parameters: {
207
+ query?: {
208
+ /** @description The maximum level to expand linked content from this item */
209
+ contentLinkDepth?: number;
210
+ /** @description Whether or not to expand entire linked content references, includings lists and items that are rendered in the CMS as Grid or Link. */
211
+ expandAllContentLinks?: boolean;
212
+ };
213
+ header?: never;
214
+ path: {
215
+ /** @description The instance GUID, available from the API Keys section. */
216
+ guid: string | null;
217
+ /** @description The API type (preview, fetch). */
218
+ apitype: components["schemas"]["APIType"];
219
+ /** @description The locale code you want to retrieve content for. */
220
+ locale: string | null;
221
+ /** @description The contentID of the requested item in this locale. */
222
+ id: number;
223
+ };
224
+ cookie?: never;
225
+ };
226
+ requestBody?: never;
227
+ responses: {
228
+ /** @description Returns the content item. */
229
+ 200: {
230
+ headers: {
231
+ [name: string]: unknown;
232
+ };
233
+ content: {
234
+ "application/json": components["schemas"]["HeadlessContentItem"];
235
+ };
236
+ };
237
+ /** @description The request could not be authorized. Invalid or missing apiKey. */
238
+ 401: {
239
+ headers: {
240
+ [name: string]: unknown;
241
+ };
242
+ content: {
243
+ "application/json": components["schemas"]["EmptyResult"];
244
+ };
245
+ };
246
+ /** @description The content item is not found. If quering production, ensure the item has been published. */
247
+ 404: {
248
+ headers: {
249
+ [name: string]: unknown;
250
+ };
251
+ content: {
252
+ "application/json": components["schemas"]["NotFoundResult"];
253
+ };
254
+ };
255
+ };
256
+ };
257
+ put?: never;
258
+ post?: never;
259
+ delete?: never;
260
+ options?: never;
261
+ head?: never;
262
+ patch?: never;
263
+ trace?: never;
264
+ };
265
+ "/{guid}/{apitype}/{locale}/list/{referenceName}": {
266
+ parameters: {
267
+ query?: never;
268
+ header?: never;
269
+ path?: never;
270
+ cookie?: never;
271
+ };
272
+ /** Retrieves a list of content items by reference name. */
273
+ get: {
274
+ parameters: {
275
+ query?: {
276
+ /** @description [Optional] The depth of list items. Maximum allowed is 5. */
277
+ ContentLinkDepth?: number;
278
+ /** @description [Optional] Whether or not to expand entire linked content references, includings lists and items that are rendered in the CMS as Grid or Link. */
279
+ ExpandAllContentLinks?: boolean;
280
+ /** @description [Optional] A comma separated list of the fields to return. */
281
+ Fields?: string | null;
282
+ /** @description [Optional] The maximum number of items to retrieve in this request. Default is 10. Maximum allowed is 250. */
283
+ Take?: number;
284
+ /** @description [Optional] The number of items to skip from the list. Default is 0. Used for implementing pagination. */
285
+ Skip?: number;
286
+ /** @description [Optional] The filter you wish to apply to the list query. Supports [eq (Equal To), ne (Not Equal), lt (Less Than), lte (Less Than or Equal), gt (Greater Than), gte (Greater Than or Equal)]. Example value: `fields.title[eq]"some title" or fields.details[like]"some text"` */
287
+ Filter?: string | null;
288
+ /** @description [Optional] The field to sort the results by. Example fields.title or properties.created, seo.metaDescription */
289
+ Sort?: string | null;
290
+ /** @description [Optional] The direction to sort the results by. Default is asc. Valid values are asc, desc. */
291
+ Direction?: string | null;
292
+ };
293
+ header?: never;
294
+ path: {
295
+ /** @description The instance GUID, available from the API Keys section. */
296
+ guid: string | null;
297
+ /** @description The API type (preview, fetch). */
298
+ apitype: components["schemas"]["APIType"];
299
+ /** @description The locale code you want to retrieve content for. */
300
+ locale: string | null;
301
+ /** @description The unique reference name of the content list you wish to retrieve in the current locale. Reference names must be ALL lowercase. */
302
+ referenceName: string | null;
303
+ };
304
+ cookie?: never;
305
+ };
306
+ requestBody?: never;
307
+ responses: {
308
+ /** @description Returns the content list. */
309
+ 200: {
310
+ headers: {
311
+ [name: string]: unknown;
312
+ };
313
+ content: {
314
+ "application/json": components["schemas"]["HeadlessContentListResponse"];
315
+ };
316
+ };
317
+ /** @description The request could not be authorized. Invalid or missing apiKey. */
318
+ 401: {
319
+ headers: {
320
+ [name: string]: unknown;
321
+ };
322
+ content: {
323
+ "application/json": components["schemas"]["EmptyResult"];
324
+ };
325
+ };
326
+ /** @description The content list is not found. If quering production, ensure at least one item in the list has been published. */
327
+ 404: {
328
+ headers: {
329
+ [name: string]: unknown;
330
+ };
331
+ content?: never;
332
+ };
333
+ };
334
+ };
335
+ put?: never;
336
+ post?: never;
337
+ delete?: never;
338
+ options?: never;
339
+ head?: never;
340
+ patch?: never;
341
+ trace?: never;
342
+ };
343
+ "/v1/{guid}/{apitype}/{locale}/list/{referenceName}": {
344
+ parameters: {
345
+ query?: never;
346
+ header?: never;
347
+ path?: never;
348
+ cookie?: never;
349
+ };
350
+ /** Retrieves a list of content items by reference name. */
351
+ get: {
352
+ parameters: {
353
+ query?: {
354
+ /** @description [Optional] The depth of list items. Maximum allowed is 5. */
355
+ ContentLinkDepth?: number;
356
+ /** @description [Optional] Whether or not to expand entire linked content references, includings lists and items that are rendered in the CMS as Grid or Link. */
357
+ ExpandAllContentLinks?: boolean;
358
+ /** @description [Optional] A comma separated list of the fields to return. */
359
+ Fields?: string | null;
360
+ /** @description [Optional] The maximum number of items to retrieve in this request. Default is 10. Maximum allowed is 250. */
361
+ Take?: number;
362
+ /** @description [Optional] The number of items to skip from the list. Default is 0. Used for implementing pagination. */
363
+ Skip?: number;
364
+ /** @description [Optional] The filter you wish to apply to the list query. Supports [eq (Equal To), ne (Not Equal), lt (Less Than), lte (Less Than or Equal), gt (Greater Than), gte (Greater Than or Equal)]. Example value: `fields.title[eq]"some title" or fields.details[like]"some text"` */
365
+ Filter?: string | null;
366
+ /** @description [Optional] The field to sort the results by. Example fields.title or properties.created, seo.metaDescription */
367
+ Sort?: string | null;
368
+ /** @description [Optional] The direction to sort the results by. Default is asc. Valid values are asc, desc. */
369
+ Direction?: string | null;
370
+ };
371
+ header?: never;
372
+ path: {
373
+ /** @description The instance GUID, available from the API Keys section. */
374
+ guid: string | null;
375
+ /** @description The API type (preview, fetch). */
376
+ apitype: components["schemas"]["APIType"];
377
+ /** @description The locale code you want to retrieve content for. */
378
+ locale: string | null;
379
+ /** @description The unique reference name of the content list you wish to retrieve in the current locale. Reference names must be ALL lowercase. */
380
+ referenceName: string | null;
381
+ };
382
+ cookie?: never;
383
+ };
384
+ requestBody?: never;
385
+ responses: {
386
+ /** @description Returns the content list. */
387
+ 200: {
388
+ headers: {
389
+ [name: string]: unknown;
390
+ };
391
+ content: {
392
+ "application/json": components["schemas"]["HeadlessContentListResponse"];
393
+ };
394
+ };
395
+ /** @description The request could not be authorized. Invalid or missing apiKey. */
396
+ 401: {
397
+ headers: {
398
+ [name: string]: unknown;
399
+ };
400
+ content: {
401
+ "application/json": components["schemas"]["EmptyResult"];
402
+ };
403
+ };
404
+ /** @description The content list is not found. If quering production, ensure at least one item in the list has been published. */
405
+ 404: {
406
+ headers: {
407
+ [name: string]: unknown;
408
+ };
409
+ content?: never;
410
+ };
411
+ };
412
+ };
413
+ put?: never;
414
+ post?: never;
415
+ delete?: never;
416
+ options?: never;
417
+ head?: never;
418
+ patch?: never;
419
+ trace?: never;
420
+ };
421
+ "/{guid}/{apitype}/{locale}/page/{id}": {
422
+ parameters: {
423
+ query?: never;
424
+ header?: never;
425
+ path?: never;
426
+ cookie?: never;
427
+ };
428
+ /** Gets the details of a page by its Page ID. */
429
+ get: {
430
+ parameters: {
431
+ query?: {
432
+ /** @description The maximum level to expand linked content from this item */
433
+ contentLinkDepth?: number;
434
+ /** @description Whether or not to expand entire linked content references, includings lists and items that are rendered in the CMS as Grid or Link and linked to modules or linked items on this page. */
435
+ expandAllContentLinks?: boolean;
436
+ };
437
+ header?: never;
438
+ path: {
439
+ /** @description The instance GUID, available from the API Keys section. */
440
+ guid: string | null;
441
+ /** @description The API type (preview, fetch). */
442
+ apitype: components["schemas"]["APIType"];
443
+ /** @description The locale code you want to retrieve content for. */
444
+ locale: string | null;
445
+ /** @description The unique page ID of the page you wish to retrieve in the current locale. */
446
+ id: number;
447
+ };
448
+ cookie?: never;
449
+ };
450
+ requestBody?: never;
451
+ responses: {
452
+ /** @description Returns the page item. */
453
+ 200: {
454
+ headers: {
455
+ [name: string]: unknown;
456
+ };
457
+ content: {
458
+ "application/json": components["schemas"]["HeadlessContentPage"];
459
+ };
460
+ };
461
+ /** @description The request could not be authorized. Invalid or missing apiKey. */
462
+ 401: {
463
+ headers: {
464
+ [name: string]: unknown;
465
+ };
466
+ content: {
467
+ "application/json": components["schemas"]["EmptyResult"];
468
+ };
469
+ };
470
+ /** @description The page item is not found. If quering production, ensure the page has been published. */
471
+ 404: {
472
+ headers: {
473
+ [name: string]: unknown;
474
+ };
475
+ content: {
476
+ "application/json": components["schemas"]["NotFoundResult"];
477
+ };
478
+ };
479
+ };
480
+ };
481
+ put?: never;
482
+ post?: never;
483
+ delete?: never;
484
+ options?: never;
485
+ head?: never;
486
+ patch?: never;
487
+ trace?: never;
488
+ };
489
+ "/v1/{guid}/{apitype}/{locale}/page/{id}": {
490
+ parameters: {
491
+ query?: never;
492
+ header?: never;
493
+ path?: never;
494
+ cookie?: never;
495
+ };
496
+ /** Gets the details of a page by its Page ID. */
497
+ get: {
498
+ parameters: {
499
+ query?: {
500
+ /** @description The maximum level to expand linked content from this item */
501
+ contentLinkDepth?: number;
502
+ /** @description Whether or not to expand entire linked content references, includings lists and items that are rendered in the CMS as Grid or Link and linked to modules or linked items on this page. */
503
+ expandAllContentLinks?: boolean;
504
+ };
505
+ header?: never;
506
+ path: {
507
+ /** @description The instance GUID, available from the API Keys section. */
508
+ guid: string | null;
509
+ /** @description The API type (preview, fetch). */
510
+ apitype: components["schemas"]["APIType"];
511
+ /** @description The locale code you want to retrieve content for. */
512
+ locale: string | null;
513
+ /** @description The unique page ID of the page you wish to retrieve in the current locale. */
514
+ id: number;
515
+ };
516
+ cookie?: never;
517
+ };
518
+ requestBody?: never;
519
+ responses: {
520
+ /** @description Returns the page item. */
521
+ 200: {
522
+ headers: {
523
+ [name: string]: unknown;
524
+ };
525
+ content: {
526
+ "application/json": components["schemas"]["HeadlessContentPage"];
527
+ };
528
+ };
529
+ /** @description The request could not be authorized. Invalid or missing apiKey. */
530
+ 401: {
531
+ headers: {
532
+ [name: string]: unknown;
533
+ };
534
+ content: {
535
+ "application/json": components["schemas"]["EmptyResult"];
536
+ };
537
+ };
538
+ /** @description The page item is not found. If quering production, ensure the page has been published. */
539
+ 404: {
540
+ headers: {
541
+ [name: string]: unknown;
542
+ };
543
+ content: {
544
+ "application/json": components["schemas"]["NotFoundResult"];
545
+ };
546
+ };
547
+ };
548
+ };
549
+ put?: never;
550
+ post?: never;
551
+ delete?: never;
552
+ options?: never;
553
+ head?: never;
554
+ patch?: never;
555
+ trace?: never;
556
+ };
557
+ "/{guid}/{apitype}/{locale}/page/{channel}": {
558
+ parameters: {
559
+ query?: never;
560
+ header?: never;
561
+ path?: never;
562
+ cookie?: never;
563
+ };
564
+ /** Gets the details of a page by its Page path, in a specific channel. */
565
+ get: {
566
+ parameters: {
567
+ query?: {
568
+ /** @description The path of the page */
569
+ path?: string | null;
570
+ /** @description The maximum level to expand linked content from this item */
571
+ contentLinkDepth?: number;
572
+ /** @description Whether or not to expand entire linked content references, includings lists and items that are rendered in the CMS as Grid or Link and linked to modules or linked items on this page. */
573
+ expandAllContentLinks?: boolean;
574
+ };
575
+ header?: never;
576
+ path: {
577
+ /** @description The instance GUID, available from the API Keys section. */
578
+ guid: string | null;
579
+ /** @description The API type (preview, fetch). */
580
+ apitype: components["schemas"]["APIType"];
581
+ /** @description The locale code you want to retrieve content for. */
582
+ locale: string | null;
583
+ /** @description The reference name of the digital channel of the sitemap to return. If you only have one channel, your channel reference name is likely 'website'. */
584
+ channel: string | null;
585
+ };
586
+ cookie?: never;
587
+ };
588
+ requestBody?: never;
589
+ responses: {
590
+ /** @description Returns the page item. */
591
+ 200: {
592
+ headers: {
593
+ [name: string]: unknown;
594
+ };
595
+ content: {
596
+ "application/json": components["schemas"]["HeadlessContentPageByPath"];
597
+ };
598
+ };
599
+ /** @description The request could not be authorized. Invalid or missing apiKey. */
600
+ 401: {
601
+ headers: {
602
+ [name: string]: unknown;
603
+ };
604
+ content: {
605
+ "application/json": components["schemas"]["EmptyResult"];
606
+ };
607
+ };
608
+ /** @description The page item is not found. If quering production, ensure the page has been published. */
609
+ 404: {
610
+ headers: {
611
+ [name: string]: unknown;
612
+ };
613
+ content: {
614
+ "application/json": components["schemas"]["NotFoundResult"];
615
+ };
616
+ };
617
+ };
618
+ };
619
+ put?: never;
620
+ post?: never;
621
+ delete?: never;
622
+ options?: never;
623
+ head?: never;
624
+ patch?: never;
625
+ trace?: never;
626
+ };
627
+ "/v1/{guid}/{apitype}/{locale}/page/{channel}": {
628
+ parameters: {
629
+ query?: never;
630
+ header?: never;
631
+ path?: never;
632
+ cookie?: never;
633
+ };
634
+ /** Gets the details of a page by its Page path, in a specific channel. */
635
+ get: {
636
+ parameters: {
637
+ query?: {
638
+ /** @description The path of the page */
639
+ path?: string | null;
640
+ /** @description The maximum level to expand linked content from this item */
641
+ contentLinkDepth?: number;
642
+ /** @description Whether or not to expand entire linked content references, includings lists and items that are rendered in the CMS as Grid or Link and linked to modules or linked items on this page. */
643
+ expandAllContentLinks?: boolean;
644
+ };
645
+ header?: never;
646
+ path: {
647
+ /** @description The instance GUID, available from the API Keys section. */
648
+ guid: string | null;
649
+ /** @description The API type (preview, fetch). */
650
+ apitype: components["schemas"]["APIType"];
651
+ /** @description The locale code you want to retrieve content for. */
652
+ locale: string | null;
653
+ /** @description The reference name of the digital channel of the sitemap to return. If you only have one channel, your channel reference name is likely 'website'. */
654
+ channel: string | null;
655
+ };
656
+ cookie?: never;
657
+ };
658
+ requestBody?: never;
659
+ responses: {
660
+ /** @description Returns the page item. */
661
+ 200: {
662
+ headers: {
663
+ [name: string]: unknown;
664
+ };
665
+ content: {
666
+ "application/json": components["schemas"]["HeadlessContentPageByPath"];
667
+ };
668
+ };
669
+ /** @description The request could not be authorized. Invalid or missing apiKey. */
670
+ 401: {
671
+ headers: {
672
+ [name: string]: unknown;
673
+ };
674
+ content: {
675
+ "application/json": components["schemas"]["EmptyResult"];
676
+ };
677
+ };
678
+ /** @description The page item is not found. If quering production, ensure the page has been published. */
679
+ 404: {
680
+ headers: {
681
+ [name: string]: unknown;
682
+ };
683
+ content: {
684
+ "application/json": components["schemas"]["NotFoundResult"];
685
+ };
686
+ };
687
+ };
688
+ };
689
+ put?: never;
690
+ post?: never;
691
+ delete?: never;
692
+ options?: never;
693
+ head?: never;
694
+ patch?: never;
695
+ trace?: never;
696
+ };
697
+ "/{guid}/{apitype}/{locale}/sitemap/flat/{channelName}": {
698
+ parameters: {
699
+ query?: never;
700
+ header?: never;
701
+ path?: never;
702
+ cookie?: never;
703
+ };
704
+ /** Gets the sitemap, returned in a flat list, where the dictionary key is the page path. This method is ideal for page routing. */
705
+ get: {
706
+ parameters: {
707
+ query?: never;
708
+ header?: never;
709
+ path: {
710
+ /** @description The instance GUID, available from the API Keys section. */
711
+ guid: string | null;
712
+ /** @description The Type of API - fetch or preview. */
713
+ apitype: components["schemas"]["APIType"];
714
+ /** @description The locale code you want to retreive content for */
715
+ locale: string | null;
716
+ /** @description The reference name of the digital channel of the sitemap to return. If you only have one channel, your channel reference name is likely 'website'. */
717
+ channelName: string | null;
718
+ };
719
+ cookie?: never;
720
+ };
721
+ requestBody?: never;
722
+ responses: {
723
+ /** @description Returns the sitemap. */
724
+ 200: {
725
+ headers: {
726
+ [name: string]: unknown;
727
+ };
728
+ content: {
729
+ "application/json": {
730
+ [key: string]: components["schemas"]["HeadlessContentSiteMapItem"];
731
+ };
732
+ };
733
+ };
734
+ /** @description The request could not be authorized. Invalid or missing apiKey. */
735
+ 401: {
736
+ headers: {
737
+ [name: string]: unknown;
738
+ };
739
+ content: {
740
+ "application/json": components["schemas"]["EmptyResult"];
741
+ };
742
+ };
743
+ /** @description The page item is not found. If quering production, ensure the page has been published. */
744
+ 404: {
745
+ headers: {
746
+ [name: string]: unknown;
747
+ };
748
+ content: {
749
+ "application/json": components["schemas"]["NotFoundResult"];
750
+ };
751
+ };
752
+ };
753
+ };
754
+ put?: never;
755
+ post?: never;
756
+ delete?: never;
757
+ options?: never;
758
+ head?: never;
759
+ patch?: never;
760
+ trace?: never;
761
+ };
762
+ "/{guid}/{apitype}/{locale}/sitemap/nested/{channelName}": {
763
+ parameters: {
764
+ query?: never;
765
+ header?: never;
766
+ path?: never;
767
+ cookie?: never;
768
+ };
769
+ /** Gets the sitemap as an array in a nested format, ideal for generating menus. */
770
+ get: {
771
+ parameters: {
772
+ query?: never;
773
+ header?: never;
774
+ path: {
775
+ /** @description The instance GUID, available from the API Keys section. */
776
+ guid: string | null;
777
+ /** @description The Type of API - fetch or preview. */
778
+ apitype: components["schemas"]["APIType"];
779
+ /** @description The locale code you want to retreive content for */
780
+ locale: string | null;
781
+ /** @description The reference name of the digital channel of the sitemap to return. If you only have one channel, your channel reference name is likely 'website'. */
782
+ channelName: string | null;
783
+ };
784
+ cookie?: never;
785
+ };
786
+ requestBody?: never;
787
+ responses: {
788
+ /** @description Returns the sitemap. */
789
+ 200: {
790
+ headers: {
791
+ [name: string]: unknown;
792
+ };
793
+ content: {
794
+ "application/json": components["schemas"]["HeadlessContentSiteMapNestedItem"][];
795
+ };
796
+ };
797
+ /** @description The request could not be authorized. Invalid or missing apiKey. */
798
+ 401: {
799
+ headers: {
800
+ [name: string]: unknown;
801
+ };
802
+ content: {
803
+ "application/json": components["schemas"]["EmptyResult"];
804
+ };
805
+ };
806
+ /** @description The page item is not found. If quering production, ensure the page has been published. */
807
+ 404: {
808
+ headers: {
809
+ [name: string]: unknown;
810
+ };
811
+ content: {
812
+ "application/json": components["schemas"]["NotFoundResult"];
813
+ };
814
+ };
815
+ };
816
+ };
817
+ put?: never;
818
+ post?: never;
819
+ delete?: never;
820
+ options?: never;
821
+ head?: never;
822
+ patch?: never;
823
+ trace?: never;
824
+ };
825
+ "/{guid}/{apitype}/{locale}/sync/items": {
826
+ parameters: {
827
+ query?: never;
828
+ header?: never;
829
+ path?: never;
830
+ cookie?: never;
831
+ };
832
+ /** Retrieves all content items in a paged format.
833
+ * Each call returns a sync token that should be persisted and passed into subsequent requests to maintain sync state. */
834
+ get: {
835
+ parameters: {
836
+ query?: {
837
+ /** @description The token from the most recently synced value. */
838
+ syncToken?: number | null;
839
+ /** @description The number of items to return per set. */
840
+ pageSize?: number;
841
+ };
842
+ header?: never;
843
+ path: {
844
+ /** @description The instance GUID, available from the API Keys section. */
845
+ guid: string | null;
846
+ /** @description The Type of API - fetch or preview. */
847
+ apitype: components["schemas"]["APIType"];
848
+ /** @description The locale code you want to sync content items for. */
849
+ locale: string | null;
850
+ };
851
+ cookie?: never;
852
+ };
853
+ requestBody?: never;
854
+ responses: {
855
+ /** @description Returns the content items. */
856
+ 200: {
857
+ headers: {
858
+ [name: string]: unknown;
859
+ };
860
+ content: {
861
+ "application/json": components["schemas"]["HeadlessContentItemHeadlessSync"];
862
+ };
863
+ };
864
+ /** @description The request could not be authorized. Invalid or missing apiKey. */
865
+ 401: {
866
+ headers: {
867
+ [name: string]: unknown;
868
+ };
869
+ content: {
870
+ "application/json": components["schemas"]["EmptyResult"];
871
+ };
872
+ };
873
+ /** @description Not Found */
874
+ 404: {
875
+ headers: {
876
+ [name: string]: unknown;
877
+ };
878
+ content: {
879
+ "application/json": components["schemas"]["NotFoundResult"];
880
+ };
881
+ };
882
+ };
883
+ };
884
+ put?: never;
885
+ post?: never;
886
+ delete?: never;
887
+ options?: never;
888
+ head?: never;
889
+ patch?: never;
890
+ trace?: never;
891
+ };
892
+ "/{guid}/{apitype}/{locale}/sync/pages": {
893
+ parameters: {
894
+ query?: never;
895
+ header?: never;
896
+ path?: never;
897
+ cookie?: never;
898
+ };
899
+ /** Retrieves all pages items in a paged format.
900
+ * Each call returns a sync token that should be persisted and passed into subsequent requests to maintain sync state. */
901
+ get: {
902
+ parameters: {
903
+ query?: {
904
+ /** @description The token from the most recently synced value. */
905
+ syncToken?: number | null;
906
+ /** @description The number of items to return per set. */
907
+ pageSize?: number;
908
+ };
909
+ header?: never;
910
+ path: {
911
+ /** @description The instance GUID, available from the API Keys section. */
912
+ guid: string | null;
913
+ /** @description The Type of API - fetch or preview. */
914
+ apitype: components["schemas"]["APIType"];
915
+ /** @description The locale code you want to sync pages for. */
916
+ locale: string | null;
917
+ };
918
+ cookie?: never;
919
+ };
920
+ requestBody?: never;
921
+ responses: {
922
+ /** @description Returns the pages. */
923
+ 200: {
924
+ headers: {
925
+ [name: string]: unknown;
926
+ };
927
+ content: {
928
+ "application/json": components["schemas"]["HeadlessContentPageHeadlessSync"];
929
+ };
930
+ };
931
+ /** @description The request could not be authorized. Invalid or missing apiKey. */
932
+ 401: {
933
+ headers: {
934
+ [name: string]: unknown;
935
+ };
936
+ content: {
937
+ "application/json": components["schemas"]["EmptyResult"];
938
+ };
939
+ };
940
+ /** @description Not Found */
941
+ 404: {
942
+ headers: {
943
+ [name: string]: unknown;
944
+ };
945
+ content: {
946
+ "application/json": components["schemas"]["NotFoundResult"];
947
+ };
948
+ };
949
+ };
950
+ };
951
+ put?: never;
952
+ post?: never;
953
+ delete?: never;
954
+ options?: never;
955
+ head?: never;
956
+ patch?: never;
957
+ trace?: never;
958
+ };
959
+ "/{guid}/{apitype}/urlredirection": {
960
+ parameters: {
961
+ query?: never;
962
+ header?: never;
963
+ path?: never;
964
+ cookie?: never;
965
+ };
966
+ /** Gets the list of all URL Redirections since a particular date/time. Persist the lastAccessDate that is returned and use that value to maintain state on subsequent requests. */
967
+ get: {
968
+ parameters: {
969
+ query?: {
970
+ /** @description The last access date/time that the URL Redirections list was previously accessed, eg: 2020-09-24T10:00:00.00-04:00. */
971
+ lastAccessDate?: string | null;
972
+ };
973
+ header?: never;
974
+ path: {
975
+ /** @description The instance GUID, available from the API Keys section. */
976
+ guid: string | null;
977
+ /** @description The Type of API - fetch or preview. */
978
+ apitype: components["schemas"]["APIType"];
979
+ };
980
+ cookie?: never;
981
+ };
982
+ requestBody?: never;
983
+ responses: {
984
+ /** @description Returns the list. */
985
+ 200: {
986
+ headers: {
987
+ [name: string]: unknown;
988
+ };
989
+ content: {
990
+ "application/json": components["schemas"]["UrlRedirection"][];
991
+ };
992
+ };
993
+ /** @description The request could not be authorized. Invalid or missing apiKey. */
994
+ 401: {
995
+ headers: {
996
+ [name: string]: unknown;
997
+ };
998
+ content: {
999
+ "application/json": components["schemas"]["EmptyResult"];
1000
+ };
1001
+ };
1002
+ /** @description The list is not found. */
1003
+ 404: {
1004
+ headers: {
1005
+ [name: string]: unknown;
1006
+ };
1007
+ content: {
1008
+ "application/json": components["schemas"]["NotFoundResult"];
1009
+ };
1010
+ };
1011
+ };
1012
+ };
1013
+ put?: never;
1014
+ post?: never;
1015
+ delete?: never;
1016
+ options?: never;
1017
+ head?: never;
1018
+ patch?: never;
1019
+ trace?: never;
1020
+ };
1021
+ }
1022
+ export type webhooks = Record<string, never>;
1023
+ export interface components {
1024
+ schemas: {
1025
+ /** @enum {string} */
1026
+ APIType: "preview" | "fetch";
1027
+ /**
1028
+ * Format: int32
1029
+ * @enum {integer}
1030
+ */
1031
+ AgilityFieldType: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16;
1032
+ AgilityField: {
1033
+ name?: string | null;
1034
+ label?: string | null;
1035
+ type?: components["schemas"]["AgilityFieldType"];
1036
+ settings?: {
1037
+ [key: string]: string;
1038
+ } | null;
1039
+ };
1040
+ AgilityDefinition: {
1041
+ id?: string | null;
1042
+ /** Format: int32 */
1043
+ modelId?: number;
1044
+ guid?: string | null;
1045
+ /** Format: date-time */
1046
+ lastModifiedDate?: string;
1047
+ displayName?: string | null;
1048
+ referenceName?: string | null;
1049
+ name?: string | null;
1050
+ contentReferenceNames?: string[] | null;
1051
+ fields?: components["schemas"]["AgilityField"][] | null;
1052
+ };
1053
+ NotFoundResult: {
1054
+ /** Format: int32 */
1055
+ readonly statusCode?: number;
1056
+ };
1057
+ EmptyResult: Record<string, never>;
1058
+ HeadlessMediaItem: {
1059
+ /**
1060
+ * Format: int32
1061
+ * @description media Id.
1062
+ */
1063
+ mediaID?: number;
1064
+ /** @description Media item file name. */
1065
+ fileName?: string | null;
1066
+ /** @description Url that media item can be accessed at. */
1067
+ url?: string | null;
1068
+ /**
1069
+ * Format: int32
1070
+ * @description Size of media item in bytes.
1071
+ */
1072
+ size?: number;
1073
+ /**
1074
+ * Format: date-time
1075
+ * @description Last modified date.
1076
+ */
1077
+ modifiedOn?: string;
1078
+ /** @description List of meta data related to media item in key value format. */
1079
+ metaData?: {
1080
+ [key: string]: string;
1081
+ } | null;
1082
+ };
1083
+ HeadlessGallery: {
1084
+ /**
1085
+ * Format: int32
1086
+ * @description Gallery ID.
1087
+ */
1088
+ galleryId?: number;
1089
+ /** @description Gallery name. */
1090
+ name?: string | null;
1091
+ /** @description Gallery description. */
1092
+ description?: string | null;
1093
+ /** @description List of Media items in gallery. */
1094
+ media?: components["schemas"]["HeadlessMediaItem"][] | null;
1095
+ /** Format: int32 */
1096
+ count?: number;
1097
+ };
1098
+ HeadlessContentItem: {
1099
+ /**
1100
+ * Format: int32
1101
+ * @description The unique ID of the content item in this locale.
1102
+ * @example 10
1103
+ */
1104
+ contentID?: number;
1105
+ /** @description The system properties of the content item. */
1106
+ properties?: {
1107
+ [key: string]: unknown;
1108
+ } | null;
1109
+ /** @description A dictionary of the fields and the values of the content item. */
1110
+ fields?: {
1111
+ [key: string]: unknown;
1112
+ } | null;
1113
+ /** @description SEO related fields for the content item. This is only returned for Dynamic Page Items. */
1114
+ seo?: {
1115
+ [key: string]: unknown;
1116
+ } | null;
1117
+ };
1118
+ HeadlessContentListResponse: {
1119
+ /** @description The paginated items returned from the query. */
1120
+ items?: components["schemas"]["HeadlessContentItem"][] | null;
1121
+ /**
1122
+ * Format: int32
1123
+ * @description The total number of items in the list (excluding any pagination).
1124
+ * @example 20
1125
+ */
1126
+ totalCount?: number;
1127
+ };
1128
+ HeadlessContentPageVisibility: {
1129
+ /** @description Indicates if page is visible in the menu. */
1130
+ menu?: boolean;
1131
+ /** @description Indicates if the page is visible in the sitemap. */
1132
+ sitemap?: boolean;
1133
+ };
1134
+ HeadlessContentItemSeo: {
1135
+ /**
1136
+ * @description The meta description for this static/dynamic page.
1137
+ * @example Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
1138
+ */
1139
+ metaDescription?: string | null;
1140
+ /**
1141
+ * @description The meta keywords for this static/dynamic page.
1142
+ * @example Agility, Fast, Nimble
1143
+ */
1144
+ metaKeywords?: string | null;
1145
+ /**
1146
+ * @description Additional markup to be included in the *head* element of the page.
1147
+ * @example <meta name="robots" content="noindex" />
1148
+ */
1149
+ metaHTML?: string | null;
1150
+ };
1151
+ HeadlessContentScripts: {
1152
+ /** @description Indicates if scripts are excluded from global. */
1153
+ excludedFromGlobal?: boolean;
1154
+ /** @description Scripts to include on top of the page. */
1155
+ top?: string | null;
1156
+ /** @description Scripts to include on the bottom of the page. */
1157
+ bottom?: string | null;
1158
+ };
1159
+ HeadlessContentItemProperties: {
1160
+ /**
1161
+ * Format: int32
1162
+ * @description The state of this content item. 1 = Staging, 2 = Published, 3 = Deleted, 4 = Approved, 5 = AwaitingApproval, 6 = Declined, 7 = Unpublished
1163
+ * @example 2
1164
+ */
1165
+ state?: number;
1166
+ /**
1167
+ * Format: date-time
1168
+ * @description The date/time the item was last modified
1169
+ */
1170
+ modified?: string;
1171
+ /**
1172
+ * Format: date-time
1173
+ * @description The date/time this item was last modified.
1174
+ */
1175
+ created?: string;
1176
+ /**
1177
+ * Format: int32
1178
+ * @description The unique versionID of this content item.
1179
+ * @example 101
1180
+ */
1181
+ versionID?: number;
1182
+ /**
1183
+ * @description The reference name of this item is part of. This may be the reference name of a content list, item, or module.
1184
+ * @example News
1185
+ */
1186
+ referenceName?: string | null;
1187
+ /**
1188
+ * @description The reference name of the content/module definition this item is based on.
1189
+ * @example Article
1190
+ */
1191
+ definitionName?: string | null;
1192
+ /**
1193
+ * Format: int64
1194
+ * @description Used for sync tracking.
1195
+ */
1196
+ syncToken?: number;
1197
+ };
1198
+ HeadlessContentZone: {
1199
+ /** @description Name of the module */
1200
+ module?: string | null;
1201
+ item?: components["schemas"]["HeadlessContentItem"];
1202
+ };
1203
+ HeadlessContentPage: {
1204
+ /**
1205
+ * Format: int32
1206
+ * @description ID of the page.
1207
+ */
1208
+ pageID?: number;
1209
+ /** @description Page name. */
1210
+ name?: string | null;
1211
+ /** @description Path of the page. */
1212
+ path?: string | null;
1213
+ /** @description Title of the page. */
1214
+ title?: string | null;
1215
+ /** @description Menu text for the page. */
1216
+ menuText?: string | null;
1217
+ visible?: components["schemas"]["HeadlessContentPageVisibility"];
1218
+ /** @description Name of the template used to create the page. */
1219
+ templateName?: string | null;
1220
+ /** @description Redirect url of the page. */
1221
+ redirectUrl?: string | null;
1222
+ /** @description Indicates if the page is secure. */
1223
+ securePage?: boolean;
1224
+ /** @description Indicates if the page is excluded from cache. */
1225
+ excludeFromOutputCache?: boolean;
1226
+ seo?: components["schemas"]["HeadlessContentItemSeo"];
1227
+ scripts?: components["schemas"]["HeadlessContentScripts"];
1228
+ properties?: components["schemas"]["HeadlessContentItemProperties"];
1229
+ /** @description Zones on the page defined by the template */
1230
+ zones?: {
1231
+ [key: string]: components["schemas"]["HeadlessContentZone"][];
1232
+ } | null;
1233
+ };
1234
+ HeadlessContentPageBase: {
1235
+ /**
1236
+ * Format: int32
1237
+ * @description ID of the page.
1238
+ */
1239
+ pageID?: number;
1240
+ /** @description Page name. */
1241
+ name?: string | null;
1242
+ /** @description Path of the page. */
1243
+ path?: string | null;
1244
+ /** @description Title of the page. */
1245
+ title?: string | null;
1246
+ /** @description Menu text for the page. */
1247
+ menuText?: string | null;
1248
+ visible?: components["schemas"]["HeadlessContentPageVisibility"];
1249
+ };
1250
+ HeadlessContentPageByPath: {
1251
+ sitemapNode?: components["schemas"]["HeadlessContentPageBase"];
1252
+ page?: components["schemas"]["HeadlessContentPage"];
1253
+ };
1254
+ RedirectUrl: {
1255
+ /** @description Redirect Url. */
1256
+ url?: string | null;
1257
+ /** @description Target to open the Url in. */
1258
+ target?: string | null;
1259
+ };
1260
+ HeadlessContentSiteMapItem: {
1261
+ /**
1262
+ * Format: int32
1263
+ * @description ID of the page.
1264
+ */
1265
+ pageID?: number;
1266
+ /** @description Page name. */
1267
+ name?: string | null;
1268
+ /** @description Path of the page. */
1269
+ path?: string | null;
1270
+ /** @description Title of the page. */
1271
+ title?: string | null;
1272
+ /** @description Menu text for the page. */
1273
+ menuText?: string | null;
1274
+ visible?: components["schemas"]["HeadlessContentPageVisibility"];
1275
+ redirect?: components["schemas"]["RedirectUrl"];
1276
+ /** @description Indicates if the item is a folder. */
1277
+ isFolder?: boolean;
1278
+ /**
1279
+ * Format: int32
1280
+ * @description Content ID of the item.
1281
+ */
1282
+ contentID?: number | null;
1283
+ };
1284
+ HeadlessContentSiteMapNestedItem: {
1285
+ /**
1286
+ * Format: int32
1287
+ * @description ID of the page.
1288
+ */
1289
+ pageID?: number;
1290
+ /** @description Page name. */
1291
+ name?: string | null;
1292
+ /** @description Path of the page. */
1293
+ path?: string | null;
1294
+ /** @description Title of the page. */
1295
+ title?: string | null;
1296
+ /** @description Menu text for the page. */
1297
+ menuText?: string | null;
1298
+ visible?: components["schemas"]["HeadlessContentPageVisibility"];
1299
+ redirect?: components["schemas"]["RedirectUrl"];
1300
+ /** @description Indicates if the item is a folder. */
1301
+ isFolder?: boolean;
1302
+ /**
1303
+ * Format: int32
1304
+ * @description Content ID of the item.
1305
+ */
1306
+ contentID?: number | null;
1307
+ /** @description Children of this item */
1308
+ children?: components["schemas"]["HeadlessContentSiteMapNestedItem"][] | null;
1309
+ };
1310
+ HeadlessContentItemHeadlessSync: {
1311
+ /** Format: int64 */
1312
+ syncToken?: number;
1313
+ items?: components["schemas"]["HeadlessContentItem"][] | null;
1314
+ };
1315
+ HeadlessContentPageHeadlessSync: {
1316
+ /** Format: int64 */
1317
+ syncToken?: number;
1318
+ items?: components["schemas"]["HeadlessContentPage"][] | null;
1319
+ };
1320
+ UrlRedirection: {
1321
+ /** Format: int32 */
1322
+ id?: number;
1323
+ originUrl?: string | null;
1324
+ destinationUrl?: string | null;
1325
+ /** Format: int32 */
1326
+ statusCode?: number;
1327
+ };
1328
+ };
1329
+ responses: never;
1330
+ parameters: never;
1331
+ requestBodies: never;
1332
+ headers: never;
1333
+ pathItems: never;
1334
+ }
1335
+ export type $defs = Record<string, never>;
1336
+ export type operations = Record<string, never>;