@uniformdev/canvas 18.11.1-alpha.4 → 18.11.1-alpha.5

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,3993 @@
1
+ import Pusher from 'pusher-js';
2
+
3
+ interface components$2 {
4
+ schemas: {
5
+ /** @description Public ID (used in code). Do not change after creation. */
6
+ PublicIdProperty: string;
7
+ /** @description The definition of a component parameter */
8
+ ComponentDefinitionParameter: {
9
+ id: components$2["schemas"]["PublicIdProperty"];
10
+ /** @description Friendly name of the parameter */
11
+ name: string;
12
+ /** @description Appears next to the parameter in the Composition editor */
13
+ helpText?: string;
14
+ /** @description Type name of the parameter (provided by a Uniform integration) */
15
+ type: string;
16
+ /** @description The configuration object for the type (type-specific) */
17
+ typeConfig?: unknown;
18
+ };
19
+ /** @description The definition of a named component slot that can contain other components */
20
+ ComponentDefinitionSlot: {
21
+ id: components$2["schemas"]["PublicIdProperty"];
22
+ /** @description Friendly name of the slot */
23
+ name: string;
24
+ /** @description A list of component definition public IDs that are allowed in this named slot */
25
+ allowedComponents: string[];
26
+ /**
27
+ * @description Whether this slot inherits its allowed components from the parent slot it lives in. If true, allowedComponents is irrelevant.
28
+ * @default false
29
+ */
30
+ inheritAllowedComponents: boolean;
31
+ /** @description Minimum valid number of components in this slot */
32
+ minComponents?: number;
33
+ /** @description Maximum valid number of components in this slot */
34
+ maxComponents?: number;
35
+ };
36
+ /** @description The definition of a composition's slug settings */
37
+ ComponentDefinitionSlugSettings: {
38
+ /**
39
+ * @description Whether the slug is required
40
+ * no: slug is optional
41
+ * yes: slug is required
42
+ * disabled: slug is disabled and will not be shown in the editor
43
+ *
44
+ * @default no
45
+ * @enum {string}
46
+ */
47
+ required?: "no" | "yes" | "disabled";
48
+ /**
49
+ * @description Slug uniqueness configuration.
50
+ * no = no unique constraint
51
+ * local = must be unique within this component type
52
+ * global = must be unique across all component types
53
+ *
54
+ * @enum {string}
55
+ */
56
+ unique?: "no" | "local" | "global";
57
+ /** @description Regular expression slugs must match */
58
+ regularExpression?: string;
59
+ /**
60
+ * @description Custom error message when regular expression validation fails.
61
+ * Has no effect if `regularExpression` is not set.
62
+ */
63
+ regularExpressionMessage?: string;
64
+ };
65
+ /** @description The definition of a component variant */
66
+ ComponentDefinitionVariant: {
67
+ id: components$2["schemas"]["PublicIdProperty"];
68
+ /** @description Friendly name of the variant */
69
+ name: string;
70
+ };
71
+ /** @description Permission set for a component defintion */
72
+ ComponentDefinitionPermission: {
73
+ roleId: components$2["schemas"]["PublicIdProperty"];
74
+ /**
75
+ * @description Permission type for this permission ComponentDefinition:
76
+ * read | write | create | delete
77
+ *
78
+ * @enum {string}
79
+ */
80
+ permission: "read" | "write" | "create" | "delete";
81
+ /** @description State of the component that this permission applies to */
82
+ state: number;
83
+ };
84
+ /** @description Defines a component type that can live on a Composition */
85
+ ComponentDefinition: {
86
+ id: components$2["schemas"]["PublicIdProperty"];
87
+ /** @description Friendly name of the component definition */
88
+ name: string;
89
+ /**
90
+ * @description Icon name or URL for the component definition (e.g. 'screen' or 'https://s3/my-component.jpg')
91
+ * @default screen
92
+ */
93
+ icon?: string;
94
+ /**
95
+ * @description The public ID of the parameter whose value should be used to create a display title for this component in the UI.
96
+ * The parameter type must support being used as a title parameter for this to work.
97
+ */
98
+ titleParameter?: string | null;
99
+ /**
100
+ * @description Whether this component type can be the root of a composition. If false, this component is only used within slots on other components.
101
+ * @default false
102
+ */
103
+ canBeComposition?: boolean;
104
+ /** @description The parameters for this component. Parameters are key-value pairs that can be anything from text values to links to CMS entries. */
105
+ parameters?: components$2["schemas"]["ComponentDefinitionParameter"][];
106
+ /**
107
+ * @description if this component uses team permissions or custom permissions
108
+ * @default true
109
+ */
110
+ useTeamPermissions?: boolean;
111
+ /** @description Custom role permissions for this component definition */
112
+ permissions?: components$2["schemas"]["ComponentDefinitionPermission"][];
113
+ /** @description The named slots for this component; placement areas where arrays of other components can be added. */
114
+ slots?: components$2["schemas"]["ComponentDefinitionSlot"][];
115
+ slugSettings?: components$2["schemas"]["ComponentDefinitionSlugSettings"];
116
+ /** @description Default component instance value */
117
+ defaults?: components$2["schemas"]["ComponentInstance"] | null;
118
+ /** @description Named variants for this component; enables creation of visual variants that use the same parameter data */
119
+ variants?: components$2["schemas"]["ComponentDefinitionVariant"][];
120
+ /** @description Created date string for this definition (ignored for writes) */
121
+ created?: string;
122
+ /** @description Last modified date string for this definition (ignored for writes) */
123
+ updated?: string;
124
+ };
125
+ /** @description Defines an editable parameter on a component. */
126
+ ComponentParameter: {
127
+ /** @description The value of the parameter. Any JSON-serializable value is acceptable. */
128
+ value: unknown;
129
+ /** @description The type of the parameter. Determines how it is displayed when editing, and tells the consumer how to process it. */
130
+ type: string;
131
+ connectedData?: components$2["schemas"]["DataElementConnectionDefinition"];
132
+ };
133
+ /**
134
+ * @deprecated
135
+ * @description Defines a connection to a data element on a data resource. Do not use.
136
+ */
137
+ DataElementConnectionDefinition: {
138
+ /** @description A JSON Pointer expression that defines the data element to connect the parameter to. */
139
+ pointer: string;
140
+ /**
141
+ * @description The syntax used to select the data element to bind to
142
+ * @enum {string}
143
+ */
144
+ syntax: "jptr";
145
+ /**
146
+ * @description Whether an error should occur if the connected data element cannot be resolved (i.e. a missing property in the data resource).
147
+ * In all cases the binding process will remove the parameter data for the unresolvable data element.
148
+ * When this is true, and the data element failed to bind, the warning entry returned from the binding process will be changed to an error entry.
149
+ *
150
+ * @default false
151
+ */
152
+ required?: boolean;
153
+ };
154
+ /** @description Defines the shape of a component instance served by the composition API. */
155
+ ComponentInstance: {
156
+ /** @description Type of the component instance (public_id of its definition) */
157
+ type: string;
158
+ /** @description Component parameter values for the component instance */
159
+ parameters?: {
160
+ [key: string]: components$2["schemas"]["ComponentParameter"];
161
+ };
162
+ /** @description Public ID of alternate visual appearance for this component, if any selected */
163
+ variant?: string;
164
+ /** @description Slots containing any child components */
165
+ slots?: {
166
+ [key: string]: components$2["schemas"]["ComponentInstance"][];
167
+ };
168
+ /** @description Unique identifier of the component within the composition. This is not set unless specifically requested via `withComponentIDs` API parameter. */
169
+ _id?: string;
170
+ /** @description Indicates this component instance should be sourced from a pattern library pattern. */
171
+ _pattern?: string;
172
+ _dataResources?: components$2["schemas"]["DataResourceDefinitions"];
173
+ /**
174
+ * @deprecated
175
+ * @description Data definitions coming from a pattern resolved for this component. Merged with _data during resolution.
176
+ * Means nothing for PUTs; it will be ignored.
177
+ */
178
+ _patternDataResources?: {
179
+ [key: string]: components$2["schemas"]["DataResourceDefinition"];
180
+ };
181
+ /**
182
+ * @description Describes why the pattern could not be resolved, if a pattern could not be resolved. For PUTs, this is allowed but ignored.
183
+ * CYCLIC: A cyclic pattern graph was detected, which could not be resolved because it would cause an infinite loop.
184
+ * NOTFOUND: The pattern ID referenced could not be found. It may have been deleted, or not be published yet.
185
+ * Means nothing for PUTs; it will be ignored.
186
+ *
187
+ * @enum {string}
188
+ */
189
+ _patternError?: "NOTFOUND" | "CYCLIC";
190
+ };
191
+ /** @description Defines the shape of the root component in a composition */
192
+ RootComponentInstance: {
193
+ /** @description Type of the component instance (public_id of its definition) */
194
+ type: string;
195
+ /** @description Component parameter values for the component instance */
196
+ parameters?: {
197
+ [key: string]: components$2["schemas"]["ComponentParameter"];
198
+ };
199
+ /** @description Public ID of alternate visual appearance for this component, if any selected */
200
+ variant?: string;
201
+ /** @description Slots containing any child components */
202
+ slots?: {
203
+ [key: string]: components$2["schemas"]["ComponentInstance"][];
204
+ };
205
+ /** @description The public UUID of the composition. */
206
+ _id: string;
207
+ /** @description Slug pattern of this component. */
208
+ _slug?: string | null;
209
+ /** @description Friendly name of this component. */
210
+ _name: string;
211
+ _dataResources?: components$2["schemas"]["DataResourceDefinitions"];
212
+ };
213
+ /**
214
+ * @deprecated
215
+ * @description An instance of a data source (i.e. "Master environment of the stable space", "Yelp API", "Sanity dev dataset").
216
+ * These are created in the UI and shared across a whole project.
217
+ * NOTE: if you acquire a list of data sources or do not have manage permissions, you will receive "SECRET"
218
+ * for all header, parameter, and variable values to obscure the actual encrypted secret value.
219
+ */
220
+ DataSource: {
221
+ /** @description Public ID of the data source */
222
+ id: string;
223
+ /** @description Display name of the data source */
224
+ displayName: string;
225
+ /** @description The type of data connector this connects to (e.g. 'cms-items', provided by an intalled integration) */
226
+ connectorType: string;
227
+ /** @description Base resource URL of the data source. No trailing slash. */
228
+ baseUrl: string;
229
+ headers?: {
230
+ [key: string]: string;
231
+ } | {
232
+ key: string;
233
+ value: string;
234
+ }[];
235
+ parameters?: {
236
+ [key: string]: string;
237
+ } | {
238
+ key: string;
239
+ value: string;
240
+ }[];
241
+ /** @description Variables needed to make calls to the data source */
242
+ variables?: {
243
+ [key: string]: components$2["schemas"]["DataVariableDefinition"];
244
+ };
245
+ /** @description Custom configuration specific to the data source being defined (used to maintain UI state for custom integrations) */
246
+ custom?: {
247
+ [key: string]: unknown;
248
+ };
249
+ };
250
+ /**
251
+ * @deprecated
252
+ * @description A specific type of data that a Data Source 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.
253
+ */
254
+ DataType: {
255
+ /** @description Public ID of the data type */
256
+ id: string;
257
+ /** @description Display name of the data type */
258
+ displayName: string;
259
+ /** @description Public ID of the associated data source */
260
+ dataSourceId: string;
261
+ /**
262
+ * @description A connector-specific archetype for this data type; used to select UI as well as perform any
263
+ * necessary post-processing on the response. e.g. 'cms-entry', 'cms-query'. Can be undefined if
264
+ * no special UI or processing is required.
265
+ */
266
+ archetype?: string;
267
+ allowedOnComponents?: string[];
268
+ /** @description Resource path, appended to the data source's baseUrl (e.g. baseUrl = https://base.url, path = /v1/endpoint -> final URL https://base.url/v1/endpoint). Must have leading slash. */
269
+ path: string;
270
+ /** @description Time-to-live (in seconds) for the primary resource data cache. */
271
+ ttl?: number;
272
+ /** @description Long term data resource cache configuration. */
273
+ longTermCache?: {
274
+ /** @description A flag to turn the long term cache on. */
275
+ enabled: boolean;
276
+ /** @description Time-to-live (in hours) for the long term resource data cache. */
277
+ ttlInHours?: number;
278
+ };
279
+ /** @description A key for the resource data cache purging. */
280
+ purgeKey?: string;
281
+ /** @description URL to a custom badge icon for the Uniform dashboard for this data type. If not set falls back to the data connector or integration icons. */
282
+ badgeIconUrl?: string;
283
+ /** @description HTTP headers to pass with requests to the data type. Merged with headers from the data source, overriding identical keys. */
284
+ headers?: {
285
+ [key: string]: string;
286
+ } | {
287
+ key: string;
288
+ value: string;
289
+ }[];
290
+ /** @description Query String parameters to pass with requests to the data type. Merged with parameters from the data source, overriding identical keys. */
291
+ parameters?: {
292
+ [key: string]: string;
293
+ } | {
294
+ key: string;
295
+ value: string;
296
+ }[];
297
+ /** @description Body to pass with requests to the data type (ignored unless method is POST) */
298
+ body?: string;
299
+ /**
300
+ * @description HTTP method to use with requests to the data type.
301
+ * @default GET
302
+ * @enum {string}
303
+ */
304
+ method: "GET" | "POST" | "HEAD";
305
+ /** @description Variables needed to make calls to the data type. Merged with variables from the data source, overriding identical keys. */
306
+ variables?: {
307
+ [key: string]: components$2["schemas"]["DataVariableDefinition"];
308
+ };
309
+ /** @description Custom configuration specific to the data source being defined */
310
+ custom?: {
311
+ [key: string]: unknown;
312
+ };
313
+ };
314
+ /**
315
+ * @deprecated
316
+ * @description Defines the shape of a data variable on a Data Source or Data Type
317
+ */
318
+ DataVariableDefinition: {
319
+ /** @description Display name of the data variable */
320
+ displayName?: string;
321
+ /** @description Explanatory text that is provided to the data resource editor to explain what this variable does. */
322
+ helpText?: string;
323
+ /**
324
+ * @description Type of the data variable. Optionally used as a point of reference for custom integrations to decide how to render an editor for a variable.
325
+ * @default text
326
+ */
327
+ type?: string;
328
+ /** @description Default value of the data variable */
329
+ default: string;
330
+ /** @description Sets the order of the variable when displayed in a list with other variables. If not set, the order defaults to alphabetical with any explicitly set orders first in the list. */
331
+ order?: number;
332
+ };
333
+ /**
334
+ * @deprecated
335
+ * @description Data definitions attached to this component. The property name is the key of the data in the data document.
336
+ * Note: data definitions are inherited from ancestors at runtime (and may be overridden by descendants that use the same key).
337
+ */
338
+ DataResourceDefinitions: {
339
+ [key: string]: components$2["schemas"]["DataResourceDefinition"];
340
+ };
341
+ /**
342
+ * @deprecated
343
+ * @description Defines a data resource, which is a named JSON document, usually from an API response, which may be projected onto parameters
344
+ */
345
+ DataResourceDefinition: {
346
+ /** @description Public ID of the data type that provides this data */
347
+ type: string;
348
+ /** @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. */
349
+ isPatternParameter?: boolean;
350
+ variables?: components$2["schemas"]["DataResourceVariables"];
351
+ };
352
+ /**
353
+ * @deprecated
354
+ * @description Variable values for a data resource.
355
+ */
356
+ DataResourceVariables: {
357
+ [key: string]: string;
358
+ };
359
+ };
360
+ }
361
+
362
+ /**
363
+ * This file was auto-generated by openapi-typescript.
364
+ * Do not make direct changes to the file.
365
+ */
366
+ interface paths$4 {
367
+ "/api/v1/canvas-definitions": {
368
+ get: {
369
+ parameters: {
370
+ query: {
371
+ /** The project ID to get component definitions for. */
372
+ projectId: string;
373
+ /** Limit list to one result by ID (response remains an array). */
374
+ componentId?: string;
375
+ /** Number of records to skip */
376
+ offset?: number;
377
+ /** Max number of records to return */
378
+ limit?: number;
379
+ /** Whether to fetch system meta-component definitions (personalize, test, etc) */
380
+ includeSystem?: boolean;
381
+ };
382
+ };
383
+ responses: {
384
+ /** OK */
385
+ 200: {
386
+ content: {
387
+ "application/json": {
388
+ /** @description Component definitions that match the query */
389
+ componentDefinitions: external$5["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinition"][];
390
+ };
391
+ };
392
+ };
393
+ 400: external$5["swagger.yml"]["components"]["responses"]["BadRequestError"];
394
+ 401: external$5["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
395
+ 403: external$5["swagger.yml"]["components"]["responses"]["ForbiddenError"];
396
+ 429: external$5["swagger.yml"]["components"]["responses"]["RateLimitError"];
397
+ 500: external$5["swagger.yml"]["components"]["responses"]["InternalServerError"];
398
+ };
399
+ };
400
+ /** Upserts a component definition */
401
+ put: {
402
+ responses: {
403
+ /** OK */
404
+ 204: never;
405
+ 400: external$5["swagger.yml"]["components"]["responses"]["BadRequestError"];
406
+ 401: external$5["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
407
+ 403: external$5["swagger.yml"]["components"]["responses"]["ForbiddenError"];
408
+ 429: external$5["swagger.yml"]["components"]["responses"]["RateLimitError"];
409
+ 500: external$5["swagger.yml"]["components"]["responses"]["InternalServerError"];
410
+ };
411
+ requestBody: {
412
+ content: {
413
+ "application/json": {
414
+ /**
415
+ * Format: uuid
416
+ * @description The project ID to upsert the component definition to
417
+ */
418
+ projectId: string;
419
+ componentDefinition: external$5["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinition"];
420
+ };
421
+ };
422
+ };
423
+ };
424
+ /** Deletes a component definition */
425
+ delete: {
426
+ responses: {
427
+ /** OK */
428
+ 204: never;
429
+ 400: external$5["swagger.yml"]["components"]["responses"]["BadRequestError"];
430
+ 401: external$5["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
431
+ 403: external$5["swagger.yml"]["components"]["responses"]["ForbiddenError"];
432
+ 429: external$5["swagger.yml"]["components"]["responses"]["RateLimitError"];
433
+ 500: external$5["swagger.yml"]["components"]["responses"]["InternalServerError"];
434
+ };
435
+ requestBody: {
436
+ content: {
437
+ "application/json": {
438
+ /** @description The public ID of the component definition to delete */
439
+ componentId: string;
440
+ /**
441
+ * Format: uuid
442
+ * @description The ID of the project the composition to delete belongs to
443
+ */
444
+ projectId: string;
445
+ };
446
+ };
447
+ };
448
+ };
449
+ /** Handles preflight requests. This endpoint allows CORS. */
450
+ options: {
451
+ responses: {
452
+ /** OK */
453
+ 204: never;
454
+ };
455
+ };
456
+ };
457
+ }
458
+ interface external$5 {
459
+ "swagger.yml": {
460
+ paths: {};
461
+ components: {
462
+ schemas: {
463
+ Error: {
464
+ /** @description Error message(s) that occurred while processing the request */
465
+ errorMessage?: string[] | string;
466
+ };
467
+ };
468
+ responses: {
469
+ /** Request input validation failed */
470
+ BadRequestError: {
471
+ content: {
472
+ "application/json": external$5["swagger.yml"]["components"]["schemas"]["Error"];
473
+ };
474
+ };
475
+ /** API key or token was not valid */
476
+ UnauthorizedError: {
477
+ content: {
478
+ "application/json": external$5["swagger.yml"]["components"]["schemas"]["Error"];
479
+ };
480
+ };
481
+ /** Permission was denied */
482
+ ForbiddenError: {
483
+ content: {
484
+ "application/json": external$5["swagger.yml"]["components"]["schemas"]["Error"];
485
+ };
486
+ };
487
+ /** Resource not found */
488
+ NotFoundError: {
489
+ content: {
490
+ "application/json": external$5["swagger.yml"]["components"]["schemas"]["Error"];
491
+ };
492
+ };
493
+ /** Too many requests in allowed time period */
494
+ RateLimitError: unknown;
495
+ /** Execution error occurred */
496
+ InternalServerError: unknown;
497
+ };
498
+ };
499
+ operations: {};
500
+ };
501
+ "uniform-canvas-types.swagger.yml": {
502
+ paths: {};
503
+ components: {
504
+ schemas: {
505
+ /** @description Public ID (used in code). Do not change after creation. */
506
+ PublicIdProperty: string;
507
+ /** @description The definition of a component parameter */
508
+ ComponentDefinitionParameter: {
509
+ id: external$5["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
510
+ /** @description Friendly name of the parameter */
511
+ name: string;
512
+ /** @description Appears next to the parameter in the Composition editor */
513
+ helpText?: string;
514
+ /** @description Type name of the parameter (provided by a Uniform integration) */
515
+ type: string;
516
+ /** @description The configuration object for the type (type-specific) */
517
+ typeConfig?: unknown;
518
+ };
519
+ /** @description The definition of a named component slot that can contain other components */
520
+ ComponentDefinitionSlot: {
521
+ id: external$5["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
522
+ /** @description Friendly name of the slot */
523
+ name: string;
524
+ /** @description A list of component definition public IDs that are allowed in this named slot */
525
+ allowedComponents: string[];
526
+ /**
527
+ * @description Whether this slot inherits its allowed components from the parent slot it lives in. If true, allowedComponents is irrelevant.
528
+ * @default false
529
+ */
530
+ inheritAllowedComponents: boolean;
531
+ /** @description Minimum valid number of components in this slot */
532
+ minComponents?: number;
533
+ /** @description Maximum valid number of components in this slot */
534
+ maxComponents?: number;
535
+ };
536
+ /** @description The definition of a composition's slug settings */
537
+ ComponentDefinitionSlugSettings: {
538
+ /**
539
+ * @description Whether the slug is required
540
+ * no: slug is optional
541
+ * yes: slug is required
542
+ * disabled: slug is disabled and will not be shown in the editor
543
+ *
544
+ * @default no
545
+ * @enum {string}
546
+ */
547
+ required?: "no" | "yes" | "disabled";
548
+ /**
549
+ * @description Slug uniqueness configuration.
550
+ * no = no unique constraint
551
+ * local = must be unique within this component type
552
+ * global = must be unique across all component types
553
+ *
554
+ * @enum {string}
555
+ */
556
+ unique?: "no" | "local" | "global";
557
+ /** @description Regular expression slugs must match */
558
+ regularExpression?: string;
559
+ /**
560
+ * @description Custom error message when regular expression validation fails.
561
+ * Has no effect if `regularExpression` is not set.
562
+ */
563
+ regularExpressionMessage?: string;
564
+ };
565
+ /** @description The definition of a component variant */
566
+ ComponentDefinitionVariant: {
567
+ id: external$5["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
568
+ /** @description Friendly name of the variant */
569
+ name: string;
570
+ };
571
+ /** @description Permission set for a component defintion */
572
+ ComponentDefinitionPermission: {
573
+ roleId: external$5["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
574
+ /**
575
+ * @description Permission type for this permission ComponentDefinition:
576
+ * read | write | create | delete
577
+ *
578
+ * @enum {string}
579
+ */
580
+ permission: "read" | "write" | "create" | "delete";
581
+ /** @description State of the component that this permission applies to */
582
+ state: number;
583
+ };
584
+ /** @description Defines a component type that can live on a Composition */
585
+ ComponentDefinition: {
586
+ id: external$5["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
587
+ /** @description Friendly name of the component definition */
588
+ name: string;
589
+ /**
590
+ * @description Icon name or URL for the component definition (e.g. 'screen' or 'https://s3/my-component.jpg')
591
+ * @default screen
592
+ */
593
+ icon?: string;
594
+ /**
595
+ * @description The public ID of the parameter whose value should be used to create a display title for this component in the UI.
596
+ * The parameter type must support being used as a title parameter for this to work.
597
+ */
598
+ titleParameter?: string | null;
599
+ /**
600
+ * @description Whether this component type can be the root of a composition. If false, this component is only used within slots on other components.
601
+ * @default false
602
+ */
603
+ canBeComposition?: boolean;
604
+ /** @description The parameters for this component. Parameters are key-value pairs that can be anything from text values to links to CMS entries. */
605
+ parameters?: external$5["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionParameter"][];
606
+ /**
607
+ * @description if this component uses team permissions or custom permissions
608
+ * @default true
609
+ */
610
+ useTeamPermissions?: boolean;
611
+ /** @description Custom role permissions for this component definition */
612
+ permissions?: external$5["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionPermission"][];
613
+ /** @description The named slots for this component; placement areas where arrays of other components can be added. */
614
+ slots?: external$5["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionSlot"][];
615
+ slugSettings?: external$5["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionSlugSettings"];
616
+ /** @description Default component instance value */
617
+ defaults?: external$5["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"] | null;
618
+ /** @description Named variants for this component; enables creation of visual variants that use the same parameter data */
619
+ variants?: external$5["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionVariant"][];
620
+ /** @description Created date string for this definition (ignored for writes) */
621
+ created?: string;
622
+ /** @description Last modified date string for this definition (ignored for writes) */
623
+ updated?: string;
624
+ };
625
+ /** @description Defines an editable parameter on a component. */
626
+ ComponentParameter: {
627
+ /** @description The value of the parameter. Any JSON-serializable value is acceptable. */
628
+ value: unknown;
629
+ /** @description The type of the parameter. Determines how it is displayed when editing, and tells the consumer how to process it. */
630
+ type: string;
631
+ connectedData?: external$5["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataElementConnectionDefinition"];
632
+ };
633
+ /**
634
+ * @deprecated
635
+ * @description Defines a connection to a data element on a data resource. Do not use.
636
+ */
637
+ DataElementConnectionDefinition: {
638
+ /** @description A JSON Pointer expression that defines the data element to connect the parameter to. */
639
+ pointer: string;
640
+ /**
641
+ * @description The syntax used to select the data element to bind to
642
+ * @enum {string}
643
+ */
644
+ syntax: "jptr";
645
+ /**
646
+ * @description Whether an error should occur if the connected data element cannot be resolved (i.e. a missing property in the data resource).
647
+ * In all cases the binding process will remove the parameter data for the unresolvable data element.
648
+ * When this is true, and the data element failed to bind, the warning entry returned from the binding process will be changed to an error entry.
649
+ *
650
+ * @default false
651
+ */
652
+ required?: boolean;
653
+ };
654
+ /** @description Defines the shape of a component instance served by the composition API. */
655
+ ComponentInstance: {
656
+ /** @description Type of the component instance (public_id of its definition) */
657
+ type: string;
658
+ /** @description Component parameter values for the component instance */
659
+ parameters?: {
660
+ [key: string]: external$5["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameter"];
661
+ };
662
+ /** @description Public ID of alternate visual appearance for this component, if any selected */
663
+ variant?: string;
664
+ /** @description Slots containing any child components */
665
+ slots?: {
666
+ [key: string]: external$5["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"][];
667
+ };
668
+ /** @description Unique identifier of the component within the composition. This is not set unless specifically requested via `withComponentIDs` API parameter. */
669
+ _id?: string;
670
+ /** @description Indicates this component instance should be sourced from a pattern library pattern. */
671
+ _pattern?: string;
672
+ _dataResources?: external$5["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataResourceDefinitions"];
673
+ /**
674
+ * @deprecated
675
+ * @description Data definitions coming from a pattern resolved for this component. Merged with _data during resolution.
676
+ * Means nothing for PUTs; it will be ignored.
677
+ */
678
+ _patternDataResources?: {
679
+ [key: string]: external$5["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataResourceDefinition"];
680
+ };
681
+ /**
682
+ * @description Describes why the pattern could not be resolved, if a pattern could not be resolved. For PUTs, this is allowed but ignored.
683
+ * CYCLIC: A cyclic pattern graph was detected, which could not be resolved because it would cause an infinite loop.
684
+ * NOTFOUND: The pattern ID referenced could not be found. It may have been deleted, or not be published yet.
685
+ * Means nothing for PUTs; it will be ignored.
686
+ *
687
+ * @enum {string}
688
+ */
689
+ _patternError?: "NOTFOUND" | "CYCLIC";
690
+ };
691
+ /** @description Defines the shape of the root component in a composition */
692
+ RootComponentInstance: {
693
+ /** @description Type of the component instance (public_id of its definition) */
694
+ type: string;
695
+ /** @description Component parameter values for the component instance */
696
+ parameters?: {
697
+ [key: string]: external$5["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameter"];
698
+ };
699
+ /** @description Public ID of alternate visual appearance for this component, if any selected */
700
+ variant?: string;
701
+ /** @description Slots containing any child components */
702
+ slots?: {
703
+ [key: string]: external$5["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"][];
704
+ };
705
+ /** @description The public UUID of the composition. */
706
+ _id: string;
707
+ /** @description Slug pattern of this component. */
708
+ _slug?: string | null;
709
+ /** @description Friendly name of this component. */
710
+ _name: string;
711
+ _dataResources?: external$5["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataResourceDefinitions"];
712
+ };
713
+ /**
714
+ * @deprecated
715
+ * @description An instance of a data source (i.e. "Master environment of the stable space", "Yelp API", "Sanity dev dataset").
716
+ * These are created in the UI and shared across a whole project.
717
+ * NOTE: if you acquire a list of data sources or do not have manage permissions, you will receive "SECRET"
718
+ * for all header, parameter, and variable values to obscure the actual encrypted secret value.
719
+ */
720
+ DataSource: {
721
+ /** @description Public ID of the data source */
722
+ id: string;
723
+ /** @description Display name of the data source */
724
+ displayName: string;
725
+ /** @description The type of data connector this connects to (e.g. 'cms-items', provided by an intalled integration) */
726
+ connectorType: string;
727
+ /** @description Base resource URL of the data source. No trailing slash. */
728
+ baseUrl: string;
729
+ headers?: {
730
+ [key: string]: string;
731
+ } | {
732
+ key: string;
733
+ value: string;
734
+ }[];
735
+ parameters?: {
736
+ [key: string]: string;
737
+ } | {
738
+ key: string;
739
+ value: string;
740
+ }[];
741
+ /** @description Variables needed to make calls to the data source */
742
+ variables?: {
743
+ [key: string]: external$5["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataVariableDefinition"];
744
+ };
745
+ /** @description Custom configuration specific to the data source being defined (used to maintain UI state for custom integrations) */
746
+ custom?: {
747
+ [key: string]: unknown;
748
+ };
749
+ };
750
+ /**
751
+ * @deprecated
752
+ * @description A specific type of data that a Data Source 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.
753
+ */
754
+ DataType: {
755
+ /** @description Public ID of the data type */
756
+ id: string;
757
+ /** @description Display name of the data type */
758
+ displayName: string;
759
+ /** @description Public ID of the associated data source */
760
+ dataSourceId: string;
761
+ /**
762
+ * @description A connector-specific archetype for this data type; used to select UI as well as perform any
763
+ * necessary post-processing on the response. e.g. 'cms-entry', 'cms-query'. Can be undefined if
764
+ * no special UI or processing is required.
765
+ */
766
+ archetype?: string;
767
+ allowedOnComponents?: string[];
768
+ /** @description Resource path, appended to the data source's baseUrl (e.g. baseUrl = https://base.url, path = /v1/endpoint -> final URL https://base.url/v1/endpoint). Must have leading slash. */
769
+ path: string;
770
+ /** @description Time-to-live (in seconds) for the primary resource data cache. */
771
+ ttl?: number;
772
+ /** @description Long term data resource cache configuration. */
773
+ longTermCache?: {
774
+ /** @description A flag to turn the long term cache on. */
775
+ enabled: boolean;
776
+ /** @description Time-to-live (in hours) for the long term resource data cache. */
777
+ ttlInHours?: number;
778
+ };
779
+ /** @description A key for the resource data cache purging. */
780
+ purgeKey?: string;
781
+ /** @description URL to a custom badge icon for the Uniform dashboard for this data type. If not set falls back to the data connector or integration icons. */
782
+ badgeIconUrl?: string;
783
+ /** @description HTTP headers to pass with requests to the data type. Merged with headers from the data source, overriding identical keys. */
784
+ headers?: {
785
+ [key: string]: string;
786
+ } | {
787
+ key: string;
788
+ value: string;
789
+ }[];
790
+ /** @description Query String parameters to pass with requests to the data type. Merged with parameters from the data source, overriding identical keys. */
791
+ parameters?: {
792
+ [key: string]: string;
793
+ } | {
794
+ key: string;
795
+ value: string;
796
+ }[];
797
+ /** @description Body to pass with requests to the data type (ignored unless method is POST) */
798
+ body?: string;
799
+ /**
800
+ * @description HTTP method to use with requests to the data type.
801
+ * @default GET
802
+ * @enum {string}
803
+ */
804
+ method: "GET" | "POST" | "HEAD";
805
+ /** @description Variables needed to make calls to the data type. Merged with variables from the data source, overriding identical keys. */
806
+ variables?: {
807
+ [key: string]: external$5["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataVariableDefinition"];
808
+ };
809
+ /** @description Custom configuration specific to the data source being defined */
810
+ custom?: {
811
+ [key: string]: unknown;
812
+ };
813
+ };
814
+ /**
815
+ * @deprecated
816
+ * @description Defines the shape of a data variable on a Data Source or Data Type
817
+ */
818
+ DataVariableDefinition: {
819
+ /** @description Display name of the data variable */
820
+ displayName?: string;
821
+ /** @description Explanatory text that is provided to the data resource editor to explain what this variable does. */
822
+ helpText?: string;
823
+ /**
824
+ * @description Type of the data variable. Optionally used as a point of reference for custom integrations to decide how to render an editor for a variable.
825
+ * @default text
826
+ */
827
+ type?: string;
828
+ /** @description Default value of the data variable */
829
+ default: string;
830
+ /** @description Sets the order of the variable when displayed in a list with other variables. If not set, the order defaults to alphabetical with any explicitly set orders first in the list. */
831
+ order?: number;
832
+ };
833
+ /**
834
+ * @deprecated
835
+ * @description Data definitions attached to this component. The property name is the key of the data in the data document.
836
+ * Note: data definitions are inherited from ancestors at runtime (and may be overridden by descendants that use the same key).
837
+ */
838
+ DataResourceDefinitions: {
839
+ [key: string]: external$5["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataResourceDefinition"];
840
+ };
841
+ /**
842
+ * @deprecated
843
+ * @description Defines a data resource, which is a named JSON document, usually from an API response, which may be projected onto parameters
844
+ */
845
+ DataResourceDefinition: {
846
+ /** @description Public ID of the data type that provides this data */
847
+ type: string;
848
+ /** @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. */
849
+ isPatternParameter?: boolean;
850
+ variables?: external$5["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataResourceVariables"];
851
+ };
852
+ /**
853
+ * @deprecated
854
+ * @description Variable values for a data resource.
855
+ */
856
+ DataResourceVariables: {
857
+ [key: string]: string;
858
+ };
859
+ };
860
+ };
861
+ operations: {};
862
+ };
863
+ }
864
+
865
+ declare type SharedComponents$1 = components$2['schemas'];
866
+ declare type Api$1 = paths$4['/api/v1/canvas-definitions'];
867
+ /** Shape of the GET response from /api/v1/canvas-definitions */
868
+ declare type ComponentDefinitionGetResponse = Api$1['get']['responses']['200']['content']['application/json'];
869
+ /** Shape of the PUT request body for /api/v1/canvas-definitions */
870
+ declare type ComponentDefinitionPutParameters = Api$1['put']['requestBody']['content']['application/json'];
871
+ /** Shape of the DELETE request body for /api/v1/canvas-definitions */
872
+ declare type ComponentDefinitionDeleteParameters = Api$1['delete']['requestBody']['content']['application/json'];
873
+ /** Query parameter options for GET /api/v1/canvas-definitions */
874
+ declare type ComponentDefinitionGetParameters = Api$1['get']['parameters']['query'];
875
+ /** @deprecated use ComponentDefinitionGetResponse instead */
876
+ declare type ComponentDefinitionAPIResponse = ComponentDefinitionGetResponse;
877
+ /** @deprecated use ComponentDefinitionPutParameters */
878
+ declare type ComponentDefinitionAPIPutRequest = ComponentDefinitionPutParameters;
879
+ /** @deprecated use ComponentDefinitionDeleteParameters */
880
+ declare type ComponentDefinitionAPIDeleteRequest = ComponentDefinitionDeleteParameters;
881
+ /** @deprecated use ComponentDefinitionGetParameters */
882
+ declare type ComponentDefinitionListAPIOptions = ComponentDefinitionGetParameters;
883
+ /** The definition of a component parameter */
884
+ declare type ComponentDefinitionParameter<TConfig = unknown> = Omit<components$2['schemas']['ComponentDefinitionParameter'], 'typeConfig'> & {
885
+ typeConfig?: TConfig;
886
+ };
887
+ /** The definition of a component visual variant */
888
+ declare type ComponentDefinitionVariant = SharedComponents$1['ComponentDefinitionVariant'];
889
+ /** The definition of a composition's slug settings */
890
+ declare type ComponentDefinitionSlugSettings = SharedComponents$1['ComponentDefinitionSlugSettings'];
891
+ /** The definition of a named component slot that can contain other components */
892
+ declare type ComponentDefinitionSlot = SharedComponents$1['ComponentDefinitionSlot'];
893
+ /** Permission set for a component defintion */
894
+ declare type ComponentDefinitionPermission = SharedComponents$1['ComponentDefinitionPermission'];
895
+ /** Defines a component type that can live on a Composition */
896
+ declare type ComponentDefinition = SharedComponents$1['ComponentDefinition'];
897
+ /** @deprecated use ComponentDefinition instead */
898
+ declare type CreatingComponentDefinition = Omit<Partial<ComponentDefinition>, 'created' | 'updated'>;
899
+
900
+ /**
901
+ * This file was auto-generated by openapi-typescript.
902
+ * Do not make direct changes to the file.
903
+ */
904
+ interface paths$3 {
905
+ "/api/v1/canvas": {
906
+ get: {
907
+ parameters: {
908
+ query: {
909
+ /** Specify a single composition ID to fetch. Changes response from list to single. */
910
+ compositionId?: components$1["parameters"]["compositionId"];
911
+ /** Specify multiple composition IDs to fetch. Response type will be a list. */
912
+ compositionIDs?: components$1["parameters"]["compositionIDs"];
913
+ /** Filters composition lists by the user who created them. The user is specified by their identity subject. */
914
+ createdBy?: components$1["parameters"]["createdBy"];
915
+ /**
916
+ * Matches compositions where their name, slug, or definition name contains the specified keyword.
917
+ * NOT a full text search; does not match composition contents.
918
+ */
919
+ keyword?: components$1["parameters"]["keyword"];
920
+ /** Max number of records to return */
921
+ limit?: components$1["parameters"]["limit"];
922
+ /** Number of records to skip */
923
+ offset?: components$1["parameters"]["offset"];
924
+ /** Sets the sorting of the results. If unspecified, results are sorted by name ascending. */
925
+ orderBy?: components$1["parameters"]["orderBy"];
926
+ /**
927
+ * Matches compositions based on whether they are a pattern composition or a regular composition.
928
+ * If true, only pattern compositions will be returned.
929
+ * If false, only regular compositions will be returned.
930
+ * If omitted, both pattern and regular compositions will be returned.
931
+ */
932
+ pattern?: components$1["parameters"]["pattern"];
933
+ /** The project the composition(s) are on. */
934
+ projectId: components$1["parameters"]["projectId"];
935
+ /** Required when using project map node id or path for fetch. */
936
+ projectMapId?: components$1["parameters"]["projectMapId"];
937
+ /** Specify a single composition to fetch by assodicated project map node ID. Changes response from list to single. */
938
+ projectMapNodeId?: components$1["parameters"]["projectMapNodeId"];
939
+ /** Specify a single composition to fetch by assodicated project map node path. Changes response from list to single. */
940
+ projectMapNodePath?: components$1["parameters"]["projectMapNodePath"];
941
+ /**
942
+ * @deprecated Signals an enhancer proxy to skip processing enhancements to the data and return raw data only.
943
+ * This improves performance if you do not require enhanced component data.
944
+ * If calling the Canvas API directly with no enhancer proxy, this has no effect.
945
+ */
946
+ skipEnhance?: components$1["parameters"]["skipEnhance"];
947
+ /**
948
+ * If true, any pattern references in the composition will be left unresolved.
949
+ * This is appropriate if you intend to serialize the composition without patterns
950
+ * embedded into it, and serialize the pattern data separately.
951
+ */
952
+ skipPatternResolution?: components$1["parameters"]["skipPatternResolution"];
953
+ /** Specify a single composition to fetch by slug. Changes response from list to single. */
954
+ slug?: components$1["parameters"]["slug"];
955
+ /** State of compositions to fetch. 0 = draft, 64 = published. */
956
+ state?: components$1["parameters"]["state"];
957
+ /** 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. */
958
+ type?: components$1["parameters"]["type"];
959
+ /**
960
+ * @deprecated Filters composition lists by the UI status of the composition.
961
+ * This internal status is subject to change without notice, and is thus marked deprecated to discourage use of internal data.
962
+ */
963
+ uiStatus?: components$1["parameters"]["uiStatus"];
964
+ /** Filters composition lists by the user who last updated them. The user is specified by their identity subject. */
965
+ updatedBy?: components$1["parameters"]["updatedBy"];
966
+ /**
967
+ * If true the `_id` unique identifier of each non-root component will be part of the response data.
968
+ * If false, the `_id` will not be present in the API response.
969
+ */
970
+ withComponentIDs?: components$1["parameters"]["withComponentIDs"];
971
+ /**
972
+ * Controls whether the total count of results will be returned along with the current results page in a list.
973
+ * Has no effect when not fetching a list. This does impact performance when enabled.
974
+ */
975
+ withTotalCount?: components$1["parameters"]["withTotalCount"];
976
+ /**
977
+ * @deprecated Returns the UI status string of the composition.
978
+ * This internal status is subject to change without notice, and is thus marked deprecated to discourage use of internal data.
979
+ */
980
+ withUIStatus?: components$1["parameters"]["withUIStatus"];
981
+ };
982
+ };
983
+ responses: {
984
+ /** OK */
985
+ 200: {
986
+ content: {
987
+ "application/json": components$1["schemas"]["CompositionListResponse"] | components$1["schemas"]["CompositionApiResponse"];
988
+ };
989
+ };
990
+ 400: external$4["swagger.yml"]["components"]["responses"]["BadRequestError"];
991
+ 401: external$4["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
992
+ 403: external$4["swagger.yml"]["components"]["responses"]["ForbiddenError"];
993
+ /** Composition not found */
994
+ 404: {
995
+ content: {
996
+ "text/plain": string;
997
+ };
998
+ };
999
+ 429: external$4["swagger.yml"]["components"]["responses"]["RateLimitError"];
1000
+ 500: external$4["swagger.yml"]["components"]["responses"]["InternalServerError"];
1001
+ };
1002
+ };
1003
+ /** Upserts a composition */
1004
+ put: {
1005
+ responses: {
1006
+ /** OK */
1007
+ 204: never;
1008
+ 400: external$4["swagger.yml"]["components"]["responses"]["BadRequestError"];
1009
+ 401: external$4["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
1010
+ 403: external$4["swagger.yml"]["components"]["responses"]["ForbiddenError"];
1011
+ 429: external$4["swagger.yml"]["components"]["responses"]["RateLimitError"];
1012
+ 500: external$4["swagger.yml"]["components"]["responses"]["InternalServerError"];
1013
+ };
1014
+ requestBody: {
1015
+ content: {
1016
+ "application/json": {
1017
+ /**
1018
+ * Format: uuid
1019
+ * @description The project ID to upsert the composition to
1020
+ */
1021
+ projectId: string;
1022
+ /** @description The state of the composition to upsert into. 0 = draft, 64 = published */
1023
+ state: number;
1024
+ composition: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["RootComponentInstance"];
1025
+ /**
1026
+ * @description True if the composition is a pattern (which can be referenced on other compositions)
1027
+ * @default false
1028
+ */
1029
+ pattern?: boolean;
1030
+ /** @description Ignored if present */
1031
+ created?: string;
1032
+ /** @description Ignored if present */
1033
+ modified?: string;
1034
+ };
1035
+ };
1036
+ };
1037
+ };
1038
+ /** Deletes or unpublishes a composition */
1039
+ delete: {
1040
+ responses: {
1041
+ /** OK */
1042
+ 204: never;
1043
+ 400: external$4["swagger.yml"]["components"]["responses"]["BadRequestError"];
1044
+ 401: external$4["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
1045
+ 403: external$4["swagger.yml"]["components"]["responses"]["ForbiddenError"];
1046
+ 429: external$4["swagger.yml"]["components"]["responses"]["RateLimitError"];
1047
+ 500: external$4["swagger.yml"]["components"]["responses"]["InternalServerError"];
1048
+ };
1049
+ requestBody: {
1050
+ content: {
1051
+ "application/json": {
1052
+ /**
1053
+ * Format: uuid
1054
+ * @description The ID of the composition to delete
1055
+ */
1056
+ compositionId: string;
1057
+ /**
1058
+ * Format: uuid
1059
+ * @description The ID of the project the composition to delete belongs to
1060
+ */
1061
+ projectId: string;
1062
+ /** @description The state of the composition to delete (0 = draft, 64 = published [causes unpublishing], unspecified = all) */
1063
+ state?: number;
1064
+ };
1065
+ };
1066
+ };
1067
+ };
1068
+ /** Handles preflight requests. This endpoint allows CORS. */
1069
+ options: {
1070
+ responses: {
1071
+ /** OK */
1072
+ 204: never;
1073
+ };
1074
+ };
1075
+ };
1076
+ }
1077
+ interface components$1 {
1078
+ schemas: {
1079
+ CompositionApiResponse: {
1080
+ /** @description State of compositions to fetch. 0 = draft, 64 = published. */
1081
+ state: number;
1082
+ /**
1083
+ * @deprecated
1084
+ * @description UI status value. Subject to change without notice; do not rely on this value. Only present when `withUIStatus` option is true.
1085
+ * @enum {string}
1086
+ */
1087
+ uiStatus?: "Draft" | "Modified" | "Published" | "Orphan";
1088
+ /**
1089
+ * Format: uuid
1090
+ * @description The project ID that this layout data is part of
1091
+ */
1092
+ projectId: string;
1093
+ /**
1094
+ * Format: date-time,
1095
+ * @description Created date string for this definition
1096
+ */
1097
+ created: string;
1098
+ /**
1099
+ * Format: date-time,
1100
+ * @description Modified date string for this definition
1101
+ */
1102
+ modified: string;
1103
+ /** @description Whether this composition is a pattern (can be referenced by other compositions, not treated as a composition) */
1104
+ pattern: boolean;
1105
+ composition: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["RootComponentInstance"];
1106
+ };
1107
+ CompositionListResponse: {
1108
+ compositions: components$1["schemas"]["CompositionApiResponse"][];
1109
+ /** @description Total number of compositions that match the query. Only present when `withTotalCount` option is true. */
1110
+ totalCount?: number;
1111
+ };
1112
+ };
1113
+ parameters: {
1114
+ /** @description The project the composition(s) are on. */
1115
+ projectId: string;
1116
+ /** @description Specify a single composition ID to fetch. Changes response from list to single. */
1117
+ compositionId: string;
1118
+ /** @description Specify multiple composition IDs to fetch. Response type will be a list. */
1119
+ compositionIDs: string[];
1120
+ /** @description Specify a single composition to fetch by slug. Changes response from list to single. */
1121
+ slug: string;
1122
+ /** @description Specify a single composition to fetch by assodicated project map node ID. Changes response from list to single. */
1123
+ projectMapNodeId: string;
1124
+ /** @description Specify a single composition to fetch by assodicated project map node path. Changes response from list to single. */
1125
+ projectMapNodePath: string;
1126
+ /** @description Required when using project map node id or path for fetch. */
1127
+ projectMapId: string;
1128
+ /** @description 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. */
1129
+ type: string[];
1130
+ /** @description State of compositions to fetch. 0 = draft, 64 = published. */
1131
+ state: number;
1132
+ /** @description Number of records to skip */
1133
+ offset: number;
1134
+ /** @description Max number of records to return */
1135
+ limit: number;
1136
+ /**
1137
+ * @deprecated
1138
+ * @description Signals an enhancer proxy to skip processing enhancements to the data and return raw data only.
1139
+ * This improves performance if you do not require enhanced component data.
1140
+ * If calling the Canvas API directly with no enhancer proxy, this has no effect.
1141
+ */
1142
+ skipEnhance: boolean;
1143
+ /**
1144
+ * @description If true, any pattern references in the composition will be left unresolved.
1145
+ * This is appropriate if you intend to serialize the composition without patterns
1146
+ * embedded into it, and serialize the pattern data separately.
1147
+ */
1148
+ skipPatternResolution: boolean;
1149
+ /**
1150
+ * @description If true the `_id` unique identifier of each non-root component will be part of the response data.
1151
+ * If false, the `_id` will not be present in the API response.
1152
+ */
1153
+ withComponentIDs: boolean;
1154
+ /**
1155
+ * @description Matches compositions where their name, slug, or definition name contains the specified keyword.
1156
+ * NOT a full text search; does not match composition contents.
1157
+ */
1158
+ keyword: string;
1159
+ /**
1160
+ * @description Matches compositions based on whether they are a pattern composition or a regular composition.
1161
+ * If true, only pattern compositions will be returned.
1162
+ * If false, only regular compositions will be returned.
1163
+ * If omitted, both pattern and regular compositions will be returned.
1164
+ */
1165
+ pattern: boolean;
1166
+ /** @description Sets the sorting of the results. If unspecified, results are sorted by name ascending. */
1167
+ orderBy: ("updated_at_DESC" | "updated_at_ASC" | "created_at_DESC" | "created_at_ASC" | "name_DESC" | "name_ASC" | "slug_DESC" | "slug_ASC")[];
1168
+ /**
1169
+ * @deprecated
1170
+ * @description Returns the UI status string of the composition.
1171
+ * This internal status is subject to change without notice, and is thus marked deprecated to discourage use of internal data.
1172
+ */
1173
+ withUIStatus: boolean;
1174
+ /**
1175
+ * @deprecated
1176
+ * @description Filters composition lists by the UI status of the composition.
1177
+ * This internal status is subject to change without notice, and is thus marked deprecated to discourage use of internal data.
1178
+ */
1179
+ uiStatus: ("Draft" | "Modified" | "Published" | "Orphan")[];
1180
+ /** @description Filters composition lists by the user who created them. The user is specified by their identity subject. */
1181
+ createdBy: string;
1182
+ /** @description Filters composition lists by the user who last updated them. The user is specified by their identity subject. */
1183
+ updatedBy: string;
1184
+ /**
1185
+ * @description Controls whether the total count of results will be returned along with the current results page in a list.
1186
+ * Has no effect when not fetching a list. This does impact performance when enabled.
1187
+ */
1188
+ withTotalCount: boolean;
1189
+ };
1190
+ }
1191
+ interface external$4 {
1192
+ "swagger.yml": {
1193
+ paths: {};
1194
+ components: {
1195
+ schemas: {
1196
+ Error: {
1197
+ /** @description Error message(s) that occurred while processing the request */
1198
+ errorMessage?: string[] | string;
1199
+ };
1200
+ };
1201
+ responses: {
1202
+ /** Request input validation failed */
1203
+ BadRequestError: {
1204
+ content: {
1205
+ "application/json": external$4["swagger.yml"]["components"]["schemas"]["Error"];
1206
+ };
1207
+ };
1208
+ /** API key or token was not valid */
1209
+ UnauthorizedError: {
1210
+ content: {
1211
+ "application/json": external$4["swagger.yml"]["components"]["schemas"]["Error"];
1212
+ };
1213
+ };
1214
+ /** Permission was denied */
1215
+ ForbiddenError: {
1216
+ content: {
1217
+ "application/json": external$4["swagger.yml"]["components"]["schemas"]["Error"];
1218
+ };
1219
+ };
1220
+ /** Resource not found */
1221
+ NotFoundError: {
1222
+ content: {
1223
+ "application/json": external$4["swagger.yml"]["components"]["schemas"]["Error"];
1224
+ };
1225
+ };
1226
+ /** Too many requests in allowed time period */
1227
+ RateLimitError: unknown;
1228
+ /** Execution error occurred */
1229
+ InternalServerError: unknown;
1230
+ };
1231
+ };
1232
+ operations: {};
1233
+ };
1234
+ "uniform-canvas-types.swagger.yml": {
1235
+ paths: {};
1236
+ components: {
1237
+ schemas: {
1238
+ /** @description Public ID (used in code). Do not change after creation. */
1239
+ PublicIdProperty: string;
1240
+ /** @description The definition of a component parameter */
1241
+ ComponentDefinitionParameter: {
1242
+ id: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
1243
+ /** @description Friendly name of the parameter */
1244
+ name: string;
1245
+ /** @description Appears next to the parameter in the Composition editor */
1246
+ helpText?: string;
1247
+ /** @description Type name of the parameter (provided by a Uniform integration) */
1248
+ type: string;
1249
+ /** @description The configuration object for the type (type-specific) */
1250
+ typeConfig?: unknown;
1251
+ };
1252
+ /** @description The definition of a named component slot that can contain other components */
1253
+ ComponentDefinitionSlot: {
1254
+ id: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
1255
+ /** @description Friendly name of the slot */
1256
+ name: string;
1257
+ /** @description A list of component definition public IDs that are allowed in this named slot */
1258
+ allowedComponents: string[];
1259
+ /**
1260
+ * @description Whether this slot inherits its allowed components from the parent slot it lives in. If true, allowedComponents is irrelevant.
1261
+ * @default false
1262
+ */
1263
+ inheritAllowedComponents: boolean;
1264
+ /** @description Minimum valid number of components in this slot */
1265
+ minComponents?: number;
1266
+ /** @description Maximum valid number of components in this slot */
1267
+ maxComponents?: number;
1268
+ };
1269
+ /** @description The definition of a composition's slug settings */
1270
+ ComponentDefinitionSlugSettings: {
1271
+ /**
1272
+ * @description Whether the slug is required
1273
+ * no: slug is optional
1274
+ * yes: slug is required
1275
+ * disabled: slug is disabled and will not be shown in the editor
1276
+ *
1277
+ * @default no
1278
+ * @enum {string}
1279
+ */
1280
+ required?: "no" | "yes" | "disabled";
1281
+ /**
1282
+ * @description Slug uniqueness configuration.
1283
+ * no = no unique constraint
1284
+ * local = must be unique within this component type
1285
+ * global = must be unique across all component types
1286
+ *
1287
+ * @enum {string}
1288
+ */
1289
+ unique?: "no" | "local" | "global";
1290
+ /** @description Regular expression slugs must match */
1291
+ regularExpression?: string;
1292
+ /**
1293
+ * @description Custom error message when regular expression validation fails.
1294
+ * Has no effect if `regularExpression` is not set.
1295
+ */
1296
+ regularExpressionMessage?: string;
1297
+ };
1298
+ /** @description The definition of a component variant */
1299
+ ComponentDefinitionVariant: {
1300
+ id: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
1301
+ /** @description Friendly name of the variant */
1302
+ name: string;
1303
+ };
1304
+ /** @description Permission set for a component defintion */
1305
+ ComponentDefinitionPermission: {
1306
+ roleId: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
1307
+ /**
1308
+ * @description Permission type for this permission ComponentDefinition:
1309
+ * read | write | create | delete
1310
+ *
1311
+ * @enum {string}
1312
+ */
1313
+ permission: "read" | "write" | "create" | "delete";
1314
+ /** @description State of the component that this permission applies to */
1315
+ state: number;
1316
+ };
1317
+ /** @description Defines a component type that can live on a Composition */
1318
+ ComponentDefinition: {
1319
+ id: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
1320
+ /** @description Friendly name of the component definition */
1321
+ name: string;
1322
+ /**
1323
+ * @description Icon name or URL for the component definition (e.g. 'screen' or 'https://s3/my-component.jpg')
1324
+ * @default screen
1325
+ */
1326
+ icon?: string;
1327
+ /**
1328
+ * @description The public ID of the parameter whose value should be used to create a display title for this component in the UI.
1329
+ * The parameter type must support being used as a title parameter for this to work.
1330
+ */
1331
+ titleParameter?: string | null;
1332
+ /**
1333
+ * @description Whether this component type can be the root of a composition. If false, this component is only used within slots on other components.
1334
+ * @default false
1335
+ */
1336
+ canBeComposition?: boolean;
1337
+ /** @description The parameters for this component. Parameters are key-value pairs that can be anything from text values to links to CMS entries. */
1338
+ parameters?: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionParameter"][];
1339
+ /**
1340
+ * @description if this component uses team permissions or custom permissions
1341
+ * @default true
1342
+ */
1343
+ useTeamPermissions?: boolean;
1344
+ /** @description Custom role permissions for this component definition */
1345
+ permissions?: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionPermission"][];
1346
+ /** @description The named slots for this component; placement areas where arrays of other components can be added. */
1347
+ slots?: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionSlot"][];
1348
+ slugSettings?: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionSlugSettings"];
1349
+ /** @description Default component instance value */
1350
+ defaults?: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"] | null;
1351
+ /** @description Named variants for this component; enables creation of visual variants that use the same parameter data */
1352
+ variants?: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionVariant"][];
1353
+ /** @description Created date string for this definition (ignored for writes) */
1354
+ created?: string;
1355
+ /** @description Last modified date string for this definition (ignored for writes) */
1356
+ updated?: string;
1357
+ };
1358
+ /** @description Defines an editable parameter on a component. */
1359
+ ComponentParameter: {
1360
+ /** @description The value of the parameter. Any JSON-serializable value is acceptable. */
1361
+ value: unknown;
1362
+ /** @description The type of the parameter. Determines how it is displayed when editing, and tells the consumer how to process it. */
1363
+ type: string;
1364
+ connectedData?: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataElementConnectionDefinition"];
1365
+ };
1366
+ /**
1367
+ * @deprecated
1368
+ * @description Defines a connection to a data element on a data resource. Do not use.
1369
+ */
1370
+ DataElementConnectionDefinition: {
1371
+ /** @description A JSON Pointer expression that defines the data element to connect the parameter to. */
1372
+ pointer: string;
1373
+ /**
1374
+ * @description The syntax used to select the data element to bind to
1375
+ * @enum {string}
1376
+ */
1377
+ syntax: "jptr";
1378
+ /**
1379
+ * @description Whether an error should occur if the connected data element cannot be resolved (i.e. a missing property in the data resource).
1380
+ * In all cases the binding process will remove the parameter data for the unresolvable data element.
1381
+ * When this is true, and the data element failed to bind, the warning entry returned from the binding process will be changed to an error entry.
1382
+ *
1383
+ * @default false
1384
+ */
1385
+ required?: boolean;
1386
+ };
1387
+ /** @description Defines the shape of a component instance served by the composition API. */
1388
+ ComponentInstance: {
1389
+ /** @description Type of the component instance (public_id of its definition) */
1390
+ type: string;
1391
+ /** @description Component parameter values for the component instance */
1392
+ parameters?: {
1393
+ [key: string]: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameter"];
1394
+ };
1395
+ /** @description Public ID of alternate visual appearance for this component, if any selected */
1396
+ variant?: string;
1397
+ /** @description Slots containing any child components */
1398
+ slots?: {
1399
+ [key: string]: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"][];
1400
+ };
1401
+ /** @description Unique identifier of the component within the composition. This is not set unless specifically requested via `withComponentIDs` API parameter. */
1402
+ _id?: string;
1403
+ /** @description Indicates this component instance should be sourced from a pattern library pattern. */
1404
+ _pattern?: string;
1405
+ _dataResources?: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataResourceDefinitions"];
1406
+ /**
1407
+ * @deprecated
1408
+ * @description Data definitions coming from a pattern resolved for this component. Merged with _data during resolution.
1409
+ * Means nothing for PUTs; it will be ignored.
1410
+ */
1411
+ _patternDataResources?: {
1412
+ [key: string]: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataResourceDefinition"];
1413
+ };
1414
+ /**
1415
+ * @description Describes why the pattern could not be resolved, if a pattern could not be resolved. For PUTs, this is allowed but ignored.
1416
+ * CYCLIC: A cyclic pattern graph was detected, which could not be resolved because it would cause an infinite loop.
1417
+ * NOTFOUND: The pattern ID referenced could not be found. It may have been deleted, or not be published yet.
1418
+ * Means nothing for PUTs; it will be ignored.
1419
+ *
1420
+ * @enum {string}
1421
+ */
1422
+ _patternError?: "NOTFOUND" | "CYCLIC";
1423
+ };
1424
+ /** @description Defines the shape of the root component in a composition */
1425
+ RootComponentInstance: {
1426
+ /** @description Type of the component instance (public_id of its definition) */
1427
+ type: string;
1428
+ /** @description Component parameter values for the component instance */
1429
+ parameters?: {
1430
+ [key: string]: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameter"];
1431
+ };
1432
+ /** @description Public ID of alternate visual appearance for this component, if any selected */
1433
+ variant?: string;
1434
+ /** @description Slots containing any child components */
1435
+ slots?: {
1436
+ [key: string]: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"][];
1437
+ };
1438
+ /** @description The public UUID of the composition. */
1439
+ _id: string;
1440
+ /** @description Slug pattern of this component. */
1441
+ _slug?: string | null;
1442
+ /** @description Friendly name of this component. */
1443
+ _name: string;
1444
+ _dataResources?: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataResourceDefinitions"];
1445
+ };
1446
+ /**
1447
+ * @deprecated
1448
+ * @description An instance of a data source (i.e. "Master environment of the stable space", "Yelp API", "Sanity dev dataset").
1449
+ * These are created in the UI and shared across a whole project.
1450
+ * NOTE: if you acquire a list of data sources or do not have manage permissions, you will receive "SECRET"
1451
+ * for all header, parameter, and variable values to obscure the actual encrypted secret value.
1452
+ */
1453
+ DataSource: {
1454
+ /** @description Public ID of the data source */
1455
+ id: string;
1456
+ /** @description Display name of the data source */
1457
+ displayName: string;
1458
+ /** @description The type of data connector this connects to (e.g. 'cms-items', provided by an intalled integration) */
1459
+ connectorType: string;
1460
+ /** @description Base resource URL of the data source. No trailing slash. */
1461
+ baseUrl: string;
1462
+ headers?: {
1463
+ [key: string]: string;
1464
+ } | {
1465
+ key: string;
1466
+ value: string;
1467
+ }[];
1468
+ parameters?: {
1469
+ [key: string]: string;
1470
+ } | {
1471
+ key: string;
1472
+ value: string;
1473
+ }[];
1474
+ /** @description Variables needed to make calls to the data source */
1475
+ variables?: {
1476
+ [key: string]: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataVariableDefinition"];
1477
+ };
1478
+ /** @description Custom configuration specific to the data source being defined (used to maintain UI state for custom integrations) */
1479
+ custom?: {
1480
+ [key: string]: unknown;
1481
+ };
1482
+ };
1483
+ /**
1484
+ * @deprecated
1485
+ * @description A specific type of data that a Data Source 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.
1486
+ */
1487
+ DataType: {
1488
+ /** @description Public ID of the data type */
1489
+ id: string;
1490
+ /** @description Display name of the data type */
1491
+ displayName: string;
1492
+ /** @description Public ID of the associated data source */
1493
+ dataSourceId: string;
1494
+ /**
1495
+ * @description A connector-specific archetype for this data type; used to select UI as well as perform any
1496
+ * necessary post-processing on the response. e.g. 'cms-entry', 'cms-query'. Can be undefined if
1497
+ * no special UI or processing is required.
1498
+ */
1499
+ archetype?: string;
1500
+ allowedOnComponents?: string[];
1501
+ /** @description Resource path, appended to the data source's baseUrl (e.g. baseUrl = https://base.url, path = /v1/endpoint -> final URL https://base.url/v1/endpoint). Must have leading slash. */
1502
+ path: string;
1503
+ /** @description Time-to-live (in seconds) for the primary resource data cache. */
1504
+ ttl?: number;
1505
+ /** @description Long term data resource cache configuration. */
1506
+ longTermCache?: {
1507
+ /** @description A flag to turn the long term cache on. */
1508
+ enabled: boolean;
1509
+ /** @description Time-to-live (in hours) for the long term resource data cache. */
1510
+ ttlInHours?: number;
1511
+ };
1512
+ /** @description A key for the resource data cache purging. */
1513
+ purgeKey?: string;
1514
+ /** @description URL to a custom badge icon for the Uniform dashboard for this data type. If not set falls back to the data connector or integration icons. */
1515
+ badgeIconUrl?: string;
1516
+ /** @description HTTP headers to pass with requests to the data type. Merged with headers from the data source, overriding identical keys. */
1517
+ headers?: {
1518
+ [key: string]: string;
1519
+ } | {
1520
+ key: string;
1521
+ value: string;
1522
+ }[];
1523
+ /** @description Query String parameters to pass with requests to the data type. Merged with parameters from the data source, overriding identical keys. */
1524
+ parameters?: {
1525
+ [key: string]: string;
1526
+ } | {
1527
+ key: string;
1528
+ value: string;
1529
+ }[];
1530
+ /** @description Body to pass with requests to the data type (ignored unless method is POST) */
1531
+ body?: string;
1532
+ /**
1533
+ * @description HTTP method to use with requests to the data type.
1534
+ * @default GET
1535
+ * @enum {string}
1536
+ */
1537
+ method: "GET" | "POST" | "HEAD";
1538
+ /** @description Variables needed to make calls to the data type. Merged with variables from the data source, overriding identical keys. */
1539
+ variables?: {
1540
+ [key: string]: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataVariableDefinition"];
1541
+ };
1542
+ /** @description Custom configuration specific to the data source being defined */
1543
+ custom?: {
1544
+ [key: string]: unknown;
1545
+ };
1546
+ };
1547
+ /**
1548
+ * @deprecated
1549
+ * @description Defines the shape of a data variable on a Data Source or Data Type
1550
+ */
1551
+ DataVariableDefinition: {
1552
+ /** @description Display name of the data variable */
1553
+ displayName?: string;
1554
+ /** @description Explanatory text that is provided to the data resource editor to explain what this variable does. */
1555
+ helpText?: string;
1556
+ /**
1557
+ * @description Type of the data variable. Optionally used as a point of reference for custom integrations to decide how to render an editor for a variable.
1558
+ * @default text
1559
+ */
1560
+ type?: string;
1561
+ /** @description Default value of the data variable */
1562
+ default: string;
1563
+ /** @description Sets the order of the variable when displayed in a list with other variables. If not set, the order defaults to alphabetical with any explicitly set orders first in the list. */
1564
+ order?: number;
1565
+ };
1566
+ /**
1567
+ * @deprecated
1568
+ * @description Data definitions attached to this component. The property name is the key of the data in the data document.
1569
+ * Note: data definitions are inherited from ancestors at runtime (and may be overridden by descendants that use the same key).
1570
+ */
1571
+ DataResourceDefinitions: {
1572
+ [key: string]: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataResourceDefinition"];
1573
+ };
1574
+ /**
1575
+ * @deprecated
1576
+ * @description Defines a data resource, which is a named JSON document, usually from an API response, which may be projected onto parameters
1577
+ */
1578
+ DataResourceDefinition: {
1579
+ /** @description Public ID of the data type that provides this data */
1580
+ type: string;
1581
+ /** @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. */
1582
+ isPatternParameter?: boolean;
1583
+ variables?: external$4["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataResourceVariables"];
1584
+ };
1585
+ /**
1586
+ * @deprecated
1587
+ * @description Variable values for a data resource.
1588
+ */
1589
+ DataResourceVariables: {
1590
+ [key: string]: string;
1591
+ };
1592
+ };
1593
+ };
1594
+ operations: {};
1595
+ };
1596
+ }
1597
+
1598
+ interface components {
1599
+ schemas: {
1600
+ EdgehancersError: {
1601
+ message: string;
1602
+ status: number;
1603
+ statusText: string;
1604
+ };
1605
+ UniformError: components["schemas"]["EdgehancersError"] | external$3["../../../lambda/functions/swagger.yml"]["components"]["schemas"]["Error"];
1606
+ InvalidationPayload: {
1607
+ variables?: {
1608
+ name: string;
1609
+ value: string;
1610
+ }[];
1611
+ };
1612
+ DataDiagnostic: {
1613
+ componentPath: string;
1614
+ dataType: string;
1615
+ dataName: string;
1616
+ performance: {
1617
+ cacheHit: boolean;
1618
+ total: number;
1619
+ retryCount: number;
1620
+ retryDelay: number;
1621
+ sourceCache?: string;
1622
+ };
1623
+ data: unknown;
1624
+ };
1625
+ CompositionIssue: {
1626
+ componentPath: string;
1627
+ componentType: string;
1628
+ message: string;
1629
+ type: string;
1630
+ };
1631
+ InvalidationResult: {
1632
+ ok: boolean;
1633
+ input: {
1634
+ /** Format: uuid */
1635
+ projectId: string;
1636
+ /** Format: uuid */
1637
+ dataTypeId: string;
1638
+ dataVariable?: {
1639
+ name: string;
1640
+ value: string;
1641
+ };
1642
+ };
1643
+ };
1644
+ };
1645
+ responses: {
1646
+ /** Invalid caller input came with the request */
1647
+ BadRequestError: {
1648
+ content: {
1649
+ "application/json": components["schemas"]["UniformError"];
1650
+ };
1651
+ };
1652
+ UnauthorizedError: {
1653
+ content: {
1654
+ "application/json": components["schemas"]["UniformError"];
1655
+ };
1656
+ };
1657
+ ForbiddenError: {
1658
+ content: {
1659
+ "application/json": components["schemas"]["UniformError"];
1660
+ };
1661
+ };
1662
+ /** The requested resource does not exist */
1663
+ NotFoundError: {
1664
+ content: {
1665
+ "application/json": components["schemas"]["UniformError"];
1666
+ };
1667
+ };
1668
+ /** Invalid method was used to call the endpoint */
1669
+ MethodNotAllowedError: {
1670
+ content: {
1671
+ "application/json": components["schemas"]["UniformError"];
1672
+ };
1673
+ };
1674
+ /** The request body could not be parsed or understood */
1675
+ UnprocessableEntityError: {
1676
+ content: {
1677
+ "application/json": components["schemas"]["UniformError"];
1678
+ };
1679
+ };
1680
+ RateLimitError: {
1681
+ content: {
1682
+ "application/json": components["schemas"]["UniformError"];
1683
+ };
1684
+ };
1685
+ /** An unexpected error occurred */
1686
+ InternalServerError: {
1687
+ content: {
1688
+ "application/json": components["schemas"]["UniformError"];
1689
+ };
1690
+ };
1691
+ CompositionResult: {
1692
+ content: {
1693
+ "application/json": {
1694
+ dataDiagnostics?: components["schemas"]["DataDiagnostic"][];
1695
+ errors?: components["schemas"]["CompositionIssue"][];
1696
+ warnings?: components["schemas"]["CompositionIssue"][];
1697
+ } & external$3["../../../lambda/functions/v1-canvas.swagger.yml"]["components"]["schemas"]["CompositionApiResponse"];
1698
+ };
1699
+ };
1700
+ /** Invalidation request was processed; ok indicates if it succeeded */
1701
+ InvalidationResult: {
1702
+ content: {
1703
+ "application/json": components["schemas"]["InvalidationResult"];
1704
+ };
1705
+ };
1706
+ };
1707
+ }
1708
+ interface external$3 {
1709
+ "../../../lambda/functions/swagger.yml": {
1710
+ paths: {};
1711
+ components: {
1712
+ schemas: {
1713
+ Error: {
1714
+ /** @description Error message(s) that occurred while processing the request */
1715
+ errorMessage?: string[] | string;
1716
+ };
1717
+ };
1718
+ responses: {
1719
+ /** Request input validation failed */
1720
+ BadRequestError: {
1721
+ content: {
1722
+ "application/json": external$3["../../../lambda/functions/swagger.yml"]["components"]["schemas"]["Error"];
1723
+ };
1724
+ };
1725
+ /** API key or token was not valid */
1726
+ UnauthorizedError: {
1727
+ content: {
1728
+ "application/json": external$3["../../../lambda/functions/swagger.yml"]["components"]["schemas"]["Error"];
1729
+ };
1730
+ };
1731
+ /** Permission was denied */
1732
+ ForbiddenError: {
1733
+ content: {
1734
+ "application/json": external$3["../../../lambda/functions/swagger.yml"]["components"]["schemas"]["Error"];
1735
+ };
1736
+ };
1737
+ /** Resource not found */
1738
+ NotFoundError: {
1739
+ content: {
1740
+ "application/json": external$3["../../../lambda/functions/swagger.yml"]["components"]["schemas"]["Error"];
1741
+ };
1742
+ };
1743
+ /** Too many requests in allowed time period */
1744
+ RateLimitError: unknown;
1745
+ /** Execution error occurred */
1746
+ InternalServerError: unknown;
1747
+ };
1748
+ };
1749
+ operations: {};
1750
+ };
1751
+ "../../../lambda/functions/uniform-canvas-types.swagger.yml": {
1752
+ paths: {};
1753
+ components: {
1754
+ schemas: {
1755
+ /** @description Public ID (used in code). Do not change after creation. */
1756
+ PublicIdProperty: string;
1757
+ /** @description The definition of a component parameter */
1758
+ ComponentDefinitionParameter: {
1759
+ id: external$3["../../../lambda/functions/uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
1760
+ /** @description Friendly name of the parameter */
1761
+ name: string;
1762
+ /** @description Appears next to the parameter in the Composition editor */
1763
+ helpText?: string;
1764
+ /** @description Type name of the parameter (provided by a Uniform integration) */
1765
+ type: string;
1766
+ /** @description The configuration object for the type (type-specific) */
1767
+ typeConfig?: unknown;
1768
+ };
1769
+ /** @description The definition of a named component slot that can contain other components */
1770
+ ComponentDefinitionSlot: {
1771
+ id: external$3["../../../lambda/functions/uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
1772
+ /** @description Friendly name of the slot */
1773
+ name: string;
1774
+ /** @description A list of component definition public IDs that are allowed in this named slot */
1775
+ allowedComponents: string[];
1776
+ /**
1777
+ * @description Whether this slot inherits its allowed components from the parent slot it lives in. If true, allowedComponents is irrelevant.
1778
+ * @default false
1779
+ */
1780
+ inheritAllowedComponents: boolean;
1781
+ /** @description Minimum valid number of components in this slot */
1782
+ minComponents?: number;
1783
+ /** @description Maximum valid number of components in this slot */
1784
+ maxComponents?: number;
1785
+ };
1786
+ /** @description The definition of a composition's slug settings */
1787
+ ComponentDefinitionSlugSettings: {
1788
+ /**
1789
+ * @description Whether the slug is required
1790
+ * no: slug is optional
1791
+ * yes: slug is required
1792
+ * disabled: slug is disabled and will not be shown in the editor
1793
+ *
1794
+ * @default no
1795
+ * @enum {string}
1796
+ */
1797
+ required?: "no" | "yes" | "disabled";
1798
+ /**
1799
+ * @description Slug uniqueness configuration.
1800
+ * no = no unique constraint
1801
+ * local = must be unique within this component type
1802
+ * global = must be unique across all component types
1803
+ *
1804
+ * @enum {string}
1805
+ */
1806
+ unique?: "no" | "local" | "global";
1807
+ /** @description Regular expression slugs must match */
1808
+ regularExpression?: string;
1809
+ /**
1810
+ * @description Custom error message when regular expression validation fails.
1811
+ * Has no effect if `regularExpression` is not set.
1812
+ */
1813
+ regularExpressionMessage?: string;
1814
+ };
1815
+ /** @description The definition of a component variant */
1816
+ ComponentDefinitionVariant: {
1817
+ id: external$3["../../../lambda/functions/uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
1818
+ /** @description Friendly name of the variant */
1819
+ name: string;
1820
+ };
1821
+ /** @description Permission set for a component defintion */
1822
+ ComponentDefinitionPermission: {
1823
+ roleId: external$3["../../../lambda/functions/uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
1824
+ /**
1825
+ * @description Permission type for this permission ComponentDefinition:
1826
+ * read | write | create | delete
1827
+ *
1828
+ * @enum {string}
1829
+ */
1830
+ permission: "read" | "write" | "create" | "delete";
1831
+ /** @description State of the component that this permission applies to */
1832
+ state: number;
1833
+ };
1834
+ /** @description Defines a component type that can live on a Composition */
1835
+ ComponentDefinition: {
1836
+ id: external$3["../../../lambda/functions/uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
1837
+ /** @description Friendly name of the component definition */
1838
+ name: string;
1839
+ /**
1840
+ * @description Icon name or URL for the component definition (e.g. 'screen' or 'https://s3/my-component.jpg')
1841
+ * @default screen
1842
+ */
1843
+ icon?: string;
1844
+ /**
1845
+ * @description The public ID of the parameter whose value should be used to create a display title for this component in the UI.
1846
+ * The parameter type must support being used as a title parameter for this to work.
1847
+ */
1848
+ titleParameter?: string | null;
1849
+ /**
1850
+ * @description Whether this component type can be the root of a composition. If false, this component is only used within slots on other components.
1851
+ * @default false
1852
+ */
1853
+ canBeComposition?: boolean;
1854
+ /** @description The parameters for this component. Parameters are key-value pairs that can be anything from text values to links to CMS entries. */
1855
+ parameters?: external$3["../../../lambda/functions/uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionParameter"][];
1856
+ /**
1857
+ * @description if this component uses team permissions or custom permissions
1858
+ * @default true
1859
+ */
1860
+ useTeamPermissions?: boolean;
1861
+ /** @description Custom role permissions for this component definition */
1862
+ permissions?: external$3["../../../lambda/functions/uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionPermission"][];
1863
+ /** @description The named slots for this component; placement areas where arrays of other components can be added. */
1864
+ slots?: external$3["../../../lambda/functions/uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionSlot"][];
1865
+ slugSettings?: external$3["../../../lambda/functions/uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionSlugSettings"];
1866
+ /** @description Default component instance value */
1867
+ defaults?: external$3["../../../lambda/functions/uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"] | null;
1868
+ /** @description Named variants for this component; enables creation of visual variants that use the same parameter data */
1869
+ variants?: external$3["../../../lambda/functions/uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionVariant"][];
1870
+ /** @description Created date string for this definition (ignored for writes) */
1871
+ created?: string;
1872
+ /** @description Last modified date string for this definition (ignored for writes) */
1873
+ updated?: string;
1874
+ };
1875
+ /** @description Defines an editable parameter on a component. */
1876
+ ComponentParameter: {
1877
+ /** @description The value of the parameter. Any JSON-serializable value is acceptable. */
1878
+ value: unknown;
1879
+ /** @description The type of the parameter. Determines how it is displayed when editing, and tells the consumer how to process it. */
1880
+ type: string;
1881
+ connectedData?: external$3["../../../lambda/functions/uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataElementConnectionDefinition"];
1882
+ };
1883
+ /**
1884
+ * @deprecated
1885
+ * @description Defines a connection to a data element on a data resource. Do not use.
1886
+ */
1887
+ DataElementConnectionDefinition: {
1888
+ /** @description A JSON Pointer expression that defines the data element to connect the parameter to. */
1889
+ pointer: string;
1890
+ /**
1891
+ * @description The syntax used to select the data element to bind to
1892
+ * @enum {string}
1893
+ */
1894
+ syntax: "jptr";
1895
+ /**
1896
+ * @description Whether an error should occur if the connected data element cannot be resolved (i.e. a missing property in the data resource).
1897
+ * In all cases the binding process will remove the parameter data for the unresolvable data element.
1898
+ * When this is true, and the data element failed to bind, the warning entry returned from the binding process will be changed to an error entry.
1899
+ *
1900
+ * @default false
1901
+ */
1902
+ required?: boolean;
1903
+ };
1904
+ /** @description Defines the shape of a component instance served by the composition API. */
1905
+ ComponentInstance: {
1906
+ /** @description Type of the component instance (public_id of its definition) */
1907
+ type: string;
1908
+ /** @description Component parameter values for the component instance */
1909
+ parameters?: {
1910
+ [key: string]: external$3["../../../lambda/functions/uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameter"];
1911
+ };
1912
+ /** @description Public ID of alternate visual appearance for this component, if any selected */
1913
+ variant?: string;
1914
+ /** @description Slots containing any child components */
1915
+ slots?: {
1916
+ [key: string]: external$3["../../../lambda/functions/uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"][];
1917
+ };
1918
+ /** @description Unique identifier of the component within the composition. This is not set unless specifically requested via `withComponentIDs` API parameter. */
1919
+ _id?: string;
1920
+ /** @description Indicates this component instance should be sourced from a pattern library pattern. */
1921
+ _pattern?: string;
1922
+ _dataResources?: external$3["../../../lambda/functions/uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataResourceDefinitions"];
1923
+ /**
1924
+ * @deprecated
1925
+ * @description Data definitions coming from a pattern resolved for this component. Merged with _data during resolution.
1926
+ * Means nothing for PUTs; it will be ignored.
1927
+ */
1928
+ _patternDataResources?: {
1929
+ [key: string]: external$3["../../../lambda/functions/uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataResourceDefinition"];
1930
+ };
1931
+ /**
1932
+ * @description Describes why the pattern could not be resolved, if a pattern could not be resolved. For PUTs, this is allowed but ignored.
1933
+ * CYCLIC: A cyclic pattern graph was detected, which could not be resolved because it would cause an infinite loop.
1934
+ * NOTFOUND: The pattern ID referenced could not be found. It may have been deleted, or not be published yet.
1935
+ * Means nothing for PUTs; it will be ignored.
1936
+ *
1937
+ * @enum {string}
1938
+ */
1939
+ _patternError?: "NOTFOUND" | "CYCLIC";
1940
+ };
1941
+ /** @description Defines the shape of the root component in a composition */
1942
+ RootComponentInstance: {
1943
+ /** @description Type of the component instance (public_id of its definition) */
1944
+ type: string;
1945
+ /** @description Component parameter values for the component instance */
1946
+ parameters?: {
1947
+ [key: string]: external$3["../../../lambda/functions/uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameter"];
1948
+ };
1949
+ /** @description Public ID of alternate visual appearance for this component, if any selected */
1950
+ variant?: string;
1951
+ /** @description Slots containing any child components */
1952
+ slots?: {
1953
+ [key: string]: external$3["../../../lambda/functions/uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"][];
1954
+ };
1955
+ /** @description The public UUID of the composition. */
1956
+ _id: string;
1957
+ /** @description Slug pattern of this component. */
1958
+ _slug?: string | null;
1959
+ /** @description Friendly name of this component. */
1960
+ _name: string;
1961
+ _dataResources?: external$3["../../../lambda/functions/uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataResourceDefinitions"];
1962
+ };
1963
+ /**
1964
+ * @deprecated
1965
+ * @description An instance of a data source (i.e. "Master environment of the stable space", "Yelp API", "Sanity dev dataset").
1966
+ * These are created in the UI and shared across a whole project.
1967
+ * NOTE: if you acquire a list of data sources or do not have manage permissions, you will receive "SECRET"
1968
+ * for all header, parameter, and variable values to obscure the actual encrypted secret value.
1969
+ */
1970
+ DataSource: {
1971
+ /** @description Public ID of the data source */
1972
+ id: string;
1973
+ /** @description Display name of the data source */
1974
+ displayName: string;
1975
+ /** @description The type of data connector this connects to (e.g. 'cms-items', provided by an intalled integration) */
1976
+ connectorType: string;
1977
+ /** @description Base resource URL of the data source. No trailing slash. */
1978
+ baseUrl: string;
1979
+ headers?: {
1980
+ [key: string]: string;
1981
+ } | {
1982
+ key: string;
1983
+ value: string;
1984
+ }[];
1985
+ parameters?: {
1986
+ [key: string]: string;
1987
+ } | {
1988
+ key: string;
1989
+ value: string;
1990
+ }[];
1991
+ /** @description Variables needed to make calls to the data source */
1992
+ variables?: {
1993
+ [key: string]: external$3["../../../lambda/functions/uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataVariableDefinition"];
1994
+ };
1995
+ /** @description Custom configuration specific to the data source being defined (used to maintain UI state for custom integrations) */
1996
+ custom?: {
1997
+ [key: string]: unknown;
1998
+ };
1999
+ };
2000
+ /**
2001
+ * @deprecated
2002
+ * @description A specific type of data that a Data Source 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.
2003
+ */
2004
+ DataType: {
2005
+ /** @description Public ID of the data type */
2006
+ id: string;
2007
+ /** @description Display name of the data type */
2008
+ displayName: string;
2009
+ /** @description Public ID of the associated data source */
2010
+ dataSourceId: string;
2011
+ /**
2012
+ * @description A connector-specific archetype for this data type; used to select UI as well as perform any
2013
+ * necessary post-processing on the response. e.g. 'cms-entry', 'cms-query'. Can be undefined if
2014
+ * no special UI or processing is required.
2015
+ */
2016
+ archetype?: string;
2017
+ allowedOnComponents?: string[];
2018
+ /** @description Resource path, appended to the data source's baseUrl (e.g. baseUrl = https://base.url, path = /v1/endpoint -> final URL https://base.url/v1/endpoint). Must have leading slash. */
2019
+ path: string;
2020
+ /** @description Time-to-live (in seconds) for the primary resource data cache. */
2021
+ ttl?: number;
2022
+ /** @description Long term data resource cache configuration. */
2023
+ longTermCache?: {
2024
+ /** @description A flag to turn the long term cache on. */
2025
+ enabled: boolean;
2026
+ /** @description Time-to-live (in hours) for the long term resource data cache. */
2027
+ ttlInHours?: number;
2028
+ };
2029
+ /** @description A key for the resource data cache purging. */
2030
+ purgeKey?: string;
2031
+ /** @description URL to a custom badge icon for the Uniform dashboard for this data type. If not set falls back to the data connector or integration icons. */
2032
+ badgeIconUrl?: string;
2033
+ /** @description HTTP headers to pass with requests to the data type. Merged with headers from the data source, overriding identical keys. */
2034
+ headers?: {
2035
+ [key: string]: string;
2036
+ } | {
2037
+ key: string;
2038
+ value: string;
2039
+ }[];
2040
+ /** @description Query String parameters to pass with requests to the data type. Merged with parameters from the data source, overriding identical keys. */
2041
+ parameters?: {
2042
+ [key: string]: string;
2043
+ } | {
2044
+ key: string;
2045
+ value: string;
2046
+ }[];
2047
+ /** @description Body to pass with requests to the data type (ignored unless method is POST) */
2048
+ body?: string;
2049
+ /**
2050
+ * @description HTTP method to use with requests to the data type.
2051
+ * @default GET
2052
+ * @enum {string}
2053
+ */
2054
+ method: "GET" | "POST" | "HEAD";
2055
+ /** @description Variables needed to make calls to the data type. Merged with variables from the data source, overriding identical keys. */
2056
+ variables?: {
2057
+ [key: string]: external$3["../../../lambda/functions/uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataVariableDefinition"];
2058
+ };
2059
+ /** @description Custom configuration specific to the data source being defined */
2060
+ custom?: {
2061
+ [key: string]: unknown;
2062
+ };
2063
+ };
2064
+ /**
2065
+ * @deprecated
2066
+ * @description Defines the shape of a data variable on a Data Source or Data Type
2067
+ */
2068
+ DataVariableDefinition: {
2069
+ /** @description Display name of the data variable */
2070
+ displayName?: string;
2071
+ /** @description Explanatory text that is provided to the data resource editor to explain what this variable does. */
2072
+ helpText?: string;
2073
+ /**
2074
+ * @description Type of the data variable. Optionally used as a point of reference for custom integrations to decide how to render an editor for a variable.
2075
+ * @default text
2076
+ */
2077
+ type?: string;
2078
+ /** @description Default value of the data variable */
2079
+ default: string;
2080
+ /** @description Sets the order of the variable when displayed in a list with other variables. If not set, the order defaults to alphabetical with any explicitly set orders first in the list. */
2081
+ order?: number;
2082
+ };
2083
+ /**
2084
+ * @deprecated
2085
+ * @description Data definitions attached to this component. The property name is the key of the data in the data document.
2086
+ * Note: data definitions are inherited from ancestors at runtime (and may be overridden by descendants that use the same key).
2087
+ */
2088
+ DataResourceDefinitions: {
2089
+ [key: string]: external$3["../../../lambda/functions/uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataResourceDefinition"];
2090
+ };
2091
+ /**
2092
+ * @deprecated
2093
+ * @description Defines a data resource, which is a named JSON document, usually from an API response, which may be projected onto parameters
2094
+ */
2095
+ DataResourceDefinition: {
2096
+ /** @description Public ID of the data type that provides this data */
2097
+ type: string;
2098
+ /** @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. */
2099
+ isPatternParameter?: boolean;
2100
+ variables?: external$3["../../../lambda/functions/uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataResourceVariables"];
2101
+ };
2102
+ /**
2103
+ * @deprecated
2104
+ * @description Variable values for a data resource.
2105
+ */
2106
+ DataResourceVariables: {
2107
+ [key: string]: string;
2108
+ };
2109
+ };
2110
+ };
2111
+ operations: {};
2112
+ };
2113
+ "../../../lambda/functions/v1-canvas.swagger.yml": {
2114
+ paths: {
2115
+ "/api/v1/canvas": {
2116
+ get: {
2117
+ parameters: {
2118
+ query: {
2119
+ /** Specify a single composition ID to fetch. Changes response from list to single. */
2120
+ compositionId?: external$3["../../../lambda/functions/v1-canvas.swagger.yml"]["components"]["parameters"]["compositionId"];
2121
+ /** Specify multiple composition IDs to fetch. Response type will be a list. */
2122
+ compositionIDs?: external$3["../../../lambda/functions/v1-canvas.swagger.yml"]["components"]["parameters"]["compositionIDs"];
2123
+ /** Filters composition lists by the user who created them. The user is specified by their identity subject. */
2124
+ createdBy?: external$3["../../../lambda/functions/v1-canvas.swagger.yml"]["components"]["parameters"]["createdBy"];
2125
+ /**
2126
+ * Matches compositions where their name, slug, or definition name contains the specified keyword.
2127
+ * NOT a full text search; does not match composition contents.
2128
+ */
2129
+ keyword?: external$3["../../../lambda/functions/v1-canvas.swagger.yml"]["components"]["parameters"]["keyword"];
2130
+ /** Max number of records to return */
2131
+ limit?: external$3["../../../lambda/functions/v1-canvas.swagger.yml"]["components"]["parameters"]["limit"];
2132
+ /** Number of records to skip */
2133
+ offset?: external$3["../../../lambda/functions/v1-canvas.swagger.yml"]["components"]["parameters"]["offset"];
2134
+ /** Sets the sorting of the results. If unspecified, results are sorted by name ascending. */
2135
+ orderBy?: external$3["../../../lambda/functions/v1-canvas.swagger.yml"]["components"]["parameters"]["orderBy"];
2136
+ /**
2137
+ * Matches compositions based on whether they are a pattern composition or a regular composition.
2138
+ * If true, only pattern compositions will be returned.
2139
+ * If false, only regular compositions will be returned.
2140
+ * If omitted, both pattern and regular compositions will be returned.
2141
+ */
2142
+ pattern?: external$3["../../../lambda/functions/v1-canvas.swagger.yml"]["components"]["parameters"]["pattern"];
2143
+ /** The project the composition(s) are on. */
2144
+ projectId: external$3["../../../lambda/functions/v1-canvas.swagger.yml"]["components"]["parameters"]["projectId"];
2145
+ /** Required when using project map node id or path for fetch. */
2146
+ projectMapId?: external$3["../../../lambda/functions/v1-canvas.swagger.yml"]["components"]["parameters"]["projectMapId"];
2147
+ /** Specify a single composition to fetch by assodicated project map node ID. Changes response from list to single. */
2148
+ projectMapNodeId?: external$3["../../../lambda/functions/v1-canvas.swagger.yml"]["components"]["parameters"]["projectMapNodeId"];
2149
+ /** Specify a single composition to fetch by assodicated project map node path. Changes response from list to single. */
2150
+ projectMapNodePath?: external$3["../../../lambda/functions/v1-canvas.swagger.yml"]["components"]["parameters"]["projectMapNodePath"];
2151
+ /**
2152
+ * @deprecated Signals an enhancer proxy to skip processing enhancements to the data and return raw data only.
2153
+ * This improves performance if you do not require enhanced component data.
2154
+ * If calling the Canvas API directly with no enhancer proxy, this has no effect.
2155
+ */
2156
+ skipEnhance?: external$3["../../../lambda/functions/v1-canvas.swagger.yml"]["components"]["parameters"]["skipEnhance"];
2157
+ /**
2158
+ * If true, any pattern references in the composition will be left unresolved.
2159
+ * This is appropriate if you intend to serialize the composition without patterns
2160
+ * embedded into it, and serialize the pattern data separately.
2161
+ */
2162
+ skipPatternResolution?: external$3["../../../lambda/functions/v1-canvas.swagger.yml"]["components"]["parameters"]["skipPatternResolution"];
2163
+ /** Specify a single composition to fetch by slug. Changes response from list to single. */
2164
+ slug?: external$3["../../../lambda/functions/v1-canvas.swagger.yml"]["components"]["parameters"]["slug"];
2165
+ /** State of compositions to fetch. 0 = draft, 64 = published. */
2166
+ state?: external$3["../../../lambda/functions/v1-canvas.swagger.yml"]["components"]["parameters"]["state"];
2167
+ /** 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. */
2168
+ type?: external$3["../../../lambda/functions/v1-canvas.swagger.yml"]["components"]["parameters"]["type"];
2169
+ /**
2170
+ * @deprecated Filters composition lists by the UI status of the composition.
2171
+ * This internal status is subject to change without notice, and is thus marked deprecated to discourage use of internal data.
2172
+ */
2173
+ uiStatus?: external$3["../../../lambda/functions/v1-canvas.swagger.yml"]["components"]["parameters"]["uiStatus"];
2174
+ /** Filters composition lists by the user who last updated them. The user is specified by their identity subject. */
2175
+ updatedBy?: external$3["../../../lambda/functions/v1-canvas.swagger.yml"]["components"]["parameters"]["updatedBy"];
2176
+ /**
2177
+ * If true the `_id` unique identifier of each non-root component will be part of the response data.
2178
+ * If false, the `_id` will not be present in the API response.
2179
+ */
2180
+ withComponentIDs?: external$3["../../../lambda/functions/v1-canvas.swagger.yml"]["components"]["parameters"]["withComponentIDs"];
2181
+ /**
2182
+ * Controls whether the total count of results will be returned along with the current results page in a list.
2183
+ * Has no effect when not fetching a list. This does impact performance when enabled.
2184
+ */
2185
+ withTotalCount?: external$3["../../../lambda/functions/v1-canvas.swagger.yml"]["components"]["parameters"]["withTotalCount"];
2186
+ /**
2187
+ * @deprecated Returns the UI status string of the composition.
2188
+ * This internal status is subject to change without notice, and is thus marked deprecated to discourage use of internal data.
2189
+ */
2190
+ withUIStatus?: external$3["../../../lambda/functions/v1-canvas.swagger.yml"]["components"]["parameters"]["withUIStatus"];
2191
+ };
2192
+ };
2193
+ responses: {
2194
+ /** OK */
2195
+ 200: {
2196
+ content: {
2197
+ "application/json": external$3["../../../lambda/functions/v1-canvas.swagger.yml"]["components"]["schemas"]["CompositionListResponse"] | external$3["../../../lambda/functions/v1-canvas.swagger.yml"]["components"]["schemas"]["CompositionApiResponse"];
2198
+ };
2199
+ };
2200
+ 400: external$3["../../../lambda/functions/swagger.yml"]["components"]["responses"]["BadRequestError"];
2201
+ 401: external$3["../../../lambda/functions/swagger.yml"]["components"]["responses"]["UnauthorizedError"];
2202
+ 403: external$3["../../../lambda/functions/swagger.yml"]["components"]["responses"]["ForbiddenError"];
2203
+ /** Composition not found */
2204
+ 404: {
2205
+ content: {
2206
+ "text/plain": string;
2207
+ };
2208
+ };
2209
+ 429: external$3["../../../lambda/functions/swagger.yml"]["components"]["responses"]["RateLimitError"];
2210
+ 500: external$3["../../../lambda/functions/swagger.yml"]["components"]["responses"]["InternalServerError"];
2211
+ };
2212
+ };
2213
+ /** Upserts a composition */
2214
+ put: {
2215
+ responses: {
2216
+ /** OK */
2217
+ 204: never;
2218
+ 400: external$3["../../../lambda/functions/swagger.yml"]["components"]["responses"]["BadRequestError"];
2219
+ 401: external$3["../../../lambda/functions/swagger.yml"]["components"]["responses"]["UnauthorizedError"];
2220
+ 403: external$3["../../../lambda/functions/swagger.yml"]["components"]["responses"]["ForbiddenError"];
2221
+ 429: external$3["../../../lambda/functions/swagger.yml"]["components"]["responses"]["RateLimitError"];
2222
+ 500: external$3["../../../lambda/functions/swagger.yml"]["components"]["responses"]["InternalServerError"];
2223
+ };
2224
+ requestBody: {
2225
+ content: {
2226
+ "application/json": {
2227
+ /**
2228
+ * Format: uuid
2229
+ * @description The project ID to upsert the composition to
2230
+ */
2231
+ projectId: string;
2232
+ /** @description The state of the composition to upsert into. 0 = draft, 64 = published */
2233
+ state: number;
2234
+ composition: external$3["../../../lambda/functions/uniform-canvas-types.swagger.yml"]["components"]["schemas"]["RootComponentInstance"];
2235
+ /**
2236
+ * @description True if the composition is a pattern (which can be referenced on other compositions)
2237
+ * @default false
2238
+ */
2239
+ pattern?: boolean;
2240
+ /** @description Ignored if present */
2241
+ created?: string;
2242
+ /** @description Ignored if present */
2243
+ modified?: string;
2244
+ };
2245
+ };
2246
+ };
2247
+ };
2248
+ /** Deletes or unpublishes a composition */
2249
+ delete: {
2250
+ responses: {
2251
+ /** OK */
2252
+ 204: never;
2253
+ 400: external$3["../../../lambda/functions/swagger.yml"]["components"]["responses"]["BadRequestError"];
2254
+ 401: external$3["../../../lambda/functions/swagger.yml"]["components"]["responses"]["UnauthorizedError"];
2255
+ 403: external$3["../../../lambda/functions/swagger.yml"]["components"]["responses"]["ForbiddenError"];
2256
+ 429: external$3["../../../lambda/functions/swagger.yml"]["components"]["responses"]["RateLimitError"];
2257
+ 500: external$3["../../../lambda/functions/swagger.yml"]["components"]["responses"]["InternalServerError"];
2258
+ };
2259
+ requestBody: {
2260
+ content: {
2261
+ "application/json": {
2262
+ /**
2263
+ * Format: uuid
2264
+ * @description The ID of the composition to delete
2265
+ */
2266
+ compositionId: string;
2267
+ /**
2268
+ * Format: uuid
2269
+ * @description The ID of the project the composition to delete belongs to
2270
+ */
2271
+ projectId: string;
2272
+ /** @description The state of the composition to delete (0 = draft, 64 = published [causes unpublishing], unspecified = all) */
2273
+ state?: number;
2274
+ };
2275
+ };
2276
+ };
2277
+ };
2278
+ /** Handles preflight requests. This endpoint allows CORS. */
2279
+ options: {
2280
+ responses: {
2281
+ /** OK */
2282
+ 204: never;
2283
+ };
2284
+ };
2285
+ };
2286
+ };
2287
+ components: {
2288
+ schemas: {
2289
+ CompositionApiResponse: {
2290
+ /** @description State of compositions to fetch. 0 = draft, 64 = published. */
2291
+ state: number;
2292
+ /**
2293
+ * @deprecated
2294
+ * @description UI status value. Subject to change without notice; do not rely on this value. Only present when `withUIStatus` option is true.
2295
+ * @enum {string}
2296
+ */
2297
+ uiStatus?: "Draft" | "Modified" | "Published" | "Orphan";
2298
+ /**
2299
+ * Format: uuid
2300
+ * @description The project ID that this layout data is part of
2301
+ */
2302
+ projectId: string;
2303
+ /**
2304
+ * Format: date-time,
2305
+ * @description Created date string for this definition
2306
+ */
2307
+ created: string;
2308
+ /**
2309
+ * Format: date-time,
2310
+ * @description Modified date string for this definition
2311
+ */
2312
+ modified: string;
2313
+ /** @description Whether this composition is a pattern (can be referenced by other compositions, not treated as a composition) */
2314
+ pattern: boolean;
2315
+ composition: external$3["../../../lambda/functions/uniform-canvas-types.swagger.yml"]["components"]["schemas"]["RootComponentInstance"];
2316
+ };
2317
+ CompositionListResponse: {
2318
+ compositions: external$3["../../../lambda/functions/v1-canvas.swagger.yml"]["components"]["schemas"]["CompositionApiResponse"][];
2319
+ /** @description Total number of compositions that match the query. Only present when `withTotalCount` option is true. */
2320
+ totalCount?: number;
2321
+ };
2322
+ };
2323
+ parameters: {
2324
+ /** @description The project the composition(s) are on. */
2325
+ projectId: string;
2326
+ /** @description Specify a single composition ID to fetch. Changes response from list to single. */
2327
+ compositionId: string;
2328
+ /** @description Specify multiple composition IDs to fetch. Response type will be a list. */
2329
+ compositionIDs: string[];
2330
+ /** @description Specify a single composition to fetch by slug. Changes response from list to single. */
2331
+ slug: string;
2332
+ /** @description Specify a single composition to fetch by assodicated project map node ID. Changes response from list to single. */
2333
+ projectMapNodeId: string;
2334
+ /** @description Specify a single composition to fetch by assodicated project map node path. Changes response from list to single. */
2335
+ projectMapNodePath: string;
2336
+ /** @description Required when using project map node id or path for fetch. */
2337
+ projectMapId: string;
2338
+ /** @description 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. */
2339
+ type: string[];
2340
+ /** @description State of compositions to fetch. 0 = draft, 64 = published. */
2341
+ state: number;
2342
+ /** @description Number of records to skip */
2343
+ offset: number;
2344
+ /** @description Max number of records to return */
2345
+ limit: number;
2346
+ /**
2347
+ * @deprecated
2348
+ * @description Signals an enhancer proxy to skip processing enhancements to the data and return raw data only.
2349
+ * This improves performance if you do not require enhanced component data.
2350
+ * If calling the Canvas API directly with no enhancer proxy, this has no effect.
2351
+ */
2352
+ skipEnhance: boolean;
2353
+ /**
2354
+ * @description If true, any pattern references in the composition will be left unresolved.
2355
+ * This is appropriate if you intend to serialize the composition without patterns
2356
+ * embedded into it, and serialize the pattern data separately.
2357
+ */
2358
+ skipPatternResolution: boolean;
2359
+ /**
2360
+ * @description If true the `_id` unique identifier of each non-root component will be part of the response data.
2361
+ * If false, the `_id` will not be present in the API response.
2362
+ */
2363
+ withComponentIDs: boolean;
2364
+ /**
2365
+ * @description Matches compositions where their name, slug, or definition name contains the specified keyword.
2366
+ * NOT a full text search; does not match composition contents.
2367
+ */
2368
+ keyword: string;
2369
+ /**
2370
+ * @description Matches compositions based on whether they are a pattern composition or a regular composition.
2371
+ * If true, only pattern compositions will be returned.
2372
+ * If false, only regular compositions will be returned.
2373
+ * If omitted, both pattern and regular compositions will be returned.
2374
+ */
2375
+ pattern: boolean;
2376
+ /** @description Sets the sorting of the results. If unspecified, results are sorted by name ascending. */
2377
+ orderBy: ("updated_at_DESC" | "updated_at_ASC" | "created_at_DESC" | "created_at_ASC" | "name_DESC" | "name_ASC" | "slug_DESC" | "slug_ASC")[];
2378
+ /**
2379
+ * @deprecated
2380
+ * @description Returns the UI status string of the composition.
2381
+ * This internal status is subject to change without notice, and is thus marked deprecated to discourage use of internal data.
2382
+ */
2383
+ withUIStatus: boolean;
2384
+ /**
2385
+ * @deprecated
2386
+ * @description Filters composition lists by the UI status of the composition.
2387
+ * This internal status is subject to change without notice, and is thus marked deprecated to discourage use of internal data.
2388
+ */
2389
+ uiStatus: ("Draft" | "Modified" | "Published" | "Orphan")[];
2390
+ /** @description Filters composition lists by the user who created them. The user is specified by their identity subject. */
2391
+ createdBy: string;
2392
+ /** @description Filters composition lists by the user who last updated them. The user is specified by their identity subject. */
2393
+ updatedBy: string;
2394
+ /**
2395
+ * @description Controls whether the total count of results will be returned along with the current results page in a list.
2396
+ * Has no effect when not fetching a list. This does impact performance when enabled.
2397
+ */
2398
+ withTotalCount: boolean;
2399
+ };
2400
+ };
2401
+ operations: {};
2402
+ };
2403
+ }
2404
+
2405
+ declare type Components = components$1['schemas'];
2406
+ declare type SharedComponents = components$2['schemas'];
2407
+ declare type Api = paths$3['/api/v1/canvas'];
2408
+ /** Query parameter options for GET /api/v1/canvas */
2409
+ declare type CompositionGetParameters = Omit<Api['get']['parameters']['query'], 'type'> & {
2410
+ type?: string | string[];
2411
+ };
2412
+ declare type CompositionGetOrderBy = NonNullable<Api['get']['parameters']['query']['orderBy']>[0];
2413
+ /** The GET response from /api/v1/canvas when `component` or `slug` params are specified */
2414
+ declare type CompositionGetResponse = Components['CompositionApiResponse'];
2415
+ /** @deprecated - internal use, do not rely on this value */
2416
+ declare type CompositionUIStatus = NonNullable<Components['CompositionApiResponse']['uiStatus']>;
2417
+ /** The GET response from /api/v1/canvas when `component` or `slug` are not specified */
2418
+ declare type CompositionGetListResponse = Components['CompositionListResponse'];
2419
+ /** The PUT request body for /api/v1/canvas */
2420
+ declare type CompositionPutParameters = Api['put']['requestBody']['content']['application/json'];
2421
+ /** Shape of the DELETE request body for /api/v1/canvas */
2422
+ declare type CompositionDeleteParameters = Api['delete']['requestBody']['content']['application/json'];
2423
+ /** @deprecated use CompositionGetResponse */
2424
+ declare type CompositionAPIResponse = CompositionGetResponse;
2425
+ /** @deprecated use CompositionDeleteParameters */
2426
+ declare type CompositionAPIDeleteRequest = CompositionDeleteParameters;
2427
+ /** @deprecated use CompositionGetParameters */
2428
+ declare type CompositionListAPIResponse = CompositionGetListResponse;
2429
+ /** @deprecated use CompositionGetParameters */
2430
+ declare type CompositionAPIOptions = CompositionGetParameters;
2431
+ /** Defines an editable parameter on a component. */
2432
+ declare type ComponentParameter<TValue = unknown> = Omit<SharedComponents['ComponentParameter'], 'value'> & {
2433
+ /** The type of the parameter. Determines how it is displayed when editing, and tells the consumer how to process it. */
2434
+ value: TValue;
2435
+ };
2436
+ /** Defines a connection to a data element on a data resource. */
2437
+ declare type DataElementConnectionDefinition = SharedComponents['DataElementConnectionDefinition'];
2438
+ /** Variable values for a data resource. */
2439
+ declare type DataResourceVariables = SharedComponents['DataResourceVariables'];
2440
+ /**
2441
+ * Data definitions attached to this component. The property name is the key of the data in the data document.
2442
+ * Note: data definitions are inherited from ancestors at runtime (and may be overridden by descendants that use the same key).
2443
+ */
2444
+ declare type DataResourceDefinitions = SharedComponents['DataResourceDefinitions'];
2445
+ /** Defines a data resource, which is a named JSON document, usually from an API response, which may be projected onto parameters */
2446
+ declare type DataResourceDefinition = SharedComponents['DataResourceDefinition'];
2447
+ /** Defines the shape of a component instance served by the composition API. */
2448
+ declare type ComponentInstance = SharedComponents['ComponentInstance'] & {
2449
+ /** Data for the component instance, provided by a component enhancer. Never set in unenhanced data. */
2450
+ data?: Record<string, unknown>;
2451
+ };
2452
+ /** Defines the shape of the root component in a composition */
2453
+ declare type RootComponentInstance = SharedComponents['RootComponentInstance'];
2454
+ /** Defines single structure to keep all canvas models (used in CLI commands and Starter content generations) */
2455
+ declare type CanvasDefinitions = {
2456
+ components?: Array<ComponentDefinition>;
2457
+ compositions?: Array<CompositionGetResponse>;
2458
+ dataTypes?: Array<DataType>;
2459
+ };
2460
+ /** Defines shared parameters for requests getting a single composition */
2461
+ declare type CompositionGetOneSharedParameters = Pick<CompositionGetParameters, 'state' | 'skipEnhance' | 'skipPatternResolution' | 'withComponentIDs' | 'withUIStatus' | 'withTotalCount'>;
2462
+ declare type CompositionGetBy<RequiredParameters extends keyof CompositionGetParameters> = CompositionGetOneSharedParameters & Required<Pick<CompositionGetParameters, RequiredParameters>>;
2463
+ /** Defines exact parameters for specific requests getting a single composition */
2464
+ declare type CompositionGetByNodePathParameters = CompositionGetBy<'projectMapNodePath' | 'projectMapId'>;
2465
+ declare type CompositionGetByNodeIdParameters = CompositionGetBy<'projectMapNodeId' | 'projectMapId'>;
2466
+ declare type CompositionGetBySlugParameters = CompositionGetBy<'slug'>;
2467
+ declare type CompositionGetByIdParameters = CompositionGetBy<'compositionId'>;
2468
+ /** Switches for data resolution */
2469
+ declare type DataResolutionOption = {
2470
+ unstable_resolveData?: boolean;
2471
+ };
2472
+ declare type DataResolutionOptionNegative = {
2473
+ unstable_resolveData?: false;
2474
+ };
2475
+ declare type DataResolutionOptionPositive = {
2476
+ unstable_resolveData: true;
2477
+ };
2478
+ declare type DataResolutionParameters = {
2479
+ /**
2480
+ * Adds additional diagnostics (`dataDiagnostics`) to the response containing timings and resolved datas for the composition.
2481
+ * Because this adds a lot of data to the response, we do not recommend using this unless diagnosing performance issues.
2482
+ */
2483
+ unstable_dataDiagnostics?: boolean;
2484
+ /**
2485
+ * Pass dynamic variables to the composition that are required for resolving bindings and datas,
2486
+ * such as language, detail page ID, etc.
2487
+ */
2488
+ unstable_dynamicVariables?: Record<string, string>;
2489
+ };
2490
+ /** Types of issue that can occur when fetching composition data */
2491
+ declare type CompositionIssue = CompositionPatternIssue | DataResourceIssue | DataElementBindingIssue | DataResourceVariableIssue | DataResolutionConfigIssue;
2492
+ declare type CompositionIssueCore = components['schemas']['CompositionIssue'];
2493
+ /** An error that occured resolving a pattern that is referenced on the composition */
2494
+ declare type CompositionPatternIssue = CompositionIssueCore & {
2495
+ type: 'pattern';
2496
+ code: NonNullable<ComponentInstance['_patternError']>;
2497
+ };
2498
+ /** An error while binding a data element from a data resource to a component parameter (i.e. a missing property in the data resource) */
2499
+ declare type DataElementBindingIssue = CompositionIssueCore & {
2500
+ type: 'binding';
2501
+ parameterName: string;
2502
+ };
2503
+ /** An error that occurred fetching a data defined on the composition or a pattern within */
2504
+ declare type DataResourceIssue = CompositionIssueCore & {
2505
+ type: 'data';
2506
+ dataName: string;
2507
+ dataType: string;
2508
+ };
2509
+ /** An issue that occurred while binding dynamic variables to composition data resources */
2510
+ declare type DataResourceVariableIssue = CompositionIssueCore & {
2511
+ type: 'variable';
2512
+ variableName: string;
2513
+ };
2514
+ declare type DataResolutionConfigIssue = {
2515
+ message: string;
2516
+ type: 'config';
2517
+ };
2518
+ /** Diagnostic data about the load performance of attached composition datas */
2519
+ declare type CompositionDataDiagnostic = components['schemas']['DataDiagnostic'];
2520
+ /** Response as it comes from the data resolution endpoint */
2521
+ declare type CompositionResolvedGetResponse = CompositionGetResponse & {
2522
+ /**
2523
+ * Copies of resolved data and how long it took to resolve each data.
2524
+ * Only set when dataDiagnostics=true is passed to the options.
2525
+ */
2526
+ dataDiagnostics?: Array<CompositionDataDiagnostic>;
2527
+ /**
2528
+ * Any failures to bind to data that occured on bindings marked 'must exist'.
2529
+ * If no failures occurred, this will be undefined.
2530
+ * NOTE: No exception will be thrown if this type of error occurs. You must inspect this property if you care to cause client errors.
2531
+ */
2532
+ errors?: Array<CompositionIssue>;
2533
+ /**
2534
+ * Any failures to bind to data that occurred on optional bindings. In most cases, these are only informational (i.e. data is bound to a property that does not always exist)
2535
+ * If no failures occurred, this will be undefined.
2536
+ */
2537
+ warnings?: Array<CompositionIssue>;
2538
+ };
2539
+ /** All valid response types */
2540
+ declare type CompositionGetValidResponses = CompositionGetResponse | CompositionResolvedGetResponse;
2541
+
2542
+ /**
2543
+ * This file was auto-generated by openapi-typescript.
2544
+ * Do not make direct changes to the file.
2545
+ */
2546
+ interface paths$2 {
2547
+ "/api/v1/data-source": {
2548
+ get: {
2549
+ parameters: {
2550
+ query: {
2551
+ dataSourceId: string;
2552
+ projectId: string;
2553
+ };
2554
+ };
2555
+ responses: {
2556
+ /** OK */
2557
+ 200: {
2558
+ content: {
2559
+ "application/json": {
2560
+ result: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataSource"];
2561
+ };
2562
+ };
2563
+ };
2564
+ 400: external$2["swagger.yml"]["components"]["responses"]["BadRequestError"];
2565
+ 401: external$2["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
2566
+ 403: external$2["swagger.yml"]["components"]["responses"]["ForbiddenError"];
2567
+ 429: external$2["swagger.yml"]["components"]["responses"]["RateLimitError"];
2568
+ 500: external$2["swagger.yml"]["components"]["responses"]["InternalServerError"];
2569
+ };
2570
+ };
2571
+ put: {
2572
+ responses: {
2573
+ /** OK */
2574
+ 204: never;
2575
+ 400: external$2["swagger.yml"]["components"]["responses"]["BadRequestError"];
2576
+ 401: external$2["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
2577
+ 403: external$2["swagger.yml"]["components"]["responses"]["ForbiddenError"];
2578
+ 429: external$2["swagger.yml"]["components"]["responses"]["RateLimitError"];
2579
+ 500: external$2["swagger.yml"]["components"]["responses"]["InternalServerError"];
2580
+ };
2581
+ requestBody: {
2582
+ content: {
2583
+ "application/json": {
2584
+ data: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataSource"];
2585
+ /** Format: uuid */
2586
+ projectId: string;
2587
+ /** Format: uuid */
2588
+ integrationId: string;
2589
+ };
2590
+ };
2591
+ };
2592
+ };
2593
+ delete: {
2594
+ responses: {
2595
+ /** OK */
2596
+ 204: never;
2597
+ 400: external$2["swagger.yml"]["components"]["responses"]["BadRequestError"];
2598
+ 401: external$2["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
2599
+ 403: external$2["swagger.yml"]["components"]["responses"]["ForbiddenError"];
2600
+ 429: external$2["swagger.yml"]["components"]["responses"]["RateLimitError"];
2601
+ 500: external$2["swagger.yml"]["components"]["responses"]["InternalServerError"];
2602
+ };
2603
+ requestBody: {
2604
+ content: {
2605
+ "application/json": {
2606
+ dataSourceId: string;
2607
+ /** Format: uuid */
2608
+ projectId: string;
2609
+ };
2610
+ };
2611
+ };
2612
+ };
2613
+ };
2614
+ }
2615
+ interface external$2 {
2616
+ "swagger.yml": {
2617
+ paths: {};
2618
+ components: {
2619
+ schemas: {
2620
+ Error: {
2621
+ /** @description Error message(s) that occurred while processing the request */
2622
+ errorMessage?: string[] | string;
2623
+ };
2624
+ };
2625
+ responses: {
2626
+ /** Request input validation failed */
2627
+ BadRequestError: {
2628
+ content: {
2629
+ "application/json": external$2["swagger.yml"]["components"]["schemas"]["Error"];
2630
+ };
2631
+ };
2632
+ /** API key or token was not valid */
2633
+ UnauthorizedError: {
2634
+ content: {
2635
+ "application/json": external$2["swagger.yml"]["components"]["schemas"]["Error"];
2636
+ };
2637
+ };
2638
+ /** Permission was denied */
2639
+ ForbiddenError: {
2640
+ content: {
2641
+ "application/json": external$2["swagger.yml"]["components"]["schemas"]["Error"];
2642
+ };
2643
+ };
2644
+ /** Resource not found */
2645
+ NotFoundError: {
2646
+ content: {
2647
+ "application/json": external$2["swagger.yml"]["components"]["schemas"]["Error"];
2648
+ };
2649
+ };
2650
+ /** Too many requests in allowed time period */
2651
+ RateLimitError: unknown;
2652
+ /** Execution error occurred */
2653
+ InternalServerError: unknown;
2654
+ };
2655
+ };
2656
+ operations: {};
2657
+ };
2658
+ "uniform-canvas-types.swagger.yml": {
2659
+ paths: {};
2660
+ components: {
2661
+ schemas: {
2662
+ /** @description Public ID (used in code). Do not change after creation. */
2663
+ PublicIdProperty: string;
2664
+ /** @description The definition of a component parameter */
2665
+ ComponentDefinitionParameter: {
2666
+ id: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
2667
+ /** @description Friendly name of the parameter */
2668
+ name: string;
2669
+ /** @description Appears next to the parameter in the Composition editor */
2670
+ helpText?: string;
2671
+ /** @description Type name of the parameter (provided by a Uniform integration) */
2672
+ type: string;
2673
+ /** @description The configuration object for the type (type-specific) */
2674
+ typeConfig?: unknown;
2675
+ };
2676
+ /** @description The definition of a named component slot that can contain other components */
2677
+ ComponentDefinitionSlot: {
2678
+ id: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
2679
+ /** @description Friendly name of the slot */
2680
+ name: string;
2681
+ /** @description A list of component definition public IDs that are allowed in this named slot */
2682
+ allowedComponents: string[];
2683
+ /**
2684
+ * @description Whether this slot inherits its allowed components from the parent slot it lives in. If true, allowedComponents is irrelevant.
2685
+ * @default false
2686
+ */
2687
+ inheritAllowedComponents: boolean;
2688
+ /** @description Minimum valid number of components in this slot */
2689
+ minComponents?: number;
2690
+ /** @description Maximum valid number of components in this slot */
2691
+ maxComponents?: number;
2692
+ };
2693
+ /** @description The definition of a composition's slug settings */
2694
+ ComponentDefinitionSlugSettings: {
2695
+ /**
2696
+ * @description Whether the slug is required
2697
+ * no: slug is optional
2698
+ * yes: slug is required
2699
+ * disabled: slug is disabled and will not be shown in the editor
2700
+ *
2701
+ * @default no
2702
+ * @enum {string}
2703
+ */
2704
+ required?: "no" | "yes" | "disabled";
2705
+ /**
2706
+ * @description Slug uniqueness configuration.
2707
+ * no = no unique constraint
2708
+ * local = must be unique within this component type
2709
+ * global = must be unique across all component types
2710
+ *
2711
+ * @enum {string}
2712
+ */
2713
+ unique?: "no" | "local" | "global";
2714
+ /** @description Regular expression slugs must match */
2715
+ regularExpression?: string;
2716
+ /**
2717
+ * @description Custom error message when regular expression validation fails.
2718
+ * Has no effect if `regularExpression` is not set.
2719
+ */
2720
+ regularExpressionMessage?: string;
2721
+ };
2722
+ /** @description The definition of a component variant */
2723
+ ComponentDefinitionVariant: {
2724
+ id: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
2725
+ /** @description Friendly name of the variant */
2726
+ name: string;
2727
+ };
2728
+ /** @description Permission set for a component defintion */
2729
+ ComponentDefinitionPermission: {
2730
+ roleId: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
2731
+ /**
2732
+ * @description Permission type for this permission ComponentDefinition:
2733
+ * read | write | create | delete
2734
+ *
2735
+ * @enum {string}
2736
+ */
2737
+ permission: "read" | "write" | "create" | "delete";
2738
+ /** @description State of the component that this permission applies to */
2739
+ state: number;
2740
+ };
2741
+ /** @description Defines a component type that can live on a Composition */
2742
+ ComponentDefinition: {
2743
+ id: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
2744
+ /** @description Friendly name of the component definition */
2745
+ name: string;
2746
+ /**
2747
+ * @description Icon name or URL for the component definition (e.g. 'screen' or 'https://s3/my-component.jpg')
2748
+ * @default screen
2749
+ */
2750
+ icon?: string;
2751
+ /**
2752
+ * @description The public ID of the parameter whose value should be used to create a display title for this component in the UI.
2753
+ * The parameter type must support being used as a title parameter for this to work.
2754
+ */
2755
+ titleParameter?: string | null;
2756
+ /**
2757
+ * @description Whether this component type can be the root of a composition. If false, this component is only used within slots on other components.
2758
+ * @default false
2759
+ */
2760
+ canBeComposition?: boolean;
2761
+ /** @description The parameters for this component. Parameters are key-value pairs that can be anything from text values to links to CMS entries. */
2762
+ parameters?: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionParameter"][];
2763
+ /**
2764
+ * @description if this component uses team permissions or custom permissions
2765
+ * @default true
2766
+ */
2767
+ useTeamPermissions?: boolean;
2768
+ /** @description Custom role permissions for this component definition */
2769
+ permissions?: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionPermission"][];
2770
+ /** @description The named slots for this component; placement areas where arrays of other components can be added. */
2771
+ slots?: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionSlot"][];
2772
+ slugSettings?: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionSlugSettings"];
2773
+ /** @description Default component instance value */
2774
+ defaults?: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"] | null;
2775
+ /** @description Named variants for this component; enables creation of visual variants that use the same parameter data */
2776
+ variants?: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionVariant"][];
2777
+ /** @description Created date string for this definition (ignored for writes) */
2778
+ created?: string;
2779
+ /** @description Last modified date string for this definition (ignored for writes) */
2780
+ updated?: string;
2781
+ };
2782
+ /** @description Defines an editable parameter on a component. */
2783
+ ComponentParameter: {
2784
+ /** @description The value of the parameter. Any JSON-serializable value is acceptable. */
2785
+ value: unknown;
2786
+ /** @description The type of the parameter. Determines how it is displayed when editing, and tells the consumer how to process it. */
2787
+ type: string;
2788
+ connectedData?: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataElementConnectionDefinition"];
2789
+ };
2790
+ /**
2791
+ * @deprecated
2792
+ * @description Defines a connection to a data element on a data resource. Do not use.
2793
+ */
2794
+ DataElementConnectionDefinition: {
2795
+ /** @description A JSON Pointer expression that defines the data element to connect the parameter to. */
2796
+ pointer: string;
2797
+ /**
2798
+ * @description The syntax used to select the data element to bind to
2799
+ * @enum {string}
2800
+ */
2801
+ syntax: "jptr";
2802
+ /**
2803
+ * @description Whether an error should occur if the connected data element cannot be resolved (i.e. a missing property in the data resource).
2804
+ * In all cases the binding process will remove the parameter data for the unresolvable data element.
2805
+ * When this is true, and the data element failed to bind, the warning entry returned from the binding process will be changed to an error entry.
2806
+ *
2807
+ * @default false
2808
+ */
2809
+ required?: boolean;
2810
+ };
2811
+ /** @description Defines the shape of a component instance served by the composition API. */
2812
+ ComponentInstance: {
2813
+ /** @description Type of the component instance (public_id of its definition) */
2814
+ type: string;
2815
+ /** @description Component parameter values for the component instance */
2816
+ parameters?: {
2817
+ [key: string]: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameter"];
2818
+ };
2819
+ /** @description Public ID of alternate visual appearance for this component, if any selected */
2820
+ variant?: string;
2821
+ /** @description Slots containing any child components */
2822
+ slots?: {
2823
+ [key: string]: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"][];
2824
+ };
2825
+ /** @description Unique identifier of the component within the composition. This is not set unless specifically requested via `withComponentIDs` API parameter. */
2826
+ _id?: string;
2827
+ /** @description Indicates this component instance should be sourced from a pattern library pattern. */
2828
+ _pattern?: string;
2829
+ _dataResources?: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataResourceDefinitions"];
2830
+ /**
2831
+ * @deprecated
2832
+ * @description Data definitions coming from a pattern resolved for this component. Merged with _data during resolution.
2833
+ * Means nothing for PUTs; it will be ignored.
2834
+ */
2835
+ _patternDataResources?: {
2836
+ [key: string]: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataResourceDefinition"];
2837
+ };
2838
+ /**
2839
+ * @description Describes why the pattern could not be resolved, if a pattern could not be resolved. For PUTs, this is allowed but ignored.
2840
+ * CYCLIC: A cyclic pattern graph was detected, which could not be resolved because it would cause an infinite loop.
2841
+ * NOTFOUND: The pattern ID referenced could not be found. It may have been deleted, or not be published yet.
2842
+ * Means nothing for PUTs; it will be ignored.
2843
+ *
2844
+ * @enum {string}
2845
+ */
2846
+ _patternError?: "NOTFOUND" | "CYCLIC";
2847
+ };
2848
+ /** @description Defines the shape of the root component in a composition */
2849
+ RootComponentInstance: {
2850
+ /** @description Type of the component instance (public_id of its definition) */
2851
+ type: string;
2852
+ /** @description Component parameter values for the component instance */
2853
+ parameters?: {
2854
+ [key: string]: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameter"];
2855
+ };
2856
+ /** @description Public ID of alternate visual appearance for this component, if any selected */
2857
+ variant?: string;
2858
+ /** @description Slots containing any child components */
2859
+ slots?: {
2860
+ [key: string]: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"][];
2861
+ };
2862
+ /** @description The public UUID of the composition. */
2863
+ _id: string;
2864
+ /** @description Slug pattern of this component. */
2865
+ _slug?: string | null;
2866
+ /** @description Friendly name of this component. */
2867
+ _name: string;
2868
+ _dataResources?: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataResourceDefinitions"];
2869
+ };
2870
+ /**
2871
+ * @deprecated
2872
+ * @description An instance of a data source (i.e. "Master environment of the stable space", "Yelp API", "Sanity dev dataset").
2873
+ * These are created in the UI and shared across a whole project.
2874
+ * NOTE: if you acquire a list of data sources or do not have manage permissions, you will receive "SECRET"
2875
+ * for all header, parameter, and variable values to obscure the actual encrypted secret value.
2876
+ */
2877
+ DataSource: {
2878
+ /** @description Public ID of the data source */
2879
+ id: string;
2880
+ /** @description Display name of the data source */
2881
+ displayName: string;
2882
+ /** @description The type of data connector this connects to (e.g. 'cms-items', provided by an intalled integration) */
2883
+ connectorType: string;
2884
+ /** @description Base resource URL of the data source. No trailing slash. */
2885
+ baseUrl: string;
2886
+ headers?: {
2887
+ [key: string]: string;
2888
+ } | {
2889
+ key: string;
2890
+ value: string;
2891
+ }[];
2892
+ parameters?: {
2893
+ [key: string]: string;
2894
+ } | {
2895
+ key: string;
2896
+ value: string;
2897
+ }[];
2898
+ /** @description Variables needed to make calls to the data source */
2899
+ variables?: {
2900
+ [key: string]: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataVariableDefinition"];
2901
+ };
2902
+ /** @description Custom configuration specific to the data source being defined (used to maintain UI state for custom integrations) */
2903
+ custom?: {
2904
+ [key: string]: unknown;
2905
+ };
2906
+ };
2907
+ /**
2908
+ * @deprecated
2909
+ * @description A specific type of data that a Data Source 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.
2910
+ */
2911
+ DataType: {
2912
+ /** @description Public ID of the data type */
2913
+ id: string;
2914
+ /** @description Display name of the data type */
2915
+ displayName: string;
2916
+ /** @description Public ID of the associated data source */
2917
+ dataSourceId: string;
2918
+ /**
2919
+ * @description A connector-specific archetype for this data type; used to select UI as well as perform any
2920
+ * necessary post-processing on the response. e.g. 'cms-entry', 'cms-query'. Can be undefined if
2921
+ * no special UI or processing is required.
2922
+ */
2923
+ archetype?: string;
2924
+ allowedOnComponents?: string[];
2925
+ /** @description Resource path, appended to the data source's baseUrl (e.g. baseUrl = https://base.url, path = /v1/endpoint -> final URL https://base.url/v1/endpoint). Must have leading slash. */
2926
+ path: string;
2927
+ /** @description Time-to-live (in seconds) for the primary resource data cache. */
2928
+ ttl?: number;
2929
+ /** @description Long term data resource cache configuration. */
2930
+ longTermCache?: {
2931
+ /** @description A flag to turn the long term cache on. */
2932
+ enabled: boolean;
2933
+ /** @description Time-to-live (in hours) for the long term resource data cache. */
2934
+ ttlInHours?: number;
2935
+ };
2936
+ /** @description A key for the resource data cache purging. */
2937
+ purgeKey?: string;
2938
+ /** @description URL to a custom badge icon for the Uniform dashboard for this data type. If not set falls back to the data connector or integration icons. */
2939
+ badgeIconUrl?: string;
2940
+ /** @description HTTP headers to pass with requests to the data type. Merged with headers from the data source, overriding identical keys. */
2941
+ headers?: {
2942
+ [key: string]: string;
2943
+ } | {
2944
+ key: string;
2945
+ value: string;
2946
+ }[];
2947
+ /** @description Query String parameters to pass with requests to the data type. Merged with parameters from the data source, overriding identical keys. */
2948
+ parameters?: {
2949
+ [key: string]: string;
2950
+ } | {
2951
+ key: string;
2952
+ value: string;
2953
+ }[];
2954
+ /** @description Body to pass with requests to the data type (ignored unless method is POST) */
2955
+ body?: string;
2956
+ /**
2957
+ * @description HTTP method to use with requests to the data type.
2958
+ * @default GET
2959
+ * @enum {string}
2960
+ */
2961
+ method: "GET" | "POST" | "HEAD";
2962
+ /** @description Variables needed to make calls to the data type. Merged with variables from the data source, overriding identical keys. */
2963
+ variables?: {
2964
+ [key: string]: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataVariableDefinition"];
2965
+ };
2966
+ /** @description Custom configuration specific to the data source being defined */
2967
+ custom?: {
2968
+ [key: string]: unknown;
2969
+ };
2970
+ };
2971
+ /**
2972
+ * @deprecated
2973
+ * @description Defines the shape of a data variable on a Data Source or Data Type
2974
+ */
2975
+ DataVariableDefinition: {
2976
+ /** @description Display name of the data variable */
2977
+ displayName?: string;
2978
+ /** @description Explanatory text that is provided to the data resource editor to explain what this variable does. */
2979
+ helpText?: string;
2980
+ /**
2981
+ * @description Type of the data variable. Optionally used as a point of reference for custom integrations to decide how to render an editor for a variable.
2982
+ * @default text
2983
+ */
2984
+ type?: string;
2985
+ /** @description Default value of the data variable */
2986
+ default: string;
2987
+ /** @description Sets the order of the variable when displayed in a list with other variables. If not set, the order defaults to alphabetical with any explicitly set orders first in the list. */
2988
+ order?: number;
2989
+ };
2990
+ /**
2991
+ * @deprecated
2992
+ * @description Data definitions attached to this component. The property name is the key of the data in the data document.
2993
+ * Note: data definitions are inherited from ancestors at runtime (and may be overridden by descendants that use the same key).
2994
+ */
2995
+ DataResourceDefinitions: {
2996
+ [key: string]: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataResourceDefinition"];
2997
+ };
2998
+ /**
2999
+ * @deprecated
3000
+ * @description Defines a data resource, which is a named JSON document, usually from an API response, which may be projected onto parameters
3001
+ */
3002
+ DataResourceDefinition: {
3003
+ /** @description Public ID of the data type that provides this data */
3004
+ type: string;
3005
+ /** @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. */
3006
+ isPatternParameter?: boolean;
3007
+ variables?: external$2["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataResourceVariables"];
3008
+ };
3009
+ /**
3010
+ * @deprecated
3011
+ * @description Variable values for a data resource.
3012
+ */
3013
+ DataResourceVariables: {
3014
+ [key: string]: string;
3015
+ };
3016
+ };
3017
+ };
3018
+ operations: {};
3019
+ };
3020
+ }
3021
+
3022
+ /**
3023
+ * This file was auto-generated by openapi-typescript.
3024
+ * Do not make direct changes to the file.
3025
+ */
3026
+ interface paths$1 {
3027
+ "/api/v1/data-sources": {
3028
+ get: {
3029
+ parameters: {
3030
+ query: {
3031
+ projectId: string;
3032
+ };
3033
+ };
3034
+ responses: {
3035
+ /**
3036
+ * Gets a list of data sources.
3037
+ * Note that all parameters, headers, and variables will have the value 'SECRET', as this endpoint
3038
+ * requires minimal permissions. To decrypt secrets, you must be an admin or manage-data-sources privileged
3039
+ * user, and fetch using the `data-source` endpoint for each data source.
3040
+ */
3041
+ 200: {
3042
+ content: {
3043
+ "application/json": {
3044
+ results: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataSource"][];
3045
+ };
3046
+ };
3047
+ };
3048
+ 400: external$1["swagger.yml"]["components"]["responses"]["BadRequestError"];
3049
+ 401: external$1["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
3050
+ 403: external$1["swagger.yml"]["components"]["responses"]["ForbiddenError"];
3051
+ 429: external$1["swagger.yml"]["components"]["responses"]["RateLimitError"];
3052
+ 500: external$1["swagger.yml"]["components"]["responses"]["InternalServerError"];
3053
+ };
3054
+ };
3055
+ };
3056
+ }
3057
+ interface external$1 {
3058
+ "swagger.yml": {
3059
+ paths: {};
3060
+ components: {
3061
+ schemas: {
3062
+ Error: {
3063
+ /** @description Error message(s) that occurred while processing the request */
3064
+ errorMessage?: string[] | string;
3065
+ };
3066
+ };
3067
+ responses: {
3068
+ /** Request input validation failed */
3069
+ BadRequestError: {
3070
+ content: {
3071
+ "application/json": external$1["swagger.yml"]["components"]["schemas"]["Error"];
3072
+ };
3073
+ };
3074
+ /** API key or token was not valid */
3075
+ UnauthorizedError: {
3076
+ content: {
3077
+ "application/json": external$1["swagger.yml"]["components"]["schemas"]["Error"];
3078
+ };
3079
+ };
3080
+ /** Permission was denied */
3081
+ ForbiddenError: {
3082
+ content: {
3083
+ "application/json": external$1["swagger.yml"]["components"]["schemas"]["Error"];
3084
+ };
3085
+ };
3086
+ /** Resource not found */
3087
+ NotFoundError: {
3088
+ content: {
3089
+ "application/json": external$1["swagger.yml"]["components"]["schemas"]["Error"];
3090
+ };
3091
+ };
3092
+ /** Too many requests in allowed time period */
3093
+ RateLimitError: unknown;
3094
+ /** Execution error occurred */
3095
+ InternalServerError: unknown;
3096
+ };
3097
+ };
3098
+ operations: {};
3099
+ };
3100
+ "uniform-canvas-types.swagger.yml": {
3101
+ paths: {};
3102
+ components: {
3103
+ schemas: {
3104
+ /** @description Public ID (used in code). Do not change after creation. */
3105
+ PublicIdProperty: string;
3106
+ /** @description The definition of a component parameter */
3107
+ ComponentDefinitionParameter: {
3108
+ id: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
3109
+ /** @description Friendly name of the parameter */
3110
+ name: string;
3111
+ /** @description Appears next to the parameter in the Composition editor */
3112
+ helpText?: string;
3113
+ /** @description Type name of the parameter (provided by a Uniform integration) */
3114
+ type: string;
3115
+ /** @description The configuration object for the type (type-specific) */
3116
+ typeConfig?: unknown;
3117
+ };
3118
+ /** @description The definition of a named component slot that can contain other components */
3119
+ ComponentDefinitionSlot: {
3120
+ id: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
3121
+ /** @description Friendly name of the slot */
3122
+ name: string;
3123
+ /** @description A list of component definition public IDs that are allowed in this named slot */
3124
+ allowedComponents: string[];
3125
+ /**
3126
+ * @description Whether this slot inherits its allowed components from the parent slot it lives in. If true, allowedComponents is irrelevant.
3127
+ * @default false
3128
+ */
3129
+ inheritAllowedComponents: boolean;
3130
+ /** @description Minimum valid number of components in this slot */
3131
+ minComponents?: number;
3132
+ /** @description Maximum valid number of components in this slot */
3133
+ maxComponents?: number;
3134
+ };
3135
+ /** @description The definition of a composition's slug settings */
3136
+ ComponentDefinitionSlugSettings: {
3137
+ /**
3138
+ * @description Whether the slug is required
3139
+ * no: slug is optional
3140
+ * yes: slug is required
3141
+ * disabled: slug is disabled and will not be shown in the editor
3142
+ *
3143
+ * @default no
3144
+ * @enum {string}
3145
+ */
3146
+ required?: "no" | "yes" | "disabled";
3147
+ /**
3148
+ * @description Slug uniqueness configuration.
3149
+ * no = no unique constraint
3150
+ * local = must be unique within this component type
3151
+ * global = must be unique across all component types
3152
+ *
3153
+ * @enum {string}
3154
+ */
3155
+ unique?: "no" | "local" | "global";
3156
+ /** @description Regular expression slugs must match */
3157
+ regularExpression?: string;
3158
+ /**
3159
+ * @description Custom error message when regular expression validation fails.
3160
+ * Has no effect if `regularExpression` is not set.
3161
+ */
3162
+ regularExpressionMessage?: string;
3163
+ };
3164
+ /** @description The definition of a component variant */
3165
+ ComponentDefinitionVariant: {
3166
+ id: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
3167
+ /** @description Friendly name of the variant */
3168
+ name: string;
3169
+ };
3170
+ /** @description Permission set for a component defintion */
3171
+ ComponentDefinitionPermission: {
3172
+ roleId: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
3173
+ /**
3174
+ * @description Permission type for this permission ComponentDefinition:
3175
+ * read | write | create | delete
3176
+ *
3177
+ * @enum {string}
3178
+ */
3179
+ permission: "read" | "write" | "create" | "delete";
3180
+ /** @description State of the component that this permission applies to */
3181
+ state: number;
3182
+ };
3183
+ /** @description Defines a component type that can live on a Composition */
3184
+ ComponentDefinition: {
3185
+ id: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
3186
+ /** @description Friendly name of the component definition */
3187
+ name: string;
3188
+ /**
3189
+ * @description Icon name or URL for the component definition (e.g. 'screen' or 'https://s3/my-component.jpg')
3190
+ * @default screen
3191
+ */
3192
+ icon?: string;
3193
+ /**
3194
+ * @description The public ID of the parameter whose value should be used to create a display title for this component in the UI.
3195
+ * The parameter type must support being used as a title parameter for this to work.
3196
+ */
3197
+ titleParameter?: string | null;
3198
+ /**
3199
+ * @description Whether this component type can be the root of a composition. If false, this component is only used within slots on other components.
3200
+ * @default false
3201
+ */
3202
+ canBeComposition?: boolean;
3203
+ /** @description The parameters for this component. Parameters are key-value pairs that can be anything from text values to links to CMS entries. */
3204
+ parameters?: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionParameter"][];
3205
+ /**
3206
+ * @description if this component uses team permissions or custom permissions
3207
+ * @default true
3208
+ */
3209
+ useTeamPermissions?: boolean;
3210
+ /** @description Custom role permissions for this component definition */
3211
+ permissions?: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionPermission"][];
3212
+ /** @description The named slots for this component; placement areas where arrays of other components can be added. */
3213
+ slots?: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionSlot"][];
3214
+ slugSettings?: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionSlugSettings"];
3215
+ /** @description Default component instance value */
3216
+ defaults?: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"] | null;
3217
+ /** @description Named variants for this component; enables creation of visual variants that use the same parameter data */
3218
+ variants?: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionVariant"][];
3219
+ /** @description Created date string for this definition (ignored for writes) */
3220
+ created?: string;
3221
+ /** @description Last modified date string for this definition (ignored for writes) */
3222
+ updated?: string;
3223
+ };
3224
+ /** @description Defines an editable parameter on a component. */
3225
+ ComponentParameter: {
3226
+ /** @description The value of the parameter. Any JSON-serializable value is acceptable. */
3227
+ value: unknown;
3228
+ /** @description The type of the parameter. Determines how it is displayed when editing, and tells the consumer how to process it. */
3229
+ type: string;
3230
+ connectedData?: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataElementConnectionDefinition"];
3231
+ };
3232
+ /**
3233
+ * @deprecated
3234
+ * @description Defines a connection to a data element on a data resource. Do not use.
3235
+ */
3236
+ DataElementConnectionDefinition: {
3237
+ /** @description A JSON Pointer expression that defines the data element to connect the parameter to. */
3238
+ pointer: string;
3239
+ /**
3240
+ * @description The syntax used to select the data element to bind to
3241
+ * @enum {string}
3242
+ */
3243
+ syntax: "jptr";
3244
+ /**
3245
+ * @description Whether an error should occur if the connected data element cannot be resolved (i.e. a missing property in the data resource).
3246
+ * In all cases the binding process will remove the parameter data for the unresolvable data element.
3247
+ * When this is true, and the data element failed to bind, the warning entry returned from the binding process will be changed to an error entry.
3248
+ *
3249
+ * @default false
3250
+ */
3251
+ required?: boolean;
3252
+ };
3253
+ /** @description Defines the shape of a component instance served by the composition API. */
3254
+ ComponentInstance: {
3255
+ /** @description Type of the component instance (public_id of its definition) */
3256
+ type: string;
3257
+ /** @description Component parameter values for the component instance */
3258
+ parameters?: {
3259
+ [key: string]: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameter"];
3260
+ };
3261
+ /** @description Public ID of alternate visual appearance for this component, if any selected */
3262
+ variant?: string;
3263
+ /** @description Slots containing any child components */
3264
+ slots?: {
3265
+ [key: string]: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"][];
3266
+ };
3267
+ /** @description Unique identifier of the component within the composition. This is not set unless specifically requested via `withComponentIDs` API parameter. */
3268
+ _id?: string;
3269
+ /** @description Indicates this component instance should be sourced from a pattern library pattern. */
3270
+ _pattern?: string;
3271
+ _dataResources?: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataResourceDefinitions"];
3272
+ /**
3273
+ * @deprecated
3274
+ * @description Data definitions coming from a pattern resolved for this component. Merged with _data during resolution.
3275
+ * Means nothing for PUTs; it will be ignored.
3276
+ */
3277
+ _patternDataResources?: {
3278
+ [key: string]: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataResourceDefinition"];
3279
+ };
3280
+ /**
3281
+ * @description Describes why the pattern could not be resolved, if a pattern could not be resolved. For PUTs, this is allowed but ignored.
3282
+ * CYCLIC: A cyclic pattern graph was detected, which could not be resolved because it would cause an infinite loop.
3283
+ * NOTFOUND: The pattern ID referenced could not be found. It may have been deleted, or not be published yet.
3284
+ * Means nothing for PUTs; it will be ignored.
3285
+ *
3286
+ * @enum {string}
3287
+ */
3288
+ _patternError?: "NOTFOUND" | "CYCLIC";
3289
+ };
3290
+ /** @description Defines the shape of the root component in a composition */
3291
+ RootComponentInstance: {
3292
+ /** @description Type of the component instance (public_id of its definition) */
3293
+ type: string;
3294
+ /** @description Component parameter values for the component instance */
3295
+ parameters?: {
3296
+ [key: string]: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameter"];
3297
+ };
3298
+ /** @description Public ID of alternate visual appearance for this component, if any selected */
3299
+ variant?: string;
3300
+ /** @description Slots containing any child components */
3301
+ slots?: {
3302
+ [key: string]: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"][];
3303
+ };
3304
+ /** @description The public UUID of the composition. */
3305
+ _id: string;
3306
+ /** @description Slug pattern of this component. */
3307
+ _slug?: string | null;
3308
+ /** @description Friendly name of this component. */
3309
+ _name: string;
3310
+ _dataResources?: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataResourceDefinitions"];
3311
+ };
3312
+ /**
3313
+ * @deprecated
3314
+ * @description An instance of a data source (i.e. "Master environment of the stable space", "Yelp API", "Sanity dev dataset").
3315
+ * These are created in the UI and shared across a whole project.
3316
+ * NOTE: if you acquire a list of data sources or do not have manage permissions, you will receive "SECRET"
3317
+ * for all header, parameter, and variable values to obscure the actual encrypted secret value.
3318
+ */
3319
+ DataSource: {
3320
+ /** @description Public ID of the data source */
3321
+ id: string;
3322
+ /** @description Display name of the data source */
3323
+ displayName: string;
3324
+ /** @description The type of data connector this connects to (e.g. 'cms-items', provided by an intalled integration) */
3325
+ connectorType: string;
3326
+ /** @description Base resource URL of the data source. No trailing slash. */
3327
+ baseUrl: string;
3328
+ headers?: {
3329
+ [key: string]: string;
3330
+ } | {
3331
+ key: string;
3332
+ value: string;
3333
+ }[];
3334
+ parameters?: {
3335
+ [key: string]: string;
3336
+ } | {
3337
+ key: string;
3338
+ value: string;
3339
+ }[];
3340
+ /** @description Variables needed to make calls to the data source */
3341
+ variables?: {
3342
+ [key: string]: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataVariableDefinition"];
3343
+ };
3344
+ /** @description Custom configuration specific to the data source being defined (used to maintain UI state for custom integrations) */
3345
+ custom?: {
3346
+ [key: string]: unknown;
3347
+ };
3348
+ };
3349
+ /**
3350
+ * @deprecated
3351
+ * @description A specific type of data that a Data Source 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.
3352
+ */
3353
+ DataType: {
3354
+ /** @description Public ID of the data type */
3355
+ id: string;
3356
+ /** @description Display name of the data type */
3357
+ displayName: string;
3358
+ /** @description Public ID of the associated data source */
3359
+ dataSourceId: string;
3360
+ /**
3361
+ * @description A connector-specific archetype for this data type; used to select UI as well as perform any
3362
+ * necessary post-processing on the response. e.g. 'cms-entry', 'cms-query'. Can be undefined if
3363
+ * no special UI or processing is required.
3364
+ */
3365
+ archetype?: string;
3366
+ allowedOnComponents?: string[];
3367
+ /** @description Resource path, appended to the data source's baseUrl (e.g. baseUrl = https://base.url, path = /v1/endpoint -> final URL https://base.url/v1/endpoint). Must have leading slash. */
3368
+ path: string;
3369
+ /** @description Time-to-live (in seconds) for the primary resource data cache. */
3370
+ ttl?: number;
3371
+ /** @description Long term data resource cache configuration. */
3372
+ longTermCache?: {
3373
+ /** @description A flag to turn the long term cache on. */
3374
+ enabled: boolean;
3375
+ /** @description Time-to-live (in hours) for the long term resource data cache. */
3376
+ ttlInHours?: number;
3377
+ };
3378
+ /** @description A key for the resource data cache purging. */
3379
+ purgeKey?: string;
3380
+ /** @description URL to a custom badge icon for the Uniform dashboard for this data type. If not set falls back to the data connector or integration icons. */
3381
+ badgeIconUrl?: string;
3382
+ /** @description HTTP headers to pass with requests to the data type. Merged with headers from the data source, overriding identical keys. */
3383
+ headers?: {
3384
+ [key: string]: string;
3385
+ } | {
3386
+ key: string;
3387
+ value: string;
3388
+ }[];
3389
+ /** @description Query String parameters to pass with requests to the data type. Merged with parameters from the data source, overriding identical keys. */
3390
+ parameters?: {
3391
+ [key: string]: string;
3392
+ } | {
3393
+ key: string;
3394
+ value: string;
3395
+ }[];
3396
+ /** @description Body to pass with requests to the data type (ignored unless method is POST) */
3397
+ body?: string;
3398
+ /**
3399
+ * @description HTTP method to use with requests to the data type.
3400
+ * @default GET
3401
+ * @enum {string}
3402
+ */
3403
+ method: "GET" | "POST" | "HEAD";
3404
+ /** @description Variables needed to make calls to the data type. Merged with variables from the data source, overriding identical keys. */
3405
+ variables?: {
3406
+ [key: string]: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataVariableDefinition"];
3407
+ };
3408
+ /** @description Custom configuration specific to the data source being defined */
3409
+ custom?: {
3410
+ [key: string]: unknown;
3411
+ };
3412
+ };
3413
+ /**
3414
+ * @deprecated
3415
+ * @description Defines the shape of a data variable on a Data Source or Data Type
3416
+ */
3417
+ DataVariableDefinition: {
3418
+ /** @description Display name of the data variable */
3419
+ displayName?: string;
3420
+ /** @description Explanatory text that is provided to the data resource editor to explain what this variable does. */
3421
+ helpText?: string;
3422
+ /**
3423
+ * @description Type of the data variable. Optionally used as a point of reference for custom integrations to decide how to render an editor for a variable.
3424
+ * @default text
3425
+ */
3426
+ type?: string;
3427
+ /** @description Default value of the data variable */
3428
+ default: string;
3429
+ /** @description Sets the order of the variable when displayed in a list with other variables. If not set, the order defaults to alphabetical with any explicitly set orders first in the list. */
3430
+ order?: number;
3431
+ };
3432
+ /**
3433
+ * @deprecated
3434
+ * @description Data definitions attached to this component. The property name is the key of the data in the data document.
3435
+ * Note: data definitions are inherited from ancestors at runtime (and may be overridden by descendants that use the same key).
3436
+ */
3437
+ DataResourceDefinitions: {
3438
+ [key: string]: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataResourceDefinition"];
3439
+ };
3440
+ /**
3441
+ * @deprecated
3442
+ * @description Defines a data resource, which is a named JSON document, usually from an API response, which may be projected onto parameters
3443
+ */
3444
+ DataResourceDefinition: {
3445
+ /** @description Public ID of the data type that provides this data */
3446
+ type: string;
3447
+ /** @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. */
3448
+ isPatternParameter?: boolean;
3449
+ variables?: external$1["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataResourceVariables"];
3450
+ };
3451
+ /**
3452
+ * @deprecated
3453
+ * @description Variable values for a data resource.
3454
+ */
3455
+ DataResourceVariables: {
3456
+ [key: string]: string;
3457
+ };
3458
+ };
3459
+ };
3460
+ operations: {};
3461
+ };
3462
+ }
3463
+
3464
+ /**
3465
+ * This file was auto-generated by openapi-typescript.
3466
+ * Do not make direct changes to the file.
3467
+ */
3468
+ interface paths {
3469
+ "/api/v1/data-types": {
3470
+ get: {
3471
+ parameters: {
3472
+ query: {
3473
+ projectId: string;
3474
+ };
3475
+ };
3476
+ responses: {
3477
+ /** OK */
3478
+ 200: {
3479
+ content: {
3480
+ "application/json": {
3481
+ results: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataType"][];
3482
+ };
3483
+ };
3484
+ };
3485
+ 400: external["swagger.yml"]["components"]["responses"]["BadRequestError"];
3486
+ 401: external["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
3487
+ 403: external["swagger.yml"]["components"]["responses"]["ForbiddenError"];
3488
+ 429: external["swagger.yml"]["components"]["responses"]["RateLimitError"];
3489
+ 500: external["swagger.yml"]["components"]["responses"]["InternalServerError"];
3490
+ };
3491
+ };
3492
+ put: {
3493
+ responses: {
3494
+ /** OK */
3495
+ 204: never;
3496
+ 400: external["swagger.yml"]["components"]["responses"]["BadRequestError"];
3497
+ 401: external["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
3498
+ 403: external["swagger.yml"]["components"]["responses"]["ForbiddenError"];
3499
+ 429: external["swagger.yml"]["components"]["responses"]["RateLimitError"];
3500
+ 500: external["swagger.yml"]["components"]["responses"]["InternalServerError"];
3501
+ };
3502
+ requestBody: {
3503
+ content: {
3504
+ "application/json": {
3505
+ data: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataType"];
3506
+ /** Format: uuid */
3507
+ projectId: string;
3508
+ };
3509
+ };
3510
+ };
3511
+ };
3512
+ delete: {
3513
+ responses: {
3514
+ /** OK */
3515
+ 204: never;
3516
+ 400: external["swagger.yml"]["components"]["responses"]["BadRequestError"];
3517
+ 401: external["swagger.yml"]["components"]["responses"]["UnauthorizedError"];
3518
+ 403: external["swagger.yml"]["components"]["responses"]["ForbiddenError"];
3519
+ 429: external["swagger.yml"]["components"]["responses"]["RateLimitError"];
3520
+ 500: external["swagger.yml"]["components"]["responses"]["InternalServerError"];
3521
+ };
3522
+ requestBody: {
3523
+ content: {
3524
+ "application/json": {
3525
+ typeId: string;
3526
+ /** Format: uuid */
3527
+ projectId: string;
3528
+ };
3529
+ };
3530
+ };
3531
+ };
3532
+ };
3533
+ }
3534
+ interface external {
3535
+ "swagger.yml": {
3536
+ paths: {};
3537
+ components: {
3538
+ schemas: {
3539
+ Error: {
3540
+ /** @description Error message(s) that occurred while processing the request */
3541
+ errorMessage?: string[] | string;
3542
+ };
3543
+ };
3544
+ responses: {
3545
+ /** Request input validation failed */
3546
+ BadRequestError: {
3547
+ content: {
3548
+ "application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
3549
+ };
3550
+ };
3551
+ /** API key or token was not valid */
3552
+ UnauthorizedError: {
3553
+ content: {
3554
+ "application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
3555
+ };
3556
+ };
3557
+ /** Permission was denied */
3558
+ ForbiddenError: {
3559
+ content: {
3560
+ "application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
3561
+ };
3562
+ };
3563
+ /** Resource not found */
3564
+ NotFoundError: {
3565
+ content: {
3566
+ "application/json": external["swagger.yml"]["components"]["schemas"]["Error"];
3567
+ };
3568
+ };
3569
+ /** Too many requests in allowed time period */
3570
+ RateLimitError: unknown;
3571
+ /** Execution error occurred */
3572
+ InternalServerError: unknown;
3573
+ };
3574
+ };
3575
+ operations: {};
3576
+ };
3577
+ "uniform-canvas-types.swagger.yml": {
3578
+ paths: {};
3579
+ components: {
3580
+ schemas: {
3581
+ /** @description Public ID (used in code). Do not change after creation. */
3582
+ PublicIdProperty: string;
3583
+ /** @description The definition of a component parameter */
3584
+ ComponentDefinitionParameter: {
3585
+ id: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
3586
+ /** @description Friendly name of the parameter */
3587
+ name: string;
3588
+ /** @description Appears next to the parameter in the Composition editor */
3589
+ helpText?: string;
3590
+ /** @description Type name of the parameter (provided by a Uniform integration) */
3591
+ type: string;
3592
+ /** @description The configuration object for the type (type-specific) */
3593
+ typeConfig?: unknown;
3594
+ };
3595
+ /** @description The definition of a named component slot that can contain other components */
3596
+ ComponentDefinitionSlot: {
3597
+ id: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
3598
+ /** @description Friendly name of the slot */
3599
+ name: string;
3600
+ /** @description A list of component definition public IDs that are allowed in this named slot */
3601
+ allowedComponents: string[];
3602
+ /**
3603
+ * @description Whether this slot inherits its allowed components from the parent slot it lives in. If true, allowedComponents is irrelevant.
3604
+ * @default false
3605
+ */
3606
+ inheritAllowedComponents: boolean;
3607
+ /** @description Minimum valid number of components in this slot */
3608
+ minComponents?: number;
3609
+ /** @description Maximum valid number of components in this slot */
3610
+ maxComponents?: number;
3611
+ };
3612
+ /** @description The definition of a composition's slug settings */
3613
+ ComponentDefinitionSlugSettings: {
3614
+ /**
3615
+ * @description Whether the slug is required
3616
+ * no: slug is optional
3617
+ * yes: slug is required
3618
+ * disabled: slug is disabled and will not be shown in the editor
3619
+ *
3620
+ * @default no
3621
+ * @enum {string}
3622
+ */
3623
+ required?: "no" | "yes" | "disabled";
3624
+ /**
3625
+ * @description Slug uniqueness configuration.
3626
+ * no = no unique constraint
3627
+ * local = must be unique within this component type
3628
+ * global = must be unique across all component types
3629
+ *
3630
+ * @enum {string}
3631
+ */
3632
+ unique?: "no" | "local" | "global";
3633
+ /** @description Regular expression slugs must match */
3634
+ regularExpression?: string;
3635
+ /**
3636
+ * @description Custom error message when regular expression validation fails.
3637
+ * Has no effect if `regularExpression` is not set.
3638
+ */
3639
+ regularExpressionMessage?: string;
3640
+ };
3641
+ /** @description The definition of a component variant */
3642
+ ComponentDefinitionVariant: {
3643
+ id: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
3644
+ /** @description Friendly name of the variant */
3645
+ name: string;
3646
+ };
3647
+ /** @description Permission set for a component defintion */
3648
+ ComponentDefinitionPermission: {
3649
+ roleId: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
3650
+ /**
3651
+ * @description Permission type for this permission ComponentDefinition:
3652
+ * read | write | create | delete
3653
+ *
3654
+ * @enum {string}
3655
+ */
3656
+ permission: "read" | "write" | "create" | "delete";
3657
+ /** @description State of the component that this permission applies to */
3658
+ state: number;
3659
+ };
3660
+ /** @description Defines a component type that can live on a Composition */
3661
+ ComponentDefinition: {
3662
+ id: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["PublicIdProperty"];
3663
+ /** @description Friendly name of the component definition */
3664
+ name: string;
3665
+ /**
3666
+ * @description Icon name or URL for the component definition (e.g. 'screen' or 'https://s3/my-component.jpg')
3667
+ * @default screen
3668
+ */
3669
+ icon?: string;
3670
+ /**
3671
+ * @description The public ID of the parameter whose value should be used to create a display title for this component in the UI.
3672
+ * The parameter type must support being used as a title parameter for this to work.
3673
+ */
3674
+ titleParameter?: string | null;
3675
+ /**
3676
+ * @description Whether this component type can be the root of a composition. If false, this component is only used within slots on other components.
3677
+ * @default false
3678
+ */
3679
+ canBeComposition?: boolean;
3680
+ /** @description The parameters for this component. Parameters are key-value pairs that can be anything from text values to links to CMS entries. */
3681
+ parameters?: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionParameter"][];
3682
+ /**
3683
+ * @description if this component uses team permissions or custom permissions
3684
+ * @default true
3685
+ */
3686
+ useTeamPermissions?: boolean;
3687
+ /** @description Custom role permissions for this component definition */
3688
+ permissions?: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionPermission"][];
3689
+ /** @description The named slots for this component; placement areas where arrays of other components can be added. */
3690
+ slots?: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionSlot"][];
3691
+ slugSettings?: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionSlugSettings"];
3692
+ /** @description Default component instance value */
3693
+ defaults?: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"] | null;
3694
+ /** @description Named variants for this component; enables creation of visual variants that use the same parameter data */
3695
+ variants?: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentDefinitionVariant"][];
3696
+ /** @description Created date string for this definition (ignored for writes) */
3697
+ created?: string;
3698
+ /** @description Last modified date string for this definition (ignored for writes) */
3699
+ updated?: string;
3700
+ };
3701
+ /** @description Defines an editable parameter on a component. */
3702
+ ComponentParameter: {
3703
+ /** @description The value of the parameter. Any JSON-serializable value is acceptable. */
3704
+ value: unknown;
3705
+ /** @description The type of the parameter. Determines how it is displayed when editing, and tells the consumer how to process it. */
3706
+ type: string;
3707
+ connectedData?: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataElementConnectionDefinition"];
3708
+ };
3709
+ /**
3710
+ * @deprecated
3711
+ * @description Defines a connection to a data element on a data resource. Do not use.
3712
+ */
3713
+ DataElementConnectionDefinition: {
3714
+ /** @description A JSON Pointer expression that defines the data element to connect the parameter to. */
3715
+ pointer: string;
3716
+ /**
3717
+ * @description The syntax used to select the data element to bind to
3718
+ * @enum {string}
3719
+ */
3720
+ syntax: "jptr";
3721
+ /**
3722
+ * @description Whether an error should occur if the connected data element cannot be resolved (i.e. a missing property in the data resource).
3723
+ * In all cases the binding process will remove the parameter data for the unresolvable data element.
3724
+ * When this is true, and the data element failed to bind, the warning entry returned from the binding process will be changed to an error entry.
3725
+ *
3726
+ * @default false
3727
+ */
3728
+ required?: boolean;
3729
+ };
3730
+ /** @description Defines the shape of a component instance served by the composition API. */
3731
+ ComponentInstance: {
3732
+ /** @description Type of the component instance (public_id of its definition) */
3733
+ type: string;
3734
+ /** @description Component parameter values for the component instance */
3735
+ parameters?: {
3736
+ [key: string]: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameter"];
3737
+ };
3738
+ /** @description Public ID of alternate visual appearance for this component, if any selected */
3739
+ variant?: string;
3740
+ /** @description Slots containing any child components */
3741
+ slots?: {
3742
+ [key: string]: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"][];
3743
+ };
3744
+ /** @description Unique identifier of the component within the composition. This is not set unless specifically requested via `withComponentIDs` API parameter. */
3745
+ _id?: string;
3746
+ /** @description Indicates this component instance should be sourced from a pattern library pattern. */
3747
+ _pattern?: string;
3748
+ _dataResources?: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataResourceDefinitions"];
3749
+ /**
3750
+ * @deprecated
3751
+ * @description Data definitions coming from a pattern resolved for this component. Merged with _data during resolution.
3752
+ * Means nothing for PUTs; it will be ignored.
3753
+ */
3754
+ _patternDataResources?: {
3755
+ [key: string]: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataResourceDefinition"];
3756
+ };
3757
+ /**
3758
+ * @description Describes why the pattern could not be resolved, if a pattern could not be resolved. For PUTs, this is allowed but ignored.
3759
+ * CYCLIC: A cyclic pattern graph was detected, which could not be resolved because it would cause an infinite loop.
3760
+ * NOTFOUND: The pattern ID referenced could not be found. It may have been deleted, or not be published yet.
3761
+ * Means nothing for PUTs; it will be ignored.
3762
+ *
3763
+ * @enum {string}
3764
+ */
3765
+ _patternError?: "NOTFOUND" | "CYCLIC";
3766
+ };
3767
+ /** @description Defines the shape of the root component in a composition */
3768
+ RootComponentInstance: {
3769
+ /** @description Type of the component instance (public_id of its definition) */
3770
+ type: string;
3771
+ /** @description Component parameter values for the component instance */
3772
+ parameters?: {
3773
+ [key: string]: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentParameter"];
3774
+ };
3775
+ /** @description Public ID of alternate visual appearance for this component, if any selected */
3776
+ variant?: string;
3777
+ /** @description Slots containing any child components */
3778
+ slots?: {
3779
+ [key: string]: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["ComponentInstance"][];
3780
+ };
3781
+ /** @description The public UUID of the composition. */
3782
+ _id: string;
3783
+ /** @description Slug pattern of this component. */
3784
+ _slug?: string | null;
3785
+ /** @description Friendly name of this component. */
3786
+ _name: string;
3787
+ _dataResources?: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataResourceDefinitions"];
3788
+ };
3789
+ /**
3790
+ * @deprecated
3791
+ * @description An instance of a data source (i.e. "Master environment of the stable space", "Yelp API", "Sanity dev dataset").
3792
+ * These are created in the UI and shared across a whole project.
3793
+ * NOTE: if you acquire a list of data sources or do not have manage permissions, you will receive "SECRET"
3794
+ * for all header, parameter, and variable values to obscure the actual encrypted secret value.
3795
+ */
3796
+ DataSource: {
3797
+ /** @description Public ID of the data source */
3798
+ id: string;
3799
+ /** @description Display name of the data source */
3800
+ displayName: string;
3801
+ /** @description The type of data connector this connects to (e.g. 'cms-items', provided by an intalled integration) */
3802
+ connectorType: string;
3803
+ /** @description Base resource URL of the data source. No trailing slash. */
3804
+ baseUrl: string;
3805
+ headers?: {
3806
+ [key: string]: string;
3807
+ } | {
3808
+ key: string;
3809
+ value: string;
3810
+ }[];
3811
+ parameters?: {
3812
+ [key: string]: string;
3813
+ } | {
3814
+ key: string;
3815
+ value: string;
3816
+ }[];
3817
+ /** @description Variables needed to make calls to the data source */
3818
+ variables?: {
3819
+ [key: string]: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataVariableDefinition"];
3820
+ };
3821
+ /** @description Custom configuration specific to the data source being defined (used to maintain UI state for custom integrations) */
3822
+ custom?: {
3823
+ [key: string]: unknown;
3824
+ };
3825
+ };
3826
+ /**
3827
+ * @deprecated
3828
+ * @description A specific type of data that a Data Source 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.
3829
+ */
3830
+ DataType: {
3831
+ /** @description Public ID of the data type */
3832
+ id: string;
3833
+ /** @description Display name of the data type */
3834
+ displayName: string;
3835
+ /** @description Public ID of the associated data source */
3836
+ dataSourceId: string;
3837
+ /**
3838
+ * @description A connector-specific archetype for this data type; used to select UI as well as perform any
3839
+ * necessary post-processing on the response. e.g. 'cms-entry', 'cms-query'. Can be undefined if
3840
+ * no special UI or processing is required.
3841
+ */
3842
+ archetype?: string;
3843
+ allowedOnComponents?: string[];
3844
+ /** @description Resource path, appended to the data source's baseUrl (e.g. baseUrl = https://base.url, path = /v1/endpoint -> final URL https://base.url/v1/endpoint). Must have leading slash. */
3845
+ path: string;
3846
+ /** @description Time-to-live (in seconds) for the primary resource data cache. */
3847
+ ttl?: number;
3848
+ /** @description Long term data resource cache configuration. */
3849
+ longTermCache?: {
3850
+ /** @description A flag to turn the long term cache on. */
3851
+ enabled: boolean;
3852
+ /** @description Time-to-live (in hours) for the long term resource data cache. */
3853
+ ttlInHours?: number;
3854
+ };
3855
+ /** @description A key for the resource data cache purging. */
3856
+ purgeKey?: string;
3857
+ /** @description URL to a custom badge icon for the Uniform dashboard for this data type. If not set falls back to the data connector or integration icons. */
3858
+ badgeIconUrl?: string;
3859
+ /** @description HTTP headers to pass with requests to the data type. Merged with headers from the data source, overriding identical keys. */
3860
+ headers?: {
3861
+ [key: string]: string;
3862
+ } | {
3863
+ key: string;
3864
+ value: string;
3865
+ }[];
3866
+ /** @description Query String parameters to pass with requests to the data type. Merged with parameters from the data source, overriding identical keys. */
3867
+ parameters?: {
3868
+ [key: string]: string;
3869
+ } | {
3870
+ key: string;
3871
+ value: string;
3872
+ }[];
3873
+ /** @description Body to pass with requests to the data type (ignored unless method is POST) */
3874
+ body?: string;
3875
+ /**
3876
+ * @description HTTP method to use with requests to the data type.
3877
+ * @default GET
3878
+ * @enum {string}
3879
+ */
3880
+ method: "GET" | "POST" | "HEAD";
3881
+ /** @description Variables needed to make calls to the data type. Merged with variables from the data source, overriding identical keys. */
3882
+ variables?: {
3883
+ [key: string]: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataVariableDefinition"];
3884
+ };
3885
+ /** @description Custom configuration specific to the data source being defined */
3886
+ custom?: {
3887
+ [key: string]: unknown;
3888
+ };
3889
+ };
3890
+ /**
3891
+ * @deprecated
3892
+ * @description Defines the shape of a data variable on a Data Source or Data Type
3893
+ */
3894
+ DataVariableDefinition: {
3895
+ /** @description Display name of the data variable */
3896
+ displayName?: string;
3897
+ /** @description Explanatory text that is provided to the data resource editor to explain what this variable does. */
3898
+ helpText?: string;
3899
+ /**
3900
+ * @description Type of the data variable. Optionally used as a point of reference for custom integrations to decide how to render an editor for a variable.
3901
+ * @default text
3902
+ */
3903
+ type?: string;
3904
+ /** @description Default value of the data variable */
3905
+ default: string;
3906
+ /** @description Sets the order of the variable when displayed in a list with other variables. If not set, the order defaults to alphabetical with any explicitly set orders first in the list. */
3907
+ order?: number;
3908
+ };
3909
+ /**
3910
+ * @deprecated
3911
+ * @description Data definitions attached to this component. The property name is the key of the data in the data document.
3912
+ * Note: data definitions are inherited from ancestors at runtime (and may be overridden by descendants that use the same key).
3913
+ */
3914
+ DataResourceDefinitions: {
3915
+ [key: string]: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataResourceDefinition"];
3916
+ };
3917
+ /**
3918
+ * @deprecated
3919
+ * @description Defines a data resource, which is a named JSON document, usually from an API response, which may be projected onto parameters
3920
+ */
3921
+ DataResourceDefinition: {
3922
+ /** @description Public ID of the data type that provides this data */
3923
+ type: string;
3924
+ /** @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. */
3925
+ isPatternParameter?: boolean;
3926
+ variables?: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["DataResourceVariables"];
3927
+ };
3928
+ /**
3929
+ * @deprecated
3930
+ * @description Variable values for a data resource.
3931
+ */
3932
+ DataResourceVariables: {
3933
+ [key: string]: string;
3934
+ };
3935
+ };
3936
+ };
3937
+ operations: {};
3938
+ };
3939
+ }
3940
+
3941
+ declare type DataTypeApi = paths['/api/v1/data-types'];
3942
+ declare type DataSourcesApi = paths$1['/api/v1/data-sources'];
3943
+ declare type DataSourceApi = paths$2['/api/v1/data-source'];
3944
+ /** Query parameter options for GET /api/v1/data-types */
3945
+ declare type DataTypeGetParameters = DataTypeApi['get']['parameters']['query'];
3946
+ /** The GET response from /api/v1/data-types */
3947
+ declare type DataTypeGetResponse = DataTypeApi['get']['responses']['200']['content']['application/json'];
3948
+ /** The PUT request body for /api/v1/data-types */
3949
+ declare type DataTypePutParameters = DataTypeApi['put']['requestBody']['content']['application/json'];
3950
+ /** Shape of the DELETE request body for /api/v1/data-types */
3951
+ declare type DataTypeDeleteParameters = DataTypeApi['delete']['requestBody']['content']['application/json'];
3952
+ /** Query parameter options for GET /api/v1/data-source */
3953
+ declare type DataSourceGetParameters = DataSourceApi['get']['parameters']['query'];
3954
+ /** Query parameter options for GET /api/v1/data-sources */
3955
+ declare type DataSourcesGetParameters = DataSourcesApi['get']['parameters']['query'];
3956
+ /** The GET response from /api/v1/data-sources */
3957
+ declare type DataSourceGetResponse = DataSourceApi['get']['responses']['200']['content']['application/json'];
3958
+ /** The GET response from /api/v1/data-sources */
3959
+ declare type DataSourcesGetResponse = DataSourcesApi['get']['responses']['200']['content']['application/json'];
3960
+ /** The PUT request body for /api/v1/data-source */
3961
+ declare type DataSourcePutParameters = DataSourceApi['put']['requestBody']['content']['application/json'];
3962
+ /** Shape of the DELETE request body for /api/v1/data-source */
3963
+ declare type DataSourceDeleteParameters = DataSourceApi['delete']['requestBody']['content']['application/json'];
3964
+ declare type DataType = components$2['schemas']['DataType'];
3965
+ declare type DataSource = components$2['schemas']['DataSource'];
3966
+ declare type DataVariableDefinition = components$2['schemas']['DataVariableDefinition'];
3967
+
3968
+ /**
3969
+ * Pusher-js is large (80k) and not tree shakable so it is always bundled if directly referenced,
3970
+ * when it's only needed during preview mode. To avoid bundling it for all, we use an old-school
3971
+ * write-a-script-tag hack to load it in a poor man's approximation of a dynamic import ;)
3972
+ */
3973
+ declare type ChannelSubscription = {
3974
+ addEventHandler: (eventName: string, handler: (data: unknown) => void) => () => void;
3975
+ unsubscribe: () => void;
3976
+ };
3977
+ declare type PreviewEventBus = {
3978
+ subscribe: (channel: string) => ChannelSubscription;
3979
+ };
3980
+ declare global {
3981
+ interface Window {
3982
+ Pusher?: typeof Pusher;
3983
+ __UNIFORM_EVENT_BUS__?: PreviewEventBus;
3984
+ }
3985
+ }
3986
+ /**
3987
+ * Creates an event bus client to receive updates from Canvas
3988
+ * IMPORTANT: in a server-side context this will always return undefined
3989
+ * IMPORTANT: in a browser context this is cached in window and does not create multiple instances
3990
+ */
3991
+ declare function createEventBus(): Promise<PreviewEventBus | undefined>;
3992
+
3993
+ export { DataResourceDefinitions as $, ChannelSubscription as A, createEventBus as B, CompositionGetParameters as C, DataResolutionOptionNegative as D, ComponentDefinitionGetResponse as E, ComponentDefinitionAPIResponse as F, ComponentDefinitionAPIPutRequest as G, ComponentDefinitionAPIDeleteRequest as H, ComponentDefinitionListAPIOptions as I, ComponentDefinitionParameter as J, ComponentDefinitionVariant as K, ComponentDefinitionSlugSettings as L, ComponentDefinitionSlot as M, ComponentDefinitionPermission as N, ComponentDefinition as O, PreviewEventBus as P, CreatingComponentDefinition as Q, RootComponentInstance as R, CompositionGetOrderBy as S, CompositionUIStatus as T, CompositionGetListResponse as U, CompositionAPIResponse as V, CompositionAPIDeleteRequest as W, CompositionListAPIResponse as X, CompositionAPIOptions as Y, DataElementConnectionDefinition as Z, DataResourceVariables as _, CompositionGetByNodePathParameters as a, DataResourceDefinition as a0, CanvasDefinitions as a1, CompositionIssue as a2, CompositionPatternIssue as a3, DataElementBindingIssue as a4, DataResourceIssue as a5, DataResourceVariableIssue as a6, DataResolutionConfigIssue as a7, CompositionDataDiagnostic as a8, DataSourceGetResponse as a9, DataSourcesGetResponse as aa, DataType as ab, DataSource as ac, DataVariableDefinition as ad, CompositionGetResponse as b, DataResolutionOptionPositive as c, DataResolutionParameters as d, CompositionResolvedGetResponse as e, CompositionGetValidResponses as f, DataResolutionOption as g, CompositionGetByNodeIdParameters as h, CompositionGetBySlugParameters as i, CompositionGetByIdParameters as j, CompositionPutParameters as k, CompositionDeleteParameters as l, ComponentDefinitionGetParameters as m, ComponentDefinitionPutParameters as n, ComponentDefinitionDeleteParameters as o, ComponentInstance as p, ComponentParameter as q, components as r, DataSourceGetParameters as s, DataSourcesGetParameters as t, DataSourcePutParameters as u, DataSourceDeleteParameters as v, DataTypeGetParameters as w, DataTypeGetResponse as x, DataTypePutParameters as y, DataTypeDeleteParameters as z };