export declare const accountImportTemplateCode = "import {\n  createImportPlan,\n  createRecordBatch,\n  defineDataExchangeTemplate,\n  previewImport,\n} from \"@contractspec/lib.data-exchange-core\";\nimport { defineSchemaModel, ScalarTypeEnum } from \"@contractspec/lib.schema\";\n\nconst AccountImportSchema = defineSchemaModel({\n  name: \"AccountImport\",\n  fields: {\n    id: { type: ScalarTypeEnum.ID(), isOptional: false },\n    status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n    amount: { type: ScalarTypeEnum.Float_unsecure(), isOptional: false },\n    active: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n    tags: { type: ScalarTypeEnum.JSON(), isOptional: true },\n  },\n});\n\nconst accountImportTemplate = defineDataExchangeTemplate({\n  key: \"accounts.import\",\n  version: \"1.0.0\",\n  title: \"Account import\",\n  columns: [\n    {\n      key: \"id\",\n      label: \"Account ID\",\n      targetField: \"id\",\n      required: true,\n      sourceAliases: [\"Account Identifier\", \"External ID\", \"No compte\"],\n    },\n    {\n      key: \"status\",\n      label: \"Status\",\n      targetField: \"status\",\n      required: true,\n      sourceAliases: [\"Statut\", \"State\"],\n      format: { kind: \"text\", trim: true, case: \"lowercase\" },\n    },\n    {\n      key: \"amount\",\n      label: \"Amount\",\n      targetField: \"amount\",\n      required: true,\n      sourceAliases: [\"Montant\", \"Balance\"],\n      format: { kind: \"number\", decimalSeparator: \",\", thousandsSeparator: \".\" },\n    },\n    {\n      key: \"active\",\n      label: \"Active\",\n      targetField: \"active\",\n      sourceAliases: [\"Actif\", \"Enabled\"],\n      format: { kind: \"boolean\", trueValues: [\"yes\", \"oui\"], falseValues: [\"no\", \"non\"] },\n    },\n    {\n      key: \"tags\",\n      label: \"Tags\",\n      targetField: \"tags\",\n      format: { kind: \"split\", delimiter: \";\" },\n    },\n  ],\n});\n\nconst sourceBatch = createRecordBatch([\n  {\n    \"No compte\": \"acc-1\",\n    Statut: \" Active \",\n    Montant: \"1.234,50\",\n    Actif: \"oui\",\n    Tags: \"vip; beta\",\n  },\n]);\n\nconst preview = previewImport(\n  createImportPlan({\n    source: { kind: \"memory\", batch: sourceBatch, format: \"csv\" },\n    target: { kind: \"memory\", format: \"json\" },\n    schema: AccountImportSchema,\n    sourceBatch,\n    template: accountImportTemplate,\n  }),\n);\n\nconsole.log(preview.plan.mappingSource); // \"template\"\nconsole.log(preview.normalizedRecords[0]);";
export declare const serverDryRunCode = "import { defineDataExchangeTemplate } from \"@contractspec/lib.data-exchange-core\";\nimport { dryRunImport, executeImport } from \"@contractspec/lib.data-exchange-server\";\n\nconst template = defineDataExchangeTemplate({\n  key: \"accounts.import\",\n  version: \"1.0.0\",\n  columns: [\n    { key: \"id\", label: \"Account ID\", targetField: \"id\", required: true, sourceAliases: [\"Account Identifier\"] },\n    { key: \"amount\", label: \"Amount\", targetField: \"amount\", format: { kind: \"currency\", currencySymbol: \"\u20AC\", decimalSeparator: \",\" } },\n  ],\n});\n\nconst partnerSource = {\n  kind: \"file\",\n  path: \"partner-accounts.csv\",\n  format: \"csv\",\n  codecOptions: { csv: { delimiter: \";\", skipRows: 1 } },\n} as const;\n\nconst formatProfile = {\n  columns: {\n    amount: { kind: \"currency\", currencySymbol: \"\u20AC\", decimalSeparator: \",\" },\n  },\n} as const;\n\nconst preview = await dryRunImport({\n  source: partnerSource,\n  target: { kind: \"memory\", format: \"json\" },\n  schema: AccountImportSchema,\n  template,\n  formatProfile,\n});\n\nconst blockingIssues = preview.issues.filter((issue) => issue.severity === \"error\");\n\nif (blockingIssues.length === 0) {\n  await executeImport({\n    source: partnerSource,\n    target: { kind: \"memory\", format: \"json\" },\n    schema: AccountImportSchema,\n    template,\n    formatProfile,\n  });\n}";
export declare const clientReviewCode = "\"use client\";\n\nimport { useDataExchangeController } from \"@contractspec/lib.data-exchange-client\";\n\nexport function ImportMappingReview({ preview }) {\n  const controller = useDataExchangeController({ preview });\n  const replacementSourceColumn = controller.model.ignoredSourceColumns[0];\n\n  return (\n    <section>\n      {controller.model.templateRows.map((row) => (\n        <button\n          key={row.id}\n          type=\"button\"\n          disabled={!replacementSourceColumn}\n          onClick={() => {\n            if (!replacementSourceColumn) return;\n            controller.selectAlias(row.targetField, replacementSourceColumn);\n          }}\n        >\n          {row.label}: {row.sourceField || \"Unmatched\"} -> {row.targetField}\n          {row.required ? \" required\" : \"\"}\n          {row.formatLabel ? ` (${row.formatLabel})` : \"\"}\n        </button>\n      ))}\n      {controller.model.unmatchedRequiredRows.length > 0 ? (\n        <p>Resolve required columns before import.</p>\n      ) : null}\n    </section>\n  );\n}";
export declare const developerPrompt = "You are adding an import flow to a ContractSpec app.\n\nDefine a reusable data-exchange template for this canonical schema:\n- target fields, required flags, and display labels\n- known partner column aliases\n- value formats for numbers, dates, booleans, JSON, split/join lists, currency, and percentages\n\nWire the template into core preview planning and server dry-run execution. Keep explicit mappings higher precedence than template resolution. Return the template, preview call, server dry-run call, and tests for alias matching plus localized formatting.";
export declare const partnerPrompt = "A partner sent a CSV/JSON/XML file that does not match our recommended import template.\n\nCompare the incoming headers and value samples against this ContractSpec data-exchange template. Propose:\n- source-to-target column matches with confidence\n- missing required target fields\n- ignored source columns\n- format overrides for localized numbers, booleans, dates, JSON, split/join lists, currency, or percentages\n\nDo not execute the import. Produce a dry-run plan and the user-facing review copy.";
export declare const verificationCode = "cd packages/libs/data-exchange-core && bun test && bun run typecheck && bun run lint:check\ncd packages/libs/data-exchange-client && bun test && bun run typecheck && bun run lint:check\ncd packages/libs/data-exchange-server && bun test && bun run typecheck && bun run lint:check";
