@uniformdev/mesh-sdk 20.10.0 → 20.12.1-alpha.18

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ApiClient, ClientOptions, ExceptProject } from '@uniformdev/context/api';
2
- import { ProjectMapNode } from '@uniformdev/project-map';
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
 
@@ -242,6 +242,12 @@ interface paths$1 {
242
242
  }[];
243
243
  };
244
244
  };
245
+ tools?: {
246
+ id: string;
247
+ name: string;
248
+ url: string;
249
+ iconUrl?: string;
250
+ }[];
245
251
  };
246
252
  unstable_prompts?: {
247
253
  /** Format: uuid */
@@ -495,6 +501,12 @@ interface paths$1 {
495
501
  }[];
496
502
  };
497
503
  };
504
+ tools?: {
505
+ id: string;
506
+ name: string;
507
+ url: string;
508
+ iconUrl?: string;
509
+ }[];
498
510
  };
499
511
  unstable_prompts?: {
500
512
  /** Format: uuid */
@@ -733,6 +745,12 @@ interface paths$1 {
733
745
  }[];
734
746
  };
735
747
  };
748
+ tools?: {
749
+ id: string;
750
+ name: string;
751
+ url: string;
752
+ iconUrl?: string;
753
+ }[];
736
754
  };
737
755
  unstable_prompts?: {
738
756
  /** Format: uuid */
@@ -1320,6 +1338,12 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
1320
1338
  }[];
1321
1339
  };
1322
1340
  };
1341
+ tools?: {
1342
+ id: string;
1343
+ name: string;
1344
+ url: string;
1345
+ iconUrl?: string;
1346
+ }[];
1323
1347
  };
1324
1348
  unstable_prompts?: {
1325
1349
  id: string;
@@ -1504,16 +1528,14 @@ type ParamTypeLocation<TParamValue = unknown, TParamConfiguration = unknown, TPa
1504
1528
  editConnectedData: Awaited<ReturnType<typeof connectToParent>>['parent']['editConnectedData'];
1505
1529
  };
1506
1530
 
1507
- type SettingsLocationMetadata = CommonMetadata & {
1508
- locales: Locale[];
1509
- };
1531
+ type SettingsLocationMetadata = CommonMetadata;
1510
1532
  type SettingsLocation<TSettingsType> = MeshLocationCore<TSettingsType, SettingsLocationMetadata, TSettingsType, 'settings'>;
1511
1533
 
1512
1534
  /**
1513
1535
  * Defines methods used for interacting with a Mesh location
1514
1536
  * To receive useful typings, check the `type` property of the location to narrow the typing.
1515
1537
  */
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>;
1538
+ 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
1539
  interface MeshContextData {
1518
1540
  locationKey: string;
1519
1541
  locationType: MeshLocationTypes;
@@ -1620,6 +1642,12 @@ type OpenDialogMessage = {
1620
1642
  dialogData: unknown;
1621
1643
  options?: DialogOptions;
1622
1644
  };
1645
+ type NavigateMessage = {
1646
+ path: string;
1647
+ options?: {
1648
+ target?: '_blank';
1649
+ };
1650
+ };
1623
1651
  type CloseDialogMessage = {
1624
1652
  dialogId: string | undefined;
1625
1653
  dialogType: DialogType;
@@ -1694,6 +1722,8 @@ declare function connectToParent({ dialogResponseHandlers, onMetadataUpdated, on
1694
1722
  openDialog: (message: OpenDialogMessage) => Promise<Pick<DialogResponseData, "value" | "dialogId"> | undefined>;
1695
1723
  closeDialog: (message: CloseDialogMessage) => Promise<void>;
1696
1724
  getDataResource: <TExpectedResult>(message: GetDataResourceMessage) => Promise<TExpectedResult>;
1725
+ navigate: (message: NavigateMessage) => Promise<void>;
1726
+ reloadLocation: () => Promise<void>;
1697
1727
  editConnectedData: (message: EditConnectedDataMessage) => Promise<EditConnectedDataResponse>;
1698
1728
  };
1699
1729
  }>;
@@ -1718,6 +1748,12 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
1718
1748
  * Each location has a specific type of metadata that it is provided, which is typed automatically when the location is known.
1719
1749
  */
1720
1750
  metadata: TMetadata;
1751
+ /**
1752
+ * A router object that can be used to navigate parent frame (Uniform App) to other page within current project and other methods.
1753
+ *
1754
+ * @deprecated Is not stable yet so can contain breaking changes in the future
1755
+ */
1756
+ router: MeshRouter;
1721
1757
  /**
1722
1758
  * Context of a location when it is rendering inside a dialog in the Uniform app.
1723
1759
  * This is set when:
@@ -1735,6 +1771,19 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
1735
1771
  returnDialogValue: (value: unknown) => Promise<void>;
1736
1772
  };
1737
1773
  }
1774
+ type MeshRouter = {
1775
+ /**
1776
+ * Navigate parent frame (Uniform App) to a new path within current project.
1777
+ *
1778
+ * So router.navigate('/canvas/edit/{compositionId}') will navigate will open the composition editor for the given composition ID in the parent frame.
1779
+ * Be aware that most of the time it will close your mesh app, so you should use it with caution.
1780
+ *
1781
+ * @deprecated Is not stable yet so can contain breaking changes in the future
1782
+ */
1783
+ navigatePlatform: (path: string, options?: {
1784
+ target?: '_blank';
1785
+ }) => void;
1786
+ };
1738
1787
  /** Common metadata for all mesh locations */
1739
1788
  type CommonMetadata<ExtendedMetadata = unknown, TIntegrationConfiguration = unknown> = {
1740
1789
  /** The current Uniform user context. Contains name, email and context to check for permissions */
@@ -1745,6 +1794,8 @@ type CommonMetadata<ExtendedMetadata = unknown, TIntegrationConfiguration = unkn
1745
1794
  dashboardOrigin: string;
1746
1795
  /** Settings defined at the integration level (arbitrary type used on settings location) */
1747
1796
  settings: TIntegrationConfiguration;
1797
+ /** List if enabled Uniform Project locales */
1798
+ locales: Locale[];
1748
1799
  } & ExtendedMetadata;
1749
1800
  type MeshLocationUserPermissions =
1750
1801
  /** Uniform Context:Enrichments:Create */
@@ -1828,7 +1879,7 @@ type MeshLocationUserPermissions =
1828
1879
  /**
1829
1880
  * Known location types that can be passed to a mesh location
1830
1881
  */
1831
- type MeshLocationTypes = 'paramType' | 'paramTypeConfig' | 'assetLibrary' | 'assetParameter' | 'settings' | 'dataSource' | 'dataType' | 'dataResource' | 'aiGenerate' | 'embeddedEditor' | 'canvasEditorTools' | 'aiMetadata' | 'personalizationCriteria';
1882
+ type MeshLocationTypes = 'paramType' | 'paramTypeConfig' | 'assetLibrary' | 'assetParameter' | 'settings' | 'dataSource' | 'dataType' | 'dataResource' | 'aiGenerate' | 'embeddedEditor' | 'canvasEditorTools' | 'aiMetadata' | 'personalizationCriteria' | 'tool';
1832
1883
  type SetValueOptions = ValidationResult;
1833
1884
  type SetValueMessage = {
1834
1885
  uniformMeshLocationValue: unknown;
@@ -1870,7 +1921,6 @@ type AIPromptMetadataLocation = MeshLocationCore<Record<string, unknown>, Prompt
1870
1921
  type CanvasEditorToolsLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<{
1871
1922
  releaseId?: string;
1872
1923
  state?: number;
1873
- locales: Locale[];
1874
1924
  }, TIntegrationConfiguration>;
1875
1925
  type CanvasEditorToolsReferenceData = {
1876
1926
  name: string;
@@ -1949,6 +1999,11 @@ type PersonalizationCriteriaLocationMetadata<TIntegrationConfiguration = unknown
1949
1999
  /** @deprecated Experimental functionality is subject to change in minor versions. */
1950
2000
  type PersonalizationCriteriaLocation<TCriteriaValue, TIntegrationConfiguration = unknown> = MeshLocationCore<TCriteriaValue | undefined, PersonalizationCriteriaLocationMetadata<TIntegrationConfiguration>, TCriteriaValue, 'personalizationCriteria'>;
1951
2001
 
2002
+ /** @deprecated Experimental functionality is subject to change in minor versions. */
2003
+ type ToolLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<unknown, TIntegrationConfiguration>;
2004
+ /** @deprecated Experimental functionality is subject to change in minor versions. */
2005
+ type ToolLocation<TTool, TIntegrationConfiguration = unknown> = MeshLocationCore<TTool, ToolLocationMetadata<TIntegrationConfiguration>, TTool, 'tool'>;
2006
+
1952
2007
  interface SdkWindow {
1953
2008
  /** The current window object. */
1954
2009
  instance: Window;
@@ -2052,4 +2107,4 @@ declare const hasPermissions: (permissions: MeshLocationUserPermissions | MeshLo
2052
2107
  */
2053
2108
  declare const hasRole: (role: string, user: UniformUser) => boolean;
2054
2109
 
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 };
2110
+ 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 { ProjectMapNode } from '@uniformdev/project-map';
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
 
@@ -242,6 +242,12 @@ interface paths$1 {
242
242
  }[];
243
243
  };
244
244
  };
245
+ tools?: {
246
+ id: string;
247
+ name: string;
248
+ url: string;
249
+ iconUrl?: string;
250
+ }[];
245
251
  };
246
252
  unstable_prompts?: {
247
253
  /** Format: uuid */
@@ -495,6 +501,12 @@ interface paths$1 {
495
501
  }[];
496
502
  };
497
503
  };
504
+ tools?: {
505
+ id: string;
506
+ name: string;
507
+ url: string;
508
+ iconUrl?: string;
509
+ }[];
498
510
  };
499
511
  unstable_prompts?: {
500
512
  /** Format: uuid */
@@ -733,6 +745,12 @@ interface paths$1 {
733
745
  }[];
734
746
  };
735
747
  };
748
+ tools?: {
749
+ id: string;
750
+ name: string;
751
+ url: string;
752
+ iconUrl?: string;
753
+ }[];
736
754
  };
737
755
  unstable_prompts?: {
738
756
  /** Format: uuid */
@@ -1320,6 +1338,12 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
1320
1338
  }[];
1321
1339
  };
1322
1340
  };
1341
+ tools?: {
1342
+ id: string;
1343
+ name: string;
1344
+ url: string;
1345
+ iconUrl?: string;
1346
+ }[];
1323
1347
  };
1324
1348
  unstable_prompts?: {
1325
1349
  id: string;
@@ -1504,16 +1528,14 @@ type ParamTypeLocation<TParamValue = unknown, TParamConfiguration = unknown, TPa
1504
1528
  editConnectedData: Awaited<ReturnType<typeof connectToParent>>['parent']['editConnectedData'];
1505
1529
  };
1506
1530
 
1507
- type SettingsLocationMetadata = CommonMetadata & {
1508
- locales: Locale[];
1509
- };
1531
+ type SettingsLocationMetadata = CommonMetadata;
1510
1532
  type SettingsLocation<TSettingsType> = MeshLocationCore<TSettingsType, SettingsLocationMetadata, TSettingsType, 'settings'>;
1511
1533
 
1512
1534
  /**
1513
1535
  * Defines methods used for interacting with a Mesh location
1514
1536
  * To receive useful typings, check the `type` property of the location to narrow the typing.
1515
1537
  */
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>;
1538
+ 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
1539
  interface MeshContextData {
1518
1540
  locationKey: string;
1519
1541
  locationType: MeshLocationTypes;
@@ -1620,6 +1642,12 @@ type OpenDialogMessage = {
1620
1642
  dialogData: unknown;
1621
1643
  options?: DialogOptions;
1622
1644
  };
1645
+ type NavigateMessage = {
1646
+ path: string;
1647
+ options?: {
1648
+ target?: '_blank';
1649
+ };
1650
+ };
1623
1651
  type CloseDialogMessage = {
1624
1652
  dialogId: string | undefined;
1625
1653
  dialogType: DialogType;
@@ -1694,6 +1722,8 @@ declare function connectToParent({ dialogResponseHandlers, onMetadataUpdated, on
1694
1722
  openDialog: (message: OpenDialogMessage) => Promise<Pick<DialogResponseData, "value" | "dialogId"> | undefined>;
1695
1723
  closeDialog: (message: CloseDialogMessage) => Promise<void>;
1696
1724
  getDataResource: <TExpectedResult>(message: GetDataResourceMessage) => Promise<TExpectedResult>;
1725
+ navigate: (message: NavigateMessage) => Promise<void>;
1726
+ reloadLocation: () => Promise<void>;
1697
1727
  editConnectedData: (message: EditConnectedDataMessage) => Promise<EditConnectedDataResponse>;
1698
1728
  };
1699
1729
  }>;
@@ -1718,6 +1748,12 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
1718
1748
  * Each location has a specific type of metadata that it is provided, which is typed automatically when the location is known.
1719
1749
  */
1720
1750
  metadata: TMetadata;
1751
+ /**
1752
+ * A router object that can be used to navigate parent frame (Uniform App) to other page within current project and other methods.
1753
+ *
1754
+ * @deprecated Is not stable yet so can contain breaking changes in the future
1755
+ */
1756
+ router: MeshRouter;
1721
1757
  /**
1722
1758
  * Context of a location when it is rendering inside a dialog in the Uniform app.
1723
1759
  * This is set when:
@@ -1735,6 +1771,19 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
1735
1771
  returnDialogValue: (value: unknown) => Promise<void>;
1736
1772
  };
1737
1773
  }
1774
+ type MeshRouter = {
1775
+ /**
1776
+ * Navigate parent frame (Uniform App) to a new path within current project.
1777
+ *
1778
+ * So router.navigate('/canvas/edit/{compositionId}') will navigate will open the composition editor for the given composition ID in the parent frame.
1779
+ * Be aware that most of the time it will close your mesh app, so you should use it with caution.
1780
+ *
1781
+ * @deprecated Is not stable yet so can contain breaking changes in the future
1782
+ */
1783
+ navigatePlatform: (path: string, options?: {
1784
+ target?: '_blank';
1785
+ }) => void;
1786
+ };
1738
1787
  /** Common metadata for all mesh locations */
1739
1788
  type CommonMetadata<ExtendedMetadata = unknown, TIntegrationConfiguration = unknown> = {
1740
1789
  /** The current Uniform user context. Contains name, email and context to check for permissions */
@@ -1745,6 +1794,8 @@ type CommonMetadata<ExtendedMetadata = unknown, TIntegrationConfiguration = unkn
1745
1794
  dashboardOrigin: string;
1746
1795
  /** Settings defined at the integration level (arbitrary type used on settings location) */
1747
1796
  settings: TIntegrationConfiguration;
1797
+ /** List if enabled Uniform Project locales */
1798
+ locales: Locale[];
1748
1799
  } & ExtendedMetadata;
1749
1800
  type MeshLocationUserPermissions =
1750
1801
  /** Uniform Context:Enrichments:Create */
@@ -1828,7 +1879,7 @@ type MeshLocationUserPermissions =
1828
1879
  /**
1829
1880
  * Known location types that can be passed to a mesh location
1830
1881
  */
1831
- type MeshLocationTypes = 'paramType' | 'paramTypeConfig' | 'assetLibrary' | 'assetParameter' | 'settings' | 'dataSource' | 'dataType' | 'dataResource' | 'aiGenerate' | 'embeddedEditor' | 'canvasEditorTools' | 'aiMetadata' | 'personalizationCriteria';
1882
+ type MeshLocationTypes = 'paramType' | 'paramTypeConfig' | 'assetLibrary' | 'assetParameter' | 'settings' | 'dataSource' | 'dataType' | 'dataResource' | 'aiGenerate' | 'embeddedEditor' | 'canvasEditorTools' | 'aiMetadata' | 'personalizationCriteria' | 'tool';
1832
1883
  type SetValueOptions = ValidationResult;
1833
1884
  type SetValueMessage = {
1834
1885
  uniformMeshLocationValue: unknown;
@@ -1870,7 +1921,6 @@ type AIPromptMetadataLocation = MeshLocationCore<Record<string, unknown>, Prompt
1870
1921
  type CanvasEditorToolsLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<{
1871
1922
  releaseId?: string;
1872
1923
  state?: number;
1873
- locales: Locale[];
1874
1924
  }, TIntegrationConfiguration>;
1875
1925
  type CanvasEditorToolsReferenceData = {
1876
1926
  name: string;
@@ -1949,6 +1999,11 @@ type PersonalizationCriteriaLocationMetadata<TIntegrationConfiguration = unknown
1949
1999
  /** @deprecated Experimental functionality is subject to change in minor versions. */
1950
2000
  type PersonalizationCriteriaLocation<TCriteriaValue, TIntegrationConfiguration = unknown> = MeshLocationCore<TCriteriaValue | undefined, PersonalizationCriteriaLocationMetadata<TIntegrationConfiguration>, TCriteriaValue, 'personalizationCriteria'>;
1951
2001
 
2002
+ /** @deprecated Experimental functionality is subject to change in minor versions. */
2003
+ type ToolLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<unknown, TIntegrationConfiguration>;
2004
+ /** @deprecated Experimental functionality is subject to change in minor versions. */
2005
+ type ToolLocation<TTool, TIntegrationConfiguration = unknown> = MeshLocationCore<TTool, ToolLocationMetadata<TIntegrationConfiguration>, TTool, 'tool'>;
2006
+
1952
2007
  interface SdkWindow {
1953
2008
  /** The current window object. */
1954
2009
  instance: Window;
@@ -2052,4 +2107,4 @@ declare const hasPermissions: (permissions: MeshLocationUserPermissions | MeshLo
2052
2107
  */
2053
2108
  declare const hasRole: (role: string, user: UniformUser) => boolean;
2054
2109
 
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 };
2110
+ 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.10.0";
134
+ var UNIFORM_MESH_SDK_VERSION = "20.12.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,
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.10.0";
175
+ var UNIFORM_MESH_SDK_VERSION = "20.12.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,
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.10.0";
134
+ var UNIFORM_MESH_SDK_VERSION = "20.12.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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/mesh-sdk",
3
- "version": "20.10.0",
3
+ "version": "20.12.1-alpha.18+3386e9d0fc",
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,10 +34,10 @@
34
34
  "access": "public"
35
35
  },
36
36
  "dependencies": {
37
- "@uniformdev/assets": "20.10.0",
38
- "@uniformdev/canvas": "20.10.0",
39
- "@uniformdev/context": "20.10.0",
40
- "@uniformdev/project-map": "20.10.0",
37
+ "@uniformdev/assets": "20.12.1-alpha.18+3386e9d0fc",
38
+ "@uniformdev/canvas": "20.12.1-alpha.18+3386e9d0fc",
39
+ "@uniformdev/context": "20.12.1-alpha.18+3386e9d0fc",
40
+ "@uniformdev/project-map": "20.12.1-alpha.18+3386e9d0fc",
41
41
  "imagesloaded": "^5.0.0",
42
42
  "mitt": "^3.0.1"
43
43
  },
@@ -45,5 +45,5 @@
45
45
  "@types/imagesloaded": "^4.1.2",
46
46
  "openai": "^4.58.2"
47
47
  },
48
- "gitHead": "a17d7e247f34bc04f8ffd1274d850484dd09716b"
48
+ "gitHead": "3386e9d0fc01d7c246b623705939a55df3df2dae"
49
49
  }