@forge/react

11.9.1-experimental-60ea29e11.9.2-next.0
out/hooks/usePermissions.d.ts
~out/hooks/usePermissions.d.tsModified
+27−4
Index: package/out/hooks/usePermissions.d.ts
===================================================================
--- package/out/hooks/usePermissions.d.ts
+++ package/out/hooks/usePermissions.d.ts
@@ -1,6 +1,14 @@
-import { type PermissionRequirements, type MissingPermissions, type PermissionCheckResult, type ResourceType, type FetchType } from '@forge/bridge';
-export type { ResourceType, FetchType };
+/**
+ * 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];
 export interface Permissions {
     scopes?: string[];
     external?: {
         fetch?: {
@@ -15,10 +23,24 @@
         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
@@ -55,8 +77,9 @@
  */
 export declare const usePermissions: (requiredPermissions: PermissionRequirements) => {
     hasPermission: boolean;
     isLoading: boolean;
-    missingPermissions: PermissionRequirements | null;
+    missingPermissions: Permissions | null;
     error: Error | null;
 };
+export {};
 //# sourceMappingURL=usePermissions.d.ts.map
\ No newline at end of file