@skedulo/mex-types 1.55.0 → 1.57.1

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.
@@ -1,4 +1,5 @@
1
1
  import { FlatPageViewComponentTypes, SelectPageOnlineSource, SkedButtonTheme } from '../view';
2
+ import { ValidatorDefinitionModel } from '../validator';
2
3
  export type DollarExpressionType = string;
3
4
  export type DataExpressionType = string;
4
5
  export type ValueExpressionType = string | ValueExpressionLogic[];
@@ -108,14 +109,14 @@ export interface ButtonGroupItemComponentModel {
108
109
  showIfExpression?: DataExpressionType;
109
110
  }
110
111
  export interface ButtonBehaviorComponentModel {
111
- type: 'custom' | 'sms' | 'phone' | 'openUrl' | 'email' | 'openSelector' | 'routing';
112
+ type: 'custom' | 'sms' | 'phone' | 'openUrl' | 'email' | 'openSelector' | 'routing' | 'custom-ai';
112
113
  }
113
114
  export type ListPageExtraActionBehavior = PhoneButtonBehaviorComponentModel | SMSButtonBehaviorComponentModel | OpenURLButtonBehaviorComponentModel | EmailButtonBehaviorComponentModel;
114
115
  export type ListPageExtraActionType = {
115
116
  title: LocalizedKey;
116
117
  behavior: ListPageExtraActionBehavior;
117
118
  };
118
- export type ButtonBehaviorComponentModelTypes = CustomFunctionButtonBehaviorComponentModel | PhoneButtonBehaviorComponentModel | SMSButtonBehaviorComponentModel | OpenURLButtonBehaviorComponentModel | EmailButtonBehaviorComponentModel | RoutingBehaviorComponentModel;
119
+ export type ButtonBehaviorComponentModelTypes = CustomFunctionButtonBehaviorComponentModel | PhoneButtonBehaviorComponentModel | SMSButtonBehaviorComponentModel | OpenURLButtonBehaviorComponentModel | EmailButtonBehaviorComponentModel | RoutingBehaviorComponentModel | CustomAIBehaviorComponentModel;
119
120
  export interface CustomFunctionButtonBehaviorComponentModel extends ButtonBehaviorComponentModel {
120
121
  functionExpression: DataExpressionType;
121
122
  /**
@@ -148,6 +149,21 @@ export interface RoutingBehaviorComponentModel extends ButtonBehaviorComponentMo
148
149
  destination: RoutingType;
149
150
  type: 'routing';
150
151
  }
152
+ /**
153
+ * Button behavior that triggers an AI-powered action, required full online mode
154
+ * @version: 1.55.0
155
+ */
156
+ export interface CustomAIBehaviorComponentModel extends ButtonBehaviorComponentModel {
157
+ type: 'custom-ai';
158
+ processingPage?: {
159
+ title?: LocalizedKey;
160
+ };
161
+ entryValidator?: ValidatorDefinitionModel;
162
+ /** Online query config to call AI service */
163
+ query: CustomOnlineDataQuery;
164
+ /** Function expression invoked with the AI query result */
165
+ onAIResultFunctionExpression: FunctionExpressionType;
166
+ }
151
167
  export interface GroupByFeatureModel {
152
168
  /**
153
169
  * @label Group by
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skedulo/mex-types",
3
- "version": "1.55.0",
3
+ "version": "1.57.1",
4
4
  "description": "A central repository store for all the interfaces, type definitions of MEX engine",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",