@getcommunity/gc-validators 0.0.195 → 0.0.196
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/chunk-6QXOUWYU.js +640 -0
- package/dist/chunk-6QXOUWYU.js.map +1 -0
- package/dist/chunk-7WQ6RNXX.js +188 -0
- package/dist/chunk-7WQ6RNXX.js.map +1 -0
- package/dist/chunk-D6QV7LBY.cjs +2508 -0
- package/dist/chunk-D6QV7LBY.cjs.map +1 -0
- package/dist/chunk-HX7LBH7I.cjs +80 -0
- package/dist/chunk-HX7LBH7I.cjs.map +1 -0
- package/dist/chunk-MJPGUX4T.cjs +288 -0
- package/dist/chunk-MJPGUX4T.cjs.map +1 -0
- package/dist/chunk-NNLSUHMQ.js +63 -0
- package/dist/chunk-NNLSUHMQ.js.map +1 -0
- package/dist/chunk-OY5E6YKO.js +2320 -0
- package/dist/chunk-OY5E6YKO.js.map +1 -0
- package/dist/chunk-UAQWYRXG.cjs +92 -0
- package/dist/chunk-UAQWYRXG.cjs.map +1 -0
- package/dist/chunk-UJQSM7DK.js +72 -0
- package/dist/chunk-UJQSM7DK.js.map +1 -0
- package/dist/chunk-YT4F4B55.cjs +646 -0
- package/dist/chunk-YT4F4B55.cjs.map +1 -0
- package/dist/comment.document-C-LqvG8c.d.ts +479 -0
- package/dist/comment.document-DFTbLUjg.d.cts +479 -0
- package/dist/constants.cjs +404 -0
- package/dist/constants.cjs.map +1 -0
- package/dist/constants.d.cts +231 -0
- package/dist/constants.d.ts +231 -0
- package/dist/constants.js +3 -0
- package/dist/constants.js.map +1 -0
- package/dist/font.constants-DyF4szgM.d.cts +7 -0
- package/dist/font.constants-DyF4szgM.d.ts +7 -0
- package/dist/index.cjs +1147 -3609
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -4145
- package/dist/index.d.ts +10 -4145
- package/dist/index.js +5 -3309
- package/dist/index.js.map +1 -1
- package/dist/permission.constants-Chqmz1hY.d.cts +29 -0
- package/dist/permission.constants-Chqmz1hY.d.ts +29 -0
- package/dist/permissions.cjs +28 -0
- package/dist/permissions.cjs.map +1 -0
- package/dist/permissions.d.cts +707 -0
- package/dist/permissions.d.ts +707 -0
- package/dist/permissions.js +3 -0
- package/dist/permissions.js.map +1 -0
- package/dist/response-8Bkawql4.d.cts +56 -0
- package/dist/response-8Bkawql4.d.ts +56 -0
- package/dist/schemas.cjs +679 -0
- package/dist/schemas.cjs.map +1 -0
- package/dist/schemas.d.cts +1866 -0
- package/dist/schemas.d.ts +1866 -0
- package/dist/schemas.js +6 -0
- package/dist/schemas.js.map +1 -0
- package/dist/types.cjs +36 -0
- package/dist/types.cjs.map +1 -0
- package/dist/types.d.cts +772 -0
- package/dist/types.d.ts +772 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/dist/utilities.cjs +40 -0
- package/dist/utilities.cjs.map +1 -0
- package/dist/utilities.d.cts +26 -0
- package/dist/utilities.d.ts +26 -0
- package/dist/utilities.js +3 -0
- package/dist/utilities.js.map +1 -0
- package/package.json +64 -6
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Example usage of ClientEntityScope type
|
|
3
|
+
* @reference https://youtube.com/shorts/zOseJFD447U?si=xX8DYEHdl9YtN7S4
|
|
4
|
+
*
|
|
5
|
+
* > const validScope: ClientEntityScope = "utm-tracking-link:list"; // ✅
|
|
6
|
+
* > const invalidScope: ClientEntityScope = "blog-post:import"; // ❌ Type error!
|
|
7
|
+
*/
|
|
8
|
+
declare const CLIENT_ENTITY_PERMISSIONS: {
|
|
9
|
+
readonly client: readonly ["admin", "owner", "manager", "billing", "access"];
|
|
10
|
+
readonly "client-project": readonly ["list", "create", "read", "update", "delete", "assign"];
|
|
11
|
+
readonly "client-media-platform": readonly ["list", "create", "read", "update", "delete"];
|
|
12
|
+
readonly "client-media-platform-content-type": readonly ["list", "create", "read", "update", "delete"];
|
|
13
|
+
readonly "client-content-pillar": readonly ["list", "create", "read", "update", "delete"];
|
|
14
|
+
readonly "client-report": readonly ["list", "create", "read", "update", "delete"];
|
|
15
|
+
readonly "client-styleguide": readonly ["list", "create", "read", "update", "delete"];
|
|
16
|
+
readonly "utm-tracking-link": readonly ["list", "create", "read", "update", "delete"];
|
|
17
|
+
readonly gcflytour: readonly ["list", "create", "read", "update", "delete"];
|
|
18
|
+
readonly "gcflytour-snap": readonly ["list", "create", "read", "update", "delete"];
|
|
19
|
+
};
|
|
20
|
+
type ClientEntityKey = keyof typeof CLIENT_ENTITY_PERMISSIONS;
|
|
21
|
+
type ClientEntityActions<K extends ClientEntityKey = ClientEntityKey> = (typeof CLIENT_ENTITY_PERMISSIONS)[K][number];
|
|
22
|
+
type EntityActionJoin<K extends string, V extends string> = `${K}:${V}`;
|
|
23
|
+
type ClientEntityScope = {
|
|
24
|
+
[K in ClientEntityKey]: EntityActionJoin<K, (typeof CLIENT_ENTITY_PERMISSIONS)[K][number]>;
|
|
25
|
+
}[ClientEntityKey];
|
|
26
|
+
declare const CLIENT_ENTITY_KEYS: ClientEntityKey[];
|
|
27
|
+
declare const CLIENT_ENTITY_SCOPES: ClientEntityScope[];
|
|
28
|
+
|
|
29
|
+
export { CLIENT_ENTITY_PERMISSIONS as C, type ClientEntityKey as a, type ClientEntityActions as b, type ClientEntityScope as c, CLIENT_ENTITY_KEYS as d, CLIENT_ENTITY_SCOPES as e };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Example usage of ClientEntityScope type
|
|
3
|
+
* @reference https://youtube.com/shorts/zOseJFD447U?si=xX8DYEHdl9YtN7S4
|
|
4
|
+
*
|
|
5
|
+
* > const validScope: ClientEntityScope = "utm-tracking-link:list"; // ✅
|
|
6
|
+
* > const invalidScope: ClientEntityScope = "blog-post:import"; // ❌ Type error!
|
|
7
|
+
*/
|
|
8
|
+
declare const CLIENT_ENTITY_PERMISSIONS: {
|
|
9
|
+
readonly client: readonly ["admin", "owner", "manager", "billing", "access"];
|
|
10
|
+
readonly "client-project": readonly ["list", "create", "read", "update", "delete", "assign"];
|
|
11
|
+
readonly "client-media-platform": readonly ["list", "create", "read", "update", "delete"];
|
|
12
|
+
readonly "client-media-platform-content-type": readonly ["list", "create", "read", "update", "delete"];
|
|
13
|
+
readonly "client-content-pillar": readonly ["list", "create", "read", "update", "delete"];
|
|
14
|
+
readonly "client-report": readonly ["list", "create", "read", "update", "delete"];
|
|
15
|
+
readonly "client-styleguide": readonly ["list", "create", "read", "update", "delete"];
|
|
16
|
+
readonly "utm-tracking-link": readonly ["list", "create", "read", "update", "delete"];
|
|
17
|
+
readonly gcflytour: readonly ["list", "create", "read", "update", "delete"];
|
|
18
|
+
readonly "gcflytour-snap": readonly ["list", "create", "read", "update", "delete"];
|
|
19
|
+
};
|
|
20
|
+
type ClientEntityKey = keyof typeof CLIENT_ENTITY_PERMISSIONS;
|
|
21
|
+
type ClientEntityActions<K extends ClientEntityKey = ClientEntityKey> = (typeof CLIENT_ENTITY_PERMISSIONS)[K][number];
|
|
22
|
+
type EntityActionJoin<K extends string, V extends string> = `${K}:${V}`;
|
|
23
|
+
type ClientEntityScope = {
|
|
24
|
+
[K in ClientEntityKey]: EntityActionJoin<K, (typeof CLIENT_ENTITY_PERMISSIONS)[K][number]>;
|
|
25
|
+
}[ClientEntityKey];
|
|
26
|
+
declare const CLIENT_ENTITY_KEYS: ClientEntityKey[];
|
|
27
|
+
declare const CLIENT_ENTITY_SCOPES: ClientEntityScope[];
|
|
28
|
+
|
|
29
|
+
export { CLIENT_ENTITY_PERMISSIONS as C, type ClientEntityKey as a, type ClientEntityActions as b, type ClientEntityScope as c, CLIENT_ENTITY_KEYS as d, CLIENT_ENTITY_SCOPES as e };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkYT4F4B55_cjs = require('./chunk-YT4F4B55.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "CLIENT_ENTITY_KEYS", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunkYT4F4B55_cjs.CLIENT_ENTITY_KEYS; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "CLIENT_ENTITY_PERMISSIONS", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunkYT4F4B55_cjs.CLIENT_ENTITY_PERMISSIONS; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "CLIENT_ENTITY_SCOPES", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return chunkYT4F4B55_cjs.CLIENT_ENTITY_SCOPES; }
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "ROLE_PERMISSIONS", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () { return chunkYT4F4B55_cjs.ROLE_PERMISSIONS; }
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports, "hasPermission", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () { return chunkYT4F4B55_cjs.hasPermission; }
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=permissions.cjs.map
|
|
28
|
+
//# sourceMappingURL=permissions.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"permissions.cjs"}
|