@remkoj/optimizely-cms-api 6.0.0-pre13 → 6.0.0-pre14
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.
- package/README.md +6 -2
- package/dist/client/client/client.gen.js +26 -1
- package/dist/client/client/index.d.ts +1 -1
- package/dist/client/client/types.gen.d.ts +2 -9
- package/dist/client/client.gen.js +2 -4
- package/dist/client/core/params.gen.d.ts +10 -0
- package/dist/client/core/params.gen.js +17 -5
- package/dist/client/core/serverSentEvents.gen.js +2 -0
- package/dist/client/index.d.ts +4 -4
- package/dist/client/index.js +97 -17
- package/dist/client/sdk.gen.js +294 -404
- package/dist/client/transformers.gen.d.ts +1 -6
- package/dist/client/transformers.gen.js +45 -105
- package/dist/client/types.gen.d.ts +35 -35
- package/dist/instance.client/client/client.gen.js +26 -1
- package/dist/instance.client/client/index.d.ts +1 -1
- package/dist/instance.client/client/types.gen.d.ts +2 -9
- package/dist/instance.client/client.gen.js +2 -4
- package/dist/instance.client/core/params.gen.d.ts +10 -0
- package/dist/instance.client/core/params.gen.js +17 -5
- package/dist/instance.client/core/serverSentEvents.gen.js +2 -0
- package/dist/instance.client/index.d.ts +4 -4
- package/dist/instance.client/index.js +86 -18
- package/dist/instance.client/sdk.gen.js +273 -405
- package/dist/instance.client/transformers.gen.d.ts +1 -15
- package/dist/instance.client/transformers.gen.js +26 -198
- package/dist/instance.client/types.gen.d.ts +48 -64
- package/dist/version.json +2 -2
- package/package.json +7 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BlueprintsCreateResponse, BlueprintsDeleteResponse, BlueprintsGetResponse, BlueprintsListResponse, BlueprintsPatchResponse,
|
|
1
|
+
import type { BlueprintsCreateResponse, BlueprintsDeleteResponse, BlueprintsGetResponse, BlueprintsListResponse, BlueprintsPatchResponse, ChangesetsCreateResponse, ChangesetsDeleteResponse, ChangesetsGetResponse, ChangesetsListResponse, ChangesetsPatchResponse, ContentCopyResponse, ContentCreateResponse, ContentCreateVersionResponse, ContentDeleteLocaleResponse, ContentDeleteResponse, ContentDeleteVersionResponse, ContentGetMetadataResponse, ContentGetPathResponse, ContentGetVersionResponse, ContentListAllVersionsResponse, ContentListAssetsResponse, ContentListItemsResponse, ContentListVersionsResponse, ContentPatchMetadataResponse, ContentPatchVersionResponse, ContentTypesCreateResponse, ContentTypesDeleteResponse, ContentTypesGetResponse, ContentTypesListResponse, ContentTypesPatchResponse, ContentUndeleteResponse, DisplayTemplatesCreateResponse, DisplayTemplatesDeleteResponse, DisplayTemplatesGetResponse, DisplayTemplatesListResponse, DisplayTemplatesPatchResponse, PropertyFormatsGetResponse, PropertyFormatsListResponse, PropertyGroupsCreateResponse, PropertyGroupsDeleteResponse, PropertyGroupsGetResponse, PropertyGroupsListResponse, PropertyGroupsPatchResponse } from './types.gen';
|
|
2
2
|
export declare const blueprintsListResponseTransformer: (data: any) => Promise<BlueprintsListResponse>;
|
|
3
3
|
export declare const blueprintsCreateResponseTransformer: (data: any) => Promise<BlueprintsCreateResponse>;
|
|
4
4
|
export declare const blueprintsDeleteResponseTransformer: (data: any) => Promise<BlueprintsDeleteResponse>;
|
|
@@ -9,11 +9,6 @@ export declare const changesetsCreateResponseTransformer: (data: any) => Promise
|
|
|
9
9
|
export declare const changesetsDeleteResponseTransformer: (data: any) => Promise<ChangesetsDeleteResponse>;
|
|
10
10
|
export declare const changesetsGetResponseTransformer: (data: any) => Promise<ChangesetsGetResponse>;
|
|
11
11
|
export declare const changesetsPatchResponseTransformer: (data: any) => Promise<ChangesetsPatchResponse>;
|
|
12
|
-
export declare const changesetsDeleteItemResponseTransformer: (data: any) => Promise<ChangesetsDeleteItemResponse>;
|
|
13
|
-
export declare const changesetsGetItemResponseTransformer: (data: any) => Promise<ChangesetsGetItemResponse>;
|
|
14
|
-
export declare const changesetsPatchItemResponseTransformer: (data: any) => Promise<ChangesetsPatchItemResponse>;
|
|
15
|
-
export declare const changesetsListItemsResponseTransformer: (data: any) => Promise<ChangesetsListItemsResponse>;
|
|
16
|
-
export declare const changesetsCreateItemResponseTransformer: (data: any) => Promise<ChangesetsCreateItemResponse>;
|
|
17
12
|
export declare const contentCreateResponseTransformer: (data: any) => Promise<ContentCreateResponse>;
|
|
18
13
|
export declare const contentDeleteResponseTransformer: (data: any) => Promise<ContentDeleteResponse>;
|
|
19
14
|
export declare const contentGetMetadataResponseTransformer: (data: any) => Promise<ContentGetMetadataResponse>;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.propertyGroupsPatchResponseTransformer = exports.propertyGroupsGetResponseTransformer = exports.propertyGroupsDeleteResponseTransformer = exports.propertyGroupsCreateResponseTransformer = exports.propertyGroupsListResponseTransformer = exports.propertyFormatsGetResponseTransformer = exports.propertyFormatsListResponseTransformer = exports.displayTemplatesPatchResponseTransformer = exports.displayTemplatesGetResponseTransformer = exports.displayTemplatesDeleteResponseTransformer = exports.displayTemplatesCreateResponseTransformer = exports.displayTemplatesListResponseTransformer = exports.contentTypesPatchResponseTransformer = exports.contentTypesGetResponseTransformer = exports.contentTypesDeleteResponseTransformer = exports.contentTypesCreateResponseTransformer = exports.contentTypesListResponseTransformer = exports.contentPatchVersionResponseTransformer = exports.contentGetVersionResponseTransformer = exports.contentDeleteVersionResponseTransformer = exports.contentCreateVersionResponseTransformer = exports.contentListVersionsResponseTransformer = exports.contentDeleteLocaleResponseTransformer = exports.contentListAllVersionsResponseTransformer = exports.contentUndeleteResponseTransformer = exports.contentCopyResponseTransformer = exports.contentListAssetsResponseTransformer = exports.contentListItemsResponseTransformer = exports.contentGetPathResponseTransformer = exports.contentPatchMetadataResponseTransformer = exports.contentGetMetadataResponseTransformer = exports.contentDeleteResponseTransformer = exports.contentCreateResponseTransformer = exports.
|
|
5
|
-
const
|
|
6
|
-
if (data.
|
|
7
|
-
data.
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
exports.propertyGroupsPatchResponseTransformer = exports.propertyGroupsGetResponseTransformer = exports.propertyGroupsDeleteResponseTransformer = exports.propertyGroupsCreateResponseTransformer = exports.propertyGroupsListResponseTransformer = exports.propertyFormatsGetResponseTransformer = exports.propertyFormatsListResponseTransformer = exports.displayTemplatesPatchResponseTransformer = exports.displayTemplatesGetResponseTransformer = exports.displayTemplatesDeleteResponseTransformer = exports.displayTemplatesCreateResponseTransformer = exports.displayTemplatesListResponseTransformer = exports.contentTypesPatchResponseTransformer = exports.contentTypesGetResponseTransformer = exports.contentTypesDeleteResponseTransformer = exports.contentTypesCreateResponseTransformer = exports.contentTypesListResponseTransformer = exports.contentPatchVersionResponseTransformer = exports.contentGetVersionResponseTransformer = exports.contentDeleteVersionResponseTransformer = exports.contentCreateVersionResponseTransformer = exports.contentListVersionsResponseTransformer = exports.contentDeleteLocaleResponseTransformer = exports.contentListAllVersionsResponseTransformer = exports.contentUndeleteResponseTransformer = exports.contentCopyResponseTransformer = exports.contentListAssetsResponseTransformer = exports.contentListItemsResponseTransformer = exports.contentGetPathResponseTransformer = exports.contentPatchMetadataResponseTransformer = exports.contentGetMetadataResponseTransformer = exports.contentDeleteResponseTransformer = exports.contentCreateResponseTransformer = exports.changesetsPatchResponseTransformer = exports.changesetsGetResponseTransformer = exports.changesetsDeleteResponseTransformer = exports.changesetsCreateResponseTransformer = exports.changesetsListResponseTransformer = exports.blueprintsPatchResponseTransformer = exports.blueprintsGetResponseTransformer = exports.blueprintsDeleteResponseTransformer = exports.blueprintsCreateResponseTransformer = exports.blueprintsListResponseTransformer = void 0;
|
|
5
|
+
const compositionNodeSchemaResponseTransformer = (data) => {
|
|
6
|
+
if (data.nodes) {
|
|
7
|
+
data.nodes = data.nodes.map((item) => compositionNodeSchemaResponseTransformer(item));
|
|
8
|
+
}
|
|
9
|
+
return data;
|
|
10
|
+
};
|
|
11
|
+
const blueprintDataSchemaResponseTransformer = (data) => {
|
|
12
|
+
if (data.composition) {
|
|
13
|
+
data.composition = compositionNodeSchemaResponseTransformer(data.composition);
|
|
10
14
|
}
|
|
11
15
|
return data;
|
|
12
16
|
};
|
|
@@ -19,20 +23,9 @@ const blueprintSchemaResponseTransformer = (data) => {
|
|
|
19
23
|
}
|
|
20
24
|
return data;
|
|
21
25
|
};
|
|
22
|
-
const
|
|
23
|
-
if (data.
|
|
24
|
-
data.
|
|
25
|
-
}
|
|
26
|
-
return data;
|
|
27
|
-
};
|
|
28
|
-
const compositionNodeSchemaResponseTransformer = (data) => {
|
|
29
|
-
if (data.displaySettings) {
|
|
30
|
-
data.displaySettings = compositionDisplaySettingsSchemaResponseTransformer(data.displaySettings);
|
|
31
|
-
}
|
|
32
|
-
if (data.nodes) {
|
|
33
|
-
data.nodes = data.nodes.map((item) => {
|
|
34
|
-
return compositionNodeSchemaResponseTransformer(item);
|
|
35
|
-
});
|
|
26
|
+
const blueprintPageSchemaResponseTransformer = (data) => {
|
|
27
|
+
if (data.items) {
|
|
28
|
+
data.items = data.items.map((item) => blueprintSchemaResponseTransformer(item));
|
|
36
29
|
}
|
|
37
30
|
return data;
|
|
38
31
|
};
|
|
@@ -61,14 +54,6 @@ const blueprintsPatchResponseTransformer = async (data) => {
|
|
|
61
54
|
return data;
|
|
62
55
|
};
|
|
63
56
|
exports.blueprintsPatchResponseTransformer = blueprintsPatchResponseTransformer;
|
|
64
|
-
const changesetPageSchemaResponseTransformer = (data) => {
|
|
65
|
-
if (data.items) {
|
|
66
|
-
data.items = data.items.map((item) => {
|
|
67
|
-
return changesetSchemaResponseTransformer(item);
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
return data;
|
|
71
|
-
};
|
|
72
57
|
const changesetSchemaResponseTransformer = (data) => {
|
|
73
58
|
if (data.created) {
|
|
74
59
|
data.created = new Date(data.created);
|
|
@@ -78,6 +63,12 @@ const changesetSchemaResponseTransformer = (data) => {
|
|
|
78
63
|
}
|
|
79
64
|
return data;
|
|
80
65
|
};
|
|
66
|
+
const changesetPageSchemaResponseTransformer = (data) => {
|
|
67
|
+
if (data.items) {
|
|
68
|
+
data.items = data.items.map((item) => changesetSchemaResponseTransformer(item));
|
|
69
|
+
}
|
|
70
|
+
return data;
|
|
71
|
+
};
|
|
81
72
|
const changesetsListResponseTransformer = async (data) => {
|
|
82
73
|
data = changesetPageSchemaResponseTransformer(data);
|
|
83
74
|
return data;
|
|
@@ -103,43 +94,6 @@ const changesetsPatchResponseTransformer = async (data) => {
|
|
|
103
94
|
return data;
|
|
104
95
|
};
|
|
105
96
|
exports.changesetsPatchResponseTransformer = changesetsPatchResponseTransformer;
|
|
106
|
-
const changesetItemSchemaResponseTransformer = (data) => {
|
|
107
|
-
data.reference = contentReferenceSchemaResponseTransformer(data.reference);
|
|
108
|
-
return data;
|
|
109
|
-
};
|
|
110
|
-
const changesetsDeleteItemResponseTransformer = async (data) => {
|
|
111
|
-
data = changesetItemSchemaResponseTransformer(data);
|
|
112
|
-
return data;
|
|
113
|
-
};
|
|
114
|
-
exports.changesetsDeleteItemResponseTransformer = changesetsDeleteItemResponseTransformer;
|
|
115
|
-
const changesetsGetItemResponseTransformer = async (data) => {
|
|
116
|
-
data = changesetItemSchemaResponseTransformer(data);
|
|
117
|
-
return data;
|
|
118
|
-
};
|
|
119
|
-
exports.changesetsGetItemResponseTransformer = changesetsGetItemResponseTransformer;
|
|
120
|
-
const changesetsPatchItemResponseTransformer = async (data) => {
|
|
121
|
-
data = changesetItemSchemaResponseTransformer(data);
|
|
122
|
-
return data;
|
|
123
|
-
};
|
|
124
|
-
exports.changesetsPatchItemResponseTransformer = changesetsPatchItemResponseTransformer;
|
|
125
|
-
const changesetItemPageSchemaResponseTransformer = (data) => {
|
|
126
|
-
if (data.items) {
|
|
127
|
-
data.items = data.items.map((item) => {
|
|
128
|
-
return changesetItemSchemaResponseTransformer(item);
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
return data;
|
|
132
|
-
};
|
|
133
|
-
const changesetsListItemsResponseTransformer = async (data) => {
|
|
134
|
-
data = changesetItemPageSchemaResponseTransformer(data);
|
|
135
|
-
return data;
|
|
136
|
-
};
|
|
137
|
-
exports.changesetsListItemsResponseTransformer = changesetsListItemsResponseTransformer;
|
|
138
|
-
const changesetsCreateItemResponseTransformer = async (data) => {
|
|
139
|
-
data = changesetItemSchemaResponseTransformer(data);
|
|
140
|
-
return data;
|
|
141
|
-
};
|
|
142
|
-
exports.changesetsCreateItemResponseTransformer = changesetsCreateItemResponseTransformer;
|
|
143
97
|
const contentItemSchemaResponseTransformer = (data) => {
|
|
144
98
|
if (data.published) {
|
|
145
99
|
data.published = new Date(data.published);
|
|
@@ -186,9 +140,7 @@ const contentPatchMetadataResponseTransformer = async (data) => {
|
|
|
186
140
|
exports.contentPatchMetadataResponseTransformer = contentPatchMetadataResponseTransformer;
|
|
187
141
|
const contentMetadataPageSchemaResponseTransformer = (data) => {
|
|
188
142
|
if (data.items) {
|
|
189
|
-
data.items = data.items.map((item) =>
|
|
190
|
-
return contentMetadataSchemaResponseTransformer(item);
|
|
191
|
-
});
|
|
143
|
+
data.items = data.items.map((item) => contentMetadataSchemaResponseTransformer(item));
|
|
192
144
|
}
|
|
193
145
|
return data;
|
|
194
146
|
};
|
|
@@ -219,9 +171,7 @@ const contentUndeleteResponseTransformer = async (data) => {
|
|
|
219
171
|
exports.contentUndeleteResponseTransformer = contentUndeleteResponseTransformer;
|
|
220
172
|
const contentItemPageSchemaResponseTransformer = (data) => {
|
|
221
173
|
if (data.items) {
|
|
222
|
-
data.items = data.items.map((item) =>
|
|
223
|
-
return contentItemSchemaResponseTransformer(item);
|
|
224
|
-
});
|
|
174
|
+
data.items = data.items.map((item) => contentItemSchemaResponseTransformer(item));
|
|
225
175
|
}
|
|
226
176
|
return data;
|
|
227
177
|
};
|
|
@@ -260,14 +210,6 @@ const contentPatchVersionResponseTransformer = async (data) => {
|
|
|
260
210
|
return data;
|
|
261
211
|
};
|
|
262
212
|
exports.contentPatchVersionResponseTransformer = contentPatchVersionResponseTransformer;
|
|
263
|
-
const contentTypePageSchemaResponseTransformer = (data) => {
|
|
264
|
-
if (data.items) {
|
|
265
|
-
data.items = data.items.map((item) => {
|
|
266
|
-
return contentTypeSchemaResponseTransformer(item);
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
|
-
return data;
|
|
270
|
-
};
|
|
271
213
|
const contentTypeSchemaResponseTransformer = (data) => {
|
|
272
214
|
if (data.created) {
|
|
273
215
|
data.created = new Date(data.created);
|
|
@@ -277,6 +219,12 @@ const contentTypeSchemaResponseTransformer = (data) => {
|
|
|
277
219
|
}
|
|
278
220
|
return data;
|
|
279
221
|
};
|
|
222
|
+
const contentTypePageSchemaResponseTransformer = (data) => {
|
|
223
|
+
if (data.items) {
|
|
224
|
+
data.items = data.items.map((item) => contentTypeSchemaResponseTransformer(item));
|
|
225
|
+
}
|
|
226
|
+
return data;
|
|
227
|
+
};
|
|
280
228
|
const contentTypesListResponseTransformer = async (data) => {
|
|
281
229
|
data = contentTypePageSchemaResponseTransformer(data);
|
|
282
230
|
return data;
|
|
@@ -302,14 +250,6 @@ const contentTypesPatchResponseTransformer = async (data) => {
|
|
|
302
250
|
return data;
|
|
303
251
|
};
|
|
304
252
|
exports.contentTypesPatchResponseTransformer = contentTypesPatchResponseTransformer;
|
|
305
|
-
const displayTemplatePageSchemaResponseTransformer = (data) => {
|
|
306
|
-
if (data.items) {
|
|
307
|
-
data.items = data.items.map((item) => {
|
|
308
|
-
return displayTemplateSchemaResponseTransformer(item);
|
|
309
|
-
});
|
|
310
|
-
}
|
|
311
|
-
return data;
|
|
312
|
-
};
|
|
313
253
|
const displayTemplateSchemaResponseTransformer = (data) => {
|
|
314
254
|
if (data.created) {
|
|
315
255
|
data.created = new Date(data.created);
|
|
@@ -319,6 +259,12 @@ const displayTemplateSchemaResponseTransformer = (data) => {
|
|
|
319
259
|
}
|
|
320
260
|
return data;
|
|
321
261
|
};
|
|
262
|
+
const displayTemplatePageSchemaResponseTransformer = (data) => {
|
|
263
|
+
if (data.items) {
|
|
264
|
+
data.items = data.items.map((item) => displayTemplateSchemaResponseTransformer(item));
|
|
265
|
+
}
|
|
266
|
+
return data;
|
|
267
|
+
};
|
|
322
268
|
const displayTemplatesListResponseTransformer = async (data) => {
|
|
323
269
|
data = displayTemplatePageSchemaResponseTransformer(data);
|
|
324
270
|
return data;
|
|
@@ -344,14 +290,6 @@ const displayTemplatesPatchResponseTransformer = async (data) => {
|
|
|
344
290
|
return data;
|
|
345
291
|
};
|
|
346
292
|
exports.displayTemplatesPatchResponseTransformer = displayTemplatesPatchResponseTransformer;
|
|
347
|
-
const propertyFormatPageSchemaResponseTransformer = (data) => {
|
|
348
|
-
if (data.items) {
|
|
349
|
-
data.items = data.items.map((item) => {
|
|
350
|
-
return propertyFormatSchemaResponseTransformer(item);
|
|
351
|
-
});
|
|
352
|
-
}
|
|
353
|
-
return data;
|
|
354
|
-
};
|
|
355
293
|
const propertyFormatSchemaResponseTransformer = (data) => {
|
|
356
294
|
if (data.created) {
|
|
357
295
|
data.created = new Date(data.created);
|
|
@@ -361,6 +299,12 @@ const propertyFormatSchemaResponseTransformer = (data) => {
|
|
|
361
299
|
}
|
|
362
300
|
return data;
|
|
363
301
|
};
|
|
302
|
+
const propertyFormatPageSchemaResponseTransformer = (data) => {
|
|
303
|
+
if (data.items) {
|
|
304
|
+
data.items = data.items.map((item) => propertyFormatSchemaResponseTransformer(item));
|
|
305
|
+
}
|
|
306
|
+
return data;
|
|
307
|
+
};
|
|
364
308
|
const propertyFormatsListResponseTransformer = async (data) => {
|
|
365
309
|
data = propertyFormatPageSchemaResponseTransformer(data);
|
|
366
310
|
return data;
|
|
@@ -371,14 +315,6 @@ const propertyFormatsGetResponseTransformer = async (data) => {
|
|
|
371
315
|
return data;
|
|
372
316
|
};
|
|
373
317
|
exports.propertyFormatsGetResponseTransformer = propertyFormatsGetResponseTransformer;
|
|
374
|
-
const propertyGroupPageSchemaResponseTransformer = (data) => {
|
|
375
|
-
if (data.items) {
|
|
376
|
-
data.items = data.items.map((item) => {
|
|
377
|
-
return propertyGroupSchemaResponseTransformer(item);
|
|
378
|
-
});
|
|
379
|
-
}
|
|
380
|
-
return data;
|
|
381
|
-
};
|
|
382
318
|
const propertyGroupSchemaResponseTransformer = (data) => {
|
|
383
319
|
if (data.created) {
|
|
384
320
|
data.created = new Date(data.created);
|
|
@@ -388,6 +324,12 @@ const propertyGroupSchemaResponseTransformer = (data) => {
|
|
|
388
324
|
}
|
|
389
325
|
return data;
|
|
390
326
|
};
|
|
327
|
+
const propertyGroupPageSchemaResponseTransformer = (data) => {
|
|
328
|
+
if (data.items) {
|
|
329
|
+
data.items = data.items.map((item) => propertyGroupSchemaResponseTransformer(item));
|
|
330
|
+
}
|
|
331
|
+
return data;
|
|
332
|
+
};
|
|
391
333
|
const propertyGroupsListResponseTransformer = async (data) => {
|
|
392
334
|
data = propertyGroupPageSchemaResponseTransformer(data);
|
|
393
335
|
return data;
|
|
@@ -413,5 +355,3 @@ const propertyGroupsPatchResponseTransformer = async (data) => {
|
|
|
413
355
|
return data;
|
|
414
356
|
};
|
|
415
357
|
exports.propertyGroupsPatchResponseTransformer = propertyGroupsPatchResponseTransformer;
|
|
416
|
-
const compositionDisplaySettingsSchemaResponseTransformer = async (data) => { return data; };
|
|
417
|
-
const contentReferenceSchemaResponseTransformer = async (data) => { return data; };
|
|
@@ -1303,11 +1303,11 @@ export type BlueprintsDeleteData = {
|
|
|
1303
1303
|
/**
|
|
1304
1304
|
* 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.
|
|
1305
1305
|
*/
|
|
1306
|
-
|
|
1306
|
+
'If-Match'?: string;
|
|
1307
1307
|
/**
|
|
1308
1308
|
* 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.
|
|
1309
1309
|
*/
|
|
1310
|
-
|
|
1310
|
+
'If-Unmodified-Since'?: string;
|
|
1311
1311
|
};
|
|
1312
1312
|
path: {
|
|
1313
1313
|
/**
|
|
@@ -1350,11 +1350,11 @@ export type BlueprintsGetData = {
|
|
|
1350
1350
|
/**
|
|
1351
1351
|
* 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.
|
|
1352
1352
|
*/
|
|
1353
|
-
|
|
1353
|
+
'If-None-Match'?: string;
|
|
1354
1354
|
/**
|
|
1355
1355
|
* 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.
|
|
1356
1356
|
*/
|
|
1357
|
-
|
|
1357
|
+
'If-Modified-Since'?: string;
|
|
1358
1358
|
};
|
|
1359
1359
|
path: {
|
|
1360
1360
|
/**
|
|
@@ -1392,11 +1392,11 @@ export type BlueprintsPatchData = {
|
|
|
1392
1392
|
/**
|
|
1393
1393
|
* 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.
|
|
1394
1394
|
*/
|
|
1395
|
-
|
|
1395
|
+
'If-Match'?: string;
|
|
1396
1396
|
/**
|
|
1397
1397
|
* 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.
|
|
1398
1398
|
*/
|
|
1399
|
-
|
|
1399
|
+
'If-Unmodified-Since'?: string;
|
|
1400
1400
|
};
|
|
1401
1401
|
path: {
|
|
1402
1402
|
/**
|
|
@@ -1527,11 +1527,11 @@ export type ChangesetsGetData = {
|
|
|
1527
1527
|
/**
|
|
1528
1528
|
* 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.
|
|
1529
1529
|
*/
|
|
1530
|
-
|
|
1530
|
+
'If-None-Match'?: string;
|
|
1531
1531
|
/**
|
|
1532
1532
|
* 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.
|
|
1533
1533
|
*/
|
|
1534
|
-
|
|
1534
|
+
'If-Modified-Since'?: string;
|
|
1535
1535
|
};
|
|
1536
1536
|
path: {
|
|
1537
1537
|
/**
|
|
@@ -1795,7 +1795,7 @@ export type ContentCreateData = {
|
|
|
1795
1795
|
/**
|
|
1796
1796
|
* Indicates that the content validation should be ignored.
|
|
1797
1797
|
*/
|
|
1798
|
-
|
|
1798
|
+
'cms-skip-validation'?: boolean;
|
|
1799
1799
|
};
|
|
1800
1800
|
path?: never;
|
|
1801
1801
|
query?: never;
|
|
@@ -1825,7 +1825,7 @@ export type ContentDeleteData = {
|
|
|
1825
1825
|
/**
|
|
1826
1826
|
* Indicates that the content item should be permanently deleted immediately or if it should be soft deleted first.
|
|
1827
1827
|
*/
|
|
1828
|
-
|
|
1828
|
+
'cms-permanent-delete'?: boolean;
|
|
1829
1829
|
};
|
|
1830
1830
|
path: {
|
|
1831
1831
|
/**
|
|
@@ -2212,7 +2212,7 @@ export type ContentCreateVersionData = {
|
|
|
2212
2212
|
/**
|
|
2213
2213
|
* Indicates that the content validation should be ignored.
|
|
2214
2214
|
*/
|
|
2215
|
-
|
|
2215
|
+
'cms-skip-validation'?: boolean;
|
|
2216
2216
|
};
|
|
2217
2217
|
path: {
|
|
2218
2218
|
/**
|
|
@@ -2282,11 +2282,11 @@ export type ContentGetVersionData = {
|
|
|
2282
2282
|
/**
|
|
2283
2283
|
* 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.
|
|
2284
2284
|
*/
|
|
2285
|
-
|
|
2285
|
+
'If-None-Match'?: string;
|
|
2286
2286
|
/**
|
|
2287
2287
|
* 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.
|
|
2288
2288
|
*/
|
|
2289
|
-
|
|
2289
|
+
'If-Modified-Since'?: string;
|
|
2290
2290
|
};
|
|
2291
2291
|
path: {
|
|
2292
2292
|
key: string;
|
|
@@ -2324,7 +2324,7 @@ export type ContentPatchVersionData = {
|
|
|
2324
2324
|
/**
|
|
2325
2325
|
* Indicates that the content validation should be ignored.
|
|
2326
2326
|
*/
|
|
2327
|
-
|
|
2327
|
+
'cms-skip-validation'?: boolean;
|
|
2328
2328
|
};
|
|
2329
2329
|
path: {
|
|
2330
2330
|
/**
|
|
@@ -2431,11 +2431,11 @@ export type ContentTypesDeleteData = {
|
|
|
2431
2431
|
/**
|
|
2432
2432
|
* 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.
|
|
2433
2433
|
*/
|
|
2434
|
-
|
|
2434
|
+
'If-Match'?: string;
|
|
2435
2435
|
/**
|
|
2436
2436
|
* 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.
|
|
2437
2437
|
*/
|
|
2438
|
-
|
|
2438
|
+
'If-Unmodified-Since'?: string;
|
|
2439
2439
|
};
|
|
2440
2440
|
path: {
|
|
2441
2441
|
/**
|
|
@@ -2478,11 +2478,11 @@ export type ContentTypesGetData = {
|
|
|
2478
2478
|
/**
|
|
2479
2479
|
* 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.
|
|
2480
2480
|
*/
|
|
2481
|
-
|
|
2481
|
+
'If-None-Match'?: string;
|
|
2482
2482
|
/**
|
|
2483
2483
|
* 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.
|
|
2484
2484
|
*/
|
|
2485
|
-
|
|
2485
|
+
'If-Modified-Since'?: string;
|
|
2486
2486
|
};
|
|
2487
2487
|
path: {
|
|
2488
2488
|
/**
|
|
@@ -2520,15 +2520,15 @@ export type ContentTypesPatchData = {
|
|
|
2520
2520
|
/**
|
|
2521
2521
|
* Patch the content type even though the changes might result in data loss.
|
|
2522
2522
|
*/
|
|
2523
|
-
|
|
2523
|
+
'cms-ignore-data-loss-warnings'?: boolean;
|
|
2524
2524
|
/**
|
|
2525
2525
|
* 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.
|
|
2526
2526
|
*/
|
|
2527
|
-
|
|
2527
|
+
'If-Match'?: string;
|
|
2528
2528
|
/**
|
|
2529
2529
|
* 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.
|
|
2530
2530
|
*/
|
|
2531
|
-
|
|
2531
|
+
'If-Unmodified-Since'?: string;
|
|
2532
2532
|
};
|
|
2533
2533
|
path: {
|
|
2534
2534
|
/**
|
|
@@ -2621,11 +2621,11 @@ export type DisplayTemplatesDeleteData = {
|
|
|
2621
2621
|
/**
|
|
2622
2622
|
* 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.
|
|
2623
2623
|
*/
|
|
2624
|
-
|
|
2624
|
+
'If-Match'?: string;
|
|
2625
2625
|
/**
|
|
2626
2626
|
* 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.
|
|
2627
2627
|
*/
|
|
2628
|
-
|
|
2628
|
+
'If-Unmodified-Since'?: string;
|
|
2629
2629
|
};
|
|
2630
2630
|
path: {
|
|
2631
2631
|
/**
|
|
@@ -2668,11 +2668,11 @@ export type DisplayTemplatesGetData = {
|
|
|
2668
2668
|
/**
|
|
2669
2669
|
* 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.
|
|
2670
2670
|
*/
|
|
2671
|
-
|
|
2671
|
+
'If-None-Match'?: string;
|
|
2672
2672
|
/**
|
|
2673
2673
|
* 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.
|
|
2674
2674
|
*/
|
|
2675
|
-
|
|
2675
|
+
'If-Modified-Since'?: string;
|
|
2676
2676
|
};
|
|
2677
2677
|
path: {
|
|
2678
2678
|
/**
|
|
@@ -2710,11 +2710,11 @@ export type DisplayTemplatesPatchData = {
|
|
|
2710
2710
|
/**
|
|
2711
2711
|
* 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.
|
|
2712
2712
|
*/
|
|
2713
|
-
|
|
2713
|
+
'If-Match'?: string;
|
|
2714
2714
|
/**
|
|
2715
2715
|
* 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.
|
|
2716
2716
|
*/
|
|
2717
|
-
|
|
2717
|
+
'If-Unmodified-Since'?: string;
|
|
2718
2718
|
};
|
|
2719
2719
|
path: {
|
|
2720
2720
|
/**
|
|
@@ -2780,11 +2780,11 @@ export type PropertyFormatsGetData = {
|
|
|
2780
2780
|
/**
|
|
2781
2781
|
* 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.
|
|
2782
2782
|
*/
|
|
2783
|
-
|
|
2783
|
+
'If-None-Match'?: string;
|
|
2784
2784
|
/**
|
|
2785
2785
|
* 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.
|
|
2786
2786
|
*/
|
|
2787
|
-
|
|
2787
|
+
'If-Modified-Since'?: string;
|
|
2788
2788
|
};
|
|
2789
2789
|
path: {
|
|
2790
2790
|
/**
|
|
@@ -2877,11 +2877,11 @@ export type PropertyGroupsDeleteData = {
|
|
|
2877
2877
|
/**
|
|
2878
2878
|
* 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.
|
|
2879
2879
|
*/
|
|
2880
|
-
|
|
2880
|
+
'If-Match'?: string;
|
|
2881
2881
|
/**
|
|
2882
2882
|
* 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.
|
|
2883
2883
|
*/
|
|
2884
|
-
|
|
2884
|
+
'If-Unmodified-Since'?: string;
|
|
2885
2885
|
};
|
|
2886
2886
|
path: {
|
|
2887
2887
|
/**
|
|
@@ -2924,11 +2924,11 @@ export type PropertyGroupsGetData = {
|
|
|
2924
2924
|
/**
|
|
2925
2925
|
* 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.
|
|
2926
2926
|
*/
|
|
2927
|
-
|
|
2927
|
+
'If-None-Match'?: string;
|
|
2928
2928
|
/**
|
|
2929
2929
|
* 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.
|
|
2930
2930
|
*/
|
|
2931
|
-
|
|
2931
|
+
'If-Modified-Since'?: string;
|
|
2932
2932
|
};
|
|
2933
2933
|
path: {
|
|
2934
2934
|
/**
|
|
@@ -2966,11 +2966,11 @@ export type PropertyGroupsPatchData = {
|
|
|
2966
2966
|
/**
|
|
2967
2967
|
* 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.
|
|
2968
2968
|
*/
|
|
2969
|
-
|
|
2969
|
+
'If-Match'?: string;
|
|
2970
2970
|
/**
|
|
2971
2971
|
* 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.
|
|
2972
2972
|
*/
|
|
2973
|
-
|
|
2973
|
+
'If-Unmodified-Since'?: string;
|
|
2974
2974
|
};
|
|
2975
2975
|
path: {
|
|
2976
2976
|
/**
|
|
@@ -57,7 +57,31 @@ const createClient = (config = {}) => {
|
|
|
57
57
|
// fetch must be assigned here, otherwise it would throw the error:
|
|
58
58
|
// TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation
|
|
59
59
|
const _fetch = opts.fetch;
|
|
60
|
-
let response
|
|
60
|
+
let response;
|
|
61
|
+
try {
|
|
62
|
+
response = await _fetch(request);
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
// Handle fetch exceptions (AbortError, network errors, etc.)
|
|
66
|
+
let finalError = error;
|
|
67
|
+
for (const fn of interceptors.error.fns) {
|
|
68
|
+
if (fn) {
|
|
69
|
+
finalError = (await fn(error, undefined, request, opts));
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
finalError = finalError || {};
|
|
73
|
+
if (opts.throwOnError) {
|
|
74
|
+
throw finalError;
|
|
75
|
+
}
|
|
76
|
+
// Return error response
|
|
77
|
+
return opts.responseStyle === 'data'
|
|
78
|
+
? undefined
|
|
79
|
+
: {
|
|
80
|
+
error: finalError,
|
|
81
|
+
request,
|
|
82
|
+
response: undefined,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
61
85
|
for (const fn of interceptors.response.fns) {
|
|
62
86
|
if (fn) {
|
|
63
87
|
response = await fn(response, request, opts);
|
|
@@ -174,6 +198,7 @@ const createClient = (config = {}) => {
|
|
|
174
198
|
}
|
|
175
199
|
return request;
|
|
176
200
|
},
|
|
201
|
+
serializedBody: (0, utils_gen_1.getValidRequestBody)(opts),
|
|
177
202
|
url,
|
|
178
203
|
});
|
|
179
204
|
};
|
|
@@ -4,5 +4,5 @@ export { formDataBodySerializer, jsonBodySerializer, urlSearchParamsBodySerializ
|
|
|
4
4
|
export { buildClientParams } from '../core/params.gen';
|
|
5
5
|
export { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';
|
|
6
6
|
export { createClient } from './client.gen';
|
|
7
|
-
export type { Client, ClientOptions, Config, CreateClientConfig, Options,
|
|
7
|
+
export type { Client, ClientOptions, Config, CreateClientConfig, Options, RequestOptions, RequestResult, ResolvedRequestOptions, ResponseStyle, TDataShape, } from './types.gen';
|
|
8
8
|
export { createConfig, mergeHeaders } from './utils.gen';
|
|
@@ -92,7 +92,7 @@ type BuildUrlFn = <TData extends {
|
|
|
92
92
|
path?: Record<string, unknown>;
|
|
93
93
|
query?: Record<string, unknown>;
|
|
94
94
|
url: string;
|
|
95
|
-
}>(options:
|
|
95
|
+
}>(options: TData & Options<TData>) => string;
|
|
96
96
|
export type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {
|
|
97
97
|
interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;
|
|
98
98
|
};
|
|
@@ -113,12 +113,5 @@ export interface TDataShape {
|
|
|
113
113
|
url: string;
|
|
114
114
|
}
|
|
115
115
|
type OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
116
|
-
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown, TResponseStyle extends ResponseStyle = 'fields'> = OmitKeys<RequestOptions<TResponse, TResponseStyle, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & Omit<TData, 'url'
|
|
117
|
-
export type OptionsLegacyParser<TData = unknown, ThrowOnError extends boolean = boolean, TResponseStyle extends ResponseStyle = 'fields'> = TData extends {
|
|
118
|
-
body?: any;
|
|
119
|
-
} ? TData extends {
|
|
120
|
-
headers?: any;
|
|
121
|
-
} ? OmitKeys<RequestOptions<unknown, TResponseStyle, ThrowOnError>, 'body' | 'headers' | 'url'> & TData : OmitKeys<RequestOptions<unknown, TResponseStyle, ThrowOnError>, 'body' | 'url'> & TData & Pick<RequestOptions<unknown, TResponseStyle, ThrowOnError>, 'headers'> : TData extends {
|
|
122
|
-
headers?: any;
|
|
123
|
-
} ? OmitKeys<RequestOptions<unknown, TResponseStyle, ThrowOnError>, 'headers' | 'url'> & TData & Pick<RequestOptions<unknown, TResponseStyle, ThrowOnError>, 'body'> : OmitKeys<RequestOptions<unknown, TResponseStyle, ThrowOnError>, 'url'> & TData;
|
|
116
|
+
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown, TResponseStyle extends ResponseStyle = 'fields'> = OmitKeys<RequestOptions<TResponse, TResponseStyle, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
|
|
124
117
|
export {};
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.client = void 0;
|
|
5
|
-
const client_1 = require("./client");
|
|
6
5
|
const client_config_1 = require("../client-config");
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
})));
|
|
6
|
+
const client_1 = require("./client");
|
|
7
|
+
exports.client = (0, client_1.createClient)((0, client_config_1.createClientConfig)((0, client_1.createConfig)({ baseUrl: '/_cms/preview2' })));
|
|
@@ -17,6 +17,16 @@ export type Field = {
|
|
|
17
17
|
*/
|
|
18
18
|
key?: string;
|
|
19
19
|
map?: string;
|
|
20
|
+
} | {
|
|
21
|
+
/**
|
|
22
|
+
* Field name. This is the name we want the user to see and use.
|
|
23
|
+
*/
|
|
24
|
+
key: string;
|
|
25
|
+
/**
|
|
26
|
+
* Field mapped name. This is the name we want to use in the request.
|
|
27
|
+
* If `in` is omitted, `map` aliases `key` to the transport layer.
|
|
28
|
+
*/
|
|
29
|
+
map: Slot;
|
|
20
30
|
};
|
|
21
31
|
export interface Fields {
|
|
22
32
|
allowExtra?: Partial<Record<Slot, boolean>>;
|