Interfazhost
FormatsService
Utilidades puras (FORMATS), salvo renderTemplate/sanitizeHtml que pasan por el frontend.
Firma
export interface FormatsService {
formatDate(args: { value: string | number; locale?: string; timeZone?: string; style?: "short" | "medium" | "long" | "full" | "date" | "time" | "datetime"; }): Promise<string>;
formatNumber(args: { value: number; locale?: string; style?: "decimal" | "percent" | "currency"; currency?: string; minimumFractionDigits?: number; maximumFractionDigits?: number; }): Promise<string>;
parseIcs(args: { ics: string; }): Promise<any>;
buildIcs(args: { events: any[]; method?: "PUBLISH" | "REQUEST" | "CANCEL"; calendarName?: string; }): Promise<any>;
parseVcard(args: { vcard: string; }): Promise<any>;
buildVcard(args: Record<string, any>): Promise<any>;
renderTemplate(args: { template: string; variables?: Record<string, string | number | boolean | null>; }): Promise<any>;
sanitizeHtml(args: { html: string; }): Promise<any>;
}Miembros (8)
| Nombre | Tipo | Descripción |
|---|---|---|
| formatDate | formatDate(args: { value: string | number; locale?: string; timeZone?: string; style?: "short" | "medium" | "long" | "full" | "date" | "time" | "datetime"; }): Promise<string> | Sin descripción. |
| formatNumber | formatNumber(args: { value: number; locale?: string; style?: "decimal" | "percent" | "currency"; currency?: string; minimumFractionDigits?: number; maximumFractionDigits?: number; }): Promise<string> | Sin descripción. |
| parseIcs | parseIcs(args: { ics: string; }): Promise<any> | [INCIERTO: forma del resultado] |
| buildIcs | buildIcs(args: { events: any[]; method?: "PUBLISH" | "REQUEST" | "CANCEL"; calendarName?: string; }): Promise<any> | events: 1..MAX_ICS_EVENTS. [INCIERTO: forma de cada evento; el resultado es el texto ICS] |
| parseVcard | parseVcard(args: { vcard: string; }): Promise<any> | Sin descripción. |
| buildVcard | buildVcard(args: Record<string, any>): Promise<any> | [INCIERTO: campos exactos; ver formats-service.ts] |
| renderTemplate | renderTemplate(args: { template: string; variables?: Record<string, string | number | boolean | null>; }): Promise<any> | Plantilla Liquid; variables planas (max 50, valores escalares). |
| sanitizeHtml | sanitizeHtml(args: { html: string; }): Promise<any> | Sin descripción. |
Usado en / Referenciado por
Fuente: bloomx-extensions/_shared/sdk/ctx.d.ts:518 · ctx.d.ts