@uniformdev/canvas 17.4.1-alpha.37 → 17.5.0

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,5 +1,5 @@
1
- import { C as ComponentInstance, a as ComponentParameter, b as CompositionGetParameters, c as CompositionPutParameters, d as CompositionDeleteParameters, e as ComponentDefinitionGetParameters, f as ComponentDefinitionPutParameters, g as ComponentDefinitionDeleteParameters, D as DataSourceGetParameters, h as DataSourcesGetParameters, i as DataSourcePutParameters, j as DataSourceDeleteParameters, k as DataTypeGetParameters, l as DataTypeGetResponse, m as DataTypePutParameters, n as DataTypeDeleteParameters, R as RootComponentInstance, P as PreviewEventBus, o as CompositionGetResponse } from './createEventBus-a8e85b6e.js';
2
- export { O as CanvasDefinitions, X as ChannelSubscription, z as ComponentDefinition, s as ComponentDefinitionAPIDeleteRequest, r as ComponentDefinitionAPIPutRequest, q as ComponentDefinitionAPIResponse, g as ComponentDefinitionDeleteParameters, e as ComponentDefinitionGetParameters, p as ComponentDefinitionGetResponse, t as ComponentDefinitionListAPIOptions, u as ComponentDefinitionParameter, y as ComponentDefinitionPermission, f as ComponentDefinitionPutParameters, x as ComponentDefinitionSlot, w as ComponentDefinitionSlugSettings, v as ComponentDefinitionVariant, C as ComponentInstance, a as ComponentParameter, H as CompositionAPIDeleteRequest, J as CompositionAPIOptions, G as CompositionAPIResponse, d as CompositionDeleteParameters, F as CompositionGetListResponse, B as CompositionGetOrderBy, b as CompositionGetParameters, o as CompositionGetResponse, I as CompositionListAPIResponse, c as CompositionPutParameters, E as CompositionUIStatus, A as CreatingComponentDefinition, K as DataElementConnectionDefinition, N as DataResourceDefinition, M as DataResourceDefinitions, L as DataResourceVariables, U as DataSource, j as DataSourceDeleteParameters, D as DataSourceGetParameters, Q as DataSourceGetResponse, V as DataSourceInfo, i as DataSourcePutParameters, h as DataSourcesGetParameters, S as DataSourcesGetResponse, T as DataType, n as DataTypeDeleteParameters, k as DataTypeGetParameters, l as DataTypeGetResponse, m as DataTypePutParameters, W as DataVariableDefinition, P as PreviewEventBus, R as RootComponentInstance, Y as createEventBus } from './createEventBus-a8e85b6e.js';
1
+ import { C as ComponentInstance, a as ComponentParameter, c as components, b as CompositionGetParameters, d as CompositionGetByNodePathParameters, D as DataResolutionOptionNegative, e as CompositionGetResponse, f as DataResolutionOptionPositive, g as DataResolutionParameters, h as CompositionResolvedGetResponse, i as CompositionGetValidResponses, j as DataResolutionOption, k as CompositionGetByNodeIdParameters, l as CompositionGetBySlugParameters, m as CompositionGetByIdParameters, n as CompositionPutParameters, o as CompositionDeleteParameters, p as ComponentDefinitionGetParameters, q as ComponentDefinitionPutParameters, r as ComponentDefinitionDeleteParameters, s as DataSourceGetParameters, t as DataSourcesGetParameters, u as DataSourcePutParameters, v as DataSourceDeleteParameters, w as DataTypeGetParameters, x as DataTypeGetResponse, y as DataTypePutParameters, z as DataTypeDeleteParameters, R as RootComponentInstance, P as PreviewEventBus } from './createEventBus-ae757f10.js';
2
+ export { $ as CanvasDefinitions, ad as ChannelSubscription, M as ComponentDefinition, F as ComponentDefinitionAPIDeleteRequest, E as ComponentDefinitionAPIPutRequest, B as ComponentDefinitionAPIResponse, r as ComponentDefinitionDeleteParameters, p as ComponentDefinitionGetParameters, A as ComponentDefinitionGetResponse, G as ComponentDefinitionListAPIOptions, H as ComponentDefinitionParameter, L as ComponentDefinitionPermission, q as ComponentDefinitionPutParameters, K as ComponentDefinitionSlot, J as ComponentDefinitionSlugSettings, I as ComponentDefinitionVariant, C as ComponentInstance, a as ComponentParameter, U as CompositionAPIDeleteRequest, W as CompositionAPIOptions, T as CompositionAPIResponse, a6 as CompositionDataDiagnostic, o as CompositionDeleteParameters, m as CompositionGetByIdParameters, k as CompositionGetByNodeIdParameters, d as CompositionGetByNodePathParameters, l as CompositionGetBySlugParameters, S as CompositionGetListResponse, O as CompositionGetOrderBy, b as CompositionGetParameters, e as CompositionGetResponse, i as CompositionGetValidResponses, a0 as CompositionIssue, V as CompositionListAPIResponse, a1 as CompositionPatternIssue, n as CompositionPutParameters, h as CompositionResolvedGetResponse, Q as CompositionUIStatus, N as CreatingComponentDefinition, a2 as DataElementBindingIssue, X as DataElementConnectionDefinition, a5 as DataResolutionConfigIssue, j as DataResolutionOption, D as DataResolutionOptionNegative, f as DataResolutionOptionPositive, g as DataResolutionParameters, _ as DataResourceDefinition, Z as DataResourceDefinitions, a3 as DataResourceIssue, a4 as DataResourceVariableIssue, Y as DataResourceVariables, aa as DataSource, v as DataSourceDeleteParameters, s as DataSourceGetParameters, a7 as DataSourceGetResponse, ab as DataSourceInfo, u as DataSourcePutParameters, t as DataSourcesGetParameters, a8 as DataSourcesGetResponse, a9 as DataType, z as DataTypeDeleteParameters, w as DataTypeGetParameters, x as DataTypeGetResponse, y as DataTypePutParameters, ac as DataVariableDefinition, P as PreviewEventBus, R as RootComponentInstance, ae as createEventBus } from './createEventBus-ae757f10.js';
3
3
  import { Options } from 'p-throttle';
4
4
  import { Options as Options$1 } from 'p-retry';
5
5
  import { ApiClient, ClientOptions, ExceptProject, ApiClientError } from '@uniformdev/context/api';
@@ -85,6 +85,11 @@ declare type ComponentParameterEnhancer<TRawValue = unknown, TOutputValue = unkn
85
85
  completeAll?: () => Promise<number>;
86
86
  };
87
87
 
88
+ declare type schemas = components['schemas'];
89
+ declare type InvalidationPayload = schemas['InvalidationPayload'];
90
+ declare type InvalidationResult = schemas['InvalidationResult'];
91
+ declare type InvalidationInput = InvalidationResult['input'];
92
+
88
93
  declare type ComponentLocationReference = {
89
94
  component: ComponentInstance;
90
95
  parentSlot?: string;
@@ -349,312 +354,23 @@ declare class CanvasClient extends ApiClient<ClientOptions> {
349
354
  }[];
350
355
  totalCount?: number | undefined;
351
356
  }>;
352
- getCompositionByProjectMapNodePath(options: Pick<CompositionGetParameters, 'projectMapNodePath' | 'projectMapId' | 'state' | 'skipEnhance' | 'skipPatternResolution' | 'withComponentIDs' | 'withUIStatus' | 'withTotalCount'>): Promise<{
353
- state: number;
354
- uiStatus?: "Draft" | "Modified" | "Published" | "Orphan" | undefined;
355
- projectId: string;
356
- created: string;
357
- modified: string;
358
- pattern: boolean;
359
- composition: {
360
- type: string;
361
- parameters?: {
362
- [key: string]: {
363
- value: unknown;
364
- type: string;
365
- connectedData?: {
366
- pointer: string;
367
- syntax: "jptr";
368
- required?: boolean | undefined;
369
- } | undefined;
370
- };
371
- } | undefined;
372
- variant?: string | undefined;
373
- slots?: {
374
- [key: string]: {
375
- type: string;
376
- parameters?: {
377
- [key: string]: {
378
- value: unknown;
379
- type: string;
380
- connectedData?: {
381
- pointer: string;
382
- syntax: "jptr";
383
- required?: boolean | undefined;
384
- } | undefined;
385
- };
386
- } | undefined;
387
- variant?: string | undefined;
388
- slots?: {
389
- [key: string]: any[];
390
- } | undefined;
391
- _id?: string | undefined;
392
- _pattern?: string | undefined;
393
- _dataResources?: {
394
- [key: string]: {
395
- type: string;
396
- isPatternParameter?: boolean | undefined;
397
- variables?: {
398
- [key: string]: string;
399
- } | undefined;
400
- };
401
- } | undefined;
402
- _patternDataResources?: {
403
- [key: string]: {
404
- type: string;
405
- isPatternParameter?: boolean | undefined;
406
- variables?: {
407
- [key: string]: string;
408
- } | undefined;
409
- };
410
- } | undefined;
411
- _patternError?: "NOTFOUND" | "CYCLIC" | undefined;
412
- }[];
413
- } | undefined;
414
- _id: string;
415
- _slug?: string | null | undefined;
416
- _name: string;
417
- _dataResources?: {
418
- [key: string]: {
419
- type: string;
420
- isPatternParameter?: boolean | undefined;
421
- variables?: {
422
- [key: string]: string;
423
- } | undefined;
424
- };
425
- } | undefined;
426
- };
427
- }>;
428
- getCompositionByProjectMapNodeId(options: Pick<CompositionGetParameters, 'projectMapNodeId' | 'projectMapId' | 'state' | 'skipEnhance' | 'skipPatternResolution' | 'withComponentIDs' | 'withUIStatus' | 'withTotalCount'>): Promise<{
429
- state: number;
430
- uiStatus?: "Draft" | "Modified" | "Published" | "Orphan" | undefined;
431
- projectId: string;
432
- created: string;
433
- modified: string;
434
- pattern: boolean;
435
- composition: {
436
- type: string;
437
- parameters?: {
438
- [key: string]: {
439
- value: unknown;
440
- type: string;
441
- connectedData?: {
442
- pointer: string;
443
- syntax: "jptr";
444
- required?: boolean | undefined;
445
- } | undefined;
446
- };
447
- } | undefined;
448
- variant?: string | undefined;
449
- slots?: {
450
- [key: string]: {
451
- type: string;
452
- parameters?: {
453
- [key: string]: {
454
- value: unknown;
455
- type: string;
456
- connectedData?: {
457
- pointer: string;
458
- syntax: "jptr";
459
- required?: boolean | undefined;
460
- } | undefined;
461
- };
462
- } | undefined;
463
- variant?: string | undefined;
464
- slots?: {
465
- [key: string]: any[];
466
- } | undefined;
467
- _id?: string | undefined;
468
- _pattern?: string | undefined;
469
- _dataResources?: {
470
- [key: string]: {
471
- type: string;
472
- isPatternParameter?: boolean | undefined;
473
- variables?: {
474
- [key: string]: string;
475
- } | undefined;
476
- };
477
- } | undefined;
478
- _patternDataResources?: {
479
- [key: string]: {
480
- type: string;
481
- isPatternParameter?: boolean | undefined;
482
- variables?: {
483
- [key: string]: string;
484
- } | undefined;
485
- };
486
- } | undefined;
487
- _patternError?: "NOTFOUND" | "CYCLIC" | undefined;
488
- }[];
489
- } | undefined;
490
- _id: string;
491
- _slug?: string | null | undefined;
492
- _name: string;
493
- _dataResources?: {
494
- [key: string]: {
495
- type: string;
496
- isPatternParameter?: boolean | undefined;
497
- variables?: {
498
- [key: string]: string;
499
- } | undefined;
500
- };
501
- } | undefined;
502
- };
503
- }>;
504
- /** Fetches a Canvas composition by string name (slug) */
505
- getCompositionBySlug(options: Pick<CompositionGetParameters, 'slug' | 'state' | 'skipEnhance' | 'skipPatternResolution' | 'withComponentIDs' | 'withUIStatus' | 'withTotalCount'>): Promise<{
506
- state: number;
507
- uiStatus?: "Draft" | "Modified" | "Published" | "Orphan" | undefined;
508
- projectId: string;
509
- created: string;
510
- modified: string;
511
- pattern: boolean;
512
- composition: {
513
- type: string;
514
- parameters?: {
515
- [key: string]: {
516
- value: unknown;
517
- type: string;
518
- connectedData?: {
519
- pointer: string;
520
- syntax: "jptr";
521
- required?: boolean | undefined;
522
- } | undefined;
523
- };
524
- } | undefined;
525
- variant?: string | undefined;
526
- slots?: {
527
- [key: string]: {
528
- type: string;
529
- parameters?: {
530
- [key: string]: {
531
- value: unknown;
532
- type: string;
533
- connectedData?: {
534
- pointer: string;
535
- syntax: "jptr";
536
- required?: boolean | undefined;
537
- } | undefined;
538
- };
539
- } | undefined;
540
- variant?: string | undefined;
541
- slots?: {
542
- [key: string]: any[];
543
- } | undefined;
544
- _id?: string | undefined;
545
- _pattern?: string | undefined;
546
- _dataResources?: {
547
- [key: string]: {
548
- type: string;
549
- isPatternParameter?: boolean | undefined;
550
- variables?: {
551
- [key: string]: string;
552
- } | undefined;
553
- };
554
- } | undefined;
555
- _patternDataResources?: {
556
- [key: string]: {
557
- type: string;
558
- isPatternParameter?: boolean | undefined;
559
- variables?: {
560
- [key: string]: string;
561
- } | undefined;
562
- };
563
- } | undefined;
564
- _patternError?: "NOTFOUND" | "CYCLIC" | undefined;
565
- }[];
566
- } | undefined;
567
- _id: string;
568
- _slug?: string | null | undefined;
569
- _name: string;
570
- _dataResources?: {
571
- [key: string]: {
572
- type: string;
573
- isPatternParameter?: boolean | undefined;
574
- variables?: {
575
- [key: string]: string;
576
- } | undefined;
577
- };
578
- } | undefined;
579
- };
580
- }>;
581
- /** Fetches a Canvas composition by its public UUID */
582
- getCompositionById(options: Pick<CompositionGetParameters, 'compositionId' | 'state' | 'skipEnhance' | 'skipPatternResolution' | 'withComponentIDs' | 'withUIStatus' | 'withTotalCount'>): Promise<{
583
- state: number;
584
- uiStatus?: "Draft" | "Modified" | "Published" | "Orphan" | undefined;
585
- projectId: string;
586
- created: string;
587
- modified: string;
588
- pattern: boolean;
589
- composition: {
590
- type: string;
591
- parameters?: {
592
- [key: string]: {
593
- value: unknown;
594
- type: string;
595
- connectedData?: {
596
- pointer: string;
597
- syntax: "jptr";
598
- required?: boolean | undefined;
599
- } | undefined;
600
- };
601
- } | undefined;
602
- variant?: string | undefined;
603
- slots?: {
604
- [key: string]: {
605
- type: string;
606
- parameters?: {
607
- [key: string]: {
608
- value: unknown;
609
- type: string;
610
- connectedData?: {
611
- pointer: string;
612
- syntax: "jptr";
613
- required?: boolean | undefined;
614
- } | undefined;
615
- };
616
- } | undefined;
617
- variant?: string | undefined;
618
- slots?: {
619
- [key: string]: any[];
620
- } | undefined;
621
- _id?: string | undefined;
622
- _pattern?: string | undefined;
623
- _dataResources?: {
624
- [key: string]: {
625
- type: string;
626
- isPatternParameter?: boolean | undefined;
627
- variables?: {
628
- [key: string]: string;
629
- } | undefined;
630
- };
631
- } | undefined;
632
- _patternDataResources?: {
633
- [key: string]: {
634
- type: string;
635
- isPatternParameter?: boolean | undefined;
636
- variables?: {
637
- [key: string]: string;
638
- } | undefined;
639
- };
640
- } | undefined;
641
- _patternError?: "NOTFOUND" | "CYCLIC" | undefined;
642
- }[];
643
- } | undefined;
644
- _id: string;
645
- _slug?: string | null | undefined;
646
- _name: string;
647
- _dataResources?: {
648
- [key: string]: {
649
- type: string;
650
- isPatternParameter?: boolean | undefined;
651
- variables?: {
652
- [key: string]: string;
653
- } | undefined;
654
- };
655
- } | undefined;
656
- };
657
- }>;
357
+ /** Fetches one composition by its project map node path */
358
+ unstable_getCompositionByNodePath(options: CompositionGetByNodePathParameters & DataResolutionOptionNegative): Promise<CompositionGetResponse>;
359
+ unstable_getCompositionByNodePath(options: CompositionGetByNodePathParameters & DataResolutionOptionPositive & DataResolutionParameters): Promise<CompositionResolvedGetResponse>;
360
+ unstable_getCompositionByNodePath<T extends CompositionGetResponse = CompositionGetValidResponses>(options: CompositionGetByNodePathParameters & DataResolutionOption & DataResolutionParameters): Promise<T>;
361
+ /** Fetches one composition by its project map node ID */
362
+ unstable_getCompositionByNodeId(options: CompositionGetByNodeIdParameters & DataResolutionOptionNegative): Promise<CompositionGetResponse>;
363
+ unstable_getCompositionByNodeId(options: CompositionGetByNodeIdParameters & DataResolutionOptionPositive & DataResolutionParameters): Promise<CompositionResolvedGetResponse>;
364
+ unstable_getCompositionByNodeId<T extends CompositionGetResponse = CompositionGetValidResponses>(options: CompositionGetByNodeIdParameters & DataResolutionOption & DataResolutionParameters): Promise<T>;
365
+ /** Fetches one composition by its slug */
366
+ getCompositionBySlug(options: CompositionGetBySlugParameters & DataResolutionOptionNegative): Promise<CompositionGetResponse>;
367
+ getCompositionBySlug(options: CompositionGetBySlugParameters & DataResolutionOptionPositive & DataResolutionParameters): Promise<CompositionResolvedGetResponse>;
368
+ getCompositionBySlug<T extends CompositionGetResponse = CompositionGetValidResponses>(options: CompositionGetBySlugParameters & DataResolutionOption & DataResolutionParameters): Promise<T>;
369
+ /** Fetches one composition by its ID */
370
+ getCompositionById(options: CompositionGetByIdParameters & DataResolutionOptionNegative): Promise<CompositionGetResponse>;
371
+ getCompositionById(options: CompositionGetByIdParameters & DataResolutionOptionPositive & DataResolutionParameters): Promise<CompositionResolvedGetResponse>;
372
+ getCompositionById<T extends CompositionGetResponse = CompositionGetValidResponses>(options: CompositionGetByIdParameters & DataResolutionOption & DataResolutionParameters): Promise<T>;
373
+ private getOneComposition;
658
374
  /** Updates or creates a Canvas component definition */
659
375
  updateComposition(body: Omit<CompositionPutParameters, 'projectId'>): Promise<void>;
660
376
  /** Deletes a Canvas component definition */
@@ -777,9 +493,10 @@ declare class DataSourceClient extends ApiClient {
777
493
  variables?: {
778
494
  [key: string]: {
779
495
  displayName?: string | undefined;
780
- type: string;
496
+ helpText?: string | undefined;
497
+ type?: string | undefined;
781
498
  default: string;
782
- setBy: "static" | "dynamic";
499
+ order?: number | undefined;
783
500
  };
784
501
  } | undefined;
785
502
  custom?: {
@@ -844,6 +561,10 @@ declare const CANVAS_TEST_VARIANT_PARAM = "$tstVrnt";
844
561
  declare const CANVAS_ENRICHMENT_TAG_PARAM = "$enr";
845
562
  /** The name of the query string used to detect if we are in in-context editing mode */
846
563
  declare const IN_CONTEXT_EDITOR_QUERY_STRING_PARAM = "is_incontext_editing_mode";
564
+ /** The value of "data-role" in the component start <script> tag */
565
+ declare const IN_CONTEXT_EDITOR_COMPONENT_START_ROLE = "uniform-component-start";
566
+ /** The ID we give to placeholder components */
567
+ declare const PLACEHOLDER_ID = "placeholder";
847
568
 
848
569
  /** Determines if a given Canvas component type is a system-defined type */
849
570
  declare const isSystemComponentDefinition: (componentType: string) => boolean;
@@ -906,7 +627,7 @@ declare type UpdateCompositionMessage = {
906
627
  };
907
628
  declare type AddComponentMessage = {
908
629
  type: 'add-component';
909
- componentId: string;
630
+ parentId: string;
910
631
  slotName: string;
911
632
  index: number;
912
633
  };
@@ -916,12 +637,18 @@ declare type MoveComponentMessage = {
916
637
  slotName: string;
917
638
  index: number;
918
639
  };
640
+ declare type DismissPlaceholderMessage = {
641
+ type: 'dismiss-placeholder';
642
+ parentId: string;
643
+ slotName: string;
644
+ };
645
+ declare type ChannelMessage = SelectComponentMessage | ReadyMessage | UpdateCompositionMessage | AddComponentMessage | MoveComponentMessage | DismissPlaceholderMessage;
919
646
  declare const isSelectComponentMessage: (message: ChannelMessage) => message is SelectComponentMessage;
920
647
  declare const isReadyMessage: (message: ChannelMessage) => message is ReadyMessage;
921
648
  declare const isUpdateCompositionMessage: (message: ChannelMessage) => message is UpdateCompositionMessage;
922
649
  declare const isAddComponentMessage: (message: ChannelMessage) => message is AddComponentMessage;
923
650
  declare const isMovingComponentMessage: (message: ChannelMessage) => message is MoveComponentMessage;
924
- declare type ChannelMessage = SelectComponentMessage | ReadyMessage | UpdateCompositionMessage | AddComponentMessage | MoveComponentMessage;
651
+ declare const isDismissPlaceholderMessage: (message: ChannelMessage) => message is DismissPlaceholderMessage;
925
652
  declare type MessageHandler = (message: ChannelMessage, originalEvent: MessageEvent) => void;
926
653
  declare type Channel = {
927
654
  ready: () => void;
@@ -929,99 +656,15 @@ declare type Channel = {
929
656
  selectComponent: (id: string) => void;
930
657
  updateComposition: (component: RootComponentInstance, secret?: string) => void;
931
658
  on: (types: ChannelMessage['type'][] | ChannelMessage['type'], handler: MessageHandler) => () => void;
932
- addComponent: (options: {
933
- componentId: string;
934
- slotName: string;
935
- index: number;
936
- }) => void;
937
- moveComponent: (options: {
938
- componentId: string;
939
- slotName: string;
940
- index: number;
941
- }) => void;
659
+ addComponent: (options: Omit<AddComponentMessage, 'type'>) => void;
660
+ moveComponent: (options: Omit<MoveComponentMessage, 'type'>) => void;
661
+ dismissPlaceholder: (options: Omit<DismissPlaceholderMessage, 'type'>) => void;
942
662
  };
943
663
  declare const createCanvasChannel: ({ listenTo, broadcastTo, }: {
944
664
  listenTo: Window[];
945
665
  broadcastTo: Window[];
946
666
  }) => Channel;
947
667
 
948
- /** Types of issue that can occur when fetching composition data */
949
- declare type CompositionIssue = CompositionPatternIssue | DataResourceIssue | DataElementBindingIssue | DataResourceVariableIssue;
950
- declare type CompositionIssueCore = {
951
- componentPath: string;
952
- componentType: string;
953
- message: string;
954
- };
955
- /** An error that occured resolving a pattern that is referenced on the composition */
956
- declare type CompositionPatternIssue = CompositionIssueCore & {
957
- type: 'pattern';
958
- code: NonNullable<ComponentInstance['_patternError']>;
959
- };
960
- /** An error while binding a data element from a data resource to a component parameter (i.e. a missing property in the data resource) */
961
- declare type DataElementBindingIssue = CompositionIssueCore & {
962
- type: 'binding';
963
- parameterName: string;
964
- };
965
- /** An error that occurred fetching a data defined on the composition or a pattern within */
966
- declare type DataResourceIssue = CompositionIssueCore & {
967
- type: 'data';
968
- dataName: string;
969
- dataType: string;
970
- };
971
- /** An issue that occurred while binding dynamic variables to composition data resources */
972
- declare type DataResourceVariableIssue = CompositionIssueCore & {
973
- type: 'variable';
974
- variableName: string;
975
- };
976
- /** Diagnostic data about the load performance of attached composition datas */
977
- declare type CompositionDataDiagnostic = {
978
- componentPath: string;
979
- dataType: string;
980
- dataName: string;
981
- performance: number;
982
- data: unknown;
983
- };
984
- declare type CommonCompositionGetParameters = Pick<CompositionGetParameters, 'state' | 'skipPatternResolution' | 'withComponentIDs' | 'withUIStatus'> & {
985
- /**
986
- * Adds additional diagnostics (`dataDiagnostics`) to the response containing timings and resolved datas for the composition.
987
- * Because this adds a lot of data to the response, we do not recommend using this unless diagnosing performance issues.
988
- */
989
- dataDiagnostics?: boolean;
990
- /**
991
- * Pass dynamic variables to the composition that are required for resolving bindings and datas,
992
- * such as language, detail page ID, etc.
993
- */
994
- dynamicVariables?: Record<string, string>;
995
- };
996
- /** @deprecated do not use */
997
- declare type EdgeCompositionGetResponse = CompositionGetResponse & {
998
- /**
999
- * Copies of resolved data and how long it took to resolve each data.
1000
- * Only set when dataDiagnostics=true is passed to the options.
1001
- */
1002
- dataDiagnostics?: Array<CompositionDataDiagnostic>;
1003
- /**
1004
- * Any failures to bind to data that occured on bindings marked 'must exist'.
1005
- * If no failures occurred, this will be undefined.
1006
- * NOTE: No exception will be thrown if this type of error occurs. You must inspect this property if you care to cause client errors.
1007
- */
1008
- errors?: Array<CompositionIssue>;
1009
- /**
1010
- * 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)
1011
- * If no failures occurred, this will be undefined.
1012
- */
1013
- warnings?: Array<CompositionIssue>;
1014
- };
1015
- /** @deprecated do not use */
1016
- declare class EdgeCanvasClient extends ApiClient<ClientOptions> {
1017
- constructor(options: ClientOptions);
1018
- private canvasUrl;
1019
- /** Fetches a Canvas composition by string name (slug) */
1020
- getCompositionBySlug(options: Pick<CompositionGetParameters, 'slug'> & CommonCompositionGetParameters): Promise<EdgeCompositionGetResponse>;
1021
- /** Fetches a Canvas composition by its public UUID */
1022
- getCompositionById(options: Pick<CompositionGetParameters, 'compositionId'> & CommonCompositionGetParameters): Promise<EdgeCompositionGetResponse>;
1023
- }
1024
-
1025
668
  declare const CanvasClientError: typeof ApiClientError;
1026
669
 
1027
- 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, Channel, ChannelMessage, ChildEnhancerBuilder, ComponentEnhancer, ComponentEnhancerFunction, ComponentEnhancerOptions, ComponentLocationReference, ComponentParameterEnhancer, ComponentParameterEnhancerFunction, ComponentParameterEnhancerOptions, CompositionDataDiagnostic, CompositionIssue, CompositionPatternIssue, DataElementBindingIssue, DataResourceIssue, DataResourceVariableIssue, DataSourceClient, DataTypeClient, EdgeCanvasClient, EdgeCompositionGetResponse, EnhancerBuilder, EnhancerContext, EnhancerError, EventNames, IN_CONTEXT_EDITOR_QUERY_STRING_PARAM, LimitPolicy, MessageHandler, MoveComponentMessage, ReadyMessage, SelectComponentMessage, SubscribeToCompositionOptions, UncachedCanvasClient, UniqueBatchEntries, UnsubscribeCallback, UpdateCompositionMessage, WalkComponentTreeActions, compose, createBatchEnhancer, createCanvasChannel, createLimitPolicy, enhance, extractLocales, generateHash, getChannelName, getComponentJsonPointer, getComponentPath, isAddComponentMessage, isMovingComponentMessage, isReadyMessage, isSelectComponentMessage, isSystemComponentDefinition, isUpdateCompositionMessage, localize, mapSlotToPersonalizedVariations, mapSlotToTestVariations, nullLimitPolicy, subscribeToComposition, walkComponentTree };
670
+ 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, Channel, ChannelMessage, ChildEnhancerBuilder, ComponentEnhancer, ComponentEnhancerFunction, ComponentEnhancerOptions, ComponentLocationReference, ComponentParameterEnhancer, ComponentParameterEnhancerFunction, ComponentParameterEnhancerOptions, DataSourceClient, DataTypeClient, DismissPlaceholderMessage, EnhancerBuilder, EnhancerContext, EnhancerError, EventNames, IN_CONTEXT_EDITOR_COMPONENT_START_ROLE, IN_CONTEXT_EDITOR_QUERY_STRING_PARAM, InvalidationInput, InvalidationPayload, InvalidationResult, LimitPolicy, MessageHandler, MoveComponentMessage, PLACEHOLDER_ID, ReadyMessage, SelectComponentMessage, SubscribeToCompositionOptions, UncachedCanvasClient, UniqueBatchEntries, UnsubscribeCallback, UpdateCompositionMessage, WalkComponentTreeActions, compose, createBatchEnhancer, createCanvasChannel, createLimitPolicy, enhance, extractLocales, generateHash, getChannelName, getComponentJsonPointer, getComponentPath, isAddComponentMessage, isDismissPlaceholderMessage, isMovingComponentMessage, isReadyMessage, isSelectComponentMessage, isSystemComponentDefinition, isUpdateCompositionMessage, localize, mapSlotToPersonalizedVariations, mapSlotToTestVariations, nullLimitPolicy, subscribeToComposition, walkComponentTree };
package/dist/index.esm.js CHANGED
@@ -1 +1 @@
1
- import{$ as Q,A as p,B as q,C as r,D as s,E as t,F as u,G as v,H as w,I as x,J as y,K as z,L as A,M as B,N as C,O as D,P as E,Q as F,R as G,S as H,T as I,U as J,V as K,W as L,X as M,Y as N,Z as O,_ as P,aa as R,ba as S,ca as T,da as U,ea as V,l as a,m as b,n as c,o as d,p as e,q as f,r as g,s as h,t as i,u as j,v as k,w as l,x as m,y as n,z as o}from"./chunk-O4RYVPVV.mjs";export{U as ApiClientError,g as BatchEntry,y as CANVAS_DRAFT_STATE,C as CANVAS_ENRICHMENT_TAG_PARAM,t as CANVAS_INTENT_TAG_PARAM,u as CANVAS_LOCALE_TAG_PARAM,x as CANVAS_LOCALIZATION_SLOT,s as CANVAS_LOCALIZATION_TYPE,A as CANVAS_PERSONALIZATION_PARAM,v as CANVAS_PERSONALIZE_SLOT,q as CANVAS_PERSONALIZE_TYPE,z as CANVAS_PUBLISHED_STATE,w as CANVAS_TEST_SLOT,r as CANVAS_TEST_TYPE,B as CANVAS_TEST_VARIANT_PARAM,m as CanvasClient,V as CanvasClientError,e as ChildEnhancerBuilder,o as DataSourceClient,p as DataTypeClient,T as EdgeCanvasClient,f as EnhancerBuilder,D as IN_CONTEXT_EDITOR_QUERY_STRING_PARAM,n as UncachedCanvasClient,d as UniqueBatchEntries,l as compose,h as createBatchEnhancer,S as createCanvasChannel,I as createEventBus,i as createLimitPolicy,k as enhance,L as extractLocales,H as generateHash,J as getChannelName,c as getComponentJsonPointer,b as getComponentPath,Q as isAddComponentMessage,R as isMovingComponentMessage,O as isReadyMessage,N as isSelectComponentMessage,E as isSystemComponentDefinition,P as isUpdateCompositionMessage,M as localize,F as mapSlotToPersonalizedVariations,G as mapSlotToTestVariations,j as nullLimitPolicy,K as subscribeToComposition,a as walkComponentTree};
1
+ import{$ as Q,A as p,B as q,C as r,D as s,E as t,F as u,G as v,H as w,I as x,J as y,K as z,L as A,M as B,N as C,O as D,P as E,Q as F,R as G,S as H,T as I,U as J,V as K,W as L,X as M,Y as N,Z as O,_ as P,aa as R,ba as S,ca as T,da as U,ea as V,fa as W,ga as X,l as a,m as b,n as c,o as d,p as e,q as f,r as g,s as h,t as i,u as j,v as k,w as l,x as m,y as n,z as o}from"./chunk-3DNK2OLJ.mjs";export{W as ApiClientError,g as BatchEntry,y as CANVAS_DRAFT_STATE,C as CANVAS_ENRICHMENT_TAG_PARAM,t as CANVAS_INTENT_TAG_PARAM,u as CANVAS_LOCALE_TAG_PARAM,x as CANVAS_LOCALIZATION_SLOT,s as CANVAS_LOCALIZATION_TYPE,A as CANVAS_PERSONALIZATION_PARAM,v as CANVAS_PERSONALIZE_SLOT,q as CANVAS_PERSONALIZE_TYPE,z as CANVAS_PUBLISHED_STATE,w as CANVAS_TEST_SLOT,r as CANVAS_TEST_TYPE,B as CANVAS_TEST_VARIANT_PARAM,m as CanvasClient,X as CanvasClientError,e as ChildEnhancerBuilder,o as DataSourceClient,p as DataTypeClient,f as EnhancerBuilder,E as IN_CONTEXT_EDITOR_COMPONENT_START_ROLE,D as IN_CONTEXT_EDITOR_QUERY_STRING_PARAM,F as PLACEHOLDER_ID,n as UncachedCanvasClient,d as UniqueBatchEntries,l as compose,h as createBatchEnhancer,V as createCanvasChannel,K as createEventBus,i as createLimitPolicy,k as enhance,N as extractLocales,J as generateHash,L as getChannelName,c as getComponentJsonPointer,b as getComponentPath,S as isAddComponentMessage,U as isDismissPlaceholderMessage,T as isMovingComponentMessage,Q as isReadyMessage,P as isSelectComponentMessage,G as isSystemComponentDefinition,R as isUpdateCompositionMessage,O as localize,H as mapSlotToPersonalizedVariations,I as mapSlotToTestVariations,j as nullLimitPolicy,M as subscribeToComposition,a as walkComponentTree};