Lime Web Components API Documentation - v7.4.0
    Preparing search index...

    Interface CommandRegistryBeta

    Registry for commands

    This interface is designed to be extended by consumers of Lime Web Components using module augmentation. Each key in the interface corresponds to the id of a registered command, and the value is the type of the command. This allows for type-safe access to commands within the application.

    import {
    Command,
    LimeObjectCommand,
    LimeObjectContext,
    PlatformServiceName,
    } from '@limetech/lime-web-components';

    @Command({ id: 'send-welcome-email' })
    class SendWelcomeEmailCommand implements LimeObjectCommand {
    public context: LimeObjectContext;
    public template: string;
    }

    declare module '@limetech/lime-web-components' {
    interface CommandRegistry {
    'send-welcome-email': SendWelcomeEmailCommand;
    }
    }

    const commandBus = platform.get(PlatformServiceName.CommandBus);

    // The registry entry makes the id pick the type, so `command` is a
    // SendWelcomeEmailCommand and `params` is checked against its properties.
    const command = commandBus.createCommand({
    id: 'send-welcome-email',
    params: { template: 'welcome' },
    });
    Index

    Properties

    "limeobject.bulk-create-dialog": BulkCreateDialogCommand
    "limeobject.create-dialog": CreateLimeobjectDialogCommand
    "limeobject.delete-object": DeleteObjectCommand
    "limeobject.object-access": OpenObjectAccessDialogCommand
    "limeobject.save-object": SaveLimeObjectCommand
    "navigator.navigate": NavigateCommand