nixflex 0.2.1 → 0.3.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/CHANGELOG.md +56 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +14 -4
- package/dist/index.d.ts +14 -4
- package/dist/index.js +2 -2
- package/package.json +3 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
## 0.3.0 (2026-08-23)
|
|
2
|
+
|
|
3
|
+
- Call type: `charged_minutes` (minutes actually billed - transfers stop the meter at handoff, so this can be less than the recording length)
|
|
4
|
+
- Call type: `ended_reason` documented with the full value list, including the new `callee_hangup` (outbound) and carrier words (`busy`, `failed`, `no-answer`, `canceled`)
|
|
5
|
+
- No breaking changes. `list` pagination (`limit`/`offset`) shipped previously in 0.2.x.
|
|
6
|
+
# Changelog
|
|
7
|
+
|
|
8
|
+
All notable changes to the `nixflex` package. This project follows
|
|
9
|
+
[semantic versioning](https://semver.org): patch for fixes, minor for new
|
|
10
|
+
features, major for breaking changes. Published methods are never removed or
|
|
11
|
+
renamed within a major version.
|
|
12
|
+
|
|
13
|
+
## 0.2.2
|
|
14
|
+
|
|
15
|
+
- Corrected the SMS campaign documentation: rom_number may be on either carrier
|
|
16
|
+
(Twilio or Telnyx). An earlier docs page wrongly stated Telnyx was rejected at
|
|
17
|
+
create; the engine routes by provider. No code behaviour changed.
|
|
18
|
+
|
|
19
|
+
## 0.2.1
|
|
20
|
+
|
|
21
|
+
- Added MIT `LICENSE`, this changelog, and repository/homepage/issue metadata
|
|
22
|
+
so the npm page links back to the source and docs.
|
|
23
|
+
- Documented `verifyWebhookSignature` in the README.
|
|
24
|
+
- Continuous integration now builds and runs the test suite on every push.
|
|
25
|
+
- No API changes.
|
|
26
|
+
|
|
27
|
+
## 0.2.0
|
|
28
|
+
|
|
29
|
+
- **Added** `verifyWebhookSignature(rawBody, signatureHeader, keySecret)` and
|
|
30
|
+
`client.webhooks.verify(...)` - verifies the `X-Nixflex-Signature` header
|
|
31
|
+
(HMAC-SHA256 over `"<timestamp>.<body>"`) with a constant-time comparison and
|
|
32
|
+
a configurable replay window (5 minutes by default). Never throws.
|
|
33
|
+
- **Added** `client.calls.delete(callId)` - permanently erases one call record,
|
|
34
|
+
transcript, and recording file.
|
|
35
|
+
- **Added** `client.calls.deleteAll()` - erases all calls, recordings, and SMS
|
|
36
|
+
messages on the key.
|
|
37
|
+
- Added `@types/node` as a development dependency (required for `Buffer` and
|
|
38
|
+
`node:crypto` types in the generated declarations).
|
|
39
|
+
|
|
40
|
+
## 0.1.0
|
|
41
|
+
|
|
42
|
+
First public release.
|
|
43
|
+
|
|
44
|
+
- `agents` - create, list, get, update, delete, `iter()`
|
|
45
|
+
- `calls` - create outbound, list, get, `iter()`
|
|
46
|
+
- `campaigns` - create and launch voice batch campaigns
|
|
47
|
+
- `phoneNumbers` - import, list, update, delete, monitor and web-call toggles
|
|
48
|
+
- `sms` - single sends and bulk campaigns
|
|
49
|
+
- `keys` - rotate the API secret
|
|
50
|
+
- `usage` - account usage and limits
|
|
51
|
+
- `webhooks` - per-number webhook configuration
|
|
52
|
+
- Typed errors per HTTP status, automatic retry on `429` honouring
|
|
53
|
+
`Retry-After`, retries on network failure, and no blind retry of `POST`
|
|
54
|
+
requests after a `5xx` (a call is never dialled twice).
|
|
55
|
+
- Dual ESM and CommonJS builds, TypeScript declarations, zero runtime
|
|
56
|
+
dependencies, Node 18 or newer.
|
package/dist/index.cjs
CHANGED
|
@@ -403,8 +403,8 @@ var SmsCampaigns = class {
|
|
|
403
403
|
}
|
|
404
404
|
http;
|
|
405
405
|
/** Create a one-time SMS broadcast ({{variable}} templating per recipient,
|
|
406
|
-
* up to 10,000 recipients).
|
|
407
|
-
*
|
|
406
|
+
* up to 10,000 recipients). from_number may be on either carrier (Twilio or
|
|
407
|
+
* Telnyx) and must be a number on your own account. */
|
|
408
408
|
create(params, opts) {
|
|
409
409
|
return this.http.request("POST", "/sms/campaigns", params, void 0, opts);
|
|
410
410
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -183,7 +183,14 @@ interface Call {
|
|
|
183
183
|
answered_at: number | null;
|
|
184
184
|
/** TIME CONNECTED in ms (answer to hangup) - the number you are billed on. Ring time excluded, so on outbound this is NOT end_timestamp - start_timestamp. */
|
|
185
185
|
duration_ms: number;
|
|
186
|
+
/** Why the call ended: completed, transferred, voicemail_detected, silence_timeout,
|
|
187
|
+
* ivr_timeout, max_duration_reached, caller_hangup (inbound), callee_hangup (outbound),
|
|
188
|
+
* busy / failed / no-answer / canceled (carrier words for calls that never connected),
|
|
189
|
+
* concurrency_limit, and rare infrastructure endings. */
|
|
186
190
|
ended_reason: string;
|
|
191
|
+
/** Minutes actually charged for this call. Transfers stop the meter at handoff, so
|
|
192
|
+
* this can be less than duration_ms suggests - the recording runs to the end either way. */
|
|
193
|
+
charged_minutes?: number;
|
|
187
194
|
/** A single string, one turn per line - not an array of turn objects. */
|
|
188
195
|
transcript: string;
|
|
189
196
|
call_summary: string;
|
|
@@ -452,8 +459,11 @@ interface SmsCampaignRecipient {
|
|
|
452
459
|
/** Fills {{placeholders}} in the template. Missing variables render as empty strings. */
|
|
453
460
|
variables?: Record<string, string>;
|
|
454
461
|
}
|
|
455
|
-
/**
|
|
456
|
-
*
|
|
462
|
+
/** from_number may be on EITHER carrier (Twilio or Telnyx) - the campaign
|
|
463
|
+
* sends using that number's own credentials, so it must be a number on your
|
|
464
|
+
* account. (An earlier doc page wrongly said Telnyx was rejected at create;
|
|
465
|
+
* the engine routes by provider and has done since the Twilio-only lookup
|
|
466
|
+
* was removed.) */
|
|
457
467
|
interface SmsCampaignCreateParams {
|
|
458
468
|
agent_id: string;
|
|
459
469
|
/** Your imported TWILIO number. */
|
|
@@ -589,8 +599,8 @@ declare class SmsCampaigns {
|
|
|
589
599
|
private readonly http;
|
|
590
600
|
constructor(http: HttpClient);
|
|
591
601
|
/** Create a one-time SMS broadcast ({{variable}} templating per recipient,
|
|
592
|
-
* up to 10,000 recipients).
|
|
593
|
-
*
|
|
602
|
+
* up to 10,000 recipients). from_number may be on either carrier (Twilio or
|
|
603
|
+
* Telnyx) and must be a number on your own account. */
|
|
594
604
|
create(params: SmsCampaignCreateParams, opts?: RequestOptions): Promise<SmsCampaign>;
|
|
595
605
|
/** Launch a draft/scheduled campaign immediately. */
|
|
596
606
|
launch(campaignId: string, opts?: RequestOptions): Promise<SmsCampaignLaunchResponse>;
|
package/dist/index.d.ts
CHANGED
|
@@ -183,7 +183,14 @@ interface Call {
|
|
|
183
183
|
answered_at: number | null;
|
|
184
184
|
/** TIME CONNECTED in ms (answer to hangup) - the number you are billed on. Ring time excluded, so on outbound this is NOT end_timestamp - start_timestamp. */
|
|
185
185
|
duration_ms: number;
|
|
186
|
+
/** Why the call ended: completed, transferred, voicemail_detected, silence_timeout,
|
|
187
|
+
* ivr_timeout, max_duration_reached, caller_hangup (inbound), callee_hangup (outbound),
|
|
188
|
+
* busy / failed / no-answer / canceled (carrier words for calls that never connected),
|
|
189
|
+
* concurrency_limit, and rare infrastructure endings. */
|
|
186
190
|
ended_reason: string;
|
|
191
|
+
/** Minutes actually charged for this call. Transfers stop the meter at handoff, so
|
|
192
|
+
* this can be less than duration_ms suggests - the recording runs to the end either way. */
|
|
193
|
+
charged_minutes?: number;
|
|
187
194
|
/** A single string, one turn per line - not an array of turn objects. */
|
|
188
195
|
transcript: string;
|
|
189
196
|
call_summary: string;
|
|
@@ -452,8 +459,11 @@ interface SmsCampaignRecipient {
|
|
|
452
459
|
/** Fills {{placeholders}} in the template. Missing variables render as empty strings. */
|
|
453
460
|
variables?: Record<string, string>;
|
|
454
461
|
}
|
|
455
|
-
/**
|
|
456
|
-
*
|
|
462
|
+
/** from_number may be on EITHER carrier (Twilio or Telnyx) - the campaign
|
|
463
|
+
* sends using that number's own credentials, so it must be a number on your
|
|
464
|
+
* account. (An earlier doc page wrongly said Telnyx was rejected at create;
|
|
465
|
+
* the engine routes by provider and has done since the Twilio-only lookup
|
|
466
|
+
* was removed.) */
|
|
457
467
|
interface SmsCampaignCreateParams {
|
|
458
468
|
agent_id: string;
|
|
459
469
|
/** Your imported TWILIO number. */
|
|
@@ -589,8 +599,8 @@ declare class SmsCampaigns {
|
|
|
589
599
|
private readonly http;
|
|
590
600
|
constructor(http: HttpClient);
|
|
591
601
|
/** Create a one-time SMS broadcast ({{variable}} templating per recipient,
|
|
592
|
-
* up to 10,000 recipients).
|
|
593
|
-
*
|
|
602
|
+
* up to 10,000 recipients). from_number may be on either carrier (Twilio or
|
|
603
|
+
* Telnyx) and must be a number on your own account. */
|
|
594
604
|
create(params: SmsCampaignCreateParams, opts?: RequestOptions): Promise<SmsCampaign>;
|
|
595
605
|
/** Launch a draft/scheduled campaign immediately. */
|
|
596
606
|
launch(campaignId: string, opts?: RequestOptions): Promise<SmsCampaignLaunchResponse>;
|
package/dist/index.js
CHANGED
|
@@ -367,8 +367,8 @@ var SmsCampaigns = class {
|
|
|
367
367
|
}
|
|
368
368
|
http;
|
|
369
369
|
/** Create a one-time SMS broadcast ({{variable}} templating per recipient,
|
|
370
|
-
* up to 10,000 recipients).
|
|
371
|
-
*
|
|
370
|
+
* up to 10,000 recipients). from_number may be on either carrier (Twilio or
|
|
371
|
+
* Telnyx) and must be a number on your own account. */
|
|
372
372
|
create(params, opts) {
|
|
373
373
|
return this.http.request("POST", "/sms/campaigns", params, void 0, opts);
|
|
374
374
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nixflex",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Official Node.js SDK for the Nixflex voice AI platform - AI phone agents, outbound campaigns, and SMS.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nixflex",
|
|
@@ -39,7 +39,8 @@
|
|
|
39
39
|
"files": [
|
|
40
40
|
"dist",
|
|
41
41
|
"README.md",
|
|
42
|
-
"LICENSE"
|
|
42
|
+
"LICENSE",
|
|
43
|
+
"CHANGELOG.md"
|
|
43
44
|
],
|
|
44
45
|
"engines": {
|
|
45
46
|
"node": ">=18"
|