/** * 버튼은 서버 official_format 을 그대로 옮긴 것이라 표시용 필드(ordering 등)가 더 붙어 있다. * 내보내기가 필드를 늘려도 생성물이 타입 오류로 막히지 않게 열어 둔다 — 이 사본은 우리가 만드는 값이 아니다. */ export interface CatalogButton { name: string; linkType?: string; linkMo?: string; linkPc?: string; linkIos?: string; linkAnd?: string; [key: string]: unknown; } export interface CatalogTemplate { code: string; name: string; category?: string | null; msg_type?: string | null; /** 그룹키가 등록된 채널이면 검수 없이 이 코드로 바로 보낼 수 있다 (= 서버 카탈로그에 등재·승인) */ instant_send?: boolean; /** 가맹점 카탈로그에 실제로 보이는가. 지금은 instant_send 와 같은 계산이다 */ catalog_visible?: boolean; content: string; required_variables?: string[]; emphasize_type?: string; emphasize_title?: string; emphasize_subtitle?: string; template_extra?: string; template_header?: string; image_url?: string; storage_image_url?: string; item_highlight?: Record; template_item?: Record; buttons?: CatalogButton[]; variable_examples?: Record; tags?: string[]; security_flag?: boolean; version?: number; } export interface CatalogHit { template: CatalogTemplate; score: number; /** 왜 걸렸는지 — 점수만 보면 AI 가 엉뚱한 후보를 고른 이유를 설명하지 못한다 */ matched: string[]; } /** 소문자 + 한글·영문·숫자 토큰. 1글자는 노이즈라 버린다 (상류 recommend 와 같은 규칙) */ export declare function tokenize(text: string): string[]; export interface CatalogSearchInput { /** 보내려는 문구 또는 검색어 */ text?: string; /** 분류 정확 일치 */ category?: string; msg_type?: string; /** true 면 코드로 바로 보낼 수 있는 것만 (기본 false — 못 보내는 것도 보여 주고 표시한다) */ sendable_only?: boolean; limit?: number; } export declare function searchCatalog(input?: CatalogSearchInput): CatalogHit[]; export declare function getCatalogTemplate(code: string): CatalogTemplate | undefined; export declare function catalogCategories(): string[]; export declare function catalogSummary(): { total: number; sendable: number; categories: number; }; /** 본문에서 변수를 뽑는다 — required_variables 가 비어 있는 항목이 있어 본문을 한 번 더 본다 */ export declare function variablesOf(template: CatalogTemplate): string[]; /** * 찾은 템플릿 하나를 "다음에 무엇을 하면 되는지"로 바꾼다. * 바로 보낼 수 있으면 alimtalk_send 인자, 아니면 alimtalk_create_template 인자를 만들어 준다. */ export declare function applyPlan(template: CatalogTemplate): Record; //# sourceMappingURL=catalog.d.ts.map