telnyx 6.41.1 → 6.43.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 (256) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/client.d.mts +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js +11 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +11 -0
  9. package/client.mjs.map +1 -1
  10. package/core/EventEmitter.d.mts +11 -0
  11. package/core/EventEmitter.d.mts.map +1 -1
  12. package/core/EventEmitter.d.ts +11 -0
  13. package/core/EventEmitter.d.ts.map +1 -1
  14. package/core/EventEmitter.js +15 -1
  15. package/core/EventEmitter.js.map +1 -1
  16. package/core/EventEmitter.mjs +13 -0
  17. package/core/EventEmitter.mjs.map +1 -1
  18. package/internal/types.d.mts +6 -6
  19. package/internal/types.d.mts.map +1 -1
  20. package/internal/types.d.ts +6 -6
  21. package/internal/types.d.ts.map +1 -1
  22. package/internal/utils/env.js +2 -2
  23. package/internal/utils/env.js.map +1 -1
  24. package/internal/utils/env.mjs +2 -2
  25. package/internal/utils/env.mjs.map +1 -1
  26. package/internal/ws-adapter-browser.d.mts +34 -0
  27. package/internal/ws-adapter-browser.d.mts.map +1 -0
  28. package/internal/ws-adapter-browser.d.ts +34 -0
  29. package/internal/ws-adapter-browser.d.ts.map +1 -0
  30. package/internal/ws-adapter-browser.js +88 -0
  31. package/internal/ws-adapter-browser.js.map +1 -0
  32. package/internal/ws-adapter-browser.mjs +84 -0
  33. package/internal/ws-adapter-browser.mjs.map +1 -0
  34. package/internal/ws-adapter-node.d.mts +27 -0
  35. package/internal/ws-adapter-node.d.mts.map +1 -0
  36. package/internal/ws-adapter-node.d.ts +27 -0
  37. package/internal/ws-adapter-node.d.ts.map +1 -0
  38. package/internal/ws-adapter-node.js +90 -0
  39. package/internal/ws-adapter-node.js.map +1 -0
  40. package/internal/ws-adapter-node.mjs +86 -0
  41. package/internal/ws-adapter-node.mjs.map +1 -0
  42. package/internal/ws-adapter.d.mts +24 -0
  43. package/internal/ws-adapter.d.mts.map +1 -0
  44. package/internal/ws-adapter.d.ts +24 -0
  45. package/internal/ws-adapter.d.ts.map +1 -0
  46. package/internal/ws-adapter.js +11 -0
  47. package/internal/ws-adapter.js.map +1 -0
  48. package/internal/ws-adapter.mjs +8 -0
  49. package/internal/ws-adapter.mjs.map +1 -0
  50. package/internal/ws.d.mts +80 -0
  51. package/internal/ws.d.mts.map +1 -0
  52. package/internal/ws.d.ts +80 -0
  53. package/internal/ws.d.ts.map +1 -0
  54. package/internal/ws.js +153 -0
  55. package/internal/ws.js.map +1 -0
  56. package/internal/ws.mjs +147 -0
  57. package/internal/ws.mjs.map +1 -0
  58. package/lib/text-to-speech-ws-base.d.mts +106 -0
  59. package/lib/text-to-speech-ws-base.d.mts.map +1 -0
  60. package/lib/text-to-speech-ws-base.d.ts +106 -0
  61. package/lib/text-to-speech-ws-base.d.ts.map +1 -0
  62. package/lib/text-to-speech-ws-base.js +475 -0
  63. package/lib/text-to-speech-ws-base.js.map +1 -0
  64. package/lib/text-to-speech-ws-base.mjs +471 -0
  65. package/lib/text-to-speech-ws-base.mjs.map +1 -0
  66. package/lib/text-to-speech-ws-internal.d.mts +71 -0
  67. package/lib/text-to-speech-ws-internal.d.mts.map +1 -0
  68. package/lib/text-to-speech-ws-internal.d.ts +71 -0
  69. package/lib/text-to-speech-ws-internal.d.ts.map +1 -0
  70. package/lib/text-to-speech-ws-internal.js +47 -0
  71. package/lib/text-to-speech-ws-internal.js.map +1 -0
  72. package/lib/text-to-speech-ws-internal.mjs +41 -0
  73. package/lib/text-to-speech-ws-internal.mjs.map +1 -0
  74. package/lib/text-to-speech-ws.d.mts +13 -0
  75. package/lib/text-to-speech-ws.d.mts.map +1 -0
  76. package/lib/text-to-speech-ws.d.ts +13 -0
  77. package/lib/text-to-speech-ws.d.ts.map +1 -0
  78. package/lib/text-to-speech-ws.js +30 -0
  79. package/lib/text-to-speech-ws.js.map +1 -0
  80. package/lib/text-to-speech-ws.mjs +25 -0
  81. package/lib/text-to-speech-ws.mjs.map +1 -0
  82. package/lib/webhooks.d.mts +6 -0
  83. package/lib/webhooks.d.mts.map +1 -1
  84. package/lib/webhooks.d.ts +6 -0
  85. package/lib/webhooks.d.ts.map +1 -1
  86. package/lib/webhooks.js +16 -0
  87. package/lib/webhooks.js.map +1 -1
  88. package/lib/webhooks.mjs +14 -0
  89. package/lib/webhooks.mjs.map +1 -1
  90. package/package.json +1 -1
  91. package/resources/ai/assistants/assistants.d.mts +938 -65
  92. package/resources/ai/assistants/assistants.d.mts.map +1 -1
  93. package/resources/ai/assistants/assistants.d.ts +938 -65
  94. package/resources/ai/assistants/assistants.d.ts.map +1 -1
  95. package/resources/ai/assistants/assistants.js +0 -1
  96. package/resources/ai/assistants/assistants.js.map +1 -1
  97. package/resources/ai/assistants/assistants.mjs +0 -1
  98. package/resources/ai/assistants/assistants.mjs.map +1 -1
  99. package/resources/ai/assistants/versions.d.mts +563 -25
  100. package/resources/ai/assistants/versions.d.mts.map +1 -1
  101. package/resources/ai/assistants/versions.d.ts +563 -25
  102. package/resources/ai/assistants/versions.d.ts.map +1 -1
  103. package/resources/ai/conversations/conversations.d.mts +2 -2
  104. package/resources/ai/conversations/conversations.d.mts.map +1 -1
  105. package/resources/ai/conversations/conversations.d.ts +2 -2
  106. package/resources/ai/conversations/conversations.d.ts.map +1 -1
  107. package/resources/ai/conversations/conversations.js.map +1 -1
  108. package/resources/ai/conversations/conversations.mjs +1 -1
  109. package/resources/ai/conversations/conversations.mjs.map +1 -1
  110. package/resources/ai/conversations/index.d.mts +1 -1
  111. package/resources/ai/conversations/index.d.mts.map +1 -1
  112. package/resources/ai/conversations/index.d.ts +1 -1
  113. package/resources/ai/conversations/index.d.ts.map +1 -1
  114. package/resources/ai/conversations/index.js.map +1 -1
  115. package/resources/ai/conversations/index.mjs +1 -1
  116. package/resources/ai/conversations/index.mjs.map +1 -1
  117. package/resources/ai/conversations/messages.d.mts +46 -48
  118. package/resources/ai/conversations/messages.d.mts.map +1 -1
  119. package/resources/ai/conversations/messages.d.ts +46 -48
  120. package/resources/ai/conversations/messages.d.ts.map +1 -1
  121. package/resources/ai/conversations/messages.js +9 -6
  122. package/resources/ai/conversations/messages.js.map +1 -1
  123. package/resources/ai/conversations/messages.mjs +9 -6
  124. package/resources/ai/conversations/messages.mjs.map +1 -1
  125. package/resources/calls/actions.d.mts +114 -6
  126. package/resources/calls/actions.d.mts.map +1 -1
  127. package/resources/calls/actions.d.ts +114 -6
  128. package/resources/calls/actions.d.ts.map +1 -1
  129. package/resources/calls/actions.js +4 -0
  130. package/resources/calls/actions.js.map +1 -1
  131. package/resources/calls/actions.mjs +4 -0
  132. package/resources/calls/actions.mjs.map +1 -1
  133. package/resources/calls/calls.d.mts +168 -8
  134. package/resources/calls/calls.d.mts.map +1 -1
  135. package/resources/calls/calls.d.ts +168 -8
  136. package/resources/calls/calls.d.ts.map +1 -1
  137. package/resources/calls/calls.js +4 -0
  138. package/resources/calls/calls.js.map +1 -1
  139. package/resources/calls/calls.mjs +4 -0
  140. package/resources/calls/calls.mjs.map +1 -1
  141. package/resources/index.d.mts +2 -3
  142. package/resources/index.d.mts.map +1 -1
  143. package/resources/index.d.ts +2 -3
  144. package/resources/index.d.ts.map +1 -1
  145. package/resources/index.js +2 -7
  146. package/resources/index.js.map +1 -1
  147. package/resources/index.mjs +1 -2
  148. package/resources/index.mjs.map +1 -1
  149. package/resources/messages/messages.d.mts +4 -0
  150. package/resources/messages/messages.d.mts.map +1 -1
  151. package/resources/messages/messages.d.ts +4 -0
  152. package/resources/messages/messages.d.ts.map +1 -1
  153. package/resources/messages/messages.js.map +1 -1
  154. package/resources/messages/messages.mjs.map +1 -1
  155. package/resources/session-analysis/session-analysis.d.mts +3 -13
  156. package/resources/session-analysis/session-analysis.d.mts.map +1 -1
  157. package/resources/session-analysis/session-analysis.d.ts +3 -13
  158. package/resources/session-analysis/session-analysis.d.ts.map +1 -1
  159. package/resources/session-analysis/session-analysis.js.map +1 -1
  160. package/resources/session-analysis/session-analysis.mjs.map +1 -1
  161. package/resources/texml/accounts/calls/calls.d.mts +45 -0
  162. package/resources/texml/accounts/calls/calls.d.mts.map +1 -1
  163. package/resources/texml/accounts/calls/calls.d.ts +45 -0
  164. package/resources/texml/accounts/calls/calls.d.ts.map +1 -1
  165. package/resources/texml/accounts/calls/calls.js.map +1 -1
  166. package/resources/texml/accounts/calls/calls.mjs.map +1 -1
  167. package/resources/text-to-speech/index.d.mts +2 -1
  168. package/resources/text-to-speech/index.d.mts.map +1 -1
  169. package/resources/text-to-speech/index.d.ts +2 -1
  170. package/resources/text-to-speech/index.d.ts.map +1 -1
  171. package/resources/text-to-speech/index.js.map +1 -1
  172. package/resources/text-to-speech/index.mjs.map +1 -1
  173. package/resources/text-to-speech/internal-base.d.mts +1 -48
  174. package/resources/text-to-speech/internal-base.d.mts.map +1 -1
  175. package/resources/text-to-speech/internal-base.d.ts +1 -48
  176. package/resources/text-to-speech/internal-base.d.ts.map +1 -1
  177. package/resources/text-to-speech/internal-base.js +5 -48
  178. package/resources/text-to-speech/internal-base.js.map +1 -1
  179. package/resources/text-to-speech/internal-base.mjs +1 -44
  180. package/resources/text-to-speech/internal-base.mjs.map +1 -1
  181. package/resources/text-to-speech/text-to-speech.d.mts +28 -3
  182. package/resources/text-to-speech/text-to-speech.d.mts.map +1 -1
  183. package/resources/text-to-speech/text-to-speech.d.ts +28 -3
  184. package/resources/text-to-speech/text-to-speech.d.ts.map +1 -1
  185. package/resources/text-to-speech/text-to-speech.js +1 -1
  186. package/resources/text-to-speech/text-to-speech.mjs +1 -1
  187. package/resources/text-to-speech/ws-base.d.mts +2 -0
  188. package/resources/text-to-speech/ws-base.d.mts.map +1 -0
  189. package/resources/text-to-speech/ws-base.d.ts +2 -0
  190. package/resources/text-to-speech/ws-base.d.ts.map +1 -0
  191. package/resources/text-to-speech/ws-base.js +7 -0
  192. package/resources/text-to-speech/ws-base.js.map +1 -0
  193. package/resources/text-to-speech/ws-base.mjs +3 -0
  194. package/resources/text-to-speech/ws-base.mjs.map +1 -0
  195. package/resources/text-to-speech/ws.d.mts +2 -41
  196. package/resources/text-to-speech/ws.d.mts.map +1 -1
  197. package/resources/text-to-speech/ws.d.ts +2 -41
  198. package/resources/text-to-speech/ws.d.ts.map +1 -1
  199. package/resources/text-to-speech/ws.js +2 -182
  200. package/resources/text-to-speech/ws.js.map +1 -1
  201. package/resources/text-to-speech/ws.mjs +1 -180
  202. package/resources/text-to-speech/ws.mjs.map +1 -1
  203. package/resources/verify-profiles.d.mts +97 -121
  204. package/resources/verify-profiles.d.mts.map +1 -1
  205. package/resources/verify-profiles.d.ts +97 -121
  206. package/resources/verify-profiles.d.ts.map +1 -1
  207. package/resources/webhooks.d.mts +642 -7
  208. package/resources/webhooks.d.mts.map +1 -1
  209. package/resources/webhooks.d.ts +642 -7
  210. package/resources/webhooks.d.ts.map +1 -1
  211. package/resources/webhooks.js +4 -10
  212. package/resources/webhooks.js.map +1 -1
  213. package/resources/webhooks.mjs +5 -11
  214. package/resources/webhooks.mjs.map +1 -1
  215. package/resources/whatsapp/phone-numbers/profile/profile.d.mts +5 -0
  216. package/resources/whatsapp/phone-numbers/profile/profile.d.mts.map +1 -1
  217. package/resources/whatsapp/phone-numbers/profile/profile.d.ts +5 -0
  218. package/resources/whatsapp/phone-numbers/profile/profile.d.ts.map +1 -1
  219. package/resources/whatsapp/phone-numbers/profile/profile.js.map +1 -1
  220. package/resources/whatsapp/phone-numbers/profile/profile.mjs.map +1 -1
  221. package/src/client.ts +22 -0
  222. package/src/core/EventEmitter.ts +16 -0
  223. package/src/internal/types.ts +6 -8
  224. package/src/internal/utils/env.ts +2 -2
  225. package/src/internal/ws-adapter-browser.ts +123 -0
  226. package/src/internal/ws-adapter-node.ts +105 -0
  227. package/src/internal/ws-adapter.ts +30 -0
  228. package/src/internal/ws.ts +193 -0
  229. package/src/lib/text-to-speech-ws-base.ts +618 -0
  230. package/src/lib/text-to-speech-ws-internal.ts +111 -0
  231. package/src/lib/text-to-speech-ws.ts +40 -0
  232. package/src/lib/webhooks.ts +27 -0
  233. package/src/resources/ai/assistants/assistants.ts +1065 -65
  234. package/src/resources/ai/assistants/versions.ts +639 -25
  235. package/src/resources/ai/conversations/conversations.ts +12 -2
  236. package/src/resources/ai/conversations/index.ts +6 -1
  237. package/src/resources/ai/conversations/messages.ts +67 -54
  238. package/src/resources/calls/actions.ts +184 -4
  239. package/src/resources/calls/calls.ts +191 -4
  240. package/src/resources/index.ts +6 -12
  241. package/src/resources/messages/messages.ts +5 -0
  242. package/src/resources/session-analysis/session-analysis.ts +3 -16
  243. package/src/resources/texml/accounts/calls/calls.ts +54 -0
  244. package/src/resources/text-to-speech/index.ts +2 -1
  245. package/src/resources/text-to-speech/internal-base.ts +6 -95
  246. package/src/resources/text-to-speech/text-to-speech.ts +33 -3
  247. package/src/resources/text-to-speech/ws-base.ts +7 -0
  248. package/src/resources/text-to-speech/ws.ts +2 -201
  249. package/src/resources/verify-profiles.ts +109 -142
  250. package/src/resources/webhooks.ts +886 -45
  251. package/src/resources/whatsapp/phone-numbers/profile/profile.ts +7 -0
  252. package/src/version.ts +1 -1
  253. package/version.d.mts +1 -1
  254. package/version.d.ts +1 -1
  255. package/version.js +1 -1
  256. package/version.mjs +1 -1
@@ -1,29 +1,19 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
- import { TelnyxWebhook, TelnyxWebhookVerificationError } from '../lib/webhooks';
4
+ import { type WebhookUnwrapOptions, unsafeUnwrapWebhook, unwrapWebhook } from '../lib/webhooks';
5
5
  import * as NumberOrdersAPI from './number-orders';
6
6
  import * as Shared from './shared';
7
7
  import * as CallsAPI from './calls/calls';
8
8
  import * as MessagesAPI from './messages/messages';
9
9
 
10
10
  export class Webhooks extends APIResource {
11
- async unwrap<T = UnwrapWebhookEvent>(
12
- body: string,
13
- options?: { headers?: Record<string, string>; key?: string | Uint8Array },
14
- ): Promise<T> {
15
- if (options?.headers) {
16
- const key = options.key || this._client.publicKey;
17
- if (!key) {
18
- throw new TelnyxWebhookVerificationError('No public key provided for webhook verification');
19
- }
20
-
21
- // Use Telnyx-specific webhook verification following standardwebhooks pattern
22
- const webhook = new TelnyxWebhook(key);
23
- await webhook.verify(body, options.headers);
24
- }
11
+ unsafeUnwrap<T = UnsafeUnwrapWebhookEvent>(body: string): T {
12
+ return unsafeUnwrapWebhook<T>(body);
13
+ }
25
14
 
26
- return JSON.parse(body) as T;
15
+ async unwrap<T = UnwrapWebhookEvent>(body: string, options?: WebhookUnwrapOptions): Promise<T> {
16
+ return unwrapWebhook<T>(body, options, this._client.publicKey);
27
17
  }
28
18
  }
29
19
 
@@ -4640,6 +4630,155 @@ export namespace CallCostWebhookEvent {
4640
4630
  }
4641
4631
  }
4642
4632
 
4633
+ export interface CallDeepfakeDetectionErrorWebhookEvent {
4634
+ data?: CallDeepfakeDetectionErrorWebhookEvent.Data;
4635
+ }
4636
+
4637
+ export namespace CallDeepfakeDetectionErrorWebhookEvent {
4638
+ export interface Data {
4639
+ /**
4640
+ * Identifies the type of resource.
4641
+ */
4642
+ id?: string;
4643
+
4644
+ /**
4645
+ * The type of event being delivered.
4646
+ */
4647
+ event_type?: 'call.deepfake_detection.error';
4648
+
4649
+ /**
4650
+ * ISO 8601 datetime of when the event occurred.
4651
+ */
4652
+ occurred_at?: string;
4653
+
4654
+ payload?: Data.Payload;
4655
+
4656
+ /**
4657
+ * Identifies the type of the resource.
4658
+ */
4659
+ record_type?: 'event';
4660
+ }
4661
+
4662
+ export namespace Data {
4663
+ export interface Payload {
4664
+ /**
4665
+ * Call ID used to issue commands via Call Control API.
4666
+ */
4667
+ call_control_id?: string;
4668
+
4669
+ /**
4670
+ * ID that is unique to the call and can be used to correlate webhook events.
4671
+ */
4672
+ call_leg_id?: string;
4673
+
4674
+ /**
4675
+ * ID that is unique to the call session and can be used to correlate webhook
4676
+ * events. Call session is a group of related call legs that logically belong to
4677
+ * the same phone call, e.g. an inbound and outbound leg of a transferred call.
4678
+ */
4679
+ call_session_id?: string;
4680
+
4681
+ /**
4682
+ * State received from a command.
4683
+ */
4684
+ client_state?: string | null;
4685
+
4686
+ /**
4687
+ * Call Control App ID (formerly Telnyx connection ID) used in the call.
4688
+ */
4689
+ connection_id?: string;
4690
+
4691
+ /**
4692
+ * The error that occurred. 'detection_timeout' = no DFD response received,
4693
+ * 'rtp_timeout' = no RTP audio received, 'dfd_connection_error'/'dfd_stream_error'
4694
+ * = service connectivity issues.
4695
+ */
4696
+ error_message?: 'detection_timeout' | 'rtp_timeout' | 'dfd_connection_error' | 'dfd_stream_error';
4697
+ }
4698
+ }
4699
+ }
4700
+
4701
+ export interface CallDeepfakeDetectionResultWebhookEvent {
4702
+ data?: CallDeepfakeDetectionResultWebhookEvent.Data;
4703
+ }
4704
+
4705
+ export namespace CallDeepfakeDetectionResultWebhookEvent {
4706
+ export interface Data {
4707
+ /**
4708
+ * Identifies the type of resource.
4709
+ */
4710
+ id?: string;
4711
+
4712
+ /**
4713
+ * The type of event being delivered.
4714
+ */
4715
+ event_type?: 'call.deepfake_detection.result';
4716
+
4717
+ /**
4718
+ * ISO 8601 datetime of when the event occurred.
4719
+ */
4720
+ occurred_at?: string;
4721
+
4722
+ payload?: Data.Payload;
4723
+
4724
+ /**
4725
+ * Identifies the type of the resource.
4726
+ */
4727
+ record_type?: 'event';
4728
+ }
4729
+
4730
+ export namespace Data {
4731
+ export interface Payload {
4732
+ /**
4733
+ * Call ID used to issue commands via Call Control API.
4734
+ */
4735
+ call_control_id?: string;
4736
+
4737
+ /**
4738
+ * ID that is unique to the call and can be used to correlate webhook events.
4739
+ */
4740
+ call_leg_id?: string;
4741
+
4742
+ /**
4743
+ * ID that is unique to the call session and can be used to correlate webhook
4744
+ * events. Call session is a group of related call legs that logically belong to
4745
+ * the same phone call, e.g. an inbound and outbound leg of a transferred call.
4746
+ */
4747
+ call_session_id?: string;
4748
+
4749
+ /**
4750
+ * State received from a command.
4751
+ */
4752
+ client_state?: string | null;
4753
+
4754
+ /**
4755
+ * Call Control App ID (formerly Telnyx connection ID) used in the call.
4756
+ */
4757
+ connection_id?: string;
4758
+
4759
+ /**
4760
+ * Percentage (0-100) indicating how consistently the model classified the audio
4761
+ * across frames. High consistency (>90%) means confident classification
4762
+ * throughout; low consistency suggests mixed signals. Null for silence_timeout.
4763
+ */
4764
+ consistency?: number | null;
4765
+
4766
+ /**
4767
+ * Detection outcome. 'real' = human voice, 'fake' = AI-generated voice,
4768
+ * 'silence_timeout' = no analyzable speech detected before timeout.
4769
+ */
4770
+ result?: 'real' | 'fake' | 'silence_timeout';
4771
+
4772
+ /**
4773
+ * Probability that the audio is AI-generated, from 0.0 (likely real) to 1.0
4774
+ * (likely deepfake). Based on the model's aggregated confidence across analyzed
4775
+ * audio frames. Null for silence_timeout.
4776
+ */
4777
+ score?: number | null;
4778
+ }
4779
+ }
4780
+ }
4781
+
4643
4782
  export interface CallDtmfReceivedWebhookEvent {
4644
4783
  data?: CallDtmfReceived;
4645
4784
  }
@@ -4664,6 +4803,77 @@ export interface CallHangupWebhookEvent {
4664
4803
  data?: CallHangup;
4665
4804
  }
4666
4805
 
4806
+ export interface CallHoldWebhookEvent {
4807
+ data?: CallHoldWebhookEvent.Data;
4808
+ }
4809
+
4810
+ export namespace CallHoldWebhookEvent {
4811
+ export interface Data {
4812
+ /**
4813
+ * Identifies the type of resource.
4814
+ */
4815
+ id?: string;
4816
+
4817
+ /**
4818
+ * The type of event being delivered.
4819
+ */
4820
+ event_type?: 'call.hold';
4821
+
4822
+ /**
4823
+ * ISO 8601 datetime of when the event occurred.
4824
+ */
4825
+ occurred_at?: string;
4826
+
4827
+ payload?: Data.Payload;
4828
+
4829
+ /**
4830
+ * Identifies the type of the resource.
4831
+ */
4832
+ record_type?: 'event';
4833
+ }
4834
+
4835
+ export namespace Data {
4836
+ export interface Payload {
4837
+ /**
4838
+ * Call ID used to issue commands via Call Control API.
4839
+ */
4840
+ call_control_id?: string;
4841
+
4842
+ /**
4843
+ * ID that is unique to the call and can be used to correlate webhook events.
4844
+ */
4845
+ call_leg_id?: string;
4846
+
4847
+ /**
4848
+ * ID that is unique to the call session and can be used to correlate webhook
4849
+ * events. Call session is a group of related call legs that logically belong to
4850
+ * the same phone call, e.g. an inbound and outbound leg of a transferred call.
4851
+ */
4852
+ call_session_id?: string;
4853
+
4854
+ /**
4855
+ * State received from a command.
4856
+ */
4857
+ client_state?: string;
4858
+
4859
+ /**
4860
+ * Call Control App ID (formerly Telnyx connection ID) used in the call.
4861
+ */
4862
+ connection_id?: string;
4863
+
4864
+ /**
4865
+ * Number or SIP URI placing the call.
4866
+ */
4867
+ from?: string;
4868
+
4869
+ /**
4870
+ * Destination number or SIP URI of the call.
4871
+ */
4872
+ to?: string;
4873
+ }
4874
+ }
4875
+ }
4876
+
4667
4877
  export interface CallInitiatedWebhookEvent {
4668
4878
  data?: CallInitiated;
4669
4879
  }
@@ -4752,45 +4962,116 @@ export interface CallStreamingStoppedWebhookEvent {
4752
4962
  data?: CallStreamingStopped;
4753
4963
  }
4754
4964
 
4755
- export interface ConferenceCreatedWebhookEvent {
4756
- data?: ConferenceCreated;
4965
+ export interface CallUnholdWebhookEvent {
4966
+ data?: CallUnholdWebhookEvent.Data;
4757
4967
  }
4758
4968
 
4759
- export interface ConferenceEndedWebhookEvent {
4760
- data?: ConferenceEnded;
4761
- }
4969
+ export namespace CallUnholdWebhookEvent {
4970
+ export interface Data {
4971
+ /**
4972
+ * Identifies the type of resource.
4973
+ */
4974
+ id?: string;
4762
4975
 
4763
- export interface ConferenceParticipantJoinedWebhookEvent {
4764
- data?: ConferenceParticipantJoined;
4765
- }
4976
+ /**
4977
+ * The type of event being delivered.
4978
+ */
4979
+ event_type?: 'call.unhold';
4766
4980
 
4767
- export interface ConferenceParticipantLeftWebhookEvent {
4768
- data?: ConferenceParticipantLeft;
4769
- }
4981
+ /**
4982
+ * ISO 8601 datetime of when the event occurred.
4983
+ */
4984
+ occurred_at?: string;
4770
4985
 
4771
- export interface ConferenceParticipantPlaybackEndedWebhookEvent {
4772
- data?: ConferenceParticipantPlaybackEnded;
4773
- }
4986
+ payload?: Data.Payload;
4774
4987
 
4775
- export interface ConferenceParticipantPlaybackStartedWebhookEvent {
4776
- data?: ConferenceParticipantPlaybackStarted;
4777
- }
4988
+ /**
4989
+ * Identifies the type of the resource.
4990
+ */
4991
+ record_type?: 'event';
4992
+ }
4778
4993
 
4779
- export interface ConferenceParticipantSpeakEndedWebhookEvent {
4780
- data?: ConferenceParticipantSpeakEnded;
4781
- }
4994
+ export namespace Data {
4995
+ export interface Payload {
4996
+ /**
4997
+ * Call ID used to issue commands via Call Control API.
4998
+ */
4999
+ call_control_id?: string;
4782
5000
 
4783
- export interface ConferenceParticipantSpeakStartedWebhookEvent {
4784
- data?: ConferenceParticipantSpeakStarted;
4785
- }
5001
+ /**
5002
+ * ID that is unique to the call and can be used to correlate webhook events.
5003
+ */
5004
+ call_leg_id?: string;
4786
5005
 
4787
- export interface ConferencePlaybackEndedWebhookEvent {
4788
- data?: ConferencePlaybackEnded;
4789
- }
5006
+ /**
5007
+ * ID that is unique to the call session and can be used to correlate webhook
5008
+ * events. Call session is a group of related call legs that logically belong to
5009
+ * the same phone call, e.g. an inbound and outbound leg of a transferred call.
5010
+ */
5011
+ call_session_id?: string;
4790
5012
 
4791
- export interface ConferencePlaybackStartedWebhookEvent {
4792
- data?: ConferencePlaybackStarted;
4793
- }
5013
+ /**
5014
+ * State received from a command.
5015
+ */
5016
+ client_state?: string;
5017
+
5018
+ /**
5019
+ * Call Control App ID (formerly Telnyx connection ID) used in the call.
5020
+ */
5021
+ connection_id?: string;
5022
+
5023
+ /**
5024
+ * Number or SIP URI placing the call.
5025
+ */
5026
+ from?: string;
5027
+
5028
+ /**
5029
+ * Destination number or SIP URI of the call.
5030
+ */
5031
+ to?: string;
5032
+ }
5033
+ }
5034
+ }
5035
+
5036
+ export interface ConferenceCreatedWebhookEvent {
5037
+ data?: ConferenceCreated;
5038
+ }
5039
+
5040
+ export interface ConferenceEndedWebhookEvent {
5041
+ data?: ConferenceEnded;
5042
+ }
5043
+
5044
+ export interface ConferenceParticipantJoinedWebhookEvent {
5045
+ data?: ConferenceParticipantJoined;
5046
+ }
5047
+
5048
+ export interface ConferenceParticipantLeftWebhookEvent {
5049
+ data?: ConferenceParticipantLeft;
5050
+ }
5051
+
5052
+ export interface ConferenceParticipantPlaybackEndedWebhookEvent {
5053
+ data?: ConferenceParticipantPlaybackEnded;
5054
+ }
5055
+
5056
+ export interface ConferenceParticipantPlaybackStartedWebhookEvent {
5057
+ data?: ConferenceParticipantPlaybackStarted;
5058
+ }
5059
+
5060
+ export interface ConferenceParticipantSpeakEndedWebhookEvent {
5061
+ data?: ConferenceParticipantSpeakEnded;
5062
+ }
5063
+
5064
+ export interface ConferenceParticipantSpeakStartedWebhookEvent {
5065
+ data?: ConferenceParticipantSpeakStarted;
5066
+ }
5067
+
5068
+ export interface ConferencePlaybackEndedWebhookEvent {
5069
+ data?: ConferencePlaybackEnded;
5070
+ }
5071
+
5072
+ export interface ConferencePlaybackStartedWebhookEvent {
5073
+ data?: ConferencePlaybackStarted;
5074
+ }
4794
5075
 
4795
5076
  export interface ConferenceRecordingSavedWebhookEvent {
4796
5077
  data?: ConferenceRecordingSaved;
@@ -4824,6 +5105,133 @@ export namespace DeliveryUpdateWebhookEvent {
4824
5105
  }
4825
5106
  }
4826
5107
 
5108
+ export interface HostedNumberOrderEventWebhookEvent {
5109
+ data?: HostedNumberOrderEventWebhookEvent.Data;
5110
+ }
5111
+
5112
+ export namespace HostedNumberOrderEventWebhookEvent {
5113
+ export interface Data {
5114
+ /**
5115
+ * Unique identifier for the event.
5116
+ */
5117
+ id?: string;
5118
+
5119
+ /**
5120
+ * The type of event being delivered. Internal transfer events are only emitted for
5121
+ * orders where the numbers are already active on another Telnyx account.
5122
+ */
5123
+ event_type?:
5124
+ | 'messaging_hosted_numbers_orders.created'
5125
+ | 'messaging_hosted_numbers_orders.updated'
5126
+ | 'messaging_hosted_numbers_orders.deleted'
5127
+ | 'messaging_hosted_numbers_orders.internal_transfer_detected'
5128
+ | 'messaging_hosted_numbers_orders.internal_transfer_approval_requested'
5129
+ | 'messaging_hosted_numbers_orders.internal_transfer_approved'
5130
+ | 'messaging_hosted_numbers_orders.internal_transfer_rejected'
5131
+ | 'messaging_hosted_numbers_orders.internal_transfer_auto_approved';
5132
+
5133
+ /**
5134
+ * ISO 8601 formatted date indicating when the event was generated.
5135
+ */
5136
+ occurred_at?: string;
5137
+
5138
+ /**
5139
+ * Payload delivered with every messaging*hosted_numbers_orders.\* event.
5140
+ * `approval_deadline` and `decision` are meaningful only for
5141
+ * `internal_transfer*\*` events.
5142
+ */
5143
+ payload?: Data.Payload;
5144
+
5145
+ /**
5146
+ * Identifies the type of the resource.
5147
+ */
5148
+ record_type?: 'event';
5149
+ }
5150
+
5151
+ export namespace Data {
5152
+ /**
5153
+ * Payload delivered with every messaging*hosted_numbers_orders.\* event.
5154
+ * `approval_deadline` and `decision` are meaningful only for
5155
+ * `internal_transfer*\*` events.
5156
+ */
5157
+ export interface Payload {
5158
+ /**
5159
+ * Unix timestamp (seconds) by which the losing organization must respond before
5160
+ * auto-approval. Populated on internal-transfer events once an approval window has
5161
+ * been issued.
5162
+ */
5163
+ approval_deadline?: number | null;
5164
+
5165
+ /**
5166
+ * Approval decision for the internal transfer. Defaults to `pending` for
5167
+ * non-internal-transfer events.
5168
+ */
5169
+ decision?: 'pending' | 'approved' | 'rejected';
5170
+
5171
+ numbers?: Array<Payload.Number>;
5172
+
5173
+ /**
5174
+ * The ID of the hosted number order.
5175
+ */
5176
+ order_id?: string;
5177
+
5178
+ /**
5179
+ * Current status of the order.
5180
+ */
5181
+ order_status?:
5182
+ | 'pending'
5183
+ | 'provisioning'
5184
+ | 'successful'
5185
+ | 'failed'
5186
+ | 'deleted'
5187
+ | 'carrier_rejected'
5188
+ | 'compliance_review_failed'
5189
+ | 'incomplete_documentation'
5190
+ | 'incorrect_billing_information'
5191
+ | 'ineligible_carrier'
5192
+ | 'loa_file_invalid'
5193
+ | 'loa_file_successful';
5194
+
5195
+ /**
5196
+ * The messaging profile associated with the order.
5197
+ */
5198
+ profile_id?: string;
5199
+
5200
+ /**
5201
+ * The organization that owns the order.
5202
+ */
5203
+ user_id?: string;
5204
+ }
5205
+
5206
+ export namespace Payload {
5207
+ export interface Number {
5208
+ /**
5209
+ * Current status of this phone number within the order.
5210
+ */
5211
+ status?:
5212
+ | 'deleted'
5213
+ | 'failed'
5214
+ | 'failed_activation'
5215
+ | 'failed_carrier_rejected'
5216
+ | 'failed_ineligible_carrier'
5217
+ | 'failed_number_already_hosted'
5218
+ | 'failed_number_not_found'
5219
+ | 'failed_ownership_verification'
5220
+ | 'failed_timeout'
5221
+ | 'ownership_successful'
5222
+ | 'pending'
5223
+ | 'provisioning'
5224
+ | 'successful';
5225
+
5226
+ /**
5227
+ * Phone number in +E.164 format.
5228
+ */
5229
+ value?: string;
5230
+ }
5231
+ }
5232
+ }
5233
+ }
5234
+
4827
5235
  export interface InboundMessageWebhookEvent {
4828
5236
  data?: InboundMessage;
4829
5237
  }
@@ -4986,6 +5394,155 @@ export namespace CallCostWebhookEvent {
4986
5394
  }
4987
5395
  }
4988
5396
 
5397
+ export interface CallDeepfakeDetectionErrorWebhookEvent {
5398
+ data?: CallDeepfakeDetectionErrorWebhookEvent.Data;
5399
+ }
5400
+
5401
+ export namespace CallDeepfakeDetectionErrorWebhookEvent {
5402
+ export interface Data {
5403
+ /**
5404
+ * Identifies the type of resource.
5405
+ */
5406
+ id?: string;
5407
+
5408
+ /**
5409
+ * The type of event being delivered.
5410
+ */
5411
+ event_type?: 'call.deepfake_detection.error';
5412
+
5413
+ /**
5414
+ * ISO 8601 datetime of when the event occurred.
5415
+ */
5416
+ occurred_at?: string;
5417
+
5418
+ payload?: Data.Payload;
5419
+
5420
+ /**
5421
+ * Identifies the type of the resource.
5422
+ */
5423
+ record_type?: 'event';
5424
+ }
5425
+
5426
+ export namespace Data {
5427
+ export interface Payload {
5428
+ /**
5429
+ * Call ID used to issue commands via Call Control API.
5430
+ */
5431
+ call_control_id?: string;
5432
+
5433
+ /**
5434
+ * ID that is unique to the call and can be used to correlate webhook events.
5435
+ */
5436
+ call_leg_id?: string;
5437
+
5438
+ /**
5439
+ * ID that is unique to the call session and can be used to correlate webhook
5440
+ * events. Call session is a group of related call legs that logically belong to
5441
+ * the same phone call, e.g. an inbound and outbound leg of a transferred call.
5442
+ */
5443
+ call_session_id?: string;
5444
+
5445
+ /**
5446
+ * State received from a command.
5447
+ */
5448
+ client_state?: string | null;
5449
+
5450
+ /**
5451
+ * Call Control App ID (formerly Telnyx connection ID) used in the call.
5452
+ */
5453
+ connection_id?: string;
5454
+
5455
+ /**
5456
+ * The error that occurred. 'detection_timeout' = no DFD response received,
5457
+ * 'rtp_timeout' = no RTP audio received, 'dfd_connection_error'/'dfd_stream_error'
5458
+ * = service connectivity issues.
5459
+ */
5460
+ error_message?: 'detection_timeout' | 'rtp_timeout' | 'dfd_connection_error' | 'dfd_stream_error';
5461
+ }
5462
+ }
5463
+ }
5464
+
5465
+ export interface CallDeepfakeDetectionResultWebhookEvent {
5466
+ data?: CallDeepfakeDetectionResultWebhookEvent.Data;
5467
+ }
5468
+
5469
+ export namespace CallDeepfakeDetectionResultWebhookEvent {
5470
+ export interface Data {
5471
+ /**
5472
+ * Identifies the type of resource.
5473
+ */
5474
+ id?: string;
5475
+
5476
+ /**
5477
+ * The type of event being delivered.
5478
+ */
5479
+ event_type?: 'call.deepfake_detection.result';
5480
+
5481
+ /**
5482
+ * ISO 8601 datetime of when the event occurred.
5483
+ */
5484
+ occurred_at?: string;
5485
+
5486
+ payload?: Data.Payload;
5487
+
5488
+ /**
5489
+ * Identifies the type of the resource.
5490
+ */
5491
+ record_type?: 'event';
5492
+ }
5493
+
5494
+ export namespace Data {
5495
+ export interface Payload {
5496
+ /**
5497
+ * Call ID used to issue commands via Call Control API.
5498
+ */
5499
+ call_control_id?: string;
5500
+
5501
+ /**
5502
+ * ID that is unique to the call and can be used to correlate webhook events.
5503
+ */
5504
+ call_leg_id?: string;
5505
+
5506
+ /**
5507
+ * ID that is unique to the call session and can be used to correlate webhook
5508
+ * events. Call session is a group of related call legs that logically belong to
5509
+ * the same phone call, e.g. an inbound and outbound leg of a transferred call.
5510
+ */
5511
+ call_session_id?: string;
5512
+
5513
+ /**
5514
+ * State received from a command.
5515
+ */
5516
+ client_state?: string | null;
5517
+
5518
+ /**
5519
+ * Call Control App ID (formerly Telnyx connection ID) used in the call.
5520
+ */
5521
+ connection_id?: string;
5522
+
5523
+ /**
5524
+ * Percentage (0-100) indicating how consistently the model classified the audio
5525
+ * across frames. High consistency (>90%) means confident classification
5526
+ * throughout; low consistency suggests mixed signals. Null for silence_timeout.
5527
+ */
5528
+ consistency?: number | null;
5529
+
5530
+ /**
5531
+ * Detection outcome. 'real' = human voice, 'fake' = AI-generated voice,
5532
+ * 'silence_timeout' = no analyzable speech detected before timeout.
5533
+ */
5534
+ result?: 'real' | 'fake' | 'silence_timeout';
5535
+
5536
+ /**
5537
+ * Probability that the audio is AI-generated, from 0.0 (likely real) to 1.0
5538
+ * (likely deepfake). Based on the model's aggregated confidence across analyzed
5539
+ * audio frames. Null for silence_timeout.
5540
+ */
5541
+ score?: number | null;
5542
+ }
5543
+ }
5544
+ }
5545
+
4989
5546
  export interface CallDtmfReceivedWebhookEvent {
4990
5547
  data?: CallDtmfReceived;
4991
5548
  }
@@ -5010,6 +5567,77 @@ export interface CallHangupWebhookEvent {
5010
5567
  data?: CallHangup;
5011
5568
  }
5012
5569
 
5570
+ export interface CallHoldWebhookEvent {
5571
+ data?: CallHoldWebhookEvent.Data;
5572
+ }
5573
+
5574
+ export namespace CallHoldWebhookEvent {
5575
+ export interface Data {
5576
+ /**
5577
+ * Identifies the type of resource.
5578
+ */
5579
+ id?: string;
5580
+
5581
+ /**
5582
+ * The type of event being delivered.
5583
+ */
5584
+ event_type?: 'call.hold';
5585
+
5586
+ /**
5587
+ * ISO 8601 datetime of when the event occurred.
5588
+ */
5589
+ occurred_at?: string;
5590
+
5591
+ payload?: Data.Payload;
5592
+
5593
+ /**
5594
+ * Identifies the type of the resource.
5595
+ */
5596
+ record_type?: 'event';
5597
+ }
5598
+
5599
+ export namespace Data {
5600
+ export interface Payload {
5601
+ /**
5602
+ * Call ID used to issue commands via Call Control API.
5603
+ */
5604
+ call_control_id?: string;
5605
+
5606
+ /**
5607
+ * ID that is unique to the call and can be used to correlate webhook events.
5608
+ */
5609
+ call_leg_id?: string;
5610
+
5611
+ /**
5612
+ * ID that is unique to the call session and can be used to correlate webhook
5613
+ * events. Call session is a group of related call legs that logically belong to
5614
+ * the same phone call, e.g. an inbound and outbound leg of a transferred call.
5615
+ */
5616
+ call_session_id?: string;
5617
+
5618
+ /**
5619
+ * State received from a command.
5620
+ */
5621
+ client_state?: string;
5622
+
5623
+ /**
5624
+ * Call Control App ID (formerly Telnyx connection ID) used in the call.
5625
+ */
5626
+ connection_id?: string;
5627
+
5628
+ /**
5629
+ * Number or SIP URI placing the call.
5630
+ */
5631
+ from?: string;
5632
+
5633
+ /**
5634
+ * Destination number or SIP URI of the call.
5635
+ */
5636
+ to?: string;
5637
+ }
5638
+ }
5639
+ }
5640
+
5013
5641
  export interface CallInitiatedWebhookEvent {
5014
5642
  data?: CallInitiated;
5015
5643
  }
@@ -5098,6 +5726,77 @@ export interface CallStreamingStoppedWebhookEvent {
5098
5726
  data?: CallStreamingStopped;
5099
5727
  }
5100
5728
 
5729
+ export interface CallUnholdWebhookEvent {
5730
+ data?: CallUnholdWebhookEvent.Data;
5731
+ }
5732
+
5733
+ export namespace CallUnholdWebhookEvent {
5734
+ export interface Data {
5735
+ /**
5736
+ * Identifies the type of resource.
5737
+ */
5738
+ id?: string;
5739
+
5740
+ /**
5741
+ * The type of event being delivered.
5742
+ */
5743
+ event_type?: 'call.unhold';
5744
+
5745
+ /**
5746
+ * ISO 8601 datetime of when the event occurred.
5747
+ */
5748
+ occurred_at?: string;
5749
+
5750
+ payload?: Data.Payload;
5751
+
5752
+ /**
5753
+ * Identifies the type of the resource.
5754
+ */
5755
+ record_type?: 'event';
5756
+ }
5757
+
5758
+ export namespace Data {
5759
+ export interface Payload {
5760
+ /**
5761
+ * Call ID used to issue commands via Call Control API.
5762
+ */
5763
+ call_control_id?: string;
5764
+
5765
+ /**
5766
+ * ID that is unique to the call and can be used to correlate webhook events.
5767
+ */
5768
+ call_leg_id?: string;
5769
+
5770
+ /**
5771
+ * ID that is unique to the call session and can be used to correlate webhook
5772
+ * events. Call session is a group of related call legs that logically belong to
5773
+ * the same phone call, e.g. an inbound and outbound leg of a transferred call.
5774
+ */
5775
+ call_session_id?: string;
5776
+
5777
+ /**
5778
+ * State received from a command.
5779
+ */
5780
+ client_state?: string;
5781
+
5782
+ /**
5783
+ * Call Control App ID (formerly Telnyx connection ID) used in the call.
5784
+ */
5785
+ connection_id?: string;
5786
+
5787
+ /**
5788
+ * Number or SIP URI placing the call.
5789
+ */
5790
+ from?: string;
5791
+
5792
+ /**
5793
+ * Destination number or SIP URI of the call.
5794
+ */
5795
+ to?: string;
5796
+ }
5797
+ }
5798
+ }
5799
+
5101
5800
  export interface ConferenceCreatedWebhookEvent {
5102
5801
  data?: ConferenceCreated;
5103
5802
  }
@@ -5170,6 +5869,133 @@ export namespace DeliveryUpdateWebhookEvent {
5170
5869
  }
5171
5870
  }
5172
5871
 
5872
+ export interface HostedNumberOrderEventWebhookEvent {
5873
+ data?: HostedNumberOrderEventWebhookEvent.Data;
5874
+ }
5875
+
5876
+ export namespace HostedNumberOrderEventWebhookEvent {
5877
+ export interface Data {
5878
+ /**
5879
+ * Unique identifier for the event.
5880
+ */
5881
+ id?: string;
5882
+
5883
+ /**
5884
+ * The type of event being delivered. Internal transfer events are only emitted for
5885
+ * orders where the numbers are already active on another Telnyx account.
5886
+ */
5887
+ event_type?:
5888
+ | 'messaging_hosted_numbers_orders.created'
5889
+ | 'messaging_hosted_numbers_orders.updated'
5890
+ | 'messaging_hosted_numbers_orders.deleted'
5891
+ | 'messaging_hosted_numbers_orders.internal_transfer_detected'
5892
+ | 'messaging_hosted_numbers_orders.internal_transfer_approval_requested'
5893
+ | 'messaging_hosted_numbers_orders.internal_transfer_approved'
5894
+ | 'messaging_hosted_numbers_orders.internal_transfer_rejected'
5895
+ | 'messaging_hosted_numbers_orders.internal_transfer_auto_approved';
5896
+
5897
+ /**
5898
+ * ISO 8601 formatted date indicating when the event was generated.
5899
+ */
5900
+ occurred_at?: string;
5901
+
5902
+ /**
5903
+ * Payload delivered with every messaging*hosted_numbers_orders.\* event.
5904
+ * `approval_deadline` and `decision` are meaningful only for
5905
+ * `internal_transfer*\*` events.
5906
+ */
5907
+ payload?: Data.Payload;
5908
+
5909
+ /**
5910
+ * Identifies the type of the resource.
5911
+ */
5912
+ record_type?: 'event';
5913
+ }
5914
+
5915
+ export namespace Data {
5916
+ /**
5917
+ * Payload delivered with every messaging*hosted_numbers_orders.\* event.
5918
+ * `approval_deadline` and `decision` are meaningful only for
5919
+ * `internal_transfer*\*` events.
5920
+ */
5921
+ export interface Payload {
5922
+ /**
5923
+ * Unix timestamp (seconds) by which the losing organization must respond before
5924
+ * auto-approval. Populated on internal-transfer events once an approval window has
5925
+ * been issued.
5926
+ */
5927
+ approval_deadline?: number | null;
5928
+
5929
+ /**
5930
+ * Approval decision for the internal transfer. Defaults to `pending` for
5931
+ * non-internal-transfer events.
5932
+ */
5933
+ decision?: 'pending' | 'approved' | 'rejected';
5934
+
5935
+ numbers?: Array<Payload.Number>;
5936
+
5937
+ /**
5938
+ * The ID of the hosted number order.
5939
+ */
5940
+ order_id?: string;
5941
+
5942
+ /**
5943
+ * Current status of the order.
5944
+ */
5945
+ order_status?:
5946
+ | 'pending'
5947
+ | 'provisioning'
5948
+ | 'successful'
5949
+ | 'failed'
5950
+ | 'deleted'
5951
+ | 'carrier_rejected'
5952
+ | 'compliance_review_failed'
5953
+ | 'incomplete_documentation'
5954
+ | 'incorrect_billing_information'
5955
+ | 'ineligible_carrier'
5956
+ | 'loa_file_invalid'
5957
+ | 'loa_file_successful';
5958
+
5959
+ /**
5960
+ * The messaging profile associated with the order.
5961
+ */
5962
+ profile_id?: string;
5963
+
5964
+ /**
5965
+ * The organization that owns the order.
5966
+ */
5967
+ user_id?: string;
5968
+ }
5969
+
5970
+ export namespace Payload {
5971
+ export interface Number {
5972
+ /**
5973
+ * Current status of this phone number within the order.
5974
+ */
5975
+ status?:
5976
+ | 'deleted'
5977
+ | 'failed'
5978
+ | 'failed_activation'
5979
+ | 'failed_carrier_rejected'
5980
+ | 'failed_ineligible_carrier'
5981
+ | 'failed_number_already_hosted'
5982
+ | 'failed_number_not_found'
5983
+ | 'failed_ownership_verification'
5984
+ | 'failed_timeout'
5985
+ | 'ownership_successful'
5986
+ | 'pending'
5987
+ | 'provisioning'
5988
+ | 'successful';
5989
+
5990
+ /**
5991
+ * Phone number in +E.164 format.
5992
+ */
5993
+ value?: string;
5994
+ }
5995
+ }
5996
+ }
5997
+ }
5998
+
5173
5999
  export interface InboundMessageWebhookEvent {
5174
6000
  data?: InboundMessage;
5175
6001
  }
@@ -5191,12 +6017,15 @@ export type UnsafeUnwrapWebhookEvent =
5191
6017
  | CallConversationEndedWebhookEvent
5192
6018
  | CallConversationInsightsGeneratedWebhookEvent
5193
6019
  | CallCostWebhookEvent
6020
+ | CallDeepfakeDetectionErrorWebhookEvent
6021
+ | CallDeepfakeDetectionResultWebhookEvent
5194
6022
  | CallDtmfReceivedWebhookEvent
5195
6023
  | CallEnqueuedWebhookEvent
5196
6024
  | CallForkStartedWebhookEvent
5197
6025
  | CallForkStoppedWebhookEvent
5198
6026
  | CallGatherEndedWebhookEvent
5199
6027
  | CallHangupWebhookEvent
6028
+ | CallHoldWebhookEvent
5200
6029
  | CallInitiatedWebhookEvent
5201
6030
  | CallLeftQueueWebhookEvent
5202
6031
  | CallMachineDetectionEndedWebhookEvent
@@ -5219,6 +6048,7 @@ export type UnsafeUnwrapWebhookEvent =
5219
6048
  | CallStreamingFailedWebhookEvent
5220
6049
  | CallStreamingStartedWebhookEvent
5221
6050
  | CallStreamingStoppedWebhookEvent
6051
+ | CallUnholdWebhookEvent
5222
6052
  | CampaignStatusUpdate
5223
6053
  | ConferenceCreatedWebhookEvent
5224
6054
  | ConferenceEndedWebhookEvent
@@ -5240,6 +6070,7 @@ export type UnsafeUnwrapWebhookEvent =
5240
6070
  | FaxMediaProcessed
5241
6071
  | FaxQueued
5242
6072
  | FaxSendingStarted
6073
+ | HostedNumberOrderEventWebhookEvent
5243
6074
  | InboundMessageWebhookEvent
5244
6075
  | NumberOrderStatusUpdate
5245
6076
  | ReplacedLinkClickWebhookEvent
@@ -5254,12 +6085,15 @@ export type UnwrapWebhookEvent =
5254
6085
  | CallConversationEndedWebhookEvent
5255
6086
  | CallConversationInsightsGeneratedWebhookEvent
5256
6087
  | CallCostWebhookEvent
6088
+ | CallDeepfakeDetectionErrorWebhookEvent
6089
+ | CallDeepfakeDetectionResultWebhookEvent
5257
6090
  | CallDtmfReceivedWebhookEvent
5258
6091
  | CallEnqueuedWebhookEvent
5259
6092
  | CallForkStartedWebhookEvent
5260
6093
  | CallForkStoppedWebhookEvent
5261
6094
  | CallGatherEndedWebhookEvent
5262
6095
  | CallHangupWebhookEvent
6096
+ | CallHoldWebhookEvent
5263
6097
  | CallInitiatedWebhookEvent
5264
6098
  | CallLeftQueueWebhookEvent
5265
6099
  | CallMachineDetectionEndedWebhookEvent
@@ -5282,6 +6116,7 @@ export type UnwrapWebhookEvent =
5282
6116
  | CallStreamingFailedWebhookEvent
5283
6117
  | CallStreamingStartedWebhookEvent
5284
6118
  | CallStreamingStoppedWebhookEvent
6119
+ | CallUnholdWebhookEvent
5285
6120
  | CampaignStatusUpdate
5286
6121
  | ConferenceCreatedWebhookEvent
5287
6122
  | ConferenceEndedWebhookEvent
@@ -5303,6 +6138,7 @@ export type UnwrapWebhookEvent =
5303
6138
  | FaxMediaProcessed
5304
6139
  | FaxQueued
5305
6140
  | FaxSendingStarted
6141
+ | HostedNumberOrderEventWebhookEvent
5306
6142
  | InboundMessageWebhookEvent
5307
6143
  | NumberOrderStatusUpdate
5308
6144
  | ReplacedLinkClickWebhookEvent
@@ -5378,12 +6214,15 @@ export declare namespace Webhooks {
5378
6214
  type CallConversationEndedWebhookEvent as CallConversationEndedWebhookEvent,
5379
6215
  type CallConversationInsightsGeneratedWebhookEvent as CallConversationInsightsGeneratedWebhookEvent,
5380
6216
  type CallCostWebhookEvent as CallCostWebhookEvent,
6217
+ type CallDeepfakeDetectionErrorWebhookEvent as CallDeepfakeDetectionErrorWebhookEvent,
6218
+ type CallDeepfakeDetectionResultWebhookEvent as CallDeepfakeDetectionResultWebhookEvent,
5381
6219
  type CallDtmfReceivedWebhookEvent as CallDtmfReceivedWebhookEvent,
5382
6220
  type CallEnqueuedWebhookEvent as CallEnqueuedWebhookEvent,
5383
6221
  type CallForkStartedWebhookEvent as CallForkStartedWebhookEvent,
5384
6222
  type CallForkStoppedWebhookEvent as CallForkStoppedWebhookEvent,
5385
6223
  type CallGatherEndedWebhookEvent as CallGatherEndedWebhookEvent,
5386
6224
  type CallHangupWebhookEvent as CallHangupWebhookEvent,
6225
+ type CallHoldWebhookEvent as CallHoldWebhookEvent,
5387
6226
  type CallInitiatedWebhookEvent as CallInitiatedWebhookEvent,
5388
6227
  type CallLeftQueueWebhookEvent as CallLeftQueueWebhookEvent,
5389
6228
  type CallMachineDetectionEndedWebhookEvent as CallMachineDetectionEndedWebhookEvent,
@@ -5406,6 +6245,7 @@ export declare namespace Webhooks {
5406
6245
  type CallStreamingFailedWebhookEvent as CallStreamingFailedWebhookEvent,
5407
6246
  type CallStreamingStartedWebhookEvent as CallStreamingStartedWebhookEvent,
5408
6247
  type CallStreamingStoppedWebhookEvent as CallStreamingStoppedWebhookEvent,
6248
+ type CallUnholdWebhookEvent as CallUnholdWebhookEvent,
5409
6249
  type ConferenceCreatedWebhookEvent as ConferenceCreatedWebhookEvent,
5410
6250
  type ConferenceEndedWebhookEvent as ConferenceEndedWebhookEvent,
5411
6251
  type ConferenceParticipantJoinedWebhookEvent as ConferenceParticipantJoinedWebhookEvent,
@@ -5420,6 +6260,7 @@ export declare namespace Webhooks {
5420
6260
  type ConferenceSpeakEndedWebhookEvent as ConferenceSpeakEndedWebhookEvent,
5421
6261
  type ConferenceSpeakStartedWebhookEvent as ConferenceSpeakStartedWebhookEvent,
5422
6262
  type DeliveryUpdateWebhookEvent as DeliveryUpdateWebhookEvent,
6263
+ type HostedNumberOrderEventWebhookEvent as HostedNumberOrderEventWebhookEvent,
5423
6264
  type InboundMessageWebhookEvent as InboundMessageWebhookEvent,
5424
6265
  type ReplacedLinkClickWebhookEvent as ReplacedLinkClickWebhookEvent,
5425
6266
  type TranscriptionWebhookEvent as TranscriptionWebhookEvent,