cat-documents-ng 1.0.57 → 1.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.
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Storing all permission properties.
3
+ * @export
4
+ * @class PERMISSIONS
5
+ * @typedef {PERMISSIONS}
6
+ */
7
+ export declare class PERMISSIONS {
8
+ /**
9
+ * Access permission.
10
+ * @static
11
+ * @type {string}
12
+ */
13
+ static DOCUMENT_POST: string;
14
+ static DOCUMENT_DELETE: string;
15
+ static DOCUMENTS_REQUEST_DOCUMENT: string;
16
+ static DOCUMENTS_PUT: string;
17
+ }
@@ -37,6 +37,15 @@ export declare class SessionService {
37
37
  * @returns {string[] | null} Trait strings, or null if not found.
38
38
  */
39
39
  getUserTraits(): string[] | null;
40
+ /**
41
+ * Checks if the current user has a specific trait (case-insensitive).
42
+ * @param trait Trait string, e.g. "Documents-PUT"
43
+ */
44
+ hasTrait(trait: string): boolean;
45
+ /**
46
+ * Checks if the current user has any trait from the provided list (case-insensitive).
47
+ */
48
+ hasAnyTrait(traits: string[]): boolean;
40
49
  /**
41
50
  * Retrieves the session ID from the stored session data.
42
51
  * @returns {any | null} The session ID, or null if not found.
@@ -47,11 +56,6 @@ export declare class SessionService {
47
56
  * @returns {string[]} Array of user roles, empty array if no roles found.
48
57
  */
49
58
  getUserRoles(): string[];
50
- /**
51
- * Checks if the user has only the agent role.
52
- * @returns {boolean} True if user only has agent role, false otherwise.
53
- */
54
- isAgentOnly(): boolean;
55
59
  /**
56
60
  * Clears all stored session data from local storage.
57
61
  */