@joeygrable94/utm-src-pub-validators 0.0.77 → 0.0.79
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 -51
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +119 -23
- package/dist/index.d.ts +119 -23
- package/dist/index.js +66 -52
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -170,6 +170,8 @@ var LIMIT_MIN_QUERY = 1;
|
|
|
170
170
|
var LIMIT_MAX_QUERY = 2038;
|
|
171
171
|
var LIMIT_MIN_FRAGMENT = 1;
|
|
172
172
|
var LIMIT_MAX_FRAGMENT = 2038;
|
|
173
|
+
var LIMIT_MIN_UTM_PART = 1;
|
|
174
|
+
var LIMIT_MAX_UTM_PART = 200;
|
|
173
175
|
var LIMIT_MIN_UTM_SOURCE = 1;
|
|
174
176
|
var LIMIT_MAX_UTM_SOURCE = 2026;
|
|
175
177
|
var LIMIT_MIN_UTM_MEDIUM = 1;
|
|
@@ -504,12 +506,12 @@ var IsValidUrlUtmPart = v12__namespace.pipe(
|
|
|
504
506
|
v12__namespace.string(),
|
|
505
507
|
v12__namespace.trim(),
|
|
506
508
|
v12__namespace.minLength(
|
|
507
|
-
|
|
508
|
-
`this value is too short, it must be at least ${
|
|
509
|
+
LIMIT_MIN_UTM_PART,
|
|
510
|
+
`this value is too short, it must be at least ${LIMIT_MIN_UTM_PART} characters`
|
|
509
511
|
),
|
|
510
512
|
v12__namespace.maxLength(
|
|
511
|
-
|
|
512
|
-
`the value is too long, it must be ${
|
|
513
|
+
LIMIT_MAX_UTM_PART,
|
|
514
|
+
`the value is too long, it must be ${LIMIT_MAX_UTM_PART} characters or less`
|
|
513
515
|
),
|
|
514
516
|
v12__namespace.regex(REGEX_VALUE, `value ${ERROR_MESSAGE_REGEX_VALUE}`)
|
|
515
517
|
);
|
|
@@ -733,6 +735,24 @@ var SUpdateGroupDocumentRequest = v12__namespace.union([
|
|
|
733
735
|
var SDeleteGroupDocument = v12__namespace.object({
|
|
734
736
|
documentId: IsValidReferenceDocumentId
|
|
735
737
|
});
|
|
738
|
+
var SUtmLinkBuilderPartUrlObject = v12__namespace.object({
|
|
739
|
+
url: IsValidUrlDestination
|
|
740
|
+
});
|
|
741
|
+
var SUtmLinkBuilderPartUrlDestinations = v12__namespace.pipe(
|
|
742
|
+
v12__namespace.array(SUtmLinkBuilderPartUrlObject),
|
|
743
|
+
v12__namespace.minLength(1, "Please provide at least one destination URL."),
|
|
744
|
+
v12__namespace.maxLength(10, "You can provide up to 10 destination URLs.")
|
|
745
|
+
);
|
|
746
|
+
var SUtmLinkBuilderPartSources = v12__namespace.pipe(
|
|
747
|
+
v12__namespace.array(IsValidUrlUtmPart),
|
|
748
|
+
v12__namespace.minLength(1, "Please select at least one source."),
|
|
749
|
+
v12__namespace.maxLength(10, "You can select up to 10 sources.")
|
|
750
|
+
);
|
|
751
|
+
var SUtmLinkBuilderPartMediums = v12__namespace.pipe(
|
|
752
|
+
v12__namespace.array(IsValidUrlUtmPart),
|
|
753
|
+
v12__namespace.minLength(1, "Please select at least one medium."),
|
|
754
|
+
v12__namespace.maxLength(10, "You can select up to 10 mediums.")
|
|
755
|
+
);
|
|
736
756
|
var SUtmLinkBuilderPartCampaignDateFormatOptions = [
|
|
737
757
|
"no date",
|
|
738
758
|
"annually",
|
|
@@ -746,6 +766,13 @@ var SUtmLinkBuilderPartCampaignDateValue = v12__namespace.object({
|
|
|
746
766
|
month: v12__namespace.optional(v12__namespace.number()),
|
|
747
767
|
day: v12__namespace.optional(v12__namespace.number())
|
|
748
768
|
});
|
|
769
|
+
var SUtmLinkBuilderPartCampaignDateObject = v12__namespace.object({
|
|
770
|
+
format: v12__namespace.picklist(
|
|
771
|
+
SUtmLinkBuilderPartCampaignDateFormatOptions,
|
|
772
|
+
"Please select a valid campaign date format."
|
|
773
|
+
),
|
|
774
|
+
value: SUtmLinkBuilderPartCampaignDateValue
|
|
775
|
+
});
|
|
749
776
|
var SUtmLinkBuilderPartCampaignObject = v12__namespace.object({
|
|
750
777
|
campaign_phase: v12__namespace.optional(IsValidUrlUtmPart),
|
|
751
778
|
campaign_product: v12__namespace.optional(IsValidUrlUtmPart),
|
|
@@ -757,15 +784,20 @@ var SUtmLinkBuilderPartCampaignObject = v12__namespace.object({
|
|
|
757
784
|
)
|
|
758
785
|
),
|
|
759
786
|
campaign_key: v12__namespace.optional(IsValidUrlUtmPart),
|
|
760
|
-
campaign_date:
|
|
761
|
-
format: v12__namespace.picklist(
|
|
762
|
-
SUtmLinkBuilderPartCampaignDateFormatOptions,
|
|
763
|
-
"Please select a valid campaign date format."
|
|
764
|
-
),
|
|
765
|
-
value: SUtmLinkBuilderPartCampaignDateValue
|
|
766
|
-
}),
|
|
767
|
-
campaign_id: IsValidUrlUtmPart
|
|
787
|
+
campaign_date: SUtmLinkBuilderPartCampaignDateObject
|
|
768
788
|
});
|
|
789
|
+
var SUtmLinkBuilderPartCampaigns = v12__namespace.pipe(
|
|
790
|
+
v12__namespace.array(SUtmLinkBuilderPartCampaignObject),
|
|
791
|
+
v12__namespace.minLength(1, "Please provide at least one campaign."),
|
|
792
|
+
v12__namespace.maxLength(10, "You can provide up to 10 campaigns.")
|
|
793
|
+
);
|
|
794
|
+
var SUtmLinkBuilderPartContents = v12__namespace.optional(
|
|
795
|
+
v12__namespace.pipe(
|
|
796
|
+
v12__namespace.array(IsValidUrlUtmPart),
|
|
797
|
+
v12__namespace.minLength(1, "Please select at least one content."),
|
|
798
|
+
v12__namespace.maxLength(10, "You can select up to 10 contents.")
|
|
799
|
+
)
|
|
800
|
+
);
|
|
769
801
|
var SUtmLinkBuilderPartCreativeFormatObject = v12__namespace.object({
|
|
770
802
|
creative_format: v12__namespace.optional(IsValidUrlUtmPart),
|
|
771
803
|
creative_format_variants: v12__namespace.optional(
|
|
@@ -776,49 +808,31 @@ var SUtmLinkBuilderPartCreativeFormatObject = v12__namespace.object({
|
|
|
776
808
|
)
|
|
777
809
|
)
|
|
778
810
|
});
|
|
779
|
-
var
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
v12__namespace.
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
v12__namespace.maxLength(10, "You can provide up to 10 destination URLs.")
|
|
789
|
-
),
|
|
790
|
-
sources: v12__namespace.pipe(
|
|
791
|
-
v12__namespace.array(IsValidUrlUtmPart),
|
|
792
|
-
v12__namespace.minLength(1, "Please select at least one source."),
|
|
793
|
-
v12__namespace.maxLength(10, "You can select up to 10 sources.")
|
|
794
|
-
),
|
|
795
|
-
mediums: v12__namespace.pipe(
|
|
796
|
-
v12__namespace.array(IsValidUrlUtmPart),
|
|
797
|
-
v12__namespace.minLength(1, "Please select at least one medium."),
|
|
798
|
-
v12__namespace.maxLength(10, "You can select up to 10 mediums.")
|
|
799
|
-
),
|
|
800
|
-
campaigns: v12__namespace.pipe(
|
|
801
|
-
v12__namespace.array(SUtmLinkBuilderPartCampaignObject),
|
|
802
|
-
v12__namespace.minLength(1, "Please provide at least one campaign."),
|
|
803
|
-
v12__namespace.maxLength(10, "You can provide up to 10 campaigns.")
|
|
804
|
-
),
|
|
805
|
-
contents: v12__namespace.pipe(
|
|
806
|
-
v12__namespace.array(IsValidUrlUtmPart),
|
|
807
|
-
v12__namespace.minLength(1, "Please select at least one content."),
|
|
808
|
-
v12__namespace.maxLength(10, "You can select up to 10 contents.")
|
|
809
|
-
),
|
|
810
|
-
creative_formats: v12__namespace.optional(
|
|
811
|
-
v12__namespace.pipe(
|
|
812
|
-
v12__namespace.array(SUtmLinkBuilderPartCreativeFormatObject),
|
|
813
|
-
v12__namespace.minLength(1, "Please select at least one creative format."),
|
|
814
|
-
v12__namespace.maxLength(10, "You can select up to 10 creative formats.")
|
|
815
|
-
)
|
|
816
|
-
),
|
|
817
|
-
terms: v12__namespace.pipe(
|
|
811
|
+
var SUtmLinkBuilderPartCreativeFormats = v12__namespace.optional(
|
|
812
|
+
v12__namespace.pipe(
|
|
813
|
+
v12__namespace.array(SUtmLinkBuilderPartCreativeFormatObject),
|
|
814
|
+
v12__namespace.minLength(1, "Please select at least one creative format."),
|
|
815
|
+
v12__namespace.maxLength(10, "You can select up to 10 creative formats.")
|
|
816
|
+
)
|
|
817
|
+
);
|
|
818
|
+
var SUtmLinkBuilderPartTerms = v12__namespace.optional(
|
|
819
|
+
v12__namespace.pipe(
|
|
818
820
|
v12__namespace.array(IsValidUrlUtmPart),
|
|
819
821
|
v12__namespace.minLength(1, "Please select at least one term."),
|
|
820
822
|
v12__namespace.maxLength(10, "You can select up to 10 terms.")
|
|
821
823
|
)
|
|
824
|
+
);
|
|
825
|
+
var SUtmLinkBuilderPartCampaignId = v12__namespace.optional(IsValidUrlUtmPart);
|
|
826
|
+
var SUtmLinkBuilderTableForm = v12__namespace.object({
|
|
827
|
+
group: IsValidReferenceDocumentId,
|
|
828
|
+
url_destinations: SUtmLinkBuilderPartUrlDestinations,
|
|
829
|
+
sources: SUtmLinkBuilderPartSources,
|
|
830
|
+
mediums: SUtmLinkBuilderPartMediums,
|
|
831
|
+
campaigns: SUtmLinkBuilderPartCampaigns,
|
|
832
|
+
contents: SUtmLinkBuilderPartContents,
|
|
833
|
+
creative_formats: SUtmLinkBuilderPartCreativeFormats,
|
|
834
|
+
terms: SUtmLinkBuilderPartTerms,
|
|
835
|
+
campaign_id: SUtmLinkBuilderPartCampaignId
|
|
822
836
|
});
|
|
823
837
|
var SStripeCheckoutLineItem = v12__namespace.object({
|
|
824
838
|
price: IsValidPriceId,
|
|
@@ -3276,6 +3290,7 @@ exports.LIMIT_MAX_UTM_CONTENT = LIMIT_MAX_UTM_CONTENT;
|
|
|
3276
3290
|
exports.LIMIT_MAX_UTM_CREATIVE_FORMAT = LIMIT_MAX_UTM_CREATIVE_FORMAT;
|
|
3277
3291
|
exports.LIMIT_MAX_UTM_ID = LIMIT_MAX_UTM_ID;
|
|
3278
3292
|
exports.LIMIT_MAX_UTM_MEDIUM = LIMIT_MAX_UTM_MEDIUM;
|
|
3293
|
+
exports.LIMIT_MAX_UTM_PART = LIMIT_MAX_UTM_PART;
|
|
3279
3294
|
exports.LIMIT_MAX_UTM_SOURCE = LIMIT_MAX_UTM_SOURCE;
|
|
3280
3295
|
exports.LIMIT_MAX_UTM_TERM = LIMIT_MAX_UTM_TERM;
|
|
3281
3296
|
exports.LIMIT_MAX_VALUE = LIMIT_MAX_VALUE;
|
|
@@ -3298,6 +3313,7 @@ exports.LIMIT_MIN_UTM_CONTENT = LIMIT_MIN_UTM_CONTENT;
|
|
|
3298
3313
|
exports.LIMIT_MIN_UTM_CREATIVE_FORMAT = LIMIT_MIN_UTM_CREATIVE_FORMAT;
|
|
3299
3314
|
exports.LIMIT_MIN_UTM_ID = LIMIT_MIN_UTM_ID;
|
|
3300
3315
|
exports.LIMIT_MIN_UTM_MEDIUM = LIMIT_MIN_UTM_MEDIUM;
|
|
3316
|
+
exports.LIMIT_MIN_UTM_PART = LIMIT_MIN_UTM_PART;
|
|
3301
3317
|
exports.LIMIT_MIN_UTM_SOURCE = LIMIT_MIN_UTM_SOURCE;
|
|
3302
3318
|
exports.LIMIT_MIN_UTM_TERM = LIMIT_MIN_UTM_TERM;
|
|
3303
3319
|
exports.LIMIT_MIN_VALUE = LIMIT_MIN_VALUE;
|
|
@@ -3612,9 +3628,19 @@ exports.SUserRelationTerms = SUserRelationTerms;
|
|
|
3612
3628
|
exports.SUserRelationTrackingLinks = SUserRelationTrackingLinks;
|
|
3613
3629
|
exports.SUserRelationsDocument = SUserRelationsDocument;
|
|
3614
3630
|
exports.SUtmLinkBuilderPartCampaignDateFormatOptions = SUtmLinkBuilderPartCampaignDateFormatOptions;
|
|
3631
|
+
exports.SUtmLinkBuilderPartCampaignDateObject = SUtmLinkBuilderPartCampaignDateObject;
|
|
3615
3632
|
exports.SUtmLinkBuilderPartCampaignDateValue = SUtmLinkBuilderPartCampaignDateValue;
|
|
3633
|
+
exports.SUtmLinkBuilderPartCampaignId = SUtmLinkBuilderPartCampaignId;
|
|
3616
3634
|
exports.SUtmLinkBuilderPartCampaignObject = SUtmLinkBuilderPartCampaignObject;
|
|
3635
|
+
exports.SUtmLinkBuilderPartCampaigns = SUtmLinkBuilderPartCampaigns;
|
|
3636
|
+
exports.SUtmLinkBuilderPartContents = SUtmLinkBuilderPartContents;
|
|
3617
3637
|
exports.SUtmLinkBuilderPartCreativeFormatObject = SUtmLinkBuilderPartCreativeFormatObject;
|
|
3638
|
+
exports.SUtmLinkBuilderPartCreativeFormats = SUtmLinkBuilderPartCreativeFormats;
|
|
3639
|
+
exports.SUtmLinkBuilderPartMediums = SUtmLinkBuilderPartMediums;
|
|
3640
|
+
exports.SUtmLinkBuilderPartSources = SUtmLinkBuilderPartSources;
|
|
3641
|
+
exports.SUtmLinkBuilderPartTerms = SUtmLinkBuilderPartTerms;
|
|
3642
|
+
exports.SUtmLinkBuilderPartUrlDestinations = SUtmLinkBuilderPartUrlDestinations;
|
|
3643
|
+
exports.SUtmLinkBuilderPartUrlObject = SUtmLinkBuilderPartUrlObject;
|
|
3618
3644
|
exports.SUtmLinkBuilderTableForm = SUtmLinkBuilderTableForm;
|
|
3619
3645
|
exports.SVerifyGroupUserDocument = SVerifyGroupUserDocument;
|
|
3620
3646
|
exports.SWebsiteDocument = SWebsiteDocument;
|