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.
- package/CHANGELOG.md +7 -0
- package/client.d.mts +11 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +11 -2
- package/client.d.ts.map +1 -1
- package/client.js +9 -0
- package/client.js.map +1 -1
- package/client.mjs +9 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/ai/assistants/assistants.d.mts +11 -0
- package/resources/ai/assistants/assistants.d.mts.map +1 -1
- package/resources/ai/assistants/assistants.d.ts +11 -0
- package/resources/ai/assistants/assistants.d.ts.map +1 -1
- package/resources/ai/assistants/assistants.js.map +1 -1
- package/resources/ai/assistants/assistants.mjs.map +1 -1
- package/resources/ai/audio.d.mts +22 -11
- package/resources/ai/audio.d.mts.map +1 -1
- package/resources/ai/audio.d.ts +22 -11
- package/resources/ai/audio.d.ts.map +1 -1
- package/resources/compute/compute.d.mts +75 -2
- package/resources/compute/compute.d.mts.map +1 -1
- package/resources/compute/compute.d.ts +75 -2
- package/resources/compute/compute.d.ts.map +1 -1
- package/resources/compute/compute.js +17 -0
- package/resources/compute/compute.js.map +1 -1
- package/resources/compute/compute.mjs +17 -0
- package/resources/compute/compute.mjs.map +1 -1
- package/resources/compute/funcs/export.d.mts +3 -0
- package/resources/compute/funcs/export.d.mts.map +1 -1
- package/resources/compute/funcs/export.d.ts +3 -0
- package/resources/compute/funcs/export.d.ts.map +1 -1
- package/resources/compute/funcs/export.js +3 -0
- package/resources/compute/funcs/export.js.map +1 -1
- package/resources/compute/funcs/export.mjs +3 -0
- package/resources/compute/funcs/export.mjs.map +1 -1
- package/resources/compute/funcs/funcs.d.mts +60 -1
- package/resources/compute/funcs/funcs.d.mts.map +1 -1
- package/resources/compute/funcs/funcs.d.ts +60 -1
- package/resources/compute/funcs/funcs.d.ts.map +1 -1
- package/resources/compute/funcs/funcs.js +24 -0
- package/resources/compute/funcs/funcs.js.map +1 -1
- package/resources/compute/funcs/funcs.mjs +24 -0
- package/resources/compute/funcs/funcs.mjs.map +1 -1
- package/resources/compute/funcs/index.d.mts +1 -1
- package/resources/compute/funcs/index.d.mts.map +1 -1
- package/resources/compute/funcs/index.d.ts +1 -1
- package/resources/compute/funcs/index.d.ts.map +1 -1
- package/resources/compute/funcs/index.js.map +1 -1
- package/resources/compute/funcs/index.mjs.map +1 -1
- package/resources/compute/index.d.mts +2 -2
- package/resources/compute/index.d.mts.map +1 -1
- package/resources/compute/index.d.ts +2 -2
- package/resources/compute/index.d.ts.map +1 -1
- package/resources/compute/index.js.map +1 -1
- package/resources/compute/index.mjs.map +1 -1
- package/resources/index.d.mts +2 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/network-coverage.d.mts +1 -1
- package/resources/network-coverage.d.mts.map +1 -1
- package/resources/network-coverage.d.ts +1 -1
- package/resources/network-coverage.d.ts.map +1 -1
- package/resources/number-lookup.d.mts +122 -4
- package/resources/number-lookup.d.mts.map +1 -1
- package/resources/number-lookup.d.ts +122 -4
- package/resources/number-lookup.d.ts.map +1 -1
- package/resources/tailscale-subnet-routers.d.mts +233 -0
- package/resources/tailscale-subnet-routers.d.mts.map +1 -0
- package/resources/tailscale-subnet-routers.d.ts +233 -0
- package/resources/tailscale-subnet-routers.d.ts.map +1 -0
- package/resources/tailscale-subnet-routers.js +105 -0
- package/resources/tailscale-subnet-routers.js.map +1 -0
- package/resources/tailscale-subnet-routers.mjs +101 -0
- package/resources/tailscale-subnet-routers.mjs.map +1 -0
- package/src/client.ts +35 -2
- package/src/resources/ai/assistants/assistants.ts +12 -0
- package/src/resources/ai/audio.ts +23 -11
- package/src/resources/compute/compute.ts +105 -0
- package/src/resources/compute/funcs/export.ts +3 -0
- package/src/resources/compute/funcs/funcs.ts +99 -0
- package/src/resources/compute/funcs/index.ts +3 -0
- package/src/resources/compute/index.ts +4 -1
- package/src/resources/index.ts +13 -1
- package/src/resources/network-coverage.ts +5 -1
- package/src/resources/number-lookup.ts +154 -4
- package/src/resources/tailscale-subnet-routers.ts +303 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -15,12 +15,22 @@ export interface NumberLookupRetrieveResponse {
|
|
|
15
15
|
}
|
|
16
16
|
export declare namespace NumberLookupRetrieveResponse {
|
|
17
17
|
interface Data {
|
|
18
|
+
/**
|
|
19
|
+
* Identity information for the phone number's owner, including name and postal
|
|
20
|
+
* address. Populated when `type=caller-identity` is requested.
|
|
21
|
+
*/
|
|
22
|
+
caller_identity?: Data.CallerIdentity;
|
|
18
23
|
caller_name?: Data.CallerName;
|
|
19
24
|
carrier?: Data.Carrier;
|
|
20
25
|
/**
|
|
21
26
|
* Region code that matches the specific country calling code
|
|
22
27
|
*/
|
|
23
28
|
country_code?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Enhanced caller name for the phone number's owner. Populated when
|
|
31
|
+
* `type=enhanced-caller-name` is requested.
|
|
32
|
+
*/
|
|
33
|
+
enhanced_caller_name?: Data.EnhancedCallerName;
|
|
24
34
|
/**
|
|
25
35
|
* Unused
|
|
26
36
|
*/
|
|
@@ -30,6 +40,11 @@ export declare namespace NumberLookupRetrieveResponse {
|
|
|
30
40
|
* (NDC), with a 0 prefix, if an NDC is found
|
|
31
41
|
*/
|
|
32
42
|
national_format?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Network number ID (NNID) override for the phone number, when one applies
|
|
45
|
+
* (available only to accounts enabled for NNID); otherwise null.
|
|
46
|
+
*/
|
|
47
|
+
nnid_override?: Data.NnidOverride | null;
|
|
33
48
|
/**
|
|
34
49
|
* E164-formatted phone number
|
|
35
50
|
*/
|
|
@@ -39,8 +54,74 @@ export declare namespace NumberLookupRetrieveResponse {
|
|
|
39
54
|
* Identifies the type of record
|
|
40
55
|
*/
|
|
41
56
|
record_type?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Indicates whether the phone number is valid.
|
|
59
|
+
*/
|
|
60
|
+
valid_number?: boolean;
|
|
42
61
|
}
|
|
43
62
|
namespace Data {
|
|
63
|
+
/**
|
|
64
|
+
* Identity information for the phone number's owner, including name and postal
|
|
65
|
+
* address. Populated when `type=caller-identity` is requested.
|
|
66
|
+
*/
|
|
67
|
+
interface CallerIdentity {
|
|
68
|
+
/**
|
|
69
|
+
* Postal address associated with the phone number's owner.
|
|
70
|
+
*/
|
|
71
|
+
address?: CallerIdentity.Address;
|
|
72
|
+
/**
|
|
73
|
+
* How strongly the phone number is linked to the returned name, on a scale of 50
|
|
74
|
+
* to 90 (higher means more supporting signals). Reflects signal strength, not
|
|
75
|
+
* probability: 70 indicates stronger, more consistent evidence than 60, not a 70%
|
|
76
|
+
* chance of being correct. As a guide, 70+ is high confidence, 60 moderate, and 50
|
|
77
|
+
* limited. Below 50 no name is returned, so scores under 50 are never present.
|
|
78
|
+
*/
|
|
79
|
+
confidence_score?: number | null;
|
|
80
|
+
/**
|
|
81
|
+
* A lookup-specific error code if the identity could not be resolved; otherwise
|
|
82
|
+
* null.
|
|
83
|
+
*/
|
|
84
|
+
error_code?: string | null;
|
|
85
|
+
/**
|
|
86
|
+
* The name associated with the phone number.
|
|
87
|
+
*/
|
|
88
|
+
name?: string | null;
|
|
89
|
+
}
|
|
90
|
+
namespace CallerIdentity {
|
|
91
|
+
/**
|
|
92
|
+
* Postal address associated with the phone number's owner.
|
|
93
|
+
*/
|
|
94
|
+
interface Address {
|
|
95
|
+
/**
|
|
96
|
+
* City.
|
|
97
|
+
*/
|
|
98
|
+
city?: string | null;
|
|
99
|
+
/**
|
|
100
|
+
* Two-letter ISO 3166-1 country code.
|
|
101
|
+
*/
|
|
102
|
+
country_code?: string | null;
|
|
103
|
+
/**
|
|
104
|
+
* Postal or ZIP code.
|
|
105
|
+
*/
|
|
106
|
+
postal_code?: string | null;
|
|
107
|
+
/**
|
|
108
|
+
* Two-letter state or province code.
|
|
109
|
+
*/
|
|
110
|
+
state_code?: string | null;
|
|
111
|
+
/**
|
|
112
|
+
* First line of the street address.
|
|
113
|
+
*/
|
|
114
|
+
street_line_1?: string | null;
|
|
115
|
+
/**
|
|
116
|
+
* Second line of the street address, if any.
|
|
117
|
+
*/
|
|
118
|
+
street_line_2?: string | null;
|
|
119
|
+
/**
|
|
120
|
+
* ZIP+4 extension, if available.
|
|
121
|
+
*/
|
|
122
|
+
zip4?: string | null;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
44
125
|
interface CallerName {
|
|
45
126
|
/**
|
|
46
127
|
* The name of the requested phone number's owner as per the CNAM database
|
|
@@ -82,6 +163,39 @@ export declare namespace NumberLookupRetrieveResponse {
|
|
|
82
163
|
*/
|
|
83
164
|
type?: 'fixed line' | 'mobile' | 'voip' | 'fixed line or mobile' | 'toll free' | 'premium rate' | 'shared cost' | 'personal number' | 'pager' | 'uan' | 'voicemail' | 'unknown';
|
|
84
165
|
}
|
|
166
|
+
/**
|
|
167
|
+
* Enhanced caller name for the phone number's owner. Populated when
|
|
168
|
+
* `type=enhanced-caller-name` is requested.
|
|
169
|
+
*/
|
|
170
|
+
interface EnhancedCallerName {
|
|
171
|
+
/**
|
|
172
|
+
* The name associated with the phone number.
|
|
173
|
+
*/
|
|
174
|
+
caller_name?: string | null;
|
|
175
|
+
/**
|
|
176
|
+
* A lookup-specific error code if the enhanced caller name could not be resolved;
|
|
177
|
+
* otherwise null.
|
|
178
|
+
*/
|
|
179
|
+
error_code?: string | null;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Network number ID (NNID) override for the phone number, when one applies
|
|
183
|
+
* (available only to accounts enabled for NNID); otherwise null.
|
|
184
|
+
*/
|
|
185
|
+
interface NnidOverride {
|
|
186
|
+
/**
|
|
187
|
+
* Name associated with the NNID.
|
|
188
|
+
*/
|
|
189
|
+
name?: string;
|
|
190
|
+
/**
|
|
191
|
+
* The network number ID.
|
|
192
|
+
*/
|
|
193
|
+
nnid?: string;
|
|
194
|
+
/**
|
|
195
|
+
* The NNID type.
|
|
196
|
+
*/
|
|
197
|
+
type?: string;
|
|
198
|
+
}
|
|
85
199
|
interface Portability {
|
|
86
200
|
/**
|
|
87
201
|
* Alternative SPID (Service Provider ID). Often used when a carrier is using a
|
|
@@ -102,9 +216,10 @@ export declare namespace NumberLookupRetrieveResponse {
|
|
|
102
216
|
*/
|
|
103
217
|
city?: string;
|
|
104
218
|
/**
|
|
105
|
-
*
|
|
219
|
+
* The line type of the phone number. Uses the same value set as carrier.type; see
|
|
220
|
+
* the API reference for the full list.
|
|
106
221
|
*/
|
|
107
|
-
line_type?:
|
|
222
|
+
line_type?: 'fixed line' | 'mobile' | 'voip' | 'fixed line or mobile' | 'toll free' | 'premium rate' | 'shared cost' | 'personal number' | 'pager' | 'uan' | 'voicemail' | 'unknown';
|
|
108
223
|
/**
|
|
109
224
|
* Local Routing Number, if assigned to the requested phone number
|
|
110
225
|
*/
|
|
@@ -140,9 +255,12 @@ export declare namespace NumberLookupRetrieveResponse {
|
|
|
140
255
|
}
|
|
141
256
|
export interface NumberLookupRetrieveParams {
|
|
142
257
|
/**
|
|
143
|
-
* Specifies the type of number lookup to be performed
|
|
258
|
+
* Specifies the type of number lookup to be performed. May be supplied more than
|
|
259
|
+
* once to request several data sources in a single call (for example,
|
|
260
|
+
* `?type=carrier&type=enhanced-caller-name`). Each requested type populates the
|
|
261
|
+
* corresponding object in the response.
|
|
144
262
|
*/
|
|
145
|
-
type?: 'carrier' | 'caller-name';
|
|
263
|
+
type?: 'carrier' | 'caller-name' | 'caller-identity' | 'enhanced-caller-name';
|
|
146
264
|
}
|
|
147
265
|
export declare namespace NumberLookup {
|
|
148
266
|
export { type NumberLookupRetrieveResponse as NumberLookupRetrieveResponse, type NumberLookupRetrieveParams as NumberLookupRetrieveParams, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number-lookup.d.ts","sourceRoot":"","sources":["../src/resources/number-lookup.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;OAEG;IACH,QAAQ,CACN,WAAW,EAAE,MAAM,EACnB,KAAK,GAAE,0BAA0B,GAAG,IAAI,GAAG,SAAc,EACzD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;CAG5C;AAED,MAAM,WAAW,4BAA4B;IAC3C,IAAI,CAAC,EAAE,4BAA4B,CAAC,IAAI,CAAC;CAC1C;AAED,yBAAiB,4BAA4B,CAAC;IAC5C,UAAiB,IAAI;QACnB,WAAW,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC;QAE9B,OAAO,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC;QAEvB;;WAEG;QACH,YAAY,CAAC,EAAE,MAAM,CAAC;QAEtB;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAEtB;;;WAGG;QACH,eAAe,CAAC,EAAE,MAAM,CAAC;QAEzB;;WAEG;QACH,YAAY,CAAC,EAAE,MAAM,CAAC;QAEtB,WAAW,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC;QAE/B;;WAEG;QACH,WAAW,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"number-lookup.d.ts","sourceRoot":"","sources":["../src/resources/number-lookup.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;OA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,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { DefaultFlatPagination, type DefaultFlatPaginationParams, PagePromise } from "../core/pagination.mjs";
|
|
4
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Tailscale Subnet Router operations
|
|
7
|
+
*/
|
|
8
|
+
export declare class TailscaleSubnetRouters extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Returns a paginated list of the Tailscale Subnet Routers on the account, with
|
|
11
|
+
* support for filtering by Network.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* // Automatically fetches more pages as needed.
|
|
16
|
+
* for await (const tailscaleSubnetRouter of client.tailscaleSubnetRouters.list()) {
|
|
17
|
+
* // ...
|
|
18
|
+
* }
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
list(query?: TailscaleSubnetRouterListParams | null | undefined, options?: RequestOptions): PagePromise<TailscaleSubnetRoutersDefaultFlatPagination, TailscaleSubnetRouter>;
|
|
22
|
+
/**
|
|
23
|
+
* Creates a Tailscale Subnet Router on a Network and enrolls it in the user's
|
|
24
|
+
* tailnet with the auth key. The response returns the router with `status`
|
|
25
|
+
* `provisioning`. Poll `GET /tailscale_subnet_routers/{id}` until it is
|
|
26
|
+
* `provisioned`. Then approve its routes in the tailnet, unless an auto-approver
|
|
27
|
+
* covers them.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const tailscaleSubnetRouter =
|
|
32
|
+
* await client.tailscaleSubnetRouters.create({
|
|
33
|
+
* advertised_routes: ['172.27.0.0/24'],
|
|
34
|
+
* auth_key: 'tskey-auth-k1AbCdEfGh2IjKlMnOpQrStUv',
|
|
35
|
+
* name: 'tailnet-ashburn',
|
|
36
|
+
* network_id: '0de011ae-ee53-4df4-ba96-754728eb5aad',
|
|
37
|
+
* region_code: 'ashburn-va',
|
|
38
|
+
* });
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
create(body: TailscaleSubnetRouterCreateParams, options?: RequestOptions): APIPromise<TailscaleSubnetRouterCreateResponse>;
|
|
42
|
+
/**
|
|
43
|
+
* Removes the router from the Network and logs it out of the tailnet. The response
|
|
44
|
+
* returns the router with `status` `deleting`. The record disappears once removal
|
|
45
|
+
* completes. A machine entry can remain in the tailnet's admin console until it is
|
|
46
|
+
* removed there.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* const tailscaleSubnetRouter =
|
|
51
|
+
* await client.tailscaleSubnetRouters.delete(
|
|
52
|
+
* '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
|
|
53
|
+
* );
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
delete(id: string, options?: RequestOptions): APIPromise<TailscaleSubnetRouterDeleteResponse>;
|
|
57
|
+
/**
|
|
58
|
+
* Returns the details of a single Tailscale Subnet Router by its identifier,
|
|
59
|
+
* including its enrollment state.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```ts
|
|
63
|
+
* const tailscaleSubnetRouter =
|
|
64
|
+
* await client.tailscaleSubnetRouters.retrieve(
|
|
65
|
+
* '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
|
|
66
|
+
* );
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<TailscaleSubnetRouterRetrieveResponse>;
|
|
70
|
+
/**
|
|
71
|
+
* Renames the router, changes its advertised routes, or retries a failed
|
|
72
|
+
* enrollment. Any change queues a new provisioning run and returns the router with
|
|
73
|
+
* `status` `provisioning`. The router keeps its machine identity on the tailnet.
|
|
74
|
+
* Send an empty object to retry a `failed` router with its stored auth key.
|
|
75
|
+
* Include a new `auth_key` only while the router has never enrolled. The router's
|
|
76
|
+
* Network and region cannot change: create a new router instead.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```ts
|
|
80
|
+
* const tailscaleSubnetRouter =
|
|
81
|
+
* await client.tailscaleSubnetRouters.update(
|
|
82
|
+
* '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
|
|
83
|
+
* {
|
|
84
|
+
* advertised_routes: ['172.27.0.0/24', '172.27.1.0/24'],
|
|
85
|
+
* },
|
|
86
|
+
* );
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
update(id: string, body: TailscaleSubnetRouterUpdateParams, options?: RequestOptions): APIPromise<TailscaleSubnetRouterUpdateResponse>;
|
|
90
|
+
}
|
|
91
|
+
export type TailscaleSubnetRoutersDefaultFlatPagination = DefaultFlatPagination<TailscaleSubnetRouter>;
|
|
92
|
+
export interface TailscaleSubnetRouter {
|
|
93
|
+
/**
|
|
94
|
+
* Identifies the resource.
|
|
95
|
+
*/
|
|
96
|
+
id?: string;
|
|
97
|
+
/**
|
|
98
|
+
* IPv4 subnets of the Network that the router advertises to the tailnet. Each
|
|
99
|
+
* entry is a canonical CIDR that the Network routes. Default, loopback,
|
|
100
|
+
* link-local, multicast, and Tailscale (`100.64.0.0/10`) ranges are rejected. So
|
|
101
|
+
* are ranges that overlap the router's own, `172.27.254.0/24` and `198.18.0.0/20`.
|
|
102
|
+
*/
|
|
103
|
+
advertised_routes?: Array<string>;
|
|
104
|
+
/**
|
|
105
|
+
* ISO 8601 formatted date-time indicating when the resource was created.
|
|
106
|
+
*/
|
|
107
|
+
created_at?: string;
|
|
108
|
+
/**
|
|
109
|
+
* The router's address on the Network, from `172.27.254.0/24`. Tailnet traffic
|
|
110
|
+
* enters the Network from this address.
|
|
111
|
+
*/
|
|
112
|
+
customer_address?: string;
|
|
113
|
+
/**
|
|
114
|
+
* The router's node id on the tailnet. Set once the router has enrolled.
|
|
115
|
+
*/
|
|
116
|
+
device_id?: string | null;
|
|
117
|
+
/**
|
|
118
|
+
* A user specified name for the router.
|
|
119
|
+
*/
|
|
120
|
+
name?: string;
|
|
121
|
+
/**
|
|
122
|
+
* The id of the Network the router is attached to.
|
|
123
|
+
*/
|
|
124
|
+
network_id?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Identifies the type of the resource.
|
|
127
|
+
*/
|
|
128
|
+
record_type?: string;
|
|
129
|
+
/**
|
|
130
|
+
* The code of the region the router is created in. `GET /network_coverage` lists
|
|
131
|
+
* the regions whose `available_services` include `tailscale_subnet_router`.
|
|
132
|
+
*/
|
|
133
|
+
region_code?: string;
|
|
134
|
+
/**
|
|
135
|
+
* `provisioning`: Telnyx is creating the router or applying a change.
|
|
136
|
+
* `provisioned`: the router is on the tailnet and advertises its routes; the
|
|
137
|
+
* tailnet still approves them. `failed`: enrollment did not complete, and `PATCH`
|
|
138
|
+
* retries it. `deleting`: the router is being removed.
|
|
139
|
+
*/
|
|
140
|
+
status?: 'provisioning' | 'provisioned' | 'failed' | 'deleting';
|
|
141
|
+
/**
|
|
142
|
+
* The name of the tailnet the router is enrolled in. Set once the router has
|
|
143
|
+
* enrolled.
|
|
144
|
+
*/
|
|
145
|
+
tailnet_name?: string | null;
|
|
146
|
+
/**
|
|
147
|
+
* The router's addresses on the tailnet. Empty until the router has enrolled.
|
|
148
|
+
*/
|
|
149
|
+
tailscale_ips?: Array<string>;
|
|
150
|
+
/**
|
|
151
|
+
* ISO 8601 formatted date-time indicating when the resource was updated.
|
|
152
|
+
*/
|
|
153
|
+
updated_at?: string;
|
|
154
|
+
}
|
|
155
|
+
export interface TailscaleSubnetRouterCreateResponse {
|
|
156
|
+
data?: TailscaleSubnetRouter;
|
|
157
|
+
}
|
|
158
|
+
export interface TailscaleSubnetRouterRetrieveResponse {
|
|
159
|
+
data?: TailscaleSubnetRouter;
|
|
160
|
+
}
|
|
161
|
+
export interface TailscaleSubnetRouterUpdateResponse {
|
|
162
|
+
data?: TailscaleSubnetRouter;
|
|
163
|
+
}
|
|
164
|
+
export interface TailscaleSubnetRouterDeleteResponse {
|
|
165
|
+
data?: TailscaleSubnetRouter;
|
|
166
|
+
}
|
|
167
|
+
export interface TailscaleSubnetRouterListParams extends DefaultFlatPaginationParams {
|
|
168
|
+
/**
|
|
169
|
+
* Consolidated filter parameter (deepObject style). Originally: filter[network_id]
|
|
170
|
+
*/
|
|
171
|
+
filter?: TailscaleSubnetRouterListParams.Filter;
|
|
172
|
+
}
|
|
173
|
+
export declare namespace TailscaleSubnetRouterListParams {
|
|
174
|
+
/**
|
|
175
|
+
* Consolidated filter parameter (deepObject style). Originally: filter[network_id]
|
|
176
|
+
*/
|
|
177
|
+
interface Filter {
|
|
178
|
+
/**
|
|
179
|
+
* The id of the Network to filter on.
|
|
180
|
+
*/
|
|
181
|
+
network_id?: string;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
export interface TailscaleSubnetRouterCreateParams {
|
|
185
|
+
/**
|
|
186
|
+
* IPv4 subnets of the Network that the router advertises to the tailnet. Each
|
|
187
|
+
* entry is a canonical CIDR that the Network routes. Default, loopback,
|
|
188
|
+
* link-local, multicast, and Tailscale (`100.64.0.0/10`) ranges are rejected. So
|
|
189
|
+
* are ranges that overlap the router's own, `172.27.254.0/24` and `198.18.0.0/20`.
|
|
190
|
+
*/
|
|
191
|
+
advertised_routes: Array<string>;
|
|
192
|
+
/**
|
|
193
|
+
* A Tailscale auth key that enrolls the router in the user's tailnet: reusable,
|
|
194
|
+
* pre-approved, tagged, and not ephemeral. Telnyx stores it encrypted until
|
|
195
|
+
* enrollment succeeds, then discards it. It is never returned.
|
|
196
|
+
*/
|
|
197
|
+
auth_key: string;
|
|
198
|
+
/**
|
|
199
|
+
* A user specified name for the router.
|
|
200
|
+
*/
|
|
201
|
+
name: string;
|
|
202
|
+
/**
|
|
203
|
+
* The id of the Network to attach the router to.
|
|
204
|
+
*/
|
|
205
|
+
network_id: string;
|
|
206
|
+
/**
|
|
207
|
+
* The code of the region to create the router in. `GET /network_coverage` lists
|
|
208
|
+
* the regions whose `available_services` include `tailscale_subnet_router`.
|
|
209
|
+
*/
|
|
210
|
+
region_code: string;
|
|
211
|
+
}
|
|
212
|
+
export interface TailscaleSubnetRouterUpdateParams {
|
|
213
|
+
/**
|
|
214
|
+
* IPv4 subnets of the Network that the router advertises to the tailnet. Each
|
|
215
|
+
* entry is a canonical CIDR that the Network routes. Default, loopback,
|
|
216
|
+
* link-local, multicast, and Tailscale (`100.64.0.0/10`) ranges are rejected. So
|
|
217
|
+
* are ranges that overlap the router's own, `172.27.254.0/24` and `198.18.0.0/20`.
|
|
218
|
+
*/
|
|
219
|
+
advertised_routes?: Array<string>;
|
|
220
|
+
/**
|
|
221
|
+
* A replacement Tailscale auth key. Accepted only while the router has never
|
|
222
|
+
* enrolled, for example after a `failed` enrollment. Never returned.
|
|
223
|
+
*/
|
|
224
|
+
auth_key?: string;
|
|
225
|
+
/**
|
|
226
|
+
* A user specified name for the router.
|
|
227
|
+
*/
|
|
228
|
+
name?: string;
|
|
229
|
+
}
|
|
230
|
+
export declare namespace TailscaleSubnetRouters {
|
|
231
|
+
export { type TailscaleSubnetRouter as TailscaleSubnetRouter, type TailscaleSubnetRouterCreateResponse as TailscaleSubnetRouterCreateResponse, type TailscaleSubnetRouterRetrieveResponse as TailscaleSubnetRouterRetrieveResponse, type TailscaleSubnetRouterUpdateResponse as TailscaleSubnetRouterUpdateResponse, type TailscaleSubnetRouterDeleteResponse as TailscaleSubnetRouterDeleteResponse, type TailscaleSubnetRoutersDefaultFlatPagination as TailscaleSubnetRoutersDefaultFlatPagination, type TailscaleSubnetRouterListParams as TailscaleSubnetRouterListParams, type TailscaleSubnetRouterCreateParams as TailscaleSubnetRouterCreateParams, type TailscaleSubnetRouterUpdateParams as TailscaleSubnetRouterUpdateParams, };
|
|
232
|
+
}
|
|
233
|
+
//# sourceMappingURL=tailscale-subnet-routers.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tailscale-subnet-routers.d.mts","sourceRoot":"","sources":["../src/resources/tailscale-subnet-routers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,qBAAqB,EAAE,KAAK,2BAA2B,EAAE,WAAW,EAAE,+BAA2B;AAC1G,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,WAAW;IACrD;;;;;;;;;;;OAWG;IACH,IAAI,CACF,KAAK,GAAE,+BAA+B,GAAG,IAAI,GAAG,SAAc,EAC9D,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,2CAA2C,EAAE,qBAAqB,CAAC;IAQlF;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CACJ,IAAI,EAAE,iCAAiC,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mCAAmC,CAAC;IAIlD;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mCAAmC,CAAC;IAI7F;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qCAAqC,CAAC;IAIjG;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,iCAAiC,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mCAAmC,CAAC;CAGnD;AAED,MAAM,MAAM,2CAA2C,GAAG,qBAAqB,CAAC,qBAAqB,CAAC,CAAC;AAEvG,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,EAAE,CA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rB;CACF;AAED,MAAM,WAAW,iCAAiC;IAChD;;;;;OAKG;IACH,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEjC;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,iCAAiC;IAChD;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAElC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,sBAAsB,CAAC;IAC9C,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,qCAAqC,IAAI,qCAAqC,EACnF,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,2CAA2C,IAAI,2CAA2C,EAC/F,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,iCAAiC,IAAI,iCAAiC,GAC5E,CAAC;CACH"}
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { DefaultFlatPagination, type DefaultFlatPaginationParams, PagePromise } from "../core/pagination.js";
|
|
4
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
5
|
+
/**
|
|
6
|
+
* Tailscale Subnet Router operations
|
|
7
|
+
*/
|
|
8
|
+
export declare class TailscaleSubnetRouters extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Returns a paginated list of the Tailscale Subnet Routers on the account, with
|
|
11
|
+
* support for filtering by Network.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* // Automatically fetches more pages as needed.
|
|
16
|
+
* for await (const tailscaleSubnetRouter of client.tailscaleSubnetRouters.list()) {
|
|
17
|
+
* // ...
|
|
18
|
+
* }
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
list(query?: TailscaleSubnetRouterListParams | null | undefined, options?: RequestOptions): PagePromise<TailscaleSubnetRoutersDefaultFlatPagination, TailscaleSubnetRouter>;
|
|
22
|
+
/**
|
|
23
|
+
* Creates a Tailscale Subnet Router on a Network and enrolls it in the user's
|
|
24
|
+
* tailnet with the auth key. The response returns the router with `status`
|
|
25
|
+
* `provisioning`. Poll `GET /tailscale_subnet_routers/{id}` until it is
|
|
26
|
+
* `provisioned`. Then approve its routes in the tailnet, unless an auto-approver
|
|
27
|
+
* covers them.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const tailscaleSubnetRouter =
|
|
32
|
+
* await client.tailscaleSubnetRouters.create({
|
|
33
|
+
* advertised_routes: ['172.27.0.0/24'],
|
|
34
|
+
* auth_key: 'tskey-auth-k1AbCdEfGh2IjKlMnOpQrStUv',
|
|
35
|
+
* name: 'tailnet-ashburn',
|
|
36
|
+
* network_id: '0de011ae-ee53-4df4-ba96-754728eb5aad',
|
|
37
|
+
* region_code: 'ashburn-va',
|
|
38
|
+
* });
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
create(body: TailscaleSubnetRouterCreateParams, options?: RequestOptions): APIPromise<TailscaleSubnetRouterCreateResponse>;
|
|
42
|
+
/**
|
|
43
|
+
* Removes the router from the Network and logs it out of the tailnet. The response
|
|
44
|
+
* returns the router with `status` `deleting`. The record disappears once removal
|
|
45
|
+
* completes. A machine entry can remain in the tailnet's admin console until it is
|
|
46
|
+
* removed there.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* const tailscaleSubnetRouter =
|
|
51
|
+
* await client.tailscaleSubnetRouters.delete(
|
|
52
|
+
* '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
|
|
53
|
+
* );
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
delete(id: string, options?: RequestOptions): APIPromise<TailscaleSubnetRouterDeleteResponse>;
|
|
57
|
+
/**
|
|
58
|
+
* Returns the details of a single Tailscale Subnet Router by its identifier,
|
|
59
|
+
* including its enrollment state.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```ts
|
|
63
|
+
* const tailscaleSubnetRouter =
|
|
64
|
+
* await client.tailscaleSubnetRouters.retrieve(
|
|
65
|
+
* '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
|
|
66
|
+
* );
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<TailscaleSubnetRouterRetrieveResponse>;
|
|
70
|
+
/**
|
|
71
|
+
* Renames the router, changes its advertised routes, or retries a failed
|
|
72
|
+
* enrollment. Any change queues a new provisioning run and returns the router with
|
|
73
|
+
* `status` `provisioning`. The router keeps its machine identity on the tailnet.
|
|
74
|
+
* Send an empty object to retry a `failed` router with its stored auth key.
|
|
75
|
+
* Include a new `auth_key` only while the router has never enrolled. The router's
|
|
76
|
+
* Network and region cannot change: create a new router instead.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```ts
|
|
80
|
+
* const tailscaleSubnetRouter =
|
|
81
|
+
* await client.tailscaleSubnetRouters.update(
|
|
82
|
+
* '6a09cdc3-8948-47f0-aa62-74ac943d6c58',
|
|
83
|
+
* {
|
|
84
|
+
* advertised_routes: ['172.27.0.0/24', '172.27.1.0/24'],
|
|
85
|
+
* },
|
|
86
|
+
* );
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
update(id: string, body: TailscaleSubnetRouterUpdateParams, options?: RequestOptions): APIPromise<TailscaleSubnetRouterUpdateResponse>;
|
|
90
|
+
}
|
|
91
|
+
export type TailscaleSubnetRoutersDefaultFlatPagination = DefaultFlatPagination<TailscaleSubnetRouter>;
|
|
92
|
+
export interface TailscaleSubnetRouter {
|
|
93
|
+
/**
|
|
94
|
+
* Identifies the resource.
|
|
95
|
+
*/
|
|
96
|
+
id?: string;
|
|
97
|
+
/**
|
|
98
|
+
* IPv4 subnets of the Network that the router advertises to the tailnet. Each
|
|
99
|
+
* entry is a canonical CIDR that the Network routes. Default, loopback,
|
|
100
|
+
* link-local, multicast, and Tailscale (`100.64.0.0/10`) ranges are rejected. So
|
|
101
|
+
* are ranges that overlap the router's own, `172.27.254.0/24` and `198.18.0.0/20`.
|
|
102
|
+
*/
|
|
103
|
+
advertised_routes?: Array<string>;
|
|
104
|
+
/**
|
|
105
|
+
* ISO 8601 formatted date-time indicating when the resource was created.
|
|
106
|
+
*/
|
|
107
|
+
created_at?: string;
|
|
108
|
+
/**
|
|
109
|
+
* The router's address on the Network, from `172.27.254.0/24`. Tailnet traffic
|
|
110
|
+
* enters the Network from this address.
|
|
111
|
+
*/
|
|
112
|
+
customer_address?: string;
|
|
113
|
+
/**
|
|
114
|
+
* The router's node id on the tailnet. Set once the router has enrolled.
|
|
115
|
+
*/
|
|
116
|
+
device_id?: string | null;
|
|
117
|
+
/**
|
|
118
|
+
* A user specified name for the router.
|
|
119
|
+
*/
|
|
120
|
+
name?: string;
|
|
121
|
+
/**
|
|
122
|
+
* The id of the Network the router is attached to.
|
|
123
|
+
*/
|
|
124
|
+
network_id?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Identifies the type of the resource.
|
|
127
|
+
*/
|
|
128
|
+
record_type?: string;
|
|
129
|
+
/**
|
|
130
|
+
* The code of the region the router is created in. `GET /network_coverage` lists
|
|
131
|
+
* the regions whose `available_services` include `tailscale_subnet_router`.
|
|
132
|
+
*/
|
|
133
|
+
region_code?: string;
|
|
134
|
+
/**
|
|
135
|
+
* `provisioning`: Telnyx is creating the router or applying a change.
|
|
136
|
+
* `provisioned`: the router is on the tailnet and advertises its routes; the
|
|
137
|
+
* tailnet still approves them. `failed`: enrollment did not complete, and `PATCH`
|
|
138
|
+
* retries it. `deleting`: the router is being removed.
|
|
139
|
+
*/
|
|
140
|
+
status?: 'provisioning' | 'provisioned' | 'failed' | 'deleting';
|
|
141
|
+
/**
|
|
142
|
+
* The name of the tailnet the router is enrolled in. Set once the router has
|
|
143
|
+
* enrolled.
|
|
144
|
+
*/
|
|
145
|
+
tailnet_name?: string | null;
|
|
146
|
+
/**
|
|
147
|
+
* The router's addresses on the tailnet. Empty until the router has enrolled.
|
|
148
|
+
*/
|
|
149
|
+
tailscale_ips?: Array<string>;
|
|
150
|
+
/**
|
|
151
|
+
* ISO 8601 formatted date-time indicating when the resource was updated.
|
|
152
|
+
*/
|
|
153
|
+
updated_at?: string;
|
|
154
|
+
}
|
|
155
|
+
export interface TailscaleSubnetRouterCreateResponse {
|
|
156
|
+
data?: TailscaleSubnetRouter;
|
|
157
|
+
}
|
|
158
|
+
export interface TailscaleSubnetRouterRetrieveResponse {
|
|
159
|
+
data?: TailscaleSubnetRouter;
|
|
160
|
+
}
|
|
161
|
+
export interface TailscaleSubnetRouterUpdateResponse {
|
|
162
|
+
data?: TailscaleSubnetRouter;
|
|
163
|
+
}
|
|
164
|
+
export interface TailscaleSubnetRouterDeleteResponse {
|
|
165
|
+
data?: TailscaleSubnetRouter;
|
|
166
|
+
}
|
|
167
|
+
export interface TailscaleSubnetRouterListParams extends DefaultFlatPaginationParams {
|
|
168
|
+
/**
|
|
169
|
+
* Consolidated filter parameter (deepObject style). Originally: filter[network_id]
|
|
170
|
+
*/
|
|
171
|
+
filter?: TailscaleSubnetRouterListParams.Filter;
|
|
172
|
+
}
|
|
173
|
+
export declare namespace TailscaleSubnetRouterListParams {
|
|
174
|
+
/**
|
|
175
|
+
* Consolidated filter parameter (deepObject style). Originally: filter[network_id]
|
|
176
|
+
*/
|
|
177
|
+
interface Filter {
|
|
178
|
+
/**
|
|
179
|
+
* The id of the Network to filter on.
|
|
180
|
+
*/
|
|
181
|
+
network_id?: string;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
export interface TailscaleSubnetRouterCreateParams {
|
|
185
|
+
/**
|
|
186
|
+
* IPv4 subnets of the Network that the router advertises to the tailnet. Each
|
|
187
|
+
* entry is a canonical CIDR that the Network routes. Default, loopback,
|
|
188
|
+
* link-local, multicast, and Tailscale (`100.64.0.0/10`) ranges are rejected. So
|
|
189
|
+
* are ranges that overlap the router's own, `172.27.254.0/24` and `198.18.0.0/20`.
|
|
190
|
+
*/
|
|
191
|
+
advertised_routes: Array<string>;
|
|
192
|
+
/**
|
|
193
|
+
* A Tailscale auth key that enrolls the router in the user's tailnet: reusable,
|
|
194
|
+
* pre-approved, tagged, and not ephemeral. Telnyx stores it encrypted until
|
|
195
|
+
* enrollment succeeds, then discards it. It is never returned.
|
|
196
|
+
*/
|
|
197
|
+
auth_key: string;
|
|
198
|
+
/**
|
|
199
|
+
* A user specified name for the router.
|
|
200
|
+
*/
|
|
201
|
+
name: string;
|
|
202
|
+
/**
|
|
203
|
+
* The id of the Network to attach the router to.
|
|
204
|
+
*/
|
|
205
|
+
network_id: string;
|
|
206
|
+
/**
|
|
207
|
+
* The code of the region to create the router in. `GET /network_coverage` lists
|
|
208
|
+
* the regions whose `available_services` include `tailscale_subnet_router`.
|
|
209
|
+
*/
|
|
210
|
+
region_code: string;
|
|
211
|
+
}
|
|
212
|
+
export interface TailscaleSubnetRouterUpdateParams {
|
|
213
|
+
/**
|
|
214
|
+
* IPv4 subnets of the Network that the router advertises to the tailnet. Each
|
|
215
|
+
* entry is a canonical CIDR that the Network routes. Default, loopback,
|
|
216
|
+
* link-local, multicast, and Tailscale (`100.64.0.0/10`) ranges are rejected. So
|
|
217
|
+
* are ranges that overlap the router's own, `172.27.254.0/24` and `198.18.0.0/20`.
|
|
218
|
+
*/
|
|
219
|
+
advertised_routes?: Array<string>;
|
|
220
|
+
/**
|
|
221
|
+
* A replacement Tailscale auth key. Accepted only while the router has never
|
|
222
|
+
* enrolled, for example after a `failed` enrollment. Never returned.
|
|
223
|
+
*/
|
|
224
|
+
auth_key?: string;
|
|
225
|
+
/**
|
|
226
|
+
* A user specified name for the router.
|
|
227
|
+
*/
|
|
228
|
+
name?: string;
|
|
229
|
+
}
|
|
230
|
+
export declare namespace TailscaleSubnetRouters {
|
|
231
|
+
export { type TailscaleSubnetRouter as TailscaleSubnetRouter, type TailscaleSubnetRouterCreateResponse as TailscaleSubnetRouterCreateResponse, type TailscaleSubnetRouterRetrieveResponse as TailscaleSubnetRouterRetrieveResponse, type TailscaleSubnetRouterUpdateResponse as TailscaleSubnetRouterUpdateResponse, type TailscaleSubnetRouterDeleteResponse as TailscaleSubnetRouterDeleteResponse, type TailscaleSubnetRoutersDefaultFlatPagination as TailscaleSubnetRoutersDefaultFlatPagination, type TailscaleSubnetRouterListParams as TailscaleSubnetRouterListParams, type TailscaleSubnetRouterCreateParams as TailscaleSubnetRouterCreateParams, type TailscaleSubnetRouterUpdateParams as TailscaleSubnetRouterUpdateParams, };
|
|
232
|
+
}
|
|
233
|
+
//# sourceMappingURL=tailscale-subnet-routers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tailscale-subnet-routers.d.ts","sourceRoot":"","sources":["../src/resources/tailscale-subnet-routers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,qBAAqB,EAAE,KAAK,2BAA2B,EAAE,WAAW,EAAE,8BAA2B;AAC1G,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,WAAW;IACrD;;;;;;;;;;;OAWG;IACH,IAAI,CACF,KAAK,GAAE,+BAA+B,GAAG,IAAI,GAAG,SAA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