Widget Integration
Methods and it's uses
We have exposed several methods to initialize the organization, initialize the user, connect, or disconnect OverhypedAI.
Methods:
initOrg
: Initializes the organization for connection.
Usage:
import OverhypedAI from '@overhyped-ai/connect/OverhypedAI';
OverhypedAI("initOrg", "ORG_TOKEN", options?)
Detailed Description:
initOrg
Initializes the organization for connection.
initUser
: Initializes the user for connection. This should be called upon user login.
Usage:
import OverhypedAI from '@overhyped-ai/connect/OverhypedAI';
OverhypedAI("initUser", identifier, customMetadata, widgetOptions?)
Detailed Description:
initUser
Initializes the user for connection. This should be called upon user login.
connect
: Connects the user to OverhypedAI. This is used only when autoConnect
option in initOrg
is set to false
.
Usage:
import OverhypedAI from '@overhyped-ai/connect/OverhypedAI';
OverhypedAI("connect", widgetOptions?)
Detailed Description:
connect
Connects the user to OverhypedAI. This is used only when autoConnect
option in initOrg
is set to false
.
disconnect
: Disconnects the user from OverhypedAI. Can be used to hide the widget upon logout.
Usage:
import OverhypedAI from '@overhyped-ai/connect/OverhypedAI';
OverhypedAI("disconnect")
Detailed Description:
disconnect
Disconnects the user from OverhypedAI. Can be used to hide the widget upon logout.