@evoke-platform/context 1.3.0-testing.6 → 1.3.0-testing.8
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/objects/objects.d.ts +152 -150
- package/package.json +1 -1
|
@@ -29,20 +29,20 @@ type ViewLayoutEntity = {
|
|
|
29
29
|
export type TableViewLayoutEntity = ViewLayoutEntity & TableViewLayout;
|
|
30
30
|
export type DropdownViewLayoutEntity = ViewLayoutEntity & DropdownViewLayout;
|
|
31
31
|
export type ViewLayout = {
|
|
32
|
-
table?: TableViewLayout
|
|
33
|
-
dropdown?: DropdownViewLayout
|
|
32
|
+
table?: TableViewLayout;
|
|
33
|
+
dropdown?: DropdownViewLayout;
|
|
34
34
|
};
|
|
35
35
|
export type DropdownViewLayoutSort = {
|
|
36
36
|
propertyId: string;
|
|
37
|
-
direction?: 'asc' | 'desc'
|
|
37
|
+
direction?: 'asc' | 'desc';
|
|
38
38
|
};
|
|
39
39
|
export type DropdownViewLayout = {
|
|
40
40
|
secondaryTextExpression: string;
|
|
41
|
-
sort?: DropdownViewLayoutSort
|
|
41
|
+
sort?: DropdownViewLayoutSort;
|
|
42
42
|
};
|
|
43
43
|
export type TableViewLayout = {
|
|
44
44
|
properties: PropertyReference[];
|
|
45
|
-
sort?: Sort
|
|
45
|
+
sort?: Sort;
|
|
46
46
|
};
|
|
47
47
|
export type PropertyReference = {
|
|
48
48
|
id: string;
|
|
@@ -50,94 +50,96 @@ export type PropertyReference = {
|
|
|
50
50
|
};
|
|
51
51
|
export type Sort = {
|
|
52
52
|
colId: string;
|
|
53
|
-
sort?: 'asc' | 'desc'
|
|
53
|
+
sort?: 'asc' | 'desc';
|
|
54
54
|
};
|
|
55
55
|
export type Obj = {
|
|
56
56
|
id: string;
|
|
57
57
|
name: string;
|
|
58
|
-
typeDiscriminatorProperty?: string
|
|
59
|
-
viewLayout?: ViewLayout
|
|
60
|
-
baseObject?: BaseObjReference
|
|
61
|
-
properties?: Property[]
|
|
62
|
-
actions?: Action[]
|
|
63
|
-
formId?: string
|
|
58
|
+
typeDiscriminatorProperty?: string;
|
|
59
|
+
viewLayout?: ViewLayout;
|
|
60
|
+
baseObject?: BaseObjReference;
|
|
61
|
+
properties?: Property[];
|
|
62
|
+
actions?: Action[];
|
|
63
|
+
formId?: string;
|
|
64
64
|
};
|
|
65
65
|
export type ObjWithRoot = Obj & {
|
|
66
66
|
rootObjectId: string;
|
|
67
67
|
};
|
|
68
68
|
export type PropertyType = 'address' | 'array' | 'boolean' | 'collection' | 'criteria' | 'date' | 'date-time' | 'document' | 'image' | 'integer' | 'number' | 'object' | 'richText' | 'string' | 'time' | 'user';
|
|
69
69
|
export type NumericValidation = {
|
|
70
|
-
errorMessage?: string
|
|
71
|
-
minimum?: number
|
|
72
|
-
maximum?: number
|
|
70
|
+
errorMessage?: string;
|
|
71
|
+
minimum?: number;
|
|
72
|
+
maximum?: number;
|
|
73
73
|
};
|
|
74
74
|
export type DateValidation = {
|
|
75
|
-
errorMessage?: string
|
|
76
|
-
to?: string
|
|
77
|
-
from?: string
|
|
75
|
+
errorMessage?: string;
|
|
76
|
+
to?: string;
|
|
77
|
+
from?: string;
|
|
78
78
|
};
|
|
79
79
|
export type CriteriaValidation = {
|
|
80
|
-
criteria?: Record<string, unknown
|
|
80
|
+
criteria?: Record<string, unknown>;
|
|
81
81
|
};
|
|
82
82
|
export type StringValidation = {
|
|
83
83
|
operator: 'any' | 'all';
|
|
84
|
-
rules?: RegexValidation[]
|
|
84
|
+
rules?: RegexValidation[];
|
|
85
85
|
};
|
|
86
86
|
export type DocumentValidation = {
|
|
87
|
-
errorMessage?: string
|
|
88
|
-
maxDocuments?: number
|
|
89
|
-
minDocuments?: number
|
|
87
|
+
errorMessage?: string;
|
|
88
|
+
maxDocuments?: number;
|
|
89
|
+
minDocuments?: number;
|
|
90
|
+
allowedFileExtensions?: string[];
|
|
91
|
+
maxSizeInKB?: number;
|
|
90
92
|
};
|
|
91
93
|
export type PropertyValidation = StringValidation | NumericValidation | DateValidation | CriteriaValidation | DocumentValidation;
|
|
92
94
|
export type Property = {
|
|
93
95
|
id: string;
|
|
94
96
|
name: string;
|
|
95
97
|
type: PropertyType;
|
|
96
|
-
enum?: string[]
|
|
97
|
-
strictlyTrue?: boolean
|
|
98
|
-
nonStrictEnum?: boolean
|
|
99
|
-
objectId?: string
|
|
100
|
-
relatedPropertyId?: string
|
|
101
|
-
required?: boolean
|
|
102
|
-
searchable?: boolean
|
|
103
|
-
formula?: string
|
|
104
|
-
formulaType?: 'aggregate' | 'custom' | 'arithmetic'
|
|
105
|
-
mask?: string
|
|
106
|
-
validation?: PropertyValidation
|
|
107
|
-
manyToManyPropertyId?: string
|
|
108
|
-
textTransform?: 'titleCase' | 'upperCase' | 'lowerCase' | 'sentenceCase'
|
|
98
|
+
enum?: string[];
|
|
99
|
+
strictlyTrue?: boolean;
|
|
100
|
+
nonStrictEnum?: boolean;
|
|
101
|
+
objectId?: string;
|
|
102
|
+
relatedPropertyId?: string;
|
|
103
|
+
required?: boolean;
|
|
104
|
+
searchable?: boolean;
|
|
105
|
+
formula?: string;
|
|
106
|
+
formulaType?: 'aggregate' | 'custom' | 'arithmetic';
|
|
107
|
+
mask?: string;
|
|
108
|
+
validation?: PropertyValidation;
|
|
109
|
+
manyToManyPropertyId?: string;
|
|
110
|
+
textTransform?: 'titleCase' | 'upperCase' | 'lowerCase' | 'sentenceCase';
|
|
109
111
|
};
|
|
110
112
|
export type ActionType = 'create' | 'update' | 'delete';
|
|
111
113
|
export type InputStringValidation = StringValidation & {
|
|
112
|
-
minLength?: number
|
|
113
|
-
maxLength?: number
|
|
114
|
-
mask?: string
|
|
114
|
+
minLength?: number;
|
|
115
|
+
maxLength?: number;
|
|
116
|
+
mask?: string;
|
|
115
117
|
};
|
|
116
118
|
export type BasicInputParameter = Omit<InputParameter, 'name' | 'required'>;
|
|
117
119
|
export type InputParameter = {
|
|
118
120
|
id: string;
|
|
119
|
-
name?: string
|
|
121
|
+
name?: string;
|
|
120
122
|
type: PropertyType;
|
|
121
|
-
required?: boolean
|
|
122
|
-
enum?: string[]
|
|
123
|
-
strictlyTrue?: boolean
|
|
124
|
-
nonStrictEnum?: boolean
|
|
125
|
-
validation?: PropertyValidation | InputStringValidation
|
|
126
|
-
objectId?: string
|
|
127
|
-
relatedPropertyId?: string
|
|
128
|
-
manyToManyPropertyId?: string
|
|
123
|
+
required?: boolean;
|
|
124
|
+
enum?: string[];
|
|
125
|
+
strictlyTrue?: boolean;
|
|
126
|
+
nonStrictEnum?: boolean;
|
|
127
|
+
validation?: PropertyValidation | InputStringValidation;
|
|
128
|
+
objectId?: string;
|
|
129
|
+
relatedPropertyId?: string;
|
|
130
|
+
manyToManyPropertyId?: string;
|
|
129
131
|
};
|
|
130
132
|
export type Action = {
|
|
131
133
|
id: string;
|
|
132
134
|
name: string;
|
|
133
135
|
type: ActionType;
|
|
134
136
|
outputEvent: string;
|
|
135
|
-
inputProperties?: ActionInput[]
|
|
136
|
-
parameters?: InputParameter[]
|
|
137
|
-
form?: Form
|
|
138
|
-
defaultFormId?: string
|
|
139
|
-
customCode?: string
|
|
140
|
-
preconditions?: object
|
|
137
|
+
inputProperties?: ActionInput[];
|
|
138
|
+
parameters?: InputParameter[];
|
|
139
|
+
form?: Form;
|
|
140
|
+
defaultFormId?: string;
|
|
141
|
+
customCode?: string;
|
|
142
|
+
preconditions?: object;
|
|
141
143
|
};
|
|
142
144
|
export type ObjectInstance = {
|
|
143
145
|
id: string;
|
|
@@ -147,7 +149,7 @@ export type ObjectInstance = {
|
|
|
147
149
|
};
|
|
148
150
|
export type RegexValidation = {
|
|
149
151
|
regex: string;
|
|
150
|
-
errorMessage?: string
|
|
152
|
+
errorMessage?: string;
|
|
151
153
|
};
|
|
152
154
|
export type SelectOption = {
|
|
153
155
|
label: string;
|
|
@@ -157,170 +159,170 @@ export type VisibilityCondition = {
|
|
|
157
159
|
property: string;
|
|
158
160
|
operator: 'eq' | 'ne';
|
|
159
161
|
value: string | number | boolean;
|
|
160
|
-
isInstanceProperty?: boolean
|
|
162
|
+
isInstanceProperty?: boolean;
|
|
161
163
|
};
|
|
162
164
|
export type VisibilityConfiguration = {
|
|
163
|
-
operator?: 'any' | 'all'
|
|
164
|
-
conditions?: VisibilityCondition[]
|
|
165
|
+
operator?: 'any' | 'all';
|
|
166
|
+
conditions?: VisibilityCondition[];
|
|
165
167
|
};
|
|
166
168
|
export type RelatedObjectDefaultValue = {
|
|
167
169
|
criteria: Record<string, unknown>;
|
|
168
|
-
sortBy?: string
|
|
169
|
-
orderBy?: 'asc' | 'desc' | 'ASC' | 'DESC'
|
|
170
|
+
sortBy?: string;
|
|
171
|
+
orderBy?: 'asc' | 'desc' | 'ASC' | 'DESC';
|
|
170
172
|
};
|
|
171
173
|
export type CriteriaDefaultValue = Record<string, unknown>;
|
|
172
174
|
export type JsonLogic = Record<string, unknown> | boolean | number | string | null;
|
|
173
175
|
export type DisplayConfiguration = {
|
|
174
|
-
label?: string
|
|
175
|
-
placeholder?: string
|
|
176
|
-
required?: boolean
|
|
177
|
-
description?: string
|
|
178
|
-
defaultValue?: string | boolean | number | string[] | RelatedObjectDefaultValue | CriteriaDefaultValue
|
|
179
|
-
readOnly?: boolean
|
|
180
|
-
tooltip?: string
|
|
181
|
-
prefix?: string
|
|
182
|
-
suffix?: string
|
|
183
|
-
placeholderChar?: string
|
|
184
|
-
rowCount?: number
|
|
185
|
-
charCount?: boolean
|
|
186
|
-
mode?: 'default' | 'existingOnly'
|
|
187
|
-
relatedObjectDisplay?: 'dropdown' | 'dialogBox'
|
|
188
|
-
visibility?: VisibilityConfiguration | JsonLogic
|
|
189
|
-
viewLayout?: ViewLayoutEntityReference
|
|
176
|
+
label?: string;
|
|
177
|
+
placeholder?: string;
|
|
178
|
+
required?: boolean;
|
|
179
|
+
description?: string;
|
|
180
|
+
defaultValue?: string | boolean | number | string[] | RelatedObjectDefaultValue | CriteriaDefaultValue;
|
|
181
|
+
readOnly?: boolean;
|
|
182
|
+
tooltip?: string;
|
|
183
|
+
prefix?: string;
|
|
184
|
+
suffix?: string;
|
|
185
|
+
placeholderChar?: string;
|
|
186
|
+
rowCount?: number;
|
|
187
|
+
charCount?: boolean;
|
|
188
|
+
mode?: 'default' | 'existingOnly';
|
|
189
|
+
relatedObjectDisplay?: 'dropdown' | 'dialogBox';
|
|
190
|
+
visibility?: VisibilityConfiguration | JsonLogic;
|
|
191
|
+
viewLayout?: ViewLayoutEntityReference;
|
|
190
192
|
choicesDisplay?: {
|
|
191
193
|
type: 'dropdown' | 'radioButton';
|
|
192
|
-
sortBy?: 'ASC' | 'DESC' | 'NONE'
|
|
193
|
-
}
|
|
194
|
-
booleanDisplay?: 'checkbox' | 'switch'
|
|
194
|
+
sortBy?: 'ASC' | 'DESC' | 'NONE';
|
|
195
|
+
};
|
|
196
|
+
booleanDisplay?: 'checkbox' | 'switch';
|
|
195
197
|
};
|
|
196
198
|
export type InputParameterReference = {
|
|
197
199
|
type: 'input';
|
|
198
200
|
parameterId: string;
|
|
199
|
-
display?: DisplayConfiguration
|
|
200
|
-
enumWithLabels?: SelectOption[]
|
|
201
|
-
documentMetadata?: Record<string, string
|
|
201
|
+
display?: DisplayConfiguration;
|
|
202
|
+
enumWithLabels?: SelectOption[];
|
|
203
|
+
documentMetadata?: Record<string, string>;
|
|
202
204
|
};
|
|
203
205
|
export type Content = {
|
|
204
206
|
type: 'content';
|
|
205
207
|
html: string;
|
|
206
|
-
visibility?: VisibilityConfiguration | JsonLogic
|
|
208
|
+
visibility?: VisibilityConfiguration | JsonLogic;
|
|
207
209
|
};
|
|
208
210
|
export type Column = {
|
|
209
211
|
width: number;
|
|
210
|
-
entries?: FormEntry[]
|
|
212
|
+
entries?: FormEntry[];
|
|
211
213
|
};
|
|
212
214
|
export type Columns = {
|
|
213
215
|
type: 'columns';
|
|
214
216
|
columns: Column[];
|
|
215
|
-
visibility?: VisibilityConfiguration | JsonLogic
|
|
217
|
+
visibility?: VisibilityConfiguration | JsonLogic;
|
|
216
218
|
};
|
|
217
219
|
export type Section = {
|
|
218
220
|
label: string;
|
|
219
|
-
entries?: FormEntry[]
|
|
221
|
+
entries?: FormEntry[];
|
|
220
222
|
};
|
|
221
223
|
export type Sections = {
|
|
222
224
|
type: 'sections';
|
|
223
|
-
label?: string
|
|
225
|
+
label?: string;
|
|
224
226
|
sections: Section[];
|
|
225
|
-
visibility?: VisibilityConfiguration | JsonLogic
|
|
227
|
+
visibility?: VisibilityConfiguration | JsonLogic;
|
|
226
228
|
};
|
|
227
229
|
export type ReadonlyField = {
|
|
228
230
|
type: 'readonlyField';
|
|
229
231
|
propertyId: string;
|
|
230
|
-
display?: DisplayConfiguration
|
|
232
|
+
display?: DisplayConfiguration;
|
|
231
233
|
};
|
|
232
234
|
export type InputField = {
|
|
233
235
|
type: 'inputField';
|
|
234
236
|
input: BasicInputParameter;
|
|
235
|
-
display?: DisplayConfiguration
|
|
236
|
-
documentMetadata?: Record<string, string
|
|
237
|
+
display?: DisplayConfiguration;
|
|
238
|
+
documentMetadata?: Record<string, string>;
|
|
237
239
|
};
|
|
238
240
|
export type FormEntry = InputField | InputParameterReference | ReadonlyField | Sections | Columns | Content;
|
|
239
241
|
export type Form = {
|
|
240
|
-
entries?: FormEntry[]
|
|
242
|
+
entries?: FormEntry[];
|
|
241
243
|
};
|
|
242
244
|
export type ActionInputType = 'button' | 'Boolean' | 'Columns' | 'Content' | 'Criteria' | 'Date' | 'DateTime' | 'Decimal' | 'Document' | 'Image' | 'Integer' | 'ManyToManyRepeatableField' | 'MultiSelect' | 'Object' | 'RepeatableField' | 'RichText' | 'Section' | 'Select' | 'TextField' | 'Time' | 'User';
|
|
243
245
|
/**
|
|
244
246
|
* Represents an object action inputProperty object.
|
|
245
247
|
*/
|
|
246
248
|
export type ActionInput = {
|
|
247
|
-
id?: string
|
|
248
|
-
label?: string
|
|
249
|
-
type?: ActionInputType
|
|
250
|
-
key?: string
|
|
251
|
-
initialValue?: boolean | string | string[] | number | RelatedObjectDefaultValue | SelectOption[] | SelectOption
|
|
252
|
-
defaultToCurrentDate?: boolean
|
|
253
|
-
defaultToCurrentTime?: boolean
|
|
254
|
-
defaultValueCriteria?: object
|
|
255
|
-
sortBy?: string
|
|
256
|
-
orderBy?: 'asc' | 'desc' | 'ASC' | 'DESC'
|
|
257
|
-
html?: string
|
|
258
|
-
labelPosition?: string
|
|
259
|
-
placeholder?: string
|
|
260
|
-
description?: string
|
|
261
|
-
tooltip?: string
|
|
262
|
-
prefix?: string
|
|
263
|
-
suffix?: string
|
|
249
|
+
id?: string;
|
|
250
|
+
label?: string;
|
|
251
|
+
type?: ActionInputType;
|
|
252
|
+
key?: string;
|
|
253
|
+
initialValue?: boolean | string | string[] | number | RelatedObjectDefaultValue | SelectOption[] | SelectOption;
|
|
254
|
+
defaultToCurrentDate?: boolean;
|
|
255
|
+
defaultToCurrentTime?: boolean;
|
|
256
|
+
defaultValueCriteria?: object;
|
|
257
|
+
sortBy?: string;
|
|
258
|
+
orderBy?: 'asc' | 'desc' | 'ASC' | 'DESC';
|
|
259
|
+
html?: string;
|
|
260
|
+
labelPosition?: string;
|
|
261
|
+
placeholder?: string;
|
|
262
|
+
description?: string;
|
|
263
|
+
tooltip?: string;
|
|
264
|
+
prefix?: string;
|
|
265
|
+
suffix?: string;
|
|
264
266
|
data?: {
|
|
265
267
|
/**
|
|
266
268
|
* An array of values required for select options.
|
|
267
269
|
*/
|
|
268
|
-
values?: SelectOption[]
|
|
269
|
-
}
|
|
270
|
-
inputMask?: string
|
|
271
|
-
inputMaskPlaceholderChar?: string
|
|
272
|
-
tableView?: boolean
|
|
273
|
-
mode?: 'default' | 'existingOnly'
|
|
274
|
-
displayOption?: 'dropdown' | 'dialogBox' | 'radioButton' | 'checkbox' | 'switch'
|
|
275
|
-
rows?: number
|
|
276
|
-
showCharCount?: boolean
|
|
277
|
-
readOnly?: boolean
|
|
278
|
-
isMultiLineText?: boolean
|
|
279
|
-
verticalLayout?: boolean
|
|
280
|
-
input?: boolean
|
|
281
|
-
widget?: string
|
|
270
|
+
values?: SelectOption[];
|
|
271
|
+
};
|
|
272
|
+
inputMask?: string;
|
|
273
|
+
inputMaskPlaceholderChar?: string;
|
|
274
|
+
tableView?: boolean;
|
|
275
|
+
mode?: 'default' | 'existingOnly';
|
|
276
|
+
displayOption?: 'dropdown' | 'dialogBox' | 'radioButton' | 'checkbox' | 'switch';
|
|
277
|
+
rows?: number;
|
|
278
|
+
showCharCount?: boolean;
|
|
279
|
+
readOnly?: boolean;
|
|
280
|
+
isMultiLineText?: boolean;
|
|
281
|
+
verticalLayout?: boolean;
|
|
282
|
+
input?: boolean;
|
|
283
|
+
widget?: string;
|
|
282
284
|
conditional?: {
|
|
283
|
-
json?: JsonLogic
|
|
284
|
-
show?: boolean
|
|
285
|
-
when?: string
|
|
286
|
-
eq?: string | number | boolean
|
|
287
|
-
}
|
|
288
|
-
property?: InputParameter
|
|
289
|
-
viewLayout?: ViewLayoutEntityReference
|
|
290
|
-
documentMetadata?: Record<string, string
|
|
285
|
+
json?: JsonLogic;
|
|
286
|
+
show?: boolean;
|
|
287
|
+
when?: string;
|
|
288
|
+
eq?: string | number | boolean;
|
|
289
|
+
};
|
|
290
|
+
property?: InputParameter;
|
|
291
|
+
viewLayout?: ViewLayoutEntityReference;
|
|
292
|
+
documentMetadata?: Record<string, string>;
|
|
291
293
|
validate?: {
|
|
292
|
-
required?: boolean
|
|
293
|
-
criteria?: object
|
|
294
|
-
operator?: 'any' | 'all'
|
|
295
|
-
regexes?: RegexValidation[]
|
|
296
|
-
minLength?: number
|
|
297
|
-
maxLength?: number
|
|
298
|
-
minDate?: string
|
|
299
|
-
maxDate?: string
|
|
300
|
-
minTime?: string
|
|
301
|
-
maxTime?: string
|
|
302
|
-
min?: number
|
|
303
|
-
max?: number
|
|
304
|
-
minDocuments?: number
|
|
305
|
-
maxDocuments?: number
|
|
306
|
-
customMessage?: string
|
|
294
|
+
required?: boolean;
|
|
295
|
+
criteria?: object;
|
|
296
|
+
operator?: 'any' | 'all';
|
|
297
|
+
regexes?: RegexValidation[];
|
|
298
|
+
minLength?: number;
|
|
299
|
+
maxLength?: number;
|
|
300
|
+
minDate?: string;
|
|
301
|
+
maxDate?: string;
|
|
302
|
+
minTime?: string;
|
|
303
|
+
maxTime?: string;
|
|
304
|
+
min?: number;
|
|
305
|
+
max?: number;
|
|
306
|
+
minDocuments?: number;
|
|
307
|
+
maxDocuments?: number;
|
|
308
|
+
customMessage?: string;
|
|
307
309
|
};
|
|
308
310
|
/**
|
|
309
311
|
* An array of sub-components to be rendered inside sections.
|
|
310
312
|
*/
|
|
311
313
|
components?: {
|
|
312
314
|
key: string;
|
|
313
|
-
label?: string
|
|
315
|
+
label?: string;
|
|
314
316
|
components: ActionInput[];
|
|
315
|
-
}[]
|
|
317
|
+
}[];
|
|
316
318
|
/**
|
|
317
319
|
* An array of sub-components to be rendered inside columns.
|
|
318
320
|
*/
|
|
319
321
|
columns?: {
|
|
320
322
|
width: number;
|
|
321
|
-
currentWidth?: number
|
|
323
|
+
currentWidth?: number;
|
|
322
324
|
components: ActionInput[];
|
|
323
|
-
}[]
|
|
325
|
+
}[];
|
|
324
326
|
};
|
|
325
327
|
export type ActionRequest = {
|
|
326
328
|
actionId: string;
|