nixflex 0.3.1 → 0.5.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,13 @@
1
+ ## 0.5.0
2
+
3
+ - New: `client.llm` - bring your own OpenAI-compatible model (set() verifies with a real completion + tool-calling probe, key write-only). Calls it serves bill at -0.015/min.
4
+ - New: `client.tts` - bring your own voice (elevenlabs/cartesia, set() verifies with a real synthesis, key write-only). Phone calls only; -0.02/min.
5
+ - Docs: https://docs.nixflex.com/advanced/your-own-llm and /advanced/your-own-tts
6
+
7
+ ## 0.4.0
8
+
9
+ - 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
10
+
1
11
  ## 0.3.1 (2026-08-24)
2
12
 
3
13
  - 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,71 @@ 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
+ };
490
+ var Llm = class {
491
+ constructor(http) {
492
+ this.http = http;
493
+ }
494
+ http;
495
+ /** Connect an OpenAI-compatible model. Verified BEFORE saving with a real
496
+ * completion + a tool-calling round trip (models without tool calling are
497
+ * refused). Calls your model serves bill at a $0.015/min discount; if it
498
+ * fails on a call the standard stack takes over and that call bills standard. */
499
+ set(params, opts) {
500
+ return this.http.request("PUT", "/account/llm", params, void 0, opts);
501
+ }
502
+ /** Current LLM configuration. The provider key is never included. */
503
+ get(opts) {
504
+ return this.http.request("GET", "/account/llm", void 0, void 0, opts);
505
+ }
506
+ /** Disconnect. Calls return to the standard stack and rate from the next call. */
507
+ delete(opts) {
508
+ return this.http.request("DELETE", "/account/llm", void 0, void 0, opts);
509
+ }
510
+ };
511
+ var Tts = class {
512
+ constructor(http) {
513
+ this.http = http;
514
+ }
515
+ http;
516
+ /** Connect your voice provider (elevenlabs or cartesia). Verified BEFORE
517
+ * saving with one real synthesis using the exact voice ID. Phone calls only -
518
+ * web calls keep the standard voice. Calls your voice serves bill at a
519
+ * $0.02/min discount; on failure the standard voice takes over and that call
520
+ * bills the standard TTS rate. */
521
+ set(params, opts) {
522
+ return this.http.request("PUT", "/account/tts", params, void 0, opts);
523
+ }
524
+ /** Current TTS configuration. The provider key is never included. */
525
+ get(opts) {
526
+ return this.http.request("GET", "/account/tts", void 0, void 0, opts);
527
+ }
528
+ /** Disconnect. Calls return to the standard voice and rate from the next call. */
529
+ delete(opts) {
530
+ return this.http.request("DELETE", "/account/tts", void 0, void 0, opts);
531
+ }
532
+ };
468
533
  var Webhooks = class {
469
534
  constructor(http) {
470
535
  this.http = http;
@@ -512,6 +577,12 @@ var Nixflex = class {
512
577
  usage;
513
578
  /** Per-number post-call webhook configuration. */
514
579
  webhooks;
580
+ /** Your own S3-compatible recording storage (data residency). */
581
+ storage;
582
+ /** Your own LLM (OpenAI-compatible endpoint, verified with tool-calling probe). */
583
+ llm;
584
+ /** Your own TTS (elevenlabs/cartesia, verified with a real synthesis). */
585
+ tts;
515
586
  constructor(options) {
516
587
  const http = new HttpClient(options);
517
588
  this.agents = new Agents(http);
@@ -522,6 +593,9 @@ var Nixflex = class {
522
593
  this.keys = new Keys(http);
523
594
  this.usage = new UsageResource(http);
524
595
  this.webhooks = new Webhooks(http);
596
+ this.storage = new Storage(http);
597
+ this.llm = new Llm(http);
598
+ this.tts = new Tts(http);
525
599
  }
526
600
  /** Create a brand-new API key (unauthenticated signup endpoint - most
527
601
  * developers use the dashboard instead). The key_secret is shown ONCE.
package/dist/index.d.cts CHANGED
@@ -576,6 +576,89 @@ 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
+ }
611
+ /** Your own LLM (BYO LLM) - an OpenAI-compatible endpoint answers every call. */
612
+ interface LlmConfig {
613
+ byo_llm_enabled: boolean;
614
+ endpoint: string | null;
615
+ model: string | null;
616
+ }
617
+ interface LlmSetParams {
618
+ /** OpenAI-compatible https:// base URL, e.g. https://api.openai.com/v1 */
619
+ endpoint: string;
620
+ /** Model name as your provider knows it. Must support OpenAI-style tool calling. */
621
+ model: string;
622
+ /** Your provider API key. Write-only - stored encrypted, never returned. */
623
+ api_key: string;
624
+ }
625
+ interface LlmSetResponse {
626
+ ok: boolean;
627
+ byo_llm_enabled: boolean;
628
+ endpoint: string;
629
+ model: string;
630
+ verified: boolean;
631
+ }
632
+ interface LlmDeleteResponse {
633
+ ok: boolean;
634
+ byo_llm_enabled: boolean;
635
+ }
636
+ /** Your own TTS (BYO TTS) - your voice provider speaks on every phone call. */
637
+ type TtsProvider = 'elevenlabs' | 'cartesia';
638
+ interface TtsConfig {
639
+ byo_tts_enabled: boolean;
640
+ provider: TtsProvider | null;
641
+ voice_id: string | null;
642
+ }
643
+ interface TtsSetParams {
644
+ /** 'elevenlabs' or 'cartesia'. */
645
+ provider: TtsProvider;
646
+ /** Voice ID exactly as shown in your provider console. */
647
+ voice_id: string;
648
+ /** Your provider API key. Write-only - stored encrypted, never returned. */
649
+ api_key: string;
650
+ }
651
+ interface TtsSetResponse {
652
+ ok: boolean;
653
+ byo_tts_enabled: boolean;
654
+ provider: TtsProvider;
655
+ voice_id: string;
656
+ verified: boolean;
657
+ }
658
+ interface TtsDeleteResponse {
659
+ ok: boolean;
660
+ byo_tts_enabled: boolean;
661
+ }
579
662
 
580
663
  declare class PhoneNumbers {
581
664
  private readonly http;
@@ -663,6 +746,49 @@ declare class UsageResource {
663
746
  get(opts?: RequestOptions): Promise<Usage>;
664
747
  }
665
748
 
749
+ declare class Storage {
750
+ private readonly http;
751
+ constructor(http: HttpClient);
752
+ /** Connect your own S3-compatible bucket for call recordings (data residency).
753
+ * The connection is verified with a probe write BEFORE saving - broken
754
+ * credentials are rejected, never stored. Recordings then upload to your
755
+ * bucket and Nixflex keeps no copy; recording_url becomes a byo: path. */
756
+ set(params: StorageSetParams, opts?: RequestOptions): Promise<StorageSetResponse>;
757
+ /** Current storage configuration. The secret is never included. */
758
+ get(opts?: RequestOptions): Promise<StorageConfig>;
759
+ /** Disconnect and clear. Recordings return to Nixflex EU storage from the
760
+ * next call; files already in your bucket are untouched - they are yours. */
761
+ delete(opts?: RequestOptions): Promise<StorageDeleteResponse>;
762
+ }
763
+
764
+ declare class Llm {
765
+ private readonly http;
766
+ constructor(http: HttpClient);
767
+ /** Connect an OpenAI-compatible model. Verified BEFORE saving with a real
768
+ * completion + a tool-calling round trip (models without tool calling are
769
+ * refused). Calls your model serves bill at a $0.015/min discount; if it
770
+ * fails on a call the standard stack takes over and that call bills standard. */
771
+ set(params: LlmSetParams, opts?: RequestOptions): Promise<LlmSetResponse>;
772
+ /** Current LLM configuration. The provider key is never included. */
773
+ get(opts?: RequestOptions): Promise<LlmConfig>;
774
+ /** Disconnect. Calls return to the standard stack and rate from the next call. */
775
+ delete(opts?: RequestOptions): Promise<LlmDeleteResponse>;
776
+ }
777
+ declare class Tts {
778
+ private readonly http;
779
+ constructor(http: HttpClient);
780
+ /** Connect your voice provider (elevenlabs or cartesia). Verified BEFORE
781
+ * saving with one real synthesis using the exact voice ID. Phone calls only -
782
+ * web calls keep the standard voice. Calls your voice serves bill at a
783
+ * $0.02/min discount; on failure the standard voice takes over and that call
784
+ * bills the standard TTS rate. */
785
+ set(params: TtsSetParams, opts?: RequestOptions): Promise<TtsSetResponse>;
786
+ /** Current TTS configuration. The provider key is never included. */
787
+ get(opts?: RequestOptions): Promise<TtsConfig>;
788
+ /** Disconnect. Calls return to the standard voice and rate from the next call. */
789
+ delete(opts?: RequestOptions): Promise<TtsDeleteResponse>;
790
+ }
791
+
666
792
  declare class Webhooks {
667
793
  private readonly http;
668
794
  constructor(http: HttpClient);
@@ -752,6 +878,12 @@ declare class Nixflex {
752
878
  readonly usage: UsageResource;
753
879
  /** Per-number post-call webhook configuration. */
754
880
  readonly webhooks: Webhooks;
881
+ /** Your own S3-compatible recording storage (data residency). */
882
+ readonly storage: Storage;
883
+ /** Your own LLM (OpenAI-compatible endpoint, verified with tool-calling probe). */
884
+ readonly llm: Llm;
885
+ /** Your own TTS (elevenlabs/cartesia, verified with a real synthesis). */
886
+ readonly tts: Tts;
755
887
  constructor(options: NixflexClientOptions);
756
888
  /** Create a brand-new API key (unauthenticated signup endpoint - most
757
889
  * developers use the dashboard instead). The key_secret is shown ONCE.
@@ -762,4 +894,4 @@ declare class Nixflex {
762
894
  }, baseUrl?: string): Promise<KeyCreateResponse>;
763
895
  }
764
896
 
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 };
897
+ 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 LlmConfig, type LlmDeleteResponse, type LlmSetParams, type LlmSetResponse, 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 TtsConfig, type TtsDeleteResponse, type TtsProvider, type TtsSetParams, type TtsSetResponse, type Usage, type VerifyOptions, type WebCallsToggleResponse, type WebhookConfigResponse, type Weekday, Nixflex as default, errorFromResponse, verifyWebhookSignature };
package/dist/index.d.ts CHANGED
@@ -576,6 +576,89 @@ 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
+ }
611
+ /** Your own LLM (BYO LLM) - an OpenAI-compatible endpoint answers every call. */
612
+ interface LlmConfig {
613
+ byo_llm_enabled: boolean;
614
+ endpoint: string | null;
615
+ model: string | null;
616
+ }
617
+ interface LlmSetParams {
618
+ /** OpenAI-compatible https:// base URL, e.g. https://api.openai.com/v1 */
619
+ endpoint: string;
620
+ /** Model name as your provider knows it. Must support OpenAI-style tool calling. */
621
+ model: string;
622
+ /** Your provider API key. Write-only - stored encrypted, never returned. */
623
+ api_key: string;
624
+ }
625
+ interface LlmSetResponse {
626
+ ok: boolean;
627
+ byo_llm_enabled: boolean;
628
+ endpoint: string;
629
+ model: string;
630
+ verified: boolean;
631
+ }
632
+ interface LlmDeleteResponse {
633
+ ok: boolean;
634
+ byo_llm_enabled: boolean;
635
+ }
636
+ /** Your own TTS (BYO TTS) - your voice provider speaks on every phone call. */
637
+ type TtsProvider = 'elevenlabs' | 'cartesia';
638
+ interface TtsConfig {
639
+ byo_tts_enabled: boolean;
640
+ provider: TtsProvider | null;
641
+ voice_id: string | null;
642
+ }
643
+ interface TtsSetParams {
644
+ /** 'elevenlabs' or 'cartesia'. */
645
+ provider: TtsProvider;
646
+ /** Voice ID exactly as shown in your provider console. */
647
+ voice_id: string;
648
+ /** Your provider API key. Write-only - stored encrypted, never returned. */
649
+ api_key: string;
650
+ }
651
+ interface TtsSetResponse {
652
+ ok: boolean;
653
+ byo_tts_enabled: boolean;
654
+ provider: TtsProvider;
655
+ voice_id: string;
656
+ verified: boolean;
657
+ }
658
+ interface TtsDeleteResponse {
659
+ ok: boolean;
660
+ byo_tts_enabled: boolean;
661
+ }
579
662
 
580
663
  declare class PhoneNumbers {
581
664
  private readonly http;
@@ -663,6 +746,49 @@ declare class UsageResource {
663
746
  get(opts?: RequestOptions): Promise<Usage>;
664
747
  }
665
748
 
749
+ declare class Storage {
750
+ private readonly http;
751
+ constructor(http: HttpClient);
752
+ /** Connect your own S3-compatible bucket for call recordings (data residency).
753
+ * The connection is verified with a probe write BEFORE saving - broken
754
+ * credentials are rejected, never stored. Recordings then upload to your
755
+ * bucket and Nixflex keeps no copy; recording_url becomes a byo: path. */
756
+ set(params: StorageSetParams, opts?: RequestOptions): Promise<StorageSetResponse>;
757
+ /** Current storage configuration. The secret is never included. */
758
+ get(opts?: RequestOptions): Promise<StorageConfig>;
759
+ /** Disconnect and clear. Recordings return to Nixflex EU storage from the
760
+ * next call; files already in your bucket are untouched - they are yours. */
761
+ delete(opts?: RequestOptions): Promise<StorageDeleteResponse>;
762
+ }
763
+
764
+ declare class Llm {
765
+ private readonly http;
766
+ constructor(http: HttpClient);
767
+ /** Connect an OpenAI-compatible model. Verified BEFORE saving with a real
768
+ * completion + a tool-calling round trip (models without tool calling are
769
+ * refused). Calls your model serves bill at a $0.015/min discount; if it
770
+ * fails on a call the standard stack takes over and that call bills standard. */
771
+ set(params: LlmSetParams, opts?: RequestOptions): Promise<LlmSetResponse>;
772
+ /** Current LLM configuration. The provider key is never included. */
773
+ get(opts?: RequestOptions): Promise<LlmConfig>;
774
+ /** Disconnect. Calls return to the standard stack and rate from the next call. */
775
+ delete(opts?: RequestOptions): Promise<LlmDeleteResponse>;
776
+ }
777
+ declare class Tts {
778
+ private readonly http;
779
+ constructor(http: HttpClient);
780
+ /** Connect your voice provider (elevenlabs or cartesia). Verified BEFORE
781
+ * saving with one real synthesis using the exact voice ID. Phone calls only -
782
+ * web calls keep the standard voice. Calls your voice serves bill at a
783
+ * $0.02/min discount; on failure the standard voice takes over and that call
784
+ * bills the standard TTS rate. */
785
+ set(params: TtsSetParams, opts?: RequestOptions): Promise<TtsSetResponse>;
786
+ /** Current TTS configuration. The provider key is never included. */
787
+ get(opts?: RequestOptions): Promise<TtsConfig>;
788
+ /** Disconnect. Calls return to the standard voice and rate from the next call. */
789
+ delete(opts?: RequestOptions): Promise<TtsDeleteResponse>;
790
+ }
791
+
666
792
  declare class Webhooks {
667
793
  private readonly http;
668
794
  constructor(http: HttpClient);
@@ -752,6 +878,12 @@ declare class Nixflex {
752
878
  readonly usage: UsageResource;
753
879
  /** Per-number post-call webhook configuration. */
754
880
  readonly webhooks: Webhooks;
881
+ /** Your own S3-compatible recording storage (data residency). */
882
+ readonly storage: Storage;
883
+ /** Your own LLM (OpenAI-compatible endpoint, verified with tool-calling probe). */
884
+ readonly llm: Llm;
885
+ /** Your own TTS (elevenlabs/cartesia, verified with a real synthesis). */
886
+ readonly tts: Tts;
755
887
  constructor(options: NixflexClientOptions);
756
888
  /** Create a brand-new API key (unauthenticated signup endpoint - most
757
889
  * developers use the dashboard instead). The key_secret is shown ONCE.
@@ -762,4 +894,4 @@ declare class Nixflex {
762
894
  }, baseUrl?: string): Promise<KeyCreateResponse>;
763
895
  }
764
896
 
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 };
897
+ 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 LlmConfig, type LlmDeleteResponse, type LlmSetParams, type LlmSetResponse, 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 TtsConfig, type TtsDeleteResponse, type TtsProvider, type TtsSetParams, type TtsSetResponse, type Usage, type VerifyOptions, type WebCallsToggleResponse, type WebhookConfigResponse, type Weekday, Nixflex as default, errorFromResponse, verifyWebhookSignature };
package/dist/index.js CHANGED
@@ -429,6 +429,71 @@ 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
+ };
454
+ var Llm = class {
455
+ constructor(http) {
456
+ this.http = http;
457
+ }
458
+ http;
459
+ /** Connect an OpenAI-compatible model. Verified BEFORE saving with a real
460
+ * completion + a tool-calling round trip (models without tool calling are
461
+ * refused). Calls your model serves bill at a $0.015/min discount; if it
462
+ * fails on a call the standard stack takes over and that call bills standard. */
463
+ set(params, opts) {
464
+ return this.http.request("PUT", "/account/llm", params, void 0, opts);
465
+ }
466
+ /** Current LLM configuration. The provider key is never included. */
467
+ get(opts) {
468
+ return this.http.request("GET", "/account/llm", void 0, void 0, opts);
469
+ }
470
+ /** Disconnect. Calls return to the standard stack and rate from the next call. */
471
+ delete(opts) {
472
+ return this.http.request("DELETE", "/account/llm", void 0, void 0, opts);
473
+ }
474
+ };
475
+ var Tts = class {
476
+ constructor(http) {
477
+ this.http = http;
478
+ }
479
+ http;
480
+ /** Connect your voice provider (elevenlabs or cartesia). Verified BEFORE
481
+ * saving with one real synthesis using the exact voice ID. Phone calls only -
482
+ * web calls keep the standard voice. Calls your voice serves bill at a
483
+ * $0.02/min discount; on failure the standard voice takes over and that call
484
+ * bills the standard TTS rate. */
485
+ set(params, opts) {
486
+ return this.http.request("PUT", "/account/tts", params, void 0, opts);
487
+ }
488
+ /** Current TTS configuration. The provider key is never included. */
489
+ get(opts) {
490
+ return this.http.request("GET", "/account/tts", void 0, void 0, opts);
491
+ }
492
+ /** Disconnect. Calls return to the standard voice and rate from the next call. */
493
+ delete(opts) {
494
+ return this.http.request("DELETE", "/account/tts", void 0, void 0, opts);
495
+ }
496
+ };
432
497
  var Webhooks = class {
433
498
  constructor(http) {
434
499
  this.http = http;
@@ -476,6 +541,12 @@ var Nixflex = class {
476
541
  usage;
477
542
  /** Per-number post-call webhook configuration. */
478
543
  webhooks;
544
+ /** Your own S3-compatible recording storage (data residency). */
545
+ storage;
546
+ /** Your own LLM (OpenAI-compatible endpoint, verified with tool-calling probe). */
547
+ llm;
548
+ /** Your own TTS (elevenlabs/cartesia, verified with a real synthesis). */
549
+ tts;
479
550
  constructor(options) {
480
551
  const http = new HttpClient(options);
481
552
  this.agents = new Agents(http);
@@ -486,6 +557,9 @@ var Nixflex = class {
486
557
  this.keys = new Keys(http);
487
558
  this.usage = new UsageResource(http);
488
559
  this.webhooks = new Webhooks(http);
560
+ this.storage = new Storage(http);
561
+ this.llm = new Llm(http);
562
+ this.tts = new Tts(http);
489
563
  }
490
564
  /** Create a brand-new API key (unauthenticated signup endpoint - most
491
565
  * 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.5.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",