@getcommunity/gc-validators 0.0.271-alpha.25 → 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.
Files changed (272) hide show
  1. package/dist/base/index.cjs +9 -27
  2. package/dist/base/index.d.cts +2 -2
  3. package/dist/base/index.d.mts +4 -4
  4. package/dist/base/index.mjs +5 -5
  5. package/dist/components/blocks/index.cjs +5 -4
  6. package/dist/components/blocks/index.d.cts +1 -1
  7. package/dist/components/blocks/index.d.mts +1 -1
  8. package/dist/components/blocks/index.mjs +5 -4
  9. package/dist/components/brand/index.cjs +3 -2
  10. package/dist/components/brand/index.d.cts +1 -1
  11. package/dist/components/brand/index.d.mts +1 -1
  12. package/dist/components/brand/index.mjs +3 -2
  13. package/dist/components/forms/index.cjs +2 -1
  14. package/dist/components/forms/index.d.cts +280 -280
  15. package/dist/components/forms/index.d.mts +280 -280
  16. package/dist/components/forms/index.mjs +2 -1
  17. package/dist/components/shared/index.cjs +5 -4
  18. package/dist/components/shared/index.d.cts +1 -1
  19. package/dist/components/shared/index.d.mts +1 -1
  20. package/dist/components/shared/index.mjs +5 -4
  21. package/dist/components/slideshow/index.d.cts +280 -280
  22. package/dist/components/slideshow/index.d.mts +280 -280
  23. package/dist/components/utm/index.d.mts +1 -1
  24. package/dist/constants/index.cjs +45 -43
  25. package/dist/constants/index.mjs +4 -2
  26. package/dist/{document-TlMeVEGy.d.cts → document-3h6g5Qqr.d.cts} +1 -1
  27. package/dist/{document-DjM6F56Q.cjs → document-AqtoEbX8.cjs} +19 -24
  28. package/dist/{document-aEa-gTmH.mjs → document-BCbxKqGE.mjs} +20 -19
  29. package/dist/{document-kvIqz0p6.mjs → document-BWso8VC7.mjs} +62 -56
  30. package/dist/{document-CwIvc2p7.cjs → document-DJJFS5o8.cjs} +2 -1
  31. package/dist/{document-CDavjuJ-.mjs → document-DRyRy2Mw.mjs} +2 -1
  32. package/dist/{document-CAkRm1Y_.d.mts → document-DqE9ISOk.d.mts} +2 -2
  33. package/dist/{document-DOVZwQRq.cjs → document-DwkycUz9.cjs} +74 -62
  34. package/dist/email-ByTEdUjg.cjs +13 -0
  35. package/dist/email-Cnyi5Neo.mjs +6 -0
  36. package/dist/entities/audit-log/index.cjs +44 -41
  37. package/dist/entities/audit-log/index.d.cts +3 -2
  38. package/dist/entities/audit-log/index.d.mts +4 -3
  39. package/dist/entities/audit-log/index.mjs +6 -3
  40. package/dist/entities/blog-page/index.d.cts +1 -1
  41. package/dist/entities/blog-page/index.d.mts +1 -1
  42. package/dist/entities/blog-post/index.cjs +10 -9
  43. package/dist/entities/blog-post/index.d.cts +1 -1
  44. package/dist/entities/blog-post/index.d.mts +1 -1
  45. package/dist/entities/blog-post/index.mjs +4 -3
  46. package/dist/entities/careers-page/index.d.cts +1 -1
  47. package/dist/entities/careers-page/index.d.mts +1 -1
  48. package/dist/entities/category/index.cjs +15 -13
  49. package/dist/entities/category/index.d.cts +7 -6
  50. package/dist/entities/category/index.d.mts +7 -6
  51. package/dist/entities/category/index.mjs +11 -9
  52. package/dist/entities/client/index.cjs +23 -22
  53. package/dist/entities/client/index.d.cts +1 -1
  54. package/dist/entities/client/index.d.mts +1 -1
  55. package/dist/entities/client/index.mjs +16 -15
  56. package/dist/entities/client-content-pillar/index.cjs +14 -13
  57. package/dist/entities/client-content-pillar/index.d.cts +1 -1
  58. package/dist/entities/client-content-pillar/index.d.mts +1 -1
  59. package/dist/entities/client-content-pillar/index.mjs +12 -11
  60. package/dist/entities/client-media-platform/index.cjs +18 -16
  61. package/dist/entities/client-media-platform/index.d.cts +1 -1
  62. package/dist/entities/client-media-platform/index.d.mts +1 -1
  63. package/dist/entities/client-media-platform/index.mjs +13 -11
  64. package/dist/entities/client-project/index.cjs +47 -41
  65. package/dist/entities/client-project/index.d.cts +1 -1
  66. package/dist/entities/client-project/index.d.mts +1 -1
  67. package/dist/entities/client-project/index.mjs +11 -5
  68. package/dist/entities/client-report/index.cjs +18 -16
  69. package/dist/entities/client-report/index.d.cts +1 -1
  70. package/dist/entities/client-report/index.d.mts +1 -1
  71. package/dist/entities/client-report/index.mjs +14 -12
  72. package/dist/entities/client-styleguide/index.cjs +14 -13
  73. package/dist/entities/client-styleguide/index.d.cts +1 -1
  74. package/dist/entities/client-styleguide/index.d.mts +1 -1
  75. package/dist/entities/client-styleguide/index.mjs +11 -10
  76. package/dist/entities/client-user/index.cjs +7 -7
  77. package/dist/entities/client-user/index.d.cts +1 -1
  78. package/dist/entities/client-user/index.d.mts +1 -1
  79. package/dist/entities/client-user/index.mjs +5 -5
  80. package/dist/entities/comment/index.cjs +18 -16
  81. package/dist/entities/comment/index.d.cts +1 -1
  82. package/dist/entities/comment/index.d.mts +1 -1
  83. package/dist/entities/comment/index.mjs +12 -10
  84. package/dist/entities/content-pillar/index.cjs +20 -18
  85. package/dist/entities/content-pillar/index.d.cts +1 -1
  86. package/dist/entities/content-pillar/index.d.mts +1 -1
  87. package/dist/entities/content-pillar/index.mjs +15 -13
  88. package/dist/entities/faq-page/index.cjs +2 -1
  89. package/dist/entities/faq-page/index.d.cts +2 -2
  90. package/dist/entities/faq-page/index.d.mts +3 -3
  91. package/dist/entities/faq-page/index.mjs +2 -1
  92. package/dist/entities/gcflytour/index.cjs +21 -19
  93. package/dist/entities/gcflytour/index.d.cts +1 -1
  94. package/dist/entities/gcflytour/index.d.mts +1 -1
  95. package/dist/entities/gcflytour/index.mjs +17 -15
  96. package/dist/entities/gcflytour-snap/index.cjs +20 -18
  97. package/dist/entities/gcflytour-snap/index.d.cts +1 -1
  98. package/dist/entities/gcflytour-snap/index.d.mts +1 -1
  99. package/dist/entities/gcflytour-snap/index.mjs +16 -14
  100. package/dist/entities/landing-page/index.d.cts +2 -2
  101. package/dist/entities/landing-page/index.d.mts +3 -3
  102. package/dist/entities/lead/index.cjs +25 -23
  103. package/dist/entities/lead/index.mjs +15 -13
  104. package/dist/entities/media-content-type/index.cjs +21 -19
  105. package/dist/entities/media-content-type/index.d.cts +7 -6
  106. package/dist/entities/media-content-type/index.d.mts +7 -6
  107. package/dist/entities/media-content-type/index.mjs +17 -15
  108. package/dist/entities/media-creative-format/index.cjs +19 -17
  109. package/dist/entities/media-creative-format/index.d.cts +7 -6
  110. package/dist/entities/media-creative-format/index.d.mts +7 -6
  111. package/dist/entities/media-creative-format/index.mjs +15 -13
  112. package/dist/entities/media-medium/index.cjs +19 -17
  113. package/dist/entities/media-medium/index.d.cts +7 -6
  114. package/dist/entities/media-medium/index.d.mts +7 -6
  115. package/dist/entities/media-medium/index.mjs +15 -13
  116. package/dist/entities/media-platform/index.cjs +27 -24
  117. package/dist/entities/media-platform/index.d.cts +1 -1
  118. package/dist/entities/media-platform/index.d.mts +1 -1
  119. package/dist/entities/media-platform/index.mjs +23 -20
  120. package/dist/entities/monday-workspace/index.cjs +17 -15
  121. package/dist/entities/monday-workspace/index.d.cts +1 -1
  122. package/dist/entities/monday-workspace/index.d.mts +1 -1
  123. package/dist/entities/monday-workspace/index.mjs +11 -9
  124. package/dist/entities/newsletter-signup/index.cjs +25 -23
  125. package/dist/entities/newsletter-signup/index.mjs +13 -11
  126. package/dist/entities/policy-page/index.cjs +2 -1
  127. package/dist/entities/policy-page/index.d.cts +1 -1
  128. package/dist/entities/policy-page/index.d.mts +2 -2
  129. package/dist/entities/policy-page/index.mjs +2 -1
  130. package/dist/entities/product/index.cjs +1 -1
  131. package/dist/entities/product/index.d.cts +1 -1
  132. package/dist/entities/product/index.d.mts +1 -1
  133. package/dist/entities/product/index.mjs +1 -1
  134. package/dist/entities/product-highlight/index.cjs +1 -1
  135. package/dist/entities/product-highlight/index.d.cts +1 -1
  136. package/dist/entities/product-highlight/index.d.mts +1 -1
  137. package/dist/entities/product-highlight/index.mjs +1 -1
  138. package/dist/entities/resume/index.cjs +43 -40
  139. package/dist/entities/resume/index.mjs +16 -13
  140. package/dist/entities/sharpspring/index.cjs +9 -8
  141. package/dist/entities/sharpspring/index.mjs +6 -5
  142. package/dist/entities/tag/index.cjs +15 -13
  143. package/dist/entities/tag/index.d.cts +6 -5
  144. package/dist/entities/tag/index.d.mts +7 -6
  145. package/dist/entities/tag/index.mjs +11 -9
  146. package/dist/entities/team-member/index.cjs +11 -9
  147. package/dist/entities/team-member/index.d.cts +2 -2
  148. package/dist/entities/team-member/index.d.mts +2 -2
  149. package/dist/entities/team-member/index.mjs +7 -4
  150. package/dist/entities/team-page/index.d.cts +1 -1
  151. package/dist/entities/team-page/index.d.mts +1 -1
  152. package/dist/entities/teamwork/index.cjs +12 -11
  153. package/dist/entities/teamwork/index.d.mts +1 -1
  154. package/dist/entities/teamwork/index.mjs +7 -6
  155. package/dist/entities/trend/index.cjs +2 -2
  156. package/dist/entities/trend/index.d.cts +1 -1
  157. package/dist/entities/trend/index.d.mts +1 -1
  158. package/dist/entities/trend/index.mjs +2 -2
  159. package/dist/entities/up-auth/index.cjs +18 -15
  160. package/dist/entities/up-auth/index.d.cts +1 -1
  161. package/dist/entities/up-auth/index.d.mts +1 -1
  162. package/dist/entities/up-auth/index.mjs +6 -3
  163. package/dist/entities/up-permission/index.cjs +1 -1
  164. package/dist/entities/up-permission/index.d.cts +1 -1
  165. package/dist/entities/up-permission/index.d.mts +1 -1
  166. package/dist/entities/up-permission/index.mjs +1 -1
  167. package/dist/entities/up-role/index.cjs +1 -1
  168. package/dist/entities/up-role/index.d.cts +1 -1
  169. package/dist/entities/up-role/index.d.mts +1 -1
  170. package/dist/entities/up-role/index.mjs +1 -1
  171. package/dist/entities/up-user/index.cjs +2 -1
  172. package/dist/entities/up-user/index.d.cts +2 -2
  173. package/dist/entities/up-user/index.d.mts +2 -2
  174. package/dist/entities/up-user/index.mjs +2 -2
  175. package/dist/entities/upload/index.cjs +11 -11
  176. package/dist/entities/upload/index.mjs +7 -7
  177. package/dist/entities/url-redirect/index.cjs +5 -4
  178. package/dist/entities/url-redirect/index.d.cts +3 -2
  179. package/dist/entities/url-redirect/index.d.mts +3 -2
  180. package/dist/entities/url-redirect/index.mjs +4 -3
  181. package/dist/entities/user-account/index.cjs +10 -11
  182. package/dist/entities/user-account/index.d.cts +2 -2
  183. package/dist/entities/user-account/index.d.mts +2 -2
  184. package/dist/entities/user-account/index.mjs +10 -11
  185. package/dist/entities/utm-link-builder/index.cjs +30 -36
  186. package/dist/entities/utm-link-builder/index.d.cts +6 -6
  187. package/dist/entities/utm-link-builder/index.d.mts +6 -6
  188. package/dist/entities/utm-link-builder/index.mjs +22 -28
  189. package/dist/entities/utm-tracking-link/index.cjs +110 -104
  190. package/dist/entities/utm-tracking-link/index.d.cts +2 -2
  191. package/dist/entities/utm-tracking-link/index.d.mts +2 -2
  192. package/dist/entities/utm-tracking-link/index.mjs +68 -68
  193. package/dist/error-messages-9ZhRqNGW.mjs +10 -0
  194. package/dist/error-messages-C0I1kOur.cjs +51 -0
  195. package/dist/index-BOxQLeAK.d.cts +317 -0
  196. package/dist/index-BSYaAtme.d.mts +486 -0
  197. package/dist/index-BT8Pa9XY.d.mts +317 -0
  198. package/dist/index-Bd8ZGWzA.d.mts +944 -0
  199. package/dist/{index-DXo7B4ng.d.mts → index-Bjjp-2Sa.d.mts} +20 -99
  200. package/dist/{index-D_YPjLxv.d.cts → index-C9Hbvjc8.d.mts} +4 -3
  201. package/dist/index-COpLbpQC.d.cts +486 -0
  202. package/dist/{index-DXUuI-fJ.d.cts → index-CTc84rze.d.cts} +91 -76
  203. package/dist/index-D5VpzV4T.d.cts +944 -0
  204. package/dist/{index-B_L_83Q2.d.cts → index-D7QXaSOY.d.cts} +19 -98
  205. package/dist/index-DG_Lwaa7.d.cts +1324 -0
  206. package/dist/{index-D3KnOYr7.d.mts → index-Dm8G_OXX.d.cts} +4 -3
  207. package/dist/{index-DEm89ERm.d.mts → index-DpOKOSqT.d.mts} +94 -79
  208. package/dist/index-Dvu63a8_.d.mts +1324 -0
  209. package/dist/limits-CKGuEuKA.mjs +37 -0
  210. package/dist/{regex-Cl5goNwp.cjs → limits-CW6iJ7kB.cjs} +0 -102
  211. package/dist/number-Bt4nZKCU.cjs +19 -0
  212. package/dist/number-OMFRufFt.mjs +6 -0
  213. package/dist/pagination-D5l_UjyM.mjs +7 -0
  214. package/dist/pagination-DWZDPzR4.cjs +20 -0
  215. package/dist/permissions/index.cjs +2 -2
  216. package/dist/permissions/index.d.cts +1 -1
  217. package/dist/permissions/index.d.mts +1 -1
  218. package/dist/permissions/index.mjs +2 -2
  219. package/dist/phone-C9TNVDm_.mjs +8 -0
  220. package/dist/phone-D_ZLG1Qv.cjs +21 -0
  221. package/dist/{query-DHY-nlUQ.mjs → query-BR5Ze6T2.mjs} +7 -11
  222. package/dist/{query-DelNcssC.cjs → query-qQ_HLlxx.cjs} +13 -29
  223. package/dist/regex-BEFTMiHO.cjs +51 -0
  224. package/dist/regex-pSdcbWzV.mjs +10 -0
  225. package/dist/relation-Bd-xUcj8.cjs +33 -0
  226. package/dist/relation-DMhLjp7K.mjs +8 -0
  227. package/dist/{relationships-HTBNe0F-.cjs → relationships-DjHwYd4r.cjs} +23 -9
  228. package/dist/{relationships-C6xfgdwR.mjs → relationships-yPO5SILR.mjs} +7 -5
  229. package/dist/slug-BUtm1t-B.mjs +7 -0
  230. package/dist/slug-cWXTZEIT.cjs +14 -0
  231. package/dist/sort-CI87SH1y.cjs +33 -0
  232. package/dist/sort-D3WwshqQ.mjs +14 -0
  233. package/dist/{strapi-DvyAfgFF.mjs → strapi-B2cNPAao.mjs} +1 -1
  234. package/dist/{strapi-QFDWi4vD.cjs → strapi-RlhF30B7.cjs} +1 -1
  235. package/dist/string-BHHnD2Qu.mjs +42 -0
  236. package/dist/string-Yn-6xiAZ.cjs +97 -0
  237. package/dist/urls-UOvhCu0z.mjs +14 -0
  238. package/dist/urls-og5upHgL.cjs +27 -0
  239. package/dist/utilities/index.cjs +1 -1
  240. package/dist/utilities/index.d.cts +6 -6
  241. package/dist/utilities/index.d.mts +6 -6
  242. package/dist/utilities/index.mjs +1 -1
  243. package/dist/utm-BqkYlpua.cjs +47 -0
  244. package/dist/utm-ZUwmBoR2.mjs +28 -0
  245. package/dist/validators/index.cjs +36 -0
  246. package/dist/validators/index.d.cts +94 -0
  247. package/dist/validators/index.d.mts +94 -0
  248. package/dist/validators/index.mjs +10 -0
  249. package/package.json +11 -1
  250. package/dist/index-B3VtiObV.d.mts +0 -317
  251. package/dist/index-BxEBUjx2.d.mts +0 -486
  252. package/dist/index-CQP_vcmO.d.cts +0 -317
  253. package/dist/index-CRoWUxGV.d.cts +0 -1324
  254. package/dist/index-DYSlcIkJ.d.mts +0 -945
  255. package/dist/index-Dmtom8iC.d.cts +0 -945
  256. package/dist/index-auU0DaW5.d.cts +0 -486
  257. package/dist/index-oCLNrzIj.d.mts +0 -1324
  258. package/dist/regex-BnKGcdS4.mjs +0 -55
  259. package/dist/validators-Bc9Is5Sr.cjs +0 -222
  260. package/dist/validators-P5E_3qzc.mjs +0 -95
  261. /package/dist/{abac-DPd9oLKR.mjs → abac-BPxkvVVy.mjs} +0 -0
  262. /package/dist/{abac-BeKQtxIF.cjs → abac-YYI2Ckwv.cjs} +0 -0
  263. /package/dist/{constants-Htf-MeCA.mjs → constants-C4cy6LoY.mjs} +0 -0
  264. /package/dist/{constants-f1GP2eiq.cjs → constants-D6DsS_A0.cjs} +0 -0
  265. /package/dist/{document-DaICHS9G.cjs → document-B4FY2KXQ.cjs} +0 -0
  266. /package/dist/{document-c3GNPelp.mjs → document-De-prPhc.mjs} +0 -0
  267. /package/dist/{document-CbE38CzE.d.mts → document-DxjJgk8X.d.mts} +0 -0
  268. /package/dist/{index-DLICmJ_-.d.mts → index-BSEaV9wd.d.mts} +0 -0
  269. /package/dist/{json-BrVkpLbC.d.mts → json--oetJLQY.d.mts} +0 -0
  270. /package/dist/{media-upload-DKeA1eD-.d.mts → media-upload-DBG7YyU4.d.mts} +0 -0
  271. /package/dist/{strapi-BDLWeEyv.mjs → strapi-CE9bz7Kc.mjs} +0 -0
  272. /package/dist/{strapi-C4HuWGb_.cjs → strapi-D8C1C0D7.cjs} +0 -0
@@ -1,55 +0,0 @@
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
- //#region src/constants/limits.ts
11
- const LIMIT_MIN_VALUE = 1;
12
- const LIMIT_SHORT_STRING_MAX_LENGTH = 255;
13
- const LIMIT_MEDIUM_STRING_MAX_LENGTH = 500;
14
- const LIMIT_LONG_STRING_MAX_LENGTH = 5e3;
15
- const LIMIT_VAL_10 = 10;
16
- const LIMIT_VAL_20 = 20;
17
- const LIMIT_VAL_32 = 32;
18
- const LIMIT_VAL_64 = 64;
19
- const LIMIT_VAL_100 = 100;
20
- const LIMIT_VAL_255 = 255;
21
- const LIMIT_MIN_USERNAME = 3;
22
- const LIMIT_MAX_USERNAME = 255;
23
- const LIMIT_MIN_EMAIL = 5;
24
- const LIMIT_MAX_EMAIL = 255;
25
- const LIMIT_MIN_PASSWORD = 8;
26
- const LIMIT_MAX_PASSWORD = 255;
27
- const LIMIT_MIN_PHONE = 7;
28
- const LIMIT_MAX_PHONE = 24;
29
- const LIMIT_MIN_DESTINATION = 10;
30
- const LIMIT_MAX_DESTINATION = 2048;
31
- const LIMIT_MIN_UTM_SOURCE = 1;
32
- const LIMIT_MAX_UTM_SOURCE = 2026;
33
- const LIMIT_MIN_UTM_MEDIUM = 1;
34
- const LIMIT_MAX_UTM_MEDIUM = 2026;
35
- const LIMIT_MIN_UTM_CAMPAIGN = 1;
36
- const LIMIT_MAX_UTM_CAMPAIGN = 2024;
37
- const LIMIT_MIN_UTM_CREATIVE_FORMAT = 1;
38
- const LIMIT_MAX_UTM_CREATIVE_FORMAT = 2017;
39
- const LIMIT_MIN_UTM_CONTENT = 1;
40
- const LIMIT_MAX_UTM_CONTENT = 2025;
41
- const LIMIT_MIN_UTM_TERM = 1;
42
- const LIMIT_MAX_UTM_TERM = 2028;
43
- const LIMIT_MIN_UTM_ID = 1;
44
- const LIMIT_MAX_UTM_ID = 2030;
45
- //#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
- export { LIMIT_MIN_UTM_ID as A, LIMIT_VAL_32 as B, LIMIT_MIN_EMAIL as C, LIMIT_MIN_UTM_CAMPAIGN as D, LIMIT_MIN_USERNAME as E, LIMIT_SHORT_STRING_MAX_LENGTH as F, ERROR_MESSAGE_ROBOT as G, ERROR_MESSAGE_COMMA_SEPPARATED_URLS as H, LIMIT_VAL_10 as I, ERROR_MESSAGE_UTM_URL as J, ERROR_MESSAGE_URL_NO_QUERY_PARAMS as K, LIMIT_VAL_100 as L, LIMIT_MIN_UTM_SOURCE as M, LIMIT_MIN_UTM_TERM as N, LIMIT_MIN_UTM_CONTENT as O, LIMIT_MIN_VALUE as P, LIMIT_VAL_20 as R, LIMIT_MIN_DESTINATION as S, LIMIT_MIN_PHONE as T, ERROR_MESSAGE_INVALID_URL as U, LIMIT_VAL_64 as V, ERROR_MESSAGE_ONE_PROJECT_STATUS as W, LIMIT_MAX_UTM_ID as _, REGEX_NANP_PHONE as a, LIMIT_MAX_UTM_TERM as b, LIMIT_LONG_STRING_MAX_LENGTH as c, LIMIT_MAX_PASSWORD as d, LIMIT_MAX_PHONE as f, LIMIT_MAX_UTM_CREATIVE_FORMAT as g, LIMIT_MAX_UTM_CONTENT as h, REGEX_BRAND_COLOR_SLUG as i, LIMIT_MIN_UTM_MEDIUM as j, LIMIT_MIN_UTM_CREATIVE_FORMAT as k, LIMIT_MAX_DESTINATION as l, LIMIT_MAX_UTM_CAMPAIGN as m, ERROR_MESSAGE_REGEX_URL_SLUG as n, REGEX_URL_SLUG as o, LIMIT_MAX_USERNAME as p, ERROR_MESSAGE_URL_PREFIX as q, ERROR_MESSAGE_REGEX_UTM_VALUE as r, REGEX_UTM_VALUE as s, ERROR_MESSAGE_REGEX_PHONE as t, LIMIT_MAX_EMAIL as u, LIMIT_MAX_UTM_MEDIUM as v, LIMIT_MIN_PASSWORD as w, LIMIT_MEDIUM_STRING_MAX_LENGTH as x, LIMIT_MAX_UTM_SOURCE as y, LIMIT_VAL_255 as z };
@@ -1,222 +0,0 @@
1
- const require_chunk = require("./chunk-CKQMccvm.cjs");
2
- const require_regex = require("./regex-Cl5goNwp.cjs");
3
- let valibot = require("valibot");
4
- valibot = require_chunk.__toESM(valibot, 1);
5
- //#region src/base/validators.ts
6
- /**
7
- * Basic number validator
8
- */
9
- const VNumberNullable = () => valibot.optional(valibot.nullable(valibot.number()));
10
- const VIntegerNullable = () => valibot.optional(valibot.nullable(valibot.pipe(valibot.number(), valibot.integer())));
11
- /**
12
- * Basic string validator with trim and min length
13
- */
14
- const VString = (minLength = 1) => valibot.pipe(valibot.string(), valibot.trim(), valibot.minLength(minLength));
15
- /**
16
- * String validator with trim, min length, and max length (Short)
17
- */
18
- const VStringShort = (minLength = 1) => valibot.pipe(valibot.string(), valibot.trim(), valibot.minLength(minLength), valibot.maxLength(255));
19
- /**
20
- * String validator with trim, min length, and max length (Long)
21
- */
22
- const VStringLong = (minLength = 1) => valibot.pipe(valibot.string(), valibot.trim(), valibot.minLength(minLength), valibot.maxLength(require_regex.LIMIT_LONG_STRING_MAX_LENGTH));
23
- /**
24
- * String validator with trim, and max length
25
- */
26
- const VStringMax = (maxLength = 255) => valibot.pipe(valibot.string(), valibot.trim(), valibot.maxLength(maxLength));
27
- /**
28
- * String validator with trim, and max length
29
- */
30
- const VStringMaxRegex = (maxLength = 255, pattern, message) => valibot.pipe(valibot.string(), valibot.trim(), valibot.maxLength(maxLength), valibot.regex(pattern, message));
31
- /**
32
- * String validator with trim, min length, and max length
33
- */
34
- const VStringMinMax = (minLength = 1, maxLength = 255) => valibot.pipe(valibot.string(), valibot.trim(), valibot.minLength(minLength), valibot.maxLength(maxLength));
35
- /**
36
- * String validator with trim, min length, max length, and regex pattern
37
- */
38
- const VStringMinMaxRegex = (minLength = 1, maxLength = 255, pattern, message) => valibot.pipe(valibot.string(), valibot.trim(), valibot.minLength(minLength), valibot.maxLength(maxLength), valibot.regex(pattern, message));
39
- /**
40
- * Optional Nullable String validator (Long)
41
- */
42
- const VStringLongNullable = () => valibot.optional(valibot.nullable(valibot.pipe(valibot.string(), valibot.trim(), valibot.maxLength(require_regex.LIMIT_LONG_STRING_MAX_LENGTH))));
43
- /**
44
- * Optional Nullable String validator
45
- * Commonly used for optional fields that might be null in the database or API
46
- */
47
- const VStringShortNullable = () => valibot.optional(valibot.nullable(valibot.pipe(valibot.string(), valibot.trim(), valibot.maxLength(255))));
48
- /**
49
- * URL Validator
50
- * Checks for http/https prefix and valid URL format
51
- */
52
- const VStringUrl = () => valibot.pipe(valibot.string(), valibot.trim(), valibot.startsWith("http", require_regex.ERROR_MESSAGE_URL_PREFIX), valibot.url(require_regex.ERROR_MESSAGE_INVALID_URL));
53
- /**
54
- * UTM URL Validator
55
- * Checks for valid URL format that does contain utm params
56
- */
57
- const VStringUrlUtm = () => valibot.pipe(valibot.string(), valibot.trim(), valibot.url(require_regex.ERROR_MESSAGE_INVALID_URL), valibot.check((input) => {
58
- return input.includes("utm_");
59
- }, require_regex.ERROR_MESSAGE_UTM_URL));
60
- /**
61
- * URL no utm params Validator
62
- * Checks for valid URL format that does not contain utm params
63
- */
64
- const VStringUrlNoUtm = () => valibot.pipe(valibot.string(), valibot.trim(), valibot.url(require_regex.ERROR_MESSAGE_INVALID_URL), valibot.check((input) => {
65
- if (input === "") return false;
66
- return input.indexOf("?") === -1;
67
- }, require_regex.ERROR_MESSAGE_URL_NO_QUERY_PARAMS));
68
- /**
69
- * Optional Nullable URL Validator
70
- */
71
- const VStringUrlNullable = () => valibot.optional(valibot.nullable(valibot.pipe(valibot.string(), valibot.trim(), valibot.startsWith("http", require_regex.ERROR_MESSAGE_URL_PREFIX), valibot.url(require_regex.ERROR_MESSAGE_INVALID_URL))));
72
- /**
73
- * Slug Validator
74
- */
75
- 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));
76
- /**
77
- * Email Validator
78
- */
79
- const VStringEmail = () => valibot.pipe(valibot.string(), valibot.trim(), valibot.minLength(5), valibot.maxLength(255), valibot.email());
80
- /**
81
- * Phone Validator (NANP)
82
- */
83
- 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));
84
- /**
85
- * Optional Nullable Phone Validator
86
- */
87
- const VStringPhoneNullable = () => valibot.optional(valibot.nullable(VStringPhone()));
88
- /**
89
- * Pagination Page Validator
90
- */
91
- const VPage = () => valibot.optional(valibot.pipe(valibot.number(), valibot.minValue(1)));
92
- /**
93
- * Pagination Size Validator
94
- */
95
- const VSize = (maxSize) => valibot.optional(valibot.pipe(valibot.number(), valibot.minValue(1), valibot.maxValue(maxSize)));
96
- //#endregion
97
- Object.defineProperty(exports, "VIntegerNullable", {
98
- enumerable: true,
99
- get: function() {
100
- return VIntegerNullable;
101
- }
102
- });
103
- Object.defineProperty(exports, "VNumberNullable", {
104
- enumerable: true,
105
- get: function() {
106
- return VNumberNullable;
107
- }
108
- });
109
- Object.defineProperty(exports, "VPage", {
110
- enumerable: true,
111
- get: function() {
112
- return VPage;
113
- }
114
- });
115
- Object.defineProperty(exports, "VSize", {
116
- enumerable: true,
117
- get: function() {
118
- return VSize;
119
- }
120
- });
121
- Object.defineProperty(exports, "VString", {
122
- enumerable: true,
123
- get: function() {
124
- return VString;
125
- }
126
- });
127
- Object.defineProperty(exports, "VStringEmail", {
128
- enumerable: true,
129
- get: function() {
130
- return VStringEmail;
131
- }
132
- });
133
- Object.defineProperty(exports, "VStringLong", {
134
- enumerable: true,
135
- get: function() {
136
- return VStringLong;
137
- }
138
- });
139
- Object.defineProperty(exports, "VStringLongNullable", {
140
- enumerable: true,
141
- get: function() {
142
- return VStringLongNullable;
143
- }
144
- });
145
- Object.defineProperty(exports, "VStringMax", {
146
- enumerable: true,
147
- get: function() {
148
- return VStringMax;
149
- }
150
- });
151
- Object.defineProperty(exports, "VStringMaxRegex", {
152
- enumerable: true,
153
- get: function() {
154
- return VStringMaxRegex;
155
- }
156
- });
157
- Object.defineProperty(exports, "VStringMinMax", {
158
- enumerable: true,
159
- get: function() {
160
- return VStringMinMax;
161
- }
162
- });
163
- Object.defineProperty(exports, "VStringMinMaxRegex", {
164
- enumerable: true,
165
- get: function() {
166
- return VStringMinMaxRegex;
167
- }
168
- });
169
- Object.defineProperty(exports, "VStringPhone", {
170
- enumerable: true,
171
- get: function() {
172
- return VStringPhone;
173
- }
174
- });
175
- Object.defineProperty(exports, "VStringPhoneNullable", {
176
- enumerable: true,
177
- get: function() {
178
- return VStringPhoneNullable;
179
- }
180
- });
181
- Object.defineProperty(exports, "VStringShort", {
182
- enumerable: true,
183
- get: function() {
184
- return VStringShort;
185
- }
186
- });
187
- Object.defineProperty(exports, "VStringShortNullable", {
188
- enumerable: true,
189
- get: function() {
190
- return VStringShortNullable;
191
- }
192
- });
193
- Object.defineProperty(exports, "VStringSlug", {
194
- enumerable: true,
195
- get: function() {
196
- return VStringSlug;
197
- }
198
- });
199
- Object.defineProperty(exports, "VStringUrl", {
200
- enumerable: true,
201
- get: function() {
202
- return VStringUrl;
203
- }
204
- });
205
- Object.defineProperty(exports, "VStringUrlNoUtm", {
206
- enumerable: true,
207
- get: function() {
208
- return VStringUrlNoUtm;
209
- }
210
- });
211
- Object.defineProperty(exports, "VStringUrlNullable", {
212
- enumerable: true,
213
- get: function() {
214
- return VStringUrlNullable;
215
- }
216
- });
217
- Object.defineProperty(exports, "VStringUrlUtm", {
218
- enumerable: true,
219
- get: function() {
220
- return VStringUrlUtm;
221
- }
222
- });
@@ -1,95 +0,0 @@
1
- import { J as ERROR_MESSAGE_UTM_URL, K as ERROR_MESSAGE_URL_NO_QUERY_PARAMS, U as ERROR_MESSAGE_INVALID_URL, a as REGEX_NANP_PHONE, c as LIMIT_LONG_STRING_MAX_LENGTH, n as ERROR_MESSAGE_REGEX_URL_SLUG, o as REGEX_URL_SLUG, q as ERROR_MESSAGE_URL_PREFIX, t as ERROR_MESSAGE_REGEX_PHONE } from "./regex-BnKGcdS4.mjs";
2
- import * as v from "valibot";
3
- //#region src/base/validators.ts
4
- /**
5
- * Basic number validator
6
- */
7
- const VNumberNullable = () => v.optional(v.nullable(v.number()));
8
- const VIntegerNullable = () => v.optional(v.nullable(v.pipe(v.number(), v.integer())));
9
- /**
10
- * Basic string validator with trim and min length
11
- */
12
- const VString = (minLength = 1) => v.pipe(v.string(), v.trim(), v.minLength(minLength));
13
- /**
14
- * String validator with trim, min length, and max length (Short)
15
- */
16
- const VStringShort = (minLength = 1) => v.pipe(v.string(), v.trim(), v.minLength(minLength), v.maxLength(255));
17
- /**
18
- * String validator with trim, min length, and max length (Long)
19
- */
20
- const VStringLong = (minLength = 1) => v.pipe(v.string(), v.trim(), v.minLength(minLength), v.maxLength(LIMIT_LONG_STRING_MAX_LENGTH));
21
- /**
22
- * String validator with trim, and max length
23
- */
24
- const VStringMax = (maxLength = 255) => v.pipe(v.string(), v.trim(), v.maxLength(maxLength));
25
- /**
26
- * String validator with trim, and max length
27
- */
28
- const VStringMaxRegex = (maxLength = 255, pattern, message) => v.pipe(v.string(), v.trim(), v.maxLength(maxLength), v.regex(pattern, message));
29
- /**
30
- * String validator with trim, min length, and max length
31
- */
32
- const VStringMinMax = (minLength = 1, maxLength = 255) => v.pipe(v.string(), v.trim(), v.minLength(minLength), v.maxLength(maxLength));
33
- /**
34
- * String validator with trim, min length, max length, and regex pattern
35
- */
36
- const VStringMinMaxRegex = (minLength = 1, maxLength = 255, pattern, message) => v.pipe(v.string(), v.trim(), v.minLength(minLength), v.maxLength(maxLength), v.regex(pattern, message));
37
- /**
38
- * Optional Nullable String validator (Long)
39
- */
40
- const VStringLongNullable = () => v.optional(v.nullable(v.pipe(v.string(), v.trim(), v.maxLength(LIMIT_LONG_STRING_MAX_LENGTH))));
41
- /**
42
- * Optional Nullable String validator
43
- * Commonly used for optional fields that might be null in the database or API
44
- */
45
- const VStringShortNullable = () => v.optional(v.nullable(v.pipe(v.string(), v.trim(), v.maxLength(255))));
46
- /**
47
- * URL Validator
48
- * Checks for http/https prefix and valid URL format
49
- */
50
- const VStringUrl = () => v.pipe(v.string(), v.trim(), v.startsWith("http", ERROR_MESSAGE_URL_PREFIX), v.url(ERROR_MESSAGE_INVALID_URL));
51
- /**
52
- * UTM URL Validator
53
- * Checks for valid URL format that does contain utm params
54
- */
55
- const VStringUrlUtm = () => v.pipe(v.string(), v.trim(), v.url(ERROR_MESSAGE_INVALID_URL), v.check((input) => {
56
- return input.includes("utm_");
57
- }, ERROR_MESSAGE_UTM_URL));
58
- /**
59
- * URL no utm params Validator
60
- * Checks for valid URL format that does not contain utm params
61
- */
62
- const VStringUrlNoUtm = () => v.pipe(v.string(), v.trim(), v.url(ERROR_MESSAGE_INVALID_URL), v.check((input) => {
63
- if (input === "") return false;
64
- return input.indexOf("?") === -1;
65
- }, ERROR_MESSAGE_URL_NO_QUERY_PARAMS));
66
- /**
67
- * Optional Nullable URL Validator
68
- */
69
- const VStringUrlNullable = () => v.optional(v.nullable(v.pipe(v.string(), v.trim(), v.startsWith("http", ERROR_MESSAGE_URL_PREFIX), v.url(ERROR_MESSAGE_INVALID_URL))));
70
- /**
71
- * Slug Validator
72
- */
73
- const VStringSlug = () => v.pipe(v.string(), v.trim(), v.minLength(1), v.maxLength(255), v.regex(REGEX_URL_SLUG, ERROR_MESSAGE_REGEX_URL_SLUG));
74
- /**
75
- * Email Validator
76
- */
77
- const VStringEmail = () => v.pipe(v.string(), v.trim(), v.minLength(5), v.maxLength(255), v.email());
78
- /**
79
- * Phone Validator (NANP)
80
- */
81
- const VStringPhone = () => v.pipe(v.string(), v.trim(), v.minLength(7), v.maxLength(24), v.regex(REGEX_NANP_PHONE, ERROR_MESSAGE_REGEX_PHONE));
82
- /**
83
- * Optional Nullable Phone Validator
84
- */
85
- const VStringPhoneNullable = () => v.optional(v.nullable(VStringPhone()));
86
- /**
87
- * Pagination Page Validator
88
- */
89
- const VPage = () => v.optional(v.pipe(v.number(), v.minValue(1)));
90
- /**
91
- * Pagination Size Validator
92
- */
93
- const VSize = (maxSize) => v.optional(v.pipe(v.number(), v.minValue(1), v.maxValue(maxSize)));
94
- //#endregion
95
- export { VStringSlug as _, VString as a, VStringUrlNullable as b, VStringLongNullable as c, VStringMinMax as d, VStringMinMaxRegex as f, VStringShortNullable as g, VStringShort as h, VSize as i, VStringMax as l, VStringPhoneNullable as m, VNumberNullable as n, VStringEmail as o, VStringPhone as p, VPage as r, VStringLong as s, VIntegerNullable as t, VStringMaxRegex as u, VStringUrl as v, VStringUrlUtm as x, VStringUrlNoUtm as y };
File without changes
File without changes