import { RpcMethod } from './commonTypes'; export type linePresetsService_List = RpcMethod; export type linePresetsService_Get = RpcMethod; export type linePresetsService_Create = RpcMethod; export type linePresetsService_Update = RpcMethod; export type linePresetsService_Delete = RpcMethod; export type linePresetsService_Clone = RpcMethod; export interface linePresetsService { /** Lists LINE message presets (reusable content/flex templates for the LINE channel) of an application, with paging, ordering and optional name/code or category filtering. Use to browse presets or find a preset code before get, update, clone or delete. */ List: linePresetsService_List; /** Returns a single LINE preset by its preset code, including localized content and localized flex templates. Use after list_line_presets to inspect one preset in full. */ Get: linePresetsService_Get; /** Creates a new LINE preset in an application from localized content or localized flex templates, assigning a fresh preset code. Each call makes a new preset; use update_line_preset to change an existing one. */ Create: linePresetsService_Create; /** Overwrites an existing LINE preset identified by preset code with the supplied name, categories and localized content or templates. Use to edit a preset in place; create_line_preset makes a new one instead. */ Update: linePresetsService_Update; /** Permanently deletes a LINE preset by its preset code. Blocked if the preset is still referenced by a running or paused journey; the removal cannot be undone. */ Delete: linePresetsService_Delete; /** Copies an existing LINE preset into a target application, producing a new preset with its own code. Use to reuse a preset across applications; each call yields a new copy. */ Clone: linePresetsService_Clone; } export type ListLinePresetsRequest_OrderBy = 'NAME' | 'CREATED' | 'UPDATED'; export type ListLinePresetsRequest_OrderDirection = 'ASC' | 'DESC'; export type ListLinePresetsRequest = { /** Application code (XXXXX-XXXXX) whose LINE presets to list. */ application?: string; orderBy?: ListLinePresetsRequest_OrderBy; orderDirection?: ListLinePresetsRequest_OrderDirection; page?: number; perPage?: number; /** Free-text substring matched against preset name OR preset code (case-insensitive). */ searchByName?: string; /** Keep only presets tagged with any of these category names. */ searchByCategory?: string[]; }; export type Template_kind_image = { type: 'image'; data: ImageTemplate; }; export type Template_kind_imageCarousel = { type: 'imageCarousel'; data: ImageCarouselTemplate; }; export type Template_kind_raw = { type: 'raw'; data: RawTemplate; }; export type Template_kind = Template_kind_image | Template_kind_imageCarousel | Template_kind_raw; export type Template = { kind: Template_kind; }; export type ImageTemplate = { imageUrl: string; previewImageUrl: string; }; export type ImageCarouselTemplate = { altText: string; columns: ImageTemplate[]; }; export type RawTemplate = { altText: string; content: object; }; export type LinePreset = { name: string; code: string; categories: string[]; /** content map {"en": "content"...} */ localizedContent: Record; created: Date; updated: Date; localizedTemplate: Record; }; export type ListLinePresetsResponse = { presets: LinePreset[]; page: number; perPage: number; total: number; }; export type GetLinePresetRequest = { /** LINE preset code to fetch. */ code?: string; }; export type GetLinePresetResponse = { preset: LinePreset; }; export type CreateLinePresetRequest = { /** Application code (XXXXX-XXXXX) the new preset belongs to. */ application?: string; name?: string; categories?: string[]; /** Per-locale plain content, keyed by language code, e.g. {"en": "content"}. Provide this or localized_template. */ localizedContent?: Record; /** Per-locale LINE flex template (image, image carousel or raw), keyed by language code. Provide this or localized_content. */ localizedTemplate?: Record; }; export type CreateLinePresetResponse = { preset: LinePreset; }; export type UpdateLinePresetRequest = { /** LINE preset code to update. */ code?: string; name?: string; categories?: string[]; /** Per-locale plain content, keyed by language code, e.g. {"en": "content"}. Provide this or localized_template. */ localizedContent?: Record; /** Per-locale LINE flex template (image, image carousel or raw), keyed by language code. Provide this or localized_content. */ localizedTemplate?: Record; }; export type UpdateLinePresetResponse = { preset: LinePreset; }; export type DeleteLinePresetRequest = { /** LINE preset code to delete. */ code?: string; }; export type DeleteLinePresetResponse = {}; export type CloneLinePresetRequest = { /** Code of the source LINE preset to copy. */ linePresetCode?: string; /** Application code (XXXXX-XXXXX) the copy is created in. */ applicationCode?: string; }; export type CloneLinePresetResponse = { linePresetCode: string; };