@farmart-tech/brave-react-adapter
    Preparing search index...

    Interface IWorkspaceAPIOptions

    Configuration options for initializing the WorkspaceAPI client.

    interface IWorkspaceAPIOptions {
        api: string;
        getIdToken: () => Promise<string>;
    }
    Index

    Properties

    Properties

    api: string

    Base URL of the Brave Ship API.

    'https://api.farmart.com/api/v1'
    
    getIdToken: () => Promise<string>

    Function that retrieves the current Firebase authentication token. This will be called before each API request to ensure fresh authentication.

    Type Declaration

      • (): Promise<string>
      • Returns Promise<string>

        Promise resolving to a JWT token string

    getIdToken: async () => {
    const user = getAuth().currentUser;
    if (!user) throw new Error('Not authenticated');
    return await user.getIdToken();
    }