@remkoj/optimizely-cms-api 6.0.0-pre12 → 6.0.0-pre13

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.
@@ -110,10 +110,10 @@ class BaseApiClient {
110
110
  // Store instance variables
111
111
  this._config = config ?? (0, config_1.readEnvConfig)();
112
112
  this._client = (0, client_1.createClient)((0, client_config_1.createClientConfig)((0, client_1.createConfig)({
113
- baseUrl: 'https://api.cms.optimizely.com/preview3'
113
+ baseUrl: 'https://api.cms.optimizely.com/preview3',
114
114
  }), this._config));
115
115
  this._instanceClient = (0, client_2.createClient)((0, client_config_1.createClientConfig)((0, client_2.createConfig)({
116
- baseUrl: new URL('/_cms/preview2', this._config.base).href
116
+ baseUrl: new URL('/_cms/preview2', this._config.base).href,
117
117
  })));
118
118
  // Configure Client
119
119
  if (this._config.debug) {
@@ -1,5 +1,5 @@
1
1
  import type { Client, Options as Options2, TDataShape } from './client';
2
- import type { ContentTypesCreateData, ContentTypesCreateErrors, ContentTypesCreateResponses, ContentTypesDeleteData, ContentTypesDeleteErrors, ContentTypesDeleteResponses, ContentTypesGetData, ContentTypesGetErrors, ContentTypesGetResponses, ContentTypesListData, ContentTypesListErrors, ContentTypesListResponses, ContentTypesPatchData, ContentTypesPatchErrors, ContentTypesPatchResponses, DisplayTemplatesCreateData, DisplayTemplatesCreateErrors, DisplayTemplatesCreateResponses, DisplayTemplatesDeleteData, DisplayTemplatesDeleteErrors, DisplayTemplatesDeleteResponses, DisplayTemplatesGetData, DisplayTemplatesGetErrors, DisplayTemplatesGetResponses, DisplayTemplatesListData, DisplayTemplatesListErrors, DisplayTemplatesListResponses, DisplayTemplatesPatchData, DisplayTemplatesPatchErrors, DisplayTemplatesPatchResponses, PropertyFormatsGetData, PropertyFormatsGetErrors, PropertyFormatsGetResponses, PropertyFormatsListData, PropertyFormatsListErrors, PropertyFormatsListResponses, PropertyGroupsCreateData, PropertyGroupsCreateErrors, PropertyGroupsCreateResponses, PropertyGroupsDeleteData, PropertyGroupsDeleteErrors, PropertyGroupsDeleteResponses, PropertyGroupsGetData, PropertyGroupsGetErrors, PropertyGroupsGetResponses, PropertyGroupsListData, PropertyGroupsListErrors, PropertyGroupsListResponses, PropertyGroupsPatchData, PropertyGroupsPatchErrors, PropertyGroupsPatchResponses } from './types.gen';
2
+ import type { BlueprintsCreateData, BlueprintsCreateErrors, BlueprintsCreateResponses, BlueprintsDeleteData, BlueprintsDeleteErrors, BlueprintsDeleteResponses, BlueprintsGetData, BlueprintsGetErrors, BlueprintsGetResponses, BlueprintsListData, BlueprintsListErrors, BlueprintsListResponses, BlueprintsPatchData, BlueprintsPatchErrors, BlueprintsPatchResponses, ChangesetsCreateData, ChangesetsCreateErrors, ChangesetsCreateItemData, ChangesetsCreateItemErrors, ChangesetsCreateItemResponses, ChangesetsCreateResponses, ChangesetsDeleteData, ChangesetsDeleteErrors, ChangesetsDeleteItemData, ChangesetsDeleteItemErrors, ChangesetsDeleteItemResponses, ChangesetsDeleteResponses, ChangesetsGetData, ChangesetsGetErrors, ChangesetsGetItemData, ChangesetsGetItemErrors, ChangesetsGetItemResponses, ChangesetsGetResponses, ChangesetsListData, ChangesetsListErrors, ChangesetsListItemsData, ChangesetsListItemsErrors, ChangesetsListItemsResponses, ChangesetsListResponses, ChangesetsPatchData, ChangesetsPatchErrors, ChangesetsPatchItemData, ChangesetsPatchItemErrors, ChangesetsPatchItemResponses, ChangesetsPatchResponses, ContentCopyData, ContentCopyErrors, ContentCopyResponses, ContentCreateData, ContentCreateErrors, ContentCreateResponses, ContentCreateVersionData, ContentCreateVersionErrors, ContentCreateVersionResponses, ContentDeleteData, ContentDeleteErrors, ContentDeleteLocaleData, ContentDeleteLocaleErrors, ContentDeleteLocaleResponses, ContentDeleteResponses, ContentDeleteVersionData, ContentDeleteVersionErrors, ContentDeleteVersionResponses, ContentGetMetadataData, ContentGetMetadataErrors, ContentGetMetadataResponses, ContentGetPathData, ContentGetPathErrors, ContentGetPathResponses, ContentGetVersionData, ContentGetVersionErrors, ContentGetVersionResponses, ContentListAllVersionsData, ContentListAllVersionsErrors, ContentListAllVersionsResponses, ContentListAssetsData, ContentListAssetsErrors, ContentListAssetsResponses, ContentListItemsData, ContentListItemsErrors, ContentListItemsResponses, ContentListVersionsData, ContentListVersionsErrors, ContentListVersionsResponses, ContentPatchMetadataData, ContentPatchMetadataErrors, ContentPatchMetadataResponses, ContentPatchVersionData, ContentPatchVersionErrors, ContentPatchVersionResponses, ContentTypesCreateData, ContentTypesCreateErrors, ContentTypesCreateResponses, ContentTypesDeleteData, ContentTypesDeleteErrors, ContentTypesDeleteResponses, ContentTypesGetData, ContentTypesGetErrors, ContentTypesGetResponses, ContentTypesListData, ContentTypesListErrors, ContentTypesListResponses, ContentTypesPatchData, ContentTypesPatchErrors, ContentTypesPatchResponses, ContentUndeleteData, ContentUndeleteErrors, ContentUndeleteResponses, DisplayTemplatesCreateData, DisplayTemplatesCreateErrors, DisplayTemplatesCreateResponses, DisplayTemplatesDeleteData, DisplayTemplatesDeleteErrors, DisplayTemplatesDeleteResponses, DisplayTemplatesGetData, DisplayTemplatesGetErrors, DisplayTemplatesGetResponses, DisplayTemplatesListData, DisplayTemplatesListErrors, DisplayTemplatesListResponses, DisplayTemplatesPatchData, DisplayTemplatesPatchErrors, DisplayTemplatesPatchResponses, PropertyFormatsGetData, PropertyFormatsGetErrors, PropertyFormatsGetResponses, PropertyFormatsListData, PropertyFormatsListErrors, PropertyFormatsListResponses, PropertyGroupsCreateData, PropertyGroupsCreateErrors, PropertyGroupsCreateResponses, PropertyGroupsDeleteData, PropertyGroupsDeleteErrors, PropertyGroupsDeleteResponses, PropertyGroupsGetData, PropertyGroupsGetErrors, PropertyGroupsGetResponses, PropertyGroupsListData, PropertyGroupsListErrors, PropertyGroupsListResponses, PropertyGroupsPatchData, PropertyGroupsPatchErrors, PropertyGroupsPatchResponses } from './types.gen';
3
3
  export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
4
4
  /**
5
5
  * You can provide a client instance returned by `createClient()` instead of
@@ -13,6 +13,193 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends
13
13
  */
14
14
  meta?: Record<string, unknown>;
15
15
  };
16
+ /**
17
+ * List blueprints
18
+ *
19
+ * List blueprints using the provided parameters. This API is experimental and may change in future releases.
20
+ */
21
+ export declare const blueprintsList: <ThrowOnError extends boolean = false>(options?: Options<BlueprintsListData, ThrowOnError>) => import("./client").RequestResult<BlueprintsListResponses, BlueprintsListErrors, ThrowOnError, "fields">;
22
+ /**
23
+ * Create a blueprint
24
+ *
25
+ * Create a new blueprint. This API is experimental and may change in future releases.
26
+ */
27
+ export declare const blueprintsCreate: <ThrowOnError extends boolean = false>(options: Options<BlueprintsCreateData, ThrowOnError>) => import("./client").RequestResult<BlueprintsCreateResponses, BlueprintsCreateErrors, ThrowOnError, "fields">;
28
+ /**
29
+ * Delete a blueprint
30
+ *
31
+ * Deletes the blueprint with the provided key. This API is experimental and may change in future releases.
32
+ */
33
+ export declare const blueprintsDelete: <ThrowOnError extends boolean = false>(options: Options<BlueprintsDeleteData, ThrowOnError>) => import("./client").RequestResult<BlueprintsDeleteResponses, BlueprintsDeleteErrors, ThrowOnError, "fields">;
34
+ /**
35
+ * Get a specific blueprint
36
+ *
37
+ * Get the blueprint with the provided key. This API is experimental and may change in future releases.
38
+ */
39
+ export declare const blueprintsGet: <ThrowOnError extends boolean = false>(options: Options<BlueprintsGetData, ThrowOnError>) => import("./client").RequestResult<BlueprintsGetResponses, BlueprintsGetErrors, ThrowOnError, "fields">;
40
+ /**
41
+ * Patch blueprint
42
+ *
43
+ * Patch an existing blueprint. This API is experimental and may change in future releases.
44
+ */
45
+ export declare const blueprintsPatch: <ThrowOnError extends boolean = false>(options: Options<BlueprintsPatchData, ThrowOnError>) => import("./client").RequestResult<BlueprintsPatchResponses, BlueprintsPatchErrors, ThrowOnError, "fields">;
46
+ /**
47
+ * List changeset
48
+ *
49
+ * Lists all changeset using the provided options. This API is experimental and may change in future releases.
50
+ */
51
+ export declare const changesetsList: <ThrowOnError extends boolean = false>(options?: Options<ChangesetsListData, ThrowOnError>) => import("./client").RequestResult<ChangesetsListResponses, ChangesetsListErrors, ThrowOnError, "fields">;
52
+ /**
53
+ * Create changeset
54
+ *
55
+ * Creates a new changeset. This API is experimental and may change in future releases.
56
+ */
57
+ export declare const changesetsCreate: <ThrowOnError extends boolean = false>(options: Options<ChangesetsCreateData, ThrowOnError>) => import("./client").RequestResult<ChangesetsCreateResponses, ChangesetsCreateErrors, ThrowOnError, "fields">;
58
+ /**
59
+ * Delete changeset
60
+ *
61
+ * 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.
62
+ */
63
+ export declare const changesetsDelete: <ThrowOnError extends boolean = false>(options: Options<ChangesetsDeleteData, ThrowOnError>) => import("./client").RequestResult<ChangesetsDeleteResponses, ChangesetsDeleteErrors, ThrowOnError, "fields">;
64
+ /**
65
+ * Get changeset
66
+ *
67
+ * Gets the changeset with the provided key. This API is experimental and may change in future releases.
68
+ */
69
+ export declare const changesetsGet: <ThrowOnError extends boolean = false>(options: Options<ChangesetsGetData, ThrowOnError>) => import("./client").RequestResult<ChangesetsGetResponses, ChangesetsGetErrors, ThrowOnError, "fields">;
70
+ /**
71
+ * Patch changeset
72
+ *
73
+ * Patch an existing changeset. This API is experimental and may change in future releases.
74
+ */
75
+ export declare const changesetsPatch: <ThrowOnError extends boolean = false>(options: Options<ChangesetsPatchData, ThrowOnError>) => import("./client").RequestResult<ChangesetsPatchResponses, ChangesetsPatchErrors, ThrowOnError, "fields">;
76
+ /**
77
+ * Delete changeset item
78
+ *
79
+ * Deletes the specified changeset item from the changeset. This API is experimental and may change in future releases.
80
+ */
81
+ export declare const changesetsDeleteItem: <ThrowOnError extends boolean = false>(options: Options<ChangesetsDeleteItemData, ThrowOnError>) => import("./client").RequestResult<ChangesetsDeleteItemResponses, ChangesetsDeleteItemErrors, ThrowOnError, "fields">;
82
+ /**
83
+ * Get changeset item
84
+ *
85
+ * Gets the changeset item for the specified content reference. This API is experimental and may change in future releases.
86
+ */
87
+ export declare const changesetsGetItem: <ThrowOnError extends boolean = false>(options: Options<ChangesetsGetItemData, ThrowOnError>) => import("./client").RequestResult<ChangesetsGetItemResponses, ChangesetsGetItemErrors, ThrowOnError, "fields">;
88
+ /**
89
+ * Patch changeset item
90
+ *
91
+ * Patch the given changeset item. This API is experimental and may change in future releases.
92
+ */
93
+ export declare const changesetsPatchItem: <ThrowOnError extends boolean = false>(options: Options<ChangesetsPatchItemData, ThrowOnError>) => import("./client").RequestResult<ChangesetsPatchItemResponses, ChangesetsPatchItemErrors, ThrowOnError, "fields">;
94
+ /**
95
+ * List changeset items
96
+ *
97
+ * Lists the available changeset items for the specified changeset using
98
+ * the provided options. This API is experimental and may change in future releases.
99
+ */
100
+ export declare const changesetsListItems: <ThrowOnError extends boolean = false>(options: Options<ChangesetsListItemsData, ThrowOnError>) => import("./client").RequestResult<ChangesetsListItemsResponses, ChangesetsListItemsErrors, ThrowOnError, "fields">;
101
+ /**
102
+ * Create changeset item
103
+ *
104
+ * Creates the given changeset item. This API is experimental and may change in future releases.
105
+ */
106
+ export declare const changesetsCreateItem: <ThrowOnError extends boolean = false>(options: Options<ChangesetsCreateItemData, ThrowOnError>) => import("./client").RequestResult<ChangesetsCreateItemResponses, ChangesetsCreateItemErrors, ThrowOnError, "fields">;
107
+ /**
108
+ * Create content
109
+ *
110
+ * Create a new content item. This API is experimental and may change in future releases.
111
+ */
112
+ export declare const contentCreate: <ThrowOnError extends boolean = false>(options: Options<ContentCreateData, ThrowOnError>) => import("./client").RequestResult<ContentCreateResponses, ContentCreateErrors, ThrowOnError, "fields">;
113
+ /**
114
+ * Delete content
115
+ *
116
+ * 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.
117
+ */
118
+ export declare const contentDelete: <ThrowOnError extends boolean = false>(options: Options<ContentDeleteData, ThrowOnError>) => import("./client").RequestResult<ContentDeleteResponses, ContentDeleteErrors, ThrowOnError, "fields">;
119
+ /**
120
+ * Get content
121
+ *
122
+ * Get shared metadata about the content instance with the provided key. This API is experimental and may change in future releases.
123
+ */
124
+ export declare const contentGetMetadata: <ThrowOnError extends boolean = false>(options: Options<ContentGetMetadataData, ThrowOnError>) => import("./client").RequestResult<ContentGetMetadataResponses, ContentGetMetadataErrors, ThrowOnError, "fields">;
125
+ /**
126
+ * Patch content
127
+ *
128
+ * 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.
129
+ */
130
+ export declare const contentPatchMetadata: <ThrowOnError extends boolean = false>(options: Options<ContentPatchMetadataData, ThrowOnError>) => import("./client").RequestResult<ContentPatchMetadataResponses, ContentPatchMetadataErrors, ThrowOnError, "fields">;
131
+ /**
132
+ * Get content path
133
+ *
134
+ * Get the content path with the provided key. This API is experimental and may change in future releases.
135
+ */
136
+ export declare const contentGetPath: <ThrowOnError extends boolean = false>(options: Options<ContentGetPathData, ThrowOnError>) => import("./client").RequestResult<ContentGetPathResponses, ContentGetPathErrors, ThrowOnError, "fields">;
137
+ /**
138
+ * List content in container
139
+ *
140
+ * List the content items located in a specific container. This API is experimental and may change in future releases.
141
+ */
142
+ export declare const contentListItems: <ThrowOnError extends boolean = false>(options: Options<ContentListItemsData, ThrowOnError>) => import("./client").RequestResult<ContentListItemsResponses, ContentListItemsErrors, ThrowOnError, "fields">;
143
+ /**
144
+ * List assets
145
+ *
146
+ * List the assets that belongs to a content instance. This API is experimental and may change in future releases.
147
+ */
148
+ export declare const contentListAssets: <ThrowOnError extends boolean = false>(options: Options<ContentListAssetsData, ThrowOnError>) => import("./client").RequestResult<ContentListAssetsResponses, ContentListAssetsErrors, ThrowOnError, "fields">;
149
+ /**
150
+ * Copy content
151
+ *
152
+ * Create a copy of the content item with the provided key. This API is experimental and may change in future releases.
153
+ */
154
+ export declare const contentCopy: <ThrowOnError extends boolean = false>(options: Options<ContentCopyData, ThrowOnError>) => import("./client").RequestResult<ContentCopyResponses, ContentCopyErrors, ThrowOnError, "fields">;
155
+ /**
156
+ * Restore content
157
+ *
158
+ * 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.
159
+ */
160
+ export declare const contentUndelete: <ThrowOnError extends boolean = false>(options: Options<ContentUndeleteData, ThrowOnError>) => import("./client").RequestResult<ContentUndeleteResponses, ContentUndeleteErrors, ThrowOnError, "fields">;
161
+ /**
162
+ * Query versions
163
+ *
164
+ * List content versions based on the provided query options. This API is experimental and may change in future releases.
165
+ */
166
+ export declare const contentListAllVersions: <ThrowOnError extends boolean = false>(options?: Options<ContentListAllVersionsData, ThrowOnError>) => import("./client").RequestResult<ContentListAllVersionsResponses, ContentListAllVersionsErrors, ThrowOnError, "fields">;
167
+ /**
168
+ * Delete locale
169
+ *
170
+ * 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.
171
+ */
172
+ export declare const contentDeleteLocale: <ThrowOnError extends boolean = false>(options: Options<ContentDeleteLocaleData, ThrowOnError>) => import("./client").RequestResult<ContentDeleteLocaleResponses, ContentDeleteLocaleErrors, ThrowOnError, "fields">;
173
+ /**
174
+ * List versions
175
+ *
176
+ * List versions of the content item with the provided key and the provided options. This API is experimental and may change in future releases.
177
+ */
178
+ export declare const contentListVersions: <ThrowOnError extends boolean = false>(options: Options<ContentListVersionsData, ThrowOnError>) => import("./client").RequestResult<ContentListVersionsResponses, ContentListVersionsErrors, ThrowOnError, "fields">;
179
+ /**
180
+ * Create version
181
+ *
182
+ * Create a new version of a content item. This API is experimental and may change in future releases.
183
+ */
184
+ export declare const contentCreateVersion: <ThrowOnError extends boolean = false>(options: Options<ContentCreateVersionData, ThrowOnError>) => import("./client").RequestResult<ContentCreateVersionResponses, ContentCreateVersionErrors, ThrowOnError, "fields">;
185
+ /**
186
+ * Delete version
187
+ *
188
+ * 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.
189
+ */
190
+ export declare const contentDeleteVersion: <ThrowOnError extends boolean = false>(options: Options<ContentDeleteVersionData, ThrowOnError>) => import("./client").RequestResult<ContentDeleteVersionResponses, ContentDeleteVersionErrors, ThrowOnError, "fields">;
191
+ /**
192
+ * Get version
193
+ *
194
+ * Get the content item with the provided key and version. This API is experimental and may change in future releases.
195
+ */
196
+ export declare const contentGetVersion: <ThrowOnError extends boolean = false>(options: Options<ContentGetVersionData, ThrowOnError>) => import("./client").RequestResult<ContentGetVersionResponses, ContentGetVersionErrors, ThrowOnError, "fields">;
197
+ /**
198
+ * Patch version
199
+ *
200
+ * 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.
201
+ */
202
+ export declare const contentPatchVersion: <ThrowOnError extends boolean = false>(options: Options<ContentPatchVersionData, ThrowOnError>) => import("./client").RequestResult<ContentPatchVersionResponses, ContentPatchVersionErrors, ThrowOnError, "fields">;
16
203
  /**
17
204
  * List content types
18
205
  *