@getcommunity/gc-validators 0.0.292 → 0.0.294
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/base/index.cjs +1 -1
- package/dist/base/index.d.cts +2 -2
- package/dist/base/index.d.mts +2 -2
- package/dist/base/index.mjs +1 -1
- package/dist/{boolean-BwqaNE9c.cjs → boolean-BadU8QJ7.cjs} +6 -3
- package/dist/boolean-CA_mX99H.mjs +13 -0
- package/dist/entities/audit-log/query.cjs +4 -5
- package/dist/entities/audit-log/query.d.cts +23 -3
- package/dist/entities/audit-log/query.d.mts +23 -3
- package/dist/entities/audit-log/query.mjs +3 -4
- package/dist/entities/blog-post/query.cjs +5 -6
- package/dist/entities/blog-post/query.d.cts +23 -3
- package/dist/entities/blog-post/query.d.mts +23 -3
- package/dist/entities/blog-post/query.mjs +4 -5
- package/dist/entities/category/query.cjs +3 -4
- package/dist/entities/category/query.d.cts +1 -1
- package/dist/entities/category/query.d.mts +1 -1
- package/dist/entities/category/query.mjs +2 -3
- package/dist/entities/client/query.cjs +5 -6
- package/dist/entities/client/query.d.cts +1 -1
- package/dist/entities/client/query.d.mts +1 -1
- package/dist/entities/client/query.mjs +4 -5
- package/dist/entities/client-content-pillar/query.cjs +1 -1
- package/dist/entities/client-content-pillar/query.d.cts +1 -1
- package/dist/entities/client-content-pillar/query.d.mts +1 -1
- package/dist/entities/client-content-pillar/query.mjs +1 -1
- package/dist/entities/client-email/query.cjs +3 -4
- package/dist/entities/client-email/query.d.cts +2 -2
- package/dist/entities/client-email/query.d.mts +2 -2
- package/dist/entities/client-email/query.mjs +2 -3
- package/dist/entities/client-media-platform/query.cjs +1 -1
- package/dist/entities/client-media-platform/query.d.cts +1 -1
- package/dist/entities/client-media-platform/query.d.mts +1 -1
- package/dist/entities/client-media-platform/query.mjs +1 -1
- package/dist/entities/client-project/query.cjs +5 -6
- package/dist/entities/client-project/query.d.cts +46 -6
- package/dist/entities/client-project/query.d.mts +46 -6
- package/dist/entities/client-project/query.mjs +4 -5
- package/dist/entities/client-report/query.cjs +5 -6
- package/dist/entities/client-report/query.d.cts +24 -4
- package/dist/entities/client-report/query.d.mts +24 -4
- package/dist/entities/client-report/query.mjs +4 -5
- package/dist/entities/client-styleguide/query.cjs +4 -5
- package/dist/entities/client-styleguide/query.d.cts +2 -2
- package/dist/entities/client-styleguide/query.d.mts +2 -2
- package/dist/entities/client-styleguide/query.mjs +3 -4
- package/dist/entities/client-user/query.cjs +1 -1
- package/dist/entities/client-user/query.d.cts +1 -1
- package/dist/entities/client-user/query.d.mts +1 -1
- package/dist/entities/client-user/query.mjs +1 -1
- package/dist/entities/content-pillar/query.cjs +1 -1
- package/dist/entities/content-pillar/query.d.cts +1 -1
- package/dist/entities/content-pillar/query.d.mts +1 -1
- package/dist/entities/content-pillar/query.mjs +1 -1
- package/dist/entities/gcflytour/query.cjs +1 -1
- package/dist/entities/gcflytour/query.d.cts +1 -1
- package/dist/entities/gcflytour/query.d.mts +1 -1
- package/dist/entities/gcflytour/query.mjs +1 -1
- package/dist/entities/gcflytour-snap/query.cjs +1 -1
- package/dist/entities/gcflytour-snap/query.d.cts +1 -1
- package/dist/entities/gcflytour-snap/query.d.mts +1 -1
- package/dist/entities/gcflytour-snap/query.mjs +1 -1
- package/dist/entities/media-content-type/query.cjs +1 -1
- package/dist/entities/media-content-type/query.d.cts +1 -1
- package/dist/entities/media-content-type/query.d.mts +1 -1
- package/dist/entities/media-content-type/query.mjs +1 -1
- package/dist/entities/media-creative-format/query.cjs +1 -1
- package/dist/entities/media-creative-format/query.d.cts +1 -1
- package/dist/entities/media-creative-format/query.d.mts +1 -1
- package/dist/entities/media-creative-format/query.mjs +1 -1
- package/dist/entities/media-medium/query.cjs +1 -1
- package/dist/entities/media-medium/query.d.cts +1 -1
- package/dist/entities/media-medium/query.d.mts +1 -1
- package/dist/entities/media-medium/query.mjs +1 -1
- package/dist/entities/media-platform/query.cjs +1 -1
- package/dist/entities/media-platform/query.d.cts +1 -1
- package/dist/entities/media-platform/query.d.mts +1 -1
- package/dist/entities/media-platform/query.mjs +1 -1
- package/dist/entities/monday-workspace/query.cjs +3 -4
- package/dist/entities/monday-workspace/query.d.cts +2 -2
- package/dist/entities/monday-workspace/query.d.mts +2 -2
- package/dist/entities/monday-workspace/query.mjs +2 -3
- package/dist/entities/tag/query.cjs +3 -4
- package/dist/entities/tag/query.d.cts +1 -1
- package/dist/entities/tag/query.d.mts +1 -1
- package/dist/entities/tag/query.mjs +2 -3
- package/dist/entities/team-member/query.cjs +5 -6
- package/dist/entities/team-member/query.d.cts +45 -5
- package/dist/entities/team-member/query.d.mts +45 -5
- package/dist/entities/team-member/query.mjs +4 -5
- package/dist/entities/up-permission/fields.cjs +1 -1
- package/dist/entities/up-permission/fields.d.cts +1 -1
- package/dist/entities/up-permission/fields.d.mts +1 -1
- package/dist/entities/up-permission/fields.mjs +1 -1
- package/dist/entities/up-role/query.cjs +4 -5
- package/dist/entities/up-role/query.d.cts +1 -1
- package/dist/entities/up-role/query.d.mts +1 -1
- package/dist/entities/up-role/query.mjs +3 -4
- package/dist/entities/up-user/query.cjs +1 -1
- package/dist/entities/up-user/query.d.cts +1 -1
- package/dist/entities/up-user/query.d.mts +1 -1
- package/dist/entities/up-user/query.mjs +1 -1
- package/dist/entities/url-redirect/query.cjs +5 -6
- package/dist/entities/url-redirect/query.d.cts +45 -5
- package/dist/entities/url-redirect/query.d.mts +45 -5
- package/dist/entities/url-redirect/query.mjs +4 -5
- package/dist/entities/user-account/query.cjs +1 -1
- package/dist/entities/user-account/query.d.cts +1 -1
- package/dist/entities/user-account/query.d.mts +1 -1
- package/dist/entities/user-account/query.mjs +1 -1
- package/dist/entities/utm-tracking-link/query.cjs +5 -6
- package/dist/entities/utm-tracking-link/query.d.cts +3 -3
- package/dist/entities/utm-tracking-link/query.d.mts +3 -3
- package/dist/entities/utm-tracking-link/query.mjs +4 -5
- package/dist/{fields-DbNgWbgS.d.mts → fields-BgmgY8Er.d.mts} +23 -3
- package/dist/{fields-CRaDKzi3.d.cts → fields-C3xhlRTd.d.cts} +23 -3
- package/dist/filters/index.cjs +21 -150
- package/dist/filters/index.d.cts +2 -110
- package/dist/filters/index.d.mts +2 -110
- package/dist/filters/index.mjs +6 -149
- package/dist/{identifier-CeOY3BU-.mjs → identifier-Cj5_NcEx.mjs} +57 -16
- package/dist/{identifier-Di0Gx239.cjs → identifier-Dy532ddR.cjs} +68 -15
- package/dist/index-BVVgDSdq.d.cts +1 -0
- package/dist/index-BVVgDSdq.d.mts +1 -0
- package/dist/{index-C_iAaSf1.d.cts → index-C-zBMTZR.d.cts} +1 -1
- package/dist/{index-COEq2o6s.d.mts → index-CeACed-B.d.mts} +1 -1
- package/dist/{index-BgZbDm41.d.cts → index-eY9SdBCA.d.cts} +492 -51
- package/dist/{index-BgZbDm41.d.mts → index-eY9SdBCA.d.mts} +492 -51
- package/dist/{null-operators-CyK5Nxn3.cjs → null-operators-CTPiNKlc.cjs} +64 -0
- package/dist/{null-operators-DvwH8j8n.mjs → null-operators-Di2tW3dI.mjs} +35 -1
- package/dist/picklist-CKrOioY-.mjs +22 -0
- package/dist/{picklist-DMZjp2EE.cjs → picklist-CxE13krA.cjs} +11 -5
- package/dist/{query-CQVW_n7R.cjs → query-5jb1_gFO.cjs} +8 -9
- package/dist/{query-Do9f-PY3.cjs → query-8q9CmDYp.cjs} +2 -3
- package/dist/{query-BOv5YhYc.d.cts → query-BGa0eFd6.d.cts} +1 -1
- package/dist/{query-Bzv2SS5C.mjs → query-BSU751G0.mjs} +1 -2
- package/dist/{query-79CK1qXP.d.cts → query-BiaMh5wb.d.mts} +23 -3
- package/dist/{query-C-1Mp1j6.d.mts → query-BsHRkBSK.d.cts} +4 -4
- package/dist/{query-PKg23GyY.d.cts → query-Bwi8ePMq.d.mts} +2 -2
- package/dist/{query-BQkvCQDy.d.mts → query-Bz2rxUwZ.d.mts} +1 -1
- package/dist/{query-BdS6AzQM.d.mts → query-CFRFISob.d.cts} +2 -2
- package/dist/{query-DIQPfsSq.d.cts → query-CM9uDbB4.d.mts} +23 -3
- package/dist/{query-DlpZHcIM.d.mts → query-CUu1QJo_.d.mts} +2 -2
- package/dist/{query-CbCFSDNP.d.cts → query-C_DZhlbS.d.cts} +2 -2
- package/dist/{query-k5JTPobF.mjs → query-CcAAKT5-.mjs} +3 -4
- package/dist/{query-Dh3ryD3m.cjs → query-CkVAE7F4.cjs} +5 -6
- package/dist/{query-DQvrkaL2.d.mts → query-ClZapNze.d.cts} +23 -3
- package/dist/{query-WLdChTbq.mjs → query-D34XPwAY.mjs} +3 -4
- package/dist/{query-BiM_LW7b.d.cts → query-D4NPsmi5.d.cts} +2 -2
- package/dist/{query-hXEB-Beo.cjs → query-DE58iR9R.cjs} +5 -6
- package/dist/{query-9J5wmu64.d.mts → query-DlRfLaGp.d.mts} +2 -2
- package/dist/{query-Dxilctoo.d.cts → query-EHdJppMP.d.mts} +4 -4
- package/dist/{query-DVIHcRpR.mjs → query-PGARJYST.mjs} +3 -4
- package/dist/{query-Ctmp66KS.mjs → query-bKI8MTHp.mjs} +3 -4
- package/dist/{query-M5dC8L8L.cjs → query-c2PAMeF4.cjs} +5 -6
- package/dist/{query-z32wChYv.d.mts → query-xz04XcD5.d.cts} +23 -3
- package/dist/{string-By4lqNB3.cjs → string-CbMlEOfD.cjs} +19 -16
- package/dist/{string-CHEFvHQa.mjs → string-Cg95IUzI.mjs} +14 -11
- package/dist/utilities/index.d.cts +1 -1
- package/dist/utilities/index.d.mts +1 -1
- package/package.json +5 -5
- package/dist/boolean-cJxcC8gC.mjs +0 -10
- package/dist/logical-operators-Bku8NPDs.cjs +0 -24
- package/dist/logical-operators-C0-wSK0P.mjs +0 -17
- package/dist/picklist-DayZlSoN.mjs +0 -16
package/dist/filters/index.mjs
CHANGED
|
@@ -1,149 +1,6 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import { n as
|
|
3
|
-
import {
|
|
4
|
-
import { n as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
$eq: {
|
|
8
|
-
type: "comparison",
|
|
9
|
-
valueType: [
|
|
10
|
-
"string",
|
|
11
|
-
"number",
|
|
12
|
-
"boolean",
|
|
13
|
-
"date",
|
|
14
|
-
"datetime",
|
|
15
|
-
"picklist"
|
|
16
|
-
]
|
|
17
|
-
},
|
|
18
|
-
$ne: {
|
|
19
|
-
type: "comparison",
|
|
20
|
-
valueType: [
|
|
21
|
-
"string",
|
|
22
|
-
"number",
|
|
23
|
-
"boolean",
|
|
24
|
-
"date",
|
|
25
|
-
"datetime",
|
|
26
|
-
"picklist"
|
|
27
|
-
]
|
|
28
|
-
},
|
|
29
|
-
$eqi: {
|
|
30
|
-
type: "comparison",
|
|
31
|
-
valueType: ["string"]
|
|
32
|
-
},
|
|
33
|
-
$nei: {
|
|
34
|
-
type: "comparison",
|
|
35
|
-
valueType: ["string"]
|
|
36
|
-
},
|
|
37
|
-
$gt: {
|
|
38
|
-
type: "comparison",
|
|
39
|
-
valueType: [
|
|
40
|
-
"number",
|
|
41
|
-
"date",
|
|
42
|
-
"datetime"
|
|
43
|
-
]
|
|
44
|
-
},
|
|
45
|
-
$gte: {
|
|
46
|
-
type: "comparison",
|
|
47
|
-
valueType: [
|
|
48
|
-
"number",
|
|
49
|
-
"date",
|
|
50
|
-
"datetime"
|
|
51
|
-
]
|
|
52
|
-
},
|
|
53
|
-
$lt: {
|
|
54
|
-
type: "comparison",
|
|
55
|
-
valueType: [
|
|
56
|
-
"number",
|
|
57
|
-
"date",
|
|
58
|
-
"datetime"
|
|
59
|
-
]
|
|
60
|
-
},
|
|
61
|
-
$lte: {
|
|
62
|
-
type: "comparison",
|
|
63
|
-
valueType: [
|
|
64
|
-
"number",
|
|
65
|
-
"date",
|
|
66
|
-
"datetime"
|
|
67
|
-
]
|
|
68
|
-
},
|
|
69
|
-
$contains: {
|
|
70
|
-
type: "string",
|
|
71
|
-
valueType: ["string"]
|
|
72
|
-
},
|
|
73
|
-
$containsi: {
|
|
74
|
-
type: "string",
|
|
75
|
-
valueType: ["string"]
|
|
76
|
-
},
|
|
77
|
-
$endsWith: {
|
|
78
|
-
type: "string",
|
|
79
|
-
valueType: ["string"]
|
|
80
|
-
},
|
|
81
|
-
$endsWithi: {
|
|
82
|
-
type: "string",
|
|
83
|
-
valueType: ["string"]
|
|
84
|
-
},
|
|
85
|
-
$notContains: {
|
|
86
|
-
type: "string",
|
|
87
|
-
valueType: ["string"]
|
|
88
|
-
},
|
|
89
|
-
$notContainsi: {
|
|
90
|
-
type: "string",
|
|
91
|
-
valueType: ["string"]
|
|
92
|
-
},
|
|
93
|
-
$startsWith: {
|
|
94
|
-
type: "string",
|
|
95
|
-
valueType: ["string"]
|
|
96
|
-
},
|
|
97
|
-
$startsWithi: {
|
|
98
|
-
type: "string",
|
|
99
|
-
valueType: ["string"]
|
|
100
|
-
},
|
|
101
|
-
$in: {
|
|
102
|
-
type: "array",
|
|
103
|
-
valueType: [
|
|
104
|
-
"string",
|
|
105
|
-
"number",
|
|
106
|
-
"date",
|
|
107
|
-
"picklist"
|
|
108
|
-
]
|
|
109
|
-
},
|
|
110
|
-
$notIn: {
|
|
111
|
-
type: "array",
|
|
112
|
-
valueType: [
|
|
113
|
-
"string",
|
|
114
|
-
"number",
|
|
115
|
-
"date",
|
|
116
|
-
"picklist"
|
|
117
|
-
]
|
|
118
|
-
},
|
|
119
|
-
$between: {
|
|
120
|
-
type: "array",
|
|
121
|
-
valueType: [
|
|
122
|
-
"number",
|
|
123
|
-
"date",
|
|
124
|
-
"datetime"
|
|
125
|
-
]
|
|
126
|
-
},
|
|
127
|
-
$notNull: {
|
|
128
|
-
type: "null",
|
|
129
|
-
valueType: ["nullable"]
|
|
130
|
-
},
|
|
131
|
-
$null: {
|
|
132
|
-
type: "null",
|
|
133
|
-
valueType: ["nullable"]
|
|
134
|
-
},
|
|
135
|
-
$and: {
|
|
136
|
-
type: "logical",
|
|
137
|
-
valueType: ["join"]
|
|
138
|
-
},
|
|
139
|
-
$not: {
|
|
140
|
-
type: "logical",
|
|
141
|
-
valueType: ["join"]
|
|
142
|
-
},
|
|
143
|
-
$or: {
|
|
144
|
-
type: "logical",
|
|
145
|
-
valueType: ["join"]
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
//#endregion
|
|
149
|
-
export { BooleanFilter, BooleanFilterValue, DateFilter, DateFilterValue, DateTimeFilter, DateTimeFilterValue, DocumentIdFilter, EmailFilter, ExactStringFilter, IdFilter, IdFilterValue, IntegerFilter, IntegerFilterValue, LongStringFilter, NUMBER_STRING_PATTERN, NumberFilter, NumberFilterValue, STRAPI_FILTER_OPERATORS, SlugFilter, StringFilter, TimeFilter, TimeFilterValue, UrlFilter, createPicklistArrayFilter, createPicklistFilter };
|
|
1
|
+
import { a as STRAPI_FILTER_OPERATORS, c as createStrapiOperatorSchema, d as createStrapiComparisonOperatorEntries, f as createStrapiEqualityOperatorEntries, i as createStrapiMembershipOperatorEntries, l as createStrapiStrictFilterObject, n as createStrapiArrayMembershipOperatorEntries, o as createFilterWithMetadata, p as createStrapiOrderedComparisonOperatorEntries, r as createStrapiBetweenOperatorEntries, s as createStrapiFieldOperatorSchema, t as StrapiNullOperatorEntries, u as createStrapiCaseInsensitiveEqualityOperatorEntries } from "../null-operators-Di2tW3dI.mjs";
|
|
2
|
+
import { _ as TimeFilterValue, a as SlugFilter, c as IntegerFilterValue, d as NumberFilterValue, f as DateFilter, g as TimeFilter, h as DateTimeFilterValue, i as IdFilterValue, l as NUMBER_STRING_PATTERN, m as DateTimeFilter, n as EmailFilter, o as UrlFilter, p as DateFilterValue, r as IdFilter, s as IntegerFilter, t as DocumentIdFilter, u as NumberFilter, v as createStrapiFilterSchema, y as createStrapiLogicalFilterEntries } from "../identifier-Cj5_NcEx.mjs";
|
|
3
|
+
import { n as StringFilter, r as createStrapiStringMatchingOperatorEntries, t as LongStringFilter } from "../string-Cg95IUzI.mjs";
|
|
4
|
+
import { n as BooleanFilterValue, t as BooleanFilter } from "../boolean-CA_mX99H.mjs";
|
|
5
|
+
import { n as createPicklistFilter, t as createPicklistArrayFilter } from "../picklist-CKrOioY-.mjs";
|
|
6
|
+
export { BooleanFilter, BooleanFilterValue, DateFilter, DateFilterValue, DateTimeFilter, DateTimeFilterValue, DocumentIdFilter, EmailFilter, IdFilter, IdFilterValue, IntegerFilter, IntegerFilterValue, LongStringFilter, NUMBER_STRING_PATTERN, NumberFilter, NumberFilterValue, STRAPI_FILTER_OPERATORS, SlugFilter, StrapiNullOperatorEntries, StringFilter, TimeFilter, TimeFilterValue, UrlFilter, createFilterWithMetadata, createPicklistArrayFilter, createPicklistFilter, createStrapiArrayMembershipOperatorEntries, createStrapiBetweenOperatorEntries, createStrapiCaseInsensitiveEqualityOperatorEntries, createStrapiComparisonOperatorEntries, createStrapiEqualityOperatorEntries, createStrapiFieldOperatorSchema, createStrapiFilterSchema, createStrapiLogicalFilterEntries, createStrapiMembershipOperatorEntries, createStrapiOperatorSchema, createStrapiOrderedComparisonOperatorEntries, createStrapiStrictFilterObject, createStrapiStringMatchingOperatorEntries };
|
|
@@ -1,9 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { f as createStrapiEqualityOperatorEntries, i as createStrapiMembershipOperatorEntries, l as createStrapiStrictFilterObject, n as createStrapiArrayMembershipOperatorEntries, o as createFilterWithMetadata, p as createStrapiOrderedComparisonOperatorEntries, s as createStrapiFieldOperatorSchema, t as StrapiNullOperatorEntries, u as createStrapiCaseInsensitiveEqualityOperatorEntries } from "./null-operators-Di2tW3dI.mjs";
|
|
2
2
|
import { o as AssociateOneEntity } from "./relationships-CrME6xzN.mjs";
|
|
3
3
|
import { t as VStringEmail } from "./email-FSLftR8P.mjs";
|
|
4
4
|
import { t as VStringSlug } from "./slug-By9EotXj.mjs";
|
|
5
5
|
import { t as VStringUrl } from "./urls-BP0rQmE5.mjs";
|
|
6
6
|
import * as v from "valibot";
|
|
7
|
+
//#region src/filters/primitives/logical-operators.ts
|
|
8
|
+
const createStrapiLogicalFilterEntries = (filter) => ({
|
|
9
|
+
$and: v.pipe(v.array(filter), v.minLength(1)),
|
|
10
|
+
$not: filter,
|
|
11
|
+
$or: v.pipe(v.array(filter), v.minLength(1))
|
|
12
|
+
});
|
|
13
|
+
const createStrapiFilterSchema = (fieldEntries) => {
|
|
14
|
+
const Filter = v.lazy(() => createStrapiStrictFilterObject({
|
|
15
|
+
...fieldEntries,
|
|
16
|
+
...createStrapiLogicalFilterEntries(Filter)
|
|
17
|
+
}));
|
|
18
|
+
return Filter;
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
7
21
|
//#region src/filters/generics/date-time.ts
|
|
8
22
|
const DATE_PART_PATTERN = /^\d{4}-\d{2}-\d{2}/;
|
|
9
23
|
const TIME_PATTERN = /^\d{2}:\d{2}:\d{2}(?:\.\d{1,3})?$/;
|
|
@@ -17,41 +31,56 @@ const normalizeTimestamp = (input) => {
|
|
|
17
31
|
const DateFilterValue = v.pipe(v.union([v.pipe(v.string(), v.trim(), v.check(isValidDateInput))]), v.transform(normalizeDate));
|
|
18
32
|
const TimeFilterValue = v.pipe(v.union([v.pipe(v.string(), v.trim(), v.regex(TIME_PATTERN))]), v.transform(normalizeTime));
|
|
19
33
|
const DateTimeFilterValue = v.pipe(v.union([v.pipe(v.string(), v.trim(), v.check(isValidTimestampInput))]), v.transform(normalizeTimestamp));
|
|
20
|
-
const DateFilter = createStrapiFieldOperatorSchema({
|
|
34
|
+
const DateFilter = createFilterWithMetadata(createStrapiFieldOperatorSchema({
|
|
21
35
|
...createStrapiEqualityOperatorEntries(DateFilterValue),
|
|
22
36
|
...createStrapiOrderedComparisonOperatorEntries(DateFilterValue),
|
|
23
37
|
...createStrapiMembershipOperatorEntries(DateFilterValue),
|
|
24
38
|
...StrapiNullOperatorEntries
|
|
25
|
-
})
|
|
26
|
-
|
|
39
|
+
}), { value: {
|
|
40
|
+
kind: "comparison",
|
|
41
|
+
input: "date-range"
|
|
42
|
+
} });
|
|
43
|
+
const TimeFilter = createFilterWithMetadata(createStrapiFieldOperatorSchema({
|
|
27
44
|
...createStrapiEqualityOperatorEntries(TimeFilterValue),
|
|
28
45
|
...createStrapiOrderedComparisonOperatorEntries(TimeFilterValue),
|
|
29
46
|
...createStrapiMembershipOperatorEntries(TimeFilterValue),
|
|
30
47
|
...StrapiNullOperatorEntries
|
|
31
|
-
})
|
|
32
|
-
|
|
48
|
+
}), { value: {
|
|
49
|
+
kind: "comparison",
|
|
50
|
+
input: "time-range"
|
|
51
|
+
} });
|
|
52
|
+
const DateTimeFilter = createFilterWithMetadata(createStrapiFieldOperatorSchema({
|
|
33
53
|
...createStrapiEqualityOperatorEntries(DateTimeFilterValue),
|
|
34
54
|
...createStrapiOrderedComparisonOperatorEntries(DateTimeFilterValue),
|
|
35
55
|
...createStrapiMembershipOperatorEntries(DateTimeFilterValue),
|
|
36
56
|
...StrapiNullOperatorEntries
|
|
37
|
-
})
|
|
57
|
+
}), { value: {
|
|
58
|
+
kind: "comparison",
|
|
59
|
+
input: "datetime-range"
|
|
60
|
+
} });
|
|
38
61
|
//#endregion
|
|
39
62
|
//#region src/filters/generics/number.ts
|
|
40
63
|
const NUMBER_STRING_PATTERN = /^-?(?:\d+|\d*\.\d+)$/;
|
|
41
64
|
const NumberFilterValue = v.pipe(v.union([v.number()]), v.finite());
|
|
42
65
|
const IntegerFilterValue = v.pipe(NumberFilterValue, v.integer());
|
|
43
|
-
const NumberFilter = createStrapiFieldOperatorSchema({
|
|
66
|
+
const NumberFilter = createFilterWithMetadata(createStrapiFieldOperatorSchema({
|
|
44
67
|
...createStrapiEqualityOperatorEntries(NumberFilterValue),
|
|
45
68
|
...createStrapiOrderedComparisonOperatorEntries(NumberFilterValue),
|
|
46
69
|
...createStrapiMembershipOperatorEntries(NumberFilterValue),
|
|
47
70
|
...StrapiNullOperatorEntries
|
|
48
|
-
})
|
|
49
|
-
|
|
71
|
+
}), { value: {
|
|
72
|
+
kind: "comparison",
|
|
73
|
+
input: "number-range"
|
|
74
|
+
} });
|
|
75
|
+
const IntegerFilter = createFilterWithMetadata(createStrapiFieldOperatorSchema({
|
|
50
76
|
...createStrapiEqualityOperatorEntries(IntegerFilterValue),
|
|
51
77
|
...createStrapiOrderedComparisonOperatorEntries(IntegerFilterValue),
|
|
52
78
|
...createStrapiMembershipOperatorEntries(IntegerFilterValue),
|
|
53
79
|
...StrapiNullOperatorEntries
|
|
54
|
-
})
|
|
80
|
+
}), { value: {
|
|
81
|
+
kind: "comparison",
|
|
82
|
+
input: "integer-range"
|
|
83
|
+
} });
|
|
55
84
|
//#endregion
|
|
56
85
|
//#region src/filters/generics/identifier.ts
|
|
57
86
|
const IdFilterValue = v.pipe(v.union([v.number(), v.pipe(v.string(), v.trim(), v.regex(NUMBER_STRING_PATTERN))]));
|
|
@@ -64,9 +93,21 @@ const createExactIdentifierFilter = (value) => createStrapiFieldOperatorSchema({
|
|
|
64
93
|
...createStrapiCaseInsensitiveEqualityOperatorEntries(value),
|
|
65
94
|
...createStrapiArrayMembershipOperatorEntries(value)
|
|
66
95
|
});
|
|
67
|
-
const DocumentIdFilter = createExactIdentifierFilter(AssociateOneEntity)
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
96
|
+
const DocumentIdFilter = createFilterWithMetadata(createExactIdentifierFilter(AssociateOneEntity), { value: {
|
|
97
|
+
kind: "comparison",
|
|
98
|
+
input: "text"
|
|
99
|
+
} });
|
|
100
|
+
const SlugFilter = createFilterWithMetadata(createExactIdentifierFilter(VStringSlug()), { value: {
|
|
101
|
+
kind: "comparison",
|
|
102
|
+
input: "text"
|
|
103
|
+
} });
|
|
104
|
+
const EmailFilter = createFilterWithMetadata(createExactIdentifierFilter(VStringEmail()), { value: {
|
|
105
|
+
kind: "comparison",
|
|
106
|
+
input: "email"
|
|
107
|
+
} });
|
|
108
|
+
const UrlFilter = createFilterWithMetadata(createExactIdentifierFilter(VStringUrl()), { value: {
|
|
109
|
+
kind: "comparison",
|
|
110
|
+
input: "url"
|
|
111
|
+
} });
|
|
71
112
|
//#endregion
|
|
72
|
-
export { TimeFilterValue as _, SlugFilter as a, IntegerFilterValue as c, NumberFilterValue as d, DateFilter as f, TimeFilter as g, DateTimeFilterValue as h, IdFilterValue as i, NUMBER_STRING_PATTERN as l, DateTimeFilter as m, EmailFilter as n, UrlFilter as o, DateFilterValue as p, IdFilter as r, IntegerFilter as s, DocumentIdFilter as t, NumberFilter as u };
|
|
113
|
+
export { TimeFilterValue as _, SlugFilter as a, IntegerFilterValue as c, NumberFilterValue as d, DateFilter as f, TimeFilter as g, DateTimeFilterValue as h, IdFilterValue as i, NUMBER_STRING_PATTERN as l, DateTimeFilter as m, EmailFilter as n, UrlFilter as o, DateFilterValue as p, IdFilter as r, IntegerFilter as s, DocumentIdFilter as t, NumberFilter as u, createStrapiFilterSchema as v, createStrapiLogicalFilterEntries as y };
|
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-D6vf50IK.cjs");
|
|
2
|
-
const require_null_operators = require("./null-operators-
|
|
2
|
+
const require_null_operators = require("./null-operators-CTPiNKlc.cjs");
|
|
3
3
|
const require_relationships = require("./relationships-BiOl8YTc.cjs");
|
|
4
4
|
const require_email = require("./email-dsbWKuhH.cjs");
|
|
5
5
|
const require_slug = require("./slug-BcLLMLTX.cjs");
|
|
6
6
|
const require_urls = require("./urls-J0K4TM4q.cjs");
|
|
7
7
|
let valibot = require("valibot");
|
|
8
8
|
valibot = require_chunk.__toESM(valibot, 1);
|
|
9
|
+
//#region src/filters/primitives/logical-operators.ts
|
|
10
|
+
const createStrapiLogicalFilterEntries = (filter) => ({
|
|
11
|
+
$and: valibot.pipe(valibot.array(filter), valibot.minLength(1)),
|
|
12
|
+
$not: filter,
|
|
13
|
+
$or: valibot.pipe(valibot.array(filter), valibot.minLength(1))
|
|
14
|
+
});
|
|
15
|
+
const createStrapiFilterSchema = (fieldEntries) => {
|
|
16
|
+
const Filter = valibot.lazy(() => require_null_operators.createStrapiStrictFilterObject({
|
|
17
|
+
...fieldEntries,
|
|
18
|
+
...createStrapiLogicalFilterEntries(Filter)
|
|
19
|
+
}));
|
|
20
|
+
return Filter;
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
9
23
|
//#region src/filters/generics/date-time.ts
|
|
10
24
|
const DATE_PART_PATTERN = /^\d{4}-\d{2}-\d{2}/;
|
|
11
25
|
const TIME_PATTERN = /^\d{2}:\d{2}:\d{2}(?:\.\d{1,3})?$/;
|
|
@@ -19,41 +33,56 @@ const normalizeTimestamp = (input) => {
|
|
|
19
33
|
const DateFilterValue = valibot.pipe(valibot.union([valibot.pipe(valibot.string(), valibot.trim(), valibot.check(isValidDateInput))]), valibot.transform(normalizeDate));
|
|
20
34
|
const TimeFilterValue = valibot.pipe(valibot.union([valibot.pipe(valibot.string(), valibot.trim(), valibot.regex(TIME_PATTERN))]), valibot.transform(normalizeTime));
|
|
21
35
|
const DateTimeFilterValue = valibot.pipe(valibot.union([valibot.pipe(valibot.string(), valibot.trim(), valibot.check(isValidTimestampInput))]), valibot.transform(normalizeTimestamp));
|
|
22
|
-
const DateFilter = require_null_operators.createStrapiFieldOperatorSchema({
|
|
36
|
+
const DateFilter = require_null_operators.createFilterWithMetadata(require_null_operators.createStrapiFieldOperatorSchema({
|
|
23
37
|
...require_null_operators.createStrapiEqualityOperatorEntries(DateFilterValue),
|
|
24
38
|
...require_null_operators.createStrapiOrderedComparisonOperatorEntries(DateFilterValue),
|
|
25
39
|
...require_null_operators.createStrapiMembershipOperatorEntries(DateFilterValue),
|
|
26
40
|
...require_null_operators.StrapiNullOperatorEntries
|
|
27
|
-
})
|
|
28
|
-
|
|
41
|
+
}), { value: {
|
|
42
|
+
kind: "comparison",
|
|
43
|
+
input: "date-range"
|
|
44
|
+
} });
|
|
45
|
+
const TimeFilter = require_null_operators.createFilterWithMetadata(require_null_operators.createStrapiFieldOperatorSchema({
|
|
29
46
|
...require_null_operators.createStrapiEqualityOperatorEntries(TimeFilterValue),
|
|
30
47
|
...require_null_operators.createStrapiOrderedComparisonOperatorEntries(TimeFilterValue),
|
|
31
48
|
...require_null_operators.createStrapiMembershipOperatorEntries(TimeFilterValue),
|
|
32
49
|
...require_null_operators.StrapiNullOperatorEntries
|
|
33
|
-
})
|
|
34
|
-
|
|
50
|
+
}), { value: {
|
|
51
|
+
kind: "comparison",
|
|
52
|
+
input: "time-range"
|
|
53
|
+
} });
|
|
54
|
+
const DateTimeFilter = require_null_operators.createFilterWithMetadata(require_null_operators.createStrapiFieldOperatorSchema({
|
|
35
55
|
...require_null_operators.createStrapiEqualityOperatorEntries(DateTimeFilterValue),
|
|
36
56
|
...require_null_operators.createStrapiOrderedComparisonOperatorEntries(DateTimeFilterValue),
|
|
37
57
|
...require_null_operators.createStrapiMembershipOperatorEntries(DateTimeFilterValue),
|
|
38
58
|
...require_null_operators.StrapiNullOperatorEntries
|
|
39
|
-
})
|
|
59
|
+
}), { value: {
|
|
60
|
+
kind: "comparison",
|
|
61
|
+
input: "datetime-range"
|
|
62
|
+
} });
|
|
40
63
|
//#endregion
|
|
41
64
|
//#region src/filters/generics/number.ts
|
|
42
65
|
const NUMBER_STRING_PATTERN = /^-?(?:\d+|\d*\.\d+)$/;
|
|
43
66
|
const NumberFilterValue = valibot.pipe(valibot.union([valibot.number()]), valibot.finite());
|
|
44
67
|
const IntegerFilterValue = valibot.pipe(NumberFilterValue, valibot.integer());
|
|
45
|
-
const NumberFilter = require_null_operators.createStrapiFieldOperatorSchema({
|
|
68
|
+
const NumberFilter = require_null_operators.createFilterWithMetadata(require_null_operators.createStrapiFieldOperatorSchema({
|
|
46
69
|
...require_null_operators.createStrapiEqualityOperatorEntries(NumberFilterValue),
|
|
47
70
|
...require_null_operators.createStrapiOrderedComparisonOperatorEntries(NumberFilterValue),
|
|
48
71
|
...require_null_operators.createStrapiMembershipOperatorEntries(NumberFilterValue),
|
|
49
72
|
...require_null_operators.StrapiNullOperatorEntries
|
|
50
|
-
})
|
|
51
|
-
|
|
73
|
+
}), { value: {
|
|
74
|
+
kind: "comparison",
|
|
75
|
+
input: "number-range"
|
|
76
|
+
} });
|
|
77
|
+
const IntegerFilter = require_null_operators.createFilterWithMetadata(require_null_operators.createStrapiFieldOperatorSchema({
|
|
52
78
|
...require_null_operators.createStrapiEqualityOperatorEntries(IntegerFilterValue),
|
|
53
79
|
...require_null_operators.createStrapiOrderedComparisonOperatorEntries(IntegerFilterValue),
|
|
54
80
|
...require_null_operators.createStrapiMembershipOperatorEntries(IntegerFilterValue),
|
|
55
81
|
...require_null_operators.StrapiNullOperatorEntries
|
|
56
|
-
})
|
|
82
|
+
}), { value: {
|
|
83
|
+
kind: "comparison",
|
|
84
|
+
input: "integer-range"
|
|
85
|
+
} });
|
|
57
86
|
//#endregion
|
|
58
87
|
//#region src/filters/generics/identifier.ts
|
|
59
88
|
const IdFilterValue = valibot.pipe(valibot.union([valibot.number(), valibot.pipe(valibot.string(), valibot.trim(), valibot.regex(NUMBER_STRING_PATTERN))]));
|
|
@@ -66,10 +95,22 @@ const createExactIdentifierFilter = (value) => require_null_operators.createStra
|
|
|
66
95
|
...require_null_operators.createStrapiCaseInsensitiveEqualityOperatorEntries(value),
|
|
67
96
|
...require_null_operators.createStrapiArrayMembershipOperatorEntries(value)
|
|
68
97
|
});
|
|
69
|
-
const DocumentIdFilter = createExactIdentifierFilter(require_relationships.AssociateOneEntity)
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
98
|
+
const DocumentIdFilter = require_null_operators.createFilterWithMetadata(createExactIdentifierFilter(require_relationships.AssociateOneEntity), { value: {
|
|
99
|
+
kind: "comparison",
|
|
100
|
+
input: "text"
|
|
101
|
+
} });
|
|
102
|
+
const SlugFilter = require_null_operators.createFilterWithMetadata(createExactIdentifierFilter(require_slug.VStringSlug()), { value: {
|
|
103
|
+
kind: "comparison",
|
|
104
|
+
input: "text"
|
|
105
|
+
} });
|
|
106
|
+
const EmailFilter = require_null_operators.createFilterWithMetadata(createExactIdentifierFilter(require_email.VStringEmail()), { value: {
|
|
107
|
+
kind: "comparison",
|
|
108
|
+
input: "email"
|
|
109
|
+
} });
|
|
110
|
+
const UrlFilter = require_null_operators.createFilterWithMetadata(createExactIdentifierFilter(require_urls.VStringUrl()), { value: {
|
|
111
|
+
kind: "comparison",
|
|
112
|
+
input: "url"
|
|
113
|
+
} });
|
|
73
114
|
//#endregion
|
|
74
115
|
Object.defineProperty(exports, "DateFilter", {
|
|
75
116
|
enumerable: true,
|
|
@@ -173,3 +214,15 @@ Object.defineProperty(exports, "UrlFilter", {
|
|
|
173
214
|
return UrlFilter;
|
|
174
215
|
}
|
|
175
216
|
});
|
|
217
|
+
Object.defineProperty(exports, "createStrapiFilterSchema", {
|
|
218
|
+
enumerable: true,
|
|
219
|
+
get: function() {
|
|
220
|
+
return createStrapiFilterSchema;
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
Object.defineProperty(exports, "createStrapiLogicalFilterEntries", {
|
|
224
|
+
enumerable: true,
|
|
225
|
+
get: function() {
|
|
226
|
+
return createStrapiLogicalFilterEntries;
|
|
227
|
+
}
|
|
228
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|