@vorluno/niiko-sdk · Version older
@vorluno/niiko-sdk@0.1.0
The TypeScript client. One typed method per action and per read, a Result union with the outcomes, zero dependencies.
Last updated
- Published
- UTC
- Registry
- www.npmjs.com/package/@vorluno/niiko-sdk
- Source
- vorluno/niiko-sdk-typescript
Install this version
npm install @vorluno/[email protected]What changed around this release
- niiko-cli and n8n-nodes-niiko AddedA command-line client and an n8n community node, both generated from the same plan as the SDKs. The CLI reports the outcome in its exit code (0 done · 2 refused · 3 pending approval · 1 error); the node treats refusals as item results, not node errors.
- Refusals now carry a message Changed
refusedresponses with reasonstaleincludedetail.message: the candidates of an ambiguous name, the stages that do exist, why a template is not valid. The reason alone was reaching integrators; the explanation was not. - Kiipu: void a draft, report a payment Added
kiipu.draft_voidedvoids a draft invoice (never an issued one).kiipu.payment_reportedleaves a payment notice in the approval queue; a person applies it. - WhatsApp broadcast, in two steps Added
miira.broadcast_quotedquotes the same message to up to 50 clients (free inside the 24-hour window, approved template and rate outside) and returns a signed quote valid for 15 minutes;miira.broadcast_sentsends exactly what was quoted, or refuses with a new quote if anything changed. - CRM: notes, contacts, reminders, deals Added
crm.note_added,crm.contact_added,crm.task_createdandcrm.deal_created. All name the client by name; none creates the client. - OAuth tokens accepted at the actions endpoint AddedThe MCP server's OAuth tokens are now a credential of
POST /api/v1/actions/{id}, with the same per-action scopes as API keys. Consent is granted per action, on niiko's consent screen. - Invoice drafts, calls, owners and stages Added
kiipu.invoice_proposedprepares a draft (a person issues it),crm.call_loggedlogs a call,crm.owner_assignedchanges a client's owner andcrm.stage_movedmoves a deal. The MCP server went from one tool to four without touching the server. - The actions API opens Added
POST /api/v1/actions/{id}with API keys, per-action scopes with version, idempotency keys, three outcomes and signed webhooks. First public action:miira.lead_create.