@getcommunity/gc-validators 0.0.35 → 0.0.37
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 +77 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +77 -30
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -403,36 +403,36 @@ declare const SUtmLinkBuilderTableForm: v.ObjectSchema<{
|
|
|
403
403
|
readonly creator: v.SchemaWithPipe<readonly [v.StringSchema<"please provide a valid document id">, v.TrimAction, v.MinLengthAction<string, 1, "the document id is too short, it must be at least 1 character">, v.MaxLengthAction<string, 255, "the document id is too long, it must be 255 characters or less">]>;
|
|
404
404
|
readonly client: v.SchemaWithPipe<readonly [v.StringSchema<"please provide a valid document id">, v.TrimAction, v.MinLengthAction<string, 1, "the document id is too short, it must be at least 1 character">, v.MaxLengthAction<string, 255, "the document id is too long, it must be 255 characters or less">]>;
|
|
405
405
|
readonly url_destinations: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.UrlAction<string, "Please enter a valid URL.">, v.CheckAction<string, "Please remove any query parameters from the URL.">]>, undefined>, v.MinLengthAction<string[], 1, "Please provide at least one destination URL.">, v.MaxLengthAction<string[], 100, "You can provide up to 100 destination URLs.">]>;
|
|
406
|
-
readonly sources: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 255, "
|
|
407
|
-
readonly mediums: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 255, "
|
|
406
|
+
readonly sources: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, "The source value is too short, it must be at least 1 characters.">, v.MaxLengthAction<string, 255, "The source value is too long.">]>, undefined>, v.MinLengthAction<string[], 1, "Please select at least one source.">, v.MaxLengthAction<string[], 10, "You can select up to 10 sources.">]>;
|
|
407
|
+
readonly mediums: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, "The medium value is too short, it must be at least 1 characters.">, v.MaxLengthAction<string, 255, "The medium value is too long.">]>, undefined>, v.MinLengthAction<string[], 1, "Please select at least one medium.">, v.MaxLengthAction<string[], 10, "You can select up to 10 mediums.">]>;
|
|
408
408
|
readonly campaign: v.ObjectSchema<{
|
|
409
|
-
readonly campaign_phase: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 255, "
|
|
410
|
-
readonly campaign_product: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 255, "
|
|
411
|
-
readonly campaign_targeting: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 255, "
|
|
409
|
+
readonly campaign_phase: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, "The campaign phase value is too short, it must be at least 1 characters.">, v.MaxLengthAction<string, 255, "The campaign phase value is too long.">]>;
|
|
410
|
+
readonly campaign_product: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, "The campaign product value is too short, it must be at least 1 characters.">, v.MaxLengthAction<string, 255, "The campaign product value is too long.">]>, undefined>;
|
|
411
|
+
readonly campaign_targeting: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, "The campaign targeting value is too short, it must be at least 1 characters.">, v.MaxLengthAction<string, 255, "The campaign targeting value is too long.">]>, undefined>, v.MinLengthAction<string[], 1, "Please select at least one targeting option.">, v.MaxLengthAction<string[], 10, "You can select up to 10 targeting options.">]>, undefined>;
|
|
412
412
|
readonly campaign_key: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<"please provide a value">, v.TrimAction, v.MinLengthAction<string, 1, "the value is too short, it must be at least 1 characters">, v.MaxLengthAction<string, 255, "the value is too long, it must be 255 characters or less">, v.RegexAction<string, "the value can only contain letters, numbers, and the special characters: - _ .">]>, undefined>;
|
|
413
413
|
readonly campaign_date: v.ObjectSchema<{
|
|
414
414
|
readonly format: v.PicklistSchema<readonly ["annually", "quarterly", "monthly", "on a specific date", "no date"], "Please select a valid campaign date format.">;
|
|
415
415
|
readonly value: v.ObjectSchema<{
|
|
416
|
-
readonly year: v.NumberSchema<
|
|
416
|
+
readonly year: v.NumberSchema<"Please provide a valid year.">;
|
|
417
417
|
readonly quarter: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
418
418
|
readonly month: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
419
419
|
readonly day: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
420
420
|
}, undefined>;
|
|
421
421
|
}, undefined>;
|
|
422
422
|
}, undefined>;
|
|
423
|
-
readonly contents: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 255, "
|
|
424
|
-
readonly creative_formats: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
|
|
425
|
-
readonly creative_format: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 255, "
|
|
426
|
-
readonly creative_format_variants: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 255, "
|
|
423
|
+
readonly contents: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, "The content value is too short, it must be at least 1 characters.">, v.MaxLengthAction<string, 255, "The content value is too long.">]>, undefined>;
|
|
424
|
+
readonly creative_formats: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
|
|
425
|
+
readonly creative_format: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, "The creative format value is too short, it must be at least 1 characters.">, v.MaxLengthAction<string, 255, "The creative format value is too long.">]>, undefined>;
|
|
426
|
+
readonly creative_format_variants: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, "The creative variant value is too short, it must be at least 1 characters.">, v.MaxLengthAction<string, 255, "The creative variant value is too long.">]>, undefined>, undefined>;
|
|
427
427
|
}, undefined>, undefined>, v.MinLengthAction<{
|
|
428
428
|
creative_format?: string | undefined;
|
|
429
429
|
creative_format_variants?: string[] | undefined;
|
|
430
430
|
}[], 1, "Please select at least one creative format.">, v.MaxLengthAction<{
|
|
431
431
|
creative_format?: string | undefined;
|
|
432
432
|
creative_format_variants?: string[] | undefined;
|
|
433
|
-
}[], 10, "You can select up to 10 creative formats.">]>;
|
|
434
|
-
readonly id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 255, "
|
|
435
|
-
readonly notes: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 255, "
|
|
433
|
+
}[], 10, "You can select up to 10 creative formats.">]>, undefined>;
|
|
434
|
+
readonly id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, "The ID value is too short, it must be at least 1 characters.">, v.MaxLengthAction<string, 255, "The ID value is too long.">]>, undefined>;
|
|
435
|
+
readonly notes: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 255, "The notes value is too long.">]>, undefined>;
|
|
436
436
|
}, undefined>;
|
|
437
437
|
type SUtmLinkBuilderTableForm = v.InferOutput<typeof SUtmLinkBuilderTableForm>;
|
|
438
438
|
|
package/dist/index.js
CHANGED
|
@@ -1036,7 +1036,11 @@ var SUtmLinkBuilderTableForm = v4.object({
|
|
|
1036
1036
|
v4.pipe(
|
|
1037
1037
|
v4.string(),
|
|
1038
1038
|
v4.trim(),
|
|
1039
|
-
v4.
|
|
1039
|
+
v4.minLength(
|
|
1040
|
+
LIMIT_MIN_VALUE,
|
|
1041
|
+
`The source value is too short, it must be at least ${LIMIT_MIN_VALUE} characters.`
|
|
1042
|
+
),
|
|
1043
|
+
v4.maxLength(LIMIT_SHORT_STRING_MAX_LENGTH, "The source value is too long.")
|
|
1040
1044
|
)
|
|
1041
1045
|
),
|
|
1042
1046
|
v4.minLength(1, "Please select at least one source."),
|
|
@@ -1047,7 +1051,11 @@ var SUtmLinkBuilderTableForm = v4.object({
|
|
|
1047
1051
|
v4.pipe(
|
|
1048
1052
|
v4.string(),
|
|
1049
1053
|
v4.trim(),
|
|
1050
|
-
v4.
|
|
1054
|
+
v4.minLength(
|
|
1055
|
+
LIMIT_MIN_VALUE,
|
|
1056
|
+
`The medium value is too short, it must be at least ${LIMIT_MIN_VALUE} characters.`
|
|
1057
|
+
),
|
|
1058
|
+
v4.maxLength(LIMIT_SHORT_STRING_MAX_LENGTH, "The medium value is too long.")
|
|
1051
1059
|
)
|
|
1052
1060
|
),
|
|
1053
1061
|
v4.minLength(1, "Please select at least one medium."),
|
|
@@ -1057,13 +1065,27 @@ var SUtmLinkBuilderTableForm = v4.object({
|
|
|
1057
1065
|
campaign_phase: v4.pipe(
|
|
1058
1066
|
v4.string(),
|
|
1059
1067
|
v4.trim(),
|
|
1060
|
-
v4.
|
|
1068
|
+
v4.minLength(
|
|
1069
|
+
LIMIT_MIN_VALUE,
|
|
1070
|
+
`The campaign phase value is too short, it must be at least ${LIMIT_MIN_VALUE} characters.`
|
|
1071
|
+
),
|
|
1072
|
+
v4.maxLength(
|
|
1073
|
+
LIMIT_SHORT_STRING_MAX_LENGTH,
|
|
1074
|
+
"The campaign phase value is too long."
|
|
1075
|
+
)
|
|
1061
1076
|
),
|
|
1062
1077
|
campaign_product: v4.optional(
|
|
1063
1078
|
v4.pipe(
|
|
1064
1079
|
v4.string(),
|
|
1065
1080
|
v4.trim(),
|
|
1066
|
-
v4.
|
|
1081
|
+
v4.minLength(
|
|
1082
|
+
LIMIT_MIN_VALUE,
|
|
1083
|
+
`The campaign product value is too short, it must be at least ${LIMIT_MIN_VALUE} characters.`
|
|
1084
|
+
),
|
|
1085
|
+
v4.maxLength(
|
|
1086
|
+
LIMIT_SHORT_STRING_MAX_LENGTH,
|
|
1087
|
+
"The campaign product value is too long."
|
|
1088
|
+
)
|
|
1067
1089
|
)
|
|
1068
1090
|
),
|
|
1069
1091
|
campaign_targeting: v4.optional(
|
|
@@ -1072,7 +1094,14 @@ var SUtmLinkBuilderTableForm = v4.object({
|
|
|
1072
1094
|
v4.pipe(
|
|
1073
1095
|
v4.string(),
|
|
1074
1096
|
v4.trim(),
|
|
1075
|
-
v4.
|
|
1097
|
+
v4.minLength(
|
|
1098
|
+
LIMIT_MIN_VALUE,
|
|
1099
|
+
`The campaign targeting value is too short, it must be at least ${LIMIT_MIN_VALUE} characters.`
|
|
1100
|
+
),
|
|
1101
|
+
v4.maxLength(
|
|
1102
|
+
LIMIT_SHORT_STRING_MAX_LENGTH,
|
|
1103
|
+
"The campaign targeting value is too long."
|
|
1104
|
+
)
|
|
1076
1105
|
)
|
|
1077
1106
|
),
|
|
1078
1107
|
v4.minLength(1, "Please select at least one targeting option."),
|
|
@@ -1100,7 +1129,7 @@ var SUtmLinkBuilderTableForm = v4.object({
|
|
|
1100
1129
|
"Please select a valid campaign date format."
|
|
1101
1130
|
),
|
|
1102
1131
|
value: v4.object({
|
|
1103
|
-
year: v4.number(),
|
|
1132
|
+
year: v4.number("Please provide a valid year."),
|
|
1104
1133
|
quarter: v4.optional(v4.number()),
|
|
1105
1134
|
month: v4.optional(v4.number()),
|
|
1106
1135
|
day: v4.optional(v4.number())
|
|
@@ -1111,51 +1140,69 @@ var SUtmLinkBuilderTableForm = v4.object({
|
|
|
1111
1140
|
v4.pipe(
|
|
1112
1141
|
v4.string(),
|
|
1113
1142
|
v4.trim(),
|
|
1114
|
-
v4.
|
|
1143
|
+
v4.minLength(
|
|
1144
|
+
LIMIT_MIN_VALUE,
|
|
1145
|
+
`The content value is too short, it must be at least ${LIMIT_MIN_VALUE} characters.`
|
|
1146
|
+
),
|
|
1147
|
+
v4.maxLength(LIMIT_SHORT_STRING_MAX_LENGTH, "The content value is too long.")
|
|
1115
1148
|
)
|
|
1116
1149
|
),
|
|
1117
|
-
creative_formats: v4.
|
|
1118
|
-
v4.
|
|
1119
|
-
v4.
|
|
1120
|
-
|
|
1121
|
-
v4.
|
|
1122
|
-
v4.string(),
|
|
1123
|
-
v4.trim(),
|
|
1124
|
-
v4.maxLength(
|
|
1125
|
-
LIMIT_SHORT_STRING_MAX_LENGTH,
|
|
1126
|
-
"This creative format value is too long."
|
|
1127
|
-
)
|
|
1128
|
-
)
|
|
1129
|
-
),
|
|
1130
|
-
creative_format_variants: v4.optional(
|
|
1131
|
-
v4.array(
|
|
1150
|
+
creative_formats: v4.optional(
|
|
1151
|
+
v4.pipe(
|
|
1152
|
+
v4.array(
|
|
1153
|
+
v4.object({
|
|
1154
|
+
creative_format: v4.optional(
|
|
1132
1155
|
v4.pipe(
|
|
1133
1156
|
v4.string(),
|
|
1134
1157
|
v4.trim(),
|
|
1158
|
+
v4.minLength(
|
|
1159
|
+
LIMIT_MIN_VALUE,
|
|
1160
|
+
`The creative format value is too short, it must be at least ${LIMIT_MIN_VALUE} characters.`
|
|
1161
|
+
),
|
|
1135
1162
|
v4.maxLength(
|
|
1136
1163
|
LIMIT_SHORT_STRING_MAX_LENGTH,
|
|
1137
|
-
"
|
|
1164
|
+
"The creative format value is too long."
|
|
1165
|
+
)
|
|
1166
|
+
)
|
|
1167
|
+
),
|
|
1168
|
+
creative_format_variants: v4.optional(
|
|
1169
|
+
v4.array(
|
|
1170
|
+
v4.pipe(
|
|
1171
|
+
v4.string(),
|
|
1172
|
+
v4.trim(),
|
|
1173
|
+
v4.minLength(
|
|
1174
|
+
LIMIT_MIN_VALUE,
|
|
1175
|
+
`The creative variant value is too short, it must be at least ${LIMIT_MIN_VALUE} characters.`
|
|
1176
|
+
),
|
|
1177
|
+
v4.maxLength(
|
|
1178
|
+
LIMIT_SHORT_STRING_MAX_LENGTH,
|
|
1179
|
+
"The creative variant value is too long."
|
|
1180
|
+
)
|
|
1138
1181
|
)
|
|
1139
1182
|
)
|
|
1140
1183
|
)
|
|
1141
|
-
)
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1184
|
+
})
|
|
1185
|
+
),
|
|
1186
|
+
v4.minLength(1, "Please select at least one creative format."),
|
|
1187
|
+
v4.maxLength(10, "You can select up to 10 creative formats.")
|
|
1188
|
+
)
|
|
1146
1189
|
),
|
|
1147
1190
|
id: v4.optional(
|
|
1148
1191
|
v4.pipe(
|
|
1149
1192
|
v4.string(),
|
|
1150
1193
|
v4.trim(),
|
|
1151
|
-
v4.
|
|
1194
|
+
v4.minLength(
|
|
1195
|
+
LIMIT_MIN_VALUE,
|
|
1196
|
+
`The ID value is too short, it must be at least ${LIMIT_MIN_VALUE} characters.`
|
|
1197
|
+
),
|
|
1198
|
+
v4.maxLength(LIMIT_SHORT_STRING_MAX_LENGTH, "The ID value is too long.")
|
|
1152
1199
|
)
|
|
1153
1200
|
),
|
|
1154
1201
|
notes: v4.optional(
|
|
1155
1202
|
v4.pipe(
|
|
1156
1203
|
v4.string(),
|
|
1157
1204
|
v4.trim(),
|
|
1158
|
-
v4.maxLength(LIMIT_SHORT_STRING_MAX_LENGTH, "
|
|
1205
|
+
v4.maxLength(LIMIT_SHORT_STRING_MAX_LENGTH, "The notes value is too long.")
|
|
1159
1206
|
)
|
|
1160
1207
|
)
|
|
1161
1208
|
});
|