livekit-server-sdk 2.13.0 → 2.13.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/dist/AccessToken.cjs +7 -0
- package/dist/AccessToken.cjs.map +1 -1
- package/dist/AccessToken.d.cts +8 -3
- package/dist/AccessToken.d.ts +8 -3
- package/dist/AccessToken.d.ts.map +1 -1
- package/dist/AccessToken.js +7 -0
- package/dist/AccessToken.js.map +1 -1
- package/dist/EgressClient.cjs +17 -6
- package/dist/EgressClient.cjs.map +1 -1
- package/dist/EgressClient.d.cts +13 -7
- package/dist/EgressClient.d.ts +12 -6
- package/dist/EgressClient.d.ts.map +1 -1
- package/dist/EgressClient.js +17 -6
- package/dist/EgressClient.js.map +1 -1
- package/dist/SipClient.cjs +5 -1
- package/dist/SipClient.cjs.map +1 -1
- package/dist/SipClient.d.cts +16 -5
- package/dist/SipClient.d.ts +15 -4
- package/dist/SipClient.d.ts.map +1 -1
- package/dist/SipClient.js +5 -1
- package/dist/SipClient.js.map +1 -1
- package/dist/grants.cjs.map +1 -1
- package/dist/grants.d.cts +6 -1
- package/dist/grants.d.ts +5 -0
- package/dist/grants.d.ts.map +1 -1
- package/dist/grants.js.map +1 -1
- package/dist/index.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/AccessToken.ts +11 -3
- package/src/EgressClient.ts +24 -4
- package/src/SipClient.ts +21 -4
- package/src/grants.ts +6 -0
- package/src/index.ts +1 -0
package/src/SipClient.ts
CHANGED
|
@@ -81,6 +81,7 @@ export interface CreateSipInboundTrunkOptions {
|
|
|
81
81
|
export interface CreateSipOutboundTrunkOptions {
|
|
82
82
|
metadata?: string;
|
|
83
83
|
transport: SIPTransport;
|
|
84
|
+
destinationCountry?: string;
|
|
84
85
|
/** @deprecated - use `authUsername` instead */
|
|
85
86
|
auth_username?: string;
|
|
86
87
|
authUsername?: string;
|
|
@@ -146,7 +147,7 @@ export interface CreateSipParticipantOptions {
|
|
|
146
147
|
krispEnabled?: boolean;
|
|
147
148
|
/** If `true`, this will wait until the call is answered before returning. */
|
|
148
149
|
waitUntilAnswered?: boolean;
|
|
149
|
-
/** Optional request timeout in seconds. */
|
|
150
|
+
/** Optional request timeout in seconds. default 60 seconds if waitUntilAnswered is true, otherwise 10 seconds */
|
|
150
151
|
timeout?: number;
|
|
151
152
|
}
|
|
152
153
|
|
|
@@ -176,7 +177,7 @@ export interface SipDispatchRuleUpdateOptions {
|
|
|
176
177
|
attributes?: { [key: string]: string };
|
|
177
178
|
}
|
|
178
179
|
|
|
179
|
-
export interface
|
|
180
|
+
export interface SipInboundTrunkUpdateOptions {
|
|
180
181
|
numbers?: ListUpdate;
|
|
181
182
|
allowedAddresses?: ListUpdate;
|
|
182
183
|
allowedNumbers?: ListUpdate;
|
|
@@ -186,6 +187,17 @@ export interface SipTrunkUpdateOptions {
|
|
|
186
187
|
metadata?: string;
|
|
187
188
|
}
|
|
188
189
|
|
|
190
|
+
export interface SipOutboundTrunkUpdateOptions {
|
|
191
|
+
numbers?: ListUpdate;
|
|
192
|
+
allowedAddresses?: ListUpdate;
|
|
193
|
+
allowedNumbers?: ListUpdate;
|
|
194
|
+
authUsername?: string;
|
|
195
|
+
authPassword?: string;
|
|
196
|
+
destinationCountry?: string;
|
|
197
|
+
name?: string;
|
|
198
|
+
metadata?: string;
|
|
199
|
+
}
|
|
200
|
+
|
|
189
201
|
export interface TransferSipParticipantOptions {
|
|
190
202
|
playDialtone?: boolean;
|
|
191
203
|
headers?: { [key: string]: string };
|
|
@@ -331,6 +343,7 @@ export class SipClient extends ServiceBase {
|
|
|
331
343
|
headers: opts.headers,
|
|
332
344
|
headersToAttributes: opts.headersToAttributes,
|
|
333
345
|
includeHeaders: opts.includeHeaders,
|
|
346
|
+
destinationCountry: opts.destinationCountry,
|
|
334
347
|
}),
|
|
335
348
|
}).toJson();
|
|
336
349
|
|
|
@@ -562,7 +575,7 @@ export class SipClient extends ServiceBase {
|
|
|
562
575
|
*/
|
|
563
576
|
async updateSipInboundTrunkFields(
|
|
564
577
|
sipTrunkId: string,
|
|
565
|
-
fields:
|
|
578
|
+
fields: SipInboundTrunkUpdateOptions,
|
|
566
579
|
): Promise<SIPInboundTrunkInfo> {
|
|
567
580
|
const req = new UpdateSIPInboundTrunkRequest({
|
|
568
581
|
sipTrunkId,
|
|
@@ -621,7 +634,7 @@ export class SipClient extends ServiceBase {
|
|
|
621
634
|
*/
|
|
622
635
|
async updateSipOutboundTrunkFields(
|
|
623
636
|
sipTrunkId: string,
|
|
624
|
-
fields:
|
|
637
|
+
fields: SipOutboundTrunkUpdateOptions,
|
|
625
638
|
): Promise<SIPOutboundTrunkInfo> {
|
|
626
639
|
const req = new UpdateSIPOutboundTrunkRequest({
|
|
627
640
|
sipTrunkId,
|
|
@@ -695,6 +708,10 @@ export class SipClient extends ServiceBase {
|
|
|
695
708
|
opts = {};
|
|
696
709
|
}
|
|
697
710
|
|
|
711
|
+
if (opts.timeout === undefined) {
|
|
712
|
+
opts.timeout = opts.waitUntilAnswered ? 60 : 10;
|
|
713
|
+
}
|
|
714
|
+
|
|
698
715
|
const req = new CreateSIPParticipantRequest({
|
|
699
716
|
sipTrunkId: sipTrunkId,
|
|
700
717
|
sipCallTo: number,
|
package/src/grants.ts
CHANGED
|
@@ -103,11 +103,17 @@ export interface SIPGrant {
|
|
|
103
103
|
call?: boolean;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
+
export interface InferenceGrant {
|
|
107
|
+
/** perform inference */
|
|
108
|
+
perform?: boolean;
|
|
109
|
+
}
|
|
110
|
+
|
|
106
111
|
/** @internal */
|
|
107
112
|
export interface ClaimGrants extends JWTPayload {
|
|
108
113
|
name?: string;
|
|
109
114
|
video?: VideoGrant;
|
|
110
115
|
sip?: SIPGrant;
|
|
116
|
+
inference?: InferenceGrant;
|
|
111
117
|
kind?: string;
|
|
112
118
|
metadata?: string;
|
|
113
119
|
attributes?: Record<string, string>;
|