@adobe/genstudio-uix-sdk
Version:
GenStudio UI Extensibility SDK
48 lines (47 loc) • 1.75 kB
TypeScript
export declare class ExtensionRegistrationError extends Error {
constructor(message: string);
}
/**
* Manages extension registration
*/
export declare class ExtensionRegistrationService {
/**
* open the create add on bar
* @param guestConnection - the guest connection
* @param appExtensionId - the app extension id
*
* example:
const ExtensionRegistration = (): React.JSX.Element => {
const init = async (): Promise<void> => {
const guestConnection = await register({
id: extensionId,
methods: {
createAddOnBar: {
addToggle: async (appExtensionId: string): Promise<ToggleItem[]> => {
return [
{
appMetaData: getAppMetadata(appExtensionId),
onClick: async () => {
await openCreateAddOnBar(guestConnection, appExtensionId);
},
}]
}
}
}
}
return <ExtensionRegistration />
}
*/
static openCreateAddOnBar(guestConnection: any, appExtensionId: string): any;
/**
* open the add context add on bar
* @param guestConnection - the guest connection
* @param appExtensionId - the app extension id
*/
static openAddContextAddOnBar(guestConnection: any, appExtensionId: string): any;
/**
* close the add context add on dialog
* @param guestConnection - the guest connection
*/
static closeAddContextAddOnBar(guestConnection: any): any;
}