@kontent-ai/delivery-sdk 16.4.3 → 16.4.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 (113) hide show
  1. package/.npmignore +15 -15
  2. package/LICENSE.md +9 -9
  3. package/dist/bundles/kontent-delivery.umd.js +5076 -4619
  4. package/dist/bundles/kontent-delivery.umd.js.map +1 -1
  5. package/dist/bundles/kontent-delivery.umd.min.js +1 -1
  6. package/dist/bundles/kontent-delivery.umd.min.js.map +1 -1
  7. package/dist/bundles/report.json +1 -1
  8. package/dist/bundles/report.min.json +1 -1
  9. package/dist/bundles/stats.json +7015 -5766
  10. package/dist/bundles/stats.min.json +11376 -10250
  11. package/dist/cjs/query/element/element-query.class.js +1 -1
  12. package/dist/cjs/query/element/element-query.class.js.map +1 -1
  13. package/dist/cjs/query/item/single-item-query.class.js +1 -1
  14. package/dist/cjs/query/item/single-item-query.class.js.map +1 -1
  15. package/dist/cjs/query/taxonomy/taxonomy-query.class.js +1 -1
  16. package/dist/cjs/query/taxonomy/taxonomy-query.class.js.map +1 -1
  17. package/dist/cjs/query/type/single-type-query.class.js +1 -1
  18. package/dist/cjs/query/type/single-type-query.class.js.map +1 -1
  19. package/dist/cjs/query/used-in/used-in-query.class.js +1 -1
  20. package/dist/cjs/query/used-in/used-in-query.class.js.map +1 -1
  21. package/dist/cjs/sdk-info.generated.js +1 -1
  22. package/dist/es6/query/element/element-query.class.js +1 -1
  23. package/dist/es6/query/element/element-query.class.js.map +1 -1
  24. package/dist/es6/query/item/single-item-query.class.js +1 -1
  25. package/dist/es6/query/item/single-item-query.class.js.map +1 -1
  26. package/dist/es6/query/taxonomy/taxonomy-query.class.js +1 -1
  27. package/dist/es6/query/taxonomy/taxonomy-query.class.js.map +1 -1
  28. package/dist/es6/query/type/single-type-query.class.js +1 -1
  29. package/dist/es6/query/type/single-type-query.class.js.map +1 -1
  30. package/dist/es6/query/used-in/used-in-query.class.js +1 -1
  31. package/dist/es6/query/used-in/used-in-query.class.js.map +1 -1
  32. package/dist/es6/sdk-info.generated.js +1 -1
  33. package/dist/esnext/query/element/element-query.class.js +1 -1
  34. package/dist/esnext/query/element/element-query.class.js.map +1 -1
  35. package/dist/esnext/query/item/single-item-query.class.js +1 -1
  36. package/dist/esnext/query/item/single-item-query.class.js.map +1 -1
  37. package/dist/esnext/query/taxonomy/taxonomy-query.class.js +1 -1
  38. package/dist/esnext/query/taxonomy/taxonomy-query.class.js.map +1 -1
  39. package/dist/esnext/query/type/single-type-query.class.js +1 -1
  40. package/dist/esnext/query/type/single-type-query.class.js.map +1 -1
  41. package/dist/esnext/query/used-in/used-in-query.class.js +1 -1
  42. package/dist/esnext/query/used-in/used-in-query.class.js.map +1 -1
  43. package/dist/esnext/sdk-info.generated.js +1 -1
  44. package/lib/client/delivery-client.factory.ts +9 -9
  45. package/lib/client/delivery-client.ts +163 -163
  46. package/lib/client/idelivery-client.interface.ts +110 -110
  47. package/lib/client/index.ts +3 -3
  48. package/lib/config/delivery-configs.ts +98 -98
  49. package/lib/config/index.ts +1 -1
  50. package/lib/contracts/contracts.ts +265 -265
  51. package/lib/contracts/index.ts +1 -1
  52. package/lib/elements/element-models.ts +89 -89
  53. package/lib/elements/element-resolver.ts +3 -3
  54. package/lib/elements/element-type.ts +16 -16
  55. package/lib/elements/elements.ts +70 -70
  56. package/lib/elements/index.ts +4 -4
  57. package/lib/images/image-url-transformation-builder.factory.ts +5 -5
  58. package/lib/images/image-url-transformation-builder.ts +181 -181
  59. package/lib/images/image.models.ts +4 -4
  60. package/lib/images/index.ts +3 -3
  61. package/lib/index.ts +12 -12
  62. package/lib/mappers/element.mapper.ts +504 -504
  63. package/lib/mappers/generic-element.mapper.ts +20 -20
  64. package/lib/mappers/index.ts +8 -8
  65. package/lib/mappers/item.mapper.ts +181 -181
  66. package/lib/mappers/language.mapper.ts +24 -24
  67. package/lib/mappers/sync.mapper.ts +32 -32
  68. package/lib/mappers/taxonomy.mapper.ts +77 -77
  69. package/lib/mappers/type.mapper.ts +76 -76
  70. package/lib/mappers/used-in.mapper.ts +20 -20
  71. package/lib/models/common/base-responses.ts +13 -13
  72. package/lib/models/common/common-models.ts +118 -118
  73. package/lib/models/common/filters.ts +280 -280
  74. package/lib/models/common/headers.ts +5 -5
  75. package/lib/models/common/index.ts +7 -7
  76. package/lib/models/common/pagination.class.ts +7 -7
  77. package/lib/models/common/parameters.ts +189 -189
  78. package/lib/models/common/sort-order.ts +1 -1
  79. package/lib/models/content-type-models.ts +42 -42
  80. package/lib/models/element-models.ts +51 -51
  81. package/lib/models/index.ts +9 -9
  82. package/lib/models/item-models.ts +192 -192
  83. package/lib/models/language-models.ts +17 -17
  84. package/lib/models/responses.ts +137 -137
  85. package/lib/models/sync-models.ts +18 -18
  86. package/lib/models/taxonomy-models.ts +25 -25
  87. package/lib/query/common/base-item-listing-query.class.ts +274 -274
  88. package/lib/query/common/base-listing-query.class.ts +95 -95
  89. package/lib/query/common/base-query.class.ts +148 -148
  90. package/lib/query/element/element-query.class.ts +47 -45
  91. package/lib/query/index.ts +13 -13
  92. package/lib/query/item/multiple-items-query.class.ts +183 -183
  93. package/lib/query/item/single-item-query.class.ts +106 -106
  94. package/lib/query/items-feed/items-feed-query.class.ts +191 -191
  95. package/lib/query/language/languages-query.class.ts +91 -91
  96. package/lib/query/sync/initialize-sync-query.class.ts +83 -83
  97. package/lib/query/sync/sync-changes-query.class.ts +56 -56
  98. package/lib/query/taxonomy/taxonomies-query.class.ts +82 -82
  99. package/lib/query/taxonomy/taxonomy-query.class.ts +50 -50
  100. package/lib/query/type/multiple-type-query.class.ts +95 -95
  101. package/lib/query/type/single-type-query.class.ts +45 -45
  102. package/lib/query/used-in/used-in-query.class.ts +128 -126
  103. package/lib/sdk-info.generated.ts +1 -1
  104. package/lib/services/base-delivery-query.service.ts +375 -375
  105. package/lib/services/delivery-query.service.ts +336 -336
  106. package/lib/services/index.ts +2 -2
  107. package/lib/services/mapping.service.ts +223 -223
  108. package/lib/utilities/codename.helper.ts +10 -10
  109. package/lib/utilities/delivery-url.helper.ts +11 -11
  110. package/lib/utilities/enum.helper.ts +38 -38
  111. package/lib/utilities/index.ts +3 -3
  112. package/package.json +96 -96
  113. package/readme.md +531 -531
@@ -1,265 +1,265 @@
1
- export namespace Contracts {
2
- export interface IPaginationContract {
3
- skip: number;
4
- limit: number;
5
- count: number;
6
- next_page: string;
7
- total_count?: number;
8
- }
9
-
10
- export interface IContentTypeElementContract {
11
- codename?: string;
12
- type: string;
13
- name: string;
14
- taxonomy_group?: string;
15
- options?: IElementOptionContract[];
16
- }
17
-
18
- export interface IContentTypeElementsContainer {
19
- [key: string]: IContentTypeElementContract;
20
- }
21
-
22
- export interface IElementOptionContract {
23
- name: string;
24
- codename: string;
25
- }
26
-
27
- export interface IListLanguagesContract {
28
- languages: ILanguageContract[];
29
- pagination: IPaginationContract;
30
- }
31
-
32
- export interface IContentItemDeltaContract {
33
- data: {
34
- system: IContentItemSystemAttributesContract;
35
- elements: IContentItemElementsContracts | undefined;
36
- };
37
- change_type: 'changed_item' | 'deleted_item';
38
- timestamp: string;
39
- }
40
-
41
- export interface IInitializeSyncContract {
42
- items: IContentItemDeltaContract[];
43
- }
44
-
45
- export interface ISyncChangesContract {
46
- items: IContentItemDeltaContract[];
47
- }
48
-
49
- export interface ILanguageContract {
50
- system: {
51
- id: string;
52
- name: string;
53
- codename: string;
54
- };
55
- }
56
-
57
- export interface IViewContentTypeElementContract {
58
- codename?: string;
59
- type: string;
60
- name: string;
61
- taxonomy_group?: string;
62
- options?: IElementOptionContract[];
63
- }
64
-
65
- export interface IElementContract {
66
- codename?: string;
67
- name: string;
68
- type: string;
69
- value: any;
70
- taxonomy_group?: string;
71
- }
72
-
73
- export interface IDateTimeElementContract extends IElementContract {
74
- /**
75
- * Display time zone
76
- */
77
- display_timezone: string;
78
- }
79
-
80
- export interface IAsssetRenditionContract {
81
- rendition_id: string;
82
- preset_id: string;
83
- width: number;
84
- height: number;
85
- query: string;
86
- }
87
-
88
- export interface IAssetContract {
89
- name: string;
90
- type: string;
91
- size: number;
92
- description: string;
93
- url: string;
94
- width: number | null;
95
- height: number | null;
96
- renditions?: { [renditionPresetCodename: string]: IAsssetRenditionContract };
97
- }
98
-
99
- export interface IMultipleChoiceOptionContract {
100
- name: string;
101
- codename: string;
102
- }
103
-
104
- export interface ITaxonomyTerm {
105
- name: string;
106
- codename: string;
107
- }
108
-
109
- export interface IRichTextElementLinkWrapperContract {
110
- [key: string]: IRichTextElementLinkContract;
111
- }
112
-
113
- export interface IRichTextElementLinkContract {
114
- type: string;
115
- codename: string;
116
- url_slug: string;
117
- }
118
-
119
- export interface IRichTextElementImageWrapperContract {
120
- [key: string]: IRichTextElementImageContract;
121
- }
122
-
123
- export interface IRichTextElementImageContract {
124
- image_id: string;
125
- url: string;
126
- description: string | null;
127
- height: number | null;
128
- width: number | null;
129
- }
130
-
131
- export interface IRichTextElementContract extends IElementContract {
132
- /**
133
- * Modular content items
134
- */
135
- modular_content: string[];
136
-
137
- /**
138
- * Json with links
139
- */
140
- links: IRichTextElementLinkWrapperContract;
141
-
142
- /**
143
- * Json with images
144
- */
145
- images: IRichTextElementImageWrapperContract;
146
- }
147
-
148
- export interface IContentItemElementsContracts {
149
- [key: string]: IElementContract;
150
- }
151
-
152
- export interface ILinkContract {
153
- codename: string;
154
- type: string;
155
- url_slug: string;
156
- }
157
-
158
- export interface IModularContentContract {
159
- [key: string]: IModularContentContentItemContract;
160
- }
161
-
162
- export interface IModularContentContentItemContract {
163
- system: IContentItemSystemAttributesContract;
164
- elements: IContentItemElementsContracts;
165
- }
166
-
167
- export interface IContentItemContract {
168
- system: IContentItemSystemAttributesContract;
169
- elements: IContentItemElementsContracts;
170
- }
171
-
172
- export interface IContentItemSystemAttributesContract {
173
- id: string;
174
- name: string;
175
- codename: string;
176
- type: string;
177
- last_modified: string;
178
- language: string;
179
- sitemap_locations: string[];
180
- collection: string;
181
- workflow_step: string | null;
182
- workflow: string | null;
183
- }
184
-
185
- export interface IItemsWithModularContentContract {
186
- items: IContentItemContract[];
187
- modular_content: IModularContentContract;
188
- }
189
-
190
- export interface IItemsFeedContract extends IItemsWithModularContentContract {}
191
-
192
- export interface IUsedInItemsContract {
193
- items: IUsedInItemContract[];
194
- }
195
-
196
- export interface IUsedInItemContract {
197
- system: {
198
- id: string;
199
- name: string;
200
- codename: string;
201
- language: string;
202
- type: string;
203
- collection: string;
204
- workflow: string;
205
- workflow_step: string;
206
- last_modified: string;
207
- };
208
- }
209
-
210
- export interface IListContentItemsContract extends IItemsWithModularContentContract {
211
- pagination: IPaginationContract;
212
- }
213
-
214
- export interface IViewContentItemContract {
215
- item: IContentItemContract;
216
- modular_content: IModularContentContract;
217
- }
218
-
219
- export interface ITaxonomyTermsContract {
220
- name: string;
221
- codename: string;
222
- terms: ITaxonomyTermsContract[];
223
- }
224
-
225
- export interface ITaxonomySystemAttributesContract {
226
- id: string;
227
- name: string;
228
- codename: string;
229
- last_modified: Date;
230
- }
231
-
232
- export interface ITaxonomyGroupContract {
233
- system: ITaxonomySystemAttributesContract;
234
- terms: ITaxonomyTermsContract[];
235
- }
236
-
237
- export interface IViewTaxonomyGroupContract {
238
- system: ITaxonomySystemAttributesContract;
239
- terms: ITaxonomyTermsContract[];
240
- }
241
-
242
- export interface IListTaxonomyGroupsContract {
243
- taxonomies: ITaxonomyGroupContract[];
244
- pagination: IPaginationContract;
245
- }
246
-
247
- export interface IContentTypeSystemAttributesContract {
248
- id: string;
249
- name: string;
250
- codename: string;
251
- last_modified: Date;
252
- }
253
-
254
- export interface IContentTypeContract {
255
- system: IContentTypeSystemAttributesContract;
256
- elements: IContentTypeElementsContainer;
257
- }
258
-
259
- export interface IListContentTypeContract {
260
- types: IContentTypeContract[];
261
- pagination: IPaginationContract;
262
- }
263
-
264
- export interface IViewContentTypeContract extends IContentTypeContract {}
265
- }
1
+ export namespace Contracts {
2
+ export interface IPaginationContract {
3
+ skip: number;
4
+ limit: number;
5
+ count: number;
6
+ next_page: string;
7
+ total_count?: number;
8
+ }
9
+
10
+ export interface IContentTypeElementContract {
11
+ codename?: string;
12
+ type: string;
13
+ name: string;
14
+ taxonomy_group?: string;
15
+ options?: IElementOptionContract[];
16
+ }
17
+
18
+ export interface IContentTypeElementsContainer {
19
+ [key: string]: IContentTypeElementContract;
20
+ }
21
+
22
+ export interface IElementOptionContract {
23
+ name: string;
24
+ codename: string;
25
+ }
26
+
27
+ export interface IListLanguagesContract {
28
+ languages: ILanguageContract[];
29
+ pagination: IPaginationContract;
30
+ }
31
+
32
+ export interface IContentItemDeltaContract {
33
+ data: {
34
+ system: IContentItemSystemAttributesContract;
35
+ elements: IContentItemElementsContracts | undefined;
36
+ };
37
+ change_type: 'changed_item' | 'deleted_item';
38
+ timestamp: string;
39
+ }
40
+
41
+ export interface IInitializeSyncContract {
42
+ items: IContentItemDeltaContract[];
43
+ }
44
+
45
+ export interface ISyncChangesContract {
46
+ items: IContentItemDeltaContract[];
47
+ }
48
+
49
+ export interface ILanguageContract {
50
+ system: {
51
+ id: string;
52
+ name: string;
53
+ codename: string;
54
+ };
55
+ }
56
+
57
+ export interface IViewContentTypeElementContract {
58
+ codename?: string;
59
+ type: string;
60
+ name: string;
61
+ taxonomy_group?: string;
62
+ options?: IElementOptionContract[];
63
+ }
64
+
65
+ export interface IElementContract {
66
+ codename?: string;
67
+ name: string;
68
+ type: string;
69
+ value: any;
70
+ taxonomy_group?: string;
71
+ }
72
+
73
+ export interface IDateTimeElementContract extends IElementContract {
74
+ /**
75
+ * Display time zone
76
+ */
77
+ display_timezone: string;
78
+ }
79
+
80
+ export interface IAsssetRenditionContract {
81
+ rendition_id: string;
82
+ preset_id: string;
83
+ width: number;
84
+ height: number;
85
+ query: string;
86
+ }
87
+
88
+ export interface IAssetContract {
89
+ name: string;
90
+ type: string;
91
+ size: number;
92
+ description: string;
93
+ url: string;
94
+ width: number | null;
95
+ height: number | null;
96
+ renditions?: { [renditionPresetCodename: string]: IAsssetRenditionContract };
97
+ }
98
+
99
+ export interface IMultipleChoiceOptionContract {
100
+ name: string;
101
+ codename: string;
102
+ }
103
+
104
+ export interface ITaxonomyTerm {
105
+ name: string;
106
+ codename: string;
107
+ }
108
+
109
+ export interface IRichTextElementLinkWrapperContract {
110
+ [key: string]: IRichTextElementLinkContract;
111
+ }
112
+
113
+ export interface IRichTextElementLinkContract {
114
+ type: string;
115
+ codename: string;
116
+ url_slug: string;
117
+ }
118
+
119
+ export interface IRichTextElementImageWrapperContract {
120
+ [key: string]: IRichTextElementImageContract;
121
+ }
122
+
123
+ export interface IRichTextElementImageContract {
124
+ image_id: string;
125
+ url: string;
126
+ description: string | null;
127
+ height: number | null;
128
+ width: number | null;
129
+ }
130
+
131
+ export interface IRichTextElementContract extends IElementContract {
132
+ /**
133
+ * Modular content items
134
+ */
135
+ modular_content: string[];
136
+
137
+ /**
138
+ * Json with links
139
+ */
140
+ links: IRichTextElementLinkWrapperContract;
141
+
142
+ /**
143
+ * Json with images
144
+ */
145
+ images: IRichTextElementImageWrapperContract;
146
+ }
147
+
148
+ export interface IContentItemElementsContracts {
149
+ [key: string]: IElementContract;
150
+ }
151
+
152
+ export interface ILinkContract {
153
+ codename: string;
154
+ type: string;
155
+ url_slug: string;
156
+ }
157
+
158
+ export interface IModularContentContract {
159
+ [key: string]: IModularContentContentItemContract;
160
+ }
161
+
162
+ export interface IModularContentContentItemContract {
163
+ system: IContentItemSystemAttributesContract;
164
+ elements: IContentItemElementsContracts;
165
+ }
166
+
167
+ export interface IContentItemContract {
168
+ system: IContentItemSystemAttributesContract;
169
+ elements: IContentItemElementsContracts;
170
+ }
171
+
172
+ export interface IContentItemSystemAttributesContract {
173
+ id: string;
174
+ name: string;
175
+ codename: string;
176
+ type: string;
177
+ last_modified: string;
178
+ language: string;
179
+ sitemap_locations: string[];
180
+ collection: string;
181
+ workflow_step: string | null;
182
+ workflow: string | null;
183
+ }
184
+
185
+ export interface IItemsWithModularContentContract {
186
+ items: IContentItemContract[];
187
+ modular_content: IModularContentContract;
188
+ }
189
+
190
+ export interface IItemsFeedContract extends IItemsWithModularContentContract {}
191
+
192
+ export interface IUsedInItemsContract {
193
+ items: IUsedInItemContract[];
194
+ }
195
+
196
+ export interface IUsedInItemContract {
197
+ system: {
198
+ id: string;
199
+ name: string;
200
+ codename: string;
201
+ language: string;
202
+ type: string;
203
+ collection: string;
204
+ workflow: string;
205
+ workflow_step: string;
206
+ last_modified: string;
207
+ };
208
+ }
209
+
210
+ export interface IListContentItemsContract extends IItemsWithModularContentContract {
211
+ pagination: IPaginationContract;
212
+ }
213
+
214
+ export interface IViewContentItemContract {
215
+ item: IContentItemContract;
216
+ modular_content: IModularContentContract;
217
+ }
218
+
219
+ export interface ITaxonomyTermsContract {
220
+ name: string;
221
+ codename: string;
222
+ terms: ITaxonomyTermsContract[];
223
+ }
224
+
225
+ export interface ITaxonomySystemAttributesContract {
226
+ id: string;
227
+ name: string;
228
+ codename: string;
229
+ last_modified: Date;
230
+ }
231
+
232
+ export interface ITaxonomyGroupContract {
233
+ system: ITaxonomySystemAttributesContract;
234
+ terms: ITaxonomyTermsContract[];
235
+ }
236
+
237
+ export interface IViewTaxonomyGroupContract {
238
+ system: ITaxonomySystemAttributesContract;
239
+ terms: ITaxonomyTermsContract[];
240
+ }
241
+
242
+ export interface IListTaxonomyGroupsContract {
243
+ taxonomies: ITaxonomyGroupContract[];
244
+ pagination: IPaginationContract;
245
+ }
246
+
247
+ export interface IContentTypeSystemAttributesContract {
248
+ id: string;
249
+ name: string;
250
+ codename: string;
251
+ last_modified: Date;
252
+ }
253
+
254
+ export interface IContentTypeContract {
255
+ system: IContentTypeSystemAttributesContract;
256
+ elements: IContentTypeElementsContainer;
257
+ }
258
+
259
+ export interface IListContentTypeContract {
260
+ types: IContentTypeContract[];
261
+ pagination: IPaginationContract;
262
+ }
263
+
264
+ export interface IViewContentTypeContract extends IContentTypeContract {}
265
+ }
@@ -1 +1 @@
1
- export * from './contracts';
1
+ export * from './contracts';