@elqnt/entity 1.0.0 → 1.0.5
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/chunk-4GC36G4D.js +184 -0
- package/dist/chunk-4GC36G4D.js.map +1 -0
- package/dist/chunk-LIACJMHV.mjs +184 -0
- package/dist/chunk-LIACJMHV.mjs.map +1 -0
- package/dist/index.d.mts +9 -606
- package/dist/index.d.ts +9 -606
- package/dist/index.js +242 -385
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +75 -108
- package/dist/index.mjs.map +1 -1
- package/dist/models/index.d.mts +602 -0
- package/dist/models/index.d.ts +602 -0
- package/dist/models/index.js +148 -0
- package/dist/models/index.js.map +1 -0
- package/dist/models/index.mjs +148 -0
- package/dist/models/index.mjs.map +1 -0
- package/package.json +6 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,606 +1,9 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
2
|
+
import _react from 'react';
|
|
3
|
+
import { EntityDefinition, EntityView, CreateOrgSchemaResponse, DropOrgSchemaResponse, EntityDefinitionResponse, ResponseMetadata, EntityRecord, EntityQuery, EntityRecordResponse, ListResult } from './models/index.mjs';
|
|
4
|
+
export { BulkCreateRequest, BulkDeleteRequest, BulkUpdateRequest, CountEntityRecordsRequest, CountEntityRecordsResponse, CreateEntityDefinitionRequest, CreateOrgSchemaRequest, CreateRecordRequest, CreateViewRequest, DeleteEntityDefinitionRequest, DeleteRecordRequest, DeleteViewRequest, DropOrgSchemaRequest, EntityDefinitionChangeEvent, EntityDefinitionCreate, EntityDefinitionCreated, EntityDefinitionDelete, EntityDefinitionDeleted, EntityDefinitionGet, EntityDefinitionGetServer, EntityDefinitionList, EntityDefinitionUpdate, EntityDefinitionUpdated, EntityFieldType, EntityFieldTypeBool, EntityFieldTypeCurrency, EntityFieldTypeDate, EntityFieldTypeDateTime, EntityFieldTypeDropdown, EntityFieldTypeEmail, EntityFieldTypeFile, EntityFieldTypeFloat, EntityFieldTypeImage, EntityFieldTypeInt, EntityFieldTypeJSON, EntityFieldTypeLookup, EntityFieldTypeMultiLookup, EntityFieldTypeMultiSelect, EntityFieldTypeOptionTS, EntityFieldTypePhone, EntityFieldTypeString, EntityFieldTypeStringMultiline, EntityFieldTypeTS, EntityFieldTypeText, EntityFieldTypeURL, EntityFieldTypes, EntityFilterOperator, EntityFilterOperatorOptionTS, EntityFilterOperatorTS, EntityFilterOperators, EntityOrgSchemaCreate, EntityOrgSchemaDrop, EntityRecordChangeEvent, EntityRecordCount, EntityRecordCreate, EntityRecordCreated, EntityRecordDelete, EntityRecordDeleted, EntityRecordGet, EntityRecordQuery, EntityRecordUpdate, EntityRecordUpdated, EntityRecordsBulkCreate, EntityRecordsBulkCreated, EntityRecordsBulkDelete, EntityRecordsBulkDeleted, EntityRecordsBulkUpdate, EntityRecordsBulkUpdated, EntityViewChangeEvent, EntityViewCreate, EntityViewCreated, EntityViewDelete, EntityViewDeleted, EntityViewList, EntityViewResponse, EntityViewUpdate, EntityViewUpdated, FieldValidation, Filter, GetEntityDefinitionRequest, GetEntityRecordRequest, GetEntityRecordResponse, GetViewRequest, InsertOneResult, ListEntityDefinitionsRequest, ListEntityDefinitionsResponse, ListEntityRecordsResponse, ListOptions, ListViewsRequest, ListViewsResponse, LookupInclude, OperatorBetween, OperatorContains, OperatorEmpty, OperatorEndsWith, OperatorEq, OperatorExists, OperatorGt, OperatorGte, OperatorIn, OperatorLt, OperatorLte, OperatorNe, OperatorNin, OperatorStartsWith, QueryRequest, RecordChange, RecordChangeAction, RecordChangeActionCreated, RecordChangeActionDeleted, RecordChangeActionUpdated, RecordReference, Sort, UpdateEntityDefinitionRequest, UpdateRecordRequest, UpdateViewRequest, ValidationRule, ValidationRuleCondition, View, ViewColumn, ViewFilter } from './models/index.mjs';
|
|
4
5
|
import * as redux from 'redux';
|
|
5
|
-
|
|
6
|
-
type EntityFilterOperator = string;
|
|
7
|
-
/**
|
|
8
|
-
* todo: move to types package
|
|
9
|
-
*/
|
|
10
|
-
declare const OperatorEq: EntityFilterOperator;
|
|
11
|
-
/**
|
|
12
|
-
* todo: move to types package
|
|
13
|
-
*/
|
|
14
|
-
declare const OperatorNe: EntityFilterOperator;
|
|
15
|
-
/**
|
|
16
|
-
* todo: move to types package
|
|
17
|
-
*/
|
|
18
|
-
declare const OperatorGt: EntityFilterOperator;
|
|
19
|
-
/**
|
|
20
|
-
* todo: move to types package
|
|
21
|
-
*/
|
|
22
|
-
declare const OperatorGte: EntityFilterOperator;
|
|
23
|
-
/**
|
|
24
|
-
* todo: move to types package
|
|
25
|
-
*/
|
|
26
|
-
declare const OperatorLt: EntityFilterOperator;
|
|
27
|
-
/**
|
|
28
|
-
* todo: move to types package
|
|
29
|
-
*/
|
|
30
|
-
declare const OperatorLte: EntityFilterOperator;
|
|
31
|
-
/**
|
|
32
|
-
* todo: move to types package
|
|
33
|
-
*/
|
|
34
|
-
declare const OperatorIn: EntityFilterOperator;
|
|
35
|
-
/**
|
|
36
|
-
* todo: move to types package
|
|
37
|
-
*/
|
|
38
|
-
declare const OperatorNin: EntityFilterOperator;
|
|
39
|
-
/**
|
|
40
|
-
* todo: move to types package
|
|
41
|
-
*/
|
|
42
|
-
declare const OperatorContains: EntityFilterOperator;
|
|
43
|
-
/**
|
|
44
|
-
* todo: move to types package
|
|
45
|
-
*/
|
|
46
|
-
declare const OperatorStartsWith: EntityFilterOperator;
|
|
47
|
-
/**
|
|
48
|
-
* todo: move to types package
|
|
49
|
-
*/
|
|
50
|
-
declare const OperatorEndsWith: EntityFilterOperator;
|
|
51
|
-
/**
|
|
52
|
-
* todo: move to types package
|
|
53
|
-
*/
|
|
54
|
-
declare const OperatorExists: EntityFilterOperator;
|
|
55
|
-
/**
|
|
56
|
-
* todo: move to types package
|
|
57
|
-
*/
|
|
58
|
-
declare const OperatorEmpty: EntityFilterOperator;
|
|
59
|
-
/**
|
|
60
|
-
* todo: move to types package
|
|
61
|
-
*/
|
|
62
|
-
declare const OperatorBetween: EntityFilterOperator;
|
|
63
|
-
declare const EntityFilterOperators: {
|
|
64
|
-
readonly eq: {
|
|
65
|
-
readonly value: "eq";
|
|
66
|
-
readonly label: "Equal to";
|
|
67
|
-
};
|
|
68
|
-
readonly ne: {
|
|
69
|
-
readonly value: "ne";
|
|
70
|
-
readonly label: "Not equal to";
|
|
71
|
-
};
|
|
72
|
-
readonly gt: {
|
|
73
|
-
readonly value: "gt";
|
|
74
|
-
readonly label: "Greater than";
|
|
75
|
-
};
|
|
76
|
-
readonly gte: {
|
|
77
|
-
readonly value: "gte";
|
|
78
|
-
readonly label: "Greater than or equal to";
|
|
79
|
-
};
|
|
80
|
-
readonly lt: {
|
|
81
|
-
readonly value: "lt";
|
|
82
|
-
readonly label: "Less than";
|
|
83
|
-
};
|
|
84
|
-
readonly lte: {
|
|
85
|
-
readonly value: "lte";
|
|
86
|
-
readonly label: "Less than or equal to";
|
|
87
|
-
};
|
|
88
|
-
readonly in: {
|
|
89
|
-
readonly value: "in";
|
|
90
|
-
readonly label: "In";
|
|
91
|
-
};
|
|
92
|
-
readonly nin: {
|
|
93
|
-
readonly value: "nin";
|
|
94
|
-
readonly label: "Not in";
|
|
95
|
-
};
|
|
96
|
-
readonly contains: {
|
|
97
|
-
readonly value: "contains";
|
|
98
|
-
readonly label: "Contains";
|
|
99
|
-
};
|
|
100
|
-
readonly startsWith: {
|
|
101
|
-
readonly value: "startsWith";
|
|
102
|
-
readonly label: "Starts with";
|
|
103
|
-
};
|
|
104
|
-
readonly endsWith: {
|
|
105
|
-
readonly value: "endsWith";
|
|
106
|
-
readonly label: "Ends with";
|
|
107
|
-
};
|
|
108
|
-
readonly exists: {
|
|
109
|
-
readonly value: "exists";
|
|
110
|
-
readonly label: "Exists";
|
|
111
|
-
};
|
|
112
|
-
readonly empty: {
|
|
113
|
-
readonly value: "empty";
|
|
114
|
-
readonly label: "Empty";
|
|
115
|
-
};
|
|
116
|
-
readonly between: {
|
|
117
|
-
readonly value: "between";
|
|
118
|
-
readonly label: "Between";
|
|
119
|
-
};
|
|
120
|
-
};
|
|
121
|
-
type EntityFilterOperatorTS = keyof typeof EntityFilterOperators;
|
|
122
|
-
type EntityFilterOperatorOptionTS = typeof EntityFilterOperators[EntityFilterOperatorTS];
|
|
123
|
-
type EntityFieldType = string;
|
|
124
|
-
declare const EntityFieldTypeString: EntityFieldType;
|
|
125
|
-
declare const EntityFieldTypeStringMultiline: EntityFieldType;
|
|
126
|
-
declare const EntityFieldTypeText: EntityFieldType;
|
|
127
|
-
declare const EntityFieldTypeInt: EntityFieldType;
|
|
128
|
-
declare const EntityFieldTypeFloat: EntityFieldType;
|
|
129
|
-
declare const EntityFieldTypeBool: EntityFieldType;
|
|
130
|
-
declare const EntityFieldTypeDate: EntityFieldType;
|
|
131
|
-
declare const EntityFieldTypeDateTime: EntityFieldType;
|
|
132
|
-
declare const EntityFieldTypeEmail: EntityFieldType;
|
|
133
|
-
declare const EntityFieldTypePhone: EntityFieldType;
|
|
134
|
-
declare const EntityFieldTypeURL: EntityFieldType;
|
|
135
|
-
declare const EntityFieldTypeDropdown: EntityFieldType;
|
|
136
|
-
declare const EntityFieldTypeMultiSelect: EntityFieldType;
|
|
137
|
-
declare const EntityFieldTypeLookup: EntityFieldType;
|
|
138
|
-
declare const EntityFieldTypeMultiLookup: EntityFieldType;
|
|
139
|
-
declare const EntityFieldTypeCurrency: EntityFieldType;
|
|
140
|
-
declare const EntityFieldTypeFile: EntityFieldType;
|
|
141
|
-
declare const EntityFieldTypeImage: EntityFieldType;
|
|
142
|
-
declare const EntityFieldTypeJSON: EntityFieldType;
|
|
143
|
-
declare const EntityFieldTypes: {
|
|
144
|
-
readonly string: {
|
|
145
|
-
readonly value: "string";
|
|
146
|
-
readonly label: "Short Text";
|
|
147
|
-
};
|
|
148
|
-
readonly stringMultiline: {
|
|
149
|
-
readonly value: "stringMultiline";
|
|
150
|
-
readonly label: "Long Text";
|
|
151
|
-
};
|
|
152
|
-
readonly text: {
|
|
153
|
-
readonly value: "text";
|
|
154
|
-
readonly label: "Rich Text Editor";
|
|
155
|
-
};
|
|
156
|
-
readonly int: {
|
|
157
|
-
readonly value: "int";
|
|
158
|
-
readonly label: "Integer";
|
|
159
|
-
};
|
|
160
|
-
readonly float: {
|
|
161
|
-
readonly value: "float";
|
|
162
|
-
readonly label: "Decimal";
|
|
163
|
-
};
|
|
164
|
-
readonly bool: {
|
|
165
|
-
readonly value: "bool";
|
|
166
|
-
readonly label: "Boolean";
|
|
167
|
-
};
|
|
168
|
-
readonly date: {
|
|
169
|
-
readonly value: "date";
|
|
170
|
-
readonly label: "Date";
|
|
171
|
-
};
|
|
172
|
-
readonly datetime: {
|
|
173
|
-
readonly value: "datetime";
|
|
174
|
-
readonly label: "Date & Time";
|
|
175
|
-
};
|
|
176
|
-
readonly email: {
|
|
177
|
-
readonly value: "email";
|
|
178
|
-
readonly label: "Email";
|
|
179
|
-
};
|
|
180
|
-
readonly phone: {
|
|
181
|
-
readonly value: "phone";
|
|
182
|
-
readonly label: "Phone";
|
|
183
|
-
};
|
|
184
|
-
readonly url: {
|
|
185
|
-
readonly value: "url";
|
|
186
|
-
readonly label: "URL";
|
|
187
|
-
};
|
|
188
|
-
readonly dropdown: {
|
|
189
|
-
readonly value: "dropdown";
|
|
190
|
-
readonly label: "Dropdown";
|
|
191
|
-
};
|
|
192
|
-
readonly multiselect: {
|
|
193
|
-
readonly value: "multiselect";
|
|
194
|
-
readonly label: "Multi Select";
|
|
195
|
-
};
|
|
196
|
-
readonly lookup: {
|
|
197
|
-
readonly value: "lookup";
|
|
198
|
-
readonly label: "Lookup";
|
|
199
|
-
};
|
|
200
|
-
readonly multilookup: {
|
|
201
|
-
readonly value: "multilookup";
|
|
202
|
-
readonly label: "Multi Lookup";
|
|
203
|
-
};
|
|
204
|
-
readonly currency: {
|
|
205
|
-
readonly value: "currency";
|
|
206
|
-
readonly label: "Currency";
|
|
207
|
-
};
|
|
208
|
-
readonly file: {
|
|
209
|
-
readonly value: "file";
|
|
210
|
-
readonly label: "File";
|
|
211
|
-
};
|
|
212
|
-
readonly image: {
|
|
213
|
-
readonly value: "image";
|
|
214
|
-
readonly label: "Image";
|
|
215
|
-
};
|
|
216
|
-
readonly json: {
|
|
217
|
-
readonly value: "json";
|
|
218
|
-
readonly label: "JSON";
|
|
219
|
-
};
|
|
220
|
-
};
|
|
221
|
-
type EntityFieldTypeTS = keyof typeof EntityFieldTypes;
|
|
222
|
-
type EntityFieldTypeOptionTS = typeof EntityFieldTypes[EntityFieldTypeTS];
|
|
223
|
-
interface EntityDefinition {
|
|
224
|
-
id: string;
|
|
225
|
-
name: string;
|
|
226
|
-
displayName: string;
|
|
227
|
-
module: string;
|
|
228
|
-
description: string;
|
|
229
|
-
schema: JSONSchema;
|
|
230
|
-
defaultViewId: string;
|
|
231
|
-
metadata?: {
|
|
232
|
-
[key: string]: any;
|
|
233
|
-
};
|
|
234
|
-
createdAt: string;
|
|
235
|
-
updatedAt: string;
|
|
236
|
-
isActive: boolean;
|
|
237
|
-
version: number;
|
|
238
|
-
}
|
|
239
|
-
interface EntityRecord {
|
|
240
|
-
id: string;
|
|
241
|
-
entityId: string;
|
|
242
|
-
name: string;
|
|
243
|
-
fields: {
|
|
244
|
-
[key: string]: any;
|
|
245
|
-
};
|
|
246
|
-
tags?: string[];
|
|
247
|
-
metadata?: {
|
|
248
|
-
[key: string]: any;
|
|
249
|
-
};
|
|
250
|
-
createdAt: string;
|
|
251
|
-
updatedAt: string;
|
|
252
|
-
isActive: boolean;
|
|
253
|
-
version: number;
|
|
254
|
-
}
|
|
255
|
-
/**
|
|
256
|
-
* View defines how to display entity records in a list
|
|
257
|
-
*/
|
|
258
|
-
interface View {
|
|
259
|
-
id: string;
|
|
260
|
-
entityId: string;
|
|
261
|
-
name: string;
|
|
262
|
-
displayName: string;
|
|
263
|
-
description?: string;
|
|
264
|
-
isDefault: boolean;
|
|
265
|
-
columns: ViewColumn[];
|
|
266
|
-
filters: Filter[];
|
|
267
|
-
sort: Sort[];
|
|
268
|
-
}
|
|
269
|
-
interface Filter {
|
|
270
|
-
field: string;
|
|
271
|
-
operator: EntityFilterOperator;
|
|
272
|
-
value: any;
|
|
273
|
-
}
|
|
274
|
-
interface Sort {
|
|
275
|
-
field: string;
|
|
276
|
-
direction: number;
|
|
277
|
-
}
|
|
278
|
-
interface FieldValidation {
|
|
279
|
-
required: boolean;
|
|
280
|
-
min?: number;
|
|
281
|
-
max?: number;
|
|
282
|
-
minLength?: number;
|
|
283
|
-
maxLength?: number;
|
|
284
|
-
pattern?: string;
|
|
285
|
-
customRules?: ValidationRule[];
|
|
286
|
-
}
|
|
287
|
-
interface ValidationRule {
|
|
288
|
-
name: string;
|
|
289
|
-
conditions: ValidationRuleCondition[];
|
|
290
|
-
}
|
|
291
|
-
interface ValidationRuleCondition {
|
|
292
|
-
field: string;
|
|
293
|
-
operator: string;
|
|
294
|
-
value: any;
|
|
295
|
-
}
|
|
296
|
-
interface RecordReference {
|
|
297
|
-
entityName: string;
|
|
298
|
-
recordId: string;
|
|
299
|
-
fieldName: string;
|
|
300
|
-
referencedAt: string;
|
|
301
|
-
}
|
|
302
|
-
interface InsertOneResult {
|
|
303
|
-
insertedId: string;
|
|
304
|
-
success: boolean;
|
|
305
|
-
error: string;
|
|
306
|
-
}
|
|
307
|
-
/**
|
|
308
|
-
* Query related models
|
|
309
|
-
*/
|
|
310
|
-
interface EntityQuery {
|
|
311
|
-
filters: {
|
|
312
|
-
[key: string]: any;
|
|
313
|
-
};
|
|
314
|
-
page: number;
|
|
315
|
-
pageSize: number;
|
|
316
|
-
sortBy: string;
|
|
317
|
-
sortOrder: number;
|
|
318
|
-
includeLookups?: LookupInclude[];
|
|
319
|
-
include?: string[];
|
|
320
|
-
exclude?: string[];
|
|
321
|
-
}
|
|
322
|
-
interface LookupInclude {
|
|
323
|
-
entityName: string;
|
|
324
|
-
fieldName: string;
|
|
325
|
-
fields?: string[];
|
|
326
|
-
}
|
|
327
|
-
interface QueryRequest {
|
|
328
|
-
orgId: string;
|
|
329
|
-
entityName: string;
|
|
330
|
-
viewId?: string;
|
|
331
|
-
query: EntityQuery;
|
|
332
|
-
}
|
|
333
|
-
/**
|
|
334
|
-
* Request/Response models
|
|
335
|
-
*/
|
|
336
|
-
interface CreateEntityDefinitionRequest {
|
|
337
|
-
orgId: string;
|
|
338
|
-
definition: EntityDefinition;
|
|
339
|
-
}
|
|
340
|
-
interface CreateOrgSchemaRequest {
|
|
341
|
-
orgId: string;
|
|
342
|
-
}
|
|
343
|
-
interface CreateOrgSchemaResponse {
|
|
344
|
-
metadata: ResponseMetadata;
|
|
345
|
-
}
|
|
346
|
-
interface DropOrgSchemaRequest {
|
|
347
|
-
orgId: string;
|
|
348
|
-
}
|
|
349
|
-
interface DropOrgSchemaResponse {
|
|
350
|
-
metadata: ResponseMetadata;
|
|
351
|
-
}
|
|
352
|
-
interface CreateRecordRequest {
|
|
353
|
-
orgId: string;
|
|
354
|
-
entityName: string;
|
|
355
|
-
record: EntityRecord;
|
|
356
|
-
}
|
|
357
|
-
interface UpdateRecordRequest {
|
|
358
|
-
orgId: string;
|
|
359
|
-
entityName: string;
|
|
360
|
-
recordId: string;
|
|
361
|
-
record: EntityRecord;
|
|
362
|
-
}
|
|
363
|
-
interface DeleteRecordRequest {
|
|
364
|
-
orgId: string;
|
|
365
|
-
entityName: string;
|
|
366
|
-
recordId: string;
|
|
367
|
-
}
|
|
368
|
-
/**
|
|
369
|
-
* View models
|
|
370
|
-
*/
|
|
371
|
-
interface EntityView {
|
|
372
|
-
id: string;
|
|
373
|
-
name: string;
|
|
374
|
-
displayName: string;
|
|
375
|
-
entityName: string;
|
|
376
|
-
columns: ViewColumn[];
|
|
377
|
-
filters: ViewFilter[];
|
|
378
|
-
lookups: LookupInclude[];
|
|
379
|
-
sortBy?: string;
|
|
380
|
-
sortOrder?: number;
|
|
381
|
-
isDefault: boolean;
|
|
382
|
-
createdAt: string;
|
|
383
|
-
updatedAt: string;
|
|
384
|
-
isActive: boolean;
|
|
385
|
-
version: number;
|
|
386
|
-
}
|
|
387
|
-
interface ViewColumn {
|
|
388
|
-
fieldName: string;
|
|
389
|
-
displayName: string;
|
|
390
|
-
width: number;
|
|
391
|
-
sortable: boolean;
|
|
392
|
-
visible: boolean;
|
|
393
|
-
order: number;
|
|
394
|
-
}
|
|
395
|
-
interface ViewFilter {
|
|
396
|
-
fieldName: string;
|
|
397
|
-
operator: string;
|
|
398
|
-
value: any;
|
|
399
|
-
}
|
|
400
|
-
/**
|
|
401
|
-
* Bulk operation models
|
|
402
|
-
*/
|
|
403
|
-
interface BulkCreateRequest {
|
|
404
|
-
orgId: string;
|
|
405
|
-
entityName: string;
|
|
406
|
-
records: EntityRecord[];
|
|
407
|
-
}
|
|
408
|
-
interface BulkUpdateRequest {
|
|
409
|
-
orgId: string;
|
|
410
|
-
entityName: string;
|
|
411
|
-
records: EntityRecord[];
|
|
412
|
-
}
|
|
413
|
-
interface BulkDeleteRequest {
|
|
414
|
-
orgId: string;
|
|
415
|
-
entityName: string;
|
|
416
|
-
recordIds: string[];
|
|
417
|
-
}
|
|
418
|
-
interface UpdateEntityDefinitionRequest {
|
|
419
|
-
orgId: string;
|
|
420
|
-
entityName: string;
|
|
421
|
-
definition: EntityDefinition;
|
|
422
|
-
}
|
|
423
|
-
interface GetEntityDefinitionRequest {
|
|
424
|
-
orgId: string;
|
|
425
|
-
entityName: string;
|
|
426
|
-
}
|
|
427
|
-
interface DeleteEntityDefinitionRequest {
|
|
428
|
-
orgId: string;
|
|
429
|
-
entityName: string;
|
|
430
|
-
deleteRecords?: boolean;
|
|
431
|
-
hardDelete?: boolean;
|
|
432
|
-
}
|
|
433
|
-
interface ListEntityDefinitionsRequest {
|
|
434
|
-
orgId: string;
|
|
435
|
-
module?: string;
|
|
436
|
-
status?: string;
|
|
437
|
-
}
|
|
438
|
-
/**
|
|
439
|
-
* View related requests
|
|
440
|
-
*/
|
|
441
|
-
interface CreateViewRequest {
|
|
442
|
-
orgId: string;
|
|
443
|
-
entityName: string;
|
|
444
|
-
view: EntityView;
|
|
445
|
-
}
|
|
446
|
-
interface UpdateViewRequest {
|
|
447
|
-
orgId: string;
|
|
448
|
-
view: EntityView;
|
|
449
|
-
}
|
|
450
|
-
interface DeleteViewRequest {
|
|
451
|
-
orgId: string;
|
|
452
|
-
viewId: string;
|
|
453
|
-
}
|
|
454
|
-
interface GetViewRequest {
|
|
455
|
-
orgId: string;
|
|
456
|
-
viewId: string;
|
|
457
|
-
}
|
|
458
|
-
interface ListViewsRequest {
|
|
459
|
-
orgId: string;
|
|
460
|
-
entityName: string;
|
|
461
|
-
}
|
|
462
|
-
/**
|
|
463
|
-
* Response models
|
|
464
|
-
*/
|
|
465
|
-
interface EntityDefinitionResponse {
|
|
466
|
-
definition: EntityDefinition;
|
|
467
|
-
metadata: ResponseMetadata;
|
|
468
|
-
}
|
|
469
|
-
interface ListEntityDefinitionsResponse {
|
|
470
|
-
definitions: EntityDefinition[];
|
|
471
|
-
metadata: ResponseMetadata;
|
|
472
|
-
}
|
|
473
|
-
interface EntityViewResponse {
|
|
474
|
-
view: EntityView;
|
|
475
|
-
metadata: ResponseMetadata;
|
|
476
|
-
}
|
|
477
|
-
interface ListViewsResponse {
|
|
478
|
-
views: EntityView[];
|
|
479
|
-
metadata: ResponseMetadata;
|
|
480
|
-
}
|
|
481
|
-
interface EntityRecordResponse {
|
|
482
|
-
record: EntityRecord;
|
|
483
|
-
metadata: ResponseMetadata;
|
|
484
|
-
}
|
|
485
|
-
interface ListEntityRecordsResponse {
|
|
486
|
-
records?: ListResult<EntityRecord>;
|
|
487
|
-
metadata: ResponseMetadata;
|
|
488
|
-
}
|
|
489
|
-
/**
|
|
490
|
-
* Common response metadata
|
|
491
|
-
*/
|
|
492
|
-
interface ResponseMetadata {
|
|
493
|
-
success: boolean;
|
|
494
|
-
timestamp: string;
|
|
495
|
-
message?: string;
|
|
496
|
-
error?: string;
|
|
497
|
-
}
|
|
498
|
-
interface ListOptions {
|
|
499
|
-
Page: number;
|
|
500
|
-
PageSize: number;
|
|
501
|
-
SortBy: string;
|
|
502
|
-
SortOrder: number;
|
|
503
|
-
Filters: {
|
|
504
|
-
[key: string]: any;
|
|
505
|
-
};
|
|
506
|
-
Include: string[];
|
|
507
|
-
Exclude: string[];
|
|
508
|
-
}
|
|
509
|
-
interface ListResult<T extends any> {
|
|
510
|
-
items: T[];
|
|
511
|
-
totalCount: number;
|
|
512
|
-
currentPage: number;
|
|
513
|
-
pageSize: number;
|
|
514
|
-
totalPages: number;
|
|
515
|
-
}
|
|
516
|
-
interface GetEntityRecordRequest {
|
|
517
|
-
orgId: string;
|
|
518
|
-
entityName: string;
|
|
519
|
-
recordId: string;
|
|
520
|
-
}
|
|
521
|
-
interface GetEntityRecordResponse {
|
|
522
|
-
record?: EntityRecord;
|
|
523
|
-
metadata: ResponseMetadata;
|
|
524
|
-
}
|
|
525
|
-
interface CountEntityRecordsRequest {
|
|
526
|
-
orgId: string;
|
|
527
|
-
entityName: string;
|
|
528
|
-
filters?: {
|
|
529
|
-
[key: string]: any;
|
|
530
|
-
};
|
|
531
|
-
}
|
|
532
|
-
interface CountEntityRecordsResponse {
|
|
533
|
-
count: number;
|
|
534
|
-
metadata: ResponseMetadata;
|
|
535
|
-
}
|
|
536
|
-
interface EntityRecordChangeEvent {
|
|
537
|
-
orgId: string;
|
|
538
|
-
entityName: string;
|
|
539
|
-
recordId: string;
|
|
540
|
-
record?: EntityRecord;
|
|
541
|
-
changes?: RecordChange;
|
|
542
|
-
action: RecordChangeAction;
|
|
543
|
-
timestamp: string;
|
|
544
|
-
}
|
|
545
|
-
interface RecordChange {
|
|
546
|
-
/**
|
|
547
|
-
* OldValues map[string]TypedValue `json:"oldValues,omitempty"`
|
|
548
|
-
* NewValues map[string]TypedValue `json:"newValues,omitempty"`
|
|
549
|
-
*/
|
|
550
|
-
changedAt: string;
|
|
551
|
-
changedBy: string;
|
|
552
|
-
fields: string[];
|
|
553
|
-
}
|
|
554
|
-
interface EntityDefinitionChangeEvent {
|
|
555
|
-
orgId: string;
|
|
556
|
-
definition?: EntityDefinition;
|
|
557
|
-
action: string;
|
|
558
|
-
timestamp: string;
|
|
559
|
-
}
|
|
560
|
-
interface EntityViewChangeEvent {
|
|
561
|
-
orgId: string;
|
|
562
|
-
entityName: string;
|
|
563
|
-
view?: EntityView;
|
|
564
|
-
action: string;
|
|
565
|
-
timestamp: string;
|
|
566
|
-
}
|
|
567
|
-
type RecordChangeAction = string;
|
|
568
|
-
declare const RecordChangeActionCreated: RecordChangeAction;
|
|
569
|
-
declare const RecordChangeActionUpdated: RecordChangeAction;
|
|
570
|
-
declare const RecordChangeActionDeleted: RecordChangeAction;
|
|
571
|
-
declare const EntityOrgSchemaCreate = "entity.org.schema.create";
|
|
572
|
-
declare const EntityOrgSchemaDrop = "entity.org.schema.drop";
|
|
573
|
-
declare const EntityDefinitionCreate = "entity.definition.create";
|
|
574
|
-
declare const EntityDefinitionCreated = "entity.definition.created";
|
|
575
|
-
declare const EntityDefinitionUpdate = "entity.definition.update";
|
|
576
|
-
declare const EntityDefinitionGet = "entity.definition.get";
|
|
577
|
-
declare const EntityDefinitionGetServer = "entity.definition.get.server";
|
|
578
|
-
declare const EntityDefinitionList = "entity.definition.list";
|
|
579
|
-
declare const EntityDefinitionUpdated = "entity.definition.updated";
|
|
580
|
-
declare const EntityDefinitionDelete = "entity.definition.delete";
|
|
581
|
-
declare const EntityDefinitionDeleted = "entity.definition.deleted";
|
|
582
|
-
declare const EntityRecordCreate = "entity.record.create";
|
|
583
|
-
declare const EntityRecordCreated = "entity.record.created";
|
|
584
|
-
declare const EntityRecordGet = "entity.record.get";
|
|
585
|
-
declare const EntityRecordQuery = "entity.record.query";
|
|
586
|
-
declare const EntityRecordCount = "entity.record.count";
|
|
587
|
-
declare const EntityRecordUpdate = "entity.record.update";
|
|
588
|
-
declare const EntityRecordUpdated = "entity.record.updated";
|
|
589
|
-
declare const EntityRecordDelete = "entity.record.delete";
|
|
590
|
-
declare const EntityRecordDeleted = "entity.record.deleted";
|
|
591
|
-
declare const EntityRecordsBulkCreate = "entity.records.bulk.create";
|
|
592
|
-
declare const EntityRecordsBulkCreated = "entity.records.bulk.created";
|
|
593
|
-
declare const EntityRecordsBulkUpdate = "entity.records.bulk.update";
|
|
594
|
-
declare const EntityRecordsBulkUpdated = "entity.records.bulk.updated";
|
|
595
|
-
declare const EntityRecordsBulkDelete = "entity.records.bulk.delete";
|
|
596
|
-
declare const EntityRecordsBulkDeleted = "entity.records.bulk.deleted";
|
|
597
|
-
declare const EntityViewCreate = "entity.view.create";
|
|
598
|
-
declare const EntityViewCreated = "entity.view.created";
|
|
599
|
-
declare const EntityViewUpdate = "entity.view.update";
|
|
600
|
-
declare const EntityViewUpdated = "entity.view.updated";
|
|
601
|
-
declare const EntityViewDelete = "entity.view.delete";
|
|
602
|
-
declare const EntityViewDeleted = "entity.view.deleted";
|
|
603
|
-
declare const EntityViewList = "entity.view.list";
|
|
6
|
+
import '@elqnt/types';
|
|
604
7
|
|
|
605
8
|
type UseEntityDefinitionType = {
|
|
606
9
|
definitions: Record<string, EntityDefinition>;
|
|
@@ -666,9 +69,9 @@ declare function useEntityRecord(orgId: string | undefined, entityName: string,
|
|
|
666
69
|
|
|
667
70
|
declare function useDebounce<T extends (...args: any[]) => any>(callback: T, delay: number): (...args: Parameters<T>) => void;
|
|
668
71
|
|
|
669
|
-
declare const EntityDefinitionContext:
|
|
72
|
+
declare const EntityDefinitionContext: _react.Context<UseEntityDefinitionType | undefined>;
|
|
670
73
|
interface EntityDefinitionProviderProps {
|
|
671
|
-
children:
|
|
74
|
+
children: _react.ReactNode;
|
|
672
75
|
orgId: string;
|
|
673
76
|
entityName?: string;
|
|
674
77
|
options?: UseEntityDefinitionOptions;
|
|
@@ -676,9 +79,9 @@ interface EntityDefinitionProviderProps {
|
|
|
676
79
|
declare function EntityDefinitionProvider({ children, orgId, entityName, options, }: EntityDefinitionProviderProps): react_jsx_runtime.JSX.Element;
|
|
677
80
|
declare function useEntityDefinitionContext(): UseEntityDefinitionType;
|
|
678
81
|
|
|
679
|
-
declare const EntityRecordContext:
|
|
82
|
+
declare const EntityRecordContext: _react.Context<UseEntityRecordType | undefined>;
|
|
680
83
|
interface EntityRecordProviderProps {
|
|
681
|
-
children:
|
|
84
|
+
children: _react.ReactNode;
|
|
682
85
|
orgId: string;
|
|
683
86
|
entityName: string;
|
|
684
87
|
options?: {
|
|
@@ -727,4 +130,4 @@ declare const PREDEFINED_COLORS: {
|
|
|
727
130
|
name: string;
|
|
728
131
|
}[];
|
|
729
132
|
|
|
730
|
-
export {
|
|
133
|
+
export { CreateOrgSchemaResponse, DropOrgSchemaResponse, EntityDefinition, EntityDefinitionContext, EntityDefinitionProvider, type EntityDefinitionProviderProps, EntityDefinitionResponse, type EntityDefinitionSelector, type EntityDefinitionState, EntityQuery, EntityRecord, EntityRecordContext, EntityRecordProvider, type EntityRecordProviderProps, EntityRecordResponse, type EntityRecordSelector, type EntityRecordState, EntityView, ListResult, PREDEFINED_COLORS, ResponseMetadata, type UseEntityDefinitionOptions, type UseEntityDefinitionType, type UseEntityRecordType, entityDefinitionReducer, entityRecordReducer, useDebounce, useEntityDefinition, useEntityDefinitionContext, useEntityDefinitionDetails, useEntityRecord, useEntityRecordContext };
|