@uniformdev/mesh-sdk 19.179.1-alpha.1 → 19.179.2-alpha.22

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.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ApiClient, ClientOptions, ExceptProject } from '@uniformdev/context/api';
2
2
  import { ProjectMapNode } from '@uniformdev/project-map';
3
- import { AssetParamValue, DataType, DataSource, DataResourceVariables, RootComponentInstance, ComponentInstance, ComponentDefinition, ComponentDefinitionParameter, Locale, DataVariableDefinition, EntryData } from '@uniformdev/canvas';
3
+ import { AssetParamValue, DataType, DataSource, DataSourceVariantsKeys, DataResourceVariables, RootComponentInstance, ComponentInstance, ComponentDefinition, ComponentDefinitionParameter, Locale, DataVariableDefinition, EntryData } from '@uniformdev/canvas';
4
4
  export { AssetParamValue, AssetParamValueItem } from '@uniformdev/canvas';
5
5
  import { Emitter } from 'mitt';
6
6
 
@@ -90,6 +90,7 @@ interface paths$1 {
90
90
  type: string;
91
91
  displayName: string;
92
92
  dataSourceEditorUrl?: string;
93
+ supportsUnpublishedData?: boolean;
93
94
  dataSourceEditorLocations?: {
94
95
  [key: string]: {
95
96
  url: string;
@@ -264,6 +265,7 @@ interface paths$1 {
264
265
  type: string;
265
266
  displayName: string;
266
267
  dataSourceEditorUrl?: string;
268
+ supportsUnpublishedData?: boolean;
267
269
  dataSourceEditorLocations?: {
268
270
  [key: string]: {
269
271
  url: string;
@@ -437,6 +439,7 @@ interface paths$1 {
437
439
  type: string;
438
440
  displayName: string;
439
441
  dataSourceEditorUrl?: string;
442
+ supportsUnpublishedData?: boolean;
440
443
  dataSourceEditorLocations?: {
441
444
  [key: string]: {
442
445
  url: string;
@@ -797,91 +800,92 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
797
800
  upsert(body: Omit<IntegrationDefinitionPutParameters, 'teamId'>): Promise<{
798
801
  type: string;
799
802
  displayName: string;
800
- logoIconUrl?: string | undefined;
801
- badgeIconUrl?: string | undefined;
802
- category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "translation" | "uniform" | "ai" | "unknown" | undefined;
803
- public?: boolean | undefined;
804
- scopes?: string[] | undefined;
805
- baseLocationUrl?: string | undefined;
803
+ logoIconUrl?: string;
804
+ badgeIconUrl?: string;
805
+ category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "translation" | "uniform" | "ai" | "unknown";
806
+ public?: boolean;
807
+ scopes?: string[];
808
+ baseLocationUrl?: string;
806
809
  locations: {
807
810
  install?: {
808
- description?: string[] | undefined;
809
- informationUrl?: string | undefined;
810
- canvasPackageUrl?: string | undefined;
811
- } | undefined;
811
+ description?: string[];
812
+ informationUrl?: string;
813
+ canvasPackageUrl?: string;
814
+ };
812
815
  settings?: {
813
816
  url: string;
814
817
  locations?: {
815
818
  [key: string]: {
816
819
  url: string;
817
820
  };
818
- } | undefined;
819
- } | undefined;
821
+ };
822
+ };
820
823
  canvas?: {
821
824
  parameterTypes: {
822
825
  type: string;
823
826
  displayName: string;
824
- configureUrl?: string | undefined;
827
+ configureUrl?: string;
825
828
  editorUrl: string;
826
829
  configurationLocations?: {
827
830
  [key: string]: {
828
831
  url: string;
829
832
  };
830
- } | undefined;
833
+ };
831
834
  editorLocations?: {
832
835
  [key: string]: {
833
836
  url: string;
834
837
  };
835
- } | undefined;
836
- renderableInPropertyPanel?: boolean | undefined;
837
- localizable?: "default-yes" | "default-no" | "yes" | "no" | undefined;
838
+ };
839
+ renderableInPropertyPanel?: boolean;
840
+ localizable?: "default-yes" | "default-no" | "yes" | "no";
838
841
  }[];
839
842
  editorTools?: {
840
843
  composition?: {
841
844
  url: string;
842
- } | undefined;
845
+ };
843
846
  componentPattern?: {
844
847
  url: string;
845
- } | undefined;
848
+ };
846
849
  compositionDefaults?: {
847
850
  url: string;
848
- } | undefined;
851
+ };
849
852
  entry?: {
850
853
  url: string;
851
- } | undefined;
854
+ };
852
855
  entryPattern?: {
853
856
  url: string;
854
- } | undefined;
855
- } | undefined;
856
- } | undefined;
857
+ };
858
+ };
859
+ };
857
860
  dataConnectors?: {
858
861
  type: string;
859
862
  displayName: string;
860
- dataSourceEditorUrl?: string | undefined;
863
+ dataSourceEditorUrl?: string;
864
+ supportsUnpublishedData?: boolean;
861
865
  dataSourceEditorLocations?: {
862
866
  [key: string]: {
863
867
  url: string;
864
868
  };
865
- } | undefined;
869
+ };
866
870
  dataArchetypes?: {
867
871
  [key: string]: {
868
872
  displayName: string;
869
- typeEditorUrl?: string | undefined;
873
+ typeEditorUrl?: string;
870
874
  typeEditorLocations?: {
871
875
  [key: string]: {
872
876
  url: string;
873
877
  };
874
- } | undefined;
875
- dataEditorUrl?: string | undefined;
878
+ };
879
+ dataEditorUrl?: string;
876
880
  dataEditorUrlLocations?: {
877
881
  [key: string]: {
878
882
  url: string;
879
883
  };
880
- } | undefined;
884
+ };
881
885
  };
882
- } | undefined;
883
- badgeIconUrl?: string | undefined;
884
- }[] | undefined;
886
+ };
887
+ badgeIconUrl?: string;
888
+ }[];
885
889
  assetLibrary?: {
886
890
  assetLibraryUrl: string;
887
891
  assetParameterUrl: string;
@@ -889,24 +893,24 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
889
893
  [key: string]: {
890
894
  url: string;
891
895
  };
892
- } | undefined;
896
+ };
893
897
  unstable_dynamicAssets?: {
894
898
  dataConnectorId: string;
895
899
  assetsListArchetypeId: string;
896
900
  singleAssetArchetypeId: string;
897
- } | undefined;
898
- } | undefined;
901
+ };
902
+ };
899
903
  unstable_assetLibrary?: {
900
904
  url: string;
901
905
  dynamicAssets?: {
902
906
  dataConnectorId: string;
903
907
  assetsListArchetypeId: string;
904
908
  singleAssetArchetypeId: string;
905
- } | undefined;
906
- } | undefined;
909
+ };
910
+ };
907
911
  ai?: {
908
912
  generateUrl: string;
909
- metadataUrl?: string | undefined;
913
+ metadataUrl?: string;
910
914
  prompts?: {
911
915
  id: string;
912
916
  name: string;
@@ -915,20 +919,20 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
915
919
  arguments?: {
916
920
  [key: string]: {
917
921
  type: string;
918
- displayName?: string | null | undefined;
919
- helpText?: string | null | undefined;
920
- default?: string | null | undefined;
922
+ displayName?: string | null;
923
+ helpText?: string | null;
924
+ default?: string | null;
921
925
  };
922
- } | null | undefined;
923
- metadata?: unknown;
924
- } | null | undefined;
926
+ } | null;
927
+ metadata?: unknown | null;
928
+ } | null;
925
929
  parameterTypes: string[];
926
- }[] | undefined;
927
- } | undefined;
930
+ }[];
931
+ };
928
932
  unstable_ai?: {
929
933
  generateUrl: string;
930
- metadataUrl?: string | undefined;
931
- } | undefined;
934
+ metadataUrl?: string;
935
+ };
932
936
  };
933
937
  unstable_prompts?: {
934
938
  id: string;
@@ -938,15 +942,15 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
938
942
  arguments?: {
939
943
  [key: string]: {
940
944
  type: string;
941
- displayName?: string | null | undefined;
942
- helpText?: string | null | undefined;
943
- default?: string | null | undefined;
945
+ displayName?: string | null;
946
+ helpText?: string | null;
947
+ default?: string | null;
944
948
  };
945
- } | null | undefined;
946
- metadata?: unknown;
947
- } | null | undefined;
949
+ } | null;
950
+ metadata?: unknown | null;
951
+ } | null;
948
952
  parameterTypes: string[];
949
- }[] | undefined;
953
+ }[];
950
954
  }>;
951
955
  /** Deletes a mesh app from a team */
952
956
  remove(body: Omit<IntegrationDefinitionDeleteParameters, 'teamId'>): Promise<void>;
@@ -1016,11 +1020,14 @@ type DataResourceLocationMetadata<TIntegrationConfiguration = unknown> = CommonM
1016
1020
  dataConnector: DataConnectorInfo;
1017
1021
  /** Current dynamic inputs that are configured on the composition (if any). */
1018
1022
  dynamicInputs: DynamicInputs;
1023
+ dataSourceVariant?: DataSourceVariantsKeys;
1019
1024
  }, TIntegrationConfiguration>;
1020
1025
  type DataResourceLocation = MeshLocationCore<DataResourceVariables, DataResourceLocationMetadata, DataResourceVariables, 'dataResource'> & GetDataResourceLocation;
1021
1026
 
1022
- type DataSourceLocationValue = Pick<DataSource, 'baseUrl' | 'custom' | 'customPublic' | 'headers' | 'parameters' | 'variables'>;
1023
- type DataSourceLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<unknown, TIntegrationConfiguration>;
1027
+ type DataSourceLocationValue = Pick<DataSource, 'baseUrl' | 'custom' | 'customPublic' | 'headers' | 'parameters' | 'variables' | 'enableUnpublishedMode' | 'variants'>;
1028
+ type DataSourceLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<{
1029
+ enableUnpublishedMode: DataSourceLocationValue['enableUnpublishedMode'];
1030
+ }, TIntegrationConfiguration>;
1024
1031
  type DataSourceLocation = MeshLocationCore<DataSourceLocationValue, DataSourceLocationMetadata, DataSourceLocationValue, 'dataSource'>;
1025
1032
 
1026
1033
  type ParamTypeLocationMetadata<TParamConfiguration = unknown, TIntegrationConfiguration = unknown> = CommonMetadata<{
@@ -1050,6 +1057,11 @@ type ParamTypeLocationMetadata<TParamConfiguration = unknown, TIntegrationConfig
1050
1057
  * Note that setValue() always sets the target language automatically.
1051
1058
  */
1052
1059
  targetLocale: string | undefined;
1060
+ /**
1061
+ * When editing a conditional value, this is the index in the parent parameter of the conditional value.
1062
+ * If this is -1, then the editor is not editing a conditional value.
1063
+ */
1064
+ targetConditionIndex: number;
1053
1065
  }, TIntegrationConfiguration>;
1054
1066
  type ParamTypeLocation<TParamValue = unknown, TParamConfiguration = unknown, TParamSetValue = TParamValue, TIntegrationConfiguration = unknown> = MeshLocationCore<TParamValue | undefined, ParamTypeLocationMetadata<TParamConfiguration, TIntegrationConfiguration>, TParamSetValue, 'paramType'> & {
1055
1067
  /**
@@ -1180,7 +1192,9 @@ type CloseDialogMessage = {
1180
1192
  dialogType: DialogType;
1181
1193
  dialogData?: unknown;
1182
1194
  };
1183
- type GetDataResourceMessage = Pick<DataType, 'path' | 'archetype' | 'headers' | 'parameters' | 'body' | 'method'>;
1195
+ type GetDataResourceMessage = Pick<DataType, 'path' | 'archetype' | 'headers' | 'parameters' | 'body' | 'method'> & {
1196
+ dataSourceVariant?: DataSourceVariantsKeys;
1197
+ };
1184
1198
  /** Primitive data types that a parameter type accepts to be bound to composition data */
1185
1199
  type BindableTypes = 'string' | 'number' | 'boolean' | 'object' | 'array';
1186
1200
  /** Message to parent to create a data connection expression to insert in a param type */
@@ -1229,9 +1243,10 @@ type MeshSDKEventInterface = Awaited<ReturnType<typeof connectToParent>>['parent
1229
1243
  * Imports the iframe communications library and provides an interface for interacting with
1230
1244
  * the parent window via said communications library.
1231
1245
  */
1232
- declare function connectToParent({ dialogResponseHandlers, onMetadataUpdated, }: {
1246
+ declare function connectToParent({ dialogResponseHandlers, onMetadataUpdated, onValueExternallyUpdated, }: {
1233
1247
  dialogResponseHandlers: DialogResponseHandlers;
1234
1248
  onMetadataUpdated: (metadata: unknown) => void;
1249
+ onValueExternallyUpdated: (value: unknown) => void;
1235
1250
  }): Promise<{
1236
1251
  initData: MeshContextData;
1237
1252
  parent: {
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ApiClient, ClientOptions, ExceptProject } from '@uniformdev/context/api';
2
2
  import { ProjectMapNode } from '@uniformdev/project-map';
3
- import { AssetParamValue, DataType, DataSource, DataResourceVariables, RootComponentInstance, ComponentInstance, ComponentDefinition, ComponentDefinitionParameter, Locale, DataVariableDefinition, EntryData } from '@uniformdev/canvas';
3
+ import { AssetParamValue, DataType, DataSource, DataSourceVariantsKeys, DataResourceVariables, RootComponentInstance, ComponentInstance, ComponentDefinition, ComponentDefinitionParameter, Locale, DataVariableDefinition, EntryData } from '@uniformdev/canvas';
4
4
  export { AssetParamValue, AssetParamValueItem } from '@uniformdev/canvas';
5
5
  import { Emitter } from 'mitt';
6
6
 
@@ -90,6 +90,7 @@ interface paths$1 {
90
90
  type: string;
91
91
  displayName: string;
92
92
  dataSourceEditorUrl?: string;
93
+ supportsUnpublishedData?: boolean;
93
94
  dataSourceEditorLocations?: {
94
95
  [key: string]: {
95
96
  url: string;
@@ -264,6 +265,7 @@ interface paths$1 {
264
265
  type: string;
265
266
  displayName: string;
266
267
  dataSourceEditorUrl?: string;
268
+ supportsUnpublishedData?: boolean;
267
269
  dataSourceEditorLocations?: {
268
270
  [key: string]: {
269
271
  url: string;
@@ -437,6 +439,7 @@ interface paths$1 {
437
439
  type: string;
438
440
  displayName: string;
439
441
  dataSourceEditorUrl?: string;
442
+ supportsUnpublishedData?: boolean;
440
443
  dataSourceEditorLocations?: {
441
444
  [key: string]: {
442
445
  url: string;
@@ -797,91 +800,92 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
797
800
  upsert(body: Omit<IntegrationDefinitionPutParameters, 'teamId'>): Promise<{
798
801
  type: string;
799
802
  displayName: string;
800
- logoIconUrl?: string | undefined;
801
- badgeIconUrl?: string | undefined;
802
- category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "translation" | "uniform" | "ai" | "unknown" | undefined;
803
- public?: boolean | undefined;
804
- scopes?: string[] | undefined;
805
- baseLocationUrl?: string | undefined;
803
+ logoIconUrl?: string;
804
+ badgeIconUrl?: string;
805
+ category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "translation" | "uniform" | "ai" | "unknown";
806
+ public?: boolean;
807
+ scopes?: string[];
808
+ baseLocationUrl?: string;
806
809
  locations: {
807
810
  install?: {
808
- description?: string[] | undefined;
809
- informationUrl?: string | undefined;
810
- canvasPackageUrl?: string | undefined;
811
- } | undefined;
811
+ description?: string[];
812
+ informationUrl?: string;
813
+ canvasPackageUrl?: string;
814
+ };
812
815
  settings?: {
813
816
  url: string;
814
817
  locations?: {
815
818
  [key: string]: {
816
819
  url: string;
817
820
  };
818
- } | undefined;
819
- } | undefined;
821
+ };
822
+ };
820
823
  canvas?: {
821
824
  parameterTypes: {
822
825
  type: string;
823
826
  displayName: string;
824
- configureUrl?: string | undefined;
827
+ configureUrl?: string;
825
828
  editorUrl: string;
826
829
  configurationLocations?: {
827
830
  [key: string]: {
828
831
  url: string;
829
832
  };
830
- } | undefined;
833
+ };
831
834
  editorLocations?: {
832
835
  [key: string]: {
833
836
  url: string;
834
837
  };
835
- } | undefined;
836
- renderableInPropertyPanel?: boolean | undefined;
837
- localizable?: "default-yes" | "default-no" | "yes" | "no" | undefined;
838
+ };
839
+ renderableInPropertyPanel?: boolean;
840
+ localizable?: "default-yes" | "default-no" | "yes" | "no";
838
841
  }[];
839
842
  editorTools?: {
840
843
  composition?: {
841
844
  url: string;
842
- } | undefined;
845
+ };
843
846
  componentPattern?: {
844
847
  url: string;
845
- } | undefined;
848
+ };
846
849
  compositionDefaults?: {
847
850
  url: string;
848
- } | undefined;
851
+ };
849
852
  entry?: {
850
853
  url: string;
851
- } | undefined;
854
+ };
852
855
  entryPattern?: {
853
856
  url: string;
854
- } | undefined;
855
- } | undefined;
856
- } | undefined;
857
+ };
858
+ };
859
+ };
857
860
  dataConnectors?: {
858
861
  type: string;
859
862
  displayName: string;
860
- dataSourceEditorUrl?: string | undefined;
863
+ dataSourceEditorUrl?: string;
864
+ supportsUnpublishedData?: boolean;
861
865
  dataSourceEditorLocations?: {
862
866
  [key: string]: {
863
867
  url: string;
864
868
  };
865
- } | undefined;
869
+ };
866
870
  dataArchetypes?: {
867
871
  [key: string]: {
868
872
  displayName: string;
869
- typeEditorUrl?: string | undefined;
873
+ typeEditorUrl?: string;
870
874
  typeEditorLocations?: {
871
875
  [key: string]: {
872
876
  url: string;
873
877
  };
874
- } | undefined;
875
- dataEditorUrl?: string | undefined;
878
+ };
879
+ dataEditorUrl?: string;
876
880
  dataEditorUrlLocations?: {
877
881
  [key: string]: {
878
882
  url: string;
879
883
  };
880
- } | undefined;
884
+ };
881
885
  };
882
- } | undefined;
883
- badgeIconUrl?: string | undefined;
884
- }[] | undefined;
886
+ };
887
+ badgeIconUrl?: string;
888
+ }[];
885
889
  assetLibrary?: {
886
890
  assetLibraryUrl: string;
887
891
  assetParameterUrl: string;
@@ -889,24 +893,24 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
889
893
  [key: string]: {
890
894
  url: string;
891
895
  };
892
- } | undefined;
896
+ };
893
897
  unstable_dynamicAssets?: {
894
898
  dataConnectorId: string;
895
899
  assetsListArchetypeId: string;
896
900
  singleAssetArchetypeId: string;
897
- } | undefined;
898
- } | undefined;
901
+ };
902
+ };
899
903
  unstable_assetLibrary?: {
900
904
  url: string;
901
905
  dynamicAssets?: {
902
906
  dataConnectorId: string;
903
907
  assetsListArchetypeId: string;
904
908
  singleAssetArchetypeId: string;
905
- } | undefined;
906
- } | undefined;
909
+ };
910
+ };
907
911
  ai?: {
908
912
  generateUrl: string;
909
- metadataUrl?: string | undefined;
913
+ metadataUrl?: string;
910
914
  prompts?: {
911
915
  id: string;
912
916
  name: string;
@@ -915,20 +919,20 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
915
919
  arguments?: {
916
920
  [key: string]: {
917
921
  type: string;
918
- displayName?: string | null | undefined;
919
- helpText?: string | null | undefined;
920
- default?: string | null | undefined;
922
+ displayName?: string | null;
923
+ helpText?: string | null;
924
+ default?: string | null;
921
925
  };
922
- } | null | undefined;
923
- metadata?: unknown;
924
- } | null | undefined;
926
+ } | null;
927
+ metadata?: unknown | null;
928
+ } | null;
925
929
  parameterTypes: string[];
926
- }[] | undefined;
927
- } | undefined;
930
+ }[];
931
+ };
928
932
  unstable_ai?: {
929
933
  generateUrl: string;
930
- metadataUrl?: string | undefined;
931
- } | undefined;
934
+ metadataUrl?: string;
935
+ };
932
936
  };
933
937
  unstable_prompts?: {
934
938
  id: string;
@@ -938,15 +942,15 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
938
942
  arguments?: {
939
943
  [key: string]: {
940
944
  type: string;
941
- displayName?: string | null | undefined;
942
- helpText?: string | null | undefined;
943
- default?: string | null | undefined;
945
+ displayName?: string | null;
946
+ helpText?: string | null;
947
+ default?: string | null;
944
948
  };
945
- } | null | undefined;
946
- metadata?: unknown;
947
- } | null | undefined;
949
+ } | null;
950
+ metadata?: unknown | null;
951
+ } | null;
948
952
  parameterTypes: string[];
949
- }[] | undefined;
953
+ }[];
950
954
  }>;
951
955
  /** Deletes a mesh app from a team */
952
956
  remove(body: Omit<IntegrationDefinitionDeleteParameters, 'teamId'>): Promise<void>;
@@ -1016,11 +1020,14 @@ type DataResourceLocationMetadata<TIntegrationConfiguration = unknown> = CommonM
1016
1020
  dataConnector: DataConnectorInfo;
1017
1021
  /** Current dynamic inputs that are configured on the composition (if any). */
1018
1022
  dynamicInputs: DynamicInputs;
1023
+ dataSourceVariant?: DataSourceVariantsKeys;
1019
1024
  }, TIntegrationConfiguration>;
1020
1025
  type DataResourceLocation = MeshLocationCore<DataResourceVariables, DataResourceLocationMetadata, DataResourceVariables, 'dataResource'> & GetDataResourceLocation;
1021
1026
 
1022
- type DataSourceLocationValue = Pick<DataSource, 'baseUrl' | 'custom' | 'customPublic' | 'headers' | 'parameters' | 'variables'>;
1023
- type DataSourceLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<unknown, TIntegrationConfiguration>;
1027
+ type DataSourceLocationValue = Pick<DataSource, 'baseUrl' | 'custom' | 'customPublic' | 'headers' | 'parameters' | 'variables' | 'enableUnpublishedMode' | 'variants'>;
1028
+ type DataSourceLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<{
1029
+ enableUnpublishedMode: DataSourceLocationValue['enableUnpublishedMode'];
1030
+ }, TIntegrationConfiguration>;
1024
1031
  type DataSourceLocation = MeshLocationCore<DataSourceLocationValue, DataSourceLocationMetadata, DataSourceLocationValue, 'dataSource'>;
1025
1032
 
1026
1033
  type ParamTypeLocationMetadata<TParamConfiguration = unknown, TIntegrationConfiguration = unknown> = CommonMetadata<{
@@ -1050,6 +1057,11 @@ type ParamTypeLocationMetadata<TParamConfiguration = unknown, TIntegrationConfig
1050
1057
  * Note that setValue() always sets the target language automatically.
1051
1058
  */
1052
1059
  targetLocale: string | undefined;
1060
+ /**
1061
+ * When editing a conditional value, this is the index in the parent parameter of the conditional value.
1062
+ * If this is -1, then the editor is not editing a conditional value.
1063
+ */
1064
+ targetConditionIndex: number;
1053
1065
  }, TIntegrationConfiguration>;
1054
1066
  type ParamTypeLocation<TParamValue = unknown, TParamConfiguration = unknown, TParamSetValue = TParamValue, TIntegrationConfiguration = unknown> = MeshLocationCore<TParamValue | undefined, ParamTypeLocationMetadata<TParamConfiguration, TIntegrationConfiguration>, TParamSetValue, 'paramType'> & {
1055
1067
  /**
@@ -1180,7 +1192,9 @@ type CloseDialogMessage = {
1180
1192
  dialogType: DialogType;
1181
1193
  dialogData?: unknown;
1182
1194
  };
1183
- type GetDataResourceMessage = Pick<DataType, 'path' | 'archetype' | 'headers' | 'parameters' | 'body' | 'method'>;
1195
+ type GetDataResourceMessage = Pick<DataType, 'path' | 'archetype' | 'headers' | 'parameters' | 'body' | 'method'> & {
1196
+ dataSourceVariant?: DataSourceVariantsKeys;
1197
+ };
1184
1198
  /** Primitive data types that a parameter type accepts to be bound to composition data */
1185
1199
  type BindableTypes = 'string' | 'number' | 'boolean' | 'object' | 'array';
1186
1200
  /** Message to parent to create a data connection expression to insert in a param type */
@@ -1229,9 +1243,10 @@ type MeshSDKEventInterface = Awaited<ReturnType<typeof connectToParent>>['parent
1229
1243
  * Imports the iframe communications library and provides an interface for interacting with
1230
1244
  * the parent window via said communications library.
1231
1245
  */
1232
- declare function connectToParent({ dialogResponseHandlers, onMetadataUpdated, }: {
1246
+ declare function connectToParent({ dialogResponseHandlers, onMetadataUpdated, onValueExternallyUpdated, }: {
1233
1247
  dialogResponseHandlers: DialogResponseHandlers;
1234
1248
  onMetadataUpdated: (metadata: unknown) => void;
1249
+ onValueExternallyUpdated: (value: unknown) => void;
1235
1250
  }): Promise<{
1236
1251
  initData: MeshContextData;
1237
1252
  parent: {
package/dist/index.esm.js CHANGED
@@ -112,6 +112,9 @@ var getLogger = (prefix, debug) => {
112
112
  }
113
113
  };
114
114
 
115
+ // src/temp/version.ts
116
+ var UNIFORM_MESH_SDK_VERSION = "19.179.1";
117
+
115
118
  // src/framepost/constants.ts
116
119
  var DEFAULT_REQUEST_TIMEOUT = 5e3;
117
120
 
@@ -361,6 +364,7 @@ var SharedClient = class {
361
364
  const message = serialize({
362
365
  type,
363
366
  apiVersion: "framepost/v1" /* v1 */,
367
+ sdkVersion: UNIFORM_MESH_SDK_VERSION,
364
368
  key,
365
369
  data,
366
370
  id: randomInsecureId(),
@@ -402,6 +406,7 @@ var SharedClient = class {
402
406
  const message = serialize({
403
407
  type: "channel_init" /* CHANNEL_INIT */,
404
408
  apiVersion: "framepost/v1" /* v1 */,
409
+ sdkVersion: UNIFORM_MESH_SDK_VERSION,
405
410
  key: "",
406
411
  data: context,
407
412
  id: randomInsecureId()
@@ -445,7 +450,8 @@ var ChildClient = class extends SharedClient {
445
450
  // src/sdkComms.ts
446
451
  async function connectToParent({
447
452
  dialogResponseHandlers,
448
- onMetadataUpdated
453
+ onMetadataUpdated,
454
+ onValueExternallyUpdated
449
455
  }) {
450
456
  const client = new ChildClient({ debug: false });
451
457
  window.parent.postMessage("parents just don't understand", "*");
@@ -463,6 +469,7 @@ async function connectToParent({
463
469
  delete dialogResponseHandlers[data.dialogId];
464
470
  });
465
471
  client.onRequest("metadata-value", onMetadataUpdated);
472
+ client.onRequest("external-value-update", onValueExternallyUpdated);
466
473
  return {
467
474
  initData,
468
475
  parent: {
@@ -648,6 +655,10 @@ async function initializeUniformMeshSDK({
648
655
  console.debug("Received metadata update", newMeta);
649
656
  currentMetadata = typedNewMeta;
650
657
  events.emit("onMetadataChanged", { newValue: newMeta });
658
+ },
659
+ onValueExternallyUpdated: (newValue) => {
660
+ console.debug("Received external value update", newValue);
661
+ events.emit("onValueChanged", { newValue });
651
662
  }
652
663
  });
653
664
  const { initData: contextData, parent } = connectResult;
package/dist/index.js CHANGED
@@ -151,6 +151,9 @@ var getLogger = (prefix, debug) => {
151
151
  }
152
152
  };
153
153
 
154
+ // src/temp/version.ts
155
+ var UNIFORM_MESH_SDK_VERSION = "19.179.1";
156
+
154
157
  // src/framepost/constants.ts
155
158
  var DEFAULT_REQUEST_TIMEOUT = 5e3;
156
159
 
@@ -400,6 +403,7 @@ var SharedClient = class {
400
403
  const message = serialize({
401
404
  type,
402
405
  apiVersion: "framepost/v1" /* v1 */,
406
+ sdkVersion: UNIFORM_MESH_SDK_VERSION,
403
407
  key,
404
408
  data,
405
409
  id: randomInsecureId(),
@@ -441,6 +445,7 @@ var SharedClient = class {
441
445
  const message = serialize({
442
446
  type: "channel_init" /* CHANNEL_INIT */,
443
447
  apiVersion: "framepost/v1" /* v1 */,
448
+ sdkVersion: UNIFORM_MESH_SDK_VERSION,
444
449
  key: "",
445
450
  data: context,
446
451
  id: randomInsecureId()
@@ -484,7 +489,8 @@ var ChildClient = class extends SharedClient {
484
489
  // src/sdkComms.ts
485
490
  async function connectToParent({
486
491
  dialogResponseHandlers,
487
- onMetadataUpdated
492
+ onMetadataUpdated,
493
+ onValueExternallyUpdated
488
494
  }) {
489
495
  const client = new ChildClient({ debug: false });
490
496
  window.parent.postMessage("parents just don't understand", "*");
@@ -502,6 +508,7 @@ async function connectToParent({
502
508
  delete dialogResponseHandlers[data.dialogId];
503
509
  });
504
510
  client.onRequest("metadata-value", onMetadataUpdated);
511
+ client.onRequest("external-value-update", onValueExternallyUpdated);
505
512
  return {
506
513
  initData,
507
514
  parent: {
@@ -687,6 +694,10 @@ async function initializeUniformMeshSDK({
687
694
  console.debug("Received metadata update", newMeta);
688
695
  currentMetadata = typedNewMeta;
689
696
  events.emit("onMetadataChanged", { newValue: newMeta });
697
+ },
698
+ onValueExternallyUpdated: (newValue) => {
699
+ console.debug("Received external value update", newValue);
700
+ events.emit("onValueChanged", { newValue });
690
701
  }
691
702
  });
692
703
  const { initData: contextData, parent } = connectResult;
package/dist/index.mjs CHANGED
@@ -112,6 +112,9 @@ var getLogger = (prefix, debug) => {
112
112
  }
113
113
  };
114
114
 
115
+ // src/temp/version.ts
116
+ var UNIFORM_MESH_SDK_VERSION = "19.179.1";
117
+
115
118
  // src/framepost/constants.ts
116
119
  var DEFAULT_REQUEST_TIMEOUT = 5e3;
117
120
 
@@ -361,6 +364,7 @@ var SharedClient = class {
361
364
  const message = serialize({
362
365
  type,
363
366
  apiVersion: "framepost/v1" /* v1 */,
367
+ sdkVersion: UNIFORM_MESH_SDK_VERSION,
364
368
  key,
365
369
  data,
366
370
  id: randomInsecureId(),
@@ -402,6 +406,7 @@ var SharedClient = class {
402
406
  const message = serialize({
403
407
  type: "channel_init" /* CHANNEL_INIT */,
404
408
  apiVersion: "framepost/v1" /* v1 */,
409
+ sdkVersion: UNIFORM_MESH_SDK_VERSION,
405
410
  key: "",
406
411
  data: context,
407
412
  id: randomInsecureId()
@@ -445,7 +450,8 @@ var ChildClient = class extends SharedClient {
445
450
  // src/sdkComms.ts
446
451
  async function connectToParent({
447
452
  dialogResponseHandlers,
448
- onMetadataUpdated
453
+ onMetadataUpdated,
454
+ onValueExternallyUpdated
449
455
  }) {
450
456
  const client = new ChildClient({ debug: false });
451
457
  window.parent.postMessage("parents just don't understand", "*");
@@ -463,6 +469,7 @@ async function connectToParent({
463
469
  delete dialogResponseHandlers[data.dialogId];
464
470
  });
465
471
  client.onRequest("metadata-value", onMetadataUpdated);
472
+ client.onRequest("external-value-update", onValueExternallyUpdated);
466
473
  return {
467
474
  initData,
468
475
  parent: {
@@ -648,6 +655,10 @@ async function initializeUniformMeshSDK({
648
655
  console.debug("Received metadata update", newMeta);
649
656
  currentMetadata = typedNewMeta;
650
657
  events.emit("onMetadataChanged", { newValue: newMeta });
658
+ },
659
+ onValueExternallyUpdated: (newValue) => {
660
+ console.debug("Received external value update", newValue);
661
+ events.emit("onValueChanged", { newValue });
651
662
  }
652
663
  });
653
664
  const { initData: contextData, parent } = connectResult;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/mesh-sdk",
3
- "version": "19.179.1-alpha.1+3adc08c00a",
3
+ "version": "19.179.2-alpha.22+79878be48f",
4
4
  "description": "Uniform Mesh Framework SDK",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -16,9 +16,10 @@
16
16
  "types": "./dist/index.d.ts",
17
17
  "sideEffects": false,
18
18
  "scripts": {
19
- "build": "run-s update-openapi build:js",
19
+ "build": "run-s update-openapi build:setversion build:js",
20
20
  "build:js": "tsup",
21
- "dev": "pnpm update-openapi && tsup --watch",
21
+ "build:setversion": "tsx ./scripts/set-version.ts",
22
+ "dev": "pnpm update-openapi && pnpm build:setversion && tsup --watch",
22
23
  "clean": "rimraf dist",
23
24
  "test": "jest --maxWorkers=1 --passWithNoTests",
24
25
  "lint": "eslint \"src/**/*.{js,ts,tsx}\"",
@@ -33,14 +34,14 @@
33
34
  "access": "public"
34
35
  },
35
36
  "dependencies": {
36
- "@uniformdev/canvas": "19.179.1-alpha.1+3adc08c00a",
37
- "@uniformdev/context": "19.179.1-alpha.1+3adc08c00a",
38
- "@uniformdev/project-map": "19.179.1-alpha.1+3adc08c00a",
37
+ "@uniformdev/canvas": "19.179.2-alpha.22+79878be48f",
38
+ "@uniformdev/context": "19.179.2-alpha.22+79878be48f",
39
+ "@uniformdev/project-map": "19.179.2-alpha.22+79878be48f",
39
40
  "imagesloaded": "^5.0.0",
40
- "mitt": "^3.0.0"
41
+ "mitt": "^3.0.1"
41
42
  },
42
43
  "devDependencies": {
43
44
  "@types/imagesloaded": "^4.1.2"
44
45
  },
45
- "gitHead": "3adc08c00a0d3932b6b767faaa6157f8b71ef0a0"
46
+ "gitHead": "79878be48f2d4b1c6158026aa632e71c91473ac6"
46
47
  }