@creatio/base 0.1000.0 → 0.1000.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.
- package/CHANGELOG.md +5 -1
- package/LICENSE.md +5 -6
- package/THIRD_PARTY_LICENSES.txt +147 -0
- package/fesm2022/creatio-base.mjs +216 -3
- package/fesm2022/creatio-base.mjs.map +1 -1
- package/index.d.ts +289 -1
- package/package.json +1 -13
- package/types/creatio-base.d.ts +311 -3
package/index.d.ts
CHANGED
|
@@ -49,6 +49,17 @@ export declare enum eAdminUnitRoleSources {
|
|
|
49
49
|
All = 63
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
/**
|
|
53
|
+
* @public
|
|
54
|
+
* @description Origin of a filter group — where the group came from. A group can originate from a predefined
|
|
55
|
+
* filter (preset); the discriminated `kind` leaves room for other origins without a breaking change. Persisted
|
|
56
|
+
* as a client-side round-trip marker so a stored filter can be re-rendered as its source.
|
|
57
|
+
*/
|
|
58
|
+
export declare interface FilterGroupOrigin {
|
|
59
|
+
readonly type: ɵFilterGroupOriginType.Predefined;
|
|
60
|
+
readonly predefinedFilterId: ɵGuid;
|
|
61
|
+
}
|
|
62
|
+
|
|
52
63
|
/**
|
|
53
64
|
* @generativeApi
|
|
54
65
|
* @description Combined type for all ESQ filters. If you plan to create a new filter, please add it to this type.
|
|
@@ -84,6 +95,10 @@ export declare type IFilterGroup = ɵBaseFilter & {
|
|
|
84
95
|
* @description Root entity schema name or table name.
|
|
85
96
|
*/
|
|
86
97
|
rootSchemaName?: string;
|
|
98
|
+
/**
|
|
99
|
+
* @description Origin of this filter group (e.g. the predefined filter / preset it was created from), if any.
|
|
100
|
+
*/
|
|
101
|
+
filterGroupOrigin?: FilterGroupOrigin;
|
|
87
102
|
};
|
|
88
103
|
|
|
89
104
|
/**
|
|
@@ -2503,6 +2518,10 @@ export declare class ɵFilterGroup extends ɵBaseFilter implements IFilterGroup
|
|
|
2503
2518
|
* @description Root schema name.
|
|
2504
2519
|
*/
|
|
2505
2520
|
rootSchemaName?: string;
|
|
2521
|
+
/**
|
|
2522
|
+
* @description Origin of this filter group (e.g. the predefined filter / preset it was created from), if any.
|
|
2523
|
+
*/
|
|
2524
|
+
filterGroupOrigin?: FilterGroupOrigin;
|
|
2506
2525
|
constructor(logicalOperation?: ɵLogicalOperatorType, rootSchemaName?: string);
|
|
2507
2526
|
/**
|
|
2508
2527
|
* @public
|
|
@@ -2607,6 +2626,18 @@ export declare class ɵFilterGroup extends ɵBaseFilter implements IFilterGroup
|
|
|
2607
2626
|
/* Excluded from this release type: _getUsedColumns */
|
|
2608
2627
|
}
|
|
2609
2628
|
|
|
2629
|
+
/**
|
|
2630
|
+
* @public
|
|
2631
|
+
* @description The origin kind of a filter group — where the group was created from.
|
|
2632
|
+
*/
|
|
2633
|
+
export declare enum ɵFilterGroupOriginType {
|
|
2634
|
+
/**
|
|
2635
|
+
* @public
|
|
2636
|
+
* @description The group was created from a predefined filter (preset).
|
|
2637
|
+
*/
|
|
2638
|
+
Predefined = "Predefined"
|
|
2639
|
+
}
|
|
2640
|
+
|
|
2610
2641
|
export declare class ɵFilterMock extends ɵBaseFilter {
|
|
2611
2642
|
/* Excluded from this release type: _instanceOfKey */
|
|
2612
2643
|
/* Excluded from this release type: _instanceOfKeys */
|
|
@@ -2651,6 +2682,9 @@ export declare class ɵFilterResolver {
|
|
|
2651
2682
|
* - 4 In, Checks if a value is in a specified set of values.
|
|
2652
2683
|
* - 5 Exists, Checks if a value exists.
|
|
2653
2684
|
* - 6 FilterGroup, A group of filters combined with logical operators (AND, OR).
|
|
2685
|
+
* - 7 Segment, Segment-membership filter — EXISTS / NOT EXISTS against the per-segment
|
|
2686
|
+
* data table addressed by SegmentFilterOptions.segmentId. Documented in
|
|
2687
|
+
* `crt-data-segmentation-engine/architecture/artifacts/insegment-filter-api.md`.
|
|
2654
2688
|
*/
|
|
2655
2689
|
export declare enum ɵFilterType {
|
|
2656
2690
|
/**
|
|
@@ -2689,7 +2723,15 @@ export declare enum ɵFilterType {
|
|
|
2689
2723
|
* @public
|
|
2690
2724
|
* @description A group of filters combined with logical operators (AND, OR).
|
|
2691
2725
|
*/
|
|
2692
|
-
FilterGroup = 6
|
|
2726
|
+
FilterGroup = 6,
|
|
2727
|
+
/**
|
|
2728
|
+
* @public
|
|
2729
|
+
* @description Segment-membership filter. Carries a nested SegmentFilterOptions payload;
|
|
2730
|
+
* the backend resolves segmentId via the SysDataSegment lookup and emits an EXISTS / NOT
|
|
2731
|
+
* EXISTS subquery against the segment's per-segment data table. Use comparisonType
|
|
2732
|
+
* Exists (15) for "in segment" and Not_exists (16) for "not in segment".
|
|
2733
|
+
*/
|
|
2734
|
+
Segment = 7
|
|
2693
2735
|
}
|
|
2694
2736
|
|
|
2695
2737
|
/**
|
|
@@ -3733,6 +3775,252 @@ export declare enum ɵSchemaViewMaskRequestAction {
|
|
|
3733
3775
|
RemoveTask = "removeTask"
|
|
3734
3776
|
}
|
|
3735
3777
|
|
|
3778
|
+
/**
|
|
3779
|
+
* @public
|
|
3780
|
+
* @description Segment-membership filter. Tests whether the outer row's primary key is
|
|
3781
|
+
* present in (or absent from, with `Not_exists`) the per-segment data table named by
|
|
3782
|
+
* `SegmentFilterOptions.segmentId`.
|
|
3783
|
+
*
|
|
3784
|
+
* Wire form (DataService `SelectQuery` filters):
|
|
3785
|
+
* ```jsonc
|
|
3786
|
+
* {
|
|
3787
|
+
* "filterType": 7, // FilterType.Segment
|
|
3788
|
+
* "comparisonType": 15, // 15 = Exists (IN), 16 = Not_exists (NOT IN)
|
|
3789
|
+
* "isEnabled": true,
|
|
3790
|
+
* "segmentFilterOptions": {
|
|
3791
|
+
* "segmentId": "<SysDataSegment.Id>"
|
|
3792
|
+
* }
|
|
3793
|
+
* }
|
|
3794
|
+
* ```
|
|
3795
|
+
*
|
|
3796
|
+
* Extends `BaseFilter` directly — segment filters have no `leftExpression`, so they don't
|
|
3797
|
+
* share `SingleFilter`'s contract. Structurally a sibling of `FilterGroup` in that respect.
|
|
3798
|
+
*
|
|
3799
|
+
* @extends {BaseFilter}
|
|
3800
|
+
*/
|
|
3801
|
+
export declare class ɵSegmentFilter extends ɵBaseFilter {
|
|
3802
|
+
/* Excluded from this release type: _segmentFilterOptions */
|
|
3803
|
+
/* Excluded from this release type: _comparisonType */
|
|
3804
|
+
/* Excluded from this release type: _instanceOfKey */
|
|
3805
|
+
/* Excluded from this release type: _instanceOfKeys */
|
|
3806
|
+
/**
|
|
3807
|
+
* @description Type of filter.
|
|
3808
|
+
* @default 7
|
|
3809
|
+
*/
|
|
3810
|
+
readonly filterType = ɵFilterType.Segment;
|
|
3811
|
+
constructor(segmentFilterOptions: ɵSegmentFilterOptions, comparisonType?: ɵSegmentFilterComparisonType);
|
|
3812
|
+
/**
|
|
3813
|
+
* @public
|
|
3814
|
+
* @description Segment selection + membership-mode + temporal bounds. The nested
|
|
3815
|
+
* object is the wire-level payload — backend reads it as
|
|
3816
|
+
* `Terrasoft.Core.Entities.SegmentFilterOptions`. Read-only from outside; mutate
|
|
3817
|
+
* via {@link ɵSegmentFilter.patchOptions}.
|
|
3818
|
+
*/
|
|
3819
|
+
get segmentFilterOptions(): ɵSegmentFilterOptions;
|
|
3820
|
+
/**
|
|
3821
|
+
* @public
|
|
3822
|
+
* @description Comparison semantics. `Exists` = "row is in segment", `Not_exists` =
|
|
3823
|
+
* "row is not in segment". Any other value would be rejected by the backend with
|
|
3824
|
+
* `NotSupportedException`. Defaults to `ComparisonType.Exists` so the common
|
|
3825
|
+
* "is in segment" case requires no explicit argument. Read-only from outside; mutate
|
|
3826
|
+
* via {@link ɵSegmentFilter.updateComparisonType}.
|
|
3827
|
+
*/
|
|
3828
|
+
get comparisonType(): ɵSegmentFilterComparisonType;
|
|
3829
|
+
private _serializeOptions;
|
|
3830
|
+
/**
|
|
3831
|
+
* Parses a segment filter from its wire-level DTO. The parameter is the typed
|
|
3832
|
+
* `SegmentFilterDto` directly — the resolver dispatch passes the raw `JsonObject`
|
|
3833
|
+
* at runtime, but TypeScript sees the base-class signature (`dto: JsonObject`) for
|
|
3834
|
+
* the call site, so this narrower parameter is structurally compatible without a
|
|
3835
|
+
* cast at either end.
|
|
3836
|
+
*
|
|
3837
|
+
* @public
|
|
3838
|
+
*/
|
|
3839
|
+
static fromJson({ comparisonType, uId, segmentFilterOptions }: ɵSegmentFilterDto): ɵSegmentFilter;
|
|
3840
|
+
/**
|
|
3841
|
+
* @public
|
|
3842
|
+
* @description Patches the nested segment options with the provided partial. Existing
|
|
3843
|
+
* fields not present in the patch are kept; new fields override the old ones. Use this
|
|
3844
|
+
* from the UI when picking a segment, switching membership mode, or shifting temporal
|
|
3845
|
+
* bounds — direct assignment to `segmentFilterOptions` is intentionally funneled
|
|
3846
|
+
* through this method so all mutations live on the filter's public API.
|
|
3847
|
+
* @param options - Partial set of fields to merge over the current options.
|
|
3848
|
+
*/
|
|
3849
|
+
patchOptions(options: Partial<ɵSegmentFilterOptions>): void;
|
|
3850
|
+
/**
|
|
3851
|
+
* @public
|
|
3852
|
+
* @description Switches whether the filter participates in the query. Mirrors the
|
|
3853
|
+
* `isEnabled` property carried by every `BaseFilter`, exposed as a method so
|
|
3854
|
+
* all-value writes on a `SegmentFilter` go through its public surface.
|
|
3855
|
+
* @param enabled - `true` to include the filter in the resulting query, `false`
|
|
3856
|
+
* to keep it on the rendered list but exclude it from execution.
|
|
3857
|
+
*/
|
|
3858
|
+
toggle(enabled: boolean): void;
|
|
3859
|
+
/**
|
|
3860
|
+
* @public
|
|
3861
|
+
* @description Replaces the comparison semantics — `Exists` ("row is in segment") or
|
|
3862
|
+
* `Not_exists` ("row is not in segment"). Use this from the UI when the user flips
|
|
3863
|
+
* the "in / not in" selector; direct assignment to `comparisonType` is intentionally
|
|
3864
|
+
* funneled through this method so all mutations live on the filter's public API.
|
|
3865
|
+
* @param comparisonType - The new comparison semantics to apply.
|
|
3866
|
+
*/
|
|
3867
|
+
updateComparisonType(comparisonType: ɵSegmentFilterComparisonType): void;
|
|
3868
|
+
/**
|
|
3869
|
+
* @public
|
|
3870
|
+
* @description Assigns the filter's unique identifier. Mirrors `BaseFilter.uId`,
|
|
3871
|
+
* exposed as a method so all writes on a `SegmentFilter` go through its public
|
|
3872
|
+
* surface — used at parse time by `fromJson` to attach the wire-level `uId` to a
|
|
3873
|
+
* freshly constructed instance.
|
|
3874
|
+
* @param uId - The identifier to set, or `undefined` to clear it.
|
|
3875
|
+
*/
|
|
3876
|
+
updateId(uId: string | undefined): void;
|
|
3877
|
+
/**
|
|
3878
|
+
* @public
|
|
3879
|
+
* @description Clones the filter. The constructor defensively copies the options object, so
|
|
3880
|
+
* the clone owns an independent copy and the two instances never share mutable state. The
|
|
3881
|
+
* remaining own state is copied field by field, matching the explicit clone style of the
|
|
3882
|
+
* sibling filters.
|
|
3883
|
+
*/
|
|
3884
|
+
clone(): ɵSegmentFilter;
|
|
3885
|
+
/** {@inheritDoc ɵSerializable.toJson} */
|
|
3886
|
+
toJson(): ɵSegmentFilterDto;
|
|
3887
|
+
/* Excluded from this release type: _getUsedColumns */
|
|
3888
|
+
}
|
|
3889
|
+
|
|
3890
|
+
/**
|
|
3891
|
+
* @public
|
|
3892
|
+
* @description Comparison kinds the backend accepts on a `FilterType.Segment` filter. Any
|
|
3893
|
+
* other value would be rejected by `EntitySchemaQuery.CreateSegmentFilter` with
|
|
3894
|
+
* `NotSupportedException`. `Exists` means "row is a member of the segment" (IN), while
|
|
3895
|
+
* `Not_exists` means "row is not a member" (NOT IN).
|
|
3896
|
+
*/
|
|
3897
|
+
export declare type ɵSegmentFilterComparisonType = ɵComparisonType.Exists | ɵComparisonType.Not_exists;
|
|
3898
|
+
|
|
3899
|
+
/**
|
|
3900
|
+
* @public
|
|
3901
|
+
* @description Wire-level shape of a serialized `SegmentFilter`. Mirrors the documented
|
|
3902
|
+
* Segmentation API JSON contract (insegment-filter-api.md §5).
|
|
3903
|
+
*
|
|
3904
|
+
* Extends `JsonObject` so `toJson` can return it where a generic JSON object is expected by
|
|
3905
|
+
* serializers / parsers, and so `fromJson` can read fields via dot notation without runtime
|
|
3906
|
+
* type guards or `as` casts. Every field is optional because the parser must tolerate
|
|
3907
|
+
* partially filled wire payloads (e.g. preset templates with no `segmentId` yet).
|
|
3908
|
+
*/
|
|
3909
|
+
export declare interface ɵSegmentFilterDto extends ɵJsonObject {
|
|
3910
|
+
/**
|
|
3911
|
+
* @description Filter-type discriminator. Always `FilterType.Segment` (7) when present.
|
|
3912
|
+
*/
|
|
3913
|
+
filterType?: ɵFilterType.Segment;
|
|
3914
|
+
/**
|
|
3915
|
+
* @description Comparison semantics. See {@link ɵSegmentFilterComparisonType}.
|
|
3916
|
+
*/
|
|
3917
|
+
comparisonType?: ɵSegmentFilterComparisonType;
|
|
3918
|
+
/**
|
|
3919
|
+
* @description Whether the filter participates in the query. Defaults to `true` when
|
|
3920
|
+
* absent (resolved by the outer `BaseFilter`).
|
|
3921
|
+
*/
|
|
3922
|
+
isEnabled?: boolean;
|
|
3923
|
+
/**
|
|
3924
|
+
* @description Truncates `DateTime`-typed parameters to a date-only value when applied.
|
|
3925
|
+
* Inert for segment filters (no date parameters) but kept on the wire for shape parity
|
|
3926
|
+
* with sibling filter DTOs.
|
|
3927
|
+
*/
|
|
3928
|
+
trimDateTimeParameterToDate?: boolean;
|
|
3929
|
+
/**
|
|
3930
|
+
* @description Filter unique identifier. Consumed by `fromJson` when present on an inbound
|
|
3931
|
+
* payload so the UI can correlate rendered controls with the source filter. It is not
|
|
3932
|
+
* emitted by `toJson` (matching the sibling filter DTOs), so it does not round-trip
|
|
3933
|
+
* through serialization.
|
|
3934
|
+
*/
|
|
3935
|
+
uId?: string;
|
|
3936
|
+
/**
|
|
3937
|
+
* @description Nested segment-membership options. See {@link ɵSegmentFilterOptionsDto}.
|
|
3938
|
+
*/
|
|
3939
|
+
segmentFilterOptions?: ɵSegmentFilterOptionsDto;
|
|
3940
|
+
}
|
|
3941
|
+
|
|
3942
|
+
/**
|
|
3943
|
+
* @public
|
|
3944
|
+
* @description Options that parameterise a segment-membership filter. Mirrors the wire
|
|
3945
|
+
* `SegmentFilterOptions` payload defined in the Segmentation API
|
|
3946
|
+
* (`crt-data-segmentation-engine/architecture/artifacts/insegment-filter-api.md` §5).
|
|
3947
|
+
*
|
|
3948
|
+
* `segmentId` is required. `includeRemovedMembers` toggles the active-only `RemovedOn IS NULL`
|
|
3949
|
+
* subquery predicate. `addedOn*` / `removedOn*` are inclusive ISO-8601 date bounds on the
|
|
3950
|
+
* membership row's `AddedOn` / `RemovedOn` timestamps; `removedOn*` requires
|
|
3951
|
+
* `includeRemovedMembers: true` (the backend throws ArgumentException otherwise).
|
|
3952
|
+
*/
|
|
3953
|
+
export declare interface ɵSegmentFilterOptions {
|
|
3954
|
+
/**
|
|
3955
|
+
* @description Identifier of the `SysDataSegment` record whose per-segment data table is
|
|
3956
|
+
* probed by the membership subquery. Required.
|
|
3957
|
+
*/
|
|
3958
|
+
segmentId: string;
|
|
3959
|
+
/**
|
|
3960
|
+
* @description When `true`, the subquery omits the `RemovedOn IS NULL` predicate so
|
|
3961
|
+
* historical (removed) memberships also satisfy the filter. Required for any non-null
|
|
3962
|
+
* `removedOn*` bound. Defaults to `false` (active members only).
|
|
3963
|
+
*/
|
|
3964
|
+
includeRemovedMembers?: boolean;
|
|
3965
|
+
/**
|
|
3966
|
+
* @description When `true`, the server bypasses the `RequireActiveSegmentUserStatus`
|
|
3967
|
+
* gate, so the filter is valid for any operator user status (Active / Paused /
|
|
3968
|
+
* Disabled). The system (lifecycle) status gate — `RequireReadySegmentStatus` — still
|
|
3969
|
+
* applies, so segments that have never been actualised remain rejected. Defaults to
|
|
3970
|
+
* `false` (Active-only).
|
|
3971
|
+
*/
|
|
3972
|
+
ignoreUserStatus?: boolean;
|
|
3973
|
+
/**
|
|
3974
|
+
* @description Inclusive ISO-8601 lower bound on the membership row's `AddedOn`
|
|
3975
|
+
* timestamp.
|
|
3976
|
+
*/
|
|
3977
|
+
addedOnFrom?: string;
|
|
3978
|
+
/**
|
|
3979
|
+
* @description Inclusive ISO-8601 upper bound on the membership row's `AddedOn`
|
|
3980
|
+
* timestamp.
|
|
3981
|
+
*/
|
|
3982
|
+
addedOnTo?: string;
|
|
3983
|
+
/**
|
|
3984
|
+
* @description Inclusive ISO-8601 lower bound on the membership row's `RemovedOn`
|
|
3985
|
+
* timestamp. Requires `includeRemovedMembers: true`.
|
|
3986
|
+
*/
|
|
3987
|
+
removedOnFrom?: string;
|
|
3988
|
+
/**
|
|
3989
|
+
* @description Inclusive ISO-8601 upper bound on the membership row's `RemovedOn`
|
|
3990
|
+
* timestamp. Requires `includeRemovedMembers: true`.
|
|
3991
|
+
*/
|
|
3992
|
+
removedOnTo?: string;
|
|
3993
|
+
}
|
|
3994
|
+
|
|
3995
|
+
/**
|
|
3996
|
+
* @public
|
|
3997
|
+
* @description Wire-level shape of the nested `segmentFilterOptions` object in a serialized
|
|
3998
|
+
* `SegmentFilter`. Every field is optional, so the DTO can represent both fully filled
|
|
3999
|
+
* payloads and unfilled preset templates (where the UI hasn't picked a segment yet).
|
|
4000
|
+
*
|
|
4001
|
+
* Extends `JsonObject` so the type interoperates with the resolver / parser dispatch
|
|
4002
|
+
* contracts while still exposing each documented field with its narrow type.
|
|
4003
|
+
*/
|
|
4004
|
+
export declare interface ɵSegmentFilterOptionsDto extends ɵJsonObject {
|
|
4005
|
+
/**
|
|
4006
|
+
* @description Identifier of the `SysDataSegment` record. Optional on the wire so
|
|
4007
|
+
* unfilled preset templates can omit it.
|
|
4008
|
+
*/
|
|
4009
|
+
segmentId?: string;
|
|
4010
|
+
/** {@inheritDoc ɵSegmentFilterOptions.includeRemovedMembers} */
|
|
4011
|
+
includeRemovedMembers?: boolean;
|
|
4012
|
+
/** {@inheritDoc ɵSegmentFilterOptions.ignoreUserStatus} */
|
|
4013
|
+
ignoreUserStatus?: boolean;
|
|
4014
|
+
/** {@inheritDoc ɵSegmentFilterOptions.addedOnFrom} */
|
|
4015
|
+
addedOnFrom?: string;
|
|
4016
|
+
/** {@inheritDoc ɵSegmentFilterOptions.addedOnTo} */
|
|
4017
|
+
addedOnTo?: string;
|
|
4018
|
+
/** {@inheritDoc ɵSegmentFilterOptions.removedOnFrom} */
|
|
4019
|
+
removedOnFrom?: string;
|
|
4020
|
+
/** {@inheritDoc ɵSegmentFilterOptions.removedOnTo} */
|
|
4021
|
+
removedOnTo?: string;
|
|
4022
|
+
}
|
|
4023
|
+
|
|
3736
4024
|
/**
|
|
3737
4025
|
* @public
|
|
3738
4026
|
* @description The query class for localized data fetching.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@creatio/base",
|
|
3
|
-
"version": "0.1000.
|
|
3
|
+
"version": "0.1000.1",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
5
5
|
"description": "Internal API to create customizations and integrations for Creatio platform.",
|
|
6
6
|
"keywords": [
|
|
@@ -17,18 +17,6 @@
|
|
|
17
17
|
"tslib": "^2.3.0"
|
|
18
18
|
},
|
|
19
19
|
"sideEffects": false,
|
|
20
|
-
"overrides": [
|
|
21
|
-
{
|
|
22
|
-
"files": [
|
|
23
|
-
"*.ts"
|
|
24
|
-
],
|
|
25
|
-
"parserOptions": {
|
|
26
|
-
"project": [
|
|
27
|
-
"libs/devkit/base/tsconfig.*?.json"
|
|
28
|
-
]
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
],
|
|
32
20
|
"module": "fesm2022/creatio-base.mjs",
|
|
33
21
|
"typings": "types/creatio-base.d.ts",
|
|
34
22
|
"exports": {
|