wcz-test 7.1.2 → 7.2.0

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.
Files changed (54) hide show
  1. package/dist/DialogsContext-CGAKEKKW.js +546 -0
  2. package/dist/DialogsContext-CGAKEKKW.js.map +1 -0
  3. package/dist/{DialogsHooks-BXfwbYWP.js → DialogsHooks-BZUdpDVJ.js} +14 -14
  4. package/dist/DialogsHooks-BZUdpDVJ.js.map +1 -0
  5. package/dist/RouterListItemButton-C_jUvB6C.js +18 -0
  6. package/dist/{RouterListItemButton-DrW6M53Y.js.map → RouterListItemButton-C_jUvB6C.js.map} +1 -1
  7. package/dist/compiler-runtime-BNHg76kC.js +37 -0
  8. package/dist/compiler-runtime-BNHg76kC.js.map +1 -0
  9. package/dist/components/core/Layout.d.ts +1 -1
  10. package/dist/components.js +686 -682
  11. package/dist/components.js.map +1 -1
  12. package/dist/exports/hooks.d.ts +1 -1
  13. package/dist/exports/middleware.d.ts +1 -0
  14. package/dist/exports/utils.d.ts +3 -2
  15. package/dist/hooks/UseScanDetection.d.ts +28 -0
  16. package/dist/hooks.js +603 -610
  17. package/dist/hooks.js.map +1 -1
  18. package/dist/{i18next-Bx3TmZAT.js → i18next-8reizFda.js} +71 -63
  19. package/dist/i18next-8reizFda.js.map +1 -0
  20. package/dist/{index-DchOf6FV.js → index-wOcJpekI.js} +6 -4
  21. package/dist/index-wOcJpekI.js.map +1 -0
  22. package/dist/index.js +673 -834
  23. package/dist/index.js.map +1 -1
  24. package/dist/lib/auth/msalClient.d.ts +20 -0
  25. package/dist/lib/auth/msalServer.d.ts +11 -0
  26. package/dist/lib/auth/scopes.d.ts +2 -0
  27. package/dist/lib/auth/utils.d.ts +0 -0
  28. package/dist/lib/theme.d.ts +1 -0
  29. package/dist/lib/utils.d.ts +2 -10
  30. package/dist/middleware/authMiddleware.d.ts +6 -0
  31. package/dist/middleware.js +1101 -0
  32. package/dist/middleware.js.map +1 -0
  33. package/dist/models/TokenPayload.d.ts +8 -0
  34. package/dist/models/User.d.ts +10 -13
  35. package/dist/msalClient-Cem8ZXIU.js +75 -0
  36. package/dist/msalClient-Cem8ZXIU.js.map +1 -0
  37. package/dist/providers/AuthProvider.d.ts +0 -2
  38. package/dist/queries/FileHooks.d.ts +1 -1
  39. package/dist/queries/GraphQueries.d.ts +0 -20
  40. package/dist/query.js +1 -1
  41. package/dist/utils-BXxJ2sNo.js +151 -0
  42. package/dist/utils-BXxJ2sNo.js.map +1 -0
  43. package/dist/utils.js +72 -37
  44. package/dist/utils.js.map +1 -1
  45. package/package.json +16 -11
  46. package/dist/DialogsContext-8xfQ3X-k.js +0 -285
  47. package/dist/DialogsContext-8xfQ3X-k.js.map +0 -1
  48. package/dist/DialogsHooks-BXfwbYWP.js.map +0 -1
  49. package/dist/RouterListItemButton-DrW6M53Y.js +0 -17
  50. package/dist/hooks/User.d.ts +0 -8
  51. package/dist/i18next-Bx3TmZAT.js.map +0 -1
  52. package/dist/index-DchOf6FV.js.map +0 -1
  53. package/dist/utils-Dttzp8un.js +0 -10879
  54. package/dist/utils-Dttzp8un.js.map +0 -1
@@ -0,0 +1,20 @@
1
+ import { NavigationOptions, NavigationClient, PublicClientApplication } from '@azure/msal-browser';
2
+ import { UseNavigateResult } from '@tanstack/react-router';
3
+ import { scopes as definedScopes } from 'virtual:wcz-layout';
4
+ import { User } from '../../models/User';
5
+ export declare const pca: PublicClientApplication;
6
+ export declare class CustomNavigationClient extends NavigationClient {
7
+ private readonly navigate;
8
+ constructor(navigate: UseNavigateResult<string>);
9
+ navigateInternal(url: string, options: NavigationOptions): Promise<boolean>;
10
+ }
11
+ /**
12
+ * User Context: Get parsed user details from the active account's ID token
13
+ * Use when: Validating permissions or displaying user info in the client
14
+ */
15
+ export declare const getUser: () => User;
16
+ /**
17
+ * Token Acquisition: Get authenticated access token.
18
+ * Use when: Making API calls from the browser to secured endpoints
19
+ */
20
+ export declare const getAccessToken: (scopeKey: keyof typeof definedScopes) => Promise<string>;
@@ -0,0 +1,11 @@
1
+ import { scopes as definedScopes } from 'virtual:wcz-layout';
2
+ /**
3
+ * On-Behalf-Of flow: Exchange user token for a token to call downstream API
4
+ * Use when: Server needs to call microservice on behalf of the logged-in user
5
+ */
6
+ export declare const getTokenOnBehalfOf: (userToken: string, scopeKey: keyof typeof definedScopes) => Promise<string>;
7
+ /**
8
+ * Client Credentials flow: Get app-only token (no user context)
9
+ * Use when: Background jobs, scheduled tasks, service-to-service calls
10
+ */
11
+ export declare const getAppToken: (scopeKey: keyof typeof definedScopes) => Promise<string>;
@@ -1,3 +1,5 @@
1
1
  export declare const scopes: {
2
2
  graph: string[];
3
+ appstore: string[];
4
+ phonebook: string[];
3
5
  };
File without changes
@@ -0,0 +1 @@
1
+ export declare function createAppTheme(locale: string): import('@mui/material').Theme;
@@ -1,5 +1,5 @@
1
- import { scopes as definedScopes } from 'virtual:wcz-layout';
2
1
  import { AnyFieldApi } from '@tanstack/react-form';
2
+ import { TokenPayload } from '../models/TokenPayload';
3
3
  export declare const WISTRON_PRIMARY_COLOR = "#00506E";
4
4
  export declare const WISTRON_SECONDARY_COLOR = "#64DC00";
5
5
  export declare class Platform {
@@ -43,7 +43,6 @@ export declare const rootRouteHead: () => {
43
43
  type?: undefined;
44
44
  })[];
45
45
  };
46
- export declare const getAccessToken: (scopeKey: keyof typeof definedScopes) => Promise<string>;
47
46
  export type FormOmittedProps = "name" | "value" | "onChange" | "onBlur" | "error" | "helperText" | "renderInput" | "type" | "aria-label";
48
47
  export declare const getFieldStatus: (field: AnyFieldApi) => {
49
48
  isTouched: boolean;
@@ -51,11 +50,4 @@ export declare const getFieldStatus: (field: AnyFieldApi) => {
51
50
  helperText: any;
52
51
  };
53
52
  export declare const toKebabCase: (str: string) => string;
54
- interface MicrosoftIdTokenPayload {
55
- sub: string;
56
- name: string;
57
- mail: string;
58
- groups?: Array<string>;
59
- }
60
- export declare const decodeJwt: (token: string) => MicrosoftIdTokenPayload;
61
- export {};
53
+ export declare const decodeJwt: (token: string) => TokenPayload;
@@ -0,0 +1,6 @@
1
+ import { permissions } from 'virtual:wcz-layout';
2
+ import { User } from '../models/User';
3
+ export declare const authMiddleware: (key: keyof typeof permissions) => import('@tanstack/start-client-core').RequestMiddlewareAfterServer<{}, undefined, {
4
+ user: User;
5
+ }>;
6
+ export declare const serverFnAccessTokenMiddleware: import('@tanstack/start-client-core').FunctionMiddlewareAfterClient<{}, unknown, undefined, undefined, undefined>;