@dereekb/model 9.25.16 → 10.0.1
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/CHANGELOG.md +12 -0
- package/package.json +5 -12
- package/src/lib/data/address/address.js +3 -3
- package/src/lib/data/address/address.js.map +1 -1
- package/src/lib/data/website/link.d.ts +2 -2
- package/src/lib/data/website/link.file.d.ts +5 -5
- package/src/lib/data/website/link.file.js +1 -1
- package/src/lib/data/website/link.file.js.map +1 -1
- package/src/lib/data/website/link.js +1 -1
- package/src/lib/data/website/link.js.map +1 -1
- package/src/lib/data/website/link.website.d.ts +40 -40
- package/src/lib/service/permission/permission.service.d.ts +1 -1
- package/src/lib/service/permission/role.d.ts +16 -16
- package/src/lib/transform/transform.d.ts +6 -6
- package/src/lib/transform/transform.function.d.ts +3 -3
- package/src/lib/transform/transform.result.d.ts +2 -2
- package/src/lib/validator/phone.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [10.0.1](https://github.com/dereekb/dbx-components/compare/v10.0.0-dev...v10.0.1) (2024-01-11)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
# [10.0.0](https://github.com/dereekb/dbx-components/compare/v9.25.17...v10.0.0) (2024-01-10)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## [9.25.17](https://github.com/dereekb/dbx-components/compare/v10.0.0-pre...v9.25.17) (2024-01-10)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
5
17
|
## [9.25.16](https://github.com/dereekb/dbx-components/compare/v9.25.15-dev...v9.25.16) (2023-12-01)
|
|
6
18
|
|
|
7
19
|
|
package/package.json
CHANGED
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/model",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.1",
|
|
4
4
|
"type": "commonjs",
|
|
5
|
-
"main": "./src/index.js",
|
|
6
|
-
"types": "./src/index.d.ts",
|
|
7
5
|
"dependencies": {},
|
|
8
6
|
"peerDependencies": {
|
|
9
|
-
"class-validator": "^0.13.2",
|
|
10
|
-
"@dereekb/util": "9.25.16",
|
|
11
|
-
"lodash.isequal": "^4.5.0",
|
|
12
|
-
"make-error": "^1.3.0",
|
|
13
|
-
"ts-essentials": "^9.1.2",
|
|
14
|
-
"extra-set": "^2.2.11",
|
|
15
|
-
"date-fns": "^2.29.0",
|
|
16
7
|
"class-transformer": "^0.5.1",
|
|
17
|
-
"
|
|
18
|
-
|
|
8
|
+
"class-validator": "^0.14.0",
|
|
9
|
+
"@dereekb/util": "*"
|
|
10
|
+
},
|
|
11
|
+
"main": "./src/index.js"
|
|
19
12
|
}
|
|
@@ -13,6 +13,7 @@ exports.ADDRESS_ZIP_MAX_LENGTH = 11;
|
|
|
13
13
|
exports.ADDRESS_COUNTRY_MAX_LENGTH = 80;
|
|
14
14
|
class AbstractUnitedStatesAddressWithoutStateParams {
|
|
15
15
|
}
|
|
16
|
+
exports.AbstractUnitedStatesAddressWithoutStateParams = AbstractUnitedStatesAddressWithoutStateParams;
|
|
16
17
|
tslib_1.__decorate([
|
|
17
18
|
(0, class_transformer_1.Expose)(),
|
|
18
19
|
(0, class_validator_1.IsString)(),
|
|
@@ -42,12 +43,12 @@ tslib_1.__decorate([
|
|
|
42
43
|
(0, class_validator_1.MaxLength)(exports.ADDRESS_ZIP_MAX_LENGTH),
|
|
43
44
|
tslib_1.__metadata("design:type", String)
|
|
44
45
|
], AbstractUnitedStatesAddressWithoutStateParams.prototype, "zip", void 0);
|
|
45
|
-
exports.AbstractUnitedStatesAddressWithoutStateParams = AbstractUnitedStatesAddressWithoutStateParams;
|
|
46
46
|
/**
|
|
47
47
|
* UnitedStatesAddress that enforces a StateCode for the state value.
|
|
48
48
|
*/
|
|
49
49
|
class UnitedStatesAddressWithStateCodeParams extends AbstractUnitedStatesAddressWithoutStateParams {
|
|
50
50
|
}
|
|
51
|
+
exports.UnitedStatesAddressWithStateCodeParams = UnitedStatesAddressWithStateCodeParams;
|
|
51
52
|
tslib_1.__decorate([
|
|
52
53
|
(0, class_transformer_1.Expose)(),
|
|
53
54
|
(0, class_validator_1.IsString)(),
|
|
@@ -56,12 +57,12 @@ tslib_1.__decorate([
|
|
|
56
57
|
(0, class_validator_1.MaxLength)(exports.ADDRESS_STATE_CODE_MAX_LENGTH),
|
|
57
58
|
tslib_1.__metadata("design:type", String)
|
|
58
59
|
], UnitedStatesAddressWithStateCodeParams.prototype, "state", void 0);
|
|
59
|
-
exports.UnitedStatesAddressWithStateCodeParams = UnitedStatesAddressWithStateCodeParams;
|
|
60
60
|
/**
|
|
61
61
|
* UnitedStatesAddress that enforces a State for the state value.
|
|
62
62
|
*/
|
|
63
63
|
class UnitedStatesAddressWithStateStringParams extends AbstractUnitedStatesAddressWithoutStateParams {
|
|
64
64
|
}
|
|
65
|
+
exports.UnitedStatesAddressWithStateStringParams = UnitedStatesAddressWithStateStringParams;
|
|
65
66
|
tslib_1.__decorate([
|
|
66
67
|
(0, class_transformer_1.Expose)(),
|
|
67
68
|
(0, class_validator_1.IsString)(),
|
|
@@ -69,5 +70,4 @@ tslib_1.__decorate([
|
|
|
69
70
|
(0, class_validator_1.MaxLength)(exports.ADDRESS_STATE_MAX_LENGTH),
|
|
70
71
|
tslib_1.__metadata("design:type", String)
|
|
71
72
|
], UnitedStatesAddressWithStateStringParams.prototype, "state", void 0);
|
|
72
|
-
exports.UnitedStatesAddressWithStateStringParams = UnitedStatesAddressWithStateStringParams;
|
|
73
73
|
//# sourceMappingURL=address.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address.js","sourceRoot":"","sources":["../../../../../../../packages/model/src/lib/data/address/address.ts"],"names":[],"mappings":";;;;AAAA,wCAAmL;AACnL,yDAA2C;AAC3C,qDAAkG;AAErF,QAAA,uBAAuB,GAAG,EAAE,CAAC;AAE7B,QAAA,uBAAuB,GAAG,EAAE,CAAC;AAC7B,QAAA,wBAAwB,GAAG,EAAE,CAAC;AAC9B,QAAA,6BAA6B,GAAG,CAAC,CAAC;AAElC,QAAA,sBAAsB,GAAG,EAAE,CAAC;AAC5B,QAAA,0BAA0B,GAAG,EAAE,CAAC;AAE7C,MAAsB,6CAA6C;CAyBlE;
|
|
1
|
+
{"version":3,"file":"address.js","sourceRoot":"","sources":["../../../../../../../packages/model/src/lib/data/address/address.ts"],"names":[],"mappings":";;;;AAAA,wCAAmL;AACnL,yDAA2C;AAC3C,qDAAkG;AAErF,QAAA,uBAAuB,GAAG,EAAE,CAAC;AAE7B,QAAA,uBAAuB,GAAG,EAAE,CAAC;AAC7B,QAAA,wBAAwB,GAAG,EAAE,CAAC;AAC9B,QAAA,6BAA6B,GAAG,CAAC,CAAC;AAElC,QAAA,sBAAsB,GAAG,EAAE,CAAC;AAC5B,QAAA,0BAA0B,GAAG,EAAE,CAAC;AAE7C,MAAsB,6CAA6C;CAyBlE;AAzBD,sGAyBC;AApBC;IAJC,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,EAAC,+BAAuB,CAAC;;4EACT;AAM1B;IAJC,IAAA,0BAAM,GAAE;IACR,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,2BAAS,EAAC,+BAAuB,CAAC;;4EACT;AAM1B;IAJC,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,EAAC,+BAAuB,CAAC;;2EACjB;AAOlB;IALC,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,EAAC,4BAAqB,CAAC;IAC9B,IAAA,2BAAS,EAAC,8BAAsB,CAAC;;0EACd;AAGtB;;GAEG;AACH,MAAa,sCAAuC,SAAQ,6CAA6C;CAOxG;AAPD,wFAOC;AADC;IALC,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,yBAAO,EAAC,iCAA0B,CAAC;IACnC,IAAA,2BAAS,EAAC,qCAA6B,CAAC;IACxC,IAAA,2BAAS,EAAC,qCAA6B,CAAC;;qEACjB;AAG1B;;GAEG;AACH,MAAa,wCAAyC,SAAQ,6CAA6C;CAM1G;AAND,4FAMC;AADC;IAJC,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,EAAC,gCAAwB,CAAC;;uEAChB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModelTypeString } from '@dereekb/util';
|
|
2
|
-
export
|
|
2
|
+
export type WebsiteLinkType = ModelTypeString;
|
|
3
3
|
export declare const UNKNOWN_WEBSITE_LINK_TYPE: WebsiteLinkType;
|
|
4
4
|
/**
|
|
5
5
|
* Max length of WebsiteLink's data type.
|
|
@@ -10,7 +10,7 @@ export declare const WEBSITE_LINK_TYPE_MAX_LENGTH = 32;
|
|
|
10
10
|
*/
|
|
11
11
|
export declare const WEBSITE_LINK_TYPE_REGEX: RegExp;
|
|
12
12
|
export declare function isValidWebsiteLinkType(input: string): input is WebsiteLinkType;
|
|
13
|
-
export
|
|
13
|
+
export type WebsiteLinkEncodedData = string;
|
|
14
14
|
export interface WebsiteLink {
|
|
15
15
|
/**
|
|
16
16
|
* Type of link.
|
|
@@ -3,7 +3,7 @@ import { WebsiteLink, WebsiteLinkEncodedData } from './link';
|
|
|
3
3
|
/**
|
|
4
4
|
* Arbitrary file link type.
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export type WebsiteFileLinkType = ModelTypeString;
|
|
7
7
|
/**
|
|
8
8
|
* Max length of WebsiteLink's data type.
|
|
9
9
|
*/
|
|
@@ -15,7 +15,7 @@ export declare const WEBSITE_FILE_LINK_TYPE_REGEX: RegExp;
|
|
|
15
15
|
/**
|
|
16
16
|
* WebsiteFileLink's mime type.
|
|
17
17
|
*/
|
|
18
|
-
export
|
|
18
|
+
export type WebsiteFileLinkMimeType = string;
|
|
19
19
|
/**
|
|
20
20
|
* Max length of WebsiteLink's data type.
|
|
21
21
|
*/
|
|
@@ -27,7 +27,7 @@ export declare const WEBSITE_FILE_LINK_MIME_TYPE_REGEX: RegExp;
|
|
|
27
27
|
/**
|
|
28
28
|
* Arbitrary name. Has no pattern restriction, but must be 128 characters or less.
|
|
29
29
|
*/
|
|
30
|
-
export
|
|
30
|
+
export type WebsiteFileLinkName = string;
|
|
31
31
|
/**
|
|
32
32
|
* Max length of WebsiteLink's data type.
|
|
33
33
|
*/
|
|
@@ -35,7 +35,7 @@ export declare const WEBSITE_FILE_LINK_NAME_MAX_LENGTH = 128;
|
|
|
35
35
|
/**
|
|
36
36
|
* WebsiteFileLink data. Typically a URL.
|
|
37
37
|
*/
|
|
38
|
-
export
|
|
38
|
+
export type WebsiteFileLinkData = string;
|
|
39
39
|
/**
|
|
40
40
|
* Max length of WebsiteLink's data type.
|
|
41
41
|
*/
|
|
@@ -62,7 +62,7 @@ export interface WebsiteFileLink {
|
|
|
62
62
|
*/
|
|
63
63
|
data: WebsiteFileLinkData;
|
|
64
64
|
}
|
|
65
|
-
export
|
|
65
|
+
export type EncodedWebsiteFileLink = WebsiteLinkEncodedData;
|
|
66
66
|
export declare class WebsiteFileLink {
|
|
67
67
|
type?: WebsiteFileLinkType;
|
|
68
68
|
mime?: WebsiteFileLinkType;
|
|
@@ -41,6 +41,7 @@ class WebsiteFileLink {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
+
exports.WebsiteFileLink = WebsiteFileLink;
|
|
44
45
|
tslib_1.__decorate([
|
|
45
46
|
(0, class_transformer_1.Expose)(),
|
|
46
47
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -71,7 +72,6 @@ tslib_1.__decorate([
|
|
|
71
72
|
(0, class_validator_1.MaxLength)(exports.WEBSITE_FILE_LINK_DATA_MAX_LENGTH),
|
|
72
73
|
tslib_1.__metadata("design:type", String)
|
|
73
74
|
], WebsiteFileLink.prototype, "data", void 0);
|
|
74
|
-
exports.WebsiteFileLink = WebsiteFileLink;
|
|
75
75
|
exports.WEBSITE_FILE_LINK_WEBSITE_LINK_TYPE = 'f';
|
|
76
76
|
function websiteFileLinkToWebsiteLink(input) {
|
|
77
77
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.file.js","sourceRoot":"","sources":["../../../../../../../packages/model/src/lib/data/website/link.file.ts"],"names":[],"mappings":";;;;AAAA,wCAA+F;AAC/F,yDAA2C;AAC3C,qDAAuF;AACvF,iCAA0J;AAO1J;;GAEG;AACU,QAAA,iCAAiC,GAAG,mCAA4B,CAAC;AAE9E;;GAEG;AACU,QAAA,4BAA4B,GAAG,8BAAuB,CAAC;AAOpE;;GAEG;AACU,QAAA,sCAAsC,GAAG,GAAG,CAAC;AAE1D;;GAEG;AACU,QAAA,iCAAiC,GAAG,iBAAiB,CAAC;AAOnE;;GAEG;AACU,QAAA,iCAAiC,GAAG,GAAG,CAAC;AAOrD;;GAEG;AACU,QAAA,iCAAiC,GAAG,2CAAoC,GAAG,CAAC,GAAG,yCAAiC,GAAG,8CAAsC,GAAG,yCAAiC,CAAC;AAE9L,QAAA,4BAA4B,GAAG,SAAS,CAAC;AA0BtD,MAAa,eAAe;IA2B1B,YAAY,QAA0B;QACpC,IAAI,QAAQ,IAAI,IAAI,EAAE;YACpB,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;YAC1B,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;YAC1B,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;YAC1B,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;SAC3B;IACH,CAAC;CACF;
|
|
1
|
+
{"version":3,"file":"link.file.js","sourceRoot":"","sources":["../../../../../../../packages/model/src/lib/data/website/link.file.ts"],"names":[],"mappings":"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"}
|
|
@@ -29,6 +29,7 @@ class WebsiteLink {
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
+
exports.WebsiteLink = WebsiteLink;
|
|
32
33
|
tslib_1.__decorate([
|
|
33
34
|
(0, class_transformer_1.Expose)(),
|
|
34
35
|
(0, class_validator_1.IsString)(),
|
|
@@ -44,5 +45,4 @@ tslib_1.__decorate([
|
|
|
44
45
|
(0, class_validator_1.MaxLength)(exports.WEBSITE_LINK_ENCODED_DATA_MAX_LENGTH),
|
|
45
46
|
tslib_1.__metadata("design:type", String)
|
|
46
47
|
], WebsiteLink.prototype, "d", void 0);
|
|
47
|
-
exports.WebsiteLink = WebsiteLink;
|
|
48
48
|
//# sourceMappingURL=link.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.js","sourceRoot":"","sources":["../../../../../../../packages/model/src/lib/data/website/link.ts"],"names":[],"mappings":";;;;AACA,yDAA2C;AAC3C,qDAA2E;AAI9D,QAAA,yBAAyB,GAAoB,GAAG,CAAC;AAE9D;;GAEG;AACU,QAAA,4BAA4B,GAAG,EAAE,CAAC;AAE/C;;GAEG;AACU,QAAA,uBAAuB,GAAG,qBAAqB,CAAC;AAE7D,SAAgB,sBAAsB,CAAC,KAAa;IAClD,OAAO,+BAAuB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC7C,CAAC;AAFD,wDAEC;AAeD;;GAEG;AACU,QAAA,oCAAoC,GAAG,IAAI,CAAC;AAEzD,MAAa,WAAW;IActB,YAAY,QAAsB;QAChC,IAAI,QAAQ,IAAI,IAAI,EAAE;YACpB,IAAI,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;YACpB,IAAI,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;SACrB;IACH,CAAC;CACF;
|
|
1
|
+
{"version":3,"file":"link.js","sourceRoot":"","sources":["../../../../../../../packages/model/src/lib/data/website/link.ts"],"names":[],"mappings":";;;;AACA,yDAA2C;AAC3C,qDAA2E;AAI9D,QAAA,yBAAyB,GAAoB,GAAG,CAAC;AAE9D;;GAEG;AACU,QAAA,4BAA4B,GAAG,EAAE,CAAC;AAE/C;;GAEG;AACU,QAAA,uBAAuB,GAAG,qBAAqB,CAAC;AAE7D,SAAgB,sBAAsB,CAAC,KAAa;IAClD,OAAO,+BAAuB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC7C,CAAC;AAFD,wDAEC;AAeD;;GAEG;AACU,QAAA,oCAAoC,GAAG,IAAI,CAAC;AAEzD,MAAa,WAAW;IActB,YAAY,QAAsB;QAChC,IAAI,QAAQ,IAAI,IAAI,EAAE;YACpB,IAAI,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;YACpB,IAAI,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;SACrB;IACH,CAAC;CACF;AApBD,kCAoBC;AAdC;IALC,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,yBAAO,EAAC,+BAAuB,CAAC;IAChC,IAAA,2BAAS,EAAC,oCAA4B,CAAC;;sCACpB;AAMpB;IAJC,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,EAAC,4CAAoC,CAAC;;sCACrB"}
|
|
@@ -18,87 +18,87 @@ export declare const PHONE_URL_WEBSITE_LINK_TYPE = "p";
|
|
|
18
18
|
export declare function phoneNumberToWebsiteLink(input: E164PhoneNumber): WebsiteLink;
|
|
19
19
|
export declare const FACEBOOK_BASE_URL = "https://www.facebook.com";
|
|
20
20
|
export declare const FACEBOOK_WEBSITE_LINK_TYPE: WebsiteLinkType;
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export
|
|
21
|
+
export type FacebookBaseUrl = typeof FACEBOOK_BASE_URL;
|
|
22
|
+
export type FacebookProfileUrl<P extends FacebookProfileId> = `${FacebookBaseUrl}/${P}`;
|
|
23
|
+
export type FacebookProfileId = string;
|
|
24
|
+
export type FacebookWebsiteLinkType = typeof FACEBOOK_WEBSITE_LINK_TYPE;
|
|
25
25
|
export declare function facebookProfileUrlToWebsiteLink(input: FacebookProfileId | WebsiteUrl): WebsiteLink;
|
|
26
26
|
export declare function facebookProfileUrl<P extends FacebookProfileId>(profileId: P): FacebookProfileUrl<P>;
|
|
27
27
|
export declare const INSTAGRAM_BASE_URL = "https://www.instagram.com";
|
|
28
28
|
export declare const INSTAGRAM_WEBSITE_LINK_TYPE: WebsiteLinkType;
|
|
29
|
-
export
|
|
30
|
-
export
|
|
31
|
-
export
|
|
32
|
-
export
|
|
29
|
+
export type InstagramBaseUrl = typeof INSTAGRAM_BASE_URL;
|
|
30
|
+
export type InstagramProfileUrl<P extends InstagramProfileId> = `${InstagramBaseUrl}/${P}`;
|
|
31
|
+
export type InstagramProfileId = string;
|
|
32
|
+
export type InstagramWebsiteLinkType = typeof INSTAGRAM_WEBSITE_LINK_TYPE;
|
|
33
33
|
export declare function instagramProfileUrlToWebsiteLink(input: InstagramProfileId | WebsiteUrl): WebsiteLink;
|
|
34
34
|
export declare function instagramProfileUrl<P extends InstagramProfileId>(profileId: P): InstagramProfileUrl<P>;
|
|
35
35
|
export declare const TWITTER_BASE_URL = "https://www.twitter.com";
|
|
36
36
|
export declare const TWITTER_WEBSITE_LINK_TYPE: WebsiteLinkType;
|
|
37
|
-
export
|
|
38
|
-
export
|
|
39
|
-
export
|
|
40
|
-
export
|
|
37
|
+
export type TwitterBaseUrl = typeof TWITTER_BASE_URL;
|
|
38
|
+
export type TwitterProfileUrl<P extends TwitterProfileId> = `${TwitterBaseUrl}/${P}`;
|
|
39
|
+
export type TwitterProfileId = string;
|
|
40
|
+
export type TwitterWebsiteLinkType = typeof TWITTER_WEBSITE_LINK_TYPE;
|
|
41
41
|
export declare function twitterProfileUrlToWebsiteLink(input: TwitterProfileId | WebsiteUrl): WebsiteLink;
|
|
42
42
|
export declare function twitterProfileUrl<P extends TwitterProfileId>(profileId: P): TwitterProfileUrl<P>;
|
|
43
43
|
export declare const TIKTOK_BASE_URL = "https://tiktok.com";
|
|
44
44
|
export declare const TIKTOK_USERNAME_PREFIX = "@";
|
|
45
45
|
export declare const TIKTOK_WEBSITE_LINK_TYPE: WebsiteLinkType;
|
|
46
|
-
export
|
|
47
|
-
export
|
|
48
|
-
export
|
|
49
|
-
export
|
|
46
|
+
export type TikTokBaseUrl = typeof TIKTOK_BASE_URL;
|
|
47
|
+
export type TikTokProfileUrl<P extends TikTokProfileId> = `${TikTokBaseUrl}/@${P}`;
|
|
48
|
+
export type TikTokProfileId = string;
|
|
49
|
+
export type TikTokWebsiteLinkType = typeof TIKTOK_WEBSITE_LINK_TYPE;
|
|
50
50
|
export declare function tiktokProfileUrlToWebsiteLink(input: TikTokProfileId | WebsiteUrl): WebsiteLink;
|
|
51
51
|
export declare function tiktokProfileUrl<P extends TikTokProfileId>(profileId: P): TikTokProfileUrl<P>;
|
|
52
52
|
export declare const SNAPCHAT_BASE_URL = "https://snapchat.com";
|
|
53
53
|
export declare const SNAPCHAT_WEBSITE_LINK_TYPE: WebsiteLinkType;
|
|
54
|
-
export
|
|
55
|
-
export
|
|
56
|
-
export
|
|
57
|
-
export
|
|
54
|
+
export type SnapchatBaseUrl = typeof SNAPCHAT_BASE_URL;
|
|
55
|
+
export type SnapchatProfileUrl<P extends SnapchatProfileId> = `${SnapchatBaseUrl}/add/${P}`;
|
|
56
|
+
export type SnapchatProfileId = string;
|
|
57
|
+
export type SnapchatWebsiteLinkType = typeof SNAPCHAT_WEBSITE_LINK_TYPE;
|
|
58
58
|
export declare const SNAPCHAT_WEBSITE_LINK_ISOLATE_PROFILE_ID: IsolateWebsitePathFunction;
|
|
59
59
|
export declare function snapchatProfileUrlToWebsiteLink(input: SnapchatProfileId | WebsiteUrl): WebsiteLink;
|
|
60
60
|
export declare function snapchatProfileUrl<P extends SnapchatProfileId>(profileId: P): SnapchatProfileUrl<P>;
|
|
61
61
|
export declare const YOUTUBE_BASE_URL = "https://youtube.com";
|
|
62
62
|
export declare const YOUTUBE_WEBSITE_LINK_TYPE: WebsiteLinkType;
|
|
63
|
-
export
|
|
64
|
-
export
|
|
65
|
-
export
|
|
66
|
-
export
|
|
63
|
+
export type YouTubeBaseUrl = typeof YOUTUBE_BASE_URL;
|
|
64
|
+
export type YouTubeProfileUrl<P extends YouTubeProfileId> = `${YouTubeBaseUrl}/c/${P}`;
|
|
65
|
+
export type YouTubeProfileId = string;
|
|
66
|
+
export type YouTubeWebsiteLinkType = typeof YOUTUBE_WEBSITE_LINK_TYPE;
|
|
67
67
|
export declare const YOUTUBE_WEBSITE_LINK_ISOLATE_PROFILE_ID: IsolateWebsitePathFunction;
|
|
68
68
|
export declare function youtubeProfileUrlToWebsiteLink(input: YouTubeProfileId | WebsiteUrl): WebsiteLink;
|
|
69
69
|
export declare function youtubeProfileUrl<P extends YouTubeProfileId>(profileId: P): YouTubeProfileUrl<P>;
|
|
70
70
|
export declare const PAYPAL_BASE_URL = "https://paypal.me";
|
|
71
71
|
export declare const PAYPAL_WEBSITE_LINK_TYPE: WebsiteLinkType;
|
|
72
|
-
export
|
|
73
|
-
export
|
|
74
|
-
export
|
|
75
|
-
export
|
|
72
|
+
export type PayPalBaseUrl = typeof PAYPAL_BASE_URL;
|
|
73
|
+
export type PayPalProfileUrl<P extends PayPalProfileId> = `${PayPalBaseUrl}/${P}`;
|
|
74
|
+
export type PayPalProfileId = string;
|
|
75
|
+
export type PayPalWebsiteLinkType = typeof PAYPAL_WEBSITE_LINK_TYPE;
|
|
76
76
|
export declare function paypalProfileUrlToWebsiteLink(input: PayPalProfileId | WebsiteUrl): WebsiteLink;
|
|
77
77
|
export declare function paypalProfileUrl<P extends PayPalProfileId>(profileId: P): PayPalProfileUrl<P>;
|
|
78
78
|
export declare const CASHAPP_BASE_URL = "https://cash.app";
|
|
79
79
|
export declare const CASHAPP_USERNAME_PREFIX = "$";
|
|
80
80
|
export declare const CASHAPP_WEBSITE_LINK_TYPE: WebsiteLinkType;
|
|
81
|
-
export
|
|
82
|
-
export
|
|
83
|
-
export
|
|
84
|
-
export
|
|
81
|
+
export type CashappBaseUrl = typeof CASHAPP_BASE_URL;
|
|
82
|
+
export type CashappProfileUrl<P extends CashappProfileId> = `${CashappBaseUrl}/$${P}`;
|
|
83
|
+
export type CashappProfileId = string;
|
|
84
|
+
export type CashappWebsiteLinkType = typeof CASHAPP_WEBSITE_LINK_TYPE;
|
|
85
85
|
export declare function cashappProfileUrlToWebsiteLink(input: CashappProfileId | WebsiteUrl): WebsiteLink;
|
|
86
86
|
export declare function cashappProfileUrl<P extends CashappProfileId>(profileId: P): CashappProfileUrl<P>;
|
|
87
87
|
export declare const VENMO_BASE_URL = "https://account.venmo.com";
|
|
88
88
|
export declare const VENMO_WEBSITE_LINK_TYPE: WebsiteLinkType;
|
|
89
|
-
export
|
|
90
|
-
export
|
|
91
|
-
export
|
|
92
|
-
export
|
|
89
|
+
export type VenmoBaseUrl = typeof VENMO_BASE_URL;
|
|
90
|
+
export type VenmoProfileUrl<P extends VenmoProfileId> = `${VenmoBaseUrl}/u/${P}`;
|
|
91
|
+
export type VenmoProfileId = string;
|
|
92
|
+
export type VenmoWebsiteLinkType = typeof VENMO_WEBSITE_LINK_TYPE;
|
|
93
93
|
export declare const VENMO_WEBSITE_LINK_ISOLATE_PROFILE_ID: IsolateWebsitePathFunction;
|
|
94
94
|
export declare function venmoProfileUrlToWebsiteLink(input: VenmoProfileId | WebsiteUrl): WebsiteLink;
|
|
95
95
|
export declare function venmoProfileUrl<P extends VenmoProfileId>(profileId: P): VenmoProfileUrl<P>;
|
|
96
96
|
export declare const SPOTIFY_BASE_URL = "https://open.spotify.com/";
|
|
97
97
|
export declare const SPOTIFY_WEBSITE_LINK_TYPE: WebsiteLinkType;
|
|
98
|
-
export
|
|
99
|
-
export
|
|
100
|
-
export
|
|
101
|
-
export
|
|
98
|
+
export type SpotifyBaseUrl = typeof SPOTIFY_BASE_URL;
|
|
99
|
+
export type SpotifyProfileUrl<P extends SpotifyProfileId> = `${SpotifyBaseUrl}/user/${P}`;
|
|
100
|
+
export type SpotifyProfileId = string;
|
|
101
|
+
export type SpotifyWebsiteLinkType = typeof SPOTIFY_WEBSITE_LINK_TYPE;
|
|
102
102
|
export declare const SPOTIFY_WEBSITE_LINK_ISOLATE_PROFILE_ID: IsolateWebsitePathFunction;
|
|
103
103
|
export declare function spotifyProfileUrlToWebsiteLink(input: SpotifyProfileId | WebsiteUrl): WebsiteLink;
|
|
104
104
|
export declare function spotifyProfileUrl<P extends SpotifyProfileId>(profileId: P): SpotifyProfileUrl<P>;
|
|
@@ -87,4 +87,4 @@ export interface InModelContextModelOnlyModelPermissionService<C, T, R extends s
|
|
|
87
87
|
*/
|
|
88
88
|
roleMap(): Promise<ContextGrantedModelRoles<O, C, R>>;
|
|
89
89
|
}
|
|
90
|
-
export
|
|
90
|
+
export type InModelContextModelPermissionService<C, T, R extends string = string, O = T> = InModelContextModelOnlyModelPermissionService<C, T, R, O>;
|
|
@@ -2,21 +2,21 @@ import { ArrayOrValue, IterableOrValue, Maybe, SetIncludesMode } from '@dereekb/
|
|
|
2
2
|
/**
|
|
3
3
|
* A granted role for a model.
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export type GrantedRole = string;
|
|
6
6
|
/**
|
|
7
7
|
* Communicates that the current context is a system admin.
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export type GrantedSysAdminRole = typeof GRANTED_SYS_ADMIN_ROLE_KEY;
|
|
10
10
|
export declare const GRANTED_SYS_ADMIN_ROLE_KEY = "sysadmin";
|
|
11
11
|
/**
|
|
12
12
|
* Communicates that the current context is an admin/owner.
|
|
13
13
|
*/
|
|
14
|
-
export
|
|
14
|
+
export type GrantedOwnerRole = typeof GRANTED_OWNER_ROLE_KEY;
|
|
15
15
|
export declare const GRANTED_OWNER_ROLE_KEY = "owner";
|
|
16
16
|
/**
|
|
17
17
|
* Communicates that the current context is an admin.
|
|
18
18
|
*/
|
|
19
|
-
export
|
|
19
|
+
export type GrantedAdminRole = typeof GRANTED_ADMIN_ROLE_KEY;
|
|
20
20
|
export declare const GRANTED_ADMIN_ROLE_KEY = "admin";
|
|
21
21
|
/**
|
|
22
22
|
* Returns true if the input role is a GrantedAdminRole or a GrantedOwnerRole.
|
|
@@ -28,50 +28,50 @@ export declare function isGrantedAdminLevelRole(role: GrantedRole): boolean;
|
|
|
28
28
|
/**
|
|
29
29
|
* Communicates that the current context has read access to a model.
|
|
30
30
|
*/
|
|
31
|
-
export
|
|
31
|
+
export type GrantedReadRole = typeof GRANTED_READ_ROLE_KEY;
|
|
32
32
|
export declare const GRANTED_READ_ROLE_KEY = "read";
|
|
33
33
|
/**
|
|
34
34
|
* Communicates that the current context has update access to a model.
|
|
35
35
|
*/
|
|
36
|
-
export
|
|
36
|
+
export type GrantedUpdateRole = typeof GRANTED_UPDATE_ROLE_KEY;
|
|
37
37
|
export declare const GRANTED_UPDATE_ROLE_KEY = "update";
|
|
38
38
|
/**
|
|
39
39
|
* Communicates that the current context has delete access to a model.
|
|
40
40
|
*/
|
|
41
|
-
export
|
|
41
|
+
export type GrantedDeleteRole = typeof GRANTED_DELETE_ROLE_KEY;
|
|
42
42
|
export declare const GRANTED_DELETE_ROLE_KEY = "delete";
|
|
43
|
-
export
|
|
43
|
+
export type GrantedCrudRoles = GrantedReadRole | GrantedUpdateRole | GrantedDeleteRole;
|
|
44
44
|
export declare const FULL_ACCESS_ROLE_KEY = "__FULL__";
|
|
45
45
|
/**
|
|
46
46
|
* Communicates that the current context has full access to a model.
|
|
47
47
|
*/
|
|
48
|
-
export
|
|
48
|
+
export type GrantedFullAccessGrantedRole = typeof FULL_ACCESS_ROLE_KEY;
|
|
49
49
|
export declare const NO_ACCESS_ROLE_KEY = "__EMPTY__";
|
|
50
|
-
export
|
|
51
|
-
export
|
|
50
|
+
export type NoAccessGrantedRole = typeof NO_ACCESS_ROLE_KEY;
|
|
51
|
+
export type NoAccessRoleMap = {
|
|
52
52
|
[NO_ACCESS_ROLE_KEY]: true;
|
|
53
53
|
};
|
|
54
54
|
export declare function noAccessRoleMap<R extends string = string>(): GrantedRoleMap<R>;
|
|
55
55
|
export declare function isNoAccessRoleMap<R extends string = string>(input: GrantedRoleMap<R> | NoAccessRoleMap): input is NoAccessRoleMap;
|
|
56
|
-
export
|
|
56
|
+
export type FullAccessRoleMap = {
|
|
57
57
|
[FULL_ACCESS_ROLE_KEY]: true;
|
|
58
58
|
};
|
|
59
59
|
export declare function fullAccessRoleMap<R extends string = string>(): GrantedRoleMap<R>;
|
|
60
60
|
export declare function isFullAccessRoleMap<R extends string = string>(input: GrantedRoleMap<R> | FullAccessRoleMap): input is FullAccessRoleMap;
|
|
61
|
-
export
|
|
62
|
-
export
|
|
61
|
+
export type GrantedRoleMap<R extends GrantedRole = string> = NoAccessRoleMap | FullAccessRoleMap | GrantedRoleKeysMap<R>;
|
|
62
|
+
export type GrantedRoleKeysMap<R extends GrantedRole = string> = {
|
|
63
63
|
[key in R]?: Maybe<boolean>;
|
|
64
64
|
};
|
|
65
65
|
/**
|
|
66
66
|
* Values keyed by roles.
|
|
67
67
|
*/
|
|
68
|
-
export
|
|
68
|
+
export type GrantedRoleTruthMapObject<T, R extends GrantedRole> = Partial<{
|
|
69
69
|
[K in R]: T;
|
|
70
70
|
}>;
|
|
71
71
|
/**
|
|
72
72
|
* Output that removes the keys of all roles that are not contained.
|
|
73
73
|
*/
|
|
74
|
-
export
|
|
74
|
+
export type GrantedRoleTruthMap<M extends GrantedRoleTruthMapObject<any, any>> = M extends GrantedRoleTruthMapObject<infer T, infer R> ? Partial<{
|
|
75
75
|
[K in R]: T;
|
|
76
76
|
}> : never;
|
|
77
77
|
/**
|
|
@@ -5,8 +5,8 @@ export interface TransformAndValidateObjectOutput<T, O> {
|
|
|
5
5
|
object: T;
|
|
6
6
|
result: O;
|
|
7
7
|
}
|
|
8
|
-
export
|
|
9
|
-
export
|
|
8
|
+
export type TransformAndValidateObjectFunction<T, O, I extends object = object, C = unknown> = (input: I, context?: C) => Promise<TransformAndValidateObjectOutput<T, O>>;
|
|
9
|
+
export type TransformAndValidateObjectHandleValidate<O = unknown> = (validationErrors: ValidationError[]) => Promise<O>;
|
|
10
10
|
/**
|
|
11
11
|
* transformAndValidateObject() configuration that also provides error handling.
|
|
12
12
|
*/
|
|
@@ -27,7 +27,7 @@ export interface TransformAndValidateObjectFactoryDefaults<C> {
|
|
|
27
27
|
/**
|
|
28
28
|
* Factory for generating TransformAndValidateObjectFunction functions.
|
|
29
29
|
*/
|
|
30
|
-
export
|
|
30
|
+
export type TransformAndValidateObjectFactory<C = unknown> = <T extends object, O, I extends object = object>(classType: ClassType<T>, fn: (parsed: T) => Promise<O>, handleValidationError?: TransformAndValidateObjectHandleValidate<O>) => TransformAndValidateObjectFunction<T, O, I, C>;
|
|
31
31
|
/**
|
|
32
32
|
* Creates a new TransformAndValidateObjectFactory.
|
|
33
33
|
*
|
|
@@ -35,13 +35,13 @@ export declare type TransformAndValidateObjectFactory<C = unknown> = <T extends
|
|
|
35
35
|
* @returns
|
|
36
36
|
*/
|
|
37
37
|
export declare function transformAndValidateObjectFactory<C = unknown>(defaults: TransformAndValidateObjectFactoryDefaults<C>): TransformAndValidateObjectFactory<C>;
|
|
38
|
-
export
|
|
38
|
+
export type TransformAndValidateObjectResultFunction<T, O, I extends object = object, C = unknown> = (input: I, context?: C) => Promise<TransformAndValidateObjectResultOutput<T, O>>;
|
|
39
39
|
export interface TransformAndValidateObjectResultTransformContextOptions {
|
|
40
40
|
transform?: ClassTransformOptions;
|
|
41
41
|
validate?: ValidationOptions;
|
|
42
42
|
}
|
|
43
|
-
export
|
|
44
|
-
export
|
|
43
|
+
export type TransformAndValidateObjectResultContextOptionsFunction<C> = (context?: C) => TransformAndValidateObjectResultTransformContextOptions;
|
|
44
|
+
export type TransformAndValidateObjectResultOutput<T, O> = TransformAndValidateObjectSuccessResultOutput<T, O> | TransformAndValidateObjectErrorResultOutput<T>;
|
|
45
45
|
export interface TransformAndValidateObjectSuccessResultOutput<T, O> {
|
|
46
46
|
readonly success: true;
|
|
47
47
|
readonly object: T;
|
|
@@ -4,11 +4,11 @@ import { TransformAndValidateResultFunction } from './transform.result';
|
|
|
4
4
|
/**
|
|
5
5
|
* A TransformAndValidate result for a function with the parsed object attached as "params".
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export type TransformAndValidateFunctionResult<T extends object, O> = O & {
|
|
8
8
|
params: T;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
11
|
-
export
|
|
10
|
+
export type TransformAndValidateFunctionResultFunction<T extends object, O, I extends object = object, C = unknown> = TransformAndValidateResultFunction<TransformAndValidateFunctionResult<T, O>, I, C>;
|
|
11
|
+
export type TransformAndValidateFunctionResultFactory<C = unknown> = <T extends object, O, I extends object = object>(classType: ClassType<T>, fn: (parsed: T) => Promise<O>, handleValidationError?: TransformAndValidateObjectHandleValidate<O>) => TransformAndValidateFunctionResultFunction<T, O, I, C>;
|
|
12
12
|
export declare function transformAndValidateFunctionResultFactory<C = unknown>(defaults: TransformAndValidateObjectFactoryDefaults<C>): TransformAndValidateFunctionResultFactory<C>;
|
|
13
13
|
export declare function toTransformAndValidateFunctionResultFactory<C = unknown>(transformAndValidateObjectFactory: TransformAndValidateObjectFactory<C>): TransformAndValidateFunctionResultFactory<C>;
|
|
14
14
|
export declare function toTransformAndValidateFunctionResult<T extends object, O>(objectOutput: Promise<TransformAndValidateObjectOutput<T, O>>): Promise<TransformAndValidateFunctionResult<T, O>>;
|
|
@@ -3,6 +3,6 @@ import { TransformAndValidateObjectFactoryDefaults, TransformAndValidateObjectHa
|
|
|
3
3
|
/**
|
|
4
4
|
* A TransformAndValidate function that returns only the result.
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
7
|
-
export
|
|
6
|
+
export type TransformAndValidateResultFunction<O, I extends object = object, C = unknown> = (input: I, context?: C) => Promise<O>;
|
|
7
|
+
export type TransformAndValidateResultFactory<C = unknown> = <T extends object, O, I extends object = object>(classType: ClassType<T>, fn: (parsed: T) => Promise<O>, handleValidationError?: TransformAndValidateObjectHandleValidate<O>) => TransformAndValidateResultFunction<O, I, C>;
|
|
8
8
|
export declare function transformAndValidateResultFactory<C = unknown>(defaults: TransformAndValidateObjectFactoryDefaults<C>): TransformAndValidateResultFactory<C>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phone.js","sourceRoot":"","sources":["../../../../../../packages/model/src/lib/validator/phone.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"phone.js","sourceRoot":"","sources":["../../../../../../packages/model/src/lib/validator/phone.ts"],"names":[],"mappings":";;;AAAA,wCAAyG;AACzG,qDAA4F;AAE5F;;GAEG;AACH,SAAgB,iBAAiB,CAAC,iBAAqC;IACrE,OAAO,UAAU,MAA6B,EAAE,YAAoB;QAClE,IAAA,mCAAiB,EAAC;YAChB,IAAI,EAAE,mBAAmB;YACzB,MAAM,EAAE,MAAM,CAAC,WAAW;YAC1B,YAAY,EAAE,YAAY;YAC1B,OAAO,EAAE,iBAAiB;YAC1B,SAAS,EAAE;gBACT,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,wBAAiB,EAAC,CAAC,EAAE,KAAK,CAAC;gBAC5C,cAAc,CAAC,IAAyB;oBACtC,OAAO,IAAI,IAAI,CAAC,KAAK,+CAA+C,CAAC;gBACvE,CAAC;aACF;SACF,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAfD,8CAeC;AAED;;;;;GAKG;AACH,SAAgB,sCAAsC,CAAC,iBAAqC;IAC1F,OAAO,UAAU,MAA6B,EAAE,YAAoB;QAClE,IAAA,mCAAiB,EAAC;YAChB,IAAI,EAAE,mBAAmB;YACzB,MAAM,EAAE,MAAM,CAAC,WAAW;YAC1B,YAAY,EAAE,YAAY;YAC1B,OAAO,EAAE,iBAAiB;YAC1B,SAAS,EAAE;gBACT,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,wBAAiB,EAAC,CAAC,EAAE,IAAI,CAAC;gBAC3C,cAAc,CAAC,IAAyB;oBACtC,OAAO,IAAI,IAAI,CAAC,KAAK,0DAA0D,CAAC;gBAClF,CAAC;aACF;SACF,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAfD,wFAeC;AAED;;;;;GAKG;AACH,SAAgB,8BAA8B,CAAC,iBAAqC;IAClF,OAAO,UAAU,MAA6B,EAAE,YAAoB;QAClE,IAAA,mCAAiB,EAAC;YAChB,IAAI,EAAE,gCAAgC;YACtC,MAAM,EAAE,MAAM,CAAC,WAAW;YAC1B,YAAY,EAAE,YAAY;YAC1B,OAAO,EAAE,iBAAiB;YAC1B,SAAS,EAAE;gBACT,QAAQ,EAAE,qCAA8B;gBACxC,cAAc,CAAC,IAAyB;oBACtC,OAAO,IAAI,IAAI,CAAC,KAAK,0CAA0C,CAAC;gBAClE,CAAC;aACF;SACF,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAfD,wEAeC"}
|