@uniformdev/mesh-sdk 17.1.1-alpha.498 → 17.1.1-alpha.752
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.ts +20 -13
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Emitter } from 'mitt';
|
|
2
|
-
import { RootComponentInstance, ComponentInstance, ComponentDefinition, ComponentDefinitionParameter,
|
|
2
|
+
import { RootComponentInstance, ComponentInstance, ComponentDefinition, ComponentDefinitionParameter, DataSource, DataSourceInfo, DataType, DataResourceVariables } from '@uniformdev/canvas';
|
|
3
3
|
|
|
4
4
|
/** Core shared generic for a mesh location context */
|
|
5
5
|
interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TValue, TType extends MeshLocationTypes = MeshLocationTypes> {
|
|
@@ -26,6 +26,7 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
|
|
|
26
26
|
metadata: TMetadata;
|
|
27
27
|
/**
|
|
28
28
|
* Instructs Uniform to set the validity of the location in the parent app.
|
|
29
|
+
* @deprecated - use setValue(value, validationResult) instead
|
|
29
30
|
*/
|
|
30
31
|
setValidationResult: (value: ValidationResult) => Promise<void>;
|
|
31
32
|
/**
|
|
@@ -37,14 +38,18 @@ interface MeshLocationCore<TValue = unknown, TMetadata = unknown, TSetValue = TV
|
|
|
37
38
|
* This is undefined when the current location is not a dialog.
|
|
38
39
|
*/
|
|
39
40
|
dialogContext?: DialogContext & {
|
|
41
|
+
/** Parameters passed to the dialog when it was opened */
|
|
40
42
|
params: unknown;
|
|
43
|
+
/**
|
|
44
|
+
* Returns a result to the dialog opener.
|
|
45
|
+
*/
|
|
41
46
|
returnDialogValue: (value: unknown) => Promise<void>;
|
|
42
47
|
};
|
|
43
48
|
}
|
|
44
49
|
/**
|
|
45
50
|
* Known location types that can be passed to a mesh location
|
|
46
51
|
*/
|
|
47
|
-
declare type MeshLocationTypes = 'paramType' | 'paramTypeConfig' | 'settings' | '
|
|
52
|
+
declare type MeshLocationTypes = 'paramType' | 'paramTypeConfig' | 'settings' | 'dataSource' | 'dataType' | 'dataTypeInstance';
|
|
48
53
|
declare type SetValueOptions = ValidationResult;
|
|
49
54
|
|
|
50
55
|
declare type ParamTypeLocationMetadata<TParamConfiguration = unknown, TIntegrationConfiguration = unknown> = {
|
|
@@ -66,12 +71,12 @@ declare type ParamTypeConfigLocation<TParamValue = unknown, TIntegrationConfigur
|
|
|
66
71
|
|
|
67
72
|
declare type SettingsLocation<TSettingsType> = MeshLocationCore<TSettingsType, undefined, TSettingsType, 'settings'>;
|
|
68
73
|
|
|
69
|
-
declare type
|
|
70
|
-
declare type
|
|
74
|
+
declare type DataSourceLocationValue = Pick<DataSource, 'baseUrl' | 'custom' | 'headers' | 'parameters' | 'variables'>;
|
|
75
|
+
declare type DataSourceLocationMetadata<TIntegrationConfiguration = unknown> = {
|
|
71
76
|
settings: TIntegrationConfiguration;
|
|
72
77
|
projectId: string;
|
|
73
78
|
};
|
|
74
|
-
declare type
|
|
79
|
+
declare type DataSourceLocation = MeshLocationCore<DataSourceLocationValue, DataSourceLocationMetadata, DataSourceLocationValue, 'dataSource'>;
|
|
75
80
|
|
|
76
81
|
declare type DataTypeValue = Pick<DataType, 'body' | 'method' | 'path' | 'custom' | 'headers' | 'parameters' | 'variables'>;
|
|
77
82
|
declare type DataConnectorInfo = {
|
|
@@ -82,7 +87,7 @@ declare type DataConnectorInfo = {
|
|
|
82
87
|
declare type DataTypeLocationMetadata<TIntegrationConfiguration = unknown> = {
|
|
83
88
|
settings: TIntegrationConfiguration;
|
|
84
89
|
projectId: string;
|
|
85
|
-
|
|
90
|
+
dataSource: DataSourceInfo;
|
|
86
91
|
dataConnector: DataConnectorInfo;
|
|
87
92
|
};
|
|
88
93
|
declare type DataTypeLocation = MeshLocationCore<DataTypeValue, DataTypeLocationMetadata, DataTypeValue, 'dataType'>;
|
|
@@ -93,13 +98,13 @@ declare type DataTypeInstanceLocationMetadata<TIntegrationConfiguration = unknow
|
|
|
93
98
|
dataConnector: DataConnectorInfo;
|
|
94
99
|
projectId: string;
|
|
95
100
|
};
|
|
96
|
-
declare type DataTypeInstanceLocation = MeshLocationCore<
|
|
101
|
+
declare type DataTypeInstanceLocation = MeshLocationCore<DataResourceVariables, DataTypeInstanceLocationMetadata, DataResourceVariables, 'dataTypeInstance'>;
|
|
97
102
|
|
|
98
103
|
/**
|
|
99
104
|
* Defines methods used for interacting with a Mesh location
|
|
100
105
|
* To receive useful typings, check the `type` property of the location to narrow the typing.
|
|
101
106
|
*/
|
|
102
|
-
declare type MeshLocation<TValue = unknown, TSetValue = TValue> = ParamTypeLocation<TValue, unknown, TSetValue> | ParamTypeConfigLocation<TValue> | SettingsLocation<TValue> |
|
|
107
|
+
declare type MeshLocation<TValue = unknown, TSetValue = TValue> = ParamTypeLocation<TValue, unknown, TSetValue> | ParamTypeConfigLocation<TValue> | SettingsLocation<TValue> | DataSourceLocation | DataTypeLocation | DataTypeInstanceLocation;
|
|
103
108
|
interface MeshContextData {
|
|
104
109
|
locationKey: string;
|
|
105
110
|
locationType: MeshLocationTypes;
|
|
@@ -176,10 +181,12 @@ declare type DialogParams = {
|
|
|
176
181
|
[paramName: string]: DialogParamValue;
|
|
177
182
|
};
|
|
178
183
|
declare type CSSHeight = '-moz-initial' | 'inherit' | 'initial' | 'revert' | 'unset' | '-moz-max-content' | '-moz-min-content' | '-webkit-fit-content' | 'auto' | 'fit-content' | 'max-content' | 'min-content' | `${number}${'px' | 'em' | 'rem' | 'vh'}`;
|
|
179
|
-
|
|
180
|
-
isValid
|
|
181
|
-
validationMessage
|
|
182
|
-
}
|
|
184
|
+
declare type ValidationResult = {
|
|
185
|
+
isValid: false;
|
|
186
|
+
validationMessage: string;
|
|
187
|
+
} | {
|
|
188
|
+
isValid: true;
|
|
189
|
+
};
|
|
183
190
|
|
|
184
191
|
interface SdkWindow {
|
|
185
192
|
/** The current window object. */
|
|
@@ -276,4 +283,4 @@ declare function initializeUniformMeshSDK({ autoResizingDisabled, }?: {
|
|
|
276
283
|
autoResizingDisabled?: boolean;
|
|
277
284
|
}): Promise<UniformMeshSDK | undefined>;
|
|
278
285
|
|
|
279
|
-
export { CSSHeight, CloseLocationDialogOptions,
|
|
286
|
+
export { CSSHeight, CloseLocationDialogOptions, DataConnectorInfo, DataSourceLocation, DataSourceLocationMetadata, DataSourceLocationValue, DataTypeInstanceLocation, DataTypeInstanceLocationMetadata, DataTypeLocation, DataTypeLocationMetadata, DialogContext, DialogOptions, DialogParamValue, DialogParams, DialogResponseData, DialogResponseHandler, DialogResponseHandlers, DialogType, LocationDialogResponse, MeshContextData, MeshLocation, MeshLocationCore, MeshLocationTypes, OpenConfirmationDialogOptions, OpenConfirmationDialogResult, OpenDialogResult, OpenLocationDialogOptions, ParamTypeConfigLocation, ParamTypeConfigLocationMetadata, ParamTypeLocation, ParamTypeLocationMetadata, SdkWindow, SetValueOptions, SettingsLocation, UniformMeshSDK, UniformMeshSDKEvents, ValidationResult, initializeUniformMeshSDK };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/mesh-sdk",
|
|
3
|
-
"version": "17.1.1-alpha.
|
|
3
|
+
"version": "17.1.1-alpha.752+3e63e24bd",
|
|
4
4
|
"description": "Uniform Mesh Framework SDK",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@uniformdev/canvas": "^17.1.1-alpha.
|
|
32
|
+
"@uniformdev/canvas": "^17.1.1-alpha.752+3e63e24bd",
|
|
33
33
|
"mitt": "^3.0.0"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "3e63e24bdfe658b80cc14a2dbc84748694637c52"
|
|
36
36
|
}
|