Ecommerce

Canonical Actions

Actions available for implementation and usage

Canonical actions can be imported from the @laioutr-core/canonical-types package. They represent actions that are common in an ecommerce application and may have different implementations depending on the app.

These can be imported from the @laioutr-core/canonical-types/ecommerce package. They bundle all the actions for the ecommerce domain.

Auth

Cart

Wishlist

Customer

import { AuthLoginAction, AuthLogoutAction, AuthRecoverAction, CartAddItemsAction, WishlistAddItemsAction } from '@laioutr-core/canonical-types/ecommerce';
import type { ActionToken, ActionTokenMetadataOf, ActionTokenInputOf, ActionTokenOutputOf } from '@laioutr-core/core-types/orchestr';
type ActionInfo<TAction extends ActionToken> = {
    name: ActionTokenMetadataOf<TAction>['name'];
    input: ActionTokenInputOf<TAction>;
    output: ActionTokenOutputOf<TAction>;
};
// ---cut---
type AuthLoginActionInfo = ActionInfo<typeof AuthLoginAction>;
type AuthLogoutActionInfo = ActionInfo<typeof AuthLogoutAction>;
type AuthRecoverActionInfo = ActionInfo<typeof AuthRecoverAction>;
type CartAddItemsActionInfo = ActionInfo<typeof CartAddItemsAction>;
type WishlistAddItemsActionInfo = ActionInfo<typeof WishlistAddItemsAction>;