telnyx 7.27.0 → 7.28.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 (97) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/client.d.mts +11 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +11 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js +9 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +9 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/ai/assistants/assistants.d.mts +11 -0
  12. package/resources/ai/assistants/assistants.d.mts.map +1 -1
  13. package/resources/ai/assistants/assistants.d.ts +11 -0
  14. package/resources/ai/assistants/assistants.d.ts.map +1 -1
  15. package/resources/ai/assistants/assistants.js.map +1 -1
  16. package/resources/ai/assistants/assistants.mjs.map +1 -1
  17. package/resources/ai/audio.d.mts +22 -11
  18. package/resources/ai/audio.d.mts.map +1 -1
  19. package/resources/ai/audio.d.ts +22 -11
  20. package/resources/ai/audio.d.ts.map +1 -1
  21. package/resources/compute/compute.d.mts +75 -2
  22. package/resources/compute/compute.d.mts.map +1 -1
  23. package/resources/compute/compute.d.ts +75 -2
  24. package/resources/compute/compute.d.ts.map +1 -1
  25. package/resources/compute/compute.js +17 -0
  26. package/resources/compute/compute.js.map +1 -1
  27. package/resources/compute/compute.mjs +17 -0
  28. package/resources/compute/compute.mjs.map +1 -1
  29. package/resources/compute/funcs/export.d.mts +3 -0
  30. package/resources/compute/funcs/export.d.mts.map +1 -1
  31. package/resources/compute/funcs/export.d.ts +3 -0
  32. package/resources/compute/funcs/export.d.ts.map +1 -1
  33. package/resources/compute/funcs/export.js +3 -0
  34. package/resources/compute/funcs/export.js.map +1 -1
  35. package/resources/compute/funcs/export.mjs +3 -0
  36. package/resources/compute/funcs/export.mjs.map +1 -1
  37. package/resources/compute/funcs/funcs.d.mts +60 -1
  38. package/resources/compute/funcs/funcs.d.mts.map +1 -1
  39. package/resources/compute/funcs/funcs.d.ts +60 -1
  40. package/resources/compute/funcs/funcs.d.ts.map +1 -1
  41. package/resources/compute/funcs/funcs.js +24 -0
  42. package/resources/compute/funcs/funcs.js.map +1 -1
  43. package/resources/compute/funcs/funcs.mjs +24 -0
  44. package/resources/compute/funcs/funcs.mjs.map +1 -1
  45. package/resources/compute/funcs/index.d.mts +1 -1
  46. package/resources/compute/funcs/index.d.mts.map +1 -1
  47. package/resources/compute/funcs/index.d.ts +1 -1
  48. package/resources/compute/funcs/index.d.ts.map +1 -1
  49. package/resources/compute/funcs/index.js.map +1 -1
  50. package/resources/compute/funcs/index.mjs.map +1 -1
  51. package/resources/compute/index.d.mts +2 -2
  52. package/resources/compute/index.d.mts.map +1 -1
  53. package/resources/compute/index.d.ts +2 -2
  54. package/resources/compute/index.d.ts.map +1 -1
  55. package/resources/compute/index.js.map +1 -1
  56. package/resources/compute/index.mjs.map +1 -1
  57. package/resources/index.d.mts +2 -1
  58. package/resources/index.d.mts.map +1 -1
  59. package/resources/index.d.ts +2 -1
  60. package/resources/index.d.ts.map +1 -1
  61. package/resources/index.js +3 -1
  62. package/resources/index.js.map +1 -1
  63. package/resources/index.mjs +1 -0
  64. package/resources/index.mjs.map +1 -1
  65. package/resources/network-coverage.d.mts +1 -1
  66. package/resources/network-coverage.d.mts.map +1 -1
  67. package/resources/network-coverage.d.ts +1 -1
  68. package/resources/network-coverage.d.ts.map +1 -1
  69. package/resources/number-lookup.d.mts +122 -4
  70. package/resources/number-lookup.d.mts.map +1 -1
  71. package/resources/number-lookup.d.ts +122 -4
  72. package/resources/number-lookup.d.ts.map +1 -1
  73. package/resources/tailscale-subnet-routers.d.mts +233 -0
  74. package/resources/tailscale-subnet-routers.d.mts.map +1 -0
  75. package/resources/tailscale-subnet-routers.d.ts +233 -0
  76. package/resources/tailscale-subnet-routers.d.ts.map +1 -0
  77. package/resources/tailscale-subnet-routers.js +105 -0
  78. package/resources/tailscale-subnet-routers.js.map +1 -0
  79. package/resources/tailscale-subnet-routers.mjs +101 -0
  80. package/resources/tailscale-subnet-routers.mjs.map +1 -0
  81. package/src/client.ts +35 -2
  82. package/src/resources/ai/assistants/assistants.ts +12 -0
  83. package/src/resources/ai/audio.ts +23 -11
  84. package/src/resources/compute/compute.ts +105 -0
  85. package/src/resources/compute/funcs/export.ts +3 -0
  86. package/src/resources/compute/funcs/funcs.ts +99 -0
  87. package/src/resources/compute/funcs/index.ts +3 -0
  88. package/src/resources/compute/index.ts +4 -1
  89. package/src/resources/index.ts +13 -1
  90. package/src/resources/network-coverage.ts +5 -1
  91. package/src/resources/number-lookup.ts +154 -4
  92. package/src/resources/tailscale-subnet-routers.ts +303 -0
  93. package/src/version.ts +1 -1
  94. package/version.d.mts +1 -1
  95. package/version.d.ts +1 -1
  96. package/version.js +1 -1
  97. package/version.mjs +1 -1
@@ -0,0 +1,303 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { DefaultFlatPagination, type DefaultFlatPaginationParams, PagePromise } from '../core/pagination';
6
+ import { RequestOptions } from '../internal/request-options';
7
+ import { path } from '../internal/utils/path';
8
+
9
+ /**
10
+ * Tailscale Subnet Router operations
11
+ */
12
+ export class TailscaleSubnetRouters extends APIResource {
13
+ /**
14
+ * Returns a paginated list of the Tailscale Subnet Routers on the account, with
15
+ * support for filtering by Network.
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * // Automatically fetches more pages as needed.
20
+ * for await (const tailscaleSubnetRouter of client.tailscaleSubnetRouters.list()) {
21
+ * // ...
22
+ * }
23
+ * ```
24
+ */
25
+ list(
26
+ query: TailscaleSubnetRouterListParams | null | undefined = {},
27
+ options?: RequestOptions,
28
+ ): PagePromise<TailscaleSubnetRoutersDefaultFlatPagination, TailscaleSubnetRouter> {
29
+ return this._client.getAPIList(
30
+ '/tailscale_subnet_routers',
31
+ DefaultFlatPagination<TailscaleSubnetRouter>,
32
+ { query, ...options },
33
+ );
34
+ }
35
+
36
+ /**
37
+ * Creates a Tailscale Subnet Router on a Network and enrolls it in the user's
38
+ * tailnet with the auth key. The response returns the router with `status`
39
+ * `provisioning`. Poll `GET /tailscale_subnet_routers/{id}` until it is
40
+ * `provisioned`. Then approve its routes in the tailnet, unless an auto-approver
41
+ * covers them.
42
+ *
43
+ * @example
44
+ * ```ts
45
+ * const tailscaleSubnetRouter =
46
+ * await client.tailscaleSubnetRouters.create({
47
+ * advertised_routes: ['172.27.0.0/24'],
48
+ * auth_key: 'tskey-auth-k1AbCdEfGh2IjKlMnOpQrStUv',
49
+ * name: 'tailnet-ashburn',
50
+ * network_id: '0de011ae-ee53-4df4-ba96-754728eb5aad',
51
+ * region_code: 'ashburn-va',
52
+ * });
53
+ * ```
54
+ */
55
+ create(
56
+ body: TailscaleSubnetRouterCreateParams,
57
+ options?: RequestOptions,
58
+ ): APIPromise<TailscaleSubnetRouterCreateResponse> {
59
+ return this._client.post('/tailscale_subnet_routers', { body, ...options });
60
+ }
61
+
62
+ /**
63
+ * Removes the router from the Network and logs it out of the tailnet. The response
64
+ * returns the router with `status` `deleting`. The record disappears once removal
65
+ * completes. A machine entry can remain in the tailnet's admin console until it is
66
+ * removed there.
67
+ *
68
+ * @example
69
+ * ```ts
70
+ * const tailscaleSubnetRouter =
71
+ * await client.tailscaleSubnetRouters.delete(
72
+ * '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
73
+ * );
74
+ * ```
75
+ */
76
+ delete(id: string, options?: RequestOptions): APIPromise<TailscaleSubnetRouterDeleteResponse> {
77
+ return this._client.delete(path`/tailscale_subnet_routers/${id}`, options);
78
+ }
79
+
80
+ /**
81
+ * Returns the details of a single Tailscale Subnet Router by its identifier,
82
+ * including its enrollment state.
83
+ *
84
+ * @example
85
+ * ```ts
86
+ * const tailscaleSubnetRouter =
87
+ * await client.tailscaleSubnetRouters.retrieve(
88
+ * '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
89
+ * );
90
+ * ```
91
+ */
92
+ retrieve(id: string, options?: RequestOptions): APIPromise<TailscaleSubnetRouterRetrieveResponse> {
93
+ return this._client.get(path`/tailscale_subnet_routers/${id}`, options);
94
+ }
95
+
96
+ /**
97
+ * Renames the router, changes its advertised routes, or retries a failed
98
+ * enrollment. Any change queues a new provisioning run and returns the router with
99
+ * `status` `provisioning`. The router keeps its machine identity on the tailnet.
100
+ * Send an empty object to retry a `failed` router with its stored auth key.
101
+ * Include a new `auth_key` only while the router has never enrolled. The router's
102
+ * Network and region cannot change: create a new router instead.
103
+ *
104
+ * @example
105
+ * ```ts
106
+ * const tailscaleSubnetRouter =
107
+ * await client.tailscaleSubnetRouters.update(
108
+ * '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
109
+ * {
110
+ * advertised_routes: ['172.27.0.0/24', '172.27.1.0/24'],
111
+ * },
112
+ * );
113
+ * ```
114
+ */
115
+ update(
116
+ id: string,
117
+ body: TailscaleSubnetRouterUpdateParams,
118
+ options?: RequestOptions,
119
+ ): APIPromise<TailscaleSubnetRouterUpdateResponse> {
120
+ return this._client.patch(path`/tailscale_subnet_routers/${id}`, { body, ...options });
121
+ }
122
+ }
123
+
124
+ export type TailscaleSubnetRoutersDefaultFlatPagination = DefaultFlatPagination<TailscaleSubnetRouter>;
125
+
126
+ export interface TailscaleSubnetRouter {
127
+ /**
128
+ * Identifies the resource.
129
+ */
130
+ id?: string;
131
+
132
+ /**
133
+ * IPv4 subnets of the Network that the router advertises to the tailnet. Each
134
+ * entry is a canonical CIDR that the Network routes. Default, loopback,
135
+ * link-local, multicast, and Tailscale (`100.64.0.0/10`) ranges are rejected. So
136
+ * are ranges that overlap the router's own, `172.27.254.0/24` and `198.18.0.0/20`.
137
+ */
138
+ advertised_routes?: Array<string>;
139
+
140
+ /**
141
+ * ISO 8601 formatted date-time indicating when the resource was created.
142
+ */
143
+ created_at?: string;
144
+
145
+ /**
146
+ * The router's address on the Network, from `172.27.254.0/24`. Tailnet traffic
147
+ * enters the Network from this address.
148
+ */
149
+ customer_address?: string;
150
+
151
+ /**
152
+ * The router's node id on the tailnet. Set once the router has enrolled.
153
+ */
154
+ device_id?: string | null;
155
+
156
+ /**
157
+ * A user specified name for the router.
158
+ */
159
+ name?: string;
160
+
161
+ /**
162
+ * The id of the Network the router is attached to.
163
+ */
164
+ network_id?: string;
165
+
166
+ /**
167
+ * Identifies the type of the resource.
168
+ */
169
+ record_type?: string;
170
+
171
+ /**
172
+ * The code of the region the router is created in. `GET /network_coverage` lists
173
+ * the regions whose `available_services` include `tailscale_subnet_router`.
174
+ */
175
+ region_code?: string;
176
+
177
+ /**
178
+ * `provisioning`: Telnyx is creating the router or applying a change.
179
+ * `provisioned`: the router is on the tailnet and advertises its routes; the
180
+ * tailnet still approves them. `failed`: enrollment did not complete, and `PATCH`
181
+ * retries it. `deleting`: the router is being removed.
182
+ */
183
+ status?: 'provisioning' | 'provisioned' | 'failed' | 'deleting';
184
+
185
+ /**
186
+ * The name of the tailnet the router is enrolled in. Set once the router has
187
+ * enrolled.
188
+ */
189
+ tailnet_name?: string | null;
190
+
191
+ /**
192
+ * The router's addresses on the tailnet. Empty until the router has enrolled.
193
+ */
194
+ tailscale_ips?: Array<string>;
195
+
196
+ /**
197
+ * ISO 8601 formatted date-time indicating when the resource was updated.
198
+ */
199
+ updated_at?: string;
200
+ }
201
+
202
+ export interface TailscaleSubnetRouterCreateResponse {
203
+ data?: TailscaleSubnetRouter;
204
+ }
205
+
206
+ export interface TailscaleSubnetRouterRetrieveResponse {
207
+ data?: TailscaleSubnetRouter;
208
+ }
209
+
210
+ export interface TailscaleSubnetRouterUpdateResponse {
211
+ data?: TailscaleSubnetRouter;
212
+ }
213
+
214
+ export interface TailscaleSubnetRouterDeleteResponse {
215
+ data?: TailscaleSubnetRouter;
216
+ }
217
+
218
+ export interface TailscaleSubnetRouterListParams extends DefaultFlatPaginationParams {
219
+ /**
220
+ * Consolidated filter parameter (deepObject style). Originally: filter[network_id]
221
+ */
222
+ filter?: TailscaleSubnetRouterListParams.Filter;
223
+ }
224
+
225
+ export namespace TailscaleSubnetRouterListParams {
226
+ /**
227
+ * Consolidated filter parameter (deepObject style). Originally: filter[network_id]
228
+ */
229
+ export interface Filter {
230
+ /**
231
+ * The id of the Network to filter on.
232
+ */
233
+ network_id?: string;
234
+ }
235
+ }
236
+
237
+ export interface TailscaleSubnetRouterCreateParams {
238
+ /**
239
+ * IPv4 subnets of the Network that the router advertises to the tailnet. Each
240
+ * entry is a canonical CIDR that the Network routes. Default, loopback,
241
+ * link-local, multicast, and Tailscale (`100.64.0.0/10`) ranges are rejected. So
242
+ * are ranges that overlap the router's own, `172.27.254.0/24` and `198.18.0.0/20`.
243
+ */
244
+ advertised_routes: Array<string>;
245
+
246
+ /**
247
+ * A Tailscale auth key that enrolls the router in the user's tailnet: reusable,
248
+ * pre-approved, tagged, and not ephemeral. Telnyx stores it encrypted until
249
+ * enrollment succeeds, then discards it. It is never returned.
250
+ */
251
+ auth_key: string;
252
+
253
+ /**
254
+ * A user specified name for the router.
255
+ */
256
+ name: string;
257
+
258
+ /**
259
+ * The id of the Network to attach the router to.
260
+ */
261
+ network_id: string;
262
+
263
+ /**
264
+ * The code of the region to create the router in. `GET /network_coverage` lists
265
+ * the regions whose `available_services` include `tailscale_subnet_router`.
266
+ */
267
+ region_code: string;
268
+ }
269
+
270
+ export interface TailscaleSubnetRouterUpdateParams {
271
+ /**
272
+ * IPv4 subnets of the Network that the router advertises to the tailnet. Each
273
+ * entry is a canonical CIDR that the Network routes. Default, loopback,
274
+ * link-local, multicast, and Tailscale (`100.64.0.0/10`) ranges are rejected. So
275
+ * are ranges that overlap the router's own, `172.27.254.0/24` and `198.18.0.0/20`.
276
+ */
277
+ advertised_routes?: Array<string>;
278
+
279
+ /**
280
+ * A replacement Tailscale auth key. Accepted only while the router has never
281
+ * enrolled, for example after a `failed` enrollment. Never returned.
282
+ */
283
+ auth_key?: string;
284
+
285
+ /**
286
+ * A user specified name for the router.
287
+ */
288
+ name?: string;
289
+ }
290
+
291
+ export declare namespace TailscaleSubnetRouters {
292
+ export {
293
+ type TailscaleSubnetRouter as TailscaleSubnetRouter,
294
+ type TailscaleSubnetRouterCreateResponse as TailscaleSubnetRouterCreateResponse,
295
+ type TailscaleSubnetRouterRetrieveResponse as TailscaleSubnetRouterRetrieveResponse,
296
+ type TailscaleSubnetRouterUpdateResponse as TailscaleSubnetRouterUpdateResponse,
297
+ type TailscaleSubnetRouterDeleteResponse as TailscaleSubnetRouterDeleteResponse,
298
+ type TailscaleSubnetRoutersDefaultFlatPagination as TailscaleSubnetRoutersDefaultFlatPagination,
299
+ type TailscaleSubnetRouterListParams as TailscaleSubnetRouterListParams,
300
+ type TailscaleSubnetRouterCreateParams as TailscaleSubnetRouterCreateParams,
301
+ type TailscaleSubnetRouterUpdateParams as TailscaleSubnetRouterUpdateParams,
302
+ };
303
+ }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '7.27.0'; // x-release-please-version
1
+ export const VERSION = '7.28.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "7.27.0";
1
+ export declare const VERSION = "7.28.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "7.27.0";
1
+ export declare const VERSION = "7.28.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.27.0'; // x-release-please-version
4
+ exports.VERSION = '7.28.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '7.27.0'; // x-release-please-version
1
+ export const VERSION = '7.28.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map