@uniformdev/mesh-sdk 20.7.1-alpha.26 → 20.7.1-alpha.32
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 +77 -13
- package/dist/index.d.ts +77 -13
- package/dist/index.esm.js +15 -2
- package/dist/index.js +15 -2
- package/dist/index.mjs +15 -2
- 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
|
|
|
@@ -233,15 +233,22 @@ interface paths$1 {
|
|
|
233
233
|
definition: {
|
|
234
234
|
name: string;
|
|
235
235
|
description: string;
|
|
236
|
-
parameters
|
|
236
|
+
parameters: {
|
|
237
237
|
[key: string]: unknown;
|
|
238
238
|
};
|
|
239
|
+
strict: boolean;
|
|
239
240
|
};
|
|
240
241
|
systemParameters?: "pageHtml"[];
|
|
241
242
|
includedAgents?: ("scout" | "sage")[];
|
|
242
243
|
}[];
|
|
243
244
|
};
|
|
244
245
|
};
|
|
246
|
+
tools?: {
|
|
247
|
+
id: string;
|
|
248
|
+
name: string;
|
|
249
|
+
url: string;
|
|
250
|
+
iconUrl?: string;
|
|
251
|
+
}[];
|
|
245
252
|
};
|
|
246
253
|
unstable_prompts?: {
|
|
247
254
|
/** Format: uuid */
|
|
@@ -486,15 +493,22 @@ interface paths$1 {
|
|
|
486
493
|
definition: {
|
|
487
494
|
name: string;
|
|
488
495
|
description: string;
|
|
489
|
-
parameters
|
|
496
|
+
parameters: {
|
|
490
497
|
[key: string]: unknown;
|
|
491
498
|
};
|
|
499
|
+
strict: boolean;
|
|
492
500
|
};
|
|
493
501
|
systemParameters?: "pageHtml"[];
|
|
494
502
|
includedAgents?: ("scout" | "sage")[];
|
|
495
503
|
}[];
|
|
496
504
|
};
|
|
497
505
|
};
|
|
506
|
+
tools?: {
|
|
507
|
+
id: string;
|
|
508
|
+
name: string;
|
|
509
|
+
url: string;
|
|
510
|
+
iconUrl?: string;
|
|
511
|
+
}[];
|
|
498
512
|
};
|
|
499
513
|
unstable_prompts?: {
|
|
500
514
|
/** Format: uuid */
|
|
@@ -724,15 +738,22 @@ interface paths$1 {
|
|
|
724
738
|
definition: {
|
|
725
739
|
name: string;
|
|
726
740
|
description: string;
|
|
727
|
-
parameters
|
|
741
|
+
parameters: {
|
|
728
742
|
[key: string]: unknown;
|
|
729
743
|
};
|
|
744
|
+
strict: boolean;
|
|
730
745
|
};
|
|
731
746
|
systemParameters?: "pageHtml"[];
|
|
732
747
|
includedAgents?: ("scout" | "sage")[];
|
|
733
748
|
}[];
|
|
734
749
|
};
|
|
735
750
|
};
|
|
751
|
+
tools?: {
|
|
752
|
+
id: string;
|
|
753
|
+
name: string;
|
|
754
|
+
url: string;
|
|
755
|
+
iconUrl?: string;
|
|
756
|
+
}[];
|
|
736
757
|
};
|
|
737
758
|
unstable_prompts?: {
|
|
738
759
|
/** Format: uuid */
|
|
@@ -1311,15 +1332,22 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
|
1311
1332
|
definition: {
|
|
1312
1333
|
name: string;
|
|
1313
1334
|
description: string;
|
|
1314
|
-
parameters
|
|
1335
|
+
parameters: {
|
|
1315
1336
|
[key: string]: unknown;
|
|
1316
1337
|
};
|
|
1338
|
+
strict: boolean;
|
|
1317
1339
|
};
|
|
1318
1340
|
systemParameters?: "pageHtml"[];
|
|
1319
1341
|
includedAgents?: ("scout" | "sage")[];
|
|
1320
1342
|
}[];
|
|
1321
1343
|
};
|
|
1322
1344
|
};
|
|
1345
|
+
tools?: {
|
|
1346
|
+
id: string;
|
|
1347
|
+
name: string;
|
|
1348
|
+
url: string;
|
|
1349
|
+
iconUrl?: string;
|
|
1350
|
+
}[];
|
|
1323
1351
|
};
|
|
1324
1352
|
unstable_prompts?: {
|
|
1325
1353
|
id: string;
|
|
@@ -1388,7 +1416,11 @@ type FunctionCallSystemParameter = (typeof functionCallSystemParameters)[number]
|
|
|
1388
1416
|
declare function parseFunctionCall<Parameters extends Record<string, string>, Settings = Record<string, string>>(request: Pick<Request, 'body'>): {
|
|
1389
1417
|
functionCall: {
|
|
1390
1418
|
arguments: Parameters;
|
|
1419
|
+
call_id: string;
|
|
1391
1420
|
name: string;
|
|
1421
|
+
type: "function_call";
|
|
1422
|
+
id?: string;
|
|
1423
|
+
status?: "in_progress" | "completed" | "incomplete";
|
|
1392
1424
|
};
|
|
1393
1425
|
settings: Settings;
|
|
1394
1426
|
systemParameters: Record<FunctionCallSystemParameter, string | undefined>;
|
|
@@ -1504,16 +1536,14 @@ type ParamTypeLocation<TParamValue = unknown, TParamConfiguration = unknown, TPa
|
|
|
1504
1536
|
editConnectedData: Awaited<ReturnType<typeof connectToParent>>['parent']['editConnectedData'];
|
|
1505
1537
|
};
|
|
1506
1538
|
|
|
1507
|
-
type SettingsLocationMetadata = CommonMetadata
|
|
1508
|
-
locales: Locale[];
|
|
1509
|
-
};
|
|
1539
|
+
type SettingsLocationMetadata = CommonMetadata;
|
|
1510
1540
|
type SettingsLocation<TSettingsType> = MeshLocationCore<TSettingsType, SettingsLocationMetadata, TSettingsType, 'settings'>;
|
|
1511
1541
|
|
|
1512
1542
|
/**
|
|
1513
1543
|
* Defines methods used for interacting with a Mesh location
|
|
1514
1544
|
* To receive useful typings, check the `type` property of the location to narrow the typing.
|
|
1515
1545
|
*/
|
|
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>;
|
|
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>;
|
|
1517
1547
|
interface MeshContextData {
|
|
1518
1548
|
locationKey: string;
|
|
1519
1549
|
locationType: MeshLocationTypes;
|
|
@@ -1522,6 +1552,7 @@ interface MeshContextData {
|
|
|
1522
1552
|
locationMetadata: any;
|
|
1523
1553
|
uniformApiVersion: string;
|
|
1524
1554
|
dialogContext?: DialogContext;
|
|
1555
|
+
fullScreenHeight?: boolean;
|
|
1525
1556
|
}
|
|
1526
1557
|
interface DialogContext {
|
|
1527
1558
|
dialogId: string;
|
|
@@ -1620,6 +1651,12 @@ type OpenDialogMessage = {
|
|
|
1620
1651
|
dialogData: unknown;
|
|
1621
1652
|
options?: DialogOptions;
|
|
1622
1653
|
};
|
|
1654
|
+
type NavigateMessage = {
|
|
1655
|
+
path: string;
|
|
1656
|
+
options?: {
|
|
1657
|
+
target?: '_blank';
|
|
1658
|
+
};
|
|
1659
|
+
};
|
|
1623
1660
|
type CloseDialogMessage = {
|
|
1624
1661
|
dialogId: string | undefined;
|
|
1625
1662
|
dialogType: DialogType;
|
|
@@ -1694,6 +1731,8 @@ declare function connectToParent({ dialogResponseHandlers, onMetadataUpdated, on
|
|
|
1694
1731
|
openDialog: (message: OpenDialogMessage) => Promise<Pick<DialogResponseData, "value" | "dialogId"> | undefined>;
|
|
1695
1732
|
closeDialog: (message: CloseDialogMessage) => Promise<void>;
|
|
1696
1733
|
getDataResource: <TExpectedResult>(message: GetDataResourceMessage) => Promise<TExpectedResult>;
|
|
1734
|
+
navigate: (message: NavigateMessage) => Promise<void>;
|
|
1735
|
+
reloadLocation: () => Promise<void>;
|
|
1697
1736
|
editConnectedData: (message: EditConnectedDataMessage) => Promise<EditConnectedDataResponse>;
|
|
1698
1737
|
};
|
|
1699
1738
|
}>;
|
|
@@ -1718,6 +1757,12 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
|
|
|
1718
1757
|
* Each location has a specific type of metadata that it is provided, which is typed automatically when the location is known.
|
|
1719
1758
|
*/
|
|
1720
1759
|
metadata: TMetadata;
|
|
1760
|
+
/**
|
|
1761
|
+
* A router object that can be used to navigate parent frame (Uniform App) to other page within current project and other methods.
|
|
1762
|
+
*
|
|
1763
|
+
* @deprecated Is not stable yet so can contain breaking changes in the future
|
|
1764
|
+
*/
|
|
1765
|
+
router: MeshRouter;
|
|
1721
1766
|
/**
|
|
1722
1767
|
* Context of a location when it is rendering inside a dialog in the Uniform app.
|
|
1723
1768
|
* This is set when:
|
|
@@ -1735,6 +1780,19 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
|
|
|
1735
1780
|
returnDialogValue: (value: unknown) => Promise<void>;
|
|
1736
1781
|
};
|
|
1737
1782
|
}
|
|
1783
|
+
type MeshRouter = {
|
|
1784
|
+
/**
|
|
1785
|
+
* Navigate parent frame (Uniform App) to a new path within current project.
|
|
1786
|
+
*
|
|
1787
|
+
* So router.navigate('/canvas/edit/{compositionId}') will navigate will open the composition editor for the given composition ID in the parent frame.
|
|
1788
|
+
* Be aware that most of the time it will close your mesh app, so you should use it with caution.
|
|
1789
|
+
*
|
|
1790
|
+
* @deprecated Is not stable yet so can contain breaking changes in the future
|
|
1791
|
+
*/
|
|
1792
|
+
navigatePlatform: (path: string, options?: {
|
|
1793
|
+
target?: '_blank';
|
|
1794
|
+
}) => void;
|
|
1795
|
+
};
|
|
1738
1796
|
/** Common metadata for all mesh locations */
|
|
1739
1797
|
type CommonMetadata<ExtendedMetadata = unknown, TIntegrationConfiguration = unknown> = {
|
|
1740
1798
|
/** The current Uniform user context. Contains name, email and context to check for permissions */
|
|
@@ -1745,6 +1803,8 @@ type CommonMetadata<ExtendedMetadata = unknown, TIntegrationConfiguration = unkn
|
|
|
1745
1803
|
dashboardOrigin: string;
|
|
1746
1804
|
/** Settings defined at the integration level (arbitrary type used on settings location) */
|
|
1747
1805
|
settings: TIntegrationConfiguration;
|
|
1806
|
+
/** List if enabled Uniform Project locales */
|
|
1807
|
+
locales: Locale[];
|
|
1748
1808
|
} & ExtendedMetadata;
|
|
1749
1809
|
type MeshLocationUserPermissions =
|
|
1750
1810
|
/** Uniform Context:Enrichments:Create */
|
|
@@ -1828,7 +1888,7 @@ type MeshLocationUserPermissions =
|
|
|
1828
1888
|
/**
|
|
1829
1889
|
* Known location types that can be passed to a mesh location
|
|
1830
1890
|
*/
|
|
1831
|
-
type MeshLocationTypes = 'paramType' | 'paramTypeConfig' | 'assetLibrary' | 'assetParameter' | 'settings' | 'dataSource' | 'dataType' | 'dataResource' | 'aiGenerate' | 'embeddedEditor' | 'canvasEditorTools' | 'aiMetadata' | 'personalizationCriteria';
|
|
1891
|
+
type MeshLocationTypes = 'paramType' | 'paramTypeConfig' | 'assetLibrary' | 'assetParameter' | 'settings' | 'dataSource' | 'dataType' | 'dataResource' | 'aiGenerate' | 'embeddedEditor' | 'canvasEditorTools' | 'aiMetadata' | 'personalizationCriteria' | 'tool';
|
|
1832
1892
|
type SetValueOptions = ValidationResult;
|
|
1833
1893
|
type SetValueMessage = {
|
|
1834
1894
|
uniformMeshLocationValue: unknown;
|
|
@@ -1870,7 +1930,6 @@ type AIPromptMetadataLocation = MeshLocationCore<Record<string, unknown>, Prompt
|
|
|
1870
1930
|
type CanvasEditorToolsLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<{
|
|
1871
1931
|
releaseId?: string;
|
|
1872
1932
|
state?: number;
|
|
1873
|
-
locales: Locale[];
|
|
1874
1933
|
}, TIntegrationConfiguration>;
|
|
1875
1934
|
type CanvasEditorToolsReferenceData = {
|
|
1876
1935
|
name: string;
|
|
@@ -1949,6 +2008,11 @@ type PersonalizationCriteriaLocationMetadata<TIntegrationConfiguration = unknown
|
|
|
1949
2008
|
/** @deprecated Experimental functionality is subject to change in minor versions. */
|
|
1950
2009
|
type PersonalizationCriteriaLocation<TCriteriaValue, TIntegrationConfiguration = unknown> = MeshLocationCore<TCriteriaValue | undefined, PersonalizationCriteriaLocationMetadata<TIntegrationConfiguration>, TCriteriaValue, 'personalizationCriteria'>;
|
|
1951
2010
|
|
|
2011
|
+
/** @deprecated Experimental functionality is subject to change in minor versions. */
|
|
2012
|
+
type ToolLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<unknown, TIntegrationConfiguration>;
|
|
2013
|
+
/** @deprecated Experimental functionality is subject to change in minor versions. */
|
|
2014
|
+
type ToolLocation<TTool, TIntegrationConfiguration = unknown> = MeshLocationCore<TTool, ToolLocationMetadata<TIntegrationConfiguration>, TTool, 'tool'>;
|
|
2015
|
+
|
|
1952
2016
|
interface SdkWindow {
|
|
1953
2017
|
/** The current window object. */
|
|
1954
2018
|
instance: Window;
|
|
@@ -2052,4 +2116,4 @@ declare const hasPermissions: (permissions: MeshLocationUserPermissions | MeshLo
|
|
|
2052
2116
|
*/
|
|
2053
2117
|
declare const hasRole: (role: string, user: UniformUser) => boolean;
|
|
2054
2118
|
|
|
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 };
|
|
2119
|
+
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
|
|
|
@@ -233,15 +233,22 @@ interface paths$1 {
|
|
|
233
233
|
definition: {
|
|
234
234
|
name: string;
|
|
235
235
|
description: string;
|
|
236
|
-
parameters
|
|
236
|
+
parameters: {
|
|
237
237
|
[key: string]: unknown;
|
|
238
238
|
};
|
|
239
|
+
strict: boolean;
|
|
239
240
|
};
|
|
240
241
|
systemParameters?: "pageHtml"[];
|
|
241
242
|
includedAgents?: ("scout" | "sage")[];
|
|
242
243
|
}[];
|
|
243
244
|
};
|
|
244
245
|
};
|
|
246
|
+
tools?: {
|
|
247
|
+
id: string;
|
|
248
|
+
name: string;
|
|
249
|
+
url: string;
|
|
250
|
+
iconUrl?: string;
|
|
251
|
+
}[];
|
|
245
252
|
};
|
|
246
253
|
unstable_prompts?: {
|
|
247
254
|
/** Format: uuid */
|
|
@@ -486,15 +493,22 @@ interface paths$1 {
|
|
|
486
493
|
definition: {
|
|
487
494
|
name: string;
|
|
488
495
|
description: string;
|
|
489
|
-
parameters
|
|
496
|
+
parameters: {
|
|
490
497
|
[key: string]: unknown;
|
|
491
498
|
};
|
|
499
|
+
strict: boolean;
|
|
492
500
|
};
|
|
493
501
|
systemParameters?: "pageHtml"[];
|
|
494
502
|
includedAgents?: ("scout" | "sage")[];
|
|
495
503
|
}[];
|
|
496
504
|
};
|
|
497
505
|
};
|
|
506
|
+
tools?: {
|
|
507
|
+
id: string;
|
|
508
|
+
name: string;
|
|
509
|
+
url: string;
|
|
510
|
+
iconUrl?: string;
|
|
511
|
+
}[];
|
|
498
512
|
};
|
|
499
513
|
unstable_prompts?: {
|
|
500
514
|
/** Format: uuid */
|
|
@@ -724,15 +738,22 @@ interface paths$1 {
|
|
|
724
738
|
definition: {
|
|
725
739
|
name: string;
|
|
726
740
|
description: string;
|
|
727
|
-
parameters
|
|
741
|
+
parameters: {
|
|
728
742
|
[key: string]: unknown;
|
|
729
743
|
};
|
|
744
|
+
strict: boolean;
|
|
730
745
|
};
|
|
731
746
|
systemParameters?: "pageHtml"[];
|
|
732
747
|
includedAgents?: ("scout" | "sage")[];
|
|
733
748
|
}[];
|
|
734
749
|
};
|
|
735
750
|
};
|
|
751
|
+
tools?: {
|
|
752
|
+
id: string;
|
|
753
|
+
name: string;
|
|
754
|
+
url: string;
|
|
755
|
+
iconUrl?: string;
|
|
756
|
+
}[];
|
|
736
757
|
};
|
|
737
758
|
unstable_prompts?: {
|
|
738
759
|
/** Format: uuid */
|
|
@@ -1311,15 +1332,22 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
|
|
|
1311
1332
|
definition: {
|
|
1312
1333
|
name: string;
|
|
1313
1334
|
description: string;
|
|
1314
|
-
parameters
|
|
1335
|
+
parameters: {
|
|
1315
1336
|
[key: string]: unknown;
|
|
1316
1337
|
};
|
|
1338
|
+
strict: boolean;
|
|
1317
1339
|
};
|
|
1318
1340
|
systemParameters?: "pageHtml"[];
|
|
1319
1341
|
includedAgents?: ("scout" | "sage")[];
|
|
1320
1342
|
}[];
|
|
1321
1343
|
};
|
|
1322
1344
|
};
|
|
1345
|
+
tools?: {
|
|
1346
|
+
id: string;
|
|
1347
|
+
name: string;
|
|
1348
|
+
url: string;
|
|
1349
|
+
iconUrl?: string;
|
|
1350
|
+
}[];
|
|
1323
1351
|
};
|
|
1324
1352
|
unstable_prompts?: {
|
|
1325
1353
|
id: string;
|
|
@@ -1388,7 +1416,11 @@ type FunctionCallSystemParameter = (typeof functionCallSystemParameters)[number]
|
|
|
1388
1416
|
declare function parseFunctionCall<Parameters extends Record<string, string>, Settings = Record<string, string>>(request: Pick<Request, 'body'>): {
|
|
1389
1417
|
functionCall: {
|
|
1390
1418
|
arguments: Parameters;
|
|
1419
|
+
call_id: string;
|
|
1391
1420
|
name: string;
|
|
1421
|
+
type: "function_call";
|
|
1422
|
+
id?: string;
|
|
1423
|
+
status?: "in_progress" | "completed" | "incomplete";
|
|
1392
1424
|
};
|
|
1393
1425
|
settings: Settings;
|
|
1394
1426
|
systemParameters: Record<FunctionCallSystemParameter, string | undefined>;
|
|
@@ -1504,16 +1536,14 @@ type ParamTypeLocation<TParamValue = unknown, TParamConfiguration = unknown, TPa
|
|
|
1504
1536
|
editConnectedData: Awaited<ReturnType<typeof connectToParent>>['parent']['editConnectedData'];
|
|
1505
1537
|
};
|
|
1506
1538
|
|
|
1507
|
-
type SettingsLocationMetadata = CommonMetadata
|
|
1508
|
-
locales: Locale[];
|
|
1509
|
-
};
|
|
1539
|
+
type SettingsLocationMetadata = CommonMetadata;
|
|
1510
1540
|
type SettingsLocation<TSettingsType> = MeshLocationCore<TSettingsType, SettingsLocationMetadata, TSettingsType, 'settings'>;
|
|
1511
1541
|
|
|
1512
1542
|
/**
|
|
1513
1543
|
* Defines methods used for interacting with a Mesh location
|
|
1514
1544
|
* To receive useful typings, check the `type` property of the location to narrow the typing.
|
|
1515
1545
|
*/
|
|
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>;
|
|
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>;
|
|
1517
1547
|
interface MeshContextData {
|
|
1518
1548
|
locationKey: string;
|
|
1519
1549
|
locationType: MeshLocationTypes;
|
|
@@ -1522,6 +1552,7 @@ interface MeshContextData {
|
|
|
1522
1552
|
locationMetadata: any;
|
|
1523
1553
|
uniformApiVersion: string;
|
|
1524
1554
|
dialogContext?: DialogContext;
|
|
1555
|
+
fullScreenHeight?: boolean;
|
|
1525
1556
|
}
|
|
1526
1557
|
interface DialogContext {
|
|
1527
1558
|
dialogId: string;
|
|
@@ -1620,6 +1651,12 @@ type OpenDialogMessage = {
|
|
|
1620
1651
|
dialogData: unknown;
|
|
1621
1652
|
options?: DialogOptions;
|
|
1622
1653
|
};
|
|
1654
|
+
type NavigateMessage = {
|
|
1655
|
+
path: string;
|
|
1656
|
+
options?: {
|
|
1657
|
+
target?: '_blank';
|
|
1658
|
+
};
|
|
1659
|
+
};
|
|
1623
1660
|
type CloseDialogMessage = {
|
|
1624
1661
|
dialogId: string | undefined;
|
|
1625
1662
|
dialogType: DialogType;
|
|
@@ -1694,6 +1731,8 @@ declare function connectToParent({ dialogResponseHandlers, onMetadataUpdated, on
|
|
|
1694
1731
|
openDialog: (message: OpenDialogMessage) => Promise<Pick<DialogResponseData, "value" | "dialogId"> | undefined>;
|
|
1695
1732
|
closeDialog: (message: CloseDialogMessage) => Promise<void>;
|
|
1696
1733
|
getDataResource: <TExpectedResult>(message: GetDataResourceMessage) => Promise<TExpectedResult>;
|
|
1734
|
+
navigate: (message: NavigateMessage) => Promise<void>;
|
|
1735
|
+
reloadLocation: () => Promise<void>;
|
|
1697
1736
|
editConnectedData: (message: EditConnectedDataMessage) => Promise<EditConnectedDataResponse>;
|
|
1698
1737
|
};
|
|
1699
1738
|
}>;
|
|
@@ -1718,6 +1757,12 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
|
|
|
1718
1757
|
* Each location has a specific type of metadata that it is provided, which is typed automatically when the location is known.
|
|
1719
1758
|
*/
|
|
1720
1759
|
metadata: TMetadata;
|
|
1760
|
+
/**
|
|
1761
|
+
* A router object that can be used to navigate parent frame (Uniform App) to other page within current project and other methods.
|
|
1762
|
+
*
|
|
1763
|
+
* @deprecated Is not stable yet so can contain breaking changes in the future
|
|
1764
|
+
*/
|
|
1765
|
+
router: MeshRouter;
|
|
1721
1766
|
/**
|
|
1722
1767
|
* Context of a location when it is rendering inside a dialog in the Uniform app.
|
|
1723
1768
|
* This is set when:
|
|
@@ -1735,6 +1780,19 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
|
|
|
1735
1780
|
returnDialogValue: (value: unknown) => Promise<void>;
|
|
1736
1781
|
};
|
|
1737
1782
|
}
|
|
1783
|
+
type MeshRouter = {
|
|
1784
|
+
/**
|
|
1785
|
+
* Navigate parent frame (Uniform App) to a new path within current project.
|
|
1786
|
+
*
|
|
1787
|
+
* So router.navigate('/canvas/edit/{compositionId}') will navigate will open the composition editor for the given composition ID in the parent frame.
|
|
1788
|
+
* Be aware that most of the time it will close your mesh app, so you should use it with caution.
|
|
1789
|
+
*
|
|
1790
|
+
* @deprecated Is not stable yet so can contain breaking changes in the future
|
|
1791
|
+
*/
|
|
1792
|
+
navigatePlatform: (path: string, options?: {
|
|
1793
|
+
target?: '_blank';
|
|
1794
|
+
}) => void;
|
|
1795
|
+
};
|
|
1738
1796
|
/** Common metadata for all mesh locations */
|
|
1739
1797
|
type CommonMetadata<ExtendedMetadata = unknown, TIntegrationConfiguration = unknown> = {
|
|
1740
1798
|
/** The current Uniform user context. Contains name, email and context to check for permissions */
|
|
@@ -1745,6 +1803,8 @@ type CommonMetadata<ExtendedMetadata = unknown, TIntegrationConfiguration = unkn
|
|
|
1745
1803
|
dashboardOrigin: string;
|
|
1746
1804
|
/** Settings defined at the integration level (arbitrary type used on settings location) */
|
|
1747
1805
|
settings: TIntegrationConfiguration;
|
|
1806
|
+
/** List if enabled Uniform Project locales */
|
|
1807
|
+
locales: Locale[];
|
|
1748
1808
|
} & ExtendedMetadata;
|
|
1749
1809
|
type MeshLocationUserPermissions =
|
|
1750
1810
|
/** Uniform Context:Enrichments:Create */
|
|
@@ -1828,7 +1888,7 @@ type MeshLocationUserPermissions =
|
|
|
1828
1888
|
/**
|
|
1829
1889
|
* Known location types that can be passed to a mesh location
|
|
1830
1890
|
*/
|
|
1831
|
-
type MeshLocationTypes = 'paramType' | 'paramTypeConfig' | 'assetLibrary' | 'assetParameter' | 'settings' | 'dataSource' | 'dataType' | 'dataResource' | 'aiGenerate' | 'embeddedEditor' | 'canvasEditorTools' | 'aiMetadata' | 'personalizationCriteria';
|
|
1891
|
+
type MeshLocationTypes = 'paramType' | 'paramTypeConfig' | 'assetLibrary' | 'assetParameter' | 'settings' | 'dataSource' | 'dataType' | 'dataResource' | 'aiGenerate' | 'embeddedEditor' | 'canvasEditorTools' | 'aiMetadata' | 'personalizationCriteria' | 'tool';
|
|
1832
1892
|
type SetValueOptions = ValidationResult;
|
|
1833
1893
|
type SetValueMessage = {
|
|
1834
1894
|
uniformMeshLocationValue: unknown;
|
|
@@ -1870,7 +1930,6 @@ type AIPromptMetadataLocation = MeshLocationCore<Record<string, unknown>, Prompt
|
|
|
1870
1930
|
type CanvasEditorToolsLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<{
|
|
1871
1931
|
releaseId?: string;
|
|
1872
1932
|
state?: number;
|
|
1873
|
-
locales: Locale[];
|
|
1874
1933
|
}, TIntegrationConfiguration>;
|
|
1875
1934
|
type CanvasEditorToolsReferenceData = {
|
|
1876
1935
|
name: string;
|
|
@@ -1949,6 +2008,11 @@ type PersonalizationCriteriaLocationMetadata<TIntegrationConfiguration = unknown
|
|
|
1949
2008
|
/** @deprecated Experimental functionality is subject to change in minor versions. */
|
|
1950
2009
|
type PersonalizationCriteriaLocation<TCriteriaValue, TIntegrationConfiguration = unknown> = MeshLocationCore<TCriteriaValue | undefined, PersonalizationCriteriaLocationMetadata<TIntegrationConfiguration>, TCriteriaValue, 'personalizationCriteria'>;
|
|
1951
2010
|
|
|
2011
|
+
/** @deprecated Experimental functionality is subject to change in minor versions. */
|
|
2012
|
+
type ToolLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<unknown, TIntegrationConfiguration>;
|
|
2013
|
+
/** @deprecated Experimental functionality is subject to change in minor versions. */
|
|
2014
|
+
type ToolLocation<TTool, TIntegrationConfiguration = unknown> = MeshLocationCore<TTool, ToolLocationMetadata<TIntegrationConfiguration>, TTool, 'tool'>;
|
|
2015
|
+
|
|
1952
2016
|
interface SdkWindow {
|
|
1953
2017
|
/** The current window object. */
|
|
1954
2018
|
instance: Window;
|
|
@@ -2052,4 +2116,4 @@ declare const hasPermissions: (permissions: MeshLocationUserPermissions | MeshLo
|
|
|
2052
2116
|
*/
|
|
2053
2117
|
declare const hasRole: (role: string, user: UniformUser) => boolean;
|
|
2054
2118
|
|
|
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 };
|
|
2119
|
+
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.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",
|
|
@@ -702,6 +708,10 @@ async function initializeUniformMeshSDK({
|
|
|
702
708
|
getCurrentLocation: () => {
|
|
703
709
|
const location = {
|
|
704
710
|
getDataResource: parent.getDataResource,
|
|
711
|
+
router: {
|
|
712
|
+
navigatePlatform: (path, options) => parent.navigate({ path, options })
|
|
713
|
+
// reloadLocation: parent.reloadLocation,
|
|
714
|
+
},
|
|
705
715
|
editConnectedData,
|
|
706
716
|
type: contextData.locationType,
|
|
707
717
|
isReadOnly: contextData.isReadOnly,
|
|
@@ -732,7 +742,10 @@ async function initializeUniformMeshSDK({
|
|
|
732
742
|
// then we disable autoResizing for the dialog location.
|
|
733
743
|
// Otherwise, autoResizing will likely "overwrite" the specified `contentHeight` value, making
|
|
734
744
|
// developers very sad and confused. No one wants a sad and confused developer.
|
|
735
|
-
autoResizingDisabled
|
|
745
|
+
// Another case for explicit autoResizingDisabled flag is Full Screen Height from the parent (e.g. asset library location),
|
|
746
|
+
// so by default it will be stretch to the maximum height of the parent.
|
|
747
|
+
// Can still be manually enabled by calling sdk.currentWindow?.enableAutoResizing() in mesh app.
|
|
748
|
+
autoResizingDisabled: ((_a = contextData.dialogContext) == null ? void 0 : _a.contentHeight) || contextData.fullScreenHeight ? true : autoResizingDisabled
|
|
736
749
|
}),
|
|
737
750
|
version: contextData.uniformApiVersion,
|
|
738
751
|
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.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",
|
|
@@ -743,6 +749,10 @@ async function initializeUniformMeshSDK({
|
|
|
743
749
|
getCurrentLocation: () => {
|
|
744
750
|
const location = {
|
|
745
751
|
getDataResource: parent.getDataResource,
|
|
752
|
+
router: {
|
|
753
|
+
navigatePlatform: (path, options) => parent.navigate({ path, options })
|
|
754
|
+
// reloadLocation: parent.reloadLocation,
|
|
755
|
+
},
|
|
746
756
|
editConnectedData,
|
|
747
757
|
type: contextData.locationType,
|
|
748
758
|
isReadOnly: contextData.isReadOnly,
|
|
@@ -773,7 +783,10 @@ async function initializeUniformMeshSDK({
|
|
|
773
783
|
// then we disable autoResizing for the dialog location.
|
|
774
784
|
// Otherwise, autoResizing will likely "overwrite" the specified `contentHeight` value, making
|
|
775
785
|
// developers very sad and confused. No one wants a sad and confused developer.
|
|
776
|
-
autoResizingDisabled
|
|
786
|
+
// Another case for explicit autoResizingDisabled flag is Full Screen Height from the parent (e.g. asset library location),
|
|
787
|
+
// so by default it will be stretch to the maximum height of the parent.
|
|
788
|
+
// Can still be manually enabled by calling sdk.currentWindow?.enableAutoResizing() in mesh app.
|
|
789
|
+
autoResizingDisabled: ((_a = contextData.dialogContext) == null ? void 0 : _a.contentHeight) || contextData.fullScreenHeight ? true : autoResizingDisabled
|
|
777
790
|
}),
|
|
778
791
|
version: contextData.uniformApiVersion,
|
|
779
792
|
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.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",
|
|
@@ -702,6 +708,10 @@ async function initializeUniformMeshSDK({
|
|
|
702
708
|
getCurrentLocation: () => {
|
|
703
709
|
const location = {
|
|
704
710
|
getDataResource: parent.getDataResource,
|
|
711
|
+
router: {
|
|
712
|
+
navigatePlatform: (path, options) => parent.navigate({ path, options })
|
|
713
|
+
// reloadLocation: parent.reloadLocation,
|
|
714
|
+
},
|
|
705
715
|
editConnectedData,
|
|
706
716
|
type: contextData.locationType,
|
|
707
717
|
isReadOnly: contextData.isReadOnly,
|
|
@@ -732,7 +742,10 @@ async function initializeUniformMeshSDK({
|
|
|
732
742
|
// then we disable autoResizing for the dialog location.
|
|
733
743
|
// Otherwise, autoResizing will likely "overwrite" the specified `contentHeight` value, making
|
|
734
744
|
// developers very sad and confused. No one wants a sad and confused developer.
|
|
735
|
-
autoResizingDisabled
|
|
745
|
+
// Another case for explicit autoResizingDisabled flag is Full Screen Height from the parent (e.g. asset library location),
|
|
746
|
+
// so by default it will be stretch to the maximum height of the parent.
|
|
747
|
+
// Can still be manually enabled by calling sdk.currentWindow?.enableAutoResizing() in mesh app.
|
|
748
|
+
autoResizingDisabled: ((_a = contextData.dialogContext) == null ? void 0 : _a.contentHeight) || contextData.fullScreenHeight ? true : autoResizingDisabled
|
|
736
749
|
}),
|
|
737
750
|
version: contextData.uniformApiVersion,
|
|
738
751
|
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.32+616e77445e",
|
|
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.32+616e77445e",
|
|
38
|
+
"@uniformdev/canvas": "20.7.1-alpha.32+616e77445e",
|
|
39
|
+
"@uniformdev/context": "20.7.1-alpha.32+616e77445e",
|
|
40
|
+
"@uniformdev/project-map": "20.7.1-alpha.32+616e77445e",
|
|
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": "616e77445e7f75fca783616a70b359a2fb7bdfab"
|
|
49
49
|
}
|