@enonic-types/core 7.16.2-RC2 → 8.0.0-A2
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/README.md +5 -5
- package/index.d.ts +147 -95
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,16 +23,16 @@ import type {Content} from '@enonic-types/core';
|
|
|
23
23
|
|
|
24
24
|
### Content
|
|
25
25
|
|
|
26
|
-
`Content` contains the `x` property, that has a very special `
|
|
26
|
+
`Content` contains the `x` property, that has a very special `XpMixin` type.
|
|
27
27
|
|
|
28
|
-
`
|
|
28
|
+
`XpMixin` is an interface, that is added to the global scope, so it can be
|
|
29
29
|
modified using the [declaration merging](https://www.typescriptlang.org/docs/handbook/declaration-merging.html#merging-interfaces).
|
|
30
|
-
This allows you to set the shape of the
|
|
31
|
-
declaring the `
|
|
30
|
+
This allows you to set the shape of the Mixin in your project, simply by
|
|
31
|
+
declaring the `XpMixin` like this:
|
|
32
32
|
|
|
33
33
|
```ts
|
|
34
34
|
declare global {
|
|
35
|
-
interface
|
|
35
|
+
interface XpMixin {
|
|
36
36
|
'com-mysite-app': {
|
|
37
37
|
metadata: {
|
|
38
38
|
metaTagTitle: string;
|
package/index.d.ts
CHANGED
|
@@ -1,24 +1,19 @@
|
|
|
1
1
|
export type ComponentDescriptor = `${string}:${string}`;
|
|
2
2
|
|
|
3
3
|
export interface NestedRecord {
|
|
4
|
-
|
|
4
|
+
[name: PropertyKey]: NestedRecord | unknown
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
declare global {
|
|
8
8
|
interface XpBeans {}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
|
|
10
|
+
type XpLayoutMap = Record<ComponentDescriptor, NestedRecord>;
|
|
11
|
+
|
|
12
12
|
interface XpLibraries {}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
[partDescriptor: ComponentDescriptor]: NestedRecord;
|
|
18
|
-
}
|
|
19
|
-
interface XpXData {
|
|
20
|
-
[key: string]: Record<string, Record<string, unknown>>;
|
|
21
|
-
}
|
|
13
|
+
|
|
14
|
+
type XpPageMap = Record<ComponentDescriptor, NestedRecord>;
|
|
15
|
+
type XpPartMap = Record<ComponentDescriptor, NestedRecord>;
|
|
16
|
+
type XpMixin = Record<string, Record<string, Record<string, unknown>>>;
|
|
22
17
|
}
|
|
23
18
|
|
|
24
19
|
export interface App {
|
|
@@ -58,7 +53,7 @@ export interface DoubleUnderscore {
|
|
|
58
53
|
* Converts JSON to a Java Map structure that can be used as parameters to a Java method on a bean created with newBean.
|
|
59
54
|
* @param value Value to convert
|
|
60
55
|
*/
|
|
61
|
-
toScriptValue: <T =
|
|
56
|
+
toScriptValue: <T = unknown>(value: T) => T extends null | undefined ? null : ScriptValue;
|
|
62
57
|
/**
|
|
63
58
|
* Add a disposer that is called when the app is stopped.
|
|
64
59
|
* @param callback Function to call
|
|
@@ -69,8 +64,7 @@ export interface DoubleUnderscore {
|
|
|
69
64
|
* If the JavaScript variable is defined, it is returned as is.
|
|
70
65
|
* @param value Value to convert
|
|
71
66
|
*/
|
|
72
|
-
nullOrValue: <T =
|
|
73
|
-
|
|
67
|
+
nullOrValue: <T = unknown>(value: T) => T extends null | undefined ? null : T;
|
|
74
68
|
/**
|
|
75
69
|
* Doc registerMock.
|
|
76
70
|
*
|
|
@@ -221,15 +215,40 @@ export type ResponseCookies = Record<string, string | ComplexCookie | undefined>
|
|
|
221
215
|
export type RequestHeaders = Record<string, string | undefined>;
|
|
222
216
|
export type ResponseHeaders = Record<string, string | number | (string | number)[] | undefined>;
|
|
223
217
|
|
|
224
|
-
export interface DefaultRequestCookies
|
|
218
|
+
export interface DefaultRequestCookies
|
|
219
|
+
extends RequestCookies {
|
|
225
220
|
JSESSIONID?: string;
|
|
226
221
|
}
|
|
227
222
|
|
|
228
|
-
export type SecFetchDest =
|
|
229
|
-
|
|
223
|
+
export type SecFetchDest =
|
|
224
|
+
'audio'
|
|
225
|
+
| 'audioworklet'
|
|
226
|
+
| 'document'
|
|
227
|
+
| 'embed'
|
|
228
|
+
| 'empty'
|
|
229
|
+
| 'fencedframe'
|
|
230
|
+
| 'font'
|
|
231
|
+
| 'frame'
|
|
232
|
+
| 'iframe'
|
|
233
|
+
| 'image'
|
|
234
|
+
| 'manifest'
|
|
235
|
+
| 'object'
|
|
236
|
+
| 'paintworklet'
|
|
237
|
+
| 'report'
|
|
238
|
+
| 'script'
|
|
239
|
+
| 'serviceworker'
|
|
240
|
+
| 'sharedworker'
|
|
241
|
+
| 'style'
|
|
242
|
+
| 'track'
|
|
243
|
+
| 'video'
|
|
244
|
+
| 'webidentity'
|
|
245
|
+
| 'worker'
|
|
246
|
+
| 'xslt';
|
|
247
|
+
export type SecFetchMode = 'cors' | 'navigate' | 'no-cors' | 'same-origin' | 'websocket';
|
|
230
248
|
export type SecFetchSite = 'cross-site' | 'same-origin' | 'same-site' | 'none';
|
|
231
249
|
|
|
232
|
-
export interface DefaultRequestHeaders
|
|
250
|
+
export interface DefaultRequestHeaders
|
|
251
|
+
extends RequestHeaders {
|
|
233
252
|
Accept?: string;
|
|
234
253
|
'Accept-Charset'?: string;
|
|
235
254
|
'Accept-Encoding'?: string;
|
|
@@ -278,11 +297,13 @@ export interface RequestConstructorParams {
|
|
|
278
297
|
webSocket: boolean;
|
|
279
298
|
}
|
|
280
299
|
|
|
281
|
-
export interface RequestInterface
|
|
300
|
+
export interface RequestInterface
|
|
301
|
+
extends RequestConstructorParams {
|
|
282
302
|
getHeader: RequestGetHeaderFunction;
|
|
283
303
|
}
|
|
284
304
|
|
|
285
|
-
export interface DefaultRequest
|
|
305
|
+
export interface DefaultRequest
|
|
306
|
+
extends RequestInterface {
|
|
286
307
|
cookies: DefaultRequestCookies;
|
|
287
308
|
headers: DefaultRequestHeaders;
|
|
288
309
|
}
|
|
@@ -298,7 +319,8 @@ export type SerializableRequest<T extends RequestInterface = DefaultRequest> = O
|
|
|
298
319
|
body?: unknown[] | Record<string, unknown> | boolean | number | string | null;
|
|
299
320
|
};
|
|
300
321
|
|
|
301
|
-
export interface DefaultResponseHeaders
|
|
322
|
+
export interface DefaultResponseHeaders
|
|
323
|
+
extends ResponseHeaders {
|
|
302
324
|
'Cache-Control'?: string;
|
|
303
325
|
'Content-Encoding'?: string;
|
|
304
326
|
'Content-Type'?: string;
|
|
@@ -313,10 +335,10 @@ export interface DefaultResponseHeaders extends ResponseHeaders {
|
|
|
313
335
|
// So perhaps it's better to enforce that, so it's consistent both ways.
|
|
314
336
|
// It also causes problems in ResponseProcessors, since they work with both from and to Java.
|
|
315
337
|
export interface PageContributions {
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
338
|
+
headBegin?: string[];
|
|
339
|
+
headEnd?: string[];
|
|
340
|
+
bodyBegin?: string[];
|
|
341
|
+
bodyEnd?: string[];
|
|
320
342
|
}
|
|
321
343
|
|
|
322
344
|
export type ResponseBody = unknown[] | Record<string, unknown> | boolean | number | string | null | ByteSource;
|
|
@@ -332,11 +354,13 @@ export interface MappedResponse {
|
|
|
332
354
|
status: number;
|
|
333
355
|
}
|
|
334
356
|
|
|
335
|
-
export interface ResponseInterface
|
|
357
|
+
export interface ResponseInterface
|
|
358
|
+
extends Partial<MappedResponse> {
|
|
336
359
|
redirect?: string;
|
|
337
360
|
}
|
|
338
361
|
|
|
339
|
-
export interface DefaultResponse
|
|
362
|
+
export interface DefaultResponse
|
|
363
|
+
extends ResponseInterface {
|
|
340
364
|
contentType?: LiteralUnion<'text/html' | 'application/json'>;
|
|
341
365
|
headers?: DefaultResponseHeaders;
|
|
342
366
|
}
|
|
@@ -363,7 +387,7 @@ export interface WebSocketSession {
|
|
|
363
387
|
id: string;
|
|
364
388
|
params: Record<string, string | string[]>;
|
|
365
389
|
path: string;
|
|
366
|
-
user: Omit<User,'type'>;
|
|
390
|
+
user: Omit<User, 'type'>;
|
|
367
391
|
}
|
|
368
392
|
|
|
369
393
|
export type WebSocketEventType = 'open' | 'message' | 'error' | 'close';
|
|
@@ -452,7 +476,8 @@ export interface ErrorController {
|
|
|
452
476
|
handleError?: ErrorRequestHandler;
|
|
453
477
|
}
|
|
454
478
|
|
|
455
|
-
export interface IdProviderController
|
|
479
|
+
export interface IdProviderController
|
|
480
|
+
extends Controller {
|
|
456
481
|
autoLogin?: AutoLoginRequestHandler;
|
|
457
482
|
handle401?: RequestHandler;
|
|
458
483
|
login?: RequestHandler;
|
|
@@ -460,9 +485,9 @@ export interface IdProviderController extends Controller {
|
|
|
460
485
|
}
|
|
461
486
|
|
|
462
487
|
export interface HttpFilterController<
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
488
|
+
RequestFromJava extends RequestInterface = DefaultRequest,
|
|
489
|
+
ResponseFromNext extends ResponseInterface = Response,
|
|
490
|
+
ResponseToJava extends ResponseInterface = ResponseFromNext
|
|
466
491
|
> {
|
|
467
492
|
filter: (
|
|
468
493
|
request: RequestFromJava,
|
|
@@ -524,6 +549,29 @@ export interface Attachment {
|
|
|
524
549
|
mimeType: string;
|
|
525
550
|
}
|
|
526
551
|
|
|
552
|
+
export interface DataValidationError
|
|
553
|
+
extends ValidationError {
|
|
554
|
+
propertyPath: string;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
export interface AttachmentValidationError
|
|
558
|
+
extends ValidationError {
|
|
559
|
+
attachment: string;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
export interface ValidationError {
|
|
563
|
+
message: string;
|
|
564
|
+
i18n: string;
|
|
565
|
+
errorCode: ValidationErrorCode;
|
|
566
|
+
/* eslint-disable @typescript-eslint/no-explicit-any*/
|
|
567
|
+
args: any[];
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
export interface ValidationErrorCode {
|
|
571
|
+
applicationKey: string;
|
|
572
|
+
code: string;
|
|
573
|
+
}
|
|
574
|
+
|
|
527
575
|
export interface PublishInfo {
|
|
528
576
|
from?: string;
|
|
529
577
|
to?: string;
|
|
@@ -537,13 +585,12 @@ export interface FragmentComponent {
|
|
|
537
585
|
}
|
|
538
586
|
|
|
539
587
|
export interface LayoutComponent<
|
|
540
|
-
Descriptor extends
|
|
588
|
+
Descriptor extends LayoutDescriptor = LayoutDescriptor,
|
|
541
589
|
Config extends NestedRecord = Descriptor extends LayoutDescriptor
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
Regions extends
|
|
545
|
-
Record<string, Region<(FragmentComponent |
|
|
546
|
-
Record<string, Region<(FragmentComponent | Part | TextComponent)[]>>
|
|
590
|
+
? XpLayoutMap[Descriptor]
|
|
591
|
+
: NestedRecord,
|
|
592
|
+
Regions extends Record<string, Region<(FragmentComponent | PartComponent | TextComponent)[]>> =
|
|
593
|
+
Record<string, Region<(FragmentComponent | Part | TextComponent)[]>>
|
|
547
594
|
> {
|
|
548
595
|
type: 'layout'
|
|
549
596
|
descriptor: Descriptor
|
|
@@ -551,13 +598,15 @@ export interface LayoutComponent<
|
|
|
551
598
|
path?: string // Missing in fragmentPreview https://github.com/enonic/xp/issues/10116
|
|
552
599
|
regions: Regions;
|
|
553
600
|
}
|
|
601
|
+
|
|
554
602
|
type LayoutDescriptor = keyof XpLayoutMap;
|
|
603
|
+
/* eslint-disable @typescript-eslint/no-explicit-any*/
|
|
555
604
|
type Layout = LayoutDescriptor extends any // this lets us iterate over every member of the union
|
|
556
|
-
|
|
557
|
-
|
|
605
|
+
? LayoutComponent<LayoutDescriptor, XpLayoutMap[LayoutDescriptor]>
|
|
606
|
+
: never;
|
|
558
607
|
|
|
559
608
|
export interface PartComponent<
|
|
560
|
-
Descriptor extends
|
|
609
|
+
Descriptor extends PartDescriptor = PartDescriptor,
|
|
561
610
|
Config extends NestedRecord =
|
|
562
611
|
Descriptor extends PartDescriptor
|
|
563
612
|
? XpPartMap[Descriptor]
|
|
@@ -568,22 +617,23 @@ export interface PartComponent<
|
|
|
568
617
|
config: Config
|
|
569
618
|
path?: string // Missing in fragmentPreview https://github.com/enonic/xp/issues/10116
|
|
570
619
|
}
|
|
620
|
+
|
|
571
621
|
type PartDescriptor = keyof XpPartMap;
|
|
622
|
+
/* eslint-disable @typescript-eslint/no-explicit-any*/
|
|
572
623
|
type Part = PartDescriptor extends any // this lets us iterate over every member of the union
|
|
573
|
-
|
|
574
|
-
|
|
624
|
+
? PartComponent<PartDescriptor, XpPartMap[PartDescriptor]>
|
|
625
|
+
: never;
|
|
575
626
|
|
|
576
627
|
// NOTE: This reflect lib-portal.getContent where page templates are resolved.
|
|
577
628
|
// WARNING: This does NOT reflect lib-content.getContent where page templates are NOT resolved!
|
|
578
629
|
export interface PageComponent<
|
|
579
|
-
Descriptor extends
|
|
630
|
+
Descriptor extends PageDescriptor = PageDescriptor,
|
|
580
631
|
Config extends NestedRecord =
|
|
581
632
|
Descriptor extends PageDescriptor
|
|
582
633
|
? XpPageMap[Descriptor]
|
|
583
634
|
: NestedRecord,
|
|
584
|
-
Regions extends
|
|
585
|
-
Record<string, Region<(FragmentComponent |
|
|
586
|
-
Record<string, Region<(FragmentComponent | Layout | Part | TextComponent)[]>>
|
|
635
|
+
Regions extends Record<string, Region<(FragmentComponent | LayoutComponent | PartComponent | TextComponent)[]>> =
|
|
636
|
+
Record<string, Region<(FragmentComponent | Layout | Part | TextComponent)[]>>
|
|
587
637
|
> {
|
|
588
638
|
config: Config
|
|
589
639
|
descriptor: Descriptor
|
|
@@ -594,9 +644,10 @@ export interface PageComponent<
|
|
|
594
644
|
}
|
|
595
645
|
|
|
596
646
|
type PageDescriptor = keyof XpPageMap;
|
|
647
|
+
/* eslint-disable @typescript-eslint/no-explicit-any*/
|
|
597
648
|
type Page = PageDescriptor extends any // this lets us iterate over every member of the union
|
|
598
|
-
|
|
599
|
-
|
|
649
|
+
? PageComponent<PageDescriptor, XpPageMap[PageDescriptor]>
|
|
650
|
+
: never;
|
|
600
651
|
|
|
601
652
|
export interface TextComponent {
|
|
602
653
|
type: 'text'
|
|
@@ -605,15 +656,15 @@ export interface TextComponent {
|
|
|
605
656
|
}
|
|
606
657
|
|
|
607
658
|
export type Component<
|
|
608
|
-
Descriptor extends ComponentDescriptor =
|
|
659
|
+
Descriptor extends ComponentDescriptor = ComponentDescriptor,
|
|
609
660
|
Config extends NestedRecord = NestedRecord,
|
|
610
661
|
Regions extends (
|
|
611
662
|
Descriptor extends LayoutDescriptor
|
|
612
663
|
? Record<string, Region<(FragmentComponent | PartComponent | TextComponent)[]>>
|
|
613
664
|
: Record<string, Region>
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
665
|
+
) = Descriptor extends LayoutDescriptor
|
|
666
|
+
? Record<string, Region<(FragmentComponent | PartComponent | TextComponent)[]>>
|
|
667
|
+
: Record<string, Region>,
|
|
617
668
|
> =
|
|
618
669
|
| FragmentComponent
|
|
619
670
|
| LayoutComponent<Descriptor, Config, Regions>
|
|
@@ -622,43 +673,32 @@ export type Component<
|
|
|
622
673
|
| TextComponent;
|
|
623
674
|
|
|
624
675
|
export interface PageRegion<
|
|
625
|
-
Components extends
|
|
626
|
-
(FragmentComponent |
|
|
627
|
-
(FragmentComponent | Layout | Part | TextComponent)[]
|
|
676
|
+
Components extends (FragmentComponent | LayoutComponent | PartComponent | TextComponent)[] =
|
|
677
|
+
(FragmentComponent | Layout | Part | TextComponent)[]
|
|
628
678
|
> {
|
|
629
679
|
name: string;
|
|
630
680
|
components: Components;
|
|
631
681
|
}
|
|
632
682
|
|
|
633
683
|
export interface LayoutRegion<
|
|
634
|
-
Components extends
|
|
635
|
-
(FragmentComponent |
|
|
636
|
-
(FragmentComponent | Part | TextComponent)[]
|
|
684
|
+
Components extends (FragmentComponent | PartComponent | TextComponent)[] =
|
|
685
|
+
(FragmentComponent | Part | TextComponent)[]
|
|
637
686
|
> {
|
|
638
687
|
name: string;
|
|
639
688
|
components: Components;
|
|
640
689
|
}
|
|
641
690
|
|
|
642
691
|
export type Region<
|
|
643
|
-
Components extends
|
|
644
|
-
(FragmentComponent |
|
|
645
|
-
(FragmentComponent | Layout | Part | TextComponent)[]
|
|
692
|
+
Components extends (FragmentComponent | LayoutComponent | PartComponent | TextComponent)[] =
|
|
693
|
+
(FragmentComponent | Layout | Part | TextComponent)[]
|
|
646
694
|
// @ts-expect-error TODO LayoutRegion can't eat LayoutComponent nor Layout!!!
|
|
647
695
|
> = PageRegion<Components> | LayoutRegion<Components>;
|
|
648
696
|
|
|
649
697
|
export interface Content<
|
|
650
698
|
Data = Record<string, unknown>,
|
|
651
699
|
Type extends string = string,
|
|
652
|
-
_Component extends
|
|
653
|
-
|
|
654
|
-
? LayoutComponent | PartComponent
|
|
655
|
-
: PageComponent
|
|
656
|
-
) = (
|
|
657
|
-
Type extends 'portal:fragment'
|
|
658
|
-
? Layout | Part
|
|
659
|
-
: Page
|
|
660
|
-
),
|
|
661
|
-
> {
|
|
700
|
+
_Component extends ContentComponentConstraint<Type> = ContentComponent<Type>
|
|
701
|
+
> {
|
|
662
702
|
_id: string;
|
|
663
703
|
_name: string;
|
|
664
704
|
_path: string;
|
|
@@ -668,7 +708,7 @@ export interface Content<
|
|
|
668
708
|
createdTime: string;
|
|
669
709
|
modifiedTime?: string;
|
|
670
710
|
owner: string;
|
|
671
|
-
data: Type extends 'portal:fragment' ? Record<string,never> : Data;
|
|
711
|
+
data: Type extends 'portal:fragment' ? Record<string, never> : Data;
|
|
672
712
|
type: Type;
|
|
673
713
|
displayName: string;
|
|
674
714
|
hasChildren: boolean;
|
|
@@ -678,7 +718,7 @@ export interface Content<
|
|
|
678
718
|
childOrder?: string;
|
|
679
719
|
_sort?: object[];
|
|
680
720
|
page?: Type extends 'portal:fragment' ? never : _Component;
|
|
681
|
-
x:
|
|
721
|
+
x: XpMixin;
|
|
682
722
|
attachments: Record<string, Attachment>;
|
|
683
723
|
publish?: PublishInfo;
|
|
684
724
|
workflow?: Workflow;
|
|
@@ -687,19 +727,30 @@ export interface Content<
|
|
|
687
727
|
fragment?: Type extends 'portal:fragment' ? _Component : never;
|
|
688
728
|
}
|
|
689
729
|
|
|
690
|
-
export type
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
730
|
+
export type WorkflowState = 'IN_PROGRESS' | 'PENDING_APPROVAL' | 'REJECTED' | 'READY';
|
|
731
|
+
|
|
732
|
+
export interface Workflow {
|
|
733
|
+
state: WorkflowState;
|
|
734
|
+
}
|
|
694
735
|
|
|
695
736
|
export type ContentInheritValue = 'CONTENT' | 'PARENT' | 'NAME' | 'SORT';
|
|
696
737
|
|
|
738
|
+
export type ContentComponentConstraint<Type extends string> =
|
|
739
|
+
Type extends 'portal:fragment'
|
|
740
|
+
? LayoutComponent | PartComponent
|
|
741
|
+
: PageComponent;
|
|
742
|
+
|
|
743
|
+
export type ContentComponent<Type extends string> =
|
|
744
|
+
Type extends 'portal:fragment'
|
|
745
|
+
? Layout | Part
|
|
746
|
+
: Page;
|
|
747
|
+
|
|
697
748
|
// Compliant with npm module ts-brand
|
|
698
749
|
type Brand<
|
|
699
750
|
Base,
|
|
700
751
|
Branding
|
|
701
752
|
> = Base & {
|
|
702
|
-
|
|
753
|
+
'__type__': Branding
|
|
703
754
|
};
|
|
704
755
|
|
|
705
756
|
export type ByteSource = Brand<object, 'ByteSource'>;
|
|
@@ -719,10 +770,15 @@ export interface Resource {
|
|
|
719
770
|
|
|
720
771
|
export interface ResourceKey {
|
|
721
772
|
getApplicationKey(): string;
|
|
773
|
+
|
|
722
774
|
getPath(): string;
|
|
775
|
+
|
|
723
776
|
getUri(): string;
|
|
777
|
+
|
|
724
778
|
isRoot(): boolean;
|
|
779
|
+
|
|
725
780
|
getName(): string;
|
|
781
|
+
|
|
726
782
|
getExtension(): string;
|
|
727
783
|
}
|
|
728
784
|
|
|
@@ -860,6 +916,7 @@ export type DistanceUnit =
|
|
|
860
916
|
export interface FieldSortDsl {
|
|
861
917
|
field: string;
|
|
862
918
|
direction?: SortDirection;
|
|
919
|
+
language?: string;
|
|
863
920
|
}
|
|
864
921
|
|
|
865
922
|
export interface GeoDistanceSortDsl
|
|
@@ -1067,9 +1124,7 @@ export interface Highlight {
|
|
|
1067
1124
|
properties?: Record<string, Highlight>;
|
|
1068
1125
|
}
|
|
1069
1126
|
|
|
1070
|
-
export
|
|
1071
|
-
[highlightedFieldName: string]: string[];
|
|
1072
|
-
}
|
|
1127
|
+
export type HighlightResult = Record<string, string[]>;
|
|
1073
1128
|
|
|
1074
1129
|
export interface ExistsFilter {
|
|
1075
1130
|
exists: {
|
|
@@ -1112,6 +1167,7 @@ export type Filter = ExistsFilter | NotExistsFilter | HasValueFilter | IdsFilter
|
|
|
1112
1167
|
export type InputType =
|
|
1113
1168
|
| 'Time'
|
|
1114
1169
|
| 'DateTime'
|
|
1170
|
+
| 'Instant'
|
|
1115
1171
|
| 'CheckBox'
|
|
1116
1172
|
| 'ComboBox'
|
|
1117
1173
|
| 'Long'
|
|
@@ -1136,7 +1192,6 @@ export interface FormItemSet {
|
|
|
1136
1192
|
formItemType: 'ItemSet';
|
|
1137
1193
|
name: string;
|
|
1138
1194
|
label: string;
|
|
1139
|
-
customText: string;
|
|
1140
1195
|
helpText: string;
|
|
1141
1196
|
maximize: boolean;
|
|
1142
1197
|
inputType: InputType;
|
|
@@ -1174,7 +1229,6 @@ export interface FormItemInput {
|
|
|
1174
1229
|
formItemType: 'Input';
|
|
1175
1230
|
name: string;
|
|
1176
1231
|
label: string;
|
|
1177
|
-
customText: string;
|
|
1178
1232
|
helpText: string;
|
|
1179
1233
|
validationRegexp: string;
|
|
1180
1234
|
maximize: boolean;
|
|
@@ -1187,12 +1241,10 @@ export interface FormItemInput {
|
|
|
1187
1241
|
value: string;
|
|
1188
1242
|
type: ValueType;
|
|
1189
1243
|
}
|
|
1190
|
-
config: {
|
|
1191
|
-
[
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
}[]
|
|
1195
|
-
}
|
|
1244
|
+
config: Record<string, {
|
|
1245
|
+
[attributeKey: string]: string;
|
|
1246
|
+
value: string;
|
|
1247
|
+
}[]>
|
|
1196
1248
|
}
|
|
1197
1249
|
|
|
1198
1250
|
export interface FormItemOptionSet {
|
|
@@ -1218,9 +1270,9 @@ export interface FormItemOptionSet {
|
|
|
1218
1270
|
}[];
|
|
1219
1271
|
}
|
|
1220
1272
|
|
|
1221
|
-
export interface
|
|
1222
|
-
formItemType: '
|
|
1273
|
+
export interface FormItemFormFragment {
|
|
1274
|
+
formItemType: 'FormFragment';
|
|
1223
1275
|
name: string;
|
|
1224
1276
|
}
|
|
1225
1277
|
|
|
1226
|
-
export type FormItem = FormItemSet | FormItemLayout | FormItemOptionSet | FormItemInput |
|
|
1278
|
+
export type FormItem = FormItemSet | FormItemLayout | FormItemOptionSet | FormItemInput | FormItemFormFragment;
|