@getcommunity/gc-validators 0.0.270 → 0.0.271-alpha.0
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/README.md +2 -40
- package/dist/base/index.cjs +106 -0
- package/dist/base/index.d.cts +5 -0
- package/dist/base/index.d.mts +5 -0
- package/dist/base/index.mjs +21 -0
- package/dist/component-BPHZTfVY.mjs +6 -0
- package/dist/component-DLjTD_qK.cjs +19 -0
- package/dist/components/blocks/index.cjs +207 -0
- package/dist/components/blocks/index.d.cts +1322 -0
- package/dist/components/blocks/index.d.mts +1322 -0
- package/dist/components/blocks/index.mjs +175 -0
- package/dist/components/brand/index.cjs +37 -0
- package/dist/components/brand/index.d.cts +315 -0
- package/dist/components/brand/index.d.mts +315 -0
- package/dist/components/brand/index.mjs +31 -0
- package/dist/components/forms/index.cjs +70 -0
- package/dist/components/forms/index.d.cts +333 -0
- package/dist/components/forms/index.d.mts +333 -0
- package/dist/components/forms/index.mjs +58 -0
- package/dist/components/shared/index.cjs +127 -0
- package/dist/components/shared/index.d.cts +917 -0
- package/dist/components/shared/index.d.mts +917 -0
- package/dist/components/shared/index.mjs +107 -0
- package/dist/components/slideshow/index.cjs +129 -0
- package/dist/components/slideshow/index.d.cts +742 -0
- package/dist/components/slideshow/index.d.mts +742 -0
- package/dist/components/slideshow/index.mjs +106 -0
- package/dist/components/utm/index.cjs +55 -0
- package/dist/components/utm/index.d.cts +32 -0
- package/dist/components/utm/index.d.mts +32 -0
- package/dist/components/utm/index.mjs +47 -0
- package/dist/constants/index.cjs +243 -0
- package/dist/constants/index.d.cts +197 -0
- package/dist/constants/index.d.mts +197 -0
- package/dist/constants/index.mjs +182 -0
- package/dist/constants-L2goO7Eg.mjs +85 -0
- package/dist/constants-PBZKggHL.cjs +102 -0
- package/dist/document-BAro2Mrj.cjs +18 -0
- package/dist/document-BAzLIprH.d.mts +100 -0
- package/dist/document-BFukanLe.mjs +54 -0
- package/dist/document-BK1ASowb.d.cts +17 -0
- package/dist/document-BMxLOdrT.d.cts +267 -0
- package/dist/document-BNoXPGwF.d.mts +27 -0
- package/dist/document-B_pJW777.d.mts +30 -0
- package/dist/document-Bd2AyLs8.d.mts +16 -0
- package/dist/document-BezYxNmb.d.cts +16 -0
- package/dist/document-Bj7SRTOn.d.cts +18 -0
- package/dist/document-Bo869pZx.d.mts +18 -0
- package/dist/document-Bpr9mbCs.d.mts +15 -0
- package/dist/document-Bqoi1MdT.mjs +11 -0
- package/dist/document-Bs8c1mok.d.cts +15 -0
- package/dist/document-C0c7azOe.d.mts +434 -0
- package/dist/document-CTTDXzOF.mjs +13 -0
- package/dist/document-CUl_Ys6-.mjs +23 -0
- package/dist/document-CWYzG60q.d.cts +19 -0
- package/dist/document-Ccszj8lR.cjs +20 -0
- package/dist/document-CjNHI7Eb.d.cts +27 -0
- package/dist/document-Cu_HUDC5.mjs +51 -0
- package/dist/document-D-KvyEb5.d.cts +238 -0
- package/dist/document-D2nLVGig.d.mts +238 -0
- package/dist/document-D5yDIDIx.d.mts +15 -0
- package/dist/document-D73dqRle.d.cts +19 -0
- package/dist/document-DA6YVZz-.d.cts +100 -0
- package/dist/document-DJ0YiVte.d.cts +30 -0
- package/dist/document-DMHIUE3J.d.mts +17 -0
- package/dist/document-DN3g0EFx.d.cts +434 -0
- package/dist/document-DWapIF7V.d.cts +12223 -0
- package/dist/document-DYzRVV1C.d.mts +16 -0
- package/dist/document-D_ZMbzn6.d.cts +18 -0
- package/dist/document-DeoRGh7p.d.mts +19 -0
- package/dist/document-DsIPBTG8.cjs +30 -0
- package/dist/document-DsSaMVGb.cjs +106 -0
- package/dist/document-Gx2Vrg_w.d.mts +267 -0
- package/dist/document-IIJpsOIO.d.cts +16 -0
- package/dist/document-WHS8GHY5.d.mts +18 -0
- package/dist/document-dqrWptdY.d.cts +244 -0
- package/dist/document-hEBlSep8.d.cts +15 -0
- package/dist/document-qcC-10Nd.d.mts +12223 -0
- package/dist/document-rbMXLGxt.cjs +103 -0
- package/dist/document-si7GYS5g.d.mts +19 -0
- package/dist/document-vq-7rcU5.d.mts +244 -0
- package/dist/entities/audit-log/index.cjs +127 -0
- package/dist/entities/audit-log/index.d.cts +134 -0
- package/dist/entities/audit-log/index.d.mts +134 -0
- package/dist/entities/audit-log/index.mjs +115 -0
- package/dist/entities/blog-page/index.cjs +16 -0
- package/dist/entities/blog-page/index.d.cts +257 -0
- package/dist/entities/blog-page/index.d.mts +257 -0
- package/dist/entities/blog-page/index.mjs +13 -0
- package/dist/entities/blog-post/index.cjs +33 -0
- package/dist/entities/blog-post/index.d.cts +917 -0
- package/dist/entities/blog-post/index.d.mts +917 -0
- package/dist/entities/blog-post/index.mjs +21 -0
- package/dist/entities/careers-page/index.cjs +16 -0
- package/dist/entities/careers-page/index.d.cts +257 -0
- package/dist/entities/careers-page/index.d.mts +257 -0
- package/dist/entities/careers-page/index.mjs +13 -0
- package/dist/entities/category/index.cjs +63 -0
- package/dist/entities/category/index.d.cts +300 -0
- package/dist/entities/category/index.d.mts +300 -0
- package/dist/entities/category/index.mjs +52 -0
- package/dist/entities/client/index.cjs +96 -0
- package/dist/entities/client/index.d.cts +85 -0
- package/dist/entities/client/index.d.mts +85 -0
- package/dist/entities/client/index.mjs +83 -0
- package/dist/entities/client-content-pillar/index.cjs +70 -0
- package/dist/entities/client-content-pillar/index.d.cts +49 -0
- package/dist/entities/client-content-pillar/index.d.mts +49 -0
- package/dist/entities/client-content-pillar/index.mjs +59 -0
- package/dist/entities/client-media-platform/index.cjs +74 -0
- package/dist/entities/client-media-platform/index.d.cts +53 -0
- package/dist/entities/client-media-platform/index.d.mts +53 -0
- package/dist/entities/client-media-platform/index.mjs +63 -0
- package/dist/entities/client-project/index.cjs +205 -0
- package/dist/entities/client-project/index.d.cts +147 -0
- package/dist/entities/client-project/index.d.mts +147 -0
- package/dist/entities/client-project/index.mjs +188 -0
- package/dist/entities/client-report/index.cjs +82 -0
- package/dist/entities/client-report/index.d.cts +63 -0
- package/dist/entities/client-report/index.d.mts +63 -0
- package/dist/entities/client-report/index.mjs +71 -0
- package/dist/entities/client-styleguide/index.cjs +77 -0
- package/dist/entities/client-styleguide/index.d.cts +48 -0
- package/dist/entities/client-styleguide/index.d.mts +48 -0
- package/dist/entities/client-styleguide/index.mjs +66 -0
- package/dist/entities/client-user/index.cjs +78 -0
- package/dist/entities/client-user/index.d.cts +47 -0
- package/dist/entities/client-user/index.d.mts +47 -0
- package/dist/entities/client-user/index.mjs +64 -0
- package/dist/entities/comment/index.cjs +137 -0
- package/dist/entities/comment/index.d.cts +2 -0
- package/dist/entities/comment/index.d.mts +2 -0
- package/dist/entities/comment/index.mjs +116 -0
- package/dist/entities/content-pillar/index.cjs +59 -0
- package/dist/entities/content-pillar/index.d.cts +50 -0
- package/dist/entities/content-pillar/index.d.mts +50 -0
- package/dist/entities/content-pillar/index.mjs +48 -0
- package/dist/entities/faq-page/index.cjs +17 -0
- package/dist/entities/faq-page/index.d.cts +335 -0
- package/dist/entities/faq-page/index.d.mts +335 -0
- package/dist/entities/faq-page/index.mjs +14 -0
- package/dist/entities/formatter/index.cjs +258 -0
- package/dist/entities/formatter/index.d.cts +121 -0
- package/dist/entities/formatter/index.d.mts +121 -0
- package/dist/entities/formatter/index.mjs +233 -0
- package/dist/entities/gcflytour/index.cjs +79 -0
- package/dist/entities/gcflytour/index.d.cts +61 -0
- package/dist/entities/gcflytour/index.d.mts +61 -0
- package/dist/entities/gcflytour/index.mjs +68 -0
- package/dist/entities/gcflytour-snap/index.cjs +78 -0
- package/dist/entities/gcflytour-snap/index.d.cts +59 -0
- package/dist/entities/gcflytour-snap/index.d.mts +59 -0
- package/dist/entities/gcflytour-snap/index.mjs +67 -0
- package/dist/entities/landing-page/index.cjs +28 -0
- package/dist/entities/landing-page/index.d.cts +479 -0
- package/dist/entities/landing-page/index.d.mts +479 -0
- package/dist/entities/landing-page/index.mjs +25 -0
- package/dist/entities/lead/index.cjs +63 -0
- package/dist/entities/lead/index.d.cts +75 -0
- package/dist/entities/lead/index.d.mts +75 -0
- package/dist/entities/lead/index.mjs +57 -0
- package/dist/entities/media-content-type/index.cjs +100 -0
- package/dist/entities/media-content-type/index.d.cts +66 -0
- package/dist/entities/media-content-type/index.d.mts +66 -0
- package/dist/entities/media-content-type/index.mjs +89 -0
- package/dist/entities/media-creative-format/index.cjs +79 -0
- package/dist/entities/media-creative-format/index.d.cts +54 -0
- package/dist/entities/media-creative-format/index.d.mts +54 -0
- package/dist/entities/media-creative-format/index.mjs +68 -0
- package/dist/entities/media-medium/index.cjs +90 -0
- package/dist/entities/media-medium/index.d.cts +77 -0
- package/dist/entities/media-medium/index.d.mts +77 -0
- package/dist/entities/media-medium/index.mjs +79 -0
- package/dist/entities/media-platform/index.cjs +118 -0
- package/dist/entities/media-platform/index.d.cts +74 -0
- package/dist/entities/media-platform/index.d.mts +74 -0
- package/dist/entities/media-platform/index.mjs +107 -0
- package/dist/entities/monday-workspace/index.cjs +66 -0
- package/dist/entities/monday-workspace/index.d.cts +47 -0
- package/dist/entities/monday-workspace/index.d.mts +47 -0
- package/dist/entities/monday-workspace/index.mjs +55 -0
- package/dist/entities/newsletter-signup/index.cjs +67 -0
- package/dist/entities/newsletter-signup/index.d.cts +76 -0
- package/dist/entities/newsletter-signup/index.d.mts +76 -0
- package/dist/entities/newsletter-signup/index.mjs +60 -0
- package/dist/entities/policy-page/index.cjs +23 -0
- package/dist/entities/policy-page/index.d.cts +331 -0
- package/dist/entities/policy-page/index.d.mts +331 -0
- package/dist/entities/policy-page/index.mjs +20 -0
- package/dist/entities/product/index.cjs +28 -0
- package/dist/entities/product/index.d.cts +325 -0
- package/dist/entities/product/index.d.mts +325 -0
- package/dist/entities/product/index.mjs +23 -0
- package/dist/entities/product-highlight/index.cjs +28 -0
- package/dist/entities/product-highlight/index.d.cts +245 -0
- package/dist/entities/product-highlight/index.d.mts +245 -0
- package/dist/entities/product-highlight/index.mjs +23 -0
- package/dist/entities/resume/index.cjs +129 -0
- package/dist/entities/resume/index.d.cts +198 -0
- package/dist/entities/resume/index.d.mts +198 -0
- package/dist/entities/resume/index.mjs +119 -0
- package/dist/entities/sharpspring/index.cjs +19 -0
- package/dist/entities/sharpspring/index.d.cts +16 -0
- package/dist/entities/sharpspring/index.d.mts +16 -0
- package/dist/entities/sharpspring/index.mjs +16 -0
- package/dist/entities/tag/index.cjs +61 -0
- package/dist/entities/tag/index.d.cts +54 -0
- package/dist/entities/tag/index.d.mts +54 -0
- package/dist/entities/tag/index.mjs +50 -0
- package/dist/entities/team-member/index.cjs +29 -0
- package/dist/entities/team-member/index.d.cts +210 -0
- package/dist/entities/team-member/index.d.mts +210 -0
- package/dist/entities/team-member/index.mjs +17 -0
- package/dist/entities/team-page/index.cjs +16 -0
- package/dist/entities/team-page/index.d.cts +257 -0
- package/dist/entities/team-page/index.d.mts +257 -0
- package/dist/entities/team-page/index.mjs +13 -0
- package/dist/entities/teamwork/index.cjs +74 -0
- package/dist/entities/teamwork/index.d.cts +512 -0
- package/dist/entities/teamwork/index.d.mts +512 -0
- package/dist/entities/teamwork/index.mjs +68 -0
- package/dist/entities/trend/index.cjs +34 -0
- package/dist/entities/trend/index.d.cts +347 -0
- package/dist/entities/trend/index.d.mts +347 -0
- package/dist/entities/trend/index.mjs +28 -0
- package/dist/entities/up-auth/index.cjs +56 -0
- package/dist/entities/up-auth/index.d.cts +2 -0
- package/dist/entities/up-auth/index.d.mts +2 -0
- package/dist/entities/up-auth/index.mjs +44 -0
- package/dist/entities/up-permission/index.cjs +12 -0
- package/dist/entities/up-permission/index.d.cts +14 -0
- package/dist/entities/up-permission/index.d.mts +14 -0
- package/dist/entities/up-permission/index.mjs +9 -0
- package/dist/entities/up-role/index.cjs +28 -0
- package/dist/entities/up-role/index.d.cts +7 -0
- package/dist/entities/up-role/index.d.mts +7 -0
- package/dist/entities/up-role/index.mjs +23 -0
- package/dist/entities/up-user/index.cjs +64 -0
- package/dist/entities/up-user/index.d.cts +38 -0
- package/dist/entities/up-user/index.d.mts +38 -0
- package/dist/entities/up-user/index.mjs +54 -0
- package/dist/entities/upload/index.cjs +35 -0
- package/dist/entities/upload/index.d.cts +31 -0
- package/dist/entities/upload/index.d.mts +31 -0
- package/dist/entities/upload/index.mjs +29 -0
- package/dist/entities/url-redirect/index.cjs +67 -0
- package/dist/entities/url-redirect/index.d.cts +45 -0
- package/dist/entities/url-redirect/index.d.mts +45 -0
- package/dist/entities/url-redirect/index.mjs +54 -0
- package/dist/entities/user-account/index.cjs +48 -0
- package/dist/entities/user-account/index.d.cts +39 -0
- package/dist/entities/user-account/index.d.mts +39 -0
- package/dist/entities/user-account/index.mjs +39 -0
- package/dist/entities/utm-link-builder/index.cjs +84 -0
- package/dist/entities/utm-link-builder/index.d.cts +191 -0
- package/dist/entities/utm-link-builder/index.d.mts +191 -0
- package/dist/entities/utm-link-builder/index.mjs +76 -0
- package/dist/entities/utm-meta/index.cjs +19 -0
- package/dist/entities/utm-meta/index.d.cts +83 -0
- package/dist/entities/utm-meta/index.d.mts +83 -0
- package/dist/entities/utm-meta/index.mjs +16 -0
- package/dist/entities/utm-tracking-link/index.cjs +199 -0
- package/dist/entities/utm-tracking-link/index.d.cts +235 -0
- package/dist/entities/utm-tracking-link/index.d.mts +235 -0
- package/dist/entities/utm-tracking-link/index.mjs +184 -0
- package/dist/fields-BQHSYj70.d.cts +7 -0
- package/dist/fields-qx-5saY5.d.mts +7 -0
- package/dist/fonts-CGSHKgp0.cjs +125 -0
- package/dist/fonts-tMy55UFs.mjs +58 -0
- package/dist/index-CPUGB8lZ.d.mts +95 -0
- package/dist/index-DDYmaYSm.d.mts +200 -0
- package/dist/index-Dl6KBLdT.d.mts +422 -0
- package/dist/index-DmLVZdb3.d.cts +200 -0
- package/dist/index-Dv9bgrpo.d.cts +422 -0
- package/dist/index-H4RC0v4h.d.cts +95 -0
- package/dist/json-BJ8GyrtC.d.cts +9 -0
- package/dist/json-BgewUW_1.cjs +19 -0
- package/dist/json-CTduX6Ak.mjs +12 -0
- package/dist/json-CqAaKeHA.d.mts +9 -0
- package/dist/media-upload-B6aQYeRM.cjs +59 -0
- package/dist/media-upload-DiRJksSU.mjs +40 -0
- package/dist/pagination-4pZafglS.cjs +23 -0
- package/dist/pagination-owwfYJS6.mjs +6 -0
- package/dist/{permissions.cjs → permissions/index.cjs} +6 -89
- package/dist/permissions/index.d.cts +2 -0
- package/dist/permissions/index.d.mts +2 -0
- package/dist/{permissions.mjs → permissions/index.mjs} +3 -86
- package/dist/query.schema-BOn5Kk_p.d.mts +41 -0
- package/dist/query.schema-CItKlb0x.d.cts +41 -0
- package/dist/query.schema-DHTf6rTw.cjs +95 -0
- package/dist/query.schema-YKoOuBnk.mjs +40 -0
- package/dist/regex-BnKGcdS4.mjs +55 -0
- package/dist/regex-Cl5goNwp.cjs +342 -0
- package/dist/relations-C04F46xL.mjs +41 -0
- package/dist/relations-CGu18hfT.cjs +90 -0
- package/dist/response-C-7nyNVD.d.mts +57 -0
- package/dist/response-c6SgLvi9.d.cts +57 -0
- package/dist/strapi-C0DtxJLD.mjs +9 -0
- package/dist/strapi-C7POOPEf.cjs +34 -0
- package/dist/strapi-COeswSwJ.mjs +49 -0
- package/dist/strapi-DmhV7ODq.cjs +72 -0
- package/dist/theme-Ba9vW4PA.cjs +230 -0
- package/dist/theme-BhQd4eMI.mjs +97 -0
- package/dist/{utilities.cjs → utilities/index.cjs} +9 -28
- package/dist/utilities/index.d.cts +24 -0
- package/dist/utilities/index.d.mts +24 -0
- package/dist/{utilities.mjs → utilities/index.mjs} +9 -25
- package/dist/validators-Bc9Is5Sr.cjs +222 -0
- package/dist/validators-P5E_3qzc.mjs +95 -0
- package/package.json +64 -40
- package/dist/constants.cjs +0 -461
- package/dist/constants.d.cts +0 -2
- package/dist/constants.d.mts +0 -2
- package/dist/constants.mjs +0 -353
- package/dist/index-CiWVYf_f.d.cts +0 -291
- package/dist/index-D5uEXy4J.d.mts +0 -4509
- package/dist/index-DOR_It7I.d.mts +0 -291
- package/dist/index-Df4iWapE.d.cts +0 -4509
- package/dist/index.cjs +0 -384
- package/dist/index.d.cts +0 -3
- package/dist/index.d.mts +0 -3
- package/dist/index.mjs +0 -6
- package/dist/permissions.d.cts +0 -2
- package/dist/permissions.d.mts +0 -2
- package/dist/schemas.cjs +0 -2326
- package/dist/schemas.d.cts +0 -2
- package/dist/schemas.d.mts +0 -2
- package/dist/schemas.mjs +0 -2068
- package/dist/types.cjs +0 -0
- package/dist/types.d.cts +0 -2
- package/dist/types.d.mts +0 -2
- package/dist/types.mjs +0 -1
- package/dist/utilities.d.cts +0 -2
- package/dist/utilities.d.mts +0 -2
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { J as ERROR_MESSAGE_UTM_URL, K as ERROR_MESSAGE_URL_NO_QUERY_PARAMS, U as ERROR_MESSAGE_INVALID_URL, r as ERROR_MESSAGE_REGEX_UTM_VALUE, s as REGEX_UTM_VALUE } from "../../regex-BnKGcdS4.mjs";
|
|
2
|
+
import { d as VStringMinMax, l as VStringMax, t as VIntegerNullable, u as VStringMaxRegex } from "../../validators-P5E_3qzc.mjs";
|
|
3
|
+
import { a as SAssociateOneEntity } from "../../relations-C04F46xL.mjs";
|
|
4
|
+
import * as v from "valibot";
|
|
5
|
+
//#region src/entities/utm-link-builder/constants.ts
|
|
6
|
+
const UTM_LINK_BUILDER_PART_CAMPAIGN_DATE_OPTIONS = [
|
|
7
|
+
"annually",
|
|
8
|
+
"quarterly",
|
|
9
|
+
"monthly",
|
|
10
|
+
"on a specific date",
|
|
11
|
+
"no date"
|
|
12
|
+
];
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/entities/utm-link-builder/mutation.ts
|
|
15
|
+
const SUtmLinkBuilderPartCampaignDateOptions = UTM_LINK_BUILDER_PART_CAMPAIGN_DATE_OPTIONS;
|
|
16
|
+
const SUtmLinkBuilderCampaign = v.object({
|
|
17
|
+
campaign_phase: VStringMinMax(1, 255),
|
|
18
|
+
campaign_product: v.optional(VStringMax()),
|
|
19
|
+
campaign_targeting: v.optional(v.pipe(v.array(VStringMaxRegex(255, REGEX_UTM_VALUE, ERROR_MESSAGE_REGEX_UTM_VALUE)), v.maxLength(10))),
|
|
20
|
+
campaign_key: v.optional(VStringMaxRegex(255, REGEX_UTM_VALUE, ERROR_MESSAGE_REGEX_UTM_VALUE)),
|
|
21
|
+
campaign_date: v.object({
|
|
22
|
+
format: v.picklist(SUtmLinkBuilderPartCampaignDateOptions),
|
|
23
|
+
value: v.object({
|
|
24
|
+
year: v.number(),
|
|
25
|
+
quarter: VIntegerNullable(),
|
|
26
|
+
month: VIntegerNullable(),
|
|
27
|
+
day: VIntegerNullable()
|
|
28
|
+
})
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
const SUtmLinkBuilderCreativeFormat = v.object({
|
|
32
|
+
creative_format: v.optional(VStringMax(255)),
|
|
33
|
+
creative_format_variants: v.optional(v.array(VStringMax(255))),
|
|
34
|
+
creative_size: v.optional(v.object({
|
|
35
|
+
width: VIntegerNullable(),
|
|
36
|
+
height: VIntegerNullable(),
|
|
37
|
+
key: v.optional(VStringMax(255))
|
|
38
|
+
}))
|
|
39
|
+
});
|
|
40
|
+
const SUtmLinkBuilderTableForm = v.object({
|
|
41
|
+
creator: SAssociateOneEntity,
|
|
42
|
+
client: SAssociateOneEntity,
|
|
43
|
+
variants: v.pipe(v.array(v.object({
|
|
44
|
+
url_destinations: v.pipe(v.array(v.object({ url: v.pipe(v.string(), v.trim(), v.url(ERROR_MESSAGE_INVALID_URL), v.check((input) => {
|
|
45
|
+
if (input === "") return false;
|
|
46
|
+
return input.indexOf("?") === -1;
|
|
47
|
+
}, ERROR_MESSAGE_URL_NO_QUERY_PARAMS)) })), v.minLength(1), v.maxLength(100)),
|
|
48
|
+
source: VStringMax(255),
|
|
49
|
+
mediums: v.pipe(v.array(VStringMax(255)), v.minLength(1), v.maxLength(10)),
|
|
50
|
+
campaign: SUtmLinkBuilderCampaign,
|
|
51
|
+
content: v.optional(VStringMax(255)),
|
|
52
|
+
creative_formats: v.optional(v.pipe(v.array(SUtmLinkBuilderCreativeFormat), v.maxLength(10))),
|
|
53
|
+
id: v.optional(VStringMinMax(1, 255))
|
|
54
|
+
})), v.minLength(1), v.maxLength(10)),
|
|
55
|
+
notes: v.optional(VStringMax())
|
|
56
|
+
});
|
|
57
|
+
const SUtmLinkBuilderSingleForm = v.object({
|
|
58
|
+
creator: SAssociateOneEntity,
|
|
59
|
+
client: SAssociateOneEntity,
|
|
60
|
+
url_destination: v.pipe(v.string(), v.trim(), v.url(ERROR_MESSAGE_INVALID_URL), v.check((input) => {
|
|
61
|
+
if (input === "") return false;
|
|
62
|
+
return input.indexOf("?") === -1;
|
|
63
|
+
}, ERROR_MESSAGE_URL_NO_QUERY_PARAMS)),
|
|
64
|
+
source: VStringMax(255),
|
|
65
|
+
medium: VStringMax(255),
|
|
66
|
+
campaign: SUtmLinkBuilderCampaign,
|
|
67
|
+
content: v.optional(VStringMax(255)),
|
|
68
|
+
creative_format: v.optional(SUtmLinkBuilderCreativeFormat),
|
|
69
|
+
id: v.optional(VStringMinMax(1, 255)),
|
|
70
|
+
url: v.pipe(v.string(), v.trim(), v.url(ERROR_MESSAGE_INVALID_URL), v.check((input) => {
|
|
71
|
+
return input.includes("utm_");
|
|
72
|
+
}, ERROR_MESSAGE_UTM_URL)),
|
|
73
|
+
notes: v.optional(VStringMax())
|
|
74
|
+
});
|
|
75
|
+
//#endregion
|
|
76
|
+
export { SUtmLinkBuilderCampaign, SUtmLinkBuilderCreativeFormat, SUtmLinkBuilderPartCampaignDateOptions, SUtmLinkBuilderSingleForm, SUtmLinkBuilderTableForm, UTM_LINK_BUILDER_PART_CAMPAIGN_DATE_OPTIONS };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_chunk = require("../../chunk-CKQMccvm.cjs");
|
|
3
|
+
const require_document = require("../../document-BAro2Mrj.cjs");
|
|
4
|
+
const require_components_utm_index = require("../../components/utm/index.cjs");
|
|
5
|
+
let valibot = require("valibot");
|
|
6
|
+
valibot = require_chunk.__toESM(valibot, 1);
|
|
7
|
+
//#region src/entities/utm-meta/document.ts
|
|
8
|
+
const UtmMetaPageDocument = valibot.object({
|
|
9
|
+
...require_document.BaseDocument.entries,
|
|
10
|
+
source_options: valibot.array(require_components_utm_index.ComponentUtmOption),
|
|
11
|
+
medium_options: valibot.array(require_components_utm_index.ComponentUtmOption),
|
|
12
|
+
campaign_phase_options: valibot.array(require_components_utm_index.ComponentUtmOption),
|
|
13
|
+
campaign_targeting_options: valibot.array(require_components_utm_index.ComponentUtmOption),
|
|
14
|
+
content_pillar_options: valibot.array(require_components_utm_index.ComponentUtmOption),
|
|
15
|
+
creative_format_options: valibot.array(require_components_utm_index.ComponentUtmOption),
|
|
16
|
+
creative_variant_options: valibot.array(require_components_utm_index.ComponentUtmOption)
|
|
17
|
+
});
|
|
18
|
+
//#endregion
|
|
19
|
+
exports.UtmMetaPageDocument = UtmMetaPageDocument;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import * as v from "valibot";
|
|
2
|
+
|
|
3
|
+
//#region src/entities/utm-meta/document.d.ts
|
|
4
|
+
declare const UtmMetaPageDocument: v.ObjectSchema<{
|
|
5
|
+
readonly source_options: v.ArraySchema<v.ObjectSchema<{
|
|
6
|
+
readonly label: v.StringSchema<undefined>;
|
|
7
|
+
readonly value: v.StringSchema<undefined>;
|
|
8
|
+
readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
9
|
+
readonly is_active: v.BooleanSchema<undefined>;
|
|
10
|
+
readonly active_by_classification: v.ArraySchema<v.PicklistSchema<readonly ["organic", "paid"], undefined>, undefined>;
|
|
11
|
+
readonly active_by_source: v.ArraySchema<v.PicklistSchema<readonly ["organic", "paid"], undefined>, undefined>;
|
|
12
|
+
readonly id: v.NumberSchema<undefined>;
|
|
13
|
+
readonly __component: v.StringSchema<undefined>;
|
|
14
|
+
}, undefined>, undefined>;
|
|
15
|
+
readonly medium_options: v.ArraySchema<v.ObjectSchema<{
|
|
16
|
+
readonly label: v.StringSchema<undefined>;
|
|
17
|
+
readonly value: v.StringSchema<undefined>;
|
|
18
|
+
readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
19
|
+
readonly is_active: v.BooleanSchema<undefined>;
|
|
20
|
+
readonly active_by_classification: v.ArraySchema<v.PicklistSchema<readonly ["organic", "paid"], undefined>, undefined>;
|
|
21
|
+
readonly active_by_source: v.ArraySchema<v.PicklistSchema<readonly ["organic", "paid"], undefined>, undefined>;
|
|
22
|
+
readonly id: v.NumberSchema<undefined>;
|
|
23
|
+
readonly __component: v.StringSchema<undefined>;
|
|
24
|
+
}, undefined>, undefined>;
|
|
25
|
+
readonly campaign_phase_options: v.ArraySchema<v.ObjectSchema<{
|
|
26
|
+
readonly label: v.StringSchema<undefined>;
|
|
27
|
+
readonly value: v.StringSchema<undefined>;
|
|
28
|
+
readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
29
|
+
readonly is_active: v.BooleanSchema<undefined>;
|
|
30
|
+
readonly active_by_classification: v.ArraySchema<v.PicklistSchema<readonly ["organic", "paid"], undefined>, undefined>;
|
|
31
|
+
readonly active_by_source: v.ArraySchema<v.PicklistSchema<readonly ["organic", "paid"], undefined>, undefined>;
|
|
32
|
+
readonly id: v.NumberSchema<undefined>;
|
|
33
|
+
readonly __component: v.StringSchema<undefined>;
|
|
34
|
+
}, undefined>, undefined>;
|
|
35
|
+
readonly campaign_targeting_options: v.ArraySchema<v.ObjectSchema<{
|
|
36
|
+
readonly label: v.StringSchema<undefined>;
|
|
37
|
+
readonly value: v.StringSchema<undefined>;
|
|
38
|
+
readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
39
|
+
readonly is_active: v.BooleanSchema<undefined>;
|
|
40
|
+
readonly active_by_classification: v.ArraySchema<v.PicklistSchema<readonly ["organic", "paid"], undefined>, undefined>;
|
|
41
|
+
readonly active_by_source: v.ArraySchema<v.PicklistSchema<readonly ["organic", "paid"], undefined>, undefined>;
|
|
42
|
+
readonly id: v.NumberSchema<undefined>;
|
|
43
|
+
readonly __component: v.StringSchema<undefined>;
|
|
44
|
+
}, undefined>, undefined>;
|
|
45
|
+
readonly content_pillar_options: v.ArraySchema<v.ObjectSchema<{
|
|
46
|
+
readonly label: v.StringSchema<undefined>;
|
|
47
|
+
readonly value: v.StringSchema<undefined>;
|
|
48
|
+
readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
49
|
+
readonly is_active: v.BooleanSchema<undefined>;
|
|
50
|
+
readonly active_by_classification: v.ArraySchema<v.PicklistSchema<readonly ["organic", "paid"], undefined>, undefined>;
|
|
51
|
+
readonly active_by_source: v.ArraySchema<v.PicklistSchema<readonly ["organic", "paid"], undefined>, undefined>;
|
|
52
|
+
readonly id: v.NumberSchema<undefined>;
|
|
53
|
+
readonly __component: v.StringSchema<undefined>;
|
|
54
|
+
}, undefined>, undefined>;
|
|
55
|
+
readonly creative_format_options: v.ArraySchema<v.ObjectSchema<{
|
|
56
|
+
readonly label: v.StringSchema<undefined>;
|
|
57
|
+
readonly value: v.StringSchema<undefined>;
|
|
58
|
+
readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
59
|
+
readonly is_active: v.BooleanSchema<undefined>;
|
|
60
|
+
readonly active_by_classification: v.ArraySchema<v.PicklistSchema<readonly ["organic", "paid"], undefined>, undefined>;
|
|
61
|
+
readonly active_by_source: v.ArraySchema<v.PicklistSchema<readonly ["organic", "paid"], undefined>, undefined>;
|
|
62
|
+
readonly id: v.NumberSchema<undefined>;
|
|
63
|
+
readonly __component: v.StringSchema<undefined>;
|
|
64
|
+
}, undefined>, undefined>;
|
|
65
|
+
readonly creative_variant_options: v.ArraySchema<v.ObjectSchema<{
|
|
66
|
+
readonly label: v.StringSchema<undefined>;
|
|
67
|
+
readonly value: v.StringSchema<undefined>;
|
|
68
|
+
readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
69
|
+
readonly is_active: v.BooleanSchema<undefined>;
|
|
70
|
+
readonly active_by_classification: v.ArraySchema<v.PicklistSchema<readonly ["organic", "paid"], undefined>, undefined>;
|
|
71
|
+
readonly active_by_source: v.ArraySchema<v.PicklistSchema<readonly ["organic", "paid"], undefined>, undefined>;
|
|
72
|
+
readonly id: v.NumberSchema<undefined>;
|
|
73
|
+
readonly __component: v.StringSchema<undefined>;
|
|
74
|
+
}, undefined>, undefined>;
|
|
75
|
+
readonly id: v.NumberSchema<undefined>;
|
|
76
|
+
readonly documentId: v.StringSchema<undefined>;
|
|
77
|
+
readonly publishedAt: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
78
|
+
readonly createdAt: v.StringSchema<undefined>;
|
|
79
|
+
readonly updatedAt: v.StringSchema<undefined>;
|
|
80
|
+
}, undefined>;
|
|
81
|
+
type UtmMetaPageDocument = v.InferOutput<typeof UtmMetaPageDocument>;
|
|
82
|
+
//#endregion
|
|
83
|
+
export { UtmMetaPageDocument };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import * as v from "valibot";
|
|
2
|
+
|
|
3
|
+
//#region src/entities/utm-meta/document.d.ts
|
|
4
|
+
declare const UtmMetaPageDocument: v.ObjectSchema<{
|
|
5
|
+
readonly source_options: v.ArraySchema<v.ObjectSchema<{
|
|
6
|
+
readonly label: v.StringSchema<undefined>;
|
|
7
|
+
readonly value: v.StringSchema<undefined>;
|
|
8
|
+
readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
9
|
+
readonly is_active: v.BooleanSchema<undefined>;
|
|
10
|
+
readonly active_by_classification: v.ArraySchema<v.PicklistSchema<readonly ["organic", "paid"], undefined>, undefined>;
|
|
11
|
+
readonly active_by_source: v.ArraySchema<v.PicklistSchema<readonly ["organic", "paid"], undefined>, undefined>;
|
|
12
|
+
readonly id: v.NumberSchema<undefined>;
|
|
13
|
+
readonly __component: v.StringSchema<undefined>;
|
|
14
|
+
}, undefined>, undefined>;
|
|
15
|
+
readonly medium_options: v.ArraySchema<v.ObjectSchema<{
|
|
16
|
+
readonly label: v.StringSchema<undefined>;
|
|
17
|
+
readonly value: v.StringSchema<undefined>;
|
|
18
|
+
readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
19
|
+
readonly is_active: v.BooleanSchema<undefined>;
|
|
20
|
+
readonly active_by_classification: v.ArraySchema<v.PicklistSchema<readonly ["organic", "paid"], undefined>, undefined>;
|
|
21
|
+
readonly active_by_source: v.ArraySchema<v.PicklistSchema<readonly ["organic", "paid"], undefined>, undefined>;
|
|
22
|
+
readonly id: v.NumberSchema<undefined>;
|
|
23
|
+
readonly __component: v.StringSchema<undefined>;
|
|
24
|
+
}, undefined>, undefined>;
|
|
25
|
+
readonly campaign_phase_options: v.ArraySchema<v.ObjectSchema<{
|
|
26
|
+
readonly label: v.StringSchema<undefined>;
|
|
27
|
+
readonly value: v.StringSchema<undefined>;
|
|
28
|
+
readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
29
|
+
readonly is_active: v.BooleanSchema<undefined>;
|
|
30
|
+
readonly active_by_classification: v.ArraySchema<v.PicklistSchema<readonly ["organic", "paid"], undefined>, undefined>;
|
|
31
|
+
readonly active_by_source: v.ArraySchema<v.PicklistSchema<readonly ["organic", "paid"], undefined>, undefined>;
|
|
32
|
+
readonly id: v.NumberSchema<undefined>;
|
|
33
|
+
readonly __component: v.StringSchema<undefined>;
|
|
34
|
+
}, undefined>, undefined>;
|
|
35
|
+
readonly campaign_targeting_options: v.ArraySchema<v.ObjectSchema<{
|
|
36
|
+
readonly label: v.StringSchema<undefined>;
|
|
37
|
+
readonly value: v.StringSchema<undefined>;
|
|
38
|
+
readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
39
|
+
readonly is_active: v.BooleanSchema<undefined>;
|
|
40
|
+
readonly active_by_classification: v.ArraySchema<v.PicklistSchema<readonly ["organic", "paid"], undefined>, undefined>;
|
|
41
|
+
readonly active_by_source: v.ArraySchema<v.PicklistSchema<readonly ["organic", "paid"], undefined>, undefined>;
|
|
42
|
+
readonly id: v.NumberSchema<undefined>;
|
|
43
|
+
readonly __component: v.StringSchema<undefined>;
|
|
44
|
+
}, undefined>, undefined>;
|
|
45
|
+
readonly content_pillar_options: v.ArraySchema<v.ObjectSchema<{
|
|
46
|
+
readonly label: v.StringSchema<undefined>;
|
|
47
|
+
readonly value: v.StringSchema<undefined>;
|
|
48
|
+
readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
49
|
+
readonly is_active: v.BooleanSchema<undefined>;
|
|
50
|
+
readonly active_by_classification: v.ArraySchema<v.PicklistSchema<readonly ["organic", "paid"], undefined>, undefined>;
|
|
51
|
+
readonly active_by_source: v.ArraySchema<v.PicklistSchema<readonly ["organic", "paid"], undefined>, undefined>;
|
|
52
|
+
readonly id: v.NumberSchema<undefined>;
|
|
53
|
+
readonly __component: v.StringSchema<undefined>;
|
|
54
|
+
}, undefined>, undefined>;
|
|
55
|
+
readonly creative_format_options: v.ArraySchema<v.ObjectSchema<{
|
|
56
|
+
readonly label: v.StringSchema<undefined>;
|
|
57
|
+
readonly value: v.StringSchema<undefined>;
|
|
58
|
+
readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
59
|
+
readonly is_active: v.BooleanSchema<undefined>;
|
|
60
|
+
readonly active_by_classification: v.ArraySchema<v.PicklistSchema<readonly ["organic", "paid"], undefined>, undefined>;
|
|
61
|
+
readonly active_by_source: v.ArraySchema<v.PicklistSchema<readonly ["organic", "paid"], undefined>, undefined>;
|
|
62
|
+
readonly id: v.NumberSchema<undefined>;
|
|
63
|
+
readonly __component: v.StringSchema<undefined>;
|
|
64
|
+
}, undefined>, undefined>;
|
|
65
|
+
readonly creative_variant_options: v.ArraySchema<v.ObjectSchema<{
|
|
66
|
+
readonly label: v.StringSchema<undefined>;
|
|
67
|
+
readonly value: v.StringSchema<undefined>;
|
|
68
|
+
readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
69
|
+
readonly is_active: v.BooleanSchema<undefined>;
|
|
70
|
+
readonly active_by_classification: v.ArraySchema<v.PicklistSchema<readonly ["organic", "paid"], undefined>, undefined>;
|
|
71
|
+
readonly active_by_source: v.ArraySchema<v.PicklistSchema<readonly ["organic", "paid"], undefined>, undefined>;
|
|
72
|
+
readonly id: v.NumberSchema<undefined>;
|
|
73
|
+
readonly __component: v.StringSchema<undefined>;
|
|
74
|
+
}, undefined>, undefined>;
|
|
75
|
+
readonly id: v.NumberSchema<undefined>;
|
|
76
|
+
readonly documentId: v.StringSchema<undefined>;
|
|
77
|
+
readonly publishedAt: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
78
|
+
readonly createdAt: v.StringSchema<undefined>;
|
|
79
|
+
readonly updatedAt: v.StringSchema<undefined>;
|
|
80
|
+
}, undefined>;
|
|
81
|
+
type UtmMetaPageDocument = v.InferOutput<typeof UtmMetaPageDocument>;
|
|
82
|
+
//#endregion
|
|
83
|
+
export { UtmMetaPageDocument };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { t as BaseDocument } from "../../document-Bqoi1MdT.mjs";
|
|
2
|
+
import { ComponentUtmOption } from "../../components/utm/index.mjs";
|
|
3
|
+
import * as v from "valibot";
|
|
4
|
+
//#region src/entities/utm-meta/document.ts
|
|
5
|
+
const UtmMetaPageDocument = v.object({
|
|
6
|
+
...BaseDocument.entries,
|
|
7
|
+
source_options: v.array(ComponentUtmOption),
|
|
8
|
+
medium_options: v.array(ComponentUtmOption),
|
|
9
|
+
campaign_phase_options: v.array(ComponentUtmOption),
|
|
10
|
+
campaign_targeting_options: v.array(ComponentUtmOption),
|
|
11
|
+
content_pillar_options: v.array(ComponentUtmOption),
|
|
12
|
+
creative_format_options: v.array(ComponentUtmOption),
|
|
13
|
+
creative_variant_options: v.array(ComponentUtmOption)
|
|
14
|
+
});
|
|
15
|
+
//#endregion
|
|
16
|
+
export { UtmMetaPageDocument };
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_chunk = require("../../chunk-CKQMccvm.cjs");
|
|
3
|
+
const require_document = require("../../document-BAro2Mrj.cjs");
|
|
4
|
+
const require_regex = require("../../regex-Cl5goNwp.cjs");
|
|
5
|
+
const require_validators = require("../../validators-Bc9Is5Sr.cjs");
|
|
6
|
+
const require_relations = require("../../relations-CGu18hfT.cjs");
|
|
7
|
+
let valibot = require("valibot");
|
|
8
|
+
valibot = require_chunk.__toESM(valibot, 1);
|
|
9
|
+
//#region src/entities/utm-tracking-link/constants.ts
|
|
10
|
+
const LIMIT_UTM_TRACKING_LINK_PAGINATION_DEFAULT_SIZE = 10;
|
|
11
|
+
const LIMIT_UTM_TRACKING_LINK_PAGINATION_MAX_SIZE = 100;
|
|
12
|
+
const UTM_TRACKING_LINK_SORT_KEYS = [
|
|
13
|
+
"id",
|
|
14
|
+
"creator",
|
|
15
|
+
"client",
|
|
16
|
+
"url_destination",
|
|
17
|
+
"utm_medium",
|
|
18
|
+
"utm_source",
|
|
19
|
+
"utm_campaign",
|
|
20
|
+
"utm_content",
|
|
21
|
+
"utm_creative_format",
|
|
22
|
+
"utm_id",
|
|
23
|
+
"campaign_phase",
|
|
24
|
+
"campaign_product",
|
|
25
|
+
"campaign_targeting",
|
|
26
|
+
"campaign_key",
|
|
27
|
+
"creative_format",
|
|
28
|
+
"creative_format_variants",
|
|
29
|
+
"url",
|
|
30
|
+
"is_active",
|
|
31
|
+
"createdAt",
|
|
32
|
+
"updatedAt"
|
|
33
|
+
];
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/entities/utm-tracking-link/document.ts
|
|
36
|
+
const UtmTrackingLinkDocument = valibot.object({
|
|
37
|
+
...require_document.BaseDocument.entries,
|
|
38
|
+
url_destination: valibot.string(),
|
|
39
|
+
utm_medium: valibot.string(),
|
|
40
|
+
utm_source: valibot.string(),
|
|
41
|
+
utm_campaign: valibot.string(),
|
|
42
|
+
utm_content: valibot.nullable(valibot.string()),
|
|
43
|
+
utm_creative_format: valibot.nullable(valibot.string()),
|
|
44
|
+
utm_id: valibot.nullable(valibot.string()),
|
|
45
|
+
campaign_phase: valibot.string(),
|
|
46
|
+
campaign_product: valibot.nullable(valibot.string()),
|
|
47
|
+
campaign_targeting: valibot.nullable(valibot.string()),
|
|
48
|
+
campaign_key: valibot.nullable(valibot.string()),
|
|
49
|
+
creative_format: valibot.nullable(valibot.string()),
|
|
50
|
+
creative_format_variants: valibot.nullable(valibot.string()),
|
|
51
|
+
url: valibot.string(),
|
|
52
|
+
is_active: valibot.boolean(),
|
|
53
|
+
notes: valibot.nullable(valibot.string())
|
|
54
|
+
});
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/entities/utm-tracking-link/fields.ts
|
|
57
|
+
const QuerySortUtmTrackingLinks = valibot.optional(valibot.pipe(valibot.array(valibot.picklist(UTM_TRACKING_LINK_SORT_KEYS.flatMap((k) => [`${k}:ASC`, `${k}:DESC`]))), valibot.maxLength(UTM_TRACKING_LINK_SORT_KEYS.length)));
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region src/entities/utm-tracking-link/mutation.ts
|
|
60
|
+
const CreateUtmTrackingLinkDocument = valibot.object({
|
|
61
|
+
creator: require_validators.VStringShort(),
|
|
62
|
+
client: require_validators.VStringShort(),
|
|
63
|
+
url_destination: require_validators.VStringUrlNoUtm(),
|
|
64
|
+
utm_source: require_validators.VStringMinMaxRegex(1, require_regex.LIMIT_MAX_UTM_SOURCE, require_regex.REGEX_UTM_VALUE, require_regex.ERROR_MESSAGE_REGEX_UTM_VALUE),
|
|
65
|
+
utm_medium: require_validators.VStringMinMaxRegex(1, require_regex.LIMIT_MAX_UTM_MEDIUM, require_regex.REGEX_UTM_VALUE, require_regex.ERROR_MESSAGE_REGEX_UTM_VALUE),
|
|
66
|
+
utm_campaign: require_validators.VStringMinMaxRegex(1, require_regex.LIMIT_MAX_UTM_CAMPAIGN, require_regex.REGEX_UTM_VALUE, require_regex.ERROR_MESSAGE_REGEX_UTM_VALUE),
|
|
67
|
+
utm_content: require_validators.VStringShortNullable(),
|
|
68
|
+
utm_creative_format: require_validators.VStringShortNullable(),
|
|
69
|
+
utm_id: require_validators.VStringShortNullable(),
|
|
70
|
+
campaign_phase: require_validators.VStringShort(),
|
|
71
|
+
campaign_product: require_validators.VStringShortNullable(),
|
|
72
|
+
campaign_targeting: valibot.optional(valibot.nullable(valibot.pipe(valibot.array(require_validators.VStringMax()), valibot.transform((value) => value.join(","))))),
|
|
73
|
+
campaign_key: valibot.optional(valibot.nullable(require_validators.VStringMinMaxRegex(1, 255, require_regex.REGEX_UTM_VALUE, require_regex.ERROR_MESSAGE_REGEX_UTM_VALUE))),
|
|
74
|
+
creative_format: require_validators.VStringShortNullable(),
|
|
75
|
+
creative_format_variants: valibot.optional(valibot.nullable(valibot.pipe(valibot.array(require_validators.VStringMax()), valibot.transform((value) => value.join(","))))),
|
|
76
|
+
url: valibot.pipe(valibot.string(), valibot.trim(), valibot.url(require_regex.ERROR_MESSAGE_INVALID_URL), valibot.check((input) => {
|
|
77
|
+
return input.includes("utm_");
|
|
78
|
+
}, require_regex.ERROR_MESSAGE_UTM_URL)),
|
|
79
|
+
is_active: valibot.boolean(),
|
|
80
|
+
notes: require_validators.VStringLongNullable()
|
|
81
|
+
});
|
|
82
|
+
const CreateUtmTrackingLinkDocumentRequest = valibot.object({
|
|
83
|
+
creator: require_validators.VStringShort(),
|
|
84
|
+
client: require_validators.VStringShort(),
|
|
85
|
+
url_destination: require_validators.VStringUrlNoUtm(),
|
|
86
|
+
utm_source: require_validators.VStringMinMaxRegex(1, require_regex.LIMIT_MAX_UTM_SOURCE, require_regex.REGEX_UTM_VALUE, require_regex.ERROR_MESSAGE_REGEX_UTM_VALUE),
|
|
87
|
+
utm_medium: require_validators.VStringMinMaxRegex(1, require_regex.LIMIT_MAX_UTM_MEDIUM, require_regex.REGEX_UTM_VALUE, require_regex.ERROR_MESSAGE_REGEX_UTM_VALUE),
|
|
88
|
+
utm_campaign: require_validators.VStringMinMaxRegex(1, require_regex.LIMIT_MAX_UTM_CAMPAIGN, require_regex.REGEX_UTM_VALUE, require_regex.ERROR_MESSAGE_REGEX_UTM_VALUE),
|
|
89
|
+
utm_content: valibot.optional(valibot.nullable(require_validators.VStringMinMax(1, 255))),
|
|
90
|
+
utm_creative_format: valibot.optional(valibot.nullable(require_validators.VStringMinMax(1, 255))),
|
|
91
|
+
utm_id: valibot.optional(valibot.nullable(require_validators.VStringMinMax(1, 255))),
|
|
92
|
+
campaign_phase: require_validators.VStringShort(),
|
|
93
|
+
campaign_product: valibot.optional(valibot.nullable(require_validators.VStringMinMax(1, 255))),
|
|
94
|
+
campaign_targeting: require_validators.VStringShortNullable(),
|
|
95
|
+
campaign_key: valibot.optional(valibot.nullable(require_validators.VStringMinMaxRegex(1, 255, require_regex.REGEX_UTM_VALUE, require_regex.ERROR_MESSAGE_REGEX_UTM_VALUE))),
|
|
96
|
+
creative_format: valibot.optional(valibot.nullable(require_validators.VStringMinMax(1, 255))),
|
|
97
|
+
creative_format_variants: require_validators.VStringShortNullable(),
|
|
98
|
+
url: valibot.pipe(valibot.string(), valibot.trim(), valibot.url(require_regex.ERROR_MESSAGE_INVALID_URL), valibot.check((input) => {
|
|
99
|
+
return input.includes("utm_");
|
|
100
|
+
}, require_regex.ERROR_MESSAGE_UTM_URL)),
|
|
101
|
+
is_active: valibot.boolean(),
|
|
102
|
+
notes: valibot.optional(valibot.nullable(require_validators.VStringMinMaxRegex(1, require_regex.LIMIT_LONG_STRING_MAX_LENGTH, require_regex.REGEX_UTM_VALUE, require_regex.ERROR_MESSAGE_REGEX_UTM_VALUE)))
|
|
103
|
+
});
|
|
104
|
+
const CreateUtmTrackingLinkParts = valibot.object({
|
|
105
|
+
url_destination: require_validators.VStringUrlNoUtm(),
|
|
106
|
+
utm_source: require_validators.VStringMinMaxRegex(1, require_regex.LIMIT_MAX_UTM_SOURCE, require_regex.REGEX_UTM_VALUE, require_regex.ERROR_MESSAGE_REGEX_UTM_VALUE),
|
|
107
|
+
utm_medium: require_validators.VStringMinMaxRegex(1, require_regex.LIMIT_MAX_UTM_MEDIUM, require_regex.REGEX_UTM_VALUE, require_regex.ERROR_MESSAGE_REGEX_UTM_VALUE),
|
|
108
|
+
utm_campaign: require_validators.VStringMinMaxRegex(1, require_regex.LIMIT_MAX_UTM_CAMPAIGN, require_regex.REGEX_UTM_VALUE, require_regex.ERROR_MESSAGE_REGEX_UTM_VALUE),
|
|
109
|
+
utm_content: valibot.optional(valibot.nullable(require_validators.VStringMinMax(1, 255))),
|
|
110
|
+
utm_creative_format: valibot.optional(valibot.nullable(require_validators.VStringMinMax(1, 255))),
|
|
111
|
+
utm_id: valibot.optional(valibot.nullable(require_validators.VStringMinMax(1, 255))),
|
|
112
|
+
campaign_phase: require_validators.VStringShort(),
|
|
113
|
+
campaign_product: valibot.optional(valibot.nullable(require_validators.VStringMinMax(1, 255))),
|
|
114
|
+
campaign_targeting: valibot.optional(valibot.nullable(valibot.pipe(valibot.array(require_validators.VStringShort()), valibot.transform((value) => value.join(","))))),
|
|
115
|
+
campaign_key: valibot.optional(require_validators.VStringMinMaxRegex(1, 255, require_regex.REGEX_UTM_VALUE, require_regex.ERROR_MESSAGE_REGEX_UTM_VALUE)),
|
|
116
|
+
creative_format: valibot.optional(valibot.nullable(require_validators.VStringMinMax(1, 255))),
|
|
117
|
+
creative_format_variants: valibot.optional(valibot.nullable(valibot.pipe(valibot.array(require_validators.VStringShort()), valibot.transform((value) => value.join(","))))),
|
|
118
|
+
url: require_validators.VStringUrlUtm(),
|
|
119
|
+
is_active: valibot.boolean(),
|
|
120
|
+
notes: valibot.optional(valibot.nullable(require_validators.VStringMinMaxRegex(1, require_regex.LIMIT_LONG_STRING_MAX_LENGTH, require_regex.REGEX_UTM_VALUE, require_regex.ERROR_MESSAGE_REGEX_UTM_VALUE)))
|
|
121
|
+
});
|
|
122
|
+
const SFormCreateMultipleUtmTrackingLinkDocuments = valibot.object({
|
|
123
|
+
creator: require_validators.VStringShort(),
|
|
124
|
+
client: require_validators.VStringShort(),
|
|
125
|
+
links: valibot.pipe(valibot.array(CreateUtmTrackingLinkParts), valibot.minLength(1), valibot.maxLength(100))
|
|
126
|
+
});
|
|
127
|
+
const SReadUtmTrackingLinkDocumentByUrl = valibot.object({ url: valibot.pipe(valibot.string(), valibot.trim(), valibot.url(require_regex.ERROR_MESSAGE_INVALID_URL), valibot.check((input) => {
|
|
128
|
+
return input.includes("utm_");
|
|
129
|
+
}, require_regex.ERROR_MESSAGE_UTM_URL)) });
|
|
130
|
+
const UpdateUtmTrackingLinkDocument = valibot.object({
|
|
131
|
+
creator: valibot.optional(require_validators.VStringShort()),
|
|
132
|
+
client: valibot.optional(require_validators.VStringShort()),
|
|
133
|
+
url_destination: require_validators.VStringUrlNoUtm(),
|
|
134
|
+
utm_source: require_validators.VStringMinMaxRegex(1, require_regex.LIMIT_MAX_UTM_SOURCE, require_regex.REGEX_UTM_VALUE, require_regex.ERROR_MESSAGE_REGEX_UTM_VALUE),
|
|
135
|
+
utm_medium: require_validators.VStringMinMaxRegex(1, require_regex.LIMIT_MAX_UTM_MEDIUM, require_regex.REGEX_UTM_VALUE, require_regex.ERROR_MESSAGE_REGEX_UTM_VALUE),
|
|
136
|
+
utm_campaign: require_validators.VStringMinMaxRegex(1, require_regex.LIMIT_MAX_UTM_CAMPAIGN, require_regex.REGEX_UTM_VALUE, require_regex.ERROR_MESSAGE_REGEX_UTM_VALUE),
|
|
137
|
+
utm_content: valibot.optional(valibot.nullable(require_validators.VStringMinMax(1, 255))),
|
|
138
|
+
utm_creative_format: valibot.optional(valibot.nullable(require_validators.VStringMinMax(1, 255))),
|
|
139
|
+
utm_id: valibot.optional(valibot.nullable(require_validators.VStringMinMax(1, 255))),
|
|
140
|
+
campaign_phase: require_validators.VStringShort(),
|
|
141
|
+
campaign_product: valibot.optional(valibot.nullable(require_validators.VStringMinMax(1, 255))),
|
|
142
|
+
campaign_targeting: valibot.optional(valibot.nullable(valibot.pipe(valibot.array(require_validators.VStringShort()), valibot.transform((value) => value.join(","))))),
|
|
143
|
+
campaign_key: valibot.optional(valibot.nullable(require_validators.VStringMinMaxRegex(1, 255, require_regex.REGEX_UTM_VALUE, require_regex.ERROR_MESSAGE_REGEX_UTM_VALUE))),
|
|
144
|
+
creative_format: valibot.optional(valibot.nullable(require_validators.VStringMinMax(1, 255))),
|
|
145
|
+
creative_format_variants: valibot.optional(valibot.nullable(valibot.pipe(valibot.array(require_relations.SAssociateOneEntity), valibot.transform((value) => value.join(","))))),
|
|
146
|
+
url: require_validators.VStringUrlUtm(),
|
|
147
|
+
is_active: valibot.boolean(),
|
|
148
|
+
notes: valibot.optional(valibot.nullable(require_validators.VStringMinMaxRegex(1, require_regex.LIMIT_LONG_STRING_MAX_LENGTH, require_regex.REGEX_UTM_VALUE, require_regex.ERROR_MESSAGE_REGEX_UTM_VALUE)))
|
|
149
|
+
});
|
|
150
|
+
const UpdateUtmTrackingLinkDocumentRequest = valibot.object({
|
|
151
|
+
documentId: require_relations.SAssociateOneEntity,
|
|
152
|
+
data: UpdateUtmTrackingLinkDocument
|
|
153
|
+
});
|
|
154
|
+
//#endregion
|
|
155
|
+
//#region src/entities/utm-tracking-link/query.ts
|
|
156
|
+
const QueryStrapiSearchUtmTrackingLinks = valibot.object({
|
|
157
|
+
page: require_validators.VPage(),
|
|
158
|
+
size: require_validators.VSize(100),
|
|
159
|
+
client_id: valibot.optional(require_validators.VStringShort()),
|
|
160
|
+
creator_id: valibot.optional(require_validators.VStringShort()),
|
|
161
|
+
clients: valibot.optional(require_relations.SQueryManyEntities),
|
|
162
|
+
users: valibot.optional(require_relations.SQueryManyEntities),
|
|
163
|
+
url_destination: valibot.optional(valibot.pipe(valibot.string(), valibot.trim(), valibot.url(require_regex.ERROR_MESSAGE_INVALID_URL), valibot.check((input) => {
|
|
164
|
+
if (input === "") return false;
|
|
165
|
+
return input.indexOf("?") === -1;
|
|
166
|
+
}, require_regex.ERROR_MESSAGE_URL_NO_QUERY_PARAMS))),
|
|
167
|
+
utm_medium: valibot.optional(require_validators.VStringMinMaxRegex(1, require_regex.LIMIT_MAX_UTM_MEDIUM, require_regex.REGEX_UTM_VALUE, require_regex.ERROR_MESSAGE_REGEX_UTM_VALUE)),
|
|
168
|
+
utm_source: valibot.optional(require_validators.VStringMinMaxRegex(1, require_regex.LIMIT_MAX_UTM_SOURCE, require_regex.REGEX_UTM_VALUE, require_regex.ERROR_MESSAGE_REGEX_UTM_VALUE)),
|
|
169
|
+
utm_campaign: valibot.optional(require_validators.VStringMinMaxRegex(1, require_regex.LIMIT_MAX_UTM_CAMPAIGN, require_regex.REGEX_UTM_VALUE, require_regex.ERROR_MESSAGE_REGEX_UTM_VALUE)),
|
|
170
|
+
utm_content: valibot.optional(require_validators.VStringMinMaxRegex(1, require_regex.LIMIT_MAX_UTM_CONTENT, require_regex.REGEX_UTM_VALUE, require_regex.ERROR_MESSAGE_REGEX_UTM_VALUE)),
|
|
171
|
+
utm_creative_format: valibot.optional(require_validators.VStringMinMaxRegex(1, require_regex.LIMIT_MAX_UTM_CREATIVE_FORMAT, require_regex.REGEX_UTM_VALUE, require_regex.ERROR_MESSAGE_REGEX_UTM_VALUE)),
|
|
172
|
+
utm_id: valibot.optional(require_validators.VStringMinMaxRegex(1, require_regex.LIMIT_MAX_UTM_ID, require_regex.REGEX_UTM_VALUE, require_regex.ERROR_MESSAGE_REGEX_UTM_VALUE)),
|
|
173
|
+
campaign_phase: valibot.optional(require_validators.VStringShort(0)),
|
|
174
|
+
campaign_product: valibot.optional(require_validators.VStringShort(0)),
|
|
175
|
+
campaign_targeting: valibot.optional(require_validators.VStringShort(0)),
|
|
176
|
+
campaign_key: valibot.optional(require_validators.VStringShort(0)),
|
|
177
|
+
creative_format: valibot.optional(require_validators.VStringShort(0)),
|
|
178
|
+
creative_format_variants: valibot.optional(valibot.array(require_validators.VStringShort())),
|
|
179
|
+
url: valibot.optional(valibot.pipe(valibot.string(), valibot.trim(), valibot.url(require_regex.ERROR_MESSAGE_INVALID_URL), valibot.check((input) => {
|
|
180
|
+
return input.includes("utm_");
|
|
181
|
+
}, require_regex.ERROR_MESSAGE_UTM_URL))),
|
|
182
|
+
is_active: valibot.optional(valibot.boolean()),
|
|
183
|
+
notes: valibot.optional(require_validators.VStringShort(0)),
|
|
184
|
+
sort: QuerySortUtmTrackingLinks
|
|
185
|
+
});
|
|
186
|
+
//#endregion
|
|
187
|
+
exports.CreateUtmTrackingLinkDocument = CreateUtmTrackingLinkDocument;
|
|
188
|
+
exports.CreateUtmTrackingLinkDocumentRequest = CreateUtmTrackingLinkDocumentRequest;
|
|
189
|
+
exports.CreateUtmTrackingLinkParts = CreateUtmTrackingLinkParts;
|
|
190
|
+
exports.LIMIT_UTM_TRACKING_LINK_PAGINATION_DEFAULT_SIZE = LIMIT_UTM_TRACKING_LINK_PAGINATION_DEFAULT_SIZE;
|
|
191
|
+
exports.LIMIT_UTM_TRACKING_LINK_PAGINATION_MAX_SIZE = LIMIT_UTM_TRACKING_LINK_PAGINATION_MAX_SIZE;
|
|
192
|
+
exports.QuerySortUtmTrackingLinks = QuerySortUtmTrackingLinks;
|
|
193
|
+
exports.QueryStrapiSearchUtmTrackingLinks = QueryStrapiSearchUtmTrackingLinks;
|
|
194
|
+
exports.SFormCreateMultipleUtmTrackingLinkDocuments = SFormCreateMultipleUtmTrackingLinkDocuments;
|
|
195
|
+
exports.SReadUtmTrackingLinkDocumentByUrl = SReadUtmTrackingLinkDocumentByUrl;
|
|
196
|
+
exports.UTM_TRACKING_LINK_SORT_KEYS = UTM_TRACKING_LINK_SORT_KEYS;
|
|
197
|
+
exports.UpdateUtmTrackingLinkDocument = UpdateUtmTrackingLinkDocument;
|
|
198
|
+
exports.UpdateUtmTrackingLinkDocumentRequest = UpdateUtmTrackingLinkDocumentRequest;
|
|
199
|
+
exports.UtmTrackingLinkDocument = UtmTrackingLinkDocument;
|