@telia-ace/alliance-utilities 1.0.11 → 1.0.12-next.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 +21 -0
- package/dist/get-current-user.d.ts +18 -0
- package/dist/get-translator.d.ts +6 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +273 -555
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
- package/dist/current-user.d.ts +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @telia-ace/alliance-utilities
|
|
2
2
|
|
|
3
|
+
## 1.0.12-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 59f0d3f: Move `getTranslator()` to `@telia-ace/alliance-utilities`.
|
|
8
|
+
- 59f0d3f: Remove unnecessary scripts.
|
|
9
|
+
- 59f0d3f: Add `getCurrentUser`, move `hasPermission` and `isSystemAdmin` into current user object.
|
|
10
|
+
- Updated dependencies [59f0d3f]
|
|
11
|
+
- Updated dependencies [59f0d3f]
|
|
12
|
+
- @telia-ace/alliance-framework@1.0.12-next.1
|
|
13
|
+
- @telia-ace/alliance-internal-client-utilities@1.0.2-next.0
|
|
14
|
+
|
|
15
|
+
## 1.0.12-next.0
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 8763155: Fix `isSystemAdmin()` utility not checking user type correctly.
|
|
20
|
+
- 8763155: Update all dependencies to latest.
|
|
21
|
+
- Updated dependencies [8763155]
|
|
22
|
+
- @telia-ace/alliance-framework@1.0.12-next.0
|
|
23
|
+
|
|
3
24
|
## 1.0.11
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type CurrentUser = {
|
|
2
|
+
displayName: string;
|
|
3
|
+
email: string;
|
|
4
|
+
type: 'system-admin' | 'user';
|
|
5
|
+
objectId: string;
|
|
6
|
+
permissions: {
|
|
7
|
+
permission: {
|
|
8
|
+
name: string;
|
|
9
|
+
app: {
|
|
10
|
+
name: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
}[];
|
|
14
|
+
hasPermission: (appName: string, permissionName: string) => boolean;
|
|
15
|
+
isSystemAdmin: () => boolean;
|
|
16
|
+
};
|
|
17
|
+
export declare function getCurrentUser(): Promise<CurrentUser>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type AppManifest } from '@telia-ace/alliance-framework';
|
|
2
|
+
type RecordEntries = Record<string, string>;
|
|
3
|
+
export type TranslatorFunction = (key: string, params?: RecordEntries) => string;
|
|
4
|
+
export declare function getDefaultLocalization(manifest?: AppManifest): RecordEntries;
|
|
5
|
+
export declare function getTranslator(): Promise<TranslatorFunction>;
|
|
6
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { getCurrentUser } from './get-current-user';
|
|
2
|
+
export { getTranslator, type TranslatorFunction } from './get-translator';
|