@getcommunity/gc-validators 0.0.56 → 0.0.58
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 +26 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -1
- package/dist/index.d.ts +23 -1
- package/dist/index.js +22 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -120,14 +120,12 @@ var REGEX_UTM_VALUE = /^([a-zA-Z0-9._-]+)?$/;
|
|
|
120
120
|
var REGEX_BRAND_COLOR_SLUG = /^([a-zA-Z0-9_-]+)?$/;
|
|
121
121
|
var 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;
|
|
122
122
|
var ERROR_MESSAGE_REGEX_PHONE = "please provide a valid phone number";
|
|
123
|
+
var IsValidClientUserScope = v3__namespace.pipe(
|
|
124
|
+
v3__namespace.string("please provide a valid scope"),
|
|
125
|
+
v3__namespace.picklist(CLIENT_ENTITY_SCOPES, "invalid client scope provided")
|
|
126
|
+
);
|
|
123
127
|
var IsValidClientUserScopes = v3__namespace.pipe(
|
|
124
|
-
v3__namespace.array(
|
|
125
|
-
v3__namespace.pipe(
|
|
126
|
-
v3__namespace.string("please provide a valid scope"),
|
|
127
|
-
v3__namespace.picklist(CLIENT_ENTITY_SCOPES, "invalid client scope provided")
|
|
128
|
-
),
|
|
129
|
-
"please provide an array of scopes"
|
|
130
|
-
),
|
|
128
|
+
v3__namespace.array(IsValidClientUserScope, "please provide an array of scopes"),
|
|
131
129
|
v3__namespace.maxLength(
|
|
132
130
|
CLIENT_ENTITY_SCOPES.length,
|
|
133
131
|
"you cannot provide more scopes than available"
|
|
@@ -941,6 +939,22 @@ var SUpdateClientUserDocumentRequest = v3__namespace.object({
|
|
|
941
939
|
var SDeleteClientUserDocument = v3__namespace.object({
|
|
942
940
|
documentId: IsValidReferenceDocumentId
|
|
943
941
|
});
|
|
942
|
+
var SVerifyClientUserDocument = v3__namespace.object({
|
|
943
|
+
client: IsValidReferenceDocumentId,
|
|
944
|
+
user: IsValidReferenceDocumentId,
|
|
945
|
+
scope: IsValidClientUserScope
|
|
946
|
+
});
|
|
947
|
+
var SReadUnverifiedClientUserDocument = v3__namespace.object({
|
|
948
|
+
verified: v3__namespace.fallback(v3__namespace.boolean(), false)
|
|
949
|
+
});
|
|
950
|
+
var SReadVerifiedClientUserDocument = v3__namespace.object({
|
|
951
|
+
clientUser: v3__namespace.nullable(IsValidReferenceDocumentId),
|
|
952
|
+
scopes: IsValidClientUserScopes
|
|
953
|
+
});
|
|
954
|
+
var SReadClientUserStatusDocument = v3__namespace.object({
|
|
955
|
+
...SReadUnverifiedClientUserDocument.entries,
|
|
956
|
+
...SReadVerifiedClientUserDocument.entries
|
|
957
|
+
});
|
|
944
958
|
var QueryStrapiSearchClients = v3__namespace.object({
|
|
945
959
|
page: v3__namespace.fallback(v3__namespace.optional(v3__namespace.pipe(v3__namespace.number(), v3__namespace.minValue(1)), 1), 1),
|
|
946
960
|
size: v3__namespace.fallback(
|
|
@@ -1599,6 +1613,7 @@ exports.InvalidUtmLink = InvalidUtmLink;
|
|
|
1599
1613
|
exports.IsValidBlocked = IsValidBlocked;
|
|
1600
1614
|
exports.IsValidCaptchaToken = IsValidCaptchaToken;
|
|
1601
1615
|
exports.IsValidClientTerm = IsValidClientTerm;
|
|
1616
|
+
exports.IsValidClientUserScope = IsValidClientUserScope;
|
|
1602
1617
|
exports.IsValidClientUserScopes = IsValidClientUserScopes;
|
|
1603
1618
|
exports.IsValidCompanyName = IsValidCompanyName;
|
|
1604
1619
|
exports.IsValidCompanyNameRequired = IsValidCompanyNameRequired;
|
|
@@ -1820,12 +1835,15 @@ exports.SLoginUser = SLoginUser;
|
|
|
1820
1835
|
exports.SQueryListClientUserDocuments = SQueryListClientUserDocuments;
|
|
1821
1836
|
exports.SReadClientUserDocumentByDocumentId = SReadClientUserDocumentByDocumentId;
|
|
1822
1837
|
exports.SReadClientUserDocumentById = SReadClientUserDocumentById;
|
|
1838
|
+
exports.SReadClientUserStatusDocument = SReadClientUserStatusDocument;
|
|
1839
|
+
exports.SReadUnverifiedClientUserDocument = SReadUnverifiedClientUserDocument;
|
|
1823
1840
|
exports.SReadUserAccountByDocumentId = SReadUserAccountByDocumentId;
|
|
1824
1841
|
exports.SReadUserAccountById = SReadUserAccountById;
|
|
1825
1842
|
exports.SReadUserByDocumentId = SReadUserByDocumentId;
|
|
1826
1843
|
exports.SReadUserById = SReadUserById;
|
|
1827
1844
|
exports.SReadUtmTrackingLinkDocumentByDocumentId = SReadUtmTrackingLinkDocumentByDocumentId;
|
|
1828
1845
|
exports.SReadUtmTrackingLinkDocumentByUrl = SReadUtmTrackingLinkDocumentByUrl;
|
|
1846
|
+
exports.SReadVerifiedClientUserDocument = SReadVerifiedClientUserDocument;
|
|
1829
1847
|
exports.SRegisterUser = SRegisterUser;
|
|
1830
1848
|
exports.SRequestConfirmEmail = SRequestConfirmEmail;
|
|
1831
1849
|
exports.SResetUserPassword = SResetUserPassword;
|
|
@@ -1847,6 +1865,7 @@ exports.SUpdateUtmTrackingLinkDocumentRequest = SUpdateUtmTrackingLinkDocumentRe
|
|
|
1847
1865
|
exports.SUserToken = SUserToken;
|
|
1848
1866
|
exports.SUtmLinkBuilderPartCampaignDateOptions = SUtmLinkBuilderPartCampaignDateOptions;
|
|
1849
1867
|
exports.SUtmLinkBuilderTableForm = SUtmLinkBuilderTableForm;
|
|
1868
|
+
exports.SVerifyClientUserDocument = SVerifyClientUserDocument;
|
|
1850
1869
|
exports.SharpSpringSignUpToDownload = SharpSpringSignUpToDownload;
|
|
1851
1870
|
exports.ValidGcDesiredContentOptions = ValidGcDesiredContentOptions;
|
|
1852
1871
|
exports.ValidGcServiceOptions = ValidGcServiceOptions;
|