@famgia/omnify-client-sso-react 1.1.0 → 1.1.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/dist/index.d.mts CHANGED
@@ -704,4 +704,66 @@ declare function createSsoService(config: SsoServiceConfig): {
704
704
  };
705
705
  type SsoService = ReturnType<typeof createSsoService>;
706
706
 
707
- export { type ApiToken, type CleanupOrphanedInput, type CreatePermissionInput, type CreateRoleInput, type Organization, OrganizationSwitcher, type OrganizationSwitcherProps, type OrphanedTeam, type Permission, type PermissionMatrix, ProtectedRoute, type ProtectedRouteProps, type Role, type RoleWithPermissions, SsoCallback, type SsoCallbackInput, type SsoCallbackProps, type SsoCallbackResponse, type SsoConfig, SsoContext, type SsoContextValue, type SsoOrganization, SsoProvider, type SsoProviderProps, type SsoService, type SsoServiceConfig, type SsoUser as SsoServiceUser, type SsoUser$1 as SsoUser, type SyncPermissionsInput, type TeamPermissionDetail, type TeamWithPermissions, type UpdatePermissionInput, type UpdateRoleInput, type UseAuthReturn, type UseOrganizationReturn, type UseSsoReturn, createSsoService, useAuth, useOrganization, useSso };
707
+ /**
708
+ * SSO Query Keys - For TanStack Query / React Query
709
+ *
710
+ * Centralized key management for SSO-related queries
711
+ */
712
+ declare const ssoQueryKeys: {
713
+ readonly all: readonly ["sso"];
714
+ readonly auth: {
715
+ readonly all: () => readonly ["sso", "auth"];
716
+ readonly user: () => readonly ["sso", "auth", "user"];
717
+ readonly globalLogoutUrl: (redirectUri?: string) => readonly ["sso", "auth", "global-logout-url", string | undefined];
718
+ };
719
+ readonly tokens: {
720
+ readonly all: () => readonly ["sso", "tokens"];
721
+ readonly list: () => readonly ["sso", "tokens", "list"];
722
+ };
723
+ readonly roles: {
724
+ readonly all: () => readonly ["sso", "roles"];
725
+ readonly list: () => readonly ["sso", "roles", "list"];
726
+ readonly detail: (id: number) => readonly ["sso", "roles", "detail", number];
727
+ };
728
+ readonly permissions: {
729
+ readonly all: () => readonly ["sso", "permissions"];
730
+ readonly list: (params?: {
731
+ group?: string;
732
+ search?: string;
733
+ grouped?: boolean;
734
+ }) => readonly ["sso", "permissions", "list", {
735
+ group?: string;
736
+ search?: string;
737
+ grouped?: boolean;
738
+ } | undefined];
739
+ readonly matrix: () => readonly ["sso", "permissions", "matrix"];
740
+ };
741
+ readonly adminRoles: {
742
+ readonly all: (orgSlug: string) => readonly ["sso", "admin", string, "roles"];
743
+ readonly list: (orgSlug: string) => readonly ["sso", "admin", string, "roles", "list"];
744
+ readonly detail: (orgSlug: string, id: number) => readonly ["sso", "admin", string, "roles", "detail", number];
745
+ readonly permissions: (orgSlug: string, id: number) => readonly ["sso", "admin", string, "roles", number, "permissions"];
746
+ };
747
+ readonly adminPermissions: {
748
+ readonly all: (orgSlug: string) => readonly ["sso", "admin", string, "permissions"];
749
+ readonly list: (orgSlug: string, params?: {
750
+ group?: string;
751
+ search?: string;
752
+ grouped?: boolean;
753
+ }) => readonly ["sso", "admin", string, "permissions", "list", {
754
+ group?: string;
755
+ search?: string;
756
+ grouped?: boolean;
757
+ } | undefined];
758
+ readonly detail: (orgSlug: string, id: number) => readonly ["sso", "admin", string, "permissions", "detail", number];
759
+ readonly matrix: (orgSlug: string) => readonly ["sso", "admin", string, "permissions", "matrix"];
760
+ };
761
+ readonly adminTeams: {
762
+ readonly all: (orgSlug: string) => readonly ["sso", "admin", string, "teams"];
763
+ readonly permissions: (orgSlug: string) => readonly ["sso", "admin", string, "teams", "permissions"];
764
+ readonly teamPermissions: (orgSlug: string, teamId: number) => readonly ["sso", "admin", string, "teams", number, "permissions"];
765
+ readonly orphaned: (orgSlug: string) => readonly ["sso", "admin", string, "teams", "orphaned"];
766
+ };
767
+ };
768
+
769
+ export { type ApiToken, type CleanupOrphanedInput, type CreatePermissionInput, type CreateRoleInput, type Organization, OrganizationSwitcher, type OrganizationSwitcherProps, type OrphanedTeam, type Permission, type PermissionMatrix, ProtectedRoute, type ProtectedRouteProps, type Role, type RoleWithPermissions, SsoCallback, type SsoCallbackInput, type SsoCallbackProps, type SsoCallbackResponse, type SsoConfig, SsoContext, type SsoContextValue, type SsoOrganization, SsoProvider, type SsoProviderProps, type SsoService, type SsoServiceConfig, type SsoUser as SsoServiceUser, type SsoUser$1 as SsoUser, type SyncPermissionsInput, type TeamPermissionDetail, type TeamWithPermissions, type UpdatePermissionInput, type UpdateRoleInput, type UseAuthReturn, type UseOrganizationReturn, type UseSsoReturn, createSsoService, ssoQueryKeys, useAuth, useOrganization, useSso };
package/dist/index.d.ts CHANGED
@@ -704,4 +704,66 @@ declare function createSsoService(config: SsoServiceConfig): {
704
704
  };
705
705
  type SsoService = ReturnType<typeof createSsoService>;
706
706
 
707
- export { type ApiToken, type CleanupOrphanedInput, type CreatePermissionInput, type CreateRoleInput, type Organization, OrganizationSwitcher, type OrganizationSwitcherProps, type OrphanedTeam, type Permission, type PermissionMatrix, ProtectedRoute, type ProtectedRouteProps, type Role, type RoleWithPermissions, SsoCallback, type SsoCallbackInput, type SsoCallbackProps, type SsoCallbackResponse, type SsoConfig, SsoContext, type SsoContextValue, type SsoOrganization, SsoProvider, type SsoProviderProps, type SsoService, type SsoServiceConfig, type SsoUser as SsoServiceUser, type SsoUser$1 as SsoUser, type SyncPermissionsInput, type TeamPermissionDetail, type TeamWithPermissions, type UpdatePermissionInput, type UpdateRoleInput, type UseAuthReturn, type UseOrganizationReturn, type UseSsoReturn, createSsoService, useAuth, useOrganization, useSso };
707
+ /**
708
+ * SSO Query Keys - For TanStack Query / React Query
709
+ *
710
+ * Centralized key management for SSO-related queries
711
+ */
712
+ declare const ssoQueryKeys: {
713
+ readonly all: readonly ["sso"];
714
+ readonly auth: {
715
+ readonly all: () => readonly ["sso", "auth"];
716
+ readonly user: () => readonly ["sso", "auth", "user"];
717
+ readonly globalLogoutUrl: (redirectUri?: string) => readonly ["sso", "auth", "global-logout-url", string | undefined];
718
+ };
719
+ readonly tokens: {
720
+ readonly all: () => readonly ["sso", "tokens"];
721
+ readonly list: () => readonly ["sso", "tokens", "list"];
722
+ };
723
+ readonly roles: {
724
+ readonly all: () => readonly ["sso", "roles"];
725
+ readonly list: () => readonly ["sso", "roles", "list"];
726
+ readonly detail: (id: number) => readonly ["sso", "roles", "detail", number];
727
+ };
728
+ readonly permissions: {
729
+ readonly all: () => readonly ["sso", "permissions"];
730
+ readonly list: (params?: {
731
+ group?: string;
732
+ search?: string;
733
+ grouped?: boolean;
734
+ }) => readonly ["sso", "permissions", "list", {
735
+ group?: string;
736
+ search?: string;
737
+ grouped?: boolean;
738
+ } | undefined];
739
+ readonly matrix: () => readonly ["sso", "permissions", "matrix"];
740
+ };
741
+ readonly adminRoles: {
742
+ readonly all: (orgSlug: string) => readonly ["sso", "admin", string, "roles"];
743
+ readonly list: (orgSlug: string) => readonly ["sso", "admin", string, "roles", "list"];
744
+ readonly detail: (orgSlug: string, id: number) => readonly ["sso", "admin", string, "roles", "detail", number];
745
+ readonly permissions: (orgSlug: string, id: number) => readonly ["sso", "admin", string, "roles", number, "permissions"];
746
+ };
747
+ readonly adminPermissions: {
748
+ readonly all: (orgSlug: string) => readonly ["sso", "admin", string, "permissions"];
749
+ readonly list: (orgSlug: string, params?: {
750
+ group?: string;
751
+ search?: string;
752
+ grouped?: boolean;
753
+ }) => readonly ["sso", "admin", string, "permissions", "list", {
754
+ group?: string;
755
+ search?: string;
756
+ grouped?: boolean;
757
+ } | undefined];
758
+ readonly detail: (orgSlug: string, id: number) => readonly ["sso", "admin", string, "permissions", "detail", number];
759
+ readonly matrix: (orgSlug: string) => readonly ["sso", "admin", string, "permissions", "matrix"];
760
+ };
761
+ readonly adminTeams: {
762
+ readonly all: (orgSlug: string) => readonly ["sso", "admin", string, "teams"];
763
+ readonly permissions: (orgSlug: string) => readonly ["sso", "admin", string, "teams", "permissions"];
764
+ readonly teamPermissions: (orgSlug: string, teamId: number) => readonly ["sso", "admin", string, "teams", number, "permissions"];
765
+ readonly orphaned: (orgSlug: string) => readonly ["sso", "admin", string, "teams", "orphaned"];
766
+ };
767
+ };
768
+
769
+ export { type ApiToken, type CleanupOrphanedInput, type CreatePermissionInput, type CreateRoleInput, type Organization, OrganizationSwitcher, type OrganizationSwitcherProps, type OrphanedTeam, type Permission, type PermissionMatrix, ProtectedRoute, type ProtectedRouteProps, type Role, type RoleWithPermissions, SsoCallback, type SsoCallbackInput, type SsoCallbackProps, type SsoCallbackResponse, type SsoConfig, SsoContext, type SsoContextValue, type SsoOrganization, SsoProvider, type SsoProviderProps, type SsoService, type SsoServiceConfig, type SsoUser as SsoServiceUser, type SsoUser$1 as SsoUser, type SyncPermissionsInput, type TeamPermissionDetail, type TeamWithPermissions, type UpdatePermissionInput, type UpdateRoleInput, type UseAuthReturn, type UseOrganizationReturn, type UseSsoReturn, createSsoService, ssoQueryKeys, useAuth, useOrganization, useSso };
package/dist/index.js CHANGED
@@ -36,6 +36,7 @@ __export(index_exports, {
36
36
  SsoContext: () => SsoContext,
37
37
  SsoProvider: () => SsoProvider,
38
38
  createSsoService: () => createSsoService,
39
+ ssoQueryKeys: () => ssoQueryKeys,
39
40
  useAuth: () => useAuth,
40
41
  useOrganization: () => useOrganization,
41
42
  useSso: () => useSso
@@ -1021,6 +1022,55 @@ function createSsoService(config) {
1021
1022
  }
1022
1023
  };
1023
1024
  }
1025
+
1026
+ // src/queryKeys.ts
1027
+ var ssoQueryKeys = {
1028
+ all: ["sso"],
1029
+ // SSO Auth
1030
+ auth: {
1031
+ all: () => [...ssoQueryKeys.all, "auth"],
1032
+ user: () => [...ssoQueryKeys.auth.all(), "user"],
1033
+ globalLogoutUrl: (redirectUri) => [...ssoQueryKeys.auth.all(), "global-logout-url", redirectUri]
1034
+ },
1035
+ // SSO Tokens
1036
+ tokens: {
1037
+ all: () => [...ssoQueryKeys.all, "tokens"],
1038
+ list: () => [...ssoQueryKeys.tokens.all(), "list"]
1039
+ },
1040
+ // Roles (read-only)
1041
+ roles: {
1042
+ all: () => [...ssoQueryKeys.all, "roles"],
1043
+ list: () => [...ssoQueryKeys.roles.all(), "list"],
1044
+ detail: (id) => [...ssoQueryKeys.roles.all(), "detail", id]
1045
+ },
1046
+ // Permissions (read-only)
1047
+ permissions: {
1048
+ all: () => [...ssoQueryKeys.all, "permissions"],
1049
+ list: (params) => [...ssoQueryKeys.permissions.all(), "list", params],
1050
+ matrix: () => [...ssoQueryKeys.permissions.all(), "matrix"]
1051
+ },
1052
+ // Admin - Roles
1053
+ adminRoles: {
1054
+ all: (orgSlug) => [...ssoQueryKeys.all, "admin", orgSlug, "roles"],
1055
+ list: (orgSlug) => [...ssoQueryKeys.adminRoles.all(orgSlug), "list"],
1056
+ detail: (orgSlug, id) => [...ssoQueryKeys.adminRoles.all(orgSlug), "detail", id],
1057
+ permissions: (orgSlug, id) => [...ssoQueryKeys.adminRoles.all(orgSlug), id, "permissions"]
1058
+ },
1059
+ // Admin - Permissions
1060
+ adminPermissions: {
1061
+ all: (orgSlug) => [...ssoQueryKeys.all, "admin", orgSlug, "permissions"],
1062
+ list: (orgSlug, params) => [...ssoQueryKeys.adminPermissions.all(orgSlug), "list", params],
1063
+ detail: (orgSlug, id) => [...ssoQueryKeys.adminPermissions.all(orgSlug), "detail", id],
1064
+ matrix: (orgSlug) => [...ssoQueryKeys.adminPermissions.all(orgSlug), "matrix"]
1065
+ },
1066
+ // Admin - Teams
1067
+ adminTeams: {
1068
+ all: (orgSlug) => [...ssoQueryKeys.all, "admin", orgSlug, "teams"],
1069
+ permissions: (orgSlug) => [...ssoQueryKeys.adminTeams.all(orgSlug), "permissions"],
1070
+ teamPermissions: (orgSlug, teamId) => [...ssoQueryKeys.adminTeams.all(orgSlug), teamId, "permissions"],
1071
+ orphaned: (orgSlug) => [...ssoQueryKeys.adminTeams.all(orgSlug), "orphaned"]
1072
+ }
1073
+ };
1024
1074
  // Annotate the CommonJS export names for ESM import in node:
1025
1075
  0 && (module.exports = {
1026
1076
  OrganizationSwitcher,
@@ -1029,6 +1079,7 @@ function createSsoService(config) {
1029
1079
  SsoContext,
1030
1080
  SsoProvider,
1031
1081
  createSsoService,
1082
+ ssoQueryKeys,
1032
1083
  useAuth,
1033
1084
  useOrganization,
1034
1085
  useSso
package/dist/index.mjs CHANGED
@@ -977,6 +977,55 @@ function createSsoService(config) {
977
977
  }
978
978
  };
979
979
  }
980
+
981
+ // src/queryKeys.ts
982
+ var ssoQueryKeys = {
983
+ all: ["sso"],
984
+ // SSO Auth
985
+ auth: {
986
+ all: () => [...ssoQueryKeys.all, "auth"],
987
+ user: () => [...ssoQueryKeys.auth.all(), "user"],
988
+ globalLogoutUrl: (redirectUri) => [...ssoQueryKeys.auth.all(), "global-logout-url", redirectUri]
989
+ },
990
+ // SSO Tokens
991
+ tokens: {
992
+ all: () => [...ssoQueryKeys.all, "tokens"],
993
+ list: () => [...ssoQueryKeys.tokens.all(), "list"]
994
+ },
995
+ // Roles (read-only)
996
+ roles: {
997
+ all: () => [...ssoQueryKeys.all, "roles"],
998
+ list: () => [...ssoQueryKeys.roles.all(), "list"],
999
+ detail: (id) => [...ssoQueryKeys.roles.all(), "detail", id]
1000
+ },
1001
+ // Permissions (read-only)
1002
+ permissions: {
1003
+ all: () => [...ssoQueryKeys.all, "permissions"],
1004
+ list: (params) => [...ssoQueryKeys.permissions.all(), "list", params],
1005
+ matrix: () => [...ssoQueryKeys.permissions.all(), "matrix"]
1006
+ },
1007
+ // Admin - Roles
1008
+ adminRoles: {
1009
+ all: (orgSlug) => [...ssoQueryKeys.all, "admin", orgSlug, "roles"],
1010
+ list: (orgSlug) => [...ssoQueryKeys.adminRoles.all(orgSlug), "list"],
1011
+ detail: (orgSlug, id) => [...ssoQueryKeys.adminRoles.all(orgSlug), "detail", id],
1012
+ permissions: (orgSlug, id) => [...ssoQueryKeys.adminRoles.all(orgSlug), id, "permissions"]
1013
+ },
1014
+ // Admin - Permissions
1015
+ adminPermissions: {
1016
+ all: (orgSlug) => [...ssoQueryKeys.all, "admin", orgSlug, "permissions"],
1017
+ list: (orgSlug, params) => [...ssoQueryKeys.adminPermissions.all(orgSlug), "list", params],
1018
+ detail: (orgSlug, id) => [...ssoQueryKeys.adminPermissions.all(orgSlug), "detail", id],
1019
+ matrix: (orgSlug) => [...ssoQueryKeys.adminPermissions.all(orgSlug), "matrix"]
1020
+ },
1021
+ // Admin - Teams
1022
+ adminTeams: {
1023
+ all: (orgSlug) => [...ssoQueryKeys.all, "admin", orgSlug, "teams"],
1024
+ permissions: (orgSlug) => [...ssoQueryKeys.adminTeams.all(orgSlug), "permissions"],
1025
+ teamPermissions: (orgSlug, teamId) => [...ssoQueryKeys.adminTeams.all(orgSlug), teamId, "permissions"],
1026
+ orphaned: (orgSlug) => [...ssoQueryKeys.adminTeams.all(orgSlug), "orphaned"]
1027
+ }
1028
+ };
980
1029
  export {
981
1030
  OrganizationSwitcher,
982
1031
  ProtectedRoute,
@@ -984,6 +1033,7 @@ export {
984
1033
  SsoContext,
985
1034
  SsoProvider,
986
1035
  createSsoService,
1036
+ ssoQueryKeys,
987
1037
  useAuth,
988
1038
  useOrganization,
989
1039
  useSso
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@famgia/omnify-client-sso-react",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "React components and hooks for Omnify SSO integration",
5
5
  "keywords": [
6
6
  "react",