@uniformdev/mesh-sdk 19.135.1-alpha.10 → 19.135.1-alpha.12
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 +97 -73
- package/dist/index.d.ts +97 -73
- package/dist/index.esm.js +19 -17
- package/dist/index.js +20 -18
- package/dist/index.mjs +19 -17
- package/package.json +9 -8
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, DataVariableDefinition, EntryData } from '@uniformdev/canvas';
|
|
3
|
+
import { AssetParamValue, DataType, DataSource, 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
|
|
|
@@ -30,7 +30,7 @@ interface paths$1 {
|
|
|
30
30
|
logoIconUrl?: string;
|
|
31
31
|
badgeIconUrl?: string;
|
|
32
32
|
/** @enum {string} */
|
|
33
|
-
category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "uniform" | "ai" | "unknown";
|
|
33
|
+
category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "translation" | "uniform" | "ai" | "unknown";
|
|
34
34
|
public?: boolean;
|
|
35
35
|
scopes?: string[];
|
|
36
36
|
baseLocationUrl?: string;
|
|
@@ -67,6 +67,7 @@ interface paths$1 {
|
|
|
67
67
|
renderableInPropertyPanel?: boolean;
|
|
68
68
|
/** @enum {string} */
|
|
69
69
|
localizable?: "default-yes" | "default-no" | "yes" | "no";
|
|
70
|
+
allowedPlacement?: ("parameter" | "field")[];
|
|
70
71
|
}[];
|
|
71
72
|
editorTools?: {
|
|
72
73
|
composition?: {
|
|
@@ -117,6 +118,11 @@ interface paths$1 {
|
|
|
117
118
|
assetLibrary?: {
|
|
118
119
|
assetLibraryUrl: string;
|
|
119
120
|
assetParameterUrl: string;
|
|
121
|
+
assetLibraryLocations?: {
|
|
122
|
+
[key: string]: {
|
|
123
|
+
url: string;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
120
126
|
unstable_dynamicAssets?: {
|
|
121
127
|
dataConnectorId: string;
|
|
122
128
|
assetsListArchetypeId: string;
|
|
@@ -199,7 +205,7 @@ interface paths$1 {
|
|
|
199
205
|
logoIconUrl?: string;
|
|
200
206
|
badgeIconUrl?: string;
|
|
201
207
|
/** @enum {string} */
|
|
202
|
-
category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "uniform" | "ai" | "unknown";
|
|
208
|
+
category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "translation" | "uniform" | "ai" | "unknown";
|
|
203
209
|
public?: boolean;
|
|
204
210
|
scopes?: string[];
|
|
205
211
|
baseLocationUrl?: string;
|
|
@@ -236,6 +242,7 @@ interface paths$1 {
|
|
|
236
242
|
renderableInPropertyPanel?: boolean;
|
|
237
243
|
/** @enum {string} */
|
|
238
244
|
localizable?: "default-yes" | "default-no" | "yes" | "no";
|
|
245
|
+
allowedPlacement?: ("parameter" | "field")[];
|
|
239
246
|
}[];
|
|
240
247
|
editorTools?: {
|
|
241
248
|
composition?: {
|
|
@@ -286,6 +293,11 @@ interface paths$1 {
|
|
|
286
293
|
assetLibrary?: {
|
|
287
294
|
assetLibraryUrl: string;
|
|
288
295
|
assetParameterUrl: string;
|
|
296
|
+
assetLibraryLocations?: {
|
|
297
|
+
[key: string]: {
|
|
298
|
+
url: string;
|
|
299
|
+
};
|
|
300
|
+
};
|
|
289
301
|
unstable_dynamicAssets?: {
|
|
290
302
|
dataConnectorId: string;
|
|
291
303
|
assetsListArchetypeId: string;
|
|
@@ -368,7 +380,7 @@ interface paths$1 {
|
|
|
368
380
|
logoIconUrl?: string;
|
|
369
381
|
badgeIconUrl?: string;
|
|
370
382
|
/** @enum {string} */
|
|
371
|
-
category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "uniform" | "ai" | "unknown";
|
|
383
|
+
category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "translation" | "uniform" | "ai" | "unknown";
|
|
372
384
|
scopes?: string[];
|
|
373
385
|
baseLocationUrl?: string;
|
|
374
386
|
locations: {
|
|
@@ -404,6 +416,7 @@ interface paths$1 {
|
|
|
404
416
|
renderableInPropertyPanel?: boolean;
|
|
405
417
|
/** @enum {string} */
|
|
406
418
|
localizable?: "default-yes" | "default-no" | "yes" | "no";
|
|
419
|
+
allowedPlacement?: ("parameter" | "field")[];
|
|
407
420
|
}[];
|
|
408
421
|
editorTools?: {
|
|
409
422
|
composition?: {
|
|
@@ -454,6 +467,11 @@ interface paths$1 {
|
|
|
454
467
|
assetLibrary?: {
|
|
455
468
|
assetLibraryUrl: string;
|
|
456
469
|
assetParameterUrl: string;
|
|
470
|
+
assetLibraryLocations?: {
|
|
471
|
+
[key: string]: {
|
|
472
|
+
url: string;
|
|
473
|
+
};
|
|
474
|
+
};
|
|
457
475
|
unstable_dynamicAssets?: {
|
|
458
476
|
dataConnectorId: string;
|
|
459
477
|
assetsListArchetypeId: string;
|
|
@@ -782,111 +800,117 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
|
782
800
|
upsert(body: Omit<IntegrationDefinitionPutParameters, 'teamId'>): Promise<{
|
|
783
801
|
type: string;
|
|
784
802
|
displayName: string;
|
|
785
|
-
logoIconUrl?: string
|
|
786
|
-
badgeIconUrl?: string
|
|
787
|
-
category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "uniform" | "ai" | "unknown"
|
|
788
|
-
public?: boolean
|
|
789
|
-
scopes?: string[]
|
|
790
|
-
baseLocationUrl?: string
|
|
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;
|
|
791
809
|
locations: {
|
|
792
810
|
install?: {
|
|
793
|
-
description?: string[]
|
|
794
|
-
informationUrl?: string
|
|
795
|
-
canvasPackageUrl?: string
|
|
796
|
-
}
|
|
811
|
+
description?: string[];
|
|
812
|
+
informationUrl?: string;
|
|
813
|
+
canvasPackageUrl?: string;
|
|
814
|
+
};
|
|
797
815
|
settings?: {
|
|
798
816
|
url: string;
|
|
799
817
|
locations?: {
|
|
800
818
|
[key: string]: {
|
|
801
819
|
url: string;
|
|
802
820
|
};
|
|
803
|
-
}
|
|
804
|
-
}
|
|
821
|
+
};
|
|
822
|
+
};
|
|
805
823
|
canvas?: {
|
|
806
824
|
parameterTypes: {
|
|
807
825
|
type: string;
|
|
808
826
|
displayName: string;
|
|
809
|
-
configureUrl?: string
|
|
827
|
+
configureUrl?: string;
|
|
810
828
|
editorUrl: string;
|
|
811
829
|
configurationLocations?: {
|
|
812
830
|
[key: string]: {
|
|
813
831
|
url: string;
|
|
814
832
|
};
|
|
815
|
-
}
|
|
833
|
+
};
|
|
816
834
|
editorLocations?: {
|
|
817
835
|
[key: string]: {
|
|
818
836
|
url: string;
|
|
819
837
|
};
|
|
820
|
-
}
|
|
821
|
-
renderableInPropertyPanel?: boolean
|
|
822
|
-
localizable?: "default-yes" | "default-no" | "yes" | "no"
|
|
838
|
+
};
|
|
839
|
+
renderableInPropertyPanel?: boolean;
|
|
840
|
+
localizable?: "default-yes" | "default-no" | "yes" | "no";
|
|
841
|
+
allowedPlacement?: ("parameter" | "field")[];
|
|
823
842
|
}[];
|
|
824
843
|
editorTools?: {
|
|
825
844
|
composition?: {
|
|
826
845
|
url: string;
|
|
827
|
-
}
|
|
846
|
+
};
|
|
828
847
|
componentPattern?: {
|
|
829
848
|
url: string;
|
|
830
|
-
}
|
|
849
|
+
};
|
|
831
850
|
compositionDefaults?: {
|
|
832
851
|
url: string;
|
|
833
|
-
}
|
|
852
|
+
};
|
|
834
853
|
entry?: {
|
|
835
854
|
url: string;
|
|
836
|
-
}
|
|
855
|
+
};
|
|
837
856
|
entryPattern?: {
|
|
838
857
|
url: string;
|
|
839
|
-
}
|
|
840
|
-
}
|
|
841
|
-
}
|
|
858
|
+
};
|
|
859
|
+
};
|
|
860
|
+
};
|
|
842
861
|
dataConnectors?: {
|
|
843
862
|
type: string;
|
|
844
863
|
displayName: string;
|
|
845
|
-
dataSourceEditorUrl?: string
|
|
864
|
+
dataSourceEditorUrl?: string;
|
|
846
865
|
dataSourceEditorLocations?: {
|
|
847
866
|
[key: string]: {
|
|
848
867
|
url: string;
|
|
849
868
|
};
|
|
850
|
-
}
|
|
869
|
+
};
|
|
851
870
|
dataArchetypes?: {
|
|
852
871
|
[key: string]: {
|
|
853
872
|
displayName: string;
|
|
854
|
-
typeEditorUrl?: string
|
|
873
|
+
typeEditorUrl?: string;
|
|
855
874
|
typeEditorLocations?: {
|
|
856
875
|
[key: string]: {
|
|
857
876
|
url: string;
|
|
858
877
|
};
|
|
859
|
-
}
|
|
860
|
-
dataEditorUrl?: string
|
|
878
|
+
};
|
|
879
|
+
dataEditorUrl?: string;
|
|
861
880
|
dataEditorUrlLocations?: {
|
|
862
881
|
[key: string]: {
|
|
863
882
|
url: string;
|
|
864
883
|
};
|
|
865
|
-
}
|
|
884
|
+
};
|
|
866
885
|
};
|
|
867
|
-
}
|
|
868
|
-
badgeIconUrl?: string
|
|
869
|
-
}[]
|
|
886
|
+
};
|
|
887
|
+
badgeIconUrl?: string;
|
|
888
|
+
}[];
|
|
870
889
|
assetLibrary?: {
|
|
871
890
|
assetLibraryUrl: string;
|
|
872
891
|
assetParameterUrl: string;
|
|
892
|
+
assetLibraryLocations?: {
|
|
893
|
+
[key: string]: {
|
|
894
|
+
url: string;
|
|
895
|
+
};
|
|
896
|
+
};
|
|
873
897
|
unstable_dynamicAssets?: {
|
|
874
898
|
dataConnectorId: string;
|
|
875
899
|
assetsListArchetypeId: string;
|
|
876
900
|
singleAssetArchetypeId: string;
|
|
877
|
-
}
|
|
878
|
-
}
|
|
901
|
+
};
|
|
902
|
+
};
|
|
879
903
|
unstable_assetLibrary?: {
|
|
880
904
|
url: string;
|
|
881
905
|
dynamicAssets?: {
|
|
882
906
|
dataConnectorId: string;
|
|
883
907
|
assetsListArchetypeId: string;
|
|
884
908
|
singleAssetArchetypeId: string;
|
|
885
|
-
}
|
|
886
|
-
}
|
|
909
|
+
};
|
|
910
|
+
};
|
|
887
911
|
ai?: {
|
|
888
912
|
generateUrl: string;
|
|
889
|
-
metadataUrl?: string
|
|
913
|
+
metadataUrl?: string;
|
|
890
914
|
prompts?: {
|
|
891
915
|
id: string;
|
|
892
916
|
name: string;
|
|
@@ -895,20 +919,20 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
|
895
919
|
arguments?: {
|
|
896
920
|
[key: string]: {
|
|
897
921
|
type: string;
|
|
898
|
-
displayName?: string | null
|
|
899
|
-
helpText?: string | null
|
|
900
|
-
default?: string | null
|
|
922
|
+
displayName?: string | null;
|
|
923
|
+
helpText?: string | null;
|
|
924
|
+
default?: string | null;
|
|
901
925
|
};
|
|
902
|
-
} | null
|
|
903
|
-
metadata?: unknown;
|
|
904
|
-
} | null
|
|
926
|
+
} | null;
|
|
927
|
+
metadata?: unknown | null;
|
|
928
|
+
} | null;
|
|
905
929
|
parameterTypes: string[];
|
|
906
|
-
}[]
|
|
907
|
-
}
|
|
930
|
+
}[];
|
|
931
|
+
};
|
|
908
932
|
unstable_ai?: {
|
|
909
933
|
generateUrl: string;
|
|
910
|
-
metadataUrl?: string
|
|
911
|
-
}
|
|
934
|
+
metadataUrl?: string;
|
|
935
|
+
};
|
|
912
936
|
};
|
|
913
937
|
unstable_prompts?: {
|
|
914
938
|
id: string;
|
|
@@ -918,15 +942,15 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
|
918
942
|
arguments?: {
|
|
919
943
|
[key: string]: {
|
|
920
944
|
type: string;
|
|
921
|
-
displayName?: string | null
|
|
922
|
-
helpText?: string | null
|
|
923
|
-
default?: string | null
|
|
945
|
+
displayName?: string | null;
|
|
946
|
+
helpText?: string | null;
|
|
947
|
+
default?: string | null;
|
|
924
948
|
};
|
|
925
|
-
} | null
|
|
926
|
-
metadata?: unknown;
|
|
927
|
-
} | null
|
|
949
|
+
} | null;
|
|
950
|
+
metadata?: unknown | null;
|
|
951
|
+
} | null;
|
|
928
952
|
parameterTypes: string[];
|
|
929
|
-
}[]
|
|
953
|
+
}[];
|
|
930
954
|
}>;
|
|
931
955
|
/** Deletes a mesh app from a team */
|
|
932
956
|
remove(body: Omit<IntegrationDefinitionDeleteParameters, 'teamId'>): Promise<void>;
|
|
@@ -1030,6 +1054,11 @@ type ParamTypeLocationMetadata<TParamConfiguration = unknown, TIntegrationConfig
|
|
|
1030
1054
|
* Note that setValue() always sets the target language automatically.
|
|
1031
1055
|
*/
|
|
1032
1056
|
targetLocale: string | undefined;
|
|
1057
|
+
/**
|
|
1058
|
+
* When editing a conditional value, this is the index in the parent parameter of the conditional value.
|
|
1059
|
+
* If this is -1, then the editor is not editing a conditional value.
|
|
1060
|
+
*/
|
|
1061
|
+
targetConditionIndex: number;
|
|
1033
1062
|
}, TIntegrationConfiguration>;
|
|
1034
1063
|
type ParamTypeLocation<TParamValue = unknown, TParamConfiguration = unknown, TParamSetValue = TParamValue, TIntegrationConfiguration = unknown> = MeshLocationCore<TParamValue | undefined, ParamTypeLocationMetadata<TParamConfiguration, TIntegrationConfiguration>, TParamSetValue, 'paramType'> & {
|
|
1035
1064
|
/**
|
|
@@ -1040,11 +1069,7 @@ type ParamTypeLocation<TParamValue = unknown, TParamConfiguration = unknown, TPa
|
|
|
1040
1069
|
};
|
|
1041
1070
|
|
|
1042
1071
|
type SettingsLocationMetadata = CommonMetadata & {
|
|
1043
|
-
locales:
|
|
1044
|
-
locale: string;
|
|
1045
|
-
displayName: string;
|
|
1046
|
-
isDefault: boolean;
|
|
1047
|
-
}[];
|
|
1072
|
+
locales: Locale[];
|
|
1048
1073
|
};
|
|
1049
1074
|
type SettingsLocation<TSettingsType> = MeshLocationCore<TSettingsType, SettingsLocationMetadata, TSettingsType, 'settings'>;
|
|
1050
1075
|
|
|
@@ -1213,9 +1238,10 @@ type MeshSDKEventInterface = Awaited<ReturnType<typeof connectToParent>>['parent
|
|
|
1213
1238
|
* Imports the iframe communications library and provides an interface for interacting with
|
|
1214
1239
|
* the parent window via said communications library.
|
|
1215
1240
|
*/
|
|
1216
|
-
declare function connectToParent({ dialogResponseHandlers, onMetadataUpdated, }: {
|
|
1241
|
+
declare function connectToParent({ dialogResponseHandlers, onMetadataUpdated, onValueExternallyUpdated, }: {
|
|
1217
1242
|
dialogResponseHandlers: DialogResponseHandlers;
|
|
1218
1243
|
onMetadataUpdated: (metadata: unknown) => void;
|
|
1244
|
+
onValueExternallyUpdated: (value: unknown) => void;
|
|
1219
1245
|
}): Promise<{
|
|
1220
1246
|
initData: MeshContextData;
|
|
1221
1247
|
parent: {
|
|
@@ -1400,24 +1426,22 @@ type AIPromptMetadataLocation = MeshLocationCore<Record<string, unknown>, Prompt
|
|
|
1400
1426
|
type CanvasEditorToolsLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<{
|
|
1401
1427
|
releaseId?: string;
|
|
1402
1428
|
state?: number;
|
|
1403
|
-
locales:
|
|
1404
|
-
locale: string;
|
|
1405
|
-
displayName: string;
|
|
1406
|
-
isDefault: boolean;
|
|
1407
|
-
}[];
|
|
1429
|
+
locales: Locale[];
|
|
1408
1430
|
}, TIntegrationConfiguration>;
|
|
1409
1431
|
type CanvasEditorToolsReferenceData = {
|
|
1410
1432
|
name: string;
|
|
1411
1433
|
};
|
|
1434
|
+
type CanvasEditorEntityType = 'composition' | 'componentPattern' | 'compositionDefaults' | 'entry' | 'entryPattern' | 'asset';
|
|
1412
1435
|
type CanvasEditorToolsData = {
|
|
1413
1436
|
patternNamesIndex?: Record<string, CanvasEditorToolsReferenceData>;
|
|
1414
1437
|
entryNamesIndex?: Record<string, CanvasEditorToolsReferenceData>;
|
|
1438
|
+
entityType: CanvasEditorEntityType;
|
|
1415
1439
|
} & ({
|
|
1416
1440
|
rootEntity: RootComponentInstance;
|
|
1417
|
-
|
|
1441
|
+
entityType: 'composition' | 'componentPattern' | 'compositionDefaults';
|
|
1418
1442
|
} | {
|
|
1419
1443
|
rootEntity: EntryData;
|
|
1420
|
-
|
|
1444
|
+
entityType: 'entry' | 'entryPattern';
|
|
1421
1445
|
});
|
|
1422
1446
|
type CanvasEditorToolsLocation = MeshLocationCore<CanvasEditorToolsData, CanvasEditorToolsLocationMetadata, CanvasEditorToolsData, 'canvasEditorTools'> & GetDataResourceLocation;
|
|
1423
1447
|
|
|
@@ -1530,4 +1554,4 @@ declare const hasPermissions: (permissions: MeshLocationUserPermissions | MeshLo
|
|
|
1530
1554
|
*/
|
|
1531
1555
|
declare const hasRole: (role: string, user: UniformUser) => boolean;
|
|
1532
1556
|
|
|
1533
|
-
export { type AIGenerateLocation, type AIGenerateLocationMetadata, type AIPromptMetadataLocation, type AssetLibraryLocation, type AssetLibraryLocationMetadata, type AssetParameterLocation, type AssetParameterLocationMetadata, type BindableTypes, type CSSHeight, type CanvasEditorToolsData, type CanvasEditorToolsLocation, type CanvasEditorToolsLocationMetadata, type CloseDialogMessage, type CloseLocationDialogOptions, type CommonMetadata, type DataConnectorInfo, type DataResourceLocation, type DataResourceLocationMetadata, type DataSourceLocation, type DataSourceLocationMetadata, type DataSourceLocationValue, type DataTypeLocation, type DataTypeLocationMetadata, type DataTypeLocationValue, type DialogContext, type DialogOptions, type DialogParamValue, type DialogParams, type DialogResponseData, type DialogResponseHandler, type DialogResponseHandlers, type DialogType, type DynamicInput, type DynamicInputs, type EditConnectedDataMessage, type EditConnectedDataResponse, type EditConnectedDataResponseCancellationContext, type GetDataResourceLocation, type GetDataResourceMessage, IntegrationDefinitionClient, type IntegrationDefinitionDeleteParameters, type IntegrationDefinitionGetParameters, type IntegrationDefinitionGetResponse, type IntegrationDefinitionPutParameters, type IntegrationDefinitionPutResponse, IntegrationInstallationClient, type IntegrationInstallationDeleteParameters, type IntegrationInstallationGetParameters, type IntegrationInstallationGetResponse, type IntegrationInstallationPutParameters, type LocationDialogResponse, type MeshContextData, type MeshLocation, type MeshLocationCore, type MeshLocationTypes, type MeshLocationUserPermissions, type MeshSDKEventInterface, type OpenConfirmationDialogOptions, type OpenConfirmationDialogResult, type OpenDialogMessage, type OpenDialogResult, type OpenLocationDialogOptions, type ParamTypeConfigLocation, type ParamTypeConfigLocationMetadata, type ParamTypeLocation, type ParamTypeLocationMetadata, type PromptSettingsLocationMetadata, type SdkWindow, type SetLocationFunction, type SetValueMessage, type SetValueOptions, type SettingsLocation, type SettingsLocationMetadata, type UniformMeshSDK, type UniformMeshSDKEvents, type UniformUser, type ValidationResult, hasPermissions, hasRole, initializeUniformMeshSDK };
|
|
1557
|
+
export { type AIGenerateLocation, type AIGenerateLocationMetadata, type AIPromptMetadataLocation, type AssetLibraryLocation, type AssetLibraryLocationMetadata, type AssetParameterLocation, type AssetParameterLocationMetadata, type BindableTypes, type CSSHeight, type CanvasEditorEntityType, type CanvasEditorToolsData, type CanvasEditorToolsLocation, type CanvasEditorToolsLocationMetadata, type CloseDialogMessage, type CloseLocationDialogOptions, type CommonMetadata, type DataConnectorInfo, type DataResourceLocation, type DataResourceLocationMetadata, type DataSourceLocation, type DataSourceLocationMetadata, type DataSourceLocationValue, type DataTypeLocation, type DataTypeLocationMetadata, type DataTypeLocationValue, type DialogContext, type DialogOptions, type DialogParamValue, type DialogParams, type DialogResponseData, type DialogResponseHandler, type DialogResponseHandlers, type DialogType, type DynamicInput, type DynamicInputs, type EditConnectedDataMessage, type EditConnectedDataResponse, type EditConnectedDataResponseCancellationContext, type GetDataResourceLocation, type GetDataResourceMessage, IntegrationDefinitionClient, type IntegrationDefinitionDeleteParameters, type IntegrationDefinitionGetParameters, type IntegrationDefinitionGetResponse, type IntegrationDefinitionPutParameters, type IntegrationDefinitionPutResponse, IntegrationInstallationClient, type IntegrationInstallationDeleteParameters, type IntegrationInstallationGetParameters, type IntegrationInstallationGetResponse, type IntegrationInstallationPutParameters, type LocationDialogResponse, type MeshContextData, type MeshLocation, type MeshLocationCore, type MeshLocationTypes, type MeshLocationUserPermissions, type MeshSDKEventInterface, type OpenConfirmationDialogOptions, type OpenConfirmationDialogResult, type OpenDialogMessage, type OpenDialogResult, type OpenLocationDialogOptions, type ParamTypeConfigLocation, type ParamTypeConfigLocationMetadata, type ParamTypeLocation, type ParamTypeLocationMetadata, type PromptSettingsLocationMetadata, type SdkWindow, type SetLocationFunction, type SetValueMessage, type SetValueOptions, type SettingsLocation, type SettingsLocationMetadata, type UniformMeshSDK, type UniformMeshSDKEvents, type UniformUser, type ValidationResult, hasPermissions, hasRole, initializeUniformMeshSDK };
|
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, DataVariableDefinition, EntryData } from '@uniformdev/canvas';
|
|
3
|
+
import { AssetParamValue, DataType, DataSource, 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
|
|
|
@@ -30,7 +30,7 @@ interface paths$1 {
|
|
|
30
30
|
logoIconUrl?: string;
|
|
31
31
|
badgeIconUrl?: string;
|
|
32
32
|
/** @enum {string} */
|
|
33
|
-
category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "uniform" | "ai" | "unknown";
|
|
33
|
+
category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "translation" | "uniform" | "ai" | "unknown";
|
|
34
34
|
public?: boolean;
|
|
35
35
|
scopes?: string[];
|
|
36
36
|
baseLocationUrl?: string;
|
|
@@ -67,6 +67,7 @@ interface paths$1 {
|
|
|
67
67
|
renderableInPropertyPanel?: boolean;
|
|
68
68
|
/** @enum {string} */
|
|
69
69
|
localizable?: "default-yes" | "default-no" | "yes" | "no";
|
|
70
|
+
allowedPlacement?: ("parameter" | "field")[];
|
|
70
71
|
}[];
|
|
71
72
|
editorTools?: {
|
|
72
73
|
composition?: {
|
|
@@ -117,6 +118,11 @@ interface paths$1 {
|
|
|
117
118
|
assetLibrary?: {
|
|
118
119
|
assetLibraryUrl: string;
|
|
119
120
|
assetParameterUrl: string;
|
|
121
|
+
assetLibraryLocations?: {
|
|
122
|
+
[key: string]: {
|
|
123
|
+
url: string;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
120
126
|
unstable_dynamicAssets?: {
|
|
121
127
|
dataConnectorId: string;
|
|
122
128
|
assetsListArchetypeId: string;
|
|
@@ -199,7 +205,7 @@ interface paths$1 {
|
|
|
199
205
|
logoIconUrl?: string;
|
|
200
206
|
badgeIconUrl?: string;
|
|
201
207
|
/** @enum {string} */
|
|
202
|
-
category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "uniform" | "ai" | "unknown";
|
|
208
|
+
category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "translation" | "uniform" | "ai" | "unknown";
|
|
203
209
|
public?: boolean;
|
|
204
210
|
scopes?: string[];
|
|
205
211
|
baseLocationUrl?: string;
|
|
@@ -236,6 +242,7 @@ interface paths$1 {
|
|
|
236
242
|
renderableInPropertyPanel?: boolean;
|
|
237
243
|
/** @enum {string} */
|
|
238
244
|
localizable?: "default-yes" | "default-no" | "yes" | "no";
|
|
245
|
+
allowedPlacement?: ("parameter" | "field")[];
|
|
239
246
|
}[];
|
|
240
247
|
editorTools?: {
|
|
241
248
|
composition?: {
|
|
@@ -286,6 +293,11 @@ interface paths$1 {
|
|
|
286
293
|
assetLibrary?: {
|
|
287
294
|
assetLibraryUrl: string;
|
|
288
295
|
assetParameterUrl: string;
|
|
296
|
+
assetLibraryLocations?: {
|
|
297
|
+
[key: string]: {
|
|
298
|
+
url: string;
|
|
299
|
+
};
|
|
300
|
+
};
|
|
289
301
|
unstable_dynamicAssets?: {
|
|
290
302
|
dataConnectorId: string;
|
|
291
303
|
assetsListArchetypeId: string;
|
|
@@ -368,7 +380,7 @@ interface paths$1 {
|
|
|
368
380
|
logoIconUrl?: string;
|
|
369
381
|
badgeIconUrl?: string;
|
|
370
382
|
/** @enum {string} */
|
|
371
|
-
category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "uniform" | "ai" | "unknown";
|
|
383
|
+
category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "translation" | "uniform" | "ai" | "unknown";
|
|
372
384
|
scopes?: string[];
|
|
373
385
|
baseLocationUrl?: string;
|
|
374
386
|
locations: {
|
|
@@ -404,6 +416,7 @@ interface paths$1 {
|
|
|
404
416
|
renderableInPropertyPanel?: boolean;
|
|
405
417
|
/** @enum {string} */
|
|
406
418
|
localizable?: "default-yes" | "default-no" | "yes" | "no";
|
|
419
|
+
allowedPlacement?: ("parameter" | "field")[];
|
|
407
420
|
}[];
|
|
408
421
|
editorTools?: {
|
|
409
422
|
composition?: {
|
|
@@ -454,6 +467,11 @@ interface paths$1 {
|
|
|
454
467
|
assetLibrary?: {
|
|
455
468
|
assetLibraryUrl: string;
|
|
456
469
|
assetParameterUrl: string;
|
|
470
|
+
assetLibraryLocations?: {
|
|
471
|
+
[key: string]: {
|
|
472
|
+
url: string;
|
|
473
|
+
};
|
|
474
|
+
};
|
|
457
475
|
unstable_dynamicAssets?: {
|
|
458
476
|
dataConnectorId: string;
|
|
459
477
|
assetsListArchetypeId: string;
|
|
@@ -782,111 +800,117 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
|
782
800
|
upsert(body: Omit<IntegrationDefinitionPutParameters, 'teamId'>): Promise<{
|
|
783
801
|
type: string;
|
|
784
802
|
displayName: string;
|
|
785
|
-
logoIconUrl?: string
|
|
786
|
-
badgeIconUrl?: string
|
|
787
|
-
category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "uniform" | "ai" | "unknown"
|
|
788
|
-
public?: boolean
|
|
789
|
-
scopes?: string[]
|
|
790
|
-
baseLocationUrl?: string
|
|
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;
|
|
791
809
|
locations: {
|
|
792
810
|
install?: {
|
|
793
|
-
description?: string[]
|
|
794
|
-
informationUrl?: string
|
|
795
|
-
canvasPackageUrl?: string
|
|
796
|
-
}
|
|
811
|
+
description?: string[];
|
|
812
|
+
informationUrl?: string;
|
|
813
|
+
canvasPackageUrl?: string;
|
|
814
|
+
};
|
|
797
815
|
settings?: {
|
|
798
816
|
url: string;
|
|
799
817
|
locations?: {
|
|
800
818
|
[key: string]: {
|
|
801
819
|
url: string;
|
|
802
820
|
};
|
|
803
|
-
}
|
|
804
|
-
}
|
|
821
|
+
};
|
|
822
|
+
};
|
|
805
823
|
canvas?: {
|
|
806
824
|
parameterTypes: {
|
|
807
825
|
type: string;
|
|
808
826
|
displayName: string;
|
|
809
|
-
configureUrl?: string
|
|
827
|
+
configureUrl?: string;
|
|
810
828
|
editorUrl: string;
|
|
811
829
|
configurationLocations?: {
|
|
812
830
|
[key: string]: {
|
|
813
831
|
url: string;
|
|
814
832
|
};
|
|
815
|
-
}
|
|
833
|
+
};
|
|
816
834
|
editorLocations?: {
|
|
817
835
|
[key: string]: {
|
|
818
836
|
url: string;
|
|
819
837
|
};
|
|
820
|
-
}
|
|
821
|
-
renderableInPropertyPanel?: boolean
|
|
822
|
-
localizable?: "default-yes" | "default-no" | "yes" | "no"
|
|
838
|
+
};
|
|
839
|
+
renderableInPropertyPanel?: boolean;
|
|
840
|
+
localizable?: "default-yes" | "default-no" | "yes" | "no";
|
|
841
|
+
allowedPlacement?: ("parameter" | "field")[];
|
|
823
842
|
}[];
|
|
824
843
|
editorTools?: {
|
|
825
844
|
composition?: {
|
|
826
845
|
url: string;
|
|
827
|
-
}
|
|
846
|
+
};
|
|
828
847
|
componentPattern?: {
|
|
829
848
|
url: string;
|
|
830
|
-
}
|
|
849
|
+
};
|
|
831
850
|
compositionDefaults?: {
|
|
832
851
|
url: string;
|
|
833
|
-
}
|
|
852
|
+
};
|
|
834
853
|
entry?: {
|
|
835
854
|
url: string;
|
|
836
|
-
}
|
|
855
|
+
};
|
|
837
856
|
entryPattern?: {
|
|
838
857
|
url: string;
|
|
839
|
-
}
|
|
840
|
-
}
|
|
841
|
-
}
|
|
858
|
+
};
|
|
859
|
+
};
|
|
860
|
+
};
|
|
842
861
|
dataConnectors?: {
|
|
843
862
|
type: string;
|
|
844
863
|
displayName: string;
|
|
845
|
-
dataSourceEditorUrl?: string
|
|
864
|
+
dataSourceEditorUrl?: string;
|
|
846
865
|
dataSourceEditorLocations?: {
|
|
847
866
|
[key: string]: {
|
|
848
867
|
url: string;
|
|
849
868
|
};
|
|
850
|
-
}
|
|
869
|
+
};
|
|
851
870
|
dataArchetypes?: {
|
|
852
871
|
[key: string]: {
|
|
853
872
|
displayName: string;
|
|
854
|
-
typeEditorUrl?: string
|
|
873
|
+
typeEditorUrl?: string;
|
|
855
874
|
typeEditorLocations?: {
|
|
856
875
|
[key: string]: {
|
|
857
876
|
url: string;
|
|
858
877
|
};
|
|
859
|
-
}
|
|
860
|
-
dataEditorUrl?: string
|
|
878
|
+
};
|
|
879
|
+
dataEditorUrl?: string;
|
|
861
880
|
dataEditorUrlLocations?: {
|
|
862
881
|
[key: string]: {
|
|
863
882
|
url: string;
|
|
864
883
|
};
|
|
865
|
-
}
|
|
884
|
+
};
|
|
866
885
|
};
|
|
867
|
-
}
|
|
868
|
-
badgeIconUrl?: string
|
|
869
|
-
}[]
|
|
886
|
+
};
|
|
887
|
+
badgeIconUrl?: string;
|
|
888
|
+
}[];
|
|
870
889
|
assetLibrary?: {
|
|
871
890
|
assetLibraryUrl: string;
|
|
872
891
|
assetParameterUrl: string;
|
|
892
|
+
assetLibraryLocations?: {
|
|
893
|
+
[key: string]: {
|
|
894
|
+
url: string;
|
|
895
|
+
};
|
|
896
|
+
};
|
|
873
897
|
unstable_dynamicAssets?: {
|
|
874
898
|
dataConnectorId: string;
|
|
875
899
|
assetsListArchetypeId: string;
|
|
876
900
|
singleAssetArchetypeId: string;
|
|
877
|
-
}
|
|
878
|
-
}
|
|
901
|
+
};
|
|
902
|
+
};
|
|
879
903
|
unstable_assetLibrary?: {
|
|
880
904
|
url: string;
|
|
881
905
|
dynamicAssets?: {
|
|
882
906
|
dataConnectorId: string;
|
|
883
907
|
assetsListArchetypeId: string;
|
|
884
908
|
singleAssetArchetypeId: string;
|
|
885
|
-
}
|
|
886
|
-
}
|
|
909
|
+
};
|
|
910
|
+
};
|
|
887
911
|
ai?: {
|
|
888
912
|
generateUrl: string;
|
|
889
|
-
metadataUrl?: string
|
|
913
|
+
metadataUrl?: string;
|
|
890
914
|
prompts?: {
|
|
891
915
|
id: string;
|
|
892
916
|
name: string;
|
|
@@ -895,20 +919,20 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
|
895
919
|
arguments?: {
|
|
896
920
|
[key: string]: {
|
|
897
921
|
type: string;
|
|
898
|
-
displayName?: string | null
|
|
899
|
-
helpText?: string | null
|
|
900
|
-
default?: string | null
|
|
922
|
+
displayName?: string | null;
|
|
923
|
+
helpText?: string | null;
|
|
924
|
+
default?: string | null;
|
|
901
925
|
};
|
|
902
|
-
} | null
|
|
903
|
-
metadata?: unknown;
|
|
904
|
-
} | null
|
|
926
|
+
} | null;
|
|
927
|
+
metadata?: unknown | null;
|
|
928
|
+
} | null;
|
|
905
929
|
parameterTypes: string[];
|
|
906
|
-
}[]
|
|
907
|
-
}
|
|
930
|
+
}[];
|
|
931
|
+
};
|
|
908
932
|
unstable_ai?: {
|
|
909
933
|
generateUrl: string;
|
|
910
|
-
metadataUrl?: string
|
|
911
|
-
}
|
|
934
|
+
metadataUrl?: string;
|
|
935
|
+
};
|
|
912
936
|
};
|
|
913
937
|
unstable_prompts?: {
|
|
914
938
|
id: string;
|
|
@@ -918,15 +942,15 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
|
918
942
|
arguments?: {
|
|
919
943
|
[key: string]: {
|
|
920
944
|
type: string;
|
|
921
|
-
displayName?: string | null
|
|
922
|
-
helpText?: string | null
|
|
923
|
-
default?: string | null
|
|
945
|
+
displayName?: string | null;
|
|
946
|
+
helpText?: string | null;
|
|
947
|
+
default?: string | null;
|
|
924
948
|
};
|
|
925
|
-
} | null
|
|
926
|
-
metadata?: unknown;
|
|
927
|
-
} | null
|
|
949
|
+
} | null;
|
|
950
|
+
metadata?: unknown | null;
|
|
951
|
+
} | null;
|
|
928
952
|
parameterTypes: string[];
|
|
929
|
-
}[]
|
|
953
|
+
}[];
|
|
930
954
|
}>;
|
|
931
955
|
/** Deletes a mesh app from a team */
|
|
932
956
|
remove(body: Omit<IntegrationDefinitionDeleteParameters, 'teamId'>): Promise<void>;
|
|
@@ -1030,6 +1054,11 @@ type ParamTypeLocationMetadata<TParamConfiguration = unknown, TIntegrationConfig
|
|
|
1030
1054
|
* Note that setValue() always sets the target language automatically.
|
|
1031
1055
|
*/
|
|
1032
1056
|
targetLocale: string | undefined;
|
|
1057
|
+
/**
|
|
1058
|
+
* When editing a conditional value, this is the index in the parent parameter of the conditional value.
|
|
1059
|
+
* If this is -1, then the editor is not editing a conditional value.
|
|
1060
|
+
*/
|
|
1061
|
+
targetConditionIndex: number;
|
|
1033
1062
|
}, TIntegrationConfiguration>;
|
|
1034
1063
|
type ParamTypeLocation<TParamValue = unknown, TParamConfiguration = unknown, TParamSetValue = TParamValue, TIntegrationConfiguration = unknown> = MeshLocationCore<TParamValue | undefined, ParamTypeLocationMetadata<TParamConfiguration, TIntegrationConfiguration>, TParamSetValue, 'paramType'> & {
|
|
1035
1064
|
/**
|
|
@@ -1040,11 +1069,7 @@ type ParamTypeLocation<TParamValue = unknown, TParamConfiguration = unknown, TPa
|
|
|
1040
1069
|
};
|
|
1041
1070
|
|
|
1042
1071
|
type SettingsLocationMetadata = CommonMetadata & {
|
|
1043
|
-
locales:
|
|
1044
|
-
locale: string;
|
|
1045
|
-
displayName: string;
|
|
1046
|
-
isDefault: boolean;
|
|
1047
|
-
}[];
|
|
1072
|
+
locales: Locale[];
|
|
1048
1073
|
};
|
|
1049
1074
|
type SettingsLocation<TSettingsType> = MeshLocationCore<TSettingsType, SettingsLocationMetadata, TSettingsType, 'settings'>;
|
|
1050
1075
|
|
|
@@ -1213,9 +1238,10 @@ type MeshSDKEventInterface = Awaited<ReturnType<typeof connectToParent>>['parent
|
|
|
1213
1238
|
* Imports the iframe communications library and provides an interface for interacting with
|
|
1214
1239
|
* the parent window via said communications library.
|
|
1215
1240
|
*/
|
|
1216
|
-
declare function connectToParent({ dialogResponseHandlers, onMetadataUpdated, }: {
|
|
1241
|
+
declare function connectToParent({ dialogResponseHandlers, onMetadataUpdated, onValueExternallyUpdated, }: {
|
|
1217
1242
|
dialogResponseHandlers: DialogResponseHandlers;
|
|
1218
1243
|
onMetadataUpdated: (metadata: unknown) => void;
|
|
1244
|
+
onValueExternallyUpdated: (value: unknown) => void;
|
|
1219
1245
|
}): Promise<{
|
|
1220
1246
|
initData: MeshContextData;
|
|
1221
1247
|
parent: {
|
|
@@ -1400,24 +1426,22 @@ type AIPromptMetadataLocation = MeshLocationCore<Record<string, unknown>, Prompt
|
|
|
1400
1426
|
type CanvasEditorToolsLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<{
|
|
1401
1427
|
releaseId?: string;
|
|
1402
1428
|
state?: number;
|
|
1403
|
-
locales:
|
|
1404
|
-
locale: string;
|
|
1405
|
-
displayName: string;
|
|
1406
|
-
isDefault: boolean;
|
|
1407
|
-
}[];
|
|
1429
|
+
locales: Locale[];
|
|
1408
1430
|
}, TIntegrationConfiguration>;
|
|
1409
1431
|
type CanvasEditorToolsReferenceData = {
|
|
1410
1432
|
name: string;
|
|
1411
1433
|
};
|
|
1434
|
+
type CanvasEditorEntityType = 'composition' | 'componentPattern' | 'compositionDefaults' | 'entry' | 'entryPattern' | 'asset';
|
|
1412
1435
|
type CanvasEditorToolsData = {
|
|
1413
1436
|
patternNamesIndex?: Record<string, CanvasEditorToolsReferenceData>;
|
|
1414
1437
|
entryNamesIndex?: Record<string, CanvasEditorToolsReferenceData>;
|
|
1438
|
+
entityType: CanvasEditorEntityType;
|
|
1415
1439
|
} & ({
|
|
1416
1440
|
rootEntity: RootComponentInstance;
|
|
1417
|
-
|
|
1441
|
+
entityType: 'composition' | 'componentPattern' | 'compositionDefaults';
|
|
1418
1442
|
} | {
|
|
1419
1443
|
rootEntity: EntryData;
|
|
1420
|
-
|
|
1444
|
+
entityType: 'entry' | 'entryPattern';
|
|
1421
1445
|
});
|
|
1422
1446
|
type CanvasEditorToolsLocation = MeshLocationCore<CanvasEditorToolsData, CanvasEditorToolsLocationMetadata, CanvasEditorToolsData, 'canvasEditorTools'> & GetDataResourceLocation;
|
|
1423
1447
|
|
|
@@ -1530,4 +1554,4 @@ declare const hasPermissions: (permissions: MeshLocationUserPermissions | MeshLo
|
|
|
1530
1554
|
*/
|
|
1531
1555
|
declare const hasRole: (role: string, user: UniformUser) => boolean;
|
|
1532
1556
|
|
|
1533
|
-
export { type AIGenerateLocation, type AIGenerateLocationMetadata, type AIPromptMetadataLocation, type AssetLibraryLocation, type AssetLibraryLocationMetadata, type AssetParameterLocation, type AssetParameterLocationMetadata, type BindableTypes, type CSSHeight, type CanvasEditorToolsData, type CanvasEditorToolsLocation, type CanvasEditorToolsLocationMetadata, type CloseDialogMessage, type CloseLocationDialogOptions, type CommonMetadata, type DataConnectorInfo, type DataResourceLocation, type DataResourceLocationMetadata, type DataSourceLocation, type DataSourceLocationMetadata, type DataSourceLocationValue, type DataTypeLocation, type DataTypeLocationMetadata, type DataTypeLocationValue, type DialogContext, type DialogOptions, type DialogParamValue, type DialogParams, type DialogResponseData, type DialogResponseHandler, type DialogResponseHandlers, type DialogType, type DynamicInput, type DynamicInputs, type EditConnectedDataMessage, type EditConnectedDataResponse, type EditConnectedDataResponseCancellationContext, type GetDataResourceLocation, type GetDataResourceMessage, IntegrationDefinitionClient, type IntegrationDefinitionDeleteParameters, type IntegrationDefinitionGetParameters, type IntegrationDefinitionGetResponse, type IntegrationDefinitionPutParameters, type IntegrationDefinitionPutResponse, IntegrationInstallationClient, type IntegrationInstallationDeleteParameters, type IntegrationInstallationGetParameters, type IntegrationInstallationGetResponse, type IntegrationInstallationPutParameters, type LocationDialogResponse, type MeshContextData, type MeshLocation, type MeshLocationCore, type MeshLocationTypes, type MeshLocationUserPermissions, type MeshSDKEventInterface, type OpenConfirmationDialogOptions, type OpenConfirmationDialogResult, type OpenDialogMessage, type OpenDialogResult, type OpenLocationDialogOptions, type ParamTypeConfigLocation, type ParamTypeConfigLocationMetadata, type ParamTypeLocation, type ParamTypeLocationMetadata, type PromptSettingsLocationMetadata, type SdkWindow, type SetLocationFunction, type SetValueMessage, type SetValueOptions, type SettingsLocation, type SettingsLocationMetadata, type UniformMeshSDK, type UniformMeshSDKEvents, type UniformUser, type ValidationResult, hasPermissions, hasRole, initializeUniformMeshSDK };
|
|
1557
|
+
export { type AIGenerateLocation, type AIGenerateLocationMetadata, type AIPromptMetadataLocation, type AssetLibraryLocation, type AssetLibraryLocationMetadata, type AssetParameterLocation, type AssetParameterLocationMetadata, type BindableTypes, type CSSHeight, type CanvasEditorEntityType, type CanvasEditorToolsData, type CanvasEditorToolsLocation, type CanvasEditorToolsLocationMetadata, type CloseDialogMessage, type CloseLocationDialogOptions, type CommonMetadata, type DataConnectorInfo, type DataResourceLocation, type DataResourceLocationMetadata, type DataSourceLocation, type DataSourceLocationMetadata, type DataSourceLocationValue, type DataTypeLocation, type DataTypeLocationMetadata, type DataTypeLocationValue, type DialogContext, type DialogOptions, type DialogParamValue, type DialogParams, type DialogResponseData, type DialogResponseHandler, type DialogResponseHandlers, type DialogType, type DynamicInput, type DynamicInputs, type EditConnectedDataMessage, type EditConnectedDataResponse, type EditConnectedDataResponseCancellationContext, type GetDataResourceLocation, type GetDataResourceMessage, IntegrationDefinitionClient, type IntegrationDefinitionDeleteParameters, type IntegrationDefinitionGetParameters, type IntegrationDefinitionGetResponse, type IntegrationDefinitionPutParameters, type IntegrationDefinitionPutResponse, IntegrationInstallationClient, type IntegrationInstallationDeleteParameters, type IntegrationInstallationGetParameters, type IntegrationInstallationGetResponse, type IntegrationInstallationPutParameters, type LocationDialogResponse, type MeshContextData, type MeshLocation, type MeshLocationCore, type MeshLocationTypes, type MeshLocationUserPermissions, type MeshSDKEventInterface, type OpenConfirmationDialogOptions, type OpenConfirmationDialogResult, type OpenDialogMessage, type OpenDialogResult, type OpenLocationDialogOptions, type ParamTypeConfigLocation, type ParamTypeConfigLocationMetadata, type ParamTypeLocation, type ParamTypeLocationMetadata, type PromptSettingsLocationMetadata, type SdkWindow, type SetLocationFunction, type SetValueMessage, type SetValueOptions, type SettingsLocation, type SettingsLocationMetadata, type UniformMeshSDK, type UniformMeshSDKEvents, type UniformUser, type ValidationResult, hasPermissions, hasRole, initializeUniformMeshSDK };
|
package/dist/index.esm.js
CHANGED
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
throw TypeError("Cannot " + msg);
|
|
4
|
-
};
|
|
5
|
-
var __privateGet = (obj, member, getter) => {
|
|
6
|
-
__accessCheck(obj, member, "read from private field");
|
|
7
|
-
return getter ? getter.call(obj) : member.get(obj);
|
|
8
|
-
};
|
|
9
|
-
var __privateAdd = (obj, member, value) => {
|
|
10
|
-
if (member.has(obj))
|
|
11
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
12
|
-
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
1
|
+
var __typeError = (msg) => {
|
|
2
|
+
throw TypeError(msg);
|
|
13
3
|
};
|
|
4
|
+
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
5
|
+
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
6
|
+
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
14
7
|
|
|
15
8
|
// src/clients/IntegrationDefinitionClient.ts
|
|
16
9
|
import { ApiClient } from "@uniformdev/context/api";
|
|
@@ -119,6 +112,9 @@ var getLogger = (prefix, debug) => {
|
|
|
119
112
|
}
|
|
120
113
|
};
|
|
121
114
|
|
|
115
|
+
// src/temp/version.ts
|
|
116
|
+
var UNIFORM_MESH_SDK_VERSION = "19.185.0";
|
|
117
|
+
|
|
122
118
|
// src/framepost/constants.ts
|
|
123
119
|
var DEFAULT_REQUEST_TIMEOUT = 5e3;
|
|
124
120
|
|
|
@@ -368,6 +364,7 @@ var SharedClient = class {
|
|
|
368
364
|
const message = serialize({
|
|
369
365
|
type,
|
|
370
366
|
apiVersion: "framepost/v1" /* v1 */,
|
|
367
|
+
sdkVersion: UNIFORM_MESH_SDK_VERSION,
|
|
371
368
|
key,
|
|
372
369
|
data,
|
|
373
370
|
id: randomInsecureId(),
|
|
@@ -409,6 +406,7 @@ var SharedClient = class {
|
|
|
409
406
|
const message = serialize({
|
|
410
407
|
type: "channel_init" /* CHANNEL_INIT */,
|
|
411
408
|
apiVersion: "framepost/v1" /* v1 */,
|
|
409
|
+
sdkVersion: UNIFORM_MESH_SDK_VERSION,
|
|
412
410
|
key: "",
|
|
413
411
|
data: context,
|
|
414
412
|
id: randomInsecureId()
|
|
@@ -452,7 +450,8 @@ var ChildClient = class extends SharedClient {
|
|
|
452
450
|
// src/sdkComms.ts
|
|
453
451
|
async function connectToParent({
|
|
454
452
|
dialogResponseHandlers,
|
|
455
|
-
onMetadataUpdated
|
|
453
|
+
onMetadataUpdated,
|
|
454
|
+
onValueExternallyUpdated
|
|
456
455
|
}) {
|
|
457
456
|
const client = new ChildClient({ debug: false });
|
|
458
457
|
window.parent.postMessage("parents just don't understand", "*");
|
|
@@ -470,6 +469,7 @@ async function connectToParent({
|
|
|
470
469
|
delete dialogResponseHandlers[data.dialogId];
|
|
471
470
|
});
|
|
472
471
|
client.onRequest("metadata-value", onMetadataUpdated);
|
|
472
|
+
client.onRequest("external-value-update", onValueExternallyUpdated);
|
|
473
473
|
return {
|
|
474
474
|
initData,
|
|
475
475
|
parent: {
|
|
@@ -655,6 +655,10 @@ async function initializeUniformMeshSDK({
|
|
|
655
655
|
console.debug("Received metadata update", newMeta);
|
|
656
656
|
currentMetadata = typedNewMeta;
|
|
657
657
|
events.emit("onMetadataChanged", { newValue: newMeta });
|
|
658
|
+
},
|
|
659
|
+
onValueExternallyUpdated: (newValue) => {
|
|
660
|
+
console.debug("Received external value update", newValue);
|
|
661
|
+
events.emit("onValueChanged", { newValue });
|
|
658
662
|
}
|
|
659
663
|
});
|
|
660
664
|
const { initData: contextData, parent } = connectResult;
|
|
@@ -788,8 +792,7 @@ async function initializeUniformMeshSDK({
|
|
|
788
792
|
|
|
789
793
|
// src/user.ts
|
|
790
794
|
var hasPermissions = (permissions, user) => {
|
|
791
|
-
if (user.isAdmin)
|
|
792
|
-
return true;
|
|
795
|
+
if (user.isAdmin) return true;
|
|
793
796
|
if (Array.isArray(permissions)) {
|
|
794
797
|
return permissions.every((permission) => user.permissions.includes(permission));
|
|
795
798
|
} else {
|
|
@@ -797,8 +800,7 @@ var hasPermissions = (permissions, user) => {
|
|
|
797
800
|
}
|
|
798
801
|
};
|
|
799
802
|
var hasRole = (role, user) => {
|
|
800
|
-
if (user.isAdmin)
|
|
801
|
-
return true;
|
|
803
|
+
if (user.isAdmin) return true;
|
|
802
804
|
return user.roles.some((userRole) => userRole.name === role || userRole.id === role);
|
|
803
805
|
};
|
|
804
806
|
export {
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,9 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __typeError = (msg) => {
|
|
9
|
+
throw TypeError(msg);
|
|
10
|
+
};
|
|
8
11
|
var __export = (target, all) => {
|
|
9
12
|
for (var name in all)
|
|
10
13
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -26,19 +29,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
29
|
mod
|
|
27
30
|
));
|
|
28
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var __accessCheck = (obj, member, msg) =>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
};
|
|
33
|
-
var __privateGet = (obj, member, getter) => {
|
|
34
|
-
__accessCheck(obj, member, "read from private field");
|
|
35
|
-
return getter ? getter.call(obj) : member.get(obj);
|
|
36
|
-
};
|
|
37
|
-
var __privateAdd = (obj, member, value) => {
|
|
38
|
-
if (member.has(obj))
|
|
39
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
40
|
-
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
41
|
-
};
|
|
32
|
+
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
33
|
+
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
34
|
+
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
42
35
|
|
|
43
36
|
// src/index.ts
|
|
44
37
|
var src_exports = {};
|
|
@@ -158,6 +151,9 @@ var getLogger = (prefix, debug) => {
|
|
|
158
151
|
}
|
|
159
152
|
};
|
|
160
153
|
|
|
154
|
+
// src/temp/version.ts
|
|
155
|
+
var UNIFORM_MESH_SDK_VERSION = "19.185.0";
|
|
156
|
+
|
|
161
157
|
// src/framepost/constants.ts
|
|
162
158
|
var DEFAULT_REQUEST_TIMEOUT = 5e3;
|
|
163
159
|
|
|
@@ -407,6 +403,7 @@ var SharedClient = class {
|
|
|
407
403
|
const message = serialize({
|
|
408
404
|
type,
|
|
409
405
|
apiVersion: "framepost/v1" /* v1 */,
|
|
406
|
+
sdkVersion: UNIFORM_MESH_SDK_VERSION,
|
|
410
407
|
key,
|
|
411
408
|
data,
|
|
412
409
|
id: randomInsecureId(),
|
|
@@ -448,6 +445,7 @@ var SharedClient = class {
|
|
|
448
445
|
const message = serialize({
|
|
449
446
|
type: "channel_init" /* CHANNEL_INIT */,
|
|
450
447
|
apiVersion: "framepost/v1" /* v1 */,
|
|
448
|
+
sdkVersion: UNIFORM_MESH_SDK_VERSION,
|
|
451
449
|
key: "",
|
|
452
450
|
data: context,
|
|
453
451
|
id: randomInsecureId()
|
|
@@ -491,7 +489,8 @@ var ChildClient = class extends SharedClient {
|
|
|
491
489
|
// src/sdkComms.ts
|
|
492
490
|
async function connectToParent({
|
|
493
491
|
dialogResponseHandlers,
|
|
494
|
-
onMetadataUpdated
|
|
492
|
+
onMetadataUpdated,
|
|
493
|
+
onValueExternallyUpdated
|
|
495
494
|
}) {
|
|
496
495
|
const client = new ChildClient({ debug: false });
|
|
497
496
|
window.parent.postMessage("parents just don't understand", "*");
|
|
@@ -509,6 +508,7 @@ async function connectToParent({
|
|
|
509
508
|
delete dialogResponseHandlers[data.dialogId];
|
|
510
509
|
});
|
|
511
510
|
client.onRequest("metadata-value", onMetadataUpdated);
|
|
511
|
+
client.onRequest("external-value-update", onValueExternallyUpdated);
|
|
512
512
|
return {
|
|
513
513
|
initData,
|
|
514
514
|
parent: {
|
|
@@ -694,6 +694,10 @@ async function initializeUniformMeshSDK({
|
|
|
694
694
|
console.debug("Received metadata update", newMeta);
|
|
695
695
|
currentMetadata = typedNewMeta;
|
|
696
696
|
events.emit("onMetadataChanged", { newValue: newMeta });
|
|
697
|
+
},
|
|
698
|
+
onValueExternallyUpdated: (newValue) => {
|
|
699
|
+
console.debug("Received external value update", newValue);
|
|
700
|
+
events.emit("onValueChanged", { newValue });
|
|
697
701
|
}
|
|
698
702
|
});
|
|
699
703
|
const { initData: contextData, parent } = connectResult;
|
|
@@ -827,8 +831,7 @@ async function initializeUniformMeshSDK({
|
|
|
827
831
|
|
|
828
832
|
// src/user.ts
|
|
829
833
|
var hasPermissions = (permissions, user) => {
|
|
830
|
-
if (user.isAdmin)
|
|
831
|
-
return true;
|
|
834
|
+
if (user.isAdmin) return true;
|
|
832
835
|
if (Array.isArray(permissions)) {
|
|
833
836
|
return permissions.every((permission) => user.permissions.includes(permission));
|
|
834
837
|
} else {
|
|
@@ -836,8 +839,7 @@ var hasPermissions = (permissions, user) => {
|
|
|
836
839
|
}
|
|
837
840
|
};
|
|
838
841
|
var hasRole = (role, user) => {
|
|
839
|
-
if (user.isAdmin)
|
|
840
|
-
return true;
|
|
842
|
+
if (user.isAdmin) return true;
|
|
841
843
|
return user.roles.some((userRole) => userRole.name === role || userRole.id === role);
|
|
842
844
|
};
|
|
843
845
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/index.mjs
CHANGED
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
throw TypeError("Cannot " + msg);
|
|
4
|
-
};
|
|
5
|
-
var __privateGet = (obj, member, getter) => {
|
|
6
|
-
__accessCheck(obj, member, "read from private field");
|
|
7
|
-
return getter ? getter.call(obj) : member.get(obj);
|
|
8
|
-
};
|
|
9
|
-
var __privateAdd = (obj, member, value) => {
|
|
10
|
-
if (member.has(obj))
|
|
11
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
12
|
-
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
1
|
+
var __typeError = (msg) => {
|
|
2
|
+
throw TypeError(msg);
|
|
13
3
|
};
|
|
4
|
+
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
5
|
+
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
6
|
+
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
14
7
|
|
|
15
8
|
// src/clients/IntegrationDefinitionClient.ts
|
|
16
9
|
import { ApiClient } from "@uniformdev/context/api";
|
|
@@ -119,6 +112,9 @@ var getLogger = (prefix, debug) => {
|
|
|
119
112
|
}
|
|
120
113
|
};
|
|
121
114
|
|
|
115
|
+
// src/temp/version.ts
|
|
116
|
+
var UNIFORM_MESH_SDK_VERSION = "19.185.0";
|
|
117
|
+
|
|
122
118
|
// src/framepost/constants.ts
|
|
123
119
|
var DEFAULT_REQUEST_TIMEOUT = 5e3;
|
|
124
120
|
|
|
@@ -368,6 +364,7 @@ var SharedClient = class {
|
|
|
368
364
|
const message = serialize({
|
|
369
365
|
type,
|
|
370
366
|
apiVersion: "framepost/v1" /* v1 */,
|
|
367
|
+
sdkVersion: UNIFORM_MESH_SDK_VERSION,
|
|
371
368
|
key,
|
|
372
369
|
data,
|
|
373
370
|
id: randomInsecureId(),
|
|
@@ -409,6 +406,7 @@ var SharedClient = class {
|
|
|
409
406
|
const message = serialize({
|
|
410
407
|
type: "channel_init" /* CHANNEL_INIT */,
|
|
411
408
|
apiVersion: "framepost/v1" /* v1 */,
|
|
409
|
+
sdkVersion: UNIFORM_MESH_SDK_VERSION,
|
|
412
410
|
key: "",
|
|
413
411
|
data: context,
|
|
414
412
|
id: randomInsecureId()
|
|
@@ -452,7 +450,8 @@ var ChildClient = class extends SharedClient {
|
|
|
452
450
|
// src/sdkComms.ts
|
|
453
451
|
async function connectToParent({
|
|
454
452
|
dialogResponseHandlers,
|
|
455
|
-
onMetadataUpdated
|
|
453
|
+
onMetadataUpdated,
|
|
454
|
+
onValueExternallyUpdated
|
|
456
455
|
}) {
|
|
457
456
|
const client = new ChildClient({ debug: false });
|
|
458
457
|
window.parent.postMessage("parents just don't understand", "*");
|
|
@@ -470,6 +469,7 @@ async function connectToParent({
|
|
|
470
469
|
delete dialogResponseHandlers[data.dialogId];
|
|
471
470
|
});
|
|
472
471
|
client.onRequest("metadata-value", onMetadataUpdated);
|
|
472
|
+
client.onRequest("external-value-update", onValueExternallyUpdated);
|
|
473
473
|
return {
|
|
474
474
|
initData,
|
|
475
475
|
parent: {
|
|
@@ -655,6 +655,10 @@ async function initializeUniformMeshSDK({
|
|
|
655
655
|
console.debug("Received metadata update", newMeta);
|
|
656
656
|
currentMetadata = typedNewMeta;
|
|
657
657
|
events.emit("onMetadataChanged", { newValue: newMeta });
|
|
658
|
+
},
|
|
659
|
+
onValueExternallyUpdated: (newValue) => {
|
|
660
|
+
console.debug("Received external value update", newValue);
|
|
661
|
+
events.emit("onValueChanged", { newValue });
|
|
658
662
|
}
|
|
659
663
|
});
|
|
660
664
|
const { initData: contextData, parent } = connectResult;
|
|
@@ -788,8 +792,7 @@ async function initializeUniformMeshSDK({
|
|
|
788
792
|
|
|
789
793
|
// src/user.ts
|
|
790
794
|
var hasPermissions = (permissions, user) => {
|
|
791
|
-
if (user.isAdmin)
|
|
792
|
-
return true;
|
|
795
|
+
if (user.isAdmin) return true;
|
|
793
796
|
if (Array.isArray(permissions)) {
|
|
794
797
|
return permissions.every((permission) => user.permissions.includes(permission));
|
|
795
798
|
} else {
|
|
@@ -797,8 +800,7 @@ var hasPermissions = (permissions, user) => {
|
|
|
797
800
|
}
|
|
798
801
|
};
|
|
799
802
|
var hasRole = (role, user) => {
|
|
800
|
-
if (user.isAdmin)
|
|
801
|
-
return true;
|
|
803
|
+
if (user.isAdmin) return true;
|
|
802
804
|
return user.roles.some((userRole) => userRole.name === role || userRole.id === role);
|
|
803
805
|
};
|
|
804
806
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/mesh-sdk",
|
|
3
|
-
"version": "19.135.1-alpha.
|
|
3
|
+
"version": "19.135.1-alpha.12+5743153a1e",
|
|
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
|
-
"
|
|
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.135.1-alpha.
|
|
37
|
-
"@uniformdev/context": "19.135.1-alpha.
|
|
38
|
-
"@uniformdev/project-map": "19.135.1-alpha.
|
|
37
|
+
"@uniformdev/canvas": "19.135.1-alpha.12+5743153a1e",
|
|
38
|
+
"@uniformdev/context": "19.135.1-alpha.12+5743153a1e",
|
|
39
|
+
"@uniformdev/project-map": "19.135.1-alpha.12+5743153a1e",
|
|
39
40
|
"imagesloaded": "^5.0.0",
|
|
40
|
-
"mitt": "^3.0.
|
|
41
|
+
"mitt": "^3.0.1"
|
|
41
42
|
},
|
|
42
43
|
"devDependencies": {
|
|
43
44
|
"@types/imagesloaded": "^4.1.2"
|
|
44
45
|
},
|
|
45
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "5743153a1e4308de3dfe7c0812eb493154421a71"
|
|
46
47
|
}
|