@skedulo/mex-types 1.3.2 → 1.3.3

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.
@@ -35,8 +35,34 @@ export declare enum DefStatus {
35
35
  */
36
36
  Failed = "Failed"
37
37
  }
38
+ type MexBaseMetadata = {
39
+ summary?: string;
40
+ email?: string;
41
+ displayOrder: number;
42
+ hasAttachments?: string[];
43
+ staticResourcesId?: string;
44
+ [key: string]: any;
45
+ };
46
+ interface MexMetadataForJob extends MexBaseMetadata {
47
+ contextObject: 'Jobs';
48
+ showIf?: string;
49
+ mandatoryIf?: string;
50
+ mandatoryExpression?: string;
51
+ }
52
+ interface MexMetadataForResource extends MexBaseMetadata {
53
+ contextObject: 'Resources';
54
+ }
55
+ export interface MexMetadataFormBuilder extends MexBaseMetadata {
56
+ /**
57
+ * @options [{label: 'Jobs', value: 'Jobs'}, {label: 'Resources', value: 'Resources'}]
58
+ * @dataType singleselect
59
+ */
60
+ contextObject: 'Jobs' | 'Resources';
61
+ }
62
+ export type MexMetadataPayload = MexMetadataForJob | MexMetadataForResource;
38
63
  /**
39
- * @area formDefs
64
+ * @area MexDef
65
+ * @outputType object
40
66
  */
41
67
  export interface MexDef {
42
68
  /**
@@ -67,7 +93,7 @@ export interface MexDef {
67
93
  /**
68
94
  * Form definition metadata in JSON format
69
95
  */
70
- metadata: any;
96
+ metadata: MexMetadataFormBuilder;
71
97
  /**
72
98
  * Form definition information
73
99
  */
@@ -79,18 +105,32 @@ export interface MexDef {
79
105
  internalMetadata?: InternalFormDef;
80
106
  /**
81
107
  * Form definition status
108
+ * @options [
109
+ * {label: 'Pending', value: 'Pending'},
110
+ * {label: 'Validated', value: 'Validated'},
111
+ * {label: 'Installed', value: 'Installed'},
112
+ * {label: 'Deactivated', value: 'Deactivated'},
113
+ * {label: 'BuildInProgress', value: 'BuildInProgress'},
114
+ * {label: 'InstallInProgress', value: 'InstallInProgress'},
115
+ * {label: 'Failed', value: 'Failed'}
116
+ * ]
117
+ *
118
+ * @dataType singleselect
82
119
  */
83
120
  status: DefStatus;
84
121
  /**
85
122
  * Form uploaded timestamp
123
+ * @dataType datetime
86
124
  */
87
125
  uploadedAt: Date;
88
126
  /**
89
127
  * Form installed timestamp
128
+ * @dataType datetime
90
129
  */
91
130
  installedAt?: Date;
92
131
  /**
93
132
  * Form built timestamp
133
+ * @dataType datetime
94
134
  */
95
135
  builtAt?: Date;
96
136
  /**
@@ -125,9 +165,6 @@ export type MexInstanceSavePayload = {
125
165
  type: FetchRequestType.CUSTOM;
126
166
  variables?: Variables;
127
167
  };
128
- export interface MexMetadataPayload {
129
- [key: string]: unknown;
130
- }
131
168
  export type CustomFunctionFeatures = {
132
169
  fetchFunction?: boolean;
133
170
  saveFunction?: boolean;
@@ -196,3 +233,4 @@ export type MexSearchPayload = {
196
233
  filter?: string;
197
234
  };
198
235
  };
236
+ export {};
@@ -1 +1 @@
1
- {"version":3,"file":"MexDefs.js","sourceRoot":"","sources":["../../src/common/MexDefs.ts"],"names":[],"mappings":";AAAA,iDAAiD;;;AAIjD;;;;;GAKG;AACH,IAAY,SA6BX;AA7BD,WAAY,SAAS;IACnB;;OAEG;IACH,gCAAmB,CAAA;IACnB;;OAEG;IACH,oCAAuB,CAAA;IACvB;;OAEG;IACH,oCAAuB,CAAA;IACvB;;OAEG;IACH,wCAA2B,CAAA;IAC3B;;OAEG;IACH,gDAAmC,CAAA;IACnC;;OAEG;IACH,oDAAuC,CAAA;IACvC;;OAEG;IACH,8BAAiB,CAAA;AACnB,CAAC,EA7BW,SAAS,yBAAT,SAAS,QA6BpB;AAuFD,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,uCAAmB,CAAA;IACnB,qCAAiB,CAAA;AACnB,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B"}
1
+ {"version":3,"file":"MexDefs.js","sourceRoot":"","sources":["../../src/common/MexDefs.ts"],"names":[],"mappings":";AAAA,iDAAiD;;;AAIjD;;;;;GAKG;AACH,IAAY,SA6BX;AA7BD,WAAY,SAAS;IACnB;;OAEG;IACH,gCAAmB,CAAA;IACnB;;OAEG;IACH,oCAAuB,CAAA;IACvB;;OAEG;IACH,oCAAuB,CAAA;IACvB;;OAEG;IACH,wCAA2B,CAAA;IAC3B;;OAEG;IACH,gDAAmC,CAAA;IACnC;;OAEG;IACH,oDAAuC,CAAA;IACvC;;OAEG;IACH,8BAAiB,CAAA;AACnB,CAAC,EA7BW,SAAS,yBAAT,SAAS,QA6BpB;AAwID,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,uCAAmB,CAAA;IACnB,qCAAiB,CAAA;AACnB,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B"}
@@ -33,7 +33,7 @@ export type AddNewButtonData = {
33
33
  showIfExpression: DataExpressionType;
34
34
  };
35
35
  /**
36
- * @area pageComponent
36
+ * @area Pages
37
37
  */
38
38
  export interface ListPageComponentModel extends BasePageComponentModel {
39
39
  headerTitle?: LocalizedKey;
@@ -75,7 +75,7 @@ export interface OrderByModel {
75
75
  }
76
76
  export type OrderByExpressionType = string[];
77
77
  /**
78
- * @area pageComponent
78
+ * @area Pages
79
79
  */
80
80
  export interface FlatPageComponentModel extends BasePageComponentModel {
81
81
  delete: {
@@ -9,7 +9,13 @@ export type KeyboardType = 'default' | 'email-address' | 'numeric' | 'phone-pad'
9
9
  export interface CommonEditorViewComponentModel extends BaseFlatPageViewComponentModel {
10
10
  title: LocalizedKey;
11
11
  validator?: ValidatorDefinitionModel;
12
+ /**
13
+ * @typeAdhoc DataExpressionType
14
+ */
12
15
  mandatory?: boolean | DataExpressionType;
16
+ /**
17
+ * @typeAdhoc DataExpressionType
18
+ */
13
19
  readonly?: boolean | DataExpressionType;
14
20
  editorEvents?: CommonEditorEvents;
15
21
  }
@@ -20,7 +26,7 @@ export interface CommonEditorWithPlaceholder {
20
26
  placeholder: LocalizedKey;
21
27
  }
22
28
  /**
23
- * @area viewComponent
29
+ * @area Components
24
30
  */
25
31
  export interface TextEditorViewComponentModel extends CommonEditorViewComponentModel, CommonEditorWithPlaceholder {
26
32
  keyboardType?: KeyboardType;
@@ -29,20 +35,20 @@ export interface TextEditorViewComponentModel extends CommonEditorViewComponentM
29
35
  multiline?: boolean;
30
36
  }
31
37
  /**
32
- * @area viewComponent
38
+ * @area Components
33
39
  */
34
40
  export interface ReadonlyTextViewComponentModel extends CommonEditorViewComponentModel, CommonEditorWithPlaceholder {
35
41
  text: LocalizedKey;
36
42
  }
37
43
  export type SkedButtonTheme = 'success' | 'primary' | 'default';
38
44
  /**
39
- * @area viewComponent
45
+ * @area Components
40
46
  */
41
47
  export interface ButtonGroupViewComponentModel extends BaseFlatPageViewComponentModel, CommonEditorWithPlaceholder {
42
48
  items: ButtonGroupItemComponentModel[];
43
49
  }
44
50
  /**
45
- * @area viewComponent
51
+ * @area Components
46
52
  */
47
53
  export interface SubListEditorViewComponentModel extends CommonEditorViewComponentModel {
48
54
  addNew: {
@@ -56,7 +62,7 @@ export interface SubListEditorViewComponentModel extends CommonEditorViewCompone
56
62
  itemClickDestination: RoutingType;
57
63
  }
58
64
  /**
59
- * @area viewComponent
65
+ * @area Components
60
66
  */
61
67
  export interface AttachmentsEditorViewComponentModel extends CommonEditorViewComponentModel {
62
68
  sourceExpression: DataExpressionType;
@@ -64,14 +70,14 @@ export interface AttachmentsEditorViewComponentModel extends CommonEditorViewCom
64
70
  attachmentCategoryName: string;
65
71
  }
66
72
  /**
67
- * @area viewComponent
73
+ * @area Components
68
74
  */
69
75
  export interface BodyMapViewComponentModel extends CommonEditorViewComponentModel {
70
76
  sourceExpression: DataExpressionType;
71
77
  attachmentCategoryName: string;
72
78
  }
73
79
  /**
74
- * @area viewComponent
80
+ * @area Components
75
81
  */
76
82
  export interface SignatureEditorViewComponentModel extends CommonEditorViewComponentModel {
77
83
  sourceExpression: DataExpressionType;
@@ -80,7 +86,7 @@ export interface SignatureEditorViewComponentModel extends CommonEditorViewCompo
80
86
  enableFullName: true;
81
87
  }
82
88
  /**
83
- * @area viewComponent
89
+ * @area Components
84
90
  */
85
91
  export interface ToggleEditorViewComponentModel extends CommonEditorViewComponentModel {
86
92
  title: LocalizedKey;
@@ -95,7 +101,7 @@ export interface ToggleEditorItemModel {
95
101
  text: LocalizedKey;
96
102
  }
97
103
  /**
98
- * @area viewComponent
104
+ * @area Components
99
105
  */
100
106
  export interface DateTimePickerViewComponentModel extends CommonEditorViewComponentModel, CommonEditorWithPlaceholder {
101
107
  mode: 'datetime' | 'date' | 'time';
@@ -107,7 +113,7 @@ export interface DateTimePickerViewComponentModel extends CommonEditorViewCompon
107
113
  export interface BaseSublistViewComponentModel extends BaseComponentModel {
108
114
  }
109
115
  /**
110
- * @area viewComponent
116
+ * @area Components
111
117
  */
112
118
  export interface SectionViewComponentModel extends BaseFlatPageViewComponentModel {
113
119
  title: LocalizedKey;
@@ -116,7 +122,7 @@ export interface SectionViewComponentModel extends BaseFlatPageViewComponentMode
116
122
  items: BaseFlatPageViewComponentModel[];
117
123
  }
118
124
  /**
119
- * @area viewComponent
125
+ * @area Components
120
126
  */
121
127
  export interface MenuListViewComponentModel extends BaseFlatPageViewComponentModel {
122
128
  items: MenuListItem[];
@@ -142,7 +148,7 @@ export interface BaseSelectEditor {
142
148
  };
143
149
  }
144
150
  /**
145
- * @area viewComponent
151
+ * @area Components
146
152
  */
147
153
  export interface SelectEditorViewComponentModel extends CommonEditorViewComponentModel, CommonEditorWithPlaceholder, BaseSelectEditor {
148
154
  caption: LocalizedKey;
@@ -151,7 +157,7 @@ export interface SelectEditorViewComponentModel extends CommonEditorViewComponen
151
157
  constructResultObject?: ConstructResultObject;
152
158
  }
153
159
  /**
154
- * @area viewComponent
160
+ * @area Components
155
161
  */
156
162
  export interface MultiSelectEditorViewComponentModel extends CommonEditorViewComponentModel, CommonEditorWithPlaceholder, BaseSelectEditor {
157
163
  displayDataInSearchPageExpression: DataExpressionType;
@@ -164,7 +170,7 @@ export interface ConstructResultObject {
164
170
  compareProperty: string;
165
171
  }
166
172
  /**
167
- * @area viewComponent
173
+ * @area Components
168
174
  */
169
175
  export interface ContactDetailsLayoutComponentModel extends BaseFlatPageViewComponentModel {
170
176
  title: LocalizedKey;
@@ -12,9 +12,6 @@ export interface ListItemTagItemModel {
12
12
  themeValueExpression: ValueExpressionType;
13
13
  text: LocalizedKey;
14
14
  }
15
- /**
16
- * @area pageComponent
17
- */
18
15
  export interface TitleAndCaptionViewComponentModel extends BaseListPageViewComponentModel {
19
16
  title: LocalizedKey;
20
17
  caption: LocalizedKey;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skedulo/mex-types",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "engines": {
5
5
  "node": "18"
6
6
  },