@remkoj/optimizely-cms-api 5.0.2 → 6.0.0-pre1

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 (198) hide show
  1. package/dist/api-client.d.ts +53 -10
  2. package/dist/api-client.js +142 -42
  3. package/dist/client/client/client.d.ts +2 -0
  4. package/dist/client/client/client.js +147 -0
  5. package/dist/client/client/index.d.ts +7 -0
  6. package/dist/client/client/index.js +14 -0
  7. package/dist/client/client/types.d.ts +119 -0
  8. package/dist/client/client/utils.d.ts +45 -0
  9. package/dist/client/client/utils.js +296 -0
  10. package/dist/client/client.gen.d.ts +12 -0
  11. package/dist/client/client.gen.js +9 -0
  12. package/dist/client/core/auth.d.ts +18 -0
  13. package/dist/client/core/auth.js +17 -0
  14. package/dist/client/core/bodySerializer.d.ts +17 -0
  15. package/dist/client/core/bodySerializer.js +56 -0
  16. package/dist/client/core/params.d.ts +23 -0
  17. package/dist/client/core/params.js +91 -0
  18. package/dist/client/core/pathSerializer.d.ts +33 -0
  19. package/dist/client/core/pathSerializer.js +122 -0
  20. package/dist/client/core/types.d.ts +73 -0
  21. package/dist/client/index.d.ts +4 -78
  22. package/dist/client/index.js +19 -46
  23. package/dist/client/sdk.gen.d.ts +256 -0
  24. package/dist/client/sdk.gen.js +638 -0
  25. package/dist/client/transformers.gen.d.ts +34 -0
  26. package/dist/client/transformers.gen.js +273 -0
  27. package/dist/client/types.gen.d.ts +2941 -0
  28. package/dist/client/types.gen.js +87 -0
  29. package/dist/client-config.d.ts +2 -0
  30. package/dist/client-config.js +27 -0
  31. package/dist/config.js +1 -2
  32. package/dist/getaccesstoken.js +1 -2
  33. package/dist/index.d.ts +3 -5
  34. package/dist/index.js +6 -8
  35. package/dist/version.json +2 -2
  36. package/package.json +20 -11
  37. package/dist/client/CmsIntegrationApiClient.d.ts +0 -22
  38. package/dist/client/CmsIntegrationApiClient.js +0 -34
  39. package/dist/client/core/ApiError.d.ts +0 -10
  40. package/dist/client/core/ApiError.js +0 -15
  41. package/dist/client/core/ApiRequestOptions.d.ts +0 -13
  42. package/dist/client/core/ApiResult.d.ts +0 -7
  43. package/dist/client/core/BaseHttpRequest.d.ts +0 -8
  44. package/dist/client/core/BaseHttpRequest.js +0 -9
  45. package/dist/client/core/CancelablePromise.d.ts +0 -20
  46. package/dist/client/core/CancelablePromise.js +0 -116
  47. package/dist/client/core/FetchHttpRequest.d.ts +0 -14
  48. package/dist/client/core/FetchHttpRequest.js +0 -20
  49. package/dist/client/core/OpenAPI.d.ts +0 -16
  50. package/dist/client/core/OpenAPI.js +0 -14
  51. package/dist/client/core/request.d.ts +0 -30
  52. package/dist/client/core/request.js +0 -294
  53. package/dist/client/models/BinaryProperty.d.ts +0 -8
  54. package/dist/client/models/BinaryProperty.js +0 -2
  55. package/dist/client/models/BooleanProperty.d.ts +0 -5
  56. package/dist/client/models/BooleanProperty.js +0 -2
  57. package/dist/client/models/Changeset.d.ts +0 -26
  58. package/dist/client/models/Changeset.js +0 -2
  59. package/dist/client/models/ChangesetItem.d.ts +0 -11
  60. package/dist/client/models/ChangesetItem.js +0 -2
  61. package/dist/client/models/ChangesetItemPage.d.ts +0 -19
  62. package/dist/client/models/ChangesetItemPage.js +0 -2
  63. package/dist/client/models/ChangesetPage.d.ts +0 -19
  64. package/dist/client/models/ChangesetPage.js +0 -2
  65. package/dist/client/models/ComponentListItem.d.ts +0 -10
  66. package/dist/client/models/ComponentListItem.js +0 -2
  67. package/dist/client/models/ComponentProperty.d.ts +0 -10
  68. package/dist/client/models/ComponentProperty.js +0 -2
  69. package/dist/client/models/CompositionBehavior.d.ts +0 -7
  70. package/dist/client/models/CompositionBehavior.js +0 -15
  71. package/dist/client/models/ContentBaseType.d.ts +0 -14
  72. package/dist/client/models/ContentBaseType.js +0 -22
  73. package/dist/client/models/ContentComponent.d.ts +0 -30
  74. package/dist/client/models/ContentComponent.js +0 -2
  75. package/dist/client/models/ContentItem.d.ts +0 -60
  76. package/dist/client/models/ContentItem.js +0 -2
  77. package/dist/client/models/ContentItemListWithContentTypes.d.ts +0 -27
  78. package/dist/client/models/ContentItemListWithContentTypes.js +0 -2
  79. package/dist/client/models/ContentItemPage.d.ts +0 -19
  80. package/dist/client/models/ContentItemPage.js +0 -2
  81. package/dist/client/models/ContentItemWithContentTypes.d.ts +0 -12
  82. package/dist/client/models/ContentItemWithContentTypes.js +0 -2
  83. package/dist/client/models/ContentListItem.d.ts +0 -14
  84. package/dist/client/models/ContentListItem.js +0 -2
  85. package/dist/client/models/ContentLocaleInfo.d.ts +0 -19
  86. package/dist/client/models/ContentLocaleInfo.js +0 -2
  87. package/dist/client/models/ContentMetadata.d.ts +0 -38
  88. package/dist/client/models/ContentMetadata.js +0 -2
  89. package/dist/client/models/ContentMetadataPage.d.ts +0 -19
  90. package/dist/client/models/ContentMetadataPage.js +0 -2
  91. package/dist/client/models/ContentProperty.d.ts +0 -14
  92. package/dist/client/models/ContentProperty.js +0 -2
  93. package/dist/client/models/ContentReference.d.ts +0 -17
  94. package/dist/client/models/ContentReference.js +0 -2
  95. package/dist/client/models/ContentReferenceListItem.d.ts +0 -14
  96. package/dist/client/models/ContentReferenceListItem.js +0 -2
  97. package/dist/client/models/ContentReferenceProperty.d.ts +0 -14
  98. package/dist/client/models/ContentReferenceProperty.js +0 -2
  99. package/dist/client/models/ContentType.d.ts +0 -84
  100. package/dist/client/models/ContentType.js +0 -2
  101. package/dist/client/models/ContentTypeFeature.d.ts +0 -10
  102. package/dist/client/models/ContentTypeFeature.js +0 -18
  103. package/dist/client/models/ContentTypePage.d.ts +0 -19
  104. package/dist/client/models/ContentTypePage.js +0 -2
  105. package/dist/client/models/ContentTypeProperty.d.ts +0 -47
  106. package/dist/client/models/ContentTypeProperty.js +0 -2
  107. package/dist/client/models/ContentTypeUsage.d.ts +0 -7
  108. package/dist/client/models/ContentTypeUsage.js +0 -15
  109. package/dist/client/models/CopyContentOptions.d.ts +0 -21
  110. package/dist/client/models/CopyContentOptions.js +0 -2
  111. package/dist/client/models/DateTimeListItem.d.ts +0 -14
  112. package/dist/client/models/DateTimeListItem.js +0 -2
  113. package/dist/client/models/DateTimeProperty.d.ts +0 -14
  114. package/dist/client/models/DateTimeProperty.js +0 -2
  115. package/dist/client/models/DisplaySetting.d.ts +0 -22
  116. package/dist/client/models/DisplaySetting.js +0 -2
  117. package/dist/client/models/DisplaySettingChoice.d.ts +0 -13
  118. package/dist/client/models/DisplaySettingChoice.js +0 -2
  119. package/dist/client/models/DisplayTemplate.d.ts +0 -49
  120. package/dist/client/models/DisplayTemplate.js +0 -2
  121. package/dist/client/models/DisplayTemplatePage.d.ts +0 -19
  122. package/dist/client/models/DisplayTemplatePage.js +0 -2
  123. package/dist/client/models/DoubleEnumerationSettings.d.ts +0 -10
  124. package/dist/client/models/DoubleEnumerationSettings.js +0 -2
  125. package/dist/client/models/DoubleEnumerationValue.d.ts +0 -13
  126. package/dist/client/models/DoubleEnumerationValue.js +0 -2
  127. package/dist/client/models/FloatListItem.d.ts +0 -16
  128. package/dist/client/models/FloatListItem.js +0 -2
  129. package/dist/client/models/FloatProperty.d.ts +0 -16
  130. package/dist/client/models/FloatProperty.js +0 -2
  131. package/dist/client/models/ImageDescriptor.d.ts +0 -17
  132. package/dist/client/models/ImageDescriptor.js +0 -2
  133. package/dist/client/models/IndexingType.d.ts +0 -8
  134. package/dist/client/models/IndexingType.js +0 -16
  135. package/dist/client/models/Int32EnumerationSettings.d.ts +0 -10
  136. package/dist/client/models/Int32EnumerationSettings.js +0 -2
  137. package/dist/client/models/Int32EnumerationValue.d.ts +0 -13
  138. package/dist/client/models/Int32EnumerationValue.js +0 -2
  139. package/dist/client/models/IntegerListItem.d.ts +0 -16
  140. package/dist/client/models/IntegerListItem.js +0 -2
  141. package/dist/client/models/IntegerProperty.d.ts +0 -16
  142. package/dist/client/models/IntegerProperty.js +0 -2
  143. package/dist/client/models/JsonStringProperty.d.ts +0 -5
  144. package/dist/client/models/JsonStringProperty.js +0 -2
  145. package/dist/client/models/ListProperty.d.ts +0 -26
  146. package/dist/client/models/ListProperty.js +0 -2
  147. package/dist/client/models/ListPropertyItem.d.ts +0 -11
  148. package/dist/client/models/ListPropertyItem.js +0 -2
  149. package/dist/client/models/LocaleStatus.d.ts +0 -7
  150. package/dist/client/models/LocaleStatus.js +0 -15
  151. package/dist/client/models/OauthToken.d.ts +0 -18
  152. package/dist/client/models/OauthToken.js +0 -2
  153. package/dist/client/models/OauthTokenError.d.ts +0 -13
  154. package/dist/client/models/OauthTokenError.js +0 -2
  155. package/dist/client/models/OauthTokenRequest.d.ts +0 -21
  156. package/dist/client/models/OauthTokenRequest.js +0 -2
  157. package/dist/client/models/ProblemDetails.d.ts +0 -1
  158. package/dist/client/models/ProblemDetails.js +0 -2
  159. package/dist/client/models/PropertyDataType.d.ts +0 -18
  160. package/dist/client/models/PropertyDataType.js +0 -26
  161. package/dist/client/models/PropertyFormat.d.ts +0 -37
  162. package/dist/client/models/PropertyFormat.js +0 -2
  163. package/dist/client/models/PropertyFormatPage.d.ts +0 -19
  164. package/dist/client/models/PropertyFormatPage.js +0 -2
  165. package/dist/client/models/PropertyGroup.d.ts +0 -21
  166. package/dist/client/models/PropertyGroup.js +0 -2
  167. package/dist/client/models/PropertyGroupPage.d.ts +0 -19
  168. package/dist/client/models/PropertyGroupPage.js +0 -2
  169. package/dist/client/models/StringEnumerationSettings.d.ts +0 -10
  170. package/dist/client/models/StringEnumerationSettings.js +0 -2
  171. package/dist/client/models/StringEnumerationValue.d.ts +0 -13
  172. package/dist/client/models/StringEnumerationValue.js +0 -2
  173. package/dist/client/models/StringListItem.d.ts +0 -20
  174. package/dist/client/models/StringListItem.js +0 -2
  175. package/dist/client/models/StringProperty.d.ts +0 -20
  176. package/dist/client/models/StringProperty.js +0 -2
  177. package/dist/client/models/UrlListItem.d.ts +0 -5
  178. package/dist/client/models/UrlListItem.js +0 -2
  179. package/dist/client/models/UrlProperty.d.ts +0 -5
  180. package/dist/client/models/UrlProperty.js +0 -2
  181. package/dist/client/models/VersionStatus.d.ts +0 -12
  182. package/dist/client/models/VersionStatus.js +0 -20
  183. package/dist/client/services/ChangesetsService.d.ts +0 -105
  184. package/dist/client/services/ChangesetsService.js +0 -239
  185. package/dist/client/services/ContentService.d.ts +0 -172
  186. package/dist/client/services/ContentService.js +0 -409
  187. package/dist/client/services/ContentTypesService.d.ts +0 -66
  188. package/dist/client/services/ContentTypesService.js +0 -149
  189. package/dist/client/services/DisplayTemplatesService.d.ts +0 -60
  190. package/dist/client/services/DisplayTemplatesService.js +0 -135
  191. package/dist/client/services/OauthService.d.ts +0 -17
  192. package/dist/client/services/OauthService.js +0 -28
  193. package/dist/client/services/PropertyFormatsService.d.ts +0 -26
  194. package/dist/client/services/PropertyFormatsService.js +0 -53
  195. package/dist/client/services/PropertyGroupsService.d.ts +0 -61
  196. package/dist/client/services/PropertyGroupsService.js +0 -135
  197. /package/dist/client/{core/ApiRequestOptions.js → client/types.js} +0 -0
  198. /package/dist/client/core/{ApiResult.js → types.js} +0 -0
@@ -1,409 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ContentService = void 0;
4
- class ContentService {
5
- constructor(httpRequest) {
6
- this.httpRequest = httpRequest;
7
- }
8
- /**
9
- * Create content
10
- * Create a new content item.
11
- * @param requestBody The content item that should be created.
12
- * @param skipValidation Indicates that the content validation should be ignored.
13
- * @returns ContentItem Created
14
- * @throws ApiError
15
- */
16
- contentCreate(requestBody, skipValidation) {
17
- return this.httpRequest.request({
18
- method: 'POST',
19
- url: '/content',
20
- query: {
21
- 'skipValidation': skipValidation,
22
- },
23
- body: requestBody,
24
- mediaType: 'application/json',
25
- errors: {
26
- 400: `Bad Request`,
27
- 403: `Forbidden`,
28
- },
29
- });
30
- }
31
- /**
32
- * Get content
33
- * Get shared metadata about the content instance with the provided key.
34
- * @param key The key of the content to retrieve metadata for.
35
- * @param allowDeleted Indicates that metadata for a deleted content may be returned.
36
- * @returns ContentMetadata OK
37
- * @throws ApiError
38
- */
39
- contentGetMetadata(key, allowDeleted) {
40
- return this.httpRequest.request({
41
- method: 'GET',
42
- url: '/content/{key}',
43
- path: {
44
- 'key': key,
45
- },
46
- query: {
47
- 'allowDeleted': allowDeleted,
48
- },
49
- errors: {
50
- 403: `Forbidden`,
51
- },
52
- });
53
- }
54
- /**
55
- * Update content
56
- * Update an existing content item. If a content item with the provided key does not exist an error is returned.
57
- * @param key The key of the content item to patch.
58
- * @param requestBody The values of the content item that should be updated.
59
- * @returns ContentMetadata OK
60
- * @throws ApiError
61
- */
62
- contentPatchMetadata(key, requestBody) {
63
- return this.httpRequest.request({
64
- method: 'PATCH',
65
- url: '/content/{key}',
66
- path: {
67
- 'key': key,
68
- },
69
- body: requestBody,
70
- mediaType: 'application/merge-patch+json',
71
- errors: {
72
- 400: `Bad Request`,
73
- 403: `Forbidden`,
74
- },
75
- });
76
- }
77
- /**
78
- * Delete content
79
- * Deletes the content item with the provided key. If a content item with the provided key does not exist an error is returned.
80
- * @param key The key of the content item to delete.
81
- * @param permanent Indicates that the content item should be permanently deleted immediately or if it should be soft deleted first.
82
- * @returns ContentMetadata OK
83
- * @throws ApiError
84
- */
85
- contentDelete(key, permanent) {
86
- return this.httpRequest.request({
87
- method: 'DELETE',
88
- url: '/content/{key}',
89
- path: {
90
- 'key': key,
91
- },
92
- query: {
93
- 'permanent': permanent,
94
- },
95
- errors: {
96
- 400: `Bad Request`,
97
- 403: `Forbidden`,
98
- },
99
- });
100
- }
101
- /**
102
- * Get content path
103
- * Get the content path with the provided key.
104
- * @param key The key of the content path to retrieve.
105
- * @param pageIndex
106
- * @param pageSize
107
- * @returns ContentMetadataPage OK
108
- * @throws ApiError
109
- */
110
- contentGetPath(key, pageIndex, pageSize) {
111
- return this.httpRequest.request({
112
- method: 'GET',
113
- url: '/content/{key}/path',
114
- path: {
115
- 'key': key,
116
- },
117
- query: {
118
- 'pageIndex': pageIndex,
119
- 'pageSize': pageSize,
120
- },
121
- errors: {
122
- 403: `Forbidden`,
123
- },
124
- });
125
- }
126
- /**
127
- * List content in container
128
- * List the content items located in a specific container.
129
- * @param key The key of the content to retrieve items for.
130
- * @param contentTypes Indicates which content types or base types to include in the list.
131
- * @param pageIndex
132
- * @param pageSize
133
- * @returns ContentMetadataPage OK
134
- * @throws ApiError
135
- */
136
- contentListItems(key, contentTypes, pageIndex, pageSize) {
137
- return this.httpRequest.request({
138
- method: 'GET',
139
- url: '/content/{key}/items',
140
- path: {
141
- 'key': key,
142
- },
143
- query: {
144
- 'contentTypes': contentTypes,
145
- 'pageIndex': pageIndex,
146
- 'pageSize': pageSize,
147
- },
148
- errors: {
149
- 403: `Forbidden`,
150
- },
151
- });
152
- }
153
- /**
154
- * List assets
155
- * List the assets that belongs to a content instance.
156
- * @param key The key of the content to retrieve assets for.
157
- * @param contentTypes Indicates which content types or base types to include in the list.
158
- * @param pageIndex
159
- * @param pageSize
160
- * @returns ContentMetadataPage OK
161
- * @throws ApiError
162
- */
163
- contentListAssets(key, contentTypes, pageIndex, pageSize) {
164
- return this.httpRequest.request({
165
- method: 'GET',
166
- url: '/content/{key}/assets',
167
- path: {
168
- 'key': key,
169
- },
170
- query: {
171
- 'contentTypes': contentTypes,
172
- 'pageIndex': pageIndex,
173
- 'pageSize': pageSize,
174
- },
175
- errors: {
176
- 403: `Forbidden`,
177
- },
178
- });
179
- }
180
- /**
181
- * Copy content
182
- * Create a copy of the content item with the provided key.
183
- * @param key The key of the content item to copy.
184
- * @param requestBody Optional instructions for how to copy content.
185
- * @returns ContentMetadata OK
186
- * @throws ApiError
187
- */
188
- contentCopy(key, requestBody) {
189
- return this.httpRequest.request({
190
- method: 'POST',
191
- url: '/content/{key}:copy',
192
- path: {
193
- 'key': key,
194
- },
195
- body: requestBody,
196
- mediaType: 'application/json',
197
- errors: {
198
- 400: `Bad Request`,
199
- 403: `Forbidden`,
200
- },
201
- });
202
- }
203
- /**
204
- * Restore content
205
- * Restore the deleted content item with the provided key. If a content item with the provided key is not deleted an error is returned.
206
- * @param key The key of the content item to undelete.
207
- * @returns ContentMetadata OK
208
- * @throws ApiError
209
- */
210
- contentUndelete(key) {
211
- return this.httpRequest.request({
212
- method: 'POST',
213
- url: '/content/{key}:undelete',
214
- path: {
215
- 'key': key,
216
- },
217
- errors: {
218
- 400: `Bad Request`,
219
- 403: `Forbidden`,
220
- },
221
- });
222
- }
223
- /**
224
- * Query versions
225
- * List content versions based on the provided query options.
226
- * @param locales Indicates which content locales that should be listed. Use 'NEUTRAL' to include locale-neutral content.
227
- * Locale must be a valid IETF BCP-47 language tag.
228
- * @param statuses Indicates which status content versions must have to be listed.
229
- * @param pageIndex
230
- * @param pageSize
231
- * @returns ContentItemPage OK
232
- * @throws ApiError
233
- */
234
- contentListAllVersions(locales, statuses, pageIndex, pageSize) {
235
- return this.httpRequest.request({
236
- method: 'GET',
237
- url: '/content/versions',
238
- query: {
239
- 'locales': locales,
240
- 'statuses': statuses,
241
- 'pageIndex': pageIndex,
242
- 'pageSize': pageSize,
243
- },
244
- errors: {
245
- 403: `Forbidden`,
246
- },
247
- });
248
- }
249
- /**
250
- * List versions
251
- * List versions of the content item with the provided key and the provided options.
252
- * @param key
253
- * @param locales Indicates which content locales that should be listed. Use 'NEUTRAL' to include locale-neutral content.
254
- * Locale must be a valid IETF BCP-47 language tag.
255
- * @param statuses Indicates which status content versions must have to be listed.
256
- * @param pageIndex
257
- * @param pageSize
258
- * @returns ContentItemPage OK
259
- * @throws ApiError
260
- */
261
- contentListVersions(key, locales, statuses, pageIndex, pageSize) {
262
- return this.httpRequest.request({
263
- method: 'GET',
264
- url: '/content/{key}/versions',
265
- path: {
266
- 'key': key,
267
- },
268
- query: {
269
- 'locales': locales,
270
- 'statuses': statuses,
271
- 'pageIndex': pageIndex,
272
- 'pageSize': pageSize,
273
- },
274
- errors: {
275
- 403: `Forbidden`,
276
- },
277
- });
278
- }
279
- /**
280
- * Create version
281
- * Create a new version of a content item.
282
- * @param key The key of the content item for which a new content version should be created.
283
- * @param requestBody The content version that should be created.
284
- * @param skipValidation Indicates that the content validation should be ignored.
285
- * @returns ContentItem Created
286
- * @throws ApiError
287
- */
288
- contentCreateVersion(key, requestBody, skipValidation) {
289
- return this.httpRequest.request({
290
- method: 'POST',
291
- url: '/content/{key}/versions',
292
- path: {
293
- 'key': key,
294
- },
295
- query: {
296
- 'skipValidation': skipValidation,
297
- },
298
- body: requestBody,
299
- mediaType: 'application/json',
300
- errors: {
301
- 400: `Bad Request`,
302
- 403: `Forbidden`,
303
- },
304
- });
305
- }
306
- /**
307
- * Delete locale
308
- * Deletes the content item with the provided key. If a content item with the provided key does not exist an error is returned.
309
- * @param key
310
- * @param locale
311
- * @returns ContentItem OK
312
- * @throws ApiError
313
- */
314
- contentDeleteLocale(key, locale) {
315
- return this.httpRequest.request({
316
- method: 'DELETE',
317
- url: '/content/{key}/versions',
318
- path: {
319
- 'key': key,
320
- },
321
- query: {
322
- 'locale': locale,
323
- },
324
- errors: {
325
- 400: `Bad Request`,
326
- 403: `Forbidden`,
327
- },
328
- });
329
- }
330
- /**
331
- * Get version
332
- * Get the content item with the provided key and version.
333
- * @param key
334
- * @param version
335
- * @param locale
336
- * @returns ContentItem OK
337
- * @throws ApiError
338
- */
339
- contentGetVersion(key, version, locale) {
340
- return this.httpRequest.request({
341
- method: 'GET',
342
- url: '/content/{key}/versions/{version}',
343
- path: {
344
- 'key': key,
345
- 'version': version,
346
- },
347
- query: {
348
- 'locale': locale,
349
- },
350
- errors: {
351
- 403: `Forbidden`,
352
- },
353
- });
354
- }
355
- /**
356
- * Update version
357
- * Update an existing content item. If a content item with the provided key does not exist an error is returned.
358
- * @param key The key of the content item that should be updated.
359
- * @param version The version of the content that should be updated.
360
- * @param requestBody The content information that should be updated.
361
- * @param locale The locale of the content that should be updated.
362
- * @param skipValidation Indicates that the content validation should be ignored.
363
- * @returns ContentItem OK
364
- * @throws ApiError
365
- */
366
- contentPatchVersion(key, version, requestBody, locale, skipValidation) {
367
- return this.httpRequest.request({
368
- method: 'PATCH',
369
- url: '/content/{key}/versions/{version}',
370
- path: {
371
- 'key': key,
372
- 'version': version,
373
- },
374
- query: {
375
- 'locale': locale,
376
- 'skipValidation': skipValidation,
377
- },
378
- body: requestBody,
379
- mediaType: 'application/merge-patch+json',
380
- errors: {
381
- 400: `Bad Request`,
382
- 403: `Forbidden`,
383
- },
384
- });
385
- }
386
- /**
387
- * Delete version
388
- * Deletes the content item with the provided key. If a content item with the provided key does not exist an error is returned.
389
- * @param key
390
- * @param version
391
- * @returns ContentItem OK
392
- * @throws ApiError
393
- */
394
- contentDeleteVersion(key, version) {
395
- return this.httpRequest.request({
396
- method: 'DELETE',
397
- url: '/content/{key}/versions/{version}',
398
- path: {
399
- 'key': key,
400
- 'version': version,
401
- },
402
- errors: {
403
- 400: `Bad Request`,
404
- 403: `Forbidden`,
405
- },
406
- });
407
- }
408
- }
409
- exports.ContentService = ContentService;
@@ -1,66 +0,0 @@
1
- import type { ContentType } from '../models/ContentType';
2
- import type { ContentTypePage } from '../models/ContentTypePage';
3
- import type { CancelablePromise } from '../core/CancelablePromise';
4
- import type { BaseHttpRequest } from '../core/BaseHttpRequest';
5
- export declare class ContentTypesService {
6
- readonly httpRequest: BaseHttpRequest;
7
- constructor(httpRequest: BaseHttpRequest);
8
- /**
9
- * List content types
10
- * List content types using the provided options.
11
- * @param forContainerType Only include types that are available for creation under the provided container type
12
- * @param sources Indicates which sources should be included when listing content types.
13
- * Use All to include content types from all sources or
14
- * Default to include content types without a specific sources.
15
- * @param pageIndex
16
- * @param pageSize
17
- * @returns ContentTypePage OK
18
- * @throws ApiError
19
- */
20
- contentTypesList(forContainerType?: string, sources?: Array<string>, pageIndex?: number, pageSize?: number): CancelablePromise<ContentTypePage>;
21
- /**
22
- * Create content type
23
- * Create a new content type.
24
- * @param requestBody The content type that should be created.
25
- * @returns ContentType OK
26
- * @throws ApiError
27
- */
28
- contentTypesCreate(requestBody: ContentType): CancelablePromise<ContentType>;
29
- /**
30
- * Get content type
31
- * Get the content type with the provided key.
32
- * @param key The key of the content type to retrieve.
33
- * @returns ContentType OK
34
- * @throws ApiError
35
- */
36
- contentTypesGet(key: string): CancelablePromise<ContentType>;
37
- /**
38
- * Create or replace content type
39
- * Create or replace a content type. If a content type with the provided key exist it is replaced.
40
- * Otherwise a new content type is created.
41
- * @param key The key of the content type to update or create.
42
- * @param requestBody The values of the created or replaced content type.
43
- * @param ignoreDataLossWarnings Update the content type even though the changes might result in data loss.
44
- * @returns ContentType OK
45
- * @throws ApiError
46
- */
47
- contentTypesPut(key: string, requestBody: ContentType, ignoreDataLossWarnings?: boolean): CancelablePromise<ContentType>;
48
- /**
49
- * Update content type
50
- * Update an existing content type. If a content type with the provided key does not exist an error is returned.
51
- * @param key The key of the content type to patch.
52
- * @param requestBody The values of the content type that should be updated.
53
- * @param ignoreDataLossWarnings Update the content type even though the changes might result in data loss.
54
- * @returns ContentType OK
55
- * @throws ApiError
56
- */
57
- contentTypesPatch(key: string, requestBody: ContentType, ignoreDataLossWarnings?: boolean): CancelablePromise<ContentType>;
58
- /**
59
- * Delete content type
60
- * Deletes the content type with the provided key. If a content type with the provided key does not exist an error is returned.
61
- * @param key The key of the content type to delete.
62
- * @returns ContentType OK
63
- * @throws ApiError
64
- */
65
- contentTypesDelete(key: string): CancelablePromise<ContentType>;
66
- }
@@ -1,149 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ContentTypesService = void 0;
4
- class ContentTypesService {
5
- constructor(httpRequest) {
6
- this.httpRequest = httpRequest;
7
- }
8
- /**
9
- * List content types
10
- * List content types using the provided options.
11
- * @param forContainerType Only include types that are available for creation under the provided container type
12
- * @param sources Indicates which sources should be included when listing content types.
13
- * Use All to include content types from all sources or
14
- * Default to include content types without a specific sources.
15
- * @param pageIndex
16
- * @param pageSize
17
- * @returns ContentTypePage OK
18
- * @throws ApiError
19
- */
20
- contentTypesList(forContainerType, sources, pageIndex, pageSize) {
21
- return this.httpRequest.request({
22
- method: 'GET',
23
- url: '/contenttypes',
24
- query: {
25
- 'forContainerType': forContainerType,
26
- 'sources': sources,
27
- 'pageIndex': pageIndex,
28
- 'pageSize': pageSize,
29
- },
30
- errors: {
31
- 403: `Forbidden`,
32
- },
33
- });
34
- }
35
- /**
36
- * Create content type
37
- * Create a new content type.
38
- * @param requestBody The content type that should be created.
39
- * @returns ContentType OK
40
- * @throws ApiError
41
- */
42
- contentTypesCreate(requestBody) {
43
- return this.httpRequest.request({
44
- method: 'POST',
45
- url: '/contenttypes',
46
- body: requestBody,
47
- mediaType: 'application/json',
48
- errors: {
49
- 400: `Bad Request`,
50
- 403: `Forbidden`,
51
- },
52
- });
53
- }
54
- /**
55
- * Get content type
56
- * Get the content type with the provided key.
57
- * @param key The key of the content type to retrieve.
58
- * @returns ContentType OK
59
- * @throws ApiError
60
- */
61
- contentTypesGet(key) {
62
- return this.httpRequest.request({
63
- method: 'GET',
64
- url: '/contenttypes/{key}',
65
- path: {
66
- 'key': key,
67
- },
68
- errors: {
69
- 403: `Forbidden`,
70
- },
71
- });
72
- }
73
- /**
74
- * Create or replace content type
75
- * Create or replace a content type. If a content type with the provided key exist it is replaced.
76
- * Otherwise a new content type is created.
77
- * @param key The key of the content type to update or create.
78
- * @param requestBody The values of the created or replaced content type.
79
- * @param ignoreDataLossWarnings Update the content type even though the changes might result in data loss.
80
- * @returns ContentType OK
81
- * @throws ApiError
82
- */
83
- contentTypesPut(key, requestBody, ignoreDataLossWarnings) {
84
- return this.httpRequest.request({
85
- method: 'PUT',
86
- url: '/contenttypes/{key}',
87
- path: {
88
- 'key': key,
89
- },
90
- query: {
91
- 'ignoreDataLossWarnings': ignoreDataLossWarnings,
92
- },
93
- body: requestBody,
94
- mediaType: 'application/json',
95
- errors: {
96
- 400: `Bad Request`,
97
- 403: `Forbidden`,
98
- },
99
- });
100
- }
101
- /**
102
- * Update content type
103
- * Update an existing content type. If a content type with the provided key does not exist an error is returned.
104
- * @param key The key of the content type to patch.
105
- * @param requestBody The values of the content type that should be updated.
106
- * @param ignoreDataLossWarnings Update the content type even though the changes might result in data loss.
107
- * @returns ContentType OK
108
- * @throws ApiError
109
- */
110
- contentTypesPatch(key, requestBody, ignoreDataLossWarnings) {
111
- return this.httpRequest.request({
112
- method: 'PATCH',
113
- url: '/contenttypes/{key}',
114
- path: {
115
- 'key': key,
116
- },
117
- query: {
118
- 'ignoreDataLossWarnings': ignoreDataLossWarnings,
119
- },
120
- body: requestBody,
121
- mediaType: 'application/merge-patch+json',
122
- errors: {
123
- 400: `Bad Request`,
124
- 403: `Forbidden`,
125
- },
126
- });
127
- }
128
- /**
129
- * Delete content type
130
- * Deletes the content type with the provided key. If a content type with the provided key does not exist an error is returned.
131
- * @param key The key of the content type to delete.
132
- * @returns ContentType OK
133
- * @throws ApiError
134
- */
135
- contentTypesDelete(key) {
136
- return this.httpRequest.request({
137
- method: 'DELETE',
138
- url: '/contenttypes/{key}',
139
- path: {
140
- 'key': key,
141
- },
142
- errors: {
143
- 400: `Bad Request`,
144
- 403: `Forbidden`,
145
- },
146
- });
147
- }
148
- }
149
- exports.ContentTypesService = ContentTypesService;
@@ -1,60 +0,0 @@
1
- import type { DisplayTemplate } from '../models/DisplayTemplate';
2
- import type { DisplayTemplatePage } from '../models/DisplayTemplatePage';
3
- import type { CancelablePromise } from '../core/CancelablePromise';
4
- import type { BaseHttpRequest } from '../core/BaseHttpRequest';
5
- export declare class DisplayTemplatesService {
6
- readonly httpRequest: BaseHttpRequest;
7
- constructor(httpRequest: BaseHttpRequest);
8
- /**
9
- * List display templates
10
- * List display templates using the provided options.
11
- * @param pageIndex
12
- * @param pageSize
13
- * @returns DisplayTemplatePage OK
14
- * @throws ApiError
15
- */
16
- displayTemplatesList(pageIndex?: number, pageSize?: number): CancelablePromise<DisplayTemplatePage>;
17
- /**
18
- * Create display template
19
- * Create a new display template.
20
- * @param requestBody The display template that should be created.
21
- * @returns DisplayTemplate OK
22
- * @throws ApiError
23
- */
24
- displayTemplatesCreate(requestBody: DisplayTemplate): CancelablePromise<DisplayTemplate>;
25
- /**
26
- * Get display template
27
- * Get the display template with the provided key.
28
- * @param key The key of the display template to retrieve.
29
- * @returns DisplayTemplate OK
30
- * @throws ApiError
31
- */
32
- displayTemplatesGet(key: string): CancelablePromise<DisplayTemplate>;
33
- /**
34
- * Create or replace a display template
35
- * Create or replace a display template. If a display template with the provided key exist it is replaced.
36
- * Otherwise a new display template is created.
37
- * @param key The key of the display template to update or create.
38
- * @param requestBody The values of the created or replaced display template.
39
- * @returns DisplayTemplate OK
40
- * @throws ApiError
41
- */
42
- displayTemplatesPut(key: string, requestBody: DisplayTemplate): CancelablePromise<DisplayTemplate>;
43
- /**
44
- * Update display template
45
- * Update an existing display template.
46
- * @param key The key of the display template to patch.
47
- * @param requestBody The values of the display template that should be updated.
48
- * @returns DisplayTemplate OK
49
- * @throws ApiError
50
- */
51
- displayTemplatesPatch(key: string, requestBody: DisplayTemplate): CancelablePromise<DisplayTemplate>;
52
- /**
53
- * Delete display template
54
- * Deletes the display template with the provided key.
55
- * @param key The key of the display template to delete.
56
- * @returns DisplayTemplate OK
57
- * @throws ApiError
58
- */
59
- displayTemplatesDelete(key: string): CancelablePromise<DisplayTemplate>;
60
- }