@famgia/omnify-react-sso 2.2.5 → 2.2.7
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/ant/index.cjs +644 -495
- package/dist/ant/index.cjs.map +1 -1
- package/dist/ant/index.d.cts +43 -1
- package/dist/ant/index.d.ts +43 -1
- package/dist/ant/index.js +502 -354
- package/dist/ant/index.js.map +1 -1
- package/dist/index.cjs +680 -505
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +40 -1
- package/dist/index.d.ts +40 -1
- package/dist/index.js +526 -356
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { A as ApiToken, a as AssignRoleInput, b as AssignRoleResponse, c as AuthCallbackInput, d as AuthCallbackResponse, e as AuthService, S as AuthUser, f as AuthUserResponse, B as BRANCH_HEADERS, g as Branch, h as BranchCache, i as BranchCacheCreate, j as BranchCacheUpdate, k as BranchContext, l as BranchProvider, m as BranchService, n as BranchesResponse, C as CleanupOrphanedInput, o as CreatePermissionInput, D as DateString, p as DateTimeString, I as I18nContextValue, q as I18nProvider, r as I18nProviderProps, L as Locale, s as LocaleMap, O as Organization, t as OrganizationCache, u as OrganizationCacheCreate, v as OrganizationCacheUpdate, w as OrphanedTeam, P as PermissionCreate, x as PermissionListParams, y as PermissionMatrix, z as PermissionService, E as PermissionUpdate, R as RemoveRoleResponse, F as RoleAssignment, G as RoleCreate, H as RolePermission, J as RolePermissionCreate, K as RolePermissionUpdate, M as RoleScope, N as RoleUpdate, Q as SsoContext, T as SsoProvider, U as SsoService, V as SsoServiceConfig, S as SsoServiceUser, W as SyncRolesInput, X as SyncRolesResponse, Y as SyncTeamPermissionsInput, Z as TeamCache, _ as TeamCacheCreate, $ as TeamCacheUpdate, a0 as TeamPermission, a1 as TeamPermissionCreate, a2 as TeamPermissionDetail, a3 as TeamPermissionUpdate, a4 as TeamService, a5 as TeamWithPermissions, a6 as TokenService, a7 as UpdatePermissionInput, a8 as UseAuthReturn, a9 as UseBranchReturn, aa as UseOrganizationReturn, ab as UseSsoReturn, ac as UserCache, ad as UserCacheCreate, ae as UserCacheUpdate, af as UserRoleService, ag as ValidationRule, ah as branchCacheCreateSchema, ai as branchCacheI18n, aj as branchCacheSchemas, ak as branchCacheUpdateSchema, al as changeLanguage, am as createAuthService, an as createBranchHeaderSetter, ao as createBranchService, ap as createPermissionService, aq as createSsoService, ar as createTeamService, as as createTokenService, at as createUserRoleService, au as defaultLocale, av as defaultTranslations, aw as fallbackLocale, ax as getBranchCacheFieldLabel, ay as getBranchCacheFieldPlaceholder, az as getBranchCacheLabel, aA as getCurrentLocale, aB as getEffectivePermissions, aC as getMessage, aD as getMessages, aE as getOrganizationCacheFieldLabel, aF as getOrganizationCacheFieldPlaceholder, aG as getOrganizationCacheLabel, aH as getPermissionFieldLabel, aI as getPermissionFieldPlaceholder, aJ as getPermissionLabel, aK as getRoleFieldLabel, aL as getRoleFieldPlaceholder, aM as getRoleLabel, aN as getRolePermissionFieldLabel, aO as getRolePermissionFieldPlaceholder, aP as getRolePermissionLabel, aQ as getScopeLabel, aR as getTeamCacheFieldLabel, aS as getTeamCacheFieldPlaceholder, aT as getTeamCacheLabel, aU as getTeamPermissionFieldLabel, aV as getTeamPermissionFieldPlaceholder, aW as getTeamPermissionLabel, aX as getUserCacheFieldLabel, aY as getUserCacheFieldPlaceholder, aZ as getUserCacheLabel, a_ as localeNames, a$ as locales, b0 as organizationCacheCreateSchema, b1 as organizationCacheI18n, b2 as organizationCacheSchemas, b3 as organizationCacheUpdateSchema, b4 as permissionCreateSchema, b5 as permissionI18n, b6 as permissionSchemas, b7 as permissionUpdateSchema, b8 as roleCreateSchema, b9 as roleI18n, ba as rolePermissionCreateSchema, bb as rolePermissionI18n, bc as rolePermissionSchemas, bd as rolePermissionUpdateSchema, be as roleSchemas, bf as roleUpdateSchema, bg as setBranchHeaders, bh as ssoNamespace, bi as ssoQueryKeys, bj as supportedLocales, bk as teamCacheCreateSchema, bl as teamCacheI18n, bm as teamCacheSchemas, bn as teamCacheUpdateSchema, bo as teamPermissionCreateSchema, bp as teamPermissionI18n, bq as teamPermissionSchemas, br as teamPermissionUpdateSchema, bs as useAuth, bt as useBranch, bu as useLocale, bv as useOrganization, bw as useSso, bx as useSsoTranslation, by as useTranslations, bz as userCacheCreateSchema, bA as userCacheI18n, bB as userCacheSchemas, bC as userCacheUpdateSchema, bD as validationMessages } from './index-DVssHZFD.cjs';
|
|
2
|
-
export { AntdThemeProvider, AntdThemeProviderProps, ApiResponse, BranchGate, BranchLike, LocaleSwitcher, OrgBranchSelectorModal, OrganizationLike, OrganizationSwitcher, PROTABLE_DEFAULT_TEXTS, PageContainer, PageContainerProps, PaginationMeta, PermissionsListCard, PermissionsListCardProps, ProTable, ProTableColumn, ProTableProps, ProTableTexts, ProtectedRoute, QueryParams, RoleCreateModal, RoleCreateModalProps, RolesListCard, RolesListCardProps, RowAction, ScopeLabel, ScopeLabelProps, ScopeTag, ScopeTagProps, ScopeType, SearchField, SsoCallback, StatusConfig, TeamData, TeamsListCard, TeamsListCardProps, UserDetailCard, UserDetailCardProps, UserPermissionsModal, UserPermissionsModalProps, UserRoleAssignModal, UserRoleAssignModalProps, ValueType, getScopeColor, getScopeIcon, useBranchGate } from './ant/index.cjs';
|
|
2
|
+
export { AntdThemeProvider, AntdThemeProviderProps, ApiResponse, BranchGate, BranchLike, LocaleSwitcher, OrgBranchSelectorModal, OrgGate, OrgGateProps, OrganizationLike, OrganizationSwitcher, PROTABLE_DEFAULT_TEXTS, PageContainer, PageContainerProps, PaginationMeta, PermissionsListCard, PermissionsListCardProps, ProTable, ProTableColumn, ProTableProps, ProTableTexts, ProtectedRoute, QueryParams, RoleCreateModal, RoleCreateModalProps, RolesListCard, RolesListCardProps, RowAction, ScopeLabel, ScopeLabelProps, ScopeTag, ScopeTagProps, ScopeType, SearchField, SsoCallback, StatusConfig, TeamData, TeamsListCard, TeamsListCardProps, UserDetailCard, UserDetailCardProps, UserPermissionsModal, UserPermissionsModalProps, UserRoleAssignModal, UserRoleAssignModalProps, ValueType, getScopeColor, getScopeIcon, useBranchGate } from './ant/index.cjs';
|
|
3
3
|
export { C as CreateRoleInput, P as Permission, a as PermissionDetail, R as Role, b as RoleAssignmentWithPermissions, c as RoleService, d as RoleWithPermissions, S as ServiceConfig, P as ServicePermission, R as ServiceRole, e as SyncPermissionsInput, f as SyncPermissionsResponse, T as TeamMembershipWithPermissions, U as UpdateRoleInput, g as User, h as UserListParams, i as UserListResponse, j as UserPermissionsBreakdown, k as UserService, l as UserWithOrg, m as createRoleService, n as createUserService } from './userService-DH9-vPSg.cjs';
|
|
4
4
|
export { B as BranchContextValue, a as BranchGateProps, b as BranchGateSelection, c as BranchProviderProps, O as OrgBranchSelection, d as OrgBranchSelectorModalProps, e as OrganizationSwitcherProps, P as ProtectedRouteProps, S as SsoBranch, f as SsoCallbackProps, g as SsoCallbackResponse, h as SsoConfig, i as SsoContextValue, j as SsoOrganization, k as SsoProviderProps, l as SsoUser } from './types-BxClyvTX.cjs';
|
|
5
5
|
import 'zod';
|
|
@@ -9,3 +9,42 @@ import 'react-i18next';
|
|
|
9
9
|
import 'i18next';
|
|
10
10
|
import 'antd';
|
|
11
11
|
import '@tanstack/react-query';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Organization API Sync Module
|
|
15
|
+
*
|
|
16
|
+
* This module ensures the organization ID is always available for API calls.
|
|
17
|
+
* It syncs the org ID from React state to a global location that apiClient can access.
|
|
18
|
+
*
|
|
19
|
+
* NOTE: Backend accepts organization ID (UUID), code (slug), or name in X-Organization-Id header.
|
|
20
|
+
*
|
|
21
|
+
* The problem it solves:
|
|
22
|
+
* 1. useOrganization() hook provides currentOrg in React state
|
|
23
|
+
* 2. apiClient needs the org ID to add X-Organization-Id header
|
|
24
|
+
* 3. Without sync, API calls can be made before org ID is available
|
|
25
|
+
*
|
|
26
|
+
* Solution:
|
|
27
|
+
* - Sync org ID IMMEDIATELY when it changes (not in useEffect)
|
|
28
|
+
* - Store in both memory and localStorage for persistence
|
|
29
|
+
* - Provide functions for easy integration
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* Set the current organization ID globally
|
|
33
|
+
* Called by OrganizationGate when organization changes
|
|
34
|
+
*/
|
|
35
|
+
declare function setOrgIdForApi(orgId: string | null): void;
|
|
36
|
+
/**
|
|
37
|
+
* Get the current organization ID for API calls
|
|
38
|
+
* Used by apiClient to add X-Organization-Id header
|
|
39
|
+
*/
|
|
40
|
+
declare function getOrgIdForApi(): string | null;
|
|
41
|
+
/**
|
|
42
|
+
* Clear the organization ID (call on logout)
|
|
43
|
+
*/
|
|
44
|
+
declare function clearOrgIdForApi(): void;
|
|
45
|
+
/**
|
|
46
|
+
* Check if organization ID is available for API calls
|
|
47
|
+
*/
|
|
48
|
+
declare function hasOrgIdForApi(): boolean;
|
|
49
|
+
|
|
50
|
+
export { clearOrgIdForApi, getOrgIdForApi, hasOrgIdForApi, setOrgIdForApi };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { A as ApiToken, a as AssignRoleInput, b as AssignRoleResponse, c as AuthCallbackInput, d as AuthCallbackResponse, e as AuthService, S as AuthUser, f as AuthUserResponse, B as BRANCH_HEADERS, g as Branch, h as BranchCache, i as BranchCacheCreate, j as BranchCacheUpdate, k as BranchContext, l as BranchProvider, m as BranchService, n as BranchesResponse, C as CleanupOrphanedInput, o as CreatePermissionInput, D as DateString, p as DateTimeString, I as I18nContextValue, q as I18nProvider, r as I18nProviderProps, L as Locale, s as LocaleMap, O as Organization, t as OrganizationCache, u as OrganizationCacheCreate, v as OrganizationCacheUpdate, w as OrphanedTeam, P as PermissionCreate, x as PermissionListParams, y as PermissionMatrix, z as PermissionService, E as PermissionUpdate, R as RemoveRoleResponse, F as RoleAssignment, G as RoleCreate, H as RolePermission, J as RolePermissionCreate, K as RolePermissionUpdate, M as RoleScope, N as RoleUpdate, Q as SsoContext, T as SsoProvider, U as SsoService, V as SsoServiceConfig, S as SsoServiceUser, W as SyncRolesInput, X as SyncRolesResponse, Y as SyncTeamPermissionsInput, Z as TeamCache, _ as TeamCacheCreate, $ as TeamCacheUpdate, a0 as TeamPermission, a1 as TeamPermissionCreate, a2 as TeamPermissionDetail, a3 as TeamPermissionUpdate, a4 as TeamService, a5 as TeamWithPermissions, a6 as TokenService, a7 as UpdatePermissionInput, a8 as UseAuthReturn, a9 as UseBranchReturn, aa as UseOrganizationReturn, ab as UseSsoReturn, ac as UserCache, ad as UserCacheCreate, ae as UserCacheUpdate, af as UserRoleService, ag as ValidationRule, ah as branchCacheCreateSchema, ai as branchCacheI18n, aj as branchCacheSchemas, ak as branchCacheUpdateSchema, al as changeLanguage, am as createAuthService, an as createBranchHeaderSetter, ao as createBranchService, ap as createPermissionService, aq as createSsoService, ar as createTeamService, as as createTokenService, at as createUserRoleService, au as defaultLocale, av as defaultTranslations, aw as fallbackLocale, ax as getBranchCacheFieldLabel, ay as getBranchCacheFieldPlaceholder, az as getBranchCacheLabel, aA as getCurrentLocale, aB as getEffectivePermissions, aC as getMessage, aD as getMessages, aE as getOrganizationCacheFieldLabel, aF as getOrganizationCacheFieldPlaceholder, aG as getOrganizationCacheLabel, aH as getPermissionFieldLabel, aI as getPermissionFieldPlaceholder, aJ as getPermissionLabel, aK as getRoleFieldLabel, aL as getRoleFieldPlaceholder, aM as getRoleLabel, aN as getRolePermissionFieldLabel, aO as getRolePermissionFieldPlaceholder, aP as getRolePermissionLabel, aQ as getScopeLabel, aR as getTeamCacheFieldLabel, aS as getTeamCacheFieldPlaceholder, aT as getTeamCacheLabel, aU as getTeamPermissionFieldLabel, aV as getTeamPermissionFieldPlaceholder, aW as getTeamPermissionLabel, aX as getUserCacheFieldLabel, aY as getUserCacheFieldPlaceholder, aZ as getUserCacheLabel, a_ as localeNames, a$ as locales, b0 as organizationCacheCreateSchema, b1 as organizationCacheI18n, b2 as organizationCacheSchemas, b3 as organizationCacheUpdateSchema, b4 as permissionCreateSchema, b5 as permissionI18n, b6 as permissionSchemas, b7 as permissionUpdateSchema, b8 as roleCreateSchema, b9 as roleI18n, ba as rolePermissionCreateSchema, bb as rolePermissionI18n, bc as rolePermissionSchemas, bd as rolePermissionUpdateSchema, be as roleSchemas, bf as roleUpdateSchema, bg as setBranchHeaders, bh as ssoNamespace, bi as ssoQueryKeys, bj as supportedLocales, bk as teamCacheCreateSchema, bl as teamCacheI18n, bm as teamCacheSchemas, bn as teamCacheUpdateSchema, bo as teamPermissionCreateSchema, bp as teamPermissionI18n, bq as teamPermissionSchemas, br as teamPermissionUpdateSchema, bs as useAuth, bt as useBranch, bu as useLocale, bv as useOrganization, bw as useSso, bx as useSsoTranslation, by as useTranslations, bz as userCacheCreateSchema, bA as userCacheI18n, bB as userCacheSchemas, bC as userCacheUpdateSchema, bD as validationMessages } from './index-CHuDTvHg.js';
|
|
2
|
-
export { AntdThemeProvider, AntdThemeProviderProps, ApiResponse, BranchGate, BranchLike, LocaleSwitcher, OrgBranchSelectorModal, OrganizationLike, OrganizationSwitcher, PROTABLE_DEFAULT_TEXTS, PageContainer, PageContainerProps, PaginationMeta, PermissionsListCard, PermissionsListCardProps, ProTable, ProTableColumn, ProTableProps, ProTableTexts, ProtectedRoute, QueryParams, RoleCreateModal, RoleCreateModalProps, RolesListCard, RolesListCardProps, RowAction, ScopeLabel, ScopeLabelProps, ScopeTag, ScopeTagProps, ScopeType, SearchField, SsoCallback, StatusConfig, TeamData, TeamsListCard, TeamsListCardProps, UserDetailCard, UserDetailCardProps, UserPermissionsModal, UserPermissionsModalProps, UserRoleAssignModal, UserRoleAssignModalProps, ValueType, getScopeColor, getScopeIcon, useBranchGate } from './ant/index.js';
|
|
2
|
+
export { AntdThemeProvider, AntdThemeProviderProps, ApiResponse, BranchGate, BranchLike, LocaleSwitcher, OrgBranchSelectorModal, OrgGate, OrgGateProps, OrganizationLike, OrganizationSwitcher, PROTABLE_DEFAULT_TEXTS, PageContainer, PageContainerProps, PaginationMeta, PermissionsListCard, PermissionsListCardProps, ProTable, ProTableColumn, ProTableProps, ProTableTexts, ProtectedRoute, QueryParams, RoleCreateModal, RoleCreateModalProps, RolesListCard, RolesListCardProps, RowAction, ScopeLabel, ScopeLabelProps, ScopeTag, ScopeTagProps, ScopeType, SearchField, SsoCallback, StatusConfig, TeamData, TeamsListCard, TeamsListCardProps, UserDetailCard, UserDetailCardProps, UserPermissionsModal, UserPermissionsModalProps, UserRoleAssignModal, UserRoleAssignModalProps, ValueType, getScopeColor, getScopeIcon, useBranchGate } from './ant/index.js';
|
|
3
3
|
export { C as CreateRoleInput, P as Permission, a as PermissionDetail, R as Role, b as RoleAssignmentWithPermissions, c as RoleService, d as RoleWithPermissions, S as ServiceConfig, P as ServicePermission, R as ServiceRole, e as SyncPermissionsInput, f as SyncPermissionsResponse, T as TeamMembershipWithPermissions, U as UpdateRoleInput, g as User, h as UserListParams, i as UserListResponse, j as UserPermissionsBreakdown, k as UserService, l as UserWithOrg, m as createRoleService, n as createUserService } from './userService-DH9-vPSg.js';
|
|
4
4
|
export { B as BranchContextValue, a as BranchGateProps, b as BranchGateSelection, c as BranchProviderProps, O as OrgBranchSelection, d as OrgBranchSelectorModalProps, e as OrganizationSwitcherProps, P as ProtectedRouteProps, S as SsoBranch, f as SsoCallbackProps, g as SsoCallbackResponse, h as SsoConfig, i as SsoContextValue, j as SsoOrganization, k as SsoProviderProps, l as SsoUser } from './types-BxClyvTX.js';
|
|
5
5
|
import 'zod';
|
|
@@ -9,3 +9,42 @@ import 'react-i18next';
|
|
|
9
9
|
import 'i18next';
|
|
10
10
|
import 'antd';
|
|
11
11
|
import '@tanstack/react-query';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Organization API Sync Module
|
|
15
|
+
*
|
|
16
|
+
* This module ensures the organization ID is always available for API calls.
|
|
17
|
+
* It syncs the org ID from React state to a global location that apiClient can access.
|
|
18
|
+
*
|
|
19
|
+
* NOTE: Backend accepts organization ID (UUID), code (slug), or name in X-Organization-Id header.
|
|
20
|
+
*
|
|
21
|
+
* The problem it solves:
|
|
22
|
+
* 1. useOrganization() hook provides currentOrg in React state
|
|
23
|
+
* 2. apiClient needs the org ID to add X-Organization-Id header
|
|
24
|
+
* 3. Without sync, API calls can be made before org ID is available
|
|
25
|
+
*
|
|
26
|
+
* Solution:
|
|
27
|
+
* - Sync org ID IMMEDIATELY when it changes (not in useEffect)
|
|
28
|
+
* - Store in both memory and localStorage for persistence
|
|
29
|
+
* - Provide functions for easy integration
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* Set the current organization ID globally
|
|
33
|
+
* Called by OrganizationGate when organization changes
|
|
34
|
+
*/
|
|
35
|
+
declare function setOrgIdForApi(orgId: string | null): void;
|
|
36
|
+
/**
|
|
37
|
+
* Get the current organization ID for API calls
|
|
38
|
+
* Used by apiClient to add X-Organization-Id header
|
|
39
|
+
*/
|
|
40
|
+
declare function getOrgIdForApi(): string | null;
|
|
41
|
+
/**
|
|
42
|
+
* Clear the organization ID (call on logout)
|
|
43
|
+
*/
|
|
44
|
+
declare function clearOrgIdForApi(): void;
|
|
45
|
+
/**
|
|
46
|
+
* Check if organization ID is available for API calls
|
|
47
|
+
*/
|
|
48
|
+
declare function hasOrgIdForApi(): boolean;
|
|
49
|
+
|
|
50
|
+
export { clearOrgIdForApi, getOrgIdForApi, hasOrgIdForApi, setOrgIdForApi };
|