@uniformdev/mesh-sdk 20.12.1-alpha.23 → 20.12.1-alpha.26

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
@@ -233,9 +233,10 @@ 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")[];
@@ -492,9 +493,10 @@ interface paths$1 {
492
493
  definition: {
493
494
  name: string;
494
495
  description: string;
495
- parameters?: {
496
+ parameters: {
496
497
  [key: string]: unknown;
497
498
  };
499
+ strict: boolean;
498
500
  };
499
501
  systemParameters?: "pageHtml"[];
500
502
  includedAgents?: ("scout" | "sage")[];
@@ -736,9 +738,10 @@ interface paths$1 {
736
738
  definition: {
737
739
  name: string;
738
740
  description: string;
739
- parameters?: {
741
+ parameters: {
740
742
  [key: string]: unknown;
741
743
  };
744
+ strict: boolean;
742
745
  };
743
746
  systemParameters?: "pageHtml"[];
744
747
  includedAgents?: ("scout" | "sage")[];
@@ -1329,9 +1332,10 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
1329
1332
  definition: {
1330
1333
  name: string;
1331
1334
  description: string;
1332
- parameters?: {
1335
+ parameters: {
1333
1336
  [key: string]: unknown;
1334
1337
  };
1338
+ strict: boolean;
1335
1339
  };
1336
1340
  systemParameters?: "pageHtml"[];
1337
1341
  includedAgents?: ("scout" | "sage")[];
@@ -1412,7 +1416,11 @@ type FunctionCallSystemParameter = (typeof functionCallSystemParameters)[number]
1412
1416
  declare function parseFunctionCall<Parameters extends Record<string, string>, Settings = Record<string, string>>(request: Pick<Request, 'body'>): {
1413
1417
  functionCall: {
1414
1418
  arguments: Parameters;
1419
+ call_id: string;
1415
1420
  name: string;
1421
+ type: "function_call";
1422
+ id?: string;
1423
+ status?: "in_progress" | "completed" | "incomplete";
1416
1424
  };
1417
1425
  settings: Settings;
1418
1426
  systemParameters: Record<FunctionCallSystemParameter, string | undefined>;
@@ -1544,6 +1552,7 @@ interface MeshContextData {
1544
1552
  locationMetadata: any;
1545
1553
  uniformApiVersion: string;
1546
1554
  dialogContext?: DialogContext;
1555
+ fullScreenHeight?: boolean;
1547
1556
  }
1548
1557
  interface DialogContext {
1549
1558
  dialogId: string;
@@ -1645,6 +1654,7 @@ type OpenDialogMessage = {
1645
1654
  type NavigateMessage = {
1646
1655
  path: string;
1647
1656
  options?: {
1657
+ projectId?: string;
1648
1658
  target?: '_blank';
1649
1659
  };
1650
1660
  };
@@ -1750,8 +1760,6 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
1750
1760
  metadata: TMetadata;
1751
1761
  /**
1752
1762
  * 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
1763
  */
1756
1764
  router: MeshRouter;
1757
1765
  /**
@@ -1778,9 +1786,13 @@ type MeshRouter = {
1778
1786
  * So router.navigate('/canvas/edit/{compositionId}') will navigate will open the composition editor for the given composition ID in the parent frame.
1779
1787
  * Be aware that most of the time it will close your mesh app, so you should use it with caution.
1780
1788
  *
1781
- * @deprecated Is not stable yet so can contain breaking changes in the future
1789
+ * @param path - The path to navigate to. You don't need to specify /projects/${projectId} as it is prepended automatically with the current project ID.
1790
+ * @param options - The options for the navigation.
1791
+ * @param options.projectId - You can specify project ID to navigate to. By default the current project ID is used.
1792
+ * @param options.target - Allows to open a new tab instead of navigating the current one.
1782
1793
  */
1783
1794
  navigatePlatform: (path: string, options?: {
1795
+ projectId?: string;
1784
1796
  target?: '_blank';
1785
1797
  }) => void;
1786
1798
  };
@@ -1864,6 +1876,10 @@ type MeshLocationUserPermissions =
1864
1876
  | 'COMPOSITIONS_READ_DRAFT'
1865
1877
  /** Uniform Canvas:Component Library:Manage|Create, update, and delete component library data */
1866
1878
  | 'COMPOSITIONS_MANAGE_SCHEMA'
1879
+ /** Uniform Canvas:Content Types:Manage|Create, update, and delete content types */
1880
+ | 'ENTRIES_MANAGE_SCHEMA'
1881
+ /** Uniform Canvas:AI Prompts:Manage|Create, update, and delete AI prompts */
1882
+ | 'PROMPTS_MANAGE_SCHEMA'
1867
1883
  /** UTM Mapper:Read|Read UTM mapper configuration */
1868
1884
  | 'UTM_MAPPER_READ'
1869
1885
  /** UTM Mapper:Read|Create, update and delete UTM mapper configuration */
@@ -1999,9 +2015,7 @@ type PersonalizationCriteriaLocationMetadata<TIntegrationConfiguration = unknown
1999
2015
  /** @deprecated Experimental functionality is subject to change in minor versions. */
2000
2016
  type PersonalizationCriteriaLocation<TCriteriaValue, TIntegrationConfiguration = unknown> = MeshLocationCore<TCriteriaValue | undefined, PersonalizationCriteriaLocationMetadata<TIntegrationConfiguration>, TCriteriaValue, 'personalizationCriteria'>;
2001
2017
 
2002
- /** @deprecated Experimental functionality is subject to change in minor versions. */
2003
2018
  type ToolLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<unknown, TIntegrationConfiguration>;
2004
- /** @deprecated Experimental functionality is subject to change in minor versions. */
2005
2019
  type ToolLocation<TTool, TIntegrationConfiguration = unknown> = MeshLocationCore<TTool, ToolLocationMetadata<TIntegrationConfiguration>, TTool, 'tool'>;
2006
2020
 
2007
2021
  interface SdkWindow {
package/dist/index.d.ts CHANGED
@@ -233,9 +233,10 @@ 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")[];
@@ -492,9 +493,10 @@ interface paths$1 {
492
493
  definition: {
493
494
  name: string;
494
495
  description: string;
495
- parameters?: {
496
+ parameters: {
496
497
  [key: string]: unknown;
497
498
  };
499
+ strict: boolean;
498
500
  };
499
501
  systemParameters?: "pageHtml"[];
500
502
  includedAgents?: ("scout" | "sage")[];
@@ -736,9 +738,10 @@ interface paths$1 {
736
738
  definition: {
737
739
  name: string;
738
740
  description: string;
739
- parameters?: {
741
+ parameters: {
740
742
  [key: string]: unknown;
741
743
  };
744
+ strict: boolean;
742
745
  };
743
746
  systemParameters?: "pageHtml"[];
744
747
  includedAgents?: ("scout" | "sage")[];
@@ -1329,9 +1332,10 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
1329
1332
  definition: {
1330
1333
  name: string;
1331
1334
  description: string;
1332
- parameters?: {
1335
+ parameters: {
1333
1336
  [key: string]: unknown;
1334
1337
  };
1338
+ strict: boolean;
1335
1339
  };
1336
1340
  systemParameters?: "pageHtml"[];
1337
1341
  includedAgents?: ("scout" | "sage")[];
@@ -1412,7 +1416,11 @@ type FunctionCallSystemParameter = (typeof functionCallSystemParameters)[number]
1412
1416
  declare function parseFunctionCall<Parameters extends Record<string, string>, Settings = Record<string, string>>(request: Pick<Request, 'body'>): {
1413
1417
  functionCall: {
1414
1418
  arguments: Parameters;
1419
+ call_id: string;
1415
1420
  name: string;
1421
+ type: "function_call";
1422
+ id?: string;
1423
+ status?: "in_progress" | "completed" | "incomplete";
1416
1424
  };
1417
1425
  settings: Settings;
1418
1426
  systemParameters: Record<FunctionCallSystemParameter, string | undefined>;
@@ -1544,6 +1552,7 @@ interface MeshContextData {
1544
1552
  locationMetadata: any;
1545
1553
  uniformApiVersion: string;
1546
1554
  dialogContext?: DialogContext;
1555
+ fullScreenHeight?: boolean;
1547
1556
  }
1548
1557
  interface DialogContext {
1549
1558
  dialogId: string;
@@ -1645,6 +1654,7 @@ type OpenDialogMessage = {
1645
1654
  type NavigateMessage = {
1646
1655
  path: string;
1647
1656
  options?: {
1657
+ projectId?: string;
1648
1658
  target?: '_blank';
1649
1659
  };
1650
1660
  };
@@ -1750,8 +1760,6 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
1750
1760
  metadata: TMetadata;
1751
1761
  /**
1752
1762
  * 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
1763
  */
1756
1764
  router: MeshRouter;
1757
1765
  /**
@@ -1778,9 +1786,13 @@ type MeshRouter = {
1778
1786
  * So router.navigate('/canvas/edit/{compositionId}') will navigate will open the composition editor for the given composition ID in the parent frame.
1779
1787
  * Be aware that most of the time it will close your mesh app, so you should use it with caution.
1780
1788
  *
1781
- * @deprecated Is not stable yet so can contain breaking changes in the future
1789
+ * @param path - The path to navigate to. You don't need to specify /projects/${projectId} as it is prepended automatically with the current project ID.
1790
+ * @param options - The options for the navigation.
1791
+ * @param options.projectId - You can specify project ID to navigate to. By default the current project ID is used.
1792
+ * @param options.target - Allows to open a new tab instead of navigating the current one.
1782
1793
  */
1783
1794
  navigatePlatform: (path: string, options?: {
1795
+ projectId?: string;
1784
1796
  target?: '_blank';
1785
1797
  }) => void;
1786
1798
  };
@@ -1864,6 +1876,10 @@ type MeshLocationUserPermissions =
1864
1876
  | 'COMPOSITIONS_READ_DRAFT'
1865
1877
  /** Uniform Canvas:Component Library:Manage|Create, update, and delete component library data */
1866
1878
  | 'COMPOSITIONS_MANAGE_SCHEMA'
1879
+ /** Uniform Canvas:Content Types:Manage|Create, update, and delete content types */
1880
+ | 'ENTRIES_MANAGE_SCHEMA'
1881
+ /** Uniform Canvas:AI Prompts:Manage|Create, update, and delete AI prompts */
1882
+ | 'PROMPTS_MANAGE_SCHEMA'
1867
1883
  /** UTM Mapper:Read|Read UTM mapper configuration */
1868
1884
  | 'UTM_MAPPER_READ'
1869
1885
  /** UTM Mapper:Read|Create, update and delete UTM mapper configuration */
@@ -1999,9 +2015,7 @@ type PersonalizationCriteriaLocationMetadata<TIntegrationConfiguration = unknown
1999
2015
  /** @deprecated Experimental functionality is subject to change in minor versions. */
2000
2016
  type PersonalizationCriteriaLocation<TCriteriaValue, TIntegrationConfiguration = unknown> = MeshLocationCore<TCriteriaValue | undefined, PersonalizationCriteriaLocationMetadata<TIntegrationConfiguration>, TCriteriaValue, 'personalizationCriteria'>;
2001
2017
 
2002
- /** @deprecated Experimental functionality is subject to change in minor versions. */
2003
2018
  type ToolLocationMetadata<TIntegrationConfiguration = unknown> = CommonMetadata<unknown, TIntegrationConfiguration>;
2004
- /** @deprecated Experimental functionality is subject to change in minor versions. */
2005
2019
  type ToolLocation<TTool, TIntegrationConfiguration = unknown> = MeshLocationCore<TTool, ToolLocationMetadata<TIntegrationConfiguration>, TTool, 'tool'>;
2006
2020
 
2007
2021
  interface SdkWindow {
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.12.0";
134
+ var UNIFORM_MESH_SDK_VERSION = "20.14.3";
135
135
 
136
136
  // src/framepost/constants.ts
137
137
  var DEFAULT_REQUEST_TIMEOUT = 5e3;
@@ -552,9 +552,11 @@ var createSdkWindow = ({
552
552
  }
553
553
  const windowInstance = window;
554
554
  const updateHeight = (height) => {
555
- if (height && height !== oldHeight) {
556
- oldHeight = height;
557
- onHeightChange == null ? void 0 : onHeightChange(height);
555
+ if (height) {
556
+ if (height !== oldHeight) {
557
+ oldHeight = height;
558
+ onHeightChange == null ? void 0 : onHeightChange(height);
559
+ }
558
560
  return;
559
561
  }
560
562
  let maxBottom = windowInstance.document.documentElement.getBoundingClientRect().height;
@@ -625,6 +627,7 @@ var createSdkWindow = ({
625
627
  childList: true,
626
628
  subtree: true
627
629
  });
630
+ updateHeight();
628
631
  },
629
632
  disableAutoResizing: () => {
630
633
  observer == null ? void 0 : observer.disconnect();
@@ -742,7 +745,10 @@ async function initializeUniformMeshSDK({
742
745
  // then we disable autoResizing for the dialog location.
743
746
  // Otherwise, autoResizing will likely "overwrite" the specified `contentHeight` value, making
744
747
  // developers very sad and confused. No one wants a sad and confused developer.
745
- autoResizingDisabled: ((_a = contextData.dialogContext) == null ? void 0 : _a.contentHeight) ? true : 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
746
752
  }),
747
753
  version: contextData.uniformApiVersion,
748
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.12.0";
175
+ var UNIFORM_MESH_SDK_VERSION = "20.14.3";
176
176
 
177
177
  // src/framepost/constants.ts
178
178
  var DEFAULT_REQUEST_TIMEOUT = 5e3;
@@ -593,9 +593,11 @@ var createSdkWindow = ({
593
593
  }
594
594
  const windowInstance = window;
595
595
  const updateHeight = (height) => {
596
- if (height && height !== oldHeight) {
597
- oldHeight = height;
598
- onHeightChange == null ? void 0 : onHeightChange(height);
596
+ if (height) {
597
+ if (height !== oldHeight) {
598
+ oldHeight = height;
599
+ onHeightChange == null ? void 0 : onHeightChange(height);
600
+ }
599
601
  return;
600
602
  }
601
603
  let maxBottom = windowInstance.document.documentElement.getBoundingClientRect().height;
@@ -666,6 +668,7 @@ var createSdkWindow = ({
666
668
  childList: true,
667
669
  subtree: true
668
670
  });
671
+ updateHeight();
669
672
  },
670
673
  disableAutoResizing: () => {
671
674
  observer == null ? void 0 : observer.disconnect();
@@ -783,7 +786,10 @@ async function initializeUniformMeshSDK({
783
786
  // then we disable autoResizing for the dialog location.
784
787
  // Otherwise, autoResizing will likely "overwrite" the specified `contentHeight` value, making
785
788
  // developers very sad and confused. No one wants a sad and confused developer.
786
- autoResizingDisabled: ((_a = contextData.dialogContext) == null ? void 0 : _a.contentHeight) ? true : 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
787
793
  }),
788
794
  version: contextData.uniformApiVersion,
789
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.12.0";
134
+ var UNIFORM_MESH_SDK_VERSION = "20.14.3";
135
135
 
136
136
  // src/framepost/constants.ts
137
137
  var DEFAULT_REQUEST_TIMEOUT = 5e3;
@@ -552,9 +552,11 @@ var createSdkWindow = ({
552
552
  }
553
553
  const windowInstance = window;
554
554
  const updateHeight = (height) => {
555
- if (height && height !== oldHeight) {
556
- oldHeight = height;
557
- onHeightChange == null ? void 0 : onHeightChange(height);
555
+ if (height) {
556
+ if (height !== oldHeight) {
557
+ oldHeight = height;
558
+ onHeightChange == null ? void 0 : onHeightChange(height);
559
+ }
558
560
  return;
559
561
  }
560
562
  let maxBottom = windowInstance.document.documentElement.getBoundingClientRect().height;
@@ -625,6 +627,7 @@ var createSdkWindow = ({
625
627
  childList: true,
626
628
  subtree: true
627
629
  });
630
+ updateHeight();
628
631
  },
629
632
  disableAutoResizing: () => {
630
633
  observer == null ? void 0 : observer.disconnect();
@@ -742,7 +745,10 @@ async function initializeUniformMeshSDK({
742
745
  // then we disable autoResizing for the dialog location.
743
746
  // Otherwise, autoResizing will likely "overwrite" the specified `contentHeight` value, making
744
747
  // developers very sad and confused. No one wants a sad and confused developer.
745
- autoResizingDisabled: ((_a = contextData.dialogContext) == null ? void 0 : _a.contentHeight) ? true : 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
746
752
  }),
747
753
  version: contextData.uniformApiVersion,
748
754
  openLocationDialog: async ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/mesh-sdk",
3
- "version": "20.12.1-alpha.23+36df23cbe9",
3
+ "version": "20.12.1-alpha.26+727af74745",
4
4
  "description": "Uniform Mesh Framework SDK",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -34,16 +34,16 @@
34
34
  "access": "public"
35
35
  },
36
36
  "dependencies": {
37
- "@uniformdev/assets": "20.12.1-alpha.23+36df23cbe9",
38
- "@uniformdev/canvas": "20.12.1-alpha.23+36df23cbe9",
39
- "@uniformdev/context": "20.12.1-alpha.23+36df23cbe9",
40
- "@uniformdev/project-map": "20.12.1-alpha.23+36df23cbe9",
37
+ "@uniformdev/assets": "20.12.1-alpha.26+727af74745",
38
+ "@uniformdev/canvas": "20.12.1-alpha.26+727af74745",
39
+ "@uniformdev/context": "20.12.1-alpha.26+727af74745",
40
+ "@uniformdev/project-map": "20.12.1-alpha.26+727af74745",
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": "^4.58.2"
46
+ "openai": "4.94.0"
47
47
  },
48
- "gitHead": "36df23cbe9ca246137efcf2f4a57e04d029406cc"
48
+ "gitHead": "727af74745bafe690997e093f65e0c3d0aef5a45"
49
49
  }