@uniformdev/mesh-sdk 20.6.2-alpha.11 → 20.7.1-alpha.102
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/LICENSE.txt +1 -1
- package/dist/index.d.mts +164 -20
- package/dist/index.d.ts +164 -20
- package/dist/index.esm.js +21 -5
- package/dist/index.js +21 -5
- package/dist/index.mjs +21 -5
- package/package.json +8 -9
package/LICENSE.txt
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
©
|
|
1
|
+
© 2025 Uniform Systems, Inc. All Rights Reserved.
|
|
2
2
|
See details of Uniform Systems, Inc. Master Subscription Agreement here: https://uniform.dev/eula
|
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
|
|
|
@@ -113,7 +113,13 @@ interface paths$1 {
|
|
|
113
113
|
entryPattern?: {
|
|
114
114
|
url: string;
|
|
115
115
|
};
|
|
116
|
-
}
|
|
116
|
+
} | {
|
|
117
|
+
id: string;
|
|
118
|
+
name: string;
|
|
119
|
+
url: string;
|
|
120
|
+
iconUrl?: string;
|
|
121
|
+
editorTypes?: ("composition" | "componentPattern" | "compositionDefaults" | "entry" | "entryPattern")[];
|
|
122
|
+
}[];
|
|
117
123
|
personalization?: {
|
|
118
124
|
selectionAlgorithms?: {
|
|
119
125
|
[key: string]: {
|
|
@@ -233,15 +239,34 @@ interface paths$1 {
|
|
|
233
239
|
definition: {
|
|
234
240
|
name: string;
|
|
235
241
|
description: string;
|
|
236
|
-
parameters
|
|
242
|
+
parameters: {
|
|
237
243
|
[key: string]: unknown;
|
|
238
244
|
};
|
|
245
|
+
strict: boolean;
|
|
239
246
|
};
|
|
240
247
|
systemParameters?: "pageHtml"[];
|
|
241
248
|
includedAgents?: ("scout" | "sage")[];
|
|
242
249
|
}[];
|
|
243
250
|
};
|
|
244
251
|
};
|
|
252
|
+
tools?: {
|
|
253
|
+
id: string;
|
|
254
|
+
name: string;
|
|
255
|
+
url: string;
|
|
256
|
+
iconUrl?: string;
|
|
257
|
+
}[];
|
|
258
|
+
projectTools?: {
|
|
259
|
+
id: string;
|
|
260
|
+
name: string;
|
|
261
|
+
url: string;
|
|
262
|
+
iconUrl?: string;
|
|
263
|
+
}[];
|
|
264
|
+
dashboardTools?: {
|
|
265
|
+
id: string;
|
|
266
|
+
name: string;
|
|
267
|
+
url: string;
|
|
268
|
+
iconUrl?: string;
|
|
269
|
+
}[];
|
|
245
270
|
};
|
|
246
271
|
unstable_prompts?: {
|
|
247
272
|
/** Format: uuid */
|
|
@@ -366,7 +391,13 @@ interface paths$1 {
|
|
|
366
391
|
entryPattern?: {
|
|
367
392
|
url: string;
|
|
368
393
|
};
|
|
369
|
-
}
|
|
394
|
+
} | {
|
|
395
|
+
id: string;
|
|
396
|
+
name: string;
|
|
397
|
+
url: string;
|
|
398
|
+
iconUrl?: string;
|
|
399
|
+
editorTypes?: ("composition" | "componentPattern" | "compositionDefaults" | "entry" | "entryPattern")[];
|
|
400
|
+
}[];
|
|
370
401
|
personalization?: {
|
|
371
402
|
selectionAlgorithms?: {
|
|
372
403
|
[key: string]: {
|
|
@@ -486,15 +517,34 @@ interface paths$1 {
|
|
|
486
517
|
definition: {
|
|
487
518
|
name: string;
|
|
488
519
|
description: string;
|
|
489
|
-
parameters
|
|
520
|
+
parameters: {
|
|
490
521
|
[key: string]: unknown;
|
|
491
522
|
};
|
|
523
|
+
strict: boolean;
|
|
492
524
|
};
|
|
493
525
|
systemParameters?: "pageHtml"[];
|
|
494
526
|
includedAgents?: ("scout" | "sage")[];
|
|
495
527
|
}[];
|
|
496
528
|
};
|
|
497
529
|
};
|
|
530
|
+
tools?: {
|
|
531
|
+
id: string;
|
|
532
|
+
name: string;
|
|
533
|
+
url: string;
|
|
534
|
+
iconUrl?: string;
|
|
535
|
+
}[];
|
|
536
|
+
projectTools?: {
|
|
537
|
+
id: string;
|
|
538
|
+
name: string;
|
|
539
|
+
url: string;
|
|
540
|
+
iconUrl?: string;
|
|
541
|
+
}[];
|
|
542
|
+
dashboardTools?: {
|
|
543
|
+
id: string;
|
|
544
|
+
name: string;
|
|
545
|
+
url: string;
|
|
546
|
+
iconUrl?: string;
|
|
547
|
+
}[];
|
|
498
548
|
};
|
|
499
549
|
unstable_prompts?: {
|
|
500
550
|
/** Format: uuid */
|
|
@@ -604,7 +654,13 @@ interface paths$1 {
|
|
|
604
654
|
entryPattern?: {
|
|
605
655
|
url: string;
|
|
606
656
|
};
|
|
607
|
-
}
|
|
657
|
+
} | {
|
|
658
|
+
id: string;
|
|
659
|
+
name: string;
|
|
660
|
+
url: string;
|
|
661
|
+
iconUrl?: string;
|
|
662
|
+
editorTypes?: ("composition" | "componentPattern" | "compositionDefaults" | "entry" | "entryPattern")[];
|
|
663
|
+
}[];
|
|
608
664
|
personalization?: {
|
|
609
665
|
selectionAlgorithms?: {
|
|
610
666
|
[key: string]: {
|
|
@@ -724,15 +780,34 @@ interface paths$1 {
|
|
|
724
780
|
definition: {
|
|
725
781
|
name: string;
|
|
726
782
|
description: string;
|
|
727
|
-
parameters
|
|
783
|
+
parameters: {
|
|
728
784
|
[key: string]: unknown;
|
|
729
785
|
};
|
|
786
|
+
strict: boolean;
|
|
730
787
|
};
|
|
731
788
|
systemParameters?: "pageHtml"[];
|
|
732
789
|
includedAgents?: ("scout" | "sage")[];
|
|
733
790
|
}[];
|
|
734
791
|
};
|
|
735
792
|
};
|
|
793
|
+
tools?: {
|
|
794
|
+
id: string;
|
|
795
|
+
name: string;
|
|
796
|
+
url: string;
|
|
797
|
+
iconUrl?: string;
|
|
798
|
+
}[];
|
|
799
|
+
projectTools?: {
|
|
800
|
+
id: string;
|
|
801
|
+
name: string;
|
|
802
|
+
url: string;
|
|
803
|
+
iconUrl?: string;
|
|
804
|
+
}[];
|
|
805
|
+
dashboardTools?: {
|
|
806
|
+
id: string;
|
|
807
|
+
name: string;
|
|
808
|
+
url: string;
|
|
809
|
+
iconUrl?: string;
|
|
810
|
+
}[];
|
|
736
811
|
};
|
|
737
812
|
unstable_prompts?: {
|
|
738
813
|
/** Format: uuid */
|
|
@@ -948,7 +1023,6 @@ interface paths {
|
|
|
948
1023
|
* @description The project ID
|
|
949
1024
|
*/
|
|
950
1025
|
projectId: string;
|
|
951
|
-
/** @description Whether to match the passed type exactly or to treat the type as a prefix */
|
|
952
1026
|
exactType?: boolean | null;
|
|
953
1027
|
type: string;
|
|
954
1028
|
data?: {
|
|
@@ -991,7 +1065,6 @@ interface paths {
|
|
|
991
1065
|
projectId: string;
|
|
992
1066
|
/** @description The integration type to remove */
|
|
993
1067
|
type: string;
|
|
994
|
-
/** @description Whether to match the passed type exactly or to treat the type as a prefix */
|
|
995
1068
|
exactType?: boolean | null;
|
|
996
1069
|
};
|
|
997
1070
|
};
|
|
@@ -1200,7 +1273,13 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
|
1200
1273
|
entryPattern?: {
|
|
1201
1274
|
url: string;
|
|
1202
1275
|
};
|
|
1203
|
-
}
|
|
1276
|
+
} | {
|
|
1277
|
+
id: string;
|
|
1278
|
+
name: string;
|
|
1279
|
+
url: string;
|
|
1280
|
+
iconUrl?: string;
|
|
1281
|
+
editorTypes?: ("composition" | "componentPattern" | "compositionDefaults" | "entry" | "entryPattern")[];
|
|
1282
|
+
}[];
|
|
1204
1283
|
personalization?: {
|
|
1205
1284
|
selectionAlgorithms?: {
|
|
1206
1285
|
[key: string]: {
|
|
@@ -1311,15 +1390,34 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
|
1311
1390
|
definition: {
|
|
1312
1391
|
name: string;
|
|
1313
1392
|
description: string;
|
|
1314
|
-
parameters
|
|
1393
|
+
parameters: {
|
|
1315
1394
|
[key: string]: unknown;
|
|
1316
1395
|
};
|
|
1396
|
+
strict: boolean;
|
|
1317
1397
|
};
|
|
1318
1398
|
systemParameters?: "pageHtml"[];
|
|
1319
1399
|
includedAgents?: ("scout" | "sage")[];
|
|
1320
1400
|
}[];
|
|
1321
1401
|
};
|
|
1322
1402
|
};
|
|
1403
|
+
tools?: {
|
|
1404
|
+
id: string;
|
|
1405
|
+
name: string;
|
|
1406
|
+
url: string;
|
|
1407
|
+
iconUrl?: string;
|
|
1408
|
+
}[];
|
|
1409
|
+
projectTools?: {
|
|
1410
|
+
id: string;
|
|
1411
|
+
name: string;
|
|
1412
|
+
url: string;
|
|
1413
|
+
iconUrl?: string;
|
|
1414
|
+
}[];
|
|
1415
|
+
dashboardTools?: {
|
|
1416
|
+
id: string;
|
|
1417
|
+
name: string;
|
|
1418
|
+
url: string;
|
|
1419
|
+
iconUrl?: string;
|
|
1420
|
+
}[];
|
|
1323
1421
|
};
|
|
1324
1422
|
unstable_prompts?: {
|
|
1325
1423
|
id: string;
|
|
@@ -1388,7 +1486,11 @@ type FunctionCallSystemParameter = (typeof functionCallSystemParameters)[number]
|
|
|
1388
1486
|
declare function parseFunctionCall<Parameters extends Record<string, string>, Settings = Record<string, string>>(request: Pick<Request, 'body'>): {
|
|
1389
1487
|
functionCall: {
|
|
1390
1488
|
arguments: Parameters;
|
|
1489
|
+
call_id: string;
|
|
1391
1490
|
name: string;
|
|
1491
|
+
type: "function_call";
|
|
1492
|
+
id?: string;
|
|
1493
|
+
status?: "in_progress" | "completed" | "incomplete";
|
|
1392
1494
|
};
|
|
1393
1495
|
settings: Settings;
|
|
1394
1496
|
systemParameters: Record<FunctionCallSystemParameter, string | undefined>;
|
|
@@ -1419,6 +1521,9 @@ type AssetParameterLocationMetadata<TIntegrationConfiguration = unknown> = Commo
|
|
|
1419
1521
|
type AssetLibraryLocation = MeshLocationCore<unknown, AssetLibraryLocationMetadata, unknown, 'assetLibrary'> & GetDataResourceLocation;
|
|
1420
1522
|
type AssetParameterLocation = MeshLocationCore<AssetParamValue, AssetParameterLocationMetadata, AssetParamValue, 'assetParameter'> & GetDataResourceLocation;
|
|
1421
1523
|
|
|
1524
|
+
type DashboardToolLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<unknown, TIntegrationConfiguration>;
|
|
1525
|
+
type DashboardToolLocation<TTool, TIntegrationConfiguration = unknown> = MeshLocationCore<TTool, DashboardToolLocationMetadata<TIntegrationConfiguration>, TTool, 'dashboardTool'>;
|
|
1526
|
+
|
|
1422
1527
|
type DataTypeLocationValue = Pick<DataType, 'body' | 'method' | 'path' | 'custom' | 'headers' | 'parameters' | 'variables'>;
|
|
1423
1528
|
type DataConnectorInfo = {
|
|
1424
1529
|
type: string;
|
|
@@ -1464,7 +1569,9 @@ type DataSourceLocationMetadata<TIntegrationConfiguration = unknown> = CommonMet
|
|
|
1464
1569
|
type DataSourceLocation = MeshLocationCore<DataSourceLocationValue, DataSourceLocationMetadata, DataSourceLocationValue, 'dataSource'>;
|
|
1465
1570
|
|
|
1466
1571
|
type ParamTypeLocationMetadata<TParamConfiguration = unknown, TIntegrationConfiguration = unknown> = CommonMetadata<{
|
|
1467
|
-
rootNode: Omit<RootComponentInstance, 'slots' | '_data'
|
|
1572
|
+
rootNode: Omit<RootComponentInstance, 'slots' | '_data'> & {
|
|
1573
|
+
_editionId?: string;
|
|
1574
|
+
};
|
|
1468
1575
|
parameterConfiguration: TParamConfiguration;
|
|
1469
1576
|
component: Omit<ComponentInstance, 'slots'>;
|
|
1470
1577
|
componentDefinitions: Record<string, ComponentDefinition | undefined>;
|
|
@@ -1504,16 +1611,14 @@ type ParamTypeLocation<TParamValue = unknown, TParamConfiguration = unknown, TPa
|
|
|
1504
1611
|
editConnectedData: Awaited<ReturnType<typeof connectToParent>>['parent']['editConnectedData'];
|
|
1505
1612
|
};
|
|
1506
1613
|
|
|
1507
|
-
type SettingsLocationMetadata = CommonMetadata
|
|
1508
|
-
locales: Locale[];
|
|
1509
|
-
};
|
|
1614
|
+
type SettingsLocationMetadata = CommonMetadata;
|
|
1510
1615
|
type SettingsLocation<TSettingsType> = MeshLocationCore<TSettingsType, SettingsLocationMetadata, TSettingsType, 'settings'>;
|
|
1511
1616
|
|
|
1512
1617
|
/**
|
|
1513
1618
|
* Defines methods used for interacting with a Mesh location
|
|
1514
1619
|
* To receive useful typings, check the `type` property of the location to narrow the typing.
|
|
1515
1620
|
*/
|
|
1516
|
-
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>;
|
|
1621
|
+
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> | DashboardToolLocation<TValue> | ProjectToolLocation<TValue>;
|
|
1517
1622
|
interface MeshContextData {
|
|
1518
1623
|
locationKey: string;
|
|
1519
1624
|
locationType: MeshLocationTypes;
|
|
@@ -1522,6 +1627,7 @@ interface MeshContextData {
|
|
|
1522
1627
|
locationMetadata: any;
|
|
1523
1628
|
uniformApiVersion: string;
|
|
1524
1629
|
dialogContext?: DialogContext;
|
|
1630
|
+
fullScreenHeight?: boolean;
|
|
1525
1631
|
}
|
|
1526
1632
|
interface DialogContext {
|
|
1527
1633
|
dialogId: string;
|
|
@@ -1620,6 +1726,13 @@ type OpenDialogMessage = {
|
|
|
1620
1726
|
dialogData: unknown;
|
|
1621
1727
|
options?: DialogOptions;
|
|
1622
1728
|
};
|
|
1729
|
+
type NavigateMessage = {
|
|
1730
|
+
path: string;
|
|
1731
|
+
options?: {
|
|
1732
|
+
projectId?: string;
|
|
1733
|
+
target?: '_blank';
|
|
1734
|
+
};
|
|
1735
|
+
};
|
|
1623
1736
|
type CloseDialogMessage = {
|
|
1624
1737
|
dialogId: string | undefined;
|
|
1625
1738
|
dialogType: DialogType;
|
|
@@ -1694,6 +1807,8 @@ declare function connectToParent({ dialogResponseHandlers, onMetadataUpdated, on
|
|
|
1694
1807
|
openDialog: (message: OpenDialogMessage) => Promise<Pick<DialogResponseData, "value" | "dialogId"> | undefined>;
|
|
1695
1808
|
closeDialog: (message: CloseDialogMessage) => Promise<void>;
|
|
1696
1809
|
getDataResource: <TExpectedResult>(message: GetDataResourceMessage) => Promise<TExpectedResult>;
|
|
1810
|
+
navigate: (message: NavigateMessage) => Promise<void>;
|
|
1811
|
+
reloadLocation: () => Promise<void>;
|
|
1697
1812
|
editConnectedData: (message: EditConnectedDataMessage) => Promise<EditConnectedDataResponse>;
|
|
1698
1813
|
};
|
|
1699
1814
|
}>;
|
|
@@ -1718,6 +1833,10 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
|
|
|
1718
1833
|
* Each location has a specific type of metadata that it is provided, which is typed automatically when the location is known.
|
|
1719
1834
|
*/
|
|
1720
1835
|
metadata: TMetadata;
|
|
1836
|
+
/**
|
|
1837
|
+
* A router object that can be used to navigate parent frame (Uniform App) to other page within current project and other methods.
|
|
1838
|
+
*/
|
|
1839
|
+
router: MeshRouter;
|
|
1721
1840
|
/**
|
|
1722
1841
|
* Context of a location when it is rendering inside a dialog in the Uniform app.
|
|
1723
1842
|
* This is set when:
|
|
@@ -1735,6 +1854,23 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
|
|
|
1735
1854
|
returnDialogValue: (value: unknown) => Promise<void>;
|
|
1736
1855
|
};
|
|
1737
1856
|
}
|
|
1857
|
+
type MeshRouter = {
|
|
1858
|
+
/**
|
|
1859
|
+
* Navigate parent frame (Uniform App) to a new path within current project.
|
|
1860
|
+
*
|
|
1861
|
+
* So router.navigate('/canvas/edit/{compositionId}') will navigate will open the composition editor for the given composition ID in the parent frame.
|
|
1862
|
+
* Be aware that most of the time it will close your mesh app, so you should use it with caution.
|
|
1863
|
+
*
|
|
1864
|
+
* @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.
|
|
1865
|
+
* @param options - The options for the navigation.
|
|
1866
|
+
* @param options.projectId - You can specify project ID to navigate to. By default the current project ID is used.
|
|
1867
|
+
* @param options.target - Allows to open a new tab instead of navigating the current one.
|
|
1868
|
+
*/
|
|
1869
|
+
navigatePlatform: (path: string, options?: {
|
|
1870
|
+
projectId?: string;
|
|
1871
|
+
target?: '_blank';
|
|
1872
|
+
}) => void;
|
|
1873
|
+
};
|
|
1738
1874
|
/** Common metadata for all mesh locations */
|
|
1739
1875
|
type CommonMetadata<ExtendedMetadata = unknown, TIntegrationConfiguration = unknown> = {
|
|
1740
1876
|
/** The current Uniform user context. Contains name, email and context to check for permissions */
|
|
@@ -1745,6 +1881,8 @@ type CommonMetadata<ExtendedMetadata = unknown, TIntegrationConfiguration = unkn
|
|
|
1745
1881
|
dashboardOrigin: string;
|
|
1746
1882
|
/** Settings defined at the integration level (arbitrary type used on settings location) */
|
|
1747
1883
|
settings: TIntegrationConfiguration;
|
|
1884
|
+
/** List if enabled Uniform Project locales */
|
|
1885
|
+
locales: Locale[];
|
|
1748
1886
|
} & ExtendedMetadata;
|
|
1749
1887
|
type MeshLocationUserPermissions =
|
|
1750
1888
|
/** Uniform Context:Enrichments:Create */
|
|
@@ -1813,6 +1951,10 @@ type MeshLocationUserPermissions =
|
|
|
1813
1951
|
| 'COMPOSITIONS_READ_DRAFT'
|
|
1814
1952
|
/** Uniform Canvas:Component Library:Manage|Create, update, and delete component library data */
|
|
1815
1953
|
| 'COMPOSITIONS_MANAGE_SCHEMA'
|
|
1954
|
+
/** Uniform Canvas:Content Types:Manage|Create, update, and delete content types */
|
|
1955
|
+
| 'ENTRIES_MANAGE_SCHEMA'
|
|
1956
|
+
/** Uniform Canvas:AI Prompts:Manage|Create, update, and delete AI prompts */
|
|
1957
|
+
| 'PROMPTS_MANAGE_SCHEMA'
|
|
1816
1958
|
/** UTM Mapper:Read|Read UTM mapper configuration */
|
|
1817
1959
|
| 'UTM_MAPPER_READ'
|
|
1818
1960
|
/** UTM Mapper:Read|Create, update and delete UTM mapper configuration */
|
|
@@ -1828,7 +1970,7 @@ type MeshLocationUserPermissions =
|
|
|
1828
1970
|
/**
|
|
1829
1971
|
* Known location types that can be passed to a mesh location
|
|
1830
1972
|
*/
|
|
1831
|
-
type MeshLocationTypes = 'paramType' | 'paramTypeConfig' | 'assetLibrary' | 'assetParameter' | 'settings' | 'dataSource' | 'dataType' | 'dataResource' | 'aiGenerate' | 'embeddedEditor' | 'canvasEditorTools' | 'aiMetadata' | 'personalizationCriteria';
|
|
1973
|
+
type MeshLocationTypes = 'paramType' | 'paramTypeConfig' | 'assetLibrary' | 'assetParameter' | 'settings' | 'dataSource' | 'dataType' | 'dataResource' | 'aiGenerate' | 'embeddedEditor' | 'canvasEditorTools' | 'aiMetadata' | 'personalizationCriteria' | 'dashboardTool' | 'projectTool';
|
|
1832
1974
|
type SetValueOptions = ValidationResult;
|
|
1833
1975
|
type SetValueMessage = {
|
|
1834
1976
|
uniformMeshLocationValue: unknown;
|
|
@@ -1870,7 +2012,6 @@ type AIPromptMetadataLocation = MeshLocationCore<Record<string, unknown>, Prompt
|
|
|
1870
2012
|
type CanvasEditorToolsLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<{
|
|
1871
2013
|
releaseId?: string;
|
|
1872
2014
|
state?: number;
|
|
1873
|
-
locales: Locale[];
|
|
1874
2015
|
}, TIntegrationConfiguration>;
|
|
1875
2016
|
type CanvasEditorToolsReferenceData = {
|
|
1876
2017
|
name: string;
|
|
@@ -1949,6 +2090,9 @@ type PersonalizationCriteriaLocationMetadata<TIntegrationConfiguration = unknown
|
|
|
1949
2090
|
/** @deprecated Experimental functionality is subject to change in minor versions. */
|
|
1950
2091
|
type PersonalizationCriteriaLocation<TCriteriaValue, TIntegrationConfiguration = unknown> = MeshLocationCore<TCriteriaValue | undefined, PersonalizationCriteriaLocationMetadata<TIntegrationConfiguration>, TCriteriaValue, 'personalizationCriteria'>;
|
|
1951
2092
|
|
|
2093
|
+
type ProjectToolLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<unknown, TIntegrationConfiguration>;
|
|
2094
|
+
type ProjectToolLocation<TTool, TIntegrationConfiguration = unknown> = MeshLocationCore<TTool, ProjectToolLocationMetadata<TIntegrationConfiguration>, TTool, 'projectTool'>;
|
|
2095
|
+
|
|
1952
2096
|
interface SdkWindow {
|
|
1953
2097
|
/** The current window object. */
|
|
1954
2098
|
instance: Window;
|
|
@@ -2052,4 +2196,4 @@ declare const hasPermissions: (permissions: MeshLocationUserPermissions | MeshLo
|
|
|
2052
2196
|
*/
|
|
2053
2197
|
declare const hasRole: (role: string, user: UniformUser) => boolean;
|
|
2054
2198
|
|
|
2055
|
-
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 PersonalizationCriteriaLocation, type PersonalizationCriteriaLocationMetadata, 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 };
|
|
2199
|
+
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 DashboardToolLocation, type DashboardToolLocationMetadata, 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 ProjectToolLocation, type ProjectToolLocationMetadata, 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 };
|
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
|
|
|
@@ -113,7 +113,13 @@ interface paths$1 {
|
|
|
113
113
|
entryPattern?: {
|
|
114
114
|
url: string;
|
|
115
115
|
};
|
|
116
|
-
}
|
|
116
|
+
} | {
|
|
117
|
+
id: string;
|
|
118
|
+
name: string;
|
|
119
|
+
url: string;
|
|
120
|
+
iconUrl?: string;
|
|
121
|
+
editorTypes?: ("composition" | "componentPattern" | "compositionDefaults" | "entry" | "entryPattern")[];
|
|
122
|
+
}[];
|
|
117
123
|
personalization?: {
|
|
118
124
|
selectionAlgorithms?: {
|
|
119
125
|
[key: string]: {
|
|
@@ -233,15 +239,34 @@ interface paths$1 {
|
|
|
233
239
|
definition: {
|
|
234
240
|
name: string;
|
|
235
241
|
description: string;
|
|
236
|
-
parameters
|
|
242
|
+
parameters: {
|
|
237
243
|
[key: string]: unknown;
|
|
238
244
|
};
|
|
245
|
+
strict: boolean;
|
|
239
246
|
};
|
|
240
247
|
systemParameters?: "pageHtml"[];
|
|
241
248
|
includedAgents?: ("scout" | "sage")[];
|
|
242
249
|
}[];
|
|
243
250
|
};
|
|
244
251
|
};
|
|
252
|
+
tools?: {
|
|
253
|
+
id: string;
|
|
254
|
+
name: string;
|
|
255
|
+
url: string;
|
|
256
|
+
iconUrl?: string;
|
|
257
|
+
}[];
|
|
258
|
+
projectTools?: {
|
|
259
|
+
id: string;
|
|
260
|
+
name: string;
|
|
261
|
+
url: string;
|
|
262
|
+
iconUrl?: string;
|
|
263
|
+
}[];
|
|
264
|
+
dashboardTools?: {
|
|
265
|
+
id: string;
|
|
266
|
+
name: string;
|
|
267
|
+
url: string;
|
|
268
|
+
iconUrl?: string;
|
|
269
|
+
}[];
|
|
245
270
|
};
|
|
246
271
|
unstable_prompts?: {
|
|
247
272
|
/** Format: uuid */
|
|
@@ -366,7 +391,13 @@ interface paths$1 {
|
|
|
366
391
|
entryPattern?: {
|
|
367
392
|
url: string;
|
|
368
393
|
};
|
|
369
|
-
}
|
|
394
|
+
} | {
|
|
395
|
+
id: string;
|
|
396
|
+
name: string;
|
|
397
|
+
url: string;
|
|
398
|
+
iconUrl?: string;
|
|
399
|
+
editorTypes?: ("composition" | "componentPattern" | "compositionDefaults" | "entry" | "entryPattern")[];
|
|
400
|
+
}[];
|
|
370
401
|
personalization?: {
|
|
371
402
|
selectionAlgorithms?: {
|
|
372
403
|
[key: string]: {
|
|
@@ -486,15 +517,34 @@ interface paths$1 {
|
|
|
486
517
|
definition: {
|
|
487
518
|
name: string;
|
|
488
519
|
description: string;
|
|
489
|
-
parameters
|
|
520
|
+
parameters: {
|
|
490
521
|
[key: string]: unknown;
|
|
491
522
|
};
|
|
523
|
+
strict: boolean;
|
|
492
524
|
};
|
|
493
525
|
systemParameters?: "pageHtml"[];
|
|
494
526
|
includedAgents?: ("scout" | "sage")[];
|
|
495
527
|
}[];
|
|
496
528
|
};
|
|
497
529
|
};
|
|
530
|
+
tools?: {
|
|
531
|
+
id: string;
|
|
532
|
+
name: string;
|
|
533
|
+
url: string;
|
|
534
|
+
iconUrl?: string;
|
|
535
|
+
}[];
|
|
536
|
+
projectTools?: {
|
|
537
|
+
id: string;
|
|
538
|
+
name: string;
|
|
539
|
+
url: string;
|
|
540
|
+
iconUrl?: string;
|
|
541
|
+
}[];
|
|
542
|
+
dashboardTools?: {
|
|
543
|
+
id: string;
|
|
544
|
+
name: string;
|
|
545
|
+
url: string;
|
|
546
|
+
iconUrl?: string;
|
|
547
|
+
}[];
|
|
498
548
|
};
|
|
499
549
|
unstable_prompts?: {
|
|
500
550
|
/** Format: uuid */
|
|
@@ -604,7 +654,13 @@ interface paths$1 {
|
|
|
604
654
|
entryPattern?: {
|
|
605
655
|
url: string;
|
|
606
656
|
};
|
|
607
|
-
}
|
|
657
|
+
} | {
|
|
658
|
+
id: string;
|
|
659
|
+
name: string;
|
|
660
|
+
url: string;
|
|
661
|
+
iconUrl?: string;
|
|
662
|
+
editorTypes?: ("composition" | "componentPattern" | "compositionDefaults" | "entry" | "entryPattern")[];
|
|
663
|
+
}[];
|
|
608
664
|
personalization?: {
|
|
609
665
|
selectionAlgorithms?: {
|
|
610
666
|
[key: string]: {
|
|
@@ -724,15 +780,34 @@ interface paths$1 {
|
|
|
724
780
|
definition: {
|
|
725
781
|
name: string;
|
|
726
782
|
description: string;
|
|
727
|
-
parameters
|
|
783
|
+
parameters: {
|
|
728
784
|
[key: string]: unknown;
|
|
729
785
|
};
|
|
786
|
+
strict: boolean;
|
|
730
787
|
};
|
|
731
788
|
systemParameters?: "pageHtml"[];
|
|
732
789
|
includedAgents?: ("scout" | "sage")[];
|
|
733
790
|
}[];
|
|
734
791
|
};
|
|
735
792
|
};
|
|
793
|
+
tools?: {
|
|
794
|
+
id: string;
|
|
795
|
+
name: string;
|
|
796
|
+
url: string;
|
|
797
|
+
iconUrl?: string;
|
|
798
|
+
}[];
|
|
799
|
+
projectTools?: {
|
|
800
|
+
id: string;
|
|
801
|
+
name: string;
|
|
802
|
+
url: string;
|
|
803
|
+
iconUrl?: string;
|
|
804
|
+
}[];
|
|
805
|
+
dashboardTools?: {
|
|
806
|
+
id: string;
|
|
807
|
+
name: string;
|
|
808
|
+
url: string;
|
|
809
|
+
iconUrl?: string;
|
|
810
|
+
}[];
|
|
736
811
|
};
|
|
737
812
|
unstable_prompts?: {
|
|
738
813
|
/** Format: uuid */
|
|
@@ -948,7 +1023,6 @@ interface paths {
|
|
|
948
1023
|
* @description The project ID
|
|
949
1024
|
*/
|
|
950
1025
|
projectId: string;
|
|
951
|
-
/** @description Whether to match the passed type exactly or to treat the type as a prefix */
|
|
952
1026
|
exactType?: boolean | null;
|
|
953
1027
|
type: string;
|
|
954
1028
|
data?: {
|
|
@@ -991,7 +1065,6 @@ interface paths {
|
|
|
991
1065
|
projectId: string;
|
|
992
1066
|
/** @description The integration type to remove */
|
|
993
1067
|
type: string;
|
|
994
|
-
/** @description Whether to match the passed type exactly or to treat the type as a prefix */
|
|
995
1068
|
exactType?: boolean | null;
|
|
996
1069
|
};
|
|
997
1070
|
};
|
|
@@ -1200,7 +1273,13 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
|
1200
1273
|
entryPattern?: {
|
|
1201
1274
|
url: string;
|
|
1202
1275
|
};
|
|
1203
|
-
}
|
|
1276
|
+
} | {
|
|
1277
|
+
id: string;
|
|
1278
|
+
name: string;
|
|
1279
|
+
url: string;
|
|
1280
|
+
iconUrl?: string;
|
|
1281
|
+
editorTypes?: ("composition" | "componentPattern" | "compositionDefaults" | "entry" | "entryPattern")[];
|
|
1282
|
+
}[];
|
|
1204
1283
|
personalization?: {
|
|
1205
1284
|
selectionAlgorithms?: {
|
|
1206
1285
|
[key: string]: {
|
|
@@ -1311,15 +1390,34 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
|
1311
1390
|
definition: {
|
|
1312
1391
|
name: string;
|
|
1313
1392
|
description: string;
|
|
1314
|
-
parameters
|
|
1393
|
+
parameters: {
|
|
1315
1394
|
[key: string]: unknown;
|
|
1316
1395
|
};
|
|
1396
|
+
strict: boolean;
|
|
1317
1397
|
};
|
|
1318
1398
|
systemParameters?: "pageHtml"[];
|
|
1319
1399
|
includedAgents?: ("scout" | "sage")[];
|
|
1320
1400
|
}[];
|
|
1321
1401
|
};
|
|
1322
1402
|
};
|
|
1403
|
+
tools?: {
|
|
1404
|
+
id: string;
|
|
1405
|
+
name: string;
|
|
1406
|
+
url: string;
|
|
1407
|
+
iconUrl?: string;
|
|
1408
|
+
}[];
|
|
1409
|
+
projectTools?: {
|
|
1410
|
+
id: string;
|
|
1411
|
+
name: string;
|
|
1412
|
+
url: string;
|
|
1413
|
+
iconUrl?: string;
|
|
1414
|
+
}[];
|
|
1415
|
+
dashboardTools?: {
|
|
1416
|
+
id: string;
|
|
1417
|
+
name: string;
|
|
1418
|
+
url: string;
|
|
1419
|
+
iconUrl?: string;
|
|
1420
|
+
}[];
|
|
1323
1421
|
};
|
|
1324
1422
|
unstable_prompts?: {
|
|
1325
1423
|
id: string;
|
|
@@ -1388,7 +1486,11 @@ type FunctionCallSystemParameter = (typeof functionCallSystemParameters)[number]
|
|
|
1388
1486
|
declare function parseFunctionCall<Parameters extends Record<string, string>, Settings = Record<string, string>>(request: Pick<Request, 'body'>): {
|
|
1389
1487
|
functionCall: {
|
|
1390
1488
|
arguments: Parameters;
|
|
1489
|
+
call_id: string;
|
|
1391
1490
|
name: string;
|
|
1491
|
+
type: "function_call";
|
|
1492
|
+
id?: string;
|
|
1493
|
+
status?: "in_progress" | "completed" | "incomplete";
|
|
1392
1494
|
};
|
|
1393
1495
|
settings: Settings;
|
|
1394
1496
|
systemParameters: Record<FunctionCallSystemParameter, string | undefined>;
|
|
@@ -1419,6 +1521,9 @@ type AssetParameterLocationMetadata<TIntegrationConfiguration = unknown> = Commo
|
|
|
1419
1521
|
type AssetLibraryLocation = MeshLocationCore<unknown, AssetLibraryLocationMetadata, unknown, 'assetLibrary'> & GetDataResourceLocation;
|
|
1420
1522
|
type AssetParameterLocation = MeshLocationCore<AssetParamValue, AssetParameterLocationMetadata, AssetParamValue, 'assetParameter'> & GetDataResourceLocation;
|
|
1421
1523
|
|
|
1524
|
+
type DashboardToolLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<unknown, TIntegrationConfiguration>;
|
|
1525
|
+
type DashboardToolLocation<TTool, TIntegrationConfiguration = unknown> = MeshLocationCore<TTool, DashboardToolLocationMetadata<TIntegrationConfiguration>, TTool, 'dashboardTool'>;
|
|
1526
|
+
|
|
1422
1527
|
type DataTypeLocationValue = Pick<DataType, 'body' | 'method' | 'path' | 'custom' | 'headers' | 'parameters' | 'variables'>;
|
|
1423
1528
|
type DataConnectorInfo = {
|
|
1424
1529
|
type: string;
|
|
@@ -1464,7 +1569,9 @@ type DataSourceLocationMetadata<TIntegrationConfiguration = unknown> = CommonMet
|
|
|
1464
1569
|
type DataSourceLocation = MeshLocationCore<DataSourceLocationValue, DataSourceLocationMetadata, DataSourceLocationValue, 'dataSource'>;
|
|
1465
1570
|
|
|
1466
1571
|
type ParamTypeLocationMetadata<TParamConfiguration = unknown, TIntegrationConfiguration = unknown> = CommonMetadata<{
|
|
1467
|
-
rootNode: Omit<RootComponentInstance, 'slots' | '_data'
|
|
1572
|
+
rootNode: Omit<RootComponentInstance, 'slots' | '_data'> & {
|
|
1573
|
+
_editionId?: string;
|
|
1574
|
+
};
|
|
1468
1575
|
parameterConfiguration: TParamConfiguration;
|
|
1469
1576
|
component: Omit<ComponentInstance, 'slots'>;
|
|
1470
1577
|
componentDefinitions: Record<string, ComponentDefinition | undefined>;
|
|
@@ -1504,16 +1611,14 @@ type ParamTypeLocation<TParamValue = unknown, TParamConfiguration = unknown, TPa
|
|
|
1504
1611
|
editConnectedData: Awaited<ReturnType<typeof connectToParent>>['parent']['editConnectedData'];
|
|
1505
1612
|
};
|
|
1506
1613
|
|
|
1507
|
-
type SettingsLocationMetadata = CommonMetadata
|
|
1508
|
-
locales: Locale[];
|
|
1509
|
-
};
|
|
1614
|
+
type SettingsLocationMetadata = CommonMetadata;
|
|
1510
1615
|
type SettingsLocation<TSettingsType> = MeshLocationCore<TSettingsType, SettingsLocationMetadata, TSettingsType, 'settings'>;
|
|
1511
1616
|
|
|
1512
1617
|
/**
|
|
1513
1618
|
* Defines methods used for interacting with a Mesh location
|
|
1514
1619
|
* To receive useful typings, check the `type` property of the location to narrow the typing.
|
|
1515
1620
|
*/
|
|
1516
|
-
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>;
|
|
1621
|
+
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> | DashboardToolLocation<TValue> | ProjectToolLocation<TValue>;
|
|
1517
1622
|
interface MeshContextData {
|
|
1518
1623
|
locationKey: string;
|
|
1519
1624
|
locationType: MeshLocationTypes;
|
|
@@ -1522,6 +1627,7 @@ interface MeshContextData {
|
|
|
1522
1627
|
locationMetadata: any;
|
|
1523
1628
|
uniformApiVersion: string;
|
|
1524
1629
|
dialogContext?: DialogContext;
|
|
1630
|
+
fullScreenHeight?: boolean;
|
|
1525
1631
|
}
|
|
1526
1632
|
interface DialogContext {
|
|
1527
1633
|
dialogId: string;
|
|
@@ -1620,6 +1726,13 @@ type OpenDialogMessage = {
|
|
|
1620
1726
|
dialogData: unknown;
|
|
1621
1727
|
options?: DialogOptions;
|
|
1622
1728
|
};
|
|
1729
|
+
type NavigateMessage = {
|
|
1730
|
+
path: string;
|
|
1731
|
+
options?: {
|
|
1732
|
+
projectId?: string;
|
|
1733
|
+
target?: '_blank';
|
|
1734
|
+
};
|
|
1735
|
+
};
|
|
1623
1736
|
type CloseDialogMessage = {
|
|
1624
1737
|
dialogId: string | undefined;
|
|
1625
1738
|
dialogType: DialogType;
|
|
@@ -1694,6 +1807,8 @@ declare function connectToParent({ dialogResponseHandlers, onMetadataUpdated, on
|
|
|
1694
1807
|
openDialog: (message: OpenDialogMessage) => Promise<Pick<DialogResponseData, "value" | "dialogId"> | undefined>;
|
|
1695
1808
|
closeDialog: (message: CloseDialogMessage) => Promise<void>;
|
|
1696
1809
|
getDataResource: <TExpectedResult>(message: GetDataResourceMessage) => Promise<TExpectedResult>;
|
|
1810
|
+
navigate: (message: NavigateMessage) => Promise<void>;
|
|
1811
|
+
reloadLocation: () => Promise<void>;
|
|
1697
1812
|
editConnectedData: (message: EditConnectedDataMessage) => Promise<EditConnectedDataResponse>;
|
|
1698
1813
|
};
|
|
1699
1814
|
}>;
|
|
@@ -1718,6 +1833,10 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
|
|
|
1718
1833
|
* Each location has a specific type of metadata that it is provided, which is typed automatically when the location is known.
|
|
1719
1834
|
*/
|
|
1720
1835
|
metadata: TMetadata;
|
|
1836
|
+
/**
|
|
1837
|
+
* A router object that can be used to navigate parent frame (Uniform App) to other page within current project and other methods.
|
|
1838
|
+
*/
|
|
1839
|
+
router: MeshRouter;
|
|
1721
1840
|
/**
|
|
1722
1841
|
* Context of a location when it is rendering inside a dialog in the Uniform app.
|
|
1723
1842
|
* This is set when:
|
|
@@ -1735,6 +1854,23 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
|
|
|
1735
1854
|
returnDialogValue: (value: unknown) => Promise<void>;
|
|
1736
1855
|
};
|
|
1737
1856
|
}
|
|
1857
|
+
type MeshRouter = {
|
|
1858
|
+
/**
|
|
1859
|
+
* Navigate parent frame (Uniform App) to a new path within current project.
|
|
1860
|
+
*
|
|
1861
|
+
* So router.navigate('/canvas/edit/{compositionId}') will navigate will open the composition editor for the given composition ID in the parent frame.
|
|
1862
|
+
* Be aware that most of the time it will close your mesh app, so you should use it with caution.
|
|
1863
|
+
*
|
|
1864
|
+
* @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.
|
|
1865
|
+
* @param options - The options for the navigation.
|
|
1866
|
+
* @param options.projectId - You can specify project ID to navigate to. By default the current project ID is used.
|
|
1867
|
+
* @param options.target - Allows to open a new tab instead of navigating the current one.
|
|
1868
|
+
*/
|
|
1869
|
+
navigatePlatform: (path: string, options?: {
|
|
1870
|
+
projectId?: string;
|
|
1871
|
+
target?: '_blank';
|
|
1872
|
+
}) => void;
|
|
1873
|
+
};
|
|
1738
1874
|
/** Common metadata for all mesh locations */
|
|
1739
1875
|
type CommonMetadata<ExtendedMetadata = unknown, TIntegrationConfiguration = unknown> = {
|
|
1740
1876
|
/** The current Uniform user context. Contains name, email and context to check for permissions */
|
|
@@ -1745,6 +1881,8 @@ type CommonMetadata<ExtendedMetadata = unknown, TIntegrationConfiguration = unkn
|
|
|
1745
1881
|
dashboardOrigin: string;
|
|
1746
1882
|
/** Settings defined at the integration level (arbitrary type used on settings location) */
|
|
1747
1883
|
settings: TIntegrationConfiguration;
|
|
1884
|
+
/** List if enabled Uniform Project locales */
|
|
1885
|
+
locales: Locale[];
|
|
1748
1886
|
} & ExtendedMetadata;
|
|
1749
1887
|
type MeshLocationUserPermissions =
|
|
1750
1888
|
/** Uniform Context:Enrichments:Create */
|
|
@@ -1813,6 +1951,10 @@ type MeshLocationUserPermissions =
|
|
|
1813
1951
|
| 'COMPOSITIONS_READ_DRAFT'
|
|
1814
1952
|
/** Uniform Canvas:Component Library:Manage|Create, update, and delete component library data */
|
|
1815
1953
|
| 'COMPOSITIONS_MANAGE_SCHEMA'
|
|
1954
|
+
/** Uniform Canvas:Content Types:Manage|Create, update, and delete content types */
|
|
1955
|
+
| 'ENTRIES_MANAGE_SCHEMA'
|
|
1956
|
+
/** Uniform Canvas:AI Prompts:Manage|Create, update, and delete AI prompts */
|
|
1957
|
+
| 'PROMPTS_MANAGE_SCHEMA'
|
|
1816
1958
|
/** UTM Mapper:Read|Read UTM mapper configuration */
|
|
1817
1959
|
| 'UTM_MAPPER_READ'
|
|
1818
1960
|
/** UTM Mapper:Read|Create, update and delete UTM mapper configuration */
|
|
@@ -1828,7 +1970,7 @@ type MeshLocationUserPermissions =
|
|
|
1828
1970
|
/**
|
|
1829
1971
|
* Known location types that can be passed to a mesh location
|
|
1830
1972
|
*/
|
|
1831
|
-
type MeshLocationTypes = 'paramType' | 'paramTypeConfig' | 'assetLibrary' | 'assetParameter' | 'settings' | 'dataSource' | 'dataType' | 'dataResource' | 'aiGenerate' | 'embeddedEditor' | 'canvasEditorTools' | 'aiMetadata' | 'personalizationCriteria';
|
|
1973
|
+
type MeshLocationTypes = 'paramType' | 'paramTypeConfig' | 'assetLibrary' | 'assetParameter' | 'settings' | 'dataSource' | 'dataType' | 'dataResource' | 'aiGenerate' | 'embeddedEditor' | 'canvasEditorTools' | 'aiMetadata' | 'personalizationCriteria' | 'dashboardTool' | 'projectTool';
|
|
1832
1974
|
type SetValueOptions = ValidationResult;
|
|
1833
1975
|
type SetValueMessage = {
|
|
1834
1976
|
uniformMeshLocationValue: unknown;
|
|
@@ -1870,7 +2012,6 @@ type AIPromptMetadataLocation = MeshLocationCore<Record<string, unknown>, Prompt
|
|
|
1870
2012
|
type CanvasEditorToolsLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<{
|
|
1871
2013
|
releaseId?: string;
|
|
1872
2014
|
state?: number;
|
|
1873
|
-
locales: Locale[];
|
|
1874
2015
|
}, TIntegrationConfiguration>;
|
|
1875
2016
|
type CanvasEditorToolsReferenceData = {
|
|
1876
2017
|
name: string;
|
|
@@ -1949,6 +2090,9 @@ type PersonalizationCriteriaLocationMetadata<TIntegrationConfiguration = unknown
|
|
|
1949
2090
|
/** @deprecated Experimental functionality is subject to change in minor versions. */
|
|
1950
2091
|
type PersonalizationCriteriaLocation<TCriteriaValue, TIntegrationConfiguration = unknown> = MeshLocationCore<TCriteriaValue | undefined, PersonalizationCriteriaLocationMetadata<TIntegrationConfiguration>, TCriteriaValue, 'personalizationCriteria'>;
|
|
1951
2092
|
|
|
2093
|
+
type ProjectToolLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<unknown, TIntegrationConfiguration>;
|
|
2094
|
+
type ProjectToolLocation<TTool, TIntegrationConfiguration = unknown> = MeshLocationCore<TTool, ProjectToolLocationMetadata<TIntegrationConfiguration>, TTool, 'projectTool'>;
|
|
2095
|
+
|
|
1952
2096
|
interface SdkWindow {
|
|
1953
2097
|
/** The current window object. */
|
|
1954
2098
|
instance: Window;
|
|
@@ -2052,4 +2196,4 @@ declare const hasPermissions: (permissions: MeshLocationUserPermissions | MeshLo
|
|
|
2052
2196
|
*/
|
|
2053
2197
|
declare const hasRole: (role: string, user: UniformUser) => boolean;
|
|
2054
2198
|
|
|
2055
|
-
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 PersonalizationCriteriaLocation, type PersonalizationCriteriaLocationMetadata, 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 };
|
|
2199
|
+
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 DashboardToolLocation, type DashboardToolLocationMetadata, 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 ProjectToolLocation, type ProjectToolLocationMetadata, 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 };
|
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.43.0";
|
|
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.43.0";
|
|
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.43.0";
|
|
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.
|
|
3
|
+
"version": "20.7.1-alpha.102+d621aa22b2",
|
|
4
4
|
"description": "Uniform Mesh Framework SDK",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -21,11 +21,10 @@
|
|
|
21
21
|
"build:setversion": "tsx ./scripts/set-version.ts",
|
|
22
22
|
"dev": "pnpm update-openapi && pnpm build:setversion && tsup --watch",
|
|
23
23
|
"clean": "rimraf dist",
|
|
24
|
-
"test": "jest --maxWorkers=1 --passWithNoTests",
|
|
25
24
|
"lint": "eslint \"src/**/*.{js,ts,tsx}\"",
|
|
26
25
|
"format": "prettier --write \"src/**/*.{js,ts,tsx}\"",
|
|
27
26
|
"update-openapi": "tsx ./scripts/update-openapi.cts",
|
|
28
|
-
"document": "api-extractor run --local"
|
|
27
|
+
"document:prebuild": "api-extractor run --local"
|
|
29
28
|
},
|
|
30
29
|
"files": [
|
|
31
30
|
"/dist"
|
|
@@ -34,16 +33,16 @@
|
|
|
34
33
|
"access": "public"
|
|
35
34
|
},
|
|
36
35
|
"dependencies": {
|
|
37
|
-
"@uniformdev/assets": "20.
|
|
38
|
-
"@uniformdev/canvas": "20.
|
|
39
|
-
"@uniformdev/context": "20.
|
|
40
|
-
"@uniformdev/project-map": "20.
|
|
36
|
+
"@uniformdev/assets": "20.7.1-alpha.102+d621aa22b2",
|
|
37
|
+
"@uniformdev/canvas": "20.7.1-alpha.102+d621aa22b2",
|
|
38
|
+
"@uniformdev/context": "20.7.1-alpha.102+d621aa22b2",
|
|
39
|
+
"@uniformdev/project-map": "20.7.1-alpha.102+d621aa22b2",
|
|
41
40
|
"imagesloaded": "^5.0.0",
|
|
42
41
|
"mitt": "^3.0.1"
|
|
43
42
|
},
|
|
44
43
|
"devDependencies": {
|
|
45
44
|
"@types/imagesloaded": "^4.1.2",
|
|
46
|
-
"openai": "
|
|
45
|
+
"openai": "4.94.0"
|
|
47
46
|
},
|
|
48
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "d621aa22b220347565e307b064fb1eda8963abbe"
|
|
49
48
|
}
|