telnyx 6.35.0 → 6.37.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 (82) hide show
  1. package/CHANGELOG.md +22 -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.map +1 -1
  7. package/client.mjs +1 -1
  8. package/client.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/resources/enterprises/enterprises.d.mts +2 -2
  11. package/resources/enterprises/enterprises.d.mts.map +1 -1
  12. package/resources/enterprises/enterprises.d.ts +2 -2
  13. package/resources/enterprises/enterprises.d.ts.map +1 -1
  14. package/resources/enterprises/index.d.mts +1 -1
  15. package/resources/enterprises/index.d.mts.map +1 -1
  16. package/resources/enterprises/index.d.ts +1 -1
  17. package/resources/enterprises/index.d.ts.map +1 -1
  18. package/resources/enterprises/reputation/index.d.mts +2 -2
  19. package/resources/enterprises/reputation/index.d.mts.map +1 -1
  20. package/resources/enterprises/reputation/index.d.ts +2 -2
  21. package/resources/enterprises/reputation/index.d.ts.map +1 -1
  22. package/resources/enterprises/reputation/numbers.d.mts +43 -43
  23. package/resources/enterprises/reputation/numbers.d.mts.map +1 -1
  24. package/resources/enterprises/reputation/numbers.d.ts +43 -43
  25. package/resources/enterprises/reputation/numbers.d.ts.map +1 -1
  26. package/resources/enterprises/reputation/numbers.js +31 -31
  27. package/resources/enterprises/reputation/numbers.js.map +1 -1
  28. package/resources/enterprises/reputation/numbers.mjs +31 -31
  29. package/resources/enterprises/reputation/numbers.mjs.map +1 -1
  30. package/resources/enterprises/reputation/reputation.d.mts +45 -46
  31. package/resources/enterprises/reputation/reputation.d.mts.map +1 -1
  32. package/resources/enterprises/reputation/reputation.d.ts +45 -46
  33. package/resources/enterprises/reputation/reputation.d.ts.map +1 -1
  34. package/resources/enterprises/reputation/reputation.js +43 -44
  35. package/resources/enterprises/reputation/reputation.js.map +1 -1
  36. package/resources/enterprises/reputation/reputation.mjs +43 -44
  37. package/resources/enterprises/reputation/reputation.mjs.map +1 -1
  38. package/resources/index.d.mts +1 -1
  39. package/resources/index.d.mts.map +1 -1
  40. package/resources/index.d.ts +1 -1
  41. package/resources/index.d.ts.map +1 -1
  42. package/resources/index.js.map +1 -1
  43. package/resources/index.mjs +1 -1
  44. package/resources/index.mjs.map +1 -1
  45. package/resources/texml/accounts/calls/calls.d.mts +613 -201
  46. package/resources/texml/accounts/calls/calls.d.mts.map +1 -1
  47. package/resources/texml/accounts/calls/calls.d.ts +613 -201
  48. package/resources/texml/accounts/calls/calls.d.ts.map +1 -1
  49. package/resources/texml/accounts/calls/calls.js +1 -5
  50. package/resources/texml/accounts/calls/calls.js.map +1 -1
  51. package/resources/texml/accounts/calls/calls.mjs +1 -5
  52. package/resources/texml/accounts/calls/calls.mjs.map +1 -1
  53. package/resources/texml/index.d.mts +1 -1
  54. package/resources/texml/index.d.mts.map +1 -1
  55. package/resources/texml/index.d.ts +1 -1
  56. package/resources/texml/index.d.ts.map +1 -1
  57. package/resources/texml/index.js.map +1 -1
  58. package/resources/texml/index.mjs +1 -1
  59. package/resources/texml/index.mjs.map +1 -1
  60. package/resources/texml/texml.d.mts +219 -1
  61. package/resources/texml/texml.d.mts.map +1 -1
  62. package/resources/texml/texml.d.ts +219 -1
  63. package/resources/texml/texml.d.ts.map +1 -1
  64. package/resources/texml/texml.js +26 -0
  65. package/resources/texml/texml.js.map +1 -1
  66. package/resources/texml/texml.mjs +26 -0
  67. package/resources/texml/texml.mjs.map +1 -1
  68. package/src/client.ts +9 -1
  69. package/src/resources/enterprises/enterprises.ts +6 -6
  70. package/src/resources/enterprises/index.ts +3 -3
  71. package/src/resources/enterprises/reputation/index.ts +6 -6
  72. package/src/resources/enterprises/reputation/numbers.ts +58 -54
  73. package/src/resources/enterprises/reputation/reputation.ts +60 -61
  74. package/src/resources/index.ts +7 -1
  75. package/src/resources/texml/accounts/calls/calls.ts +705 -202
  76. package/src/resources/texml/index.ts +7 -1
  77. package/src/resources/texml/texml.ts +279 -1
  78. package/src/version.ts +1 -1
  79. package/version.d.mts +1 -1
  80. package/version.d.ts +1 -1
  81. package/version.js +1 -1
  82. package/version.mjs +1 -1
@@ -3,9 +3,9 @@
3
3
  import { APIResource } from '../../../core/resource';
4
4
  import * as NumbersAPI from './numbers';
5
5
  import {
6
- NumberCreateParams,
7
- NumberCreateResponse,
8
- NumberDeleteParams,
6
+ NumberAssociateParams,
7
+ NumberAssociateResponse,
8
+ NumberDisassociateParams,
9
9
  NumberListParams,
10
10
  NumberRetrieveParams,
11
11
  NumberRetrieveResponse,
@@ -22,50 +22,6 @@ import { path } from '../../../internal/utils/path';
22
22
  export class Reputation extends APIResource {
23
23
  numbers: NumbersAPI.Numbers = new NumbersAPI.Numbers(this._client);
24
24
 
25
- /**
26
- * Enable Number Reputation service for an enterprise.
27
- *
28
- * **Requirements:**
29
- *
30
- * - Signed LOA (Letter of Authorization) document ID
31
- * - Reputation check frequency (defaults to `business_daily`)
32
- * - Number Reputation Terms of Service must be accepted
33
- *
34
- * **Flow:**
35
- *
36
- * 1. Registers the enterprise for reputation monitoring
37
- * 2. Creates reputation settings with `pending` status
38
- * 3. Awaits admin approval before monitoring begins
39
- *
40
- * **Resubmission After Rejection:** If a previously rejected record exists, this
41
- * endpoint will delete it and create a new `pending` record.
42
- *
43
- * **Available Frequencies:**
44
- *
45
- * - `business_daily` — Monday–Friday
46
- * - `daily` — Every day
47
- * - `weekly` — Once per week
48
- * - `biweekly` — Once every two weeks
49
- * - `monthly` — Once per month
50
- * - `never` — Manual refresh only
51
- *
52
- * @example
53
- * ```ts
54
- * const reputation =
55
- * await client.enterprises.reputation.create(
56
- * '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
57
- * { loa_document_id: 'doc_01HXYZ1234ABCDEF' },
58
- * );
59
- * ```
60
- */
61
- create(
62
- enterpriseID: string,
63
- body: ReputationCreateParams,
64
- options?: RequestOptions,
65
- ): APIPromise<ReputationCreateResponse> {
66
- return this._client.post(path`/enterprises/${enterpriseID}/reputation`, { body, ...options });
67
- }
68
-
69
25
  /**
70
26
  * Retrieve the current Number Reputation settings for an enterprise.
71
27
  *
@@ -76,13 +32,13 @@ export class Reputation extends APIResource {
76
32
  *
77
33
  * @example
78
34
  * ```ts
79
- * const reputations =
80
- * await client.enterprises.reputation.list(
35
+ * const reputation =
36
+ * await client.enterprises.reputation.retrieve(
81
37
  * '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
82
38
  * );
83
39
  * ```
84
40
  */
85
- list(enterpriseID: string, options?: RequestOptions): APIPromise<ReputationListResponse> {
41
+ retrieve(enterpriseID: string, options?: RequestOptions): APIPromise<ReputationRetrieveResponse> {
86
42
  return this._client.get(path`/enterprises/${enterpriseID}/reputation`, options);
87
43
  }
88
44
 
@@ -99,18 +55,61 @@ export class Reputation extends APIResource {
99
55
  *
100
56
  * @example
101
57
  * ```ts
102
- * await client.enterprises.reputation.deleteAll(
58
+ * await client.enterprises.reputation.disable(
103
59
  * '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
104
60
  * );
105
61
  * ```
106
62
  */
107
- deleteAll(enterpriseID: string, options?: RequestOptions): APIPromise<void> {
63
+ disable(enterpriseID: string, options?: RequestOptions): APIPromise<void> {
108
64
  return this._client.delete(path`/enterprises/${enterpriseID}/reputation`, {
109
65
  ...options,
110
66
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
111
67
  });
112
68
  }
113
69
 
70
+ /**
71
+ * Enable Number Reputation service for an enterprise.
72
+ *
73
+ * **Requirements:**
74
+ *
75
+ * - Signed LOA (Letter of Authorization) document ID
76
+ * - Reputation check frequency (defaults to `business_daily`)
77
+ * - Number Reputation Terms of Service must be accepted
78
+ *
79
+ * **Flow:**
80
+ *
81
+ * 1. Registers the enterprise for reputation monitoring
82
+ * 2. Creates reputation settings with `pending` status
83
+ * 3. Awaits admin approval before monitoring begins
84
+ *
85
+ * **Resubmission After Rejection:** If a previously rejected record exists, this
86
+ * endpoint will delete it and create a new `pending` record.
87
+ *
88
+ * **Available Frequencies:**
89
+ *
90
+ * - `business_daily` — Monday–Friday
91
+ * - `daily` — Every day
92
+ * - `weekly` — Once per week
93
+ * - `biweekly` — Once every two weeks
94
+ * - `monthly` — Once per month
95
+ * - `never` — Manual refresh only
96
+ *
97
+ * @example
98
+ * ```ts
99
+ * const response = await client.enterprises.reputation.enable(
100
+ * '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
101
+ * { loa_document_id: 'doc_01HXYZ1234ABCDEF' },
102
+ * );
103
+ * ```
104
+ */
105
+ enable(
106
+ enterpriseID: string,
107
+ body: ReputationEnableParams,
108
+ options?: RequestOptions,
109
+ ): APIPromise<ReputationEnableResponse> {
110
+ return this._client.post(path`/enterprises/${enterpriseID}/reputation`, { body, ...options });
111
+ }
112
+
114
113
  /**
115
114
  * Update how often reputation data is automatically refreshed.
116
115
  *
@@ -181,11 +180,11 @@ export interface EnterpriseReputationPublic {
181
180
  updated_at?: string;
182
181
  }
183
182
 
184
- export interface ReputationCreateResponse {
183
+ export interface ReputationRetrieveResponse {
185
184
  data?: EnterpriseReputationPublic;
186
185
  }
187
186
 
188
- export interface ReputationListResponse {
187
+ export interface ReputationEnableResponse {
189
188
  data?: EnterpriseReputationPublic;
190
189
  }
191
190
 
@@ -193,7 +192,7 @@ export interface ReputationUpdateFrequencyResponse {
193
192
  data?: EnterpriseReputationPublic;
194
193
  }
195
194
 
196
- export interface ReputationCreateParams {
195
+ export interface ReputationEnableParams {
197
196
  /**
198
197
  * ID of the signed Letter of Authorization (LOA) document uploaded to the document
199
198
  * service
@@ -218,20 +217,20 @@ Reputation.Numbers = Numbers;
218
217
  export declare namespace Reputation {
219
218
  export {
220
219
  type EnterpriseReputationPublic as EnterpriseReputationPublic,
221
- type ReputationCreateResponse as ReputationCreateResponse,
222
- type ReputationListResponse as ReputationListResponse,
220
+ type ReputationRetrieveResponse as ReputationRetrieveResponse,
221
+ type ReputationEnableResponse as ReputationEnableResponse,
223
222
  type ReputationUpdateFrequencyResponse as ReputationUpdateFrequencyResponse,
224
- type ReputationCreateParams as ReputationCreateParams,
223
+ type ReputationEnableParams as ReputationEnableParams,
225
224
  type ReputationUpdateFrequencyParams as ReputationUpdateFrequencyParams,
226
225
  };
227
226
 
228
227
  export {
229
228
  Numbers as Numbers,
230
- type NumberCreateResponse as NumberCreateResponse,
231
229
  type NumberRetrieveResponse as NumberRetrieveResponse,
232
- type NumberCreateParams as NumberCreateParams,
230
+ type NumberAssociateResponse as NumberAssociateResponse,
233
231
  type NumberRetrieveParams as NumberRetrieveParams,
234
232
  type NumberListParams as NumberListParams,
235
- type NumberDeleteParams as NumberDeleteParams,
233
+ type NumberAssociateParams as NumberAssociateParams,
234
+ type NumberDisassociateParams as NumberDisassociateParams,
236
235
  };
237
236
  }
@@ -1195,7 +1195,13 @@ export {
1195
1195
  type TelephonyCredentialsDefaultFlatPagination,
1196
1196
  } from './telephony-credentials';
1197
1197
  export { TermsOfService } from './terms-of-service/terms-of-service';
1198
- export { Texml, type TexmlSecretsResponse, type TexmlSecretsParams } from './texml/texml';
1198
+ export {
1199
+ Texml,
1200
+ type TexmlInitiateAICallResponse,
1201
+ type TexmlSecretsResponse,
1202
+ type TexmlInitiateAICallParams,
1203
+ type TexmlSecretsParams,
1204
+ } from './texml/texml';
1199
1205
  export {
1200
1206
  TexmlApplications,
1201
1207
  type TexmlApplication,