@uniformdev/mesh-sdk 19.112.1-alpha.2 → 19.114.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.mts +55 -123
- package/dist/index.d.ts +55 -123
- package/dist/index.esm.js +0 -18
- package/dist/index.js +0 -20
- package/dist/index.mjs +0 -18
- package/package.json +6 -8
package/dist/index.d.mts
CHANGED
|
@@ -32,7 +32,6 @@ interface paths$1 {
|
|
|
32
32
|
/** @enum {string} */
|
|
33
33
|
category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "uniform" | "ai" | "unknown";
|
|
34
34
|
public?: boolean;
|
|
35
|
-
scopes?: string[];
|
|
36
35
|
baseLocationUrl?: string;
|
|
37
36
|
locations: {
|
|
38
37
|
install?: {
|
|
@@ -184,7 +183,6 @@ interface paths$1 {
|
|
|
184
183
|
/** @enum {string} */
|
|
185
184
|
category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "uniform" | "ai" | "unknown";
|
|
186
185
|
public?: boolean;
|
|
187
|
-
scopes?: string[];
|
|
188
186
|
baseLocationUrl?: string;
|
|
189
187
|
locations: {
|
|
190
188
|
install?: {
|
|
@@ -335,7 +333,6 @@ interface paths$1 {
|
|
|
335
333
|
badgeIconUrl?: string;
|
|
336
334
|
/** @enum {string} */
|
|
337
335
|
category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "uniform" | "ai" | "unknown";
|
|
338
|
-
scopes?: string[];
|
|
339
336
|
baseLocationUrl?: string;
|
|
340
337
|
locations: {
|
|
341
338
|
install?: {
|
|
@@ -735,7 +732,6 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
|
735
732
|
badgeIconUrl?: string | undefined;
|
|
736
733
|
category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "uniform" | "ai" | "unknown" | undefined;
|
|
737
734
|
public?: boolean | undefined;
|
|
738
|
-
scopes?: string[] | undefined;
|
|
739
735
|
baseLocationUrl?: string | undefined;
|
|
740
736
|
locations: {
|
|
741
737
|
install?: {
|
|
@@ -880,11 +876,19 @@ declare class IntegrationInstallationClient extends ApiClient {
|
|
|
880
876
|
remove(body: ExceptProject<IntegrationInstallationDeleteParameters>): Promise<void>;
|
|
881
877
|
}
|
|
882
878
|
|
|
883
|
-
type AssetLibraryLocationMetadata<TIntegrationConfiguration = unknown> =
|
|
879
|
+
type AssetLibraryLocationMetadata<TIntegrationConfiguration = unknown> = {
|
|
880
|
+
/** Settings defined at the integration level (arbitrary type used on settings location) */
|
|
881
|
+
settings: TIntegrationConfiguration;
|
|
882
|
+
/** The Uniform project ID */
|
|
883
|
+
projectId: string;
|
|
884
884
|
/** The current Uniform integration source ID */
|
|
885
885
|
sourceId: string;
|
|
886
|
-
}
|
|
887
|
-
type AssetParameterLocationMetadata<TIntegrationConfiguration = unknown> =
|
|
886
|
+
};
|
|
887
|
+
type AssetParameterLocationMetadata<TIntegrationConfiguration = unknown> = {
|
|
888
|
+
/** Settings defined at the integration level (arbitrary type used on settings location) */
|
|
889
|
+
settings: TIntegrationConfiguration;
|
|
890
|
+
/** The Uniform project ID */
|
|
891
|
+
projectId: string;
|
|
888
892
|
/** The current Uniform integration source ID */
|
|
889
893
|
sourceId: string;
|
|
890
894
|
/** The resolved data if this source is connected to a data resource */
|
|
@@ -895,7 +899,7 @@ type AssetParameterLocationMetadata<TIntegrationConfiguration = unknown> = Commo
|
|
|
895
899
|
* Default: 1
|
|
896
900
|
*/
|
|
897
901
|
maxAssets?: number;
|
|
898
|
-
}
|
|
902
|
+
};
|
|
899
903
|
type AssetLibraryLocation = MeshLocationCore<unknown, AssetLibraryLocationMetadata, unknown, 'assetLibrary'> & GetDataResourceLocation;
|
|
900
904
|
type AssetParameterLocation = MeshLocationCore<AssetParamValue, AssetParameterLocationMetadata, AssetParamValue, 'assetParameter'> & GetDataResourceLocation;
|
|
901
905
|
|
|
@@ -904,7 +908,11 @@ type DataConnectorInfo = {
|
|
|
904
908
|
type: string;
|
|
905
909
|
displayName: string;
|
|
906
910
|
};
|
|
907
|
-
type DataTypeLocationMetadata<TIntegrationConfiguration = unknown> =
|
|
911
|
+
type DataTypeLocationMetadata<TIntegrationConfiguration = unknown> = {
|
|
912
|
+
/** Settings defined at the integration level (arbitrary type used on settings location) */
|
|
913
|
+
settings: TIntegrationConfiguration;
|
|
914
|
+
/** The Uniform project ID */
|
|
915
|
+
projectId: string;
|
|
908
916
|
/**
|
|
909
917
|
* The current data type's data source. NOTE: param and header values are not available in this context.
|
|
910
918
|
*/
|
|
@@ -913,10 +921,13 @@ type DataTypeLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetad
|
|
|
913
921
|
dataConnector: DataConnectorInfo;
|
|
914
922
|
/** The data type's archetype value. */
|
|
915
923
|
archetype: string;
|
|
916
|
-
}
|
|
924
|
+
};
|
|
917
925
|
type DataTypeLocation = MeshLocationCore<DataTypeLocationValue, DataTypeLocationMetadata, DataTypeLocationValue, 'dataType'> & GetDataResourceLocation;
|
|
918
926
|
|
|
919
|
-
type DataResourceLocationMetadata<TIntegrationConfiguration = unknown> =
|
|
927
|
+
type DataResourceLocationMetadata<TIntegrationConfiguration = unknown> = {
|
|
928
|
+
/** Settings defined at the integration level (arbitrary type used on settings location) */
|
|
929
|
+
settings: TIntegrationConfiguration;
|
|
930
|
+
/** The current data resource's data type */
|
|
920
931
|
dataType: DataType;
|
|
921
932
|
/** The data type's archetype value. */
|
|
922
933
|
archetype: string;
|
|
@@ -926,21 +937,32 @@ type DataResourceLocationMetadata<TIntegrationConfiguration = unknown> = CommonM
|
|
|
926
937
|
dataSource: DataSource;
|
|
927
938
|
/** The data connector type of the current data resource's data source */
|
|
928
939
|
dataConnector: DataConnectorInfo;
|
|
940
|
+
/** The Uniform project ID */
|
|
941
|
+
projectId: string;
|
|
929
942
|
/** Current dynamic inputs that are configured on the composition (if any). */
|
|
930
943
|
dynamicInputs: DynamicInputs;
|
|
931
|
-
}
|
|
944
|
+
};
|
|
932
945
|
type DataResourceLocation = MeshLocationCore<DataResourceVariables, DataResourceLocationMetadata, DataResourceVariables, 'dataResource'> & GetDataResourceLocation;
|
|
933
946
|
|
|
934
947
|
type DataSourceLocationValue = Pick<DataSource, 'baseUrl' | 'custom' | 'customPublic' | 'headers' | 'parameters' | 'variables'>;
|
|
935
|
-
type DataSourceLocationMetadata<TIntegrationConfiguration = unknown> =
|
|
948
|
+
type DataSourceLocationMetadata<TIntegrationConfiguration = unknown> = {
|
|
949
|
+
/** Settings defined at the integration level (arbitrary type used on settings location) */
|
|
950
|
+
settings: TIntegrationConfiguration;
|
|
951
|
+
/** The Uniform project ID */
|
|
952
|
+
projectId: string;
|
|
953
|
+
};
|
|
936
954
|
type DataSourceLocation = MeshLocationCore<DataSourceLocationValue, DataSourceLocationMetadata, DataSourceLocationValue, 'dataSource'>;
|
|
937
955
|
|
|
938
|
-
type ParamTypeLocationMetadata<TParamConfiguration = unknown, TIntegrationConfiguration = unknown> =
|
|
956
|
+
type ParamTypeLocationMetadata<TParamConfiguration = unknown, TIntegrationConfiguration = unknown> = {
|
|
939
957
|
rootNode: Omit<RootComponentInstance, 'slots' | '_data'>;
|
|
940
958
|
parameterConfiguration: TParamConfiguration;
|
|
941
959
|
component: Omit<ComponentInstance, 'slots'>;
|
|
942
960
|
componentDefinitions: Record<string, ComponentDefinition | undefined>;
|
|
943
961
|
parameterDefinition: ComponentDefinitionParameter;
|
|
962
|
+
/** Settings defined at the integration level (arbitrary type used on settings location) */
|
|
963
|
+
settings: TIntegrationConfiguration;
|
|
964
|
+
/** The Uniform project ID */
|
|
965
|
+
projectId: string;
|
|
944
966
|
/**
|
|
945
967
|
* Current dynamic inputs that are configured on the composition (if any).
|
|
946
968
|
* Use the <ParamTypeDynamicDataProvider> to wire up dynamic data in your parameter.
|
|
@@ -962,7 +984,7 @@ type ParamTypeLocationMetadata<TParamConfiguration = unknown, TIntegrationConfig
|
|
|
962
984
|
* Note that setValue() always sets the target language automatically.
|
|
963
985
|
*/
|
|
964
986
|
targetLocale: string | undefined;
|
|
965
|
-
}
|
|
987
|
+
};
|
|
966
988
|
type ParamTypeLocation<TParamValue = unknown, TParamConfiguration = unknown, TParamSetValue = TParamValue, TIntegrationConfiguration = unknown> = MeshLocationCore<TParamValue | undefined, ParamTypeLocationMetadata<TParamConfiguration, TIntegrationConfiguration>, TParamSetValue, 'paramType'> & {
|
|
967
989
|
/**
|
|
968
990
|
* Opens a dialog on the Uniform platform to edit or select a dynamic token to connect to.
|
|
@@ -971,7 +993,9 @@ type ParamTypeLocation<TParamValue = unknown, TParamConfiguration = unknown, TPa
|
|
|
971
993
|
editConnectedData: Awaited<ReturnType<typeof connectToParent>>['parent']['editConnectedData'];
|
|
972
994
|
};
|
|
973
995
|
|
|
974
|
-
type SettingsLocationMetadata =
|
|
996
|
+
type SettingsLocationMetadata = {
|
|
997
|
+
projectId: string;
|
|
998
|
+
};
|
|
975
999
|
type SettingsLocation<TSettingsType> = MeshLocationCore<TSettingsType, SettingsLocationMetadata, TSettingsType, 'settings'>;
|
|
976
1000
|
|
|
977
1001
|
/**
|
|
@@ -1102,22 +1126,6 @@ type EditConnectedDataResponse = {
|
|
|
1102
1126
|
canceled: true;
|
|
1103
1127
|
editorCancelledContext: EditConnectedDataResponseCancellationContext;
|
|
1104
1128
|
};
|
|
1105
|
-
type UniformUser = {
|
|
1106
|
-
/** Permissions the user has as per Team Admin assigned, can be used to do conditional rendering */
|
|
1107
|
-
permissions: MeshLocationUserPermissions[];
|
|
1108
|
-
/** Permissions the user has as per Team Admin created and assigned, can be used to do conditional rendering */
|
|
1109
|
-
roles: {
|
|
1110
|
-
id: string;
|
|
1111
|
-
name: string;
|
|
1112
|
-
}[];
|
|
1113
|
-
/** Name of the user assigned by Team Admin. Unless your Mesh integration was given permissions to expose User Name - it is not available */
|
|
1114
|
-
name?: string;
|
|
1115
|
-
/** Email of the user used to sign in. Unless your Mesh integration was given permissions to expose User Name - it is not available */
|
|
1116
|
-
email?: string;
|
|
1117
|
-
/** Unique ID of the user */
|
|
1118
|
-
id: string;
|
|
1119
|
-
isAdmin: boolean;
|
|
1120
|
-
};
|
|
1121
1129
|
|
|
1122
1130
|
type MeshSDKEventInterface = Awaited<ReturnType<typeof connectToParent>>['parent'] & {
|
|
1123
1131
|
initialize: () => Promise<MeshContextData>;
|
|
@@ -1180,84 +1188,6 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
|
|
|
1180
1188
|
returnDialogValue: (value: unknown) => Promise<void>;
|
|
1181
1189
|
};
|
|
1182
1190
|
}
|
|
1183
|
-
/** Common metadata for all mesh locations */
|
|
1184
|
-
type CommonMetadata<ExtendedMetadata = unknown, TIntegrationConfiguration = unknown> = {
|
|
1185
|
-
/** The current Uniform user context. Contains name, email and context to check for permissions */
|
|
1186
|
-
user: UniformUser;
|
|
1187
|
-
/** Current Uniform Project ID */
|
|
1188
|
-
projectId: string;
|
|
1189
|
-
/** Settings defined at the integration level (arbitrary type used on settings location) */
|
|
1190
|
-
settings: TIntegrationConfiguration;
|
|
1191
|
-
} & ExtendedMetadata;
|
|
1192
|
-
type MeshLocationUserPermissions =
|
|
1193
|
-
/** Uniform Context:Enrichments:Create */
|
|
1194
|
-
'ENRICHMENTS_CREATE'
|
|
1195
|
-
/** Uniform Context:Enrichments:Update */
|
|
1196
|
-
| 'ENRICHMENTS_UPDATE'
|
|
1197
|
-
/** Uniform Context:Enrichments:Delete */
|
|
1198
|
-
| 'ENRICHMENTS_DELETE'
|
|
1199
|
-
/** Uniform Context:Intents & Audiences:Create */
|
|
1200
|
-
| 'INTENTS_CREATE'
|
|
1201
|
-
/** Uniform Context:Intents & Audiences:Update */
|
|
1202
|
-
| 'INTENTS_UPDATE'
|
|
1203
|
-
/** Uniform Context:Intents & Audiences:Delete */
|
|
1204
|
-
| 'INTENTS_DELETE'
|
|
1205
|
-
/** Uniform Context:Quirks:Create */
|
|
1206
|
-
| 'QUIRKS_CREATE'
|
|
1207
|
-
/** Uniform Context:Quirks:Update| */
|
|
1208
|
-
| 'QUIRKS_UPDATE'
|
|
1209
|
-
/** Uniform Context:Quirks:Delete */
|
|
1210
|
-
| 'QUIRKS_DELETE'
|
|
1211
|
-
/** Uniform Context:Signals:Create */
|
|
1212
|
-
| 'SIGNALS_CREATE'
|
|
1213
|
-
/** Uniform Context:Signals:Update */
|
|
1214
|
-
| 'SIGNALS_UPDATE'
|
|
1215
|
-
/** Uniform Context:Signals:Delete */
|
|
1216
|
-
| 'SIGNALS_DELETE'
|
|
1217
|
-
/** Uniform Context:Tests:Create */
|
|
1218
|
-
| 'TESTS_CREATE'
|
|
1219
|
-
/** Uniform Context:Tests:Update|Declare winners and close existing tests. */
|
|
1220
|
-
| 'TESTS_UPDATE'
|
|
1221
|
-
/** Uniform Context:Tests:Delete */
|
|
1222
|
-
| 'TESTS_DELETE'
|
|
1223
|
-
/** Uniform Context:Manifest:Read|Read the published manifest */
|
|
1224
|
-
| 'MANIFEST_READ'
|
|
1225
|
-
/** Uniform Context:Manifest:Publish|Publish the manifest */
|
|
1226
|
-
| 'MANIFEST_PUBLISH'
|
|
1227
|
-
/** Uniform Context:Read Drafts|Read all drafts and preview manifest */
|
|
1228
|
-
| 'MANIFEST_READ_DRAFT'
|
|
1229
|
-
/** Uniform Canvas:Project Map:Manage|Create, update, and delete Project Maps and nodes in Project Map trees. */
|
|
1230
|
-
| 'PROJECT_MAP_MANAGE'
|
|
1231
|
-
/** General:Read Project|See the project in the team dashboard. */
|
|
1232
|
-
| 'PROJECT_READ'
|
|
1233
|
-
/** Uniform Canvas:Redirects:Advanced|Grants access to advanced redirect features and options. */
|
|
1234
|
-
| 'REDIRECTS_ADVANCED'
|
|
1235
|
-
/** Uniform Canvas:Redirects:Create */
|
|
1236
|
-
| 'REDIRECTS_CREATE'
|
|
1237
|
-
/** Uniform Canvas:Redirects:Update */
|
|
1238
|
-
| 'REDIRECTS_UPDATE'
|
|
1239
|
-
/** Uniform Canvas:Redirects:Delete */
|
|
1240
|
-
| 'REDIRECTS_DELETE'
|
|
1241
|
-
/** Uniform Canvas:Data Sources:Manage|Create, update, and delete data sources. */
|
|
1242
|
-
| 'DATA_SOURCES_MANAGE'
|
|
1243
|
-
/** Uniform Canvas:Data Types:Manage|Create, update, and delete data types. */
|
|
1244
|
-
| 'DATA_TYPES_MANAGE'
|
|
1245
|
-
/** Uniform Canvas:Compositions:Create */
|
|
1246
|
-
| 'COMPOSITIONS_CREATE'
|
|
1247
|
-
/** Uniform Canvas:Compositions:Update */
|
|
1248
|
-
| 'COMPOSITIONS_WRITE'
|
|
1249
|
-
/** Uniform Canvas:Compositions:Delete */
|
|
1250
|
-
| 'COMPOSITIONS_DELETE'
|
|
1251
|
-
/** Uniform Canvas:Compositions:Read Published */
|
|
1252
|
-
| 'COMPOSITIONS_READ'
|
|
1253
|
-
/** Uniform Canvas:Compositions:Publish */
|
|
1254
|
-
| 'COMPOSITIONS_PUBLISH'
|
|
1255
|
-
/** Uniform Canvas::Read|Includes read access to all canvas assets */
|
|
1256
|
-
| 'COMPOSITIONS_READ_DRAFT'
|
|
1257
|
-
/** Uniform Canvas:Component Library:Manage|Create, update, and delete component library data */
|
|
1258
|
-
| 'COMPOSITIONS_MANAGE_SCHEMA'
|
|
1259
|
-
/** UTM Mapper:Read|Read UTM mapper configuration */
|
|
1260
|
-
| 'UTM_PUB';
|
|
1261
1191
|
/**
|
|
1262
1192
|
* Known location types that can be passed to a mesh location
|
|
1263
1193
|
*/
|
|
@@ -1287,23 +1217,31 @@ type DynamicInput = {
|
|
|
1287
1217
|
/** Record of dynamic inputs keyed by the input name */
|
|
1288
1218
|
type DynamicInputs = Record<string, DynamicInput>;
|
|
1289
1219
|
|
|
1290
|
-
type AIGenerateLocationMetadata<TIntegrationConfiguration = unknown> =
|
|
1220
|
+
type AIGenerateLocationMetadata<TIntegrationConfiguration = unknown> = {
|
|
1221
|
+
/** Settings defined at the integration level (arbitrary type used on settings location) */
|
|
1222
|
+
settings: TIntegrationConfiguration;
|
|
1223
|
+
/** The Uniform project ID */
|
|
1224
|
+
projectId: string;
|
|
1291
1225
|
prompt: string;
|
|
1292
1226
|
promptMetadata: Record<string, unknown>;
|
|
1293
1227
|
/** Useful to differentiate AI Generate UI between text and image */
|
|
1294
1228
|
promptOutputType: 'text' | 'image';
|
|
1295
|
-
}
|
|
1296
|
-
type PromptSettingsLocationMetadata<TIntegrationConfiguration = unknown> =
|
|
1229
|
+
};
|
|
1230
|
+
type PromptSettingsLocationMetadata<TIntegrationConfiguration = unknown> = {
|
|
1231
|
+
settings: TIntegrationConfiguration;
|
|
1297
1232
|
/** Useful to differentiate metadata settings between text and image generation */
|
|
1298
1233
|
promptOutputType: 'text' | 'image';
|
|
1299
|
-
}
|
|
1234
|
+
};
|
|
1300
1235
|
type AIGenerateLocation<TType> = MeshLocationCore<TType, AIGenerateLocationMetadata, TType, 'aiGenerate'>;
|
|
1301
1236
|
type AIPromptMetadataLocation = MeshLocationCore<Record<string, unknown>, PromptSettingsLocationMetadata, Record<string, unknown>, 'aiMetadata'>;
|
|
1302
1237
|
|
|
1303
|
-
type ParamTypeConfigLocationMetadata<TIntegrationConfiguration = unknown> =
|
|
1238
|
+
type ParamTypeConfigLocationMetadata<TIntegrationConfiguration = unknown> = {
|
|
1239
|
+
/** Settings defined at the integration level (arbitrary type used on settings location) */
|
|
1240
|
+
settings: TIntegrationConfiguration;
|
|
1304
1241
|
/** The Uniform project ID */
|
|
1242
|
+
projectId: string;
|
|
1305
1243
|
componentDefinition: ComponentDefinition;
|
|
1306
|
-
}
|
|
1244
|
+
};
|
|
1307
1245
|
type ParamTypeConfigLocation<TParamValue = unknown, TIntegrationConfiguration = unknown> = MeshLocationCore<TParamValue | undefined, ParamTypeConfigLocationMetadata<TIntegrationConfiguration>, TParamValue, 'paramTypeConfig'>;
|
|
1308
1246
|
|
|
1309
1247
|
interface SdkWindow {
|
|
@@ -1403,10 +1341,4 @@ declare function initializeUniformMeshSDK({ autoResizingDisabled, }?: {
|
|
|
1403
1341
|
autoResizingDisabled?: boolean;
|
|
1404
1342
|
}): Promise<UniformMeshSDK | undefined>;
|
|
1405
1343
|
|
|
1406
|
-
|
|
1407
|
-
/**
|
|
1408
|
-
* Check if user has a role by both name and id
|
|
1409
|
-
*/
|
|
1410
|
-
declare const hasRole: (role: string, user: UniformUser) => boolean;
|
|
1411
|
-
|
|
1412
|
-
export { type AIGenerateLocation, type AIGenerateLocationMetadata, type AIPromptMetadataLocation, type AssetLibraryLocation, type AssetLibraryLocationMetadata, type AssetParameterLocation, type AssetParameterLocationMetadata, type BindableTypes, type CSSHeight, 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 };
|
|
1344
|
+
export { type AIGenerateLocation, type AIGenerateLocationMetadata, type AIPromptMetadataLocation, type AssetLibraryLocation, type AssetLibraryLocationMetadata, type AssetParameterLocation, type AssetParameterLocationMetadata, type BindableTypes, type CSSHeight, type CloseDialogMessage, type CloseLocationDialogOptions, 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 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 ValidationResult, initializeUniformMeshSDK };
|
package/dist/index.d.ts
CHANGED
|
@@ -32,7 +32,6 @@ interface paths$1 {
|
|
|
32
32
|
/** @enum {string} */
|
|
33
33
|
category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "uniform" | "ai" | "unknown";
|
|
34
34
|
public?: boolean;
|
|
35
|
-
scopes?: string[];
|
|
36
35
|
baseLocationUrl?: string;
|
|
37
36
|
locations: {
|
|
38
37
|
install?: {
|
|
@@ -184,7 +183,6 @@ interface paths$1 {
|
|
|
184
183
|
/** @enum {string} */
|
|
185
184
|
category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "uniform" | "ai" | "unknown";
|
|
186
185
|
public?: boolean;
|
|
187
|
-
scopes?: string[];
|
|
188
186
|
baseLocationUrl?: string;
|
|
189
187
|
locations: {
|
|
190
188
|
install?: {
|
|
@@ -335,7 +333,6 @@ interface paths$1 {
|
|
|
335
333
|
badgeIconUrl?: string;
|
|
336
334
|
/** @enum {string} */
|
|
337
335
|
category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "uniform" | "ai" | "unknown";
|
|
338
|
-
scopes?: string[];
|
|
339
336
|
baseLocationUrl?: string;
|
|
340
337
|
locations: {
|
|
341
338
|
install?: {
|
|
@@ -735,7 +732,6 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
|
735
732
|
badgeIconUrl?: string | undefined;
|
|
736
733
|
category?: "analytics" | "cdn" | "classic" | "commerce" | "content" | "comingSoon" | "data" | "deprecated" | "email" | "framework" | "search" | "starters" | "uniform" | "ai" | "unknown" | undefined;
|
|
737
734
|
public?: boolean | undefined;
|
|
738
|
-
scopes?: string[] | undefined;
|
|
739
735
|
baseLocationUrl?: string | undefined;
|
|
740
736
|
locations: {
|
|
741
737
|
install?: {
|
|
@@ -880,11 +876,19 @@ declare class IntegrationInstallationClient extends ApiClient {
|
|
|
880
876
|
remove(body: ExceptProject<IntegrationInstallationDeleteParameters>): Promise<void>;
|
|
881
877
|
}
|
|
882
878
|
|
|
883
|
-
type AssetLibraryLocationMetadata<TIntegrationConfiguration = unknown> =
|
|
879
|
+
type AssetLibraryLocationMetadata<TIntegrationConfiguration = unknown> = {
|
|
880
|
+
/** Settings defined at the integration level (arbitrary type used on settings location) */
|
|
881
|
+
settings: TIntegrationConfiguration;
|
|
882
|
+
/** The Uniform project ID */
|
|
883
|
+
projectId: string;
|
|
884
884
|
/** The current Uniform integration source ID */
|
|
885
885
|
sourceId: string;
|
|
886
|
-
}
|
|
887
|
-
type AssetParameterLocationMetadata<TIntegrationConfiguration = unknown> =
|
|
886
|
+
};
|
|
887
|
+
type AssetParameterLocationMetadata<TIntegrationConfiguration = unknown> = {
|
|
888
|
+
/** Settings defined at the integration level (arbitrary type used on settings location) */
|
|
889
|
+
settings: TIntegrationConfiguration;
|
|
890
|
+
/** The Uniform project ID */
|
|
891
|
+
projectId: string;
|
|
888
892
|
/** The current Uniform integration source ID */
|
|
889
893
|
sourceId: string;
|
|
890
894
|
/** The resolved data if this source is connected to a data resource */
|
|
@@ -895,7 +899,7 @@ type AssetParameterLocationMetadata<TIntegrationConfiguration = unknown> = Commo
|
|
|
895
899
|
* Default: 1
|
|
896
900
|
*/
|
|
897
901
|
maxAssets?: number;
|
|
898
|
-
}
|
|
902
|
+
};
|
|
899
903
|
type AssetLibraryLocation = MeshLocationCore<unknown, AssetLibraryLocationMetadata, unknown, 'assetLibrary'> & GetDataResourceLocation;
|
|
900
904
|
type AssetParameterLocation = MeshLocationCore<AssetParamValue, AssetParameterLocationMetadata, AssetParamValue, 'assetParameter'> & GetDataResourceLocation;
|
|
901
905
|
|
|
@@ -904,7 +908,11 @@ type DataConnectorInfo = {
|
|
|
904
908
|
type: string;
|
|
905
909
|
displayName: string;
|
|
906
910
|
};
|
|
907
|
-
type DataTypeLocationMetadata<TIntegrationConfiguration = unknown> =
|
|
911
|
+
type DataTypeLocationMetadata<TIntegrationConfiguration = unknown> = {
|
|
912
|
+
/** Settings defined at the integration level (arbitrary type used on settings location) */
|
|
913
|
+
settings: TIntegrationConfiguration;
|
|
914
|
+
/** The Uniform project ID */
|
|
915
|
+
projectId: string;
|
|
908
916
|
/**
|
|
909
917
|
* The current data type's data source. NOTE: param and header values are not available in this context.
|
|
910
918
|
*/
|
|
@@ -913,10 +921,13 @@ type DataTypeLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetad
|
|
|
913
921
|
dataConnector: DataConnectorInfo;
|
|
914
922
|
/** The data type's archetype value. */
|
|
915
923
|
archetype: string;
|
|
916
|
-
}
|
|
924
|
+
};
|
|
917
925
|
type DataTypeLocation = MeshLocationCore<DataTypeLocationValue, DataTypeLocationMetadata, DataTypeLocationValue, 'dataType'> & GetDataResourceLocation;
|
|
918
926
|
|
|
919
|
-
type DataResourceLocationMetadata<TIntegrationConfiguration = unknown> =
|
|
927
|
+
type DataResourceLocationMetadata<TIntegrationConfiguration = unknown> = {
|
|
928
|
+
/** Settings defined at the integration level (arbitrary type used on settings location) */
|
|
929
|
+
settings: TIntegrationConfiguration;
|
|
930
|
+
/** The current data resource's data type */
|
|
920
931
|
dataType: DataType;
|
|
921
932
|
/** The data type's archetype value. */
|
|
922
933
|
archetype: string;
|
|
@@ -926,21 +937,32 @@ type DataResourceLocationMetadata<TIntegrationConfiguration = unknown> = CommonM
|
|
|
926
937
|
dataSource: DataSource;
|
|
927
938
|
/** The data connector type of the current data resource's data source */
|
|
928
939
|
dataConnector: DataConnectorInfo;
|
|
940
|
+
/** The Uniform project ID */
|
|
941
|
+
projectId: string;
|
|
929
942
|
/** Current dynamic inputs that are configured on the composition (if any). */
|
|
930
943
|
dynamicInputs: DynamicInputs;
|
|
931
|
-
}
|
|
944
|
+
};
|
|
932
945
|
type DataResourceLocation = MeshLocationCore<DataResourceVariables, DataResourceLocationMetadata, DataResourceVariables, 'dataResource'> & GetDataResourceLocation;
|
|
933
946
|
|
|
934
947
|
type DataSourceLocationValue = Pick<DataSource, 'baseUrl' | 'custom' | 'customPublic' | 'headers' | 'parameters' | 'variables'>;
|
|
935
|
-
type DataSourceLocationMetadata<TIntegrationConfiguration = unknown> =
|
|
948
|
+
type DataSourceLocationMetadata<TIntegrationConfiguration = unknown> = {
|
|
949
|
+
/** Settings defined at the integration level (arbitrary type used on settings location) */
|
|
950
|
+
settings: TIntegrationConfiguration;
|
|
951
|
+
/** The Uniform project ID */
|
|
952
|
+
projectId: string;
|
|
953
|
+
};
|
|
936
954
|
type DataSourceLocation = MeshLocationCore<DataSourceLocationValue, DataSourceLocationMetadata, DataSourceLocationValue, 'dataSource'>;
|
|
937
955
|
|
|
938
|
-
type ParamTypeLocationMetadata<TParamConfiguration = unknown, TIntegrationConfiguration = unknown> =
|
|
956
|
+
type ParamTypeLocationMetadata<TParamConfiguration = unknown, TIntegrationConfiguration = unknown> = {
|
|
939
957
|
rootNode: Omit<RootComponentInstance, 'slots' | '_data'>;
|
|
940
958
|
parameterConfiguration: TParamConfiguration;
|
|
941
959
|
component: Omit<ComponentInstance, 'slots'>;
|
|
942
960
|
componentDefinitions: Record<string, ComponentDefinition | undefined>;
|
|
943
961
|
parameterDefinition: ComponentDefinitionParameter;
|
|
962
|
+
/** Settings defined at the integration level (arbitrary type used on settings location) */
|
|
963
|
+
settings: TIntegrationConfiguration;
|
|
964
|
+
/** The Uniform project ID */
|
|
965
|
+
projectId: string;
|
|
944
966
|
/**
|
|
945
967
|
* Current dynamic inputs that are configured on the composition (if any).
|
|
946
968
|
* Use the <ParamTypeDynamicDataProvider> to wire up dynamic data in your parameter.
|
|
@@ -962,7 +984,7 @@ type ParamTypeLocationMetadata<TParamConfiguration = unknown, TIntegrationConfig
|
|
|
962
984
|
* Note that setValue() always sets the target language automatically.
|
|
963
985
|
*/
|
|
964
986
|
targetLocale: string | undefined;
|
|
965
|
-
}
|
|
987
|
+
};
|
|
966
988
|
type ParamTypeLocation<TParamValue = unknown, TParamConfiguration = unknown, TParamSetValue = TParamValue, TIntegrationConfiguration = unknown> = MeshLocationCore<TParamValue | undefined, ParamTypeLocationMetadata<TParamConfiguration, TIntegrationConfiguration>, TParamSetValue, 'paramType'> & {
|
|
967
989
|
/**
|
|
968
990
|
* Opens a dialog on the Uniform platform to edit or select a dynamic token to connect to.
|
|
@@ -971,7 +993,9 @@ type ParamTypeLocation<TParamValue = unknown, TParamConfiguration = unknown, TPa
|
|
|
971
993
|
editConnectedData: Awaited<ReturnType<typeof connectToParent>>['parent']['editConnectedData'];
|
|
972
994
|
};
|
|
973
995
|
|
|
974
|
-
type SettingsLocationMetadata =
|
|
996
|
+
type SettingsLocationMetadata = {
|
|
997
|
+
projectId: string;
|
|
998
|
+
};
|
|
975
999
|
type SettingsLocation<TSettingsType> = MeshLocationCore<TSettingsType, SettingsLocationMetadata, TSettingsType, 'settings'>;
|
|
976
1000
|
|
|
977
1001
|
/**
|
|
@@ -1102,22 +1126,6 @@ type EditConnectedDataResponse = {
|
|
|
1102
1126
|
canceled: true;
|
|
1103
1127
|
editorCancelledContext: EditConnectedDataResponseCancellationContext;
|
|
1104
1128
|
};
|
|
1105
|
-
type UniformUser = {
|
|
1106
|
-
/** Permissions the user has as per Team Admin assigned, can be used to do conditional rendering */
|
|
1107
|
-
permissions: MeshLocationUserPermissions[];
|
|
1108
|
-
/** Permissions the user has as per Team Admin created and assigned, can be used to do conditional rendering */
|
|
1109
|
-
roles: {
|
|
1110
|
-
id: string;
|
|
1111
|
-
name: string;
|
|
1112
|
-
}[];
|
|
1113
|
-
/** Name of the user assigned by Team Admin. Unless your Mesh integration was given permissions to expose User Name - it is not available */
|
|
1114
|
-
name?: string;
|
|
1115
|
-
/** Email of the user used to sign in. Unless your Mesh integration was given permissions to expose User Name - it is not available */
|
|
1116
|
-
email?: string;
|
|
1117
|
-
/** Unique ID of the user */
|
|
1118
|
-
id: string;
|
|
1119
|
-
isAdmin: boolean;
|
|
1120
|
-
};
|
|
1121
1129
|
|
|
1122
1130
|
type MeshSDKEventInterface = Awaited<ReturnType<typeof connectToParent>>['parent'] & {
|
|
1123
1131
|
initialize: () => Promise<MeshContextData>;
|
|
@@ -1180,84 +1188,6 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
|
|
|
1180
1188
|
returnDialogValue: (value: unknown) => Promise<void>;
|
|
1181
1189
|
};
|
|
1182
1190
|
}
|
|
1183
|
-
/** Common metadata for all mesh locations */
|
|
1184
|
-
type CommonMetadata<ExtendedMetadata = unknown, TIntegrationConfiguration = unknown> = {
|
|
1185
|
-
/** The current Uniform user context. Contains name, email and context to check for permissions */
|
|
1186
|
-
user: UniformUser;
|
|
1187
|
-
/** Current Uniform Project ID */
|
|
1188
|
-
projectId: string;
|
|
1189
|
-
/** Settings defined at the integration level (arbitrary type used on settings location) */
|
|
1190
|
-
settings: TIntegrationConfiguration;
|
|
1191
|
-
} & ExtendedMetadata;
|
|
1192
|
-
type MeshLocationUserPermissions =
|
|
1193
|
-
/** Uniform Context:Enrichments:Create */
|
|
1194
|
-
'ENRICHMENTS_CREATE'
|
|
1195
|
-
/** Uniform Context:Enrichments:Update */
|
|
1196
|
-
| 'ENRICHMENTS_UPDATE'
|
|
1197
|
-
/** Uniform Context:Enrichments:Delete */
|
|
1198
|
-
| 'ENRICHMENTS_DELETE'
|
|
1199
|
-
/** Uniform Context:Intents & Audiences:Create */
|
|
1200
|
-
| 'INTENTS_CREATE'
|
|
1201
|
-
/** Uniform Context:Intents & Audiences:Update */
|
|
1202
|
-
| 'INTENTS_UPDATE'
|
|
1203
|
-
/** Uniform Context:Intents & Audiences:Delete */
|
|
1204
|
-
| 'INTENTS_DELETE'
|
|
1205
|
-
/** Uniform Context:Quirks:Create */
|
|
1206
|
-
| 'QUIRKS_CREATE'
|
|
1207
|
-
/** Uniform Context:Quirks:Update| */
|
|
1208
|
-
| 'QUIRKS_UPDATE'
|
|
1209
|
-
/** Uniform Context:Quirks:Delete */
|
|
1210
|
-
| 'QUIRKS_DELETE'
|
|
1211
|
-
/** Uniform Context:Signals:Create */
|
|
1212
|
-
| 'SIGNALS_CREATE'
|
|
1213
|
-
/** Uniform Context:Signals:Update */
|
|
1214
|
-
| 'SIGNALS_UPDATE'
|
|
1215
|
-
/** Uniform Context:Signals:Delete */
|
|
1216
|
-
| 'SIGNALS_DELETE'
|
|
1217
|
-
/** Uniform Context:Tests:Create */
|
|
1218
|
-
| 'TESTS_CREATE'
|
|
1219
|
-
/** Uniform Context:Tests:Update|Declare winners and close existing tests. */
|
|
1220
|
-
| 'TESTS_UPDATE'
|
|
1221
|
-
/** Uniform Context:Tests:Delete */
|
|
1222
|
-
| 'TESTS_DELETE'
|
|
1223
|
-
/** Uniform Context:Manifest:Read|Read the published manifest */
|
|
1224
|
-
| 'MANIFEST_READ'
|
|
1225
|
-
/** Uniform Context:Manifest:Publish|Publish the manifest */
|
|
1226
|
-
| 'MANIFEST_PUBLISH'
|
|
1227
|
-
/** Uniform Context:Read Drafts|Read all drafts and preview manifest */
|
|
1228
|
-
| 'MANIFEST_READ_DRAFT'
|
|
1229
|
-
/** Uniform Canvas:Project Map:Manage|Create, update, and delete Project Maps and nodes in Project Map trees. */
|
|
1230
|
-
| 'PROJECT_MAP_MANAGE'
|
|
1231
|
-
/** General:Read Project|See the project in the team dashboard. */
|
|
1232
|
-
| 'PROJECT_READ'
|
|
1233
|
-
/** Uniform Canvas:Redirects:Advanced|Grants access to advanced redirect features and options. */
|
|
1234
|
-
| 'REDIRECTS_ADVANCED'
|
|
1235
|
-
/** Uniform Canvas:Redirects:Create */
|
|
1236
|
-
| 'REDIRECTS_CREATE'
|
|
1237
|
-
/** Uniform Canvas:Redirects:Update */
|
|
1238
|
-
| 'REDIRECTS_UPDATE'
|
|
1239
|
-
/** Uniform Canvas:Redirects:Delete */
|
|
1240
|
-
| 'REDIRECTS_DELETE'
|
|
1241
|
-
/** Uniform Canvas:Data Sources:Manage|Create, update, and delete data sources. */
|
|
1242
|
-
| 'DATA_SOURCES_MANAGE'
|
|
1243
|
-
/** Uniform Canvas:Data Types:Manage|Create, update, and delete data types. */
|
|
1244
|
-
| 'DATA_TYPES_MANAGE'
|
|
1245
|
-
/** Uniform Canvas:Compositions:Create */
|
|
1246
|
-
| 'COMPOSITIONS_CREATE'
|
|
1247
|
-
/** Uniform Canvas:Compositions:Update */
|
|
1248
|
-
| 'COMPOSITIONS_WRITE'
|
|
1249
|
-
/** Uniform Canvas:Compositions:Delete */
|
|
1250
|
-
| 'COMPOSITIONS_DELETE'
|
|
1251
|
-
/** Uniform Canvas:Compositions:Read Published */
|
|
1252
|
-
| 'COMPOSITIONS_READ'
|
|
1253
|
-
/** Uniform Canvas:Compositions:Publish */
|
|
1254
|
-
| 'COMPOSITIONS_PUBLISH'
|
|
1255
|
-
/** Uniform Canvas::Read|Includes read access to all canvas assets */
|
|
1256
|
-
| 'COMPOSITIONS_READ_DRAFT'
|
|
1257
|
-
/** Uniform Canvas:Component Library:Manage|Create, update, and delete component library data */
|
|
1258
|
-
| 'COMPOSITIONS_MANAGE_SCHEMA'
|
|
1259
|
-
/** UTM Mapper:Read|Read UTM mapper configuration */
|
|
1260
|
-
| 'UTM_PUB';
|
|
1261
1191
|
/**
|
|
1262
1192
|
* Known location types that can be passed to a mesh location
|
|
1263
1193
|
*/
|
|
@@ -1287,23 +1217,31 @@ type DynamicInput = {
|
|
|
1287
1217
|
/** Record of dynamic inputs keyed by the input name */
|
|
1288
1218
|
type DynamicInputs = Record<string, DynamicInput>;
|
|
1289
1219
|
|
|
1290
|
-
type AIGenerateLocationMetadata<TIntegrationConfiguration = unknown> =
|
|
1220
|
+
type AIGenerateLocationMetadata<TIntegrationConfiguration = unknown> = {
|
|
1221
|
+
/** Settings defined at the integration level (arbitrary type used on settings location) */
|
|
1222
|
+
settings: TIntegrationConfiguration;
|
|
1223
|
+
/** The Uniform project ID */
|
|
1224
|
+
projectId: string;
|
|
1291
1225
|
prompt: string;
|
|
1292
1226
|
promptMetadata: Record<string, unknown>;
|
|
1293
1227
|
/** Useful to differentiate AI Generate UI between text and image */
|
|
1294
1228
|
promptOutputType: 'text' | 'image';
|
|
1295
|
-
}
|
|
1296
|
-
type PromptSettingsLocationMetadata<TIntegrationConfiguration = unknown> =
|
|
1229
|
+
};
|
|
1230
|
+
type PromptSettingsLocationMetadata<TIntegrationConfiguration = unknown> = {
|
|
1231
|
+
settings: TIntegrationConfiguration;
|
|
1297
1232
|
/** Useful to differentiate metadata settings between text and image generation */
|
|
1298
1233
|
promptOutputType: 'text' | 'image';
|
|
1299
|
-
}
|
|
1234
|
+
};
|
|
1300
1235
|
type AIGenerateLocation<TType> = MeshLocationCore<TType, AIGenerateLocationMetadata, TType, 'aiGenerate'>;
|
|
1301
1236
|
type AIPromptMetadataLocation = MeshLocationCore<Record<string, unknown>, PromptSettingsLocationMetadata, Record<string, unknown>, 'aiMetadata'>;
|
|
1302
1237
|
|
|
1303
|
-
type ParamTypeConfigLocationMetadata<TIntegrationConfiguration = unknown> =
|
|
1238
|
+
type ParamTypeConfigLocationMetadata<TIntegrationConfiguration = unknown> = {
|
|
1239
|
+
/** Settings defined at the integration level (arbitrary type used on settings location) */
|
|
1240
|
+
settings: TIntegrationConfiguration;
|
|
1304
1241
|
/** The Uniform project ID */
|
|
1242
|
+
projectId: string;
|
|
1305
1243
|
componentDefinition: ComponentDefinition;
|
|
1306
|
-
}
|
|
1244
|
+
};
|
|
1307
1245
|
type ParamTypeConfigLocation<TParamValue = unknown, TIntegrationConfiguration = unknown> = MeshLocationCore<TParamValue | undefined, ParamTypeConfigLocationMetadata<TIntegrationConfiguration>, TParamValue, 'paramTypeConfig'>;
|
|
1308
1246
|
|
|
1309
1247
|
interface SdkWindow {
|
|
@@ -1403,10 +1341,4 @@ declare function initializeUniformMeshSDK({ autoResizingDisabled, }?: {
|
|
|
1403
1341
|
autoResizingDisabled?: boolean;
|
|
1404
1342
|
}): Promise<UniformMeshSDK | undefined>;
|
|
1405
1343
|
|
|
1406
|
-
|
|
1407
|
-
/**
|
|
1408
|
-
* Check if user has a role by both name and id
|
|
1409
|
-
*/
|
|
1410
|
-
declare const hasRole: (role: string, user: UniformUser) => boolean;
|
|
1411
|
-
|
|
1412
|
-
export { type AIGenerateLocation, type AIGenerateLocationMetadata, type AIPromptMetadataLocation, type AssetLibraryLocation, type AssetLibraryLocationMetadata, type AssetParameterLocation, type AssetParameterLocationMetadata, type BindableTypes, type CSSHeight, 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 };
|
|
1344
|
+
export { type AIGenerateLocation, type AIGenerateLocationMetadata, type AIPromptMetadataLocation, type AssetLibraryLocation, type AssetLibraryLocationMetadata, type AssetParameterLocation, type AssetParameterLocationMetadata, type BindableTypes, type CSSHeight, type CloseDialogMessage, type CloseLocationDialogOptions, 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 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 ValidationResult, initializeUniformMeshSDK };
|
package/dist/index.esm.js
CHANGED
|
@@ -801,26 +801,8 @@ async function initializeUniformMeshSDK({
|
|
|
801
801
|
return sdk;
|
|
802
802
|
}
|
|
803
803
|
}
|
|
804
|
-
|
|
805
|
-
// src/user.ts
|
|
806
|
-
var hasPermissions = (permissions, user) => {
|
|
807
|
-
if (user.isAdmin)
|
|
808
|
-
return true;
|
|
809
|
-
if (Array.isArray(permissions)) {
|
|
810
|
-
return permissions.every((permission) => user.permissions.includes(permission));
|
|
811
|
-
} else {
|
|
812
|
-
return user.permissions.includes(permissions);
|
|
813
|
-
}
|
|
814
|
-
};
|
|
815
|
-
var hasRole = (role, user) => {
|
|
816
|
-
if (user.isAdmin)
|
|
817
|
-
return true;
|
|
818
|
-
return user.roles.some((userRole) => userRole.name === role || userRole.id === role);
|
|
819
|
-
};
|
|
820
804
|
export {
|
|
821
805
|
IntegrationDefinitionClient,
|
|
822
806
|
IntegrationInstallationClient,
|
|
823
|
-
hasPermissions,
|
|
824
|
-
hasRole,
|
|
825
807
|
initializeUniformMeshSDK
|
|
826
808
|
};
|
package/dist/index.js
CHANGED
|
@@ -45,8 +45,6 @@ var src_exports = {};
|
|
|
45
45
|
__export(src_exports, {
|
|
46
46
|
IntegrationDefinitionClient: () => IntegrationDefinitionClient,
|
|
47
47
|
IntegrationInstallationClient: () => IntegrationInstallationClient,
|
|
48
|
-
hasPermissions: () => hasPermissions,
|
|
49
|
-
hasRole: () => hasRole,
|
|
50
48
|
initializeUniformMeshSDK: () => initializeUniformMeshSDK
|
|
51
49
|
});
|
|
52
50
|
module.exports = __toCommonJS(src_exports);
|
|
@@ -840,27 +838,9 @@ async function initializeUniformMeshSDK({
|
|
|
840
838
|
return sdk;
|
|
841
839
|
}
|
|
842
840
|
}
|
|
843
|
-
|
|
844
|
-
// src/user.ts
|
|
845
|
-
var hasPermissions = (permissions, user) => {
|
|
846
|
-
if (user.isAdmin)
|
|
847
|
-
return true;
|
|
848
|
-
if (Array.isArray(permissions)) {
|
|
849
|
-
return permissions.every((permission) => user.permissions.includes(permission));
|
|
850
|
-
} else {
|
|
851
|
-
return user.permissions.includes(permissions);
|
|
852
|
-
}
|
|
853
|
-
};
|
|
854
|
-
var hasRole = (role, user) => {
|
|
855
|
-
if (user.isAdmin)
|
|
856
|
-
return true;
|
|
857
|
-
return user.roles.some((userRole) => userRole.name === role || userRole.id === role);
|
|
858
|
-
};
|
|
859
841
|
// Annotate the CommonJS export names for ESM import in node:
|
|
860
842
|
0 && (module.exports = {
|
|
861
843
|
IntegrationDefinitionClient,
|
|
862
844
|
IntegrationInstallationClient,
|
|
863
|
-
hasPermissions,
|
|
864
|
-
hasRole,
|
|
865
845
|
initializeUniformMeshSDK
|
|
866
846
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -801,26 +801,8 @@ async function initializeUniformMeshSDK({
|
|
|
801
801
|
return sdk;
|
|
802
802
|
}
|
|
803
803
|
}
|
|
804
|
-
|
|
805
|
-
// src/user.ts
|
|
806
|
-
var hasPermissions = (permissions, user) => {
|
|
807
|
-
if (user.isAdmin)
|
|
808
|
-
return true;
|
|
809
|
-
if (Array.isArray(permissions)) {
|
|
810
|
-
return permissions.every((permission) => user.permissions.includes(permission));
|
|
811
|
-
} else {
|
|
812
|
-
return user.permissions.includes(permissions);
|
|
813
|
-
}
|
|
814
|
-
};
|
|
815
|
-
var hasRole = (role, user) => {
|
|
816
|
-
if (user.isAdmin)
|
|
817
|
-
return true;
|
|
818
|
-
return user.roles.some((userRole) => userRole.name === role || userRole.id === role);
|
|
819
|
-
};
|
|
820
804
|
export {
|
|
821
805
|
IntegrationDefinitionClient,
|
|
822
806
|
IntegrationInstallationClient,
|
|
823
|
-
hasPermissions,
|
|
824
|
-
hasRole,
|
|
825
807
|
initializeUniformMeshSDK
|
|
826
808
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/mesh-sdk",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.114.0",
|
|
4
4
|
"description": "Uniform Mesh Framework SDK",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -16,12 +16,10 @@
|
|
|
16
16
|
"types": "./dist/index.d.ts",
|
|
17
17
|
"sideEffects": false,
|
|
18
18
|
"scripts": {
|
|
19
|
-
"build": "run-s update-openapi
|
|
19
|
+
"build": "run-s update-openapi build:js",
|
|
20
20
|
"build:js": "tsup",
|
|
21
21
|
"dev": "pnpm update-openapi && tsup --watch",
|
|
22
22
|
"clean": "rimraf dist",
|
|
23
|
-
"debug1": "cat ./src/clients/openapi/v1-integration-definitions.swagger.ts",
|
|
24
|
-
"debug2": "cat ./src/clients/openapi/v1-integration-definitions.swagger.ts",
|
|
25
23
|
"test": "jest --maxWorkers=1 --passWithNoTests",
|
|
26
24
|
"lint": "eslint \"src/**/*.{js,ts,tsx}\"",
|
|
27
25
|
"format": "prettier --write \"src/**/*.{js,ts,tsx}\"",
|
|
@@ -35,14 +33,14 @@
|
|
|
35
33
|
"access": "public"
|
|
36
34
|
},
|
|
37
35
|
"dependencies": {
|
|
38
|
-
"@uniformdev/canvas": "19.
|
|
39
|
-
"@uniformdev/context": "19.
|
|
40
|
-
"@uniformdev/project-map": "19.
|
|
36
|
+
"@uniformdev/canvas": "19.114.0",
|
|
37
|
+
"@uniformdev/context": "19.114.0",
|
|
38
|
+
"@uniformdev/project-map": "19.114.0",
|
|
41
39
|
"imagesloaded": "^5.0.0",
|
|
42
40
|
"mitt": "^3.0.0"
|
|
43
41
|
},
|
|
44
42
|
"devDependencies": {
|
|
45
43
|
"@types/imagesloaded": "^4.1.2"
|
|
46
44
|
},
|
|
47
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "c9d4260a191785215cdca52c78f869be809f6e06"
|
|
48
46
|
}
|