nixflex 0.3.1 → 0.4.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 CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.4.0
2
+
3
+ - New: `client.storage` - connect your own S3-compatible bucket for call recordings (data residency). `storage.set()` verifies with a probe write before saving, `storage.get()` never returns the secret, `storage.delete()` disconnects. Recordings then upload to your bucket and `recording_url` becomes a `byo:` path. See https://docs.nixflex.com/advanced/your-own-storage
4
+
1
5
  ## 0.3.1 (2026-08-24)
2
6
 
3
7
  - Voicemail as a structured setting: `voicemail_leave_enabled` + `voicemail_message` on Agent (applies to dashboard-imported numbers) and on PhoneNumber / PhoneNumberUpdateParams (the only voicemail control for API-imported numbers - no inheritance across the two worlds)
package/dist/index.cjs CHANGED
@@ -465,6 +465,28 @@ var UsageResource = class {
465
465
  return this.http.request("GET", "/usage", void 0, void 0, opts);
466
466
  }
467
467
  };
468
+ var Storage = class {
469
+ constructor(http) {
470
+ this.http = http;
471
+ }
472
+ http;
473
+ /** Connect your own S3-compatible bucket for call recordings (data residency).
474
+ * The connection is verified with a probe write BEFORE saving - broken
475
+ * credentials are rejected, never stored. Recordings then upload to your
476
+ * bucket and Nixflex keeps no copy; recording_url becomes a byo: path. */
477
+ set(params, opts) {
478
+ return this.http.request("PUT", "/account/storage", params, void 0, opts);
479
+ }
480
+ /** Current storage configuration. The secret is never included. */
481
+ get(opts) {
482
+ return this.http.request("GET", "/account/storage", void 0, void 0, opts);
483
+ }
484
+ /** Disconnect and clear. Recordings return to Nixflex EU storage from the
485
+ * next call; files already in your bucket are untouched - they are yours. */
486
+ delete(opts) {
487
+ return this.http.request("DELETE", "/account/storage", void 0, void 0, opts);
488
+ }
489
+ };
468
490
  var Webhooks = class {
469
491
  constructor(http) {
470
492
  this.http = http;
@@ -512,6 +534,8 @@ var Nixflex = class {
512
534
  usage;
513
535
  /** Per-number post-call webhook configuration. */
514
536
  webhooks;
537
+ /** Your own S3-compatible recording storage (data residency). */
538
+ storage;
515
539
  constructor(options) {
516
540
  const http = new HttpClient(options);
517
541
  this.agents = new Agents(http);
@@ -522,6 +546,7 @@ var Nixflex = class {
522
546
  this.keys = new Keys(http);
523
547
  this.usage = new UsageResource(http);
524
548
  this.webhooks = new Webhooks(http);
549
+ this.storage = new Storage(http);
525
550
  }
526
551
  /** Create a brand-new API key (unauthenticated signup endpoint - most
527
552
  * developers use the dashboard instead). The key_secret is shown ONCE.
package/dist/index.d.cts CHANGED
@@ -576,6 +576,38 @@ interface WebhookConfigResponse {
576
576
  phone_number?: string;
577
577
  url?: string | null;
578
578
  }
579
+ /** Your own S3-compatible recording storage (BYO storage). */
580
+ interface StorageConfig {
581
+ storage_enabled: boolean;
582
+ endpoint: string | null;
583
+ region: string | null;
584
+ bucket: string | null;
585
+ access_key: string | null;
586
+ }
587
+ interface StorageSetParams {
588
+ /** The exact bucket name at your provider. */
589
+ bucket: string;
590
+ /** Access key ID with permission to write objects. */
591
+ access_key: string;
592
+ /** Secret access key. Write-only - stored encrypted, never returned. */
593
+ secret_key: string;
594
+ /** https:// endpoint of your provider. Leave empty for Amazon S3. */
595
+ endpoint?: string;
596
+ /** Your bucket's region. Defaults to auto. */
597
+ region?: string;
598
+ }
599
+ interface StorageSetResponse {
600
+ ok: boolean;
601
+ storage_enabled: boolean;
602
+ bucket: string;
603
+ endpoint: string | null;
604
+ region: string;
605
+ verified: boolean;
606
+ }
607
+ interface StorageDeleteResponse {
608
+ ok: boolean;
609
+ storage_enabled: boolean;
610
+ }
579
611
 
580
612
  declare class PhoneNumbers {
581
613
  private readonly http;
@@ -663,6 +695,21 @@ declare class UsageResource {
663
695
  get(opts?: RequestOptions): Promise<Usage>;
664
696
  }
665
697
 
698
+ declare class Storage {
699
+ private readonly http;
700
+ constructor(http: HttpClient);
701
+ /** Connect your own S3-compatible bucket for call recordings (data residency).
702
+ * The connection is verified with a probe write BEFORE saving - broken
703
+ * credentials are rejected, never stored. Recordings then upload to your
704
+ * bucket and Nixflex keeps no copy; recording_url becomes a byo: path. */
705
+ set(params: StorageSetParams, opts?: RequestOptions): Promise<StorageSetResponse>;
706
+ /** Current storage configuration. The secret is never included. */
707
+ get(opts?: RequestOptions): Promise<StorageConfig>;
708
+ /** Disconnect and clear. Recordings return to Nixflex EU storage from the
709
+ * next call; files already in your bucket are untouched - they are yours. */
710
+ delete(opts?: RequestOptions): Promise<StorageDeleteResponse>;
711
+ }
712
+
666
713
  declare class Webhooks {
667
714
  private readonly http;
668
715
  constructor(http: HttpClient);
@@ -752,6 +799,8 @@ declare class Nixflex {
752
799
  readonly usage: UsageResource;
753
800
  /** Per-number post-call webhook configuration. */
754
801
  readonly webhooks: Webhooks;
802
+ /** Your own S3-compatible recording storage (data residency). */
803
+ readonly storage: Storage;
755
804
  constructor(options: NixflexClientOptions);
756
805
  /** Create a brand-new API key (unauthenticated signup endpoint - most
757
806
  * developers use the dashboard instead). The key_secret is shown ONCE.
@@ -762,4 +811,4 @@ declare class Nixflex {
762
811
  }, baseUrl?: string): Promise<KeyCreateResponse>;
763
812
  }
764
813
 
765
- export { type Agent, type AgentCreateParams, type AgentDeleteResponse, type AgentUpdateParams, type BatchCampaignParams, type BatchCreateResponse, type BatchInvalidEntry, type BatchLaunchResponse, type BatchRecipient, type Call, type CallDeleteAllResponse, type CallDeleteResponse, type CallDirection, type CallerSentiment, type KeyCreateResponse, type KeyRotateResponse, type ListParams, type MonitorToggleResponse, Nixflex, type NixflexAPIErrorBody, NixflexAuthenticationError, type NixflexClientOptions, NixflexConnectionError, NixflexError, NixflexInvalidRequestError, NixflexNotFoundError, NixflexPaymentRequiredError, NixflexRateLimitError, NixflexServerError, type OutboundCallParams, type OutboundCallResponse, type PhoneNumber, type PhoneNumberDeleteResponse, type PhoneNumberImportParams, type PhoneNumberListResponse, type PhoneNumberUpdateParams, type RequestOptions, type ResponseLength, type SmsCampaign, type SmsCampaignCreateParams, type SmsCampaignDeleteResponse, type SmsCampaignLaunchResponse, type SmsCampaignListResponse, type SmsCampaignRecipient, type SmsCampaignStatus, type SmsSendParams, type SmsSendResponse, type TransferType, type Usage, type VerifyOptions, type WebCallsToggleResponse, type WebhookConfigResponse, type Weekday, Nixflex as default, errorFromResponse, verifyWebhookSignature };
814
+ export { type Agent, type AgentCreateParams, type AgentDeleteResponse, type AgentUpdateParams, type BatchCampaignParams, type BatchCreateResponse, type BatchInvalidEntry, type BatchLaunchResponse, type BatchRecipient, type Call, type CallDeleteAllResponse, type CallDeleteResponse, type CallDirection, type CallerSentiment, type KeyCreateResponse, type KeyRotateResponse, type ListParams, type MonitorToggleResponse, Nixflex, type NixflexAPIErrorBody, NixflexAuthenticationError, type NixflexClientOptions, NixflexConnectionError, NixflexError, NixflexInvalidRequestError, NixflexNotFoundError, NixflexPaymentRequiredError, NixflexRateLimitError, NixflexServerError, type OutboundCallParams, type OutboundCallResponse, type PhoneNumber, type PhoneNumberDeleteResponse, type PhoneNumberImportParams, type PhoneNumberListResponse, type PhoneNumberUpdateParams, type RequestOptions, type ResponseLength, type SmsCampaign, type SmsCampaignCreateParams, type SmsCampaignDeleteResponse, type SmsCampaignLaunchResponse, type SmsCampaignListResponse, type SmsCampaignRecipient, type SmsCampaignStatus, type SmsSendParams, type SmsSendResponse, type StorageConfig, type StorageDeleteResponse, type StorageSetParams, type StorageSetResponse, type TransferType, type Usage, type VerifyOptions, type WebCallsToggleResponse, type WebhookConfigResponse, type Weekday, Nixflex as default, errorFromResponse, verifyWebhookSignature };
package/dist/index.d.ts CHANGED
@@ -576,6 +576,38 @@ interface WebhookConfigResponse {
576
576
  phone_number?: string;
577
577
  url?: string | null;
578
578
  }
579
+ /** Your own S3-compatible recording storage (BYO storage). */
580
+ interface StorageConfig {
581
+ storage_enabled: boolean;
582
+ endpoint: string | null;
583
+ region: string | null;
584
+ bucket: string | null;
585
+ access_key: string | null;
586
+ }
587
+ interface StorageSetParams {
588
+ /** The exact bucket name at your provider. */
589
+ bucket: string;
590
+ /** Access key ID with permission to write objects. */
591
+ access_key: string;
592
+ /** Secret access key. Write-only - stored encrypted, never returned. */
593
+ secret_key: string;
594
+ /** https:// endpoint of your provider. Leave empty for Amazon S3. */
595
+ endpoint?: string;
596
+ /** Your bucket's region. Defaults to auto. */
597
+ region?: string;
598
+ }
599
+ interface StorageSetResponse {
600
+ ok: boolean;
601
+ storage_enabled: boolean;
602
+ bucket: string;
603
+ endpoint: string | null;
604
+ region: string;
605
+ verified: boolean;
606
+ }
607
+ interface StorageDeleteResponse {
608
+ ok: boolean;
609
+ storage_enabled: boolean;
610
+ }
579
611
 
580
612
  declare class PhoneNumbers {
581
613
  private readonly http;
@@ -663,6 +695,21 @@ declare class UsageResource {
663
695
  get(opts?: RequestOptions): Promise<Usage>;
664
696
  }
665
697
 
698
+ declare class Storage {
699
+ private readonly http;
700
+ constructor(http: HttpClient);
701
+ /** Connect your own S3-compatible bucket for call recordings (data residency).
702
+ * The connection is verified with a probe write BEFORE saving - broken
703
+ * credentials are rejected, never stored. Recordings then upload to your
704
+ * bucket and Nixflex keeps no copy; recording_url becomes a byo: path. */
705
+ set(params: StorageSetParams, opts?: RequestOptions): Promise<StorageSetResponse>;
706
+ /** Current storage configuration. The secret is never included. */
707
+ get(opts?: RequestOptions): Promise<StorageConfig>;
708
+ /** Disconnect and clear. Recordings return to Nixflex EU storage from the
709
+ * next call; files already in your bucket are untouched - they are yours. */
710
+ delete(opts?: RequestOptions): Promise<StorageDeleteResponse>;
711
+ }
712
+
666
713
  declare class Webhooks {
667
714
  private readonly http;
668
715
  constructor(http: HttpClient);
@@ -752,6 +799,8 @@ declare class Nixflex {
752
799
  readonly usage: UsageResource;
753
800
  /** Per-number post-call webhook configuration. */
754
801
  readonly webhooks: Webhooks;
802
+ /** Your own S3-compatible recording storage (data residency). */
803
+ readonly storage: Storage;
755
804
  constructor(options: NixflexClientOptions);
756
805
  /** Create a brand-new API key (unauthenticated signup endpoint - most
757
806
  * developers use the dashboard instead). The key_secret is shown ONCE.
@@ -762,4 +811,4 @@ declare class Nixflex {
762
811
  }, baseUrl?: string): Promise<KeyCreateResponse>;
763
812
  }
764
813
 
765
- export { type Agent, type AgentCreateParams, type AgentDeleteResponse, type AgentUpdateParams, type BatchCampaignParams, type BatchCreateResponse, type BatchInvalidEntry, type BatchLaunchResponse, type BatchRecipient, type Call, type CallDeleteAllResponse, type CallDeleteResponse, type CallDirection, type CallerSentiment, type KeyCreateResponse, type KeyRotateResponse, type ListParams, type MonitorToggleResponse, Nixflex, type NixflexAPIErrorBody, NixflexAuthenticationError, type NixflexClientOptions, NixflexConnectionError, NixflexError, NixflexInvalidRequestError, NixflexNotFoundError, NixflexPaymentRequiredError, NixflexRateLimitError, NixflexServerError, type OutboundCallParams, type OutboundCallResponse, type PhoneNumber, type PhoneNumberDeleteResponse, type PhoneNumberImportParams, type PhoneNumberListResponse, type PhoneNumberUpdateParams, type RequestOptions, type ResponseLength, type SmsCampaign, type SmsCampaignCreateParams, type SmsCampaignDeleteResponse, type SmsCampaignLaunchResponse, type SmsCampaignListResponse, type SmsCampaignRecipient, type SmsCampaignStatus, type SmsSendParams, type SmsSendResponse, type TransferType, type Usage, type VerifyOptions, type WebCallsToggleResponse, type WebhookConfigResponse, type Weekday, Nixflex as default, errorFromResponse, verifyWebhookSignature };
814
+ export { type Agent, type AgentCreateParams, type AgentDeleteResponse, type AgentUpdateParams, type BatchCampaignParams, type BatchCreateResponse, type BatchInvalidEntry, type BatchLaunchResponse, type BatchRecipient, type Call, type CallDeleteAllResponse, type CallDeleteResponse, type CallDirection, type CallerSentiment, type KeyCreateResponse, type KeyRotateResponse, type ListParams, type MonitorToggleResponse, Nixflex, type NixflexAPIErrorBody, NixflexAuthenticationError, type NixflexClientOptions, NixflexConnectionError, NixflexError, NixflexInvalidRequestError, NixflexNotFoundError, NixflexPaymentRequiredError, NixflexRateLimitError, NixflexServerError, type OutboundCallParams, type OutboundCallResponse, type PhoneNumber, type PhoneNumberDeleteResponse, type PhoneNumberImportParams, type PhoneNumberListResponse, type PhoneNumberUpdateParams, type RequestOptions, type ResponseLength, type SmsCampaign, type SmsCampaignCreateParams, type SmsCampaignDeleteResponse, type SmsCampaignLaunchResponse, type SmsCampaignListResponse, type SmsCampaignRecipient, type SmsCampaignStatus, type SmsSendParams, type SmsSendResponse, type StorageConfig, type StorageDeleteResponse, type StorageSetParams, type StorageSetResponse, type TransferType, type Usage, type VerifyOptions, type WebCallsToggleResponse, type WebhookConfigResponse, type Weekday, Nixflex as default, errorFromResponse, verifyWebhookSignature };
package/dist/index.js CHANGED
@@ -429,6 +429,28 @@ var UsageResource = class {
429
429
  return this.http.request("GET", "/usage", void 0, void 0, opts);
430
430
  }
431
431
  };
432
+ var Storage = class {
433
+ constructor(http) {
434
+ this.http = http;
435
+ }
436
+ http;
437
+ /** Connect your own S3-compatible bucket for call recordings (data residency).
438
+ * The connection is verified with a probe write BEFORE saving - broken
439
+ * credentials are rejected, never stored. Recordings then upload to your
440
+ * bucket and Nixflex keeps no copy; recording_url becomes a byo: path. */
441
+ set(params, opts) {
442
+ return this.http.request("PUT", "/account/storage", params, void 0, opts);
443
+ }
444
+ /** Current storage configuration. The secret is never included. */
445
+ get(opts) {
446
+ return this.http.request("GET", "/account/storage", void 0, void 0, opts);
447
+ }
448
+ /** Disconnect and clear. Recordings return to Nixflex EU storage from the
449
+ * next call; files already in your bucket are untouched - they are yours. */
450
+ delete(opts) {
451
+ return this.http.request("DELETE", "/account/storage", void 0, void 0, opts);
452
+ }
453
+ };
432
454
  var Webhooks = class {
433
455
  constructor(http) {
434
456
  this.http = http;
@@ -476,6 +498,8 @@ var Nixflex = class {
476
498
  usage;
477
499
  /** Per-number post-call webhook configuration. */
478
500
  webhooks;
501
+ /** Your own S3-compatible recording storage (data residency). */
502
+ storage;
479
503
  constructor(options) {
480
504
  const http = new HttpClient(options);
481
505
  this.agents = new Agents(http);
@@ -486,6 +510,7 @@ var Nixflex = class {
486
510
  this.keys = new Keys(http);
487
511
  this.usage = new UsageResource(http);
488
512
  this.webhooks = new Webhooks(http);
513
+ this.storage = new Storage(http);
489
514
  }
490
515
  /** Create a brand-new API key (unauthenticated signup endpoint - most
491
516
  * developers use the dashboard instead). The key_secret is shown ONCE.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nixflex",
3
- "version": "0.3.1",
3
+ "version": "0.4.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",