lua-cli 3.29.1 → 3.30.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/dist/api-exports.d.ts +165 -36
- package/dist/api-exports.js +48 -0
- package/dist/api-exports.js.map +1 -1
- package/dist/index.js +72 -9
- package/dist/index.js.map +1 -1
- package/dist/voice/test/index.d.ts +36 -36
- package/docs/README.md +2 -2
- package/package.json +3 -3
- package/template/package.json +1 -1
package/dist/api-exports.d.ts
CHANGED
|
@@ -934,6 +934,31 @@ export declare interface ChannelsApi {
|
|
|
934
934
|
*/
|
|
935
935
|
send(input: EmailSendInput): Promise<ChannelSendOutput>;
|
|
936
936
|
};
|
|
937
|
+
/**
|
|
938
|
+
* Read the delivery status of one outbound message.
|
|
939
|
+
*
|
|
940
|
+
* Pass the `deliveryId` any send returned. The record moves
|
|
941
|
+
* `queued -> accepted -> sent -> delivered -> read`, or terminates on
|
|
942
|
+
* `failed`, and a failure carries a canonical `error.category`, the vendor
|
|
943
|
+
* code and a remediation link.
|
|
944
|
+
*
|
|
945
|
+
* @example
|
|
946
|
+
* ```typescript
|
|
947
|
+
* const sent = await Channels.send({ channel: 'whatsapp', to: { phoneNumber: '+15551234567' }, text: 'Hi' });
|
|
948
|
+
* const delivery = await Channels.getStatus(sent.deliveryId);
|
|
949
|
+
* if (delivery.status === 'failed') console.error(delivery.error?.category, delivery.error?.title);
|
|
950
|
+
* ```
|
|
951
|
+
*/
|
|
952
|
+
getStatus(deliveryId: string): Promise<DeliveryView>;
|
|
953
|
+
/**
|
|
954
|
+
* List the agent's recent deliveries, newest first.
|
|
955
|
+
*
|
|
956
|
+
* @example
|
|
957
|
+
* ```typescript
|
|
958
|
+
* const failures = await Channels.listDeliveries({ status: 'failed', since: '2026-09-01T00:00:00Z', limit: 50 });
|
|
959
|
+
* ```
|
|
960
|
+
*/
|
|
961
|
+
listDeliveries(filter?: DeliveryListFilter): Promise<DeliveryView[]>;
|
|
937
962
|
}
|
|
938
963
|
|
|
939
964
|
export declare type ChannelSendChannel = (typeof CHANNEL_SEND_CHANNELS)[number];
|
|
@@ -971,6 +996,18 @@ export declare interface ChannelSendOptions {
|
|
|
971
996
|
* `warning` — never an error status for a delivered message.
|
|
972
997
|
*/
|
|
973
998
|
export declare interface ChannelSendOutput {
|
|
999
|
+
/** Delivery record id. Stable across the send's whole lifecycle; query it for status. */
|
|
1000
|
+
deliveryId: string;
|
|
1001
|
+
/**
|
|
1002
|
+
* Where the delivery stands the moment the send returns. `queued` means the
|
|
1003
|
+
* WhatsApp window was closed and the text flushes when the user replies.
|
|
1004
|
+
* Receipts move it further (delivered, read, failed) after this call.
|
|
1005
|
+
*
|
|
1006
|
+
* A live send returns `queued`, `accepted` or `sent`. Replaying an
|
|
1007
|
+
* `X-Idempotency-Key` returns wherever the first send's delivery has since
|
|
1008
|
+
* got to, so any status is possible there.
|
|
1009
|
+
*/
|
|
1010
|
+
status: DeliveryStatus;
|
|
974
1011
|
delivered: boolean;
|
|
975
1012
|
/** False for conversation-scoped sends: a shared conversation has no single
|
|
976
1013
|
* user to attribute the message to, so nothing is written to agent memory. */
|
|
@@ -1543,6 +1580,98 @@ declare interface DeleteProductResponse {
|
|
|
1543
1580
|
deleted: boolean;
|
|
1544
1581
|
}
|
|
1545
1582
|
|
|
1583
|
+
/** Canonical, cross-vendor failure reason. Vendor codes map onto these. */
|
|
1584
|
+
declare const DELIVERY_ERROR_CATEGORIES: readonly ["window_closed", "unreachable", "billing", "opted_out", "throttled", "auth", "template", "media", "invalid_request", "compliance", "experiment", "provider", "unknown"];
|
|
1585
|
+
|
|
1586
|
+
declare const DELIVERY_ORIGINS: readonly ["agent_reply", "channels_send", "template", "system_template", "queued_flush", "admin_template", "notification", "unknown"];
|
|
1587
|
+
|
|
1588
|
+
declare const DELIVERY_PROVIDERS: readonly ["meta", "vonage", "bird", "ses", "agentmail", "slack", "front", "teams", "pusher"];
|
|
1589
|
+
|
|
1590
|
+
/**
|
|
1591
|
+
* Outbound delivery record contracts.
|
|
1592
|
+
*
|
|
1593
|
+
* One outbound message is one delivery document moving through a monotone
|
|
1594
|
+
* status rank with a single terminal failure. Vendor callbacks are normalised
|
|
1595
|
+
* into `ProviderStatusUpdate` by a per-provider mapper, so vendor vocabulary
|
|
1596
|
+
* stops at the mapper and everything downstream speaks these types.
|
|
1597
|
+
*/
|
|
1598
|
+
declare const DELIVERY_STATUSES: readonly ["queued", "accepted", "sent", "delivered", "read", "failed", "expired"];
|
|
1599
|
+
|
|
1600
|
+
export declare interface DeliveryError {
|
|
1601
|
+
category: DeliveryErrorCategory;
|
|
1602
|
+
provider: DeliveryProvider;
|
|
1603
|
+
/** Vendor code as a string. '131042', '1240', 'Permanent/General'. */
|
|
1604
|
+
code: string;
|
|
1605
|
+
title: string;
|
|
1606
|
+
detail?: string;
|
|
1607
|
+
href?: string;
|
|
1608
|
+
retryable: boolean;
|
|
1609
|
+
owner: DeliveryErrorOwner;
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1612
|
+
export declare type DeliveryErrorCategory = (typeof DELIVERY_ERROR_CATEGORIES)[number];
|
|
1613
|
+
|
|
1614
|
+
/** Who has to act on a failure. Drives the operator surface, not retry logic. */
|
|
1615
|
+
declare type DeliveryErrorOwner = 'customer' | 'recipient' | 'lua' | 'vendor';
|
|
1616
|
+
|
|
1617
|
+
declare type DeliveryEventSource = 'send' | 'callback' | 'sweep';
|
|
1618
|
+
|
|
1619
|
+
declare interface DeliveryEventView {
|
|
1620
|
+
status: DeliveryStatus;
|
|
1621
|
+
at: string;
|
|
1622
|
+
source: DeliveryEventSource;
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1625
|
+
/** Query filter accepted by the delivery list read APIs. */
|
|
1626
|
+
export declare interface DeliveryListFilter {
|
|
1627
|
+
userId?: string;
|
|
1628
|
+
status?: DeliveryStatus;
|
|
1629
|
+
channel?: string;
|
|
1630
|
+
/** Only deliveries created at or after this instant. */
|
|
1631
|
+
since?: string | Date;
|
|
1632
|
+
/** 1..200, defaults to 50. */
|
|
1633
|
+
limit?: number;
|
|
1634
|
+
}
|
|
1635
|
+
|
|
1636
|
+
declare type DeliveryOrigin = (typeof DELIVERY_ORIGINS)[number];
|
|
1637
|
+
|
|
1638
|
+
/** Vendor-reported cost metadata. Meta only today. */
|
|
1639
|
+
declare interface DeliveryPricing {
|
|
1640
|
+
billable: boolean;
|
|
1641
|
+
category?: string;
|
|
1642
|
+
model?: string;
|
|
1643
|
+
}
|
|
1644
|
+
|
|
1645
|
+
declare type DeliveryProvider = (typeof DELIVERY_PROVIDERS)[number];
|
|
1646
|
+
|
|
1647
|
+
export declare type DeliveryStatus = (typeof DELIVERY_STATUSES)[number];
|
|
1648
|
+
|
|
1649
|
+
/** Wire shape of a delivery as returned by read APIs (dates as ISO strings). */
|
|
1650
|
+
export declare interface DeliveryView {
|
|
1651
|
+
id: string;
|
|
1652
|
+
agentId: string;
|
|
1653
|
+
userId?: string;
|
|
1654
|
+
/** `ChannelSendChannel | 'rcs' | 'messagebird' | 'slack' | 'front' | 'webchat' | 'sms'`. */
|
|
1655
|
+
channel: string;
|
|
1656
|
+
provider: DeliveryProvider;
|
|
1657
|
+
channelIdentifier: string;
|
|
1658
|
+
recipient: string;
|
|
1659
|
+
providerMessageId?: string;
|
|
1660
|
+
conversationMessageId?: string;
|
|
1661
|
+
origin: DeliveryOrigin;
|
|
1662
|
+
templateName?: string;
|
|
1663
|
+
idempotencyKey?: string;
|
|
1664
|
+
status: DeliveryStatus;
|
|
1665
|
+
error?: DeliveryError;
|
|
1666
|
+
events: DeliveryEventView[];
|
|
1667
|
+
pricing?: DeliveryPricing;
|
|
1668
|
+
createdAt: string;
|
|
1669
|
+
updatedAt: string;
|
|
1670
|
+
deliveredAt?: string;
|
|
1671
|
+
readAt?: string;
|
|
1672
|
+
failedAt?: string;
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1546
1675
|
/** Configuration for a single device command (agent → device) */
|
|
1547
1676
|
export declare interface DeviceCommandConfig {
|
|
1548
1677
|
/** Description of what this command does */
|
|
@@ -3485,14 +3614,14 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3485
3614
|
*/
|
|
3486
3615
|
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
3487
3616
|
}, "strip", z.ZodTypeAny, {
|
|
3617
|
+
provider?: "deepgram" | "elevenlabs";
|
|
3488
3618
|
options?: Record<string, unknown>;
|
|
3489
3619
|
kind?: "plugin";
|
|
3490
|
-
provider?: "deepgram" | "elevenlabs";
|
|
3491
3620
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
3492
3621
|
}, {
|
|
3622
|
+
provider?: "deepgram" | "elevenlabs";
|
|
3493
3623
|
options?: Record<string, unknown>;
|
|
3494
3624
|
kind?: "plugin";
|
|
3495
|
-
provider?: "deepgram" | "elevenlabs";
|
|
3496
3625
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
3497
3626
|
}>, z.ZodObject<{
|
|
3498
3627
|
kind: z.ZodLiteral<"realtime">;
|
|
@@ -3505,13 +3634,13 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3505
3634
|
*/
|
|
3506
3635
|
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
3507
3636
|
}, "strip", z.ZodTypeAny, {
|
|
3637
|
+
provider?: "google" | "xai" | "openai";
|
|
3508
3638
|
options?: Record<string, unknown>;
|
|
3509
3639
|
kind?: "realtime";
|
|
3510
|
-
provider?: "google" | "xai" | "openai";
|
|
3511
3640
|
}, {
|
|
3641
|
+
provider?: "google" | "xai" | "openai";
|
|
3512
3642
|
options?: Record<string, unknown>;
|
|
3513
3643
|
kind?: "realtime";
|
|
3514
|
-
provider?: "google" | "xai" | "openai";
|
|
3515
3644
|
}>]>;
|
|
3516
3645
|
stt: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
3517
3646
|
kind: z.ZodLiteral<"inference">;
|
|
@@ -3551,14 +3680,14 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3551
3680
|
*/
|
|
3552
3681
|
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
3553
3682
|
}, "strip", z.ZodTypeAny, {
|
|
3683
|
+
provider?: "deepgram" | "elevenlabs";
|
|
3554
3684
|
options?: Record<string, unknown>;
|
|
3555
3685
|
kind?: "plugin";
|
|
3556
|
-
provider?: "deepgram" | "elevenlabs";
|
|
3557
3686
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
3558
3687
|
}, {
|
|
3688
|
+
provider?: "deepgram" | "elevenlabs";
|
|
3559
3689
|
options?: Record<string, unknown>;
|
|
3560
3690
|
kind?: "plugin";
|
|
3561
|
-
provider?: "deepgram" | "elevenlabs";
|
|
3562
3691
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
3563
3692
|
}>, z.ZodObject<{
|
|
3564
3693
|
kind: z.ZodLiteral<"realtime">;
|
|
@@ -3571,13 +3700,13 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3571
3700
|
*/
|
|
3572
3701
|
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
3573
3702
|
}, "strip", z.ZodTypeAny, {
|
|
3703
|
+
provider?: "google" | "xai" | "openai";
|
|
3574
3704
|
options?: Record<string, unknown>;
|
|
3575
3705
|
kind?: "realtime";
|
|
3576
|
-
provider?: "google" | "xai" | "openai";
|
|
3577
3706
|
}, {
|
|
3707
|
+
provider?: "google" | "xai" | "openai";
|
|
3578
3708
|
options?: Record<string, unknown>;
|
|
3579
3709
|
kind?: "realtime";
|
|
3580
|
-
provider?: "google" | "xai" | "openai";
|
|
3581
3710
|
}>]>>;
|
|
3582
3711
|
tts: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
3583
3712
|
kind: z.ZodLiteral<"inference">;
|
|
@@ -3617,14 +3746,14 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3617
3746
|
*/
|
|
3618
3747
|
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
3619
3748
|
}, "strip", z.ZodTypeAny, {
|
|
3749
|
+
provider?: "deepgram" | "elevenlabs";
|
|
3620
3750
|
options?: Record<string, unknown>;
|
|
3621
3751
|
kind?: "plugin";
|
|
3622
|
-
provider?: "deepgram" | "elevenlabs";
|
|
3623
3752
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
3624
3753
|
}, {
|
|
3754
|
+
provider?: "deepgram" | "elevenlabs";
|
|
3625
3755
|
options?: Record<string, unknown>;
|
|
3626
3756
|
kind?: "plugin";
|
|
3627
|
-
provider?: "deepgram" | "elevenlabs";
|
|
3628
3757
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
3629
3758
|
}>, z.ZodObject<{
|
|
3630
3759
|
kind: z.ZodLiteral<"realtime">;
|
|
@@ -3637,13 +3766,13 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3637
3766
|
*/
|
|
3638
3767
|
options: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
3639
3768
|
}, "strip", z.ZodTypeAny, {
|
|
3769
|
+
provider?: "google" | "xai" | "openai";
|
|
3640
3770
|
options?: Record<string, unknown>;
|
|
3641
3771
|
kind?: "realtime";
|
|
3642
|
-
provider?: "google" | "xai" | "openai";
|
|
3643
3772
|
}, {
|
|
3773
|
+
provider?: "google" | "xai" | "openai";
|
|
3644
3774
|
options?: Record<string, unknown>;
|
|
3645
3775
|
kind?: "realtime";
|
|
3646
|
-
provider?: "google" | "xai" | "openai";
|
|
3647
3776
|
}>]>>;
|
|
3648
3777
|
vad: z.ZodOptional<z.ZodString>;
|
|
3649
3778
|
vadOptions: z.ZodOptional<z.ZodObject<{
|
|
@@ -3809,14 +3938,14 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3809
3938
|
kind?: "inference";
|
|
3810
3939
|
model?: string;
|
|
3811
3940
|
} | {
|
|
3941
|
+
provider?: "deepgram" | "elevenlabs";
|
|
3812
3942
|
options?: Record<string, unknown>;
|
|
3813
3943
|
kind?: "plugin";
|
|
3814
|
-
provider?: "deepgram" | "elevenlabs";
|
|
3815
3944
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
3816
3945
|
} | {
|
|
3946
|
+
provider?: "google" | "xai" | "openai";
|
|
3817
3947
|
options?: Record<string, unknown>;
|
|
3818
3948
|
kind?: "realtime";
|
|
3819
|
-
provider?: "google" | "xai" | "openai";
|
|
3820
3949
|
};
|
|
3821
3950
|
volume?: number;
|
|
3822
3951
|
llm?: {
|
|
@@ -3825,14 +3954,14 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3825
3954
|
kind?: "inference";
|
|
3826
3955
|
model?: string;
|
|
3827
3956
|
} | {
|
|
3957
|
+
provider?: "deepgram" | "elevenlabs";
|
|
3828
3958
|
options?: Record<string, unknown>;
|
|
3829
3959
|
kind?: "plugin";
|
|
3830
|
-
provider?: "deepgram" | "elevenlabs";
|
|
3831
3960
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
3832
3961
|
} | {
|
|
3962
|
+
provider?: "google" | "xai" | "openai";
|
|
3833
3963
|
options?: Record<string, unknown>;
|
|
3834
3964
|
kind?: "realtime";
|
|
3835
|
-
provider?: "google" | "xai" | "openai";
|
|
3836
3965
|
};
|
|
3837
3966
|
tts?: {
|
|
3838
3967
|
voice?: string;
|
|
@@ -3840,14 +3969,14 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3840
3969
|
kind?: "inference";
|
|
3841
3970
|
model?: string;
|
|
3842
3971
|
} | {
|
|
3972
|
+
provider?: "deepgram" | "elevenlabs";
|
|
3843
3973
|
options?: Record<string, unknown>;
|
|
3844
3974
|
kind?: "plugin";
|
|
3845
|
-
provider?: "deepgram" | "elevenlabs";
|
|
3846
3975
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
3847
3976
|
} | {
|
|
3977
|
+
provider?: "google" | "xai" | "openai";
|
|
3848
3978
|
options?: Record<string, unknown>;
|
|
3849
3979
|
kind?: "realtime";
|
|
3850
|
-
provider?: "google" | "xai" | "openai";
|
|
3851
3980
|
};
|
|
3852
3981
|
vadOptions?: {
|
|
3853
3982
|
minSpeechDuration?: number;
|
|
@@ -3903,14 +4032,14 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3903
4032
|
kind?: "inference";
|
|
3904
4033
|
model?: string;
|
|
3905
4034
|
} | {
|
|
4035
|
+
provider?: "deepgram" | "elevenlabs";
|
|
3906
4036
|
options?: Record<string, unknown>;
|
|
3907
4037
|
kind?: "plugin";
|
|
3908
|
-
provider?: "deepgram" | "elevenlabs";
|
|
3909
4038
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
3910
4039
|
} | {
|
|
4040
|
+
provider?: "google" | "xai" | "openai";
|
|
3911
4041
|
options?: Record<string, unknown>;
|
|
3912
4042
|
kind?: "realtime";
|
|
3913
|
-
provider?: "google" | "xai" | "openai";
|
|
3914
4043
|
};
|
|
3915
4044
|
volume?: number;
|
|
3916
4045
|
llm?: {
|
|
@@ -3919,14 +4048,14 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3919
4048
|
kind?: "inference";
|
|
3920
4049
|
model?: string;
|
|
3921
4050
|
} | {
|
|
4051
|
+
provider?: "deepgram" | "elevenlabs";
|
|
3922
4052
|
options?: Record<string, unknown>;
|
|
3923
4053
|
kind?: "plugin";
|
|
3924
|
-
provider?: "deepgram" | "elevenlabs";
|
|
3925
4054
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
3926
4055
|
} | {
|
|
4056
|
+
provider?: "google" | "xai" | "openai";
|
|
3927
4057
|
options?: Record<string, unknown>;
|
|
3928
4058
|
kind?: "realtime";
|
|
3929
|
-
provider?: "google" | "xai" | "openai";
|
|
3930
4059
|
};
|
|
3931
4060
|
tts?: {
|
|
3932
4061
|
voice?: string;
|
|
@@ -3934,14 +4063,14 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3934
4063
|
kind?: "inference";
|
|
3935
4064
|
model?: string;
|
|
3936
4065
|
} | {
|
|
4066
|
+
provider?: "deepgram" | "elevenlabs";
|
|
3937
4067
|
options?: Record<string, unknown>;
|
|
3938
4068
|
kind?: "plugin";
|
|
3939
|
-
provider?: "deepgram" | "elevenlabs";
|
|
3940
4069
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
3941
4070
|
} | {
|
|
4071
|
+
provider?: "google" | "xai" | "openai";
|
|
3942
4072
|
options?: Record<string, unknown>;
|
|
3943
4073
|
kind?: "realtime";
|
|
3944
|
-
provider?: "google" | "xai" | "openai";
|
|
3945
4074
|
};
|
|
3946
4075
|
vadOptions?: {
|
|
3947
4076
|
minSpeechDuration?: number;
|
|
@@ -3997,14 +4126,14 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3997
4126
|
kind?: "inference";
|
|
3998
4127
|
model?: string;
|
|
3999
4128
|
} | {
|
|
4129
|
+
provider?: "deepgram" | "elevenlabs";
|
|
4000
4130
|
options?: Record<string, unknown>;
|
|
4001
4131
|
kind?: "plugin";
|
|
4002
|
-
provider?: "deepgram" | "elevenlabs";
|
|
4003
4132
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4004
4133
|
} | {
|
|
4134
|
+
provider?: "google" | "xai" | "openai";
|
|
4005
4135
|
options?: Record<string, unknown>;
|
|
4006
4136
|
kind?: "realtime";
|
|
4007
|
-
provider?: "google" | "xai" | "openai";
|
|
4008
4137
|
};
|
|
4009
4138
|
volume?: number;
|
|
4010
4139
|
llm?: {
|
|
@@ -4013,14 +4142,14 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4013
4142
|
kind?: "inference";
|
|
4014
4143
|
model?: string;
|
|
4015
4144
|
} | {
|
|
4145
|
+
provider?: "deepgram" | "elevenlabs";
|
|
4016
4146
|
options?: Record<string, unknown>;
|
|
4017
4147
|
kind?: "plugin";
|
|
4018
|
-
provider?: "deepgram" | "elevenlabs";
|
|
4019
4148
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4020
4149
|
} | {
|
|
4150
|
+
provider?: "google" | "xai" | "openai";
|
|
4021
4151
|
options?: Record<string, unknown>;
|
|
4022
4152
|
kind?: "realtime";
|
|
4023
|
-
provider?: "google" | "xai" | "openai";
|
|
4024
4153
|
};
|
|
4025
4154
|
tts?: {
|
|
4026
4155
|
voice?: string;
|
|
@@ -4028,14 +4157,14 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4028
4157
|
kind?: "inference";
|
|
4029
4158
|
model?: string;
|
|
4030
4159
|
} | {
|
|
4160
|
+
provider?: "deepgram" | "elevenlabs";
|
|
4031
4161
|
options?: Record<string, unknown>;
|
|
4032
4162
|
kind?: "plugin";
|
|
4033
|
-
provider?: "deepgram" | "elevenlabs";
|
|
4034
4163
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4035
4164
|
} | {
|
|
4165
|
+
provider?: "google" | "xai" | "openai";
|
|
4036
4166
|
options?: Record<string, unknown>;
|
|
4037
4167
|
kind?: "realtime";
|
|
4038
|
-
provider?: "google" | "xai" | "openai";
|
|
4039
4168
|
};
|
|
4040
4169
|
vadOptions?: {
|
|
4041
4170
|
minSpeechDuration?: number;
|
|
@@ -4091,14 +4220,14 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4091
4220
|
kind?: "inference";
|
|
4092
4221
|
model?: string;
|
|
4093
4222
|
} | {
|
|
4223
|
+
provider?: "deepgram" | "elevenlabs";
|
|
4094
4224
|
options?: Record<string, unknown>;
|
|
4095
4225
|
kind?: "plugin";
|
|
4096
|
-
provider?: "deepgram" | "elevenlabs";
|
|
4097
4226
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4098
4227
|
} | {
|
|
4228
|
+
provider?: "google" | "xai" | "openai";
|
|
4099
4229
|
options?: Record<string, unknown>;
|
|
4100
4230
|
kind?: "realtime";
|
|
4101
|
-
provider?: "google" | "xai" | "openai";
|
|
4102
4231
|
};
|
|
4103
4232
|
volume?: number;
|
|
4104
4233
|
llm?: {
|
|
@@ -4107,14 +4236,14 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4107
4236
|
kind?: "inference";
|
|
4108
4237
|
model?: string;
|
|
4109
4238
|
} | {
|
|
4239
|
+
provider?: "deepgram" | "elevenlabs";
|
|
4110
4240
|
options?: Record<string, unknown>;
|
|
4111
4241
|
kind?: "plugin";
|
|
4112
|
-
provider?: "deepgram" | "elevenlabs";
|
|
4113
4242
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4114
4243
|
} | {
|
|
4244
|
+
provider?: "google" | "xai" | "openai";
|
|
4115
4245
|
options?: Record<string, unknown>;
|
|
4116
4246
|
kind?: "realtime";
|
|
4117
|
-
provider?: "google" | "xai" | "openai";
|
|
4118
4247
|
};
|
|
4119
4248
|
tts?: {
|
|
4120
4249
|
voice?: string;
|
|
@@ -4122,14 +4251,14 @@ declare const LuaVoiceConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
|
4122
4251
|
kind?: "inference";
|
|
4123
4252
|
model?: string;
|
|
4124
4253
|
} | {
|
|
4254
|
+
provider?: "deepgram" | "elevenlabs";
|
|
4125
4255
|
options?: Record<string, unknown>;
|
|
4126
4256
|
kind?: "plugin";
|
|
4127
|
-
provider?: "deepgram" | "elevenlabs";
|
|
4128
4257
|
class?: "LLM" | "STT" | "STTv2" | "TTS";
|
|
4129
4258
|
} | {
|
|
4259
|
+
provider?: "google" | "xai" | "openai";
|
|
4130
4260
|
options?: Record<string, unknown>;
|
|
4131
4261
|
kind?: "realtime";
|
|
4132
|
-
provider?: "google" | "xai" | "openai";
|
|
4133
4262
|
};
|
|
4134
4263
|
vadOptions?: {
|
|
4135
4264
|
minSpeechDuration?: number;
|
package/dist/api-exports.js
CHANGED
|
@@ -6560,11 +6560,22 @@ var init_voice_api_service = __esm({
|
|
|
6560
6560
|
});
|
|
6561
6561
|
|
|
6562
6562
|
// src/api/channels-send.api.service.ts
|
|
6563
|
+
function deliveryQuery(filter) {
|
|
6564
|
+
const params = new URLSearchParams();
|
|
6565
|
+
if (filter?.userId) params.set("userId", filter.userId);
|
|
6566
|
+
if (filter?.status) params.set("status", filter.status);
|
|
6567
|
+
if (filter?.channel) params.set("channel", filter.channel);
|
|
6568
|
+
if (filter?.since) params.set("since", new Date(filter.since).toISOString());
|
|
6569
|
+
if (filter?.limit !== void 0) params.set("limit", String(filter.limit));
|
|
6570
|
+
const query = params.toString();
|
|
6571
|
+
return query ? `?${query}` : "";
|
|
6572
|
+
}
|
|
6563
6573
|
var ChannelsSendApiService;
|
|
6564
6574
|
var init_channels_send_api_service = __esm({
|
|
6565
6575
|
"src/api/channels-send.api.service.ts"() {
|
|
6566
6576
|
"use strict";
|
|
6567
6577
|
init_http_client();
|
|
6578
|
+
__name(deliveryQuery, "deliveryQuery");
|
|
6568
6579
|
ChannelsSendApiService = class extends HttpClient {
|
|
6569
6580
|
static {
|
|
6570
6581
|
__name(this, "ChannelsSendApiService");
|
|
@@ -6636,6 +6647,33 @@ var init_channels_send_api_service = __esm({
|
|
|
6636
6647
|
}
|
|
6637
6648
|
return result.data;
|
|
6638
6649
|
}
|
|
6650
|
+
/** GET /developer/agents/:agentId/channels/deliveries/:deliveryId */
|
|
6651
|
+
async getDeliveryStatus(deliveryId) {
|
|
6652
|
+
return this.httpGet(`/developer/agents/${this.agentId}/channels/deliveries/${encodeURIComponent(deliveryId)}`);
|
|
6653
|
+
}
|
|
6654
|
+
/** GET /developer/agents/:agentId/channels/deliveries */
|
|
6655
|
+
async listDeliveries(filter) {
|
|
6656
|
+
return this.httpGet(`/developer/agents/${this.agentId}/channels/deliveries${deliveryQuery(filter)}`);
|
|
6657
|
+
}
|
|
6658
|
+
/** Sandbox helper for a single delivery read. */
|
|
6659
|
+
async getDeliveryStatusForSandbox(deliveryId) {
|
|
6660
|
+
const result = await this.getDeliveryStatus(deliveryId);
|
|
6661
|
+
if (!result.success) {
|
|
6662
|
+
throw new Error(result.error?.message || "Delivery status lookup failed");
|
|
6663
|
+
}
|
|
6664
|
+
if (!result.data) {
|
|
6665
|
+
throw new Error("Delivery status lookup failed: empty response");
|
|
6666
|
+
}
|
|
6667
|
+
return result.data;
|
|
6668
|
+
}
|
|
6669
|
+
/** Sandbox helper for the delivery list read. */
|
|
6670
|
+
async listDeliveriesForSandbox(filter) {
|
|
6671
|
+
const result = await this.listDeliveries(filter);
|
|
6672
|
+
if (!result.success) {
|
|
6673
|
+
throw new Error(result.error?.message || "Delivery list failed");
|
|
6674
|
+
}
|
|
6675
|
+
return result.data ?? [];
|
|
6676
|
+
}
|
|
6639
6677
|
};
|
|
6640
6678
|
}
|
|
6641
6679
|
});
|
|
@@ -8299,6 +8337,16 @@ var Channels = {
|
|
|
8299
8337
|
const channels = await getChannelsSendInstance2();
|
|
8300
8338
|
return channels.sendEmailForSandbox(input);
|
|
8301
8339
|
}
|
|
8340
|
+
},
|
|
8341
|
+
async getStatus(deliveryId) {
|
|
8342
|
+
const { getChannelsSendInstance: getChannelsSendInstance2 } = await Promise.resolve().then(() => (init_lazy_instances(), lazy_instances_exports));
|
|
8343
|
+
const channels = await getChannelsSendInstance2();
|
|
8344
|
+
return channels.getDeliveryStatusForSandbox(deliveryId);
|
|
8345
|
+
},
|
|
8346
|
+
async listDeliveries(filter) {
|
|
8347
|
+
const { getChannelsSendInstance: getChannelsSendInstance2 } = await Promise.resolve().then(() => (init_lazy_instances(), lazy_instances_exports));
|
|
8348
|
+
const channels = await getChannelsSendInstance2();
|
|
8349
|
+
return channels.listDeliveriesForSandbox(filter);
|
|
8302
8350
|
}
|
|
8303
8351
|
};
|
|
8304
8352
|
var Team = {
|