@getcommunity/gc-validators 0.0.31 → 0.0.33
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/index.cjs +65 -55
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +65 -55
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1025,6 +1025,11 @@ var SUtmLinkBuilderPartCampaignDateOptions = [
|
|
|
1025
1025
|
var SUtmLinkBuilderTableForm = v4.object({
|
|
1026
1026
|
creator: IsValidReferenceDocumentId,
|
|
1027
1027
|
client: IsValidReferenceDocumentId,
|
|
1028
|
+
url_destinations: v4.pipe(
|
|
1029
|
+
v4.array(IsValidDestinationUrl),
|
|
1030
|
+
v4.minLength(1, "Please provide at least one destination URL."),
|
|
1031
|
+
v4.maxLength(100, "You can provide up to 100 destination URLs.")
|
|
1032
|
+
),
|
|
1028
1033
|
sources: v4.pipe(
|
|
1029
1034
|
v4.array(
|
|
1030
1035
|
v4.pipe(
|
|
@@ -1047,65 +1052,63 @@ var SUtmLinkBuilderTableForm = v4.object({
|
|
|
1047
1052
|
v4.minLength(1, "Please select at least one medium."),
|
|
1048
1053
|
v4.maxLength(10, "You can select up to 10 mediums.")
|
|
1049
1054
|
),
|
|
1050
|
-
campaign: v4.
|
|
1051
|
-
v4.
|
|
1052
|
-
|
|
1055
|
+
campaign: v4.object({
|
|
1056
|
+
campaign_phase: v4.pipe(
|
|
1057
|
+
v4.string(),
|
|
1058
|
+
v4.trim(),
|
|
1059
|
+
v4.maxLength(LIMIT_SHORT_STRING_MAX_LENGTH, "This medium value is too long.")
|
|
1060
|
+
),
|
|
1061
|
+
campaign_product: v4.optional(
|
|
1062
|
+
v4.pipe(
|
|
1053
1063
|
v4.string(),
|
|
1054
1064
|
v4.trim(),
|
|
1055
1065
|
v4.maxLength(LIMIT_SHORT_STRING_MAX_LENGTH, "This medium value is too long.")
|
|
1056
|
-
),
|
|
1057
|
-
campaign_product: v4.optional(
|
|
1058
|
-
v4.pipe(
|
|
1059
|
-
v4.string(),
|
|
1060
|
-
v4.trim(),
|
|
1061
|
-
v4.maxLength(LIMIT_SHORT_STRING_MAX_LENGTH, "This medium value is too long.")
|
|
1062
|
-
)
|
|
1063
|
-
),
|
|
1064
|
-
campaign_targeting: v4.optional(
|
|
1065
|
-
v4.pipe(
|
|
1066
|
-
v4.array(
|
|
1067
|
-
v4.pipe(
|
|
1068
|
-
v4.string(),
|
|
1069
|
-
v4.trim(),
|
|
1070
|
-
v4.maxLength(LIMIT_SHORT_STRING_MAX_LENGTH, "This value is too long.")
|
|
1071
|
-
)
|
|
1072
|
-
),
|
|
1073
|
-
v4.minLength(1, "Please select at least one targeting option."),
|
|
1074
|
-
v4.maxLength(10, "You can select up to 10 targeting options."),
|
|
1075
|
-
v4.transform((value) => value.join(","))
|
|
1076
|
-
)
|
|
1077
|
-
),
|
|
1078
|
-
campaign_key: v4.optional(
|
|
1079
|
-
v4.pipe(
|
|
1080
|
-
v4.string("please provide a value"),
|
|
1081
|
-
v4.trim(),
|
|
1082
|
-
v4.minLength(
|
|
1083
|
-
LIMIT_MIN_VALUE,
|
|
1084
|
-
`the value is too short, it must be at least ${LIMIT_MIN_VALUE} characters`
|
|
1085
|
-
),
|
|
1086
|
-
v4.maxLength(
|
|
1087
|
-
LIMIT_SHORT_STRING_MAX_LENGTH,
|
|
1088
|
-
`the value is too long, it must be ${LIMIT_SHORT_STRING_MAX_LENGTH} characters or less`
|
|
1089
|
-
),
|
|
1090
|
-
v4.regex(REGEX_UTM_VALUE, `the value ${ERROR_MESSAGE_REGEX_UTM_VALUE}`)
|
|
1091
|
-
)
|
|
1092
|
-
),
|
|
1093
|
-
campaign_date: v4.optional(
|
|
1094
|
-
v4.object({
|
|
1095
|
-
format: v4.picklist(
|
|
1096
|
-
SUtmLinkBuilderPartCampaignDateOptions,
|
|
1097
|
-
"Please select a valid campaign date format."
|
|
1098
|
-
),
|
|
1099
|
-
value: v4.object({
|
|
1100
|
-
year: v4.number(),
|
|
1101
|
-
quarter: v4.optional(v4.number()),
|
|
1102
|
-
month: v4.optional(v4.number()),
|
|
1103
|
-
day: v4.optional(v4.number())
|
|
1104
|
-
})
|
|
1105
|
-
})
|
|
1106
1066
|
)
|
|
1107
|
-
|
|
1108
|
-
|
|
1067
|
+
),
|
|
1068
|
+
campaign_targeting: v4.optional(
|
|
1069
|
+
v4.pipe(
|
|
1070
|
+
v4.array(
|
|
1071
|
+
v4.pipe(
|
|
1072
|
+
v4.string(),
|
|
1073
|
+
v4.trim(),
|
|
1074
|
+
v4.maxLength(LIMIT_SHORT_STRING_MAX_LENGTH, "This value is too long.")
|
|
1075
|
+
)
|
|
1076
|
+
),
|
|
1077
|
+
v4.minLength(1, "Please select at least one targeting option."),
|
|
1078
|
+
v4.maxLength(10, "You can select up to 10 targeting options."),
|
|
1079
|
+
v4.transform((value) => value.join(","))
|
|
1080
|
+
)
|
|
1081
|
+
),
|
|
1082
|
+
campaign_key: v4.optional(
|
|
1083
|
+
v4.pipe(
|
|
1084
|
+
v4.string("please provide a value"),
|
|
1085
|
+
v4.trim(),
|
|
1086
|
+
v4.minLength(
|
|
1087
|
+
LIMIT_MIN_VALUE,
|
|
1088
|
+
`the value is too short, it must be at least ${LIMIT_MIN_VALUE} characters`
|
|
1089
|
+
),
|
|
1090
|
+
v4.maxLength(
|
|
1091
|
+
LIMIT_SHORT_STRING_MAX_LENGTH,
|
|
1092
|
+
`the value is too long, it must be ${LIMIT_SHORT_STRING_MAX_LENGTH} characters or less`
|
|
1093
|
+
),
|
|
1094
|
+
v4.regex(REGEX_UTM_VALUE, `the value ${ERROR_MESSAGE_REGEX_UTM_VALUE}`)
|
|
1095
|
+
)
|
|
1096
|
+
),
|
|
1097
|
+
campaign_date: v4.optional(
|
|
1098
|
+
v4.object({
|
|
1099
|
+
format: v4.picklist(
|
|
1100
|
+
SUtmLinkBuilderPartCampaignDateOptions,
|
|
1101
|
+
"Please select a valid campaign date format."
|
|
1102
|
+
),
|
|
1103
|
+
value: v4.object({
|
|
1104
|
+
year: v4.number(),
|
|
1105
|
+
quarter: v4.optional(v4.number()),
|
|
1106
|
+
month: v4.optional(v4.number()),
|
|
1107
|
+
day: v4.optional(v4.number())
|
|
1108
|
+
})
|
|
1109
|
+
})
|
|
1110
|
+
)
|
|
1111
|
+
}),
|
|
1109
1112
|
contents: v4.optional(
|
|
1110
1113
|
v4.pipe(
|
|
1111
1114
|
v4.string(),
|
|
@@ -1149,6 +1152,13 @@ var SUtmLinkBuilderTableForm = v4.object({
|
|
|
1149
1152
|
v4.trim(),
|
|
1150
1153
|
v4.maxLength(LIMIT_SHORT_STRING_MAX_LENGTH, "This ID value is too long.")
|
|
1151
1154
|
)
|
|
1155
|
+
),
|
|
1156
|
+
notes: v4.optional(
|
|
1157
|
+
v4.pipe(
|
|
1158
|
+
v4.string(),
|
|
1159
|
+
v4.trim(),
|
|
1160
|
+
v4.maxLength(LIMIT_SHORT_STRING_MAX_LENGTH, "This notes value is too long.")
|
|
1161
|
+
)
|
|
1152
1162
|
)
|
|
1153
1163
|
});
|
|
1154
1164
|
var QueryStrapiSearchUtmTrackingLinks = v4.object({
|