@microsoft/dev-tunnels-contracts 1.3.5 → 1.3.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/README.md +2 -2
  2. package/clusterDetails.d.ts +19 -19
  3. package/clusterDetails.js +6 -6
  4. package/errorCodes.d.ts +17 -17
  5. package/errorCodes.js +25 -25
  6. package/errorDetail.d.ts +27 -27
  7. package/errorDetail.js +6 -6
  8. package/index.d.ts +24 -24
  9. package/index.js +29 -29
  10. package/innerErrorDetail.d.ts +15 -15
  11. package/innerErrorDetail.js +6 -6
  12. package/localNetworkTunnelEndpoint.d.ts +20 -20
  13. package/localNetworkTunnelEndpoint.js +6 -6
  14. package/namedRateStatus.d.ts +10 -10
  15. package/namedRateStatus.js +6 -6
  16. package/package.json +1 -1
  17. package/problemDetails.d.ts +24 -24
  18. package/problemDetails.js +6 -6
  19. package/rateStatus.d.ts +19 -19
  20. package/rateStatus.js +6 -6
  21. package/resourceStatus.d.ts +22 -22
  22. package/resourceStatus.js +6 -6
  23. package/serviceVersionDetails.d.ts +26 -26
  24. package/serviceVersionDetails.js +6 -6
  25. package/tsbuildinfo.json +1 -1
  26. package/tunnel.d.ts +87 -87
  27. package/tunnel.js +6 -6
  28. package/tunnelAccessControl.d.ts +27 -27
  29. package/tunnelAccessControl.js +13 -13
  30. package/tunnelAccessControlEntry.d.ts +116 -116
  31. package/tunnelAccessControlEntry.js +40 -40
  32. package/tunnelAccessControlEntryType.d.ts +45 -45
  33. package/tunnelAccessControlEntryType.js +53 -53
  34. package/tunnelAccessControlStatics.d.ts +10 -10
  35. package/tunnelAccessControlStatics.js +46 -46
  36. package/tunnelAccessScopes.d.ts +38 -38
  37. package/tunnelAccessScopes.js +46 -46
  38. package/tunnelAccessSubject.d.ts +39 -39
  39. package/tunnelAccessSubject.js +6 -6
  40. package/tunnelAuthenticationSchemes.d.ts +21 -21
  41. package/tunnelAuthenticationSchemes.js +29 -29
  42. package/tunnelConnectionMode.d.ts +19 -19
  43. package/tunnelConnectionMode.js +27 -27
  44. package/tunnelConstraints.d.ts +268 -253
  45. package/tunnelConstraints.d.ts.map +1 -1
  46. package/tunnelConstraints.js +276 -261
  47. package/tunnelConstraints.js.map +1 -1
  48. package/tunnelEndpoint.d.ts +76 -76
  49. package/tunnelEndpoint.js +20 -20
  50. package/tunnelEndpointStatics.d.ts +19 -19
  51. package/tunnelEndpointStatics.js +48 -48
  52. package/tunnelEvent.d.ts +48 -48
  53. package/tunnelEvent.js +24 -24
  54. package/tunnelHeaderNames.d.ts +27 -27
  55. package/tunnelHeaderNames.js +35 -35
  56. package/tunnelListByRegion.d.ts +23 -23
  57. package/tunnelListByRegion.js +6 -6
  58. package/tunnelListByRegionResponse.d.ts +14 -14
  59. package/tunnelListByRegionResponse.js +6 -6
  60. package/tunnelOptions.d.ts +99 -67
  61. package/tunnelOptions.d.ts.map +1 -1
  62. package/tunnelOptions.js +6 -6
  63. package/tunnelPort.d.ts +93 -93
  64. package/tunnelPort.js +6 -6
  65. package/tunnelPortListResponse.d.ts +14 -14
  66. package/tunnelPortListResponse.js +6 -6
  67. package/tunnelPortStatus.d.ts +39 -39
  68. package/tunnelPortStatus.js +6 -6
  69. package/tunnelProgress.d.ts +45 -45
  70. package/tunnelProgress.js +53 -53
  71. package/tunnelProtocol.d.ts +33 -33
  72. package/tunnelProtocol.js +41 -41
  73. package/tunnelRelayTunnelEndpoint.d.ts +14 -14
  74. package/tunnelRelayTunnelEndpoint.js +6 -6
  75. package/tunnelReportProgressEventArgs.d.ts +15 -15
  76. package/tunnelReportProgressEventArgs.js +6 -6
  77. package/tunnelServiceProperties.d.ts +107 -106
  78. package/tunnelServiceProperties.d.ts.map +1 -1
  79. package/tunnelServiceProperties.js +85 -84
  80. package/tunnelServiceProperties.js.map +1 -1
  81. package/tunnelServicePropertiesStatics.d.ts +17 -17
  82. package/tunnelServicePropertiesStatics.js +55 -55
  83. package/tunnelStatus.d.ts +100 -100
  84. package/tunnelStatus.js +6 -6
@@ -1,117 +1,117 @@
1
- import { TunnelAccessControlEntryType } from './tunnelAccessControlEntryType';
2
- /**
3
- * Data contract for an access control entry on a {@link Tunnel} or {@link TunnelPort}.
4
- *
5
- * An access control entry (ACE) grants or denies one or more access scopes to one or more
6
- * subjects. Tunnel ports inherit access control entries from their tunnel, and they may
7
- * have additional port-specific entries that augment or override those access rules.
8
- */
9
- export interface TunnelAccessControlEntry {
10
- /**
11
- * Gets or sets the access control entry type.
12
- */
13
- type: TunnelAccessControlEntryType;
14
- /**
15
- * Gets or sets the provider of the subjects in this access control entry. The
16
- * provider impacts how the subject identifiers are resolved and displayed. The
17
- * provider may be an identity provider such as AAD, or a system or standard such as
18
- * "ssh" or "ipv4".
19
- *
20
- * For user, group, or org ACEs, this value is the name of the identity provider of
21
- * the user/group/org IDs. It may be one of the well-known provider names in {@link
22
- * TunnelAccessControlEntry.providers}, or (in the future) a custom identity provider.
23
- * For public key ACEs, this value is the type of public key, e.g. "ssh". For IP
24
- * address range ACEs, this value is the IP address version, "ipv4" or "ipv6", or
25
- * "service-tag" if the range is defined by an Azure service tag. For anonymous ACEs,
26
- * this value is null.
27
- */
28
- provider?: string;
29
- /**
30
- * Gets or sets a value indicating whether this is an access control entry on a tunnel
31
- * port that is inherited from the tunnel's access control list.
32
- */
33
- isInherited?: boolean;
34
- /**
35
- * Gets or sets a value indicating whether this entry is a deny rule that blocks
36
- * access to the specified users. Otherwise it is an allow rule.
37
- *
38
- * All deny rules (including inherited rules) are processed after all allow rules.
39
- * Therefore a deny ACE cannot be overridden by an allow ACE that is later in the list
40
- * or on a more-specific resource. In other words, inherited deny ACEs cannot be
41
- * overridden.
42
- */
43
- isDeny?: boolean;
44
- /**
45
- * Gets or sets a value indicating whether this entry applies to all subjects that are
46
- * NOT in the {@link TunnelAccessControlEntry.subjects} list.
47
- *
48
- * Examples: an inverse organizations ACE applies to all users who are not members of
49
- * the listed organization(s); an inverse anonymous ACE applies to all authenticated
50
- * users; an inverse IP address ranges ACE applies to all clients that are not within
51
- * any of the listed IP address ranges. The inverse option is often useful in policies
52
- * in combination with {@link TunnelAccessControlEntry.isDeny}, for example a policy
53
- * could deny access to users who are not members of an organization or are outside of
54
- * an IP address range, effectively blocking any tunnels from allowing outside access
55
- * (because inherited deny ACEs cannot be overridden).
56
- */
57
- isInverse?: boolean;
58
- /**
59
- * Gets or sets an optional organization context for all subjects of this entry. The
60
- * use and meaning of this value depends on the {@link TunnelAccessControlEntry.type}
61
- * and {@link TunnelAccessControlEntry.provider} of this entry.
62
- *
63
- * For AAD users and group ACEs, this value is the AAD tenant ID. It is not currently
64
- * used with any other types of ACEs.
65
- */
66
- organization?: string;
67
- /**
68
- * Gets or sets the subjects for the entry, such as user or group IDs. The format of
69
- * the values depends on the {@link TunnelAccessControlEntry.type} and {@link
70
- * TunnelAccessControlEntry.provider} of this entry.
71
- */
72
- subjects: string[];
73
- /**
74
- * Gets or sets the access scopes that this entry grants or denies to the subjects.
75
- *
76
- * These must be one or more values from {@link TunnelAccessScopes}.
77
- */
78
- scopes: string[];
79
- /**
80
- * Gets or sets the expiration for an access control entry.
81
- *
82
- * If no value is set then this value is null.
83
- */
84
- expiration?: Date;
85
- }
86
- export declare namespace TunnelAccessControlEntry {
87
- /**
88
- * Constants for well-known identity providers.
89
- */
90
- enum Providers {
91
- /**
92
- * Microsoft (AAD) identity provider.
93
- */
94
- Microsoft = "microsoft",
95
- /**
96
- * GitHub identity provider.
97
- */
98
- GitHub = "github",
99
- /**
100
- * SSH public keys.
101
- */
102
- Ssh = "ssh",
103
- /**
104
- * IPv4 addresses.
105
- */
106
- IPv4 = "ipv4",
107
- /**
108
- * IPv6 addresses.
109
- */
110
- IPv6 = "ipv6",
111
- /**
112
- * Service tags.
113
- */
114
- ServiceTag = "service-tag"
115
- }
116
- }
1
+ import { TunnelAccessControlEntryType } from './tunnelAccessControlEntryType';
2
+ /**
3
+ * Data contract for an access control entry on a {@link Tunnel} or {@link TunnelPort}.
4
+ *
5
+ * An access control entry (ACE) grants or denies one or more access scopes to one or more
6
+ * subjects. Tunnel ports inherit access control entries from their tunnel, and they may
7
+ * have additional port-specific entries that augment or override those access rules.
8
+ */
9
+ export interface TunnelAccessControlEntry {
10
+ /**
11
+ * Gets or sets the access control entry type.
12
+ */
13
+ type: TunnelAccessControlEntryType;
14
+ /**
15
+ * Gets or sets the provider of the subjects in this access control entry. The
16
+ * provider impacts how the subject identifiers are resolved and displayed. The
17
+ * provider may be an identity provider such as AAD, or a system or standard such as
18
+ * "ssh" or "ipv4".
19
+ *
20
+ * For user, group, or org ACEs, this value is the name of the identity provider of
21
+ * the user/group/org IDs. It may be one of the well-known provider names in {@link
22
+ * TunnelAccessControlEntry.providers}, or (in the future) a custom identity provider.
23
+ * For public key ACEs, this value is the type of public key, e.g. "ssh". For IP
24
+ * address range ACEs, this value is the IP address version, "ipv4" or "ipv6", or
25
+ * "service-tag" if the range is defined by an Azure service tag. For anonymous ACEs,
26
+ * this value is null.
27
+ */
28
+ provider?: string;
29
+ /**
30
+ * Gets or sets a value indicating whether this is an access control entry on a tunnel
31
+ * port that is inherited from the tunnel's access control list.
32
+ */
33
+ isInherited?: boolean;
34
+ /**
35
+ * Gets or sets a value indicating whether this entry is a deny rule that blocks
36
+ * access to the specified users. Otherwise it is an allow rule.
37
+ *
38
+ * All deny rules (including inherited rules) are processed after all allow rules.
39
+ * Therefore a deny ACE cannot be overridden by an allow ACE that is later in the list
40
+ * or on a more-specific resource. In other words, inherited deny ACEs cannot be
41
+ * overridden.
42
+ */
43
+ isDeny?: boolean;
44
+ /**
45
+ * Gets or sets a value indicating whether this entry applies to all subjects that are
46
+ * NOT in the {@link TunnelAccessControlEntry.subjects} list.
47
+ *
48
+ * Examples: an inverse organizations ACE applies to all users who are not members of
49
+ * the listed organization(s); an inverse anonymous ACE applies to all authenticated
50
+ * users; an inverse IP address ranges ACE applies to all clients that are not within
51
+ * any of the listed IP address ranges. The inverse option is often useful in policies
52
+ * in combination with {@link TunnelAccessControlEntry.isDeny}, for example a policy
53
+ * could deny access to users who are not members of an organization or are outside of
54
+ * an IP address range, effectively blocking any tunnels from allowing outside access
55
+ * (because inherited deny ACEs cannot be overridden).
56
+ */
57
+ isInverse?: boolean;
58
+ /**
59
+ * Gets or sets an optional organization context for all subjects of this entry. The
60
+ * use and meaning of this value depends on the {@link TunnelAccessControlEntry.type}
61
+ * and {@link TunnelAccessControlEntry.provider} of this entry.
62
+ *
63
+ * For AAD users and group ACEs, this value is the AAD tenant ID. It is not currently
64
+ * used with any other types of ACEs.
65
+ */
66
+ organization?: string;
67
+ /**
68
+ * Gets or sets the subjects for the entry, such as user or group IDs. The format of
69
+ * the values depends on the {@link TunnelAccessControlEntry.type} and {@link
70
+ * TunnelAccessControlEntry.provider} of this entry.
71
+ */
72
+ subjects: string[];
73
+ /**
74
+ * Gets or sets the access scopes that this entry grants or denies to the subjects.
75
+ *
76
+ * These must be one or more values from {@link TunnelAccessScopes}.
77
+ */
78
+ scopes: string[];
79
+ /**
80
+ * Gets or sets the expiration for an access control entry.
81
+ *
82
+ * If no value is set then this value is null.
83
+ */
84
+ expiration?: Date;
85
+ }
86
+ export declare namespace TunnelAccessControlEntry {
87
+ /**
88
+ * Constants for well-known identity providers.
89
+ */
90
+ enum Providers {
91
+ /**
92
+ * Microsoft (AAD) identity provider.
93
+ */
94
+ Microsoft = "microsoft",
95
+ /**
96
+ * GitHub identity provider.
97
+ */
98
+ GitHub = "github",
99
+ /**
100
+ * SSH public keys.
101
+ */
102
+ Ssh = "ssh",
103
+ /**
104
+ * IPv4 addresses.
105
+ */
106
+ IPv4 = "ipv4",
107
+ /**
108
+ * IPv6 addresses.
109
+ */
110
+ IPv6 = "ipv6",
111
+ /**
112
+ * Service tags.
113
+ */
114
+ ServiceTag = "service-tag"
115
+ }
116
+ }
117
117
  //# sourceMappingURL=tunnelAccessControlEntry.d.ts.map
@@ -1,41 +1,41 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT license.
4
- // Generated from ../../../cs/src/Contracts/TunnelAccessControlEntry.cs
5
- /* eslint-disable */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.TunnelAccessControlEntry = void 0;
8
- var TunnelAccessControlEntry;
9
- (function (TunnelAccessControlEntry) {
10
- /**
11
- * Constants for well-known identity providers.
12
- */
13
- let Providers;
14
- (function (Providers) {
15
- /**
16
- * Microsoft (AAD) identity provider.
17
- */
18
- Providers["Microsoft"] = "microsoft";
19
- /**
20
- * GitHub identity provider.
21
- */
22
- Providers["GitHub"] = "github";
23
- /**
24
- * SSH public keys.
25
- */
26
- Providers["Ssh"] = "ssh";
27
- /**
28
- * IPv4 addresses.
29
- */
30
- Providers["IPv4"] = "ipv4";
31
- /**
32
- * IPv6 addresses.
33
- */
34
- Providers["IPv6"] = "ipv6";
35
- /**
36
- * Service tags.
37
- */
38
- Providers["ServiceTag"] = "service-tag";
39
- })(Providers = TunnelAccessControlEntry.Providers || (TunnelAccessControlEntry.Providers = {}));
40
- })(TunnelAccessControlEntry = exports.TunnelAccessControlEntry || (exports.TunnelAccessControlEntry = {}));
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT license.
4
+ // Generated from ../../../cs/src/Contracts/TunnelAccessControlEntry.cs
5
+ /* eslint-disable */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.TunnelAccessControlEntry = void 0;
8
+ var TunnelAccessControlEntry;
9
+ (function (TunnelAccessControlEntry) {
10
+ /**
11
+ * Constants for well-known identity providers.
12
+ */
13
+ let Providers;
14
+ (function (Providers) {
15
+ /**
16
+ * Microsoft (AAD) identity provider.
17
+ */
18
+ Providers["Microsoft"] = "microsoft";
19
+ /**
20
+ * GitHub identity provider.
21
+ */
22
+ Providers["GitHub"] = "github";
23
+ /**
24
+ * SSH public keys.
25
+ */
26
+ Providers["Ssh"] = "ssh";
27
+ /**
28
+ * IPv4 addresses.
29
+ */
30
+ Providers["IPv4"] = "ipv4";
31
+ /**
32
+ * IPv6 addresses.
33
+ */
34
+ Providers["IPv6"] = "ipv6";
35
+ /**
36
+ * Service tags.
37
+ */
38
+ Providers["ServiceTag"] = "service-tag";
39
+ })(Providers = TunnelAccessControlEntry.Providers || (TunnelAccessControlEntry.Providers = {}));
40
+ })(TunnelAccessControlEntry = exports.TunnelAccessControlEntry || (exports.TunnelAccessControlEntry = {}));
41
41
  //# sourceMappingURL=tunnelAccessControlEntry.js.map
@@ -1,46 +1,46 @@
1
- /**
2
- * Specifies the type of {@link TunnelAccessControlEntry}.
3
- */
4
- export declare enum TunnelAccessControlEntryType {
5
- /**
6
- * Uninitialized access control entry type.
7
- */
8
- None = "None",
9
- /**
10
- * The access control entry refers to all anonymous users.
11
- */
12
- Anonymous = "Anonymous",
13
- /**
14
- * The access control entry is a list of user IDs that are allowed (or denied) access.
15
- */
16
- Users = "Users",
17
- /**
18
- * The access control entry is a list of groups IDs that are allowed (or denied)
19
- * access.
20
- */
21
- Groups = "Groups",
22
- /**
23
- * The access control entry is a list of organization IDs that are allowed (or denied)
24
- * access.
25
- *
26
- * All users in the organizations are allowed (or denied) access, unless overridden by
27
- * following group or user rules.
28
- */
29
- Organizations = "Organizations",
30
- /**
31
- * The access control entry is a list of repositories. Users are allowed access to the
32
- * tunnel if they have access to the repo.
33
- */
34
- Repositories = "Repositories",
35
- /**
36
- * The access control entry is a list of public keys. Users are allowed access if they
37
- * can authenticate using a private key corresponding to one of the public keys.
38
- */
39
- PublicKeys = "PublicKeys",
40
- /**
41
- * The access control entry is a list of IP address ranges that are allowed (or
42
- * denied) access to the tunnel. Ranges can be IPv4, IPv6, or Azure service tags.
43
- */
44
- IPAddressRanges = "IPAddressRanges"
45
- }
1
+ /**
2
+ * Specifies the type of {@link TunnelAccessControlEntry}.
3
+ */
4
+ export declare enum TunnelAccessControlEntryType {
5
+ /**
6
+ * Uninitialized access control entry type.
7
+ */
8
+ None = "None",
9
+ /**
10
+ * The access control entry refers to all anonymous users.
11
+ */
12
+ Anonymous = "Anonymous",
13
+ /**
14
+ * The access control entry is a list of user IDs that are allowed (or denied) access.
15
+ */
16
+ Users = "Users",
17
+ /**
18
+ * The access control entry is a list of groups IDs that are allowed (or denied)
19
+ * access.
20
+ */
21
+ Groups = "Groups",
22
+ /**
23
+ * The access control entry is a list of organization IDs that are allowed (or denied)
24
+ * access.
25
+ *
26
+ * All users in the organizations are allowed (or denied) access, unless overridden by
27
+ * following group or user rules.
28
+ */
29
+ Organizations = "Organizations",
30
+ /**
31
+ * The access control entry is a list of repositories. Users are allowed access to the
32
+ * tunnel if they have access to the repo.
33
+ */
34
+ Repositories = "Repositories",
35
+ /**
36
+ * The access control entry is a list of public keys. Users are allowed access if they
37
+ * can authenticate using a private key corresponding to one of the public keys.
38
+ */
39
+ PublicKeys = "PublicKeys",
40
+ /**
41
+ * The access control entry is a list of IP address ranges that are allowed (or
42
+ * denied) access to the tunnel. Ranges can be IPv4, IPv6, or Azure service tags.
43
+ */
44
+ IPAddressRanges = "IPAddressRanges"
45
+ }
46
46
  //# sourceMappingURL=tunnelAccessControlEntryType.d.ts.map
@@ -1,54 +1,54 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT license.
4
- // Generated from ../../../cs/src/Contracts/TunnelAccessControlEntryType.cs
5
- /* eslint-disable */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.TunnelAccessControlEntryType = void 0;
8
- /**
9
- * Specifies the type of {@link TunnelAccessControlEntry}.
10
- */
11
- var TunnelAccessControlEntryType;
12
- (function (TunnelAccessControlEntryType) {
13
- /**
14
- * Uninitialized access control entry type.
15
- */
16
- TunnelAccessControlEntryType["None"] = "None";
17
- /**
18
- * The access control entry refers to all anonymous users.
19
- */
20
- TunnelAccessControlEntryType["Anonymous"] = "Anonymous";
21
- /**
22
- * The access control entry is a list of user IDs that are allowed (or denied) access.
23
- */
24
- TunnelAccessControlEntryType["Users"] = "Users";
25
- /**
26
- * The access control entry is a list of groups IDs that are allowed (or denied)
27
- * access.
28
- */
29
- TunnelAccessControlEntryType["Groups"] = "Groups";
30
- /**
31
- * The access control entry is a list of organization IDs that are allowed (or denied)
32
- * access.
33
- *
34
- * All users in the organizations are allowed (or denied) access, unless overridden by
35
- * following group or user rules.
36
- */
37
- TunnelAccessControlEntryType["Organizations"] = "Organizations";
38
- /**
39
- * The access control entry is a list of repositories. Users are allowed access to the
40
- * tunnel if they have access to the repo.
41
- */
42
- TunnelAccessControlEntryType["Repositories"] = "Repositories";
43
- /**
44
- * The access control entry is a list of public keys. Users are allowed access if they
45
- * can authenticate using a private key corresponding to one of the public keys.
46
- */
47
- TunnelAccessControlEntryType["PublicKeys"] = "PublicKeys";
48
- /**
49
- * The access control entry is a list of IP address ranges that are allowed (or
50
- * denied) access to the tunnel. Ranges can be IPv4, IPv6, or Azure service tags.
51
- */
52
- TunnelAccessControlEntryType["IPAddressRanges"] = "IPAddressRanges";
53
- })(TunnelAccessControlEntryType = exports.TunnelAccessControlEntryType || (exports.TunnelAccessControlEntryType = {}));
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT license.
4
+ // Generated from ../../../cs/src/Contracts/TunnelAccessControlEntryType.cs
5
+ /* eslint-disable */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.TunnelAccessControlEntryType = void 0;
8
+ /**
9
+ * Specifies the type of {@link TunnelAccessControlEntry}.
10
+ */
11
+ var TunnelAccessControlEntryType;
12
+ (function (TunnelAccessControlEntryType) {
13
+ /**
14
+ * Uninitialized access control entry type.
15
+ */
16
+ TunnelAccessControlEntryType["None"] = "None";
17
+ /**
18
+ * The access control entry refers to all anonymous users.
19
+ */
20
+ TunnelAccessControlEntryType["Anonymous"] = "Anonymous";
21
+ /**
22
+ * The access control entry is a list of user IDs that are allowed (or denied) access.
23
+ */
24
+ TunnelAccessControlEntryType["Users"] = "Users";
25
+ /**
26
+ * The access control entry is a list of groups IDs that are allowed (or denied)
27
+ * access.
28
+ */
29
+ TunnelAccessControlEntryType["Groups"] = "Groups";
30
+ /**
31
+ * The access control entry is a list of organization IDs that are allowed (or denied)
32
+ * access.
33
+ *
34
+ * All users in the organizations are allowed (or denied) access, unless overridden by
35
+ * following group or user rules.
36
+ */
37
+ TunnelAccessControlEntryType["Organizations"] = "Organizations";
38
+ /**
39
+ * The access control entry is a list of repositories. Users are allowed access to the
40
+ * tunnel if they have access to the repo.
41
+ */
42
+ TunnelAccessControlEntryType["Repositories"] = "Repositories";
43
+ /**
44
+ * The access control entry is a list of public keys. Users are allowed access if they
45
+ * can authenticate using a private key corresponding to one of the public keys.
46
+ */
47
+ TunnelAccessControlEntryType["PublicKeys"] = "PublicKeys";
48
+ /**
49
+ * The access control entry is a list of IP address ranges that are allowed (or
50
+ * denied) access to the tunnel. Ranges can be IPv4, IPv6, or Azure service tags.
51
+ */
52
+ TunnelAccessControlEntryType["IPAddressRanges"] = "IPAddressRanges";
53
+ })(TunnelAccessControlEntryType = exports.TunnelAccessControlEntryType || (exports.TunnelAccessControlEntryType = {}));
54
54
  //# sourceMappingURL=tunnelAccessControlEntryType.js.map
@@ -1,11 +1,11 @@
1
- /**
2
- * Checks that all items in an array of scopes are valid.
3
- * @param scopes List of scopes to validate.
4
- * @param validScopes Optional subset of scopes to be considered valid;
5
- * if omitted then all defined scopes are valid.
6
- * @param allowMultiple Whether to allow multiple space-delimited scopes in a single item.
7
- * Multiple scopes are supported when requesting a tunnel access token with a combination of scopes.
8
- * @throws Error if a scope is not valid.
9
- */
10
- export declare function validateScopes(scopes: string[], validScopes?: string[], allowMultiple?: boolean): void;
1
+ /**
2
+ * Checks that all items in an array of scopes are valid.
3
+ * @param scopes List of scopes to validate.
4
+ * @param validScopes Optional subset of scopes to be considered valid;
5
+ * if omitted then all defined scopes are valid.
6
+ * @param allowMultiple Whether to allow multiple space-delimited scopes in a single item.
7
+ * Multiple scopes are supported when requesting a tunnel access token with a combination of scopes.
8
+ * @throws Error if a scope is not valid.
9
+ */
10
+ export declare function validateScopes(scopes: string[], validScopes?: string[], allowMultiple?: boolean): void;
11
11
  //# sourceMappingURL=tunnelAccessControlStatics.d.ts.map
@@ -1,47 +1,47 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT license.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.validateScopes = void 0;
6
- const tunnelAccessScopes_1 = require("./tunnelAccessScopes");
7
- const allScopes = [
8
- tunnelAccessScopes_1.TunnelAccessScopes.Manage,
9
- tunnelAccessScopes_1.TunnelAccessScopes.ManagePorts,
10
- tunnelAccessScopes_1.TunnelAccessScopes.Host,
11
- tunnelAccessScopes_1.TunnelAccessScopes.Inspect,
12
- tunnelAccessScopes_1.TunnelAccessScopes.Connect,
13
- ];
14
- /**
15
- * Checks that all items in an array of scopes are valid.
16
- * @param scopes List of scopes to validate.
17
- * @param validScopes Optional subset of scopes to be considered valid;
18
- * if omitted then all defined scopes are valid.
19
- * @param allowMultiple Whether to allow multiple space-delimited scopes in a single item.
20
- * Multiple scopes are supported when requesting a tunnel access token with a combination of scopes.
21
- * @throws Error if a scope is not valid.
22
- */
23
- function validateScopes(scopes, validScopes, allowMultiple) {
24
- if (!Array.isArray(scopes)) {
25
- throw new TypeError('A scopes array was expected.');
26
- }
27
- if (allowMultiple) {
28
- scopes = scopes.map((s) => s.split(' ')).reduce((a, b) => a.concat(b), []);
29
- }
30
- scopes.forEach((scope) => {
31
- if (!scope) {
32
- throw new Error('Tunnel access scopes include a null/empty item.');
33
- }
34
- else if (!allScopes.includes(scope)) {
35
- throw new Error('Invalid tunnel access scope: ' + scope);
36
- }
37
- });
38
- if (Array.isArray(validScopes)) {
39
- scopes.forEach((scope) => {
40
- if (!validScopes.includes(scope)) {
41
- throw new Error('Tunnel access scope is invalid for current request: scope');
42
- }
43
- });
44
- }
45
- }
46
- exports.validateScopes = validateScopes;
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT license.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.validateScopes = void 0;
6
+ const tunnelAccessScopes_1 = require("./tunnelAccessScopes");
7
+ const allScopes = [
8
+ tunnelAccessScopes_1.TunnelAccessScopes.Manage,
9
+ tunnelAccessScopes_1.TunnelAccessScopes.ManagePorts,
10
+ tunnelAccessScopes_1.TunnelAccessScopes.Host,
11
+ tunnelAccessScopes_1.TunnelAccessScopes.Inspect,
12
+ tunnelAccessScopes_1.TunnelAccessScopes.Connect,
13
+ ];
14
+ /**
15
+ * Checks that all items in an array of scopes are valid.
16
+ * @param scopes List of scopes to validate.
17
+ * @param validScopes Optional subset of scopes to be considered valid;
18
+ * if omitted then all defined scopes are valid.
19
+ * @param allowMultiple Whether to allow multiple space-delimited scopes in a single item.
20
+ * Multiple scopes are supported when requesting a tunnel access token with a combination of scopes.
21
+ * @throws Error if a scope is not valid.
22
+ */
23
+ function validateScopes(scopes, validScopes, allowMultiple) {
24
+ if (!Array.isArray(scopes)) {
25
+ throw new TypeError('A scopes array was expected.');
26
+ }
27
+ if (allowMultiple) {
28
+ scopes = scopes.map((s) => s.split(' ')).reduce((a, b) => a.concat(b), []);
29
+ }
30
+ scopes.forEach((scope) => {
31
+ if (!scope) {
32
+ throw new Error('Tunnel access scopes include a null/empty item.');
33
+ }
34
+ else if (!allScopes.includes(scope)) {
35
+ throw new Error('Invalid tunnel access scope: ' + scope);
36
+ }
37
+ });
38
+ if (Array.isArray(validScopes)) {
39
+ scopes.forEach((scope) => {
40
+ if (!validScopes.includes(scope)) {
41
+ throw new Error('Tunnel access scope is invalid for current request: scope');
42
+ }
43
+ });
44
+ }
45
+ }
46
+ exports.validateScopes = validateScopes;
47
47
  //# sourceMappingURL=tunnelAccessControlStatics.js.map