triangle-types 1.0.65 → 1.0.66
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.
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
export declare class
|
|
1
|
+
export declare class UserPrismSegmentFilter {
|
|
2
|
+
readonly target_id: string;
|
|
2
3
|
readonly min: number;
|
|
3
4
|
readonly max: number;
|
|
4
|
-
constructor(range: any);
|
|
5
|
-
static is(range: any): range is Range;
|
|
6
|
-
}
|
|
7
|
-
export declare class PrismSegmentFilter {
|
|
8
|
-
readonly target_id: string;
|
|
9
|
-
readonly ranges: Range[];
|
|
10
5
|
constructor(filter: any);
|
|
11
|
-
static is(filter: any): filter is
|
|
6
|
+
static is(filter: any): filter is UserPrismSegmentFilter;
|
|
12
7
|
}
|
|
13
8
|
export declare class UserPrismSegment {
|
|
14
9
|
readonly user_prism_segment_id: string;
|
|
@@ -17,7 +12,7 @@ export declare class UserPrismSegment {
|
|
|
17
12
|
readonly segment_id: string;
|
|
18
13
|
readonly name: string;
|
|
19
14
|
readonly prism_segment_ids: string[];
|
|
20
|
-
readonly
|
|
15
|
+
readonly filters: UserPrismSegmentFilter[];
|
|
21
16
|
readonly [x: string]: any;
|
|
22
17
|
constructor(user_prism_segment: any);
|
|
23
18
|
static is(user_prism_segment: any): user_prism_segment is UserPrismSegment;
|
|
@@ -1,33 +1,20 @@
|
|
|
1
|
-
export class
|
|
1
|
+
export class UserPrismSegmentFilter {
|
|
2
|
+
target_id;
|
|
2
3
|
min;
|
|
3
4
|
max;
|
|
4
|
-
constructor(range) {
|
|
5
|
-
if (!Range.is(range)) {
|
|
6
|
-
throw Error("Invalid input.");
|
|
7
|
-
}
|
|
8
|
-
this.min = range.min;
|
|
9
|
-
this.max = range.max;
|
|
10
|
-
}
|
|
11
|
-
static is(range) {
|
|
12
|
-
return (range !== undefined &&
|
|
13
|
-
typeof range.min === "number" &&
|
|
14
|
-
typeof range.max === "number");
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
export class PrismSegmentFilter {
|
|
18
|
-
target_id;
|
|
19
|
-
ranges;
|
|
20
5
|
constructor(filter) {
|
|
21
|
-
if (!
|
|
6
|
+
if (!UserPrismSegmentFilter.is(filter)) {
|
|
22
7
|
throw Error("Invalid input.");
|
|
23
8
|
}
|
|
24
9
|
this.target_id = filter.target_id;
|
|
25
|
-
this.
|
|
10
|
+
this.min = filter.min;
|
|
11
|
+
this.max = filter.max;
|
|
26
12
|
}
|
|
27
13
|
static is(filter) {
|
|
28
14
|
return (filter !== undefined &&
|
|
29
15
|
typeof filter.target_id === "string" &&
|
|
30
|
-
|
|
16
|
+
typeof filter.min === "number" &&
|
|
17
|
+
typeof filter.max === "number");
|
|
31
18
|
}
|
|
32
19
|
}
|
|
33
20
|
export class UserPrismSegment {
|
|
@@ -37,7 +24,7 @@ export class UserPrismSegment {
|
|
|
37
24
|
segment_id;
|
|
38
25
|
name;
|
|
39
26
|
prism_segment_ids;
|
|
40
|
-
|
|
27
|
+
filters;
|
|
41
28
|
constructor(user_prism_segment) {
|
|
42
29
|
if (!UserPrismSegment.is(user_prism_segment)) {
|
|
43
30
|
throw Error("Invalid input.");
|
|
@@ -48,7 +35,7 @@ export class UserPrismSegment {
|
|
|
48
35
|
this.segment_id = user_prism_segment.segment_id;
|
|
49
36
|
this.name = user_prism_segment.name;
|
|
50
37
|
this.prism_segment_ids = user_prism_segment.prism_segment_ids;
|
|
51
|
-
this.
|
|
38
|
+
this.filters = user_prism_segment.filters;
|
|
52
39
|
}
|
|
53
40
|
static is(user_prism_segment) {
|
|
54
41
|
return (user_prism_segment !== undefined &&
|
|
@@ -58,6 +45,6 @@ export class UserPrismSegment {
|
|
|
58
45
|
typeof user_prism_segment.segment_id === "string" &&
|
|
59
46
|
typeof user_prism_segment.name === "string" &&
|
|
60
47
|
Array.isArray(user_prism_segment.prism_segment_ids) && user_prism_segment.prism_segment_ids.every((prism_segment_id) => typeof prism_segment_id === "string") &&
|
|
61
|
-
Array.isArray(user_prism_segment.
|
|
48
|
+
Array.isArray(user_prism_segment.filters) && user_prism_segment.filters.every(UserPrismSegmentFilter.is));
|
|
62
49
|
}
|
|
63
50
|
}
|
package/package.json
CHANGED
|
@@ -1,41 +1,23 @@
|
|
|
1
|
-
export class
|
|
1
|
+
export class UserPrismSegmentFilter {
|
|
2
|
+
readonly target_id : string
|
|
2
3
|
readonly min : number
|
|
3
4
|
readonly max : number
|
|
4
5
|
|
|
5
|
-
constructor(range : any) {
|
|
6
|
-
if (!Range.is(range)) {
|
|
7
|
-
throw Error("Invalid input.")
|
|
8
|
-
}
|
|
9
|
-
this.min = range.min
|
|
10
|
-
this.max = range.max
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
static is(range : any) : range is Range {
|
|
14
|
-
return (
|
|
15
|
-
range !== undefined &&
|
|
16
|
-
typeof range.min === "number" &&
|
|
17
|
-
typeof range.max === "number"
|
|
18
|
-
)
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export class PrismSegmentFilter {
|
|
23
|
-
readonly target_id : string
|
|
24
|
-
readonly ranges : Range[]
|
|
25
|
-
|
|
26
6
|
constructor(filter : any) {
|
|
27
|
-
if (!
|
|
7
|
+
if (!UserPrismSegmentFilter.is(filter)) {
|
|
28
8
|
throw Error("Invalid input.")
|
|
29
9
|
}
|
|
30
10
|
this.target_id = filter.target_id
|
|
31
|
-
this.
|
|
11
|
+
this.min = filter.min
|
|
12
|
+
this.max = filter.max
|
|
32
13
|
}
|
|
33
14
|
|
|
34
|
-
static is(filter : any) : filter is
|
|
15
|
+
static is(filter : any) : filter is UserPrismSegmentFilter {
|
|
35
16
|
return (
|
|
36
17
|
filter !== undefined &&
|
|
37
18
|
typeof filter.target_id === "string" &&
|
|
38
|
-
|
|
19
|
+
typeof filter.min === "number" &&
|
|
20
|
+
typeof filter.max === "number"
|
|
39
21
|
)
|
|
40
22
|
}
|
|
41
23
|
}
|
|
@@ -48,7 +30,7 @@ export class UserPrismSegment {
|
|
|
48
30
|
readonly segment_id : string
|
|
49
31
|
readonly name : string
|
|
50
32
|
readonly prism_segment_ids : string[]
|
|
51
|
-
readonly
|
|
33
|
+
readonly filters : UserPrismSegmentFilter[]
|
|
52
34
|
readonly [x : string] : any
|
|
53
35
|
|
|
54
36
|
constructor(user_prism_segment : any) {
|
|
@@ -61,7 +43,7 @@ export class UserPrismSegment {
|
|
|
61
43
|
this.segment_id = user_prism_segment.segment_id
|
|
62
44
|
this.name = user_prism_segment.name
|
|
63
45
|
this.prism_segment_ids = user_prism_segment.prism_segment_ids
|
|
64
|
-
this.
|
|
46
|
+
this.filters = user_prism_segment.filters
|
|
65
47
|
}
|
|
66
48
|
|
|
67
49
|
static is(user_prism_segment : any) : user_prism_segment is UserPrismSegment {
|
|
@@ -73,7 +55,7 @@ export class UserPrismSegment {
|
|
|
73
55
|
typeof user_prism_segment.segment_id === "string" &&
|
|
74
56
|
typeof user_prism_segment.name === "string" &&
|
|
75
57
|
Array.isArray(user_prism_segment.prism_segment_ids) && user_prism_segment.prism_segment_ids.every((prism_segment_id : any) => typeof prism_segment_id === "string") &&
|
|
76
|
-
Array.isArray(user_prism_segment.
|
|
58
|
+
Array.isArray(user_prism_segment.filters) && user_prism_segment.filters.every(UserPrismSegmentFilter.is)
|
|
77
59
|
)
|
|
78
60
|
}
|
|
79
61
|
}
|