UNPKG

@sberdevices/plasma-temple

Version:

SberDevices CanvasApp Templates.

56 lines 1.98 kB
import { AssistantInsetsCommand, AssistantNavigationCommand, AssistantSmartAppData, createAssistant } from '@sberdevices/assistant-client'; import type { PriceProps, Ratio } from '@sberdevices/plasma-ui'; import { DeviceKind } from '@sberdevices/plasma-ui/utils'; import { StyledComponent } from 'styled-components'; export declare type GetStyledComponentProps<T> = T extends StyledComponent<'div', any, infer T1, never> ? T1 : any; export declare type AnyObject = Record<string, any>; export declare type PickOptional<S, K extends keyof S> = Partial<Pick<S, K>>; export declare type AspectRatio = Ratio; export declare type ObjectFit = 'fill' | 'contain' | 'cover' | 'none' | 'scale-down'; export declare type Axis = 'x' | 'y'; export declare type Direction = AssistantNavigationCommand['navigation']['command']; export declare type DeviceFamily = DeviceKind; export declare type Currency = PriceProps['currency']; export declare type Insets = AssistantInsetsCommand['insets']; export interface AssistantAction { type: string; payload: Record<string, unknown>; } export interface AssistantDataAction extends AssistantSmartAppData { action: AssistantAction; } export declare type AssistantInstance = ReturnType<typeof createAssistant>; export interface MetaPayload { meta?: Record<string, any>; } export interface Description { title: string; content: string; } export interface MediaObject { src: string[] | string; ratio?: AspectRatio; customRatio?: string; covered?: boolean; } export interface AssistantAppStateItem { title: string; number?: number; id?: string; action?: { type: string; payload?: Record<string, unknown>; }; } export interface AssistantAppState { item_selector: { items: Array<AssistantAppStateItem>; }; screen?: string; [key: string]: unknown; } export interface Entity<ID = string> { name: string; id: ID; } //# sourceMappingURL=types.d.ts.map