@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.
@@ -0,0 +1,2949 @@
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
+ * Controls whether the total count of results will be returned along with the current results page in a list.
950
+ * Has no effect when not fetching a list. This does impact performance when enabled.
951
+ */
952
+ withTotalCount?: boolean;
953
+ };
954
+ };
955
+ responses: {
956
+ /** OK */
957
+ 200: {
958
+ content: {
959
+ "application/json": components["schemas"]["CompositionListResponse"] | components["schemas"]["CompositionApiResponse"];
960
+ };
961
+ };
962
+ 400: external$3["swagger.yml"]["components"]["responses"]["BadRequestError"];
963
+ 401: external$3["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
964
+ 403: external$3["swagger.yml"]["components"]["responses"]["ForbiddenError"];
965
+ /** Composition not found */
966
+ 404: {
967
+ content: {
968
+ "text/plain": string;
969
+ };
970
+ };
971
+ 429: external$3["swagger.yml"]["components"]["responses"]["RateLimitError"];
972
+ 500: external$3["swagger.yml"]["components"]["responses"]["InternalServerError"];
973
+ };
974
+ };
975
+ /** Upserts a composition */
976
+ put: {
977
+ responses: {
978
+ /** OK */
979
+ 204: never;
980
+ 400: external$3["swagger.yml"]["components"]["responses"]["BadRequestError"];
981
+ 401: external$3["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
982
+ 403: external$3["swagger.yml"]["components"]["responses"]["ForbiddenError"];
983
+ 429: external$3["swagger.yml"]["components"]["responses"]["RateLimitError"];
984
+ 500: external$3["swagger.yml"]["components"]["responses"]["InternalServerError"];
985
+ };
986
+ requestBody: {
987
+ content: {
988
+ "application/json": {
989
+ /**
990
+ * Format: uuid
991
+ * @description The project ID to upsert the composition to
992
+ */
993
+ projectId: string;
994
+ /** @description The state of the composition to upsert into. 0 = draft, 64 = published */
995
+ state: number;
996
+ composition: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["RootComponentInstance"];
997
+ /**
998
+ * @description True if the composition is a pattern (which can be referenced on other compositions)
999
+ * @default false
1000
+ */
1001
+ pattern?: boolean;
1002
+ /** @description Ignored if present */
1003
+ created?: string;
1004
+ /** @description Ignored if present */
1005
+ modified?: string;
1006
+ };
1007
+ };
1008
+ };
1009
+ };
1010
+ /** Deletes or unpublishes a composition */
1011
+ delete: {
1012
+ responses: {
1013
+ /** OK */
1014
+ 204: never;
1015
+ 400: external$3["swagger.yml"]["components"]["responses"]["BadRequestError"];
1016
+ 401: external$3["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
1017
+ 403: external$3["swagger.yml"]["components"]["responses"]["ForbiddenError"];
1018
+ 429: external$3["swagger.yml"]["components"]["responses"]["RateLimitError"];
1019
+ 500: external$3["swagger.yml"]["components"]["responses"]["InternalServerError"];
1020
+ };
1021
+ requestBody: {
1022
+ content: {
1023
+ "application/json": {
1024
+ /**
1025
+ * Format: uuid
1026
+ * @description The ID of the composition to delete
1027
+ */
1028
+ compositionId: string;
1029
+ /**
1030
+ * Format: uuid
1031
+ * @description The ID of the project the composition to delete belongs to
1032
+ */
1033
+ projectId: string;
1034
+ /** @description The state of the composition to delete (0 = draft, 64 = published [causes unpublishing], unspecified = all) */
1035
+ state?: number;
1036
+ };
1037
+ };
1038
+ };
1039
+ };
1040
+ /** Handles preflight requests. This endpoint allows CORS. */
1041
+ options: {
1042
+ responses: {
1043
+ /** OK */
1044
+ 204: never;
1045
+ };
1046
+ };
1047
+ };
1048
+ }
1049
+ interface components {
1050
+ schemas: {
1051
+ CompositionApiResponse: {
1052
+ /** @description State of compositions to fetch. 0 = draft, 64 = published. */
1053
+ state: number;
1054
+ /**
1055
+ * @deprecated
1056
+ * @description UI status value. Subject to change without notice; do not rely on this value. Only present when `withUIStatus` option is true.
1057
+ * @enum {string}
1058
+ */
1059
+ uiStatus?: "Draft" | "Modified" | "Published" | "Orphan";
1060
+ /**
1061
+ * Format: uuid
1062
+ * @description The project ID that this layout data is part of
1063
+ */
1064
+ projectId: string;
1065
+ /**
1066
+ * Format: date-time,
1067
+ * @description Created date string for this definition
1068
+ */
1069
+ created: string;
1070
+ /**
1071
+ * Format: date-time,
1072
+ * @description Modified date string for this definition
1073
+ */
1074
+ modified: string;
1075
+ /** @description Whether this composition is a pattern (can be referenced by other compositions, not treated as a composition) */
1076
+ pattern: boolean;
1077
+ composition: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["RootComponentInstance"];
1078
+ };
1079
+ CompositionListResponse: {
1080
+ compositions: components["schemas"]["CompositionApiResponse"][];
1081
+ /** @description Total number of compositions that match the query. Only present when `withTotalCount` option is true. */
1082
+ totalCount?: number;
1083
+ };
1084
+ };
1085
+ }
1086
+ interface external$3 {
1087
+ "swagger.yml": {
1088
+ paths: {};
1089
+ components: {
1090
+ schemas: {
1091
+ Error: {
1092
+ /** @description Error message(s) that occurred while processing the request */
1093
+ errorMessage?: string[] | string;
1094
+ };
1095
+ };
1096
+ responses: {
1097
+ /** Request input validation failed */
1098
+ BadRequestError: {
1099
+ content: {
1100
+ "application/json": external$3["swagger.yml"]["components"]["schemas"]["Error"];
1101
+ };
1102
+ };
1103
+ /** API key or token was not valid */
1104
+ UnauthorizedError: {
1105
+ content: {
1106
+ "application/json": external$3["swagger.yml"]["components"]["schemas"]["Error"];
1107
+ };
1108
+ };
1109
+ /** Permission was denied */
1110
+ ForbiddenError: {
1111
+ content: {
1112
+ "application/json": external$3["swagger.yml"]["components"]["schemas"]["Error"];
1113
+ };
1114
+ };
1115
+ /** Resource not found */
1116
+ NotFoundError: {
1117
+ content: {
1118
+ "application/json": external$3["swagger.yml"]["components"]["schemas"]["Error"];
1119
+ };
1120
+ };
1121
+ /** Too many requests in allowed time period */
1122
+ RateLimitError: unknown;
1123
+ /** Execution error occurred */
1124
+ InternalServerError: unknown;
1125
+ };
1126
+ };
1127
+ operations: {};
1128
+ };
1129
+ "uniform-canvas-types.swagger.yml": {
1130
+ paths: {};
1131
+ components: {
1132
+ schemas: {
1133
+ /** @description Public ID (used in code). Do not change after creation. */
1134
+ PublicIdProperty: string;
1135
+ /** @description The definition of a component parameter */
1136
+ ComponentDefinitionParameter: {
1137
+ id: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
1138
+ /** @description Friendly name of the parameter */
1139
+ name: string;
1140
+ /** @description Appears next to the parameter in the Composition editor */
1141
+ helpText?: string;
1142
+ /** @description Type name of the parameter (provided by a Uniform integration) */
1143
+ type: string;
1144
+ /** @description The configuration object for the type (type-specific) */
1145
+ typeConfig?: unknown;
1146
+ };
1147
+ /** @description The definition of a named component slot that can contain other components */
1148
+ ComponentDefinitionSlot: {
1149
+ id: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
1150
+ /** @description Friendly name of the slot */
1151
+ name: string;
1152
+ /** @description A list of component definition public IDs that are allowed in this named slot */
1153
+ allowedComponents: string[];
1154
+ /**
1155
+ * @description Whether this slot inherits its allowed components from the parent slot it lives in. If true, allowedComponents is irrelevant.
1156
+ * @default false
1157
+ */
1158
+ inheritAllowedComponents: boolean;
1159
+ /** @description Minimum valid number of components in this slot */
1160
+ minComponents?: number;
1161
+ /** @description Maximum valid number of components in this slot */
1162
+ maxComponents?: number;
1163
+ };
1164
+ /** @description The definition of a composition's slug settings */
1165
+ ComponentDefinitionSlugSettings: {
1166
+ /**
1167
+ * @description Whether the slug is required
1168
+ * no: slug is optional
1169
+ * yes: slug is required
1170
+ * disabled: slug is disabled and will not be shown in the editor
1171
+ *
1172
+ * @default no
1173
+ * @enum {string}
1174
+ */
1175
+ required?: "no" | "yes" | "disabled";
1176
+ /**
1177
+ * @description Slug uniqueness configuration.
1178
+ * no = no unique constraint
1179
+ * local = must be unique within this component type
1180
+ * global = must be unique across all component types
1181
+ *
1182
+ * @enum {string}
1183
+ */
1184
+ unique?: "no" | "local" | "global";
1185
+ /** @description Regular expression slugs must match */
1186
+ regularExpression?: string;
1187
+ /**
1188
+ * @description Custom error message when regular expression validation fails.
1189
+ * Has no effect if `regularExpression` is not set.
1190
+ */
1191
+ regularExpressionMessage?: string;
1192
+ };
1193
+ /** @description The definition of a component variant */
1194
+ ComponentDefinitionVariant: {
1195
+ id: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
1196
+ /** @description Friendly name of the variant */
1197
+ name: string;
1198
+ };
1199
+ /** @description Permission set for a component defintion */
1200
+ ComponentDefinitionPermission: {
1201
+ roleId: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
1202
+ /**
1203
+ * @description Permission type for this permission ComponentDefinition:
1204
+ * read | write | create | delete
1205
+ *
1206
+ * @enum {string}
1207
+ */
1208
+ permission: "read" | "write" | "create" | "delete";
1209
+ /** @description State of the component that this permission applies to */
1210
+ state: number;
1211
+ };
1212
+ /** @description Defines a component type that can live on a Composition */
1213
+ ComponentDefinition: {
1214
+ id: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
1215
+ /** @description Friendly name of the component definition */
1216
+ name: string;
1217
+ /**
1218
+ * @description Icon name or URL for the component definition (e.g. 'screen' or 'https://s3/my-component.jpg')
1219
+ * @default screen
1220
+ */
1221
+ icon?: string;
1222
+ /**
1223
+ * @description The public ID of the parameter whose value should be used to create a display title for this component in the UI.
1224
+ * The parameter type must support being used as a title parameter for this to work.
1225
+ */
1226
+ titleParameter?: string | null;
1227
+ /**
1228
+ * @description Whether this component type can be the root of a composition. If false, this component is only used within slots on other components.
1229
+ * @default false
1230
+ */
1231
+ canBeComposition?: boolean;
1232
+ /** @description The parameters for this component. Parameters are key-value pairs that can be anything from text values to links to CMS entries. */
1233
+ parameters?: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionParameter"][];
1234
+ /**
1235
+ * @description if this component uses team permissions or custom permissions
1236
+ * @default true
1237
+ */
1238
+ useTeamPermissions?: boolean;
1239
+ /** @description Custom role permissions for this component definition */
1240
+ permissions?: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionPermission"][];
1241
+ /** @description The named slots for this component; placement areas where arrays of other components can be added. */
1242
+ slots?: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionSlot"][];
1243
+ slugSettings?: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionSlugSettings"];
1244
+ /** @description Default component instance value */
1245
+ defaults?: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"] | null;
1246
+ /** @description Named variants for this component; enables creation of visual variants that use the same parameter data */
1247
+ variants?: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionVariant"][];
1248
+ /** @description Created date string for this definition (ignored for writes) */
1249
+ created?: string;
1250
+ /** @description Last modified date string for this definition (ignored for writes) */
1251
+ updated?: string;
1252
+ };
1253
+ /** @description Defines an editable parameter on a component. */
1254
+ ComponentParameter: {
1255
+ /** @description The value of the parameter. Any JSON-serializable value is acceptable. */
1256
+ value: unknown;
1257
+ /** @description The type of the parameter. Determines how it is displayed when editing, and tells the consumer how to process it. */
1258
+ type: string;
1259
+ binding?: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameterBinding"];
1260
+ };
1261
+ /**
1262
+ * @deprecated
1263
+ * @description Defines a binding from a resource data value to a component parameter value. Do not use.
1264
+ */
1265
+ ComponentParameterBinding: {
1266
+ /** @description A JSON Pointer expression that defines the binding directly to the parameter value */
1267
+ pointer: string;
1268
+ /**
1269
+ * @description The syntax of the binding (currently always 'jptr')
1270
+ * @enum {string}
1271
+ */
1272
+ syntax: "jptr";
1273
+ /**
1274
+ * @description Whether the binding should cause an error if it cannot be resolved.
1275
+ * If true, and the binding cannot be resolved, an error will be returned by the binding process.
1276
+ * If false, and the binding cannot be resolved, the parameter will be removed from the bound composition.
1277
+ *
1278
+ * @default false
1279
+ */
1280
+ required?: boolean;
1281
+ };
1282
+ /** @description Defines the shape of a component instance served by the composition API. */
1283
+ ComponentInstance: {
1284
+ /** @description Type of the component instance (public_id of its definition) */
1285
+ type: string;
1286
+ /** @description Component parameter values for the component instance */
1287
+ parameters?: {
1288
+ [key: string]: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameter"];
1289
+ };
1290
+ /** @description Public ID of alternate visual appearance for this component, if any selected */
1291
+ variant?: string;
1292
+ /** @description Slots containing any child components */
1293
+ slots?: {
1294
+ [key: string]: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"][];
1295
+ };
1296
+ /** @description Unique identifier of the component within the composition. This is not set unless specifically requested via `withComponentIDs` API parameter. */
1297
+ _id?: string;
1298
+ /** @description Indicates this component instance should be sourced from a pattern library pattern. */
1299
+ _pattern?: string;
1300
+ _data?: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinitions"];
1301
+ /**
1302
+ * @deprecated
1303
+ * @description Data definitions coming from a pattern resolved for this component. Merged with _data during resolution.
1304
+ * Means nothing for PUTs; it will be ignored.
1305
+ */
1306
+ _patternData?: {
1307
+ [key: string]: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinition"];
1308
+ };
1309
+ /**
1310
+ * @description Describes why the pattern could not be resolved, if a pattern could not be resolved. For PUTs, this is allowed but ignored.
1311
+ * CYCLIC: A cyclic pattern graph was detected, which could not be resolved because it would cause an infinite loop.
1312
+ * NOTFOUND: The pattern ID referenced could not be found. It may have been deleted, or not be published yet.
1313
+ * Means nothing for PUTs; it will be ignored.
1314
+ *
1315
+ * @enum {string}
1316
+ */
1317
+ _patternError?: "NOTFOUND" | "CYCLIC";
1318
+ };
1319
+ /** @description Defines the shape of the root component in a composition */
1320
+ RootComponentInstance: {
1321
+ /** @description Type of the component instance (public_id of its definition) */
1322
+ type: string;
1323
+ /** @description Component parameter values for the component instance */
1324
+ parameters?: {
1325
+ [key: string]: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameter"];
1326
+ };
1327
+ /** @description Public ID of alternate visual appearance for this component, if any selected */
1328
+ variant?: string;
1329
+ /** @description Slots containing any child components */
1330
+ slots?: {
1331
+ [key: string]: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"][];
1332
+ };
1333
+ /** @description The public UUID of the composition. */
1334
+ _id: string;
1335
+ /** @description Slug pattern of this component. */
1336
+ _slug?: string | null;
1337
+ /** @description Friendly name of this component. */
1338
+ _name: string;
1339
+ _data?: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinitions"];
1340
+ };
1341
+ /**
1342
+ * @deprecated
1343
+ * @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.
1344
+ */
1345
+ DataConnectionInfo: {
1346
+ /** @description Public ID of the data connector */
1347
+ id: string;
1348
+ /** @description Display name of the data connector */
1349
+ displayName: string;
1350
+ /** @description The type of data connector this connects to (e.g. 'cms-items', provided by an intalled integration) */
1351
+ connectorType: string;
1352
+ /** @description Base resource URL of the data connector. No trailing slash. */
1353
+ baseUrl: string;
1354
+ };
1355
+ /**
1356
+ * @deprecated
1357
+ * @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.
1358
+ */
1359
+ DataConnection: {
1360
+ /** @description Public ID of the data connection */
1361
+ id: string;
1362
+ /** @description Display name of the data connection */
1363
+ displayName: string;
1364
+ /** @description The type of data connector this connects to (e.g. 'cms-items', provided by an intalled integration) */
1365
+ connectorType: string;
1366
+ /** @description Base resource URL of the data connection. No trailing slash. */
1367
+ baseUrl: string;
1368
+ /** @description HTTP headers to pass with requests to the data connection */
1369
+ headers?: {
1370
+ [key: string]: string;
1371
+ };
1372
+ /** @description Query String parameters to pass with requests to the data connection */
1373
+ parameters?: {
1374
+ [key: string]: string;
1375
+ };
1376
+ /** @description Variables needed to make calls to the data connection */
1377
+ variables?: {
1378
+ [key: string]: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataVariable"];
1379
+ };
1380
+ /** @description Custom configuration specific to the data connection being defined */
1381
+ custom?: {
1382
+ [key: string]: unknown;
1383
+ };
1384
+ };
1385
+ /**
1386
+ * @deprecated
1387
+ * @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.
1388
+ */
1389
+ DataType: {
1390
+ /** @description Public ID of the data type */
1391
+ id: string;
1392
+ /** @description Display name of the data type */
1393
+ displayName: string;
1394
+ /** @description Public ID of the associated data connection */
1395
+ connectionId: string;
1396
+ /**
1397
+ * @description A connector-specific archetype for this data type; used to select UI as well as perform any
1398
+ * necessary post-processing on the response. e.g. 'cms-entry', 'cms-query'. Can be undefined if
1399
+ * no special UI or processing is required.
1400
+ */
1401
+ archetype?: string;
1402
+ allowedOnComponents?: string[];
1403
+ /** @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. */
1404
+ path: string;
1405
+ /** @description HTTP headers to pass with requests to the data type. Merged with headers from the data connection, overriding identical keys. */
1406
+ headers?: {
1407
+ [key: string]: string;
1408
+ };
1409
+ /** @description Query String parameters to pass with requests to the data type. Merged with parameters from the data connection, overriding identical keys. */
1410
+ parameters?: {
1411
+ [key: string]: string;
1412
+ };
1413
+ /** @description Body to pass with requests to the data type (ignored unless method is POST) */
1414
+ body?: string;
1415
+ /**
1416
+ * @description HTTP method to use with requests to the data type.
1417
+ * @default GET
1418
+ * @enum {string}
1419
+ */
1420
+ method: "GET" | "POST" | "HEAD";
1421
+ /** @description Variables needed to make calls to the data type. Merged with variables from the data connection, overriding identical keys. */
1422
+ variables?: {
1423
+ [key: string]: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataVariable"];
1424
+ };
1425
+ /** @description Custom configuration specific to the data connection being defined */
1426
+ custom?: {
1427
+ [key: string]: unknown;
1428
+ };
1429
+ };
1430
+ /**
1431
+ * @deprecated
1432
+ * @description Defines the shape of a data variable on a Data Connector or Data Type
1433
+ */
1434
+ DataVariable: {
1435
+ /** @description Display name of the data variable */
1436
+ displayName?: string;
1437
+ /**
1438
+ * @description Type of the data variable
1439
+ * @default text
1440
+ */
1441
+ type: string;
1442
+ /** @description Default value of the data variable */
1443
+ default: string;
1444
+ /**
1445
+ * @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).
1446
+ * @enum {string}
1447
+ */
1448
+ setBy: "static" | "dynamic";
1449
+ };
1450
+ /**
1451
+ * @deprecated
1452
+ * @description Data definitions attached to this component. The property name is the key of the data in the data document.
1453
+ * Note: data definitions are inherited from ancestors at runtime (and may be overridden by descendants that use the same key).
1454
+ */
1455
+ CompositionDataDefinitions: {
1456
+ [key: string]: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinition"];
1457
+ };
1458
+ /**
1459
+ * @deprecated
1460
+ * @description Data definition attached to this component
1461
+ */
1462
+ CompositionDataDefinition: {
1463
+ /** @description Public ID of the data type that provides this data */
1464
+ type: string;
1465
+ /** @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. */
1466
+ isPatternParameter?: boolean;
1467
+ variables?: external$3["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataVariables"];
1468
+ };
1469
+ /**
1470
+ * @deprecated
1471
+ * @description Static variable values for this composition.
1472
+ */
1473
+ CompositionDataVariables: {
1474
+ [key: string]: string;
1475
+ };
1476
+ };
1477
+ };
1478
+ operations: {};
1479
+ };
1480
+ }
1481
+
1482
+ declare type Components = components['schemas'];
1483
+ declare type SharedComponents = components$1['schemas'];
1484
+ declare type Api = paths$3['/api/v1/canvas'];
1485
+ /** Query parameter options for GET /api/v1/canvas */
1486
+ declare type CompositionGetParameters = Omit<Api['get']['parameters']['query'], 'type'> & {
1487
+ type?: string | string[];
1488
+ };
1489
+ declare type CompositionGetOrderBy = NonNullable<Api['get']['parameters']['query']['orderBy']>[0];
1490
+ /** The GET response from /api/v1/canvas when `component` or `slug` params are specified */
1491
+ declare type CompositionGetResponse = Components['CompositionApiResponse'];
1492
+ /** @deprecated - internal use, do not rely on this value */
1493
+ declare type CompositionUIStatus = NonNullable<Components['CompositionApiResponse']['uiStatus']>;
1494
+ /** The GET response from /api/v1/canvas when `component` or `slug` are not specified */
1495
+ declare type CompositionGetListResponse = Components['CompositionListResponse'];
1496
+ /** The PUT request body for /api/v1/canvas */
1497
+ declare type CompositionPutParameters = Api['put']['requestBody']['content']['application/json'];
1498
+ /** Shape of the DELETE request body for /api/v1/canvas */
1499
+ declare type CompositionDeleteParameters = Api['delete']['requestBody']['content']['application/json'];
1500
+ /** @deprecated use CompositionGetResponse */
1501
+ declare type CompositionAPIResponse = CompositionGetResponse;
1502
+ /** @deprecated use CompositionDeleteParameters */
1503
+ declare type CompositionAPIDeleteRequest = CompositionDeleteParameters;
1504
+ /** @deprecated use CompositionGetParameters */
1505
+ declare type CompositionListAPIResponse = CompositionGetListResponse;
1506
+ /** @deprecated use CompositionGetParameters */
1507
+ declare type CompositionAPIOptions = CompositionGetParameters;
1508
+ /** Defines an editable parameter on a component. */
1509
+ declare type ComponentParameter<TValue = unknown> = Omit<SharedComponents['ComponentParameter'], 'value'> & {
1510
+ /** The type of the parameter. Determines how it is displayed when editing, and tells the consumer how to process it. */
1511
+ value: TValue;
1512
+ };
1513
+ /** Defines a binding from a resource data value to a component parameter value. */
1514
+ declare type ComponentParameterBinding = SharedComponents['ComponentParameterBinding'];
1515
+ /** Variables defined for this composition. */
1516
+ declare type CompositionDataVariables = SharedComponents['CompositionDataVariables'];
1517
+ /** Defines the shape of a resource bound to a composition */
1518
+ declare type CompositionDataDefinitions = SharedComponents['CompositionDataDefinitions'];
1519
+ /** Defines the shape of a resource bound to a composition */
1520
+ declare type CompositionDataDefinition = SharedComponents['CompositionDataDefinition'];
1521
+ /** Defines the shape of a component instance served by the composition API. */
1522
+ declare type ComponentInstance = SharedComponents['ComponentInstance'] & {
1523
+ /** Data for the component instance, provided by a component enhancer. Never set in unenhanced data. */
1524
+ data?: Record<string, unknown>;
1525
+ };
1526
+ /** Defines the shape of the root component in a composition */
1527
+ declare type RootComponentInstance = SharedComponents['RootComponentInstance'];
1528
+ /** Defines single structure to keep all canvas models (used in CLI commands and Starter content generations) */
1529
+ declare type CanvasDefinitions = {
1530
+ components?: Array<ComponentDefinition>;
1531
+ compositions?: Array<CompositionGetResponse>;
1532
+ dataTypes?: Array<DataType>;
1533
+ };
1534
+
1535
+ /**
1536
+ * This file was auto-generated by openapi-typescript.
1537
+ * Do not make direct changes to the file.
1538
+ */
1539
+ interface paths$2 {
1540
+ "/api/v1/data-types": {
1541
+ get: {
1542
+ parameters: {
1543
+ query: {
1544
+ projectId: string;
1545
+ };
1546
+ };
1547
+ responses: {
1548
+ /** OK */
1549
+ 200: {
1550
+ content: {
1551
+ "application/json": {
1552
+ results: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataType"][];
1553
+ };
1554
+ };
1555
+ };
1556
+ 400: external$2["swagger.yml"]["components"]["responses"]["BadRequestError"];
1557
+ 401: external$2["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
1558
+ 403: external$2["swagger.yml"]["components"]["responses"]["ForbiddenError"];
1559
+ 429: external$2["swagger.yml"]["components"]["responses"]["RateLimitError"];
1560
+ 500: external$2["swagger.yml"]["components"]["responses"]["InternalServerError"];
1561
+ };
1562
+ };
1563
+ put: {
1564
+ responses: {
1565
+ /** OK */
1566
+ 204: never;
1567
+ 400: external$2["swagger.yml"]["components"]["responses"]["BadRequestError"];
1568
+ 401: external$2["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
1569
+ 403: external$2["swagger.yml"]["components"]["responses"]["ForbiddenError"];
1570
+ 429: external$2["swagger.yml"]["components"]["responses"]["RateLimitError"];
1571
+ 500: external$2["swagger.yml"]["components"]["responses"]["InternalServerError"];
1572
+ };
1573
+ requestBody: {
1574
+ content: {
1575
+ "application/json": {
1576
+ data: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataType"];
1577
+ /** Format: uuid */
1578
+ projectId: string;
1579
+ };
1580
+ };
1581
+ };
1582
+ };
1583
+ delete: {
1584
+ responses: {
1585
+ /** OK */
1586
+ 204: never;
1587
+ 400: external$2["swagger.yml"]["components"]["responses"]["BadRequestError"];
1588
+ 401: external$2["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
1589
+ 403: external$2["swagger.yml"]["components"]["responses"]["ForbiddenError"];
1590
+ 429: external$2["swagger.yml"]["components"]["responses"]["RateLimitError"];
1591
+ 500: external$2["swagger.yml"]["components"]["responses"]["InternalServerError"];
1592
+ };
1593
+ requestBody: {
1594
+ content: {
1595
+ "application/json": {
1596
+ typeId: string;
1597
+ /** Format: uuid */
1598
+ projectId: string;
1599
+ };
1600
+ };
1601
+ };
1602
+ };
1603
+ };
1604
+ }
1605
+ interface external$2 {
1606
+ "swagger.yml": {
1607
+ paths: {};
1608
+ components: {
1609
+ schemas: {
1610
+ Error: {
1611
+ /** @description Error message(s) that occurred while processing the request */
1612
+ errorMessage?: string[] | string;
1613
+ };
1614
+ };
1615
+ responses: {
1616
+ /** Request input validation failed */
1617
+ BadRequestError: {
1618
+ content: {
1619
+ "application/json": external$2["swagger.yml"]["components"]["schemas"]["Error"];
1620
+ };
1621
+ };
1622
+ /** API key or token was not valid */
1623
+ UnauthorizedError: {
1624
+ content: {
1625
+ "application/json": external$2["swagger.yml"]["components"]["schemas"]["Error"];
1626
+ };
1627
+ };
1628
+ /** Permission was denied */
1629
+ ForbiddenError: {
1630
+ content: {
1631
+ "application/json": external$2["swagger.yml"]["components"]["schemas"]["Error"];
1632
+ };
1633
+ };
1634
+ /** Resource not found */
1635
+ NotFoundError: {
1636
+ content: {
1637
+ "application/json": external$2["swagger.yml"]["components"]["schemas"]["Error"];
1638
+ };
1639
+ };
1640
+ /** Too many requests in allowed time period */
1641
+ RateLimitError: unknown;
1642
+ /** Execution error occurred */
1643
+ InternalServerError: unknown;
1644
+ };
1645
+ };
1646
+ operations: {};
1647
+ };
1648
+ "uniform-canvas-types.swagger.yml": {
1649
+ paths: {};
1650
+ components: {
1651
+ schemas: {
1652
+ /** @description Public ID (used in code). Do not change after creation. */
1653
+ PublicIdProperty: string;
1654
+ /** @description The definition of a component parameter */
1655
+ ComponentDefinitionParameter: {
1656
+ id: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
1657
+ /** @description Friendly name of the parameter */
1658
+ name: string;
1659
+ /** @description Appears next to the parameter in the Composition editor */
1660
+ helpText?: string;
1661
+ /** @description Type name of the parameter (provided by a Uniform integration) */
1662
+ type: string;
1663
+ /** @description The configuration object for the type (type-specific) */
1664
+ typeConfig?: unknown;
1665
+ };
1666
+ /** @description The definition of a named component slot that can contain other components */
1667
+ ComponentDefinitionSlot: {
1668
+ id: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
1669
+ /** @description Friendly name of the slot */
1670
+ name: string;
1671
+ /** @description A list of component definition public IDs that are allowed in this named slot */
1672
+ allowedComponents: string[];
1673
+ /**
1674
+ * @description Whether this slot inherits its allowed components from the parent slot it lives in. If true, allowedComponents is irrelevant.
1675
+ * @default false
1676
+ */
1677
+ inheritAllowedComponents: boolean;
1678
+ /** @description Minimum valid number of components in this slot */
1679
+ minComponents?: number;
1680
+ /** @description Maximum valid number of components in this slot */
1681
+ maxComponents?: number;
1682
+ };
1683
+ /** @description The definition of a composition's slug settings */
1684
+ ComponentDefinitionSlugSettings: {
1685
+ /**
1686
+ * @description Whether the slug is required
1687
+ * no: slug is optional
1688
+ * yes: slug is required
1689
+ * disabled: slug is disabled and will not be shown in the editor
1690
+ *
1691
+ * @default no
1692
+ * @enum {string}
1693
+ */
1694
+ required?: "no" | "yes" | "disabled";
1695
+ /**
1696
+ * @description Slug uniqueness configuration.
1697
+ * no = no unique constraint
1698
+ * local = must be unique within this component type
1699
+ * global = must be unique across all component types
1700
+ *
1701
+ * @enum {string}
1702
+ */
1703
+ unique?: "no" | "local" | "global";
1704
+ /** @description Regular expression slugs must match */
1705
+ regularExpression?: string;
1706
+ /**
1707
+ * @description Custom error message when regular expression validation fails.
1708
+ * Has no effect if `regularExpression` is not set.
1709
+ */
1710
+ regularExpressionMessage?: string;
1711
+ };
1712
+ /** @description The definition of a component variant */
1713
+ ComponentDefinitionVariant: {
1714
+ id: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
1715
+ /** @description Friendly name of the variant */
1716
+ name: string;
1717
+ };
1718
+ /** @description Permission set for a component defintion */
1719
+ ComponentDefinitionPermission: {
1720
+ roleId: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
1721
+ /**
1722
+ * @description Permission type for this permission ComponentDefinition:
1723
+ * read | write | create | delete
1724
+ *
1725
+ * @enum {string}
1726
+ */
1727
+ permission: "read" | "write" | "create" | "delete";
1728
+ /** @description State of the component that this permission applies to */
1729
+ state: number;
1730
+ };
1731
+ /** @description Defines a component type that can live on a Composition */
1732
+ ComponentDefinition: {
1733
+ id: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
1734
+ /** @description Friendly name of the component definition */
1735
+ name: string;
1736
+ /**
1737
+ * @description Icon name or URL for the component definition (e.g. 'screen' or 'https://s3/my-component.jpg')
1738
+ * @default screen
1739
+ */
1740
+ icon?: string;
1741
+ /**
1742
+ * @description The public ID of the parameter whose value should be used to create a display title for this component in the UI.
1743
+ * The parameter type must support being used as a title parameter for this to work.
1744
+ */
1745
+ titleParameter?: string | null;
1746
+ /**
1747
+ * @description Whether this component type can be the root of a composition. If false, this component is only used within slots on other components.
1748
+ * @default false
1749
+ */
1750
+ canBeComposition?: boolean;
1751
+ /** @description The parameters for this component. Parameters are key-value pairs that can be anything from text values to links to CMS entries. */
1752
+ parameters?: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionParameter"][];
1753
+ /**
1754
+ * @description if this component uses team permissions or custom permissions
1755
+ * @default true
1756
+ */
1757
+ useTeamPermissions?: boolean;
1758
+ /** @description Custom role permissions for this component definition */
1759
+ permissions?: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionPermission"][];
1760
+ /** @description The named slots for this component; placement areas where arrays of other components can be added. */
1761
+ slots?: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionSlot"][];
1762
+ slugSettings?: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionSlugSettings"];
1763
+ /** @description Default component instance value */
1764
+ defaults?: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"] | null;
1765
+ /** @description Named variants for this component; enables creation of visual variants that use the same parameter data */
1766
+ variants?: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionVariant"][];
1767
+ /** @description Created date string for this definition (ignored for writes) */
1768
+ created?: string;
1769
+ /** @description Last modified date string for this definition (ignored for writes) */
1770
+ updated?: string;
1771
+ };
1772
+ /** @description Defines an editable parameter on a component. */
1773
+ ComponentParameter: {
1774
+ /** @description The value of the parameter. Any JSON-serializable value is acceptable. */
1775
+ value: unknown;
1776
+ /** @description The type of the parameter. Determines how it is displayed when editing, and tells the consumer how to process it. */
1777
+ type: string;
1778
+ binding?: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameterBinding"];
1779
+ };
1780
+ /**
1781
+ * @deprecated
1782
+ * @description Defines a binding from a resource data value to a component parameter value. Do not use.
1783
+ */
1784
+ ComponentParameterBinding: {
1785
+ /** @description A JSON Pointer expression that defines the binding directly to the parameter value */
1786
+ pointer: string;
1787
+ /**
1788
+ * @description The syntax of the binding (currently always 'jptr')
1789
+ * @enum {string}
1790
+ */
1791
+ syntax: "jptr";
1792
+ /**
1793
+ * @description Whether the binding should cause an error if it cannot be resolved.
1794
+ * If true, and the binding cannot be resolved, an error will be returned by the binding process.
1795
+ * If false, and the binding cannot be resolved, the parameter will be removed from the bound composition.
1796
+ *
1797
+ * @default false
1798
+ */
1799
+ required?: boolean;
1800
+ };
1801
+ /** @description Defines the shape of a component instance served by the composition API. */
1802
+ ComponentInstance: {
1803
+ /** @description Type of the component instance (public_id of its definition) */
1804
+ type: string;
1805
+ /** @description Component parameter values for the component instance */
1806
+ parameters?: {
1807
+ [key: string]: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameter"];
1808
+ };
1809
+ /** @description Public ID of alternate visual appearance for this component, if any selected */
1810
+ variant?: string;
1811
+ /** @description Slots containing any child components */
1812
+ slots?: {
1813
+ [key: string]: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"][];
1814
+ };
1815
+ /** @description Unique identifier of the component within the composition. This is not set unless specifically requested via `withComponentIDs` API parameter. */
1816
+ _id?: string;
1817
+ /** @description Indicates this component instance should be sourced from a pattern library pattern. */
1818
+ _pattern?: string;
1819
+ _data?: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinitions"];
1820
+ /**
1821
+ * @deprecated
1822
+ * @description Data definitions coming from a pattern resolved for this component. Merged with _data during resolution.
1823
+ * Means nothing for PUTs; it will be ignored.
1824
+ */
1825
+ _patternData?: {
1826
+ [key: string]: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinition"];
1827
+ };
1828
+ /**
1829
+ * @description Describes why the pattern could not be resolved, if a pattern could not be resolved. For PUTs, this is allowed but ignored.
1830
+ * CYCLIC: A cyclic pattern graph was detected, which could not be resolved because it would cause an infinite loop.
1831
+ * NOTFOUND: The pattern ID referenced could not be found. It may have been deleted, or not be published yet.
1832
+ * Means nothing for PUTs; it will be ignored.
1833
+ *
1834
+ * @enum {string}
1835
+ */
1836
+ _patternError?: "NOTFOUND" | "CYCLIC";
1837
+ };
1838
+ /** @description Defines the shape of the root component in a composition */
1839
+ RootComponentInstance: {
1840
+ /** @description Type of the component instance (public_id of its definition) */
1841
+ type: string;
1842
+ /** @description Component parameter values for the component instance */
1843
+ parameters?: {
1844
+ [key: string]: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameter"];
1845
+ };
1846
+ /** @description Public ID of alternate visual appearance for this component, if any selected */
1847
+ variant?: string;
1848
+ /** @description Slots containing any child components */
1849
+ slots?: {
1850
+ [key: string]: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"][];
1851
+ };
1852
+ /** @description The public UUID of the composition. */
1853
+ _id: string;
1854
+ /** @description Slug pattern of this component. */
1855
+ _slug?: string | null;
1856
+ /** @description Friendly name of this component. */
1857
+ _name: string;
1858
+ _data?: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinitions"];
1859
+ };
1860
+ /**
1861
+ * @deprecated
1862
+ * @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.
1863
+ */
1864
+ DataConnectionInfo: {
1865
+ /** @description Public ID of the data connector */
1866
+ id: string;
1867
+ /** @description Display name of the data connector */
1868
+ displayName: string;
1869
+ /** @description The type of data connector this connects to (e.g. 'cms-items', provided by an intalled integration) */
1870
+ connectorType: string;
1871
+ /** @description Base resource URL of the data connector. No trailing slash. */
1872
+ baseUrl: string;
1873
+ };
1874
+ /**
1875
+ * @deprecated
1876
+ * @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.
1877
+ */
1878
+ DataConnection: {
1879
+ /** @description Public ID of the data connection */
1880
+ id: string;
1881
+ /** @description Display name of the data connection */
1882
+ displayName: string;
1883
+ /** @description The type of data connector this connects to (e.g. 'cms-items', provided by an intalled integration) */
1884
+ connectorType: string;
1885
+ /** @description Base resource URL of the data connection. No trailing slash. */
1886
+ baseUrl: string;
1887
+ /** @description HTTP headers to pass with requests to the data connection */
1888
+ headers?: {
1889
+ [key: string]: string;
1890
+ };
1891
+ /** @description Query String parameters to pass with requests to the data connection */
1892
+ parameters?: {
1893
+ [key: string]: string;
1894
+ };
1895
+ /** @description Variables needed to make calls to the data connection */
1896
+ variables?: {
1897
+ [key: string]: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataVariable"];
1898
+ };
1899
+ /** @description Custom configuration specific to the data connection being defined */
1900
+ custom?: {
1901
+ [key: string]: unknown;
1902
+ };
1903
+ };
1904
+ /**
1905
+ * @deprecated
1906
+ * @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.
1907
+ */
1908
+ DataType: {
1909
+ /** @description Public ID of the data type */
1910
+ id: string;
1911
+ /** @description Display name of the data type */
1912
+ displayName: string;
1913
+ /** @description Public ID of the associated data connection */
1914
+ connectionId: string;
1915
+ /**
1916
+ * @description A connector-specific archetype for this data type; used to select UI as well as perform any
1917
+ * necessary post-processing on the response. e.g. 'cms-entry', 'cms-query'. Can be undefined if
1918
+ * no special UI or processing is required.
1919
+ */
1920
+ archetype?: string;
1921
+ allowedOnComponents?: string[];
1922
+ /** @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. */
1923
+ path: string;
1924
+ /** @description HTTP headers to pass with requests to the data type. Merged with headers from the data connection, overriding identical keys. */
1925
+ headers?: {
1926
+ [key: string]: string;
1927
+ };
1928
+ /** @description Query String parameters to pass with requests to the data type. Merged with parameters from the data connection, overriding identical keys. */
1929
+ parameters?: {
1930
+ [key: string]: string;
1931
+ };
1932
+ /** @description Body to pass with requests to the data type (ignored unless method is POST) */
1933
+ body?: string;
1934
+ /**
1935
+ * @description HTTP method to use with requests to the data type.
1936
+ * @default GET
1937
+ * @enum {string}
1938
+ */
1939
+ method: "GET" | "POST" | "HEAD";
1940
+ /** @description Variables needed to make calls to the data type. Merged with variables from the data connection, overriding identical keys. */
1941
+ variables?: {
1942
+ [key: string]: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataVariable"];
1943
+ };
1944
+ /** @description Custom configuration specific to the data connection being defined */
1945
+ custom?: {
1946
+ [key: string]: unknown;
1947
+ };
1948
+ };
1949
+ /**
1950
+ * @deprecated
1951
+ * @description Defines the shape of a data variable on a Data Connector or Data Type
1952
+ */
1953
+ DataVariable: {
1954
+ /** @description Display name of the data variable */
1955
+ displayName?: string;
1956
+ /**
1957
+ * @description Type of the data variable
1958
+ * @default text
1959
+ */
1960
+ type: string;
1961
+ /** @description Default value of the data variable */
1962
+ default: string;
1963
+ /**
1964
+ * @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).
1965
+ * @enum {string}
1966
+ */
1967
+ setBy: "static" | "dynamic";
1968
+ };
1969
+ /**
1970
+ * @deprecated
1971
+ * @description Data definitions attached to this component. The property name is the key of the data in the data document.
1972
+ * Note: data definitions are inherited from ancestors at runtime (and may be overridden by descendants that use the same key).
1973
+ */
1974
+ CompositionDataDefinitions: {
1975
+ [key: string]: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinition"];
1976
+ };
1977
+ /**
1978
+ * @deprecated
1979
+ * @description Data definition attached to this component
1980
+ */
1981
+ CompositionDataDefinition: {
1982
+ /** @description Public ID of the data type that provides this data */
1983
+ type: string;
1984
+ /** @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. */
1985
+ isPatternParameter?: boolean;
1986
+ variables?: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataVariables"];
1987
+ };
1988
+ /**
1989
+ * @deprecated
1990
+ * @description Static variable values for this composition.
1991
+ */
1992
+ CompositionDataVariables: {
1993
+ [key: string]: string;
1994
+ };
1995
+ };
1996
+ };
1997
+ operations: {};
1998
+ };
1999
+ }
2000
+
2001
+ /**
2002
+ * This file was auto-generated by openapi-typescript.
2003
+ * Do not make direct changes to the file.
2004
+ */
2005
+ interface paths$1 {
2006
+ "/api/v1/data-connection": {
2007
+ get: {
2008
+ parameters: {
2009
+ query: {
2010
+ dataConnectionId: string;
2011
+ projectId: string;
2012
+ };
2013
+ };
2014
+ responses: {
2015
+ /** OK */
2016
+ 200: {
2017
+ content: {
2018
+ "application/json": {
2019
+ result: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataConnection"];
2020
+ };
2021
+ };
2022
+ };
2023
+ 400: external$1["swagger.yml"]["components"]["responses"]["BadRequestError"];
2024
+ 401: external$1["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
2025
+ 403: external$1["swagger.yml"]["components"]["responses"]["ForbiddenError"];
2026
+ 429: external$1["swagger.yml"]["components"]["responses"]["RateLimitError"];
2027
+ 500: external$1["swagger.yml"]["components"]["responses"]["InternalServerError"];
2028
+ };
2029
+ };
2030
+ put: {
2031
+ responses: {
2032
+ /** OK */
2033
+ 204: never;
2034
+ 400: external$1["swagger.yml"]["components"]["responses"]["BadRequestError"];
2035
+ 401: external$1["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
2036
+ 403: external$1["swagger.yml"]["components"]["responses"]["ForbiddenError"];
2037
+ 429: external$1["swagger.yml"]["components"]["responses"]["RateLimitError"];
2038
+ 500: external$1["swagger.yml"]["components"]["responses"]["InternalServerError"];
2039
+ };
2040
+ requestBody: {
2041
+ content: {
2042
+ "application/json": {
2043
+ data: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataConnection"];
2044
+ /** Format: uuid */
2045
+ projectId: string;
2046
+ /** Format: uuid */
2047
+ integrationId: string;
2048
+ };
2049
+ };
2050
+ };
2051
+ };
2052
+ delete: {
2053
+ responses: {
2054
+ /** OK */
2055
+ 204: never;
2056
+ 400: external$1["swagger.yml"]["components"]["responses"]["BadRequestError"];
2057
+ 401: external$1["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
2058
+ 403: external$1["swagger.yml"]["components"]["responses"]["ForbiddenError"];
2059
+ 429: external$1["swagger.yml"]["components"]["responses"]["RateLimitError"];
2060
+ 500: external$1["swagger.yml"]["components"]["responses"]["InternalServerError"];
2061
+ };
2062
+ requestBody: {
2063
+ content: {
2064
+ "application/json": {
2065
+ connectionId: string;
2066
+ /** Format: uuid */
2067
+ projectId: string;
2068
+ };
2069
+ };
2070
+ };
2071
+ };
2072
+ };
2073
+ }
2074
+ interface external$1 {
2075
+ "swagger.yml": {
2076
+ paths: {};
2077
+ components: {
2078
+ schemas: {
2079
+ Error: {
2080
+ /** @description Error message(s) that occurred while processing the request */
2081
+ errorMessage?: string[] | string;
2082
+ };
2083
+ };
2084
+ responses: {
2085
+ /** Request input validation failed */
2086
+ BadRequestError: {
2087
+ content: {
2088
+ "application/json": external$1["swagger.yml"]["components"]["schemas"]["Error"];
2089
+ };
2090
+ };
2091
+ /** API key or token was not valid */
2092
+ UnauthorizedError: {
2093
+ content: {
2094
+ "application/json": external$1["swagger.yml"]["components"]["schemas"]["Error"];
2095
+ };
2096
+ };
2097
+ /** Permission was denied */
2098
+ ForbiddenError: {
2099
+ content: {
2100
+ "application/json": external$1["swagger.yml"]["components"]["schemas"]["Error"];
2101
+ };
2102
+ };
2103
+ /** Resource not found */
2104
+ NotFoundError: {
2105
+ content: {
2106
+ "application/json": external$1["swagger.yml"]["components"]["schemas"]["Error"];
2107
+ };
2108
+ };
2109
+ /** Too many requests in allowed time period */
2110
+ RateLimitError: unknown;
2111
+ /** Execution error occurred */
2112
+ InternalServerError: unknown;
2113
+ };
2114
+ };
2115
+ operations: {};
2116
+ };
2117
+ "uniform-canvas-types.swagger.yml": {
2118
+ paths: {};
2119
+ components: {
2120
+ schemas: {
2121
+ /** @description Public ID (used in code). Do not change after creation. */
2122
+ PublicIdProperty: string;
2123
+ /** @description The definition of a component parameter */
2124
+ ComponentDefinitionParameter: {
2125
+ id: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
2126
+ /** @description Friendly name of the parameter */
2127
+ name: string;
2128
+ /** @description Appears next to the parameter in the Composition editor */
2129
+ helpText?: string;
2130
+ /** @description Type name of the parameter (provided by a Uniform integration) */
2131
+ type: string;
2132
+ /** @description The configuration object for the type (type-specific) */
2133
+ typeConfig?: unknown;
2134
+ };
2135
+ /** @description The definition of a named component slot that can contain other components */
2136
+ ComponentDefinitionSlot: {
2137
+ id: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
2138
+ /** @description Friendly name of the slot */
2139
+ name: string;
2140
+ /** @description A list of component definition public IDs that are allowed in this named slot */
2141
+ allowedComponents: string[];
2142
+ /**
2143
+ * @description Whether this slot inherits its allowed components from the parent slot it lives in. If true, allowedComponents is irrelevant.
2144
+ * @default false
2145
+ */
2146
+ inheritAllowedComponents: boolean;
2147
+ /** @description Minimum valid number of components in this slot */
2148
+ minComponents?: number;
2149
+ /** @description Maximum valid number of components in this slot */
2150
+ maxComponents?: number;
2151
+ };
2152
+ /** @description The definition of a composition's slug settings */
2153
+ ComponentDefinitionSlugSettings: {
2154
+ /**
2155
+ * @description Whether the slug is required
2156
+ * no: slug is optional
2157
+ * yes: slug is required
2158
+ * disabled: slug is disabled and will not be shown in the editor
2159
+ *
2160
+ * @default no
2161
+ * @enum {string}
2162
+ */
2163
+ required?: "no" | "yes" | "disabled";
2164
+ /**
2165
+ * @description Slug uniqueness configuration.
2166
+ * no = no unique constraint
2167
+ * local = must be unique within this component type
2168
+ * global = must be unique across all component types
2169
+ *
2170
+ * @enum {string}
2171
+ */
2172
+ unique?: "no" | "local" | "global";
2173
+ /** @description Regular expression slugs must match */
2174
+ regularExpression?: string;
2175
+ /**
2176
+ * @description Custom error message when regular expression validation fails.
2177
+ * Has no effect if `regularExpression` is not set.
2178
+ */
2179
+ regularExpressionMessage?: string;
2180
+ };
2181
+ /** @description The definition of a component variant */
2182
+ ComponentDefinitionVariant: {
2183
+ id: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
2184
+ /** @description Friendly name of the variant */
2185
+ name: string;
2186
+ };
2187
+ /** @description Permission set for a component defintion */
2188
+ ComponentDefinitionPermission: {
2189
+ roleId: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
2190
+ /**
2191
+ * @description Permission type for this permission ComponentDefinition:
2192
+ * read | write | create | delete
2193
+ *
2194
+ * @enum {string}
2195
+ */
2196
+ permission: "read" | "write" | "create" | "delete";
2197
+ /** @description State of the component that this permission applies to */
2198
+ state: number;
2199
+ };
2200
+ /** @description Defines a component type that can live on a Composition */
2201
+ ComponentDefinition: {
2202
+ id: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
2203
+ /** @description Friendly name of the component definition */
2204
+ name: string;
2205
+ /**
2206
+ * @description Icon name or URL for the component definition (e.g. 'screen' or 'https://s3/my-component.jpg')
2207
+ * @default screen
2208
+ */
2209
+ icon?: string;
2210
+ /**
2211
+ * @description The public ID of the parameter whose value should be used to create a display title for this component in the UI.
2212
+ * The parameter type must support being used as a title parameter for this to work.
2213
+ */
2214
+ titleParameter?: string | null;
2215
+ /**
2216
+ * @description Whether this component type can be the root of a composition. If false, this component is only used within slots on other components.
2217
+ * @default false
2218
+ */
2219
+ canBeComposition?: boolean;
2220
+ /** @description The parameters for this component. Parameters are key-value pairs that can be anything from text values to links to CMS entries. */
2221
+ parameters?: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionParameter"][];
2222
+ /**
2223
+ * @description if this component uses team permissions or custom permissions
2224
+ * @default true
2225
+ */
2226
+ useTeamPermissions?: boolean;
2227
+ /** @description Custom role permissions for this component definition */
2228
+ permissions?: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionPermission"][];
2229
+ /** @description The named slots for this component; placement areas where arrays of other components can be added. */
2230
+ slots?: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionSlot"][];
2231
+ slugSettings?: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionSlugSettings"];
2232
+ /** @description Default component instance value */
2233
+ defaults?: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"] | null;
2234
+ /** @description Named variants for this component; enables creation of visual variants that use the same parameter data */
2235
+ variants?: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionVariant"][];
2236
+ /** @description Created date string for this definition (ignored for writes) */
2237
+ created?: string;
2238
+ /** @description Last modified date string for this definition (ignored for writes) */
2239
+ updated?: string;
2240
+ };
2241
+ /** @description Defines an editable parameter on a component. */
2242
+ ComponentParameter: {
2243
+ /** @description The value of the parameter. Any JSON-serializable value is acceptable. */
2244
+ value: unknown;
2245
+ /** @description The type of the parameter. Determines how it is displayed when editing, and tells the consumer how to process it. */
2246
+ type: string;
2247
+ binding?: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameterBinding"];
2248
+ };
2249
+ /**
2250
+ * @deprecated
2251
+ * @description Defines a binding from a resource data value to a component parameter value. Do not use.
2252
+ */
2253
+ ComponentParameterBinding: {
2254
+ /** @description A JSON Pointer expression that defines the binding directly to the parameter value */
2255
+ pointer: string;
2256
+ /**
2257
+ * @description The syntax of the binding (currently always 'jptr')
2258
+ * @enum {string}
2259
+ */
2260
+ syntax: "jptr";
2261
+ /**
2262
+ * @description Whether the binding should cause an error if it cannot be resolved.
2263
+ * If true, and the binding cannot be resolved, an error will be returned by the binding process.
2264
+ * If false, and the binding cannot be resolved, the parameter will be removed from the bound composition.
2265
+ *
2266
+ * @default false
2267
+ */
2268
+ required?: boolean;
2269
+ };
2270
+ /** @description Defines the shape of a component instance served by the composition API. */
2271
+ ComponentInstance: {
2272
+ /** @description Type of the component instance (public_id of its definition) */
2273
+ type: string;
2274
+ /** @description Component parameter values for the component instance */
2275
+ parameters?: {
2276
+ [key: string]: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameter"];
2277
+ };
2278
+ /** @description Public ID of alternate visual appearance for this component, if any selected */
2279
+ variant?: string;
2280
+ /** @description Slots containing any child components */
2281
+ slots?: {
2282
+ [key: string]: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"][];
2283
+ };
2284
+ /** @description Unique identifier of the component within the composition. This is not set unless specifically requested via `withComponentIDs` API parameter. */
2285
+ _id?: string;
2286
+ /** @description Indicates this component instance should be sourced from a pattern library pattern. */
2287
+ _pattern?: string;
2288
+ _data?: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinitions"];
2289
+ /**
2290
+ * @deprecated
2291
+ * @description Data definitions coming from a pattern resolved for this component. Merged with _data during resolution.
2292
+ * Means nothing for PUTs; it will be ignored.
2293
+ */
2294
+ _patternData?: {
2295
+ [key: string]: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinition"];
2296
+ };
2297
+ /**
2298
+ * @description Describes why the pattern could not be resolved, if a pattern could not be resolved. For PUTs, this is allowed but ignored.
2299
+ * CYCLIC: A cyclic pattern graph was detected, which could not be resolved because it would cause an infinite loop.
2300
+ * NOTFOUND: The pattern ID referenced could not be found. It may have been deleted, or not be published yet.
2301
+ * Means nothing for PUTs; it will be ignored.
2302
+ *
2303
+ * @enum {string}
2304
+ */
2305
+ _patternError?: "NOTFOUND" | "CYCLIC";
2306
+ };
2307
+ /** @description Defines the shape of the root component in a composition */
2308
+ RootComponentInstance: {
2309
+ /** @description Type of the component instance (public_id of its definition) */
2310
+ type: string;
2311
+ /** @description Component parameter values for the component instance */
2312
+ parameters?: {
2313
+ [key: string]: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameter"];
2314
+ };
2315
+ /** @description Public ID of alternate visual appearance for this component, if any selected */
2316
+ variant?: string;
2317
+ /** @description Slots containing any child components */
2318
+ slots?: {
2319
+ [key: string]: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"][];
2320
+ };
2321
+ /** @description The public UUID of the composition. */
2322
+ _id: string;
2323
+ /** @description Slug pattern of this component. */
2324
+ _slug?: string | null;
2325
+ /** @description Friendly name of this component. */
2326
+ _name: string;
2327
+ _data?: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinitions"];
2328
+ };
2329
+ /**
2330
+ * @deprecated
2331
+ * @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.
2332
+ */
2333
+ DataConnectionInfo: {
2334
+ /** @description Public ID of the data connector */
2335
+ id: string;
2336
+ /** @description Display name of the data connector */
2337
+ displayName: string;
2338
+ /** @description The type of data connector this connects to (e.g. 'cms-items', provided by an intalled integration) */
2339
+ connectorType: string;
2340
+ /** @description Base resource URL of the data connector. No trailing slash. */
2341
+ baseUrl: string;
2342
+ };
2343
+ /**
2344
+ * @deprecated
2345
+ * @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.
2346
+ */
2347
+ DataConnection: {
2348
+ /** @description Public ID of the data connection */
2349
+ id: string;
2350
+ /** @description Display name of the data connection */
2351
+ displayName: string;
2352
+ /** @description The type of data connector this connects to (e.g. 'cms-items', provided by an intalled integration) */
2353
+ connectorType: string;
2354
+ /** @description Base resource URL of the data connection. No trailing slash. */
2355
+ baseUrl: string;
2356
+ /** @description HTTP headers to pass with requests to the data connection */
2357
+ headers?: {
2358
+ [key: string]: string;
2359
+ };
2360
+ /** @description Query String parameters to pass with requests to the data connection */
2361
+ parameters?: {
2362
+ [key: string]: string;
2363
+ };
2364
+ /** @description Variables needed to make calls to the data connection */
2365
+ variables?: {
2366
+ [key: string]: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataVariable"];
2367
+ };
2368
+ /** @description Custom configuration specific to the data connection being defined */
2369
+ custom?: {
2370
+ [key: string]: unknown;
2371
+ };
2372
+ };
2373
+ /**
2374
+ * @deprecated
2375
+ * @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.
2376
+ */
2377
+ DataType: {
2378
+ /** @description Public ID of the data type */
2379
+ id: string;
2380
+ /** @description Display name of the data type */
2381
+ displayName: string;
2382
+ /** @description Public ID of the associated data connection */
2383
+ connectionId: string;
2384
+ /**
2385
+ * @description A connector-specific archetype for this data type; used to select UI as well as perform any
2386
+ * necessary post-processing on the response. e.g. 'cms-entry', 'cms-query'. Can be undefined if
2387
+ * no special UI or processing is required.
2388
+ */
2389
+ archetype?: string;
2390
+ allowedOnComponents?: string[];
2391
+ /** @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. */
2392
+ path: string;
2393
+ /** @description HTTP headers to pass with requests to the data type. Merged with headers from the data connection, overriding identical keys. */
2394
+ headers?: {
2395
+ [key: string]: string;
2396
+ };
2397
+ /** @description Query String parameters to pass with requests to the data type. Merged with parameters from the data connection, overriding identical keys. */
2398
+ parameters?: {
2399
+ [key: string]: string;
2400
+ };
2401
+ /** @description Body to pass with requests to the data type (ignored unless method is POST) */
2402
+ body?: string;
2403
+ /**
2404
+ * @description HTTP method to use with requests to the data type.
2405
+ * @default GET
2406
+ * @enum {string}
2407
+ */
2408
+ method: "GET" | "POST" | "HEAD";
2409
+ /** @description Variables needed to make calls to the data type. Merged with variables from the data connection, overriding identical keys. */
2410
+ variables?: {
2411
+ [key: string]: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataVariable"];
2412
+ };
2413
+ /** @description Custom configuration specific to the data connection being defined */
2414
+ custom?: {
2415
+ [key: string]: unknown;
2416
+ };
2417
+ };
2418
+ /**
2419
+ * @deprecated
2420
+ * @description Defines the shape of a data variable on a Data Connector or Data Type
2421
+ */
2422
+ DataVariable: {
2423
+ /** @description Display name of the data variable */
2424
+ displayName?: string;
2425
+ /**
2426
+ * @description Type of the data variable
2427
+ * @default text
2428
+ */
2429
+ type: string;
2430
+ /** @description Default value of the data variable */
2431
+ default: string;
2432
+ /**
2433
+ * @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).
2434
+ * @enum {string}
2435
+ */
2436
+ setBy: "static" | "dynamic";
2437
+ };
2438
+ /**
2439
+ * @deprecated
2440
+ * @description Data definitions attached to this component. The property name is the key of the data in the data document.
2441
+ * Note: data definitions are inherited from ancestors at runtime (and may be overridden by descendants that use the same key).
2442
+ */
2443
+ CompositionDataDefinitions: {
2444
+ [key: string]: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinition"];
2445
+ };
2446
+ /**
2447
+ * @deprecated
2448
+ * @description Data definition attached to this component
2449
+ */
2450
+ CompositionDataDefinition: {
2451
+ /** @description Public ID of the data type that provides this data */
2452
+ type: string;
2453
+ /** @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. */
2454
+ isPatternParameter?: boolean;
2455
+ variables?: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataVariables"];
2456
+ };
2457
+ /**
2458
+ * @deprecated
2459
+ * @description Static variable values for this composition.
2460
+ */
2461
+ CompositionDataVariables: {
2462
+ [key: string]: string;
2463
+ };
2464
+ };
2465
+ };
2466
+ operations: {};
2467
+ };
2468
+ }
2469
+
2470
+ /**
2471
+ * This file was auto-generated by openapi-typescript.
2472
+ * Do not make direct changes to the file.
2473
+ */
2474
+ interface paths {
2475
+ "/api/v1/data-connections": {
2476
+ get: {
2477
+ parameters: {
2478
+ query: {
2479
+ projectId: string;
2480
+ };
2481
+ };
2482
+ responses: {
2483
+ /** OK */
2484
+ 200: {
2485
+ content: {
2486
+ "application/json": {
2487
+ results: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataConnectionInfo"][];
2488
+ };
2489
+ };
2490
+ };
2491
+ 400: external["swagger.yml"]["components"]["responses"]["BadRequestError"];
2492
+ 401: external["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
2493
+ 403: external["swagger.yml"]["components"]["responses"]["ForbiddenError"];
2494
+ 429: external["swagger.yml"]["components"]["responses"]["RateLimitError"];
2495
+ 500: external["swagger.yml"]["components"]["responses"]["InternalServerError"];
2496
+ };
2497
+ };
2498
+ };
2499
+ }
2500
+ interface external {
2501
+ "swagger.yml": {
2502
+ paths: {};
2503
+ components: {
2504
+ schemas: {
2505
+ Error: {
2506
+ /** @description Error message(s) that occurred while processing the request */
2507
+ errorMessage?: string[] | string;
2508
+ };
2509
+ };
2510
+ responses: {
2511
+ /** Request input validation failed */
2512
+ BadRequestError: {
2513
+ content: {
2514
+ "application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
2515
+ };
2516
+ };
2517
+ /** API key or token was not valid */
2518
+ UnauthorizedError: {
2519
+ content: {
2520
+ "application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
2521
+ };
2522
+ };
2523
+ /** Permission was denied */
2524
+ ForbiddenError: {
2525
+ content: {
2526
+ "application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
2527
+ };
2528
+ };
2529
+ /** Resource not found */
2530
+ NotFoundError: {
2531
+ content: {
2532
+ "application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
2533
+ };
2534
+ };
2535
+ /** Too many requests in allowed time period */
2536
+ RateLimitError: unknown;
2537
+ /** Execution error occurred */
2538
+ InternalServerError: unknown;
2539
+ };
2540
+ };
2541
+ operations: {};
2542
+ };
2543
+ "uniform-canvas-types.swagger.yml": {
2544
+ paths: {};
2545
+ components: {
2546
+ schemas: {
2547
+ /** @description Public ID (used in code). Do not change after creation. */
2548
+ PublicIdProperty: string;
2549
+ /** @description The definition of a component parameter */
2550
+ ComponentDefinitionParameter: {
2551
+ id: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
2552
+ /** @description Friendly name of the parameter */
2553
+ name: string;
2554
+ /** @description Appears next to the parameter in the Composition editor */
2555
+ helpText?: string;
2556
+ /** @description Type name of the parameter (provided by a Uniform integration) */
2557
+ type: string;
2558
+ /** @description The configuration object for the type (type-specific) */
2559
+ typeConfig?: unknown;
2560
+ };
2561
+ /** @description The definition of a named component slot that can contain other components */
2562
+ ComponentDefinitionSlot: {
2563
+ id: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
2564
+ /** @description Friendly name of the slot */
2565
+ name: string;
2566
+ /** @description A list of component definition public IDs that are allowed in this named slot */
2567
+ allowedComponents: string[];
2568
+ /**
2569
+ * @description Whether this slot inherits its allowed components from the parent slot it lives in. If true, allowedComponents is irrelevant.
2570
+ * @default false
2571
+ */
2572
+ inheritAllowedComponents: boolean;
2573
+ /** @description Minimum valid number of components in this slot */
2574
+ minComponents?: number;
2575
+ /** @description Maximum valid number of components in this slot */
2576
+ maxComponents?: number;
2577
+ };
2578
+ /** @description The definition of a composition's slug settings */
2579
+ ComponentDefinitionSlugSettings: {
2580
+ /**
2581
+ * @description Whether the slug is required
2582
+ * no: slug is optional
2583
+ * yes: slug is required
2584
+ * disabled: slug is disabled and will not be shown in the editor
2585
+ *
2586
+ * @default no
2587
+ * @enum {string}
2588
+ */
2589
+ required?: "no" | "yes" | "disabled";
2590
+ /**
2591
+ * @description Slug uniqueness configuration.
2592
+ * no = no unique constraint
2593
+ * local = must be unique within this component type
2594
+ * global = must be unique across all component types
2595
+ *
2596
+ * @enum {string}
2597
+ */
2598
+ unique?: "no" | "local" | "global";
2599
+ /** @description Regular expression slugs must match */
2600
+ regularExpression?: string;
2601
+ /**
2602
+ * @description Custom error message when regular expression validation fails.
2603
+ * Has no effect if `regularExpression` is not set.
2604
+ */
2605
+ regularExpressionMessage?: string;
2606
+ };
2607
+ /** @description The definition of a component variant */
2608
+ ComponentDefinitionVariant: {
2609
+ id: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
2610
+ /** @description Friendly name of the variant */
2611
+ name: string;
2612
+ };
2613
+ /** @description Permission set for a component defintion */
2614
+ ComponentDefinitionPermission: {
2615
+ roleId: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
2616
+ /**
2617
+ * @description Permission type for this permission ComponentDefinition:
2618
+ * read | write | create | delete
2619
+ *
2620
+ * @enum {string}
2621
+ */
2622
+ permission: "read" | "write" | "create" | "delete";
2623
+ /** @description State of the component that this permission applies to */
2624
+ state: number;
2625
+ };
2626
+ /** @description Defines a component type that can live on a Composition */
2627
+ ComponentDefinition: {
2628
+ id: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
2629
+ /** @description Friendly name of the component definition */
2630
+ name: string;
2631
+ /**
2632
+ * @description Icon name or URL for the component definition (e.g. 'screen' or 'https://s3/my-component.jpg')
2633
+ * @default screen
2634
+ */
2635
+ icon?: string;
2636
+ /**
2637
+ * @description The public ID of the parameter whose value should be used to create a display title for this component in the UI.
2638
+ * The parameter type must support being used as a title parameter for this to work.
2639
+ */
2640
+ titleParameter?: string | null;
2641
+ /**
2642
+ * @description Whether this component type can be the root of a composition. If false, this component is only used within slots on other components.
2643
+ * @default false
2644
+ */
2645
+ canBeComposition?: boolean;
2646
+ /** @description The parameters for this component. Parameters are key-value pairs that can be anything from text values to links to CMS entries. */
2647
+ parameters?: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionParameter"][];
2648
+ /**
2649
+ * @description if this component uses team permissions or custom permissions
2650
+ * @default true
2651
+ */
2652
+ useTeamPermissions?: boolean;
2653
+ /** @description Custom role permissions for this component definition */
2654
+ permissions?: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionPermission"][];
2655
+ /** @description The named slots for this component; placement areas where arrays of other components can be added. */
2656
+ slots?: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionSlot"][];
2657
+ slugSettings?: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionSlugSettings"];
2658
+ /** @description Default component instance value */
2659
+ defaults?: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"] | null;
2660
+ /** @description Named variants for this component; enables creation of visual variants that use the same parameter data */
2661
+ variants?: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionVariant"][];
2662
+ /** @description Created date string for this definition (ignored for writes) */
2663
+ created?: string;
2664
+ /** @description Last modified date string for this definition (ignored for writes) */
2665
+ updated?: string;
2666
+ };
2667
+ /** @description Defines an editable parameter on a component. */
2668
+ ComponentParameter: {
2669
+ /** @description The value of the parameter. Any JSON-serializable value is acceptable. */
2670
+ value: unknown;
2671
+ /** @description The type of the parameter. Determines how it is displayed when editing, and tells the consumer how to process it. */
2672
+ type: string;
2673
+ binding?: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameterBinding"];
2674
+ };
2675
+ /**
2676
+ * @deprecated
2677
+ * @description Defines a binding from a resource data value to a component parameter value. Do not use.
2678
+ */
2679
+ ComponentParameterBinding: {
2680
+ /** @description A JSON Pointer expression that defines the binding directly to the parameter value */
2681
+ pointer: string;
2682
+ /**
2683
+ * @description The syntax of the binding (currently always 'jptr')
2684
+ * @enum {string}
2685
+ */
2686
+ syntax: "jptr";
2687
+ /**
2688
+ * @description Whether the binding should cause an error if it cannot be resolved.
2689
+ * If true, and the binding cannot be resolved, an error will be returned by the binding process.
2690
+ * If false, and the binding cannot be resolved, the parameter will be removed from the bound composition.
2691
+ *
2692
+ * @default false
2693
+ */
2694
+ required?: boolean;
2695
+ };
2696
+ /** @description Defines the shape of a component instance served by the composition API. */
2697
+ ComponentInstance: {
2698
+ /** @description Type of the component instance (public_id of its definition) */
2699
+ type: string;
2700
+ /** @description Component parameter values for the component instance */
2701
+ parameters?: {
2702
+ [key: string]: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameter"];
2703
+ };
2704
+ /** @description Public ID of alternate visual appearance for this component, if any selected */
2705
+ variant?: string;
2706
+ /** @description Slots containing any child components */
2707
+ slots?: {
2708
+ [key: string]: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"][];
2709
+ };
2710
+ /** @description Unique identifier of the component within the composition. This is not set unless specifically requested via `withComponentIDs` API parameter. */
2711
+ _id?: string;
2712
+ /** @description Indicates this component instance should be sourced from a pattern library pattern. */
2713
+ _pattern?: string;
2714
+ _data?: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinitions"];
2715
+ /**
2716
+ * @deprecated
2717
+ * @description Data definitions coming from a pattern resolved for this component. Merged with _data during resolution.
2718
+ * Means nothing for PUTs; it will be ignored.
2719
+ */
2720
+ _patternData?: {
2721
+ [key: string]: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinition"];
2722
+ };
2723
+ /**
2724
+ * @description Describes why the pattern could not be resolved, if a pattern could not be resolved. For PUTs, this is allowed but ignored.
2725
+ * CYCLIC: A cyclic pattern graph was detected, which could not be resolved because it would cause an infinite loop.
2726
+ * NOTFOUND: The pattern ID referenced could not be found. It may have been deleted, or not be published yet.
2727
+ * Means nothing for PUTs; it will be ignored.
2728
+ *
2729
+ * @enum {string}
2730
+ */
2731
+ _patternError?: "NOTFOUND" | "CYCLIC";
2732
+ };
2733
+ /** @description Defines the shape of the root component in a composition */
2734
+ RootComponentInstance: {
2735
+ /** @description Type of the component instance (public_id of its definition) */
2736
+ type: string;
2737
+ /** @description Component parameter values for the component instance */
2738
+ parameters?: {
2739
+ [key: string]: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameter"];
2740
+ };
2741
+ /** @description Public ID of alternate visual appearance for this component, if any selected */
2742
+ variant?: string;
2743
+ /** @description Slots containing any child components */
2744
+ slots?: {
2745
+ [key: string]: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"][];
2746
+ };
2747
+ /** @description The public UUID of the composition. */
2748
+ _id: string;
2749
+ /** @description Slug pattern of this component. */
2750
+ _slug?: string | null;
2751
+ /** @description Friendly name of this component. */
2752
+ _name: string;
2753
+ _data?: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinitions"];
2754
+ };
2755
+ /**
2756
+ * @deprecated
2757
+ * @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.
2758
+ */
2759
+ DataConnectionInfo: {
2760
+ /** @description Public ID of the data connector */
2761
+ id: string;
2762
+ /** @description Display name of the data connector */
2763
+ displayName: string;
2764
+ /** @description The type of data connector this connects to (e.g. 'cms-items', provided by an intalled integration) */
2765
+ connectorType: string;
2766
+ /** @description Base resource URL of the data connector. No trailing slash. */
2767
+ baseUrl: string;
2768
+ };
2769
+ /**
2770
+ * @deprecated
2771
+ * @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.
2772
+ */
2773
+ DataConnection: {
2774
+ /** @description Public ID of the data connection */
2775
+ id: string;
2776
+ /** @description Display name of the data connection */
2777
+ displayName: string;
2778
+ /** @description The type of data connector this connects to (e.g. 'cms-items', provided by an intalled integration) */
2779
+ connectorType: string;
2780
+ /** @description Base resource URL of the data connection. No trailing slash. */
2781
+ baseUrl: string;
2782
+ /** @description HTTP headers to pass with requests to the data connection */
2783
+ headers?: {
2784
+ [key: string]: string;
2785
+ };
2786
+ /** @description Query String parameters to pass with requests to the data connection */
2787
+ parameters?: {
2788
+ [key: string]: string;
2789
+ };
2790
+ /** @description Variables needed to make calls to the data connection */
2791
+ variables?: {
2792
+ [key: string]: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataVariable"];
2793
+ };
2794
+ /** @description Custom configuration specific to the data connection being defined */
2795
+ custom?: {
2796
+ [key: string]: unknown;
2797
+ };
2798
+ };
2799
+ /**
2800
+ * @deprecated
2801
+ * @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.
2802
+ */
2803
+ DataType: {
2804
+ /** @description Public ID of the data type */
2805
+ id: string;
2806
+ /** @description Display name of the data type */
2807
+ displayName: string;
2808
+ /** @description Public ID of the associated data connection */
2809
+ connectionId: string;
2810
+ /**
2811
+ * @description A connector-specific archetype for this data type; used to select UI as well as perform any
2812
+ * necessary post-processing on the response. e.g. 'cms-entry', 'cms-query'. Can be undefined if
2813
+ * no special UI or processing is required.
2814
+ */
2815
+ archetype?: string;
2816
+ allowedOnComponents?: string[];
2817
+ /** @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. */
2818
+ path: string;
2819
+ /** @description HTTP headers to pass with requests to the data type. Merged with headers from the data connection, overriding identical keys. */
2820
+ headers?: {
2821
+ [key: string]: string;
2822
+ };
2823
+ /** @description Query String parameters to pass with requests to the data type. Merged with parameters from the data connection, overriding identical keys. */
2824
+ parameters?: {
2825
+ [key: string]: string;
2826
+ };
2827
+ /** @description Body to pass with requests to the data type (ignored unless method is POST) */
2828
+ body?: string;
2829
+ /**
2830
+ * @description HTTP method to use with requests to the data type.
2831
+ * @default GET
2832
+ * @enum {string}
2833
+ */
2834
+ method: "GET" | "POST" | "HEAD";
2835
+ /** @description Variables needed to make calls to the data type. Merged with variables from the data connection, overriding identical keys. */
2836
+ variables?: {
2837
+ [key: string]: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataVariable"];
2838
+ };
2839
+ /** @description Custom configuration specific to the data connection being defined */
2840
+ custom?: {
2841
+ [key: string]: unknown;
2842
+ };
2843
+ };
2844
+ /**
2845
+ * @deprecated
2846
+ * @description Defines the shape of a data variable on a Data Connector or Data Type
2847
+ */
2848
+ DataVariable: {
2849
+ /** @description Display name of the data variable */
2850
+ displayName?: string;
2851
+ /**
2852
+ * @description Type of the data variable
2853
+ * @default text
2854
+ */
2855
+ type: string;
2856
+ /** @description Default value of the data variable */
2857
+ default: string;
2858
+ /**
2859
+ * @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).
2860
+ * @enum {string}
2861
+ */
2862
+ setBy: "static" | "dynamic";
2863
+ };
2864
+ /**
2865
+ * @deprecated
2866
+ * @description Data definitions attached to this component. The property name is the key of the data in the data document.
2867
+ * Note: data definitions are inherited from ancestors at runtime (and may be overridden by descendants that use the same key).
2868
+ */
2869
+ CompositionDataDefinitions: {
2870
+ [key: string]: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataDefinition"];
2871
+ };
2872
+ /**
2873
+ * @deprecated
2874
+ * @description Data definition attached to this component
2875
+ */
2876
+ CompositionDataDefinition: {
2877
+ /** @description Public ID of the data type that provides this data */
2878
+ type: string;
2879
+ /** @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. */
2880
+ isPatternParameter?: boolean;
2881
+ variables?: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["CompositionDataVariables"];
2882
+ };
2883
+ /**
2884
+ * @deprecated
2885
+ * @description Static variable values for this composition.
2886
+ */
2887
+ CompositionDataVariables: {
2888
+ [key: string]: string;
2889
+ };
2890
+ };
2891
+ };
2892
+ operations: {};
2893
+ };
2894
+ }
2895
+
2896
+ declare type DataTypeApi = paths$2['/api/v1/data-types'];
2897
+ declare type DataConnectionsApi = paths['/api/v1/data-connections'];
2898
+ declare type DataConnectionApi = paths$1['/api/v1/data-connection'];
2899
+ /** Query parameter options for GET /api/v1/data-types */
2900
+ declare type DataTypeGetParameters = DataTypeApi['get']['parameters']['query'];
2901
+ /** The GET response from /api/v1/data-types */
2902
+ declare type DataTypeGetResponse = DataTypeApi['get']['responses']['200']['content']['application/json'];
2903
+ /** The PUT request body for /api/v1/data-types */
2904
+ declare type DataTypePutParameters = DataTypeApi['put']['requestBody']['content']['application/json'];
2905
+ /** Shape of the DELETE request body for /api/v1/data-types */
2906
+ declare type DataTypeDeleteParameters = DataTypeApi['delete']['requestBody']['content']['application/json'];
2907
+ /** Query parameter options for GET /api/v1/data-connection */
2908
+ declare type DataConnectionGetParameters = DataConnectionApi['get']['parameters']['query'];
2909
+ /** Query parameter options for GET /api/v1/data-connections */
2910
+ declare type DataConnectionsGetParameters = DataConnectionsApi['get']['parameters']['query'];
2911
+ /** The GET response from /api/v1/data-connections */
2912
+ declare type DataConnectionGetResponse = DataConnectionApi['get']['responses']['200']['content']['application/json'];
2913
+ /** The GET response from /api/v1/data-connections */
2914
+ declare type DataConnectionsGetResponse = DataConnectionsApi['get']['responses']['200']['content']['application/json'];
2915
+ /** The PUT request body for /api/v1/data-connection */
2916
+ declare type DataConnectionPutParameters = DataConnectionApi['put']['requestBody']['content']['application/json'];
2917
+ /** Shape of the DELETE request body for /api/v1/data-connection */
2918
+ declare type DataConnectionDeleteParameters = DataConnectionApi['delete']['requestBody']['content']['application/json'];
2919
+ declare type DataType = components$1['schemas']['DataType'];
2920
+ declare type DataConnection = components$1['schemas']['DataConnection'];
2921
+ declare type DataConnectionInfo = components$1['schemas']['DataConnectionInfo'];
2922
+ declare type DataVariable = components$1['schemas']['DataVariable'];
2923
+
2924
+ /**
2925
+ * Pusher-js is large (80k) and not tree shakable so it is always bundled if directly referenced,
2926
+ * when it's only needed during preview mode. To avoid bundling it for all, we use an old-school
2927
+ * write-a-script-tag hack to load it in a poor man's approximation of a dynamic import ;)
2928
+ */
2929
+ declare type ChannelSubscription = {
2930
+ addEventHandler: (eventName: string, handler: (data: unknown) => void) => () => void;
2931
+ unsubscribe: () => void;
2932
+ };
2933
+ declare type PreviewEventBus = {
2934
+ subscribe: (channel: string) => ChannelSubscription;
2935
+ };
2936
+ declare global {
2937
+ interface Window {
2938
+ Pusher?: typeof Pusher;
2939
+ __UNIFORM_EVENT_BUS__?: PreviewEventBus;
2940
+ }
2941
+ }
2942
+ /**
2943
+ * Creates an event bus client to receive updates from Canvas
2944
+ * IMPORTANT: in a server-side context this will always return undefined
2945
+ * IMPORTANT: in a browser context this is cached in window and does not create multiple instances
2946
+ */
2947
+ declare function createEventBus(): Promise<PreviewEventBus | undefined>;
2948
+
2949
+ 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 };