Initial commit

This commit is contained in:
2025-03-07 19:22:02 +01:00
commit 4a98255d83
55743 changed files with 5280367 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
# Visual Studio Tunnels Contracts Library
Tunnels contracts library for node
+20
View File
@@ -0,0 +1,20 @@
/**
* Details of a tunneling service cluster. Each cluster represents an instance of the
* tunneling service running in a particular Azure region. New tunnels are created in the
* current region unless otherwise specified.
*/
export interface ClusterDetails {
/**
* A cluster identifier based on its region.
*/
clusterId: string;
/**
* The URI of the service cluster.
*/
uri: string;
/**
* The Azure location of the cluster.
*/
azureLocation: string;
}
//# sourceMappingURL=clusterDetails.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"clusterDetails.d.ts","sourceRoot":"","sources":["../../../src/contracts/clusterDetails.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC3B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;CACzB"}
+7
View File
@@ -0,0 +1,7 @@
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// Generated from ../../../cs/src/Contracts/ClusterDetails.cs
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=clusterDetails.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"clusterDetails.js","sourceRoot":"","sources":["../../../src/contracts/clusterDetails.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAClC,6DAA6D;AAC7D,oBAAoB"}
+18
View File
@@ -0,0 +1,18 @@
/**
* Error codes for ErrorDetail.Code and `x-ms-error-code` header.
*/
export declare enum ErrorCodes {
/**
* Operation timed out.
*/
Timeout = "Timeout",
/**
* Operation cannot be performed because the service is not available.
*/
ServiceUnavailable = "ServiceUnavailable",
/**
* Internal error.
*/
InternalError = "InternalError"
}
//# sourceMappingURL=errorCodes.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"errorCodes.d.ts","sourceRoot":"","sources":["../../../src/contracts/errorCodes.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,oBAAY,UAAU;IAClB;;OAEG;IACH,OAAO,YAAY;IAEnB;;OAEG;IACH,kBAAkB,uBAAuB;IAEzC;;OAEG;IACH,aAAa,kBAAkB;CAClC"}
+26
View File
@@ -0,0 +1,26 @@
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// Generated from ../../../cs/src/Contracts/ErrorCodes.cs
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
exports.ErrorCodes = void 0;
/**
* Error codes for ErrorDetail.Code and `x-ms-error-code` header.
*/
var ErrorCodes;
(function (ErrorCodes) {
/**
* Operation timed out.
*/
ErrorCodes["Timeout"] = "Timeout";
/**
* Operation cannot be performed because the service is not available.
*/
ErrorCodes["ServiceUnavailable"] = "ServiceUnavailable";
/**
* Internal error.
*/
ErrorCodes["InternalError"] = "InternalError";
})(ErrorCodes = exports.ErrorCodes || (exports.ErrorCodes = {}));
//# sourceMappingURL=errorCodes.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"errorCodes.js","sourceRoot":"","sources":["../../../src/contracts/errorCodes.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAClC,yDAAyD;AACzD,oBAAoB;;;AAEpB;;GAEG;AACH,IAAY,UAeX;AAfD,WAAY,UAAU;IAClB;;OAEG;IACH,iCAAmB,CAAA;IAEnB;;OAEG;IACH,uDAAyC,CAAA;IAEzC;;OAEG;IACH,6CAA+B,CAAA;AACnC,CAAC,EAfW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAerB"}
+28
View File
@@ -0,0 +1,28 @@
import { InnerErrorDetail } from './innerErrorDetail';
/**
* The top-level error object whose code matches the x-ms-error-code response header
*/
export interface ErrorDetail {
/**
* One of a server-defined set of error codes defined in {@link ErrorCodes}.
*/
code: string;
/**
* A human-readable representation of the error.
*/
message: string;
/**
* The target of the error.
*/
target?: string;
/**
* An array of details about specific errors that led to this reported error.
*/
details?: ErrorDetail[];
/**
* An object containing more specific information than the current object about the
* error.
*/
innererror?: InnerErrorDetail;
}
//# sourceMappingURL=errorDetail.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"errorDetail.d.ts","sourceRoot":"","sources":["../../../src/contracts/errorDetail.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,WAAW;IACxB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IAExB;;;OAGG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC;CACjC"}
+7
View File
@@ -0,0 +1,7 @@
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// Generated from ../../../cs/src/Contracts/ErrorDetail.cs
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=errorDetail.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"errorDetail.js","sourceRoot":"","sources":["../../../src/contracts/errorDetail.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAClC,0DAA0D;AAC1D,oBAAoB"}
+24
View File
@@ -0,0 +1,24 @@
export { Tunnel } from './tunnel';
export { NamedRateStatus } from './namedRateStatus';
export { ProblemDetails } from './problemDetails';
export { TunnelAccessControl } from './tunnelAccessControl';
export { TunnelAccessControlEntry } from './tunnelAccessControlEntry';
export { TunnelAccessControlEntryType } from './tunnelAccessControlEntryType';
export { TunnelAccessScopes } from './tunnelAccessScopes';
export { TunnelConnectionMode } from './tunnelConnectionMode';
export { TunnelEndpoint } from './tunnelEndpoint';
export { TunnelHeaderNames } from './tunnelHeaderNames';
export { TunnelOptions } from './tunnelOptions';
export { TunnelPort } from './tunnelPort';
export { TunnelPortStatus } from './tunnelPortStatus';
export { TunnelProtocol } from './tunnelProtocol';
export { TunnelRelayTunnelEndpoint } from './tunnelRelayTunnelEndpoint';
export { TunnelServiceProperties } from './tunnelServiceProperties';
export { TunnelStatus } from './tunnelStatus';
export { ClusterDetails } from './clusterDetails';
export { TunnelListByRegionResponse } from './tunnelListByRegionResponse';
export { TunnelPortListResponse } from './tunnelPortListResponse';
export { TunnelConstraints } from './tunnelConstraints';
export { TunnelProgress } from './tunnelProgress';
export { TunnelReportProgressEventArgs } from './tunnelReportProgressEventArgs';
//# sourceMappingURL=index.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/contracts/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,6BAA6B,EAAC,MAAM,iCAAiC,CAAC"}
+28
View File
@@ -0,0 +1,28 @@
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
Object.defineProperty(exports, "__esModule", { value: true });
exports.TunnelProgress = exports.TunnelConstraints = exports.TunnelServiceProperties = exports.TunnelProtocol = exports.TunnelHeaderNames = exports.TunnelEndpoint = exports.TunnelConnectionMode = exports.TunnelAccessScopes = exports.TunnelAccessControlEntryType = exports.TunnelAccessControlEntry = exports.TunnelAccessControl = void 0;
var tunnelAccessControl_1 = require("./tunnelAccessControl");
Object.defineProperty(exports, "TunnelAccessControl", { enumerable: true, get: function () { return tunnelAccessControl_1.TunnelAccessControl; } });
var tunnelAccessControlEntry_1 = require("./tunnelAccessControlEntry");
Object.defineProperty(exports, "TunnelAccessControlEntry", { enumerable: true, get: function () { return tunnelAccessControlEntry_1.TunnelAccessControlEntry; } });
var tunnelAccessControlEntryType_1 = require("./tunnelAccessControlEntryType");
Object.defineProperty(exports, "TunnelAccessControlEntryType", { enumerable: true, get: function () { return tunnelAccessControlEntryType_1.TunnelAccessControlEntryType; } });
var tunnelAccessScopes_1 = require("./tunnelAccessScopes");
Object.defineProperty(exports, "TunnelAccessScopes", { enumerable: true, get: function () { return tunnelAccessScopes_1.TunnelAccessScopes; } });
var tunnelConnectionMode_1 = require("./tunnelConnectionMode");
Object.defineProperty(exports, "TunnelConnectionMode", { enumerable: true, get: function () { return tunnelConnectionMode_1.TunnelConnectionMode; } });
var tunnelEndpoint_1 = require("./tunnelEndpoint");
Object.defineProperty(exports, "TunnelEndpoint", { enumerable: true, get: function () { return tunnelEndpoint_1.TunnelEndpoint; } });
var tunnelHeaderNames_1 = require("./tunnelHeaderNames");
Object.defineProperty(exports, "TunnelHeaderNames", { enumerable: true, get: function () { return tunnelHeaderNames_1.TunnelHeaderNames; } });
var tunnelProtocol_1 = require("./tunnelProtocol");
Object.defineProperty(exports, "TunnelProtocol", { enumerable: true, get: function () { return tunnelProtocol_1.TunnelProtocol; } });
var tunnelServiceProperties_1 = require("./tunnelServiceProperties");
Object.defineProperty(exports, "TunnelServiceProperties", { enumerable: true, get: function () { return tunnelServiceProperties_1.TunnelServiceProperties; } });
var tunnelConstraints_1 = require("./tunnelConstraints");
Object.defineProperty(exports, "TunnelConstraints", { enumerable: true, get: function () { return tunnelConstraints_1.TunnelConstraints; } });
var tunnelProgress_1 = require("./tunnelProgress");
Object.defineProperty(exports, "TunnelProgress", { enumerable: true, get: function () { return tunnelProgress_1.TunnelProgress; } });
//# sourceMappingURL=index.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/contracts/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAKlC,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAC5B,uEAAsE;AAA7D,oIAAA,wBAAwB,OAAA;AACjC,+EAA8E;AAArE,4IAAA,4BAA4B,OAAA;AACrC,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA;AAC3B,+DAA8D;AAArD,4HAAA,oBAAoB,OAAA;AAC7B,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAI1B,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AAEvB,qEAAoE;AAA3D,kIAAA,uBAAuB,OAAA;AAKhC,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAC1B,mDAAkD;AAAzC,gHAAA,cAAc,OAAA"}
+16
View File
@@ -0,0 +1,16 @@
/**
* An object containing more specific information than the current object about the error.
*/
export interface InnerErrorDetail {
/**
* A more specific error code than was provided by the containing error. One of a
* server-defined set of error codes in {@link ErrorCodes}.
*/
code: string;
/**
* An object containing more specific information than the current object about the
* error.
*/
innererror?: InnerErrorDetail;
}
//# sourceMappingURL=innerErrorDetail.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"innerErrorDetail.d.ts","sourceRoot":"","sources":["../../../src/contracts/innerErrorDetail.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC;CACjC"}
+7
View File
@@ -0,0 +1,7 @@
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// Generated from ../../../cs/src/Contracts/InnerErrorDetail.cs
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=innerErrorDetail.js.map
@@ -0,0 +1 @@
{"version":3,"file":"innerErrorDetail.js","sourceRoot":"","sources":["../../../src/contracts/innerErrorDetail.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAClC,+DAA+D;AAC/D,oBAAoB"}
@@ -0,0 +1,21 @@
import { TunnelEndpoint } from './tunnelEndpoint';
/**
* Parameters for connecting to a tunnel via a local network connection.
*
* While a direct connection is technically not "tunneling", tunnel hosts may accept
* connections via the local network as an optional more-efficient alternative to a relay.
*/
export interface LocalNetworkTunnelEndpoint extends TunnelEndpoint {
/**
* Gets or sets a list of IP endpoints where the host may accept connections.
*
* A host may accept connections on multiple IP endpoints simultaneously if there are
* multiple network interfaces on the host system and/or if the host supports both
* IPv4 and IPv6. Each item in the list is a URI consisting of a scheme (which gives
* an indication of the network connection protocol), an IP address (IPv4 or IPv6) and
* a port number. The URIs do not typically include any paths, because the connection
* is not normally HTTP-based.
*/
hostEndpoints: string[];
}
//# sourceMappingURL=localNetworkTunnelEndpoint.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"localNetworkTunnelEndpoint.d.ts","sourceRoot":"","sources":["../../../src/contracts/localNetworkTunnelEndpoint.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;;GAKG;AACH,MAAM,WAAW,0BAA2B,SAAQ,cAAc;IAC9D;;;;;;;;;OASG;IACH,aAAa,EAAE,MAAM,EAAE,CAAC;CAC3B"}
@@ -0,0 +1,7 @@
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// Generated from ../../../cs/src/Contracts/LocalNetworkTunnelEndpoint.cs
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=localNetworkTunnelEndpoint.js.map
@@ -0,0 +1 @@
{"version":3,"file":"localNetworkTunnelEndpoint.js","sourceRoot":"","sources":["../../../src/contracts/localNetworkTunnelEndpoint.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAClC,yEAAyE;AACzE,oBAAoB"}
+11
View File
@@ -0,0 +1,11 @@
import { RateStatus } from './rateStatus';
/**
* A named {@link RateStatus}.
*/
export interface NamedRateStatus extends RateStatus {
/**
* The name of the rate status.
*/
name?: string;
}
//# sourceMappingURL=namedRateStatus.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"namedRateStatus.d.ts","sourceRoot":"","sources":["../../../src/contracts/namedRateStatus.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,UAAU;IAC/C;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB"}
+7
View File
@@ -0,0 +1,7 @@
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// Generated from ../../../cs/src/Contracts/NamedRateStatus.cs
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=namedRateStatus.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"namedRateStatus.js","sourceRoot":"","sources":["../../../src/contracts/namedRateStatus.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAClC,8DAA8D;AAC9D,oBAAoB"}
+16
View File
@@ -0,0 +1,16 @@
{
"name": "@microsoft/dev-tunnels-contracts",
"version": "1.1.9",
"description": "Tunnels library for Visual Studio tools",
"keywords": [
"Tunnels"
],
"author": "Microsoft",
"license": "MIT",
"dependencies": {
"buffer": "^5.2.1",
"debug": "^4.1.1",
"vscode-jsonrpc": "^4.0.0"
},
"main": "./index.js"
}
+25
View File
@@ -0,0 +1,25 @@
/**
* Structure of error details returned by the tunnel service, including validation errors.
*
* This object may be returned with a response status code of 400 (or other 4xx code). It
* is compatible with RFC 7807 Problem Details (https://tools.ietf.org/html/rfc7807) and
* https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.problemdetails but
* doesn't require adding a dependency on that package.
*/
export interface ProblemDetails {
/**
* Gets or sets the error title.
*/
title?: string;
/**
* Gets or sets the error detail.
*/
detail?: string;
/**
* Gets or sets additional details about individual request properties.
*/
errors?: {
[property: string]: string[];
};
}
//# sourceMappingURL=problemDetails.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"problemDetails.d.ts","sourceRoot":"","sources":["../../../src/contracts/problemDetails.ts"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,MAAM,WAAW,cAAc;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE;QAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;KAAE,CAAC;CAC7C"}
+7
View File
@@ -0,0 +1,7 @@
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// Generated from ../../../cs/src/Contracts/ProblemDetails.cs
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=problemDetails.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"problemDetails.js","sourceRoot":"","sources":["../../../src/contracts/problemDetails.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAClC,6DAA6D;AAC7D,oBAAoB"}
+20
View File
@@ -0,0 +1,20 @@
import { ResourceStatus } from './resourceStatus';
/**
* Current value and limit information for a rate-limited operation related to a tunnel or
* port.
*/
export interface RateStatus extends ResourceStatus {
/**
* Gets or sets the length of each period, in seconds, over which the rate is
* measured.
*
* For rates that are limited by month (or billing period), this value may represent
* an estimate, since the actual duration may vary by the calendar.
*/
periodSeconds?: number;
/**
* Gets or sets the unix time in seconds when this status will be reset.
*/
resetTime?: number;
}
//# sourceMappingURL=rateStatus.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"rateStatus.d.ts","sourceRoot":"","sources":["../../../src/contracts/rateStatus.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;GAGG;AACH,MAAM,WAAW,UAAW,SAAQ,cAAc;IAC9C;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB"}
+7
View File
@@ -0,0 +1,7 @@
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// Generated from ../../../cs/src/Contracts/RateStatus.cs
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=rateStatus.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"rateStatus.js","sourceRoot":"","sources":["../../../src/contracts/rateStatus.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAClC,yDAAyD;AACzD,oBAAoB"}
+23
View File
@@ -0,0 +1,23 @@
/**
* Current value and limit for a limited resource related to a tunnel or tunnel port.
*/
export interface ResourceStatus {
/**
* Gets or sets the current value.
*/
current: number;
/**
* Gets or sets the limit enforced by the service, or null if there is no limit.
*
* Any requests that would cause the limit to be exceeded may be denied by the
* service. For HTTP requests, the response is generally a 403 Forbidden status, with
* details about the limit in the response body.
*/
limit?: number;
/**
* Gets or sets an optional source of the {@link ResourceStatus.limit}, or null if
* there is no limit.
*/
limitSource?: string;
}
//# sourceMappingURL=resourceStatus.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"resourceStatus.d.ts","sourceRoot":"","sources":["../../../src/contracts/resourceStatus.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB"}
+7
View File
@@ -0,0 +1,7 @@
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// Generated from ../../../cs/src/Contracts/ResourceStatus.cs
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=resourceStatus.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"resourceStatus.js","sourceRoot":"","sources":["../../../src/contracts/resourceStatus.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAClC,6DAA6D;AAC7D,oBAAoB"}
@@ -0,0 +1,27 @@
/**
* Data contract for service version details.
*/
export interface ServiceVersionDetails {
/**
* Gets or sets the version of the service. E.g. "1.0.6615.53976". The version
* corresponds to the build number.
*/
version?: string;
/**
* Gets or sets the commit ID of the service.
*/
commitId?: string;
/**
* Gets or sets the commit date of the service.
*/
commitDate?: string;
/**
* Gets or sets the cluster ID of the service that handled the request.
*/
clusterId?: string;
/**
* Gets or sets the Azure location of the service that handled the request.
*/
azureLocation?: string;
}
//# sourceMappingURL=serviceVersionDetails.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"serviceVersionDetails.d.ts","sourceRoot":"","sources":["../../../src/contracts/serviceVersionDetails.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B"}
@@ -0,0 +1,7 @@
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// Generated from ../../../cs/src/Contracts/ServiceVersionDetails.cs
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=serviceVersionDetails.js.map
@@ -0,0 +1 @@
{"version":3,"file":"serviceVersionDetails.js","sourceRoot":"","sources":["../../../src/contracts/serviceVersionDetails.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAClC,oEAAoE;AACpE,oBAAoB"}
File diff suppressed because one or more lines are too long
+88
View File
@@ -0,0 +1,88 @@
import { TunnelAccessControl } from './tunnelAccessControl';
import { TunnelEndpoint } from './tunnelEndpoint';
import { TunnelOptions } from './tunnelOptions';
import { TunnelPort } from './tunnelPort';
import { TunnelStatus } from './tunnelStatus';
/**
* Data contract for tunnel objects managed through the tunnel service REST API.
*/
export interface Tunnel {
/**
* Gets or sets the ID of the cluster the tunnel was created in.
*/
clusterId?: string;
/**
* Gets or sets the generated ID of the tunnel, unique within the cluster.
*/
tunnelId?: string;
/**
* Gets or sets the optional short name (alias) of the tunnel.
*
* The name must be globally unique within the parent domain, and must be a valid
* subdomain.
*/
name?: string;
/**
* Gets or sets the description of the tunnel.
*/
description?: string;
/**
* Gets or sets the labels of the tunnel.
*/
labels?: string[];
/**
* Gets or sets the optional parent domain of the tunnel, if it is not using the
* default parent domain.
*/
domain?: string;
/**
* Gets or sets a dictionary mapping from scopes to tunnel access tokens.
*/
accessTokens?: {
[scope: string]: string;
};
/**
* Gets or sets access control settings for the tunnel.
*
* See {@link TunnelAccessControl} documentation for details about the access control
* model.
*/
accessControl?: TunnelAccessControl;
/**
* Gets or sets default options for the tunnel.
*/
options?: TunnelOptions;
/**
* Gets or sets current connection status of the tunnel.
*/
status?: TunnelStatus;
/**
* Gets or sets an array of endpoints where hosts are currently accepting client
* connections to the tunnel.
*/
endpoints?: TunnelEndpoint[];
/**
* Gets or sets a list of ports in the tunnel.
*
* This optional property enables getting info about all ports in a tunnel at the same
* time as getting tunnel info, or creating one or more ports at the same time as
* creating a tunnel. It is omitted when listing (multiple) tunnels, or when updating
* tunnel properties. (For the latter, use APIs to create/update/delete individual
* ports instead.)
*/
ports?: TunnelPort[];
/**
* Gets or sets the time in UTC of tunnel creation.
*/
created?: Date;
/**
* Gets or the time the tunnel will be deleted if it is not used or updated.
*/
expiration?: Date;
/**
* Gets or the custom amount of time the tunnel will be valid if it is not used or
* updated in seconds.
*/
customExpiration?: number;
}
//# sourceMappingURL=tunnel.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"tunnel.d.ts","sourceRoot":"","sources":["../../../src/contracts/tunnel.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,MAAM;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAElB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,YAAY,CAAC,EAAE;QAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAE3C;;;;;OAKG;IACH,aAAa,CAAC,EAAE,mBAAmB,CAAC;IAEpC;;OAEG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IAExB;;OAEG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IAEtB;;;OAGG;IACH,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;IAE7B;;;;;;;;OAQG;IACH,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IAErB;;OAEG;IACH,OAAO,CAAC,EAAE,IAAI,CAAC;IAEf;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC;IAElB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B"}
+7
View File
@@ -0,0 +1,7 @@
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// Generated from ../../../cs/src/Contracts/Tunnel.cs
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=tunnel.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"tunnel.js","sourceRoot":"","sources":["../../../src/contracts/tunnel.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAClC,qDAAqD;AACrD,oBAAoB"}
+28
View File
@@ -0,0 +1,28 @@
import { TunnelAccessControlEntry } from './tunnelAccessControlEntry';
/**
* Data contract for access control on a {@link Tunnel} or {@link TunnelPort}.
*
* Tunnels and tunnel ports can each optionally have an access-control property set on
* them. An access-control object contains a list (ACL) of entries (ACEs) that specify the
* access scopes granted or denied to some subjects. Tunnel ports inherit the ACL from the
* tunnel, though ports may include ACEs that augment or override the inherited rules.
* Currently there is no capability to define "roles" for tunnel access (where a role
* specifies a set of related access scopes), and assign roles to users. That feature may
* be added in the future. (It should be represented as a separate `RoleAssignments`
* property on this class.)
*/
export interface TunnelAccessControl {
/**
* Gets or sets the list of access control entries.
*
* The order of entries is significant: later entries override earlier entries that
* apply to the same subject. However, deny rules are always processed after allow
* rules, therefore an allow rule cannot override a deny rule for the same subject.
*/
entries: TunnelAccessControlEntry[];
}
import { validateScopes } from './tunnelAccessControlStatics';
export declare const TunnelAccessControl: {
validateScopes: typeof validateScopes;
};
//# sourceMappingURL=tunnelAccessControl.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"tunnelAccessControl.d.ts","sourceRoot":"","sources":["../../../src/contracts/tunnelAccessControl.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,mBAAmB;IAChC;;;;;;OAMG;IACH,OAAO,EAAE,wBAAwB,EAAE,CAAC;CACvC;AAID,OAAO,EACH,cAAc,EACjB,MAAM,8BAA8B,CAAC;AAEtC,eAAO,MAAM,mBAAmB;;CAE/B,CAAC"}
+14
View File
@@ -0,0 +1,14 @@
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// Generated from ../../../cs/src/Contracts/TunnelAccessControl.cs
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
exports.TunnelAccessControl = void 0;
// Import static members from a non-generated file,
// and re-export them as an object with the same name as the interface.
const tunnelAccessControlStatics_1 = require("./tunnelAccessControlStatics");
exports.TunnelAccessControl = {
validateScopes: tunnelAccessControlStatics_1.validateScopes,
};
//# sourceMappingURL=tunnelAccessControl.js.map
@@ -0,0 +1 @@
{"version":3,"file":"tunnelAccessControl.js","sourceRoot":"","sources":["../../../src/contracts/tunnelAccessControl.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAClC,kEAAkE;AAClE,oBAAoB;;;AA2BpB,mDAAmD;AACnD,uEAAuE;AACvE,6EAEsC;AAEzB,QAAA,mBAAmB,GAAG;IAC/B,cAAc,EAAd,2CAAc;CACjB,CAAC"}
@@ -0,0 +1,117 @@
import { TunnelAccessControlEntryType } from './tunnelAccessControlEntryType';
/**
* Data contract for an access control entry on a {@link Tunnel} or {@link TunnelPort}.
*
* An access control entry (ACE) grants or denies one or more access scopes to one or more
* subjects. Tunnel ports inherit access control entries from their tunnel, and they may
* have additional port-specific entries that augment or override those access rules.
*/
export interface TunnelAccessControlEntry {
/**
* Gets or sets the access control entry type.
*/
type: TunnelAccessControlEntryType;
/**
* Gets or sets the provider of the subjects in this access control entry. The
* provider impacts how the subject identifiers are resolved and displayed. The
* provider may be an identity provider such as AAD, or a system or standard such as
* "ssh" or "ipv4".
*
* For user, group, or org ACEs, this value is the name of the identity provider of
* the user/group/org IDs. It may be one of the well-known provider names in {@link
* TunnelAccessControlEntry.providers}, or (in the future) a custom identity provider.
* For public key ACEs, this value is the type of public key, e.g. "ssh". For IP
* address range ACEs, this value is the IP address version, "ipv4" or "ipv6", or
* "service-tag" if the range is defined by an Azure service tag. For anonymous ACEs,
* this value is null.
*/
provider?: string;
/**
* Gets or sets a value indicating whether this is an access control entry on a tunnel
* port that is inherited from the tunnel's access control list.
*/
isInherited?: boolean;
/**
* Gets or sets a value indicating whether this entry is a deny rule that blocks
* access to the specified users. Otherwise it is an allow rule.
*
* All deny rules (including inherited rules) are processed after all allow rules.
* Therefore a deny ACE cannot be overridden by an allow ACE that is later in the list
* or on a more-specific resource. In other words, inherited deny ACEs cannot be
* overridden.
*/
isDeny?: boolean;
/**
* Gets or sets a value indicating whether this entry applies to all subjects that are
* NOT in the {@link TunnelAccessControlEntry.subjects} list.
*
* Examples: an inverse organizations ACE applies to all users who are not members of
* the listed organization(s); an inverse anonymous ACE applies to all authenticated
* users; an inverse IP address ranges ACE applies to all clients that are not within
* any of the listed IP address ranges. The inverse option is often useful in policies
* in combination with {@link TunnelAccessControlEntry.isDeny}, for example a policy
* could deny access to users who are not members of an organization or are outside of
* an IP address range, effectively blocking any tunnels from allowing outside access
* (because inherited deny ACEs cannot be overridden).
*/
isInverse?: boolean;
/**
* Gets or sets an optional organization context for all subjects of this entry. The
* use and meaning of this value depends on the {@link TunnelAccessControlEntry.type}
* and {@link TunnelAccessControlEntry.provider} of this entry.
*
* For AAD users and group ACEs, this value is the AAD tenant ID. It is not currently
* used with any other types of ACEs.
*/
organization?: string;
/**
* Gets or sets the subjects for the entry, such as user or group IDs. The format of
* the values depends on the {@link TunnelAccessControlEntry.type} and {@link
* TunnelAccessControlEntry.provider} of this entry.
*/
subjects: string[];
/**
* Gets or sets the access scopes that this entry grants or denies to the subjects.
*
* These must be one or more values from {@link TunnelAccessScopes}.
*/
scopes: string[];
/**
* Gets or sets the expiration for an access control entry.
*
* If no value is set then this value is null.
*/
expiration?: Date;
}
export declare namespace TunnelAccessControlEntry {
/**
* Constants for well-known identity providers.
*/
enum Providers {
/**
* Microsoft (AAD) identity provider.
*/
Microsoft = "microsoft",
/**
* GitHub identity provider.
*/
GitHub = "github",
/**
* SSH public keys.
*/
Ssh = "ssh",
/**
* IPv4 addresses.
*/
IPv4 = "ipv4",
/**
* IPv6 addresses.
*/
IPv6 = "ipv6",
/**
* Service tags.
*/
ServiceTag = "service-tag"
}
}
//# sourceMappingURL=tunnelAccessControlEntry.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"tunnelAccessControlEntry.d.ts","sourceRoot":"","sources":["../../../src/contracts/tunnelAccessControlEntry.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAE9E;;;;;;GAMG;AACH,MAAM,WAAW,wBAAwB;IACrC;;OAEG;IACH,IAAI,EAAE,4BAA4B,CAAC;IAEnC;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;OAIG;IACH,QAAQ,EAAE,MAAM,EAAE,CAAC;IAEnB;;;;OAIG;IACH,MAAM,EAAE,MAAM,EAAE,CAAC;IAEjB;;;;OAIG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC;CACrB;AAED,yBAAiB,wBAAwB,CAAC;IACtC;;OAEG;IACH,KAAY,SAAS;QACjB;;WAEG;QACH,SAAS,cAAc;QAEvB;;WAEG;QACH,MAAM,WAAW;QAEjB;;WAEG;QACH,GAAG,QAAQ;QAEX;;WAEG;QACH,IAAI,SAAS;QAEb;;WAEG;QACH,IAAI,SAAS;QAEb;;WAEG;QACH,UAAU,gBAAgB;KAC7B;CACJ"}
@@ -0,0 +1,41 @@
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// Generated from ../../../cs/src/Contracts/TunnelAccessControlEntry.cs
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
exports.TunnelAccessControlEntry = void 0;
var TunnelAccessControlEntry;
(function (TunnelAccessControlEntry) {
/**
* Constants for well-known identity providers.
*/
let Providers;
(function (Providers) {
/**
* Microsoft (AAD) identity provider.
*/
Providers["Microsoft"] = "microsoft";
/**
* GitHub identity provider.
*/
Providers["GitHub"] = "github";
/**
* SSH public keys.
*/
Providers["Ssh"] = "ssh";
/**
* IPv4 addresses.
*/
Providers["IPv4"] = "ipv4";
/**
* IPv6 addresses.
*/
Providers["IPv6"] = "ipv6";
/**
* Service tags.
*/
Providers["ServiceTag"] = "service-tag";
})(Providers = TunnelAccessControlEntry.Providers || (TunnelAccessControlEntry.Providers = {}));
})(TunnelAccessControlEntry = exports.TunnelAccessControlEntry || (exports.TunnelAccessControlEntry = {}));
//# sourceMappingURL=tunnelAccessControlEntry.js.map
@@ -0,0 +1 @@
{"version":3,"file":"tunnelAccessControlEntry.js","sourceRoot":"","sources":["../../../src/contracts/tunnelAccessControlEntry.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAClC,uEAAuE;AACvE,oBAAoB;;;AAiGpB,IAAiB,wBAAwB,CAmCxC;AAnCD,WAAiB,wBAAwB;IACrC;;OAEG;IACH,IAAY,SA8BX;IA9BD,WAAY,SAAS;QACjB;;WAEG;QACH,oCAAuB,CAAA;QAEvB;;WAEG;QACH,8BAAiB,CAAA;QAEjB;;WAEG;QACH,wBAAW,CAAA;QAEX;;WAEG;QACH,0BAAa,CAAA;QAEb;;WAEG;QACH,0BAAa,CAAA;QAEb;;WAEG;QACH,uCAA0B,CAAA;IAC9B,CAAC,EA9BW,SAAS,GAAT,kCAAS,KAAT,kCAAS,QA8BpB;AACL,CAAC,EAnCgB,wBAAwB,GAAxB,gCAAwB,KAAxB,gCAAwB,QAmCxC"}
@@ -0,0 +1,46 @@
/**
* Specifies the type of {@link TunnelAccessControlEntry}.
*/
export declare enum TunnelAccessControlEntryType {
/**
* Uninitialized access control entry type.
*/
None = "None",
/**
* The access control entry refers to all anonymous users.
*/
Anonymous = "Anonymous",
/**
* The access control entry is a list of user IDs that are allowed (or denied) access.
*/
Users = "Users",
/**
* The access control entry is a list of groups IDs that are allowed (or denied)
* access.
*/
Groups = "Groups",
/**
* The access control entry is a list of organization IDs that are allowed (or denied)
* access.
*
* All users in the organizations are allowed (or denied) access, unless overridden by
* following group or user rules.
*/
Organizations = "Organizations",
/**
* The access control entry is a list of repositories. Users are allowed access to the
* tunnel if they have access to the repo.
*/
Repositories = "Repositories",
/**
* The access control entry is a list of public keys. Users are allowed access if they
* can authenticate using a private key corresponding to one of the public keys.
*/
PublicKeys = "PublicKeys",
/**
* The access control entry is a list of IP address ranges that are allowed (or
* denied) access to the tunnel. Ranges can be IPv4, IPv6, or Azure service tags.
*/
IPAddressRanges = "IPAddressRanges"
}
//# sourceMappingURL=tunnelAccessControlEntryType.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"tunnelAccessControlEntryType.d.ts","sourceRoot":"","sources":["../../../src/contracts/tunnelAccessControlEntryType.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,oBAAY,4BAA4B;IACpC;;OAEG;IACH,IAAI,SAAS;IAEb;;OAEG;IACH,SAAS,cAAc;IAEvB;;OAEG;IACH,KAAK,UAAU;IAEf;;;OAGG;IACH,MAAM,WAAW;IAEjB;;;;;;OAMG;IACH,aAAa,kBAAkB;IAE/B;;;OAGG;IACH,YAAY,iBAAiB;IAE7B;;;OAGG;IACH,UAAU,eAAe;IAEzB;;;OAGG;IACH,eAAe,oBAAoB;CACtC"}
@@ -0,0 +1,54 @@
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// Generated from ../../../cs/src/Contracts/TunnelAccessControlEntryType.cs
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
exports.TunnelAccessControlEntryType = void 0;
/**
* Specifies the type of {@link TunnelAccessControlEntry}.
*/
var TunnelAccessControlEntryType;
(function (TunnelAccessControlEntryType) {
/**
* Uninitialized access control entry type.
*/
TunnelAccessControlEntryType["None"] = "None";
/**
* The access control entry refers to all anonymous users.
*/
TunnelAccessControlEntryType["Anonymous"] = "Anonymous";
/**
* The access control entry is a list of user IDs that are allowed (or denied) access.
*/
TunnelAccessControlEntryType["Users"] = "Users";
/**
* The access control entry is a list of groups IDs that are allowed (or denied)
* access.
*/
TunnelAccessControlEntryType["Groups"] = "Groups";
/**
* The access control entry is a list of organization IDs that are allowed (or denied)
* access.
*
* All users in the organizations are allowed (or denied) access, unless overridden by
* following group or user rules.
*/
TunnelAccessControlEntryType["Organizations"] = "Organizations";
/**
* The access control entry is a list of repositories. Users are allowed access to the
* tunnel if they have access to the repo.
*/
TunnelAccessControlEntryType["Repositories"] = "Repositories";
/**
* The access control entry is a list of public keys. Users are allowed access if they
* can authenticate using a private key corresponding to one of the public keys.
*/
TunnelAccessControlEntryType["PublicKeys"] = "PublicKeys";
/**
* The access control entry is a list of IP address ranges that are allowed (or
* denied) access to the tunnel. Ranges can be IPv4, IPv6, or Azure service tags.
*/
TunnelAccessControlEntryType["IPAddressRanges"] = "IPAddressRanges";
})(TunnelAccessControlEntryType = exports.TunnelAccessControlEntryType || (exports.TunnelAccessControlEntryType = {}));
//# sourceMappingURL=tunnelAccessControlEntryType.js.map
@@ -0,0 +1 @@
{"version":3,"file":"tunnelAccessControlEntryType.js","sourceRoot":"","sources":["../../../src/contracts/tunnelAccessControlEntryType.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAClC,2EAA2E;AAC3E,oBAAoB;;;AAEpB;;GAEG;AACH,IAAY,4BAgDX;AAhDD,WAAY,4BAA4B;IACpC;;OAEG;IACH,6CAAa,CAAA;IAEb;;OAEG;IACH,uDAAuB,CAAA;IAEvB;;OAEG;IACH,+CAAe,CAAA;IAEf;;;OAGG;IACH,iDAAiB,CAAA;IAEjB;;;;;;OAMG;IACH,+DAA+B,CAAA;IAE/B;;;OAGG;IACH,6DAA6B,CAAA;IAE7B;;;OAGG;IACH,yDAAyB,CAAA;IAEzB;;;OAGG;IACH,mEAAmC,CAAA;AACvC,CAAC,EAhDW,4BAA4B,GAA5B,oCAA4B,KAA5B,oCAA4B,QAgDvC"}
@@ -0,0 +1,11 @@
/**
* Checks that all items in an array of scopes are valid.
* @param scopes List of scopes to validate.
* @param validScopes Optional subset of scopes to be considered valid;
* if omitted then all defined scopes are valid.
* @param allowMultiple Whether to allow multiple space-delimited scopes in a single item.
* Multiple scopes are supported when requesting a tunnel access token with a combination of scopes.
* @throws Error if a scope is not valid.
*/
export declare function validateScopes(scopes: string[], validScopes?: string[], allowMultiple?: boolean): void;
//# sourceMappingURL=tunnelAccessControlStatics.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"tunnelAccessControlStatics.d.ts","sourceRoot":"","sources":["../../../src/contracts/tunnelAccessControlStatics.ts"],"names":[],"mappings":"AAaA;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC1B,MAAM,EAAE,MAAM,EAAE,EAChB,WAAW,CAAC,EAAE,MAAM,EAAE,EACtB,aAAa,CAAC,EAAE,OAAO,GACxB,IAAI,CAwBN"}
@@ -0,0 +1,47 @@
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateScopes = void 0;
const tunnelAccessScopes_1 = require("./tunnelAccessScopes");
const allScopes = [
tunnelAccessScopes_1.TunnelAccessScopes.Manage,
tunnelAccessScopes_1.TunnelAccessScopes.ManagePorts,
tunnelAccessScopes_1.TunnelAccessScopes.Host,
tunnelAccessScopes_1.TunnelAccessScopes.Inspect,
tunnelAccessScopes_1.TunnelAccessScopes.Connect,
];
/**
* Checks that all items in an array of scopes are valid.
* @param scopes List of scopes to validate.
* @param validScopes Optional subset of scopes to be considered valid;
* if omitted then all defined scopes are valid.
* @param allowMultiple Whether to allow multiple space-delimited scopes in a single item.
* Multiple scopes are supported when requesting a tunnel access token with a combination of scopes.
* @throws Error if a scope is not valid.
*/
function validateScopes(scopes, validScopes, allowMultiple) {
if (!Array.isArray(scopes)) {
throw new TypeError('A scopes array was expected.');
}
if (allowMultiple) {
scopes = scopes.map((s) => s.split(' ')).reduce((a, b) => a.concat(b), []);
}
scopes.forEach((scope) => {
if (!scope) {
throw new Error('Tunnel access scopes include a null/empty item.');
}
else if (!allScopes.includes(scope)) {
throw new Error('Invalid tunnel access scope: ' + scope);
}
});
if (Array.isArray(validScopes)) {
scopes.forEach((scope) => {
if (!validScopes.includes(scope)) {
throw new Error('Tunnel access scope is invalid for current request: scope');
}
});
}
}
exports.validateScopes = validateScopes;
//# sourceMappingURL=tunnelAccessControlStatics.js.map
@@ -0,0 +1 @@
{"version":3,"file":"tunnelAccessControlStatics.js","sourceRoot":"","sources":["../../../src/contracts/tunnelAccessControlStatics.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,6DAA0D;AAE1D,MAAM,SAAS,GAAG;IACd,uCAAkB,CAAC,MAAM;IACzB,uCAAkB,CAAC,WAAW;IAC9B,uCAAkB,CAAC,IAAI;IACvB,uCAAkB,CAAC,OAAO;IAC1B,uCAAkB,CAAC,OAAO;CAC7B,CAAC;AAEF;;;;;;;;GAQG;AACH,SAAgB,cAAc,CAC1B,MAAgB,EAChB,WAAsB,EACtB,aAAuB;IAEvB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;QACxB,MAAM,IAAI,SAAS,CAAC,8BAA8B,CAAC,CAAC;KACvD;IAED,IAAI,aAAa,EAAE;QACf,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;KAC9E;IAED,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QACrB,IAAI,CAAC,KAAK,EAAE;YACR,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;SACtE;aAAM,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAqB,KAAK,CAAC,EAAE;YACvD,MAAM,IAAI,KAAK,CAAC,+BAA+B,GAAG,KAAK,CAAC,CAAC;SAC5D;IACL,CAAC,CAAC,CAAC;IAEH,IAAI,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;QAC5B,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;YACrB,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;gBAC9B,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;aAChF;QACL,CAAC,CAAC,CAAC;KACN;AACL,CAAC;AA5BD,wCA4BC"}
+39
View File
@@ -0,0 +1,39 @@
/**
* Defines scopes for tunnel access tokens.
*
* A tunnel access token with one or more of these scopes typically also has cluster ID
* and tunnel ID claims that limit the access scope to a specific tunnel, and may also
* have one or more port claims that further limit the access to particular ports of the
* tunnel.
*/
export declare enum TunnelAccessScopes {
/**
* Allows creating tunnels. This scope is valid only in policies at the global,
* domain, or organization level; it is not relevant to an already-created tunnel or
* tunnel port. (Creation of ports requires "manage" or "host" access to the tunnel.)
*/
Create = "create",
/**
* Allows management operations on tunnels and tunnel ports.
*/
Manage = "manage",
/**
* Allows management operations on all ports of a tunnel, but does not allow updating
* any other tunnel properties or deleting the tunnel.
*/
ManagePorts = "manage:ports",
/**
* Allows accepting connections on tunnels as a host. Includes access to update tunnel
* endpoints and ports.
*/
Host = "host",
/**
* Allows inspecting tunnel connection activity and data.
*/
Inspect = "inspect",
/**
* Allows connecting to tunnels or ports as a client.
*/
Connect = "connect"
}
//# sourceMappingURL=tunnelAccessScopes.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"tunnelAccessScopes.d.ts","sourceRoot":"","sources":["../../../src/contracts/tunnelAccessScopes.ts"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,oBAAY,kBAAkB;IAC1B;;;;OAIG;IACH,MAAM,WAAW;IAEjB;;OAEG;IACH,MAAM,WAAW;IAEjB;;;OAGG;IACH,WAAW,iBAAiB;IAE5B;;;OAGG;IACH,IAAI,SAAS;IAEb;;OAEG;IACH,OAAO,YAAY;IAEnB;;OAEG;IACH,OAAO,YAAY;CACtB"}
+47
View File
@@ -0,0 +1,47 @@
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// Generated from ../../../cs/src/Contracts/TunnelAccessScopes.cs
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
exports.TunnelAccessScopes = void 0;
/**
* Defines scopes for tunnel access tokens.
*
* A tunnel access token with one or more of these scopes typically also has cluster ID
* and tunnel ID claims that limit the access scope to a specific tunnel, and may also
* have one or more port claims that further limit the access to particular ports of the
* tunnel.
*/
var TunnelAccessScopes;
(function (TunnelAccessScopes) {
/**
* Allows creating tunnels. This scope is valid only in policies at the global,
* domain, or organization level; it is not relevant to an already-created tunnel or
* tunnel port. (Creation of ports requires "manage" or "host" access to the tunnel.)
*/
TunnelAccessScopes["Create"] = "create";
/**
* Allows management operations on tunnels and tunnel ports.
*/
TunnelAccessScopes["Manage"] = "manage";
/**
* Allows management operations on all ports of a tunnel, but does not allow updating
* any other tunnel properties or deleting the tunnel.
*/
TunnelAccessScopes["ManagePorts"] = "manage:ports";
/**
* Allows accepting connections on tunnels as a host. Includes access to update tunnel
* endpoints and ports.
*/
TunnelAccessScopes["Host"] = "host";
/**
* Allows inspecting tunnel connection activity and data.
*/
TunnelAccessScopes["Inspect"] = "inspect";
/**
* Allows connecting to tunnels or ports as a client.
*/
TunnelAccessScopes["Connect"] = "connect";
})(TunnelAccessScopes = exports.TunnelAccessScopes || (exports.TunnelAccessScopes = {}));
//# sourceMappingURL=tunnelAccessScopes.js.map
@@ -0,0 +1 @@
{"version":3,"file":"tunnelAccessScopes.js","sourceRoot":"","sources":["../../../src/contracts/tunnelAccessScopes.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAClC,iEAAiE;AACjE,oBAAoB;;;AAEpB;;;;;;;GAOG;AACH,IAAY,kBAkCX;AAlCD,WAAY,kBAAkB;IAC1B;;;;OAIG;IACH,uCAAiB,CAAA;IAEjB;;OAEG;IACH,uCAAiB,CAAA;IAEjB;;;OAGG;IACH,kDAA4B,CAAA;IAE5B;;;OAGG;IACH,mCAAa,CAAA;IAEb;;OAEG;IACH,yCAAmB,CAAA;IAEnB;;OAEG;IACH,yCAAmB,CAAA;AACvB,CAAC,EAlCW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAkC7B"}
+40
View File
@@ -0,0 +1,40 @@
import { TunnelAccessControlEntryType } from './tunnelAccessControlEntryType';
/**
* Properties about a subject of a tunnel access control entry (ACE), used when resolving
* subject names to IDs when creating new ACEs, or formatting subject IDs to names when
* displaying existing ACEs.
*/
export interface TunnelAccessSubject {
/**
* Gets or sets the type of subject, e.g. user, group, or organization.
*/
type: TunnelAccessControlEntryType;
/**
* Gets or sets the subject ID.
*
* The ID is typically a guid or integer that is unique within the scope of the
* identity provider or organization, and never changes for that subject.
*/
id?: string;
/**
* Gets or sets the subject organization ID, which may be required if an organization
* is not implied by the authentication context.
*/
organizationId?: string;
/**
* Gets or sets the partial or full subject name.
*
* When resolving a subject name to ID, a partial name may be provided, and the full
* name is returned if the partial name was successfully resolved. When formatting a
* subject ID to name, the full name is returned if the ID was found.
*/
name?: string;
/**
* Gets or sets an array of possible subject matches, if a partial name was provided
* and did not resolve to a single subject.
*
* This property applies only when resolving subject names to IDs.
*/
matches?: TunnelAccessSubject[];
}
//# sourceMappingURL=tunnelAccessSubject.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"tunnelAccessSubject.d.ts","sourceRoot":"","sources":["../../../src/contracts/tunnelAccessSubject.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAE9E;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAChC;;OAEG;IACH,IAAI,EAAE,4BAA4B,CAAC;IAEnC;;;;;OAKG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;OAKG;IACH,OAAO,CAAC,EAAE,mBAAmB,EAAE,CAAC;CACnC"}
+7
View File
@@ -0,0 +1,7 @@
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// Generated from ../../../cs/src/Contracts/TunnelAccessSubject.cs
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=tunnelAccessSubject.js.map
@@ -0,0 +1 @@
{"version":3,"file":"tunnelAccessSubject.js","sourceRoot":"","sources":["../../../src/contracts/tunnelAccessSubject.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAClC,kEAAkE;AAClE,oBAAoB"}
@@ -0,0 +1,22 @@
/**
* Defines string constants for authentication schemes supported by tunnel service APIs.
*/
export declare enum TunnelAuthenticationSchemes {
/**
* Authentication scheme for AAD (or Microsoft account) access tokens.
*/
Aad = "aad",
/**
* Authentication scheme for GitHub access tokens.
*/
GitHub = "github",
/**
* Authentication scheme for tunnel access tokens.
*/
Tunnel = "tunnel",
/**
* Authentication scheme for tunnelPlan access tokens.
*/
TunnelPlan = "tunnelplan"
}
//# sourceMappingURL=tunnelAuthenticationSchemes.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"tunnelAuthenticationSchemes.d.ts","sourceRoot":"","sources":["../../../src/contracts/tunnelAuthenticationSchemes.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,oBAAY,2BAA2B;IACnC;;OAEG;IACH,GAAG,QAAQ;IAEX;;OAEG;IACH,MAAM,WAAW;IAEjB;;OAEG;IACH,MAAM,WAAW;IAEjB;;OAEG;IACH,UAAU,eAAe;CAC5B"}
@@ -0,0 +1,30 @@
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// Generated from ../../../cs/src/Contracts/TunnelAuthenticationSchemes.cs
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
exports.TunnelAuthenticationSchemes = void 0;
/**
* Defines string constants for authentication schemes supported by tunnel service APIs.
*/
var TunnelAuthenticationSchemes;
(function (TunnelAuthenticationSchemes) {
/**
* Authentication scheme for AAD (or Microsoft account) access tokens.
*/
TunnelAuthenticationSchemes["Aad"] = "aad";
/**
* Authentication scheme for GitHub access tokens.
*/
TunnelAuthenticationSchemes["GitHub"] = "github";
/**
* Authentication scheme for tunnel access tokens.
*/
TunnelAuthenticationSchemes["Tunnel"] = "tunnel";
/**
* Authentication scheme for tunnelPlan access tokens.
*/
TunnelAuthenticationSchemes["TunnelPlan"] = "tunnelplan";
})(TunnelAuthenticationSchemes = exports.TunnelAuthenticationSchemes || (exports.TunnelAuthenticationSchemes = {}));
//# sourceMappingURL=tunnelAuthenticationSchemes.js.map
@@ -0,0 +1 @@
{"version":3,"file":"tunnelAuthenticationSchemes.js","sourceRoot":"","sources":["../../../src/contracts/tunnelAuthenticationSchemes.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAClC,0EAA0E;AAC1E,oBAAoB;;;AAEpB;;GAEG;AACH,IAAY,2BAoBX;AApBD,WAAY,2BAA2B;IACnC;;OAEG;IACH,0CAAW,CAAA;IAEX;;OAEG;IACH,gDAAiB,CAAA;IAEjB;;OAEG;IACH,gDAAiB,CAAA;IAEjB;;OAEG;IACH,wDAAyB,CAAA;AAC7B,CAAC,EApBW,2BAA2B,GAA3B,mCAA2B,KAA3B,mCAA2B,QAoBtC"}
@@ -0,0 +1,20 @@
/**
* Specifies the connection protocol / implementation for a tunnel.
*
* Depending on the connection mode, hosts or clients might need to use different
* authentication and connection protocols.
*/
export declare enum TunnelConnectionMode {
/**
* Connect directly to the host over the local network.
*
* While it's technically not "tunneling", this mode may be combined with others to
* enable choosing the most efficient connection mode available.
*/
LocalNetwork = "LocalNetwork",
/**
* Use the tunnel service's integrated relay function.
*/
TunnelRelay = "TunnelRelay"
}
//# sourceMappingURL=tunnelConnectionMode.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"tunnelConnectionMode.d.ts","sourceRoot":"","sources":["../../../src/contracts/tunnelConnectionMode.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,oBAAY,oBAAoB;IAC5B;;;;;OAKG;IACH,YAAY,iBAAiB;IAE7B;;OAEG;IACH,WAAW,gBAAgB;CAC9B"}
+28
View File
@@ -0,0 +1,28 @@
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// Generated from ../../../cs/src/Contracts/TunnelConnectionMode.cs
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
exports.TunnelConnectionMode = void 0;
/**
* Specifies the connection protocol / implementation for a tunnel.
*
* Depending on the connection mode, hosts or clients might need to use different
* authentication and connection protocols.
*/
var TunnelConnectionMode;
(function (TunnelConnectionMode) {
/**
* Connect directly to the host over the local network.
*
* While it's technically not "tunneling", this mode may be combined with others to
* enable choosing the most efficient connection mode available.
*/
TunnelConnectionMode["LocalNetwork"] = "LocalNetwork";
/**
* Use the tunnel service's integrated relay function.
*/
TunnelConnectionMode["TunnelRelay"] = "TunnelRelay";
})(TunnelConnectionMode = exports.TunnelConnectionMode || (exports.TunnelConnectionMode = {}));
//# sourceMappingURL=tunnelConnectionMode.js.map
@@ -0,0 +1 @@
{"version":3,"file":"tunnelConnectionMode.js","sourceRoot":"","sources":["../../../src/contracts/tunnelConnectionMode.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAClC,mEAAmE;AACnE,oBAAoB;;;AAEpB;;;;;GAKG;AACH,IAAY,oBAaX;AAbD,WAAY,oBAAoB;IAC5B;;;;;OAKG;IACH,qDAA6B,CAAA;IAE7B;;OAEG;IACH,mDAA2B,CAAA;AAC/B,CAAC,EAbW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAa/B"}
+223
View File
@@ -0,0 +1,223 @@
/**
* Tunnel constraints.
*/
export declare namespace TunnelConstraints {
/**
* Min length of tunnel cluster ID.
*/
const clusterIdMinLength: number;
/**
* Max length of tunnel cluster ID.
*/
const clusterIdMaxLength: number;
/**
* Length of V1 tunnel id.
*/
const oldTunnelIdLength: number;
/**
* Min length of V2 tunnelId.
*/
const newTunnelIdMinLength: number;
/**
* Max length of V2 tunnelId.
*/
const newTunnelIdMaxLength: number;
/**
* Length of a tunnel alias.
*/
const tunnelAliasLength: number;
/**
* Min length of tunnel name.
*/
const tunnelNameMinLength: number;
/**
* Max length of tunnel name.
*/
const tunnelNameMaxLength: number;
/**
* Max length of tunnel or port description.
*/
const descriptionMaxLength: number;
/**
* Min length of a single tunnel or port tag.
*/
const labelMinLength: number;
/**
* Max length of a single tunnel or port tag.
*/
const labelMaxLength: number;
/**
* Maximum number of labels that can be applied to a tunnel or port.
*/
const maxLabels: number;
/**
* Min length of a tunnel domain.
*/
const tunnelDomainMinLength: number;
/**
* Max length of a tunnel domain.
*/
const tunnelDomainMaxLength: number;
/**
* Maximum number of items allowed in the tunnel ports array. The actual limit on
* number of ports that can be created may be much lower, and may depend on various
* resource limitations or policies.
*/
const tunnelMaxPorts: number;
/**
* Maximum number of access control entries (ACEs) in a tunnel or tunnel port access
* control list (ACL).
*/
const accessControlMaxEntries: number;
/**
* Maximum number of subjects (such as user IDs) in a tunnel or tunnel port access
* control entry (ACE).
*/
const accessControlMaxSubjects: number;
/**
* Max length of an access control subject or organization ID.
*/
const accessControlSubjectMaxLength: number;
/**
* Max length of an access control subject name, when resolving names to IDs.
*/
const accessControlSubjectNameMaxLength: number;
/**
* Maximum number of scopes in an access control entry.
*/
const accessControlMaxScopes: number;
/**
* Regular expression that can match or validate tunnel cluster ID strings.
*
* Cluster IDs are alphanumeric; hyphens are not permitted.
*/
const clusterIdPattern: string;
/**
* Regular expression that can match or validate tunnel cluster ID strings.
*
* Cluster IDs are alphanumeric; hyphens are not permitted.
*/
const clusterIdRegex: RegExp;
/**
* Characters that are valid in tunnel IDs. Includes numbers and lowercase letters,
* excluding vowels and 'y' (to avoid accidentally generating any random words).
*/
const oldTunnelIdChars: string;
/**
* Regular expression that can match or validate tunnel ID strings.
*
* Tunnel IDs are fixed-length and have a limited character set of numbers and
* lowercase letters (minus vowels and y).
*/
const oldTunnelIdPattern: string;
/**
* Regular expression that can match or validate tunnel ID strings.
*
* Tunnel IDs are fixed-length and have a limited character set of numbers and
* lowercase letters (minus vowels and y).
*/
const oldTunnelIdRegex: RegExp;
/**
* Characters that are valid in tunnel IDs. Includes numbers and lowercase letters,
* excluding vowels and 'y' (to avoid accidentally generating any random words).
*/
const newTunnelIdChars: string;
/**
* Regular expression that can match or validate tunnel ID strings.
*
* Tunnel IDs are fixed-length and have a limited character set of numbers and
* lowercase letters (minus vowels and y).
*/
const newTunnelIdPattern: string;
/**
* Regular expression that can match or validate tunnel ID strings.
*
* Tunnel IDs are fixed-length and have a limited character set of numbers and
* lowercase letters (minus vowels and y).
*/
const newTunnelIdRegex: RegExp;
/**
* Characters that are valid in tunnel IDs. Includes numbers and lowercase letters,
* excluding vowels and 'y' (to avoid accidentally generating any random words).
*/
const tunnelAliasChars: string;
/**
* Regular expression that can match or validate tunnel alias strings.
*
* Tunnel Aliases are fixed-length and have a limited character set of numbers and
* lowercase letters (minus vowels and y).
*/
const tunnelAliasPattern: string;
/**
* Regular expression that can match or validate tunnel alias strings.
*
* Tunnel Aliases are fixed-length and have a limited character set of numbers and
* lowercase letters (minus vowels and y).
*/
const tunnelAliasRegex: RegExp;
/**
* Regular expression that can match or validate tunnel names.
*
* Tunnel names are alphanumeric and may contain hyphens. The pattern also allows an
* empty string because tunnels may be unnamed.
*/
const tunnelNamePattern: string;
/**
* Regular expression that can match or validate tunnel names.
*
* Tunnel names are alphanumeric and may contain hyphens. The pattern also allows an
* empty string because tunnels may be unnamed.
*/
const tunnelNameRegex: RegExp;
/**
* Regular expression that can match or validate tunnel or port labels.
*/
const labelPattern: string;
/**
* Regular expression that can match or validate tunnel or port labels.
*/
const labelRegex: RegExp;
/**
* Regular expression that can match or validate tunnel domains.
*
* The tunnel service may perform additional contextual validation at the time the
* domain is registered.
*/
const tunnelDomainPattern: string;
/**
* Regular expression that can match or validate tunnel domains.
*
* The tunnel service may perform additional contextual validation at the time the
* domain is registered.
*/
const tunnelDomainRegex: RegExp;
/**
* Regular expression that can match or validate an access control subject or
* organization ID.
*
* The : and / characters are allowed because subjects may include IP addresses and
* ranges. The @ character is allowed because MSA subjects may be identified by email
* address.
*/
const accessControlSubjectPattern: string;
/**
* Regular expression that can match or validate an access control subject or
* organization ID.
*/
const accessControlSubjectRegex: RegExp;
/**
* Regular expression that can match or validate an access control subject name, when
* resolving subject names to IDs.
*
* Note angle-brackets are only allowed when they wrap an email address as part of a
* formatted name with email. The service will block any other use of angle-brackets,
* to avoid any XSS risks.
*/
const accessControlSubjectNamePattern: string;
/**
* Regular expression that can match or validate an access control subject name, when
* resolving subject names to IDs.
*/
const accessControlSubjectNameRegex: RegExp;
}
//# sourceMappingURL=tunnelConstraints.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"tunnelConstraints.d.ts","sourceRoot":"","sources":["../../../src/contracts/tunnelConstraints.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,yBAAiB,iBAAiB,CAAC;IAC/B;;OAEG;IACI,MAAM,kBAAkB,EAAE,MAAU,CAAC;IAE5C;;OAEG;IACI,MAAM,kBAAkB,EAAE,MAAW,CAAC;IAE7C;;OAEG;IACI,MAAM,iBAAiB,EAAE,MAAU,CAAC;IAE3C;;OAEG;IACI,MAAM,oBAAoB,EAAE,MAAU,CAAC;IAE9C;;OAEG;IACI,MAAM,oBAAoB,EAAE,MAAW,CAAC;IAE/C;;OAEG;IACI,MAAM,iBAAiB,EAAE,MAAU,CAAC;IAE3C;;OAEG;IACI,MAAM,mBAAmB,EAAE,MAAU,CAAC;IAE7C;;OAEG;IACI,MAAM,mBAAmB,EAAE,MAAW,CAAC;IAE9C;;OAEG;IACI,MAAM,oBAAoB,EAAE,MAAY,CAAC;IAEhD;;OAEG;IACI,MAAM,cAAc,EAAE,MAAU,CAAC;IAExC;;OAEG;IACI,MAAM,cAAc,EAAE,MAAW,CAAC;IAEzC;;OAEG;IACI,MAAM,SAAS,EAAE,MAAY,CAAC;IAErC;;OAEG;IACI,MAAM,qBAAqB,EAAE,MAAU,CAAC;IAE/C;;OAEG;IACI,MAAM,qBAAqB,EAAE,MAAY,CAAC;IAEjD;;;;OAIG;IACI,MAAM,cAAc,EAAE,MAAa,CAAC;IAE3C;;;OAGG;IACI,MAAM,uBAAuB,EAAE,MAAW,CAAC;IAElD;;;OAGG;IACI,MAAM,wBAAwB,EAAE,MAAY,CAAC;IAEpD;;OAEG;IACI,MAAM,6BAA6B,EAAE,MAAY,CAAC;IAEzD;;OAEG;IACI,MAAM,iCAAiC,EAAE,MAAY,CAAC;IAE7D;;OAEG;IACI,MAAM,sBAAsB,EAAE,MAAW,CAAC;IAEjD;;;;OAIG;IACI,MAAM,gBAAgB,EAAE,MAA0D,CAAC;IAE1F;;;;OAIG;IACI,MAAM,cAAc,EAAE,MAAuD,CAAC;IAErF;;;OAGG;IACI,MAAM,gBAAgB,EAAE,MAAyC,CAAC;IAEzE;;;;;OAKG;IACI,MAAM,kBAAkB,EAAE,MAA0D,CAAC;IAE5F;;;;;OAKG;IACI,MAAM,gBAAgB,EAAE,MAAyD,CAAC;IAEzF;;;OAGG;IACI,MAAM,gBAAgB,EAAE,MAAgD,CAAC;IAEhF;;;;;OAKG;IACI,MAAM,kBAAkB,EAAE,MAA0C,CAAC;IAE5E;;;;;OAKG;IACI,MAAM,gBAAgB,EAAE,MAAyD,CAAC;IAEzF;;;OAGG;IACI,MAAM,gBAAgB,EAAE,MAAyC,CAAC;IAEzE;;;;;OAKG;IACI,MAAM,kBAAkB,EAAE,MAA6D,CAAC;IAE/F;;;;;OAKG;IACI,MAAM,gBAAgB,EAAE,MAAyD,CAAC;IAEzF;;;;;OAKG;IACI,MAAM,iBAAiB,EAAE,MAAiD,CAAC;IAElF;;;;;OAKG;IACI,MAAM,eAAe,EAAE,MAAwD,CAAC;IAEvF;;OAEG;IACI,MAAM,YAAY,EAAE,MAAwB,CAAC;IAEpD;;OAEG;IACI,MAAM,UAAU,EAAE,MAAmD,CAAC;IAE7E;;;;;OAKG;IACI,MAAM,mBAAmB,EAAE,MAAiD,CAAC;IAEpF;;;;;OAKG;IACI,MAAM,iBAAiB,EAAE,MAA0D,CAAC;IAE3F;;;;;;;OAOG;IACI,MAAM,2BAA2B,EAAE,MAAmC,CAAC;IAE9E;;;OAGG;IACI,MAAM,yBAAyB,EAAE,MAAkE,CAAC;IAE3G;;;;;;;OAOG;IACI,MAAM,+BAA+B,EAAE,MAAwC,CAAC;IAEvF;;;OAGG;IACI,MAAM,6BAA6B,EAAE,MAAsE,CAAC;CACtH"}
+231
View File
@@ -0,0 +1,231 @@
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// Generated from ../../../cs/src/Contracts/TunnelConstraints.cs
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
exports.TunnelConstraints = void 0;
/**
* Tunnel constraints.
*/
var TunnelConstraints;
(function (TunnelConstraints) {
/**
* Min length of tunnel cluster ID.
*/
TunnelConstraints.clusterIdMinLength = 3;
/**
* Max length of tunnel cluster ID.
*/
TunnelConstraints.clusterIdMaxLength = 12;
/**
* Length of V1 tunnel id.
*/
TunnelConstraints.oldTunnelIdLength = 8;
/**
* Min length of V2 tunnelId.
*/
TunnelConstraints.newTunnelIdMinLength = 3;
/**
* Max length of V2 tunnelId.
*/
TunnelConstraints.newTunnelIdMaxLength = 60;
/**
* Length of a tunnel alias.
*/
TunnelConstraints.tunnelAliasLength = 8;
/**
* Min length of tunnel name.
*/
TunnelConstraints.tunnelNameMinLength = 3;
/**
* Max length of tunnel name.
*/
TunnelConstraints.tunnelNameMaxLength = 60;
/**
* Max length of tunnel or port description.
*/
TunnelConstraints.descriptionMaxLength = 400;
/**
* Min length of a single tunnel or port tag.
*/
TunnelConstraints.labelMinLength = 1;
/**
* Max length of a single tunnel or port tag.
*/
TunnelConstraints.labelMaxLength = 50;
/**
* Maximum number of labels that can be applied to a tunnel or port.
*/
TunnelConstraints.maxLabels = 100;
/**
* Min length of a tunnel domain.
*/
TunnelConstraints.tunnelDomainMinLength = 4;
/**
* Max length of a tunnel domain.
*/
TunnelConstraints.tunnelDomainMaxLength = 180;
/**
* Maximum number of items allowed in the tunnel ports array. The actual limit on
* number of ports that can be created may be much lower, and may depend on various
* resource limitations or policies.
*/
TunnelConstraints.tunnelMaxPorts = 1000;
/**
* Maximum number of access control entries (ACEs) in a tunnel or tunnel port access
* control list (ACL).
*/
TunnelConstraints.accessControlMaxEntries = 40;
/**
* Maximum number of subjects (such as user IDs) in a tunnel or tunnel port access
* control entry (ACE).
*/
TunnelConstraints.accessControlMaxSubjects = 100;
/**
* Max length of an access control subject or organization ID.
*/
TunnelConstraints.accessControlSubjectMaxLength = 200;
/**
* Max length of an access control subject name, when resolving names to IDs.
*/
TunnelConstraints.accessControlSubjectNameMaxLength = 200;
/**
* Maximum number of scopes in an access control entry.
*/
TunnelConstraints.accessControlMaxScopes = 10;
/**
* Regular expression that can match or validate tunnel cluster ID strings.
*
* Cluster IDs are alphanumeric; hyphens are not permitted.
*/
TunnelConstraints.clusterIdPattern = '^(([a-z]{3,4}[0-9]{1,3})|asse|aue|brs|euw|use)$';
/**
* Regular expression that can match or validate tunnel cluster ID strings.
*
* Cluster IDs are alphanumeric; hyphens are not permitted.
*/
TunnelConstraints.clusterIdRegex = new RegExp(TunnelConstraints.clusterIdPattern);
/**
* Characters that are valid in tunnel IDs. Includes numbers and lowercase letters,
* excluding vowels and 'y' (to avoid accidentally generating any random words).
*/
TunnelConstraints.oldTunnelIdChars = '0123456789bcdfghjklmnpqrstvwxz';
/**
* Regular expression that can match or validate tunnel ID strings.
*
* Tunnel IDs are fixed-length and have a limited character set of numbers and
* lowercase letters (minus vowels and y).
*/
TunnelConstraints.oldTunnelIdPattern = '[' + TunnelConstraints.oldTunnelIdChars + ']{8}';
/**
* Regular expression that can match or validate tunnel ID strings.
*
* Tunnel IDs are fixed-length and have a limited character set of numbers and
* lowercase letters (minus vowels and y).
*/
TunnelConstraints.oldTunnelIdRegex = new RegExp(TunnelConstraints.oldTunnelIdPattern);
/**
* Characters that are valid in tunnel IDs. Includes numbers and lowercase letters,
* excluding vowels and 'y' (to avoid accidentally generating any random words).
*/
TunnelConstraints.newTunnelIdChars = '0123456789abcdefghijklmnopqrstuvwxyz-';
/**
* Regular expression that can match or validate tunnel ID strings.
*
* Tunnel IDs are fixed-length and have a limited character set of numbers and
* lowercase letters (minus vowels and y).
*/
TunnelConstraints.newTunnelIdPattern = '[a-z0-9][a-z0-9-]{1,58}[a-z0-9]';
/**
* Regular expression that can match or validate tunnel ID strings.
*
* Tunnel IDs are fixed-length and have a limited character set of numbers and
* lowercase letters (minus vowels and y).
*/
TunnelConstraints.newTunnelIdRegex = new RegExp(TunnelConstraints.newTunnelIdPattern);
/**
* Characters that are valid in tunnel IDs. Includes numbers and lowercase letters,
* excluding vowels and 'y' (to avoid accidentally generating any random words).
*/
TunnelConstraints.tunnelAliasChars = '0123456789bcdfghjklmnpqrstvwxz';
/**
* Regular expression that can match or validate tunnel alias strings.
*
* Tunnel Aliases are fixed-length and have a limited character set of numbers and
* lowercase letters (minus vowels and y).
*/
TunnelConstraints.tunnelAliasPattern = '[' + TunnelConstraints.tunnelAliasChars + ']{3,60}';
/**
* Regular expression that can match or validate tunnel alias strings.
*
* Tunnel Aliases are fixed-length and have a limited character set of numbers and
* lowercase letters (minus vowels and y).
*/
TunnelConstraints.tunnelAliasRegex = new RegExp(TunnelConstraints.tunnelAliasPattern);
/**
* Regular expression that can match or validate tunnel names.
*
* Tunnel names are alphanumeric and may contain hyphens. The pattern also allows an
* empty string because tunnels may be unnamed.
*/
TunnelConstraints.tunnelNamePattern = '([a-z0-9][a-z0-9-]{1,58}[a-z0-9])|(^$)';
/**
* Regular expression that can match or validate tunnel names.
*
* Tunnel names are alphanumeric and may contain hyphens. The pattern also allows an
* empty string because tunnels may be unnamed.
*/
TunnelConstraints.tunnelNameRegex = new RegExp(TunnelConstraints.tunnelNamePattern);
/**
* Regular expression that can match or validate tunnel or port labels.
*/
TunnelConstraints.labelPattern = '[\\w-=]{1,50}';
/**
* Regular expression that can match or validate tunnel or port labels.
*/
TunnelConstraints.labelRegex = new RegExp(TunnelConstraints.labelPattern);
/**
* Regular expression that can match or validate tunnel domains.
*
* The tunnel service may perform additional contextual validation at the time the
* domain is registered.
*/
TunnelConstraints.tunnelDomainPattern = '[0-9a-z][0-9a-z-.]{1,158}[0-9a-z]|(^$)';
/**
* Regular expression that can match or validate tunnel domains.
*
* The tunnel service may perform additional contextual validation at the time the
* domain is registered.
*/
TunnelConstraints.tunnelDomainRegex = new RegExp(TunnelConstraints.tunnelDomainPattern);
/**
* Regular expression that can match or validate an access control subject or
* organization ID.
*
* The : and / characters are allowed because subjects may include IP addresses and
* ranges. The @ character is allowed because MSA subjects may be identified by email
* address.
*/
TunnelConstraints.accessControlSubjectPattern = '[0-9a-zA-Z-._:/@]{0,200}';
/**
* Regular expression that can match or validate an access control subject or
* organization ID.
*/
TunnelConstraints.accessControlSubjectRegex = new RegExp(TunnelConstraints.accessControlSubjectPattern);
/**
* Regular expression that can match or validate an access control subject name, when
* resolving subject names to IDs.
*
* Note angle-brackets are only allowed when they wrap an email address as part of a
* formatted name with email. The service will block any other use of angle-brackets,
* to avoid any XSS risks.
*/
TunnelConstraints.accessControlSubjectNamePattern = '[ \\w\\d-.,/\'"_@()<>]{0,200}';
/**
* Regular expression that can match or validate an access control subject name, when
* resolving subject names to IDs.
*/
TunnelConstraints.accessControlSubjectNameRegex = new RegExp(TunnelConstraints.accessControlSubjectNamePattern);
})(TunnelConstraints = exports.TunnelConstraints || (exports.TunnelConstraints = {}));
//# sourceMappingURL=tunnelConstraints.js.map
@@ -0,0 +1 @@
{"version":3,"file":"tunnelConstraints.js","sourceRoot":"","sources":["../../../src/contracts/tunnelConstraints.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAClC,gEAAgE;AAChE,oBAAoB;;;AAEpB;;GAEG;AACH,IAAiB,iBAAiB,CAkQjC;AAlQD,WAAiB,iBAAiB;IAC9B;;OAEG;IACU,oCAAkB,GAAW,CAAC,CAAC;IAE5C;;OAEG;IACU,oCAAkB,GAAW,EAAE,CAAC;IAE7C;;OAEG;IACU,mCAAiB,GAAW,CAAC,CAAC;IAE3C;;OAEG;IACU,sCAAoB,GAAW,CAAC,CAAC;IAE9C;;OAEG;IACU,sCAAoB,GAAW,EAAE,CAAC;IAE/C;;OAEG;IACU,mCAAiB,GAAW,CAAC,CAAC;IAE3C;;OAEG;IACU,qCAAmB,GAAW,CAAC,CAAC;IAE7C;;OAEG;IACU,qCAAmB,GAAW,EAAE,CAAC;IAE9C;;OAEG;IACU,sCAAoB,GAAW,GAAG,CAAC;IAEhD;;OAEG;IACU,gCAAc,GAAW,CAAC,CAAC;IAExC;;OAEG;IACU,gCAAc,GAAW,EAAE,CAAC;IAEzC;;OAEG;IACU,2BAAS,GAAW,GAAG,CAAC;IAErC;;OAEG;IACU,uCAAqB,GAAW,CAAC,CAAC;IAE/C;;OAEG;IACU,uCAAqB,GAAW,GAAG,CAAC;IAEjD;;;;OAIG;IACU,gCAAc,GAAW,IAAI,CAAC;IAE3C;;;OAGG;IACU,yCAAuB,GAAW,EAAE,CAAC;IAElD;;;OAGG;IACU,0CAAwB,GAAW,GAAG,CAAC;IAEpD;;OAEG;IACU,+CAA6B,GAAW,GAAG,CAAC;IAEzD;;OAEG;IACU,mDAAiC,GAAW,GAAG,CAAC;IAE7D;;OAEG;IACU,wCAAsB,GAAW,EAAE,CAAC;IAEjD;;;;OAIG;IACU,kCAAgB,GAAW,iDAAiD,CAAC;IAE1F;;;;OAIG;IACU,gCAAc,GAAW,IAAI,MAAM,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;IAErF;;;OAGG;IACU,kCAAgB,GAAW,gCAAgC,CAAC;IAEzE;;;;;OAKG;IACU,oCAAkB,GAAW,GAAG,GAAG,iBAAiB,CAAC,gBAAgB,GAAG,MAAM,CAAC;IAE5F;;;;;OAKG;IACU,kCAAgB,GAAW,IAAI,MAAM,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,CAAC;IAEzF;;;OAGG;IACU,kCAAgB,GAAW,uCAAuC,CAAC;IAEhF;;;;;OAKG;IACU,oCAAkB,GAAW,iCAAiC,CAAC;IAE5E;;;;;OAKG;IACU,kCAAgB,GAAW,IAAI,MAAM,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,CAAC;IAEzF;;;OAGG;IACU,kCAAgB,GAAW,gCAAgC,CAAC;IAEzE;;;;;OAKG;IACU,oCAAkB,GAAW,GAAG,GAAG,iBAAiB,CAAC,gBAAgB,GAAG,SAAS,CAAC;IAE/F;;;;;OAKG;IACU,kCAAgB,GAAW,IAAI,MAAM,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,CAAC;IAEzF;;;;;OAKG;IACU,mCAAiB,GAAW,wCAAwC,CAAC;IAElF;;;;;OAKG;IACU,iCAAe,GAAW,IAAI,MAAM,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IAEvF;;OAEG;IACU,8BAAY,GAAW,eAAe,CAAC;IAEpD;;OAEG;IACU,4BAAU,GAAW,IAAI,MAAM,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;IAE7E;;;;;OAKG;IACU,qCAAmB,GAAW,wCAAwC,CAAC;IAEpF;;;;;OAKG;IACU,mCAAiB,GAAW,IAAI,MAAM,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;IAE3F;;;;;;;OAOG;IACU,6CAA2B,GAAW,0BAA0B,CAAC;IAE9E;;;OAGG;IACU,2CAAyB,GAAW,IAAI,MAAM,CAAC,iBAAiB,CAAC,2BAA2B,CAAC,CAAC;IAE3G;;;;;;;OAOG;IACU,iDAA+B,GAAW,+BAA+B,CAAC;IAEvF;;;OAGG;IACU,+CAA6B,GAAW,IAAI,MAAM,CAAC,iBAAiB,CAAC,+BAA+B,CAAC,CAAC;AACvH,CAAC,EAlQgB,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAkQjC"}
+77
View File
@@ -0,0 +1,77 @@
import { TunnelConnectionMode } from './tunnelConnectionMode';
/**
* Base class for tunnel connection parameters.
*
* A tunnel endpoint specifies how and where hosts and clients can connect to a tunnel.
* There is a subclass for each connection mode, each having different connection
* parameters. A tunnel may have multiple endpoints for one host (or multiple hosts), and
* clients can select their preferred endpoint(s) from those depending on network
* environment or client capabilities.
*/
export interface TunnelEndpoint {
/**
* Gets or sets the ID of this endpoint.
*/
id?: string;
/**
* Gets or sets the connection mode of the endpoint.
*
* This property is required when creating or updating an endpoint. The subclass type
* is also an indication of the connection mode, but this property is necessary to
* determine the subclass type when deserializing.
*/
connectionMode: TunnelConnectionMode;
/**
* Gets or sets the ID of the host that is listening on this endpoint.
*
* This property is required when creating or updating an endpoint. If the host
* supports multiple connection modes, the host's ID is the same for all the endpoints
* it supports. However different hosts may simultaneously accept connections at
* different endpoints for the same tunnel, if enabled in tunnel options.
*/
hostId: string;
/**
* Gets or sets an array of public keys, which can be used by clients to authenticate
* the host.
*/
hostPublicKeys?: string[];
/**
* Gets or sets a string used to format URIs where a web client can connect to ports
* of the tunnel. The string includes a {@link TunnelEndpoint.portToken} that must be
* replaced with the actual port number.
*/
portUriFormat?: string;
/**
* Gets or sets the URI where a web client can connect to the default port of the
* tunnel.
*/
tunnelUri?: string;
/**
* Gets or sets a string used to format ssh command where ssh client can connect to
* shared ssh port of the tunnel. The string includes a {@link
* TunnelEndpoint.portToken} that must be replaced with the actual port number.
*/
portSshCommandFormat?: string;
/**
* Gets or sets the Ssh command where the Ssh client can connect to the default ssh
* port of the tunnel.
*/
tunnelSshCommand?: string;
/**
* Gets or sets the Ssh gateway public key which should be added to the
* authorized_keys file so that tunnel service can connect to the shared ssh server.
*/
sshGatewayPublicKey?: string;
}
/**
* Token included in {@link TunnelEndpoint.portUriFormat} and {@link
* TunnelEndpoint.portSshCommandFormat} that is to be replaced by a specified port number.
*/
export declare const portToken = "{port}";
import { getPortUri, getPortSshCommand } from './tunnelEndpointStatics';
export declare const TunnelEndpoint: {
portToken: string;
getPortUri: typeof getPortUri;
getPortSshCommand: typeof getPortSshCommand;
};
//# sourceMappingURL=tunnelEndpoint.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"tunnelEndpoint.d.ts","sourceRoot":"","sources":["../../../src/contracts/tunnelEndpoint.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D;;;;;;;;GAQG;AACH,MAAM,WAAW,cAAc;IAC3B;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;;;;OAMG;IACH,cAAc,EAAE,oBAAoB,CAAC;IAErC;;;;;;;OAOG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAE1B;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,WAAW,CAAC;AAIlC,OAAO,EACH,UAAU,EACV,iBAAiB,EACpB,MAAM,yBAAyB,CAAC;AAEjC,eAAO,MAAM,cAAc;;;;CAI1B,CAAC"}
+21
View File
@@ -0,0 +1,21 @@
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// Generated from ../../../cs/src/Contracts/TunnelEndpoint.cs
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
exports.TunnelEndpoint = exports.portToken = void 0;
/**
* Token included in {@link TunnelEndpoint.portUriFormat} and {@link
* TunnelEndpoint.portSshCommandFormat} that is to be replaced by a specified port number.
*/
exports.portToken = '{port}';
// Import static members from a non-generated file,
// and re-export them as an object with the same name as the interface.
const tunnelEndpointStatics_1 = require("./tunnelEndpointStatics");
exports.TunnelEndpoint = {
portToken: exports.portToken,
getPortUri: tunnelEndpointStatics_1.getPortUri,
getPortSshCommand: tunnelEndpointStatics_1.getPortSshCommand,
};
//# sourceMappingURL=tunnelEndpoint.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"tunnelEndpoint.js","sourceRoot":"","sources":["../../../src/contracts/tunnelEndpoint.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAClC,6DAA6D;AAC7D,oBAAoB;;;AA6EpB;;;GAGG;AACU,QAAA,SAAS,GAAG,QAAQ,CAAC;AAElC,mDAAmD;AACnD,uEAAuE;AACvE,mEAGiC;AAEpB,QAAA,cAAc,GAAG;IAC1B,SAAS,EAAT,iBAAS;IACT,UAAU,EAAV,kCAAU;IACV,iBAAiB,EAAjB,yCAAiB;CACpB,CAAC"}
@@ -0,0 +1,20 @@
import { TunnelEndpoint as ITunnelEndpoint } from './tunnelEndpoint';
/**
* Gets a URI where a web client can connect to a tunnel port.
*
* Requests to the URI may result in HTTP 307 redirections, so the client may need to
* follow the redirection in order to connect to the port.
*
* If the port is not currently shared via the tunnel, or if a host is not currently
* connected to the tunnel, then requests to the port URI may result in a 502 Bad Gateway
* response.
*
* @param endpoint The tunnel endpoint containing connection information.
* @param portNumber The port number to connect to; the port is assumed to be
* separately shared by a tunnel host.
* @returns URI for the requested port, or `undefined` if the endpoint does not support
* web client connections.
*/
export declare function getPortUri(endpoint: ITunnelEndpoint, portNumber?: number): string | undefined;
export declare function getPortSshCommand(endpoint: ITunnelEndpoint, portNumber?: number): string | undefined;
//# sourceMappingURL=tunnelEndpointStatics.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"tunnelEndpointStatics.d.ts","sourceRoot":"","sources":["../../../src/contracts/tunnelEndpointStatics.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,IAAI,eAAe,EAAa,MAAM,kBAAkB,CAAC;AAEhF;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,eAAe,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAc7F;AAED,wBAAgB,iBAAiB,CAC7B,QAAQ,EAAE,eAAe,EACzB,UAAU,CAAC,EAAE,MAAM,GACpB,MAAM,GAAG,SAAS,CAcpB"}
+49
View File
@@ -0,0 +1,49 @@
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPortSshCommand = exports.getPortUri = void 0;
const tunnelEndpoint_1 = require("./tunnelEndpoint");
/**
* Gets a URI where a web client can connect to a tunnel port.
*
* Requests to the URI may result in HTTP 307 redirections, so the client may need to
* follow the redirection in order to connect to the port.
*
* If the port is not currently shared via the tunnel, or if a host is not currently
* connected to the tunnel, then requests to the port URI may result in a 502 Bad Gateway
* response.
*
* @param endpoint The tunnel endpoint containing connection information.
* @param portNumber The port number to connect to; the port is assumed to be
* separately shared by a tunnel host.
* @returns URI for the requested port, or `undefined` if the endpoint does not support
* web client connections.
*/
function getPortUri(endpoint, portNumber) {
if (!endpoint) {
throw new TypeError('A tunnel endpoint is required.');
}
if (typeof portNumber !== 'number' && !endpoint.tunnelUri) {
return endpoint.tunnelUri;
}
if (typeof portNumber !== 'number' || !endpoint.portUriFormat) {
return undefined;
}
return endpoint.portUriFormat.replace(tunnelEndpoint_1.portToken, portNumber.toString());
}
exports.getPortUri = getPortUri;
function getPortSshCommand(endpoint, portNumber) {
if (!endpoint) {
throw new TypeError('A tunnel endpoint is required.');
}
if (typeof portNumber !== 'number' && !endpoint.tunnelSshCommand) {
return endpoint.tunnelSshCommand;
}
if (typeof portNumber !== 'number' || !endpoint.portSshCommandFormat) {
return undefined;
}
return endpoint.portSshCommandFormat.replace(tunnelEndpoint_1.portToken, portNumber.toString());
}
exports.getPortSshCommand = getPortSshCommand;
//# sourceMappingURL=tunnelEndpointStatics.js.map
@@ -0,0 +1 @@
{"version":3,"file":"tunnelEndpointStatics.js","sourceRoot":"","sources":["../../../src/contracts/tunnelEndpointStatics.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,qDAAgF;AAEhF;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,UAAU,CAAC,QAAyB,EAAE,UAAmB;IACrE,IAAI,CAAC,QAAQ,EAAE;QACX,MAAM,IAAI,SAAS,CAAC,gCAAgC,CAAC,CAAC;KACzD;IAED,IAAI,OAAO,UAAU,KAAK,QAAQ,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE;QACvD,OAAO,QAAQ,CAAC,SAAS,CAAC;KAC7B;IAED,IAAI,OAAO,UAAU,KAAK,QAAQ,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE;QAC3D,OAAO,SAAS,CAAC;KACpB;IAED,OAAO,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,0BAAS,EAAE,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC5E,CAAC;AAdD,gCAcC;AAED,SAAgB,iBAAiB,CAC7B,QAAyB,EACzB,UAAmB;IAEnB,IAAI,CAAC,QAAQ,EAAE;QACX,MAAM,IAAI,SAAS,CAAC,gCAAgC,CAAC,CAAC;KACzD;IAED,IAAI,OAAO,UAAU,KAAK,QAAQ,IAAI,CAAC,QAAQ,CAAC,gBAAgB,EAAE;QAC9D,OAAO,QAAQ,CAAC,gBAAgB,CAAC;KACpC;IAED,IAAI,OAAO,UAAU,KAAK,QAAQ,IAAI,CAAC,QAAQ,CAAC,oBAAoB,EAAE;QAClE,OAAO,SAAS,CAAC;KACpB;IAED,OAAO,QAAQ,CAAC,oBAAoB,CAAC,OAAO,CAAC,0BAAS,EAAE,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC;AACnF,CAAC;AAjBD,8CAiBC"}
+28
View File
@@ -0,0 +1,28 @@
/**
* Header names for http requests that Tunnel Service can handle
*/
export declare enum TunnelHeaderNames {
/**
* Additional authorization header that can be passed to tunnel web forwarding to
* authenticate and authorize the client. The format of the value is the same as
* Authorization header that is sent to the Tunnel service by the tunnel SDK.
* Supported schemes: "tunnel" with the tunnel access JWT good for 'Connect' scope.
*/
XTunnelAuthorization = "X-Tunnel-Authorization",
/**
* Request ID header that nginx ingress controller adds to all requests if it's not
* there.
*/
XRequestID = "X-Request-ID",
/**
* Github Ssh public key which can be used to validate if it belongs to tunnel's
* owner.
*/
XGithubSshKey = "X-Github-Ssh-Key",
/**
* Header that will skip the antiphishing page when connection to a tunnel through web
* forwarding.
*/
XTunnelSkipAntiPhishingPage = "X-Tunnel-Skip-AntiPhishing-Page"
}
//# sourceMappingURL=tunnelHeaderNames.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"tunnelHeaderNames.d.ts","sourceRoot":"","sources":["../../../src/contracts/tunnelHeaderNames.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,oBAAY,iBAAiB;IACzB;;;;;OAKG;IACH,oBAAoB,2BAA2B;IAE/C;;;OAGG;IACH,UAAU,iBAAiB;IAE3B;;;OAGG;IACH,aAAa,qBAAqB;IAElC;;;OAGG;IACH,2BAA2B,oCAAoC;CAClE"}
+36
View File
@@ -0,0 +1,36 @@
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
// Generated from ../../../cs/src/Contracts/TunnelHeaderNames.cs
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
exports.TunnelHeaderNames = void 0;
/**
* Header names for http requests that Tunnel Service can handle
*/
var TunnelHeaderNames;
(function (TunnelHeaderNames) {
/**
* Additional authorization header that can be passed to tunnel web forwarding to
* authenticate and authorize the client. The format of the value is the same as
* Authorization header that is sent to the Tunnel service by the tunnel SDK.
* Supported schemes: "tunnel" with the tunnel access JWT good for 'Connect' scope.
*/
TunnelHeaderNames["XTunnelAuthorization"] = "X-Tunnel-Authorization";
/**
* Request ID header that nginx ingress controller adds to all requests if it's not
* there.
*/
TunnelHeaderNames["XRequestID"] = "X-Request-ID";
/**
* Github Ssh public key which can be used to validate if it belongs to tunnel's
* owner.
*/
TunnelHeaderNames["XGithubSshKey"] = "X-Github-Ssh-Key";
/**
* Header that will skip the antiphishing page when connection to a tunnel through web
* forwarding.
*/
TunnelHeaderNames["XTunnelSkipAntiPhishingPage"] = "X-Tunnel-Skip-AntiPhishing-Page";
})(TunnelHeaderNames = exports.TunnelHeaderNames || (exports.TunnelHeaderNames = {}));
//# sourceMappingURL=tunnelHeaderNames.js.map
@@ -0,0 +1 @@
{"version":3,"file":"tunnelHeaderNames.js","sourceRoot":"","sources":["../../../src/contracts/tunnelHeaderNames.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAClC,gEAAgE;AAChE,oBAAoB;;;AAEpB;;GAEG;AACH,IAAY,iBA0BX;AA1BD,WAAY,iBAAiB;IACzB;;;;;OAKG;IACH,oEAA+C,CAAA;IAE/C;;;OAGG;IACH,gDAA2B,CAAA;IAE3B;;;OAGG;IACH,uDAAkC,CAAA;IAElC;;;OAGG;IACH,oFAA+D,CAAA;AACnE,CAAC,EA1BW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QA0B5B"}
+24
View File
@@ -0,0 +1,24 @@
import { ErrorDetail } from './errorDetail';
import { Tunnel } from './tunnel';
/**
* Tunnel list by region.
*/
export interface TunnelListByRegion {
/**
* Azure region name.
*/
regionName?: string;
/**
* Cluster id in the region.
*/
clusterId?: string;
/**
* List of tunnels.
*/
value?: Tunnel[];
/**
* Error detail if getting list of tunnels in the region failed.
*/
error?: ErrorDetail;
}
//# sourceMappingURL=tunnelListByRegion.d.ts.map

Some files were not shown because too many files have changed in this diff Show More