Function to updates app card button config.
object that contains primary button and secondary buttons configs that will be used to update button configuration returned by provider for an app.
let storeRegistration: StoreRegistration | undefined;
await WorkspacePlatform.init({
customActions: {
storeButtonCustomActionHandler: async (payload: StoreCustomButtonActionPayload) => {
if (storeRegistration) {
await storeRegistration.updateAppCardButtons({
appId: payload.appId,
primaryButton: {
...payload.primaryButton,
title: 'Disabled Button',
disabled: true,
},
secondaryButtons: payload.secondaryButtons
});
}
}
}
});
const sampleApp: App = {
title: 'Sample Application',
addId: 'sampleAppId',
icons: [],
publisher: 'Sample',
primaryButton: {
title: 'Sample Button',
action: {
id: 'storeButtonCustomActionHandler',
}
}
},
const storefrontProvider: StorefrontProvider = {
title: 'Sample Store',
id: 'sampleStoreId',
icon: {...},
getApps: () => Promise.resolve([sampleApp]),
getLandingPage: {...},
getNavigation: {...},
getFooter: {...},
launchApp: (app: App) => WR.getCurrentSync().launchApp({app})
};
storeRegistration = await Store.register(storefrontProvider);
await Store.show();
Generated using TypeDoc
Response from store registration which includes metadata and a function to update app cards buttons.