@uniformdev/mesh-sdk 19.69.0 → 19.71.1-alpha.103

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,6 +1,7 @@
1
1
  import { ApiClient, ClientOptions, ExceptProject } from '@uniformdev/context/api';
2
2
  import { ProjectMapNode } from '@uniformdev/project-map';
3
- import { DataType, DataSource, DataResourceVariables, RootComponentInstance, ComponentInstance, ComponentDefinition, ComponentDefinitionParameter, DataVariableDefinition } from '@uniformdev/canvas';
3
+ import { AssetParamValue, DataType, DataSource, DataResourceVariables, RootComponentInstance, ComponentInstance, ComponentDefinition, ComponentDefinitionParameter, DataVariableDefinition } from '@uniformdev/canvas';
4
+ export { AssetParamValue, AssetParamValueItem } from '@uniformdev/canvas';
4
5
  import { Emitter } from 'mitt';
5
6
 
6
7
  /**
@@ -63,6 +64,8 @@ interface paths$1 {
63
64
  };
64
65
  };
65
66
  renderableInPropertyPanel?: boolean;
67
+ /** @enum {string} */
68
+ localizable?: "default-yes" | "default-no" | "yes" | "no";
66
69
  }[];
67
70
  };
68
71
  dataConnectors?: {
@@ -93,10 +96,68 @@ interface paths$1 {
93
96
  };
94
97
  badgeIconUrl?: string;
95
98
  }[];
99
+ assetLibrary?: {
100
+ assetLibraryUrl: string;
101
+ assetParameterUrl: string;
102
+ unstable_dynamicAssets?: {
103
+ dataConnectorId: string;
104
+ assetsListArchetypeId: string;
105
+ singleAssetArchetypeId: string;
106
+ };
107
+ };
108
+ unstable_assetLibrary?: {
109
+ url: string;
110
+ dynamicAssets?: {
111
+ dataConnectorId: string;
112
+ assetsListArchetypeId: string;
113
+ singleAssetArchetypeId: string;
114
+ };
115
+ };
116
+ ai?: {
117
+ generateUrl: string;
118
+ metadataUrl?: string;
119
+ prompts?: {
120
+ /** Format: uuid */
121
+ id: string;
122
+ name: string;
123
+ text: string;
124
+ data?: {
125
+ arguments?: {
126
+ [key: string]: {
127
+ type: string;
128
+ displayName?: string | null;
129
+ helpText?: string | null;
130
+ default?: string | null;
131
+ };
132
+ } | null;
133
+ metadata?: unknown;
134
+ } | null;
135
+ parameterTypes: string[];
136
+ }[];
137
+ };
96
138
  unstable_ai?: {
97
139
  generateUrl: string;
140
+ metadataUrl?: string;
98
141
  };
99
142
  };
143
+ unstable_prompts?: {
144
+ /** Format: uuid */
145
+ id: string;
146
+ name: string;
147
+ text: string;
148
+ data?: {
149
+ arguments?: {
150
+ [key: string]: {
151
+ type: string;
152
+ displayName?: string | null;
153
+ helpText?: string | null;
154
+ default?: string | null;
155
+ };
156
+ } | null;
157
+ metadata?: unknown;
158
+ } | null;
159
+ parameterTypes: string[];
160
+ }[];
100
161
  }[];
101
162
  };
102
163
  };
@@ -154,6 +215,8 @@ interface paths$1 {
154
215
  };
155
216
  };
156
217
  renderableInPropertyPanel?: boolean;
218
+ /** @enum {string} */
219
+ localizable?: "default-yes" | "default-no" | "yes" | "no";
157
220
  }[];
158
221
  };
159
222
  dataConnectors?: {
@@ -184,10 +247,68 @@ interface paths$1 {
184
247
  };
185
248
  badgeIconUrl?: string;
186
249
  }[];
250
+ assetLibrary?: {
251
+ assetLibraryUrl: string;
252
+ assetParameterUrl: string;
253
+ unstable_dynamicAssets?: {
254
+ dataConnectorId: string;
255
+ assetsListArchetypeId: string;
256
+ singleAssetArchetypeId: string;
257
+ };
258
+ };
259
+ unstable_assetLibrary?: {
260
+ url: string;
261
+ dynamicAssets?: {
262
+ dataConnectorId: string;
263
+ assetsListArchetypeId: string;
264
+ singleAssetArchetypeId: string;
265
+ };
266
+ };
267
+ ai?: {
268
+ generateUrl: string;
269
+ metadataUrl?: string;
270
+ prompts?: {
271
+ /** Format: uuid */
272
+ id: string;
273
+ name: string;
274
+ text: string;
275
+ data?: {
276
+ arguments?: {
277
+ [key: string]: {
278
+ type: string;
279
+ displayName?: string | null;
280
+ helpText?: string | null;
281
+ default?: string | null;
282
+ };
283
+ } | null;
284
+ metadata?: unknown;
285
+ } | null;
286
+ parameterTypes: string[];
287
+ }[];
288
+ };
187
289
  unstable_ai?: {
188
290
  generateUrl: string;
291
+ metadataUrl?: string;
189
292
  };
190
293
  };
294
+ unstable_prompts?: {
295
+ /** Format: uuid */
296
+ id: string;
297
+ name: string;
298
+ text: string;
299
+ data?: {
300
+ arguments?: {
301
+ [key: string]: {
302
+ type: string;
303
+ displayName?: string | null;
304
+ helpText?: string | null;
305
+ default?: string | null;
306
+ };
307
+ } | null;
308
+ metadata?: unknown;
309
+ } | null;
310
+ parameterTypes: string[];
311
+ }[];
191
312
  };
192
313
  };
193
314
  };
@@ -244,6 +365,8 @@ interface paths$1 {
244
365
  };
245
366
  };
246
367
  renderableInPropertyPanel?: boolean;
368
+ /** @enum {string} */
369
+ localizable?: "default-yes" | "default-no" | "yes" | "no";
247
370
  }[];
248
371
  };
249
372
  dataConnectors?: {
@@ -274,10 +397,68 @@ interface paths$1 {
274
397
  };
275
398
  badgeIconUrl?: string;
276
399
  }[];
400
+ assetLibrary?: {
401
+ assetLibraryUrl: string;
402
+ assetParameterUrl: string;
403
+ unstable_dynamicAssets?: {
404
+ dataConnectorId: string;
405
+ assetsListArchetypeId: string;
406
+ singleAssetArchetypeId: string;
407
+ };
408
+ };
409
+ unstable_assetLibrary?: {
410
+ url: string;
411
+ dynamicAssets?: {
412
+ dataConnectorId: string;
413
+ assetsListArchetypeId: string;
414
+ singleAssetArchetypeId: string;
415
+ };
416
+ };
417
+ ai?: {
418
+ generateUrl: string;
419
+ metadataUrl?: string;
420
+ prompts?: {
421
+ /** Format: uuid */
422
+ id: string;
423
+ name: string;
424
+ text: string;
425
+ data?: {
426
+ arguments?: {
427
+ [key: string]: {
428
+ type: string;
429
+ displayName?: string | null;
430
+ helpText?: string | null;
431
+ default?: string | null;
432
+ };
433
+ } | null;
434
+ metadata?: unknown;
435
+ } | null;
436
+ parameterTypes: string[];
437
+ }[];
438
+ };
277
439
  unstable_ai?: {
278
440
  generateUrl: string;
441
+ metadataUrl?: string;
279
442
  };
280
443
  };
444
+ unstable_prompts?: {
445
+ /** Format: uuid */
446
+ id: string;
447
+ name: string;
448
+ text: string;
449
+ data?: {
450
+ arguments?: {
451
+ [key: string]: {
452
+ type: string;
453
+ displayName?: string | null;
454
+ helpText?: string | null;
455
+ default?: string | null;
456
+ };
457
+ } | null;
458
+ metadata?: unknown;
459
+ } | null;
460
+ parameterTypes: string[];
461
+ }[];
281
462
  };
282
463
  };
283
464
  };
@@ -583,6 +764,7 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
583
764
  };
584
765
  } | undefined;
585
766
  renderableInPropertyPanel?: boolean | undefined;
767
+ localizable?: "default-yes" | "default-no" | "yes" | "no" | undefined;
586
768
  }[];
587
769
  } | undefined;
588
770
  dataConnectors?: {
@@ -613,10 +795,66 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
613
795
  } | undefined;
614
796
  badgeIconUrl?: string | undefined;
615
797
  }[] | undefined;
798
+ assetLibrary?: {
799
+ assetLibraryUrl: string;
800
+ assetParameterUrl: string;
801
+ unstable_dynamicAssets?: {
802
+ dataConnectorId: string;
803
+ assetsListArchetypeId: string;
804
+ singleAssetArchetypeId: string;
805
+ } | undefined;
806
+ } | undefined;
807
+ unstable_assetLibrary?: {
808
+ url: string;
809
+ dynamicAssets?: {
810
+ dataConnectorId: string;
811
+ assetsListArchetypeId: string;
812
+ singleAssetArchetypeId: string;
813
+ } | undefined;
814
+ } | undefined;
815
+ ai?: {
816
+ generateUrl: string;
817
+ metadataUrl?: string | undefined;
818
+ prompts?: {
819
+ id: string;
820
+ name: string;
821
+ text: string;
822
+ data?: {
823
+ arguments?: {
824
+ [key: string]: {
825
+ type: string;
826
+ displayName?: string | null | undefined;
827
+ helpText?: string | null | undefined;
828
+ default?: string | null | undefined;
829
+ };
830
+ } | null | undefined;
831
+ metadata?: unknown;
832
+ } | null | undefined;
833
+ parameterTypes: string[];
834
+ }[] | undefined;
835
+ } | undefined;
616
836
  unstable_ai?: {
617
837
  generateUrl: string;
838
+ metadataUrl?: string | undefined;
618
839
  } | undefined;
619
840
  };
841
+ unstable_prompts?: {
842
+ id: string;
843
+ name: string;
844
+ text: string;
845
+ data?: {
846
+ arguments?: {
847
+ [key: string]: {
848
+ type: string;
849
+ displayName?: string | null | undefined;
850
+ helpText?: string | null | undefined;
851
+ default?: string | null | undefined;
852
+ };
853
+ } | null | undefined;
854
+ metadata?: unknown;
855
+ } | null | undefined;
856
+ parameterTypes: string[];
857
+ }[] | undefined;
620
858
  }>;
621
859
  /** Deletes a mesh app from a team */
622
860
  remove(body: Omit<IntegrationDefinitionDeleteParameters, 'teamId'>): Promise<void>;
@@ -638,6 +876,33 @@ declare class IntegrationInstallationClient extends ApiClient {
638
876
  remove(body: ExceptProject<IntegrationInstallationDeleteParameters>): Promise<void>;
639
877
  }
640
878
 
879
+ type AssetLibraryLocationMetadata<TIntegrationConfiguration = unknown> = {
880
+ /** Settings defined at the integration level (arbitrary type used on settings location) */
881
+ settings: TIntegrationConfiguration;
882
+ /** The Uniform project ID */
883
+ projectId: string;
884
+ /** The current Uniform integration source ID */
885
+ sourceId: string;
886
+ };
887
+ type AssetParameterLocationMetadata<TIntegrationConfiguration = unknown> = {
888
+ /** Settings defined at the integration level (arbitrary type used on settings location) */
889
+ settings: TIntegrationConfiguration;
890
+ /** The Uniform project ID */
891
+ projectId: string;
892
+ /** The current Uniform integration source ID */
893
+ sourceId: string;
894
+ /** The resolved data if this source is connected to a data resource */
895
+ dataResourceData?: unknown;
896
+ /**
897
+ * The maximum number of assets that can be selected in the Asset Library.
898
+ *
899
+ * Default: 1
900
+ */
901
+ maxAssets?: number;
902
+ };
903
+ type AssetLibraryLocation = MeshLocationCore<unknown, AssetLibraryLocationMetadata, unknown, 'assetLibrary'> & GetDataResourceLocation;
904
+ type AssetParameterLocation = MeshLocationCore<AssetParamValue, AssetParameterLocationMetadata, AssetParamValue, 'assetParameter'> & GetDataResourceLocation;
905
+
641
906
  type DataTypeLocationValue = Pick<DataType, 'body' | 'method' | 'path' | 'custom' | 'headers' | 'parameters' | 'variables'>;
642
907
  type DataConnectorInfo = {
643
908
  type: string;
@@ -712,6 +977,13 @@ type ParamTypeLocationMetadata<TParamConfiguration = unknown, TIntegrationConfig
712
977
  * Use the <ParamTypeDynamicDataProvider> to wire up dynamic data in your parameter.
713
978
  */
714
979
  connectedData: Record<string, unknown>;
980
+ /**
981
+ * The target locale being edited.
982
+ * If the parameter is not defined as localizable, then this is always undefined.
983
+ * If the parameter is localizable, then this is the current editor language.
984
+ * Note that setValue() always sets the target language automatically.
985
+ */
986
+ targetLocale: string | undefined;
715
987
  };
716
988
  type ParamTypeLocation<TParamValue = unknown, TParamConfiguration = unknown, TParamSetValue = TParamValue, TIntegrationConfiguration = unknown> = MeshLocationCore<TParamValue | undefined, ParamTypeLocationMetadata<TParamConfiguration, TIntegrationConfiguration>, TParamSetValue, 'paramType'> & {
717
989
  /**
@@ -730,7 +1002,7 @@ type SettingsLocation<TSettingsType> = MeshLocationCore<TSettingsType, SettingsL
730
1002
  * Defines methods used for interacting with a Mesh location
731
1003
  * To receive useful typings, check the `type` property of the location to narrow the typing.
732
1004
  */
733
- type MeshLocation<TValue = unknown, TSetValue = TValue> = ParamTypeLocation<TValue, unknown, TSetValue> | ParamTypeConfigLocation<TValue> | SettingsLocation<TValue> | DataSourceLocation | DataTypeLocation | DataResourceLocation | AIGenerateLocation<TValue>;
1005
+ type MeshLocation<TValue = unknown, TSetValue = TValue> = ParamTypeLocation<TValue, unknown, TSetValue> | ParamTypeConfigLocation<TValue> | SettingsLocation<TValue> | AssetLibraryLocation | AssetParameterLocation | DataSourceLocation | DataTypeLocation | DataResourceLocation | AIGenerateLocation<TValue> | AIPromptMetadataLocation;
734
1006
  interface MeshContextData {
735
1007
  locationKey: string;
736
1008
  locationType: MeshLocationTypes;
@@ -919,7 +1191,7 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
919
1191
  /**
920
1192
  * Known location types that can be passed to a mesh location
921
1193
  */
922
- type MeshLocationTypes = 'paramType' | 'paramTypeConfig' | 'settings' | 'dataSource' | 'dataType' | 'dataResource' | 'unstable_ai';
1194
+ type MeshLocationTypes = 'paramType' | 'paramTypeConfig' | 'assetLibrary' | 'assetParameter' | 'settings' | 'dataSource' | 'dataType' | 'dataResource' | 'aiGenerate' | 'aiMetadata';
923
1195
  type SetValueOptions = ValidationResult;
924
1196
  type SetValueMessage = {
925
1197
  uniformMeshLocationValue: unknown;
@@ -952,8 +1224,16 @@ type AIGenerateLocationMetadata<TIntegrationConfiguration = unknown> = {
952
1224
  projectId: string;
953
1225
  prompt: string;
954
1226
  promptMetadata: Record<string, unknown>;
1227
+ /** Useful to differentiate AI Generate UI between text and image */
1228
+ promptOutputType: 'text' | 'image';
1229
+ };
1230
+ type PromptSettingsLocationMetadata<TIntegrationConfiguration = unknown> = {
1231
+ settings: TIntegrationConfiguration;
1232
+ /** Useful to differentiate metadata settings between text and image generation */
1233
+ promptOutputType: 'text' | 'image';
955
1234
  };
956
- type AIGenerateLocation<TType> = MeshLocationCore<TType, AIGenerateLocationMetadata, TType, 'unstable_ai'>;
1235
+ type AIGenerateLocation<TType> = MeshLocationCore<TType, AIGenerateLocationMetadata, TType, 'aiGenerate'>;
1236
+ type AIPromptMetadataLocation = MeshLocationCore<Record<string, unknown>, PromptSettingsLocationMetadata, Record<string, unknown>, 'aiMetadata'>;
957
1237
 
958
1238
  type ParamTypeConfigLocationMetadata<TIntegrationConfiguration = unknown> = {
959
1239
  /** Settings defined at the integration level (arbitrary type used on settings location) */
@@ -1061,4 +1341,4 @@ declare function initializeUniformMeshSDK({ autoResizingDisabled, }?: {
1061
1341
  autoResizingDisabled?: boolean;
1062
1342
  }): Promise<UniformMeshSDK | undefined>;
1063
1343
 
1064
- export { AIGenerateLocation, AIGenerateLocationMetadata, BindableTypes, CSSHeight, CloseDialogMessage, CloseLocationDialogOptions, DataConnectorInfo, DataResourceLocation, DataResourceLocationMetadata, DataSourceLocation, DataSourceLocationMetadata, DataSourceLocationValue, DataTypeLocation, DataTypeLocationMetadata, DataTypeLocationValue, DialogContext, DialogOptions, DialogParamValue, DialogParams, DialogResponseData, DialogResponseHandler, DialogResponseHandlers, DialogType, DynamicInput, DynamicInputs, EditConnectedDataMessage, EditConnectedDataResponse, EditConnectedDataResponseCancellationContext, GetDataResourceLocation, GetDataResourceMessage, IntegrationDefinitionClient, IntegrationDefinitionDeleteParameters, IntegrationDefinitionGetParameters, IntegrationDefinitionGetResponse, IntegrationDefinitionPutParameters, IntegrationDefinitionPutResponse, IntegrationInstallationClient, IntegrationInstallationDeleteParameters, IntegrationInstallationGetParameters, IntegrationInstallationGetResponse, IntegrationInstallationPutParameters, LocationDialogResponse, MeshContextData, MeshLocation, MeshLocationCore, MeshLocationTypes, MeshSDKEventInterface, OpenConfirmationDialogOptions, OpenConfirmationDialogResult, OpenDialogMessage, OpenDialogResult, OpenLocationDialogOptions, ParamTypeConfigLocation, ParamTypeConfigLocationMetadata, ParamTypeLocation, ParamTypeLocationMetadata, SdkWindow, SetLocationFunction, SetValueMessage, SetValueOptions, SettingsLocation, SettingsLocationMetadata, UniformMeshSDK, UniformMeshSDKEvents, ValidationResult, initializeUniformMeshSDK };
1344
+ export { type AIGenerateLocation, type AIGenerateLocationMetadata, type AIPromptMetadataLocation, type AssetLibraryLocation, type AssetLibraryLocationMetadata, type AssetParameterLocation, type AssetParameterLocationMetadata, type BindableTypes, type CSSHeight, type CloseDialogMessage, type CloseLocationDialogOptions, 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 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 MeshSDKEventInterface, type OpenConfirmationDialogOptions, type OpenConfirmationDialogResult, type OpenDialogMessage, type OpenDialogResult, type OpenLocationDialogOptions, type ParamTypeConfigLocation, type ParamTypeConfigLocationMetadata, type ParamTypeLocation, type ParamTypeLocationMetadata, type PromptSettingsLocationMetadata, type SdkWindow, type SetLocationFunction, type SetValueMessage, type SetValueOptions, type SettingsLocation, type SettingsLocationMetadata, type UniformMeshSDK, type UniformMeshSDKEvents, type ValidationResult, initializeUniformMeshSDK };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { ApiClient, ClientOptions, ExceptProject } from '@uniformdev/context/api';
2
2
  import { ProjectMapNode } from '@uniformdev/project-map';
3
- import { DataType, DataSource, DataResourceVariables, RootComponentInstance, ComponentInstance, ComponentDefinition, ComponentDefinitionParameter, DataVariableDefinition } from '@uniformdev/canvas';
3
+ import { AssetParamValue, DataType, DataSource, DataResourceVariables, RootComponentInstance, ComponentInstance, ComponentDefinition, ComponentDefinitionParameter, DataVariableDefinition } from '@uniformdev/canvas';
4
+ export { AssetParamValue, AssetParamValueItem } from '@uniformdev/canvas';
4
5
  import { Emitter } from 'mitt';
5
6
 
6
7
  /**
@@ -63,6 +64,8 @@ interface paths$1 {
63
64
  };
64
65
  };
65
66
  renderableInPropertyPanel?: boolean;
67
+ /** @enum {string} */
68
+ localizable?: "default-yes" | "default-no" | "yes" | "no";
66
69
  }[];
67
70
  };
68
71
  dataConnectors?: {
@@ -93,10 +96,68 @@ interface paths$1 {
93
96
  };
94
97
  badgeIconUrl?: string;
95
98
  }[];
99
+ assetLibrary?: {
100
+ assetLibraryUrl: string;
101
+ assetParameterUrl: string;
102
+ unstable_dynamicAssets?: {
103
+ dataConnectorId: string;
104
+ assetsListArchetypeId: string;
105
+ singleAssetArchetypeId: string;
106
+ };
107
+ };
108
+ unstable_assetLibrary?: {
109
+ url: string;
110
+ dynamicAssets?: {
111
+ dataConnectorId: string;
112
+ assetsListArchetypeId: string;
113
+ singleAssetArchetypeId: string;
114
+ };
115
+ };
116
+ ai?: {
117
+ generateUrl: string;
118
+ metadataUrl?: string;
119
+ prompts?: {
120
+ /** Format: uuid */
121
+ id: string;
122
+ name: string;
123
+ text: string;
124
+ data?: {
125
+ arguments?: {
126
+ [key: string]: {
127
+ type: string;
128
+ displayName?: string | null;
129
+ helpText?: string | null;
130
+ default?: string | null;
131
+ };
132
+ } | null;
133
+ metadata?: unknown;
134
+ } | null;
135
+ parameterTypes: string[];
136
+ }[];
137
+ };
96
138
  unstable_ai?: {
97
139
  generateUrl: string;
140
+ metadataUrl?: string;
98
141
  };
99
142
  };
143
+ unstable_prompts?: {
144
+ /** Format: uuid */
145
+ id: string;
146
+ name: string;
147
+ text: string;
148
+ data?: {
149
+ arguments?: {
150
+ [key: string]: {
151
+ type: string;
152
+ displayName?: string | null;
153
+ helpText?: string | null;
154
+ default?: string | null;
155
+ };
156
+ } | null;
157
+ metadata?: unknown;
158
+ } | null;
159
+ parameterTypes: string[];
160
+ }[];
100
161
  }[];
101
162
  };
102
163
  };
@@ -154,6 +215,8 @@ interface paths$1 {
154
215
  };
155
216
  };
156
217
  renderableInPropertyPanel?: boolean;
218
+ /** @enum {string} */
219
+ localizable?: "default-yes" | "default-no" | "yes" | "no";
157
220
  }[];
158
221
  };
159
222
  dataConnectors?: {
@@ -184,10 +247,68 @@ interface paths$1 {
184
247
  };
185
248
  badgeIconUrl?: string;
186
249
  }[];
250
+ assetLibrary?: {
251
+ assetLibraryUrl: string;
252
+ assetParameterUrl: string;
253
+ unstable_dynamicAssets?: {
254
+ dataConnectorId: string;
255
+ assetsListArchetypeId: string;
256
+ singleAssetArchetypeId: string;
257
+ };
258
+ };
259
+ unstable_assetLibrary?: {
260
+ url: string;
261
+ dynamicAssets?: {
262
+ dataConnectorId: string;
263
+ assetsListArchetypeId: string;
264
+ singleAssetArchetypeId: string;
265
+ };
266
+ };
267
+ ai?: {
268
+ generateUrl: string;
269
+ metadataUrl?: string;
270
+ prompts?: {
271
+ /** Format: uuid */
272
+ id: string;
273
+ name: string;
274
+ text: string;
275
+ data?: {
276
+ arguments?: {
277
+ [key: string]: {
278
+ type: string;
279
+ displayName?: string | null;
280
+ helpText?: string | null;
281
+ default?: string | null;
282
+ };
283
+ } | null;
284
+ metadata?: unknown;
285
+ } | null;
286
+ parameterTypes: string[];
287
+ }[];
288
+ };
187
289
  unstable_ai?: {
188
290
  generateUrl: string;
291
+ metadataUrl?: string;
189
292
  };
190
293
  };
294
+ unstable_prompts?: {
295
+ /** Format: uuid */
296
+ id: string;
297
+ name: string;
298
+ text: string;
299
+ data?: {
300
+ arguments?: {
301
+ [key: string]: {
302
+ type: string;
303
+ displayName?: string | null;
304
+ helpText?: string | null;
305
+ default?: string | null;
306
+ };
307
+ } | null;
308
+ metadata?: unknown;
309
+ } | null;
310
+ parameterTypes: string[];
311
+ }[];
191
312
  };
192
313
  };
193
314
  };
@@ -244,6 +365,8 @@ interface paths$1 {
244
365
  };
245
366
  };
246
367
  renderableInPropertyPanel?: boolean;
368
+ /** @enum {string} */
369
+ localizable?: "default-yes" | "default-no" | "yes" | "no";
247
370
  }[];
248
371
  };
249
372
  dataConnectors?: {
@@ -274,10 +397,68 @@ interface paths$1 {
274
397
  };
275
398
  badgeIconUrl?: string;
276
399
  }[];
400
+ assetLibrary?: {
401
+ assetLibraryUrl: string;
402
+ assetParameterUrl: string;
403
+ unstable_dynamicAssets?: {
404
+ dataConnectorId: string;
405
+ assetsListArchetypeId: string;
406
+ singleAssetArchetypeId: string;
407
+ };
408
+ };
409
+ unstable_assetLibrary?: {
410
+ url: string;
411
+ dynamicAssets?: {
412
+ dataConnectorId: string;
413
+ assetsListArchetypeId: string;
414
+ singleAssetArchetypeId: string;
415
+ };
416
+ };
417
+ ai?: {
418
+ generateUrl: string;
419
+ metadataUrl?: string;
420
+ prompts?: {
421
+ /** Format: uuid */
422
+ id: string;
423
+ name: string;
424
+ text: string;
425
+ data?: {
426
+ arguments?: {
427
+ [key: string]: {
428
+ type: string;
429
+ displayName?: string | null;
430
+ helpText?: string | null;
431
+ default?: string | null;
432
+ };
433
+ } | null;
434
+ metadata?: unknown;
435
+ } | null;
436
+ parameterTypes: string[];
437
+ }[];
438
+ };
277
439
  unstable_ai?: {
278
440
  generateUrl: string;
441
+ metadataUrl?: string;
279
442
  };
280
443
  };
444
+ unstable_prompts?: {
445
+ /** Format: uuid */
446
+ id: string;
447
+ name: string;
448
+ text: string;
449
+ data?: {
450
+ arguments?: {
451
+ [key: string]: {
452
+ type: string;
453
+ displayName?: string | null;
454
+ helpText?: string | null;
455
+ default?: string | null;
456
+ };
457
+ } | null;
458
+ metadata?: unknown;
459
+ } | null;
460
+ parameterTypes: string[];
461
+ }[];
281
462
  };
282
463
  };
283
464
  };
@@ -583,6 +764,7 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
583
764
  };
584
765
  } | undefined;
585
766
  renderableInPropertyPanel?: boolean | undefined;
767
+ localizable?: "default-yes" | "default-no" | "yes" | "no" | undefined;
586
768
  }[];
587
769
  } | undefined;
588
770
  dataConnectors?: {
@@ -613,10 +795,66 @@ declare class IntegrationDefinitionClient extends ApiClient<DefClientOptions> {
613
795
  } | undefined;
614
796
  badgeIconUrl?: string | undefined;
615
797
  }[] | undefined;
798
+ assetLibrary?: {
799
+ assetLibraryUrl: string;
800
+ assetParameterUrl: string;
801
+ unstable_dynamicAssets?: {
802
+ dataConnectorId: string;
803
+ assetsListArchetypeId: string;
804
+ singleAssetArchetypeId: string;
805
+ } | undefined;
806
+ } | undefined;
807
+ unstable_assetLibrary?: {
808
+ url: string;
809
+ dynamicAssets?: {
810
+ dataConnectorId: string;
811
+ assetsListArchetypeId: string;
812
+ singleAssetArchetypeId: string;
813
+ } | undefined;
814
+ } | undefined;
815
+ ai?: {
816
+ generateUrl: string;
817
+ metadataUrl?: string | undefined;
818
+ prompts?: {
819
+ id: string;
820
+ name: string;
821
+ text: string;
822
+ data?: {
823
+ arguments?: {
824
+ [key: string]: {
825
+ type: string;
826
+ displayName?: string | null | undefined;
827
+ helpText?: string | null | undefined;
828
+ default?: string | null | undefined;
829
+ };
830
+ } | null | undefined;
831
+ metadata?: unknown;
832
+ } | null | undefined;
833
+ parameterTypes: string[];
834
+ }[] | undefined;
835
+ } | undefined;
616
836
  unstable_ai?: {
617
837
  generateUrl: string;
838
+ metadataUrl?: string | undefined;
618
839
  } | undefined;
619
840
  };
841
+ unstable_prompts?: {
842
+ id: string;
843
+ name: string;
844
+ text: string;
845
+ data?: {
846
+ arguments?: {
847
+ [key: string]: {
848
+ type: string;
849
+ displayName?: string | null | undefined;
850
+ helpText?: string | null | undefined;
851
+ default?: string | null | undefined;
852
+ };
853
+ } | null | undefined;
854
+ metadata?: unknown;
855
+ } | null | undefined;
856
+ parameterTypes: string[];
857
+ }[] | undefined;
620
858
  }>;
621
859
  /** Deletes a mesh app from a team */
622
860
  remove(body: Omit<IntegrationDefinitionDeleteParameters, 'teamId'>): Promise<void>;
@@ -638,6 +876,33 @@ declare class IntegrationInstallationClient extends ApiClient {
638
876
  remove(body: ExceptProject<IntegrationInstallationDeleteParameters>): Promise<void>;
639
877
  }
640
878
 
879
+ type AssetLibraryLocationMetadata<TIntegrationConfiguration = unknown> = {
880
+ /** Settings defined at the integration level (arbitrary type used on settings location) */
881
+ settings: TIntegrationConfiguration;
882
+ /** The Uniform project ID */
883
+ projectId: string;
884
+ /** The current Uniform integration source ID */
885
+ sourceId: string;
886
+ };
887
+ type AssetParameterLocationMetadata<TIntegrationConfiguration = unknown> = {
888
+ /** Settings defined at the integration level (arbitrary type used on settings location) */
889
+ settings: TIntegrationConfiguration;
890
+ /** The Uniform project ID */
891
+ projectId: string;
892
+ /** The current Uniform integration source ID */
893
+ sourceId: string;
894
+ /** The resolved data if this source is connected to a data resource */
895
+ dataResourceData?: unknown;
896
+ /**
897
+ * The maximum number of assets that can be selected in the Asset Library.
898
+ *
899
+ * Default: 1
900
+ */
901
+ maxAssets?: number;
902
+ };
903
+ type AssetLibraryLocation = MeshLocationCore<unknown, AssetLibraryLocationMetadata, unknown, 'assetLibrary'> & GetDataResourceLocation;
904
+ type AssetParameterLocation = MeshLocationCore<AssetParamValue, AssetParameterLocationMetadata, AssetParamValue, 'assetParameter'> & GetDataResourceLocation;
905
+
641
906
  type DataTypeLocationValue = Pick<DataType, 'body' | 'method' | 'path' | 'custom' | 'headers' | 'parameters' | 'variables'>;
642
907
  type DataConnectorInfo = {
643
908
  type: string;
@@ -712,6 +977,13 @@ type ParamTypeLocationMetadata<TParamConfiguration = unknown, TIntegrationConfig
712
977
  * Use the <ParamTypeDynamicDataProvider> to wire up dynamic data in your parameter.
713
978
  */
714
979
  connectedData: Record<string, unknown>;
980
+ /**
981
+ * The target locale being edited.
982
+ * If the parameter is not defined as localizable, then this is always undefined.
983
+ * If the parameter is localizable, then this is the current editor language.
984
+ * Note that setValue() always sets the target language automatically.
985
+ */
986
+ targetLocale: string | undefined;
715
987
  };
716
988
  type ParamTypeLocation<TParamValue = unknown, TParamConfiguration = unknown, TParamSetValue = TParamValue, TIntegrationConfiguration = unknown> = MeshLocationCore<TParamValue | undefined, ParamTypeLocationMetadata<TParamConfiguration, TIntegrationConfiguration>, TParamSetValue, 'paramType'> & {
717
989
  /**
@@ -730,7 +1002,7 @@ type SettingsLocation<TSettingsType> = MeshLocationCore<TSettingsType, SettingsL
730
1002
  * Defines methods used for interacting with a Mesh location
731
1003
  * To receive useful typings, check the `type` property of the location to narrow the typing.
732
1004
  */
733
- type MeshLocation<TValue = unknown, TSetValue = TValue> = ParamTypeLocation<TValue, unknown, TSetValue> | ParamTypeConfigLocation<TValue> | SettingsLocation<TValue> | DataSourceLocation | DataTypeLocation | DataResourceLocation | AIGenerateLocation<TValue>;
1005
+ type MeshLocation<TValue = unknown, TSetValue = TValue> = ParamTypeLocation<TValue, unknown, TSetValue> | ParamTypeConfigLocation<TValue> | SettingsLocation<TValue> | AssetLibraryLocation | AssetParameterLocation | DataSourceLocation | DataTypeLocation | DataResourceLocation | AIGenerateLocation<TValue> | AIPromptMetadataLocation;
734
1006
  interface MeshContextData {
735
1007
  locationKey: string;
736
1008
  locationType: MeshLocationTypes;
@@ -919,7 +1191,7 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
919
1191
  /**
920
1192
  * Known location types that can be passed to a mesh location
921
1193
  */
922
- type MeshLocationTypes = 'paramType' | 'paramTypeConfig' | 'settings' | 'dataSource' | 'dataType' | 'dataResource' | 'unstable_ai';
1194
+ type MeshLocationTypes = 'paramType' | 'paramTypeConfig' | 'assetLibrary' | 'assetParameter' | 'settings' | 'dataSource' | 'dataType' | 'dataResource' | 'aiGenerate' | 'aiMetadata';
923
1195
  type SetValueOptions = ValidationResult;
924
1196
  type SetValueMessage = {
925
1197
  uniformMeshLocationValue: unknown;
@@ -952,8 +1224,16 @@ type AIGenerateLocationMetadata<TIntegrationConfiguration = unknown> = {
952
1224
  projectId: string;
953
1225
  prompt: string;
954
1226
  promptMetadata: Record<string, unknown>;
1227
+ /** Useful to differentiate AI Generate UI between text and image */
1228
+ promptOutputType: 'text' | 'image';
1229
+ };
1230
+ type PromptSettingsLocationMetadata<TIntegrationConfiguration = unknown> = {
1231
+ settings: TIntegrationConfiguration;
1232
+ /** Useful to differentiate metadata settings between text and image generation */
1233
+ promptOutputType: 'text' | 'image';
955
1234
  };
956
- type AIGenerateLocation<TType> = MeshLocationCore<TType, AIGenerateLocationMetadata, TType, 'unstable_ai'>;
1235
+ type AIGenerateLocation<TType> = MeshLocationCore<TType, AIGenerateLocationMetadata, TType, 'aiGenerate'>;
1236
+ type AIPromptMetadataLocation = MeshLocationCore<Record<string, unknown>, PromptSettingsLocationMetadata, Record<string, unknown>, 'aiMetadata'>;
957
1237
 
958
1238
  type ParamTypeConfigLocationMetadata<TIntegrationConfiguration = unknown> = {
959
1239
  /** Settings defined at the integration level (arbitrary type used on settings location) */
@@ -1061,4 +1341,4 @@ declare function initializeUniformMeshSDK({ autoResizingDisabled, }?: {
1061
1341
  autoResizingDisabled?: boolean;
1062
1342
  }): Promise<UniformMeshSDK | undefined>;
1063
1343
 
1064
- export { AIGenerateLocation, AIGenerateLocationMetadata, BindableTypes, CSSHeight, CloseDialogMessage, CloseLocationDialogOptions, DataConnectorInfo, DataResourceLocation, DataResourceLocationMetadata, DataSourceLocation, DataSourceLocationMetadata, DataSourceLocationValue, DataTypeLocation, DataTypeLocationMetadata, DataTypeLocationValue, DialogContext, DialogOptions, DialogParamValue, DialogParams, DialogResponseData, DialogResponseHandler, DialogResponseHandlers, DialogType, DynamicInput, DynamicInputs, EditConnectedDataMessage, EditConnectedDataResponse, EditConnectedDataResponseCancellationContext, GetDataResourceLocation, GetDataResourceMessage, IntegrationDefinitionClient, IntegrationDefinitionDeleteParameters, IntegrationDefinitionGetParameters, IntegrationDefinitionGetResponse, IntegrationDefinitionPutParameters, IntegrationDefinitionPutResponse, IntegrationInstallationClient, IntegrationInstallationDeleteParameters, IntegrationInstallationGetParameters, IntegrationInstallationGetResponse, IntegrationInstallationPutParameters, LocationDialogResponse, MeshContextData, MeshLocation, MeshLocationCore, MeshLocationTypes, MeshSDKEventInterface, OpenConfirmationDialogOptions, OpenConfirmationDialogResult, OpenDialogMessage, OpenDialogResult, OpenLocationDialogOptions, ParamTypeConfigLocation, ParamTypeConfigLocationMetadata, ParamTypeLocation, ParamTypeLocationMetadata, SdkWindow, SetLocationFunction, SetValueMessage, SetValueOptions, SettingsLocation, SettingsLocationMetadata, UniformMeshSDK, UniformMeshSDKEvents, ValidationResult, initializeUniformMeshSDK };
1344
+ export { type AIGenerateLocation, type AIGenerateLocationMetadata, type AIPromptMetadataLocation, type AssetLibraryLocation, type AssetLibraryLocationMetadata, type AssetParameterLocation, type AssetParameterLocationMetadata, type BindableTypes, type CSSHeight, type CloseDialogMessage, type CloseLocationDialogOptions, 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 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 MeshSDKEventInterface, type OpenConfirmationDialogOptions, type OpenConfirmationDialogResult, type OpenDialogMessage, type OpenDialogResult, type OpenLocationDialogOptions, type ParamTypeConfigLocation, type ParamTypeConfigLocationMetadata, type ParamTypeLocation, type ParamTypeLocationMetadata, type PromptSettingsLocationMetadata, type SdkWindow, type SetLocationFunction, type SetValueMessage, type SetValueOptions, type SettingsLocation, type SettingsLocationMetadata, type UniformMeshSDK, type UniformMeshSDKEvents, type ValidationResult, initializeUniformMeshSDK };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/mesh-sdk",
3
- "version": "19.69.0",
3
+ "version": "19.71.1-alpha.103+2e172bb17",
4
4
  "description": "Uniform Mesh Framework SDK",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -33,14 +33,14 @@
33
33
  "access": "public"
34
34
  },
35
35
  "dependencies": {
36
- "@uniformdev/canvas": "19.69.0",
37
- "@uniformdev/context": "19.69.0",
38
- "@uniformdev/project-map": "19.69.0",
36
+ "@uniformdev/canvas": "19.71.1-alpha.103+2e172bb17",
37
+ "@uniformdev/context": "19.71.1-alpha.103+2e172bb17",
38
+ "@uniformdev/project-map": "19.71.1-alpha.103+2e172bb17",
39
39
  "imagesloaded": "^5.0.0",
40
40
  "mitt": "^3.0.0"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/imagesloaded": "^4.1.2"
44
44
  },
45
- "gitHead": "327658d8c6e5735499845ebb29d74906f2a43dad"
45
+ "gitHead": "2e172bb17f644b34be818605979a1436b8621c90"
46
46
  }