@remkoj/optimizely-cms-api 5.2.0 → 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 (141) hide show
  1. package/dist/api-client.js +11 -7
  2. package/dist/client/CmsIntegrationApiClient.d.ts +2 -2
  3. package/dist/client/CmsIntegrationApiClient.js +4 -4
  4. package/dist/client/core/OpenAPI.js +2 -2
  5. package/dist/client/index.d.ts +14 -45
  6. package/dist/client/index.js +13 -19
  7. package/dist/client/models/ArrayItem.d.ts +70 -0
  8. package/dist/client/models/ArrayItem.js +25 -0
  9. package/dist/client/models/Blueprint.d.ts +24 -0
  10. package/dist/client/models/BlueprintData.d.ts +11 -0
  11. package/dist/client/models/BlueprintPage.d.ts +19 -0
  12. package/dist/client/models/Changeset.d.ts +3 -3
  13. package/dist/client/models/ChangesetItemPage.d.ts +1 -1
  14. package/dist/client/models/ChangesetPage.d.ts +1 -1
  15. package/dist/client/models/CompositionDisplaySettings.d.ts +13 -0
  16. package/dist/client/models/CompositionNode.d.ts +41 -0
  17. package/dist/client/models/ContentComponent.d.ts +8 -8
  18. package/dist/client/models/ContentItem.d.ts +28 -5
  19. package/dist/client/models/ContentItem.js +17 -0
  20. package/dist/client/models/ContentItemPage.d.ts +1 -1
  21. package/dist/client/models/ContentLocaleInfo.d.ts +13 -2
  22. package/dist/client/models/ContentLocaleInfo.js +12 -0
  23. package/dist/client/models/ContentMetadataPage.d.ts +1 -1
  24. package/dist/client/models/ContentType.d.ts +11 -36
  25. package/dist/client/models/ContentTypePage.d.ts +1 -1
  26. package/dist/client/models/ContentTypeProperty.d.ts +84 -8
  27. package/dist/client/models/ContentTypeProperty.js +34 -0
  28. package/dist/client/models/DisplayTemplate.d.ts +6 -5
  29. package/dist/client/models/DisplayTemplatePage.d.ts +1 -1
  30. package/dist/client/models/EnumerationValue.d.ts +13 -0
  31. package/dist/client/models/ImageDescriptor.d.ts +1 -1
  32. package/dist/client/models/Link.d.ts +21 -0
  33. package/dist/client/models/Preview.d.ts +13 -0
  34. package/dist/client/models/PropertyFormat.d.ts +60 -16
  35. package/dist/client/models/PropertyFormat.js +44 -0
  36. package/dist/client/models/PropertyFormatPage.d.ts +1 -1
  37. package/dist/client/models/PropertyGroup.d.ts +14 -1
  38. package/dist/client/models/PropertyGroupPage.d.ts +1 -1
  39. package/dist/client/services/BlueprintsService.d.ts +56 -0
  40. package/dist/client/services/BlueprintsService.js +135 -0
  41. package/dist/client/services/ChangesetsService.d.ts +32 -30
  42. package/dist/client/services/ChangesetsService.js +73 -60
  43. package/dist/client/services/ContentService.d.ts +46 -35
  44. package/dist/client/services/ContentService.js +100 -55
  45. package/dist/client/services/ContentTypesService.d.ts +17 -23
  46. package/dist/client/services/ContentTypesService.js +34 -41
  47. package/dist/client/services/DisplayTemplatesService.d.ts +14 -18
  48. package/dist/client/services/DisplayTemplatesService.js +31 -31
  49. package/dist/client/services/PropertyFormatsService.d.ts +3 -1
  50. package/dist/client/services/PropertyFormatsService.js +9 -1
  51. package/dist/client/services/PropertyGroupsService.d.ts +15 -20
  52. package/dist/client/services/PropertyGroupsService.js +32 -33
  53. package/dist/enums.d.ts +35 -0
  54. package/dist/enums.js +40 -0
  55. package/dist/getaccesstoken.js +4 -3
  56. package/dist/index.d.ts +1 -0
  57. package/dist/index.js +1 -0
  58. package/dist/version.json +3 -3
  59. package/package.json +2 -2
  60. package/dist/client/models/BinaryProperty.d.ts +0 -8
  61. package/dist/client/models/BooleanProperty.d.ts +0 -5
  62. package/dist/client/models/ComponentListItem.d.ts +0 -10
  63. package/dist/client/models/ComponentProperty.d.ts +0 -10
  64. package/dist/client/models/CompositionBehavior.d.ts +0 -7
  65. package/dist/client/models/CompositionBehavior.js +0 -15
  66. package/dist/client/models/ContentBaseType.d.ts +0 -14
  67. package/dist/client/models/ContentBaseType.js +0 -22
  68. package/dist/client/models/ContentItemListWithContentTypes.d.ts +0 -27
  69. package/dist/client/models/ContentItemWithContentTypes.d.ts +0 -12
  70. package/dist/client/models/ContentListItem.d.ts +0 -14
  71. package/dist/client/models/ContentProperty.d.ts +0 -14
  72. package/dist/client/models/ContentReferenceListItem.d.ts +0 -14
  73. package/dist/client/models/ContentReferenceListItem.js +0 -2
  74. package/dist/client/models/ContentReferenceProperty.d.ts +0 -14
  75. package/dist/client/models/ContentReferenceProperty.js +0 -2
  76. package/dist/client/models/ContentTypeFeature.d.ts +0 -10
  77. package/dist/client/models/ContentTypeFeature.js +0 -18
  78. package/dist/client/models/ContentTypeUsage.d.ts +0 -7
  79. package/dist/client/models/ContentTypeUsage.js +0 -15
  80. package/dist/client/models/DateTimeListItem.d.ts +0 -14
  81. package/dist/client/models/DateTimeListItem.js +0 -2
  82. package/dist/client/models/DateTimeProperty.d.ts +0 -14
  83. package/dist/client/models/DateTimeProperty.js +0 -2
  84. package/dist/client/models/DoubleEnumerationSettings.d.ts +0 -10
  85. package/dist/client/models/DoubleEnumerationSettings.js +0 -2
  86. package/dist/client/models/DoubleEnumerationValue.d.ts +0 -13
  87. package/dist/client/models/DoubleEnumerationValue.js +0 -2
  88. package/dist/client/models/FloatListItem.d.ts +0 -16
  89. package/dist/client/models/FloatListItem.js +0 -2
  90. package/dist/client/models/FloatProperty.d.ts +0 -16
  91. package/dist/client/models/FloatProperty.js +0 -2
  92. package/dist/client/models/IndexingType.d.ts +0 -8
  93. package/dist/client/models/IndexingType.js +0 -16
  94. package/dist/client/models/Int32EnumerationSettings.d.ts +0 -10
  95. package/dist/client/models/Int32EnumerationSettings.js +0 -2
  96. package/dist/client/models/Int32EnumerationValue.d.ts +0 -13
  97. package/dist/client/models/Int32EnumerationValue.js +0 -2
  98. package/dist/client/models/IntegerListItem.d.ts +0 -16
  99. package/dist/client/models/IntegerListItem.js +0 -2
  100. package/dist/client/models/IntegerProperty.d.ts +0 -16
  101. package/dist/client/models/IntegerProperty.js +0 -2
  102. package/dist/client/models/JsonStringProperty.d.ts +0 -5
  103. package/dist/client/models/JsonStringProperty.js +0 -2
  104. package/dist/client/models/ListProperty.d.ts +0 -26
  105. package/dist/client/models/ListProperty.js +0 -2
  106. package/dist/client/models/ListPropertyItem.d.ts +0 -11
  107. package/dist/client/models/ListPropertyItem.js +0 -2
  108. package/dist/client/models/LocaleStatus.d.ts +0 -7
  109. package/dist/client/models/LocaleStatus.js +0 -15
  110. package/dist/client/models/OauthToken.d.ts +0 -18
  111. package/dist/client/models/OauthToken.js +0 -2
  112. package/dist/client/models/OauthTokenError.d.ts +0 -13
  113. package/dist/client/models/OauthTokenError.js +0 -2
  114. package/dist/client/models/OauthTokenRequest.d.ts +0 -21
  115. package/dist/client/models/OauthTokenRequest.js +0 -2
  116. package/dist/client/models/PropertyDataType.d.ts +0 -18
  117. package/dist/client/models/PropertyDataType.js +0 -26
  118. package/dist/client/models/StringEnumerationSettings.d.ts +0 -10
  119. package/dist/client/models/StringEnumerationSettings.js +0 -2
  120. package/dist/client/models/StringEnumerationValue.d.ts +0 -13
  121. package/dist/client/models/StringEnumerationValue.js +0 -2
  122. package/dist/client/models/StringListItem.d.ts +0 -20
  123. package/dist/client/models/StringListItem.js +0 -2
  124. package/dist/client/models/StringProperty.d.ts +0 -20
  125. package/dist/client/models/StringProperty.js +0 -2
  126. package/dist/client/models/UrlListItem.d.ts +0 -5
  127. package/dist/client/models/UrlListItem.js +0 -2
  128. package/dist/client/models/UrlProperty.d.ts +0 -5
  129. package/dist/client/models/UrlProperty.js +0 -2
  130. package/dist/client/models/VersionStatus.d.ts +0 -12
  131. package/dist/client/models/VersionStatus.js +0 -20
  132. package/dist/client/services/OauthService.d.ts +0 -17
  133. package/dist/client/services/OauthService.js +0 -28
  134. /package/dist/client/models/{BinaryProperty.js → Blueprint.js} +0 -0
  135. /package/dist/client/models/{BooleanProperty.js → BlueprintData.js} +0 -0
  136. /package/dist/client/models/{ComponentListItem.js → BlueprintPage.js} +0 -0
  137. /package/dist/client/models/{ComponentProperty.js → CompositionDisplaySettings.js} +0 -0
  138. /package/dist/client/models/{ContentItemListWithContentTypes.js → CompositionNode.js} +0 -0
  139. /package/dist/client/models/{ContentItemWithContentTypes.js → EnumerationValue.js} +0 -0
  140. /package/dist/client/models/{ContentListItem.js → Link.js} +0 -0
  141. /package/dist/client/models/{ContentProperty.js → Preview.js} +0 -0
@@ -0,0 +1,135 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BlueprintsService = void 0;
4
+ class BlueprintsService {
5
+ constructor(httpRequest) {
6
+ this.httpRequest = httpRequest;
7
+ }
8
+ /**
9
+ * List blueprints
10
+ * List blueprints using the provided parameters. This API is experimental and may change in future releases.
11
+ * @param pageIndex
12
+ * @param pageSize
13
+ * @returns BlueprintPage OK
14
+ * @throws ApiError
15
+ */
16
+ blueprintsList(pageIndex, pageSize) {
17
+ return this.httpRequest.request({
18
+ method: 'GET',
19
+ url: '/experimental/blueprints',
20
+ query: {
21
+ 'pageIndex': pageIndex,
22
+ 'pageSize': pageSize,
23
+ },
24
+ errors: {
25
+ 403: `Forbidden`,
26
+ },
27
+ });
28
+ }
29
+ /**
30
+ * Create a blueprint
31
+ * Create a new blueprint. This API is experimental and may change in future releases.
32
+ * @param requestBody The blueprint that should be created.
33
+ * @returns Blueprint Created
34
+ * @throws ApiError
35
+ */
36
+ blueprintsCreate(requestBody) {
37
+ return this.httpRequest.request({
38
+ method: 'POST',
39
+ url: '/experimental/blueprints',
40
+ body: requestBody,
41
+ mediaType: 'application/json',
42
+ errors: {
43
+ 400: `Bad Request`,
44
+ 403: `Forbidden`,
45
+ },
46
+ });
47
+ }
48
+ /**
49
+ * Get a specific blueprint
50
+ * Get the blueprint with the provided key. This API is experimental and may change in future releases.
51
+ * @param key The key of the blueprint to retrieve.
52
+ * @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.
53
+ * @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.
54
+ * @returns Blueprint OK
55
+ * @throws ApiError
56
+ */
57
+ blueprintsGet(key, ifNoneMatch, ifModifiedSince) {
58
+ return this.httpRequest.request({
59
+ method: 'GET',
60
+ url: '/experimental/blueprints/{key}',
61
+ path: {
62
+ 'key': key,
63
+ },
64
+ headers: {
65
+ 'If-None-Match': ifNoneMatch,
66
+ 'If-Modified-Since': ifModifiedSince,
67
+ },
68
+ errors: {
69
+ 304: `Not Modified`,
70
+ 403: `Forbidden`,
71
+ 404: `Not Found`,
72
+ },
73
+ });
74
+ }
75
+ /**
76
+ * Patch blueprint
77
+ * Patch an existing blueprint. This API is experimental and may change in future releases.
78
+ * @param key The key of the blueprint to patch.
79
+ * @param requestBody The values of the blueprint that should be patched formatted according to RFC7396.
80
+ * @param ifMatch If provided, the PATCH request will only be considered if the value matches the RFC7232 ETag of the current resource. Weak ETags will always be ignored.
81
+ * @param ifUnmodifiedSince If provided, the PATCH request will only be considered if the resource has not been modified since the provided date. This parameter will be ignored if an 'If-Match' parameter is also provided.
82
+ * @returns Blueprint OK
83
+ * @throws ApiError
84
+ */
85
+ blueprintsPatch(key, requestBody, ifMatch, ifUnmodifiedSince) {
86
+ return this.httpRequest.request({
87
+ method: 'PATCH',
88
+ url: '/experimental/blueprints/{key}',
89
+ path: {
90
+ 'key': key,
91
+ },
92
+ headers: {
93
+ 'If-Match': ifMatch,
94
+ 'If-Unmodified-Since': ifUnmodifiedSince,
95
+ },
96
+ body: requestBody,
97
+ mediaType: 'application/merge-patch+json',
98
+ errors: {
99
+ 400: `Bad Request`,
100
+ 403: `Forbidden`,
101
+ 404: `Not Found`,
102
+ 412: `Precondition Failed`,
103
+ },
104
+ });
105
+ }
106
+ /**
107
+ * Delete a blueprint
108
+ * Deletes the blueprint with the provided key. This API is experimental and may change in future releases.
109
+ * @param key The key of the blueprint to delete.
110
+ * @param ifMatch If provided, the DELETE request will only be considered if the value matches the RFC7232 ETag of the current resource. Weak ETags will always be ignored.
111
+ * @param ifUnmodifiedSince If provided, the DELETE request will only be considered if the resource has not been modified since the provided date. This parameter will be ignored if an 'If-Match' parameter is also provided.
112
+ * @returns Blueprint OK
113
+ * @throws ApiError
114
+ */
115
+ blueprintsDelete(key, ifMatch, ifUnmodifiedSince) {
116
+ return this.httpRequest.request({
117
+ method: 'DELETE',
118
+ url: '/experimental/blueprints/{key}',
119
+ path: {
120
+ 'key': key,
121
+ },
122
+ headers: {
123
+ 'If-Match': ifMatch,
124
+ 'If-Unmodified-Since': ifUnmodifiedSince,
125
+ },
126
+ errors: {
127
+ 400: `Bad Request`,
128
+ 403: `Forbidden`,
129
+ 404: `Not Found`,
130
+ 412: `Precondition Failed`,
131
+ },
132
+ });
133
+ }
134
+ }
135
+ exports.BlueprintsService = BlueprintsService;
@@ -9,50 +9,53 @@ export declare class ChangesetsService {
9
9
  constructor(httpRequest: BaseHttpRequest);
10
10
  /**
11
11
  * List changeset
12
- * Lists all changeset using the provided options.
12
+ * Lists all changeset using the provided options. This API is experimental and may change in future releases.
13
+ * @param sources Indicates which sources should be included when listing changesets.
14
+ * Use Default to include changesets without a specific sources.
13
15
  * @param pageIndex
14
16
  * @param pageSize
15
17
  * @returns ChangesetPage OK
16
18
  * @throws ApiError
17
19
  */
18
- changesetsList(pageIndex?: number, pageSize?: number): CancelablePromise<ChangesetPage>;
20
+ changesetsList(sources?: Array<string>, pageIndex?: number, pageSize?: number): CancelablePromise<ChangesetPage>;
19
21
  /**
20
22
  * Create changeset
21
- * Creates a new changeset.
23
+ * Creates a new changeset. This API is experimental and may change in future releases.
22
24
  * @param requestBody The changeset that should be created.
23
- * @returns Changeset OK
25
+ * @returns Changeset Created
24
26
  * @throws ApiError
25
27
  */
26
28
  changesetsCreate(requestBody: Changeset): CancelablePromise<Changeset>;
27
29
  /**
28
30
  * Get changeset
29
- * Gets the changeset with the provided key.
31
+ * Gets the changeset with the provided key. This API is experimental and may change in future releases.
30
32
  * @param key The key of the changeset to retrieve.
33
+ * @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.
34
+ * @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.
31
35
  * @returns Changeset OK
32
36
  * @throws ApiError
33
37
  */
34
- changesetsGet(key: string): CancelablePromise<Changeset>;
38
+ changesetsGet(key: string, ifNoneMatch?: string, ifModifiedSince?: string): CancelablePromise<Changeset>;
35
39
  /**
36
40
  * Delete changeset
37
- * Deletes the changeset with the provided key. If a changeset with the provided key does not exist an error is returned.
41
+ * Deletes the changeset with the provided key. If a changeset with the provided key does not exist an error is returned. This API is experimental and may change in future releases.
38
42
  * @param key The key of the changeset to delete.
39
43
  * @returns Changeset OK
40
44
  * @throws ApiError
41
45
  */
42
46
  changesetsDelete(key: string): CancelablePromise<Changeset>;
43
47
  /**
44
- * Create or replace changeset
45
- * Creates or replaces a changeset. If a changeset with the provided key exist it is replaced.
46
- * Otherwise a new changeset is created.
47
- * @param key The key of the changeset to update or create.
48
- * @param requestBody The values of the created or replaced changeset.
48
+ * Patch changeset
49
+ * Patch an existing changeset. This API is experimental and may change in future releases.
50
+ * @param key The key of the changeset to patch.
51
+ * @param requestBody The values of the changeset that should be patched formatted according to RFC7396.
49
52
  * @returns Changeset OK
50
53
  * @throws ApiError
51
54
  */
52
- changesetsPut(key: string, requestBody: Changeset): CancelablePromise<Changeset>;
55
+ changesetsPatch(key: string, requestBody: Changeset): CancelablePromise<Changeset>;
53
56
  /**
54
57
  * Get changeset item
55
- * Gets the changeset item for the specified content reference.
58
+ * Gets the changeset item for the specified content reference. This API is experimental and may change in future releases.
56
59
  * @param changeset The changeset key
57
60
  * @param key The content key
58
61
  * @param version The content version
@@ -60,9 +63,20 @@ export declare class ChangesetsService {
60
63
  * @throws ApiError
61
64
  */
62
65
  changesetsGetItem(changeset: string, key: string, version: string): CancelablePromise<ChangesetItem>;
66
+ /**
67
+ * Patch changeset item
68
+ * Patch the given changeset item. This API is experimental and may change in future releases.
69
+ * @param changeset The changeset key
70
+ * @param key The content key
71
+ * @param version The content version
72
+ * @param requestBody The values of the changeset item that should be patched formatted according to RFC7396.
73
+ * @returns ChangesetItem OK
74
+ * @throws ApiError
75
+ */
76
+ changesetsPatchItem(changeset: string, key: string, version: string, requestBody: ChangesetItem): CancelablePromise<ChangesetItem>;
63
77
  /**
64
78
  * Delete changeset item
65
- * Deletes the specified changeset item from the changeset.
79
+ * Deletes the specified changeset item from the changeset. This API is experimental and may change in future releases.
66
80
  * @param changeset The changeset key
67
81
  * @param key The content key
68
82
  * @param version The content version
@@ -73,7 +87,7 @@ export declare class ChangesetsService {
73
87
  /**
74
88
  * List changeset items
75
89
  * Lists the available changeset items for the specified changeset using
76
- * the provided options.
90
+ * the provided options. This API is experimental and may change in future releases.
77
91
  * @param changeset The changeset key
78
92
  * @param pageIndex
79
93
  * @param pageSize
@@ -83,23 +97,11 @@ export declare class ChangesetsService {
83
97
  changesetsListItems(changeset: string, pageIndex?: number, pageSize?: number): CancelablePromise<ChangesetItemPage>;
84
98
  /**
85
99
  * Create changeset item
86
- * Creates the given changeset item.
100
+ * Creates the given changeset item. This API is experimental and may change in future releases.
87
101
  * @param changeset The changeset key
88
102
  * @param requestBody The changeset item
89
- * @returns ChangesetItem OK
103
+ * @returns ChangesetItem Created
90
104
  * @throws ApiError
91
105
  */
92
106
  changesetsCreateItem(changeset: string, requestBody: ChangesetItem): CancelablePromise<ChangesetItem>;
93
- /**
94
- * Update changeset item
95
- * Updates the given changeset item.
96
- * @param changeset The changeset key
97
- * @param contentKey The content key
98
- * @param contentVersion The content version
99
- * @param requestBody The changeset item
100
- * @param allowCreate Indicates if a new changeset item should be created if it does not exist
101
- * @returns ChangesetItem OK
102
- * @throws ApiError
103
- */
104
- changesetsUpdateItem(changeset: string, contentKey: string, contentVersion: string, requestBody: ChangesetItem, allowCreate?: boolean): CancelablePromise<ChangesetItem>;
105
107
  }
@@ -7,17 +7,20 @@ class ChangesetsService {
7
7
  }
8
8
  /**
9
9
  * List changeset
10
- * Lists all changeset using the provided options.
10
+ * Lists all changeset using the provided options. This API is experimental and may change in future releases.
11
+ * @param sources Indicates which sources should be included when listing changesets.
12
+ * Use Default to include changesets without a specific sources.
11
13
  * @param pageIndex
12
14
  * @param pageSize
13
15
  * @returns ChangesetPage OK
14
16
  * @throws ApiError
15
17
  */
16
- changesetsList(pageIndex, pageSize) {
18
+ changesetsList(sources, pageIndex, pageSize) {
17
19
  return this.httpRequest.request({
18
20
  method: 'GET',
19
- url: '/changesets',
21
+ url: '/experimental/changesets',
20
22
  query: {
23
+ 'sources': sources,
21
24
  'pageIndex': pageIndex,
22
25
  'pageSize': pageSize,
23
26
  },
@@ -28,15 +31,15 @@ class ChangesetsService {
28
31
  }
29
32
  /**
30
33
  * Create changeset
31
- * Creates a new changeset.
34
+ * Creates a new changeset. This API is experimental and may change in future releases.
32
35
  * @param requestBody The changeset that should be created.
33
- * @returns Changeset OK
36
+ * @returns Changeset Created
34
37
  * @throws ApiError
35
38
  */
36
39
  changesetsCreate(requestBody) {
37
40
  return this.httpRequest.request({
38
41
  method: 'POST',
39
- url: '/changesets',
42
+ url: '/experimental/changesets',
40
43
  body: requestBody,
41
44
  mediaType: 'application/json',
42
45
  errors: {
@@ -47,26 +50,34 @@ class ChangesetsService {
47
50
  }
48
51
  /**
49
52
  * Get changeset
50
- * Gets the changeset with the provided key.
53
+ * Gets the changeset with the provided key. This API is experimental and may change in future releases.
51
54
  * @param key The key of the changeset to retrieve.
55
+ * @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.
56
+ * @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.
52
57
  * @returns Changeset OK
53
58
  * @throws ApiError
54
59
  */
55
- changesetsGet(key) {
60
+ changesetsGet(key, ifNoneMatch, ifModifiedSince) {
56
61
  return this.httpRequest.request({
57
62
  method: 'GET',
58
- url: '/changesets/{key}',
63
+ url: '/experimental/changesets/{key}',
59
64
  path: {
60
65
  'key': key,
61
66
  },
67
+ headers: {
68
+ 'If-None-Match': ifNoneMatch,
69
+ 'If-Modified-Since': ifModifiedSince,
70
+ },
62
71
  errors: {
72
+ 304: `Not Modified`,
63
73
  403: `Forbidden`,
74
+ 404: `Not Found`,
64
75
  },
65
76
  });
66
77
  }
67
78
  /**
68
79
  * Delete changeset
69
- * Deletes the changeset with the provided key. If a changeset with the provided key does not exist an error is returned.
80
+ * Deletes the changeset with the provided key. If a changeset with the provided key does not exist an error is returned. This API is experimental and may change in future releases.
70
81
  * @param key The key of the changeset to delete.
71
82
  * @returns Changeset OK
72
83
  * @throws ApiError
@@ -74,43 +85,44 @@ class ChangesetsService {
74
85
  changesetsDelete(key) {
75
86
  return this.httpRequest.request({
76
87
  method: 'DELETE',
77
- url: '/changesets/{key}',
88
+ url: '/experimental/changesets/{key}',
78
89
  path: {
79
90
  'key': key,
80
91
  },
81
92
  errors: {
82
93
  400: `Bad Request`,
83
94
  403: `Forbidden`,
95
+ 404: `Not Found`,
84
96
  },
85
97
  });
86
98
  }
87
99
  /**
88
- * Create or replace changeset
89
- * Creates or replaces a changeset. If a changeset with the provided key exist it is replaced.
90
- * Otherwise a new changeset is created.
91
- * @param key The key of the changeset to update or create.
92
- * @param requestBody The values of the created or replaced changeset.
100
+ * Patch changeset
101
+ * Patch an existing changeset. This API is experimental and may change in future releases.
102
+ * @param key The key of the changeset to patch.
103
+ * @param requestBody The values of the changeset that should be patched formatted according to RFC7396.
93
104
  * @returns Changeset OK
94
105
  * @throws ApiError
95
106
  */
96
- changesetsPut(key, requestBody) {
107
+ changesetsPatch(key, requestBody) {
97
108
  return this.httpRequest.request({
98
- method: 'PUT',
99
- url: '/changesets/{key}',
109
+ method: 'PATCH',
110
+ url: '/experimental/changesets/{key}',
100
111
  path: {
101
112
  'key': key,
102
113
  },
103
114
  body: requestBody,
104
- mediaType: 'application/json',
115
+ mediaType: 'application/merge-patch+json',
105
116
  errors: {
106
117
  400: `Bad Request`,
107
118
  403: `Forbidden`,
119
+ 404: `Not Found`,
108
120
  },
109
121
  });
110
122
  }
111
123
  /**
112
124
  * Get changeset item
113
- * Gets the changeset item for the specified content reference.
125
+ * Gets the changeset item for the specified content reference. This API is experimental and may change in future releases.
114
126
  * @param changeset The changeset key
115
127
  * @param key The content key
116
128
  * @param version The content version
@@ -120,20 +132,49 @@ class ChangesetsService {
120
132
  changesetsGetItem(changeset, key, version) {
121
133
  return this.httpRequest.request({
122
134
  method: 'GET',
123
- url: '/changesets/{changeset}/items/{key}/versions/{version}',
135
+ url: '/experimental/changesets/{changeset}/items/{key}/versions/{version}',
136
+ path: {
137
+ 'changeset': changeset,
138
+ 'key': key,
139
+ 'version': version,
140
+ },
141
+ errors: {
142
+ 403: `Forbidden`,
143
+ 404: `Not Found`,
144
+ },
145
+ });
146
+ }
147
+ /**
148
+ * Patch changeset item
149
+ * Patch the given changeset item. This API is experimental and may change in future releases.
150
+ * @param changeset The changeset key
151
+ * @param key The content key
152
+ * @param version The content version
153
+ * @param requestBody The values of the changeset item that should be patched formatted according to RFC7396.
154
+ * @returns ChangesetItem OK
155
+ * @throws ApiError
156
+ */
157
+ changesetsPatchItem(changeset, key, version, requestBody) {
158
+ return this.httpRequest.request({
159
+ method: 'PATCH',
160
+ url: '/experimental/changesets/{changeset}/items/{key}/versions/{version}',
124
161
  path: {
125
162
  'changeset': changeset,
126
163
  'key': key,
127
164
  'version': version,
128
165
  },
166
+ body: requestBody,
167
+ mediaType: 'application/merge-patch+json',
129
168
  errors: {
169
+ 400: `Bad Request`,
130
170
  403: `Forbidden`,
171
+ 404: `Not Found`,
131
172
  },
132
173
  });
133
174
  }
134
175
  /**
135
176
  * Delete changeset item
136
- * Deletes the specified changeset item from the changeset.
177
+ * Deletes the specified changeset item from the changeset. This API is experimental and may change in future releases.
137
178
  * @param changeset The changeset key
138
179
  * @param key The content key
139
180
  * @param version The content version
@@ -143,7 +184,7 @@ class ChangesetsService {
143
184
  changesetsDeleteItem(changeset, key, version) {
144
185
  return this.httpRequest.request({
145
186
  method: 'DELETE',
146
- url: '/changesets/{changeset}/items/{key}/versions/{version}',
187
+ url: '/experimental/changesets/{changeset}/items/{key}/versions/{version}',
147
188
  path: {
148
189
  'changeset': changeset,
149
190
  'key': key,
@@ -152,13 +193,14 @@ class ChangesetsService {
152
193
  errors: {
153
194
  400: `Bad Request`,
154
195
  403: `Forbidden`,
196
+ 404: `Not Found`,
155
197
  },
156
198
  });
157
199
  }
158
200
  /**
159
201
  * List changeset items
160
202
  * Lists the available changeset items for the specified changeset using
161
- * the provided options.
203
+ * the provided options. This API is experimental and may change in future releases.
162
204
  * @param changeset The changeset key
163
205
  * @param pageIndex
164
206
  * @param pageSize
@@ -168,7 +210,7 @@ class ChangesetsService {
168
210
  changesetsListItems(changeset, pageIndex, pageSize) {
169
211
  return this.httpRequest.request({
170
212
  method: 'GET',
171
- url: '/changesets/{changeset}/items',
213
+ url: '/experimental/changesets/{changeset}/items',
172
214
  path: {
173
215
  'changeset': changeset,
174
216
  },
@@ -178,60 +220,31 @@ class ChangesetsService {
178
220
  },
179
221
  errors: {
180
222
  403: `Forbidden`,
223
+ 404: `Not Found`,
181
224
  },
182
225
  });
183
226
  }
184
227
  /**
185
228
  * Create changeset item
186
- * Creates the given changeset item.
229
+ * Creates the given changeset item. This API is experimental and may change in future releases.
187
230
  * @param changeset The changeset key
188
231
  * @param requestBody The changeset item
189
- * @returns ChangesetItem OK
232
+ * @returns ChangesetItem Created
190
233
  * @throws ApiError
191
234
  */
192
235
  changesetsCreateItem(changeset, requestBody) {
193
236
  return this.httpRequest.request({
194
237
  method: 'POST',
195
- url: '/changesets/{changeset}/items',
196
- path: {
197
- 'changeset': changeset,
198
- },
199
- body: requestBody,
200
- mediaType: 'application/json',
201
- errors: {
202
- 400: `Bad Request`,
203
- 403: `Forbidden`,
204
- },
205
- });
206
- }
207
- /**
208
- * Update changeset item
209
- * Updates the given changeset item.
210
- * @param changeset The changeset key
211
- * @param contentKey The content key
212
- * @param contentVersion The content version
213
- * @param requestBody The changeset item
214
- * @param allowCreate Indicates if a new changeset item should be created if it does not exist
215
- * @returns ChangesetItem OK
216
- * @throws ApiError
217
- */
218
- changesetsUpdateItem(changeset, contentKey, contentVersion, requestBody, allowCreate) {
219
- return this.httpRequest.request({
220
- method: 'PUT',
221
- url: '/changesets/{changeset}/items/{contentKey}/versions/{contentVersion}',
238
+ url: '/experimental/changesets/{changeset}/items',
222
239
  path: {
223
240
  'changeset': changeset,
224
- 'contentKey': contentKey,
225
- 'contentVersion': contentVersion,
226
- },
227
- query: {
228
- 'allowCreate': allowCreate,
229
241
  },
230
242
  body: requestBody,
231
243
  mediaType: 'application/json',
232
244
  errors: {
233
245
  400: `Bad Request`,
234
246
  403: `Forbidden`,
247
+ 404: `Not Found`,
235
248
  },
236
249
  });
237
250
  }