UNPKG

bananas-commerce-admin

Version:

What's this, an admin for apes?

25 lines (24 loc) 1.04 kB
/** * Parses an `operationId` returning app, view and action * * ## Examples * * `bananas.me:list` -> `{ app: "bananas", view: "me", action: "list" }` * * `bananas.login:create` -> `{ app: "bananas", view: "login", action: "create" }` * * `bananas.i18n:list` -> `{ app: "bananas", view: "i18n", action: "list" }` */ export declare function parseOperationId(operationId: string): { app: string; view: string; action: string; } | undefined; export declare function isNavigation(tags: string[]): boolean; export declare function getPath(endpoint: string, method: string, action: string | undefined): string; export declare function getPage(path: string, action: string | undefined): string; export declare function getAppLabel(tags: string[]): string; export declare function getView(id: string): string; export declare function getTitle(view: string, summary?: string): string; export declare function stripPathPrefix(path: string, prefix?: string): string; export declare function parentPath(schema: string): string;