@microsoft/dev-tunnels-management 1.3.6 → 1.3.37

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.
@@ -1,187 +1,187 @@
1
- /// <reference types="node" />
2
- import { ClusterDetails, NamedRateStatus, Tunnel, TunnelEndpoint, TunnelEvent, TunnelPort } from '@microsoft/dev-tunnels-contracts';
3
- import { TunnelRequestOptions } from './tunnelRequestOptions';
4
- import * as https from 'https';
5
- import { CancellationToken } from 'vscode-jsonrpc';
6
- /**
7
- * Interface for a client that manages tunnels and tunnel ports
8
- * via the tunnel service management API.
9
- */
10
- export interface TunnelManagementClient {
11
- /**
12
- * Override https agent for axios requests.
13
- */
14
- httpsAgent?: https.Agent;
15
- /**
16
- * Lists tunnels that are owned by the caller.
17
- *
18
- * The list can be filtered by setting `TunnelRequestOptions.labels`. Ports will not be
19
- * included in the returned tunnels unless `TunnelRequestOptions.includePorts` is set to true.
20
- *
21
- * @param clusterId A tunnel cluster ID, or null to list tunnels globally.
22
- * @param domain Tunnel domain, or null for the default domain.
23
- * @param options Request options.
24
- * @param cancellation Optional cancellation token for the request.
25
- */
26
- listTunnels(clusterId?: string, domain?: string, options?: TunnelRequestOptions, cancellation?: CancellationToken): Promise<Tunnel[]>;
27
- /**
28
- * Gets one tunnel by ID or name.
29
- *
30
- * Ports will not be included in the returned tunnel unless `TunnelRequestOptions.includePorts`
31
- * is set to true.
32
- *
33
- * @param tunnel Tunnel object including at least either a tunnel name (globally unique,
34
- * if configured) or tunnel ID and cluster ID.
35
- * @param options Request options.
36
- * @param cancellation Optional cancellation token for the request.
37
- */
38
- getTunnel(tunnel: Tunnel, options?: TunnelRequestOptions, cancellation?: CancellationToken): Promise<Tunnel | null>;
39
- /**
40
- * Creates a tunnel.
41
- * @param tunnel
42
- * @param options
43
- * @param cancellation Optional cancellation token for the request.
44
- */
45
- createTunnel(tunnel: Tunnel, options?: TunnelRequestOptions, cancellation?: CancellationToken): Promise<Tunnel>;
46
- /**
47
- * Updates properties of a tunnel.
48
- * @param tunnel
49
- * @param options
50
- * @param cancellation Optional cancellation token for the request.
51
- */
52
- updateTunnel(tunnel: Tunnel, options?: TunnelRequestOptions, cancellation?: CancellationToken): Promise<Tunnel>;
53
- /**
54
- * Updates properties of a tunnel or creates it if it does not exist.
55
- * @param tunnel
56
- * @param options
57
- * @param cancellation Optional cancellation token for the request.
58
- */
59
- createOrUpdateTunnel(tunnel: Tunnel, options?: TunnelRequestOptions, cancellation?: CancellationToken): Promise<Tunnel>;
60
- /**
61
- * Deletes a tunnel.
62
- * @param tunnel
63
- * @param options
64
- * @param cancellation Optional cancellation token for the request.
65
- */
66
- deleteTunnel(tunnel: Tunnel, options?: TunnelRequestOptions, cancellation?: CancellationToken): Promise<boolean>;
67
- /**
68
- * Creates or updates an endpoint for the tunnel.
69
- * @param tunnel
70
- * @param endpoint
71
- * @param options
72
- * @param cancellation Optional cancellation token for the request.
73
- */
74
- updateTunnelEndpoint(tunnel: Tunnel, endpoint: TunnelEndpoint, options?: TunnelRequestOptions, cancellation?: CancellationToken): Promise<TunnelEndpoint>;
75
- /**
76
- * Deletes a tunnel endpoint.
77
- * @param tunnel
78
- * @param id
79
- * @param options
80
- * @param cancellation Optional cancellation token for the request.
81
- */
82
- deleteTunnelEndpoints(tunnel: Tunnel, id: string, options?: TunnelRequestOptions, cancellation?: CancellationToken): Promise<boolean>;
83
- /**
84
- * Lists ports on a tunnel.
85
- *
86
- * The list can be filtered by setting `TunnelRequestOptions.labels`.
87
- *
88
- * @param tunnel Tunnel object including at least either a tunnel name (globally unique,
89
- * if configured) or tunnel ID and cluster ID.
90
- * @param options Request options.
91
- * @param cancellation Optional cancellation token for the request.
92
- */
93
- listTunnelPorts(tunnel: Tunnel, options?: TunnelRequestOptions, cancellation?: CancellationToken): Promise<TunnelPort[]>;
94
- /**
95
- * Gets one port on a tunnel by port number.
96
- * @param tunnel
97
- * @param portNumber
98
- * @param options
99
- * @param cancellation Optional cancellation token for the request.
100
- */
101
- getTunnelPort(tunnel: Tunnel, portNumber: number, options?: TunnelRequestOptions, cancellation?: CancellationToken): Promise<TunnelPort | null>;
102
- /**
103
- * Creates a tunnel port.
104
- * @param tunnel
105
- * @param tunnelPort
106
- * @param options
107
- * @param cancellation Optional cancellation token for the request.
108
- */
109
- createTunnelPort(tunnel: Tunnel, tunnelPort: TunnelPort, options?: TunnelRequestOptions, cancellation?: CancellationToken): Promise<TunnelPort>;
110
- /**
111
- * Updates properties of a tunnel port.
112
- * @param tunnel
113
- * @param tunnelPort
114
- * @param options
115
- * @param cancellation Optional cancellation token for the request.
116
- */
117
- updateTunnelPort(tunnel: Tunnel, tunnelPort: TunnelPort, options?: TunnelRequestOptions, cancellation?: CancellationToken): Promise<TunnelPort>;
118
- /**
119
- * Updates properties of a tunnel port or creates it if it does not exist.
120
- * @param tunnel
121
- * @param tunnelPort
122
- * @param options
123
- * @param cancellation Optional cancellation token for the request.
124
- */
125
- createOrUpdateTunnelPort(tunnel: Tunnel, tunnelPort: TunnelPort, options?: TunnelRequestOptions, cancellation?: CancellationToken): Promise<TunnelPort>;
126
- /**
127
- * Deletes a tunnel port.
128
- * @param tunnel
129
- * @param portNumber
130
- * @param options
131
- * @param cancellation Optional cancellation token for the request.
132
- */
133
- deleteTunnelPort(tunnel: Tunnel, portNumber: number, options?: TunnelRequestOptions, cancellation?: CancellationToken): Promise<boolean>;
134
- /**
135
- * Lists limits and consumption status for the calling user.
136
- * @param cancellation Optional cancellation token for the request.
137
- */
138
- listUserLimits(cancellation?: CancellationToken): Promise<NamedRateStatus[]>;
139
- /**
140
- * Lists details of tunneling service clusters in all supported Azure regions.
141
- * @param cancellation Optional cancellation token for the request.
142
- */
143
- listClusters(cancellation?: CancellationToken): Promise<ClusterDetails[]>;
144
- /**
145
- * Checks if the tunnel name is available.
146
- * @param tunnelName
147
- * @param cancellation Optional cancellation token for the request.
148
- */
149
- checkNameAvailablility(tunnelName: string, cancellation?: CancellationToken): Promise<boolean>;
150
- /**
151
- * Reports a tunnel event to the tunnel service.
152
- *
153
- * This method does not block; events are batched and uploaded by a background task.
154
- * The tunnel service and SDK automatically record some events related to tunnel operations
155
- * and connections. This method allows applications to report additional custom events.
156
- * @param tunnel Tunnel that the event is associated with.
157
- * @param tunnelEvent Event to report.
158
- * @param options Optional request options.
159
- */
160
- reportEvent(tunnel: Tunnel, tunnelEvent: TunnelEvent, options?: TunnelRequestOptions): void;
161
- /**
162
- * Disposes the client and any background tasks.
163
- */
164
- dispose(): Promise<void>;
165
- }
166
- /**
167
- * Interface for the user agent product information for TunnelManagementClient
168
- */
169
- export interface ProductHeaderValue {
170
- /**
171
- * Product name.
172
- */
173
- name: string;
174
- /**
175
- * Product version. If not supplied, 'unknown' version is used.
176
- */
177
- version?: string;
178
- }
179
- export declare abstract class TunnelAuthenticationSchemes {
180
- /** Authentication scheme for AAD (or Microsoft account) access tokens. */
181
- static readonly aad = "aad";
182
- /** Authentication scheme for GitHub access tokens. */
183
- static readonly github = "github";
184
- /** Authentication scheme for tunnel access tokens. */
185
- static readonly tunnel = "tunnel";
186
- }
1
+ /// <reference types="node" />
2
+ import { ClusterDetails, NamedRateStatus, Tunnel, TunnelEndpoint, TunnelEvent, TunnelPort } from '@microsoft/dev-tunnels-contracts';
3
+ import { TunnelRequestOptions } from './tunnelRequestOptions';
4
+ import * as https from 'https';
5
+ import { CancellationToken } from 'vscode-jsonrpc';
6
+ /**
7
+ * Interface for a client that manages tunnels and tunnel ports
8
+ * via the tunnel service management API.
9
+ */
10
+ export interface TunnelManagementClient {
11
+ /**
12
+ * Override https agent for axios requests.
13
+ */
14
+ httpsAgent?: https.Agent;
15
+ /**
16
+ * Lists tunnels that are owned by the caller.
17
+ *
18
+ * The list can be filtered by setting `TunnelRequestOptions.labels`. Ports will not be
19
+ * included in the returned tunnels unless `TunnelRequestOptions.includePorts` is set to true.
20
+ *
21
+ * @param clusterId A tunnel cluster ID, or null to list tunnels globally.
22
+ * @param domain Tunnel domain, or null for the default domain.
23
+ * @param options Request options.
24
+ * @param cancellation Optional cancellation token for the request.
25
+ */
26
+ listTunnels(clusterId?: string, domain?: string, options?: TunnelRequestOptions, cancellation?: CancellationToken): Promise<Tunnel[]>;
27
+ /**
28
+ * Gets one tunnel by ID or name.
29
+ *
30
+ * Ports will not be included in the returned tunnel unless `TunnelRequestOptions.includePorts`
31
+ * is set to true.
32
+ *
33
+ * @param tunnel Tunnel object including at least either a tunnel name (globally unique,
34
+ * if configured) or tunnel ID and cluster ID.
35
+ * @param options Request options.
36
+ * @param cancellation Optional cancellation token for the request.
37
+ */
38
+ getTunnel(tunnel: Tunnel, options?: TunnelRequestOptions, cancellation?: CancellationToken): Promise<Tunnel | null>;
39
+ /**
40
+ * Creates a tunnel.
41
+ * @param tunnel
42
+ * @param options
43
+ * @param cancellation Optional cancellation token for the request.
44
+ */
45
+ createTunnel(tunnel: Tunnel, options?: TunnelRequestOptions, cancellation?: CancellationToken): Promise<Tunnel>;
46
+ /**
47
+ * Updates properties of a tunnel.
48
+ * @param tunnel
49
+ * @param options
50
+ * @param cancellation Optional cancellation token for the request.
51
+ */
52
+ updateTunnel(tunnel: Tunnel, options?: TunnelRequestOptions, cancellation?: CancellationToken): Promise<Tunnel>;
53
+ /**
54
+ * Updates properties of a tunnel or creates it if it does not exist.
55
+ * @param tunnel
56
+ * @param options
57
+ * @param cancellation Optional cancellation token for the request.
58
+ */
59
+ createOrUpdateTunnel(tunnel: Tunnel, options?: TunnelRequestOptions, cancellation?: CancellationToken): Promise<Tunnel>;
60
+ /**
61
+ * Deletes a tunnel.
62
+ * @param tunnel
63
+ * @param options
64
+ * @param cancellation Optional cancellation token for the request.
65
+ */
66
+ deleteTunnel(tunnel: Tunnel, options?: TunnelRequestOptions, cancellation?: CancellationToken): Promise<boolean>;
67
+ /**
68
+ * Creates or updates an endpoint for the tunnel.
69
+ * @param tunnel
70
+ * @param endpoint
71
+ * @param options
72
+ * @param cancellation Optional cancellation token for the request.
73
+ */
74
+ updateTunnelEndpoint(tunnel: Tunnel, endpoint: TunnelEndpoint, options?: TunnelRequestOptions, cancellation?: CancellationToken): Promise<TunnelEndpoint>;
75
+ /**
76
+ * Deletes a tunnel endpoint.
77
+ * @param tunnel
78
+ * @param id
79
+ * @param options
80
+ * @param cancellation Optional cancellation token for the request.
81
+ */
82
+ deleteTunnelEndpoints(tunnel: Tunnel, id: string, options?: TunnelRequestOptions, cancellation?: CancellationToken): Promise<boolean>;
83
+ /**
84
+ * Lists ports on a tunnel.
85
+ *
86
+ * The list can be filtered by setting `TunnelRequestOptions.labels`.
87
+ *
88
+ * @param tunnel Tunnel object including at least either a tunnel name (globally unique,
89
+ * if configured) or tunnel ID and cluster ID.
90
+ * @param options Request options.
91
+ * @param cancellation Optional cancellation token for the request.
92
+ */
93
+ listTunnelPorts(tunnel: Tunnel, options?: TunnelRequestOptions, cancellation?: CancellationToken): Promise<TunnelPort[]>;
94
+ /**
95
+ * Gets one port on a tunnel by port number.
96
+ * @param tunnel
97
+ * @param portNumber
98
+ * @param options
99
+ * @param cancellation Optional cancellation token for the request.
100
+ */
101
+ getTunnelPort(tunnel: Tunnel, portNumber: number, options?: TunnelRequestOptions, cancellation?: CancellationToken): Promise<TunnelPort | null>;
102
+ /**
103
+ * Creates a tunnel port.
104
+ * @param tunnel
105
+ * @param tunnelPort
106
+ * @param options
107
+ * @param cancellation Optional cancellation token for the request.
108
+ */
109
+ createTunnelPort(tunnel: Tunnel, tunnelPort: TunnelPort, options?: TunnelRequestOptions, cancellation?: CancellationToken): Promise<TunnelPort>;
110
+ /**
111
+ * Updates properties of a tunnel port.
112
+ * @param tunnel
113
+ * @param tunnelPort
114
+ * @param options
115
+ * @param cancellation Optional cancellation token for the request.
116
+ */
117
+ updateTunnelPort(tunnel: Tunnel, tunnelPort: TunnelPort, options?: TunnelRequestOptions, cancellation?: CancellationToken): Promise<TunnelPort>;
118
+ /**
119
+ * Updates properties of a tunnel port or creates it if it does not exist.
120
+ * @param tunnel
121
+ * @param tunnelPort
122
+ * @param options
123
+ * @param cancellation Optional cancellation token for the request.
124
+ */
125
+ createOrUpdateTunnelPort(tunnel: Tunnel, tunnelPort: TunnelPort, options?: TunnelRequestOptions, cancellation?: CancellationToken): Promise<TunnelPort>;
126
+ /**
127
+ * Deletes a tunnel port.
128
+ * @param tunnel
129
+ * @param portNumber
130
+ * @param options
131
+ * @param cancellation Optional cancellation token for the request.
132
+ */
133
+ deleteTunnelPort(tunnel: Tunnel, portNumber: number, options?: TunnelRequestOptions, cancellation?: CancellationToken): Promise<boolean>;
134
+ /**
135
+ * Lists limits and consumption status for the calling user.
136
+ * @param cancellation Optional cancellation token for the request.
137
+ */
138
+ listUserLimits(cancellation?: CancellationToken): Promise<NamedRateStatus[]>;
139
+ /**
140
+ * Lists details of tunneling service clusters in all supported Azure regions.
141
+ * @param cancellation Optional cancellation token for the request.
142
+ */
143
+ listClusters(cancellation?: CancellationToken): Promise<ClusterDetails[]>;
144
+ /**
145
+ * Checks if the tunnel name is available.
146
+ * @param tunnelName
147
+ * @param cancellation Optional cancellation token for the request.
148
+ */
149
+ checkNameAvailablility(tunnelName: string, cancellation?: CancellationToken): Promise<boolean>;
150
+ /**
151
+ * Reports a tunnel event to the tunnel service.
152
+ *
153
+ * This method does not block; events are batched and uploaded by a background task.
154
+ * The tunnel service and SDK automatically record some events related to tunnel operations
155
+ * and connections. This method allows applications to report additional custom events.
156
+ * @param tunnel Tunnel that the event is associated with.
157
+ * @param tunnelEvent Event to report.
158
+ * @param options Optional request options.
159
+ */
160
+ reportEvent(tunnel: Tunnel, tunnelEvent: TunnelEvent, options?: TunnelRequestOptions): void;
161
+ /**
162
+ * Disposes the client and any background tasks.
163
+ */
164
+ dispose(): Promise<void>;
165
+ }
166
+ /**
167
+ * Interface for the user agent product information for TunnelManagementClient
168
+ */
169
+ export interface ProductHeaderValue {
170
+ /**
171
+ * Product name.
172
+ */
173
+ name: string;
174
+ /**
175
+ * Product version. If not supplied, 'unknown' version is used.
176
+ */
177
+ version?: string;
178
+ }
179
+ export declare abstract class TunnelAuthenticationSchemes {
180
+ /** Authentication scheme for AAD (or Microsoft account) access tokens. */
181
+ static readonly aad = "aad";
182
+ /** Authentication scheme for GitHub access tokens. */
183
+ static readonly github = "github";
184
+ /** Authentication scheme for tunnel access tokens. */
185
+ static readonly tunnel = "tunnel";
186
+ }
187
187
  //# sourceMappingURL=tunnelManagementClient.d.ts.map
@@ -1,15 +1,15 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT license.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.TunnelAuthenticationSchemes = void 0;
6
- class TunnelAuthenticationSchemes {
7
- }
8
- exports.TunnelAuthenticationSchemes = TunnelAuthenticationSchemes;
9
- /** Authentication scheme for AAD (or Microsoft account) access tokens. */
10
- TunnelAuthenticationSchemes.aad = 'aad';
11
- /** Authentication scheme for GitHub access tokens. */
12
- TunnelAuthenticationSchemes.github = 'github';
13
- /** Authentication scheme for tunnel access tokens. */
14
- TunnelAuthenticationSchemes.tunnel = 'tunnel';
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT license.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.TunnelAuthenticationSchemes = void 0;
6
+ class TunnelAuthenticationSchemes {
7
+ }
8
+ exports.TunnelAuthenticationSchemes = TunnelAuthenticationSchemes;
9
+ /** Authentication scheme for AAD (or Microsoft account) access tokens. */
10
+ TunnelAuthenticationSchemes.aad = 'aad';
11
+ /** Authentication scheme for GitHub access tokens. */
12
+ TunnelAuthenticationSchemes.github = 'github';
13
+ /** Authentication scheme for tunnel access tokens. */
14
+ TunnelAuthenticationSchemes.tunnel = 'tunnel';
15
15
  //# sourceMappingURL=tunnelManagementClient.js.map