{"_id":"@akson/cortex-leads-core","_rev":"2-cc58739e63b81d70014e4279e2eee86e","name":"@akson/cortex-leads-core","dist-tags":{"latest":"0.3.0"},"versions":{"0.3.0":{"name":"@akson/cortex-leads-core","version":"0.3.0","keywords":["leads","lead-management","crm","forms","analytics","akson"],"author":{"name":"MyArmy","email":"contact@myarmy.ch"},"license":"MIT","_id":"@akson/cortex-leads-core@0.3.0","maintainers":[{"name":"antoineschaller","email":"antoine.schaller@akson.ch"}],"homepage":"https://github.com/antoineschaller/myarmy/tree/main/packages/@akson/cortex-leads-core","bugs":{"url":"https://github.com/antoineschaller/myarmy/issues"},"dist":{"shasum":"060787bfb60550e1c37f66dfd40523514b1628c8","tarball":"https://registry.npmjs.org/@akson/cortex-leads-core/-/cortex-leads-core-0.3.0.tgz","fileCount":2,"integrity":"sha512-7K0zca3T2jAUwKNCtZGTMRnbNMbcdEfJ6wwNtvIjksZ/rm6tFy1aGwMlosoMFd+s/AX4/HfcEW2u2/kVarMZzg==","signatures":[{"sig":"MEQCIFdYWSIk2TRkLU7/P51Tv82BlOsk1Pso1h38SKQNBekaAiAoKbL7tf2n9rcNGUX9fx/CcrpKxYytQVaExekA44Bogg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2941},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./types":{"types":"./dist/types/index.d.ts","import":"./dist/types/index.js"},"./utils":{"types":"./dist/utils/index.d.ts","import":"./dist/utils/index.js"},"./interfaces":{"types":"./dist/interfaces/index.d.ts","import":"./dist/interfaces/index.js"}},"gitHead":"84153813d2b6cc183f00f23d04cf0e887c512fbe","scripts":{"dev":"tsup --watch","lint":"biome check src/","test":"vitest","build":"tsup","clean":"rm -rf dist","type-check":"tsc --noEmit"},"_npmUser":{"name":"antoineschaller","email":"antoine.schaller@akson.ch"},"repository":{"url":"git+https://github.com/antoineschaller/myarmy.git","type":"git","directory":"packages/@akson/cortex-leads-core"},"_npmVersion":"11.5.1","description":"Core types and interfaces for @cortex lead management ecosystem","directories":{},"_nodeVersion":"24.7.0","dependencies":{"zod":"^3.24.1","@akson/cortex-api-shared":"^0.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.2.4","vitest":"^2.1.8","typescript":"^5.2.2","@types/node":"^20.11.0","@biomejs/biome":"^1.8.3"},"_npmOperationalInternal":{"tmp":"tmp/cortex-leads-core_0.3.0_1757682727425_0.2006981483985566","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Deprecated: no consumers. No longer maintained."}},"time":{"created":"2025-09-12T13:12:07.310Z","modified":"2026-03-19T12:46:03.438Z","0.3.0":"2025-09-12T13:12:07.654Z"},"bugs":{"url":"https://github.com/antoineschaller/myarmy/issues"},"author":{"name":"MyArmy","email":"contact@myarmy.ch"},"license":"MIT","homepage":"https://github.com/antoineschaller/myarmy/tree/main/packages/@akson/cortex-leads-core","keywords":["leads","lead-management","crm","forms","analytics","akson"],"repository":{"url":"git+https://github.com/antoineschaller/myarmy.git","type":"git","directory":"packages/@akson/cortex-leads-core"},"description":"Core types and interfaces for @cortex lead management ecosystem","maintainers":[{"name":"antoineschaller","email":"antoine.schaller@akson.ch"}],"readme":"# @akson/cortex-leads-core\n\n> Core types and interfaces for @akson lead management ecosystem\n\n## Installation\n\n```bash\nnpm install @akson/cortex-leads-core\n```\n\n## Usage\n\n```typescript\nimport { Lead, LeadStatus, Product } from '@akson/cortex-leads-core/types';\nimport { validateLead, calculateLeadScore } from '@akson/cortex-leads-core/utils';\n\n// Type-safe lead creation\nconst lead: Lead = {\n  id: 'lead_123',\n  phone: '+41791234567',\n  email: 'customer@example.com',\n  status: LeadStatus.NEW,\n  products: [Product.CUSTOM_BADGE],\n  score: 85\n};\n\n// Lead validation\nconst isValid = validateLead(lead);\n\n// Lead scoring\nconst score = calculateLeadScore(lead.actions);\n```\n\n## Types\n\n```typescript\ninterface Lead {\n  id: string;\n  phone: string;\n  email?: string;\n  status: LeadStatus;\n  products: Product[];\n  score: number;\n  createdAt: Date;\n  updatedAt: Date;\n}\n\nenum LeadStatus {\n  NEW = 'new',\n  CONTACTED = 'contacted', \n  QUALIFIED = 'qualified',\n  CONVERTED = 'converted'\n}\n\nenum Product {\n  CUSTOM_BADGE = 'custom_badge',\n  MILITARY_PATCH = 'military_patch',\n  UNIT_INSIGNIA = 'unit_insignia'\n}\n```\n\n## Utilities\n\n- `validateLead()` - Lead data validation\n- `calculateLeadScore()` - Lead scoring algorithm\n- `formatPhone()` - Swiss phone formatting\n- `sanitizeInput()` - Input sanitization\n\n## License\n\nMIT © MyArmy","readmeFilename":"README.md"}