@uniformdev/canvas 18.16.1-alpha.6 → 18.17.1-alpha.13

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