telnyx 7.19.0 → 7.21.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.
Files changed (111) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +90 -0
  3. package/client.d.mts +2 -8
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +2 -8
  6. package/client.d.ts.map +1 -1
  7. package/client.js +0 -6
  8. package/client.js.map +1 -1
  9. package/client.mjs +0 -6
  10. package/client.mjs.map +1 -1
  11. package/package.json +3 -5
  12. package/resources/ai/anthropic/v1.d.mts +16 -0
  13. package/resources/ai/anthropic/v1.d.mts.map +1 -1
  14. package/resources/ai/anthropic/v1.d.ts +16 -0
  15. package/resources/ai/anthropic/v1.d.ts.map +1 -1
  16. package/resources/ai/assistants/assistants.d.mts +9 -0
  17. package/resources/ai/assistants/assistants.d.mts.map +1 -1
  18. package/resources/ai/assistants/assistants.d.ts +9 -0
  19. package/resources/ai/assistants/assistants.d.ts.map +1 -1
  20. package/resources/ai/assistants/assistants.js.map +1 -1
  21. package/resources/ai/assistants/assistants.mjs.map +1 -1
  22. package/resources/ai/chat.d.mts +16 -0
  23. package/resources/ai/chat.d.mts.map +1 -1
  24. package/resources/ai/chat.d.ts +16 -0
  25. package/resources/ai/chat.d.ts.map +1 -1
  26. package/resources/ai/openai/chat.d.mts +16 -0
  27. package/resources/ai/openai/chat.d.mts.map +1 -1
  28. package/resources/ai/openai/chat.d.ts +16 -0
  29. package/resources/ai/openai/chat.d.ts.map +1 -1
  30. package/resources/ai/openai/openai.d.mts +16 -0
  31. package/resources/ai/openai/openai.d.mts.map +1 -1
  32. package/resources/ai/openai/openai.d.ts +16 -0
  33. package/resources/ai/openai/openai.d.ts.map +1 -1
  34. package/resources/ai/openai/openai.js.map +1 -1
  35. package/resources/ai/openai/openai.mjs.map +1 -1
  36. package/resources/calls/actions.d.mts +8 -0
  37. package/resources/calls/actions.d.mts.map +1 -1
  38. package/resources/calls/actions.d.ts +8 -0
  39. package/resources/calls/actions.d.ts.map +1 -1
  40. package/resources/calls/calls.d.mts +8 -0
  41. package/resources/calls/calls.d.mts.map +1 -1
  42. package/resources/calls/calls.d.ts +8 -0
  43. package/resources/calls/calls.d.ts.map +1 -1
  44. package/resources/calls/calls.js.map +1 -1
  45. package/resources/calls/calls.mjs.map +1 -1
  46. package/resources/credential-connections/actions.d.mts +9 -9
  47. package/resources/credential-connections/actions.d.mts.map +1 -1
  48. package/resources/credential-connections/actions.d.ts +9 -9
  49. package/resources/credential-connections/actions.d.ts.map +1 -1
  50. package/resources/credential-connections/actions.js +3 -3
  51. package/resources/credential-connections/actions.mjs +3 -3
  52. package/resources/index.d.mts +1 -2
  53. package/resources/index.d.mts.map +1 -1
  54. package/resources/index.d.ts +1 -2
  55. package/resources/index.d.ts.map +1 -1
  56. package/resources/index.js +2 -4
  57. package/resources/index.js.map +1 -1
  58. package/resources/index.mjs +0 -1
  59. package/resources/index.mjs.map +1 -1
  60. package/resources/messaging-profiles/actions.d.mts +1 -1
  61. package/resources/messaging-profiles/actions.d.mts.map +1 -1
  62. package/resources/messaging-profiles/actions.d.ts +1 -1
  63. package/resources/messaging-profiles/actions.d.ts.map +1 -1
  64. package/resources/messaging-profiles/index.d.mts +1 -1
  65. package/resources/messaging-profiles/index.d.mts.map +1 -1
  66. package/resources/messaging-profiles/index.d.ts +1 -1
  67. package/resources/messaging-profiles/index.d.ts.map +1 -1
  68. package/resources/messaging-profiles/index.js.map +1 -1
  69. package/resources/messaging-profiles/index.mjs.map +1 -1
  70. package/resources/messaging-profiles/messaging-profiles.d.mts +152 -8
  71. package/resources/messaging-profiles/messaging-profiles.d.mts.map +1 -1
  72. package/resources/messaging-profiles/messaging-profiles.d.ts +152 -8
  73. package/resources/messaging-profiles/messaging-profiles.d.ts.map +1 -1
  74. package/resources/messaging-profiles/messaging-profiles.js +1 -1
  75. package/resources/messaging-profiles/messaging-profiles.js.map +1 -1
  76. package/resources/messaging-profiles/messaging-profiles.mjs +1 -1
  77. package/resources/messaging-profiles/messaging-profiles.mjs.map +1 -1
  78. package/resources/uac-connections/actions.d.mts +9 -9
  79. package/resources/uac-connections/actions.d.mts.map +1 -1
  80. package/resources/uac-connections/actions.d.ts +9 -9
  81. package/resources/uac-connections/actions.d.ts.map +1 -1
  82. package/resources/uac-connections/actions.js +3 -3
  83. package/resources/uac-connections/actions.mjs +3 -3
  84. package/src/client.ts +4 -18
  85. package/src/resources/ai/anthropic/v1.ts +18 -0
  86. package/src/resources/ai/assistants/assistants.ts +10 -0
  87. package/src/resources/ai/chat.ts +18 -0
  88. package/src/resources/ai/openai/chat.ts +18 -0
  89. package/src/resources/ai/openai/openai.ts +18 -0
  90. package/src/resources/calls/actions.ts +9 -0
  91. package/src/resources/calls/calls.ts +9 -0
  92. package/src/resources/credential-connections/actions.ts +9 -9
  93. package/src/resources/index.ts +2 -6
  94. package/src/resources/messaging-profiles/actions.ts +1 -1
  95. package/src/resources/messaging-profiles/index.ts +2 -1
  96. package/src/resources/messaging-profiles/messaging-profiles.ts +183 -9
  97. package/src/resources/uac-connections/actions.ts +9 -9
  98. package/src/version.ts +1 -1
  99. package/version.d.mts +1 -1
  100. package/version.d.ts +1 -1
  101. package/version.js +1 -1
  102. package/version.mjs +1 -1
  103. package/resources/sip-registration-status.d.mts +0 -142
  104. package/resources/sip-registration-status.d.mts.map +0 -1
  105. package/resources/sip-registration-status.d.ts +0 -142
  106. package/resources/sip-registration-status.d.ts.map +0 -1
  107. package/resources/sip-registration-status.js +0 -32
  108. package/resources/sip-registration-status.js.map +0 -1
  109. package/resources/sip-registration-status.mjs +0 -28
  110. package/resources/sip-registration-status.mjs.map +0 -1
  111. package/src/resources/sip-registration-status.ts +0 -181
@@ -121,6 +121,15 @@ export interface OpenAICreateResponseParams {
121
121
  */
122
122
  instructions?: string;
123
123
 
124
+ /**
125
+ * How strictly `region` is applied. `preferred` (the default when `region` is set)
126
+ * tries that region first and falls back to another when the model cannot be
127
+ * served there, so a request that would have succeeded still succeeds. `strict`
128
+ * pins the request: it is served from that region or it fails with a 422, never
129
+ * redirected to another region. Requires `region`.
130
+ */
131
+ mode?: 'preferred' | 'strict';
132
+
124
133
  /**
125
134
  * Model identifier to use for the response, for example `zai-org/GLM-5.1-FP8` or
126
135
  * another model available from the Telnyx OpenAI-compatible models endpoint.
@@ -129,6 +138,15 @@ export interface OpenAICreateResponseParams {
129
138
 
130
139
  reasoning?: OpenAICreateResponseParams.Reasoning;
131
140
 
141
+ /**
142
+ * Optional data-residency region the request should be served from, using the same
143
+ * vocabulary as your account's Data Locality setting. Behavior depends on `mode`.
144
+ * Supported for Telnyx-hosted models only: a request routed to an external
145
+ * provider never passes through Telnyx model routing, so a region cannot be
146
+ * enforced for it. Omit for today's latency-based routing.
147
+ */
148
+ region?: 'USA' | 'EU' | 'AUS' | 'UAE';
149
+
132
150
  /**
133
151
  * The service tier to use for this request. Supported values vary by model; use
134
152
  * `GET /v2/ai/openai/models` and inspect the model's `service_tiers` field. If
@@ -4791,6 +4791,15 @@ export interface ActionTransferParams {
4791
4791
  */
4792
4792
  custom_headers?: Array<CallsAPI.CustomSipHeader>;
4793
4793
 
4794
+ /**
4795
+ * The number the inbound call being transferred was originally received on, in
4796
+ * +E164 format. Supplying it lets an unverified non-Telnyx `from` be used as the
4797
+ * caller id, provided that number is still on an active inbound call to this
4798
+ * `diversion` number for your account. The `diversion` number itself must be one
4799
+ * you own or have verified.
4800
+ */
4801
+ diversion?: string;
4802
+
4794
4803
  /**
4795
4804
  * If set to false, early media will not be passed to the originating leg.
4796
4805
  */
@@ -1005,6 +1005,15 @@ export interface CallDialParams {
1005
1005
 
1006
1006
  dialogflow_config?: DialogflowConfig;
1007
1007
 
1008
+ /**
1009
+ * The number the inbound call being transferred was originally received on, in
1010
+ * +E164 format. Supplying it lets an unverified non-Telnyx `from` be used as the
1011
+ * caller id, provided that number is still on an active inbound call to this
1012
+ * `diversion` number for your account. The `diversion` number itself must be one
1013
+ * you own or have verified.
1014
+ */
1015
+ diversion?: string;
1016
+
1008
1017
  /**
1009
1018
  * Enables Dialogflow for the current call. The default value is false.
1010
1019
  */
@@ -10,9 +10,9 @@ import { path } from '../../internal/utils/path';
10
10
  */
11
11
  export class Actions extends APIResource {
12
12
  /**
13
- * Checks the registration_status for a credential connection,
14
- * (`registration_status`) as well as the timestamp for the last SIP registration
15
- * event (`registration_status_updated_at`)
13
+ * Returns the live SIP registration status for a credential connection. Reports
14
+ * whether the endpoint is currently registered (`status`) and the timestamp of the
15
+ * last 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
 
@@ -772,6 +772,7 @@ export {
772
772
  } from './messaging-profile-metrics';
773
773
  export {
774
774
  MessagingProfiles,
775
+ type MessagingMessagingProfile,
775
776
  type MessagingProfile,
776
777
  type NumberPoolSettings,
777
778
  type URLShortenerSettings,
@@ -787,7 +788,7 @@ export {
787
788
  type MessagingProfileListShortCodesParams,
788
789
  type MessagingProfileListAlphanumericSenderIDsParams,
789
790
  type MessagingProfileRetrieveMetricsParams,
790
- type MessagingProfilesDefaultFlatPagination,
791
+ type MessagingMessagingProfilesDefaultFlatPagination,
791
792
  } from './messaging-profiles/messaging-profiles';
792
793
  export { MessagingTollfree } from './messaging-tollfree/messaging-tollfree';
793
794
  export {
@@ -1315,11 +1316,6 @@ export {
1315
1316
  type SimCardListWirelessConnectivityLogsParams,
1316
1317
  type SimCardListWirelessConnectivityLogsResponsesDefaultFlatPagination,
1317
1318
  } from './sim-cards/sim-cards';
1318
- export {
1319
- SipRegistrationStatus,
1320
- type SipRegistrationStatusRetrieveResponse,
1321
- type SipRegistrationStatusRetrieveParams,
1322
- } from './sip-registration-status';
1323
1319
  export {
1324
1320
  SiprecConnectors,
1325
1321
  type SiprecConnectorResponse,
@@ -24,7 +24,7 @@ export class Actions extends APIResource {
24
24
  }
25
25
 
26
26
  export interface ActionRegenerateSecretResponse {
27
- data?: MessagingProfilesAPI.MessagingProfile;
27
+ data?: MessagingProfilesAPI.MessagingMessagingProfile;
28
28
  }
29
29
 
30
30
  export declare namespace Actions {
@@ -16,6 +16,7 @@ export {
16
16
  } from './autoresp-configs';
17
17
  export {
18
18
  MessagingProfiles,
19
+ type MessagingMessagingProfile,
19
20
  type MessagingProfile,
20
21
  type NumberPoolSettings,
21
22
  type URLShortenerSettings,
@@ -31,5 +32,5 @@ export {
31
32
  type MessagingProfileListShortCodesParams,
32
33
  type MessagingProfileListAlphanumericSenderIDsParams,
33
34
  type MessagingProfileRetrieveMetricsParams,
34
- type MessagingProfilesDefaultFlatPagination,
35
+ type MessagingMessagingProfilesDefaultFlatPagination,
35
36
  } from './messaging-profiles';
@@ -41,7 +41,7 @@ export class MessagingProfiles extends APIResource {
41
41
  * @example
42
42
  * ```ts
43
43
  * // Automatically fetches more pages as needed.
44
- * for await (const messagingProfile of client.messagingProfiles.list()) {
44
+ * for await (const messagingMessagingProfile of client.messagingProfiles.list()) {
45
45
  * // ...
46
46
  * }
47
47
  * ```
@@ -49,8 +49,8 @@ export class MessagingProfiles extends APIResource {
49
49
  list(
50
50
  query: MessagingProfileListParams | null | undefined = {},
51
51
  options?: RequestOptions,
52
- ): PagePromise<MessagingProfilesDefaultFlatPagination, MessagingProfile> {
53
- return this._client.getAPIList('/messaging_profiles', DefaultFlatPagination<MessagingProfile>, {
52
+ ): PagePromise<MessagingMessagingProfilesDefaultFlatPagination, MessagingMessagingProfile> {
53
+ return this._client.getAPIList('/messaging_profiles', DefaultFlatPagination<MessagingMessagingProfile>, {
54
54
  query,
55
55
  ...options,
56
56
  });
@@ -232,7 +232,165 @@ export class MessagingProfiles extends APIResource {
232
232
  }
233
233
  }
234
234
 
235
- export type MessagingProfilesDefaultFlatPagination = DefaultFlatPagination<MessagingProfile>;
235
+ export type MessagingMessagingProfilesDefaultFlatPagination =
236
+ DefaultFlatPagination<MessagingMessagingProfile>;
237
+
238
+ export interface MessagingMessagingProfile {
239
+ /**
240
+ * Identifies the type of resource.
241
+ */
242
+ id?: string;
243
+
244
+ /**
245
+ * The AI assistant ID associated with this messaging profile.
246
+ */
247
+ ai_assistant_id?: string | null;
248
+
249
+ /**
250
+ * The alphanumeric sender ID to use when sending to destinations that require an
251
+ * alphanumeric sender ID.
252
+ */
253
+ alpha_sender?: string | null;
254
+
255
+ /**
256
+ * ISO 8601 formatted date indicating when the resource was created.
257
+ */
258
+ created_at?: string;
259
+
260
+ /**
261
+ * The maximum amount of money (in USD) that can be spent by this profile before
262
+ * midnight UTC.
263
+ */
264
+ daily_spend_limit?: string;
265
+
266
+ /**
267
+ * Whether to enforce the value configured by `daily_spend_limit`.
268
+ */
269
+ daily_spend_limit_enabled?: boolean;
270
+
271
+ /**
272
+ * Specifies whether the messaging profile is enabled or not.
273
+ */
274
+ enabled?: boolean;
275
+
276
+ /**
277
+ * DEPRECATED: health check url service checking
278
+ */
279
+ health_webhook_url?: string | null;
280
+
281
+ /**
282
+ * enables SMS fallback for MMS messages.
283
+ */
284
+ mms_fall_back_to_sms?: boolean;
285
+
286
+ /**
287
+ * enables automated resizing of MMS media.
288
+ */
289
+ mms_transcoding?: boolean;
290
+
291
+ /**
292
+ * Send messages only to mobile phone numbers.
293
+ */
294
+ mobile_only?: boolean;
295
+
296
+ /**
297
+ * A user friendly name for the messaging profile.
298
+ */
299
+ name?: string;
300
+
301
+ /**
302
+ * Number Pool allows you to send messages from a pool of numbers of different
303
+ * types, assigning weights to each type. The pool consists of all the long code
304
+ * and toll free numbers assigned to the messaging profile.
305
+ *
306
+ * To disable this feature, set the object field to `null`.
307
+ */
308
+ number_pool_settings?: NumberPoolSettings | null;
309
+
310
+ /**
311
+ * The organization that owns this messaging profile.
312
+ */
313
+ organization_id?: string;
314
+
315
+ /**
316
+ * Identifies the type of the resource.
317
+ */
318
+ record_type?: 'messaging_profile';
319
+
320
+ /**
321
+ * Indicates whether message content redaction is enabled for this profile. When
322
+ * enabled, message text, MMS media, and the counterparty phone number are redacted
323
+ * in message records and reporting. Requires organization activation — contact
324
+ * support to enable. The field is only present in responses for organizations with
325
+ * redaction access.
326
+ */
327
+ redaction_enabled?: boolean;
328
+
329
+ /**
330
+ * Determines how much information is redacted for privacy or compliance purposes.
331
+ * Level 1: message records and reporting are redacted, but inbound webhook
332
+ * payloads are not. Level 2 (default): message records, reporting, and inbound
333
+ * webhook payloads are all redacted.
334
+ */
335
+ redaction_level?: number;
336
+
337
+ /**
338
+ * The resource group ID associated with this messaging profile.
339
+ */
340
+ resource_group_id?: string | null;
341
+
342
+ /**
343
+ * Enables automatic character encoding optimization for SMS messages. When
344
+ * enabled, the system automatically selects the most efficient encoding (GSM-7 or
345
+ * UCS-2) based on message content to maximize character limits and minimize costs.
346
+ */
347
+ smart_encoding?: boolean;
348
+
349
+ /**
350
+ * ISO 8601 formatted date indicating when the resource was updated.
351
+ */
352
+ updated_at?: string;
353
+
354
+ /**
355
+ * The URL shortener feature allows automatic replacement of URLs that were
356
+ * generated using a public URL shortener service. Some examples include bit.do,
357
+ * bit.ly, goo.gl, ht.ly, is.gd, ow.ly, rebrand.ly, t.co, tiny.cc, and tinyurl.com.
358
+ * Such URLs are replaced with with links generated by Telnyx. The use of custom
359
+ * links can improve branding and message deliverability.
360
+ *
361
+ * To disable this feature, set the object field to `null`.
362
+ */
363
+ url_shortener_settings?: URLShortenerSettings | null;
364
+
365
+ /**
366
+ * Secret used to authenticate with v1 endpoints.
367
+ */
368
+ v1_secret?: string;
369
+
370
+ /**
371
+ * Determines which webhook format will be used, Telnyx API v1, v2, or a legacy
372
+ * 2010-04-01 format.
373
+ */
374
+ webhook_api_version?: '1' | '2' | '2010-04-01';
375
+
376
+ /**
377
+ * The failover URL where webhooks related to this messaging profile will be sent
378
+ * if sending to the primary URL fails.
379
+ */
380
+ webhook_failover_url?: string | null;
381
+
382
+ /**
383
+ * The URL where webhooks related to this messaging profile will be sent.
384
+ */
385
+ webhook_url?: string | null;
386
+
387
+ /**
388
+ * Destinations to which the messaging profile is allowed to send. The elements in
389
+ * the list must be valid ISO 3166-1 alpha-2 country codes. If set to `["*"]`, all
390
+ * destinations will be allowed.
391
+ */
392
+ whitelisted_destinations?: Array<string>;
393
+ }
236
394
 
237
395
  export interface MessagingProfile {
238
396
  /**
@@ -471,19 +629,19 @@ export interface URLShortenerSettings {
471
629
  }
472
630
 
473
631
  export interface MessagingProfileCreateResponse {
474
- data?: MessagingProfile;
632
+ data?: MessagingMessagingProfile;
475
633
  }
476
634
 
477
635
  export interface MessagingProfileRetrieveResponse {
478
- data?: MessagingProfile;
636
+ data?: MessagingMessagingProfile;
479
637
  }
480
638
 
481
639
  export interface MessagingProfileUpdateResponse {
482
- data?: MessagingProfile;
640
+ data?: MessagingMessagingProfile;
483
641
  }
484
642
 
485
643
  export interface MessagingProfileDeleteResponse {
486
- data?: MessagingProfile;
644
+ data?: MessagingMessagingProfile;
487
645
  }
488
646
 
489
647
  export interface MessagingProfileRetrieveMetricsResponse {
@@ -689,6 +847,21 @@ export interface MessagingProfileUpdateParams {
689
847
  */
690
848
  number_pool_settings?: NumberPoolSettings | null;
691
849
 
850
+ /**
851
+ * Set to true to enable message content redaction on this profile, or false to
852
+ * disable it. Ignored if the organization is not on the redaction allowlist. See
853
+ * the [Message Redaction guide](/docs/messaging/messages/message-redaction) for
854
+ * what is redacted.
855
+ */
856
+ redaction_enabled?: boolean;
857
+
858
+ /**
859
+ * The redaction level to apply when redaction is enabled. 1: redact message
860
+ * records and reporting only. 2 (default): also redact inbound webhook payloads.
861
+ * See the [Message Redaction guide](/docs/messaging/messages/message-redaction).
862
+ */
863
+ redaction_level?: number;
864
+
692
865
  /**
693
866
  * Enables automatic character encoding optimization for SMS messages. When
694
867
  * enabled, the system automatically selects the most efficient encoding (GSM-7 or
@@ -757,6 +930,7 @@ MessagingProfiles.Actions = Actions;
757
930
 
758
931
  export declare namespace MessagingProfiles {
759
932
  export {
933
+ type MessagingMessagingProfile as MessagingMessagingProfile,
760
934
  type MessagingProfile as MessagingProfile,
761
935
  type NumberPoolSettings as NumberPoolSettings,
762
936
  type URLShortenerSettings as URLShortenerSettings,
@@ -765,7 +939,7 @@ export declare namespace MessagingProfiles {
765
939
  type MessagingProfileUpdateResponse as MessagingProfileUpdateResponse,
766
940
  type MessagingProfileDeleteResponse as MessagingProfileDeleteResponse,
767
941
  type MessagingProfileRetrieveMetricsResponse as MessagingProfileRetrieveMetricsResponse,
768
- type MessagingProfilesDefaultFlatPagination as MessagingProfilesDefaultFlatPagination,
942
+ type MessagingMessagingProfilesDefaultFlatPagination as MessagingMessagingProfilesDefaultFlatPagination,
769
943
  type MessagingProfileListParams as MessagingProfileListParams,
770
944
  type MessagingProfileCreateParams as MessagingProfileCreateParams,
771
945
  type MessagingProfileUpdateParams as MessagingProfileUpdateParams,
@@ -10,9 +10,9 @@ import { path } from '../../internal/utils/path';
10
10
  */
11
11
  export class Actions extends APIResource {
12
12
  /**
13
- * Checks the registration status for a UAC connection (`registration_status`) as
14
- * well as the timestamp for the last SIP registration event
15
- * (`registration_status_updated_at`).
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
 
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '7.19.0'; // x-release-please-version
1
+ export const VERSION = '7.21.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "7.19.0";
1
+ export declare const VERSION = "7.21.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "7.19.0";
1
+ export declare const VERSION = "7.21.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '7.19.0'; // x-release-please-version
4
+ exports.VERSION = '7.21.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '7.19.0'; // x-release-please-version
1
+ export const VERSION = '7.21.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"}