@remkoj/optimizely-cms-api 6.0.0-pre9 → 6.0.0-rc.1
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/api-client.d.ts +1 -13
- package/dist/api-client.js +1 -48
- package/dist/client/client/client.gen.js +36 -5
- package/dist/client/client/index.d.ts +1 -1
- package/dist/client/client/types.gen.d.ts +3 -10
- package/dist/client/client/utils.gen.d.ts +1 -1
- package/dist/client/client/utils.gen.js +9 -11
- package/dist/client/client.gen.js +2 -4
- package/dist/client/core/bodySerializer.gen.d.ts +16 -8
- package/dist/client/core/bodySerializer.gen.js +1 -1
- package/dist/client/core/params.gen.d.ts +10 -0
- package/dist/client/core/params.gen.js +18 -6
- package/dist/client/core/pathSerializer.gen.js +3 -11
- package/dist/client/core/queryKeySerializer.gen.js +4 -11
- package/dist/client/core/serverSentEvents.gen.js +5 -7
- package/dist/client/index.d.ts +4 -4
- package/dist/client/index.js +98 -17
- package/dist/client/sdk.gen.d.ts +211 -1
- package/dist/client/sdk.gen.js +506 -144
- package/dist/client/transformers.gen.d.ts +27 -1
- package/dist/client/transformers.gen.js +246 -46
- package/dist/client/types.gen.d.ts +1818 -44
- package/dist/client-config.js +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -2
- package/dist/version.json +2 -2
- package/package.json +9 -9
- package/dist/instance.client/client/client.gen.d.ts +0 -2
- package/dist/instance.client/client/client.gen.js +0 -208
- package/dist/instance.client/client/index.d.ts +0 -8
- package/dist/instance.client/client/index.js +0 -17
- package/dist/instance.client/client/types.gen.d.ts +0 -124
- package/dist/instance.client/client/types.gen.js +0 -3
- package/dist/instance.client/client/utils.gen.d.ts +0 -33
- package/dist/instance.client/client/utils.gen.js +0 -241
- package/dist/instance.client/client.gen.d.ts +0 -12
- package/dist/instance.client/client.gen.js +0 -9
- package/dist/instance.client/core/auth.gen.d.ts +0 -18
- package/dist/instance.client/core/auth.gen.js +0 -18
- package/dist/instance.client/core/bodySerializer.gen.d.ts +0 -17
- package/dist/instance.client/core/bodySerializer.gen.js +0 -60
- package/dist/instance.client/core/params.gen.d.ts +0 -33
- package/dist/instance.client/core/params.gen.js +0 -92
- package/dist/instance.client/core/pathSerializer.gen.d.ts +0 -33
- package/dist/instance.client/core/pathSerializer.gen.js +0 -123
- package/dist/instance.client/core/queryKeySerializer.gen.d.ts +0 -18
- package/dist/instance.client/core/queryKeySerializer.gen.js +0 -105
- package/dist/instance.client/core/serverSentEvents.gen.d.ts +0 -71
- package/dist/instance.client/core/serverSentEvents.gen.js +0 -139
- package/dist/instance.client/core/types.gen.d.ts +0 -78
- package/dist/instance.client/core/types.gen.js +0 -3
- package/dist/instance.client/core/utils.gen.d.ts +0 -19
- package/dist/instance.client/core/utils.gen.js +0 -93
- package/dist/instance.client/index.d.ts +0 -4
- package/dist/instance.client/index.js +0 -21
- package/dist/instance.client/sdk.gen.d.ts +0 -256
- package/dist/instance.client/sdk.gen.js +0 -638
- package/dist/instance.client/transformers.gen.d.ts +0 -34
- package/dist/instance.client/transformers.gen.js +0 -273
- package/dist/instance.client/types.gen.d.ts +0 -2838
- package/dist/instance.client/types.gen.js +0 -3
package/README.md
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
# Optimizely CMS - Integration API Client <!-- omit in toc -->
|
|
2
|
+
|
|
3
|
+
> [!WARNING]
|
|
4
|
+
> There'll be an update of Optimizely SaaS CMS that is incompatible with all SDK versions prior to 5.1.6. If you don't upgrade, you will see empty pages (main website) and "Component not found" messages (preview).
|
|
5
|
+
|
|
1
6
|
[](./LICENSE)
|
|
2
7
|

|
|
3
8
|
|
|
4
|
-
# Optimizely CMS - Integration API Client <!-- omit in toc -->
|
|
5
9
|
A Javascript client for the Integration API provided by the Optimizely CMS. It wraps the [Optimizely CMS SaaS Core REST API](https://docs.developers.optimizely.com/content-management-system/v1.0.0-SaaS-Core/reference/introduction-to-the-cms-content-api).
|
|
6
10
|
|
|
7
11
|
## Installation
|
|
@@ -40,4 +44,4 @@ The following configuration options are available for
|
|
|
40
44
|
| OPTIMIZELY_CMS_URL | base | no | Sets the URL of the Optimizely CMS instance |
|
|
41
45
|
| OPTIMIZELY_CMS_CLIENT_ID | clientId | yes | The API Client ID, as configured within the CMS |
|
|
42
46
|
| OPTIMIZELY_CMS_CLIENT_SECRET | clientSecret | yes | The API Client Secret as generated by the CMS when creating the client |
|
|
43
|
-
| OPTIMIZELY_CMS_USER_ID | actAs | no | The username of the CMS user to impersonate |
|
|
47
|
+
| OPTIMIZELY_CMS_USER_ID | actAs | no | The username of the CMS user to impersonate |
|
package/dist/api-client.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import * as Operations from './client/sdk.gen';
|
|
2
2
|
import { createClient, type RequestResult, type ResponseStyle } from './client/client';
|
|
3
|
-
import * as InstanceOperations from './instance.client/sdk.gen';
|
|
4
|
-
import { createClient as createInstanceClient, type RequestResult as InstanceRequestResult, type ResponseStyle as InstanceResponseStyle } from './instance.client/client';
|
|
5
3
|
import { type CmsIntegrationApiOptions } from "./config";
|
|
6
4
|
import { type InstanceApiVersionInfo, OptiCmsVersion } from "./types";
|
|
7
5
|
type OperationsType = {
|
|
@@ -9,18 +7,9 @@ type OperationsType = {
|
|
|
9
7
|
};
|
|
10
8
|
type OperationsNames = keyof OperationsType;
|
|
11
9
|
type OperationReturnType<RT extends (...args: any) => any> = ReturnType<RT> extends RequestResult<any, any, boolean, ResponseStyle> ? Promise<NonNullable<Awaited<ReturnType<RT>>['data']>> : never;
|
|
12
|
-
type
|
|
13
|
-
-readonly [KT in keyof typeof InstanceOperations]: (typeof InstanceOperations)[KT];
|
|
14
|
-
};
|
|
15
|
-
type InstanceOperationsNames = keyof InstanceOperationsType;
|
|
16
|
-
type InstanceOperationReturnType<RT extends (...args: any) => any> = ReturnType<RT> extends InstanceRequestResult<any, any, boolean, InstanceResponseStyle> ? Promise<NonNullable<Awaited<ReturnType<RT>>['data']>> : never;
|
|
17
|
-
type BaseApiClientFunctions = {
|
|
10
|
+
type ApiClientFunctions = {
|
|
18
11
|
readonly [KT in OperationsNames]: OperationsType[KT] extends Function ? (options?: Parameters<OperationsType[KT]>[0]) => OperationReturnType<OperationsType[KT]> : never;
|
|
19
12
|
};
|
|
20
|
-
type InstanceClientFunctions = {
|
|
21
|
-
readonly [KT in InstanceOperationsNames as InstanceOperationsType[KT] extends Function ? `preview2${Capitalize<KT>}` : never]: InstanceOperationsType[KT] extends Function ? (options?: Parameters<InstanceOperationsType[KT]>[0]) => InstanceOperationReturnType<InstanceOperationsType[KT]> : never;
|
|
22
|
-
};
|
|
23
|
-
type ApiClientFunctions = BaseApiClientFunctions & InstanceClientFunctions;
|
|
24
13
|
type BaseClass = {
|
|
25
14
|
new (...args: any[]): BaseApiClient;
|
|
26
15
|
};
|
|
@@ -34,7 +23,6 @@ export type ClassWithMixin<TBase extends BaseClass, Mixin> = OmitConstructor<TBa
|
|
|
34
23
|
declare class BaseApiClient {
|
|
35
24
|
protected _config: CmsIntegrationApiOptions;
|
|
36
25
|
protected _client: ReturnType<typeof createClient>;
|
|
37
|
-
protected _instanceClient: ReturnType<typeof createInstanceClient>;
|
|
38
26
|
constructor(config?: CmsIntegrationApiOptions);
|
|
39
27
|
/**
|
|
40
28
|
* Get the runtime configuration of the target CMS version.
|
package/dist/api-client.js
CHANGED
|
@@ -39,8 +39,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.ApiClient = exports.ApiError = void 0;
|
|
40
40
|
const Operations = __importStar(require("./client/sdk.gen"));
|
|
41
41
|
const client_1 = require("./client/client");
|
|
42
|
-
const InstanceOperations = __importStar(require("./instance.client/sdk.gen"));
|
|
43
|
-
const client_2 = require("./instance.client/client");
|
|
44
42
|
const config_1 = require("./config");
|
|
45
43
|
const types_1 = require("./types");
|
|
46
44
|
const client_config_1 = require("./client-config");
|
|
@@ -70,51 +68,24 @@ function applyOperations(Base) {
|
|
|
70
68
|
//@ts-expect-error
|
|
71
69
|
NewClass.prototype[propName] = wrapper;
|
|
72
70
|
});
|
|
73
|
-
// Bind the older Preview2 operations
|
|
74
|
-
Object.getOwnPropertyNames(InstanceOperations).filter(isInstanceClientFunction).forEach(propName => {
|
|
75
|
-
async function wrapper(args) {
|
|
76
|
-
const operationArgs = {
|
|
77
|
-
throwOnError: false,
|
|
78
|
-
...args,
|
|
79
|
-
//@ts-expect-error
|
|
80
|
-
client: this._instanceClient
|
|
81
|
-
};
|
|
82
|
-
//@ts-expect-error
|
|
83
|
-
const result = await InstanceOperations[propName](operationArgs);
|
|
84
|
-
if (result.data)
|
|
85
|
-
return result.data;
|
|
86
|
-
throw new ApiError(result);
|
|
87
|
-
}
|
|
88
|
-
const fnName = `preview2${toCapitalized(propName)}`;
|
|
89
|
-
//@ts-expect-error
|
|
90
|
-
NewClass.prototype[fnName] = wrapper;
|
|
91
|
-
});
|
|
92
71
|
// Return the new class
|
|
93
72
|
return NewClass;
|
|
94
73
|
}
|
|
95
|
-
function toCapitalized(toCapitalize) {
|
|
96
|
-
return (toCapitalize.substring(0, 1).toUpperCase() + toCapitalize.substring(1));
|
|
97
|
-
}
|
|
98
74
|
function createIsFunctionValidator(baseType) {
|
|
99
75
|
return (propName) => {
|
|
100
76
|
return typeof (baseType[propName]) == 'function';
|
|
101
77
|
};
|
|
102
78
|
}
|
|
103
79
|
const isApiClientFunction = createIsFunctionValidator(Operations);
|
|
104
|
-
const isInstanceClientFunction = createIsFunctionValidator(InstanceOperations);
|
|
105
80
|
class BaseApiClient {
|
|
106
81
|
_config;
|
|
107
82
|
_client;
|
|
108
|
-
_instanceClient;
|
|
109
83
|
constructor(config) {
|
|
110
84
|
// Store instance variables
|
|
111
85
|
this._config = config ?? (0, config_1.readEnvConfig)();
|
|
112
86
|
this._client = (0, client_1.createClient)((0, client_config_1.createClientConfig)((0, client_1.createConfig)({
|
|
113
|
-
baseUrl: 'https://api.cms.optimizely.com/preview3'
|
|
87
|
+
baseUrl: 'https://api.cms.optimizely.com/preview3',
|
|
114
88
|
}), this._config));
|
|
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
|
|
117
|
-
})));
|
|
118
89
|
// Configure Client
|
|
119
90
|
if (this._config.debug) {
|
|
120
91
|
this._client.interceptors.request.use(async (request) => {
|
|
@@ -125,14 +96,6 @@ class BaseApiClient {
|
|
|
125
96
|
console.log(`✨ [CMS API] Received response ${response.status} ${response.statusText} of type ${response.headers.get('Content-Type') ?? 'unknown'} for ${request.url}`);
|
|
126
97
|
return response;
|
|
127
98
|
});
|
|
128
|
-
this._instanceClient.interceptors.request.use(async (request) => {
|
|
129
|
-
console.log(`🔍 [CMS API] Sending ${request.method} request to ${request.url}`);
|
|
130
|
-
return request;
|
|
131
|
-
});
|
|
132
|
-
this._instanceClient.interceptors.response.use((response, request) => {
|
|
133
|
-
console.log(`✨ [CMS API] Received response ${response.status} ${response.statusText} of type ${response.headers.get('Content-Type') ?? 'unknown'} for ${request.url}`);
|
|
134
|
-
return response;
|
|
135
|
-
});
|
|
136
99
|
}
|
|
137
100
|
}
|
|
138
101
|
/**
|
|
@@ -191,19 +154,9 @@ class BaseApiClient {
|
|
|
191
154
|
const result = await this._client.get({
|
|
192
155
|
url: '/info'
|
|
193
156
|
});
|
|
194
|
-
const instanceResult = await this._instanceClient.get({
|
|
195
|
-
url: '/info'
|
|
196
|
-
});
|
|
197
157
|
if (result.data) {
|
|
198
158
|
const data = result.data;
|
|
199
159
|
data.baseUrl = this._client.getConfig().baseUrl;
|
|
200
|
-
data.results = {
|
|
201
|
-
preview2Data: {
|
|
202
|
-
baseUrl: this._instanceClient.getConfig().baseUrl,
|
|
203
|
-
...instanceResult?.data ?? {}
|
|
204
|
-
},
|
|
205
|
-
...data.results,
|
|
206
|
-
};
|
|
207
160
|
return data;
|
|
208
161
|
}
|
|
209
162
|
throw new ApiError(result);
|
|
@@ -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);
|
|
@@ -71,8 +95,7 @@ const createClient = (config = {}) => {
|
|
|
71
95
|
const parseAs = (opts.parseAs === 'auto'
|
|
72
96
|
? (0, utils_gen_2.getParseAs)(response.headers.get('Content-Type'))
|
|
73
97
|
: opts.parseAs) ?? 'json';
|
|
74
|
-
if (response.status === 204 ||
|
|
75
|
-
response.headers.get('Content-Length') === '0') {
|
|
98
|
+
if (response.status === 204 || response.headers.get('Content-Length') === '0') {
|
|
76
99
|
let emptyData;
|
|
77
100
|
switch (parseAs) {
|
|
78
101
|
case 'arrayBuffer':
|
|
@@ -103,10 +126,16 @@ const createClient = (config = {}) => {
|
|
|
103
126
|
case 'arrayBuffer':
|
|
104
127
|
case 'blob':
|
|
105
128
|
case 'formData':
|
|
106
|
-
case 'json':
|
|
107
129
|
case 'text':
|
|
108
130
|
data = await response[parseAs]();
|
|
109
131
|
break;
|
|
132
|
+
case 'json': {
|
|
133
|
+
// Some servers return 200 with no Content-Length and empty body.
|
|
134
|
+
// response.json() would throw; read as text and parse if non-empty.
|
|
135
|
+
const text = await response.text();
|
|
136
|
+
data = text ? JSON.parse(text) : {};
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
110
139
|
case 'stream':
|
|
111
140
|
return opts.responseStyle === 'data'
|
|
112
141
|
? response.body
|
|
@@ -174,11 +203,13 @@ const createClient = (config = {}) => {
|
|
|
174
203
|
}
|
|
175
204
|
return request;
|
|
176
205
|
},
|
|
206
|
+
serializedBody: (0, utils_gen_1.getValidRequestBody)(opts),
|
|
177
207
|
url,
|
|
178
208
|
});
|
|
179
209
|
};
|
|
210
|
+
const _buildUrl = (options) => (0, utils_gen_2.buildUrl)({ ..._config, ...options });
|
|
180
211
|
return {
|
|
181
|
-
buildUrl:
|
|
212
|
+
buildUrl: _buildUrl,
|
|
182
213
|
connect: makeMethodFn('CONNECT'),
|
|
183
214
|
delete: makeMethodFn('DELETE'),
|
|
184
215
|
get: makeMethodFn('GET'),
|
|
@@ -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';
|
|
@@ -47,7 +47,7 @@ export interface Config<T extends ClientOptions = ClientOptions> extends Omit<Re
|
|
|
47
47
|
export interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
|
|
48
48
|
responseStyle: TResponseStyle;
|
|
49
49
|
throwOnError: ThrowOnError;
|
|
50
|
-
}>, Pick<ServerSentEventsOptions<TData>, 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
|
|
50
|
+
}>, Pick<ServerSentEventsOptions<TData>, 'onRequest' | 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
|
|
51
51
|
/**
|
|
52
52
|
* Any body that you want to add to your request.
|
|
53
53
|
*
|
|
@@ -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 {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { QuerySerializerOptions } from '../core/bodySerializer.gen';
|
|
2
2
|
import type { Client, ClientOptions, Config, RequestOptions } from './types.gen';
|
|
3
|
-
export declare const createQuerySerializer: <T = unknown>({
|
|
3
|
+
export declare const createQuerySerializer: <T = unknown>({ parameters, ...args }?: QuerySerializerOptions) => (queryParams: T) => string;
|
|
4
4
|
/**
|
|
5
5
|
* Infers parseAs value from provided Content-Type header.
|
|
6
6
|
*/
|
|
@@ -6,7 +6,7 @@ const auth_gen_1 = require("../core/auth.gen");
|
|
|
6
6
|
const bodySerializer_gen_1 = require("../core/bodySerializer.gen");
|
|
7
7
|
const pathSerializer_gen_1 = require("../core/pathSerializer.gen");
|
|
8
8
|
const utils_gen_1 = require("../core/utils.gen");
|
|
9
|
-
const createQuerySerializer = ({
|
|
9
|
+
const createQuerySerializer = ({ parameters = {}, ...args } = {}) => {
|
|
10
10
|
const querySerializer = (queryParams) => {
|
|
11
11
|
const search = [];
|
|
12
12
|
if (queryParams && typeof queryParams === 'object') {
|
|
@@ -15,33 +15,34 @@ const createQuerySerializer = ({ allowReserved, array, object, } = {}) => {
|
|
|
15
15
|
if (value === undefined || value === null) {
|
|
16
16
|
continue;
|
|
17
17
|
}
|
|
18
|
+
const options = parameters[name] || args;
|
|
18
19
|
if (Array.isArray(value)) {
|
|
19
20
|
const serializedArray = (0, pathSerializer_gen_1.serializeArrayParam)({
|
|
20
|
-
allowReserved,
|
|
21
|
+
allowReserved: options.allowReserved,
|
|
21
22
|
explode: true,
|
|
22
23
|
name,
|
|
23
24
|
style: 'form',
|
|
24
25
|
value,
|
|
25
|
-
...array,
|
|
26
|
+
...options.array,
|
|
26
27
|
});
|
|
27
28
|
if (serializedArray)
|
|
28
29
|
search.push(serializedArray);
|
|
29
30
|
}
|
|
30
31
|
else if (typeof value === 'object') {
|
|
31
32
|
const serializedObject = (0, pathSerializer_gen_1.serializeObjectParam)({
|
|
32
|
-
allowReserved,
|
|
33
|
+
allowReserved: options.allowReserved,
|
|
33
34
|
explode: true,
|
|
34
35
|
name,
|
|
35
36
|
style: 'deepObject',
|
|
36
37
|
value: value,
|
|
37
|
-
...object,
|
|
38
|
+
...options.object,
|
|
38
39
|
});
|
|
39
40
|
if (serializedObject)
|
|
40
41
|
search.push(serializedObject);
|
|
41
42
|
}
|
|
42
43
|
else {
|
|
43
44
|
const serializedPrimitive = (0, pathSerializer_gen_1.serializePrimitiveParam)({
|
|
44
|
-
allowReserved,
|
|
45
|
+
allowReserved: options.allowReserved,
|
|
45
46
|
name,
|
|
46
47
|
value: value,
|
|
47
48
|
});
|
|
@@ -68,8 +69,7 @@ const getParseAs = (contentType) => {
|
|
|
68
69
|
if (!cleanContent) {
|
|
69
70
|
return;
|
|
70
71
|
}
|
|
71
|
-
if (cleanContent.startsWith('application/json') ||
|
|
72
|
-
cleanContent.endsWith('+json')) {
|
|
72
|
+
if (cleanContent.startsWith('application/json') || cleanContent.endsWith('+json')) {
|
|
73
73
|
return 'json';
|
|
74
74
|
}
|
|
75
75
|
if (cleanContent === 'multipart/form-data') {
|
|
@@ -155,9 +155,7 @@ const mergeHeaders = (...headers) => {
|
|
|
155
155
|
if (!header) {
|
|
156
156
|
continue;
|
|
157
157
|
}
|
|
158
|
-
const iterator = header instanceof Headers
|
|
159
|
-
? headersEntries(header)
|
|
160
|
-
: Object.entries(header);
|
|
158
|
+
const iterator = header instanceof Headers ? headersEntries(header) : Object.entries(header);
|
|
161
159
|
for (const [key, value] of iterator) {
|
|
162
160
|
if (value === null) {
|
|
163
161
|
mergedHeaders.delete(key);
|
|
@@ -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: 'https://api.cms.optimizely.com/preview3' })));
|
|
@@ -1,17 +1,25 @@
|
|
|
1
1
|
import type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen';
|
|
2
2
|
export type QuerySerializer = (query: Record<string, unknown>) => string;
|
|
3
|
-
export type BodySerializer = (body:
|
|
4
|
-
|
|
3
|
+
export type BodySerializer = (body: unknown) => unknown;
|
|
4
|
+
type QuerySerializerOptionsObject = {
|
|
5
5
|
allowReserved?: boolean;
|
|
6
|
-
array?: SerializerOptions<ArrayStyle
|
|
7
|
-
object?: SerializerOptions<ObjectStyle
|
|
8
|
-
}
|
|
6
|
+
array?: Partial<SerializerOptions<ArrayStyle>>;
|
|
7
|
+
object?: Partial<SerializerOptions<ObjectStyle>>;
|
|
8
|
+
};
|
|
9
|
+
export type QuerySerializerOptions = QuerySerializerOptionsObject & {
|
|
10
|
+
/**
|
|
11
|
+
* Per-parameter serialization overrides. When provided, these settings
|
|
12
|
+
* override the global array/object settings for specific parameter names.
|
|
13
|
+
*/
|
|
14
|
+
parameters?: Record<string, QuerySerializerOptionsObject>;
|
|
15
|
+
};
|
|
9
16
|
export declare const formDataBodySerializer: {
|
|
10
|
-
bodySerializer:
|
|
17
|
+
bodySerializer: (body: unknown) => FormData;
|
|
11
18
|
};
|
|
12
19
|
export declare const jsonBodySerializer: {
|
|
13
|
-
bodySerializer:
|
|
20
|
+
bodySerializer: (body: unknown) => string;
|
|
14
21
|
};
|
|
15
22
|
export declare const urlSearchParamsBodySerializer: {
|
|
16
|
-
bodySerializer:
|
|
23
|
+
bodySerializer: (body: unknown) => string;
|
|
17
24
|
};
|
|
25
|
+
export {};
|
|
@@ -39,7 +39,7 @@ exports.formDataBodySerializer = {
|
|
|
39
39
|
},
|
|
40
40
|
};
|
|
41
41
|
exports.jsonBodySerializer = {
|
|
42
|
-
bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === 'bigint' ? value.toString() : value),
|
|
42
|
+
bodySerializer: (body) => JSON.stringify(body, (_key, value) => (typeof value === 'bigint' ? value.toString() : value)),
|
|
43
43
|
};
|
|
44
44
|
exports.urlSearchParamsBodySerializer = {
|
|
45
45
|
bodySerializer: (body) => {
|
|
@@ -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>>;
|
|
@@ -22,6 +22,11 @@ const buildKeyMap = (fields, map) => {
|
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
+
else if ('key' in config) {
|
|
26
|
+
map.set(config.key, {
|
|
27
|
+
map: config.map,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
25
30
|
else if (config.args) {
|
|
26
31
|
buildKeyMap(config.args, map);
|
|
27
32
|
}
|
|
@@ -30,7 +35,7 @@ const buildKeyMap = (fields, map) => {
|
|
|
30
35
|
};
|
|
31
36
|
const stripEmptySlots = (params) => {
|
|
32
37
|
for (const [slot, value] of Object.entries(params)) {
|
|
33
|
-
if (value && typeof value === 'object' && !Object.keys(value).length) {
|
|
38
|
+
if (value && typeof value === 'object' && !Array.isArray(value) && !Object.keys(value).length) {
|
|
34
39
|
delete params[slot];
|
|
35
40
|
}
|
|
36
41
|
}
|
|
@@ -55,7 +60,9 @@ const buildClientParams = (args, fields) => {
|
|
|
55
60
|
if (config.key) {
|
|
56
61
|
const field = map.get(config.key);
|
|
57
62
|
const name = field.map || config.key;
|
|
58
|
-
|
|
63
|
+
if (field.in) {
|
|
64
|
+
params[field.in][name] = arg;
|
|
65
|
+
}
|
|
59
66
|
}
|
|
60
67
|
else {
|
|
61
68
|
params.body = arg;
|
|
@@ -65,8 +72,13 @@ const buildClientParams = (args, fields) => {
|
|
|
65
72
|
for (const [key, value] of Object.entries(arg ?? {})) {
|
|
66
73
|
const field = map.get(key);
|
|
67
74
|
if (field) {
|
|
68
|
-
|
|
69
|
-
|
|
75
|
+
if (field.in) {
|
|
76
|
+
const name = field.map || key;
|
|
77
|
+
params[field.in][name] = value;
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
params[field.map] = value;
|
|
81
|
+
}
|
|
70
82
|
}
|
|
71
83
|
else {
|
|
72
84
|
const extra = extraPrefixes.find(([prefix]) => key.startsWith(prefix));
|
|
@@ -74,8 +86,8 @@ const buildClientParams = (args, fields) => {
|
|
|
74
86
|
const [prefix, slot] = extra;
|
|
75
87
|
params[slot][key.slice(prefix.length)] = value;
|
|
76
88
|
}
|
|
77
|
-
else {
|
|
78
|
-
for (const [slot, allowed] of Object.entries(config.allowExtra
|
|
89
|
+
else if ('allowExtra' in config && config.allowExtra) {
|
|
90
|
+
for (const [slot, allowed] of Object.entries(config.allowExtra)) {
|
|
79
91
|
if (allowed) {
|
|
80
92
|
params[slot][key] = value;
|
|
81
93
|
break;
|
|
@@ -68,9 +68,7 @@ const serializeArrayParam = ({ allowReserved, explode, name, style, value, }) =>
|
|
|
68
68
|
});
|
|
69
69
|
})
|
|
70
70
|
.join(separator);
|
|
71
|
-
return style === 'label' || style === 'matrix'
|
|
72
|
-
? separator + joinedValues
|
|
73
|
-
: joinedValues;
|
|
71
|
+
return style === 'label' || style === 'matrix' ? separator + joinedValues : joinedValues;
|
|
74
72
|
};
|
|
75
73
|
exports.serializeArrayParam = serializeArrayParam;
|
|
76
74
|
const serializePrimitiveParam = ({ allowReserved, name, value, }) => {
|
|
@@ -90,11 +88,7 @@ const serializeObjectParam = ({ allowReserved, explode, name, style, value, valu
|
|
|
90
88
|
if (style !== 'deepObject' && !explode) {
|
|
91
89
|
let values = [];
|
|
92
90
|
Object.entries(value).forEach(([key, v]) => {
|
|
93
|
-
values = [
|
|
94
|
-
...values,
|
|
95
|
-
key,
|
|
96
|
-
allowReserved ? v : encodeURIComponent(v),
|
|
97
|
-
];
|
|
91
|
+
values = [...values, key, allowReserved ? v : encodeURIComponent(v)];
|
|
98
92
|
});
|
|
99
93
|
const joinedValues = values.join(',');
|
|
100
94
|
switch (style) {
|
|
@@ -116,8 +110,6 @@ const serializeObjectParam = ({ allowReserved, explode, name, style, value, valu
|
|
|
116
110
|
value: v,
|
|
117
111
|
}))
|
|
118
112
|
.join(separator);
|
|
119
|
-
return style === 'label' || style === 'matrix'
|
|
120
|
-
? separator + joinedValues
|
|
121
|
-
: joinedValues;
|
|
113
|
+
return style === 'label' || style === 'matrix' ? separator + joinedValues : joinedValues;
|
|
122
114
|
};
|
|
123
115
|
exports.serializeObjectParam = serializeObjectParam;
|
|
@@ -6,9 +6,7 @@ exports.serializeQueryKeyValue = exports.stringifyToJsonValue = exports.queryKey
|
|
|
6
6
|
* Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.
|
|
7
7
|
*/
|
|
8
8
|
const queryKeyJsonReplacer = (_key, value) => {
|
|
9
|
-
if (value === undefined ||
|
|
10
|
-
typeof value === 'function' ||
|
|
11
|
-
typeof value === 'symbol') {
|
|
9
|
+
if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {
|
|
12
10
|
return undefined;
|
|
13
11
|
}
|
|
14
12
|
if (typeof value === 'bigint') {
|
|
@@ -74,14 +72,10 @@ const serializeQueryKeyValue = (value) => {
|
|
|
74
72
|
if (value === null) {
|
|
75
73
|
return null;
|
|
76
74
|
}
|
|
77
|
-
if (typeof value === 'string' ||
|
|
78
|
-
typeof value === 'number' ||
|
|
79
|
-
typeof value === 'boolean') {
|
|
75
|
+
if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
|
|
80
76
|
return value;
|
|
81
77
|
}
|
|
82
|
-
if (value === undefined ||
|
|
83
|
-
typeof value === 'function' ||
|
|
84
|
-
typeof value === 'symbol') {
|
|
78
|
+
if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {
|
|
85
79
|
return undefined;
|
|
86
80
|
}
|
|
87
81
|
if (typeof value === 'bigint') {
|
|
@@ -93,8 +87,7 @@ const serializeQueryKeyValue = (value) => {
|
|
|
93
87
|
if (Array.isArray(value)) {
|
|
94
88
|
return (0, exports.stringifyToJsonValue)(value);
|
|
95
89
|
}
|
|
96
|
-
if (typeof URLSearchParams !== 'undefined' &&
|
|
97
|
-
value instanceof URLSearchParams) {
|
|
90
|
+
if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {
|
|
98
91
|
return serializeSearchParams(value);
|
|
99
92
|
}
|
|
100
93
|
if (isPlainObject(value)) {
|
|
@@ -4,8 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.createSseClient = void 0;
|
|
5
5
|
const createSseClient = ({ onRequest, onSseError, onSseEvent, responseTransformer, responseValidator, sseDefaultRetryDelay, sseMaxRetryAttempts, sseMaxRetryDelay, sseSleepFn, url, ...options }) => {
|
|
6
6
|
let lastEventId;
|
|
7
|
-
const sleep = sseSleepFn ??
|
|
8
|
-
((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
7
|
+
const sleep = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
9
8
|
const createStream = async function* () {
|
|
10
9
|
let retryDelay = sseDefaultRetryDelay ?? 3000;
|
|
11
10
|
let attempt = 0;
|
|
@@ -40,9 +39,7 @@ const createSseClient = ({ onRequest, onSseError, onSseEvent, responseTransforme
|
|
|
40
39
|
throw new Error(`SSE failed: ${response.status} ${response.statusText}`);
|
|
41
40
|
if (!response.body)
|
|
42
41
|
throw new Error('No body in SSE response');
|
|
43
|
-
const reader = response.body
|
|
44
|
-
.pipeThrough(new TextDecoderStream())
|
|
45
|
-
.getReader();
|
|
42
|
+
const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();
|
|
46
43
|
let buffer = '';
|
|
47
44
|
const abortHandler = () => {
|
|
48
45
|
try {
|
|
@@ -59,6 +56,8 @@ const createSseClient = ({ onRequest, onSseError, onSseEvent, responseTransforme
|
|
|
59
56
|
if (done)
|
|
60
57
|
break;
|
|
61
58
|
buffer += value;
|
|
59
|
+
// Normalize line endings: CRLF -> LF, then CR -> LF
|
|
60
|
+
buffer = buffer.replace(/\r\n/g, '\n').replace(/\r/g, '\n');
|
|
62
61
|
const chunks = buffer.split('\n\n');
|
|
63
62
|
buffer = chunks.pop() ?? '';
|
|
64
63
|
for (const chunk of chunks) {
|
|
@@ -123,8 +122,7 @@ const createSseClient = ({ onRequest, onSseError, onSseEvent, responseTransforme
|
|
|
123
122
|
catch (error) {
|
|
124
123
|
// connection failed or aborted; retry after delay
|
|
125
124
|
onSseError?.(error);
|
|
126
|
-
if (sseMaxRetryAttempts !== undefined &&
|
|
127
|
-
attempt >= sseMaxRetryAttempts) {
|
|
125
|
+
if (sseMaxRetryAttempts !== undefined && attempt >= sseMaxRetryAttempts) {
|
|
128
126
|
break; // stop after firing error
|
|
129
127
|
}
|
|
130
128
|
// exponential backoff: double retry each attempt, cap at 30s
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
1
|
+
export { client, type CreateClientConfig } from './client.gen';
|
|
2
|
+
export { blueprintsCreate, blueprintsDelete, blueprintsGet, blueprintsList, blueprintsPatch, changesetsCreate, changesetsCreateItem, changesetsDelete, changesetsDeleteItem, changesetsGet, changesetsGetItem, changesetsList, changesetsListItems, changesetsPatch, changesetsPatchItem, contentCopy, contentCreate, contentCreateVersion, contentDelete, contentDeleteLocale, contentDeleteVersion, contentGetMetadata, contentGetPath, contentGetPreviews, contentGetVersion, contentListAllVersions, contentListAssets, contentListItems, contentListVersions, contentPatchMetadata, contentPatchVersion, contentTypesCreate, contentTypesDelete, contentTypesGet, contentTypesList, contentTypesPatch, contentUndelete, displayTemplatesCreate, displayTemplatesDelete, displayTemplatesGet, displayTemplatesList, displayTemplatesPatch, type Options, propertyFormatsGet, propertyFormatsList, propertyGroupsCreate, propertyGroupsDelete, propertyGroupsGet, propertyGroupsList, propertyGroupsPatch } from './sdk.gen';
|
|
3
|
+
export { blueprintsCreateResponseTransformer, blueprintsDeleteResponseTransformer, blueprintsGetResponseTransformer, blueprintsListResponseTransformer, blueprintsPatchResponseTransformer, changesetsCreateResponseTransformer, changesetsDeleteResponseTransformer, changesetsGetResponseTransformer, changesetsListResponseTransformer, changesetsPatchResponseTransformer, contentCopyResponseTransformer, contentCreateResponseTransformer, contentCreateVersionResponseTransformer, contentDeleteLocaleResponseTransformer, contentDeleteResponseTransformer, contentDeleteVersionResponseTransformer, contentGetMetadataResponseTransformer, contentGetPathResponseTransformer, contentGetVersionResponseTransformer, contentListAllVersionsResponseTransformer, contentListAssetsResponseTransformer, contentListItemsResponseTransformer, contentListVersionsResponseTransformer, contentPatchMetadataResponseTransformer, contentPatchVersionResponseTransformer, contentTypesCreateResponseTransformer, contentTypesDeleteResponseTransformer, contentTypesGetResponseTransformer, contentTypesListResponseTransformer, contentTypesPatchResponseTransformer, contentUndeleteResponseTransformer, displayTemplatesCreateResponseTransformer, displayTemplatesDeleteResponseTransformer, displayTemplatesGetResponseTransformer, displayTemplatesListResponseTransformer, displayTemplatesPatchResponseTransformer, propertyFormatsGetResponseTransformer, propertyFormatsListResponseTransformer, propertyGroupsCreateResponseTransformer, propertyGroupsDeleteResponseTransformer, propertyGroupsGetResponseTransformer, propertyGroupsListResponseTransformer, propertyGroupsPatchResponseTransformer } from './transformers.gen';
|
|
4
|
+
export type { ArrayItem, Blueprint, BlueprintData, BlueprintDataWritable, BlueprintPage, BlueprintPageWritable, BlueprintsCreateData, BlueprintsCreateError, BlueprintsCreateErrors, BlueprintsCreateResponse, BlueprintsCreateResponses, BlueprintsDeleteData, BlueprintsDeleteError, BlueprintsDeleteErrors, BlueprintsDeleteResponse, BlueprintsDeleteResponses, BlueprintsGetData, BlueprintsGetError, BlueprintsGetErrors, BlueprintsGetResponse, BlueprintsGetResponses, BlueprintsListData, BlueprintsListError, BlueprintsListErrors, BlueprintsListResponse, BlueprintsListResponses, BlueprintsPatchData, BlueprintsPatchError, BlueprintsPatchErrors, BlueprintsPatchResponse, BlueprintsPatchResponses, BlueprintWritable, Changeset, ChangesetItem, ChangesetItemPage, ChangesetItemPageWritable, ChangesetItemWritable, ChangesetPage, ChangesetPageWritable, ChangesetsCreateData, ChangesetsCreateError, ChangesetsCreateErrors, ChangesetsCreateItemData, ChangesetsCreateItemError, ChangesetsCreateItemErrors, ChangesetsCreateItemResponse, ChangesetsCreateItemResponses, ChangesetsCreateResponse, ChangesetsCreateResponses, ChangesetsDeleteData, ChangesetsDeleteError, ChangesetsDeleteErrors, ChangesetsDeleteItemData, ChangesetsDeleteItemError, ChangesetsDeleteItemErrors, ChangesetsDeleteItemResponse, ChangesetsDeleteItemResponses, ChangesetsDeleteResponse, ChangesetsDeleteResponses, ChangesetsGetData, ChangesetsGetError, ChangesetsGetErrors, ChangesetsGetItemData, ChangesetsGetItemError, ChangesetsGetItemErrors, ChangesetsGetItemResponse, ChangesetsGetItemResponses, ChangesetsGetResponse, ChangesetsGetResponses, ChangesetsListData, ChangesetsListError, ChangesetsListErrors, ChangesetsListItemsData, ChangesetsListItemsError, ChangesetsListItemsErrors, ChangesetsListItemsResponse, ChangesetsListItemsResponses, ChangesetsListResponse, ChangesetsListResponses, ChangesetsPatchData, ChangesetsPatchError, ChangesetsPatchErrors, ChangesetsPatchItemData, ChangesetsPatchItemError, ChangesetsPatchItemErrors, ChangesetsPatchItemResponse, ChangesetsPatchItemResponses, ChangesetsPatchResponse, ChangesetsPatchResponses, ChangesetWritable, ClientOptions, CompositionDisplaySettings, CompositionDisplaySettingsWritable, CompositionNode, CompositionNodeWritable, ContentComponent, ContentCopyData, ContentCopyError, ContentCopyErrors, ContentCopyResponse, ContentCopyResponses, ContentCreateData, ContentCreateError, ContentCreateErrors, ContentCreateResponse, ContentCreateResponses, ContentCreateVersionData, ContentCreateVersionError, ContentCreateVersionErrors, ContentCreateVersionResponse, ContentCreateVersionResponses, ContentDeleteData, ContentDeleteError, ContentDeleteErrors, ContentDeleteLocaleData, ContentDeleteLocaleError, ContentDeleteLocaleErrors, ContentDeleteLocaleResponse, ContentDeleteLocaleResponses, ContentDeleteResponse, ContentDeleteResponses, ContentDeleteVersionData, ContentDeleteVersionError, ContentDeleteVersionErrors, ContentDeleteVersionResponse, ContentDeleteVersionResponses, ContentGetMetadataData, ContentGetMetadataError, ContentGetMetadataErrors, ContentGetMetadataResponse, ContentGetMetadataResponses, ContentGetPathData, ContentGetPathError, ContentGetPathErrors, ContentGetPathResponse, ContentGetPathResponses, ContentGetPreviewsData, ContentGetPreviewsError, ContentGetPreviewsErrors, ContentGetPreviewsResponse, ContentGetPreviewsResponses, ContentGetVersionData, ContentGetVersionError, ContentGetVersionErrors, ContentGetVersionResponse, ContentGetVersionResponses, ContentItem, ContentItemPage, ContentItemPageWritable, ContentItemWritable, ContentListAllVersionsData, ContentListAllVersionsError, ContentListAllVersionsErrors, ContentListAllVersionsResponse, ContentListAllVersionsResponses, ContentListAssetsData, ContentListAssetsError, ContentListAssetsErrors, ContentListAssetsResponse, ContentListAssetsResponses, ContentListItemsData, ContentListItemsError, ContentListItemsErrors, ContentListItemsResponse, ContentListItemsResponses, ContentListVersionsData, ContentListVersionsError, ContentListVersionsErrors, ContentListVersionsResponse, ContentListVersionsResponses, ContentLocaleInfo, ContentMetadata, ContentMetadataPage, ContentMetadataPageWritable, ContentMetadataWritable, ContentPatchMetadataData, ContentPatchMetadataError, ContentPatchMetadataErrors, ContentPatchMetadataResponse, ContentPatchMetadataResponses, ContentPatchVersionData, ContentPatchVersionError, ContentPatchVersionErrors, ContentPatchVersionResponse, ContentPatchVersionResponses, ContentReference, ContentType, ContentTypePage, ContentTypePageWritable, ContentTypeProperty, ContentTypesCreateData, ContentTypesCreateError, ContentTypesCreateErrors, ContentTypesCreateResponse, ContentTypesCreateResponses, ContentTypesDeleteData, ContentTypesDeleteError, ContentTypesDeleteErrors, ContentTypesDeleteResponse, ContentTypesDeleteResponses, ContentTypesGetData, ContentTypesGetError, ContentTypesGetErrors, ContentTypesGetResponse, ContentTypesGetResponses, ContentTypesListData, ContentTypesListError, ContentTypesListErrors, ContentTypesListResponse, ContentTypesListResponses, ContentTypesPatchData, ContentTypesPatchError, ContentTypesPatchErrors, ContentTypesPatchResponse, ContentTypesPatchResponses, ContentTypeWritable, ContentUndeleteData, ContentUndeleteError, ContentUndeleteErrors, ContentUndeleteResponse, ContentUndeleteResponses, CopyContentOptions, DisplaySetting, DisplaySettingChoice, DisplayTemplate, DisplayTemplatePage, DisplayTemplatePageWritable, DisplayTemplatesCreateData, DisplayTemplatesCreateError, DisplayTemplatesCreateErrors, DisplayTemplatesCreateResponse, DisplayTemplatesCreateResponses, DisplayTemplatesDeleteData, DisplayTemplatesDeleteError, DisplayTemplatesDeleteErrors, DisplayTemplatesDeleteResponse, DisplayTemplatesDeleteResponses, DisplayTemplatesGetData, DisplayTemplatesGetError, DisplayTemplatesGetErrors, DisplayTemplatesGetResponse, DisplayTemplatesGetResponses, DisplayTemplatesListData, DisplayTemplatesListError, DisplayTemplatesListErrors, DisplayTemplatesListResponse, DisplayTemplatesListResponses, DisplayTemplatesPatchData, DisplayTemplatesPatchError, DisplayTemplatesPatchErrors, DisplayTemplatesPatchResponse, DisplayTemplatesPatchResponses, DisplayTemplateWritable, EnumerationValue, ImageDescriptor, Link, Preview, ProblemDetails, PropertyFormat, PropertyFormatPage, PropertyFormatPageWritable, PropertyFormatsGetData, PropertyFormatsGetError, PropertyFormatsGetErrors, PropertyFormatsGetResponse, PropertyFormatsGetResponses, PropertyFormatsListData, PropertyFormatsListError, PropertyFormatsListErrors, PropertyFormatsListResponse, PropertyFormatsListResponses, PropertyFormatWritable, PropertyGroup, PropertyGroupPage, PropertyGroupPageWritable, PropertyGroupsCreateData, PropertyGroupsCreateError, PropertyGroupsCreateErrors, PropertyGroupsCreateResponse, PropertyGroupsCreateResponses, PropertyGroupsDeleteData, PropertyGroupsDeleteError, PropertyGroupsDeleteErrors, PropertyGroupsDeleteResponse, PropertyGroupsDeleteResponses, PropertyGroupsGetData, PropertyGroupsGetError, PropertyGroupsGetErrors, PropertyGroupsGetResponse, PropertyGroupsGetResponses, PropertyGroupsListData, PropertyGroupsListError, PropertyGroupsListErrors, PropertyGroupsListResponse, PropertyGroupsListResponses, PropertyGroupsPatchData, PropertyGroupsPatchError, PropertyGroupsPatchErrors, PropertyGroupsPatchResponse, PropertyGroupsPatchResponses, PropertyGroupWritable } from './types.gen';
|