@forge/react

11.9.2-next.0-experimental-919607a11.10.0-next.1
out/hooks/usePermissions.d.ts
~out/hooks/usePermissions.d.tsModified
+4−27
Index: package/out/hooks/usePermissions.d.ts
===================================================================
--- package/out/hooks/usePermissions.d.ts
+++ package/out/hooks/usePermissions.d.ts
@@ -1,14 +1,6 @@
-/**
- * Resource types that can be loaded externally
- */
-declare const RESOURCE_TYPES: readonly ["fonts", "styles", "frames", "images", "media", "scripts"];
-export declare type ResourceType = (typeof RESOURCE_TYPES)[number];
-/**
- * Fetch types for external requests
- */
-declare const FETCH_TYPES: readonly ["backend", "client"];
-export declare type FetchType = (typeof FETCH_TYPES)[number];
+import { type PermissionRequirements, type MissingPermissions, type PermissionCheckResult, type ResourceType, type FetchType } from '@forge/bridge';
+export type { ResourceType, FetchType };
 export interface Permissions {
     scopes?: string[];
     external?: {
         fetch?: {
@@ -23,24 +15,10 @@
         scripts?: string[];
     };
     content?: Record<string, unknown>;
 }
+export type { PermissionRequirements, MissingPermissions, PermissionCheckResult };
 /**
- * Required permissions for a component
- */
-export declare type PermissionRequirements = Permissions;
-/**
- * Missing permissions information
- */
-export declare type MissingPermissions = Permissions;
-/**
- * Permission check result
- */
-export interface PermissionCheckResult {
-    granted: boolean;
-    missing: MissingPermissions | null;
-}
-/**
  * Hook for checking permissions in Forge apps
  *
  * @param requiredPermissions - The permissions required for the component
  * @returns Object containing permission state, loading status, and error information
@@ -77,9 +55,8 @@
  */
 export declare const usePermissions: (requiredPermissions: PermissionRequirements) => {
     hasPermission: boolean;
     isLoading: boolean;
-    missingPermissions: Permissions | null;
+    missingPermissions: PermissionRequirements | null;
     error: Error | null;
 };
-export {};
 //# sourceMappingURL=usePermissions.d.ts.map
\ No newline at end of file