@remkoj/optimizely-cms-api 5.1.7 → 5.3.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 (142) hide show
  1. package/README.md +6 -2
  2. package/dist/api-client.js +11 -7
  3. package/dist/client/CmsIntegrationApiClient.d.ts +2 -2
  4. package/dist/client/CmsIntegrationApiClient.js +4 -4
  5. package/dist/client/core/OpenAPI.js +2 -2
  6. package/dist/client/index.d.ts +14 -45
  7. package/dist/client/index.js +13 -19
  8. package/dist/client/models/ArrayItem.d.ts +70 -0
  9. package/dist/client/models/ArrayItem.js +25 -0
  10. package/dist/client/models/Blueprint.d.ts +24 -0
  11. package/dist/client/models/BlueprintData.d.ts +11 -0
  12. package/dist/client/models/BlueprintPage.d.ts +19 -0
  13. package/dist/client/models/Changeset.d.ts +3 -3
  14. package/dist/client/models/ChangesetItemPage.d.ts +1 -1
  15. package/dist/client/models/ChangesetPage.d.ts +1 -1
  16. package/dist/client/models/CompositionDisplaySettings.d.ts +13 -0
  17. package/dist/client/models/CompositionNode.d.ts +41 -0
  18. package/dist/client/models/ContentComponent.d.ts +8 -8
  19. package/dist/client/models/ContentItem.d.ts +28 -5
  20. package/dist/client/models/ContentItem.js +17 -0
  21. package/dist/client/models/ContentItemPage.d.ts +1 -1
  22. package/dist/client/models/ContentLocaleInfo.d.ts +13 -2
  23. package/dist/client/models/ContentLocaleInfo.js +12 -0
  24. package/dist/client/models/ContentMetadataPage.d.ts +1 -1
  25. package/dist/client/models/ContentType.d.ts +11 -36
  26. package/dist/client/models/ContentTypePage.d.ts +1 -1
  27. package/dist/client/models/ContentTypeProperty.d.ts +84 -8
  28. package/dist/client/models/ContentTypeProperty.js +34 -0
  29. package/dist/client/models/DisplayTemplate.d.ts +6 -5
  30. package/dist/client/models/DisplayTemplatePage.d.ts +1 -1
  31. package/dist/client/models/EnumerationValue.d.ts +13 -0
  32. package/dist/client/models/ImageDescriptor.d.ts +1 -1
  33. package/dist/client/models/Link.d.ts +21 -0
  34. package/dist/client/models/Preview.d.ts +13 -0
  35. package/dist/client/models/PropertyFormat.d.ts +60 -16
  36. package/dist/client/models/PropertyFormat.js +44 -0
  37. package/dist/client/models/PropertyFormatPage.d.ts +1 -1
  38. package/dist/client/models/PropertyGroup.d.ts +14 -1
  39. package/dist/client/models/PropertyGroupPage.d.ts +1 -1
  40. package/dist/client/services/BlueprintsService.d.ts +56 -0
  41. package/dist/client/services/BlueprintsService.js +135 -0
  42. package/dist/client/services/ChangesetsService.d.ts +32 -30
  43. package/dist/client/services/ChangesetsService.js +73 -60
  44. package/dist/client/services/ContentService.d.ts +46 -35
  45. package/dist/client/services/ContentService.js +100 -55
  46. package/dist/client/services/ContentTypesService.d.ts +17 -23
  47. package/dist/client/services/ContentTypesService.js +34 -41
  48. package/dist/client/services/DisplayTemplatesService.d.ts +14 -18
  49. package/dist/client/services/DisplayTemplatesService.js +31 -31
  50. package/dist/client/services/PropertyFormatsService.d.ts +3 -1
  51. package/dist/client/services/PropertyFormatsService.js +9 -1
  52. package/dist/client/services/PropertyGroupsService.d.ts +15 -20
  53. package/dist/client/services/PropertyGroupsService.js +32 -33
  54. package/dist/enums.d.ts +35 -0
  55. package/dist/enums.js +40 -0
  56. package/dist/getaccesstoken.js +4 -3
  57. package/dist/index.d.ts +1 -0
  58. package/dist/index.js +1 -0
  59. package/dist/version.json +3 -3
  60. package/package.json +6 -6
  61. package/dist/client/models/BinaryProperty.d.ts +0 -8
  62. package/dist/client/models/BooleanProperty.d.ts +0 -5
  63. package/dist/client/models/ComponentListItem.d.ts +0 -10
  64. package/dist/client/models/ComponentProperty.d.ts +0 -10
  65. package/dist/client/models/CompositionBehavior.d.ts +0 -7
  66. package/dist/client/models/CompositionBehavior.js +0 -15
  67. package/dist/client/models/ContentBaseType.d.ts +0 -14
  68. package/dist/client/models/ContentBaseType.js +0 -22
  69. package/dist/client/models/ContentItemListWithContentTypes.d.ts +0 -27
  70. package/dist/client/models/ContentItemWithContentTypes.d.ts +0 -12
  71. package/dist/client/models/ContentListItem.d.ts +0 -14
  72. package/dist/client/models/ContentProperty.d.ts +0 -14
  73. package/dist/client/models/ContentReferenceListItem.d.ts +0 -14
  74. package/dist/client/models/ContentReferenceListItem.js +0 -2
  75. package/dist/client/models/ContentReferenceProperty.d.ts +0 -14
  76. package/dist/client/models/ContentReferenceProperty.js +0 -2
  77. package/dist/client/models/ContentTypeFeature.d.ts +0 -10
  78. package/dist/client/models/ContentTypeFeature.js +0 -18
  79. package/dist/client/models/ContentTypeUsage.d.ts +0 -7
  80. package/dist/client/models/ContentTypeUsage.js +0 -15
  81. package/dist/client/models/DateTimeListItem.d.ts +0 -14
  82. package/dist/client/models/DateTimeListItem.js +0 -2
  83. package/dist/client/models/DateTimeProperty.d.ts +0 -14
  84. package/dist/client/models/DateTimeProperty.js +0 -2
  85. package/dist/client/models/DoubleEnumerationSettings.d.ts +0 -10
  86. package/dist/client/models/DoubleEnumerationSettings.js +0 -2
  87. package/dist/client/models/DoubleEnumerationValue.d.ts +0 -13
  88. package/dist/client/models/DoubleEnumerationValue.js +0 -2
  89. package/dist/client/models/FloatListItem.d.ts +0 -16
  90. package/dist/client/models/FloatListItem.js +0 -2
  91. package/dist/client/models/FloatProperty.d.ts +0 -16
  92. package/dist/client/models/FloatProperty.js +0 -2
  93. package/dist/client/models/IndexingType.d.ts +0 -8
  94. package/dist/client/models/IndexingType.js +0 -16
  95. package/dist/client/models/Int32EnumerationSettings.d.ts +0 -10
  96. package/dist/client/models/Int32EnumerationSettings.js +0 -2
  97. package/dist/client/models/Int32EnumerationValue.d.ts +0 -13
  98. package/dist/client/models/Int32EnumerationValue.js +0 -2
  99. package/dist/client/models/IntegerListItem.d.ts +0 -16
  100. package/dist/client/models/IntegerListItem.js +0 -2
  101. package/dist/client/models/IntegerProperty.d.ts +0 -16
  102. package/dist/client/models/IntegerProperty.js +0 -2
  103. package/dist/client/models/JsonStringProperty.d.ts +0 -5
  104. package/dist/client/models/JsonStringProperty.js +0 -2
  105. package/dist/client/models/ListProperty.d.ts +0 -26
  106. package/dist/client/models/ListProperty.js +0 -2
  107. package/dist/client/models/ListPropertyItem.d.ts +0 -11
  108. package/dist/client/models/ListPropertyItem.js +0 -2
  109. package/dist/client/models/LocaleStatus.d.ts +0 -7
  110. package/dist/client/models/LocaleStatus.js +0 -15
  111. package/dist/client/models/OauthToken.d.ts +0 -18
  112. package/dist/client/models/OauthToken.js +0 -2
  113. package/dist/client/models/OauthTokenError.d.ts +0 -13
  114. package/dist/client/models/OauthTokenError.js +0 -2
  115. package/dist/client/models/OauthTokenRequest.d.ts +0 -21
  116. package/dist/client/models/OauthTokenRequest.js +0 -2
  117. package/dist/client/models/PropertyDataType.d.ts +0 -18
  118. package/dist/client/models/PropertyDataType.js +0 -26
  119. package/dist/client/models/StringEnumerationSettings.d.ts +0 -10
  120. package/dist/client/models/StringEnumerationSettings.js +0 -2
  121. package/dist/client/models/StringEnumerationValue.d.ts +0 -13
  122. package/dist/client/models/StringEnumerationValue.js +0 -2
  123. package/dist/client/models/StringListItem.d.ts +0 -20
  124. package/dist/client/models/StringListItem.js +0 -2
  125. package/dist/client/models/StringProperty.d.ts +0 -20
  126. package/dist/client/models/StringProperty.js +0 -2
  127. package/dist/client/models/UrlListItem.d.ts +0 -5
  128. package/dist/client/models/UrlListItem.js +0 -2
  129. package/dist/client/models/UrlProperty.d.ts +0 -5
  130. package/dist/client/models/UrlProperty.js +0 -2
  131. package/dist/client/models/VersionStatus.d.ts +0 -12
  132. package/dist/client/models/VersionStatus.js +0 -20
  133. package/dist/client/services/OauthService.d.ts +0 -17
  134. package/dist/client/services/OauthService.js +0 -28
  135. /package/dist/client/models/{BinaryProperty.js → Blueprint.js} +0 -0
  136. /package/dist/client/models/{BooleanProperty.js → BlueprintData.js} +0 -0
  137. /package/dist/client/models/{ComponentListItem.js → BlueprintPage.js} +0 -0
  138. /package/dist/client/models/{ComponentProperty.js → CompositionDisplaySettings.js} +0 -0
  139. /package/dist/client/models/{ContentItemListWithContentTypes.js → CompositionNode.js} +0 -0
  140. /package/dist/client/models/{ContentItemWithContentTypes.js → EnumerationValue.js} +0 -0
  141. /package/dist/client/models/{ContentListItem.js → Link.js} +0 -0
  142. /package/dist/client/models/{ContentProperty.js → Preview.js} +0 -0
@@ -3,7 +3,7 @@ import type { ContentItemPage } from '../models/ContentItemPage';
3
3
  import type { ContentMetadata } from '../models/ContentMetadata';
4
4
  import type { ContentMetadataPage } from '../models/ContentMetadataPage';
5
5
  import type { CopyContentOptions } from '../models/CopyContentOptions';
6
- import type { VersionStatus } from '../models/VersionStatus';
6
+ import type { Preview } from '../models/Preview';
7
7
  import type { CancelablePromise } from '../core/CancelablePromise';
8
8
  import type { BaseHttpRequest } from '../core/BaseHttpRequest';
9
9
  export declare class ContentService {
@@ -11,16 +11,16 @@ export declare class ContentService {
11
11
  constructor(httpRequest: BaseHttpRequest);
12
12
  /**
13
13
  * Create content
14
- * Create a new content item.
14
+ * Create a new content item. This API is experimental and may change in future releases.
15
15
  * @param requestBody The content item that should be created.
16
- * @param skipValidation Indicates that the content validation should be ignored.
16
+ * @param cmsSkipValidation Indicates that the content validation should be ignored.
17
17
  * @returns ContentItem Created
18
18
  * @throws ApiError
19
19
  */
20
- contentCreate(requestBody: ContentItem, skipValidation?: boolean): CancelablePromise<ContentItem>;
20
+ contentCreate(requestBody: ContentItem, cmsSkipValidation?: boolean): CancelablePromise<ContentItem>;
21
21
  /**
22
22
  * Get content
23
- * Get shared metadata about the content instance with the provided key.
23
+ * Get shared metadata about the content instance with the provided key. This API is experimental and may change in future releases.
24
24
  * @param key The key of the content to retrieve metadata for.
25
25
  * @param allowDeleted Indicates that metadata for a deleted content may be returned.
26
26
  * @returns ContentMetadata OK
@@ -28,26 +28,26 @@ export declare class ContentService {
28
28
  */
29
29
  contentGetMetadata(key: string, allowDeleted?: boolean): CancelablePromise<ContentMetadata>;
30
30
  /**
31
- * Update content
32
- * Update an existing content item. If a content item with the provided key does not exist an error is returned.
31
+ * Patch content
32
+ * Patch an existing content item. If a content item with the provided key does not exist an error is returned. This API is experimental and may change in future releases.
33
33
  * @param key The key of the content item to patch.
34
- * @param requestBody The values of the content item that should be updated.
34
+ * @param requestBody The values of the content item that should be patched.
35
35
  * @returns ContentMetadata OK
36
36
  * @throws ApiError
37
37
  */
38
38
  contentPatchMetadata(key: string, requestBody: ContentMetadata): CancelablePromise<ContentMetadata>;
39
39
  /**
40
40
  * Delete content
41
- * Deletes the content item with the provided key. If a content item with the provided key does not exist an error is returned.
41
+ * Deletes the content item with the provided key. If a content item with the provided key does not exist an error is returned. This API is experimental and may change in future releases.
42
42
  * @param key The key of the content item to delete.
43
- * @param permanent Indicates that the content item should be permanently deleted immediately or if it should be soft deleted first.
43
+ * @param cmsPermanentDelete Indicates that the content item should be permanently deleted immediately or if it should be soft deleted first.
44
44
  * @returns ContentMetadata OK
45
45
  * @throws ApiError
46
46
  */
47
- contentDelete(key: string, permanent?: boolean): CancelablePromise<ContentMetadata>;
47
+ contentDelete(key: string, cmsPermanentDelete?: boolean): CancelablePromise<ContentMetadata>;
48
48
  /**
49
49
  * Get content path
50
- * Get the content path with the provided key.
50
+ * Get the content path with the provided key. This API is experimental and may change in future releases.
51
51
  * @param key The key of the content path to retrieve.
52
52
  * @param pageIndex
53
53
  * @param pageSize
@@ -57,7 +57,7 @@ export declare class ContentService {
57
57
  contentGetPath(key: string, pageIndex?: number, pageSize?: number): CancelablePromise<ContentMetadataPage>;
58
58
  /**
59
59
  * List content in container
60
- * List the content items located in a specific container.
60
+ * List the content items located in a specific container. This API is experimental and may change in future releases.
61
61
  * @param key The key of the content to retrieve items for.
62
62
  * @param contentTypes Indicates which content types or base types to include in the list.
63
63
  * @param pageIndex
@@ -68,7 +68,7 @@ export declare class ContentService {
68
68
  contentListItems(key: string, contentTypes?: Array<string>, pageIndex?: number, pageSize?: number): CancelablePromise<ContentMetadataPage>;
69
69
  /**
70
70
  * List assets
71
- * List the assets that belongs to a content instance.
71
+ * List the assets that belongs to a content instance. This API is experimental and may change in future releases.
72
72
  * @param key The key of the content to retrieve assets for.
73
73
  * @param contentTypes Indicates which content types or base types to include in the list.
74
74
  * @param pageIndex
@@ -79,7 +79,7 @@ export declare class ContentService {
79
79
  contentListAssets(key: string, contentTypes?: Array<string>, pageIndex?: number, pageSize?: number): CancelablePromise<ContentMetadataPage>;
80
80
  /**
81
81
  * Copy content
82
- * Create a copy of the content item with the provided key.
82
+ * Create a copy of the content item with the provided key. This API is experimental and may change in future releases.
83
83
  * @param key The key of the content item to copy.
84
84
  * @param requestBody Optional instructions for how to copy content.
85
85
  * @returns ContentMetadata OK
@@ -88,7 +88,7 @@ export declare class ContentService {
88
88
  contentCopy(key: string, requestBody?: CopyContentOptions): CancelablePromise<ContentMetadata>;
89
89
  /**
90
90
  * Restore content
91
- * Restore the deleted content item with the provided key. If a content item with the provided key is not deleted an error is returned.
91
+ * Restore the deleted content item with the provided key. If a content item with the provided key is not deleted an error is returned. This API is experimental and may change in future releases.
92
92
  * @param key The key of the content item to undelete.
93
93
  * @returns ContentMetadata OK
94
94
  * @throws ApiError
@@ -96,7 +96,7 @@ export declare class ContentService {
96
96
  contentUndelete(key: string): CancelablePromise<ContentMetadata>;
97
97
  /**
98
98
  * Query versions
99
- * List content versions based on the provided query options.
99
+ * List content versions based on the provided query options. This API is experimental and may change in future releases.
100
100
  * @param locales Indicates which content locales that should be listed. Use 'NEUTRAL' to include locale-neutral content.
101
101
  * Locale must be a valid IETF BCP-47 language tag.
102
102
  * @param statuses Indicates which status content versions must have to be listed.
@@ -105,10 +105,10 @@ export declare class ContentService {
105
105
  * @returns ContentItemPage OK
106
106
  * @throws ApiError
107
107
  */
108
- contentListAllVersions(locales?: Array<string>, statuses?: Array<VersionStatus>, pageIndex?: number, pageSize?: number): CancelablePromise<ContentItemPage>;
108
+ contentListAllVersions(locales?: Array<string>, statuses?: Array<'draft' | 'ready' | 'published' | 'previous' | 'scheduled' | 'rejected' | 'inReview'>, pageIndex?: number, pageSize?: number): CancelablePromise<ContentItemPage>;
109
109
  /**
110
110
  * List versions
111
- * List versions of the content item with the provided key and the provided options.
111
+ * List versions of the content item with the provided key and the provided options. This API is experimental and may change in future releases.
112
112
  * @param key
113
113
  * @param locales Indicates which content locales that should be listed. Use 'NEUTRAL' to include locale-neutral content.
114
114
  * Locale must be a valid IETF BCP-47 language tag.
@@ -118,20 +118,20 @@ export declare class ContentService {
118
118
  * @returns ContentItemPage OK
119
119
  * @throws ApiError
120
120
  */
121
- contentListVersions(key: string, locales?: Array<string>, statuses?: Array<VersionStatus>, pageIndex?: number, pageSize?: number): CancelablePromise<ContentItemPage>;
121
+ contentListVersions(key: string, locales?: Array<string>, statuses?: Array<'draft' | 'ready' | 'published' | 'previous' | 'scheduled' | 'rejected' | 'inReview'>, pageIndex?: number, pageSize?: number): CancelablePromise<ContentItemPage>;
122
122
  /**
123
123
  * Create version
124
- * Create a new version of a content item.
124
+ * Create a new version of a content item. This API is experimental and may change in future releases.
125
125
  * @param key The key of the content item for which a new content version should be created.
126
126
  * @param requestBody The content version that should be created.
127
- * @param skipValidation Indicates that the content validation should be ignored.
127
+ * @param cmsSkipValidation Indicates that the content validation should be ignored.
128
128
  * @returns ContentItem Created
129
129
  * @throws ApiError
130
130
  */
131
- contentCreateVersion(key: string, requestBody: ContentItem, skipValidation?: boolean): CancelablePromise<ContentItem>;
131
+ contentCreateVersion(key: string, requestBody: ContentItem, cmsSkipValidation?: boolean): CancelablePromise<ContentItem>;
132
132
  /**
133
133
  * Delete locale
134
- * Deletes the content item with the provided key. If a content item with the provided key does not exist an error is returned.
134
+ * Deletes the content item with the provided key. If a content item with the provided key does not exist an error is returned. This API is experimental and may change in future releases.
135
135
  * @param key
136
136
  * @param locale
137
137
  * @returns ContentItem OK
@@ -140,33 +140,44 @@ export declare class ContentService {
140
140
  contentDeleteLocale(key: string, locale?: string): CancelablePromise<ContentItem>;
141
141
  /**
142
142
  * Get version
143
- * Get the content item with the provided key and version.
143
+ * Get the content item with the provided key and version. This API is experimental and may change in future releases.
144
144
  * @param key
145
145
  * @param version
146
146
  * @param locale
147
+ * @param ifNoneMatch If provided and the value matches the RFC7232 ETag of the current resource a 304 NotModified response will be returned. Weak ETags will always be ignored.
148
+ * @param ifModifiedSince If provided and the resource has not been modified since the date a 304 NotModified response will be returned. This parameter will be ignored if an 'If-None-Match' parameter is also provided.
147
149
  * @returns ContentItem OK
148
150
  * @throws ApiError
149
151
  */
150
- contentGetVersion(key: string, version: string, locale?: string): CancelablePromise<ContentItem>;
152
+ contentGetVersion(key: string, version: string, locale?: string, ifNoneMatch?: string, ifModifiedSince?: string): CancelablePromise<ContentItem>;
151
153
  /**
152
- * Update version
153
- * Update an existing content item. If a content item with the provided key does not exist an error is returned.
154
- * @param key The key of the content item that should be updated.
155
- * @param version The version of the content that should be updated.
156
- * @param requestBody The content information that should be updated.
157
- * @param locale The locale of the content that should be updated.
158
- * @param skipValidation Indicates that the content validation should be ignored.
154
+ * Patch version
155
+ * Patch an existing content item. If a content item with the provided key does not exist an error is returned. This API is experimental and may change in future releases.
156
+ * @param key The key of the content item that should be patched.
157
+ * @param version The version of the content that should be patched.
158
+ * @param requestBody The content information that should be patched.
159
+ * @param locale The locale of the content that should be patched.
160
+ * @param cmsSkipValidation Indicates that the content validation should be ignored.
159
161
  * @returns ContentItem OK
160
162
  * @throws ApiError
161
163
  */
162
- contentPatchVersion(key: string, version: string, requestBody: ContentItem, locale?: string, skipValidation?: boolean): CancelablePromise<ContentItem>;
164
+ contentPatchVersion(key: string, version: string, requestBody: ContentItem, locale?: string, cmsSkipValidation?: boolean): CancelablePromise<ContentItem>;
163
165
  /**
164
166
  * Delete version
165
- * Deletes the content item with the provided key. If a content item with the provided key does not exist an error is returned.
167
+ * Deletes the content item with the provided key. If a content item with the provided key does not exist an error is returned. This API is experimental and may change in future releases.
166
168
  * @param key
167
169
  * @param version
168
170
  * @returns ContentItem OK
169
171
  * @throws ApiError
170
172
  */
171
173
  contentDeleteVersion(key: string, version: string): CancelablePromise<ContentItem>;
174
+ /**
175
+ * Get previews
176
+ * Generate preview URLs for the content item with fresh authentication tokens. This API is experimental and may change in future releases.
177
+ * @param key The key of the content item.
178
+ * @param version The version of the content item.
179
+ * @returns Preview OK
180
+ * @throws ApiError
181
+ */
182
+ contentGetPreviews(key: string, version: string): CancelablePromise<Array<Preview>>;
172
183
  }
@@ -7,18 +7,18 @@ class ContentService {
7
7
  }
8
8
  /**
9
9
  * Create content
10
- * Create a new content item.
10
+ * Create a new content item. This API is experimental and may change in future releases.
11
11
  * @param requestBody The content item that should be created.
12
- * @param skipValidation Indicates that the content validation should be ignored.
12
+ * @param cmsSkipValidation Indicates that the content validation should be ignored.
13
13
  * @returns ContentItem Created
14
14
  * @throws ApiError
15
15
  */
16
- contentCreate(requestBody, skipValidation) {
16
+ contentCreate(requestBody, cmsSkipValidation) {
17
17
  return this.httpRequest.request({
18
18
  method: 'POST',
19
- url: '/content',
20
- query: {
21
- 'skipValidation': skipValidation,
19
+ url: '/experimental/content',
20
+ headers: {
21
+ 'cms-skip-validation': cmsSkipValidation,
22
22
  },
23
23
  body: requestBody,
24
24
  mediaType: 'application/json',
@@ -30,7 +30,7 @@ class ContentService {
30
30
  }
31
31
  /**
32
32
  * Get content
33
- * Get shared metadata about the content instance with the provided key.
33
+ * Get shared metadata about the content instance with the provided key. This API is experimental and may change in future releases.
34
34
  * @param key The key of the content to retrieve metadata for.
35
35
  * @param allowDeleted Indicates that metadata for a deleted content may be returned.
36
36
  * @returns ContentMetadata OK
@@ -39,7 +39,7 @@ class ContentService {
39
39
  contentGetMetadata(key, allowDeleted) {
40
40
  return this.httpRequest.request({
41
41
  method: 'GET',
42
- url: '/content/{key}',
42
+ url: '/experimental/content/{key}',
43
43
  path: {
44
44
  'key': key,
45
45
  },
@@ -48,21 +48,22 @@ class ContentService {
48
48
  },
49
49
  errors: {
50
50
  403: `Forbidden`,
51
+ 404: `Not Found`,
51
52
  },
52
53
  });
53
54
  }
54
55
  /**
55
- * Update content
56
- * Update an existing content item. If a content item with the provided key does not exist an error is returned.
56
+ * Patch content
57
+ * Patch an existing content item. If a content item with the provided key does not exist an error is returned. This API is experimental and may change in future releases.
57
58
  * @param key The key of the content item to patch.
58
- * @param requestBody The values of the content item that should be updated.
59
+ * @param requestBody The values of the content item that should be patched.
59
60
  * @returns ContentMetadata OK
60
61
  * @throws ApiError
61
62
  */
62
63
  contentPatchMetadata(key, requestBody) {
63
64
  return this.httpRequest.request({
64
65
  method: 'PATCH',
65
- url: '/content/{key}',
66
+ url: '/experimental/content/{key}',
66
67
  path: {
67
68
  'key': key,
68
69
  },
@@ -71,36 +72,38 @@ class ContentService {
71
72
  errors: {
72
73
  400: `Bad Request`,
73
74
  403: `Forbidden`,
75
+ 404: `Not Found`,
74
76
  },
75
77
  });
76
78
  }
77
79
  /**
78
80
  * 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.
81
+ * Deletes the content item with the provided key. If a content item with the provided key does not exist an error is returned. This API is experimental and may change in future releases.
80
82
  * @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.
83
+ * @param cmsPermanentDelete Indicates that the content item should be permanently deleted immediately or if it should be soft deleted first.
82
84
  * @returns ContentMetadata OK
83
85
  * @throws ApiError
84
86
  */
85
- contentDelete(key, permanent) {
87
+ contentDelete(key, cmsPermanentDelete) {
86
88
  return this.httpRequest.request({
87
89
  method: 'DELETE',
88
- url: '/content/{key}',
90
+ url: '/experimental/content/{key}',
89
91
  path: {
90
92
  'key': key,
91
93
  },
92
- query: {
93
- 'permanent': permanent,
94
+ headers: {
95
+ 'cms-permanent-delete': cmsPermanentDelete,
94
96
  },
95
97
  errors: {
96
98
  400: `Bad Request`,
97
99
  403: `Forbidden`,
100
+ 404: `Not Found`,
98
101
  },
99
102
  });
100
103
  }
101
104
  /**
102
105
  * Get content path
103
- * Get the content path with the provided key.
106
+ * Get the content path with the provided key. This API is experimental and may change in future releases.
104
107
  * @param key The key of the content path to retrieve.
105
108
  * @param pageIndex
106
109
  * @param pageSize
@@ -110,7 +113,7 @@ class ContentService {
110
113
  contentGetPath(key, pageIndex, pageSize) {
111
114
  return this.httpRequest.request({
112
115
  method: 'GET',
113
- url: '/content/{key}/path',
116
+ url: '/experimental/content/{key}/path',
114
117
  path: {
115
118
  'key': key,
116
119
  },
@@ -120,12 +123,13 @@ class ContentService {
120
123
  },
121
124
  errors: {
122
125
  403: `Forbidden`,
126
+ 404: `Not Found`,
123
127
  },
124
128
  });
125
129
  }
126
130
  /**
127
131
  * List content in container
128
- * List the content items located in a specific container.
132
+ * List the content items located in a specific container. This API is experimental and may change in future releases.
129
133
  * @param key The key of the content to retrieve items for.
130
134
  * @param contentTypes Indicates which content types or base types to include in the list.
131
135
  * @param pageIndex
@@ -136,7 +140,7 @@ class ContentService {
136
140
  contentListItems(key, contentTypes, pageIndex, pageSize) {
137
141
  return this.httpRequest.request({
138
142
  method: 'GET',
139
- url: '/content/{key}/items',
143
+ url: '/experimental/content/{key}/items',
140
144
  path: {
141
145
  'key': key,
142
146
  },
@@ -147,12 +151,13 @@ class ContentService {
147
151
  },
148
152
  errors: {
149
153
  403: `Forbidden`,
154
+ 404: `Not Found`,
150
155
  },
151
156
  });
152
157
  }
153
158
  /**
154
159
  * List assets
155
- * List the assets that belongs to a content instance.
160
+ * List the assets that belongs to a content instance. This API is experimental and may change in future releases.
156
161
  * @param key The key of the content to retrieve assets for.
157
162
  * @param contentTypes Indicates which content types or base types to include in the list.
158
163
  * @param pageIndex
@@ -163,7 +168,7 @@ class ContentService {
163
168
  contentListAssets(key, contentTypes, pageIndex, pageSize) {
164
169
  return this.httpRequest.request({
165
170
  method: 'GET',
166
- url: '/content/{key}/assets',
171
+ url: '/experimental/content/{key}/assets',
167
172
  path: {
168
173
  'key': key,
169
174
  },
@@ -174,12 +179,13 @@ class ContentService {
174
179
  },
175
180
  errors: {
176
181
  403: `Forbidden`,
182
+ 404: `Not Found`,
177
183
  },
178
184
  });
179
185
  }
180
186
  /**
181
187
  * Copy content
182
- * Create a copy of the content item with the provided key.
188
+ * Create a copy of the content item with the provided key. This API is experimental and may change in future releases.
183
189
  * @param key The key of the content item to copy.
184
190
  * @param requestBody Optional instructions for how to copy content.
185
191
  * @returns ContentMetadata OK
@@ -188,7 +194,7 @@ class ContentService {
188
194
  contentCopy(key, requestBody) {
189
195
  return this.httpRequest.request({
190
196
  method: 'POST',
191
- url: '/content/{key}:copy',
197
+ url: '/experimental/content/{key}:copy',
192
198
  path: {
193
199
  'key': key,
194
200
  },
@@ -197,12 +203,13 @@ class ContentService {
197
203
  errors: {
198
204
  400: `Bad Request`,
199
205
  403: `Forbidden`,
206
+ 404: `Not Found`,
200
207
  },
201
208
  });
202
209
  }
203
210
  /**
204
211
  * 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.
212
+ * Restore the deleted content item with the provided key. If a content item with the provided key is not deleted an error is returned. This API is experimental and may change in future releases.
206
213
  * @param key The key of the content item to undelete.
207
214
  * @returns ContentMetadata OK
208
215
  * @throws ApiError
@@ -210,19 +217,20 @@ class ContentService {
210
217
  contentUndelete(key) {
211
218
  return this.httpRequest.request({
212
219
  method: 'POST',
213
- url: '/content/{key}:undelete',
220
+ url: '/experimental/content/{key}:undelete',
214
221
  path: {
215
222
  'key': key,
216
223
  },
217
224
  errors: {
218
225
  400: `Bad Request`,
219
226
  403: `Forbidden`,
227
+ 404: `Not Found`,
220
228
  },
221
229
  });
222
230
  }
223
231
  /**
224
232
  * Query versions
225
- * List content versions based on the provided query options.
233
+ * List content versions based on the provided query options. This API is experimental and may change in future releases.
226
234
  * @param locales Indicates which content locales that should be listed. Use 'NEUTRAL' to include locale-neutral content.
227
235
  * Locale must be a valid IETF BCP-47 language tag.
228
236
  * @param statuses Indicates which status content versions must have to be listed.
@@ -234,7 +242,7 @@ class ContentService {
234
242
  contentListAllVersions(locales, statuses, pageIndex, pageSize) {
235
243
  return this.httpRequest.request({
236
244
  method: 'GET',
237
- url: '/content/versions',
245
+ url: '/experimental/content/versions',
238
246
  query: {
239
247
  'locales': locales,
240
248
  'statuses': statuses,
@@ -248,7 +256,7 @@ class ContentService {
248
256
  }
249
257
  /**
250
258
  * List versions
251
- * List versions of the content item with the provided key and the provided options.
259
+ * List versions of the content item with the provided key and the provided options. This API is experimental and may change in future releases.
252
260
  * @param key
253
261
  * @param locales Indicates which content locales that should be listed. Use 'NEUTRAL' to include locale-neutral content.
254
262
  * Locale must be a valid IETF BCP-47 language tag.
@@ -261,7 +269,7 @@ class ContentService {
261
269
  contentListVersions(key, locales, statuses, pageIndex, pageSize) {
262
270
  return this.httpRequest.request({
263
271
  method: 'GET',
264
- url: '/content/{key}/versions',
272
+ url: '/experimental/content/{key}/versions',
265
273
  path: {
266
274
  'key': key,
267
275
  },
@@ -273,39 +281,41 @@ class ContentService {
273
281
  },
274
282
  errors: {
275
283
  403: `Forbidden`,
284
+ 404: `Not Found`,
276
285
  },
277
286
  });
278
287
  }
279
288
  /**
280
289
  * Create version
281
- * Create a new version of a content item.
290
+ * Create a new version of a content item. This API is experimental and may change in future releases.
282
291
  * @param key The key of the content item for which a new content version should be created.
283
292
  * @param requestBody The content version that should be created.
284
- * @param skipValidation Indicates that the content validation should be ignored.
293
+ * @param cmsSkipValidation Indicates that the content validation should be ignored.
285
294
  * @returns ContentItem Created
286
295
  * @throws ApiError
287
296
  */
288
- contentCreateVersion(key, requestBody, skipValidation) {
297
+ contentCreateVersion(key, requestBody, cmsSkipValidation) {
289
298
  return this.httpRequest.request({
290
299
  method: 'POST',
291
- url: '/content/{key}/versions',
300
+ url: '/experimental/content/{key}/versions',
292
301
  path: {
293
302
  'key': key,
294
303
  },
295
- query: {
296
- 'skipValidation': skipValidation,
304
+ headers: {
305
+ 'cms-skip-validation': cmsSkipValidation,
297
306
  },
298
307
  body: requestBody,
299
308
  mediaType: 'application/json',
300
309
  errors: {
301
310
  400: `Bad Request`,
302
311
  403: `Forbidden`,
312
+ 404: `Not Found`,
303
313
  },
304
314
  });
305
315
  }
306
316
  /**
307
317
  * 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.
318
+ * Deletes the content item with the provided key. If a content item with the provided key does not exist an error is returned. This API is experimental and may change in future releases.
309
319
  * @param key
310
320
  * @param locale
311
321
  * @returns ContentItem OK
@@ -314,7 +324,7 @@ class ContentService {
314
324
  contentDeleteLocale(key, locale) {
315
325
  return this.httpRequest.request({
316
326
  method: 'DELETE',
317
- url: '/content/{key}/versions',
327
+ url: '/experimental/content/{key}/versions',
318
328
  path: {
319
329
  'key': key,
320
330
  },
@@ -324,68 +334,80 @@ class ContentService {
324
334
  errors: {
325
335
  400: `Bad Request`,
326
336
  403: `Forbidden`,
337
+ 404: `Not Found`,
327
338
  },
328
339
  });
329
340
  }
330
341
  /**
331
342
  * Get version
332
- * Get the content item with the provided key and version.
343
+ * Get the content item with the provided key and version. This API is experimental and may change in future releases.
333
344
  * @param key
334
345
  * @param version
335
346
  * @param locale
347
+ * @param ifNoneMatch If provided and the value matches the RFC7232 ETag of the current resource a 304 NotModified response will be returned. Weak ETags will always be ignored.
348
+ * @param ifModifiedSince If provided and the resource has not been modified since the date a 304 NotModified response will be returned. This parameter will be ignored if an 'If-None-Match' parameter is also provided.
336
349
  * @returns ContentItem OK
337
350
  * @throws ApiError
338
351
  */
339
- contentGetVersion(key, version, locale) {
352
+ contentGetVersion(key, version, locale, ifNoneMatch, ifModifiedSince) {
340
353
  return this.httpRequest.request({
341
354
  method: 'GET',
342
- url: '/content/{key}/versions/{version}',
355
+ url: '/experimental/content/{key}/versions/{version}',
343
356
  path: {
344
357
  'key': key,
345
358
  'version': version,
346
359
  },
360
+ headers: {
361
+ 'If-None-Match': ifNoneMatch,
362
+ 'If-Modified-Since': ifModifiedSince,
363
+ },
347
364
  query: {
348
365
  'locale': locale,
349
366
  },
350
367
  errors: {
368
+ 304: `Not Modified`,
351
369
  403: `Forbidden`,
370
+ 404: `Not Found`,
352
371
  },
353
372
  });
354
373
  }
355
374
  /**
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.
375
+ * Patch version
376
+ * Patch an existing content item. If a content item with the provided key does not exist an error is returned. This API is experimental and may change in future releases.
377
+ * @param key The key of the content item that should be patched.
378
+ * @param version The version of the content that should be patched.
379
+ * @param requestBody The content information that should be patched.
380
+ * @param locale The locale of the content that should be patched.
381
+ * @param cmsSkipValidation Indicates that the content validation should be ignored.
363
382
  * @returns ContentItem OK
364
383
  * @throws ApiError
365
384
  */
366
- contentPatchVersion(key, version, requestBody, locale, skipValidation) {
385
+ contentPatchVersion(key, version, requestBody, locale, cmsSkipValidation) {
367
386
  return this.httpRequest.request({
368
387
  method: 'PATCH',
369
- url: '/content/{key}/versions/{version}',
388
+ url: '/experimental/content/{key}/versions/{version}',
370
389
  path: {
371
390
  'key': key,
372
391
  'version': version,
373
392
  },
393
+ headers: {
394
+ 'cms-skip-validation': cmsSkipValidation,
395
+ },
374
396
  query: {
375
397
  'locale': locale,
376
- 'skipValidation': skipValidation,
377
398
  },
378
399
  body: requestBody,
379
400
  mediaType: 'application/merge-patch+json',
380
401
  errors: {
381
402
  400: `Bad Request`,
382
403
  403: `Forbidden`,
404
+ 404: `Not Found`,
383
405
  },
384
406
  });
385
407
  }
386
408
  /**
387
409
  * 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.
410
+ * Deletes the content item with the provided key. If a content item with the provided key does not exist an error is returned. This API is experimental and may change in future releases.
389
411
  * @param key
390
412
  * @param version
391
413
  * @returns ContentItem OK
@@ -394,7 +416,7 @@ class ContentService {
394
416
  contentDeleteVersion(key, version) {
395
417
  return this.httpRequest.request({
396
418
  method: 'DELETE',
397
- url: '/content/{key}/versions/{version}',
419
+ url: '/experimental/content/{key}/versions/{version}',
398
420
  path: {
399
421
  'key': key,
400
422
  'version': version,
@@ -402,6 +424,29 @@ class ContentService {
402
424
  errors: {
403
425
  400: `Bad Request`,
404
426
  403: `Forbidden`,
427
+ 404: `Not Found`,
428
+ },
429
+ });
430
+ }
431
+ /**
432
+ * Get previews
433
+ * Generate preview URLs for the content item with fresh authentication tokens. This API is experimental and may change in future releases.
434
+ * @param key The key of the content item.
435
+ * @param version The version of the content item.
436
+ * @returns Preview OK
437
+ * @throws ApiError
438
+ */
439
+ contentGetPreviews(key, version) {
440
+ return this.httpRequest.request({
441
+ method: 'GET',
442
+ url: '/experimental/content/{key}/versions/{version}/previews',
443
+ path: {
444
+ 'key': key,
445
+ 'version': version,
446
+ },
447
+ errors: {
448
+ 403: `Forbidden`,
449
+ 404: `Not Found`,
405
450
  },
406
451
  });
407
452
  }