import { z } from 'zod'; import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { InternalApiClient } from '../client/internal-api.js'; /** * 상품 주요정보(전자상거래 상품정보제공고시) — 상품군 조회와 저장 입력 검증. * * 고시 항목은 법으로 표시가 요구되는 값(소재·치수·제조사·원산지·A/S 책임자 등)이다. * 그래서 두 가지를 지킨다. * * 1) 상품군 카탈로그(40군)는 **서버가 유일한 출처**다. 여기에 사본을 두지 않는다 — * 복사본을 만들면 법정 항목이 저장소마다 갈라진다. 목록은 internal-api 에서 받아온다. * 2) 값(v)은 도구가 만들어내지 않는다. 모르는 항목은 비운 채로 저장하는 편이 맞다 — * 지어낸 소재·원산지는 그대로 허위 표시가 된다. * * @date: 2026-08-10 */ /** Const::FORM_TYPE_INPUT — 고시 정보를 양식(폼)으로 저장하는 방식 */ export declare const INFORMATION_FORM_TYPE_INPUT = 1; /** 상품군 번호는 카탈로그 배열 순번과 같다(1~40). 순번과 어긋나면 화면이 엉뚱한 군을 고른 것처럼 보인다. */ export declare const INFORMATION_TYPE_MIN = 1; export declare const INFORMATION_TYPE_MAX = 40; export interface NoticeFormItem { k: string; n: string; hint?: string; type: number; required?: boolean; placeholder?: string; group?: string; check_label?: string; } export interface NoticeGroup { type: number; name: string; options: NoticeFormItem[]; } /** 상품군 목록 — 카탈로그 전체 */ export declare function fetchNoticeGroups(internalApi: InternalApiClient): Promise; /** 상품군 한 건 — 그 군의 항목까지 */ export declare function fetchNoticeGroup(internalApi: InternalApiClient, type: number): Promise; /** * 카탈로그를 못 받아온 이유를 사람 말로 바꾼다. * 아직 서버에 엔드포인트가 없을 수 있으므로(이관 전) 404 는 따로 구분해 알린다. */ export declare function describeCatalogError(error: unknown): string; /** information_input_array 한 항목 — internal-api Product::Create 가 보존하는 8개 키 */ export declare const informationInputItemSchema: z.ZodObject<{ k: z.ZodString; n: z.ZodString; v: z.ZodOptional; type: z.ZodNumber; required: z.ZodOptional; required_value: z.ZodOptional; check_label: z.ZodOptional; checked: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: number; k: string; n: string; required?: boolean | undefined; check_label?: string | undefined; v?: string | undefined; required_value?: boolean | undefined; checked?: boolean | undefined; }, { type: number; k: string; n: string; required?: boolean | undefined; check_label?: string | undefined; v?: string | undefined; required_value?: boolean | undefined; checked?: boolean | undefined; }>; export type InformationInputItem = z.infer; export interface ProductInfoNoticeInput { use_information?: boolean; information_type?: number; information_form_type?: number; information_input_array?: InformationInputItem[]; model_name?: string; manufacturer_name?: string; brand_name?: string; origin_code?: string; origin_name?: string; importer?: string; used?: boolean; manufactured_at?: string; expired_at?: string; } /** 상품 주요정보 입력 (create_product / update_product 공용) */ export declare const PRODUCT_INFO_NOTICE_SCHEMA: { use_information: z.ZodOptional; information_type: z.ZodOptional; information_form_type: z.ZodOptional; information_input_array: z.ZodOptional; type: z.ZodNumber; required: z.ZodOptional; required_value: z.ZodOptional; check_label: z.ZodOptional; checked: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: number; k: string; n: string; required?: boolean | undefined; check_label?: string | undefined; v?: string | undefined; required_value?: boolean | undefined; checked?: boolean | undefined; }, { type: number; k: string; n: string; required?: boolean | undefined; check_label?: string | undefined; v?: string | undefined; required_value?: boolean | undefined; checked?: boolean | undefined; }>, "many">>; model_name: z.ZodOptional; manufacturer_name: z.ZodOptional; brand_name: z.ZodOptional; origin_code: z.ZodOptional; origin_name: z.ZodOptional; importer: z.ZodOptional; used: z.ZodOptional; manufactured_at: z.ZodOptional; expired_at: z.ZodOptional; }; /** * 카탈로그 없이 볼 수 있는 것만 먼저 본다 — 형태·짝 검증. * 여기서 걸리면 서버까지 가지 않고 모델에게 문장으로 되돌려 고치게 한다. */ export declare function validateProductInfoNoticeShape(params: ProductInfoNoticeInput): { error: string | null; warnings: string[]; }; /** * 상품군 카탈로그와 대조한다 — 목록에 없는 항목 키를 걸러내는 유일한 자리. * * 카탈로그를 못 받아오면 **막지 않고 경고만 남긴다.** 조회 실패로 저장까지 막으면 * 서버 사정 하나에 상품 등록 경로 전체가 멈춘다. 최종 판정은 어차피 서버가 한다. */ export declare function validateProductInfoNoticeCatalog(internalApi: InternalApiClient, params: ProductInfoNoticeInput): Promise<{ error: string | null; warnings: string[]; }>; /** 형태 검증 → 카탈로그 대조 순으로 한 번에 */ export declare function validateProductInfoNotice(internalApi: InternalApiClient, params: ProductInfoNoticeInput): Promise<{ error: string | null; warnings: string[]; }>; /** 저장 본문에 실을 고시 필드 — 8개 키를 보존한 채로 옮긴다 */ export declare function buildInfoNoticeBody(params: ProductInfoNoticeInput): Record; export declare function registerProductInfoNoticeTools(server: McpServer, internalApi: InternalApiClient): void; //# sourceMappingURL=product-info-notice.d.ts.map