nixflex 0.2.1 → 0.2.2
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 +51 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +7 -4
- package/dist/index.d.ts +7 -4
- package/dist/index.js +2 -2
- package/package.json +3 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the `nixflex` package. This project follows
|
|
4
|
+
[semantic versioning](https://semver.org): patch for fixes, minor for new
|
|
5
|
+
features, major for breaking changes. Published methods are never removed or
|
|
6
|
+
renamed within a major version.
|
|
7
|
+
|
|
8
|
+
## 0.2.2
|
|
9
|
+
|
|
10
|
+
- Corrected the SMS campaign documentation: rom_number may be on either carrier
|
|
11
|
+
(Twilio or Telnyx). An earlier docs page wrongly stated Telnyx was rejected at
|
|
12
|
+
create; the engine routes by provider. No code behaviour changed.
|
|
13
|
+
|
|
14
|
+
## 0.2.1
|
|
15
|
+
|
|
16
|
+
- Added MIT `LICENSE`, this changelog, and repository/homepage/issue metadata
|
|
17
|
+
so the npm page links back to the source and docs.
|
|
18
|
+
- Documented `verifyWebhookSignature` in the README.
|
|
19
|
+
- Continuous integration now builds and runs the test suite on every push.
|
|
20
|
+
- No API changes.
|
|
21
|
+
|
|
22
|
+
## 0.2.0
|
|
23
|
+
|
|
24
|
+
- **Added** `verifyWebhookSignature(rawBody, signatureHeader, keySecret)` and
|
|
25
|
+
`client.webhooks.verify(...)` - verifies the `X-Nixflex-Signature` header
|
|
26
|
+
(HMAC-SHA256 over `"<timestamp>.<body>"`) with a constant-time comparison and
|
|
27
|
+
a configurable replay window (5 minutes by default). Never throws.
|
|
28
|
+
- **Added** `client.calls.delete(callId)` - permanently erases one call record,
|
|
29
|
+
transcript, and recording file.
|
|
30
|
+
- **Added** `client.calls.deleteAll()` - erases all calls, recordings, and SMS
|
|
31
|
+
messages on the key.
|
|
32
|
+
- Added `@types/node` as a development dependency (required for `Buffer` and
|
|
33
|
+
`node:crypto` types in the generated declarations).
|
|
34
|
+
|
|
35
|
+
## 0.1.0
|
|
36
|
+
|
|
37
|
+
First public release.
|
|
38
|
+
|
|
39
|
+
- `agents` - create, list, get, update, delete, `iter()`
|
|
40
|
+
- `calls` - create outbound, list, get, `iter()`
|
|
41
|
+
- `campaigns` - create and launch voice batch campaigns
|
|
42
|
+
- `phoneNumbers` - import, list, update, delete, monitor and web-call toggles
|
|
43
|
+
- `sms` - single sends and bulk campaigns
|
|
44
|
+
- `keys` - rotate the API secret
|
|
45
|
+
- `usage` - account usage and limits
|
|
46
|
+
- `webhooks` - per-number webhook configuration
|
|
47
|
+
- Typed errors per HTTP status, automatic retry on `429` honouring
|
|
48
|
+
`Retry-After`, retries on network failure, and no blind retry of `POST`
|
|
49
|
+
requests after a `5xx` (a call is never dialled twice).
|
|
50
|
+
- Dual ESM and CommonJS builds, TypeScript declarations, zero runtime
|
|
51
|
+
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
|
@@ -452,8 +452,11 @@ interface SmsCampaignRecipient {
|
|
|
452
452
|
/** Fills {{placeholders}} in the template. Missing variables render as empty strings. */
|
|
453
453
|
variables?: Record<string, string>;
|
|
454
454
|
}
|
|
455
|
-
/**
|
|
456
|
-
*
|
|
455
|
+
/** from_number may be on EITHER carrier (Twilio or Telnyx) - the campaign
|
|
456
|
+
* sends using that number's own credentials, so it must be a number on your
|
|
457
|
+
* account. (An earlier doc page wrongly said Telnyx was rejected at create;
|
|
458
|
+
* the engine routes by provider and has done since the Twilio-only lookup
|
|
459
|
+
* was removed.) */
|
|
457
460
|
interface SmsCampaignCreateParams {
|
|
458
461
|
agent_id: string;
|
|
459
462
|
/** Your imported TWILIO number. */
|
|
@@ -589,8 +592,8 @@ declare class SmsCampaigns {
|
|
|
589
592
|
private readonly http;
|
|
590
593
|
constructor(http: HttpClient);
|
|
591
594
|
/** Create a one-time SMS broadcast ({{variable}} templating per recipient,
|
|
592
|
-
* up to 10,000 recipients).
|
|
593
|
-
*
|
|
595
|
+
* up to 10,000 recipients). from_number may be on either carrier (Twilio or
|
|
596
|
+
* Telnyx) and must be a number on your own account. */
|
|
594
597
|
create(params: SmsCampaignCreateParams, opts?: RequestOptions): Promise<SmsCampaign>;
|
|
595
598
|
/** Launch a draft/scheduled campaign immediately. */
|
|
596
599
|
launch(campaignId: string, opts?: RequestOptions): Promise<SmsCampaignLaunchResponse>;
|
package/dist/index.d.ts
CHANGED
|
@@ -452,8 +452,11 @@ interface SmsCampaignRecipient {
|
|
|
452
452
|
/** Fills {{placeholders}} in the template. Missing variables render as empty strings. */
|
|
453
453
|
variables?: Record<string, string>;
|
|
454
454
|
}
|
|
455
|
-
/**
|
|
456
|
-
*
|
|
455
|
+
/** from_number may be on EITHER carrier (Twilio or Telnyx) - the campaign
|
|
456
|
+
* sends using that number's own credentials, so it must be a number on your
|
|
457
|
+
* account. (An earlier doc page wrongly said Telnyx was rejected at create;
|
|
458
|
+
* the engine routes by provider and has done since the Twilio-only lookup
|
|
459
|
+
* was removed.) */
|
|
457
460
|
interface SmsCampaignCreateParams {
|
|
458
461
|
agent_id: string;
|
|
459
462
|
/** Your imported TWILIO number. */
|
|
@@ -589,8 +592,8 @@ declare class SmsCampaigns {
|
|
|
589
592
|
private readonly http;
|
|
590
593
|
constructor(http: HttpClient);
|
|
591
594
|
/** Create a one-time SMS broadcast ({{variable}} templating per recipient,
|
|
592
|
-
* up to 10,000 recipients).
|
|
593
|
-
*
|
|
595
|
+
* up to 10,000 recipients). from_number may be on either carrier (Twilio or
|
|
596
|
+
* Telnyx) and must be a number on your own account. */
|
|
594
597
|
create(params: SmsCampaignCreateParams, opts?: RequestOptions): Promise<SmsCampaign>;
|
|
595
598
|
/** Launch a draft/scheduled campaign immediately. */
|
|
596
599
|
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.2.
|
|
3
|
+
"version": "0.2.2",
|
|
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"
|