nixflex 0.8.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/B57-DELETES.md +52 -0
- package/CALL-REQUESTS.md +73 -0
- package/CHANGELOG.md +204 -84
- package/KIT-EXAMPLES-K6.md +118 -0
- package/KIT-EXAMPLES-K7.md +104 -0
- package/KNOWLEDGE.md +61 -0
- package/LICENSE +21 -21
- package/METHODS.md +176 -0
- package/NUMBER-FEATURES.md +51 -0
- package/ORGANISATIONS.md +9 -0
- package/README.md +56 -117
- package/TEAM-INTEGRATIONS.md +69 -0
- package/THIRD-PARTY-NOTICES.md +26 -0
- package/dist/cli/index.js +3901 -371
- package/dist/index.cjs +1255 -174
- package/dist/index.d.cts +2031 -322
- package/dist/index.d.ts +2031 -322
- package/dist/index.js +1233 -171
- package/package.json +72 -60
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# K7 examples (unpublished candidates)
|
|
2
|
+
|
|
3
|
+
Set credentials privately outside code. Every example explicitly supplies a base URL; do not copy a production URL into a test. Preparation is local. Save the account and base-URL association with the intent; reuse that same environment and account when reconciling or retrying. Running create places a paid call: execute that line only for a human-approved call, never as an automatic retry.
|
|
4
|
+
|
|
5
|
+
## Node
|
|
6
|
+
|
|
7
|
+
```js
|
|
8
|
+
import Nixflex, {prepareOutboundCall, NixflexOutboundRequestError} from 'nixflex';
|
|
9
|
+
import {writeFileSync, readFileSync} from 'node:fs';
|
|
10
|
+
const client = new Nixflex({apiKey:process.env.NIXFLEX_API_KEY,
|
|
11
|
+
baseUrl:process.env.NIXFLEX_BASE_URL, maxRetries:0});
|
|
12
|
+
// Step 1, once per NEW intent. Application must keep this private file/account binding.
|
|
13
|
+
const prepared = prepareOutboundCall({agent_id:'YOUR_AGENT',
|
|
14
|
+
to_number:'+12025550100', from_number:'+12025550101', prompt:'Your approved call purpose'});
|
|
15
|
+
writeFileSync('prepared-call.json', JSON.stringify(prepared), {encoding:'utf8', flag:'wx', mode:0o600});
|
|
16
|
+
// Step 2, only after human authorization; never wrap this in an automatic retry loop.
|
|
17
|
+
const saved = JSON.parse(readFileSync('prepared-call.json','utf8'));
|
|
18
|
+
try {
|
|
19
|
+
const receipt = await client.calls.create(saved);
|
|
20
|
+
// Persist receipt.call_id, including if request_status is unconfirmed. Do not redial.
|
|
21
|
+
} catch (error) {
|
|
22
|
+
if (!(error instanceof NixflexOutboundRequestError)) throw error;
|
|
23
|
+
// Display only error.status/error.code/error.details.request_id, then reconcile.
|
|
24
|
+
}
|
|
25
|
+
// Read separately, without creating any call:
|
|
26
|
+
const request = await client.calls.outboundRequest(saved.request_id);
|
|
27
|
+
if (request.state === 'accepted' && request.call_id) {
|
|
28
|
+
const bookings = await client.calls.bookings(request.call_id);
|
|
29
|
+
if (bookings.state === 'ready') { /* Use timeline/final as returned. */ }
|
|
30
|
+
else if (bookings.state === 'none') { /* Proven no successful booking changes. */ }
|
|
31
|
+
else { /* Keep processing/deleted/unavailable distinct. */ }
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
For a retry decision, load the existing file; do not execute Step 1 again. SDK typed request_id callers receive OutboundRequestReceipt (to/from optional); a no-ID create retains OutboundCallResponse typing.
|
|
36
|
+
|
|
37
|
+
## CLI (PowerShell 5.1 and 7)
|
|
38
|
+
|
|
39
|
+
```powershell
|
|
40
|
+
# Put agent_id/to_number/from_number/prompt in a private UTF-8 intent.json.
|
|
41
|
+
# Local only; fails if prepared-call.json already exists. No key required.
|
|
42
|
+
nixflex calls prepare --body '@intent.json' --output prepared-call.json --json
|
|
43
|
+
# Only for the approved initial send. Key/base URL are configured privately.
|
|
44
|
+
nixflex calls create --body '@prepared-call.json' --base-url $env:NIXFLEX_BASE_URL --json
|
|
45
|
+
# Read only. These commands cannot place calls.
|
|
46
|
+
nixflex calls outboundRequest 'SAVED-UUID' --base-url $env:NIXFLEX_BASE_URL --json
|
|
47
|
+
nixflex calls bookings 'KNOWN-CALL-ID' --base-url $env:NIXFLEX_BASE_URL --json
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Check each command's exit code before continuing; never chain prepare/create in a retry loop. A supplied --request-id UUID is also supported for create, but save the exact inputs first. CLI --json errors exit 1; inspect error.status/code/details.request_id. Never print the key or log the booking payload.
|
|
51
|
+
|
|
52
|
+
## Python sync and async
|
|
53
|
+
|
|
54
|
+
```python
|
|
55
|
+
import json, os
|
|
56
|
+
from pathlib import Path
|
|
57
|
+
from nixflex import Nixflex, AsyncNixflex, prepare_outbound_call, NixflexOutboundRequestError
|
|
58
|
+
connection = dict(api_key=os.environ['NIXFLEX_API_KEY'],
|
|
59
|
+
base_url=os.environ['NIXFLEX_BASE_URL'], max_retries=0)
|
|
60
|
+
# Local preparation, once for a new authorized intent; use private access permissions.
|
|
61
|
+
prepared = prepare_outbound_call(dict(agent_id='YOUR_AGENT', to_number='+12025550100',
|
|
62
|
+
from_number='+12025550101', prompt='Your approved call purpose', variables={'name':'Example'}))
|
|
63
|
+
with open('prepared-call.json','x',encoding='utf-8') as file:
|
|
64
|
+
json.dump(prepared,file)
|
|
65
|
+
saved = json.loads(Path('prepared-call.json').read_text(encoding='utf-8'))
|
|
66
|
+
with Nixflex(**connection) as client:
|
|
67
|
+
try:
|
|
68
|
+
receipt = client.calls.create(**saved) # Paid call, human authorization required.
|
|
69
|
+
except NixflexOutboundRequestError as error:
|
|
70
|
+
# Keep saved ID; surface only safe code/status, reconcile instead of redialling.
|
|
71
|
+
pass
|
|
72
|
+
state = client.calls.outbound_request(saved['request_id'])
|
|
73
|
+
if state['state'] == 'accepted' and state['call_id']:
|
|
74
|
+
result = client.calls.bookings(state['call_id'])
|
|
75
|
+
|
|
76
|
+
async def inspect_saved_call(request_id):
|
|
77
|
+
async with AsyncNixflex(**connection) as client:
|
|
78
|
+
state = await client.calls.outbound_request(request_id)
|
|
79
|
+
if state['state'] == 'accepted' and state['call_id']:
|
|
80
|
+
return await client.calls.bookings(state['call_id'])
|
|
81
|
+
return state
|
|
82
|
+
# For async sending, explicitly await client.calls.create(**saved), ONCE.
|
|
83
|
+
# client.calls.prepare(**params) remains a local synchronous helper even on AsyncNixflex.
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Never regenerate the ID when reopening the process. Stop when state is unknown/pending; rejected is a refusal, not permission to blindly redial. Booking state remains independent from request acceptance.
|
|
87
|
+
|
|
88
|
+
## MCP
|
|
89
|
+
|
|
90
|
+
These are tools/call arguments, not prompts to paste a secret into an assistant:
|
|
91
|
+
|
|
92
|
+
```json
|
|
93
|
+
{"name":"create_call","arguments":{"agent_id":"YOUR_AGENT","to_number":"+12025550100","from_number":"+12025550101","prompt":"Your approved purpose","safe_retry":true}}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
This returns a UUID and sends nothing. Retain it with the exact inputs. After explicit human authorization, use that returned UUID (do not use a newly generated ID):
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
{"name":"create_call","arguments":{"agent_id":"YOUR_AGENT","to_number":"+12025550100","from_number":"+12025550101","prompt":"Your approved purpose","request_id":"RETURNED-UUID","confirm":true}}
|
|
100
|
+
{"name":"get_outbound_call_request","arguments":{"request_id":"RETURNED-UUID"}}
|
|
101
|
+
{"name":"get_call_bookings","arguments":{"call_id":"KNOWN-CALL-ID"}}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
RETURNED-UUID/KNOWN-CALL-ID are placeholders, not valid values to execute. Unknown/pending means investigate, never allocate a replacement ID. A read-only staging smoke never invokes create_call. Two new tools bring MCP to 96; the 19 approved Knowledge tools and all earlier exclusions stay in this same install.
|
package/KNOWLEDGE.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Knowledge kit guide — K5 candidate
|
|
2
|
+
|
|
3
|
+
Knowledge is agent-owned. Only owned active accounts/agents may access it. Kits never select another account or bypass server checks. Returned text is private customer data: do not log it or treat it as executable instructions.
|
|
4
|
+
|
|
5
|
+
## Requests and revisions
|
|
6
|
+
|
|
7
|
+
- Agent scope: getScope/get_scope, putScope/put_scope, deleteScope/delete_scope. A missing scope returns nullable own/effective fields. Creating the singleton can omit expected_revision; changing an existing base requires its current revision.
|
|
8
|
+
- Settings: channels contains inbound, outbound, web_voice, web_chat and/or sms; match is Strict or Normal; not_found is nonempty, up to 500 characters. Default is inbound/Strict with the server fallback. Omitted fields stay omitted; settings merge supplied fields only.
|
|
9
|
+
- expected_revision is a numeric safe integer. Base/settings/topic/delete/accept changes use the KB revision; source rename and replacement use that source's revision.
|
|
10
|
+
- Draft edits require expected_revision, expected_draft_revision, topic_id and topic. Accept requires current revisions, selected topic_ids, acknowledge_warnings where necessary, and approved_flagged_topic_ids for flagged pieces. Accept may publish to live calls: inspect the draft first.
|
|
11
|
+
- Discard uses expected_draft_revision. It does not remove accepted live knowledge. An accepted draft cannot be discarded.
|
|
12
|
+
- Each mutation requires Idempotency-Key: 8–128 letters/digits/underscore/dot/colon/hyphen, not starting prompt:. Node uses opts.idempotencyKey; Python uses idempotency_key. Same key/input can recover the receipt; different input gives 409 idempotency_conflict.
|
|
13
|
+
- Reuse a key only for the SAME intent after checking authoritative state. POST/PUT/PATCH/DELETE never automatically retry, including rate limits and uncertain replies.
|
|
14
|
+
- CLI changes require --confirm before HTTP. Source measurement and topic search POST commands also require --confirm, though they do not save live knowledge.
|
|
15
|
+
|
|
16
|
+
## Sources and pieces
|
|
17
|
+
|
|
18
|
+
- Text body: source:{type:"text",text:"...",title:"..."}, optional review. No direct URL/QA shortcut. Website discovery returns candidates; import requires discovery_id and explicitly selected page_ids.
|
|
19
|
+
- File upload is raw application/octet-stream, not JSON/base64/multipart. uploadSource/upload_source and replaceSourceFile/replace_source_file accept a path; measureFile/measure_file measures without saving.
|
|
20
|
+
- Headers: X-Filename, optional X-Source-Title, X-Review, replacement X-Expected-Revision. Filename/title must be printable ASCII at the transport boundary; server filename limit 200. Supply a safe explicit filename for non-ASCII basenames.
|
|
21
|
+
- Uploads use 64 KiB chunks from a regular file, maximum 10 MiB. Size is checked during transfer; a changed file fails honestly. No whole-file buffering/replay.
|
|
22
|
+
- Server limits: 50 sources/base, 20,000 tokens/source, 100,000 tokens/base, 1,000 pieces/base, 800 tokens/piece, 20 bases and 100 MiB/account. Capabilities are authoritative.
|
|
23
|
+
- Manual topic facts are required, nonempty, at most 20,000 characters. Optional title, questions (up to five, each up to 300), valid_from and valid_until UTC bounds. Oversized input can return a needs_review draft receipt instead of a job.
|
|
24
|
+
- Source removal uses the KB revision, selected topic_ids, manual:"keep" or "delete" for edited pieces. It can remove empty related sources. Never infer success from a timeout.
|
|
25
|
+
|
|
26
|
+
## Pages and jobs
|
|
27
|
+
|
|
28
|
+
- Sources/topics default 50/page, max 100. Targets default 30, unanswered 20, max 100. Preserve opaque cursors/filters; stop at next_cursor:null. On 409 stale_revision explicitly reload; never silently restart a page walk.
|
|
29
|
+
- Targets are agents only; q max 200. Events use decimal string cursor (default "0"), return up to 100 ordered events, next poll uses the last sequence. Never round it through a floating-point number.
|
|
30
|
+
- Topic management search uses query 2–200 characters, returns up to 30 pieces. It is a POST, never automatically retried.
|
|
31
|
+
- keyterms(target) reads ranked automatic knowledge_keyterms; it does not edit manual boosted keywords.
|
|
32
|
+
- waitJob / wait_job: default 20 attempts, 1-second interval, 30-second budget; maximum 100 attempts, interval 30 seconds, budget 300 seconds. Per-request timeouts and bounded GET retries also apply: not a hard real-time deadline.
|
|
33
|
+
- ready, needs_review, failed, cancelled and deleted stop polling; only the returned state tells the outcome. needs_review is not publication. Inspect result/error/paid_work_started; never invent progress.
|
|
34
|
+
- Aborting/stopping polling does not cancel server work. cancelJob is a separate mutation; committed work can refuse it. retryJob is explicit and server-limited.
|
|
35
|
+
- CLI --wait applies only to a receipt with id and state. A draft receipt remains a draft.
|
|
36
|
+
|
|
37
|
+
## Export/download
|
|
38
|
+
|
|
39
|
+
createExport starts a job. Wait until ready, then use its export ID. Exports expire after one hour and may refuse a changed revision. Original raw source files are not exported.
|
|
40
|
+
|
|
41
|
+
downloadExport / download_export streams exact API JSON bytes. format:"text" STILL returns JSON with filename/content_type/text, not raw TXT. CLI --output FILE.json publishes only a completed file and never overwrites. SDK users must discard partial files on failure.
|
|
42
|
+
|
|
43
|
+
No full-export buffering. GET retry can happen before any bytes are emitted; once bytes are emitted the stream never restarts. Close/aclose an iterator when stopping early.
|
|
44
|
+
|
|
45
|
+
## Knowledge-only tests
|
|
46
|
+
|
|
47
|
+
Defaults: mode knowledge, channel inbound. A ready active base with accepted live pieces is required. number/call_purpose are forbidden. Optional draft_id must match the base revision. At most 100 sessions/day; questions nonempty, max 4,000 characters.
|
|
48
|
+
|
|
49
|
+
A question can use model work, but makes no call/SMS/external action. Cancellation only stops that test; no live-knowledge rollback. Changed target/base or closed sessions refuse. The final smoke script performs reads and LOCAL invalid-key refusals only, with zero session creation/questions.
|
|
50
|
+
|
|
51
|
+
## Errors
|
|
52
|
+
|
|
53
|
+
SDKs preserve status/code/request ID/details. Never log full messages/details: they can contain customer content. CLI emits a static code whitelist and generic messages. Unknown writes preserve outcome_unknown / safe_to_retry:false; inspect authoritative state before retrying.
|
|
54
|
+
|
|
55
|
+
401/403: credentials/ownership; 409 stale_revision: reread and reconcile; knowledge_missing: approve live pieces first; idempotency_conflict: different intent needs a different key; export_expired: explicitly create another export if wanted; session_closed/target_changed: new test requires approval; 429: respect quota, never automatically repeat writes.
|
|
56
|
+
|
|
57
|
+
K5 introduced a candidate with 89 tools, including 19 approved Knowledge tools. K9 now has 97 tools; those 19 Knowledge tools and their exclusions are unchanged. Legacy getDraft/get_draft (GET /knowledge-bases/:kb/drafts/:id) can normalize and SAVE old drafts. It remains SDK/CLI-only and is excluded from MCP and the safe staging checker. SDK GET retry semantics are unchanged; use maxRetries/max_retries=0 for intentional legacy draft inspection if replay is unwanted. Live changes/deletes/accept/import/upload/job control and bulk exports are excluded. Personal sessions, account erasure, private signing-secret retrieval and excluded integrations remain outside kit scope.
|
|
58
|
+
|
|
59
|
+
## B49g keyterms response
|
|
60
|
+
|
|
61
|
+
keyterms returns all six required fields: knowledge_keyterms (string array), knowledge_keyterms_count and knowledge_keyterms_limit (numbers), manual_keyterms (string array), manual_keyterms_count and manual_keyterms_limit (numbers). Counts describe the returned arrays. The automatic limit is configured by the server (default 80); the manual new-edit limit is 20, and unchanged legacy manual lists may exceed it. Automatic candidates remain separate from saved manual words and the dashboard's unsaved edits. Node exports the KnowledgeKeyterms return interface; Python returns the full dictionary. This is an owned read, with no write or logging.
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Nixflex
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Nixflex
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/METHODS.md
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# Node public method signatures
|
|
2
|
+
|
|
3
|
+
All signatures come from current public classes. Options include abort/timeout; GET-only bounded retries. New CLI writes require --confirm. SDK mutations require deliberate application authorization; Knowledge also requires an explicit operation key.
|
|
4
|
+
See KNOWLEDGE.md and TEAM-INTEGRATIONS.md for defaults, limits, errors and replacement/patch rules. No personal-session, signing-secret or private provider wrappers are exposed.
|
|
5
|
+
|
|
6
|
+
| Resource | Signature |
|
|
7
|
+
| --- | --- |
|
|
8
|
+
| client.agents | create(params: AgentCreateParams = {}, opts?: RequestOptions): Promise<Agent> |
|
|
9
|
+
| client.agents | list(params: AgentListParams = {}, opts?: RequestOptions): Promise<Agent[]> |
|
|
10
|
+
| client.agents | *iter(pageSize = 100, opts?: RequestOptions): AsyncGenerator<Agent> |
|
|
11
|
+
| client.agents | get(agentId: string, opts?: RequestOptions): Promise<Agent> |
|
|
12
|
+
| client.agents | update(agentId: string, params: AgentUpdateParams, opts?: RequestOptions): Promise<Agent> |
|
|
13
|
+
| client.agents | delete(agentId: string, opts?: RequestOptions): Promise<AgentDeleteResponse> |
|
|
14
|
+
| client.callers | get(phoneNumber: string, callerNumber: string, opts?: RequestOptions): Promise<CallerContextResponse> |
|
|
15
|
+
| client.callers | set(phoneNumber: string, callerNumber: string, params: CallerContextSetParams, opts?: RequestOptions): Promise<CallerContextResponse> |
|
|
16
|
+
| client.callers | delete(phoneNumber: string, callerNumber: string, opts?: RequestOptions): Promise<CallerContextDeleteResponse> |
|
|
17
|
+
| client.callers | import(phoneNumber: string, callers: CallerImportRow[], opts?: RequestOptions): Promise<CallerImportResponse> |
|
|
18
|
+
| client.calls | create(params: OutboundCallParams, opts?: RequestOptions): Promise<OutboundCallResponse> |
|
|
19
|
+
| client.calls | list(params: ListParams = {}, opts?: RequestOptions): Promise<Call[]> |
|
|
20
|
+
| client.calls | history(params: CallHistoryParams = {}, opts?: RequestOptions): Promise<CallHistoryPage> |
|
|
21
|
+
| client.calls | read(callId: string, opts?: RequestOptions): Promise<CallRead> |
|
|
22
|
+
| client.calls | recording(callId: string, opts?: RequestOptions): Promise<CallRecording> |
|
|
23
|
+
| client.calls | *iter(pageSize = 100, opts?: RequestOptions): AsyncGenerator<Call> |
|
|
24
|
+
| client.calls | get(callId: string, opts?: RequestOptions): Promise<Call> |
|
|
25
|
+
| client.calls | delete(callId: string, opts?: RequestOptions): Promise<CallDeleteResponse> |
|
|
26
|
+
| client.calls | deleteAll(opts?: RequestOptions): Promise<CallDeleteAllResponse> |
|
|
27
|
+
| client.campaigns | cancel(id: string, opts?: RequestOptions): Promise<C5.CampaignCancelResponse> |
|
|
28
|
+
| client.campaigns | consent(id: string, params: C5.CampaignConsentParams, opts?: RequestOptions): Promise<C5.CampaignConsentResponse> |
|
|
29
|
+
| client.campaigns | resume(id: string, opts?: RequestOptions): Promise<C5.CampaignResumeResponse> |
|
|
30
|
+
| client.campaigns | list(params: C5.CampaignListQuery = {}, opts?: RequestOptions): Promise<C5.CampaignListResponse> |
|
|
31
|
+
| client.campaigns | create(params: BatchCampaignParams, opts?: RequestOptions): Promise<BatchCreateResponse> |
|
|
32
|
+
| client.campaigns | launch(campaignId: string, opts?: RequestOptions): Promise<BatchLaunchResponse> |
|
|
33
|
+
| client.contacts | preview(params: C.ContactPreviewParams, opts?: RequestOptions): Promise<C.ContactPreviewResponse> |
|
|
34
|
+
| client.contacts | list(params: C.ContactListQuery = {}, opts?: RequestOptions): Promise<C.ContactListResponse> |
|
|
35
|
+
| client.contacts | add(params: C.ContactAddParams, opts?: RequestOptions): Promise<C.ContactAddResponse> |
|
|
36
|
+
| client.contacts | remove(params: C.ContactRemoveParams, opts?: RequestOptions): Promise<C.ContactRemoveResponse> |
|
|
37
|
+
| client.account | retention(opts?: RequestOptions): Promise<AccountRetention> |
|
|
38
|
+
| client.voices | list(params: VoiceListParams = {}, opts?: RequestOptions): Promise<VoiceListResponse> |
|
|
39
|
+
| client.voices | get(voiceKey: string, params: VoiceContext = {}, opts?: RequestOptions): Promise<Voice> |
|
|
40
|
+
| client.inbox | list(channel: 'sms' | 'web', number: string, params: C.InboxListQuery = {}, opts?: RequestOptions): Promise<C.InboxListResponse> |
|
|
41
|
+
| client.inbox | thread(channel: 'sms' | 'web', number: string, thread: string, params: C.InboxThreadQuery = {}, opts?: RequestOptions): Promise<C.InboxThreadResponse> |
|
|
42
|
+
| client.inbox | update(channel: 'sms' | 'web', number: string, thread: string, params: C.InboxUpdateParams, opts?: RequestOptions): Promise<C.InboxUpdateResponse> |
|
|
43
|
+
| client.inbox | features(opts?: RequestOptions): Promise<C.InboxFeaturesResponse> |
|
|
44
|
+
| client.inbox | numbers(params: C.InboxNumbersQuery = {}, opts?: RequestOptions): Promise<C.InboxNumbersResponse> |
|
|
45
|
+
| client.inbox | retention(params: C.InboxRetentionQuery = {}, opts?: RequestOptions): Promise<C.InboxRetentionResponse> |
|
|
46
|
+
| client.integrations | get(provider: P, number: string, opts?: RequestOptions): Promise<IntegrationReads[P]> |
|
|
47
|
+
| client.integrations | set(provider: P, number: string, body: IntegrationSettings[P], opts?: RequestOptions): Promise<IntegrationReceipt> |
|
|
48
|
+
| client.integrations | delete(provider: IntegrationProvider, number: string, opts?: RequestOptions): Promise<IntegrationReceipt> |
|
|
49
|
+
| client.integrations | getAgentPrecall(agentId: string, opts?: RequestOptions): Promise<AgentPrecall> |
|
|
50
|
+
| client.integrations | setAgentPrecall(agentId: string, url: string, opts?: RequestOptions): Promise<IntegrationReceipt> |
|
|
51
|
+
| client.integrations | deleteAgentPrecall(agentId: string, opts?: RequestOptions): Promise<IntegrationReceipt> |
|
|
52
|
+
| client.integrations | listFunctions(number: string, opts?: RequestOptions): Promise<{ phone_number: string; functions: CustomFunctionView[] }> |
|
|
53
|
+
| client.integrations | createFunction(number: string, body: CustomFunctionInput, opts?: RequestOptions): Promise<FunctionReceipt> |
|
|
54
|
+
| client.integrations | updateFunction(number: string, id: string, body: Partial<CustomFunctionInput>, opts?: RequestOptions): Promise<FunctionReceipt> |
|
|
55
|
+
| client.integrations | deleteFunction(number: string, id: string, opts?: RequestOptions): Promise<FunctionReceipt> |
|
|
56
|
+
| client.knowledge | deleteScope(target: string, body: RevisionInput, opts: KnowledgeWriteOptions): Promise<KnowledgeObject> |
|
|
57
|
+
| client.knowledge | getScope(target: string, opts?: RequestOptions): Promise<KnowledgeObject> |
|
|
58
|
+
| client.knowledge | putScope(target: string, body: ScopeInput, opts: KnowledgeWriteOptions): Promise<KnowledgeObject> |
|
|
59
|
+
| client.knowledge | measureSource(target: string, body: { text: string }, opts?: RequestOptions): Promise<KnowledgeObject> |
|
|
60
|
+
| client.knowledge | startSession(target: string, body: SessionInput, opts: KnowledgeWriteOptions): Promise<KnowledgeObject> |
|
|
61
|
+
| client.knowledge | getBase(kb: string, opts?: RequestOptions): Promise<KnowledgeObject> |
|
|
62
|
+
| client.knowledge | discardDraft(kb: string, id: string, body: { expected_draft_revision: number }, opts: KnowledgeWriteOptions): Promise<KnowledgeObject> |
|
|
63
|
+
| client.knowledge | getDraft(kb: string, id: string, opts?: RequestOptions): Promise<KnowledgeObject> |
|
|
64
|
+
| client.knowledge | updateDraft(kb: string, id: string, body: DraftEdit, opts: KnowledgeWriteOptions): Promise<KnowledgeObject> |
|
|
65
|
+
| client.knowledge | acceptDraft(kb: string, id: string, body: DraftAcceptance, opts: KnowledgeWriteOptions): Promise<KnowledgeObject> |
|
|
66
|
+
| client.knowledge | createExport(kb: string, body: EmptyInput, opts: KnowledgeWriteOptions): Promise<KnowledgeJob> |
|
|
67
|
+
| client.knowledge | overview(kb: string, opts?: RequestOptions): Promise<KnowledgeObject> |
|
|
68
|
+
| client.knowledge | updateSettings(kb: string, body: SettingsInput, opts: KnowledgeWriteOptions): Promise<KnowledgeObject> |
|
|
69
|
+
| client.knowledge | listSources(kb: string, query: PageQuery = {}, opts?: RequestOptions): Promise<KnowledgePage> |
|
|
70
|
+
| client.knowledge | addSource(kb: string, body: SourceInput, opts: KnowledgeWriteOptions): Promise<KnowledgeJob> |
|
|
71
|
+
| client.knowledge | deleteSource(kb: string, id: string, body: SourceDeletion, opts: KnowledgeWriteOptions): Promise<KnowledgeObject> |
|
|
72
|
+
| client.knowledge | renameSource(kb: string, id: string, body: { expected_revision: number; title: string }, opts: KnowledgeWriteOptions): Promise<KnowledgeObject> |
|
|
73
|
+
| client.knowledge | replaceSource(kb: string, id: string, body: SourceReplacement, opts: KnowledgeWriteOptions): Promise<KnowledgeJob> |
|
|
74
|
+
| client.knowledge | refreshSources(kb: string, body: { source_ids: string[]; review?: boolean }, opts: KnowledgeWriteOptions): Promise<KnowledgeJob> |
|
|
75
|
+
| client.knowledge | searchTopics(kb: string, body: { query: string }, opts?: RequestOptions): Promise<KnowledgeObject> |
|
|
76
|
+
| client.knowledge | listTopics(kb: string, query: PageQuery = {}, opts?: RequestOptions): Promise<KnowledgePage> |
|
|
77
|
+
| client.knowledge | createTopic(kb: string, body: TopicInput, opts: KnowledgeWriteOptions): Promise<KnowledgeTopicResult> |
|
|
78
|
+
| client.knowledge | deleteTopic(kb: string, id: string, body: RevisionInput, opts: KnowledgeWriteOptions): Promise<KnowledgeObject> |
|
|
79
|
+
| client.knowledge | getTopic(kb: string, id: string, opts?: RequestOptions): Promise<KnowledgeObject> |
|
|
80
|
+
| client.knowledge | updateTopic(kb: string, id: string, body: TopicInput, opts: KnowledgeWriteOptions): Promise<KnowledgeTopicResult> |
|
|
81
|
+
| client.knowledge | unanswered(kb: string, query: PageQuery = {}, opts?: RequestOptions): Promise<KnowledgePage> |
|
|
82
|
+
| client.knowledge | discoverWebsite(kb: string, body: { url: string }, opts: KnowledgeWriteOptions): Promise<KnowledgeJob> |
|
|
83
|
+
| client.knowledge | importWebsite(kb: string, body: WebsiteInput, opts: KnowledgeWriteOptions): Promise<KnowledgeJob> |
|
|
84
|
+
| client.knowledge | capabilities(opts?: RequestOptions): Promise<KnowledgeObject> |
|
|
85
|
+
| client.knowledge | events(query: { cursor?: string } = {}, opts?: RequestOptions): Promise<KnowledgeObject[]> |
|
|
86
|
+
| client.knowledge | downloadExport(id: string, query: { format?: 'json' | 'text' } = {}, opts?: RequestOptions): AsyncGenerator<Uint8Array> |
|
|
87
|
+
| client.knowledge | getJob(id: string, opts?: RequestOptions): Promise<KnowledgeJob> |
|
|
88
|
+
| client.knowledge | cancelJob(id: string, body: EmptyInput, opts: KnowledgeWriteOptions): Promise<KnowledgeJob> |
|
|
89
|
+
| client.knowledge | retryJob(id: string, body: EmptyInput, opts: KnowledgeWriteOptions): Promise<KnowledgeJob> |
|
|
90
|
+
| client.knowledge | targets(query: TargetQuery = {}, opts?: RequestOptions): Promise<KnowledgePage> |
|
|
91
|
+
| client.knowledge | getSession(id: string, opts?: RequestOptions): Promise<KnowledgeObject> |
|
|
92
|
+
| client.knowledge | cancelSession(id: string, body: EmptyInput, opts: KnowledgeWriteOptions): Promise<KnowledgeObject> |
|
|
93
|
+
| client.knowledge | ask(id: string, body: { text: string }, opts: KnowledgeWriteOptions): Promise<KnowledgeObject> |
|
|
94
|
+
| client.knowledge | usage(query: { kb?: string } = {}, opts?: RequestOptions): Promise<KnowledgeObject> |
|
|
95
|
+
| client.knowledge | keyterms(target: string, opts?: RequestOptions): Promise<KnowledgeKeyterms> |
|
|
96
|
+
| client.knowledge | uploadSource(kb: string, file: string, opts: KnowledgeUploadOptions): Promise<KnowledgeJob> |
|
|
97
|
+
| client.knowledge | replaceSourceFile(kb: string, id: string, file: string, opts: KnowledgeUploadOptions): Promise<KnowledgeJob> |
|
|
98
|
+
| client.knowledge | measureFile(target: string, file: string, opts: RequestOptions = {}): Promise<KnowledgeObject> |
|
|
99
|
+
| client.knowledge | waitJob(id: string, options: JobPollOptions = {}): Promise<KnowledgeJob> |
|
|
100
|
+
| client.organisation | get(opts?:RequestOptions): Promise<OrganisationContext> |
|
|
101
|
+
| client.organisation | members(opts?:RequestOptions): Promise<OrganisationMembers> |
|
|
102
|
+
| client.organisation | invite(email:string, role:'admin'|'member'='member', opts?:RequestOptions): Promise<InvitationReceipt> |
|
|
103
|
+
| client.organisation | resend(inviteId:string, opts?:RequestOptions): Promise<InvitationReceipt> |
|
|
104
|
+
| client.organisation | revoke(inviteId:string, opts?:RequestOptions): Promise<{id:string;state:string}> |
|
|
105
|
+
| client.organisation | removeMember(userId:string, opts?:RequestOptions): Promise<MembershipReceipt> |
|
|
106
|
+
| client.organisation | setRole(userId:string, role:'admin'|'member', opts?:RequestOptions): Promise<MembershipReceipt> |
|
|
107
|
+
| client.organisation | activity(params:ActivityFilters={}, opts?:RequestOptions): Promise<ActivityPage> |
|
|
108
|
+
| client.organisation | activityCsv(params:ActivityFilters={}, opts?:RequestOptions): AsyncGenerator<Uint8Array> |
|
|
109
|
+
| client.organisation | rename(name:string, opts?:RequestOptions): Promise<{name:string}> |
|
|
110
|
+
| client.organisation | claimInvite(email:string, opts?:RequestOptions): Promise<InvitationReceipt> |
|
|
111
|
+
| client.phoneNumbers | usage(phoneNumber: string, params: NumberUsageParams = {}, opts?: RequestOptions): Promise<NumberUsageResponse> |
|
|
112
|
+
| client.phoneNumbers | import(params: PhoneNumberImportParams, opts?: RequestOptions): Promise<{ phone_number: PhoneNumber }> |
|
|
113
|
+
| client.phoneNumbers | list(params: PhoneNumberListParams = {}, opts?: RequestOptions): Promise<PhoneNumberListResponse> |
|
|
114
|
+
| client.phoneNumbers | get(phoneNumber: string, opts?: RequestOptions): Promise<{ phone_number: PhoneNumberDetails }> |
|
|
115
|
+
| client.phoneNumbers | update(phoneNumber: string, params: PhoneNumberMoveParams, opts?: RequestOptions): Promise<PhoneNumberMoveResponse> |
|
|
116
|
+
| client.phoneNumbers | update(phoneNumber: string, params: PhoneNumberUpdateParams, opts?: RequestOptions): Promise<{ phone_number: PhoneNumber }> |
|
|
117
|
+
| client.phoneNumbers | update(phoneNumber: string, params: PhoneNumberUpdateParams | PhoneNumberMoveParams, opts?: RequestOptions): Promise<{ phone_number: PhoneNumber } | PhoneNumberMoveResponse> |
|
|
118
|
+
| client.phoneNumbers | move(phoneNumber: string, agentId: string, opts?: RequestOptions): Promise<PhoneNumberMoveResponse> |
|
|
119
|
+
| client.phoneNumbers | delete(phoneNumber: string, opts?: RequestOptions): Promise<PhoneNumberDeleteResponse> |
|
|
120
|
+
| client.phoneNumbers | setWebCalls(phoneNumber: string, enabled: boolean, opts?: RequestOptions): Promise<WebCallsToggleResponse> |
|
|
121
|
+
| client.phoneNumbers | getWebCalls(phoneNumber: string, opts?: RequestOptions): Promise<WebCallsToggleResponse> |
|
|
122
|
+
| client.sms.campaigns | cancel(id: string, opts?: RequestOptions): Promise<C5.CampaignCancelResponse> |
|
|
123
|
+
| client.sms.campaigns | consent(id: string, params: C5.CampaignConsentParams, opts?: RequestOptions): Promise<C5.CampaignConsentResponse> |
|
|
124
|
+
| client.sms.campaigns | resume(id: string, opts?: RequestOptions): Promise<C5.CampaignResumeResponse> |
|
|
125
|
+
| client.sms.campaigns | update(id: string, params: C5.SmsCampaignUpdateParams, opts?: RequestOptions): Promise<C5.SmsCampaignUpdateResponse> |
|
|
126
|
+
| client.sms.campaigns | create(params: SmsCampaignCreateParams, opts?: RequestOptions): Promise<SmsCampaignCreateResponse> |
|
|
127
|
+
| client.sms.campaigns | launch(campaignId: string, opts?: RequestOptions): Promise<SmsCampaignLaunchResponse> |
|
|
128
|
+
| client.sms.campaigns | list(params: { status?: string; limit?: number; before?: string } = {}, opts?: RequestOptions): Promise<SmsCampaignListResponse> |
|
|
129
|
+
| client.sms.campaigns | get(campaignId: string, opts?: RequestOptions & SmsCampaignDetailParams): Promise<SmsCampaignDetail> |
|
|
130
|
+
| client.sms.campaigns | delete(campaignId: string, opts?: RequestOptions): Promise<CampaignDeleteResponse> |
|
|
131
|
+
| client.sms | send(params: SmsSendParams, opts?: RequestOptions): Promise<SmsSendResponse> |
|
|
132
|
+
| client.keys | activity(params: KeyActivityParams = {}, opts?: RequestOptions): Promise<KeyActivity> |
|
|
133
|
+
| client.keys | rotate(opts?: RequestOptions): Promise<KeyRotateResponse> |
|
|
134
|
+
| client.usage | get(opts?: RequestOptions): Promise<Usage> |
|
|
135
|
+
| client.webhooks | verify(rawBody: string | Buffer, signatureHeader: string | null | undefined, keySecret: string, options?: import('../webhook-verify.js').VerifyOptions): boolean |
|
|
136
|
+
| client.webhooks | set(phoneNumber: string, url: string, slot: 1 | 2 = 1, opts?: RequestOptions): Promise<WebhookConfigResponse> |
|
|
137
|
+
| client.webhooks | get(phoneNumber: string, slot: 1 | 2 = 1, opts?: RequestOptions): Promise<WebhookConfigResponse> |
|
|
138
|
+
| client.webhooks | delete(phoneNumber: string, slot: 1 | 2 = 1, opts?: RequestOptions): Promise<WebhookConfigResponse> |
|
|
139
|
+
| client.webAgent | get(number: string, opts?: RequestOptions): Promise<C.WebAgentReadResponse> |
|
|
140
|
+
| client.webAgent | update(number: string, params: C.WebAgentUpdateParams, opts?: RequestOptions): Promise<C.WebAgentUpdateResponse> |
|
|
141
|
+
| Nixflex | static createKey({name?,email?}, baseUrl?) — unauthenticated; returns a new secret once. Store privately. |
|
|
142
|
+
| module | verifyWebhookSignature(rawBody, header, signingSecret, options?) — verify raw bytes before trusting a webhook. |
|
|
143
|
+
|
|
144
|
+
## K6 per-number additions
|
|
145
|
+
|
|
146
|
+
| HTTP operation (number is URL-encoded E.164) | Node / CLI command | Python sync + async | MCP |
|
|
147
|
+
| --- | --- | --- | --- |
|
|
148
|
+
| POST /v1/integrations/google-calendar/number/{number}/connect | integrations.connectGoogleCalendar / integrations connectGoogleCalendar | integrations.connect_google_calendar | connect_google_calendar |
|
|
149
|
+
| GET /v1/integrations/google-calendar/number/{number} | integrations.getGoogleCalendar / integrations getGoogleCalendar | integrations.get_google_calendar | get_google_calendar |
|
|
150
|
+
| DELETE /v1/integrations/google-calendar/number/{number} | integrations.disconnectGoogleCalendar / integrations disconnectGoogleCalendar | integrations.disconnect_google_calendar | disconnect_google_calendar |
|
|
151
|
+
| PATCH /v1/integrations/google-calendar/number/{number} | integrations.updateGoogleCalendarSettings / integrations updateGoogleCalendarSettings | integrations.update_google_calendar_settings | update_google_calendar_settings |
|
|
152
|
+
| POST /v1/phone-numbers/{number}/credentials | phoneNumbers.updateCredentials / numbers updateCredentials | phone_numbers.update_credentials | update_phone_number_credentials |
|
|
153
|
+
|
|
154
|
+
See NUMBER-FEATURES.md for exact input/output and errors.
|
|
155
|
+
|
|
156
|
+
## K7 call results and requests
|
|
157
|
+
|
|
158
|
+
| Operation | Node | CLI | Python sync / async | MCP |
|
|
159
|
+
| --- | --- | --- | --- | --- |
|
|
160
|
+
| GET /v1/calls/{call_id}/bookings | calls.bookings(id) | calls bookings ID | calls.bookings(id) | get_call_bookings |
|
|
161
|
+
| POST /v1/calls/outbound, optional UUID request_id | calls.create(params) | calls create --request-id UUID or --body @prepared.json | calls.create(..., request_id=uuid) | create_call, optional request_id / safe_retry / confirm |
|
|
162
|
+
| GET /v1/calls/outbound/requests/{request_id} | calls.outboundRequest(uuid) | calls outboundRequest UUID | calls.outbound_request(uuid) | get_outbound_call_request |
|
|
163
|
+
| Local preparation, no API request | calls.prepare(params), prepareOutboundCall(params) | calls prepare --output prepared.json | calls.prepare(**params), prepare_outbound_call(params) | create_call with safe_retry:true and no request_id |
|
|
164
|
+
|
|
165
|
+
The two GET routes are new coverage. POST already existed; request_id extends it. Preparation is local, not another API endpoint. At K7, MCP registered 96 tools (94 prior plus two reads); only create_call gained optional inputs/guidance. Those historical contracts were pinned to K6. K9 now registers 97 tools; only its two B57 delete handlers/descriptions change alongside the new voice-delete tool. Public-scope exclusions remain unchanged.
|
|
166
|
+
|
|
167
|
+
See CALL-REQUESTS.md for exact fields, typed errors, unchanged no-ID behavior and CLI/MCP confirmation rules.
|
|
168
|
+
|
|
169
|
+
## K9 B57 deletion
|
|
170
|
+
|
|
171
|
+
| Resource | Signature |
|
|
172
|
+
|---|---|
|
|
173
|
+
| client.campaigns | delete(id: string, opts?: RequestOptions): Promise<CampaignDeleteResponse> |
|
|
174
|
+
| client.sms.campaigns | delete(id: string, opts?: RequestOptions): Promise<CampaignDeleteResponse> |
|
|
175
|
+
|
|
176
|
+
See [B57-DELETES.md](B57-DELETES.md) for the three receipts, queued 503, permissions, uncertainty and unchanged bulk guard.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# K6 number features — 4 November 2026
|
|
2
|
+
|
|
3
|
+
Engine contract: deb63749acc74fe5d1d840dbf3589b2c40b5627e (B50/B50b/B51/B52). No engine changes. Public Cal.com methods remain unchanged.
|
|
4
|
+
|
|
5
|
+
| HTTP operation (number is URL-encoded E.164) | Node / CLI command | Python sync + async | MCP |
|
|
6
|
+
| --- | --- | --- | --- |
|
|
7
|
+
| POST /v1/integrations/google-calendar/number/{number}/connect | integrations.connectGoogleCalendar / integrations connectGoogleCalendar | integrations.connect_google_calendar | connect_google_calendar |
|
|
8
|
+
| GET /v1/integrations/google-calendar/number/{number} | integrations.getGoogleCalendar / integrations getGoogleCalendar | integrations.get_google_calendar | get_google_calendar |
|
|
9
|
+
| DELETE /v1/integrations/google-calendar/number/{number} | integrations.disconnectGoogleCalendar / integrations disconnectGoogleCalendar | integrations.disconnect_google_calendar | disconnect_google_calendar |
|
|
10
|
+
| PATCH /v1/integrations/google-calendar/number/{number} | integrations.updateGoogleCalendarSettings / integrations updateGoogleCalendarSettings | integrations.update_google_calendar_settings | update_google_calendar_settings |
|
|
11
|
+
| POST /v1/phone-numbers/{number}/credentials | phoneNumbers.updateCredentials / numbers updateCredentials | phone_numbers.update_credentials | update_phone_number_credentials |
|
|
12
|
+
|
|
13
|
+
## Calendar contract
|
|
14
|
+
|
|
15
|
+
Connect sends only `{return_url}` and returns `{url, expires_at}`. A human opens the short-lived Google consent link; the kits never open a browser. It contains OAuth state, not access/refresh tokens: do not log or redistribute it. HTTPS return URLs must have no credentials, fragment, whitespace, backslash, localhost or OAuth code/state/token query parameters. Custom application schemes need the server's account allowlist.
|
|
16
|
+
|
|
17
|
+
After consent, the engine redirects with `status=connected&phone_number=...`, or `status=error&code=...`. Query status again; a redirect is not a substitute for checking current state. Links last ten minutes.
|
|
18
|
+
|
|
19
|
+
GET returns exactly `connected`, nullable `account_email`, `calendar_id`, nullable `connected_at`, `needs_reconnect`, `send_invites`. `connected:true` plus `needs_reconnect:true` needs new consent. The GET can refresh provider credentials inside the engine; it does not connect a new account or change calendar settings.
|
|
20
|
+
|
|
21
|
+
PATCH sends a nonempty subset of `timezone`, `hours`, `slot_minutes`, `calendar_id`, `send_invites`. Omitted fields preserve saved values. `send_invites` is a strict boolean; false is retained, absent stored value defaults true. It controls Google's invitation request, not delivery proof. `timezone` is an IANA name (max 100 chars). `slot_minutes` is 15, 30, 45 or 60. `calendar_id` is nonblank, max 1024, no whitespace/control characters; `primary` selects the main calendar.
|
|
22
|
+
|
|
23
|
+
When supplying `hours`, include all seven lowercase weekday names; each is null (closed) or `["09:00","17:00"]`. Times are HH:MM, close after open, no overnight interval. PATCH returns the five safe settings. DELETE returns `{ok:true,connected:false}`; remote revocation is best effort and may protect shared connections. Do not claim remote removal or recall already dispatched bookings.
|
|
24
|
+
|
|
25
|
+
SDK errors: `NixflexCalendarError`, `NixflexCredentialError`; inspect status/code, not raw text. All known engine codes remain exact. Private response details are replaced by safe messages. Unknown future codes become `request_failed`; a known uncertain write is never represented as success. Exported calendar codes include invalid_return_url, number_not_found, already_connected, booking_provider_conflict, not_connected, agent_not_assigned, invalid_settings, invalid_timezone, invalid_hours, invalid_slot_minutes, invalid_calendar_id, invalid_send_invites, calendar_unavailable, expired_link, not_configured, guard_unavailable. MCP returns a structured error with type/code/status and safe details.
|
|
26
|
+
|
|
27
|
+
## Carrier details
|
|
28
|
+
|
|
29
|
+
Supply exactly `{twilio_sid,twilio_token}` OR `{telnyx_api_key,telnyx_connection_id}` for the number's current carrier; no provider field goes on the HTTP wire. The number, settings and history remain in place. This is a sensitive carrier routing change; Telnyx can require fresh verification. SDK callers supply the pair privately in memory. CLI uses the fixed environment names below or bounded JSON stdin; never credentials in arguments or files. MCP's schema accepts only phone_number, provider and confirm; it reads the selected pair privately from its process environment only AFTER confirmation. Never paste secrets into an assistant conversation.
|
|
30
|
+
|
|
31
|
+
- Twilio: NIXFLEX_TWILIO_SID + NIXFLEX_TWILIO_TOKEN.
|
|
32
|
+
- Telnyx: NIXFLEX_TELNYX_API_KEY + NIXFLEX_TELNYX_CONNECTION_ID.
|
|
33
|
+
- CLI/API authentication: NIXFLEX_API_KEY, separate from carrier credentials.
|
|
34
|
+
|
|
35
|
+
The only success output is `{phone_number,provider,updated:true}`. CLI writes require --confirm; MCP writes require confirm:true. Without it, zero requests and zero credential reads. A Desktop host must privately provide these environment variables to its server process; the bundle adds no secret input form. If it cannot, use the CLI/SDK instead. Missing private configuration returns credentials_not_configured and sends nothing.
|
|
36
|
+
|
|
37
|
+
Known errors: invalid_request, invalid_credentials, number_not_found, number_not_in_account, account_unavailable, carrier_mismatch, number_operation_pending, number_release_pending, carrier_unavailable, credential_update_unavailable, carrier_outcome_unknown, credential_save_pending. A safe UUID operation_id is retained when supplied; no input, response body, token or private URL is echoed.
|
|
38
|
+
|
|
39
|
+
`carrier_outcome_unknown`: routing is unconfirmed; contact support before retrying. `credential_save_pending`: carrier change is confirmed but database saving is pending; manually retry with EXACTLY the same details to finish saving. Never automatically repeat a write, including 429, 503, malformed success or lost connection. Uncertain writes carry safe_to_retry:false. SDK API keys retain normal owner/active checks; these clients cannot bypass the server's ownership/busy guards.
|
|
40
|
+
|
|
41
|
+
## SMS suppression compatibility
|
|
42
|
+
|
|
43
|
+
New response: HTTP 409, type `conflict`, code `do_not_contact`. Node/Python raise NixflexDoNotContactError (a NixflexConflictError); MCP/CLI retain the structured status/type/code. The message was not sent. Stop: never remove suppression or retry to bypass it. Older servers may return 400 invalid_request; retain the application's legacy handling as well, but do not classify every 400 as suppression. There is no automatic SMS retry. Campaign holds remain separate.
|
|
44
|
+
|
|
45
|
+
## Booking webhook model
|
|
46
|
+
|
|
47
|
+
Node/Python export Booking, CallCompletedBookingEvent and SmsBookingEvent. MCP ships bookingSchema, callCompletedBookingSchema and smsBookingSchema in k6-schemas.js (models, not extra tools). Verify the original raw-body webhook signature first using the existing verifier; these models do not authenticate a delivery.
|
|
48
|
+
|
|
49
|
+
Required booking keys: action (`created`/`rescheduled`/`cancelled`), booking_uid, start, end, attendee_name, attendee_email, service, timezone. Every field except action can be null; service can also be a string or number. Do not turn null into fabricated dates or attendee data. The flat call.completed event has bookings[], sms.booking has booking. Duplicate `already_exists` lookup is internal and is NOT a public booking mutation. Event models describe the booking part; other existing envelope fields remain available. No webhook receiver or listener is added.
|
|
50
|
+
|
|
51
|
+
See KIT-EXAMPLES-K6.md in the K6 handoff for all SDK/CLI/MCP examples. Live successful writes and human consent remain manual checks; offline tests use fakes only.
|
package/ORGANISATIONS.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Organisations candidate — not published or ready to enable
|
|
2
|
+
|
|
3
|
+
Engine SQL 104 and reviewed round 2 activation are required. Read `client.organisation.get()`, `.members()` and `.activity({before,actor})`. Manage `.invite(email,role)`, `.resend(inviteId)`, `.revoke(inviteId)`, `.removeMember(userId)`, `.setRole(userId,role)` and API-only `.claimInvite(email)`.
|
|
4
|
+
|
|
5
|
+
These use the existing organisation API key and its Owner-level API authority. Removing a dashboard member does not invalidate an externally shared key; the Owner must roll that key separately. No new key is created. No personal acceptance, Leave, ownership transfer or account deletion is exposed through this resource. No automatic signing-secret disclosure.
|
|
6
|
+
|
|
7
|
+
CLI: `nixflex organisation get`, `members`, `activity`; changes `invite`, `claim`, `resend ID`, `revoke ID`, `remove USER_ID`, `role USER_ID`. Use `--set email=person@example.com`, `--set role=member` (or admin), Activity `--set before=123 --set actor=UUID`. Review the default preview, then add `--confirm` to make a change. Never blindly repeat after an unknown response.
|
|
8
|
+
|
|
9
|
+
The current SDK fixed-resource CLI coverage test has no Organisation mapping. It remains unchanged and fails deliberately until an additive test-map extension is approved. New behavioural tests prove each implemented route and preview. Do not publish this candidate while any full gate fails.
|