niiko · Version latest
niiko@0.1.0
The Python client. Dataclasses per action and per read, and a Result with the outcomes, zero dependencies.
Last updated
- Published
- UTC
- Registry
- pypi.org/project/niiko/
- Source
- vorluno/niiko-sdk-python
Install this version
pip install niiko==0.1.0What changed around this release
- Five more reads: the catalog, the knowledge base, a client's balance and overview, the agent's setup Added
POST /api/v1/reads/{id}answers five more declared reads: search the published catalog, search the knowledge base, how much one client owes, where one client stands (open invoices and the channels you talked on, never what was said) and how the sales agent is configured. Same rules as the first nine: OAuth only, the person's role, a workspace switch off by default. The MCP server lists them as read-only tools, and@vorluno/niiko-sdk,niikoandniiko-cli0.4.0 add one method each. - The SDKs and the CLI read Added
@vorluno/niiko-sdk,niikoandniiko-cli0.3.0 take an OAuth access token (accessToken,access_token=,niiko login --token) and have one read-only method per read:getCollections(),get_collections(),niiko read kiipu.collections_get. A read has two outcomes, done or refused, and takes no idempotency key. - Broadcasts can be declared a promotion Added
miira.broadcast_quotedtakes an optionalpurpose:notice(the default, unchanged) orpromotion. A promotion never goes as free text, even with the 24-hour window open: it needs an approved marketing template (otherwiseplantilla_invalida) and only reaches clients with granted marketing consent (no_marketing_consentotherwise). US numbers are left out with the new row outcomeus_moratorium, which is emitted only for a promotion, so existing integrations never see it. The purpose is signed into the quote. - Declared reads, OAuth only Added
POST /api/v1/reads/{id}answers nine declared reads — what is owed, what was collected, the agenda, the funnel, the month — never raw tables and never text someone wrote. Only with an OAuth token, on behalf of a person and with their role (an API key getsreads_need_a_person); each read has its own workspace switch, off by default. The MCP server lists them as read-only tools. - Broadcasts no longer wait for quiet hours Changedniiko no longer defers or excludes sends by the time of day. Broadcast rows are no longer reported as
quiet_hours(the value stays in the outcome enum, but it is never emitted), and the messages queued bymiira.broadcast_sentgo out right away, at any hour. Meta's 24-hour service window and consent rules are unchanged. - 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.