telnyx 7.18.0 → 7.20.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 +22 -0
- package/README.md +90 -0
- package/client.d.mts +3 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -6
- package/client.d.ts.map +1 -1
- package/client.js +3 -6
- package/client.js.map +1 -1
- package/client.mjs +3 -6
- package/client.mjs.map +1 -1
- package/lib/webhooks.d.mts +1 -1
- package/lib/webhooks.d.mts.map +1 -1
- package/lib/webhooks.d.ts +1 -1
- package/lib/webhooks.d.ts.map +1 -1
- package/lib/webhooks.js +74 -39
- package/lib/webhooks.js.map +1 -1
- package/lib/webhooks.mjs +52 -17
- package/lib/webhooks.mjs.map +1 -1
- package/package.json +3 -5
- package/resources/ai/assistants/assistants.d.mts +49 -20
- package/resources/ai/assistants/assistants.d.mts.map +1 -1
- package/resources/ai/assistants/assistants.d.ts +49 -20
- package/resources/ai/assistants/assistants.d.ts.map +1 -1
- package/resources/ai/assistants/assistants.js.map +1 -1
- package/resources/ai/assistants/assistants.mjs.map +1 -1
- package/resources/calls/actions.d.mts +8 -0
- package/resources/calls/actions.d.mts.map +1 -1
- package/resources/calls/actions.d.ts +8 -0
- package/resources/calls/actions.d.ts.map +1 -1
- package/resources/calls/calls.d.mts +8 -0
- package/resources/calls/calls.d.mts.map +1 -1
- package/resources/calls/calls.d.ts +8 -0
- package/resources/calls/calls.d.ts.map +1 -1
- package/resources/calls/calls.js.map +1 -1
- package/resources/calls/calls.mjs.map +1 -1
- package/resources/credential-connections/actions.d.mts +9 -9
- package/resources/credential-connections/actions.d.mts.map +1 -1
- package/resources/credential-connections/actions.d.ts +9 -9
- package/resources/credential-connections/actions.d.ts.map +1 -1
- package/resources/credential-connections/actions.js +3 -3
- package/resources/credential-connections/actions.mjs +3 -3
- package/resources/credential-connections/credential-connections.d.mts +2 -2
- package/resources/credential-connections/credential-connections.d.ts +2 -2
- package/resources/external-requirements/external-requirements.d.mts +10 -0
- package/resources/external-requirements/external-requirements.d.mts.map +1 -0
- package/resources/external-requirements/external-requirements.d.ts +10 -0
- package/resources/external-requirements/external-requirements.d.ts.map +1 -0
- package/resources/external-requirements/external-requirements.js +17 -0
- package/resources/external-requirements/external-requirements.js.map +1 -0
- package/resources/external-requirements/external-requirements.mjs +12 -0
- package/resources/external-requirements/external-requirements.mjs.map +1 -0
- package/resources/external-requirements/index.d.mts +3 -0
- package/resources/external-requirements/index.d.mts.map +1 -0
- package/resources/external-requirements/index.d.ts +3 -0
- package/resources/external-requirements/index.d.ts.map +1 -0
- package/resources/external-requirements/index.js +9 -0
- package/resources/external-requirements/index.js.map +1 -0
- package/resources/external-requirements/index.mjs +4 -0
- package/resources/external-requirements/index.mjs.map +1 -0
- package/resources/external-requirements/sub-number-orders.d.mts +151 -0
- package/resources/external-requirements/sub-number-orders.d.mts.map +1 -0
- package/resources/external-requirements/sub-number-orders.d.ts +151 -0
- package/resources/external-requirements/sub-number-orders.d.ts.map +1 -0
- package/resources/external-requirements/sub-number-orders.js +61 -0
- package/resources/external-requirements/sub-number-orders.js.map +1 -0
- package/resources/external-requirements/sub-number-orders.mjs +57 -0
- package/resources/external-requirements/sub-number-orders.mjs.map +1 -0
- package/resources/external-requirements.d.mts +2 -0
- package/resources/external-requirements.d.mts.map +1 -0
- package/resources/external-requirements.d.ts +2 -0
- package/resources/external-requirements.d.ts.map +1 -0
- package/resources/external-requirements.js +6 -0
- package/resources/external-requirements.js.map +1 -0
- package/resources/external-requirements.mjs +3 -0
- package/resources/external-requirements.mjs.map +1 -0
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -5
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/outbound-voice-profiles.d.mts +30 -30
- package/resources/outbound-voice-profiles.d.ts +30 -30
- package/resources/uac-connections/actions.d.mts +9 -9
- package/resources/uac-connections/actions.d.mts.map +1 -1
- package/resources/uac-connections/actions.d.ts +9 -9
- package/resources/uac-connections/actions.d.ts.map +1 -1
- package/resources/uac-connections/actions.js +3 -3
- package/resources/uac-connections/actions.mjs +3 -3
- package/resources/webhooks.d.mts +1 -1
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +1 -1
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +4 -11
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +4 -11
- package/resources/webhooks.mjs.map +1 -1
- package/src/client.ts +5 -16
- package/src/lib/webhooks.ts +59 -18
- package/src/resources/ai/assistants/assistants.ts +52 -19
- package/src/resources/calls/actions.ts +9 -0
- package/src/resources/calls/calls.ts +9 -0
- package/src/resources/credential-connections/actions.ts +9 -9
- package/src/resources/credential-connections/credential-connections.ts +2 -2
- package/src/resources/external-requirements/external-requirements.ts +27 -0
- package/src/resources/external-requirements/index.ts +10 -0
- package/src/resources/external-requirements/sub-number-orders.ts +202 -0
- package/src/resources/external-requirements.ts +3 -0
- package/src/resources/index.ts +1 -5
- package/src/resources/outbound-voice-profiles.ts +30 -30
- package/src/resources/uac-connections/actions.ts +9 -9
- package/src/resources/webhooks.ts +5 -11
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/sip-registration-status.d.mts +0 -142
- package/resources/sip-registration-status.d.mts.map +0 -1
- package/resources/sip-registration-status.d.ts +0 -142
- package/resources/sip-registration-status.d.ts.map +0 -1
- package/resources/sip-registration-status.js +0 -32
- package/resources/sip-registration-status.js.map +0 -1
- package/resources/sip-registration-status.mjs +0 -28
- package/resources/sip-registration-status.mjs.map +0 -1
- package/src/resources/sip-registration-status.ts +0 -181
|
@@ -148,8 +148,8 @@ export interface OutboundVoiceProfile {
|
|
|
148
148
|
call_recording?: OutboundCallRecording;
|
|
149
149
|
|
|
150
150
|
/**
|
|
151
|
-
*
|
|
152
|
-
*
|
|
151
|
+
* Specifies the time window and call limits for calls made using this outbound
|
|
152
|
+
* voice profile. Note that all times are UTC in 24-hour clock time.
|
|
153
153
|
*/
|
|
154
154
|
calling_window?: OutboundVoiceProfile.CallingWindow;
|
|
155
155
|
|
|
@@ -228,25 +228,25 @@ export interface OutboundVoiceProfile {
|
|
|
228
228
|
|
|
229
229
|
export namespace OutboundVoiceProfile {
|
|
230
230
|
/**
|
|
231
|
-
*
|
|
232
|
-
*
|
|
231
|
+
* Specifies the time window and call limits for calls made using this outbound
|
|
232
|
+
* voice profile. Note that all times are UTC in 24-hour clock time.
|
|
233
233
|
*/
|
|
234
234
|
export interface CallingWindow {
|
|
235
235
|
/**
|
|
236
|
-
*
|
|
237
|
-
*
|
|
236
|
+
* The maximum number of calls that can be initiated to a single called party (CLD)
|
|
237
|
+
* within the calling window. A null value means no limit.
|
|
238
238
|
*/
|
|
239
239
|
calls_per_cld?: number;
|
|
240
240
|
|
|
241
241
|
/**
|
|
242
|
-
*
|
|
243
|
-
*
|
|
242
|
+
* The UTC time of day (in HH:MM format, 24-hour clock) when calls are no longer
|
|
243
|
+
* allowed to start.
|
|
244
244
|
*/
|
|
245
245
|
end_time?: string;
|
|
246
246
|
|
|
247
247
|
/**
|
|
248
|
-
*
|
|
249
|
-
*
|
|
248
|
+
* The UTC time of day (in HH:MM format, 24-hour clock) when calls are allowed to
|
|
249
|
+
* start.
|
|
250
250
|
*/
|
|
251
251
|
start_time?: string;
|
|
252
252
|
}
|
|
@@ -361,8 +361,8 @@ export interface OutboundVoiceProfileCreateParams {
|
|
|
361
361
|
call_recording?: OutboundCallRecording;
|
|
362
362
|
|
|
363
363
|
/**
|
|
364
|
-
*
|
|
365
|
-
*
|
|
364
|
+
* Specifies the time window and call limits for calls made using this outbound
|
|
365
|
+
* voice profile. Note that all times are UTC in 24-hour clock time.
|
|
366
366
|
*/
|
|
367
367
|
calling_window?: OutboundVoiceProfileCreateParams.CallingWindow;
|
|
368
368
|
|
|
@@ -421,25 +421,25 @@ export interface OutboundVoiceProfileCreateParams {
|
|
|
421
421
|
|
|
422
422
|
export namespace OutboundVoiceProfileCreateParams {
|
|
423
423
|
/**
|
|
424
|
-
*
|
|
425
|
-
*
|
|
424
|
+
* Specifies the time window and call limits for calls made using this outbound
|
|
425
|
+
* voice profile. Note that all times are UTC in 24-hour clock time.
|
|
426
426
|
*/
|
|
427
427
|
export interface CallingWindow {
|
|
428
428
|
/**
|
|
429
|
-
*
|
|
430
|
-
*
|
|
429
|
+
* The maximum number of calls that can be initiated to a single called party (CLD)
|
|
430
|
+
* within the calling window. A null value means no limit.
|
|
431
431
|
*/
|
|
432
432
|
calls_per_cld?: number;
|
|
433
433
|
|
|
434
434
|
/**
|
|
435
|
-
*
|
|
436
|
-
*
|
|
435
|
+
* The UTC time of day (in HH:MM format, 24-hour clock) when calls are no longer
|
|
436
|
+
* allowed to start.
|
|
437
437
|
*/
|
|
438
438
|
end_time?: string;
|
|
439
439
|
|
|
440
440
|
/**
|
|
441
|
-
*
|
|
442
|
-
*
|
|
441
|
+
* The UTC time of day (in HH:MM format, 24-hour clock) when calls are allowed to
|
|
442
|
+
* start.
|
|
443
443
|
*/
|
|
444
444
|
start_time?: string;
|
|
445
445
|
}
|
|
@@ -460,8 +460,8 @@ export interface OutboundVoiceProfileUpdateParams {
|
|
|
460
460
|
call_recording?: OutboundCallRecording;
|
|
461
461
|
|
|
462
462
|
/**
|
|
463
|
-
*
|
|
464
|
-
*
|
|
463
|
+
* Specifies the time window and call limits for calls made using this outbound
|
|
464
|
+
* voice profile.
|
|
465
465
|
*/
|
|
466
466
|
calling_window?: OutboundVoiceProfileUpdateParams.CallingWindow;
|
|
467
467
|
|
|
@@ -520,25 +520,25 @@ export interface OutboundVoiceProfileUpdateParams {
|
|
|
520
520
|
|
|
521
521
|
export namespace OutboundVoiceProfileUpdateParams {
|
|
522
522
|
/**
|
|
523
|
-
*
|
|
524
|
-
*
|
|
523
|
+
* Specifies the time window and call limits for calls made using this outbound
|
|
524
|
+
* voice profile.
|
|
525
525
|
*/
|
|
526
526
|
export interface CallingWindow {
|
|
527
527
|
/**
|
|
528
|
-
*
|
|
529
|
-
*
|
|
528
|
+
* The maximum number of calls that can be initiated to a single called party (CLD)
|
|
529
|
+
* within the calling window. A null value means no limit.
|
|
530
530
|
*/
|
|
531
531
|
calls_per_cld?: number;
|
|
532
532
|
|
|
533
533
|
/**
|
|
534
|
-
*
|
|
535
|
-
*
|
|
534
|
+
* The UTC time of day (in HH:MM format, 24-hour clock) when calls are no longer
|
|
535
|
+
* allowed to start.
|
|
536
536
|
*/
|
|
537
537
|
end_time?: string;
|
|
538
538
|
|
|
539
539
|
/**
|
|
540
|
-
*
|
|
541
|
-
*
|
|
540
|
+
* The UTC time of day (in HH:MM format, 24-hour clock) when calls are allowed to
|
|
541
|
+
* start.
|
|
542
542
|
*/
|
|
543
543
|
start_time?: string;
|
|
544
544
|
}
|
|
@@ -10,9 +10,9 @@ import { path } from '../../internal/utils/path';
|
|
|
10
10
|
*/
|
|
11
11
|
export class Actions extends APIResource {
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* (`
|
|
13
|
+
* Returns the live SIP registration status for a UAC connection. Reports whether
|
|
14
|
+
* the endpoint is currently registered (`status`) and the timestamp of the last
|
|
15
|
+
* SIP registration event (`last_registration`).
|
|
16
16
|
*
|
|
17
17
|
* @example
|
|
18
18
|
* ```ts
|
|
@@ -39,17 +39,17 @@ export namespace ActionCheckRegistrationStatusResponse {
|
|
|
39
39
|
/**
|
|
40
40
|
* The ip used during the SIP connection
|
|
41
41
|
*/
|
|
42
|
-
ip_address?: string;
|
|
42
|
+
ip_address?: string | null;
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
45
|
* ISO 8601 formatted date indicating when the resource was last updated.
|
|
46
46
|
*/
|
|
47
|
-
last_registration?: string;
|
|
47
|
+
last_registration?: string | null;
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
50
|
* The port of the SIP connection
|
|
51
51
|
*/
|
|
52
|
-
port?: number;
|
|
52
|
+
port?: number | null;
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* Identifies the type of the resource.
|
|
@@ -59,7 +59,7 @@ export namespace ActionCheckRegistrationStatusResponse {
|
|
|
59
59
|
/**
|
|
60
60
|
* The user name of the SIP connection
|
|
61
61
|
*/
|
|
62
|
-
sip_username?: string;
|
|
62
|
+
sip_username?: string | null;
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* The current registration status of your SIP connection
|
|
@@ -69,12 +69,12 @@ export namespace ActionCheckRegistrationStatusResponse {
|
|
|
69
69
|
/**
|
|
70
70
|
* The protocol of the SIP connection
|
|
71
71
|
*/
|
|
72
|
-
transport?: string;
|
|
72
|
+
transport?: string | null;
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
75
|
* The user agent of the SIP connection
|
|
76
76
|
*/
|
|
77
|
-
user_agent?: string;
|
|
77
|
+
user_agent?: string | null;
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
|
|
@@ -6,25 +6,19 @@ import * as NumberOrdersAPI from './number-orders';
|
|
|
6
6
|
import * as CallsAPI from './calls/calls';
|
|
7
7
|
import * as MessagesAPI from './messages/messages';
|
|
8
8
|
import * as ThreadsAPI from './email-inboxes/threads/threads';
|
|
9
|
-
import { Webhook } from 'standardwebhooks';
|
|
10
9
|
import { EmailBracketCursorPagination } from '../core/pagination';
|
|
10
|
+
import { unsafeUnwrapWebhook, unwrapWebhook } from '../lib/webhooks';
|
|
11
11
|
|
|
12
12
|
export class Webhooks extends APIResource {
|
|
13
|
-
unwrap(
|
|
13
|
+
async unwrap(
|
|
14
14
|
body: string,
|
|
15
15
|
{ headers, key }: { headers: Record<string, string>; key?: string },
|
|
16
|
-
): UnwrapWebhookEvent {
|
|
17
|
-
|
|
18
|
-
const keyStr: string | null = key === undefined ? this._client.publicKey : key;
|
|
19
|
-
if (keyStr === null) throw new Error('Webhook key must not be null in order to unwrap');
|
|
20
|
-
const wh = new Webhook(keyStr);
|
|
21
|
-
wh.verify(body, headers);
|
|
22
|
-
}
|
|
23
|
-
return JSON.parse(body) as UnwrapWebhookEvent;
|
|
16
|
+
): Promise<UnwrapWebhookEvent> {
|
|
17
|
+
return unwrapWebhook<UnwrapWebhookEvent>(body, { headers, key }, this._client.publicKey);
|
|
24
18
|
}
|
|
25
19
|
|
|
26
20
|
unsafeUnwrap(body: string): UnsafeUnwrapWebhookEvent {
|
|
27
|
-
return
|
|
21
|
+
return unsafeUnwrapWebhook<UnsafeUnwrapWebhookEvent>(body);
|
|
28
22
|
}
|
|
29
23
|
}
|
|
30
24
|
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '7.
|
|
1
|
+
export const VERSION = '7.20.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "7.
|
|
1
|
+
export declare const VERSION = "7.20.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "7.
|
|
1
|
+
export declare const VERSION = "7.20.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '7.
|
|
1
|
+
export const VERSION = '7.20.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../core/resource.mjs";
|
|
2
|
-
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
-
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
-
/**
|
|
5
|
-
* UAC connection operations
|
|
6
|
-
*/
|
|
7
|
-
export declare class SipRegistrationStatus extends APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Returns the live SIP registration status for a Telnyx endpoint: whether it is
|
|
10
|
-
* currently registered, when the current registration expires, and the last
|
|
11
|
-
* response Telnyx received from the registrar.
|
|
12
|
-
*
|
|
13
|
-
* The endpoint supports three credential types, selected with the
|
|
14
|
-
* `credential_type` query parameter. Each type is keyed by a different identifier:
|
|
15
|
-
*
|
|
16
|
-
* | `credential_type` | Keyed by | Use case |
|
|
17
|
-
* | --------------------------- | --------------- | -------------------------------------------------------------------------- |
|
|
18
|
-
* | `uac_external_credential` | `connection_id` | A UAC (SIP attach) connection that registers to an external PBX. |
|
|
19
|
-
* | `telephony_credential` | `username` | An ephemeral, one-time-use telephony credential. |
|
|
20
|
-
* | `sip_credential_connection` | `username` | A traditional SIP credential connection that registers directly to Telnyx. |
|
|
21
|
-
*
|
|
22
|
-
* The authenticated account is taken from your API key; you can only read the
|
|
23
|
-
* registration status of connections and credentials your account owns.
|
|
24
|
-
*/
|
|
25
|
-
retrieve(query: SipRegistrationStatusRetrieveParams, options?: RequestOptions): APIPromise<SipRegistrationStatusRetrieveResponse>;
|
|
26
|
-
}
|
|
27
|
-
export interface SipRegistrationStatusRetrieveResponse {
|
|
28
|
-
/**
|
|
29
|
-
* Identifier of the connection associated with the credential.
|
|
30
|
-
*/
|
|
31
|
-
connection_id?: string;
|
|
32
|
-
/**
|
|
33
|
-
* Human-readable connection name.
|
|
34
|
-
*/
|
|
35
|
-
connection_name?: string;
|
|
36
|
-
/**
|
|
37
|
-
* The credential type that was looked up.
|
|
38
|
-
*/
|
|
39
|
-
credential_type?: 'uac_external_credential' | 'telephony_credential' | 'sip_credential_connection';
|
|
40
|
-
/**
|
|
41
|
-
* SIP username used for the registration.
|
|
42
|
-
*/
|
|
43
|
-
credential_username?: string;
|
|
44
|
-
/**
|
|
45
|
-
* SIP response from the last registration attempt.
|
|
46
|
-
*/
|
|
47
|
-
last_registration_response?: string | null;
|
|
48
|
-
/**
|
|
49
|
-
* True if the endpoint is currently registered.
|
|
50
|
-
*/
|
|
51
|
-
registered?: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* Detailed registration information reported by the registrar. The populated
|
|
54
|
-
* fields depend on `credential_type`: UAC external credentials report
|
|
55
|
-
* `auth_retries`, `uptime`, `next_action_at`, `failures`, and `sip_uri_user_host`;
|
|
56
|
-
* telephony credentials and SIP credential connections report `ua_ip`, `ua_port`,
|
|
57
|
-
* `transport`, and `last_modified`. All types report `expires`.
|
|
58
|
-
*/
|
|
59
|
-
sip_registration_details?: SipRegistrationStatusRetrieveResponse.SipRegistrationDetails;
|
|
60
|
-
/**
|
|
61
|
-
* Human-readable registration status derived from the registrar state.
|
|
62
|
-
*/
|
|
63
|
-
sip_registration_status?: 'unregistering' | 'connection_disabled' | 'standby' | 'failed' | 'trying' | 'registered' | 'unknown';
|
|
64
|
-
}
|
|
65
|
-
export declare namespace SipRegistrationStatusRetrieveResponse {
|
|
66
|
-
/**
|
|
67
|
-
* Detailed registration information reported by the registrar. The populated
|
|
68
|
-
* fields depend on `credential_type`: UAC external credentials report
|
|
69
|
-
* `auth_retries`, `uptime`, `next_action_at`, `failures`, and `sip_uri_user_host`;
|
|
70
|
-
* telephony credentials and SIP credential connections report `ua_ip`, `ua_port`,
|
|
71
|
-
* `transport`, and `last_modified`. All types report `expires`.
|
|
72
|
-
*/
|
|
73
|
-
interface SipRegistrationDetails {
|
|
74
|
-
/**
|
|
75
|
-
* Number of authentication retries on the last attempt (uac_external_credential).
|
|
76
|
-
*/
|
|
77
|
-
auth_retries?: number;
|
|
78
|
-
/**
|
|
79
|
-
* Unix timestamp when the current registration expires.
|
|
80
|
-
*/
|
|
81
|
-
expires?: number;
|
|
82
|
-
/**
|
|
83
|
-
* Count of consecutive registration failures (uac_external_credential).
|
|
84
|
-
*/
|
|
85
|
-
failures?: number;
|
|
86
|
-
/**
|
|
87
|
-
* Timestamp when the registration was last modified (telephony_credential and
|
|
88
|
-
* sip_credential_connection).
|
|
89
|
-
*/
|
|
90
|
-
last_modified?: string;
|
|
91
|
-
/**
|
|
92
|
-
* Unix timestamp of the next scheduled registration action
|
|
93
|
-
* (uac_external_credential).
|
|
94
|
-
*/
|
|
95
|
-
next_action_at?: number;
|
|
96
|
-
/**
|
|
97
|
-
* SIP URI user@host of the registered contact (uac_external_credential).
|
|
98
|
-
*/
|
|
99
|
-
sip_uri_user_host?: string;
|
|
100
|
-
/**
|
|
101
|
-
* Transport used for the registration, e.g. UDP/TCP/TLS (telephony_credential and
|
|
102
|
-
* sip_credential_connection).
|
|
103
|
-
*/
|
|
104
|
-
transport?: string;
|
|
105
|
-
/**
|
|
106
|
-
* IP address of the registered user agent (telephony_credential and
|
|
107
|
-
* sip_credential_connection).
|
|
108
|
-
*/
|
|
109
|
-
ua_ip?: string;
|
|
110
|
-
/**
|
|
111
|
-
* Port of the registered user agent (telephony_credential and
|
|
112
|
-
* sip_credential_connection).
|
|
113
|
-
*/
|
|
114
|
-
ua_port?: number;
|
|
115
|
-
/**
|
|
116
|
-
* Registration uptime reported by the registrar (uac_external_credential).
|
|
117
|
-
*/
|
|
118
|
-
uptime?: number;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
export interface SipRegistrationStatusRetrieveParams {
|
|
122
|
-
/**
|
|
123
|
-
* The kind of credential to look up. `uac_external_credential` is keyed by
|
|
124
|
-
* `connection_id`; `telephony_credential` and `sip_credential_connection` are
|
|
125
|
-
* keyed by `username`.
|
|
126
|
-
*/
|
|
127
|
-
credential_type: 'uac_external_credential' | 'telephony_credential' | 'sip_credential_connection';
|
|
128
|
-
/**
|
|
129
|
-
* Identifier of the UAC connection to look up. Required when `credential_type` is
|
|
130
|
-
* `uac_external_credential`.
|
|
131
|
-
*/
|
|
132
|
-
connection_id?: string;
|
|
133
|
-
/**
|
|
134
|
-
* SIP username to look up. Required when `credential_type` is
|
|
135
|
-
* `telephony_credential` or `sip_credential_connection`.
|
|
136
|
-
*/
|
|
137
|
-
username?: string;
|
|
138
|
-
}
|
|
139
|
-
export declare namespace SipRegistrationStatus {
|
|
140
|
-
export { type SipRegistrationStatusRetrieveResponse as SipRegistrationStatusRetrieveResponse, type SipRegistrationStatusRetrieveParams as SipRegistrationStatusRetrieveParams, };
|
|
141
|
-
}
|
|
142
|
-
//# sourceMappingURL=sip-registration-status.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sip-registration-status.d.mts","sourceRoot":"","sources":["../src/resources/sip-registration-status.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,WAAW;IACpD;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CACN,KAAK,EAAE,mCAAmC,EAC1C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,qCAAqC,CAAC;CAGrD;AAED,MAAM,WAAW,qCAAqC;IACpD;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,eAAe,CAAC,EAAE,yBAAyB,GAAG,sBAAsB,GAAG,2BAA2B,CAAC;IAEnG;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,0BAA0B,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3C;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;;;OAMG;IACH,wBAAwB,CAAC,EAAE,qCAAqC,CAAC,sBAAsB,CAAC;IAExF;;OAEG;IACH,uBAAuB,CAAC,EACpB,eAAe,GACf,qBAAqB,GACrB,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,YAAY,GACZ,SAAS,CAAC;CACf;AAED,yBAAiB,qCAAqC,CAAC;IACrD;;;;;;OAMG;IACH,UAAiB,sBAAsB;QACrC;;WAEG;QACH,YAAY,CAAC,EAAE,MAAM,CAAC;QAEtB;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC;QAElB;;;WAGG;QACH,aAAa,CAAC,EAAE,MAAM,CAAC;QAEvB;;;WAGG;QACH,cAAc,CAAC,EAAE,MAAM,CAAC;QAExB;;WAEG;QACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAE3B;;;WAGG;QACH,SAAS,CAAC,EAAE,MAAM,CAAC;QAEnB;;;WAGG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;QAEf;;;WAGG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB;CACF;AAED,MAAM,WAAW,mCAAmC;IAClD;;;;OAIG;IACH,eAAe,EAAE,yBAAyB,GAAG,sBAAsB,GAAG,2BAA2B,CAAC;IAElG;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,WAAW,qBAAqB,CAAC;IAC7C,OAAO,EACL,KAAK,qCAAqC,IAAI,qCAAqC,EACnF,KAAK,mCAAmC,IAAI,mCAAmC,GAChF,CAAC;CACH"}
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../core/resource.js";
|
|
2
|
-
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
-
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
-
/**
|
|
5
|
-
* UAC connection operations
|
|
6
|
-
*/
|
|
7
|
-
export declare class SipRegistrationStatus extends APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Returns the live SIP registration status for a Telnyx endpoint: whether it is
|
|
10
|
-
* currently registered, when the current registration expires, and the last
|
|
11
|
-
* response Telnyx received from the registrar.
|
|
12
|
-
*
|
|
13
|
-
* The endpoint supports three credential types, selected with the
|
|
14
|
-
* `credential_type` query parameter. Each type is keyed by a different identifier:
|
|
15
|
-
*
|
|
16
|
-
* | `credential_type` | Keyed by | Use case |
|
|
17
|
-
* | --------------------------- | --------------- | -------------------------------------------------------------------------- |
|
|
18
|
-
* | `uac_external_credential` | `connection_id` | A UAC (SIP attach) connection that registers to an external PBX. |
|
|
19
|
-
* | `telephony_credential` | `username` | An ephemeral, one-time-use telephony credential. |
|
|
20
|
-
* | `sip_credential_connection` | `username` | A traditional SIP credential connection that registers directly to Telnyx. |
|
|
21
|
-
*
|
|
22
|
-
* The authenticated account is taken from your API key; you can only read the
|
|
23
|
-
* registration status of connections and credentials your account owns.
|
|
24
|
-
*/
|
|
25
|
-
retrieve(query: SipRegistrationStatusRetrieveParams, options?: RequestOptions): APIPromise<SipRegistrationStatusRetrieveResponse>;
|
|
26
|
-
}
|
|
27
|
-
export interface SipRegistrationStatusRetrieveResponse {
|
|
28
|
-
/**
|
|
29
|
-
* Identifier of the connection associated with the credential.
|
|
30
|
-
*/
|
|
31
|
-
connection_id?: string;
|
|
32
|
-
/**
|
|
33
|
-
* Human-readable connection name.
|
|
34
|
-
*/
|
|
35
|
-
connection_name?: string;
|
|
36
|
-
/**
|
|
37
|
-
* The credential type that was looked up.
|
|
38
|
-
*/
|
|
39
|
-
credential_type?: 'uac_external_credential' | 'telephony_credential' | 'sip_credential_connection';
|
|
40
|
-
/**
|
|
41
|
-
* SIP username used for the registration.
|
|
42
|
-
*/
|
|
43
|
-
credential_username?: string;
|
|
44
|
-
/**
|
|
45
|
-
* SIP response from the last registration attempt.
|
|
46
|
-
*/
|
|
47
|
-
last_registration_response?: string | null;
|
|
48
|
-
/**
|
|
49
|
-
* True if the endpoint is currently registered.
|
|
50
|
-
*/
|
|
51
|
-
registered?: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* Detailed registration information reported by the registrar. The populated
|
|
54
|
-
* fields depend on `credential_type`: UAC external credentials report
|
|
55
|
-
* `auth_retries`, `uptime`, `next_action_at`, `failures`, and `sip_uri_user_host`;
|
|
56
|
-
* telephony credentials and SIP credential connections report `ua_ip`, `ua_port`,
|
|
57
|
-
* `transport`, and `last_modified`. All types report `expires`.
|
|
58
|
-
*/
|
|
59
|
-
sip_registration_details?: SipRegistrationStatusRetrieveResponse.SipRegistrationDetails;
|
|
60
|
-
/**
|
|
61
|
-
* Human-readable registration status derived from the registrar state.
|
|
62
|
-
*/
|
|
63
|
-
sip_registration_status?: 'unregistering' | 'connection_disabled' | 'standby' | 'failed' | 'trying' | 'registered' | 'unknown';
|
|
64
|
-
}
|
|
65
|
-
export declare namespace SipRegistrationStatusRetrieveResponse {
|
|
66
|
-
/**
|
|
67
|
-
* Detailed registration information reported by the registrar. The populated
|
|
68
|
-
* fields depend on `credential_type`: UAC external credentials report
|
|
69
|
-
* `auth_retries`, `uptime`, `next_action_at`, `failures`, and `sip_uri_user_host`;
|
|
70
|
-
* telephony credentials and SIP credential connections report `ua_ip`, `ua_port`,
|
|
71
|
-
* `transport`, and `last_modified`. All types report `expires`.
|
|
72
|
-
*/
|
|
73
|
-
interface SipRegistrationDetails {
|
|
74
|
-
/**
|
|
75
|
-
* Number of authentication retries on the last attempt (uac_external_credential).
|
|
76
|
-
*/
|
|
77
|
-
auth_retries?: number;
|
|
78
|
-
/**
|
|
79
|
-
* Unix timestamp when the current registration expires.
|
|
80
|
-
*/
|
|
81
|
-
expires?: number;
|
|
82
|
-
/**
|
|
83
|
-
* Count of consecutive registration failures (uac_external_credential).
|
|
84
|
-
*/
|
|
85
|
-
failures?: number;
|
|
86
|
-
/**
|
|
87
|
-
* Timestamp when the registration was last modified (telephony_credential and
|
|
88
|
-
* sip_credential_connection).
|
|
89
|
-
*/
|
|
90
|
-
last_modified?: string;
|
|
91
|
-
/**
|
|
92
|
-
* Unix timestamp of the next scheduled registration action
|
|
93
|
-
* (uac_external_credential).
|
|
94
|
-
*/
|
|
95
|
-
next_action_at?: number;
|
|
96
|
-
/**
|
|
97
|
-
* SIP URI user@host of the registered contact (uac_external_credential).
|
|
98
|
-
*/
|
|
99
|
-
sip_uri_user_host?: string;
|
|
100
|
-
/**
|
|
101
|
-
* Transport used for the registration, e.g. UDP/TCP/TLS (telephony_credential and
|
|
102
|
-
* sip_credential_connection).
|
|
103
|
-
*/
|
|
104
|
-
transport?: string;
|
|
105
|
-
/**
|
|
106
|
-
* IP address of the registered user agent (telephony_credential and
|
|
107
|
-
* sip_credential_connection).
|
|
108
|
-
*/
|
|
109
|
-
ua_ip?: string;
|
|
110
|
-
/**
|
|
111
|
-
* Port of the registered user agent (telephony_credential and
|
|
112
|
-
* sip_credential_connection).
|
|
113
|
-
*/
|
|
114
|
-
ua_port?: number;
|
|
115
|
-
/**
|
|
116
|
-
* Registration uptime reported by the registrar (uac_external_credential).
|
|
117
|
-
*/
|
|
118
|
-
uptime?: number;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
export interface SipRegistrationStatusRetrieveParams {
|
|
122
|
-
/**
|
|
123
|
-
* The kind of credential to look up. `uac_external_credential` is keyed by
|
|
124
|
-
* `connection_id`; `telephony_credential` and `sip_credential_connection` are
|
|
125
|
-
* keyed by `username`.
|
|
126
|
-
*/
|
|
127
|
-
credential_type: 'uac_external_credential' | 'telephony_credential' | 'sip_credential_connection';
|
|
128
|
-
/**
|
|
129
|
-
* Identifier of the UAC connection to look up. Required when `credential_type` is
|
|
130
|
-
* `uac_external_credential`.
|
|
131
|
-
*/
|
|
132
|
-
connection_id?: string;
|
|
133
|
-
/**
|
|
134
|
-
* SIP username to look up. Required when `credential_type` is
|
|
135
|
-
* `telephony_credential` or `sip_credential_connection`.
|
|
136
|
-
*/
|
|
137
|
-
username?: string;
|
|
138
|
-
}
|
|
139
|
-
export declare namespace SipRegistrationStatus {
|
|
140
|
-
export { type SipRegistrationStatusRetrieveResponse as SipRegistrationStatusRetrieveResponse, type SipRegistrationStatusRetrieveParams as SipRegistrationStatusRetrieveParams, };
|
|
141
|
-
}
|
|
142
|
-
//# sourceMappingURL=sip-registration-status.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sip-registration-status.d.ts","sourceRoot":"","sources":["../src/resources/sip-registration-status.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,WAAW;IACpD;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CACN,KAAK,EAAE,mCAAmC,EAC1C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,qCAAqC,CAAC;CAGrD;AAED,MAAM,WAAW,qCAAqC;IACpD;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,eAAe,CAAC,EAAE,yBAAyB,GAAG,sBAAsB,GAAG,2BAA2B,CAAC;IAEnG;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,0BAA0B,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3C;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;;;OAMG;IACH,wBAAwB,CAAC,EAAE,qCAAqC,CAAC,sBAAsB,CAAC;IAExF;;OAEG;IACH,uBAAuB,CAAC,EACpB,eAAe,GACf,qBAAqB,GACrB,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,YAAY,GACZ,SAAS,CAAC;CACf;AAED,yBAAiB,qCAAqC,CAAC;IACrD;;;;;;OAMG;IACH,UAAiB,sBAAsB;QACrC;;WAEG;QACH,YAAY,CAAC,EAAE,MAAM,CAAC;QAEtB;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC;QAElB;;;WAGG;QACH,aAAa,CAAC,EAAE,MAAM,CAAC;QAEvB;;;WAGG;QACH,cAAc,CAAC,EAAE,MAAM,CAAC;QAExB;;WAEG;QACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAE3B;;;WAGG;QACH,SAAS,CAAC,EAAE,MAAM,CAAC;QAEnB;;;WAGG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;QAEf;;;WAGG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB;CACF;AAED,MAAM,WAAW,mCAAmC;IAClD;;;;OAIG;IACH,eAAe,EAAE,yBAAyB,GAAG,sBAAsB,GAAG,2BAA2B,CAAC;IAElG;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,WAAW,qBAAqB,CAAC;IAC7C,OAAO,EACL,KAAK,qCAAqC,IAAI,qCAAqC,EACnF,KAAK,mCAAmC,IAAI,mCAAmC,GAChF,CAAC;CACH"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.SipRegistrationStatus = void 0;
|
|
5
|
-
const resource_1 = require("../core/resource.js");
|
|
6
|
-
/**
|
|
7
|
-
* UAC connection operations
|
|
8
|
-
*/
|
|
9
|
-
class SipRegistrationStatus extends resource_1.APIResource {
|
|
10
|
-
/**
|
|
11
|
-
* Returns the live SIP registration status for a Telnyx endpoint: whether it is
|
|
12
|
-
* currently registered, when the current registration expires, and the last
|
|
13
|
-
* response Telnyx received from the registrar.
|
|
14
|
-
*
|
|
15
|
-
* The endpoint supports three credential types, selected with the
|
|
16
|
-
* `credential_type` query parameter. Each type is keyed by a different identifier:
|
|
17
|
-
*
|
|
18
|
-
* | `credential_type` | Keyed by | Use case |
|
|
19
|
-
* | --------------------------- | --------------- | -------------------------------------------------------------------------- |
|
|
20
|
-
* | `uac_external_credential` | `connection_id` | A UAC (SIP attach) connection that registers to an external PBX. |
|
|
21
|
-
* | `telephony_credential` | `username` | An ephemeral, one-time-use telephony credential. |
|
|
22
|
-
* | `sip_credential_connection` | `username` | A traditional SIP credential connection that registers directly to Telnyx. |
|
|
23
|
-
*
|
|
24
|
-
* The authenticated account is taken from your API key; you can only read the
|
|
25
|
-
* registration status of connections and credentials your account owns.
|
|
26
|
-
*/
|
|
27
|
-
retrieve(query, options) {
|
|
28
|
-
return this._client.get('/sip_registration_status', { query, ...options });
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
exports.SipRegistrationStatus = SipRegistrationStatus;
|
|
32
|
-
//# sourceMappingURL=sip-registration-status.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sip-registration-status.js","sourceRoot":"","sources":["../src/resources/sip-registration-status.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C;;GAEG;AACH,MAAa,qBAAsB,SAAQ,sBAAW;IACpD;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CACN,KAA0C,EAC1C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;CACF;AAxBD,sDAwBC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../core/resource.mjs";
|
|
3
|
-
/**
|
|
4
|
-
* UAC connection operations
|
|
5
|
-
*/
|
|
6
|
-
export class SipRegistrationStatus extends APIResource {
|
|
7
|
-
/**
|
|
8
|
-
* Returns the live SIP registration status for a Telnyx endpoint: whether it is
|
|
9
|
-
* currently registered, when the current registration expires, and the last
|
|
10
|
-
* response Telnyx received from the registrar.
|
|
11
|
-
*
|
|
12
|
-
* The endpoint supports three credential types, selected with the
|
|
13
|
-
* `credential_type` query parameter. Each type is keyed by a different identifier:
|
|
14
|
-
*
|
|
15
|
-
* | `credential_type` | Keyed by | Use case |
|
|
16
|
-
* | --------------------------- | --------------- | -------------------------------------------------------------------------- |
|
|
17
|
-
* | `uac_external_credential` | `connection_id` | A UAC (SIP attach) connection that registers to an external PBX. |
|
|
18
|
-
* | `telephony_credential` | `username` | An ephemeral, one-time-use telephony credential. |
|
|
19
|
-
* | `sip_credential_connection` | `username` | A traditional SIP credential connection that registers directly to Telnyx. |
|
|
20
|
-
*
|
|
21
|
-
* The authenticated account is taken from your API key; you can only read the
|
|
22
|
-
* registration status of connections and credentials your account owns.
|
|
23
|
-
*/
|
|
24
|
-
retrieve(query, options) {
|
|
25
|
-
return this._client.get('/sip_registration_status', { query, ...options });
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=sip-registration-status.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sip-registration-status.mjs","sourceRoot":"","sources":["../src/resources/sip-registration-status.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C;;GAEG;AACH,MAAM,OAAO,qBAAsB,SAAQ,WAAW;IACpD;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CACN,KAA0C,EAC1C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;CACF"}
|