> ## Documentation Index
> Fetch the complete documentation index at: https://docs.overhyped.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Methods and it's uses

We have exposed several methods to initialize the organization, initialize the user, connect, updateOptions or disconnect OverhypedAI.

## Methods:

<AccordionGroup>
  <Accordion title="initOrg">
    `initOrg` : Initializes the organization for connection.

    Usage:

    ```typescript {3} theme={"system"}
    import OverhypedAI from '@overhyped-ai/connect/OverhypedAI';

    OverhypedAI("initOrg", "ORG_TOKEN", options?)
    ```

    Detailed Description:

    <Card title="initOrg" icon="code" href="/widget-integration/methods/initOrg" horizontal>
      Initializes the organization for connection.
    </Card>
  </Accordion>

  <Accordion title="initUser">
    `initUser` : Initializes the user for connection. This should be called upon user login.

    Usage:

    ```typescript {3} theme={"system"}
    import OverhypedAI from '@overhyped-ai/connect/OverhypedAI';

    OverhypedAI("initUser", identifier, customMetadata, widgetOptions?)
    ```

    Detailed Description:

    <Card title="initUser" icon="code" href="/widget-integration/methods/initUser" horizontal>
      Initializes the user for connection. This should be called upon user login.
    </Card>
  </Accordion>

  <Accordion title="connect">
    `connect` : Connects the user to OverhypedAI. This is used only when `autoConnect` option in `initOrg` is set to `false`.

    Usage:

    ```typescript {3} theme={"system"}
    import OverhypedAI from '@overhyped-ai/connect/OverhypedAI';

    OverhypedAI("connect", widgetOptions?)
    ```

    Detailed Description:

    <Card title="connect" icon="code" href="/widget-integration/methods/connect" horizontal>
      Connects the user to OverhypedAI. This is used only when `autoConnect` option in `initOrg` is set to `false`.
    </Card>
  </Accordion>

  <Accordion title="updateOptions">
    `updateOptions` : Updates the initial options provided in `initUser` or `connect`(If `autoConnect: false` is provided in `initOrg`).

    Usage:

    ```typescript {3} theme={"system"}
    import OverhypedAI from '@overhyped-ai/connect/OverhypedAI';

    OverhypedAI("updateOptions", config)
    ```

    Detailed Description:

    <Card title="updateOptions" icon="code" href="/widget-integration/methods/updateOptions" horizontal>
      Updates the initial options provided in `initUser` or `connect`(If `autoConnect: false` is provided in `initOrg`).
    </Card>
  </Accordion>

  <Accordion title="disconnect">
    `disconnect` : Disconnects the user from OverhypedAI. Can be used to hide the widget upon logout.

    Usage:

    ```typescript {3} theme={"system"}
    import OverhypedAI from '@overhyped-ai/connect/OverhypedAI';

    OverhypedAI("disconnect")
    ```

    Detailed Description:

    <Card title="disconnect" icon="code" href="/widget-integration/methods/disconnect" horizontal>
      Disconnects the user from OverhypedAI. Can be used to hide the widget upon logout.
    </Card>
  </Accordion>
</AccordionGroup>

## Quick Links

<CardGroup cols={2}>
  <Card title="initOrg" icon="code" href="/widget-integration/methods/initOrg" horizontal />

  <Card title="initUser" icon="code" href="/widget-integration/methods/initUser" horizontal />

  <Card title="connect" icon="code" href="/widget-integration/methods/connect" horizontal />

  <Card title="updateOptions" icon="code" href="/widget-integration/methods/updateOptions" horizontal />

  <Card title="disconnect" icon="code" href="/widget-integration/methods/disconnect" horizontal />
</CardGroup>
