@uniformdev/canvas 17.1.1-alpha.231 → 17.1.1-alpha.430
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/dist/{chunk-2XL2NAQJ.mjs → chunk-IQWDQAHE.mjs} +2 -2
- package/dist/chunk-OT3KUGLJ.mjs +4 -0
- package/dist/cli/cli.d.ts +1 -1
- package/dist/cli/cli.js +52 -52
- package/dist/cli/cli.mjs +52 -52
- package/dist/createEventBus-1e372818.d.ts +2942 -0
- package/dist/createEventBus-6f48d55f.d.ts +2949 -0
- package/dist/{createEventBus-e386fc9c.d.ts → createEventBus-ce0758ee.d.ts} +6 -3
- package/dist/index.d.ts +21 -1396
- package/dist/index.esm.js +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +1 -1
- package/package.json +5 -5
@@ -0,0 +1,2942 @@
|
|
1
|
+
import Pusher from 'pusher-js';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* This file was auto-generated by openapi-typescript.
|
5
|
+
* Do not make direct changes to the file.
|
6
|
+
*/
|
7
|
+
interface paths$4 {
|
8
|
+
"/api/v1/canvas-definitions": {
|
9
|
+
get: {
|
10
|
+
parameters: {
|
11
|
+
query: {
|
12
|
+
/** The project ID to get component definitions for. */
|
13
|
+
projectId: string;
|
14
|
+
/** Limit list to one result by ID (response remains an array). */
|
15
|
+
componentId?: string;
|
16
|
+
/** Number of records to skip */
|
17
|
+
offset?: number;
|
18
|
+
/** Max number of records to return */
|
19
|
+
limit?: number;
|
20
|
+
/** Whether to fetch system meta-component definitions (personalize, test, etc) */
|
21
|
+
includeSystem?: boolean;
|
22
|
+
};
|
23
|
+
};
|
24
|
+
responses: {
|
25
|
+
/** OK */
|
26
|
+
200: {
|
27
|
+
content: {
|
28
|
+
"application/json": {
|
29
|
+
/** @description Component definitions that match the query */
|
30
|
+
componentDefinitions: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinition"][];
|
31
|
+
};
|
32
|
+
};
|
33
|
+
};
|
34
|
+
400: external$4["swagger.yml"]["components"]["responses"]["BadRequestError"];
|
35
|
+
401: external$4["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
|
36
|
+
403: external$4["swagger.yml"]["components"]["responses"]["ForbiddenError"];
|
37
|
+
429: external$4["swagger.yml"]["components"]["responses"]["RateLimitError"];
|
38
|
+
500: external$4["swagger.yml"]["components"]["responses"]["InternalServerError"];
|
39
|
+
};
|
40
|
+
};
|
41
|
+
/** Upserts a component definition */
|
42
|
+
put: {
|
43
|
+
responses: {
|
44
|
+
/** OK */
|
45
|
+
204: never;
|
46
|
+
400: external$4["swagger.yml"]["components"]["responses"]["BadRequestError"];
|
47
|
+
401: external$4["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
|
48
|
+
403: external$4["swagger.yml"]["components"]["responses"]["ForbiddenError"];
|
49
|
+
429: external$4["swagger.yml"]["components"]["responses"]["RateLimitError"];
|
50
|
+
500: external$4["swagger.yml"]["components"]["responses"]["InternalServerError"];
|
51
|
+
};
|
52
|
+
requestBody: {
|
53
|
+
content: {
|
54
|
+
"application/json": {
|
55
|
+
/**
|
56
|
+
* Format: uuid
|
57
|
+
* @description The project ID to upsert the component definition to
|
58
|
+
*/
|
59
|
+
projectId: string;
|
60
|
+
componentDefinition: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinition"];
|
61
|
+
};
|
62
|
+
};
|
63
|
+
};
|
64
|
+
};
|
65
|
+
/** Deletes a component definition */
|
66
|
+
delete: {
|
67
|
+
responses: {
|
68
|
+
/** OK */
|
69
|
+
204: never;
|
70
|
+
400: external$4["swagger.yml"]["components"]["responses"]["BadRequestError"];
|
71
|
+
401: external$4["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
|
72
|
+
403: external$4["swagger.yml"]["components"]["responses"]["ForbiddenError"];
|
73
|
+
429: external$4["swagger.yml"]["components"]["responses"]["RateLimitError"];
|
74
|
+
500: external$4["swagger.yml"]["components"]["responses"]["InternalServerError"];
|
75
|
+
};
|
76
|
+
requestBody: {
|
77
|
+
content: {
|
78
|
+
"application/json": {
|
79
|
+
/** @description The public ID of the component definition to delete */
|
80
|
+
componentId: string;
|
81
|
+
/**
|
82
|
+
* Format: uuid
|
83
|
+
* @description The ID of the project the composition to delete belongs to
|
84
|
+
*/
|
85
|
+
projectId: string;
|
86
|
+
};
|
87
|
+
};
|
88
|
+
};
|
89
|
+
};
|
90
|
+
/** Handles preflight requests. This endpoint allows CORS. */
|
91
|
+
options: {
|
92
|
+
responses: {
|
93
|
+
/** OK */
|
94
|
+
204: never;
|
95
|
+
};
|
96
|
+
};
|
97
|
+
};
|
98
|
+
}
|
99
|
+
interface external$4 {
|
100
|
+
"swagger.yml": {
|
101
|
+
paths: {};
|
102
|
+
components: {
|
103
|
+
schemas: {
|
104
|
+
Error: {
|
105
|
+
/** @description Error message(s) that occurred while processing the request */
|
106
|
+
errorMessage?: string[] | string;
|
107
|
+
};
|
108
|
+
};
|
109
|
+
responses: {
|
110
|
+
/** Request input validation failed */
|
111
|
+
BadRequestError: {
|
112
|
+
content: {
|
113
|
+
"application/json": external$4["swagger.yml"]["components"]["schemas"]["Error"];
|
114
|
+
};
|
115
|
+
};
|
116
|
+
/** API key or token was not valid */
|
117
|
+
UnauthorizedError: {
|
118
|
+
content: {
|
119
|
+
"application/json": external$4["swagger.yml"]["components"]["schemas"]["Error"];
|
120
|
+
};
|
121
|
+
};
|
122
|
+
/** Permission was denied */
|
123
|
+
ForbiddenError: {
|
124
|
+
content: {
|
125
|
+
"application/json": external$4["swagger.yml"]["components"]["schemas"]["Error"];
|
126
|
+
};
|
127
|
+
};
|
128
|
+
/** Resource not found */
|
129
|
+
NotFoundError: {
|
130
|
+
content: {
|
131
|
+
"application/json": external$4["swagger.yml"]["components"]["schemas"]["Error"];
|
132
|
+
};
|
133
|
+
};
|
134
|
+
/** Too many requests in allowed time period */
|
135
|
+
RateLimitError: unknown;
|
136
|
+
/** Execution error occurred */
|
137
|
+
InternalServerError: unknown;
|
138
|
+
};
|
139
|
+
};
|
140
|
+
operations: {};
|
141
|
+
};
|
142
|
+
"uniform-canvas-types.swagger.yml": {
|
143
|
+
paths: {};
|
144
|
+
components: {
|
145
|
+
schemas: {
|
146
|
+
/** @description Public ID (used in code). Do not change after creation. */
|
147
|
+
PublicIdProperty: string;
|
148
|
+
/** @description The definition of a component parameter */
|
149
|
+
ComponentDefinitionParameter: {
|
150
|
+
id: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
|
151
|
+
/** @description Friendly name of the parameter */
|
152
|
+
name: string;
|
153
|
+
/** @description Appears next to the parameter in the Composition editor */
|
154
|
+
helpText?: string;
|
155
|
+
/** @description Type name of the parameter (provided by a Uniform integration) */
|
156
|
+
type: string;
|
157
|
+
/** @description The configuration object for the type (type-specific) */
|
158
|
+
typeConfig?: unknown;
|
159
|
+
};
|
160
|
+
/** @description The definition of a named component slot that can contain other components */
|
161
|
+
ComponentDefinitionSlot: {
|
162
|
+
id: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
|
163
|
+
/** @description Friendly name of the slot */
|
164
|
+
name: string;
|
165
|
+
/** @description A list of component definition public IDs that are allowed in this named slot */
|
166
|
+
allowedComponents: string[];
|
167
|
+
/**
|
168
|
+
* @description Whether this slot inherits its allowed components from the parent slot it lives in. If true, allowedComponents is irrelevant.
|
169
|
+
* @default false
|
170
|
+
*/
|
171
|
+
inheritAllowedComponents: boolean;
|
172
|
+
/** @description Minimum valid number of components in this slot */
|
173
|
+
minComponents?: number;
|
174
|
+
/** @description Maximum valid number of components in this slot */
|
175
|
+
maxComponents?: number;
|
176
|
+
};
|
177
|
+
/** @description The definition of a composition's slug settings */
|
178
|
+
ComponentDefinitionSlugSettings: {
|
179
|
+
/**
|
180
|
+
* @description Whether the slug is required
|
181
|
+
* no: slug is optional
|
182
|
+
* yes: slug is required
|
183
|
+
* disabled: slug is disabled and will not be shown in the editor
|
184
|
+
*
|
185
|
+
* @default no
|
186
|
+
* @enum {string}
|
187
|
+
*/
|
188
|
+
required?: "no" | "yes" | "disabled";
|
189
|
+
/**
|
190
|
+
* @description Slug uniqueness configuration.
|
191
|
+
* no = no unique constraint
|
192
|
+
* local = must be unique within this component type
|
193
|
+
* global = must be unique across all component types
|
194
|
+
*
|
195
|
+
* @enum {string}
|
196
|
+
*/
|
197
|
+
unique?: "no" | "local" | "global";
|
198
|
+
/** @description Regular expression slugs must match */
|
199
|
+
regularExpression?: string;
|
200
|
+
/**
|
201
|
+
* @description Custom error message when regular expression validation fails.
|
202
|
+
* Has no effect if `regularExpression` is not set.
|
203
|
+
*/
|
204
|
+
regularExpressionMessage?: string;
|
205
|
+
};
|
206
|
+
/** @description The definition of a component variant */
|
207
|
+
ComponentDefinitionVariant: {
|
208
|
+
id: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
|
209
|
+
/** @description Friendly name of the variant */
|
210
|
+
name: string;
|
211
|
+
};
|
212
|
+
/** @description Permission set for a component defintion */
|
213
|
+
ComponentDefinitionPermission: {
|
214
|
+
roleId: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
|
215
|
+
/**
|
216
|
+
* @description Permission type for this permission ComponentDefinition:
|
217
|
+
* read | write | create | delete
|
218
|
+
*
|
219
|
+
* @enum {string}
|
220
|
+
*/
|
221
|
+
permission: "read" | "write" | "create" | "delete";
|
222
|
+
/** @description State of the component that this permission applies to */
|
223
|
+
state: number;
|
224
|
+
};
|
225
|
+
/** @description Defines a component type that can live on a Composition */
|
226
|
+
ComponentDefinition: {
|
227
|
+
id: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
|
228
|
+
/** @description Friendly name of the component definition */
|
229
|
+
name: string;
|
230
|
+
/**
|
231
|
+
* @description Icon name or URL for the component definition (e.g. 'screen' or 'https://s3/my-component.jpg')
|
232
|
+
* @default screen
|
233
|
+
*/
|
234
|
+
icon?: string;
|
235
|
+
/**
|
236
|
+
* @description The public ID of the parameter whose value should be used to create a display title for this component in the UI.
|
237
|
+
* The parameter type must support being used as a title parameter for this to work.
|
238
|
+
*/
|
239
|
+
titleParameter?: string | null;
|
240
|
+
/**
|
241
|
+
* @description Whether this component type can be the root of a composition. If false, this component is only used within slots on other components.
|
242
|
+
* @default false
|
243
|
+
*/
|
244
|
+
canBeComposition?: boolean;
|
245
|
+
/** @description The parameters for this component. Parameters are key-value pairs that can be anything from text values to links to CMS entries. */
|
246
|
+
parameters?: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionParameter"][];
|
247
|
+
/**
|
248
|
+
* @description if this component uses team permissions or custom permissions
|
249
|
+
* @default true
|
250
|
+
*/
|
251
|
+
useTeamPermissions?: boolean;
|
252
|
+
/** @description Custom role permissions for this component definition */
|
253
|
+
permissions?: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionPermission"][];
|
254
|
+
/** @description The named slots for this component; placement areas where arrays of other components can be added. */
|
255
|
+
slots?: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionSlot"][];
|
256
|
+
slugSettings?: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionSlugSettings"];
|
257
|
+
/** @description Default component instance value */
|
258
|
+
defaults?: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"] | null;
|
259
|
+
/** @description Named variants for this component; enables creation of visual variants that use the same parameter data */
|
260
|
+
variants?: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionVariant"][];
|
261
|
+
/** @description Created date string for this definition (ignored for writes) */
|
262
|
+
created?: string;
|
263
|
+
/** @description Last modified date string for this definition (ignored for writes) */
|
264
|
+
updated?: string;
|
265
|
+
};
|
266
|
+
/** @description Defines an editable parameter on a component. */
|
267
|
+
ComponentParameter: {
|
268
|
+
/** @description The value of the parameter. Any JSON-serializable value is acceptable. */
|
269
|
+
value: unknown;
|
270
|
+
/** @description The type of the parameter. Determines how it is displayed when editing, and tells the consumer how to process it. */
|
271
|
+
type: string;
|
272
|
+
binding?: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameterBinding"];
|
273
|
+
};
|
274
|
+
/**
|
275
|
+
* @deprecated
|
276
|
+
* @description Defines a binding from a resource data value to a component parameter value. Do not use.
|
277
|
+
*/
|
278
|
+
ComponentParameterBinding: {
|
279
|
+
/** @description A JSON Pointer expression that defines the binding directly to the parameter value */
|
280
|
+
pointer: string;
|
281
|
+
/**
|
282
|
+
* @description The syntax of the binding (currently always 'jptr')
|
283
|
+
* @enum {string}
|
284
|
+
*/
|
285
|
+
syntax: "jptr";
|
286
|
+
/**
|
287
|
+
* @description Whether the binding should cause an error if it cannot be resolved.
|
288
|
+
* If true, and the binding cannot be resolved, an error will be returned by the binding process.
|
289
|
+
* If false, and the binding cannot be resolved, the parameter will be removed from the bound composition.
|
290
|
+
*
|
291
|
+
* @default false
|
292
|
+
*/
|
293
|
+
required?: boolean;
|
294
|
+
};
|
295
|
+
/** @description Defines the shape of a component instance served by the composition API. */
|
296
|
+
ComponentInstance: {
|
297
|
+
/** @description Type of the component instance (public_id of its definition) */
|
298
|
+
type: string;
|
299
|
+
/** @description Component parameter values for the component instance */
|
300
|
+
parameters?: {
|
301
|
+
[key: string]: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameter"];
|
302
|
+
};
|
303
|
+
/** @description Public ID of alternate visual appearance for this component, if any selected */
|
304
|
+
variant?: string;
|
305
|
+
/** @description Slots containing any child components */
|
306
|
+
slots?: {
|
307
|
+
[key: string]: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"][];
|
308
|
+
};
|
309
|
+
/** @description Unique identifier of the component within the composition. This is not set unless specifically requested via `withComponentIDs` API parameter. */
|
310
|
+
_id?: string;
|
311
|
+
/** @description Indicates this component instance should be sourced from a pattern library pattern. */
|
312
|
+
_pattern?: string;
|
313
|
+
_data?: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinitions"];
|
314
|
+
/**
|
315
|
+
* @deprecated
|
316
|
+
* @description Data definitions coming from a pattern resolved for this component. Merged with _data during resolution.
|
317
|
+
* Means nothing for PUTs; it will be ignored.
|
318
|
+
*/
|
319
|
+
_patternData?: {
|
320
|
+
[key: string]: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinition"];
|
321
|
+
};
|
322
|
+
/**
|
323
|
+
* @description Describes why the pattern could not be resolved, if a pattern could not be resolved. For PUTs, this is allowed but ignored.
|
324
|
+
* CYCLIC: A cyclic pattern graph was detected, which could not be resolved because it would cause an infinite loop.
|
325
|
+
* NOTFOUND: The pattern ID referenced could not be found. It may have been deleted, or not be published yet.
|
326
|
+
* Means nothing for PUTs; it will be ignored.
|
327
|
+
*
|
328
|
+
* @enum {string}
|
329
|
+
*/
|
330
|
+
_patternError?: "NOTFOUND" | "CYCLIC";
|
331
|
+
};
|
332
|
+
/** @description Defines the shape of the root component in a composition */
|
333
|
+
RootComponentInstance: {
|
334
|
+
/** @description Type of the component instance (public_id of its definition) */
|
335
|
+
type: string;
|
336
|
+
/** @description Component parameter values for the component instance */
|
337
|
+
parameters?: {
|
338
|
+
[key: string]: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameter"];
|
339
|
+
};
|
340
|
+
/** @description Public ID of alternate visual appearance for this component, if any selected */
|
341
|
+
variant?: string;
|
342
|
+
/** @description Slots containing any child components */
|
343
|
+
slots?: {
|
344
|
+
[key: string]: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"][];
|
345
|
+
};
|
346
|
+
/** @description The public UUID of the composition. */
|
347
|
+
_id: string;
|
348
|
+
/** @description Slug pattern of this component. */
|
349
|
+
_slug?: string | null;
|
350
|
+
/** @description Friendly name of this component. */
|
351
|
+
_name: string;
|
352
|
+
_data?: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinitions"];
|
353
|
+
};
|
354
|
+
/**
|
355
|
+
* @deprecated
|
356
|
+
* @description Basic information about an integration data connector (i.e. "Master environment of the stable space", "Yelp API", "Sanity dev dataset"). This data is provided to list responses.
|
357
|
+
*/
|
358
|
+
DataConnectionInfo: {
|
359
|
+
/** @description Public ID of the data connector */
|
360
|
+
id: string;
|
361
|
+
/** @description Display name of the data connector */
|
362
|
+
displayName: string;
|
363
|
+
/** @description The type of data connector this connects to (e.g. 'cms-items', provided by an intalled integration) */
|
364
|
+
connectorType: string;
|
365
|
+
/** @description Base resource URL of the data connector. No trailing slash. */
|
366
|
+
baseUrl: string;
|
367
|
+
};
|
368
|
+
/**
|
369
|
+
* @deprecated
|
370
|
+
* @description An instance of an integration data connector (i.e. "Master environment of the stable space", "Yelp API", "Sanity dev dataset"). These are created in the UI and shared across a whole project.
|
371
|
+
*/
|
372
|
+
DataConnection: {
|
373
|
+
/** @description Public ID of the data connection */
|
374
|
+
id: string;
|
375
|
+
/** @description Display name of the data connection */
|
376
|
+
displayName: string;
|
377
|
+
/** @description The type of data connector this connects to (e.g. 'cms-items', provided by an intalled integration) */
|
378
|
+
connectorType: string;
|
379
|
+
/** @description Base resource URL of the data connection. No trailing slash. */
|
380
|
+
baseUrl: string;
|
381
|
+
/** @description HTTP headers to pass with requests to the data connection */
|
382
|
+
headers?: {
|
383
|
+
[key: string]: string;
|
384
|
+
};
|
385
|
+
/** @description Query String parameters to pass with requests to the data connection */
|
386
|
+
parameters?: {
|
387
|
+
[key: string]: string;
|
388
|
+
};
|
389
|
+
/** @description Variables needed to make calls to the data connection */
|
390
|
+
variables?: {
|
391
|
+
[key: string]: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataVariable"];
|
392
|
+
};
|
393
|
+
/** @description Custom configuration specific to the data connection being defined */
|
394
|
+
custom?: {
|
395
|
+
[key: string]: unknown;
|
396
|
+
};
|
397
|
+
};
|
398
|
+
/**
|
399
|
+
* @deprecated
|
400
|
+
* @description A specific type of data that a Data Connection can provide (i.e. "Recipe", "Recipes List by Tag", "Yelp Reviews of My Restaurant"). These are created in the UI and shared a whole project.
|
401
|
+
*/
|
402
|
+
DataType: {
|
403
|
+
/** @description Public ID of the data type */
|
404
|
+
id: string;
|
405
|
+
/** @description Display name of the data type */
|
406
|
+
displayName: string;
|
407
|
+
/** @description Public ID of the associated data connection */
|
408
|
+
connectionId: string;
|
409
|
+
/**
|
410
|
+
* @description A connector-specific archetype for this data type; used to select UI as well as perform any
|
411
|
+
* necessary post-processing on the response. e.g. 'cms-entry', 'cms-query'. Can be undefined if
|
412
|
+
* no special UI or processing is required.
|
413
|
+
*/
|
414
|
+
archetype?: string;
|
415
|
+
allowedOnComponents?: string[];
|
416
|
+
/** @description Resource path, appended to the data connection's baseUrl (e.g. baseUrl = https://base.url, path = /v1/endpoint -> final URL https://base.url/v1/endpoint). Must have leading slash. */
|
417
|
+
path: string;
|
418
|
+
/** @description HTTP headers to pass with requests to the data type. Merged with headers from the data connection, overriding identical keys. */
|
419
|
+
headers?: {
|
420
|
+
[key: string]: string;
|
421
|
+
};
|
422
|
+
/** @description Query String parameters to pass with requests to the data type. Merged with parameters from the data connection, overriding identical keys. */
|
423
|
+
parameters?: {
|
424
|
+
[key: string]: string;
|
425
|
+
};
|
426
|
+
/** @description Body to pass with requests to the data type (ignored unless method is POST) */
|
427
|
+
body?: string;
|
428
|
+
/**
|
429
|
+
* @description HTTP method to use with requests to the data type.
|
430
|
+
* @default GET
|
431
|
+
* @enum {string}
|
432
|
+
*/
|
433
|
+
method: "GET" | "POST" | "HEAD";
|
434
|
+
/** @description Variables needed to make calls to the data type. Merged with variables from the data connection, overriding identical keys. */
|
435
|
+
variables?: {
|
436
|
+
[key: string]: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataVariable"];
|
437
|
+
};
|
438
|
+
/** @description Custom configuration specific to the data connection being defined */
|
439
|
+
custom?: {
|
440
|
+
[key: string]: unknown;
|
441
|
+
};
|
442
|
+
};
|
443
|
+
/**
|
444
|
+
* @deprecated
|
445
|
+
* @description Defines the shape of a data variable on a Data Connector or Data Type
|
446
|
+
*/
|
447
|
+
DataVariable: {
|
448
|
+
/** @description Display name of the data variable */
|
449
|
+
displayName?: string;
|
450
|
+
/**
|
451
|
+
* @description Type of the data variable
|
452
|
+
* @default text
|
453
|
+
*/
|
454
|
+
type: string;
|
455
|
+
/** @description Default value of the data variable */
|
456
|
+
default: string;
|
457
|
+
/**
|
458
|
+
* @description Where the variable value is set. Static = set to static value by the author. Dynamic = set to a dynamic value by a runtime API request from the frontend (default is used in the editor).
|
459
|
+
* @enum {string}
|
460
|
+
*/
|
461
|
+
setBy: "static" | "dynamic";
|
462
|
+
};
|
463
|
+
/**
|
464
|
+
* @deprecated
|
465
|
+
* @description Data definitions attached to this component. The property name is the key of the data in the data document.
|
466
|
+
* Note: data definitions are inherited from ancestors at runtime (and may be overridden by descendants that use the same key).
|
467
|
+
*/
|
468
|
+
CompositionDataDefinitions: {
|
469
|
+
[key: string]: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinition"];
|
470
|
+
};
|
471
|
+
/**
|
472
|
+
* @deprecated
|
473
|
+
* @description Data definition attached to this component
|
474
|
+
*/
|
475
|
+
CompositionDataDefinition: {
|
476
|
+
/** @description Public ID of the data type that provides this data */
|
477
|
+
type: string;
|
478
|
+
/** @description Whether this data is a pattern parameter that has to be overridden when a pattern is referenced on another composition. If this is not a pattern composition, this has no meaning and should not be used. If unspecified, the default is false. */
|
479
|
+
isPatternParameter?: boolean;
|
480
|
+
variables?: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataVariables"];
|
481
|
+
};
|
482
|
+
/**
|
483
|
+
* @deprecated
|
484
|
+
* @description Static variable values for this composition.
|
485
|
+
*/
|
486
|
+
CompositionDataVariables: {
|
487
|
+
[key: string]: string;
|
488
|
+
};
|
489
|
+
};
|
490
|
+
};
|
491
|
+
operations: {};
|
492
|
+
};
|
493
|
+
}
|
494
|
+
|
495
|
+
interface components$1 {
|
496
|
+
schemas: {
|
497
|
+
/** @description Public ID (used in code). Do not change after creation. */
|
498
|
+
PublicIdProperty: string;
|
499
|
+
/** @description The definition of a component parameter */
|
500
|
+
ComponentDefinitionParameter: {
|
501
|
+
id: components$1["schemas"]["PublicIdProperty"];
|
502
|
+
/** @description Friendly name of the parameter */
|
503
|
+
name: string;
|
504
|
+
/** @description Appears next to the parameter in the Composition editor */
|
505
|
+
helpText?: string;
|
506
|
+
/** @description Type name of the parameter (provided by a Uniform integration) */
|
507
|
+
type: string;
|
508
|
+
/** @description The configuration object for the type (type-specific) */
|
509
|
+
typeConfig?: unknown;
|
510
|
+
};
|
511
|
+
/** @description The definition of a named component slot that can contain other components */
|
512
|
+
ComponentDefinitionSlot: {
|
513
|
+
id: components$1["schemas"]["PublicIdProperty"];
|
514
|
+
/** @description Friendly name of the slot */
|
515
|
+
name: string;
|
516
|
+
/** @description A list of component definition public IDs that are allowed in this named slot */
|
517
|
+
allowedComponents: string[];
|
518
|
+
/**
|
519
|
+
* @description Whether this slot inherits its allowed components from the parent slot it lives in. If true, allowedComponents is irrelevant.
|
520
|
+
* @default false
|
521
|
+
*/
|
522
|
+
inheritAllowedComponents: boolean;
|
523
|
+
/** @description Minimum valid number of components in this slot */
|
524
|
+
minComponents?: number;
|
525
|
+
/** @description Maximum valid number of components in this slot */
|
526
|
+
maxComponents?: number;
|
527
|
+
};
|
528
|
+
/** @description The definition of a composition's slug settings */
|
529
|
+
ComponentDefinitionSlugSettings: {
|
530
|
+
/**
|
531
|
+
* @description Whether the slug is required
|
532
|
+
* no: slug is optional
|
533
|
+
* yes: slug is required
|
534
|
+
* disabled: slug is disabled and will not be shown in the editor
|
535
|
+
*
|
536
|
+
* @default no
|
537
|
+
* @enum {string}
|
538
|
+
*/
|
539
|
+
required?: "no" | "yes" | "disabled";
|
540
|
+
/**
|
541
|
+
* @description Slug uniqueness configuration.
|
542
|
+
* no = no unique constraint
|
543
|
+
* local = must be unique within this component type
|
544
|
+
* global = must be unique across all component types
|
545
|
+
*
|
546
|
+
* @enum {string}
|
547
|
+
*/
|
548
|
+
unique?: "no" | "local" | "global";
|
549
|
+
/** @description Regular expression slugs must match */
|
550
|
+
regularExpression?: string;
|
551
|
+
/**
|
552
|
+
* @description Custom error message when regular expression validation fails.
|
553
|
+
* Has no effect if `regularExpression` is not set.
|
554
|
+
*/
|
555
|
+
regularExpressionMessage?: string;
|
556
|
+
};
|
557
|
+
/** @description The definition of a component variant */
|
558
|
+
ComponentDefinitionVariant: {
|
559
|
+
id: components$1["schemas"]["PublicIdProperty"];
|
560
|
+
/** @description Friendly name of the variant */
|
561
|
+
name: string;
|
562
|
+
};
|
563
|
+
/** @description Permission set for a component defintion */
|
564
|
+
ComponentDefinitionPermission: {
|
565
|
+
roleId: components$1["schemas"]["PublicIdProperty"];
|
566
|
+
/**
|
567
|
+
* @description Permission type for this permission ComponentDefinition:
|
568
|
+
* read | write | create | delete
|
569
|
+
*
|
570
|
+
* @enum {string}
|
571
|
+
*/
|
572
|
+
permission: "read" | "write" | "create" | "delete";
|
573
|
+
/** @description State of the component that this permission applies to */
|
574
|
+
state: number;
|
575
|
+
};
|
576
|
+
/** @description Defines a component type that can live on a Composition */
|
577
|
+
ComponentDefinition: {
|
578
|
+
id: components$1["schemas"]["PublicIdProperty"];
|
579
|
+
/** @description Friendly name of the component definition */
|
580
|
+
name: string;
|
581
|
+
/**
|
582
|
+
* @description Icon name or URL for the component definition (e.g. 'screen' or 'https://s3/my-component.jpg')
|
583
|
+
* @default screen
|
584
|
+
*/
|
585
|
+
icon?: string;
|
586
|
+
/**
|
587
|
+
* @description The public ID of the parameter whose value should be used to create a display title for this component in the UI.
|
588
|
+
* The parameter type must support being used as a title parameter for this to work.
|
589
|
+
*/
|
590
|
+
titleParameter?: string | null;
|
591
|
+
/**
|
592
|
+
* @description Whether this component type can be the root of a composition. If false, this component is only used within slots on other components.
|
593
|
+
* @default false
|
594
|
+
*/
|
595
|
+
canBeComposition?: boolean;
|
596
|
+
/** @description The parameters for this component. Parameters are key-value pairs that can be anything from text values to links to CMS entries. */
|
597
|
+
parameters?: components$1["schemas"]["ComponentDefinitionParameter"][];
|
598
|
+
/**
|
599
|
+
* @description if this component uses team permissions or custom permissions
|
600
|
+
* @default true
|
601
|
+
*/
|
602
|
+
useTeamPermissions?: boolean;
|
603
|
+
/** @description Custom role permissions for this component definition */
|
604
|
+
permissions?: components$1["schemas"]["ComponentDefinitionPermission"][];
|
605
|
+
/** @description The named slots for this component; placement areas where arrays of other components can be added. */
|
606
|
+
slots?: components$1["schemas"]["ComponentDefinitionSlot"][];
|
607
|
+
slugSettings?: components$1["schemas"]["ComponentDefinitionSlugSettings"];
|
608
|
+
/** @description Default component instance value */
|
609
|
+
defaults?: components$1["schemas"]["ComponentInstance"] | null;
|
610
|
+
/** @description Named variants for this component; enables creation of visual variants that use the same parameter data */
|
611
|
+
variants?: components$1["schemas"]["ComponentDefinitionVariant"][];
|
612
|
+
/** @description Created date string for this definition (ignored for writes) */
|
613
|
+
created?: string;
|
614
|
+
/** @description Last modified date string for this definition (ignored for writes) */
|
615
|
+
updated?: string;
|
616
|
+
};
|
617
|
+
/** @description Defines an editable parameter on a component. */
|
618
|
+
ComponentParameter: {
|
619
|
+
/** @description The value of the parameter. Any JSON-serializable value is acceptable. */
|
620
|
+
value: unknown;
|
621
|
+
/** @description The type of the parameter. Determines how it is displayed when editing, and tells the consumer how to process it. */
|
622
|
+
type: string;
|
623
|
+
binding?: components$1["schemas"]["ComponentParameterBinding"];
|
624
|
+
};
|
625
|
+
/**
|
626
|
+
* @deprecated
|
627
|
+
* @description Defines a binding from a resource data value to a component parameter value. Do not use.
|
628
|
+
*/
|
629
|
+
ComponentParameterBinding: {
|
630
|
+
/** @description A JSON Pointer expression that defines the binding directly to the parameter value */
|
631
|
+
pointer: string;
|
632
|
+
/**
|
633
|
+
* @description The syntax of the binding (currently always 'jptr')
|
634
|
+
* @enum {string}
|
635
|
+
*/
|
636
|
+
syntax: "jptr";
|
637
|
+
/**
|
638
|
+
* @description Whether the binding should cause an error if it cannot be resolved.
|
639
|
+
* If true, and the binding cannot be resolved, an error will be returned by the binding process.
|
640
|
+
* If false, and the binding cannot be resolved, the parameter will be removed from the bound composition.
|
641
|
+
*
|
642
|
+
* @default false
|
643
|
+
*/
|
644
|
+
required?: boolean;
|
645
|
+
};
|
646
|
+
/** @description Defines the shape of a component instance served by the composition API. */
|
647
|
+
ComponentInstance: {
|
648
|
+
/** @description Type of the component instance (public_id of its definition) */
|
649
|
+
type: string;
|
650
|
+
/** @description Component parameter values for the component instance */
|
651
|
+
parameters?: {
|
652
|
+
[key: string]: components$1["schemas"]["ComponentParameter"];
|
653
|
+
};
|
654
|
+
/** @description Public ID of alternate visual appearance for this component, if any selected */
|
655
|
+
variant?: string;
|
656
|
+
/** @description Slots containing any child components */
|
657
|
+
slots?: {
|
658
|
+
[key: string]: components$1["schemas"]["ComponentInstance"][];
|
659
|
+
};
|
660
|
+
/** @description Unique identifier of the component within the composition. This is not set unless specifically requested via `withComponentIDs` API parameter. */
|
661
|
+
_id?: string;
|
662
|
+
/** @description Indicates this component instance should be sourced from a pattern library pattern. */
|
663
|
+
_pattern?: string;
|
664
|
+
_data?: components$1["schemas"]["CompositionDataDefinitions"];
|
665
|
+
/**
|
666
|
+
* @deprecated
|
667
|
+
* @description Data definitions coming from a pattern resolved for this component. Merged with _data during resolution.
|
668
|
+
* Means nothing for PUTs; it will be ignored.
|
669
|
+
*/
|
670
|
+
_patternData?: {
|
671
|
+
[key: string]: components$1["schemas"]["CompositionDataDefinition"];
|
672
|
+
};
|
673
|
+
/**
|
674
|
+
* @description Describes why the pattern could not be resolved, if a pattern could not be resolved. For PUTs, this is allowed but ignored.
|
675
|
+
* CYCLIC: A cyclic pattern graph was detected, which could not be resolved because it would cause an infinite loop.
|
676
|
+
* NOTFOUND: The pattern ID referenced could not be found. It may have been deleted, or not be published yet.
|
677
|
+
* Means nothing for PUTs; it will be ignored.
|
678
|
+
*
|
679
|
+
* @enum {string}
|
680
|
+
*/
|
681
|
+
_patternError?: "NOTFOUND" | "CYCLIC";
|
682
|
+
};
|
683
|
+
/** @description Defines the shape of the root component in a composition */
|
684
|
+
RootComponentInstance: {
|
685
|
+
/** @description Type of the component instance (public_id of its definition) */
|
686
|
+
type: string;
|
687
|
+
/** @description Component parameter values for the component instance */
|
688
|
+
parameters?: {
|
689
|
+
[key: string]: components$1["schemas"]["ComponentParameter"];
|
690
|
+
};
|
691
|
+
/** @description Public ID of alternate visual appearance for this component, if any selected */
|
692
|
+
variant?: string;
|
693
|
+
/** @description Slots containing any child components */
|
694
|
+
slots?: {
|
695
|
+
[key: string]: components$1["schemas"]["ComponentInstance"][];
|
696
|
+
};
|
697
|
+
/** @description The public UUID of the composition. */
|
698
|
+
_id: string;
|
699
|
+
/** @description Slug pattern of this component. */
|
700
|
+
_slug?: string | null;
|
701
|
+
/** @description Friendly name of this component. */
|
702
|
+
_name: string;
|
703
|
+
_data?: components$1["schemas"]["CompositionDataDefinitions"];
|
704
|
+
};
|
705
|
+
/**
|
706
|
+
* @deprecated
|
707
|
+
* @description Basic information about an integration data connector (i.e. "Master environment of the stable space", "Yelp API", "Sanity dev dataset"). This data is provided to list responses.
|
708
|
+
*/
|
709
|
+
DataConnectionInfo: {
|
710
|
+
/** @description Public ID of the data connector */
|
711
|
+
id: string;
|
712
|
+
/** @description Display name of the data connector */
|
713
|
+
displayName: string;
|
714
|
+
/** @description The type of data connector this connects to (e.g. 'cms-items', provided by an intalled integration) */
|
715
|
+
connectorType: string;
|
716
|
+
/** @description Base resource URL of the data connector. No trailing slash. */
|
717
|
+
baseUrl: string;
|
718
|
+
};
|
719
|
+
/**
|
720
|
+
* @deprecated
|
721
|
+
* @description An instance of an integration data connector (i.e. "Master environment of the stable space", "Yelp API", "Sanity dev dataset"). These are created in the UI and shared across a whole project.
|
722
|
+
*/
|
723
|
+
DataConnection: {
|
724
|
+
/** @description Public ID of the data connection */
|
725
|
+
id: string;
|
726
|
+
/** @description Display name of the data connection */
|
727
|
+
displayName: string;
|
728
|
+
/** @description The type of data connector this connects to (e.g. 'cms-items', provided by an intalled integration) */
|
729
|
+
connectorType: string;
|
730
|
+
/** @description Base resource URL of the data connection. No trailing slash. */
|
731
|
+
baseUrl: string;
|
732
|
+
/** @description HTTP headers to pass with requests to the data connection */
|
733
|
+
headers?: {
|
734
|
+
[key: string]: string;
|
735
|
+
};
|
736
|
+
/** @description Query String parameters to pass with requests to the data connection */
|
737
|
+
parameters?: {
|
738
|
+
[key: string]: string;
|
739
|
+
};
|
740
|
+
/** @description Variables needed to make calls to the data connection */
|
741
|
+
variables?: {
|
742
|
+
[key: string]: components$1["schemas"]["DataVariable"];
|
743
|
+
};
|
744
|
+
/** @description Custom configuration specific to the data connection being defined */
|
745
|
+
custom?: {
|
746
|
+
[key: string]: unknown;
|
747
|
+
};
|
748
|
+
};
|
749
|
+
/**
|
750
|
+
* @deprecated
|
751
|
+
* @description A specific type of data that a Data Connection can provide (i.e. "Recipe", "Recipes List by Tag", "Yelp Reviews of My Restaurant"). These are created in the UI and shared a whole project.
|
752
|
+
*/
|
753
|
+
DataType: {
|
754
|
+
/** @description Public ID of the data type */
|
755
|
+
id: string;
|
756
|
+
/** @description Display name of the data type */
|
757
|
+
displayName: string;
|
758
|
+
/** @description Public ID of the associated data connection */
|
759
|
+
connectionId: string;
|
760
|
+
/**
|
761
|
+
* @description A connector-specific archetype for this data type; used to select UI as well as perform any
|
762
|
+
* necessary post-processing on the response. e.g. 'cms-entry', 'cms-query'. Can be undefined if
|
763
|
+
* no special UI or processing is required.
|
764
|
+
*/
|
765
|
+
archetype?: string;
|
766
|
+
allowedOnComponents?: string[];
|
767
|
+
/** @description Resource path, appended to the data connection's baseUrl (e.g. baseUrl = https://base.url, path = /v1/endpoint -> final URL https://base.url/v1/endpoint). Must have leading slash. */
|
768
|
+
path: string;
|
769
|
+
/** @description HTTP headers to pass with requests to the data type. Merged with headers from the data connection, overriding identical keys. */
|
770
|
+
headers?: {
|
771
|
+
[key: string]: string;
|
772
|
+
};
|
773
|
+
/** @description Query String parameters to pass with requests to the data type. Merged with parameters from the data connection, overriding identical keys. */
|
774
|
+
parameters?: {
|
775
|
+
[key: string]: string;
|
776
|
+
};
|
777
|
+
/** @description Body to pass with requests to the data type (ignored unless method is POST) */
|
778
|
+
body?: string;
|
779
|
+
/**
|
780
|
+
* @description HTTP method to use with requests to the data type.
|
781
|
+
* @default GET
|
782
|
+
* @enum {string}
|
783
|
+
*/
|
784
|
+
method: "GET" | "POST" | "HEAD";
|
785
|
+
/** @description Variables needed to make calls to the data type. Merged with variables from the data connection, overriding identical keys. */
|
786
|
+
variables?: {
|
787
|
+
[key: string]: components$1["schemas"]["DataVariable"];
|
788
|
+
};
|
789
|
+
/** @description Custom configuration specific to the data connection being defined */
|
790
|
+
custom?: {
|
791
|
+
[key: string]: unknown;
|
792
|
+
};
|
793
|
+
};
|
794
|
+
/**
|
795
|
+
* @deprecated
|
796
|
+
* @description Defines the shape of a data variable on a Data Connector or Data Type
|
797
|
+
*/
|
798
|
+
DataVariable: {
|
799
|
+
/** @description Display name of the data variable */
|
800
|
+
displayName?: string;
|
801
|
+
/**
|
802
|
+
* @description Type of the data variable
|
803
|
+
* @default text
|
804
|
+
*/
|
805
|
+
type: string;
|
806
|
+
/** @description Default value of the data variable */
|
807
|
+
default: string;
|
808
|
+
/**
|
809
|
+
* @description Where the variable value is set. Static = set to static value by the author. Dynamic = set to a dynamic value by a runtime API request from the frontend (default is used in the editor).
|
810
|
+
* @enum {string}
|
811
|
+
*/
|
812
|
+
setBy: "static" | "dynamic";
|
813
|
+
};
|
814
|
+
/**
|
815
|
+
* @deprecated
|
816
|
+
* @description Data definitions attached to this component. The property name is the key of the data in the data document.
|
817
|
+
* Note: data definitions are inherited from ancestors at runtime (and may be overridden by descendants that use the same key).
|
818
|
+
*/
|
819
|
+
CompositionDataDefinitions: {
|
820
|
+
[key: string]: components$1["schemas"]["CompositionDataDefinition"];
|
821
|
+
};
|
822
|
+
/**
|
823
|
+
* @deprecated
|
824
|
+
* @description Data definition attached to this component
|
825
|
+
*/
|
826
|
+
CompositionDataDefinition: {
|
827
|
+
/** @description Public ID of the data type that provides this data */
|
828
|
+
type: string;
|
829
|
+
/** @description Whether this data is a pattern parameter that has to be overridden when a pattern is referenced on another composition. If this is not a pattern composition, this has no meaning and should not be used. If unspecified, the default is false. */
|
830
|
+
isPatternParameter?: boolean;
|
831
|
+
variables?: components$1["schemas"]["CompositionDataVariables"];
|
832
|
+
};
|
833
|
+
/**
|
834
|
+
* @deprecated
|
835
|
+
* @description Static variable values for this composition.
|
836
|
+
*/
|
837
|
+
CompositionDataVariables: {
|
838
|
+
[key: string]: string;
|
839
|
+
};
|
840
|
+
};
|
841
|
+
}
|
842
|
+
|
843
|
+
declare type SharedComponents$1 = components$1['schemas'];
|
844
|
+
declare type Api$1 = paths$4['/api/v1/canvas-definitions'];
|
845
|
+
/** Shape of the GET response from /api/v1/canvas-definitions */
|
846
|
+
declare type ComponentDefinitionGetResponse = Api$1['get']['responses']['200']['content']['application/json'];
|
847
|
+
/** Shape of the PUT request body for /api/v1/canvas-definitions */
|
848
|
+
declare type ComponentDefinitionPutParameters = Api$1['put']['requestBody']['content']['application/json'];
|
849
|
+
/** Shape of the DELETE request body for /api/v1/canvas-definitions */
|
850
|
+
declare type ComponentDefinitionDeleteParameters = Api$1['delete']['requestBody']['content']['application/json'];
|
851
|
+
/** Query parameter options for GET /api/v1/canvas-definitions */
|
852
|
+
declare type ComponentDefinitionGetParameters = Api$1['get']['parameters']['query'];
|
853
|
+
/** @deprecated use ComponentDefinitionGetResponse instead */
|
854
|
+
declare type ComponentDefinitionAPIResponse = ComponentDefinitionGetResponse;
|
855
|
+
/** @deprecated use ComponentDefinitionPutParameters */
|
856
|
+
declare type ComponentDefinitionAPIPutRequest = ComponentDefinitionPutParameters;
|
857
|
+
/** @deprecated use ComponentDefinitionDeleteParameters */
|
858
|
+
declare type ComponentDefinitionAPIDeleteRequest = ComponentDefinitionDeleteParameters;
|
859
|
+
/** @deprecated use ComponentDefinitionGetParameters */
|
860
|
+
declare type ComponentDefinitionListAPIOptions = ComponentDefinitionGetParameters;
|
861
|
+
/** The definition of a component parameter */
|
862
|
+
declare type ComponentDefinitionParameter<TConfig = unknown> = Omit<components$1['schemas']['ComponentDefinitionParameter'], 'typeConfig'> & {
|
863
|
+
typeConfig?: TConfig;
|
864
|
+
};
|
865
|
+
/** The definition of a component visual variant */
|
866
|
+
declare type ComponentDefinitionVariant = SharedComponents$1['ComponentDefinitionVariant'];
|
867
|
+
/** The definition of a composition's slug settings */
|
868
|
+
declare type ComponentDefinitionSlugSettings = SharedComponents$1['ComponentDefinitionSlugSettings'];
|
869
|
+
/** The definition of a named component slot that can contain other components */
|
870
|
+
declare type ComponentDefinitionSlot = SharedComponents$1['ComponentDefinitionSlot'];
|
871
|
+
/** Permission set for a component defintion */
|
872
|
+
declare type ComponentDefinitionPermission = SharedComponents$1['ComponentDefinitionPermission'];
|
873
|
+
/** Defines a component type that can live on a Composition */
|
874
|
+
declare type ComponentDefinition = SharedComponents$1['ComponentDefinition'];
|
875
|
+
/** @deprecated use ComponentDefinition instead */
|
876
|
+
declare type CreatingComponentDefinition = Omit<Partial<ComponentDefinition>, 'created' | 'updated'>;
|
877
|
+
|
878
|
+
/**
|
879
|
+
* This file was auto-generated by openapi-typescript.
|
880
|
+
* Do not make direct changes to the file.
|
881
|
+
*/
|
882
|
+
interface paths$3 {
|
883
|
+
"/api/v1/canvas": {
|
884
|
+
get: {
|
885
|
+
parameters: {
|
886
|
+
query: {
|
887
|
+
/** The project the composition(s) are on. */
|
888
|
+
projectId: string;
|
889
|
+
/** Specify a single composition ID to fetch. Changes response from list to single. */
|
890
|
+
compositionId?: string;
|
891
|
+
/** Specify multiple composition IDs to fetch. Response type will be a list. */
|
892
|
+
compositionIDs?: string[];
|
893
|
+
/** Specify a single composition to fetch by slug. Changes response from list to single. */
|
894
|
+
slug?: string;
|
895
|
+
/** The component type (by public ID) to filter by. Note that this filters the root composition type only; components in slots are not matched by this filter. */
|
896
|
+
type?: string[];
|
897
|
+
/** State of compositions to fetch. 0 = draft, 64 = published. */
|
898
|
+
state?: number;
|
899
|
+
/** Number of records to skip */
|
900
|
+
offset?: number;
|
901
|
+
/** Max number of records to return */
|
902
|
+
limit?: number;
|
903
|
+
/**
|
904
|
+
* @deprecated Signals an enhancer proxy to skip processing enhancements to the data and return raw data only.
|
905
|
+
* This improves performance if you do not require enhanced component data.
|
906
|
+
* If calling the Canvas API directly with no enhancer proxy, this has no effect.
|
907
|
+
*/
|
908
|
+
skipEnhance?: boolean;
|
909
|
+
/**
|
910
|
+
* If true, any pattern references in the composition will be left unresolved.
|
911
|
+
* This is appropriate if you intend to serialize the composition data without pattern
|
912
|
+
* data embedded into it, and serialize the pattern data separately.
|
913
|
+
*/
|
914
|
+
skipPatternResolution?: boolean;
|
915
|
+
/**
|
916
|
+
* If true the `_id` unique identifier of each non-root component will be part of the response data.
|
917
|
+
* If false, the `_id` will not be present in the API response.
|
918
|
+
*/
|
919
|
+
withComponentIDs?: boolean;
|
920
|
+
/**
|
921
|
+
* Matches compositions where their name, slug, or definition name contains the specified keyword.
|
922
|
+
* NOT a full text search; does not match composition contents.
|
923
|
+
*/
|
924
|
+
keyword?: string;
|
925
|
+
/**
|
926
|
+
* Matches compositions based on whether they are a pattern composition or a regular composition.
|
927
|
+
* If true, only pattern compositions will be returned.
|
928
|
+
* If false, only regular compositions will be returned.
|
929
|
+
* If omitted, both pattern and regular compositions will be returned.
|
930
|
+
*/
|
931
|
+
pattern?: boolean;
|
932
|
+
/** Sets the sorting of the results. If unspecified, results are sorted by name ascending. */
|
933
|
+
orderBy?: ("updated_at_DESC" | "updated_at_ASC" | "created_at_DESC" | "created_at_ASC" | "name_DESC" | "name_ASC" | "slug_DESC" | "slug_ASC")[];
|
934
|
+
/**
|
935
|
+
* @deprecated Returns the UI status string of the composition.
|
936
|
+
* This internal status is subject to change without notice, and is thus marked deprecated to discourage use of internal data.
|
937
|
+
*/
|
938
|
+
withUIStatus?: boolean;
|
939
|
+
/**
|
940
|
+
* @deprecated Filters composition lists by the UI status of the composition.
|
941
|
+
* This internal status is subject to change without notice, and is thus marked deprecated to discourage use of internal data.
|
942
|
+
*/
|
943
|
+
uiStatus?: ("Draft" | "Modified" | "Published" | "Orphan")[];
|
944
|
+
/** Filters composition lists by the user who created them. The user is specified by their identity subject. */
|
945
|
+
createdBy?: string;
|
946
|
+
/** Filters composition lists by the user who last updated them. The user is specified by their identity subject. */
|
947
|
+
updatedBy?: string;
|
948
|
+
};
|
949
|
+
};
|
950
|
+
responses: {
|
951
|
+
/** OK */
|
952
|
+
200: {
|
953
|
+
content: {
|
954
|
+
"application/json": components["schemas"]["CompositionListResponse"] | components["schemas"]["CompositionApiResponse"];
|
955
|
+
};
|
956
|
+
};
|
957
|
+
400: external$3["swagger.yml"]["components"]["responses"]["BadRequestError"];
|
958
|
+
401: external$3["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
|
959
|
+
403: external$3["swagger.yml"]["components"]["responses"]["ForbiddenError"];
|
960
|
+
/** Composition not found */
|
961
|
+
404: {
|
962
|
+
content: {
|
963
|
+
"text/plain": string;
|
964
|
+
};
|
965
|
+
};
|
966
|
+
429: external$3["swagger.yml"]["components"]["responses"]["RateLimitError"];
|
967
|
+
500: external$3["swagger.yml"]["components"]["responses"]["InternalServerError"];
|
968
|
+
};
|
969
|
+
};
|
970
|
+
/** Upserts a composition */
|
971
|
+
put: {
|
972
|
+
responses: {
|
973
|
+
/** OK */
|
974
|
+
204: never;
|
975
|
+
400: external$3["swagger.yml"]["components"]["responses"]["BadRequestError"];
|
976
|
+
401: external$3["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
|
977
|
+
403: external$3["swagger.yml"]["components"]["responses"]["ForbiddenError"];
|
978
|
+
429: external$3["swagger.yml"]["components"]["responses"]["RateLimitError"];
|
979
|
+
500: external$3["swagger.yml"]["components"]["responses"]["InternalServerError"];
|
980
|
+
};
|
981
|
+
requestBody: {
|
982
|
+
content: {
|
983
|
+
"application/json": {
|
984
|
+
/**
|
985
|
+
* Format: uuid
|
986
|
+
* @description The project ID to upsert the composition to
|
987
|
+
*/
|
988
|
+
projectId: string;
|
989
|
+
/** @description The state of the composition to upsert into. 0 = draft, 64 = published */
|
990
|
+
state: number;
|
991
|
+
composition: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["RootComponentInstance"];
|
992
|
+
/**
|
993
|
+
* @description True if the composition is a pattern (which can be referenced on other compositions)
|
994
|
+
* @default false
|
995
|
+
*/
|
996
|
+
pattern?: boolean;
|
997
|
+
/** @description Ignored if present */
|
998
|
+
created?: string;
|
999
|
+
/** @description Ignored if present */
|
1000
|
+
modified?: string;
|
1001
|
+
};
|
1002
|
+
};
|
1003
|
+
};
|
1004
|
+
};
|
1005
|
+
/** Deletes or unpublishes a composition */
|
1006
|
+
delete: {
|
1007
|
+
responses: {
|
1008
|
+
/** OK */
|
1009
|
+
204: never;
|
1010
|
+
400: external$3["swagger.yml"]["components"]["responses"]["BadRequestError"];
|
1011
|
+
401: external$3["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
|
1012
|
+
403: external$3["swagger.yml"]["components"]["responses"]["ForbiddenError"];
|
1013
|
+
429: external$3["swagger.yml"]["components"]["responses"]["RateLimitError"];
|
1014
|
+
500: external$3["swagger.yml"]["components"]["responses"]["InternalServerError"];
|
1015
|
+
};
|
1016
|
+
requestBody: {
|
1017
|
+
content: {
|
1018
|
+
"application/json": {
|
1019
|
+
/**
|
1020
|
+
* Format: uuid
|
1021
|
+
* @description The ID of the composition to delete
|
1022
|
+
*/
|
1023
|
+
compositionId: string;
|
1024
|
+
/**
|
1025
|
+
* Format: uuid
|
1026
|
+
* @description The ID of the project the composition to delete belongs to
|
1027
|
+
*/
|
1028
|
+
projectId: string;
|
1029
|
+
/** @description The state of the composition to delete (0 = draft, 64 = published [causes unpublishing], unspecified = all) */
|
1030
|
+
state?: number;
|
1031
|
+
};
|
1032
|
+
};
|
1033
|
+
};
|
1034
|
+
};
|
1035
|
+
/** Handles preflight requests. This endpoint allows CORS. */
|
1036
|
+
options: {
|
1037
|
+
responses: {
|
1038
|
+
/** OK */
|
1039
|
+
204: never;
|
1040
|
+
};
|
1041
|
+
};
|
1042
|
+
};
|
1043
|
+
}
|
1044
|
+
interface components {
|
1045
|
+
schemas: {
|
1046
|
+
CompositionApiResponse: {
|
1047
|
+
/** @description State of compositions to fetch. 0 = draft, 64 = published. */
|
1048
|
+
state: number;
|
1049
|
+
/**
|
1050
|
+
* @deprecated
|
1051
|
+
* @description UI status value. Subject to change without notice; do not rely on this value. Only present when `withUIStatus` option is true.
|
1052
|
+
* @enum {string}
|
1053
|
+
*/
|
1054
|
+
uiStatus?: "Draft" | "Modified" | "Published" | "Orphan";
|
1055
|
+
/**
|
1056
|
+
* Format: uuid
|
1057
|
+
* @description The project ID that this layout data is part of
|
1058
|
+
*/
|
1059
|
+
projectId: string;
|
1060
|
+
/**
|
1061
|
+
* Format: date-time,
|
1062
|
+
* @description Created date string for this definition
|
1063
|
+
*/
|
1064
|
+
created: string;
|
1065
|
+
/**
|
1066
|
+
* Format: date-time,
|
1067
|
+
* @description Modified date string for this definition
|
1068
|
+
*/
|
1069
|
+
modified: string;
|
1070
|
+
/** @description Whether this composition is a pattern (can be referenced by other compositions, not treated as a composition) */
|
1071
|
+
pattern: boolean;
|
1072
|
+
composition: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["RootComponentInstance"];
|
1073
|
+
};
|
1074
|
+
CompositionListResponse: {
|
1075
|
+
compositions: components["schemas"]["CompositionApiResponse"][];
|
1076
|
+
};
|
1077
|
+
};
|
1078
|
+
}
|
1079
|
+
interface external$3 {
|
1080
|
+
"swagger.yml": {
|
1081
|
+
paths: {};
|
1082
|
+
components: {
|
1083
|
+
schemas: {
|
1084
|
+
Error: {
|
1085
|
+
/** @description Error message(s) that occurred while processing the request */
|
1086
|
+
errorMessage?: string[] | string;
|
1087
|
+
};
|
1088
|
+
};
|
1089
|
+
responses: {
|
1090
|
+
/** Request input validation failed */
|
1091
|
+
BadRequestError: {
|
1092
|
+
content: {
|
1093
|
+
"application/json": external$3["swagger.yml"]["components"]["schemas"]["Error"];
|
1094
|
+
};
|
1095
|
+
};
|
1096
|
+
/** API key or token was not valid */
|
1097
|
+
UnauthorizedError: {
|
1098
|
+
content: {
|
1099
|
+
"application/json": external$3["swagger.yml"]["components"]["schemas"]["Error"];
|
1100
|
+
};
|
1101
|
+
};
|
1102
|
+
/** Permission was denied */
|
1103
|
+
ForbiddenError: {
|
1104
|
+
content: {
|
1105
|
+
"application/json": external$3["swagger.yml"]["components"]["schemas"]["Error"];
|
1106
|
+
};
|
1107
|
+
};
|
1108
|
+
/** Resource not found */
|
1109
|
+
NotFoundError: {
|
1110
|
+
content: {
|
1111
|
+
"application/json": external$3["swagger.yml"]["components"]["schemas"]["Error"];
|
1112
|
+
};
|
1113
|
+
};
|
1114
|
+
/** Too many requests in allowed time period */
|
1115
|
+
RateLimitError: unknown;
|
1116
|
+
/** Execution error occurred */
|
1117
|
+
InternalServerError: unknown;
|
1118
|
+
};
|
1119
|
+
};
|
1120
|
+
operations: {};
|
1121
|
+
};
|
1122
|
+
"uniform-canvas-types.swagger.yml": {
|
1123
|
+
paths: {};
|
1124
|
+
components: {
|
1125
|
+
schemas: {
|
1126
|
+
/** @description Public ID (used in code). Do not change after creation. */
|
1127
|
+
PublicIdProperty: string;
|
1128
|
+
/** @description The definition of a component parameter */
|
1129
|
+
ComponentDefinitionParameter: {
|
1130
|
+
id: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
|
1131
|
+
/** @description Friendly name of the parameter */
|
1132
|
+
name: string;
|
1133
|
+
/** @description Appears next to the parameter in the Composition editor */
|
1134
|
+
helpText?: string;
|
1135
|
+
/** @description Type name of the parameter (provided by a Uniform integration) */
|
1136
|
+
type: string;
|
1137
|
+
/** @description The configuration object for the type (type-specific) */
|
1138
|
+
typeConfig?: unknown;
|
1139
|
+
};
|
1140
|
+
/** @description The definition of a named component slot that can contain other components */
|
1141
|
+
ComponentDefinitionSlot: {
|
1142
|
+
id: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
|
1143
|
+
/** @description Friendly name of the slot */
|
1144
|
+
name: string;
|
1145
|
+
/** @description A list of component definition public IDs that are allowed in this named slot */
|
1146
|
+
allowedComponents: string[];
|
1147
|
+
/**
|
1148
|
+
* @description Whether this slot inherits its allowed components from the parent slot it lives in. If true, allowedComponents is irrelevant.
|
1149
|
+
* @default false
|
1150
|
+
*/
|
1151
|
+
inheritAllowedComponents: boolean;
|
1152
|
+
/** @description Minimum valid number of components in this slot */
|
1153
|
+
minComponents?: number;
|
1154
|
+
/** @description Maximum valid number of components in this slot */
|
1155
|
+
maxComponents?: number;
|
1156
|
+
};
|
1157
|
+
/** @description The definition of a composition's slug settings */
|
1158
|
+
ComponentDefinitionSlugSettings: {
|
1159
|
+
/**
|
1160
|
+
* @description Whether the slug is required
|
1161
|
+
* no: slug is optional
|
1162
|
+
* yes: slug is required
|
1163
|
+
* disabled: slug is disabled and will not be shown in the editor
|
1164
|
+
*
|
1165
|
+
* @default no
|
1166
|
+
* @enum {string}
|
1167
|
+
*/
|
1168
|
+
required?: "no" | "yes" | "disabled";
|
1169
|
+
/**
|
1170
|
+
* @description Slug uniqueness configuration.
|
1171
|
+
* no = no unique constraint
|
1172
|
+
* local = must be unique within this component type
|
1173
|
+
* global = must be unique across all component types
|
1174
|
+
*
|
1175
|
+
* @enum {string}
|
1176
|
+
*/
|
1177
|
+
unique?: "no" | "local" | "global";
|
1178
|
+
/** @description Regular expression slugs must match */
|
1179
|
+
regularExpression?: string;
|
1180
|
+
/**
|
1181
|
+
* @description Custom error message when regular expression validation fails.
|
1182
|
+
* Has no effect if `regularExpression` is not set.
|
1183
|
+
*/
|
1184
|
+
regularExpressionMessage?: string;
|
1185
|
+
};
|
1186
|
+
/** @description The definition of a component variant */
|
1187
|
+
ComponentDefinitionVariant: {
|
1188
|
+
id: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
|
1189
|
+
/** @description Friendly name of the variant */
|
1190
|
+
name: string;
|
1191
|
+
};
|
1192
|
+
/** @description Permission set for a component defintion */
|
1193
|
+
ComponentDefinitionPermission: {
|
1194
|
+
roleId: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
|
1195
|
+
/**
|
1196
|
+
* @description Permission type for this permission ComponentDefinition:
|
1197
|
+
* read | write | create | delete
|
1198
|
+
*
|
1199
|
+
* @enum {string}
|
1200
|
+
*/
|
1201
|
+
permission: "read" | "write" | "create" | "delete";
|
1202
|
+
/** @description State of the component that this permission applies to */
|
1203
|
+
state: number;
|
1204
|
+
};
|
1205
|
+
/** @description Defines a component type that can live on a Composition */
|
1206
|
+
ComponentDefinition: {
|
1207
|
+
id: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
|
1208
|
+
/** @description Friendly name of the component definition */
|
1209
|
+
name: string;
|
1210
|
+
/**
|
1211
|
+
* @description Icon name or URL for the component definition (e.g. 'screen' or 'https://s3/my-component.jpg')
|
1212
|
+
* @default screen
|
1213
|
+
*/
|
1214
|
+
icon?: string;
|
1215
|
+
/**
|
1216
|
+
* @description The public ID of the parameter whose value should be used to create a display title for this component in the UI.
|
1217
|
+
* The parameter type must support being used as a title parameter for this to work.
|
1218
|
+
*/
|
1219
|
+
titleParameter?: string | null;
|
1220
|
+
/**
|
1221
|
+
* @description Whether this component type can be the root of a composition. If false, this component is only used within slots on other components.
|
1222
|
+
* @default false
|
1223
|
+
*/
|
1224
|
+
canBeComposition?: boolean;
|
1225
|
+
/** @description The parameters for this component. Parameters are key-value pairs that can be anything from text values to links to CMS entries. */
|
1226
|
+
parameters?: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionParameter"][];
|
1227
|
+
/**
|
1228
|
+
* @description if this component uses team permissions or custom permissions
|
1229
|
+
* @default true
|
1230
|
+
*/
|
1231
|
+
useTeamPermissions?: boolean;
|
1232
|
+
/** @description Custom role permissions for this component definition */
|
1233
|
+
permissions?: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionPermission"][];
|
1234
|
+
/** @description The named slots for this component; placement areas where arrays of other components can be added. */
|
1235
|
+
slots?: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionSlot"][];
|
1236
|
+
slugSettings?: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionSlugSettings"];
|
1237
|
+
/** @description Default component instance value */
|
1238
|
+
defaults?: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"] | null;
|
1239
|
+
/** @description Named variants for this component; enables creation of visual variants that use the same parameter data */
|
1240
|
+
variants?: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionVariant"][];
|
1241
|
+
/** @description Created date string for this definition (ignored for writes) */
|
1242
|
+
created?: string;
|
1243
|
+
/** @description Last modified date string for this definition (ignored for writes) */
|
1244
|
+
updated?: string;
|
1245
|
+
};
|
1246
|
+
/** @description Defines an editable parameter on a component. */
|
1247
|
+
ComponentParameter: {
|
1248
|
+
/** @description The value of the parameter. Any JSON-serializable value is acceptable. */
|
1249
|
+
value: unknown;
|
1250
|
+
/** @description The type of the parameter. Determines how it is displayed when editing, and tells the consumer how to process it. */
|
1251
|
+
type: string;
|
1252
|
+
binding?: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameterBinding"];
|
1253
|
+
};
|
1254
|
+
/**
|
1255
|
+
* @deprecated
|
1256
|
+
* @description Defines a binding from a resource data value to a component parameter value. Do not use.
|
1257
|
+
*/
|
1258
|
+
ComponentParameterBinding: {
|
1259
|
+
/** @description A JSON Pointer expression that defines the binding directly to the parameter value */
|
1260
|
+
pointer: string;
|
1261
|
+
/**
|
1262
|
+
* @description The syntax of the binding (currently always 'jptr')
|
1263
|
+
* @enum {string}
|
1264
|
+
*/
|
1265
|
+
syntax: "jptr";
|
1266
|
+
/**
|
1267
|
+
* @description Whether the binding should cause an error if it cannot be resolved.
|
1268
|
+
* If true, and the binding cannot be resolved, an error will be returned by the binding process.
|
1269
|
+
* If false, and the binding cannot be resolved, the parameter will be removed from the bound composition.
|
1270
|
+
*
|
1271
|
+
* @default false
|
1272
|
+
*/
|
1273
|
+
required?: boolean;
|
1274
|
+
};
|
1275
|
+
/** @description Defines the shape of a component instance served by the composition API. */
|
1276
|
+
ComponentInstance: {
|
1277
|
+
/** @description Type of the component instance (public_id of its definition) */
|
1278
|
+
type: string;
|
1279
|
+
/** @description Component parameter values for the component instance */
|
1280
|
+
parameters?: {
|
1281
|
+
[key: string]: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameter"];
|
1282
|
+
};
|
1283
|
+
/** @description Public ID of alternate visual appearance for this component, if any selected */
|
1284
|
+
variant?: string;
|
1285
|
+
/** @description Slots containing any child components */
|
1286
|
+
slots?: {
|
1287
|
+
[key: string]: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"][];
|
1288
|
+
};
|
1289
|
+
/** @description Unique identifier of the component within the composition. This is not set unless specifically requested via `withComponentIDs` API parameter. */
|
1290
|
+
_id?: string;
|
1291
|
+
/** @description Indicates this component instance should be sourced from a pattern library pattern. */
|
1292
|
+
_pattern?: string;
|
1293
|
+
_data?: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinitions"];
|
1294
|
+
/**
|
1295
|
+
* @deprecated
|
1296
|
+
* @description Data definitions coming from a pattern resolved for this component. Merged with _data during resolution.
|
1297
|
+
* Means nothing for PUTs; it will be ignored.
|
1298
|
+
*/
|
1299
|
+
_patternData?: {
|
1300
|
+
[key: string]: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinition"];
|
1301
|
+
};
|
1302
|
+
/**
|
1303
|
+
* @description Describes why the pattern could not be resolved, if a pattern could not be resolved. For PUTs, this is allowed but ignored.
|
1304
|
+
* CYCLIC: A cyclic pattern graph was detected, which could not be resolved because it would cause an infinite loop.
|
1305
|
+
* NOTFOUND: The pattern ID referenced could not be found. It may have been deleted, or not be published yet.
|
1306
|
+
* Means nothing for PUTs; it will be ignored.
|
1307
|
+
*
|
1308
|
+
* @enum {string}
|
1309
|
+
*/
|
1310
|
+
_patternError?: "NOTFOUND" | "CYCLIC";
|
1311
|
+
};
|
1312
|
+
/** @description Defines the shape of the root component in a composition */
|
1313
|
+
RootComponentInstance: {
|
1314
|
+
/** @description Type of the component instance (public_id of its definition) */
|
1315
|
+
type: string;
|
1316
|
+
/** @description Component parameter values for the component instance */
|
1317
|
+
parameters?: {
|
1318
|
+
[key: string]: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameter"];
|
1319
|
+
};
|
1320
|
+
/** @description Public ID of alternate visual appearance for this component, if any selected */
|
1321
|
+
variant?: string;
|
1322
|
+
/** @description Slots containing any child components */
|
1323
|
+
slots?: {
|
1324
|
+
[key: string]: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"][];
|
1325
|
+
};
|
1326
|
+
/** @description The public UUID of the composition. */
|
1327
|
+
_id: string;
|
1328
|
+
/** @description Slug pattern of this component. */
|
1329
|
+
_slug?: string | null;
|
1330
|
+
/** @description Friendly name of this component. */
|
1331
|
+
_name: string;
|
1332
|
+
_data?: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinitions"];
|
1333
|
+
};
|
1334
|
+
/**
|
1335
|
+
* @deprecated
|
1336
|
+
* @description Basic information about an integration data connector (i.e. "Master environment of the stable space", "Yelp API", "Sanity dev dataset"). This data is provided to list responses.
|
1337
|
+
*/
|
1338
|
+
DataConnectionInfo: {
|
1339
|
+
/** @description Public ID of the data connector */
|
1340
|
+
id: string;
|
1341
|
+
/** @description Display name of the data connector */
|
1342
|
+
displayName: string;
|
1343
|
+
/** @description The type of data connector this connects to (e.g. 'cms-items', provided by an intalled integration) */
|
1344
|
+
connectorType: string;
|
1345
|
+
/** @description Base resource URL of the data connector. No trailing slash. */
|
1346
|
+
baseUrl: string;
|
1347
|
+
};
|
1348
|
+
/**
|
1349
|
+
* @deprecated
|
1350
|
+
* @description An instance of an integration data connector (i.e. "Master environment of the stable space", "Yelp API", "Sanity dev dataset"). These are created in the UI and shared across a whole project.
|
1351
|
+
*/
|
1352
|
+
DataConnection: {
|
1353
|
+
/** @description Public ID of the data connection */
|
1354
|
+
id: string;
|
1355
|
+
/** @description Display name of the data connection */
|
1356
|
+
displayName: string;
|
1357
|
+
/** @description The type of data connector this connects to (e.g. 'cms-items', provided by an intalled integration) */
|
1358
|
+
connectorType: string;
|
1359
|
+
/** @description Base resource URL of the data connection. No trailing slash. */
|
1360
|
+
baseUrl: string;
|
1361
|
+
/** @description HTTP headers to pass with requests to the data connection */
|
1362
|
+
headers?: {
|
1363
|
+
[key: string]: string;
|
1364
|
+
};
|
1365
|
+
/** @description Query String parameters to pass with requests to the data connection */
|
1366
|
+
parameters?: {
|
1367
|
+
[key: string]: string;
|
1368
|
+
};
|
1369
|
+
/** @description Variables needed to make calls to the data connection */
|
1370
|
+
variables?: {
|
1371
|
+
[key: string]: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataVariable"];
|
1372
|
+
};
|
1373
|
+
/** @description Custom configuration specific to the data connection being defined */
|
1374
|
+
custom?: {
|
1375
|
+
[key: string]: unknown;
|
1376
|
+
};
|
1377
|
+
};
|
1378
|
+
/**
|
1379
|
+
* @deprecated
|
1380
|
+
* @description A specific type of data that a Data Connection can provide (i.e. "Recipe", "Recipes List by Tag", "Yelp Reviews of My Restaurant"). These are created in the UI and shared a whole project.
|
1381
|
+
*/
|
1382
|
+
DataType: {
|
1383
|
+
/** @description Public ID of the data type */
|
1384
|
+
id: string;
|
1385
|
+
/** @description Display name of the data type */
|
1386
|
+
displayName: string;
|
1387
|
+
/** @description Public ID of the associated data connection */
|
1388
|
+
connectionId: string;
|
1389
|
+
/**
|
1390
|
+
* @description A connector-specific archetype for this data type; used to select UI as well as perform any
|
1391
|
+
* necessary post-processing on the response. e.g. 'cms-entry', 'cms-query'. Can be undefined if
|
1392
|
+
* no special UI or processing is required.
|
1393
|
+
*/
|
1394
|
+
archetype?: string;
|
1395
|
+
allowedOnComponents?: string[];
|
1396
|
+
/** @description Resource path, appended to the data connection's baseUrl (e.g. baseUrl = https://base.url, path = /v1/endpoint -> final URL https://base.url/v1/endpoint). Must have leading slash. */
|
1397
|
+
path: string;
|
1398
|
+
/** @description HTTP headers to pass with requests to the data type. Merged with headers from the data connection, overriding identical keys. */
|
1399
|
+
headers?: {
|
1400
|
+
[key: string]: string;
|
1401
|
+
};
|
1402
|
+
/** @description Query String parameters to pass with requests to the data type. Merged with parameters from the data connection, overriding identical keys. */
|
1403
|
+
parameters?: {
|
1404
|
+
[key: string]: string;
|
1405
|
+
};
|
1406
|
+
/** @description Body to pass with requests to the data type (ignored unless method is POST) */
|
1407
|
+
body?: string;
|
1408
|
+
/**
|
1409
|
+
* @description HTTP method to use with requests to the data type.
|
1410
|
+
* @default GET
|
1411
|
+
* @enum {string}
|
1412
|
+
*/
|
1413
|
+
method: "GET" | "POST" | "HEAD";
|
1414
|
+
/** @description Variables needed to make calls to the data type. Merged with variables from the data connection, overriding identical keys. */
|
1415
|
+
variables?: {
|
1416
|
+
[key: string]: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataVariable"];
|
1417
|
+
};
|
1418
|
+
/** @description Custom configuration specific to the data connection being defined */
|
1419
|
+
custom?: {
|
1420
|
+
[key: string]: unknown;
|
1421
|
+
};
|
1422
|
+
};
|
1423
|
+
/**
|
1424
|
+
* @deprecated
|
1425
|
+
* @description Defines the shape of a data variable on a Data Connector or Data Type
|
1426
|
+
*/
|
1427
|
+
DataVariable: {
|
1428
|
+
/** @description Display name of the data variable */
|
1429
|
+
displayName?: string;
|
1430
|
+
/**
|
1431
|
+
* @description Type of the data variable
|
1432
|
+
* @default text
|
1433
|
+
*/
|
1434
|
+
type: string;
|
1435
|
+
/** @description Default value of the data variable */
|
1436
|
+
default: string;
|
1437
|
+
/**
|
1438
|
+
* @description Where the variable value is set. Static = set to static value by the author. Dynamic = set to a dynamic value by a runtime API request from the frontend (default is used in the editor).
|
1439
|
+
* @enum {string}
|
1440
|
+
*/
|
1441
|
+
setBy: "static" | "dynamic";
|
1442
|
+
};
|
1443
|
+
/**
|
1444
|
+
* @deprecated
|
1445
|
+
* @description Data definitions attached to this component. The property name is the key of the data in the data document.
|
1446
|
+
* Note: data definitions are inherited from ancestors at runtime (and may be overridden by descendants that use the same key).
|
1447
|
+
*/
|
1448
|
+
CompositionDataDefinitions: {
|
1449
|
+
[key: string]: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinition"];
|
1450
|
+
};
|
1451
|
+
/**
|
1452
|
+
* @deprecated
|
1453
|
+
* @description Data definition attached to this component
|
1454
|
+
*/
|
1455
|
+
CompositionDataDefinition: {
|
1456
|
+
/** @description Public ID of the data type that provides this data */
|
1457
|
+
type: string;
|
1458
|
+
/** @description Whether this data is a pattern parameter that has to be overridden when a pattern is referenced on another composition. If this is not a pattern composition, this has no meaning and should not be used. If unspecified, the default is false. */
|
1459
|
+
isPatternParameter?: boolean;
|
1460
|
+
variables?: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataVariables"];
|
1461
|
+
};
|
1462
|
+
/**
|
1463
|
+
* @deprecated
|
1464
|
+
* @description Static variable values for this composition.
|
1465
|
+
*/
|
1466
|
+
CompositionDataVariables: {
|
1467
|
+
[key: string]: string;
|
1468
|
+
};
|
1469
|
+
};
|
1470
|
+
};
|
1471
|
+
operations: {};
|
1472
|
+
};
|
1473
|
+
}
|
1474
|
+
|
1475
|
+
declare type Components = components['schemas'];
|
1476
|
+
declare type SharedComponents = components$1['schemas'];
|
1477
|
+
declare type Api = paths$3['/api/v1/canvas'];
|
1478
|
+
/** Query parameter options for GET /api/v1/canvas */
|
1479
|
+
declare type CompositionGetParameters = Omit<Api['get']['parameters']['query'], 'type'> & {
|
1480
|
+
type?: string | string[];
|
1481
|
+
};
|
1482
|
+
declare type CompositionGetOrderBy = NonNullable<Api['get']['parameters']['query']['orderBy']>[0];
|
1483
|
+
/** The GET response from /api/v1/canvas when `component` or `slug` params are specified */
|
1484
|
+
declare type CompositionGetResponse = Components['CompositionApiResponse'];
|
1485
|
+
/** @deprecated - internal use, do not rely on this value */
|
1486
|
+
declare type CompositionUIStatus = NonNullable<Components['CompositionApiResponse']['uiStatus']>;
|
1487
|
+
/** The GET response from /api/v1/canvas when `component` or `slug` are not specified */
|
1488
|
+
declare type CompositionGetListResponse = Components['CompositionListResponse'];
|
1489
|
+
/** The PUT request body for /api/v1/canvas */
|
1490
|
+
declare type CompositionPutParameters = Api['put']['requestBody']['content']['application/json'];
|
1491
|
+
/** Shape of the DELETE request body for /api/v1/canvas */
|
1492
|
+
declare type CompositionDeleteParameters = Api['delete']['requestBody']['content']['application/json'];
|
1493
|
+
/** @deprecated use CompositionGetResponse */
|
1494
|
+
declare type CompositionAPIResponse = CompositionGetResponse;
|
1495
|
+
/** @deprecated use CompositionDeleteParameters */
|
1496
|
+
declare type CompositionAPIDeleteRequest = CompositionDeleteParameters;
|
1497
|
+
/** @deprecated use CompositionGetParameters */
|
1498
|
+
declare type CompositionListAPIResponse = CompositionGetListResponse;
|
1499
|
+
/** @deprecated use CompositionGetParameters */
|
1500
|
+
declare type CompositionAPIOptions = CompositionGetParameters;
|
1501
|
+
/** Defines an editable parameter on a component. */
|
1502
|
+
declare type ComponentParameter<TValue = unknown> = Omit<SharedComponents['ComponentParameter'], 'value'> & {
|
1503
|
+
/** The type of the parameter. Determines how it is displayed when editing, and tells the consumer how to process it. */
|
1504
|
+
value: TValue;
|
1505
|
+
};
|
1506
|
+
/** Defines a binding from a resource data value to a component parameter value. */
|
1507
|
+
declare type ComponentParameterBinding = SharedComponents['ComponentParameterBinding'];
|
1508
|
+
/** Variables defined for this composition. */
|
1509
|
+
declare type CompositionDataVariables = SharedComponents['CompositionDataVariables'];
|
1510
|
+
/** Defines the shape of a resource bound to a composition */
|
1511
|
+
declare type CompositionDataDefinitions = SharedComponents['CompositionDataDefinitions'];
|
1512
|
+
/** Defines the shape of a resource bound to a composition */
|
1513
|
+
declare type CompositionDataDefinition = SharedComponents['CompositionDataDefinition'];
|
1514
|
+
/** Defines the shape of a component instance served by the composition API. */
|
1515
|
+
declare type ComponentInstance = SharedComponents['ComponentInstance'] & {
|
1516
|
+
/** Data for the component instance, provided by a component enhancer. Never set in unenhanced data. */
|
1517
|
+
data?: Record<string, unknown>;
|
1518
|
+
};
|
1519
|
+
/** Defines the shape of the root component in a composition */
|
1520
|
+
declare type RootComponentInstance = SharedComponents['RootComponentInstance'];
|
1521
|
+
/** Defines single structure to keep all canvas models (used in CLI commands and Starter content generations) */
|
1522
|
+
declare type CanvasDefinitions = {
|
1523
|
+
components?: Array<ComponentDefinition>;
|
1524
|
+
compositions?: Array<CompositionGetResponse>;
|
1525
|
+
dataTypes?: Array<DataType>;
|
1526
|
+
};
|
1527
|
+
|
1528
|
+
/**
|
1529
|
+
* This file was auto-generated by openapi-typescript.
|
1530
|
+
* Do not make direct changes to the file.
|
1531
|
+
*/
|
1532
|
+
interface paths$2 {
|
1533
|
+
"/api/v1/data-types": {
|
1534
|
+
get: {
|
1535
|
+
parameters: {
|
1536
|
+
query: {
|
1537
|
+
projectId: string;
|
1538
|
+
};
|
1539
|
+
};
|
1540
|
+
responses: {
|
1541
|
+
/** OK */
|
1542
|
+
200: {
|
1543
|
+
content: {
|
1544
|
+
"application/json": {
|
1545
|
+
results: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataType"][];
|
1546
|
+
};
|
1547
|
+
};
|
1548
|
+
};
|
1549
|
+
400: external$2["swagger.yml"]["components"]["responses"]["BadRequestError"];
|
1550
|
+
401: external$2["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
|
1551
|
+
403: external$2["swagger.yml"]["components"]["responses"]["ForbiddenError"];
|
1552
|
+
429: external$2["swagger.yml"]["components"]["responses"]["RateLimitError"];
|
1553
|
+
500: external$2["swagger.yml"]["components"]["responses"]["InternalServerError"];
|
1554
|
+
};
|
1555
|
+
};
|
1556
|
+
put: {
|
1557
|
+
responses: {
|
1558
|
+
/** OK */
|
1559
|
+
204: never;
|
1560
|
+
400: external$2["swagger.yml"]["components"]["responses"]["BadRequestError"];
|
1561
|
+
401: external$2["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
|
1562
|
+
403: external$2["swagger.yml"]["components"]["responses"]["ForbiddenError"];
|
1563
|
+
429: external$2["swagger.yml"]["components"]["responses"]["RateLimitError"];
|
1564
|
+
500: external$2["swagger.yml"]["components"]["responses"]["InternalServerError"];
|
1565
|
+
};
|
1566
|
+
requestBody: {
|
1567
|
+
content: {
|
1568
|
+
"application/json": {
|
1569
|
+
data: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataType"];
|
1570
|
+
/** Format: uuid */
|
1571
|
+
projectId: string;
|
1572
|
+
};
|
1573
|
+
};
|
1574
|
+
};
|
1575
|
+
};
|
1576
|
+
delete: {
|
1577
|
+
responses: {
|
1578
|
+
/** OK */
|
1579
|
+
204: never;
|
1580
|
+
400: external$2["swagger.yml"]["components"]["responses"]["BadRequestError"];
|
1581
|
+
401: external$2["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
|
1582
|
+
403: external$2["swagger.yml"]["components"]["responses"]["ForbiddenError"];
|
1583
|
+
429: external$2["swagger.yml"]["components"]["responses"]["RateLimitError"];
|
1584
|
+
500: external$2["swagger.yml"]["components"]["responses"]["InternalServerError"];
|
1585
|
+
};
|
1586
|
+
requestBody: {
|
1587
|
+
content: {
|
1588
|
+
"application/json": {
|
1589
|
+
typeId: string;
|
1590
|
+
/** Format: uuid */
|
1591
|
+
projectId: string;
|
1592
|
+
};
|
1593
|
+
};
|
1594
|
+
};
|
1595
|
+
};
|
1596
|
+
};
|
1597
|
+
}
|
1598
|
+
interface external$2 {
|
1599
|
+
"swagger.yml": {
|
1600
|
+
paths: {};
|
1601
|
+
components: {
|
1602
|
+
schemas: {
|
1603
|
+
Error: {
|
1604
|
+
/** @description Error message(s) that occurred while processing the request */
|
1605
|
+
errorMessage?: string[] | string;
|
1606
|
+
};
|
1607
|
+
};
|
1608
|
+
responses: {
|
1609
|
+
/** Request input validation failed */
|
1610
|
+
BadRequestError: {
|
1611
|
+
content: {
|
1612
|
+
"application/json": external$2["swagger.yml"]["components"]["schemas"]["Error"];
|
1613
|
+
};
|
1614
|
+
};
|
1615
|
+
/** API key or token was not valid */
|
1616
|
+
UnauthorizedError: {
|
1617
|
+
content: {
|
1618
|
+
"application/json": external$2["swagger.yml"]["components"]["schemas"]["Error"];
|
1619
|
+
};
|
1620
|
+
};
|
1621
|
+
/** Permission was denied */
|
1622
|
+
ForbiddenError: {
|
1623
|
+
content: {
|
1624
|
+
"application/json": external$2["swagger.yml"]["components"]["schemas"]["Error"];
|
1625
|
+
};
|
1626
|
+
};
|
1627
|
+
/** Resource not found */
|
1628
|
+
NotFoundError: {
|
1629
|
+
content: {
|
1630
|
+
"application/json": external$2["swagger.yml"]["components"]["schemas"]["Error"];
|
1631
|
+
};
|
1632
|
+
};
|
1633
|
+
/** Too many requests in allowed time period */
|
1634
|
+
RateLimitError: unknown;
|
1635
|
+
/** Execution error occurred */
|
1636
|
+
InternalServerError: unknown;
|
1637
|
+
};
|
1638
|
+
};
|
1639
|
+
operations: {};
|
1640
|
+
};
|
1641
|
+
"uniform-canvas-types.swagger.yml": {
|
1642
|
+
paths: {};
|
1643
|
+
components: {
|
1644
|
+
schemas: {
|
1645
|
+
/** @description Public ID (used in code). Do not change after creation. */
|
1646
|
+
PublicIdProperty: string;
|
1647
|
+
/** @description The definition of a component parameter */
|
1648
|
+
ComponentDefinitionParameter: {
|
1649
|
+
id: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
|
1650
|
+
/** @description Friendly name of the parameter */
|
1651
|
+
name: string;
|
1652
|
+
/** @description Appears next to the parameter in the Composition editor */
|
1653
|
+
helpText?: string;
|
1654
|
+
/** @description Type name of the parameter (provided by a Uniform integration) */
|
1655
|
+
type: string;
|
1656
|
+
/** @description The configuration object for the type (type-specific) */
|
1657
|
+
typeConfig?: unknown;
|
1658
|
+
};
|
1659
|
+
/** @description The definition of a named component slot that can contain other components */
|
1660
|
+
ComponentDefinitionSlot: {
|
1661
|
+
id: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
|
1662
|
+
/** @description Friendly name of the slot */
|
1663
|
+
name: string;
|
1664
|
+
/** @description A list of component definition public IDs that are allowed in this named slot */
|
1665
|
+
allowedComponents: string[];
|
1666
|
+
/**
|
1667
|
+
* @description Whether this slot inherits its allowed components from the parent slot it lives in. If true, allowedComponents is irrelevant.
|
1668
|
+
* @default false
|
1669
|
+
*/
|
1670
|
+
inheritAllowedComponents: boolean;
|
1671
|
+
/** @description Minimum valid number of components in this slot */
|
1672
|
+
minComponents?: number;
|
1673
|
+
/** @description Maximum valid number of components in this slot */
|
1674
|
+
maxComponents?: number;
|
1675
|
+
};
|
1676
|
+
/** @description The definition of a composition's slug settings */
|
1677
|
+
ComponentDefinitionSlugSettings: {
|
1678
|
+
/**
|
1679
|
+
* @description Whether the slug is required
|
1680
|
+
* no: slug is optional
|
1681
|
+
* yes: slug is required
|
1682
|
+
* disabled: slug is disabled and will not be shown in the editor
|
1683
|
+
*
|
1684
|
+
* @default no
|
1685
|
+
* @enum {string}
|
1686
|
+
*/
|
1687
|
+
required?: "no" | "yes" | "disabled";
|
1688
|
+
/**
|
1689
|
+
* @description Slug uniqueness configuration.
|
1690
|
+
* no = no unique constraint
|
1691
|
+
* local = must be unique within this component type
|
1692
|
+
* global = must be unique across all component types
|
1693
|
+
*
|
1694
|
+
* @enum {string}
|
1695
|
+
*/
|
1696
|
+
unique?: "no" | "local" | "global";
|
1697
|
+
/** @description Regular expression slugs must match */
|
1698
|
+
regularExpression?: string;
|
1699
|
+
/**
|
1700
|
+
* @description Custom error message when regular expression validation fails.
|
1701
|
+
* Has no effect if `regularExpression` is not set.
|
1702
|
+
*/
|
1703
|
+
regularExpressionMessage?: string;
|
1704
|
+
};
|
1705
|
+
/** @description The definition of a component variant */
|
1706
|
+
ComponentDefinitionVariant: {
|
1707
|
+
id: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
|
1708
|
+
/** @description Friendly name of the variant */
|
1709
|
+
name: string;
|
1710
|
+
};
|
1711
|
+
/** @description Permission set for a component defintion */
|
1712
|
+
ComponentDefinitionPermission: {
|
1713
|
+
roleId: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
|
1714
|
+
/**
|
1715
|
+
* @description Permission type for this permission ComponentDefinition:
|
1716
|
+
* read | write | create | delete
|
1717
|
+
*
|
1718
|
+
* @enum {string}
|
1719
|
+
*/
|
1720
|
+
permission: "read" | "write" | "create" | "delete";
|
1721
|
+
/** @description State of the component that this permission applies to */
|
1722
|
+
state: number;
|
1723
|
+
};
|
1724
|
+
/** @description Defines a component type that can live on a Composition */
|
1725
|
+
ComponentDefinition: {
|
1726
|
+
id: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
|
1727
|
+
/** @description Friendly name of the component definition */
|
1728
|
+
name: string;
|
1729
|
+
/**
|
1730
|
+
* @description Icon name or URL for the component definition (e.g. 'screen' or 'https://s3/my-component.jpg')
|
1731
|
+
* @default screen
|
1732
|
+
*/
|
1733
|
+
icon?: string;
|
1734
|
+
/**
|
1735
|
+
* @description The public ID of the parameter whose value should be used to create a display title for this component in the UI.
|
1736
|
+
* The parameter type must support being used as a title parameter for this to work.
|
1737
|
+
*/
|
1738
|
+
titleParameter?: string | null;
|
1739
|
+
/**
|
1740
|
+
* @description Whether this component type can be the root of a composition. If false, this component is only used within slots on other components.
|
1741
|
+
* @default false
|
1742
|
+
*/
|
1743
|
+
canBeComposition?: boolean;
|
1744
|
+
/** @description The parameters for this component. Parameters are key-value pairs that can be anything from text values to links to CMS entries. */
|
1745
|
+
parameters?: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionParameter"][];
|
1746
|
+
/**
|
1747
|
+
* @description if this component uses team permissions or custom permissions
|
1748
|
+
* @default true
|
1749
|
+
*/
|
1750
|
+
useTeamPermissions?: boolean;
|
1751
|
+
/** @description Custom role permissions for this component definition */
|
1752
|
+
permissions?: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionPermission"][];
|
1753
|
+
/** @description The named slots for this component; placement areas where arrays of other components can be added. */
|
1754
|
+
slots?: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionSlot"][];
|
1755
|
+
slugSettings?: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionSlugSettings"];
|
1756
|
+
/** @description Default component instance value */
|
1757
|
+
defaults?: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"] | null;
|
1758
|
+
/** @description Named variants for this component; enables creation of visual variants that use the same parameter data */
|
1759
|
+
variants?: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionVariant"][];
|
1760
|
+
/** @description Created date string for this definition (ignored for writes) */
|
1761
|
+
created?: string;
|
1762
|
+
/** @description Last modified date string for this definition (ignored for writes) */
|
1763
|
+
updated?: string;
|
1764
|
+
};
|
1765
|
+
/** @description Defines an editable parameter on a component. */
|
1766
|
+
ComponentParameter: {
|
1767
|
+
/** @description The value of the parameter. Any JSON-serializable value is acceptable. */
|
1768
|
+
value: unknown;
|
1769
|
+
/** @description The type of the parameter. Determines how it is displayed when editing, and tells the consumer how to process it. */
|
1770
|
+
type: string;
|
1771
|
+
binding?: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameterBinding"];
|
1772
|
+
};
|
1773
|
+
/**
|
1774
|
+
* @deprecated
|
1775
|
+
* @description Defines a binding from a resource data value to a component parameter value. Do not use.
|
1776
|
+
*/
|
1777
|
+
ComponentParameterBinding: {
|
1778
|
+
/** @description A JSON Pointer expression that defines the binding directly to the parameter value */
|
1779
|
+
pointer: string;
|
1780
|
+
/**
|
1781
|
+
* @description The syntax of the binding (currently always 'jptr')
|
1782
|
+
* @enum {string}
|
1783
|
+
*/
|
1784
|
+
syntax: "jptr";
|
1785
|
+
/**
|
1786
|
+
* @description Whether the binding should cause an error if it cannot be resolved.
|
1787
|
+
* If true, and the binding cannot be resolved, an error will be returned by the binding process.
|
1788
|
+
* If false, and the binding cannot be resolved, the parameter will be removed from the bound composition.
|
1789
|
+
*
|
1790
|
+
* @default false
|
1791
|
+
*/
|
1792
|
+
required?: boolean;
|
1793
|
+
};
|
1794
|
+
/** @description Defines the shape of a component instance served by the composition API. */
|
1795
|
+
ComponentInstance: {
|
1796
|
+
/** @description Type of the component instance (public_id of its definition) */
|
1797
|
+
type: string;
|
1798
|
+
/** @description Component parameter values for the component instance */
|
1799
|
+
parameters?: {
|
1800
|
+
[key: string]: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameter"];
|
1801
|
+
};
|
1802
|
+
/** @description Public ID of alternate visual appearance for this component, if any selected */
|
1803
|
+
variant?: string;
|
1804
|
+
/** @description Slots containing any child components */
|
1805
|
+
slots?: {
|
1806
|
+
[key: string]: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"][];
|
1807
|
+
};
|
1808
|
+
/** @description Unique identifier of the component within the composition. This is not set unless specifically requested via `withComponentIDs` API parameter. */
|
1809
|
+
_id?: string;
|
1810
|
+
/** @description Indicates this component instance should be sourced from a pattern library pattern. */
|
1811
|
+
_pattern?: string;
|
1812
|
+
_data?: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinitions"];
|
1813
|
+
/**
|
1814
|
+
* @deprecated
|
1815
|
+
* @description Data definitions coming from a pattern resolved for this component. Merged with _data during resolution.
|
1816
|
+
* Means nothing for PUTs; it will be ignored.
|
1817
|
+
*/
|
1818
|
+
_patternData?: {
|
1819
|
+
[key: string]: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinition"];
|
1820
|
+
};
|
1821
|
+
/**
|
1822
|
+
* @description Describes why the pattern could not be resolved, if a pattern could not be resolved. For PUTs, this is allowed but ignored.
|
1823
|
+
* CYCLIC: A cyclic pattern graph was detected, which could not be resolved because it would cause an infinite loop.
|
1824
|
+
* NOTFOUND: The pattern ID referenced could not be found. It may have been deleted, or not be published yet.
|
1825
|
+
* Means nothing for PUTs; it will be ignored.
|
1826
|
+
*
|
1827
|
+
* @enum {string}
|
1828
|
+
*/
|
1829
|
+
_patternError?: "NOTFOUND" | "CYCLIC";
|
1830
|
+
};
|
1831
|
+
/** @description Defines the shape of the root component in a composition */
|
1832
|
+
RootComponentInstance: {
|
1833
|
+
/** @description Type of the component instance (public_id of its definition) */
|
1834
|
+
type: string;
|
1835
|
+
/** @description Component parameter values for the component instance */
|
1836
|
+
parameters?: {
|
1837
|
+
[key: string]: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameter"];
|
1838
|
+
};
|
1839
|
+
/** @description Public ID of alternate visual appearance for this component, if any selected */
|
1840
|
+
variant?: string;
|
1841
|
+
/** @description Slots containing any child components */
|
1842
|
+
slots?: {
|
1843
|
+
[key: string]: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"][];
|
1844
|
+
};
|
1845
|
+
/** @description The public UUID of the composition. */
|
1846
|
+
_id: string;
|
1847
|
+
/** @description Slug pattern of this component. */
|
1848
|
+
_slug?: string | null;
|
1849
|
+
/** @description Friendly name of this component. */
|
1850
|
+
_name: string;
|
1851
|
+
_data?: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinitions"];
|
1852
|
+
};
|
1853
|
+
/**
|
1854
|
+
* @deprecated
|
1855
|
+
* @description Basic information about an integration data connector (i.e. "Master environment of the stable space", "Yelp API", "Sanity dev dataset"). This data is provided to list responses.
|
1856
|
+
*/
|
1857
|
+
DataConnectionInfo: {
|
1858
|
+
/** @description Public ID of the data connector */
|
1859
|
+
id: string;
|
1860
|
+
/** @description Display name of the data connector */
|
1861
|
+
displayName: string;
|
1862
|
+
/** @description The type of data connector this connects to (e.g. 'cms-items', provided by an intalled integration) */
|
1863
|
+
connectorType: string;
|
1864
|
+
/** @description Base resource URL of the data connector. No trailing slash. */
|
1865
|
+
baseUrl: string;
|
1866
|
+
};
|
1867
|
+
/**
|
1868
|
+
* @deprecated
|
1869
|
+
* @description An instance of an integration data connector (i.e. "Master environment of the stable space", "Yelp API", "Sanity dev dataset"). These are created in the UI and shared across a whole project.
|
1870
|
+
*/
|
1871
|
+
DataConnection: {
|
1872
|
+
/** @description Public ID of the data connection */
|
1873
|
+
id: string;
|
1874
|
+
/** @description Display name of the data connection */
|
1875
|
+
displayName: string;
|
1876
|
+
/** @description The type of data connector this connects to (e.g. 'cms-items', provided by an intalled integration) */
|
1877
|
+
connectorType: string;
|
1878
|
+
/** @description Base resource URL of the data connection. No trailing slash. */
|
1879
|
+
baseUrl: string;
|
1880
|
+
/** @description HTTP headers to pass with requests to the data connection */
|
1881
|
+
headers?: {
|
1882
|
+
[key: string]: string;
|
1883
|
+
};
|
1884
|
+
/** @description Query String parameters to pass with requests to the data connection */
|
1885
|
+
parameters?: {
|
1886
|
+
[key: string]: string;
|
1887
|
+
};
|
1888
|
+
/** @description Variables needed to make calls to the data connection */
|
1889
|
+
variables?: {
|
1890
|
+
[key: string]: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataVariable"];
|
1891
|
+
};
|
1892
|
+
/** @description Custom configuration specific to the data connection being defined */
|
1893
|
+
custom?: {
|
1894
|
+
[key: string]: unknown;
|
1895
|
+
};
|
1896
|
+
};
|
1897
|
+
/**
|
1898
|
+
* @deprecated
|
1899
|
+
* @description A specific type of data that a Data Connection can provide (i.e. "Recipe", "Recipes List by Tag", "Yelp Reviews of My Restaurant"). These are created in the UI and shared a whole project.
|
1900
|
+
*/
|
1901
|
+
DataType: {
|
1902
|
+
/** @description Public ID of the data type */
|
1903
|
+
id: string;
|
1904
|
+
/** @description Display name of the data type */
|
1905
|
+
displayName: string;
|
1906
|
+
/** @description Public ID of the associated data connection */
|
1907
|
+
connectionId: string;
|
1908
|
+
/**
|
1909
|
+
* @description A connector-specific archetype for this data type; used to select UI as well as perform any
|
1910
|
+
* necessary post-processing on the response. e.g. 'cms-entry', 'cms-query'. Can be undefined if
|
1911
|
+
* no special UI or processing is required.
|
1912
|
+
*/
|
1913
|
+
archetype?: string;
|
1914
|
+
allowedOnComponents?: string[];
|
1915
|
+
/** @description Resource path, appended to the data connection's baseUrl (e.g. baseUrl = https://base.url, path = /v1/endpoint -> final URL https://base.url/v1/endpoint). Must have leading slash. */
|
1916
|
+
path: string;
|
1917
|
+
/** @description HTTP headers to pass with requests to the data type. Merged with headers from the data connection, overriding identical keys. */
|
1918
|
+
headers?: {
|
1919
|
+
[key: string]: string;
|
1920
|
+
};
|
1921
|
+
/** @description Query String parameters to pass with requests to the data type. Merged with parameters from the data connection, overriding identical keys. */
|
1922
|
+
parameters?: {
|
1923
|
+
[key: string]: string;
|
1924
|
+
};
|
1925
|
+
/** @description Body to pass with requests to the data type (ignored unless method is POST) */
|
1926
|
+
body?: string;
|
1927
|
+
/**
|
1928
|
+
* @description HTTP method to use with requests to the data type.
|
1929
|
+
* @default GET
|
1930
|
+
* @enum {string}
|
1931
|
+
*/
|
1932
|
+
method: "GET" | "POST" | "HEAD";
|
1933
|
+
/** @description Variables needed to make calls to the data type. Merged with variables from the data connection, overriding identical keys. */
|
1934
|
+
variables?: {
|
1935
|
+
[key: string]: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataVariable"];
|
1936
|
+
};
|
1937
|
+
/** @description Custom configuration specific to the data connection being defined */
|
1938
|
+
custom?: {
|
1939
|
+
[key: string]: unknown;
|
1940
|
+
};
|
1941
|
+
};
|
1942
|
+
/**
|
1943
|
+
* @deprecated
|
1944
|
+
* @description Defines the shape of a data variable on a Data Connector or Data Type
|
1945
|
+
*/
|
1946
|
+
DataVariable: {
|
1947
|
+
/** @description Display name of the data variable */
|
1948
|
+
displayName?: string;
|
1949
|
+
/**
|
1950
|
+
* @description Type of the data variable
|
1951
|
+
* @default text
|
1952
|
+
*/
|
1953
|
+
type: string;
|
1954
|
+
/** @description Default value of the data variable */
|
1955
|
+
default: string;
|
1956
|
+
/**
|
1957
|
+
* @description Where the variable value is set. Static = set to static value by the author. Dynamic = set to a dynamic value by a runtime API request from the frontend (default is used in the editor).
|
1958
|
+
* @enum {string}
|
1959
|
+
*/
|
1960
|
+
setBy: "static" | "dynamic";
|
1961
|
+
};
|
1962
|
+
/**
|
1963
|
+
* @deprecated
|
1964
|
+
* @description Data definitions attached to this component. The property name is the key of the data in the data document.
|
1965
|
+
* Note: data definitions are inherited from ancestors at runtime (and may be overridden by descendants that use the same key).
|
1966
|
+
*/
|
1967
|
+
CompositionDataDefinitions: {
|
1968
|
+
[key: string]: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinition"];
|
1969
|
+
};
|
1970
|
+
/**
|
1971
|
+
* @deprecated
|
1972
|
+
* @description Data definition attached to this component
|
1973
|
+
*/
|
1974
|
+
CompositionDataDefinition: {
|
1975
|
+
/** @description Public ID of the data type that provides this data */
|
1976
|
+
type: string;
|
1977
|
+
/** @description Whether this data is a pattern parameter that has to be overridden when a pattern is referenced on another composition. If this is not a pattern composition, this has no meaning and should not be used. If unspecified, the default is false. */
|
1978
|
+
isPatternParameter?: boolean;
|
1979
|
+
variables?: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataVariables"];
|
1980
|
+
};
|
1981
|
+
/**
|
1982
|
+
* @deprecated
|
1983
|
+
* @description Static variable values for this composition.
|
1984
|
+
*/
|
1985
|
+
CompositionDataVariables: {
|
1986
|
+
[key: string]: string;
|
1987
|
+
};
|
1988
|
+
};
|
1989
|
+
};
|
1990
|
+
operations: {};
|
1991
|
+
};
|
1992
|
+
}
|
1993
|
+
|
1994
|
+
/**
|
1995
|
+
* This file was auto-generated by openapi-typescript.
|
1996
|
+
* Do not make direct changes to the file.
|
1997
|
+
*/
|
1998
|
+
interface paths$1 {
|
1999
|
+
"/api/v1/data-connection": {
|
2000
|
+
get: {
|
2001
|
+
parameters: {
|
2002
|
+
query: {
|
2003
|
+
dataConnectionId: string;
|
2004
|
+
projectId: string;
|
2005
|
+
};
|
2006
|
+
};
|
2007
|
+
responses: {
|
2008
|
+
/** OK */
|
2009
|
+
200: {
|
2010
|
+
content: {
|
2011
|
+
"application/json": {
|
2012
|
+
result: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataConnection"];
|
2013
|
+
};
|
2014
|
+
};
|
2015
|
+
};
|
2016
|
+
400: external$1["swagger.yml"]["components"]["responses"]["BadRequestError"];
|
2017
|
+
401: external$1["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
|
2018
|
+
403: external$1["swagger.yml"]["components"]["responses"]["ForbiddenError"];
|
2019
|
+
429: external$1["swagger.yml"]["components"]["responses"]["RateLimitError"];
|
2020
|
+
500: external$1["swagger.yml"]["components"]["responses"]["InternalServerError"];
|
2021
|
+
};
|
2022
|
+
};
|
2023
|
+
put: {
|
2024
|
+
responses: {
|
2025
|
+
/** OK */
|
2026
|
+
204: never;
|
2027
|
+
400: external$1["swagger.yml"]["components"]["responses"]["BadRequestError"];
|
2028
|
+
401: external$1["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
|
2029
|
+
403: external$1["swagger.yml"]["components"]["responses"]["ForbiddenError"];
|
2030
|
+
429: external$1["swagger.yml"]["components"]["responses"]["RateLimitError"];
|
2031
|
+
500: external$1["swagger.yml"]["components"]["responses"]["InternalServerError"];
|
2032
|
+
};
|
2033
|
+
requestBody: {
|
2034
|
+
content: {
|
2035
|
+
"application/json": {
|
2036
|
+
data: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataConnection"];
|
2037
|
+
/** Format: uuid */
|
2038
|
+
projectId: string;
|
2039
|
+
/** Format: uuid */
|
2040
|
+
integrationId: string;
|
2041
|
+
};
|
2042
|
+
};
|
2043
|
+
};
|
2044
|
+
};
|
2045
|
+
delete: {
|
2046
|
+
responses: {
|
2047
|
+
/** OK */
|
2048
|
+
204: never;
|
2049
|
+
400: external$1["swagger.yml"]["components"]["responses"]["BadRequestError"];
|
2050
|
+
401: external$1["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
|
2051
|
+
403: external$1["swagger.yml"]["components"]["responses"]["ForbiddenError"];
|
2052
|
+
429: external$1["swagger.yml"]["components"]["responses"]["RateLimitError"];
|
2053
|
+
500: external$1["swagger.yml"]["components"]["responses"]["InternalServerError"];
|
2054
|
+
};
|
2055
|
+
requestBody: {
|
2056
|
+
content: {
|
2057
|
+
"application/json": {
|
2058
|
+
connectionId: string;
|
2059
|
+
/** Format: uuid */
|
2060
|
+
projectId: string;
|
2061
|
+
};
|
2062
|
+
};
|
2063
|
+
};
|
2064
|
+
};
|
2065
|
+
};
|
2066
|
+
}
|
2067
|
+
interface external$1 {
|
2068
|
+
"swagger.yml": {
|
2069
|
+
paths: {};
|
2070
|
+
components: {
|
2071
|
+
schemas: {
|
2072
|
+
Error: {
|
2073
|
+
/** @description Error message(s) that occurred while processing the request */
|
2074
|
+
errorMessage?: string[] | string;
|
2075
|
+
};
|
2076
|
+
};
|
2077
|
+
responses: {
|
2078
|
+
/** Request input validation failed */
|
2079
|
+
BadRequestError: {
|
2080
|
+
content: {
|
2081
|
+
"application/json": external$1["swagger.yml"]["components"]["schemas"]["Error"];
|
2082
|
+
};
|
2083
|
+
};
|
2084
|
+
/** API key or token was not valid */
|
2085
|
+
UnauthorizedError: {
|
2086
|
+
content: {
|
2087
|
+
"application/json": external$1["swagger.yml"]["components"]["schemas"]["Error"];
|
2088
|
+
};
|
2089
|
+
};
|
2090
|
+
/** Permission was denied */
|
2091
|
+
ForbiddenError: {
|
2092
|
+
content: {
|
2093
|
+
"application/json": external$1["swagger.yml"]["components"]["schemas"]["Error"];
|
2094
|
+
};
|
2095
|
+
};
|
2096
|
+
/** Resource not found */
|
2097
|
+
NotFoundError: {
|
2098
|
+
content: {
|
2099
|
+
"application/json": external$1["swagger.yml"]["components"]["schemas"]["Error"];
|
2100
|
+
};
|
2101
|
+
};
|
2102
|
+
/** Too many requests in allowed time period */
|
2103
|
+
RateLimitError: unknown;
|
2104
|
+
/** Execution error occurred */
|
2105
|
+
InternalServerError: unknown;
|
2106
|
+
};
|
2107
|
+
};
|
2108
|
+
operations: {};
|
2109
|
+
};
|
2110
|
+
"uniform-canvas-types.swagger.yml": {
|
2111
|
+
paths: {};
|
2112
|
+
components: {
|
2113
|
+
schemas: {
|
2114
|
+
/** @description Public ID (used in code). Do not change after creation. */
|
2115
|
+
PublicIdProperty: string;
|
2116
|
+
/** @description The definition of a component parameter */
|
2117
|
+
ComponentDefinitionParameter: {
|
2118
|
+
id: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
|
2119
|
+
/** @description Friendly name of the parameter */
|
2120
|
+
name: string;
|
2121
|
+
/** @description Appears next to the parameter in the Composition editor */
|
2122
|
+
helpText?: string;
|
2123
|
+
/** @description Type name of the parameter (provided by a Uniform integration) */
|
2124
|
+
type: string;
|
2125
|
+
/** @description The configuration object for the type (type-specific) */
|
2126
|
+
typeConfig?: unknown;
|
2127
|
+
};
|
2128
|
+
/** @description The definition of a named component slot that can contain other components */
|
2129
|
+
ComponentDefinitionSlot: {
|
2130
|
+
id: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
|
2131
|
+
/** @description Friendly name of the slot */
|
2132
|
+
name: string;
|
2133
|
+
/** @description A list of component definition public IDs that are allowed in this named slot */
|
2134
|
+
allowedComponents: string[];
|
2135
|
+
/**
|
2136
|
+
* @description Whether this slot inherits its allowed components from the parent slot it lives in. If true, allowedComponents is irrelevant.
|
2137
|
+
* @default false
|
2138
|
+
*/
|
2139
|
+
inheritAllowedComponents: boolean;
|
2140
|
+
/** @description Minimum valid number of components in this slot */
|
2141
|
+
minComponents?: number;
|
2142
|
+
/** @description Maximum valid number of components in this slot */
|
2143
|
+
maxComponents?: number;
|
2144
|
+
};
|
2145
|
+
/** @description The definition of a composition's slug settings */
|
2146
|
+
ComponentDefinitionSlugSettings: {
|
2147
|
+
/**
|
2148
|
+
* @description Whether the slug is required
|
2149
|
+
* no: slug is optional
|
2150
|
+
* yes: slug is required
|
2151
|
+
* disabled: slug is disabled and will not be shown in the editor
|
2152
|
+
*
|
2153
|
+
* @default no
|
2154
|
+
* @enum {string}
|
2155
|
+
*/
|
2156
|
+
required?: "no" | "yes" | "disabled";
|
2157
|
+
/**
|
2158
|
+
* @description Slug uniqueness configuration.
|
2159
|
+
* no = no unique constraint
|
2160
|
+
* local = must be unique within this component type
|
2161
|
+
* global = must be unique across all component types
|
2162
|
+
*
|
2163
|
+
* @enum {string}
|
2164
|
+
*/
|
2165
|
+
unique?: "no" | "local" | "global";
|
2166
|
+
/** @description Regular expression slugs must match */
|
2167
|
+
regularExpression?: string;
|
2168
|
+
/**
|
2169
|
+
* @description Custom error message when regular expression validation fails.
|
2170
|
+
* Has no effect if `regularExpression` is not set.
|
2171
|
+
*/
|
2172
|
+
regularExpressionMessage?: string;
|
2173
|
+
};
|
2174
|
+
/** @description The definition of a component variant */
|
2175
|
+
ComponentDefinitionVariant: {
|
2176
|
+
id: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
|
2177
|
+
/** @description Friendly name of the variant */
|
2178
|
+
name: string;
|
2179
|
+
};
|
2180
|
+
/** @description Permission set for a component defintion */
|
2181
|
+
ComponentDefinitionPermission: {
|
2182
|
+
roleId: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
|
2183
|
+
/**
|
2184
|
+
* @description Permission type for this permission ComponentDefinition:
|
2185
|
+
* read | write | create | delete
|
2186
|
+
*
|
2187
|
+
* @enum {string}
|
2188
|
+
*/
|
2189
|
+
permission: "read" | "write" | "create" | "delete";
|
2190
|
+
/** @description State of the component that this permission applies to */
|
2191
|
+
state: number;
|
2192
|
+
};
|
2193
|
+
/** @description Defines a component type that can live on a Composition */
|
2194
|
+
ComponentDefinition: {
|
2195
|
+
id: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
|
2196
|
+
/** @description Friendly name of the component definition */
|
2197
|
+
name: string;
|
2198
|
+
/**
|
2199
|
+
* @description Icon name or URL for the component definition (e.g. 'screen' or 'https://s3/my-component.jpg')
|
2200
|
+
* @default screen
|
2201
|
+
*/
|
2202
|
+
icon?: string;
|
2203
|
+
/**
|
2204
|
+
* @description The public ID of the parameter whose value should be used to create a display title for this component in the UI.
|
2205
|
+
* The parameter type must support being used as a title parameter for this to work.
|
2206
|
+
*/
|
2207
|
+
titleParameter?: string | null;
|
2208
|
+
/**
|
2209
|
+
* @description Whether this component type can be the root of a composition. If false, this component is only used within slots on other components.
|
2210
|
+
* @default false
|
2211
|
+
*/
|
2212
|
+
canBeComposition?: boolean;
|
2213
|
+
/** @description The parameters for this component. Parameters are key-value pairs that can be anything from text values to links to CMS entries. */
|
2214
|
+
parameters?: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionParameter"][];
|
2215
|
+
/**
|
2216
|
+
* @description if this component uses team permissions or custom permissions
|
2217
|
+
* @default true
|
2218
|
+
*/
|
2219
|
+
useTeamPermissions?: boolean;
|
2220
|
+
/** @description Custom role permissions for this component definition */
|
2221
|
+
permissions?: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionPermission"][];
|
2222
|
+
/** @description The named slots for this component; placement areas where arrays of other components can be added. */
|
2223
|
+
slots?: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionSlot"][];
|
2224
|
+
slugSettings?: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionSlugSettings"];
|
2225
|
+
/** @description Default component instance value */
|
2226
|
+
defaults?: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"] | null;
|
2227
|
+
/** @description Named variants for this component; enables creation of visual variants that use the same parameter data */
|
2228
|
+
variants?: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionVariant"][];
|
2229
|
+
/** @description Created date string for this definition (ignored for writes) */
|
2230
|
+
created?: string;
|
2231
|
+
/** @description Last modified date string for this definition (ignored for writes) */
|
2232
|
+
updated?: string;
|
2233
|
+
};
|
2234
|
+
/** @description Defines an editable parameter on a component. */
|
2235
|
+
ComponentParameter: {
|
2236
|
+
/** @description The value of the parameter. Any JSON-serializable value is acceptable. */
|
2237
|
+
value: unknown;
|
2238
|
+
/** @description The type of the parameter. Determines how it is displayed when editing, and tells the consumer how to process it. */
|
2239
|
+
type: string;
|
2240
|
+
binding?: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameterBinding"];
|
2241
|
+
};
|
2242
|
+
/**
|
2243
|
+
* @deprecated
|
2244
|
+
* @description Defines a binding from a resource data value to a component parameter value. Do not use.
|
2245
|
+
*/
|
2246
|
+
ComponentParameterBinding: {
|
2247
|
+
/** @description A JSON Pointer expression that defines the binding directly to the parameter value */
|
2248
|
+
pointer: string;
|
2249
|
+
/**
|
2250
|
+
* @description The syntax of the binding (currently always 'jptr')
|
2251
|
+
* @enum {string}
|
2252
|
+
*/
|
2253
|
+
syntax: "jptr";
|
2254
|
+
/**
|
2255
|
+
* @description Whether the binding should cause an error if it cannot be resolved.
|
2256
|
+
* If true, and the binding cannot be resolved, an error will be returned by the binding process.
|
2257
|
+
* If false, and the binding cannot be resolved, the parameter will be removed from the bound composition.
|
2258
|
+
*
|
2259
|
+
* @default false
|
2260
|
+
*/
|
2261
|
+
required?: boolean;
|
2262
|
+
};
|
2263
|
+
/** @description Defines the shape of a component instance served by the composition API. */
|
2264
|
+
ComponentInstance: {
|
2265
|
+
/** @description Type of the component instance (public_id of its definition) */
|
2266
|
+
type: string;
|
2267
|
+
/** @description Component parameter values for the component instance */
|
2268
|
+
parameters?: {
|
2269
|
+
[key: string]: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameter"];
|
2270
|
+
};
|
2271
|
+
/** @description Public ID of alternate visual appearance for this component, if any selected */
|
2272
|
+
variant?: string;
|
2273
|
+
/** @description Slots containing any child components */
|
2274
|
+
slots?: {
|
2275
|
+
[key: string]: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"][];
|
2276
|
+
};
|
2277
|
+
/** @description Unique identifier of the component within the composition. This is not set unless specifically requested via `withComponentIDs` API parameter. */
|
2278
|
+
_id?: string;
|
2279
|
+
/** @description Indicates this component instance should be sourced from a pattern library pattern. */
|
2280
|
+
_pattern?: string;
|
2281
|
+
_data?: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinitions"];
|
2282
|
+
/**
|
2283
|
+
* @deprecated
|
2284
|
+
* @description Data definitions coming from a pattern resolved for this component. Merged with _data during resolution.
|
2285
|
+
* Means nothing for PUTs; it will be ignored.
|
2286
|
+
*/
|
2287
|
+
_patternData?: {
|
2288
|
+
[key: string]: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinition"];
|
2289
|
+
};
|
2290
|
+
/**
|
2291
|
+
* @description Describes why the pattern could not be resolved, if a pattern could not be resolved. For PUTs, this is allowed but ignored.
|
2292
|
+
* CYCLIC: A cyclic pattern graph was detected, which could not be resolved because it would cause an infinite loop.
|
2293
|
+
* NOTFOUND: The pattern ID referenced could not be found. It may have been deleted, or not be published yet.
|
2294
|
+
* Means nothing for PUTs; it will be ignored.
|
2295
|
+
*
|
2296
|
+
* @enum {string}
|
2297
|
+
*/
|
2298
|
+
_patternError?: "NOTFOUND" | "CYCLIC";
|
2299
|
+
};
|
2300
|
+
/** @description Defines the shape of the root component in a composition */
|
2301
|
+
RootComponentInstance: {
|
2302
|
+
/** @description Type of the component instance (public_id of its definition) */
|
2303
|
+
type: string;
|
2304
|
+
/** @description Component parameter values for the component instance */
|
2305
|
+
parameters?: {
|
2306
|
+
[key: string]: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameter"];
|
2307
|
+
};
|
2308
|
+
/** @description Public ID of alternate visual appearance for this component, if any selected */
|
2309
|
+
variant?: string;
|
2310
|
+
/** @description Slots containing any child components */
|
2311
|
+
slots?: {
|
2312
|
+
[key: string]: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"][];
|
2313
|
+
};
|
2314
|
+
/** @description The public UUID of the composition. */
|
2315
|
+
_id: string;
|
2316
|
+
/** @description Slug pattern of this component. */
|
2317
|
+
_slug?: string | null;
|
2318
|
+
/** @description Friendly name of this component. */
|
2319
|
+
_name: string;
|
2320
|
+
_data?: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinitions"];
|
2321
|
+
};
|
2322
|
+
/**
|
2323
|
+
* @deprecated
|
2324
|
+
* @description Basic information about an integration data connector (i.e. "Master environment of the stable space", "Yelp API", "Sanity dev dataset"). This data is provided to list responses.
|
2325
|
+
*/
|
2326
|
+
DataConnectionInfo: {
|
2327
|
+
/** @description Public ID of the data connector */
|
2328
|
+
id: string;
|
2329
|
+
/** @description Display name of the data connector */
|
2330
|
+
displayName: string;
|
2331
|
+
/** @description The type of data connector this connects to (e.g. 'cms-items', provided by an intalled integration) */
|
2332
|
+
connectorType: string;
|
2333
|
+
/** @description Base resource URL of the data connector. No trailing slash. */
|
2334
|
+
baseUrl: string;
|
2335
|
+
};
|
2336
|
+
/**
|
2337
|
+
* @deprecated
|
2338
|
+
* @description An instance of an integration data connector (i.e. "Master environment of the stable space", "Yelp API", "Sanity dev dataset"). These are created in the UI and shared across a whole project.
|
2339
|
+
*/
|
2340
|
+
DataConnection: {
|
2341
|
+
/** @description Public ID of the data connection */
|
2342
|
+
id: string;
|
2343
|
+
/** @description Display name of the data connection */
|
2344
|
+
displayName: string;
|
2345
|
+
/** @description The type of data connector this connects to (e.g. 'cms-items', provided by an intalled integration) */
|
2346
|
+
connectorType: string;
|
2347
|
+
/** @description Base resource URL of the data connection. No trailing slash. */
|
2348
|
+
baseUrl: string;
|
2349
|
+
/** @description HTTP headers to pass with requests to the data connection */
|
2350
|
+
headers?: {
|
2351
|
+
[key: string]: string;
|
2352
|
+
};
|
2353
|
+
/** @description Query String parameters to pass with requests to the data connection */
|
2354
|
+
parameters?: {
|
2355
|
+
[key: string]: string;
|
2356
|
+
};
|
2357
|
+
/** @description Variables needed to make calls to the data connection */
|
2358
|
+
variables?: {
|
2359
|
+
[key: string]: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataVariable"];
|
2360
|
+
};
|
2361
|
+
/** @description Custom configuration specific to the data connection being defined */
|
2362
|
+
custom?: {
|
2363
|
+
[key: string]: unknown;
|
2364
|
+
};
|
2365
|
+
};
|
2366
|
+
/**
|
2367
|
+
* @deprecated
|
2368
|
+
* @description A specific type of data that a Data Connection can provide (i.e. "Recipe", "Recipes List by Tag", "Yelp Reviews of My Restaurant"). These are created in the UI and shared a whole project.
|
2369
|
+
*/
|
2370
|
+
DataType: {
|
2371
|
+
/** @description Public ID of the data type */
|
2372
|
+
id: string;
|
2373
|
+
/** @description Display name of the data type */
|
2374
|
+
displayName: string;
|
2375
|
+
/** @description Public ID of the associated data connection */
|
2376
|
+
connectionId: string;
|
2377
|
+
/**
|
2378
|
+
* @description A connector-specific archetype for this data type; used to select UI as well as perform any
|
2379
|
+
* necessary post-processing on the response. e.g. 'cms-entry', 'cms-query'. Can be undefined if
|
2380
|
+
* no special UI or processing is required.
|
2381
|
+
*/
|
2382
|
+
archetype?: string;
|
2383
|
+
allowedOnComponents?: string[];
|
2384
|
+
/** @description Resource path, appended to the data connection's baseUrl (e.g. baseUrl = https://base.url, path = /v1/endpoint -> final URL https://base.url/v1/endpoint). Must have leading slash. */
|
2385
|
+
path: string;
|
2386
|
+
/** @description HTTP headers to pass with requests to the data type. Merged with headers from the data connection, overriding identical keys. */
|
2387
|
+
headers?: {
|
2388
|
+
[key: string]: string;
|
2389
|
+
};
|
2390
|
+
/** @description Query String parameters to pass with requests to the data type. Merged with parameters from the data connection, overriding identical keys. */
|
2391
|
+
parameters?: {
|
2392
|
+
[key: string]: string;
|
2393
|
+
};
|
2394
|
+
/** @description Body to pass with requests to the data type (ignored unless method is POST) */
|
2395
|
+
body?: string;
|
2396
|
+
/**
|
2397
|
+
* @description HTTP method to use with requests to the data type.
|
2398
|
+
* @default GET
|
2399
|
+
* @enum {string}
|
2400
|
+
*/
|
2401
|
+
method: "GET" | "POST" | "HEAD";
|
2402
|
+
/** @description Variables needed to make calls to the data type. Merged with variables from the data connection, overriding identical keys. */
|
2403
|
+
variables?: {
|
2404
|
+
[key: string]: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataVariable"];
|
2405
|
+
};
|
2406
|
+
/** @description Custom configuration specific to the data connection being defined */
|
2407
|
+
custom?: {
|
2408
|
+
[key: string]: unknown;
|
2409
|
+
};
|
2410
|
+
};
|
2411
|
+
/**
|
2412
|
+
* @deprecated
|
2413
|
+
* @description Defines the shape of a data variable on a Data Connector or Data Type
|
2414
|
+
*/
|
2415
|
+
DataVariable: {
|
2416
|
+
/** @description Display name of the data variable */
|
2417
|
+
displayName?: string;
|
2418
|
+
/**
|
2419
|
+
* @description Type of the data variable
|
2420
|
+
* @default text
|
2421
|
+
*/
|
2422
|
+
type: string;
|
2423
|
+
/** @description Default value of the data variable */
|
2424
|
+
default: string;
|
2425
|
+
/**
|
2426
|
+
* @description Where the variable value is set. Static = set to static value by the author. Dynamic = set to a dynamic value by a runtime API request from the frontend (default is used in the editor).
|
2427
|
+
* @enum {string}
|
2428
|
+
*/
|
2429
|
+
setBy: "static" | "dynamic";
|
2430
|
+
};
|
2431
|
+
/**
|
2432
|
+
* @deprecated
|
2433
|
+
* @description Data definitions attached to this component. The property name is the key of the data in the data document.
|
2434
|
+
* Note: data definitions are inherited from ancestors at runtime (and may be overridden by descendants that use the same key).
|
2435
|
+
*/
|
2436
|
+
CompositionDataDefinitions: {
|
2437
|
+
[key: string]: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinition"];
|
2438
|
+
};
|
2439
|
+
/**
|
2440
|
+
* @deprecated
|
2441
|
+
* @description Data definition attached to this component
|
2442
|
+
*/
|
2443
|
+
CompositionDataDefinition: {
|
2444
|
+
/** @description Public ID of the data type that provides this data */
|
2445
|
+
type: string;
|
2446
|
+
/** @description Whether this data is a pattern parameter that has to be overridden when a pattern is referenced on another composition. If this is not a pattern composition, this has no meaning and should not be used. If unspecified, the default is false. */
|
2447
|
+
isPatternParameter?: boolean;
|
2448
|
+
variables?: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataVariables"];
|
2449
|
+
};
|
2450
|
+
/**
|
2451
|
+
* @deprecated
|
2452
|
+
* @description Static variable values for this composition.
|
2453
|
+
*/
|
2454
|
+
CompositionDataVariables: {
|
2455
|
+
[key: string]: string;
|
2456
|
+
};
|
2457
|
+
};
|
2458
|
+
};
|
2459
|
+
operations: {};
|
2460
|
+
};
|
2461
|
+
}
|
2462
|
+
|
2463
|
+
/**
|
2464
|
+
* This file was auto-generated by openapi-typescript.
|
2465
|
+
* Do not make direct changes to the file.
|
2466
|
+
*/
|
2467
|
+
interface paths {
|
2468
|
+
"/api/v1/data-connections": {
|
2469
|
+
get: {
|
2470
|
+
parameters: {
|
2471
|
+
query: {
|
2472
|
+
projectId: string;
|
2473
|
+
};
|
2474
|
+
};
|
2475
|
+
responses: {
|
2476
|
+
/** OK */
|
2477
|
+
200: {
|
2478
|
+
content: {
|
2479
|
+
"application/json": {
|
2480
|
+
results: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataConnectionInfo"][];
|
2481
|
+
};
|
2482
|
+
};
|
2483
|
+
};
|
2484
|
+
400: external["swagger.yml"]["components"]["responses"]["BadRequestError"];
|
2485
|
+
401: external["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
|
2486
|
+
403: external["swagger.yml"]["components"]["responses"]["ForbiddenError"];
|
2487
|
+
429: external["swagger.yml"]["components"]["responses"]["RateLimitError"];
|
2488
|
+
500: external["swagger.yml"]["components"]["responses"]["InternalServerError"];
|
2489
|
+
};
|
2490
|
+
};
|
2491
|
+
};
|
2492
|
+
}
|
2493
|
+
interface external {
|
2494
|
+
"swagger.yml": {
|
2495
|
+
paths: {};
|
2496
|
+
components: {
|
2497
|
+
schemas: {
|
2498
|
+
Error: {
|
2499
|
+
/** @description Error message(s) that occurred while processing the request */
|
2500
|
+
errorMessage?: string[] | string;
|
2501
|
+
};
|
2502
|
+
};
|
2503
|
+
responses: {
|
2504
|
+
/** Request input validation failed */
|
2505
|
+
BadRequestError: {
|
2506
|
+
content: {
|
2507
|
+
"application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
|
2508
|
+
};
|
2509
|
+
};
|
2510
|
+
/** API key or token was not valid */
|
2511
|
+
UnauthorizedError: {
|
2512
|
+
content: {
|
2513
|
+
"application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
|
2514
|
+
};
|
2515
|
+
};
|
2516
|
+
/** Permission was denied */
|
2517
|
+
ForbiddenError: {
|
2518
|
+
content: {
|
2519
|
+
"application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
|
2520
|
+
};
|
2521
|
+
};
|
2522
|
+
/** Resource not found */
|
2523
|
+
NotFoundError: {
|
2524
|
+
content: {
|
2525
|
+
"application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
|
2526
|
+
};
|
2527
|
+
};
|
2528
|
+
/** Too many requests in allowed time period */
|
2529
|
+
RateLimitError: unknown;
|
2530
|
+
/** Execution error occurred */
|
2531
|
+
InternalServerError: unknown;
|
2532
|
+
};
|
2533
|
+
};
|
2534
|
+
operations: {};
|
2535
|
+
};
|
2536
|
+
"uniform-canvas-types.swagger.yml": {
|
2537
|
+
paths: {};
|
2538
|
+
components: {
|
2539
|
+
schemas: {
|
2540
|
+
/** @description Public ID (used in code). Do not change after creation. */
|
2541
|
+
PublicIdProperty: string;
|
2542
|
+
/** @description The definition of a component parameter */
|
2543
|
+
ComponentDefinitionParameter: {
|
2544
|
+
id: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
|
2545
|
+
/** @description Friendly name of the parameter */
|
2546
|
+
name: string;
|
2547
|
+
/** @description Appears next to the parameter in the Composition editor */
|
2548
|
+
helpText?: string;
|
2549
|
+
/** @description Type name of the parameter (provided by a Uniform integration) */
|
2550
|
+
type: string;
|
2551
|
+
/** @description The configuration object for the type (type-specific) */
|
2552
|
+
typeConfig?: unknown;
|
2553
|
+
};
|
2554
|
+
/** @description The definition of a named component slot that can contain other components */
|
2555
|
+
ComponentDefinitionSlot: {
|
2556
|
+
id: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
|
2557
|
+
/** @description Friendly name of the slot */
|
2558
|
+
name: string;
|
2559
|
+
/** @description A list of component definition public IDs that are allowed in this named slot */
|
2560
|
+
allowedComponents: string[];
|
2561
|
+
/**
|
2562
|
+
* @description Whether this slot inherits its allowed components from the parent slot it lives in. If true, allowedComponents is irrelevant.
|
2563
|
+
* @default false
|
2564
|
+
*/
|
2565
|
+
inheritAllowedComponents: boolean;
|
2566
|
+
/** @description Minimum valid number of components in this slot */
|
2567
|
+
minComponents?: number;
|
2568
|
+
/** @description Maximum valid number of components in this slot */
|
2569
|
+
maxComponents?: number;
|
2570
|
+
};
|
2571
|
+
/** @description The definition of a composition's slug settings */
|
2572
|
+
ComponentDefinitionSlugSettings: {
|
2573
|
+
/**
|
2574
|
+
* @description Whether the slug is required
|
2575
|
+
* no: slug is optional
|
2576
|
+
* yes: slug is required
|
2577
|
+
* disabled: slug is disabled and will not be shown in the editor
|
2578
|
+
*
|
2579
|
+
* @default no
|
2580
|
+
* @enum {string}
|
2581
|
+
*/
|
2582
|
+
required?: "no" | "yes" | "disabled";
|
2583
|
+
/**
|
2584
|
+
* @description Slug uniqueness configuration.
|
2585
|
+
* no = no unique constraint
|
2586
|
+
* local = must be unique within this component type
|
2587
|
+
* global = must be unique across all component types
|
2588
|
+
*
|
2589
|
+
* @enum {string}
|
2590
|
+
*/
|
2591
|
+
unique?: "no" | "local" | "global";
|
2592
|
+
/** @description Regular expression slugs must match */
|
2593
|
+
regularExpression?: string;
|
2594
|
+
/**
|
2595
|
+
* @description Custom error message when regular expression validation fails.
|
2596
|
+
* Has no effect if `regularExpression` is not set.
|
2597
|
+
*/
|
2598
|
+
regularExpressionMessage?: string;
|
2599
|
+
};
|
2600
|
+
/** @description The definition of a component variant */
|
2601
|
+
ComponentDefinitionVariant: {
|
2602
|
+
id: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
|
2603
|
+
/** @description Friendly name of the variant */
|
2604
|
+
name: string;
|
2605
|
+
};
|
2606
|
+
/** @description Permission set for a component defintion */
|
2607
|
+
ComponentDefinitionPermission: {
|
2608
|
+
roleId: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
|
2609
|
+
/**
|
2610
|
+
* @description Permission type for this permission ComponentDefinition:
|
2611
|
+
* read | write | create | delete
|
2612
|
+
*
|
2613
|
+
* @enum {string}
|
2614
|
+
*/
|
2615
|
+
permission: "read" | "write" | "create" | "delete";
|
2616
|
+
/** @description State of the component that this permission applies to */
|
2617
|
+
state: number;
|
2618
|
+
};
|
2619
|
+
/** @description Defines a component type that can live on a Composition */
|
2620
|
+
ComponentDefinition: {
|
2621
|
+
id: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
|
2622
|
+
/** @description Friendly name of the component definition */
|
2623
|
+
name: string;
|
2624
|
+
/**
|
2625
|
+
* @description Icon name or URL for the component definition (e.g. 'screen' or 'https://s3/my-component.jpg')
|
2626
|
+
* @default screen
|
2627
|
+
*/
|
2628
|
+
icon?: string;
|
2629
|
+
/**
|
2630
|
+
* @description The public ID of the parameter whose value should be used to create a display title for this component in the UI.
|
2631
|
+
* The parameter type must support being used as a title parameter for this to work.
|
2632
|
+
*/
|
2633
|
+
titleParameter?: string | null;
|
2634
|
+
/**
|
2635
|
+
* @description Whether this component type can be the root of a composition. If false, this component is only used within slots on other components.
|
2636
|
+
* @default false
|
2637
|
+
*/
|
2638
|
+
canBeComposition?: boolean;
|
2639
|
+
/** @description The parameters for this component. Parameters are key-value pairs that can be anything from text values to links to CMS entries. */
|
2640
|
+
parameters?: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionParameter"][];
|
2641
|
+
/**
|
2642
|
+
* @description if this component uses team permissions or custom permissions
|
2643
|
+
* @default true
|
2644
|
+
*/
|
2645
|
+
useTeamPermissions?: boolean;
|
2646
|
+
/** @description Custom role permissions for this component definition */
|
2647
|
+
permissions?: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionPermission"][];
|
2648
|
+
/** @description The named slots for this component; placement areas where arrays of other components can be added. */
|
2649
|
+
slots?: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionSlot"][];
|
2650
|
+
slugSettings?: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionSlugSettings"];
|
2651
|
+
/** @description Default component instance value */
|
2652
|
+
defaults?: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"] | null;
|
2653
|
+
/** @description Named variants for this component; enables creation of visual variants that use the same parameter data */
|
2654
|
+
variants?: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionVariant"][];
|
2655
|
+
/** @description Created date string for this definition (ignored for writes) */
|
2656
|
+
created?: string;
|
2657
|
+
/** @description Last modified date string for this definition (ignored for writes) */
|
2658
|
+
updated?: string;
|
2659
|
+
};
|
2660
|
+
/** @description Defines an editable parameter on a component. */
|
2661
|
+
ComponentParameter: {
|
2662
|
+
/** @description The value of the parameter. Any JSON-serializable value is acceptable. */
|
2663
|
+
value: unknown;
|
2664
|
+
/** @description The type of the parameter. Determines how it is displayed when editing, and tells the consumer how to process it. */
|
2665
|
+
type: string;
|
2666
|
+
binding?: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameterBinding"];
|
2667
|
+
};
|
2668
|
+
/**
|
2669
|
+
* @deprecated
|
2670
|
+
* @description Defines a binding from a resource data value to a component parameter value. Do not use.
|
2671
|
+
*/
|
2672
|
+
ComponentParameterBinding: {
|
2673
|
+
/** @description A JSON Pointer expression that defines the binding directly to the parameter value */
|
2674
|
+
pointer: string;
|
2675
|
+
/**
|
2676
|
+
* @description The syntax of the binding (currently always 'jptr')
|
2677
|
+
* @enum {string}
|
2678
|
+
*/
|
2679
|
+
syntax: "jptr";
|
2680
|
+
/**
|
2681
|
+
* @description Whether the binding should cause an error if it cannot be resolved.
|
2682
|
+
* If true, and the binding cannot be resolved, an error will be returned by the binding process.
|
2683
|
+
* If false, and the binding cannot be resolved, the parameter will be removed from the bound composition.
|
2684
|
+
*
|
2685
|
+
* @default false
|
2686
|
+
*/
|
2687
|
+
required?: boolean;
|
2688
|
+
};
|
2689
|
+
/** @description Defines the shape of a component instance served by the composition API. */
|
2690
|
+
ComponentInstance: {
|
2691
|
+
/** @description Type of the component instance (public_id of its definition) */
|
2692
|
+
type: string;
|
2693
|
+
/** @description Component parameter values for the component instance */
|
2694
|
+
parameters?: {
|
2695
|
+
[key: string]: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameter"];
|
2696
|
+
};
|
2697
|
+
/** @description Public ID of alternate visual appearance for this component, if any selected */
|
2698
|
+
variant?: string;
|
2699
|
+
/** @description Slots containing any child components */
|
2700
|
+
slots?: {
|
2701
|
+
[key: string]: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"][];
|
2702
|
+
};
|
2703
|
+
/** @description Unique identifier of the component within the composition. This is not set unless specifically requested via `withComponentIDs` API parameter. */
|
2704
|
+
_id?: string;
|
2705
|
+
/** @description Indicates this component instance should be sourced from a pattern library pattern. */
|
2706
|
+
_pattern?: string;
|
2707
|
+
_data?: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinitions"];
|
2708
|
+
/**
|
2709
|
+
* @deprecated
|
2710
|
+
* @description Data definitions coming from a pattern resolved for this component. Merged with _data during resolution.
|
2711
|
+
* Means nothing for PUTs; it will be ignored.
|
2712
|
+
*/
|
2713
|
+
_patternData?: {
|
2714
|
+
[key: string]: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinition"];
|
2715
|
+
};
|
2716
|
+
/**
|
2717
|
+
* @description Describes why the pattern could not be resolved, if a pattern could not be resolved. For PUTs, this is allowed but ignored.
|
2718
|
+
* CYCLIC: A cyclic pattern graph was detected, which could not be resolved because it would cause an infinite loop.
|
2719
|
+
* NOTFOUND: The pattern ID referenced could not be found. It may have been deleted, or not be published yet.
|
2720
|
+
* Means nothing for PUTs; it will be ignored.
|
2721
|
+
*
|
2722
|
+
* @enum {string}
|
2723
|
+
*/
|
2724
|
+
_patternError?: "NOTFOUND" | "CYCLIC";
|
2725
|
+
};
|
2726
|
+
/** @description Defines the shape of the root component in a composition */
|
2727
|
+
RootComponentInstance: {
|
2728
|
+
/** @description Type of the component instance (public_id of its definition) */
|
2729
|
+
type: string;
|
2730
|
+
/** @description Component parameter values for the component instance */
|
2731
|
+
parameters?: {
|
2732
|
+
[key: string]: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameter"];
|
2733
|
+
};
|
2734
|
+
/** @description Public ID of alternate visual appearance for this component, if any selected */
|
2735
|
+
variant?: string;
|
2736
|
+
/** @description Slots containing any child components */
|
2737
|
+
slots?: {
|
2738
|
+
[key: string]: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"][];
|
2739
|
+
};
|
2740
|
+
/** @description The public UUID of the composition. */
|
2741
|
+
_id: string;
|
2742
|
+
/** @description Slug pattern of this component. */
|
2743
|
+
_slug?: string | null;
|
2744
|
+
/** @description Friendly name of this component. */
|
2745
|
+
_name: string;
|
2746
|
+
_data?: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinitions"];
|
2747
|
+
};
|
2748
|
+
/**
|
2749
|
+
* @deprecated
|
2750
|
+
* @description Basic information about an integration data connector (i.e. "Master environment of the stable space", "Yelp API", "Sanity dev dataset"). This data is provided to list responses.
|
2751
|
+
*/
|
2752
|
+
DataConnectionInfo: {
|
2753
|
+
/** @description Public ID of the data connector */
|
2754
|
+
id: string;
|
2755
|
+
/** @description Display name of the data connector */
|
2756
|
+
displayName: string;
|
2757
|
+
/** @description The type of data connector this connects to (e.g. 'cms-items', provided by an intalled integration) */
|
2758
|
+
connectorType: string;
|
2759
|
+
/** @description Base resource URL of the data connector. No trailing slash. */
|
2760
|
+
baseUrl: string;
|
2761
|
+
};
|
2762
|
+
/**
|
2763
|
+
* @deprecated
|
2764
|
+
* @description An instance of an integration data connector (i.e. "Master environment of the stable space", "Yelp API", "Sanity dev dataset"). These are created in the UI and shared across a whole project.
|
2765
|
+
*/
|
2766
|
+
DataConnection: {
|
2767
|
+
/** @description Public ID of the data connection */
|
2768
|
+
id: string;
|
2769
|
+
/** @description Display name of the data connection */
|
2770
|
+
displayName: string;
|
2771
|
+
/** @description The type of data connector this connects to (e.g. 'cms-items', provided by an intalled integration) */
|
2772
|
+
connectorType: string;
|
2773
|
+
/** @description Base resource URL of the data connection. No trailing slash. */
|
2774
|
+
baseUrl: string;
|
2775
|
+
/** @description HTTP headers to pass with requests to the data connection */
|
2776
|
+
headers?: {
|
2777
|
+
[key: string]: string;
|
2778
|
+
};
|
2779
|
+
/** @description Query String parameters to pass with requests to the data connection */
|
2780
|
+
parameters?: {
|
2781
|
+
[key: string]: string;
|
2782
|
+
};
|
2783
|
+
/** @description Variables needed to make calls to the data connection */
|
2784
|
+
variables?: {
|
2785
|
+
[key: string]: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataVariable"];
|
2786
|
+
};
|
2787
|
+
/** @description Custom configuration specific to the data connection being defined */
|
2788
|
+
custom?: {
|
2789
|
+
[key: string]: unknown;
|
2790
|
+
};
|
2791
|
+
};
|
2792
|
+
/**
|
2793
|
+
* @deprecated
|
2794
|
+
* @description A specific type of data that a Data Connection can provide (i.e. "Recipe", "Recipes List by Tag", "Yelp Reviews of My Restaurant"). These are created in the UI and shared a whole project.
|
2795
|
+
*/
|
2796
|
+
DataType: {
|
2797
|
+
/** @description Public ID of the data type */
|
2798
|
+
id: string;
|
2799
|
+
/** @description Display name of the data type */
|
2800
|
+
displayName: string;
|
2801
|
+
/** @description Public ID of the associated data connection */
|
2802
|
+
connectionId: string;
|
2803
|
+
/**
|
2804
|
+
* @description A connector-specific archetype for this data type; used to select UI as well as perform any
|
2805
|
+
* necessary post-processing on the response. e.g. 'cms-entry', 'cms-query'. Can be undefined if
|
2806
|
+
* no special UI or processing is required.
|
2807
|
+
*/
|
2808
|
+
archetype?: string;
|
2809
|
+
allowedOnComponents?: string[];
|
2810
|
+
/** @description Resource path, appended to the data connection's baseUrl (e.g. baseUrl = https://base.url, path = /v1/endpoint -> final URL https://base.url/v1/endpoint). Must have leading slash. */
|
2811
|
+
path: string;
|
2812
|
+
/** @description HTTP headers to pass with requests to the data type. Merged with headers from the data connection, overriding identical keys. */
|
2813
|
+
headers?: {
|
2814
|
+
[key: string]: string;
|
2815
|
+
};
|
2816
|
+
/** @description Query String parameters to pass with requests to the data type. Merged with parameters from the data connection, overriding identical keys. */
|
2817
|
+
parameters?: {
|
2818
|
+
[key: string]: string;
|
2819
|
+
};
|
2820
|
+
/** @description Body to pass with requests to the data type (ignored unless method is POST) */
|
2821
|
+
body?: string;
|
2822
|
+
/**
|
2823
|
+
* @description HTTP method to use with requests to the data type.
|
2824
|
+
* @default GET
|
2825
|
+
* @enum {string}
|
2826
|
+
*/
|
2827
|
+
method: "GET" | "POST" | "HEAD";
|
2828
|
+
/** @description Variables needed to make calls to the data type. Merged with variables from the data connection, overriding identical keys. */
|
2829
|
+
variables?: {
|
2830
|
+
[key: string]: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataVariable"];
|
2831
|
+
};
|
2832
|
+
/** @description Custom configuration specific to the data connection being defined */
|
2833
|
+
custom?: {
|
2834
|
+
[key: string]: unknown;
|
2835
|
+
};
|
2836
|
+
};
|
2837
|
+
/**
|
2838
|
+
* @deprecated
|
2839
|
+
* @description Defines the shape of a data variable on a Data Connector or Data Type
|
2840
|
+
*/
|
2841
|
+
DataVariable: {
|
2842
|
+
/** @description Display name of the data variable */
|
2843
|
+
displayName?: string;
|
2844
|
+
/**
|
2845
|
+
* @description Type of the data variable
|
2846
|
+
* @default text
|
2847
|
+
*/
|
2848
|
+
type: string;
|
2849
|
+
/** @description Default value of the data variable */
|
2850
|
+
default: string;
|
2851
|
+
/**
|
2852
|
+
* @description Where the variable value is set. Static = set to static value by the author. Dynamic = set to a dynamic value by a runtime API request from the frontend (default is used in the editor).
|
2853
|
+
* @enum {string}
|
2854
|
+
*/
|
2855
|
+
setBy: "static" | "dynamic";
|
2856
|
+
};
|
2857
|
+
/**
|
2858
|
+
* @deprecated
|
2859
|
+
* @description Data definitions attached to this component. The property name is the key of the data in the data document.
|
2860
|
+
* Note: data definitions are inherited from ancestors at runtime (and may be overridden by descendants that use the same key).
|
2861
|
+
*/
|
2862
|
+
CompositionDataDefinitions: {
|
2863
|
+
[key: string]: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinition"];
|
2864
|
+
};
|
2865
|
+
/**
|
2866
|
+
* @deprecated
|
2867
|
+
* @description Data definition attached to this component
|
2868
|
+
*/
|
2869
|
+
CompositionDataDefinition: {
|
2870
|
+
/** @description Public ID of the data type that provides this data */
|
2871
|
+
type: string;
|
2872
|
+
/** @description Whether this data is a pattern parameter that has to be overridden when a pattern is referenced on another composition. If this is not a pattern composition, this has no meaning and should not be used. If unspecified, the default is false. */
|
2873
|
+
isPatternParameter?: boolean;
|
2874
|
+
variables?: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataVariables"];
|
2875
|
+
};
|
2876
|
+
/**
|
2877
|
+
* @deprecated
|
2878
|
+
* @description Static variable values for this composition.
|
2879
|
+
*/
|
2880
|
+
CompositionDataVariables: {
|
2881
|
+
[key: string]: string;
|
2882
|
+
};
|
2883
|
+
};
|
2884
|
+
};
|
2885
|
+
operations: {};
|
2886
|
+
};
|
2887
|
+
}
|
2888
|
+
|
2889
|
+
declare type DataTypeApi = paths$2['/api/v1/data-types'];
|
2890
|
+
declare type DataConnectionsApi = paths['/api/v1/data-connections'];
|
2891
|
+
declare type DataConnectionApi = paths$1['/api/v1/data-connection'];
|
2892
|
+
/** Query parameter options for GET /api/v1/data-types */
|
2893
|
+
declare type DataTypeGetParameters = DataTypeApi['get']['parameters']['query'];
|
2894
|
+
/** The GET response from /api/v1/data-types */
|
2895
|
+
declare type DataTypeGetResponse = DataTypeApi['get']['responses']['200']['content']['application/json'];
|
2896
|
+
/** The PUT request body for /api/v1/data-types */
|
2897
|
+
declare type DataTypePutParameters = DataTypeApi['put']['requestBody']['content']['application/json'];
|
2898
|
+
/** Shape of the DELETE request body for /api/v1/data-types */
|
2899
|
+
declare type DataTypeDeleteParameters = DataTypeApi['delete']['requestBody']['content']['application/json'];
|
2900
|
+
/** Query parameter options for GET /api/v1/data-connection */
|
2901
|
+
declare type DataConnectionGetParameters = DataConnectionApi['get']['parameters']['query'];
|
2902
|
+
/** Query parameter options for GET /api/v1/data-connections */
|
2903
|
+
declare type DataConnectionsGetParameters = DataConnectionsApi['get']['parameters']['query'];
|
2904
|
+
/** The GET response from /api/v1/data-connections */
|
2905
|
+
declare type DataConnectionGetResponse = DataConnectionApi['get']['responses']['200']['content']['application/json'];
|
2906
|
+
/** The GET response from /api/v1/data-connections */
|
2907
|
+
declare type DataConnectionsGetResponse = DataConnectionsApi['get']['responses']['200']['content']['application/json'];
|
2908
|
+
/** The PUT request body for /api/v1/data-connection */
|
2909
|
+
declare type DataConnectionPutParameters = DataConnectionApi['put']['requestBody']['content']['application/json'];
|
2910
|
+
/** Shape of the DELETE request body for /api/v1/data-connection */
|
2911
|
+
declare type DataConnectionDeleteParameters = DataConnectionApi['delete']['requestBody']['content']['application/json'];
|
2912
|
+
declare type DataType = components$1['schemas']['DataType'];
|
2913
|
+
declare type DataConnection = components$1['schemas']['DataConnection'];
|
2914
|
+
declare type DataConnectionInfo = components$1['schemas']['DataConnectionInfo'];
|
2915
|
+
declare type DataVariable = components$1['schemas']['DataVariable'];
|
2916
|
+
|
2917
|
+
/**
|
2918
|
+
* Pusher-js is large (80k) and not tree shakable so it is always bundled if directly referenced,
|
2919
|
+
* when it's only needed during preview mode. To avoid bundling it for all, we use an old-school
|
2920
|
+
* write-a-script-tag hack to load it in a poor man's approximation of a dynamic import ;)
|
2921
|
+
*/
|
2922
|
+
declare type ChannelSubscription = {
|
2923
|
+
addEventHandler: (eventName: string, handler: (data: unknown) => void) => () => void;
|
2924
|
+
unsubscribe: () => void;
|
2925
|
+
};
|
2926
|
+
declare type PreviewEventBus = {
|
2927
|
+
subscribe: (channel: string) => ChannelSubscription;
|
2928
|
+
};
|
2929
|
+
declare global {
|
2930
|
+
interface Window {
|
2931
|
+
Pusher?: typeof Pusher;
|
2932
|
+
__UNIFORM_EVENT_BUS__?: PreviewEventBus;
|
2933
|
+
}
|
2934
|
+
}
|
2935
|
+
/**
|
2936
|
+
* Creates an event bus client to receive updates from Canvas
|
2937
|
+
* IMPORTANT: in a server-side context this will always return undefined
|
2938
|
+
* IMPORTANT: in a browser context this is cached in window and does not create multiple instances
|
2939
|
+
*/
|
2940
|
+
declare function createEventBus(): Promise<PreviewEventBus | undefined>;
|
2941
|
+
|
2942
|
+
export { CreatingComponentDefinition as A, CompositionGetOrderBy as B, ComponentInstance as C, DataConnectionGetParameters as D, CompositionUIStatus as E, CompositionGetListResponse as F, CompositionAPIResponse as G, CompositionAPIDeleteRequest as H, CompositionListAPIResponse as I, CompositionAPIOptions as J, ComponentParameterBinding as K, CompositionDataVariables as L, CompositionDataDefinitions as M, CompositionDataDefinition as N, CanvasDefinitions as O, PreviewEventBus as P, DataConnectionGetResponse as Q, RootComponentInstance as R, DataConnectionsGetResponse as S, DataType as T, DataConnection as U, DataConnectionInfo as V, DataVariable as W, ChannelSubscription as X, createEventBus as Y, ComponentParameter as a, CompositionGetParameters as b, CompositionPutParameters as c, CompositionDeleteParameters as d, ComponentDefinitionGetParameters as e, ComponentDefinitionPutParameters as f, ComponentDefinitionDeleteParameters as g, DataConnectionsGetParameters as h, DataConnectionPutParameters as i, DataConnectionDeleteParameters as j, DataTypeGetParameters as k, DataTypeGetResponse as l, DataTypePutParameters as m, DataTypeDeleteParameters as n, CompositionGetResponse as o, ComponentDefinitionGetResponse as p, ComponentDefinitionAPIResponse as q, ComponentDefinitionAPIPutRequest as r, ComponentDefinitionAPIDeleteRequest as s, ComponentDefinitionListAPIOptions as t, ComponentDefinitionParameter as u, ComponentDefinitionVariant as v, ComponentDefinitionSlugSettings as w, ComponentDefinitionSlot as x, ComponentDefinitionPermission as y, ComponentDefinition as z };
|