@uniformdev/mesh-sdk 20.7.1-alpha.4 → 20.7.1-alpha.42
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 +127 -17
- package/dist/index.d.ts +127 -17
- package/dist/index.esm.js +21 -5
- package/dist/index.js +21 -5
- package/dist/index.mjs +21 -5
- package/package.json +8 -8
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ApiClient, ClientOptions, ExceptProject } from '@uniformdev/context/api';
|
|
2
|
-
import {
|
|
3
|
-
import { AssetParamValue, DataType, DataSource, DataSourceVariantsKeys, DataResourceVariables, RootComponentInstance, ComponentInstance, ComponentDefinition, ComponentDefinitionParameter, Locale, DataVariableDefinition, EntryData } from '@uniformdev/canvas';
|
|
2
|
+
import { AssetParamValue, DataType, DataSource, DataSourceVariantsKeys, DataResourceVariables, RootComponentInstance, ComponentInstance, ComponentDefinition, ComponentDefinitionParameter, DataVariableDefinition, Locale, EntryData } from '@uniformdev/canvas';
|
|
4
3
|
export { AssetParamValue, AssetParamValueItem } from '@uniformdev/canvas';
|
|
4
|
+
import { ProjectMapNode } from '@uniformdev/project-map';
|
|
5
5
|
import { AssetDefinitionType } from '@uniformdev/assets';
|
|
6
6
|
import { Emitter } from 'mitt';
|
|
7
7
|
|
|
@@ -65,7 +65,7 @@ interface paths$1 {
|
|
|
65
65
|
};
|
|
66
66
|
};
|
|
67
67
|
canvas?: {
|
|
68
|
-
parameterTypes
|
|
68
|
+
parameterTypes?: {
|
|
69
69
|
type: string;
|
|
70
70
|
displayName: string;
|
|
71
71
|
configureUrl?: string;
|
|
@@ -114,6 +114,15 @@ interface paths$1 {
|
|
|
114
114
|
url: string;
|
|
115
115
|
};
|
|
116
116
|
};
|
|
117
|
+
personalization?: {
|
|
118
|
+
selectionAlgorithms?: {
|
|
119
|
+
[key: string]: {
|
|
120
|
+
displayName: string;
|
|
121
|
+
description?: string;
|
|
122
|
+
criteriaEditorUrl?: string;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
};
|
|
117
126
|
};
|
|
118
127
|
dataConnectors?: {
|
|
119
128
|
type: string;
|
|
@@ -224,15 +233,22 @@ interface paths$1 {
|
|
|
224
233
|
definition: {
|
|
225
234
|
name: string;
|
|
226
235
|
description: string;
|
|
227
|
-
parameters
|
|
236
|
+
parameters: {
|
|
228
237
|
[key: string]: unknown;
|
|
229
238
|
};
|
|
239
|
+
strict: boolean;
|
|
230
240
|
};
|
|
231
241
|
systemParameters?: "pageHtml"[];
|
|
232
242
|
includedAgents?: ("scout" | "sage")[];
|
|
233
243
|
}[];
|
|
234
244
|
};
|
|
235
245
|
};
|
|
246
|
+
tools?: {
|
|
247
|
+
id: string;
|
|
248
|
+
name: string;
|
|
249
|
+
url: string;
|
|
250
|
+
iconUrl?: string;
|
|
251
|
+
}[];
|
|
236
252
|
};
|
|
237
253
|
unstable_prompts?: {
|
|
238
254
|
/** Format: uuid */
|
|
@@ -309,7 +325,7 @@ interface paths$1 {
|
|
|
309
325
|
};
|
|
310
326
|
};
|
|
311
327
|
canvas?: {
|
|
312
|
-
parameterTypes
|
|
328
|
+
parameterTypes?: {
|
|
313
329
|
type: string;
|
|
314
330
|
displayName: string;
|
|
315
331
|
configureUrl?: string;
|
|
@@ -358,6 +374,15 @@ interface paths$1 {
|
|
|
358
374
|
url: string;
|
|
359
375
|
};
|
|
360
376
|
};
|
|
377
|
+
personalization?: {
|
|
378
|
+
selectionAlgorithms?: {
|
|
379
|
+
[key: string]: {
|
|
380
|
+
displayName: string;
|
|
381
|
+
description?: string;
|
|
382
|
+
criteriaEditorUrl?: string;
|
|
383
|
+
};
|
|
384
|
+
};
|
|
385
|
+
};
|
|
361
386
|
};
|
|
362
387
|
dataConnectors?: {
|
|
363
388
|
type: string;
|
|
@@ -468,15 +493,22 @@ interface paths$1 {
|
|
|
468
493
|
definition: {
|
|
469
494
|
name: string;
|
|
470
495
|
description: string;
|
|
471
|
-
parameters
|
|
496
|
+
parameters: {
|
|
472
497
|
[key: string]: unknown;
|
|
473
498
|
};
|
|
499
|
+
strict: boolean;
|
|
474
500
|
};
|
|
475
501
|
systemParameters?: "pageHtml"[];
|
|
476
502
|
includedAgents?: ("scout" | "sage")[];
|
|
477
503
|
}[];
|
|
478
504
|
};
|
|
479
505
|
};
|
|
506
|
+
tools?: {
|
|
507
|
+
id: string;
|
|
508
|
+
name: string;
|
|
509
|
+
url: string;
|
|
510
|
+
iconUrl?: string;
|
|
511
|
+
}[];
|
|
480
512
|
};
|
|
481
513
|
unstable_prompts?: {
|
|
482
514
|
/** Format: uuid */
|
|
@@ -538,7 +570,7 @@ interface paths$1 {
|
|
|
538
570
|
};
|
|
539
571
|
};
|
|
540
572
|
canvas?: {
|
|
541
|
-
parameterTypes
|
|
573
|
+
parameterTypes?: {
|
|
542
574
|
type: string;
|
|
543
575
|
displayName: string;
|
|
544
576
|
configureUrl?: string;
|
|
@@ -587,6 +619,15 @@ interface paths$1 {
|
|
|
587
619
|
url: string;
|
|
588
620
|
};
|
|
589
621
|
};
|
|
622
|
+
personalization?: {
|
|
623
|
+
selectionAlgorithms?: {
|
|
624
|
+
[key: string]: {
|
|
625
|
+
displayName: string;
|
|
626
|
+
description?: string;
|
|
627
|
+
criteriaEditorUrl?: string;
|
|
628
|
+
};
|
|
629
|
+
};
|
|
630
|
+
};
|
|
590
631
|
};
|
|
591
632
|
dataConnectors?: {
|
|
592
633
|
type: string;
|
|
@@ -697,15 +738,22 @@ interface paths$1 {
|
|
|
697
738
|
definition: {
|
|
698
739
|
name: string;
|
|
699
740
|
description: string;
|
|
700
|
-
parameters
|
|
741
|
+
parameters: {
|
|
701
742
|
[key: string]: unknown;
|
|
702
743
|
};
|
|
744
|
+
strict: boolean;
|
|
703
745
|
};
|
|
704
746
|
systemParameters?: "pageHtml"[];
|
|
705
747
|
includedAgents?: ("scout" | "sage")[];
|
|
706
748
|
}[];
|
|
707
749
|
};
|
|
708
750
|
};
|
|
751
|
+
tools?: {
|
|
752
|
+
id: string;
|
|
753
|
+
name: string;
|
|
754
|
+
url: string;
|
|
755
|
+
iconUrl?: string;
|
|
756
|
+
}[];
|
|
709
757
|
};
|
|
710
758
|
unstable_prompts?: {
|
|
711
759
|
/** Format: uuid */
|
|
@@ -1130,7 +1178,7 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
|
1130
1178
|
};
|
|
1131
1179
|
};
|
|
1132
1180
|
canvas?: {
|
|
1133
|
-
parameterTypes
|
|
1181
|
+
parameterTypes?: {
|
|
1134
1182
|
type: string;
|
|
1135
1183
|
displayName: string;
|
|
1136
1184
|
configureUrl?: string;
|
|
@@ -1174,6 +1222,15 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
|
1174
1222
|
url: string;
|
|
1175
1223
|
};
|
|
1176
1224
|
};
|
|
1225
|
+
personalization?: {
|
|
1226
|
+
selectionAlgorithms?: {
|
|
1227
|
+
[key: string]: {
|
|
1228
|
+
displayName: string;
|
|
1229
|
+
description?: string;
|
|
1230
|
+
criteriaEditorUrl?: string;
|
|
1231
|
+
};
|
|
1232
|
+
};
|
|
1233
|
+
};
|
|
1177
1234
|
};
|
|
1178
1235
|
dataConnectors?: {
|
|
1179
1236
|
type: string;
|
|
@@ -1275,15 +1332,22 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
|
1275
1332
|
definition: {
|
|
1276
1333
|
name: string;
|
|
1277
1334
|
description: string;
|
|
1278
|
-
parameters
|
|
1335
|
+
parameters: {
|
|
1279
1336
|
[key: string]: unknown;
|
|
1280
1337
|
};
|
|
1338
|
+
strict: boolean;
|
|
1281
1339
|
};
|
|
1282
1340
|
systemParameters?: "pageHtml"[];
|
|
1283
1341
|
includedAgents?: ("scout" | "sage")[];
|
|
1284
1342
|
}[];
|
|
1285
1343
|
};
|
|
1286
1344
|
};
|
|
1345
|
+
tools?: {
|
|
1346
|
+
id: string;
|
|
1347
|
+
name: string;
|
|
1348
|
+
url: string;
|
|
1349
|
+
iconUrl?: string;
|
|
1350
|
+
}[];
|
|
1287
1351
|
};
|
|
1288
1352
|
unstable_prompts?: {
|
|
1289
1353
|
id: string;
|
|
@@ -1352,7 +1416,11 @@ type FunctionCallSystemParameter = (typeof functionCallSystemParameters)[number]
|
|
|
1352
1416
|
declare function parseFunctionCall<Parameters extends Record<string, string>, Settings = Record<string, string>>(request: Pick<Request, 'body'>): {
|
|
1353
1417
|
functionCall: {
|
|
1354
1418
|
arguments: Parameters;
|
|
1419
|
+
call_id: string;
|
|
1355
1420
|
name: string;
|
|
1421
|
+
type: "function_call";
|
|
1422
|
+
id?: string;
|
|
1423
|
+
status?: "in_progress" | "completed" | "incomplete";
|
|
1356
1424
|
};
|
|
1357
1425
|
settings: Settings;
|
|
1358
1426
|
systemParameters: Record<FunctionCallSystemParameter, string | undefined>;
|
|
@@ -1468,16 +1536,14 @@ type ParamTypeLocation<TParamValue = unknown, TParamConfiguration = unknown, TPa
|
|
|
1468
1536
|
editConnectedData: Awaited<ReturnType<typeof connectToParent>>['parent']['editConnectedData'];
|
|
1469
1537
|
};
|
|
1470
1538
|
|
|
1471
|
-
type SettingsLocationMetadata = CommonMetadata
|
|
1472
|
-
locales: Locale[];
|
|
1473
|
-
};
|
|
1539
|
+
type SettingsLocationMetadata = CommonMetadata;
|
|
1474
1540
|
type SettingsLocation<TSettingsType> = MeshLocationCore<TSettingsType, SettingsLocationMetadata, TSettingsType, 'settings'>;
|
|
1475
1541
|
|
|
1476
1542
|
/**
|
|
1477
1543
|
* Defines methods used for interacting with a Mesh location
|
|
1478
1544
|
* To receive useful typings, check the `type` property of the location to narrow the typing.
|
|
1479
1545
|
*/
|
|
1480
|
-
type MeshLocation<TValue = unknown, TSetValue = TValue> = ParamTypeLocation<TValue, unknown, TSetValue> | ParamTypeConfigLocation<TValue> | SettingsLocation<TValue> | AssetLibraryLocation | AssetParameterLocation | DataSourceLocation | DataTypeLocation | DataResourceLocation | CanvasEditorToolsLocation | EmbeddedEditorLocation | AIGenerateLocation<TValue> | AIPromptMetadataLocation
|
|
1546
|
+
type MeshLocation<TValue = unknown, TSetValue = TValue> = ParamTypeLocation<TValue, unknown, TSetValue> | ParamTypeConfigLocation<TValue> | SettingsLocation<TValue> | AssetLibraryLocation | AssetParameterLocation | DataSourceLocation | DataTypeLocation | DataResourceLocation | CanvasEditorToolsLocation | EmbeddedEditorLocation | AIGenerateLocation<TValue> | AIPromptMetadataLocation | PersonalizationCriteriaLocation<TValue> | ToolLocation<TValue>;
|
|
1481
1547
|
interface MeshContextData {
|
|
1482
1548
|
locationKey: string;
|
|
1483
1549
|
locationType: MeshLocationTypes;
|
|
@@ -1486,6 +1552,7 @@ interface MeshContextData {
|
|
|
1486
1552
|
locationMetadata: any;
|
|
1487
1553
|
uniformApiVersion: string;
|
|
1488
1554
|
dialogContext?: DialogContext;
|
|
1555
|
+
fullScreenHeight?: boolean;
|
|
1489
1556
|
}
|
|
1490
1557
|
interface DialogContext {
|
|
1491
1558
|
dialogId: string;
|
|
@@ -1584,6 +1651,13 @@ type OpenDialogMessage = {
|
|
|
1584
1651
|
dialogData: unknown;
|
|
1585
1652
|
options?: DialogOptions;
|
|
1586
1653
|
};
|
|
1654
|
+
type NavigateMessage = {
|
|
1655
|
+
path: string;
|
|
1656
|
+
options?: {
|
|
1657
|
+
projectId?: string;
|
|
1658
|
+
target?: '_blank';
|
|
1659
|
+
};
|
|
1660
|
+
};
|
|
1587
1661
|
type CloseDialogMessage = {
|
|
1588
1662
|
dialogId: string | undefined;
|
|
1589
1663
|
dialogType: DialogType;
|
|
@@ -1658,6 +1732,8 @@ declare function connectToParent({ dialogResponseHandlers, onMetadataUpdated, on
|
|
|
1658
1732
|
openDialog: (message: OpenDialogMessage) => Promise<Pick<DialogResponseData, "value" | "dialogId"> | undefined>;
|
|
1659
1733
|
closeDialog: (message: CloseDialogMessage) => Promise<void>;
|
|
1660
1734
|
getDataResource: <TExpectedResult>(message: GetDataResourceMessage) => Promise<TExpectedResult>;
|
|
1735
|
+
navigate: (message: NavigateMessage) => Promise<void>;
|
|
1736
|
+
reloadLocation: () => Promise<void>;
|
|
1661
1737
|
editConnectedData: (message: EditConnectedDataMessage) => Promise<EditConnectedDataResponse>;
|
|
1662
1738
|
};
|
|
1663
1739
|
}>;
|
|
@@ -1682,6 +1758,10 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
|
|
|
1682
1758
|
* Each location has a specific type of metadata that it is provided, which is typed automatically when the location is known.
|
|
1683
1759
|
*/
|
|
1684
1760
|
metadata: TMetadata;
|
|
1761
|
+
/**
|
|
1762
|
+
* A router object that can be used to navigate parent frame (Uniform App) to other page within current project and other methods.
|
|
1763
|
+
*/
|
|
1764
|
+
router: MeshRouter;
|
|
1685
1765
|
/**
|
|
1686
1766
|
* Context of a location when it is rendering inside a dialog in the Uniform app.
|
|
1687
1767
|
* This is set when:
|
|
@@ -1699,6 +1779,23 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
|
|
|
1699
1779
|
returnDialogValue: (value: unknown) => Promise<void>;
|
|
1700
1780
|
};
|
|
1701
1781
|
}
|
|
1782
|
+
type MeshRouter = {
|
|
1783
|
+
/**
|
|
1784
|
+
* Navigate parent frame (Uniform App) to a new path within current project.
|
|
1785
|
+
*
|
|
1786
|
+
* So router.navigate('/canvas/edit/{compositionId}') will navigate will open the composition editor for the given composition ID in the parent frame.
|
|
1787
|
+
* Be aware that most of the time it will close your mesh app, so you should use it with caution.
|
|
1788
|
+
*
|
|
1789
|
+
* @param path - The path to navigate to. You don't need to specify /projects/${projectId} as it is prepended automatically with the current project ID.
|
|
1790
|
+
* @param options - The options for the navigation.
|
|
1791
|
+
* @param options.projectId - You can specify project ID to navigate to. By default the current project ID is used.
|
|
1792
|
+
* @param options.target - Allows to open a new tab instead of navigating the current one.
|
|
1793
|
+
*/
|
|
1794
|
+
navigatePlatform: (path: string, options?: {
|
|
1795
|
+
projectId?: string;
|
|
1796
|
+
target?: '_blank';
|
|
1797
|
+
}) => void;
|
|
1798
|
+
};
|
|
1702
1799
|
/** Common metadata for all mesh locations */
|
|
1703
1800
|
type CommonMetadata<ExtendedMetadata = unknown, TIntegrationConfiguration = unknown> = {
|
|
1704
1801
|
/** The current Uniform user context. Contains name, email and context to check for permissions */
|
|
@@ -1709,6 +1806,8 @@ type CommonMetadata<ExtendedMetadata = unknown, TIntegrationConfiguration = unkn
|
|
|
1709
1806
|
dashboardOrigin: string;
|
|
1710
1807
|
/** Settings defined at the integration level (arbitrary type used on settings location) */
|
|
1711
1808
|
settings: TIntegrationConfiguration;
|
|
1809
|
+
/** List if enabled Uniform Project locales */
|
|
1810
|
+
locales: Locale[];
|
|
1712
1811
|
} & ExtendedMetadata;
|
|
1713
1812
|
type MeshLocationUserPermissions =
|
|
1714
1813
|
/** Uniform Context:Enrichments:Create */
|
|
@@ -1777,6 +1876,10 @@ type MeshLocationUserPermissions =
|
|
|
1777
1876
|
| 'COMPOSITIONS_READ_DRAFT'
|
|
1778
1877
|
/** Uniform Canvas:Component Library:Manage|Create, update, and delete component library data */
|
|
1779
1878
|
| 'COMPOSITIONS_MANAGE_SCHEMA'
|
|
1879
|
+
/** Uniform Canvas:Content Types:Manage|Create, update, and delete content types */
|
|
1880
|
+
| 'ENTRIES_MANAGE_SCHEMA'
|
|
1881
|
+
/** Uniform Canvas:AI Prompts:Manage|Create, update, and delete AI prompts */
|
|
1882
|
+
| 'PROMPTS_MANAGE_SCHEMA'
|
|
1780
1883
|
/** UTM Mapper:Read|Read UTM mapper configuration */
|
|
1781
1884
|
| 'UTM_MAPPER_READ'
|
|
1782
1885
|
/** UTM Mapper:Read|Create, update and delete UTM mapper configuration */
|
|
@@ -1792,7 +1895,7 @@ type MeshLocationUserPermissions =
|
|
|
1792
1895
|
/**
|
|
1793
1896
|
* Known location types that can be passed to a mesh location
|
|
1794
1897
|
*/
|
|
1795
|
-
type MeshLocationTypes = 'paramType' | 'paramTypeConfig' | 'assetLibrary' | 'assetParameter' | 'settings' | 'dataSource' | 'dataType' | 'dataResource' | 'aiGenerate' | 'embeddedEditor' | 'canvasEditorTools' | 'aiMetadata';
|
|
1898
|
+
type MeshLocationTypes = 'paramType' | 'paramTypeConfig' | 'assetLibrary' | 'assetParameter' | 'settings' | 'dataSource' | 'dataType' | 'dataResource' | 'aiGenerate' | 'embeddedEditor' | 'canvasEditorTools' | 'aiMetadata' | 'personalizationCriteria' | 'tool';
|
|
1796
1899
|
type SetValueOptions = ValidationResult;
|
|
1797
1900
|
type SetValueMessage = {
|
|
1798
1901
|
uniformMeshLocationValue: unknown;
|
|
@@ -1834,7 +1937,6 @@ type AIPromptMetadataLocation = MeshLocationCore<Record<string, unknown>, Prompt
|
|
|
1834
1937
|
type CanvasEditorToolsLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<{
|
|
1835
1938
|
releaseId?: string;
|
|
1836
1939
|
state?: number;
|
|
1837
|
-
locales: Locale[];
|
|
1838
1940
|
}, TIntegrationConfiguration>;
|
|
1839
1941
|
type CanvasEditorToolsReferenceData = {
|
|
1840
1942
|
name: string;
|
|
@@ -1908,6 +2010,14 @@ type ParamTypeConfigLocationMetadata<TIntegrationConfiguration = unknown> = Comm
|
|
|
1908
2010
|
}, TIntegrationConfiguration>;
|
|
1909
2011
|
type ParamTypeConfigLocation<TParamValue = unknown, TIntegrationConfiguration = unknown> = MeshLocationCore<TParamValue | undefined, ParamTypeConfigLocationMetadata<TIntegrationConfiguration>, TParamValue, 'paramTypeConfig'>;
|
|
1910
2012
|
|
|
2013
|
+
/** @deprecated Experimental functionality is subject to change in minor versions. */
|
|
2014
|
+
type PersonalizationCriteriaLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<unknown, TIntegrationConfiguration>;
|
|
2015
|
+
/** @deprecated Experimental functionality is subject to change in minor versions. */
|
|
2016
|
+
type PersonalizationCriteriaLocation<TCriteriaValue, TIntegrationConfiguration = unknown> = MeshLocationCore<TCriteriaValue | undefined, PersonalizationCriteriaLocationMetadata<TIntegrationConfiguration>, TCriteriaValue, 'personalizationCriteria'>;
|
|
2017
|
+
|
|
2018
|
+
type ToolLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<unknown, TIntegrationConfiguration>;
|
|
2019
|
+
type ToolLocation<TTool, TIntegrationConfiguration = unknown> = MeshLocationCore<TTool, ToolLocationMetadata<TIntegrationConfiguration>, TTool, 'tool'>;
|
|
2020
|
+
|
|
1911
2021
|
interface SdkWindow {
|
|
1912
2022
|
/** The current window object. */
|
|
1913
2023
|
instance: Window;
|
|
@@ -2011,4 +2121,4 @@ declare const hasPermissions: (permissions: MeshLocationUserPermissions | MeshLo
|
|
|
2011
2121
|
*/
|
|
2012
2122
|
declare const hasRole: (role: string, user: UniformUser) => boolean;
|
|
2013
2123
|
|
|
2014
|
-
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 EmbeddedEditorLocation, type EmbeddedEditorLocationMetadata, type EmbeddedEditorLocationSetValue, type EmbeddedEditorLocationValue, type FunctionCallResponse, type FunctionCallSystemParameter, 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, functionCallSystemParameters, hasPermissions, hasRole, initializeUniformMeshSDK, parseFunctionCall };
|
|
2124
|
+
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 EmbeddedEditorLocation, type EmbeddedEditorLocationMetadata, type EmbeddedEditorLocationSetValue, type EmbeddedEditorLocationValue, type FunctionCallResponse, type FunctionCallSystemParameter, 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 MeshRouter, type MeshSDKEventInterface, type NavigateMessage, type OpenConfirmationDialogOptions, type OpenConfirmationDialogResult, type OpenDialogMessage, type OpenDialogResult, type OpenLocationDialogOptions, type ParamTypeConfigLocation, type ParamTypeConfigLocationMetadata, type ParamTypeLocation, type ParamTypeLocationMetadata, type PersonalizationCriteriaLocation, type PersonalizationCriteriaLocationMetadata, type PromptSettingsLocationMetadata, type SdkWindow, type SetLocationFunction, type SetValueMessage, type SetValueOptions, type SettingsLocation, type SettingsLocationMetadata, type ToolLocation, type ToolLocationMetadata, type UniformMeshSDK, type UniformMeshSDKEvents, type UniformUser, type ValidationResult, functionCallSystemParameters, hasPermissions, hasRole, initializeUniformMeshSDK, parseFunctionCall };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ApiClient, ClientOptions, ExceptProject } from '@uniformdev/context/api';
|
|
2
|
-
import {
|
|
3
|
-
import { AssetParamValue, DataType, DataSource, DataSourceVariantsKeys, DataResourceVariables, RootComponentInstance, ComponentInstance, ComponentDefinition, ComponentDefinitionParameter, Locale, DataVariableDefinition, EntryData } from '@uniformdev/canvas';
|
|
2
|
+
import { AssetParamValue, DataType, DataSource, DataSourceVariantsKeys, DataResourceVariables, RootComponentInstance, ComponentInstance, ComponentDefinition, ComponentDefinitionParameter, DataVariableDefinition, Locale, EntryData } from '@uniformdev/canvas';
|
|
4
3
|
export { AssetParamValue, AssetParamValueItem } from '@uniformdev/canvas';
|
|
4
|
+
import { ProjectMapNode } from '@uniformdev/project-map';
|
|
5
5
|
import { AssetDefinitionType } from '@uniformdev/assets';
|
|
6
6
|
import { Emitter } from 'mitt';
|
|
7
7
|
|
|
@@ -65,7 +65,7 @@ interface paths$1 {
|
|
|
65
65
|
};
|
|
66
66
|
};
|
|
67
67
|
canvas?: {
|
|
68
|
-
parameterTypes
|
|
68
|
+
parameterTypes?: {
|
|
69
69
|
type: string;
|
|
70
70
|
displayName: string;
|
|
71
71
|
configureUrl?: string;
|
|
@@ -114,6 +114,15 @@ interface paths$1 {
|
|
|
114
114
|
url: string;
|
|
115
115
|
};
|
|
116
116
|
};
|
|
117
|
+
personalization?: {
|
|
118
|
+
selectionAlgorithms?: {
|
|
119
|
+
[key: string]: {
|
|
120
|
+
displayName: string;
|
|
121
|
+
description?: string;
|
|
122
|
+
criteriaEditorUrl?: string;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
};
|
|
117
126
|
};
|
|
118
127
|
dataConnectors?: {
|
|
119
128
|
type: string;
|
|
@@ -224,15 +233,22 @@ interface paths$1 {
|
|
|
224
233
|
definition: {
|
|
225
234
|
name: string;
|
|
226
235
|
description: string;
|
|
227
|
-
parameters
|
|
236
|
+
parameters: {
|
|
228
237
|
[key: string]: unknown;
|
|
229
238
|
};
|
|
239
|
+
strict: boolean;
|
|
230
240
|
};
|
|
231
241
|
systemParameters?: "pageHtml"[];
|
|
232
242
|
includedAgents?: ("scout" | "sage")[];
|
|
233
243
|
}[];
|
|
234
244
|
};
|
|
235
245
|
};
|
|
246
|
+
tools?: {
|
|
247
|
+
id: string;
|
|
248
|
+
name: string;
|
|
249
|
+
url: string;
|
|
250
|
+
iconUrl?: string;
|
|
251
|
+
}[];
|
|
236
252
|
};
|
|
237
253
|
unstable_prompts?: {
|
|
238
254
|
/** Format: uuid */
|
|
@@ -309,7 +325,7 @@ interface paths$1 {
|
|
|
309
325
|
};
|
|
310
326
|
};
|
|
311
327
|
canvas?: {
|
|
312
|
-
parameterTypes
|
|
328
|
+
parameterTypes?: {
|
|
313
329
|
type: string;
|
|
314
330
|
displayName: string;
|
|
315
331
|
configureUrl?: string;
|
|
@@ -358,6 +374,15 @@ interface paths$1 {
|
|
|
358
374
|
url: string;
|
|
359
375
|
};
|
|
360
376
|
};
|
|
377
|
+
personalization?: {
|
|
378
|
+
selectionAlgorithms?: {
|
|
379
|
+
[key: string]: {
|
|
380
|
+
displayName: string;
|
|
381
|
+
description?: string;
|
|
382
|
+
criteriaEditorUrl?: string;
|
|
383
|
+
};
|
|
384
|
+
};
|
|
385
|
+
};
|
|
361
386
|
};
|
|
362
387
|
dataConnectors?: {
|
|
363
388
|
type: string;
|
|
@@ -468,15 +493,22 @@ interface paths$1 {
|
|
|
468
493
|
definition: {
|
|
469
494
|
name: string;
|
|
470
495
|
description: string;
|
|
471
|
-
parameters
|
|
496
|
+
parameters: {
|
|
472
497
|
[key: string]: unknown;
|
|
473
498
|
};
|
|
499
|
+
strict: boolean;
|
|
474
500
|
};
|
|
475
501
|
systemParameters?: "pageHtml"[];
|
|
476
502
|
includedAgents?: ("scout" | "sage")[];
|
|
477
503
|
}[];
|
|
478
504
|
};
|
|
479
505
|
};
|
|
506
|
+
tools?: {
|
|
507
|
+
id: string;
|
|
508
|
+
name: string;
|
|
509
|
+
url: string;
|
|
510
|
+
iconUrl?: string;
|
|
511
|
+
}[];
|
|
480
512
|
};
|
|
481
513
|
unstable_prompts?: {
|
|
482
514
|
/** Format: uuid */
|
|
@@ -538,7 +570,7 @@ interface paths$1 {
|
|
|
538
570
|
};
|
|
539
571
|
};
|
|
540
572
|
canvas?: {
|
|
541
|
-
parameterTypes
|
|
573
|
+
parameterTypes?: {
|
|
542
574
|
type: string;
|
|
543
575
|
displayName: string;
|
|
544
576
|
configureUrl?: string;
|
|
@@ -587,6 +619,15 @@ interface paths$1 {
|
|
|
587
619
|
url: string;
|
|
588
620
|
};
|
|
589
621
|
};
|
|
622
|
+
personalization?: {
|
|
623
|
+
selectionAlgorithms?: {
|
|
624
|
+
[key: string]: {
|
|
625
|
+
displayName: string;
|
|
626
|
+
description?: string;
|
|
627
|
+
criteriaEditorUrl?: string;
|
|
628
|
+
};
|
|
629
|
+
};
|
|
630
|
+
};
|
|
590
631
|
};
|
|
591
632
|
dataConnectors?: {
|
|
592
633
|
type: string;
|
|
@@ -697,15 +738,22 @@ interface paths$1 {
|
|
|
697
738
|
definition: {
|
|
698
739
|
name: string;
|
|
699
740
|
description: string;
|
|
700
|
-
parameters
|
|
741
|
+
parameters: {
|
|
701
742
|
[key: string]: unknown;
|
|
702
743
|
};
|
|
744
|
+
strict: boolean;
|
|
703
745
|
};
|
|
704
746
|
systemParameters?: "pageHtml"[];
|
|
705
747
|
includedAgents?: ("scout" | "sage")[];
|
|
706
748
|
}[];
|
|
707
749
|
};
|
|
708
750
|
};
|
|
751
|
+
tools?: {
|
|
752
|
+
id: string;
|
|
753
|
+
name: string;
|
|
754
|
+
url: string;
|
|
755
|
+
iconUrl?: string;
|
|
756
|
+
}[];
|
|
709
757
|
};
|
|
710
758
|
unstable_prompts?: {
|
|
711
759
|
/** Format: uuid */
|
|
@@ -1130,7 +1178,7 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
|
1130
1178
|
};
|
|
1131
1179
|
};
|
|
1132
1180
|
canvas?: {
|
|
1133
|
-
parameterTypes
|
|
1181
|
+
parameterTypes?: {
|
|
1134
1182
|
type: string;
|
|
1135
1183
|
displayName: string;
|
|
1136
1184
|
configureUrl?: string;
|
|
@@ -1174,6 +1222,15 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
|
1174
1222
|
url: string;
|
|
1175
1223
|
};
|
|
1176
1224
|
};
|
|
1225
|
+
personalization?: {
|
|
1226
|
+
selectionAlgorithms?: {
|
|
1227
|
+
[key: string]: {
|
|
1228
|
+
displayName: string;
|
|
1229
|
+
description?: string;
|
|
1230
|
+
criteriaEditorUrl?: string;
|
|
1231
|
+
};
|
|
1232
|
+
};
|
|
1233
|
+
};
|
|
1177
1234
|
};
|
|
1178
1235
|
dataConnectors?: {
|
|
1179
1236
|
type: string;
|
|
@@ -1275,15 +1332,22 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
|
1275
1332
|
definition: {
|
|
1276
1333
|
name: string;
|
|
1277
1334
|
description: string;
|
|
1278
|
-
parameters
|
|
1335
|
+
parameters: {
|
|
1279
1336
|
[key: string]: unknown;
|
|
1280
1337
|
};
|
|
1338
|
+
strict: boolean;
|
|
1281
1339
|
};
|
|
1282
1340
|
systemParameters?: "pageHtml"[];
|
|
1283
1341
|
includedAgents?: ("scout" | "sage")[];
|
|
1284
1342
|
}[];
|
|
1285
1343
|
};
|
|
1286
1344
|
};
|
|
1345
|
+
tools?: {
|
|
1346
|
+
id: string;
|
|
1347
|
+
name: string;
|
|
1348
|
+
url: string;
|
|
1349
|
+
iconUrl?: string;
|
|
1350
|
+
}[];
|
|
1287
1351
|
};
|
|
1288
1352
|
unstable_prompts?: {
|
|
1289
1353
|
id: string;
|
|
@@ -1352,7 +1416,11 @@ type FunctionCallSystemParameter = (typeof functionCallSystemParameters)[number]
|
|
|
1352
1416
|
declare function parseFunctionCall<Parameters extends Record<string, string>, Settings = Record<string, string>>(request: Pick<Request, 'body'>): {
|
|
1353
1417
|
functionCall: {
|
|
1354
1418
|
arguments: Parameters;
|
|
1419
|
+
call_id: string;
|
|
1355
1420
|
name: string;
|
|
1421
|
+
type: "function_call";
|
|
1422
|
+
id?: string;
|
|
1423
|
+
status?: "in_progress" | "completed" | "incomplete";
|
|
1356
1424
|
};
|
|
1357
1425
|
settings: Settings;
|
|
1358
1426
|
systemParameters: Record<FunctionCallSystemParameter, string | undefined>;
|
|
@@ -1468,16 +1536,14 @@ type ParamTypeLocation<TParamValue = unknown, TParamConfiguration = unknown, TPa
|
|
|
1468
1536
|
editConnectedData: Awaited<ReturnType<typeof connectToParent>>['parent']['editConnectedData'];
|
|
1469
1537
|
};
|
|
1470
1538
|
|
|
1471
|
-
type SettingsLocationMetadata = CommonMetadata
|
|
1472
|
-
locales: Locale[];
|
|
1473
|
-
};
|
|
1539
|
+
type SettingsLocationMetadata = CommonMetadata;
|
|
1474
1540
|
type SettingsLocation<TSettingsType> = MeshLocationCore<TSettingsType, SettingsLocationMetadata, TSettingsType, 'settings'>;
|
|
1475
1541
|
|
|
1476
1542
|
/**
|
|
1477
1543
|
* Defines methods used for interacting with a Mesh location
|
|
1478
1544
|
* To receive useful typings, check the `type` property of the location to narrow the typing.
|
|
1479
1545
|
*/
|
|
1480
|
-
type MeshLocation<TValue = unknown, TSetValue = TValue> = ParamTypeLocation<TValue, unknown, TSetValue> | ParamTypeConfigLocation<TValue> | SettingsLocation<TValue> | AssetLibraryLocation | AssetParameterLocation | DataSourceLocation | DataTypeLocation | DataResourceLocation | CanvasEditorToolsLocation | EmbeddedEditorLocation | AIGenerateLocation<TValue> | AIPromptMetadataLocation
|
|
1546
|
+
type MeshLocation<TValue = unknown, TSetValue = TValue> = ParamTypeLocation<TValue, unknown, TSetValue> | ParamTypeConfigLocation<TValue> | SettingsLocation<TValue> | AssetLibraryLocation | AssetParameterLocation | DataSourceLocation | DataTypeLocation | DataResourceLocation | CanvasEditorToolsLocation | EmbeddedEditorLocation | AIGenerateLocation<TValue> | AIPromptMetadataLocation | PersonalizationCriteriaLocation<TValue> | ToolLocation<TValue>;
|
|
1481
1547
|
interface MeshContextData {
|
|
1482
1548
|
locationKey: string;
|
|
1483
1549
|
locationType: MeshLocationTypes;
|
|
@@ -1486,6 +1552,7 @@ interface MeshContextData {
|
|
|
1486
1552
|
locationMetadata: any;
|
|
1487
1553
|
uniformApiVersion: string;
|
|
1488
1554
|
dialogContext?: DialogContext;
|
|
1555
|
+
fullScreenHeight?: boolean;
|
|
1489
1556
|
}
|
|
1490
1557
|
interface DialogContext {
|
|
1491
1558
|
dialogId: string;
|
|
@@ -1584,6 +1651,13 @@ type OpenDialogMessage = {
|
|
|
1584
1651
|
dialogData: unknown;
|
|
1585
1652
|
options?: DialogOptions;
|
|
1586
1653
|
};
|
|
1654
|
+
type NavigateMessage = {
|
|
1655
|
+
path: string;
|
|
1656
|
+
options?: {
|
|
1657
|
+
projectId?: string;
|
|
1658
|
+
target?: '_blank';
|
|
1659
|
+
};
|
|
1660
|
+
};
|
|
1587
1661
|
type CloseDialogMessage = {
|
|
1588
1662
|
dialogId: string | undefined;
|
|
1589
1663
|
dialogType: DialogType;
|
|
@@ -1658,6 +1732,8 @@ declare function connectToParent({ dialogResponseHandlers, onMetadataUpdated, on
|
|
|
1658
1732
|
openDialog: (message: OpenDialogMessage) => Promise<Pick<DialogResponseData, "value" | "dialogId"> | undefined>;
|
|
1659
1733
|
closeDialog: (message: CloseDialogMessage) => Promise<void>;
|
|
1660
1734
|
getDataResource: <TExpectedResult>(message: GetDataResourceMessage) => Promise<TExpectedResult>;
|
|
1735
|
+
navigate: (message: NavigateMessage) => Promise<void>;
|
|
1736
|
+
reloadLocation: () => Promise<void>;
|
|
1661
1737
|
editConnectedData: (message: EditConnectedDataMessage) => Promise<EditConnectedDataResponse>;
|
|
1662
1738
|
};
|
|
1663
1739
|
}>;
|
|
@@ -1682,6 +1758,10 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
|
|
|
1682
1758
|
* Each location has a specific type of metadata that it is provided, which is typed automatically when the location is known.
|
|
1683
1759
|
*/
|
|
1684
1760
|
metadata: TMetadata;
|
|
1761
|
+
/**
|
|
1762
|
+
* A router object that can be used to navigate parent frame (Uniform App) to other page within current project and other methods.
|
|
1763
|
+
*/
|
|
1764
|
+
router: MeshRouter;
|
|
1685
1765
|
/**
|
|
1686
1766
|
* Context of a location when it is rendering inside a dialog in the Uniform app.
|
|
1687
1767
|
* This is set when:
|
|
@@ -1699,6 +1779,23 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
|
|
|
1699
1779
|
returnDialogValue: (value: unknown) => Promise<void>;
|
|
1700
1780
|
};
|
|
1701
1781
|
}
|
|
1782
|
+
type MeshRouter = {
|
|
1783
|
+
/**
|
|
1784
|
+
* Navigate parent frame (Uniform App) to a new path within current project.
|
|
1785
|
+
*
|
|
1786
|
+
* So router.navigate('/canvas/edit/{compositionId}') will navigate will open the composition editor for the given composition ID in the parent frame.
|
|
1787
|
+
* Be aware that most of the time it will close your mesh app, so you should use it with caution.
|
|
1788
|
+
*
|
|
1789
|
+
* @param path - The path to navigate to. You don't need to specify /projects/${projectId} as it is prepended automatically with the current project ID.
|
|
1790
|
+
* @param options - The options for the navigation.
|
|
1791
|
+
* @param options.projectId - You can specify project ID to navigate to. By default the current project ID is used.
|
|
1792
|
+
* @param options.target - Allows to open a new tab instead of navigating the current one.
|
|
1793
|
+
*/
|
|
1794
|
+
navigatePlatform: (path: string, options?: {
|
|
1795
|
+
projectId?: string;
|
|
1796
|
+
target?: '_blank';
|
|
1797
|
+
}) => void;
|
|
1798
|
+
};
|
|
1702
1799
|
/** Common metadata for all mesh locations */
|
|
1703
1800
|
type CommonMetadata<ExtendedMetadata = unknown, TIntegrationConfiguration = unknown> = {
|
|
1704
1801
|
/** The current Uniform user context. Contains name, email and context to check for permissions */
|
|
@@ -1709,6 +1806,8 @@ type CommonMetadata<ExtendedMetadata = unknown, TIntegrationConfiguration = unkn
|
|
|
1709
1806
|
dashboardOrigin: string;
|
|
1710
1807
|
/** Settings defined at the integration level (arbitrary type used on settings location) */
|
|
1711
1808
|
settings: TIntegrationConfiguration;
|
|
1809
|
+
/** List if enabled Uniform Project locales */
|
|
1810
|
+
locales: Locale[];
|
|
1712
1811
|
} & ExtendedMetadata;
|
|
1713
1812
|
type MeshLocationUserPermissions =
|
|
1714
1813
|
/** Uniform Context:Enrichments:Create */
|
|
@@ -1777,6 +1876,10 @@ type MeshLocationUserPermissions =
|
|
|
1777
1876
|
| 'COMPOSITIONS_READ_DRAFT'
|
|
1778
1877
|
/** Uniform Canvas:Component Library:Manage|Create, update, and delete component library data */
|
|
1779
1878
|
| 'COMPOSITIONS_MANAGE_SCHEMA'
|
|
1879
|
+
/** Uniform Canvas:Content Types:Manage|Create, update, and delete content types */
|
|
1880
|
+
| 'ENTRIES_MANAGE_SCHEMA'
|
|
1881
|
+
/** Uniform Canvas:AI Prompts:Manage|Create, update, and delete AI prompts */
|
|
1882
|
+
| 'PROMPTS_MANAGE_SCHEMA'
|
|
1780
1883
|
/** UTM Mapper:Read|Read UTM mapper configuration */
|
|
1781
1884
|
| 'UTM_MAPPER_READ'
|
|
1782
1885
|
/** UTM Mapper:Read|Create, update and delete UTM mapper configuration */
|
|
@@ -1792,7 +1895,7 @@ type MeshLocationUserPermissions =
|
|
|
1792
1895
|
/**
|
|
1793
1896
|
* Known location types that can be passed to a mesh location
|
|
1794
1897
|
*/
|
|
1795
|
-
type MeshLocationTypes = 'paramType' | 'paramTypeConfig' | 'assetLibrary' | 'assetParameter' | 'settings' | 'dataSource' | 'dataType' | 'dataResource' | 'aiGenerate' | 'embeddedEditor' | 'canvasEditorTools' | 'aiMetadata';
|
|
1898
|
+
type MeshLocationTypes = 'paramType' | 'paramTypeConfig' | 'assetLibrary' | 'assetParameter' | 'settings' | 'dataSource' | 'dataType' | 'dataResource' | 'aiGenerate' | 'embeddedEditor' | 'canvasEditorTools' | 'aiMetadata' | 'personalizationCriteria' | 'tool';
|
|
1796
1899
|
type SetValueOptions = ValidationResult;
|
|
1797
1900
|
type SetValueMessage = {
|
|
1798
1901
|
uniformMeshLocationValue: unknown;
|
|
@@ -1834,7 +1937,6 @@ type AIPromptMetadataLocation = MeshLocationCore<Record<string, unknown>, Prompt
|
|
|
1834
1937
|
type CanvasEditorToolsLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<{
|
|
1835
1938
|
releaseId?: string;
|
|
1836
1939
|
state?: number;
|
|
1837
|
-
locales: Locale[];
|
|
1838
1940
|
}, TIntegrationConfiguration>;
|
|
1839
1941
|
type CanvasEditorToolsReferenceData = {
|
|
1840
1942
|
name: string;
|
|
@@ -1908,6 +2010,14 @@ type ParamTypeConfigLocationMetadata<TIntegrationConfiguration = unknown> = Comm
|
|
|
1908
2010
|
}, TIntegrationConfiguration>;
|
|
1909
2011
|
type ParamTypeConfigLocation<TParamValue = unknown, TIntegrationConfiguration = unknown> = MeshLocationCore<TParamValue | undefined, ParamTypeConfigLocationMetadata<TIntegrationConfiguration>, TParamValue, 'paramTypeConfig'>;
|
|
1910
2012
|
|
|
2013
|
+
/** @deprecated Experimental functionality is subject to change in minor versions. */
|
|
2014
|
+
type PersonalizationCriteriaLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<unknown, TIntegrationConfiguration>;
|
|
2015
|
+
/** @deprecated Experimental functionality is subject to change in minor versions. */
|
|
2016
|
+
type PersonalizationCriteriaLocation<TCriteriaValue, TIntegrationConfiguration = unknown> = MeshLocationCore<TCriteriaValue | undefined, PersonalizationCriteriaLocationMetadata<TIntegrationConfiguration>, TCriteriaValue, 'personalizationCriteria'>;
|
|
2017
|
+
|
|
2018
|
+
type ToolLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<unknown, TIntegrationConfiguration>;
|
|
2019
|
+
type ToolLocation<TTool, TIntegrationConfiguration = unknown> = MeshLocationCore<TTool, ToolLocationMetadata<TIntegrationConfiguration>, TTool, 'tool'>;
|
|
2020
|
+
|
|
1911
2021
|
interface SdkWindow {
|
|
1912
2022
|
/** The current window object. */
|
|
1913
2023
|
instance: Window;
|
|
@@ -2011,4 +2121,4 @@ declare const hasPermissions: (permissions: MeshLocationUserPermissions | MeshLo
|
|
|
2011
2121
|
*/
|
|
2012
2122
|
declare const hasRole: (role: string, user: UniformUser) => boolean;
|
|
2013
2123
|
|
|
2014
|
-
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 EmbeddedEditorLocation, type EmbeddedEditorLocationMetadata, type EmbeddedEditorLocationSetValue, type EmbeddedEditorLocationValue, type FunctionCallResponse, type FunctionCallSystemParameter, 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, functionCallSystemParameters, hasPermissions, hasRole, initializeUniformMeshSDK, parseFunctionCall };
|
|
2124
|
+
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 EmbeddedEditorLocation, type EmbeddedEditorLocationMetadata, type EmbeddedEditorLocationSetValue, type EmbeddedEditorLocationValue, type FunctionCallResponse, type FunctionCallSystemParameter, 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 MeshRouter, type MeshSDKEventInterface, type NavigateMessage, type OpenConfirmationDialogOptions, type OpenConfirmationDialogResult, type OpenDialogMessage, type OpenDialogResult, type OpenLocationDialogOptions, type ParamTypeConfigLocation, type ParamTypeConfigLocationMetadata, type ParamTypeLocation, type ParamTypeLocationMetadata, type PersonalizationCriteriaLocation, type PersonalizationCriteriaLocationMetadata, type PromptSettingsLocationMetadata, type SdkWindow, type SetLocationFunction, type SetValueMessage, type SetValueOptions, type SettingsLocation, type SettingsLocationMetadata, type ToolLocation, type ToolLocationMetadata, type UniformMeshSDK, type UniformMeshSDKEvents, type UniformUser, type ValidationResult, functionCallSystemParameters, hasPermissions, hasRole, initializeUniformMeshSDK, parseFunctionCall };
|
package/dist/index.esm.js
CHANGED
|
@@ -131,7 +131,7 @@ var getLogger = (prefix, debug) => {
|
|
|
131
131
|
};
|
|
132
132
|
|
|
133
133
|
// src/temp/version.ts
|
|
134
|
-
var UNIFORM_MESH_SDK_VERSION = "20.
|
|
134
|
+
var UNIFORM_MESH_SDK_VERSION = "20.14.3";
|
|
135
135
|
|
|
136
136
|
// src/framepost/constants.ts
|
|
137
137
|
var DEFAULT_REQUEST_TIMEOUT = 5e3;
|
|
@@ -518,6 +518,12 @@ async function connectToParent({
|
|
|
518
518
|
timeout: 3e4
|
|
519
519
|
});
|
|
520
520
|
},
|
|
521
|
+
navigate: async (message) => {
|
|
522
|
+
await client.request("navigate", message);
|
|
523
|
+
},
|
|
524
|
+
reloadLocation: async () => {
|
|
525
|
+
await client.request("reload");
|
|
526
|
+
},
|
|
521
527
|
editConnectedData: async (message) => {
|
|
522
528
|
return await client.request(
|
|
523
529
|
"editConnectedData",
|
|
@@ -546,9 +552,11 @@ var createSdkWindow = ({
|
|
|
546
552
|
}
|
|
547
553
|
const windowInstance = window;
|
|
548
554
|
const updateHeight = (height) => {
|
|
549
|
-
if (height
|
|
550
|
-
oldHeight
|
|
551
|
-
|
|
555
|
+
if (height) {
|
|
556
|
+
if (height !== oldHeight) {
|
|
557
|
+
oldHeight = height;
|
|
558
|
+
onHeightChange == null ? void 0 : onHeightChange(height);
|
|
559
|
+
}
|
|
552
560
|
return;
|
|
553
561
|
}
|
|
554
562
|
let maxBottom = windowInstance.document.documentElement.getBoundingClientRect().height;
|
|
@@ -619,6 +627,7 @@ var createSdkWindow = ({
|
|
|
619
627
|
childList: true,
|
|
620
628
|
subtree: true
|
|
621
629
|
});
|
|
630
|
+
updateHeight();
|
|
622
631
|
},
|
|
623
632
|
disableAutoResizing: () => {
|
|
624
633
|
observer == null ? void 0 : observer.disconnect();
|
|
@@ -702,6 +711,10 @@ async function initializeUniformMeshSDK({
|
|
|
702
711
|
getCurrentLocation: () => {
|
|
703
712
|
const location = {
|
|
704
713
|
getDataResource: parent.getDataResource,
|
|
714
|
+
router: {
|
|
715
|
+
navigatePlatform: (path, options) => parent.navigate({ path, options })
|
|
716
|
+
// reloadLocation: parent.reloadLocation,
|
|
717
|
+
},
|
|
705
718
|
editConnectedData,
|
|
706
719
|
type: contextData.locationType,
|
|
707
720
|
isReadOnly: contextData.isReadOnly,
|
|
@@ -732,7 +745,10 @@ async function initializeUniformMeshSDK({
|
|
|
732
745
|
// then we disable autoResizing for the dialog location.
|
|
733
746
|
// Otherwise, autoResizing will likely "overwrite" the specified `contentHeight` value, making
|
|
734
747
|
// developers very sad and confused. No one wants a sad and confused developer.
|
|
735
|
-
autoResizingDisabled
|
|
748
|
+
// Another case for explicit autoResizingDisabled flag is Full Screen Height from the parent (e.g. asset library location),
|
|
749
|
+
// so by default it will be stretch to the maximum height of the parent.
|
|
750
|
+
// Can still be manually enabled by calling sdk.currentWindow?.enableAutoResizing() in mesh app.
|
|
751
|
+
autoResizingDisabled: ((_a = contextData.dialogContext) == null ? void 0 : _a.contentHeight) || contextData.fullScreenHeight ? true : autoResizingDisabled
|
|
736
752
|
}),
|
|
737
753
|
version: contextData.uniformApiVersion,
|
|
738
754
|
openLocationDialog: async ({
|
package/dist/index.js
CHANGED
|
@@ -172,7 +172,7 @@ var getLogger = (prefix, debug) => {
|
|
|
172
172
|
};
|
|
173
173
|
|
|
174
174
|
// src/temp/version.ts
|
|
175
|
-
var UNIFORM_MESH_SDK_VERSION = "20.
|
|
175
|
+
var UNIFORM_MESH_SDK_VERSION = "20.14.3";
|
|
176
176
|
|
|
177
177
|
// src/framepost/constants.ts
|
|
178
178
|
var DEFAULT_REQUEST_TIMEOUT = 5e3;
|
|
@@ -559,6 +559,12 @@ async function connectToParent({
|
|
|
559
559
|
timeout: 3e4
|
|
560
560
|
});
|
|
561
561
|
},
|
|
562
|
+
navigate: async (message) => {
|
|
563
|
+
await client.request("navigate", message);
|
|
564
|
+
},
|
|
565
|
+
reloadLocation: async () => {
|
|
566
|
+
await client.request("reload");
|
|
567
|
+
},
|
|
562
568
|
editConnectedData: async (message) => {
|
|
563
569
|
return await client.request(
|
|
564
570
|
"editConnectedData",
|
|
@@ -587,9 +593,11 @@ var createSdkWindow = ({
|
|
|
587
593
|
}
|
|
588
594
|
const windowInstance = window;
|
|
589
595
|
const updateHeight = (height) => {
|
|
590
|
-
if (height
|
|
591
|
-
oldHeight
|
|
592
|
-
|
|
596
|
+
if (height) {
|
|
597
|
+
if (height !== oldHeight) {
|
|
598
|
+
oldHeight = height;
|
|
599
|
+
onHeightChange == null ? void 0 : onHeightChange(height);
|
|
600
|
+
}
|
|
593
601
|
return;
|
|
594
602
|
}
|
|
595
603
|
let maxBottom = windowInstance.document.documentElement.getBoundingClientRect().height;
|
|
@@ -660,6 +668,7 @@ var createSdkWindow = ({
|
|
|
660
668
|
childList: true,
|
|
661
669
|
subtree: true
|
|
662
670
|
});
|
|
671
|
+
updateHeight();
|
|
663
672
|
},
|
|
664
673
|
disableAutoResizing: () => {
|
|
665
674
|
observer == null ? void 0 : observer.disconnect();
|
|
@@ -743,6 +752,10 @@ async function initializeUniformMeshSDK({
|
|
|
743
752
|
getCurrentLocation: () => {
|
|
744
753
|
const location = {
|
|
745
754
|
getDataResource: parent.getDataResource,
|
|
755
|
+
router: {
|
|
756
|
+
navigatePlatform: (path, options) => parent.navigate({ path, options })
|
|
757
|
+
// reloadLocation: parent.reloadLocation,
|
|
758
|
+
},
|
|
746
759
|
editConnectedData,
|
|
747
760
|
type: contextData.locationType,
|
|
748
761
|
isReadOnly: contextData.isReadOnly,
|
|
@@ -773,7 +786,10 @@ async function initializeUniformMeshSDK({
|
|
|
773
786
|
// then we disable autoResizing for the dialog location.
|
|
774
787
|
// Otherwise, autoResizing will likely "overwrite" the specified `contentHeight` value, making
|
|
775
788
|
// developers very sad and confused. No one wants a sad and confused developer.
|
|
776
|
-
autoResizingDisabled
|
|
789
|
+
// Another case for explicit autoResizingDisabled flag is Full Screen Height from the parent (e.g. asset library location),
|
|
790
|
+
// so by default it will be stretch to the maximum height of the parent.
|
|
791
|
+
// Can still be manually enabled by calling sdk.currentWindow?.enableAutoResizing() in mesh app.
|
|
792
|
+
autoResizingDisabled: ((_a = contextData.dialogContext) == null ? void 0 : _a.contentHeight) || contextData.fullScreenHeight ? true : autoResizingDisabled
|
|
777
793
|
}),
|
|
778
794
|
version: contextData.uniformApiVersion,
|
|
779
795
|
openLocationDialog: async ({
|
package/dist/index.mjs
CHANGED
|
@@ -131,7 +131,7 @@ var getLogger = (prefix, debug) => {
|
|
|
131
131
|
};
|
|
132
132
|
|
|
133
133
|
// src/temp/version.ts
|
|
134
|
-
var UNIFORM_MESH_SDK_VERSION = "20.
|
|
134
|
+
var UNIFORM_MESH_SDK_VERSION = "20.14.3";
|
|
135
135
|
|
|
136
136
|
// src/framepost/constants.ts
|
|
137
137
|
var DEFAULT_REQUEST_TIMEOUT = 5e3;
|
|
@@ -518,6 +518,12 @@ async function connectToParent({
|
|
|
518
518
|
timeout: 3e4
|
|
519
519
|
});
|
|
520
520
|
},
|
|
521
|
+
navigate: async (message) => {
|
|
522
|
+
await client.request("navigate", message);
|
|
523
|
+
},
|
|
524
|
+
reloadLocation: async () => {
|
|
525
|
+
await client.request("reload");
|
|
526
|
+
},
|
|
521
527
|
editConnectedData: async (message) => {
|
|
522
528
|
return await client.request(
|
|
523
529
|
"editConnectedData",
|
|
@@ -546,9 +552,11 @@ var createSdkWindow = ({
|
|
|
546
552
|
}
|
|
547
553
|
const windowInstance = window;
|
|
548
554
|
const updateHeight = (height) => {
|
|
549
|
-
if (height
|
|
550
|
-
oldHeight
|
|
551
|
-
|
|
555
|
+
if (height) {
|
|
556
|
+
if (height !== oldHeight) {
|
|
557
|
+
oldHeight = height;
|
|
558
|
+
onHeightChange == null ? void 0 : onHeightChange(height);
|
|
559
|
+
}
|
|
552
560
|
return;
|
|
553
561
|
}
|
|
554
562
|
let maxBottom = windowInstance.document.documentElement.getBoundingClientRect().height;
|
|
@@ -619,6 +627,7 @@ var createSdkWindow = ({
|
|
|
619
627
|
childList: true,
|
|
620
628
|
subtree: true
|
|
621
629
|
});
|
|
630
|
+
updateHeight();
|
|
622
631
|
},
|
|
623
632
|
disableAutoResizing: () => {
|
|
624
633
|
observer == null ? void 0 : observer.disconnect();
|
|
@@ -702,6 +711,10 @@ async function initializeUniformMeshSDK({
|
|
|
702
711
|
getCurrentLocation: () => {
|
|
703
712
|
const location = {
|
|
704
713
|
getDataResource: parent.getDataResource,
|
|
714
|
+
router: {
|
|
715
|
+
navigatePlatform: (path, options) => parent.navigate({ path, options })
|
|
716
|
+
// reloadLocation: parent.reloadLocation,
|
|
717
|
+
},
|
|
705
718
|
editConnectedData,
|
|
706
719
|
type: contextData.locationType,
|
|
707
720
|
isReadOnly: contextData.isReadOnly,
|
|
@@ -732,7 +745,10 @@ async function initializeUniformMeshSDK({
|
|
|
732
745
|
// then we disable autoResizing for the dialog location.
|
|
733
746
|
// Otherwise, autoResizing will likely "overwrite" the specified `contentHeight` value, making
|
|
734
747
|
// developers very sad and confused. No one wants a sad and confused developer.
|
|
735
|
-
autoResizingDisabled
|
|
748
|
+
// Another case for explicit autoResizingDisabled flag is Full Screen Height from the parent (e.g. asset library location),
|
|
749
|
+
// so by default it will be stretch to the maximum height of the parent.
|
|
750
|
+
// Can still be manually enabled by calling sdk.currentWindow?.enableAutoResizing() in mesh app.
|
|
751
|
+
autoResizingDisabled: ((_a = contextData.dialogContext) == null ? void 0 : _a.contentHeight) || contextData.fullScreenHeight ? true : autoResizingDisabled
|
|
736
752
|
}),
|
|
737
753
|
version: contextData.uniformApiVersion,
|
|
738
754
|
openLocationDialog: async ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/mesh-sdk",
|
|
3
|
-
"version": "20.7.1-alpha.
|
|
3
|
+
"version": "20.7.1-alpha.42+580f8a1849",
|
|
4
4
|
"description": "Uniform Mesh Framework SDK",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"lint": "eslint \"src/**/*.{js,ts,tsx}\"",
|
|
26
26
|
"format": "prettier --write \"src/**/*.{js,ts,tsx}\"",
|
|
27
27
|
"update-openapi": "tsx ./scripts/update-openapi.cts",
|
|
28
|
-
"document": "api-extractor run --local"
|
|
28
|
+
"document:prebuild": "api-extractor run --local"
|
|
29
29
|
},
|
|
30
30
|
"files": [
|
|
31
31
|
"/dist"
|
|
@@ -34,16 +34,16 @@
|
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@uniformdev/assets": "20.7.1-alpha.
|
|
38
|
-
"@uniformdev/canvas": "20.7.1-alpha.
|
|
39
|
-
"@uniformdev/context": "20.7.1-alpha.
|
|
40
|
-
"@uniformdev/project-map": "20.7.1-alpha.
|
|
37
|
+
"@uniformdev/assets": "20.7.1-alpha.42+580f8a1849",
|
|
38
|
+
"@uniformdev/canvas": "20.7.1-alpha.42+580f8a1849",
|
|
39
|
+
"@uniformdev/context": "20.7.1-alpha.42+580f8a1849",
|
|
40
|
+
"@uniformdev/project-map": "20.7.1-alpha.42+580f8a1849",
|
|
41
41
|
"imagesloaded": "^5.0.0",
|
|
42
42
|
"mitt": "^3.0.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/imagesloaded": "^4.1.2",
|
|
46
|
-
"openai": "
|
|
46
|
+
"openai": "4.94.0"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "580f8a1849984760d11edb936da050eb05e28313"
|
|
49
49
|
}
|