@getcommunity/gc-validators 0.0.271-alpha.24 → 0.0.271-alpha.26
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 +9 -27
- package/dist/base/index.d.cts +2 -2
- package/dist/base/index.d.mts +4 -4
- package/dist/base/index.mjs +5 -5
- package/dist/components/blocks/index.cjs +5 -4
- package/dist/components/blocks/index.d.cts +1 -1
- package/dist/components/blocks/index.d.mts +1 -1
- package/dist/components/blocks/index.mjs +5 -4
- package/dist/components/brand/index.cjs +3 -2
- package/dist/components/brand/index.d.cts +1 -1
- package/dist/components/brand/index.d.mts +1 -1
- package/dist/components/brand/index.mjs +3 -2
- package/dist/components/forms/index.cjs +2 -1
- package/dist/components/forms/index.d.cts +280 -280
- package/dist/components/forms/index.d.mts +280 -280
- package/dist/components/forms/index.mjs +2 -1
- package/dist/components/shared/index.cjs +5 -4
- package/dist/components/shared/index.d.cts +1 -1
- package/dist/components/shared/index.d.mts +1 -1
- package/dist/components/shared/index.mjs +5 -4
- package/dist/components/slideshow/index.d.cts +280 -280
- package/dist/components/slideshow/index.d.mts +280 -280
- package/dist/components/utm/index.d.mts +1 -1
- package/dist/constants/index.cjs +45 -43
- package/dist/constants/index.d.cts +2 -2
- package/dist/constants/index.d.mts +2 -2
- package/dist/constants/index.mjs +4 -2
- package/dist/{document-TlMeVEGy.d.cts → document-3h6g5Qqr.d.cts} +1 -1
- package/dist/{document-DR6GQUE8.cjs → document-AqtoEbX8.cjs} +18 -23
- package/dist/{document-exUYRsta.mjs → document-BCbxKqGE.mjs} +19 -18
- package/dist/{document-CvbEUabx.mjs → document-BWso8VC7.mjs} +117 -111
- package/dist/{document-CwIvc2p7.cjs → document-DJJFS5o8.cjs} +2 -1
- package/dist/{document-CDavjuJ-.mjs → document-DRyRy2Mw.mjs} +2 -1
- package/dist/{document-CAkRm1Y_.d.mts → document-DqE9ISOk.d.mts} +2 -2
- package/dist/{document-B7c1AF6r.cjs → document-DwkycUz9.cjs} +129 -117
- package/dist/email-ByTEdUjg.cjs +13 -0
- package/dist/email-Cnyi5Neo.mjs +6 -0
- package/dist/entities/audit-log/index.cjs +44 -41
- package/dist/entities/audit-log/index.d.cts +3 -2
- package/dist/entities/audit-log/index.d.mts +4 -3
- package/dist/entities/audit-log/index.mjs +6 -3
- package/dist/entities/blog-page/index.d.cts +1 -1
- package/dist/entities/blog-page/index.d.mts +1 -1
- package/dist/entities/blog-post/index.cjs +10 -9
- package/dist/entities/blog-post/index.d.cts +1 -1
- package/dist/entities/blog-post/index.d.mts +1 -1
- package/dist/entities/blog-post/index.mjs +4 -3
- package/dist/entities/careers-page/index.d.cts +1 -1
- package/dist/entities/careers-page/index.d.mts +1 -1
- package/dist/entities/category/index.cjs +15 -13
- package/dist/entities/category/index.d.cts +7 -6
- package/dist/entities/category/index.d.mts +7 -6
- package/dist/entities/category/index.mjs +11 -9
- package/dist/entities/client/index.cjs +23 -22
- package/dist/entities/client/index.d.cts +1 -1
- package/dist/entities/client/index.d.mts +1 -1
- package/dist/entities/client/index.mjs +16 -15
- package/dist/entities/client-content-pillar/index.cjs +14 -13
- package/dist/entities/client-content-pillar/index.d.cts +1 -1
- package/dist/entities/client-content-pillar/index.d.mts +1 -1
- package/dist/entities/client-content-pillar/index.mjs +12 -11
- package/dist/entities/client-media-platform/index.cjs +18 -16
- package/dist/entities/client-media-platform/index.d.cts +1 -1
- package/dist/entities/client-media-platform/index.d.mts +1 -1
- package/dist/entities/client-media-platform/index.mjs +13 -11
- package/dist/entities/client-project/index.cjs +47 -41
- package/dist/entities/client-project/index.d.cts +1 -1
- package/dist/entities/client-project/index.d.mts +1 -1
- package/dist/entities/client-project/index.mjs +11 -5
- package/dist/entities/client-report/index.cjs +18 -16
- package/dist/entities/client-report/index.d.cts +1 -1
- package/dist/entities/client-report/index.d.mts +1 -1
- package/dist/entities/client-report/index.mjs +14 -12
- package/dist/entities/client-styleguide/index.cjs +14 -13
- package/dist/entities/client-styleguide/index.d.cts +1 -1
- package/dist/entities/client-styleguide/index.d.mts +1 -1
- package/dist/entities/client-styleguide/index.mjs +11 -10
- package/dist/entities/client-user/index.cjs +7 -7
- package/dist/entities/client-user/index.d.cts +1 -1
- package/dist/entities/client-user/index.d.mts +1 -1
- package/dist/entities/client-user/index.mjs +5 -5
- package/dist/entities/comment/index.cjs +18 -16
- package/dist/entities/comment/index.d.cts +1 -1
- package/dist/entities/comment/index.d.mts +1 -1
- package/dist/entities/comment/index.mjs +12 -10
- package/dist/entities/content-pillar/index.cjs +20 -18
- package/dist/entities/content-pillar/index.d.cts +1 -1
- package/dist/entities/content-pillar/index.d.mts +1 -1
- package/dist/entities/content-pillar/index.mjs +15 -13
- package/dist/entities/faq-page/index.cjs +2 -1
- package/dist/entities/faq-page/index.d.cts +2 -2
- package/dist/entities/faq-page/index.d.mts +3 -3
- package/dist/entities/faq-page/index.mjs +2 -1
- package/dist/entities/formatter/index.d.cts +5 -5
- package/dist/entities/formatter/index.d.mts +5 -5
- package/dist/entities/gcflytour/index.cjs +21 -19
- package/dist/entities/gcflytour/index.d.cts +1 -1
- package/dist/entities/gcflytour/index.d.mts +1 -1
- package/dist/entities/gcflytour/index.mjs +17 -15
- package/dist/entities/gcflytour-snap/index.cjs +20 -18
- package/dist/entities/gcflytour-snap/index.d.cts +1 -1
- package/dist/entities/gcflytour-snap/index.d.mts +1 -1
- package/dist/entities/gcflytour-snap/index.mjs +16 -14
- package/dist/entities/landing-page/index.d.cts +2 -2
- package/dist/entities/landing-page/index.d.mts +3 -3
- package/dist/entities/lead/index.cjs +25 -23
- package/dist/entities/lead/index.mjs +15 -13
- package/dist/entities/media-content-type/index.cjs +21 -19
- package/dist/entities/media-content-type/index.d.cts +7 -6
- package/dist/entities/media-content-type/index.d.mts +7 -6
- package/dist/entities/media-content-type/index.mjs +17 -15
- package/dist/entities/media-creative-format/index.cjs +19 -17
- package/dist/entities/media-creative-format/index.d.cts +7 -6
- package/dist/entities/media-creative-format/index.d.mts +7 -6
- package/dist/entities/media-creative-format/index.mjs +15 -13
- package/dist/entities/media-medium/index.cjs +19 -17
- package/dist/entities/media-medium/index.d.cts +7 -6
- package/dist/entities/media-medium/index.d.mts +7 -6
- package/dist/entities/media-medium/index.mjs +15 -13
- package/dist/entities/media-platform/index.cjs +27 -24
- package/dist/entities/media-platform/index.d.cts +1 -1
- package/dist/entities/media-platform/index.d.mts +1 -1
- package/dist/entities/media-platform/index.mjs +23 -20
- package/dist/entities/monday-workspace/index.cjs +17 -15
- package/dist/entities/monday-workspace/index.d.cts +1 -1
- package/dist/entities/monday-workspace/index.d.mts +1 -1
- package/dist/entities/monday-workspace/index.mjs +11 -9
- package/dist/entities/newsletter-signup/index.cjs +25 -23
- package/dist/entities/newsletter-signup/index.mjs +13 -11
- package/dist/entities/policy-page/index.cjs +2 -1
- package/dist/entities/policy-page/index.d.cts +1 -1
- package/dist/entities/policy-page/index.d.mts +2 -2
- package/dist/entities/policy-page/index.mjs +2 -1
- package/dist/entities/product/index.cjs +1 -1
- package/dist/entities/product/index.d.cts +1 -1
- package/dist/entities/product/index.d.mts +1 -1
- package/dist/entities/product/index.mjs +1 -1
- package/dist/entities/product-highlight/index.cjs +1 -1
- package/dist/entities/product-highlight/index.d.cts +1 -1
- package/dist/entities/product-highlight/index.d.mts +1 -1
- package/dist/entities/product-highlight/index.mjs +1 -1
- package/dist/entities/resume/index.cjs +43 -40
- package/dist/entities/resume/index.mjs +16 -13
- package/dist/entities/sharpspring/index.cjs +9 -8
- package/dist/entities/sharpspring/index.mjs +6 -5
- package/dist/entities/tag/index.cjs +15 -13
- package/dist/entities/tag/index.d.cts +6 -5
- package/dist/entities/tag/index.d.mts +7 -6
- package/dist/entities/tag/index.mjs +11 -9
- package/dist/entities/team-member/index.cjs +11 -9
- package/dist/entities/team-member/index.d.cts +2 -2
- package/dist/entities/team-member/index.d.mts +2 -2
- package/dist/entities/team-member/index.mjs +7 -4
- package/dist/entities/team-page/index.d.cts +1 -1
- package/dist/entities/team-page/index.d.mts +1 -1
- package/dist/entities/teamwork/index.cjs +12 -11
- package/dist/entities/teamwork/index.d.mts +1 -1
- package/dist/entities/teamwork/index.mjs +7 -6
- package/dist/entities/trend/index.cjs +2 -2
- package/dist/entities/trend/index.d.cts +1 -1
- package/dist/entities/trend/index.d.mts +1 -1
- package/dist/entities/trend/index.mjs +2 -2
- package/dist/entities/up-auth/index.cjs +18 -15
- package/dist/entities/up-auth/index.d.cts +1 -1
- package/dist/entities/up-auth/index.d.mts +1 -1
- package/dist/entities/up-auth/index.mjs +6 -3
- package/dist/entities/up-permission/index.cjs +1 -1
- package/dist/entities/up-permission/index.d.cts +1 -1
- package/dist/entities/up-permission/index.d.mts +1 -1
- package/dist/entities/up-permission/index.mjs +1 -1
- package/dist/entities/up-role/index.cjs +1 -1
- package/dist/entities/up-role/index.d.cts +1 -1
- package/dist/entities/up-role/index.d.mts +1 -1
- package/dist/entities/up-role/index.mjs +1 -1
- package/dist/entities/up-user/index.cjs +2 -1
- package/dist/entities/up-user/index.d.cts +2 -2
- package/dist/entities/up-user/index.d.mts +2 -2
- package/dist/entities/up-user/index.mjs +2 -2
- package/dist/entities/upload/index.cjs +11 -11
- package/dist/entities/upload/index.mjs +7 -7
- package/dist/entities/url-redirect/index.cjs +5 -4
- package/dist/entities/url-redirect/index.d.cts +3 -2
- package/dist/entities/url-redirect/index.d.mts +3 -2
- package/dist/entities/url-redirect/index.mjs +4 -3
- package/dist/entities/user-account/index.cjs +10 -11
- package/dist/entities/user-account/index.d.cts +2 -2
- package/dist/entities/user-account/index.d.mts +2 -2
- package/dist/entities/user-account/index.mjs +10 -11
- package/dist/entities/utm-link-builder/index.cjs +30 -36
- package/dist/entities/utm-link-builder/index.d.cts +6 -6
- package/dist/entities/utm-link-builder/index.d.mts +6 -6
- package/dist/entities/utm-link-builder/index.mjs +22 -28
- package/dist/entities/utm-tracking-link/index.cjs +110 -104
- package/dist/entities/utm-tracking-link/index.d.cts +2 -2
- package/dist/entities/utm-tracking-link/index.d.mts +2 -2
- package/dist/entities/utm-tracking-link/index.mjs +68 -68
- package/dist/error-messages-9ZhRqNGW.mjs +10 -0
- package/dist/error-messages-C0I1kOur.cjs +51 -0
- package/dist/index-BOxQLeAK.d.cts +317 -0
- package/dist/index-BSYaAtme.d.mts +486 -0
- package/dist/index-BT8Pa9XY.d.mts +317 -0
- package/dist/index-Bd8ZGWzA.d.mts +944 -0
- package/dist/{index-DXo7B4ng.d.mts → index-Bjjp-2Sa.d.mts} +20 -99
- package/dist/{index-D3KnOYr7.d.mts → index-C9Hbvjc8.d.mts} +4 -3
- package/dist/index-COpLbpQC.d.cts +486 -0
- package/dist/{index-BvNVm4x7.d.cts → index-CTc84rze.d.cts} +91 -76
- package/dist/index-D5VpzV4T.d.cts +944 -0
- package/dist/{index-B_L_83Q2.d.cts → index-D7QXaSOY.d.cts} +19 -98
- package/dist/index-DG_Lwaa7.d.cts +1324 -0
- package/dist/{index-D_YPjLxv.d.cts → index-Dm8G_OXX.d.cts} +4 -3
- package/dist/{index-DfIDrcFz.d.mts → index-DpOKOSqT.d.mts} +94 -79
- package/dist/index-Dvu63a8_.d.mts +1324 -0
- package/dist/limits-CKGuEuKA.mjs +37 -0
- package/dist/{regex-Cl5goNwp.cjs → limits-CW6iJ7kB.cjs} +0 -102
- package/dist/number-Bt4nZKCU.cjs +19 -0
- package/dist/number-OMFRufFt.mjs +6 -0
- package/dist/pagination-D5l_UjyM.mjs +7 -0
- package/dist/pagination-DWZDPzR4.cjs +20 -0
- package/dist/permissions/index.cjs +2 -2
- package/dist/permissions/index.d.cts +1 -1
- package/dist/permissions/index.d.mts +1 -1
- package/dist/permissions/index.mjs +2 -2
- package/dist/phone-C9TNVDm_.mjs +8 -0
- package/dist/phone-D_ZLG1Qv.cjs +21 -0
- package/dist/{query-CuUCmubx.mjs → query-BR5Ze6T2.mjs} +7 -11
- package/dist/{query-Cz8yY3Dq.cjs → query-qQ_HLlxx.cjs} +13 -29
- package/dist/regex-BEFTMiHO.cjs +51 -0
- package/dist/regex-pSdcbWzV.mjs +10 -0
- package/dist/relation-Bd-xUcj8.cjs +33 -0
- package/dist/relation-DMhLjp7K.mjs +8 -0
- package/dist/{relationships-SzSI7Ln9.cjs → relationships-DjHwYd4r.cjs} +23 -9
- package/dist/{relationships-IcOcZWI-.mjs → relationships-yPO5SILR.mjs} +7 -5
- package/dist/slug-BUtm1t-B.mjs +7 -0
- package/dist/slug-cWXTZEIT.cjs +14 -0
- package/dist/sort-CI87SH1y.cjs +33 -0
- package/dist/sort-D3WwshqQ.mjs +14 -0
- package/dist/{strapi-C7xCz8i2.mjs → strapi-B2cNPAao.mjs} +1 -1
- package/dist/{strapi-D3y3Nx_M.mjs → strapi-CE9bz7Kc.mjs} +2 -2
- package/dist/{strapi-CmJNl690.cjs → strapi-D8C1C0D7.cjs} +2 -2
- package/dist/{strapi-C3g4Q1Dv.cjs → strapi-RlhF30B7.cjs} +1 -1
- package/dist/string-BHHnD2Qu.mjs +42 -0
- package/dist/string-Yn-6xiAZ.cjs +97 -0
- package/dist/urls-UOvhCu0z.mjs +14 -0
- package/dist/urls-og5upHgL.cjs +27 -0
- package/dist/utilities/index.cjs +1 -1
- package/dist/utilities/index.d.cts +6 -6
- package/dist/utilities/index.d.mts +6 -6
- package/dist/utilities/index.mjs +1 -1
- package/dist/utm-BqkYlpua.cjs +47 -0
- package/dist/utm-ZUwmBoR2.mjs +28 -0
- package/dist/validators/index.cjs +36 -0
- package/dist/validators/index.d.cts +94 -0
- package/dist/validators/index.d.mts +94 -0
- package/dist/validators/index.mjs +10 -0
- package/package.json +11 -1
- package/dist/index-B3VtiObV.d.mts +0 -317
- package/dist/index-B5HBNPsF.d.cts +0 -945
- package/dist/index-B8kMariL.d.mts +0 -945
- package/dist/index-BxEBUjx2.d.mts +0 -486
- package/dist/index-CQP_vcmO.d.cts +0 -317
- package/dist/index-CRoWUxGV.d.cts +0 -1324
- package/dist/index-auU0DaW5.d.cts +0 -486
- package/dist/index-oCLNrzIj.d.mts +0 -1324
- package/dist/regex-BnKGcdS4.mjs +0 -55
- package/dist/validators-Bc9Is5Sr.cjs +0 -222
- package/dist/validators-P5E_3qzc.mjs +0 -95
- /package/dist/{abac-DPd9oLKR.mjs → abac-BPxkvVVy.mjs} +0 -0
- /package/dist/{abac-BeKQtxIF.cjs → abac-YYI2Ckwv.cjs} +0 -0
- /package/dist/{constants-Htf-MeCA.mjs → constants-C4cy6LoY.mjs} +0 -0
- /package/dist/{constants-f1GP2eiq.cjs → constants-D6DsS_A0.cjs} +0 -0
- /package/dist/{document-DaICHS9G.cjs → document-B4FY2KXQ.cjs} +0 -0
- /package/dist/{document-c3GNPelp.mjs → document-De-prPhc.mjs} +0 -0
- /package/dist/{document-CbE38CzE.d.mts → document-DxjJgk8X.d.mts} +0 -0
- /package/dist/{index-DLICmJ_-.d.mts → index-BSEaV9wd.d.mts} +0 -0
- /package/dist/{json-BrVkpLbC.d.mts → json--oetJLQY.d.mts} +0 -0
- /package/dist/{media-upload-DKeA1eD-.d.mts → media-upload-DBG7YyU4.d.mts} +0 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
//#region src/constants/limits.ts
|
|
2
|
+
const LIMIT_MIN_VALUE = 1;
|
|
3
|
+
const LIMIT_SHORT_STRING_MAX_LENGTH = 255;
|
|
4
|
+
const LIMIT_MEDIUM_STRING_MAX_LENGTH = 500;
|
|
5
|
+
const LIMIT_LONG_STRING_MAX_LENGTH = 5e3;
|
|
6
|
+
const LIMIT_VAL_10 = 10;
|
|
7
|
+
const LIMIT_VAL_20 = 20;
|
|
8
|
+
const LIMIT_VAL_32 = 32;
|
|
9
|
+
const LIMIT_VAL_64 = 64;
|
|
10
|
+
const LIMIT_VAL_100 = 100;
|
|
11
|
+
const LIMIT_VAL_255 = 255;
|
|
12
|
+
const LIMIT_MIN_USERNAME = 3;
|
|
13
|
+
const LIMIT_MAX_USERNAME = 255;
|
|
14
|
+
const LIMIT_MIN_EMAIL = 5;
|
|
15
|
+
const LIMIT_MAX_EMAIL = 255;
|
|
16
|
+
const LIMIT_MIN_PASSWORD = 8;
|
|
17
|
+
const LIMIT_MAX_PASSWORD = 255;
|
|
18
|
+
const LIMIT_MIN_PHONE = 7;
|
|
19
|
+
const LIMIT_MAX_PHONE = 24;
|
|
20
|
+
const LIMIT_MIN_DESTINATION = 10;
|
|
21
|
+
const LIMIT_MAX_DESTINATION = 2048;
|
|
22
|
+
const LIMIT_MIN_UTM_SOURCE = 1;
|
|
23
|
+
const LIMIT_MAX_UTM_SOURCE = 2026;
|
|
24
|
+
const LIMIT_MIN_UTM_MEDIUM = 1;
|
|
25
|
+
const LIMIT_MAX_UTM_MEDIUM = 2026;
|
|
26
|
+
const LIMIT_MIN_UTM_CAMPAIGN = 1;
|
|
27
|
+
const LIMIT_MAX_UTM_CAMPAIGN = 2024;
|
|
28
|
+
const LIMIT_MIN_UTM_CREATIVE_FORMAT = 1;
|
|
29
|
+
const LIMIT_MAX_UTM_CREATIVE_FORMAT = 2017;
|
|
30
|
+
const LIMIT_MIN_UTM_CONTENT = 1;
|
|
31
|
+
const LIMIT_MAX_UTM_CONTENT = 2025;
|
|
32
|
+
const LIMIT_MIN_UTM_TERM = 1;
|
|
33
|
+
const LIMIT_MAX_UTM_TERM = 2028;
|
|
34
|
+
const LIMIT_MIN_UTM_ID = 1;
|
|
35
|
+
const LIMIT_MAX_UTM_ID = 2030;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { LIMIT_VAL_100 as A, LIMIT_MIN_UTM_ID as C, LIMIT_MIN_VALUE as D, LIMIT_MIN_UTM_TERM as E, LIMIT_VAL_255 as M, LIMIT_VAL_32 as N, LIMIT_SHORT_STRING_MAX_LENGTH as O, LIMIT_VAL_64 as P, LIMIT_MIN_UTM_CREATIVE_FORMAT as S, LIMIT_MIN_UTM_SOURCE as T, LIMIT_MIN_PASSWORD as _, LIMIT_MAX_PHONE as a, LIMIT_MIN_UTM_CAMPAIGN as b, LIMIT_MAX_UTM_CONTENT as c, LIMIT_MAX_UTM_MEDIUM as d, LIMIT_MAX_UTM_SOURCE as f, LIMIT_MIN_EMAIL as g, LIMIT_MIN_DESTINATION as h, LIMIT_MAX_PASSWORD as i, LIMIT_VAL_20 as j, LIMIT_VAL_10 as k, LIMIT_MAX_UTM_CREATIVE_FORMAT as l, LIMIT_MEDIUM_STRING_MAX_LENGTH as m, LIMIT_MAX_DESTINATION as n, LIMIT_MAX_USERNAME as o, LIMIT_MAX_UTM_TERM as p, LIMIT_MAX_EMAIL as r, LIMIT_MAX_UTM_CAMPAIGN as s, LIMIT_LONG_STRING_MAX_LENGTH as t, LIMIT_MAX_UTM_ID as u, LIMIT_MIN_PHONE as v, LIMIT_MIN_UTM_MEDIUM as w, LIMIT_MIN_UTM_CONTENT as x, LIMIT_MIN_USERNAME as y };
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
//#region src/constants/error-messages.ts
|
|
2
|
-
const ERROR_MESSAGE_ROBOT = "It appears you are a robot, please try again.";
|
|
3
|
-
const ERROR_MESSAGE_COMMA_SEPPARATED_URLS = `Please enter a list of URLs separated by commas.`;
|
|
4
|
-
const ERROR_MESSAGE_INVALID_URL = `Please enter a valid URL.`;
|
|
5
|
-
const ERROR_MESSAGE_UTM_URL = `Please enter a valid URL with UTM parameters.`;
|
|
6
|
-
const ERROR_MESSAGE_URL_NO_QUERY_PARAMS = `Please remove any query parameters from the URL.`;
|
|
7
|
-
const ERROR_MESSAGE_ONE_PROJECT_STATUS = `You can only select one project status.`;
|
|
8
|
-
const ERROR_MESSAGE_URL_PREFIX = `Please enter a valid URL starting with http or https.`;
|
|
9
|
-
//#endregion
|
|
10
1
|
//#region src/constants/limits.ts
|
|
11
2
|
const LIMIT_MIN_VALUE = 1;
|
|
12
3
|
const LIMIT_SHORT_STRING_MAX_LENGTH = 255;
|
|
@@ -43,75 +34,6 @@ const LIMIT_MAX_UTM_TERM = 2028;
|
|
|
43
34
|
const LIMIT_MIN_UTM_ID = 1;
|
|
44
35
|
const LIMIT_MAX_UTM_ID = 2030;
|
|
45
36
|
//#endregion
|
|
46
|
-
//#region src/constants/regex.ts
|
|
47
|
-
const ERROR_MESSAGE_REGEX_UTM_VALUE = "can only contain letters, numbers, and the special characters: - _ .";
|
|
48
|
-
const REGEX_UTM_VALUE = /^([a-zA-Z0-9._-]+)?$/;
|
|
49
|
-
const REGEX_BRAND_COLOR_SLUG = /^([a-zA-Z0-9_-]+)?$/;
|
|
50
|
-
const ERROR_MESSAGE_REGEX_PHONE = "Please provide a valid phone number.";
|
|
51
|
-
const REGEX_NANP_PHONE = /^(?:\+?1[\s.-]?)?(?:\(?([2-9]\d{2})\)?[\s.-]?)(?:([2-9](?!11)\d{2}))[\s.-]?(\d{4})(?:\s*(?:#|x|ext\.?|extension)\s*\d+)?$/i;
|
|
52
|
-
const ERROR_MESSAGE_REGEX_URL_SLUG = `can only contain letters, numbers, and the special characters: - _ .`;
|
|
53
|
-
const REGEX_URL_SLUG = /^([a-zA-Z0-9._-]+)?$/;
|
|
54
|
-
//#endregion
|
|
55
|
-
Object.defineProperty(exports, "ERROR_MESSAGE_COMMA_SEPPARATED_URLS", {
|
|
56
|
-
enumerable: true,
|
|
57
|
-
get: function() {
|
|
58
|
-
return ERROR_MESSAGE_COMMA_SEPPARATED_URLS;
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
Object.defineProperty(exports, "ERROR_MESSAGE_INVALID_URL", {
|
|
62
|
-
enumerable: true,
|
|
63
|
-
get: function() {
|
|
64
|
-
return ERROR_MESSAGE_INVALID_URL;
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
Object.defineProperty(exports, "ERROR_MESSAGE_ONE_PROJECT_STATUS", {
|
|
68
|
-
enumerable: true,
|
|
69
|
-
get: function() {
|
|
70
|
-
return ERROR_MESSAGE_ONE_PROJECT_STATUS;
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
Object.defineProperty(exports, "ERROR_MESSAGE_REGEX_PHONE", {
|
|
74
|
-
enumerable: true,
|
|
75
|
-
get: function() {
|
|
76
|
-
return ERROR_MESSAGE_REGEX_PHONE;
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
Object.defineProperty(exports, "ERROR_MESSAGE_REGEX_URL_SLUG", {
|
|
80
|
-
enumerable: true,
|
|
81
|
-
get: function() {
|
|
82
|
-
return ERROR_MESSAGE_REGEX_URL_SLUG;
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
Object.defineProperty(exports, "ERROR_MESSAGE_REGEX_UTM_VALUE", {
|
|
86
|
-
enumerable: true,
|
|
87
|
-
get: function() {
|
|
88
|
-
return ERROR_MESSAGE_REGEX_UTM_VALUE;
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
Object.defineProperty(exports, "ERROR_MESSAGE_ROBOT", {
|
|
92
|
-
enumerable: true,
|
|
93
|
-
get: function() {
|
|
94
|
-
return ERROR_MESSAGE_ROBOT;
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
Object.defineProperty(exports, "ERROR_MESSAGE_URL_NO_QUERY_PARAMS", {
|
|
98
|
-
enumerable: true,
|
|
99
|
-
get: function() {
|
|
100
|
-
return ERROR_MESSAGE_URL_NO_QUERY_PARAMS;
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
Object.defineProperty(exports, "ERROR_MESSAGE_URL_PREFIX", {
|
|
104
|
-
enumerable: true,
|
|
105
|
-
get: function() {
|
|
106
|
-
return ERROR_MESSAGE_URL_PREFIX;
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
Object.defineProperty(exports, "ERROR_MESSAGE_UTM_URL", {
|
|
110
|
-
enumerable: true,
|
|
111
|
-
get: function() {
|
|
112
|
-
return ERROR_MESSAGE_UTM_URL;
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
37
|
Object.defineProperty(exports, "LIMIT_LONG_STRING_MAX_LENGTH", {
|
|
116
38
|
enumerable: true,
|
|
117
39
|
get: function() {
|
|
@@ -316,27 +238,3 @@ Object.defineProperty(exports, "LIMIT_VAL_64", {
|
|
|
316
238
|
return LIMIT_VAL_64;
|
|
317
239
|
}
|
|
318
240
|
});
|
|
319
|
-
Object.defineProperty(exports, "REGEX_BRAND_COLOR_SLUG", {
|
|
320
|
-
enumerable: true,
|
|
321
|
-
get: function() {
|
|
322
|
-
return REGEX_BRAND_COLOR_SLUG;
|
|
323
|
-
}
|
|
324
|
-
});
|
|
325
|
-
Object.defineProperty(exports, "REGEX_NANP_PHONE", {
|
|
326
|
-
enumerable: true,
|
|
327
|
-
get: function() {
|
|
328
|
-
return REGEX_NANP_PHONE;
|
|
329
|
-
}
|
|
330
|
-
});
|
|
331
|
-
Object.defineProperty(exports, "REGEX_URL_SLUG", {
|
|
332
|
-
enumerable: true,
|
|
333
|
-
get: function() {
|
|
334
|
-
return REGEX_URL_SLUG;
|
|
335
|
-
}
|
|
336
|
-
});
|
|
337
|
-
Object.defineProperty(exports, "REGEX_UTM_VALUE", {
|
|
338
|
-
enumerable: true,
|
|
339
|
-
get: function() {
|
|
340
|
-
return REGEX_UTM_VALUE;
|
|
341
|
-
}
|
|
342
|
-
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const require_chunk = require("./chunk-CKQMccvm.cjs");
|
|
2
|
+
let valibot = require("valibot");
|
|
3
|
+
valibot = require_chunk.__toESM(valibot, 1);
|
|
4
|
+
//#region src/validators/number.ts
|
|
5
|
+
const VNumberNullable = () => valibot.optional(valibot.nullable(valibot.number()));
|
|
6
|
+
const VIntegerNullable = () => valibot.optional(valibot.nullable(valibot.pipe(valibot.number(), valibot.integer())));
|
|
7
|
+
//#endregion
|
|
8
|
+
Object.defineProperty(exports, "VIntegerNullable", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function() {
|
|
11
|
+
return VIntegerNullable;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(exports, "VNumberNullable", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function() {
|
|
17
|
+
return VNumberNullable;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as v from "valibot";
|
|
2
|
+
//#region src/validators/number.ts
|
|
3
|
+
const VNumberNullable = () => v.optional(v.nullable(v.number()));
|
|
4
|
+
const VIntegerNullable = () => v.optional(v.nullable(v.pipe(v.number(), v.integer())));
|
|
5
|
+
//#endregion
|
|
6
|
+
export { VNumberNullable as n, VIntegerNullable as t };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "./limits-CKGuEuKA.mjs";
|
|
2
|
+
import * as v from "valibot";
|
|
3
|
+
//#region src/validators/pagination.ts
|
|
4
|
+
const VPage = () => v.optional(v.pipe(v.number(), v.minValue(1)));
|
|
5
|
+
const VSize = (maxSize) => v.optional(v.pipe(v.number(), v.minValue(1), v.maxValue(maxSize)));
|
|
6
|
+
//#endregion
|
|
7
|
+
export { VSize as n, VPage as t };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const require_chunk = require("./chunk-CKQMccvm.cjs");
|
|
2
|
+
require("./limits-CW6iJ7kB.cjs");
|
|
3
|
+
let valibot = require("valibot");
|
|
4
|
+
valibot = require_chunk.__toESM(valibot, 1);
|
|
5
|
+
//#region src/validators/pagination.ts
|
|
6
|
+
const VPage = () => valibot.optional(valibot.pipe(valibot.number(), valibot.minValue(1)));
|
|
7
|
+
const VSize = (maxSize) => valibot.optional(valibot.pipe(valibot.number(), valibot.minValue(1), valibot.maxValue(maxSize)));
|
|
8
|
+
//#endregion
|
|
9
|
+
Object.defineProperty(exports, "VPage", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function() {
|
|
12
|
+
return VPage;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "VSize", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function() {
|
|
18
|
+
return VSize;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_abac = require("../abac-
|
|
3
|
-
const require_constants = require("../constants-
|
|
2
|
+
const require_abac = require("../abac-YYI2Ckwv.cjs");
|
|
3
|
+
const require_constants = require("../constants-D6DsS_A0.cjs");
|
|
4
4
|
exports.CLIENT_ENTITY_KEYS = require_constants.CLIENT_ENTITY_KEYS;
|
|
5
5
|
exports.CLIENT_ENTITY_PERMISSIONS = require_constants.CLIENT_ENTITY_PERMISSIONS;
|
|
6
6
|
exports.CLIENT_ENTITY_SCOPES = require_constants.CLIENT_ENTITY_SCOPES;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { An as ClientEntityScope, Dn as CLIENT_ENTITY_SCOPES, En as CLIENT_ENTITY_PERMISSIONS, On as ClientEntityActions, Tn as CLIENT_ENTITY_KEYS, d as Permissions, f as PermissionsAction, h as ROLE_PERMISSIONS, kn as ClientEntityKey, m as RolesWithPermissions, p as PermissionsEntity, u as LCRUDActions } from "../index-CTc84rze.cjs";
|
|
2
2
|
export { CLIENT_ENTITY_KEYS, CLIENT_ENTITY_PERMISSIONS, CLIENT_ENTITY_SCOPES, ClientEntityActions, ClientEntityKey, ClientEntityScope, LCRUDActions, Permissions, PermissionsAction, PermissionsEntity, ROLE_PERMISSIONS, RolesWithPermissions };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { An as ClientEntityScope, Dn as CLIENT_ENTITY_SCOPES, En as CLIENT_ENTITY_PERMISSIONS, On as ClientEntityActions, Tn as CLIENT_ENTITY_KEYS, d as Permissions, f as PermissionsAction, h as ROLE_PERMISSIONS, kn as ClientEntityKey, m as RolesWithPermissions, p as PermissionsEntity, u as LCRUDActions } from "../index-DpOKOSqT.mjs";
|
|
2
2
|
export { CLIENT_ENTITY_KEYS, CLIENT_ENTITY_PERMISSIONS, CLIENT_ENTITY_SCOPES, ClientEntityActions, ClientEntityKey, ClientEntityScope, LCRUDActions, Permissions, PermissionsAction, PermissionsEntity, ROLE_PERMISSIONS, RolesWithPermissions };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as ROLE_PERMISSIONS } from "../abac-
|
|
2
|
-
import { n as CLIENT_ENTITY_PERMISSIONS, r as CLIENT_ENTITY_SCOPES, t as CLIENT_ENTITY_KEYS } from "../constants-
|
|
1
|
+
import { t as ROLE_PERMISSIONS } from "../abac-BPxkvVVy.mjs";
|
|
2
|
+
import { n as CLIENT_ENTITY_PERMISSIONS, r as CLIENT_ENTITY_SCOPES, t as CLIENT_ENTITY_KEYS } from "../constants-C4cy6LoY.mjs";
|
|
3
3
|
export { CLIENT_ENTITY_KEYS, CLIENT_ENTITY_PERMISSIONS, CLIENT_ENTITY_SCOPES, ROLE_PERMISSIONS };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "./limits-CKGuEuKA.mjs";
|
|
2
|
+
import { a as REGEX_NANP_PHONE, t as ERROR_MESSAGE_REGEX_PHONE } from "./regex-pSdcbWzV.mjs";
|
|
3
|
+
import * as v from "valibot";
|
|
4
|
+
//#region src/validators/phone.ts
|
|
5
|
+
const VStringPhone = () => v.pipe(v.string(), v.trim(), v.minLength(7), v.maxLength(24), v.regex(REGEX_NANP_PHONE, ERROR_MESSAGE_REGEX_PHONE));
|
|
6
|
+
const VStringPhoneNullable = () => v.optional(v.nullable(VStringPhone()));
|
|
7
|
+
//#endregion
|
|
8
|
+
export { VStringPhoneNullable as n, VStringPhone as t };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const require_chunk = require("./chunk-CKQMccvm.cjs");
|
|
2
|
+
require("./limits-CW6iJ7kB.cjs");
|
|
3
|
+
const require_regex = require("./regex-BEFTMiHO.cjs");
|
|
4
|
+
let valibot = require("valibot");
|
|
5
|
+
valibot = require_chunk.__toESM(valibot, 1);
|
|
6
|
+
//#region src/validators/phone.ts
|
|
7
|
+
const VStringPhone = () => valibot.pipe(valibot.string(), valibot.trim(), valibot.minLength(7), valibot.maxLength(24), valibot.regex(require_regex.REGEX_NANP_PHONE, require_regex.ERROR_MESSAGE_REGEX_PHONE));
|
|
8
|
+
const VStringPhoneNullable = () => valibot.optional(valibot.nullable(VStringPhone()));
|
|
9
|
+
//#endregion
|
|
10
|
+
Object.defineProperty(exports, "VStringPhone", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function() {
|
|
13
|
+
return VStringPhone;
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "VStringPhoneNullable", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function() {
|
|
19
|
+
return VStringPhoneNullable;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import { n as LIMIT_PAGINATION_MAX_SIZE } from "./pagination-owwfYJS6.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { n as VSize, t as VPage } from "./pagination-D5l_UjyM.mjs";
|
|
3
|
+
import { n as QuerySortEntities } from "./sort-D3WwshqQ.mjs";
|
|
4
|
+
import { t as VStringEmail } from "./email-Cnyi5Neo.mjs";
|
|
5
|
+
import { t as VStringPhone } from "./phone-C9TNVDm_.mjs";
|
|
6
|
+
import { s as VStringShort } from "./string-BHHnD2Qu.mjs";
|
|
7
|
+
import { o as SAssociateOneEntity } from "./relationships-yPO5SILR.mjs";
|
|
4
8
|
import * as v from "valibot";
|
|
5
|
-
//#region src/base/sort.ts
|
|
6
|
-
const ENTITY_SORT_KEYS = [
|
|
7
|
-
"id",
|
|
8
|
-
"createdAt",
|
|
9
|
-
"updatedAt"
|
|
10
|
-
];
|
|
11
|
-
const QuerySortEntities = v.optional(v.pipe(v.array(v.picklist(ENTITY_SORT_KEYS.flatMap((k) => [`${k}:ASC`, `${k}:DESC`]))), v.maxLength(ENTITY_SORT_KEYS.length)));
|
|
12
|
-
//#endregion
|
|
13
9
|
//#region src/base/pagination.ts
|
|
14
10
|
const QueryStrapiPaginated = v.object({
|
|
15
11
|
page: VPage(),
|
|
@@ -37,4 +33,4 @@ const QueryStrapiByName = v.object({
|
|
|
37
33
|
...QueryStrapiPaginated.entries
|
|
38
34
|
});
|
|
39
35
|
//#endregion
|
|
40
|
-
export { QueryStrapiByPhone as a,
|
|
36
|
+
export { QueryStrapiByPhone as a, QueryStrapiByName as i, QueryStrapiByEmail as n, QueryStrapiBySlug as o, QueryStrapiById as r, QueryStrapiPaginated as s, QueryStrapiByDocumentId as t };
|
|
@@ -1,56 +1,40 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-CKQMccvm.cjs");
|
|
2
2
|
const require_pagination = require("./pagination-4pZafglS.cjs");
|
|
3
|
-
const
|
|
4
|
-
const
|
|
3
|
+
const require_pagination$1 = require("./pagination-DWZDPzR4.cjs");
|
|
4
|
+
const require_sort = require("./sort-CI87SH1y.cjs");
|
|
5
|
+
const require_email = require("./email-ByTEdUjg.cjs");
|
|
6
|
+
const require_phone = require("./phone-D_ZLG1Qv.cjs");
|
|
7
|
+
const require_string = require("./string-Yn-6xiAZ.cjs");
|
|
8
|
+
const require_relationships = require("./relationships-DjHwYd4r.cjs");
|
|
5
9
|
let valibot = require("valibot");
|
|
6
10
|
valibot = require_chunk.__toESM(valibot, 1);
|
|
7
|
-
//#region src/base/sort.ts
|
|
8
|
-
const ENTITY_SORT_KEYS = [
|
|
9
|
-
"id",
|
|
10
|
-
"createdAt",
|
|
11
|
-
"updatedAt"
|
|
12
|
-
];
|
|
13
|
-
const QuerySortEntities = valibot.optional(valibot.pipe(valibot.array(valibot.picklist(ENTITY_SORT_KEYS.flatMap((k) => [`${k}:ASC`, `${k}:DESC`]))), valibot.maxLength(ENTITY_SORT_KEYS.length)));
|
|
14
|
-
//#endregion
|
|
15
11
|
//#region src/base/pagination.ts
|
|
16
12
|
const QueryStrapiPaginated = valibot.object({
|
|
17
|
-
page:
|
|
18
|
-
size:
|
|
19
|
-
sort: QuerySortEntities
|
|
13
|
+
page: require_pagination$1.VPage(),
|
|
14
|
+
size: require_pagination$1.VSize(require_pagination.LIMIT_PAGINATION_MAX_SIZE),
|
|
15
|
+
sort: require_sort.QuerySortEntities
|
|
20
16
|
});
|
|
21
17
|
//#endregion
|
|
22
18
|
//#region src/base/query.ts
|
|
23
19
|
const QueryStrapiById = valibot.object({ id: valibot.number() });
|
|
24
20
|
const QueryStrapiByDocumentId = valibot.object({ documentId: require_relationships.SAssociateOneEntity });
|
|
25
21
|
const QueryStrapiBySlug = valibot.object({
|
|
26
|
-
slug:
|
|
22
|
+
slug: require_string.VStringShort(),
|
|
27
23
|
...QueryStrapiPaginated.entries
|
|
28
24
|
});
|
|
29
25
|
const QueryStrapiByEmail = valibot.object({
|
|
30
|
-
email:
|
|
26
|
+
email: require_email.VStringEmail(),
|
|
31
27
|
...QueryStrapiPaginated.entries
|
|
32
28
|
});
|
|
33
29
|
const QueryStrapiByPhone = valibot.object({
|
|
34
|
-
phone:
|
|
30
|
+
phone: require_phone.VStringPhone(),
|
|
35
31
|
...QueryStrapiPaginated.entries
|
|
36
32
|
});
|
|
37
33
|
const QueryStrapiByName = valibot.object({
|
|
38
|
-
name:
|
|
34
|
+
name: require_string.VStringShort(),
|
|
39
35
|
...QueryStrapiPaginated.entries
|
|
40
36
|
});
|
|
41
37
|
//#endregion
|
|
42
|
-
Object.defineProperty(exports, "ENTITY_SORT_KEYS", {
|
|
43
|
-
enumerable: true,
|
|
44
|
-
get: function() {
|
|
45
|
-
return ENTITY_SORT_KEYS;
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
Object.defineProperty(exports, "QuerySortEntities", {
|
|
49
|
-
enumerable: true,
|
|
50
|
-
get: function() {
|
|
51
|
-
return QuerySortEntities;
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
38
|
Object.defineProperty(exports, "QueryStrapiByDocumentId", {
|
|
55
39
|
enumerable: true,
|
|
56
40
|
get: function() {
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
//#region src/constants/regex.ts
|
|
2
|
+
const ERROR_MESSAGE_REGEX_UTM_VALUE = "can only contain letters, numbers, and the special characters: - _ .";
|
|
3
|
+
const REGEX_UTM_VALUE = /^([a-zA-Z0-9._-]+)?$/;
|
|
4
|
+
const REGEX_BRAND_COLOR_SLUG = /^([a-zA-Z0-9_-]+)?$/;
|
|
5
|
+
const ERROR_MESSAGE_REGEX_PHONE = "Please provide a valid phone number.";
|
|
6
|
+
const REGEX_NANP_PHONE = /^(?:\+?1[\s.-]?)?(?:\(?([2-9]\d{2})\)?[\s.-]?)(?:([2-9](?!11)\d{2}))[\s.-]?(\d{4})(?:\s*(?:#|x|ext\.?|extension)\s*\d+)?$/i;
|
|
7
|
+
const ERROR_MESSAGE_REGEX_URL_SLUG = `can only contain letters, numbers, and the special characters: - _ .`;
|
|
8
|
+
const REGEX_URL_SLUG = /^([a-zA-Z0-9._-]+)?$/;
|
|
9
|
+
//#endregion
|
|
10
|
+
Object.defineProperty(exports, "ERROR_MESSAGE_REGEX_PHONE", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function() {
|
|
13
|
+
return ERROR_MESSAGE_REGEX_PHONE;
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "ERROR_MESSAGE_REGEX_URL_SLUG", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function() {
|
|
19
|
+
return ERROR_MESSAGE_REGEX_URL_SLUG;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(exports, "ERROR_MESSAGE_REGEX_UTM_VALUE", {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function() {
|
|
25
|
+
return ERROR_MESSAGE_REGEX_UTM_VALUE;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports, "REGEX_BRAND_COLOR_SLUG", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function() {
|
|
31
|
+
return REGEX_BRAND_COLOR_SLUG;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
Object.defineProperty(exports, "REGEX_NANP_PHONE", {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
get: function() {
|
|
37
|
+
return REGEX_NANP_PHONE;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
Object.defineProperty(exports, "REGEX_URL_SLUG", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
get: function() {
|
|
43
|
+
return REGEX_URL_SLUG;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
Object.defineProperty(exports, "REGEX_UTM_VALUE", {
|
|
47
|
+
enumerable: true,
|
|
48
|
+
get: function() {
|
|
49
|
+
return REGEX_UTM_VALUE;
|
|
50
|
+
}
|
|
51
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/constants/regex.ts
|
|
2
|
+
const ERROR_MESSAGE_REGEX_UTM_VALUE = "can only contain letters, numbers, and the special characters: - _ .";
|
|
3
|
+
const REGEX_UTM_VALUE = /^([a-zA-Z0-9._-]+)?$/;
|
|
4
|
+
const REGEX_BRAND_COLOR_SLUG = /^([a-zA-Z0-9_-]+)?$/;
|
|
5
|
+
const ERROR_MESSAGE_REGEX_PHONE = "Please provide a valid phone number.";
|
|
6
|
+
const REGEX_NANP_PHONE = /^(?:\+?1[\s.-]?)?(?:\(?([2-9]\d{2})\)?[\s.-]?)(?:([2-9](?!11)\d{2}))[\s.-]?(\d{4})(?:\s*(?:#|x|ext\.?|extension)\s*\d+)?$/i;
|
|
7
|
+
const ERROR_MESSAGE_REGEX_URL_SLUG = `can only contain letters, numbers, and the special characters: - _ .`;
|
|
8
|
+
const REGEX_URL_SLUG = /^([a-zA-Z0-9._-]+)?$/;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { REGEX_NANP_PHONE as a, REGEX_BRAND_COLOR_SLUG as i, ERROR_MESSAGE_REGEX_URL_SLUG as n, REGEX_URL_SLUG as o, ERROR_MESSAGE_REGEX_UTM_VALUE as r, REGEX_UTM_VALUE as s, ERROR_MESSAGE_REGEX_PHONE as t };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const require_chunk = require("./chunk-CKQMccvm.cjs");
|
|
2
|
+
let valibot = require("valibot");
|
|
3
|
+
valibot = require_chunk.__toESM(valibot, 1);
|
|
4
|
+
//#region src/validators/relation.ts
|
|
5
|
+
const VDocumentRelationOne = (getSchema) => valibot.optional(valibot.nullable(valibot.lazy(getSchema)));
|
|
6
|
+
const VDocumentRelationOneRequired = (getSchema) => valibot.optional(valibot.lazy(getSchema));
|
|
7
|
+
const VDocumentRelationMany = (getSchema) => valibot.optional(valibot.nullable(valibot.array(valibot.lazy(getSchema))));
|
|
8
|
+
const VDocumentRelationManyRequired = (getSchema) => valibot.optional(valibot.array(valibot.lazy(getSchema)));
|
|
9
|
+
//#endregion
|
|
10
|
+
Object.defineProperty(exports, "VDocumentRelationMany", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function() {
|
|
13
|
+
return VDocumentRelationMany;
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "VDocumentRelationManyRequired", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function() {
|
|
19
|
+
return VDocumentRelationManyRequired;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(exports, "VDocumentRelationOne", {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function() {
|
|
25
|
+
return VDocumentRelationOne;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports, "VDocumentRelationOneRequired", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function() {
|
|
31
|
+
return VDocumentRelationOneRequired;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as v from "valibot";
|
|
2
|
+
//#region src/validators/relation.ts
|
|
3
|
+
const VDocumentRelationOne = (getSchema) => v.optional(v.nullable(v.lazy(getSchema)));
|
|
4
|
+
const VDocumentRelationOneRequired = (getSchema) => v.optional(v.lazy(getSchema));
|
|
5
|
+
const VDocumentRelationMany = (getSchema) => v.optional(v.nullable(v.array(v.lazy(getSchema))));
|
|
6
|
+
const VDocumentRelationManyRequired = (getSchema) => v.optional(v.array(v.lazy(getSchema)));
|
|
7
|
+
//#endregion
|
|
8
|
+
export { VDocumentRelationOneRequired as i, VDocumentRelationManyRequired as n, VDocumentRelationOne as r, VDocumentRelationMany as t };
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-CKQMccvm.cjs");
|
|
2
|
-
require("./
|
|
3
|
-
const
|
|
4
|
-
const require_strapi = require("./strapi-
|
|
2
|
+
require("./limits-CW6iJ7kB.cjs");
|
|
3
|
+
const require_string = require("./string-Yn-6xiAZ.cjs");
|
|
4
|
+
const require_strapi = require("./strapi-RlhF30B7.cjs");
|
|
5
5
|
let valibot = require("valibot");
|
|
6
6
|
valibot = require_chunk.__toESM(valibot, 1);
|
|
7
7
|
//#region src/base/relationships.ts
|
|
8
|
-
const SAssociateOneEntity =
|
|
8
|
+
const SAssociateOneEntity = require_string.VStringMinMax(1, 255);
|
|
9
|
+
const SAssociateOneEntityOptional = valibot.optional(require_string.VStringMinMax(1, 255));
|
|
9
10
|
const SAssociateManyEntities = valibot.pipe(valibot.array(SAssociateOneEntity), valibot.maxLength(100));
|
|
10
|
-
const
|
|
11
|
+
const SAssociateManyEntitiesOptional = valibot.optional(valibot.pipe(valibot.array(SAssociateOneEntity), valibot.maxLength(100)));
|
|
12
|
+
const SQueryManyEntities = valibot.pipe(valibot.array(require_string.VStringMinMax()));
|
|
11
13
|
const SAssociateEntityRelationshipRequest = valibot.pipe(valibot.object({
|
|
12
14
|
collection: require_strapi.ValidStrapiCollectionEntity,
|
|
13
15
|
documentId: SAssociateOneEntity,
|
|
14
|
-
relationKey:
|
|
16
|
+
relationKey: require_string.VStringShort(),
|
|
15
17
|
connect: valibot.optional(SAssociateManyEntities),
|
|
16
18
|
disconnect: valibot.optional(SAssociateManyEntities)
|
|
17
19
|
}), valibot.check((input) => !!(input.connect || input.disconnect), "You must provide a relationship to update: connect or disconnect."));
|
|
@@ -24,19 +26,19 @@ const SEntityPosition = valibot.optional(valibot.object({
|
|
|
24
26
|
const SAssociateEntityPosition = valibot.object({
|
|
25
27
|
documentId: SAssociateOneEntity,
|
|
26
28
|
position: SEntityPosition,
|
|
27
|
-
locale: valibot.optional(
|
|
29
|
+
locale: valibot.optional(require_string.VStringShort())
|
|
28
30
|
});
|
|
29
31
|
const SAssociateEntityPositionDocumentRequest = valibot.pipe(valibot.object({
|
|
30
32
|
collection: require_strapi.ValidStrapiCollectionEntity,
|
|
31
33
|
documentId: SAssociateOneEntity,
|
|
32
|
-
relationKey:
|
|
34
|
+
relationKey: require_string.VStringShort(),
|
|
33
35
|
connect: valibot.optional(valibot.array(SAssociateEntityPosition)),
|
|
34
36
|
disconnect: valibot.optional(SAssociateManyEntities)
|
|
35
37
|
}), valibot.check((input) => !!(input.connect || input.disconnect), "You must provide a relationship to update: connect or disconnect."));
|
|
36
38
|
const SSetEntityRelationshipRequest = valibot.pipe(valibot.object({
|
|
37
39
|
collection: require_strapi.ValidStrapiCollectionEntity,
|
|
38
40
|
documentId: SAssociateOneEntity,
|
|
39
|
-
relationKey:
|
|
41
|
+
relationKey: require_string.VStringShort(),
|
|
40
42
|
set: SAssociateManyEntities
|
|
41
43
|
}));
|
|
42
44
|
//#endregion
|
|
@@ -64,12 +66,24 @@ Object.defineProperty(exports, "SAssociateManyEntities", {
|
|
|
64
66
|
return SAssociateManyEntities;
|
|
65
67
|
}
|
|
66
68
|
});
|
|
69
|
+
Object.defineProperty(exports, "SAssociateManyEntitiesOptional", {
|
|
70
|
+
enumerable: true,
|
|
71
|
+
get: function() {
|
|
72
|
+
return SAssociateManyEntitiesOptional;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
67
75
|
Object.defineProperty(exports, "SAssociateOneEntity", {
|
|
68
76
|
enumerable: true,
|
|
69
77
|
get: function() {
|
|
70
78
|
return SAssociateOneEntity;
|
|
71
79
|
}
|
|
72
80
|
});
|
|
81
|
+
Object.defineProperty(exports, "SAssociateOneEntityOptional", {
|
|
82
|
+
enumerable: true,
|
|
83
|
+
get: function() {
|
|
84
|
+
return SAssociateOneEntityOptional;
|
|
85
|
+
}
|
|
86
|
+
});
|
|
73
87
|
Object.defineProperty(exports, "SEntityPosition", {
|
|
74
88
|
enumerable: true,
|
|
75
89
|
get: function() {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import {
|
|
3
|
-
import { n as ValidStrapiCollectionEntity } from "./strapi-
|
|
1
|
+
import "./limits-CKGuEuKA.mjs";
|
|
2
|
+
import { a as VStringMinMax, s as VStringShort } from "./string-BHHnD2Qu.mjs";
|
|
3
|
+
import { n as ValidStrapiCollectionEntity } from "./strapi-B2cNPAao.mjs";
|
|
4
4
|
import * as v from "valibot";
|
|
5
5
|
//#region src/base/relationships.ts
|
|
6
6
|
const SAssociateOneEntity = VStringMinMax(1, 255);
|
|
7
|
+
const SAssociateOneEntityOptional = v.optional(VStringMinMax(1, 255));
|
|
7
8
|
const SAssociateManyEntities = v.pipe(v.array(SAssociateOneEntity), v.maxLength(100));
|
|
8
|
-
const
|
|
9
|
+
const SAssociateManyEntitiesOptional = v.optional(v.pipe(v.array(SAssociateOneEntity), v.maxLength(100)));
|
|
10
|
+
const SQueryManyEntities = v.pipe(v.array(VStringMinMax()));
|
|
9
11
|
const SAssociateEntityRelationshipRequest = v.pipe(v.object({
|
|
10
12
|
collection: ValidStrapiCollectionEntity,
|
|
11
13
|
documentId: SAssociateOneEntity,
|
|
@@ -38,4 +40,4 @@ const SSetEntityRelationshipRequest = v.pipe(v.object({
|
|
|
38
40
|
set: SAssociateManyEntities
|
|
39
41
|
}));
|
|
40
42
|
//#endregion
|
|
41
|
-
export {
|
|
43
|
+
export { SAssociateManyEntitiesOptional as a, SEntityPosition as c, SAssociateManyEntities as i, SQueryManyEntities as l, SAssociateEntityPositionDocumentRequest as n, SAssociateOneEntity as o, SAssociateEntityRelationshipRequest as r, SAssociateOneEntityOptional as s, SAssociateEntityPosition as t, SSetEntityRelationshipRequest as u };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "./limits-CKGuEuKA.mjs";
|
|
2
|
+
import { n as ERROR_MESSAGE_REGEX_URL_SLUG, o as REGEX_URL_SLUG } from "./regex-pSdcbWzV.mjs";
|
|
3
|
+
import * as v from "valibot";
|
|
4
|
+
//#region src/validators/slug.ts
|
|
5
|
+
const VStringSlug = () => v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(255), v.regex(REGEX_URL_SLUG, ERROR_MESSAGE_REGEX_URL_SLUG));
|
|
6
|
+
//#endregion
|
|
7
|
+
export { VStringSlug as t };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const require_chunk = require("./chunk-CKQMccvm.cjs");
|
|
2
|
+
require("./limits-CW6iJ7kB.cjs");
|
|
3
|
+
const require_regex = require("./regex-BEFTMiHO.cjs");
|
|
4
|
+
let valibot = require("valibot");
|
|
5
|
+
valibot = require_chunk.__toESM(valibot, 1);
|
|
6
|
+
//#region src/validators/slug.ts
|
|
7
|
+
const VStringSlug = () => valibot.pipe(valibot.string(), valibot.trim(), valibot.minLength(1), valibot.maxLength(255), valibot.regex(require_regex.REGEX_URL_SLUG, require_regex.ERROR_MESSAGE_REGEX_URL_SLUG));
|
|
8
|
+
//#endregion
|
|
9
|
+
Object.defineProperty(exports, "VStringSlug", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function() {
|
|
12
|
+
return VStringSlug;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const require_chunk = require("./chunk-CKQMccvm.cjs");
|
|
2
|
+
let valibot = require("valibot");
|
|
3
|
+
valibot = require_chunk.__toESM(valibot, 1);
|
|
4
|
+
//#region src/base/sort.ts
|
|
5
|
+
const createQuerySort = (sortKeys) => {
|
|
6
|
+
const sortOptions = sortKeys.flatMap((key) => [`${key}:ASC`, `${key}:DESC`]);
|
|
7
|
+
return valibot.optional(valibot.pipe(valibot.array(valibot.picklist(sortOptions)), valibot.maxLength(sortKeys.length)));
|
|
8
|
+
};
|
|
9
|
+
const ENTITY_SORT_KEYS = [
|
|
10
|
+
"id",
|
|
11
|
+
"createdAt",
|
|
12
|
+
"updatedAt"
|
|
13
|
+
];
|
|
14
|
+
const QuerySortEntities = createQuerySort(ENTITY_SORT_KEYS);
|
|
15
|
+
//#endregion
|
|
16
|
+
Object.defineProperty(exports, "ENTITY_SORT_KEYS", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function() {
|
|
19
|
+
return ENTITY_SORT_KEYS;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(exports, "QuerySortEntities", {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function() {
|
|
25
|
+
return QuerySortEntities;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports, "createQuerySort", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function() {
|
|
31
|
+
return createQuerySort;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as v from "valibot";
|
|
2
|
+
//#region src/base/sort.ts
|
|
3
|
+
const createQuerySort = (sortKeys) => {
|
|
4
|
+
const sortOptions = sortKeys.flatMap((key) => [`${key}:ASC`, `${key}:DESC`]);
|
|
5
|
+
return v.optional(v.pipe(v.array(v.picklist(sortOptions)), v.maxLength(sortKeys.length)));
|
|
6
|
+
};
|
|
7
|
+
const ENTITY_SORT_KEYS = [
|
|
8
|
+
"id",
|
|
9
|
+
"createdAt",
|
|
10
|
+
"updatedAt"
|
|
11
|
+
];
|
|
12
|
+
const QuerySortEntities = createQuerySort(ENTITY_SORT_KEYS);
|
|
13
|
+
//#endregion
|
|
14
|
+
export { QuerySortEntities as n, createQuerySort as r, ENTITY_SORT_KEYS as t };
|